Datasets:
Add files using upload-large-folder tool
Browse files- parse/train/B1ckMDqlg/B1ckMDqlg.md +482 -0
- parse/train/B1ckMDqlg/B1ckMDqlg_content_list.json +0 -0
- parse/train/B1ckMDqlg/B1ckMDqlg_middle.json +0 -0
- parse/train/B1ckMDqlg/B1ckMDqlg_model.json +0 -0
- parse/train/BJlZ5ySKPH/BJlZ5ySKPH.md +305 -0
- parse/train/BJlZ5ySKPH/BJlZ5ySKPH_content_list.json +1640 -0
- parse/train/BJlZ5ySKPH/BJlZ5ySKPH_middle.json +0 -0
- parse/train/BJlZ5ySKPH/BJlZ5ySKPH_model.json +0 -0
- parse/train/Byey7n05FQ/Byey7n05FQ.md +412 -0
- parse/train/Byey7n05FQ/Byey7n05FQ_content_list.json +1989 -0
- parse/train/Byey7n05FQ/Byey7n05FQ_middle.json +0 -0
- parse/train/Byey7n05FQ/Byey7n05FQ_model.json +0 -0
- parse/train/HkeSdCEtDS/HkeSdCEtDS.md +269 -0
- parse/train/HkeSdCEtDS/HkeSdCEtDS_content_list.json +1424 -0
- parse/train/HkeSdCEtDS/HkeSdCEtDS_middle.json +0 -0
- parse/train/HkeSdCEtDS/HkeSdCEtDS_model.json +0 -0
- parse/train/HklBjCEKvH/HklBjCEKvH.md +267 -0
- parse/train/HklBjCEKvH/HklBjCEKvH_content_list.json +1437 -0
- parse/train/HklBjCEKvH/HklBjCEKvH_middle.json +0 -0
- parse/train/HklBjCEKvH/HklBjCEKvH_model.json +0 -0
- parse/train/Kloou2uk_Rz/Kloou2uk_Rz.md +473 -0
- parse/train/Kloou2uk_Rz/Kloou2uk_Rz_content_list.json +1058 -0
- parse/train/Kloou2uk_Rz/Kloou2uk_Rz_middle.json +0 -0
- parse/train/Kloou2uk_Rz/Kloou2uk_Rz_model.json +0 -0
- parse/train/O358nrve1W/O358nrve1W_content_list.json +0 -0
- parse/train/O358nrve1W/O358nrve1W_middle.json +0 -0
- parse/train/chPj_I5KMHG/chPj_I5KMHG.md +403 -0
- parse/train/chPj_I5KMHG/chPj_I5KMHG_content_list.json +0 -0
- parse/train/chPj_I5KMHG/chPj_I5KMHG_middle.json +0 -0
- parse/train/chPj_I5KMHG/chPj_I5KMHG_model.json +0 -0
- parse/train/e5vrkfc5aau/e5vrkfc5aau.md +288 -0
- parse/train/e5vrkfc5aau/e5vrkfc5aau_content_list.json +1229 -0
- parse/train/e5vrkfc5aau/e5vrkfc5aau_middle.json +0 -0
- parse/train/e5vrkfc5aau/e5vrkfc5aau_model.json +0 -0
- parse/train/r14EOsCqKX/r14EOsCqKX.md +281 -0
- parse/train/r14EOsCqKX/r14EOsCqKX_content_list.json +1535 -0
- parse/train/r14EOsCqKX/r14EOsCqKX_middle.json +0 -0
- parse/train/r14EOsCqKX/r14EOsCqKX_model.json +0 -0
- parse/train/r1lPleBFvH/r1lPleBFvH.md +382 -0
- parse/train/r1lPleBFvH/r1lPleBFvH_content_list.json +2042 -0
- parse/train/r1lPleBFvH/r1lPleBFvH_middle.json +0 -0
- parse/train/r1lPleBFvH/r1lPleBFvH_model.json +0 -0
- parse/train/rkeqn1rtDH/rkeqn1rtDH.md +428 -0
- parse/train/rkeqn1rtDH/rkeqn1rtDH_content_list.json +0 -0
- parse/train/rkeqn1rtDH/rkeqn1rtDH_middle.json +0 -0
- parse/train/rkeqn1rtDH/rkeqn1rtDH_model.json +0 -0
- parse/train/ryenvpEKDr/ryenvpEKDr.md +464 -0
- parse/train/ryenvpEKDr/ryenvpEKDr_content_list.json +0 -0
- parse/train/ryenvpEKDr/ryenvpEKDr_middle.json +0 -0
- parse/train/ryenvpEKDr/ryenvpEKDr_model.json +0 -0
parse/train/B1ckMDqlg/B1ckMDqlg.md
ADDED
|
@@ -0,0 +1,482 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# OUTRAGEOUSLY LARGE NEURAL NETWORKS: THE SPARSELY-GATED MIXTURE-OF-EXPERTS LAYER
|
| 2 |
+
|
| 3 |
+
Noam Shazeer1, Azalia Mirhoseini∗†1, Krzysztof Maziarz∗2, Andy Davis1, Quoc $\mathrm { L e ^ { 1 } }$ , Geoffrey Hinton1 and Jeff Dean1
|
| 4 |
+
|
| 5 |
+
1Google Brain, {noam,azalia,andydavis,qvl,geoffhinton,jeff} $@$ google.com
|
| 6 |
+
2Jagiellonian University, Cracow, krzysztof.maziarz $@$ student.uj.edu.pl
|
| 7 |
+
|
| 8 |
+
# ABSTRACT
|
| 9 |
+
|
| 10 |
+
The capacity of a neural network to absorb information is limited by its number of parameters. Conditional computation, where parts of the network are active on a per-example basis, has been proposed in theory as a way of dramatically increasing model capacity without a proportional increase in computation. In practice, however, there are significant algorithmic and performance challenges. In this work, we address these challenges and finally realize the promise of conditional computation, achieving greater than $1 0 0 0 \mathrm { x }$ improvements in model capacity with only minor losses in computational efficiency on modern GPU clusters. We introduce a Sparsely-Gated Mixture-of-Experts layer (MoE), consisting of up to thousands of feed-forward sub-networks. A trainable gating network determines a sparse combination of these experts to use for each example. We apply the MoE to the tasks of language modeling and machine translation, where model capacity is critical for absorbing the vast quantities of knowledge available in the training corpora. We present model architectures in which a MoE with up to 137 billion parameters is applied convolutionally between stacked LSTM layers. On large language modeling and machine translation benchmarks, these models achieve significantly better results than state-of-the-art at lower computational cost.
|
| 11 |
+
|
| 12 |
+
# 1 INTRODUCTION AND RELATED WORK
|
| 13 |
+
|
| 14 |
+
# 1.1 CONDITIONAL COMPUTATION
|
| 15 |
+
|
| 16 |
+
Exploiting scale in both training data and model size has been central to the success of deep learning. When datasets are sufficiently large, increasing the capacity (number of parameters) of neural networks can give much better prediction accuracy. This has been shown in domains such as text (Sutskever et al., 2014; Bahdanau et al., 2014; Jozefowicz et al., 2016; Wu et al., 2016), images (Krizhevsky et al., 2012; Le et al., 2012), and audio (Hinton et al., 2012; Amodei et al., 2015). For typical deep learning models, where the entire model is activated for every example, this leads to a roughly quadratic blow-up in training costs, as both the model size and the number of training examples increase. Unfortunately, the advances in computing power and distributed computation fall short of meeting such demand.
|
| 17 |
+
|
| 18 |
+
Various forms of conditional computation have been proposed as a way to increase model capacity without a proportional increase in computational costs (Davis & Arel, 2013; Bengio et al., 2013; Eigen et al., 2013; Ludovic Denoyer, 2014; Cho & Bengio, 2014; Bengio et al., 2015; Almahairi et al., 2015). In these schemes, large parts of a network are active or inactive on a per-example basis. The gating decisions may be binary or sparse and continuous, stochastic or deterministic. Various forms of reinforcement learning and back-propagation are proposed for trarining the gating decisions.
|
| 19 |
+
|
| 20 |
+

|
| 21 |
+
Figure 1: A Mixture of Experts (MoE) layer embedded within a recurrent language model. In this case, the sparse gating function selects two experts to perform computations. Their outputs are modulated by the outputs of the gating network.
|
| 22 |
+
|
| 23 |
+
While these ideas are promising in theory, no work to date has yet demonstrated massive improvements in model capacity, training time, or model quality. We blame this on a combination of the following challenges:
|
| 24 |
+
|
| 25 |
+
• Modern computing devices, especially GPUs, are much faster at arithmetic than at branching. Most of the works above recognize this and propose turning on/off large chunks of the network with each gating decision.
|
| 26 |
+
• Large batch sizes are critical for performance, as they amortize the costs of parameter transfers and updates. Conditional computation reduces the batch sizes for the conditionally active chunks of the network.
|
| 27 |
+
• Network bandwidth can be a bottleneck. A cluster of GPUs may have computational power thousands of times greater than the aggregate inter-device network bandwidth. To be computationally efficient, the relative computational versus network demands of an algorithm must exceed this ratio. Embedding layers, which can be seen as a form of conditional computation, are handicapped by this very problem. Since the embeddings generally need to be sent across the network, the number of (example, parameter) interactions is limited by network bandwidth instead of computational capacity. Depending on the scheme, loss terms may be necessary to achieve the desired level of sparsity per-chunk and/or per example. Bengio et al. (2015) use three such terms. These issues can affect both model quality and load-balancing.
|
| 28 |
+
• Model capacity is most critical for very large data sets. The existing literature on conditional computation deals with relatively small image recognition data sets consisting of up to 600,000 images. It is hard to imagine that the labels of these images provide a sufficient signal to adequately train a model with millions, let alone billions of parameters.
|
| 29 |
+
|
| 30 |
+
In this work, we for the first time address all of the above challenges and finally realize the promise of conditional computation. We obtain greater than $1 0 0 0 \mathrm { x }$ improvements in model capacity with only minor losses in computational efficiency and significantly advance the state-of-the-art results on public language modeling and translation data sets.
|
| 31 |
+
|
| 32 |
+
# 1.2 OUR APPROACH: THE SPARSELY-GATED MIXTURE-OF-EXPERTS LAYER
|
| 33 |
+
|
| 34 |
+
Our approach to conditional computation is to introduce a new type of general purpose neural network component: a Sparsely-Gated Mixture-of-Experts Layer (MoE). The MoE consists of a number of experts, each a simple feed-forward neural network, and a trainable gating network which selects a sparse combination of the experts to process each input (see Figure 1). All parts of the network are trained jointly by back-propagation.
|
| 35 |
+
|
| 36 |
+
While the introduced technique is generic, in this paper we focus on language modeling and machine translation tasks, which are known to benefit from very large models. In particular, we apply a MoE convolutionally between stacked LSTM layers (Hochreiter & Schmidhuber, 1997), as in Figure 1. The MoE is called once for each position in the text, selecting a potentially different combination of experts at each position. The different experts tend to become highly specialized based on syntax and semantics (see Appendix E Table 9). On both language modeling and machine translation benchmarks, we improve on best published results at a fraction of the computational cost.
|
| 37 |
+
|
| 38 |
+
# 1.3 RELATED WORK ON MIXTURES OF EXPERTS
|
| 39 |
+
|
| 40 |
+
Since its introduction more than two decades ago (Jacobs et al., 1991; Jordan & Jacobs, 1994), the mixture-of-experts approach has been the subject of much research. Different types of expert architectures hae been proposed such as SVMs (Collobert et al., 2002), Gaussian Processes (Tresp, 2001; Theis & Bethge, 2015; Deisenroth & Ng, 2015), Dirichlet Processes (Shahbaba & Neal, 2009), and deep networks. Other work has focused on different expert configurations such as a hierarchical structure (Yao et al., 2009), infinite numbers of experts (Rasmussen & Ghahramani, 2002), and adding experts sequentially (Aljundi et al., 2016). Garmash & Monz (2016) suggest an ensemble model in the format of mixture of experts for machine translation. The gating network is trained on a pre-trained ensemble NMT model.
|
| 41 |
+
|
| 42 |
+
The works above concern top-level mixtures of experts. The mixture of experts is the whole model. Eigen et al. (2013) introduce the idea of using multiple MoEs with their own gating networks as parts of a deep model. It is intuitive that the latter approach is more powerful, since complex problems may contain many sub-problems each requiring different experts. They also allude in their conclusion to the potential to introduce sparsity, turning MoEs into a vehicle for computational computation.
|
| 43 |
+
|
| 44 |
+
Our work builds on this use of MoEs as a general purpose neural network component. While Eigen et al. (2013) uses two stacked MoEs allowing for two sets of gating decisions, our convolutional application of the MoE allows for different gating decisions at each position in the text. We also realize sparse gating and demonstrate its use as a practical way to massively increase model capacity.
|
| 45 |
+
|
| 46 |
+
# 2 THE STRUCTURE OF THE MIXTURE-OF-EXPERTS LAYER
|
| 47 |
+
|
| 48 |
+
The Mixture-of-Experts (MoE) layer consists of a set of $n$ “expert networks" $E _ { 1 } , \cdots , E _ { n }$ , and a “gating network" $G$ whose output is a sparse $n$ -dimensional vector. Figure 1 shows an overview of the MoE module. The experts are themselves neural networks, each with their own parameters. Although in principle we only require that the experts accept the same sized inputs and produce the same-sized outputs, in our initial investigations in this paper, we restrict ourselves to the case where the models are feed-forward networks with identical architectures, but with separate parameters.
|
| 49 |
+
|
| 50 |
+
Let us denote by $G ( x )$ and $E _ { i } ( x )$ the output of the gating network and the output of the $i$ -th expert network for a given input $x$ . The output $y$ of the MoE module can be written as follows:
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
y = \sum _ { i = 1 } ^ { n } G ( x ) _ { i } E _ { i } ( x )
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
We save computation based on the sparsity of the output of $G ( x )$ . Wherever $G ( x ) _ { i } = 0$ , we need not compute $E _ { i } ( x )$ . In our experiments, we have up to thousands of experts, but only need to evaluate a handful of them for every example. If the number of experts is very large, we can reduce the branching factor by using a two-level hierarchical MoE. In a hierarchical MoE, a primary gating network chooses a sparse weighted combination of “experts", each of which is itself a secondary mixture-of-experts with its own gating network. In the following we focus on ordinary MoEs. We provide more details on hierarchical MoEs in Appendix B.
|
| 57 |
+
|
| 58 |
+
Our implementation is related to other models of conditional computation. A MoE whose experts are simple weight matrices is similar to the parameterized weight matrix proposed in (Cho & Bengio, 2014). A MoE whose experts have one hidden layer is similar to the block-wise dropout described in (Bengio et al., 2015), where the dropped-out layer is sandwiched between fully-activated layers.
|
| 59 |
+
|
| 60 |
+
# 2.1 GATING NETWORK
|
| 61 |
+
|
| 62 |
+
Softmax Gating: A simple choice of non-sparse gating function (Jordan & Jacobs, 1994) is to multiply the input by a trainable weight matrix $W _ { g }$ and then apply the Sof tmax function.
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
G _ { \sigma } ( x ) = S o f t m a x ( x \cdot W _ { g } )
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
Noisy Top-K Gating: We add two components to the Softmax gating network: sparsity and noise. Before taking the softmax function, we add tunable Gaussian noise, then keep only the top $\mathrm { k }$ values, setting the rest to $- \infty$ (which causes the corresponding gate values to equal 0). The sparsity serves to save computation, as described above. While this form of sparsity creates some theoretically scary discontinuities in the output of gating function, we have not yet observed this to be a problem in practice. The noise term helps with load balancing, as will be discussed in Appendix A. The amount of noise per component is controlled by a second trainable weight matrix $W _ { n o i s e }$ .
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
G ( x ) = S o f t m a x ( K e e p T o p K ( H ( x ) , k ) )
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
H ( x ) _ { i } = ( x \cdot W _ { g } ) _ { i } + S t a n d a r d N o r m a l ( ) \cdot S o f t p l u s ( ( x \cdot W _ { n o i s e } ) _ { i } )
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
K e e p T o p K ( v , k ) _ { i } = \left\{ { v _ { i } } \atop { - \infty } \right. \ { \mathrm { ~ i f ~ } } v _ { i } { \mathrm { ~ i s ~ i n ~ t h e ~ t o p ~ } } k { \mathrm { ~ e l e m e n t s ~ o f ~ } } v .
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
Training the Gating Network We train the gating network by simple back-propagation, along with the rest of the model. If we choose $k > 1$ , the gate values for the top $\mathbf { k }$ experts have nonzero derivatives with respect to the weights of the gating network. This type of occasionally-sensitive behavior is described in (Bengio et al., 2013) with respect to noisy rectifiers. Gradients also backpropagate through the gating network to its inputs. Our method differs here from (Bengio et al., 2015) who use boolean gates and a REINFORCE-style approach to train the gating network.
|
| 83 |
+
|
| 84 |
+
# 3 ADDRESSING PERFORMANCE CHALLENGES
|
| 85 |
+
|
| 86 |
+
# 3.1 THE SHRINKING BATCH PROBLEM
|
| 87 |
+
|
| 88 |
+
On modern CPUs and GPUs, large batch sizes are necessary for computational efficiency, so as to amortize the overhead of parameter loads and updates. If the gating network chooses $k$ out of $n$ experts for each example, then for a batch of $b$ examples, each expert receives a much smaller batch of approximately ${ \frac { \hbar b } { n } } \ll b$ examples. This causes a naive MoE implementation to become very inefficient as the number of experts increases. The solution to this shrinking batch problem is to make the original batch size as large as possible. However, batch size tends to be limited by the memory necessary to store activations between the forwards and backwards passes. We propose the following techniques for increasing the batch size:
|
| 89 |
+
|
| 90 |
+
Mixing Data Parallelism and Model Parallelism: In a conventional distributed training setting, multiple copies of the model on different devices asynchronously process distinct batches of data, and parameters are synchronized through a set of parameter servers. In our technique, these different batches run synchronously so that they can be combined for the MoE layer. We distribute the standard layers of the model and the gating network according to conventional data-parallel schemes, but keep only one shared copy of each expert. Each expert in the MoE layer receives a combined batch consisting of the relevant examples from all of the data-parallel input batches. The same set of devices function as data-parallel replicas (for the standard layers and the gating networks) and as model-parallel shards (each hosting a subset of the experts). If the model is distributed over $d$ devices, and each device processes a batch of size $b$ , each expert receives a batch of approximately $\frac { k b d } { n }$ examples. Thus, we achieve a factor of $d$ improvement in expert batch size.
|
| 91 |
+
|
| 92 |
+
In the case of a hierarchical MoE (Section B), the primary gating network employs data parallelism, and the secondary MoEs employ model parallelism. Each secondary MoE resides on one device.
|
| 93 |
+
|
| 94 |
+
This technique allows us to increase the number of experts (and hence the number of parameters) by proportionally increasing the number of devices in the training cluster. The total batch size increases, keeping the batch size per expert constant. The memory and bandwidth requirements per device also remain constant, as do the step times, as does the amount of time necessary to process a number of training examples equal to the number of parameters in the model. It is our goal to train a trillionparameter model on a trillion-word corpus. We have not scaled our systems this far as of the writing of this paper, but it should be possible by adding more hardware.
|
| 95 |
+
|
| 96 |
+
Taking Advantage of Convolutionality: In our language models, we apply the same MoE to each time step of the previous layer. If we wait for the previous layer to finish, we can apply the MoE to all the time steps together as one big batch. Doing so increases the size of the input batch to the MoE layer by a factor of the number of unrolled time steps.
|
| 97 |
+
|
| 98 |
+
Increasing Batch Size for a Recurrent MoE: We suspect that even more powerful models may involve applying a MoE recurrently. For example, the weight matrices of a LSTM or other RNN could be replaced by a MoE. Sadly, such models break the convolutional trick from the last paragraph, since the input to the MoE at one timestep depends on the output of the MoE at the previous timestep. Gruslys et al. (2016) describe a technique for drastically reducing the number of stored activations in an unrolled RNN, at the cost of recomputing forward activations. This would allow for a large increase in batch size.
|
| 99 |
+
|
| 100 |
+
# 3.2 NETWORK BANDWIDTH
|
| 101 |
+
|
| 102 |
+
Another major performance concern in distributed computing is network bandwidth. Since the experts are stationary (see above) and the number of gating parameters is small, most of the communication involves sending the inputs and outputs of the experts across the network. To maintain computational efficiency, the ratio of an expert’s computation to the size of its input and output must exceed the ratio of computational to network capacity of the computing device. For GPUs, this may be thousands to one. In our experiments, we use experts with one hidden layer containing thousands of RELU-activated units. Since the weight matrices in the expert have sizes input_size×hidden_size and hidden_size × output_size, the ratio of computation to input and output is equal to the size of the hidden layer. Conveniently, we can increase computational efficiency simply by using a larger hidden layer, or more hidden layers.
|
| 103 |
+
|
| 104 |
+
# 4 BALANCING EXPERT UTILIZATION
|
| 105 |
+
|
| 106 |
+
We have observed that the gating network tends to converge to a state where it always produces large weights for the same few experts. This imbalance is self-reinforcing, as the favored experts are trained more rapidly and thus are selected even more by the gating network. Eigen et al. (2013) describe the same phenomenon, and use a hard constraint at the beginning of training to avoid this local minimum. Bengio et al. (2015) include a soft constraint on the batch-wise average of each gate.1
|
| 107 |
+
|
| 108 |
+
We take a soft constraint approach. We define the importance of an expert relative to a batch of training examples to be the batchwise sum of the gate values for that expert. We define an additional loss $L _ { i m p o r t a n c e }$ , which is added to the overall loss function for the model. This loss is equal to the square of the coefficient of variation of the set of importance values, multiplied by a hand-tuned scaling factor wimportance. This additional loss encourages all experts to have equal importance.
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
I m p o r t a n c e ( X ) = \sum _ { x \in X } G ( x )
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
L _ { i m p o r t a n c e } ( X ) = w _ { i m p o r t a n c e } \cdot C V ( I m p o r t a n c e ( X ) ) ^ { 2 }
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
While this loss function can ensure equal importance, experts may still receive very different numbers of examples. For example, one expert may receive a few examples with large weights, and another may receive many examples with small weights. This can cause memory and performance problems on distributed hardware. To solve this problem, we introduce a second loss function, $L _ { l o a d }$ , which ensures balanced loads. Appendix A contains the definition of this function, along with experimental results.
|
| 119 |
+
|
| 120 |
+
# 5 EXPERIMENTS
|
| 121 |
+
|
| 122 |
+
# 5.1 1 BILLION WORD LANGUAGE MODELING BENCHMARK
|
| 123 |
+
|
| 124 |
+
Dataset: This dataset, introduced by (Chelba et al., 2013) consists of shuffled unique sentences from news articles, totaling approximately 829 million words, with a vocabulary of 793,471 words.
|
| 125 |
+
|
| 126 |
+
Previous State-of-the-Art: The best previously published results (Jozefowicz et al., 2016) use models consisting of one or more stacked Long Short-Term Memory (LSTM) layers (Hochreiter & Schmidhuber, 1997; Gers et al., 2000). The number of parameters in the LSTM layers of these models vary from 2 million to 151 million. Quality increases greatly with parameter count, as do computational costs. Results for these models form the top line of Figure 2-right.
|
| 127 |
+
|
| 128 |
+
MoE Models: Our models consist of two stacked LSTM layers with a MoE layer between them (see Figure 1). We vary the sizes of the layers and the number of experts. For full details on model architecture, training regimen, additional baselines and results, see Appendix C.
|
| 129 |
+
|
| 130 |
+
Low Computation, Varied Capacity: To investigate the effects of adding capacity, we trained a series of MoE models all with roughly equal computational costs: about 8 million multiply-andadds per training example per timestep in the forwards pass, excluding the softmax layer. We call this metric (ops/timestep). We trained models with flat MoEs containing 4, 32, and 256 experts, and models with hierarchical MoEs containing 256, 1024, and 4096 experts. Each expert had about 1 million parameters. For all the MoE layers, 4 experts were active per input.
|
| 131 |
+
|
| 132 |
+
The results of these models are shown in Figure 2-left. The model with 4 always-active experts performed (unsurprisingly) similarly to the computationally-matched baseline models, while the largest of the models (4096 experts) achieved an impressive $24 \%$ lower perplexity on the test set.
|
| 133 |
+
|
| 134 |
+

|
| 135 |
+
|
| 136 |
+

|
| 137 |
+
Figure 2: Model comparison on 1-Billion-Word Language-Modeling Benchmark. On the left, we plot test perplexity as a function of model capacity for models with similar computational budgets of approximately 8-million-ops-per-timestep. On the right, we plot test perplexity as a function of computational budget. The top line represents the LSTM models from (Jozefowicz et al., 2016). The bottom line represents 4-billion parameter MoE models with different computational budgets.
|
| 138 |
+
|
| 139 |
+
Varied Computation, High Capacity: In addition to the largest model from the previous section, we trained two more MoE models with similarly high capacity (4 billion parameters), but higher computation budgets. These models had larger LSTMs, and fewer but larger experts. Details can be found in Appendix C.2. Results of these three models form the bottom line of Figure 2-right. Table 1 compares the results of these models to the best previously-published result on this dataset . Even the fastest of these models beats the best published result (when controlling for the number of training epochs), despite requiring only $6 \%$ of the computation.
|
| 140 |
+
|
| 141 |
+
Table 1: Summary of high-capacity MoE-augmented models with varying computational budgets, vs. best previously published results (Jozefowicz et al., 2016). Details in Appendix C.
|
| 142 |
+
|
| 143 |
+
<table><tr><td></td><td>Test Perplexity 10 epochs</td><td>Test Perplexity 100 epochs</td><td>#Parameters excluding embedding and softmax layers</td><td>ops/timestep</td><td>Training Time 10 epochs</td><td>TFLOPS /GPU</td></tr><tr><td>BestPublishedResults</td><td>34.7</td><td>30.6</td><td>151 million</td><td>151 million</td><td>59 hours,32 k40s</td><td>1.09</td></tr><tr><td>Low-BudgetMoEModel</td><td>34.1</td><td></td><td>4303million</td><td>8.9 million</td><td>15 hours,16 k40s</td><td>0.74</td></tr><tr><td>Medium-Budget MoE Model</td><td>31.3</td><td></td><td>4313 million</td><td>33.8 million</td><td>17 hours,32 k40s</td><td>1.22</td></tr><tr><td>High-Budget MoE Model</td><td>28.0</td><td></td><td>4371 million</td><td>142.7 million</td><td>47 hours,32 k40s</td><td>1.56</td></tr></table>
|
| 144 |
+
|
| 145 |
+
Computational Efficiency: We trained our models using TensorFlow (Abadi et al., 2016) on clusters containing 16-32 Tesla K40 GPUs. For each of our models, we determine computational efficiency in TFLOPS/GPU by dividing the number of floating point operations required to process one training batch by the observed step time and the number of GPUs in the cluster. The operation counts used here are higher than the ones we report in our ops/timestep numbers in that we include the backwards pass, we include the importance-sampling-based training of the softmax layer, and we count a multiply-and-add as two separate operations. For all of our MoE models, the floating point operations involved in the experts represent between $37 \%$ and $46 \%$ of the total.
|
| 146 |
+
|
| 147 |
+
For our baseline models wtih no MoE, observed computational efficiency ranged from 1.07-1.29 TFLOPS/GPU. For our low-computation MoE models, computation efficiency ranged from 0.74- 0.90 TFLOPS/GPU, except for the 4-expert model which did not make full use of the available parallelism. Our highest-computation MoE model was more efficient at 1.56 TFLOPS/GPU, likely due to the larger matrices. These numbers represent a significant fraction of the theoretical maximum of 4.29 TFLOPS/GPU claimed by NVIDIA. Detailed results are in Appendix C, Table 7.
|
| 148 |
+
|
| 149 |
+
# 5.2 100 BILLION WORD GOOGLE NEWS CORPUS
|
| 150 |
+
|
| 151 |
+

|
| 152 |
+
Figure 3: Language modeling on a 100 billion word corpus. Models have similar computational budgets (8 million ops/timestep).
|
| 153 |
+
|
| 154 |
+
On the 1-billion-word corpus, adding additional capacity seems to produce diminishing returns as the number of parameters in the MoE layer exceeds 1 billion, as can be seen in Figure 2-left. We hypothesized that for a larger training set, even higher capacities would produce significant quality improvements.
|
| 155 |
+
|
| 156 |
+
We constructed a similar training set consisting of shuffled unique sentences from Google’s internal news corpus, totalling roughly 100 billion words. Similarly to the previous section, we tested a series of models with similar computational costs of about 8 million ops/timestep. In addition to a baseline LSTM model, we trained models augmented with MoE layers containing 32, 256, 1024,
|
| 157 |
+
|
| 158 |
+
4096, 16384, 65536, and 131072 experts. This corresponds to up to 137 billion parameters in the MoE layer. Details on architecture, training, and results are given in Appendix D.
|
| 159 |
+
|
| 160 |
+
Results: Figure 3 shows test perplexity as a function of capacity after training on 10 billion words (top line) and 100 billion words (bottom line). When training over the full 100 billion words, test perplexity improves significantly up to 65536 experts (68 billion parameters), dropping $39 \%$ lower than the computationally matched baseline, but degrades at 131072 experts, possibly a result of too much sparsity. The widening gap between the two lines demonstrates (unsurprisingly) that increased model capacity helps more on larger training sets.
|
| 161 |
+
|
| 162 |
+
Even at 65536 experts $( 9 9 . 9 9 4 \%$ layer sparsity), computational efficiency for the model stays at a respectable 0.72 TFLOPS/GPU.
|
| 163 |
+
|
| 164 |
+
# 5.3 MACHINE TRANSLATION (SINGLE LANGUAGE PAIR)
|
| 165 |
+
|
| 166 |
+
Model Architecture: Our model was a modified version of the GNMT model described in (Wu et al., 2016). To reduce computation, we decreased the number of LSTM layers in the encoder and decoder from 9 and 8 to 3 and 2 respectively. We inserted MoE layers in both the encoder (between layers 2 and 3) and the decoder (between layers 1 and 2). Each MoE layer contained up to 2048 experts each with about two million parameters, adding a total of about 8 billion parameters to the models. Further details on model architecture, testing procedure and results can be found in Appendix E.
|
| 167 |
+
|
| 168 |
+
Datasets: We benchmarked our method on the WMT’14 En ${ } \mathrm { F r }$ and $\mathrm { E n } { } \mathrm { D e }$ corpora, whose training sets have 36M sentence pairs and 5M sentence pairs, respectively. The experimental protocols were also similar to those in (Wu et al., 2016): newstest2014 was used as the test set to compare against previous work (Luong et al., 2015a; Zhou et al., 2016; Wu et al., 2016), while the combination of newstest2012 and newstest2013 was used as the development set. We also tested the same model on Google’s Production English to French data.
|
| 169 |
+
|
| 170 |
+
Table 2: Results on WMT’ $1 4 \mathrm { E n }$ Fr newstest2014 (bold values represent best results).
|
| 171 |
+
|
| 172 |
+
<table><tr><td>Model</td><td>Test Perplexity</td><td>Test BLEU</td><td>ops/timenstep</td><td>Total #Parameters</td><td>Training Time</td></tr><tr><td>MoE with 2048 Experts MoE with 2048 Experts (longer training)</td><td>2.69 2.63</td><td>40.35</td><td>85M</td><td>8.7B 8.7B</td><td>3 days/64k40s 6 days/64 k40s</td></tr><tr><td>GNMT (Wu et al., 2016)</td><td>2.79</td><td>40.56 39.22</td><td>85M 214M</td><td>278M</td><td>6 days/96k80s</td></tr><tr><td>GNMT+RL (Wu et al., 2016)</td><td>2.96</td><td>39.92</td><td>214M</td><td>278M</td><td>6 days/96 k80s</td></tr><tr><td>PBMT(Durrani et al.,2014)</td><td></td><td>37.0</td><td></td><td></td><td></td></tr><tr><td>LSTM(6-layer) (Luong et al.,2015b)</td><td></td><td>31.5</td><td></td><td></td><td></td></tr><tr><td>LSTM(6-layer+PosUnk)(Luong et al.,2015b)</td><td></td><td>33.1</td><td></td><td></td><td></td></tr><tr><td>DeepAtt (Zhou et al.,2016)</td><td></td><td>37.7</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>DeepAtt+PosUnk (Zhou et al.,2016)</td><td></td><td>39.2</td><td></td><td></td><td></td></tr></table>
|
| 173 |
+
|
| 174 |
+
Table 3: Results on WMT’14 En De newstest2014 (bold values represent best results).
|
| 175 |
+
|
| 176 |
+
<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>TestPerplexity</td><td rowspan=1 colspan=1>TestBLEU</td><td rowspan=1 colspan=1>ops/timestep</td><td rowspan=1 colspan=1>Total#Parameters</td><td rowspan=1 colspan=1>TrainingTime</td></tr><tr><td rowspan=1 colspan=1>MoE with 2048 Experts</td><td rowspan=1 colspan=1>4.64</td><td rowspan=1 colspan=1>26.03</td><td rowspan=1 colspan=1>85M</td><td rowspan=1 colspan=1>8.7B</td><td rowspan=1 colspan=1>1 day/64 k40s</td></tr><tr><td rowspan=1 colspan=1>GNMT (Wu et al., 2016)GNMT +RL (Wu et al., 2016)PBMT (Durrani et al.,2014)DeepAtt (Zhou et al.,2016)</td><td rowspan=1 colspan=1>5.258.08</td><td rowspan=1 colspan=1>24.9124.6620.720.6</td><td rowspan=1 colspan=1>214M214M</td><td rowspan=1 colspan=1>278M278M</td><td rowspan=1 colspan=1>1 day/96k80s1 day/96 k80s</td></tr></table>
|
| 177 |
+
|
| 178 |
+
Table 4: Results on the Google Production $\mathrm { E n } { }$ Fr dataset (bold values represent best results).
|
| 179 |
+
|
| 180 |
+
<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>EvalPerplexity</td><td rowspan=1 colspan=1>EvalBLEU</td><td rowspan=1 colspan=1>TestPerplexity</td><td rowspan=1 colspan=1>TestBLEU</td><td rowspan=1 colspan=1>ops/timestep</td><td rowspan=1 colspan=1>Total#Parameters</td><td rowspan=1 colspan=1>TrainingTime</td></tr><tr><td rowspan=1 colspan=1>MoEwith 2048Experts</td><td rowspan=1 colspan=1>2.60</td><td rowspan=1 colspan=1>37.27</td><td rowspan=1 colspan=1>2.69</td><td rowspan=1 colspan=1>36.57</td><td rowspan=1 colspan=1>85M</td><td rowspan=1 colspan=1>8.7B</td><td rowspan=1 colspan=1>1 day/64 k40s</td></tr><tr><td rowspan=1 colspan=1>GNMT(Wu et al.,2016)</td><td rowspan=1 colspan=1>2.78</td><td rowspan=1 colspan=1>35.80</td><td rowspan=1 colspan=1>2.87</td><td rowspan=1 colspan=1>35.56</td><td rowspan=1 colspan=1>214M</td><td rowspan=1 colspan=1>278M</td><td rowspan=1 colspan=1>6 days/96k80s</td></tr></table>
|
| 181 |
+
|
| 182 |
+
Results: Tables 2, 3, and 4 show the results of our largest models, compared with published results. Our approach achieved BLEU scores of 40.56 and 26.03 on the WMT’ $1 4 ~ \mathrm { E n { \to } F r }$ and $\mathrm { E n } { } \mathrm { D e }$ benchmarks. As our models did not use RL refinement, these results constitute significant gains of 1.34 and 1.12 BLEU score on top of the strong baselines in (Wu et al., 2016). The perplexity scores are also better.2 On the Google Production dataset, our model achieved 1.01 higher test BLEU score even after training for only one sixth of the time.
|
| 183 |
+
|
| 184 |
+
# 5.4 MULTILINGUAL MACHINE TRANSLATION
|
| 185 |
+
|
| 186 |
+
Dataset: (Johnson et al., 2016) train a single GNMT (Wu et al., 2016) model on a very large combined dataset of twelve language pairs. Results are somewhat worse than those for 12 separately trained single-pair GNMT models. This is not surprising, given that the twelve models have 12 times the capacity and twelve times the aggregate training of the one model. We repeat this experiment with a single MoE-augmented model. See Appendix E for details on model architecture. We train our model on the same dataset as (Johnson et al., 2016) and process the same number of training examples (about 3 billion sentence pairs). Our training time was shorter due to the lower computational budget of our model.
|
| 187 |
+
|
| 188 |
+
Results: Results for the single-pair GNMT models, the multilingual GNMT model and the multilingual MoE model are given in Table 5. The MoE model achieves $19 \%$ lower perplexity on the dev set than the multilingual GNMT model. On BLEU score, the MoE model significantly beats the multilingual GNMT model on 11 of the 12 language pairs (by as much as 5.84 points), and even beats the monolingual GNMT models on 8 of 12 language pairs. The poor performance on English Korean seems to be a result of severe overtraining, as for the rarer language pairs a small number of real examples were highly oversampled in the training corpus.
|
| 189 |
+
|
| 190 |
+
Table 5: Multilingual Machine Translation (bold values represent best results).
|
| 191 |
+
|
| 192 |
+
<table><tr><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1>GNMT-Mono</td><td rowspan=1 colspan=1>GNMT-Multi</td><td rowspan=1 colspan=1>MoE-Multi</td><td rowspan=1 colspan=1>MoE-Multi vs.GNMT-Multi</td></tr><tr><td rowspan=1 colspan=2>Parametersops/timesteptraining time,hardware</td><td rowspan=1 colspan=1>278M/model212Mvarious</td><td rowspan=1 colspan=1>278M212M21 days,96 k20s</td><td rowspan=1 colspan=1>8.7B102M12 days,64 k40s</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=12 colspan=2>Perplexity (dev)French →English Test BLEUGerman →English Test BLEUJapanese→English Test BLEUKorean →English Test BLEUPortuguese→English Test BLEUSpanish →English Test BLEUEnglish→French Test BLEUEnglish→German Test BLEUEnglish →Japanese Test BLEUEnglish→Korean Test BLEUEnglish →Portuguese Test BLEU</td><td rowspan=2 colspan=1>36.47</td><td rowspan=1 colspan=1>4.14</td><td rowspan=1 colspan=1>3.35</td><td rowspan=1 colspan=1>-19%</td></tr><tr><td rowspan=1 colspan=1>34.40</td><td rowspan=1 colspan=1>37.46</td><td rowspan=1 colspan=1>+3.06</td></tr><tr><td rowspan=1 colspan=1>31.77</td><td rowspan=1 colspan=1>31.17</td><td rowspan=1 colspan=1>34.80</td><td rowspan=1 colspan=1>+3.63</td></tr><tr><td rowspan=1 colspan=1>23.41</td><td rowspan=1 colspan=1>21.62</td><td rowspan=1 colspan=1>25.91</td><td rowspan=1 colspan=1>+4.29</td></tr><tr><td rowspan=1 colspan=1>25.42</td><td rowspan=1 colspan=1>22.87</td><td rowspan=1 colspan=1>28.71</td><td rowspan=1 colspan=1>+5.84</td></tr><tr><td rowspan=1 colspan=1>44.40</td><td rowspan=1 colspan=1>42.53</td><td rowspan=1 colspan=1>46.13</td><td rowspan=1 colspan=1>+3.60</td></tr><tr><td rowspan=1 colspan=1>38.00</td><td rowspan=1 colspan=1>36.04</td><td rowspan=1 colspan=1>39.39</td><td rowspan=1 colspan=1>+3.35</td></tr><tr><td rowspan=1 colspan=1>English→French Test BLEU</td><td rowspan=1 colspan=1>35.37</td><td rowspan=1 colspan=1>34.00</td><td rowspan=1 colspan=1>36.59</td><td rowspan=1 colspan=1>+2.59</td></tr><tr><td rowspan=1 colspan=1>English→German Test BLEU</td><td rowspan=1 colspan=1>26.43</td><td rowspan=1 colspan=1>23.15</td><td rowspan=1 colspan=1>24.53</td><td rowspan=1 colspan=1>+1.38</td></tr><tr><td rowspan=1 colspan=1>23.66</td><td rowspan=1 colspan=1>21.10</td><td rowspan=1 colspan=1>22.78</td><td rowspan=1 colspan=1>+1.68</td></tr><tr><td rowspan=3 colspan=2>English→Korean Test BLEUEnglish →Portuguese Test BLEUEnglish →Spanish Test BLEU</td><td rowspan=1 colspan=1>19.75</td><td rowspan=1 colspan=1>18.41</td><td rowspan=1 colspan=1>16.62</td><td rowspan=1 colspan=1>-1.79</td></tr><tr><td rowspan=1 colspan=1>38.40</td><td rowspan=1 colspan=1>37.35</td><td rowspan=1 colspan=1>37.90</td><td rowspan=1 colspan=1>+0.55</td></tr><tr><td rowspan=1 colspan=1>34.50</td><td rowspan=1 colspan=1>34.25</td><td rowspan=1 colspan=1>36.21</td><td rowspan=1 colspan=1>+1.96</td></tr></table>
|
| 193 |
+
|
| 194 |
+
# 6 CONCLUSION
|
| 195 |
+
|
| 196 |
+
This work is the first to demonstrate major wins from conditional computation in deep networks. We carefully identified the design considerations and challenges of conditional computing and addressed them with a combination of algorithmic and engineering solutions. While we focused on text, conditional computation may help in other domains as well, provided sufficiently large training sets. We look forward to seeing many novel implementations and applications of conditional computation in the years to come.
|
| 197 |
+
|
| 198 |
+
# ACKNOWLEDGMENTS
|
| 199 |
+
|
| 200 |
+
We would like to thank all of the members of the Google Brain and Google Translate teams who helped us with this project, in particular Zhifeng Chen, Yonghui Wu, and Melvin Johnson. Thanks also to our anonymous ICLR reviewers for the helpful suggestions on making this paper better.
|
| 201 |
+
|
| 202 |
+
# REFERENCES
|
| 203 |
+
|
| 204 |
+
Martín Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Gregory S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian J. Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Józefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dan Mané, Rajat Monga, Sherry Moore, Derek Gordon Murray, Chris Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul A. Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda B. Viégas, Oriol Vinyals, Pete Warden, Martin Wattenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. CoRR, abs/1603.04467, 2016. URL http://arxiv.org/abs/1603.04467.
|
| 205 |
+
|
| 206 |
+
Rahaf Aljundi, Punarjay Chakravarty, and Tinne Tuytelaars. Expert gate: Lifelong learning with a network of experts. CoRR, abs/1611.06194, 2016. URL http://arxiv.org/abs/1611. 06194.
|
| 207 |
+
|
| 208 |
+
A. Almahairi, N. Ballas, T. Cooijmans, Y. Zheng, H. Larochelle, and A. Courville. Dynamic Capacity Networks. ArXiv e-prints, November 2015.
|
| 209 |
+
|
| 210 |
+
Dario Amodei, Rishita Anubhai, Eric Battenberg, Carl Case, Jared Casper, Bryan Catanzaro, Jingdong Chen, Mike Chrzanowski, Adam Coates, Greg Diamos, Erich Elsen, Jesse Engel, Linxi Fan, Christopher Fougner, Tony Han, Awni Y. Hannun, Billy Jun, Patrick LeGresley, Libby Lin, Sharan Narang, Andrew Y. Ng, Sherjil Ozair, Ryan Prenger, Jonathan Raiman, Sanjeev Satheesh, David Seetapun, Shubho Sengupta, Yi Wang, Zhiqian Wang, Chong Wang, Bo Xiao, Dani Yogatama, Jun Zhan, and Zhenyao Zhu. Deep speech 2: End-to-end speech recognition in english and mandarin. arXiv preprint arXiv:1512.02595, 2015.
|
| 211 |
+
|
| 212 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014.
|
| 213 |
+
|
| 214 |
+
Emmanuel Bengio, Pierre-Luc Bacon, Joelle Pineau, and Doina Precup. Conditional computation in neural networks for faster models. arXiv preprint arXiv:1511.06297, 2015.
|
| 215 |
+
|
| 216 |
+
Yoshua Bengio, Nicholas Léonard, and Aaron Courville. Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432, 2013.
|
| 217 |
+
|
| 218 |
+
Ciprian Chelba, Tomas Mikolov, Mike Schuster, Qi Ge, Thorsten Brants, Phillipp Koehn, and Tony Robinson. One billion word benchmark for measuring progress in statistical language modeling. arXiv preprint arXiv:1312.3005, 2013.
|
| 219 |
+
|
| 220 |
+
K. Cho and Y. Bengio. Exponentially Increasing the Capacity-to-Computation Ratio for Conditional Computation in Deep Learning. ArXiv e-prints, June 2014.
|
| 221 |
+
|
| 222 |
+
Ronan Collobert, Samy Bengio, and Yoshua Bengio. A parallel mixture of SVMs for very large scale problems. Neural Computing, 2002.
|
| 223 |
+
|
| 224 |
+
Andrew Davis and Itamar Arel. Low-rank approximations for conditional feedforward computation in deep neural networks. arXiv preprint arXiv:1312.4461, 2013.
|
| 225 |
+
|
| 226 |
+
Marc Peter Deisenroth and Jun Wei Ng. Distributed Gaussian processes. In ICML, 2015.
|
| 227 |
+
|
| 228 |
+
John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization, 2010.
|
| 229 |
+
|
| 230 |
+
Nadir Durrani, Barry Haddow, Philipp Koehn, and Kenneth Heafield. Edinburgh’s phrase-based machine translation systems for wmt-14. In Proceedings of the Ninth Workshop on Statistical Machine Translation, 2014.
|
| 231 |
+
|
| 232 |
+
David Eigen, Marc’Aurelio Ranzato, and Ilya Sutskever. Learning factored representations in a deep mixture of experts. arXiv preprint arXiv:1312.4314, 2013.
|
| 233 |
+
|
| 234 |
+
Ekaterina Garmash and Christof Monz. Ensemble learning for multi-source neural machine translation. In staff.science.uva.nl/c.monz, 2016.
|
| 235 |
+
|
| 236 |
+
Felix A. Gers, Jürgen A. Schmidhuber, and Fred A. Cummins. Learning to forget: Continual prediction with lstm. Neural Computation, 2000.
|
| 237 |
+
|
| 238 |
+
Audrunas Gruslys, Rémi Munos, Ivo Danihelka, Marc Lanctot, and Alex Graves. Memory-efficient backpropagation through time. CoRR, abs/1606.03401, 2016. URL http://arxiv.org/ abs/1606.03401.
|
| 239 |
+
|
| 240 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. IEEE Conference on Computer Vision and Pattern Recognition, 2015.
|
| 241 |
+
|
| 242 |
+
Geoffrey Hinton, Li Deng, Dong Yu, George E. Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara N. Sainath, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 2012.
|
| 243 |
+
|
| 244 |
+
Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural Computation, 1997.
|
| 245 |
+
|
| 246 |
+
Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015.
|
| 247 |
+
|
| 248 |
+
Robert A. Jacobs, Michael I. Jordan, Steven J. Nowlan, and Geoffrey E. Hinton. Adaptive mixtures of local experts. Neural Computing, 1991.
|
| 249 |
+
|
| 250 |
+
Melvin Johnson, Mike Schuster, Quoc V. Le, Maxim Krikun, Yonghui Wu, Zhifeng Chen, Nikhil Thorat, Fernanda B. Viégas, Martin Wattenberg, Greg Corrado, Macduff Hughes, and Jeffrey Dean. Google’s multilingual neural machine translation system: Enabling zero-shot translation. CoRR, abs/1611.04558, 2016. URL http://arxiv.org/abs/1611.04558.
|
| 251 |
+
|
| 252 |
+
Michael I. Jordan and Robert A. Jacobs. Hierarchical mixtures of experts and the EM algorithm. Neural Computing, 1994.
|
| 253 |
+
|
| 254 |
+
Rafal Jozefowicz, Oriol Vinyals, Mike Schuster, Noam Shazeer, and Yonghui Wu. Exploring the limits of language modeling. arXiv preprint arXiv:1602.02410, 2016.
|
| 255 |
+
|
| 256 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015.
|
| 257 |
+
|
| 258 |
+
Reinhard Kneser and Hermann. Ney. Improved backingoff for m-gram language modeling., 1995.
|
| 259 |
+
|
| 260 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012.
|
| 261 |
+
|
| 262 |
+
Quoc V. Le, Marc’Aurelio Ranzato, Rajat Monga, Matthieu Devin, Kai Chen, Greg S. Corrado, Jeffrey Dean, and Andrew Y. Ng. Building high-level features using large scale unsupervised learning. In ICML, 2012.
|
| 263 |
+
|
| 264 |
+
Patrick Gallinari Ludovic Denoyer. Deep sequential neural network. arXiv preprint arXiv:1410.0510, 2014.
|
| 265 |
+
|
| 266 |
+
Minh-Thang Luong, Hieu Pham, and Christopher D. Manning. Effective approaches to attentionbased neural machine translation. EMNLP, 2015a.
|
| 267 |
+
|
| 268 |
+
Minh-Thang Luong, Ilya Sutskever, Quoc V. Le, Oriol Vinyals, and Wojciech Zaremba. Addressing the rare word problem in neural machine translation. ACL, 2015b.
|
| 269 |
+
|
| 270 |
+
Carl Edward Rasmussen and Zoubin Ghahramani. Infinite mixtures of Gaussian process experts. NIPS, 2002.
|
| 271 |
+
|
| 272 |
+
Hasim Sak, Andrew W Senior, and Françoise Beaufays. Long short-term memory recurrent neural network architectures for large scale acoustic modeling. In INTERSPEECH, pp. 338–342, 2014.
|
| 273 |
+
|
| 274 |
+
Mike Schuster and Kaisuke Nakajima. Japanese and Korean voice search. ICASSP, 2012.
|
| 275 |
+
|
| 276 |
+
Babak Shahbaba and Radford Neal. Nonlinear models using dirichlet process mixtures. JMLR, 2009.
|
| 277 |
+
|
| 278 |
+
Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. Sequence to sequence learning with neural networks. In NIPS, 2014.
|
| 279 |
+
|
| 280 |
+
Lucas Theis and Matthias Bethge. Generative image modeling using spatial LSTMs. In NIPS, 2015.
|
| 281 |
+
|
| 282 |
+
Volker Tresp. Mixtures of Gaussian Processes. In NIPS, 2001.
|
| 283 |
+
|
| 284 |
+
Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V. Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, Jeff Klingner, Apurva Shah, Melvin Johnson, Xiaobing Liu, Łukasz Kaiser, Stephan Gouws, Yoshikiyo Kato, Taku Kudo, Hideto Kazawa, Keith Stevens, George Kurian, Nishant Patil, Wei Wang, Cliff Young, Jason Smith, Jason Riesa, Alex Rudnick, Oriol Vinyals, Greg Corrado, Macduff Hughes, and Jeffrey Dean. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016.
|
| 285 |
+
|
| 286 |
+
Bangpeng Yao, Dirk Walther, Diane Beck, and Li Fei-fei. Hierarchical mixture of classification experts uncovers interactions between brain regions. In NIPS. 2009.
|
| 287 |
+
|
| 288 |
+
Wojciech Zaremba, Ilya Sutskever, and Oriol Vinyals. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, 2014.
|
| 289 |
+
|
| 290 |
+
Jie Zhou, Ying Cao, Xuguang Wang, Peng Li, and Wei Xu. Deep recurrent models with fast-forward connections for neural machine translation. arXiv preprint arXiv:1606.04199, 2016.
|
| 291 |
+
|
| 292 |
+
# APPENDICES
|
| 293 |
+
|
| 294 |
+
# A LOAD-BALANCING LOSS
|
| 295 |
+
|
| 296 |
+
As discussed in section 4, for load-balancing purposes, we want to define an additional loss function to encourage experts to receive roughly equal numbers of training examples. Unfortunately, the number of examples received by an expert is a discrete quantity, so it can not be used in backpropagation. Instead, we define a smooth estimator $L o a d ( X )$ of the number of examples assigned to each expert for a batch $X$ of inputs. The smoothness allows us to back-propagate gradients through the estimator. This is the purpose of the noise term in the gating function. We define $P ( x , i )$ as the probability that $G ( x ) _ { i }$ is nonzero, given a new random choice of noise on element $i$ , but keeping the already-sampled choices of noise on the other elements. To compute $P ( x , i )$ , we note that the $G ( x ) _ { i }$ is nonzero if and only if $H ( x ) _ { i }$ is greater than the $k ^ { t h }$ -greatest element of $H ( x )$ excluding itself. The probability works out to be:
|
| 297 |
+
|
| 298 |
+
$$
|
| 299 |
+
\begin{array} { r l r } & { } & { P ( x , i ) = P r \Big ( ( x \cdot W _ { g } ) _ { i } + S t a n d a r d N o r m a l ( ) \cdot S o f t p l u s ( ( x \cdot W _ { n o i s e } ) _ { i } ) } \\ & { } & { > k t h \_ e x c l u d i n g ( H ( x ) , k , i ) \Big ) } \end{array}
|
| 300 |
+
$$
|
| 301 |
+
|
| 302 |
+
Where kth_excluding $( v , k , i )$ means the kth highest component of $v$ , excluding component $i$ . Simplifying, we get:
|
| 303 |
+
|
| 304 |
+
$$
|
| 305 |
+
P ( x , i ) = \Phi \Big ( \frac { ( x \cdot W _ { g } ) _ { i } - k t h \_ e x c l u d i n g ( H ( x ) , k , i ) } { S o f t p l u s ( ( x \cdot W _ { n o i s e } ) _ { i } ) } \Big )
|
| 306 |
+
$$
|
| 307 |
+
|
| 308 |
+
Where $\Phi$ is the CDF of the standard normal distribution.
|
| 309 |
+
|
| 310 |
+
$$
|
| 311 |
+
L o a d ( X ) _ { i } = \sum _ { x \in X } P ( x , i )
|
| 312 |
+
$$
|
| 313 |
+
|
| 314 |
+
We can now define the load loss to be the square of the coefficient of variation of the load vector, multiplied by a hand-tuned scaling factor $w _ { l o a d }$ .
|
| 315 |
+
|
| 316 |
+
$$
|
| 317 |
+
L _ { l o a d } ( X ) = w _ { l o a d } \cdot C V ( L o a d ( X ) ) ^ { 2 }
|
| 318 |
+
$$
|
| 319 |
+
|
| 320 |
+
Initial Load Imbalance: To avoid out-of-memory errors, we need to initialize the network in a state of approximately equal expert load (since the soft constraints need some time to work). To accomplish this, we initialize the matrices $W _ { g }$ and $W _ { n o i s e }$ to all zeros, which yields no signal and some noise.
|
| 321 |
+
|
| 322 |
+
Experiments: We trained a set of models with identical architecture (the MoE-256 model described in Appendix C), using different values of $w _ { i m p o r t a n c e }$ and $w _ { l o a d }$ . We trained each model for 10 epochs, then measured perplexity on the test set. We also measured the coefficients of variation in Importance and Load, as well as ratio of the load on the most overloaded expert to the average load. This last value is significant for load balancing purposes on distributed hardware. All of these metrics were averaged over several training batches.
|
| 323 |
+
|
| 324 |
+
Table 6: Experiments with different combinations of losses.
|
| 325 |
+
|
| 326 |
+
<table><tr><td>Wimportance</td><td>Wload</td><td>Test Perplexity</td><td>CV(Importance(X))</td><td>cv(Load(X))</td><td>max(Load(X)) mean(Load(X))</td></tr><tr><td>0.0</td><td>0.0</td><td>39.8</td><td>3.04</td><td>3.01</td><td>17.80</td></tr><tr><td>0.2</td><td>0.0</td><td>35.6</td><td>0.06</td><td>0.17</td><td>1.47</td></tr><tr><td>0.0</td><td>0.2</td><td>35.7</td><td>0.22</td><td>0.04</td><td>1.15</td></tr><tr><td>0.1</td><td>0.1</td><td>35.6</td><td>0.06</td><td>0.05</td><td>1.14</td></tr><tr><td>0.01</td><td>0.01</td><td>35.7</td><td>0.48</td><td>0.11</td><td>1.37</td></tr><tr><td>1.0</td><td>1.0</td><td>35.7</td><td>0.03</td><td>0.02</td><td>1.07</td></tr></table>
|
| 327 |
+
|
| 328 |
+
Results: Results are reported in Table 6. All the combinations containing at least one the two losses led to very similar model quality, where having no loss was much worse. Models with higher values of $w _ { l o a d }$ had lower loads on the most overloaded expert.
|
| 329 |
+
|
| 330 |
+
# B HIERACHICAL MIXTURE OF EXPERTS
|
| 331 |
+
|
| 332 |
+
If the number of experts is very large, we can reduce the branching factor by using a two-level hierarchical MoE. In a hierarchical MoE, a primary gating network chooses a sparse weighted combination of “experts", each of which is itself a secondary mixture-of-experts with its own gating network.3 If the hierarchical MoE consists of $a$ groups of $b$ experts each, we denote the primary gating network by $G _ { p r i m a r y }$ , the secondary gating networks by $\left( G _ { 1 } , G _ { 2 } . . G _ { a } \right)$ , and the expert networks by $( E _ { 0 , 0 } , E _ { 0 , 1 } . . . E _ { a , b } ^ { \mathrm { ~ ~ } } )$ . The output of the MoE is given by:
|
| 333 |
+
|
| 334 |
+
$$
|
| 335 |
+
y _ { H } = \sum _ { i = 1 } ^ { a } \sum _ { j = 1 } ^ { b } G _ { p r i m a r y } ( x ) _ { i } \cdot G _ { i } ( x ) _ { j } \cdot E _ { i , j } ( x )
|
| 336 |
+
$$
|
| 337 |
+
|
| 338 |
+
Our metrics of expert utilization change to the following:
|
| 339 |
+
|
| 340 |
+
$$
|
| 341 |
+
I m p o r t a n c e _ { H } ( X ) _ { i , j } = \sum _ { x \in X } G _ { p r i m a r y } ( x ) _ { i } \cdot G _ { i } ( x ) _ { j }
|
| 342 |
+
$$
|
| 343 |
+
|
| 344 |
+
$$
|
| 345 |
+
L o a d _ { H } ( X ) _ { i , j } = \frac { L o a d _ { p r i m a r y } ( X ) _ { i } \cdot L o a d _ { i } ( X ^ { ( i ) } ) _ { j } } { | X ^ { ( i ) } | }
|
| 346 |
+
$$
|
| 347 |
+
|
| 348 |
+
$L o a d _ { p r i m a r y }$ and $L o a d _ { i }$ deonte the Load functions for the primary gating network and $i ^ { t h }$ secondary gating network respectively. $X ^ { ( i ) }$ denotes the subset of $X$ for which $G _ { p r i m a r y } ( x ) _ { i } > 0$ .
|
| 349 |
+
|
| 350 |
+
It would seem simpler to let $L o a d _ { H } ( X ) _ { i , j } = L o a d _ { i } ( X _ { i } ) _ { j }$ , but this would not have a gradient with respect to the primary gating network, so we use the formulation above.
|
| 351 |
+
|
| 352 |
+
C 1 BILLION WORD LANGUAGE MODELING BENCHMARK - EXPERIMENTAL DETAILS
|
| 353 |
+
|
| 354 |
+
# C.1 8-MILLION-OPERATIONS-PER-TIMESTEP MODELS
|
| 355 |
+
|
| 356 |
+
Model Architecture: Our model consists of five layers: a word embedding layer, a recurrent Long Short-Term Memory (LSTM) layer (Hochreiter & Schmidhuber, 1997; Gers et al., 2000), a MoE layer, a second LSTM layer, and a softmax layer. The dimensionality of the embedding layer, the number of units in each LSTM layer, and the input and output dimensionality of the MoE layer are all equal to 512. For every layer other than the softmax, we apply dropout (Zaremba et al., 2014) to the layer output, dropping each activation with probability DropP rob, otherwise dividing by $( 1 - D r o p P r o b )$ . After dropout, the output of the previous layer is added to the layer output. This residual connection encourages gradient flow (He et al., 2015).
|
| 357 |
+
|
| 358 |
+
MoE Layer Architecture: Each expert in the MoE layer is a feed forward network with one ReLU-activated hidden layer of size 1024 and an output layer of size 512. Thus, each expert contains $[ 5 1 2 * 1 0 2 4 ] + [ 1 0 2 4 * 5 1 2 ] = 1 M$ parameters. The output of the MoE layer is passed through a sigmoid function before dropout. We varied the number of experts between models, using ordinary MoE layers with 4, 32 and 256 experts and hierarchical MoE layers with 256, 1024 and 4096 experts. We call the resulting models MoE-4, MoE-32, MoE-256, MoE-256-h, MoE-1024-h and MoE-4096- h. For the hierarchical MoE layers, the first level branching factor was 16, corresponding to the number of GPUs in our cluster. We use Noisy-Top-K Gating (see Section 2.1) with $k = 4$ for the ordinary MoE layers and $k = 2$ at each level of the hierarchical MoE layers. Thus, each example is processed by exactly 4 experts for a total of 4M ops/timestep. The two LSTM layers contribute 2M ops/timestep each for the desired total of 8M.
|
| 359 |
+
|
| 360 |
+
Computationally-Matched Baselines: The MoE-4 model does not employ sparsity, since all 4 experts are always used. In addition, we trained four more computationally-matched baseline models with no sparsity:
|
| 361 |
+
|
| 362 |
+
• MoE-1-Wide: The MoE layer consists of a single "expert" containing one ReLU-activated hidden layer of size 4096.
|
| 363 |
+
• MoE-1-Deep: The MoE layer consists of a single "expert" containing four ReLU-activated hidden layers, each with size 1024.
|
| 364 |
+
• 4xLSTM-512: We replace the MoE layer with two additional 512-unit LSTM layers.
|
| 365 |
+
• LSTM-2048-512: The model contains one 2048-unit LSTM layer (and no MoE). The output of the LSTM is projected down to 512 dimensions (Sak et al., 2014). The next timestep of the LSTM receives the projected output. This is identical to one of the models published in (Jozefowicz et al., 2016). We re-ran it to account for differences in training regimen, and obtained results very similar to the published ones.
|
| 366 |
+
|
| 367 |
+
Training: The models were trained on a cluster of 16 K40 GPUs using the synchronous method described in Section 3. Each batch consisted of a set of sentences totaling roughly 300,000 words. In the interest of time, we limited training to 10 epochs, (27,000 steps). Training took 12-16 hours for all models, except for MoE-4, which took 18 hours (since all the expert computation was performed on only 4 of 16 GPUs). We used the Adam optimizer (Kingma & Ba, 2015). The base learning rate was increased linearly for the first 1000 training steps, and decreased after that so as to be proportional to the inverse square root of the step number. The Softmax output layer was trained efficiently using importance sampling similarly to the models in (Jozefowicz et al., 2016). For each model, we performed a hyper-parmeter search to find the best dropout probability, in increments of 0.1.
|
| 368 |
+
|
| 369 |
+
To ensure balanced expert utilization we set $w _ { i m p o r t a n c e } = 0 . 1$ and $w _ { l o a d } = 0 . 1$ , as described in Section 4 and Appendix A.
|
| 370 |
+
|
| 371 |
+
Results: We evaluate our model using perplexity on the holdout dataset, used by (Chelba et al., 2013; Jozefowicz et al., 2016). We follow the standard procedure and sum over all the words including the end of sentence symbol. Results are reported in Table 7. For each model, we report the test perplexity, the computational budget, the parameter counts, the value of DropP rob, and the computational efficiency.
|
| 372 |
+
|
| 373 |
+
Table 7: Model comparison on 1 Billion Word Language Modeling Benchmark. Models marked with \* are from (Jozefowicz et al., 2016).
|
| 374 |
+
|
| 375 |
+
<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>TestPerplexity10 epochs</td><td rowspan=1 colspan=1>TestPerplexity(final)</td><td rowspan=1 colspan=1>ops/timestep(millions)</td><td rowspan=1 colspan=3>#Params excludingembed.& softmax(millions)</td><td rowspan=1 colspan=2>Total#Params(billions)</td><td rowspan=1 colspan=1>Drop-Prob</td><td rowspan=1 colspan=1>TFLOPSper GPU(observed)</td></tr><tr><td rowspan=1 colspan=1>Kneser-Ney5-gram*LSTM-512-512*LSTM-1024-512*</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>67.654.148.2</td><td rowspan=1 colspan=1>0.000012.44.7</td><td rowspan=1 colspan=3>2.44.7</td><td rowspan=1 colspan=2>1.80.80.8</td><td rowspan=1 colspan=1>0.10.1</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=3 colspan=1>LSTM-2048-512*LSTM-2048-5124xLSTM-512MoE-1-WideMoE-1-Deep</td><td rowspan=3 colspan=1>45.044.746.046.145.7</td><td rowspan=3 colspan=1>43.7</td><td rowspan=3 colspan=1>9.49.48.48.48.4</td><td rowspan=1 colspan=3>9.49.4</td><td rowspan=1 colspan=2>0.80.8</td><td rowspan=1 colspan=1>0.10.1</td><td rowspan=1 colspan=1>0.611.21</td></tr><tr><td rowspan=1 colspan=1>8.4</td><td rowspan=1 colspan=1></td><td></td><td rowspan=1 colspan=2>0.8</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>1.07</td></tr><tr><td rowspan=1 colspan=3>8.48.4</td><td rowspan=1 colspan=2>0.80.8</td><td rowspan=1 colspan=1>0.10.1</td><td rowspan=1 colspan=1>1.291.29</td></tr><tr><td rowspan=1 colspan=1>MoE-4</td><td rowspan=1 colspan=1>45.0</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>8.4</td><td rowspan=1 colspan=3>8.4</td><td rowspan=1 colspan=2>0.8</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>0.52</td></tr><tr><td rowspan=5 colspan=1>MoE-32MoE-256MoE-256-hMoE-1024-hMoE-4096-h</td><td rowspan=5 colspan=1>39.735.736.034.634.1</td><td rowspan=5 colspan=1></td><td rowspan=5 colspan=1>8.48.68.48.58.9</td><td rowspan=1 colspan=3>37.8</td><td rowspan=1 colspan=2>0.9</td><td rowspan=1 colspan=1>0.1</td><td rowspan=3 colspan=1>0.870.810.89</td></tr><tr><td rowspan=2 colspan=3>272.9272.9</td><td rowspan=2 colspan=2>1.11.1</td><td rowspan=2 colspan=1>0.10.1</td></tr><tr><td rowspan=1 colspan=1></td></tr><tr><td rowspan=2 colspan=3>1079.04303.4</td><td rowspan=2 colspan=2>1.95.1</td><td rowspan=1 colspan=1>0.2</td><td rowspan=1 colspan=1>0.90</td></tr><tr><td rowspan=1 colspan=1>0.2</td><td rowspan=1 colspan=1>0.74</td></tr><tr><td rowspan=3 colspan=1>2xLSTM-8192-1024*MoE-34MMoE-143M</td><td rowspan=3 colspan=1>34.731.328.0</td><td rowspan=3 colspan=1>30.6</td><td rowspan=3 colspan=1>151.033.8142.7</td><td rowspan=1 colspan=3>151.0</td><td rowspan=1 colspan=2>1.8</td><td rowspan=1 colspan=1>0.25</td><td rowspan=1 colspan=1>1.09</td></tr><tr><td rowspan=2 colspan=3>4313.94371.1</td><td rowspan=1 colspan=2>6.0</td><td rowspan=1 colspan=1>0.3</td><td rowspan=2 colspan=1>1.221.56</td></tr><tr><td rowspan=1 colspan=2>6.0</td><td rowspan=1 colspan=1>0.4</td></tr></table>
|
| 376 |
+
|
| 377 |
+
# C.2 MORE EXPENSIVE MODELS
|
| 378 |
+
|
| 379 |
+
We ran two additional models (MoE-34M and MoE-143M) to investigate the effects of adding more computation in the presence of a large MoE layer. These models have computation budgets of 34M and 143M ops/timestep. Similar to the models above, these models use a MoE layer between two LSTM layers. The dimensionality of the embedding layer, and the input and output dimensionality of the MoE layer are set to 1024 instead of 512. For MoE-34M, the LSTM layers have 1024 units. For MoE-143M, the LSTM layers have 4096 units and an output projection of size 1024 (Sak et al., 2014). MoE-34M uses a hierarchical MoE layer with 1024 experts, each with a hidden layer of size 2048. MoE-143M uses a hierarchical MoE layer with 256 experts, each with a hidden layer of size 8192. Both models have 4B parameters in the MoE layers. We searched for the best DropP rob for each model, and trained each model for 10 epochs.
|
| 380 |
+
|
| 381 |
+
The two models achieved test perplexity of 31.3 and 28.0 respectively, showing that even in the presence of a large MoE, more computation is still useful. Results are reported at the bottom of Table 7. The larger of the two models has a similar computational budget to the best published model from the literature, and training times are similar. Comparing after 10 epochs, our model has a lower test perplexity by $1 8 \%$ .
|
| 382 |
+
|
| 383 |
+
# D 100 BILLION WORD GOOGLE NEWS CORPUS - EXPERIMENTAL DETAILS
|
| 384 |
+
|
| 385 |
+
Model Architecture: The models are similar in structure to the 8-million-operations-per-timestep models described in the previous section. We vary the number of experts between models, using an ordinary MoE layer with 32 experts and hierarchical MoE layers with 256, 1024, 4096, 16384, 65536 and 131072 experts. For the hierarchical MoE layers, the first level branching factors are 32, 32, 64, 128, 256 and 256, respectively.
|
| 386 |
+
|
| 387 |
+
Training: Models are trained on a cluster of 32 Tesla K40 GPUs, except for the last two models, which are trained on clusters of 64 and 128 GPUs so as to have enough memory for all the parameters. For all models, training batch sizes are approximately 2.5 million words. Models are trained once-through over about 100 billion words.
|
| 388 |
+
|
| 389 |
+
We implement several memory optimizations in order to fit up to 1 billion parameters per GPU. First, we do not store the activations of the hidden layers of the experts, but instead recompute them on the backwards pass. Secondly, we modify the optimizer on the expert parameters to require less auxiliary storage:
|
| 390 |
+
|
| 391 |
+
The Adam optimizer (Kingma & Ba, 2015) keeps first and second moment estimates of the perparameter gradients. This triples the required memory. To avoid keeping a first-moment estimator, we set $\beta _ { 1 } = 0$ . To reduce the size of the second moment estimator, we replace it with a factored approximation. For a matrix of parameters, instead of maintaining a full matrix of second-moment estimators, we maintain vectors of row-wise and column-wise averages of that matrix. At each step, the matrix of estimators is taken to be the outer product of those two vectors divided by the mean of either one. This technique could similarly be applied to Adagrad (Duchi et al., 2010).
|
| 392 |
+
|
| 393 |
+
Table 8: Model comparison on 100 Billion Word Google News Dataset
|
| 394 |
+
|
| 395 |
+
<table><tr><td>Model</td><td>Test Perplexity .1 epochs</td><td>Test Perplexity 1epoch</td><td>ops/timestep (millions)</td><td>#Params excluding embed.& softmax (millions)</td><td>Total #Params (billions)</td><td>TFLOPS per GPU (observed)</td></tr><tr><td>Kneser-Ney 5-gram</td><td>67.1</td><td>45.3</td><td>0.00001</td><td></td><td>76.0</td><td></td></tr><tr><td>4xLSTM-512</td><td>54.5</td><td>47.0</td><td>8.4</td><td>8.4</td><td>0.1</td><td>1.23</td></tr><tr><td>MoE-32</td><td>48.5</td><td>40.4</td><td>8.4</td><td>37.8</td><td>0.1</td><td>0.83</td></tr><tr><td>MoE-256-h</td><td>42.8</td><td>35.3</td><td>8.4</td><td>272.9</td><td>0.4</td><td>1.11</td></tr><tr><td>MoE-1024-h</td><td>40.3</td><td>32.7</td><td>8.5</td><td>1079.0</td><td>1.2</td><td>1.14</td></tr><tr><td>MoE-4096-h</td><td>38.9</td><td>30.9</td><td>8.6</td><td>4303.4</td><td>4.4</td><td>1.07</td></tr><tr><td>MoE-16384-h</td><td>38.2</td><td>29.7</td><td>8.8</td><td>17201.0</td><td>17.3</td><td>0.96</td></tr><tr><td>MoE-65536-h</td><td>38.2</td><td>28.9</td><td>9.2</td><td>68791.0</td><td>68.9</td><td>0.72</td></tr><tr><td>MoE-131072-h</td><td>39.8</td><td>29.2</td><td>9.7</td><td>137577.6</td><td>137.7</td><td>0.30</td></tr></table>
|
| 396 |
+
|
| 397 |
+
Results: We evaluate our model using perplexity on a holdout dataset. Results are reported in Table 8. Perplexity after 100 billion training words is $39 \%$ lower for the 68-billion-parameter MoE model than for the baseline model. It is notable that the measured computational efficiency of the largest model (0.30 TFLOPS/GPU) is very low compared to the other models. This is likely a result of the fact that, for purposes of comparison to the other models, we did not increase the training batch size proportionally to the number of GPUs. For comparison, we include results for a computationally matched baseline model consisting of 4 LSTMs, and for an unpruned 5-gram model with Kneser-Ney smoothing (Kneser & Ney, 1995).4
|
| 398 |
+
|
| 399 |
+
E MACHINE TRANSLATION - EXPERIMENTAL DETAILS
|
| 400 |
+
|
| 401 |
+
Model Architecture for Single Language Pair MoE Models: Our model is a modified version of the GNMT model described in (Wu et al., 2016). To reduce computation, we decrease the number of LSTM layers in the encoder and decoder from 9 and 8 to 3 and 2 respectively. We insert MoE layers in both the encoder (between layers 2 and 3) and the decoder (between layers 1 and 2). We use an attention mechanism between the encoder and decoder, with the first decoder LSTM receiving output from and providing input for the attention 5. All of the layers in our model have input and output dimensionality of 512. Our LSTM layers have 2048 hidden units, with a 512-dimensional output projection. We add residual connections around all LSTM and MoE layers to encourage gradient flow (He et al., 2015). Similar to GNMT, to effectively deal with rare words, we used subword units (also known as “wordpieces") (Schuster & Nakajima, 2012) for inputs and outputs in our system.
|
| 402 |
+
|
| 403 |
+
We use a shared source and target vocabulary of 32K wordpieces. We also used the same beam search technique as proposed in (Wu et al., 2016).
|
| 404 |
+
|
| 405 |
+
We train models with different numbers of experts in the MoE layers. In addition to a baseline model with no MoE layers, we train models with flat MoE layers containing 32 experts, and models with hierarchical MoE layers containing 512 and 2048 experts. The flat MoE layers use $k = 4$ and the hierarchical MoE models use $k = 2$ at each level of the gating network. Thus, each input is processed by exactly 4 experts in each MoE layer. Each expert in the MoE layer is a feed forward network with one hidden layer of size 2048 and ReLU activation. Thus, each expert contains $[ 5 1 2 *$ $2 0 4 8 ] + [ 2 0 4 8 * 5 1 2 ] = 2 M$ parameters. The output of the MoE layer is passed through a sigmoid function. We use the strictly-balanced gating function described in Appendix F.
|
| 406 |
+
|
| 407 |
+
Model Architecture for Multilingual MoE Model: We used the same model architecture as for the single-language-pair models, with the following exceptions: We used noisy-top-k gating as described in Section 2.1, not the scheme from Appendix F. The MoE layers in the encoder and decoder are non-hierarchical MoEs with $n = 5 1 2$ experts, and $k = 2$ . Each expert has a larger hidden layer of size 8192. This doubles the amount of computation in the MoE layers, raising the computational budget of the entire model from 85M to 102M ops/timestep.
|
| 408 |
+
|
| 409 |
+
Training: We trained our networks using the Adam optimizer (Kingma & Ba, 2015). The base learning rate was increased linearly for the first 2000 training steps, held constant for an additional 8000 steps, and decreased after that so as to be proportional to the inverse square root of the step number. For the single-language-pair models, similarly to (Wu et al., 2016), we applied dropout (Zaremba et al., 2014) to the output of all embedding, LSTM and MoE layers, using $D r o p P r o b =$ 0.4. Training was done synchronously on a cluster of up to 64 GPUs as described in section 3. Each training batch consisted of a set of sentence pairs containing roughly 16000 words per GPU.
|
| 410 |
+
|
| 411 |
+
To ensure balanced expert utilization we set $w _ { i m p o r t a n c e } = 0 . 0 1$ and $w _ { l o a d } = 0 . 0 1$ , as described in Section 4 and Appendix A.
|
| 412 |
+
|
| 413 |
+
Metrics: We evaluated our models using the perplexity and the standard BLEU score metric. We reported tokenized BLEU score as computed by the multi-bleu.pl script, downloaded from the public implementation of Moses (on Github), which was also used in (Luong et al., 2015a).
|
| 414 |
+
|
| 415 |
+
Results: Tables 2, 3 and 4 in Section 5.3 show comparisons of our results to other published methods. Figure 4 shows test perplexity as a function of number of words in the (training data’s) source sentences processed for models with different numbers of experts. As can be seen from the Figure, as we increased the number of experts to approach 2048, the test perplexity of our model continued to improve.
|
| 416 |
+
|
| 417 |
+

|
| 418 |
+
Figure 4: Perplexity on WMT’ $\scriptstyle 1 4 \mathrm { E n } \to \mathrm { F r }$ (left) and Google Production $\mathrm { E n } \mathrm { F r }$ (right) datasets as a function of number of words processed. The large differences between models at the beginning of training are due to different batch sizes. All models incur the same computational budget (85M ops/timestep) except the one with no experts.
|
| 419 |
+
|
| 420 |
+
We found that the experts indeed become highly specialized by syntax and/or semantics, as can be seen in Table 9. For example, one expert is used when the indefinite article “a" introduces the direct object in a verb phrase indicating importance or leadership.
|
| 421 |
+
|
| 422 |
+
Table 9: Contexts corresponding to a few of the 2048 experts in the MoE layer in the encoder portion of the WMT’14 $\cdot \operatorname { E n } \to \operatorname { F r }$ translation model. For each expert $i$ , we sort the inputs in a training batch in decreasing order of $G ( x ) _ { i }$ , and show the words surrounding the corresponding positions in the input sentences.
|
| 423 |
+
|
| 424 |
+
<table><tr><td>Expert 381 ... with researchers,,..</td><td>Expert 752</td><td>Expert 2004</td></tr><tr><td>... to innovation. ... tics researchers. ... the generation of ... ... technology innovationsis.. ... technological innovations,. .. support innovation throughout ... ... role innovation will ... ... research scienti st... ... promoting innovation where ...</td><td>... plays a core... ... plays a critical ... ... provides a legislative... ... play a leading... ... assume a leadership ... ... plays a central ... .. taken a leading.. ... established a reconciliation...</td><td>... with rapidly growing ... ... under static conditions.. ... to swift ly ... ... to dras tically.. ... the rapid and.. ... the fast est ... .. the Quick Method ..</td></tr></table>
|
| 425 |
+
|
| 426 |
+
# F STRICTLY BALANCED GATING
|
| 427 |
+
|
| 428 |
+
Due to some peculiarities in our infrastructure which have since been fixed, at the time we ran some of the machine translation experiments, our models ran faster if every expert received exactly the same batch size. To accommodate this, we used a different gating function which we describe below.
|
| 429 |
+
|
| 430 |
+
Recall that we define the softmax gating function to be:
|
| 431 |
+
|
| 432 |
+
$$
|
| 433 |
+
G _ { \sigma } ( x ) = S o f t m a x ( x \cdot W _ { g } )
|
| 434 |
+
$$
|
| 435 |
+
|
| 436 |
+
Sparse Gating (alternate formulation): To obtain a sparse gating vector, we multiply $G _ { \sigma } ( x )$ component-wise with a sparse mask $M ( G _ { \sigma } ( x ) )$ and normalize the output. The mask itself is a function of $G _ { \sigma } ( x )$ and specifies which experts are assigned to each input example:
|
| 437 |
+
|
| 438 |
+
$$
|
| 439 |
+
G ( x ) _ { i } = \frac { G _ { \sigma } ( x ) _ { i } M ( G _ { \sigma } ( x ) ) _ { i } } { \sum _ { j = 1 } ^ { n } G _ { \sigma } ( x ) _ { j } M ( G _ { \sigma } ( x ) ) _ { j } }
|
| 440 |
+
$$
|
| 441 |
+
|
| 442 |
+
Top-K Mask: To implement top- $\mathbf { \nabla } \cdot \mathbf { k }$ gating in this formulation, we would let $M ( v ) = T o p K ( v , k )$ , where:
|
| 443 |
+
|
| 444 |
+
$$
|
| 445 |
+
T o p K ( v , k ) _ { i } = { \left\{ \begin{array} { l l } { 1 } & { { \mathrm { i f ~ } } v _ { i } { \mathrm { ~ i s ~ i n ~ t h e ~ t o p ~ } } k { \mathrm { ~ e l e m e n t s ~ o f ~ } } v . } \\ { 0 } & { { \mathrm { o t h e r w i s e . } } } \end{array} \right. }
|
| 446 |
+
$$
|
| 447 |
+
|
| 448 |
+
Batchwise Mask: To force each expert to receive the exact same number of examples, we introduce an alternative mask function, $M _ { b a t c h w i s e } ^ { - } ( X , m )$ , which operates over batches of input vectors. Instead of keeping the top $k$ values per example, we keep the top $m$ values per expert across the training batch, where $\begin{array} { r } { m = \frac { k | X | } { n } } \end{array}$ , so that each example is sent to an average of $k$ experts.
|
| 449 |
+
|
| 450 |
+
$$
|
| 451 |
+
M _ { b a t c h w i s e } ( X , m ) _ { j , i } = { \left\{ \begin{array} { l l } { 1 } & { { \mathrm { i f ~ } } X _ { j , i } { \mathrm { ~ i s ~ i n ~ t h e ~ t o p ~ } } m { \mathrm { ~ v a l u e s ~ f o r ~ t o ~ e x p e r t ~ } } i } \\ { 0 } & { { \mathrm { o t h e r w i s e } } } \end{array} \right. }
|
| 452 |
+
$$
|
| 453 |
+
|
| 454 |
+
As our experiments suggest and also observed in (Ioffe & Szegedy, 2015), using a batchwise function during training (such as $M _ { b a t c h w i s e } )$ ) requires modifications to the inference when we may not have a large batch of examples. Our solution to this is to train a vector $T$ of per-expert threshold values to approximate the effects of the batchwise mask. We use the following mask at inference time:
|
| 455 |
+
|
| 456 |
+
$$
|
| 457 |
+
M _ { t h r e s h o l d } ( x , T ) _ { i } = \left\{ \begin{array} { l l } { 1 } & { \mathrm { i f } x _ { i } > T _ { i } } \\ { 0 } & { \mathrm { o t h e r w i s e } } \end{array} \right.
|
| 458 |
+
$$
|
| 459 |
+
|
| 460 |
+
To learn the threshold values, we apply an additional loss at training time which is minimized when the batchwise mask and the threshold mask are identical.
|
| 461 |
+
|
| 462 |
+
$$
|
| 463 |
+
L _ { b a t c h w i s e } ( X , T , m ) = \sum _ { j = 1 } ^ { | X | } \sum _ { i = 1 } ^ { n } ( M _ { t h r e s h o l d } ( x , T ) _ { i } - M _ { b a t c h w i s e } ( X , m ) _ { j , i } ) ( X _ { j , i } - T _ { i } )
|
| 464 |
+
$$
|
| 465 |
+
|
| 466 |
+
# G ATTENTION FUNCTION
|
| 467 |
+
|
| 468 |
+
The attention mechanism described in GNMT (Wu et al., 2016) involves a learned “Attention Function" $A ( x _ { i } , y _ { j } )$ which takes a “source vector" $x _ { i }$ and a “target vector" $y _ { j }$ , and must be computed for every source time step $i$ and target time step $j$ . In GNMT, the attention function is implemented as a feed forward neural network with a hidden layer of size $n$ . It can be expressed as:
|
| 469 |
+
|
| 470 |
+
$$
|
| 471 |
+
A _ { G N M T } ( x _ { i } , y _ { j } ) = \sum _ { d = 1 } ^ { n } V _ { d } t a n h ( ( x _ { i } U ) _ { d } + ( y _ { j } W ) _ { d } )
|
| 472 |
+
$$
|
| 473 |
+
|
| 474 |
+
Where $U$ and $W$ are trainable weight matrices and $V$ is a trainable weight vector.
|
| 475 |
+
|
| 476 |
+
For performance reasons, in our models, we used a slightly different attention function:
|
| 477 |
+
|
| 478 |
+
$$
|
| 479 |
+
A ( x _ { i } , y _ { j } ) = \sum _ { d = 1 } ^ { n } V _ { d } t a n h ( ( x _ { i } U ) _ { d } ) t a n h ( ( y _ { j } W ) _ { d } )
|
| 480 |
+
$$
|
| 481 |
+
|
| 482 |
+
With our attention function, we can simultaneously compute the attention function on multiple source time steps and multiple target time steps using optimized matrix multiplications. We found little difference in quality between the two functions.
|
parse/train/B1ckMDqlg/B1ckMDqlg_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/B1ckMDqlg/B1ckMDqlg_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/B1ckMDqlg/B1ckMDqlg_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/BJlZ5ySKPH/BJlZ5ySKPH.md
ADDED
|
@@ -0,0 +1,305 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# U-GAT-IT: UNSUPERVISED GENERATIVE ATTENTIONAL NETWORKS WITH ADAPTIVE LAYERINSTANCE NORMALIZATION FOR IMAGE-TO-IMAGE TRANSLATION
|
| 2 |
+
|
| 3 |
+
Junho $\mathbf { K i m } ^ { 1 , 2 }$ ∗, Minjae $\mathbf { K i m ^ { 2 } }$ , Hyeonwoo $\mathbf { K a n g ^ { 2 } }$ , Kwang Hee Lee3† 1Clova AI Research, NAVER Corp, 2NCSOFT, 3Boeing Korea Engineering and Technology Center jhkim.ai@navercorp.com, {minjaekim, hwkang0131}@ncsoft.com, kwanghee.lee2@boeing.com
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
We propose a novel method for unsupervised image-to-image translation, which incorporates a new attention module and a new learnable normalization function in an end-to-end manner. The attention module guides our model to focus on more important regions distinguishing between source and target domains based on the attention map obtained by the auxiliary classifier. Unlike previous attention-based method which cannot handle the geometric changes between domains, our model can translate both images requiring holistic changes and images requiring large shape changes. Moreover, our new AdaLIN (Adaptive Layer-Instance Normalization) function helps our attention-guided model to flexibly control the amount of change in shape and texture by learned parameters depending on datasets. Experimental results show the superiority of the proposed method compared to the existing state-of-the-art models with a fixed network architecture and hyper-parameters. Our code and datasets are available at https://github.com/taki0112/UGATIT or https://github.com/znxlwm/UGATITpytorch.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Image-to-image translation aims to learn a function that maps images within two different domains. This topic has gained a lot of attention from researchers in the fields of machine learning and computer vision because of its wide range of applications including image inpainting (Pathak et al. (2014); Iizuka et al. (2017)), super resolution (Dong et al. (2016); Kim et al. (2016)), colorization (Zhang et al. (2016; 2017)) and style transfer (Gatys et al. (2016); Huang & Belongie (2017)). When paired samples are given, the mapping model can be trained in a supervised manner using a conditional generative model (Isola et al. (2017); Li et al. (2017a); Wang et al. (2018)) or a simple regression model (Larsson et al. (2016); Long et al. (2015); Zhang et al. (2016)). In unsupervised settings where no paired data is available, multiple works (Anoosheh et al. (2018); Choi et al. (2018); Huang et al. (2018); Kim et al. (2017); Liu et al. (2017); Royer et al. (2017); Taigman et al. (2017); Yi et al. (2017); Zhu et al. (2017)) successfully have translated images using shared latent space (Liu et al. (2017)) and cycle consistency assumptions (Kim et al. (2017); Zhu et al. (2017)). These works have been further developed to handle the multi-modality of the task (Huang et al. (2018)).
|
| 12 |
+
|
| 13 |
+
Despite these advances, previous methods show performance differences depending on the amount of change in both shape and texture between domains. For example, they are successful for the style transfer tasks mapping local texture (e.g., photo2vangogh and photo2portrait) but are typically unsuccessful for image translation tasks with larger shape change (e.g., selfie2anime and cat2dog) in wild images. Therefore, the pre-processing steps such as image cropping and alignment are often required to avoid these problems by limiting the complexity of the data distributions (Huang et al. (2018); Liu et al. (2017)). In addition, existing methods such as DRIT (Lee et al. (2018)) cannot acquire the desired results for both image translation preserving the shape (e.g., horse2zebra) and image translation changing the shape (e.g., cat2dog) with the fixed network architecture and hyperparameters. The network structure or hyper-parameter setting needs to be adjusted for the specific dataset.
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
Figure 1: The model architecture of U-GAT-IT. The detailed notations are described in Section Model
|
| 17 |
+
|
| 18 |
+
In this work, we propose a novel method for unsupervised image-to-image translation, which incorporates a new attention module and a new learnable normalization function in an end-to-end manner. Our model guides the translation to focus on more important regions and ignore minor regions by distinguishing between source and target domains based on the attention map obtained by the auxiliary classifier. These attention maps are embedded into the generator and discriminator to focus on semantically important areas, thus facilitating the shape transformation. While the attention map in the generator induces the focus on areas that specifically distinguish between the two domains, the attention map in the discriminator helps fine-tuning by focusing on the difference between real image and fake image in target domain. In addition to the attentional mechanism, we have found that the choice of the normalization function has a significant impact on the quality of the transformed results for various datasets with different amounts of change in shape and texture. Inspired by Batch-Instance Normalization(BIN) (Nam & Kim (2018)), we propose Adaptive LayerInstance Normalization (AdaLIN), whose parameters are learned from datasets during training time by adaptively selecting a proper ratio between Instance normalization (IN) and Layer Normalization (LN). The AdaLIN function helps our attention-guided model to flexibly control the amount of change in shape and texture. As a result, our model, without modifying the model architecture or the hyper-parameters, can perform image translation tasks not only requiring holistic changes but also requiring large shape changes. In the experiments, we show the superiority of the proposed method compared to the existing state-of-the-art models on not only style transfer but also object transfiguration. The main contribution of the proposed work can be summarized as follows:
|
| 19 |
+
|
| 20 |
+
• We propose a novel method for unsupervised image-to-image translation with a new attention module and a new normalization function, AdaLIN.
|
| 21 |
+
• Our attention module helps the model to know where to transform intensively by distinguishing between source and target domains based on the attention map obtained by the auxiliary classifier.
|
| 22 |
+
• AdaLIN function helps our attention-guided model to flexibly control the amount of change in shape and texture without modifying the model architecture or the hyper-parameters.
|
| 23 |
+
|
| 24 |
+
# 2 UNSUPERVISED GENERATIVE ATTENTIONAL NETWORKS WITH ADAPTIVE LAYER-INSTANCE NORMALIZATION
|
| 25 |
+
|
| 26 |
+
Our goal is to train a function $G _ { s t }$ that maps images from a source domain $X _ { s }$ to a target domain $X _ { t }$ using only unpaired samples drawn from each domain. Our framework consists of two generators $G _ { s t }$ and $G _ { t s }$ and two discriminators $D _ { s }$ and $D _ { t }$ . We integrate the attention module into both generator and discriminator. The attention module in the discriminator guides the generator to focus on regions that are critical to generate a realistic image. The attention module in the generator gives attention to the region distinguished from the other domain. Here, we only explain $G _ { s t }$ and $D _ { t }$ (See Fig 1) as the vice versa should be straight-forward.
|
| 27 |
+
|
| 28 |
+
# 2.1 MODEL
|
| 29 |
+
|
| 30 |
+
# 2.1.1 GENERATOR
|
| 31 |
+
|
| 32 |
+
Let $x \in \{ X _ { s } , X _ { t } \}$ represent a sample from the source and the target domain. Our translation model $G _ { s t }$ consists of an encoder $E _ { s }$ , a decoder $G _ { t }$ , and an auxiliary classifier $\eta _ { s }$ , where $\eta _ { s } ( x )$ represents the probability that $x$ comes from $X _ { s }$ . Let $E _ { s } ^ { k } ( x )$ be the $k$ -th activation map of the encoder and $E _ { s } ^ { k _ { i j } } ( x )$ be the value at $( i , j )$ . Inspired by CAM (Zhou et al. (2016)), the auxiliary classifier is trained to learn the weight of the $k$ -th feature map for the source domain, $w _ { s } ^ { k }$ , by using the global average pooling and global max pooling, i.e., $\eta _ { s } ( x ) = \sigma ( \Sigma _ { k } w _ { s } ^ { k } \Sigma _ { i j } E _ { s } ^ { k _ { i j } } ( x ) )$ . By exploiting $w _ { s } ^ { k }$ , we can calculate a set of domain specific attention feature map $a _ { s } ( x ) = w _ { s } * E _ { s } ( x ) = \{ w _ { s } ^ { k } *$ $E _ { s } ^ { k } ( x ) | 1 { \leq } k { \leq } n \}$ , where $n$ is the number of encoded feature maps. Then, our translation model $G _ { s t }$ becomes equal to $G _ { t } ( \boldsymbol { a } _ { s } ( \boldsymbol { x } ) )$ . Inspired by recent works that use affine transformation parameters in normalization layers and combine normalization functions (Huang & Belongie (2017); Nam & Kim (2018)), we equip the residual blocks with AdaLIN whose parameters, $\gamma$ and $\beta$ are dynamically computed by a fully connected layer from the attention map.
|
| 33 |
+
|
| 34 |
+
$$
|
| 35 |
+
\begin{array} { c } { { A d a L I N ( a , \gamma , \beta ) = \gamma \cdot ( \rho \cdot \hat { a _ { I } } + ( 1 - \rho ) \cdot \hat { a _ { L } } ) + \beta , } } \\ { { \hat { a _ { I } } = \displaystyle \frac { a - \mu _ { I } } { \sqrt { \sigma _ { I } ^ { 2 } + \epsilon } } , \hat { a _ { L } } = \displaystyle \frac { a - \mu _ { L } } { \sqrt { \sigma _ { L } ^ { 2 } + \epsilon } } , } } \\ { { \rho c l i p _ { [ 0 , 1 ] } ( \rho - \tau \Delta \rho ) } } \end{array}
|
| 36 |
+
$$
|
| 37 |
+
|
| 38 |
+
where $\mu _ { I } , \mu _ { L }$ and $\sigma _ { I } , \sigma _ { L }$ are channel-wise, layer-wise mean and standard deviation respectively, $\gamma$ and $\beta$ are parameters generated by the fully connected layer, $\tau$ is the learning rate and $\Delta \rho$ indicates the parameter update vector (e.g., the gradient) determined by the optimizer. The values of $\rho$ are constrained to the range of [0, 1] simply by imposing bounds at the parameter update step. Generator adjusts the value so that the value of $\rho$ is close to 1 in the task where the instance normalization is important and the value of $\rho$ is close to 0 in the task where the LN is important. The value of $\rho$ is initialized to 1 in the residual blocks of the decoder and 0 in the up-sampling blocks of the decoder.
|
| 39 |
+
|
| 40 |
+
An optimal method to transfer the content features onto the style features is to apply Whitening and Coloring Transform (WCT) (Li et al. (2017b)), but the computational cost is high due to the calculation of the covariance matrix and matrix inverse. Although, the AdaIN (Huang & Belongie (2017)) is much faster than the WCT, it is sub-optimal to WCT as it assumes uncorrelation between feature channels. Thus the transferred features contain slightly more patterns of the content. On the other hand, the LN (Ba et al. (2016)) does not assume uncorrelation between channels, but sometimes it does not keep the content structure of the original domain well because it considers global statistics only for the feature maps. To overcome this, our proposed normalization technique AdaLIN combines the advantages of AdaIN and LN by selectively keeping or changing the content information, which helps to solve a wide range of image-to-image translation problems.
|
| 41 |
+
|
| 42 |
+
# 2.1.2 DISCRIMINATOR
|
| 43 |
+
|
| 44 |
+
Let $x \in \{ X _ { t } , G _ { s t } ( X _ { s } ) \}$ represent a sample from the target domain and the translated source domain. Similar to other translation models, the discriminator $D _ { t }$ which is a multi-scale model consists of an encoder $E _ { D _ { t } }$ , a classifier $\mathrm { C } _ { D _ { t } }$ , and an auxiliary classifier $\eta _ { D _ { t } }$ . Unlike the other translation models, both $\eta _ { D _ { t } } ( x )$ and $D _ { t } ( x )$ are trained to discriminate whether $x$ comes from $X _ { t }$ or $G _ { s \to t } ( X _ { s } )$ . Given a sample $x$ , $D _ { t } ( x )$ exploits the attention feature maps $a _ { D _ { t } } ( x ) = w _ { D _ { t } } * E _ { D _ { t } } ( x )$ using $w _ { D _ { t } }$ on the encoded feature maps $E _ { D _ { t } } ( x )$ that is trained by $\eta _ { D _ { t } } ( x )$ . Then, our discriminator $D _ { t } ( x )$ becomes equal to $C _ { D _ { t } } ( a _ { D _ { t } } ( x ) )$ .
|
| 45 |
+
|
| 46 |
+
# 2.2 LOSS FUNCTION
|
| 47 |
+
|
| 48 |
+
The full objective of our model comprises four loss functions. Here, instead of using the vanilla GAN objective, we used the Least Squares GAN (Mao et al. (2017)) objective for stable training.
|
| 49 |
+
|
| 50 |
+
Adversarial loss An adversarial loss is employed to match the distribution of the translated images to the target image distribution:
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
L _ { l s g a n } ^ { s t } = ( \mathbb { E } _ { x \sim X _ { t } } [ ( D _ { t } ( x ) ) ^ { 2 } ] + \mathbb { E } _ { x \sim X _ { s } } [ ( 1 - D _ { t } ( G _ { s t } ( x ) ) ) ^ { 2 } ] ) .
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
Cycle loss To alleviate the mode collapse problem, we apply a cycle consistency constraint to the generator. Given an image $x \in X _ { s }$ , after the sequential translations of $x$ from $X _ { s }$ to $X _ { t }$ and from $X _ { t }$ to $X _ { s }$ , the image should be successfully translated back to the original domain:
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
L _ { c y c l e } ^ { s t } = \mathbb { E } _ { x \sim X _ { s } } [ | x - G _ { t s } ( G _ { s t } ( x ) ) ) | _ { 1 } ] .
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
Identity loss To ensure that the color distributions of input image and output image are similar, we apply an identity consistency constraint to the generator. Given an image $x \in X _ { t }$ , after the translation of $x$ using $G _ { s t }$ , the image should not change.
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
L _ { i d e n t i t y } ^ { s t } = \mathbb { E } _ { x \sim X _ { t } } [ | x - G _ { s t } ( x ) | _ { 1 } ] .
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
CAM loss By exploiting the information from the auxiliary classifiers $\eta _ { s }$ and $\eta _ { D _ { t } }$ , given an image $x \in \{ X _ { s } , \tilde { X _ { t } } \}$ . $G _ { s t }$ and $D _ { t }$ get to know where they need to improve or what makes the most difference between two domains in the current state:
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
L _ { c a m } ^ { s t } = - ( \mathbb { E } _ { x \sim X _ { s } } [ l o g ( \eta _ { s } ( x ) ) ] + \mathbb { E } _ { x \sim X _ { t } } [ l o g ( 1 - \eta _ { s } ( x ) ) ] ) ,
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
L _ { c a m } ^ { D _ { t } } = \mathbb { E } _ { x \sim X _ { t } } [ ( \eta _ { D _ { t } } ( x ) ) ^ { 2 } ] + \mathbb { E } _ { x \sim X _ { s } } [ ( 1 - \eta _ { D _ { t } } ( G _ { s t } ( x ) ) ^ { 2 } ] .
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
Full objective Finally, we jointly train the encoders, decoders, discriminators, and auxiliary classifiers to optimize the final objective:
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\operatorname* { m i n } _ { \substack { G _ { s t } , G _ { t s } , \eta _ { s } , \eta _ { t } D _ { s } , D _ { t } , \eta _ { D _ { s } } , \eta _ { D _ { t } } } } \lambda _ { 1 } L _ { l s g a n } + \lambda _ { 2 } L _ { c y c l e } + \lambda _ { 3 } L _ { i d e n t i t y } + \lambda _ { 4 } L _ { c a m } ,
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
where $\lambda _ { 1 } = 1 , \lambda _ { 2 } = 1 0 , \lambda _ { 3 } = 1 0 , \lambda _ { 4 } = 1 0 0 0$ . Here, ${ \cal L } _ { l s g a n } = { \cal L } _ { l s g a n } ^ { s t } + { \cal L } _ { l s g a n } ^ { t s }$ and the other losses are defined in the similar way $\scriptstyle \sum _ { c y c l e }$ , $L _ { i d e n t i t y }$ , and $L _ { c a m }$ )
|
| 85 |
+
|
| 86 |
+

|
| 87 |
+
Figure 2: Visualization of the attention maps and their effects shown in the ablation experiments: (a) Source images, (b) Attention map of the generator, (c-d) Local and global attention maps of the discriminator, respectively. (e) Our results with CAM, (f) Results without CAM.
|
| 88 |
+
|
| 89 |
+
# 3 EXPERIMENTS
|
| 90 |
+
|
| 91 |
+
# 3.1 BASELINE MODEL
|
| 92 |
+
|
| 93 |
+
We have compared our method with various models including CycleGAN (Zhu et al. (2017)), UNIT (Liu et al. (2017)), MUNIT (Huang et al. (2018)), DRIT (Lee et al. (2018)), AGGAN (Mejjati et al. (2018)), and CartoonGAN (Chen et al. (2018)). All the baseline methods are implemented using the author’s code.
|
| 94 |
+
|
| 95 |
+
# 3.2 DATASET
|
| 96 |
+
|
| 97 |
+
We have evaluated the performance of each method with five unpaired image datasets including four representative image translation datasets and a newly created dataset consisting of real photos and animation artworks, i.e., selfie2anime. All images are resized to $2 5 6 \times 2 5 6$ for training. See Appendix C for each dataset for our experiments.
|
| 98 |
+
|
| 99 |
+
# 3.3 EXPERIMENT RESULTS
|
| 100 |
+
|
| 101 |
+
We first analyze the effects of attention module and AdaLIN in the proposed model. We then compare the performance of our model against the other unsupervised image translation models listed in the previous section. To evaluate, the visual quality of translated images, we have conducted a user study. Users are asked to select the best image among the images generated from five different methods. More examples of the results comparing our model with other models are included in the supplementary materials.
|
| 102 |
+
|
| 103 |
+
# 3.3.1 CAM ANALYSIS
|
| 104 |
+
|
| 105 |
+
First, we conduct an ablation study to confirm the benefit from the attention modules used in both generator and discriminator. As shown in Fig 2 (b), the attention feature map helps the generator to focus on the source image regions that are more discriminative from the target domain, such as eyes and mouth. Meanwhile, we can see the regions where the discriminator concentrates its attention to determine whether the target image is real or fake by visualizing local and global attention maps of the discriminator as shown in Fig 2 (c) and (d), respectively. The generator can fine-tune the area where the discriminator focuses on with those attention maps. Note that we incorporate both global and local attention maps from two discriminators having different size of receptive field. Those maps can help the generator to capture the global structure (e.g., face area and near of eyes) as well as the local regions. With this information some regions are translated with more care. The results with the attention module shown in Fig 2 (e) verify the advantageous effect of exploiting attention feature map in an image translation task. On the other hand, one can see that the eyes are misaligned, or the translation is not done at all in the results without using attention module as shown in Fig 2 (f).
|
| 106 |
+
|
| 107 |
+

|
| 108 |
+
Figure 3: Comparison of the results using each normalization function: (a) Source images, (b) Our results, (c) Results only using IN in decoder with CAM, (d) Results only using LN in decoder with CAM, (e) Results only using AdaIN in decoder with CAM, (f) Results only using GN in decoder with CAM.
|
| 109 |
+
|
| 110 |
+
# 3.3.2 ADALIN ANALYSIS
|
| 111 |
+
|
| 112 |
+
As described in Appendix B, we have applied the AdaLIN only to the decoder of the generator. The role of the residual blocks in the decoder is to embed features, and the role of the up-sampling convolution blocks in the decoder is to generate target domain images from the embedded features. If the learned value of the gate parameter $\rho$ is closer to 1, it means that the corresponding layers rely more on IN than LN. Likewise, if the learned value of $\rho$ is closer to 0, it means that the corresponding layers rely more on LN than IN. As shown in Fig 3 (c), in the case of using only IN in the decoder, the features of the source domain (e.g., earrings and shades around cheekbones) are well preserved due to channel-wise normalized feature statistics used in the residual blocks. However, the amount of translation to target domain style is somewhat insufficient since the global style cannot be captured by IN of the up-sampling convolution blocks. On the other hand, As shown in Fig 3 (d), if we use only LN in the decoder, target domain style can be transferred sufficiently by virtue of layerwise normalized feature statistics used in the up-sampling convolution. But the features of the source domain image are less preserved by using LN in the residual blocks. This analysis of two extreme cases tells us that it is beneficial to rely more on IN than LN in the feature representation layers to preserve semantic characteristics of source domain, and the opposite is true for the upsampling layers that actually generate images from the feature embedding. Therefore, the proposed AdaLIN which adjusts the ratio of IN and LN in the decoder according to source and target domain distributions is more preferable in unsupervised image-to-image translation tasks. Additionally, the Fig 3 (e), (f) are the results of using the AdaIN and Group Normalization (GN) (Wu & He (2018)) respectively, and our methods are showing better results compared to these.
|
| 113 |
+
|
| 114 |
+

|
| 115 |
+
Figure 4: Visual comparisons on the five datasets. From top to bottom: selfie2anime, horse2zebra, cat2dog, photo2portrait, and photo2vangogh. (a)Source images, (b)U-GAT-IT, (c)CycleGAN, (d)UNIT, (e)MUNIT, (f)DRIT, (g)AGGAN
|
| 116 |
+
|
| 117 |
+
Table 1: Kernel Inception Distance $\times 1 0 0 { \pm } \mathrm { s t d } . \times 1 0 0$ for ablation our model. Lower is better. There are some notations; GN: Group Normalization, G CAM: CAM of generator, D CAM: CAM of discriminator
|
| 118 |
+
|
| 119 |
+
<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>selfie2anime</td><td rowspan=1 colspan=1>anime2selfie</td></tr><tr><td rowspan=1 colspan=1>U-GAT-IT</td><td rowspan=1 colspan=1>11.61 ± 0.57</td><td rowspan=1 colspan=1>11.52 ± 0.57</td></tr><tr><td rowspan=1 colspan=1>U-GAT-IT w/ IN</td><td rowspan=1 colspan=1>13.64±0.76</td><td rowspan=1 colspan=1>13.58 ± 0.8</td></tr><tr><td rowspan=1 colspan=1>U-GAT-IT w/ LN</td><td rowspan=1 colspan=1>12.39±0.61</td><td rowspan=1 colspan=1>13.17 ± 0.8</td></tr><tr><td rowspan=1 colspan=1>U-GAT-IT w/ AdaIN</td><td rowspan=1 colspan=1>12.29士0.78</td><td rowspan=1 colspan=1>11.81 ± 0.77</td></tr><tr><td rowspan=1 colspan=1>U-GAT-IT w/ GN</td><td rowspan=1 colspan=1>12.76士0.64</td><td rowspan=1 colspan=1>12.30 ± 0.77</td></tr><tr><td rowspan=1 colspan=1>U-GAT-IT w/oCAM</td><td rowspan=1 colspan=1>12.85士0.82</td><td rowspan=1 colspan=1>14.06 ± 0.75</td></tr><tr><td rowspan=1 colspan=1>U-GAT-ITw/oG_CAM</td><td rowspan=1 colspan=1>12.33士0.68</td><td rowspan=1 colspan=1>13.86 ± 0.75</td></tr><tr><td rowspan=1 colspan=1>U-GAT-ITw/oD_CAM</td><td rowspan=1 colspan=1>12.49±0.74</td><td rowspan=1 colspan=1>13.33 ± 0.89</td></tr></table>
|
| 120 |
+
|
| 121 |
+
Also, as shown in Table 1, we demonstrate the performance of the attention module and AdaLIN in the selfie2anime dataset through an ablation study using Kernel Inception Distance (KID) (Binkowski et al. (2018)) ´ . Our model achieves the lowest KID values. Even if the attention module and AdaLIN are used separately, we can see that our models perform better than the others. However, when used together, the performance is even better.
|
| 122 |
+
|
| 123 |
+
# 3.3.3 QUALITATIVE EVALUATION
|
| 124 |
+
|
| 125 |
+
For qualitative evaluation, we have also conducted a perceptual study. 135 participants are shown translated results from different methods including the proposed method with source image, and asked to select the best translated image to target domain. We inform only the name of target domain, i.e., animation, dog, and zebra to the participants. But, some example images of target domain are provided for the portrait and Van Gogh datasets as minimum information to ensure proper judgments. Table 2 shows that the proposed method achieved significantly higher score except for photo2vangogh but comparable in human perceptual study compared to other methods. In Fig 4, we present the image translation results from each method for performance comparisons. U-GAT-IT can generate undistorted image by focusing more on the distinct regions between source and target domain by exploiting the attention modules. Note that the regions around heads of two zebras or eyes of dog are distorted in the results from CycleGAN. Moreover, translated results using U-GAT-IT are visually superior to other methods while preserving semantic features of source domain. It is worth noting that the results from MUNIT and DRIT are much dissimilar to the source images since they generate images with random style codes for diversity. Furthermore, it should be emphasized that U-GAT-IT have applied with the same network architecture and hyper-parameters for all of the five different datasets, while the other algorithms are trained with preset networks or hyper-parameters. Through the results of user study, we show that the combination of our attention module and AdaLIN makes our model more flexible.
|
| 126 |
+
|
| 127 |
+
Table 2: Preference score on translated images by user study.
|
| 128 |
+
|
| 129 |
+
<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>selfie2anime</td><td rowspan=1 colspan=1>horse2zebra</td><td rowspan=1 colspan=1>cat2dog</td><td rowspan=1 colspan=1>photo2portrait</td><td rowspan=1 colspan=1>photo2vangogh</td></tr><tr><td rowspan=1 colspan=1>U-GAT-IT</td><td rowspan=1 colspan=1>73.15</td><td rowspan=1 colspan=1>73.56</td><td rowspan=1 colspan=1>58.22</td><td rowspan=1 colspan=1>30.59</td><td rowspan=1 colspan=1>48.96</td></tr><tr><td rowspan=1 colspan=1>CycleGAN</td><td rowspan=1 colspan=1>20.07</td><td rowspan=1 colspan=1>23.07</td><td rowspan=1 colspan=1>6.19</td><td rowspan=1 colspan=1>26.59</td><td rowspan=1 colspan=1>27.33</td></tr><tr><td rowspan=1 colspan=1>UNIT</td><td rowspan=1 colspan=1>1.48</td><td rowspan=1 colspan=1>0.85</td><td rowspan=1 colspan=1>18.63</td><td rowspan=1 colspan=1>32.11</td><td rowspan=1 colspan=1>11.93</td></tr><tr><td rowspan=1 colspan=1>MUNIT</td><td rowspan=1 colspan=1>3.41</td><td rowspan=1 colspan=1>1.04</td><td rowspan=1 colspan=1>14.48</td><td rowspan=1 colspan=1>8.22</td><td rowspan=1 colspan=1>2.07</td></tr><tr><td rowspan=1 colspan=1>DRIT</td><td rowspan=1 colspan=1>1.89</td><td rowspan=1 colspan=1>1.48</td><td rowspan=1 colspan=1>2.48</td><td rowspan=1 colspan=1>2.48</td><td rowspan=1 colspan=1>9.70</td></tr></table>
|
| 130 |
+
|
| 131 |
+
Table 3: Kernel Inception Distance $\times 1 0 0 \pm$ std. $\times 1 0 0$ for difference image translation mode. Lower is better.
|
| 132 |
+
|
| 133 |
+
<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>selfie2anime</td><td rowspan=1 colspan=1>horse2zebra</td><td rowspan=1 colspan=1>cat2dog</td><td rowspan=1 colspan=1>photo2portrait</td><td rowspan=1 colspan=1>photo2vangogh</td></tr><tr><td rowspan=1 colspan=1>U-GAT-IT</td><td rowspan=1 colspan=1>11.61 ± 0.57</td><td rowspan=1 colspan=1>7.06 ± 0.8</td><td rowspan=1 colspan=1>7.07 ± 0.65</td><td rowspan=1 colspan=1>1.79 ± 0.34</td><td rowspan=1 colspan=1>4.28 ± 0.33</td></tr><tr><td rowspan=1 colspan=1>CycleGAN</td><td rowspan=1 colspan=1>13.08 ± 0.49</td><td rowspan=1 colspan=1>8.05 ± 0.72</td><td rowspan=1 colspan=1>8.92 ± 0.69</td><td rowspan=1 colspan=1>1.84 ± 0.34</td><td rowspan=1 colspan=1>5.46± 0.33</td></tr><tr><td rowspan=1 colspan=1>UNIT</td><td rowspan=1 colspan=1>14.71 ± 0.59</td><td rowspan=1 colspan=1>10.44 ± 0.67</td><td rowspan=1 colspan=1>8.15 ± 0.48</td><td rowspan=1 colspan=1>1.20 ± 0.31</td><td rowspan=1 colspan=1>4.26 ± 0.29</td></tr><tr><td rowspan=1 colspan=1>MUNIT</td><td rowspan=1 colspan=1>13.85 ± 0.41</td><td rowspan=1 colspan=1>11.41 ± 0.83</td><td rowspan=1 colspan=1>10.13 ± 0.27</td><td rowspan=1 colspan=1>4.75 ± 0.52</td><td rowspan=1 colspan=1>13.08 ± 0.34</td></tr><tr><td rowspan=1 colspan=1>DRIT</td><td rowspan=1 colspan=1>15.08 ± 0.62</td><td rowspan=1 colspan=1>9.79 ± 0.62</td><td rowspan=1 colspan=1>10.92 ± 0.33</td><td rowspan=1 colspan=1>5.85 ± 0.54</td><td rowspan=1 colspan=1>12.65 ± 0.35</td></tr><tr><td rowspan=1 colspan=1>AGGAN</td><td rowspan=1 colspan=1>14.63 ± 0.55</td><td rowspan=1 colspan=1>7.58 ± 0.71</td><td rowspan=1 colspan=1>9.84± 0.79</td><td rowspan=1 colspan=1>2.33± 0.36</td><td rowspan=1 colspan=1>6.95± 0.33</td></tr><tr><td rowspan=1 colspan=1>CartoonGAN</td><td rowspan=1 colspan=1>15.85 ± 0.69</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><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>anime2selfie</td><td rowspan=1 colspan=1>zebra2horse</td><td rowspan=1 colspan=1>dog2cat</td><td rowspan=1 colspan=1>portrait2photo</td><td rowspan=1 colspan=1>vangogh2photo</td></tr><tr><td rowspan=1 colspan=1>U-GAT-IT</td><td rowspan=1 colspan=1>11.52 ± 0.57</td><td rowspan=1 colspan=1>7.47 ± 0.71</td><td rowspan=1 colspan=1>8.15 ± 0.66</td><td rowspan=1 colspan=1>1.69 ± 0.53</td><td rowspan=1 colspan=1>5.61 ± 0.32</td></tr><tr><td rowspan=1 colspan=1>CycleGAN</td><td rowspan=1 colspan=1>11.84 ± 0.74</td><td rowspan=1 colspan=1>8.0 ± 0.66</td><td rowspan=1 colspan=1>9.94 ± 0.36</td><td rowspan=1 colspan=1>1.82 ± 0.36</td><td rowspan=1 colspan=1>4.68 ± 0.36</td></tr><tr><td rowspan=1 colspan=1>UNIT</td><td rowspan=1 colspan=1>26.32 ± 0.92</td><td rowspan=1 colspan=1>14.93 ± 0.75</td><td rowspan=1 colspan=1>9.81 ± 0.34</td><td rowspan=1 colspan=1>1.42 ± 0.24</td><td rowspan=1 colspan=1>9.72 ± 0.33</td></tr><tr><td rowspan=1 colspan=1>MUNIT</td><td rowspan=1 colspan=1>13.94 ± 0.72</td><td rowspan=1 colspan=1>16.47 ± 1.04</td><td rowspan=1 colspan=1>10.39 ± 0.25</td><td rowspan=1 colspan=1>3.30 ± 0.47</td><td rowspan=1 colspan=1>9.53 ± 0.35</td></tr><tr><td rowspan=1 colspan=1>DRIT</td><td rowspan=1 colspan=1>14.85 ± 0.60</td><td rowspan=1 colspan=1>10.98 ± 0.55</td><td rowspan=1 colspan=1>10.86 ± 0.24</td><td rowspan=1 colspan=1>4.76 ± 0.72</td><td rowspan=1 colspan=1>7.72 ± 0.34</td></tr><tr><td rowspan=1 colspan=1>AGGAN</td><td rowspan=1 colspan=1>12.72 ± 1.03</td><td rowspan=1 colspan=1>8.80 ± 0.66</td><td rowspan=1 colspan=1>9.45 ± 0.64</td><td rowspan=1 colspan=1>2.19 ± 0.40</td><td rowspan=1 colspan=1>5.85 ± 0.31</td></tr></table>
|
| 134 |
+
|
| 135 |
+
# 3.3.4 QUANTITATIVE EVALUATION
|
| 136 |
+
|
| 137 |
+
For quantitative evaluation, we use the recently proposed KID, which computes the squared Maximum Mean Discrepancy between the feature representations of real and generated images. The feature representations are extracted from the Inception network (Szegedy et al. (2016)). In contrast to the Frechet Inception Distance ´ (Heusel et al. (2017)), KID has an unbiased estimator, which makes it more reliable, especially when there are fewer test images than the dimensionality of the inception features. The lower KID indicates that the more shared visual similarities between real and generated images (Mejjati et al. (2018)). Therefore, if well translated, the KID will have a small value in several datasets. Table 3 shows that the proposed method achieved the lowest KID scores except for the style transfer tasks like photo2vangogh and photo2portrait. However, there is no big difference from the lowest score. Also, unlike UNIT and MUNIT, we can see that the source target, target source translations are both stable. U-GAT-IT shows even lower KID than the recent attention-based method, AGGAN. AGGAN yields poor performance for the transformation with shape change such as dog2cat and anime2selfie unlike the U-GAT-IT, the attention module of which focuses on distinguishing not between background and foreground but differences between two domains. CartoonGAN, as shown in the supplementary materials, has only changed the overall color of the image to an animated style, but compared to selfie, the eye, which is the biggest characteristic of animation, has not changed at all. Therefore, CartoonGAN has the higher KID.
|
| 138 |
+
|
| 139 |
+
# 4 CONCLUSIONS
|
| 140 |
+
|
| 141 |
+
In this paper, we have proposed unsupervised image-to-image translation (U-GAT-IT), with the attention module and AdaLIN which can produce more visually pleasing results in various datasets with a fixed network architecture and hyper-parameter. Detailed analysis of various experimental results supports our assumption that attention maps obtained by an auxiliary classifier can guide generator to focus more on distinct regions between source and target domain. In addition, we have found that the Adaptive Layer-Instance Normalization (AdaLIN) is essential for translating various datasets that contains different amount of geometry and style changes. Through experiments, we have shown that the superiority of the proposed method compared to the existing state-of-the-art GAN-based models for unsupervised image-to-image translation tasks.
|
| 142 |
+
|
| 143 |
+
# REFERENCES
|
| 144 |
+
|
| 145 |
+
Asha Anoosheh, Eirikur Agustsson, Radu Timofte, and Luc Van Gool. Combogan: Unrestrained scalability for image domain translation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pp. 783–790, 2018.
|
| 146 |
+
|
| 147 |
+
Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein generative adversarial networks. ´ In International Conference on Machine Learning, pp. 214–223, 2017.
|
| 148 |
+
|
| 149 |
+
Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.
|
| 150 |
+
|
| 151 |
+
David Berthelot, Tom Schumm, and Luke Metz. Began: Boundary equilibrium generative adversarial networks. arXiv preprint arXiv:1703.10717, 2017.
|
| 152 |
+
|
| 153 |
+
Mikołaj Binkowski, Dougal J. Sutherland, Michael Arbel, and Arthur Gretton. Demystifying ´ MMD GANs. In International Conference on Learning Representations, 2018. URL https: //openreview.net/forum?id $=$ r1lUOzWCW.
|
| 154 |
+
|
| 155 |
+
Yang Chen, Yu-Kun Lai, and Yong-Jin Liu. Cartoongan: Generative adversarial networks for photo cartoonization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 9465–9474, 2018.
|
| 156 |
+
|
| 157 |
+
Yunjey Choi, Minje Choi, Munyoung Kim, Jung-Woo Ha, Sunghun Kim, and Jaegul Choo. Stargan: Unified generative adversarial networks for multi-domain image-to-image translation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 8789– 8797, 2018.
|
| 158 |
+
|
| 159 |
+
Chao Dong, Chen Change Loy, Kaiming He, and Xiaoou Tang. Image super-resolution using deep convolutional networks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 38(2): 295–307, 2016.
|
| 160 |
+
|
| 161 |
+
Vincent Dumoulin, Jonathon Shlens, and Manjunath Kudlur. A learned representation for artistic style. In International Conference on Learning Representations, 2017. URL https: //openreview.net/forum?id $=$ BJO-BuT1g.
|
| 162 |
+
|
| 163 |
+
Leon A Gatys, Alexander S Ecker, and Matthias Bethge. Image style transfer using convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2414–2423, 2016.
|
| 164 |
+
|
| 165 |
+
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.
|
| 166 |
+
|
| 167 |
+
Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In Advances in Neural Information Processing Systems, pp. 6626–6637, 2017.
|
| 168 |
+
|
| 169 |
+
Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1501– 1510, 2017.
|
| 170 |
+
|
| 171 |
+
Xun Huang, Ming-Yu Liu, Serge Belongie, and Jan Kautz. Multimodal unsupervised image-toimage translation. In Proceedings of the European Conference on Computer Vision, pp. 172–189, 2018.
|
| 172 |
+
|
| 173 |
+
Satoshi Iizuka, Edgar Simo-Serra, and Hiroshi Ishikawa. Globally and locally consistent image completion. ACM Transactions on Graphics, 36(4):107, 2017.
|
| 174 |
+
|
| 175 |
+
Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1125–1134, 2017.
|
| 176 |
+
|
| 177 |
+
Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen. Progressive growing of gans for improved quality, stability, and variation. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id $=$ Hk99zCeAb.
|
| 178 |
+
|
| 179 |
+
Jiwon Kim, Jung Kwon Lee, and Kyoung Mu Lee. Accurate image super-resolution using very deep convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1646–1654, 2016.
|
| 180 |
+
|
| 181 |
+
Taeksoo Kim, Moonsu Cha, Hyunsoo Kim, Jung Kwon Lee, and Jiwon Kim. Learning to discover cross-domain relations with generative adversarial networks. In Proceedings of the International Conference on Machine Learning, pp. 1857–1865, 2017. URL http://proceedings.mlr. press/v70/kim17a.html.
|
| 182 |
+
|
| 183 |
+
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations, 2015. URL http://arxiv.org/abs/1412. 6980.
|
| 184 |
+
|
| 185 |
+
Gustav Larsson, Michael Maire, and Gregory Shakhnarovich. Learning representations for automatic colorization. In Proceedings of the European Conference on Computer Vision, pp. 577–593. Springer, 2016.
|
| 186 |
+
|
| 187 |
+
Hsin-Ying Lee, Hung-Yu Tseng, Jia-Bin Huang, Maneesh Singh, and Ming-Hsuan Yang. Diverse image-to-image translation via disentangled representations. In Proceedings of the European Conference on Computer Vision, pp. 35–51, 2018.
|
| 188 |
+
|
| 189 |
+
Chunyuan Li, Hao Liu, Changyou Chen, Yuchen Pu, Liqun Chen, Ricardo Henao, and Lawrence Carin. Alice: Towards understanding adversarial learning for joint distribution matching. In Advances in Neural Information Processing Systems, pp. 5501–5509, 2017a.
|
| 190 |
+
|
| 191 |
+
Yijun Li, Chen Fang, Jimei Yang, Zhaowen Wang, Xin Lu, and Ming-Hsuan Yang. Universal style transfer via feature transforms. In Advances in Neural Information Processing Systems, pp. 386– 396, 2017b.
|
| 192 |
+
|
| 193 |
+
Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. In Advances in Neural Information Processing Systems, pp. 700–708, 2017.
|
| 194 |
+
|
| 195 |
+
Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3431–3440, 2015.
|
| 196 |
+
|
| 197 |
+
Xudong Mao, Qing Li, Haoran Xie, Raymond YK Lau, Zhen Wang, and Stephen Paul Smolley. Least squares generative adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision, pp. 2813–2821. IEEE, 2017.
|
| 198 |
+
|
| 199 |
+
Youssef Alami Mejjati, Christian Richardt, James Tompkin, Darren Cosker, and Kwang In Kim. Unsupervised attention-guided image-to-image translation. In Advances in Neural Information Processing Systems, pp. 3697–3707, 2018.
|
| 200 |
+
|
| 201 |
+
Takeru Miyato, Toshiki Kataoka, Masanori Koyama, and Yuichi Yoshida. Spectral normalization for generative adversarial networks. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id $=$ B1QRgziT-.
|
| 202 |
+
|
| 203 |
+
Hyeonseob Nam and Hyo-Eun Kim. Batch-instance normalization for adaptively style-invariant neural networks. In Advances in Neural Information Processing Systems, pp. 2563–2572, 2018.
|
| 204 |
+
|
| 205 |
+
Deepak Pathak, Philipp Krahenbuhl, Jeff Donahue, Trevor Darrell, and Alexei A Efros. Context encoders: Feature learning by inpainting. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2536–2544, 2014.
|
| 206 |
+
|
| 207 |
+
Amelie Royer, Konstantinos Bousmalis, Stephan Gouws, Fred Bertsch, Inbar Moressi, Forrester ´ Cole, and Kevin Murphy. Xgan: Unsupervised image-to-image translation for many-to-many mappings. arXiv preprint arXiv:1711.05139, 2017.
|
| 208 |
+
|
| 209 |
+
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2818–2826, 2016.
|
| 210 |
+
|
| 211 |
+
Yaniv Taigman, Adam Polyak, and Lior Wolf. Unsupervised cross-domain image generation. In International Conference on Learning Representations, 2017. URL https://openreview. net/forum?id ${ . } = { }$ Sk2Im59ex.
|
| 212 |
+
|
| 213 |
+
Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu, Andrew Tao, Jan Kautz, and Bryan Catanzaro. Highresolution image synthesis and semantic manipulation with conditional gans. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 8798–8807, 2018.
|
| 214 |
+
|
| 215 |
+
Yuxin Wu and Kaiming He. Group normalization. In Proceedings of the European Conference on Computer Vision, September 2018.
|
| 216 |
+
|
| 217 |
+
Zili Yi, Hao Zhang, Ping Tan, and Minglun Gong. Dualgan: Unsupervised dual learning for imageto-image translation. In Proceedings of the IEEE International Conference on Computer Vision, pp. 2849–2857, 2017.
|
| 218 |
+
|
| 219 |
+
Richard Zhang, Phillip Isola, and Alexei A Efros. Colorful image colorization. In Proceedings of the European Conference on Computer Vision, pp. 649–666. Springer, 2016.
|
| 220 |
+
|
| 221 |
+
Richard Zhang, Jun-Yan Zhu, Phillip Isola, Xinyang Geng, Angela S. Lin, Tianhe Yu, and Alexei A. Efros. Real-time user-guided image colorization with learned deep priors. ACM Transactions on Graphics, 36(4):119:1–119:11, 2017. doi: 10.1145/3072959.3073703. URL https://doi. org/10.1145/3072959.3073703.
|
| 222 |
+
|
| 223 |
+
Junbo Jake Zhao, Michael Mathieu, and Yann LeCun. Energy-based generative adversarial net- ¨ works. In International Conference on Learning Representations, 2017. URL https:// openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ ryh9pmcee.
|
| 224 |
+
|
| 225 |
+
Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Learning deep features for discriminative localization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2921–2929. IEEE, 2016.
|
| 226 |
+
|
| 227 |
+
Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision, pp. 2223–2232, 2017.
|
| 228 |
+
|
| 229 |
+
# A RELATED WORKS
|
| 230 |
+
|
| 231 |
+
# A.1 GENERATIVE ADVERSARIAL NETWORKS
|
| 232 |
+
|
| 233 |
+
Generative Adversarial Networks (GAN)(Goodfellow et al. (2014)) have achieved impressive results on a wide variety of image generation(Arjovsky et al. (2017); Berthelot et al. (2017); Karras et al. (2018); Zhao et al. (2017)), image inpainting(Iizuka et al. (2017)), image translation(Choi et al. (2018); Huang et al. (2018); Isola et al. (2017); Liu et al. (2017); Wang et al. (2018); Zhu et al. (2017)) tasks. In training, a generator aims to generate realistic images to fool a discriminator while the discriminator tries to distinguish the generated images from real images. Various multi-stage generative models(Karras et al. (2018); Wang et al. (2018)) and better training objectives(Arjovsky et al. (2017); Berthelot et al. (2017); Mao et al. (2017); Zhao et al. (2017)) have been proposed to generate more realistic images. In this paper, our model uses GAN to learn the transformation from a source domain to a significantly different target domain, given unpaired training data.
|
| 234 |
+
|
| 235 |
+
# A.2 IMAGE-TO-IMAGE TRANSLATION
|
| 236 |
+
|
| 237 |
+
Isola et al.(Isola et al. (2017)) have proposed a conditional GAN-based unified framework for image-to-image translation. High-resolution version of the pix2pix have been proposed by Wang et al.(Wang et al. (2018)) Recently, there have been various attempts (Huang et al. (2018); Kim et al. (2017); Liu et al. (2017); Taigman et al. (2017); Zhu et al. (2017)) to learn image translation from an unpaired dataset. CycleGAN (Zhu et al. (2017)) have proposed a cyclic consistence loss for the first time to enforce one-to-one mapping. UNIT (Liu et al. (2017)) assumed a shared-latent space to tackle unsupervised image translation. However, this approach performs well only when the two domains have similar patterns. MUNIT (Huang et al. (2018)) makes it possible to extend to manyto-many mapping by decomposing the image into content code that is domain-invariant and a style code that captures domain-specific properties. MUNIT synthesizes the separated content and style to generate the final image, where the image quality is improved by using adaptive instance normalization (Huang & Belongie (2017)). With the same purpose as MUNIT, DRIT (Lee et al. (2018)) decomposes images into content and style, so that many-to-many mapping is possible. The only difference is that content space is shared between the two domains using the weight sharing and content discriminator which is auxiliary classifier. Nevertheless, the performance of these methods (Huang et al. (2018); Liu et al. (2017); Lee et al. (2018)) are limited to the dataset that contains well-aligned images between source and target domains. In addition, AGGAN (Mejjati et al. (2018)) improved the performance of image translation by using attention mechanism to distinguish between foreground and background. However, the attention module in AGGAN cannot help to transform the object’s shape in the image. Although, CartoonGAN (Chen et al. (2018)) shows good performance for animation style translation, it changes only the color, tone, and thickness of line in the image. Therefore it is not suitable for the shape change in the image.
|
| 238 |
+
|
| 239 |
+
# A.3 CLASS ACTIVATION MAP
|
| 240 |
+
|
| 241 |
+
Zhou et al. (Zhou et al. (2016)) have proposed Class Activation Map (CAM) using global average pooling in a CNN. The CAM for a particular class shows the discriminative image regions by the CNN to determine that class. In this work, our model leads to intensively change discriminative image regions provided by distinguishing two domains using the CAM approach. However, not only global average pooling is used, but global max pooling is also used to make the results better.
|
| 242 |
+
|
| 243 |
+
# A.4 NORMALIZATION
|
| 244 |
+
|
| 245 |
+
Recent neural style transfer researches have shown that CNN feature statistics (e.g., Gram matrix (Gatys et al. (2016)), mean and variance (Huang & Belongie (2017)) can be used as direct descriptors for image styles. In particular, Instance Normalization (IN) has the effect of removing the style variation by directly normalizing the feature statistics of the image and is used more often than Batch Normalization (BN) or Layer Normalization (LN) in style transfer. However, when normalizing images, recent studies use Adaptive Instance Normalization (AdaIN) (Huang & Belongie (2017)), Conditional Instance Normalization (CIN) (Dumoulin et al. (2017)), and Batch-Instance Normalization (BIN) (Nam & Kim (2018)) instead of using IN alone. In our work, we propose an Adaptive
|
| 246 |
+
|
| 247 |
+
Layer-Instance Normalization (AdaLIN) function to adaptively select a proper ratio between IN and LN. Through the AdaLIN, our attention-guided model can flexibly control the amount of change in shape and texture.
|
| 248 |
+
|
| 249 |
+
# B IMPLEMENTATION DETAILS
|
| 250 |
+
|
| 251 |
+
# B.1 NETWORK ARCHITECTURE
|
| 252 |
+
|
| 253 |
+
The network architectures of U-GAT-IT are shown in Table 4, 5, and 6. The encoder of the generator is composed of two convolution layers with the stride size of two for down-sampling and four residual blocks. The decoder of the generator consists of four residual blocks and two up-sampling convolution layers with the stride size of one. Note that we use the instance normalization for the encoder and AdaLIN for the decoder, respectively. In general, LN does not perform better than batch normalization in classification problems (Wu & He (2018)). Since the auxiliary classifier is connected from the encoder in the generator, to increase the accuracy of the auxiliary classifier we use the instance normalization(batch normalization with a mini-batch size of 1) instead of the AdaLIN. Spectral normalization (Miyato et al. (2018)) is used for the discriminator. We employ two different scales of PatchGAN (Isola et al. (2017)) for the discriminator network, which classifies whether local $( 7 0 \mathrm { ~ x ~ } 7 0 )$ and global $( 2 8 6 \mathrm { ~ x ~ } 2 8 6 )$ image patches are real or fake. For the activation function, we use ReLU in the generator and leaky-ReLU with a slope of 0.2 in the discriminator.
|
| 254 |
+
|
| 255 |
+
# B.2 TRAINING
|
| 256 |
+
|
| 257 |
+
All models are trained using Adam (Kingma & Ba (2015)) with $\beta _ { 1 } { = } 0 . 5$ and $\beta _ { 2 } { = } 0 . 9 9 9$ . For data augmentation, we flipped the images horizontally with a probability of 0.5, resized them to $2 8 6 \times$ 286, and random cropped them to $2 5 6 \times 2 5 6$ . The batch size is set to one for all experiments. We train all models with a fixed learning rate of 0.0001 until 500,000 iterations and linearly decayed up to 1,000,000 iterations. We also use a weight decay at rate of 0.0001. The weights are initialized from a zero-centered normal distribution with a standard deviation of 0.02.
|
| 258 |
+
|
| 259 |
+
# C DATASET DETAILS
|
| 260 |
+
|
| 261 |
+
selfie2anime The selfie dataset contains 46,836 selfie images annotated with 36 different attributes. We only use photos of females as training data and test data. The size of the training dataset is 3400, and that of the test dataset is 100, with the image size of $2 5 6 \times 2 5 6$ . For the anime dataset, we have firstly retrieved 69,926 animation character images from Anime-Planet1. Among those images, 27,023 face images are extracted by using an anime-face detector2. After selecting only female character images and removing monochrome images manually, we have collected two datasets of female anime face images, with the sizes of 3400 and 100 for training and test data respectively, which is the same numbers as the selfie dataset. Finally, all anime face images are resized to $2 5 6 \times$ 256 by applying a CNN-based image super-resolution algorithm3.
|
| 262 |
+
|
| 263 |
+
horse2zebra and photo2vangogh These datasets are used in CycleGAN (Zhu et al. (2017)). The training dataset size of each class: 1,067 (horse), 1,334 (zebra), 6,287 (photo), and 400 (vangogh). The test datasets consist of 120 (horse), 140 (zebra), 751 (photo), and 400 (vangogh). Note that the training data and the test data of vangogh class are the same.
|
| 264 |
+
|
| 265 |
+
cat2dog and photo2portrait These datasets are used in DRIT (Lee et al. (2018)). The numbers of data for each class are 871 (cat), 1,364 (zebra), 6,452 (photo), and 1,811 (vangogh). We use 120 (horse), 140 (zebra), 751 (photo), and 400 (vangogh) randomly selected images as test data, respectively.
|
| 266 |
+
|
| 267 |
+
# D ADDITIONAL EXPERIMENTAL RESULTS
|
| 268 |
+
|
| 269 |
+
In addition to the results presented in the paper, we show supplement generation results for the five datasets in Figs 5, 6, 7, 8, 9, 10, 11, and 12.
|
| 270 |
+
|
| 271 |
+
Table 4: The detail of generator architecture.
|
| 272 |
+
|
| 273 |
+
<table><tr><td rowspan=1 colspan=1>Part</td><td rowspan=1 colspan=1>Input -→ Output Shape</td><td rowspan=1 colspan=1>Layer Information</td></tr><tr><td rowspan=3 colspan=1>Encoder Down-sampling</td><td rowspan=1 colspan=1>(h,w,3)→(h,w,64)</td><td rowspan=1 colspan=1>CONV-(N64,K7, S1, P3),IN,ReLU</td></tr><tr><td rowspan=1 colspan=1>(h,w.64)→(,,128)</td><td rowspan=1 colspan=1>CONV-(N128,K3,S2,P1),IN,ReLU</td></tr><tr><td rowspan=1 colspan=1>,,128)→(,N,,256)</td><td rowspan=1 colspan=1>CONV-(N256,K3,S2,P1),IN,ReLU</td></tr><tr><td rowspan=4 colspan=1>EncoderBottleneck</td><td rowspan=1 colspan=1>东会,,256)→A,256)</td><td rowspan=1 colspan=1>ResBlock-(N256,K3,S1,P1), IN,ReLU</td></tr><tr><td rowspan=1 colspan=1>GA,,256→A,256</td><td rowspan=1 colspan=1>ResBlock-(N256,K3,S1,P1),IN,ReLU</td></tr><tr><td rowspan=1 colspan=1>GA256 A,256)</td><td rowspan=1 colspan=1>ResBlock-(N256,K3, S1,P1), IN,ReLU</td></tr><tr><td rowspan=1 colspan=1>,美256 A,,256)</td><td rowspan=1 colspan=1>ResBlock-(N256,K3,S1, P1), IN,ReLU</td></tr><tr><td rowspan=2 colspan=1>CAMof Generator</td><td rowspan=1 colspan=1>,美,256) ,,512)</td><td rowspan=1 colspan=1>Global Average & Max Pooling,MLP-(N1), Multiply the weights of MLP</td></tr><tr><td rowspan=1 colspan=1>4,,512) ,256</td><td rowspan=1 colspan=1>CONV-(N256, K1, S1), ReLU</td></tr><tr><td rowspan=3 colspan=1>Y,β</td><td rowspan=1 colspan=1>(,256→ (1,1,256)</td><td rowspan=1 colspan=1>MLP-(N256), ReLU</td></tr><tr><td rowspan=1 colspan=1>(1,1,256)→(1,1,256)</td><td rowspan=1 colspan=1>MLP-(N256), ReLU</td></tr><tr><td rowspan=1 colspan=1>(1,1,256)→(1,1,256)</td><td rowspan=1 colspan=1>MLP-(N256),ReLU</td></tr><tr><td rowspan=4 colspan=1>Decoder Bottleneck</td><td rowspan=1 colspan=1>,256→(, 256</td><td rowspan=1 colspan=1>AdaResBlock-(N256,K3, S1,P1),AdaILN,ReLU</td></tr><tr><td rowspan=1 colspan=1>C美256 A,256)</td><td rowspan=1 colspan=1>AdaResBlock-(N256,K3,S1,P1),AdaILN,ReU</td></tr><tr><td rowspan=1 colspan=1>会,256)→A,256)</td><td rowspan=1 colspan=1>AdaResBlock-(N256,K3,S1,P1),AdaILN,ReU</td></tr><tr><td rowspan=1 colspan=1>CA256→A,256)</td><td rowspan=1 colspan=1>AdaResBlock-(N256,K3,S1,P1),AdaILN,ReU</td></tr><tr><td rowspan=3 colspan=1>Decoder Up-sampling</td><td rowspan=1 colspan=1>4256 ,,128)</td><td rowspan=1 colspan=1>Up-CONV-(N128, K3, S1, P1), LIN, ReLU</td></tr><tr><td rowspan=1 colspan=1>,,128)→(h,w,64)</td><td rowspan=1 colspan=1>Up-CONV-(N64, K3,S1, P1),LIN, ReLU</td></tr><tr><td rowspan=1 colspan=1>(h,w,64) → (h,w,3)</td><td rowspan=1 colspan=1>CONV-(N3, K7,S1, P3), Tanh</td></tr></table>
|
| 274 |
+
|
| 275 |
+
Table 5: The detail of local discriminator.
|
| 276 |
+
|
| 277 |
+
<table><tr><td rowspan=1 colspan=1>Part</td><td rowspan=1 colspan=1>Input -→ Output Shape</td><td rowspan=1 colspan=1>Layer Information</td></tr><tr><td rowspan=4 colspan=1>Encoder Down-sampling</td><td rowspan=1 colspan=1>(h,w,3)→(,m,64)</td><td rowspan=1 colspan=1>CONV-(N64,K4, S2,P1), SN,Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>(,,64→(,,128)</td><td rowspan=1 colspan=1>CONV-(N128, K4, S2, P1), SN,Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>GA,128) ,256</td><td rowspan=1 colspan=1>CONV-(N256,K4, S2,P1), SN,Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>尚,,256 ,512)</td><td rowspan=1 colspan=1>CONV-(N512, K4, S1,P1), SN,Leaky-ReLU</td></tr><tr><td rowspan=2 colspan=1>CAMof Discriminator</td><td rowspan=1 colspan=1>8,1024)</td><td rowspan=1 colspan=1>Global Average & Max Pooling,MLP-(N1),Multiply the weights of MLP</td></tr><tr><td rowspan=1 colspan=1>,,1024)→,,512)</td><td rowspan=1 colspan=1>CONV-(N512,K1, S1),Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>Classifier</td><td rowspan=1 colspan=1>(,,512)→,,1</td><td rowspan=1 colspan=1>CONV-(N1,K4,S1,P1), S</td></tr></table>
|
| 278 |
+
|
| 279 |
+
Table 6: The detail of global discriminator.
|
| 280 |
+
|
| 281 |
+
<table><tr><td rowspan=1 colspan=1>Part</td><td rowspan=1 colspan=1>Input -→ Output Shape</td><td rowspan=1 colspan=1>Layer Information</td></tr><tr><td rowspan=6 colspan=1>Encoder Down-sampling</td><td rowspan=1 colspan=1>(h,w,3)→(,,64</td><td rowspan=1 colspan=1>CONV-(N64, K4, S2,P1), SN,Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>G,64→4.,128)</td><td rowspan=1 colspan=1>CONV-(N128, K4, S2, P1), SN,Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>G4,128)→,256</td><td rowspan=1 colspan=1>CONV-(N256, K4, S2, P1), SN, Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>G 256→(C品512)</td><td rowspan=1 colspan=1>CONV-(N512, K4, S2, P1), SN, Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>G,512) 品1024)</td><td rowspan=1 colspan=1>CONV-(N1024,K4, S2,P1), SN,Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>品3,1024) 金,2048)</td><td rowspan=1 colspan=1>CONV-(N2048,K4, S1,P1), SN,Leaky-ReLU</td></tr><tr><td rowspan=2 colspan=1>CAM of Discriminator</td><td rowspan=1 colspan=1>e,2048)→ =G32,32,4096)</td><td rowspan=1 colspan=1>Global Average & Max Pooling,MLP-(N1), Multiply the weights of MLP</td></tr><tr><td rowspan=1 colspan=1>金3,4096)→品,3,2048)</td><td rowspan=1 colspan=1>CONV-(N2048,K1, S1), Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>Classifier</td><td rowspan=1 colspan=1>2048)→ 高品,1)</td><td rowspan=1 colspan=1>CONV-(N1, K4, S1, P1), SN</td></tr></table>
|
| 282 |
+
|
| 283 |
+

|
| 284 |
+
Figure 5: Visual comparisons of the selfie2anime with attention features maps. (a) Source images, (b) Attention map of the generator, (c-d) Local and global attention maps of the discriminators, (e) Our results, (f) CycleGAN (Zhu et al. (2017)), (g) UNIT (Liu et al. (2017)), (h) MUNIT (Huang et al. (2018)), (i) DRIT (Lee et al. (2018)), (j) AGGAN (Mejjati et al. (2018)), (k) CartoonGAN (Chen et al. (2018)).
|
| 285 |
+
|
| 286 |
+

|
| 287 |
+
Figure 6: Visual comparisons of the anime2selfie with attention features maps. (a) Source images, (b) Attention map of the generator, (c-d) Local and global attention maps of the discriminators, (e) Our results, (f) CycleGAN (Zhu et al. (2017)), (g) UNIT (Liu et al. (2017)), (h) MUNIT (Huang et al. (2018)), (i) DRIT (Lee et al. (2018)), (j) AGGAN (Mejjati et al. (2018)).
|
| 288 |
+
|
| 289 |
+

|
| 290 |
+
Figure 7: Visual comparisons of the horse2zebra with attention features maps. (a) Source images, (b) Attention map of the generator, (c-d) Local and global attention maps of the discriminators, (e) Our results, (f) CycleGAN (Zhu et al. (2017)), (g) UNIT (Liu et al. (2017)), (h) MUNIT (Huang et al. (2018)), (i) DRIT (Lee et al. (2018)), (j) AGGAN (Mejjati et al. (2018)).
|
| 291 |
+
|
| 292 |
+

|
| 293 |
+
Figure 8: Visual comparisons of the zebra2horse with attention features maps. (a) Source images, (b) Attention map of the generator, (c-d) Local and global attention maps of the discriminators, (e) Our results, (f) CycleGAN (Zhu et al. (2017)), (g) UNIT (Liu et al. (2017)), (h) MUNIT (Huang et al. (2018)), (i) DRIT (Lee et al. (2018)), (j) AGGAN (Mejjati et al. (2018)).
|
| 294 |
+
|
| 295 |
+

|
| 296 |
+
Figure 9: Visual comparisons of the cat2dog with attention features maps. (a) Source images, (b) Attention map of the generation, (c-d) Local and global attention maps of the discriminators, (e) Our results, (f) CycleGAN (Zhu et al. (2017)), (g) UNIT (Liu et al. (2017)), (h) MUNIT (Huang et al. (2018)), (i) DRIT (Lee et al. (2018)), (j) AGGAN (Mejjati et al. (2018)).
|
| 297 |
+
|
| 298 |
+

|
| 299 |
+
Figure 10: Visual comparisons of the dog2cat with attention features maps. (a) Source images, (b) Attention map of the generation, (c-d) Local and global attention maps of the discriminators, (e) Our results, (f) CycleGAN (Zhu et al. (2017)), (g) UNIT (Liu et al. (2017)), (h) MUNIT (Huang et al. (2018)), (i) DRIT (Lee et al. (2018)), (j) AGGAN (Mejjati et al. (2018)).
|
| 300 |
+
|
| 301 |
+

|
| 302 |
+
Figure 11: Visual comparisons of the photo2vangogh with attention features maps. (a) Source images, (b) Attention map of the generation, (c-d) Local and global attention maps of the discriminators, respectively, (e) Our results, (f) CycleGAN (Zhu et al. (2017)), (g) UNIT (Liu et al. (2017)), (h) MUNIT (Huang et al. (2018)), (i) DRIT (Lee et al. (2018)), (j) AGGAN (Mejjati et al. (2018)).
|
| 303 |
+
|
| 304 |
+

|
| 305 |
+
Figure 12: Visual comparisons of the photo2portrait with attention features maps. (a) Source images, (b) Attention map of the generator, (c-d) Local and global attention maps of the discriminators, respectively, (e) Our results,(f) CycleGAN (Zhu et al. (2017)), (g) UNIT (Liu et al. (2017)), (h) MUNIT (Huang et al. (2018)), (i) DRIT (Lee et al. (2018)), (j) AGGAN (Mejjati et al. (2018)).
|
parse/train/BJlZ5ySKPH/BJlZ5ySKPH_content_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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "U-GAT-IT: UNSUPERVISED GENERATIVE ATTENTIONAL NETWORKS WITH ADAPTIVE LAYERINSTANCE NORMALIZATION FOR IMAGE-TO-IMAGE TRANSLATION ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
174,
|
| 8 |
+
98,
|
| 9 |
+
823,
|
| 10 |
+
196
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Junho $\\mathbf { K i m } ^ { 1 , 2 }$ ∗, Minjae $\\mathbf { K i m ^ { 2 } }$ , Hyeonwoo $\\mathbf { K a n g ^ { 2 } }$ , Kwang Hee Lee3† 1Clova AI Research, NAVER Corp, 2NCSOFT, 3Boeing Korea Engineering and Technology Center jhkim.ai@navercorp.com, {minjaekim, hwkang0131}@ncsoft.com, kwanghee.lee2@boeing.com ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
183,
|
| 19 |
+
219,
|
| 20 |
+
905,
|
| 21 |
+
263
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "ABSTRACT ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
454,
|
| 31 |
+
300,
|
| 32 |
+
544,
|
| 33 |
+
315
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "We propose a novel method for unsupervised image-to-image translation, which incorporates a new attention module and a new learnable normalization function in an end-to-end manner. The attention module guides our model to focus on more important regions distinguishing between source and target domains based on the attention map obtained by the auxiliary classifier. Unlike previous attention-based method which cannot handle the geometric changes between domains, our model can translate both images requiring holistic changes and images requiring large shape changes. Moreover, our new AdaLIN (Adaptive Layer-Instance Normalization) function helps our attention-guided model to flexibly control the amount of change in shape and texture by learned parameters depending on datasets. Experimental results show the superiority of the proposed method compared to the existing state-of-the-art models with a fixed network architecture and hyper-parameters. Our code and datasets are available at https://github.com/taki0112/UGATIT or https://github.com/znxlwm/UGATITpytorch. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
233,
|
| 42 |
+
333,
|
| 43 |
+
764,
|
| 44 |
+
540
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 INTRODUCTION ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
176,
|
| 54 |
+
569,
|
| 55 |
+
336,
|
| 56 |
+
584
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "Image-to-image translation aims to learn a function that maps images within two different domains. This topic has gained a lot of attention from researchers in the fields of machine learning and computer vision because of its wide range of applications including image inpainting (Pathak et al. (2014); Iizuka et al. (2017)), super resolution (Dong et al. (2016); Kim et al. (2016)), colorization (Zhang et al. (2016; 2017)) and style transfer (Gatys et al. (2016); Huang & Belongie (2017)). When paired samples are given, the mapping model can be trained in a supervised manner using a conditional generative model (Isola et al. (2017); Li et al. (2017a); Wang et al. (2018)) or a simple regression model (Larsson et al. (2016); Long et al. (2015); Zhang et al. (2016)). In unsupervised settings where no paired data is available, multiple works (Anoosheh et al. (2018); Choi et al. (2018); Huang et al. (2018); Kim et al. (2017); Liu et al. (2017); Royer et al. (2017); Taigman et al. (2017); Yi et al. (2017); Zhu et al. (2017)) successfully have translated images using shared latent space (Liu et al. (2017)) and cycle consistency assumptions (Kim et al. (2017); Zhu et al. (2017)). These works have been further developed to handle the multi-modality of the task (Huang et al. (2018)). ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
601,
|
| 66 |
+
825,
|
| 67 |
+
781
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "Despite these advances, previous methods show performance differences depending on the amount of change in both shape and texture between domains. For example, they are successful for the style transfer tasks mapping local texture (e.g., photo2vangogh and photo2portrait) but are typically unsuccessful for image translation tasks with larger shape change (e.g., selfie2anime and cat2dog) in wild images. Therefore, the pre-processing steps such as image cropping and alignment are often required to avoid these problems by limiting the complexity of the data distributions (Huang et al. (2018); Liu et al. (2017)). In addition, existing methods such as DRIT (Lee et al. (2018)) cannot acquire the desired results for both image translation preserving the shape (e.g., horse2zebra) and image translation changing the shape (e.g., cat2dog) with the fixed network architecture and hyperparameters. The network structure or hyper-parameter setting needs to be adjusted for the specific dataset. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
787,
|
| 77 |
+
823,
|
| 78 |
+
886
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "image",
|
| 84 |
+
"img_path": "images/fd45f65521e82296b465ad57895870311bd4470475ee1b53ad50a61f4a62edc1.jpg",
|
| 85 |
+
"image_caption": [
|
| 86 |
+
"Figure 1: The model architecture of U-GAT-IT. The detailed notations are described in Section Model "
|
| 87 |
+
],
|
| 88 |
+
"image_footnote": [],
|
| 89 |
+
"bbox": [
|
| 90 |
+
284,
|
| 91 |
+
101,
|
| 92 |
+
722,
|
| 93 |
+
508
|
| 94 |
+
],
|
| 95 |
+
"page_idx": 1
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"type": "text",
|
| 99 |
+
"text": "",
|
| 100 |
+
"bbox": [
|
| 101 |
+
174,
|
| 102 |
+
583,
|
| 103 |
+
825,
|
| 104 |
+
638
|
| 105 |
+
],
|
| 106 |
+
"page_idx": 1
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"type": "text",
|
| 110 |
+
"text": "In this work, we propose a novel method for unsupervised image-to-image translation, which incorporates a new attention module and a new learnable normalization function in an end-to-end manner. Our model guides the translation to focus on more important regions and ignore minor regions by distinguishing between source and target domains based on the attention map obtained by the auxiliary classifier. These attention maps are embedded into the generator and discriminator to focus on semantically important areas, thus facilitating the shape transformation. While the attention map in the generator induces the focus on areas that specifically distinguish between the two domains, the attention map in the discriminator helps fine-tuning by focusing on the difference between real image and fake image in target domain. In addition to the attentional mechanism, we have found that the choice of the normalization function has a significant impact on the quality of the transformed results for various datasets with different amounts of change in shape and texture. Inspired by Batch-Instance Normalization(BIN) (Nam & Kim (2018)), we propose Adaptive LayerInstance Normalization (AdaLIN), whose parameters are learned from datasets during training time by adaptively selecting a proper ratio between Instance normalization (IN) and Layer Normalization (LN). The AdaLIN function helps our attention-guided model to flexibly control the amount of change in shape and texture. As a result, our model, without modifying the model architecture or the hyper-parameters, can perform image translation tasks not only requiring holistic changes but also requiring large shape changes. In the experiments, we show the superiority of the proposed method compared to the existing state-of-the-art models on not only style transfer but also object transfiguration. The main contribution of the proposed work can be summarized as follows: ",
|
| 111 |
+
"bbox": [
|
| 112 |
+
173,
|
| 113 |
+
646,
|
| 114 |
+
825,
|
| 115 |
+
924
|
| 116 |
+
],
|
| 117 |
+
"page_idx": 1
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"type": "text",
|
| 121 |
+
"text": "• We propose a novel method for unsupervised image-to-image translation with a new attention module and a new normalization function, AdaLIN. \n• Our attention module helps the model to know where to transform intensively by distinguishing between source and target domains based on the attention map obtained by the auxiliary classifier. \n• AdaLIN function helps our attention-guided model to flexibly control the amount of change in shape and texture without modifying the model architecture or the hyper-parameters. ",
|
| 122 |
+
"bbox": [
|
| 123 |
+
215,
|
| 124 |
+
103,
|
| 125 |
+
825,
|
| 126 |
+
213
|
| 127 |
+
],
|
| 128 |
+
"page_idx": 2
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"type": "text",
|
| 132 |
+
"text": "2 UNSUPERVISED GENERATIVE ATTENTIONAL NETWORKS WITH ADAPTIVE LAYER-INSTANCE NORMALIZATION ",
|
| 133 |
+
"text_level": 1,
|
| 134 |
+
"bbox": [
|
| 135 |
+
179,
|
| 136 |
+
233,
|
| 137 |
+
820,
|
| 138 |
+
267
|
| 139 |
+
],
|
| 140 |
+
"page_idx": 2
|
| 141 |
+
},
|
| 142 |
+
{
|
| 143 |
+
"type": "text",
|
| 144 |
+
"text": "Our goal is to train a function $G _ { s t }$ that maps images from a source domain $X _ { s }$ to a target domain $X _ { t }$ using only unpaired samples drawn from each domain. Our framework consists of two generators $G _ { s t }$ and $G _ { t s }$ and two discriminators $D _ { s }$ and $D _ { t }$ . We integrate the attention module into both generator and discriminator. The attention module in the discriminator guides the generator to focus on regions that are critical to generate a realistic image. The attention module in the generator gives attention to the region distinguished from the other domain. Here, we only explain $G _ { s t }$ and $D _ { t }$ (See Fig 1) as the vice versa should be straight-forward. ",
|
| 145 |
+
"bbox": [
|
| 146 |
+
173,
|
| 147 |
+
281,
|
| 148 |
+
825,
|
| 149 |
+
380
|
| 150 |
+
],
|
| 151 |
+
"page_idx": 2
|
| 152 |
+
},
|
| 153 |
+
{
|
| 154 |
+
"type": "text",
|
| 155 |
+
"text": "2.1 MODEL ",
|
| 156 |
+
"text_level": 1,
|
| 157 |
+
"bbox": [
|
| 158 |
+
174,
|
| 159 |
+
397,
|
| 160 |
+
267,
|
| 161 |
+
411
|
| 162 |
+
],
|
| 163 |
+
"page_idx": 2
|
| 164 |
+
},
|
| 165 |
+
{
|
| 166 |
+
"type": "text",
|
| 167 |
+
"text": "2.1.1 GENERATOR ",
|
| 168 |
+
"text_level": 1,
|
| 169 |
+
"bbox": [
|
| 170 |
+
174,
|
| 171 |
+
422,
|
| 172 |
+
315,
|
| 173 |
+
438
|
| 174 |
+
],
|
| 175 |
+
"page_idx": 2
|
| 176 |
+
},
|
| 177 |
+
{
|
| 178 |
+
"type": "text",
|
| 179 |
+
"text": "Let $x \\in \\{ X _ { s } , X _ { t } \\}$ represent a sample from the source and the target domain. Our translation model $G _ { s t }$ consists of an encoder $E _ { s }$ , a decoder $G _ { t }$ , and an auxiliary classifier $\\eta _ { s }$ , where $\\eta _ { s } ( x )$ represents the probability that $x$ comes from $X _ { s }$ . Let $E _ { s } ^ { k } ( x )$ be the $k$ -th activation map of the encoder and $E _ { s } ^ { k _ { i j } } ( x )$ be the value at $( i , j )$ . Inspired by CAM (Zhou et al. (2016)), the auxiliary classifier is trained to learn the weight of the $k$ -th feature map for the source domain, $w _ { s } ^ { k }$ , by using the global average pooling and global max pooling, i.e., $\\eta _ { s } ( x ) = \\sigma ( \\Sigma _ { k } w _ { s } ^ { k } \\Sigma _ { i j } E _ { s } ^ { k _ { i j } } ( x ) )$ . By exploiting $w _ { s } ^ { k }$ , we can calculate a set of domain specific attention feature map $a _ { s } ( x ) = w _ { s } * E _ { s } ( x ) = \\{ w _ { s } ^ { k } *$ $E _ { s } ^ { k } ( x ) | 1 { \\leq } k { \\leq } n \\}$ , where $n$ is the number of encoded feature maps. Then, our translation model $G _ { s t }$ becomes equal to $G _ { t } ( \\boldsymbol { a } _ { s } ( \\boldsymbol { x } ) )$ . Inspired by recent works that use affine transformation parameters in normalization layers and combine normalization functions (Huang & Belongie (2017); Nam & Kim (2018)), we equip the residual blocks with AdaLIN whose parameters, $\\gamma$ and $\\beta$ are dynamically computed by a fully connected layer from the attention map. ",
|
| 180 |
+
"bbox": [
|
| 181 |
+
173,
|
| 182 |
+
446,
|
| 183 |
+
825,
|
| 184 |
+
625
|
| 185 |
+
],
|
| 186 |
+
"page_idx": 2
|
| 187 |
+
},
|
| 188 |
+
{
|
| 189 |
+
"type": "equation",
|
| 190 |
+
"img_path": "images/4cdb21a5dc0ca1930112466936ab849ecebb0fb65d1f5964556c871a458b1216.jpg",
|
| 191 |
+
"text": "$$\n\\begin{array} { c } { { A d a L I N ( a , \\gamma , \\beta ) = \\gamma \\cdot ( \\rho \\cdot \\hat { a _ { I } } + ( 1 - \\rho ) \\cdot \\hat { a _ { L } } ) + \\beta , } } \\\\ { { \\hat { a _ { I } } = \\displaystyle \\frac { a - \\mu _ { I } } { \\sqrt { \\sigma _ { I } ^ { 2 } + \\epsilon } } , \\hat { a _ { L } } = \\displaystyle \\frac { a - \\mu _ { L } } { \\sqrt { \\sigma _ { L } ^ { 2 } + \\epsilon } } , } } \\\\ { { \\rho c l i p _ { [ 0 , 1 ] } ( \\rho - \\tau \\Delta \\rho ) } } \\end{array}\n$$",
|
| 192 |
+
"text_format": "latex",
|
| 193 |
+
"bbox": [
|
| 194 |
+
308,
|
| 195 |
+
647,
|
| 196 |
+
655,
|
| 197 |
+
723
|
| 198 |
+
],
|
| 199 |
+
"page_idx": 2
|
| 200 |
+
},
|
| 201 |
+
{
|
| 202 |
+
"type": "text",
|
| 203 |
+
"text": "where $\\mu _ { I } , \\mu _ { L }$ and $\\sigma _ { I } , \\sigma _ { L }$ are channel-wise, layer-wise mean and standard deviation respectively, $\\gamma$ and $\\beta$ are parameters generated by the fully connected layer, $\\tau$ is the learning rate and $\\Delta \\rho$ indicates the parameter update vector (e.g., the gradient) determined by the optimizer. The values of $\\rho$ are constrained to the range of [0, 1] simply by imposing bounds at the parameter update step. Generator adjusts the value so that the value of $\\rho$ is close to 1 in the task where the instance normalization is important and the value of $\\rho$ is close to 0 in the task where the LN is important. The value of $\\rho$ is initialized to 1 in the residual blocks of the decoder and 0 in the up-sampling blocks of the decoder. ",
|
| 204 |
+
"bbox": [
|
| 205 |
+
174,
|
| 206 |
+
734,
|
| 207 |
+
825,
|
| 208 |
+
833
|
| 209 |
+
],
|
| 210 |
+
"page_idx": 2
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"type": "text",
|
| 214 |
+
"text": "An optimal method to transfer the content features onto the style features is to apply Whitening and Coloring Transform (WCT) (Li et al. (2017b)), but the computational cost is high due to the calculation of the covariance matrix and matrix inverse. Although, the AdaIN (Huang & Belongie (2017)) is much faster than the WCT, it is sub-optimal to WCT as it assumes uncorrelation between feature channels. Thus the transferred features contain slightly more patterns of the content. On the other hand, the LN (Ba et al. (2016)) does not assume uncorrelation between channels, but sometimes it does not keep the content structure of the original domain well because it considers global statistics only for the feature maps. To overcome this, our proposed normalization technique AdaLIN combines the advantages of AdaIN and LN by selectively keeping or changing the content information, which helps to solve a wide range of image-to-image translation problems. ",
|
| 215 |
+
"bbox": [
|
| 216 |
+
174,
|
| 217 |
+
840,
|
| 218 |
+
825,
|
| 219 |
+
924
|
| 220 |
+
],
|
| 221 |
+
"page_idx": 2
|
| 222 |
+
},
|
| 223 |
+
{
|
| 224 |
+
"type": "text",
|
| 225 |
+
"text": "",
|
| 226 |
+
"bbox": [
|
| 227 |
+
174,
|
| 228 |
+
103,
|
| 229 |
+
825,
|
| 230 |
+
160
|
| 231 |
+
],
|
| 232 |
+
"page_idx": 3
|
| 233 |
+
},
|
| 234 |
+
{
|
| 235 |
+
"type": "text",
|
| 236 |
+
"text": "2.1.2 DISCRIMINATOR ",
|
| 237 |
+
"text_level": 1,
|
| 238 |
+
"bbox": [
|
| 239 |
+
174,
|
| 240 |
+
174,
|
| 241 |
+
343,
|
| 242 |
+
189
|
| 243 |
+
],
|
| 244 |
+
"page_idx": 3
|
| 245 |
+
},
|
| 246 |
+
{
|
| 247 |
+
"type": "text",
|
| 248 |
+
"text": "Let $x \\in \\{ X _ { t } , G _ { s t } ( X _ { s } ) \\}$ represent a sample from the target domain and the translated source domain. Similar to other translation models, the discriminator $D _ { t }$ which is a multi-scale model consists of an encoder $E _ { D _ { t } }$ , a classifier $\\mathrm { C } _ { D _ { t } }$ , and an auxiliary classifier $\\eta _ { D _ { t } }$ . Unlike the other translation models, both $\\eta _ { D _ { t } } ( x )$ and $D _ { t } ( x )$ are trained to discriminate whether $x$ comes from $X _ { t }$ or $G _ { s \\to t } ( X _ { s } )$ . Given a sample $x$ , $D _ { t } ( x )$ exploits the attention feature maps $a _ { D _ { t } } ( x ) = w _ { D _ { t } } * E _ { D _ { t } } ( x )$ using $w _ { D _ { t } }$ on the encoded feature maps $E _ { D _ { t } } ( x )$ that is trained by $\\eta _ { D _ { t } } ( x )$ . Then, our discriminator $D _ { t } ( x )$ becomes equal to $C _ { D _ { t } } ( a _ { D _ { t } } ( x ) )$ . ",
|
| 249 |
+
"bbox": [
|
| 250 |
+
173,
|
| 251 |
+
198,
|
| 252 |
+
825,
|
| 253 |
+
297
|
| 254 |
+
],
|
| 255 |
+
"page_idx": 3
|
| 256 |
+
},
|
| 257 |
+
{
|
| 258 |
+
"type": "text",
|
| 259 |
+
"text": "2.2 LOSS FUNCTION ",
|
| 260 |
+
"text_level": 1,
|
| 261 |
+
"bbox": [
|
| 262 |
+
174,
|
| 263 |
+
313,
|
| 264 |
+
328,
|
| 265 |
+
328
|
| 266 |
+
],
|
| 267 |
+
"page_idx": 3
|
| 268 |
+
},
|
| 269 |
+
{
|
| 270 |
+
"type": "text",
|
| 271 |
+
"text": "The full objective of our model comprises four loss functions. Here, instead of using the vanilla GAN objective, we used the Least Squares GAN (Mao et al. (2017)) objective for stable training. ",
|
| 272 |
+
"bbox": [
|
| 273 |
+
173,
|
| 274 |
+
338,
|
| 275 |
+
823,
|
| 276 |
+
368
|
| 277 |
+
],
|
| 278 |
+
"page_idx": 3
|
| 279 |
+
},
|
| 280 |
+
{
|
| 281 |
+
"type": "text",
|
| 282 |
+
"text": "Adversarial loss An adversarial loss is employed to match the distribution of the translated images to the target image distribution: ",
|
| 283 |
+
"bbox": [
|
| 284 |
+
173,
|
| 285 |
+
375,
|
| 286 |
+
823,
|
| 287 |
+
404
|
| 288 |
+
],
|
| 289 |
+
"page_idx": 3
|
| 290 |
+
},
|
| 291 |
+
{
|
| 292 |
+
"type": "equation",
|
| 293 |
+
"img_path": "images/ab2e947c8748e93e6755e76d1eccb85c8e6671c2c87342e29c479b35b5f73a1d.jpg",
|
| 294 |
+
"text": "$$\nL _ { l s g a n } ^ { s t } = ( \\mathbb { E } _ { x \\sim X _ { t } } [ ( D _ { t } ( x ) ) ^ { 2 } ] + \\mathbb { E } _ { x \\sim X _ { s } } [ ( 1 - D _ { t } ( G _ { s t } ( x ) ) ) ^ { 2 } ] ) .\n$$",
|
| 295 |
+
"text_format": "latex",
|
| 296 |
+
"bbox": [
|
| 297 |
+
267,
|
| 298 |
+
428,
|
| 299 |
+
681,
|
| 300 |
+
446
|
| 301 |
+
],
|
| 302 |
+
"page_idx": 3
|
| 303 |
+
},
|
| 304 |
+
{
|
| 305 |
+
"type": "text",
|
| 306 |
+
"text": "Cycle loss To alleviate the mode collapse problem, we apply a cycle consistency constraint to the generator. Given an image $x \\in X _ { s }$ , after the sequential translations of $x$ from $X _ { s }$ to $X _ { t }$ and from $X _ { t }$ to $X _ { s }$ , the image should be successfully translated back to the original domain: ",
|
| 307 |
+
"bbox": [
|
| 308 |
+
174,
|
| 309 |
+
458,
|
| 310 |
+
825,
|
| 311 |
+
501
|
| 312 |
+
],
|
| 313 |
+
"page_idx": 3
|
| 314 |
+
},
|
| 315 |
+
{
|
| 316 |
+
"type": "equation",
|
| 317 |
+
"img_path": "images/09122ac7879d81eab54032f62c8c10d036b3ebf3f1aa7bc36290fc0297b5555e.jpg",
|
| 318 |
+
"text": "$$\nL _ { c y c l e } ^ { s t } = \\mathbb { E } _ { x \\sim X _ { s } } [ | x - G _ { t s } ( G _ { s t } ( x ) ) ) | _ { 1 } ] .\n$$",
|
| 319 |
+
"text_format": "latex",
|
| 320 |
+
"bbox": [
|
| 321 |
+
338,
|
| 322 |
+
526,
|
| 323 |
+
627,
|
| 324 |
+
546
|
| 325 |
+
],
|
| 326 |
+
"page_idx": 3
|
| 327 |
+
},
|
| 328 |
+
{
|
| 329 |
+
"type": "text",
|
| 330 |
+
"text": "Identity loss To ensure that the color distributions of input image and output image are similar, we apply an identity consistency constraint to the generator. Given an image $x \\in X _ { t }$ , after the translation of $x$ using $G _ { s t }$ , the image should not change. ",
|
| 331 |
+
"bbox": [
|
| 332 |
+
174,
|
| 333 |
+
556,
|
| 334 |
+
825,
|
| 335 |
+
599
|
| 336 |
+
],
|
| 337 |
+
"page_idx": 3
|
| 338 |
+
},
|
| 339 |
+
{
|
| 340 |
+
"type": "equation",
|
| 341 |
+
"img_path": "images/523bd79d4db9fda7671b11cdc17eaa3ca2a8e3163ede566e4707da3faf54c8ef.jpg",
|
| 342 |
+
"text": "$$\nL _ { i d e n t i t y } ^ { s t } = \\mathbb { E } _ { x \\sim X _ { t } } [ | x - G _ { s t } ( x ) | _ { 1 } ] .\n$$",
|
| 343 |
+
"text_format": "latex",
|
| 344 |
+
"bbox": [
|
| 345 |
+
357,
|
| 346 |
+
625,
|
| 347 |
+
607,
|
| 348 |
+
645
|
| 349 |
+
],
|
| 350 |
+
"page_idx": 3
|
| 351 |
+
},
|
| 352 |
+
{
|
| 353 |
+
"type": "text",
|
| 354 |
+
"text": "CAM loss By exploiting the information from the auxiliary classifiers $\\eta _ { s }$ and $\\eta _ { D _ { t } }$ , given an image $x \\in \\{ X _ { s } , \\tilde { X _ { t } } \\}$ . $G _ { s t }$ and $D _ { t }$ get to know where they need to improve or what makes the most difference between two domains in the current state: ",
|
| 355 |
+
"bbox": [
|
| 356 |
+
173,
|
| 357 |
+
655,
|
| 358 |
+
825,
|
| 359 |
+
698
|
| 360 |
+
],
|
| 361 |
+
"page_idx": 3
|
| 362 |
+
},
|
| 363 |
+
{
|
| 364 |
+
"type": "equation",
|
| 365 |
+
"img_path": "images/96aae6b717b7c524b02cc40bdee955643b960ac8480370464e99961cba2d0d48.jpg",
|
| 366 |
+
"text": "$$\nL _ { c a m } ^ { s t } = - ( \\mathbb { E } _ { x \\sim X _ { s } } [ l o g ( \\eta _ { s } ( x ) ) ] + \\mathbb { E } _ { x \\sim X _ { t } } [ l o g ( 1 - \\eta _ { s } ( x ) ) ] ) ,\n$$",
|
| 367 |
+
"text_format": "latex",
|
| 368 |
+
"bbox": [
|
| 369 |
+
277,
|
| 370 |
+
723,
|
| 371 |
+
669,
|
| 372 |
+
742
|
| 373 |
+
],
|
| 374 |
+
"page_idx": 3
|
| 375 |
+
},
|
| 376 |
+
{
|
| 377 |
+
"type": "equation",
|
| 378 |
+
"img_path": "images/54562474ae9cd2a248742abd3ac52054bc83d6ac0db5e7686d7b2dd0c79ca1e4.jpg",
|
| 379 |
+
"text": "$$\nL _ { c a m } ^ { D _ { t } } = \\mathbb { E } _ { x \\sim X _ { t } } [ ( \\eta _ { D _ { t } } ( x ) ) ^ { 2 } ] + \\mathbb { E } _ { x \\sim X _ { s } } [ ( 1 - \\eta _ { D _ { t } } ( G _ { s t } ( x ) ) ^ { 2 } ] .\n$$",
|
| 380 |
+
"text_format": "latex",
|
| 381 |
+
"bbox": [
|
| 382 |
+
272,
|
| 383 |
+
771,
|
| 384 |
+
676,
|
| 385 |
+
791
|
| 386 |
+
],
|
| 387 |
+
"page_idx": 3
|
| 388 |
+
},
|
| 389 |
+
{
|
| 390 |
+
"type": "text",
|
| 391 |
+
"text": "Full objective Finally, we jointly train the encoders, decoders, discriminators, and auxiliary classifiers to optimize the final objective: ",
|
| 392 |
+
"bbox": [
|
| 393 |
+
171,
|
| 394 |
+
803,
|
| 395 |
+
823,
|
| 396 |
+
832
|
| 397 |
+
],
|
| 398 |
+
"page_idx": 3
|
| 399 |
+
},
|
| 400 |
+
{
|
| 401 |
+
"type": "equation",
|
| 402 |
+
"img_path": "images/4cb465a2e98d6b02baf2a1ad5ba7ccf511e9993ce162ee47032e1d9e556e4ada.jpg",
|
| 403 |
+
"text": "$$\n\\operatorname* { m i n } _ { \\substack { G _ { s t } , G _ { t s } , \\eta _ { s } , \\eta _ { t } D _ { s } , D _ { t } , \\eta _ { D _ { s } } , \\eta _ { D _ { t } } } } \\lambda _ { 1 } L _ { l s g a n } + \\lambda _ { 2 } L _ { c y c l e } + \\lambda _ { 3 } L _ { i d e n t i t y } + \\lambda _ { 4 } L _ { c a m } ,\n$$",
|
| 404 |
+
"text_format": "latex",
|
| 405 |
+
"bbox": [
|
| 406 |
+
217,
|
| 407 |
+
854,
|
| 408 |
+
730,
|
| 409 |
+
881
|
| 410 |
+
],
|
| 411 |
+
"page_idx": 3
|
| 412 |
+
},
|
| 413 |
+
{
|
| 414 |
+
"type": "text",
|
| 415 |
+
"text": "where $\\lambda _ { 1 } = 1 , \\lambda _ { 2 } = 1 0 , \\lambda _ { 3 } = 1 0 , \\lambda _ { 4 } = 1 0 0 0$ . Here, ${ \\cal L } _ { l s g a n } = { \\cal L } _ { l s g a n } ^ { s t } + { \\cal L } _ { l s g a n } ^ { t s }$ and the other losses are defined in the similar way $\\scriptstyle \\sum _ { c y c l e }$ , $L _ { i d e n t i t y }$ , and $L _ { c a m }$ ) ",
|
| 416 |
+
"bbox": [
|
| 417 |
+
173,
|
| 418 |
+
892,
|
| 419 |
+
823,
|
| 420 |
+
926
|
| 421 |
+
],
|
| 422 |
+
"page_idx": 3
|
| 423 |
+
},
|
| 424 |
+
{
|
| 425 |
+
"type": "image",
|
| 426 |
+
"img_path": "images/4a446c07afd399a31af103992076b3f0d7f17be496178c66303f5c69f39a821f.jpg",
|
| 427 |
+
"image_caption": [
|
| 428 |
+
"Figure 2: Visualization of the attention maps and their effects shown in the ablation experiments: (a) Source images, (b) Attention map of the generator, (c-d) Local and global attention maps of the discriminator, respectively. (e) Our results with CAM, (f) Results without CAM. "
|
| 429 |
+
],
|
| 430 |
+
"image_footnote": [],
|
| 431 |
+
"bbox": [
|
| 432 |
+
294,
|
| 433 |
+
107,
|
| 434 |
+
704,
|
| 435 |
+
381
|
| 436 |
+
],
|
| 437 |
+
"page_idx": 4
|
| 438 |
+
},
|
| 439 |
+
{
|
| 440 |
+
"type": "text",
|
| 441 |
+
"text": "3 EXPERIMENTS ",
|
| 442 |
+
"text_level": 1,
|
| 443 |
+
"bbox": [
|
| 444 |
+
176,
|
| 445 |
+
469,
|
| 446 |
+
326,
|
| 447 |
+
486
|
| 448 |
+
],
|
| 449 |
+
"page_idx": 4
|
| 450 |
+
},
|
| 451 |
+
{
|
| 452 |
+
"type": "text",
|
| 453 |
+
"text": "3.1 BASELINE MODEL",
|
| 454 |
+
"text_level": 1,
|
| 455 |
+
"bbox": [
|
| 456 |
+
176,
|
| 457 |
+
502,
|
| 458 |
+
339,
|
| 459 |
+
516
|
| 460 |
+
],
|
| 461 |
+
"page_idx": 4
|
| 462 |
+
},
|
| 463 |
+
{
|
| 464 |
+
"type": "text",
|
| 465 |
+
"text": "We have compared our method with various models including CycleGAN (Zhu et al. (2017)), UNIT (Liu et al. (2017)), MUNIT (Huang et al. (2018)), DRIT (Lee et al. (2018)), AGGAN (Mejjati et al. (2018)), and CartoonGAN (Chen et al. (2018)). All the baseline methods are implemented using the author’s code. ",
|
| 466 |
+
"bbox": [
|
| 467 |
+
174,
|
| 468 |
+
529,
|
| 469 |
+
825,
|
| 470 |
+
584
|
| 471 |
+
],
|
| 472 |
+
"page_idx": 4
|
| 473 |
+
},
|
| 474 |
+
{
|
| 475 |
+
"type": "text",
|
| 476 |
+
"text": "3.2 DATASET ",
|
| 477 |
+
"text_level": 1,
|
| 478 |
+
"bbox": [
|
| 479 |
+
176,
|
| 480 |
+
602,
|
| 481 |
+
279,
|
| 482 |
+
617
|
| 483 |
+
],
|
| 484 |
+
"page_idx": 4
|
| 485 |
+
},
|
| 486 |
+
{
|
| 487 |
+
"type": "text",
|
| 488 |
+
"text": "We have evaluated the performance of each method with five unpaired image datasets including four representative image translation datasets and a newly created dataset consisting of real photos and animation artworks, i.e., selfie2anime. All images are resized to $2 5 6 \\times 2 5 6$ for training. See Appendix C for each dataset for our experiments. ",
|
| 489 |
+
"bbox": [
|
| 490 |
+
174,
|
| 491 |
+
628,
|
| 492 |
+
825,
|
| 493 |
+
685
|
| 494 |
+
],
|
| 495 |
+
"page_idx": 4
|
| 496 |
+
},
|
| 497 |
+
{
|
| 498 |
+
"type": "text",
|
| 499 |
+
"text": "3.3 EXPERIMENT RESULTS ",
|
| 500 |
+
"text_level": 1,
|
| 501 |
+
"bbox": [
|
| 502 |
+
176,
|
| 503 |
+
703,
|
| 504 |
+
372,
|
| 505 |
+
717
|
| 506 |
+
],
|
| 507 |
+
"page_idx": 4
|
| 508 |
+
},
|
| 509 |
+
{
|
| 510 |
+
"type": "text",
|
| 511 |
+
"text": "We first analyze the effects of attention module and AdaLIN in the proposed model. We then compare the performance of our model against the other unsupervised image translation models listed in the previous section. To evaluate, the visual quality of translated images, we have conducted a user study. Users are asked to select the best image among the images generated from five different methods. More examples of the results comparing our model with other models are included in the supplementary materials. ",
|
| 512 |
+
"bbox": [
|
| 513 |
+
174,
|
| 514 |
+
728,
|
| 515 |
+
825,
|
| 516 |
+
813
|
| 517 |
+
],
|
| 518 |
+
"page_idx": 4
|
| 519 |
+
},
|
| 520 |
+
{
|
| 521 |
+
"type": "text",
|
| 522 |
+
"text": "3.3.1 CAM ANALYSIS ",
|
| 523 |
+
"text_level": 1,
|
| 524 |
+
"bbox": [
|
| 525 |
+
176,
|
| 526 |
+
829,
|
| 527 |
+
341,
|
| 528 |
+
843
|
| 529 |
+
],
|
| 530 |
+
"page_idx": 4
|
| 531 |
+
},
|
| 532 |
+
{
|
| 533 |
+
"type": "text",
|
| 534 |
+
"text": "First, we conduct an ablation study to confirm the benefit from the attention modules used in both generator and discriminator. As shown in Fig 2 (b), the attention feature map helps the generator to focus on the source image regions that are more discriminative from the target domain, such as eyes and mouth. Meanwhile, we can see the regions where the discriminator concentrates its attention to determine whether the target image is real or fake by visualizing local and global attention maps of the discriminator as shown in Fig 2 (c) and (d), respectively. The generator can fine-tune the area where the discriminator focuses on with those attention maps. Note that we incorporate both global and local attention maps from two discriminators having different size of receptive field. Those maps can help the generator to capture the global structure (e.g., face area and near of eyes) as well as the local regions. With this information some regions are translated with more care. The results with the attention module shown in Fig 2 (e) verify the advantageous effect of exploiting attention feature map in an image translation task. On the other hand, one can see that the eyes are misaligned, or the translation is not done at all in the results without using attention module as shown in Fig 2 (f). ",
|
| 535 |
+
"bbox": [
|
| 536 |
+
174,
|
| 537 |
+
853,
|
| 538 |
+
825,
|
| 539 |
+
924
|
| 540 |
+
],
|
| 541 |
+
"page_idx": 4
|
| 542 |
+
},
|
| 543 |
+
{
|
| 544 |
+
"type": "image",
|
| 545 |
+
"img_path": "images/cdaa650872e260b8e460a8fec856534c2bf23893a8a4ea39921666eaddad0b1e.jpg",
|
| 546 |
+
"image_caption": [
|
| 547 |
+
"Figure 3: Comparison of the results using each normalization function: (a) Source images, (b) Our results, (c) Results only using IN in decoder with CAM, (d) Results only using LN in decoder with CAM, (e) Results only using AdaIN in decoder with CAM, (f) Results only using GN in decoder with CAM. "
|
| 548 |
+
],
|
| 549 |
+
"image_footnote": [],
|
| 550 |
+
"bbox": [
|
| 551 |
+
297,
|
| 552 |
+
107,
|
| 553 |
+
699,
|
| 554 |
+
381
|
| 555 |
+
],
|
| 556 |
+
"page_idx": 5
|
| 557 |
+
},
|
| 558 |
+
{
|
| 559 |
+
"type": "text",
|
| 560 |
+
"text": "",
|
| 561 |
+
"bbox": [
|
| 562 |
+
174,
|
| 563 |
+
481,
|
| 564 |
+
825,
|
| 565 |
+
607
|
| 566 |
+
],
|
| 567 |
+
"page_idx": 5
|
| 568 |
+
},
|
| 569 |
+
{
|
| 570 |
+
"type": "text",
|
| 571 |
+
"text": "3.3.2 ADALIN ANALYSIS ",
|
| 572 |
+
"text_level": 1,
|
| 573 |
+
"bbox": [
|
| 574 |
+
176,
|
| 575 |
+
622,
|
| 576 |
+
362,
|
| 577 |
+
636
|
| 578 |
+
],
|
| 579 |
+
"page_idx": 5
|
| 580 |
+
},
|
| 581 |
+
{
|
| 582 |
+
"type": "text",
|
| 583 |
+
"text": "As described in Appendix B, we have applied the AdaLIN only to the decoder of the generator. The role of the residual blocks in the decoder is to embed features, and the role of the up-sampling convolution blocks in the decoder is to generate target domain images from the embedded features. If the learned value of the gate parameter $\\rho$ is closer to 1, it means that the corresponding layers rely more on IN than LN. Likewise, if the learned value of $\\rho$ is closer to 0, it means that the corresponding layers rely more on LN than IN. As shown in Fig 3 (c), in the case of using only IN in the decoder, the features of the source domain (e.g., earrings and shades around cheekbones) are well preserved due to channel-wise normalized feature statistics used in the residual blocks. However, the amount of translation to target domain style is somewhat insufficient since the global style cannot be captured by IN of the up-sampling convolution blocks. On the other hand, As shown in Fig 3 (d), if we use only LN in the decoder, target domain style can be transferred sufficiently by virtue of layerwise normalized feature statistics used in the up-sampling convolution. But the features of the source domain image are less preserved by using LN in the residual blocks. This analysis of two extreme cases tells us that it is beneficial to rely more on IN than LN in the feature representation layers to preserve semantic characteristics of source domain, and the opposite is true for the upsampling layers that actually generate images from the feature embedding. Therefore, the proposed AdaLIN which adjusts the ratio of IN and LN in the decoder according to source and target domain distributions is more preferable in unsupervised image-to-image translation tasks. Additionally, the Fig 3 (e), (f) are the results of using the AdaIN and Group Normalization (GN) (Wu & He (2018)) respectively, and our methods are showing better results compared to these. ",
|
| 584 |
+
"bbox": [
|
| 585 |
+
173,
|
| 586 |
+
645,
|
| 587 |
+
825,
|
| 588 |
+
924
|
| 589 |
+
],
|
| 590 |
+
"page_idx": 5
|
| 591 |
+
},
|
| 592 |
+
{
|
| 593 |
+
"type": "image",
|
| 594 |
+
"img_path": "images/985fda7517ffdc4f8e41ba2928f5b71389d4989fdb727ab6711f214a1db32f7f.jpg",
|
| 595 |
+
"image_caption": [
|
| 596 |
+
"Figure 4: Visual comparisons on the five datasets. From top to bottom: selfie2anime, horse2zebra, cat2dog, photo2portrait, and photo2vangogh. (a)Source images, (b)U-GAT-IT, (c)CycleGAN, (d)UNIT, (e)MUNIT, (f)DRIT, (g)AGGAN "
|
| 597 |
+
],
|
| 598 |
+
"image_footnote": [],
|
| 599 |
+
"bbox": [
|
| 600 |
+
261,
|
| 601 |
+
106,
|
| 602 |
+
735,
|
| 603 |
+
382
|
| 604 |
+
],
|
| 605 |
+
"page_idx": 6
|
| 606 |
+
},
|
| 607 |
+
{
|
| 608 |
+
"type": "table",
|
| 609 |
+
"img_path": "images/8fa993e5329752b0f27eec37613256183a0193c6e8819383263bc24960e77fe7.jpg",
|
| 610 |
+
"table_caption": [
|
| 611 |
+
"Table 1: Kernel Inception Distance $\\times 1 0 0 { \\pm } \\mathrm { s t d } . \\times 1 0 0$ for ablation our model. Lower is better. There are some notations; GN: Group Normalization, G CAM: CAM of generator, D CAM: CAM of discriminator "
|
| 612 |
+
],
|
| 613 |
+
"table_footnote": [],
|
| 614 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>selfie2anime</td><td rowspan=1 colspan=1>anime2selfie</td></tr><tr><td rowspan=1 colspan=1>U-GAT-IT</td><td rowspan=1 colspan=1>11.61 ± 0.57</td><td rowspan=1 colspan=1>11.52 ± 0.57</td></tr><tr><td rowspan=1 colspan=1>U-GAT-IT w/ IN</td><td rowspan=1 colspan=1>13.64±0.76</td><td rowspan=1 colspan=1>13.58 ± 0.8</td></tr><tr><td rowspan=1 colspan=1>U-GAT-IT w/ LN</td><td rowspan=1 colspan=1>12.39±0.61</td><td rowspan=1 colspan=1>13.17 ± 0.8</td></tr><tr><td rowspan=1 colspan=1>U-GAT-IT w/ AdaIN</td><td rowspan=1 colspan=1>12.29士0.78</td><td rowspan=1 colspan=1>11.81 ± 0.77</td></tr><tr><td rowspan=1 colspan=1>U-GAT-IT w/ GN</td><td rowspan=1 colspan=1>12.76士0.64</td><td rowspan=1 colspan=1>12.30 ± 0.77</td></tr><tr><td rowspan=1 colspan=1>U-GAT-IT w/oCAM</td><td rowspan=1 colspan=1>12.85士0.82</td><td rowspan=1 colspan=1>14.06 ± 0.75</td></tr><tr><td rowspan=1 colspan=1>U-GAT-ITw/oG_CAM</td><td rowspan=1 colspan=1>12.33士0.68</td><td rowspan=1 colspan=1>13.86 ± 0.75</td></tr><tr><td rowspan=1 colspan=1>U-GAT-ITw/oD_CAM</td><td rowspan=1 colspan=1>12.49±0.74</td><td rowspan=1 colspan=1>13.33 ± 0.89</td></tr></table>",
|
| 615 |
+
"bbox": [
|
| 616 |
+
302,
|
| 617 |
+
517,
|
| 618 |
+
694,
|
| 619 |
+
651
|
| 620 |
+
],
|
| 621 |
+
"page_idx": 6
|
| 622 |
+
},
|
| 623 |
+
{
|
| 624 |
+
"type": "text",
|
| 625 |
+
"text": "Also, as shown in Table 1, we demonstrate the performance of the attention module and AdaLIN in the selfie2anime dataset through an ablation study using Kernel Inception Distance (KID) (Binkowski et al. (2018)) ´ . Our model achieves the lowest KID values. Even if the attention module and AdaLIN are used separately, we can see that our models perform better than the others. However, when used together, the performance is even better. ",
|
| 626 |
+
"bbox": [
|
| 627 |
+
174,
|
| 628 |
+
685,
|
| 629 |
+
825,
|
| 630 |
+
756
|
| 631 |
+
],
|
| 632 |
+
"page_idx": 6
|
| 633 |
+
},
|
| 634 |
+
{
|
| 635 |
+
"type": "text",
|
| 636 |
+
"text": "3.3.3 QUALITATIVE EVALUATION ",
|
| 637 |
+
"text_level": 1,
|
| 638 |
+
"bbox": [
|
| 639 |
+
176,
|
| 640 |
+
773,
|
| 641 |
+
416,
|
| 642 |
+
787
|
| 643 |
+
],
|
| 644 |
+
"page_idx": 6
|
| 645 |
+
},
|
| 646 |
+
{
|
| 647 |
+
"type": "text",
|
| 648 |
+
"text": "For qualitative evaluation, we have also conducted a perceptual study. 135 participants are shown translated results from different methods including the proposed method with source image, and asked to select the best translated image to target domain. We inform only the name of target domain, i.e., animation, dog, and zebra to the participants. But, some example images of target domain are provided for the portrait and Van Gogh datasets as minimum information to ensure proper judgments. Table 2 shows that the proposed method achieved significantly higher score except for photo2vangogh but comparable in human perceptual study compared to other methods. In Fig 4, we present the image translation results from each method for performance comparisons. U-GAT-IT can generate undistorted image by focusing more on the distinct regions between source and target domain by exploiting the attention modules. Note that the regions around heads of two zebras or eyes of dog are distorted in the results from CycleGAN. Moreover, translated results using U-GAT-IT are visually superior to other methods while preserving semantic features of source domain. It is worth noting that the results from MUNIT and DRIT are much dissimilar to the source images since they generate images with random style codes for diversity. Furthermore, it should be emphasized that U-GAT-IT have applied with the same network architecture and hyper-parameters for all of the five different datasets, while the other algorithms are trained with preset networks or hyper-parameters. Through the results of user study, we show that the combination of our attention module and AdaLIN makes our model more flexible. ",
|
| 649 |
+
"bbox": [
|
| 650 |
+
174,
|
| 651 |
+
797,
|
| 652 |
+
825,
|
| 653 |
+
924
|
| 654 |
+
],
|
| 655 |
+
"page_idx": 6
|
| 656 |
+
},
|
| 657 |
+
{
|
| 658 |
+
"type": "table",
|
| 659 |
+
"img_path": "images/46db74f71408eb112956d593743cbb6247f65e2b3f14de9855455bc3e4be44d7.jpg",
|
| 660 |
+
"table_caption": [
|
| 661 |
+
"Table 2: Preference score on translated images by user study. "
|
| 662 |
+
],
|
| 663 |
+
"table_footnote": [],
|
| 664 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>selfie2anime</td><td rowspan=1 colspan=1>horse2zebra</td><td rowspan=1 colspan=1>cat2dog</td><td rowspan=1 colspan=1>photo2portrait</td><td rowspan=1 colspan=1>photo2vangogh</td></tr><tr><td rowspan=1 colspan=1>U-GAT-IT</td><td rowspan=1 colspan=1>73.15</td><td rowspan=1 colspan=1>73.56</td><td rowspan=1 colspan=1>58.22</td><td rowspan=1 colspan=1>30.59</td><td rowspan=1 colspan=1>48.96</td></tr><tr><td rowspan=1 colspan=1>CycleGAN</td><td rowspan=1 colspan=1>20.07</td><td rowspan=1 colspan=1>23.07</td><td rowspan=1 colspan=1>6.19</td><td rowspan=1 colspan=1>26.59</td><td rowspan=1 colspan=1>27.33</td></tr><tr><td rowspan=1 colspan=1>UNIT</td><td rowspan=1 colspan=1>1.48</td><td rowspan=1 colspan=1>0.85</td><td rowspan=1 colspan=1>18.63</td><td rowspan=1 colspan=1>32.11</td><td rowspan=1 colspan=1>11.93</td></tr><tr><td rowspan=1 colspan=1>MUNIT</td><td rowspan=1 colspan=1>3.41</td><td rowspan=1 colspan=1>1.04</td><td rowspan=1 colspan=1>14.48</td><td rowspan=1 colspan=1>8.22</td><td rowspan=1 colspan=1>2.07</td></tr><tr><td rowspan=1 colspan=1>DRIT</td><td rowspan=1 colspan=1>1.89</td><td rowspan=1 colspan=1>1.48</td><td rowspan=1 colspan=1>2.48</td><td rowspan=1 colspan=1>2.48</td><td rowspan=1 colspan=1>9.70</td></tr></table>",
|
| 665 |
+
"bbox": [
|
| 666 |
+
196,
|
| 667 |
+
132,
|
| 668 |
+
800,
|
| 669 |
+
224
|
| 670 |
+
],
|
| 671 |
+
"page_idx": 7
|
| 672 |
+
},
|
| 673 |
+
{
|
| 674 |
+
"type": "table",
|
| 675 |
+
"img_path": "images/c2b53de245b2969a58e7ff74303db0c42b9f5a0c2ab67d7d9cf28a9a780222da.jpg",
|
| 676 |
+
"table_caption": [
|
| 677 |
+
"Table 3: Kernel Inception Distance $\\times 1 0 0 \\pm$ std. $\\times 1 0 0$ for difference image translation mode. Lower is better. "
|
| 678 |
+
],
|
| 679 |
+
"table_footnote": [],
|
| 680 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>selfie2anime</td><td rowspan=1 colspan=1>horse2zebra</td><td rowspan=1 colspan=1>cat2dog</td><td rowspan=1 colspan=1>photo2portrait</td><td rowspan=1 colspan=1>photo2vangogh</td></tr><tr><td rowspan=1 colspan=1>U-GAT-IT</td><td rowspan=1 colspan=1>11.61 ± 0.57</td><td rowspan=1 colspan=1>7.06 ± 0.8</td><td rowspan=1 colspan=1>7.07 ± 0.65</td><td rowspan=1 colspan=1>1.79 ± 0.34</td><td rowspan=1 colspan=1>4.28 ± 0.33</td></tr><tr><td rowspan=1 colspan=1>CycleGAN</td><td rowspan=1 colspan=1>13.08 ± 0.49</td><td rowspan=1 colspan=1>8.05 ± 0.72</td><td rowspan=1 colspan=1>8.92 ± 0.69</td><td rowspan=1 colspan=1>1.84 ± 0.34</td><td rowspan=1 colspan=1>5.46± 0.33</td></tr><tr><td rowspan=1 colspan=1>UNIT</td><td rowspan=1 colspan=1>14.71 ± 0.59</td><td rowspan=1 colspan=1>10.44 ± 0.67</td><td rowspan=1 colspan=1>8.15 ± 0.48</td><td rowspan=1 colspan=1>1.20 ± 0.31</td><td rowspan=1 colspan=1>4.26 ± 0.29</td></tr><tr><td rowspan=1 colspan=1>MUNIT</td><td rowspan=1 colspan=1>13.85 ± 0.41</td><td rowspan=1 colspan=1>11.41 ± 0.83</td><td rowspan=1 colspan=1>10.13 ± 0.27</td><td rowspan=1 colspan=1>4.75 ± 0.52</td><td rowspan=1 colspan=1>13.08 ± 0.34</td></tr><tr><td rowspan=1 colspan=1>DRIT</td><td rowspan=1 colspan=1>15.08 ± 0.62</td><td rowspan=1 colspan=1>9.79 ± 0.62</td><td rowspan=1 colspan=1>10.92 ± 0.33</td><td rowspan=1 colspan=1>5.85 ± 0.54</td><td rowspan=1 colspan=1>12.65 ± 0.35</td></tr><tr><td rowspan=1 colspan=1>AGGAN</td><td rowspan=1 colspan=1>14.63 ± 0.55</td><td rowspan=1 colspan=1>7.58 ± 0.71</td><td rowspan=1 colspan=1>9.84± 0.79</td><td rowspan=1 colspan=1>2.33± 0.36</td><td rowspan=1 colspan=1>6.95± 0.33</td></tr><tr><td rowspan=1 colspan=1>CartoonGAN</td><td rowspan=1 colspan=1>15.85 ± 0.69</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><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>anime2selfie</td><td rowspan=1 colspan=1>zebra2horse</td><td rowspan=1 colspan=1>dog2cat</td><td rowspan=1 colspan=1>portrait2photo</td><td rowspan=1 colspan=1>vangogh2photo</td></tr><tr><td rowspan=1 colspan=1>U-GAT-IT</td><td rowspan=1 colspan=1>11.52 ± 0.57</td><td rowspan=1 colspan=1>7.47 ± 0.71</td><td rowspan=1 colspan=1>8.15 ± 0.66</td><td rowspan=1 colspan=1>1.69 ± 0.53</td><td rowspan=1 colspan=1>5.61 ± 0.32</td></tr><tr><td rowspan=1 colspan=1>CycleGAN</td><td rowspan=1 colspan=1>11.84 ± 0.74</td><td rowspan=1 colspan=1>8.0 ± 0.66</td><td rowspan=1 colspan=1>9.94 ± 0.36</td><td rowspan=1 colspan=1>1.82 ± 0.36</td><td rowspan=1 colspan=1>4.68 ± 0.36</td></tr><tr><td rowspan=1 colspan=1>UNIT</td><td rowspan=1 colspan=1>26.32 ± 0.92</td><td rowspan=1 colspan=1>14.93 ± 0.75</td><td rowspan=1 colspan=1>9.81 ± 0.34</td><td rowspan=1 colspan=1>1.42 ± 0.24</td><td rowspan=1 colspan=1>9.72 ± 0.33</td></tr><tr><td rowspan=1 colspan=1>MUNIT</td><td rowspan=1 colspan=1>13.94 ± 0.72</td><td rowspan=1 colspan=1>16.47 ± 1.04</td><td rowspan=1 colspan=1>10.39 ± 0.25</td><td rowspan=1 colspan=1>3.30 ± 0.47</td><td rowspan=1 colspan=1>9.53 ± 0.35</td></tr><tr><td rowspan=1 colspan=1>DRIT</td><td rowspan=1 colspan=1>14.85 ± 0.60</td><td rowspan=1 colspan=1>10.98 ± 0.55</td><td rowspan=1 colspan=1>10.86 ± 0.24</td><td rowspan=1 colspan=1>4.76 ± 0.72</td><td rowspan=1 colspan=1>7.72 ± 0.34</td></tr><tr><td rowspan=1 colspan=1>AGGAN</td><td rowspan=1 colspan=1>12.72 ± 1.03</td><td rowspan=1 colspan=1>8.80 ± 0.66</td><td rowspan=1 colspan=1>9.45 ± 0.64</td><td rowspan=1 colspan=1>2.19 ± 0.40</td><td rowspan=1 colspan=1>5.85 ± 0.31</td></tr></table>",
|
| 681 |
+
"bbox": [
|
| 682 |
+
173,
|
| 683 |
+
301,
|
| 684 |
+
838,
|
| 685 |
+
526
|
| 686 |
+
],
|
| 687 |
+
"page_idx": 7
|
| 688 |
+
},
|
| 689 |
+
{
|
| 690 |
+
"type": "text",
|
| 691 |
+
"text": "",
|
| 692 |
+
"bbox": [
|
| 693 |
+
174,
|
| 694 |
+
560,
|
| 695 |
+
825,
|
| 696 |
+
686
|
| 697 |
+
],
|
| 698 |
+
"page_idx": 7
|
| 699 |
+
},
|
| 700 |
+
{
|
| 701 |
+
"type": "text",
|
| 702 |
+
"text": "3.3.4 QUANTITATIVE EVALUATION ",
|
| 703 |
+
"text_level": 1,
|
| 704 |
+
"bbox": [
|
| 705 |
+
176,
|
| 706 |
+
704,
|
| 707 |
+
428,
|
| 708 |
+
718
|
| 709 |
+
],
|
| 710 |
+
"page_idx": 7
|
| 711 |
+
},
|
| 712 |
+
{
|
| 713 |
+
"type": "text",
|
| 714 |
+
"text": "For quantitative evaluation, we use the recently proposed KID, which computes the squared Maximum Mean Discrepancy between the feature representations of real and generated images. The feature representations are extracted from the Inception network (Szegedy et al. (2016)). In contrast to the Frechet Inception Distance ´ (Heusel et al. (2017)), KID has an unbiased estimator, which makes it more reliable, especially when there are fewer test images than the dimensionality of the inception features. The lower KID indicates that the more shared visual similarities between real and generated images (Mejjati et al. (2018)). Therefore, if well translated, the KID will have a small value in several datasets. Table 3 shows that the proposed method achieved the lowest KID scores except for the style transfer tasks like photo2vangogh and photo2portrait. However, there is no big difference from the lowest score. Also, unlike UNIT and MUNIT, we can see that the source target, target source translations are both stable. U-GAT-IT shows even lower KID than the recent attention-based method, AGGAN. AGGAN yields poor performance for the transformation with shape change such as dog2cat and anime2selfie unlike the U-GAT-IT, the attention module of which focuses on distinguishing not between background and foreground but differences between two domains. CartoonGAN, as shown in the supplementary materials, has only changed the overall color of the image to an animated style, but compared to selfie, the eye, which is the biggest characteristic of animation, has not changed at all. Therefore, CartoonGAN has the higher KID. ",
|
| 715 |
+
"bbox": [
|
| 716 |
+
174,
|
| 717 |
+
729,
|
| 718 |
+
825,
|
| 719 |
+
924
|
| 720 |
+
],
|
| 721 |
+
"page_idx": 7
|
| 722 |
+
},
|
| 723 |
+
{
|
| 724 |
+
"type": "text",
|
| 725 |
+
"text": "",
|
| 726 |
+
"bbox": [
|
| 727 |
+
174,
|
| 728 |
+
103,
|
| 729 |
+
823,
|
| 730 |
+
146
|
| 731 |
+
],
|
| 732 |
+
"page_idx": 8
|
| 733 |
+
},
|
| 734 |
+
{
|
| 735 |
+
"type": "text",
|
| 736 |
+
"text": "4 CONCLUSIONS ",
|
| 737 |
+
"text_level": 1,
|
| 738 |
+
"bbox": [
|
| 739 |
+
176,
|
| 740 |
+
167,
|
| 741 |
+
328,
|
| 742 |
+
183
|
| 743 |
+
],
|
| 744 |
+
"page_idx": 8
|
| 745 |
+
},
|
| 746 |
+
{
|
| 747 |
+
"type": "text",
|
| 748 |
+
"text": "In this paper, we have proposed unsupervised image-to-image translation (U-GAT-IT), with the attention module and AdaLIN which can produce more visually pleasing results in various datasets with a fixed network architecture and hyper-parameter. Detailed analysis of various experimental results supports our assumption that attention maps obtained by an auxiliary classifier can guide generator to focus more on distinct regions between source and target domain. In addition, we have found that the Adaptive Layer-Instance Normalization (AdaLIN) is essential for translating various datasets that contains different amount of geometry and style changes. Through experiments, we have shown that the superiority of the proposed method compared to the existing state-of-the-art GAN-based models for unsupervised image-to-image translation tasks. ",
|
| 749 |
+
"bbox": [
|
| 750 |
+
174,
|
| 751 |
+
199,
|
| 752 |
+
825,
|
| 753 |
+
324
|
| 754 |
+
],
|
| 755 |
+
"page_idx": 8
|
| 756 |
+
},
|
| 757 |
+
{
|
| 758 |
+
"type": "text",
|
| 759 |
+
"text": "REFERENCES ",
|
| 760 |
+
"text_level": 1,
|
| 761 |
+
"bbox": [
|
| 762 |
+
176,
|
| 763 |
+
347,
|
| 764 |
+
285,
|
| 765 |
+
362
|
| 766 |
+
],
|
| 767 |
+
"page_idx": 8
|
| 768 |
+
},
|
| 769 |
+
{
|
| 770 |
+
"type": "text",
|
| 771 |
+
"text": "Asha Anoosheh, Eirikur Agustsson, Radu Timofte, and Luc Van Gool. Combogan: Unrestrained scalability for image domain translation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pp. 783–790, 2018. ",
|
| 772 |
+
"bbox": [
|
| 773 |
+
174,
|
| 774 |
+
371,
|
| 775 |
+
823,
|
| 776 |
+
414
|
| 777 |
+
],
|
| 778 |
+
"page_idx": 8
|
| 779 |
+
},
|
| 780 |
+
{
|
| 781 |
+
"type": "text",
|
| 782 |
+
"text": "Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein generative adversarial networks. ´ In International Conference on Machine Learning, pp. 214–223, 2017. ",
|
| 783 |
+
"bbox": [
|
| 784 |
+
174,
|
| 785 |
+
424,
|
| 786 |
+
821,
|
| 787 |
+
454
|
| 788 |
+
],
|
| 789 |
+
"page_idx": 8
|
| 790 |
+
},
|
| 791 |
+
{
|
| 792 |
+
"type": "text",
|
| 793 |
+
"text": "Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. ",
|
| 794 |
+
"bbox": [
|
| 795 |
+
171,
|
| 796 |
+
464,
|
| 797 |
+
823,
|
| 798 |
+
493
|
| 799 |
+
],
|
| 800 |
+
"page_idx": 8
|
| 801 |
+
},
|
| 802 |
+
{
|
| 803 |
+
"type": "text",
|
| 804 |
+
"text": "David Berthelot, Tom Schumm, and Luke Metz. Began: Boundary equilibrium generative adversarial networks. arXiv preprint arXiv:1703.10717, 2017. ",
|
| 805 |
+
"bbox": [
|
| 806 |
+
171,
|
| 807 |
+
505,
|
| 808 |
+
823,
|
| 809 |
+
534
|
| 810 |
+
],
|
| 811 |
+
"page_idx": 8
|
| 812 |
+
},
|
| 813 |
+
{
|
| 814 |
+
"type": "text",
|
| 815 |
+
"text": "Mikołaj Binkowski, Dougal J. Sutherland, Michael Arbel, and Arthur Gretton. Demystifying ´ MMD GANs. In International Conference on Learning Representations, 2018. URL https: //openreview.net/forum?id $=$ r1lUOzWCW. ",
|
| 816 |
+
"bbox": [
|
| 817 |
+
173,
|
| 818 |
+
544,
|
| 819 |
+
821,
|
| 820 |
+
588
|
| 821 |
+
],
|
| 822 |
+
"page_idx": 8
|
| 823 |
+
},
|
| 824 |
+
{
|
| 825 |
+
"type": "text",
|
| 826 |
+
"text": "Yang Chen, Yu-Kun Lai, and Yong-Jin Liu. Cartoongan: Generative adversarial networks for photo cartoonization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 9465–9474, 2018. ",
|
| 827 |
+
"bbox": [
|
| 828 |
+
174,
|
| 829 |
+
598,
|
| 830 |
+
823,
|
| 831 |
+
641
|
| 832 |
+
],
|
| 833 |
+
"page_idx": 8
|
| 834 |
+
},
|
| 835 |
+
{
|
| 836 |
+
"type": "text",
|
| 837 |
+
"text": "Yunjey Choi, Minje Choi, Munyoung Kim, Jung-Woo Ha, Sunghun Kim, and Jaegul Choo. Stargan: Unified generative adversarial networks for multi-domain image-to-image translation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 8789– 8797, 2018. ",
|
| 838 |
+
"bbox": [
|
| 839 |
+
173,
|
| 840 |
+
651,
|
| 841 |
+
825,
|
| 842 |
+
708
|
| 843 |
+
],
|
| 844 |
+
"page_idx": 8
|
| 845 |
+
},
|
| 846 |
+
{
|
| 847 |
+
"type": "text",
|
| 848 |
+
"text": "Chao Dong, Chen Change Loy, Kaiming He, and Xiaoou Tang. Image super-resolution using deep convolutional networks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 38(2): 295–307, 2016. ",
|
| 849 |
+
"bbox": [
|
| 850 |
+
173,
|
| 851 |
+
719,
|
| 852 |
+
823,
|
| 853 |
+
762
|
| 854 |
+
],
|
| 855 |
+
"page_idx": 8
|
| 856 |
+
},
|
| 857 |
+
{
|
| 858 |
+
"type": "text",
|
| 859 |
+
"text": "Vincent Dumoulin, Jonathon Shlens, and Manjunath Kudlur. A learned representation for artistic style. In International Conference on Learning Representations, 2017. URL https: //openreview.net/forum?id $=$ BJO-BuT1g. ",
|
| 860 |
+
"bbox": [
|
| 861 |
+
174,
|
| 862 |
+
773,
|
| 863 |
+
821,
|
| 864 |
+
816
|
| 865 |
+
],
|
| 866 |
+
"page_idx": 8
|
| 867 |
+
},
|
| 868 |
+
{
|
| 869 |
+
"type": "text",
|
| 870 |
+
"text": "Leon A Gatys, Alexander S Ecker, and Matthias Bethge. Image style transfer using convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2414–2423, 2016. ",
|
| 871 |
+
"bbox": [
|
| 872 |
+
173,
|
| 873 |
+
827,
|
| 874 |
+
821,
|
| 875 |
+
869
|
| 876 |
+
],
|
| 877 |
+
"page_idx": 8
|
| 878 |
+
},
|
| 879 |
+
{
|
| 880 |
+
"type": "text",
|
| 881 |
+
"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. ",
|
| 882 |
+
"bbox": [
|
| 883 |
+
171,
|
| 884 |
+
881,
|
| 885 |
+
821,
|
| 886 |
+
924
|
| 887 |
+
],
|
| 888 |
+
"page_idx": 8
|
| 889 |
+
},
|
| 890 |
+
{
|
| 891 |
+
"type": "text",
|
| 892 |
+
"text": "Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In Advances in Neural Information Processing Systems, pp. 6626–6637, 2017. ",
|
| 893 |
+
"bbox": [
|
| 894 |
+
176,
|
| 895 |
+
103,
|
| 896 |
+
823,
|
| 897 |
+
146
|
| 898 |
+
],
|
| 899 |
+
"page_idx": 9
|
| 900 |
+
},
|
| 901 |
+
{
|
| 902 |
+
"type": "text",
|
| 903 |
+
"text": "Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1501– 1510, 2017. ",
|
| 904 |
+
"bbox": [
|
| 905 |
+
174,
|
| 906 |
+
156,
|
| 907 |
+
825,
|
| 908 |
+
199
|
| 909 |
+
],
|
| 910 |
+
"page_idx": 9
|
| 911 |
+
},
|
| 912 |
+
{
|
| 913 |
+
"type": "text",
|
| 914 |
+
"text": "Xun Huang, Ming-Yu Liu, Serge Belongie, and Jan Kautz. Multimodal unsupervised image-toimage translation. In Proceedings of the European Conference on Computer Vision, pp. 172–189, 2018. ",
|
| 915 |
+
"bbox": [
|
| 916 |
+
173,
|
| 917 |
+
208,
|
| 918 |
+
825,
|
| 919 |
+
251
|
| 920 |
+
],
|
| 921 |
+
"page_idx": 9
|
| 922 |
+
},
|
| 923 |
+
{
|
| 924 |
+
"type": "text",
|
| 925 |
+
"text": "Satoshi Iizuka, Edgar Simo-Serra, and Hiroshi Ishikawa. Globally and locally consistent image completion. ACM Transactions on Graphics, 36(4):107, 2017. ",
|
| 926 |
+
"bbox": [
|
| 927 |
+
173,
|
| 928 |
+
261,
|
| 929 |
+
823,
|
| 930 |
+
291
|
| 931 |
+
],
|
| 932 |
+
"page_idx": 9
|
| 933 |
+
},
|
| 934 |
+
{
|
| 935 |
+
"type": "text",
|
| 936 |
+
"text": "Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1125–1134, 2017. ",
|
| 937 |
+
"bbox": [
|
| 938 |
+
174,
|
| 939 |
+
300,
|
| 940 |
+
823,
|
| 941 |
+
344
|
| 942 |
+
],
|
| 943 |
+
"page_idx": 9
|
| 944 |
+
},
|
| 945 |
+
{
|
| 946 |
+
"type": "text",
|
| 947 |
+
"text": "Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen. Progressive growing of gans for improved quality, stability, and variation. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id $=$ Hk99zCeAb. ",
|
| 948 |
+
"bbox": [
|
| 949 |
+
176,
|
| 950 |
+
353,
|
| 951 |
+
823,
|
| 952 |
+
396
|
| 953 |
+
],
|
| 954 |
+
"page_idx": 9
|
| 955 |
+
},
|
| 956 |
+
{
|
| 957 |
+
"type": "text",
|
| 958 |
+
"text": "Jiwon Kim, Jung Kwon Lee, and Kyoung Mu Lee. Accurate image super-resolution using very deep convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1646–1654, 2016. ",
|
| 959 |
+
"bbox": [
|
| 960 |
+
174,
|
| 961 |
+
405,
|
| 962 |
+
825,
|
| 963 |
+
449
|
| 964 |
+
],
|
| 965 |
+
"page_idx": 9
|
| 966 |
+
},
|
| 967 |
+
{
|
| 968 |
+
"type": "text",
|
| 969 |
+
"text": "Taeksoo Kim, Moonsu Cha, Hyunsoo Kim, Jung Kwon Lee, and Jiwon Kim. Learning to discover cross-domain relations with generative adversarial networks. In Proceedings of the International Conference on Machine Learning, pp. 1857–1865, 2017. URL http://proceedings.mlr. press/v70/kim17a.html. ",
|
| 970 |
+
"bbox": [
|
| 971 |
+
174,
|
| 972 |
+
458,
|
| 973 |
+
825,
|
| 974 |
+
515
|
| 975 |
+
],
|
| 976 |
+
"page_idx": 9
|
| 977 |
+
},
|
| 978 |
+
{
|
| 979 |
+
"type": "text",
|
| 980 |
+
"text": "Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations, 2015. URL http://arxiv.org/abs/1412. 6980. ",
|
| 981 |
+
"bbox": [
|
| 982 |
+
173,
|
| 983 |
+
525,
|
| 984 |
+
825,
|
| 985 |
+
568
|
| 986 |
+
],
|
| 987 |
+
"page_idx": 9
|
| 988 |
+
},
|
| 989 |
+
{
|
| 990 |
+
"type": "text",
|
| 991 |
+
"text": "Gustav Larsson, Michael Maire, and Gregory Shakhnarovich. Learning representations for automatic colorization. In Proceedings of the European Conference on Computer Vision, pp. 577–593. Springer, 2016. ",
|
| 992 |
+
"bbox": [
|
| 993 |
+
173,
|
| 994 |
+
578,
|
| 995 |
+
823,
|
| 996 |
+
621
|
| 997 |
+
],
|
| 998 |
+
"page_idx": 9
|
| 999 |
+
},
|
| 1000 |
+
{
|
| 1001 |
+
"type": "text",
|
| 1002 |
+
"text": "Hsin-Ying Lee, Hung-Yu Tseng, Jia-Bin Huang, Maneesh Singh, and Ming-Hsuan Yang. Diverse image-to-image translation via disentangled representations. In Proceedings of the European Conference on Computer Vision, pp. 35–51, 2018. ",
|
| 1003 |
+
"bbox": [
|
| 1004 |
+
173,
|
| 1005 |
+
631,
|
| 1006 |
+
825,
|
| 1007 |
+
674
|
| 1008 |
+
],
|
| 1009 |
+
"page_idx": 9
|
| 1010 |
+
},
|
| 1011 |
+
{
|
| 1012 |
+
"type": "text",
|
| 1013 |
+
"text": "Chunyuan Li, Hao Liu, Changyou Chen, Yuchen Pu, Liqun Chen, Ricardo Henao, and Lawrence Carin. Alice: Towards understanding adversarial learning for joint distribution matching. In Advances in Neural Information Processing Systems, pp. 5501–5509, 2017a. ",
|
| 1014 |
+
"bbox": [
|
| 1015 |
+
174,
|
| 1016 |
+
683,
|
| 1017 |
+
825,
|
| 1018 |
+
727
|
| 1019 |
+
],
|
| 1020 |
+
"page_idx": 9
|
| 1021 |
+
},
|
| 1022 |
+
{
|
| 1023 |
+
"type": "text",
|
| 1024 |
+
"text": "Yijun Li, Chen Fang, Jimei Yang, Zhaowen Wang, Xin Lu, and Ming-Hsuan Yang. Universal style transfer via feature transforms. In Advances in Neural Information Processing Systems, pp. 386– 396, 2017b. ",
|
| 1025 |
+
"bbox": [
|
| 1026 |
+
174,
|
| 1027 |
+
736,
|
| 1028 |
+
825,
|
| 1029 |
+
780
|
| 1030 |
+
],
|
| 1031 |
+
"page_idx": 9
|
| 1032 |
+
},
|
| 1033 |
+
{
|
| 1034 |
+
"type": "text",
|
| 1035 |
+
"text": "Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. In Advances in Neural Information Processing Systems, pp. 700–708, 2017. ",
|
| 1036 |
+
"bbox": [
|
| 1037 |
+
169,
|
| 1038 |
+
789,
|
| 1039 |
+
821,
|
| 1040 |
+
819
|
| 1041 |
+
],
|
| 1042 |
+
"page_idx": 9
|
| 1043 |
+
},
|
| 1044 |
+
{
|
| 1045 |
+
"type": "text",
|
| 1046 |
+
"text": "Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3431–3440, 2015. ",
|
| 1047 |
+
"bbox": [
|
| 1048 |
+
173,
|
| 1049 |
+
828,
|
| 1050 |
+
821,
|
| 1051 |
+
871
|
| 1052 |
+
],
|
| 1053 |
+
"page_idx": 9
|
| 1054 |
+
},
|
| 1055 |
+
{
|
| 1056 |
+
"type": "text",
|
| 1057 |
+
"text": "Xudong Mao, Qing Li, Haoran Xie, Raymond YK Lau, Zhen Wang, and Stephen Paul Smolley. Least squares generative adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision, pp. 2813–2821. IEEE, 2017. ",
|
| 1058 |
+
"bbox": [
|
| 1059 |
+
174,
|
| 1060 |
+
881,
|
| 1061 |
+
823,
|
| 1062 |
+
924
|
| 1063 |
+
],
|
| 1064 |
+
"page_idx": 9
|
| 1065 |
+
},
|
| 1066 |
+
{
|
| 1067 |
+
"type": "text",
|
| 1068 |
+
"text": "Youssef Alami Mejjati, Christian Richardt, James Tompkin, Darren Cosker, and Kwang In Kim. Unsupervised attention-guided image-to-image translation. In Advances in Neural Information Processing Systems, pp. 3697–3707, 2018. ",
|
| 1069 |
+
"bbox": [
|
| 1070 |
+
178,
|
| 1071 |
+
103,
|
| 1072 |
+
823,
|
| 1073 |
+
146
|
| 1074 |
+
],
|
| 1075 |
+
"page_idx": 10
|
| 1076 |
+
},
|
| 1077 |
+
{
|
| 1078 |
+
"type": "text",
|
| 1079 |
+
"text": "Takeru Miyato, Toshiki Kataoka, Masanori Koyama, and Yuichi Yoshida. Spectral normalization for generative adversarial networks. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id $=$ B1QRgziT-. ",
|
| 1080 |
+
"bbox": [
|
| 1081 |
+
176,
|
| 1082 |
+
155,
|
| 1083 |
+
823,
|
| 1084 |
+
198
|
| 1085 |
+
],
|
| 1086 |
+
"page_idx": 10
|
| 1087 |
+
},
|
| 1088 |
+
{
|
| 1089 |
+
"type": "text",
|
| 1090 |
+
"text": "Hyeonseob Nam and Hyo-Eun Kim. Batch-instance normalization for adaptively style-invariant neural networks. In Advances in Neural Information Processing Systems, pp. 2563–2572, 2018. ",
|
| 1091 |
+
"bbox": [
|
| 1092 |
+
174,
|
| 1093 |
+
205,
|
| 1094 |
+
821,
|
| 1095 |
+
236
|
| 1096 |
+
],
|
| 1097 |
+
"page_idx": 10
|
| 1098 |
+
},
|
| 1099 |
+
{
|
| 1100 |
+
"type": "text",
|
| 1101 |
+
"text": "Deepak Pathak, Philipp Krahenbuhl, Jeff Donahue, Trevor Darrell, and Alexei A Efros. Context encoders: Feature learning by inpainting. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2536–2544, 2014. ",
|
| 1102 |
+
"bbox": [
|
| 1103 |
+
173,
|
| 1104 |
+
243,
|
| 1105 |
+
823,
|
| 1106 |
+
287
|
| 1107 |
+
],
|
| 1108 |
+
"page_idx": 10
|
| 1109 |
+
},
|
| 1110 |
+
{
|
| 1111 |
+
"type": "text",
|
| 1112 |
+
"text": "Amelie Royer, Konstantinos Bousmalis, Stephan Gouws, Fred Bertsch, Inbar Moressi, Forrester ´ Cole, and Kevin Murphy. Xgan: Unsupervised image-to-image translation for many-to-many mappings. arXiv preprint arXiv:1711.05139, 2017. ",
|
| 1113 |
+
"bbox": [
|
| 1114 |
+
174,
|
| 1115 |
+
295,
|
| 1116 |
+
823,
|
| 1117 |
+
338
|
| 1118 |
+
],
|
| 1119 |
+
"page_idx": 10
|
| 1120 |
+
},
|
| 1121 |
+
{
|
| 1122 |
+
"type": "text",
|
| 1123 |
+
"text": "Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2818–2826, 2016. ",
|
| 1124 |
+
"bbox": [
|
| 1125 |
+
171,
|
| 1126 |
+
347,
|
| 1127 |
+
823,
|
| 1128 |
+
390
|
| 1129 |
+
],
|
| 1130 |
+
"page_idx": 10
|
| 1131 |
+
},
|
| 1132 |
+
{
|
| 1133 |
+
"type": "text",
|
| 1134 |
+
"text": "Yaniv Taigman, Adam Polyak, and Lior Wolf. Unsupervised cross-domain image generation. In International Conference on Learning Representations, 2017. URL https://openreview. net/forum?id ${ . } = { }$ Sk2Im59ex. ",
|
| 1135 |
+
"bbox": [
|
| 1136 |
+
176,
|
| 1137 |
+
398,
|
| 1138 |
+
823,
|
| 1139 |
+
441
|
| 1140 |
+
],
|
| 1141 |
+
"page_idx": 10
|
| 1142 |
+
},
|
| 1143 |
+
{
|
| 1144 |
+
"type": "text",
|
| 1145 |
+
"text": "Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu, Andrew Tao, Jan Kautz, and Bryan Catanzaro. Highresolution image synthesis and semantic manipulation with conditional gans. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 8798–8807, 2018. ",
|
| 1146 |
+
"bbox": [
|
| 1147 |
+
176,
|
| 1148 |
+
450,
|
| 1149 |
+
823,
|
| 1150 |
+
494
|
| 1151 |
+
],
|
| 1152 |
+
"page_idx": 10
|
| 1153 |
+
},
|
| 1154 |
+
{
|
| 1155 |
+
"type": "text",
|
| 1156 |
+
"text": "Yuxin Wu and Kaiming He. Group normalization. In Proceedings of the European Conference on Computer Vision, September 2018. ",
|
| 1157 |
+
"bbox": [
|
| 1158 |
+
173,
|
| 1159 |
+
501,
|
| 1160 |
+
823,
|
| 1161 |
+
531
|
| 1162 |
+
],
|
| 1163 |
+
"page_idx": 10
|
| 1164 |
+
},
|
| 1165 |
+
{
|
| 1166 |
+
"type": "text",
|
| 1167 |
+
"text": "Zili Yi, Hao Zhang, Ping Tan, and Minglun Gong. Dualgan: Unsupervised dual learning for imageto-image translation. In Proceedings of the IEEE International Conference on Computer Vision, pp. 2849–2857, 2017. ",
|
| 1168 |
+
"bbox": [
|
| 1169 |
+
173,
|
| 1170 |
+
539,
|
| 1171 |
+
823,
|
| 1172 |
+
582
|
| 1173 |
+
],
|
| 1174 |
+
"page_idx": 10
|
| 1175 |
+
},
|
| 1176 |
+
{
|
| 1177 |
+
"type": "text",
|
| 1178 |
+
"text": "Richard Zhang, Phillip Isola, and Alexei A Efros. Colorful image colorization. In Proceedings of the European Conference on Computer Vision, pp. 649–666. Springer, 2016. ",
|
| 1179 |
+
"bbox": [
|
| 1180 |
+
169,
|
| 1181 |
+
590,
|
| 1182 |
+
825,
|
| 1183 |
+
621
|
| 1184 |
+
],
|
| 1185 |
+
"page_idx": 10
|
| 1186 |
+
},
|
| 1187 |
+
{
|
| 1188 |
+
"type": "text",
|
| 1189 |
+
"text": "Richard Zhang, Jun-Yan Zhu, Phillip Isola, Xinyang Geng, Angela S. Lin, Tianhe Yu, and Alexei A. Efros. Real-time user-guided image colorization with learned deep priors. ACM Transactions on Graphics, 36(4):119:1–119:11, 2017. doi: 10.1145/3072959.3073703. URL https://doi. org/10.1145/3072959.3073703. ",
|
| 1190 |
+
"bbox": [
|
| 1191 |
+
173,
|
| 1192 |
+
628,
|
| 1193 |
+
825,
|
| 1194 |
+
685
|
| 1195 |
+
],
|
| 1196 |
+
"page_idx": 10
|
| 1197 |
+
},
|
| 1198 |
+
{
|
| 1199 |
+
"type": "text",
|
| 1200 |
+
"text": "Junbo Jake Zhao, Michael Mathieu, and Yann LeCun. Energy-based generative adversarial net- ¨ works. In International Conference on Learning Representations, 2017. URL https:// openreview.net/forum?id $\\underline { { \\underline { { \\mathbf { \\Pi } } } } } =$ ryh9pmcee. ",
|
| 1201 |
+
"bbox": [
|
| 1202 |
+
173,
|
| 1203 |
+
694,
|
| 1204 |
+
825,
|
| 1205 |
+
738
|
| 1206 |
+
],
|
| 1207 |
+
"page_idx": 10
|
| 1208 |
+
},
|
| 1209 |
+
{
|
| 1210 |
+
"type": "text",
|
| 1211 |
+
"text": "Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Learning deep features for discriminative localization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2921–2929. IEEE, 2016. ",
|
| 1212 |
+
"bbox": [
|
| 1213 |
+
173,
|
| 1214 |
+
746,
|
| 1215 |
+
823,
|
| 1216 |
+
789
|
| 1217 |
+
],
|
| 1218 |
+
"page_idx": 10
|
| 1219 |
+
},
|
| 1220 |
+
{
|
| 1221 |
+
"type": "text",
|
| 1222 |
+
"text": "Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision, pp. 2223–2232, 2017. ",
|
| 1223 |
+
"bbox": [
|
| 1224 |
+
173,
|
| 1225 |
+
797,
|
| 1226 |
+
825,
|
| 1227 |
+
840
|
| 1228 |
+
],
|
| 1229 |
+
"page_idx": 10
|
| 1230 |
+
},
|
| 1231 |
+
{
|
| 1232 |
+
"type": "text",
|
| 1233 |
+
"text": "A RELATED WORKS ",
|
| 1234 |
+
"text_level": 1,
|
| 1235 |
+
"bbox": [
|
| 1236 |
+
176,
|
| 1237 |
+
102,
|
| 1238 |
+
354,
|
| 1239 |
+
117
|
| 1240 |
+
],
|
| 1241 |
+
"page_idx": 11
|
| 1242 |
+
},
|
| 1243 |
+
{
|
| 1244 |
+
"type": "text",
|
| 1245 |
+
"text": "A.1 GENERATIVE ADVERSARIAL NETWORKS ",
|
| 1246 |
+
"text_level": 1,
|
| 1247 |
+
"bbox": [
|
| 1248 |
+
174,
|
| 1249 |
+
135,
|
| 1250 |
+
501,
|
| 1251 |
+
148
|
| 1252 |
+
],
|
| 1253 |
+
"page_idx": 11
|
| 1254 |
+
},
|
| 1255 |
+
{
|
| 1256 |
+
"type": "text",
|
| 1257 |
+
"text": "Generative Adversarial Networks (GAN)(Goodfellow et al. (2014)) have achieved impressive results on a wide variety of image generation(Arjovsky et al. (2017); Berthelot et al. (2017); Karras et al. (2018); Zhao et al. (2017)), image inpainting(Iizuka et al. (2017)), image translation(Choi et al. (2018); Huang et al. (2018); Isola et al. (2017); Liu et al. (2017); Wang et al. (2018); Zhu et al. (2017)) tasks. In training, a generator aims to generate realistic images to fool a discriminator while the discriminator tries to distinguish the generated images from real images. Various multi-stage generative models(Karras et al. (2018); Wang et al. (2018)) and better training objectives(Arjovsky et al. (2017); Berthelot et al. (2017); Mao et al. (2017); Zhao et al. (2017)) have been proposed to generate more realistic images. In this paper, our model uses GAN to learn the transformation from a source domain to a significantly different target domain, given unpaired training data. ",
|
| 1258 |
+
"bbox": [
|
| 1259 |
+
173,
|
| 1260 |
+
161,
|
| 1261 |
+
825,
|
| 1262 |
+
300
|
| 1263 |
+
],
|
| 1264 |
+
"page_idx": 11
|
| 1265 |
+
},
|
| 1266 |
+
{
|
| 1267 |
+
"type": "text",
|
| 1268 |
+
"text": "A.2 IMAGE-TO-IMAGE TRANSLATION ",
|
| 1269 |
+
"text_level": 1,
|
| 1270 |
+
"bbox": [
|
| 1271 |
+
176,
|
| 1272 |
+
320,
|
| 1273 |
+
444,
|
| 1274 |
+
333
|
| 1275 |
+
],
|
| 1276 |
+
"page_idx": 11
|
| 1277 |
+
},
|
| 1278 |
+
{
|
| 1279 |
+
"type": "text",
|
| 1280 |
+
"text": "Isola et al.(Isola et al. (2017)) have proposed a conditional GAN-based unified framework for image-to-image translation. High-resolution version of the pix2pix have been proposed by Wang et al.(Wang et al. (2018)) Recently, there have been various attempts (Huang et al. (2018); Kim et al. (2017); Liu et al. (2017); Taigman et al. (2017); Zhu et al. (2017)) to learn image translation from an unpaired dataset. CycleGAN (Zhu et al. (2017)) have proposed a cyclic consistence loss for the first time to enforce one-to-one mapping. UNIT (Liu et al. (2017)) assumed a shared-latent space to tackle unsupervised image translation. However, this approach performs well only when the two domains have similar patterns. MUNIT (Huang et al. (2018)) makes it possible to extend to manyto-many mapping by decomposing the image into content code that is domain-invariant and a style code that captures domain-specific properties. MUNIT synthesizes the separated content and style to generate the final image, where the image quality is improved by using adaptive instance normalization (Huang & Belongie (2017)). With the same purpose as MUNIT, DRIT (Lee et al. (2018)) decomposes images into content and style, so that many-to-many mapping is possible. The only difference is that content space is shared between the two domains using the weight sharing and content discriminator which is auxiliary classifier. Nevertheless, the performance of these methods (Huang et al. (2018); Liu et al. (2017); Lee et al. (2018)) are limited to the dataset that contains well-aligned images between source and target domains. In addition, AGGAN (Mejjati et al. (2018)) improved the performance of image translation by using attention mechanism to distinguish between foreground and background. However, the attention module in AGGAN cannot help to transform the object’s shape in the image. Although, CartoonGAN (Chen et al. (2018)) shows good performance for animation style translation, it changes only the color, tone, and thickness of line in the image. Therefore it is not suitable for the shape change in the image. ",
|
| 1281 |
+
"bbox": [
|
| 1282 |
+
174,
|
| 1283 |
+
344,
|
| 1284 |
+
825,
|
| 1285 |
+
651
|
| 1286 |
+
],
|
| 1287 |
+
"page_idx": 11
|
| 1288 |
+
},
|
| 1289 |
+
{
|
| 1290 |
+
"type": "text",
|
| 1291 |
+
"text": "A.3 CLASS ACTIVATION MAP ",
|
| 1292 |
+
"text_level": 1,
|
| 1293 |
+
"bbox": [
|
| 1294 |
+
176,
|
| 1295 |
+
670,
|
| 1296 |
+
393,
|
| 1297 |
+
684
|
| 1298 |
+
],
|
| 1299 |
+
"page_idx": 11
|
| 1300 |
+
},
|
| 1301 |
+
{
|
| 1302 |
+
"type": "text",
|
| 1303 |
+
"text": "Zhou et al. (Zhou et al. (2016)) have proposed Class Activation Map (CAM) using global average pooling in a CNN. The CAM for a particular class shows the discriminative image regions by the CNN to determine that class. In this work, our model leads to intensively change discriminative image regions provided by distinguishing two domains using the CAM approach. However, not only global average pooling is used, but global max pooling is also used to make the results better. ",
|
| 1304 |
+
"bbox": [
|
| 1305 |
+
174,
|
| 1306 |
+
696,
|
| 1307 |
+
825,
|
| 1308 |
+
767
|
| 1309 |
+
],
|
| 1310 |
+
"page_idx": 11
|
| 1311 |
+
},
|
| 1312 |
+
{
|
| 1313 |
+
"type": "text",
|
| 1314 |
+
"text": "A.4 NORMALIZATION ",
|
| 1315 |
+
"text_level": 1,
|
| 1316 |
+
"bbox": [
|
| 1317 |
+
176,
|
| 1318 |
+
786,
|
| 1319 |
+
338,
|
| 1320 |
+
800
|
| 1321 |
+
],
|
| 1322 |
+
"page_idx": 11
|
| 1323 |
+
},
|
| 1324 |
+
{
|
| 1325 |
+
"type": "text",
|
| 1326 |
+
"text": "Recent neural style transfer researches have shown that CNN feature statistics (e.g., Gram matrix (Gatys et al. (2016)), mean and variance (Huang & Belongie (2017)) can be used as direct descriptors for image styles. In particular, Instance Normalization (IN) has the effect of removing the style variation by directly normalizing the feature statistics of the image and is used more often than Batch Normalization (BN) or Layer Normalization (LN) in style transfer. However, when normalizing images, recent studies use Adaptive Instance Normalization (AdaIN) (Huang & Belongie (2017)), Conditional Instance Normalization (CIN) (Dumoulin et al. (2017)), and Batch-Instance Normalization (BIN) (Nam & Kim (2018)) instead of using IN alone. In our work, we propose an Adaptive ",
|
| 1327 |
+
"bbox": [
|
| 1328 |
+
174,
|
| 1329 |
+
813,
|
| 1330 |
+
823,
|
| 1331 |
+
924
|
| 1332 |
+
],
|
| 1333 |
+
"page_idx": 11
|
| 1334 |
+
},
|
| 1335 |
+
{
|
| 1336 |
+
"type": "text",
|
| 1337 |
+
"text": "Layer-Instance Normalization (AdaLIN) function to adaptively select a proper ratio between IN and LN. Through the AdaLIN, our attention-guided model can flexibly control the amount of change in shape and texture. ",
|
| 1338 |
+
"bbox": [
|
| 1339 |
+
174,
|
| 1340 |
+
103,
|
| 1341 |
+
823,
|
| 1342 |
+
146
|
| 1343 |
+
],
|
| 1344 |
+
"page_idx": 12
|
| 1345 |
+
},
|
| 1346 |
+
{
|
| 1347 |
+
"type": "text",
|
| 1348 |
+
"text": "B IMPLEMENTATION DETAILS ",
|
| 1349 |
+
"text_level": 1,
|
| 1350 |
+
"bbox": [
|
| 1351 |
+
176,
|
| 1352 |
+
172,
|
| 1353 |
+
437,
|
| 1354 |
+
189
|
| 1355 |
+
],
|
| 1356 |
+
"page_idx": 12
|
| 1357 |
+
},
|
| 1358 |
+
{
|
| 1359 |
+
"type": "text",
|
| 1360 |
+
"text": "B.1 NETWORK ARCHITECTURE ",
|
| 1361 |
+
"text_level": 1,
|
| 1362 |
+
"bbox": [
|
| 1363 |
+
176,
|
| 1364 |
+
209,
|
| 1365 |
+
403,
|
| 1366 |
+
224
|
| 1367 |
+
],
|
| 1368 |
+
"page_idx": 12
|
| 1369 |
+
},
|
| 1370 |
+
{
|
| 1371 |
+
"type": "text",
|
| 1372 |
+
"text": "The network architectures of U-GAT-IT are shown in Table 4, 5, and 6. The encoder of the generator is composed of two convolution layers with the stride size of two for down-sampling and four residual blocks. The decoder of the generator consists of four residual blocks and two up-sampling convolution layers with the stride size of one. Note that we use the instance normalization for the encoder and AdaLIN for the decoder, respectively. In general, LN does not perform better than batch normalization in classification problems (Wu & He (2018)). Since the auxiliary classifier is connected from the encoder in the generator, to increase the accuracy of the auxiliary classifier we use the instance normalization(batch normalization with a mini-batch size of 1) instead of the AdaLIN. Spectral normalization (Miyato et al. (2018)) is used for the discriminator. We employ two different scales of PatchGAN (Isola et al. (2017)) for the discriminator network, which classifies whether local $( 7 0 \\mathrm { ~ x ~ } 7 0 )$ and global $( 2 8 6 \\mathrm { ~ x ~ } 2 8 6 )$ image patches are real or fake. For the activation function, we use ReLU in the generator and leaky-ReLU with a slope of 0.2 in the discriminator. ",
|
| 1373 |
+
"bbox": [
|
| 1374 |
+
174,
|
| 1375 |
+
238,
|
| 1376 |
+
825,
|
| 1377 |
+
405
|
| 1378 |
+
],
|
| 1379 |
+
"page_idx": 12
|
| 1380 |
+
},
|
| 1381 |
+
{
|
| 1382 |
+
"type": "text",
|
| 1383 |
+
"text": "B.2 TRAINING ",
|
| 1384 |
+
"text_level": 1,
|
| 1385 |
+
"bbox": [
|
| 1386 |
+
174,
|
| 1387 |
+
430,
|
| 1388 |
+
289,
|
| 1389 |
+
445
|
| 1390 |
+
],
|
| 1391 |
+
"page_idx": 12
|
| 1392 |
+
},
|
| 1393 |
+
{
|
| 1394 |
+
"type": "text",
|
| 1395 |
+
"text": "All models are trained using Adam (Kingma & Ba (2015)) with $\\beta _ { 1 } { = } 0 . 5$ and $\\beta _ { 2 } { = } 0 . 9 9 9$ . For data augmentation, we flipped the images horizontally with a probability of 0.5, resized them to $2 8 6 \\times$ 286, and random cropped them to $2 5 6 \\times 2 5 6$ . The batch size is set to one for all experiments. We train all models with a fixed learning rate of 0.0001 until 500,000 iterations and linearly decayed up to 1,000,000 iterations. We also use a weight decay at rate of 0.0001. The weights are initialized from a zero-centered normal distribution with a standard deviation of 0.02. ",
|
| 1396 |
+
"bbox": [
|
| 1397 |
+
174,
|
| 1398 |
+
459,
|
| 1399 |
+
825,
|
| 1400 |
+
542
|
| 1401 |
+
],
|
| 1402 |
+
"page_idx": 12
|
| 1403 |
+
},
|
| 1404 |
+
{
|
| 1405 |
+
"type": "text",
|
| 1406 |
+
"text": "C DATASET DETAILS ",
|
| 1407 |
+
"text_level": 1,
|
| 1408 |
+
"bbox": [
|
| 1409 |
+
176,
|
| 1410 |
+
570,
|
| 1411 |
+
362,
|
| 1412 |
+
587
|
| 1413 |
+
],
|
| 1414 |
+
"page_idx": 12
|
| 1415 |
+
},
|
| 1416 |
+
{
|
| 1417 |
+
"type": "text",
|
| 1418 |
+
"text": "selfie2anime The selfie dataset contains 46,836 selfie images annotated with 36 different attributes. We only use photos of females as training data and test data. The size of the training dataset is 3400, and that of the test dataset is 100, with the image size of $2 5 6 \\times 2 5 6$ . For the anime dataset, we have firstly retrieved 69,926 animation character images from Anime-Planet1. Among those images, 27,023 face images are extracted by using an anime-face detector2. After selecting only female character images and removing monochrome images manually, we have collected two datasets of female anime face images, with the sizes of 3400 and 100 for training and test data respectively, which is the same numbers as the selfie dataset. Finally, all anime face images are resized to $2 5 6 \\times$ 256 by applying a CNN-based image super-resolution algorithm3. ",
|
| 1419 |
+
"bbox": [
|
| 1420 |
+
174,
|
| 1421 |
+
607,
|
| 1422 |
+
825,
|
| 1423 |
+
733
|
| 1424 |
+
],
|
| 1425 |
+
"page_idx": 12
|
| 1426 |
+
},
|
| 1427 |
+
{
|
| 1428 |
+
"type": "text",
|
| 1429 |
+
"text": "horse2zebra and photo2vangogh These datasets are used in CycleGAN (Zhu et al. (2017)). The training dataset size of each class: 1,067 (horse), 1,334 (zebra), 6,287 (photo), and 400 (vangogh). The test datasets consist of 120 (horse), 140 (zebra), 751 (photo), and 400 (vangogh). Note that the training data and the test data of vangogh class are the same. ",
|
| 1430 |
+
"bbox": [
|
| 1431 |
+
174,
|
| 1432 |
+
739,
|
| 1433 |
+
823,
|
| 1434 |
+
796
|
| 1435 |
+
],
|
| 1436 |
+
"page_idx": 12
|
| 1437 |
+
},
|
| 1438 |
+
{
|
| 1439 |
+
"type": "text",
|
| 1440 |
+
"text": "cat2dog and photo2portrait These datasets are used in DRIT (Lee et al. (2018)). The numbers of data for each class are 871 (cat), 1,364 (zebra), 6,452 (photo), and 1,811 (vangogh). We use 120 (horse), 140 (zebra), 751 (photo), and 400 (vangogh) randomly selected images as test data, respectively. ",
|
| 1441 |
+
"bbox": [
|
| 1442 |
+
174,
|
| 1443 |
+
803,
|
| 1444 |
+
825,
|
| 1445 |
+
859
|
| 1446 |
+
],
|
| 1447 |
+
"page_idx": 12
|
| 1448 |
+
},
|
| 1449 |
+
{
|
| 1450 |
+
"type": "text",
|
| 1451 |
+
"text": "D ADDITIONAL EXPERIMENTAL RESULTS ",
|
| 1452 |
+
"text_level": 1,
|
| 1453 |
+
"bbox": [
|
| 1454 |
+
174,
|
| 1455 |
+
103,
|
| 1456 |
+
534,
|
| 1457 |
+
118
|
| 1458 |
+
],
|
| 1459 |
+
"page_idx": 13
|
| 1460 |
+
},
|
| 1461 |
+
{
|
| 1462 |
+
"type": "text",
|
| 1463 |
+
"text": "In addition to the results presented in the paper, we show supplement generation results for the five datasets in Figs 5, 6, 7, 8, 9, 10, 11, and 12. ",
|
| 1464 |
+
"bbox": [
|
| 1465 |
+
174,
|
| 1466 |
+
133,
|
| 1467 |
+
823,
|
| 1468 |
+
161
|
| 1469 |
+
],
|
| 1470 |
+
"page_idx": 13
|
| 1471 |
+
},
|
| 1472 |
+
{
|
| 1473 |
+
"type": "table",
|
| 1474 |
+
"img_path": "images/675cee739c9191f90f2df81d582e9497f207ddbf9c0c9b066c532b8913a666c0.jpg",
|
| 1475 |
+
"table_caption": [
|
| 1476 |
+
"Table 4: The detail of generator architecture. "
|
| 1477 |
+
],
|
| 1478 |
+
"table_footnote": [],
|
| 1479 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Part</td><td rowspan=1 colspan=1>Input -→ Output Shape</td><td rowspan=1 colspan=1>Layer Information</td></tr><tr><td rowspan=3 colspan=1>Encoder Down-sampling</td><td rowspan=1 colspan=1>(h,w,3)→(h,w,64)</td><td rowspan=1 colspan=1>CONV-(N64,K7, S1, P3),IN,ReLU</td></tr><tr><td rowspan=1 colspan=1>(h,w.64)→(,,128)</td><td rowspan=1 colspan=1>CONV-(N128,K3,S2,P1),IN,ReLU</td></tr><tr><td rowspan=1 colspan=1>,,128)→(,N,,256)</td><td rowspan=1 colspan=1>CONV-(N256,K3,S2,P1),IN,ReLU</td></tr><tr><td rowspan=4 colspan=1>EncoderBottleneck</td><td rowspan=1 colspan=1>东会,,256)→A,256)</td><td rowspan=1 colspan=1>ResBlock-(N256,K3,S1,P1), IN,ReLU</td></tr><tr><td rowspan=1 colspan=1>GA,,256→A,256</td><td rowspan=1 colspan=1>ResBlock-(N256,K3,S1,P1),IN,ReLU</td></tr><tr><td rowspan=1 colspan=1>GA256 A,256)</td><td rowspan=1 colspan=1>ResBlock-(N256,K3, S1,P1), IN,ReLU</td></tr><tr><td rowspan=1 colspan=1>,美256 A,,256)</td><td rowspan=1 colspan=1>ResBlock-(N256,K3,S1, P1), IN,ReLU</td></tr><tr><td rowspan=2 colspan=1>CAMof Generator</td><td rowspan=1 colspan=1>,美,256) ,,512)</td><td rowspan=1 colspan=1>Global Average & Max Pooling,MLP-(N1), Multiply the weights of MLP</td></tr><tr><td rowspan=1 colspan=1>4,,512) ,256</td><td rowspan=1 colspan=1>CONV-(N256, K1, S1), ReLU</td></tr><tr><td rowspan=3 colspan=1>Y,β</td><td rowspan=1 colspan=1>(,256→ (1,1,256)</td><td rowspan=1 colspan=1>MLP-(N256), ReLU</td></tr><tr><td rowspan=1 colspan=1>(1,1,256)→(1,1,256)</td><td rowspan=1 colspan=1>MLP-(N256), ReLU</td></tr><tr><td rowspan=1 colspan=1>(1,1,256)→(1,1,256)</td><td rowspan=1 colspan=1>MLP-(N256),ReLU</td></tr><tr><td rowspan=4 colspan=1>Decoder Bottleneck</td><td rowspan=1 colspan=1>,256→(, 256</td><td rowspan=1 colspan=1>AdaResBlock-(N256,K3, S1,P1),AdaILN,ReLU</td></tr><tr><td rowspan=1 colspan=1>C美256 A,256)</td><td rowspan=1 colspan=1>AdaResBlock-(N256,K3,S1,P1),AdaILN,ReU</td></tr><tr><td rowspan=1 colspan=1>会,256)→A,256)</td><td rowspan=1 colspan=1>AdaResBlock-(N256,K3,S1,P1),AdaILN,ReU</td></tr><tr><td rowspan=1 colspan=1>CA256→A,256)</td><td rowspan=1 colspan=1>AdaResBlock-(N256,K3,S1,P1),AdaILN,ReU</td></tr><tr><td rowspan=3 colspan=1>Decoder Up-sampling</td><td rowspan=1 colspan=1>4256 ,,128)</td><td rowspan=1 colspan=1>Up-CONV-(N128, K3, S1, P1), LIN, ReLU</td></tr><tr><td rowspan=1 colspan=1>,,128)→(h,w,64)</td><td rowspan=1 colspan=1>Up-CONV-(N64, K3,S1, P1),LIN, ReLU</td></tr><tr><td rowspan=1 colspan=1>(h,w,64) → (h,w,3)</td><td rowspan=1 colspan=1>CONV-(N3, K7,S1, P3), Tanh</td></tr></table>",
|
| 1480 |
+
"bbox": [
|
| 1481 |
+
173,
|
| 1482 |
+
215,
|
| 1483 |
+
913,
|
| 1484 |
+
539
|
| 1485 |
+
],
|
| 1486 |
+
"page_idx": 13
|
| 1487 |
+
},
|
| 1488 |
+
{
|
| 1489 |
+
"type": "table",
|
| 1490 |
+
"img_path": "images/084f07f4e9bff3f2d3c207ab5f386bd2e23881eeadb2c6407ddb50930f2d2a3e.jpg",
|
| 1491 |
+
"table_caption": [
|
| 1492 |
+
"Table 5: The detail of local discriminator. "
|
| 1493 |
+
],
|
| 1494 |
+
"table_footnote": [],
|
| 1495 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Part</td><td rowspan=1 colspan=1>Input -→ Output Shape</td><td rowspan=1 colspan=1>Layer Information</td></tr><tr><td rowspan=4 colspan=1>Encoder Down-sampling</td><td rowspan=1 colspan=1>(h,w,3)→(,m,64)</td><td rowspan=1 colspan=1>CONV-(N64,K4, S2,P1), SN,Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>(,,64→(,,128)</td><td rowspan=1 colspan=1>CONV-(N128, K4, S2, P1), SN,Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>GA,128) ,256</td><td rowspan=1 colspan=1>CONV-(N256,K4, S2,P1), SN,Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>尚,,256 ,512)</td><td rowspan=1 colspan=1>CONV-(N512, K4, S1,P1), SN,Leaky-ReLU</td></tr><tr><td rowspan=2 colspan=1>CAMof Discriminator</td><td rowspan=1 colspan=1>8,1024)</td><td rowspan=1 colspan=1>Global Average & Max Pooling,MLP-(N1),Multiply the weights of MLP</td></tr><tr><td rowspan=1 colspan=1>,,1024)→,,512)</td><td rowspan=1 colspan=1>CONV-(N512,K1, S1),Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>Classifier</td><td rowspan=1 colspan=1>(,,512)→,,1</td><td rowspan=1 colspan=1>CONV-(N1,K4,S1,P1), S</td></tr></table>",
|
| 1496 |
+
"bbox": [
|
| 1497 |
+
173,
|
| 1498 |
+
607,
|
| 1499 |
+
885,
|
| 1500 |
+
751
|
| 1501 |
+
],
|
| 1502 |
+
"page_idx": 13
|
| 1503 |
+
},
|
| 1504 |
+
{
|
| 1505 |
+
"type": "table",
|
| 1506 |
+
"img_path": "images/8607be8e8cdb8b1ea48efe22860d78c1131da53d516d5e5af56fbd300c24b081.jpg",
|
| 1507 |
+
"table_caption": [
|
| 1508 |
+
"Table 6: The detail of global discriminator. "
|
| 1509 |
+
],
|
| 1510 |
+
"table_footnote": [],
|
| 1511 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Part</td><td rowspan=1 colspan=1>Input -→ Output Shape</td><td rowspan=1 colspan=1>Layer Information</td></tr><tr><td rowspan=6 colspan=1>Encoder Down-sampling</td><td rowspan=1 colspan=1>(h,w,3)→(,,64</td><td rowspan=1 colspan=1>CONV-(N64, K4, S2,P1), SN,Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>G,64→4.,128)</td><td rowspan=1 colspan=1>CONV-(N128, K4, S2, P1), SN,Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>G4,128)→,256</td><td rowspan=1 colspan=1>CONV-(N256, K4, S2, P1), SN, Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>G 256→(C品512)</td><td rowspan=1 colspan=1>CONV-(N512, K4, S2, P1), SN, Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>G,512) 品1024)</td><td rowspan=1 colspan=1>CONV-(N1024,K4, S2,P1), SN,Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>品3,1024) 金,2048)</td><td rowspan=1 colspan=1>CONV-(N2048,K4, S1,P1), SN,Leaky-ReLU</td></tr><tr><td rowspan=2 colspan=1>CAM of Discriminator</td><td rowspan=1 colspan=1>e,2048)→ =G32,32,4096)</td><td rowspan=1 colspan=1>Global Average & Max Pooling,MLP-(N1), Multiply the weights of MLP</td></tr><tr><td rowspan=1 colspan=1>金3,4096)→品,3,2048)</td><td rowspan=1 colspan=1>CONV-(N2048,K1, S1), Leaky-ReLU</td></tr><tr><td rowspan=1 colspan=1>Classifier</td><td rowspan=1 colspan=1>2048)→ 高品,1)</td><td rowspan=1 colspan=1>CONV-(N1, K4, S1, P1), SN</td></tr></table>",
|
| 1512 |
+
"bbox": [
|
| 1513 |
+
173,
|
| 1514 |
+
155,
|
| 1515 |
+
919,
|
| 1516 |
+
328
|
| 1517 |
+
],
|
| 1518 |
+
"page_idx": 14
|
| 1519 |
+
},
|
| 1520 |
+
{
|
| 1521 |
+
"type": "image",
|
| 1522 |
+
"img_path": "images/6d61848b51d0551df12dbee5f420b4b455573ea5dae6e01477c2bb64b5b97081.jpg",
|
| 1523 |
+
"image_caption": [
|
| 1524 |
+
"Figure 5: Visual comparisons of the selfie2anime with attention features maps. (a) Source images, (b) Attention map of the generator, (c-d) Local and global attention maps of the discriminators, (e) Our results, (f) CycleGAN (Zhu et al. (2017)), (g) UNIT (Liu et al. (2017)), (h) MUNIT (Huang et al. (2018)), (i) DRIT (Lee et al. (2018)), (j) AGGAN (Mejjati et al. (2018)), (k) CartoonGAN (Chen et al. (2018)). "
|
| 1525 |
+
],
|
| 1526 |
+
"image_footnote": [],
|
| 1527 |
+
"bbox": [
|
| 1528 |
+
178,
|
| 1529 |
+
369,
|
| 1530 |
+
820,
|
| 1531 |
+
819
|
| 1532 |
+
],
|
| 1533 |
+
"page_idx": 14
|
| 1534 |
+
},
|
| 1535 |
+
{
|
| 1536 |
+
"type": "image",
|
| 1537 |
+
"img_path": "images/ac798104925b6702121adc8a4da977f6593e9ddbafb0679645dc599a2eaceb0e.jpg",
|
| 1538 |
+
"image_caption": [
|
| 1539 |
+
"Figure 6: Visual comparisons of the anime2selfie with attention features maps. (a) Source images, (b) Attention map of the generator, (c-d) Local and global attention maps of the discriminators, (e) Our results, (f) CycleGAN (Zhu et al. (2017)), (g) UNIT (Liu et al. (2017)), (h) MUNIT (Huang et al. (2018)), (i) DRIT (Lee et al. (2018)), (j) AGGAN (Mejjati et al. (2018)). "
|
| 1540 |
+
],
|
| 1541 |
+
"image_footnote": [],
|
| 1542 |
+
"bbox": [
|
| 1543 |
+
205,
|
| 1544 |
+
251,
|
| 1545 |
+
790,
|
| 1546 |
+
702
|
| 1547 |
+
],
|
| 1548 |
+
"page_idx": 15
|
| 1549 |
+
},
|
| 1550 |
+
{
|
| 1551 |
+
"type": "image",
|
| 1552 |
+
"img_path": "images/8f0dbfba53e9c0bade7c327a3187cd4dff5c93bd9792fb9b9a8b67600844d297.jpg",
|
| 1553 |
+
"image_caption": [
|
| 1554 |
+
"Figure 7: Visual comparisons of the horse2zebra with attention features maps. (a) Source images, (b) Attention map of the generator, (c-d) Local and global attention maps of the discriminators, (e) Our results, (f) CycleGAN (Zhu et al. (2017)), (g) UNIT (Liu et al. (2017)), (h) MUNIT (Huang et al. (2018)), (i) DRIT (Lee et al. (2018)), (j) AGGAN (Mejjati et al. (2018)). "
|
| 1555 |
+
],
|
| 1556 |
+
"image_footnote": [],
|
| 1557 |
+
"bbox": [
|
| 1558 |
+
192,
|
| 1559 |
+
143,
|
| 1560 |
+
805,
|
| 1561 |
+
392
|
| 1562 |
+
],
|
| 1563 |
+
"page_idx": 16
|
| 1564 |
+
},
|
| 1565 |
+
{
|
| 1566 |
+
"type": "image",
|
| 1567 |
+
"img_path": "images/61311fd64c2d0a9651987829dfc2323e035bbfdfd45d5b496d74b82ec43cc6e8.jpg",
|
| 1568 |
+
"image_caption": [
|
| 1569 |
+
"Figure 8: Visual comparisons of the zebra2horse with attention features maps. (a) Source images, (b) Attention map of the generator, (c-d) Local and global attention maps of the discriminators, (e) Our results, (f) CycleGAN (Zhu et al. (2017)), (g) UNIT (Liu et al. (2017)), (h) MUNIT (Huang et al. (2018)), (i) DRIT (Lee et al. (2018)), (j) AGGAN (Mejjati et al. (2018)). "
|
| 1570 |
+
],
|
| 1571 |
+
"image_footnote": [],
|
| 1572 |
+
"bbox": [
|
| 1573 |
+
191,
|
| 1574 |
+
559,
|
| 1575 |
+
805,
|
| 1576 |
+
806
|
| 1577 |
+
],
|
| 1578 |
+
"page_idx": 16
|
| 1579 |
+
},
|
| 1580 |
+
{
|
| 1581 |
+
"type": "image",
|
| 1582 |
+
"img_path": "images/7462ecd346c6718879fa7e7142d74b1db79db72a7465904f2fbf8f644c630835.jpg",
|
| 1583 |
+
"image_caption": [
|
| 1584 |
+
"Figure 9: Visual comparisons of the cat2dog with attention features maps. (a) Source images, (b) Attention map of the generation, (c-d) Local and global attention maps of the discriminators, (e) Our results, (f) CycleGAN (Zhu et al. (2017)), (g) UNIT (Liu et al. (2017)), (h) MUNIT (Huang et al. (2018)), (i) DRIT (Lee et al. (2018)), (j) AGGAN (Mejjati et al. (2018)). "
|
| 1585 |
+
],
|
| 1586 |
+
"image_footnote": [],
|
| 1587 |
+
"bbox": [
|
| 1588 |
+
192,
|
| 1589 |
+
143,
|
| 1590 |
+
805,
|
| 1591 |
+
393
|
| 1592 |
+
],
|
| 1593 |
+
"page_idx": 17
|
| 1594 |
+
},
|
| 1595 |
+
{
|
| 1596 |
+
"type": "image",
|
| 1597 |
+
"img_path": "images/12539e1e6fb37f8b0a580a26d3e121e724443942da05e8057dd302bb15087192.jpg",
|
| 1598 |
+
"image_caption": [
|
| 1599 |
+
"Figure 10: Visual comparisons of the dog2cat with attention features maps. (a) Source images, (b) Attention map of the generation, (c-d) Local and global attention maps of the discriminators, (e) Our results, (f) CycleGAN (Zhu et al. (2017)), (g) UNIT (Liu et al. (2017)), (h) MUNIT (Huang et al. (2018)), (i) DRIT (Lee et al. (2018)), (j) AGGAN (Mejjati et al. (2018)). "
|
| 1600 |
+
],
|
| 1601 |
+
"image_footnote": [],
|
| 1602 |
+
"bbox": [
|
| 1603 |
+
191,
|
| 1604 |
+
558,
|
| 1605 |
+
807,
|
| 1606 |
+
806
|
| 1607 |
+
],
|
| 1608 |
+
"page_idx": 17
|
| 1609 |
+
},
|
| 1610 |
+
{
|
| 1611 |
+
"type": "image",
|
| 1612 |
+
"img_path": "images/3dbc85005dc21ccd31a602617ed02b0c7b4356441eb35f1727ab878a7d92833c.jpg",
|
| 1613 |
+
"image_caption": [
|
| 1614 |
+
"Figure 11: Visual comparisons of the photo2vangogh with attention features maps. (a) Source images, (b) Attention map of the generation, (c-d) Local and global attention maps of the discriminators, respectively, (e) Our results, (f) CycleGAN (Zhu et al. (2017)), (g) UNIT (Liu et al. (2017)), (h) MUNIT (Huang et al. (2018)), (i) DRIT (Lee et al. (2018)), (j) AGGAN (Mejjati et al. (2018)). "
|
| 1615 |
+
],
|
| 1616 |
+
"image_footnote": [],
|
| 1617 |
+
"bbox": [
|
| 1618 |
+
189,
|
| 1619 |
+
143,
|
| 1620 |
+
807,
|
| 1621 |
+
392
|
| 1622 |
+
],
|
| 1623 |
+
"page_idx": 18
|
| 1624 |
+
},
|
| 1625 |
+
{
|
| 1626 |
+
"type": "image",
|
| 1627 |
+
"img_path": "images/c5bdf4d166f6fbfebb47b2169bf8e4a1c4ab1ba095119c257a87d66e6675df44.jpg",
|
| 1628 |
+
"image_caption": [
|
| 1629 |
+
"Figure 12: Visual comparisons of the photo2portrait with attention features maps. (a) Source images, (b) Attention map of the generator, (c-d) Local and global attention maps of the discriminators, respectively, (e) Our results,(f) CycleGAN (Zhu et al. (2017)), (g) UNIT (Liu et al. (2017)), (h) MUNIT (Huang et al. (2018)), (i) DRIT (Lee et al. (2018)), (j) AGGAN (Mejjati et al. (2018)). "
|
| 1630 |
+
],
|
| 1631 |
+
"image_footnote": [],
|
| 1632 |
+
"bbox": [
|
| 1633 |
+
192,
|
| 1634 |
+
558,
|
| 1635 |
+
805,
|
| 1636 |
+
806
|
| 1637 |
+
],
|
| 1638 |
+
"page_idx": 18
|
| 1639 |
+
}
|
| 1640 |
+
]
|
parse/train/BJlZ5ySKPH/BJlZ5ySKPH_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/BJlZ5ySKPH/BJlZ5ySKPH_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/Byey7n05FQ/Byey7n05FQ.md
ADDED
|
@@ -0,0 +1,412 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# PLAN ONLINE, LEARN OFFLINE: EFFICIENT LEARNING ANDEXPLORATION VIA MODEL-BASED CONTROL
|
| 2 |
+
|
| 3 |
+
Kendall Lowrey∗1 Aravind Rajeswaran∗1
|
| 4 |
+
|
| 5 |
+
Sham Kakade1 Emanuel Todorov1,2 Igor Mordatch3
|
| 6 |
+
|
| 7 |
+
∗ Equal contributions 1 University of Washington 2 Roboti LLC 3 OpenAI
|
| 8 |
+
|
| 9 |
+
klowrey, aravraj, sham, todorov @cs.uw.edu, mordatch@openai.com
|
| 10 |
+
|
| 11 |
+
# ABSTRACT
|
| 12 |
+
|
| 13 |
+
We propose a “plan online and learn offline” framework for the setting where an agent, with an internal model, needs to continually act and learn in the world. Our work builds on the synergistic relationship between local model-based control, global value function learning, and exploration. We study how local trajectory optimization can cope with approximation errors in the value function, and can stabilize and accelerate value function learning. Conversely, we also study how approximate value functions can help reduce the planning horizon and allow for better policies beyond local solutions. Finally, we also demonstrate how trajectory optimization can be used to perform temporally coordinated exploration in conjunction with estimating uncertainty in value function approximation. This exploration is critical for fast and stable learning of the value function. Combining these components enable solutions to complex control tasks, like humanoid locomotion and dexterous in-hand manipulation, in the equivalent of a few minutes of experience in the real world.
|
| 14 |
+
|
| 15 |
+
# 1 INTRODUCTION
|
| 16 |
+
|
| 17 |
+
We consider a setting where an agent with limited memory and computational resources is dropped into a world. The agent has to simultaneously act in the world and learn to become proficient in the tasks it encounters. Let us further consider a setting where the agent has some prior knowledge about the world in the form of a nominal dynamics model. However, the state space of the world could be very large and complex, and the set of possible tasks very diverse. This complexity and diversity, combined with limited computational capability, rules out the possibility of an omniscient agent that has experienced all situations and knows how to act optimally in all states, even if the agent knows the dynamics. Thus, the agent has to act in the world while learning to become competent.
|
| 18 |
+
|
| 19 |
+
Based on the knowledge of dynamics and its computational resources, the agent is imbued with a local search procedure in the form of trajectory optimization. While the agent would certainly benefit from the most powerful of trajectory optimization algorithms, it is plausible that very complex procedures are still insufficient or inadmissible due to the complexity or inherent unpredictability of the environment. Limited computational resources may also prevent these powerful methods from real-time operation. While the trajectory optimizer may be insufficient by itself, we show that it provides a powerful vehicle for the agent to explore and learn about the world.
|
| 20 |
+
|
| 21 |
+
Due to the limited capabilities of the agent, a natural expectation is for the agent to be moderately competent for new tasks that occur infrequently and skillful in situations that it encounters repeatedly by learning from experience. Based on this intuition, we propose the plan online and learn offline (POLO) framework for continual acting and learning. POLO is based on the tight synergistic coupling between local trajectory optimization, global value function learning, and exploration.
|
| 22 |
+
|
| 23 |
+
We will first provide intuitions for why there may be substantial performance degradation when acting greedily using an approximate value function. We also show that value function learning can be accelerated and stabilized by utilizing trajectory optimization integrally in the learning process, and that a trajectory optimization procedure in conjunction with an approximate value function can compute near optimal actions. In addition, exploration is critical to propagate global information in value function learning, and for trajectory optimization to escape local solutions and saddle points. In POLO, the agent forms hypotheses on potential reward regions, and executes temporally coordinated action sequences through trajectory optimization. This is in contrast to strategies like $\epsilon -$ greedy and Boltzmann exploration that explore at the granularity of individual timesteps. The use of trajectory optimization enables the agent to perform directed and efficient exploration, which in turn helps to find better global solutions.
|
| 24 |
+
|
| 25 |
+

|
| 26 |
+
Figure 1: Examples of tasks solved with POLO. A 2D point agent navigating a maze without any directed reward signal, a complex 3D humanoid standing up from the floor, pushing a box, and inhand re-positioning of a cube to various orientations with a five-fingered hand. Video demonstration of our results can be found at: https://sites.google.com/view/polo-mpc.
|
| 27 |
+
|
| 28 |
+
The setting studied in the paper models many problems of interest in robotics and artificial intelligence. Local trajectory optimization becomes readily feasible when a nominal model and computational resources are available to an agent, and can accelerate learning of novel task instances. In this work, we study the case where the internal nominal dynamics model used by the agent is accurate. Nominal dynamics models based on knowledge of physics (Todorov et al., 2012), or through learning (Ljung, 1987), complements a growing body of work on successful simulation to reality transfer and system identification (Ross & Bagnell, 2012; Rajeswaran et al., 2016; Lowrey et al., 2018; OpenAI, 2018). Combining the benefits of local trajectory optimization for fast improvement with generalization enabled by learning is critical for robotic agents that live in our physical world to continually learn and acquire a large repertoire of skills.
|
| 29 |
+
|
| 30 |
+
# 2 THE POLO FRAMEWORK
|
| 31 |
+
|
| 32 |
+
The POLO framework combines three components: local trajectory optimization, global value function approximation, and an uncertainty and reward aware exploration strategy. We first present the motivation for each component, followed by the full POLO procedure.
|
| 33 |
+
|
| 34 |
+
# 2.1 DEFINITIONS, NOTATIONS, AND SETTING
|
| 35 |
+
|
| 36 |
+
We model the world as an infinite horizon discounted Markov Decision Process (MDP), which is characterized by the tuple: $\mathcal { M } = \{ \boldsymbol { S } , \mathcal { A } , \mathcal { R } , \mathcal { T } , \boldsymbol { \gamma } \}$ . $S \in \mathbb { R } ^ { n }$ and $\mathcal { A } \in \mathbb { R } ^ { m }$ represent the continuous (real-valued) state and action spaces respectively. $\mathcal { R } : \mathcal { S } \times \mathcal { A } \mathbb { R }$ represents the reward function. $\mathcal { T } : \mathcal { S } \times \mathcal { A } \times \mathcal { S } \to \mathbb { R } _ { + }$ represents the dynamics model, which in general could be stochastic, and $\gamma \in [ 0 , 1 )$ is the discount factor. A policy $\pi : S \times A \to \mathbb { R } _ { + }$ describes a mapping from states to actions. The value of a policy at a state is the average discounted reward accumulated by following the policy from the state: $\begin{array} { r } { V ^ { \bar { \pi } } ( s ) = \mathbb { E } [ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r ( s _ { t } , \pi ( s _ { t } ) ) \mid s _ { 0 } = s ] . } \end{array}$ . The overall performance of the policy over some start state distribution $\beta$ is given by: $J ^ { \beta } ( \pi ) = \mathbb { E } _ { s \sim \beta } [ V ^ { \pi } ( s ) ]$ . For notational simplicity, we use $s ^ { \prime }$ to denote the next state visited after (from) $s$ .
|
| 37 |
+
|
| 38 |
+
As described earlier, we consider the setting where an agent is dropped into a complex world. The agent has access to an internal model of the world. However, the world can be complex and diverse, ruling out the possibility of an omniscient agent. To improve its behavior, the agent has to explore and understand relevant parts of the state space while it continues to act in the world. Due to the availability of the internal model, the agent can revisit states it experienced in the world and reason about alternate potential actions and their consequences to learn more efficiently.
|
| 39 |
+
|
| 40 |
+
# 2.2 VALUE FUNCTION APPROXIMATION
|
| 41 |
+
|
| 42 |
+
The optimal value function describes the long term discounted reward the agent receives under the optimal policy. Defining the Bellman operator at state $s$ as:
|
| 43 |
+
|
| 44 |
+
$$
|
| 45 |
+
B V ( s ) = \operatorname* { m a x } _ { a } \mathbb { E } \left[ r ( s , a ) + \gamma V ( s ^ { \prime } ) \right] ,
|
| 46 |
+
$$
|
| 47 |
+
|
| 48 |
+
the optimal value function $V ^ { * }$ corresponds to the fixed point: $V ^ { * } ( s ) = B V ^ { * } ( s ) \forall s \in \mathcal { S }$ . For small, tabular MDPs, classical dynamic programming algorithms like value iteration can be used to obtain the optimal value function. The optimal policy can be recovered from the value function as: $\pi ^ { * } ( s ) = { \mathrm { \bar { a r g } } } \operatorname* { m a x } _ { a } \mathbb { E } [ r ( s , a ) + \gamma V ^ { * } ( s ^ { \prime } ) ]$ . For more complex MDPs, computing the optimal value function exactly is not tractable except in a few well known cases like the LQR (Astr ˚ om & Mur- ¨ ray, 2004) and LMDPs (Todorov, 2006; Dvijotham & Todorov, 2011). Thus, various approximate techniques have been considered in prior works. One popular approach is fitted value iteration (Bertsekas & Tsitsiklis, 1996; Munos & Szepesvari ´ , 2008), where a function approximator (e.g. neural network) is used to approximate the optimal value function. The core structure of fitted value iteration considers a collection of states (or a sampling distribution $\nu$ ), and a parametric value function approximator $\hat { V } _ { \theta }$ . Inspired by value iteration, fitted value iteration updates parameters as:
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
\theta _ { i + 1 } = \arg \operatorname* { m i n } _ { \theta } \mathbb { E } _ { s \sim \nu } \left[ \left( \hat { V } _ { \theta } ( s ) - \mathcal { B } \hat { V } _ { \theta _ { i } } ( s ) \right) ^ { 2 } \right]
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
where $B \hat { V } _ { \boldsymbol { \theta } _ { i } } ( s )$ are targets for the regression problem computed at the specific state $s$ according to Eq. (1). After sufficient iterations of the procedure in Eq. (2) to get a good approximation, the policy is recovered as $\begin{array} { r } { \hat { \pi } ( s ) = \arg \operatorname* { m a x } _ { a } \mathbb { E } [ r ( s , a ) + \gamma \hat { V } _ { \theta } ( s ^ { \prime } ) ] } \end{array}$ . The success and convergence of this overall procedure depends critically on at least two components: the capacity and structure of the function approximator $( \theta )$ ; and the sampling distribution $( \nu )$ .
|
| 55 |
+
|
| 56 |
+
Lemma 1. (Bertsekas & Tsitsiklis, 1996) Let $\hat { V }$ be an approximate value function with $\ell _ { \infty }$ error $\begin{array} { r } { \epsilon : = \operatorname* { m a x } _ { s } | \hat { V } ( s ) - V ^ { * } ( s ) | } \end{array}$ . Let $\hat { \pi } ( s ) = \arg \operatorname* { m a x } _ { a } \mathbb { E } [ r ( s , a ) + \gamma \hat { V } ( s ^ { \prime } ) ]$ be the induced greedy policy. For all MDPs and $\beta$ , the bound in Eq. (3) holds. Furthermore, for any size of the state space, there exist MDPs and $\hat { V }$ for which the bound is tight (holds with equality).
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
J ^ { \beta } ( \pi ^ { * } ) - J ^ { \beta } ( \hat { \pi } ) \leq \frac { 2 \gamma \epsilon } { 1 - \gamma }
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
Intuitively, this suggests that performance of $\hat { \pi }$ degrades with a dependence on effective problem horizon determined by $\gamma$ . This can be understood as the policy paying a price of $\epsilon$ at every timestep. Due to the use of function approximation, errors may be inevitable. In practice, we are often interested in temporally extended tasks where $\gamma \approx 1$ , and hence this possibility is concerning. Furthermore, the arg max operation in $\hat { \pi }$ could inadvertently exploit approximation errors to produce a poor policy. The performance of fitted value iteration based methods also rely critically on the sampling distribution to propagate global information (Munos & Szepesvari ´ , 2008), especially in sparse reward settings. For some applications, it may be possible to specify good sampling distributions using apriori knowledge of where the optimal policy should visit (e.g. based on demonstration data). However, automatically generating such sampling distributions when faced with a new task may be difficult, and is analogous to the problem of exploration.
|
| 63 |
+
|
| 64 |
+
# 2.3 TRAJECTORY OPTIMIZATION AND MODEL PREDICTIVE CONTROL
|
| 65 |
+
|
| 66 |
+
Trajectory optimization and model predictive control (MPC) have a long history in robotics and control systems (Garcia et al., 1989; Tassa et al., 2014)1. In MPC, starting from state $s _ { t }$ and using the knowledge of the dynamics model, a locally optimal sequence of actions (or policies) up to a moving horizon of $H$ is computed by solving the following optimization problem.
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
\begin{array} { r l } { \underset { \{ \tilde { \pi } _ { k } \} _ { k = t } ^ { t + H } } { \mathrm { m a x i m i z e } } } & { \mathbb { E } \left[ \overset { t + H - 1 } { \sum _ { k = t } ^ { t - 1 } } \gamma ^ { ( k - t ) } r ( \pmb { x } _ { t } , \pmb { u } _ { t } ) + \gamma ^ { H } r _ { f } ( \pmb { x } _ { t + H } ) \right] } \\ { \mathrm { s u b j e c t ~ t o } } & { \pmb { x } _ { k + 1 } \sim T ( \pmb { x } _ { k } , \pmb { u } _ { k } ) } \\ & { \pmb { u } _ { k } \sim \tilde { \pi } _ { t } ( \cdot | \pmb { x } _ { k } ) } \\ & { \pmb { x } _ { t } = s _ { t } . } \end{array}
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
Here, we use $\mathbf { \Delta } x , \mathbf { \Delta } u , \tilde { \pi }$ as dummy variables for states, actions, and policy to distinguish the “imagined” evolution of the MDP used for the trajectory optimization with the actual states (s) observed in the true evolution of the MDP. Here, $r ( { \pmb x } , { \pmb u } )$ represents the running reward which is the same as the MDP reward function, and $r _ { f } ( \pmb { x } _ { t + H } )$ represents a terminal reward function. Let $\{ \tilde { \pi } _ { k } ^ { * } \}$ be the local time-indexed policies obtained as the solution to the optimization problem in (4). After solving the optimization problem, the first local time-indexed policy is used as $\hat { \pi } _ { M P C } ( \cdot | s _ { t } ) : = \tilde { \pi } _ { t } ^ { \ast } ( \cdot | \boldsymbol { x } _ { t } )$ . The entire procedure is repeated again in the next time step $( t + 1 )$ . Note that we have defined the optimization problem over a sequence of feedback policies. However, if the dynamics is deterministic, a sequence of actions {uk}t+Hk=t can be optimized and used instead without any loss in performance. See Appendix C for further discussions. This approach has led to tremendous success in a variety of control systems such as power grids, chemical process control (Qina & Badgwellb, 2003), and more recently in robotics (Williams et al., 2016). Since MPC looks forward only $H$ steps, it is ultimately a local method unless coupled with a value function that propagates global information. In addition, we also provide intuitions for why MPC may help accelerate the learning of value functions. This synergistic effect between MPC and global value function forms a primary motivation for POLO.
|
| 73 |
+
|
| 74 |
+
# Impact of approximation errors in the value function
|
| 75 |
+
|
| 76 |
+
Lemma 2. Let $\hat { V }$ be an approximate value function with $\ell _ { \infty }$ error $\epsilon : = \operatorname* { m a x } _ { s } | \hat { V } ( s ) - V ^ { * } ( s ) |$ . Suppose the terminal reward in Eq. (4) is chosen as $r _ { f } ( s _ { H } ) = \hat { V } ( s _ { H } )$ , and let the MPC policy be $\hat { \pi } _ { M P C } ( \cdot | s _ { t } ) : = \tilde { \pi } _ { t } ^ { \ast } ( \cdot | \pmb { x } _ { t } )$ (from Eq. 4). Then, for all MDPs and $\beta$ , the performance of the MPC policy can be bounded as:
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
J ^ { \beta } ( \pi ^ { * } ) - J ^ { \beta } ( \hat { \pi } _ { M P C } ) \leq \frac { 2 \gamma ^ { H } \epsilon } { 1 - \gamma ^ { H } } .
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
Proof. The proof is provided in Appendix C.
|
| 83 |
+
|
| 84 |
+
This suggests that MPC (with $H > 1$ ) is less susceptible to approximation errors than greedy action selection. Also, without a terminal value function, we have $\dot { \epsilon } = \mathcal { O } ( r _ { \operatorname* { m a x } } / ( 1 - \gamma ) )$ in the worst case, which adds an undesirable scaling with the problem horizon.
|
| 85 |
+
|
| 86 |
+
Accelerating convergence of the value function Furthermore, MPC can also enable faster con
|
| 87 |
+
vergtor: his, considern the tabular $\mathrm { H }$ -step Bellg, for any n opand $\begin{array} { r } { \mathcal { B } ^ { H } V ( s ) : = \operatorname* { m a x } _ { a _ { 0 : H - 1 } } \mathbb { E } [ \sum _ { t = 0 } ^ { H - 1 } \gamma ^ { t } r _ { t } + \gamma ^ { H } V ( s _ { H } ) ] . } \end{array}$ $V _ { 1 }$ $V _ { 2 }$ $\begin{array} { r } { | \mathcal { B } ^ { H } V _ { 1 } - \mathcal { B } ^ { H } V _ { 2 } | _ { \infty } \leq \gamma ^ { H } | V _ { 1 } - V _ { 2 } | _ { \infty } . } \end{array}$ $B ^ { H }$
|
| 88 |
+
of global information for $H$ steps, thereby accelerating the convergence due to faster mixing. Note
|
| 89 |
+
that one way to realize $B ^ { H }$ is to simply apply $B H$ times, with each step providing a contraction by $\gamma$ .
|
| 90 |
+
In the general setting, it is unknown if there exists alternate, cheaper ways to realize $B ^ { H }$ . However,
|
| 91 |
+
for problems in continuous control, MPC based on local dynamic programming methods (Jacobson
|
| 92 |
+
& Mayne, 1970; Todorov & Li, 2005) provide an efficient way to approximately realize $B ^ { H }$ , which
|
| 93 |
+
can be used to accelerate and stabilize value function learning.
|
| 94 |
+
|
| 95 |
+
# 2.4 PLANNING TO EXPLORE
|
| 96 |
+
|
| 97 |
+
The ability of an agent to explore the relevant parts of the state space is critical for the convergence of many RL algorithms. Typical exploration strategies like $\epsilon$ -greedy and Boltzmann take exploratory actions with some probability on a per time-step basis. Instead, by using MPC, the agent can explore in the space of trajectories. The agent can consider a hypothesis of potential reward regions in the state space, and then execute the optimal trajectory conditioned on this belief, resulting in a
|
| 98 |
+
|
| 99 |
+
1: Inputs: planning horizon $H$ , value function parameters $\theta _ { 1 } , \theta _ { 2 } , \dots . \theta _ { K }$ , mini-batch size $n$ , num
|
| 100 |
+
ber of gradient steps $G$ , update frequency $Z$
|
| 101 |
+
2: for $t = 1$ to $\infty$ do
|
| 102 |
+
3: Select action $a _ { t }$ according to MPC (Eq. 4) with terminal reward $r _ { f } ( s ) \equiv { \hat { V } } ( s )$ from Eq. (7)
|
| 103 |
+
4: Add the state experience $s _ { t }$ to replay buffer $\mathcal { D }$
|
| 104 |
+
5: if $\mod ( t , Z ) = 0$ then
|
| 105 |
+
6: for $G$ times do
|
| 106 |
+
7: Sample $n$ states from the replay buffer, and compute targets using Eq. (8)
|
| 107 |
+
8: Update the value functions using Eq. (6) (see Section 2.5 for details)
|
| 108 |
+
9: end for
|
| 109 |
+
10: end if
|
| 110 |
+
11: end for
|
| 111 |
+
|
| 112 |
+
temporally coordinated sequence of actions. By executing such coordinated actions, the agent can cover the state space more rapidly and intentionally, and avoid back and forth wandering that can slow down the learning. We demonstrate this effect empirically in Section 3.1.
|
| 113 |
+
|
| 114 |
+
To generate the hypothesis of potentially rewarding regions, we take a Bayesian view and approximately track a posterior over value functions. Consider a motivating setting of regression, where we have a parametric function approximator $f _ { \theta }$ with prior $\mathbb { P } ( \boldsymbol { \theta } )$ . The dataset consists of input-output pairs: $\bar { \mathcal { D } } = ( x _ { i } , y _ { i } ) _ { i = 1 } ^ { n }$ , and we wish to approximate $\mathbb { P } ( \boldsymbol { \theta } | \mathcal { D } )$ . In the Bayesian linear regression setting with Gaussian prior and noise models, the solution to the following problem generates samples from the posterior (Osband et al., 2016; Azizzadenesheli et al., 2018a; Osband et al., 2018):
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\arg \operatorname* { m i n } _ { \theta } | | \tilde { y } _ { i } - f _ { \tilde { \theta } } ( x _ { i } ) - f _ { \theta } ( x _ { i } ) | | _ { 2 } ^ { 2 } + \frac { \sigma ^ { 2 } } { \lambda } | | \theta | | _ { 2 } ^ { 2 }
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
where $\tilde { y } _ { i } \sim \mathcal N ( y _ { i } , \sigma ^ { 2 } )$ is a noisy version of the target and $\tilde { \theta } \sim \mathbb { P } ( \theta )$ is a sample from the prior. Based on this, Osband et al. (2018) demonstrate the benefits of uncertainty estimation for exploration. Similarly, we use this procedure to obtain samples from the posterior for value function approximation, and utilize them for temporally coordinated action selection using MPC. We consider $K$ value function approximators $\hat { V } _ { \theta }$ with parameters $\theta _ { 1 } , \theta _ { 2 } , \dots \theta _ { K }$ independently trained based on Eq. (6). We consider the softmax of the different samples as the value at a state:
|
| 121 |
+
|
| 122 |
+
$$
|
| 123 |
+
\hat { V } ( s ) = \sum _ { k = 1 } ^ { K } \omega _ { k } ( s ) \hat { V } _ { { \boldsymbol \theta } _ { k } } ( s ) , ~ \mathrm { w h e r e } ~ \omega _ { k } ( s ) \stackrel { \mathrm { d e f } } { : = } \frac { \exp \big ( \kappa \hat { V } _ { { \boldsymbol \theta } _ { k } } ( s ) \big ) } { \sum _ { j = 1 } ^ { K } \exp \big ( \kappa \hat { V } _ { { \boldsymbol \theta } _ { j } } ( s ) \big ) }
|
| 124 |
+
$$
|
| 125 |
+
|
| 126 |
+
Since the above scheme approximates mean $^ +$ variance for small $\kappa > 0$ , this procedure encourages the agent to additionally explore parts of the state space where the disagreement between the function approximators is large. This corresponds to the broad notion of optimism in the face of uncertainty (Auer et al., 2002) which has been successful in a number of applications (Silver et al., 2016; Li et al., 2010).
|
| 127 |
+
|
| 128 |
+
# 2.5 FINAL ALGORITHM
|
| 129 |
+
|
| 130 |
+
To summarize, POLO utilizes a global value function approximation scheme, a local trajectory optimization subroutine, and an optimistic exploration scheme. POLO operates as follows: when acting in the world, the agent uses the internal model and always picks the optimal action suggested by MPC. Exploration is implicitly handled by tracking the value function uncertainties and the optimistic evaluation, as specified in Eq. (6) and (7). All the experience (visited states) from the world are stored into a replay buffer $\mathcal { D }$ , with old experiences discarded if the buffer becomes full. After every $Z$ steps of acting in the world and collecting experience, the value functions are updated by: (a) constructing the targets according to Eq. (8); (b) performing regression using the randomized prior scheme using Eq. (6) where $f _ { \theta }$ corresponds to the value function approximator. For state $s$ in the buffer and value network $k$ with parameters $\theta _ { k }$ , the targets are constructed as:
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
y ^ { k } ( s ) = \operatorname* { m a x } _ { \{ \tilde { \pi } _ { t } \} _ { t = 0 } ^ { N - 1 } } \mathbb { E } \left[ \sum _ { t = 0 } ^ { N - 1 } \gamma ^ { t } r ( x _ { t } , u _ { t } ) + \gamma ^ { N } \hat { V } _ { \theta _ { k } } ( x _ { N } ) \right] , \mathrm { ~ w h e r e ~ } x _ { 0 } = s , u _ { t } \sim \tilde { \pi } _ { t } ( \cdot | x _ { t } ) ,
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
which corresponds to solving a $N -$ step trajectory optimization problem starting from state $s$ . As described earlier, using trajectory optimization to generate the targets for fitting the value approximation accelerates the convergence and makes the learning more stable, as verified experimentally in Section 3.3. The overall procedure is summarized in Algorithm 1.
|
| 137 |
+
|
| 138 |
+
# 3 EMPIRICAL RESULTS AND DISCUSSION
|
| 139 |
+
|
| 140 |
+
Through empirical evaluation, we wish to answer the following questions:
|
| 141 |
+
|
| 142 |
+
1. Does trajectory optimization in conjunction with uncertainty estimation in value function approximation result in temporally coordinated exploration strategies? 2. Can the use of an approximate value function help reduce the planning horizon for MPC? 3. Does trajectory optimization enable faster and more stable value function learning?
|
| 143 |
+
|
| 144 |
+
Before answering the questions in detail, we first point out that POLO can scale up to complex high-dimensional agents like 3D humanoid and dexterous anthropomorphic hand (OpenAI, 2018; Rajeswaran et al., 2018) which are among the most complex control tasks studied in robot learning. Video demonstration can be found at: https://sites.google.com/view/polo-mpc
|
| 145 |
+
|
| 146 |
+
# 3.1 TRAJECTORY OPTIMIZATION FOR EXPLORATION
|
| 147 |
+
|
| 148 |
+
Exploration is critical in tasks where immediate rewards are not well aligned with long-term objectives. As a representative problem, we consider a point mass agent in different 2D worlds illustrated in figure 2: a simple finite size box with no obstacles and a maze. This domain serves to provide an intuitive understanding of the interaction between trajectory optimization and exploration while also enabling visualization of results. In the extreme case of no rewards in the world, an agent with only local information would need to continuously explore. We wish to understand how POLO, with its ensemble of value functions tracking uncertainties, uses MPC to perform temporally coordinated actions. Our baseline is an agent that employs random exploration on a per-time-step basis; MPC without a value function would not move due to lack of local extrinsic rewards. Second, we consider an agent that performs uncertainty estimation similar to POLO but selects actions greedily (i.e. POLO with a planning horizon of 1). Finally, we consider the POLO agent which tracks value uncertainties and selects actions using a 32-step MPC procedure. We observe that POLO achieves more region coverage in both point mass worlds compared to alternatives, as quantitatively illustrated in figure 2(a). The ensemble value function in POLO allows the agent to recognize the true, low value of visited states, while preserving an optimistic value elsewhere. Temporally coordinated action is necessary in the maze world; POLO is able to navigate down all corridors.
|
| 149 |
+
|
| 150 |
+

|
| 151 |
+
Figure 2: 2D point mass navigation task in a world with no rewards. Fig. (a) describes the percentage of an occupancy grid covered by the agent, averaged over 10 random seeds. Fig. (b) depicts an agent over 1000 timesteps; red indicates regions of high value (uncertainty) while blue denotes low. The value function learns to assign the true, low values to regions visited and preserves high values to unexplored regions; uncertainty and long horizons are observed to be critical for exploration.
|
| 152 |
+
|
| 153 |
+

|
| 154 |
+
Figure 3: Performance as a function of planning horizon for the humanoid getup (left), and inhand manipulation task (middle). POLO was trained for 12000 and 2500 environment timesteps, respectively. We test POLO with the learned terminal value function against pure MPC and compare average reward obtained over 3 trials in the getup task and 1000 steps in the manipulation task. On the right, a value function trained with POLO is used by MPC without per-time-step rewards. The agent’s height increases, indicating a task-relevant value function. For comparison, we also include the trace of POLO with dense rewards and multiple trials (dashed vertical lines)
|
| 155 |
+
|
| 156 |
+
# 3.2 VALUE FUNCTION APPROXIMATION FOR TRAJECTORY OPTIMIZATION
|
| 157 |
+
|
| 158 |
+
Next, we study if value learning helps to reduce the planning horizon for MPC. To this end, we consider two high dimensional tasks: humanoid getup where a 3D humanoid needs to learn to stand up from the ground, and in-hand manipulation where a five-fingered hand needs to re-orient a cube to a desired configuration that is randomized every 75 timesteps. For simplicity, we use the MPPI algorithm (Williams et al., 2016) for trajectory optimization. In Figure 3, we consider MPC and the full POLO algorithm of the same horizon, and compare their performance after $T$ steps of learning in the world. We find that POLO uniformly dominates MPC, indicating that the agent is consolidating experience from the world into the value function. With even the longest planning horizon, the humanoid getup task has a local solution where it can quickly sit up, but cannot discover a chain of actions required to stand upright. POLO’s exploration allows the agent to escape the local solution, and consolidate the experiences to consistently stand up. To further test if the learned value function is task aligned, we take the value function trained with POLO, and use it with MPC without any intermediate rewards. Thus, the MPC is optimizing a trajectory of length $H = 6 4$ purely using the value function of the state after 64 steps. We observe, in Figure 3, that even in this case, the humanoid is able to consistently increase its height from the floor indicating that the value function has captured task relevant details. We note that a greedy optimization procedure with this value function does not yield good results, indicating that the learned value function is only approximate and not good everywhere.
|
| 159 |
+
|
| 160 |
+
While the humanoid getup task presents temporal complexity requiring a large planning horizon, the in-hand manipulation task presents spatial complexity. A large number of time steps are not needed to manipulate the object, and a strong signal about progress is readily received. However, since the targets can change rapidly, the variance in gradient estimates can be very high for function approximation methods (Ghosh et al., 2018). Trajectory optimization is particularly well suited for such types of problems, since it can efficiently compute near-optimal actions conditioned on the instance, facilitating function approximation. Note that the trajectory optimizer is unaware that the targets can change, and attempts to optimize a trajectory for a fixed instance of the task. The value function consolidates experience over multiple target changes, and learns to give high values to states that are not just immediately good but provide a large space of affordances for the possible upcoming tasks.
|
| 161 |
+
|
| 162 |
+
# 3.3 TRAJECTORY OPTIMIZATION FOR VALUE FUNCTION LEARNING
|
| 163 |
+
|
| 164 |
+
Finally, we study if trajectory optimization can aid in accelerating and stabilizing value function learning. To do so, we again consider the humanoid getup task and study different variants of POLO. In particular, we vary the horizon $( N )$ used for computing the value function targets in Eq. (8). We observe that as we increase $N$ , the agent learns the value function with fewer interactions with the world, as indicated in Figure 4(a). The benefit of using $N -$ step returns for stable value function learning and actor-critic methods have been observed in numerous works (Mnih et al., 2016; Munos et al., 2016; Schulman et al., 2016), and our experiments reinforce these observations. The use of $N -$ step returns help to traverse the bias-variance trade-off. Furthermore, due to the discounting, the contribution of $V { \left( s _ { N } \right) }$ is made weaker and thus the targets are more stable. This mirrors ideas such as target networks (Mnih et al., 2015) commonly used to stabilize training. As discussed earlier, longer horizons make trajectory optimization more tolerant to errors in the value function. To illustrate this, we take the value function trained with POLO on a nominal humanoid model, and perturb the model by changing the size of the head to model value function degradation. Figure 4(b) shows that a longer planning horizon can mitigate this degradation. This presents intriguing future possibility of using MPC to improve transfer learning between tasks or robot platforms.
|
| 165 |
+
|
| 166 |
+

|
| 167 |
+
Figure 4: Usefulness of trajectory optimization for value function learning. (a) illustrates that $N$ -step trajectory optimization accelerates the learning of the value function. $N { = } 1$ corresponds to trajectory centric fitted value iteration. A difference of 0.2 reward to MPC amounts to approximately $5 0 \%$ performance improvement. (b) value function trained for the nominal model (head size of 1.0) used with MPC for models with larger sizes.
|
| 168 |
+
|
| 169 |
+
# 4 RELATED WORK
|
| 170 |
+
|
| 171 |
+
Planning and learning: Combining elements of planning and search with approximate value functions has been explored in discrete game domains (Silver et al., 2017; Anthony et al., 2017) where an MCTS planner is informed by the value function. Alternatively, using prior data to guide the search process in continuous MCTS without explicitly learning a value function has also been explored (Rajamaki & H ¨ am¨ al¨ ainen ¨ , 2017). Related to this, Atkeson (1993) uses an offline trajectory library for action selection in real-time, but do not explicitly consider learning parametric value functions. RTDP (Barto et al., 1995) considers learning value functions based on states visited by the agent, but does not explicitly employ the use of planning. Zhong et al. (2013) consider the setting of learning a value function to help MPC, and found the contribution of value functions to be weak for the relatively simple tasks considered in their work. Approaches such as cost shaping $\mathrm { N g }$ et al., 1999) can also be interpreted as hand specifying an approximate value function, and has been successfully employed with MPC (Tassa et al., 2012). However, this often require careful human design and task specific expertise. An alternative set of approaches (Ross et al., 2011; Levine & Koltun, 2013; Mordatch & Todorov, 2014; Sun et al., 2018b) use local trajectory optimization to generate a dataset for training a global policy through imitation learning. These approaches do not use MPC at runtime, and hence may often require retraining for changes in tasks or environment. Furthermore, results from this line of work have been demonstrated primarily in settings where trajectory optimization alone can solve the task, or use human demonstration data. In contrast, through our exploration schemes, we are able to improve over the capabilities of MPC and solve tasks where MPC is unsuccessful.
|
| 172 |
+
|
| 173 |
+
Planning and exploration: Exploration is a well-studied and important problem in RL. The importance of having a wide and relevant state distribution has been pointed out in numerous prior works (Munos & Szepesvari ´ , 2008; Bagnell et al., 2003; Rajeswaran et al., 2017). Strategies such as $\epsilon$ -greedy or Gaussian exploration have recently been used to successfully solve a large number of dense reward problems. As the reward becomes sparse or heavily delayed, such strategies become intractable in high-dimensional settings. Critically, these approaches perform exploration on a per time-step basis, which can lead to back and forth wandering preventing efficient exploration. Parameter-space exploration (Plappert et al., 2017; Fortunato et al., 2017) methods do not explore at each time step, but rather generate correlated behaviors based on explored parameters at the start. However, such approaches do not consider exploration as an intentional act, but is rather a deviation from a well defined objective for the agent. Deep exploration strategies (Osband et al., 2013) sample a value function from the posterior and use it for greedy action selection. Approaches based on notions of intrinsic motivation and information gain (Chentanez et al., 2005; Stadie et al., 2015; Houthooft et al., 2016; Pathak et al., 2017; Bellemare et al., 2016) also explicitly introduce exploration bonuses into the agent’s reward system. However, such approaches critically do not have the element of planning to explore; thus the agent may not actually reach regions of high predicted reward because it does not know how to get there. Our work is perhaps closest to the $E 3$ framework of Kearns & Singh (2002), which considers altered MDPs with different reward functions, and executes the optimal action under that MDP. However solving these altered MDPs is expensive and their solution is quickly discarded. MPC on the other hand can quickly solve for local instance-specific solutions in these MDPs.
|
| 174 |
+
|
| 175 |
+
Model-free RL: Our work investigates how much training times can be reduced over model-free methods when the internal model is an accurate representation of the world model. As a representative number, Schulman et al. (2015) report approximately 5 days of agent experience and 128 CPU core hours for solving tasks such as getting up from the ground. In contrast, POLO requires only 12 CPU core hours and 96 seconds of agent experience. Recently, policy gradient methods were also used for in-hand manipulation tasks (OpenAI, 2018), where 3 years of simulated experience and 500 CPU hours were used for object reorientation tasks. For a similar task, POLO only required 1 CPU hour. Of course, model-free methods do not require an accurate internal model, but our results suggest that much less experience may be required for the control aspect of the problem. Our work can be viewed as a strong model-based baseline that model-free RL can strive to compete with, as well as a directly useful method for researchers studying simulation to reality transfer.
|
| 176 |
+
|
| 177 |
+
In an alternate line of work, internal models have been used for variance reduction purposes in model-free RL (Feinberg et al., 2018; Buckman et al., 2018), in contrast to our use of MPC. Related to this, Azizzadenesheli et al. (2018b) consider learning an internal model for discrete action domains like ALE and use short horizon MCTS for planning. Similarly, Nagabandi et al. (2018) learn a dynamics model in simple continuous control tasks and use a random shooting MPC method for action selection. These lines of work consider the interplay between learning dynamics models and planning procedures, and try to improve the quality of internal models. As a consequence, they focus on domains where simple action selection procedures with accurate models obtain near-optimal performance. In our work, we show that we can learn value functions to help real-time action selection with MPC on some of the most high-dimensional continuous control tasks studied recently. Thus, the two lines of work are complementary, and combining POLO with model learning would make for an interesting line of future work.
|
| 178 |
+
|
| 179 |
+
# 5 CONCLUSIONS AND FUTURE WORK
|
| 180 |
+
|
| 181 |
+
In this work we presented POLO, which combines the strengths of trajectory optimization and value function learning. In addition, we studied the benefits of planning for exploration in settings where we track uncertainties in the value function. Together, these components enabled control of complex agents like 3D humanoid and five-fingered hand. In this work, we assumed access to an accurate internal dynamics model. A natural next step is to study the influence of approximation errors in the internal model and improving it over time using the real world interaction data.
|
| 182 |
+
|
| 183 |
+
# REFERENCES
|
| 184 |
+
|
| 185 |
+
Thomas Anthony, Zheng Tian, and David Barber. Thinking fast and slow with deep learning and tree search. In Advances in Neural Information Processing Systems, pp. 5360–5370, 2017.
|
| 186 |
+
|
| 187 |
+
Karl Johan Astr ˚ om and Richard M. Murray. Feedback systems an introduction for scientists and ¨ engineers. 2004.
|
| 188 |
+
|
| 189 |
+
Christopher G. Atkeson. Using local trajectory optimizers to speed up global optimization in dynamic programming. In NIPS, 1993.
|
| 190 |
+
|
| 191 |
+
Peter Auer, Nicolo Cesa-Bianchi, and Paul Fischer. Finite-time analysis of the multiarmed bandit problem. Machine learning, 47(2-3):235–256, 2002.
|
| 192 |
+
|
| 193 |
+
Kamyar Azizzadenesheli, Emma Brunskill, and Anima Anandkumar. Efficient exploration through bayesian deep q-networks. CoRR, abs/1802.04412, 2018a.
|
| 194 |
+
|
| 195 |
+
Kamyar Azizzadenesheli, Brandon Yang, Weitang Liu, Emma Brunskill, Zachary Chase Lipton, and Anima Anandkumar. Sample-efficient deep rl with generative adversarial tree search. CoRR, abs/1806.05780, 2018b.
|
| 196 |
+
|
| 197 |
+
J. Andrew Bagnell, Sham M. Kakade, Andrew Y. Ng, and Jeff G. Schneider. Policy search by dynamic programming. In NIPS, 2003.
|
| 198 |
+
|
| 199 |
+
Andrew G. Barto, Steven J. Bradtke, and Satinder P. Singh. Learning to act using real-time dynamic programming. Artif. Intell., 72:81–138, 1995.
|
| 200 |
+
|
| 201 |
+
Marc G. Bellemare, Sriram Srinivasan, Georg Ostrovski, Tom Schaul, David Saxton, and Remi ´ Munos. Unifying count-based exploration and intrinsic motivation. In NIPS, 2016.
|
| 202 |
+
|
| 203 |
+
Dimitri Bertsekas and John Tsitsiklis. Neuro-dynamic Programming. 1996.
|
| 204 |
+
|
| 205 |
+
Jacob Buckman, Danijar Hafner, George Tucker, Eugene Brevdo, and Honglak Lee. Sampleefficient reinforcement learning with stochastic ensemble value expansion. arXiv preprint arXiv:1807.01675, 2018.
|
| 206 |
+
|
| 207 |
+
Nuttapong Chentanez, Andrew G Barto, and Satinder P Singh. Intrinsically motivated reinforcement learning. In Advances in neural information processing systems, pp. 1281–1288, 2005.
|
| 208 |
+
|
| 209 |
+
Krishnamurthy Dvijotham and Emanuel Todorov. A unifying framework for linearly solvable control. In UAI, 2011.
|
| 210 |
+
|
| 211 |
+
Vladimir Feinberg, Alvin Wan, Ion Stoica, Michael I. Jordan, Joseph Gonzalez, and Sergey Levine. Model-based value estimation for efficient model-free reinforcement learning. CoRR, abs/1803.00101, 2018.
|
| 212 |
+
|
| 213 |
+
Meire Fortunato, Mohammad Gheshlaghi Azar, Bilal Piot, Jacob Menick, Ian Osband, Alex Graves, Vlad Mnih, Remi Munos, Demis Hassabis, Olivier Pietquin, et al. Noisy networks for exploration. arXiv preprint arXiv:1706.10295, 2017.
|
| 214 |
+
|
| 215 |
+
Carlos E. Garcia, David M. Prett, and Manfred Morari. Model predictive control: Theory and practice - a survey. Automatica, 25:335–348, 1989.
|
| 216 |
+
|
| 217 |
+
Dibya Ghosh, Avi Singh, Aravind Rajeswaran, Vikash Kumar, and Sergey Levine. Divide-andconquer reinforcement learning. In ICLR, 2018.
|
| 218 |
+
|
| 219 |
+
Rein Houthooft, Xi Chen, Yan Duan, John Schulman, Filip De Turck, and Pieter Abbeel. Vime: Variational information maximizing exploration. In Advances in Neural Information Processing Systems, pp. 1109–1117, 2016.
|
| 220 |
+
|
| 221 |
+
David Jacobson and David Mayne. Differential Dynamic Programming. American Elsevier Publishing Company, 1970.
|
| 222 |
+
|
| 223 |
+
Michael Kearns and Satinder Singh. Near-optimal reinforcement learning in polynomial time. Machine learning, 49(2-3):209–232, 2002.
|
| 224 |
+
|
| 225 |
+
Vikash Kumar. Manipulators and Manipulation in high dimensional spaces. PhD thesis, University of Washington, Seattle, 2016. URL https://digital.lib.washington.edu/ researchworks/handle/1773/38104.
|
| 226 |
+
|
| 227 |
+
Sergey Levine and Vladlen Koltun. Guided policy search. In ICML, 2013.
|
| 228 |
+
|
| 229 |
+
Lihong Li, Wei Chu, John Langford, and Robert E. Schapire. A contextual-bandit approach to personalized news article recommendation. In WWW, 2010.
|
| 230 |
+
|
| 231 |
+
Lennart Ljung. System identification: theory for the user. 1987.
|
| 232 |
+
|
| 233 |
+
Kendall Lowrey, Svetoslav Kolev, Jeremy Dao, Aravind Rajeswaran, and Emanuel Todorov. Reinforcement learning for non-prehensile manipulation: Transfer from simulation to physical system. CoRR, abs/1803.10371, 2018.
|
| 234 |
+
|
| 235 |
+
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.
|
| 236 |
+
|
| 237 |
+
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 ICML, 2016.
|
| 238 |
+
|
| 239 |
+
Igor Mordatch and Emanuel Todorov. Combining the benefits of function approximation and trajectory optimization. In RSS, 2014.
|
| 240 |
+
|
| 241 |
+
Remi Munos and Csaba Szepesv ´ ari. Finite-time bounds for fitted value iteration. ´ Journal of Machine Learning Research, 2008.
|
| 242 |
+
|
| 243 |
+
Remi Munos, Tom Stepleton, Anna Harutyunyan, and Marc G. Bellemare. Safe and efficient off- ´ policy reinforcement learning. In NIPS, 2016.
|
| 244 |
+
|
| 245 |
+
Anusha Nagabandi, Gregory Kahn, Ronald S. Fearing, and Sergey Levine. Neural network dynamics for model-based deep reinforcement learning with model-free fine-tuning. In ICRA, 2018.
|
| 246 |
+
|
| 247 |
+
Andrew Y. $\mathrm { N g }$ , Daishi Harada, and Stuart J. Russell. Policy invariance under reward transformations: Theory and application to reward shaping. In ICML, 1999.
|
| 248 |
+
|
| 249 |
+
OpenAI. Learning dexterous in-hand manipulation. ArXiv e-prints, 2018.
|
| 250 |
+
|
| 251 |
+
Ian Osband, Daniel Russo, and Benjamin Van Roy. (more) efficient reinforcement learning via posterior sampling. In Advances in Neural Information Processing Systems, pp. 3003–3011, 2013.
|
| 252 |
+
|
| 253 |
+
Ian Osband, Benjamin Van Roy, and Zheng Wen. Generalization and exploration via randomized value functions. In ICML, 2016.
|
| 254 |
+
|
| 255 |
+
Ian Osband, John Aslanides, and Albin Cassirer. Randomized prior functions for deep reinforcement learning. CoRR, abs/1806.03335, 2018.
|
| 256 |
+
|
| 257 |
+
Deepak Pathak, Pulkit Agrawal, Alexei A Efros, and Trevor Darrell. Curiosity-driven exploration by self-supervised prediction. In International Conference on Machine Learning (ICML), volume 2017, 2017.
|
| 258 |
+
|
| 259 |
+
Matthias Plappert, Rein Houthooft, Prafulla Dhariwal, Szymon Sidor, Richard Y Chen, Xi Chen, Tamim Asfour, Pieter Abbeel, and Marcin Andrychowicz. Parameter space noise for exploration. arXiv preprint arXiv:1706.01905, 2017.
|
| 260 |
+
|
| 261 |
+
S. Joe Qina and Thomas A. Badgwellb. A survey of industrial model predictive control technology. Control Engineering Practice, 2003.
|
| 262 |
+
|
| 263 |
+
Joose Rajamaki and Perttu H ¨ am¨ al¨ ainen. Augmenting sampling based controllers with machine ¨ learning. In Proceedings of the ACM SIGGRAPH / Eurographics Symposium on Computer Animation, SCA ’17, pp. 11:1–11:9, New York, NY, USA, 2017. ACM. ISBN 978-1-4503-5091- 4. doi: 10.1145/3099564.3099579. URL http://doi.acm.org/10.1145/3099564. 3099579.
|
| 264 |
+
|
| 265 |
+
Aravind Rajeswaran, Sarvjeet Ghotra, Balaraman Ravindran, and Sergey Levine. Epopt: Learning robust neural network policies using model ensembles. In ICLR, 2016.
|
| 266 |
+
|
| 267 |
+
Aravind Rajeswaran, Kendall Lowrey, Emanuel Todorov, and Sham Kakade. Towards Generalization and Simplicity in Continuous Control. In NIPS, 2017.
|
| 268 |
+
|
| 269 |
+
Aravind Rajeswaran, Vikash Kumar, Abhishek Gupta, Giulia Vezzani, John Schulman, Emanuel Todorov, and Sergey Levine. Learning Complex Dexterous Manipulation with Deep Reinforcement Learning and Demonstrations. In Proceedings of Robotics: Science and Systems (RSS), 2018.
|
| 270 |
+
|
| 271 |
+
Stephane Ross and J. Andrew Bagnell. Agnostic system identification for model-based reinforce- ´ ment learning. In ICML, 2012.
|
| 272 |
+
|
| 273 |
+
Stephane Ross, Geoffrey Gordon, and Drew Bagnell. A reduction of imitation learning and struc-´ tured prediction to no-regret online learning. In Proceedings of the fourteenth international conference on artificial intelligence and statistics, pp. 627–635, 2011.
|
| 274 |
+
|
| 275 |
+
John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. Highdimensional continuous control using generalized advantage estimation. arXiv preprint arXiv:1506.02438, 2015.
|
| 276 |
+
|
| 277 |
+
John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. Highdimensional continuous control using generalized advantage estimation. In ICLR, 2016.
|
| 278 |
+
|
| 279 |
+
David Silver, Aja Huang, Chris J. Maddison, Arthur Guez, Laurent Sifre, George van den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Vedavyas Panneershelvam, Marc Lanctot, Sander Dieleman, Dominik Grewe, John Nham, Nal Kalchbrenner, Ilya Sutskever, Timothy P. Lillicrap, Madeleine Leach, Koray Kavukcuoglu, Thore Graepel, and Demis Hassabis. Mastering the game of go with deep neural networks and tree search. Nature, 529:484–489, 2016.
|
| 280 |
+
|
| 281 |
+
David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton, et al. Mastering the game of go without human knowledge. Nature, 550(7676):354, 2017.
|
| 282 |
+
|
| 283 |
+
Bradly C Stadie, Sergey Levine, and Pieter Abbeel. Incentivizing exploration in reinforcement learning with deep predictive models. arXiv preprint arXiv:1507.00814, 2015.
|
| 284 |
+
|
| 285 |
+
Wen Sun, J. Andrew Bagnell, and Byron Boots. Truncated horizon policy search: Combining reinforcement learning & imitation learning. CoRR, abs/1805.11240, 2018a.
|
| 286 |
+
|
| 287 |
+
Wen Sun, Geoffrey J. Gordon, Byron Boots, and J. Andrew Bagnell. Dual policy iteration. CoRR, abs/1805.10755, 2018b.
|
| 288 |
+
|
| 289 |
+
Yuval Tassa, Tom Erez, and Emanuel Todorov. Synthesis and stabilization of complex behaviors through online trajectory optimization. In Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, pp. 4906–4913. IEEE, 2012.
|
| 290 |
+
|
| 291 |
+
Yuval Tassa, Nicolas Mansard, and Emanuel Todorov. Control-limited differential dynamic programming. 2014 IEEE International Conference on Robotics and Automation (ICRA), pp. 1168– 1175, 2014.
|
| 292 |
+
|
| 293 |
+
Evangelos Theodorou, Jonas Buchli, and Stefan Schaal. A generalized path integral control approach to reinforcement learning. Journal of Machine Learning Research, 11:3137–3181, 2010.
|
| 294 |
+
|
| 295 |
+
Emanuel Todorov. Linearly-solvable markov decision problems. In NIPS, 2006.
|
| 296 |
+
|
| 297 |
+
Emanuel Todorov and Weiwei Li. A generalized iterative lqg method for locally-optimal feedback control of constrained nonlinear stochastic systems. In ACC, 2005.
|
| 298 |
+
|
| 299 |
+
Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In IROS, 2012.
|
| 300 |
+
|
| 301 |
+
Grady Williams, Paul Drews, Brian Goldfain, James M Rehg, and Evangelos A Theodorou. Aggressive driving with model predictive path integral control. In Robotics and Automation (ICRA), 2016 IEEE International Conference on, pp. 1433–1440. IEEE, 2016.
|
| 302 |
+
|
| 303 |
+
Mingyuan Zhong, Mikala Johnson, Yuval Tassa, Tom Erez, and Emanuel Todorov. Value function approximation and model predictive control. In Adaptive Dynamic Programming And Reinforcement Learning (ADPRL), 2013 IEEE Symposium on, pp. 100–107. IEEE, 2013.
|
| 304 |
+
|
| 305 |
+
# A APPENDIX: EXPERIMENTAL DETAILS, HUMANOID
|
| 306 |
+
|
| 307 |
+
The model used for the humanoid experiments was originally distributed with the MuJoCo (Todorov et al., 2012) software package and modified for our use. The model nominally has 27 degrees of freedom, including the floating base. It utilizes direct torque actuation for control, necessitating a small timestep of 0.008 seconds. The actuation input is limited to $\pm 1 . 0$ , but the original gear ratios are left unchanged.
|
| 308 |
+
|
| 309 |
+
For POLO, the choice of inputs for the value function involves a few design decisions. We take inspiration from robotics by using only easily observed values.
|
| 310 |
+
|
| 311 |
+
Dims. Observation
|
| 312 |
+
6 Direction & Normal Vector, Torso
|
| 313 |
+
3 Direction Vector, Neck to R. Hand
|
| 314 |
+
3 Direction Vector, Neck to L. Hand
|
| 315 |
+
3 Direction Vector, Hip to R. Foot
|
| 316 |
+
3 Direction Vector, Hip to L. Foot
|
| 317 |
+
5 Height, Root, Hands, & Feet
|
| 318 |
+
6 Root Velocities
|
| 319 |
+
5 Touch Sensors, Head, Hands, & Feet
|
| 320 |
+
Value Parameter
|
| 321 |
+
0.99 $\gamma$ discount Factor
|
| 322 |
+
64 Planning Horizon Length
|
| 323 |
+
120 MPPI Rollouts
|
| 324 |
+
0.2 MPPI Noise $\sigma$
|
| 325 |
+
1.25 MPPI Temperature
|
| 326 |
+
|
| 327 |
+
For value function approximation in POLO for the humanoid tasks, we use an ensemble of 6 neural networks, each of which has 2 layers with 16 hidden parameters each; tanh is used for non-linearity. Training is performed with 64 gradient steps on minibatches of size 32, using ADAM with default parameters, every 16 timesteps the agent experiences.
|
| 328 |
+
|
| 329 |
+
In scenarios where the agent resets, we consider a horizon of 600 timesteps with 20 episodes, giving a total agent lifetime of 12000 timesteps or 96 seconds. When we consider no resets, we use the same total timesteps. A control cost is shared for each scenario, where we penalize an actuator’s applied force scaled by the inverse of the mass matrix. Task specific rewards are as follows.
|
| 330 |
+
|
| 331 |
+
# A.1 HUMANOID GETUP
|
| 332 |
+
|
| 333 |
+
In the getup scenario, the agent is initialized in a supine position, and is required to bring its root height to a target of 1.1 meters. The reward functions used are as follows. In the non-sparse case, the difficulty in this task is eschewing the immediate reward for sitting in favor of the delayed reward of standing; this sequence is non-trivial to discover.
|
| 334 |
+
|
| 335 |
+
$$
|
| 336 |
+
R ( s ) = \{ \begin{array} { l l } { 1 . 0 - ( 1 . 2 5 - R o o t _ { z } ) , } & { \mathrm { i f ~ } R o o t _ { z } \leq 1 . 2 5 } \\ { 1 . 0 , } & { \mathrm { o t h e r w i s e } } \end{array} , R _ { s p a r s e } ( s ) = \{ \begin{array} { l l } { 0 . 0 , } & { \mathrm { i f ~ } R o o t _ { z } \leq 1 . 2 5 } \\ { 1 . 0 , } & { \mathrm { o t h e r w i s e } } \end{array}
|
| 337 |
+
$$
|
| 338 |
+
|
| 339 |
+
# A.2 HUMANOID WALK
|
| 340 |
+
|
| 341 |
+
In the walking scenario, the agent is initialized in an upright configuration. We specify a reward function that either penalizes deviation from a target height of 1.1 meters, or penalizes the deviation from both a target speed of 1.0 meters/second and the distance from the world’s $\mathbf { X }$ -axis to encourage the agent to walk in a straight line. We choose a target speed as opposed to rewarding maximum speed to encourage stable walking gaits.
|
| 342 |
+
|
| 343 |
+
$$
|
| 344 |
+
R ( s ) = \left\{ \begin{array} { l l } { - ( 1 . 2 5 - R o o t _ { z } ) , } & { \mathrm { i f ~ } R o o t _ { z } \leq 1 . 2 5 } \\ { 1 . 0 - | 1 . 0 - V e l _ { x } | - | R o o t _ { x } | , } & { \mathrm { o t h e r w i s e } } \end{array} \right.
|
| 345 |
+
$$
|
| 346 |
+
|
| 347 |
+
# A.3 HUMANOID BOX
|
| 348 |
+
|
| 349 |
+
For the box environment, we place a 0.9 meter wide cube in front of the humanoid, which needs to be pushed to a specific point. The friction between the box and ground is very low, however, and most pushes cause the box to slide out of reach; POLO learns to better limit the initial push to
|
| 350 |
+
|
| 351 |
+
control the box to the target.
|
| 352 |
+
|
| 353 |
+
$$
|
| 354 |
+
R ( s ) = \left\{ \begin{array} { l l } { - ( 1 . 2 5 - R o o t _ { z } ) , } & { \mathrm { i f ~ } R o o t _ { z } \leq 1 . 2 5 } \\ { 2 . 0 - \| B o x _ { x y } - R o o t _ { x y } \| _ { 2 } , } & { \mathrm { e l s e ~ i f ~ } | B o x _ { x y } - R o o t _ { x y } | _ { 2 } > 0 . 8 } \\ { 4 . 0 - 2 * \| B o x _ { x y } - T a r g e t _ { x y } \| _ { 2 } , } & { \mathrm { o t h e r w i s e } } \end{array} \right.
|
| 355 |
+
$$
|
| 356 |
+
|
| 357 |
+
In this setup, the observation vector increases with the global position of the box, and the dimensionality of the system increase by 6. The box initially starts 1.5 meters in front of the humanoid, and needs to be navigated to a position 2.5 meters in front of the humanoid.
|
| 358 |
+
|
| 359 |
+
# B APPENDIX: EXPERIMENTAL DETAILS, HAND MANIPULATION
|
| 360 |
+
|
| 361 |
+
We use the Adroit hand model (Kumar, 2016) and build on top of the hand manipulation task suite of Rajeswaran et al. (2018). The hand is position controlled and the dice is modeled as a free object with 3 translational degrees of freedom and a ball joint for three rotational degrees of freedom. The base of the hand is not actuated, and the agent controls only the fingers and wrist. The dice is presented to the hand initially in some randomized configuration, and the agent has to reorient the dice to the desired configuration. The desired configuration is randomized every 75 timesteps and the trajectory optimizer does not see this randomization. Thus the randomization can be interpreted as unmodelled external disturbances to the system. We use a simple reward function for the task:
|
| 362 |
+
|
| 363 |
+
$$
|
| 364 |
+
R ( s ) = - 0 . 5 \ell _ { 1 } ( x _ { o } , x _ { g } ) - 0 . 0 5 \ell _ { q u a t } ( q _ { o } , q _ { g } ) ,
|
| 365 |
+
$$
|
| 366 |
+
|
| 367 |
+
where $x _ { o }$ and $x _ { g }$ are the Cartesian positions of the object (dice) and goal respectively. The goal location for the dice is a fixed position in space and is based on the initial location of the palm of the hand. $\ell _ { 1 }$ is the L1 norm. $q _ { o }$ and $q _ { g }$ are the orientation configurations of object and goal, respectively, and expressed as quaternions with $\ell _ { q u a t }$ being the quaternion difference.
|
| 368 |
+
|
| 369 |
+
We use 80 trajectories in MPPI with temperature of 10. We use an ensemble of 6 networks with 2 layers and 64 units each. The value function is updated every 25 steps of interaction with the world, and we take 16 gradient steps each with a batch size of 16. These numbers were arrived at after a coarse hyperparameter search, and we expect that better hyperparameter settings could exist.
|
| 370 |
+
|
| 371 |
+
# C PROOF OF LEMMA 2 AND REMARKS
|
| 372 |
+
|
| 373 |
+
Let $\hat { \tau }$ and $\tau ^ { * }$ represent the trajectories of length $H$ that would be generated by applying $\hat { \pi } _ { M P C }$ and $\pi ^ { * }$ respectively on the MDP. Starting from some state $s$ , we have:
|
| 374 |
+
|
| 375 |
+
$$
|
| 376 |
+
V ^ { \ast } ( s ) - V ^ { \widehat { \pi } _ { M P C } } ( s ) = \mathbb { E } _ { \tau ^ { \ast } } \left[ \sum _ { t = 0 } ^ { H - 1 } \gamma ^ { t } r _ { t } + \gamma ^ { H } V ^ { \ast } ( s _ { H } ) \right] - \mathbb { E } _ { \widehat { \tau } } \left[ \sum _ { t = 0 } ^ { H - 1 } \gamma ^ { t } r _ { t } + \gamma ^ { H } V ^ { \widehat { \pi } _ { M P C } } ( s _ { H } ) \right]
|
| 377 |
+
$$
|
| 378 |
+
|
| 379 |
+
Adding and subtracting, $\mathbb { E } _ { \hat { \tau } } [ \sum _ { t } \gamma ^ { t } r _ { t } + \gamma ^ { H } V ^ { * } ( s _ { H } ) ]$ , we have:
|
| 380 |
+
|
| 381 |
+
$$
|
| 382 |
+
\begin{array} { r l } & { V ^ { * } ( s ) - V ^ { \widehat { \pi } M P C } ( s ) = \gamma ^ { H } \mathbb { E } _ { \widehat { \tau } } \left[ V ^ { * } ( s _ { H } ) - V ^ { \widehat { \pi } M P C } \left( s _ { H } \right) \right] } \\ & { \qquad + \mathbb { E } _ { \tau ^ { * } } \left[ \displaystyle \sum _ { t = 0 } ^ { H - 1 } \gamma ^ { t } r _ { t } + \gamma ^ { H } V ^ { * } ( s _ { H } ) \right] - \mathbb { E } _ { \widehat { \tau } } \left[ \displaystyle \sum _ { t = 0 } ^ { H - 1 } \gamma ^ { t } r _ { t } + \gamma ^ { H } V ^ { * } ( s _ { H } ) \right] . } \end{array}
|
| 383 |
+
$$
|
| 384 |
+
|
| 385 |
+
Since $\begin{array} { r } { \operatorname* { m a x } _ { s } | \hat { V } ( s ) - V ^ { * } ( s ) | = \epsilon , } \end{array}$ , we have:
|
| 386 |
+
|
| 387 |
+
$$
|
| 388 |
+
\begin{array} { r l } & { \mathbb { E } _ { \tau ^ { * } } \left[ \displaystyle \sum _ { t = 0 } ^ { H - 1 } \gamma ^ { t } r _ { t } + \gamma ^ { H } V ^ { * } ( s _ { H } ) \right] \le \mathbb { E } _ { \tau ^ { * } } \left[ \displaystyle \sum _ { t = 0 } ^ { H - 1 } \gamma ^ { t } r _ { t } + \gamma ^ { H } \hat { V } ( s _ { H } ) \right] + \gamma ^ { H } \epsilon } \\ & { \mathbb { E } _ { \hat { \tau } } \left[ \displaystyle \sum _ { t = 0 } ^ { H - 1 } \gamma ^ { t } r _ { t } + \gamma ^ { H } V ^ { * } ( s _ { H } ) \right] \ge \mathbb { E } _ { \hat { \tau } } \left[ \displaystyle \sum _ { t = 0 } ^ { H - 1 } \gamma ^ { t } r _ { t } + \gamma ^ { H } \hat { V } ( s _ { H } ) \right] - \gamma ^ { H } \epsilon } \end{array}
|
| 389 |
+
$$
|
| 390 |
+
|
| 391 |
+
Furthermore, since $\hat { \tau }$ was generated by applying $\hat { \pi } _ { M P C }$ which optimizes the actions using $\hat { V }$ as the terminal value/reward function, we have:
|
| 392 |
+
|
| 393 |
+
$$
|
| 394 |
+
\mathbb { E } _ { \hat { \tau } } \left[ \sum _ { t = 0 } ^ { H - 1 } \gamma ^ { t } r _ { t } + \gamma ^ { H } \hat { V } ( s _ { H } ) \right] \geq \mathbb { E } _ { \tau ^ { * } } \left[ \sum _ { t = 0 } ^ { H - 1 } \gamma ^ { t } r _ { t } + \gamma ^ { H } \hat { V } ( s _ { H } ) \right]
|
| 395 |
+
$$
|
| 396 |
+
|
| 397 |
+
using these bounds, we have:
|
| 398 |
+
|
| 399 |
+
$$
|
| 400 |
+
\begin{array} { r l } & { V ^ { * } ( s ) - V ^ { \hat { \pi } _ { M P C } } ( s ) \leq \gamma ^ { H } \mathbb { E } _ { \hat { \tau } } \left[ V ^ { * } ( s _ { H } ) - V ^ { \hat { \pi } _ { M P C } } ( s _ { H } ) \right] + 2 \gamma ^ { H } \epsilon } \\ & { \qquad \leq 2 \gamma ^ { H } \epsilon \left( 1 + \gamma ^ { H } + \gamma ^ { 2 } H + \dots \right) } \\ & { \qquad \leq \displaystyle \frac { 2 \gamma ^ { H } \epsilon } { 1 - \gamma ^ { H } } } \end{array}
|
| 401 |
+
$$
|
| 402 |
+
|
| 403 |
+
by recursively applying the first bound to $V ^ { * } ( s _ { H } ) - V ^ { \hat { \pi } _ { M P C } } ( s _ { H } )$ . This holds for all states, and hence for any distribution over states.
|
| 404 |
+
|
| 405 |
+
Notes and Remarks: For Eq. (13) to hold in general, and hence for the overall bound to hold, we require that the actions are optimized in closed loop. In other words, MPC has to optimize over the space of feedback policies as opposed to open loop actions. Many commonly used MPC algorithms like DDP and iLQG Jacobson & Mayne (1970); Todorov & Li (2005) have this property through the certainty equivalence principle for the case of Gaussian noise. For deterministic dynamics, which is the case for most common simulators like MuJoCo, Eq. (13) holds without the closed loop requirement. We summarize the different cases and potential ways to perform MPC below:
|
| 406 |
+
|
| 407 |
+
• In the case of deterministic dynamics, the optimal open loop trajectory and optimal local
|
| 408 |
+
feedback policies have the same performance up to finite horizon $H$ . Thus, any trajectory optimization algorithm, such as iLQG and MPPI can be used.
|
| 409 |
+
• In the case of stochastic dynamics with additive Gaussian noise, local dynamic programming methods like iLQG and DDP Todorov & Li (2005); Jacobson & Mayne (1970) provide efficient ways to optimize trajectories. These approaches also provide local feedback policies around the trajectories which are optimal due to the certainty equivalence principle.
|
| 410 |
+
In the case of general stochastic systems, various stochastic optimal control algorithms like path integral control Theodorou et al. (2010) can be used for the optimization. These situations are extremely rare in robotic control.
|
| 411 |
+
|
| 412 |
+
Finally, we also note that Sun et al. Sun et al. (2018a) propose and arrive at a similar bound in the context of imitation learning and reward shaping. They however assume that a policy can simultaneously optimize the approximate value function over $H$ steps, which may not be possible for a parametric policy class. Since we consider MPC which is a non-parametric method (in the global sense), MPC can indeed simultaneously optimize for $H$ steps using $\hat { V }$ .
|
parse/train/Byey7n05FQ/Byey7n05FQ_content_list.json
ADDED
|
@@ -0,0 +1,1989 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "PLAN ONLINE, LEARN OFFLINE: EFFICIENT LEARNING ANDEXPLORATION VIA MODEL-BASED CONTROL",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
176,
|
| 8 |
+
98,
|
| 9 |
+
779,
|
| 10 |
+
138
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Kendall Lowrey∗1 Aravind Rajeswaran∗1 ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
174,
|
| 19 |
+
160,
|
| 20 |
+
477,
|
| 21 |
+
176
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Sham Kakade1 Emanuel Todorov1,2 Igor Mordatch3 ",
|
| 28 |
+
"bbox": [
|
| 29 |
+
173,
|
| 30 |
+
183,
|
| 31 |
+
575,
|
| 32 |
+
196
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "∗ Equal contributions 1 University of Washington 2 Roboti LLC 3 OpenAI ",
|
| 39 |
+
"bbox": [
|
| 40 |
+
173,
|
| 41 |
+
202,
|
| 42 |
+
696,
|
| 43 |
+
218
|
| 44 |
+
],
|
| 45 |
+
"page_idx": 0
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"type": "text",
|
| 49 |
+
"text": "klowrey, aravraj, sham, todorov @cs.uw.edu, mordatch@openai.com ",
|
| 50 |
+
"bbox": [
|
| 51 |
+
174,
|
| 52 |
+
226,
|
| 53 |
+
789,
|
| 54 |
+
239
|
| 55 |
+
],
|
| 56 |
+
"page_idx": 0
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"type": "text",
|
| 60 |
+
"text": "ABSTRACT ",
|
| 61 |
+
"text_level": 1,
|
| 62 |
+
"bbox": [
|
| 63 |
+
454,
|
| 64 |
+
262,
|
| 65 |
+
544,
|
| 66 |
+
277
|
| 67 |
+
],
|
| 68 |
+
"page_idx": 0
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"type": "text",
|
| 72 |
+
"text": "We propose a “plan online and learn offline” framework for the setting where an agent, with an internal model, needs to continually act and learn in the world. Our work builds on the synergistic relationship between local model-based control, global value function learning, and exploration. We study how local trajectory optimization can cope with approximation errors in the value function, and can stabilize and accelerate value function learning. Conversely, we also study how approximate value functions can help reduce the planning horizon and allow for better policies beyond local solutions. Finally, we also demonstrate how trajectory optimization can be used to perform temporally coordinated exploration in conjunction with estimating uncertainty in value function approximation. This exploration is critical for fast and stable learning of the value function. Combining these components enable solutions to complex control tasks, like humanoid locomotion and dexterous in-hand manipulation, in the equivalent of a few minutes of experience in the real world. ",
|
| 73 |
+
"bbox": [
|
| 74 |
+
233,
|
| 75 |
+
291,
|
| 76 |
+
764,
|
| 77 |
+
486
|
| 78 |
+
],
|
| 79 |
+
"page_idx": 0
|
| 80 |
+
},
|
| 81 |
+
{
|
| 82 |
+
"type": "text",
|
| 83 |
+
"text": "1 INTRODUCTION ",
|
| 84 |
+
"text_level": 1,
|
| 85 |
+
"bbox": [
|
| 86 |
+
176,
|
| 87 |
+
510,
|
| 88 |
+
336,
|
| 89 |
+
525
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "We consider a setting where an agent with limited memory and computational resources is dropped into a world. The agent has to simultaneously act in the world and learn to become proficient in the tasks it encounters. Let us further consider a setting where the agent has some prior knowledge about the world in the form of a nominal dynamics model. However, the state space of the world could be very large and complex, and the set of possible tasks very diverse. This complexity and diversity, combined with limited computational capability, rules out the possibility of an omniscient agent that has experienced all situations and knows how to act optimally in all states, even if the agent knows the dynamics. Thus, the agent has to act in the world while learning to become competent. ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
541,
|
| 99 |
+
825,
|
| 100 |
+
651
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "Based on the knowledge of dynamics and its computational resources, the agent is imbued with a local search procedure in the form of trajectory optimization. While the agent would certainly benefit from the most powerful of trajectory optimization algorithms, it is plausible that very complex procedures are still insufficient or inadmissible due to the complexity or inherent unpredictability of the environment. Limited computational resources may also prevent these powerful methods from real-time operation. While the trajectory optimizer may be insufficient by itself, we show that it provides a powerful vehicle for the agent to explore and learn about the world. ",
|
| 107 |
+
"bbox": [
|
| 108 |
+
174,
|
| 109 |
+
659,
|
| 110 |
+
825,
|
| 111 |
+
756
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 0
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "Due to the limited capabilities of the agent, a natural expectation is for the agent to be moderately competent for new tasks that occur infrequently and skillful in situations that it encounters repeatedly by learning from experience. Based on this intuition, we propose the plan online and learn offline (POLO) framework for continual acting and learning. POLO is based on the tight synergistic coupling between local trajectory optimization, global value function learning, and exploration. ",
|
| 118 |
+
"bbox": [
|
| 119 |
+
174,
|
| 120 |
+
763,
|
| 121 |
+
823,
|
| 122 |
+
833
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 0
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "text",
|
| 128 |
+
"text": "We will first provide intuitions for why there may be substantial performance degradation when acting greedily using an approximate value function. We also show that value function learning can be accelerated and stabilized by utilizing trajectory optimization integrally in the learning process, and that a trajectory optimization procedure in conjunction with an approximate value function can compute near optimal actions. In addition, exploration is critical to propagate global information in value function learning, and for trajectory optimization to escape local solutions and saddle points. In POLO, the agent forms hypotheses on potential reward regions, and executes temporally coordinated action sequences through trajectory optimization. This is in contrast to strategies like $\\epsilon -$ greedy and Boltzmann exploration that explore at the granularity of individual timesteps. The use of trajectory optimization enables the agent to perform directed and efficient exploration, which in turn helps to find better global solutions. ",
|
| 129 |
+
"bbox": [
|
| 130 |
+
174,
|
| 131 |
+
840,
|
| 132 |
+
823,
|
| 133 |
+
924
|
| 134 |
+
],
|
| 135 |
+
"page_idx": 0
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"type": "image",
|
| 139 |
+
"img_path": "images/77a0aeebdc79d90afbe6901a2e240bba2a4b59efca8e084648ad000fbf5a16dc.jpg",
|
| 140 |
+
"image_caption": [
|
| 141 |
+
"Figure 1: Examples of tasks solved with POLO. A 2D point agent navigating a maze without any directed reward signal, a complex 3D humanoid standing up from the floor, pushing a box, and inhand re-positioning of a cube to various orientations with a five-fingered hand. Video demonstration of our results can be found at: https://sites.google.com/view/polo-mpc. "
|
| 142 |
+
],
|
| 143 |
+
"image_footnote": [],
|
| 144 |
+
"bbox": [
|
| 145 |
+
197,
|
| 146 |
+
104,
|
| 147 |
+
800,
|
| 148 |
+
217
|
| 149 |
+
],
|
| 150 |
+
"page_idx": 1
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"type": "text",
|
| 154 |
+
"text": "",
|
| 155 |
+
"bbox": [
|
| 156 |
+
174,
|
| 157 |
+
324,
|
| 158 |
+
825,
|
| 159 |
+
393
|
| 160 |
+
],
|
| 161 |
+
"page_idx": 1
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"type": "text",
|
| 165 |
+
"text": "The setting studied in the paper models many problems of interest in robotics and artificial intelligence. Local trajectory optimization becomes readily feasible when a nominal model and computational resources are available to an agent, and can accelerate learning of novel task instances. In this work, we study the case where the internal nominal dynamics model used by the agent is accurate. Nominal dynamics models based on knowledge of physics (Todorov et al., 2012), or through learning (Ljung, 1987), complements a growing body of work on successful simulation to reality transfer and system identification (Ross & Bagnell, 2012; Rajeswaran et al., 2016; Lowrey et al., 2018; OpenAI, 2018). Combining the benefits of local trajectory optimization for fast improvement with generalization enabled by learning is critical for robotic agents that live in our physical world to continually learn and acquire a large repertoire of skills. ",
|
| 166 |
+
"bbox": [
|
| 167 |
+
174,
|
| 168 |
+
400,
|
| 169 |
+
825,
|
| 170 |
+
540
|
| 171 |
+
],
|
| 172 |
+
"page_idx": 1
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"type": "text",
|
| 176 |
+
"text": "2 THE POLO FRAMEWORK ",
|
| 177 |
+
"text_level": 1,
|
| 178 |
+
"bbox": [
|
| 179 |
+
176,
|
| 180 |
+
569,
|
| 181 |
+
415,
|
| 182 |
+
585
|
| 183 |
+
],
|
| 184 |
+
"page_idx": 1
|
| 185 |
+
},
|
| 186 |
+
{
|
| 187 |
+
"type": "text",
|
| 188 |
+
"text": "The POLO framework combines three components: local trajectory optimization, global value function approximation, and an uncertainty and reward aware exploration strategy. We first present the motivation for each component, followed by the full POLO procedure. ",
|
| 189 |
+
"bbox": [
|
| 190 |
+
174,
|
| 191 |
+
607,
|
| 192 |
+
825,
|
| 193 |
+
650
|
| 194 |
+
],
|
| 195 |
+
"page_idx": 1
|
| 196 |
+
},
|
| 197 |
+
{
|
| 198 |
+
"type": "text",
|
| 199 |
+
"text": "2.1 DEFINITIONS, NOTATIONS, AND SETTING ",
|
| 200 |
+
"text_level": 1,
|
| 201 |
+
"bbox": [
|
| 202 |
+
174,
|
| 203 |
+
676,
|
| 204 |
+
501,
|
| 205 |
+
690
|
| 206 |
+
],
|
| 207 |
+
"page_idx": 1
|
| 208 |
+
},
|
| 209 |
+
{
|
| 210 |
+
"type": "text",
|
| 211 |
+
"text": "We model the world as an infinite horizon discounted Markov Decision Process (MDP), which is characterized by the tuple: $\\mathcal { M } = \\{ \\boldsymbol { S } , \\mathcal { A } , \\mathcal { R } , \\mathcal { T } , \\boldsymbol { \\gamma } \\}$ . $S \\in \\mathbb { R } ^ { n }$ and $\\mathcal { A } \\in \\mathbb { R } ^ { m }$ represent the continuous (real-valued) state and action spaces respectively. $\\mathcal { R } : \\mathcal { S } \\times \\mathcal { A } \\mathbb { R }$ represents the reward function. $\\mathcal { T } : \\mathcal { S } \\times \\mathcal { A } \\times \\mathcal { S } \\to \\mathbb { R } _ { + }$ represents the dynamics model, which in general could be stochastic, and $\\gamma \\in [ 0 , 1 )$ is the discount factor. A policy $\\pi : S \\times A \\to \\mathbb { R } _ { + }$ describes a mapping from states to actions. The value of a policy at a state is the average discounted reward accumulated by following the policy from the state: $\\begin{array} { r } { V ^ { \\bar { \\pi } } ( s ) = \\mathbb { E } [ \\sum _ { t = 0 } ^ { \\infty } \\gamma ^ { t } r ( s _ { t } , \\pi ( s _ { t } ) ) \\mid s _ { 0 } = s ] . } \\end{array}$ . The overall performance of the policy over some start state distribution $\\beta$ is given by: $J ^ { \\beta } ( \\pi ) = \\mathbb { E } _ { s \\sim \\beta } [ V ^ { \\pi } ( s ) ]$ . For notational simplicity, we use $s ^ { \\prime }$ to denote the next state visited after (from) $s$ . ",
|
| 212 |
+
"bbox": [
|
| 213 |
+
174,
|
| 214 |
+
705,
|
| 215 |
+
825,
|
| 216 |
+
833
|
| 217 |
+
],
|
| 218 |
+
"page_idx": 1
|
| 219 |
+
},
|
| 220 |
+
{
|
| 221 |
+
"type": "text",
|
| 222 |
+
"text": "As described earlier, we consider the setting where an agent is dropped into a complex world. The agent has access to an internal model of the world. However, the world can be complex and diverse, ruling out the possibility of an omniscient agent. To improve its behavior, the agent has to explore and understand relevant parts of the state space while it continues to act in the world. Due to the availability of the internal model, the agent can revisit states it experienced in the world and reason about alternate potential actions and their consequences to learn more efficiently. ",
|
| 223 |
+
"bbox": [
|
| 224 |
+
174,
|
| 225 |
+
840,
|
| 226 |
+
825,
|
| 227 |
+
924
|
| 228 |
+
],
|
| 229 |
+
"page_idx": 1
|
| 230 |
+
},
|
| 231 |
+
{
|
| 232 |
+
"type": "text",
|
| 233 |
+
"text": "2.2 VALUE FUNCTION APPROXIMATION ",
|
| 234 |
+
"text_level": 1,
|
| 235 |
+
"bbox": [
|
| 236 |
+
176,
|
| 237 |
+
103,
|
| 238 |
+
464,
|
| 239 |
+
117
|
| 240 |
+
],
|
| 241 |
+
"page_idx": 2
|
| 242 |
+
},
|
| 243 |
+
{
|
| 244 |
+
"type": "text",
|
| 245 |
+
"text": "The optimal value function describes the long term discounted reward the agent receives under the optimal policy. Defining the Bellman operator at state $s$ as: ",
|
| 246 |
+
"bbox": [
|
| 247 |
+
171,
|
| 248 |
+
131,
|
| 249 |
+
823,
|
| 250 |
+
160
|
| 251 |
+
],
|
| 252 |
+
"page_idx": 2
|
| 253 |
+
},
|
| 254 |
+
{
|
| 255 |
+
"type": "equation",
|
| 256 |
+
"img_path": "images/b3bc37fbc045e24b96caabbd026d1d881f9cc5dc1a065312a1df8c9c5f6be44f.jpg",
|
| 257 |
+
"text": "$$\nB V ( s ) = \\operatorname* { m a x } _ { a } \\mathbb { E } \\left[ r ( s , a ) + \\gamma V ( s ^ { \\prime } ) \\right] ,\n$$",
|
| 258 |
+
"text_format": "latex",
|
| 259 |
+
"bbox": [
|
| 260 |
+
375,
|
| 261 |
+
171,
|
| 262 |
+
620,
|
| 263 |
+
194
|
| 264 |
+
],
|
| 265 |
+
"page_idx": 2
|
| 266 |
+
},
|
| 267 |
+
{
|
| 268 |
+
"type": "text",
|
| 269 |
+
"text": "the optimal value function $V ^ { * }$ corresponds to the fixed point: $V ^ { * } ( s ) = B V ^ { * } ( s ) \\forall s \\in \\mathcal { S }$ . For small, tabular MDPs, classical dynamic programming algorithms like value iteration can be used to obtain the optimal value function. The optimal policy can be recovered from the value function as: $\\pi ^ { * } ( s ) = { \\mathrm { \\bar { a r g } } } \\operatorname* { m a x } _ { a } \\mathbb { E } [ r ( s , a ) + \\gamma V ^ { * } ( s ^ { \\prime } ) ]$ . For more complex MDPs, computing the optimal value function exactly is not tractable except in a few well known cases like the LQR (Astr ˚ om & Mur- ¨ ray, 2004) and LMDPs (Todorov, 2006; Dvijotham & Todorov, 2011). Thus, various approximate techniques have been considered in prior works. One popular approach is fitted value iteration (Bertsekas & Tsitsiklis, 1996; Munos & Szepesvari ´ , 2008), where a function approximator (e.g. neural network) is used to approximate the optimal value function. The core structure of fitted value iteration considers a collection of states (or a sampling distribution $\\nu$ ), and a parametric value function approximator $\\hat { V } _ { \\theta }$ . Inspired by value iteration, fitted value iteration updates parameters as: ",
|
| 270 |
+
"bbox": [
|
| 271 |
+
173,
|
| 272 |
+
205,
|
| 273 |
+
825,
|
| 274 |
+
364
|
| 275 |
+
],
|
| 276 |
+
"page_idx": 2
|
| 277 |
+
},
|
| 278 |
+
{
|
| 279 |
+
"type": "equation",
|
| 280 |
+
"img_path": "images/129293ff3d51a2dfbfd9965de76a25b3c9c6068fd8d0994fe72c353dc8880306.jpg",
|
| 281 |
+
"text": "$$\n\\theta _ { i + 1 } = \\arg \\operatorname* { m i n } _ { \\theta } \\mathbb { E } _ { s \\sim \\nu } \\left[ \\left( \\hat { V } _ { \\theta } ( s ) - \\mathcal { B } \\hat { V } _ { \\theta _ { i } } ( s ) \\right) ^ { 2 } \\right]\n$$",
|
| 282 |
+
"text_format": "latex",
|
| 283 |
+
"bbox": [
|
| 284 |
+
344,
|
| 285 |
+
376,
|
| 286 |
+
651,
|
| 287 |
+
410
|
| 288 |
+
],
|
| 289 |
+
"page_idx": 2
|
| 290 |
+
},
|
| 291 |
+
{
|
| 292 |
+
"type": "text",
|
| 293 |
+
"text": "where $B \\hat { V } _ { \\boldsymbol { \\theta } _ { i } } ( s )$ are targets for the regression problem computed at the specific state $s$ according to Eq. (1). After sufficient iterations of the procedure in Eq. (2) to get a good approximation, the policy is recovered as $\\begin{array} { r } { \\hat { \\pi } ( s ) = \\arg \\operatorname* { m a x } _ { a } \\mathbb { E } [ r ( s , a ) + \\gamma \\hat { V } _ { \\theta } ( s ^ { \\prime } ) ] } \\end{array}$ . The success and convergence of this overall procedure depends critically on at least two components: the capacity and structure of the function approximator $( \\theta )$ ; and the sampling distribution $( \\nu )$ . ",
|
| 294 |
+
"bbox": [
|
| 295 |
+
173,
|
| 296 |
+
424,
|
| 297 |
+
825,
|
| 298 |
+
497
|
| 299 |
+
],
|
| 300 |
+
"page_idx": 2
|
| 301 |
+
},
|
| 302 |
+
{
|
| 303 |
+
"type": "text",
|
| 304 |
+
"text": "Lemma 1. (Bertsekas & Tsitsiklis, 1996) Let $\\hat { V }$ be an approximate value function with $\\ell _ { \\infty }$ error $\\begin{array} { r } { \\epsilon : = \\operatorname* { m a x } _ { s } | \\hat { V } ( s ) - V ^ { * } ( s ) | } \\end{array}$ . Let $\\hat { \\pi } ( s ) = \\arg \\operatorname* { m a x } _ { a } \\mathbb { E } [ r ( s , a ) + \\gamma \\hat { V } ( s ^ { \\prime } ) ]$ be the induced greedy policy. For all MDPs and $\\beta$ , the bound in Eq. (3) holds. Furthermore, for any size of the state space, there exist MDPs and $\\hat { V }$ for which the bound is tight (holds with equality). ",
|
| 305 |
+
"bbox": [
|
| 306 |
+
173,
|
| 307 |
+
505,
|
| 308 |
+
825,
|
| 309 |
+
566
|
| 310 |
+
],
|
| 311 |
+
"page_idx": 2
|
| 312 |
+
},
|
| 313 |
+
{
|
| 314 |
+
"type": "equation",
|
| 315 |
+
"img_path": "images/3e6de0bbecbb152dd00934e1dd4db8c133a40570cd8f7c185a5d473bc2124a31.jpg",
|
| 316 |
+
"text": "$$\nJ ^ { \\beta } ( \\pi ^ { * } ) - J ^ { \\beta } ( \\hat { \\pi } ) \\leq \\frac { 2 \\gamma \\epsilon } { 1 - \\gamma }\n$$",
|
| 317 |
+
"text_format": "latex",
|
| 318 |
+
"bbox": [
|
| 319 |
+
410,
|
| 320 |
+
578,
|
| 321 |
+
589,
|
| 322 |
+
611
|
| 323 |
+
],
|
| 324 |
+
"page_idx": 2
|
| 325 |
+
},
|
| 326 |
+
{
|
| 327 |
+
"type": "text",
|
| 328 |
+
"text": "Intuitively, this suggests that performance of $\\hat { \\pi }$ degrades with a dependence on effective problem horizon determined by $\\gamma$ . This can be understood as the policy paying a price of $\\epsilon$ at every timestep. Due to the use of function approximation, errors may be inevitable. In practice, we are often interested in temporally extended tasks where $\\gamma \\approx 1$ , and hence this possibility is concerning. Furthermore, the arg max operation in $\\hat { \\pi }$ could inadvertently exploit approximation errors to produce a poor policy. The performance of fitted value iteration based methods also rely critically on the sampling distribution to propagate global information (Munos & Szepesvari ´ , 2008), especially in sparse reward settings. For some applications, it may be possible to specify good sampling distributions using apriori knowledge of where the optimal policy should visit (e.g. based on demonstration data). However, automatically generating such sampling distributions when faced with a new task may be difficult, and is analogous to the problem of exploration. ",
|
| 329 |
+
"bbox": [
|
| 330 |
+
173,
|
| 331 |
+
628,
|
| 332 |
+
825,
|
| 333 |
+
781
|
| 334 |
+
],
|
| 335 |
+
"page_idx": 2
|
| 336 |
+
},
|
| 337 |
+
{
|
| 338 |
+
"type": "text",
|
| 339 |
+
"text": "2.3 TRAJECTORY OPTIMIZATION AND MODEL PREDICTIVE CONTROL ",
|
| 340 |
+
"text_level": 1,
|
| 341 |
+
"bbox": [
|
| 342 |
+
176,
|
| 343 |
+
805,
|
| 344 |
+
669,
|
| 345 |
+
819
|
| 346 |
+
],
|
| 347 |
+
"page_idx": 2
|
| 348 |
+
},
|
| 349 |
+
{
|
| 350 |
+
"type": "text",
|
| 351 |
+
"text": "Trajectory optimization and model predictive control (MPC) have a long history in robotics and control systems (Garcia et al., 1989; Tassa et al., 2014)1. In MPC, starting from state $s _ { t }$ and using the knowledge of the dynamics model, a locally optimal sequence of actions (or policies) up to a moving horizon of $H$ is computed by solving the following optimization problem. ",
|
| 352 |
+
"bbox": [
|
| 353 |
+
174,
|
| 354 |
+
833,
|
| 355 |
+
825,
|
| 356 |
+
888
|
| 357 |
+
],
|
| 358 |
+
"page_idx": 2
|
| 359 |
+
},
|
| 360 |
+
{
|
| 361 |
+
"type": "equation",
|
| 362 |
+
"img_path": "images/d4f20cb82ee5d17c66872e7af8e24ccd35c082fa15cffb97d402a3cde5e1328f.jpg",
|
| 363 |
+
"text": "$$\n\\begin{array} { r l } { \\underset { \\{ \\tilde { \\pi } _ { k } \\} _ { k = t } ^ { t + H } } { \\mathrm { m a x i m i z e } } } & { \\mathbb { E } \\left[ \\overset { t + H - 1 } { \\sum _ { k = t } ^ { t - 1 } } \\gamma ^ { ( k - t ) } r ( \\pmb { x } _ { t } , \\pmb { u } _ { t } ) + \\gamma ^ { H } r _ { f } ( \\pmb { x } _ { t + H } ) \\right] } \\\\ { \\mathrm { s u b j e c t ~ t o } } & { \\pmb { x } _ { k + 1 } \\sim T ( \\pmb { x } _ { k } , \\pmb { u } _ { k } ) } \\\\ & { \\pmb { u } _ { k } \\sim \\tilde { \\pi } _ { t } ( \\cdot | \\pmb { x } _ { k } ) } \\\\ & { \\pmb { x } _ { t } = s _ { t } . } \\end{array}\n$$",
|
| 364 |
+
"text_format": "latex",
|
| 365 |
+
"bbox": [
|
| 366 |
+
303,
|
| 367 |
+
114,
|
| 368 |
+
691,
|
| 369 |
+
213
|
| 370 |
+
],
|
| 371 |
+
"page_idx": 3
|
| 372 |
+
},
|
| 373 |
+
{
|
| 374 |
+
"type": "text",
|
| 375 |
+
"text": "Here, we use $\\mathbf { \\Delta } x , \\mathbf { \\Delta } u , \\tilde { \\pi }$ as dummy variables for states, actions, and policy to distinguish the “imagined” evolution of the MDP used for the trajectory optimization with the actual states (s) observed in the true evolution of the MDP. Here, $r ( { \\pmb x } , { \\pmb u } )$ represents the running reward which is the same as the MDP reward function, and $r _ { f } ( \\pmb { x } _ { t + H } )$ represents a terminal reward function. Let $\\{ \\tilde { \\pi } _ { k } ^ { * } \\}$ be the local time-indexed policies obtained as the solution to the optimization problem in (4). After solving the optimization problem, the first local time-indexed policy is used as $\\hat { \\pi } _ { M P C } ( \\cdot | s _ { t } ) : = \\tilde { \\pi } _ { t } ^ { \\ast } ( \\cdot | \\boldsymbol { x } _ { t } )$ . The entire procedure is repeated again in the next time step $( t + 1 )$ . Note that we have defined the optimization problem over a sequence of feedback policies. However, if the dynamics is deterministic, a sequence of actions {uk}t+Hk=t can be optimized and used instead without any loss in performance. See Appendix C for further discussions. This approach has led to tremendous success in a variety of control systems such as power grids, chemical process control (Qina & Badgwellb, 2003), and more recently in robotics (Williams et al., 2016). Since MPC looks forward only $H$ steps, it is ultimately a local method unless coupled with a value function that propagates global information. In addition, we also provide intuitions for why MPC may help accelerate the learning of value functions. This synergistic effect between MPC and global value function forms a primary motivation for POLO. ",
|
| 376 |
+
"bbox": [
|
| 377 |
+
173,
|
| 378 |
+
222,
|
| 379 |
+
825,
|
| 380 |
+
433
|
| 381 |
+
],
|
| 382 |
+
"page_idx": 3
|
| 383 |
+
},
|
| 384 |
+
{
|
| 385 |
+
"type": "text",
|
| 386 |
+
"text": "Impact of approximation errors in the value function ",
|
| 387 |
+
"text_level": 1,
|
| 388 |
+
"bbox": [
|
| 389 |
+
173,
|
| 390 |
+
448,
|
| 391 |
+
545,
|
| 392 |
+
463
|
| 393 |
+
],
|
| 394 |
+
"page_idx": 3
|
| 395 |
+
},
|
| 396 |
+
{
|
| 397 |
+
"type": "text",
|
| 398 |
+
"text": "Lemma 2. Let $\\hat { V }$ be an approximate value function with $\\ell _ { \\infty }$ error $\\epsilon : = \\operatorname* { m a x } _ { s } | \\hat { V } ( s ) - V ^ { * } ( s ) |$ . Suppose the terminal reward in Eq. (4) is chosen as $r _ { f } ( s _ { H } ) = \\hat { V } ( s _ { H } )$ , and let the MPC policy be $\\hat { \\pi } _ { M P C } ( \\cdot | s _ { t } ) : = \\tilde { \\pi } _ { t } ^ { \\ast } ( \\cdot | \\pmb { x } _ { t } )$ (from Eq. 4). Then, for all MDPs and $\\beta$ , the performance of the MPC policy can be bounded as: ",
|
| 399 |
+
"bbox": [
|
| 400 |
+
173,
|
| 401 |
+
468,
|
| 402 |
+
825,
|
| 403 |
+
527
|
| 404 |
+
],
|
| 405 |
+
"page_idx": 3
|
| 406 |
+
},
|
| 407 |
+
{
|
| 408 |
+
"type": "equation",
|
| 409 |
+
"img_path": "images/289d222431882469b91e8372066aabb91bf5f80818223b5305de2a4be40d3ed5.jpg",
|
| 410 |
+
"text": "$$\nJ ^ { \\beta } ( \\pi ^ { * } ) - J ^ { \\beta } ( \\hat { \\pi } _ { M P C } ) \\leq \\frac { 2 \\gamma ^ { H } \\epsilon } { 1 - \\gamma ^ { H } } .\n$$",
|
| 411 |
+
"text_format": "latex",
|
| 412 |
+
"bbox": [
|
| 413 |
+
383,
|
| 414 |
+
526,
|
| 415 |
+
614,
|
| 416 |
+
561
|
| 417 |
+
],
|
| 418 |
+
"page_idx": 3
|
| 419 |
+
},
|
| 420 |
+
{
|
| 421 |
+
"type": "text",
|
| 422 |
+
"text": "Proof. The proof is provided in Appendix C. ",
|
| 423 |
+
"bbox": [
|
| 424 |
+
176,
|
| 425 |
+
575,
|
| 426 |
+
470,
|
| 427 |
+
592
|
| 428 |
+
],
|
| 429 |
+
"page_idx": 3
|
| 430 |
+
},
|
| 431 |
+
{
|
| 432 |
+
"type": "text",
|
| 433 |
+
"text": "This suggests that MPC (with $H > 1$ ) is less susceptible to approximation errors than greedy action selection. Also, without a terminal value function, we have $\\dot { \\epsilon } = \\mathcal { O } ( r _ { \\operatorname* { m a x } } / ( 1 - \\gamma ) )$ in the worst case, which adds an undesirable scaling with the problem horizon. ",
|
| 434 |
+
"bbox": [
|
| 435 |
+
174,
|
| 436 |
+
607,
|
| 437 |
+
825,
|
| 438 |
+
650
|
| 439 |
+
],
|
| 440 |
+
"page_idx": 3
|
| 441 |
+
},
|
| 442 |
+
{
|
| 443 |
+
"type": "text",
|
| 444 |
+
"text": "Accelerating convergence of the value function Furthermore, MPC can also enable faster con \nvergtor: his, considern the tabular $\\mathrm { H }$ -step Bellg, for any n opand $\\begin{array} { r } { \\mathcal { B } ^ { H } V ( s ) : = \\operatorname* { m a x } _ { a _ { 0 : H - 1 } } \\mathbb { E } [ \\sum _ { t = 0 } ^ { H - 1 } \\gamma ^ { t } r _ { t } + \\gamma ^ { H } V ( s _ { H } ) ] . } \\end{array}$ $V _ { 1 }$ $V _ { 2 }$ $\\begin{array} { r } { | \\mathcal { B } ^ { H } V _ { 1 } - \\mathcal { B } ^ { H } V _ { 2 } | _ { \\infty } \\leq \\gamma ^ { H } | V _ { 1 } - V _ { 2 } | _ { \\infty } . } \\end{array}$ $B ^ { H }$ \nof global information for $H$ steps, thereby accelerating the convergence due to faster mixing. Note \nthat one way to realize $B ^ { H }$ is to simply apply $B H$ times, with each step providing a contraction by $\\gamma$ . \nIn the general setting, it is unknown if there exists alternate, cheaper ways to realize $B ^ { H }$ . However, \nfor problems in continuous control, MPC based on local dynamic programming methods (Jacobson \n& Mayne, 1970; Todorov & Li, 2005) provide an efficient way to approximately realize $B ^ { H }$ , which \ncan be used to accelerate and stabilize value function learning. ",
|
| 445 |
+
"bbox": [
|
| 446 |
+
173,
|
| 447 |
+
665,
|
| 448 |
+
825,
|
| 449 |
+
810
|
| 450 |
+
],
|
| 451 |
+
"page_idx": 3
|
| 452 |
+
},
|
| 453 |
+
{
|
| 454 |
+
"type": "text",
|
| 455 |
+
"text": "2.4 PLANNING TO EXPLORE ",
|
| 456 |
+
"text_level": 1,
|
| 457 |
+
"bbox": [
|
| 458 |
+
176,
|
| 459 |
+
827,
|
| 460 |
+
383,
|
| 461 |
+
842
|
| 462 |
+
],
|
| 463 |
+
"page_idx": 3
|
| 464 |
+
},
|
| 465 |
+
{
|
| 466 |
+
"type": "text",
|
| 467 |
+
"text": "The ability of an agent to explore the relevant parts of the state space is critical for the convergence of many RL algorithms. Typical exploration strategies like $\\epsilon$ -greedy and Boltzmann take exploratory actions with some probability on a per time-step basis. Instead, by using MPC, the agent can explore in the space of trajectories. The agent can consider a hypothesis of potential reward regions in the state space, and then execute the optimal trajectory conditioned on this belief, resulting in a ",
|
| 468 |
+
"bbox": [
|
| 469 |
+
174,
|
| 470 |
+
853,
|
| 471 |
+
825,
|
| 472 |
+
924
|
| 473 |
+
],
|
| 474 |
+
"page_idx": 3
|
| 475 |
+
},
|
| 476 |
+
{
|
| 477 |
+
"type": "text",
|
| 478 |
+
"text": "1: Inputs: planning horizon $H$ , value function parameters $\\theta _ { 1 } , \\theta _ { 2 } , \\dots . \\theta _ { K }$ , mini-batch size $n$ , num \nber of gradient steps $G$ , update frequency $Z$ \n2: for $t = 1$ to $\\infty$ do \n3: Select action $a _ { t }$ according to MPC (Eq. 4) with terminal reward $r _ { f } ( s ) \\equiv { \\hat { V } } ( s )$ from Eq. (7) \n4: Add the state experience $s _ { t }$ to replay buffer $\\mathcal { D }$ \n5: if $\\mod ( t , Z ) = 0$ then \n6: for $G$ times do \n7: Sample $n$ states from the replay buffer, and compute targets using Eq. (8) \n8: Update the value functions using Eq. (6) (see Section 2.5 for details) \n9: end for \n10: end if \n11: end for ",
|
| 479 |
+
"bbox": [
|
| 480 |
+
178,
|
| 481 |
+
122,
|
| 482 |
+
821,
|
| 483 |
+
292
|
| 484 |
+
],
|
| 485 |
+
"page_idx": 4
|
| 486 |
+
},
|
| 487 |
+
{
|
| 488 |
+
"type": "text",
|
| 489 |
+
"text": "temporally coordinated sequence of actions. By executing such coordinated actions, the agent can cover the state space more rapidly and intentionally, and avoid back and forth wandering that can slow down the learning. We demonstrate this effect empirically in Section 3.1. ",
|
| 490 |
+
"bbox": [
|
| 491 |
+
176,
|
| 492 |
+
315,
|
| 493 |
+
823,
|
| 494 |
+
359
|
| 495 |
+
],
|
| 496 |
+
"page_idx": 4
|
| 497 |
+
},
|
| 498 |
+
{
|
| 499 |
+
"type": "text",
|
| 500 |
+
"text": "To generate the hypothesis of potentially rewarding regions, we take a Bayesian view and approximately track a posterior over value functions. Consider a motivating setting of regression, where we have a parametric function approximator $f _ { \\theta }$ with prior $\\mathbb { P } ( \\boldsymbol { \\theta } )$ . The dataset consists of input-output pairs: $\\bar { \\mathcal { D } } = ( x _ { i } , y _ { i } ) _ { i = 1 } ^ { n }$ , and we wish to approximate $\\mathbb { P } ( \\boldsymbol { \\theta } | \\mathcal { D } )$ . In the Bayesian linear regression setting with Gaussian prior and noise models, the solution to the following problem generates samples from the posterior (Osband et al., 2016; Azizzadenesheli et al., 2018a; Osband et al., 2018): ",
|
| 501 |
+
"bbox": [
|
| 502 |
+
173,
|
| 503 |
+
364,
|
| 504 |
+
825,
|
| 505 |
+
449
|
| 506 |
+
],
|
| 507 |
+
"page_idx": 4
|
| 508 |
+
},
|
| 509 |
+
{
|
| 510 |
+
"type": "equation",
|
| 511 |
+
"img_path": "images/ff985821aaa8c9270bfa3bbdee15abb95ba054a64e6cfb8bd38188394ebb1049.jpg",
|
| 512 |
+
"text": "$$\n\\arg \\operatorname* { m i n } _ { \\theta } | | \\tilde { y } _ { i } - f _ { \\tilde { \\theta } } ( x _ { i } ) - f _ { \\theta } ( x _ { i } ) | | _ { 2 } ^ { 2 } + \\frac { \\sigma ^ { 2 } } { \\lambda } | | \\theta | | _ { 2 } ^ { 2 }\n$$",
|
| 513 |
+
"text_format": "latex",
|
| 514 |
+
"bbox": [
|
| 515 |
+
349,
|
| 516 |
+
453,
|
| 517 |
+
650,
|
| 518 |
+
484
|
| 519 |
+
],
|
| 520 |
+
"page_idx": 4
|
| 521 |
+
},
|
| 522 |
+
{
|
| 523 |
+
"type": "text",
|
| 524 |
+
"text": "where $\\tilde { y } _ { i } \\sim \\mathcal N ( y _ { i } , \\sigma ^ { 2 } )$ is a noisy version of the target and $\\tilde { \\theta } \\sim \\mathbb { P } ( \\theta )$ is a sample from the prior. Based on this, Osband et al. (2018) demonstrate the benefits of uncertainty estimation for exploration. Similarly, we use this procedure to obtain samples from the posterior for value function approximation, and utilize them for temporally coordinated action selection using MPC. We consider $K$ value function approximators $\\hat { V } _ { \\theta }$ with parameters $\\theta _ { 1 } , \\theta _ { 2 } , \\dots \\theta _ { K }$ independently trained based on Eq. (6). We consider the softmax of the different samples as the value at a state: ",
|
| 525 |
+
"bbox": [
|
| 526 |
+
173,
|
| 527 |
+
491,
|
| 528 |
+
825,
|
| 529 |
+
579
|
| 530 |
+
],
|
| 531 |
+
"page_idx": 4
|
| 532 |
+
},
|
| 533 |
+
{
|
| 534 |
+
"type": "equation",
|
| 535 |
+
"img_path": "images/85c9c8da07d83da7aaada3a07f7b23c718dec596dba20607ca1f21d65f26696a.jpg",
|
| 536 |
+
"text": "$$\n\\hat { V } ( s ) = \\sum _ { k = 1 } ^ { K } \\omega _ { k } ( s ) \\hat { V } _ { { \\boldsymbol \\theta } _ { k } } ( s ) , ~ \\mathrm { w h e r e } ~ \\omega _ { k } ( s ) \\stackrel { \\mathrm { d e f } } { : = } \\frac { \\exp \\big ( \\kappa \\hat { V } _ { { \\boldsymbol \\theta } _ { k } } ( s ) \\big ) } { \\sum _ { j = 1 } ^ { K } \\exp \\big ( \\kappa \\hat { V } _ { { \\boldsymbol \\theta } _ { j } } ( s ) \\big ) }\n$$",
|
| 537 |
+
"text_format": "latex",
|
| 538 |
+
"bbox": [
|
| 539 |
+
279,
|
| 540 |
+
582,
|
| 541 |
+
720,
|
| 542 |
+
626
|
| 543 |
+
],
|
| 544 |
+
"page_idx": 4
|
| 545 |
+
},
|
| 546 |
+
{
|
| 547 |
+
"type": "text",
|
| 548 |
+
"text": "Since the above scheme approximates mean $^ +$ variance for small $\\kappa > 0$ , this procedure encourages the agent to additionally explore parts of the state space where the disagreement between the function approximators is large. This corresponds to the broad notion of optimism in the face of uncertainty (Auer et al., 2002) which has been successful in a number of applications (Silver et al., 2016; Li et al., 2010). ",
|
| 549 |
+
"bbox": [
|
| 550 |
+
173,
|
| 551 |
+
628,
|
| 552 |
+
825,
|
| 553 |
+
699
|
| 554 |
+
],
|
| 555 |
+
"page_idx": 4
|
| 556 |
+
},
|
| 557 |
+
{
|
| 558 |
+
"type": "text",
|
| 559 |
+
"text": "2.5 FINAL ALGORITHM ",
|
| 560 |
+
"text_level": 1,
|
| 561 |
+
"bbox": [
|
| 562 |
+
176,
|
| 563 |
+
715,
|
| 564 |
+
351,
|
| 565 |
+
729
|
| 566 |
+
],
|
| 567 |
+
"page_idx": 4
|
| 568 |
+
},
|
| 569 |
+
{
|
| 570 |
+
"type": "text",
|
| 571 |
+
"text": "To summarize, POLO utilizes a global value function approximation scheme, a local trajectory optimization subroutine, and an optimistic exploration scheme. POLO operates as follows: when acting in the world, the agent uses the internal model and always picks the optimal action suggested by MPC. Exploration is implicitly handled by tracking the value function uncertainties and the optimistic evaluation, as specified in Eq. (6) and (7). All the experience (visited states) from the world are stored into a replay buffer $\\mathcal { D }$ , with old experiences discarded if the buffer becomes full. After every $Z$ steps of acting in the world and collecting experience, the value functions are updated by: (a) constructing the targets according to Eq. (8); (b) performing regression using the randomized prior scheme using Eq. (6) where $f _ { \\theta }$ corresponds to the value function approximator. For state $s$ in the buffer and value network $k$ with parameters $\\theta _ { k }$ , the targets are constructed as: ",
|
| 572 |
+
"bbox": [
|
| 573 |
+
173,
|
| 574 |
+
741,
|
| 575 |
+
826,
|
| 576 |
+
881
|
| 577 |
+
],
|
| 578 |
+
"page_idx": 4
|
| 579 |
+
},
|
| 580 |
+
{
|
| 581 |
+
"type": "equation",
|
| 582 |
+
"img_path": "images/54b80e30795c1ddcd0e2feb0b1b780f00912e20eeff0dd74ec2c31cc7806a602.jpg",
|
| 583 |
+
"text": "$$\ny ^ { k } ( s ) = \\operatorname* { m a x } _ { \\{ \\tilde { \\pi } _ { t } \\} _ { t = 0 } ^ { N - 1 } } \\mathbb { E } \\left[ \\sum _ { t = 0 } ^ { N - 1 } \\gamma ^ { t } r ( x _ { t } , u _ { t } ) + \\gamma ^ { N } \\hat { V } _ { \\theta _ { k } } ( x _ { N } ) \\right] , \\mathrm { ~ w h e r e ~ } x _ { 0 } = s , u _ { t } \\sim \\tilde { \\pi } _ { t } ( \\cdot | x _ { t } ) ,\n$$",
|
| 584 |
+
"text_format": "latex",
|
| 585 |
+
"bbox": [
|
| 586 |
+
217,
|
| 587 |
+
886,
|
| 588 |
+
779,
|
| 589 |
+
929
|
| 590 |
+
],
|
| 591 |
+
"page_idx": 4
|
| 592 |
+
},
|
| 593 |
+
{
|
| 594 |
+
"type": "text",
|
| 595 |
+
"text": "which corresponds to solving a $N -$ step trajectory optimization problem starting from state $s$ . As described earlier, using trajectory optimization to generate the targets for fitting the value approximation accelerates the convergence and makes the learning more stable, as verified experimentally in Section 3.3. The overall procedure is summarized in Algorithm 1. ",
|
| 596 |
+
"bbox": [
|
| 597 |
+
174,
|
| 598 |
+
103,
|
| 599 |
+
823,
|
| 600 |
+
160
|
| 601 |
+
],
|
| 602 |
+
"page_idx": 5
|
| 603 |
+
},
|
| 604 |
+
{
|
| 605 |
+
"type": "text",
|
| 606 |
+
"text": "3 EMPIRICAL RESULTS AND DISCUSSION ",
|
| 607 |
+
"text_level": 1,
|
| 608 |
+
"bbox": [
|
| 609 |
+
176,
|
| 610 |
+
181,
|
| 611 |
+
532,
|
| 612 |
+
198
|
| 613 |
+
],
|
| 614 |
+
"page_idx": 5
|
| 615 |
+
},
|
| 616 |
+
{
|
| 617 |
+
"type": "text",
|
| 618 |
+
"text": "Through empirical evaluation, we wish to answer the following questions: ",
|
| 619 |
+
"bbox": [
|
| 620 |
+
174,
|
| 621 |
+
213,
|
| 622 |
+
658,
|
| 623 |
+
228
|
| 624 |
+
],
|
| 625 |
+
"page_idx": 5
|
| 626 |
+
},
|
| 627 |
+
{
|
| 628 |
+
"type": "text",
|
| 629 |
+
"text": "1. Does trajectory optimization in conjunction with uncertainty estimation in value function approximation result in temporally coordinated exploration strategies? 2. Can the use of an approximate value function help reduce the planning horizon for MPC? 3. Does trajectory optimization enable faster and more stable value function learning? ",
|
| 630 |
+
"bbox": [
|
| 631 |
+
210,
|
| 632 |
+
241,
|
| 633 |
+
823,
|
| 634 |
+
309
|
| 635 |
+
],
|
| 636 |
+
"page_idx": 5
|
| 637 |
+
},
|
| 638 |
+
{
|
| 639 |
+
"type": "text",
|
| 640 |
+
"text": "Before answering the questions in detail, we first point out that POLO can scale up to complex high-dimensional agents like 3D humanoid and dexterous anthropomorphic hand (OpenAI, 2018; Rajeswaran et al., 2018) which are among the most complex control tasks studied in robot learning. Video demonstration can be found at: https://sites.google.com/view/polo-mpc ",
|
| 641 |
+
"bbox": [
|
| 642 |
+
176,
|
| 643 |
+
321,
|
| 644 |
+
825,
|
| 645 |
+
377
|
| 646 |
+
],
|
| 647 |
+
"page_idx": 5
|
| 648 |
+
},
|
| 649 |
+
{
|
| 650 |
+
"type": "text",
|
| 651 |
+
"text": "3.1 TRAJECTORY OPTIMIZATION FOR EXPLORATION ",
|
| 652 |
+
"text_level": 1,
|
| 653 |
+
"bbox": [
|
| 654 |
+
174,
|
| 655 |
+
397,
|
| 656 |
+
547,
|
| 657 |
+
410
|
| 658 |
+
],
|
| 659 |
+
"page_idx": 5
|
| 660 |
+
},
|
| 661 |
+
{
|
| 662 |
+
"type": "text",
|
| 663 |
+
"text": "Exploration is critical in tasks where immediate rewards are not well aligned with long-term objectives. As a representative problem, we consider a point mass agent in different 2D worlds illustrated in figure 2: a simple finite size box with no obstacles and a maze. This domain serves to provide an intuitive understanding of the interaction between trajectory optimization and exploration while also enabling visualization of results. In the extreme case of no rewards in the world, an agent with only local information would need to continuously explore. We wish to understand how POLO, with its ensemble of value functions tracking uncertainties, uses MPC to perform temporally coordinated actions. Our baseline is an agent that employs random exploration on a per-time-step basis; MPC without a value function would not move due to lack of local extrinsic rewards. Second, we consider an agent that performs uncertainty estimation similar to POLO but selects actions greedily (i.e. POLO with a planning horizon of 1). Finally, we consider the POLO agent which tracks value uncertainties and selects actions using a 32-step MPC procedure. We observe that POLO achieves more region coverage in both point mass worlds compared to alternatives, as quantitatively illustrated in figure 2(a). The ensemble value function in POLO allows the agent to recognize the true, low value of visited states, while preserving an optimistic value elsewhere. Temporally coordinated action is necessary in the maze world; POLO is able to navigate down all corridors. ",
|
| 664 |
+
"bbox": [
|
| 665 |
+
173,
|
| 666 |
+
422,
|
| 667 |
+
825,
|
| 668 |
+
645
|
| 669 |
+
],
|
| 670 |
+
"page_idx": 5
|
| 671 |
+
},
|
| 672 |
+
{
|
| 673 |
+
"type": "image",
|
| 674 |
+
"img_path": "images/adff096752dc55df20e2482ae2e8ce47a5b2ed880ef4cbb128df54f96e9d981d.jpg",
|
| 675 |
+
"image_caption": [
|
| 676 |
+
"Figure 2: 2D point mass navigation task in a world with no rewards. Fig. (a) describes the percentage of an occupancy grid covered by the agent, averaged over 10 random seeds. Fig. (b) depicts an agent over 1000 timesteps; red indicates regions of high value (uncertainty) while blue denotes low. The value function learns to assign the true, low values to regions visited and preserves high values to unexplored regions; uncertainty and long horizons are observed to be critical for exploration. "
|
| 677 |
+
],
|
| 678 |
+
"image_footnote": [],
|
| 679 |
+
"bbox": [
|
| 680 |
+
194,
|
| 681 |
+
670,
|
| 682 |
+
805,
|
| 683 |
+
857
|
| 684 |
+
],
|
| 685 |
+
"page_idx": 5
|
| 686 |
+
},
|
| 687 |
+
{
|
| 688 |
+
"type": "image",
|
| 689 |
+
"img_path": "images/f270455ddae4bdd86aec871c54f9d4f60fc39a72f11ee23fd61b1551ac2915be.jpg",
|
| 690 |
+
"image_caption": [
|
| 691 |
+
"Figure 3: Performance as a function of planning horizon for the humanoid getup (left), and inhand manipulation task (middle). POLO was trained for 12000 and 2500 environment timesteps, respectively. We test POLO with the learned terminal value function against pure MPC and compare average reward obtained over 3 trials in the getup task and 1000 steps in the manipulation task. On the right, a value function trained with POLO is used by MPC without per-time-step rewards. The agent’s height increases, indicating a task-relevant value function. For comparison, we also include the trace of POLO with dense rewards and multiple trials (dashed vertical lines) "
|
| 692 |
+
],
|
| 693 |
+
"image_footnote": [],
|
| 694 |
+
"bbox": [
|
| 695 |
+
179,
|
| 696 |
+
99,
|
| 697 |
+
816,
|
| 698 |
+
263
|
| 699 |
+
],
|
| 700 |
+
"page_idx": 6
|
| 701 |
+
},
|
| 702 |
+
{
|
| 703 |
+
"type": "text",
|
| 704 |
+
"text": "3.2 VALUE FUNCTION APPROXIMATION FOR TRAJECTORY OPTIMIZATION ",
|
| 705 |
+
"text_level": 1,
|
| 706 |
+
"bbox": [
|
| 707 |
+
176,
|
| 708 |
+
401,
|
| 709 |
+
689,
|
| 710 |
+
414
|
| 711 |
+
],
|
| 712 |
+
"page_idx": 6
|
| 713 |
+
},
|
| 714 |
+
{
|
| 715 |
+
"type": "text",
|
| 716 |
+
"text": "Next, we study if value learning helps to reduce the planning horizon for MPC. To this end, we consider two high dimensional tasks: humanoid getup where a 3D humanoid needs to learn to stand up from the ground, and in-hand manipulation where a five-fingered hand needs to re-orient a cube to a desired configuration that is randomized every 75 timesteps. For simplicity, we use the MPPI algorithm (Williams et al., 2016) for trajectory optimization. In Figure 3, we consider MPC and the full POLO algorithm of the same horizon, and compare their performance after $T$ steps of learning in the world. We find that POLO uniformly dominates MPC, indicating that the agent is consolidating experience from the world into the value function. With even the longest planning horizon, the humanoid getup task has a local solution where it can quickly sit up, but cannot discover a chain of actions required to stand upright. POLO’s exploration allows the agent to escape the local solution, and consolidate the experiences to consistently stand up. To further test if the learned value function is task aligned, we take the value function trained with POLO, and use it with MPC without any intermediate rewards. Thus, the MPC is optimizing a trajectory of length $H = 6 4$ purely using the value function of the state after 64 steps. We observe, in Figure 3, that even in this case, the humanoid is able to consistently increase its height from the floor indicating that the value function has captured task relevant details. We note that a greedy optimization procedure with this value function does not yield good results, indicating that the learned value function is only approximate and not good everywhere. ",
|
| 717 |
+
"bbox": [
|
| 718 |
+
174,
|
| 719 |
+
426,
|
| 720 |
+
825,
|
| 721 |
+
676
|
| 722 |
+
],
|
| 723 |
+
"page_idx": 6
|
| 724 |
+
},
|
| 725 |
+
{
|
| 726 |
+
"type": "text",
|
| 727 |
+
"text": "While the humanoid getup task presents temporal complexity requiring a large planning horizon, the in-hand manipulation task presents spatial complexity. A large number of time steps are not needed to manipulate the object, and a strong signal about progress is readily received. However, since the targets can change rapidly, the variance in gradient estimates can be very high for function approximation methods (Ghosh et al., 2018). Trajectory optimization is particularly well suited for such types of problems, since it can efficiently compute near-optimal actions conditioned on the instance, facilitating function approximation. Note that the trajectory optimizer is unaware that the targets can change, and attempts to optimize a trajectory for a fixed instance of the task. The value function consolidates experience over multiple target changes, and learns to give high values to states that are not just immediately good but provide a large space of affordances for the possible upcoming tasks. ",
|
| 728 |
+
"bbox": [
|
| 729 |
+
174,
|
| 730 |
+
684,
|
| 731 |
+
825,
|
| 732 |
+
835
|
| 733 |
+
],
|
| 734 |
+
"page_idx": 6
|
| 735 |
+
},
|
| 736 |
+
{
|
| 737 |
+
"type": "text",
|
| 738 |
+
"text": "3.3 TRAJECTORY OPTIMIZATION FOR VALUE FUNCTION LEARNING ",
|
| 739 |
+
"text_level": 1,
|
| 740 |
+
"bbox": [
|
| 741 |
+
176,
|
| 742 |
+
856,
|
| 743 |
+
648,
|
| 744 |
+
869
|
| 745 |
+
],
|
| 746 |
+
"page_idx": 6
|
| 747 |
+
},
|
| 748 |
+
{
|
| 749 |
+
"type": "text",
|
| 750 |
+
"text": "Finally, we study if trajectory optimization can aid in accelerating and stabilizing value function learning. To do so, we again consider the humanoid getup task and study different variants of POLO. In particular, we vary the horizon $( N )$ used for computing the value function targets in Eq. (8). We observe that as we increase $N$ , the agent learns the value function with fewer interactions with the world, as indicated in Figure 4(a). The benefit of using $N -$ step returns for stable value function learning and actor-critic methods have been observed in numerous works (Mnih et al., 2016; Munos et al., 2016; Schulman et al., 2016), and our experiments reinforce these observations. The use of $N -$ step returns help to traverse the bias-variance trade-off. Furthermore, due to the discounting, the contribution of $V { \\left( s _ { N } \\right) }$ is made weaker and thus the targets are more stable. This mirrors ideas such as target networks (Mnih et al., 2015) commonly used to stabilize training. As discussed earlier, longer horizons make trajectory optimization more tolerant to errors in the value function. To illustrate this, we take the value function trained with POLO on a nominal humanoid model, and perturb the model by changing the size of the head to model value function degradation. Figure 4(b) shows that a longer planning horizon can mitigate this degradation. This presents intriguing future possibility of using MPC to improve transfer learning between tasks or robot platforms. ",
|
| 751 |
+
"bbox": [
|
| 752 |
+
176,
|
| 753 |
+
882,
|
| 754 |
+
823,
|
| 755 |
+
924
|
| 756 |
+
],
|
| 757 |
+
"page_idx": 6
|
| 758 |
+
},
|
| 759 |
+
{
|
| 760 |
+
"type": "image",
|
| 761 |
+
"img_path": "images/d73d3574eebb5137f1ab088280579cfd230fd32dcdd66e81733d0b3c8d71a95b.jpg",
|
| 762 |
+
"image_caption": [
|
| 763 |
+
"Figure 4: Usefulness of trajectory optimization for value function learning. (a) illustrates that $N$ -step trajectory optimization accelerates the learning of the value function. $N { = } 1$ corresponds to trajectory centric fitted value iteration. A difference of 0.2 reward to MPC amounts to approximately $5 0 \\%$ performance improvement. (b) value function trained for the nominal model (head size of 1.0) used with MPC for models with larger sizes. "
|
| 764 |
+
],
|
| 765 |
+
"image_footnote": [],
|
| 766 |
+
"bbox": [
|
| 767 |
+
200,
|
| 768 |
+
98,
|
| 769 |
+
794,
|
| 770 |
+
257
|
| 771 |
+
],
|
| 772 |
+
"page_idx": 7
|
| 773 |
+
},
|
| 774 |
+
{
|
| 775 |
+
"type": "text",
|
| 776 |
+
"text": "",
|
| 777 |
+
"bbox": [
|
| 778 |
+
174,
|
| 779 |
+
348,
|
| 780 |
+
825,
|
| 781 |
+
515
|
| 782 |
+
],
|
| 783 |
+
"page_idx": 7
|
| 784 |
+
},
|
| 785 |
+
{
|
| 786 |
+
"type": "text",
|
| 787 |
+
"text": "4 RELATED WORK ",
|
| 788 |
+
"text_level": 1,
|
| 789 |
+
"bbox": [
|
| 790 |
+
176,
|
| 791 |
+
536,
|
| 792 |
+
343,
|
| 793 |
+
553
|
| 794 |
+
],
|
| 795 |
+
"page_idx": 7
|
| 796 |
+
},
|
| 797 |
+
{
|
| 798 |
+
"type": "text",
|
| 799 |
+
"text": "Planning and learning: Combining elements of planning and search with approximate value functions has been explored in discrete game domains (Silver et al., 2017; Anthony et al., 2017) where an MCTS planner is informed by the value function. Alternatively, using prior data to guide the search process in continuous MCTS without explicitly learning a value function has also been explored (Rajamaki & H ¨ am¨ al¨ ainen ¨ , 2017). Related to this, Atkeson (1993) uses an offline trajectory library for action selection in real-time, but do not explicitly consider learning parametric value functions. RTDP (Barto et al., 1995) considers learning value functions based on states visited by the agent, but does not explicitly employ the use of planning. Zhong et al. (2013) consider the setting of learning a value function to help MPC, and found the contribution of value functions to be weak for the relatively simple tasks considered in their work. Approaches such as cost shaping $\\mathrm { N g }$ et al., 1999) can also be interpreted as hand specifying an approximate value function, and has been successfully employed with MPC (Tassa et al., 2012). However, this often require careful human design and task specific expertise. An alternative set of approaches (Ross et al., 2011; Levine & Koltun, 2013; Mordatch & Todorov, 2014; Sun et al., 2018b) use local trajectory optimization to generate a dataset for training a global policy through imitation learning. These approaches do not use MPC at runtime, and hence may often require retraining for changes in tasks or environment. Furthermore, results from this line of work have been demonstrated primarily in settings where trajectory optimization alone can solve the task, or use human demonstration data. In contrast, through our exploration schemes, we are able to improve over the capabilities of MPC and solve tasks where MPC is unsuccessful. ",
|
| 800 |
+
"bbox": [
|
| 801 |
+
173,
|
| 802 |
+
569,
|
| 803 |
+
825,
|
| 804 |
+
847
|
| 805 |
+
],
|
| 806 |
+
"page_idx": 7
|
| 807 |
+
},
|
| 808 |
+
{
|
| 809 |
+
"type": "text",
|
| 810 |
+
"text": "Planning and exploration: Exploration is a well-studied and important problem in RL. The importance of having a wide and relevant state distribution has been pointed out in numerous prior works (Munos & Szepesvari ´ , 2008; Bagnell et al., 2003; Rajeswaran et al., 2017). Strategies such as $\\epsilon$ -greedy or Gaussian exploration have recently been used to successfully solve a large number of dense reward problems. As the reward becomes sparse or heavily delayed, such strategies become intractable in high-dimensional settings. Critically, these approaches perform exploration on a per time-step basis, which can lead to back and forth wandering preventing efficient exploration. Parameter-space exploration (Plappert et al., 2017; Fortunato et al., 2017) methods do not explore at each time step, but rather generate correlated behaviors based on explored parameters at the start. However, such approaches do not consider exploration as an intentional act, but is rather a deviation from a well defined objective for the agent. Deep exploration strategies (Osband et al., 2013) sample a value function from the posterior and use it for greedy action selection. Approaches based on notions of intrinsic motivation and information gain (Chentanez et al., 2005; Stadie et al., 2015; Houthooft et al., 2016; Pathak et al., 2017; Bellemare et al., 2016) also explicitly introduce exploration bonuses into the agent’s reward system. However, such approaches critically do not have the element of planning to explore; thus the agent may not actually reach regions of high predicted reward because it does not know how to get there. Our work is perhaps closest to the $E 3$ framework of Kearns & Singh (2002), which considers altered MDPs with different reward functions, and executes the optimal action under that MDP. However solving these altered MDPs is expensive and their solution is quickly discarded. MPC on the other hand can quickly solve for local instance-specific solutions in these MDPs. ",
|
| 811 |
+
"bbox": [
|
| 812 |
+
174,
|
| 813 |
+
854,
|
| 814 |
+
823,
|
| 815 |
+
924
|
| 816 |
+
],
|
| 817 |
+
"page_idx": 7
|
| 818 |
+
},
|
| 819 |
+
{
|
| 820 |
+
"type": "text",
|
| 821 |
+
"text": "",
|
| 822 |
+
"bbox": [
|
| 823 |
+
174,
|
| 824 |
+
104,
|
| 825 |
+
825,
|
| 826 |
+
325
|
| 827 |
+
],
|
| 828 |
+
"page_idx": 8
|
| 829 |
+
},
|
| 830 |
+
{
|
| 831 |
+
"type": "text",
|
| 832 |
+
"text": "Model-free RL: Our work investigates how much training times can be reduced over model-free methods when the internal model is an accurate representation of the world model. As a representative number, Schulman et al. (2015) report approximately 5 days of agent experience and 128 CPU core hours for solving tasks such as getting up from the ground. In contrast, POLO requires only 12 CPU core hours and 96 seconds of agent experience. Recently, policy gradient methods were also used for in-hand manipulation tasks (OpenAI, 2018), where 3 years of simulated experience and 500 CPU hours were used for object reorientation tasks. For a similar task, POLO only required 1 CPU hour. Of course, model-free methods do not require an accurate internal model, but our results suggest that much less experience may be required for the control aspect of the problem. Our work can be viewed as a strong model-based baseline that model-free RL can strive to compete with, as well as a directly useful method for researchers studying simulation to reality transfer. ",
|
| 833 |
+
"bbox": [
|
| 834 |
+
174,
|
| 835 |
+
333,
|
| 836 |
+
825,
|
| 837 |
+
484
|
| 838 |
+
],
|
| 839 |
+
"page_idx": 8
|
| 840 |
+
},
|
| 841 |
+
{
|
| 842 |
+
"type": "text",
|
| 843 |
+
"text": "In an alternate line of work, internal models have been used for variance reduction purposes in model-free RL (Feinberg et al., 2018; Buckman et al., 2018), in contrast to our use of MPC. Related to this, Azizzadenesheli et al. (2018b) consider learning an internal model for discrete action domains like ALE and use short horizon MCTS for planning. Similarly, Nagabandi et al. (2018) learn a dynamics model in simple continuous control tasks and use a random shooting MPC method for action selection. These lines of work consider the interplay between learning dynamics models and planning procedures, and try to improve the quality of internal models. As a consequence, they focus on domains where simple action selection procedures with accurate models obtain near-optimal performance. In our work, we show that we can learn value functions to help real-time action selection with MPC on some of the most high-dimensional continuous control tasks studied recently. Thus, the two lines of work are complementary, and combining POLO with model learning would make for an interesting line of future work. ",
|
| 844 |
+
"bbox": [
|
| 845 |
+
174,
|
| 846 |
+
492,
|
| 847 |
+
825,
|
| 848 |
+
659
|
| 849 |
+
],
|
| 850 |
+
"page_idx": 8
|
| 851 |
+
},
|
| 852 |
+
{
|
| 853 |
+
"type": "text",
|
| 854 |
+
"text": "5 CONCLUSIONS AND FUTURE WORK ",
|
| 855 |
+
"text_level": 1,
|
| 856 |
+
"bbox": [
|
| 857 |
+
174,
|
| 858 |
+
683,
|
| 859 |
+
503,
|
| 860 |
+
699
|
| 861 |
+
],
|
| 862 |
+
"page_idx": 8
|
| 863 |
+
},
|
| 864 |
+
{
|
| 865 |
+
"type": "text",
|
| 866 |
+
"text": "In this work we presented POLO, which combines the strengths of trajectory optimization and value function learning. In addition, we studied the benefits of planning for exploration in settings where we track uncertainties in the value function. Together, these components enabled control of complex agents like 3D humanoid and five-fingered hand. In this work, we assumed access to an accurate internal dynamics model. A natural next step is to study the influence of approximation errors in the internal model and improving it over time using the real world interaction data. ",
|
| 867 |
+
"bbox": [
|
| 868 |
+
174,
|
| 869 |
+
717,
|
| 870 |
+
825,
|
| 871 |
+
800
|
| 872 |
+
],
|
| 873 |
+
"page_idx": 8
|
| 874 |
+
},
|
| 875 |
+
{
|
| 876 |
+
"type": "text",
|
| 877 |
+
"text": "REFERENCES ",
|
| 878 |
+
"text_level": 1,
|
| 879 |
+
"bbox": [
|
| 880 |
+
176,
|
| 881 |
+
825,
|
| 882 |
+
285,
|
| 883 |
+
840
|
| 884 |
+
],
|
| 885 |
+
"page_idx": 8
|
| 886 |
+
},
|
| 887 |
+
{
|
| 888 |
+
"type": "text",
|
| 889 |
+
"text": "Thomas Anthony, Zheng Tian, and David Barber. Thinking fast and slow with deep learning and tree search. In Advances in Neural Information Processing Systems, pp. 5360–5370, 2017. ",
|
| 890 |
+
"bbox": [
|
| 891 |
+
176,
|
| 892 |
+
851,
|
| 893 |
+
823,
|
| 894 |
+
880
|
| 895 |
+
],
|
| 896 |
+
"page_idx": 8
|
| 897 |
+
},
|
| 898 |
+
{
|
| 899 |
+
"type": "text",
|
| 900 |
+
"text": "Karl Johan Astr ˚ om and Richard M. Murray. Feedback systems an introduction for scientists and ¨ engineers. 2004. ",
|
| 901 |
+
"bbox": [
|
| 902 |
+
174,
|
| 903 |
+
895,
|
| 904 |
+
823,
|
| 905 |
+
922
|
| 906 |
+
],
|
| 907 |
+
"page_idx": 8
|
| 908 |
+
},
|
| 909 |
+
{
|
| 910 |
+
"type": "text",
|
| 911 |
+
"text": "Christopher G. Atkeson. Using local trajectory optimizers to speed up global optimization in dynamic programming. In NIPS, 1993. ",
|
| 912 |
+
"bbox": [
|
| 913 |
+
173,
|
| 914 |
+
103,
|
| 915 |
+
823,
|
| 916 |
+
132
|
| 917 |
+
],
|
| 918 |
+
"page_idx": 9
|
| 919 |
+
},
|
| 920 |
+
{
|
| 921 |
+
"type": "text",
|
| 922 |
+
"text": "Peter Auer, Nicolo Cesa-Bianchi, and Paul Fischer. Finite-time analysis of the multiarmed bandit problem. Machine learning, 47(2-3):235–256, 2002. ",
|
| 923 |
+
"bbox": [
|
| 924 |
+
173,
|
| 925 |
+
141,
|
| 926 |
+
823,
|
| 927 |
+
171
|
| 928 |
+
],
|
| 929 |
+
"page_idx": 9
|
| 930 |
+
},
|
| 931 |
+
{
|
| 932 |
+
"type": "text",
|
| 933 |
+
"text": "Kamyar Azizzadenesheli, Emma Brunskill, and Anima Anandkumar. Efficient exploration through bayesian deep q-networks. CoRR, abs/1802.04412, 2018a. ",
|
| 934 |
+
"bbox": [
|
| 935 |
+
171,
|
| 936 |
+
180,
|
| 937 |
+
823,
|
| 938 |
+
210
|
| 939 |
+
],
|
| 940 |
+
"page_idx": 9
|
| 941 |
+
},
|
| 942 |
+
{
|
| 943 |
+
"type": "text",
|
| 944 |
+
"text": "Kamyar Azizzadenesheli, Brandon Yang, Weitang Liu, Emma Brunskill, Zachary Chase Lipton, and Anima Anandkumar. Sample-efficient deep rl with generative adversarial tree search. CoRR, abs/1806.05780, 2018b. ",
|
| 945 |
+
"bbox": [
|
| 946 |
+
173,
|
| 947 |
+
219,
|
| 948 |
+
823,
|
| 949 |
+
262
|
| 950 |
+
],
|
| 951 |
+
"page_idx": 9
|
| 952 |
+
},
|
| 953 |
+
{
|
| 954 |
+
"type": "text",
|
| 955 |
+
"text": "J. Andrew Bagnell, Sham M. Kakade, Andrew Y. Ng, and Jeff G. Schneider. Policy search by dynamic programming. In NIPS, 2003. ",
|
| 956 |
+
"bbox": [
|
| 957 |
+
171,
|
| 958 |
+
272,
|
| 959 |
+
823,
|
| 960 |
+
301
|
| 961 |
+
],
|
| 962 |
+
"page_idx": 9
|
| 963 |
+
},
|
| 964 |
+
{
|
| 965 |
+
"type": "text",
|
| 966 |
+
"text": "Andrew G. Barto, Steven J. Bradtke, and Satinder P. Singh. Learning to act using real-time dynamic programming. Artif. Intell., 72:81–138, 1995. ",
|
| 967 |
+
"bbox": [
|
| 968 |
+
173,
|
| 969 |
+
310,
|
| 970 |
+
823,
|
| 971 |
+
340
|
| 972 |
+
],
|
| 973 |
+
"page_idx": 9
|
| 974 |
+
},
|
| 975 |
+
{
|
| 976 |
+
"type": "text",
|
| 977 |
+
"text": "Marc G. Bellemare, Sriram Srinivasan, Georg Ostrovski, Tom Schaul, David Saxton, and Remi ´ Munos. Unifying count-based exploration and intrinsic motivation. In NIPS, 2016. ",
|
| 978 |
+
"bbox": [
|
| 979 |
+
173,
|
| 980 |
+
349,
|
| 981 |
+
823,
|
| 982 |
+
378
|
| 983 |
+
],
|
| 984 |
+
"page_idx": 9
|
| 985 |
+
},
|
| 986 |
+
{
|
| 987 |
+
"type": "text",
|
| 988 |
+
"text": "Dimitri Bertsekas and John Tsitsiklis. Neuro-dynamic Programming. 1996. ",
|
| 989 |
+
"bbox": [
|
| 990 |
+
173,
|
| 991 |
+
387,
|
| 992 |
+
671,
|
| 993 |
+
404
|
| 994 |
+
],
|
| 995 |
+
"page_idx": 9
|
| 996 |
+
},
|
| 997 |
+
{
|
| 998 |
+
"type": "text",
|
| 999 |
+
"text": "Jacob Buckman, Danijar Hafner, George Tucker, Eugene Brevdo, and Honglak Lee. Sampleefficient reinforcement learning with stochastic ensemble value expansion. arXiv preprint arXiv:1807.01675, 2018. ",
|
| 1000 |
+
"bbox": [
|
| 1001 |
+
174,
|
| 1002 |
+
412,
|
| 1003 |
+
823,
|
| 1004 |
+
455
|
| 1005 |
+
],
|
| 1006 |
+
"page_idx": 9
|
| 1007 |
+
},
|
| 1008 |
+
{
|
| 1009 |
+
"type": "text",
|
| 1010 |
+
"text": "Nuttapong Chentanez, Andrew G Barto, and Satinder P Singh. Intrinsically motivated reinforcement learning. In Advances in neural information processing systems, pp. 1281–1288, 2005. ",
|
| 1011 |
+
"bbox": [
|
| 1012 |
+
171,
|
| 1013 |
+
465,
|
| 1014 |
+
823,
|
| 1015 |
+
496
|
| 1016 |
+
],
|
| 1017 |
+
"page_idx": 9
|
| 1018 |
+
},
|
| 1019 |
+
{
|
| 1020 |
+
"type": "text",
|
| 1021 |
+
"text": "Krishnamurthy Dvijotham and Emanuel Todorov. A unifying framework for linearly solvable control. In UAI, 2011. ",
|
| 1022 |
+
"bbox": [
|
| 1023 |
+
173,
|
| 1024 |
+
503,
|
| 1025 |
+
823,
|
| 1026 |
+
534
|
| 1027 |
+
],
|
| 1028 |
+
"page_idx": 9
|
| 1029 |
+
},
|
| 1030 |
+
{
|
| 1031 |
+
"type": "text",
|
| 1032 |
+
"text": "Vladimir Feinberg, Alvin Wan, Ion Stoica, Michael I. Jordan, Joseph Gonzalez, and Sergey Levine. Model-based value estimation for efficient model-free reinforcement learning. CoRR, abs/1803.00101, 2018. ",
|
| 1033 |
+
"bbox": [
|
| 1034 |
+
174,
|
| 1035 |
+
542,
|
| 1036 |
+
823,
|
| 1037 |
+
587
|
| 1038 |
+
],
|
| 1039 |
+
"page_idx": 9
|
| 1040 |
+
},
|
| 1041 |
+
{
|
| 1042 |
+
"type": "text",
|
| 1043 |
+
"text": "Meire Fortunato, Mohammad Gheshlaghi Azar, Bilal Piot, Jacob Menick, Ian Osband, Alex Graves, Vlad Mnih, Remi Munos, Demis Hassabis, Olivier Pietquin, et al. Noisy networks for exploration. arXiv preprint arXiv:1706.10295, 2017. ",
|
| 1044 |
+
"bbox": [
|
| 1045 |
+
173,
|
| 1046 |
+
595,
|
| 1047 |
+
823,
|
| 1048 |
+
638
|
| 1049 |
+
],
|
| 1050 |
+
"page_idx": 9
|
| 1051 |
+
},
|
| 1052 |
+
{
|
| 1053 |
+
"type": "text",
|
| 1054 |
+
"text": "Carlos E. Garcia, David M. Prett, and Manfred Morari. Model predictive control: Theory and practice - a survey. Automatica, 25:335–348, 1989. ",
|
| 1055 |
+
"bbox": [
|
| 1056 |
+
173,
|
| 1057 |
+
648,
|
| 1058 |
+
823,
|
| 1059 |
+
678
|
| 1060 |
+
],
|
| 1061 |
+
"page_idx": 9
|
| 1062 |
+
},
|
| 1063 |
+
{
|
| 1064 |
+
"type": "text",
|
| 1065 |
+
"text": "Dibya Ghosh, Avi Singh, Aravind Rajeswaran, Vikash Kumar, and Sergey Levine. Divide-andconquer reinforcement learning. In ICLR, 2018. ",
|
| 1066 |
+
"bbox": [
|
| 1067 |
+
173,
|
| 1068 |
+
686,
|
| 1069 |
+
823,
|
| 1070 |
+
717
|
| 1071 |
+
],
|
| 1072 |
+
"page_idx": 9
|
| 1073 |
+
},
|
| 1074 |
+
{
|
| 1075 |
+
"type": "text",
|
| 1076 |
+
"text": "Rein Houthooft, Xi Chen, Yan Duan, John Schulman, Filip De Turck, and Pieter Abbeel. Vime: Variational information maximizing exploration. In Advances in Neural Information Processing Systems, pp. 1109–1117, 2016. ",
|
| 1077 |
+
"bbox": [
|
| 1078 |
+
176,
|
| 1079 |
+
726,
|
| 1080 |
+
823,
|
| 1081 |
+
768
|
| 1082 |
+
],
|
| 1083 |
+
"page_idx": 9
|
| 1084 |
+
},
|
| 1085 |
+
{
|
| 1086 |
+
"type": "text",
|
| 1087 |
+
"text": "David Jacobson and David Mayne. Differential Dynamic Programming. American Elsevier Publishing Company, 1970. ",
|
| 1088 |
+
"bbox": [
|
| 1089 |
+
171,
|
| 1090 |
+
779,
|
| 1091 |
+
823,
|
| 1092 |
+
808
|
| 1093 |
+
],
|
| 1094 |
+
"page_idx": 9
|
| 1095 |
+
},
|
| 1096 |
+
{
|
| 1097 |
+
"type": "text",
|
| 1098 |
+
"text": "Michael Kearns and Satinder Singh. Near-optimal reinforcement learning in polynomial time. Machine learning, 49(2-3):209–232, 2002. ",
|
| 1099 |
+
"bbox": [
|
| 1100 |
+
171,
|
| 1101 |
+
816,
|
| 1102 |
+
823,
|
| 1103 |
+
847
|
| 1104 |
+
],
|
| 1105 |
+
"page_idx": 9
|
| 1106 |
+
},
|
| 1107 |
+
{
|
| 1108 |
+
"type": "text",
|
| 1109 |
+
"text": "Vikash Kumar. Manipulators and Manipulation in high dimensional spaces. PhD thesis, University of Washington, Seattle, 2016. URL https://digital.lib.washington.edu/ researchworks/handle/1773/38104. ",
|
| 1110 |
+
"bbox": [
|
| 1111 |
+
176,
|
| 1112 |
+
857,
|
| 1113 |
+
821,
|
| 1114 |
+
898
|
| 1115 |
+
],
|
| 1116 |
+
"page_idx": 9
|
| 1117 |
+
},
|
| 1118 |
+
{
|
| 1119 |
+
"type": "text",
|
| 1120 |
+
"text": "Sergey Levine and Vladlen Koltun. Guided policy search. In ICML, 2013. ",
|
| 1121 |
+
"bbox": [
|
| 1122 |
+
173,
|
| 1123 |
+
909,
|
| 1124 |
+
661,
|
| 1125 |
+
924
|
| 1126 |
+
],
|
| 1127 |
+
"page_idx": 9
|
| 1128 |
+
},
|
| 1129 |
+
{
|
| 1130 |
+
"type": "text",
|
| 1131 |
+
"text": "Lihong Li, Wei Chu, John Langford, and Robert E. Schapire. A contextual-bandit approach to personalized news article recommendation. In WWW, 2010. ",
|
| 1132 |
+
"bbox": [
|
| 1133 |
+
173,
|
| 1134 |
+
103,
|
| 1135 |
+
823,
|
| 1136 |
+
132
|
| 1137 |
+
],
|
| 1138 |
+
"page_idx": 10
|
| 1139 |
+
},
|
| 1140 |
+
{
|
| 1141 |
+
"type": "text",
|
| 1142 |
+
"text": "Lennart Ljung. System identification: theory for the user. 1987. ",
|
| 1143 |
+
"bbox": [
|
| 1144 |
+
173,
|
| 1145 |
+
140,
|
| 1146 |
+
593,
|
| 1147 |
+
156
|
| 1148 |
+
],
|
| 1149 |
+
"page_idx": 10
|
| 1150 |
+
},
|
| 1151 |
+
{
|
| 1152 |
+
"type": "text",
|
| 1153 |
+
"text": "Kendall Lowrey, Svetoslav Kolev, Jeremy Dao, Aravind Rajeswaran, and Emanuel Todorov. Reinforcement learning for non-prehensile manipulation: Transfer from simulation to physical system. CoRR, abs/1803.10371, 2018. ",
|
| 1154 |
+
"bbox": [
|
| 1155 |
+
176,
|
| 1156 |
+
164,
|
| 1157 |
+
821,
|
| 1158 |
+
207
|
| 1159 |
+
],
|
| 1160 |
+
"page_idx": 10
|
| 1161 |
+
},
|
| 1162 |
+
{
|
| 1163 |
+
"type": "text",
|
| 1164 |
+
"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–533, 2015. ",
|
| 1165 |
+
"bbox": [
|
| 1166 |
+
176,
|
| 1167 |
+
214,
|
| 1168 |
+
823,
|
| 1169 |
+
258
|
| 1170 |
+
],
|
| 1171 |
+
"page_idx": 10
|
| 1172 |
+
},
|
| 1173 |
+
{
|
| 1174 |
+
"type": "text",
|
| 1175 |
+
"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 ICML, 2016. ",
|
| 1176 |
+
"bbox": [
|
| 1177 |
+
176,
|
| 1178 |
+
266,
|
| 1179 |
+
823,
|
| 1180 |
+
309
|
| 1181 |
+
],
|
| 1182 |
+
"page_idx": 10
|
| 1183 |
+
},
|
| 1184 |
+
{
|
| 1185 |
+
"type": "text",
|
| 1186 |
+
"text": "Igor Mordatch and Emanuel Todorov. Combining the benefits of function approximation and trajectory optimization. In RSS, 2014. ",
|
| 1187 |
+
"bbox": [
|
| 1188 |
+
169,
|
| 1189 |
+
316,
|
| 1190 |
+
823,
|
| 1191 |
+
347
|
| 1192 |
+
],
|
| 1193 |
+
"page_idx": 10
|
| 1194 |
+
},
|
| 1195 |
+
{
|
| 1196 |
+
"type": "text",
|
| 1197 |
+
"text": "Remi Munos and Csaba Szepesv ´ ari. Finite-time bounds for fitted value iteration. ´ Journal of Machine Learning Research, 2008. ",
|
| 1198 |
+
"bbox": [
|
| 1199 |
+
171,
|
| 1200 |
+
354,
|
| 1201 |
+
823,
|
| 1202 |
+
383
|
| 1203 |
+
],
|
| 1204 |
+
"page_idx": 10
|
| 1205 |
+
},
|
| 1206 |
+
{
|
| 1207 |
+
"type": "text",
|
| 1208 |
+
"text": "Remi Munos, Tom Stepleton, Anna Harutyunyan, and Marc G. Bellemare. Safe and efficient off- ´ policy reinforcement learning. In NIPS, 2016. ",
|
| 1209 |
+
"bbox": [
|
| 1210 |
+
171,
|
| 1211 |
+
392,
|
| 1212 |
+
825,
|
| 1213 |
+
421
|
| 1214 |
+
],
|
| 1215 |
+
"page_idx": 10
|
| 1216 |
+
},
|
| 1217 |
+
{
|
| 1218 |
+
"type": "text",
|
| 1219 |
+
"text": "Anusha Nagabandi, Gregory Kahn, Ronald S. Fearing, and Sergey Levine. Neural network dynamics for model-based deep reinforcement learning with model-free fine-tuning. In ICRA, 2018. ",
|
| 1220 |
+
"bbox": [
|
| 1221 |
+
173,
|
| 1222 |
+
429,
|
| 1223 |
+
823,
|
| 1224 |
+
458
|
| 1225 |
+
],
|
| 1226 |
+
"page_idx": 10
|
| 1227 |
+
},
|
| 1228 |
+
{
|
| 1229 |
+
"type": "text",
|
| 1230 |
+
"text": "Andrew Y. $\\mathrm { N g }$ , Daishi Harada, and Stuart J. Russell. Policy invariance under reward transformations: Theory and application to reward shaping. In ICML, 1999. ",
|
| 1231 |
+
"bbox": [
|
| 1232 |
+
173,
|
| 1233 |
+
467,
|
| 1234 |
+
821,
|
| 1235 |
+
496
|
| 1236 |
+
],
|
| 1237 |
+
"page_idx": 10
|
| 1238 |
+
},
|
| 1239 |
+
{
|
| 1240 |
+
"type": "text",
|
| 1241 |
+
"text": "OpenAI. Learning dexterous in-hand manipulation. ArXiv e-prints, 2018. ",
|
| 1242 |
+
"bbox": [
|
| 1243 |
+
173,
|
| 1244 |
+
503,
|
| 1245 |
+
656,
|
| 1246 |
+
520
|
| 1247 |
+
],
|
| 1248 |
+
"page_idx": 10
|
| 1249 |
+
},
|
| 1250 |
+
{
|
| 1251 |
+
"type": "text",
|
| 1252 |
+
"text": "Ian Osband, Daniel Russo, and Benjamin Van Roy. (more) efficient reinforcement learning via posterior sampling. In Advances in Neural Information Processing Systems, pp. 3003–3011, 2013. ",
|
| 1253 |
+
"bbox": [
|
| 1254 |
+
173,
|
| 1255 |
+
527,
|
| 1256 |
+
823,
|
| 1257 |
+
558
|
| 1258 |
+
],
|
| 1259 |
+
"page_idx": 10
|
| 1260 |
+
},
|
| 1261 |
+
{
|
| 1262 |
+
"type": "text",
|
| 1263 |
+
"text": "Ian Osband, Benjamin Van Roy, and Zheng Wen. Generalization and exploration via randomized value functions. In ICML, 2016. ",
|
| 1264 |
+
"bbox": [
|
| 1265 |
+
171,
|
| 1266 |
+
564,
|
| 1267 |
+
823,
|
| 1268 |
+
594
|
| 1269 |
+
],
|
| 1270 |
+
"page_idx": 10
|
| 1271 |
+
},
|
| 1272 |
+
{
|
| 1273 |
+
"type": "text",
|
| 1274 |
+
"text": "Ian Osband, John Aslanides, and Albin Cassirer. Randomized prior functions for deep reinforcement learning. CoRR, abs/1806.03335, 2018. ",
|
| 1275 |
+
"bbox": [
|
| 1276 |
+
169,
|
| 1277 |
+
602,
|
| 1278 |
+
823,
|
| 1279 |
+
631
|
| 1280 |
+
],
|
| 1281 |
+
"page_idx": 10
|
| 1282 |
+
},
|
| 1283 |
+
{
|
| 1284 |
+
"type": "text",
|
| 1285 |
+
"text": "Deepak Pathak, Pulkit Agrawal, Alexei A Efros, and Trevor Darrell. Curiosity-driven exploration by self-supervised prediction. In International Conference on Machine Learning (ICML), volume 2017, 2017. ",
|
| 1286 |
+
"bbox": [
|
| 1287 |
+
173,
|
| 1288 |
+
638,
|
| 1289 |
+
823,
|
| 1290 |
+
683
|
| 1291 |
+
],
|
| 1292 |
+
"page_idx": 10
|
| 1293 |
+
},
|
| 1294 |
+
{
|
| 1295 |
+
"type": "text",
|
| 1296 |
+
"text": "Matthias Plappert, Rein Houthooft, Prafulla Dhariwal, Szymon Sidor, Richard Y Chen, Xi Chen, Tamim Asfour, Pieter Abbeel, and Marcin Andrychowicz. Parameter space noise for exploration. arXiv preprint arXiv:1706.01905, 2017. ",
|
| 1297 |
+
"bbox": [
|
| 1298 |
+
173,
|
| 1299 |
+
690,
|
| 1300 |
+
823,
|
| 1301 |
+
733
|
| 1302 |
+
],
|
| 1303 |
+
"page_idx": 10
|
| 1304 |
+
},
|
| 1305 |
+
{
|
| 1306 |
+
"type": "text",
|
| 1307 |
+
"text": "S. Joe Qina and Thomas A. Badgwellb. A survey of industrial model predictive control technology. Control Engineering Practice, 2003. ",
|
| 1308 |
+
"bbox": [
|
| 1309 |
+
168,
|
| 1310 |
+
741,
|
| 1311 |
+
823,
|
| 1312 |
+
771
|
| 1313 |
+
],
|
| 1314 |
+
"page_idx": 10
|
| 1315 |
+
},
|
| 1316 |
+
{
|
| 1317 |
+
"type": "text",
|
| 1318 |
+
"text": "Joose Rajamaki and Perttu H ¨ am¨ al¨ ainen. Augmenting sampling based controllers with machine ¨ learning. In Proceedings of the ACM SIGGRAPH / Eurographics Symposium on Computer Animation, SCA ’17, pp. 11:1–11:9, New York, NY, USA, 2017. ACM. ISBN 978-1-4503-5091- 4. doi: 10.1145/3099564.3099579. URL http://doi.acm.org/10.1145/3099564. 3099579. ",
|
| 1319 |
+
"bbox": [
|
| 1320 |
+
173,
|
| 1321 |
+
779,
|
| 1322 |
+
825,
|
| 1323 |
+
848
|
| 1324 |
+
],
|
| 1325 |
+
"page_idx": 10
|
| 1326 |
+
},
|
| 1327 |
+
{
|
| 1328 |
+
"type": "text",
|
| 1329 |
+
"text": "Aravind Rajeswaran, Sarvjeet Ghotra, Balaraman Ravindran, and Sergey Levine. Epopt: Learning robust neural network policies using model ensembles. In ICLR, 2016. ",
|
| 1330 |
+
"bbox": [
|
| 1331 |
+
173,
|
| 1332 |
+
858,
|
| 1333 |
+
821,
|
| 1334 |
+
887
|
| 1335 |
+
],
|
| 1336 |
+
"page_idx": 10
|
| 1337 |
+
},
|
| 1338 |
+
{
|
| 1339 |
+
"type": "text",
|
| 1340 |
+
"text": "Aravind Rajeswaran, Kendall Lowrey, Emanuel Todorov, and Sham Kakade. Towards Generalization and Simplicity in Continuous Control. In NIPS, 2017. ",
|
| 1341 |
+
"bbox": [
|
| 1342 |
+
174,
|
| 1343 |
+
895,
|
| 1344 |
+
821,
|
| 1345 |
+
924
|
| 1346 |
+
],
|
| 1347 |
+
"page_idx": 10
|
| 1348 |
+
},
|
| 1349 |
+
{
|
| 1350 |
+
"type": "text",
|
| 1351 |
+
"text": "Aravind Rajeswaran, Vikash Kumar, Abhishek Gupta, Giulia Vezzani, John Schulman, Emanuel Todorov, and Sergey Levine. Learning Complex Dexterous Manipulation with Deep Reinforcement Learning and Demonstrations. In Proceedings of Robotics: Science and Systems (RSS), 2018. ",
|
| 1352 |
+
"bbox": [
|
| 1353 |
+
176,
|
| 1354 |
+
103,
|
| 1355 |
+
823,
|
| 1356 |
+
159
|
| 1357 |
+
],
|
| 1358 |
+
"page_idx": 11
|
| 1359 |
+
},
|
| 1360 |
+
{
|
| 1361 |
+
"type": "text",
|
| 1362 |
+
"text": "Stephane Ross and J. Andrew Bagnell. Agnostic system identification for model-based reinforce- ´ ment learning. In ICML, 2012. ",
|
| 1363 |
+
"bbox": [
|
| 1364 |
+
173,
|
| 1365 |
+
169,
|
| 1366 |
+
821,
|
| 1367 |
+
196
|
| 1368 |
+
],
|
| 1369 |
+
"page_idx": 11
|
| 1370 |
+
},
|
| 1371 |
+
{
|
| 1372 |
+
"type": "text",
|
| 1373 |
+
"text": "Stephane Ross, Geoffrey Gordon, and Drew Bagnell. A reduction of imitation learning and struc-´ tured prediction to no-regret online learning. In Proceedings of the fourteenth international conference on artificial intelligence and statistics, pp. 627–635, 2011. ",
|
| 1374 |
+
"bbox": [
|
| 1375 |
+
174,
|
| 1376 |
+
205,
|
| 1377 |
+
825,
|
| 1378 |
+
250
|
| 1379 |
+
],
|
| 1380 |
+
"page_idx": 11
|
| 1381 |
+
},
|
| 1382 |
+
{
|
| 1383 |
+
"type": "text",
|
| 1384 |
+
"text": "John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. Highdimensional continuous control using generalized advantage estimation. arXiv preprint arXiv:1506.02438, 2015. ",
|
| 1385 |
+
"bbox": [
|
| 1386 |
+
173,
|
| 1387 |
+
257,
|
| 1388 |
+
825,
|
| 1389 |
+
300
|
| 1390 |
+
],
|
| 1391 |
+
"page_idx": 11
|
| 1392 |
+
},
|
| 1393 |
+
{
|
| 1394 |
+
"type": "text",
|
| 1395 |
+
"text": "John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. Highdimensional continuous control using generalized advantage estimation. In ICLR, 2016. ",
|
| 1396 |
+
"bbox": [
|
| 1397 |
+
173,
|
| 1398 |
+
309,
|
| 1399 |
+
823,
|
| 1400 |
+
338
|
| 1401 |
+
],
|
| 1402 |
+
"page_idx": 11
|
| 1403 |
+
},
|
| 1404 |
+
{
|
| 1405 |
+
"type": "text",
|
| 1406 |
+
"text": "David Silver, Aja Huang, Chris J. Maddison, Arthur Guez, Laurent Sifre, George van den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Vedavyas Panneershelvam, Marc Lanctot, Sander Dieleman, Dominik Grewe, John Nham, Nal Kalchbrenner, Ilya Sutskever, Timothy P. Lillicrap, Madeleine Leach, Koray Kavukcuoglu, Thore Graepel, and Demis Hassabis. Mastering the game of go with deep neural networks and tree search. Nature, 529:484–489, 2016. ",
|
| 1407 |
+
"bbox": [
|
| 1408 |
+
173,
|
| 1409 |
+
347,
|
| 1410 |
+
825,
|
| 1411 |
+
416
|
| 1412 |
+
],
|
| 1413 |
+
"page_idx": 11
|
| 1414 |
+
},
|
| 1415 |
+
{
|
| 1416 |
+
"type": "text",
|
| 1417 |
+
"text": "David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton, et al. Mastering the game of go without human knowledge. Nature, 550(7676):354, 2017. ",
|
| 1418 |
+
"bbox": [
|
| 1419 |
+
176,
|
| 1420 |
+
426,
|
| 1421 |
+
820,
|
| 1422 |
+
469
|
| 1423 |
+
],
|
| 1424 |
+
"page_idx": 11
|
| 1425 |
+
},
|
| 1426 |
+
{
|
| 1427 |
+
"type": "text",
|
| 1428 |
+
"text": "Bradly C Stadie, Sergey Levine, and Pieter Abbeel. Incentivizing exploration in reinforcement learning with deep predictive models. arXiv preprint arXiv:1507.00814, 2015. ",
|
| 1429 |
+
"bbox": [
|
| 1430 |
+
169,
|
| 1431 |
+
477,
|
| 1432 |
+
823,
|
| 1433 |
+
507
|
| 1434 |
+
],
|
| 1435 |
+
"page_idx": 11
|
| 1436 |
+
},
|
| 1437 |
+
{
|
| 1438 |
+
"type": "text",
|
| 1439 |
+
"text": "Wen Sun, J. Andrew Bagnell, and Byron Boots. Truncated horizon policy search: Combining reinforcement learning & imitation learning. CoRR, abs/1805.11240, 2018a. ",
|
| 1440 |
+
"bbox": [
|
| 1441 |
+
169,
|
| 1442 |
+
515,
|
| 1443 |
+
823,
|
| 1444 |
+
545
|
| 1445 |
+
],
|
| 1446 |
+
"page_idx": 11
|
| 1447 |
+
},
|
| 1448 |
+
{
|
| 1449 |
+
"type": "text",
|
| 1450 |
+
"text": "Wen Sun, Geoffrey J. Gordon, Byron Boots, and J. Andrew Bagnell. Dual policy iteration. CoRR, abs/1805.10755, 2018b. ",
|
| 1451 |
+
"bbox": [
|
| 1452 |
+
171,
|
| 1453 |
+
551,
|
| 1454 |
+
823,
|
| 1455 |
+
582
|
| 1456 |
+
],
|
| 1457 |
+
"page_idx": 11
|
| 1458 |
+
},
|
| 1459 |
+
{
|
| 1460 |
+
"type": "text",
|
| 1461 |
+
"text": "Yuval Tassa, Tom Erez, and Emanuel Todorov. Synthesis and stabilization of complex behaviors through online trajectory optimization. In Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, pp. 4906–4913. IEEE, 2012. ",
|
| 1462 |
+
"bbox": [
|
| 1463 |
+
174,
|
| 1464 |
+
589,
|
| 1465 |
+
825,
|
| 1466 |
+
633
|
| 1467 |
+
],
|
| 1468 |
+
"page_idx": 11
|
| 1469 |
+
},
|
| 1470 |
+
{
|
| 1471 |
+
"type": "text",
|
| 1472 |
+
"text": "Yuval Tassa, Nicolas Mansard, and Emanuel Todorov. Control-limited differential dynamic programming. 2014 IEEE International Conference on Robotics and Automation (ICRA), pp. 1168– 1175, 2014. ",
|
| 1473 |
+
"bbox": [
|
| 1474 |
+
176,
|
| 1475 |
+
641,
|
| 1476 |
+
823,
|
| 1477 |
+
684
|
| 1478 |
+
],
|
| 1479 |
+
"page_idx": 11
|
| 1480 |
+
},
|
| 1481 |
+
{
|
| 1482 |
+
"type": "text",
|
| 1483 |
+
"text": "Evangelos Theodorou, Jonas Buchli, and Stefan Schaal. A generalized path integral control approach to reinforcement learning. Journal of Machine Learning Research, 11:3137–3181, 2010. ",
|
| 1484 |
+
"bbox": [
|
| 1485 |
+
171,
|
| 1486 |
+
693,
|
| 1487 |
+
823,
|
| 1488 |
+
722
|
| 1489 |
+
],
|
| 1490 |
+
"page_idx": 11
|
| 1491 |
+
},
|
| 1492 |
+
{
|
| 1493 |
+
"type": "text",
|
| 1494 |
+
"text": "Emanuel Todorov. Linearly-solvable markov decision problems. In NIPS, 2006. ",
|
| 1495 |
+
"bbox": [
|
| 1496 |
+
173,
|
| 1497 |
+
731,
|
| 1498 |
+
699,
|
| 1499 |
+
746
|
| 1500 |
+
],
|
| 1501 |
+
"page_idx": 11
|
| 1502 |
+
},
|
| 1503 |
+
{
|
| 1504 |
+
"type": "text",
|
| 1505 |
+
"text": "Emanuel Todorov and Weiwei Li. A generalized iterative lqg method for locally-optimal feedback control of constrained nonlinear stochastic systems. In ACC, 2005. ",
|
| 1506 |
+
"bbox": [
|
| 1507 |
+
169,
|
| 1508 |
+
755,
|
| 1509 |
+
823,
|
| 1510 |
+
784
|
| 1511 |
+
],
|
| 1512 |
+
"page_idx": 11
|
| 1513 |
+
},
|
| 1514 |
+
{
|
| 1515 |
+
"type": "text",
|
| 1516 |
+
"text": "Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In IROS, 2012. ",
|
| 1517 |
+
"bbox": [
|
| 1518 |
+
169,
|
| 1519 |
+
791,
|
| 1520 |
+
823,
|
| 1521 |
+
820
|
| 1522 |
+
],
|
| 1523 |
+
"page_idx": 11
|
| 1524 |
+
},
|
| 1525 |
+
{
|
| 1526 |
+
"type": "text",
|
| 1527 |
+
"text": "Grady Williams, Paul Drews, Brian Goldfain, James M Rehg, and Evangelos A Theodorou. Aggressive driving with model predictive path integral control. In Robotics and Automation (ICRA), 2016 IEEE International Conference on, pp. 1433–1440. IEEE, 2016. ",
|
| 1528 |
+
"bbox": [
|
| 1529 |
+
173,
|
| 1530 |
+
829,
|
| 1531 |
+
825,
|
| 1532 |
+
872
|
| 1533 |
+
],
|
| 1534 |
+
"page_idx": 11
|
| 1535 |
+
},
|
| 1536 |
+
{
|
| 1537 |
+
"type": "text",
|
| 1538 |
+
"text": "Mingyuan Zhong, Mikala Johnson, Yuval Tassa, Tom Erez, and Emanuel Todorov. Value function approximation and model predictive control. In Adaptive Dynamic Programming And Reinforcement Learning (ADPRL), 2013 IEEE Symposium on, pp. 100–107. IEEE, 2013. ",
|
| 1539 |
+
"bbox": [
|
| 1540 |
+
174,
|
| 1541 |
+
881,
|
| 1542 |
+
823,
|
| 1543 |
+
924
|
| 1544 |
+
],
|
| 1545 |
+
"page_idx": 11
|
| 1546 |
+
},
|
| 1547 |
+
{
|
| 1548 |
+
"type": "text",
|
| 1549 |
+
"text": "A APPENDIX: EXPERIMENTAL DETAILS, HUMANOID ",
|
| 1550 |
+
"text_level": 1,
|
| 1551 |
+
"bbox": [
|
| 1552 |
+
174,
|
| 1553 |
+
102,
|
| 1554 |
+
629,
|
| 1555 |
+
118
|
| 1556 |
+
],
|
| 1557 |
+
"page_idx": 12
|
| 1558 |
+
},
|
| 1559 |
+
{
|
| 1560 |
+
"type": "text",
|
| 1561 |
+
"text": "The model used for the humanoid experiments was originally distributed with the MuJoCo (Todorov et al., 2012) software package and modified for our use. The model nominally has 27 degrees of freedom, including the floating base. It utilizes direct torque actuation for control, necessitating a small timestep of 0.008 seconds. The actuation input is limited to $\\pm 1 . 0$ , but the original gear ratios are left unchanged. ",
|
| 1562 |
+
"bbox": [
|
| 1563 |
+
173,
|
| 1564 |
+
135,
|
| 1565 |
+
825,
|
| 1566 |
+
207
|
| 1567 |
+
],
|
| 1568 |
+
"page_idx": 12
|
| 1569 |
+
},
|
| 1570 |
+
{
|
| 1571 |
+
"type": "text",
|
| 1572 |
+
"text": "For POLO, the choice of inputs for the value function involves a few design decisions. We take inspiration from robotics by using only easily observed values. ",
|
| 1573 |
+
"bbox": [
|
| 1574 |
+
174,
|
| 1575 |
+
212,
|
| 1576 |
+
823,
|
| 1577 |
+
241
|
| 1578 |
+
],
|
| 1579 |
+
"page_idx": 12
|
| 1580 |
+
},
|
| 1581 |
+
{
|
| 1582 |
+
"type": "text",
|
| 1583 |
+
"text": "Dims. Observation \n6 Direction & Normal Vector, Torso \n3 Direction Vector, Neck to R. Hand \n3 Direction Vector, Neck to L. Hand \n3 Direction Vector, Hip to R. Foot \n3 Direction Vector, Hip to L. Foot \n5 Height, Root, Hands, & Feet \n6 Root Velocities \n5 Touch Sensors, Head, Hands, & Feet \nValue Parameter \n0.99 $\\gamma$ discount Factor \n64 Planning Horizon Length \n120 MPPI Rollouts \n0.2 MPPI Noise $\\sigma$ \n1.25 MPPI Temperature ",
|
| 1584 |
+
"bbox": [
|
| 1585 |
+
181,
|
| 1586 |
+
257,
|
| 1587 |
+
486,
|
| 1588 |
+
382
|
| 1589 |
+
],
|
| 1590 |
+
"page_idx": 12
|
| 1591 |
+
},
|
| 1592 |
+
{
|
| 1593 |
+
"type": "text",
|
| 1594 |
+
"text": "",
|
| 1595 |
+
"bbox": [
|
| 1596 |
+
519,
|
| 1597 |
+
277,
|
| 1598 |
+
748,
|
| 1599 |
+
363
|
| 1600 |
+
],
|
| 1601 |
+
"page_idx": 12
|
| 1602 |
+
},
|
| 1603 |
+
{
|
| 1604 |
+
"type": "text",
|
| 1605 |
+
"text": "For value function approximation in POLO for the humanoid tasks, we use an ensemble of 6 neural networks, each of which has 2 layers with 16 hidden parameters each; tanh is used for non-linearity. Training is performed with 64 gradient steps on minibatches of size 32, using ADAM with default parameters, every 16 timesteps the agent experiences. ",
|
| 1606 |
+
"bbox": [
|
| 1607 |
+
173,
|
| 1608 |
+
401,
|
| 1609 |
+
825,
|
| 1610 |
+
458
|
| 1611 |
+
],
|
| 1612 |
+
"page_idx": 12
|
| 1613 |
+
},
|
| 1614 |
+
{
|
| 1615 |
+
"type": "text",
|
| 1616 |
+
"text": "In scenarios where the agent resets, we consider a horizon of 600 timesteps with 20 episodes, giving a total agent lifetime of 12000 timesteps or 96 seconds. When we consider no resets, we use the same total timesteps. A control cost is shared for each scenario, where we penalize an actuator’s applied force scaled by the inverse of the mass matrix. Task specific rewards are as follows. ",
|
| 1617 |
+
"bbox": [
|
| 1618 |
+
173,
|
| 1619 |
+
464,
|
| 1620 |
+
825,
|
| 1621 |
+
521
|
| 1622 |
+
],
|
| 1623 |
+
"page_idx": 12
|
| 1624 |
+
},
|
| 1625 |
+
{
|
| 1626 |
+
"type": "text",
|
| 1627 |
+
"text": "A.1 HUMANOID GETUP ",
|
| 1628 |
+
"text_level": 1,
|
| 1629 |
+
"bbox": [
|
| 1630 |
+
176,
|
| 1631 |
+
541,
|
| 1632 |
+
352,
|
| 1633 |
+
556
|
| 1634 |
+
],
|
| 1635 |
+
"page_idx": 12
|
| 1636 |
+
},
|
| 1637 |
+
{
|
| 1638 |
+
"type": "text",
|
| 1639 |
+
"text": "In the getup scenario, the agent is initialized in a supine position, and is required to bring its root height to a target of 1.1 meters. The reward functions used are as follows. In the non-sparse case, the difficulty in this task is eschewing the immediate reward for sitting in favor of the delayed reward of standing; this sequence is non-trivial to discover. ",
|
| 1640 |
+
"bbox": [
|
| 1641 |
+
174,
|
| 1642 |
+
568,
|
| 1643 |
+
825,
|
| 1644 |
+
625
|
| 1645 |
+
],
|
| 1646 |
+
"page_idx": 12
|
| 1647 |
+
},
|
| 1648 |
+
{
|
| 1649 |
+
"type": "equation",
|
| 1650 |
+
"img_path": "images/b8a9d147bed69ac16abcebaff0aa0d977f773406524ad1831533516d4a8eda89.jpg",
|
| 1651 |
+
"text": "$$\nR ( s ) = \\{ \\begin{array} { l l } { 1 . 0 - ( 1 . 2 5 - R o o t _ { z } ) , } & { \\mathrm { i f ~ } R o o t _ { z } \\leq 1 . 2 5 } \\\\ { 1 . 0 , } & { \\mathrm { o t h e r w i s e } } \\end{array} , R _ { s p a r s e } ( s ) = \\{ \\begin{array} { l l } { 0 . 0 , } & { \\mathrm { i f ~ } R o o t _ { z } \\leq 1 . 2 5 } \\\\ { 1 . 0 , } & { \\mathrm { o t h e r w i s e } } \\end{array} \n$$",
|
| 1652 |
+
"text_format": "latex",
|
| 1653 |
+
"bbox": [
|
| 1654 |
+
192,
|
| 1655 |
+
636,
|
| 1656 |
+
803,
|
| 1657 |
+
671
|
| 1658 |
+
],
|
| 1659 |
+
"page_idx": 12
|
| 1660 |
+
},
|
| 1661 |
+
{
|
| 1662 |
+
"type": "text",
|
| 1663 |
+
"text": "A.2 HUMANOID WALK ",
|
| 1664 |
+
"text_level": 1,
|
| 1665 |
+
"bbox": [
|
| 1666 |
+
176,
|
| 1667 |
+
690,
|
| 1668 |
+
348,
|
| 1669 |
+
705
|
| 1670 |
+
],
|
| 1671 |
+
"page_idx": 12
|
| 1672 |
+
},
|
| 1673 |
+
{
|
| 1674 |
+
"type": "text",
|
| 1675 |
+
"text": "In the walking scenario, the agent is initialized in an upright configuration. We specify a reward function that either penalizes deviation from a target height of 1.1 meters, or penalizes the deviation from both a target speed of 1.0 meters/second and the distance from the world’s $\\mathbf { X }$ -axis to encourage the agent to walk in a straight line. We choose a target speed as opposed to rewarding maximum speed to encourage stable walking gaits. ",
|
| 1676 |
+
"bbox": [
|
| 1677 |
+
174,
|
| 1678 |
+
718,
|
| 1679 |
+
825,
|
| 1680 |
+
789
|
| 1681 |
+
],
|
| 1682 |
+
"page_idx": 12
|
| 1683 |
+
},
|
| 1684 |
+
{
|
| 1685 |
+
"type": "equation",
|
| 1686 |
+
"img_path": "images/b4f44aff6568aeeef179963558c0f79ab0a5d9ce31dd41dbbbf2ef091cfced84.jpg",
|
| 1687 |
+
"text": "$$\nR ( s ) = \\left\\{ \\begin{array} { l l } { - ( 1 . 2 5 - R o o t _ { z } ) , } & { \\mathrm { i f ~ } R o o t _ { z } \\leq 1 . 2 5 } \\\\ { 1 . 0 - | 1 . 0 - V e l _ { x } | - | R o o t _ { x } | , } & { \\mathrm { o t h e r w i s e } } \\end{array} \\right.\n$$",
|
| 1688 |
+
"text_format": "latex",
|
| 1689 |
+
"bbox": [
|
| 1690 |
+
300,
|
| 1691 |
+
799,
|
| 1692 |
+
696,
|
| 1693 |
+
834
|
| 1694 |
+
],
|
| 1695 |
+
"page_idx": 12
|
| 1696 |
+
},
|
| 1697 |
+
{
|
| 1698 |
+
"type": "text",
|
| 1699 |
+
"text": "A.3 HUMANOID BOX ",
|
| 1700 |
+
"text_level": 1,
|
| 1701 |
+
"bbox": [
|
| 1702 |
+
176,
|
| 1703 |
+
853,
|
| 1704 |
+
336,
|
| 1705 |
+
868
|
| 1706 |
+
],
|
| 1707 |
+
"page_idx": 12
|
| 1708 |
+
},
|
| 1709 |
+
{
|
| 1710 |
+
"type": "text",
|
| 1711 |
+
"text": "For the box environment, we place a 0.9 meter wide cube in front of the humanoid, which needs to be pushed to a specific point. The friction between the box and ground is very low, however, and most pushes cause the box to slide out of reach; POLO learns to better limit the initial push to ",
|
| 1712 |
+
"bbox": [
|
| 1713 |
+
174,
|
| 1714 |
+
881,
|
| 1715 |
+
825,
|
| 1716 |
+
924
|
| 1717 |
+
],
|
| 1718 |
+
"page_idx": 12
|
| 1719 |
+
},
|
| 1720 |
+
{
|
| 1721 |
+
"type": "text",
|
| 1722 |
+
"text": "control the box to the target. ",
|
| 1723 |
+
"bbox": [
|
| 1724 |
+
173,
|
| 1725 |
+
103,
|
| 1726 |
+
361,
|
| 1727 |
+
118
|
| 1728 |
+
],
|
| 1729 |
+
"page_idx": 13
|
| 1730 |
+
},
|
| 1731 |
+
{
|
| 1732 |
+
"type": "equation",
|
| 1733 |
+
"img_path": "images/c2cde03111cb63004f8fd2574bc7efc6a8e2b80c56c57d9a1c7692c85830aa16.jpg",
|
| 1734 |
+
"text": "$$\nR ( s ) = \\left\\{ \\begin{array} { l l } { - ( 1 . 2 5 - R o o t _ { z } ) , } & { \\mathrm { i f ~ } R o o t _ { z } \\leq 1 . 2 5 } \\\\ { 2 . 0 - \\| B o x _ { x y } - R o o t _ { x y } \\| _ { 2 } , } & { \\mathrm { e l s e ~ i f ~ } | B o x _ { x y } - R o o t _ { x y } | _ { 2 } > 0 . 8 } \\\\ { 4 . 0 - 2 * \\| B o x _ { x y } - T a r g e t _ { x y } \\| _ { 2 } , } & { \\mathrm { o t h e r w i s e } } \\end{array} \\right.\n$$",
|
| 1735 |
+
"text_format": "latex",
|
| 1736 |
+
"bbox": [
|
| 1737 |
+
230,
|
| 1738 |
+
122,
|
| 1739 |
+
764,
|
| 1740 |
+
175
|
| 1741 |
+
],
|
| 1742 |
+
"page_idx": 13
|
| 1743 |
+
},
|
| 1744 |
+
{
|
| 1745 |
+
"type": "text",
|
| 1746 |
+
"text": "In this setup, the observation vector increases with the global position of the box, and the dimensionality of the system increase by 6. The box initially starts 1.5 meters in front of the humanoid, and needs to be navigated to a position 2.5 meters in front of the humanoid. ",
|
| 1747 |
+
"bbox": [
|
| 1748 |
+
173,
|
| 1749 |
+
178,
|
| 1750 |
+
825,
|
| 1751 |
+
220
|
| 1752 |
+
],
|
| 1753 |
+
"page_idx": 13
|
| 1754 |
+
},
|
| 1755 |
+
{
|
| 1756 |
+
"type": "text",
|
| 1757 |
+
"text": "B APPENDIX: EXPERIMENTAL DETAILS, HAND MANIPULATION ",
|
| 1758 |
+
"text_level": 1,
|
| 1759 |
+
"bbox": [
|
| 1760 |
+
176,
|
| 1761 |
+
239,
|
| 1762 |
+
720,
|
| 1763 |
+
257
|
| 1764 |
+
],
|
| 1765 |
+
"page_idx": 13
|
| 1766 |
+
},
|
| 1767 |
+
{
|
| 1768 |
+
"type": "text",
|
| 1769 |
+
"text": "We use the Adroit hand model (Kumar, 2016) and build on top of the hand manipulation task suite of Rajeswaran et al. (2018). The hand is position controlled and the dice is modeled as a free object with 3 translational degrees of freedom and a ball joint for three rotational degrees of freedom. The base of the hand is not actuated, and the agent controls only the fingers and wrist. The dice is presented to the hand initially in some randomized configuration, and the agent has to reorient the dice to the desired configuration. The desired configuration is randomized every 75 timesteps and the trajectory optimizer does not see this randomization. Thus the randomization can be interpreted as unmodelled external disturbances to the system. We use a simple reward function for the task: ",
|
| 1770 |
+
"bbox": [
|
| 1771 |
+
173,
|
| 1772 |
+
270,
|
| 1773 |
+
826,
|
| 1774 |
+
382
|
| 1775 |
+
],
|
| 1776 |
+
"page_idx": 13
|
| 1777 |
+
},
|
| 1778 |
+
{
|
| 1779 |
+
"type": "equation",
|
| 1780 |
+
"img_path": "images/5575dff0eabb9fd850115d20b5611d315b4598f715c828fe7cb492daeaeb16ff.jpg",
|
| 1781 |
+
"text": "$$\nR ( s ) = - 0 . 5 \\ell _ { 1 } ( x _ { o } , x _ { g } ) - 0 . 0 5 \\ell _ { q u a t } ( q _ { o } , q _ { g } ) ,\n$$",
|
| 1782 |
+
"text_format": "latex",
|
| 1783 |
+
"bbox": [
|
| 1784 |
+
346,
|
| 1785 |
+
386,
|
| 1786 |
+
648,
|
| 1787 |
+
404
|
| 1788 |
+
],
|
| 1789 |
+
"page_idx": 13
|
| 1790 |
+
},
|
| 1791 |
+
{
|
| 1792 |
+
"type": "text",
|
| 1793 |
+
"text": "where $x _ { o }$ and $x _ { g }$ are the Cartesian positions of the object (dice) and goal respectively. The goal location for the dice is a fixed position in space and is based on the initial location of the palm of the hand. $\\ell _ { 1 }$ is the L1 norm. $q _ { o }$ and $q _ { g }$ are the orientation configurations of object and goal, respectively, and expressed as quaternions with $\\ell _ { q u a t }$ being the quaternion difference. ",
|
| 1794 |
+
"bbox": [
|
| 1795 |
+
174,
|
| 1796 |
+
405,
|
| 1797 |
+
825,
|
| 1798 |
+
463
|
| 1799 |
+
],
|
| 1800 |
+
"page_idx": 13
|
| 1801 |
+
},
|
| 1802 |
+
{
|
| 1803 |
+
"type": "text",
|
| 1804 |
+
"text": "We use 80 trajectories in MPPI with temperature of 10. We use an ensemble of 6 networks with 2 layers and 64 units each. The value function is updated every 25 steps of interaction with the world, and we take 16 gradient steps each with a batch size of 16. These numbers were arrived at after a coarse hyperparameter search, and we expect that better hyperparameter settings could exist. ",
|
| 1805 |
+
"bbox": [
|
| 1806 |
+
173,
|
| 1807 |
+
468,
|
| 1808 |
+
825,
|
| 1809 |
+
526
|
| 1810 |
+
],
|
| 1811 |
+
"page_idx": 13
|
| 1812 |
+
},
|
| 1813 |
+
{
|
| 1814 |
+
"type": "text",
|
| 1815 |
+
"text": "C PROOF OF LEMMA 2 AND REMARKS ",
|
| 1816 |
+
"text_level": 1,
|
| 1817 |
+
"bbox": [
|
| 1818 |
+
173,
|
| 1819 |
+
545,
|
| 1820 |
+
511,
|
| 1821 |
+
560
|
| 1822 |
+
],
|
| 1823 |
+
"page_idx": 13
|
| 1824 |
+
},
|
| 1825 |
+
{
|
| 1826 |
+
"type": "text",
|
| 1827 |
+
"text": "Let $\\hat { \\tau }$ and $\\tau ^ { * }$ represent the trajectories of length $H$ that would be generated by applying $\\hat { \\pi } _ { M P C }$ and $\\pi ^ { * }$ respectively on the MDP. Starting from some state $s$ , we have: ",
|
| 1828 |
+
"bbox": [
|
| 1829 |
+
173,
|
| 1830 |
+
575,
|
| 1831 |
+
825,
|
| 1832 |
+
603
|
| 1833 |
+
],
|
| 1834 |
+
"page_idx": 13
|
| 1835 |
+
},
|
| 1836 |
+
{
|
| 1837 |
+
"type": "equation",
|
| 1838 |
+
"img_path": "images/959b80fa94d3cfd803a3d466aae3214fca8d964d514cdb96ee7c62d5703faa71.jpg",
|
| 1839 |
+
"text": "$$\nV ^ { \\ast } ( s ) - V ^ { \\widehat { \\pi } _ { M P C } } ( s ) = \\mathbb { E } _ { \\tau ^ { \\ast } } \\left[ \\sum _ { t = 0 } ^ { H - 1 } \\gamma ^ { t } r _ { t } + \\gamma ^ { H } V ^ { \\ast } ( s _ { H } ) \\right] - \\mathbb { E } _ { \\widehat { \\tau } } \\left[ \\sum _ { t = 0 } ^ { H - 1 } \\gamma ^ { t } r _ { t } + \\gamma ^ { H } V ^ { \\widehat { \\pi } _ { M P C } } ( s _ { H } ) \\right]\n$$",
|
| 1840 |
+
"text_format": "latex",
|
| 1841 |
+
"bbox": [
|
| 1842 |
+
187,
|
| 1843 |
+
607,
|
| 1844 |
+
790,
|
| 1845 |
+
651
|
| 1846 |
+
],
|
| 1847 |
+
"page_idx": 13
|
| 1848 |
+
},
|
| 1849 |
+
{
|
| 1850 |
+
"type": "text",
|
| 1851 |
+
"text": "Adding and subtracting, $\\mathbb { E } _ { \\hat { \\tau } } [ \\sum _ { t } \\gamma ^ { t } r _ { t } + \\gamma ^ { H } V ^ { * } ( s _ { H } ) ]$ , we have: ",
|
| 1852 |
+
"bbox": [
|
| 1853 |
+
174,
|
| 1854 |
+
654,
|
| 1855 |
+
581,
|
| 1856 |
+
670
|
| 1857 |
+
],
|
| 1858 |
+
"page_idx": 13
|
| 1859 |
+
},
|
| 1860 |
+
{
|
| 1861 |
+
"type": "equation",
|
| 1862 |
+
"img_path": "images/294e9b32138e95d1c47cf048c7f8ccd843a5c0efe9efadf156786192a4a165c8.jpg",
|
| 1863 |
+
"text": "$$\n\\begin{array} { r l } & { V ^ { * } ( s ) - V ^ { \\widehat { \\pi } M P C } ( s ) = \\gamma ^ { H } \\mathbb { E } _ { \\widehat { \\tau } } \\left[ V ^ { * } ( s _ { H } ) - V ^ { \\widehat { \\pi } M P C } \\left( s _ { H } \\right) \\right] } \\\\ & { \\qquad + \\mathbb { E } _ { \\tau ^ { * } } \\left[ \\displaystyle \\sum _ { t = 0 } ^ { H - 1 } \\gamma ^ { t } r _ { t } + \\gamma ^ { H } V ^ { * } ( s _ { H } ) \\right] - \\mathbb { E } _ { \\widehat { \\tau } } \\left[ \\displaystyle \\sum _ { t = 0 } ^ { H - 1 } \\gamma ^ { t } r _ { t } + \\gamma ^ { H } V ^ { * } ( s _ { H } ) \\right] . } \\end{array}\n$$",
|
| 1864 |
+
"text_format": "latex",
|
| 1865 |
+
"bbox": [
|
| 1866 |
+
184,
|
| 1867 |
+
674,
|
| 1868 |
+
785,
|
| 1869 |
+
739
|
| 1870 |
+
],
|
| 1871 |
+
"page_idx": 13
|
| 1872 |
+
},
|
| 1873 |
+
{
|
| 1874 |
+
"type": "text",
|
| 1875 |
+
"text": "Since $\\begin{array} { r } { \\operatorname* { m a x } _ { s } | \\hat { V } ( s ) - V ^ { * } ( s ) | = \\epsilon , } \\end{array}$ , we have: ",
|
| 1876 |
+
"bbox": [
|
| 1877 |
+
176,
|
| 1878 |
+
742,
|
| 1879 |
+
454,
|
| 1880 |
+
758
|
| 1881 |
+
],
|
| 1882 |
+
"page_idx": 13
|
| 1883 |
+
},
|
| 1884 |
+
{
|
| 1885 |
+
"type": "equation",
|
| 1886 |
+
"img_path": "images/f43623c6c0884cae77fa5d5f0de1adf632d3a292e79f1b59a9f06e90d5107e22.jpg",
|
| 1887 |
+
"text": "$$\n\\begin{array} { r l } & { \\mathbb { E } _ { \\tau ^ { * } } \\left[ \\displaystyle \\sum _ { t = 0 } ^ { H - 1 } \\gamma ^ { t } r _ { t } + \\gamma ^ { H } V ^ { * } ( s _ { H } ) \\right] \\le \\mathbb { E } _ { \\tau ^ { * } } \\left[ \\displaystyle \\sum _ { t = 0 } ^ { H - 1 } \\gamma ^ { t } r _ { t } + \\gamma ^ { H } \\hat { V } ( s _ { H } ) \\right] + \\gamma ^ { H } \\epsilon } \\\\ & { \\mathbb { E } _ { \\hat { \\tau } } \\left[ \\displaystyle \\sum _ { t = 0 } ^ { H - 1 } \\gamma ^ { t } r _ { t } + \\gamma ^ { H } V ^ { * } ( s _ { H } ) \\right] \\ge \\mathbb { E } _ { \\hat { \\tau } } \\left[ \\displaystyle \\sum _ { t = 0 } ^ { H - 1 } \\gamma ^ { t } r _ { t } + \\gamma ^ { H } \\hat { V } ( s _ { H } ) \\right] - \\gamma ^ { H } \\epsilon } \\end{array}\n$$",
|
| 1888 |
+
"text_format": "latex",
|
| 1889 |
+
"bbox": [
|
| 1890 |
+
261,
|
| 1891 |
+
762,
|
| 1892 |
+
735,
|
| 1893 |
+
851
|
| 1894 |
+
],
|
| 1895 |
+
"page_idx": 13
|
| 1896 |
+
},
|
| 1897 |
+
{
|
| 1898 |
+
"type": "text",
|
| 1899 |
+
"text": "Furthermore, since $\\hat { \\tau }$ was generated by applying $\\hat { \\pi } _ { M P C }$ which optimizes the actions using $\\hat { V }$ as the terminal value/reward function, we have: ",
|
| 1900 |
+
"bbox": [
|
| 1901 |
+
176,
|
| 1902 |
+
854,
|
| 1903 |
+
823,
|
| 1904 |
+
882
|
| 1905 |
+
],
|
| 1906 |
+
"page_idx": 13
|
| 1907 |
+
},
|
| 1908 |
+
{
|
| 1909 |
+
"type": "equation",
|
| 1910 |
+
"img_path": "images/c9f45efe0bffc3b36c94c08e3b4565ee5943a7d04c32e104c29df702358cd4ea.jpg",
|
| 1911 |
+
"text": "$$\n\\mathbb { E } _ { \\hat { \\tau } } \\left[ \\sum _ { t = 0 } ^ { H - 1 } \\gamma ^ { t } r _ { t } + \\gamma ^ { H } \\hat { V } ( s _ { H } ) \\right] \\geq \\mathbb { E } _ { \\tau ^ { * } } \\left[ \\sum _ { t = 0 } ^ { H - 1 } \\gamma ^ { t } r _ { t } + \\gamma ^ { H } \\hat { V } ( s _ { H } ) \\right]\n$$",
|
| 1912 |
+
"text_format": "latex",
|
| 1913 |
+
"bbox": [
|
| 1914 |
+
295,
|
| 1915 |
+
885,
|
| 1916 |
+
700,
|
| 1917 |
+
929
|
| 1918 |
+
],
|
| 1919 |
+
"page_idx": 13
|
| 1920 |
+
},
|
| 1921 |
+
{
|
| 1922 |
+
"type": "text",
|
| 1923 |
+
"text": "using these bounds, we have: ",
|
| 1924 |
+
"bbox": [
|
| 1925 |
+
174,
|
| 1926 |
+
103,
|
| 1927 |
+
366,
|
| 1928 |
+
118
|
| 1929 |
+
],
|
| 1930 |
+
"page_idx": 14
|
| 1931 |
+
},
|
| 1932 |
+
{
|
| 1933 |
+
"type": "equation",
|
| 1934 |
+
"img_path": "images/f2d24522b2b09795558c3b7ccc861b3b8f7c5c2d378cb4dcd8f1532742093a6e.jpg",
|
| 1935 |
+
"text": "$$\n\\begin{array} { r l } & { V ^ { * } ( s ) - V ^ { \\hat { \\pi } _ { M P C } } ( s ) \\leq \\gamma ^ { H } \\mathbb { E } _ { \\hat { \\tau } } \\left[ V ^ { * } ( s _ { H } ) - V ^ { \\hat { \\pi } _ { M P C } } ( s _ { H } ) \\right] + 2 \\gamma ^ { H } \\epsilon } \\\\ & { \\qquad \\leq 2 \\gamma ^ { H } \\epsilon \\left( 1 + \\gamma ^ { H } + \\gamma ^ { 2 } H + \\dots \\right) } \\\\ & { \\qquad \\leq \\displaystyle \\frac { 2 \\gamma ^ { H } \\epsilon } { 1 - \\gamma ^ { H } } } \\end{array}\n$$",
|
| 1936 |
+
"text_format": "latex",
|
| 1937 |
+
"bbox": [
|
| 1938 |
+
282,
|
| 1939 |
+
123,
|
| 1940 |
+
714,
|
| 1941 |
+
203
|
| 1942 |
+
],
|
| 1943 |
+
"page_idx": 14
|
| 1944 |
+
},
|
| 1945 |
+
{
|
| 1946 |
+
"type": "text",
|
| 1947 |
+
"text": "by recursively applying the first bound to $V ^ { * } ( s _ { H } ) - V ^ { \\hat { \\pi } _ { M P C } } ( s _ { H } )$ . This holds for all states, and hence for any distribution over states. ",
|
| 1948 |
+
"bbox": [
|
| 1949 |
+
174,
|
| 1950 |
+
208,
|
| 1951 |
+
821,
|
| 1952 |
+
237
|
| 1953 |
+
],
|
| 1954 |
+
"page_idx": 14
|
| 1955 |
+
},
|
| 1956 |
+
{
|
| 1957 |
+
"type": "text",
|
| 1958 |
+
"text": "Notes and Remarks: For Eq. (13) to hold in general, and hence for the overall bound to hold, we require that the actions are optimized in closed loop. In other words, MPC has to optimize over the space of feedback policies as opposed to open loop actions. Many commonly used MPC algorithms like DDP and iLQG Jacobson & Mayne (1970); Todorov & Li (2005) have this property through the certainty equivalence principle for the case of Gaussian noise. For deterministic dynamics, which is the case for most common simulators like MuJoCo, Eq. (13) holds without the closed loop requirement. We summarize the different cases and potential ways to perform MPC below: ",
|
| 1959 |
+
"bbox": [
|
| 1960 |
+
173,
|
| 1961 |
+
251,
|
| 1962 |
+
825,
|
| 1963 |
+
351
|
| 1964 |
+
],
|
| 1965 |
+
"page_idx": 14
|
| 1966 |
+
},
|
| 1967 |
+
{
|
| 1968 |
+
"type": "text",
|
| 1969 |
+
"text": "• In the case of deterministic dynamics, the optimal open loop trajectory and optimal local \nfeedback policies have the same performance up to finite horizon $H$ . Thus, any trajectory optimization algorithm, such as iLQG and MPPI can be used. \n• In the case of stochastic dynamics with additive Gaussian noise, local dynamic programming methods like iLQG and DDP Todorov & Li (2005); Jacobson & Mayne (1970) provide efficient ways to optimize trajectories. These approaches also provide local feedback policies around the trajectories which are optimal due to the certainty equivalence principle. \nIn the case of general stochastic systems, various stochastic optimal control algorithms like path integral control Theodorou et al. (2010) can be used for the optimization. These situations are extremely rare in robotic control. ",
|
| 1970 |
+
"bbox": [
|
| 1971 |
+
215,
|
| 1972 |
+
363,
|
| 1973 |
+
825,
|
| 1974 |
+
512
|
| 1975 |
+
],
|
| 1976 |
+
"page_idx": 14
|
| 1977 |
+
},
|
| 1978 |
+
{
|
| 1979 |
+
"type": "text",
|
| 1980 |
+
"text": "Finally, we also note that Sun et al. Sun et al. (2018a) propose and arrive at a similar bound in the context of imitation learning and reward shaping. They however assume that a policy can simultaneously optimize the approximate value function over $H$ steps, which may not be possible for a parametric policy class. Since we consider MPC which is a non-parametric method (in the global sense), MPC can indeed simultaneously optimize for $H$ steps using $\\hat { V }$ . ",
|
| 1981 |
+
"bbox": [
|
| 1982 |
+
173,
|
| 1983 |
+
525,
|
| 1984 |
+
825,
|
| 1985 |
+
598
|
| 1986 |
+
],
|
| 1987 |
+
"page_idx": 14
|
| 1988 |
+
}
|
| 1989 |
+
]
|
parse/train/Byey7n05FQ/Byey7n05FQ_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/Byey7n05FQ/Byey7n05FQ_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/HkeSdCEtDS/HkeSdCEtDS.md
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ALTERNATING ROLES DIALOG MODEL WITH LARGESCALE PRE-TRAINED LANGUAGE MODELS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Existing dialog system models require extensive human annotations and are difficult to generalize to different tasks. The recent success of large pre-trained language models such as BERT and GPT-2 (Devlin et al., 2019; Radford et al., 2019) have suggested the effectiveness of incorporating language priors in down-stream NLP tasks. However, how much pre-trained language models can help dialog response generation is still under exploration. In this paper, we propose a simple, general, and effective framework: Alternating Roles Dialog Model (ARDM). ARDM models each speaker separately and takes advantage of the large pretrained language model. It requires no supervision from human annotations such as belief states or dialog acts to achieve effective conversations. ARDM outperforms or is on par with state-of-the-art methods on two popular task-oriented dialog datasets: CamRest676 and MultiWOZ. Moreover, we can generalize ARDM to more challenging, non-collaborative tasks such as persuasion. In persuasion tasks, ARDM is capable of generating human-like responses to persuade people to donate to a charity.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
It has been a long-standing ambition for artificial intelligence researchers to create an intelligent conversational agent that can generate human-like responses. Recently data-driven dialog models are more and more popular. However, most current state-of-the-art approaches still rely heavily on extensive annotations such as belief states and dialog acts (Lei et al., 2018). However, dialog content can vary considerably in different dialog tasks. Having a different intent or dialog act annotation scheme for each task is costly. For some tasks, it is even impossible, such as open-domain social chat. Thus, it is difficult to utilize these methods on challenging dialog tasks, such as persuasion and negotiation, where dialog states and acts are difficult to annotate.
|
| 12 |
+
|
| 13 |
+
Eric & Manning (2017) proposed a simple sequence-to-sequence architecture that requires no explicit annotations. The model learns to extract information from dialog history with attention and copy mechanism. However, due to the limited language modeling capabilities in the previous model, Sequicity (Lei et al., 2018), which reuses belief states as inputs for supervision, outperforms Eric & Manning (2017)’s method significantly in recent dialog datasets. But with the success of large pretrained language models such as BERT (Devlin et al., 2019) and GPT-2 (Radford et al., 2019), we re-examine Eric & Manning (2017)’s method and investigate how large-scale pre-trained language models can help dialog tasks.
|
| 14 |
+
|
| 15 |
+
Previous large-scale pre-trained language models are used to tackle documents with only one narrator. However, in dialogs, two speakers have different roles; therefore, their language model distributions are very different from each other. For example, customer service agents speak very differently to their customers. To address this issue, we propose ARDM, a dialog model that encodes and decodes different speaker utterances in alternating order with two pre-trained large-scale language models. To investigate whether ARDM can help dialog response generation, we evaluate its performance on three different task-oriented dialog datasets: CamRes676, MultiWOZ, and PersuasionForGood . The first two datasets are traditional information request dialog datasets with well-defined automatic evaluation metrics on task completion. By contrast, PersuasionForGood is a new dataset that focuses on persuading people to donate to a charity. There is no explicit dialog state defined in this task as such non-collaborative dialogs have various dialog actions.
|
| 16 |
+
|
| 17 |
+
We observe that ARDM is capable of improving task-oriented dialog tasks performance over the previous state-of-the-art methods without incorporating any explicit supervision from belief states or dialog acts. Also, due to ARDM’s simplicity and generality, one can rapidly build a dialog prototype on different types of applications using only conversations without any manual annotations. We also found that ARDM works well on complex dialogs, such as persuasion. The model generates dialog responses that successfully persuade people to donate to a charity, suggesting the potential of ARDM being used in wide-scale real-world settings.
|
| 18 |
+
|
| 19 |
+
# 2 RELATED WORK
|
| 20 |
+
|
| 21 |
+
Traditional dialog systems consist of a dialog manager to maintain dialog states and control the conversation flow. However, a dialog manager requires extensive manual annotations for training the sub-modules such as dialog state tracker or policy decision-maker. An alternative is to model dialog without explicitly modeling belief states. Specifically, Eric & Manning (2017) proposed a recurrent neural dialogue architecture using a sequence-to-sequence model that utilizes copy-mechanism to copy history information directly from raw dialog history. This method achieved the state-of-theart results on DSTC2 (Henderson et al., 2014), which is a simple dialog restaurant booking task with abundant data. However, such method did not perform well on more complex dialog task data sets CamRes676 (Wen et al., 2017) and KVRET (Eric et al., 2017). Sequicity (Lei et al., 2018) attributed the bad performance of Eric & Manning (2017)’s method to the omission of belief tracker. They introduced the concept of belief span and added belief tracker back to the model and achieved state-of-the-art performance.
|
| 22 |
+
|
| 23 |
+
Compared to Sequicity, Eric & Manning (2017)’s method provides a more general framework that reduces manual dialog state, user intent, and dialog act labeling by bypassing any symbolic annotations. Such a model can apply to datasets with no or partial annotations of belief states. In a real-world setting, if the dialog task introduces new slot values in belief states (i.e. a new type of food), Sequicity will suffer from the belief span decoder error in response generation. Thus, Eric & Manning (2017)’s method may be potentially more robust than Sequicity in this situation. Besides, if the task requires belief states for database search, we can treat belief tracking as a separate task. We can train a good belief tracking with only a small amount of annotated data, which reduces the annotation required and it is easier to fix errors. Also, since belief states are a set of important entities condensed from dialog history (i.e., often exact words from utterances), they do not introduce extra information to the model. Therefore, a dialog model with powerful representation learning should learn a form of belief states information automatically without human annotations as the scaffold.
|
| 24 |
+
|
| 25 |
+
Recent success of BERT (Devlin et al., 2019) and GPT2 (Radford et al., 2019) suggests the possibility of using large pre-trained language models to enhance Eric & Manning (2017)’s method. There are some studies of applying large pre-trained language model to dialog generation. TransferTransfo (Wolf et al., 2019) fine-tuned the pre-trained language model GPT (Radford et al., 2018) on Persona-Chat dataset (Zhang et al., 2018) and obtained significant improvements on chitchat dialog generation, suggesting the potential of fine-tuning large pre-trained language model on other dialog response generation tasks. A more recent work (Budzianowski & Vulic, 2019) adopted the framework of TransferTransfo and made the first attempt to leverage large pre-trained language models GPT and GPT-2 on task-oriented dialog generation, but it included belief states modeling as the input and did not achieve better results than the baseline. We propose to model dialogs without any annotation but rely on pre-trained large scale language models that alternate.
|
| 26 |
+
|
| 27 |
+
Previous work shows that modeling speaker roles in conversation is beneficial for language understanding (Chi et al., 2017; Chen et al., 2017; Su et al., 2018). Other researchers model persona information to generate language with different speaking styles (Li et al., 2016; Joshi et al., 2017). Zhao & Kawahara (2019) propose a relative speaker modeling method, where only the relative role instead of the absolute identity of the speaker is modeled. Our method is similar to Zhao & Kawahara (2019) in the spirit of modeling relative speaker relationship, but we focus on learning role-specific language models through utterances from different speakers, instead of explicitly taking role embeddings as input.
|
| 28 |
+
|
| 29 |
+

|
| 30 |
+
Figure 1: Alternating Roles Dialog Model (ARDM) Overview. (a) shows how we feed the entire dialog to ARDM. (b) shows the recurrence mechanism we used to preserve memory.
|
| 31 |
+
|
| 32 |
+
# 3 APPROACH
|
| 33 |
+
|
| 34 |
+
Our goal is to leverage large pre-trained language models to improve dialog response generation. Favoring Eric & Manning (2017)’s approach without using additional annotations such dialog states or dialog acts, we propose Alternating Roles Dialog Model (ARDM) by compositing two separate pre-trained language model in alternate order to learn the user and system utterance distribution. Figure 1 shows an overview of ARDM.
|
| 35 |
+
|
| 36 |
+
# 3.1 ALTERNATING ROLES DIALOG MODEL
|
| 37 |
+
|
| 38 |
+
We aim to model both user and system utterances distribution simultaneously. Given a multiturn dialog $( d )$ between a user $( u )$ and a system (s), we can represent $d$ as a series of utterances $\{ u _ { 1 } , s _ { 1 } , u _ { 2 } , s _ { 2 } , . . . , u _ { T } , s _ { T } \}$ , where $T$ denotes the total number of turns. We decompose the probability distributions over the utterances in $d$ into two language models for the user and system respectively, denoted as $p _ { u }$ and $p _ { s }$ . Then we define a dialog model $p ( d )$ with the equation:
|
| 39 |
+
|
| 40 |
+
$$
|
| 41 |
+
p ( d ) = \prod _ { t = 1 } ^ { T } p _ { u } \left( u _ { t } | u _ { < t } , s _ { < t } \right) p _ { s } \left( s _ { t } | u _ { \leq t } , s _ { < t } \right)
|
| 42 |
+
$$
|
| 43 |
+
|
| 44 |
+
$p _ { u }$ and $p _ { s }$ are standard language models where the task is to predict the next token given the preceding context. For an utterance $u _ { t }$ or $s _ { t }$ with $m$ tokens $\{ w _ { 1 } , \ldots , w _ { m } \}$ , the joint probability of an utterance is as follows:
|
| 45 |
+
|
| 46 |
+
$$
|
| 47 |
+
p _ { u } ( u _ { t } | u _ { < t } , s _ { < t } ) = \prod _ { i = 1 } ^ { m _ { u _ { t } } } P ( w _ { i } | w _ { < i } , u _ { < t } , s _ { < t } )
|
| 48 |
+
$$
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
p _ { s } ( s _ { t } | u _ { \leq t } , s _ { < t } ) = \prod _ { i = 1 } ^ { m _ { s _ { t } } } P ( w _ { i } | w _ { < i } , u _ { \leq t } , s _ { < t } )
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
Finally, we train the dialog model by maximizing the likelihood over Equation 1.
|
| 55 |
+
|
| 56 |
+
We apply a simple memory mechanism to grant the model the capability of memorizing conversation history. For an utterance at turn $t$ , we reuse the hidden states $h _ { \leq t - 1 }$ stored in the memory $M _ { t - 1 }$ to obtain $h _ { t }$ , and store the $h _ { t }$ back to the memory as $M _ { t }$ . As for the pre-trained Transformer language model, we implement the memory mechanism using self-attention given the query/key/value features denoted as $Q , K , V$ , where the equation is defined as:
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\mathrm { A t t e n t i o n } ( Q , K , V ) = \operatorname { s o f t m a x } ( Q K ^ { T } V )
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
For simplicity, we assume there is only one layer in Transformer, and $h _ { t }$ is the hidden states which consist of $N$ vectors for the current input $N$ tokens in the utterance at time $t$ . Then a recurrence relation for $h _ { t }$ is defined by computing $Q _ { t }$ , $K _ { \leq t }$ , $V _ { \leq t }$ from $h _ { \leq t - 1 }$ and the current utterance. In
|
| 63 |
+
|
| 64 |
+
practice, we reuse $K _ { \leq t - 1 }$ and $V _ { \leq t - 1 }$ (i.e. history keys and values) as $M _ { t - 1 }$ instead of $h _ { t - 1 }$ to avoid recomputing history information. Therefore, the final $h _ { t }$ is computed as:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\begin{array} { c } { { M _ { t - 1 } = [ K _ { \leq t - 1 } , V _ { \leq t - 1 } ] } } \\ { { K _ { \leq t } , V _ { \leq t } = [ K _ { \leq t - 1 } ; K _ { t } ] , [ V _ { \leq t - 1 } ; V _ { t } ] } } \\ { { h _ { t } = \mathrm { A t t e n t i o n } ( Q _ { t } , K _ { \leq t } , V _ { \leq t } ) } } \end{array}
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
One can use $h _ { t }$ (consisting of vectors for each token) to get each token’s probability to calculate the language model cross entropy loss to maximize $p ( w _ { i } | w < i , u _ { < t } , s _ { < t } )$ , shown in Figure 1.
|
| 71 |
+
|
| 72 |
+
However, one major drawback of this memory mechanism is that the memory consumption grows as the number of turns increases, until a point that the dialog cannot continue because of the memory limit. A straightforward way to solve this is to discard the distant history. But because most dialogs lengths in our datasets can fit in the GPU memory limit (i.e., approx. 1,000 tokens for 11GB GPU), we leave the memory issue for future work.
|
| 73 |
+
|
| 74 |
+
# 3.2 TRAINING DETAILS
|
| 75 |
+
|
| 76 |
+
We initialize the user and the system language model with a large pre-trained language model GPT-2 small with 117M parameters (Radford et al., 2019). It is a Transformer (Vaswani et al., 2017) model with 12 heads, 768 hidden size, and 12 layers. The model is trained on a large scale corpus called WebText extracted from Reddit with at least three upvotes. The tokenizer is 50,257 size byte pair encoding (BPE) (Sennrich et al., 2016) that can encode and decode any text in a lossless manner to avoid out-of-vocabulary tokens. We follow a special format in GPT-2 as the “trigger” so that the model can zero-shot dialog response generation, by prefixing the user role token “A:” or “B:”, and suffixing the end of utterance token $^ { \bullet \bullet } \backslash _ { \bf n \backslash n \backslash n ^ { \prime \prime } }$ . This “trigger” approach is similar in other zero-shot scenarios mentioned in GPT-2 paper (e.g., that a ”TL;DR” token can trigger GPT-2 to summarize the input text.) We further fine-tune ARDM on the specific task dataset. We apply AdamW optimizer (Loshchilov & Hutter, 2019), and the number of warm-up steps is set to be the number of batches in one epoch. The learning rate is set to $3 \times 1 0 ^ { - 5 }$ , and the dropout rate is set to 0.1 for all tasks.
|
| 77 |
+
|
| 78 |
+
# 3.3 DECODING DETAILS
|
| 79 |
+
|
| 80 |
+
We decode utterances by nucleus sampling (Holtzman et al., 2019) with different hyper-parameters (top-p, top- $\mathbf { \nabla } \cdot \mathbf { k }$ ) for down-stream dialog tasks. We also vary the temperature of $T < 1$ to find the best setting for the specific down-stream dialog task. To handle both situations in the evaluation and the real-world use case, we have two decoding modes. For evaluation mode, we feed all past ground truth history before turn $t$ to generate the corresponding utterance, so that we can evaluate the quality of generated dialog responses without concerning about the conversion flow. While in a real-world use case, we do not have ground truth history, and therefore we use the memory from previously generated responses and let the model dynamically interact with a human or another bot in turns. Because dialogs have different lengths, it is hard for ARDM to efficiently decode responses using traditional batch padding method. As a solution, we develop a dynamic dialog filtering algorithm to support fast decoding in batch. Such method speeds up the generation eight times faster. Please refer to Appendix B for the method’s details.
|
| 81 |
+
|
| 82 |
+
# 4 EXPERIMENTS AND RESULTS
|
| 83 |
+
|
| 84 |
+
Data scarcity is one of the biggest challenges in dialog research. It is costly to collect human-human conversations under a specific setting. It is even more time-consuming to annotate belief states and dialog acts. With the success of transfer learning in NLP, we aim to mitigate the low-resource problem with the large pre-trained language model. We validate our proposed ARDM on three task-oriented dialog datasets, CamRest676, MulitWOZ, and PersuasionForGood.
|
| 85 |
+
|
| 86 |
+
# 4.1 CAMREST676
|
| 87 |
+
|
| 88 |
+
CamRest676 is a relatively small dataset with 408/136/136 dialogs for train/validation/test. We follow Sequicity (Lei et al., 2018) to delexicalize tokens such as restaurant names, phone numbers, postcodes by replacing them with their slot names in utterances. We prepend database search results to the system utterance. An example database search results are “restaurant;3”, where the first slot indicates its dialog domain, which is always “restaurant” in CamRest767, and the second slot represents the number of matched items in the database. We use nucleus sampling for all methods in decoding for a fair comparison. Here, we set top- $\cdot \mathtt { p } 0 . 2$ and temperature 0.7 for our model. We use BLEU-4 and Success F1 to evaluate language generation quality and Success F1 to evaluate task success. Success F1 computes the F1 score of the generated responses on requested slots such as an address, phone number, or food type. Other than Sequicity, we also compare results by using GPT-2 alone as a language model for the entire dialog.
|
| 89 |
+
|
| 90 |
+
# 4.1.1 RESULTS
|
| 91 |
+
|
| 92 |
+
We first test our method on a restaurant search dataset, CamRest676 (Wen et al., 2017).
|
| 93 |
+
Table 1: Results on CamRest676 dataset.
|
| 94 |
+
|
| 95 |
+
<table><tr><td>Model</td><td>Entity Match rate</td><td>Ground Truth Belief State BLEU-4</td><td>Success.F1</td><td>Generated Belief State BLEU-4</td><td>Success. F1</td></tr><tr><td>Regular Expression</td><td>0.960</td><td>1</td><td>1</td><td>-</td><td>-</td></tr><tr><td>Sequicity</td><td>0.923</td><td>21.4</td><td>0.852</td><td>21.4</td><td>0.853</td></tr><tr><td>Sequicity (w/o RL)</td><td>0.940</td><td>22.9</td><td>0.821</td><td>23.4</td><td>0.834</td></tr><tr><td>GPT-2-finetune</td><td>-</td><td>21.8</td><td>0.851</td><td>19.2</td><td>0.862</td></tr><tr><td>ARDM</td><td></td><td>26.0</td><td>0.875</td><td>25.2</td><td>0.871</td></tr><tr><td>ARDM (50% data)</td><td>=</td><td>25.9</td><td>0.859</td><td>23.4</td><td>0.851</td></tr></table>
|
| 96 |
+
|
| 97 |
+
Table 1 shows all models’ results with ground truth belief state or generated belief state. We first use ground truth belief state in all methods to evaluate their response generation quality. ARDM achieves the best BLEU and Success F1 score. We observe that after fine-tuning GPT-2 on the CamRest676, it achieves similar results compared to the previous state-of-the-art method, Sequicity with reinforcement fine-tuning. This suggests pre-trained large-scale language model, such as GPT2, transfers the meaningful representations to help fine-tuning. However, without the alternating mechanism, GPT-2 alone does not perform as well as ARDM in terms of both BLEU-4 and Success F1, especially in BLEU-4 (improved $1 9 \%$ ). Without modeling the speaker role, the model blends two speakers language distribution and ignores the inherent speaker role difference. Moreover, to test if our model preserves its performance with even less training data, we reduce the training data to $50 \%$ , and the performance only drops slightly. With half of the training data, our method still performs significantly better than Sequicity. This result suggests ARDM is robust on low-resource settings due to the advantage of the large-scale pre-training language model.
|
| 98 |
+
|
| 99 |
+
We also evaluate all models with generated belief states instead of ground truth belief states. Sequicity generates belief tracker results, and its Entity Match rate is 0.927. Our model does not have a state tracker, so we write a separate simple regular expression to extract the occurrence of entities that appear in the database to support our model. Such state tracker achieves 0.960 in Entity Match rate. It suggests that state tracking may be accomplished in more straightforward ways other than training a neural network model on a large set of annotated data. With a simple state tracker, our proposed method still performs better than Sequicity, which trains the belief state and the response generation task jointly.
|
| 100 |
+
|
| 101 |
+
# 4.2 MULTIWOZ
|
| 102 |
+
|
| 103 |
+
Here, we only use the ground truth database search result to be consistent with other methods. We perform delexicalization which is mentioned in the original MultiWOZ (Budzianowski et al., 2018). We prepend the database search results to the system response for as conditional input. Also, the database results now contain information about whether the booking is successful or not (i.e., succeed or fail). Note that we do not use belief state or dialog act annotation provided by the dataset to train ARDM. We set the top-p to 0.2 and the temperature to 0.7. The results are evaluated on BLEU4, Inform Rate, and Success Rate. Inform and Success Rate measure whether the system response provides the recommendations and requested information given in the goal. We compare our model to the attention-based seq2seq model which is proposed as the MultiWOZ Baseline (Budzianowski et al., 2018), the HDSA (Chen et al., 2019) model that incorporates dialog act supervision as an inductive prior for model architecture, and the LaRL (Zhao et al., 2019) model which leverages latent action modeling and reinforcement learning to improve performance. We do not compare with GPT2-finetune with our model in MultiWOZ because GPT-2-finetune’s performance on CamRest676 is significantly worse than our model. We normalize the time’s slot value in all dialogs into the 24- hour format and perform tokenization via spaCy1. We found that different papers report results with different versions of the evaluator, which makes it difficult to compare different methods fairly. We explain the differences among all versions of the evaluator in Appendix A. In this paper, we follow LaRL’s evaluator implementation, as it is more reasonable than others. We re-evaluate results for all methods with the same evaluator to ensure fairness.
|
| 104 |
+
|
| 105 |
+
# 4.2.1 RESULTS
|
| 106 |
+
|
| 107 |
+
Table 2: Results on MultiWOZ. Supervision denotes whether a model leverages dialog state or/and dialog act annotations. All models use the ground truth dialog state for database search. ARDM without supervision from annotation can still achieve comparable results.
|
| 108 |
+
|
| 109 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">Supervision</td><td rowspan="2">Inform (%)</td><td rowspan="2">Success (%)</td><td rowspan="2">BLEU-4</td></tr><tr><td>Dialog State</td><td>Dialog Act</td></tr><tr><td>Human</td><td>1</td><td>-</td><td>98.9</td><td>96.5</td><td>-</td></tr><tr><td rowspan="3">Baseline HDSA LaRL</td><td>√</td><td>×</td><td>82.5</td><td>72.9</td><td>18.9</td></tr><tr><td>√</td><td>√</td><td>87.7</td><td>73.4</td><td>23.6</td></tr><tr><td>√</td><td>×</td><td>82.8</td><td>79.2</td><td>12.8</td></tr><tr><td>ARDM</td><td>×</td><td>×</td><td>87.4</td><td>72.8</td><td>20.6</td></tr></table>
|
| 110 |
+
|
| 111 |
+
The evaluation results are shown in Table 2. Without any supervision from dialog states or dialog acts, ARDM significantly outperforms the MultiWOZ Baseline and LaRL on BLEU-4 and Inform rate, and is on par with HDSA. However, HDSA uses dialog act supervision and a large pretrained language model, BERT. Our model requires no annotation and can achieve similar results. This suggests our speaker role modeling and large-scale pre-training methods work similarly as the useful dialog act annotations. All the results show that our method’s excellent performance remains consistent in multi-domain dialogs.
|
| 112 |
+
|
| 113 |
+
We analyze the generated responses and find that if multiple domains have appeared in the conversation history, our model tends to make mistakes in answering the right domain for user requests. This finding suggests that the Maximum Likelihood Estimation (MLE) has limitations in directly optimizing the metric, while reinforcement Learning (RL) can hugely improve the task completion in a dialog system. This is why LaRL has a higher Success rate. However, we also observe that LaRL has a low BLEU-4 score, which indicates low readability in responses. Therefore, there is a trade-off between the generation quality and the task success rate in the RL setting.
|
| 114 |
+
|
| 115 |
+
# 4.3 PERSUASIONFORGOOD
|
| 116 |
+
|
| 117 |
+
To showcase ARDM’s performance on a dialog dataset where it is much more difficult to obtain belief states and dialog act annotations, we train and evaluate our model on PersuasionForGood (Wang et al., 2019) dataset. In this dataset, the persuader must persuade an assigned persuadee (i.e., a person who is asked to donate) to donate money (from their task payment) to a charity called “Save the Children”. This dataset has a much larger vocabulary size (8,141) than the previous taskoriented dialog datasets due to its non-collaborative dialog property. The conversation content is richer because two speakers are negotiating back and forth. The dataset consists of 1,017 dialogs where only 300 dialogs are annotated with dialog acts. Therefore, models that require dialog state or dialog act annotation are not applicable in this dataset. ARDM does not require dialog acts for training. As ARDM has already learned good language priors through pre-training, which makes it applicable on PersuasionForGood. Due to the similarity to chit-chat, we use TransferTransfo (Wolf et al., 2019) model as a strong baseline model. TransferTransfo is also based on large pre-trained language model, but it uses token type embedding to encode role information of the speaker. We concatenate all history text together as input to generate the next utterance.
|
| 118 |
+
|
| 119 |
+
To generate diverse responses, we decode the response using the nucleus sampling (Holtzman et al., 2019) with a top-p of 0.9 and a temperature of 0.7. It is impossible to conduct an automatic evaluation on task success on this task due to the lack of annotation. We use perplexity, BLEU-1, and BLEU-2 to evaluate each model’s language generation quality. We also conduct a human evaluation to validate each model’s task success rate. We show some generated examples in the Appendix to provide more information on both models’ generation quality.
|
| 120 |
+
|
| 121 |
+
# 4.3.1 RESULTS
|
| 122 |
+
|
| 123 |
+
Table 3: Automatic Evaluation and Human Evaluation Results
|
| 124 |
+
|
| 125 |
+
<table><tr><td></td><td>Perplexity↓</td><td>BLEU-1个</td><td>BLEU-2↑|</td><td></td><td>Human Preference ↑丨Average Donation Amount ↑</td></tr><tr><td>TransferTransfo</td><td>19.9</td><td>17.0</td><td>8.57</td><td>34.7%</td><td>0.538</td></tr><tr><td>ARDM</td><td>10.1</td><td>16.5</td><td>6.44</td><td>65.3%</td><td>0.807</td></tr></table>
|
| 126 |
+
|
| 127 |
+
Table 4: A conversation between a machine persuader trained by ARDM and a human persuadee.
|
| 128 |
+
|
| 129 |
+
<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=1>Utterance</td></tr><tr><td rowspan=1 colspan=1>SYS</td><td rowspan=1 colspan=1> Hi, how are you doing today?</td></tr><tr><td rowspan=1 colspan=1>USR</td><td rowspan=1 colspan=1>Iam good!</td></tr><tr><td rowspan=1 colspan=1>SYS</td><td rowspan=1 colspan=1> Have you ever heard of the charity Save the Children?</td></tr><tr><td rowspan=1 colspan=1>USR</td><td rowspan=1 colspan=1>No, I have not heard about it. Would you like to talk about it?</td></tr><tr><td rowspan=1 colspan=1> SYS</td><td rowspan=1 colspan=1> Save the Children is an international non-governmental organization that promotes children's rights, provides relief and helps support children in developing countries.</td></tr><tr><td rowspan=1 colspan=1>USR</td><td rowspan=2 colspan=1>That's cool. It is an organization for the good of this worldYes, it is. In the first two months of 2018 alone,1,00O children were reportedly kiled or injured in intensifying violence in Syria.</td></tr><tr><td rowspan=1 colspan=1>SYS</td></tr><tr><td rowspan=1 colspan=1>USR</td><td rowspan=1 colspan=1>That's sad.</td></tr><tr><td rowspan=1 colspan=1> sYS</td><td rowspan=1 colspan=1>We do need to do something about that. One of the things that we can do is make sure that we have a system in place that willensure that every penny we spend goes directly to the children in need.</td></tr><tr><td rowspan=1 colspan=1>USR</td><td rowspan=2 colspan=1>I agree. How much do you like to donate to the charity now? Your donation will be directly deducted from your task payment. You can choose any amount from $O to all your payment ($2).</td></tr><tr><td rowspan=1 colspan=1> sYS</td></tr><tr><td rowspan=1 colspan=1>USR</td><td rowspan=3 colspan=1> I am willing to donate full my payment $2. Wow, that is awesome! That is so kind of you!You are welcome.</td></tr><tr><td rowspan=1 colspan=1>SYS</td></tr><tr><td rowspan=1 colspan=1>USR</td></tr></table>
|
| 130 |
+
|
| 131 |
+
Table 3 shows the results for PersuasionForGood. Because ARDM applies better speaker modeling and recurrence mechanism, our model achieves lower perplexity compared to TransferTransfo. In terms of BLEU scores, TransferTransfo is better than ARDM. However, BLEU-1 cannot reflect the actual generation quality because a random sentence with common tokens the, of, is, are already has $1 0 . 0 +$ BLEU-1 score. Also because the validation set only contains 100 samples, the result can have a high variance. To comprehensively evaluate each model’s performance, we recruit 14 human evaluators to chat with the two persuasive systems ten times to avoid the randomness produced by each model. In total, we collected 140 ratings. We ask them to select a preferred chat-bot and indicate how much they are willing to donate after talking to the chat-bot. As a result, human judges prefer ARDM over TransferTransfo and tends to donate more when talking to ARDM produced chat-bot. Our model achieved $27 \%$ more donations compared to TransferTransfo. This indicates that our systems are more persuasive. In some examples, such as the one in Table 4, our model generates coherent, natural, and persuasive responses.
|
| 132 |
+
|
| 133 |
+
# 5 ERROR ANALYSIS
|
| 134 |
+
|
| 135 |
+
Since CamRest676 is similar to MultiWOZ in terms of task content and dialog structure, we only describe the errors in MultiWOZ for simplicity. We randomly selected 30 generated error responses from our model with zero inform and success score. To our surprise, we observed that nearly $6 3 . 3 \%$ of errors are not really mistakes. It is mainly due to the limitation of the automatic evaluator. For example, at turn one, the user asks about a restaurant, and the ground truth system response is “the [restaurant name] is located at . . . ”, but the generated system response is “what food preference do you have?”. Our generated response is correct with respect to the dialog context. It is narrowing down the restaurant choices before providing a restaurant recommendation. However, the evaluator sticks to the only possible response it has. Unless the user can dynamically interact with the system, there is no good way to change such mistakes in the automatic evaluator. We find that another $20 \%$ errors our model makes are when the system asks information the user already provided. This type of errors calls for a better history representation. Another $10 \%$ errors are due to ignoring the user’s request for information, such as phone number. However, when we look at the ground truth responses, some crowd workers also made such errors. So resolving these errors requires a cleaner training dataset. Finally, the rest of $6 . 7 \%$ errors are about incorrect dialog domain understanding. For example, the user is asking for a hotel, but we present a restaurant recommendation. This is because of the data noise during the delexicalization process in which some domain labels are wrong.
|
| 136 |
+
|
| 137 |
+
The donation persuasion system trained with TransferTransfo and our model has some common problems, such as inconsistency, lack of logic, and hallucination. For example, if the persuader provides the information about “Save the Children”, then the persuadee asks “Can you tell me more about it?”. The system ends up providing the same information as before. It also sometimes makes up facts that have never happened, such as “Save the Children has an operation about a hurricane in Hawaii”. All those errors would prevent users from trusting the bot, and therefore resulting in less donation. However, we also observe that users have a higher tolerance for errors in the persuasion setting than the customer service setting. Overall, our model performs better on PersuasionForGood by having longer and diversified utterances. This suggests our model which utilizes alternating parameters for different speaker roles is more effective than TransferTransfo which only injects role information into the input embedding.
|
| 138 |
+
|
| 139 |
+
# 6 DISCUSSIONS AND ETHICAL CONSIDERATION
|
| 140 |
+
|
| 141 |
+
ARDM models speakers separately on top of a large pre-trained language model. Such simple adaptation demonstrates substantial performance gain. We suspect it is because the interleaved structure of two language models provides a collaborative learning frame of both the user and the system language distribution modeling. The memory is the only way for the user and system to communicate, as they do not share any weights in their networks. Thus, the user encoder needs to learn useful representations to make the system model for understanding its intent. Similarly, the system needs to do the same for the user model to improve its understanding. This alternative repeating process forces both the user and system models to preserve the dialog history effectively in the memory. One can interpret the memory as the implicit representation of belief states or dialog acts.
|
| 142 |
+
|
| 143 |
+
Another benefit of ARDM is that we will obtain both user and system utterance generators. We can let the two models talk to each other to generate new self-play dialogs (Silver et al., 2017). We show some self-play dialog examples in the Appendix E. With self-play, one can rapidly build a large scale dialog dataset using adversarial filtering (Zellers et al., 2018). Such models can be used in reinforcement learning as user simulator to study complex dialog strategies as well.
|
| 144 |
+
|
| 145 |
+
Persuasion is a double-edged sword. Given the fast development of dialog systems, an ethical design principle must be in place throughout all stages of the development and evaluation. We choose the donation task is because it is a relatively simple task that benefits children. Second, when deploying the persuasive agents in real conversations, we need to keep the users informed of the nature of the system. By revealing the identity of the persuasive agent, the user should also have options to communicate directly with the human team behind the system. Lastly, by investigating persuasive dialog systems, we also envision to use them as an educational tool for the general public to learn to defend themselves against machine persuasion.
|
| 146 |
+
|
| 147 |
+
# 7 CONCLUSIONS
|
| 148 |
+
|
| 149 |
+
We propose to build Alternating Roles Dialog Model (ARDM), a simple, general, and effective dialog method that models user and system separately with large-scale pre-trained language models. Since ARDM does not require any annotations, it generalizes to different dialog applications. Experimental results on CamRest676 and MultiWOZ suggest that ARDM outperforms or on-par with the current state-of-the-art methods that use manual annotation information, such as belief states and dialog acts. Furthermore, we find our model’s excellent performance generalizes to more complex non-collaborative dialog settings. It can generate high-quality responses to persuade people to donate to charity. However, the easiness of training ARDM raises concerns about the misuse of the model in scenarios such as sales, harassment, or scam on a mass scale. We caution the public in deploying such systems in the real world.
|
| 150 |
+
|
| 151 |
+
# REFERENCES
|
| 152 |
+
|
| 153 |
+
Pawel Budzianowski and Ivan Vulic. Hello, it’s GPT-2 - how can I help you? towards the use of pretrained language models for task-oriented dialogue systems. CoRR, abs/1907.05774, 2019. URL http://arxiv.org/abs/1907.05774.
|
| 154 |
+
|
| 155 |
+
Pawel Budzianowski, Tsung-Hsien Wen, Bo-Hsiang Tseng, Inigo Casanueva, Stefan Ultes, Osman ˜ Ramadan, and Milica Gasic. Multiwoz - A large-scale multi-domain wizard-of-oz dataset for task-oriented dialogue modelling. In Riloff et al. (2018), pp. 5016–5026. ISBN 978-1-948087- 84-1. URL https://www.aclweb.org/anthology/D18-1547/.
|
| 156 |
+
|
| 157 |
+
Po-Chun Chen, Ta-Chung Chi, Shang-Yu Su, and Yun-Nung Chen. Dynamic time-aware attention to speaker roles and contexts for spoken language understanding. In 2017 IEEE Automatic Speech Recognition and Understanding Workshop (ASRU), pp. 554–560. IEEE, 2017.
|
| 158 |
+
|
| 159 |
+
Wenhu Chen, Jianshu Chen, Pengda Qin, Xifeng Yan, and William Yang Wang. Semantically conditioned dialog response generation via hierarchical disentangled self-attention. In Anna Korhonen, David R. Traum, and Llu´ıs Marquez (eds.), \` Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28- August 2, 2019, Volume 1: Long Papers, pp. 3696–3709. Association for Computational Linguistics, 2019. ISBN 978-1- 950737-48-2. URL https://www.aclweb.org/anthology/P19-1360/.
|
| 160 |
+
|
| 161 |
+
Ta-Chung Chi, Po-Chun Chen, Shang-Yu Su, and Yun-Nung Chen. Speaker role contextual modeling for language understanding and dialogue policy learning. arXiv preprint arXiv:1710.00164, 2017.
|
| 162 |
+
|
| 163 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 4171–4186, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. URL https://www.aclweb.org/ anthology/N19-1423.
|
| 164 |
+
|
| 165 |
+
Mihail Eric and Christopher D. Manning. A copy-augmented sequence-to-sequence architecture gives good performance on task-oriented dialogue. CoRR, abs/1701.04024, 2017. URL http: //arxiv.org/abs/1701.04024.
|
| 166 |
+
|
| 167 |
+
Mihail Eric, Lakshmi Krishnan, Francois Charette, and Christopher D. Manning. Key-value retrieval networks for task-oriented dialogue. In Kristiina Jokinen, Manfred Stede, David DeVault, and Annie Louis (eds.), Proceedings of the 18th Annual SIGdial Meeting on Discourse and Dialogue, Saarbrucken, Germany, August 15-17, 2017 ¨ , pp. 37–49. Association for Computational Linguistics, 2017. ISBN 978-1-945626-82-1. URL https://www.aclweb.org/anthology/ $\mathtt { W 1 7 - 5 5 0 6 } /$ .
|
| 168 |
+
|
| 169 |
+
Matthew Henderson, Blaise Thomson, and Jason D. Williams. The second dialog state tracking challenge. In Proceedings of the SIGDIAL 2014 Conference, The 15th Annual Meeting of the Special Interest Group on Discourse and Dialogue, 18-20 June 2014, Philadelphia, PA, USA, pp. 263–272. The Association for Computer Linguistics, 2014. ISBN 978-1-941643-21-1. URL https://www.aclweb.org/anthology/W14-4337/.
|
| 170 |
+
|
| 171 |
+
Ari Holtzman, Jan Buys, Maxwell Forbes, and Yejin Choi. The curious case of neural text degeneration. CoRR, abs/1904.09751, 2019. URL http://arxiv.org/abs/1904.09751.
|
| 172 |
+
|
| 173 |
+
Chaitanya K Joshi, Fei Mi, and Boi Faltings. Personalization in goal-oriented dialog. arXiv preprint arXiv:1706.07503, 2017.
|
| 174 |
+
|
| 175 |
+
Wenqiang Lei, Xisen Jin, Min-Yen Kan, Zhaochun Ren, Xiangnan He, and Dawei Yin. Sequicity: Simplifying task-oriented dialogue systems with single sequence-to-sequence architectures. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1437–1447, Melbourne, Australia, July 2018. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/P18-1133.
|
| 176 |
+
|
| 177 |
+
Jiwei Li, Michel Galley, Chris Brockett, Georgios P Spithourakis, Jianfeng Gao, and Bill Dolan. A persona-based neural conversation model. arXiv preprint arXiv:1603.06155, 2016.
|
| 178 |
+
|
| 179 |
+
Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net, 2019. URL https://openreview.net/forum?id ${ . } = { }$ Bkg6RiCqY7.
|
| 180 |
+
|
| 181 |
+
Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. Improving language understanding by generative pre-training. OpenAI, 2018.
|
| 182 |
+
|
| 183 |
+
Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. 2019.
|
| 184 |
+
|
| 185 |
+
Ellen Riloff, David Chiang, Julia Hockenmaier, and Jun’ichi Tsujii (eds.). Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, October 31 - November 4, 2018, 2018. Association for Computational Linguistics. ISBN 978-1-948087- 84-1. URL https://www.aclweb.org/anthology/volumes/D18-1/.
|
| 186 |
+
|
| 187 |
+
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, ACL 2016, August 7-12, 2016, Berlin, Germany, Volume 1: Long Papers. The Association for Computer Linguistics, 2016. ISBN 978-1-945626-00-5. URL https: //www.aclweb.org/anthology/P16-1162/.
|
| 188 |
+
|
| 189 |
+
David Silver, Thomas Hubert, Julian Schrittwieser, Ioannis Antonoglou, Matthew Lai, Arthur Guez, Marc Lanctot, Laurent Sifre, Dharshan Kumaran, Thore Graepel, Timothy P. Lillicrap, Karen Simonyan, and Demis Hassabis. Mastering chess and shogi by self-play with a general reinforcement learning algorithm. CoRR, abs/1712.01815, 2017. URL http://arxiv.org/abs/ 1712.01815.
|
| 190 |
+
|
| 191 |
+
Shang-Yu Su, Pei-Chieh Yuan, and Yun-Nung Chen. How time matters: Learning time-decay attention for contextual spoken language understanding in dialogues. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pp. 2133–2142, 2018.
|
| 192 |
+
|
| 193 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. CoRR, abs/1706.03762, 2017. URL http://arxiv.org/abs/1706.03762.
|
| 194 |
+
|
| 195 |
+
Xuewei Wang, Weiyan Shi, Richard Kim, Yoojung Oh, Sijia Yang, Jingwen Zhang, and Zhou Yu. Persuasion for good: Towards a personalized persuasive dialogue system for social good. CoRR, abs/1906.06725, 2019. URL http://arxiv.org/abs/1906.06725.
|
| 196 |
+
|
| 197 |
+
Tsung-Hsien Wen, Yishu Miao, Phil Blunsom, and Steve J. Young. Latent intention dialogue models. In Doina Precup and Yee Whye Teh (eds.), Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017, volume 70 of Proceedings of Machine Learning Research, pp. 3732–3741. PMLR, 2017. URL http://proceedings.mlr.press/v70/wen17a.html.
|
| 198 |
+
|
| 199 |
+
Thomas Wolf, Victor Sanh, Julien Chaumond, and Clement Delangue. Transfertransfo: A transfer learning approach for neural network based conversational agents. CoRR, abs/1901.08149, 2019. URL http://arxiv.org/abs/1901.08149.
|
| 200 |
+
|
| 201 |
+
Rowan Zellers, Yonatan Bisk, Roy Schwartz, and Yejin Choi. SWAG: A large-scale adversarial dataset for grounded commonsense inference. In Riloff et al. (2018), pp. 93–104. ISBN 978-1- 948087-84-1. URL https://www.aclweb.org/anthology/D18-1009/.
|
| 202 |
+
|
| 203 |
+
Saizheng Zhang, Emily Dinan, Jack Urbanek, Arthur Szlam, Douwe Kiela, and Jason Weston. Personalizing dialogue agents: I have a dog, do you have pets too? In Iryna Gurevych and Yusuke Miyao (eds.), Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, ACL 2018, Melbourne, Australia, July 15-20, 2018, Volume 1: Long Papers, pp. 2204–2213. Association for Computational Linguistics, 2018. ISBN 978-1-948087-32-2. doi: 10.18653/v1/P18-1205. URL https://www.aclweb.org/anthology/P18-1205/.
|
| 204 |
+
|
| 205 |
+
Tiancheng Zhao, Kaige Xie, and Maxine Eskenazi. Rethinking action spaces for reinforcement ´ learning in end-to-end dialog agents with latent variable models. In Jill Burstein, Christy Doran, and Thamar Solorio (eds.), Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pp. 1208–1218. Association for Computational Linguistics, 2019. ISBN 978-1-950737-13-0. URL https: //www.aclweb.org/anthology/N19-1123/.
|
| 206 |
+
|
| 207 |
+
Tianyu Zhao and Tatsuya Kawahara. Effective incorporation of speaker information in utterance encoding in dialog. arXiv preprint arXiv:1907.05599, 2019.
|
| 208 |
+
|
| 209 |
+
# A MULTIWOZ EVALUATOR INCONSISTENCY
|
| 210 |
+
|
| 211 |
+
We rerun baseline models to compare our methods and find discrepancy among different papers’ reported results. In order to understand the reason, we compared between LaRL’s evaluator 2 and MultiWOZ Baseline’s evaluator 3. We found that they make different assumptions to handle the “train” domain (line 637-639 at LaRL evaluator.py). After carefully analyzing the code and discussing with authors of these two papers, we believe that LaRL’s evaluator is more reasonable. However, in LaRL, the authors reported MultiWOZ Baseline’s scores with a different evaluator. Therefore, we re-evaluated all methods, including LaRl, HDSA, and MultiWOZ Baseline using the same evaluator for fairness.
|
| 212 |
+
|
| 213 |
+
Table 5: Re-evaluation Results on MultiWOZ.
|
| 214 |
+
|
| 215 |
+
<table><tr><td></td><td colspan="2">Baseline Evaluator</td><td colspan="2">LaRL Evaluator</td></tr><tr><td></td><td>Inform</td><td>Success</td><td>Inform</td><td>Success</td></tr><tr><td>Human</td><td>75.7%</td><td>67.9%</td><td>90.0%</td><td>82.3%</td></tr><tr><td>Human (the cleaned version)</td><td>82.4%</td><td>78.9%</td><td>98.9%</td><td>96.5%</td></tr><tr><td>MultiWOZ Baseline</td><td>71.3%</td><td>61.0%</td><td>82.5%</td><td>72.9%</td></tr></table>
|
| 216 |
+
|
| 217 |
+
# B DYNAMIC DIALOG FILTERING ALGORITHM
|
| 218 |
+
|
| 219 |
+
Since ARDM takes the entire dialog as input, so different input has different number of turns and different length in each turn. Also, there are two sub-language models in ARDM. If we pad the utterance in each turn and concatenate results of all turns, it is inefficient. Instead, we introduce a filtering algorithm to dynamically release memory once a dialog is finished. This enables us to speed up our model four times in training and eight times in inference. Please refer to our code for details.
|
| 220 |
+
|
| 221 |
+
# Algorithm 1 Dialog Filtering algorithm
|
| 222 |
+
|
| 223 |
+
<table><tr><td>Batch Size = n</td></tr><tr><td>Initialize Memory M for n workers.</td></tr><tr><td>for Batch=1,2,3,...do</td></tr><tr><td></td></tr><tr><td>T= maximum number of turns in Batch for Turn=1,2,3,...,TinBatch do</td></tr><tr><td>Filter M and Batch for the finished worker</td></tr><tr><td>Feed remaining Batch to the model</td></tr><tr><td>Compute loss and gradients</td></tr><tr><td>0old←0</td></tr><tr><td>end for</td></tr><tr><td>end for</td></tr></table>
|
| 224 |
+
|
| 225 |
+
# C TRANSFERTRANSFO EXAMPLES
|
| 226 |
+
|
| 227 |
+
Table 6: A conversation between a machine persuader (ER) trained by TransferTransfo and a human persuadee (EE)
|
| 228 |
+
|
| 229 |
+
<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=1>Utterance</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>hello!</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>Hello</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> have you heard of the charity save the children?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> no, I haven't heard it</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> it's an international non - governmental organization that promotes children's rights, provides relief and helps support children in developing countries.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>ok</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> so would you like to donate some of your payment to this charity?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> can you tell me more information about it?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> save the children is an international non - governmental organization that promotes children's rights, provides relief and helps support children in developing countries.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> which developing countries ?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> the united states and latin america. have you heard of this charity?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>no,Ihaven't</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> it's an organization that helps ensure children's rights to health, education and safety.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>sounds cool</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=2 colspan=1> have you ever donated to this organization?no</td></tr><tr><td rowspan=1 colspan=1>EE</td></tr></table>
|
| 230 |
+
|
| 231 |
+
Table 7: A conversation between a machine persuader (ER) trained by TransferTransfo and a human persuadee (EE)
|
| 232 |
+
|
| 233 |
+
<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=1>Utterance</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>hello!</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>hi</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> how are you today?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I am good</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> have you ever heard of save the children?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>no, Ihaven't</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> it is an organization that helps children around the world. it's a great organization that does good work and is highly rated with many positive rewards.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>good</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> have you ever heard of it?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> no, Ihaven't heard of it</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> it's a great organization that does good work and is a huge part of the world's popula- tion.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>okay</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> so, are you interested in donating?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>yes,Iam</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> how much would you like to donate to the charity?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>$1</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> wow, that is really great. that is really great to hear. so, are you going to donate anything at this time??</td></tr></table>
|
| 234 |
+
|
| 235 |
+
# D PERSUASIONFORGOOD HUMAN-MACHINE EXAMPLES
|
| 236 |
+
|
| 237 |
+
We show some more examples of dialogs generated using our proposed ARDM.
|
| 238 |
+
|
| 239 |
+
Table 8: A conversation between a machine persuader (ER) trained by ARDM and a human persuadee (EE)
|
| 240 |
+
|
| 241 |
+
<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=1>Utterance</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>Hello! How are you doing today?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I am doing well!</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Awesome. Have you heard about the Save the Children charity?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>Yes I have heard about it.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Save the Children is an international non-governmental organization that promotes children's rights, provides relief and helps support children in developing countries.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> So which developing countries do they help?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Save the Children is working on supporting children in the US and all over the world.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> that's cool. I want to help children as well.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> That's awesome! I know there are a lot of kids in the world that are in dire situations.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> Right. What I should I do to help them?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Save the Children is a great organization, so you should donate some of your payment to them.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=2 colspan=1>how much is my task payment?I am not sure exactly how much you will donate, but you can donate any amount from $0 to all of your payment ($2).</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I would like to donate $1.00.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> That's awesome. Your donation will make a huge impact for those kids.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>Thank you.</td></tr></table>
|
| 242 |
+
|
| 243 |
+
Table 9: A conversation between a machine persuader (ER) trained by ARDM and a human persuadee (EE)
|
| 244 |
+
|
| 245 |
+
<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=1>Utterance</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>Hi, how are you doing today?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I am good!</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Have you ever heard of the charity Save the Children?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> No, I have not heard about it. Would you like to talk about it?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Save the Children is an international non-governmental organization that promotes children's rights, provides relief and helps support children in developing countries.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=2 colspan=1>That's cool. It is a organization for the good of this world.Yes, it is. In the first two months of 2018 alone, 1,000 children were reportedly killed or injured in intensifying violence in Syria.</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=2 colspan=1>That's sad. We do need to do something about that. One of the things that we can do is make sure that we have a system in place that will ensure that every penny we spend goesdirectly to the children in need.</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=4 colspan=1>Iagree. How much do you like to donate to the charity now? Your donation will be directly deducted from your task payment. You can choose any amount from $O to all your payment ($2). I am willing to donate full my payment $2. Wow, that is awesome! That is so kind of you!</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>You are welcome.</td></tr></table>
|
| 246 |
+
|
| 247 |
+
Table 10: A conversation between a machine persuader (ER) trained by ARDM and a human persuadee (EE)
|
| 248 |
+
|
| 249 |
+
<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=1>Utterance</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>Hello</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>Hi</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>How are you doing today?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I am good. thank you</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>I was wondering if you would be interested in donating a portion of your payment from this HIT to a children's charity called Save the Children?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>Of course, I would like to. Can I know their website address ?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>Yes, URL</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> Oh, cool. They are a good organization.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=4 colspan=1> How much would you like to donate?I would like to donate $1.00 That is great! The research team will collect all donations and send it to Save theChildren. You are welcome.</td></tr><tr><td rowspan=1 colspan=1>EE</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td></tr></table>
|
| 250 |
+
|
| 251 |
+
# E PERSUASIONFORGOOD SELF-PLAY EXAMPLES
|
| 252 |
+
|
| 253 |
+
We also present several self-play examples generated using our proposed ARDM.
|
| 254 |
+
|
| 255 |
+
Table 11: A conversation between a machine persuader (ER) and a machine persuadee (EE) trained by ARDM in self-play setting
|
| 256 |
+
|
| 257 |
+
<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=3>Utterance</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=3>Hello! How are you doing today?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=3> Good, thank you. How are you?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=3> I am good, thank you. Have you heard of the charity Save the Children?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=3>Yes,I have heard about it. Iwould like to donate a dollar to it.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=3> That is wonderful, it is so important to provide education and support to the children. I am sure you will agree that this is a great cause. Do you donate to charities?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=2 colspan=3>Yes, I do donate to several charities. Are you sure you want to donate a dollar to Save the Children? Children all over the world are suffering due to poverty, war, and other issues. Would you consider donating a little bit of your incoming task payment?</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=3 colspan=3> I may donate a dollar. I don't have a lot of money right now but I would like to help. That is great to hear. I know your donation is a small amount but the impact this will have on the world can be significant. Your donation would be directly deducted from your task payment.That is true. I will donate one dollar to the charity.</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=2></td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=2> Thank you so much for your donation, it will help many children.</td><td rowspan=2 colspan=1> Thank you so much for your donation, it will help many children. Thank you. I hope you will continue to donate to the charity.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td></td><td></td></tr></table>
|
| 258 |
+
|
| 259 |
+
Table 12: A conversation between a machine persuader (ER) and a machine persuadee (EE) trained by ARDM in self-play setting
|
| 260 |
+
|
| 261 |
+
<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=1>Utterance</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>Hi there!</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> Hi, I'm Carolyn. How are you today?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>I am good, thank you. I am also here to talk about a charity called Save the Children.Do you have any idea about that?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> I think it's something that I should know about, but I don't have the funds.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> I understand that, I know that for sure.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> I am glad to hear that. How does it help children in the USA?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> It is really great. I am here to talk to you about something that is really important to me. I am here to tell you about something that I am really passionate about.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> I think it's a very important issue. I don't want to donate to charities that I know arenot helping children.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>Yes, it is.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>Do you donate regularly to others ?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>I have not yet, I am not sure.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I feel a little guilty for not donating when I think about the children I have lost.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>Yeah, I totally understand.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I would like to donate to a charity that I feel would be able to help all the children inthe world.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Awesome! That is great. How much would you like to donate to Save the Children?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I would like to donate $1.00</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=2 colspan=1>Great! That is awesome. I am happy to hear that. I have heard about Save the Children, and it is something thatI really, truly need.</td></tr><tr><td rowspan=1 colspan=1>EE</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=2 colspan=1> That is so great of you.Thank you for the opportunity.</td></tr><tr><td rowspan=1 colspan=1>EE</td></tr></table>
|
| 262 |
+
|
| 263 |
+
Table 13: A conversation between a machine persuader (ER) and a machine persuadee (EE) trained by ARDM in self-play setting
|
| 264 |
+
|
| 265 |
+
<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=1>Utterance</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>hello how are you?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I'm doing well, how are you?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> I'm doing well, thanks for asking. I was wondering if you would be willing to donate a portion of your task payment to save the children.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> I'm interested, how much will you donate?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> I would like to donate the entire amount, but I'm not sure how much I'd be able todonate. Do you have any other questions ?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> I think I know the amount I would donate.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> I completely understand, I am hoping you would be willing to donate even a small amount. Save the children is an amazing charity that helps children in need around the world.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>How much do you think I can donate?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> I would like to donate a minimum of $2. I was wondering if you would be willing to donate any more, would you be willing to donate even a little bit of your task payment?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=2 colspan=1>I think I can donate $1. That's very kind of you. I would be happy to do that, but I can't think of any other charities I would be able to donate to. I am glad to hear that.</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> I think you are very generous, and I am sure this will help in the future.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=2 colspan=1> It is wonderful to hear. Thank you for your donation. You are very welcome, and thank you for the opportunity to help.</td></tr><tr><td rowspan=1 colspan=1>EE</td></tr></table>
|
| 266 |
+
|
| 267 |
+
Table 14: A conversation between a machine persuader (ER) and a machine persuadee (EE) trained by ARDM in self-play setting
|
| 268 |
+
|
| 269 |
+
<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=1>Utterance</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>Hi, how are you today?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I'm doing well! How are you?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> I am doing well as well, I hope you have a nice day.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I am as well.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Do you have children?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> Yes, I do. I have three boys and one girl.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Have you ever donated to a charity?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>No. I don't.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Have you heard of Save the Children?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I have not.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>The charity is an international non-governmental organization that promotes chil- dren's rights, provides relief and helps support children in developing countries.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> I think they are a good organization.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> I am sure they would be happy to help.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> I think they would.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Do you donate to charities ?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=2 colspan=1>I do. How much do you like to donate to the charity now? Your donation will be directly deducted from your task payment. You can choose any amount from $O to all your payment ($2).</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> I would like to donate $0.50.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=2 colspan=1> That is very generous of you. I hope they are able to help a lot of children.</td></tr><tr><td rowspan=1 colspan=1>EE</td></tr></table>
|
parse/train/H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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "ALTERNATING ROLES DIALOG MODEL WITH LARGESCALE PRE-TRAINED LANGUAGE MODELS ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
176,
|
| 8 |
+
98,
|
| 9 |
+
821,
|
| 10 |
+
146
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "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": "Existing dialog system models require extensive human annotations and are difficult to generalize to different tasks. The recent success of large pre-trained language models such as BERT and GPT-2 (Devlin et al., 2019; Radford et al., 2019) have suggested the effectiveness of incorporating language priors in down-stream NLP tasks. However, how much pre-trained language models can help dialog response generation is still under exploration. In this paper, we propose a simple, general, and effective framework: Alternating Roles Dialog Model (ARDM). ARDM models each speaker separately and takes advantage of the large pretrained language model. It requires no supervision from human annotations such as belief states or dialog acts to achieve effective conversations. ARDM outperforms or is on par with state-of-the-art methods on two popular task-oriented dialog datasets: CamRest676 and MultiWOZ. Moreover, we can generalize ARDM to more challenging, non-collaborative tasks such as persuasion. In persuasion tasks, ARDM is capable of generating human-like responses to persuade people to donate to a charity. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
233,
|
| 42 |
+
267,
|
| 43 |
+
764,
|
| 44 |
+
474
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 INTRODUCTION ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
176,
|
| 54 |
+
502,
|
| 55 |
+
336,
|
| 56 |
+
518
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "It has been a long-standing ambition for artificial intelligence researchers to create an intelligent conversational agent that can generate human-like responses. Recently data-driven dialog models are more and more popular. However, most current state-of-the-art approaches still rely heavily on extensive annotations such as belief states and dialog acts (Lei et al., 2018). However, dialog content can vary considerably in different dialog tasks. Having a different intent or dialog act annotation scheme for each task is costly. For some tasks, it is even impossible, such as open-domain social chat. Thus, it is difficult to utilize these methods on challenging dialog tasks, such as persuasion and negotiation, where dialog states and acts are difficult to annotate. ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
535,
|
| 66 |
+
825,
|
| 67 |
+
645
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "Eric & Manning (2017) proposed a simple sequence-to-sequence architecture that requires no explicit annotations. The model learns to extract information from dialog history with attention and copy mechanism. However, due to the limited language modeling capabilities in the previous model, Sequicity (Lei et al., 2018), which reuses belief states as inputs for supervision, outperforms Eric & Manning (2017)’s method significantly in recent dialog datasets. But with the success of large pretrained language models such as BERT (Devlin et al., 2019) and GPT-2 (Radford et al., 2019), we re-examine Eric & Manning (2017)’s method and investigate how large-scale pre-trained language models can help dialog tasks. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
652,
|
| 77 |
+
825,
|
| 78 |
+
763
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "Previous large-scale pre-trained language models are used to tackle documents with only one narrator. However, in dialogs, two speakers have different roles; therefore, their language model distributions are very different from each other. For example, customer service agents speak very differently to their customers. To address this issue, we propose ARDM, a dialog model that encodes and decodes different speaker utterances in alternating order with two pre-trained large-scale language models. To investigate whether ARDM can help dialog response generation, we evaluate its performance on three different task-oriented dialog datasets: CamRes676, MultiWOZ, and PersuasionForGood . The first two datasets are traditional information request dialog datasets with well-defined automatic evaluation metrics on task completion. By contrast, PersuasionForGood is a new dataset that focuses on persuading people to donate to a charity. There is no explicit dialog state defined in this task as such non-collaborative dialogs have various dialog actions. ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
771,
|
| 88 |
+
825,
|
| 89 |
+
924
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "We observe that ARDM is capable of improving task-oriented dialog tasks performance over the previous state-of-the-art methods without incorporating any explicit supervision from belief states or dialog acts. Also, due to ARDM’s simplicity and generality, one can rapidly build a dialog prototype on different types of applications using only conversations without any manual annotations. We also found that ARDM works well on complex dialogs, such as persuasion. The model generates dialog responses that successfully persuade people to donate to a charity, suggesting the potential of ARDM being used in wide-scale real-world settings. ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
103,
|
| 99 |
+
825,
|
| 100 |
+
202
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 1
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "2 RELATED WORK ",
|
| 107 |
+
"text_level": 1,
|
| 108 |
+
"bbox": [
|
| 109 |
+
176,
|
| 110 |
+
253,
|
| 111 |
+
343,
|
| 112 |
+
270
|
| 113 |
+
],
|
| 114 |
+
"page_idx": 1
|
| 115 |
+
},
|
| 116 |
+
{
|
| 117 |
+
"type": "text",
|
| 118 |
+
"text": "Traditional dialog systems consist of a dialog manager to maintain dialog states and control the conversation flow. However, a dialog manager requires extensive manual annotations for training the sub-modules such as dialog state tracker or policy decision-maker. An alternative is to model dialog without explicitly modeling belief states. Specifically, Eric & Manning (2017) proposed a recurrent neural dialogue architecture using a sequence-to-sequence model that utilizes copy-mechanism to copy history information directly from raw dialog history. This method achieved the state-of-theart results on DSTC2 (Henderson et al., 2014), which is a simple dialog restaurant booking task with abundant data. However, such method did not perform well on more complex dialog task data sets CamRes676 (Wen et al., 2017) and KVRET (Eric et al., 2017). Sequicity (Lei et al., 2018) attributed the bad performance of Eric & Manning (2017)’s method to the omission of belief tracker. They introduced the concept of belief span and added belief tracker back to the model and achieved state-of-the-art performance. ",
|
| 119 |
+
"bbox": [
|
| 120 |
+
174,
|
| 121 |
+
305,
|
| 122 |
+
825,
|
| 123 |
+
472
|
| 124 |
+
],
|
| 125 |
+
"page_idx": 1
|
| 126 |
+
},
|
| 127 |
+
{
|
| 128 |
+
"type": "text",
|
| 129 |
+
"text": "Compared to Sequicity, Eric & Manning (2017)’s method provides a more general framework that reduces manual dialog state, user intent, and dialog act labeling by bypassing any symbolic annotations. Such a model can apply to datasets with no or partial annotations of belief states. In a real-world setting, if the dialog task introduces new slot values in belief states (i.e. a new type of food), Sequicity will suffer from the belief span decoder error in response generation. Thus, Eric & Manning (2017)’s method may be potentially more robust than Sequicity in this situation. Besides, if the task requires belief states for database search, we can treat belief tracking as a separate task. We can train a good belief tracking with only a small amount of annotated data, which reduces the annotation required and it is easier to fix errors. Also, since belief states are a set of important entities condensed from dialog history (i.e., often exact words from utterances), they do not introduce extra information to the model. Therefore, a dialog model with powerful representation learning should learn a form of belief states information automatically without human annotations as the scaffold. ",
|
| 130 |
+
"bbox": [
|
| 131 |
+
174,
|
| 132 |
+
479,
|
| 133 |
+
825,
|
| 134 |
+
645
|
| 135 |
+
],
|
| 136 |
+
"page_idx": 1
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"type": "text",
|
| 140 |
+
"text": "Recent success of BERT (Devlin et al., 2019) and GPT2 (Radford et al., 2019) suggests the possibility of using large pre-trained language models to enhance Eric & Manning (2017)’s method. There are some studies of applying large pre-trained language model to dialog generation. TransferTransfo (Wolf et al., 2019) fine-tuned the pre-trained language model GPT (Radford et al., 2018) on Persona-Chat dataset (Zhang et al., 2018) and obtained significant improvements on chitchat dialog generation, suggesting the potential of fine-tuning large pre-trained language model on other dialog response generation tasks. A more recent work (Budzianowski & Vulic, 2019) adopted the framework of TransferTransfo and made the first attempt to leverage large pre-trained language models GPT and GPT-2 on task-oriented dialog generation, but it included belief states modeling as the input and did not achieve better results than the baseline. We propose to model dialogs without any annotation but rely on pre-trained large scale language models that alternate. ",
|
| 141 |
+
"bbox": [
|
| 142 |
+
174,
|
| 143 |
+
652,
|
| 144 |
+
825,
|
| 145 |
+
805
|
| 146 |
+
],
|
| 147 |
+
"page_idx": 1
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"type": "text",
|
| 151 |
+
"text": "Previous work shows that modeling speaker roles in conversation is beneficial for language understanding (Chi et al., 2017; Chen et al., 2017; Su et al., 2018). Other researchers model persona information to generate language with different speaking styles (Li et al., 2016; Joshi et al., 2017). Zhao & Kawahara (2019) propose a relative speaker modeling method, where only the relative role instead of the absolute identity of the speaker is modeled. Our method is similar to Zhao & Kawahara (2019) in the spirit of modeling relative speaker relationship, but we focus on learning role-specific language models through utterances from different speakers, instead of explicitly taking role embeddings as input. ",
|
| 152 |
+
"bbox": [
|
| 153 |
+
174,
|
| 154 |
+
811,
|
| 155 |
+
825,
|
| 156 |
+
924
|
| 157 |
+
],
|
| 158 |
+
"page_idx": 1
|
| 159 |
+
},
|
| 160 |
+
{
|
| 161 |
+
"type": "image",
|
| 162 |
+
"img_path": "images/a478c9a4847be157290184439dc5925ebc4f00944305e159179529808e71cdd3.jpg",
|
| 163 |
+
"image_caption": [
|
| 164 |
+
"Figure 1: Alternating Roles Dialog Model (ARDM) Overview. (a) shows how we feed the entire dialog to ARDM. (b) shows the recurrence mechanism we used to preserve memory. "
|
| 165 |
+
],
|
| 166 |
+
"image_footnote": [],
|
| 167 |
+
"bbox": [
|
| 168 |
+
173,
|
| 169 |
+
99,
|
| 170 |
+
812,
|
| 171 |
+
242
|
| 172 |
+
],
|
| 173 |
+
"page_idx": 2
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"type": "text",
|
| 177 |
+
"text": "3 APPROACH",
|
| 178 |
+
"text_level": 1,
|
| 179 |
+
"bbox": [
|
| 180 |
+
174,
|
| 181 |
+
308,
|
| 182 |
+
299,
|
| 183 |
+
324
|
| 184 |
+
],
|
| 185 |
+
"page_idx": 2
|
| 186 |
+
},
|
| 187 |
+
{
|
| 188 |
+
"type": "text",
|
| 189 |
+
"text": "Our goal is to leverage large pre-trained language models to improve dialog response generation. Favoring Eric & Manning (2017)’s approach without using additional annotations such dialog states or dialog acts, we propose Alternating Roles Dialog Model (ARDM) by compositing two separate pre-trained language model in alternate order to learn the user and system utterance distribution. Figure 1 shows an overview of ARDM. ",
|
| 190 |
+
"bbox": [
|
| 191 |
+
173,
|
| 192 |
+
340,
|
| 193 |
+
825,
|
| 194 |
+
410
|
| 195 |
+
],
|
| 196 |
+
"page_idx": 2
|
| 197 |
+
},
|
| 198 |
+
{
|
| 199 |
+
"type": "text",
|
| 200 |
+
"text": "3.1 ALTERNATING ROLES DIALOG MODEL ",
|
| 201 |
+
"text_level": 1,
|
| 202 |
+
"bbox": [
|
| 203 |
+
176,
|
| 204 |
+
429,
|
| 205 |
+
483,
|
| 206 |
+
443
|
| 207 |
+
],
|
| 208 |
+
"page_idx": 2
|
| 209 |
+
},
|
| 210 |
+
{
|
| 211 |
+
"type": "text",
|
| 212 |
+
"text": "We aim to model both user and system utterances distribution simultaneously. Given a multiturn dialog $( d )$ between a user $( u )$ and a system (s), we can represent $d$ as a series of utterances $\\{ u _ { 1 } , s _ { 1 } , u _ { 2 } , s _ { 2 } , . . . , u _ { T } , s _ { T } \\}$ , where $T$ denotes the total number of turns. We decompose the probability distributions over the utterances in $d$ into two language models for the user and system respectively, denoted as $p _ { u }$ and $p _ { s }$ . Then we define a dialog model $p ( d )$ with the equation: ",
|
| 213 |
+
"bbox": [
|
| 214 |
+
173,
|
| 215 |
+
455,
|
| 216 |
+
825,
|
| 217 |
+
526
|
| 218 |
+
],
|
| 219 |
+
"page_idx": 2
|
| 220 |
+
},
|
| 221 |
+
{
|
| 222 |
+
"type": "equation",
|
| 223 |
+
"img_path": "images/00f25a79221606a6870834d5d5731fa64db6fc5e0d2a5cb20b6dfa26fa433ed4.jpg",
|
| 224 |
+
"text": "$$\np ( d ) = \\prod _ { t = 1 } ^ { T } p _ { u } \\left( u _ { t } | u _ { < t } , s _ { < t } \\right) p _ { s } \\left( s _ { t } | u _ { \\leq t } , s _ { < t } \\right)\n$$",
|
| 225 |
+
"text_format": "latex",
|
| 226 |
+
"bbox": [
|
| 227 |
+
354,
|
| 228 |
+
544,
|
| 229 |
+
643,
|
| 230 |
+
587
|
| 231 |
+
],
|
| 232 |
+
"page_idx": 2
|
| 233 |
+
},
|
| 234 |
+
{
|
| 235 |
+
"type": "text",
|
| 236 |
+
"text": "$p _ { u }$ and $p _ { s }$ are standard language models where the task is to predict the next token given the preceding context. For an utterance $u _ { t }$ or $s _ { t }$ with $m$ tokens $\\{ w _ { 1 } , \\ldots , w _ { m } \\}$ , the joint probability of an utterance is as follows: ",
|
| 237 |
+
"bbox": [
|
| 238 |
+
173,
|
| 239 |
+
598,
|
| 240 |
+
825,
|
| 241 |
+
640
|
| 242 |
+
],
|
| 243 |
+
"page_idx": 2
|
| 244 |
+
},
|
| 245 |
+
{
|
| 246 |
+
"type": "equation",
|
| 247 |
+
"img_path": "images/0bb6095c07c4e962fe97752faa1714b3167f9b72daeac8d49fd3ed5c36f21014.jpg",
|
| 248 |
+
"text": "$$\np _ { u } ( u _ { t } | u _ { < t } , s _ { < t } ) = \\prod _ { i = 1 } ^ { m _ { u _ { t } } } P ( w _ { i } | w _ { < i } , u _ { < t } , s _ { < t } )\n$$",
|
| 249 |
+
"text_format": "latex",
|
| 250 |
+
"bbox": [
|
| 251 |
+
351,
|
| 252 |
+
660,
|
| 253 |
+
647,
|
| 254 |
+
703
|
| 255 |
+
],
|
| 256 |
+
"page_idx": 2
|
| 257 |
+
},
|
| 258 |
+
{
|
| 259 |
+
"type": "equation",
|
| 260 |
+
"img_path": "images/055d16fd64edf634a9d018151241cc8918bc9009daa2dbc27a3fe609b1bf63f6.jpg",
|
| 261 |
+
"text": "$$\np _ { s } ( s _ { t } | u _ { \\leq t } , s _ { < t } ) = \\prod _ { i = 1 } ^ { m _ { s _ { t } } } P ( w _ { i } | w _ { < i } , u _ { \\leq t } , s _ { < t } )\n$$",
|
| 262 |
+
"text_format": "latex",
|
| 263 |
+
"bbox": [
|
| 264 |
+
352,
|
| 265 |
+
708,
|
| 266 |
+
645,
|
| 267 |
+
752
|
| 268 |
+
],
|
| 269 |
+
"page_idx": 2
|
| 270 |
+
},
|
| 271 |
+
{
|
| 272 |
+
"type": "text",
|
| 273 |
+
"text": "Finally, we train the dialog model by maximizing the likelihood over Equation 1. ",
|
| 274 |
+
"bbox": [
|
| 275 |
+
173,
|
| 276 |
+
755,
|
| 277 |
+
704,
|
| 278 |
+
770
|
| 279 |
+
],
|
| 280 |
+
"page_idx": 2
|
| 281 |
+
},
|
| 282 |
+
{
|
| 283 |
+
"type": "text",
|
| 284 |
+
"text": "We apply a simple memory mechanism to grant the model the capability of memorizing conversation history. For an utterance at turn $t$ , we reuse the hidden states $h _ { \\leq t - 1 }$ stored in the memory $M _ { t - 1 }$ to obtain $h _ { t }$ , and store the $h _ { t }$ back to the memory as $M _ { t }$ . As for the pre-trained Transformer language model, we implement the memory mechanism using self-attention given the query/key/value features denoted as $Q , K , V$ , where the equation is defined as: ",
|
| 285 |
+
"bbox": [
|
| 286 |
+
173,
|
| 287 |
+
776,
|
| 288 |
+
825,
|
| 289 |
+
847
|
| 290 |
+
],
|
| 291 |
+
"page_idx": 2
|
| 292 |
+
},
|
| 293 |
+
{
|
| 294 |
+
"type": "equation",
|
| 295 |
+
"img_path": "images/a09ca7a9271bf5bc004c8692d8ae97482c13f201f11244aa02cde64e37ae7e1e.jpg",
|
| 296 |
+
"text": "$$\n\\mathrm { A t t e n t i o n } ( Q , K , V ) = \\operatorname { s o f t m a x } ( Q K ^ { T } V )\n$$",
|
| 297 |
+
"text_format": "latex",
|
| 298 |
+
"bbox": [
|
| 299 |
+
362,
|
| 300 |
+
854,
|
| 301 |
+
633,
|
| 302 |
+
873
|
| 303 |
+
],
|
| 304 |
+
"page_idx": 2
|
| 305 |
+
},
|
| 306 |
+
{
|
| 307 |
+
"type": "text",
|
| 308 |
+
"text": "For simplicity, we assume there is only one layer in Transformer, and $h _ { t }$ is the hidden states which consist of $N$ vectors for the current input $N$ tokens in the utterance at time $t$ . Then a recurrence relation for $h _ { t }$ is defined by computing $Q _ { t }$ , $K _ { \\leq t }$ , $V _ { \\leq t }$ from $h _ { \\leq t - 1 }$ and the current utterance. In ",
|
| 309 |
+
"bbox": [
|
| 310 |
+
174,
|
| 311 |
+
881,
|
| 312 |
+
825,
|
| 313 |
+
925
|
| 314 |
+
],
|
| 315 |
+
"page_idx": 2
|
| 316 |
+
},
|
| 317 |
+
{
|
| 318 |
+
"type": "text",
|
| 319 |
+
"text": "practice, we reuse $K _ { \\leq t - 1 }$ and $V _ { \\leq t - 1 }$ (i.e. history keys and values) as $M _ { t - 1 }$ instead of $h _ { t - 1 }$ to avoid recomputing history information. Therefore, the final $h _ { t }$ is computed as: ",
|
| 320 |
+
"bbox": [
|
| 321 |
+
171,
|
| 322 |
+
103,
|
| 323 |
+
823,
|
| 324 |
+
132
|
| 325 |
+
],
|
| 326 |
+
"page_idx": 3
|
| 327 |
+
},
|
| 328 |
+
{
|
| 329 |
+
"type": "equation",
|
| 330 |
+
"img_path": "images/d6989d0e53fe60c87afc03809962c3adecbd0afca7676c8cd4e32f41c51423b6.jpg",
|
| 331 |
+
"text": "$$\n\\begin{array} { c } { { M _ { t - 1 } = [ K _ { \\leq t - 1 } , V _ { \\leq t - 1 } ] } } \\\\ { { K _ { \\leq t } , V _ { \\leq t } = [ K _ { \\leq t - 1 } ; K _ { t } ] , [ V _ { \\leq t - 1 } ; V _ { t } ] } } \\\\ { { h _ { t } = \\mathrm { A t t e n t i o n } ( Q _ { t } , K _ { \\leq t } , V _ { \\leq t } ) } } \\end{array}\n$$",
|
| 332 |
+
"text_format": "latex",
|
| 333 |
+
"bbox": [
|
| 334 |
+
372,
|
| 335 |
+
136,
|
| 336 |
+
625,
|
| 337 |
+
191
|
| 338 |
+
],
|
| 339 |
+
"page_idx": 3
|
| 340 |
+
},
|
| 341 |
+
{
|
| 342 |
+
"type": "text",
|
| 343 |
+
"text": "One can use $h _ { t }$ (consisting of vectors for each token) to get each token’s probability to calculate the language model cross entropy loss to maximize $p ( w _ { i } | w < i , u _ { < t } , s _ { < t } )$ , shown in Figure 1. ",
|
| 344 |
+
"bbox": [
|
| 345 |
+
174,
|
| 346 |
+
194,
|
| 347 |
+
826,
|
| 348 |
+
223
|
| 349 |
+
],
|
| 350 |
+
"page_idx": 3
|
| 351 |
+
},
|
| 352 |
+
{
|
| 353 |
+
"type": "text",
|
| 354 |
+
"text": "However, one major drawback of this memory mechanism is that the memory consumption grows as the number of turns increases, until a point that the dialog cannot continue because of the memory limit. A straightforward way to solve this is to discard the distant history. But because most dialogs lengths in our datasets can fit in the GPU memory limit (i.e., approx. 1,000 tokens for 11GB GPU), we leave the memory issue for future work. ",
|
| 355 |
+
"bbox": [
|
| 356 |
+
174,
|
| 357 |
+
229,
|
| 358 |
+
825,
|
| 359 |
+
299
|
| 360 |
+
],
|
| 361 |
+
"page_idx": 3
|
| 362 |
+
},
|
| 363 |
+
{
|
| 364 |
+
"type": "text",
|
| 365 |
+
"text": "3.2 TRAINING DETAILS ",
|
| 366 |
+
"text_level": 1,
|
| 367 |
+
"bbox": [
|
| 368 |
+
176,
|
| 369 |
+
315,
|
| 370 |
+
351,
|
| 371 |
+
329
|
| 372 |
+
],
|
| 373 |
+
"page_idx": 3
|
| 374 |
+
},
|
| 375 |
+
{
|
| 376 |
+
"type": "text",
|
| 377 |
+
"text": "We initialize the user and the system language model with a large pre-trained language model GPT-2 small with 117M parameters (Radford et al., 2019). It is a Transformer (Vaswani et al., 2017) model with 12 heads, 768 hidden size, and 12 layers. The model is trained on a large scale corpus called WebText extracted from Reddit with at least three upvotes. The tokenizer is 50,257 size byte pair encoding (BPE) (Sennrich et al., 2016) that can encode and decode any text in a lossless manner to avoid out-of-vocabulary tokens. We follow a special format in GPT-2 as the “trigger” so that the model can zero-shot dialog response generation, by prefixing the user role token “A:” or “B:”, and suffixing the end of utterance token $^ { \\bullet \\bullet } \\backslash _ { \\bf n \\backslash n \\backslash n ^ { \\prime \\prime } }$ . This “trigger” approach is similar in other zero-shot scenarios mentioned in GPT-2 paper (e.g., that a ”TL;DR” token can trigger GPT-2 to summarize the input text.) We further fine-tune ARDM on the specific task dataset. We apply AdamW optimizer (Loshchilov & Hutter, 2019), and the number of warm-up steps is set to be the number of batches in one epoch. The learning rate is set to $3 \\times 1 0 ^ { - 5 }$ , and the dropout rate is set to 0.1 for all tasks. ",
|
| 378 |
+
"bbox": [
|
| 379 |
+
174,
|
| 380 |
+
342,
|
| 381 |
+
825,
|
| 382 |
+
508
|
| 383 |
+
],
|
| 384 |
+
"page_idx": 3
|
| 385 |
+
},
|
| 386 |
+
{
|
| 387 |
+
"type": "text",
|
| 388 |
+
"text": "3.3 DECODING DETAILS ",
|
| 389 |
+
"text_level": 1,
|
| 390 |
+
"bbox": [
|
| 391 |
+
176,
|
| 392 |
+
525,
|
| 393 |
+
356,
|
| 394 |
+
539
|
| 395 |
+
],
|
| 396 |
+
"page_idx": 3
|
| 397 |
+
},
|
| 398 |
+
{
|
| 399 |
+
"type": "text",
|
| 400 |
+
"text": "We decode utterances by nucleus sampling (Holtzman et al., 2019) with different hyper-parameters (top-p, top- $\\mathbf { \\nabla } \\cdot \\mathbf { k }$ ) for down-stream dialog tasks. We also vary the temperature of $T < 1$ to find the best setting for the specific down-stream dialog task. To handle both situations in the evaluation and the real-world use case, we have two decoding modes. For evaluation mode, we feed all past ground truth history before turn $t$ to generate the corresponding utterance, so that we can evaluate the quality of generated dialog responses without concerning about the conversion flow. While in a real-world use case, we do not have ground truth history, and therefore we use the memory from previously generated responses and let the model dynamically interact with a human or another bot in turns. Because dialogs have different lengths, it is hard for ARDM to efficiently decode responses using traditional batch padding method. As a solution, we develop a dynamic dialog filtering algorithm to support fast decoding in batch. Such method speeds up the generation eight times faster. Please refer to Appendix B for the method’s details. ",
|
| 401 |
+
"bbox": [
|
| 402 |
+
173,
|
| 403 |
+
551,
|
| 404 |
+
825,
|
| 405 |
+
717
|
| 406 |
+
],
|
| 407 |
+
"page_idx": 3
|
| 408 |
+
},
|
| 409 |
+
{
|
| 410 |
+
"type": "text",
|
| 411 |
+
"text": "4 EXPERIMENTS AND RESULTS ",
|
| 412 |
+
"text_level": 1,
|
| 413 |
+
"bbox": [
|
| 414 |
+
176,
|
| 415 |
+
738,
|
| 416 |
+
447,
|
| 417 |
+
753
|
| 418 |
+
],
|
| 419 |
+
"page_idx": 3
|
| 420 |
+
},
|
| 421 |
+
{
|
| 422 |
+
"type": "text",
|
| 423 |
+
"text": "Data scarcity is one of the biggest challenges in dialog research. It is costly to collect human-human conversations under a specific setting. It is even more time-consuming to annotate belief states and dialog acts. With the success of transfer learning in NLP, we aim to mitigate the low-resource problem with the large pre-trained language model. We validate our proposed ARDM on three task-oriented dialog datasets, CamRest676, MulitWOZ, and PersuasionForGood. ",
|
| 424 |
+
"bbox": [
|
| 425 |
+
174,
|
| 426 |
+
768,
|
| 427 |
+
823,
|
| 428 |
+
838
|
| 429 |
+
],
|
| 430 |
+
"page_idx": 3
|
| 431 |
+
},
|
| 432 |
+
{
|
| 433 |
+
"type": "text",
|
| 434 |
+
"text": "4.1 CAMREST676 ",
|
| 435 |
+
"text_level": 1,
|
| 436 |
+
"bbox": [
|
| 437 |
+
174,
|
| 438 |
+
856,
|
| 439 |
+
313,
|
| 440 |
+
869
|
| 441 |
+
],
|
| 442 |
+
"page_idx": 3
|
| 443 |
+
},
|
| 444 |
+
{
|
| 445 |
+
"type": "text",
|
| 446 |
+
"text": "CamRest676 is a relatively small dataset with 408/136/136 dialogs for train/validation/test. We follow Sequicity (Lei et al., 2018) to delexicalize tokens such as restaurant names, phone numbers, postcodes by replacing them with their slot names in utterances. We prepend database search results to the system utterance. An example database search results are “restaurant;3”, where the first slot indicates its dialog domain, which is always “restaurant” in CamRest767, and the second slot represents the number of matched items in the database. We use nucleus sampling for all methods in decoding for a fair comparison. Here, we set top- $\\cdot \\mathtt { p } 0 . 2$ and temperature 0.7 for our model. We use BLEU-4 and Success F1 to evaluate language generation quality and Success F1 to evaluate task success. Success F1 computes the F1 score of the generated responses on requested slots such as an address, phone number, or food type. Other than Sequicity, we also compare results by using GPT-2 alone as a language model for the entire dialog. ",
|
| 447 |
+
"bbox": [
|
| 448 |
+
176,
|
| 449 |
+
882,
|
| 450 |
+
823,
|
| 451 |
+
924
|
| 452 |
+
],
|
| 453 |
+
"page_idx": 3
|
| 454 |
+
},
|
| 455 |
+
{
|
| 456 |
+
"type": "text",
|
| 457 |
+
"text": "",
|
| 458 |
+
"bbox": [
|
| 459 |
+
173,
|
| 460 |
+
103,
|
| 461 |
+
825,
|
| 462 |
+
215
|
| 463 |
+
],
|
| 464 |
+
"page_idx": 4
|
| 465 |
+
},
|
| 466 |
+
{
|
| 467 |
+
"type": "text",
|
| 468 |
+
"text": "4.1.1 RESULTS ",
|
| 469 |
+
"text_level": 1,
|
| 470 |
+
"bbox": [
|
| 471 |
+
174,
|
| 472 |
+
229,
|
| 473 |
+
292,
|
| 474 |
+
244
|
| 475 |
+
],
|
| 476 |
+
"page_idx": 4
|
| 477 |
+
},
|
| 478 |
+
{
|
| 479 |
+
"type": "table",
|
| 480 |
+
"img_path": "images/c58d9992b063a82e10c10357cf12e304befd6f5fe40d39e35cee9f23401df958.jpg",
|
| 481 |
+
"table_caption": [
|
| 482 |
+
"We first test our method on a restaurant search dataset, CamRest676 (Wen et al., 2017). ",
|
| 483 |
+
"Table 1: Results on CamRest676 dataset. "
|
| 484 |
+
],
|
| 485 |
+
"table_footnote": [],
|
| 486 |
+
"table_body": "<table><tr><td>Model</td><td>Entity Match rate</td><td>Ground Truth Belief State BLEU-4</td><td>Success.F1</td><td>Generated Belief State BLEU-4</td><td>Success. F1</td></tr><tr><td>Regular Expression</td><td>0.960</td><td>1</td><td>1</td><td>-</td><td>-</td></tr><tr><td>Sequicity</td><td>0.923</td><td>21.4</td><td>0.852</td><td>21.4</td><td>0.853</td></tr><tr><td>Sequicity (w/o RL)</td><td>0.940</td><td>22.9</td><td>0.821</td><td>23.4</td><td>0.834</td></tr><tr><td>GPT-2-finetune</td><td>-</td><td>21.8</td><td>0.851</td><td>19.2</td><td>0.862</td></tr><tr><td>ARDM</td><td></td><td>26.0</td><td>0.875</td><td>25.2</td><td>0.871</td></tr><tr><td>ARDM (50% data)</td><td>=</td><td>25.9</td><td>0.859</td><td>23.4</td><td>0.851</td></tr></table>",
|
| 487 |
+
"bbox": [
|
| 488 |
+
207,
|
| 489 |
+
280,
|
| 490 |
+
789,
|
| 491 |
+
409
|
| 492 |
+
],
|
| 493 |
+
"page_idx": 4
|
| 494 |
+
},
|
| 495 |
+
{
|
| 496 |
+
"type": "text",
|
| 497 |
+
"text": "Table 1 shows all models’ results with ground truth belief state or generated belief state. We first use ground truth belief state in all methods to evaluate their response generation quality. ARDM achieves the best BLEU and Success F1 score. We observe that after fine-tuning GPT-2 on the CamRest676, it achieves similar results compared to the previous state-of-the-art method, Sequicity with reinforcement fine-tuning. This suggests pre-trained large-scale language model, such as GPT2, transfers the meaningful representations to help fine-tuning. However, without the alternating mechanism, GPT-2 alone does not perform as well as ARDM in terms of both BLEU-4 and Success F1, especially in BLEU-4 (improved $1 9 \\%$ ). Without modeling the speaker role, the model blends two speakers language distribution and ignores the inherent speaker role difference. Moreover, to test if our model preserves its performance with even less training data, we reduce the training data to $50 \\%$ , and the performance only drops slightly. With half of the training data, our method still performs significantly better than Sequicity. This result suggests ARDM is robust on low-resource settings due to the advantage of the large-scale pre-training language model. ",
|
| 498 |
+
"bbox": [
|
| 499 |
+
173,
|
| 500 |
+
457,
|
| 501 |
+
825,
|
| 502 |
+
638
|
| 503 |
+
],
|
| 504 |
+
"page_idx": 4
|
| 505 |
+
},
|
| 506 |
+
{
|
| 507 |
+
"type": "text",
|
| 508 |
+
"text": "We also evaluate all models with generated belief states instead of ground truth belief states. Sequicity generates belief tracker results, and its Entity Match rate is 0.927. Our model does not have a state tracker, so we write a separate simple regular expression to extract the occurrence of entities that appear in the database to support our model. Such state tracker achieves 0.960 in Entity Match rate. It suggests that state tracking may be accomplished in more straightforward ways other than training a neural network model on a large set of annotated data. With a simple state tracker, our proposed method still performs better than Sequicity, which trains the belief state and the response generation task jointly. ",
|
| 509 |
+
"bbox": [
|
| 510 |
+
174,
|
| 511 |
+
645,
|
| 512 |
+
825,
|
| 513 |
+
756
|
| 514 |
+
],
|
| 515 |
+
"page_idx": 4
|
| 516 |
+
},
|
| 517 |
+
{
|
| 518 |
+
"type": "text",
|
| 519 |
+
"text": "4.2 MULTIWOZ ",
|
| 520 |
+
"text_level": 1,
|
| 521 |
+
"bbox": [
|
| 522 |
+
174,
|
| 523 |
+
772,
|
| 524 |
+
302,
|
| 525 |
+
786
|
| 526 |
+
],
|
| 527 |
+
"page_idx": 4
|
| 528 |
+
},
|
| 529 |
+
{
|
| 530 |
+
"type": "text",
|
| 531 |
+
"text": "Here, we only use the ground truth database search result to be consistent with other methods. We perform delexicalization which is mentioned in the original MultiWOZ (Budzianowski et al., 2018). We prepend the database search results to the system response for as conditional input. Also, the database results now contain information about whether the booking is successful or not (i.e., succeed or fail). Note that we do not use belief state or dialog act annotation provided by the dataset to train ARDM. We set the top-p to 0.2 and the temperature to 0.7. The results are evaluated on BLEU4, Inform Rate, and Success Rate. Inform and Success Rate measure whether the system response provides the recommendations and requested information given in the goal. We compare our model to the attention-based seq2seq model which is proposed as the MultiWOZ Baseline (Budzianowski et al., 2018), the HDSA (Chen et al., 2019) model that incorporates dialog act supervision as an inductive prior for model architecture, and the LaRL (Zhao et al., 2019) model which leverages latent action modeling and reinforcement learning to improve performance. We do not compare with GPT2-finetune with our model in MultiWOZ because GPT-2-finetune’s performance on CamRest676 is significantly worse than our model. We normalize the time’s slot value in all dialogs into the 24- hour format and perform tokenization via spaCy1. We found that different papers report results with different versions of the evaluator, which makes it difficult to compare different methods fairly. We explain the differences among all versions of the evaluator in Appendix A. In this paper, we follow LaRL’s evaluator implementation, as it is more reasonable than others. We re-evaluate results for all methods with the same evaluator to ensure fairness. ",
|
| 532 |
+
"bbox": [
|
| 533 |
+
173,
|
| 534 |
+
797,
|
| 535 |
+
825,
|
| 536 |
+
924
|
| 537 |
+
],
|
| 538 |
+
"page_idx": 4
|
| 539 |
+
},
|
| 540 |
+
{
|
| 541 |
+
"type": "text",
|
| 542 |
+
"text": "",
|
| 543 |
+
"bbox": [
|
| 544 |
+
173,
|
| 545 |
+
103,
|
| 546 |
+
825,
|
| 547 |
+
242
|
| 548 |
+
],
|
| 549 |
+
"page_idx": 5
|
| 550 |
+
},
|
| 551 |
+
{
|
| 552 |
+
"type": "text",
|
| 553 |
+
"text": "4.2.1 RESULTS ",
|
| 554 |
+
"text_level": 1,
|
| 555 |
+
"bbox": [
|
| 556 |
+
174,
|
| 557 |
+
258,
|
| 558 |
+
292,
|
| 559 |
+
273
|
| 560 |
+
],
|
| 561 |
+
"page_idx": 5
|
| 562 |
+
},
|
| 563 |
+
{
|
| 564 |
+
"type": "table",
|
| 565 |
+
"img_path": "images/3c176afa97e3ea1a13c81b0cf11d1de1b97f2b8fa0188295893acd26943f3261.jpg",
|
| 566 |
+
"table_caption": [
|
| 567 |
+
"Table 2: Results on MultiWOZ. Supervision denotes whether a model leverages dialog state or/and dialog act annotations. All models use the ground truth dialog state for database search. ARDM without supervision from annotation can still achieve comparable results. "
|
| 568 |
+
],
|
| 569 |
+
"table_footnote": [],
|
| 570 |
+
"table_body": "<table><tr><td rowspan=\"2\">Model</td><td colspan=\"2\">Supervision</td><td rowspan=\"2\">Inform (%)</td><td rowspan=\"2\">Success (%)</td><td rowspan=\"2\">BLEU-4</td></tr><tr><td>Dialog State</td><td>Dialog Act</td></tr><tr><td>Human</td><td>1</td><td>-</td><td>98.9</td><td>96.5</td><td>-</td></tr><tr><td rowspan=\"3\">Baseline HDSA LaRL</td><td>√</td><td>×</td><td>82.5</td><td>72.9</td><td>18.9</td></tr><tr><td>√</td><td>√</td><td>87.7</td><td>73.4</td><td>23.6</td></tr><tr><td>√</td><td>×</td><td>82.8</td><td>79.2</td><td>12.8</td></tr><tr><td>ARDM</td><td>×</td><td>×</td><td>87.4</td><td>72.8</td><td>20.6</td></tr></table>",
|
| 571 |
+
"bbox": [
|
| 572 |
+
227,
|
| 573 |
+
289,
|
| 574 |
+
771,
|
| 575 |
+
414
|
| 576 |
+
],
|
| 577 |
+
"page_idx": 5
|
| 578 |
+
},
|
| 579 |
+
{
|
| 580 |
+
"type": "text",
|
| 581 |
+
"text": "The evaluation results are shown in Table 2. Without any supervision from dialog states or dialog acts, ARDM significantly outperforms the MultiWOZ Baseline and LaRL on BLEU-4 and Inform rate, and is on par with HDSA. However, HDSA uses dialog act supervision and a large pretrained language model, BERT. Our model requires no annotation and can achieve similar results. This suggests our speaker role modeling and large-scale pre-training methods work similarly as the useful dialog act annotations. All the results show that our method’s excellent performance remains consistent in multi-domain dialogs. ",
|
| 582 |
+
"bbox": [
|
| 583 |
+
174,
|
| 584 |
+
484,
|
| 585 |
+
825,
|
| 586 |
+
583
|
| 587 |
+
],
|
| 588 |
+
"page_idx": 5
|
| 589 |
+
},
|
| 590 |
+
{
|
| 591 |
+
"type": "text",
|
| 592 |
+
"text": "We analyze the generated responses and find that if multiple domains have appeared in the conversation history, our model tends to make mistakes in answering the right domain for user requests. This finding suggests that the Maximum Likelihood Estimation (MLE) has limitations in directly optimizing the metric, while reinforcement Learning (RL) can hugely improve the task completion in a dialog system. This is why LaRL has a higher Success rate. However, we also observe that LaRL has a low BLEU-4 score, which indicates low readability in responses. Therefore, there is a trade-off between the generation quality and the task success rate in the RL setting. ",
|
| 593 |
+
"bbox": [
|
| 594 |
+
174,
|
| 595 |
+
589,
|
| 596 |
+
825,
|
| 597 |
+
688
|
| 598 |
+
],
|
| 599 |
+
"page_idx": 5
|
| 600 |
+
},
|
| 601 |
+
{
|
| 602 |
+
"type": "text",
|
| 603 |
+
"text": "4.3 PERSUASIONFORGOOD ",
|
| 604 |
+
"text_level": 1,
|
| 605 |
+
"bbox": [
|
| 606 |
+
176,
|
| 607 |
+
704,
|
| 608 |
+
375,
|
| 609 |
+
719
|
| 610 |
+
],
|
| 611 |
+
"page_idx": 5
|
| 612 |
+
},
|
| 613 |
+
{
|
| 614 |
+
"type": "text",
|
| 615 |
+
"text": "To showcase ARDM’s performance on a dialog dataset where it is much more difficult to obtain belief states and dialog act annotations, we train and evaluate our model on PersuasionForGood (Wang et al., 2019) dataset. In this dataset, the persuader must persuade an assigned persuadee (i.e., a person who is asked to donate) to donate money (from their task payment) to a charity called “Save the Children”. This dataset has a much larger vocabulary size (8,141) than the previous taskoriented dialog datasets due to its non-collaborative dialog property. The conversation content is richer because two speakers are negotiating back and forth. The dataset consists of 1,017 dialogs where only 300 dialogs are annotated with dialog acts. Therefore, models that require dialog state or dialog act annotation are not applicable in this dataset. ARDM does not require dialog acts for training. As ARDM has already learned good language priors through pre-training, which makes it applicable on PersuasionForGood. Due to the similarity to chit-chat, we use TransferTransfo (Wolf et al., 2019) model as a strong baseline model. TransferTransfo is also based on large pre-trained language model, but it uses token type embedding to encode role information of the speaker. We concatenate all history text together as input to generate the next utterance. ",
|
| 616 |
+
"bbox": [
|
| 617 |
+
174,
|
| 618 |
+
731,
|
| 619 |
+
825,
|
| 620 |
+
898
|
| 621 |
+
],
|
| 622 |
+
"page_idx": 5
|
| 623 |
+
},
|
| 624 |
+
{
|
| 625 |
+
"type": "text",
|
| 626 |
+
"text": "",
|
| 627 |
+
"bbox": [
|
| 628 |
+
173,
|
| 629 |
+
103,
|
| 630 |
+
823,
|
| 631 |
+
132
|
| 632 |
+
],
|
| 633 |
+
"page_idx": 6
|
| 634 |
+
},
|
| 635 |
+
{
|
| 636 |
+
"type": "text",
|
| 637 |
+
"text": "To generate diverse responses, we decode the response using the nucleus sampling (Holtzman et al., 2019) with a top-p of 0.9 and a temperature of 0.7. It is impossible to conduct an automatic evaluation on task success on this task due to the lack of annotation. We use perplexity, BLEU-1, and BLEU-2 to evaluate each model’s language generation quality. We also conduct a human evaluation to validate each model’s task success rate. We show some generated examples in the Appendix to provide more information on both models’ generation quality. ",
|
| 638 |
+
"bbox": [
|
| 639 |
+
174,
|
| 640 |
+
138,
|
| 641 |
+
825,
|
| 642 |
+
223
|
| 643 |
+
],
|
| 644 |
+
"page_idx": 6
|
| 645 |
+
},
|
| 646 |
+
{
|
| 647 |
+
"type": "text",
|
| 648 |
+
"text": "4.3.1 RESULTS ",
|
| 649 |
+
"text_level": 1,
|
| 650 |
+
"bbox": [
|
| 651 |
+
174,
|
| 652 |
+
238,
|
| 653 |
+
292,
|
| 654 |
+
252
|
| 655 |
+
],
|
| 656 |
+
"page_idx": 6
|
| 657 |
+
},
|
| 658 |
+
{
|
| 659 |
+
"type": "table",
|
| 660 |
+
"img_path": "images/859bc04354ea7cdb1861e631a3805bc0386f1d444a0290c509c7165bd01c8c56.jpg",
|
| 661 |
+
"table_caption": [
|
| 662 |
+
"Table 3: Automatic Evaluation and Human Evaluation Results "
|
| 663 |
+
],
|
| 664 |
+
"table_footnote": [],
|
| 665 |
+
"table_body": "<table><tr><td></td><td>Perplexity↓</td><td>BLEU-1个</td><td>BLEU-2↑|</td><td></td><td>Human Preference ↑丨Average Donation Amount ↑</td></tr><tr><td>TransferTransfo</td><td>19.9</td><td>17.0</td><td>8.57</td><td>34.7%</td><td>0.538</td></tr><tr><td>ARDM</td><td>10.1</td><td>16.5</td><td>6.44</td><td>65.3%</td><td>0.807</td></tr></table>",
|
| 666 |
+
"bbox": [
|
| 667 |
+
192,
|
| 668 |
+
267,
|
| 669 |
+
805,
|
| 670 |
+
319
|
| 671 |
+
],
|
| 672 |
+
"page_idx": 6
|
| 673 |
+
},
|
| 674 |
+
{
|
| 675 |
+
"type": "table",
|
| 676 |
+
"img_path": "images/7d669f4166925bc27ab631de6375c84e129369bbafdbfee37bac81c597c830de.jpg",
|
| 677 |
+
"table_caption": [
|
| 678 |
+
"Table 4: A conversation between a machine persuader trained by ARDM and a human persuadee. "
|
| 679 |
+
],
|
| 680 |
+
"table_footnote": [],
|
| 681 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=1>Utterance</td></tr><tr><td rowspan=1 colspan=1>SYS</td><td rowspan=1 colspan=1> Hi, how are you doing today?</td></tr><tr><td rowspan=1 colspan=1>USR</td><td rowspan=1 colspan=1>Iam good!</td></tr><tr><td rowspan=1 colspan=1>SYS</td><td rowspan=1 colspan=1> Have you ever heard of the charity Save the Children?</td></tr><tr><td rowspan=1 colspan=1>USR</td><td rowspan=1 colspan=1>No, I have not heard about it. Would you like to talk about it?</td></tr><tr><td rowspan=1 colspan=1> SYS</td><td rowspan=1 colspan=1> Save the Children is an international non-governmental organization that promotes children's rights, provides relief and helps support children in developing countries.</td></tr><tr><td rowspan=1 colspan=1>USR</td><td rowspan=2 colspan=1>That's cool. It is an organization for the good of this worldYes, it is. In the first two months of 2018 alone,1,00O children were reportedly kiled or injured in intensifying violence in Syria.</td></tr><tr><td rowspan=1 colspan=1>SYS</td></tr><tr><td rowspan=1 colspan=1>USR</td><td rowspan=1 colspan=1>That's sad.</td></tr><tr><td rowspan=1 colspan=1> sYS</td><td rowspan=1 colspan=1>We do need to do something about that. One of the things that we can do is make sure that we have a system in place that willensure that every penny we spend goes directly to the children in need.</td></tr><tr><td rowspan=1 colspan=1>USR</td><td rowspan=2 colspan=1>I agree. How much do you like to donate to the charity now? Your donation will be directly deducted from your task payment. You can choose any amount from $O to all your payment ($2).</td></tr><tr><td rowspan=1 colspan=1> sYS</td></tr><tr><td rowspan=1 colspan=1>USR</td><td rowspan=3 colspan=1> I am willing to donate full my payment $2. Wow, that is awesome! That is so kind of you!You are welcome.</td></tr><tr><td rowspan=1 colspan=1>SYS</td></tr><tr><td rowspan=1 colspan=1>USR</td></tr></table>",
|
| 682 |
+
"bbox": [
|
| 683 |
+
176,
|
| 684 |
+
375,
|
| 685 |
+
821,
|
| 686 |
+
612
|
| 687 |
+
],
|
| 688 |
+
"page_idx": 6
|
| 689 |
+
},
|
| 690 |
+
{
|
| 691 |
+
"type": "text",
|
| 692 |
+
"text": "Table 3 shows the results for PersuasionForGood. Because ARDM applies better speaker modeling and recurrence mechanism, our model achieves lower perplexity compared to TransferTransfo. In terms of BLEU scores, TransferTransfo is better than ARDM. However, BLEU-1 cannot reflect the actual generation quality because a random sentence with common tokens the, of, is, are already has $1 0 . 0 +$ BLEU-1 score. Also because the validation set only contains 100 samples, the result can have a high variance. To comprehensively evaluate each model’s performance, we recruit 14 human evaluators to chat with the two persuasive systems ten times to avoid the randomness produced by each model. In total, we collected 140 ratings. We ask them to select a preferred chat-bot and indicate how much they are willing to donate after talking to the chat-bot. As a result, human judges prefer ARDM over TransferTransfo and tends to donate more when talking to ARDM produced chat-bot. Our model achieved $27 \\%$ more donations compared to TransferTransfo. This indicates that our systems are more persuasive. In some examples, such as the one in Table 4, our model generates coherent, natural, and persuasive responses. ",
|
| 693 |
+
"bbox": [
|
| 694 |
+
173,
|
| 695 |
+
662,
|
| 696 |
+
825,
|
| 697 |
+
843
|
| 698 |
+
],
|
| 699 |
+
"page_idx": 6
|
| 700 |
+
},
|
| 701 |
+
{
|
| 702 |
+
"type": "text",
|
| 703 |
+
"text": "5 ERROR ANALYSIS ",
|
| 704 |
+
"text_level": 1,
|
| 705 |
+
"bbox": [
|
| 706 |
+
176,
|
| 707 |
+
863,
|
| 708 |
+
354,
|
| 709 |
+
880
|
| 710 |
+
],
|
| 711 |
+
"page_idx": 6
|
| 712 |
+
},
|
| 713 |
+
{
|
| 714 |
+
"type": "text",
|
| 715 |
+
"text": "Since CamRest676 is similar to MultiWOZ in terms of task content and dialog structure, we only describe the errors in MultiWOZ for simplicity. We randomly selected 30 generated error responses from our model with zero inform and success score. To our surprise, we observed that nearly $6 3 . 3 \\%$ of errors are not really mistakes. It is mainly due to the limitation of the automatic evaluator. For example, at turn one, the user asks about a restaurant, and the ground truth system response is “the [restaurant name] is located at . . . ”, but the generated system response is “what food preference do you have?”. Our generated response is correct with respect to the dialog context. It is narrowing down the restaurant choices before providing a restaurant recommendation. However, the evaluator sticks to the only possible response it has. Unless the user can dynamically interact with the system, there is no good way to change such mistakes in the automatic evaluator. We find that another $20 \\%$ errors our model makes are when the system asks information the user already provided. This type of errors calls for a better history representation. Another $10 \\%$ errors are due to ignoring the user’s request for information, such as phone number. However, when we look at the ground truth responses, some crowd workers also made such errors. So resolving these errors requires a cleaner training dataset. Finally, the rest of $6 . 7 \\%$ errors are about incorrect dialog domain understanding. For example, the user is asking for a hotel, but we present a restaurant recommendation. This is because of the data noise during the delexicalization process in which some domain labels are wrong. ",
|
| 716 |
+
"bbox": [
|
| 717 |
+
174,
|
| 718 |
+
895,
|
| 719 |
+
823,
|
| 720 |
+
924
|
| 721 |
+
],
|
| 722 |
+
"page_idx": 6
|
| 723 |
+
},
|
| 724 |
+
{
|
| 725 |
+
"type": "text",
|
| 726 |
+
"text": "",
|
| 727 |
+
"bbox": [
|
| 728 |
+
174,
|
| 729 |
+
104,
|
| 730 |
+
825,
|
| 731 |
+
325
|
| 732 |
+
],
|
| 733 |
+
"page_idx": 7
|
| 734 |
+
},
|
| 735 |
+
{
|
| 736 |
+
"type": "text",
|
| 737 |
+
"text": "The donation persuasion system trained with TransferTransfo and our model has some common problems, such as inconsistency, lack of logic, and hallucination. For example, if the persuader provides the information about “Save the Children”, then the persuadee asks “Can you tell me more about it?”. The system ends up providing the same information as before. It also sometimes makes up facts that have never happened, such as “Save the Children has an operation about a hurricane in Hawaii”. All those errors would prevent users from trusting the bot, and therefore resulting in less donation. However, we also observe that users have a higher tolerance for errors in the persuasion setting than the customer service setting. Overall, our model performs better on PersuasionForGood by having longer and diversified utterances. This suggests our model which utilizes alternating parameters for different speaker roles is more effective than TransferTransfo which only injects role information into the input embedding. ",
|
| 738 |
+
"bbox": [
|
| 739 |
+
174,
|
| 740 |
+
333,
|
| 741 |
+
825,
|
| 742 |
+
486
|
| 743 |
+
],
|
| 744 |
+
"page_idx": 7
|
| 745 |
+
},
|
| 746 |
+
{
|
| 747 |
+
"type": "text",
|
| 748 |
+
"text": "6 DISCUSSIONS AND ETHICAL CONSIDERATION ",
|
| 749 |
+
"text_level": 1,
|
| 750 |
+
"bbox": [
|
| 751 |
+
174,
|
| 752 |
+
537,
|
| 753 |
+
588,
|
| 754 |
+
554
|
| 755 |
+
],
|
| 756 |
+
"page_idx": 7
|
| 757 |
+
},
|
| 758 |
+
{
|
| 759 |
+
"type": "text",
|
| 760 |
+
"text": "ARDM models speakers separately on top of a large pre-trained language model. Such simple adaptation demonstrates substantial performance gain. We suspect it is because the interleaved structure of two language models provides a collaborative learning frame of both the user and the system language distribution modeling. The memory is the only way for the user and system to communicate, as they do not share any weights in their networks. Thus, the user encoder needs to learn useful representations to make the system model for understanding its intent. Similarly, the system needs to do the same for the user model to improve its understanding. This alternative repeating process forces both the user and system models to preserve the dialog history effectively in the memory. One can interpret the memory as the implicit representation of belief states or dialog acts. ",
|
| 761 |
+
"bbox": [
|
| 762 |
+
174,
|
| 763 |
+
589,
|
| 764 |
+
825,
|
| 765 |
+
728
|
| 766 |
+
],
|
| 767 |
+
"page_idx": 7
|
| 768 |
+
},
|
| 769 |
+
{
|
| 770 |
+
"type": "text",
|
| 771 |
+
"text": "Another benefit of ARDM is that we will obtain both user and system utterance generators. We can let the two models talk to each other to generate new self-play dialogs (Silver et al., 2017). We show some self-play dialog examples in the Appendix E. With self-play, one can rapidly build a large scale dialog dataset using adversarial filtering (Zellers et al., 2018). Such models can be used in reinforcement learning as user simulator to study complex dialog strategies as well. ",
|
| 772 |
+
"bbox": [
|
| 773 |
+
174,
|
| 774 |
+
736,
|
| 775 |
+
825,
|
| 776 |
+
805
|
| 777 |
+
],
|
| 778 |
+
"page_idx": 7
|
| 779 |
+
},
|
| 780 |
+
{
|
| 781 |
+
"type": "text",
|
| 782 |
+
"text": "Persuasion is a double-edged sword. Given the fast development of dialog systems, an ethical design principle must be in place throughout all stages of the development and evaluation. We choose the donation task is because it is a relatively simple task that benefits children. Second, when deploying the persuasive agents in real conversations, we need to keep the users informed of the nature of the system. By revealing the identity of the persuasive agent, the user should also have options to communicate directly with the human team behind the system. Lastly, by investigating persuasive dialog systems, we also envision to use them as an educational tool for the general public to learn to defend themselves against machine persuasion. ",
|
| 783 |
+
"bbox": [
|
| 784 |
+
174,
|
| 785 |
+
811,
|
| 786 |
+
825,
|
| 787 |
+
924
|
| 788 |
+
],
|
| 789 |
+
"page_idx": 7
|
| 790 |
+
},
|
| 791 |
+
{
|
| 792 |
+
"type": "text",
|
| 793 |
+
"text": "7 CONCLUSIONS ",
|
| 794 |
+
"text_level": 1,
|
| 795 |
+
"bbox": [
|
| 796 |
+
176,
|
| 797 |
+
102,
|
| 798 |
+
328,
|
| 799 |
+
117
|
| 800 |
+
],
|
| 801 |
+
"page_idx": 8
|
| 802 |
+
},
|
| 803 |
+
{
|
| 804 |
+
"type": "text",
|
| 805 |
+
"text": "We propose to build Alternating Roles Dialog Model (ARDM), a simple, general, and effective dialog method that models user and system separately with large-scale pre-trained language models. Since ARDM does not require any annotations, it generalizes to different dialog applications. Experimental results on CamRest676 and MultiWOZ suggest that ARDM outperforms or on-par with the current state-of-the-art methods that use manual annotation information, such as belief states and dialog acts. Furthermore, we find our model’s excellent performance generalizes to more complex non-collaborative dialog settings. It can generate high-quality responses to persuade people to donate to charity. However, the easiness of training ARDM raises concerns about the misuse of the model in scenarios such as sales, harassment, or scam on a mass scale. We caution the public in deploying such systems in the real world. ",
|
| 806 |
+
"bbox": [
|
| 807 |
+
174,
|
| 808 |
+
132,
|
| 809 |
+
825,
|
| 810 |
+
271
|
| 811 |
+
],
|
| 812 |
+
"page_idx": 8
|
| 813 |
+
},
|
| 814 |
+
{
|
| 815 |
+
"type": "text",
|
| 816 |
+
"text": "REFERENCES ",
|
| 817 |
+
"text_level": 1,
|
| 818 |
+
"bbox": [
|
| 819 |
+
174,
|
| 820 |
+
292,
|
| 821 |
+
285,
|
| 822 |
+
308
|
| 823 |
+
],
|
| 824 |
+
"page_idx": 8
|
| 825 |
+
},
|
| 826 |
+
{
|
| 827 |
+
"type": "text",
|
| 828 |
+
"text": "Pawel Budzianowski and Ivan Vulic. Hello, it’s GPT-2 - how can I help you? towards the use of pretrained language models for task-oriented dialogue systems. CoRR, abs/1907.05774, 2019. URL http://arxiv.org/abs/1907.05774. ",
|
| 829 |
+
"bbox": [
|
| 830 |
+
176,
|
| 831 |
+
315,
|
| 832 |
+
823,
|
| 833 |
+
357
|
| 834 |
+
],
|
| 835 |
+
"page_idx": 8
|
| 836 |
+
},
|
| 837 |
+
{
|
| 838 |
+
"type": "text",
|
| 839 |
+
"text": "Pawel Budzianowski, Tsung-Hsien Wen, Bo-Hsiang Tseng, Inigo Casanueva, Stefan Ultes, Osman ˜ Ramadan, and Milica Gasic. Multiwoz - A large-scale multi-domain wizard-of-oz dataset for task-oriented dialogue modelling. In Riloff et al. (2018), pp. 5016–5026. ISBN 978-1-948087- 84-1. URL https://www.aclweb.org/anthology/D18-1547/. ",
|
| 840 |
+
"bbox": [
|
| 841 |
+
174,
|
| 842 |
+
364,
|
| 843 |
+
823,
|
| 844 |
+
420
|
| 845 |
+
],
|
| 846 |
+
"page_idx": 8
|
| 847 |
+
},
|
| 848 |
+
{
|
| 849 |
+
"type": "text",
|
| 850 |
+
"text": "Po-Chun Chen, Ta-Chung Chi, Shang-Yu Su, and Yun-Nung Chen. Dynamic time-aware attention to speaker roles and contexts for spoken language understanding. In 2017 IEEE Automatic Speech Recognition and Understanding Workshop (ASRU), pp. 554–560. IEEE, 2017. ",
|
| 851 |
+
"bbox": [
|
| 852 |
+
176,
|
| 853 |
+
429,
|
| 854 |
+
821,
|
| 855 |
+
472
|
| 856 |
+
],
|
| 857 |
+
"page_idx": 8
|
| 858 |
+
},
|
| 859 |
+
{
|
| 860 |
+
"type": "text",
|
| 861 |
+
"text": "Wenhu Chen, Jianshu Chen, Pengda Qin, Xifeng Yan, and William Yang Wang. Semantically conditioned dialog response generation via hierarchical disentangled self-attention. In Anna Korhonen, David R. Traum, and Llu´ıs Marquez (eds.), \\` Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28- August 2, 2019, Volume 1: Long Papers, pp. 3696–3709. Association for Computational Linguistics, 2019. ISBN 978-1- 950737-48-2. URL https://www.aclweb.org/anthology/P19-1360/. ",
|
| 862 |
+
"bbox": [
|
| 863 |
+
174,
|
| 864 |
+
478,
|
| 865 |
+
825,
|
| 866 |
+
564
|
| 867 |
+
],
|
| 868 |
+
"page_idx": 8
|
| 869 |
+
},
|
| 870 |
+
{
|
| 871 |
+
"type": "text",
|
| 872 |
+
"text": "Ta-Chung Chi, Po-Chun Chen, Shang-Yu Su, and Yun-Nung Chen. Speaker role contextual modeling for language understanding and dialogue policy learning. arXiv preprint arXiv:1710.00164, 2017. ",
|
| 873 |
+
"bbox": [
|
| 874 |
+
174,
|
| 875 |
+
570,
|
| 876 |
+
823,
|
| 877 |
+
612
|
| 878 |
+
],
|
| 879 |
+
"page_idx": 8
|
| 880 |
+
},
|
| 881 |
+
{
|
| 882 |
+
"type": "text",
|
| 883 |
+
"text": "Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 4171–4186, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. URL https://www.aclweb.org/ anthology/N19-1423. ",
|
| 884 |
+
"bbox": [
|
| 885 |
+
173,
|
| 886 |
+
619,
|
| 887 |
+
825,
|
| 888 |
+
705
|
| 889 |
+
],
|
| 890 |
+
"page_idx": 8
|
| 891 |
+
},
|
| 892 |
+
{
|
| 893 |
+
"type": "text",
|
| 894 |
+
"text": "Mihail Eric and Christopher D. Manning. A copy-augmented sequence-to-sequence architecture gives good performance on task-oriented dialogue. CoRR, abs/1701.04024, 2017. URL http: //arxiv.org/abs/1701.04024. ",
|
| 895 |
+
"bbox": [
|
| 896 |
+
173,
|
| 897 |
+
712,
|
| 898 |
+
821,
|
| 899 |
+
755
|
| 900 |
+
],
|
| 901 |
+
"page_idx": 8
|
| 902 |
+
},
|
| 903 |
+
{
|
| 904 |
+
"type": "text",
|
| 905 |
+
"text": "Mihail Eric, Lakshmi Krishnan, Francois Charette, and Christopher D. Manning. Key-value retrieval networks for task-oriented dialogue. In Kristiina Jokinen, Manfred Stede, David DeVault, and Annie Louis (eds.), Proceedings of the 18th Annual SIGdial Meeting on Discourse and Dialogue, Saarbrucken, Germany, August 15-17, 2017 ¨ , pp. 37–49. Association for Computational Linguistics, 2017. ISBN 978-1-945626-82-1. URL https://www.aclweb.org/anthology/ $\\mathtt { W 1 7 - 5 5 0 6 } /$ . ",
|
| 906 |
+
"bbox": [
|
| 907 |
+
173,
|
| 908 |
+
762,
|
| 909 |
+
825,
|
| 910 |
+
845
|
| 911 |
+
],
|
| 912 |
+
"page_idx": 8
|
| 913 |
+
},
|
| 914 |
+
{
|
| 915 |
+
"type": "text",
|
| 916 |
+
"text": "Matthew Henderson, Blaise Thomson, and Jason D. Williams. The second dialog state tracking challenge. In Proceedings of the SIGDIAL 2014 Conference, The 15th Annual Meeting of the Special Interest Group on Discourse and Dialogue, 18-20 June 2014, Philadelphia, PA, USA, pp. 263–272. The Association for Computer Linguistics, 2014. ISBN 978-1-941643-21-1. URL https://www.aclweb.org/anthology/W14-4337/. ",
|
| 917 |
+
"bbox": [
|
| 918 |
+
174,
|
| 919 |
+
854,
|
| 920 |
+
825,
|
| 921 |
+
924
|
| 922 |
+
],
|
| 923 |
+
"page_idx": 8
|
| 924 |
+
},
|
| 925 |
+
{
|
| 926 |
+
"type": "text",
|
| 927 |
+
"text": "Ari Holtzman, Jan Buys, Maxwell Forbes, and Yejin Choi. The curious case of neural text degeneration. CoRR, abs/1904.09751, 2019. URL http://arxiv.org/abs/1904.09751. ",
|
| 928 |
+
"bbox": [
|
| 929 |
+
171,
|
| 930 |
+
103,
|
| 931 |
+
823,
|
| 932 |
+
132
|
| 933 |
+
],
|
| 934 |
+
"page_idx": 9
|
| 935 |
+
},
|
| 936 |
+
{
|
| 937 |
+
"type": "text",
|
| 938 |
+
"text": "Chaitanya K Joshi, Fei Mi, and Boi Faltings. Personalization in goal-oriented dialog. arXiv preprint arXiv:1706.07503, 2017. ",
|
| 939 |
+
"bbox": [
|
| 940 |
+
171,
|
| 941 |
+
140,
|
| 942 |
+
823,
|
| 943 |
+
169
|
| 944 |
+
],
|
| 945 |
+
"page_idx": 9
|
| 946 |
+
},
|
| 947 |
+
{
|
| 948 |
+
"type": "text",
|
| 949 |
+
"text": "Wenqiang Lei, Xisen Jin, Min-Yen Kan, Zhaochun Ren, Xiangnan He, and Dawei Yin. Sequicity: Simplifying task-oriented dialogue systems with single sequence-to-sequence architectures. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1437–1447, Melbourne, Australia, July 2018. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/P18-1133. ",
|
| 950 |
+
"bbox": [
|
| 951 |
+
174,
|
| 952 |
+
176,
|
| 953 |
+
823,
|
| 954 |
+
247
|
| 955 |
+
],
|
| 956 |
+
"page_idx": 9
|
| 957 |
+
},
|
| 958 |
+
{
|
| 959 |
+
"type": "text",
|
| 960 |
+
"text": "Jiwei Li, Michel Galley, Chris Brockett, Georgios P Spithourakis, Jianfeng Gao, and Bill Dolan. A persona-based neural conversation model. arXiv preprint arXiv:1603.06155, 2016. ",
|
| 961 |
+
"bbox": [
|
| 962 |
+
171,
|
| 963 |
+
255,
|
| 964 |
+
823,
|
| 965 |
+
285
|
| 966 |
+
],
|
| 967 |
+
"page_idx": 9
|
| 968 |
+
},
|
| 969 |
+
{
|
| 970 |
+
"type": "text",
|
| 971 |
+
"text": "Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net, 2019. URL https://openreview.net/forum?id ${ . } = { }$ Bkg6RiCqY7. ",
|
| 972 |
+
"bbox": [
|
| 973 |
+
176,
|
| 974 |
+
291,
|
| 975 |
+
823,
|
| 976 |
+
335
|
| 977 |
+
],
|
| 978 |
+
"page_idx": 9
|
| 979 |
+
},
|
| 980 |
+
{
|
| 981 |
+
"type": "text",
|
| 982 |
+
"text": "Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. Improving language understanding by generative pre-training. OpenAI, 2018. ",
|
| 983 |
+
"bbox": [
|
| 984 |
+
171,
|
| 985 |
+
342,
|
| 986 |
+
823,
|
| 987 |
+
372
|
| 988 |
+
],
|
| 989 |
+
"page_idx": 9
|
| 990 |
+
},
|
| 991 |
+
{
|
| 992 |
+
"type": "text",
|
| 993 |
+
"text": "Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. 2019. ",
|
| 994 |
+
"bbox": [
|
| 995 |
+
173,
|
| 996 |
+
378,
|
| 997 |
+
823,
|
| 998 |
+
409
|
| 999 |
+
],
|
| 1000 |
+
"page_idx": 9
|
| 1001 |
+
},
|
| 1002 |
+
{
|
| 1003 |
+
"type": "text",
|
| 1004 |
+
"text": "Ellen Riloff, David Chiang, Julia Hockenmaier, and Jun’ichi Tsujii (eds.). Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, October 31 - November 4, 2018, 2018. Association for Computational Linguistics. ISBN 978-1-948087- 84-1. URL https://www.aclweb.org/anthology/volumes/D18-1/. ",
|
| 1005 |
+
"bbox": [
|
| 1006 |
+
174,
|
| 1007 |
+
415,
|
| 1008 |
+
825,
|
| 1009 |
+
473
|
| 1010 |
+
],
|
| 1011 |
+
"page_idx": 9
|
| 1012 |
+
},
|
| 1013 |
+
{
|
| 1014 |
+
"type": "text",
|
| 1015 |
+
"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, ACL 2016, August 7-12, 2016, Berlin, Germany, Volume 1: Long Papers. The Association for Computer Linguistics, 2016. ISBN 978-1-945626-00-5. URL https: //www.aclweb.org/anthology/P16-1162/. ",
|
| 1016 |
+
"bbox": [
|
| 1017 |
+
174,
|
| 1018 |
+
481,
|
| 1019 |
+
825,
|
| 1020 |
+
551
|
| 1021 |
+
],
|
| 1022 |
+
"page_idx": 9
|
| 1023 |
+
},
|
| 1024 |
+
{
|
| 1025 |
+
"type": "text",
|
| 1026 |
+
"text": "David Silver, Thomas Hubert, Julian Schrittwieser, Ioannis Antonoglou, Matthew Lai, Arthur Guez, Marc Lanctot, Laurent Sifre, Dharshan Kumaran, Thore Graepel, Timothy P. Lillicrap, Karen Simonyan, and Demis Hassabis. Mastering chess and shogi by self-play with a general reinforcement learning algorithm. CoRR, abs/1712.01815, 2017. URL http://arxiv.org/abs/ 1712.01815. ",
|
| 1027 |
+
"bbox": [
|
| 1028 |
+
174,
|
| 1029 |
+
559,
|
| 1030 |
+
825,
|
| 1031 |
+
628
|
| 1032 |
+
],
|
| 1033 |
+
"page_idx": 9
|
| 1034 |
+
},
|
| 1035 |
+
{
|
| 1036 |
+
"type": "text",
|
| 1037 |
+
"text": "Shang-Yu Su, Pei-Chieh Yuan, and Yun-Nung Chen. How time matters: Learning time-decay attention for contextual spoken language understanding in dialogues. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pp. 2133–2142, 2018. ",
|
| 1038 |
+
"bbox": [
|
| 1039 |
+
174,
|
| 1040 |
+
637,
|
| 1041 |
+
825,
|
| 1042 |
+
694
|
| 1043 |
+
],
|
| 1044 |
+
"page_idx": 9
|
| 1045 |
+
},
|
| 1046 |
+
{
|
| 1047 |
+
"type": "text",
|
| 1048 |
+
"text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. CoRR, abs/1706.03762, 2017. URL http://arxiv.org/abs/1706.03762. ",
|
| 1049 |
+
"bbox": [
|
| 1050 |
+
176,
|
| 1051 |
+
702,
|
| 1052 |
+
823,
|
| 1053 |
+
744
|
| 1054 |
+
],
|
| 1055 |
+
"page_idx": 9
|
| 1056 |
+
},
|
| 1057 |
+
{
|
| 1058 |
+
"type": "text",
|
| 1059 |
+
"text": "Xuewei Wang, Weiyan Shi, Richard Kim, Yoojung Oh, Sijia Yang, Jingwen Zhang, and Zhou Yu. Persuasion for good: Towards a personalized persuasive dialogue system for social good. CoRR, abs/1906.06725, 2019. URL http://arxiv.org/abs/1906.06725. ",
|
| 1060 |
+
"bbox": [
|
| 1061 |
+
174,
|
| 1062 |
+
752,
|
| 1063 |
+
823,
|
| 1064 |
+
796
|
| 1065 |
+
],
|
| 1066 |
+
"page_idx": 9
|
| 1067 |
+
},
|
| 1068 |
+
{
|
| 1069 |
+
"type": "text",
|
| 1070 |
+
"text": "Tsung-Hsien Wen, Yishu Miao, Phil Blunsom, and Steve J. Young. Latent intention dialogue models. In Doina Precup and Yee Whye Teh (eds.), Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017, volume 70 of Proceedings of Machine Learning Research, pp. 3732–3741. PMLR, 2017. URL http://proceedings.mlr.press/v70/wen17a.html. ",
|
| 1071 |
+
"bbox": [
|
| 1072 |
+
174,
|
| 1073 |
+
803,
|
| 1074 |
+
825,
|
| 1075 |
+
873
|
| 1076 |
+
],
|
| 1077 |
+
"page_idx": 9
|
| 1078 |
+
},
|
| 1079 |
+
{
|
| 1080 |
+
"type": "text",
|
| 1081 |
+
"text": "Thomas Wolf, Victor Sanh, Julien Chaumond, and Clement Delangue. Transfertransfo: A transfer learning approach for neural network based conversational agents. CoRR, abs/1901.08149, 2019. URL http://arxiv.org/abs/1901.08149. ",
|
| 1082 |
+
"bbox": [
|
| 1083 |
+
176,
|
| 1084 |
+
882,
|
| 1085 |
+
823,
|
| 1086 |
+
924
|
| 1087 |
+
],
|
| 1088 |
+
"page_idx": 9
|
| 1089 |
+
},
|
| 1090 |
+
{
|
| 1091 |
+
"type": "text",
|
| 1092 |
+
"text": "Rowan Zellers, Yonatan Bisk, Roy Schwartz, and Yejin Choi. SWAG: A large-scale adversarial dataset for grounded commonsense inference. In Riloff et al. (2018), pp. 93–104. ISBN 978-1- 948087-84-1. URL https://www.aclweb.org/anthology/D18-1009/. ",
|
| 1093 |
+
"bbox": [
|
| 1094 |
+
176,
|
| 1095 |
+
103,
|
| 1096 |
+
823,
|
| 1097 |
+
146
|
| 1098 |
+
],
|
| 1099 |
+
"page_idx": 10
|
| 1100 |
+
},
|
| 1101 |
+
{
|
| 1102 |
+
"type": "text",
|
| 1103 |
+
"text": "Saizheng Zhang, Emily Dinan, Jack Urbanek, Arthur Szlam, Douwe Kiela, and Jason Weston. Personalizing dialogue agents: I have a dog, do you have pets too? In Iryna Gurevych and Yusuke Miyao (eds.), Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, ACL 2018, Melbourne, Australia, July 15-20, 2018, Volume 1: Long Papers, pp. 2204–2213. Association for Computational Linguistics, 2018. ISBN 978-1-948087-32-2. doi: 10.18653/v1/P18-1205. URL https://www.aclweb.org/anthology/P18-1205/. ",
|
| 1104 |
+
"bbox": [
|
| 1105 |
+
174,
|
| 1106 |
+
155,
|
| 1107 |
+
825,
|
| 1108 |
+
239
|
| 1109 |
+
],
|
| 1110 |
+
"page_idx": 10
|
| 1111 |
+
},
|
| 1112 |
+
{
|
| 1113 |
+
"type": "text",
|
| 1114 |
+
"text": "Tiancheng Zhao, Kaige Xie, and Maxine Eskenazi. Rethinking action spaces for reinforcement ´ learning in end-to-end dialog agents with latent variable models. In Jill Burstein, Christy Doran, and Thamar Solorio (eds.), Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pp. 1208–1218. Association for Computational Linguistics, 2019. ISBN 978-1-950737-13-0. URL https: //www.aclweb.org/anthology/N19-1123/. ",
|
| 1115 |
+
"bbox": [
|
| 1116 |
+
174,
|
| 1117 |
+
247,
|
| 1118 |
+
825,
|
| 1119 |
+
347
|
| 1120 |
+
],
|
| 1121 |
+
"page_idx": 10
|
| 1122 |
+
},
|
| 1123 |
+
{
|
| 1124 |
+
"type": "text",
|
| 1125 |
+
"text": "Tianyu Zhao and Tatsuya Kawahara. Effective incorporation of speaker information in utterance encoding in dialog. arXiv preprint arXiv:1907.05599, 2019. ",
|
| 1126 |
+
"bbox": [
|
| 1127 |
+
171,
|
| 1128 |
+
356,
|
| 1129 |
+
823,
|
| 1130 |
+
383
|
| 1131 |
+
],
|
| 1132 |
+
"page_idx": 10
|
| 1133 |
+
},
|
| 1134 |
+
{
|
| 1135 |
+
"type": "text",
|
| 1136 |
+
"text": "A MULTIWOZ EVALUATOR INCONSISTENCY ",
|
| 1137 |
+
"text_level": 1,
|
| 1138 |
+
"bbox": [
|
| 1139 |
+
174,
|
| 1140 |
+
102,
|
| 1141 |
+
563,
|
| 1142 |
+
118
|
| 1143 |
+
],
|
| 1144 |
+
"page_idx": 11
|
| 1145 |
+
},
|
| 1146 |
+
{
|
| 1147 |
+
"type": "text",
|
| 1148 |
+
"text": "We rerun baseline models to compare our methods and find discrepancy among different papers’ reported results. In order to understand the reason, we compared between LaRL’s evaluator 2 and MultiWOZ Baseline’s evaluator 3. We found that they make different assumptions to handle the “train” domain (line 637-639 at LaRL evaluator.py). After carefully analyzing the code and discussing with authors of these two papers, we believe that LaRL’s evaluator is more reasonable. However, in LaRL, the authors reported MultiWOZ Baseline’s scores with a different evaluator. Therefore, we re-evaluated all methods, including LaRl, HDSA, and MultiWOZ Baseline using the same evaluator for fairness. ",
|
| 1149 |
+
"bbox": [
|
| 1150 |
+
173,
|
| 1151 |
+
152,
|
| 1152 |
+
825,
|
| 1153 |
+
265
|
| 1154 |
+
],
|
| 1155 |
+
"page_idx": 11
|
| 1156 |
+
},
|
| 1157 |
+
{
|
| 1158 |
+
"type": "table",
|
| 1159 |
+
"img_path": "images/b60b04c88185de5d205a46ea7b0885a7e44db6f02c9b474ff3498d4b3511b36c.jpg",
|
| 1160 |
+
"table_caption": [
|
| 1161 |
+
"Table 5: Re-evaluation Results on MultiWOZ. "
|
| 1162 |
+
],
|
| 1163 |
+
"table_footnote": [],
|
| 1164 |
+
"table_body": "<table><tr><td></td><td colspan=\"2\">Baseline Evaluator</td><td colspan=\"2\">LaRL Evaluator</td></tr><tr><td></td><td>Inform</td><td>Success</td><td>Inform</td><td>Success</td></tr><tr><td>Human</td><td>75.7%</td><td>67.9%</td><td>90.0%</td><td>82.3%</td></tr><tr><td>Human (the cleaned version)</td><td>82.4%</td><td>78.9%</td><td>98.9%</td><td>96.5%</td></tr><tr><td>MultiWOZ Baseline</td><td>71.3%</td><td>61.0%</td><td>82.5%</td><td>72.9%</td></tr></table>",
|
| 1165 |
+
"bbox": [
|
| 1166 |
+
253,
|
| 1167 |
+
306,
|
| 1168 |
+
745,
|
| 1169 |
+
392
|
| 1170 |
+
],
|
| 1171 |
+
"page_idx": 11
|
| 1172 |
+
},
|
| 1173 |
+
{
|
| 1174 |
+
"type": "text",
|
| 1175 |
+
"text": "B DYNAMIC DIALOG FILTERING ALGORITHM ",
|
| 1176 |
+
"text_level": 1,
|
| 1177 |
+
"bbox": [
|
| 1178 |
+
174,
|
| 1179 |
+
473,
|
| 1180 |
+
571,
|
| 1181 |
+
489
|
| 1182 |
+
],
|
| 1183 |
+
"page_idx": 11
|
| 1184 |
+
},
|
| 1185 |
+
{
|
| 1186 |
+
"type": "text",
|
| 1187 |
+
"text": "Since ARDM takes the entire dialog as input, so different input has different number of turns and different length in each turn. Also, there are two sub-language models in ARDM. If we pad the utterance in each turn and concatenate results of all turns, it is inefficient. Instead, we introduce a filtering algorithm to dynamically release memory once a dialog is finished. This enables us to speed up our model four times in training and eight times in inference. Please refer to our code for details. ",
|
| 1188 |
+
"bbox": [
|
| 1189 |
+
173,
|
| 1190 |
+
525,
|
| 1191 |
+
825,
|
| 1192 |
+
608
|
| 1193 |
+
],
|
| 1194 |
+
"page_idx": 11
|
| 1195 |
+
},
|
| 1196 |
+
{
|
| 1197 |
+
"type": "text",
|
| 1198 |
+
"text": "Algorithm 1 Dialog Filtering algorithm ",
|
| 1199 |
+
"text_level": 1,
|
| 1200 |
+
"bbox": [
|
| 1201 |
+
174,
|
| 1202 |
+
652,
|
| 1203 |
+
436,
|
| 1204 |
+
667
|
| 1205 |
+
],
|
| 1206 |
+
"page_idx": 11
|
| 1207 |
+
},
|
| 1208 |
+
{
|
| 1209 |
+
"type": "table",
|
| 1210 |
+
"img_path": "images/77f8f568dc2ccef3a9b1f371c6c0b5a73838777edda6eb50e9a901069fec13f7.jpg",
|
| 1211 |
+
"table_caption": [],
|
| 1212 |
+
"table_footnote": [],
|
| 1213 |
+
"table_body": "<table><tr><td>Batch Size = n</td></tr><tr><td>Initialize Memory M for n workers.</td></tr><tr><td>for Batch=1,2,3,...do</td></tr><tr><td></td></tr><tr><td>T= maximum number of turns in Batch for Turn=1,2,3,...,TinBatch do</td></tr><tr><td>Filter M and Batch for the finished worker</td></tr><tr><td>Feed remaining Batch to the model</td></tr><tr><td>Compute loss and gradients</td></tr><tr><td>0old←0</td></tr><tr><td>end for</td></tr><tr><td>end for</td></tr></table>",
|
| 1214 |
+
"bbox": [
|
| 1215 |
+
176,
|
| 1216 |
+
660,
|
| 1217 |
+
825,
|
| 1218 |
+
828
|
| 1219 |
+
],
|
| 1220 |
+
"page_idx": 11
|
| 1221 |
+
},
|
| 1222 |
+
{
|
| 1223 |
+
"type": "text",
|
| 1224 |
+
"text": "C TRANSFERTRANSFO EXAMPLES ",
|
| 1225 |
+
"text_level": 1,
|
| 1226 |
+
"bbox": [
|
| 1227 |
+
176,
|
| 1228 |
+
102,
|
| 1229 |
+
475,
|
| 1230 |
+
118
|
| 1231 |
+
],
|
| 1232 |
+
"page_idx": 12
|
| 1233 |
+
},
|
| 1234 |
+
{
|
| 1235 |
+
"type": "table",
|
| 1236 |
+
"img_path": "images/34fa2adb0bfd955182363025e6cda7e7b2087eff94f73bc4104289ac36072535.jpg",
|
| 1237 |
+
"table_caption": [
|
| 1238 |
+
"Table 6: A conversation between a machine persuader (ER) trained by TransferTransfo and a human persuadee (EE) "
|
| 1239 |
+
],
|
| 1240 |
+
"table_footnote": [],
|
| 1241 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=1>Utterance</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>hello!</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>Hello</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> have you heard of the charity save the children?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> no, I haven't heard it</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> it's an international non - governmental organization that promotes children's rights, provides relief and helps support children in developing countries.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>ok</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> so would you like to donate some of your payment to this charity?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> can you tell me more information about it?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> save the children is an international non - governmental organization that promotes children's rights, provides relief and helps support children in developing countries.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> which developing countries ?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> the united states and latin america. have you heard of this charity?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>no,Ihaven't</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> it's an organization that helps ensure children's rights to health, education and safety.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>sounds cool</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=2 colspan=1> have you ever donated to this organization?no</td></tr><tr><td rowspan=1 colspan=1>EE</td></tr></table>",
|
| 1242 |
+
"bbox": [
|
| 1243 |
+
183,
|
| 1244 |
+
151,
|
| 1245 |
+
813,
|
| 1246 |
+
419
|
| 1247 |
+
],
|
| 1248 |
+
"page_idx": 12
|
| 1249 |
+
},
|
| 1250 |
+
{
|
| 1251 |
+
"type": "table",
|
| 1252 |
+
"img_path": "images/92446b6a3171789bc40f8095857b5fa020801b3d44adbbd759ee2d4a878a8de6.jpg",
|
| 1253 |
+
"table_caption": [
|
| 1254 |
+
"Table 7: A conversation between a machine persuader (ER) trained by TransferTransfo and a human persuadee (EE) "
|
| 1255 |
+
],
|
| 1256 |
+
"table_footnote": [],
|
| 1257 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=1>Utterance</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>hello!</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>hi</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> how are you today?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I am good</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> have you ever heard of save the children?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>no, Ihaven't</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> it is an organization that helps children around the world. it's a great organization that does good work and is highly rated with many positive rewards.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>good</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> have you ever heard of it?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> no, Ihaven't heard of it</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> it's a great organization that does good work and is a huge part of the world's popula- tion.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>okay</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> so, are you interested in donating?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>yes,Iam</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> how much would you like to donate to the charity?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>$1</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> wow, that is really great. that is really great to hear. so, are you going to donate anything at this time??</td></tr></table>",
|
| 1258 |
+
"bbox": [
|
| 1259 |
+
181,
|
| 1260 |
+
503,
|
| 1261 |
+
815,
|
| 1262 |
+
797
|
| 1263 |
+
],
|
| 1264 |
+
"page_idx": 12
|
| 1265 |
+
},
|
| 1266 |
+
{
|
| 1267 |
+
"type": "text",
|
| 1268 |
+
"text": "D PERSUASIONFORGOOD HUMAN-MACHINE EXAMPLES ",
|
| 1269 |
+
"text_level": 1,
|
| 1270 |
+
"bbox": [
|
| 1271 |
+
176,
|
| 1272 |
+
872,
|
| 1273 |
+
665,
|
| 1274 |
+
888
|
| 1275 |
+
],
|
| 1276 |
+
"page_idx": 12
|
| 1277 |
+
},
|
| 1278 |
+
{
|
| 1279 |
+
"type": "text",
|
| 1280 |
+
"text": "We show some more examples of dialogs generated using our proposed ARDM. ",
|
| 1281 |
+
"bbox": [
|
| 1282 |
+
173,
|
| 1283 |
+
909,
|
| 1284 |
+
699,
|
| 1285 |
+
924
|
| 1286 |
+
],
|
| 1287 |
+
"page_idx": 12
|
| 1288 |
+
},
|
| 1289 |
+
{
|
| 1290 |
+
"type": "table",
|
| 1291 |
+
"img_path": "images/dcb2ce15c69bd2b26d8e1eac09a5f8ba4cfc8859efaf27db4a0d2c3f9de4d3e8.jpg",
|
| 1292 |
+
"table_caption": [
|
| 1293 |
+
"Table 8: A conversation between a machine persuader (ER) trained by ARDM and a human persuadee (EE) "
|
| 1294 |
+
],
|
| 1295 |
+
"table_footnote": [],
|
| 1296 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=1>Utterance</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>Hello! How are you doing today?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I am doing well!</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Awesome. Have you heard about the Save the Children charity?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>Yes I have heard about it.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Save the Children is an international non-governmental organization that promotes children's rights, provides relief and helps support children in developing countries.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> So which developing countries do they help?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Save the Children is working on supporting children in the US and all over the world.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> that's cool. I want to help children as well.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> That's awesome! I know there are a lot of kids in the world that are in dire situations.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> Right. What I should I do to help them?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Save the Children is a great organization, so you should donate some of your payment to them.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=2 colspan=1>how much is my task payment?I am not sure exactly how much you will donate, but you can donate any amount from $0 to all of your payment ($2).</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I would like to donate $1.00.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> That's awesome. Your donation will make a huge impact for those kids.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>Thank you.</td></tr></table>",
|
| 1297 |
+
"bbox": [
|
| 1298 |
+
181,
|
| 1299 |
+
102,
|
| 1300 |
+
815,
|
| 1301 |
+
381
|
| 1302 |
+
],
|
| 1303 |
+
"page_idx": 13
|
| 1304 |
+
},
|
| 1305 |
+
{
|
| 1306 |
+
"type": "table",
|
| 1307 |
+
"img_path": "images/d7b6a71df55da290493c918eea3520d03e2ddd4839662563c2a1a6c48c07bb7c.jpg",
|
| 1308 |
+
"table_caption": [
|
| 1309 |
+
"Table 9: A conversation between a machine persuader (ER) trained by ARDM and a human persuadee (EE) "
|
| 1310 |
+
],
|
| 1311 |
+
"table_footnote": [],
|
| 1312 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=1>Utterance</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>Hi, how are you doing today?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I am good!</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Have you ever heard of the charity Save the Children?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> No, I have not heard about it. Would you like to talk about it?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Save the Children is an international non-governmental organization that promotes children's rights, provides relief and helps support children in developing countries.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=2 colspan=1>That's cool. It is a organization for the good of this world.Yes, it is. In the first two months of 2018 alone, 1,000 children were reportedly killed or injured in intensifying violence in Syria.</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=2 colspan=1>That's sad. We do need to do something about that. One of the things that we can do is make sure that we have a system in place that will ensure that every penny we spend goesdirectly to the children in need.</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=4 colspan=1>Iagree. How much do you like to donate to the charity now? Your donation will be directly deducted from your task payment. You can choose any amount from $O to all your payment ($2). I am willing to donate full my payment $2. Wow, that is awesome! That is so kind of you!</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>You are welcome.</td></tr></table>",
|
| 1313 |
+
"bbox": [
|
| 1314 |
+
183,
|
| 1315 |
+
587,
|
| 1316 |
+
815,
|
| 1317 |
+
881
|
| 1318 |
+
],
|
| 1319 |
+
"page_idx": 13
|
| 1320 |
+
},
|
| 1321 |
+
{
|
| 1322 |
+
"type": "table",
|
| 1323 |
+
"img_path": "images/6025bad000adf899425c4f550ad62d281369a2bfc0a994f33e23abbe8cc93d1e.jpg",
|
| 1324 |
+
"table_caption": [
|
| 1325 |
+
"Table 10: A conversation between a machine persuader (ER) trained by ARDM and a human persuadee (EE) "
|
| 1326 |
+
],
|
| 1327 |
+
"table_footnote": [],
|
| 1328 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=1>Utterance</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>Hello</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>Hi</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>How are you doing today?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I am good. thank you</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>I was wondering if you would be interested in donating a portion of your payment from this HIT to a children's charity called Save the Children?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>Of course, I would like to. Can I know their website address ?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>Yes, URL</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> Oh, cool. They are a good organization.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=4 colspan=1> How much would you like to donate?I would like to donate $1.00 That is great! The research team will collect all donations and send it to Save theChildren. You are welcome.</td></tr><tr><td rowspan=1 colspan=1>EE</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td></tr></table>",
|
| 1329 |
+
"bbox": [
|
| 1330 |
+
183,
|
| 1331 |
+
101,
|
| 1332 |
+
815,
|
| 1333 |
+
313
|
| 1334 |
+
],
|
| 1335 |
+
"page_idx": 14
|
| 1336 |
+
},
|
| 1337 |
+
{
|
| 1338 |
+
"type": "text",
|
| 1339 |
+
"text": "E PERSUASIONFORGOOD SELF-PLAY EXAMPLES ",
|
| 1340 |
+
"text_level": 1,
|
| 1341 |
+
"bbox": [
|
| 1342 |
+
173,
|
| 1343 |
+
449,
|
| 1344 |
+
602,
|
| 1345 |
+
467
|
| 1346 |
+
],
|
| 1347 |
+
"page_idx": 14
|
| 1348 |
+
},
|
| 1349 |
+
{
|
| 1350 |
+
"type": "text",
|
| 1351 |
+
"text": "We also present several self-play examples generated using our proposed ARDM. ",
|
| 1352 |
+
"bbox": [
|
| 1353 |
+
173,
|
| 1354 |
+
529,
|
| 1355 |
+
707,
|
| 1356 |
+
544
|
| 1357 |
+
],
|
| 1358 |
+
"page_idx": 14
|
| 1359 |
+
},
|
| 1360 |
+
{
|
| 1361 |
+
"type": "table",
|
| 1362 |
+
"img_path": "images/31d44ed6e87cdcefb1bf61025b0ae7d53c13d812e4b4590cc5a4c159603075d2.jpg",
|
| 1363 |
+
"table_caption": [
|
| 1364 |
+
"Table 11: A conversation between a machine persuader (ER) and a machine persuadee (EE) trained by ARDM in self-play setting "
|
| 1365 |
+
],
|
| 1366 |
+
"table_footnote": [],
|
| 1367 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=3>Utterance</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=3>Hello! How are you doing today?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=3> Good, thank you. How are you?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=3> I am good, thank you. Have you heard of the charity Save the Children?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=3>Yes,I have heard about it. Iwould like to donate a dollar to it.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=3> That is wonderful, it is so important to provide education and support to the children. I am sure you will agree that this is a great cause. Do you donate to charities?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=2 colspan=3>Yes, I do donate to several charities. Are you sure you want to donate a dollar to Save the Children? Children all over the world are suffering due to poverty, war, and other issues. Would you consider donating a little bit of your incoming task payment?</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=3 colspan=3> I may donate a dollar. I don't have a lot of money right now but I would like to help. That is great to hear. I know your donation is a small amount but the impact this will have on the world can be significant. Your donation would be directly deducted from your task payment.That is true. I will donate one dollar to the charity.</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=2></td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=2> Thank you so much for your donation, it will help many children.</td><td rowspan=2 colspan=1> Thank you so much for your donation, it will help many children. Thank you. I hope you will continue to donate to the charity.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td></td><td></td></tr></table>",
|
| 1368 |
+
"bbox": [
|
| 1369 |
+
183,
|
| 1370 |
+
628,
|
| 1371 |
+
813,
|
| 1372 |
+
881
|
| 1373 |
+
],
|
| 1374 |
+
"page_idx": 14
|
| 1375 |
+
},
|
| 1376 |
+
{
|
| 1377 |
+
"type": "table",
|
| 1378 |
+
"img_path": "images/009ac6485f6133b9315f6d81be8c6353181e69defaf301840201fd177c7cd2f4.jpg",
|
| 1379 |
+
"table_caption": [
|
| 1380 |
+
"Table 12: A conversation between a machine persuader (ER) and a machine persuadee (EE) trained by ARDM in self-play setting "
|
| 1381 |
+
],
|
| 1382 |
+
"table_footnote": [],
|
| 1383 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=1>Utterance</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>Hi there!</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> Hi, I'm Carolyn. How are you today?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>I am good, thank you. I am also here to talk about a charity called Save the Children.Do you have any idea about that?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> I think it's something that I should know about, but I don't have the funds.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> I understand that, I know that for sure.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> I am glad to hear that. How does it help children in the USA?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> It is really great. I am here to talk to you about something that is really important to me. I am here to tell you about something that I am really passionate about.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> I think it's a very important issue. I don't want to donate to charities that I know arenot helping children.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>Yes, it is.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>Do you donate regularly to others ?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>I have not yet, I am not sure.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I feel a little guilty for not donating when I think about the children I have lost.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>Yeah, I totally understand.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I would like to donate to a charity that I feel would be able to help all the children inthe world.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Awesome! That is great. How much would you like to donate to Save the Children?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I would like to donate $1.00</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=2 colspan=1>Great! That is awesome. I am happy to hear that. I have heard about Save the Children, and it is something thatI really, truly need.</td></tr><tr><td rowspan=1 colspan=1>EE</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=2 colspan=1> That is so great of you.Thank you for the opportunity.</td></tr><tr><td rowspan=1 colspan=1>EE</td></tr></table>",
|
| 1384 |
+
"bbox": [
|
| 1385 |
+
181,
|
| 1386 |
+
102,
|
| 1387 |
+
815,
|
| 1388 |
+
464
|
| 1389 |
+
],
|
| 1390 |
+
"page_idx": 15
|
| 1391 |
+
},
|
| 1392 |
+
{
|
| 1393 |
+
"type": "table",
|
| 1394 |
+
"img_path": "images/518afddbb4fc835dd2fcc48edc6b5408fdf1c82835963d6ab911c829d3566d69.jpg",
|
| 1395 |
+
"table_caption": [
|
| 1396 |
+
"Table 13: A conversation between a machine persuader (ER) and a machine persuadee (EE) trained by ARDM in self-play setting "
|
| 1397 |
+
],
|
| 1398 |
+
"table_footnote": [],
|
| 1399 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=1>Utterance</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>hello how are you?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I'm doing well, how are you?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> I'm doing well, thanks for asking. I was wondering if you would be willing to donate a portion of your task payment to save the children.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> I'm interested, how much will you donate?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> I would like to donate the entire amount, but I'm not sure how much I'd be able todonate. Do you have any other questions ?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> I think I know the amount I would donate.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> I completely understand, I am hoping you would be willing to donate even a small amount. Save the children is an amazing charity that helps children in need around the world.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>How much do you think I can donate?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> I would like to donate a minimum of $2. I was wondering if you would be willing to donate any more, would you be willing to donate even a little bit of your task payment?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=2 colspan=1>I think I can donate $1. That's very kind of you. I would be happy to do that, but I can't think of any other charities I would be able to donate to. I am glad to hear that.</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> I think you are very generous, and I am sure this will help in the future.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=2 colspan=1> It is wonderful to hear. Thank you for your donation. You are very welcome, and thank you for the opportunity to help.</td></tr><tr><td rowspan=1 colspan=1>EE</td></tr></table>",
|
| 1400 |
+
"bbox": [
|
| 1401 |
+
183,
|
| 1402 |
+
587,
|
| 1403 |
+
815,
|
| 1404 |
+
881
|
| 1405 |
+
],
|
| 1406 |
+
"page_idx": 15
|
| 1407 |
+
},
|
| 1408 |
+
{
|
| 1409 |
+
"type": "table",
|
| 1410 |
+
"img_path": "images/6eb6c456dc059a45892430c9397eba9765ebfe6eb86be0d0605a5424d057cf05.jpg",
|
| 1411 |
+
"table_caption": [
|
| 1412 |
+
"Table 14: A conversation between a machine persuader (ER) and a machine persuadee (EE) trained by ARDM in self-play setting "
|
| 1413 |
+
],
|
| 1414 |
+
"table_footnote": [],
|
| 1415 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Role</td><td rowspan=1 colspan=1>Utterance</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>Hi, how are you today?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I'm doing well! How are you?</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> I am doing well as well, I hope you have a nice day.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I am as well.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Do you have children?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> Yes, I do. I have three boys and one girl.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Have you ever donated to a charity?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>No. I don't.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Have you heard of Save the Children?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1>I have not.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1>The charity is an international non-governmental organization that promotes chil- dren's rights, provides relief and helps support children in developing countries.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> I think they are a good organization.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> I am sure they would be happy to help.</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> I think they would.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=1 colspan=1> Do you donate to charities ?</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=2 colspan=1>I do. How much do you like to donate to the charity now? Your donation will be directly deducted from your task payment. You can choose any amount from $O to all your payment ($2).</td></tr><tr><td rowspan=1 colspan=1>ER</td></tr><tr><td rowspan=1 colspan=1>EE</td><td rowspan=1 colspan=1> I would like to donate $0.50.</td></tr><tr><td rowspan=1 colspan=1>ER</td><td rowspan=2 colspan=1> That is very generous of you. I hope they are able to help a lot of children.</td></tr><tr><td rowspan=1 colspan=1>EE</td></tr></table>",
|
| 1416 |
+
"bbox": [
|
| 1417 |
+
181,
|
| 1418 |
+
102,
|
| 1419 |
+
815,
|
| 1420 |
+
436
|
| 1421 |
+
],
|
| 1422 |
+
"page_idx": 16
|
| 1423 |
+
}
|
| 1424 |
+
]
|
parse/train/HkeSdCEtDS/HkeSdCEtDS_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/HkeSdCEtDS/HkeSdCEtDS_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/HklBjCEKvH/HklBjCEKvH.md
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# GENERALIZATION THROUGH MEMORIZATION: NEAREST NEIGHBOR LANGUAGE MODELS
|
| 2 |
+
|
| 3 |
+
Urvashi Khandelwal†∗, Omer Levy‡, Dan Jurafsky†, Luke Zettlemoyer‡ & Mike Lewis‡
|
| 4 |
+
|
| 5 |
+
†Stanford University
|
| 6 |
+
‡Facebook AI Research
|
| 7 |
+
{urvashik,jurafsky}@stanford.edu {omerlevy,lsz,mikelewis}@fb.com
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
We introduce $k$ NN-LMs, which extend a pre-trained neural language model (LM) by linearly interpolating it with a $k$ -nearest neighbors (kNN) model. The nearest neighbors are computed according to distance in the pre-trained LM embedding space, and can be drawn from any text collection, including the original LM training data. Applying this augmentation to a strong WIKITEXT- $1 0 3 \ \mathrm { L M }$ , with neighbors drawn from the original training set, our kNN-LM achieves a new stateof-the-art perplexity of $1 5 . 7 9 - \mathbf { a } 2 . 9 $ point improvement with no additional training. We also show that this approach has implications for efficiently scaling up to larger training sets and allows for effective domain adaptation, by simply varying the nearest neighbor datastore, again without further training. Qualitatively, the model is particularly helpful in predicting rare patterns, such as factual knowledge. Together, these results strongly suggest that learning similarity between sequences of text is easier than predicting the next word, and that nearest neighbor search is an effective approach for language modeling in the long tail.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
Neural language models (LMs) typically solve two subproblems: (1) mapping sentence prefixes to fixed-sized representations, and (2) using these representations to predict the next word in the text (Bengio et al., 2003; Mikolov et al., 2010). We present a new language modeling approach that is based on the hypothesis that the representation learning problem may be easier than the prediction problem. For example, any English speaker knows that Dickens is the author of and Dickens wrote will have essentially the same distribution over the next word, even if they do not know what that distribution is. We provide strong evidence that existing language models, similarly, are much better at the first problem, by using their prefix embeddings in a simple nearest neighbor scheme that significantly improves overall performance.
|
| 16 |
+
|
| 17 |
+
We introduce $k \mathrm { N N - L M }$ , an approach that extends a pre-trained LM by linearly interpolating its next word distribution with a $k$ -nearest neighbors $( k \mathrm { N N } )$ model. The nearest neighbors are computed according to distance in the pre-trained embedding space and can be drawn from any text collection, including the original LM training data. This approach allows rare patterns to be memorized explicitly, rather than implicitly in model parameters. It also improves performance when the same training data is used for learning the prefix representations and the $k \mathbf { N N }$ model, strongly suggesting that the prediction problem is more challenging than previously appreciated.
|
| 18 |
+
|
| 19 |
+
To better measure these effects, we conduct an extensive empirical evaluation. Applying our $k \mathbf { N N }$ augmentation to a strong WIKITEXT- $1 0 3 \ \mathrm { L M }$ using only the original dataset achieves a new stateof-the-art perplexity of 15.79 – a 2.86 point improvement over the base model (Baevski & Auli, 2019) – with no additional training. We also show that the approach has implications for efficiently scaling up to larger training sets and allows for effective domain adaptation, by simply varying the nearest neighbor datastore. Training a model on 100-million tokens and using $k \mathbf { N N }$ search over a 3-billion token dataset can outperform training the same model on all 3-billion tokens, opening a new path for efficiently using large datasets in language models. Similarly, adding out-of-domain data to the datastore makes a single LM useful across multiple domains, again without further training. Qualitatively, we find the model is particularly helpful for long-tail patterns, such as factual knowledge, which might be easier to access via explicit memory.
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
Figure 1: An illustration of $k \mathrm { N N - L M }$ . A datastore is constructed with an entry for each training set token, and an encoding of its leftward context. For inference, a test context is encoded, and the $k$ most similar training contexts are retrieved from the datastore, along with the corresponding targets. A distribution over targets is computed based on the distance of the corresponding context from the test context. This distribution is then interpolated with the original model’s output distribution.
|
| 23 |
+
|
| 24 |
+
# 2 NEAREST NEIGHBOR LANGUAGE MODELING
|
| 25 |
+
|
| 26 |
+
Language models (LMs) assign probabilities to sequences. Given a context sequence of tokens ${ c _ { t } } = ( w _ { 1 } , \dots { w _ { t - 1 } } )$ , autoregressive LMs estimate $\bar { p ( \boldsymbol { w } _ { t } | \boldsymbol { c } _ { t } ) }$ , the distribution over the target token $w _ { t }$ .
|
| 27 |
+
|
| 28 |
+
The $k \mathrm { N N - L M }$ involves augmenting such a pre-trained LM with a nearest neighbors retrieval mechanism, without any additional training (the representations learned by the LM remain unchanged). This can be done with a single forward pass over a text collection (potentially including the original LM training set), where the resulting context-target pairs are stored in a key-value datastore that is queried during inference, as illustrated in Figure 1.
|
| 29 |
+
|
| 30 |
+
Datastore Let $f ( \cdot )$ be the function that maps a context $c$ to a fixed-length vector representation computed by the pre-trained LM. For instance, in a Transformer LM, $f ( c )$ could map $c$ to an intermediate representation that is output by an arbitrary self-attention layer. Then, given the $i$ -th training example $( c _ { i } , w _ { i } ) \in \mathcal { D }$ , we define the key-value pair $( k _ { i } , v _ { i } )$ , where the key $k _ { i }$ is the vector representation of the context $f ( c _ { i } )$ and the value $v _ { i }$ is the target word $w _ { i }$ . The datastore $( \kappa , \nu )$ is thus the set of all key-value pairs constructed from all the training examples in $\mathcal { D }$ :
|
| 31 |
+
|
| 32 |
+
$$
|
| 33 |
+
( \mathcal { K } , \mathcal { V } ) = \{ ( f ( c _ { i } ) , w _ { i } ) | ( c _ { i } , w _ { i } ) \in \mathcal { D } \}
|
| 34 |
+
$$
|
| 35 |
+
|
| 36 |
+
Inference At test time, given the input context $x$ the model generates the output distribution over next words $p _ { \mathrm { L M } } ( y | x )$ and the context representation $f ( x )$ . The model queries the datastore with $f ( x )$ to retrieve its $k$ -nearest neighbors $\mathcal { N }$ according to a distance function $d ( \cdot , \cdot )$ (squared $L ^ { 2 }$ distance in our experiments, making the similarity function an RBF kernel).Then, it computes a distribution over neighbors based on a softmax of their negative distances, while aggregating probability mass for each vocabulary item across all its occurrences in the retrieved targets (items that do not appear in the retrieved targets have zero probability):
|
| 37 |
+
|
| 38 |
+
$$
|
| 39 |
+
p _ { \mathrm { k N N } } ( y | x ) \propto \sum _ { ( k _ { i } , v _ { i } ) \in \mathcal { N } } \mathbb { 1 } _ { y = v _ { i } } \exp ( - d ( k _ { i } , f ( x ) ) )
|
| 40 |
+
$$
|
| 41 |
+
|
| 42 |
+
Finally, we follow Grave et al. (2017a) and interpolate the nearest neighbor distribution $p _ { \mathrm { k N N } }$ with the model distribution $p _ { \mathrm { L M } }$ using a tuned parameter $\lambda$ to produce the final $k$ NN-LM distribution:
|
| 43 |
+
|
| 44 |
+
$$
|
| 45 |
+
p ( y | x ) = \lambda p _ { \mathrm { k N N } } ( y | x ) + ( 1 - \lambda ) p _ { \mathrm { L M } } ( y | x )
|
| 46 |
+
$$
|
| 47 |
+
|
| 48 |
+
Implementation The datastore contains an entry for each target in the training set, which for LMs can be up to billions of examples. To search over this large datastore, we use FAISS (Johnson et al., 2017), an open source library for fast nearest neighbor retrieval in high dimensional spaces. FAISS speeds up search by clustering the keys and looking up neighbors based on the cluster centroids, while reducing memory usage by storing compressed versions of the vectors. We found in preliminary experiments that using $\dot { L } ^ { 2 }$ distance for FAISS retrieval results in better performance for kNN-LM, compared to inner product distance.
|
| 49 |
+
|
| 50 |
+
Related Cache Models Prior work (Grave et al., 2017c; Merity et al., 2017) used a similar approach to compute similarity to the previous hidden states of test documents, making it easier to copy rare vocabulary items from the recent past. Such techniques have been less popular since the development of Transformers (Vaswani et al., 2017), which can learn to copy recent words using self-attention; in Section 4.1, we observe relatively small gains from caching recent items in the same test document a la Grave et al. (2017c). Most relatedly, Grave et al. (2017a) describe an \` online language model using nearest neighbor search over all previous hidden states, to improve domain adaptation. In our work, we only save training data, with the goal of explicitly memorizing training examples to better generalize to similar cases at test time.
|
| 51 |
+
|
| 52 |
+
# 3 EXPERIMENTAL SETUP
|
| 53 |
+
|
| 54 |
+
Data Experiments in this paper use the following English corpora:
|
| 55 |
+
|
| 56 |
+
WIKITEXT-103 is a standard benchmark by Merity et al. (2017) for autoregressive language modeling with a 250K word-level vocabulary. It consists of 103M tokens of Wikipedia in the training set and 250K tokens in each of the development and test sets.
|
| 57 |
+
|
| 58 |
+
BOOKS is the Toronto Books Corpus (Zhu et al., 2015), containing 0.7B. Complete books are held out for validation/test.
|
| 59 |
+
|
| 60 |
+
WIKI-3B is English Wikipedia, containing about 2.87B tokens. Whole articles are held out for validation/test.
|
| 61 |
+
|
| 62 |
+
WIKI-100M is a random 100M token subset of WIKI-3B, consisting of complete articles.
|
| 63 |
+
|
| 64 |
+
Except for WIKITEXT-103, text is tokenized using the byte-pair encoding (Sennrich et al., 2015) with the 29K subword vocabulary from BERT (Devlin et al., 2019).
|
| 65 |
+
|
| 66 |
+
Model Architecture kNN-LM is compatible with any model that produces fixed size context representations. We use decoder-only Transformers (Vaswani et al., 2017) for language modeling, which are the current state of the art. Since the kNN-LM makes no changes to the underlying LM, we take the exact architecture and optimization described by Baevski & Auli (2019) and use it to create a kNN-LM for inference. This model consists of 16 layers, each with 16 self-attention heads, 1024 dimensional hidden states, and 4096 dimensional feedforward layers, amounting to 247M trainable parameters. It processes 3072 tokens of context per example for WIKITEXT-103 and 1024 tokens for the rest of the corpora. Following Baevski & Auli (2019), we use adaptive inputs and an adaptive softmax (Grave et al., 2017b) with tied weights (Press & Wolf, 2017) for the WIKITEXT-103 experiments. On other datasets we do not use adaptive inputs or an adaptive softmax.
|
| 67 |
+
|
| 68 |
+
Evaluation LMs are trained to minimize the negative log-likelihood of the training corpus, and evaluated by perplexity (exponentiated negative log-likelihood) on held out data. Following Baevski & Auli (2019), 512 tokens are scored per test example, but up to 2560 tokens of extra prior context is provided for WIKITEXT-103 and up to 512 tokens of extra prior context is provided for the rest of the corpora.
|
| 69 |
+
|
| 70 |
+
kNN-LM The keys used for kNN-LM are the 1024-dimensional representations fed to the feedforward network in the final layer of the Transformer LM (after self-attention and layernorm; see Section 5 for further explanation). We perform a single forward pass over the training set with the trained model, in order to save the keys and values. During this forward pass, each target token is provided a minimum of 1536 tokens of prior context for WIKITEXT-103 and a minimum of 512 tokens for the rest of the corpora. A FAISS index is then created using 1M randomly sampled keys to learn 4096 cluster centroids. For efficiency, keys are quantized to 64-bytes. During inference, we retrieve $k = 1 0 2 4$ neighbors, and the index looks up 32 cluster centroids while searching for the nearest neighbors. For WIKITEXT-103 experiments, we compute squared $L ^ { 2 }$ distances with full precision keys, but for the other datasets we use the FAISS $L ^ { 2 }$ distances (not squared) between quantized keys directly, for faster evaluation. We tune the interpolation parameter $\lambda$ on the validation set.1
|
| 71 |
+
|
| 72 |
+
Table 1: Performance on WIKITEXT-103. The $k \mathrm { N N - L M }$ substantially outperforms existing work. Gains are additive with the related but orthogonal continuous cache, allowing us to improve the base model by almost 3 perplexity points with no additional training. We report the median of three random seeds.
|
| 73 |
+
|
| 74 |
+
<table><tr><td>Model</td><td colspan="2">Perplexity (↓)</td><td># Trainable Params</td></tr><tr><td></td><td>Dev</td><td>Test</td><td></td></tr><tr><td>Baevski & Auli (2019)</td><td>17.96</td><td>18.65</td><td>247M</td></tr><tr><td>+Transformer-XL (Dai et al., 2019)</td><td>1</td><td>18.30</td><td>257M</td></tr><tr><td>+Phrase Induction (Luo et al., 2019)</td><td>-</td><td>17.40</td><td>257M</td></tr><tr><td>Base LM (Baevski & Auli, 2019)</td><td>17.96</td><td>18.65</td><td>247M</td></tr><tr><td>+kNN-LM</td><td>16.06</td><td>16.12</td><td>247M</td></tr><tr><td>+Continuous Cache (Grave et al., 2017c)</td><td>17.67</td><td>18.27</td><td>247M</td></tr><tr><td>+kNN-LM + Continuous Cache</td><td>15.81</td><td>15.79</td><td>247M</td></tr></table>
|
| 75 |
+
|
| 76 |
+
Table 2: Performance on BOOKS, showing that $k$ NN-LM works well in multiple domains.
|
| 77 |
+
|
| 78 |
+
<table><tr><td>Model</td><td colspan="2">Perplexity (↓) Dev Test</td><td># Trainable Params</td></tr><tr><td>Base LM (Baevski & Auli, 2019)</td><td>14.75</td><td>11.89</td><td>247M</td></tr><tr><td>+kNN-LM</td><td>14.20</td><td>10.89</td><td>247M</td></tr></table>
|
| 79 |
+
|
| 80 |
+
Computational Cost Although the $k \mathrm { N N - L M }$ requires no training given an existing LM, it does add some other computational overheads. Storing the keys and values requires a single forward pass over the training set, which amounts to a fraction of the cost of training for one epoch on the same examples. Once the keys are saved, for WIKITEXT-103 building the cache with 103M entries takes roughly two hours on a single CPU. Finally, running on the validation set took approximately 25 minutes when retrieving 1024 keys. While the cost of building a large cache grows linearly in the number of entries, it is trivial to parallelize and requires no GPU-based training.
|
| 81 |
+
|
| 82 |
+
# 4 EXPERIMENTS
|
| 83 |
+
|
| 84 |
+
# 4.1 USING THE TRAINING DATA AS THE DATASTORE
|
| 85 |
+
|
| 86 |
+
We first experiment with creating a datastore from the same data used to train the LM. Table 1 shows that kNN-LM improves perplexity on WIKITEXT-103 from 18.65 (Baevski & Auli, 2019) to a new state-of-the-art of 16.12. We also provide reported perplexities from two other recent models that also build upon Baevski and Auli’s, suggesting that further improvements may be possible by augmenting the kNN-LM with these techniques. We compare with models trained only on the standard training set, but recent work has shown performance can be improved by training on additional data, from either the test set (Krause et al., 2019) or large amounts of web text (Shoeybi et al., 2019).
|
| 87 |
+
|
| 88 |
+
We also experiment with a continuous cache model, a related but orthogonal technique from Grave et al. (2017c), in which the model saves and retrieves neighbors from earlier in the test document,
|
| 89 |
+
|
| 90 |
+
<table><tr><td>Training Data</td><td>Datastore</td><td>Perplexity (↓) Dev</td><td>Test</td></tr><tr><td>WIKI-3B</td><td></td><td>16.11</td><td>15.17</td></tr><tr><td>WIKI-100M</td><td>-</td><td>20.99</td><td>19.59</td></tr><tr><td>WIKI-100M</td><td>WIKI-3B</td><td>14.61</td><td>13.73</td></tr></table>
|
| 91 |
+
|
| 92 |
+
Table 3: Experimental results on WIKI-3B. The model trained on $1 0 0 \mathbf { M }$ tokens is augmented with a datastore that contains about 3B training examples, outperforming the vanilla LM trained on the entire WIKI-3B training set.
|
| 93 |
+
|
| 94 |
+

|
| 95 |
+
Figure 2: Varying the size of the datastore. (a) Increasing the datastore size monotonically improves performance, and has not saturated even at about 3B tokens. A $k \mathrm { N N - L M }$ trained on 100M tokens with a datastore of 1.6B tokens already outperforms the LM trained on all 3B tokens. (b) The optimal value of $\lambda$ increases with the size of the datastore.
|
| 96 |
+
|
| 97 |
+
rather than the training set. Gains from interpolating with the continuous cache are smaller than reported in the original setting that used LSTMs, perhaps because self-attentive language models can learn to perform such queries. Improvements from the continous cache are additive with the kNN-LM, pushing our state-of-the-art result to 15.79, a gain of 2.86 over the base model.
|
| 98 |
+
|
| 99 |
+
Finally, we repeat the experiment using text from a different domain, BOOKS, to control for the possibility that encyclopedic Wikipedia text is somehow uniquely good for caching. Table 2 shows an improvement in test set perplexity from 11.89 to 10.89, suggesting that this is not the case.
|
| 100 |
+
|
| 101 |
+
# 4.2 MORE DATA WITHOUT TRAINING
|
| 102 |
+
|
| 103 |
+
Section 4.1 has shown that retrieving neighbors from the training data can significantly improve language modeling performance. This raises the question: can retrieving nearest neighbors from data be a substitute for training on it? To test this, we train a LM on WIKI-100M and use it to build a datastore from WIKI-3B, a corpus 30 times larger than the training set. We then compare this kNN-LM to a vanilla LM trained on the entire WIKI-3B corpus.2
|
| 104 |
+
|
| 105 |
+
Table 3 shows that, as expected, the model trained on 3B tokens dramatically outperforms the model trained on 100M tokens, improving perplexity from 19.59 to 15.17. However, adding nearest neighbors retrieval over those 3B examples to the model trained on 100M tokens improves perplexity from 19.59 to 13.73; i.e. retrieving nearest neighbors from the corpus outperforms training on it. This result suggests that rather than training language models on ever larger datasets, we can use smaller datasets to learn representations and augment them with kNN-LM over a large corpus.
|
| 106 |
+
|
| 107 |
+
Table 4: Domain adaptation experiments, with results on BOOKS. Adding an in-domain datastore to a Wikipedia-trained model improves results by 23 points, approaching in-domain training.
|
| 108 |
+
|
| 109 |
+
<table><tr><td>Training Data</td><td>Datastore</td><td colspan="2">Perplexity (↓)</td></tr><tr><td></td><td></td><td>Dev</td><td>Test</td></tr><tr><td>WIKI-3B</td><td></td><td>37.13</td><td>34.84</td></tr><tr><td>BOOKS</td><td>1</td><td>14.75</td><td>11.89</td></tr><tr><td>WIKI-3B</td><td>BOOKS</td><td>24.85</td><td>20.47</td></tr></table>
|
| 110 |
+
|
| 111 |
+

|
| 112 |
+
Figure 3: Transformer LM layer.
|
| 113 |
+
|
| 114 |
+
Table 5: WIKITEXT-103 validation results using different states from the final layer of the LM as the representation function $f ( \cdot )$ for keys and queries. We retrieve $k { = } 1 0 2 4$ neighbors and $\lambda$ is tuned for each.
|
| 115 |
+
|
| 116 |
+
<table><tr><td>Key Type</td><td>Dev ppl. (↓)</td></tr><tr><td>No datastore</td><td>17.96</td></tr><tr><td>Model output</td><td>17.07</td></tr><tr><td>Model output layer normalized</td><td>17.01</td></tr><tr><td>FFN input after layer norm</td><td>16.06</td></tr><tr><td>FFN input before layer norm</td><td>17.06</td></tr><tr><td>MHSA input after layer norm</td><td>16.76</td></tr><tr><td>MHSA input before layer norm</td><td>17.14</td></tr></table>
|
| 117 |
+
|
| 118 |
+
To understand how the amount of data used for $k \mathbf { N N }$ retrieval affects performance, we use the WIKI$1 0 0 \mathbf { M }$ model to create datastores using different amounts of randomly sampled data from WIKI-3B. Figure 2a shows that using only 1.6B examples for the datastore already surpasses the performance of the model trained on all of WIKI-3B. In addition, performance does not saturate at 3B examples in the datastore, suggesting that growing the datastore more could lead to further gains. Figure 2b shows the model relies more on the $k \mathbf { N N }$ component as the size of the datastore increases.
|
| 119 |
+
|
| 120 |
+
# 4.3 DOMAIN ADAPTATION
|
| 121 |
+
|
| 122 |
+
We also experiment with domain adaptation by creating a datastore on the target domain training set. Table 4 shows that an in-domain LM on BOOKS has a relatively low perplexity (11.89), while a model trained on WIKI-3B performs poorly on the BOOKS domain (34.84 perplexity). Adding $k \mathbf { N N }$ search over BOOKS to the WIKI-3B model reduces perplexity by 14 points (to 20.47), demonstrating that kNN-LM allows a single model to be useful in multiple domains, by simply adding a datastore per domain.
|
| 123 |
+
|
| 124 |
+
# 5 TUNING NEAREST NEIGHBOR SEARCH
|
| 125 |
+
|
| 126 |
+
While the $k \mathrm { N N - L M }$ is conceptually straightforward, and requires no additional training, a number of hyperparameters are introduced for nearest neighbor search. We experiment with different choices here.
|
| 127 |
+
|
| 128 |
+
Key Function For similarity search, we extract a representation of context $c$ using an intermediate state of the LM $f ( c )$ . Transformers compute a number of different intermediate states, and we compare several choices depicted in Figure 3, with results shown in Table 5. While all the instantiations of $f$ we tried are helpful, we achieved the largest improvement by using the input to the final layer’s feedforward network. We also observe that normalized representations (i.e. taken immediately after the layer norm) perform better. Repeating the experiment on the second-last transformer layer showed similar trends with slightly worse results (not shown), suggesting that the feedforward layer might be focusing more on the prediction problem, while the onus of representing the input falls more on the self-attention layer.
|
| 129 |
+
|
| 130 |
+

|
| 131 |
+
Figure 4: Effect of the number of nearest neighbors returned per word on WIKITEXT-103 (validation set). Returning more entries from the datastore monotonically improves performance.
|
| 132 |
+
|
| 133 |
+

|
| 134 |
+
Figure 5: Effect of interpolation parameter $\lambda$ on in-domain (left y-axis) and out-of-domain (right y-axis) validation set performances. More weight on $p _ { k N N }$ improves domain adaptation.
|
| 135 |
+
|
| 136 |
+
Number of Neighbors per Query Each query returns the top- $k$ neighbors. Figure 4 shows that performance monotonically improves as more neighbors are returned, and suggests that even larger improvements may be possible with a higher value of $k$ . Nonetheless, even a small number of neighbors $k = 8$ ) is enough to achieve a new state of the art.
|
| 137 |
+
|
| 138 |
+
Interpolation Parameter We use a parameter $\lambda$ to interpolate between the base model distribution and the distribution from $k \mathbf { N N }$ search over the dataset. Figure 5 shows that $\lambda = 0 . 2 5$ is optimal on WIKITEXT-103. However, $\lambda = 0 . 6 5$ works best for domain adaptation results (Figure 5).
|
| 139 |
+
|
| 140 |
+
Precision of Similarity Function In FAISS, the nearest neighbor search computes $L ^ { 2 }$ distances against quantized keys. We found results were improved from 16.5 perplexity on WIKITEXT-103 to 16.06 by computing squared $L ^ { 2 }$ distances with full precision keys for Equation 2.
|
| 141 |
+
|
| 142 |
+
# 6 ANALYSIS
|
| 143 |
+
|
| 144 |
+
Qualitative Analysis To understand why $k \mathrm { N N - L M }$ improves performance, we manually examine cases in which $p _ { \mathrm { k N N } }$ was significantly better than $p _ { \mathrm { L M } }$ . Table 6 shows one such example, along with several others in Appendix A. The example shows an interesting case where the model matches the trigram impact on the in several retrieved neighbors, but puts almost all weight on the most relevant neighbor, thus adding more value than an $n$ -gram LM.
|
| 145 |
+
|
| 146 |
+
In general, we find that examples where $k \mathrm { N N - L M }$ is most helpful typically contain rare patterns. Examples include factual knowledge, names, and near-duplicate sentences from the training set. In these cases, assigning train and test instances similar representations (via $f ( \cdot ) \mathrm { \ddot { \it { \Delta } } }$ ) appears to be an easier problem than implicitly memorizing the next word in model parameters.
|
| 147 |
+
|
| 148 |
+
Simple vs Neural Representation We observe that many long-tail phenomena manifest as rare $n$ -grams (e.g. names). Is it therefore possible to interpolate an $n$ -gram model with a Transformer LM, as an alternative to our $k \mathbf { N N }$ approach? Figure 7 shows little improvement from using $n$ -gram LMs – 0.2 perplexity points (similarly to Bakhtin et al. (2018)). This result highlights the need to use the learned representation function $f ( \cdot )$ to measure similarity between more varied contexts.
|
| 149 |
+
|
| 150 |
+
Implicit vs Explicit Memory If a neural representation function is crucial for $k \mathrm { N N - L M }$ , could implicitly memorizing the training dataset in the neural network parameters replace the explicit memory in the datastore? To test this, we train a Transformer LM with no dropout. Figure 8 shows that this model eventually reaches zero training loss, indicating that it can make perfect predictions for all examples in the training set; the model has memorized the dataset. Naturally, the memorizing LM overfits, i.e. the training loss drops to 0 while the best validation perplexity is much higher at 28.59. For comparison, the vanilla Transformer LM (with dropout) has a much higher training loss (shown in Figure 8), but also generalizes better with a validation perplexity of 17.96. This result shows that the Transformer has sufficient capacity to memorize the training set.
|
| 151 |
+
|
| 152 |
+
<table><tr><td>Test Context (pkNN = 0.998,pLM = 0.124)</td><td>Test Target</td><td></td></tr><tr><td>it was organised by New Zealand international player Joseph Warbrick, promoted by civil servant Thomas Eyton, and managed by James Scott, a publican. The Nativeswere the first New Zealand team to perform a haka, and also the first to wear all black. They played 1O7 rugby matches during the tour,as well as a small number of Victorian Rules football and associ- ation football matches in Australia. Having made a significant impact on the...</td><td colspan="2">development</td></tr><tr><td>Training Set Context</td><td>Training Set Target</td><td>Context Probability</td></tr><tr><td>Asthe captain and instigator of the 1888-89 Natives-the first New Zealand team to tour the British Isles-Warbrick had a lasting impact on the..</td><td>development</td><td>0.998</td></tr><tr><td>promoted to a new first grade competition which started in 19oo.Glebe immediately made a big impact on the...</td><td>district</td><td>0.00012</td></tr><tr><td>centuries,few were as large as other players managed. However, others contend that his impact on the...</td><td>game</td><td>0.000034</td></tr><tr><td>Nearly every game in the main series has either an anime or manga adap-developmentO.00000092 tation,or both.The series has had a significant impact on the..</td><td></td><td></td></tr></table>
|
| 153 |
+
|
| 154 |
+

|
| 155 |
+
Figure 6: Example where the $k \mathbf { N N }$ model has much higher confidence in the correct target than the LM. Although there are other training set examples with similar local $n$ -gram matches, the nearest neighbour search is highly confident of specific and very relevant context.
|
| 156 |
+
|
| 157 |
+

|
| 158 |
+
Figure 7: Interpolating the Transformer LM with $n$ -gram LMs on WIKITEXT-103 (validation set). Using $k \mathrm { N N - L M }$ gives a much lower perplexity, suggesting that the representations are learning more than just matching local context.
|
| 159 |
+
Figure 8: Training curves for the Transformer LM with and without dropout. Turning off dropout allows the training loss to go to 0, indicating that the model has sufficient capacity to memorize the training data.
|
| 160 |
+
|
| 161 |
+
We consider whether the memorizing LM can be an effective substitute for nearest neighbor search. Interpolating the memorizing LM with the original LM improves validation perplexity by just 0.1 – compared to 1.9 from $k \mathrm { N N - L M }$ . This result suggests that although the Transformer is expressive enough to memorize all training examples, learning to do so does not result in context representations that generalize. In contrast, kNN-LM memorizes training data while improving generalization.
|
| 162 |
+
|
| 163 |
+
From these experiments, we conjecture that kNN-LM improves performance because (1) the Transformer LM is very good at learning a representation function for contexts with an implicit notion of similarity, and (2) while the Transformer has capacity to memorize all training examples, doing so causes its representation to generalize less effectively, but (3) the $k \mathrm { N N - L M }$ allows the model to memorize the training data while retaining an effective similarity function.
|
| 164 |
+
|
| 165 |
+
# 7 RELATED WORK
|
| 166 |
+
|
| 167 |
+
We discuss related uses of caches for language modeling in Section 2.
|
| 168 |
+
|
| 169 |
+
Similar $k \mathbf { N N }$ models to ours have been proposed for computer vision tasks (Papernot & McDaniel, 2018; Orhan, 2018; Zhao & Cho, 2018), primarily motivated by improving interpretability and robustness to adversarial attacks. We hypothesize that our method may be particularly effective for language modeling, because plentiful unlabeled data allows datastores of billions of tokens, and language modeling often requires world knowledge to be learnt from few examples.
|
| 170 |
+
|
| 171 |
+
Nearest neighbor models have been applied to a number of NLP problems in the past, such as part of speech tagging (Daelemans et al., 1996) and morphological analysis (Bosch et al., 2007), but the use of learned representations makes the similarity function much more effective in the case of neural models. More recently, Kaiser et al. (2017) have used a similarly differentiable memory that is learned and updated during training, and is applied to one-shot learning tasks.
|
| 172 |
+
|
| 173 |
+
Several models have also improved language generation by using training examples directly at test time. Guu et al. (2018) propose a model that samples training sentences at random and edits them with a sequence-to-sequence model, but does not use a retrieval mechanism such as $k \mathbf { N N }$ . Gu et al. (2018) introduce a translation model that attends over retrieved training set examples. Weston et al. (2018) improve a dialogue response generation model by refining similar instances from the training set. kNN-LM differs from these approaches by working at the level of individual tokens instead of whole training sentences, as well as not incorporating the retrieval mechanism into the training pipeline.
|
| 174 |
+
|
| 175 |
+
A general trend in machine learning, and in language modeling in particular, is that adding more data consistently improves performance (Devlin et al., 2019; Radford et al., 2019; Yang et al., 2019; Liu et al., 2019; Zellers et al., 2019; Shoeybi et al., 2019). Our work offers an alternative method for scaling language models, in which relatively small models learn context representations, and a nearest neighbour search acts as a highly expressive classifier.
|
| 176 |
+
|
| 177 |
+
# 8 CONCLUSION AND FUTURE WORK
|
| 178 |
+
|
| 179 |
+
We have introduced kNN-LMs, which can significantly outperform standard language models by directly querying training examples at test time. The approach can be applied to any neural language model. The success of this method suggests that learning similarity functions between contexts may be an easier problem than predicting the next word from some given context. Future work should explore explicitly training similarity functions, and reducing the size of the datastore.
|
| 180 |
+
|
| 181 |
+
# ACKNOWLEDGMENTS
|
| 182 |
+
|
| 183 |
+
The authors thank the anonymous reviewers as well as Sida Wang, Kartikay Khandelwal, Kevin Clark and members of the FAIR Seattle team for helpful discussions and comments.
|
| 184 |
+
|
| 185 |
+
# REFERENCES
|
| 186 |
+
|
| 187 |
+
Alexei Baevski and Michael Auli. Adaptive input representations for neural language modeling. In ICLR, 2019.
|
| 188 |
+
|
| 189 |
+
Anton Bakhtin, Arthur Szlam, Marc’Aurelio Ranzato, and Edouard Grave. Lightweight adaptive mixture of neural and n-gram language models. arXiv preprint arXiv:1804.07705, 2018.
|
| 190 |
+
|
| 191 |
+
Yoshua Bengio, Rejean Ducharme, Pascal Vincent, and Christian Jauvin. A neural probabilistic ´ language model. Journal of machine learning research, 3(Feb):1137–1155, 2003.
|
| 192 |
+
|
| 193 |
+
Antal van den Bosch, Bertjan Busser, Sander Canisius, and Walter Daelemans. An efficient memorybased morphosyntactic tagger and parser for dutch. LOT Occasional Series, 7:191–206, 2007.
|
| 194 |
+
|
| 195 |
+
Walter Daelemans, Jakub Zavrel, Peter Berck, and Steven Gillis. Mbt: A memory-based part of speech tagger-generator. In WVLC, 1996.
|
| 196 |
+
|
| 197 |
+
Zihang Dai, Zhilin Yang, Yiming Yang, William W Cohen, Jaime Carbonell, Quoc V Le, and Ruslan Salakhutdinov. Transformer-xl: Attentive language models beyond a fixed-length context. In ACL, 2019.
|
| 198 |
+
|
| 199 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In NAACL, 2019.
|
| 200 |
+
|
| 201 |
+
Edouard Grave, Moustapha M Cisse, and Armand Joulin. Unbounded cache model for online language modeling with open vocabulary. In NIPS, pp. 6042–6052, 2017a.
|
| 202 |
+
|
| 203 |
+
Edouard Grave, Armand Joulin, Moustapha Cisse, Herv ´ e J ´ egou, et al. Efficient softmax approxima- ´ tion for gpus. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 1302–1310. JMLR. org, 2017b.
|
| 204 |
+
|
| 205 |
+
Edouard Grave, Armand Joulin, and Nicolas Usunier. Improving neural language models with a continuous cache. In ICLR, 2017c.
|
| 206 |
+
|
| 207 |
+
Jiatao Gu, Yong Wang, Kyunghyun Cho, and Victor OK Li. Search engine guided neural machine translation. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
|
| 208 |
+
|
| 209 |
+
Kelvin Guu, Tatsunori B Hashimoto, Yonatan Oren, and Percy Liang. Generating sentences by editing prototypes. Transactions of the Association for Computational Linguistics, 6:437–450, 2018.
|
| 210 |
+
|
| 211 |
+
Jeff Johnson, Matthijs Douze, and Herve J ´ egou. Billion-scale similarity search with gpus. ´ arXiv preprint arXiv:1702.08734, 2017.
|
| 212 |
+
|
| 213 |
+
Łukasz Kaiser, Ofir Nachum, Aurko Roy, and Samy Bengio. Learning to remember rare events. In ICLR, 2017.
|
| 214 |
+
|
| 215 |
+
Ben Krause, Emmanuel Kahembwe, Iain Murray, and Steve Renals. Dynamic evaluation of transformer language models. arXiv preprint arXiv:1904.08378, 2019.
|
| 216 |
+
|
| 217 |
+
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692, 2019.
|
| 218 |
+
|
| 219 |
+
Hongyin Luo, Lan Jiang, Yonatan Belinkov, and James Glass. Improving neural language models by segmenting, attending, and predicting the future. In ACL, 2019.
|
| 220 |
+
|
| 221 |
+
Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. ICLR, 2017.
|
| 222 |
+
|
| 223 |
+
Toma´s Mikolov, Martin Karafi ˇ at, Luk ´ a´s Burget, Jan ˇ Cernock ˇ y, and Sanjeev Khudanpur. Recurrent \` neural network based language model. In Eleventh annual conference of the international speech communication association, 2010.
|
| 224 |
+
|
| 225 |
+
A. Emin Orhan. A simple cache model for image recognition. In NeurIPS, 2018.
|
| 226 |
+
|
| 227 |
+
Nicolas Papernot and Patrick McDaniel. Deep k-nearest neighbors: Towards confident, interpretable and robust deep learning. arXiv preprint arXiv:1803.04765, 2018.
|
| 228 |
+
|
| 229 |
+
Ofir Press and Lior Wolf. Using the output embedding to improve language models. In ICLR, 2017.
|
| 230 |
+
|
| 231 |
+
Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. URL https://d4mucfpksywv.cloudfront.net/betterlanguage-models/language-models.pdf, 2019.
|
| 232 |
+
|
| 233 |
+
Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. arXiv preprint arXiv:1508.07909, 2015.
|
| 234 |
+
|
| 235 |
+
Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper, and Bryan Catanzaro. Megatron-lm: Training multi-billion parameter language models using gpu model parallelism. arXiv preprint arXiv:1909.08053, 2019.
|
| 236 |
+
|
| 237 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017.
|
| 238 |
+
|
| 239 |
+
Jason Weston, Emily Dinan, and Alexander H Miller. Retrieve and refine: Improved sequence generation models for dialogue. arXiv preprint arXiv:1808.04776, 2018.
|
| 240 |
+
|
| 241 |
+
Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, and Quoc V Le. Xlnet: Generalized autoregressive pretraining for language understanding. arXiv preprint arXiv:1906.08237, 2019.
|
| 242 |
+
|
| 243 |
+
Rowan Zellers, Ari Holtzman, Hannah Rashkin, Ali Farhadi, Franziska Roesner, and Yejin Choi. Defending against neural fake news. In NeurIPS, 2019.
|
| 244 |
+
|
| 245 |
+
Jake Zhao and Kyunghyun Cho. Retrieval-augmented convolutional neural networks for improved robustness against adversarial examples. arXiv preprint arXiv:1802.09502, 2018.
|
| 246 |
+
|
| 247 |
+
Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In Proceedings of the IEEE international conference on computer vision, pp. 19–27, 2015.
|
| 248 |
+
|
| 249 |
+
# A APPENDIX
|
| 250 |
+
|
| 251 |
+
This section provides several examples where $p _ { \mathrm { k N N } }$ places higher probability mass on the true target, compared to $p _ { \mathrm { L M } }$ .
|
| 252 |
+
|
| 253 |
+
Table 6: Another example where the $k \mathbf { N N }$ model places much higher probability mass on the correct target, compared to the LM. The nearest neighbors search has retrieved a training set context that is extremely similar to the test context, while very rare and in the long-tail of patterns.
|
| 254 |
+
|
| 255 |
+
<table><tr><td>Test Context(pkNN = O.995,pLM = 0.025)</td><td colspan="2">Test Target</td></tr><tr><td>For Australians and New Zealanders the Gallipoli campaign came to sym- bolise an important milestone in the emergence of both nations as indepen- dent actors on the world stage and the development of a sense of national identity. Today,the date of the initial landings,25April,is knownasAn- zac Day in Australia and New Zealand and every year thousands of people gather at memorials in both nations, as well as Turkey, to...</td><td colspan="2">honour</td></tr><tr><td>Training Set Context Despite this,for Australians and New Zealanders the Gallipoli campaign</td><td>Training Set Target honour</td><td>Context Probability 0.995</td></tr><tr><td>has come to symbolise an important milestone in the emergence of both nations as independent actors on the world stage and the development of a senseof national identity. Today,the dateof the initial landings,25April, is a public holiday known as Anzac Day in Australia and New Zealand and every year thousands of people gather at memorials in both nations,and indeed in Turkey,to..</td><td></td><td></td></tr><tr><td>On the anniversary date of his death,every year since 1997,thousands of people gather at his home in Memphis to...</td><td>celebrate</td><td>0.0086</td></tr><tr><td>Twenty-five years after Marseille's death,fighter pilot veterans of World War II gathered to...</td><td>honour</td><td>0.0000041</td></tr></table>
|
| 256 |
+
|
| 257 |
+
<table><tr><td>Test Context (pkNN = O.959,pLm = 0.503)</td><td colspan="2">Test Target</td></tr><tr><td>U2 do what they're best at,slipping into epic rock mode,playing music made for the arena".In two other local newspaper reviews,critics praised the song's inclusion in a sequence of greatest hits.For the PopMart Tour of 1997-...</td><td colspan="2">1998</td></tr><tr><td>Training Set Context</td><td>Training Set Target</td><td>Context Probability</td></tr><tr><td>Following their original intent,"Sunday Bloody Sunday”was not played during any of the forty-seven shows on the Lovetown Tour in 1989. The song reappeared for a brief period during the Zoo TV Tour, and late during thesecond halfofPopMartTour(1997-..</td><td>1998</td><td>0.936</td></tr><tr><td>They are 6 times Champions and they won the Challenge Cup in 1938,and have experienced two previous stretchesin the SuperLeague,l997-..</td><td>2002</td><td>0.0071</td></tr><tr><td>About $40 million ($61.4 million in 2018 dollars) was spent on the property acquisition. After weather-related construction delays due to the El Nino season of the winter of 1997-...</td><td>1998</td><td>0.0015</td></tr><tr><td>This madeit the highest-rated seasonof The X-Files to air aswell as the highest rated Fox program for the 1997.-.</td><td>98</td><td>0.00000048</td></tr></table>
|
| 258 |
+
|
| 259 |
+
Table 7: In this example, the desired date pattern appears in many examples. Yet, the nearest neighbors search is able to identify the only training set context which is relevant to the test context and assigns it the highest probability mass.
|
| 260 |
+
|
| 261 |
+
Table 8: In this case, the model is able to memorize the fact that Georges Bizet wrote Carmen.
|
| 262 |
+
|
| 263 |
+
<table><tr><td>Test Context( (PkNN = 0.624,PLM = 0.167)</td><td colspan="2">Test Target</td></tr><tr><td>Lord Strathcona awarded Gauthier a scholarship in19O6 that allowed her toreturn to Europe and continue her vocal studies.Shereturned there and continued both to study and give performances.Her first operatic perfor- mance came in19o9 in Pavia,Italy asMicaela in Bizet's..</td><td>Carmen</td><td></td></tr><tr><td>Training Set Context</td><td>Training Set Target</td><td>Context Probability</td></tr><tr><td>Despite poor relations with the orchestra,Mahler brought five new operas to the theatre,including Bizet,'s...</td><td>Carmen</td><td>0.356</td></tr><tr><td>The fourth movement of An die Jugend (19o9), for instance, uses two of Niccolo Paganini's Caprices for solo violin (numbers1l and15),while the 1920 piece Piano Sonatina No. 6 (Fantasia da camera super Carmen) is based on themes from Georges Bizet’'s...</td><td>opera</td><td>0.0937</td></tr><tr><td>It also hosted the Balletof her Majesty's Theatre in themid-19th century, before returning to hosting the London premieres of such operas as Bizet's..</td><td>Carmen</td><td>0.0686</td></tr></table>
|
| 264 |
+
|
| 265 |
+
<table><tr><td>Test Context (pkNN = 0.031,pLM = 0.007)</td><td>Test Target</td><td></td></tr><tr><td>Mycena maculata bears some resemblance to M.<unk>,but is only as- sociatedwith decaying hardwood logsand stumps,and is foundin eastern North America,and sometimes on oak on the West Coast.In age,it...</td><td>develops</td><td></td></tr><tr><td>Training Set Context</td><td>Training Set Target</td><td>Context Probability</td></tr><tr><td>Morchella tridentina(=Morchella frustrata)is also rufescent and very sim- ilar to M. rufobrunnea. It is found in mountainous forests and maquis and forms a marked sinusat the attachment of the cap with the stem,which is pure white. At maturity, it..</td><td>develops</td><td>0.031</td></tr><tr><td>The winter bonnet(M.tintinnabulum) is a northern European species that is much smaller(cap diameter up to 2.6 cm(1.O in) across)and has a brown cap,and has ragged hairs at the base. It...</td><td>generally</td><td>0.029</td></tr><tr><td>The "bleeding”will distinguish Mycena atkinsoniana from most other Mycena species commonly encountered. The common and widely dis- tributedM.sanguinolentaisanother"bleeder",but it issmallerthanM. atkinsonia,with a cap diameter ranging from 3 to 15 mm (0.1 to 0.6 in). Additionally,it...</td><td>has</td><td>0.028</td></tr><tr><td>Mycena flavoalba bears resemblance to some members of the genus Hemimycena,such as H. lactea and H.<unk>. It...</td><td>can</td><td>0.018</td></tr></table>
|
| 266 |
+
|
| 267 |
+
Table 9: This is an example where the $p _ { \mathrm { k N N } }$ distribution is relatively flat, as several words are plausible continuations. However, the nearest neighbors search assigns the highest probability to the correct target and a corresponding context that is particularly relevant. In contrast, the LM probability on the correct target is lower.
|
parse/train/HklBjCEKvH/HklBjCEKvH_content_list.json
ADDED
|
@@ -0,0 +1,1437 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "GENERALIZATION THROUGH MEMORIZATION: NEAREST NEIGHBOR LANGUAGE MODELS ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
176,
|
| 8 |
+
99,
|
| 9 |
+
730,
|
| 10 |
+
146
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Urvashi Khandelwal†∗, Omer Levy‡, Dan Jurafsky†, Luke Zettlemoyer‡ & Mike Lewis‡ ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
187,
|
| 19 |
+
169,
|
| 20 |
+
787,
|
| 21 |
+
185
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "†Stanford University \n‡Facebook AI Research \n{urvashik,jurafsky}@stanford.edu {omerlevy,lsz,mikelewis}@fb.com ",
|
| 28 |
+
"bbox": [
|
| 29 |
+
184,
|
| 30 |
+
186,
|
| 31 |
+
495,
|
| 32 |
+
242
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "ABSTRACT ",
|
| 39 |
+
"text_level": 1,
|
| 40 |
+
"bbox": [
|
| 41 |
+
454,
|
| 42 |
+
279,
|
| 43 |
+
544,
|
| 44 |
+
294
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "We introduce $k$ NN-LMs, which extend a pre-trained neural language model (LM) by linearly interpolating it with a $k$ -nearest neighbors (kNN) model. The nearest neighbors are computed according to distance in the pre-trained LM embedding space, and can be drawn from any text collection, including the original LM training data. Applying this augmentation to a strong WIKITEXT- $1 0 3 \\ \\mathrm { L M }$ , with neighbors drawn from the original training set, our kNN-LM achieves a new stateof-the-art perplexity of $1 5 . 7 9 - \\mathbf { a } 2 . 9 $ point improvement with no additional training. We also show that this approach has implications for efficiently scaling up to larger training sets and allows for effective domain adaptation, by simply varying the nearest neighbor datastore, again without further training. Qualitatively, the model is particularly helpful in predicting rare patterns, such as factual knowledge. Together, these results strongly suggest that learning similarity between sequences of text is easier than predicting the next word, and that nearest neighbor search is an effective approach for language modeling in the long tail. ",
|
| 51 |
+
"bbox": [
|
| 52 |
+
233,
|
| 53 |
+
310,
|
| 54 |
+
764,
|
| 55 |
+
505
|
| 56 |
+
],
|
| 57 |
+
"page_idx": 0
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "1 INTRODUCTION ",
|
| 62 |
+
"text_level": 1,
|
| 63 |
+
"bbox": [
|
| 64 |
+
176,
|
| 65 |
+
534,
|
| 66 |
+
336,
|
| 67 |
+
549
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "Neural language models (LMs) typically solve two subproblems: (1) mapping sentence prefixes to fixed-sized representations, and (2) using these representations to predict the next word in the text (Bengio et al., 2003; Mikolov et al., 2010). We present a new language modeling approach that is based on the hypothesis that the representation learning problem may be easier than the prediction problem. For example, any English speaker knows that Dickens is the author of and Dickens wrote will have essentially the same distribution over the next word, even if they do not know what that distribution is. We provide strong evidence that existing language models, similarly, are much better at the first problem, by using their prefix embeddings in a simple nearest neighbor scheme that significantly improves overall performance. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
565,
|
| 77 |
+
825,
|
| 78 |
+
690
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "We introduce $k \\mathrm { N N - L M }$ , an approach that extends a pre-trained LM by linearly interpolating its next word distribution with a $k$ -nearest neighbors $( k \\mathrm { N N } )$ model. The nearest neighbors are computed according to distance in the pre-trained embedding space and can be drawn from any text collection, including the original LM training data. This approach allows rare patterns to be memorized explicitly, rather than implicitly in model parameters. It also improves performance when the same training data is used for learning the prefix representations and the $k \\mathbf { N N }$ model, strongly suggesting that the prediction problem is more challenging than previously appreciated. ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
698,
|
| 88 |
+
825,
|
| 89 |
+
796
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "To better measure these effects, we conduct an extensive empirical evaluation. Applying our $k \\mathbf { N N }$ augmentation to a strong WIKITEXT- $1 0 3 \\ \\mathrm { L M }$ using only the original dataset achieves a new stateof-the-art perplexity of 15.79 – a 2.86 point improvement over the base model (Baevski & Auli, 2019) – with no additional training. We also show that the approach has implications for efficiently scaling up to larger training sets and allows for effective domain adaptation, by simply varying the nearest neighbor datastore. Training a model on 100-million tokens and using $k \\mathbf { N N }$ search over a 3-billion token dataset can outperform training the same model on all 3-billion tokens, opening a new path for efficiently using large datasets in language models. Similarly, adding out-of-domain data to the datastore makes a single LM useful across multiple domains, again without further training. Qualitatively, we find the model is particularly helpful for long-tail patterns, such as factual knowledge, which might be easier to access via explicit memory. ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
803,
|
| 99 |
+
823,
|
| 100 |
+
900
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "image",
|
| 106 |
+
"img_path": "images/570674ba45eaee154db71cf31adbdfdd981ed8ed1459355e7a29d76d41dd9065.jpg",
|
| 107 |
+
"image_caption": [
|
| 108 |
+
"Figure 1: An illustration of $k \\mathrm { N N - L M }$ . A datastore is constructed with an entry for each training set token, and an encoding of its leftward context. For inference, a test context is encoded, and the $k$ most similar training contexts are retrieved from the datastore, along with the corresponding targets. A distribution over targets is computed based on the distance of the corresponding context from the test context. This distribution is then interpolated with the original model’s output distribution. "
|
| 109 |
+
],
|
| 110 |
+
"image_footnote": [],
|
| 111 |
+
"bbox": [
|
| 112 |
+
179,
|
| 113 |
+
101,
|
| 114 |
+
818,
|
| 115 |
+
242
|
| 116 |
+
],
|
| 117 |
+
"page_idx": 1
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"type": "text",
|
| 121 |
+
"text": "",
|
| 122 |
+
"bbox": [
|
| 123 |
+
173,
|
| 124 |
+
349,
|
| 125 |
+
825,
|
| 126 |
+
406
|
| 127 |
+
],
|
| 128 |
+
"page_idx": 1
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"type": "text",
|
| 132 |
+
"text": "2 NEAREST NEIGHBOR LANGUAGE MODELING ",
|
| 133 |
+
"text_level": 1,
|
| 134 |
+
"bbox": [
|
| 135 |
+
173,
|
| 136 |
+
426,
|
| 137 |
+
583,
|
| 138 |
+
443
|
| 139 |
+
],
|
| 140 |
+
"page_idx": 1
|
| 141 |
+
},
|
| 142 |
+
{
|
| 143 |
+
"type": "text",
|
| 144 |
+
"text": "Language models (LMs) assign probabilities to sequences. Given a context sequence of tokens ${ c _ { t } } = ( w _ { 1 } , \\dots { w _ { t - 1 } } )$ , autoregressive LMs estimate $\\bar { p ( \\boldsymbol { w } _ { t } | \\boldsymbol { c } _ { t } ) }$ , the distribution over the target token $w _ { t }$ . ",
|
| 145 |
+
"bbox": [
|
| 146 |
+
173,
|
| 147 |
+
458,
|
| 148 |
+
825,
|
| 149 |
+
501
|
| 150 |
+
],
|
| 151 |
+
"page_idx": 1
|
| 152 |
+
},
|
| 153 |
+
{
|
| 154 |
+
"type": "text",
|
| 155 |
+
"text": "The $k \\mathrm { N N - L M }$ involves augmenting such a pre-trained LM with a nearest neighbors retrieval mechanism, without any additional training (the representations learned by the LM remain unchanged). This can be done with a single forward pass over a text collection (potentially including the original LM training set), where the resulting context-target pairs are stored in a key-value datastore that is queried during inference, as illustrated in Figure 1. ",
|
| 156 |
+
"bbox": [
|
| 157 |
+
173,
|
| 158 |
+
507,
|
| 159 |
+
825,
|
| 160 |
+
578
|
| 161 |
+
],
|
| 162 |
+
"page_idx": 1
|
| 163 |
+
},
|
| 164 |
+
{
|
| 165 |
+
"type": "text",
|
| 166 |
+
"text": "Datastore Let $f ( \\cdot )$ be the function that maps a context $c$ to a fixed-length vector representation computed by the pre-trained LM. For instance, in a Transformer LM, $f ( c )$ could map $c$ to an intermediate representation that is output by an arbitrary self-attention layer. Then, given the $i$ -th training example $( c _ { i } , w _ { i } ) \\in \\mathcal { D }$ , we define the key-value pair $( k _ { i } , v _ { i } )$ , where the key $k _ { i }$ is the vector representation of the context $f ( c _ { i } )$ and the value $v _ { i }$ is the target word $w _ { i }$ . The datastore $( \\kappa , \\nu )$ is thus the set of all key-value pairs constructed from all the training examples in $\\mathcal { D }$ : ",
|
| 167 |
+
"bbox": [
|
| 168 |
+
173,
|
| 169 |
+
593,
|
| 170 |
+
825,
|
| 171 |
+
678
|
| 172 |
+
],
|
| 173 |
+
"page_idx": 1
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"type": "equation",
|
| 177 |
+
"img_path": "images/0cf4cc5d7ffb34fac82d06abc4ed45d25983f702005d33b9ab979abff7542892.jpg",
|
| 178 |
+
"text": "$$\n( \\mathcal { K } , \\mathcal { V } ) = \\{ ( f ( c _ { i } ) , w _ { i } ) | ( c _ { i } , w _ { i } ) \\in \\mathcal { D } \\}\n$$",
|
| 179 |
+
"text_format": "latex",
|
| 180 |
+
"bbox": [
|
| 181 |
+
375,
|
| 182 |
+
684,
|
| 183 |
+
620,
|
| 184 |
+
702
|
| 185 |
+
],
|
| 186 |
+
"page_idx": 1
|
| 187 |
+
},
|
| 188 |
+
{
|
| 189 |
+
"type": "text",
|
| 190 |
+
"text": "Inference At test time, given the input context $x$ the model generates the output distribution over next words $p _ { \\mathrm { L M } } ( y | x )$ and the context representation $f ( x )$ . The model queries the datastore with $f ( x )$ to retrieve its $k$ -nearest neighbors $\\mathcal { N }$ according to a distance function $d ( \\cdot , \\cdot )$ (squared $L ^ { 2 }$ distance in our experiments, making the similarity function an RBF kernel).Then, it computes a distribution over neighbors based on a softmax of their negative distances, while aggregating probability mass for each vocabulary item across all its occurrences in the retrieved targets (items that do not appear in the retrieved targets have zero probability): ",
|
| 191 |
+
"bbox": [
|
| 192 |
+
173,
|
| 193 |
+
715,
|
| 194 |
+
825,
|
| 195 |
+
814
|
| 196 |
+
],
|
| 197 |
+
"page_idx": 1
|
| 198 |
+
},
|
| 199 |
+
{
|
| 200 |
+
"type": "equation",
|
| 201 |
+
"img_path": "images/a8bb4267c27b3fb729f4828325ee4e3a02232ad79bce1f03677001838193ef07.jpg",
|
| 202 |
+
"text": "$$\np _ { \\mathrm { k N N } } ( y | x ) \\propto \\sum _ { ( k _ { i } , v _ { i } ) \\in \\mathcal { N } } \\mathbb { 1 } _ { y = v _ { i } } \\exp ( - d ( k _ { i } , f ( x ) ) )\n$$",
|
| 203 |
+
"text_format": "latex",
|
| 204 |
+
"bbox": [
|
| 205 |
+
338,
|
| 206 |
+
820,
|
| 207 |
+
658,
|
| 208 |
+
858
|
| 209 |
+
],
|
| 210 |
+
"page_idx": 1
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"type": "text",
|
| 214 |
+
"text": "Finally, we follow Grave et al. (2017a) and interpolate the nearest neighbor distribution $p _ { \\mathrm { k N N } }$ with the model distribution $p _ { \\mathrm { L M } }$ using a tuned parameter $\\lambda$ to produce the final $k$ NN-LM distribution: ",
|
| 215 |
+
"bbox": [
|
| 216 |
+
173,
|
| 217 |
+
872,
|
| 218 |
+
828,
|
| 219 |
+
901
|
| 220 |
+
],
|
| 221 |
+
"page_idx": 1
|
| 222 |
+
},
|
| 223 |
+
{
|
| 224 |
+
"type": "equation",
|
| 225 |
+
"img_path": "images/30ac01338c74c96b8f1fb4ba7268a0f416f86b703da1fd18ee2b09a70ba8a946.jpg",
|
| 226 |
+
"text": "$$\np ( y | x ) = \\lambda p _ { \\mathrm { k N N } } ( y | x ) + ( 1 - \\lambda ) p _ { \\mathrm { L M } } ( y | x )\n$$",
|
| 227 |
+
"text_format": "latex",
|
| 228 |
+
"bbox": [
|
| 229 |
+
354,
|
| 230 |
+
907,
|
| 231 |
+
642,
|
| 232 |
+
925
|
| 233 |
+
],
|
| 234 |
+
"page_idx": 1
|
| 235 |
+
},
|
| 236 |
+
{
|
| 237 |
+
"type": "text",
|
| 238 |
+
"text": "Implementation The datastore contains an entry for each target in the training set, which for LMs can be up to billions of examples. To search over this large datastore, we use FAISS (Johnson et al., 2017), an open source library for fast nearest neighbor retrieval in high dimensional spaces. FAISS speeds up search by clustering the keys and looking up neighbors based on the cluster centroids, while reducing memory usage by storing compressed versions of the vectors. We found in preliminary experiments that using $\\dot { L } ^ { 2 }$ distance for FAISS retrieval results in better performance for kNN-LM, compared to inner product distance. ",
|
| 239 |
+
"bbox": [
|
| 240 |
+
174,
|
| 241 |
+
103,
|
| 242 |
+
825,
|
| 243 |
+
200
|
| 244 |
+
],
|
| 245 |
+
"page_idx": 2
|
| 246 |
+
},
|
| 247 |
+
{
|
| 248 |
+
"type": "text",
|
| 249 |
+
"text": "Related Cache Models Prior work (Grave et al., 2017c; Merity et al., 2017) used a similar approach to compute similarity to the previous hidden states of test documents, making it easier to copy rare vocabulary items from the recent past. Such techniques have been less popular since the development of Transformers (Vaswani et al., 2017), which can learn to copy recent words using self-attention; in Section 4.1, we observe relatively small gains from caching recent items in the same test document a la Grave et al. (2017c). Most relatedly, Grave et al. (2017a) describe an \\` online language model using nearest neighbor search over all previous hidden states, to improve domain adaptation. In our work, we only save training data, with the goal of explicitly memorizing training examples to better generalize to similar cases at test time. ",
|
| 250 |
+
"bbox": [
|
| 251 |
+
174,
|
| 252 |
+
217,
|
| 253 |
+
825,
|
| 254 |
+
342
|
| 255 |
+
],
|
| 256 |
+
"page_idx": 2
|
| 257 |
+
},
|
| 258 |
+
{
|
| 259 |
+
"type": "text",
|
| 260 |
+
"text": "3 EXPERIMENTAL SETUP ",
|
| 261 |
+
"text_level": 1,
|
| 262 |
+
"bbox": [
|
| 263 |
+
176,
|
| 264 |
+
362,
|
| 265 |
+
398,
|
| 266 |
+
378
|
| 267 |
+
],
|
| 268 |
+
"page_idx": 2
|
| 269 |
+
},
|
| 270 |
+
{
|
| 271 |
+
"type": "text",
|
| 272 |
+
"text": "Data Experiments in this paper use the following English corpora: ",
|
| 273 |
+
"bbox": [
|
| 274 |
+
173,
|
| 275 |
+
393,
|
| 276 |
+
620,
|
| 277 |
+
409
|
| 278 |
+
],
|
| 279 |
+
"page_idx": 2
|
| 280 |
+
},
|
| 281 |
+
{
|
| 282 |
+
"type": "text",
|
| 283 |
+
"text": "WIKITEXT-103 is a standard benchmark by Merity et al. (2017) for autoregressive language modeling with a 250K word-level vocabulary. It consists of 103M tokens of Wikipedia in the training set and 250K tokens in each of the development and test sets. ",
|
| 284 |
+
"bbox": [
|
| 285 |
+
176,
|
| 286 |
+
415,
|
| 287 |
+
825,
|
| 288 |
+
458
|
| 289 |
+
],
|
| 290 |
+
"page_idx": 2
|
| 291 |
+
},
|
| 292 |
+
{
|
| 293 |
+
"type": "text",
|
| 294 |
+
"text": "BOOKS is the Toronto Books Corpus (Zhu et al., 2015), containing 0.7B. Complete books are held out for validation/test. ",
|
| 295 |
+
"bbox": [
|
| 296 |
+
173,
|
| 297 |
+
463,
|
| 298 |
+
823,
|
| 299 |
+
492
|
| 300 |
+
],
|
| 301 |
+
"page_idx": 2
|
| 302 |
+
},
|
| 303 |
+
{
|
| 304 |
+
"type": "text",
|
| 305 |
+
"text": "WIKI-3B is English Wikipedia, containing about 2.87B tokens. Whole articles are held out for validation/test. ",
|
| 306 |
+
"bbox": [
|
| 307 |
+
176,
|
| 308 |
+
500,
|
| 309 |
+
823,
|
| 310 |
+
527
|
| 311 |
+
],
|
| 312 |
+
"page_idx": 2
|
| 313 |
+
},
|
| 314 |
+
{
|
| 315 |
+
"type": "text",
|
| 316 |
+
"text": "WIKI-100M is a random 100M token subset of WIKI-3B, consisting of complete articles. ",
|
| 317 |
+
"bbox": [
|
| 318 |
+
174,
|
| 319 |
+
535,
|
| 320 |
+
764,
|
| 321 |
+
549
|
| 322 |
+
],
|
| 323 |
+
"page_idx": 2
|
| 324 |
+
},
|
| 325 |
+
{
|
| 326 |
+
"type": "text",
|
| 327 |
+
"text": "Except for WIKITEXT-103, text is tokenized using the byte-pair encoding (Sennrich et al., 2015) with the 29K subword vocabulary from BERT (Devlin et al., 2019). ",
|
| 328 |
+
"bbox": [
|
| 329 |
+
174,
|
| 330 |
+
556,
|
| 331 |
+
820,
|
| 332 |
+
584
|
| 333 |
+
],
|
| 334 |
+
"page_idx": 2
|
| 335 |
+
},
|
| 336 |
+
{
|
| 337 |
+
"type": "text",
|
| 338 |
+
"text": "Model Architecture kNN-LM is compatible with any model that produces fixed size context representations. We use decoder-only Transformers (Vaswani et al., 2017) for language modeling, which are the current state of the art. Since the kNN-LM makes no changes to the underlying LM, we take the exact architecture and optimization described by Baevski & Auli (2019) and use it to create a kNN-LM for inference. This model consists of 16 layers, each with 16 self-attention heads, 1024 dimensional hidden states, and 4096 dimensional feedforward layers, amounting to 247M trainable parameters. It processes 3072 tokens of context per example for WIKITEXT-103 and 1024 tokens for the rest of the corpora. Following Baevski & Auli (2019), we use adaptive inputs and an adaptive softmax (Grave et al., 2017b) with tied weights (Press & Wolf, 2017) for the WIKITEXT-103 experiments. On other datasets we do not use adaptive inputs or an adaptive softmax. ",
|
| 339 |
+
"bbox": [
|
| 340 |
+
173,
|
| 341 |
+
599,
|
| 342 |
+
825,
|
| 343 |
+
752
|
| 344 |
+
],
|
| 345 |
+
"page_idx": 2
|
| 346 |
+
},
|
| 347 |
+
{
|
| 348 |
+
"type": "text",
|
| 349 |
+
"text": "Evaluation LMs are trained to minimize the negative log-likelihood of the training corpus, and evaluated by perplexity (exponentiated negative log-likelihood) on held out data. Following Baevski & Auli (2019), 512 tokens are scored per test example, but up to 2560 tokens of extra prior context is provided for WIKITEXT-103 and up to 512 tokens of extra prior context is provided for the rest of the corpora. ",
|
| 350 |
+
"bbox": [
|
| 351 |
+
174,
|
| 352 |
+
768,
|
| 353 |
+
825,
|
| 354 |
+
838
|
| 355 |
+
],
|
| 356 |
+
"page_idx": 2
|
| 357 |
+
},
|
| 358 |
+
{
|
| 359 |
+
"type": "text",
|
| 360 |
+
"text": "kNN-LM The keys used for kNN-LM are the 1024-dimensional representations fed to the feedforward network in the final layer of the Transformer LM (after self-attention and layernorm; see Section 5 for further explanation). We perform a single forward pass over the training set with the trained model, in order to save the keys and values. During this forward pass, each target token is provided a minimum of 1536 tokens of prior context for WIKITEXT-103 and a minimum of 512 tokens for the rest of the corpora. A FAISS index is then created using 1M randomly sampled keys to learn 4096 cluster centroids. For efficiency, keys are quantized to 64-bytes. During inference, we retrieve $k = 1 0 2 4$ neighbors, and the index looks up 32 cluster centroids while searching for the nearest neighbors. For WIKITEXT-103 experiments, we compute squared $L ^ { 2 }$ distances with full precision keys, but for the other datasets we use the FAISS $L ^ { 2 }$ distances (not squared) between quantized keys directly, for faster evaluation. We tune the interpolation parameter $\\lambda$ on the validation set.1 ",
|
| 361 |
+
"bbox": [
|
| 362 |
+
174,
|
| 363 |
+
853,
|
| 364 |
+
823,
|
| 365 |
+
924
|
| 366 |
+
],
|
| 367 |
+
"page_idx": 2
|
| 368 |
+
},
|
| 369 |
+
{
|
| 370 |
+
"type": "table",
|
| 371 |
+
"img_path": "images/2e290358892dd51e346b02bf02d5d2f8bef2723ed60d7ddae86feefc619eb59b.jpg",
|
| 372 |
+
"table_caption": [
|
| 373 |
+
"Table 1: Performance on WIKITEXT-103. The $k \\mathrm { N N - L M }$ substantially outperforms existing work. Gains are additive with the related but orthogonal continuous cache, allowing us to improve the base model by almost 3 perplexity points with no additional training. We report the median of three random seeds. "
|
| 374 |
+
],
|
| 375 |
+
"table_footnote": [],
|
| 376 |
+
"table_body": "<table><tr><td>Model</td><td colspan=\"2\">Perplexity (↓)</td><td># Trainable Params</td></tr><tr><td></td><td>Dev</td><td>Test</td><td></td></tr><tr><td>Baevski & Auli (2019)</td><td>17.96</td><td>18.65</td><td>247M</td></tr><tr><td>+Transformer-XL (Dai et al., 2019)</td><td>1</td><td>18.30</td><td>257M</td></tr><tr><td>+Phrase Induction (Luo et al., 2019)</td><td>-</td><td>17.40</td><td>257M</td></tr><tr><td>Base LM (Baevski & Auli, 2019)</td><td>17.96</td><td>18.65</td><td>247M</td></tr><tr><td>+kNN-LM</td><td>16.06</td><td>16.12</td><td>247M</td></tr><tr><td>+Continuous Cache (Grave et al., 2017c)</td><td>17.67</td><td>18.27</td><td>247M</td></tr><tr><td>+kNN-LM + Continuous Cache</td><td>15.81</td><td>15.79</td><td>247M</td></tr></table>",
|
| 377 |
+
"bbox": [
|
| 378 |
+
181,
|
| 379 |
+
101,
|
| 380 |
+
816,
|
| 381 |
+
265
|
| 382 |
+
],
|
| 383 |
+
"page_idx": 3
|
| 384 |
+
},
|
| 385 |
+
{
|
| 386 |
+
"type": "table",
|
| 387 |
+
"img_path": "images/e608f059f8659324664b653071659ac87837eab4bc7bae060f38c8974099efd1.jpg",
|
| 388 |
+
"table_caption": [
|
| 389 |
+
"Table 2: Performance on BOOKS, showing that $k$ NN-LM works well in multiple domains. "
|
| 390 |
+
],
|
| 391 |
+
"table_footnote": [],
|
| 392 |
+
"table_body": "<table><tr><td>Model</td><td colspan=\"2\">Perplexity (↓) Dev Test</td><td># Trainable Params</td></tr><tr><td>Base LM (Baevski & Auli, 2019)</td><td>14.75</td><td>11.89</td><td>247M</td></tr><tr><td>+kNN-LM</td><td>14.20</td><td>10.89</td><td>247M</td></tr></table>",
|
| 393 |
+
"bbox": [
|
| 394 |
+
209,
|
| 395 |
+
347,
|
| 396 |
+
787,
|
| 397 |
+
424
|
| 398 |
+
],
|
| 399 |
+
"page_idx": 3
|
| 400 |
+
},
|
| 401 |
+
{
|
| 402 |
+
"type": "text",
|
| 403 |
+
"text": "",
|
| 404 |
+
"bbox": [
|
| 405 |
+
173,
|
| 406 |
+
476,
|
| 407 |
+
825,
|
| 408 |
+
573
|
| 409 |
+
],
|
| 410 |
+
"page_idx": 3
|
| 411 |
+
},
|
| 412 |
+
{
|
| 413 |
+
"type": "text",
|
| 414 |
+
"text": "Computational Cost Although the $k \\mathrm { N N - L M }$ requires no training given an existing LM, it does add some other computational overheads. Storing the keys and values requires a single forward pass over the training set, which amounts to a fraction of the cost of training for one epoch on the same examples. Once the keys are saved, for WIKITEXT-103 building the cache with 103M entries takes roughly two hours on a single CPU. Finally, running on the validation set took approximately 25 minutes when retrieving 1024 keys. While the cost of building a large cache grows linearly in the number of entries, it is trivial to parallelize and requires no GPU-based training. ",
|
| 415 |
+
"bbox": [
|
| 416 |
+
174,
|
| 417 |
+
589,
|
| 418 |
+
825,
|
| 419 |
+
688
|
| 420 |
+
],
|
| 421 |
+
"page_idx": 3
|
| 422 |
+
},
|
| 423 |
+
{
|
| 424 |
+
"type": "text",
|
| 425 |
+
"text": "4 EXPERIMENTS ",
|
| 426 |
+
"text_level": 1,
|
| 427 |
+
"bbox": [
|
| 428 |
+
176,
|
| 429 |
+
708,
|
| 430 |
+
326,
|
| 431 |
+
723
|
| 432 |
+
],
|
| 433 |
+
"page_idx": 3
|
| 434 |
+
},
|
| 435 |
+
{
|
| 436 |
+
"type": "text",
|
| 437 |
+
"text": "4.1 USING THE TRAINING DATA AS THE DATASTORE ",
|
| 438 |
+
"text_level": 1,
|
| 439 |
+
"bbox": [
|
| 440 |
+
174,
|
| 441 |
+
739,
|
| 442 |
+
552,
|
| 443 |
+
755
|
| 444 |
+
],
|
| 445 |
+
"page_idx": 3
|
| 446 |
+
},
|
| 447 |
+
{
|
| 448 |
+
"type": "text",
|
| 449 |
+
"text": "We first experiment with creating a datastore from the same data used to train the LM. Table 1 shows that kNN-LM improves perplexity on WIKITEXT-103 from 18.65 (Baevski & Auli, 2019) to a new state-of-the-art of 16.12. We also provide reported perplexities from two other recent models that also build upon Baevski and Auli’s, suggesting that further improvements may be possible by augmenting the kNN-LM with these techniques. We compare with models trained only on the standard training set, but recent work has shown performance can be improved by training on additional data, from either the test set (Krause et al., 2019) or large amounts of web text (Shoeybi et al., 2019). ",
|
| 450 |
+
"bbox": [
|
| 451 |
+
174,
|
| 452 |
+
766,
|
| 453 |
+
825,
|
| 454 |
+
864
|
| 455 |
+
],
|
| 456 |
+
"page_idx": 3
|
| 457 |
+
},
|
| 458 |
+
{
|
| 459 |
+
"type": "text",
|
| 460 |
+
"text": "We also experiment with a continuous cache model, a related but orthogonal technique from Grave et al. (2017c), in which the model saves and retrieves neighbors from earlier in the test document, ",
|
| 461 |
+
"bbox": [
|
| 462 |
+
176,
|
| 463 |
+
871,
|
| 464 |
+
823,
|
| 465 |
+
898
|
| 466 |
+
],
|
| 467 |
+
"page_idx": 3
|
| 468 |
+
},
|
| 469 |
+
{
|
| 470 |
+
"type": "table",
|
| 471 |
+
"img_path": "images/5dd11373cfdd395181e9bdcce18e433d2278c99c7b28c6dade6ae233010ccc15.jpg",
|
| 472 |
+
"table_caption": [],
|
| 473 |
+
"table_footnote": [],
|
| 474 |
+
"table_body": "<table><tr><td>Training Data</td><td>Datastore</td><td>Perplexity (↓) Dev</td><td>Test</td></tr><tr><td>WIKI-3B</td><td></td><td>16.11</td><td>15.17</td></tr><tr><td>WIKI-100M</td><td>-</td><td>20.99</td><td>19.59</td></tr><tr><td>WIKI-100M</td><td>WIKI-3B</td><td>14.61</td><td>13.73</td></tr></table>",
|
| 475 |
+
"bbox": [
|
| 476 |
+
320,
|
| 477 |
+
101,
|
| 478 |
+
676,
|
| 479 |
+
198
|
| 480 |
+
],
|
| 481 |
+
"page_idx": 4
|
| 482 |
+
},
|
| 483 |
+
{
|
| 484 |
+
"type": "text",
|
| 485 |
+
"text": "Table 3: Experimental results on WIKI-3B. The model trained on $1 0 0 \\mathbf { M }$ tokens is augmented with a datastore that contains about 3B training examples, outperforming the vanilla LM trained on the entire WIKI-3B training set. ",
|
| 486 |
+
"bbox": [
|
| 487 |
+
176,
|
| 488 |
+
208,
|
| 489 |
+
823,
|
| 490 |
+
251
|
| 491 |
+
],
|
| 492 |
+
"page_idx": 4
|
| 493 |
+
},
|
| 494 |
+
{
|
| 495 |
+
"type": "image",
|
| 496 |
+
"img_path": "images/bef9d0d713297aac36e0892773a57f991128921f14a14302130b22e44973e139.jpg",
|
| 497 |
+
"image_caption": [
|
| 498 |
+
"Figure 2: Varying the size of the datastore. (a) Increasing the datastore size monotonically improves performance, and has not saturated even at about 3B tokens. A $k \\mathrm { N N - L M }$ trained on 100M tokens with a datastore of 1.6B tokens already outperforms the LM trained on all 3B tokens. (b) The optimal value of $\\lambda$ increases with the size of the datastore. "
|
| 499 |
+
],
|
| 500 |
+
"image_footnote": [],
|
| 501 |
+
"bbox": [
|
| 502 |
+
194,
|
| 503 |
+
286,
|
| 504 |
+
805,
|
| 505 |
+
454
|
| 506 |
+
],
|
| 507 |
+
"page_idx": 4
|
| 508 |
+
},
|
| 509 |
+
{
|
| 510 |
+
"type": "text",
|
| 511 |
+
"text": "rather than the training set. Gains from interpolating with the continuous cache are smaller than reported in the original setting that used LSTMs, perhaps because self-attentive language models can learn to perform such queries. Improvements from the continous cache are additive with the kNN-LM, pushing our state-of-the-art result to 15.79, a gain of 2.86 over the base model. ",
|
| 512 |
+
"bbox": [
|
| 513 |
+
174,
|
| 514 |
+
551,
|
| 515 |
+
825,
|
| 516 |
+
608
|
| 517 |
+
],
|
| 518 |
+
"page_idx": 4
|
| 519 |
+
},
|
| 520 |
+
{
|
| 521 |
+
"type": "text",
|
| 522 |
+
"text": "Finally, we repeat the experiment using text from a different domain, BOOKS, to control for the possibility that encyclopedic Wikipedia text is somehow uniquely good for caching. Table 2 shows an improvement in test set perplexity from 11.89 to 10.89, suggesting that this is not the case. ",
|
| 523 |
+
"bbox": [
|
| 524 |
+
174,
|
| 525 |
+
614,
|
| 526 |
+
823,
|
| 527 |
+
657
|
| 528 |
+
],
|
| 529 |
+
"page_idx": 4
|
| 530 |
+
},
|
| 531 |
+
{
|
| 532 |
+
"type": "text",
|
| 533 |
+
"text": "4.2 MORE DATA WITHOUT TRAINING ",
|
| 534 |
+
"text_level": 1,
|
| 535 |
+
"bbox": [
|
| 536 |
+
178,
|
| 537 |
+
678,
|
| 538 |
+
446,
|
| 539 |
+
693
|
| 540 |
+
],
|
| 541 |
+
"page_idx": 4
|
| 542 |
+
},
|
| 543 |
+
{
|
| 544 |
+
"type": "text",
|
| 545 |
+
"text": "Section 4.1 has shown that retrieving neighbors from the training data can significantly improve language modeling performance. This raises the question: can retrieving nearest neighbors from data be a substitute for training on it? To test this, we train a LM on WIKI-100M and use it to build a datastore from WIKI-3B, a corpus 30 times larger than the training set. We then compare this kNN-LM to a vanilla LM trained on the entire WIKI-3B corpus.2 ",
|
| 546 |
+
"bbox": [
|
| 547 |
+
174,
|
| 548 |
+
707,
|
| 549 |
+
825,
|
| 550 |
+
776
|
| 551 |
+
],
|
| 552 |
+
"page_idx": 4
|
| 553 |
+
},
|
| 554 |
+
{
|
| 555 |
+
"type": "text",
|
| 556 |
+
"text": "Table 3 shows that, as expected, the model trained on 3B tokens dramatically outperforms the model trained on 100M tokens, improving perplexity from 19.59 to 15.17. However, adding nearest neighbors retrieval over those 3B examples to the model trained on 100M tokens improves perplexity from 19.59 to 13.73; i.e. retrieving nearest neighbors from the corpus outperforms training on it. This result suggests that rather than training language models on ever larger datasets, we can use smaller datasets to learn representations and augment them with kNN-LM over a large corpus. ",
|
| 557 |
+
"bbox": [
|
| 558 |
+
174,
|
| 559 |
+
784,
|
| 560 |
+
825,
|
| 561 |
+
866
|
| 562 |
+
],
|
| 563 |
+
"page_idx": 4
|
| 564 |
+
},
|
| 565 |
+
{
|
| 566 |
+
"type": "table",
|
| 567 |
+
"img_path": "images/76d804e043a22486f59930e265b388607a30a3937cd51ddd4c462758e3709dfc.jpg",
|
| 568 |
+
"table_caption": [
|
| 569 |
+
"Table 4: Domain adaptation experiments, with results on BOOKS. Adding an in-domain datastore to a Wikipedia-trained model improves results by 23 points, approaching in-domain training. "
|
| 570 |
+
],
|
| 571 |
+
"table_footnote": [],
|
| 572 |
+
"table_body": "<table><tr><td>Training Data</td><td>Datastore</td><td colspan=\"2\">Perplexity (↓)</td></tr><tr><td></td><td></td><td>Dev</td><td>Test</td></tr><tr><td>WIKI-3B</td><td></td><td>37.13</td><td>34.84</td></tr><tr><td>BOOKS</td><td>1</td><td>14.75</td><td>11.89</td></tr><tr><td>WIKI-3B</td><td>BOOKS</td><td>24.85</td><td>20.47</td></tr></table>",
|
| 573 |
+
"bbox": [
|
| 574 |
+
303,
|
| 575 |
+
101,
|
| 576 |
+
692,
|
| 577 |
+
198
|
| 578 |
+
],
|
| 579 |
+
"page_idx": 5
|
| 580 |
+
},
|
| 581 |
+
{
|
| 582 |
+
"type": "image",
|
| 583 |
+
"img_path": "images/4e2a71acb555dc8a9b49e68c8a79fd165aa0650f367dcd8f5486a68ee7592ce6.jpg",
|
| 584 |
+
"image_caption": [
|
| 585 |
+
"Figure 3: Transformer LM layer. "
|
| 586 |
+
],
|
| 587 |
+
"image_footnote": [],
|
| 588 |
+
"bbox": [
|
| 589 |
+
232,
|
| 590 |
+
253,
|
| 591 |
+
377,
|
| 592 |
+
416
|
| 593 |
+
],
|
| 594 |
+
"page_idx": 5
|
| 595 |
+
},
|
| 596 |
+
{
|
| 597 |
+
"type": "table",
|
| 598 |
+
"img_path": "images/5b32af15574c7115c2d972dd4374898fa1424df0781ce89a88c75d6d49a18b43.jpg",
|
| 599 |
+
"table_caption": [
|
| 600 |
+
"Table 5: WIKITEXT-103 validation results using different states from the final layer of the LM as the representation function $f ( \\cdot )$ for keys and queries. We retrieve $k { = } 1 0 2 4$ neighbors and $\\lambda$ is tuned for each. "
|
| 601 |
+
],
|
| 602 |
+
"table_footnote": [],
|
| 603 |
+
"table_body": "<table><tr><td>Key Type</td><td>Dev ppl. (↓)</td></tr><tr><td>No datastore</td><td>17.96</td></tr><tr><td>Model output</td><td>17.07</td></tr><tr><td>Model output layer normalized</td><td>17.01</td></tr><tr><td>FFN input after layer norm</td><td>16.06</td></tr><tr><td>FFN input before layer norm</td><td>17.06</td></tr><tr><td>MHSA input after layer norm</td><td>16.76</td></tr><tr><td>MHSA input before layer norm</td><td>17.14</td></tr></table>",
|
| 604 |
+
"bbox": [
|
| 605 |
+
493,
|
| 606 |
+
253,
|
| 607 |
+
795,
|
| 608 |
+
375
|
| 609 |
+
],
|
| 610 |
+
"page_idx": 5
|
| 611 |
+
},
|
| 612 |
+
{
|
| 613 |
+
"type": "text",
|
| 614 |
+
"text": "To understand how the amount of data used for $k \\mathbf { N N }$ retrieval affects performance, we use the WIKI$1 0 0 \\mathbf { M }$ model to create datastores using different amounts of randomly sampled data from WIKI-3B. Figure 2a shows that using only 1.6B examples for the datastore already surpasses the performance of the model trained on all of WIKI-3B. In addition, performance does not saturate at 3B examples in the datastore, suggesting that growing the datastore more could lead to further gains. Figure 2b shows the model relies more on the $k \\mathbf { N N }$ component as the size of the datastore increases. ",
|
| 615 |
+
"bbox": [
|
| 616 |
+
174,
|
| 617 |
+
469,
|
| 618 |
+
825,
|
| 619 |
+
554
|
| 620 |
+
],
|
| 621 |
+
"page_idx": 5
|
| 622 |
+
},
|
| 623 |
+
{
|
| 624 |
+
"type": "text",
|
| 625 |
+
"text": "4.3 DOMAIN ADAPTATION ",
|
| 626 |
+
"text_level": 1,
|
| 627 |
+
"bbox": [
|
| 628 |
+
176,
|
| 629 |
+
573,
|
| 630 |
+
370,
|
| 631 |
+
587
|
| 632 |
+
],
|
| 633 |
+
"page_idx": 5
|
| 634 |
+
},
|
| 635 |
+
{
|
| 636 |
+
"type": "text",
|
| 637 |
+
"text": "We also experiment with domain adaptation by creating a datastore on the target domain training set. Table 4 shows that an in-domain LM on BOOKS has a relatively low perplexity (11.89), while a model trained on WIKI-3B performs poorly on the BOOKS domain (34.84 perplexity). Adding $k \\mathbf { N N }$ search over BOOKS to the WIKI-3B model reduces perplexity by 14 points (to 20.47), demonstrating that kNN-LM allows a single model to be useful in multiple domains, by simply adding a datastore per domain. ",
|
| 638 |
+
"bbox": [
|
| 639 |
+
174,
|
| 640 |
+
599,
|
| 641 |
+
825,
|
| 642 |
+
683
|
| 643 |
+
],
|
| 644 |
+
"page_idx": 5
|
| 645 |
+
},
|
| 646 |
+
{
|
| 647 |
+
"type": "text",
|
| 648 |
+
"text": "5 TUNING NEAREST NEIGHBOR SEARCH ",
|
| 649 |
+
"text_level": 1,
|
| 650 |
+
"bbox": [
|
| 651 |
+
176,
|
| 652 |
+
705,
|
| 653 |
+
531,
|
| 654 |
+
722
|
| 655 |
+
],
|
| 656 |
+
"page_idx": 5
|
| 657 |
+
},
|
| 658 |
+
{
|
| 659 |
+
"type": "text",
|
| 660 |
+
"text": "While the $k \\mathrm { N N - L M }$ is conceptually straightforward, and requires no additional training, a number of hyperparameters are introduced for nearest neighbor search. We experiment with different choices here. ",
|
| 661 |
+
"bbox": [
|
| 662 |
+
174,
|
| 663 |
+
738,
|
| 664 |
+
825,
|
| 665 |
+
780
|
| 666 |
+
],
|
| 667 |
+
"page_idx": 5
|
| 668 |
+
},
|
| 669 |
+
{
|
| 670 |
+
"type": "text",
|
| 671 |
+
"text": "Key Function For similarity search, we extract a representation of context $c$ using an intermediate state of the LM $f ( c )$ . Transformers compute a number of different intermediate states, and we compare several choices depicted in Figure 3, with results shown in Table 5. While all the instantiations of $f$ we tried are helpful, we achieved the largest improvement by using the input to the final layer’s feedforward network. We also observe that normalized representations (i.e. taken immediately after the layer norm) perform better. Repeating the experiment on the second-last transformer layer showed similar trends with slightly worse results (not shown), suggesting that the feedforward layer might be focusing more on the prediction problem, while the onus of representing the input falls more on the self-attention layer. ",
|
| 672 |
+
"bbox": [
|
| 673 |
+
174,
|
| 674 |
+
797,
|
| 675 |
+
825,
|
| 676 |
+
924
|
| 677 |
+
],
|
| 678 |
+
"page_idx": 5
|
| 679 |
+
},
|
| 680 |
+
{
|
| 681 |
+
"type": "image",
|
| 682 |
+
"img_path": "images/78af2930cccd498bc4e52bbfc9fdce91a6102713c1c16f6b062b77c96104bbe7.jpg",
|
| 683 |
+
"image_caption": [
|
| 684 |
+
"Figure 4: Effect of the number of nearest neighbors returned per word on WIKITEXT-103 (validation set). Returning more entries from the datastore monotonically improves performance. "
|
| 685 |
+
],
|
| 686 |
+
"image_footnote": [],
|
| 687 |
+
"bbox": [
|
| 688 |
+
196,
|
| 689 |
+
117,
|
| 690 |
+
450,
|
| 691 |
+
248
|
| 692 |
+
],
|
| 693 |
+
"page_idx": 6
|
| 694 |
+
},
|
| 695 |
+
{
|
| 696 |
+
"type": "image",
|
| 697 |
+
"img_path": "images/df503153546c752bf498867938e90fc0346d853ad859c1e105b37184a43143dd.jpg",
|
| 698 |
+
"image_caption": [
|
| 699 |
+
"Figure 5: Effect of interpolation parameter $\\lambda$ on in-domain (left y-axis) and out-of-domain (right y-axis) validation set performances. More weight on $p _ { k N N }$ improves domain adaptation. "
|
| 700 |
+
],
|
| 701 |
+
"image_footnote": [],
|
| 702 |
+
"bbox": [
|
| 703 |
+
526,
|
| 704 |
+
106,
|
| 705 |
+
802,
|
| 706 |
+
244
|
| 707 |
+
],
|
| 708 |
+
"page_idx": 6
|
| 709 |
+
},
|
| 710 |
+
{
|
| 711 |
+
"type": "text",
|
| 712 |
+
"text": "Number of Neighbors per Query Each query returns the top- $k$ neighbors. Figure 4 shows that performance monotonically improves as more neighbors are returned, and suggests that even larger improvements may be possible with a higher value of $k$ . Nonetheless, even a small number of neighbors $k = 8$ ) is enough to achieve a new state of the art. ",
|
| 713 |
+
"bbox": [
|
| 714 |
+
174,
|
| 715 |
+
343,
|
| 716 |
+
825,
|
| 717 |
+
398
|
| 718 |
+
],
|
| 719 |
+
"page_idx": 6
|
| 720 |
+
},
|
| 721 |
+
{
|
| 722 |
+
"type": "text",
|
| 723 |
+
"text": "Interpolation Parameter We use a parameter $\\lambda$ to interpolate between the base model distribution and the distribution from $k \\mathbf { N N }$ search over the dataset. Figure 5 shows that $\\lambda = 0 . 2 5$ is optimal on WIKITEXT-103. However, $\\lambda = 0 . 6 5$ works best for domain adaptation results (Figure 5). ",
|
| 724 |
+
"bbox": [
|
| 725 |
+
174,
|
| 726 |
+
415,
|
| 727 |
+
821,
|
| 728 |
+
455
|
| 729 |
+
],
|
| 730 |
+
"page_idx": 6
|
| 731 |
+
},
|
| 732 |
+
{
|
| 733 |
+
"type": "text",
|
| 734 |
+
"text": "Precision of Similarity Function In FAISS, the nearest neighbor search computes $L ^ { 2 }$ distances against quantized keys. We found results were improved from 16.5 perplexity on WIKITEXT-103 to 16.06 by computing squared $L ^ { 2 }$ distances with full precision keys for Equation 2. ",
|
| 735 |
+
"bbox": [
|
| 736 |
+
174,
|
| 737 |
+
472,
|
| 738 |
+
825,
|
| 739 |
+
513
|
| 740 |
+
],
|
| 741 |
+
"page_idx": 6
|
| 742 |
+
},
|
| 743 |
+
{
|
| 744 |
+
"type": "text",
|
| 745 |
+
"text": "6 ANALYSIS ",
|
| 746 |
+
"text_level": 1,
|
| 747 |
+
"bbox": [
|
| 748 |
+
174,
|
| 749 |
+
534,
|
| 750 |
+
290,
|
| 751 |
+
550
|
| 752 |
+
],
|
| 753 |
+
"page_idx": 6
|
| 754 |
+
},
|
| 755 |
+
{
|
| 756 |
+
"type": "text",
|
| 757 |
+
"text": "Qualitative Analysis To understand why $k \\mathrm { N N - L M }$ improves performance, we manually examine cases in which $p _ { \\mathrm { k N N } }$ was significantly better than $p _ { \\mathrm { L M } }$ . Table 6 shows one such example, along with several others in Appendix A. The example shows an interesting case where the model matches the trigram impact on the in several retrieved neighbors, but puts almost all weight on the most relevant neighbor, thus adding more value than an $n$ -gram LM. ",
|
| 758 |
+
"bbox": [
|
| 759 |
+
174,
|
| 760 |
+
565,
|
| 761 |
+
825,
|
| 762 |
+
636
|
| 763 |
+
],
|
| 764 |
+
"page_idx": 6
|
| 765 |
+
},
|
| 766 |
+
{
|
| 767 |
+
"type": "text",
|
| 768 |
+
"text": "In general, we find that examples where $k \\mathrm { N N - L M }$ is most helpful typically contain rare patterns. Examples include factual knowledge, names, and near-duplicate sentences from the training set. In these cases, assigning train and test instances similar representations (via $f ( \\cdot ) \\mathrm { \\ddot { \\it { \\Delta } } }$ ) appears to be an easier problem than implicitly memorizing the next word in model parameters. ",
|
| 769 |
+
"bbox": [
|
| 770 |
+
174,
|
| 771 |
+
642,
|
| 772 |
+
823,
|
| 773 |
+
698
|
| 774 |
+
],
|
| 775 |
+
"page_idx": 6
|
| 776 |
+
},
|
| 777 |
+
{
|
| 778 |
+
"type": "text",
|
| 779 |
+
"text": "Simple vs Neural Representation We observe that many long-tail phenomena manifest as rare $n$ -grams (e.g. names). Is it therefore possible to interpolate an $n$ -gram model with a Transformer LM, as an alternative to our $k \\mathbf { N N }$ approach? Figure 7 shows little improvement from using $n$ -gram LMs – 0.2 perplexity points (similarly to Bakhtin et al. (2018)). This result highlights the need to use the learned representation function $f ( \\cdot )$ to measure similarity between more varied contexts. ",
|
| 780 |
+
"bbox": [
|
| 781 |
+
174,
|
| 782 |
+
713,
|
| 783 |
+
825,
|
| 784 |
+
784
|
| 785 |
+
],
|
| 786 |
+
"page_idx": 6
|
| 787 |
+
},
|
| 788 |
+
{
|
| 789 |
+
"type": "text",
|
| 790 |
+
"text": "Implicit vs Explicit Memory If a neural representation function is crucial for $k \\mathrm { N N - L M }$ , could implicitly memorizing the training dataset in the neural network parameters replace the explicit memory in the datastore? To test this, we train a Transformer LM with no dropout. Figure 8 shows that this model eventually reaches zero training loss, indicating that it can make perfect predictions for all examples in the training set; the model has memorized the dataset. Naturally, the memorizing LM overfits, i.e. the training loss drops to 0 while the best validation perplexity is much higher at 28.59. For comparison, the vanilla Transformer LM (with dropout) has a much higher training loss (shown in Figure 8), but also generalizes better with a validation perplexity of 17.96. This result shows that the Transformer has sufficient capacity to memorize the training set. ",
|
| 791 |
+
"bbox": [
|
| 792 |
+
174,
|
| 793 |
+
797,
|
| 794 |
+
825,
|
| 795 |
+
924
|
| 796 |
+
],
|
| 797 |
+
"page_idx": 6
|
| 798 |
+
},
|
| 799 |
+
{
|
| 800 |
+
"type": "table",
|
| 801 |
+
"img_path": "images/d92fb88a0a0ecd561e548d66ec7721d323d99123d099ee6fd665a8654ba4706c.jpg",
|
| 802 |
+
"table_caption": [],
|
| 803 |
+
"table_footnote": [],
|
| 804 |
+
"table_body": "<table><tr><td>Test Context (pkNN = 0.998,pLM = 0.124)</td><td>Test Target</td><td></td></tr><tr><td>it was organised by New Zealand international player Joseph Warbrick, promoted by civil servant Thomas Eyton, and managed by James Scott, a publican. The Nativeswere the first New Zealand team to perform a haka, and also the first to wear all black. They played 1O7 rugby matches during the tour,as well as a small number of Victorian Rules football and associ- ation football matches in Australia. Having made a significant impact on the...</td><td colspan=\"2\">development</td></tr><tr><td>Training Set Context</td><td>Training Set Target</td><td>Context Probability</td></tr><tr><td>Asthe captain and instigator of the 1888-89 Natives-the first New Zealand team to tour the British Isles-Warbrick had a lasting impact on the..</td><td>development</td><td>0.998</td></tr><tr><td>promoted to a new first grade competition which started in 19oo.Glebe immediately made a big impact on the...</td><td>district</td><td>0.00012</td></tr><tr><td>centuries,few were as large as other players managed. However, others contend that his impact on the...</td><td>game</td><td>0.000034</td></tr><tr><td>Nearly every game in the main series has either an anime or manga adap-developmentO.00000092 tation,or both.The series has had a significant impact on the..</td><td></td><td></td></tr></table>",
|
| 805 |
+
"bbox": [
|
| 806 |
+
173,
|
| 807 |
+
102,
|
| 808 |
+
826,
|
| 809 |
+
377
|
| 810 |
+
],
|
| 811 |
+
"page_idx": 7
|
| 812 |
+
},
|
| 813 |
+
{
|
| 814 |
+
"type": "image",
|
| 815 |
+
"img_path": "images/e409f2012ee6a97fe406da97168c23bcdd150e4b9d148736c84fca5d35d1c9ee.jpg",
|
| 816 |
+
"image_caption": [
|
| 817 |
+
"Figure 6: Example where the $k \\mathbf { N N }$ model has much higher confidence in the correct target than the LM. Although there are other training set examples with similar local $n$ -gram matches, the nearest neighbour search is highly confident of specific and very relevant context. "
|
| 818 |
+
],
|
| 819 |
+
"image_footnote": [],
|
| 820 |
+
"bbox": [
|
| 821 |
+
176,
|
| 822 |
+
492,
|
| 823 |
+
465,
|
| 824 |
+
637
|
| 825 |
+
],
|
| 826 |
+
"page_idx": 7
|
| 827 |
+
},
|
| 828 |
+
{
|
| 829 |
+
"type": "image",
|
| 830 |
+
"img_path": "images/7460c582b4378618807b73ab1303ca4b8dca4610624cbc1ac7be25f70d12e40e.jpg",
|
| 831 |
+
"image_caption": [
|
| 832 |
+
"Figure 7: Interpolating the Transformer LM with $n$ -gram LMs on WIKITEXT-103 (validation set). Using $k \\mathrm { N N - L M }$ gives a much lower perplexity, suggesting that the representations are learning more than just matching local context. ",
|
| 833 |
+
"Figure 8: Training curves for the Transformer LM with and without dropout. Turning off dropout allows the training loss to go to 0, indicating that the model has sufficient capacity to memorize the training data. "
|
| 834 |
+
],
|
| 835 |
+
"image_footnote": [],
|
| 836 |
+
"bbox": [
|
| 837 |
+
522,
|
| 838 |
+
494,
|
| 839 |
+
794,
|
| 840 |
+
640
|
| 841 |
+
],
|
| 842 |
+
"page_idx": 7
|
| 843 |
+
},
|
| 844 |
+
{
|
| 845 |
+
"type": "text",
|
| 846 |
+
"text": "We consider whether the memorizing LM can be an effective substitute for nearest neighbor search. Interpolating the memorizing LM with the original LM improves validation perplexity by just 0.1 – compared to 1.9 from $k \\mathrm { N N - L M }$ . This result suggests that although the Transformer is expressive enough to memorize all training examples, learning to do so does not result in context representations that generalize. In contrast, kNN-LM memorizes training data while improving generalization. ",
|
| 847 |
+
"bbox": [
|
| 848 |
+
173,
|
| 849 |
+
776,
|
| 850 |
+
823,
|
| 851 |
+
847
|
| 852 |
+
],
|
| 853 |
+
"page_idx": 7
|
| 854 |
+
},
|
| 855 |
+
{
|
| 856 |
+
"type": "text",
|
| 857 |
+
"text": "From these experiments, we conjecture that kNN-LM improves performance because (1) the Transformer LM is very good at learning a representation function for contexts with an implicit notion of similarity, and (2) while the Transformer has capacity to memorize all training examples, doing so causes its representation to generalize less effectively, but (3) the $k \\mathrm { N N - L M }$ allows the model to memorize the training data while retaining an effective similarity function. ",
|
| 858 |
+
"bbox": [
|
| 859 |
+
174,
|
| 860 |
+
853,
|
| 861 |
+
823,
|
| 862 |
+
924
|
| 863 |
+
],
|
| 864 |
+
"page_idx": 7
|
| 865 |
+
},
|
| 866 |
+
{
|
| 867 |
+
"type": "text",
|
| 868 |
+
"text": "7 RELATED WORK ",
|
| 869 |
+
"text_level": 1,
|
| 870 |
+
"bbox": [
|
| 871 |
+
176,
|
| 872 |
+
102,
|
| 873 |
+
344,
|
| 874 |
+
118
|
| 875 |
+
],
|
| 876 |
+
"page_idx": 8
|
| 877 |
+
},
|
| 878 |
+
{
|
| 879 |
+
"type": "text",
|
| 880 |
+
"text": "We discuss related uses of caches for language modeling in Section 2. ",
|
| 881 |
+
"bbox": [
|
| 882 |
+
176,
|
| 883 |
+
133,
|
| 884 |
+
629,
|
| 885 |
+
148
|
| 886 |
+
],
|
| 887 |
+
"page_idx": 8
|
| 888 |
+
},
|
| 889 |
+
{
|
| 890 |
+
"type": "text",
|
| 891 |
+
"text": "Similar $k \\mathbf { N N }$ models to ours have been proposed for computer vision tasks (Papernot & McDaniel, 2018; Orhan, 2018; Zhao & Cho, 2018), primarily motivated by improving interpretability and robustness to adversarial attacks. We hypothesize that our method may be particularly effective for language modeling, because plentiful unlabeled data allows datastores of billions of tokens, and language modeling often requires world knowledge to be learnt from few examples. ",
|
| 892 |
+
"bbox": [
|
| 893 |
+
174,
|
| 894 |
+
155,
|
| 895 |
+
825,
|
| 896 |
+
224
|
| 897 |
+
],
|
| 898 |
+
"page_idx": 8
|
| 899 |
+
},
|
| 900 |
+
{
|
| 901 |
+
"type": "text",
|
| 902 |
+
"text": "Nearest neighbor models have been applied to a number of NLP problems in the past, such as part of speech tagging (Daelemans et al., 1996) and morphological analysis (Bosch et al., 2007), but the use of learned representations makes the similarity function much more effective in the case of neural models. More recently, Kaiser et al. (2017) have used a similarly differentiable memory that is learned and updated during training, and is applied to one-shot learning tasks. ",
|
| 903 |
+
"bbox": [
|
| 904 |
+
174,
|
| 905 |
+
232,
|
| 906 |
+
825,
|
| 907 |
+
303
|
| 908 |
+
],
|
| 909 |
+
"page_idx": 8
|
| 910 |
+
},
|
| 911 |
+
{
|
| 912 |
+
"type": "text",
|
| 913 |
+
"text": "Several models have also improved language generation by using training examples directly at test time. Guu et al. (2018) propose a model that samples training sentences at random and edits them with a sequence-to-sequence model, but does not use a retrieval mechanism such as $k \\mathbf { N N }$ . Gu et al. (2018) introduce a translation model that attends over retrieved training set examples. Weston et al. (2018) improve a dialogue response generation model by refining similar instances from the training set. kNN-LM differs from these approaches by working at the level of individual tokens instead of whole training sentences, as well as not incorporating the retrieval mechanism into the training pipeline. ",
|
| 914 |
+
"bbox": [
|
| 915 |
+
174,
|
| 916 |
+
309,
|
| 917 |
+
825,
|
| 918 |
+
420
|
| 919 |
+
],
|
| 920 |
+
"page_idx": 8
|
| 921 |
+
},
|
| 922 |
+
{
|
| 923 |
+
"type": "text",
|
| 924 |
+
"text": "A general trend in machine learning, and in language modeling in particular, is that adding more data consistently improves performance (Devlin et al., 2019; Radford et al., 2019; Yang et al., 2019; Liu et al., 2019; Zellers et al., 2019; Shoeybi et al., 2019). Our work offers an alternative method for scaling language models, in which relatively small models learn context representations, and a nearest neighbour search acts as a highly expressive classifier. ",
|
| 925 |
+
"bbox": [
|
| 926 |
+
174,
|
| 927 |
+
428,
|
| 928 |
+
825,
|
| 929 |
+
497
|
| 930 |
+
],
|
| 931 |
+
"page_idx": 8
|
| 932 |
+
},
|
| 933 |
+
{
|
| 934 |
+
"type": "text",
|
| 935 |
+
"text": "8 CONCLUSION AND FUTURE WORK ",
|
| 936 |
+
"text_level": 1,
|
| 937 |
+
"bbox": [
|
| 938 |
+
174,
|
| 939 |
+
518,
|
| 940 |
+
495,
|
| 941 |
+
535
|
| 942 |
+
],
|
| 943 |
+
"page_idx": 8
|
| 944 |
+
},
|
| 945 |
+
{
|
| 946 |
+
"type": "text",
|
| 947 |
+
"text": "We have introduced kNN-LMs, which can significantly outperform standard language models by directly querying training examples at test time. The approach can be applied to any neural language model. The success of this method suggests that learning similarity functions between contexts may be an easier problem than predicting the next word from some given context. Future work should explore explicitly training similarity functions, and reducing the size of the datastore. ",
|
| 948 |
+
"bbox": [
|
| 949 |
+
174,
|
| 950 |
+
550,
|
| 951 |
+
825,
|
| 952 |
+
621
|
| 953 |
+
],
|
| 954 |
+
"page_idx": 8
|
| 955 |
+
},
|
| 956 |
+
{
|
| 957 |
+
"type": "text",
|
| 958 |
+
"text": "ACKNOWLEDGMENTS ",
|
| 959 |
+
"text_level": 1,
|
| 960 |
+
"bbox": [
|
| 961 |
+
176,
|
| 962 |
+
638,
|
| 963 |
+
326,
|
| 964 |
+
651
|
| 965 |
+
],
|
| 966 |
+
"page_idx": 8
|
| 967 |
+
},
|
| 968 |
+
{
|
| 969 |
+
"type": "text",
|
| 970 |
+
"text": "The authors thank the anonymous reviewers as well as Sida Wang, Kartikay Khandelwal, Kevin Clark and members of the FAIR Seattle team for helpful discussions and comments. ",
|
| 971 |
+
"bbox": [
|
| 972 |
+
174,
|
| 973 |
+
661,
|
| 974 |
+
823,
|
| 975 |
+
690
|
| 976 |
+
],
|
| 977 |
+
"page_idx": 8
|
| 978 |
+
},
|
| 979 |
+
{
|
| 980 |
+
"type": "text",
|
| 981 |
+
"text": "REFERENCES ",
|
| 982 |
+
"text_level": 1,
|
| 983 |
+
"bbox": [
|
| 984 |
+
176,
|
| 985 |
+
712,
|
| 986 |
+
285,
|
| 987 |
+
727
|
| 988 |
+
],
|
| 989 |
+
"page_idx": 8
|
| 990 |
+
},
|
| 991 |
+
{
|
| 992 |
+
"type": "text",
|
| 993 |
+
"text": "Alexei Baevski and Michael Auli. Adaptive input representations for neural language modeling. In ICLR, 2019. ",
|
| 994 |
+
"bbox": [
|
| 995 |
+
174,
|
| 996 |
+
736,
|
| 997 |
+
823,
|
| 998 |
+
763
|
| 999 |
+
],
|
| 1000 |
+
"page_idx": 8
|
| 1001 |
+
},
|
| 1002 |
+
{
|
| 1003 |
+
"type": "text",
|
| 1004 |
+
"text": "Anton Bakhtin, Arthur Szlam, Marc’Aurelio Ranzato, and Edouard Grave. Lightweight adaptive mixture of neural and n-gram language models. arXiv preprint arXiv:1804.07705, 2018. ",
|
| 1005 |
+
"bbox": [
|
| 1006 |
+
173,
|
| 1007 |
+
775,
|
| 1008 |
+
823,
|
| 1009 |
+
805
|
| 1010 |
+
],
|
| 1011 |
+
"page_idx": 8
|
| 1012 |
+
},
|
| 1013 |
+
{
|
| 1014 |
+
"type": "text",
|
| 1015 |
+
"text": "Yoshua Bengio, Rejean Ducharme, Pascal Vincent, and Christian Jauvin. A neural probabilistic ´ language model. Journal of machine learning research, 3(Feb):1137–1155, 2003. ",
|
| 1016 |
+
"bbox": [
|
| 1017 |
+
171,
|
| 1018 |
+
815,
|
| 1019 |
+
821,
|
| 1020 |
+
844
|
| 1021 |
+
],
|
| 1022 |
+
"page_idx": 8
|
| 1023 |
+
},
|
| 1024 |
+
{
|
| 1025 |
+
"type": "text",
|
| 1026 |
+
"text": "Antal van den Bosch, Bertjan Busser, Sander Canisius, and Walter Daelemans. An efficient memorybased morphosyntactic tagger and parser for dutch. LOT Occasional Series, 7:191–206, 2007. ",
|
| 1027 |
+
"bbox": [
|
| 1028 |
+
171,
|
| 1029 |
+
854,
|
| 1030 |
+
821,
|
| 1031 |
+
883
|
| 1032 |
+
],
|
| 1033 |
+
"page_idx": 8
|
| 1034 |
+
},
|
| 1035 |
+
{
|
| 1036 |
+
"type": "text",
|
| 1037 |
+
"text": "Walter Daelemans, Jakub Zavrel, Peter Berck, and Steven Gillis. Mbt: A memory-based part of speech tagger-generator. In WVLC, 1996. ",
|
| 1038 |
+
"bbox": [
|
| 1039 |
+
176,
|
| 1040 |
+
895,
|
| 1041 |
+
823,
|
| 1042 |
+
922
|
| 1043 |
+
],
|
| 1044 |
+
"page_idx": 8
|
| 1045 |
+
},
|
| 1046 |
+
{
|
| 1047 |
+
"type": "text",
|
| 1048 |
+
"text": "Zihang Dai, Zhilin Yang, Yiming Yang, William W Cohen, Jaime Carbonell, Quoc V Le, and Ruslan Salakhutdinov. Transformer-xl: Attentive language models beyond a fixed-length context. In ACL, 2019. ",
|
| 1049 |
+
"bbox": [
|
| 1050 |
+
173,
|
| 1051 |
+
103,
|
| 1052 |
+
823,
|
| 1053 |
+
146
|
| 1054 |
+
],
|
| 1055 |
+
"page_idx": 9
|
| 1056 |
+
},
|
| 1057 |
+
{
|
| 1058 |
+
"type": "text",
|
| 1059 |
+
"text": "Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In NAACL, 2019. ",
|
| 1060 |
+
"bbox": [
|
| 1061 |
+
171,
|
| 1062 |
+
155,
|
| 1063 |
+
823,
|
| 1064 |
+
184
|
| 1065 |
+
],
|
| 1066 |
+
"page_idx": 9
|
| 1067 |
+
},
|
| 1068 |
+
{
|
| 1069 |
+
"type": "text",
|
| 1070 |
+
"text": "Edouard Grave, Moustapha M Cisse, and Armand Joulin. Unbounded cache model for online language modeling with open vocabulary. In NIPS, pp. 6042–6052, 2017a. ",
|
| 1071 |
+
"bbox": [
|
| 1072 |
+
171,
|
| 1073 |
+
193,
|
| 1074 |
+
823,
|
| 1075 |
+
222
|
| 1076 |
+
],
|
| 1077 |
+
"page_idx": 9
|
| 1078 |
+
},
|
| 1079 |
+
{
|
| 1080 |
+
"type": "text",
|
| 1081 |
+
"text": "Edouard Grave, Armand Joulin, Moustapha Cisse, Herv ´ e J ´ egou, et al. Efficient softmax approxima- ´ tion for gpus. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 1302–1310. JMLR. org, 2017b. ",
|
| 1082 |
+
"bbox": [
|
| 1083 |
+
174,
|
| 1084 |
+
231,
|
| 1085 |
+
823,
|
| 1086 |
+
273
|
| 1087 |
+
],
|
| 1088 |
+
"page_idx": 9
|
| 1089 |
+
},
|
| 1090 |
+
{
|
| 1091 |
+
"type": "text",
|
| 1092 |
+
"text": "Edouard Grave, Armand Joulin, and Nicolas Usunier. Improving neural language models with a continuous cache. In ICLR, 2017c. ",
|
| 1093 |
+
"bbox": [
|
| 1094 |
+
171,
|
| 1095 |
+
282,
|
| 1096 |
+
821,
|
| 1097 |
+
313
|
| 1098 |
+
],
|
| 1099 |
+
"page_idx": 9
|
| 1100 |
+
},
|
| 1101 |
+
{
|
| 1102 |
+
"type": "text",
|
| 1103 |
+
"text": "Jiatao Gu, Yong Wang, Kyunghyun Cho, and Victor OK Li. Search engine guided neural machine translation. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. ",
|
| 1104 |
+
"bbox": [
|
| 1105 |
+
173,
|
| 1106 |
+
320,
|
| 1107 |
+
821,
|
| 1108 |
+
351
|
| 1109 |
+
],
|
| 1110 |
+
"page_idx": 9
|
| 1111 |
+
},
|
| 1112 |
+
{
|
| 1113 |
+
"type": "text",
|
| 1114 |
+
"text": "Kelvin Guu, Tatsunori B Hashimoto, Yonatan Oren, and Percy Liang. Generating sentences by editing prototypes. Transactions of the Association for Computational Linguistics, 6:437–450, 2018. ",
|
| 1115 |
+
"bbox": [
|
| 1116 |
+
173,
|
| 1117 |
+
358,
|
| 1118 |
+
825,
|
| 1119 |
+
401
|
| 1120 |
+
],
|
| 1121 |
+
"page_idx": 9
|
| 1122 |
+
},
|
| 1123 |
+
{
|
| 1124 |
+
"type": "text",
|
| 1125 |
+
"text": "Jeff Johnson, Matthijs Douze, and Herve J ´ egou. Billion-scale similarity search with gpus. ´ arXiv preprint arXiv:1702.08734, 2017. ",
|
| 1126 |
+
"bbox": [
|
| 1127 |
+
173,
|
| 1128 |
+
410,
|
| 1129 |
+
823,
|
| 1130 |
+
440
|
| 1131 |
+
],
|
| 1132 |
+
"page_idx": 9
|
| 1133 |
+
},
|
| 1134 |
+
{
|
| 1135 |
+
"type": "text",
|
| 1136 |
+
"text": "Łukasz Kaiser, Ofir Nachum, Aurko Roy, and Samy Bengio. Learning to remember rare events. In ICLR, 2017. ",
|
| 1137 |
+
"bbox": [
|
| 1138 |
+
173,
|
| 1139 |
+
449,
|
| 1140 |
+
823,
|
| 1141 |
+
478
|
| 1142 |
+
],
|
| 1143 |
+
"page_idx": 9
|
| 1144 |
+
},
|
| 1145 |
+
{
|
| 1146 |
+
"type": "text",
|
| 1147 |
+
"text": "Ben Krause, Emmanuel Kahembwe, Iain Murray, and Steve Renals. Dynamic evaluation of transformer language models. arXiv preprint arXiv:1904.08378, 2019. ",
|
| 1148 |
+
"bbox": [
|
| 1149 |
+
173,
|
| 1150 |
+
486,
|
| 1151 |
+
823,
|
| 1152 |
+
517
|
| 1153 |
+
],
|
| 1154 |
+
"page_idx": 9
|
| 1155 |
+
},
|
| 1156 |
+
{
|
| 1157 |
+
"type": "text",
|
| 1158 |
+
"text": "Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692, 2019. ",
|
| 1159 |
+
"bbox": [
|
| 1160 |
+
176,
|
| 1161 |
+
525,
|
| 1162 |
+
823,
|
| 1163 |
+
568
|
| 1164 |
+
],
|
| 1165 |
+
"page_idx": 9
|
| 1166 |
+
},
|
| 1167 |
+
{
|
| 1168 |
+
"type": "text",
|
| 1169 |
+
"text": "Hongyin Luo, Lan Jiang, Yonatan Belinkov, and James Glass. Improving neural language models by segmenting, attending, and predicting the future. In ACL, 2019. ",
|
| 1170 |
+
"bbox": [
|
| 1171 |
+
169,
|
| 1172 |
+
577,
|
| 1173 |
+
823,
|
| 1174 |
+
607
|
| 1175 |
+
],
|
| 1176 |
+
"page_idx": 9
|
| 1177 |
+
},
|
| 1178 |
+
{
|
| 1179 |
+
"type": "text",
|
| 1180 |
+
"text": "Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. ICLR, 2017. ",
|
| 1181 |
+
"bbox": [
|
| 1182 |
+
173,
|
| 1183 |
+
614,
|
| 1184 |
+
823,
|
| 1185 |
+
645
|
| 1186 |
+
],
|
| 1187 |
+
"page_idx": 9
|
| 1188 |
+
},
|
| 1189 |
+
{
|
| 1190 |
+
"type": "text",
|
| 1191 |
+
"text": "Toma´s Mikolov, Martin Karafi ˇ at, Luk ´ a´s Burget, Jan ˇ Cernock ˇ y, and Sanjeev Khudanpur. Recurrent \\` neural network based language model. In Eleventh annual conference of the international speech communication association, 2010. ",
|
| 1192 |
+
"bbox": [
|
| 1193 |
+
173,
|
| 1194 |
+
651,
|
| 1195 |
+
823,
|
| 1196 |
+
695
|
| 1197 |
+
],
|
| 1198 |
+
"page_idx": 9
|
| 1199 |
+
},
|
| 1200 |
+
{
|
| 1201 |
+
"type": "text",
|
| 1202 |
+
"text": "A. Emin Orhan. A simple cache model for image recognition. In NeurIPS, 2018. ",
|
| 1203 |
+
"bbox": [
|
| 1204 |
+
173,
|
| 1205 |
+
704,
|
| 1206 |
+
707,
|
| 1207 |
+
720
|
| 1208 |
+
],
|
| 1209 |
+
"page_idx": 9
|
| 1210 |
+
},
|
| 1211 |
+
{
|
| 1212 |
+
"type": "text",
|
| 1213 |
+
"text": "Nicolas Papernot and Patrick McDaniel. Deep k-nearest neighbors: Towards confident, interpretable and robust deep learning. arXiv preprint arXiv:1803.04765, 2018. ",
|
| 1214 |
+
"bbox": [
|
| 1215 |
+
171,
|
| 1216 |
+
729,
|
| 1217 |
+
823,
|
| 1218 |
+
758
|
| 1219 |
+
],
|
| 1220 |
+
"page_idx": 9
|
| 1221 |
+
},
|
| 1222 |
+
{
|
| 1223 |
+
"type": "text",
|
| 1224 |
+
"text": "Ofir Press and Lior Wolf. Using the output embedding to improve language models. In ICLR, 2017. ",
|
| 1225 |
+
"bbox": [
|
| 1226 |
+
171,
|
| 1227 |
+
767,
|
| 1228 |
+
823,
|
| 1229 |
+
784
|
| 1230 |
+
],
|
| 1231 |
+
"page_idx": 9
|
| 1232 |
+
},
|
| 1233 |
+
{
|
| 1234 |
+
"type": "text",
|
| 1235 |
+
"text": "Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. URL https://d4mucfpksywv.cloudfront.net/betterlanguage-models/language-models.pdf, 2019. ",
|
| 1236 |
+
"bbox": [
|
| 1237 |
+
174,
|
| 1238 |
+
791,
|
| 1239 |
+
821,
|
| 1240 |
+
835
|
| 1241 |
+
],
|
| 1242 |
+
"page_idx": 9
|
| 1243 |
+
},
|
| 1244 |
+
{
|
| 1245 |
+
"type": "text",
|
| 1246 |
+
"text": "Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. arXiv preprint arXiv:1508.07909, 2015. ",
|
| 1247 |
+
"bbox": [
|
| 1248 |
+
169,
|
| 1249 |
+
843,
|
| 1250 |
+
823,
|
| 1251 |
+
872
|
| 1252 |
+
],
|
| 1253 |
+
"page_idx": 9
|
| 1254 |
+
},
|
| 1255 |
+
{
|
| 1256 |
+
"type": "text",
|
| 1257 |
+
"text": "Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper, and Bryan Catanzaro. Megatron-lm: Training multi-billion parameter language models using gpu model parallelism. arXiv preprint arXiv:1909.08053, 2019. ",
|
| 1258 |
+
"bbox": [
|
| 1259 |
+
174,
|
| 1260 |
+
882,
|
| 1261 |
+
825,
|
| 1262 |
+
924
|
| 1263 |
+
],
|
| 1264 |
+
"page_idx": 9
|
| 1265 |
+
},
|
| 1266 |
+
{
|
| 1267 |
+
"type": "text",
|
| 1268 |
+
"text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017. ",
|
| 1269 |
+
"bbox": [
|
| 1270 |
+
176,
|
| 1271 |
+
103,
|
| 1272 |
+
823,
|
| 1273 |
+
146
|
| 1274 |
+
],
|
| 1275 |
+
"page_idx": 10
|
| 1276 |
+
},
|
| 1277 |
+
{
|
| 1278 |
+
"type": "text",
|
| 1279 |
+
"text": "Jason Weston, Emily Dinan, and Alexander H Miller. Retrieve and refine: Improved sequence generation models for dialogue. arXiv preprint arXiv:1808.04776, 2018. ",
|
| 1280 |
+
"bbox": [
|
| 1281 |
+
171,
|
| 1282 |
+
155,
|
| 1283 |
+
823,
|
| 1284 |
+
184
|
| 1285 |
+
],
|
| 1286 |
+
"page_idx": 10
|
| 1287 |
+
},
|
| 1288 |
+
{
|
| 1289 |
+
"type": "text",
|
| 1290 |
+
"text": "Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, and Quoc V Le. Xlnet: Generalized autoregressive pretraining for language understanding. arXiv preprint arXiv:1906.08237, 2019. ",
|
| 1291 |
+
"bbox": [
|
| 1292 |
+
176,
|
| 1293 |
+
193,
|
| 1294 |
+
823,
|
| 1295 |
+
234
|
| 1296 |
+
],
|
| 1297 |
+
"page_idx": 10
|
| 1298 |
+
},
|
| 1299 |
+
{
|
| 1300 |
+
"type": "text",
|
| 1301 |
+
"text": "Rowan Zellers, Ari Holtzman, Hannah Rashkin, Ali Farhadi, Franziska Roesner, and Yejin Choi. Defending against neural fake news. In NeurIPS, 2019. ",
|
| 1302 |
+
"bbox": [
|
| 1303 |
+
169,
|
| 1304 |
+
244,
|
| 1305 |
+
823,
|
| 1306 |
+
272
|
| 1307 |
+
],
|
| 1308 |
+
"page_idx": 10
|
| 1309 |
+
},
|
| 1310 |
+
{
|
| 1311 |
+
"type": "text",
|
| 1312 |
+
"text": "Jake Zhao and Kyunghyun Cho. Retrieval-augmented convolutional neural networks for improved robustness against adversarial examples. arXiv preprint arXiv:1802.09502, 2018. ",
|
| 1313 |
+
"bbox": [
|
| 1314 |
+
174,
|
| 1315 |
+
281,
|
| 1316 |
+
821,
|
| 1317 |
+
310
|
| 1318 |
+
],
|
| 1319 |
+
"page_idx": 10
|
| 1320 |
+
},
|
| 1321 |
+
{
|
| 1322 |
+
"type": "text",
|
| 1323 |
+
"text": "Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In Proceedings of the IEEE international conference on computer vision, pp. 19–27, 2015. ",
|
| 1324 |
+
"bbox": [
|
| 1325 |
+
176,
|
| 1326 |
+
319,
|
| 1327 |
+
825,
|
| 1328 |
+
376
|
| 1329 |
+
],
|
| 1330 |
+
"page_idx": 10
|
| 1331 |
+
},
|
| 1332 |
+
{
|
| 1333 |
+
"type": "text",
|
| 1334 |
+
"text": "A APPENDIX ",
|
| 1335 |
+
"text_level": 1,
|
| 1336 |
+
"bbox": [
|
| 1337 |
+
176,
|
| 1338 |
+
102,
|
| 1339 |
+
299,
|
| 1340 |
+
117
|
| 1341 |
+
],
|
| 1342 |
+
"page_idx": 11
|
| 1343 |
+
},
|
| 1344 |
+
{
|
| 1345 |
+
"type": "text",
|
| 1346 |
+
"text": "This section provides several examples where $p _ { \\mathrm { k N N } }$ places higher probability mass on the true target, compared to $p _ { \\mathrm { L M } }$ . ",
|
| 1347 |
+
"bbox": [
|
| 1348 |
+
176,
|
| 1349 |
+
133,
|
| 1350 |
+
823,
|
| 1351 |
+
162
|
| 1352 |
+
],
|
| 1353 |
+
"page_idx": 11
|
| 1354 |
+
},
|
| 1355 |
+
{
|
| 1356 |
+
"type": "table",
|
| 1357 |
+
"img_path": "images/9e65d899acf2e7e04c3d5b2f4f58fbf1bf87aacbf357e97f9280da71c398c33d.jpg",
|
| 1358 |
+
"table_caption": [
|
| 1359 |
+
"Table 6: Another example where the $k \\mathbf { N N }$ model places much higher probability mass on the correct target, compared to the LM. The nearest neighbors search has retrieved a training set context that is extremely similar to the test context, while very rare and in the long-tail of patterns. "
|
| 1360 |
+
],
|
| 1361 |
+
"table_footnote": [],
|
| 1362 |
+
"table_body": "<table><tr><td>Test Context(pkNN = O.995,pLM = 0.025)</td><td colspan=\"2\">Test Target</td></tr><tr><td>For Australians and New Zealanders the Gallipoli campaign came to sym- bolise an important milestone in the emergence of both nations as indepen- dent actors on the world stage and the development of a sense of national identity. Today,the date of the initial landings,25April,is knownasAn- zac Day in Australia and New Zealand and every year thousands of people gather at memorials in both nations, as well as Turkey, to...</td><td colspan=\"2\">honour</td></tr><tr><td>Training Set Context Despite this,for Australians and New Zealanders the Gallipoli campaign</td><td>Training Set Target honour</td><td>Context Probability 0.995</td></tr><tr><td>has come to symbolise an important milestone in the emergence of both nations as independent actors on the world stage and the development of a senseof national identity. Today,the dateof the initial landings,25April, is a public holiday known as Anzac Day in Australia and New Zealand and every year thousands of people gather at memorials in both nations,and indeed in Turkey,to..</td><td></td><td></td></tr><tr><td>On the anniversary date of his death,every year since 1997,thousands of people gather at his home in Memphis to...</td><td>celebrate</td><td>0.0086</td></tr><tr><td>Twenty-five years after Marseille's death,fighter pilot veterans of World War II gathered to...</td><td>honour</td><td>0.0000041</td></tr></table>",
|
| 1363 |
+
"bbox": [
|
| 1364 |
+
173,
|
| 1365 |
+
175,
|
| 1366 |
+
825,
|
| 1367 |
+
476
|
| 1368 |
+
],
|
| 1369 |
+
"page_idx": 11
|
| 1370 |
+
},
|
| 1371 |
+
{
|
| 1372 |
+
"type": "table",
|
| 1373 |
+
"img_path": "images/0de5b49b4f497f544c2ea11a57d5df878960faab41cb57723fd0f4ac03fbaf4d.jpg",
|
| 1374 |
+
"table_caption": [],
|
| 1375 |
+
"table_footnote": [],
|
| 1376 |
+
"table_body": "<table><tr><td>Test Context (pkNN = O.959,pLm = 0.503)</td><td colspan=\"2\">Test Target</td></tr><tr><td>U2 do what they're best at,slipping into epic rock mode,playing music made for the arena".In two other local newspaper reviews,critics praised the song's inclusion in a sequence of greatest hits.For the PopMart Tour of 1997-...</td><td colspan=\"2\">1998</td></tr><tr><td>Training Set Context</td><td>Training Set Target</td><td>Context Probability</td></tr><tr><td>Following their original intent,"Sunday Bloody Sunday”was not played during any of the forty-seven shows on the Lovetown Tour in 1989. The song reappeared for a brief period during the Zoo TV Tour, and late during thesecond halfofPopMartTour(1997-..</td><td>1998</td><td>0.936</td></tr><tr><td>They are 6 times Champions and they won the Challenge Cup in 1938,and have experienced two previous stretchesin the SuperLeague,l997-..</td><td>2002</td><td>0.0071</td></tr><tr><td>About $40 million ($61.4 million in 2018 dollars) was spent on the property acquisition. After weather-related construction delays due to the El Nino season of the winter of 1997-...</td><td>1998</td><td>0.0015</td></tr><tr><td>This madeit the highest-rated seasonof The X-Files to air aswell as the highest rated Fox program for the 1997.-.</td><td>98</td><td>0.00000048</td></tr></table>",
|
| 1377 |
+
"bbox": [
|
| 1378 |
+
173,
|
| 1379 |
+
551,
|
| 1380 |
+
826,
|
| 1381 |
+
828
|
| 1382 |
+
],
|
| 1383 |
+
"page_idx": 11
|
| 1384 |
+
},
|
| 1385 |
+
{
|
| 1386 |
+
"type": "text",
|
| 1387 |
+
"text": "Table 7: In this example, the desired date pattern appears in many examples. Yet, the nearest neighbors search is able to identify the only training set context which is relevant to the test context and assigns it the highest probability mass. ",
|
| 1388 |
+
"bbox": [
|
| 1389 |
+
174,
|
| 1390 |
+
839,
|
| 1391 |
+
823,
|
| 1392 |
+
882
|
| 1393 |
+
],
|
| 1394 |
+
"page_idx": 11
|
| 1395 |
+
},
|
| 1396 |
+
{
|
| 1397 |
+
"type": "table",
|
| 1398 |
+
"img_path": "images/165f2b7b3f6b1a18669178f7bf9db2099a8aefb3a088c9c6b220caef3714b13a.jpg",
|
| 1399 |
+
"table_caption": [
|
| 1400 |
+
"Table 8: In this case, the model is able to memorize the fact that Georges Bizet wrote Carmen. "
|
| 1401 |
+
],
|
| 1402 |
+
"table_footnote": [],
|
| 1403 |
+
"table_body": "<table><tr><td>Test Context( (PkNN = 0.624,PLM = 0.167)</td><td colspan=\"2\">Test Target</td></tr><tr><td>Lord Strathcona awarded Gauthier a scholarship in19O6 that allowed her toreturn to Europe and continue her vocal studies.Shereturned there and continued both to study and give performances.Her first operatic perfor- mance came in19o9 in Pavia,Italy asMicaela in Bizet's..</td><td>Carmen</td><td></td></tr><tr><td>Training Set Context</td><td>Training Set Target</td><td>Context Probability</td></tr><tr><td>Despite poor relations with the orchestra,Mahler brought five new operas to the theatre,including Bizet,'s...</td><td>Carmen</td><td>0.356</td></tr><tr><td>The fourth movement of An die Jugend (19o9), for instance, uses two of Niccolo Paganini's Caprices for solo violin (numbers1l and15),while the 1920 piece Piano Sonatina No. 6 (Fantasia da camera super Carmen) is based on themes from Georges Bizet’'s...</td><td>opera</td><td>0.0937</td></tr><tr><td>It also hosted the Balletof her Majesty's Theatre in themid-19th century, before returning to hosting the London premieres of such operas as Bizet's..</td><td>Carmen</td><td>0.0686</td></tr></table>",
|
| 1404 |
+
"bbox": [
|
| 1405 |
+
173,
|
| 1406 |
+
145,
|
| 1407 |
+
826,
|
| 1408 |
+
383
|
| 1409 |
+
],
|
| 1410 |
+
"page_idx": 12
|
| 1411 |
+
},
|
| 1412 |
+
{
|
| 1413 |
+
"type": "table",
|
| 1414 |
+
"img_path": "images/c76e10118270be03fa4ee6e84f9d7c3d27e615214e49cf7ceb0b096812e4b59d.jpg",
|
| 1415 |
+
"table_caption": [],
|
| 1416 |
+
"table_footnote": [],
|
| 1417 |
+
"table_body": "<table><tr><td>Test Context (pkNN = 0.031,pLM = 0.007)</td><td>Test Target</td><td></td></tr><tr><td>Mycena maculata bears some resemblance to M.<unk>,but is only as- sociatedwith decaying hardwood logsand stumps,and is foundin eastern North America,and sometimes on oak on the West Coast.In age,it...</td><td>develops</td><td></td></tr><tr><td>Training Set Context</td><td>Training Set Target</td><td>Context Probability</td></tr><tr><td>Morchella tridentina(=Morchella frustrata)is also rufescent and very sim- ilar to M. rufobrunnea. It is found in mountainous forests and maquis and forms a marked sinusat the attachment of the cap with the stem,which is pure white. At maturity, it..</td><td>develops</td><td>0.031</td></tr><tr><td>The winter bonnet(M.tintinnabulum) is a northern European species that is much smaller(cap diameter up to 2.6 cm(1.O in) across)and has a brown cap,and has ragged hairs at the base. It...</td><td>generally</td><td>0.029</td></tr><tr><td>The "bleeding”will distinguish Mycena atkinsoniana from most other Mycena species commonly encountered. The common and widely dis- tributedM.sanguinolentaisanother"bleeder",but it issmallerthanM. atkinsonia,with a cap diameter ranging from 3 to 15 mm (0.1 to 0.6 in). Additionally,it...</td><td>has</td><td>0.028</td></tr><tr><td>Mycena flavoalba bears resemblance to some members of the genus Hemimycena,such as H. lactea and H.<unk>. It...</td><td>can</td><td>0.018</td></tr></table>",
|
| 1418 |
+
"bbox": [
|
| 1419 |
+
174,
|
| 1420 |
+
505,
|
| 1421 |
+
826,
|
| 1422 |
+
809
|
| 1423 |
+
],
|
| 1424 |
+
"page_idx": 12
|
| 1425 |
+
},
|
| 1426 |
+
{
|
| 1427 |
+
"type": "text",
|
| 1428 |
+
"text": "Table 9: This is an example where the $p _ { \\mathrm { k N N } }$ distribution is relatively flat, as several words are plausible continuations. However, the nearest neighbors search assigns the highest probability to the correct target and a corresponding context that is particularly relevant. In contrast, the LM probability on the correct target is lower. ",
|
| 1429 |
+
"bbox": [
|
| 1430 |
+
173,
|
| 1431 |
+
819,
|
| 1432 |
+
825,
|
| 1433 |
+
876
|
| 1434 |
+
],
|
| 1435 |
+
"page_idx": 12
|
| 1436 |
+
}
|
| 1437 |
+
]
|
parse/train/HklBjCEKvH/HklBjCEKvH_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/HklBjCEKvH/HklBjCEKvH_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/Kloou2uk_Rz/Kloou2uk_Rz.md
ADDED
|
@@ -0,0 +1,473 @@
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# A Large Batch Optimizer Reality Check: Traditional, Generic Optimizers Suffice Across Batch Sizes
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
1 Recently the LARS and LAMB optimizers have been proposed for training neural
|
| 11 |
+
2 networks faster using large batch sizes. LARS and LAMB add layer-wise normal
|
| 12 |
+
3 ization to the update rules of Heavy-ball momentum and Adam, respectively, and
|
| 13 |
+
4 have become popular in prominent benchmarks and deep learning libraries. How
|
| 14 |
+
5 ever, without fair comparisons to standard optimizers, it remains an open question
|
| 15 |
+
6 whether LARS and LAMB have any benefit over traditional, generic algorithms. In
|
| 16 |
+
7 this work we demonstrate that standard optimization algorithms such as Nesterov
|
| 17 |
+
8 momentum and Adam can match or exceed the results of LARS and LAMB at large
|
| 18 |
+
9 batch sizes. Our results establish new, stronger baselines for future comparisons
|
| 19 |
+
10 at these batch sizes and shed light on the difficulties of comparing optimizers for
|
| 20 |
+
11 neural network training more generally.
|
| 21 |
+
|
| 22 |
+
# 12 1 Introduction
|
| 23 |
+
|
| 24 |
+
13 In recent years, hardware systems employing GPUs and TPUs have enabled neural network training
|
| 25 |
+
14 programs to process dramatically more data in parallel than ever before. The most popular way to
|
| 26 |
+
15 exploit these systems is to increase the batch size in the optimization algorithm (i.e. the number
|
| 27 |
+
16 of training examples processed per training step). On many workloads, modern systems can scale
|
| 28 |
+
17 to larger batch sizes without significantly increasing the time per step [Jouppi et al., 2017, Wang
|
| 29 |
+
18 et al., 2019], thus proportionally increasing the number of training examples processed per second.
|
| 30 |
+
19 If researchers can use this increased throughput to reduce the time required to train each neural
|
| 31 |
+
20 network, then they should achieve better results by training larger models, using larger datasets, and
|
| 32 |
+
21 by exploring new ideas more rapidly.
|
| 33 |
+
22 As the capacity for data parallelism continues to increase, practitioners can take their existing,
|
| 34 |
+
23 well-tuned training configurations and re-train with larger batch sizes, hoping to achieve the same
|
| 35 |
+
24 performance in less training time [e.g. Ying et al., 2018]. On an idealized data-parallel system with
|
| 36 |
+
25 negligible overhead from increasing the batch size, they might hope to achieve perfect scaling, a
|
| 37 |
+
26 proportional reduction in training time as the batch size increases.
|
| 38 |
+
|
| 39 |
+
However, achieving perfect scaling is not always straightforward. Changing the batch size changes the training dynamics, requiring the training hyperparameters (e.g. learning rate) to be carefully re-tuned in order to maintain the same level of validation performance.1 In addition, smaller batch sizes provide implicit regularization from gradient noise that may need to be replaced by other forms of regularization when the batch size is increased. Finally, even with perfect tuning, increasing
|
| 40 |
+
|
| 41 |
+
32 the batch size eventually produces diminishing returns. After a critical batch size, the number of
|
| 42 |
+
33 training steps cannot be decreased in proportion to the batch size – the number of epochs must
|
| 43 |
+
34 increase to match the validation performance of the smaller batch size. See Shallue et al. 2019 for a
|
| 44 |
+
35 survey of the effects of data parallelism on neural network training. Once these effects are taken into
|
| 45 |
+
36 account, there is no strong evidence that increasing the batch size degrades the maximum achievable
|
| 46 |
+
37 performance on any workload. At the same time, the ever-increasing capacity for data parallelism
|
| 47 |
+
38 presents opportunities for new regularization techniques that can replace the gradient noise of smaller
|
| 48 |
+
39 batch sizes and new optimization algorithms that can extend perfect scaling to larger batch sizes by
|
| 49 |
+
40 using more sophisticated gradient information [Zhang et al., 2019].
|
| 50 |
+
41 You et al. [2017] proposed the LARS optimization algorithm in the hope of speeding up neural
|
| 51 |
+
42 network training by exploiting larger batch sizes. LARS is a variant of stochastic gradient descent
|
| 52 |
+
43 (SGD) with momentum [Polyak, 1964] that applies layer-wise normalization before applying each
|
| 53 |
+
44 gradient update. Although it is difficult to draw strong conclusions from the results presented in the
|
| 54 |
+
45 LARS paper, 2 the MLPerf3 Training benchmark4 adopted LARS as one of two allowed algorithms
|
| 55 |
+
46 in the closed division for ResNet-50 on ImageNet and it became the de facto standard algorithm for
|
| 56 |
+
47 that benchmark task. With MLPerf entrants competing to find the fastest-training hyperparameters
|
| 57 |
+
48 for LARS, the first place submissions in the two most recent MLPerf Training competitions used
|
| 58 |
+
49 LARS to achieve record training speeds with batch sizes of 32,678 and 65,536, respectively. No
|
| 59 |
+
50 publications or competitive submissions to MLPerf have attempted to match these results with a
|
| 60 |
+
51 standard optimizer (e.g. Momentum or Adam). However, MLPerf entrants do not have a strong
|
| 61 |
+
52 incentive (nor are necessarily permitted by the rules) to explore other algorithms because MLPerf
|
| 62 |
+
53 Training is a systems benchmark that requires algorithmic equivalence between submissions to make
|
| 63 |
+
54 fair comparisons. Moreover, since the main justification for LARS is its excellent performance on
|
| 64 |
+
55 ResNet-50 at large batch sizes, more work is needed to quantify any benefit of LARS over standard
|
| 65 |
+
56 algorithms at any batch size.
|
| 66 |
+
57 You et al. [2019] later proposed the LAMB optimizer to speed up pre-training for BERT [Devlin
|
| 67 |
+
58 et al., 2018] using larger batch sizes after concluding that LARS was not effective across workloads.
|
| 68 |
+
59 LAMB is a variant of Adam [Kingma and Ba, 2014] that adds a similar layer-wise normalization step
|
| 69 |
+
60 to LARS. You et al. [2019] used LAMB for BERT pre-training with batch sizes up to 65,536 and
|
| 70 |
+
61 claimed that Adam cannot match the performance of LAMB beyond batch size 16,384.
|
| 71 |
+
62 In this paper, we demonstrate that standard optimizers, without any layer-wise normalization tech
|
| 72 |
+
63 niques, can match or improve upon the large batch size results used to justify LARS and LAMB. In
|
| 73 |
+
64 Section 2, we show that Nesterov momentum [Nesterov, 1983] matches the performance of LARS on
|
| 74 |
+
65 the ResNet-50 benchmark with batch size 32,768. We are the first to match this result with a standard
|
| 75 |
+
66 optimizer. In Section 3, contradicting the claims in You et al. [2019], we show that Adam obtains
|
| 76 |
+
67 better BERT pre-training results than LAMB at the largest batch sizes, resulting in better downstream
|
| 77 |
+
68 performance metrics after fine-tuning.
|
| 78 |
+
69 In addition, we establish a new state-of-the-art for BERT pretraining speed, reaching an F1 score of
|
| 79 |
+
70 90.46 in 7,818 steps using Adam at batch size 65,536 (we report training speed in steps because our
|
| 80 |
+
71 focus is algorithmic efficiency, but since we compare LARS and LAMB to simpler optimizers, fewer
|
| 81 |
+
72 training steps corresponds to faster wall-time in an optimized implementation – our BERT result
|
| 82 |
+
73 with Adam also improves upon the wall-time record of LAMB reported in You et al. 2019). Taken
|
| 83 |
+
74 together, our results establish stronger training speed baselines for these tasks and batch sizes, which
|
| 84 |
+
75 we hope will assist future work aiming to accelerate training using larger batch sizes.
|
| 85 |
+
|
| 86 |
+
In addition to the contributions mentioned above, we demonstrate several key effects that are often overlooked by studies aiming to establish the superiority of new optimization algorithms. We show that future work must carefully disentangle regularization and optimization effects when comparing a new optimizer to baselines. We also report several under-documented details used to generate the best LARS and LAMB results, a reminder that future comparisons should document any novel tricks and include them in baselines. Finally, our results add to existing evidence in the literature on the difficulty of performing independently rigorous hyperparameter tuning for optimizers and baselines.
|
| 87 |
+
|
| 88 |
+
In particular, we show that the optimal shape of the learning rate schedule is optimizer-dependent (in addition to the scale), and that differences in the schedule can dominate optimizer comparisons at smaller step budgets and become less important at larger step budgets.
|
| 89 |
+
|
| 90 |
+
# 86 1.1 Related work
|
| 91 |
+
|
| 92 |
+
Shallue et al. [2019] and Zhang et al. [2019] explored the effects of data parallelism on neural network training for different optimizers, finding no evidence that larger batch sizes degrade performance and demonstrating that different optimizers can achieve perfect scaling up to different critical batch sizes. You et al. [2017, 2019] developed the LARS and LAMB optimizers in the hope of speeding up training by achieving perfect scaling beyond standard optimizers. Many other recent papers have proposed new optimization algorithms for generic batch sizes or larger batch sizes [see Schmidt et al., 2020]. Choi et al. [2019] and Schmidt et al. [2020] demonstrated the difficulties with fairly comparing optimizers, showing that the hyperparameter tuning protocol is a key determinant of optimizer rankings. The MLPerf Training benchmark [Mattson et al., 2019] provides a competitive ranking of neural network training systems, but does not shed much light on the relative performance of optimizers because entrants are limited in the algorithms they can use and the hyperparameters they can tune.
|
| 93 |
+
|
| 94 |
+
# 99 2 Matching LARS on ImageNet
|
| 95 |
+
|
| 96 |
+
100 The MLPerf training benchmark for ResNet-50 v1.5 on ImageNet [Mattson et al., 2019] aims to
|
| 97 |
+
101 reach $7 5 . 9 \%$ validation accuracy in the shortest possible wall-clock time. In the closed division of
|
| 98 |
+
102 the competition, entrants must choose between two optimizers, SGD with momentum or LARS, and
|
| 99 |
+
103 are only allowed to tune a specified subset of the optimization hyperparameters, with the remaining
|
| 100 |
+
104 hyperparameter values set by the competition rules.5 The winning entries in the two most recent
|
| 101 |
+
105 competitions used LARS with batch size 32,768 for 72 training epochs6 and LARS with batch size
|
| 102 |
+
106 65,536 for 88 training epochs,7 respectively. Kumar et al. [2019] later improved the training time
|
| 103 |
+
107 for batch size 32,768 by reaching the target accuracy in 64 epochs. These are currently the fastest
|
| 104 |
+
108 published results on the ResNet-50 benchmark. However, it has been unclear whether LARS was
|
| 105 |
+
109 necessary to achieve these training speeds since no recent published results or competitive MLPerf
|
| 106 |
+
110 submissions have used another optimizer. In this section, we describe how we matched the 64 epoch,
|
| 107 |
+
111 32,768 batch size result of LARS using standard Nesterov momentum.8
|
| 108 |
+
112 A fair benchmark of training algorithms or hardware systems must account for stochasticity in
|
| 109 |
+
113 individual training runs. In the MLPerf competition, the benchmark metric is the mean wall-clock
|
| 110 |
+
114 time of 5 trials after the fastest and slowest trials are excluded. Only 4 out of the 5 trials need to reach
|
| 111 |
+
115 the target accuracy and there is no explicit limit on the number of times an entrant can try a different
|
| 112 |
+
116 set of 5 trials. Since our goal is to compare algorithms, rather than systems, we aim to match the
|
| 113 |
+
117 LARS result in terms of training steps instead (but since Nesterov momentum is computationally
|
| 114 |
+
118 simpler than LARS, this would also correspond to faster wall-clock time on an optimized system).
|
| 115 |
+
119 Specifically, we measure the median validation accuracy over 50 training runs with a fixed budget of
|
| 116 |
+
120 2,512 training steps9 at a batch size of 32,768. When we ran the published LARS training pipeline,10
|
| 117 |
+
121 LARS achieved a median accuracy of $7 5 . 9 7 \%$ and reached the target in 35 out of 50 trials. We
|
| 118 |
+
122 consider the LARS result to be matched by another optimizer if the median over 50 trials exceeds the
|
| 119 |
+
123 target of $7 5 . 9 \%$ .
|
| 120 |
+
|
| 121 |
+
# 24 2.1 Nesterov momentum at batch size 32k
|
| 122 |
+
|
| 123 |
+
This section describes how we used the standard Nesterov momentum optimizer to train the ResNet$5 0 \mathrm { v } 1 . 5$ on ImageNet to $7 5 . 9 \%$ validation accuracy in 2,512 update steps at a batch size of 32,768, matching the best published LARS result at this batch size. Although we implemented our own training program, the only logical changes we made to the published LARS pipeline were to the optimizer and the optimization hyperparameters. Our model implementation and data pre-processing pipeline were identical to those required under the MLPerf closed division rules (see Appendix B).
|
| 124 |
+
|
| 125 |
+
131 We present two Nesterov momentum hyperparameter configurations that achieve comparable per
|
| 126 |
+
132 formance to LARS. Configuration A achieved a median accuracy of $7 5 . 9 7 \%$ (the same as LARS)
|
| 127 |
+
133 and reached the target accuracy in 34 out of 50 trials. Configuration B is a modified version of
|
| 128 |
+
134 Configuration A designed to make as few changes as possible to the LARS hyperparameters; it
|
| 129 |
+
135 achieved a median accuracy of $7 5 . 9 2 \%$ and reached the target in 29 out of 50 trials. See Appendix D.1
|
| 130 |
+
136 for the complete hyperparameter configurations.
|
| 131 |
+
137 To achieve these results, we tuned the hyperparameters of the training pipeline from scratch using
|
| 132 |
+
138 Nesterov momentum. We ran a series of experiments, each of which searched over a hand-designed
|
| 133 |
+
139 hyperparameter search space using quasi-random search [Bousquet et al., 2017]. Between each
|
| 134 |
+
140 experiment, we modified the previous search space and/or tweaked the training program to include
|
| 135 |
+
141 optimization tricks and non-default hyperparameter values we discovered in the state-of-the-art LARS
|
| 136 |
+
142 pipeline. The full sequence of experiments we ran, including the number of trials, hyperparameters
|
| 137 |
+
143 tuned, and search space ranges, are provided in Appendix D.4. Once we had matched the LARS
|
| 138 |
+
144 result with Configuration A, we tried setting each hyperparameter to its value in the LARS pipeline in
|
| 139 |
+
145 order to find the minimal set of changes that still achieved the target result, producing Configuration
|
| 140 |
+
146 B. The remainder of this section describes the hyperparameters we tuned and the techniques we
|
| 141 |
+
147 applied on the journey to these results.
|
| 142 |
+
|
| 143 |
+
# 2.1.1 Nesterov Momentum Optimizer
|
| 144 |
+
|
| 145 |
+
149 Nesterov momentum is a variant of classical or “heavy-ball” momentum defined by the update rule
|
| 146 |
+
|
| 147 |
+
$$
|
| 148 |
+
\begin{array} { r l } & { \boldsymbol { v } _ { t + 1 } = \mu \boldsymbol { v } _ { t } + \nabla \ell ( \boldsymbol { \theta } _ { t } ) , } \\ & { \boldsymbol { \theta } _ { t + 1 } = \boldsymbol { \theta } _ { t } - \eta _ { t } \left( \mu v _ { t + 1 } + \nabla \ell ( \boldsymbol { \theta } _ { t } ) \right) , } \end{array}
|
| 149 |
+
$$
|
| 150 |
+
|
| 151 |
+
150 where $v _ { 0 } = 0$ , $\theta _ { t }$ is the vector of model parameters after $t$ steps, $\nabla \ell ( \theta _ { t } )$ is the gradient of the loss
|
| 152 |
+
151 function $\ell ( \theta )$ averaged over a batch of training examples, $\mu$ is the momentum, and $\eta _ { t }$ is the learning
|
| 153 |
+
152 rate for step $t$ . We prefer Nesterov momentum over classical momentum because it tolerates larger
|
| 154 |
+
153 values of its momentum parameter [Sutskever et al., 2013] and sometimes outperforms classical
|
| 155 |
+
154 momentum, although the two algorithms perform similarly on many tasks [Shallue et al., 2019, Choi
|
| 156 |
+
155 et al., 2019]. We tuned the Nesterov momentum $\mu$ in Configurations A and B. We discuss the learning
|
| 157 |
+
156 rate schedule $\{ \eta _ { t } \}$ separately in Section 2.1.4.
|
| 158 |
+
|
| 159 |
+
# 2.1.2 Batch normalization
|
| 160 |
+
|
| 161 |
+
158 The ResNet-50 v1.5 model uses batch normalization [Ioffe and Szegedy, 2015], defined as
|
| 162 |
+
|
| 163 |
+
$$
|
| 164 |
+
\mathtt { B N } ( x ^ { ( l ) } ) = \left( \frac { x ^ { ( l ) } - \mathtt { m e a n } ( x ^ { ( l ) } ) } { \sqrt { \mathsf { v a r } ( x ^ { ( l ) } ) + \epsilon } } \right) \times \gamma ^ { ( l ) } + \beta ^ { ( l ) } ,
|
| 165 |
+
$$
|
| 166 |
+
|
| 167 |
+
159 where $x ^ { ( l ) }$ is a vector of pre-normalization outputs from layer $l$ $, \mathtt { m e a n } ( \cdot )$ and $\mathtt { v a r } ( \cdot )$ denote the
|
| 168 |
+
160 element-wise sample mean and variance across the batch of training examples,11 and $\gamma ^ { ( l ) }$ and $\beta ^ { ( l ) }$
|
| 169 |
+
161 are trainable model parameters.
|
| 170 |
+
162 Batch normalization introduces the following tuneable hyperparameters: $\epsilon$ , the small constant added
|
| 171 |
+
163 to the sample variance; the initial values of $\gamma ^ { ( l ) }$ and $\dot { \beta ^ { ( l ) } }$ ; and $\rho$ , which governs the exponential
|
| 172 |
+
164 moving averages of the scaling factors used in evaluation. The LARS pipeline uses $\epsilon = \mathrm { 1 0 ^ { - 5 } }$ and
|
| 173 |
+
165 $\rho = 0 . 9$ . It sets the initial value of $\beta ^ { ( l ) }$ to 0.0 everywhere, but the initial value of $\gamma ^ { ( l ) }$ depends on
|
| 174 |
+
166 the layer: it sets $\gamma ^ { ( l ) }$ to 0.0 in the final batch normalization layer of each residual block, and to 1.0
|
| 175 |
+
167 everywhere else. In Configuration A, we tuned $\epsilon$ , $\rho$ , and $\gamma _ { 0 }$ , the initial value of $\gamma ^ { ( l ) }$ in the final batch
|
| 176 |
+
168 normalization layer of each residual block. In Configuration B, we used the same values as LARS for
|
| 177 |
+
169 $\epsilon$ and $\rho$ , but we found that choosing $\gamma _ { 0 }$ between 0.0 and 1.0 was important for matching the LARS
|
| 178 |
+
170 result with Nesterov momentum.
|
| 179 |
+
|
| 180 |
+
# 2.1.3 Regularization
|
| 181 |
+
|
| 182 |
+
72 In Configuration A, we tuned both the L2 regularization coefficient $\lambda$ and label smoothing coefficient 73 $\tau$ [Szegedy et al., 2016]. The LARS pipeline uses $\lambda ~ = ~ 1 0 ^ { - 4 }$ and $\tau ~ = ~ 0 . 1$
|
| 183 |
+
|
| 184 |
+
174 Crucially, the LARS pipeline does not apply L2 regularization to the bias variables of the
|
| 185 |
+
175 ResNet model nor the batch normalization parameters $\gamma ^ { ( l ) }$ and $\beta ^ { ( l ) }$ (indeed, the published
|
| 186 |
+
176 LARS pipeline does not even apply LARS to these parameters – it uses Heavy-ball momen
|
| 187 |
+
177 tum). This detail is extremely important for both LARS and Nesterov momentum to achieve
|
| 188 |
+
178 the fastest training speed. Configuration $\mathbf { B }$ used the same $\lambda$ and $\tau$ as Configuration A.
|
| 189 |
+
179
|
| 190 |
+
|
| 191 |
+
# 0 2.1.4 Learning rate schedule
|
| 192 |
+
|
| 193 |
+
181 The LARS pipeline uses a piecewise polynomial schedule
|
| 194 |
+
|
| 195 |
+
$$
|
| 196 |
+
\eta _ { t } = \left\{ \begin{array} { l l } { \eta _ { \mathrm { i n i t } } + ( \eta _ { \mathrm { p e a k } } - \eta _ { \mathrm { i n i t } } ) \left( \frac { t } { t _ { \mathrm { w a r m u p } } } \right) ^ { p _ { \mathrm { w a r m u p } } } , } & { t \leq t _ { \mathrm { w a r m u p } } } \\ { \eta _ { \mathrm { f i n a l } } + ( \eta _ { \mathrm { p e a k } } - \eta _ { \mathrm { f i n a l } } ) \left( \frac { T - t } { T - t _ { \mathrm { w a r m u p } } } \right) ^ { p _ { \mathrm { d e c a y } } } } & { t > t _ { \mathrm { w a r m u p } } , } \end{array} \right.
|
| 197 |
+
$$
|
| 198 |
+
|
| 199 |
+
182 with $\eta _ { \mathrm { i n i t } } ~ = ~ 0 . 0$ , $\eta _ { \mathrm { p e a k } } ~ = ~ 2 9 . 0$ , $\eta _ { \mathrm { f i n a l } } = 1 0 ^ { - 4 }$ , $p _ { \mathrm { w a r m u p } } ~ = ~ 1$ ,
|
| 200 |
+
183 $p _ { \mathrm { d e c a y } } = 2$ , and $t _ { \mathrm { w a r m u p } } = 7 0 6$ steps. In Configuration A, we re
|
| 201 |
+
184 tuned all of these hyperparameters with Nesterov momentum.
|
| 202 |
+
185 In Configuration B, we set $\eta _ { \mathrm { i n i t } } , p _ { \mathrm { d e c a y } }$ , and $t _ { \mathrm { w a r m u p } }$ to the same
|
| 203 |
+
186 values as LARS, changing only $p _ { \mathrm { w a r m u p } }$ from 1 to 2 and re
|
| 204 |
+
187 scaling $\eta _ { \mathrm { p e a k } }$ and $\eta _ { \mathrm { f i n a l } }$ .
|
| 205 |
+
|
| 206 |
+
Table 1: The hyperparameters of Configuration $\mathbf { B }$ that differ from state-of-the-art LARS at batch size 32,768 [Kumar et al., 2019].
|
| 207 |
+
|
| 208 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Nesterov</td><td rowspan=1 colspan=1>LARS</td></tr><tr><td rowspan=1 colspan=1>Pwarmup</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>1</td></tr><tr><td rowspan=1 colspan=1>npeak</td><td rowspan=1 colspan=1>7.05</td><td rowspan=1 colspan=1>29.0</td></tr><tr><td rowspan=1 colspan=1>Mfinal</td><td rowspan=1 colspan=1>6×10-6</td><td rowspan=1 colspan=1>10-4</td></tr><tr><td rowspan=1 colspan=1>1-μ</td><td rowspan=1 colspan=1>0.02397</td><td rowspan=1 colspan=1>0.071</td></tr><tr><td rowspan=1 colspan=1>入</td><td rowspan=1 colspan=1>5.8× 10-5</td><td rowspan=1 colspan=1>10-4</td></tr><tr><td rowspan=1 colspan=1>T</td><td rowspan=1 colspan=1>0.15</td><td rowspan=1 colspan=1>0.10</td></tr><tr><td rowspan=1 colspan=1>20</td><td rowspan=1 colspan=1>0.4138</td><td rowspan=1 colspan=1>0.0</td></tr></table>
|
| 209 |
+
|
| 210 |
+
# 2.1.5 Comparing Nesterov momentum and LARS
|
| 211 |
+
|
| 212 |
+
Table 1 shows the hyperparameter values for Configuration B that differ from the stateof-the-art LARS pipeline. Aside from re-tuning the momentum, learning rate scale, and regularization hyperparameters (whose optimal values are all expected to change with the optimizer), the only changes are setting pwarmup to 2 instead of 1 and re-tuning $\gamma _ { 0 }$ .
|
| 213 |
+
|
| 214 |
+
Figure 1 shows the LARS learning rate schedule compared to the Nesterov momentum schedule. Even though these schedules are similar, we found that each optimizer had a different optimal value of the warmup polynomial power. As Table 2 shows, Nesterov momentum performs better with $p _ { \mathrm { w a r m u p } } = 2$ instead of 1, while the opposite is true with LARS. As discussed in Agarwal et al. [2020], optimizers can induce implicit step size schedules that strongly influence their training dynamics and solution quality, and it appears from Table 2 that the implicit step sizes of Nesterov momentum and LARS may evolve differently, causing the shapes of their optimal learning rate schedules to differ.
|
| 215 |
+
|
| 216 |
+

|
| 217 |
+
Figure 1: The learning rate schedules of LARS and Nesterov momentum Configuration B. Aside from re-scaling, the only difference is setting the warmup polynomial power to 2 instead of 1.
|
| 218 |
+
|
| 219 |
+
207 Although the main concern of a practitioner is validation performance, the primary task of an
|
| 220 |
+
208 optimization algorithm is to minimize training loss. Table 2 shows that Nesterov momentum achieves
|
| 221 |
+
209 higher training accuracy than LARS, despite similar validation performance. Thus, it may be more
|
| 222 |
+
210 appropriate to consider the layerwise normalization of LARS to be a regularization technique, rather
|
| 223 |
+
211 than an optimization technique.
|
| 224 |
+
12 Spending even more effort tuning LARS or Nesterov momentum would likely further improve the
|
| 225 |
+
213 current state-of-the-art for that optimizer. Meaningful optimizer comparisons are only possible
|
| 226 |
+
214 with independent and equally intensive tuning efforts, and we do not claim that either optimizer
|
| 227 |
+
215 outperforms the other on this benchmark. That said, if the main evidence for LARS’s utility as a
|
| 228 |
+
216 “large-batch optimizer” is its performance on this particular benchmark, then more evidence is needed
|
| 229 |
+
217 to quantify any benefit it has over traditional, generic optimizers like Nesterov momentum.
|
| 230 |
+
|
| 231 |
+
# 2.2 Lessons learned
|
| 232 |
+
|
| 233 |
+
In hindsight, it was only necessary to make a few changes to the LARS pipeline to match its performance at batch size 32,768 with Nesterov momentum. However, Table 1 does not accurately represent the effort required when attempting to match a highly tuned training-speed benchmark.
|
| 234 |
+
|
| 235 |
+
Table 2: (Left) The best warmup schedule differs for Nesterov momentum and LARS. Values are medians over 50 training runs after setting $p _ { \mathrm { w a r m u p } }$ without retuning other hyperparameters. (Right) Median train and test accuracies over 50 training runs for Nesterov momentum Configuration B and LARS.
|
| 236 |
+
|
| 237 |
+
<table><tr><td rowspan=2 colspan=1>Pwarmup</td><td rowspan=2 colspan=1>Nesterov</td><td rowspan=2 colspan=1>LARS</td><td rowspan=2 colspan=2></td><td rowspan=1 colspan=1></td><td rowspan=2 colspan=1></td><td rowspan=2 colspan=1>Optimizer</td><td rowspan=2 colspan=1>Train Acc</td></tr><tr><td rowspan=1 colspan=2></td></tr><tr><td rowspan=2 colspan=1>1</td><td rowspan=2 colspan=1>75.79%</td><td rowspan=2 colspan=1>75.97%</td><td rowspan=2 colspan=2></td><td rowspan=1 colspan=1></td><td rowspan=2 colspan=1></td><td rowspan=2 colspan=1>Nesterov</td><td rowspan=2 colspan=1>78.97%</td></tr><tr><td rowspan=1 colspan=2></td></tr><tr><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>75.92%</td><td rowspan=1 colspan=1>75.69%</td><td rowspan=1 colspan=3></td><td rowspan=1 colspan=1>LARS</td><td rowspan=1 colspan=1>78.07%</td><td rowspan=1 colspan=1>75.97%</td></tr></table>
|
| 238 |
+
|
| 239 |
+
222 Firstly, as described in Sections 2.1.2 and 2.1.3, the strong results of LARS depend partly on a few
|
| 240 |
+
223 subtle optimization tricks and non-default values of uncommonly-tuned hyperparameters. Fortunately,
|
| 241 |
+
224 in this case we could discover these tricks by examining the open-source code required for MLPerf
|
| 242 |
+
225 submissions, but machine learning research papers do not always report these important details.
|
| 243 |
+
226 Researchers can easily waste a lot of experiments and produce misleading results before getting all of
|
| 244 |
+
227 these details right. We demonstrate the importance of adding these tricks to our Nesterov momentum
|
| 245 |
+
228 pipeline in Appendix C; without these tricks (or some new tricks), we likely would not have been
|
| 246 |
+
229 able to match the LARS performance.
|
| 247 |
+
230 Secondly, the learning rate schedule really matters when trying to maximize performance with a
|
| 248 |
+
231 relatively small step budget. Both LARS and Nesterov momentum are sensitive to small deviations
|
| 249 |
+
232 from the optimized learning rate schedules in Figure 1, and neither schedule works as well for the
|
| 250 |
+
233 other optimizer. Although relatively minor changes were sufficient to match LARS with Nesterov
|
| 251 |
+
234 momentum, there is no way to know a priori how the optimal schedule will look for a new optimizer
|
| 252 |
+
235 Wu et al. [2018]. Even in toy settings where the optimal learning rate schedule can be derived, it
|
| 253 |
+
236 does not fit into commonly used schedule families and depends strongly on the optimizer Zhang
|
| 254 |
+
237 et al. [2019]. Indeed, this problem applies to the other optimization hyperparameters as well: it
|
| 255 |
+
238 is extremely difficult to know which are worth considering ahead of time. Finally, even when we
|
| 256 |
+
239 narrowed down our hyperparemeter search spaces around the optimal point, the volume of our search
|
| 257 |
+
240 spaces corresponding to near-peak performance was small, likely due to the small step budget [Shallue
|
| 258 |
+
241 et al., 2019]. We investigate how these effects change with a less stringent step budget in Section 4.
|
| 259 |
+
|
| 260 |
+
# 242 3 Stronger BERT pretraining speed baselines
|
| 261 |
+
|
| 262 |
+
243 You et al. [2019] developed the LAMB optimizer in the hope of speeding up training for BERT-Large
|
| 263 |
+
244 [Bidirectional Encoder Representations from Transformers, Devlin et al., 2018]. BERT training
|
| 264 |
+
245 consists of two phases. The “pretraining” phase has two objectives: (1) predicting masked tokens
|
| 265 |
+
246 based on the rest of the sequence (a masked language model), and (2) predicting whether two
|
| 266 |
+
247 given sentences follow one from another. Finally, the “fine-tuning” phase refines the model for a
|
| 267 |
+
248 downstream task of interest. BERT pretraining takes a considerable amount of time (up to 3 days on
|
| 268 |
+
249 16 Cloud TPU-v3 chips Jouppi et al. [2017]), whereas the fine-tuning phase is typically much faster.
|
| 269 |
+
250 Model quality is typically assessed on the downstream metrics, not on pretraining loss, making BERT
|
| 270 |
+
251 training a somewhat awkward benchmark for optimization research.
|
| 271 |
+
252 You et al. [2019] used LAMB for BERT pretraining with batch sizes up to 65,536 and claimed that
|
| 272 |
+
253 LAMB outperforms Adam batch size 16,384 and beyond. The LAMB optimizer has since appeared
|
| 273 |
+
254 in several NLP toolkits, including as Microsoft DeepSpeed and NVIDIA Multi-node BERT training,
|
| 274 |
+
255 and as a benchmark task in MLPerf v0.7.12
|
| 275 |
+
|
| 276 |
+
As shown in Table 3, we trained Adam (with decoupled weight decay) baselines that achieve better results than both the LAMB and Adam results reported in You et al. [2019]. Our new Adam baselines obtain better F1 scores on the development set of the SQuaD v1.1 task in the same number of training steps as LAMB for both batch size 32,768 and the hybrid 65,536-then-32,768 batch size training regime in You et al. [2019]. We also ran Adam at batch size 65,536 to reach nearly the same F1 score as the hybrid batch size LAMB result, but in much fewer training steps. We believe 7,818 steps is a new state-of-the-art for BERT pretraining speed [in our experiments, it also improves upon the 76-minute record claimed in You et al., 2019]. Additionally, at batch size 32,768 our Adam baseline got a better pretraining loss of 1.277 compared to LAMB’s 1.342.
|
| 277 |
+
|
| 278 |
+
266 We used the same experimental setup as You
|
| 279 |
+
267 et al. [2019], including two pretraining phases
|
| 280 |
+
268 with max sequence lengths of 128 and then 512.
|
| 281 |
+
269 In order to match You et al. [2019], we reported
|
| 282 |
+
270 the F1 score on the downstream SQuaD v1.1
|
| 283 |
+
271 task as the target metric, although this metric
|
| 284 |
+
272 introduces potential confounds: optimization
|
| 285 |
+
273 efficiency should be measured on the training
|
| 286 |
+
274 task using training and held-out data sets. Fortunately, in this case better pretraining performance
|
| 287 |
+
275 correlated a with higher F1 score after fine-tuning. See Appendix B.2 for additional experiment
|
| 288 |
+
276 details. We tuned Adam hyperparameters independently for each pretraining phase, specifically
|
| 289 |
+
277 learning rate $\eta$ , $\beta _ { 1 }$ , $\beta _ { 2 }$ , the polynomial power for the learning rate warmup $p _ { w a r m u p }$ , and weight
|
| 290 |
+
278 decay $\lambda$ , using quasi-random search [Bousquet et al., 2017]. See Appendix D.2 for the search spaces.
|
| 291 |
+
279 In addition to hyperparmeter tuning, our improved Adam results at these batch sizes are also likely
|
| 292 |
+
280 due to two implementation differences. First, the Adam implementation in You et al. [2019] comes
|
| 293 |
+
281 from the BERT open source code base, in which Adam is missing the standard bias correction.13
|
| 294 |
+
282 The Adam bias correction acts as an additional step size warm-up, thereby potentially improving the
|
| 295 |
+
283 stability in the initial steps of training. Second, the BERT learning rate schedule had a discontinuity
|
| 296 |
+
284 at the start of the decay phase due to the learning rate decay being incorrectly applied during warm-up
|
| 297 |
+
285 14 (see Figure 2 in Appendix B). This peculiarity is part of the official BERT release and is present in
|
| 298 |
+
286 $3 0 0 0 +$ copies of the BERT Training code on GitHub.
|
| 299 |
+
|
| 300 |
+
Table 3: Using Adam for pretraining exceeds the reported performance of LAMB in You et al. [2019] in terms of F1 score on the downstream SQuaD v1.1 task.
|
| 301 |
+
|
| 302 |
+
<table><tr><td rowspan=1 colspan=1>Batch size</td><td rowspan=1 colspan=1>Step budget</td><td rowspan=1 colspan=1>LAMB</td><td rowspan=1 colspan=1>Adam</td></tr><tr><td rowspan=1 colspan=1>32k</td><td rowspan=1 colspan=1>15,625</td><td rowspan=1 colspan=1>91.48</td><td rowspan=1 colspan=1>91.58</td></tr><tr><td rowspan=1 colspan=1>65k/32k</td><td rowspan=1 colspan=1>8,599</td><td rowspan=1 colspan=1>90.58</td><td rowspan=1 colspan=1>91.04</td></tr><tr><td rowspan=1 colspan=1>65k</td><td rowspan=1 colspan=1>7,818</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>90.46</td></tr></table>
|
| 303 |
+
|
| 304 |
+
# 287 4 Investigating a less stringent step budget
|
| 305 |
+
|
| 306 |
+
Part of what makes comparing optimizers so difficult is that the hyperparameter tuning tends to dominate the comparisons [Choi et al., 2019]. Moreover, tuning becomes especially difficult when we demand a fixed epoch budget even when dramatically increasing the batch size [Shallue et al., 2019]. Fixing the epoch budget as the batch size increases is equivalent to demanding perfect scaling (i.e. that the number of training steps decreases by the same factor that the batch size is increased). We can view the role of hyperparameter tuning for large batch training as resisting the inevitable end of perfect scaling. For example, it might be possible to extend perfect scaling using delicately tuned learning rate schedules, but comparing optimizers under these conditions can make the learning rate schedule dominate the comparison by favoring some algorithms over others. Therefore, in order to better understand the behavior of LARS and LAMB compared to Nesterov Momentum and Adam, we ran additional ResNet-50 experiments with a more generous 6,000 step budget (vs 2,512 in Section 2) and a more simplistic cosine learning rate schedule. At batch size 32,768, this budget should let us reach better validation accuracy than the MLPerf target of $7 5 . 9 \%$ .
|
| 307 |
+
|
| 308 |
+
301 Although not mentioned in You et al. [2017], the state-of-the-art MLPerf pipeline for “LARS” actually
|
| 309 |
+
302 uses both LARS and Heavy-ball Momentum, with Momentum applied to the batch normalization and
|
| 310 |
+
303 ResNet bias parameters and LARS applied to the other parameters. You et al. [2019] does not mention
|
| 311 |
+
304 whether LAMB was only applied to some parameters and not others. If layerwise normalization can
|
| 312 |
+
305 be harmful for some model parameters, this is critical information for practitioners using LARS or
|
| 313 |
+
306 LAMB, since it might not be obvious which optimizer to apply to which parameters. To investigate
|
| 314 |
+
307 this, we trained both pure LARS and LAMB configurations, as well as configurations that did not
|
| 315 |
+
308 apply layerwise normalization to the batch normalization and ResNet bias parameters. Moreover,
|
| 316 |
+
309 LAMB’s underlying Adam implementation defaults to $\epsilon = 1 0 ^ { - 6 }$ , rather than the typical $1 0 ^ { - 7 }$ or
|
| 317 |
+
310 $1 0 ^ { - 8 }$ . In some cases, $\epsilon$ can be a critical hyperparameter for Adam [Choi et al., 2019], so we included
|
| 318 |
+
311 Adam configurations with both $\epsilon = 1 0 ^ { - 6 }$ and $\epsilon = 1 0 ^ { - 8 }$ .
|
| 319 |
+
|
| 320 |
+
Table 4 shows the validation accuracy of these different configurations after training for 6,000 steps with batch size 32,768. In every case, we used a simple cosine decay learning rate schedule and tuned the initial learning rate and weight decay using quasi-random search. We used momentum parameters of 0.98 for Nesterov momentum and 0.929 for LARS, respectively, based on the tuned values from Section 2. We used default hyperparameters for Adam and LAMB except where specified. We set all other hyperparameters to the same values as the state-of-theart LARS pipeline, except we set $\gamma _ { 0 } = 1 . 0$ . See Appendix D.3 for more details. As expected, highly tuned learning rate schedules and optimizer hyperparameters are no longer necessary with a less stringent step budget. Multiple optimizer configurations in Table 4 exceed the MLPerf target accuracy of $7 5 . 9 \%$ at batch size 32,768 with minimal tuning. Training with larger batch sizes is not fundamentally unstable: stringent step budgets make hyperparameter tuning trickier.
|
| 321 |
+
|
| 322 |
+
<table><tr><td rowspan=1 colspan=1>WeightsOptimizer</td><td rowspan=1 colspan=1>Bias/BNOptimizer</td><td rowspan=1 colspan=1>Top-1</td></tr><tr><td rowspan=1 colspan=1>Nesterov</td><td rowspan=1 colspan=1>Nesterov</td><td rowspan=1 colspan=1>76.7</td></tr><tr><td rowspan=1 colspan=1>LARS</td><td rowspan=1 colspan=1>Momentum</td><td rowspan=1 colspan=1>76.9</td></tr><tr><td rowspan=1 colspan=1>LARS</td><td rowspan=1 colspan=1>LARS</td><td rowspan=1 colspan=1>76.9</td></tr><tr><td rowspan=1 colspan=1>Adam (c = 10-8)</td><td rowspan=1 colspan=1>Adam (c = 10-8)</td><td rowspan=1 colspan=1>76.2</td></tr><tr><td rowspan=1 colspan=1>Adam (e = 10-6)</td><td rowspan=1 colspan=1>Adam (ε = 10-6)</td><td rowspan=1 colspan=1>76.4</td></tr><tr><td rowspan=1 colspan=1>LAMB</td><td rowspan=1 colspan=1>LAMB</td><td rowspan=1 colspan=1>27.3</td></tr><tr><td rowspan=1 colspan=1>LAMB</td><td rowspan=1 colspan=1>Adam (e = 10-8)</td><td rowspan=1 colspan=1>76.3</td></tr><tr><td rowspan=1 colspan=1>LAMB</td><td rowspan=1 colspan=1>Adam (ε = 10-6)</td><td rowspan=1 colspan=1>76.3</td></tr></table>
|
| 323 |
+
|
| 324 |
+
Table 4: Validation accuracy of ResNet-50 on ImageNet trained for 6,000 steps instead of 2,512. The second column is the optimizer that was applied to the batch norm and ResNet bias variables. We report the median top-1 accuracy over 5 seeds of the best hyperparameter setting in a refined search space. See Appendix D.3 for details.
|
| 325 |
+
|
| 326 |
+
In Table 4, “pure LAMB” performs extremely poorly: LAMB only obtains reasonable results when it is not used on the batch normalization and ResNet bias parameters, suggesting that layerwise normalization can indeed be harmful on some parameters. “Pure LARS” and Nesterov momentum perform roughly the same at this step budget, but the MLPerf LARS pipeline, which is tuned for a more stringent step budget, does not use LARS on all parameters, at least suggesting that the optimal choice could be budget-dependent.
|
| 327 |
+
|
| 328 |
+
Many new neural net optimizers, including LAMB, are introduced alongside claims that the new optimizer does not require any—or at least minimal—tuning. Unfortunately, these claims require a lot of work to support, since they require trying the optimizer on new problems without using those problems during the development of the algorithm. Although our experiments here are not sufficient to determine
|
| 329 |
+
|
| 330 |
+
which optimizers are easiest to tune, experiments like these that operate outside the regime of highly tuned learning rate schedules can serve as a starting point. In this experiment, LARS and LAMB do not appear to have an advantage in how easy they are to tune even on a dataset and model that were used in the development of both of those algorithms. LAMB is a variant of Adam and performs about the same as Adam with the same value of $\epsilon$ ; LARS is more analogous to Momentum and indeed Nesterov momentum and LARS have similar performance.
|
| 331 |
+
|
| 332 |
+
# 5 Discussion
|
| 333 |
+
|
| 334 |
+
Our results show that standard, generic optimizers suffice for achieving strong results across batch sizes. Therefore, any research program to create new optimizers for training at larger batch sizes must start from the fact that Momentum, Adam, and likely other standard methods work fine at batch sizes as large as those considered in this paper. The LARS and LAMB update rules have no more to do with the batch size (or “large” batches) than the Momentum or Adam update rules. Although You et al. [2019] presented convergence rate bounds for LARS and LAMB to support their claims of superior performance, we show in Appendix A that Adam satisfies a similar bound to LAMB. These bounds all rely on very unrealistic assumptions. 15 Most of all, they are loose upper bounds on the worst case behavior of the algorithms, not accurate reflections of optimizer performance in reality. Whether layer-wise normalization can be useful for optimization or regularization remains an open question. However, if LARS and LAMB have any advantage over standard techniques, it is not that they work dramatically better on the tasks and batch sizes in You et al. [2017, 2019]. This is not to suggest that there is nothing interesting about studying neural network optimization at larger batch sizes. For example, as gradient noise decreases, there may be opportunities to harness curvature information and extend the region of perfect scaling [Zhang et al., 2019]. However, there is currently no evidence that LARS and LAMB scale better than Momentum and Adam.
|
| 335 |
+
|
| 336 |
+
Our primary concern in this paper has been matching the state of the art—and establishing new baselines—for training speed measurements of the sort used to justify new techniques and algorithms for training with larger batch sizes. In contrast, many practitioners are more concerned with obtaining the best possible validation error with a somewhat flexible training time budget. Part of the reason why matching LARS at batch size 32,768 was non-trivial is because getting state of the art training
|
| 337 |
+
|
| 338 |
+
373 speed requires several tricks and implementation details that are not often discussed. It was not
|
| 339 |
+
374 obvious to us a priori which ones would prove crucial. These details do not involve changes to the
|
| 340 |
+
375 optimizer, but they interact with the optimizer in a regime where all hyperparameters need to be well
|
| 341 |
+
376 tuned to stay competitive, making it necessary to re-tune everything for a new optimizer.
|
| 342 |
+
377 In neural network optimization research, training loss is rarely discussed in detail and evaluation
|
| 343 |
+
378 centers on validation/test performance since that is what practitioners care most about. However,
|
| 344 |
+
379 although we shouldn’t only consider training loss, it is counter-intuitive and counter-productive to
|
| 345 |
+
380 elide a careful investigation of the actual objective of the optimizer. If a new optimizer achieves better
|
| 346 |
+
381 test performance, but shows no speedup on training loss, then perhaps it is not a better optimizer so
|
| 347 |
+
382 much as an indirect regularizer. 16 Indeed, in our experiments we found that Nesterov momentum
|
| 348 |
+
383 achieves noticeably better training accuracy on ResNet-50 than the LARS configuration we used,
|
| 349 |
+
384 despite reaching roughly the same validation accuracy. Properly disentangling possible regularization
|
| 350 |
+
385 benefits from optimization speed-ups is crucial if we are to understand neural network training,
|
| 351 |
+
386 especially at larger batch sizes where we lose some of the regularization effect of gradient noise.
|
| 352 |
+
387 Hypothetically, if the primary benefit of a training procedure is regularization, then it would be better
|
| 353 |
+
388 to compare the method with other regularization baselines than other optimizers.
|
| 354 |
+
389 Ultimately, we only care about batch size to the extent that higher degrees of data parallelism lead
|
| 355 |
+
390 to faster training. Training with a larger batch size is a means, not the end goal. New optimizers—
|
| 356 |
+
391 whether designed for generic batch sizes or larger batch sizes—have the potential to dramatically
|
| 357 |
+
392 improve algorithmic efficiency across multiple workloads, but our results show that standard opti
|
| 358 |
+
393 mizers can match the performance of newer alternatives on the workloads we considered. Indeed,
|
| 359 |
+
394 despite the legion of new update rule variants being proposed in the literature, standard Adam and
|
| 360 |
+
395 Momentum remain the workhorses of practitioners and researchers alike, while independent empirical
|
| 361 |
+
396 comparisons consistently find no clear winner when optimizers are compared across a variety of
|
| 362 |
+
397 workloads [Schmidt et al., 2020]. Meanwhile, as Choi et al. [2019] and our results underscore,
|
| 363 |
+
398 comparisons between optimizers crucially depend on the effort spent tuning hyperparameters for each
|
| 364 |
+
399 optimizer. Given these facts, we should regard with extreme caution studies claiming to show the
|
| 365 |
+
400 superiority of one particular optimizer over others. Part of the issue stems from current incentives in
|
| 366 |
+
401 the research community; we overvalue the novelty of new methods and undervalue establishing strong
|
| 367 |
+
402 baselines to measure progress against. This is particularly problematic in the study of optimizers,
|
| 368 |
+
403 where the learning rate schedule is arguably more important than the choice of the optimizer update
|
| 369 |
+
404 rule itself! As our results show, the best learning rate schedule is tightly coupled with the optimizer,
|
| 370 |
+
405 meaning that tuning the learning rate schedule for a new optimizer will generally favor the new
|
| 371 |
+
406 optimizer over a baseline unless the schedule of the baseline is afforded the same tuning effort.
|
| 372 |
+
|
| 373 |
+
# 6 Conclusion
|
| 374 |
+
|
| 375 |
+
In this work, we demonstrated that standard optimizers, without any layer-wise normalization techniques, can match or exceed the large batch size results used to justify LARS and LAMB. Future work attempting to argue that a new algorithm is useful by comparing to baseline methods or results, including those established in this paper, faces a key challenge in showing that the gains are due to the new method and not merely due to better tuning or changes to the training pipeline (e.g. regularization tricks). Although gains from tuning will eventually saturate, we can, in principle, always invest more effort in tuning and potentially get better results for any optimizer. However, our goal should be developing optimizers that work better across many different workloads when taking into account the amount of additional tuning they require.
|
| 376 |
+
|
| 377 |
+
Moving forward, if we are to reliably make progress we need to rethink how we compare and evaluate new optimizers for neural network training. Given how sensitive optimizer performance is to the hyperparameter tuning protocol and how difficult it is to quantify hyperparameter tuning effort, we can’t expect experiments with self-reported baselines to always lead to fair comparisons. Ideally, new training methods would be evaluated in a standardized competitive benchmark, where submitters of new optimizers do not have full knowledge of the evaluation workloads. Some efforts in this direction have started, for instance the MLCommons Algorithmic Efficiency Working Group17 , but more work needs to be done to produce incentives for the community to publish well-tuned baselines and to reward researchers that conduct the most rigorous empirical comparisons.
|
| 378 |
+
|
| 379 |
+
1. For all authors...
|
| 380 |
+
|
| 381 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] See Sections 2, 3, 4
|
| 382 |
+
(b) Did you describe the limitations of your work? [Yes] We had a lengthy discussion of the limitations and scope of the work in Section 5
|
| 383 |
+
(c) Did you discuss any potential negative societal impacts of your work? [No] We did not discuss this in the main text. Our primary contribution is to improve experimental protocols for other methodological work, which is so removed from specific machine learning applications that it is hard to determine the net impact. That said, more effective experimental protocols should lead to more effective science which in turn should lead to more effective machine learning applications. Whether this development is positive or negative for society will depend on who stands to gain from the use of machine learning in future applied contexts. Additionally, although our work should, in the long run, save computational resources for individual researchers, in net across the community this may or may not produce an aggregate savings because more efficient machine learning training, by making larger scale projects more accessible, can lead to an increased demand for compute resources [York, 2006], which can have varying degrees of negative environmental impacts [Patterson et al., 2021].
|
| 384 |
+
|
| 385 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 386 |
+
|
| 387 |
+
2. If you are including theoretical results...
|
| 388 |
+
|
| 389 |
+
(a) Did you state the full set of assumptions of all theoretical results? [Yes] See Appendix A for a comprehensive description of the problem setting. (b) Did you include complete proofs of all theoretical results? [Yes] See Appendix A.
|
| 390 |
+
|
| 391 |
+
3. If you ran experiments...
|
| 392 |
+
|
| 393 |
+
(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [No] We will include a link to all code and all possible reproducibility instructions after the anonymized reviewing period is over.
|
| 394 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] We are extremely detailed about our tuning procedures and dataset details, see Appendices B, D.
|
| 395 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] While we do not report error bars in the tables in the main text, Appendices B.2, C contains box plots showing the quartiles of the distribution over random seeds.
|
| 396 |
+
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [No] In Appendix B we state that we run on Google TPUs, however we do not tally up the total number of experiments run (although an interested reader could compute it from the information we provided in our detailed appendices given that we list all intermediate experiments, no matter how silly in hindsight).
|
| 397 |
+
|
| 398 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 399 |
+
|
| 400 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] We reference the relevant citations for all models, datasets, and techniques.
|
| 401 |
+
(b) Did you mention the license of the assets? [No]
|
| 402 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [No]
|
| 403 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 404 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 405 |
+
|
| 406 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 407 |
+
|
| 408 |
+
479 (a) Did you include the full text of instructions given to participants and screenshots, if
|
| 409 |
+
480 applicable? [N/A]
|
| 410 |
+
481 (b) Did you describe any potential participant risks, with links to Institutional Review
|
| 411 |
+
482 Board (IRB) approvals, if applicable? [N/A]
|
| 412 |
+
483 (c) Did you include the estimated hourly wage paid to participants and the total amount
|
| 413 |
+
484 spent on participant compensation? [N/A]
|
| 414 |
+
485 References
|
| 415 |
+
486 Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S.
|
| 416 |
+
487 Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian Goodfellow, Andrew
|
| 417 |
+
488 Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz Kaiser, Manjunath
|
| 418 |
+
489 Kudlur, Josh Levenberg, Dandelion Mane, Rajat Monga, Sherry Moore, Derek Murray, Chris Olah, ´
|
| 419 |
+
490 Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul Tucker, Vincent
|
| 420 |
+
491 Vanhoucke, Vijay Vasudevan, Fernanda Viegas, Oriol Vinyals, Pete Warden, Martin Wattenberg, ´
|
| 421 |
+
492 Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. TensorFlow: Large-scale machine learning on
|
| 422 |
+
493 heterogeneous systems, 2015. URL https://www.tensorflow.org/. Software available from
|
| 423 |
+
494 tensorflow.org.
|
| 424 |
+
495 Naman Agarwal, Rohan Anil, Elad Hazan, Tomer Koren, and Cyril Zhang. Disentangling adaptive
|
| 425 |
+
496 gradient methods from learning rates. arXiv preprint arXiv:2002.11803, 2020.
|
| 426 |
+
497 Olivier Bousquet, Sylvain Gelly, Karol Kurach, Olivier Teytaud, and Damien Vincent. Critical hyper
|
| 427 |
+
498 parameters: No random, no cry. arXiv, 2017. URL https://arxiv.org/abs/1706.03200.
|
| 428 |
+
499 James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal
|
| 429 |
+
500 Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye Wanderman-Milne, and
|
| 430 |
+
501 Qiao Zhang. JAX: composable transformations of Python+NumPy programs, 2018. URL
|
| 431 |
+
502 http://github.com/google/jax.
|
| 432 |
+
503 Dami Choi, Christopher J Shallue, Zachary Nado, Jaehoon Lee, Chris J Maddison, and George E
|
| 433 |
+
504 Dahl. On empirical comparisons of optimizers for deep learning. arXiv preprint arXiv:1910.05446,
|
| 434 |
+
505 2019.
|
| 435 |
+
506 Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep
|
| 436 |
+
507 bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
|
| 437 |
+
508 Elad Hoffer, Itay Hubara, and Daniel Soudry. Train longer, generalize better: closing the gen
|
| 438 |
+
509 eralization gap in large batch training of neural networks. arXiv preprint arXiv:1705.08741,
|
| 439 |
+
510 2017.
|
| 440 |
+
511 Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by
|
| 441 |
+
512 reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015.
|
| 442 |
+
513 Norman P Jouppi, Cliff Young, Nishant Patil, David Patterson, Gaurav Agrawal, Raminder Bajwa,
|
| 443 |
+
514 Sarah Bates, Suresh Bhatia, Nan Boden, Al Borchers, et al. In-datacenter performance analysis of
|
| 444 |
+
515 a tensor processing unit. In Proceedings of the 44th Annual International Symposium on Computer
|
| 445 |
+
516 Architecture, pages 1–12, 2017.
|
| 446 |
+
517 Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint
|
| 447 |
+
518 arXiv:1412.6980, 2014.
|
| 448 |
+
519 Sameer Kumar, Victor Bitorff, Dehao Chen, Chiachen Chou, Blake Hechtman, HyoukJoong Lee,
|
| 449 |
+
520 Naveen Kumar, Peter Mattson, Shibo Wang, Tao Wang, et al. Scale mlperf-0.6 models on google
|
| 450 |
+
521 tpu-v3 pods. arXiv preprint arXiv:1909.09756, 2019.
|
| 451 |
+
522 Peter Mattson, Christine Cheng, Cody Coleman, Greg Diamos, Paulius Micikevicius, David Patterson,
|
| 452 |
+
523 Hanlin Tang, Gu-Yeon Wei, Peter Bailis, Victor Bittorf, David Brooks, Dehao Chen, Debojy
|
| 453 |
+
524 oti Dutta, Udit Gupta, Kim Hazelwood, Andrew Hock, Xinyuan Huang, Atsushi Ike, Bill Jia,
|
| 454 |
+
525 Daniel Kang, David Kanter, Naveen Kumar, Jeffery Liao, Guokai Ma, Deepak Narayanan, Tayo
|
| 455 |
+
526 Oguntebi, Gennady Pekhimenko, Lillian Pentecost, Vijay Janapa Reddi, Taylor Robie, Tom St.
|
| 456 |
+
527 John, Tsuguchika Tabaru, Carole-Jean Wu, Lingjie Xu, Masafumi Yamazaki, Cliff Young, and
|
| 457 |
+
|
| 458 |
+
Matei Zaharia. MLPerf training benchmark. arXiv preprint arXiv:1910.01500, 2019. URL https://arxiv.org/abs/1910.01500.
|
| 459 |
+
Yurii E Nesterov. A method for solving the convex programming problem with convergence rate $\mathrm { O } ( 1 / \mathrm { k } ^ { 2 } )$ . In Dokl. akad. nauk Sssr, volume 269, pages 543–547, 1983.
|
| 460 |
+
David Patterson, Joseph Gonzalez, Quoc Le, Chen Liang, Lluis-Miquel Munguia, Daniel Rothchild, David So, Maud Texier, and Jeff Dean. Carbon emissions and large neural network training. arXiv preprint arXiv:2104.10350, 2021.
|
| 461 |
+
Boris T Polyak. Some methods of speeding up the convergence of iteration methods. USSR Computational Mathematics and Mathematical Physics, 4(5):1–17, 1964.
|
| 462 |
+
Robin M Schmidt, Frank Schneider, and Philipp Hennig. Descending through a crowded valley– benchmarking deep learning optimizers. arXiv preprint arXiv:2007.01547, 2020.
|
| 463 |
+
Christopher J Shallue, Jaehoon Lee, Joseph Antognini, Jascha Sohl-Dickstein, Roy Frostig, and George E Dahl. Measuring the effects of data parallelism on neural network training. Journal of Machine Learning Research, 20(112):1–49, 2019.
|
| 464 |
+
Ilya Sutskever, James Martens, George Dahl, and Geoffrey Hinton. On the importance of initialization and momentum in deep learning. In ICML, 2013.
|
| 465 |
+
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2818–2826, 2016.
|
| 466 |
+
Yu Emma Wang, Gu-Yeon Wei, and David Brooks. Benchmarking tpu, gpu, and cpu platforms for deep learning. arXiv preprint arXiv:1907.10701, 2019.
|
| 467 |
+
Yuhuai Wu, Mengye Ren, Renjie Liao, and Roger Grosse. Understanding short-horizon bias in stochastic meta-optimization. arXiv preprint arXiv:1803.02021, 2018.
|
| 468 |
+
Chris Ying, Sameer Kumar, Dehao Chen, Tao Wang, and Youlong Cheng. Image classification at supercomputer scale. arXiv preprint arXiv:1811.06992, 2018.
|
| 469 |
+
Richard York. Ecological paradoxes: William stanley jevons and the paperless office. Human Ecology Review, pages 143–147, 2006.
|
| 470 |
+
Yang You, Igor Gitman, and Boris Ginsburg. Large batch training of convolutional networks. arXiv preprint arXiv:1708.03888, 2017.
|
| 471 |
+
Yang You, Jing Li, Sashank Reddi, Jonathan Hseu, Sanjiv Kumar, Srinadh Bhojanapalli, Xiaodan Song, James Demmel, Kurt Keutzer, and Cho-Jui Hsieh. Large batch optimization for deep learning: Training bert in 76 minutes. In International Conference on Learning Representations, 2019.
|
| 472 |
+
Guodong Zhang, Lala Li, Zachary Nado, James Martens, Sushant Sachdeva, George Dahl, Chris Shallue, and Roger B Grosse. Which algorithmic choices matter at which batch sizes? insights from a noisy quadratic model. In Advances in Neural Information Processing Systems, pages 8196–8207, 2019.
|
| 473 |
+
Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In Proceedings of the 2015 IEEE International Conference on Computer Vision (ICCV), ICCV ’15, page 19–27, USA, 2015. IEEE Computer Society. ISBN 9781467383912. doi: 10.1109/ICCV.2015.11. URL https://doi.org/10.1109/ICCV.2015.11.
|
parse/train/Kloou2uk_Rz/Kloou2uk_Rz_content_list.json
ADDED
|
@@ -0,0 +1,1058 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "A Large Batch Optimizer Reality Check: Traditional, Generic Optimizers Suffice Across Batch Sizes ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
176,
|
| 8 |
+
122,
|
| 9 |
+
820,
|
| 10 |
+
196
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Anonymous Author(s) \nAffiliation \nAddress \nemail ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
423,
|
| 19 |
+
247,
|
| 20 |
+
578,
|
| 21 |
+
301
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Abstract ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
462,
|
| 31 |
+
338,
|
| 32 |
+
535,
|
| 33 |
+
354
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "1 Recently the LARS and LAMB optimizers have been proposed for training neural \n2 networks faster using large batch sizes. LARS and LAMB add layer-wise normal \n3 ization to the update rules of Heavy-ball momentum and Adam, respectively, and \n4 have become popular in prominent benchmarks and deep learning libraries. How \n5 ever, without fair comparisons to standard optimizers, it remains an open question \n6 whether LARS and LAMB have any benefit over traditional, generic algorithms. In \n7 this work we demonstrate that standard optimization algorithms such as Nesterov \n8 momentum and Adam can match or exceed the results of LARS and LAMB at large \n9 batch sizes. Our results establish new, stronger baselines for future comparisons \n10 at these batch sizes and shed light on the difficulties of comparing optimizers for \n11 neural network training more generally. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
148,
|
| 42 |
+
369,
|
| 43 |
+
766,
|
| 44 |
+
522
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "12 1 Introduction ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
148,
|
| 54 |
+
545,
|
| 55 |
+
312,
|
| 56 |
+
563
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "13 In recent years, hardware systems employing GPUs and TPUs have enabled neural network training \n14 programs to process dramatically more data in parallel than ever before. The most popular way to \n15 exploit these systems is to increase the batch size in the optimization algorithm (i.e. the number \n16 of training examples processed per training step). On many workloads, modern systems can scale \n17 to larger batch sizes without significantly increasing the time per step [Jouppi et al., 2017, Wang \n18 et al., 2019], thus proportionally increasing the number of training examples processed per second. \n19 If researchers can use this increased throughput to reduce the time required to train each neural \n20 network, then they should achieve better results by training larger models, using larger datasets, and \n21 by exploring new ideas more rapidly. \n22 As the capacity for data parallelism continues to increase, practitioners can take their existing, \n23 well-tuned training configurations and re-train with larger batch sizes, hoping to achieve the same \n24 performance in less training time [e.g. Ying et al., 2018]. On an idealized data-parallel system with \n25 negligible overhead from increasing the batch size, they might hope to achieve perfect scaling, a \n26 proportional reduction in training time as the batch size increases. ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
147,
|
| 65 |
+
577,
|
| 66 |
+
825,
|
| 67 |
+
702
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "",
|
| 74 |
+
"bbox": [
|
| 75 |
+
148,
|
| 76 |
+
708,
|
| 77 |
+
825,
|
| 78 |
+
777
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "However, achieving perfect scaling is not always straightforward. Changing the batch size changes the training dynamics, requiring the training hyperparameters (e.g. learning rate) to be carefully re-tuned in order to maintain the same level of validation performance.1 In addition, smaller batch sizes provide implicit regularization from gradient noise that may need to be replaced by other forms of regularization when the batch size is increased. Finally, even with perfect tuning, increasing ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
173,
|
| 87 |
+
784,
|
| 88 |
+
825,
|
| 89 |
+
853
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "32 the batch size eventually produces diminishing returns. After a critical batch size, the number of \n33 training steps cannot be decreased in proportion to the batch size – the number of epochs must \n34 increase to match the validation performance of the smaller batch size. See Shallue et al. 2019 for a \n35 survey of the effects of data parallelism on neural network training. Once these effects are taken into \n36 account, there is no strong evidence that increasing the batch size degrades the maximum achievable \n37 performance on any workload. At the same time, the ever-increasing capacity for data parallelism \n38 presents opportunities for new regularization techniques that can replace the gradient noise of smaller \n39 batch sizes and new optimization algorithms that can extend perfect scaling to larger batch sizes by \n40 using more sophisticated gradient information [Zhang et al., 2019]. \n41 You et al. [2017] proposed the LARS optimization algorithm in the hope of speeding up neural \n42 network training by exploiting larger batch sizes. LARS is a variant of stochastic gradient descent \n43 (SGD) with momentum [Polyak, 1964] that applies layer-wise normalization before applying each \n44 gradient update. Although it is difficult to draw strong conclusions from the results presented in the \n45 LARS paper, 2 the MLPerf3 Training benchmark4 adopted LARS as one of two allowed algorithms \n46 in the closed division for ResNet-50 on ImageNet and it became the de facto standard algorithm for \n47 that benchmark task. With MLPerf entrants competing to find the fastest-training hyperparameters \n48 for LARS, the first place submissions in the two most recent MLPerf Training competitions used \n49 LARS to achieve record training speeds with batch sizes of 32,678 and 65,536, respectively. No \n50 publications or competitive submissions to MLPerf have attempted to match these results with a \n51 standard optimizer (e.g. Momentum or Adam). However, MLPerf entrants do not have a strong \n52 incentive (nor are necessarily permitted by the rules) to explore other algorithms because MLPerf \n53 Training is a systems benchmark that requires algorithmic equivalence between submissions to make \n54 fair comparisons. Moreover, since the main justification for LARS is its excellent performance on \n55 ResNet-50 at large batch sizes, more work is needed to quantify any benefit of LARS over standard \n56 algorithms at any batch size. \n57 You et al. [2019] later proposed the LAMB optimizer to speed up pre-training for BERT [Devlin \n58 et al., 2018] using larger batch sizes after concluding that LARS was not effective across workloads. \n59 LAMB is a variant of Adam [Kingma and Ba, 2014] that adds a similar layer-wise normalization step \n60 to LARS. You et al. [2019] used LAMB for BERT pre-training with batch sizes up to 65,536 and \n61 claimed that Adam cannot match the performance of LAMB beyond batch size 16,384. \n62 In this paper, we demonstrate that standard optimizers, without any layer-wise normalization tech \n63 niques, can match or improve upon the large batch size results used to justify LARS and LAMB. In \n64 Section 2, we show that Nesterov momentum [Nesterov, 1983] matches the performance of LARS on \n65 the ResNet-50 benchmark with batch size 32,768. We are the first to match this result with a standard \n66 optimizer. In Section 3, contradicting the claims in You et al. [2019], we show that Adam obtains \n67 better BERT pre-training results than LAMB at the largest batch sizes, resulting in better downstream \n68 performance metrics after fine-tuning. \n69 In addition, we establish a new state-of-the-art for BERT pretraining speed, reaching an F1 score of \n70 90.46 in 7,818 steps using Adam at batch size 65,536 (we report training speed in steps because our \n71 focus is algorithmic efficiency, but since we compare LARS and LAMB to simpler optimizers, fewer \n72 training steps corresponds to faster wall-time in an optimized implementation – our BERT result \n73 with Adam also improves upon the wall-time record of LAMB reported in You et al. 2019). Taken \n74 together, our results establish stronger training speed baselines for these tasks and batch sizes, which \n75 we hope will assist future work aiming to accelerate training using larger batch sizes. ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
147,
|
| 98 |
+
92,
|
| 99 |
+
825,
|
| 100 |
+
215
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 1
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "",
|
| 107 |
+
"bbox": [
|
| 108 |
+
145,
|
| 109 |
+
222,
|
| 110 |
+
825,
|
| 111 |
+
443
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 1
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "",
|
| 118 |
+
"bbox": [
|
| 119 |
+
147,
|
| 120 |
+
449,
|
| 121 |
+
825,
|
| 122 |
+
518
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 1
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "text",
|
| 128 |
+
"text": "",
|
| 129 |
+
"bbox": [
|
| 130 |
+
145,
|
| 131 |
+
525,
|
| 132 |
+
825,
|
| 133 |
+
622
|
| 134 |
+
],
|
| 135 |
+
"page_idx": 1
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"type": "text",
|
| 139 |
+
"text": "",
|
| 140 |
+
"bbox": [
|
| 141 |
+
147,
|
| 142 |
+
628,
|
| 143 |
+
825,
|
| 144 |
+
726
|
| 145 |
+
],
|
| 146 |
+
"page_idx": 1
|
| 147 |
+
},
|
| 148 |
+
{
|
| 149 |
+
"type": "text",
|
| 150 |
+
"text": "In addition to the contributions mentioned above, we demonstrate several key effects that are often overlooked by studies aiming to establish the superiority of new optimization algorithms. We show that future work must carefully disentangle regularization and optimization effects when comparing a new optimizer to baselines. We also report several under-documented details used to generate the best LARS and LAMB results, a reminder that future comparisons should document any novel tricks and include them in baselines. Finally, our results add to existing evidence in the literature on the difficulty of performing independently rigorous hyperparameter tuning for optimizers and baselines. ",
|
| 151 |
+
"bbox": [
|
| 152 |
+
158,
|
| 153 |
+
732,
|
| 154 |
+
825,
|
| 155 |
+
829
|
| 156 |
+
],
|
| 157 |
+
"page_idx": 1
|
| 158 |
+
},
|
| 159 |
+
{
|
| 160 |
+
"type": "text",
|
| 161 |
+
"text": "In particular, we show that the optimal shape of the learning rate schedule is optimizer-dependent (in addition to the scale), and that differences in the schedule can dominate optimizer comparisons at smaller step budgets and become less important at larger step budgets. ",
|
| 162 |
+
"bbox": [
|
| 163 |
+
160,
|
| 164 |
+
92,
|
| 165 |
+
823,
|
| 166 |
+
133
|
| 167 |
+
],
|
| 168 |
+
"page_idx": 2
|
| 169 |
+
},
|
| 170 |
+
{
|
| 171 |
+
"type": "text",
|
| 172 |
+
"text": "86 1.1 Related work ",
|
| 173 |
+
"text_level": 1,
|
| 174 |
+
"bbox": [
|
| 175 |
+
151,
|
| 176 |
+
137,
|
| 177 |
+
305,
|
| 178 |
+
150
|
| 179 |
+
],
|
| 180 |
+
"page_idx": 2
|
| 181 |
+
},
|
| 182 |
+
{
|
| 183 |
+
"type": "text",
|
| 184 |
+
"text": "Shallue et al. [2019] and Zhang et al. [2019] explored the effects of data parallelism on neural network training for different optimizers, finding no evidence that larger batch sizes degrade performance and demonstrating that different optimizers can achieve perfect scaling up to different critical batch sizes. You et al. [2017, 2019] developed the LARS and LAMB optimizers in the hope of speeding up training by achieving perfect scaling beyond standard optimizers. Many other recent papers have proposed new optimization algorithms for generic batch sizes or larger batch sizes [see Schmidt et al., 2020]. Choi et al. [2019] and Schmidt et al. [2020] demonstrated the difficulties with fairly comparing optimizers, showing that the hyperparameter tuning protocol is a key determinant of optimizer rankings. The MLPerf Training benchmark [Mattson et al., 2019] provides a competitive ranking of neural network training systems, but does not shed much light on the relative performance of optimizers because entrants are limited in the algorithms they can use and the hyperparameters they can tune. ",
|
| 185 |
+
"bbox": [
|
| 186 |
+
173,
|
| 187 |
+
162,
|
| 188 |
+
825,
|
| 189 |
+
327
|
| 190 |
+
],
|
| 191 |
+
"page_idx": 2
|
| 192 |
+
},
|
| 193 |
+
{
|
| 194 |
+
"type": "text",
|
| 195 |
+
"text": "99 2 Matching LARS on ImageNet ",
|
| 196 |
+
"text_level": 1,
|
| 197 |
+
"bbox": [
|
| 198 |
+
155,
|
| 199 |
+
333,
|
| 200 |
+
455,
|
| 201 |
+
352
|
| 202 |
+
],
|
| 203 |
+
"page_idx": 2
|
| 204 |
+
},
|
| 205 |
+
{
|
| 206 |
+
"type": "text",
|
| 207 |
+
"text": "100 The MLPerf training benchmark for ResNet-50 v1.5 on ImageNet [Mattson et al., 2019] aims to \n101 reach $7 5 . 9 \\%$ validation accuracy in the shortest possible wall-clock time. In the closed division of \n102 the competition, entrants must choose between two optimizers, SGD with momentum or LARS, and \n103 are only allowed to tune a specified subset of the optimization hyperparameters, with the remaining \n104 hyperparameter values set by the competition rules.5 The winning entries in the two most recent \n105 competitions used LARS with batch size 32,768 for 72 training epochs6 and LARS with batch size \n106 65,536 for 88 training epochs,7 respectively. Kumar et al. [2019] later improved the training time \n107 for batch size 32,768 by reaching the target accuracy in 64 epochs. These are currently the fastest \n108 published results on the ResNet-50 benchmark. However, it has been unclear whether LARS was \n109 necessary to achieve these training speeds since no recent published results or competitive MLPerf \n110 submissions have used another optimizer. In this section, we describe how we matched the 64 epoch, \n111 32,768 batch size result of LARS using standard Nesterov momentum.8 \n112 A fair benchmark of training algorithms or hardware systems must account for stochasticity in \n113 individual training runs. In the MLPerf competition, the benchmark metric is the mean wall-clock \n114 time of 5 trials after the fastest and slowest trials are excluded. Only 4 out of the 5 trials need to reach \n115 the target accuracy and there is no explicit limit on the number of times an entrant can try a different \n116 set of 5 trials. Since our goal is to compare algorithms, rather than systems, we aim to match the \n117 LARS result in terms of training steps instead (but since Nesterov momentum is computationally \n118 simpler than LARS, this would also correspond to faster wall-clock time on an optimized system). \n119 Specifically, we measure the median validation accuracy over 50 training runs with a fixed budget of \n120 2,512 training steps9 at a batch size of 32,768. When we ran the published LARS training pipeline,10 \n121 LARS achieved a median accuracy of $7 5 . 9 7 \\%$ and reached the target in 35 out of 50 trials. We \n122 consider the LARS result to be matched by another optimizer if the median over 50 trials exceeds the \n123 target of $7 5 . 9 \\%$ . ",
|
| 208 |
+
"bbox": [
|
| 209 |
+
142,
|
| 210 |
+
364,
|
| 211 |
+
825,
|
| 212 |
+
530
|
| 213 |
+
],
|
| 214 |
+
"page_idx": 2
|
| 215 |
+
},
|
| 216 |
+
{
|
| 217 |
+
"type": "text",
|
| 218 |
+
"text": "",
|
| 219 |
+
"bbox": [
|
| 220 |
+
140,
|
| 221 |
+
537,
|
| 222 |
+
826,
|
| 223 |
+
702
|
| 224 |
+
],
|
| 225 |
+
"page_idx": 2
|
| 226 |
+
},
|
| 227 |
+
{
|
| 228 |
+
"type": "text",
|
| 229 |
+
"text": "24 2.1 Nesterov momentum at batch size 32k ",
|
| 230 |
+
"text_level": 1,
|
| 231 |
+
"bbox": [
|
| 232 |
+
155,
|
| 233 |
+
712,
|
| 234 |
+
477,
|
| 235 |
+
727
|
| 236 |
+
],
|
| 237 |
+
"page_idx": 2
|
| 238 |
+
},
|
| 239 |
+
{
|
| 240 |
+
"type": "text",
|
| 241 |
+
"text": "This section describes how we used the standard Nesterov momentum optimizer to train the ResNet$5 0 \\mathrm { v } 1 . 5$ on ImageNet to $7 5 . 9 \\%$ validation accuracy in 2,512 update steps at a batch size of 32,768, matching the best published LARS result at this batch size. Although we implemented our own training program, the only logical changes we made to the published LARS pipeline were to the optimizer and the optimization hyperparameters. Our model implementation and data pre-processing pipeline were identical to those required under the MLPerf closed division rules (see Appendix B). ",
|
| 242 |
+
"bbox": [
|
| 243 |
+
173,
|
| 244 |
+
738,
|
| 245 |
+
825,
|
| 246 |
+
820
|
| 247 |
+
],
|
| 248 |
+
"page_idx": 2
|
| 249 |
+
},
|
| 250 |
+
{
|
| 251 |
+
"type": "text",
|
| 252 |
+
"text": "131 We present two Nesterov momentum hyperparameter configurations that achieve comparable per \n132 formance to LARS. Configuration A achieved a median accuracy of $7 5 . 9 7 \\%$ (the same as LARS) \n133 and reached the target accuracy in 34 out of 50 trials. Configuration B is a modified version of \n134 Configuration A designed to make as few changes as possible to the LARS hyperparameters; it \n135 achieved a median accuracy of $7 5 . 9 2 \\%$ and reached the target in 29 out of 50 trials. See Appendix D.1 \n136 for the complete hyperparameter configurations. \n137 To achieve these results, we tuned the hyperparameters of the training pipeline from scratch using \n138 Nesterov momentum. We ran a series of experiments, each of which searched over a hand-designed \n139 hyperparameter search space using quasi-random search [Bousquet et al., 2017]. Between each \n140 experiment, we modified the previous search space and/or tweaked the training program to include \n141 optimization tricks and non-default hyperparameter values we discovered in the state-of-the-art LARS \n142 pipeline. The full sequence of experiments we ran, including the number of trials, hyperparameters \n143 tuned, and search space ranges, are provided in Appendix D.4. Once we had matched the LARS \n144 result with Configuration A, we tried setting each hyperparameter to its value in the LARS pipeline in \n145 order to find the minimal set of changes that still achieved the target result, producing Configuration \n146 B. The remainder of this section describes the hyperparameters we tuned and the techniques we \n147 applied on the journey to these results. ",
|
| 253 |
+
"bbox": [
|
| 254 |
+
140,
|
| 255 |
+
92,
|
| 256 |
+
825,
|
| 257 |
+
174
|
| 258 |
+
],
|
| 259 |
+
"page_idx": 3
|
| 260 |
+
},
|
| 261 |
+
{
|
| 262 |
+
"type": "text",
|
| 263 |
+
"text": "",
|
| 264 |
+
"bbox": [
|
| 265 |
+
140,
|
| 266 |
+
181,
|
| 267 |
+
825,
|
| 268 |
+
333
|
| 269 |
+
],
|
| 270 |
+
"page_idx": 3
|
| 271 |
+
},
|
| 272 |
+
{
|
| 273 |
+
"type": "text",
|
| 274 |
+
"text": "2.1.1 Nesterov Momentum Optimizer ",
|
| 275 |
+
"text_level": 1,
|
| 276 |
+
"bbox": [
|
| 277 |
+
166,
|
| 278 |
+
340,
|
| 279 |
+
446,
|
| 280 |
+
356
|
| 281 |
+
],
|
| 282 |
+
"page_idx": 3
|
| 283 |
+
},
|
| 284 |
+
{
|
| 285 |
+
"type": "text",
|
| 286 |
+
"text": "149 Nesterov momentum is a variant of classical or “heavy-ball” momentum defined by the update rule ",
|
| 287 |
+
"bbox": [
|
| 288 |
+
150,
|
| 289 |
+
364,
|
| 290 |
+
813,
|
| 291 |
+
380
|
| 292 |
+
],
|
| 293 |
+
"page_idx": 3
|
| 294 |
+
},
|
| 295 |
+
{
|
| 296 |
+
"type": "equation",
|
| 297 |
+
"img_path": "images/efdc71a2533c7a791ab07015eb3d5b6e3b78ebe7981e23044c1c93020a4cc2fd.jpg",
|
| 298 |
+
"text": "$$\n\\begin{array} { r l } & { \\boldsymbol { v } _ { t + 1 } = \\mu \\boldsymbol { v } _ { t } + \\nabla \\ell ( \\boldsymbol { \\theta } _ { t } ) , } \\\\ & { \\boldsymbol { \\theta } _ { t + 1 } = \\boldsymbol { \\theta } _ { t } - \\eta _ { t } \\left( \\mu v _ { t + 1 } + \\nabla \\ell ( \\boldsymbol { \\theta } _ { t } ) \\right) , } \\end{array}\n$$",
|
| 299 |
+
"text_format": "latex",
|
| 300 |
+
"bbox": [
|
| 301 |
+
382,
|
| 302 |
+
382,
|
| 303 |
+
614,
|
| 304 |
+
420
|
| 305 |
+
],
|
| 306 |
+
"page_idx": 3
|
| 307 |
+
},
|
| 308 |
+
{
|
| 309 |
+
"type": "text",
|
| 310 |
+
"text": "150 where $v _ { 0 } = 0$ , $\\theta _ { t }$ is the vector of model parameters after $t$ steps, $\\nabla \\ell ( \\theta _ { t } )$ is the gradient of the loss \n151 function $\\ell ( \\theta )$ averaged over a batch of training examples, $\\mu$ is the momentum, and $\\eta _ { t }$ is the learning \n152 rate for step $t$ . We prefer Nesterov momentum over classical momentum because it tolerates larger \n153 values of its momentum parameter [Sutskever et al., 2013] and sometimes outperforms classical \n154 momentum, although the two algorithms perform similarly on many tasks [Shallue et al., 2019, Choi \n155 et al., 2019]. We tuned the Nesterov momentum $\\mu$ in Configurations A and B. We discuss the learning \n156 rate schedule $\\{ \\eta _ { t } \\}$ separately in Section 2.1.4. ",
|
| 311 |
+
"bbox": [
|
| 312 |
+
142,
|
| 313 |
+
421,
|
| 314 |
+
825,
|
| 315 |
+
520
|
| 316 |
+
],
|
| 317 |
+
"page_idx": 3
|
| 318 |
+
},
|
| 319 |
+
{
|
| 320 |
+
"type": "text",
|
| 321 |
+
"text": "2.1.2 Batch normalization ",
|
| 322 |
+
"text_level": 1,
|
| 323 |
+
"bbox": [
|
| 324 |
+
168,
|
| 325 |
+
527,
|
| 326 |
+
367,
|
| 327 |
+
541
|
| 328 |
+
],
|
| 329 |
+
"page_idx": 3
|
| 330 |
+
},
|
| 331 |
+
{
|
| 332 |
+
"type": "text",
|
| 333 |
+
"text": "158 The ResNet-50 v1.5 model uses batch normalization [Ioffe and Szegedy, 2015], defined as ",
|
| 334 |
+
"bbox": [
|
| 335 |
+
151,
|
| 336 |
+
550,
|
| 337 |
+
766,
|
| 338 |
+
565
|
| 339 |
+
],
|
| 340 |
+
"page_idx": 3
|
| 341 |
+
},
|
| 342 |
+
{
|
| 343 |
+
"type": "equation",
|
| 344 |
+
"img_path": "images/1c881c45e4e69cf65dfd55f848cb8845cfe4404a168ffb16ba86426b6684f056.jpg",
|
| 345 |
+
"text": "$$\n\\mathtt { B N } ( x ^ { ( l ) } ) = \\left( \\frac { x ^ { ( l ) } - \\mathtt { m e a n } ( x ^ { ( l ) } ) } { \\sqrt { \\mathsf { v a r } ( x ^ { ( l ) } ) + \\epsilon } } \\right) \\times \\gamma ^ { ( l ) } + \\beta ^ { ( l ) } ,\n$$",
|
| 346 |
+
"text_format": "latex",
|
| 347 |
+
"bbox": [
|
| 348 |
+
338,
|
| 349 |
+
569,
|
| 350 |
+
656,
|
| 351 |
+
612
|
| 352 |
+
],
|
| 353 |
+
"page_idx": 3
|
| 354 |
+
},
|
| 355 |
+
{
|
| 356 |
+
"type": "text",
|
| 357 |
+
"text": "159 where $x ^ { ( l ) }$ is a vector of pre-normalization outputs from layer $l$ $, \\mathtt { m e a n } ( \\cdot )$ and $\\mathtt { v a r } ( \\cdot )$ denote the \n160 element-wise sample mean and variance across the batch of training examples,11 and $\\gamma ^ { ( l ) }$ and $\\beta ^ { ( l ) }$ \n161 are trainable model parameters. \n162 Batch normalization introduces the following tuneable hyperparameters: $\\epsilon$ , the small constant added \n163 to the sample variance; the initial values of $\\gamma ^ { ( l ) }$ and $\\dot { \\beta ^ { ( l ) } }$ ; and $\\rho$ , which governs the exponential \n164 moving averages of the scaling factors used in evaluation. The LARS pipeline uses $\\epsilon = \\mathrm { 1 0 ^ { - 5 } }$ and \n165 $\\rho = 0 . 9$ . It sets the initial value of $\\beta ^ { ( l ) }$ to 0.0 everywhere, but the initial value of $\\gamma ^ { ( l ) }$ depends on \n166 the layer: it sets $\\gamma ^ { ( l ) }$ to 0.0 in the final batch normalization layer of each residual block, and to 1.0 \n167 everywhere else. In Configuration A, we tuned $\\epsilon$ , $\\rho$ , and $\\gamma _ { 0 }$ , the initial value of $\\gamma ^ { ( l ) }$ in the final batch \n168 normalization layer of each residual block. In Configuration B, we used the same values as LARS for \n169 $\\epsilon$ and $\\rho$ , but we found that choosing $\\gamma _ { 0 }$ between 0.0 and 1.0 was important for matching the LARS \n170 result with Nesterov momentum. ",
|
| 358 |
+
"bbox": [
|
| 359 |
+
142,
|
| 360 |
+
617,
|
| 361 |
+
825,
|
| 362 |
+
661
|
| 363 |
+
],
|
| 364 |
+
"page_idx": 3
|
| 365 |
+
},
|
| 366 |
+
{
|
| 367 |
+
"type": "text",
|
| 368 |
+
"text": "",
|
| 369 |
+
"bbox": [
|
| 370 |
+
140,
|
| 371 |
+
666,
|
| 372 |
+
825,
|
| 373 |
+
797
|
| 374 |
+
],
|
| 375 |
+
"page_idx": 3
|
| 376 |
+
},
|
| 377 |
+
{
|
| 378 |
+
"type": "text",
|
| 379 |
+
"text": "2.1.3 Regularization ",
|
| 380 |
+
"text_level": 1,
|
| 381 |
+
"bbox": [
|
| 382 |
+
169,
|
| 383 |
+
810,
|
| 384 |
+
328,
|
| 385 |
+
825
|
| 386 |
+
],
|
| 387 |
+
"page_idx": 3
|
| 388 |
+
},
|
| 389 |
+
{
|
| 390 |
+
"type": "text",
|
| 391 |
+
"text": "72 In Configuration A, we tuned both the L2 regularization coefficient $\\lambda$ and label smoothing coefficient 73 $\\tau$ [Szegedy et al., 2016]. The LARS pipeline uses $\\lambda ~ = ~ 1 0 ^ { - 4 }$ and $\\tau ~ = ~ 0 . 1$ ",
|
| 392 |
+
"bbox": [
|
| 393 |
+
156,
|
| 394 |
+
835,
|
| 395 |
+
825,
|
| 396 |
+
863
|
| 397 |
+
],
|
| 398 |
+
"page_idx": 3
|
| 399 |
+
},
|
| 400 |
+
{
|
| 401 |
+
"type": "text",
|
| 402 |
+
"text": "174 Crucially, the LARS pipeline does not apply L2 regularization to the bias variables of the \n175 ResNet model nor the batch normalization parameters $\\gamma ^ { ( l ) }$ and $\\beta ^ { ( l ) }$ (indeed, the published \n176 LARS pipeline does not even apply LARS to these parameters – it uses Heavy-ball momen \n177 tum). This detail is extremely important for both LARS and Nesterov momentum to achieve \n178 the fastest training speed. Configuration $\\mathbf { B }$ used the same $\\lambda$ and $\\tau$ as Configuration A. \n179 ",
|
| 403 |
+
"bbox": [
|
| 404 |
+
140,
|
| 405 |
+
90,
|
| 406 |
+
825,
|
| 407 |
+
175
|
| 408 |
+
],
|
| 409 |
+
"page_idx": 4
|
| 410 |
+
},
|
| 411 |
+
{
|
| 412 |
+
"type": "text",
|
| 413 |
+
"text": "0 2.1.4 Learning rate schedule ",
|
| 414 |
+
"text_level": 1,
|
| 415 |
+
"bbox": [
|
| 416 |
+
158,
|
| 417 |
+
190,
|
| 418 |
+
385,
|
| 419 |
+
205
|
| 420 |
+
],
|
| 421 |
+
"page_idx": 4
|
| 422 |
+
},
|
| 423 |
+
{
|
| 424 |
+
"type": "text",
|
| 425 |
+
"text": "181 The LARS pipeline uses a piecewise polynomial schedule ",
|
| 426 |
+
"bbox": [
|
| 427 |
+
142,
|
| 428 |
+
214,
|
| 429 |
+
555,
|
| 430 |
+
229
|
| 431 |
+
],
|
| 432 |
+
"page_idx": 4
|
| 433 |
+
},
|
| 434 |
+
{
|
| 435 |
+
"type": "equation",
|
| 436 |
+
"img_path": "images/bd068604af9f1ab2f50b1658dc9f031cdd3ce437f606923a4912320d70d726de.jpg",
|
| 437 |
+
"text": "$$\n\\eta _ { t } = \\left\\{ \\begin{array} { l l } { \\eta _ { \\mathrm { i n i t } } + ( \\eta _ { \\mathrm { p e a k } } - \\eta _ { \\mathrm { i n i t } } ) \\left( \\frac { t } { t _ { \\mathrm { w a r m u p } } } \\right) ^ { p _ { \\mathrm { w a r m u p } } } , } & { t \\leq t _ { \\mathrm { w a r m u p } } } \\\\ { \\eta _ { \\mathrm { f i n a l } } + ( \\eta _ { \\mathrm { p e a k } } - \\eta _ { \\mathrm { f i n a l } } ) \\left( \\frac { T - t } { T - t _ { \\mathrm { w a r m u p } } } \\right) ^ { p _ { \\mathrm { d e c a y } } } } & { t > t _ { \\mathrm { w a r m u p } } , } \\end{array} \\right.\n$$",
|
| 438 |
+
"text_format": "latex",
|
| 439 |
+
"bbox": [
|
| 440 |
+
178,
|
| 441 |
+
236,
|
| 442 |
+
573,
|
| 443 |
+
286
|
| 444 |
+
],
|
| 445 |
+
"page_idx": 4
|
| 446 |
+
},
|
| 447 |
+
{
|
| 448 |
+
"type": "text",
|
| 449 |
+
"text": "182 with $\\eta _ { \\mathrm { i n i t } } ~ = ~ 0 . 0$ , $\\eta _ { \\mathrm { p e a k } } ~ = ~ 2 9 . 0$ , $\\eta _ { \\mathrm { f i n a l } } = 1 0 ^ { - 4 }$ , $p _ { \\mathrm { w a r m u p } } ~ = ~ 1$ , \n183 $p _ { \\mathrm { d e c a y } } = 2$ , and $t _ { \\mathrm { w a r m u p } } = 7 0 6$ steps. In Configuration A, we re \n184 tuned all of these hyperparameters with Nesterov momentum. \n185 In Configuration B, we set $\\eta _ { \\mathrm { i n i t } } , p _ { \\mathrm { d e c a y } }$ , and $t _ { \\mathrm { w a r m u p } }$ to the same \n186 values as LARS, changing only $p _ { \\mathrm { w a r m u p } }$ from 1 to 2 and re \n187 scaling $\\eta _ { \\mathrm { p e a k } }$ and $\\eta _ { \\mathrm { f i n a l } }$ . ",
|
| 450 |
+
"bbox": [
|
| 451 |
+
142,
|
| 452 |
+
294,
|
| 453 |
+
583,
|
| 454 |
+
378
|
| 455 |
+
],
|
| 456 |
+
"page_idx": 4
|
| 457 |
+
},
|
| 458 |
+
{
|
| 459 |
+
"type": "table",
|
| 460 |
+
"img_path": "images/960bb063dcbb937261aa04f7870b17ffa743518f13bf62ba25cd8f605bebbdd4.jpg",
|
| 461 |
+
"table_caption": [
|
| 462 |
+
"Table 1: The hyperparameters of Configuration $\\mathbf { B }$ that differ from state-of-the-art LARS at batch size 32,768 [Kumar et al., 2019]. "
|
| 463 |
+
],
|
| 464 |
+
"table_footnote": [],
|
| 465 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Nesterov</td><td rowspan=1 colspan=1>LARS</td></tr><tr><td rowspan=1 colspan=1>Pwarmup</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>1</td></tr><tr><td rowspan=1 colspan=1>npeak</td><td rowspan=1 colspan=1>7.05</td><td rowspan=1 colspan=1>29.0</td></tr><tr><td rowspan=1 colspan=1>Mfinal</td><td rowspan=1 colspan=1>6×10-6</td><td rowspan=1 colspan=1>10-4</td></tr><tr><td rowspan=1 colspan=1>1-μ</td><td rowspan=1 colspan=1>0.02397</td><td rowspan=1 colspan=1>0.071</td></tr><tr><td rowspan=1 colspan=1>入</td><td rowspan=1 colspan=1>5.8× 10-5</td><td rowspan=1 colspan=1>10-4</td></tr><tr><td rowspan=1 colspan=1>T</td><td rowspan=1 colspan=1>0.15</td><td rowspan=1 colspan=1>0.10</td></tr><tr><td rowspan=1 colspan=1>20</td><td rowspan=1 colspan=1>0.4138</td><td rowspan=1 colspan=1>0.0</td></tr></table>",
|
| 466 |
+
"bbox": [
|
| 467 |
+
596,
|
| 468 |
+
179,
|
| 469 |
+
821,
|
| 470 |
+
330
|
| 471 |
+
],
|
| 472 |
+
"page_idx": 4
|
| 473 |
+
},
|
| 474 |
+
{
|
| 475 |
+
"type": "text",
|
| 476 |
+
"text": "2.1.5 Comparing Nesterov momentum and LARS ",
|
| 477 |
+
"text_level": 1,
|
| 478 |
+
"bbox": [
|
| 479 |
+
174,
|
| 480 |
+
387,
|
| 481 |
+
532,
|
| 482 |
+
401
|
| 483 |
+
],
|
| 484 |
+
"page_idx": 4
|
| 485 |
+
},
|
| 486 |
+
{
|
| 487 |
+
"type": "text",
|
| 488 |
+
"text": "Table 1 shows the hyperparameter values for Configuration B that differ from the stateof-the-art LARS pipeline. Aside from re-tuning the momentum, learning rate scale, and regularization hyperparameters (whose optimal values are all expected to change with the optimizer), the only changes are setting pwarmup to 2 instead of 1 and re-tuning $\\gamma _ { 0 }$ . ",
|
| 489 |
+
"bbox": [
|
| 490 |
+
174,
|
| 491 |
+
410,
|
| 492 |
+
826,
|
| 493 |
+
467
|
| 494 |
+
],
|
| 495 |
+
"page_idx": 4
|
| 496 |
+
},
|
| 497 |
+
{
|
| 498 |
+
"type": "text",
|
| 499 |
+
"text": "Figure 1 shows the LARS learning rate schedule compared to the Nesterov momentum schedule. Even though these schedules are similar, we found that each optimizer had a different optimal value of the warmup polynomial power. As Table 2 shows, Nesterov momentum performs better with $p _ { \\mathrm { w a r m u p } } = 2$ instead of 1, while the opposite is true with LARS. As discussed in Agarwal et al. [2020], optimizers can induce implicit step size schedules that strongly influence their training dynamics and solution quality, and it appears from Table 2 that the implicit step sizes of Nesterov momentum and LARS may evolve differently, causing the shapes of their optimal learning rate schedules to differ. ",
|
| 500 |
+
"bbox": [
|
| 501 |
+
174,
|
| 502 |
+
486,
|
| 503 |
+
549,
|
| 504 |
+
665
|
| 505 |
+
],
|
| 506 |
+
"page_idx": 4
|
| 507 |
+
},
|
| 508 |
+
{
|
| 509 |
+
"type": "image",
|
| 510 |
+
"img_path": "images/2f8ee9fbd647edfc29620ab05ad83789ec24ada14153477e1c0fea9229d488d2.jpg",
|
| 511 |
+
"image_caption": [
|
| 512 |
+
"Figure 1: The learning rate schedules of LARS and Nesterov momentum Configuration B. Aside from re-scaling, the only difference is setting the warmup polynomial power to 2 instead of 1. "
|
| 513 |
+
],
|
| 514 |
+
"image_footnote": [],
|
| 515 |
+
"bbox": [
|
| 516 |
+
562,
|
| 517 |
+
483,
|
| 518 |
+
821,
|
| 519 |
+
582
|
| 520 |
+
],
|
| 521 |
+
"page_idx": 4
|
| 522 |
+
},
|
| 523 |
+
{
|
| 524 |
+
"type": "text",
|
| 525 |
+
"text": "207 Although the main concern of a practitioner is validation performance, the primary task of an \n208 optimization algorithm is to minimize training loss. Table 2 shows that Nesterov momentum achieves \n209 higher training accuracy than LARS, despite similar validation performance. Thus, it may be more \n210 appropriate to consider the layerwise normalization of LARS to be a regularization technique, rather \n211 than an optimization technique. \n12 Spending even more effort tuning LARS or Nesterov momentum would likely further improve the \n213 current state-of-the-art for that optimizer. Meaningful optimizer comparisons are only possible \n214 with independent and equally intensive tuning efforts, and we do not claim that either optimizer \n215 outperforms the other on this benchmark. That said, if the main evidence for LARS’s utility as a \n216 “large-batch optimizer” is its performance on this particular benchmark, then more evidence is needed \n217 to quantify any benefit it has over traditional, generic optimizers like Nesterov momentum. ",
|
| 526 |
+
"bbox": [
|
| 527 |
+
142,
|
| 528 |
+
671,
|
| 529 |
+
825,
|
| 530 |
+
742
|
| 531 |
+
],
|
| 532 |
+
"page_idx": 4
|
| 533 |
+
},
|
| 534 |
+
{
|
| 535 |
+
"type": "text",
|
| 536 |
+
"text": "",
|
| 537 |
+
"bbox": [
|
| 538 |
+
148,
|
| 539 |
+
747,
|
| 540 |
+
825,
|
| 541 |
+
832
|
| 542 |
+
],
|
| 543 |
+
"page_idx": 4
|
| 544 |
+
},
|
| 545 |
+
{
|
| 546 |
+
"type": "text",
|
| 547 |
+
"text": "2.2 Lessons learned ",
|
| 548 |
+
"text_level": 1,
|
| 549 |
+
"bbox": [
|
| 550 |
+
173,
|
| 551 |
+
844,
|
| 552 |
+
323,
|
| 553 |
+
858
|
| 554 |
+
],
|
| 555 |
+
"page_idx": 4
|
| 556 |
+
},
|
| 557 |
+
{
|
| 558 |
+
"type": "text",
|
| 559 |
+
"text": "In hindsight, it was only necessary to make a few changes to the LARS pipeline to match its performance at batch size 32,768 with Nesterov momentum. However, Table 1 does not accurately represent the effort required when attempting to match a highly tuned training-speed benchmark. ",
|
| 560 |
+
"bbox": [
|
| 561 |
+
158,
|
| 562 |
+
869,
|
| 563 |
+
823,
|
| 564 |
+
911
|
| 565 |
+
],
|
| 566 |
+
"page_idx": 4
|
| 567 |
+
},
|
| 568 |
+
{
|
| 569 |
+
"type": "table",
|
| 570 |
+
"img_path": "images/0a3398c59a9bceb97b5b0b432f654aea59182d4c718b693994d833fb5dc2c482.jpg",
|
| 571 |
+
"table_caption": [
|
| 572 |
+
"Table 2: (Left) The best warmup schedule differs for Nesterov momentum and LARS. Values are medians over 50 training runs after setting $p _ { \\mathrm { w a r m u p } }$ without retuning other hyperparameters. (Right) Median train and test accuracies over 50 training runs for Nesterov momentum Configuration B and LARS. "
|
| 573 |
+
],
|
| 574 |
+
"table_footnote": [],
|
| 575 |
+
"table_body": "<table><tr><td rowspan=2 colspan=1>Pwarmup</td><td rowspan=2 colspan=1>Nesterov</td><td rowspan=2 colspan=1>LARS</td><td rowspan=2 colspan=2></td><td rowspan=1 colspan=1></td><td rowspan=2 colspan=1></td><td rowspan=2 colspan=1>Optimizer</td><td rowspan=2 colspan=1>Train Acc</td></tr><tr><td rowspan=1 colspan=2></td></tr><tr><td rowspan=2 colspan=1>1</td><td rowspan=2 colspan=1>75.79%</td><td rowspan=2 colspan=1>75.97%</td><td rowspan=2 colspan=2></td><td rowspan=1 colspan=1></td><td rowspan=2 colspan=1></td><td rowspan=2 colspan=1>Nesterov</td><td rowspan=2 colspan=1>78.97%</td></tr><tr><td rowspan=1 colspan=2></td></tr><tr><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>75.92%</td><td rowspan=1 colspan=1>75.69%</td><td rowspan=1 colspan=3></td><td rowspan=1 colspan=1>LARS</td><td rowspan=1 colspan=1>78.07%</td><td rowspan=1 colspan=1>75.97%</td></tr></table>",
|
| 576 |
+
"bbox": [
|
| 577 |
+
246,
|
| 578 |
+
88,
|
| 579 |
+
753,
|
| 580 |
+
146
|
| 581 |
+
],
|
| 582 |
+
"page_idx": 5
|
| 583 |
+
},
|
| 584 |
+
{
|
| 585 |
+
"type": "text",
|
| 586 |
+
"text": "222 Firstly, as described in Sections 2.1.2 and 2.1.3, the strong results of LARS depend partly on a few \n223 subtle optimization tricks and non-default values of uncommonly-tuned hyperparameters. Fortunately, \n224 in this case we could discover these tricks by examining the open-source code required for MLPerf \n225 submissions, but machine learning research papers do not always report these important details. \n226 Researchers can easily waste a lot of experiments and produce misleading results before getting all of \n227 these details right. We demonstrate the importance of adding these tricks to our Nesterov momentum \n228 pipeline in Appendix C; without these tricks (or some new tricks), we likely would not have been \n229 able to match the LARS performance. \n230 Secondly, the learning rate schedule really matters when trying to maximize performance with a \n231 relatively small step budget. Both LARS and Nesterov momentum are sensitive to small deviations \n232 from the optimized learning rate schedules in Figure 1, and neither schedule works as well for the \n233 other optimizer. Although relatively minor changes were sufficient to match LARS with Nesterov \n234 momentum, there is no way to know a priori how the optimal schedule will look for a new optimizer \n235 Wu et al. [2018]. Even in toy settings where the optimal learning rate schedule can be derived, it \n236 does not fit into commonly used schedule families and depends strongly on the optimizer Zhang \n237 et al. [2019]. Indeed, this problem applies to the other optimization hyperparameters as well: it \n238 is extremely difficult to know which are worth considering ahead of time. Finally, even when we \n239 narrowed down our hyperparemeter search spaces around the optimal point, the volume of our search \n240 spaces corresponding to near-peak performance was small, likely due to the small step budget [Shallue \n241 et al., 2019]. We investigate how these effects change with a less stringent step budget in Section 4. ",
|
| 587 |
+
"bbox": [
|
| 588 |
+
138,
|
| 589 |
+
241,
|
| 590 |
+
825,
|
| 591 |
+
352
|
| 592 |
+
],
|
| 593 |
+
"page_idx": 5
|
| 594 |
+
},
|
| 595 |
+
{
|
| 596 |
+
"type": "text",
|
| 597 |
+
"text": "",
|
| 598 |
+
"bbox": [
|
| 599 |
+
140,
|
| 600 |
+
358,
|
| 601 |
+
825,
|
| 602 |
+
523
|
| 603 |
+
],
|
| 604 |
+
"page_idx": 5
|
| 605 |
+
},
|
| 606 |
+
{
|
| 607 |
+
"type": "text",
|
| 608 |
+
"text": "242 3 Stronger BERT pretraining speed baselines ",
|
| 609 |
+
"text_level": 1,
|
| 610 |
+
"bbox": [
|
| 611 |
+
143,
|
| 612 |
+
535,
|
| 613 |
+
568,
|
| 614 |
+
553
|
| 615 |
+
],
|
| 616 |
+
"page_idx": 5
|
| 617 |
+
},
|
| 618 |
+
{
|
| 619 |
+
"type": "text",
|
| 620 |
+
"text": "243 You et al. [2019] developed the LAMB optimizer in the hope of speeding up training for BERT-Large \n244 [Bidirectional Encoder Representations from Transformers, Devlin et al., 2018]. BERT training \n245 consists of two phases. The “pretraining” phase has two objectives: (1) predicting masked tokens \n246 based on the rest of the sequence (a masked language model), and (2) predicting whether two \n247 given sentences follow one from another. Finally, the “fine-tuning” phase refines the model for a \n248 downstream task of interest. BERT pretraining takes a considerable amount of time (up to 3 days on \n249 16 Cloud TPU-v3 chips Jouppi et al. [2017]), whereas the fine-tuning phase is typically much faster. \n250 Model quality is typically assessed on the downstream metrics, not on pretraining loss, making BERT \n251 training a somewhat awkward benchmark for optimization research. \n252 You et al. [2019] used LAMB for BERT pretraining with batch sizes up to 65,536 and claimed that \n253 LAMB outperforms Adam batch size 16,384 and beyond. The LAMB optimizer has since appeared \n254 in several NLP toolkits, including as Microsoft DeepSpeed and NVIDIA Multi-node BERT training, \n255 and as a benchmark task in MLPerf v0.7.12 ",
|
| 621 |
+
"bbox": [
|
| 622 |
+
140,
|
| 623 |
+
568,
|
| 624 |
+
825,
|
| 625 |
+
694
|
| 626 |
+
],
|
| 627 |
+
"page_idx": 5
|
| 628 |
+
},
|
| 629 |
+
{
|
| 630 |
+
"type": "text",
|
| 631 |
+
"text": "",
|
| 632 |
+
"bbox": [
|
| 633 |
+
142,
|
| 634 |
+
699,
|
| 635 |
+
825,
|
| 636 |
+
755
|
| 637 |
+
],
|
| 638 |
+
"page_idx": 5
|
| 639 |
+
},
|
| 640 |
+
{
|
| 641 |
+
"type": "text",
|
| 642 |
+
"text": "As shown in Table 3, we trained Adam (with decoupled weight decay) baselines that achieve better results than both the LAMB and Adam results reported in You et al. [2019]. Our new Adam baselines obtain better F1 scores on the development set of the SQuaD v1.1 task in the same number of training steps as LAMB for both batch size 32,768 and the hybrid 65,536-then-32,768 batch size training regime in You et al. [2019]. We also ran Adam at batch size 65,536 to reach nearly the same F1 score as the hybrid batch size LAMB result, but in much fewer training steps. We believe 7,818 steps is a new state-of-the-art for BERT pretraining speed [in our experiments, it also improves upon the 76-minute record claimed in You et al., 2019]. Additionally, at batch size 32,768 our Adam baseline got a better pretraining loss of 1.277 compared to LAMB’s 1.342. ",
|
| 643 |
+
"bbox": [
|
| 644 |
+
173,
|
| 645 |
+
762,
|
| 646 |
+
825,
|
| 647 |
+
887
|
| 648 |
+
],
|
| 649 |
+
"page_idx": 5
|
| 650 |
+
},
|
| 651 |
+
{
|
| 652 |
+
"type": "text",
|
| 653 |
+
"text": "266 We used the same experimental setup as You \n267 et al. [2019], including two pretraining phases \n268 with max sequence lengths of 128 and then 512. \n269 In order to match You et al. [2019], we reported \n270 the F1 score on the downstream SQuaD v1.1 \n271 task as the target metric, although this metric \n272 introduces potential confounds: optimization \n273 efficiency should be measured on the training \n274 task using training and held-out data sets. Fortunately, in this case better pretraining performance \n275 correlated a with higher F1 score after fine-tuning. See Appendix B.2 for additional experiment \n276 details. We tuned Adam hyperparameters independently for each pretraining phase, specifically \n277 learning rate $\\eta$ , $\\beta _ { 1 }$ , $\\beta _ { 2 }$ , the polynomial power for the learning rate warmup $p _ { w a r m u p }$ , and weight \n278 decay $\\lambda$ , using quasi-random search [Bousquet et al., 2017]. See Appendix D.2 for the search spaces. \n279 In addition to hyperparmeter tuning, our improved Adam results at these batch sizes are also likely \n280 due to two implementation differences. First, the Adam implementation in You et al. [2019] comes \n281 from the BERT open source code base, in which Adam is missing the standard bias correction.13 \n282 The Adam bias correction acts as an additional step size warm-up, thereby potentially improving the \n283 stability in the initial steps of training. Second, the BERT learning rate schedule had a discontinuity \n284 at the start of the decay phase due to the learning rate decay being incorrectly applied during warm-up \n285 14 (see Figure 2 in Appendix B). This peculiarity is part of the official BERT release and is present in \n286 $3 0 0 0 +$ copies of the BERT Training code on GitHub. ",
|
| 654 |
+
"bbox": [
|
| 655 |
+
140,
|
| 656 |
+
112,
|
| 657 |
+
485,
|
| 658 |
+
222
|
| 659 |
+
],
|
| 660 |
+
"page_idx": 6
|
| 661 |
+
},
|
| 662 |
+
{
|
| 663 |
+
"type": "table",
|
| 664 |
+
"img_path": "images/07f4bc2610dee23396b84bef68f5f791ea832a34f8712fa6e36d6c491f5ff529.jpg",
|
| 665 |
+
"table_caption": [
|
| 666 |
+
"Table 3: Using Adam for pretraining exceeds the reported performance of LAMB in You et al. [2019] in terms of F1 score on the downstream SQuaD v1.1 task. "
|
| 667 |
+
],
|
| 668 |
+
"table_footnote": [],
|
| 669 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>Batch size</td><td rowspan=1 colspan=1>Step budget</td><td rowspan=1 colspan=1>LAMB</td><td rowspan=1 colspan=1>Adam</td></tr><tr><td rowspan=1 colspan=1>32k</td><td rowspan=1 colspan=1>15,625</td><td rowspan=1 colspan=1>91.48</td><td rowspan=1 colspan=1>91.58</td></tr><tr><td rowspan=1 colspan=1>65k/32k</td><td rowspan=1 colspan=1>8,599</td><td rowspan=1 colspan=1>90.58</td><td rowspan=1 colspan=1>91.04</td></tr><tr><td rowspan=1 colspan=1>65k</td><td rowspan=1 colspan=1>7,818</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>90.46</td></tr></table>",
|
| 670 |
+
"bbox": [
|
| 671 |
+
503,
|
| 672 |
+
93,
|
| 673 |
+
818,
|
| 674 |
+
152
|
| 675 |
+
],
|
| 676 |
+
"page_idx": 6
|
| 677 |
+
},
|
| 678 |
+
{
|
| 679 |
+
"type": "text",
|
| 680 |
+
"text": "",
|
| 681 |
+
"bbox": [
|
| 682 |
+
140,
|
| 683 |
+
223,
|
| 684 |
+
825,
|
| 685 |
+
292
|
| 686 |
+
],
|
| 687 |
+
"page_idx": 6
|
| 688 |
+
},
|
| 689 |
+
{
|
| 690 |
+
"type": "text",
|
| 691 |
+
"text": "",
|
| 692 |
+
"bbox": [
|
| 693 |
+
142,
|
| 694 |
+
297,
|
| 695 |
+
826,
|
| 696 |
+
409
|
| 697 |
+
],
|
| 698 |
+
"page_idx": 6
|
| 699 |
+
},
|
| 700 |
+
{
|
| 701 |
+
"type": "text",
|
| 702 |
+
"text": "287 4 Investigating a less stringent step budget ",
|
| 703 |
+
"text_level": 1,
|
| 704 |
+
"bbox": [
|
| 705 |
+
148,
|
| 706 |
+
416,
|
| 707 |
+
544,
|
| 708 |
+
433
|
| 709 |
+
],
|
| 710 |
+
"page_idx": 6
|
| 711 |
+
},
|
| 712 |
+
{
|
| 713 |
+
"type": "text",
|
| 714 |
+
"text": "Part of what makes comparing optimizers so difficult is that the hyperparameter tuning tends to dominate the comparisons [Choi et al., 2019]. Moreover, tuning becomes especially difficult when we demand a fixed epoch budget even when dramatically increasing the batch size [Shallue et al., 2019]. Fixing the epoch budget as the batch size increases is equivalent to demanding perfect scaling (i.e. that the number of training steps decreases by the same factor that the batch size is increased). We can view the role of hyperparameter tuning for large batch training as resisting the inevitable end of perfect scaling. For example, it might be possible to extend perfect scaling using delicately tuned learning rate schedules, but comparing optimizers under these conditions can make the learning rate schedule dominate the comparison by favoring some algorithms over others. Therefore, in order to better understand the behavior of LARS and LAMB compared to Nesterov Momentum and Adam, we ran additional ResNet-50 experiments with a more generous 6,000 step budget (vs 2,512 in Section 2) and a more simplistic cosine learning rate schedule. At batch size 32,768, this budget should let us reach better validation accuracy than the MLPerf target of $7 5 . 9 \\%$ . ",
|
| 715 |
+
"bbox": [
|
| 716 |
+
156,
|
| 717 |
+
446,
|
| 718 |
+
825,
|
| 719 |
+
626
|
| 720 |
+
],
|
| 721 |
+
"page_idx": 6
|
| 722 |
+
},
|
| 723 |
+
{
|
| 724 |
+
"type": "text",
|
| 725 |
+
"text": "301 Although not mentioned in You et al. [2017], the state-of-the-art MLPerf pipeline for “LARS” actually \n302 uses both LARS and Heavy-ball Momentum, with Momentum applied to the batch normalization and \n303 ResNet bias parameters and LARS applied to the other parameters. You et al. [2019] does not mention \n304 whether LAMB was only applied to some parameters and not others. If layerwise normalization can \n305 be harmful for some model parameters, this is critical information for practitioners using LARS or \n306 LAMB, since it might not be obvious which optimizer to apply to which parameters. To investigate \n307 this, we trained both pure LARS and LAMB configurations, as well as configurations that did not \n308 apply layerwise normalization to the batch normalization and ResNet bias parameters. Moreover, \n309 LAMB’s underlying Adam implementation defaults to $\\epsilon = 1 0 ^ { - 6 }$ , rather than the typical $1 0 ^ { - 7 }$ or \n310 $1 0 ^ { - 8 }$ . In some cases, $\\epsilon$ can be a critical hyperparameter for Adam [Choi et al., 2019], so we included \n311 Adam configurations with both $\\epsilon = 1 0 ^ { - 6 }$ and $\\epsilon = 1 0 ^ { - 8 }$ . ",
|
| 726 |
+
"bbox": [
|
| 727 |
+
142,
|
| 728 |
+
632,
|
| 729 |
+
825,
|
| 730 |
+
784
|
| 731 |
+
],
|
| 732 |
+
"page_idx": 6
|
| 733 |
+
},
|
| 734 |
+
{
|
| 735 |
+
"type": "text",
|
| 736 |
+
"text": "Table 4 shows the validation accuracy of these different configurations after training for 6,000 steps with batch size 32,768. In every case, we used a simple cosine decay learning rate schedule and tuned the initial learning rate and weight decay using quasi-random search. We used momentum parameters of 0.98 for Nesterov momentum and 0.929 for LARS, respectively, based on the tuned values from Section 2. We used default hyperparameters for Adam and LAMB except where specified. We set all other hyperparameters to the same values as the state-of-theart LARS pipeline, except we set $\\gamma _ { 0 } = 1 . 0$ . See Appendix D.3 for more details. As expected, highly tuned learning rate schedules and optimizer hyperparameters are no longer necessary with a less stringent step budget. Multiple optimizer configurations in Table 4 exceed the MLPerf target accuracy of $7 5 . 9 \\%$ at batch size 32,768 with minimal tuning. Training with larger batch sizes is not fundamentally unstable: stringent step budgets make hyperparameter tuning trickier. ",
|
| 737 |
+
"bbox": [
|
| 738 |
+
173,
|
| 739 |
+
791,
|
| 740 |
+
825,
|
| 741 |
+
888
|
| 742 |
+
],
|
| 743 |
+
"page_idx": 6
|
| 744 |
+
},
|
| 745 |
+
{
|
| 746 |
+
"type": "text",
|
| 747 |
+
"text": "",
|
| 748 |
+
"bbox": [
|
| 749 |
+
169,
|
| 750 |
+
90,
|
| 751 |
+
825,
|
| 752 |
+
148
|
| 753 |
+
],
|
| 754 |
+
"page_idx": 7
|
| 755 |
+
},
|
| 756 |
+
{
|
| 757 |
+
"type": "table",
|
| 758 |
+
"img_path": "images/6ad2a2557f0d2428cd8922b1c63b8ffcc73c05a3add3f585829794e2bce38d66.jpg",
|
| 759 |
+
"table_caption": [],
|
| 760 |
+
"table_footnote": [],
|
| 761 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>WeightsOptimizer</td><td rowspan=1 colspan=1>Bias/BNOptimizer</td><td rowspan=1 colspan=1>Top-1</td></tr><tr><td rowspan=1 colspan=1>Nesterov</td><td rowspan=1 colspan=1>Nesterov</td><td rowspan=1 colspan=1>76.7</td></tr><tr><td rowspan=1 colspan=1>LARS</td><td rowspan=1 colspan=1>Momentum</td><td rowspan=1 colspan=1>76.9</td></tr><tr><td rowspan=1 colspan=1>LARS</td><td rowspan=1 colspan=1>LARS</td><td rowspan=1 colspan=1>76.9</td></tr><tr><td rowspan=1 colspan=1>Adam (c = 10-8)</td><td rowspan=1 colspan=1>Adam (c = 10-8)</td><td rowspan=1 colspan=1>76.2</td></tr><tr><td rowspan=1 colspan=1>Adam (e = 10-6)</td><td rowspan=1 colspan=1>Adam (ε = 10-6)</td><td rowspan=1 colspan=1>76.4</td></tr><tr><td rowspan=1 colspan=1>LAMB</td><td rowspan=1 colspan=1>LAMB</td><td rowspan=1 colspan=1>27.3</td></tr><tr><td rowspan=1 colspan=1>LAMB</td><td rowspan=1 colspan=1>Adam (e = 10-8)</td><td rowspan=1 colspan=1>76.3</td></tr><tr><td rowspan=1 colspan=1>LAMB</td><td rowspan=1 colspan=1>Adam (ε = 10-6)</td><td rowspan=1 colspan=1>76.3</td></tr></table>",
|
| 762 |
+
"bbox": [
|
| 763 |
+
174,
|
| 764 |
+
164,
|
| 765 |
+
508,
|
| 766 |
+
352
|
| 767 |
+
],
|
| 768 |
+
"page_idx": 7
|
| 769 |
+
},
|
| 770 |
+
{
|
| 771 |
+
"type": "text",
|
| 772 |
+
"text": "Table 4: Validation accuracy of ResNet-50 on ImageNet trained for 6,000 steps instead of 2,512. The second column is the optimizer that was applied to the batch norm and ResNet bias variables. We report the median top-1 accuracy over 5 seeds of the best hyperparameter setting in a refined search space. See Appendix D.3 for details. ",
|
| 773 |
+
"bbox": [
|
| 774 |
+
173,
|
| 775 |
+
358,
|
| 776 |
+
501,
|
| 777 |
+
455
|
| 778 |
+
],
|
| 779 |
+
"page_idx": 7
|
| 780 |
+
},
|
| 781 |
+
{
|
| 782 |
+
"type": "text",
|
| 783 |
+
"text": "In Table 4, “pure LAMB” performs extremely poorly: LAMB only obtains reasonable results when it is not used on the batch normalization and ResNet bias parameters, suggesting that layerwise normalization can indeed be harmful on some parameters. “Pure LARS” and Nesterov momentum perform roughly the same at this step budget, but the MLPerf LARS pipeline, which is tuned for a more stringent step budget, does not use LARS on all parameters, at least suggesting that the optimal choice could be budget-dependent. ",
|
| 784 |
+
"bbox": [
|
| 785 |
+
514,
|
| 786 |
+
166,
|
| 787 |
+
825,
|
| 788 |
+
333
|
| 789 |
+
],
|
| 790 |
+
"page_idx": 7
|
| 791 |
+
},
|
| 792 |
+
{
|
| 793 |
+
"type": "text",
|
| 794 |
+
"text": "Many new neural net optimizers, including LAMB, are introduced alongside claims that the new optimizer does not require any—or at least minimal—tuning. Unfortunately, these claims require a lot of work to support, since they require trying the optimizer on new problems without using those problems during the development of the algorithm. Although our experiments here are not sufficient to determine ",
|
| 795 |
+
"bbox": [
|
| 796 |
+
514,
|
| 797 |
+
339,
|
| 798 |
+
823,
|
| 799 |
+
463
|
| 800 |
+
],
|
| 801 |
+
"page_idx": 7
|
| 802 |
+
},
|
| 803 |
+
{
|
| 804 |
+
"type": "text",
|
| 805 |
+
"text": "which optimizers are easiest to tune, experiments like these that operate outside the regime of highly tuned learning rate schedules can serve as a starting point. In this experiment, LARS and LAMB do not appear to have an advantage in how easy they are to tune even on a dataset and model that were used in the development of both of those algorithms. LAMB is a variant of Adam and performs about the same as Adam with the same value of $\\epsilon$ ; LARS is more analogous to Momentum and indeed Nesterov momentum and LARS have similar performance. ",
|
| 806 |
+
"bbox": [
|
| 807 |
+
174,
|
| 808 |
+
463,
|
| 809 |
+
825,
|
| 810 |
+
546
|
| 811 |
+
],
|
| 812 |
+
"page_idx": 7
|
| 813 |
+
},
|
| 814 |
+
{
|
| 815 |
+
"type": "text",
|
| 816 |
+
"text": "5 Discussion ",
|
| 817 |
+
"text_level": 1,
|
| 818 |
+
"bbox": [
|
| 819 |
+
173,
|
| 820 |
+
553,
|
| 821 |
+
294,
|
| 822 |
+
569
|
| 823 |
+
],
|
| 824 |
+
"page_idx": 7
|
| 825 |
+
},
|
| 826 |
+
{
|
| 827 |
+
"type": "text",
|
| 828 |
+
"text": "Our results show that standard, generic optimizers suffice for achieving strong results across batch sizes. Therefore, any research program to create new optimizers for training at larger batch sizes must start from the fact that Momentum, Adam, and likely other standard methods work fine at batch sizes as large as those considered in this paper. The LARS and LAMB update rules have no more to do with the batch size (or “large” batches) than the Momentum or Adam update rules. Although You et al. [2019] presented convergence rate bounds for LARS and LAMB to support their claims of superior performance, we show in Appendix A that Adam satisfies a similar bound to LAMB. These bounds all rely on very unrealistic assumptions. 15 Most of all, they are loose upper bounds on the worst case behavior of the algorithms, not accurate reflections of optimizer performance in reality. Whether layer-wise normalization can be useful for optimization or regularization remains an open question. However, if LARS and LAMB have any advantage over standard techniques, it is not that they work dramatically better on the tasks and batch sizes in You et al. [2017, 2019]. This is not to suggest that there is nothing interesting about studying neural network optimization at larger batch sizes. For example, as gradient noise decreases, there may be opportunities to harness curvature information and extend the region of perfect scaling [Zhang et al., 2019]. However, there is currently no evidence that LARS and LAMB scale better than Momentum and Adam. ",
|
| 829 |
+
"bbox": [
|
| 830 |
+
173,
|
| 831 |
+
577,
|
| 832 |
+
825,
|
| 833 |
+
796
|
| 834 |
+
],
|
| 835 |
+
"page_idx": 7
|
| 836 |
+
},
|
| 837 |
+
{
|
| 838 |
+
"type": "text",
|
| 839 |
+
"text": "Our primary concern in this paper has been matching the state of the art—and establishing new baselines—for training speed measurements of the sort used to justify new techniques and algorithms for training with larger batch sizes. In contrast, many practitioners are more concerned with obtaining the best possible validation error with a somewhat flexible training time budget. Part of the reason why matching LARS at batch size 32,768 was non-trivial is because getting state of the art training ",
|
| 840 |
+
"bbox": [
|
| 841 |
+
173,
|
| 842 |
+
803,
|
| 843 |
+
825,
|
| 844 |
+
872
|
| 845 |
+
],
|
| 846 |
+
"page_idx": 7
|
| 847 |
+
},
|
| 848 |
+
{
|
| 849 |
+
"type": "text",
|
| 850 |
+
"text": "373 speed requires several tricks and implementation details that are not often discussed. It was not \n374 obvious to us a priori which ones would prove crucial. These details do not involve changes to the \n375 optimizer, but they interact with the optimizer in a regime where all hyperparameters need to be well \n376 tuned to stay competitive, making it necessary to re-tune everything for a new optimizer. \n377 In neural network optimization research, training loss is rarely discussed in detail and evaluation \n378 centers on validation/test performance since that is what practitioners care most about. However, \n379 although we shouldn’t only consider training loss, it is counter-intuitive and counter-productive to \n380 elide a careful investigation of the actual objective of the optimizer. If a new optimizer achieves better \n381 test performance, but shows no speedup on training loss, then perhaps it is not a better optimizer so \n382 much as an indirect regularizer. 16 Indeed, in our experiments we found that Nesterov momentum \n383 achieves noticeably better training accuracy on ResNet-50 than the LARS configuration we used, \n384 despite reaching roughly the same validation accuracy. Properly disentangling possible regularization \n385 benefits from optimization speed-ups is crucial if we are to understand neural network training, \n386 especially at larger batch sizes where we lose some of the regularization effect of gradient noise. \n387 Hypothetically, if the primary benefit of a training procedure is regularization, then it would be better \n388 to compare the method with other regularization baselines than other optimizers. \n389 Ultimately, we only care about batch size to the extent that higher degrees of data parallelism lead \n390 to faster training. Training with a larger batch size is a means, not the end goal. New optimizers— \n391 whether designed for generic batch sizes or larger batch sizes—have the potential to dramatically \n392 improve algorithmic efficiency across multiple workloads, but our results show that standard opti \n393 mizers can match the performance of newer alternatives on the workloads we considered. Indeed, \n394 despite the legion of new update rule variants being proposed in the literature, standard Adam and \n395 Momentum remain the workhorses of practitioners and researchers alike, while independent empirical \n396 comparisons consistently find no clear winner when optimizers are compared across a variety of \n397 workloads [Schmidt et al., 2020]. Meanwhile, as Choi et al. [2019] and our results underscore, \n398 comparisons between optimizers crucially depend on the effort spent tuning hyperparameters for each \n399 optimizer. Given these facts, we should regard with extreme caution studies claiming to show the \n400 superiority of one particular optimizer over others. Part of the issue stems from current incentives in \n401 the research community; we overvalue the novelty of new methods and undervalue establishing strong \n402 baselines to measure progress against. This is particularly problematic in the study of optimizers, \n403 where the learning rate schedule is arguably more important than the choice of the optimizer update \n404 rule itself! As our results show, the best learning rate schedule is tightly coupled with the optimizer, \n405 meaning that tuning the learning rate schedule for a new optimizer will generally favor the new \n406 optimizer over a baseline unless the schedule of the baseline is afforded the same tuning effort. ",
|
| 851 |
+
"bbox": [
|
| 852 |
+
140,
|
| 853 |
+
92,
|
| 854 |
+
825,
|
| 855 |
+
147
|
| 856 |
+
],
|
| 857 |
+
"page_idx": 8
|
| 858 |
+
},
|
| 859 |
+
{
|
| 860 |
+
"type": "text",
|
| 861 |
+
"text": "",
|
| 862 |
+
"bbox": [
|
| 863 |
+
147,
|
| 864 |
+
154,
|
| 865 |
+
825,
|
| 866 |
+
319
|
| 867 |
+
],
|
| 868 |
+
"page_idx": 8
|
| 869 |
+
},
|
| 870 |
+
{
|
| 871 |
+
"type": "text",
|
| 872 |
+
"text": "",
|
| 873 |
+
"bbox": [
|
| 874 |
+
143,
|
| 875 |
+
325,
|
| 876 |
+
825,
|
| 877 |
+
574
|
| 878 |
+
],
|
| 879 |
+
"page_idx": 8
|
| 880 |
+
},
|
| 881 |
+
{
|
| 882 |
+
"type": "text",
|
| 883 |
+
"text": "6 Conclusion ",
|
| 884 |
+
"text_level": 1,
|
| 885 |
+
"bbox": [
|
| 886 |
+
161,
|
| 887 |
+
580,
|
| 888 |
+
299,
|
| 889 |
+
597
|
| 890 |
+
],
|
| 891 |
+
"page_idx": 8
|
| 892 |
+
},
|
| 893 |
+
{
|
| 894 |
+
"type": "text",
|
| 895 |
+
"text": "In this work, we demonstrated that standard optimizers, without any layer-wise normalization techniques, can match or exceed the large batch size results used to justify LARS and LAMB. Future work attempting to argue that a new algorithm is useful by comparing to baseline methods or results, including those established in this paper, faces a key challenge in showing that the gains are due to the new method and not merely due to better tuning or changes to the training pipeline (e.g. regularization tricks). Although gains from tuning will eventually saturate, we can, in principle, always invest more effort in tuning and potentially get better results for any optimizer. However, our goal should be developing optimizers that work better across many different workloads when taking into account the amount of additional tuning they require. ",
|
| 896 |
+
"bbox": [
|
| 897 |
+
173,
|
| 898 |
+
609,
|
| 899 |
+
825,
|
| 900 |
+
734
|
| 901 |
+
],
|
| 902 |
+
"page_idx": 8
|
| 903 |
+
},
|
| 904 |
+
{
|
| 905 |
+
"type": "text",
|
| 906 |
+
"text": "Moving forward, if we are to reliably make progress we need to rethink how we compare and evaluate new optimizers for neural network training. Given how sensitive optimizer performance is to the hyperparameter tuning protocol and how difficult it is to quantify hyperparameter tuning effort, we can’t expect experiments with self-reported baselines to always lead to fair comparisons. Ideally, new training methods would be evaluated in a standardized competitive benchmark, where submitters of new optimizers do not have full knowledge of the evaluation workloads. Some efforts in this direction have started, for instance the MLCommons Algorithmic Efficiency Working Group17 , but more work needs to be done to produce incentives for the community to publish well-tuned baselines and to reward researchers that conduct the most rigorous empirical comparisons. ",
|
| 907 |
+
"bbox": [
|
| 908 |
+
173,
|
| 909 |
+
741,
|
| 910 |
+
825,
|
| 911 |
+
866
|
| 912 |
+
],
|
| 913 |
+
"page_idx": 8
|
| 914 |
+
},
|
| 915 |
+
{
|
| 916 |
+
"type": "text",
|
| 917 |
+
"text": "1. For all authors... ",
|
| 918 |
+
"bbox": [
|
| 919 |
+
214,
|
| 920 |
+
117,
|
| 921 |
+
339,
|
| 922 |
+
131
|
| 923 |
+
],
|
| 924 |
+
"page_idx": 9
|
| 925 |
+
},
|
| 926 |
+
{
|
| 927 |
+
"type": "text",
|
| 928 |
+
"text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] See Sections 2, 3, 4 \n(b) Did you describe the limitations of your work? [Yes] We had a lengthy discussion of the limitations and scope of the work in Section 5 \n(c) Did you discuss any potential negative societal impacts of your work? [No] We did not discuss this in the main text. Our primary contribution is to improve experimental protocols for other methodological work, which is so removed from specific machine learning applications that it is hard to determine the net impact. That said, more effective experimental protocols should lead to more effective science which in turn should lead to more effective machine learning applications. Whether this development is positive or negative for society will depend on who stands to gain from the use of machine learning in future applied contexts. Additionally, although our work should, in the long run, save computational resources for individual researchers, in net across the community this may or may not produce an aggregate savings because more efficient machine learning training, by making larger scale projects more accessible, can lead to an increased demand for compute resources [York, 2006], which can have varying degrees of negative environmental impacts [Patterson et al., 2021]. ",
|
| 929 |
+
"bbox": [
|
| 930 |
+
235,
|
| 931 |
+
137,
|
| 932 |
+
825,
|
| 933 |
+
378
|
| 934 |
+
],
|
| 935 |
+
"page_idx": 9
|
| 936 |
+
},
|
| 937 |
+
{
|
| 938 |
+
"type": "text",
|
| 939 |
+
"text": "(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
|
| 940 |
+
"bbox": [
|
| 941 |
+
235,
|
| 942 |
+
378,
|
| 943 |
+
821,
|
| 944 |
+
407
|
| 945 |
+
],
|
| 946 |
+
"page_idx": 9
|
| 947 |
+
},
|
| 948 |
+
{
|
| 949 |
+
"type": "text",
|
| 950 |
+
"text": "2. If you are including theoretical results... ",
|
| 951 |
+
"bbox": [
|
| 952 |
+
215,
|
| 953 |
+
412,
|
| 954 |
+
493,
|
| 955 |
+
428
|
| 956 |
+
],
|
| 957 |
+
"page_idx": 9
|
| 958 |
+
},
|
| 959 |
+
{
|
| 960 |
+
"type": "text",
|
| 961 |
+
"text": "(a) Did you state the full set of assumptions of all theoretical results? [Yes] See Appendix A for a comprehensive description of the problem setting. (b) Did you include complete proofs of all theoretical results? [Yes] See Appendix A. ",
|
| 962 |
+
"bbox": [
|
| 963 |
+
238,
|
| 964 |
+
431,
|
| 965 |
+
825,
|
| 966 |
+
478
|
| 967 |
+
],
|
| 968 |
+
"page_idx": 9
|
| 969 |
+
},
|
| 970 |
+
{
|
| 971 |
+
"type": "text",
|
| 972 |
+
"text": "3. If you ran experiments... ",
|
| 973 |
+
"bbox": [
|
| 974 |
+
214,
|
| 975 |
+
482,
|
| 976 |
+
393,
|
| 977 |
+
497
|
| 978 |
+
],
|
| 979 |
+
"page_idx": 9
|
| 980 |
+
},
|
| 981 |
+
{
|
| 982 |
+
"type": "text",
|
| 983 |
+
"text": "(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [No] We will include a link to all code and all possible reproducibility instructions after the anonymized reviewing period is over. \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] We are extremely detailed about our tuning procedures and dataset details, see Appendices B, D. \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] While we do not report error bars in the tables in the main text, Appendices B.2, C contains box plots showing the quartiles of the distribution over random seeds. \n(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [No] In Appendix B we state that we run on Google TPUs, however we do not tally up the total number of experiments run (although an interested reader could compute it from the information we provided in our detailed appendices given that we list all intermediate experiments, no matter how silly in hindsight). ",
|
| 984 |
+
"bbox": [
|
| 985 |
+
236,
|
| 986 |
+
502,
|
| 987 |
+
825,
|
| 988 |
+
744
|
| 989 |
+
],
|
| 990 |
+
"page_idx": 9
|
| 991 |
+
},
|
| 992 |
+
{
|
| 993 |
+
"type": "text",
|
| 994 |
+
"text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
|
| 995 |
+
"bbox": [
|
| 996 |
+
212,
|
| 997 |
+
751,
|
| 998 |
+
823,
|
| 999 |
+
765
|
| 1000 |
+
],
|
| 1001 |
+
"page_idx": 9
|
| 1002 |
+
},
|
| 1003 |
+
{
|
| 1004 |
+
"type": "text",
|
| 1005 |
+
"text": "(a) If your work uses existing assets, did you cite the creators? [Yes] We reference the relevant citations for all models, datasets, and techniques. \n(b) Did you mention the license of the assets? [No] \n(c) Did you include any new assets either in the supplemental material or as a URL? [No] \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A] \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A] ",
|
| 1006 |
+
"bbox": [
|
| 1007 |
+
238,
|
| 1008 |
+
770,
|
| 1009 |
+
825,
|
| 1010 |
+
892
|
| 1011 |
+
],
|
| 1012 |
+
"page_idx": 9
|
| 1013 |
+
},
|
| 1014 |
+
{
|
| 1015 |
+
"type": "text",
|
| 1016 |
+
"text": "5. If you used crowdsourcing or conducted research with human subjects... ",
|
| 1017 |
+
"bbox": [
|
| 1018 |
+
212,
|
| 1019 |
+
897,
|
| 1020 |
+
705,
|
| 1021 |
+
911
|
| 1022 |
+
],
|
| 1023 |
+
"page_idx": 9
|
| 1024 |
+
},
|
| 1025 |
+
{
|
| 1026 |
+
"type": "text",
|
| 1027 |
+
"text": "479 (a) Did you include the full text of instructions given to participants and screenshots, if \n480 applicable? [N/A] \n481 (b) Did you describe any potential participant risks, with links to Institutional Review \n482 Board (IRB) approvals, if applicable? [N/A] \n483 (c) Did you include the estimated hourly wage paid to participants and the total amount \n484 spent on participant compensation? [N/A] \n485 References \n486 Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S. \n487 Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian Goodfellow, Andrew \n488 Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz Kaiser, Manjunath \n489 Kudlur, Josh Levenberg, Dandelion Mane, Rajat Monga, Sherry Moore, Derek Murray, Chris Olah, ´ \n490 Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul Tucker, Vincent \n491 Vanhoucke, Vijay Vasudevan, Fernanda Viegas, Oriol Vinyals, Pete Warden, Martin Wattenberg, ´ \n492 Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. TensorFlow: Large-scale machine learning on \n493 heterogeneous systems, 2015. URL https://www.tensorflow.org/. Software available from \n494 tensorflow.org. \n495 Naman Agarwal, Rohan Anil, Elad Hazan, Tomer Koren, and Cyril Zhang. Disentangling adaptive \n496 gradient methods from learning rates. arXiv preprint arXiv:2002.11803, 2020. \n497 Olivier Bousquet, Sylvain Gelly, Karol Kurach, Olivier Teytaud, and Damien Vincent. Critical hyper \n498 parameters: No random, no cry. arXiv, 2017. URL https://arxiv.org/abs/1706.03200. \n499 James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal \n500 Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye Wanderman-Milne, and \n501 Qiao Zhang. JAX: composable transformations of Python+NumPy programs, 2018. URL \n502 http://github.com/google/jax. \n503 Dami Choi, Christopher J Shallue, Zachary Nado, Jaehoon Lee, Chris J Maddison, and George E \n504 Dahl. On empirical comparisons of optimizers for deep learning. arXiv preprint arXiv:1910.05446, \n505 2019. \n506 Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep \n507 bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018. \n508 Elad Hoffer, Itay Hubara, and Daniel Soudry. Train longer, generalize better: closing the gen \n509 eralization gap in large batch training of neural networks. arXiv preprint arXiv:1705.08741, \n510 2017. \n511 Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by \n512 reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. \n513 Norman P Jouppi, Cliff Young, Nishant Patil, David Patterson, Gaurav Agrawal, Raminder Bajwa, \n514 Sarah Bates, Suresh Bhatia, Nan Boden, Al Borchers, et al. In-datacenter performance analysis of \n515 a tensor processing unit. In Proceedings of the 44th Annual International Symposium on Computer \n516 Architecture, pages 1–12, 2017. \n517 Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint \n518 arXiv:1412.6980, 2014. \n519 Sameer Kumar, Victor Bitorff, Dehao Chen, Chiachen Chou, Blake Hechtman, HyoukJoong Lee, \n520 Naveen Kumar, Peter Mattson, Shibo Wang, Tao Wang, et al. Scale mlperf-0.6 models on google \n521 tpu-v3 pods. arXiv preprint arXiv:1909.09756, 2019. \n522 Peter Mattson, Christine Cheng, Cody Coleman, Greg Diamos, Paulius Micikevicius, David Patterson, \n523 Hanlin Tang, Gu-Yeon Wei, Peter Bailis, Victor Bittorf, David Brooks, Dehao Chen, Debojy \n524 oti Dutta, Udit Gupta, Kim Hazelwood, Andrew Hock, Xinyuan Huang, Atsushi Ike, Bill Jia, \n525 Daniel Kang, David Kanter, Naveen Kumar, Jeffery Liao, Guokai Ma, Deepak Narayanan, Tayo \n526 Oguntebi, Gennady Pekhimenko, Lillian Pentecost, Vijay Janapa Reddi, Taylor Robie, Tom St. \n527 John, Tsuguchika Tabaru, Carole-Jean Wu, Lingjie Xu, Masafumi Yamazaki, Cliff Young, and ",
|
| 1028 |
+
"bbox": [
|
| 1029 |
+
140,
|
| 1030 |
+
90,
|
| 1031 |
+
826,
|
| 1032 |
+
180
|
| 1033 |
+
],
|
| 1034 |
+
"page_idx": 10
|
| 1035 |
+
},
|
| 1036 |
+
{
|
| 1037 |
+
"type": "text",
|
| 1038 |
+
"text": "",
|
| 1039 |
+
"bbox": [
|
| 1040 |
+
140,
|
| 1041 |
+
141,
|
| 1042 |
+
828,
|
| 1043 |
+
926
|
| 1044 |
+
],
|
| 1045 |
+
"page_idx": 10
|
| 1046 |
+
},
|
| 1047 |
+
{
|
| 1048 |
+
"type": "text",
|
| 1049 |
+
"text": "Matei Zaharia. MLPerf training benchmark. arXiv preprint arXiv:1910.01500, 2019. URL https://arxiv.org/abs/1910.01500. \nYurii E Nesterov. A method for solving the convex programming problem with convergence rate $\\mathrm { O } ( 1 / \\mathrm { k } ^ { 2 } )$ . In Dokl. akad. nauk Sssr, volume 269, pages 543–547, 1983. \nDavid Patterson, Joseph Gonzalez, Quoc Le, Chen Liang, Lluis-Miquel Munguia, Daniel Rothchild, David So, Maud Texier, and Jeff Dean. Carbon emissions and large neural network training. arXiv preprint arXiv:2104.10350, 2021. \nBoris T Polyak. Some methods of speeding up the convergence of iteration methods. USSR Computational Mathematics and Mathematical Physics, 4(5):1–17, 1964. \nRobin M Schmidt, Frank Schneider, and Philipp Hennig. Descending through a crowded valley– benchmarking deep learning optimizers. arXiv preprint arXiv:2007.01547, 2020. \nChristopher J Shallue, Jaehoon Lee, Joseph Antognini, Jascha Sohl-Dickstein, Roy Frostig, and George E Dahl. Measuring the effects of data parallelism on neural network training. Journal of Machine Learning Research, 20(112):1–49, 2019. \nIlya Sutskever, James Martens, George Dahl, and Geoffrey Hinton. On the importance of initialization and momentum in deep learning. In ICML, 2013. \nChristian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2818–2826, 2016. \nYu Emma Wang, Gu-Yeon Wei, and David Brooks. Benchmarking tpu, gpu, and cpu platforms for deep learning. arXiv preprint arXiv:1907.10701, 2019. \nYuhuai Wu, Mengye Ren, Renjie Liao, and Roger Grosse. Understanding short-horizon bias in stochastic meta-optimization. arXiv preprint arXiv:1803.02021, 2018. \nChris Ying, Sameer Kumar, Dehao Chen, Tao Wang, and Youlong Cheng. Image classification at supercomputer scale. arXiv preprint arXiv:1811.06992, 2018. \nRichard York. Ecological paradoxes: William stanley jevons and the paperless office. Human Ecology Review, pages 143–147, 2006. \nYang You, Igor Gitman, and Boris Ginsburg. Large batch training of convolutional networks. arXiv preprint arXiv:1708.03888, 2017. \nYang You, Jing Li, Sashank Reddi, Jonathan Hseu, Sanjiv Kumar, Srinadh Bhojanapalli, Xiaodan Song, James Demmel, Kurt Keutzer, and Cho-Jui Hsieh. Large batch optimization for deep learning: Training bert in 76 minutes. In International Conference on Learning Representations, 2019. \nGuodong Zhang, Lala Li, Zachary Nado, James Martens, Sushant Sachdeva, George Dahl, Chris Shallue, and Roger B Grosse. Which algorithmic choices matter at which batch sizes? insights from a noisy quadratic model. In Advances in Neural Information Processing Systems, pages 8196–8207, 2019. \nYukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In Proceedings of the 2015 IEEE International Conference on Computer Vision (ICCV), ICCV ’15, page 19–27, USA, 2015. IEEE Computer Society. ISBN 9781467383912. doi: 10.1109/ICCV.2015.11. URL https://doi.org/10.1109/ICCV.2015.11. ",
|
| 1050 |
+
"bbox": [
|
| 1051 |
+
142,
|
| 1052 |
+
88,
|
| 1053 |
+
828,
|
| 1054 |
+
829
|
| 1055 |
+
],
|
| 1056 |
+
"page_idx": 11
|
| 1057 |
+
}
|
| 1058 |
+
]
|
parse/train/Kloou2uk_Rz/Kloou2uk_Rz_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/Kloou2uk_Rz/Kloou2uk_Rz_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/O358nrve1W/O358nrve1W_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/O358nrve1W/O358nrve1W_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/chPj_I5KMHG/chPj_I5KMHG.md
ADDED
|
@@ -0,0 +1,403 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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UIRED SKILLS VIA GOAL GENERATION
|
| 2 |
+
|
| 3 |
+
Ahmed Akakzia∗
|
| 4 |
+
Sorbonne Universite´
|
| 5 |
+
ahmed.akakzia@isir.upmc.fr
|
| 6 |
+
Cedric Colas´ ∗
|
| 7 |
+
Inria
|
| 8 |
+
cedric.colas@inria.fr
|
| 9 |
+
|
| 10 |
+
Pierre-Yves Oudeyer Inria
|
| 11 |
+
|
| 12 |
+
Mohamed Chetouani Sorbonne Universite´
|
| 13 |
+
|
| 14 |
+
Olivier Sigaud Sorbonne Universite´
|
| 15 |
+
|
| 16 |
+
# ABSTRACT
|
| 17 |
+
|
| 18 |
+
We are interested in the autonomous acquisition of repertoires of skills. Languageconditioned reinforcement learning (LC-RL) approaches are great tools in this quest, as they allow to express abstract goals as sets of constraints on the states. However, most LC-RL agents are not autonomous and cannot learn without external instructions and feedback. Besides, their direct language condition cannot account for the goal-directed behavior of pre-verbal infants and strongly limits the expression of behavioral diversity for a given language input. To resolve these issues, we propose a new conceptual approach to language-conditioned RL: the Language-Goal-Behavior architecture (LGB). LGB decouples skill learning and language grounding via an intermediate semantic representation of the world. To showcase the properties of LGB, we present a specific implementation called DECSTR. DECSTR is an intrinsically motivated learning agent endowed with an innate semantic representation describing spatial relations between physical objects. In a first stage $\mathbf { \Pi } \left( \mathbf { G } \to \mathbf { B } \right)$ ), it freely explores its environment and targets selfgenerated semantic configurations. In a second stage $\left( \mathrm { L } \longrightarrow \mathrm { G } \right)$ , it trains a languageconditioned goal generator to generate semantic goals that match the constraints expressed in language-based inputs. We showcase the additional properties of LGB w.r.t. both an end-to-end LC-RL approach and a similar approach leveraging non-semantic, continuous intermediate representations. Intermediate semantic representations help satisfy language commands in a diversity of ways, enable strategy switching after a failure and facilitate language grounding.
|
| 19 |
+
|
| 20 |
+
# 1 INTRODUCTION
|
| 21 |
+
|
| 22 |
+
Developmental psychology investigates the interactions between learning and developmental processes that support the slow but extraordinary transition from the behavior of infants to the sophisticated intelligence of human adults (Piaget, 1977; Smith & Gasser, 2005). Inspired by this line of thought, the central endeavour of developmental robotics consists in shaping a set of machine learning processes able to generate a similar growth of capabilities in robots (Weng et al., 2001; Lungarella et al., 2003). In this broad context, we are more specifically interested in designing learning agents able to: 1) explore open-ended environments and grow repertoires of skills in a self-supervised way and 2) learn from a tutor via language commands.
|
| 23 |
+
|
| 24 |
+
The design of intrinsically motivated agents marked a major step towards these goals. The Intrinsically Motivated Goal Exploration Processes family (IMGEPs), for example, describes embodied agents that interact with their environment at the sensorimotor level and are endowed with the ability to represent and set their own goals, rewarding themselves over completion (Forestier et al., 2017). Recently, goal-conditioned reinforcement learning (GC-RL) appeared like a viable way to implement IMGEPs and target the open-ended and self-supervised acquisition of diverse skills.
|
| 25 |
+
|
| 26 |
+
Goal-conditioned RL approaches train goal-conditioned policies to target multiple goals (Kaelbling, 1993; Schaul et al., 2015). While most GC-RL approaches express goals as target features (e.g. target block positions (Andrychowicz et al., 2017), agent positions in a maze (Schaul et al., 2015) or target images (Nair et al., 2018)), recent approaches started to use language to express goals, as language can express sets of constraints on the state space (e.g. open the red door) in a more abstract and interpretable way (Luketina et al., 2019).
|
| 27 |
+
|
| 28 |
+
However, most GC-RL approaches – and language-based ones (LC-RL) in particular – are not intrinsically motivated and receive external instructions and rewards. The IMAGINE approach is one of the rare examples of intrinsically motivated LC-RL approaches (Colas et al., 2020). In any case, the language condition suffers from three drawbacks. 1) It couples skill learning and language grounding. Thus, it cannot account for goal-directed behaviors in pre-verbal infants (Mandler, 1999). 2) Direct conditioning limits the behavioral diversity associated to language input: a single instruction leads to a low diversity of behaviors only resulting from the stochasticity of the policy or the environment. 3) This lack of behavioral diversity prevents agents from switching strategy after a failure.
|
| 29 |
+
|
| 30 |
+
To circumvent these three limitations, one can decouple skill learning and language grounding via an intermediate innate semantic representation. On one hand, agents can learn skills by targeting configurations from the semantic representation space. On the other hand, they can learn to generate valid semantic configurations matching the constraints expressed by language instructions. This generation can be the backbone of behavioral diversity: a given sentence might correspond to a whole set of matching configurations. This is what we propose in this work.
|
| 31 |
+
|
| 32 |
+
Contributions. We propose a novel conceptual RL architecture, named LGB for Language-GoalBehavior and pictured in Figure 1 (right). This LGB architecture enables an agent to decouple the intrinsically motivated acquisition of a repertoire of skills (Goals Behavior) from language grounding (Language Goals), via the use of semantic goal representation. To our knowledge, the LGB architecture is the only one to combine the following four features:
|
| 33 |
+
|
| 34 |
+
• It is intrinsically motivated: it selects its own (semantic) goals and generates its own rewards, • It decouples skill learning from language grounding, accounting for infants learning, • It can exhibit a diversity of behaviors for any given instruction,
|
| 35 |
+
• It can switch strategy in case of failures.
|
| 36 |
+
|
| 37 |
+
Besides, we introduce an instance of LGB, named DECSTR for DEep sets and Curriculum with SemanTic goal Representations. Using DECSTR, we showcase the advantages of the conceptual decoupling idea. In the skill learning phase, the DECSTR agent evolves in a manipulation environment and leverages semantic representations based on predicates describing spatial relations between physical objects. These predicates are known to be used by infants from a very young age (Mandler, 2012). DECSTR autonomously learns to discover and master all reachable configurations in its semantic representation space. In the language grounding phase, we train a Conditional Variational Auto-Encoder (C-VAE) to generate semantic goals from language instructions. Finally, we can evaluate the agent in an instruction-following phase by composing the two first phases. The experimental section investigates three questions: how does DECSTR perform in the three phases? How does it compare to end-to-end LC-RL approaches? Do we need intermediate representations to be semantic? Code and videos can be found at https://sites.google.com/view/decstr/.
|
| 38 |
+
|
| 39 |
+
# 2 RELATED WORK
|
| 40 |
+
|
| 41 |
+
Standard language-conditioned RL. Most approaches from the LC-RL literature define instruction following agents that receive external instructions and rewards (Hermann et al., 2017; Chan et al., 2019; Bahdanau et al., 2018; Cideron et al., 2019; Jiang et al., 2019; Fu et al., 2019), except the IMAGINE approach which introduced intrinsically motivated agents able to set their own goals and to imagine new ones (Colas et al., 2020). In both cases, the language-condition prevents the decoupling of language acquisition and skill learning, true behavioral diversity and efficient strategy switching behaviors. Our approach is different, as we can decouple language acquisition from skill learning. The language-conditioned goal generation allows behavioral diversity and strategy switching behaviors.
|
| 42 |
+
|
| 43 |
+

|
| 44 |
+
Figure 1: A standard language-conditioned RL architecture (left) and our proposed LGB architecture (right).
|
| 45 |
+
|
| 46 |
+
Goal-conditioned RL with target coordinates for block manipulation. Our proposed implementation of LGB, called DECSTR, evolves in a block manipulation domain. Stacking blocks is one of the earliest benchmarks in artificial intelligence (e.g. Sussman (1973); Tate et al. (1975)) and has led to many simulation and robotics studies (Deisenroth et al., 2011; Xu et al., 2018; Colas et al., 2019a). Recently, Lanier et al. (2019) and Li et al. (2019) demonstrated impressive results by stacking up to 4 and 6 blocks respectively. However, these approaches are not intrinsically motivated, involve hand-defined curriculum strategies and express goals as specific target block positions. In contrast, the DECSTR agent is intrinsically motivated, builds its own curriculum and uses semantic goal representations (symbolic or language-based) based on spatial relations between blocks.
|
| 47 |
+
|
| 48 |
+
Decoupling language acquisition and skill learning. Several works investigate the use of semantic representations to associate meanings and skills (Alomari et al., 2017; Tellex et al., 2011; Kulick et al., 2013). While the two first use semantic representations as an intermediate layer between language and skills, the third one does not use language. While DECSTR acquires skills autonomously, previous approaches all use skills that are either manually generated (Alomari et al., 2017), handengineered (Tellex et al., 2011) or obtained via optimal control methods (Kulick et al., 2013). Closer to us, Lynch & Sermanet (2020) also decouple skill learning from language acquisition in a goalconditioned imitation learning paradigm by mapping both language goals and images goals to a shared representation space. However, this approach is not intrinsically motivated as it relies on a dataset of human tele-operated strategies. The deterministic merging of representations also limits the emergence of behavioral diversity and efficient strategy-switching behaviors.
|
| 49 |
+
|
| 50 |
+
# 3 METHODS
|
| 51 |
+
|
| 52 |
+
This section presents our proposed Language-Goal-Behavior architecture (LGB) represented in Figure 1 (Section 3.1) and a particular instance of the LGB architecture called DECSTR. We first present the environment it is set in [3.2], then describe the implementations of the three modules composing any LGB architecture: 1) the semantic representation [3.3]; 2) the intrinsically motivated goal-conditioned algorithm [3.4] and 3) the language-conditioned goal generator [3.5]. We finally present how the three phases described in Figure 1 are evaluated [3.6].
|
| 53 |
+
|
| 54 |
+
# 3.1 THE LANGUAGE-GOAL-BEHAVIOR ARCHITECTURE
|
| 55 |
+
|
| 56 |
+
The LGB architecture is composed of three main modules. First, the semantic representation defines the behavioral and goal spaces of the agent. Second, the intrinsically motivated GC-RL algorithm is in charge of the skill learning phase. Third, the language-conditioned goal generator is in charge of the language grounding phase. Both phases can be combined in the instruction following phase. The three phases are respectively called $\mathrm { G } \longrightarrow \mathrm { B }$ for Goal Behavior, $\mathrm { L } \longrightarrow \mathrm { G }$ for Language $ \mathrm { G o a l }$ and $\mathrm { L G B }$ for Language $ \mathrm { G o a l } \mathbf { B }$ ehavior, see Figure 1 and Appendix A. Instances of the LGB architecture should demonstrate the four properties listed in the introduction: 1) be intrinsically motivated; 2) decouple skill learning and language grounding (by design); 3) favor behavioral diversity; 4) allow strategy switching. We argue that any LGB algorithm should fulfill the following constraints. For LGB to be intrinsically motivated (1), the algorithm needs to integrate the generation and selection of semantic goals and to generate its own rewards. For LGB to demonstrate behavioral diversity and strategy switching (3, 4), the language-conditioned goal generator must efficiently model the distribution of semantic goals satisfying the constraints expressed by any language input.
|
| 57 |
+
|
| 58 |
+
# 3.2 ENVIRONMENT
|
| 59 |
+
|
| 60 |
+
The DECSTR agent evolves in the Fetch Manipulate environment: a robotic manipulation domain based on MUJOCO (Todorov et al., 2012) and derived from the Fetch tasks (Plappert et al., 2018), see Figure 2. Actions are 4-dimensional: 3D gripper velocities and grasping velocity. Observations include the Cartesian and angular positions and velocities of the gripper and the three blocks. Inspired by the framework of Zone of Proximal Development that describes how parents organize the learning environment of their children (Vygotsky, 1978), we let a social partner facilitate DECSTR’s exploration by providing non-trivial initial configurations. After a first period of autonomous exploration, the social partner initializes the scene with stacks of 2 blocks $2 1 \%$ of times, stacks of 3 blocks $9 \%$ of times, and a block is initially put in the agent’s gripper $5 0 \%$ of times. This help is not provided during offline evaluations.
|
| 61 |
+
|
| 62 |
+

|
| 63 |
+
Figure 2: Example configurations. Top-right: (111000100).
|
| 64 |
+
|
| 65 |
+
# 3.3 SEMANTIC REPRESENTATION
|
| 66 |
+
|
| 67 |
+
Semantic predicates define the behavioral space. Defining the list of semantic predicates is defining the dimensions of the behavioral space explored by the agent. It replaces the traditional definition of goal spaces and their associated reward functions. We believe it is for the best, as it does not require the engineer to fully predict all possible behaviors within that space, to know which behaviors can be achieved and which ones cannot, nor to define reward functions for each of them.
|
| 68 |
+
|
| 69 |
+
Semantic predicates in DECSTR. We assume the DECSTR agent to have access to innate semantic representations based on a list of predicates describing spatial relations between pairs of objects in the scene. We consider two of the spatial predicates infants demonstrate early in their development (Mandler, 2012): the close and the above binary predicates. These predicates are applied to all permutations of object pairs for the 3 objects we consider: 6 permutations for the above predicate and 3 combinations for the close predicate due to its order-invariance. A semantic configuration is the concatenation of the evaluations of these 9 predicates and represents spatial relations between objects in the scene. In the resulting semantic configuration space $\{ 0 , 1 \} ^ { 9 }$ , the agent can reach 35 physically valid configurations, including stacks of 2 or 3 blocks and pyramids, see examples in Figure 2. The binary reward function directly derives from the semantic mapping: the agent rewards itself when its current configuration $c _ { p }$ matches the goal configuration $c _ { p } = g$ . Appendix B provides formal definitions and properties of predicates and semantic configurations.
|
| 70 |
+
|
| 71 |
+
# .4 INTRINSICALLY MOTIVATED GOAL-CONDITIONED REINFORCEMENT LEARNIN
|
| 72 |
+
|
| 73 |
+
This section describes the implementation of the intrinsically motivated goal-conditioned RL module in DECSTR. It is powered by the Soft-Actor Critic algorithm (SAC) (Haarnoja et al., 2018) that takes as input the current state, the current semantic configuration and the goal configuration, for both the critic and the policy. We use Hindsight Experience Replay (HER) to facilitate transfer between goals (Andrychowicz et al., 2017). DECSTR samples goals via its curriculum strategy, collects experience in the environment, then performs policy updates via SAC. This section describes two particularities of our RL implementation: the self-generated goal selection curriculum and the object-centered network architectures. Implementation details and hyperparameters can be found in Appendix C.
|
| 74 |
+
|
| 75 |
+
Goal selection and curriculum learning. The DECSTR agent can only select goals among the set of semantic configurations it already experienced. We use an automatic curriculum strategy (Portelas et al., 2020) inspired from the CURIOUS algorithm (Colas et al., 2019a). The DECSTR agent tracks aggregated estimations of its competence (C) and learning progress (LP). Its selection of goals to target during data collection and goals to learn about during policy updates (via HER) is biased towards goals associated with high absolute LP and low C.
|
| 76 |
+
|
| 77 |
+
Automatic bucket generation. To facilitate robust estimation, LP is usually estimated on sets of goals with similar difficulty or similar dynamics (Forestier et al., 2017; Colas et al., 2019a). While previous works leveraged expert-defined goal buckets, we cluster goals based on their time of discovery, as the time of discovery is a good proxy for goal difficulty: easier goals are discovered earlier. Buckets are initially empty (no known configurations). When an episode ends in a new configuration, the $N _ { b } = 5$ buckets are updated. Buckets are filled equally and the first buckets contain the configurations discovered earlier. Thus goals change buckets as new goals are discovered.
|
| 78 |
+
|
| 79 |
+
Tracking competence, learning progress and sampling probabilities. Regularly, the DECSTR agent evaluates itself on goal configurations sampled uniformly from the set of known ones. For each bucket, it tracks the recent history of past successes and failures when targeting the corresponding goals (last $W = 1 8 0 0$ self-evaluations). C is estimated as the success rate over the most recent half of that history $\mathrm { { C } = \mathrm { { C } _ { \mathrm { { r e c e n t } } } } }$ . LP is estimated as the difference between $\mathbf { C } _ { \mathrm { r e c e n t } }$ and the one evaluated over the first half of the history $\left( { \mathrm { C } } _ { \mathrm { e a r l i e r } } \right)$ . This is a crude estimation of the derivative of the C curve w.r.t. time: $\mathrm { L P } = { \mathrm { C } } _ { \mathrm { r e c e n t } } - { \mathrm { C } } _ { \mathrm { e a r l i e r } }$ . The sampling probability $\mathrm { P _ { i } }$ for bucket $i$ is:
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
P _ { i } = \frac { \left( 1 - C _ { i } \right) * \left| L P _ { i } \right| } { \sum _ { j } ( ( 1 - C _ { j } ) * \left| L P _ { j } \right| ) } .
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
In addition to the usual LP bias (Colas et al., 2019a), this formula favors lower C when LP is similar.
|
| 86 |
+
The absolute value ensures resampling buckets whose performance decreased (e.g. forgetting).
|
| 87 |
+
|
| 88 |
+
Object-centered architecture. Instead of fully-connected or recurrent networks, DECSTR uses for the policy and critic an object-centered architecture similar to the ones used in Colas et al. (2020); Karch et al. (2020), adapted from Deep-Sets (Zaheer et al., 2017). For each pair of objects, a shared network independently encodes the concatenation of body and objects features and current and target semantic configurations, see Appendix Figure 4. This shared network ensures efficient transfer of skills between pairs of objects. A second inductive bias leverages the symmetry of the behavior required to achieve $a b o \nu e ( o _ { i } , o _ { j } )$ and $a b o \nu e ( o _ { j } , o _ { i } )$ . To ensure automatic transfer between the two, we present half of the features (e.g. those based on pairs $\left( o _ { i } , o _ { j } \right)$ where $i < j$ ) with goals containing one side of the symmetry (all $a b o \nu e ( o _ { i } , o _ { j } )$ for $i < j$ ) and the other half with the goals containing the other side (all $a b o \nu e ( o _ { j } , \ o _ { i } )$ for $i < j )$ ). As a result, the above $( o _ { i } , \ o _ { j } )$ predicates fall into the same slot of the shared network inputs as their symmetric counterparts $a b { \overset { \vartriangle } { o } } \nu e ( o _ { j } , \ o _ { i } )$ , only with different permutations of object pairs. Goals are now of size 6: 3 close and 3 above predicates, corresponding to one side of the above symmetry. Skill transfer between symmetric predicates are automatically ensured. Appendix C.1 further describes these inductive biases and our modular architecture.
|
| 89 |
+
|
| 90 |
+
# 3.5 LANGUAGE-CONDITIONED GOAL GENERATION
|
| 91 |
+
|
| 92 |
+
The language-conditioned goal generation module (LGG) is a generative model of semantic representations conditioned by language inputs. It is trained to generate semantic configurations matching the agent’s initial configuration and the description of a change in one object-pair relation.
|
| 93 |
+
|
| 94 |
+
A training dataset is collected via interactions between a DECSTR agent trained in phase $\mathrm { G } \longrightarrow \mathrm { B }$ and a social partner. DECSTR generates semantic goals and pursues them. For each trajectory, the social partner provides a description $d$ of one change in objects relations from the initial configuration $c _ { i }$ to the final one $c _ { f }$ . The set of possible descriptions contains 102 sentences, each describing, in a simplified language, a positive or negative shift for one of the 9 predicates (e.g. get red above green). This leads to a dataset $\mathcal { D }$ of 5000 triplets: $( c _ { i } , d , c _ { f } )$ . From this dataset, the LGG is learned using a conditional Variational Auto-Encoder (C-VAE) (Sohn et al., 2015). Inspired by the contextconditioned goal generator from Nair et al. (2019), we add an extra condition on language instruction to improve control on goal generation. The conditioning instruction is encoded by a recurrent network that is jointly trained with the VAE via a mixture of Kullback-Leibler and cross-entropy losses. Appendix C.2 provides the list of sentences and implementation details. By repeatedly sampling the LGG, a set of goals is built for any language input. This enables skill diversity and strategy switching: if the agent fails, it can sample another valid goal to fulfill the instruction, effectively switching strategy. This also enables goal combination using logical functions of instructions: and is an intersection, $o r$ is an union and not is the complement within the known set of goals.
|
| 95 |
+
|
| 96 |
+
# 3.6 EVALUATION OF THE THREE LGB PHASES
|
| 97 |
+
|
| 98 |
+
Skill learning phase $\mathrm { G } \longrightarrow \mathrm { B }$ : DECSTR explores its semantic representation space, discovers achievable configurations and learns to reach them. Goal-specific performance is evaluated offline across learning as the success rate (SR) over 20 repetitions for each goal. The global performance $\overline { { \mathrm { S R } } }$ is measured across either the set of 35 goals or discovery-organized buckets of goals, see Section 3.4.
|
| 99 |
+
|
| 100 |
+
Language grounding phase $\mathrm { L } \longrightarrow \mathrm { G }$ : DECSTR trains the LGG to generate goals matching constraints expressed via language inputs. From a given initial configuration and a given instruction, the LGG should generate all compatible final configurations (goals) and just these. This is the source of behavioral diversity and strategy switching behaviors. To evaluate LGG, we construct a synthetic, oracle dataset $\mathcal { O }$ of triplets $( c _ { i } , d , \mathcal { C } _ { f } ( c _ { i } , d ) )$ , where $\mathscr { C } _ { f } \left( c _ { i } , \ d \right)$ is the set of all final configurations compatible with $( c _ { i } , d )$ . On average, $\mathcal { C } _ { f }$ in $\mathcal { O }$ contains 16.7 configurations, while the training dataset $\mathcal { D }$ only contains 3.4 $( 2 0 \% )$ . We are interested in two metrics: 1) The Precision is the probability that a goal sampled from the LGG belongs to $\mathcal { C } _ { f }$ (true positive / all positive); 2) The Recall is percentage of elements from $\mathcal { C } _ { f }$ that were found by sampling the LGG 100 times (true positive / all true). These metrics are computed on 5 different subsets of the oracle dataset, each calling for a different type of generalization (see full lists of instructions in Appendix C.2):
|
| 101 |
+
|
| 102 |
+
1. Pairs found in $\mathcal { D }$ , except pairs removed to form the following test sets. This calls for the extrapolation of known initialization-effect pairs $( c _ { i } , \ d )$ to new final configurations $c _ { f }$ ( $\mathcal { D }$ contains only $20 \%$ of $\mathcal { C } _ { f }$ on average).
|
| 103 |
+
2. Pairs that were removed from $\mathcal { D }$ , calling for a recombination of known effects $d$ on known $c _ { i }$ .
|
| 104 |
+
3. Pairs for which the $c _ { i }$ was entirely removed from $\mathcal { D }$ . This calls for the transfer of known effects $d$ on unknown $c _ { i }$ .
|
| 105 |
+
4. Pairs for which the $d$ was entirely removed from $\mathcal { D }$ . This calls for generalization in the language space, to generalize unknown effects $d$ from related descriptions and transpose this to known $c _ { i }$ .
|
| 106 |
+
5. Pairs for which both the $c _ { i }$ and the $d$ were entirely removed from $\mathcal { D }$ . This calls for the generalizations 3 and 4 combined.
|
| 107 |
+
|
| 108 |
+
Instruction following phase $\mathrm { L G B }$ : DECSTR is instructed to modify an object relation by one of the 102 sentences. Conditioned on its current configuration and instruction, it samples a compatible goal from the LGG, then pursues it with its goal-conditioned policy. We consider three evaluation settings: 1) performing a single instruction; 2) performing a sequence of instructions without failure; 3) performing a logical combination of instructions. The transition setup measures the success rate of the agent when asked to perform the 102 instructions 5 times each, resetting the environment each time. In the expression setup, the agent is evaluated on 500 randomly generated logical functions of sentences, see the generation mechanism in Appendix C.2. In both setups, we evaluate the performance in 1-shot $\left( \operatorname { S R } _ { 1 } \right)$ and 5-shot $\left( \mathrm { S R } _ { 5 } \right)$ settings. In the 5-shot setting, the agent can perform strategy switching, to sample new goals when previous attempts failed (without reset). In the sequence setup, the agent must execute 20 sequences of random instructions without reset (5-shot). We also test behavioral diversity. We ask DECSTR to follow each of the 102 instructions 50 times each and report the number of different achieved configurations.
|
| 109 |
+
|
| 110 |
+
# 4 EXPERIMENTS
|
| 111 |
+
|
| 112 |
+
Our experimental section investigates three questions: [4.1]: How does DECSTR perform in the three phases? [4.2]: How does it compare to end-to-end language-conditioned approaches? [4.3]: Do we need intermediate representations to be semantic?
|
| 113 |
+
|
| 114 |
+
# 4.1 HOW DOES DECSTR PERFORM IN THE THREE PHASES?
|
| 115 |
+
|
| 116 |
+
This section presents the performance of the DECSTR agent in the skill learning, language grounding, and instruction following phases.
|
| 117 |
+
|
| 118 |
+
Skill learning phase $\mathrm { G } \longrightarrow \mathrm { B }$ : Figure 3 shows that DECSTR successfully masters all reachable configurations in its semantic representation space. Figure 3a shows the evolution of $\overline { { \mathrm { S R } } }$ computed per bucket. Buckets are learned in increasing order, which confirms that the time of discovery is a good proxy for difficulty. Figure 3b reports C, LP and sampling probabilities P computed online using self-evaluations for an example agent. The agent leverages these estimations to select its goals: first focusing on the easy goals from bucket 1, it moves on towards harder and harder buckets as easier ones are mastered (low LP, high C). Figure 3c presents the results of ablation studies. Each condition removes one component of DECSTR: 1) Flat replaces our object-centered modular architectures by flat ones; 2) w/o Curr. replaces our automatic curriculum strategy by a uniform goal selection; 3) w/o Sym. does not use the symmetry inductive bias; 4) In w/o $S P$ , the social partner does not provide non-trivial initial configurations. In the Expert buckets condition, the curriculum strategy is applied on expert-defined buckets, see Appendix D.1. The full version of LGB performs on par with the Expert buckets oracle and outperforms significantly all its ablations. Appendix E.3 presents more examples of learning trajectories, and dissects the evolution of bucket compositions along training.
|
| 119 |
+
|
| 120 |
+

|
| 121 |
+
Figure 3: Skill Learning: (a) $\overline { { \mathrm { S R } } }$ per bucket. (b): C, LP and P estimated by a DECSTR agent. (c): ablation study. Medians and interquartile ranges over 10 seeds for DECSTR and 5 seeds for others in (a) and (c). Stars indicate significant differences to DECSTR as reported by Welch’s t-tests with $\alpha = 0 . 0 5$ (Colas et al., 2019b).
|
| 122 |
+
|
| 123 |
+
Table 1: $\mathbf { L } { \xrightarrow { } } \mathbf { G }$ phase. Metrics are averaged over 10 seeds, stdev $< 0 . 0 6$ and 0.07 respectively.
|
| 124 |
+
|
| 125 |
+
Table 2: $_ { \mathrm { L G B } }$ phase. Mean $\pm$ stdev over 10 seeds.
|
| 126 |
+
|
| 127 |
+
<table><tr><td>Metrics</td><td>Test 1</td><td>Test2</td><td>Test 3</td><td>Test 4</td><td>Test 5</td></tr><tr><td>Precision</td><td>0.97</td><td>0.93</td><td>0.98</td><td>0.99</td><td>0.98</td></tr><tr><td>Recall</td><td>0.93</td><td>0.94</td><td>0.95</td><td>0.90</td><td>0.92</td></tr></table>
|
| 128 |
+
|
| 129 |
+
<table><tr><td>Metr.</td><td>Transition</td><td>Expression</td></tr><tr><td>SR1</td><td>0.89± 0.05</td><td>0.74±0.08</td></tr><tr><td>SR5</td><td>0.99 ± 0.01</td><td>0.94± 0.06</td></tr></table>
|
| 130 |
+
|
| 131 |
+
Language grounding phase $\mathrm { L } \longrightarrow \mathrm { G }$ : The LGG demonstrates the 5 types of generalization from Table 1. From known configurations, agents can generate more goals than they observed in training data (1, 2). They can do so from new initial configurations (3). They can generalize to new sentences (4) and even to combinations of new sentences and initial configurations (5). These results assert that DECSTR generalizes well in a variety of contexts and shows good behavioral diversity.
|
| 132 |
+
|
| 133 |
+
Instruction following phase $\mathrm { L G B }$ : Table 2 presents the 1-shot and 5-shot results in the transition and expression setups. In the sequence setups, DECSTR succeeds in $L = 1 4 . 9 \pm 5 . 7$ successive instructions (mean±stdev over 10 seeds). These results confirm efficient language grounding. DECSTR can follow instructions or sequences of instructions and generalize to their logical combinations. Strategy switching improves performance $\left( \mathrm { S R } _ { 5 } - \mathrm { S R } _ { 1 } \right)$ ). DECSTR also demonstrates strong behavioral diversity: when asked over 10 seeds to repeat 50 times the same instruction, it achieves at least 7.8 different configurations, 15.6 on average and up to 23 depending on the instruction.
|
| 134 |
+
|
| 135 |
+
# 4.2 DO WE NEED AN INTERMEDIATE REPRESENTATION?
|
| 136 |
+
|
| 137 |
+
This section investigates the need for an intermediate semantic representation. To this end, we introduce an end-to-end LC-RL baseline directly mapping Language to Behavior $( \mathrm { L } \to \mathrm { B } ) ,$ ) and compare its performance with DECSTR in the instruction following phase ( $\mathrm { L } \longrightarrow \mathrm { G } \longrightarrow \mathrm { B }$ ).
|
| 138 |
+
|
| 139 |
+
The LB baseline. To limit the introduction of confounding factors and under-tuning concerns, we base this implementation on the DECSTR code and incorporate defining features of IMAGINE, a stateof-the-art language conditioned RL agent (Colas et al., 2020). We keep the same HER mechanism, object-centered architectures and RL algorithm as DECSTR. We just replace the semantic goal space by the 102 language instructions. This baseline can be seen as an oracle version of the IMAGINE algorithm where the reward function is assumed perfect, but without the imagination mechanism.
|
| 140 |
+
|
| 141 |
+
Comparison in the instruction following phase $\mathrm { L } \longrightarrow \mathrm { B }$ vs $_ { \mathrm { L G B } }$ : After training the LB baseline for 14K episodes, we compare its performance to DECSTR’s in the instruction-following setup. In the transition evaluation setup, LB achieves $\mathrm { s R } _ { 1 } = 0 . 7 6 { \pm } 0 . 0 0 1$ : it always manages to move blocks close to or far from each other, but consistently fails to stack them. Adding more attempts does not help: $\mathrm { s R } _ { 5 } = 0 . 7 6 \pm 0 . 0 0 1$ . The LB baseline cannot be evaluated in the expression setup because it does not manipulate goal sets. Because it cannot stack blocks, LB only succeeds in $3 . 0 1 \pm 0 . 4 3$ random instructions in a row, against 14.9 for DECSTR (sequence setup). We then evaluate LB’s diversity on the set of instructions it succeeds in. When asked to repeat 50 times the same instruction, it achieves at least 3.0 different configurations, 4.2 on average and up to 5.2 depending on the instruction against 7.8, 17.1, 23 on the same set of instructions for DECSTR. We did not observe strategy-switching behaviors in LB, because it either always succeeds (close/far instructions) or fails (stacks).
|
| 142 |
+
|
| 143 |
+
Conclusion. The introduction of an intermediate semantic representation helps DECSTR decouple skill learning from language grounding which, in turns, facilitates instruction-following when compared to the end-to-end language-conditioned learning of LB. This leads to improved scores in the transition and sequence setups. The direct language-conditioning of LB prevents the generalization to logical combination and leads to a reduced diversity in the set of mastered instructions. Decoupling thus brings significant benefits to LGB architectures.
|
| 144 |
+
|
| 145 |
+
# 4.3 DO WE NEED A SEMANTIC INTERMEDIATE REPRESENTATION?
|
| 146 |
+
|
| 147 |
+
This section investigates the need for the intermediate representation to be semantic. To this end, we introduce the LGB-C baseline that leverages continuous goal representations in place of semantic ones. We compare them on the two first phases.
|
| 148 |
+
|
| 149 |
+
The LGB-C baseline. The LGB-C baseline uses continuous goals expressing target block coordinates in place of semantic goals. The skill learning phase is thus equivalent to traditional goalconditioned RL setups in block manipulation tasks (Andrychowicz et al., 2017; Colas et al., $2 0 1 9 \mathrm { a }$ ; Li et al., 2019; Lanier et al., 2019). Starting from the DECSTR algorithm, LGB-C adds a translation module that samples a set of target block coordinates matching the targeted semantic configuration which is then used as the goal input to the policy. In addition, we integrate defining features of the state-of-the-art approach from Lanier et al. (2019): non-binary rewards ( $^ { + 1 }$ for each well placed block) and multi-criteria HER, see details in Appendix D.2.
|
| 150 |
+
|
| 151 |
+
Comparison in skill learning phase $\mathrm { G } \longrightarrow \mathrm { B }$ : The LGB-C baseline successfully learns to discover and master all 35 semantic configurations by placing the three blocks to randomly-sampled target coordinates corresponding to these configurations. It does so faster than DECSTR: $\mathrm { \ddot { 7 } 0 8 } \cdot 1 0 ^ { 3 }$ episodes to reach $\mathrm { S R } = 9 5 \%$ , against $1 2 3 8 \cdot 1 0 ^ { 3 }$ for DECSTR, see Appendix Figure 6. This can be explained by the denser learning signals it gets from using HER on continuous targets instead of discrete ones. In this phase, however, the agent only learns one parameterized skill: to place blocks at their target position. It cannot build a repertoire of semantic skills because it cannot discriminate between different block configurations. Looking at the sum of the distances travelled by the blocks or the completion time, we find that DECSTR performs opportunistic goal reaching: it finds simpler configurations of the blocks which satisfy its semantic goals compared to LGB-C. Blocks move less $( \Delta _ { \mathrm { d i s t } } = 2 6 \pm 5 $ cm), and goals are reached faster $\langle \Delta _ { \mathrm { s t e p s } } = 1 3 \pm 4$ , mean±std across goals with p-values $> 1 . 3 \cdot 1 0 ^ { - 5 }$ and $3 . 2 \cdot 1 0 ^ { - 1 9 }$ respectively).
|
| 152 |
+
|
| 153 |
+
Table 3: LGB-C performance in the $\mathrm { L } \longrightarrow \mathrm { G }$ phase. Mean over 10 seeds. Stdev $< 0 . 0 0 3$ and 0.008 respectively.
|
| 154 |
+
|
| 155 |
+
<table><tr><td>Metrics</td><td>Test 1</td><td>Test 2</td><td>Test3</td><td>Test 4</td><td>Test 5</td></tr><tr><td>Precision</td><td>0.66</td><td>0.78</td><td>0.39</td><td>0.0</td><td>0.0</td></tr><tr><td>Recall</td><td>0.05</td><td>0.02</td><td>0.06</td><td>0.0</td><td>0.0</td></tr></table>
|
| 156 |
+
|
| 157 |
+
Comparison in language grounding phase $\mathrm { L } \longrightarrow \mathrm { G }$ : We train the LGG to generate continuous target coordinates conditioned on language inputs with a mean-squared loss and evaluate it in the same setup as DECSTR’s LGG, see Table 3. Although it maintains reasonable precision in the first two testing sets, the LGG achieves low recall – i.e. diversity – on all sets. The lack of semantic representations of skills might explain the difficulty of training a language-conditioned goal generator.
|
| 158 |
+
|
| 159 |
+
Conclusion. The skill learning phase of the LGB-C baseline is competitive with the one of DECSTR. However, the poor performance in the language grounding phase prevents this baseline to perform instruction following. For this reason, and because semantic representations enable agents to perform opportunistic goal reaching and to acquire repertoires for semantic skills, we believe the semantic representation is an essential part of the LGB architecture.
|
| 160 |
+
|
| 161 |
+
# 5 DISCUSSION AND CONCLUSION
|
| 162 |
+
|
| 163 |
+
This paper contributes LGB, a new conceptual RL architecture which introduces an intermediate semantic representation to decouple sensorimotor learning from language grounding. To demonstrate its benefits, we present DECSTR, a learning agent that discovers and masters all reachable configurations in a manipulation domain from a set of relational spatial primitives, before undertaking an efficient language grounding phase. This was made possible by the use of object-centered inductive biases, a new form of automatic curriculum learning and a novel language-conditioned goal generation module. Note that our main contribution is in the conceptual approach, DECSTR being only an instance to showcase its benefits. We believe that this approach could benefit from any improvement in GC-RL (for skill learning) or generative models (for language grounding).
|
| 164 |
+
|
| 165 |
+
Semantic representations. Results have shown that using predicate-based representations was sufficient for DECSTR to efficiently learn abstract goals in an opportunistic manner. The proposed semantic configurations showcase promising properties: 1) they reduce the complexity of block manipulation where most effective works rely on a heavy hand-crafted curriculum (Li et al., 2019; Lanier et al., 2019) and a specific curiosity mechanism (Li et al., 2019); 2) they facilitate the grounding of language into skills and 3) they enable decoupling skill learning from language grounding, as observed in infants (Piaget, 1977). The set of semantic predicates is, of course, domain-dependent as it characterizes the space of behaviors that the agent can explore. However, we believe it is easier and requires less domain knowledge to define the set of predicates, i.e. the dimensions of the space of potential goals, than it is to craft a list of goals and their associated reward functions.
|
| 166 |
+
|
| 167 |
+
A new approach to language grounding. The approach proposed here is the first simultaneously enabling to decouple skill learning from language grounding and fostering a diversity of possible behaviors for given instructions. Indeed, while an instruction following agent trained on goals like put red close to green would just push the red block towards the green one, our agent can generate many matching goal configurations. It could build a pyramid, make a blue-green-red pile or target a dozen other compatible configurations. This enables it to switch strategy, to find alternative approaches to satisfy a same instruction when first attempts failed. Our goal generation module can also generalize to new sentences or transpose instructed transformations to unknown initial configurations. Finally, with the goal generation module, the agent can deal with any logical expression made of instructions by combining generated goal sets. It would be of interest to simultaneously perform language grounding and skill learning, which would result in “overlapping waves” of sensorimotor and linguistic development (Siegler, 1998).
|
| 168 |
+
|
| 169 |
+
Semantic configurations of variable size. Considering a constant number of blocks and, thus, fixed-size configuration spaces is a current limit of DECSTR. Future implementations of LGB may handle inputs of variable sizes by leveraging Graph Neural Networks as in Li et al. (2019). Corresponding semantic configurations could be represented as a set of vectors, each encoding information about a predicate and the objects it applies to. These representations could be handled by Deep Sets (Zaheer et al., 2017). This would allow to target partial sets of predicates that would not need to characterize all relations between all objects, facilitating scalability.
|
| 170 |
+
|
| 171 |
+
Conclusion In this work, we have shown that introducing abstract goals based on relational predicates that are well understood by humans can serve as a pivotal representation between skill learning and interaction with a user through language. Here, the role of the social partner was limited to: 1) helping the agent to experience non-trivial configurations and 2) describing the agent’s behavior in a simplified language. In the future, we intend to study more intertwined skill learning and language grounding phases, making it possible to the social partner to teach the agent during skill acquisition.
|
| 172 |
+
|
| 173 |
+
# ACKNOWLEDGMENTS
|
| 174 |
+
|
| 175 |
+
This work was performed using HPC resources from GENCI-IDRIS (Grant 20XX-AP010611667), the MeSU platform at Sorbonne-Universite and the PlaFRIM experimental testbed. C´ edric Colas is´ partly funded by the French Ministere des Arm \` ees - Direction G ´ en´ erale de l’Armement. ´
|
| 176 |
+
|
| 177 |
+
# REFERENCES
|
| 178 |
+
|
| 179 |
+
Muhannad Alomari, Paul Duckworth, David C Hogg, and Anthony G Cohn. Natural language acquisition and grounding for embodied robotic systems. In Thirty-First AAAI Conference on Artificial Intelligence, 2017.
|
| 180 |
+
|
| 181 |
+
Marcin Andrychowicz, Filip Wolski, Alex Ray, Jonas Schneider, Rachel Fong, Peter Welinder, Bob McGrew, Josh Tobin, Pieter Abbeel, and Wojciech Zaremba. Hindsight Experience Replay. arXiv preprint arXiv:1707.01495, 2017.
|
| 182 |
+
|
| 183 |
+
Dzmitry Bahdanau, Felix Hill, Jan Leike, Edward Hughes, Arian Hosseini, Pushmeet Kohli, and Edward Grefenstette. Learning to understand goal specifications by modelling reward. arXiv preprint arXiv:1806.01946, 2018.
|
| 184 |
+
|
| 185 |
+
Harris Chan, Yuhuai Wu, Jamie Kiros, Sanja Fidler, and Jimmy Ba. Actrce: Augmenting experience via teacher’s advice for multi-goal reinforcement learning. arXiv preprint arXiv:1902.04546, 2019.
|
| 186 |
+
|
| 187 |
+
Geoffrey Cideron, Mathieu Seurin, Florian Strub, and Olivier Pietquin. Self-educated language agent with hindsight experience replay for instruction following. arXiv preprint arXiv:1910.09451, 2019.
|
| 188 |
+
|
| 189 |
+
Cedric Colas, Pierre-Yves Oudeyer, Olivier Sigaud, Pierre Fournier, and Mohamed Chetouani. CU-´ RIOUS: Intrinsically motivated multi-task, multi-goal reinforcement learning. In International Conference on Machine Learning (ICML), pp. 1331–1340, 2019a.
|
| 190 |
+
|
| 191 |
+
Cedric Colas, Olivier Sigaud, and Pierre-Yves Oudeyer. A hitchhiker’s guide to statistical compar- ´ isons of reinforcement learning algorithms. arXiv preprint arXiv:1904.06979, 2019b.
|
| 192 |
+
|
| 193 |
+
Cedric Colas, Tristan Karch, Nicolas Lair, Jean-Michel Dussoux, Cl ´ ement Moulin-Frier, Peter Ford ´ Dominey, and Pierre-Yves Oudeyer. Language as a cognitive tool to imagine goals in curiositydriven exploration. arXiv preprint arXiv:2002.09253, 2020.
|
| 194 |
+
|
| 195 |
+
Marc Peter Deisenroth, Carl Edward Rasmussen, and Dieter Fox. Learning to control a low-cost manipulator using data-efficient reinforcement learning. Robotics: Science and Systems VII, pp. 57–64, 2011.
|
| 196 |
+
|
| 197 |
+
Sebastien Forestier, Yoan Mollard, and Pierre-Yves Oudeyer. Intrinsically motivated goal explo-´ ration processes with automatic curriculum learning. arXiv preprint arXiv:1708.02190, 2017.
|
| 198 |
+
|
| 199 |
+
Justin Fu, Anoop Korattikara, Sergey Levine, and Sergio Guadarrama. From language to goals: Inverse reinforcement learning for vision-based instruction following. arXiv preprint arXiv:1902.07742, 2019.
|
| 200 |
+
|
| 201 |
+
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, 2018.
|
| 202 |
+
|
| 203 |
+
Karl Moritz Hermann, Felix Hill, Simon Green, Fumin Wang, Ryan Faulkner, Hubert Soyer, David Szepesvari, Wojciech Marian Czarnecki, Max Jaderberg, Denis Teplyashin, et al. Grounded language learning in a simulated 3d world. arXiv preprint arXiv:1706.06551, 2017.
|
| 204 |
+
|
| 205 |
+
Yiding Jiang, Shixiang Shane Gu, Kevin P Murphy, and Chelsea Finn. Language as an abstraction for hierarchical deep reinforcement learning. In Advances in Neural Information Processing Systems, pp. 9414–9426, 2019.
|
| 206 |
+
|
| 207 |
+
Leslie Pack Kaelbling. Learning to achieve goals. In IJCAI, pp. 1094–1099, 1993.
|
| 208 |
+
|
| 209 |
+
Tristan Karch, Cedric Colas, Laetitia Teodorescu, Cl ´ ement Moulin-Frier, and Pierre-Yves Oudeyer.´ Deep sets for generalization in RL. arXiv preprint arXiv:2003.09443, 2020.
|
| 210 |
+
|
| 211 |
+
Johannes Kulick, Marc Toussaint, Tobias Lang, and Manuel Lopes. Active learning for teaching a robot grounded relational symbols. In Twenty-Third International Joint Conference on Artificial Intelligence, 2013.
|
| 212 |
+
|
| 213 |
+
John B. Lanier, Stephen McAleer, and Pierre Baldi. Curiosity-driven multi-criteria hindsight experience replay. CoRR, abs/1906.03710, 2019. URL http://arxiv.org/abs/1906.03710.
|
| 214 |
+
|
| 215 |
+
Richard Li, Allan Jabri, Trevor Darrell, and Pulkit Agrawal. Towards practical multi-object manipulation using relational reinforcement learning. arXiv preprint arXiv:1912.11032, 2019.
|
| 216 |
+
|
| 217 |
+
Jelena Luketina, Nantas Nardelli, Gregory Farquhar, Jakob Foerster, Jacob Andreas, Edward Grefenstette, Shimon Whiteson, and Tim Rocktaschel. A survey of reinforcement learning informed by ¨ natural language. arXiv preprint arXiv:1906.03926, 2019.
|
| 218 |
+
|
| 219 |
+
Max Lungarella, Giorgio Metta, Rolf Pfeifer, and Giulio Sandini. Developmental robotics: a survey. Connection Science, 15(4):151–190, 2003.
|
| 220 |
+
|
| 221 |
+
Corey Lynch and Pierre Sermanet. Grounding language in play. arXiv preprint arXiv:2005.07648, 2020.
|
| 222 |
+
|
| 223 |
+
Jean M. Mandler. Preverbal representation and language. Language and space, pp. 365, 1999.
|
| 224 |
+
|
| 225 |
+
Jean M Mandler. On the spatial foundations of the conceptual system and its enrichment. Cognitive science, 36(3):421–451, 2012.
|
| 226 |
+
|
| 227 |
+
Ashvin Nair, Shikhar Bahl, Alexander Khazatsky, Vitchyr Pong, Glen Berseth, and Sergey Levine. Contextual imagined goals for self-supervised robotic learning. arXiv preprint arXiv:1910.11670, 2019.
|
| 228 |
+
|
| 229 |
+
Ashvin V Nair, Vitchyr Pong, Murtaza Dalal, Shikhar Bahl, Steven Lin, and Sergey Levine. Visual reinforcement learning with imagined goals. In Advances in Neural Information Processing Systems, pp. 9191–9200, 2018.
|
| 230 |
+
|
| 231 |
+
Jean Piaget. The development of thought: Equilibration of cognitive structures. Viking, 1977. (Trans A. Rosin).
|
| 232 |
+
|
| 233 |
+
Matthias Plappert, Marcin Andrychowicz, Alex Ray, Bob McGrew, Bowen Baker, Glenn Powell, Jonas Schneider, Josh Tobin, Maciek Chociej, Peter Welinder, et al. Multi-goal reinforcement learning: Challenging robotics environments and request for research. arXiv preprint arXiv:1802.09464, 2018.
|
| 234 |
+
|
| 235 |
+
Remy Portelas, C ´ edric Colas, Lilian Weng, Katja Hofmann, and Pierre-Yves Oudeyer. Automatic ´ curriculum learning for deep rl: A short survey. arXiv preprint arXiv:2003.04664, 2020.
|
| 236 |
+
|
| 237 |
+
Tom Schaul, Daniel Horgan, Karol Gregor, and David Silver. Universal value function approximators. In International Conference on Machine Learning, pp. 1312–1320, 2015.
|
| 238 |
+
|
| 239 |
+
Robert S Siegler. Emerging minds: The process of change in children’s thinking. Oxford University Press, 1998.
|
| 240 |
+
|
| 241 |
+
Linda Smith and Michael Gasser. The development of embodied cognition: Six lessons from babies. Artificial life, 11(1-2):13–29, 2005.
|
| 242 |
+
|
| 243 |
+
Kihyuk Sohn, Honglak Lee, and Xinchen Yan. Learning structured output representation using deep conditional generative models. In Advances in neural information processing systems, pp. 3483–3491, 2015.
|
| 244 |
+
|
| 245 |
+
Gerald J. Sussman. A computational model of skill acquisition. Technical report, HIT Technical Report AI TR-297, 1973.
|
| 246 |
+
|
| 247 |
+
Austin Tate et al. Interacting goals and their use. In IJCAI, volume 10, pp. 215–218, 1975.
|
| 248 |
+
|
| 249 |
+
Stefanie Tellex, Thomas Kollar, Steven Dickerson, Matthew R Walter, Ashis Gopal Banerjee, Seth Teller, and Nicholas Roy. Approaching the symbol grounding problem with probabilistic graphical models. AI magazine, 32(4):64–76, 2011.
|
| 250 |
+
|
| 251 |
+
Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 5026–5033. IEEE, 2012.
|
| 252 |
+
|
| 253 |
+
L. S. Vygotsky. Tool and Symbol in Child Development. In Mind in Society, chapter Tool and Symbol in Child Development, pp. 19–30. Harvard University Press, 1978. ISBN 0674576292. doi: 10.2307/j.ctvjf9vz4.6.
|
| 254 |
+
|
| 255 |
+
J. Weng, J. McClelland, A. Pentland, O. Sporns, I. Stockman, M. Sur, and E. Thelen. Autonomous mental development by robots and animals. Science, 291(5504):599–600, 2001.
|
| 256 |
+
|
| 257 |
+
Danfei Xu, Suraj Nair, Yuke Zhu, Julian Gao, Animesh Garg, Li Fei-Fei, and Silvio Savarese. Neural task programming: Learning to generalize across hierarchical tasks. In 2018 IEEE International Conference on Robotics and Automation (ICRA), pp. 1–8. IEEE, 2018.
|
| 258 |
+
|
| 259 |
+
Manzil Zaheer, Satwik Kottur, Siamak Ravanbakhsh, Barnabas Poczos, Russ R Salakhutdinov, and Alexander J Smola. Deep sets. In Advances in neural information processing systems, pp. 3391– 3401, 2017.
|
| 260 |
+
|
| 261 |
+
# A LGB PSEUDO-CODE
|
| 262 |
+
|
| 263 |
+
Algorithm 1 and 2 present the high-level pseudo-code of any algorithm following the LGB architecture for each of the three phases.
|
| 264 |
+
|
| 265 |
+
<table><tr><td>Algorithm1 LGB architecture G-→B phase</td><td></td><td>Algorithm2 LGB architecture L-→G and L-→G-→B phases</td></tr><tr><td>1: Require Env E buffer B 3: loop</td><td>Goal -→ Behavior phase 2: Initialize policy II,goal sampler Gs,</td><td>Language → Goal phase 1: Require II, E,Gs, social partner SP 2: Initialize language goal generator LGG 3:dataset ← SP.interact(E,II,Gs)</td></tr><tr><td>4:</td><td>g ← Gs.sample(</td><td>4: LGG.update(dataset) 5: return LGG</td></tr><tr><td>5:</td><td>(s,a,s',g,Cp,Cp)traj ← E.rollout(g)</td><td>Language →Behavior phase</td></tr><tr><td>6:</td><td>Gs.update(cT)</td><td>6: Require E,II, LGG,SP</td></tr><tr><td>7: 8:</td><td>B.update(s,a,s',g,Cp,Cp)traj)</td><td>7: loop</td></tr><tr><td>9:</td><td>II.update(B)</td><td>8: instr. ← SP.listen() 9: loop Strategy switching loop</td></tr><tr><td>10:</td><td>return II, G s</td><td>10: g_← LGG.sample(instr., c)</td></tr><tr><td>11:</td><td></td><td>11: T ←E.rollout(g)</td></tr><tr><td>12:</td><td></td><td></td></tr><tr><td></td><td></td><td>12: if g == cT then break</td></tr></table>
|
| 266 |
+
|
| 267 |
+
# B SEMANTIC PREDICATES AND APPLICATION TO FETCH MANIPULATE
|
| 268 |
+
|
| 269 |
+
In this paper, we restrict the semantic representations to the use of the close and above binary predicates applied to $M \ : = \ : 3$ objects. The resulting semantic configurations are formed by:
|
| 270 |
+
|
| 271 |
+
c $\mathbf { \Phi } _ { p } = [ c ( o _ { 1 } , o _ { 2 } ) , c ( o _ { 1 } , o _ { 3 } ) , c ( o _ { 2 } , o _ { 3 } ) , a ( o _ { 1 } , o _ { 2 } ) , a ( o _ { 2 } , o _ { 1 } ) , a ( o _ { 1 } , o _ { 3 } ) , a ( o _ { 3 } , o _ { 1 } ) , a ( o _ { 2 } , o _ { 3 } ) , a ( o _ { 3 } , o _ { 2 } ) ] ,$ where $c ( )$ and $a ($ () refer to the close and above predicates respectively and $( o _ { 1 } , \ o _ { 2 } , \ o _ { 3 } )$ are the red, green and blue blocks respectively.
|
| 272 |
+
|
| 273 |
+
# Symmetry and asymmetry of close and above predicates. We consider objects $o _ { 1 }$ and $o _ { 2 }$
|
| 274 |
+
|
| 275 |
+
• close is symmetric: “ $\dot { \boldsymbol { o } } _ { 1 }$ is close to ${ o _ { 2 } } ^ { , ; } \Leftrightarrow \stackrel { } { o _ { 2 } }$ is close to $\omega _ { 1 } \mathrm { \Omega } ^ { \mathsf { , , } \mathsf { , } }$ . The corresponding semantic mapping function is based on the Euclidean distance, which is symmetric. • above is asymmetric: $\dot { \boldsymbol { o } } _ { 1 }$ is above $o _ { 2 } \ ' \Rightarrow$ not “ $\dot { \boldsymbol { o } } _ { 2 }$ is above $\omega _ { 1 } \mathbf { \overrightarrow { \Omega } }$ . The corresponding semantic mapping function evaluates the sign of the difference of the object $Z$ -axis coordinates.
|
| 276 |
+
|
| 277 |
+
# C THE DECSTR ALGORITHM
|
| 278 |
+
|
| 279 |
+
# C.1 INTRINSICALLY MOTIVATED GOAL-CONDITIONED RL
|
| 280 |
+
|
| 281 |
+
Overview. Algorithm 3 presents the pseudo-code of the sensorimotor learning phase $\mathrm { \Delta } _ { \mathrm { G \longrightarrow B } }$ ) of DECSTR. It alternates between two steps:
|
| 282 |
+
|
| 283 |
+
• Data acquisition. A DECSTR agent has no prior on the set of reachable semantic configurations. Its first goal is sampled uniformly from the semantic configuration space. Using this goal, it starts interacting with its environment, generating trajectories of sensory states $s$ , actions $a$ and configurations $c _ { p }$ . The last configuration $c _ { p } ^ { T }$ achieved in the episode after $T$ time steps is considered stable and is added to the set of reachable configurations. As it interacts with the environment, the agent explores the configuration space, discovers reachable configurations and selects new targets. Internal models updates. A DECSTR agent updates two models: its curriculum strategy and its policy. The curriculum strategy can be seen as an active goal sampler. It biases the selection of goals to target and goals to learn about. The policy is the module controlling the agent’s behavior and is updated via RL.
|
| 284 |
+
|
| 285 |
+
Algorithm 3 DECSTR: sensorimotor phase $\mathrm { G } \longrightarrow \mathrm { B }$
|
| 286 |
+
|
| 287 |
+
<table><tr><td></td><td>1: Require: env E,# buckets Nb,# episodes before biased init. nunb,self-evaluation probability Pself-eval, noise function g()</td></tr><tr><td>2:</td><td>Initialize: policy II, buffer B,goal sampler Gs, bucket sampling probabilities pb,language module LGG.</td></tr><tr><td>3: loop</td><td></td></tr><tr><td>4:</td><td>self_eval ←random(<pself_eval</td></tr><tr><td>5:</td><td>g ← Gs.sample(self_eval, pb)</td></tr><tr><td>6:</td><td>biased_init ← epoch <nunb</td></tr><tr><td>7:</td><td></td></tr><tr><td>8:</td><td>fort=1:Tdo</td></tr><tr><td>9:</td><td>at ←policy(st,ct,g)</td></tr><tr><td>10:</td><td>if not self_eval then</td></tr><tr><td>11:</td><td>at↑at+σ()</td></tr><tr><td>12:</td><td>gt+1,c+1 ← E.step(at)</td></tr><tr><td>13:</td><td>episode ← (s,c,a,s',c')</td></tr><tr><td>14:</td><td>Gs.update(cT)</td></tr><tr><td>15:</td><td>B.update(episode)</td></tr><tr><td>16:</td><td>g ←Gs.sample(pb)</td></tr><tr><td>17:</td><td>batch ← B.sample(g)</td></tr><tr><td>18:</td><td>II.update(batch)</td></tr><tr><td>19:</td><td>if self_eval then</td></tr><tr><td>20:</td><td>Pb ← Gs.update_LP(</td></tr></table>
|
| 288 |
+
|
| 289 |
+
Policy updates with a goal-conditioned Soft Actor-Critic. Readers familiar with Markov Decision Process and the use of SAC and HER algorithms can skip this paragraph.
|
| 290 |
+
|
| 291 |
+
We want the DECSTR agent to explore a semantic configuration space and master reachable configurations in it. We frame this problem as a goal-conditioned MDP (Schaul et al., 2015): $\mathcal { M } \ \stackrel { { } = } { = } \ ( \mathcal { S } , \mathcal { G } _ { p } , \mathcal { A } , \mathcal { T } , \mathcal { R } , \gamma )$ , where the state space $s$ is the usual sensory space augmented with the configuration space $\mathcal { C } _ { p }$ , the goal space $\mathcal { G } _ { p }$ is equal to the configuration space $\mathcal { G } _ { p } \ = \mathcal { C } _ { p }$ , $\mathcal { A }$ is the action space, $\mathcal { T } : \mathcal { S } \times \mathcal { A } \stackrel { \cdot } { \times } \mathcal { S } [ 0 , 1 ]$ is the unknown transition probability, $\mathcal { R } : \mathcal { S } \times \mathcal { A } \{ 0 , 1 \}$ is a sparse reward function and $\gamma \in [ 0 , 1 ]$ is the discount factor.
|
| 292 |
+
|
| 293 |
+
Policy updates are performed with Soft Actor-Critic (SAC) (Haarnoja et al., 2018), a state-of-the-art off-policy actor-critic algorithm. We also use Hindsight Experience Replay (HER) (Andrychowicz et al., 2017). This mechanism enables agents to learn from failures by reinterpreting past trajectories in the light of goals different from the ones originally targeted. HER was designed for continuous goal spaces, but can be directly transposed to discrete goals (Colas et al., 2019a). In our setting, we simply replace the originally targeted goal configuration by the currently achieved configuration in the transitions fed to SAC. We also use our automatic curriculum strategy: the LP-C-based probabilities are used to sample goals to learn about. When a goal $g$ is sampled, we search the experience buffer for the collection of episodes that ended in the configuration $c _ { p } ~ = ~ g$ . From these episodes, we sample a transition uniformly. The HER mechanism substitutes the original goal with one of the configurations achieved later in the trajectory. This substitute $g$ has high chances of being the sampled one. At least, it is a configuration on the path towards this goal, as it is sampled from a trajectory leading to it. The HER mechanism is thus biased towards goals sampled by the agent.
|
| 294 |
+
|
| 295 |
+
Object-Centered Inductive Biases. In the proposed Fetch Manipulate environment, the three blocks share the same set of attributes (position, velocity, color identifier). Thus, it is natural to encode a relational inductive bias in our architecture. The behavior with respect to a pair of objects should be independent from the position of the objects in the inputs. The architecture used for the policy is depicted in Figure 4.
|
| 296 |
+
|
| 297 |
+
A shared network $( N N _ { \mathrm { s h a r e d } } )$ encodes the concatenation of: 1) agent’s body features; 2) object pair features; 3) current configuration $( c _ { p } )$ and 4) current goal $g$ . This is done independently for all object pairs. No matter the location of the features of the object pair in the initial observations, this shared network ensures that the same behavior will be performed, thus skills are transferred between object pairs. A sum is then used to aggregate these outputs, before a final network $( N N _ { \mathrm { p o l i c y } } )$ maps the aggregation to actions $a$ . The critic follows the same architecture, where a final network $N N _ { \mathrm { c r i t i c } }$ maps the aggregation to an action-value $Q$ . Parallel encoding of each pair-specific inputs can be seen as different modules trying to reach the goal by only seeing these pair-specific inputs. The intuition is that modules dealing with the pair that should be acted upon to reach the goal will supersede others in the sum aggregation.
|
| 298 |
+
|
| 299 |
+

|
| 300 |
+
Figure 4: Object-centered modular architecture for the policy.
|
| 301 |
+
|
| 302 |
+
Although in principle our architecture could work with combinations of objects (3 modules), we found permutations to work better in practice (6 modules). With combinations, the shared network would need to learn to put block $A$ on block $B$ to achieve a predicate $a b o \nu e ( o _ { i } , \ o _ { j } )$ , and would need to learn the reverse behavior (put $B$ on $A$ ) to achieve the symmetric predicate $\overset { \cdot } { a } b o \nu e ( o _ { j } , \ o _ { i } )$ . With permutations, the shared network can simply learn one of these behaviors (e.g. $A$ on $B$ ). Considering the predicate $a b o \nu e ( o _ { A } , \ o _ { B } )$ , at least one of the modules has objects organized so that this behavior is the good one: if the permutation $\left( o _ { B } , \ o _ { A } \right)$ is not the right one, permutation $\left( o _ { A } , \ o _ { B } \right)$ is. The symmetry bias is explained in Section 3.4. It leverages the symmetry of the behaviors required to achieve the predicates above $\left( o _ { i } , \ o _ { j } \right)$ and $a b o \nu e ( o _ { j } , \ o _ { i } )$ . As a result, the two goal configurations are:
|
| 303 |
+
|
| 304 |
+
$$
|
| 305 |
+
\begin{array} { l l } { { g _ { 1 } = [ c ( o _ { 1 } , o _ { 2 } ) , c ( o _ { 1 } , o _ { 3 } ) , c ( o _ { 2 } , o _ { 3 } ) , a ( o _ { 1 } , o _ { 2 } ) , a ( o _ { 1 } , o _ { 3 } ) , a ( o _ { 2 } , o _ { 3 } ) ] , } } \\ { { \ } } & { { } } \\ { { g _ { 2 } = [ c ( o _ { 1 } , o _ { 2 } ) , c ( o _ { 1 } , o _ { 3 } ) , c ( o _ { 2 } , o _ { 3 } ) , a ( o _ { 2 } , o _ { 1 } ) , a ( o _ { 3 } , o _ { 1 } ) , a ( o _ { 3 } , o _ { 2 } ) ] , } } \end{array}
|
| 306 |
+
$$
|
| 307 |
+
|
| 308 |
+
where $g _ { 1 }$ is used in association with object permutations $( o _ { i } , \ o _ { j } )$ with $\textit { i } \ < \ \textit { j }$ and $g _ { 2 }$ is used in association with object permutations $( o _ { j } , \ o _ { i } )$ with $\textit { i } \ < \ \textit { j }$ . As a result, the shared network automatically ensures transfer between predicates based on symmetric behaviors.
|
| 309 |
+
|
| 310 |
+
Implementation Details. This part includes details necessary to reproduce results. The code is available at https://sites.google.com/view/decstr/.
|
| 311 |
+
|
| 312 |
+
Parallel implementation of SAC-HER. We use a parallel implementation of SAC (Haarnoja et al., 2018). Each of the 24 parallel worker maintains its own replay buffer of size $1 0 ^ { 6 }$ and performs its own updates. Updates are summed over the 24 actors and the updated network are broadcast to all workers. Each worker alternates between 2 episodes of data collection and 30 updates with batch size 256. To form an epoch, this cycle is repeated 50 times and followed by the offline evaluation of the agent on each reachable goal. An epoch is thus made of $5 0 \times 2 \times 2 4 = 2 4 0 0$ episodes.
|
| 313 |
+
|
| 314 |
+
Goal sampler updates. The agent performs self-evaluations with probability $s e l f . e v a l \ = \ 0 . 1$ . During these runs, the agent targets uniformly sampled discovered configurations without exploration noise. This enables the agent to self-evaluate on each goal. Goals are organized into buckets. Main Section 3.4 presents our automatic bucket generation mechanism. Once buckets are formed, we compute $C$ , $L P$ and $P$ , based on windows of the past $W ~ = ~ 1 8 0 0$ self-evaluation interactions for each bucket.
|
| 315 |
+
|
| 316 |
+
Modular architecture. The shared network of our modular architecture $N N _ { \mathrm { s h a r e d } }$ is a 1-hidden layer network of hidden size 256. After all pair-specific inputs have been encoded through this module, their output (of size 84) are summed. The sum is then passed through a final network with a hidden layer of size 256 to compute the final actions (policy) or action-values (critic). All networks use ReLU activations and the Xavier initialization. We use Adam optimizers, with learning rates $1 0 ^ { - 3 }$ . The list of hyperparameters is provided in Table 4.
|
| 317 |
+
|
| 318 |
+
Table 4: Sensorimotor learning hyperparameters used in DECSTR.
|
| 319 |
+
|
| 320 |
+
<table><tr><td>Hyperparam.</td><td>Description</td><td>Values.</td></tr><tr><td>nb_mpis</td><td>Numberofworkers</td><td>24</td></tr><tr><td>nb_cycles</td><td>Number of repeated cycles per epoch</td><td>50</td></tr><tr><td>nb_rollouts_per_mpi</td><td>Number of rollouts per worker</td><td>2</td></tr><tr><td>nb_updates</td><td>Number of updates per cycle</td><td>30</td></tr><tr><td>start_bias_init</td><td>Epoch from which initializations are biased</td><td>100</td></tr><tr><td>W</td><td>Curriculum window size</td><td>1800</td></tr><tr><td>self_eval</td><td>Self evaluation probability</td><td>0.1</td></tr><tr><td>Nb</td><td>Number of buckets</td><td>5</td></tr><tr><td>replay_strategy</td><td>HERreplay strategy</td><td>future</td></tr><tr><td>k_replay</td><td>Ratio of HER data to data from normal experience</td><td>4</td></tr><tr><td>batch_size</td><td>Size of the batch during updates</td><td>256</td></tr><tr><td>Y</td><td>Discount factor to model uncertainty about future decisions</td><td>0.98</td></tr><tr><td>T</td><td>Polyak coefficient for target critics smoothing</td><td>0.95</td></tr><tr><td>lr_actor</td><td>Actor learning rate</td><td>10-3</td></tr><tr><td>lr_critic</td><td>Critic learning rate</td><td>10-3</td></tr><tr><td>α</td><td>Entropy coefficient used in SAC</td><td>0.2</td></tr><tr><td>automatic_entropy</td><td>Automatically tune the entropy coefficient</td><td>False</td></tr></table>
|
| 321 |
+
|
| 322 |
+
Computing resources. The sensorimotor learning experiments contain 8 conditions: 2 of 10 seeds and 6 of 5 seeds. Each run leverages 24 cpus (24 actors) for about 72h for a total of 9.8 cpu years. Experiments presented in this paper requires machines with at least 24 cpu cores. The language grounding phase runs on a single cpu and trains in a few minutes.
|
| 323 |
+
|
| 324 |
+
# C.2 LANGUAGE-CONDITIONED GOAL GENERATOR
|
| 325 |
+
|
| 326 |
+
Language-Conditioned Goal Generator Training. We use a conditional Variational AutoEncoder (C-VAE) (Sohn et al., 2015). Conditioned on the initial configuration and a sentence describing the expected transformation of one object relation, it generates compatible goal configurations. After the first phase of goal-directed sensorimotor training, the agent interacts with a hard-coded social partner as described in Main Section 3. From these interactions, we obtain a dataset of 5000 triplets: initial configuration, final configuration and sentence describing one change of predicate from the initial to the final configuration. The list of sentences used by the synthetic social partner is provided in Table 5. Note that red, green and blue refer to objects $o _ { 1 }$ $, \ o _ { 2 } , \ o _ { 3 }$ respectively.
|
| 327 |
+
|
| 328 |
+
Content of test sets. We describe the 5 test sets:
|
| 329 |
+
|
| 330 |
+
1. Test set 1 is made of input pairs $( c _ { i } , \ s )$ from the training set, but tests the coverage of all compatible final configurations $\mathcal { C } _ { f }$ , $80 \%$ of which are not found in the training set. In that sense, it is partly a test set.
|
| 331 |
+
2. Test set 2 contains two input pairs: $\{ [ 0 \mathrm { ~ 1 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ } ]$ , put blue close to green $\}$ and $\{ [ 0 \ 0 \ 1 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0 ]$ , put green below red $\}$ corresponding to 7 and 24 compatible final configurations respectively.
|
| 332 |
+
3. Test set 3 corresponds to all pairs including the initial configuration $c _ { i } ~ = ~ [ 1 ~ 1 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ~ 0 ]$ (29 pairs), with an average of 13 compatible final configurations.
|
| 333 |
+
4. Test set 4 corresponds to all pairs including one of the sentences put green on top of red and put blue far from red, i.e. 20 pairs with an average of 9.5 compatible final configurations.
|
| 334 |
+
|
| 335 |
+
5. Test set 5 is all pairs that include both the initial configuration of test set 3 and one of the sentences of test set 4, i.e. 2 pairs with 6 and 13 compatible goals respectively. Note that pairs of set 5 are removed from sets 3 and 4.
|
| 336 |
+
|
| 337 |
+
Table 5: List of instructions. Each of them specifies a shift of one predicate, either from false to true $( 0 1 $ ) or true to false $\lvert 1 0 \rvert$ ). block A and block B represent two different blocks from {red, blue, green}.
|
| 338 |
+
|
| 339 |
+
<table><tr><td rowspan=1 colspan=1>Transition type</td><td rowspan=1 colspan=1>Sentences</td></tr><tr><td rowspan=1 colspan=1>Close0→1(×3)</td><td rowspan=1 colspan=1>Put block A close to block B, Bring block A and block B together,Getblock A andblockB close_from each_other,Getblock A close_to block B.</td></tr><tr><td rowspan=1 colspan=1>Close1→0(x3)</td><td rowspan=1 colspan=1>PutblockAfar_fromblockB,GetblockAfarfromblockB,Getblock A and block B far_from each_other,Bringblock A and block B apart,</td></tr><tr><td rowspan=1 colspan=1>Above 0→1(×6)</td><td rowspan=1 colspan=1>Putblock A aboveblockB,Putblock A on_top_ofblockB,PutblockB underblockA,PutblockB belowblock A.</td></tr><tr><td rowspan=1 colspan=1>Above1→0(×6)</td><td rowspan=1 colspan=1>Remove block A from_above block B,Remove block A from block B,Remove blockB from_below blockA,Put blockB and block A on_the_same_plane,Put block A and block B on_the_same_plane.</td></tr></table>
|
| 340 |
+
|
| 341 |
+
Testing on logical expressions of instructions. To evaluate DECSTR on logical functions of instructions, we generate three types of expressions:
|
| 342 |
+
|
| 343 |
+
1. 100 instructions of the form “A and B” where A and B are basic instructions corresponding to shifts of the form above $0 ~ ~ 1$ (see Table 5). These intersections correspond to stacks of 3 or pyramids.
|
| 344 |
+
|
| 345 |
+
2. 200 instructions of the form “A and $\mathbf { B } ^ { \ast }$ where A and B are above and close instructions respectively. B can be replaced by “not $\mathbf { B } ^ { \ast }$ with probability 0.5.
|
| 346 |
+
|
| 347 |
+
3. 200 instructions of the form “(A and B) or (C and D))”, where A, B, C, D are basic instructions: A and C are above instructions while B and D are close instructions. Here also, any instruction can be replaced by its negation with probability 0.5.
|
| 348 |
+
|
| 349 |
+
Implementation details. The encoder is a fully-connected neural network with two layers of size 128 and $R e L U$ activations. It takes as input the concatenation of the final binary configuration and its two conditions: the initial binary configuration and an embedding of the NL sentence. The NL sentence is embedded with an recurrent network with embedding size 100, tanh non-linearities and biases. The encoder outputs the mean and log-variance of the latent distribution of size 27. The decoder is also a fully-connected network with two hidden layers of size 128 and $R e L U$ activations. It takes as input the latent code $z$ and the same conditions as the encoder. As it generates binary vectors, the last layer uses sigmoid activations. We train the architecture with a mixture of KullbackLeibler divergence loss $\left( K D _ { \mathrm { l o s s } } \right)$ w.r.t a standard Gaussian prior and a binary Cross-Entropy loss $\left( B C E _ { \mathrm { l o s s } } \right)$ . The combined loss is $B C E _ { \mathrm { l o s s } } ~ + ~ \beta ~ \times ~ K D _ { \mathrm { l o s s } } ^ { \mathrm { ~ \scriptsize ~ \bar { ~ } } }$ with $\beta ~ = ~ 0 . 6$ . We use an Adam optimizer, a learning rate of $5 \times 1 0 ^ { - 4 }$ , a batch size of 128 and optimize for 150 epochs. As training is fast $ { \approx } 2 { \mathrm { m i n } }$ on a single cpu), we conducted a quick hyperparameter search over $\beta$ , layer sizes, learning rates and latent sizes (see Table 6). We found robust results for various layer sizes, various $\beta$ below 1. and latent sizes above 9.
|
| 350 |
+
|
| 351 |
+
Table 6: LGG hyperparameter search. In bold are the selected hyperparameters.
|
| 352 |
+
|
| 353 |
+
<table><tr><td>Hyperparam.</td><td>Values.</td></tr><tr><td>β</td><td>[0.5, 0.6, 0.7,0.8, 0.9, 1.]</td></tr><tr><td>layers size</td><td>[128, 256]</td></tr><tr><td>learning rate</td><td>[0.01, 0.005, 0.001]</td></tr><tr><td>latent sizes</td><td>[9, 18, 27]</td></tr></table>
|
| 354 |
+
|
| 355 |
+
# D BASELINES AND ORACLE
|
| 356 |
+
|
| 357 |
+
The language-conditioned LB baseline is fully described in the main document.
|
| 358 |
+
|
| 359 |
+
# D.1 EXPERT BUCKETS ORACLE
|
| 360 |
+
|
| 361 |
+
In the EXPERT BUCKETS oracle, the automatic bucket generation of DECSTR is replaced with an expert-predefined set of buckets using a priori measures of similarity and difficulty. To define these buckets, one needs prior knowledge of the set of unreachable configurations, which are ruled out. The 5 predefined buckets contain all configurations characterized by:
|
| 362 |
+
|
| 363 |
+
• Bucket 1: a single close relation between a pair of objects and no above relations (4 configurations).
|
| 364 |
+
• Bucket 2: 2 or 3 close relations and no above relations (4 configurations).
|
| 365 |
+
• Bucket 3: 1 stack of 2 blocks and a third block that is either away or close to the base, but is not close to the top of the stack (12 configurations).
|
| 366 |
+
• Bucket 4: 1 stack of 2 blocks and the third block close to the stack, as well as pyramid configurations (9 configurations).
|
| 367 |
+
• Bucket 5: stacks of 3 blocks (6 configurations).
|
| 368 |
+
|
| 369 |
+
These buckets are the only difference between the EXPERT BUCKETS baseline and DECSTR.
|
| 370 |
+
|
| 371 |
+
# D.2 LGB-C BASELINE
|
| 372 |
+
|
| 373 |
+
The LGB-C baseline represent goals not as semantic configurations but as particular 3D targets positions for each block, as defined for example in Lanier et al. (2019) and Li et al. (2019). The goal vector size is also 9 and contains the 3D target coordinates of the three blocks. This baselines also implements decoupling and, thus, can be compared to DECSTR in the three phases. We keep as many modules as possible common with DECSTR to minimize the amount of confounding factors and reduce the under-fitting bias. The goal selection is taken from DECSTR, but converts semantic configuration into specific randomly-sampled target coordinates for the blocks, see Figure 5. The agent is not conditioned on its current semantic configuration nor its semantic goal configuration. For this reason, we do not apply the symmetry bias. The binary reward is positive when the maximal distance between a block and its target position is below $5 \mathrm { c m }$ , i.e. the size of a block (similar to (Andrychowicz et al., 2017)). To make this baseline competitive, we integrate methods from a state of the art block manipulation algorithm (Lanier et al., 2019). The agent receives positive rewards of 1, 2, 3 when the corresponding number of blocks are well placed. We also introduce the multi-criteria HER from Lanier et al. (2019). Finally, we add an additional object-centered inductive bias by only considering, for each Deep Sets module, the 3D target positions of the corresponding pair.That is, for each object pair, we ignore the 3D positions of the remaining object, yielding to a vector of size 6. Language grounding is based on a C-VAE similar to the one used by DECSTR. We only replace the cross-entropy loss by a mean-squared loss due to the continuous nature of the target goal coordinates. We use the exact same training and testing sets as with semantic goals.
|
| 374 |
+
|
| 375 |
+

|
| 376 |
+
Figure 5: The LGB-C baseline samples target positions for each block (example for a pyramid here).
|
| 377 |
+
|
| 378 |
+
# E ADDITIONAL RESULTS
|
| 379 |
+
|
| 380 |
+
# E.1 COMPARISON DECSTR - LGB-C IN SKILL LEARNING PHASE
|
| 381 |
+
|
| 382 |
+
Figure 6 presents the average success rate over the 35 valid configurations during the skill learning phase for DECSTR and the LGB-C baseline. Because LGB-C cannot pursue semantic goals as such, we randomly sample a specific instance of this semantic goal: target block coordinates that satisfy the constraints expressed by it. Because LGB-C is not aware of the original semantic goal, we cannot measure success as the ability to achieve it. Instead, success is defined as the achievement of the corresponding specific goal: bringing blocks to their respective targets within an error margin of $5 \mathrm { { c m } }$ each. In short, DECSTR targets semantic goals and is evaluated on its ability to reach them. LGB-C targets specific goals and is evaluated on its ability to reach them. These two measures do not match exactly. Indeed, LGB-C sometimes achieves its specific goal but, because of the error margins, does not achieve the original semantic goal.
|
| 383 |
+
|
| 384 |
+

|
| 385 |
+
Figure 6: Comparison DECSTR and LGB-C in the skill learning phase.
|
| 386 |
+
|
| 387 |
+
# E.2 AUTOMATIC BUCKET GENERATION.
|
| 388 |
+
|
| 389 |
+
Figure 7 depicts the evolution of the content of buckets along training (epochs 1, 50 and 100). Each pie chart corresponds to a reachable configuration and represents the distribution of configurations into buckets across 10 different seeds. Blue, orange, green, yellow, purple represent buckets 1 to 5 respectively and grey are undiscovered configurations. At each moment, the discovered configurations are equally spread over the 5 buckets. A given configuration may thus change bucket as new configurations are discovered, so that the ones discovered earlier are assigned buckets with lower indexes. Goals are organized by their bucket assignments in the Expert Buckets condition (from top to bottom).
|
| 390 |
+
|
| 391 |
+
After the first epoch (left), DECSTR has discovered all configurations from the expert buckets 1 and 2, and some runs have discovered a few other configurations. After 50 epochs, more configurations have been discovered but they are not always the same across runs. Finally, after 100 epochs, all configurations are found. Buckets are then steady and can be compared to expert-defined buckets. It seems that easier goals (top-most group) are discovered first and assigned in the first-easy buckets (blue and orange). Hardest configurations (stacks of 3, bottom-most group) seem to be discovered last and assigned the last-hardest bucket (purple). In between, different runs show different compositions, which are not always aligned with expert-defined buckets. Goals from expert-defined buckets 3 and 4 (third and fourth group from the top) seem to be attributed different automatic buckets in different runs. This means that they are discovered in different orders depending on the runs. In summary, easier and harder goals from expert buckets $1 \textrm { - } 2$ and 5 respectively seem to be well detected by our automatic bucket generations. Goals in medium-level expected difficulty as defined by expert buckets seem not to show any significant difference in difficulty for our agents.
|
| 392 |
+
|
| 393 |
+
# E.3 DECSTR LEARNING TRAJECTORIES
|
| 394 |
+
|
| 395 |
+
Figure 8 shows the evolution of internal estimations of the competence C, the learning progress LP and the associated sampling probabilities P. Note that these metrics are computed online by
|
| 396 |
+
|
| 397 |
+

|
| 398 |
+
Figure 7: Evolution of the content of buckets from automatic bucket generation: epoch 1 (2400 episodes, left), 50 (middle) and 100 (right). Each pie chart corresponds to one of the 35 valid configurations. It represents the distribution of the bucket attributions of that configuration across 10 runs. Blue, orange, green, yellow, purple represent automatically generated buckets 1 to 5 respectively (increasing order of difficulty) and grey represents undiscovered configurations. Goals are organized according to their expert bucket attributions in the Expert Buckets condition (top-bottom organization).
|
| 399 |
+
|
| 400 |
+
DECSTR, as it self-evaluates on random discovered configurations. Learning trajectories seem to be uniform across different runs, and buckets are learned in increasing order. This confirms that the time of discovery is a good proxy for goal difficulty. In that case, configurations discovered first end up in the lower index buckets and are indeed learned first. Note that a failing automatic bucket generation would assign goals to random buckets. This would result in uniform measures of learning progress across different buckets, which would be equivalent to uniform goal sampling. As Main Figure 3c shows, DECSTR performs much better than the random goals conditions. This proves that our automatic bucket algorithm generates useful goal clustering.
|
| 401 |
+
|
| 402 |
+

|
| 403 |
+
Figure 8: Learning trajectories of 6 DECSTR agents.
|
parse/train/chPj_I5KMHG/chPj_I5KMHG_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/chPj_I5KMHG/chPj_I5KMHG_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/chPj_I5KMHG/chPj_I5KMHG_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/e5vrkfc5aau/e5vrkfc5aau.md
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Towards Multi-Grained Explainability for Graph Neural Networks
|
| 2 |
+
|
| 3 |
+
Xiang Wang§†‡, Ying-Xin Wu§, An Zhang†, Xiangnan $\mathbf { H e } ^ { \ S } ;$ ∗, Tat-Seng Chua†
|
| 4 |
+
|
| 5 |
+
‡Sea-NExT Joint Lab †National University of Singapore §University of Science and Technology of China xiangwang@u.nus.edu, wuyxin@mail.ustc.edu.cn, an_zhang@nus.edu.sg xiangnanhe@gmail.com, dcscts@nus.edu.sg
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
When a graph neural network (GNN) made a prediction, one raises question about explainability: “Which fraction of the input graph is most influential to the model’s decision?” Producing an answer requires understanding the model’s inner workings in general and emphasizing the insights on the decision for the instance at hand. Nonetheless, most of current approaches focus only on one aspect: (1) local explainability, which explains each instance independently, thus hardly exhibits the class-wise patterns; and (2) global explainability, which systematizes the globally important patterns, but might be trivial in the local context. This dichotomy limits the flexibility and effectiveness of explainers greatly. A performant paradigm towards multi-grained explainability is until-now lacking and thus a focus of our work. In this work, we exploit the pre-training and fine-tuning idea to develop our explainer and generate multi-grained explanations. Specifically, the pre-training phase accounts for the contrastivity among different classes, so as to highlight the class-wise characteristics from a global view; afterwards, the fine-tuning phase adapts the explanations in the local context. Experiments on both synthetic and real-world datasets show the superiority of our explainer, in terms of AUC on explaining graph classification over the leading baselines. Our codes and datasets are available at https://github.com/Wuyxin/ReFine.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
While graph neural networks (GNNs) [1, 2] have achieved great success in a variety of applications, they usually come as black-box models. The general problem about GNN explainability [3] is to answer “What knowledge does the model use to arrive at the conclusions in general and the specific decision at hand?”. Thoroughly answering this question requires the global understanding of the model’s inner workings and the local insights on a specific instance. Take a GNN model for molecular property prediction as an example. The global understanding exhibits the knowledge encoded in the model, such as the distribution of the chemical groups; meanwhile, the local insight identifies certain chemical groups responsible for a given molecule’s property. Such multi-grained explainability flexibly and reliably inspects the decision-making process of the GNN [4, 5], which is critical to the applications on safety, fairness, and privacy [6, 7].
|
| 14 |
+
|
| 15 |
+
In the field of GNN explainability [8], explainer models broadly attribute model prediction to the input graph, then sample a salient subgraph as the explanation for the model prediction. However, most of current explainers focus on either on local [9, 10, 6, 11, 12] or global explainability [13, 7], thereby suffer from inherent limitations correspondingly:
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: Explanations on Visual Genome dataset generated from ReFine, including the pre-training and fine-tuning phases. Right indicates the changes before and after the fine-tuning.
|
| 19 |
+
|
| 20 |
+
• Local explainability aims to customize the explanatory subgraph for each instance individually. However, such local explanations fall short in systematizing the prototypical patterns shared within a class or group of instances. Thus, they lack the global understanding of the model’s workings [7, 13], which is vital to generalize to other instances being explained. • Global explainability targets at the globally important patterns across multiple instances, which could violate the local fidelity [14] — the globally important substructure may not be important or even appear in the local context, thus might fail to explain a specific instance reliably.
|
| 21 |
+
|
| 22 |
+
Briefly put, these approaches overlook the multi-granularity nature of explainability, while we argue that the local and global explainability should be exhibited simultaneously to obtain faithful explanations. Taking Figure 1 as an example, the global explainability differentiates the explanations for various classes, such as livestock-background subgraphs for the farm class, human-sports subgraphs for the stadium class. When zooming in a specific scene graph, the local explainability refines on the farm-wise patterns and specifies (sheep, on, meadow) as the final explanation. A paradigm towards such multi-grained explainability is until-now lacking, to the best of our knowledge.
|
| 23 |
+
|
| 24 |
+
Towards multi-grained explainability, we propose a novel explainer, ReFine, with pre-training and fine-tuning [15, 16] techniques for explaining GNN models. Specifically, pre-training aims to answer “What class-wise knowledge does the GNN leverage to make predictions in general?”. We combine the contrastive learning [17, 18] into class-wise generative probabilistic models [7], thereby approach coarser-grained explanations (i.e. saliency maps of all edges). Going beyond the global view, fine-tuning is to answer “Why the GNN model made the certain prediction for the instance at hand?”, where we upgrade the coarser-grained explanations to the finer-grained explanations (i.e. explanatory subgraphs of salient edges). Through this way, ReFine can faithfully generate multigrained explanations, and we empirically show its effectiveness as compared to some state-of-the-art explainers [9, 6, 7, 19]. It is also worth mentioning that, although the general understanding of GNN predictions has been considered in a recent work PGExplainer [7], it is only exploited to train a generative probabilistic model shared across all the explained instances, rather than dissecting and modeling the class-wise knowledge explicitly. Overall, our contributions are summarized as:
|
| 25 |
+
|
| 26 |
+
• We investigate the local explainability and global explainability for explaining GNNs and put forward the concept of multi-grained explainability. • We propose a pre-training and fine-tuning framework to generate multi-grained explanations, which has both global understanding of model workings and local insights on specific instances. • We achieve state-of-the-art performance on various datasets w.r.t. predictive accuracy on explaining GNNs. Quantitative and qualitative results verify multi-granularity explainability of ReFine.
|
| 27 |
+
|
| 28 |
+
# 2 Background & Task Formulation
|
| 29 |
+
|
| 30 |
+
In this section, we begin with the backgrounds on GNNs and frame the task of generating multigrained explainability for GNN models.
|
| 31 |
+
|
| 32 |
+

|
| 33 |
+
Figure 2: Model construction of proposed ReFine. Left represents the pre-training phase for a graph example, which is labeled and predicted as “Cycle”, from the BA-3motif dataset. Right demonstrates the fine-tuning process where the saliency map is fine-tuned on the instance to achieve local fidelity.
|
| 34 |
+
|
| 35 |
+
Graph Neural Networks. We denote the graph data as $\mathcal { G } = ( \nu , \mathcal { E } )$ with the node set $\nu$ and the edge set $\mathcal { E }$ . The structural feature of a graph can be represented by an adjacency matrix $\mathbf { A } \in \{ 0 , 1 \} ^ { | \mathcal { V } | \times | \mathcal { V } | }$ where $A _ { i j } = 1$ indicates an edge starting from node $i$ to node $j$ , and $A _ { i j } = 0$ otherwise. The node feature matrix is represented as $\mathbf { X } \in \mathbb { R } ^ { | \nu | \times d }$ .
|
| 36 |
+
|
| 37 |
+
Graph neural networks (GNNs) [1, 2] aim to generate powerful representation on graphs in an end-to-end fashion. Such representation facilitates the downstream tasks, such as node classification [20, 21], link prediction [22, 23, 24, 25], and graph classification [26]. Without loss of generality, we consider a graph classifier $f : \mathbb { G } \to \mathbb { R } ^ { \bar { C } }$ , which classifies an input graph $\mathcal { G } \in \mathbb { G }$ in $C$ categories and outputs prediction by $c = \arg \operatorname* { m a x } _ { i } f ( \mathcal { G } ) _ { i }$ . Typically, $f$ consists of three components: (1) learning of node representations, which distills vectorized information from neighboring nodes and updates node representations recursively; (2) learning of graph representation, which aggregates the node representations to establish the representation for the holistic graph; (3) graph classification, which maps the graph representation into the probability distribution of different categories.
|
| 38 |
+
|
| 39 |
+
Explaining Graph Neural Networks. The explainer model (aka. the explanation method) usually performs two consecutive operations: (1) feature attribution [27, 28], which associates each feature of an input $\mathcal { G } \in \mathbb { G }$ with the relevance score for the classifier’s prediction; (2) feature selection [29, 6], which extracts salient features based on the relevance scores to construct an explanatory subgraph. The subgraph is regarded as the evidence for the GNN to make the prediction.
|
| 40 |
+
|
| 41 |
+
We follow previous works [6, 7, 10, 19] and focus on the contributions of the structural features (i.e. edges). Our explainer consists of two components: an attribution module $\tau$ for edge attribution and a selection module $\mathcal { H }$ for edge selection. Specifically, $\tau$ assigns the adjacency matrix $\mathbf { A }$ with a saliency map, i.e.
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
\mathbf { M } = { \mathcal { T } } ( { \mathcal { G } } , f , c ) ,
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
where $\mathbf { M } \in \mathbb { R } ^ { | \mathcal { V } | \times | \mathcal { V } | }$ , each element of which is the importance score of the edge to the prediction class $c$ . Such saliency map can further result in an attentive graph $\mathcal { G } _ { a t t } = \mathbf { A } \odot \mathbf { M }$ . Then, the selection module $\mathcal { H }$ identifies the edges of explanatory subgraph based on the attentive graph:
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\mathbf { S } = \mathcal { H } ( \mathcal { G } _ { a t t } , f , c , \rho ) ,
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
where $\mathbf { S } \in \mathbb { R } ^ { | \mathcal { V } | \times | \mathcal { V } | }$ constructs the explanatory subgraph $\mathcal { G } _ { e x p } = \mathbf { A } \odot \mathbf { S }$ , and $\rho$ is the explanation budget [27] that equals to the number of nonzero elements in $\mathbf { s }$ .
|
| 54 |
+
|
| 55 |
+
# 3 Methodology
|
| 56 |
+
|
| 57 |
+
Here we present our explainer that purses multi-grained explainability by pre-training and fine-tuning, as Figure 2 shows. In the pre-training phase, the attribution module distills the class-wise knowledge, which contrasts the salient structures based on the prediction, answering the question “Why did the GNN model assign a group of graphs with the same prediction?”. In the next phase, the selection module goes beyond the class-wise knowledge and fine-tunes the saliency maps on a specific instance for answering “Why the GNN model made the certain prediction for the specific graph?”.
|
| 58 |
+
|
| 59 |
+
# 3.1 Pre-training Towards Global Explainability
|
| 60 |
+
|
| 61 |
+
Class-aware Attribution Module. Towards the global explainability of GNN, it is important to specify the class-wise knowledge across the instances with the same prediction. Inspired by the success of generative models [7, 30, 31] in capturing the succinct structures from the graphs, we hire multiple generative probabilistic models [7] as our attribution models (short for attributor), i.e. $\mathcal { T } _ { \theta } = \{ \mathcal { T } ^ { ( c ) } | c = 1 , \cdots , C \}$ which is parameterized by $\theta$ . The attributor $\mathcal { T } ^ { \left( c \right) }$ is responsible for uncovering the hidden patterns from some graph instances $O ^ { ( c ) } = \{ \mathcal { G } | c = \arg \operatorname* { m a x } _ { i } f ( \mathcal { G } ) _ { i } \}$ with the same prediction class $c$ .
|
| 62 |
+
|
| 63 |
+
Formally, each attributor $\mathcal { T } ^ { \left( c \right) }$ is composed of a GNN encoder $\mathrm { G N N } ^ { ( c ) }$ and a MLP decoder $\mathbf { M L P } ^ { ( c ) }$ , whose parameters are shared when explaining graphs in $\mathcal { O } ^ { ( c ) }$ , so as to systematize the class-wise patterns. Next we introduce the construction of each class-wise attributor, while we omit the superscript for conciseness. Specifically, the encoder GNN embeds each node $i$ in $\mathcal { G }$ with representation $\mathbf { z } _ { i }$ and summarize the representations of all nodes as:
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
\mathbf { Z } = \mathbf { G N N } ( { \mathcal { G } } , \mathbf { X } ) ,
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
where $\mathbf { Z } \in \mathbb { R } ^ { | \nu | \times d ^ { \prime } }$ encodes the structural feature $\mathbf { A }$ and node feature $\mathbf { X }$ . On the top of the node representations, we model the graph structure as edge distributions and frame the generation of explanatory subgraphs by sampling from the edge distributions:
|
| 70 |
+
|
| 71 |
+
$$
|
| 72 |
+
P ( \mathbf { M } | \mathbf { Z } ) = \prod _ { ( i , j ) \in \mathcal { E } } P ( M _ { i j } | \mathbf { z } _ { i } , \mathbf { z } _ { j } ) ,
|
| 73 |
+
$$
|
| 74 |
+
|
| 75 |
+
where $M _ { i j }$ indicates the importance of edge $( i , j )$ . Then the MLP encoder takes the concatenation of node representations $\mathbf { z } _ { i }$ and $\mathbf { z } _ { j }$ as the inputs and outputs the importance score. To approximate the importance score to the discrete distribution and optimize the generator via gradient propagation, we adopt the reparameterization trick [7], where an independent random variable $\epsilon \sim \mathrm { U n i f o r m } ( 0 , 1 )$ is introduced. As such, the edge probability is formulated as:
|
| 76 |
+
|
| 77 |
+
$$
|
| 78 |
+
P ( M _ { i j } | \mathbf { z } _ { i } , \mathbf { z } _ { j } ) = \sigma ( ( \log \frac { \epsilon } { 1 - \epsilon } + \alpha _ { i j } ) / \beta ) , \quad \mathrm { w i t h } \quad \alpha _ { i j } = \mathbf { M L P } ( [ \mathbf { z } _ { i } , \mathbf { z } _ { j } ] ) ,
|
| 79 |
+
$$
|
| 80 |
+
|
| 81 |
+
where $\sigma$ is the sigmoid function, and $\beta$ denotes the temperature hyperparameter. It is worth emphasizing that our attributors is different from PGExplainer [7], where only one generative probabilistic model is involved. Thus, their attribution results are limited in differentiating the patterns of different classes and systematizing the class-wise knowledge.
|
| 82 |
+
|
| 83 |
+
Pre-training Class-wise Attribution Module. We devise the following objective function for training the class-wise attributors.
|
| 84 |
+
|
| 85 |
+
$$
|
| 86 |
+
\operatorname* { m i n } _ { \theta } \mathcal { L } _ { 1 } + \gamma \mathcal { L } _ { c t s } ,
|
| 87 |
+
$$
|
| 88 |
+
|
| 89 |
+
where $\gamma$ is the trade-off hyperparameter. We start from maximizing the mutual information between the attentive graphs and the target prediction of the graph, which is a widely-used learning paradigm in the literature [32, 6, 7]. It guides us to find the prediction-relevant explanatory subgraph, which equals to minimizing the following loss:
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
\mathcal { L } _ { 1 } = - \mathbb { E } _ { \mathcal { G } } \mathbb { E } _ { \epsilon } \mathbb { E } _ { c ^ { \prime } } [ P ( Y = c ^ { \prime } | G = \mathcal { G } ) \log P ( Y = c ^ { \prime } | G = \mathcal { G } _ { a t t } ^ { ( c ) } ) ] ,
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
where $G$ and $Y$ are the graph and prediction variables, respectively; $\mathcal { G }$ is the full graph instance to explain; by sampling $\epsilon \in { \mathrm { U n i f o r m } } ( 0 , 1 )$ and $c ^ { \prime } \in \{ 1 , \cdots , C \}$ , the class-wise saliency map $\mathbf { M } ^ { ( c ) }$ can be generated from Equation (4); $P ( Y = c ^ { \prime } | G = \mathcal { G } ) = f ( \mathcal { G } ) _ { c ^ { \prime } }$ is the output probabilities of the prediction being $c ^ { \prime }$ when feeding $\mathcal { G }$ to the GNN model $f$ ; analogously, $P ( Y = c ^ { \prime } | G = \mathcal { G } _ { a t t } ^ { ( c ) } ) =$ $f ( \mathcal { G } _ { a t t } ^ { ( c ) } ) _ { c ^ { \prime } }$ audits the output probability when feeding $\mathcal { G } _ { a t t } ^ { ( c ) } = \mathbf { A } \odot \mathbf { M } ^ { ( c ) }$ .
|
| 96 |
+
|
| 97 |
+
Moreover, we introduce a contrastive learning [33, 34, 18, 35, 36, 37] loss to emphasize differences among the class-wise patterns — the substructure of the full graph that is distant to that of the graphs with a different prediction but close to that of the graphs with the same prediction. It makes each attributor focus on the unique and discriminative information within the class. Specifically, for the saliency maps $\mathcal { G } _ { a t t 1 } ^ { ( c _ { 1 } ) }$ of $\mathcal { G } _ { 1 }$ and $\mathcal { G } _ { a t t 2 } ^ { ( c _ { 2 } ) }$ of $\mathcal { G } _ { 2 }$ , it encourages the agreements between $\mathcal { G } _ { a t t 1 } ^ { ( c _ { 1 } ) }$ and $\mathcal { G } _ { a t t 2 } ^ { ( c _ { 2 } ) }$ when , compared to that when $c _ { 1 } \neq c _ { 2 }$ :
|
| 98 |
+
|
| 99 |
+
$$
|
| 100 |
+
\mathcal { L } _ { c t s } = \mathbb { E } _ { \mathcal { G } , \mathcal { G } ^ { \prime } } \mathbb { E } _ { \epsilon , \epsilon ^ { \prime } } [ ( - 1 ) ^ { \mathbb { I } ( c _ { 1 } = c _ { 2 } ) } \times \mu ( \ell ( \mathcal { G } _ { a t t 1 } ^ { ( c _ { 1 } ) } , \mathcal { G } _ { a t t 2 } ^ { ( c _ { 2 } ) } ) ) ] ,
|
| 101 |
+
$$
|
| 102 |
+
|
| 103 |
+
where as the $\mu$ is the softplus function [3presentation similarity — $\ell$ arity bewhere een two subgraphs, which is setis the graph representations by $\ell ( \mathcal { G } _ { a t t 1 } ^ { ( c _ { 1 } ) } , \mathcal { G } _ { a t t 2 } ^ { ( c _ { 2 } ) } ) = \mathbf { h } _ { 1 } ^ { \top } \mathbf { h } _ { 2 }$ $\mathbf { h } _ { 1 }$
|
| 104 |
+
feeding G(c1)att1 into the encoder $\mathrm { G N N } ^ { ( c _ { 1 } ) }$ and aggregating the node representations. Similar for $\mathbf { h } _ { 2 }$ . In addition, following [6], we adopt the element-wise entropy and $L _ { 1 }$ norm on the edge probability. By jointly optimizing these two losses in Equation (6), the class-wise attribution module learns to stratify the discriminative information for different classes and generate the saliency maps with a global view of the target GNN. Taking an information-theoretical look at Equation (8), minimizing contrastive learning loss is maximizing a lower bound of the mutual information between the latent graph representations of two graphs within the same class.
|
| 105 |
+
|
| 106 |
+
# 3.2 Fine-tuning Towards Local Explainability
|
| 107 |
+
|
| 108 |
+
Having established the saliency map that exhibits the importance of each edge, the standard way is to rank all edges based on their importance scores and simply select the top edges as the explanatory subgraphs. However, we argue that such a coarser-grained selection fails to consider the dependencies of these selected edges explicitly. Within a high-quality explanatory subgraph, edges are supposed to cooperate with each other, form the coalition, and approach the target prediction better than individuals [38, 39]. Without considering such coalition effect, the quality of the explanatory subgraph is greatly limited.For example, when explaining why the molecule graph is classified as mutagenic [13], two connected nitrogen-oxygen (N-O) bonds form a chemical group $\mathrm { N O _ { 2 } }$ and present more discriminative information about the mutagenic property [13]; whereas, two salient but disconnected N-O bonds from different chemical groups are less informative to interpret the mutagenic property.
|
| 109 |
+
|
| 110 |
+
Clearly, the coarser-grained saliency maps are insufficient to exhibit the coalition effect of edges, thus might be redundant and suboptimal explanations. Hence, we move forward to learn a finer-grained explanatory subgraph. Technically, on the top of the well-trained class-wise attribution module, we add the selection module:
|
| 111 |
+
|
| 112 |
+
$$
|
| 113 |
+
\mathbf { S } ^ { ( c ) } = \mathcal { H } ( \mathcal { G } _ { a t t } ^ { ( c ) } , f , c , \rho ) ,
|
| 114 |
+
$$
|
| 115 |
+
|
| 116 |
+
where $\rho$ is the number of edges selected in the explanatory subgraph; $\mathcal { H }$ is a sampling (selection) function; $\mathbf { S } ^ { ( c ) }$ preserves the elements selected by the selection function and sets the other elements as 0. Instead of the hard selection that picks up the edges with the highest probability, $\mathcal { H }$ samples edges according to their probabilities. Allowing edges with low probabilities to be sampled can prevent the explainer from collapsing to suboptimal solutions with limited coalition effect.
|
| 117 |
+
|
| 118 |
+
With the new stochastic adjacency matrix $\mathbf { S } ^ { ( c ) }$ , we are able to extract the subgraph $\mathcal { G } _ { e x p } ^ { ( c ) }$ . To fine-tune the attribution and selection modules, we resort to maximize the mutual information between the explanation candidate $\mathcal { G } _ { e x p } ^ { ( c ) }$ and the target prediction of the full graph:
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
\mathcal { L } _ { 2 } = - \mathbb { E } _ { \mathcal { G } } \mathbb { E } _ { \epsilon } \mathbb { E } _ { c ^ { \prime } } [ P ( Y = c ^ { \prime } | G = \mathcal { G } ) \log P ( Y = c ^ { \prime } | G = \mathcal { G } _ { e x p } ^ { ( c ) } ) ] .
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
By optimizing the loss above, the selection module accounts for the edge coalition within $\mathbf { S } ^ { ( c ) }$ , so as to achieve higher local fidelity. Moreover, as the selection module discards some elements in the stochastic adjacency matrix, it blocks parts of gradient backpropagation and possibly acts as a dropout function to avoid the overfitting on the instance-level explanations.
|
| 125 |
+
|
| 126 |
+
# 4 Experiments
|
| 127 |
+
|
| 128 |
+
We mainly aim to investigate the following questions:
|
| 129 |
+
|
| 130 |
+
• RQ1: How effective is the pre-training phase of ReFine, as compared to that of existing methods? • RQ2: How effective is the fine-tuning phase of ReFine, as compared to that of the pre-training phase?
|
| 131 |
+
|
| 132 |
+
# 4.1 Experimental Settings
|
| 133 |
+
|
| 134 |
+
Datasets and Target GNNs. We consider four datasets with various target GNNs:
|
| 135 |
+
|
| 136 |
+
• Molecule graph classification. We use the Mutagenicity dataset [40, 41], where 4, 337 molecule graphs are classified into two classes based on their mutagenic effect on a bacterium. The welltrained Graph Isomorphism Network (GIN) [26, 42] has achieved a $100 \%$ testing accuracy.
|
| 137 |
+
|
| 138 |
+
• Scene graph classification. Following the previous work [10], we select 4, 443 (images, scene graphs) pairs from Visual Genome [43] to construct the VG-5 dataset. Wherein, the graphs are labeled with five classes: stadium, street, farm, surfing, forest. Each graph contains regions of the objects as the nodes, while edges indicates the relationships between object nodes. The target GNN is an APPNP [44] which achieves $6 4 . 3 \%$ testing accuracy.
|
| 139 |
+
|
| 140 |
+
• Handwriting graph classification. We use the MNIST superpixel dataset [45], which converts 70,000 images into the graphs of superpixel adjacency. Every graph is labeled as one of ten digit classes. We trained a Spline-based GNN [46] which gains $9 7 . 9 \%$ accuracy in the testing dataset.
|
| 141 |
+
|
| 142 |
+
• Motif graph classification. We follow prior studies [6, 7] to create a synthetic dataset, BA-3motif, which contains 3,000 graphs. Specifically, we adopt the Barabasi-Albert (BA) graphs as the base, and attach each base with one of three motifs: house, cycle, grid. The trained GNN model, ASAP [47], classifies them according to the type of attached motifs and achieved $100 \%$ testing accuracy.
|
| 143 |
+
|
| 144 |
+
Baselines. We compare our ReFine with the state-of-the-art explanation methods:
|
| 145 |
+
|
| 146 |
+
• SA [9] directly uses the gradients of the model prediction w.r.t. the adjacency matrix of the input graph as the importance of edges.
|
| 147 |
+
• GNNExplainer [6] applies the soft masks on the messages carried by edges, where each mask indicates an edge’s importance. Note that the masks of graph instances are trained individually.
|
| 148 |
+
• PGExplainer [7] hires a neural network to learn to generate the masks for the input edges. The generative model is trained over multiple explained instances.
|
| 149 |
+
• PGM-Explainer [19] collects the prediction change on the random node perturbations, and then learns a Bayesian network from these perturbation-prediction observations, so as to capture the dependencies among the nodes and the prediction. Here we transfer it to model the edge importance.
|
| 150 |
+
|
| 151 |
+
Optimization. For the parametric explanation methods (GNNExplainer, PGExplainer, PGMExplainer), we apply a grid search to tune their own hyperparameters. For our ReFine framework, we use the Adam optimizer and set the learning rate of pre-training and fine-tuning as 1e-3 and 1e-4, respectively. All experiments are done on a single Tesla V100 SXM2 GPU (32 GB).
|
| 152 |
+
|
| 153 |
+
Evaluation Metrics. It is challenging to quantitatively evaluate the quality of explanations, since the ground-truth explanations are usually unavailable. In the literature, there are three widely-used evaluation metrics:
|
| 154 |
+
|
| 155 |
+
• Predictive Accuracy $( \mathbf { A C C } @ \rho )$ [32, 48, 27]. It measures the fidelity of the explanatory subgraphs by feeding it solely into the target model and auditing how well it recovers the target prediction. We report the average $\operatorname { A C C } @ \rho$ over all graphs in the testing sets, and further denote ACC-AUC as the area under the ACC curve over different selection ratios $\rho \in \{ 0 . 1 , 0 . 2 , \cdot \cdot \cdot , 0 . 9 , 1 . 0 \}$ . $\operatorname { A C C } @ \rho$ and ACC-AUC are suitable for all the datasets.
|
| 156 |
+
|
| 157 |
+
• Recall $@ N$ . As suggested in prior studies [6, 7, 32], we can create the “ground-truth explanations” for the synthetic dataset. Specifically, for BA-3motif, the motif of each graph can be viewed as the discriminative information coherent in the model knowledge. As such, we can frame the evaluation problem as the task of top edge ranking. To be more specific, for an explanatory subgraph, the edges within the motif are positive, while the others are negative. To this end, recall can be adopted as the evaluation protocols. More formally, Recall $\ @ N = \mathbb { E } _ { \boldsymbol { \mathcal { G } } } [ | \mathcal { G } _ { s } \cap \mathcal { G } _ { s } ^ { * } | / | \mathcal { G } _ { s } ^ { * } | ]$ where $\mathcal { G } _ { s }$ is composed of the top- $N$ edges and $\mathcal { G } _ { s } ^ { * }$ is the ground-truth explanatory subgraph.
|
| 158 |
+
|
| 159 |
+
# 4.2 Quantitative Evaluations
|
| 160 |
+
|
| 161 |
+
Influence of Pre-training (RQ1). To investigate the effectiveness of pre-training, we first compare the performance of the attribution module with the state-of-the-art explainers. We denote this variant by ReFine-FT, which disables the fine-tuning phase and simply constructs the explanatory subgraphs based on the saliency scores. Moreover, we build another variant ReFine-CT, which removes the contrastive loss (Equation (8)) from the pre-training phase, to study the effect of the contrastive loss on the class-wise knowledge modeling. To be more clear, we present the difference of PGExplainer [7], ReFine and its ablation models in Table 4.2. Table 2 presents the performance comparisons, from which we have several findings:
|
| 162 |
+
|
| 163 |
+
Table 1: Structure/Training Difference of PGExplainer, ReFine and its ablation models.
|
| 164 |
+
|
| 165 |
+
<table><tr><td rowspan="2"></td><td colspan="2">Pre-training</td><td rowspan="2">Fine-tuning</td></tr><tr><td>Class-wise Attributors</td><td>Contrastive Learning</td></tr><tr><td>PG-Explainer</td><td></td><td></td><td></td></tr><tr><td>Refine-CT</td><td></td><td></td><td></td></tr><tr><td>Refine-FT</td><td></td><td></td><td></td></tr><tr><td>Refine</td><td></td><td></td><td></td></tr></table>
|
| 166 |
+
|
| 167 |
+
Table 2: Comparison of our ReFine and other baseline explainers
|
| 168 |
+
|
| 169 |
+
<table><tr><td rowspan="2"></td><td rowspan="2">Mutagenicity ACC-AUC</td><td rowspan="2">VG-5 ACC-AUC</td><td rowspan="2">MNIST ACC-AUC</td><td colspan="2">BA-3motif</td></tr><tr><td>ACC-AUC</td><td>Recall@5</td></tr><tr><td>SA</td><td>0.769</td><td>0.769</td><td>0.559</td><td>0.518</td><td>0.243</td></tr><tr><td>GNNExplainer</td><td>0.895±0.010</td><td>0.895±0.003</td><td>0.535±0.013</td><td>0.528±0.005</td><td>0.157±0.002</td></tr><tr><td>PG-Explainer</td><td>0.631±0.008</td><td>0.790±0.004</td><td>0.504±0.010</td><td>0.586±0.004</td><td>0.293±0.001</td></tr><tr><td>PGM-Explainer</td><td>0.714±0.007</td><td>0.792±0.001</td><td>0.615±0.003</td><td>0.575±0.002</td><td>0.250±0.000</td></tr><tr><td>ReFine-CT</td><td>0.888±0.008</td><td>0.891±0.002</td><td>0.526±0.007</td><td>0.610±0.004</td><td>0.248±0.001</td></tr><tr><td>ReFine-FT</td><td>0.945±0.011</td><td>0.906±0.002</td><td>0.587±0.008</td><td>0.616±0.003</td><td>0.299±0.002</td></tr><tr><td>ReFine</td><td>0.955±0.005</td><td>0.914±0.001</td><td>0.636±0.003</td><td>0.630±0.006</td><td>0.304±0.000</td></tr><tr><td>Relative Impro.</td><td>6.7%</td><td>2.1%</td><td>3.4%</td><td>7.5%</td><td>3.8%</td></tr></table>
|
| 170 |
+
|
| 171 |
+
• ReFine-FT outperforms the baseline explainers in most cases. To be more specific, it achieves significant relative improvements over the strongest baselines w.r.t. ACC-AUC by $5 . 6 \%$ and $5 . 1 \%$ in Mutagenicity and BA-3motif, respectively. This demonstrates the rationality and effectiveness of the attribution module. We attribute these improvements to the class-wise knowledge modeling: (1) By specifying the attributor models for each class, ReFine-FT is able to capture the underlying patterns shared across the instances within the same class; and (2) Conducting the contrastive learning between different class-aware attributors makes ReFine-FT better stratify the discriminative information for different classes. The class-wise knowledge endows ReFine-FT with the global view of the target model’s workings.
|
| 172 |
+
• Although PGExplainer is also equipped with the global view of the target model, its performance is worse than that of ReFine-FT. We ascribe this to the limitations of PGExplainer’s global view, which is founded upon all the explained instances, but fails to differentiate the class-wise patterns. This again verifies the rationality and effectiveness of our attribution module.
|
| 173 |
+
• ReFine-FT outperforms ReFine-CT by a large margin, indicating that the contrastive learning plays a critical role in exhibiting the class-wise knowledge. Specifically, it summarizes the patterns across similar instances and focuses on the information pertinent to specific classes, while filtering the irrelevant and redundant information out.
|
| 174 |
+
• Interestingly, in MNIST, the result of ReFine-FT is worse than that of PGM-Explainer. One possible reason is that the random perturbations in PGM-Explainer create a collection of broken graphs and offer a more comprehensive observation of the graphs. We leave the exploration of subgraph-prediction relations as future work.
|
| 175 |
+
|
| 176 |
+
Influence of Fine-tuning (RQ2). To justify the effectiveness of the fine-tuning phase, we report the performance of ReFine with our selection module in Tables 2 and 3, as compared to the performance before fine-tuning. We have the following observations:
|
| 177 |
+
|
| 178 |
+
Table 3: Performance under different selection ratios before and after fine-tuning.
|
| 179 |
+
|
| 180 |
+
<table><tr><td rowspan="2">ACC@p</td><td colspan="2">Mutagenicity</td><td colspan="2">VG-5</td><td colspan="2">MNIST</td><td colspan="2">BA-3motif</td></tr><tr><td>0.4</td><td>0.6</td><td>0.4</td><td>0.6</td><td>0.4</td><td>0.6</td><td>0.4</td><td>0.6</td></tr><tr><td>ReFine-FT</td><td>96.8%</td><td>94.0%</td><td>91.3%</td><td>91.4%</td><td>41.4%</td><td>61.4%</td><td>36.0%</td><td>65.7%</td></tr><tr><td>ReFine</td><td>97.8%</td><td>96.2%</td><td>92.2%</td><td>93.4%</td><td>71.4%</td><td>82.0%</td><td>39.0%</td><td>72.8%</td></tr><tr><td>Improvement</td><td>+1.0%</td><td>+2.2%</td><td>+0.9%</td><td>+2.0%</td><td>+30.0%</td><td>+20.6%</td><td>+3.0%</td><td>+7.1%</td></tr></table>
|
| 181 |
+
|
| 182 |
+

|
| 183 |
+
Figure 3: Qualitative Results in MNIST Superpixels dataset. Handwriting graphs are in black, which respectively represent number $\mathbf { \bar { \theta } } ^ { 6 6 } 0 ^ { 9 }$ , $^ { \cdot 6 } 2 ^ { \cdot }$ , “8” within each block from left to right. Explanatory graphs are in red, where the top $10 \%$ edges are highlighted.
|
| 184 |
+
|
| 185 |
+
• Fine-tuning with the selection module can improves the explanation performance sustainably, which indicates the effectiveness of our pre-training and fine-tuning paradigm. Specifically, in MNIST, the predictive accuracy of the explanations after fine-tuning improves from $4 1 . 4 \%$ to $7 1 . 4 \%$ when the selection rato is 0.4. We attribute these improvements to the local insights on specific instances: (1) Benefiting from the saliency map obtained in the pre-training phase, the selection module is able to filter noisy edges out and narrow down to where the target model looks to make decisions; (2) Fine-tuning the explanatory subgraphs considers the coalition effect of edges, thus approaches more information to recover the target prediction.
|
| 186 |
+
|
| 187 |
+
• Jointly analyzing Tables 2 and 3, ReFine consistently outperforms all baselines across the four datasets. Advantageous to the local or global explanations, our multi-grained explanations not only have the global understanding of model workings (i.e. the class-wise knowledge), but also account for the local insights on specific instances (i.e. the coalition effect of edges in the local context). It illustrates the superiority of our ReFine paradigm.
|
| 188 |
+
|
| 189 |
+
Overall, the empirical supports justify the significance of fine-tuning well. The contributions of fine-tuning w.r.t. the overall improvements over PG-Explainer are $3 7 . 1 \%$ and $3 1 . 8 \%$ in MNIST and BA-3motif datasets, respectively. One possible reason that fine-tuning contributes only $3 . 1 \%$ and $6 . 4 \%$ portion of overall improvements in Mutagenicity and VG-5 as compared to PG-Explainer is the existance of rich node features in these two datasets. With the assistance of node features, the global patterns might be well-captured durining pre-training, thus leaving little space for the local patterns to improve.
|
| 190 |
+
|
| 191 |
+
# 4.3 Qualitative Analysis
|
| 192 |
+
|
| 193 |
+
We present the qualitative results on MNIST superpixel in Figure 3, where the pre-trained and fine-tuned explanations are the explanatory subgraphs before fine-tuning (i.e. extracted based on the saliency map) and after fine-tuning (i.e. derived from the selection module), respectively.
|
| 194 |
+
|
| 195 |
+
Influence of Pre-training (RQ1). The pre-trained results (first row) well demonstrate the global patterns, where the explanatory subgraphs for interpreting the digit $\mathbf { \bar { \theta } } ^ { 6 } 0 ^ { 9 }$ focus more on the edges between hollows in the middle and the fringe of the number. While interpreting the prediction $\mathbf { \Delta } ^ { 6 6 } 5 ^ { 9 }$ , the explanations identify the edges spread on the bend of the number as the most important features. Also, we observe an interesting pattern in the results for explaining the prediction $\mathbf { \vec { \nu } } ^ { 6 } \mathbf { \vec { 8 } } ^ { 5 }$ , where the background edges draw more attention, rather than edges relevant to the digits, revealing the evidence for the target GNN to classify. It also shows the supporting evidence of the difference between the model explanation and the human explanation which focuses more on the digit graphs other than the background graphs. Through the pre-trained examples, the global patterns offer vital model understanding and inspections for the model’s decision-making process.
|
| 196 |
+
|
| 197 |
+

|
| 198 |
+
Figure 4: Qualitative Results in Mutagenicity dataset. The prediction of the molecule in the first row is mutagenic, while the molecule in the second row is predicted as non-mutagenic. The selection ratios range from $10 \%$ to $50 \%$ . Note that some opposite edges are visually coincident.
|
| 199 |
+
|
| 200 |
+
Table 4: Time costs (in second) of GNNExplainer, PG-Explainer and the fine-tuning phase of Refine.
|
| 201 |
+
|
| 202 |
+
<table><tr><td></td><td>Mutagenicity</td><td>VG-5</td><td>MNIST</td><td>BA-3motif</td></tr><tr><td>GNNExplainer</td><td>2.03</td><td>1.88</td><td>0.637</td><td>1.11</td></tr><tr><td>PG-Explainer</td><td>0.030</td><td>0.035</td><td>0.040</td><td>0.032</td></tr><tr><td>Refine(Fine-tuning)</td><td>0.821</td><td>0.583</td><td>0.535</td><td>0.423</td></tr></table>
|
| 203 |
+
|
| 204 |
+
Influence of Fine-tuning (RQ2). We now compare the pre-trained and fine-tuned explanations. Clearly, the fine-tuned explanatory graphs make clearer boundaries on the instances. The explanation adapted with the user-defined ratio pays greater attention to details that are only applicable to the specific instances. For example, one can take a closer look at the explanations in the 4-th column. Without the fine-tuning phase, the explanation may distracted by the edges across the digit and the background, such that these transition edges might be deemed as the most important features while achieve suboptimal predictive accuracies. In contrast, the fine-tuned explanation dispels such misunderstanding, with a higher local accuracy. Similar patterns can be found in other examples.
|
| 205 |
+
|
| 206 |
+
The qualitative results on Mutagenicity are presented in Figure 4, where each explanation has been fine-tuned on the corresponding ratio. We can see the flexibility on ReFine, which enables the fine-tuning on a specific user-defined ratio. With the selection ratio increases, the class probability output by the target GNN is generally stable or further improved. Moreover, the fine-tuning phase focuses more on the combination of features, with the constraint of selection ratio, to purse the higher accuracy rather than intercepting on a ranking based on the static edge importance, which is only valid under the addictive feature assumption [32].
|
| 207 |
+
|
| 208 |
+
# 4.4 Discussions
|
| 209 |
+
|
| 210 |
+
Efficiency for Generating Explanations. The inference time [7] to explain a new instance by the pre-trained ReFine is the same as PGExplainer under the same attributor construction. Different from GNNExplainer which has to retrain the model for each graph, ReFine only needs a few finetuning steps on the pre-trained model (20 steps on average). Thus, ReFine can gain a boosting performance for explaining graphs while remaining efficient in terms of time complexity. Specifically, we summarize the time costs in the Table 4. Clearly, our ReFine is more efficient than GNNExplainer and is computationally comparable to PG-Explainer.
|
| 211 |
+
|
| 212 |
+
Limitations. Although ReFine can well-encode the class-wise knowledge by learning the parameters of multiple attributors, it can hardly map such knowledge to the structure representation as XGNN [13]. This limits the human understanding on the core of input data via a conciseness substructure.
|
| 213 |
+
|
| 214 |
+
# 5 Related Work
|
| 215 |
+
|
| 216 |
+
We consider two classes of related work for GNNs explainability: studies on local explainability, which independently explain for each input graph without referring to other knowledge, e.g., training data; studies on global explainability, which provide explanations for multiple instances with the guide of the model-level or class-level knowledge. See [49, 8, 50] for more overviews.
|
| 217 |
+
|
| 218 |
+
• Local Explainability. In general, there are two research lines. (1) Non-parametric explanation methods [10, 9, 11] use some heuristics as the feature contributions of a specific instance, without involving additional trainable models. Gradient-like scores [10, 9, 11] are wisely-used heuristics, which is obtained by backpropagating the model prediction or loss to the input features, such as adjacency matrix [10], along with the model architecture. (2) Parametric explanation methods [6, 19, 51, 52] additionally train a parametrized explainer model to generate the saliency maps or explanatory subgraphs for individual instances. The explainer model is typically optimized towards local fidelity [32, 48, 27], which uses the explanations to recover the target predictions. For example, GNNExplainer [6] learns soft masks for an instance and applies them on the adjacency matrix. PGM-Explainer [19] trains an Bayesian network upon the pairs of graph perturbations and prediction changes. However, these methods fall short in capturing the prototypical patterns shared within the same groups or classes.
|
| 219 |
+
|
| 220 |
+
• Global Explainability. This direction is less explored compared to the local explainability of GNNs [8]. To provide a global understanding of the model prediction, PGExplainer [7] formulates the generation of multiple explanations based on its collective and inductive property, and designs the attributor as a deep neural network whose parameters are shared across the explained instances. XGNN [13] explains GNNs by training a graph generator, which outputs class-wise graph patterns to explain this class. As it is designed to explain the holistic class, making it hardly applicable on an specific instance, e.g., the graph patterns may not even exit on the instance.
|
| 221 |
+
|
| 222 |
+
# 6 Conclusion and Future Work
|
| 223 |
+
|
| 224 |
+
Multi-grained explainability promises to offer a flexible and all-round inspection of deep models’ decision-making, which has been less explored in the literature. Motivated by this, we proposed a novel generative probabilistic model, ReFine, to approach the multi-granularity explainability via pre-training and fine-tuning. To exhibit global explanations with the prototypical patterns, the pre-training phase is founded upon the class-aware attribution modules and distills the class-level knowledge by contrastive learning. When given a specific instance, the fine-tuning phase further adapts the global explanations in the local context with high fidelity. In the fashion of pre-training and fine-tuning, we can generate explanations with both global patterns and local features. Extensive results in four datasets show that our method indeed improves the quality of explanatory subgraphs.
|
| 225 |
+
|
| 226 |
+
As future direction, we consider the extension of ReFine to fulfill the counterfactual explanation [53], which answers ‘Why the target GNN model made a certain prediction, rather than another prediction?”, to enrich the multi-granularity explainability. Further, multi-grained explainability can be exhibited to explore the model robustness and heuristically guide the model construction.
|
| 227 |
+
|
| 228 |
+
# Acknowledgments and Disclosure of Funding
|
| 229 |
+
|
| 230 |
+
Funding in direct support of this work: the Sea-NExT Joint Lab, Singapore MOE AcRF T2; the National Natural Science Foundation of China (U19A2079, 62121002); the National Key Research and Development Program of China (2020YFB1406703).
|
| 231 |
+
|
| 232 |
+
# References
|
| 233 |
+
|
| 234 |
+
[1] Vijay Prakash Dwivedi, Chaitanya K. Joshi, Thomas Laurent, Yoshua Bengio, and Xavier Bresson. Benchmarking graph neural networks. CoRR, abs/2003.00982, 2020.
|
| 235 |
+
|
| 236 |
+
[2] Zonghan Wu, Shirui Pan, Fengwen Chen, Guodong Long, Chengqi Zhang, and Philip S. Yu. A comprehensive survey on graph neural networks. TNNLS, 32(1):4–24, 2021.
|
| 237 |
+
[3] Shruthi Chari, Daniel M. Gruen, Oshani Seneviratne, and Deborah L. McGuinness. Directions for explainable knowledge-enabled systems. In Knowledge Graphs for eXplainable Artificial Intelligence: Foundations, Applications and Challenges, pages 245–261. 2020.
|
| 238 |
+
[4] Christopher J. Anders, Plamen Pasliev, Ann-Kathrin Dombrowski, Klaus-Robert Müller, and Pan Kessel. Fairwashing explanations with off-manifold detergent. In ICML, pages 314–323, 2020.
|
| 239 |
+
[5] Sebastian Lapuschkin, Stephan Wäldchen, Alexander Binder, Grégoire Montavon, Wojciech Samek, and Klaus-Robert Müller. Unmasking clever hans predictors and assessing what machines really learn. Nature communications, 10(1):1–8, 2019.
|
| 240 |
+
[6] Zhitao Ying, Dylan Bourgeois, Jiaxuan You, Marinka Zitnik, and Jure Leskovec. Gnnexplainer: Generating explanations for graph neural networks. In NeurIPS, pages 9240–9251, 2019.
|
| 241 |
+
[7] Dongsheng Luo, Wei Cheng, Dongkuan Xu, Wenchao Yu, Bo Zong, Haifeng Chen, and Xiang Zhang. Parameterized explainer for graph neural network. In NeurIPS, 2020.
|
| 242 |
+
[8] Hao Yuan, Haiyang Yu, Shurui Gui, and Shuiwang Ji. Explainability in graph neural networks: A taxonomic survey. CoRR, abs/2012.15445, 2020.
|
| 243 |
+
[9] Federico Baldassarre and Hossein Azizpour. Explainability techniques for graph convolutional networks. CoRR, abs/1905.13686, 2019.
|
| 244 |
+
[10] Phillip E. Pope, Soheil Kolouri, Mohammad Rostami, Charles E. Martin, and Heiko Hoffmann. Explainability methods for graph convolutional neural networks. In CVPR, pages 10772–10781, 2019.
|
| 245 |
+
[11] Thomas Schnake, Oliver Eberle, Jonas Lederer, Shinichi Nakajima, K. T. Schutt, Klaus-Robert Muller, and Grégoire Montavon. Higher-order explanations of graph neural networks via relevant walks. arXiv, 2020.
|
| 246 |
+
[12] Michael Sejr Schlichtkrull, Nicola De Cao, and Ivan Titov. Interpreting graph neural networks for NLP with differentiable edge masking. CoRR, abs/2010.00577, 2020.
|
| 247 |
+
[13] Hao Yuan, Jiliang Tang, Xia Hu, and Shuiwang Ji. XGNN: towards model-level explanations of graph neural networks. In Rajesh Gupta, Yan Liu, Jiliang Tang, and B. Aditya Prakash, editors, KDD, pages 430–438, 2020.
|
| 248 |
+
[14] Marco Túlio Ribeiro, Sameer Singh, and Carlos Guestrin. "why should I trust you?": Explaining the predictions of any classifier. In KDD, pages 1135–1144, 2016.
|
| 249 |
+
[15] Jeremy Howard and Sebastian Ruder. Universal language model fine-tuning for text classification. In ACL, pages 328–339, 2018.
|
| 250 |
+
[16] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
|
| 251 |
+
[17] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey E. Hinton. A simple framework for contrastive learning of visual representations. In ICML, volume 119, pages 1597–1607, 2020.
|
| 252 |
+
[18] Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross B. Girshick. Momentum contrast for unsupervised visual representation learning. In CVPR, pages 9726–9735, 2020.
|
| 253 |
+
[19] Minh N. Vu and My T. Thai. Pgm-explainer: Probabilistic graphical model explanations for graph neural networks. In NeurIPS, 2020.
|
| 254 |
+
[20] Hongyang Gao and Shuiwang Ji. Graph u-nets. In ICML, volume 97, pages 2083–2092, 2019.
|
| 255 |
+
|
| 256 |
+
[21] Petar Velickovi ˇ c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua ´ Bengio. Graph attention networks. ICLR, 2018.
|
| 257 |
+
[22] William L. Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In NeurIPS, pages 1024–1034, 2017.
|
| 258 |
+
[23] Xiang Wang, Xiangnan He, Meng Wang, Fuli Feng, and Tat-Seng Chua. Neural graph collaborative filtering. In SIGIR, pages 165–174, 2019.
|
| 259 |
+
[24] Xiang Wang, Xiangnan He, Yixin Cao, Meng Liu, and Tat-Seng Chua. KGAT: knowledge graph attention network for recommendation. In KDD, pages 950–958, 2019.
|
| 260 |
+
[25] Xiangnan He, Kuan Deng, Xiang Wang, Yan Li, Yong-Dong Zhang, and Meng Wang. Lightgcn: Simplifying and powering graph convolution network for recommendation. In SIGIR, pages 639–648, 2020.
|
| 261 |
+
[26] Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In ICLR, 2019.
|
| 262 |
+
[27] Ian Covert, Scott Lundberg, and Su-In Lee. Feature removal is a unifying principle for model explanation methods. In NeurIPS, 2020.
|
| 263 |
+
[28] Marco Ancona, Enea Ceolini, Cengiz Öztireli, and Markus Gross. Towards better understanding of gradient-based attribution methods for deep neural networks. In ICLR, 2018.
|
| 264 |
+
[29] Constantin F Aliferis, Alexander Statnikov, Ioannis Tsamardinos, Subramani Mani, and Xenofon D Koutsoukos. Local causal and markov blanket induction for causal discovery and feature selection for classification part i: Algorithms and empirical evaluation. JMLR, 11(1), 2010.
|
| 265 |
+
[30] Peter D Hoff, Adrian E Raftery, and Mark S Handcock. Latent space approaches to social network analysis. Journal of the american Statistical association, 97(460):1090–1098, 2002.
|
| 266 |
+
[31] Max Welling Thomas N. Kipf. Variational graph auto-encoders. In NeurIPS Workshops, 2016.
|
| 267 |
+
[32] Jianbo Chen, Le Song, Martin J. Wainwright, and Michael I. Jordan. Learning to explain: An information-theoretic perspective on model interpretation. In ICML, pages 882–891, 2018.
|
| 268 |
+
[33] Lukas Faber, Amin K Moghaddam, and Roger Wattenhofer. Contrastive graph neural network explanation. 2021.
|
| 269 |
+
[34] R. Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Philip Bachman, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. In ICLR, 2019.
|
| 270 |
+
[35] Fan-Yun Sun, Jordan Hoffmann, Vikas Verma, and Jian Tang. Infograph: Unsupervised and semi-supervised graph-level representation learning via mutual information maximization. In ICLR, 2020.
|
| 271 |
+
[36] Yuning You, Tianlong Chen, Yongduo Sui, Ting Chen, Zhangyang Wang, and Yang Shen. Graph contrastive learning with augmentations. In NeurIPS, 2020.
|
| 272 |
+
[37] Jiancan Wu, Xiang Wang, Fuli Feng, Xiangnan He, Liang Chen, Jianxun Lian, and Xing Xie. Self-supervised graph learning for recommendation. In SIGIR, pages 726–735, 2021.
|
| 273 |
+
[38] Christopher Frye, Damien de Mijolla, Laurence Cowton, Megan Stanley, and Ilya Feige. Shapley-based explainability on the data manifold. In ICLR, 2021.
|
| 274 |
+
[39] H. W. Kuhn and A. W. Tucker. Contributions to the theory of games, volume 2. Princeton University Press, 1953.
|
| 275 |
+
[40] Jeroen Kazius, Ross McGuire, and Roberta Bursi. Derivation and validation of toxicophores for mutagenicity prediction. Journal of medicinal chemistry, 48(1):312–320, 2005.
|
| 276 |
+
[41] Kaspar Riesen and Horst Bunke. Iam graph database repository for graph based pattern recognition and machine learning. In SPR and SSPR, pages 287–297, 2008.
|
| 277 |
+
[42] Weihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik, Percy Liang, Vijay S. Pande, and Jure Leskovec. Strategies for pre-training graph neural networks. In ICLR, 2020.
|
| 278 |
+
[43] Ranjay Krishna, Yuke Zhu, Oliver Groth, Justin Johnson, Kenji Hata, Joshua Kravitz, Stephanie Chen, Yannis Kalantidis, Li-Jia Li, David A. Shamma, Michael S. Bernstein, and Li Fei-Fei. Visual genome: Connecting language and vision using crowdsourced dense image annotations. IJCV, 123(1):32–73, 2017.
|
| 279 |
+
[44] Johannes Klicpera, Aleksandar Bojchevski, and Stephan Günnemann. Predict then propagate: Graph neural networks meet personalized pagerank. In ICLR, 2019.
|
| 280 |
+
[45] Federico Monti, Davide Boscaini, Jonathan Masci, Emanuele Rodolà, Jan Svoboda, and Michael M. Bronstein. Geometric deep learning on graphs and manifolds using mixture model cnns. In CVPR, pages 5425–5434, 2017.
|
| 281 |
+
[46] Matthias Fey, Jan Eric Lenssen, Frank Weichert, and Heinrich Müller. Splinecnn: Fast geometric deep learning with continuous b-spline kernels. In CVPR, pages 869–877, 2018.
|
| 282 |
+
[47] Ekagra Ranjan, Soumya Sanyal, and Partha P. Talukdar. ASAP: adaptive structure aware pooling for learning hierarchical graph representations. In AAAI, pages 5470–5477, 2020.
|
| 283 |
+
[48] Jian Liang, Bing Bai, Yuren Cao, Kun Bai, and Fei Wang. Adversarial infidelity learning for model interpretation. In KDD, pages 286–296, 2020.
|
| 284 |
+
[49] Hao Yuan, Haiyang Yu, Shurui Gui, and Shuiwang Ji. Explainability in graph neural networks: A taxonomic survey. CoRR, 2020.
|
| 285 |
+
[50] Thomas Schnake, Oliver Eberle, Jonas Lederer, Shinichi Nakajima, Kristof T. Schütt, KlausRobert Müller, and Grégoire Montavon. XAI for graphs: Explaining graph neural network predictions by identifying relevant walks. CoRR, abs/2006.03589, 2020.
|
| 286 |
+
[51] Hao Yuan, Haiyang Yu, Jie Wang, Kang Li, and Shuiwang Ji. On explainability of graph neural networks via subgraph explorations. ArXiv, 2021.
|
| 287 |
+
[52] Patrick Schwab and Walter Karlen. Cxplain: Causal explanations for model interpretation under uncertainty. In NeurIPS, pages 10220–10230, 2019.
|
| 288 |
+
[53] Raha Moraffah, Mansooreh Karami, Ruocheng Guo, Adrienne Raglin, and Huan Liu. Causal interpretability for machine learning-problems, methods and evaluation. SIGKDD Explorations, 22(1):18–33, 2020.
|
parse/train/e5vrkfc5aau/e5vrkfc5aau_content_list.json
ADDED
|
@@ -0,0 +1,1229 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "Towards Multi-Grained Explainability for Graph Neural Networks ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
200,
|
| 8 |
+
122,
|
| 9 |
+
797,
|
| 10 |
+
171
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Xiang Wang§†‡, Ying-Xin Wu§, An Zhang†, Xiangnan $\\mathbf { H e } ^ { \\ S } ;$ ∗, Tat-Seng Chua† ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
228,
|
| 19 |
+
220,
|
| 20 |
+
769,
|
| 21 |
+
237
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "‡Sea-NExT Joint Lab †National University of Singapore §University of Science and Technology of China xiangwang@u.nus.edu, wuyxin@mail.ustc.edu.cn, an_zhang@nus.edu.sg xiangnanhe@gmail.com, dcscts@nus.edu.sg ",
|
| 28 |
+
"bbox": [
|
| 29 |
+
228,
|
| 30 |
+
238,
|
| 31 |
+
769,
|
| 32 |
+
308
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "Abstract ",
|
| 39 |
+
"text_level": 1,
|
| 40 |
+
"bbox": [
|
| 41 |
+
462,
|
| 42 |
+
344,
|
| 43 |
+
535,
|
| 44 |
+
361
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "When a graph neural network (GNN) made a prediction, one raises question about explainability: “Which fraction of the input graph is most influential to the model’s decision?” Producing an answer requires understanding the model’s inner workings in general and emphasizing the insights on the decision for the instance at hand. Nonetheless, most of current approaches focus only on one aspect: (1) local explainability, which explains each instance independently, thus hardly exhibits the class-wise patterns; and (2) global explainability, which systematizes the globally important patterns, but might be trivial in the local context. This dichotomy limits the flexibility and effectiveness of explainers greatly. A performant paradigm towards multi-grained explainability is until-now lacking and thus a focus of our work. In this work, we exploit the pre-training and fine-tuning idea to develop our explainer and generate multi-grained explanations. Specifically, the pre-training phase accounts for the contrastivity among different classes, so as to highlight the class-wise characteristics from a global view; afterwards, the fine-tuning phase adapts the explanations in the local context. Experiments on both synthetic and real-world datasets show the superiority of our explainer, in terms of AUC on explaining graph classification over the leading baselines. Our codes and datasets are available at https://github.com/Wuyxin/ReFine. ",
|
| 51 |
+
"bbox": [
|
| 52 |
+
233,
|
| 53 |
+
375,
|
| 54 |
+
764,
|
| 55 |
+
623
|
| 56 |
+
],
|
| 57 |
+
"page_idx": 0
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "1 Introduction ",
|
| 62 |
+
"text_level": 1,
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
647,
|
| 66 |
+
310,
|
| 67 |
+
665
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "While graph neural networks (GNNs) [1, 2] have achieved great success in a variety of applications, they usually come as black-box models. The general problem about GNN explainability [3] is to answer “What knowledge does the model use to arrive at the conclusions in general and the specific decision at hand?”. Thoroughly answering this question requires the global understanding of the model’s inner workings and the local insights on a specific instance. Take a GNN model for molecular property prediction as an example. The global understanding exhibits the knowledge encoded in the model, such as the distribution of the chemical groups; meanwhile, the local insight identifies certain chemical groups responsible for a given molecule’s property. Such multi-grained explainability flexibly and reliably inspects the decision-making process of the GNN [4, 5], which is critical to the applications on safety, fairness, and privacy [6, 7]. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
679,
|
| 77 |
+
825,
|
| 78 |
+
818
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "In the field of GNN explainability [8], explainer models broadly attribute model prediction to the input graph, then sample a salient subgraph as the explanation for the model prediction. However, most of current explainers focus on either on local [9, 10, 6, 11, 12] or global explainability [13, 7], thereby suffer from inherent limitations correspondingly: ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
824,
|
| 88 |
+
825,
|
| 89 |
+
880
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "image",
|
| 95 |
+
"img_path": "images/02a09bd0ed0a22a1739882174903150d6e2fca645f0e80d594763f96870881bd.jpg",
|
| 96 |
+
"image_caption": [
|
| 97 |
+
"Figure 1: Explanations on Visual Genome dataset generated from ReFine, including the pre-training and fine-tuning phases. Right indicates the changes before and after the fine-tuning. "
|
| 98 |
+
],
|
| 99 |
+
"image_footnote": [],
|
| 100 |
+
"bbox": [
|
| 101 |
+
176,
|
| 102 |
+
89,
|
| 103 |
+
820,
|
| 104 |
+
252
|
| 105 |
+
],
|
| 106 |
+
"page_idx": 1
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"type": "text",
|
| 110 |
+
"text": "• Local explainability aims to customize the explanatory subgraph for each instance individually. However, such local explanations fall short in systematizing the prototypical patterns shared within a class or group of instances. Thus, they lack the global understanding of the model’s workings [7, 13], which is vital to generalize to other instances being explained. • Global explainability targets at the globally important patterns across multiple instances, which could violate the local fidelity [14] — the globally important substructure may not be important or even appear in the local context, thus might fail to explain a specific instance reliably. ",
|
| 111 |
+
"bbox": [
|
| 112 |
+
173,
|
| 113 |
+
316,
|
| 114 |
+
826,
|
| 115 |
+
422
|
| 116 |
+
],
|
| 117 |
+
"page_idx": 1
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"type": "text",
|
| 121 |
+
"text": "Briefly put, these approaches overlook the multi-granularity nature of explainability, while we argue that the local and global explainability should be exhibited simultaneously to obtain faithful explanations. Taking Figure 1 as an example, the global explainability differentiates the explanations for various classes, such as livestock-background subgraphs for the farm class, human-sports subgraphs for the stadium class. When zooming in a specific scene graph, the local explainability refines on the farm-wise patterns and specifies (sheep, on, meadow) as the final explanation. A paradigm towards such multi-grained explainability is until-now lacking, to the best of our knowledge. ",
|
| 122 |
+
"bbox": [
|
| 123 |
+
173,
|
| 124 |
+
434,
|
| 125 |
+
825,
|
| 126 |
+
531
|
| 127 |
+
],
|
| 128 |
+
"page_idx": 1
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"type": "text",
|
| 132 |
+
"text": "Towards multi-grained explainability, we propose a novel explainer, ReFine, with pre-training and fine-tuning [15, 16] techniques for explaining GNN models. Specifically, pre-training aims to answer “What class-wise knowledge does the GNN leverage to make predictions in general?”. We combine the contrastive learning [17, 18] into class-wise generative probabilistic models [7], thereby approach coarser-grained explanations (i.e. saliency maps of all edges). Going beyond the global view, fine-tuning is to answer “Why the GNN model made the certain prediction for the instance at hand?”, where we upgrade the coarser-grained explanations to the finer-grained explanations (i.e. explanatory subgraphs of salient edges). Through this way, ReFine can faithfully generate multigrained explanations, and we empirically show its effectiveness as compared to some state-of-the-art explainers [9, 6, 7, 19]. It is also worth mentioning that, although the general understanding of GNN predictions has been considered in a recent work PGExplainer [7], it is only exploited to train a generative probabilistic model shared across all the explained instances, rather than dissecting and modeling the class-wise knowledge explicitly. Overall, our contributions are summarized as: ",
|
| 133 |
+
"bbox": [
|
| 134 |
+
173,
|
| 135 |
+
537,
|
| 136 |
+
825,
|
| 137 |
+
717
|
| 138 |
+
],
|
| 139 |
+
"page_idx": 1
|
| 140 |
+
},
|
| 141 |
+
{
|
| 142 |
+
"type": "text",
|
| 143 |
+
"text": "• We investigate the local explainability and global explainability for explaining GNNs and put forward the concept of multi-grained explainability. • We propose a pre-training and fine-tuning framework to generate multi-grained explanations, which has both global understanding of model workings and local insights on specific instances. • We achieve state-of-the-art performance on various datasets w.r.t. predictive accuracy on explaining GNNs. Quantitative and qualitative results verify multi-granularity explainability of ReFine. ",
|
| 144 |
+
"bbox": [
|
| 145 |
+
171,
|
| 146 |
+
729,
|
| 147 |
+
826,
|
| 148 |
+
829
|
| 149 |
+
],
|
| 150 |
+
"page_idx": 1
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"type": "text",
|
| 154 |
+
"text": "2 Background & Task Formulation ",
|
| 155 |
+
"text_level": 1,
|
| 156 |
+
"bbox": [
|
| 157 |
+
174,
|
| 158 |
+
849,
|
| 159 |
+
483,
|
| 160 |
+
867
|
| 161 |
+
],
|
| 162 |
+
"page_idx": 1
|
| 163 |
+
},
|
| 164 |
+
{
|
| 165 |
+
"type": "text",
|
| 166 |
+
"text": "In this section, we begin with the backgrounds on GNNs and frame the task of generating multigrained explainability for GNN models. ",
|
| 167 |
+
"bbox": [
|
| 168 |
+
173,
|
| 169 |
+
882,
|
| 170 |
+
823,
|
| 171 |
+
911
|
| 172 |
+
],
|
| 173 |
+
"page_idx": 1
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"type": "image",
|
| 177 |
+
"img_path": "images/b65a07bdea6282bc06afa60e008f186a18124de65faa901d9e96c15a6cb5298b.jpg",
|
| 178 |
+
"image_caption": [
|
| 179 |
+
"Figure 2: Model construction of proposed ReFine. Left represents the pre-training phase for a graph example, which is labeled and predicted as “Cycle”, from the BA-3motif dataset. Right demonstrates the fine-tuning process where the saliency map is fine-tuned on the instance to achieve local fidelity. "
|
| 180 |
+
],
|
| 181 |
+
"image_footnote": [],
|
| 182 |
+
"bbox": [
|
| 183 |
+
176,
|
| 184 |
+
89,
|
| 185 |
+
823,
|
| 186 |
+
193
|
| 187 |
+
],
|
| 188 |
+
"page_idx": 2
|
| 189 |
+
},
|
| 190 |
+
{
|
| 191 |
+
"type": "text",
|
| 192 |
+
"text": "Graph Neural Networks. We denote the graph data as $\\mathcal { G } = ( \\nu , \\mathcal { E } )$ with the node set $\\nu$ and the edge set $\\mathcal { E }$ . The structural feature of a graph can be represented by an adjacency matrix $\\mathbf { A } \\in \\{ 0 , 1 \\} ^ { | \\mathcal { V } | \\times | \\mathcal { V } | }$ where $A _ { i j } = 1$ indicates an edge starting from node $i$ to node $j$ , and $A _ { i j } = 0$ otherwise. The node feature matrix is represented as $\\mathbf { X } \\in \\mathbb { R } ^ { | \\nu | \\times d }$ . ",
|
| 193 |
+
"bbox": [
|
| 194 |
+
173,
|
| 195 |
+
271,
|
| 196 |
+
825,
|
| 197 |
+
332
|
| 198 |
+
],
|
| 199 |
+
"page_idx": 2
|
| 200 |
+
},
|
| 201 |
+
{
|
| 202 |
+
"type": "text",
|
| 203 |
+
"text": "Graph neural networks (GNNs) [1, 2] aim to generate powerful representation on graphs in an end-to-end fashion. Such representation facilitates the downstream tasks, such as node classification [20, 21], link prediction [22, 23, 24, 25], and graph classification [26]. Without loss of generality, we consider a graph classifier $f : \\mathbb { G } \\to \\mathbb { R } ^ { \\bar { C } }$ , which classifies an input graph $\\mathcal { G } \\in \\mathbb { G }$ in $C$ categories and outputs prediction by $c = \\arg \\operatorname* { m a x } _ { i } f ( \\mathcal { G } ) _ { i }$ . Typically, $f$ consists of three components: (1) learning of node representations, which distills vectorized information from neighboring nodes and updates node representations recursively; (2) learning of graph representation, which aggregates the node representations to establish the representation for the holistic graph; (3) graph classification, which maps the graph representation into the probability distribution of different categories. ",
|
| 204 |
+
"bbox": [
|
| 205 |
+
173,
|
| 206 |
+
337,
|
| 207 |
+
825,
|
| 208 |
+
463
|
| 209 |
+
],
|
| 210 |
+
"page_idx": 2
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"type": "text",
|
| 214 |
+
"text": "Explaining Graph Neural Networks. The explainer model (aka. the explanation method) usually performs two consecutive operations: (1) feature attribution [27, 28], which associates each feature of an input $\\mathcal { G } \\in \\mathbb { G }$ with the relevance score for the classifier’s prediction; (2) feature selection [29, 6], which extracts salient features based on the relevance scores to construct an explanatory subgraph. The subgraph is regarded as the evidence for the GNN to make the prediction. ",
|
| 215 |
+
"bbox": [
|
| 216 |
+
173,
|
| 217 |
+
474,
|
| 218 |
+
825,
|
| 219 |
+
545
|
| 220 |
+
],
|
| 221 |
+
"page_idx": 2
|
| 222 |
+
},
|
| 223 |
+
{
|
| 224 |
+
"type": "text",
|
| 225 |
+
"text": "We follow previous works [6, 7, 10, 19] and focus on the contributions of the structural features (i.e. edges). Our explainer consists of two components: an attribution module $\\tau$ for edge attribution and a selection module $\\mathcal { H }$ for edge selection. Specifically, $\\tau$ assigns the adjacency matrix $\\mathbf { A }$ with a saliency map, i.e. ",
|
| 226 |
+
"bbox": [
|
| 227 |
+
173,
|
| 228 |
+
551,
|
| 229 |
+
825,
|
| 230 |
+
607
|
| 231 |
+
],
|
| 232 |
+
"page_idx": 2
|
| 233 |
+
},
|
| 234 |
+
{
|
| 235 |
+
"type": "equation",
|
| 236 |
+
"img_path": "images/d09c0afee350ea5fca06045b6fc3e21e3cfd1bbbbcbf169126c196d260d45ca7.jpg",
|
| 237 |
+
"text": "$$\n\\mathbf { M } = { \\mathcal { T } } ( { \\mathcal { G } } , f , c ) ,\n$$",
|
| 238 |
+
"text_format": "latex",
|
| 239 |
+
"bbox": [
|
| 240 |
+
441,
|
| 241 |
+
619,
|
| 242 |
+
553,
|
| 243 |
+
637
|
| 244 |
+
],
|
| 245 |
+
"page_idx": 2
|
| 246 |
+
},
|
| 247 |
+
{
|
| 248 |
+
"type": "text",
|
| 249 |
+
"text": "where $\\mathbf { M } \\in \\mathbb { R } ^ { | \\mathcal { V } | \\times | \\mathcal { V } | }$ , each element of which is the importance score of the edge to the prediction class $c$ . Such saliency map can further result in an attentive graph $\\mathcal { G } _ { a t t } = \\mathbf { A } \\odot \\mathbf { M }$ . Then, the selection module $\\mathcal { H }$ identifies the edges of explanatory subgraph based on the attentive graph: ",
|
| 250 |
+
"bbox": [
|
| 251 |
+
173,
|
| 252 |
+
650,
|
| 253 |
+
825,
|
| 254 |
+
694
|
| 255 |
+
],
|
| 256 |
+
"page_idx": 2
|
| 257 |
+
},
|
| 258 |
+
{
|
| 259 |
+
"type": "equation",
|
| 260 |
+
"img_path": "images/efe39b908e86ccb5a0e9723f7e3b51522495546498c375c2cfc5fc317a8a4688.jpg",
|
| 261 |
+
"text": "$$\n\\mathbf { S } = \\mathcal { H } ( \\mathcal { G } _ { a t t } , f , c , \\rho ) ,\n$$",
|
| 262 |
+
"text_format": "latex",
|
| 263 |
+
"bbox": [
|
| 264 |
+
428,
|
| 265 |
+
707,
|
| 266 |
+
568,
|
| 267 |
+
724
|
| 268 |
+
],
|
| 269 |
+
"page_idx": 2
|
| 270 |
+
},
|
| 271 |
+
{
|
| 272 |
+
"type": "text",
|
| 273 |
+
"text": "where $\\mathbf { S } \\in \\mathbb { R } ^ { | \\mathcal { V } | \\times | \\mathcal { V } | }$ constructs the explanatory subgraph $\\mathcal { G } _ { e x p } = \\mathbf { A } \\odot \\mathbf { S }$ , and $\\rho$ is the explanation budget [27] that equals to the number of nonzero elements in $\\mathbf { s }$ . ",
|
| 274 |
+
"bbox": [
|
| 275 |
+
173,
|
| 276 |
+
737,
|
| 277 |
+
825,
|
| 278 |
+
767
|
| 279 |
+
],
|
| 280 |
+
"page_idx": 2
|
| 281 |
+
},
|
| 282 |
+
{
|
| 283 |
+
"type": "text",
|
| 284 |
+
"text": "3 Methodology ",
|
| 285 |
+
"text_level": 1,
|
| 286 |
+
"bbox": [
|
| 287 |
+
174,
|
| 288 |
+
792,
|
| 289 |
+
313,
|
| 290 |
+
810
|
| 291 |
+
],
|
| 292 |
+
"page_idx": 2
|
| 293 |
+
},
|
| 294 |
+
{
|
| 295 |
+
"type": "text",
|
| 296 |
+
"text": "Here we present our explainer that purses multi-grained explainability by pre-training and fine-tuning, as Figure 2 shows. In the pre-training phase, the attribution module distills the class-wise knowledge, which contrasts the salient structures based on the prediction, answering the question “Why did the GNN model assign a group of graphs with the same prediction?”. In the next phase, the selection module goes beyond the class-wise knowledge and fine-tunes the saliency maps on a specific instance for answering “Why the GNN model made the certain prediction for the specific graph?”. ",
|
| 297 |
+
"bbox": [
|
| 298 |
+
174,
|
| 299 |
+
827,
|
| 300 |
+
825,
|
| 301 |
+
911
|
| 302 |
+
],
|
| 303 |
+
"page_idx": 2
|
| 304 |
+
},
|
| 305 |
+
{
|
| 306 |
+
"type": "text",
|
| 307 |
+
"text": "3.1 Pre-training Towards Global Explainability ",
|
| 308 |
+
"text_level": 1,
|
| 309 |
+
"bbox": [
|
| 310 |
+
176,
|
| 311 |
+
90,
|
| 312 |
+
514,
|
| 313 |
+
106
|
| 314 |
+
],
|
| 315 |
+
"page_idx": 3
|
| 316 |
+
},
|
| 317 |
+
{
|
| 318 |
+
"type": "text",
|
| 319 |
+
"text": "Class-aware Attribution Module. Towards the global explainability of GNN, it is important to specify the class-wise knowledge across the instances with the same prediction. Inspired by the success of generative models [7, 30, 31] in capturing the succinct structures from the graphs, we hire multiple generative probabilistic models [7] as our attribution models (short for attributor), i.e. $\\mathcal { T } _ { \\theta } = \\{ \\mathcal { T } ^ { ( c ) } | c = 1 , \\cdots , C \\}$ which is parameterized by $\\theta$ . The attributor $\\mathcal { T } ^ { \\left( c \\right) }$ is responsible for uncovering the hidden patterns from some graph instances $O ^ { ( c ) } = \\{ \\mathcal { G } | c = \\arg \\operatorname* { m a x } _ { i } f ( \\mathcal { G } ) _ { i } \\}$ with the same prediction class $c$ . ",
|
| 320 |
+
"bbox": [
|
| 321 |
+
173,
|
| 322 |
+
116,
|
| 323 |
+
826,
|
| 324 |
+
218
|
| 325 |
+
],
|
| 326 |
+
"page_idx": 3
|
| 327 |
+
},
|
| 328 |
+
{
|
| 329 |
+
"type": "text",
|
| 330 |
+
"text": "Formally, each attributor $\\mathcal { T } ^ { \\left( c \\right) }$ is composed of a GNN encoder $\\mathrm { G N N } ^ { ( c ) }$ and a MLP decoder $\\mathbf { M L P } ^ { ( c ) }$ , whose parameters are shared when explaining graphs in $\\mathcal { O } ^ { ( c ) }$ , so as to systematize the class-wise patterns. Next we introduce the construction of each class-wise attributor, while we omit the superscript for conciseness. Specifically, the encoder GNN embeds each node $i$ in $\\mathcal { G }$ with representation $\\mathbf { z } _ { i }$ and summarize the representations of all nodes as: ",
|
| 331 |
+
"bbox": [
|
| 332 |
+
173,
|
| 333 |
+
223,
|
| 334 |
+
826,
|
| 335 |
+
296
|
| 336 |
+
],
|
| 337 |
+
"page_idx": 3
|
| 338 |
+
},
|
| 339 |
+
{
|
| 340 |
+
"type": "equation",
|
| 341 |
+
"img_path": "images/9bc120f64f56efe32b3e7dd6d5524e642c7fc0c4cb806e898cb65847d69d5f9d.jpg",
|
| 342 |
+
"text": "$$\n\\mathbf { Z } = \\mathbf { G N N } ( { \\mathcal { G } } , \\mathbf { X } ) ,\n$$",
|
| 343 |
+
"text_format": "latex",
|
| 344 |
+
"bbox": [
|
| 345 |
+
437,
|
| 346 |
+
305,
|
| 347 |
+
558,
|
| 348 |
+
321
|
| 349 |
+
],
|
| 350 |
+
"page_idx": 3
|
| 351 |
+
},
|
| 352 |
+
{
|
| 353 |
+
"type": "text",
|
| 354 |
+
"text": "where $\\mathbf { Z } \\in \\mathbb { R } ^ { | \\nu | \\times d ^ { \\prime } }$ encodes the structural feature $\\mathbf { A }$ and node feature $\\mathbf { X }$ . On the top of the node representations, we model the graph structure as edge distributions and frame the generation of explanatory subgraphs by sampling from the edge distributions: ",
|
| 355 |
+
"bbox": [
|
| 356 |
+
173,
|
| 357 |
+
332,
|
| 358 |
+
825,
|
| 359 |
+
376
|
| 360 |
+
],
|
| 361 |
+
"page_idx": 3
|
| 362 |
+
},
|
| 363 |
+
{
|
| 364 |
+
"type": "equation",
|
| 365 |
+
"img_path": "images/ea882c84bd7431668a232260600690fe7f50db0ff4229792444715824c8b6912.jpg",
|
| 366 |
+
"text": "$$\nP ( \\mathbf { M } | \\mathbf { Z } ) = \\prod _ { ( i , j ) \\in \\mathcal { E } } P ( M _ { i j } | \\mathbf { z } _ { i } , \\mathbf { z } _ { j } ) ,\n$$",
|
| 367 |
+
"text_format": "latex",
|
| 368 |
+
"bbox": [
|
| 369 |
+
387,
|
| 370 |
+
382,
|
| 371 |
+
609,
|
| 372 |
+
420
|
| 373 |
+
],
|
| 374 |
+
"page_idx": 3
|
| 375 |
+
},
|
| 376 |
+
{
|
| 377 |
+
"type": "text",
|
| 378 |
+
"text": "where $M _ { i j }$ indicates the importance of edge $( i , j )$ . Then the MLP encoder takes the concatenation of node representations $\\mathbf { z } _ { i }$ and $\\mathbf { z } _ { j }$ as the inputs and outputs the importance score. To approximate the importance score to the discrete distribution and optimize the generator via gradient propagation, we adopt the reparameterization trick [7], where an independent random variable $\\epsilon \\sim \\mathrm { U n i f o r m } ( 0 , 1 )$ is introduced. As such, the edge probability is formulated as: ",
|
| 379 |
+
"bbox": [
|
| 380 |
+
173,
|
| 381 |
+
428,
|
| 382 |
+
825,
|
| 383 |
+
498
|
| 384 |
+
],
|
| 385 |
+
"page_idx": 3
|
| 386 |
+
},
|
| 387 |
+
{
|
| 388 |
+
"type": "equation",
|
| 389 |
+
"img_path": "images/f6b15af9448dbb43c574a4c397ef4c29fc437d28ea10f7eb8bb1c6ade6ba6f62.jpg",
|
| 390 |
+
"text": "$$\nP ( M _ { i j } | \\mathbf { z } _ { i } , \\mathbf { z } _ { j } ) = \\sigma ( ( \\log \\frac { \\epsilon } { 1 - \\epsilon } + \\alpha _ { i j } ) / \\beta ) , \\quad \\mathrm { w i t h } \\quad \\alpha _ { i j } = \\mathbf { M L P } ( [ \\mathbf { z } _ { i } , \\mathbf { z } _ { j } ] ) ,\n$$",
|
| 391 |
+
"text_format": "latex",
|
| 392 |
+
"bbox": [
|
| 393 |
+
258,
|
| 394 |
+
506,
|
| 395 |
+
738,
|
| 396 |
+
535
|
| 397 |
+
],
|
| 398 |
+
"page_idx": 3
|
| 399 |
+
},
|
| 400 |
+
{
|
| 401 |
+
"type": "text",
|
| 402 |
+
"text": "where $\\sigma$ is the sigmoid function, and $\\beta$ denotes the temperature hyperparameter. It is worth emphasizing that our attributors is different from PGExplainer [7], where only one generative probabilistic model is involved. Thus, their attribution results are limited in differentiating the patterns of different classes and systematizing the class-wise knowledge. ",
|
| 403 |
+
"bbox": [
|
| 404 |
+
173,
|
| 405 |
+
541,
|
| 406 |
+
825,
|
| 407 |
+
598
|
| 408 |
+
],
|
| 409 |
+
"page_idx": 3
|
| 410 |
+
},
|
| 411 |
+
{
|
| 412 |
+
"type": "text",
|
| 413 |
+
"text": "Pre-training Class-wise Attribution Module. We devise the following objective function for training the class-wise attributors. ",
|
| 414 |
+
"bbox": [
|
| 415 |
+
171,
|
| 416 |
+
609,
|
| 417 |
+
825,
|
| 418 |
+
638
|
| 419 |
+
],
|
| 420 |
+
"page_idx": 3
|
| 421 |
+
},
|
| 422 |
+
{
|
| 423 |
+
"type": "equation",
|
| 424 |
+
"img_path": "images/f3d4c3d3002f3d85e403dcf6ea11f50aceb36b073183ddf3061c54439e568ca6.jpg",
|
| 425 |
+
"text": "$$\n\\operatorname* { m i n } _ { \\theta } \\mathcal { L } _ { 1 } + \\gamma \\mathcal { L } _ { c t s } ,\n$$",
|
| 426 |
+
"text_format": "latex",
|
| 427 |
+
"bbox": [
|
| 428 |
+
439,
|
| 429 |
+
647,
|
| 430 |
+
555,
|
| 431 |
+
669
|
| 432 |
+
],
|
| 433 |
+
"page_idx": 3
|
| 434 |
+
},
|
| 435 |
+
{
|
| 436 |
+
"type": "text",
|
| 437 |
+
"text": "where $\\gamma$ is the trade-off hyperparameter. We start from maximizing the mutual information between the attentive graphs and the target prediction of the graph, which is a widely-used learning paradigm in the literature [32, 6, 7]. It guides us to find the prediction-relevant explanatory subgraph, which equals to minimizing the following loss: ",
|
| 438 |
+
"bbox": [
|
| 439 |
+
173,
|
| 440 |
+
676,
|
| 441 |
+
825,
|
| 442 |
+
733
|
| 443 |
+
],
|
| 444 |
+
"page_idx": 3
|
| 445 |
+
},
|
| 446 |
+
{
|
| 447 |
+
"type": "equation",
|
| 448 |
+
"img_path": "images/bf7370324f3dccbaa443d193207257690137791e42060df5278c85ade8e01a29.jpg",
|
| 449 |
+
"text": "$$\n\\mathcal { L } _ { 1 } = - \\mathbb { E } _ { \\mathcal { G } } \\mathbb { E } _ { \\epsilon } \\mathbb { E } _ { c ^ { \\prime } } [ P ( Y = c ^ { \\prime } | G = \\mathcal { G } ) \\log P ( Y = c ^ { \\prime } | G = \\mathcal { G } _ { a t t } ^ { ( c ) } ) ] ,\n$$",
|
| 450 |
+
"text_format": "latex",
|
| 451 |
+
"bbox": [
|
| 452 |
+
290,
|
| 453 |
+
741,
|
| 454 |
+
705,
|
| 455 |
+
762
|
| 456 |
+
],
|
| 457 |
+
"page_idx": 3
|
| 458 |
+
},
|
| 459 |
+
{
|
| 460 |
+
"type": "text",
|
| 461 |
+
"text": "where $G$ and $Y$ are the graph and prediction variables, respectively; $\\mathcal { G }$ is the full graph instance to explain; by sampling $\\epsilon \\in { \\mathrm { U n i f o r m } } ( 0 , 1 )$ and $c ^ { \\prime } \\in \\{ 1 , \\cdots , C \\}$ , the class-wise saliency map $\\mathbf { M } ^ { ( c ) }$ can be generated from Equation (4); $P ( Y = c ^ { \\prime } | G = \\mathcal { G } ) = f ( \\mathcal { G } ) _ { c ^ { \\prime } }$ is the output probabilities of the prediction being $c ^ { \\prime }$ when feeding $\\mathcal { G }$ to the GNN model $f$ ; analogously, $P ( Y = c ^ { \\prime } | G = \\mathcal { G } _ { a t t } ^ { ( c ) } ) =$ $f ( \\mathcal { G } _ { a t t } ^ { ( c ) } ) _ { c ^ { \\prime } }$ audits the output probability when feeding $\\mathcal { G } _ { a t t } ^ { ( c ) } = \\mathbf { A } \\odot \\mathbf { M } ^ { ( c ) }$ . ",
|
| 462 |
+
"bbox": [
|
| 463 |
+
173,
|
| 464 |
+
768,
|
| 465 |
+
825,
|
| 466 |
+
851
|
| 467 |
+
],
|
| 468 |
+
"page_idx": 3
|
| 469 |
+
},
|
| 470 |
+
{
|
| 471 |
+
"type": "text",
|
| 472 |
+
"text": "Moreover, we introduce a contrastive learning [33, 34, 18, 35, 36, 37] loss to emphasize differences among the class-wise patterns — the substructure of the full graph that is distant to that of the graphs with a different prediction but close to that of the graphs with the same prediction. It makes each attributor focus on the unique and discriminative information within the class. Specifically, for the saliency maps $\\mathcal { G } _ { a t t 1 } ^ { ( c _ { 1 } ) }$ of $\\mathcal { G } _ { 1 }$ and $\\mathcal { G } _ { a t t 2 } ^ { ( c _ { 2 } ) }$ of $\\mathcal { G } _ { 2 }$ , it encourages the agreements between $\\mathcal { G } _ { a t t 1 } ^ { ( c _ { 1 } ) }$ and $\\mathcal { G } _ { a t t 2 } ^ { ( c _ { 2 } ) }$ when , compared to that when $c _ { 1 } \\neq c _ { 2 }$ : ",
|
| 473 |
+
"bbox": [
|
| 474 |
+
174,
|
| 475 |
+
854,
|
| 476 |
+
825,
|
| 477 |
+
911
|
| 478 |
+
],
|
| 479 |
+
"page_idx": 3
|
| 480 |
+
},
|
| 481 |
+
{
|
| 482 |
+
"type": "text",
|
| 483 |
+
"text": "",
|
| 484 |
+
"bbox": [
|
| 485 |
+
173,
|
| 486 |
+
88,
|
| 487 |
+
823,
|
| 488 |
+
121
|
| 489 |
+
],
|
| 490 |
+
"page_idx": 4
|
| 491 |
+
},
|
| 492 |
+
{
|
| 493 |
+
"type": "equation",
|
| 494 |
+
"img_path": "images/974a212003ee1665a58a43a15577521fa4e1fd9930893dd616aac99c64608f8b.jpg",
|
| 495 |
+
"text": "$$\n\\mathcal { L } _ { c t s } = \\mathbb { E } _ { \\mathcal { G } , \\mathcal { G } ^ { \\prime } } \\mathbb { E } _ { \\epsilon , \\epsilon ^ { \\prime } } [ ( - 1 ) ^ { \\mathbb { I } ( c _ { 1 } = c _ { 2 } ) } \\times \\mu ( \\ell ( \\mathcal { G } _ { a t t 1 } ^ { ( c _ { 1 } ) } , \\mathcal { G } _ { a t t 2 } ^ { ( c _ { 2 } ) } ) ) ] ,\n$$",
|
| 496 |
+
"text_format": "latex",
|
| 497 |
+
"bbox": [
|
| 498 |
+
320,
|
| 499 |
+
127,
|
| 500 |
+
676,
|
| 501 |
+
148
|
| 502 |
+
],
|
| 503 |
+
"page_idx": 4
|
| 504 |
+
},
|
| 505 |
+
{
|
| 506 |
+
"type": "text",
|
| 507 |
+
"text": "where as the $\\mu$ is the softplus function [3presentation similarity — $\\ell$ arity bewhere een two subgraphs, which is setis the graph representations by $\\ell ( \\mathcal { G } _ { a t t 1 } ^ { ( c _ { 1 } ) } , \\mathcal { G } _ { a t t 2 } ^ { ( c _ { 2 } ) } ) = \\mathbf { h } _ { 1 } ^ { \\top } \\mathbf { h } _ { 2 }$ $\\mathbf { h } _ { 1 }$ \nfeeding G(c1)att1 into the encoder $\\mathrm { G N N } ^ { ( c _ { 1 } ) }$ and aggregating the node representations. Similar for $\\mathbf { h } _ { 2 }$ . In addition, following [6], we adopt the element-wise entropy and $L _ { 1 }$ norm on the edge probability. By jointly optimizing these two losses in Equation (6), the class-wise attribution module learns to stratify the discriminative information for different classes and generate the saliency maps with a global view of the target GNN. Taking an information-theoretical look at Equation (8), minimizing contrastive learning loss is maximizing a lower bound of the mutual information between the latent graph representations of two graphs within the same class. ",
|
| 508 |
+
"bbox": [
|
| 509 |
+
173,
|
| 510 |
+
155,
|
| 511 |
+
826,
|
| 512 |
+
287
|
| 513 |
+
],
|
| 514 |
+
"page_idx": 4
|
| 515 |
+
},
|
| 516 |
+
{
|
| 517 |
+
"type": "text",
|
| 518 |
+
"text": "3.2 Fine-tuning Towards Local Explainability ",
|
| 519 |
+
"text_level": 1,
|
| 520 |
+
"bbox": [
|
| 521 |
+
173,
|
| 522 |
+
305,
|
| 523 |
+
504,
|
| 524 |
+
320
|
| 525 |
+
],
|
| 526 |
+
"page_idx": 4
|
| 527 |
+
},
|
| 528 |
+
{
|
| 529 |
+
"type": "text",
|
| 530 |
+
"text": "Having established the saliency map that exhibits the importance of each edge, the standard way is to rank all edges based on their importance scores and simply select the top edges as the explanatory subgraphs. However, we argue that such a coarser-grained selection fails to consider the dependencies of these selected edges explicitly. Within a high-quality explanatory subgraph, edges are supposed to cooperate with each other, form the coalition, and approach the target prediction better than individuals [38, 39]. Without considering such coalition effect, the quality of the explanatory subgraph is greatly limited.For example, when explaining why the molecule graph is classified as mutagenic [13], two connected nitrogen-oxygen (N-O) bonds form a chemical group $\\mathrm { N O _ { 2 } }$ and present more discriminative information about the mutagenic property [13]; whereas, two salient but disconnected N-O bonds from different chemical groups are less informative to interpret the mutagenic property. ",
|
| 531 |
+
"bbox": [
|
| 532 |
+
173,
|
| 533 |
+
330,
|
| 534 |
+
825,
|
| 535 |
+
469
|
| 536 |
+
],
|
| 537 |
+
"page_idx": 4
|
| 538 |
+
},
|
| 539 |
+
{
|
| 540 |
+
"type": "text",
|
| 541 |
+
"text": "Clearly, the coarser-grained saliency maps are insufficient to exhibit the coalition effect of edges, thus might be redundant and suboptimal explanations. Hence, we move forward to learn a finer-grained explanatory subgraph. Technically, on the top of the well-trained class-wise attribution module, we add the selection module: ",
|
| 542 |
+
"bbox": [
|
| 543 |
+
173,
|
| 544 |
+
474,
|
| 545 |
+
825,
|
| 546 |
+
531
|
| 547 |
+
],
|
| 548 |
+
"page_idx": 4
|
| 549 |
+
},
|
| 550 |
+
{
|
| 551 |
+
"type": "equation",
|
| 552 |
+
"img_path": "images/33a664f15d0d8f7c2f0570e908ebf7c40bcb58c0c96fb95d55bd611c458e3976.jpg",
|
| 553 |
+
"text": "$$\n\\mathbf { S } ^ { ( c ) } = \\mathcal { H } ( \\mathcal { G } _ { a t t } ^ { ( c ) } , f , c , \\rho ) ,\n$$",
|
| 554 |
+
"text_format": "latex",
|
| 555 |
+
"bbox": [
|
| 556 |
+
419,
|
| 557 |
+
535,
|
| 558 |
+
576,
|
| 559 |
+
556
|
| 560 |
+
],
|
| 561 |
+
"page_idx": 4
|
| 562 |
+
},
|
| 563 |
+
{
|
| 564 |
+
"type": "text",
|
| 565 |
+
"text": "where $\\rho$ is the number of edges selected in the explanatory subgraph; $\\mathcal { H }$ is a sampling (selection) function; $\\mathbf { S } ^ { ( c ) }$ preserves the elements selected by the selection function and sets the other elements as 0. Instead of the hard selection that picks up the edges with the highest probability, $\\mathcal { H }$ samples edges according to their probabilities. Allowing edges with low probabilities to be sampled can prevent the explainer from collapsing to suboptimal solutions with limited coalition effect. ",
|
| 566 |
+
"bbox": [
|
| 567 |
+
173,
|
| 568 |
+
563,
|
| 569 |
+
825,
|
| 570 |
+
636
|
| 571 |
+
],
|
| 572 |
+
"page_idx": 4
|
| 573 |
+
},
|
| 574 |
+
{
|
| 575 |
+
"type": "text",
|
| 576 |
+
"text": "With the new stochastic adjacency matrix $\\mathbf { S } ^ { ( c ) }$ , we are able to extract the subgraph $\\mathcal { G } _ { e x p } ^ { ( c ) }$ . To fine-tune the attribution and selection modules, we resort to maximize the mutual information between the explanation candidate $\\mathcal { G } _ { e x p } ^ { ( c ) }$ and the target prediction of the full graph: ",
|
| 577 |
+
"bbox": [
|
| 578 |
+
174,
|
| 579 |
+
643,
|
| 580 |
+
825,
|
| 581 |
+
690
|
| 582 |
+
],
|
| 583 |
+
"page_idx": 4
|
| 584 |
+
},
|
| 585 |
+
{
|
| 586 |
+
"type": "equation",
|
| 587 |
+
"img_path": "images/a579a8d95028b363e40986ec53f21b02af1250a08b36e1bf2eb87087eb9a52e8.jpg",
|
| 588 |
+
"text": "$$\n\\mathcal { L } _ { 2 } = - \\mathbb { E } _ { \\mathcal { G } } \\mathbb { E } _ { \\epsilon } \\mathbb { E } _ { c ^ { \\prime } } [ P ( Y = c ^ { \\prime } | G = \\mathcal { G } ) \\log P ( Y = c ^ { \\prime } | G = \\mathcal { G } _ { e x p } ^ { ( c ) } ) ] .\n$$",
|
| 589 |
+
"text_format": "latex",
|
| 590 |
+
"bbox": [
|
| 591 |
+
289,
|
| 592 |
+
698,
|
| 593 |
+
709,
|
| 594 |
+
719
|
| 595 |
+
],
|
| 596 |
+
"page_idx": 4
|
| 597 |
+
},
|
| 598 |
+
{
|
| 599 |
+
"type": "text",
|
| 600 |
+
"text": "By optimizing the loss above, the selection module accounts for the edge coalition within $\\mathbf { S } ^ { ( c ) }$ , so as to achieve higher local fidelity. Moreover, as the selection module discards some elements in the stochastic adjacency matrix, it blocks parts of gradient backpropagation and possibly acts as a dropout function to avoid the overfitting on the instance-level explanations. ",
|
| 601 |
+
"bbox": [
|
| 602 |
+
173,
|
| 603 |
+
728,
|
| 604 |
+
825,
|
| 605 |
+
785
|
| 606 |
+
],
|
| 607 |
+
"page_idx": 4
|
| 608 |
+
},
|
| 609 |
+
{
|
| 610 |
+
"type": "text",
|
| 611 |
+
"text": "4 Experiments ",
|
| 612 |
+
"text_level": 1,
|
| 613 |
+
"bbox": [
|
| 614 |
+
174,
|
| 615 |
+
805,
|
| 616 |
+
313,
|
| 617 |
+
821
|
| 618 |
+
],
|
| 619 |
+
"page_idx": 4
|
| 620 |
+
},
|
| 621 |
+
{
|
| 622 |
+
"type": "text",
|
| 623 |
+
"text": "We mainly aim to investigate the following questions: ",
|
| 624 |
+
"bbox": [
|
| 625 |
+
173,
|
| 626 |
+
837,
|
| 627 |
+
526,
|
| 628 |
+
852
|
| 629 |
+
],
|
| 630 |
+
"page_idx": 4
|
| 631 |
+
},
|
| 632 |
+
{
|
| 633 |
+
"type": "text",
|
| 634 |
+
"text": "• RQ1: How effective is the pre-training phase of ReFine, as compared to that of existing methods? • RQ2: How effective is the fine-tuning phase of ReFine, as compared to that of the pre-training phase? ",
|
| 635 |
+
"bbox": [
|
| 636 |
+
171,
|
| 637 |
+
863,
|
| 638 |
+
826,
|
| 639 |
+
911
|
| 640 |
+
],
|
| 641 |
+
"page_idx": 4
|
| 642 |
+
},
|
| 643 |
+
{
|
| 644 |
+
"type": "text",
|
| 645 |
+
"text": "4.1 Experimental Settings ",
|
| 646 |
+
"text_level": 1,
|
| 647 |
+
"bbox": [
|
| 648 |
+
174,
|
| 649 |
+
90,
|
| 650 |
+
367,
|
| 651 |
+
106
|
| 652 |
+
],
|
| 653 |
+
"page_idx": 5
|
| 654 |
+
},
|
| 655 |
+
{
|
| 656 |
+
"type": "text",
|
| 657 |
+
"text": "Datasets and Target GNNs. We consider four datasets with various target GNNs: ",
|
| 658 |
+
"bbox": [
|
| 659 |
+
173,
|
| 660 |
+
116,
|
| 661 |
+
712,
|
| 662 |
+
131
|
| 663 |
+
],
|
| 664 |
+
"page_idx": 5
|
| 665 |
+
},
|
| 666 |
+
{
|
| 667 |
+
"type": "text",
|
| 668 |
+
"text": "• Molecule graph classification. We use the Mutagenicity dataset [40, 41], where 4, 337 molecule graphs are classified into two classes based on their mutagenic effect on a bacterium. The welltrained Graph Isomorphism Network (GIN) [26, 42] has achieved a $100 \\%$ testing accuracy. ",
|
| 669 |
+
"bbox": [
|
| 670 |
+
176,
|
| 671 |
+
140,
|
| 672 |
+
823,
|
| 673 |
+
183
|
| 674 |
+
],
|
| 675 |
+
"page_idx": 5
|
| 676 |
+
},
|
| 677 |
+
{
|
| 678 |
+
"type": "text",
|
| 679 |
+
"text": "• Scene graph classification. Following the previous work [10], we select 4, 443 (images, scene graphs) pairs from Visual Genome [43] to construct the VG-5 dataset. Wherein, the graphs are labeled with five classes: stadium, street, farm, surfing, forest. Each graph contains regions of the objects as the nodes, while edges indicates the relationships between object nodes. The target GNN is an APPNP [44] which achieves $6 4 . 3 \\%$ testing accuracy. ",
|
| 680 |
+
"bbox": [
|
| 681 |
+
174,
|
| 682 |
+
185,
|
| 683 |
+
826,
|
| 684 |
+
255
|
| 685 |
+
],
|
| 686 |
+
"page_idx": 5
|
| 687 |
+
},
|
| 688 |
+
{
|
| 689 |
+
"type": "text",
|
| 690 |
+
"text": "• Handwriting graph classification. We use the MNIST superpixel dataset [45], which converts 70,000 images into the graphs of superpixel adjacency. Every graph is labeled as one of ten digit classes. We trained a Spline-based GNN [46] which gains $9 7 . 9 \\%$ accuracy in the testing dataset. ",
|
| 691 |
+
"bbox": [
|
| 692 |
+
178,
|
| 693 |
+
258,
|
| 694 |
+
823,
|
| 695 |
+
301
|
| 696 |
+
],
|
| 697 |
+
"page_idx": 5
|
| 698 |
+
},
|
| 699 |
+
{
|
| 700 |
+
"type": "text",
|
| 701 |
+
"text": "• Motif graph classification. We follow prior studies [6, 7] to create a synthetic dataset, BA-3motif, which contains 3,000 graphs. Specifically, we adopt the Barabasi-Albert (BA) graphs as the base, and attach each base with one of three motifs: house, cycle, grid. The trained GNN model, ASAP [47], classifies them according to the type of attached motifs and achieved $100 \\%$ testing accuracy. ",
|
| 702 |
+
"bbox": [
|
| 703 |
+
174,
|
| 704 |
+
305,
|
| 705 |
+
826,
|
| 706 |
+
361
|
| 707 |
+
],
|
| 708 |
+
"page_idx": 5
|
| 709 |
+
},
|
| 710 |
+
{
|
| 711 |
+
"type": "text",
|
| 712 |
+
"text": "Baselines. We compare our ReFine with the state-of-the-art explanation methods: ",
|
| 713 |
+
"bbox": [
|
| 714 |
+
174,
|
| 715 |
+
376,
|
| 716 |
+
709,
|
| 717 |
+
390
|
| 718 |
+
],
|
| 719 |
+
"page_idx": 5
|
| 720 |
+
},
|
| 721 |
+
{
|
| 722 |
+
"type": "text",
|
| 723 |
+
"text": "• SA [9] directly uses the gradients of the model prediction w.r.t. the adjacency matrix of the input graph as the importance of edges. \n• GNNExplainer [6] applies the soft masks on the messages carried by edges, where each mask indicates an edge’s importance. Note that the masks of graph instances are trained individually. \n• PGExplainer [7] hires a neural network to learn to generate the masks for the input edges. The generative model is trained over multiple explained instances. \n• PGM-Explainer [19] collects the prediction change on the random node perturbations, and then learns a Bayesian network from these perturbation-prediction observations, so as to capture the dependencies among the nodes and the prediction. Here we transfer it to model the edge importance. ",
|
| 724 |
+
"bbox": [
|
| 725 |
+
173,
|
| 726 |
+
398,
|
| 727 |
+
826,
|
| 728 |
+
536
|
| 729 |
+
],
|
| 730 |
+
"page_idx": 5
|
| 731 |
+
},
|
| 732 |
+
{
|
| 733 |
+
"type": "text",
|
| 734 |
+
"text": "Optimization. For the parametric explanation methods (GNNExplainer, PGExplainer, PGMExplainer), we apply a grid search to tune their own hyperparameters. For our ReFine framework, we use the Adam optimizer and set the learning rate of pre-training and fine-tuning as 1e-3 and 1e-4, respectively. All experiments are done on a single Tesla V100 SXM2 GPU (32 GB). ",
|
| 735 |
+
"bbox": [
|
| 736 |
+
174,
|
| 737 |
+
553,
|
| 738 |
+
825,
|
| 739 |
+
608
|
| 740 |
+
],
|
| 741 |
+
"page_idx": 5
|
| 742 |
+
},
|
| 743 |
+
{
|
| 744 |
+
"type": "text",
|
| 745 |
+
"text": "Evaluation Metrics. It is challenging to quantitatively evaluate the quality of explanations, since the ground-truth explanations are usually unavailable. In the literature, there are three widely-used evaluation metrics: ",
|
| 746 |
+
"bbox": [
|
| 747 |
+
174,
|
| 748 |
+
621,
|
| 749 |
+
825,
|
| 750 |
+
662
|
| 751 |
+
],
|
| 752 |
+
"page_idx": 5
|
| 753 |
+
},
|
| 754 |
+
{
|
| 755 |
+
"type": "text",
|
| 756 |
+
"text": "• Predictive Accuracy $( \\mathbf { A C C } @ \\rho )$ [32, 48, 27]. It measures the fidelity of the explanatory subgraphs by feeding it solely into the target model and auditing how well it recovers the target prediction. We report the average $\\operatorname { A C C } @ \\rho$ over all graphs in the testing sets, and further denote ACC-AUC as the area under the ACC curve over different selection ratios $\\rho \\in \\{ 0 . 1 , 0 . 2 , \\cdot \\cdot \\cdot , 0 . 9 , 1 . 0 \\}$ . $\\operatorname { A C C } @ \\rho$ and ACC-AUC are suitable for all the datasets. ",
|
| 757 |
+
"bbox": [
|
| 758 |
+
174,
|
| 759 |
+
671,
|
| 760 |
+
826,
|
| 761 |
+
741
|
| 762 |
+
],
|
| 763 |
+
"page_idx": 5
|
| 764 |
+
},
|
| 765 |
+
{
|
| 766 |
+
"type": "text",
|
| 767 |
+
"text": "• Recall $@ N$ . As suggested in prior studies [6, 7, 32], we can create the “ground-truth explanations” for the synthetic dataset. Specifically, for BA-3motif, the motif of each graph can be viewed as the discriminative information coherent in the model knowledge. As such, we can frame the evaluation problem as the task of top edge ranking. To be more specific, for an explanatory subgraph, the edges within the motif are positive, while the others are negative. To this end, recall can be adopted as the evaluation protocols. More formally, Recall $\\ @ N = \\mathbb { E } _ { \\boldsymbol { \\mathcal { G } } } [ | \\mathcal { G } _ { s } \\cap \\mathcal { G } _ { s } ^ { * } | / | \\mathcal { G } _ { s } ^ { * } | ]$ where $\\mathcal { G } _ { s }$ is composed of the top- $N$ edges and $\\mathcal { G } _ { s } ^ { * }$ is the ground-truth explanatory subgraph. ",
|
| 768 |
+
"bbox": [
|
| 769 |
+
174,
|
| 770 |
+
744,
|
| 771 |
+
825,
|
| 772 |
+
843
|
| 773 |
+
],
|
| 774 |
+
"page_idx": 5
|
| 775 |
+
},
|
| 776 |
+
{
|
| 777 |
+
"type": "text",
|
| 778 |
+
"text": "4.2 Quantitative Evaluations ",
|
| 779 |
+
"text_level": 1,
|
| 780 |
+
"bbox": [
|
| 781 |
+
174,
|
| 782 |
+
858,
|
| 783 |
+
387,
|
| 784 |
+
872
|
| 785 |
+
],
|
| 786 |
+
"page_idx": 5
|
| 787 |
+
},
|
| 788 |
+
{
|
| 789 |
+
"type": "text",
|
| 790 |
+
"text": "Influence of Pre-training (RQ1). To investigate the effectiveness of pre-training, we first compare the performance of the attribution module with the state-of-the-art explainers. We denote this variant by ReFine-FT, which disables the fine-tuning phase and simply constructs the explanatory subgraphs based on the saliency scores. Moreover, we build another variant ReFine-CT, which removes the contrastive loss (Equation (8)) from the pre-training phase, to study the effect of the contrastive loss on the class-wise knowledge modeling. To be more clear, we present the difference of PGExplainer [7], ReFine and its ablation models in Table 4.2. Table 2 presents the performance comparisons, from which we have several findings: ",
|
| 791 |
+
"bbox": [
|
| 792 |
+
173,
|
| 793 |
+
883,
|
| 794 |
+
821,
|
| 795 |
+
911
|
| 796 |
+
],
|
| 797 |
+
"page_idx": 5
|
| 798 |
+
},
|
| 799 |
+
{
|
| 800 |
+
"type": "table",
|
| 801 |
+
"img_path": "images/97bdfa23724885b568bd14f541c1b339a8dcf8efe55634ecded98fce01905b18.jpg",
|
| 802 |
+
"table_caption": [
|
| 803 |
+
"Table 1: Structure/Training Difference of PGExplainer, ReFine and its ablation models. "
|
| 804 |
+
],
|
| 805 |
+
"table_footnote": [],
|
| 806 |
+
"table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"2\">Pre-training</td><td rowspan=\"2\">Fine-tuning</td></tr><tr><td>Class-wise Attributors</td><td>Contrastive Learning</td></tr><tr><td>PG-Explainer</td><td></td><td></td><td></td></tr><tr><td>Refine-CT</td><td></td><td></td><td></td></tr><tr><td>Refine-FT</td><td></td><td></td><td></td></tr><tr><td>Refine</td><td></td><td></td><td></td></tr></table>",
|
| 807 |
+
"bbox": [
|
| 808 |
+
232,
|
| 809 |
+
109,
|
| 810 |
+
764,
|
| 811 |
+
224
|
| 812 |
+
],
|
| 813 |
+
"page_idx": 6
|
| 814 |
+
},
|
| 815 |
+
{
|
| 816 |
+
"type": "table",
|
| 817 |
+
"img_path": "images/0e4e7fcda442fdbd50bec18de2ad571b750e5a9d9e32000c0e09345924e8dd9b.jpg",
|
| 818 |
+
"table_caption": [
|
| 819 |
+
"Table 2: Comparison of our ReFine and other baseline explainers "
|
| 820 |
+
],
|
| 821 |
+
"table_footnote": [],
|
| 822 |
+
"table_body": "<table><tr><td rowspan=\"2\"></td><td rowspan=\"2\">Mutagenicity ACC-AUC</td><td rowspan=\"2\">VG-5 ACC-AUC</td><td rowspan=\"2\">MNIST ACC-AUC</td><td colspan=\"2\">BA-3motif</td></tr><tr><td>ACC-AUC</td><td>Recall@5</td></tr><tr><td>SA</td><td>0.769</td><td>0.769</td><td>0.559</td><td>0.518</td><td>0.243</td></tr><tr><td>GNNExplainer</td><td>0.895±0.010</td><td>0.895±0.003</td><td>0.535±0.013</td><td>0.528±0.005</td><td>0.157±0.002</td></tr><tr><td>PG-Explainer</td><td>0.631±0.008</td><td>0.790±0.004</td><td>0.504±0.010</td><td>0.586±0.004</td><td>0.293±0.001</td></tr><tr><td>PGM-Explainer</td><td>0.714±0.007</td><td>0.792±0.001</td><td>0.615±0.003</td><td>0.575±0.002</td><td>0.250±0.000</td></tr><tr><td>ReFine-CT</td><td>0.888±0.008</td><td>0.891±0.002</td><td>0.526±0.007</td><td>0.610±0.004</td><td>0.248±0.001</td></tr><tr><td>ReFine-FT</td><td>0.945±0.011</td><td>0.906±0.002</td><td>0.587±0.008</td><td>0.616±0.003</td><td>0.299±0.002</td></tr><tr><td>ReFine</td><td>0.955±0.005</td><td>0.914±0.001</td><td>0.636±0.003</td><td>0.630±0.006</td><td>0.304±0.000</td></tr><tr><td>Relative Impro.</td><td>6.7%</td><td>2.1%</td><td>3.4%</td><td>7.5%</td><td>3.8%</td></tr></table>",
|
| 823 |
+
"bbox": [
|
| 824 |
+
196,
|
| 825 |
+
258,
|
| 826 |
+
805,
|
| 827 |
+
421
|
| 828 |
+
],
|
| 829 |
+
"page_idx": 6
|
| 830 |
+
},
|
| 831 |
+
{
|
| 832 |
+
"type": "text",
|
| 833 |
+
"text": "",
|
| 834 |
+
"bbox": [
|
| 835 |
+
173,
|
| 836 |
+
446,
|
| 837 |
+
825,
|
| 838 |
+
531
|
| 839 |
+
],
|
| 840 |
+
"page_idx": 6
|
| 841 |
+
},
|
| 842 |
+
{
|
| 843 |
+
"type": "text",
|
| 844 |
+
"text": "• ReFine-FT outperforms the baseline explainers in most cases. To be more specific, it achieves significant relative improvements over the strongest baselines w.r.t. ACC-AUC by $5 . 6 \\%$ and $5 . 1 \\%$ in Mutagenicity and BA-3motif, respectively. This demonstrates the rationality and effectiveness of the attribution module. We attribute these improvements to the class-wise knowledge modeling: (1) By specifying the attributor models for each class, ReFine-FT is able to capture the underlying patterns shared across the instances within the same class; and (2) Conducting the contrastive learning between different class-aware attributors makes ReFine-FT better stratify the discriminative information for different classes. The class-wise knowledge endows ReFine-FT with the global view of the target model’s workings. \n• Although PGExplainer is also equipped with the global view of the target model, its performance is worse than that of ReFine-FT. We ascribe this to the limitations of PGExplainer’s global view, which is founded upon all the explained instances, but fails to differentiate the class-wise patterns. This again verifies the rationality and effectiveness of our attribution module. \n• ReFine-FT outperforms ReFine-CT by a large margin, indicating that the contrastive learning plays a critical role in exhibiting the class-wise knowledge. Specifically, it summarizes the patterns across similar instances and focuses on the information pertinent to specific classes, while filtering the irrelevant and redundant information out. \n• Interestingly, in MNIST, the result of ReFine-FT is worse than that of PGM-Explainer. One possible reason is that the random perturbations in PGM-Explainer create a collection of broken graphs and offer a more comprehensive observation of the graphs. We leave the exploration of subgraph-prediction relations as future work. ",
|
| 845 |
+
"bbox": [
|
| 846 |
+
171,
|
| 847 |
+
542,
|
| 848 |
+
826,
|
| 849 |
+
852
|
| 850 |
+
],
|
| 851 |
+
"page_idx": 6
|
| 852 |
+
},
|
| 853 |
+
{
|
| 854 |
+
"type": "text",
|
| 855 |
+
"text": "Influence of Fine-tuning (RQ2). To justify the effectiveness of the fine-tuning phase, we report the performance of ReFine with our selection module in Tables 2 and 3, as compared to the performance before fine-tuning. We have the following observations: ",
|
| 856 |
+
"bbox": [
|
| 857 |
+
174,
|
| 858 |
+
869,
|
| 859 |
+
825,
|
| 860 |
+
911
|
| 861 |
+
],
|
| 862 |
+
"page_idx": 6
|
| 863 |
+
},
|
| 864 |
+
{
|
| 865 |
+
"type": "table",
|
| 866 |
+
"img_path": "images/b62f2e7dbe160d755f893226c3353455f69903def1ab292aeb65415d3fc3f038.jpg",
|
| 867 |
+
"table_caption": [
|
| 868 |
+
"Table 3: Performance under different selection ratios before and after fine-tuning. "
|
| 869 |
+
],
|
| 870 |
+
"table_footnote": [],
|
| 871 |
+
"table_body": "<table><tr><td rowspan=\"2\">ACC@p</td><td colspan=\"2\">Mutagenicity</td><td colspan=\"2\">VG-5</td><td colspan=\"2\">MNIST</td><td colspan=\"2\">BA-3motif</td></tr><tr><td>0.4</td><td>0.6</td><td>0.4</td><td>0.6</td><td>0.4</td><td>0.6</td><td>0.4</td><td>0.6</td></tr><tr><td>ReFine-FT</td><td>96.8%</td><td>94.0%</td><td>91.3%</td><td>91.4%</td><td>41.4%</td><td>61.4%</td><td>36.0%</td><td>65.7%</td></tr><tr><td>ReFine</td><td>97.8%</td><td>96.2%</td><td>92.2%</td><td>93.4%</td><td>71.4%</td><td>82.0%</td><td>39.0%</td><td>72.8%</td></tr><tr><td>Improvement</td><td>+1.0%</td><td>+2.2%</td><td>+0.9%</td><td>+2.0%</td><td>+30.0%</td><td>+20.6%</td><td>+3.0%</td><td>+7.1%</td></tr></table>",
|
| 872 |
+
"bbox": [
|
| 873 |
+
196,
|
| 874 |
+
109,
|
| 875 |
+
805,
|
| 876 |
+
205
|
| 877 |
+
],
|
| 878 |
+
"page_idx": 7
|
| 879 |
+
},
|
| 880 |
+
{
|
| 881 |
+
"type": "image",
|
| 882 |
+
"img_path": "images/958274b79d85bbe255779c56ef47bf505530dc4c10daaa10196febf0acb858d1.jpg",
|
| 883 |
+
"image_caption": [
|
| 884 |
+
"Figure 3: Qualitative Results in MNIST Superpixels dataset. Handwriting graphs are in black, which respectively represent number $\\mathbf { \\bar { \\theta } } ^ { 6 6 } 0 ^ { 9 }$ , $^ { \\cdot 6 } 2 ^ { \\cdot }$ , “8” within each block from left to right. Explanatory graphs are in red, where the top $10 \\%$ edges are highlighted. "
|
| 885 |
+
],
|
| 886 |
+
"image_footnote": [],
|
| 887 |
+
"bbox": [
|
| 888 |
+
173,
|
| 889 |
+
219,
|
| 890 |
+
820,
|
| 891 |
+
366
|
| 892 |
+
],
|
| 893 |
+
"page_idx": 7
|
| 894 |
+
},
|
| 895 |
+
{
|
| 896 |
+
"type": "text",
|
| 897 |
+
"text": "• Fine-tuning with the selection module can improves the explanation performance sustainably, which indicates the effectiveness of our pre-training and fine-tuning paradigm. Specifically, in MNIST, the predictive accuracy of the explanations after fine-tuning improves from $4 1 . 4 \\%$ to $7 1 . 4 \\%$ when the selection rato is 0.4. We attribute these improvements to the local insights on specific instances: (1) Benefiting from the saliency map obtained in the pre-training phase, the selection module is able to filter noisy edges out and narrow down to where the target model looks to make decisions; (2) Fine-tuning the explanatory subgraphs considers the coalition effect of edges, thus approaches more information to recover the target prediction. ",
|
| 898 |
+
"bbox": [
|
| 899 |
+
174,
|
| 900 |
+
460,
|
| 901 |
+
825,
|
| 902 |
+
570
|
| 903 |
+
],
|
| 904 |
+
"page_idx": 7
|
| 905 |
+
},
|
| 906 |
+
{
|
| 907 |
+
"type": "text",
|
| 908 |
+
"text": "• Jointly analyzing Tables 2 and 3, ReFine consistently outperforms all baselines across the four datasets. Advantageous to the local or global explanations, our multi-grained explanations not only have the global understanding of model workings (i.e. the class-wise knowledge), but also account for the local insights on specific instances (i.e. the coalition effect of edges in the local context). It illustrates the superiority of our ReFine paradigm. ",
|
| 909 |
+
"bbox": [
|
| 910 |
+
174,
|
| 911 |
+
575,
|
| 912 |
+
826,
|
| 913 |
+
645
|
| 914 |
+
],
|
| 915 |
+
"page_idx": 7
|
| 916 |
+
},
|
| 917 |
+
{
|
| 918 |
+
"type": "text",
|
| 919 |
+
"text": "Overall, the empirical supports justify the significance of fine-tuning well. The contributions of fine-tuning w.r.t. the overall improvements over PG-Explainer are $3 7 . 1 \\%$ and $3 1 . 8 \\%$ in MNIST and BA-3motif datasets, respectively. One possible reason that fine-tuning contributes only $3 . 1 \\%$ and $6 . 4 \\%$ portion of overall improvements in Mutagenicity and VG-5 as compared to PG-Explainer is the existance of rich node features in these two datasets. With the assistance of node features, the global patterns might be well-captured durining pre-training, thus leaving little space for the local patterns to improve. ",
|
| 920 |
+
"bbox": [
|
| 921 |
+
173,
|
| 922 |
+
655,
|
| 923 |
+
825,
|
| 924 |
+
752
|
| 925 |
+
],
|
| 926 |
+
"page_idx": 7
|
| 927 |
+
},
|
| 928 |
+
{
|
| 929 |
+
"type": "text",
|
| 930 |
+
"text": "4.3 Qualitative Analysis ",
|
| 931 |
+
"text_level": 1,
|
| 932 |
+
"bbox": [
|
| 933 |
+
174,
|
| 934 |
+
768,
|
| 935 |
+
352,
|
| 936 |
+
782
|
| 937 |
+
],
|
| 938 |
+
"page_idx": 7
|
| 939 |
+
},
|
| 940 |
+
{
|
| 941 |
+
"type": "text",
|
| 942 |
+
"text": "We present the qualitative results on MNIST superpixel in Figure 3, where the pre-trained and fine-tuned explanations are the explanatory subgraphs before fine-tuning (i.e. extracted based on the saliency map) and after fine-tuning (i.e. derived from the selection module), respectively. ",
|
| 943 |
+
"bbox": [
|
| 944 |
+
174,
|
| 945 |
+
794,
|
| 946 |
+
823,
|
| 947 |
+
835
|
| 948 |
+
],
|
| 949 |
+
"page_idx": 7
|
| 950 |
+
},
|
| 951 |
+
{
|
| 952 |
+
"type": "text",
|
| 953 |
+
"text": "Influence of Pre-training (RQ1). The pre-trained results (first row) well demonstrate the global patterns, where the explanatory subgraphs for interpreting the digit $\\mathbf { \\bar { \\theta } } ^ { 6 } 0 ^ { 9 }$ focus more on the edges between hollows in the middle and the fringe of the number. While interpreting the prediction $\\mathbf { \\Delta } ^ { 6 6 } 5 ^ { 9 }$ , the explanations identify the edges spread on the bend of the number as the most important features. Also, we observe an interesting pattern in the results for explaining the prediction $\\mathbf { \\vec { \\nu } } ^ { 6 } \\mathbf { \\vec { 8 } } ^ { 5 }$ , where the background edges draw more attention, rather than edges relevant to the digits, revealing the evidence for the target GNN to classify. It also shows the supporting evidence of the difference between the model explanation and the human explanation which focuses more on the digit graphs other than the background graphs. Through the pre-trained examples, the global patterns offer vital model understanding and inspections for the model’s decision-making process. ",
|
| 954 |
+
"bbox": [
|
| 955 |
+
174,
|
| 956 |
+
842,
|
| 957 |
+
825,
|
| 958 |
+
911
|
| 959 |
+
],
|
| 960 |
+
"page_idx": 7
|
| 961 |
+
},
|
| 962 |
+
{
|
| 963 |
+
"type": "image",
|
| 964 |
+
"img_path": "images/8c34ecf09b54fdf74ebfd5cd63461ec1c88fb307e8163089a1d2617a59c7f5bb.jpg",
|
| 965 |
+
"image_caption": [
|
| 966 |
+
"Figure 4: Qualitative Results in Mutagenicity dataset. The prediction of the molecule in the first row is mutagenic, while the molecule in the second row is predicted as non-mutagenic. The selection ratios range from $10 \\%$ to $50 \\%$ . Note that some opposite edges are visually coincident. "
|
| 967 |
+
],
|
| 968 |
+
"image_footnote": [],
|
| 969 |
+
"bbox": [
|
| 970 |
+
176,
|
| 971 |
+
89,
|
| 972 |
+
823,
|
| 973 |
+
270
|
| 974 |
+
],
|
| 975 |
+
"page_idx": 8
|
| 976 |
+
},
|
| 977 |
+
{
|
| 978 |
+
"type": "table",
|
| 979 |
+
"img_path": "images/470800e94834f62bc8307cad5370e2cab17acab1347368b788ccd357d2a74de8.jpg",
|
| 980 |
+
"table_caption": [
|
| 981 |
+
"Table 4: Time costs (in second) of GNNExplainer, PG-Explainer and the fine-tuning phase of Refine. "
|
| 982 |
+
],
|
| 983 |
+
"table_footnote": [],
|
| 984 |
+
"table_body": "<table><tr><td></td><td>Mutagenicity</td><td>VG-5</td><td>MNIST</td><td>BA-3motif</td></tr><tr><td>GNNExplainer</td><td>2.03</td><td>1.88</td><td>0.637</td><td>1.11</td></tr><tr><td>PG-Explainer</td><td>0.030</td><td>0.035</td><td>0.040</td><td>0.032</td></tr><tr><td>Refine(Fine-tuning)</td><td>0.821</td><td>0.583</td><td>0.535</td><td>0.423</td></tr></table>",
|
| 985 |
+
"bbox": [
|
| 986 |
+
258,
|
| 987 |
+
369,
|
| 988 |
+
735,
|
| 989 |
+
441
|
| 990 |
+
],
|
| 991 |
+
"page_idx": 8
|
| 992 |
+
},
|
| 993 |
+
{
|
| 994 |
+
"type": "text",
|
| 995 |
+
"text": "",
|
| 996 |
+
"bbox": [
|
| 997 |
+
174,
|
| 998 |
+
470,
|
| 999 |
+
825,
|
| 1000 |
+
540
|
| 1001 |
+
],
|
| 1002 |
+
"page_idx": 8
|
| 1003 |
+
},
|
| 1004 |
+
{
|
| 1005 |
+
"type": "text",
|
| 1006 |
+
"text": "Influence of Fine-tuning (RQ2). We now compare the pre-trained and fine-tuned explanations. Clearly, the fine-tuned explanatory graphs make clearer boundaries on the instances. The explanation adapted with the user-defined ratio pays greater attention to details that are only applicable to the specific instances. For example, one can take a closer look at the explanations in the 4-th column. Without the fine-tuning phase, the explanation may distracted by the edges across the digit and the background, such that these transition edges might be deemed as the most important features while achieve suboptimal predictive accuracies. In contrast, the fine-tuned explanation dispels such misunderstanding, with a higher local accuracy. Similar patterns can be found in other examples. ",
|
| 1007 |
+
"bbox": [
|
| 1008 |
+
174,
|
| 1009 |
+
553,
|
| 1010 |
+
825,
|
| 1011 |
+
664
|
| 1012 |
+
],
|
| 1013 |
+
"page_idx": 8
|
| 1014 |
+
},
|
| 1015 |
+
{
|
| 1016 |
+
"type": "text",
|
| 1017 |
+
"text": "The qualitative results on Mutagenicity are presented in Figure 4, where each explanation has been fine-tuned on the corresponding ratio. We can see the flexibility on ReFine, which enables the fine-tuning on a specific user-defined ratio. With the selection ratio increases, the class probability output by the target GNN is generally stable or further improved. Moreover, the fine-tuning phase focuses more on the combination of features, with the constraint of selection ratio, to purse the higher accuracy rather than intercepting on a ranking based on the static edge importance, which is only valid under the addictive feature assumption [32]. ",
|
| 1018 |
+
"bbox": [
|
| 1019 |
+
174,
|
| 1020 |
+
670,
|
| 1021 |
+
825,
|
| 1022 |
+
767
|
| 1023 |
+
],
|
| 1024 |
+
"page_idx": 8
|
| 1025 |
+
},
|
| 1026 |
+
{
|
| 1027 |
+
"type": "text",
|
| 1028 |
+
"text": "4.4 Discussions ",
|
| 1029 |
+
"text_level": 1,
|
| 1030 |
+
"bbox": [
|
| 1031 |
+
174,
|
| 1032 |
+
786,
|
| 1033 |
+
292,
|
| 1034 |
+
801
|
| 1035 |
+
],
|
| 1036 |
+
"page_idx": 8
|
| 1037 |
+
},
|
| 1038 |
+
{
|
| 1039 |
+
"type": "text",
|
| 1040 |
+
"text": "Efficiency for Generating Explanations. The inference time [7] to explain a new instance by the pre-trained ReFine is the same as PGExplainer under the same attributor construction. Different from GNNExplainer which has to retrain the model for each graph, ReFine only needs a few finetuning steps on the pre-trained model (20 steps on average). Thus, ReFine can gain a boosting performance for explaining graphs while remaining efficient in terms of time complexity. Specifically, we summarize the time costs in the Table 4. Clearly, our ReFine is more efficient than GNNExplainer and is computationally comparable to PG-Explainer. ",
|
| 1041 |
+
"bbox": [
|
| 1042 |
+
174,
|
| 1043 |
+
814,
|
| 1044 |
+
825,
|
| 1045 |
+
911
|
| 1046 |
+
],
|
| 1047 |
+
"page_idx": 8
|
| 1048 |
+
},
|
| 1049 |
+
{
|
| 1050 |
+
"type": "text",
|
| 1051 |
+
"text": "Limitations. Although ReFine can well-encode the class-wise knowledge by learning the parameters of multiple attributors, it can hardly map such knowledge to the structure representation as XGNN [13]. This limits the human understanding on the core of input data via a conciseness substructure. ",
|
| 1052 |
+
"bbox": [
|
| 1053 |
+
173,
|
| 1054 |
+
90,
|
| 1055 |
+
825,
|
| 1056 |
+
133
|
| 1057 |
+
],
|
| 1058 |
+
"page_idx": 9
|
| 1059 |
+
},
|
| 1060 |
+
{
|
| 1061 |
+
"type": "text",
|
| 1062 |
+
"text": "5 Related Work ",
|
| 1063 |
+
"text_level": 1,
|
| 1064 |
+
"bbox": [
|
| 1065 |
+
174,
|
| 1066 |
+
151,
|
| 1067 |
+
321,
|
| 1068 |
+
167
|
| 1069 |
+
],
|
| 1070 |
+
"page_idx": 9
|
| 1071 |
+
},
|
| 1072 |
+
{
|
| 1073 |
+
"type": "text",
|
| 1074 |
+
"text": "We consider two classes of related work for GNNs explainability: studies on local explainability, which independently explain for each input graph without referring to other knowledge, e.g., training data; studies on global explainability, which provide explanations for multiple instances with the guide of the model-level or class-level knowledge. See [49, 8, 50] for more overviews. ",
|
| 1075 |
+
"bbox": [
|
| 1076 |
+
174,
|
| 1077 |
+
183,
|
| 1078 |
+
825,
|
| 1079 |
+
238
|
| 1080 |
+
],
|
| 1081 |
+
"page_idx": 9
|
| 1082 |
+
},
|
| 1083 |
+
{
|
| 1084 |
+
"type": "text",
|
| 1085 |
+
"text": "• Local Explainability. In general, there are two research lines. (1) Non-parametric explanation methods [10, 9, 11] use some heuristics as the feature contributions of a specific instance, without involving additional trainable models. Gradient-like scores [10, 9, 11] are wisely-used heuristics, which is obtained by backpropagating the model prediction or loss to the input features, such as adjacency matrix [10], along with the model architecture. (2) Parametric explanation methods [6, 19, 51, 52] additionally train a parametrized explainer model to generate the saliency maps or explanatory subgraphs for individual instances. The explainer model is typically optimized towards local fidelity [32, 48, 27], which uses the explanations to recover the target predictions. For example, GNNExplainer [6] learns soft masks for an instance and applies them on the adjacency matrix. PGM-Explainer [19] trains an Bayesian network upon the pairs of graph perturbations and prediction changes. However, these methods fall short in capturing the prototypical patterns shared within the same groups or classes. ",
|
| 1086 |
+
"bbox": [
|
| 1087 |
+
173,
|
| 1088 |
+
247,
|
| 1089 |
+
825,
|
| 1090 |
+
412
|
| 1091 |
+
],
|
| 1092 |
+
"page_idx": 9
|
| 1093 |
+
},
|
| 1094 |
+
{
|
| 1095 |
+
"type": "text",
|
| 1096 |
+
"text": "• Global Explainability. This direction is less explored compared to the local explainability of GNNs [8]. To provide a global understanding of the model prediction, PGExplainer [7] formulates the generation of multiple explanations based on its collective and inductive property, and designs the attributor as a deep neural network whose parameters are shared across the explained instances. XGNN [13] explains GNNs by training a graph generator, which outputs class-wise graph patterns to explain this class. As it is designed to explain the holistic class, making it hardly applicable on an specific instance, e.g., the graph patterns may not even exit on the instance. ",
|
| 1097 |
+
"bbox": [
|
| 1098 |
+
174,
|
| 1099 |
+
417,
|
| 1100 |
+
825,
|
| 1101 |
+
515
|
| 1102 |
+
],
|
| 1103 |
+
"page_idx": 9
|
| 1104 |
+
},
|
| 1105 |
+
{
|
| 1106 |
+
"type": "text",
|
| 1107 |
+
"text": "6 Conclusion and Future Work ",
|
| 1108 |
+
"text_level": 1,
|
| 1109 |
+
"bbox": [
|
| 1110 |
+
174,
|
| 1111 |
+
532,
|
| 1112 |
+
449,
|
| 1113 |
+
550
|
| 1114 |
+
],
|
| 1115 |
+
"page_idx": 9
|
| 1116 |
+
},
|
| 1117 |
+
{
|
| 1118 |
+
"type": "text",
|
| 1119 |
+
"text": "Multi-grained explainability promises to offer a flexible and all-round inspection of deep models’ decision-making, which has been less explored in the literature. Motivated by this, we proposed a novel generative probabilistic model, ReFine, to approach the multi-granularity explainability via pre-training and fine-tuning. To exhibit global explanations with the prototypical patterns, the pre-training phase is founded upon the class-aware attribution modules and distills the class-level knowledge by contrastive learning. When given a specific instance, the fine-tuning phase further adapts the global explanations in the local context with high fidelity. In the fashion of pre-training and fine-tuning, we can generate explanations with both global patterns and local features. Extensive results in four datasets show that our method indeed improves the quality of explanatory subgraphs. ",
|
| 1120 |
+
"bbox": [
|
| 1121 |
+
174,
|
| 1122 |
+
563,
|
| 1123 |
+
825,
|
| 1124 |
+
688
|
| 1125 |
+
],
|
| 1126 |
+
"page_idx": 9
|
| 1127 |
+
},
|
| 1128 |
+
{
|
| 1129 |
+
"type": "text",
|
| 1130 |
+
"text": "As future direction, we consider the extension of ReFine to fulfill the counterfactual explanation [53], which answers ‘Why the target GNN model made a certain prediction, rather than another prediction?”, to enrich the multi-granularity explainability. Further, multi-grained explainability can be exhibited to explore the model robustness and heuristically guide the model construction. ",
|
| 1131 |
+
"bbox": [
|
| 1132 |
+
174,
|
| 1133 |
+
694,
|
| 1134 |
+
825,
|
| 1135 |
+
750
|
| 1136 |
+
],
|
| 1137 |
+
"page_idx": 9
|
| 1138 |
+
},
|
| 1139 |
+
{
|
| 1140 |
+
"type": "text",
|
| 1141 |
+
"text": "Acknowledgments and Disclosure of Funding ",
|
| 1142 |
+
"text_level": 1,
|
| 1143 |
+
"bbox": [
|
| 1144 |
+
174,
|
| 1145 |
+
767,
|
| 1146 |
+
553,
|
| 1147 |
+
786
|
| 1148 |
+
],
|
| 1149 |
+
"page_idx": 9
|
| 1150 |
+
},
|
| 1151 |
+
{
|
| 1152 |
+
"type": "text",
|
| 1153 |
+
"text": "Funding in direct support of this work: the Sea-NExT Joint Lab, Singapore MOE AcRF T2; the National Natural Science Foundation of China (U19A2079, 62121002); the National Key Research and Development Program of China (2020YFB1406703). ",
|
| 1154 |
+
"bbox": [
|
| 1155 |
+
174,
|
| 1156 |
+
799,
|
| 1157 |
+
825,
|
| 1158 |
+
840
|
| 1159 |
+
],
|
| 1160 |
+
"page_idx": 9
|
| 1161 |
+
},
|
| 1162 |
+
{
|
| 1163 |
+
"type": "text",
|
| 1164 |
+
"text": "References ",
|
| 1165 |
+
"text_level": 1,
|
| 1166 |
+
"bbox": [
|
| 1167 |
+
174,
|
| 1168 |
+
859,
|
| 1169 |
+
267,
|
| 1170 |
+
876
|
| 1171 |
+
],
|
| 1172 |
+
"page_idx": 9
|
| 1173 |
+
},
|
| 1174 |
+
{
|
| 1175 |
+
"type": "text",
|
| 1176 |
+
"text": "[1] Vijay Prakash Dwivedi, Chaitanya K. Joshi, Thomas Laurent, Yoshua Bengio, and Xavier Bresson. Benchmarking graph neural networks. CoRR, abs/2003.00982, 2020. ",
|
| 1177 |
+
"bbox": [
|
| 1178 |
+
187,
|
| 1179 |
+
883,
|
| 1180 |
+
823,
|
| 1181 |
+
911
|
| 1182 |
+
],
|
| 1183 |
+
"page_idx": 9
|
| 1184 |
+
},
|
| 1185 |
+
{
|
| 1186 |
+
"type": "text",
|
| 1187 |
+
"text": "[2] Zonghan Wu, Shirui Pan, Fengwen Chen, Guodong Long, Chengqi Zhang, and Philip S. Yu. A comprehensive survey on graph neural networks. TNNLS, 32(1):4–24, 2021. \n[3] Shruthi Chari, Daniel M. Gruen, Oshani Seneviratne, and Deborah L. McGuinness. Directions for explainable knowledge-enabled systems. In Knowledge Graphs for eXplainable Artificial Intelligence: Foundations, Applications and Challenges, pages 245–261. 2020. \n[4] Christopher J. Anders, Plamen Pasliev, Ann-Kathrin Dombrowski, Klaus-Robert Müller, and Pan Kessel. Fairwashing explanations with off-manifold detergent. In ICML, pages 314–323, 2020. \n[5] Sebastian Lapuschkin, Stephan Wäldchen, Alexander Binder, Grégoire Montavon, Wojciech Samek, and Klaus-Robert Müller. Unmasking clever hans predictors and assessing what machines really learn. Nature communications, 10(1):1–8, 2019. \n[6] Zhitao Ying, Dylan Bourgeois, Jiaxuan You, Marinka Zitnik, and Jure Leskovec. Gnnexplainer: Generating explanations for graph neural networks. In NeurIPS, pages 9240–9251, 2019. \n[7] Dongsheng Luo, Wei Cheng, Dongkuan Xu, Wenchao Yu, Bo Zong, Haifeng Chen, and Xiang Zhang. Parameterized explainer for graph neural network. In NeurIPS, 2020. \n[8] Hao Yuan, Haiyang Yu, Shurui Gui, and Shuiwang Ji. Explainability in graph neural networks: A taxonomic survey. CoRR, abs/2012.15445, 2020. \n[9] Federico Baldassarre and Hossein Azizpour. Explainability techniques for graph convolutional networks. CoRR, abs/1905.13686, 2019. \n[10] Phillip E. Pope, Soheil Kolouri, Mohammad Rostami, Charles E. Martin, and Heiko Hoffmann. Explainability methods for graph convolutional neural networks. In CVPR, pages 10772–10781, 2019. \n[11] Thomas Schnake, Oliver Eberle, Jonas Lederer, Shinichi Nakajima, K. T. Schutt, Klaus-Robert Muller, and Grégoire Montavon. Higher-order explanations of graph neural networks via relevant walks. arXiv, 2020. \n[12] Michael Sejr Schlichtkrull, Nicola De Cao, and Ivan Titov. Interpreting graph neural networks for NLP with differentiable edge masking. CoRR, abs/2010.00577, 2020. \n[13] Hao Yuan, Jiliang Tang, Xia Hu, and Shuiwang Ji. XGNN: towards model-level explanations of graph neural networks. In Rajesh Gupta, Yan Liu, Jiliang Tang, and B. Aditya Prakash, editors, KDD, pages 430–438, 2020. \n[14] Marco Túlio Ribeiro, Sameer Singh, and Carlos Guestrin. \"why should I trust you?\": Explaining the predictions of any classifier. In KDD, pages 1135–1144, 2016. \n[15] Jeremy Howard and Sebastian Ruder. Universal language model fine-tuning for text classification. In ACL, pages 328–339, 2018. \n[16] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018. \n[17] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey E. Hinton. A simple framework for contrastive learning of visual representations. In ICML, volume 119, pages 1597–1607, 2020. \n[18] Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross B. Girshick. Momentum contrast for unsupervised visual representation learning. In CVPR, pages 9726–9735, 2020. \n[19] Minh N. Vu and My T. Thai. Pgm-explainer: Probabilistic graphical model explanations for graph neural networks. In NeurIPS, 2020. \n[20] Hongyang Gao and Shuiwang Ji. Graph u-nets. In ICML, volume 97, pages 2083–2092, 2019. ",
|
| 1188 |
+
"bbox": [
|
| 1189 |
+
171,
|
| 1190 |
+
59,
|
| 1191 |
+
828,
|
| 1192 |
+
907
|
| 1193 |
+
],
|
| 1194 |
+
"page_idx": 10
|
| 1195 |
+
},
|
| 1196 |
+
{
|
| 1197 |
+
"type": "text",
|
| 1198 |
+
"text": "",
|
| 1199 |
+
"bbox": [
|
| 1200 |
+
176,
|
| 1201 |
+
896,
|
| 1202 |
+
823,
|
| 1203 |
+
912
|
| 1204 |
+
],
|
| 1205 |
+
"page_idx": 10
|
| 1206 |
+
},
|
| 1207 |
+
{
|
| 1208 |
+
"type": "text",
|
| 1209 |
+
"text": "[21] Petar Velickovi ˇ c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua ´ Bengio. Graph attention networks. ICLR, 2018. \n[22] William L. Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In NeurIPS, pages 1024–1034, 2017. \n[23] Xiang Wang, Xiangnan He, Meng Wang, Fuli Feng, and Tat-Seng Chua. Neural graph collaborative filtering. In SIGIR, pages 165–174, 2019. \n[24] Xiang Wang, Xiangnan He, Yixin Cao, Meng Liu, and Tat-Seng Chua. KGAT: knowledge graph attention network for recommendation. In KDD, pages 950–958, 2019. \n[25] Xiangnan He, Kuan Deng, Xiang Wang, Yan Li, Yong-Dong Zhang, and Meng Wang. Lightgcn: Simplifying and powering graph convolution network for recommendation. In SIGIR, pages 639–648, 2020. \n[26] Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In ICLR, 2019. \n[27] Ian Covert, Scott Lundberg, and Su-In Lee. Feature removal is a unifying principle for model explanation methods. In NeurIPS, 2020. \n[28] Marco Ancona, Enea Ceolini, Cengiz Öztireli, and Markus Gross. Towards better understanding of gradient-based attribution methods for deep neural networks. In ICLR, 2018. \n[29] Constantin F Aliferis, Alexander Statnikov, Ioannis Tsamardinos, Subramani Mani, and Xenofon D Koutsoukos. Local causal and markov blanket induction for causal discovery and feature selection for classification part i: Algorithms and empirical evaluation. JMLR, 11(1), 2010. \n[30] Peter D Hoff, Adrian E Raftery, and Mark S Handcock. Latent space approaches to social network analysis. Journal of the american Statistical association, 97(460):1090–1098, 2002. \n[31] Max Welling Thomas N. Kipf. Variational graph auto-encoders. In NeurIPS Workshops, 2016. \n[32] Jianbo Chen, Le Song, Martin J. Wainwright, and Michael I. Jordan. Learning to explain: An information-theoretic perspective on model interpretation. In ICML, pages 882–891, 2018. \n[33] Lukas Faber, Amin K Moghaddam, and Roger Wattenhofer. Contrastive graph neural network explanation. 2021. \n[34] R. Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Philip Bachman, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. In ICLR, 2019. \n[35] Fan-Yun Sun, Jordan Hoffmann, Vikas Verma, and Jian Tang. Infograph: Unsupervised and semi-supervised graph-level representation learning via mutual information maximization. In ICLR, 2020. \n[36] Yuning You, Tianlong Chen, Yongduo Sui, Ting Chen, Zhangyang Wang, and Yang Shen. Graph contrastive learning with augmentations. In NeurIPS, 2020. \n[37] Jiancan Wu, Xiang Wang, Fuli Feng, Xiangnan He, Liang Chen, Jianxun Lian, and Xing Xie. Self-supervised graph learning for recommendation. In SIGIR, pages 726–735, 2021. \n[38] Christopher Frye, Damien de Mijolla, Laurence Cowton, Megan Stanley, and Ilya Feige. Shapley-based explainability on the data manifold. In ICLR, 2021. \n[39] H. W. Kuhn and A. W. Tucker. Contributions to the theory of games, volume 2. Princeton University Press, 1953. \n[40] Jeroen Kazius, Ross McGuire, and Roberta Bursi. Derivation and validation of toxicophores for mutagenicity prediction. Journal of medicinal chemistry, 48(1):312–320, 2005. \n[41] Kaspar Riesen and Horst Bunke. Iam graph database repository for graph based pattern recognition and machine learning. In SPR and SSPR, pages 287–297, 2008. \n[42] Weihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik, Percy Liang, Vijay S. Pande, and Jure Leskovec. Strategies for pre-training graph neural networks. In ICLR, 2020. \n[43] Ranjay Krishna, Yuke Zhu, Oliver Groth, Justin Johnson, Kenji Hata, Joshua Kravitz, Stephanie Chen, Yannis Kalantidis, Li-Jia Li, David A. Shamma, Michael S. Bernstein, and Li Fei-Fei. Visual genome: Connecting language and vision using crowdsourced dense image annotations. IJCV, 123(1):32–73, 2017. \n[44] Johannes Klicpera, Aleksandar Bojchevski, and Stephan Günnemann. Predict then propagate: Graph neural networks meet personalized pagerank. In ICLR, 2019. \n[45] Federico Monti, Davide Boscaini, Jonathan Masci, Emanuele Rodolà, Jan Svoboda, and Michael M. Bronstein. Geometric deep learning on graphs and manifolds using mixture model cnns. In CVPR, pages 5425–5434, 2017. \n[46] Matthias Fey, Jan Eric Lenssen, Frank Weichert, and Heinrich Müller. Splinecnn: Fast geometric deep learning with continuous b-spline kernels. In CVPR, pages 869–877, 2018. \n[47] Ekagra Ranjan, Soumya Sanyal, and Partha P. Talukdar. ASAP: adaptive structure aware pooling for learning hierarchical graph representations. In AAAI, pages 5470–5477, 2020. \n[48] Jian Liang, Bing Bai, Yuren Cao, Kun Bai, and Fei Wang. Adversarial infidelity learning for model interpretation. In KDD, pages 286–296, 2020. \n[49] Hao Yuan, Haiyang Yu, Shurui Gui, and Shuiwang Ji. Explainability in graph neural networks: A taxonomic survey. CoRR, 2020. \n[50] Thomas Schnake, Oliver Eberle, Jonas Lederer, Shinichi Nakajima, Kristof T. Schütt, KlausRobert Müller, and Grégoire Montavon. XAI for graphs: Explaining graph neural network predictions by identifying relevant walks. CoRR, abs/2006.03589, 2020. \n[51] Hao Yuan, Haiyang Yu, Jie Wang, Kang Li, and Shuiwang Ji. On explainability of graph neural networks via subgraph explorations. ArXiv, 2021. \n[52] Patrick Schwab and Walter Karlen. Cxplain: Causal explanations for model interpretation under uncertainty. In NeurIPS, pages 10220–10230, 2019. \n[53] Raha Moraffah, Mansooreh Karami, Ruocheng Guo, Adrienne Raglin, and Huan Liu. Causal interpretability for machine learning-problems, methods and evaluation. SIGKDD Explorations, 22(1):18–33, 2020. ",
|
| 1210 |
+
"bbox": [
|
| 1211 |
+
171,
|
| 1212 |
+
47,
|
| 1213 |
+
828,
|
| 1214 |
+
916
|
| 1215 |
+
],
|
| 1216 |
+
"page_idx": 11
|
| 1217 |
+
},
|
| 1218 |
+
{
|
| 1219 |
+
"type": "text",
|
| 1220 |
+
"text": "",
|
| 1221 |
+
"bbox": [
|
| 1222 |
+
168,
|
| 1223 |
+
90,
|
| 1224 |
+
828,
|
| 1225 |
+
604
|
| 1226 |
+
],
|
| 1227 |
+
"page_idx": 12
|
| 1228 |
+
}
|
| 1229 |
+
]
|
parse/train/e5vrkfc5aau/e5vrkfc5aau_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/e5vrkfc5aau/e5vrkfc5aau_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/r14EOsCqKX/r14EOsCqKX.md
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.gotmare@epfl.ch Nitish Shirish Keskar, Caiming Xiong & Richard Socher Salesforce Research
|
| 6 |
+
Palo Alto, US
|
| 7 |
+
{nkeskar, cxiong, rsocher}@salesforce.com
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
The convergence rate and final performance of common deep learning models have significantly benefited from heuristics such as learning rate schedules, knowledge distillation, skip connections, and normalization layers. In the absence of theoretical underpinnings, controlled experiments aimed at explaining these strategies can aid our understanding of deep learning landscapes and the training dynamics. Existing approaches for empirical analysis rely on tools of linear interpolation and visualizations with dimensionality reduction, each with their limitations. Instead, we revisit such analysis of heuristics through the lens of recently proposed methods for loss surface and representation analysis, viz., mode connectivity and canonical correlation analysis (CCA), and hypothesize reasons for the success of the heuristics. In particular, we explore knowledge distillation and learning rate heuristics of (cosine) restarts and warmup using mode connectivity and CCA. Our empirical analysis suggests that: (a) the reasons often quoted for the success of cosine annealing are not evidenced in practice; (b) that the effect of learning rate warmup is to prevent the deeper layers from creating training instability; and (c) that the latent knowledge shared by the teacher is primarily disbursed to the deeper layers.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
The introduction of heuristics such as normalization layers (Ioffe & Szegedy, 2015; Ba et al., 2016), residual connections (He et al., 2016), and learning rate strategies (Loshchilov & Hutter, 2016; Goyal et al., 2017; Smith, 2017) have greatly accelerated progress in Deep Learning. Many of these ingredients are now commonplace in modern architectures, and some of them have also been buttressed with theoretical guarantees (Balduzzi et al., 2017; Poggio & Liao, 2017; Hardt & Ma, 2016). However, despite their simplicity and efficacy, why some of these heuristics work is still relatively unknown. Existing attempts at explaining these strategies empirically have been limited to intuitive explanations and the use of tools such as spectrum analysis (Sagun et al., 2017), linear interpolation between two models and low-dimensional visualizations (Li et al., 2017) of the loss surface. In our work, we instead use recent tools built specifically for analyzing deep networks, viz., mode connectivity (Garipov et al., 2018) and singular value canonical correlation analysis (SVCCA) (Raghu et al., 2017). We investigate three strategies in detail: (a) cosine learning rate decay, (b) learning rate warmup, and (c) knowledge distillation, and list the summary of our contributions at the end of this section.
|
| 16 |
+
|
| 17 |
+
Cosine annealing (Loshchilov & Hutter, 2016), also known as stochastic gradient descent with restarts (SGDR), and more generally cyclical learning rate strategies (Smith, 2017), have been recently proposed to accelerate training of deep networks (Coleman et al., 2018). The strategy involves reductions and restarts of learning rates over the course of training, and was motivated as means to escape spurious local minima. Experimental results have shown that SGDR often improves convergence both from the standpoint of iterations needed for convergence and the final objective.
|
| 18 |
+
|
| 19 |
+
Learning rate warmup (Goyal et al., 2017) also constitutes an important ingredient in training deep networks, especially in the presence of large or dynamic batch sizes. It involves increasing the learning rate to a large value over a certain number of training iterations followed by decreasing the learning rate, which can be performed using step-decay, exponential decay or other such schemes. The strategy was proposed out of the need to induce stability in the initial phase of training with large learning rates (due to large batch sizes). It has been employed in training of several architectures at scale including ResNets and Transformer networks (Vaswani et al., 2017).
|
| 20 |
+
|
| 21 |
+
Further, we investigate knowledge distillation (KD) (Hinton et al., 2015). This strategy involves first training a (teacher) model on a typical loss function on the available data. Next, a different (student) model (typically much smaller than the teacher model) is trained, but instead of optimizing the loss function defined using hard data labels, this student model is trained to mimic the teacher model. It has been empirically found that a student network trained in this fashion significantly outperforms an identical network trained with the hard data labels. We defer a detailed discussion of the three heuristics, and existing explanations for their efficacy to sections 3, 4 and 5 respectively.
|
| 22 |
+
|
| 23 |
+
Finally, we briefly describe the tools we employ for analyzing the aforementioned heuristics. Mode connectivity (MC) is a recent observation that shows that, under circumstances, it is possible to connect any two local minima of deep networks via a piecewise-linear curve (Garipov et al., 2018; Draxler et al., 2018). This shows that local optima obtained through different means, and exhibiting different local and generalization properties, are connected. The authors propose an algorithm that locates such a curve. While not proposed as such, we employ this framework to better understand loss surfaces but begin our analysis in Section 2 by first establishing its robustness as a framework.
|
| 24 |
+
|
| 25 |
+
Deep network analyses focusing on the weights of a network are inherently limited since there are several invariances in this, such as permutation and scaling. Recently, Raghu et al. (2017) propose using CCA along with some pre-processing steps to analyze the activations of networks, such that the resulting comparison is not dependent on permutations and scaling of neurons. They also prove the computational gains of using CCA over alternatives ((Li et al., 2015)) for representational analysis and employ it to better understand many phenomenon in deep learning.
|
| 26 |
+
|
| 27 |
+
# Contributions:
|
| 28 |
+
|
| 29 |
+
• We use mode connectivity and CCA to improve understanding of cosine annealing, learning rate warmup and knowledge distillation. For mode connectivity, we also establish the robustness of the approach across changes in training choices for obtaining the modes. We demonstrate that the reasons often quoted for the success of cosine annealing are not substantiated by our experiments, and that the iterates move over barriers after restarts but the explanation of escaping local minima might be an oversimplification.
|
| 30 |
+
• We show that learning rate warmup primarily limits weight changes in the deeper layers and that freezing them achieves similar outcomes as warmup.
|
| 31 |
+
• We show that the latent knowledge shared by the teacher in knowledge distillation is primarily disbursed in the deeper layers.
|
| 32 |
+
|
| 33 |
+
# 2 EMPIRICAL TOOLS
|
| 34 |
+
|
| 35 |
+
# 2.1 MODE CONNECTIVITY
|
| 36 |
+
|
| 37 |
+
Garipov et al. (2018) introduce a framework, called mode connectivity, to obtain a low loss (or high accuracy, in the case of classification) curve of simple form, such as a piecewise linear curve, that connects optima (modes of the loss function) found independently. This observation suggests that points at the same loss function depth are connected, somewhat contrary to several empirical results claiming that minima are isolated or have barriers between them1.
|
| 38 |
+
|
| 39 |
+
Let $w _ { a } \in \mathbb { R } ^ { D }$ and $w _ { b } \in \mathbb { R } ^ { D }$ be two modes in the $D$ -dimensional parameter space obtained by optimizing a given loss function $\mathcal { L } ( w )$ (like the cross-entropy loss). We represent a curve connecting $w _ { a }$ and $w _ { b }$ by $\phi _ { \theta } ( t ) : [ 0 , 1 ] \to \mathbb { R } ^ { D }$ , such that $\phi _ { \theta } ( 0 ) = w _ { a }$ and $\phi _ { \theta } ( 1 ) = w _ { b }$ . To find a low loss path, we find the set of parameters $\theta \in \mathbb { R } ^ { D }$ that minimizes the following loss: $\begin{array} { r } { \ell ( \theta ) = \int _ { 0 } ^ { 1 } \mathcal { L } ( \phi _ { \theta } ( t ) ) d t = } \end{array}$ $\mathbb { E } _ { t \sim U ( 0 , 1 ) } \mathcal { L } ( \phi _ { \theta } ( t ) )$ where $U ( 0 , 1 )$ is the uniform distribution in the interval $[ 0 , 1 ]$ . To optimize $\ell ( \theta )$ for $\theta$ , we first need to chose a parametric form for $\phi _ { \theta } ( t )$ . One of the forms proposed by Garipov et al. (2018) is a polygonal chain with a single bend at $\theta$ as follows
|
| 40 |
+
|
| 41 |
+

|
| 42 |
+
Figure 1: Validation accuracy corresponding to models on the following 6 different curves - curve $G A$ represents curve connecting mode $G$ (one found with default hyperparameters) and mode $A$ (using large batch size), similarly, curve $G B$ connects mode $G$ and mode $B$ (using Adam), curve $G C$ connects to mode $C$ (using linearly decaying learning rate), curve $G D$ to mode $D$ (with lesser L2 regularization), curve $G E$ to mode $E$ (using a poor initialization), and curve $G F$ to mode $F$ (without using data augmentation). $t = 0$ corresponds to mode $G$ for all plots.
|
| 43 |
+
|
| 44 |
+
$$
|
| 45 |
+
\phi _ { \theta } ( t ) = { \left\{ \begin{array} { l l } { 2 ( t \theta + ( 0 . 5 - t ) w _ { a } ) , } & { \quad { \mathrm { i f ~ } } 0 \leq t \leq 0 . 5 } \\ { 2 ( ( t - 0 . 5 ) w _ { b } + ( 1 - t ) \theta ) } & { \quad { \mathrm { i f ~ } } 0 . 5 < t \leq 1 } \end{array} \right. }
|
| 46 |
+
$$
|
| 47 |
+
|
| 48 |
+
To minimize $\ell ( \theta )$ , we sample $t \sim U [ 0 , 1 ]$ at each iteration and use $\nabla _ { \theta } \mathcal { L } ( \phi _ { \theta } ( t ) )$ as an unbiased estimate for the true gradient $\nabla _ { { \boldsymbol { \theta } } } \ell ( { \boldsymbol { \theta } } )$ to perform updates on $\theta$ , where $\theta$ is initialized with $\frac { 1 } { 2 } \left( w _ { a } + w _ { b } \right)$ .
|
| 49 |
+
|
| 50 |
+
# 2.1.1 RESILIENCE OF MODE CONNECTIVITY
|
| 51 |
+
|
| 52 |
+
To demonstrate that the curve-finding approach works in practice, Garipov et al. (2018) use two optima found using different initializations but a common training scheme which we detail below. We explore the limits of this procedure by connecting optima obtained from different training strategies. Our goal of this investigation is to first establish the robustness of the framework in order to seamlessly use it as a tool for analysis. In particular, we experiment with different initializations, optimizers, data augmentation choices, and hyperparameter settings including regularization, training batch sizes, and learning rate schemes. We note in passing that while the framework was proposed to connect two points in the parameter space that are at equal depth in the loss landscape, it is well-defined to also connect points at different depths; in this case, the path corresponds to one that minimizes the average loss along the curve.
|
| 53 |
+
|
| 54 |
+
Conventional wisdom suggests that the different training schemes mentioned above will converge to regions in the parameter space that are vastly different from each other. Examples of this include size of minibatches used during training (Keskar et al., 2016), choice of optimizer (Heusel et al., 2017; Wilson et al., 2017), initialization (Goodfellow et al., 2016) and choice of regularizer. Having a high accuracy connection between these pairs would seem counterintuitive.
|
| 55 |
+
|
| 56 |
+
For obtaining the reference model (named mode $G$ ), we train the VGG-16 model architecture (Simonyan & Zisserman, 2014) using CIFAR-10 training data (Krizhevsky et al., 2014) for 200 epochs with SGD. We then build 6 variants of the reference mode $G$ as follows: we obtain mode $A$ using a training batch size of 4000, mode $B$ by using the Adam optimizer instead of SGD, mode $C$ with a linearly decaying learning rate instead of the step decay used in mode $G$ , mode $D$ using a smaller weight decay of $5 \times \mathrm { 1 \overline { { 0 } } ^ { - 6 } }$ , mode $E$ by increasing the variance of the initialization distribution to $3 { \bar { \times } } { \sqrt { 2 / n } }$ and mode $F$ using no data augmentation. Note that for the set of modes $\{ A , B , C , D , E , { \dot { F } } \}$ , all the other hyper-parameters and settings except the ones mentioned above are kept same as that for mode $G$ . We use the mode connectivity algorithm on each of the 6 pairs of modes including $G$ and another mode, resulting in curves $G A , G B , G C , G D , G E$ , and $G F$ .
|
| 57 |
+
|
| 58 |
+
Figure 1 shows the validation accuracy for models on each of the 6 connecting curves during the 20th, 40th, 60th and 80th epochs of the mode connectivity training procedure and also for models on the line segment joining the two endpoints (corresponding to the initialization for $\theta$ at epoch
|
| 59 |
+
|
| 60 |
+
0). As described in Section 2.1, for a polychain curve $G X$ (connecting modes $G$ and $X$ using the curve described by $\theta$ ), model parameters $\phi _ { \theta } ( t )$ on the curve are given by $p _ { \phi _ { \theta } ( t ) } = 2 ( t p _ { \theta } + ( 0 . 5 -$ $t ) p _ { G } )$ if $0 \leq t \leq 0 . 5$ and $p _ { \phi _ { \theta } ( t ) } = 2 ( ( t - 0 . 5 ) p _ { X } + ( 1 - t ) p _ { \theta } )$ if $0 . 5 < t \leq 1$ where $p _ { G } , p _ { \theta }$ and $p _ { X }$ are parameters of the models $G , \theta .$ , and $X$ respectively. Thus $\phi _ { \theta } ( 0 ) = G$ and $\phi _ { \theta } ( 1 ) = X$ .
|
| 61 |
+
|
| 62 |
+
In a few epochs of the curve training, for all 6 pairs, we can find a curve such that each point on it generalizes almost as well as models from the pair that is being connected. Note that by virtue of existence of these 6 curves, there exists a high accuracy connecting curve (albeit with multiple bends) for each of the $\binom { 7 } { 2 }$ pairs of modes. We refer the reader to Appendix 7 for a t-SNE plot of the modes and their connections, and also for additional plots and details. Having established the high likelihood of the existence of these curves, we use this procedure along with interpolation of the loss surface between parameters at different epochs as tools to analyze the dynamics of SGD and SGDR.
|
| 63 |
+
|
| 64 |
+
# 2.2 CCA FOR MEASURING REPRESENTATIONAL SIMILARITY
|
| 65 |
+
|
| 66 |
+
Canonical correlation analysis (CCA) is a classical tool from multivariate statistics (Hotelling, 1936) that investigates the relationships between two sets of random variables. Raghu et al. (2017) have proposed coupling CCA with pre-processing steps like Singular Value Decomposition (SVD) or Discrete Fourier Transform (DFT) to design a similarity metric for two neural net layers that we want to compare. These layers do not have to be of the same size or belong to the same network.
|
| 67 |
+
|
| 68 |
+
Given a dataset with $m$ examples $X = \{ x _ { 1 } , \ldots x _ { m } \}$ , we denote the scalar output of the neuron $z _ { i } ^ { l }$ $i$ -th neuron of layer $l$ ) for the input $x _ { i }$ by $f _ { z _ { i } ^ { L } } ( x _ { i } )$ . These scalar outputs can be stacked (along $n$ different neurons and $m$ different datapoints) to create a matrix $\boldsymbol { L } \in \mathbb { R } ^ { m \times n }$ representing the output of a layer corresponding to the entire dataset. This choice of comparing neural network layers using activations instead of weights and biases is crucial to the setup proposed. Indeed, invariances due to re-parameterizations and permutations limit the interpretability of the model weights (Dinh et al., 2017). However, under CCA of the layers, two activation sets are comparable by design.
|
| 69 |
+
|
| 70 |
+
Given representations corresponding to two layers $L _ { a } \in \mathbb { R } ^ { m _ { a } \times n }$ and $L _ { b } \in \mathbb { R } ^ { m _ { b } \times n }$ , SVCCA first performs dimensionality reduction using SVD to obtain $L _ { a } ^ { ' } \ \in \ \mathbb { R } ^ { m _ { a } ^ { \prime } \times n }$ and $L _ { b } ^ { ' } \ \in \ \mathbb { R } ^ { m _ { b } ^ { \prime } \times n }$ while preserving $9 9 \%$ of the variance. The subsequent CCA step involves transforming $L _ { a } ^ { ' }$ and $L _ { b } ^ { ' }$ to $a _ { 1 } ^ { \top } L _ { a } ^ { ' }$ and $b _ { 1 } ^ { \top } L _ { b } ^ { ' }$ respectively where $\{ a _ { 1 } , b _ { 1 } \}$ is found by maximizing the correlation between the transformed subspaces, and the corresponding correlation is denoted by $\rho _ { 1 }$ . This process continues, using orthogonality constraints, till $c = \mathrm { m i n } \{ m _ { a } ^ { ' } , m _ { b } ^ { ' } \}$ leading to the set of correlation values $\{ \rho _ { 1 } , \rho _ { 2 } \ldots \rho _ { c } \}$ corresponding to $c$ pairs of canonical variables $\{ \{ a _ { 1 } , b _ { 1 } \} , \{ a _ { 2 } , b _ { 2 } \} , . . . \{ a _ { c } , b _ { c } \} \}$ respectively. We refer the reader to Raghu et al. (2017) for details on solving these optimization problems. The average of these $c$ correlations ${ \frac { 1 } { n } } \sum _ { i } \rho _ { i }$ is then considered as a measure of the similarity between the two layers. For convolutional layers, Raghu et al. (2017) suggest using a DFT pre-processing step before CCA, since they typically have a large number of neurons ${ \bf \zeta } _ { m _ { a } }$ or $m _ { b }$ ), where performing raw SVD and CCA would be computationally too expensive. This procedure can then be employed to compare different neural network representations and to determine how representations evolve over training iterations.
|
| 71 |
+
|
| 72 |
+
# 3 STOCHASTIC GRADIENT DESCENT WITH RESTARTS (SGDR)
|
| 73 |
+
|
| 74 |
+
Loshchilov & Hutter (2016) introduced SGDR as a modification to the common linear or step-wise decay of learning rates. The strategy decays learning rates along a cosine curve and then, at the end of the decay, restarts them to its initial value. The learning rate at the $t$ -th epoch in SGDR is given by the following expression in (1) where $\eta _ { m i n }$ and $\eta _ { m a x }$ are the lower and upper bounds respectively for the learning rate. $T _ { c u r }$ represents how many epochs have been performed since the last restart and a warm restart is simulated once $T _ { i }$ epochs are performed. Also $T _ { i } = T _ { m u l t } \times T _ { i - 1 }$ , meaning the period $T _ { i }$ for the learning rate variation is increased by a factor of $T _ { m u l t }$ after each restart.
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\eta _ { t } = \eta _ { m i n } + \frac { 1 } { 2 } \big ( \eta _ { m a x } - \eta _ { m i n } \big ) \left( 1 + \cos \left( \frac { T _ { c u r } } { T _ { i } } \pi \right) \right)
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
While the strategy has been claimed to outperform other learning rate schedulers, little is known why this has been the case. One explanation that has been given in support of SGDR is that it can be useful to deal with multi-modal functions, where the iterates could get stuck in a local optimum and a restart will help them get out of it and explore another region; however, Loshchilov & Hutter (2016) do not claim to observe any effect related to multi-modality. Huang et al. (2017) propose an ensembling strategy using the set of iterates before restarts and claim that, when using the learning rate annealing cycles, the optimization path converges to and escapes from several local minima. We empirically investigate if this is actually the case by interpolating the loss surface between parameters at different epochs and studying the training and validation loss for parameters on the hyperplane passing through2 the two modes found by SGDR and their connectivity. Further, by employing the CCA framework as described in Section 2.2, we investigate the progression of training, and the effect of restarts on the model activations.
|
| 81 |
+
|
| 82 |
+

|
| 83 |
+
Figure 2: (a) Validation accuracy of a VGG16 model trained on CIFAR-10 using SGDR with warm restarts simulated every $T _ { 0 } = 1 0$ epochs and $T _ { m u l t } = 2$ . (b) Cross-entropy training loss on the curve found through Mode Connectivity (MC Curve) and on the line segment (Line Seg.) joining modes $w _ { 3 0 }$ (model corresponding to parameters at the 30-th epoch of SGDR) and $w _ { 7 0 }$ , $w _ { 7 0 }$ and $w _ { 1 5 0 }$ , $w _ { 3 0 }$ and $w _ { 1 5 0 }$ . (c) Cross-entropy training loss on the curve found through Mode Connectivity (MC Curve) and on the line segment (Line Seg.) joining modes $w _ { 5 5 }$ (model corresponding to parameters at the 55-th epoch of SGD with step decay learning rate scheme) and $w _ { 6 5 }$ , $w _ { 1 4 5 }$ and $w _ { 1 5 5 }$ , $w _ { 5 5 }$ and $w _ { 1 5 5 }$ .
|
| 84 |
+
|
| 85 |
+
We train a VGG-16 network (Simonyan & Zisserman, 2014) on the CIFAR-10 dataset using SGDR. For our experiments, we choose $T _ { 0 } = 1 0$ epochs and $T _ { m u l t } = 2$ (warm restarts simulated every 10 epochs and the period $T _ { i }$ doubled at every new warm restart), $\eta _ { m a x } = 0 . 0 5$ and $\eta _ { m i n } = 1 0 ^ { - 6 }$ . We also perform VGG training using SGD (with momentum of 0.9) and a step decay learning rate scheme (initial learning rate of $\eta _ { 0 } = 0 . 0 5$ , scaled by 5 at epochs 60 and 150). Figure 2(a) shows the validation accuracy over training epochs with these two learning rate schemes.
|
| 86 |
+
|
| 87 |
+
In order to understand the loss landscape on the optimization path of SGDR, the pairs of iterates obtained just before the restarts $\{ w _ { 3 0 } , w _ { 7 0 } \} , \{ w _ { 7 0 } , w _ { 1 5 0 } \}$ and $\{ w _ { 3 0 } , w _ { 1 5 0 } \}$ are given as inputs to the mode connectivity algorithm, where $w _ { n }$ is the model corresponding to parameters at the $n$ -th epoch of training. Figure 2(b) shows the training loss for models along the line segment joining these pairs and those on the curve found through mode connectivity. For the baseline case of SGD training, we connect the iterates around the epochs when we decrease our learning rate in the step decay learning rate scheme. Thus, we chose $\{ w _ { 5 5 } , w _ { 6 5 } \}$ , $\{ w _ { 1 4 5 } , w _ { 1 6 5 } \}$ and $\{ w _ { 5 5 } , w _ { 1 6 5 } \}$ as input pairs to the mode connectivity algorithm. Figure 2(c) shows the training loss for models along the line segments joining these pairs and the curves found through mode connectivity.
|
| 88 |
+
|
| 89 |
+

|
| 90 |
+
Figure 3: (a) Training loss surface and (b) validation loss surface, log scales, for points on the plane defined by $\{ w _ { 7 0 } , w _ { 1 5 0 } , w _ { 7 0 - 1 5 0 } \}$ including projections of the SGDR iterates on this hyperplane. A curve of a given color represents a contour line, with the log-loss (lower being better) corresponding to this contour shown in the same color.
|
| 91 |
+
|
| 92 |
+
From Figure 2(b), it is clear that for the pairs $\{ w _ { 3 0 } , w _ { 1 5 0 } \}$ and $\{ w _ { 7 0 } , w _ { 1 5 0 } \}$ the training loss for points on segment is much higher than the endpoints suggesting that SGDR indeed finds paths that move over a barrier3 in the training loss landscape. In contrast, for SGD (without restarts) in Figure 2(c) none of the three pairs show evidence of having a training loss barrier on the line segment joining them. Instead there seems to be an almost linear decrease of training loss along the direction of these line segments, suggesting that SGD’s trajectory is quite different from SGDR’s. We present additional experiments, including results for other metrics, in Appendix 8.
|
| 93 |
+
|
| 94 |
+
To further understand the SGDR trajectory, we evaluate the intermediate points on the hyperplane in the $D$ -dimensional space defined by the three points: $w _ { 7 0 }$ , $w _ { 1 5 0 }$ and $w _ { 7 0 - 1 5 0 }$ , where $w _ { 7 0 - 1 5 0 }$ is the bend point that defines the high accuracy connection for the pair $\{ w _ { 7 0 } , w _ { 1 5 0 } \}$ . Figures 3(a) and 3(b) show the training and validation loss surface for points in this subspace, respectively. Note that the intermediate iterates do not necessarily lie in this plane, and thus are projected. We refer the reader to Appendix 8 for additional details on the projection, and analogous results with $w _ { 3 0 }$ and $w _ { 7 0 }$ . Results for the VGG-16 architecture with batch-normalization are also presented in Appendix 8.4.
|
| 95 |
+
|
| 96 |
+
Figure 3(a) suggests that SGDR helps the iterates converge to a different region although neither of $w _ { 7 0 }$ or $w _ { 1 5 0 }$ are technically a local minimum, nor do they appear to be lying in different basins, hinting that Huang et al. (2017)’s claims about SGDR converging to and escaping from local minima might be an oversimplification.4 Another insight we can draw from Figure 3(a) is that the path found by mode connectivity corresponds to lower training loss than the loss at the iterates that SGDR converges to $( \mathcal { L } ( w _ { 1 5 0 } ) > \mathcal { L } ( w _ { 7 0 - 1 5 0 } ) )$ . However, Figure 3(b) shows that models on this curve seem to overfit and not generalize as well as the iterates $w _ { 7 0 }$ and $w _ { 1 5 0 }$ . Thus, although gathering models from this connecting curve might seem as a novel and computationally cheap way of creating ensembles, this generalization gap alludes to one limitation in doing so; Garipov et al. (2018) point to other shortcomings of curve ensembling in their original work. In Figure 3, the region of the plane between the iterates $w _ { 7 0 }$ and $w _ { 1 5 0 }$ corresponds to higher training loss but lower validation loss than the two iterates. This hints at a reason why averaging iterates to improve generalization using cyclic or constant learning rates (Izmailov et al., 2018) has been found to work well.
|
| 97 |
+
|
| 98 |
+
Finally, in Figure 14 in Appendix 9, we present the CCA similarity plots for two pairs of models: epochs 10 and 150 (model at the beginning and end of training), and epochs 150 and 155 (model just before and just after a restart). For standard SGD training, Raghu et al. (2017) observe that the activations of the shallower layers bear closer resemblance than the deeper layers between a partially and fully trained network from a given training run. For SGDR training, we witness similar results (discussed in Appendix 9), meaning that the representational similarities between the network layers at the beginning and end of training are alike for SGDR and SGD, even though restarts lead to a trajectory that tends to cross over barriers.
|
| 99 |
+
|
| 100 |
+
# 4 WARMUP LEARNING RATE SCHEME
|
| 101 |
+
|
| 102 |
+
Learning rate warmup is a common heuristic used by many practitioners for training deep neural nets for computer vision (Goyal et al., 2017) and natural language processing (Bogoychev et al., 2018; Vaswani et al., 2017) tasks. Theoretically, it can be shown that the learning dynamics of SGD rely on the ratio of the batch size and learning rate (Smith et al., 2017; Jastrzebski et al., 2017; Hoffer et al., 2017). And hence, an increase in batch size over a baseline requires an accompanying increase in learning rate for comparable training. However, in cases when the batch size is increased significantly, the curvature of the loss function typically does not support a proportional increase in the learning rate. Warmup is hence motivated as a means to use large learning rates without causing training instability. We particularly focus on the importance of the learning rate schedule’s warmup phase in the large batch (LB) training of deep convolutional neural networks as discussed in Goyal et al. (2017). Their work adopts a linear scaling rule for adjusting the learning rate as a function of the minibatch size, to enable large-batch training. The question we aim to investigate here is: How does learning rate warmup impact different layers of the network?
|
| 103 |
+
|
| 104 |
+

|
| 105 |
+
Figure 4: (a) Validation accuracy and (b) Learning rate for the three training setups (c) CCA similarity for $i$ -th layer from two different iterations (0-th (before warmup) and 200-th (after warmup) during training (d) Comparing warmup and FC freezing strategies on VGG11 training
|
| 106 |
+
|
| 107 |
+

|
| 108 |
+
Figure 5: CCA similarity output plots for (a) SB no warmup, (b) LB no warmup, (c, d) $\mathrm { ~ L B ~ } +$ warmup training. The $i , j$ -th cell represents the CCA similarity between layer $i$ of the first model, and layer $j$ of other. A higher score implies that the layers are more similar (lighter color).
|
| 109 |
+
|
| 110 |
+
Using CCA as a tool to study the learning dynamics of neural networks through training iterations, we investigate the differences and similarities for the following 3 training configurations - (a) large batch training with warmup $\mathrm { L B } +$ warmup), (b) large batch training without warmup (LB no warmup) and (c) small batch training without warmup (SB no warmup). We train a VGG-11 architecture on the CIFAR-10 (Krizhevsky et al., 2014) dataset using SGD with momentum of 0.9. Learning rate for the small batch case (batch-size of 100) is set to 0.05, and for the large batch cases (batch-size of 5000) is set to 2.5 as per the scaling rule. For the warmup, we increase the learning rate from 0 to 2.5 over the first 200 iterations. Subsequently, we decrease the learning rate as per the step decay schedule for all runs, scaling it down by a factor of 10 at epochs 60, 120 and 150. We plot the learning rate and validation accuracy for these 3 cases in Figure 4(b) and (a).
|
| 111 |
+
|
| 112 |
+
Using CCA and denoting the model at the $j$ -th iteration of a training setup by $i t e r _ { j }$ , we compare activation layers from $i t e r _ { 0 }$ (init.) and $i t e r _ { 2 0 0 }$ (end of warmup) for each of the three runs, presented in Figures 5(a), (b) and (c), and also layers from iter200 (end of warmup) and iter2990 (end of training) for the $\mathrm { L B } +$ warmup case, presented in Figure 5(d). Figure 4(c) plots the similarity for layer $i$ of $i t e r _ { a }$ with the same layer of $i t e r _ { b }$ (this corresponds to diagonal elements of the matrices in Figure 5) for these three setups.
|
| 113 |
+
|
| 114 |
+
An evident pattern in Figures 5(a), (b) and (c) is the increase in similarity for the last few layers (stack of fully-connected layers) for the LB $^ +$ warmup and SB cases, which is absent in the LB without warmup case. This suggests that when used with the large batch size and learning rate, warmup tends to avoid unstably large changes in the fully-connected (FC) stack for this network configuration. To validate this proposition, we train using the LB without warmup setup, but freezing the fully-connected stack for the first 20 epochs5 (LB no warmup $+ \operatorname { F C }$ freeze). Figure 4(d) shows the validation accuracy for this training run in comparison to the three training setups discussed before. The performance is comparable at the end of warmup by freezing the FC stack, suggesting the validity our proposition in this case. We refer the reader to Appendix 10 for analogous results for ResNet-18 and ResNet-32 (He et al., 2016); thus also demonstrating the generality of our claim. Finally, note from Figure 4(d) that no qualitative difference exists in the trajectory beyond the warmup when compared to the standard training approach (Raghu et al., 2017).
|
| 115 |
+
|
| 116 |
+

|
| 117 |
+
Figure 6: CCA similarity between $S _ { \mathrm { d i s t i l l e d } } - T$ , $S _ { \mathrm { i n d e p . } } \cdot T$ , and their difference. $i , j$ -th cell of the differencnetwork l, represents denotes th $| \mathbf { C C A } ( l _ { T } ^ { i } , l _ { S _ { \mathrm { d i s t i l l e d } } } ^ { j } ) - \mathbf { C C A } ( l _ { T } ^ { i } , l _ { S _ { \mathrm { i n d e p . } } } ^ { j } ) |$ where is the s $l _ { M } ^ { i }$ denotes the ent network $i$ -th layer ofained using $M$ $T$ $S _ { \mathrm { d i s t i l l e d } }$ distillation and $S _ { \mathrm { i n d e p . } }$ . is the student network trained using hard training labels.
|
| 118 |
+
|
| 119 |
+
# 5 KNOWLEDGE DISTILLATION
|
| 120 |
+
|
| 121 |
+
We study knowledge distillation as proposed by Hinton et al. (2015) using CCA to measure representational similarity between layers of the teacher and student model. Distillation involves training a “student” model using the output probability distribution of a “teacher” model. This has been widely known to help the student model perform better than it would, if it were trained using hard labels due to knowledge transfer from the teacher model. The reason often quoted for the success of distillation is the transfer of dark knowledge from the teacher to the student (Hinton et al., 2015), and more recently, as an interpretation of importance weighing (Furlanello et al., 2018). We investigate if this knowledge transfer is limited to certain parts of the network, and if representational similarity between layers of the student and teacher model and a student can help answer this question.
|
| 122 |
+
|
| 123 |
+
To construct an example of distillation that can be used for our analysis, we use a VGG-16 model (Simonyan & Zisserman, 2014) as our teacher network and a shallow convolutional network ([conv, maxpool, relu] $_ { \textrm { x 2 } }$ , fc, relu, fc, fc, softmax) as the student network. We train the shallow network for CIFAR-10 using the teacher’s predicted probability distribution (softened using a temperature of 5), $( S _ { \mathrm { d i s t i l l e d } } )$ , and for the baseline, train another instance of the same model in a standard way using hard labels, $( S _ { \mathrm { i n d e p . } } )$ . Over 5 runs for each of the two setups, we find the distillation training attains the best validation accuracy at $8 5 . 1 8 \%$ while standard training attains its best at $8 3 . 0 1 \%$ . We compare their layer-wise representations with those of the teacher network $( T )$ .
|
| 124 |
+
|
| 125 |
+
Figure 6 shows the CCA plots and the absolute value of their difference. The scores of these two pairs are quite similar for the shallow layers of the student network relative to the deeper layers, suggesting that the difference that knowledge distillation brings to the training of smaller networks is restricted to the deeper layers (fc stack). Similar results are obtained through different configurations for the student and teacher when the student benefits from the teacher’s knowledge. We hypothesize that the dark knowledge transferred by the teacher is localized majorly in the deeper (discriminative) layers, and less so in the feature extraction layers. We also note that this is not dissimilar to the hypothesis of Furlanello et al. (2018), and also relates ot the results from the literature on fine-tuning or transfer learning (Goodfellow et al., 2016; Yosinski et al., 2014; Howard & Ruder, 2018) which suggest training of only higher layers.
|
| 126 |
+
|
| 127 |
+
# 6 DISCUSSION AND CONCLUSION
|
| 128 |
+
|
| 129 |
+
Heuristics have played an important role in accelerating progress of deep learning. Founded in empirical experience, intuition and observations, many of these strategies are now commonplace in architectures. In the absence of strong theoretical guarantees, controlled experiments aimed at explaining the the efficacy of these strategies can aid our understanding of deep learning and the training dynamics. The primary goal of our work was the investigation of three such heuristics using sophisticated tools for landscape analysis. Specifically, we investigate cosine annealing, learning rate warmup, and knowledge distillation. For this purpose, we employ recently proposed tools of mode connectivity and CCA. Our empirical analysis sheds light on these heuristics and suggests that: (a) the reasons often quoted for the success of cosine annealing are not evidenced in practice; (b) that the effect of learning rate warmup is to prevent the deeper layers from creating training instability; and (c) that the latent knowledge shared by the teacher is primarily disbursed in the deeper layers.
|
| 130 |
+
|
| 131 |
+
Inadvertently, our investigation also leads to the design of new heuristics for practically improving the training process. Through our results on SGDR, we provide additional evidence for the success of averaging schemes in this context. Given the empirical results suggesting the localization of the knowledge transfer between teacher and student in the process of distillation, a heuristic can be designed that only trains portions of the (pre-trained) student networks instead of the whole network. For instance, recent results on self-distillation (Furlanello et al., 2018) show improved performance via multiple generations of knowledge distillation for the same model. Given our results, computational costs of subsequent generations can be reduced if only subsets of the model are trained, instead of training the entire model. Finally, the freezing of weights instead of employing learning rate warmup allows for comparable training performance but with reduced computation during the warmup phase. We note in passing that our result also ties in with results of Hoffer et al. (2018) who suggest not training the classifier at all with negligible loss in performance. Our empirical experiments and hypotheses open new questions and encourage a deeper exploration into improving and better understanding these heuristics.
|
| 132 |
+
|
| 133 |
+
# REFERENCES
|
| 134 |
+
|
| 135 |
+
Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.
|
| 136 |
+
David Balduzzi, Marcus Frean, Lennox Leary, JP Lewis, Kurt Wan-Duo Ma, and Brian McWilliams. The shattered gradients problem: If resnets are the answer, then what is the question? arXiv preprint arXiv:1702.08591, 2017.
|
| 137 |
+
Nikolay Bogoychev, Marcin Junczys-Dowmunt, Kenneth Heafield, and Alham Fikri Aji. Accelerating asynchronous stochastic gradient descent for neural machine translation. arXiv preprint arXiv:1808.08859, 2018.
|
| 138 |
+
Cody Coleman, Daniel Kang, Deepak Narayanan, Luigi Nardi, Tian Zhao, Jian Zhang, Peter Bailis, Kunle Olukotun, Chris Re, and Matei Zaharia. Analysis of dawnbench, a time-to-accuracy machine learning performance benchmark. arXiv preprint arXiv:1806.01427, 2018.
|
| 139 |
+
Laurent Dinh, Razvan Pascanu, Samy Bengio, and Yoshua Bengio. Sharp minima can generalize for deep nets. arXiv preprint arXiv:1703.04933, 2017.
|
| 140 |
+
Felix Draxler, Kambis Veschgini, Manfred Salmhofer, and Fred A Hamprecht. Essentially no barriers in neural network energy landscape. arXiv preprint arXiv:1803.00885, 2018.
|
| 141 |
+
Tommaso Furlanello, Zachary C Lipton, Michael Tschannen, Laurent Itti, and Anima Anandkumar. Born again neural networks. arXiv preprint arXiv:1805.04770, 2018.
|
| 142 |
+
Timur Garipov, Pavel Izmailov, Dmitrii Podoprikhin, Dmitry P Vetrov, and Andrew Gordon Wilson. Loss surfaces, mode connectivity, and fast ensembling of dnns. arXiv preprint arXiv:1802.10026, 2018.
|
| 143 |
+
Ian Goodfellow, Yoshua Bengio, Aaron Courville, and Yoshua Bengio. Deep learning, volume 1. MIT Press, 2016.
|
| 144 |
+
Priya Goyal, Piotr Dollar, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, An- ´ drew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch sgd: training imagenet in 1 hour. arXiv preprint arXiv:1706.02677, 2017.
|
| 145 |
+
|
| 146 |
+
Moritz Hardt and Tengyu Ma. Identity matters in deep learning. arXiv preprint arXiv:1611.04231, 2016.
|
| 147 |
+
|
| 148 |
+
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.
|
| 149 |
+
|
| 150 |
+
Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, Gunter Klambauer, and ¨ Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a nash equilibrium. arXiv preprint arXiv:1706.08500, 2017.
|
| 151 |
+
|
| 152 |
+
Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015.
|
| 153 |
+
|
| 154 |
+
Elad Hoffer, Itay Hubara, and Daniel Soudry. Train longer, generalize better: closing the generalization gap in large batch training of neural networks. In Advances in Neural Information Processing Systems, pp. 1731–1741, 2017.
|
| 155 |
+
|
| 156 |
+
Elad Hoffer, Itay Hubara, and Daniel Soudry. Fix your classifier: the marginal value of training the last weight layer. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ S1Dh8Tg0-.
|
| 157 |
+
|
| 158 |
+
Harold Hotelling. Relations between two sets of variates. Biometrika, 28(3/4):321–377, 1936.
|
| 159 |
+
|
| 160 |
+
Jeremy Howard and Sebastian Ruder. Universal language model fine-tuning for text classification. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), volume 1, pp. 328–339, 2018.
|
| 161 |
+
|
| 162 |
+
Gao Huang, Yixuan Li, Geoff Pleiss, Zhuang Liu, John E Hopcroft, and Kilian Q Weinberger. Snapshot ensembles: Train 1, get m for free. arXiv preprint arXiv:1704.00109, 2017.
|
| 163 |
+
|
| 164 |
+
Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015.
|
| 165 |
+
|
| 166 |
+
Pavel Izmailov, Dmitrii Podoprikhin, Timur Garipov, Dmitry Vetrov, and Andrew Gordon Wilson. Averaging weights leads to wider optima and better generalization. arXiv preprint arXiv:1803.05407, 2018.
|
| 167 |
+
|
| 168 |
+
Stanisław Jastrzebski, Zachary Kenton, Devansh Arpit, Nicolas Ballas, Asja Fischer, Yoshua Bengio, and Amos Storkey. Three factors influencing minima in sgd. arXiv preprint arXiv:1711.04623, 2017.
|
| 169 |
+
|
| 170 |
+
Nitish Shirish Keskar, Dheevatsa Mudigere, Jorge Nocedal, Mikhail Smelyanskiy, and Ping Tak Peter Tang. On large-batch training for deep learning: Generalization gap and sharp minima. arXiv preprint arXiv:1609.04836, 2016.
|
| 171 |
+
|
| 172 |
+
Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. The cifar-10 dataset. online: http://www. cs. toronto. edu/kriz/cifar. html, 2014.
|
| 173 |
+
|
| 174 |
+
Hao Li, Zheng Xu, Gavin Taylor, and Tom Goldstein. Visualizing the loss landscape of neural nets. arXiv preprint arXiv:1712.09913, 2017.
|
| 175 |
+
|
| 176 |
+
Yixuan Li, Jason Yosinski, Jeff Clune, Hod Lipson, and John E Hopcroft. Convergent learning: Do different neural networks learn the same representations? In FE@ NIPS, pp. 196–212, 2015.
|
| 177 |
+
|
| 178 |
+
Ilya Loshchilov and Frank Hutter. Sgdr: stochastic gradient descent with restarts. arXiv preprint arXiv:1608.03983, 2016.
|
| 179 |
+
|
| 180 |
+
Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 9(Nov):2579–2605, 2008.
|
| 181 |
+
|
| 182 |
+
Tomaso Poggio and Qianli Liao. Theory ii: Landscape of the empirical risk in deep learning. PhD thesis, Center for Brains, Minds and Machines (CBMM), arXiv, 2017.
|
| 183 |
+
|
| 184 |
+
Maithra Raghu, Justin Gilmer, Jason Yosinski, and Jascha Sohl-Dickstein. Svcca: Singular vector canonical correlation analysis for deep learning dynamics and interpretability. In Advances in Neural Information Processing Systems, pp. 6076–6085, 2017.
|
| 185 |
+
|
| 186 |
+
Levent Sagun, Utku Evci, V Ugur Guney, Yann Dauphin, and Leon Bottou. Empirical analysis of the hessian of over-parametrized neural networks. arXiv preprint arXiv:1706.04454, 2017.
|
| 187 |
+
|
| 188 |
+
Shibani Santurkar, Dimitris Tsipras, Andrew Ilyas, and Aleksander Madry. How does batch normalization help optimization?(no, it is not about internal covariate shift). arXiv preprint arXiv:1805.11604, 2018.
|
| 189 |
+
|
| 190 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
|
| 191 |
+
|
| 192 |
+
Leslie N Smith. Cyclical learning rates for training neural networks. In Applications of Computer Vision (WACV), 2017 IEEE Winter Conference on, pp. 464–472. IEEE, 2017.
|
| 193 |
+
|
| 194 |
+
Samuel L Smith, Pieter-Jan Kindermans, and Quoc V Le. Don’t decay the learning rate, increase the batch size. arXiv preprint arXiv:1711.00489, 2017.
|
| 195 |
+
|
| 196 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, pp. 5998–6008, 2017.
|
| 197 |
+
|
| 198 |
+
Ashia C Wilson, Rebecca Roelofs, Mitchell Stern, Nati Srebro, and Benjamin Recht. The marginal value of adaptive gradient methods in machine learning. In Advances in Neural Information Processing Systems, pp. 4151–4161, 2017.
|
| 199 |
+
|
| 200 |
+
Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? In Advances in neural information processing systems, pp. 3320–3328, 2014.
|
| 201 |
+
|
| 202 |
+

|
| 203 |
+
Figure 7: Validation loss corresponding to models on the 6 different curves
|
| 204 |
+
|
| 205 |
+

|
| 206 |
+
Figure 8: Training accuracy corresponding to models on the 6 different curves
|
| 207 |
+
|
| 208 |
+
# APPENDIX
|
| 209 |
+
|
| 210 |
+
# 7 ADDITIONAL RESULTS ON ROBUSTNESS OF MC
|
| 211 |
+
|
| 212 |
+
# 7.1 TRAINING DETAILS
|
| 213 |
+
|
| 214 |
+
The learning rate is initialized to 0.05 and scaled down by a factor of 5 at epochs $\{ 6 0 , 1 2 0 , 1 6 0 \}$ (step decay). We use a training batch size of 100, momentum of 0.9, and a weight decay of 0.0005. Elements of the weight vector corresponding to a neuron are initialized randomly from the normal distribution ${ \mathcal { N } } ( 0 , { \sqrt { 2 / n } } )$ where $n$ is the number of inputs to the neuron. We also use data augmentation by random cropping of input images.
|
| 215 |
+
|
| 216 |
+
# 7.2 PLOTS
|
| 217 |
+
|
| 218 |
+
Figures 7, 8 and 9 show the Validation Loss, Training Accuracy and Training Loss respectively for the curves joining the 6 pairs discussed in Section 2.1.1. These results too, confirm the overfitting or poor generalization tendency of models on the curve.
|
| 219 |
+
|
| 220 |
+
# 7.3 T-SNE VISUALIZATION FOR THE 7 MODES
|
| 221 |
+
|
| 222 |
+
We use t-SNE (Maaten & Hinton, 2008) to visualize these 7 modes and the $\theta$ points that define the connectivity for the 6 pairs presented in Section 2.1.1, in a 2-dimensional plot in Figure 10. Since tSNE is known to map only local information correctly and not preserve global distances, we caution the reader about the limited interpretability of this visualization, it is presented simply to establish the notion of connected modes.
|
| 223 |
+
|
| 224 |
+

|
| 225 |
+
Figure 9: Training loss corresponding to models on the 6 different curves.
|
| 226 |
+
|
| 227 |
+

|
| 228 |
+
Figure 10: Representing the modes and their connecting point using t-SNE
|
| 229 |
+
|
| 230 |
+
# 8 ADDITIONAL SGDR RESULTS
|
| 231 |
+
|
| 232 |
+
8.1 ADDITIONAL RESULTS
|
| 233 |
+
|
| 234 |
+
For completeness, in Figure 11, we present the Validation loss, Validation accuracy and Training accuracy results for the curves and line segments joining iterates from SGDR and SGDR discussed in Figure 2(c) and (d).
|
| 235 |
+
|
| 236 |
+
# 8.2 PROJECTING ITERATES
|
| 237 |
+
|
| 238 |
+
The $W _ { n }$ in Figure 3 is equivalent to
|
| 239 |
+
|
| 240 |
+
$$
|
| 241 |
+
W _ { n } = P _ { c } ( w _ { n } ) = { \lambda ^ { \star } } ^ { \top } \left[ \begin{array} { c } { w _ { 7 0 } } \\ { w _ { 1 5 0 } } \\ { \theta } \end{array} \right]
|
| 242 |
+
$$
|
| 243 |
+
|
| 244 |
+
$$
|
| 245 |
+
\begin{array} { r } { \mathrm { w h e r e \ } \lambda ^ { \star } = \operatorname * { a r g m i n } _ { \lambda \in \mathbb { R } ^ { 3 } } \| \lambda ^ { \top } \left[ { \boldsymbol w } _ { 1 5 0 } ^ { w _ { 7 0 } } \right] - w _ { n } \| _ { 2 } ^ { 2 } } \end{array}
|
| 246 |
+
$$
|
| 247 |
+
|
| 248 |
+
meaning it is the point on the plane (linear combination of $w _ { 7 0 } , w _ { 1 5 0 }$ and $\theta$ ) with the least l-2 distance from the original point (iterate in this case).
|
| 249 |
+
|
| 250 |
+
# 8.3 CONNECTING MODES $w _ { 3 0 }$ AND $w _ { 7 0 }$ FROM SGDR
|
| 251 |
+
|
| 252 |
+
In Section 3, we present some experiments and make observations on the trajectory of SGDR by using the plane defined by the points $w _ { 7 0 }$ , $w _ { 1 5 0 }$ and $w _ { 7 0 - 1 5 0 }$ . Here we plot the Training loss and Validation loss surface in Figure 12 for another plane defined by SGDR’s iterates $w _ { 3 0 } , w _ { 7 0 }$ and their connection $w _ { 3 0 - 7 0 }$ to ensure the reader that the observations made are general enough.
|
| 253 |
+
|
| 254 |
+
# 8.4 RESULTS FOR VGG-16 WITH BATCH NORMALIZATION
|
| 255 |
+
|
| 256 |
+
The VGG-16 architecture used in Section 3 does not include Batch Normalization, which has been known to alter properties of the loss surface (Santurkar et al. (2018)). Therefore we train VGG16 with Batch Normalization using SGDR to verify if our observations hold for this case too. As pointed out in Appendix A.2 of Garipov et al. (2018), at the test stage, we compute the Batch Normalization statistics for a network on the curve with an additional pass over the data, since these are not collected during training. Except Batch Normalization, other training parameters are kept the same as discussed for Section 3.
|
| 257 |
+
|
| 258 |
+
Figure 13(a) shows the training loss for models along the line segment and MC curve joining the pair of iterates from SGDR. For the two pairs $\{ w _ { 3 0 } , w _ { 1 5 0 } \}$ and $\{ w _ { 7 0 } , w _ { 1 5 0 } \}$ , we again observe a higher training loss for models on the line segment, suggesting that for this setup too, SGDR finds paths that move over a barrier in the training loss landscape. We further evaluate the intermediate points on the hyperplane defined by $\{ w _ { 7 0 } , w _ { 1 5 0 } , w _ { 7 0 - 1 5 0 } \}$ and plot their training and validation loss in Figure 13(b) and (c) respectively. Our previous observations regarding (a) the iterates $w _ { 7 0 }$ and $w _ { 1 5 0 }$ not lying in different basins, (b) the MC-found $\theta$ or $w _ { 7 0 - 1 5 0 }$ generalizing poorly and (c) averaging of iterates improving generalization hold true here as well.
|
| 259 |
+
|
| 260 |
+

|
| 261 |
+
Figure 11: Left Column: Connecting iterates from SGD with step-decay learning rate scheme Right Column: Connecting iterates from SGDR Top Row: Training Accuracy on the curve found through Mode Connectivity (MC Curve) and on the line segment (Line Seg.) joining iterates from SGDR and SGD. Middle row: Validation Accuracy on the curve found through Mode Connectivity (MC Curve) and on the line segment (Line Seg.) joining iterates from SGDR and SGD. Bottom row Validation Loss on the curve found through Mode Connectivity (MC Curve) and on the line segment (Line Seg.) joining iterates from SGDR and SGD.
|
| 262 |
+
|
| 263 |
+

|
| 264 |
+
Figure 12: Training Loss (left) and Validation Loss (right) surface (log scale) for points on the plane defined by $\{ w _ { 3 0 } , w _ { 7 0 } , w _ { 3 0 - 7 0 } \}$ including projections of iterates on this plane
|
| 265 |
+
|
| 266 |
+

|
| 267 |
+
Figure 13: (a) Training loss for points on line segment and MC curve joining the pairs $w _ { 3 0 } - w _ { 7 0 }$ , $w _ { 3 0 } - w _ { 1 5 0 }$ and $w _ { 7 0 } - w _ { 1 5 0 }$ (b) Training loss surface (log scale) for points on the plane defined by $\{ w _ { 7 0 } , w _ { 1 5 0 } , w _ { 7 0 - 1 5 0 } \}$ including projections of iterates on this plane, (c) Validation Loss Surface (log scale) for points on the plane defined by $\{ w _ { 7 0 } , w _ { 1 5 0 } , w _ { 7 0 - 1 5 0 } \}$ including projections of iterates on this plane
|
| 268 |
+
|
| 269 |
+
# 9 SGDR CCA HEATMAPS
|
| 270 |
+
|
| 271 |
+
In Figure 14, we present the CCA similarity plots comparing two pairs of models: epochs 10 and 150, and epochs 150 and 155. The $( i , j ) ^ { t h }$ block of the matrix denotes the correlation between the $i ^ { t h }$ layer of the first model and the $j ^ { t h }$ layer of the other. A high correlation implies that the layers learn similar representations and vice versa. We present the former to compare against the typical stepwise or linear decay of SGD, and the latter to demonstrate the immediate effect of restarting on the model. Raghu et al. (2017) showed in their work that for typical SGD training, a CCA similarity plot between a partially and completed trained network reveals that the activations of the shallower layers bears closer resemblance in the two models than the deeper layers. We note that, despite the restart, a similar tendency is seen in SGDR training as well. This again suggests that the restart does not greatly impact the model, both in weights and representations, and especially so in the shallower layers. A comparison of epochs 150 and 155, i.e., before and after a restart also stands as evidence for this hypothesis.
|
| 272 |
+
|
| 273 |
+
# 10 WARMUP EXPERIMENTS ON RESNET-18 AND RESNET-32
|
| 274 |
+
|
| 275 |
+
In Figure 4(d), we show that the stability induced by warmup when training with large batches and learning rates can also be obtained by holding the FC stack frozen. This experiment was conducted on the VGG-11 network (Simonyan & Zisserman, 2014). To demonstrate the generality of our claim, we present additional experiments on two ResNet architectures: 18 and 32. The setup for this experiment is identical to the VGG-11 one with one change: instead of the learning rate being set to 2.5, which is the learning rate for SB (0.05) times the batch size increase $( 5 0 \times )$ , we set it to 5.0 since SB training is better with 0.1. For the warmup case, we linearly increase the learning rate from 0 to 5 again for 20 epochs. Experiments on other configurations yielded similar results. Whether these results remain true also for training larger datasets, such as ImageNet, remains to be shown and is a topic of future research.
|
| 276 |
+
|
| 277 |
+

|
| 278 |
+
Figure 14: CCA similarity scores between two pairs of models. (a) comparings models at epochs 150 and 155, (b) comparing models at epochs 10 and 150. The $i , j$ -th cell in each pane represents the CCA similarity between layer $i$ of $w _ { a }$ (model at epoch a) and layer $j$ of model $w _ { b }$ (model at epoch b).
|
| 279 |
+
|
| 280 |
+

|
| 281 |
+
Figure 15: Experiment comparing warmup and FC freezing strategies on ResNet architectures.
|
parse/train/r14EOsCqKX/r14EOsCqKX_content_list.json
ADDED
|
@@ -0,0 +1,1535 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
99,
|
| 9 |
+
823,
|
| 10 |
+
170
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Akhilesh Gotmare∗ \nDepartment of Computer Science EPFL, Switzerland \nakhilesh.gotmare@epfl.ch Nitish Shirish Keskar, Caiming Xiong & Richard Socher Salesforce Research \nPalo Alto, US \n{nkeskar, cxiong, rsocher}@salesforce.com ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
183,
|
| 19 |
+
195,
|
| 20 |
+
419,
|
| 21 |
+
251
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "",
|
| 28 |
+
"bbox": [
|
| 29 |
+
437,
|
| 30 |
+
195,
|
| 31 |
+
834,
|
| 32 |
+
252
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "ABSTRACT ",
|
| 39 |
+
"text_level": 1,
|
| 40 |
+
"bbox": [
|
| 41 |
+
454,
|
| 42 |
+
287,
|
| 43 |
+
544,
|
| 44 |
+
303
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "The convergence rate and final performance of common deep learning models have significantly benefited from heuristics such as learning rate schedules, knowledge distillation, skip connections, and normalization layers. In the absence of theoretical underpinnings, controlled experiments aimed at explaining these strategies can aid our understanding of deep learning landscapes and the training dynamics. Existing approaches for empirical analysis rely on tools of linear interpolation and visualizations with dimensionality reduction, each with their limitations. Instead, we revisit such analysis of heuristics through the lens of recently proposed methods for loss surface and representation analysis, viz., mode connectivity and canonical correlation analysis (CCA), and hypothesize reasons for the success of the heuristics. In particular, we explore knowledge distillation and learning rate heuristics of (cosine) restarts and warmup using mode connectivity and CCA. Our empirical analysis suggests that: (a) the reasons often quoted for the success of cosine annealing are not evidenced in practice; (b) that the effect of learning rate warmup is to prevent the deeper layers from creating training instability; and (c) that the latent knowledge shared by the teacher is primarily disbursed to the deeper layers. ",
|
| 51 |
+
"bbox": [
|
| 52 |
+
233,
|
| 53 |
+
319,
|
| 54 |
+
764,
|
| 55 |
+
555
|
| 56 |
+
],
|
| 57 |
+
"page_idx": 0
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "1 INTRODUCTION ",
|
| 62 |
+
"text_level": 1,
|
| 63 |
+
"bbox": [
|
| 64 |
+
176,
|
| 65 |
+
583,
|
| 66 |
+
336,
|
| 67 |
+
599
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "The introduction of heuristics such as normalization layers (Ioffe & Szegedy, 2015; Ba et al., 2016), residual connections (He et al., 2016), and learning rate strategies (Loshchilov & Hutter, 2016; Goyal et al., 2017; Smith, 2017) have greatly accelerated progress in Deep Learning. Many of these ingredients are now commonplace in modern architectures, and some of them have also been buttressed with theoretical guarantees (Balduzzi et al., 2017; Poggio & Liao, 2017; Hardt & Ma, 2016). However, despite their simplicity and efficacy, why some of these heuristics work is still relatively unknown. Existing attempts at explaining these strategies empirically have been limited to intuitive explanations and the use of tools such as spectrum analysis (Sagun et al., 2017), linear interpolation between two models and low-dimensional visualizations (Li et al., 2017) of the loss surface. In our work, we instead use recent tools built specifically for analyzing deep networks, viz., mode connectivity (Garipov et al., 2018) and singular value canonical correlation analysis (SVCCA) (Raghu et al., 2017). We investigate three strategies in detail: (a) cosine learning rate decay, (b) learning rate warmup, and (c) knowledge distillation, and list the summary of our contributions at the end of this section. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
616,
|
| 77 |
+
825,
|
| 78 |
+
809
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "Cosine annealing (Loshchilov & Hutter, 2016), also known as stochastic gradient descent with restarts (SGDR), and more generally cyclical learning rate strategies (Smith, 2017), have been recently proposed to accelerate training of deep networks (Coleman et al., 2018). The strategy involves reductions and restarts of learning rates over the course of training, and was motivated as means to escape spurious local minima. Experimental results have shown that SGDR often improves convergence both from the standpoint of iterations needed for convergence and the final objective. ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
816,
|
| 88 |
+
825,
|
| 89 |
+
900
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "Learning rate warmup (Goyal et al., 2017) also constitutes an important ingredient in training deep networks, especially in the presence of large or dynamic batch sizes. It involves increasing the learning rate to a large value over a certain number of training iterations followed by decreasing the learning rate, which can be performed using step-decay, exponential decay or other such schemes. The strategy was proposed out of the need to induce stability in the initial phase of training with large learning rates (due to large batch sizes). It has been employed in training of several architectures at scale including ResNets and Transformer networks (Vaswani et al., 2017). ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
174,
|
| 98 |
+
103,
|
| 99 |
+
825,
|
| 100 |
+
200
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 1
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "Further, we investigate knowledge distillation (KD) (Hinton et al., 2015). This strategy involves first training a (teacher) model on a typical loss function on the available data. Next, a different (student) model (typically much smaller than the teacher model) is trained, but instead of optimizing the loss function defined using hard data labels, this student model is trained to mimic the teacher model. It has been empirically found that a student network trained in this fashion significantly outperforms an identical network trained with the hard data labels. We defer a detailed discussion of the three heuristics, and existing explanations for their efficacy to sections 3, 4 and 5 respectively. ",
|
| 107 |
+
"bbox": [
|
| 108 |
+
174,
|
| 109 |
+
208,
|
| 110 |
+
825,
|
| 111 |
+
305
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 1
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "Finally, we briefly describe the tools we employ for analyzing the aforementioned heuristics. Mode connectivity (MC) is a recent observation that shows that, under circumstances, it is possible to connect any two local minima of deep networks via a piecewise-linear curve (Garipov et al., 2018; Draxler et al., 2018). This shows that local optima obtained through different means, and exhibiting different local and generalization properties, are connected. The authors propose an algorithm that locates such a curve. While not proposed as such, we employ this framework to better understand loss surfaces but begin our analysis in Section 2 by first establishing its robustness as a framework. ",
|
| 118 |
+
"bbox": [
|
| 119 |
+
174,
|
| 120 |
+
313,
|
| 121 |
+
825,
|
| 122 |
+
410
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 1
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "text",
|
| 128 |
+
"text": "Deep network analyses focusing on the weights of a network are inherently limited since there are several invariances in this, such as permutation and scaling. Recently, Raghu et al. (2017) propose using CCA along with some pre-processing steps to analyze the activations of networks, such that the resulting comparison is not dependent on permutations and scaling of neurons. They also prove the computational gains of using CCA over alternatives ((Li et al., 2015)) for representational analysis and employ it to better understand many phenomenon in deep learning. ",
|
| 129 |
+
"bbox": [
|
| 130 |
+
174,
|
| 131 |
+
416,
|
| 132 |
+
825,
|
| 133 |
+
501
|
| 134 |
+
],
|
| 135 |
+
"page_idx": 1
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"type": "text",
|
| 139 |
+
"text": "Contributions: ",
|
| 140 |
+
"text_level": 1,
|
| 141 |
+
"bbox": [
|
| 142 |
+
174,
|
| 143 |
+
517,
|
| 144 |
+
277,
|
| 145 |
+
531
|
| 146 |
+
],
|
| 147 |
+
"page_idx": 1
|
| 148 |
+
},
|
| 149 |
+
{
|
| 150 |
+
"type": "text",
|
| 151 |
+
"text": "• We use mode connectivity and CCA to improve understanding of cosine annealing, learning rate warmup and knowledge distillation. For mode connectivity, we also establish the robustness of the approach across changes in training choices for obtaining the modes. We demonstrate that the reasons often quoted for the success of cosine annealing are not substantiated by our experiments, and that the iterates move over barriers after restarts but the explanation of escaping local minima might be an oversimplification. \n• We show that learning rate warmup primarily limits weight changes in the deeper layers and that freezing them achieves similar outcomes as warmup. \n• We show that the latent knowledge shared by the teacher in knowledge distillation is primarily disbursed in the deeper layers. ",
|
| 152 |
+
"bbox": [
|
| 153 |
+
215,
|
| 154 |
+
544,
|
| 155 |
+
825,
|
| 156 |
+
700
|
| 157 |
+
],
|
| 158 |
+
"page_idx": 1
|
| 159 |
+
},
|
| 160 |
+
{
|
| 161 |
+
"type": "text",
|
| 162 |
+
"text": "2 EMPIRICAL TOOLS ",
|
| 163 |
+
"text_level": 1,
|
| 164 |
+
"bbox": [
|
| 165 |
+
176,
|
| 166 |
+
722,
|
| 167 |
+
361,
|
| 168 |
+
738
|
| 169 |
+
],
|
| 170 |
+
"page_idx": 1
|
| 171 |
+
},
|
| 172 |
+
{
|
| 173 |
+
"type": "text",
|
| 174 |
+
"text": "2.1 MODE CONNECTIVITY ",
|
| 175 |
+
"text_level": 1,
|
| 176 |
+
"bbox": [
|
| 177 |
+
176,
|
| 178 |
+
752,
|
| 179 |
+
372,
|
| 180 |
+
768
|
| 181 |
+
],
|
| 182 |
+
"page_idx": 1
|
| 183 |
+
},
|
| 184 |
+
{
|
| 185 |
+
"type": "text",
|
| 186 |
+
"text": "Garipov et al. (2018) introduce a framework, called mode connectivity, to obtain a low loss (or high accuracy, in the case of classification) curve of simple form, such as a piecewise linear curve, that connects optima (modes of the loss function) found independently. This observation suggests that points at the same loss function depth are connected, somewhat contrary to several empirical results claiming that minima are isolated or have barriers between them1. ",
|
| 187 |
+
"bbox": [
|
| 188 |
+
174,
|
| 189 |
+
780,
|
| 190 |
+
825,
|
| 191 |
+
849
|
| 192 |
+
],
|
| 193 |
+
"page_idx": 1
|
| 194 |
+
},
|
| 195 |
+
{
|
| 196 |
+
"type": "text",
|
| 197 |
+
"text": "Let $w _ { a } \\in \\mathbb { R } ^ { D }$ and $w _ { b } \\in \\mathbb { R } ^ { D }$ be two modes in the $D$ -dimensional parameter space obtained by optimizing a given loss function $\\mathcal { L } ( w )$ (like the cross-entropy loss). We represent a curve connecting $w _ { a }$ and $w _ { b }$ by $\\phi _ { \\theta } ( t ) : [ 0 , 1 ] \\to \\mathbb { R } ^ { D }$ , such that $\\phi _ { \\theta } ( 0 ) = w _ { a }$ and $\\phi _ { \\theta } ( 1 ) = w _ { b }$ . To find a low loss path, we find the set of parameters $\\theta \\in \\mathbb { R } ^ { D }$ that minimizes the following loss: $\\begin{array} { r } { \\ell ( \\theta ) = \\int _ { 0 } ^ { 1 } \\mathcal { L } ( \\phi _ { \\theta } ( t ) ) d t = } \\end{array}$ $\\mathbb { E } _ { t \\sim U ( 0 , 1 ) } \\mathcal { L } ( \\phi _ { \\theta } ( t ) )$ where $U ( 0 , 1 )$ is the uniform distribution in the interval $[ 0 , 1 ]$ . To optimize $\\ell ( \\theta )$ for $\\theta$ , we first need to chose a parametric form for $\\phi _ { \\theta } ( t )$ . One of the forms proposed by Garipov et al. (2018) is a polygonal chain with a single bend at $\\theta$ as follows ",
|
| 198 |
+
"bbox": [
|
| 199 |
+
176,
|
| 200 |
+
856,
|
| 201 |
+
821,
|
| 202 |
+
886
|
| 203 |
+
],
|
| 204 |
+
"page_idx": 1
|
| 205 |
+
},
|
| 206 |
+
{
|
| 207 |
+
"type": "image",
|
| 208 |
+
"img_path": "images/88464fa149c3a7071f20c1b90e7f35a1628fd88032ffb76a674780fc439e0db3.jpg",
|
| 209 |
+
"image_caption": [
|
| 210 |
+
"Figure 1: Validation accuracy corresponding to models on the following 6 different curves - curve $G A$ represents curve connecting mode $G$ (one found with default hyperparameters) and mode $A$ (using large batch size), similarly, curve $G B$ connects mode $G$ and mode $B$ (using Adam), curve $G C$ connects to mode $C$ (using linearly decaying learning rate), curve $G D$ to mode $D$ (with lesser L2 regularization), curve $G E$ to mode $E$ (using a poor initialization), and curve $G F$ to mode $F$ (without using data augmentation). $t = 0$ corresponds to mode $G$ for all plots. "
|
| 211 |
+
],
|
| 212 |
+
"image_footnote": [],
|
| 213 |
+
"bbox": [
|
| 214 |
+
174,
|
| 215 |
+
99,
|
| 216 |
+
825,
|
| 217 |
+
198
|
| 218 |
+
],
|
| 219 |
+
"page_idx": 2
|
| 220 |
+
},
|
| 221 |
+
{
|
| 222 |
+
"type": "text",
|
| 223 |
+
"text": "",
|
| 224 |
+
"bbox": [
|
| 225 |
+
173,
|
| 226 |
+
318,
|
| 227 |
+
825,
|
| 228 |
+
395
|
| 229 |
+
],
|
| 230 |
+
"page_idx": 2
|
| 231 |
+
},
|
| 232 |
+
{
|
| 233 |
+
"type": "equation",
|
| 234 |
+
"img_path": "images/8073a18ca47ef0323531f44babefa48e554aa41f7a4bc3563b66eb925635b328.jpg",
|
| 235 |
+
"text": "$$\n\\phi _ { \\theta } ( t ) = { \\left\\{ \\begin{array} { l l } { 2 ( t \\theta + ( 0 . 5 - t ) w _ { a } ) , } & { \\quad { \\mathrm { i f ~ } } 0 \\leq t \\leq 0 . 5 } \\\\ { 2 ( ( t - 0 . 5 ) w _ { b } + ( 1 - t ) \\theta ) } & { \\quad { \\mathrm { i f ~ } } 0 . 5 < t \\leq 1 } \\end{array} \\right. }\n$$",
|
| 236 |
+
"text_format": "latex",
|
| 237 |
+
"bbox": [
|
| 238 |
+
312,
|
| 239 |
+
401,
|
| 240 |
+
687,
|
| 241 |
+
438
|
| 242 |
+
],
|
| 243 |
+
"page_idx": 2
|
| 244 |
+
},
|
| 245 |
+
{
|
| 246 |
+
"type": "text",
|
| 247 |
+
"text": "To minimize $\\ell ( \\theta )$ , we sample $t \\sim U [ 0 , 1 ]$ at each iteration and use $\\nabla _ { \\theta } \\mathcal { L } ( \\phi _ { \\theta } ( t ) )$ as an unbiased estimate for the true gradient $\\nabla _ { { \\boldsymbol { \\theta } } } \\ell ( { \\boldsymbol { \\theta } } )$ to perform updates on $\\theta$ , where $\\theta$ is initialized with $\\frac { 1 } { 2 } \\left( w _ { a } + w _ { b } \\right)$ . ",
|
| 248 |
+
"bbox": [
|
| 249 |
+
173,
|
| 250 |
+
443,
|
| 251 |
+
823,
|
| 252 |
+
473
|
| 253 |
+
],
|
| 254 |
+
"page_idx": 2
|
| 255 |
+
},
|
| 256 |
+
{
|
| 257 |
+
"type": "text",
|
| 258 |
+
"text": "2.1.1 RESILIENCE OF MODE CONNECTIVITY ",
|
| 259 |
+
"text_level": 1,
|
| 260 |
+
"bbox": [
|
| 261 |
+
173,
|
| 262 |
+
486,
|
| 263 |
+
496,
|
| 264 |
+
501
|
| 265 |
+
],
|
| 266 |
+
"page_idx": 2
|
| 267 |
+
},
|
| 268 |
+
{
|
| 269 |
+
"type": "text",
|
| 270 |
+
"text": "To demonstrate that the curve-finding approach works in practice, Garipov et al. (2018) use two optima found using different initializations but a common training scheme which we detail below. We explore the limits of this procedure by connecting optima obtained from different training strategies. Our goal of this investigation is to first establish the robustness of the framework in order to seamlessly use it as a tool for analysis. In particular, we experiment with different initializations, optimizers, data augmentation choices, and hyperparameter settings including regularization, training batch sizes, and learning rate schemes. We note in passing that while the framework was proposed to connect two points in the parameter space that are at equal depth in the loss landscape, it is well-defined to also connect points at different depths; in this case, the path corresponds to one that minimizes the average loss along the curve. ",
|
| 271 |
+
"bbox": [
|
| 272 |
+
173,
|
| 273 |
+
510,
|
| 274 |
+
825,
|
| 275 |
+
650
|
| 276 |
+
],
|
| 277 |
+
"page_idx": 2
|
| 278 |
+
},
|
| 279 |
+
{
|
| 280 |
+
"type": "text",
|
| 281 |
+
"text": "Conventional wisdom suggests that the different training schemes mentioned above will converge to regions in the parameter space that are vastly different from each other. Examples of this include size of minibatches used during training (Keskar et al., 2016), choice of optimizer (Heusel et al., 2017; Wilson et al., 2017), initialization (Goodfellow et al., 2016) and choice of regularizer. Having a high accuracy connection between these pairs would seem counterintuitive. ",
|
| 282 |
+
"bbox": [
|
| 283 |
+
174,
|
| 284 |
+
656,
|
| 285 |
+
825,
|
| 286 |
+
727
|
| 287 |
+
],
|
| 288 |
+
"page_idx": 2
|
| 289 |
+
},
|
| 290 |
+
{
|
| 291 |
+
"type": "text",
|
| 292 |
+
"text": "For obtaining the reference model (named mode $G$ ), we train the VGG-16 model architecture (Simonyan & Zisserman, 2014) using CIFAR-10 training data (Krizhevsky et al., 2014) for 200 epochs with SGD. We then build 6 variants of the reference mode $G$ as follows: we obtain mode $A$ using a training batch size of 4000, mode $B$ by using the Adam optimizer instead of SGD, mode $C$ with a linearly decaying learning rate instead of the step decay used in mode $G$ , mode $D$ using a smaller weight decay of $5 \\times \\mathrm { 1 \\overline { { 0 } } ^ { - 6 } }$ , mode $E$ by increasing the variance of the initialization distribution to $3 { \\bar { \\times } } { \\sqrt { 2 / n } }$ and mode $F$ using no data augmentation. Note that for the set of modes $\\{ A , B , C , D , E , { \\dot { F } } \\}$ , all the other hyper-parameters and settings except the ones mentioned above are kept same as that for mode $G$ . We use the mode connectivity algorithm on each of the 6 pairs of modes including $G$ and another mode, resulting in curves $G A , G B , G C , G D , G E$ , and $G F$ . ",
|
| 293 |
+
"bbox": [
|
| 294 |
+
173,
|
| 295 |
+
733,
|
| 296 |
+
825,
|
| 297 |
+
875
|
| 298 |
+
],
|
| 299 |
+
"page_idx": 2
|
| 300 |
+
},
|
| 301 |
+
{
|
| 302 |
+
"type": "text",
|
| 303 |
+
"text": "Figure 1 shows the validation accuracy for models on each of the 6 connecting curves during the 20th, 40th, 60th and 80th epochs of the mode connectivity training procedure and also for models on the line segment joining the two endpoints (corresponding to the initialization for $\\theta$ at epoch ",
|
| 304 |
+
"bbox": [
|
| 305 |
+
174,
|
| 306 |
+
882,
|
| 307 |
+
823,
|
| 308 |
+
924
|
| 309 |
+
],
|
| 310 |
+
"page_idx": 2
|
| 311 |
+
},
|
| 312 |
+
{
|
| 313 |
+
"type": "text",
|
| 314 |
+
"text": "0). As described in Section 2.1, for a polychain curve $G X$ (connecting modes $G$ and $X$ using the curve described by $\\theta$ ), model parameters $\\phi _ { \\theta } ( t )$ on the curve are given by $p _ { \\phi _ { \\theta } ( t ) } = 2 ( t p _ { \\theta } + ( 0 . 5 -$ $t ) p _ { G } )$ if $0 \\leq t \\leq 0 . 5$ and $p _ { \\phi _ { \\theta } ( t ) } = 2 ( ( t - 0 . 5 ) p _ { X } + ( 1 - t ) p _ { \\theta } )$ if $0 . 5 < t \\leq 1$ where $p _ { G } , p _ { \\theta }$ and $p _ { X }$ are parameters of the models $G , \\theta .$ , and $X$ respectively. Thus $\\phi _ { \\theta } ( 0 ) = G$ and $\\phi _ { \\theta } ( 1 ) = X$ . ",
|
| 315 |
+
"bbox": [
|
| 316 |
+
174,
|
| 317 |
+
103,
|
| 318 |
+
823,
|
| 319 |
+
162
|
| 320 |
+
],
|
| 321 |
+
"page_idx": 3
|
| 322 |
+
},
|
| 323 |
+
{
|
| 324 |
+
"type": "text",
|
| 325 |
+
"text": "In a few epochs of the curve training, for all 6 pairs, we can find a curve such that each point on it generalizes almost as well as models from the pair that is being connected. Note that by virtue of existence of these 6 curves, there exists a high accuracy connecting curve (albeit with multiple bends) for each of the $\\binom { 7 } { 2 }$ pairs of modes. We refer the reader to Appendix 7 for a t-SNE plot of the modes and their connections, and also for additional plots and details. Having established the high likelihood of the existence of these curves, we use this procedure along with interpolation of the loss surface between parameters at different epochs as tools to analyze the dynamics of SGD and SGDR. ",
|
| 326 |
+
"bbox": [
|
| 327 |
+
173,
|
| 328 |
+
169,
|
| 329 |
+
825,
|
| 330 |
+
268
|
| 331 |
+
],
|
| 332 |
+
"page_idx": 3
|
| 333 |
+
},
|
| 334 |
+
{
|
| 335 |
+
"type": "text",
|
| 336 |
+
"text": "2.2 CCA FOR MEASURING REPRESENTATIONAL SIMILARITY ",
|
| 337 |
+
"text_level": 1,
|
| 338 |
+
"bbox": [
|
| 339 |
+
174,
|
| 340 |
+
285,
|
| 341 |
+
604,
|
| 342 |
+
299
|
| 343 |
+
],
|
| 344 |
+
"page_idx": 3
|
| 345 |
+
},
|
| 346 |
+
{
|
| 347 |
+
"type": "text",
|
| 348 |
+
"text": "Canonical correlation analysis (CCA) is a classical tool from multivariate statistics (Hotelling, 1936) that investigates the relationships between two sets of random variables. Raghu et al. (2017) have proposed coupling CCA with pre-processing steps like Singular Value Decomposition (SVD) or Discrete Fourier Transform (DFT) to design a similarity metric for two neural net layers that we want to compare. These layers do not have to be of the same size or belong to the same network. ",
|
| 349 |
+
"bbox": [
|
| 350 |
+
174,
|
| 351 |
+
310,
|
| 352 |
+
825,
|
| 353 |
+
381
|
| 354 |
+
],
|
| 355 |
+
"page_idx": 3
|
| 356 |
+
},
|
| 357 |
+
{
|
| 358 |
+
"type": "text",
|
| 359 |
+
"text": "Given a dataset with $m$ examples $X = \\{ x _ { 1 } , \\ldots x _ { m } \\}$ , we denote the scalar output of the neuron $z _ { i } ^ { l }$ $i$ -th neuron of layer $l$ ) for the input $x _ { i }$ by $f _ { z _ { i } ^ { L } } ( x _ { i } )$ . These scalar outputs can be stacked (along $n$ different neurons and $m$ different datapoints) to create a matrix $\\boldsymbol { L } \\in \\mathbb { R } ^ { m \\times n }$ representing the output of a layer corresponding to the entire dataset. This choice of comparing neural network layers using activations instead of weights and biases is crucial to the setup proposed. Indeed, invariances due to re-parameterizations and permutations limit the interpretability of the model weights (Dinh et al., 2017). However, under CCA of the layers, two activation sets are comparable by design. ",
|
| 360 |
+
"bbox": [
|
| 361 |
+
174,
|
| 362 |
+
387,
|
| 363 |
+
825,
|
| 364 |
+
488
|
| 365 |
+
],
|
| 366 |
+
"page_idx": 3
|
| 367 |
+
},
|
| 368 |
+
{
|
| 369 |
+
"type": "text",
|
| 370 |
+
"text": "Given representations corresponding to two layers $L _ { a } \\in \\mathbb { R } ^ { m _ { a } \\times n }$ and $L _ { b } \\in \\mathbb { R } ^ { m _ { b } \\times n }$ , SVCCA first performs dimensionality reduction using SVD to obtain $L _ { a } ^ { ' } \\ \\in \\ \\mathbb { R } ^ { m _ { a } ^ { \\prime } \\times n }$ and $L _ { b } ^ { ' } \\ \\in \\ \\mathbb { R } ^ { m _ { b } ^ { \\prime } \\times n }$ while preserving $9 9 \\%$ of the variance. The subsequent CCA step involves transforming $L _ { a } ^ { ' }$ and $L _ { b } ^ { ' }$ to $a _ { 1 } ^ { \\top } L _ { a } ^ { ' }$ and $b _ { 1 } ^ { \\top } L _ { b } ^ { ' }$ respectively where $\\{ a _ { 1 } , b _ { 1 } \\}$ is found by maximizing the correlation between the transformed subspaces, and the corresponding correlation is denoted by $\\rho _ { 1 }$ . This process continues, using orthogonality constraints, till $c = \\mathrm { m i n } \\{ m _ { a } ^ { ' } , m _ { b } ^ { ' } \\}$ leading to the set of correlation values $\\{ \\rho _ { 1 } , \\rho _ { 2 } \\ldots \\rho _ { c } \\}$ corresponding to $c$ pairs of canonical variables $\\{ \\{ a _ { 1 } , b _ { 1 } \\} , \\{ a _ { 2 } , b _ { 2 } \\} , . . . \\{ a _ { c } , b _ { c } \\} \\}$ respectively. We refer the reader to Raghu et al. (2017) for details on solving these optimization problems. The average of these $c$ correlations ${ \\frac { 1 } { n } } \\sum _ { i } \\rho _ { i }$ is then considered as a measure of the similarity between the two layers. For convolutional layers, Raghu et al. (2017) suggest using a DFT pre-processing step before CCA, since they typically have a large number of neurons ${ \\bf \\zeta } _ { m _ { a } }$ or $m _ { b }$ ), where performing raw SVD and CCA would be computationally too expensive. This procedure can then be employed to compare different neural network representations and to determine how representations evolve over training iterations. ",
|
| 371 |
+
"bbox": [
|
| 372 |
+
173,
|
| 373 |
+
494,
|
| 374 |
+
825,
|
| 375 |
+
699
|
| 376 |
+
],
|
| 377 |
+
"page_idx": 3
|
| 378 |
+
},
|
| 379 |
+
{
|
| 380 |
+
"type": "text",
|
| 381 |
+
"text": "3 STOCHASTIC GRADIENT DESCENT WITH RESTARTS (SGDR) ",
|
| 382 |
+
"text_level": 1,
|
| 383 |
+
"bbox": [
|
| 384 |
+
176,
|
| 385 |
+
719,
|
| 386 |
+
709,
|
| 387 |
+
736
|
| 388 |
+
],
|
| 389 |
+
"page_idx": 3
|
| 390 |
+
},
|
| 391 |
+
{
|
| 392 |
+
"type": "text",
|
| 393 |
+
"text": "Loshchilov & Hutter (2016) introduced SGDR as a modification to the common linear or step-wise decay of learning rates. The strategy decays learning rates along a cosine curve and then, at the end of the decay, restarts them to its initial value. The learning rate at the $t$ -th epoch in SGDR is given by the following expression in (1) where $\\eta _ { m i n }$ and $\\eta _ { m a x }$ are the lower and upper bounds respectively for the learning rate. $T _ { c u r }$ represents how many epochs have been performed since the last restart and a warm restart is simulated once $T _ { i }$ epochs are performed. Also $T _ { i } = T _ { m u l t } \\times T _ { i - 1 }$ , meaning the period $T _ { i }$ for the learning rate variation is increased by a factor of $T _ { m u l t }$ after each restart. ",
|
| 394 |
+
"bbox": [
|
| 395 |
+
173,
|
| 396 |
+
751,
|
| 397 |
+
825,
|
| 398 |
+
849
|
| 399 |
+
],
|
| 400 |
+
"page_idx": 3
|
| 401 |
+
},
|
| 402 |
+
{
|
| 403 |
+
"type": "equation",
|
| 404 |
+
"img_path": "images/c767bf4734082886e1e0dc511d98dd7422bf59db9be2494e6431f8246e8c3313.jpg",
|
| 405 |
+
"text": "$$\n\\eta _ { t } = \\eta _ { m i n } + \\frac { 1 } { 2 } \\big ( \\eta _ { m a x } - \\eta _ { m i n } \\big ) \\left( 1 + \\cos \\left( \\frac { T _ { c u r } } { T _ { i } } \\pi \\right) \\right)\n$$",
|
| 406 |
+
"text_format": "latex",
|
| 407 |
+
"bbox": [
|
| 408 |
+
321,
|
| 409 |
+
854,
|
| 410 |
+
674,
|
| 411 |
+
890
|
| 412 |
+
],
|
| 413 |
+
"page_idx": 3
|
| 414 |
+
},
|
| 415 |
+
{
|
| 416 |
+
"type": "text",
|
| 417 |
+
"text": "While the strategy has been claimed to outperform other learning rate schedulers, little is known why this has been the case. One explanation that has been given in support of SGDR is that it can be useful to deal with multi-modal functions, where the iterates could get stuck in a local optimum and a restart will help them get out of it and explore another region; however, Loshchilov & Hutter (2016) do not claim to observe any effect related to multi-modality. Huang et al. (2017) propose an ensembling strategy using the set of iterates before restarts and claim that, when using the learning rate annealing cycles, the optimization path converges to and escapes from several local minima. We empirically investigate if this is actually the case by interpolating the loss surface between parameters at different epochs and studying the training and validation loss for parameters on the hyperplane passing through2 the two modes found by SGDR and their connectivity. Further, by employing the CCA framework as described in Section 2.2, we investigate the progression of training, and the effect of restarts on the model activations. ",
|
| 418 |
+
"bbox": [
|
| 419 |
+
173,
|
| 420 |
+
895,
|
| 421 |
+
823,
|
| 422 |
+
924
|
| 423 |
+
],
|
| 424 |
+
"page_idx": 3
|
| 425 |
+
},
|
| 426 |
+
{
|
| 427 |
+
"type": "image",
|
| 428 |
+
"img_path": "images/d27c5286da77cb58b7d519e134576c01359c97cddc6ce1ea435712c176e6df1f.jpg",
|
| 429 |
+
"image_caption": [
|
| 430 |
+
"Figure 2: (a) Validation accuracy of a VGG16 model trained on CIFAR-10 using SGDR with warm restarts simulated every $T _ { 0 } = 1 0$ epochs and $T _ { m u l t } = 2$ . (b) Cross-entropy training loss on the curve found through Mode Connectivity (MC Curve) and on the line segment (Line Seg.) joining modes $w _ { 3 0 }$ (model corresponding to parameters at the 30-th epoch of SGDR) and $w _ { 7 0 }$ , $w _ { 7 0 }$ and $w _ { 1 5 0 }$ , $w _ { 3 0 }$ and $w _ { 1 5 0 }$ . (c) Cross-entropy training loss on the curve found through Mode Connectivity (MC Curve) and on the line segment (Line Seg.) joining modes $w _ { 5 5 }$ (model corresponding to parameters at the 55-th epoch of SGD with step decay learning rate scheme) and $w _ { 6 5 }$ , $w _ { 1 4 5 }$ and $w _ { 1 5 5 }$ , $w _ { 5 5 }$ and $w _ { 1 5 5 }$ . "
|
| 431 |
+
],
|
| 432 |
+
"image_footnote": [],
|
| 433 |
+
"bbox": [
|
| 434 |
+
174,
|
| 435 |
+
102,
|
| 436 |
+
823,
|
| 437 |
+
268
|
| 438 |
+
],
|
| 439 |
+
"page_idx": 4
|
| 440 |
+
},
|
| 441 |
+
{
|
| 442 |
+
"type": "text",
|
| 443 |
+
"text": "",
|
| 444 |
+
"bbox": [
|
| 445 |
+
173,
|
| 446 |
+
422,
|
| 447 |
+
825,
|
| 448 |
+
561
|
| 449 |
+
],
|
| 450 |
+
"page_idx": 4
|
| 451 |
+
},
|
| 452 |
+
{
|
| 453 |
+
"type": "text",
|
| 454 |
+
"text": "We train a VGG-16 network (Simonyan & Zisserman, 2014) on the CIFAR-10 dataset using SGDR. For our experiments, we choose $T _ { 0 } = 1 0$ epochs and $T _ { m u l t } = 2$ (warm restarts simulated every 10 epochs and the period $T _ { i }$ doubled at every new warm restart), $\\eta _ { m a x } = 0 . 0 5$ and $\\eta _ { m i n } = 1 0 ^ { - 6 }$ . We also perform VGG training using SGD (with momentum of 0.9) and a step decay learning rate scheme (initial learning rate of $\\eta _ { 0 } = 0 . 0 5$ , scaled by 5 at epochs 60 and 150). Figure 2(a) shows the validation accuracy over training epochs with these two learning rate schemes. ",
|
| 455 |
+
"bbox": [
|
| 456 |
+
173,
|
| 457 |
+
569,
|
| 458 |
+
825,
|
| 459 |
+
652
|
| 460 |
+
],
|
| 461 |
+
"page_idx": 4
|
| 462 |
+
},
|
| 463 |
+
{
|
| 464 |
+
"type": "text",
|
| 465 |
+
"text": "In order to understand the loss landscape on the optimization path of SGDR, the pairs of iterates obtained just before the restarts $\\{ w _ { 3 0 } , w _ { 7 0 } \\} , \\{ w _ { 7 0 } , w _ { 1 5 0 } \\}$ and $\\{ w _ { 3 0 } , w _ { 1 5 0 } \\}$ are given as inputs to the mode connectivity algorithm, where $w _ { n }$ is the model corresponding to parameters at the $n$ -th epoch of training. Figure 2(b) shows the training loss for models along the line segment joining these pairs and those on the curve found through mode connectivity. For the baseline case of SGD training, we connect the iterates around the epochs when we decrease our learning rate in the step decay learning rate scheme. Thus, we chose $\\{ w _ { 5 5 } , w _ { 6 5 } \\}$ , $\\{ w _ { 1 4 5 } , w _ { 1 6 5 } \\}$ and $\\{ w _ { 5 5 } , w _ { 1 6 5 } \\}$ as input pairs to the mode connectivity algorithm. Figure 2(c) shows the training loss for models along the line segments joining these pairs and the curves found through mode connectivity. ",
|
| 466 |
+
"bbox": [
|
| 467 |
+
174,
|
| 468 |
+
660,
|
| 469 |
+
483,
|
| 470 |
+
895
|
| 471 |
+
],
|
| 472 |
+
"page_idx": 4
|
| 473 |
+
},
|
| 474 |
+
{
|
| 475 |
+
"type": "image",
|
| 476 |
+
"img_path": "images/a8ab2b0b42e2846f845c48a9db1eed474481176864149868bd4fff3819709575.jpg",
|
| 477 |
+
"image_caption": [
|
| 478 |
+
"Figure 3: (a) Training loss surface and (b) validation loss surface, log scales, for points on the plane defined by $\\{ w _ { 7 0 } , w _ { 1 5 0 } , w _ { 7 0 - 1 5 0 } \\}$ including projections of the SGDR iterates on this hyperplane. A curve of a given color represents a contour line, with the log-loss (lower being better) corresponding to this contour shown in the same color. "
|
| 479 |
+
],
|
| 480 |
+
"image_footnote": [],
|
| 481 |
+
"bbox": [
|
| 482 |
+
503,
|
| 483 |
+
676,
|
| 484 |
+
805,
|
| 485 |
+
787
|
| 486 |
+
],
|
| 487 |
+
"page_idx": 4
|
| 488 |
+
},
|
| 489 |
+
{
|
| 490 |
+
"type": "text",
|
| 491 |
+
"text": "",
|
| 492 |
+
"bbox": [
|
| 493 |
+
174,
|
| 494 |
+
103,
|
| 495 |
+
485,
|
| 496 |
+
132
|
| 497 |
+
],
|
| 498 |
+
"page_idx": 5
|
| 499 |
+
},
|
| 500 |
+
{
|
| 501 |
+
"type": "text",
|
| 502 |
+
"text": "From Figure 2(b), it is clear that for the pairs $\\{ w _ { 3 0 } , w _ { 1 5 0 } \\}$ and $\\{ w _ { 7 0 } , w _ { 1 5 0 } \\}$ the training loss for points on segment is much higher than the endpoints suggesting that SGDR indeed finds paths that move over a barrier3 in the training loss landscape. In contrast, for SGD (without restarts) in Figure 2(c) none of the three pairs show evidence of having a training loss barrier on the line segment joining them. Instead there seems to be an almost linear decrease of training loss along the direction of these line segments, suggesting that SGD’s trajectory is quite different from SGDR’s. We present additional experiments, including results for other metrics, in Appendix 8. ",
|
| 503 |
+
"bbox": [
|
| 504 |
+
174,
|
| 505 |
+
138,
|
| 506 |
+
825,
|
| 507 |
+
236
|
| 508 |
+
],
|
| 509 |
+
"page_idx": 5
|
| 510 |
+
},
|
| 511 |
+
{
|
| 512 |
+
"type": "text",
|
| 513 |
+
"text": "To further understand the SGDR trajectory, we evaluate the intermediate points on the hyperplane in the $D$ -dimensional space defined by the three points: $w _ { 7 0 }$ , $w _ { 1 5 0 }$ and $w _ { 7 0 - 1 5 0 }$ , where $w _ { 7 0 - 1 5 0 }$ is the bend point that defines the high accuracy connection for the pair $\\{ w _ { 7 0 } , w _ { 1 5 0 } \\}$ . Figures 3(a) and 3(b) show the training and validation loss surface for points in this subspace, respectively. Note that the intermediate iterates do not necessarily lie in this plane, and thus are projected. We refer the reader to Appendix 8 for additional details on the projection, and analogous results with $w _ { 3 0 }$ and $w _ { 7 0 }$ . Results for the VGG-16 architecture with batch-normalization are also presented in Appendix 8.4. ",
|
| 514 |
+
"bbox": [
|
| 515 |
+
173,
|
| 516 |
+
243,
|
| 517 |
+
825,
|
| 518 |
+
353
|
| 519 |
+
],
|
| 520 |
+
"page_idx": 5
|
| 521 |
+
},
|
| 522 |
+
{
|
| 523 |
+
"type": "text",
|
| 524 |
+
"text": "Figure 3(a) suggests that SGDR helps the iterates converge to a different region although neither of $w _ { 7 0 }$ or $w _ { 1 5 0 }$ are technically a local minimum, nor do they appear to be lying in different basins, hinting that Huang et al. (2017)’s claims about SGDR converging to and escaping from local minima might be an oversimplification.4 Another insight we can draw from Figure 3(a) is that the path found by mode connectivity corresponds to lower training loss than the loss at the iterates that SGDR converges to $( \\mathcal { L } ( w _ { 1 5 0 } ) > \\mathcal { L } ( w _ { 7 0 - 1 5 0 } ) )$ . However, Figure 3(b) shows that models on this curve seem to overfit and not generalize as well as the iterates $w _ { 7 0 }$ and $w _ { 1 5 0 }$ . Thus, although gathering models from this connecting curve might seem as a novel and computationally cheap way of creating ensembles, this generalization gap alludes to one limitation in doing so; Garipov et al. (2018) point to other shortcomings of curve ensembling in their original work. In Figure 3, the region of the plane between the iterates $w _ { 7 0 }$ and $w _ { 1 5 0 }$ corresponds to higher training loss but lower validation loss than the two iterates. This hints at a reason why averaging iterates to improve generalization using cyclic or constant learning rates (Izmailov et al., 2018) has been found to work well. ",
|
| 525 |
+
"bbox": [
|
| 526 |
+
173,
|
| 527 |
+
361,
|
| 528 |
+
825,
|
| 529 |
+
541
|
| 530 |
+
],
|
| 531 |
+
"page_idx": 5
|
| 532 |
+
},
|
| 533 |
+
{
|
| 534 |
+
"type": "text",
|
| 535 |
+
"text": "Finally, in Figure 14 in Appendix 9, we present the CCA similarity plots for two pairs of models: epochs 10 and 150 (model at the beginning and end of training), and epochs 150 and 155 (model just before and just after a restart). For standard SGD training, Raghu et al. (2017) observe that the activations of the shallower layers bear closer resemblance than the deeper layers between a partially and fully trained network from a given training run. For SGDR training, we witness similar results (discussed in Appendix 9), meaning that the representational similarities between the network layers at the beginning and end of training are alike for SGDR and SGD, even though restarts lead to a trajectory that tends to cross over barriers. ",
|
| 536 |
+
"bbox": [
|
| 537 |
+
173,
|
| 538 |
+
549,
|
| 539 |
+
825,
|
| 540 |
+
660
|
| 541 |
+
],
|
| 542 |
+
"page_idx": 5
|
| 543 |
+
},
|
| 544 |
+
{
|
| 545 |
+
"type": "text",
|
| 546 |
+
"text": "4 WARMUP LEARNING RATE SCHEME ",
|
| 547 |
+
"text_level": 1,
|
| 548 |
+
"bbox": [
|
| 549 |
+
174,
|
| 550 |
+
681,
|
| 551 |
+
498,
|
| 552 |
+
695
|
| 553 |
+
],
|
| 554 |
+
"page_idx": 5
|
| 555 |
+
},
|
| 556 |
+
{
|
| 557 |
+
"type": "text",
|
| 558 |
+
"text": "Learning rate warmup is a common heuristic used by many practitioners for training deep neural nets for computer vision (Goyal et al., 2017) and natural language processing (Bogoychev et al., 2018; Vaswani et al., 2017) tasks. Theoretically, it can be shown that the learning dynamics of SGD rely on the ratio of the batch size and learning rate (Smith et al., 2017; Jastrzebski et al., 2017; Hoffer et al., 2017). And hence, an increase in batch size over a baseline requires an accompanying increase in learning rate for comparable training. However, in cases when the batch size is increased significantly, the curvature of the loss function typically does not support a proportional increase in the learning rate. Warmup is hence motivated as a means to use large learning rates without causing training instability. We particularly focus on the importance of the learning rate schedule’s warmup phase in the large batch (LB) training of deep convolutional neural networks as discussed in Goyal et al. (2017). Their work adopts a linear scaling rule for adjusting the learning rate as a function of the minibatch size, to enable large-batch training. The question we aim to investigate here is: How does learning rate warmup impact different layers of the network? ",
|
| 559 |
+
"bbox": [
|
| 560 |
+
173,
|
| 561 |
+
710,
|
| 562 |
+
825,
|
| 563 |
+
849
|
| 564 |
+
],
|
| 565 |
+
"page_idx": 5
|
| 566 |
+
},
|
| 567 |
+
{
|
| 568 |
+
"type": "image",
|
| 569 |
+
"img_path": "images/3f18a1e2d758c0b55600d5ccb2b33c8544b4e469c8e0c5e8fa6fbca1c3f05553.jpg",
|
| 570 |
+
"image_caption": [
|
| 571 |
+
"Figure 4: (a) Validation accuracy and (b) Learning rate for the three training setups (c) CCA similarity for $i$ -th layer from two different iterations (0-th (before warmup) and 200-th (after warmup) during training (d) Comparing warmup and FC freezing strategies on VGG11 training "
|
| 572 |
+
],
|
| 573 |
+
"image_footnote": [],
|
| 574 |
+
"bbox": [
|
| 575 |
+
176,
|
| 576 |
+
102,
|
| 577 |
+
820,
|
| 578 |
+
224
|
| 579 |
+
],
|
| 580 |
+
"page_idx": 6
|
| 581 |
+
},
|
| 582 |
+
{
|
| 583 |
+
"type": "image",
|
| 584 |
+
"img_path": "images/4ee086b17710e9f7e998625386f8b732ce48587d74ba11d4390f7ab9593374ee.jpg",
|
| 585 |
+
"image_caption": [
|
| 586 |
+
"Figure 5: CCA similarity output plots for (a) SB no warmup, (b) LB no warmup, (c, d) $\\mathrm { ~ L B ~ } +$ warmup training. The $i , j$ -th cell represents the CCA similarity between layer $i$ of the first model, and layer $j$ of other. A higher score implies that the layers are more similar (lighter color). "
|
| 587 |
+
],
|
| 588 |
+
"image_footnote": [],
|
| 589 |
+
"bbox": [
|
| 590 |
+
174,
|
| 591 |
+
294,
|
| 592 |
+
825,
|
| 593 |
+
422
|
| 594 |
+
],
|
| 595 |
+
"page_idx": 6
|
| 596 |
+
},
|
| 597 |
+
{
|
| 598 |
+
"type": "text",
|
| 599 |
+
"text": "",
|
| 600 |
+
"bbox": [
|
| 601 |
+
174,
|
| 602 |
+
502,
|
| 603 |
+
823,
|
| 604 |
+
545
|
| 605 |
+
],
|
| 606 |
+
"page_idx": 6
|
| 607 |
+
},
|
| 608 |
+
{
|
| 609 |
+
"type": "text",
|
| 610 |
+
"text": "Using CCA as a tool to study the learning dynamics of neural networks through training iterations, we investigate the differences and similarities for the following 3 training configurations - (a) large batch training with warmup $\\mathrm { L B } +$ warmup), (b) large batch training without warmup (LB no warmup) and (c) small batch training without warmup (SB no warmup). We train a VGG-11 architecture on the CIFAR-10 (Krizhevsky et al., 2014) dataset using SGD with momentum of 0.9. Learning rate for the small batch case (batch-size of 100) is set to 0.05, and for the large batch cases (batch-size of 5000) is set to 2.5 as per the scaling rule. For the warmup, we increase the learning rate from 0 to 2.5 over the first 200 iterations. Subsequently, we decrease the learning rate as per the step decay schedule for all runs, scaling it down by a factor of 10 at epochs 60, 120 and 150. We plot the learning rate and validation accuracy for these 3 cases in Figure 4(b) and (a). ",
|
| 611 |
+
"bbox": [
|
| 612 |
+
173,
|
| 613 |
+
553,
|
| 614 |
+
825,
|
| 615 |
+
691
|
| 616 |
+
],
|
| 617 |
+
"page_idx": 6
|
| 618 |
+
},
|
| 619 |
+
{
|
| 620 |
+
"type": "text",
|
| 621 |
+
"text": "Using CCA and denoting the model at the $j$ -th iteration of a training setup by $i t e r _ { j }$ , we compare activation layers from $i t e r _ { 0 }$ (init.) and $i t e r _ { 2 0 0 }$ (end of warmup) for each of the three runs, presented in Figures 5(a), (b) and (c), and also layers from iter200 (end of warmup) and iter2990 (end of training) for the $\\mathrm { L B } +$ warmup case, presented in Figure 5(d). Figure 4(c) plots the similarity for layer $i$ of $i t e r _ { a }$ with the same layer of $i t e r _ { b }$ (this corresponds to diagonal elements of the matrices in Figure 5) for these three setups. ",
|
| 622 |
+
"bbox": [
|
| 623 |
+
174,
|
| 624 |
+
698,
|
| 625 |
+
825,
|
| 626 |
+
781
|
| 627 |
+
],
|
| 628 |
+
"page_idx": 6
|
| 629 |
+
},
|
| 630 |
+
{
|
| 631 |
+
"type": "text",
|
| 632 |
+
"text": "An evident pattern in Figures 5(a), (b) and (c) is the increase in similarity for the last few layers (stack of fully-connected layers) for the LB $^ +$ warmup and SB cases, which is absent in the LB without warmup case. This suggests that when used with the large batch size and learning rate, warmup tends to avoid unstably large changes in the fully-connected (FC) stack for this network configuration. To validate this proposition, we train using the LB without warmup setup, but freezing the fully-connected stack for the first 20 epochs5 (LB no warmup $+ \\operatorname { F C }$ freeze). Figure 4(d) shows the validation accuracy for this training run in comparison to the three training setups discussed before. The performance is comparable at the end of warmup by freezing the FC stack, suggesting the validity our proposition in this case. We refer the reader to Appendix 10 for analogous results for ResNet-18 and ResNet-32 (He et al., 2016); thus also demonstrating the generality of our claim. Finally, note from Figure 4(d) that no qualitative difference exists in the trajectory beyond the warmup when compared to the standard training approach (Raghu et al., 2017). ",
|
| 633 |
+
"bbox": [
|
| 634 |
+
174,
|
| 635 |
+
787,
|
| 636 |
+
825,
|
| 637 |
+
900
|
| 638 |
+
],
|
| 639 |
+
"page_idx": 6
|
| 640 |
+
},
|
| 641 |
+
{
|
| 642 |
+
"type": "image",
|
| 643 |
+
"img_path": "images/2e79fe459b8246eec47673640edb933ddaf70254289f8ec955e7a917db2682a3.jpg",
|
| 644 |
+
"image_caption": [
|
| 645 |
+
"Figure 6: CCA similarity between $S _ { \\mathrm { d i s t i l l e d } } - T$ , $S _ { \\mathrm { i n d e p . } } \\cdot T$ , and their difference. $i , j$ -th cell of the differencnetwork l, represents denotes th $| \\mathbf { C C A } ( l _ { T } ^ { i } , l _ { S _ { \\mathrm { d i s t i l l e d } } } ^ { j } ) - \\mathbf { C C A } ( l _ { T } ^ { i } , l _ { S _ { \\mathrm { i n d e p . } } } ^ { j } ) |$ where is the s $l _ { M } ^ { i }$ denotes the ent network $i$ -th layer ofained using $M$ $T$ $S _ { \\mathrm { d i s t i l l e d } }$ distillation and $S _ { \\mathrm { i n d e p . } }$ . is the student network trained using hard training labels. "
|
| 646 |
+
],
|
| 647 |
+
"image_footnote": [],
|
| 648 |
+
"bbox": [
|
| 649 |
+
178,
|
| 650 |
+
102,
|
| 651 |
+
820,
|
| 652 |
+
241
|
| 653 |
+
],
|
| 654 |
+
"page_idx": 7
|
| 655 |
+
},
|
| 656 |
+
{
|
| 657 |
+
"type": "text",
|
| 658 |
+
"text": "",
|
| 659 |
+
"bbox": [
|
| 660 |
+
174,
|
| 661 |
+
343,
|
| 662 |
+
823,
|
| 663 |
+
398
|
| 664 |
+
],
|
| 665 |
+
"page_idx": 7
|
| 666 |
+
},
|
| 667 |
+
{
|
| 668 |
+
"type": "text",
|
| 669 |
+
"text": "5 KNOWLEDGE DISTILLATION ",
|
| 670 |
+
"text_level": 1,
|
| 671 |
+
"bbox": [
|
| 672 |
+
176,
|
| 673 |
+
420,
|
| 674 |
+
441,
|
| 675 |
+
435
|
| 676 |
+
],
|
| 677 |
+
"page_idx": 7
|
| 678 |
+
},
|
| 679 |
+
{
|
| 680 |
+
"type": "text",
|
| 681 |
+
"text": "We study knowledge distillation as proposed by Hinton et al. (2015) using CCA to measure representational similarity between layers of the teacher and student model. Distillation involves training a “student” model using the output probability distribution of a “teacher” model. This has been widely known to help the student model perform better than it would, if it were trained using hard labels due to knowledge transfer from the teacher model. The reason often quoted for the success of distillation is the transfer of dark knowledge from the teacher to the student (Hinton et al., 2015), and more recently, as an interpretation of importance weighing (Furlanello et al., 2018). We investigate if this knowledge transfer is limited to certain parts of the network, and if representational similarity between layers of the student and teacher model and a student can help answer this question. ",
|
| 682 |
+
"bbox": [
|
| 683 |
+
174,
|
| 684 |
+
452,
|
| 685 |
+
825,
|
| 686 |
+
578
|
| 687 |
+
],
|
| 688 |
+
"page_idx": 7
|
| 689 |
+
},
|
| 690 |
+
{
|
| 691 |
+
"type": "text",
|
| 692 |
+
"text": "To construct an example of distillation that can be used for our analysis, we use a VGG-16 model (Simonyan & Zisserman, 2014) as our teacher network and a shallow convolutional network ([conv, maxpool, relu] $_ { \\textrm { x 2 } }$ , fc, relu, fc, fc, softmax) as the student network. We train the shallow network for CIFAR-10 using the teacher’s predicted probability distribution (softened using a temperature of 5), $( S _ { \\mathrm { d i s t i l l e d } } )$ , and for the baseline, train another instance of the same model in a standard way using hard labels, $( S _ { \\mathrm { i n d e p . } } )$ . Over 5 runs for each of the two setups, we find the distillation training attains the best validation accuracy at $8 5 . 1 8 \\%$ while standard training attains its best at $8 3 . 0 1 \\%$ . We compare their layer-wise representations with those of the teacher network $( T )$ . ",
|
| 693 |
+
"bbox": [
|
| 694 |
+
174,
|
| 695 |
+
584,
|
| 696 |
+
825,
|
| 697 |
+
695
|
| 698 |
+
],
|
| 699 |
+
"page_idx": 7
|
| 700 |
+
},
|
| 701 |
+
{
|
| 702 |
+
"type": "text",
|
| 703 |
+
"text": "Figure 6 shows the CCA plots and the absolute value of their difference. The scores of these two pairs are quite similar for the shallow layers of the student network relative to the deeper layers, suggesting that the difference that knowledge distillation brings to the training of smaller networks is restricted to the deeper layers (fc stack). Similar results are obtained through different configurations for the student and teacher when the student benefits from the teacher’s knowledge. We hypothesize that the dark knowledge transferred by the teacher is localized majorly in the deeper (discriminative) layers, and less so in the feature extraction layers. We also note that this is not dissimilar to the hypothesis of Furlanello et al. (2018), and also relates ot the results from the literature on fine-tuning or transfer learning (Goodfellow et al., 2016; Yosinski et al., 2014; Howard & Ruder, 2018) which suggest training of only higher layers. ",
|
| 704 |
+
"bbox": [
|
| 705 |
+
173,
|
| 706 |
+
702,
|
| 707 |
+
825,
|
| 708 |
+
842
|
| 709 |
+
],
|
| 710 |
+
"page_idx": 7
|
| 711 |
+
},
|
| 712 |
+
{
|
| 713 |
+
"type": "text",
|
| 714 |
+
"text": "6 DISCUSSION AND CONCLUSION ",
|
| 715 |
+
"text_level": 1,
|
| 716 |
+
"bbox": [
|
| 717 |
+
176,
|
| 718 |
+
863,
|
| 719 |
+
467,
|
| 720 |
+
880
|
| 721 |
+
],
|
| 722 |
+
"page_idx": 7
|
| 723 |
+
},
|
| 724 |
+
{
|
| 725 |
+
"type": "text",
|
| 726 |
+
"text": "Heuristics have played an important role in accelerating progress of deep learning. Founded in empirical experience, intuition and observations, many of these strategies are now commonplace in architectures. In the absence of strong theoretical guarantees, controlled experiments aimed at explaining the the efficacy of these strategies can aid our understanding of deep learning and the training dynamics. The primary goal of our work was the investigation of three such heuristics using sophisticated tools for landscape analysis. Specifically, we investigate cosine annealing, learning rate warmup, and knowledge distillation. For this purpose, we employ recently proposed tools of mode connectivity and CCA. Our empirical analysis sheds light on these heuristics and suggests that: (a) the reasons often quoted for the success of cosine annealing are not evidenced in practice; (b) that the effect of learning rate warmup is to prevent the deeper layers from creating training instability; and (c) that the latent knowledge shared by the teacher is primarily disbursed in the deeper layers. ",
|
| 727 |
+
"bbox": [
|
| 728 |
+
173,
|
| 729 |
+
895,
|
| 730 |
+
823,
|
| 731 |
+
924
|
| 732 |
+
],
|
| 733 |
+
"page_idx": 7
|
| 734 |
+
},
|
| 735 |
+
{
|
| 736 |
+
"type": "text",
|
| 737 |
+
"text": "",
|
| 738 |
+
"bbox": [
|
| 739 |
+
174,
|
| 740 |
+
103,
|
| 741 |
+
825,
|
| 742 |
+
229
|
| 743 |
+
],
|
| 744 |
+
"page_idx": 8
|
| 745 |
+
},
|
| 746 |
+
{
|
| 747 |
+
"type": "text",
|
| 748 |
+
"text": "Inadvertently, our investigation also leads to the design of new heuristics for practically improving the training process. Through our results on SGDR, we provide additional evidence for the success of averaging schemes in this context. Given the empirical results suggesting the localization of the knowledge transfer between teacher and student in the process of distillation, a heuristic can be designed that only trains portions of the (pre-trained) student networks instead of the whole network. For instance, recent results on self-distillation (Furlanello et al., 2018) show improved performance via multiple generations of knowledge distillation for the same model. Given our results, computational costs of subsequent generations can be reduced if only subsets of the model are trained, instead of training the entire model. Finally, the freezing of weights instead of employing learning rate warmup allows for comparable training performance but with reduced computation during the warmup phase. We note in passing that our result also ties in with results of Hoffer et al. (2018) who suggest not training the classifier at all with negligible loss in performance. Our empirical experiments and hypotheses open new questions and encourage a deeper exploration into improving and better understanding these heuristics. ",
|
| 749 |
+
"bbox": [
|
| 750 |
+
174,
|
| 751 |
+
236,
|
| 752 |
+
825,
|
| 753 |
+
429
|
| 754 |
+
],
|
| 755 |
+
"page_idx": 8
|
| 756 |
+
},
|
| 757 |
+
{
|
| 758 |
+
"type": "text",
|
| 759 |
+
"text": "REFERENCES ",
|
| 760 |
+
"text_level": 1,
|
| 761 |
+
"bbox": [
|
| 762 |
+
176,
|
| 763 |
+
452,
|
| 764 |
+
285,
|
| 765 |
+
467
|
| 766 |
+
],
|
| 767 |
+
"page_idx": 8
|
| 768 |
+
},
|
| 769 |
+
{
|
| 770 |
+
"type": "text",
|
| 771 |
+
"text": "Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. \nDavid Balduzzi, Marcus Frean, Lennox Leary, JP Lewis, Kurt Wan-Duo Ma, and Brian McWilliams. The shattered gradients problem: If resnets are the answer, then what is the question? arXiv preprint arXiv:1702.08591, 2017. \nNikolay Bogoychev, Marcin Junczys-Dowmunt, Kenneth Heafield, and Alham Fikri Aji. Accelerating asynchronous stochastic gradient descent for neural machine translation. arXiv preprint arXiv:1808.08859, 2018. \nCody Coleman, Daniel Kang, Deepak Narayanan, Luigi Nardi, Tian Zhao, Jian Zhang, Peter Bailis, Kunle Olukotun, Chris Re, and Matei Zaharia. Analysis of dawnbench, a time-to-accuracy machine learning performance benchmark. arXiv preprint arXiv:1806.01427, 2018. \nLaurent Dinh, Razvan Pascanu, Samy Bengio, and Yoshua Bengio. Sharp minima can generalize for deep nets. arXiv preprint arXiv:1703.04933, 2017. \nFelix Draxler, Kambis Veschgini, Manfred Salmhofer, and Fred A Hamprecht. Essentially no barriers in neural network energy landscape. arXiv preprint arXiv:1803.00885, 2018. \nTommaso Furlanello, Zachary C Lipton, Michael Tschannen, Laurent Itti, and Anima Anandkumar. Born again neural networks. arXiv preprint arXiv:1805.04770, 2018. \nTimur Garipov, Pavel Izmailov, Dmitrii Podoprikhin, Dmitry P Vetrov, and Andrew Gordon Wilson. Loss surfaces, mode connectivity, and fast ensembling of dnns. arXiv preprint arXiv:1802.10026, 2018. \nIan Goodfellow, Yoshua Bengio, Aaron Courville, and Yoshua Bengio. Deep learning, volume 1. MIT Press, 2016. \nPriya Goyal, Piotr Dollar, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, An- ´ drew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch sgd: training imagenet in 1 hour. arXiv preprint arXiv:1706.02677, 2017. ",
|
| 772 |
+
"bbox": [
|
| 773 |
+
171,
|
| 774 |
+
470,
|
| 775 |
+
826,
|
| 776 |
+
928
|
| 777 |
+
],
|
| 778 |
+
"page_idx": 8
|
| 779 |
+
},
|
| 780 |
+
{
|
| 781 |
+
"type": "text",
|
| 782 |
+
"text": "Moritz Hardt and Tengyu Ma. Identity matters in deep learning. arXiv preprint arXiv:1611.04231, 2016. ",
|
| 783 |
+
"bbox": [
|
| 784 |
+
171,
|
| 785 |
+
103,
|
| 786 |
+
823,
|
| 787 |
+
132
|
| 788 |
+
],
|
| 789 |
+
"page_idx": 9
|
| 790 |
+
},
|
| 791 |
+
{
|
| 792 |
+
"type": "text",
|
| 793 |
+
"text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016. ",
|
| 794 |
+
"bbox": [
|
| 795 |
+
173,
|
| 796 |
+
141,
|
| 797 |
+
823,
|
| 798 |
+
184
|
| 799 |
+
],
|
| 800 |
+
"page_idx": 9
|
| 801 |
+
},
|
| 802 |
+
{
|
| 803 |
+
"type": "text",
|
| 804 |
+
"text": "Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, Gunter Klambauer, and ¨ Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a nash equilibrium. arXiv preprint arXiv:1706.08500, 2017. ",
|
| 805 |
+
"bbox": [
|
| 806 |
+
173,
|
| 807 |
+
194,
|
| 808 |
+
825,
|
| 809 |
+
237
|
| 810 |
+
],
|
| 811 |
+
"page_idx": 9
|
| 812 |
+
},
|
| 813 |
+
{
|
| 814 |
+
"type": "text",
|
| 815 |
+
"text": "Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. ",
|
| 816 |
+
"bbox": [
|
| 817 |
+
173,
|
| 818 |
+
246,
|
| 819 |
+
823,
|
| 820 |
+
276
|
| 821 |
+
],
|
| 822 |
+
"page_idx": 9
|
| 823 |
+
},
|
| 824 |
+
{
|
| 825 |
+
"type": "text",
|
| 826 |
+
"text": "Elad Hoffer, Itay Hubara, and Daniel Soudry. Train longer, generalize better: closing the generalization gap in large batch training of neural networks. In Advances in Neural Information Processing Systems, pp. 1731–1741, 2017. ",
|
| 827 |
+
"bbox": [
|
| 828 |
+
173,
|
| 829 |
+
285,
|
| 830 |
+
825,
|
| 831 |
+
329
|
| 832 |
+
],
|
| 833 |
+
"page_idx": 9
|
| 834 |
+
},
|
| 835 |
+
{
|
| 836 |
+
"type": "text",
|
| 837 |
+
"text": "Elad Hoffer, Itay Hubara, and Daniel Soudry. Fix your classifier: the marginal value of training the last weight layer. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id $\\underline { { \\underline { { \\mathbf { \\Pi } } } } } =$ S1Dh8Tg0-. ",
|
| 838 |
+
"bbox": [
|
| 839 |
+
176,
|
| 840 |
+
337,
|
| 841 |
+
825,
|
| 842 |
+
381
|
| 843 |
+
],
|
| 844 |
+
"page_idx": 9
|
| 845 |
+
},
|
| 846 |
+
{
|
| 847 |
+
"type": "text",
|
| 848 |
+
"text": "Harold Hotelling. Relations between two sets of variates. Biometrika, 28(3/4):321–377, 1936. ",
|
| 849 |
+
"bbox": [
|
| 850 |
+
171,
|
| 851 |
+
390,
|
| 852 |
+
792,
|
| 853 |
+
406
|
| 854 |
+
],
|
| 855 |
+
"page_idx": 9
|
| 856 |
+
},
|
| 857 |
+
{
|
| 858 |
+
"type": "text",
|
| 859 |
+
"text": "Jeremy Howard and Sebastian Ruder. Universal language model fine-tuning for text classification. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), volume 1, pp. 328–339, 2018. ",
|
| 860 |
+
"bbox": [
|
| 861 |
+
176,
|
| 862 |
+
415,
|
| 863 |
+
823,
|
| 864 |
+
458
|
| 865 |
+
],
|
| 866 |
+
"page_idx": 9
|
| 867 |
+
},
|
| 868 |
+
{
|
| 869 |
+
"type": "text",
|
| 870 |
+
"text": "Gao Huang, Yixuan Li, Geoff Pleiss, Zhuang Liu, John E Hopcroft, and Kilian Q Weinberger. Snapshot ensembles: Train 1, get m for free. arXiv preprint arXiv:1704.00109, 2017. ",
|
| 871 |
+
"bbox": [
|
| 872 |
+
171,
|
| 873 |
+
467,
|
| 874 |
+
823,
|
| 875 |
+
497
|
| 876 |
+
],
|
| 877 |
+
"page_idx": 9
|
| 878 |
+
},
|
| 879 |
+
{
|
| 880 |
+
"type": "text",
|
| 881 |
+
"text": "Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. ",
|
| 882 |
+
"bbox": [
|
| 883 |
+
176,
|
| 884 |
+
506,
|
| 885 |
+
823,
|
| 886 |
+
535
|
| 887 |
+
],
|
| 888 |
+
"page_idx": 9
|
| 889 |
+
},
|
| 890 |
+
{
|
| 891 |
+
"type": "text",
|
| 892 |
+
"text": "Pavel Izmailov, Dmitrii Podoprikhin, Timur Garipov, Dmitry Vetrov, and Andrew Gordon Wilson. Averaging weights leads to wider optima and better generalization. arXiv preprint arXiv:1803.05407, 2018. ",
|
| 893 |
+
"bbox": [
|
| 894 |
+
174,
|
| 895 |
+
544,
|
| 896 |
+
825,
|
| 897 |
+
587
|
| 898 |
+
],
|
| 899 |
+
"page_idx": 9
|
| 900 |
+
},
|
| 901 |
+
{
|
| 902 |
+
"type": "text",
|
| 903 |
+
"text": "Stanisław Jastrzebski, Zachary Kenton, Devansh Arpit, Nicolas Ballas, Asja Fischer, Yoshua Bengio, and Amos Storkey. Three factors influencing minima in sgd. arXiv preprint arXiv:1711.04623, 2017. ",
|
| 904 |
+
"bbox": [
|
| 905 |
+
174,
|
| 906 |
+
597,
|
| 907 |
+
825,
|
| 908 |
+
640
|
| 909 |
+
],
|
| 910 |
+
"page_idx": 9
|
| 911 |
+
},
|
| 912 |
+
{
|
| 913 |
+
"type": "text",
|
| 914 |
+
"text": "Nitish Shirish Keskar, Dheevatsa Mudigere, Jorge Nocedal, Mikhail Smelyanskiy, and Ping Tak Peter Tang. On large-batch training for deep learning: Generalization gap and sharp minima. arXiv preprint arXiv:1609.04836, 2016. ",
|
| 915 |
+
"bbox": [
|
| 916 |
+
173,
|
| 917 |
+
650,
|
| 918 |
+
825,
|
| 919 |
+
693
|
| 920 |
+
],
|
| 921 |
+
"page_idx": 9
|
| 922 |
+
},
|
| 923 |
+
{
|
| 924 |
+
"type": "text",
|
| 925 |
+
"text": "Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. The cifar-10 dataset. online: http://www. cs. toronto. edu/kriz/cifar. html, 2014. ",
|
| 926 |
+
"bbox": [
|
| 927 |
+
169,
|
| 928 |
+
702,
|
| 929 |
+
821,
|
| 930 |
+
731
|
| 931 |
+
],
|
| 932 |
+
"page_idx": 9
|
| 933 |
+
},
|
| 934 |
+
{
|
| 935 |
+
"type": "text",
|
| 936 |
+
"text": "Hao Li, Zheng Xu, Gavin Taylor, and Tom Goldstein. Visualizing the loss landscape of neural nets. arXiv preprint arXiv:1712.09913, 2017. ",
|
| 937 |
+
"bbox": [
|
| 938 |
+
169,
|
| 939 |
+
739,
|
| 940 |
+
823,
|
| 941 |
+
770
|
| 942 |
+
],
|
| 943 |
+
"page_idx": 9
|
| 944 |
+
},
|
| 945 |
+
{
|
| 946 |
+
"type": "text",
|
| 947 |
+
"text": "Yixuan Li, Jason Yosinski, Jeff Clune, Hod Lipson, and John E Hopcroft. Convergent learning: Do different neural networks learn the same representations? In FE@ NIPS, pp. 196–212, 2015. ",
|
| 948 |
+
"bbox": [
|
| 949 |
+
171,
|
| 950 |
+
779,
|
| 951 |
+
825,
|
| 952 |
+
809
|
| 953 |
+
],
|
| 954 |
+
"page_idx": 9
|
| 955 |
+
},
|
| 956 |
+
{
|
| 957 |
+
"type": "text",
|
| 958 |
+
"text": "Ilya Loshchilov and Frank Hutter. Sgdr: stochastic gradient descent with restarts. arXiv preprint arXiv:1608.03983, 2016. ",
|
| 959 |
+
"bbox": [
|
| 960 |
+
171,
|
| 961 |
+
818,
|
| 962 |
+
823,
|
| 963 |
+
847
|
| 964 |
+
],
|
| 965 |
+
"page_idx": 9
|
| 966 |
+
},
|
| 967 |
+
{
|
| 968 |
+
"type": "text",
|
| 969 |
+
"text": "Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 9(Nov):2579–2605, 2008. ",
|
| 970 |
+
"bbox": [
|
| 971 |
+
171,
|
| 972 |
+
856,
|
| 973 |
+
825,
|
| 974 |
+
886
|
| 975 |
+
],
|
| 976 |
+
"page_idx": 9
|
| 977 |
+
},
|
| 978 |
+
{
|
| 979 |
+
"type": "text",
|
| 980 |
+
"text": "Tomaso Poggio and Qianli Liao. Theory ii: Landscape of the empirical risk in deep learning. PhD thesis, Center for Brains, Minds and Machines (CBMM), arXiv, 2017. ",
|
| 981 |
+
"bbox": [
|
| 982 |
+
173,
|
| 983 |
+
895,
|
| 984 |
+
821,
|
| 985 |
+
924
|
| 986 |
+
],
|
| 987 |
+
"page_idx": 9
|
| 988 |
+
},
|
| 989 |
+
{
|
| 990 |
+
"type": "text",
|
| 991 |
+
"text": "Maithra Raghu, Justin Gilmer, Jason Yosinski, and Jascha Sohl-Dickstein. Svcca: Singular vector canonical correlation analysis for deep learning dynamics and interpretability. In Advances in Neural Information Processing Systems, pp. 6076–6085, 2017. ",
|
| 992 |
+
"bbox": [
|
| 993 |
+
176,
|
| 994 |
+
103,
|
| 995 |
+
823,
|
| 996 |
+
146
|
| 997 |
+
],
|
| 998 |
+
"page_idx": 10
|
| 999 |
+
},
|
| 1000 |
+
{
|
| 1001 |
+
"type": "text",
|
| 1002 |
+
"text": "Levent Sagun, Utku Evci, V Ugur Guney, Yann Dauphin, and Leon Bottou. Empirical analysis of the hessian of over-parametrized neural networks. arXiv preprint arXiv:1706.04454, 2017. ",
|
| 1003 |
+
"bbox": [
|
| 1004 |
+
171,
|
| 1005 |
+
155,
|
| 1006 |
+
823,
|
| 1007 |
+
184
|
| 1008 |
+
],
|
| 1009 |
+
"page_idx": 10
|
| 1010 |
+
},
|
| 1011 |
+
{
|
| 1012 |
+
"type": "text",
|
| 1013 |
+
"text": "Shibani Santurkar, Dimitris Tsipras, Andrew Ilyas, and Aleksander Madry. How does batch normalization help optimization?(no, it is not about internal covariate shift). arXiv preprint arXiv:1805.11604, 2018. ",
|
| 1014 |
+
"bbox": [
|
| 1015 |
+
173,
|
| 1016 |
+
193,
|
| 1017 |
+
823,
|
| 1018 |
+
234
|
| 1019 |
+
],
|
| 1020 |
+
"page_idx": 10
|
| 1021 |
+
},
|
| 1022 |
+
{
|
| 1023 |
+
"type": "text",
|
| 1024 |
+
"text": "Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. ",
|
| 1025 |
+
"bbox": [
|
| 1026 |
+
171,
|
| 1027 |
+
244,
|
| 1028 |
+
823,
|
| 1029 |
+
273
|
| 1030 |
+
],
|
| 1031 |
+
"page_idx": 10
|
| 1032 |
+
},
|
| 1033 |
+
{
|
| 1034 |
+
"type": "text",
|
| 1035 |
+
"text": "Leslie N Smith. Cyclical learning rates for training neural networks. In Applications of Computer Vision (WACV), 2017 IEEE Winter Conference on, pp. 464–472. IEEE, 2017. ",
|
| 1036 |
+
"bbox": [
|
| 1037 |
+
174,
|
| 1038 |
+
281,
|
| 1039 |
+
823,
|
| 1040 |
+
310
|
| 1041 |
+
],
|
| 1042 |
+
"page_idx": 10
|
| 1043 |
+
},
|
| 1044 |
+
{
|
| 1045 |
+
"type": "text",
|
| 1046 |
+
"text": "Samuel L Smith, Pieter-Jan Kindermans, and Quoc V Le. Don’t decay the learning rate, increase the batch size. arXiv preprint arXiv:1711.00489, 2017. ",
|
| 1047 |
+
"bbox": [
|
| 1048 |
+
173,
|
| 1049 |
+
319,
|
| 1050 |
+
821,
|
| 1051 |
+
349
|
| 1052 |
+
],
|
| 1053 |
+
"page_idx": 10
|
| 1054 |
+
},
|
| 1055 |
+
{
|
| 1056 |
+
"type": "text",
|
| 1057 |
+
"text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, pp. 5998–6008, 2017. ",
|
| 1058 |
+
"bbox": [
|
| 1059 |
+
173,
|
| 1060 |
+
357,
|
| 1061 |
+
823,
|
| 1062 |
+
400
|
| 1063 |
+
],
|
| 1064 |
+
"page_idx": 10
|
| 1065 |
+
},
|
| 1066 |
+
{
|
| 1067 |
+
"type": "text",
|
| 1068 |
+
"text": "Ashia C Wilson, Rebecca Roelofs, Mitchell Stern, Nati Srebro, and Benjamin Recht. The marginal value of adaptive gradient methods in machine learning. In Advances in Neural Information Processing Systems, pp. 4151–4161, 2017. ",
|
| 1069 |
+
"bbox": [
|
| 1070 |
+
173,
|
| 1071 |
+
409,
|
| 1072 |
+
823,
|
| 1073 |
+
452
|
| 1074 |
+
],
|
| 1075 |
+
"page_idx": 10
|
| 1076 |
+
},
|
| 1077 |
+
{
|
| 1078 |
+
"type": "text",
|
| 1079 |
+
"text": "Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? In Advances in neural information processing systems, pp. 3320–3328, 2014. ",
|
| 1080 |
+
"bbox": [
|
| 1081 |
+
173,
|
| 1082 |
+
460,
|
| 1083 |
+
823,
|
| 1084 |
+
489
|
| 1085 |
+
],
|
| 1086 |
+
"page_idx": 10
|
| 1087 |
+
},
|
| 1088 |
+
{
|
| 1089 |
+
"type": "image",
|
| 1090 |
+
"img_path": "images/69b39316352d9f1f8940629ba5ab9b5455a8fe93f47eab78addd02b83fc5d47c.jpg",
|
| 1091 |
+
"image_caption": [
|
| 1092 |
+
"Figure 7: Validation loss corresponding to models on the 6 different curves "
|
| 1093 |
+
],
|
| 1094 |
+
"image_footnote": [],
|
| 1095 |
+
"bbox": [
|
| 1096 |
+
174,
|
| 1097 |
+
99,
|
| 1098 |
+
821,
|
| 1099 |
+
198
|
| 1100 |
+
],
|
| 1101 |
+
"page_idx": 11
|
| 1102 |
+
},
|
| 1103 |
+
{
|
| 1104 |
+
"type": "image",
|
| 1105 |
+
"img_path": "images/b7b081d9c3a4611344c321cb61321f2e1e943b1d2efe0bc48fb422a4ff9b1694.jpg",
|
| 1106 |
+
"image_caption": [
|
| 1107 |
+
"Figure 8: Training accuracy corresponding to models on the 6 different curves "
|
| 1108 |
+
],
|
| 1109 |
+
"image_footnote": [],
|
| 1110 |
+
"bbox": [
|
| 1111 |
+
174,
|
| 1112 |
+
242,
|
| 1113 |
+
823,
|
| 1114 |
+
339
|
| 1115 |
+
],
|
| 1116 |
+
"page_idx": 11
|
| 1117 |
+
},
|
| 1118 |
+
{
|
| 1119 |
+
"type": "text",
|
| 1120 |
+
"text": "APPENDIX ",
|
| 1121 |
+
"text_level": 1,
|
| 1122 |
+
"bbox": [
|
| 1123 |
+
176,
|
| 1124 |
+
395,
|
| 1125 |
+
263,
|
| 1126 |
+
410
|
| 1127 |
+
],
|
| 1128 |
+
"page_idx": 11
|
| 1129 |
+
},
|
| 1130 |
+
{
|
| 1131 |
+
"type": "text",
|
| 1132 |
+
"text": "7 ADDITIONAL RESULTS ON ROBUSTNESS OF MC ",
|
| 1133 |
+
"text_level": 1,
|
| 1134 |
+
"bbox": [
|
| 1135 |
+
174,
|
| 1136 |
+
430,
|
| 1137 |
+
606,
|
| 1138 |
+
446
|
| 1139 |
+
],
|
| 1140 |
+
"page_idx": 11
|
| 1141 |
+
},
|
| 1142 |
+
{
|
| 1143 |
+
"type": "text",
|
| 1144 |
+
"text": "7.1 TRAINING DETAILS ",
|
| 1145 |
+
"text_level": 1,
|
| 1146 |
+
"bbox": [
|
| 1147 |
+
176,
|
| 1148 |
+
463,
|
| 1149 |
+
351,
|
| 1150 |
+
478
|
| 1151 |
+
],
|
| 1152 |
+
"page_idx": 11
|
| 1153 |
+
},
|
| 1154 |
+
{
|
| 1155 |
+
"type": "text",
|
| 1156 |
+
"text": "The learning rate is initialized to 0.05 and scaled down by a factor of 5 at epochs $\\{ 6 0 , 1 2 0 , 1 6 0 \\}$ (step decay). We use a training batch size of 100, momentum of 0.9, and a weight decay of 0.0005. Elements of the weight vector corresponding to a neuron are initialized randomly from the normal distribution ${ \\mathcal { N } } ( 0 , { \\sqrt { 2 / n } } )$ where $n$ is the number of inputs to the neuron. We also use data augmentation by random cropping of input images. ",
|
| 1157 |
+
"bbox": [
|
| 1158 |
+
174,
|
| 1159 |
+
491,
|
| 1160 |
+
825,
|
| 1161 |
+
564
|
| 1162 |
+
],
|
| 1163 |
+
"page_idx": 11
|
| 1164 |
+
},
|
| 1165 |
+
{
|
| 1166 |
+
"type": "text",
|
| 1167 |
+
"text": "7.2 PLOTS ",
|
| 1168 |
+
"text_level": 1,
|
| 1169 |
+
"bbox": [
|
| 1170 |
+
176,
|
| 1171 |
+
584,
|
| 1172 |
+
259,
|
| 1173 |
+
598
|
| 1174 |
+
],
|
| 1175 |
+
"page_idx": 11
|
| 1176 |
+
},
|
| 1177 |
+
{
|
| 1178 |
+
"type": "text",
|
| 1179 |
+
"text": "Figures 7, 8 and 9 show the Validation Loss, Training Accuracy and Training Loss respectively for the curves joining the 6 pairs discussed in Section 2.1.1. These results too, confirm the overfitting or poor generalization tendency of models on the curve. ",
|
| 1180 |
+
"bbox": [
|
| 1181 |
+
173,
|
| 1182 |
+
612,
|
| 1183 |
+
825,
|
| 1184 |
+
655
|
| 1185 |
+
],
|
| 1186 |
+
"page_idx": 11
|
| 1187 |
+
},
|
| 1188 |
+
{
|
| 1189 |
+
"type": "text",
|
| 1190 |
+
"text": "7.3 T-SNE VISUALIZATION FOR THE 7 MODES ",
|
| 1191 |
+
"text_level": 1,
|
| 1192 |
+
"bbox": [
|
| 1193 |
+
174,
|
| 1194 |
+
675,
|
| 1195 |
+
506,
|
| 1196 |
+
689
|
| 1197 |
+
],
|
| 1198 |
+
"page_idx": 11
|
| 1199 |
+
},
|
| 1200 |
+
{
|
| 1201 |
+
"type": "text",
|
| 1202 |
+
"text": "We use t-SNE (Maaten & Hinton, 2008) to visualize these 7 modes and the $\\theta$ points that define the connectivity for the 6 pairs presented in Section 2.1.1, in a 2-dimensional plot in Figure 10. Since tSNE is known to map only local information correctly and not preserve global distances, we caution the reader about the limited interpretability of this visualization, it is presented simply to establish the notion of connected modes. ",
|
| 1203 |
+
"bbox": [
|
| 1204 |
+
173,
|
| 1205 |
+
702,
|
| 1206 |
+
825,
|
| 1207 |
+
772
|
| 1208 |
+
],
|
| 1209 |
+
"page_idx": 11
|
| 1210 |
+
},
|
| 1211 |
+
{
|
| 1212 |
+
"type": "image",
|
| 1213 |
+
"img_path": "images/73d8dbbd661bb0fe40cc7f7d7f53a745ce6e9fc4129286a3f634347677dd7f2d.jpg",
|
| 1214 |
+
"image_caption": [
|
| 1215 |
+
"Figure 9: Training loss corresponding to models on the 6 different curves. "
|
| 1216 |
+
],
|
| 1217 |
+
"image_footnote": [],
|
| 1218 |
+
"bbox": [
|
| 1219 |
+
174,
|
| 1220 |
+
796,
|
| 1221 |
+
823,
|
| 1222 |
+
893
|
| 1223 |
+
],
|
| 1224 |
+
"page_idx": 11
|
| 1225 |
+
},
|
| 1226 |
+
{
|
| 1227 |
+
"type": "image",
|
| 1228 |
+
"img_path": "images/1bdc5f487c4e5cbc3f562b8f09c4d61bcf95fda1de61f24d4bafd340ea9320e7.jpg",
|
| 1229 |
+
"image_caption": [
|
| 1230 |
+
"Figure 10: Representing the modes and their connecting point using t-SNE "
|
| 1231 |
+
],
|
| 1232 |
+
"image_footnote": [],
|
| 1233 |
+
"bbox": [
|
| 1234 |
+
359,
|
| 1235 |
+
136,
|
| 1236 |
+
614,
|
| 1237 |
+
263
|
| 1238 |
+
],
|
| 1239 |
+
"page_idx": 12
|
| 1240 |
+
},
|
| 1241 |
+
{
|
| 1242 |
+
"type": "text",
|
| 1243 |
+
"text": "8 ADDITIONAL SGDR RESULTS ",
|
| 1244 |
+
"text_level": 1,
|
| 1245 |
+
"bbox": [
|
| 1246 |
+
174,
|
| 1247 |
+
314,
|
| 1248 |
+
457,
|
| 1249 |
+
330
|
| 1250 |
+
],
|
| 1251 |
+
"page_idx": 12
|
| 1252 |
+
},
|
| 1253 |
+
{
|
| 1254 |
+
"type": "text",
|
| 1255 |
+
"text": "8.1 ADDITIONAL RESULTS ",
|
| 1256 |
+
"bbox": [
|
| 1257 |
+
174,
|
| 1258 |
+
347,
|
| 1259 |
+
370,
|
| 1260 |
+
361
|
| 1261 |
+
],
|
| 1262 |
+
"page_idx": 12
|
| 1263 |
+
},
|
| 1264 |
+
{
|
| 1265 |
+
"type": "text",
|
| 1266 |
+
"text": "For completeness, in Figure 11, we present the Validation loss, Validation accuracy and Training accuracy results for the curves and line segments joining iterates from SGDR and SGDR discussed in Figure 2(c) and (d). ",
|
| 1267 |
+
"bbox": [
|
| 1268 |
+
174,
|
| 1269 |
+
372,
|
| 1270 |
+
825,
|
| 1271 |
+
415
|
| 1272 |
+
],
|
| 1273 |
+
"page_idx": 12
|
| 1274 |
+
},
|
| 1275 |
+
{
|
| 1276 |
+
"type": "text",
|
| 1277 |
+
"text": "8.2 PROJECTING ITERATES ",
|
| 1278 |
+
"text_level": 1,
|
| 1279 |
+
"bbox": [
|
| 1280 |
+
174,
|
| 1281 |
+
431,
|
| 1282 |
+
374,
|
| 1283 |
+
445
|
| 1284 |
+
],
|
| 1285 |
+
"page_idx": 12
|
| 1286 |
+
},
|
| 1287 |
+
{
|
| 1288 |
+
"type": "text",
|
| 1289 |
+
"text": "The $W _ { n }$ in Figure 3 is equivalent to ",
|
| 1290 |
+
"bbox": [
|
| 1291 |
+
174,
|
| 1292 |
+
457,
|
| 1293 |
+
410,
|
| 1294 |
+
472
|
| 1295 |
+
],
|
| 1296 |
+
"page_idx": 12
|
| 1297 |
+
},
|
| 1298 |
+
{
|
| 1299 |
+
"type": "equation",
|
| 1300 |
+
"img_path": "images/8016553fb8d05fe7bd055ab4c1972b25bedcbe1875f4deef6fe10c2a3b2e40c5.jpg",
|
| 1301 |
+
"text": "$$\nW _ { n } = P _ { c } ( w _ { n } ) = { \\lambda ^ { \\star } } ^ { \\top } \\left[ \\begin{array} { c } { w _ { 7 0 } } \\\\ { w _ { 1 5 0 } } \\\\ { \\theta } \\end{array} \\right]\n$$",
|
| 1302 |
+
"text_format": "latex",
|
| 1303 |
+
"bbox": [
|
| 1304 |
+
397,
|
| 1305 |
+
479,
|
| 1306 |
+
601,
|
| 1307 |
+
522
|
| 1308 |
+
],
|
| 1309 |
+
"page_idx": 12
|
| 1310 |
+
},
|
| 1311 |
+
{
|
| 1312 |
+
"type": "equation",
|
| 1313 |
+
"img_path": "images/d74fcaf45c5ebd854f515007ba55d6341ee2f485a314af569f52262782e0594f.jpg",
|
| 1314 |
+
"text": "$$\n\\begin{array} { r } { \\mathrm { w h e r e \\ } \\lambda ^ { \\star } = \\operatorname * { a r g m i n } _ { \\lambda \\in \\mathbb { R } ^ { 3 } } \\| \\lambda ^ { \\top } \\left[ { \\boldsymbol w } _ { 1 5 0 } ^ { w _ { 7 0 } } \\right] - w _ { n } \\| _ { 2 } ^ { 2 } } \\end{array}\n$$",
|
| 1315 |
+
"text_format": "latex",
|
| 1316 |
+
"bbox": [
|
| 1317 |
+
346,
|
| 1318 |
+
546,
|
| 1319 |
+
651,
|
| 1320 |
+
589
|
| 1321 |
+
],
|
| 1322 |
+
"page_idx": 12
|
| 1323 |
+
},
|
| 1324 |
+
{
|
| 1325 |
+
"type": "text",
|
| 1326 |
+
"text": "meaning it is the point on the plane (linear combination of $w _ { 7 0 } , w _ { 1 5 0 }$ and $\\theta$ ) with the least l-2 distance from the original point (iterate in this case). ",
|
| 1327 |
+
"bbox": [
|
| 1328 |
+
173,
|
| 1329 |
+
593,
|
| 1330 |
+
823,
|
| 1331 |
+
622
|
| 1332 |
+
],
|
| 1333 |
+
"page_idx": 12
|
| 1334 |
+
},
|
| 1335 |
+
{
|
| 1336 |
+
"type": "text",
|
| 1337 |
+
"text": "8.3 CONNECTING MODES $w _ { 3 0 }$ AND $w _ { 7 0 }$ FROM SGDR ",
|
| 1338 |
+
"text_level": 1,
|
| 1339 |
+
"bbox": [
|
| 1340 |
+
173,
|
| 1341 |
+
638,
|
| 1342 |
+
552,
|
| 1343 |
+
654
|
| 1344 |
+
],
|
| 1345 |
+
"page_idx": 12
|
| 1346 |
+
},
|
| 1347 |
+
{
|
| 1348 |
+
"type": "text",
|
| 1349 |
+
"text": "In Section 3, we present some experiments and make observations on the trajectory of SGDR by using the plane defined by the points $w _ { 7 0 }$ , $w _ { 1 5 0 }$ and $w _ { 7 0 - 1 5 0 }$ . Here we plot the Training loss and Validation loss surface in Figure 12 for another plane defined by SGDR’s iterates $w _ { 3 0 } , w _ { 7 0 }$ and their connection $w _ { 3 0 - 7 0 }$ to ensure the reader that the observations made are general enough. ",
|
| 1350 |
+
"bbox": [
|
| 1351 |
+
173,
|
| 1352 |
+
664,
|
| 1353 |
+
825,
|
| 1354 |
+
720
|
| 1355 |
+
],
|
| 1356 |
+
"page_idx": 12
|
| 1357 |
+
},
|
| 1358 |
+
{
|
| 1359 |
+
"type": "text",
|
| 1360 |
+
"text": "8.4 RESULTS FOR VGG-16 WITH BATCH NORMALIZATION ",
|
| 1361 |
+
"text_level": 1,
|
| 1362 |
+
"bbox": [
|
| 1363 |
+
174,
|
| 1364 |
+
736,
|
| 1365 |
+
594,
|
| 1366 |
+
752
|
| 1367 |
+
],
|
| 1368 |
+
"page_idx": 12
|
| 1369 |
+
},
|
| 1370 |
+
{
|
| 1371 |
+
"type": "text",
|
| 1372 |
+
"text": "The VGG-16 architecture used in Section 3 does not include Batch Normalization, which has been known to alter properties of the loss surface (Santurkar et al. (2018)). Therefore we train VGG16 with Batch Normalization using SGDR to verify if our observations hold for this case too. As pointed out in Appendix A.2 of Garipov et al. (2018), at the test stage, we compute the Batch Normalization statistics for a network on the curve with an additional pass over the data, since these are not collected during training. Except Batch Normalization, other training parameters are kept the same as discussed for Section 3. ",
|
| 1373 |
+
"bbox": [
|
| 1374 |
+
174,
|
| 1375 |
+
762,
|
| 1376 |
+
825,
|
| 1377 |
+
861
|
| 1378 |
+
],
|
| 1379 |
+
"page_idx": 12
|
| 1380 |
+
},
|
| 1381 |
+
{
|
| 1382 |
+
"type": "text",
|
| 1383 |
+
"text": "Figure 13(a) shows the training loss for models along the line segment and MC curve joining the pair of iterates from SGDR. For the two pairs $\\{ w _ { 3 0 } , w _ { 1 5 0 } \\}$ and $\\{ w _ { 7 0 } , w _ { 1 5 0 } \\}$ , we again observe a higher training loss for models on the line segment, suggesting that for this setup too, SGDR finds paths that move over a barrier in the training loss landscape. We further evaluate the intermediate points on the hyperplane defined by $\\{ w _ { 7 0 } , w _ { 1 5 0 } , w _ { 7 0 - 1 5 0 } \\}$ and plot their training and validation loss in Figure 13(b) and (c) respectively. Our previous observations regarding (a) the iterates $w _ { 7 0 }$ and $w _ { 1 5 0 }$ not lying in different basins, (b) the MC-found $\\theta$ or $w _ { 7 0 - 1 5 0 }$ generalizing poorly and (c) averaging of iterates improving generalization hold true here as well. ",
|
| 1384 |
+
"bbox": [
|
| 1385 |
+
174,
|
| 1386 |
+
867,
|
| 1387 |
+
823,
|
| 1388 |
+
924
|
| 1389 |
+
],
|
| 1390 |
+
"page_idx": 12
|
| 1391 |
+
},
|
| 1392 |
+
{
|
| 1393 |
+
"type": "image",
|
| 1394 |
+
"img_path": "images/301c57ddf40667503bc48305d49272ad763e18bccb49a323b9e90b22126f365f.jpg",
|
| 1395 |
+
"image_caption": [
|
| 1396 |
+
"Figure 11: Left Column: Connecting iterates from SGD with step-decay learning rate scheme Right Column: Connecting iterates from SGDR Top Row: Training Accuracy on the curve found through Mode Connectivity (MC Curve) and on the line segment (Line Seg.) joining iterates from SGDR and SGD. Middle row: Validation Accuracy on the curve found through Mode Connectivity (MC Curve) and on the line segment (Line Seg.) joining iterates from SGDR and SGD. Bottom row Validation Loss on the curve found through Mode Connectivity (MC Curve) and on the line segment (Line Seg.) joining iterates from SGDR and SGD. "
|
| 1397 |
+
],
|
| 1398 |
+
"image_footnote": [],
|
| 1399 |
+
"bbox": [
|
| 1400 |
+
181,
|
| 1401 |
+
217,
|
| 1402 |
+
820,
|
| 1403 |
+
698
|
| 1404 |
+
],
|
| 1405 |
+
"page_idx": 13
|
| 1406 |
+
},
|
| 1407 |
+
{
|
| 1408 |
+
"type": "image",
|
| 1409 |
+
"img_path": "images/c97dd798b1d88a248fe020bc4289e07768e7b6984f73d8acde7c0b30333aba45.jpg",
|
| 1410 |
+
"image_caption": [
|
| 1411 |
+
"Figure 12: Training Loss (left) and Validation Loss (right) surface (log scale) for points on the plane defined by $\\{ w _ { 3 0 } , w _ { 7 0 } , w _ { 3 0 - 7 0 } \\}$ including projections of iterates on this plane "
|
| 1412 |
+
],
|
| 1413 |
+
"image_footnote": [],
|
| 1414 |
+
"bbox": [
|
| 1415 |
+
196,
|
| 1416 |
+
101,
|
| 1417 |
+
799,
|
| 1418 |
+
237
|
| 1419 |
+
],
|
| 1420 |
+
"page_idx": 14
|
| 1421 |
+
},
|
| 1422 |
+
{
|
| 1423 |
+
"type": "text",
|
| 1424 |
+
"text": "",
|
| 1425 |
+
"bbox": [
|
| 1426 |
+
173,
|
| 1427 |
+
300,
|
| 1428 |
+
826,
|
| 1429 |
+
357
|
| 1430 |
+
],
|
| 1431 |
+
"page_idx": 14
|
| 1432 |
+
},
|
| 1433 |
+
{
|
| 1434 |
+
"type": "image",
|
| 1435 |
+
"img_path": "images/edee5624523a5127b50bb5b9b6306a15e428abdc3e8b3dfbdcd34b0e74cebdaf.jpg",
|
| 1436 |
+
"image_caption": [
|
| 1437 |
+
"Figure 13: (a) Training loss for points on line segment and MC curve joining the pairs $w _ { 3 0 } - w _ { 7 0 }$ , $w _ { 3 0 } - w _ { 1 5 0 }$ and $w _ { 7 0 } - w _ { 1 5 0 }$ (b) Training loss surface (log scale) for points on the plane defined by $\\{ w _ { 7 0 } , w _ { 1 5 0 } , w _ { 7 0 - 1 5 0 } \\}$ including projections of iterates on this plane, (c) Validation Loss Surface (log scale) for points on the plane defined by $\\{ w _ { 7 0 } , w _ { 1 5 0 } , w _ { 7 0 - 1 5 0 } \\}$ including projections of iterates on this plane "
|
| 1438 |
+
],
|
| 1439 |
+
"image_footnote": [],
|
| 1440 |
+
"bbox": [
|
| 1441 |
+
122,
|
| 1442 |
+
369,
|
| 1443 |
+
875,
|
| 1444 |
+
540
|
| 1445 |
+
],
|
| 1446 |
+
"page_idx": 14
|
| 1447 |
+
},
|
| 1448 |
+
{
|
| 1449 |
+
"type": "text",
|
| 1450 |
+
"text": "9 SGDR CCA HEATMAPS ",
|
| 1451 |
+
"text_level": 1,
|
| 1452 |
+
"bbox": [
|
| 1453 |
+
176,
|
| 1454 |
+
647,
|
| 1455 |
+
406,
|
| 1456 |
+
664
|
| 1457 |
+
],
|
| 1458 |
+
"page_idx": 14
|
| 1459 |
+
},
|
| 1460 |
+
{
|
| 1461 |
+
"type": "text",
|
| 1462 |
+
"text": "In Figure 14, we present the CCA similarity plots comparing two pairs of models: epochs 10 and 150, and epochs 150 and 155. The $( i , j ) ^ { t h }$ block of the matrix denotes the correlation between the $i ^ { t h }$ layer of the first model and the $j ^ { t h }$ layer of the other. A high correlation implies that the layers learn similar representations and vice versa. We present the former to compare against the typical stepwise or linear decay of SGD, and the latter to demonstrate the immediate effect of restarting on the model. Raghu et al. (2017) showed in their work that for typical SGD training, a CCA similarity plot between a partially and completed trained network reveals that the activations of the shallower layers bears closer resemblance in the two models than the deeper layers. We note that, despite the restart, a similar tendency is seen in SGDR training as well. This again suggests that the restart does not greatly impact the model, both in weights and representations, and especially so in the shallower layers. A comparison of epochs 150 and 155, i.e., before and after a restart also stands as evidence for this hypothesis. ",
|
| 1463 |
+
"bbox": [
|
| 1464 |
+
173,
|
| 1465 |
+
678,
|
| 1466 |
+
825,
|
| 1467 |
+
844
|
| 1468 |
+
],
|
| 1469 |
+
"page_idx": 14
|
| 1470 |
+
},
|
| 1471 |
+
{
|
| 1472 |
+
"type": "text",
|
| 1473 |
+
"text": "10 WARMUP EXPERIMENTS ON RESNET-18 AND RESNET-32 ",
|
| 1474 |
+
"text_level": 1,
|
| 1475 |
+
"bbox": [
|
| 1476 |
+
176,
|
| 1477 |
+
864,
|
| 1478 |
+
696,
|
| 1479 |
+
881
|
| 1480 |
+
],
|
| 1481 |
+
"page_idx": 14
|
| 1482 |
+
},
|
| 1483 |
+
{
|
| 1484 |
+
"type": "text",
|
| 1485 |
+
"text": "In Figure 4(d), we show that the stability induced by warmup when training with large batches and learning rates can also be obtained by holding the FC stack frozen. This experiment was conducted on the VGG-11 network (Simonyan & Zisserman, 2014). To demonstrate the generality of our claim, we present additional experiments on two ResNet architectures: 18 and 32. The setup for this experiment is identical to the VGG-11 one with one change: instead of the learning rate being set to 2.5, which is the learning rate for SB (0.05) times the batch size increase $( 5 0 \\times )$ , we set it to 5.0 since SB training is better with 0.1. For the warmup case, we linearly increase the learning rate from 0 to 5 again for 20 epochs. Experiments on other configurations yielded similar results. Whether these results remain true also for training larger datasets, such as ImageNet, remains to be shown and is a topic of future research. ",
|
| 1486 |
+
"bbox": [
|
| 1487 |
+
174,
|
| 1488 |
+
895,
|
| 1489 |
+
821,
|
| 1490 |
+
924
|
| 1491 |
+
],
|
| 1492 |
+
"page_idx": 14
|
| 1493 |
+
},
|
| 1494 |
+
{
|
| 1495 |
+
"type": "image",
|
| 1496 |
+
"img_path": "images/b7287c9e9083a060b6d5a942f6c41d5a7fbcd52b0e5455aefca826249e01c6ce.jpg",
|
| 1497 |
+
"image_caption": [
|
| 1498 |
+
"Figure 14: CCA similarity scores between two pairs of models. (a) comparings models at epochs 150 and 155, (b) comparing models at epochs 10 and 150. The $i , j$ -th cell in each pane represents the CCA similarity between layer $i$ of $w _ { a }$ (model at epoch a) and layer $j$ of model $w _ { b }$ (model at epoch b). "
|
| 1499 |
+
],
|
| 1500 |
+
"image_footnote": [],
|
| 1501 |
+
"bbox": [
|
| 1502 |
+
173,
|
| 1503 |
+
99,
|
| 1504 |
+
825,
|
| 1505 |
+
289
|
| 1506 |
+
],
|
| 1507 |
+
"page_idx": 15
|
| 1508 |
+
},
|
| 1509 |
+
{
|
| 1510 |
+
"type": "image",
|
| 1511 |
+
"img_path": "images/141164a732814156b675d070646dc3ae2059d1cec7c654c1cda4bdf13e82cf2d.jpg",
|
| 1512 |
+
"image_caption": [
|
| 1513 |
+
"Figure 15: Experiment comparing warmup and FC freezing strategies on ResNet architectures. "
|
| 1514 |
+
],
|
| 1515 |
+
"image_footnote": [],
|
| 1516 |
+
"bbox": [
|
| 1517 |
+
199,
|
| 1518 |
+
375,
|
| 1519 |
+
797,
|
| 1520 |
+
535
|
| 1521 |
+
],
|
| 1522 |
+
"page_idx": 15
|
| 1523 |
+
},
|
| 1524 |
+
{
|
| 1525 |
+
"type": "text",
|
| 1526 |
+
"text": "",
|
| 1527 |
+
"bbox": [
|
| 1528 |
+
173,
|
| 1529 |
+
590,
|
| 1530 |
+
825,
|
| 1531 |
+
702
|
| 1532 |
+
],
|
| 1533 |
+
"page_idx": 15
|
| 1534 |
+
}
|
| 1535 |
+
]
|
parse/train/r14EOsCqKX/r14EOsCqKX_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/r14EOsCqKX/r14EOsCqKX_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/r1lPleBFvH/r1lPleBFvH.md
ADDED
|
@@ -0,0 +1,382 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# UNDERSTANDING THE LIMITATIONS OF CONDITIONAL GENERATIVE MODELS
|
| 2 |
+
|
| 3 |
+
Ethan Fetaya∗ Jörn-Henrik Jacobsen∗
|
| 4 |
+
|
| 5 |
+
Will Grathwohl Richard Zemel
|
| 6 |
+
|
| 7 |
+
Vector Institute and University of Toronto {ethanf, jjacobs,wgrathwohl, zemel} $@$ cs.toronto.edu
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
Class-conditional generative models hold promise to overcome the shortcomings of their discriminative counterparts. They are a natural choice to solve discriminative tasks in a robust manner as they jointly optimize for predictive performance and accurate modeling of the input distribution. In this work, we investigate robust classification with likelihood-based generative models from a theoretical and practical perspective to investigate if they can deliver on their promises. Our analysis focuses on a spectrum of robustness properties: (1) Detection of worst-case outliers in the form of adversarial examples; (2) Detection of average-case outliers in the form of ambiguous inputs and (3) Detection of incorrectly labeled in-distribution inputs.
|
| 12 |
+
|
| 13 |
+
Our theoretical result reveals that it is impossible to guarantee detectability of adversarially-perturbed inputs even for near-optimal generative classifiers. Experimentally, we find that while we are able to train robust models for MNIST, robustness completely breaks down on CIFAR10. We relate this failure to various undesirable model properties that can be traced to the maximum likelihood training objective. Despite being a common choice in the literature, our results indicate that likelihood-based conditional generative models may are surprisingly ineffective for robust classification.
|
| 14 |
+
|
| 15 |
+
# 1 INTRODUCTION
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: Linear interpolations of inputs and respective outputs of a conditional generative model between two MNIST and CIFAR10 images from different classes. X-axis is interpolation steps and Y-axis negative log-likelihood in bits/dim (higher is more likely under model). MNIST interpolated images are far less likely than real images, whereas for CIFAR10 the opposite is observed, leading to high confidence classification of ambiguous out-of-distribution images.
|
| 19 |
+
|
| 20 |
+
Conditional generative models have recently shown promise to overcome many limitations of their discriminative counterparts. They have been shown to be robust against adversarial attacks (Schott et al., 2019; Ghosh et al., 2019; Song et al., 2018; Li et al., 2018; Frosst et al., 2018), to enable robust classification in the presence of outliers (Nalisnick et al., 2019b) and to achieve promising results in semi-supervised learning (Kingma et al., 2014; Salimans et al., 2016). Motivated by these success stories, we study the properties of conditional generative models in more detail.
|
| 21 |
+
|
| 22 |
+
Unlike discriminative models, which can ignore class-irrelevant information, conditional generative models cannot discard any information in the input, potentially making it harder to fool them. Further, jointly modeling the input and target distribution should make it easy to detect out-of-distribution inputs. These traits lend hope to the belief that good class-conditional generative models can overcome important problems faced by discriminative models.
|
| 23 |
+
|
| 24 |
+
In this work, we analyze conditional generative models by assessing them on a spectrum of robustness tasks. (1) Detection of worst-case outliers in the form of adversarial examples; (2) Detection of average-case outliers in the form of ambiguous inputs and (3) Detection of incorrectly labeled indistribution inputs. If a generative classifier is able to perform well on all of these, it will naturally be robust to noisy, ambiguous or adversarially perturbed inputs.
|
| 25 |
+
|
| 26 |
+
Outlier detection in the above settings is substantially different from general out-of-distribution (OOD) detection, where the goal is to use unconditional generative models to detect any OOD input. For the general case, likelihood has been shown to be a poor detector of OOD samples. In fact, often higher likelihood is assigned to OOD data than to the training data itself (Nalisnick et al., 2019a). However, class-conditional likelihood necessarily needs to decrease towards the decision-boundary for the classifier to work well. Thus, if the class-conditional generative model has high accuracy, rejection of outliers from the wrong class via likelihood may be possible.
|
| 27 |
+
|
| 28 |
+
Our contributions are:
|
| 29 |
+
|
| 30 |
+
Provable Robustness We answer: Can we theoretically guarantee that a strong conditional generative model can robustly detect adversarially attacked inputs? In section 2 we show that even a near-perfect conditional generative model cannot be guaranteed to reject adversarially perturbed inputs with high probability.
|
| 31 |
+
|
| 32 |
+
Assessing the Likelihood Objective We discuss the basis to empirically analyze robustness in practice. We identify several fundamental issues with the maximum likelihood objective typically used to train conditional generative models and discuss whether it is appropriate for detecting out-of-distribution inputs.
|
| 33 |
+
|
| 34 |
+
Understanding Conflicting Results We explore various properties of our trained conditional generative models and how they relate to fact that the model is robust on MNIST but not on CIFAR10. We further propose a new dataset where we combine MNIST images with CIFAR background, making the generative task as hard as CIFAR while keeping the discriminative task as easy as MNIST, and investigate how it affects robustness.
|
| 35 |
+
|
| 36 |
+
# 2 CONFIDENT MISTAKES CANNOT BE RULED OUT
|
| 37 |
+
|
| 38 |
+
The most challenging task in robust classification is accurately classifying or detecting adversarial attacks; inputs which have been maliciously perturbed to fool the classifier. In this section we discuss the possibility of guaranteeing robustness to adversarial attacks via conditional generative models.
|
| 39 |
+
|
| 40 |
+
Detectability of Adversarial Examples In the adversarial spheres work (Gilmer et al., 2018) the authors showed that a model can be fooled without changing the ground-truth probability of the attacked datapoint. This was claimed to show that adversarial examples can lie on the data manifold and therefore cannot be detected. While (Gilmer et al., 2018) is an important work for understanding adversarial attacks, it has several limitations with regard to conditional generative models. First, just because the attack does not change the ground-truth likelihood, this does not mean the model can not detect the attack. Since the adversary needs to move the input to a location where the model is incorrect, the question arises: what kind of mistake will the model make? If the model assigns low likelihood to the correct class without increasing the likelihood of the other classes then the adversarial attack will be detected, as the joint likelihood over all classes moves below the threshold of typical inputs. Second, on the adversarial spheres dataset (Gilmer et al., 2018) the class supports do not overlap. If we were to train a model of the joint density $p _ { \theta } ( x , y )$ (which does not have $100 \%$ classification accuracy) then the KL divergence $K L ( p ( x , y ) | | p _ { \theta } ( x , y ) )$ , where $p ( x , y )$ is the data density, is infinite due to division by zero (note that $K L ( p _ { \theta } ( x , y ) | | p ( x , y ) )$ is what is minimized with maximum likelihood). This poses the question, whether small $K L ( p ( x , y ) | | p _ { \theta } ( x , y ) )$ or small Shannon-Jensen divergence is sufficient to guarantee robustness. In the following, we show that this condition is insufficient.
|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
Figure 2: Counter example construction. Shown on the left are the two class data densities, on the right the Bayes-optimal classifier for this problem (assuming $\lambda _ { 1 } > \lambda _ { 2 }$ ) and the model we consider. Despite being almost optimal, the model can be fooled with undetectable adversarial examples (red arrows). Detailed description in section 2.
|
| 44 |
+
|
| 45 |
+
Why no Robustness Guarantee can be Given The intuition why conditional generative models should be robust is as follows: If we have a robust discriminative model then the set of confident mistakes, i.e. where the adversarial attacks must reside, has low probability but might be large in volume. For a robust conditional generative model, the set of undetectable adversarial attacks, i.e. high-density high-confidence mistakes, has to be small in volume. Since the adversary has to be $\Delta$ close to this small volume set, the $\Delta$ area around this small volume set should still be small. This is where the idea breaks down due to the curse of dimensionality. Expanding a set by a small radius can lead to a much larger one even with smoothness assumptions. Based on this insight we build an analytic counter-example for which we can prove that even if
|
| 46 |
+
|
| 47 |
+
$$
|
| 48 |
+
\begin{array} { r } { K L \left( q | | p \right) < \epsilon \quad K L \left( p | | q \right) < \epsilon } \end{array}
|
| 49 |
+
$$
|
| 50 |
+
|
| 51 |
+
where $p = p ( x , y )$ is the data distribution, and $q = q ( x , y )$ is the model, we can with probability $\approx 0 . 5$ take a correctly classified input sampled from $p$ , and perturb it by at most $\Delta$ to create an adversarial example that is classified incorrectly and is not detectable.
|
| 52 |
+
|
| 53 |
+
We note that the probability in every ball with radius $\Delta$ can be made as small as desired, excluding degenerate cases. We also assume that the Bayes optimal classifier is confident and is not affected by the attack, i.e. we do not change the underlying class but wrongfully flip the decision of the classifier.
|
| 54 |
+
|
| 55 |
+
The counter-example goes as follows: Let $U ( a , b )$ be the density of a uniform distribution on an annulus in dimension $d$ , $\{ x \in \mathbb { R } ^ { d } : a \leq | | x | | \leq b \}$ then the data conditional distribution is
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
\begin{array} { r l r l r } { p ( x | 0 ) = } & { { } \lambda _ { 1 } U ( 0 , 1 ) + ( 1 - \lambda _ { 1 } ) U ( 1 , 1 + \Delta ) } & { } & { { } 0 \le \lambda _ { 1 } \le 1 } \\ { p ( x | 1 ) = } & { { } } & { \lambda _ { 2 } U ( 0 , 1 ) + ( 1 - \lambda _ { 2 } ) U ( 2 , 3 ) } & { } & { { } 0 \le \lambda _ { 2 } \le 1 } \end{array}
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
with $p ( y = 0 ) = p ( y = 1 ) = 1 / 2$ . Both classes are a mixture of two distributions, uniform on the unit sphere and uniform on an annulus, as shown in Fig. 2. The model distribution is the following:
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
\begin{array} { r l } { q ( x | 0 ) = } & { { } U ( 0 , 1 + \Delta ) } \\ { q ( x | 1 ) = } & { { } \lambda _ { 2 } U ( 0 , 1 ) + ( 1 - \lambda _ { 2 } ) U ( 2 , 3 ) } \end{array}
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
i.e. for $y = 1$ the model is perfect, while for $y ~ = ~ 0$ we replace the mixture with uniform distribution over the whole domain. If $\lambda _ { 1 } \gg \lambda _ { 2 }$ then points in the sphere with radius 1 should be classified as class $y = 0$ with high likelihood. If $\begin{array} { r } { \hat { \lambda } _ { 2 } > > \frac { 1 } { ( 1 + \Delta ) ^ { d } } } \end{array}$ then the model classifies points in the unit sphere incorrectly with high likelihood. Finally if $1 > > \lambda _ { 1 }$ then almost half the data points will fall in the annulus between 1 and $1 + \Delta$ and can be adversarially attacked with distance lesser or equal to $\Delta$ by moving them into the unit sphere as seen in Fig. 2. We also note that these attacks cannot be detected as the model likelihood only increases. In high dimensions, almost all the volume of a sphere is in the outer shell, and this can be used to show that in high enough dimensions we can get the condition in Eq. 1 for any value of $\epsilon$ and $\Delta$ (and also the confidence of the mistakes $\delta$ ). The detailed proof is in the supplementary material.
|
| 68 |
+
|
| 69 |
+
This counter-example shows that even under very strong conditions, a good conditional generative model can be attacked. Therefore no theoretical guarantees can be given in the general case for these models. Our construction, however, does not depend on the learning model but on the data geometry. This raises interesting questions concerning the source of the susceptibility to attacks: Is it the model or an inherent issue with the data?
|
| 70 |
+
|
| 71 |
+
# 3 THE MAXIMUM LIKELIHOOD OBJECTIVE
|
| 72 |
+
|
| 73 |
+
# 3.1 THE DIFFICULTY IN TRAINING CONDITIONAL GENERATIVE MODELS
|
| 74 |
+
|
| 75 |
+
Most recent publications on likelihood-based generative models primarily focus on quantitative results of unconditonal density estimation (van den Oord et al., 2016; Kingma & Dhariwal, 2018; Salimans et al., 2017b; Kingma et al., 2016; Papamakarios et al., 2017). For conditional density estimation, either only qualitative samples are shown (Kingma & Dhariwal, 2018), or it is reported that conditional density estimation does not lead to better likelihoods than unconditional density estimation. In fact, it has been reported that conditional density estimation can lead to slightly worse data likelihoods (Papamakarios et al., 2017; Salimans et al., 2017b), which is surprising at first, as extra bits of important information are provided to the model.
|
| 76 |
+
|
| 77 |
+
Explaining Likelihood Behaviour One way to understand this seemingly contradictory relationship is to consider the objective we use to train our models. When we train a generative model with maximum likelihood (either exactly or through a lower bound) we are minimizing the empirical approximation of $\mathbb { E } _ { x , y \sim P } \left[ - \log ( P _ { \theta } ( \dot { x } , y ) ) \right]$ which is equivalent to minimizing $K L ( \bar { P } ( x , y ) | | \bar { P } _ { \theta } ( x , y ) )$ . Consider now an image $x$ with a discrete label $y$ , which we are trying to model using $P _ { \theta } ( x , y )$ . The negative log-likelihood (NLL) objective is:
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
\begin{array} { r l } { \mathbb { E } _ { ( x , y ) \sim P } [ - \log ( P _ { \theta } ( x , y ) ) ] = } & { \ \mathbb { E } _ { x \sim P } [ - \log ( P _ { \theta } ( x ) ) ] } \\ { + } & { \mathbb { E } _ { x \sim P } [ \mathbb { E } _ { y } [ - \log ( P _ { \theta } ( y | x ) ) | x ] ] } \end{array}
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
If we model $P _ { \theta } ( y | x )$ with a uniform distribution over classes, then the second term has a value of $\log ( C )$ where $C$ is the number of classes. This value is negligible compared to the first term $\mathbb { E } _ { x \sim P } [ - \log ( P _ { \theta } ( x ) ) ]$ and therefore the “penalty" for completely ignoring class information is negligible. So it is not surprising that models with strong generative abilities can have limited discriminative power. What makes matters even worse is that the penalty for confident mis-classification can be unbounded. This may also explain why the conditional ELBO is comparable to the unconditional ELBO (Papamakarios et al., 2017). Another way this can be seen is by thinking of the likelihood as the best lossless compression. When trying to encode an image, the benefit of the label is at most $\log ( C )$ bits which is small compared to the whole image. While these few bits are important for users, from a likelihood perspective the difference between the correct $p ( y | x )$ and a uniform distribution is negligible. This means that when naively training a class-conditional generative model by minimizing $\mathbb { E } _ { ( x , y ) \sim P } [ - \log ( P _ { \theta } ( x | y ) ) ]$ , typically discriminative performance as a classifier is very poor.
|
| 84 |
+
|
| 85 |
+
# 3.2 OUTLIER DETECTION
|
| 86 |
+
|
| 87 |
+
Another issue arises when models trained with maximum likelihood are used to detect outliers. The main issue is that maximum likelihood, which is equivalent to minimizing $K L ( P ( x , y ) | | P _ { \theta } ( x , y ) )$ , is known to have a “mode-covering” behavior. It has been shown recently in (Nalisnick et al., 2019a) that generative models, trained using maximum likelihood, can be quite poor at detecting out-of-distribution example. In fact it has been shown that these models can give higher likelihood values, on average, to datasets different from the test dataset that corresponds to the training data. Intuitivily one can still hope that a high accuracy conditional generative model would recognize an input conditioned on the wrong class as an outlier, as it was successfully trained to separate these classes. In section 4.2 we show this is not the case in practice.
|
| 88 |
+
|
| 89 |
+
While (Nalisnick et al., 2019a) focuses its analysis into dataset variance, we propose this is an inherit issue with the likelihood objective. If it is correct then the way conditional generative models are trained is at odds with their desired behaviour. If this is the case, then useful conditional generative model will require a fundamentally different approach.
|
| 90 |
+
|
| 91 |
+
# 4 EXPERIMENTS
|
| 92 |
+
|
| 93 |
+
We now present a set of experiments designed to test the robustness of conditional generative models. All experiments were performed with a flow model where the likelihood can be computed in closed form as the probability of the latent space embedding (the prior) and a Jacobian correction term; see Sec A.1 for a detailed explanation. Given that we can compute $p ( x , y )$ for each class, we can easily compute $p ( y | x )$ and classify accordingly. Besides allowing closed-form likelihood computation, the flexibility in choosing the prior distribution was important to conduct various experiments. In our work we used a version of the GLOW model; details of the models and training is in the supplementary material sec. B. We note that the results are not unique to flow models, and we verified that similar phenomenon can be seen when training with the PixelC $\mathrm { N N } { + } { + }$ autoregressive model (Salimans et al., 2017a) in sec. E.
|
| 94 |
+
|
| 95 |
+
# 4.1 TRAINING CONDITIONAL GENERATIVE MODELS
|
| 96 |
+
|
| 97 |
+
Here we investigate the ability to train a conditional generative model with good likelihood and accuracy simultaneously. Usually in flow models the prior distribution in latent space $z$ is Gaussian. For classification we used aclass-conditional mixture of 10 Gaussians $p ( z | y ) \overset { \cdot } { = } \mathcal { N } ( \mu _ { y } , \sigma _ { y } ^ { 2 } )$ We compare three settings: 1) A class-conditional mixture of 10 Gaussians as the prior (Base). 2) A classconditional mixture of 10 Gaussians trained with an additional classification loss term (Reweighted). 3) Our proposed conditional split prior (Split) described in sec. A.4 in the supplementary material. Results can be found in table 1.
|
| 98 |
+
|
| 99 |
+
Table 1: Comparison between different models.
|
| 100 |
+
|
| 101 |
+
<table><tr><td>MNIST</td><td>Base</td><td>Reweight</td><td>Split</td><td>CIFAR10</td><td>Base</td><td>Reweight</td><td>Split</td></tr><tr><td>% Acc</td><td>96.9</td><td>99.0</td><td>99.3</td><td>% Acc</td><td>56.8</td><td>83.2</td><td>84.0</td></tr><tr><td>bits/diml</td><td>0.95</td><td>1.10</td><td>1.00</td><td>bits/dim</td><td>3.47</td><td>3.54</td><td>3.53</td></tr></table>
|
| 102 |
+
|
| 103 |
+
As we can see, especially on CIFAR10, pushing up the accuracy to values that are still far from stateof-the-art already results in non-negligible deterioration to the likelihood values. This exemplifies how obtaining strong classification accuracy without harming likelihood estimation is still a challenging problem. We note that while the difference between the split prior and re-weighted version is not huge, the split prior achieves better NLL and better accuracy in both experiments. We experimented with various other methods to improve training with limited success, see sec. C in the supplementary material for furture information.
|
| 104 |
+
|
| 105 |
+

|
| 106 |
+
4.2 NEGLIGIBLE IMPACT OF CLASS MEMBERSHIP ON LIKELIHOOD
|
| 107 |
+
Figure 3: NLL for images conditioned on the correct class vs the highest probability wrong class.
|
| 108 |
+
|
| 109 |
+
Next we show that even conditional generative models which are strong classifiers do not see images with the corrupted labels as outliers. To understand this phenomenon we first note that if we want the correct class to have a probability of at least $1 - \delta$ then it is enough for the corresponding logit to be larger than all the others by $\begin{array} { r } { \log ( \mathbf { \bar { \boldsymbol { C } } } ) + \log \left( \frac { 1 - \delta } { \delta } \right) } \end{array}$ where $C$ is the number of classes. For $C = 1 0$ and $\delta = 1 e - 5$ this is about 6, which is negligible relative to the likelihood of the image, which is in the scale of thousands. This means that even for a strong conditional generative model which confidently predicts the correct label, the pair $\{ x _ { i } , y _ { w } \neq y _ { i } \}$ (where $w$ is the leading incorrect class) cannot be detected as an outlier according to the joint distribution, as the gap $\log ( p ( x _ { i } | y _ { i } ) ) - \log ( p ( x _ { i } | y _ { w } ) )$ is much smaller than the variation in likelihood values. In Fig. 3 we show this by plotting the histograms of the likelihood conditioned both on the correct class and on the most likely wrong class over the test set. In other words, in order for $\log ( p ( x _ { i } | y _ { w } ) )$ to be considered an outlier the prediction needs to be extremely confident, much more than we expect it to be, considering test classification error.
|
| 110 |
+
|
| 111 |
+
# 4.3 ADVERSARIAL ATTACKS AS WORST CASE ANALYSIS
|
| 112 |
+
|
| 113 |
+
We first evaluate the ability of conditional generative models to detect standard attacks, and then try to detect attacks designed to fool the detector (likelihood function). We evalulate both the gradient based Carlini-Wagner $L _ { 2 }$ attack (CW- $L _ { 2 }$ ) (Carlini & Wagner, 2017b) and the gradient free boundary attack (Brendel et al., 2018). Results are shown in table 2 on the left. It is interesting to observe the disparity between the CW- $L _ { 2 }$ attack, which is easily detectable, and the boundary attack which is much harder to detect.
|
| 114 |
+
|
| 115 |
+
Table 2: Comparison of attack detection. Percentage of successful and undetected attacks within $L _ { 2 }$ -distance of $\epsilon = 1 . 5$ for MNIST and $\epsilon = 3 3 / 2 5 5$ for CIFAR10 for proposed models. Number in parentheses is percentage of attacks that successfully fool the classifier, both detected and undetected.
|
| 116 |
+
|
| 117 |
+
<table><tr><td>Attacking</td><td colspan="3">Classification</td><td colspan="2">Classification and Detection</td></tr><tr><td>MNIST</td><td>Reweight</td><td>Split</td><td>Reweight</td><td>Split</td><td rowspan="3"></td></tr><tr><td>CW-L2</td><td>0% (100%)</td><td>1% (100%)</td><td>17% (100%)</td><td>14% (100%)</td></tr><tr><td>Boundary attack</td><td>43% (82%)</td><td>36% (80%)</td><td>0% (0%)</td><td>0% (0%)</td></tr><tr><td>CIFAR10</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>CW-L2</td><td>0% (97%)</td><td>0% (0%)</td><td>6% (99%)</td><td></td><td>3% (100%)</td></tr><tr><td>Boundary attack</td><td>67% (100%)</td><td>72% (100%)</td><td>100% (100%)</td><td></td><td>100% (100%)</td></tr></table>
|
| 118 |
+
|
| 119 |
+
Next we modify our attacks to try to fool the detector as well. With the CW- $L _ { 2 }$ attack we follow the modification suggested in (Carlini & Wagner, 2017a) and add an extra loss term $\ell _ { d e t } ( x ^ { \prime } ) =$ $\operatorname* { m a x } \{ 0 , - \log ( p ( x ^ { \prime } ) ) - T \}$ where $T$ is the detection threshold. For the boundary attack we turn the $C$ -way classification into a $C + 1$ -way classification by adding another class which is “non-image” and classify any image above the detection threshold as such. We then use a targeted attack to try to fool the network to classify the image into a specific original class. This simple modification to the boundary attack will typically fail because it cannot initialize. The standard attack starts from a random image and all random images are easily detected as “non-image” and therefore do not have the right target class. To address this we start from a randomly chosen image from the target class, ensuring the original image is detected as a real image from the desired class.
|
| 120 |
+
|
| 121 |
+
From table 2 (right side) we can see that even after the modification CW- $L _ { 2 }$ still struggles to fool the detector. The boundary attack, however, succeeds completely on CIFAR10 and fails completely on MNIST, even when it managed to sometimes fool the detector without directly trying. We hypothesize that this is because the area between two images of separate classes, where the boundary attack needs to pass through, is correctly detected as out of distribution only for MNIST and not CIFAR10. We explore this further below.
|
| 122 |
+
|
| 123 |
+
# 4.4 AMBIGUOUS INPUTS AS AVERAGE CASE ANALYSIS
|
| 124 |
+
|
| 125 |
+
To understand why the learned networks are easily attacked on CIFAR but not on MNIST with the modified boundary attack, we explore the probability density of interpolations between two real images. This is inspired by the fact that the boundary attack proceeds along the line between the attacked image and the initial image. The minimum we would expect from a decent generative model is to detect the intermediate middle images as “non-image” with low likelihood. If this was the case and each class was a disconnected high likelihood region, the boundary attack would have a difficult time when starting from a different class image.
|
| 126 |
+
|
| 127 |
+
Given images $x _ { 0 }$ and $x _ { 1 }$ from separate classes $y _ { 0 }$ and $y _ { 1 }$ and for $\alpha \in [ 0 , 1 ]$ we generate an intermediate image $x _ { \alpha } = \alpha \cdot x _ { 1 } + ( 1 - \alpha ) x _ { 0 }$ , and run the model on various $\alpha$ values to see the model prediction along the line. For endpoints we sample real images that are classified correctly and are above the detection threshold used previously. See Fig. 1 for interpolation examples from MNIST and CIFAR.
|
| 128 |
+
|
| 129 |
+
In figure 4 (a) we see the average results for MNIST for 1487 randomly selected pairs. As expected, the likelihood goes down as $\alpha$ moves away from the real images $x _ { 0 }$ and $x _ { 1 }$ . We also see the probability of both classes drop rapidly as the network predictions become less confident on the intermediate images. Sampling $1 0 0 \alpha$ values uniformly in the range $[ 0 , 1 ]$ we can also investigate how many of the interpolations all stay above the detection threshold, i.e. all intermediate images are considered real by the model, and find that this happens only in $0 . 5 \%$ of the cases.
|
| 130 |
+
|
| 131 |
+

|
| 132 |
+
Figure 4: Average Log likelihoods and class probabilities for interpolations between data points from different classes, $\mathbf { X }$ -axis is interpolation coefficient $\alpha$ . The MNIST model behaves as desired and robustly detects interpolated images. The CIFAR10 model, however, fails strikingly and interpolatd images are consistently more likely than true data under the model.
|
| 133 |
+
|
| 134 |
+
On CIFAR images, using 1179 pairs, we get a very different picture (see fig. 4 (b)). Not only does the intermediate likelihood not drop down, it is even higher on average than on the real images albeit to a small degree. In classification we also see a very smooth transition between classes, unlike the sharp drop in the MNIST experiment. Lastly, $100 \%$ of the interpolated images lay above the detection threshold and none are detected as a “non-image” (for reference the detection threshold has $7 8 . 6 \%$ recall on real CIFAR10 test images). This shows that even with good likelihood and reasonable accuracy, the model still “mashes" the classes together, as one can move from one Gaussian to another without passing through low likelihood regions in-between. It also clarifies why the boundary attack is so successful on CIFAR but fails completely on MNIST. We note that the basic attack on MNIST is allowed to pass through these low density areas which is why it sometimes succeeds.
|
| 135 |
+
|
| 136 |
+
# 4.5 CLASS-UNRELATED ENTROPY IS TO BLAME
|
| 137 |
+
|
| 138 |
+
In this section, we show that the difference in performance between CIFAR10 and MNIST can largely be attributed to how the entropy in the datasets is distributed, i.e how much the uncertainty in the data distribution is reduced after conditioning on the class label. For MNIST digits, a large source of uncertainty in pixel-space comes from the class label. Given the class, most pixels can be predicted accurately by simply taking the mean of the training set in each class. This is exactly why a linear classifier performs well on MNIST. Conversely on CIFAR10, after conditioning on the class label there still exists considerable uncertainty. Given the class is “cat,” there still exists many complicated sources of uncertainty such as where the cat is and how it is posed. In this dataset, a much larger fraction of the uncertainty is not accounted for after conditioning on the label. This is not a function of the domain or the dimensionality of the dataset, it is a function of the dataset itself.
|
| 139 |
+
|
| 140 |
+
To empirically verify this, we have designed a dataset which replicates the challenges of CIFAR10 and places them onto a problem of the same discriminative difficulty as MNIST. To achieve this, we simply replaced the black backgrounds of MNIST images with randomly sampled (downsampled and greyscaled) images from CIFAR10. In this dataset, which we call background-MNIST (BG-MNIST), the classification problem is identically predictable from the same set of pixels as in standard MNIST but modeling the data density is much more challenging.
|
| 141 |
+
|
| 142 |
+

|
| 143 |
+
Figure 5: Top: Samples from the BG-MNIST-0 dataset. Bottom: Samples from conditional generative model trained on the dataset. Note how the model has learnd to capture digit identity.
|
| 144 |
+
|
| 145 |
+
To further control the entropy in a fine-grained manner, we convolve the background with a Gaussian blur filter with various bandwidths to remove varying degrees of high frequency information. With high blur, the task begins to resemble standard MNIST and conditional generative models should perform as they do on MNIST. With low and no blur we expect them to behave as they do on CIFAR10.
|
| 146 |
+
|
| 147 |
+
Table 3 summarizes the performance of conditional generative models on BG-MNIST. We train models with a “Reweighted” discriminative objective as in Section A. The reweighting allows them to perform well as classifiers but the likelihood of their generative component falls to below CIFAR10 levels. More strikingly, now when we interpolate between datapoints we observe behavior identical to our CIFAR10 models. This can be seen in Figure 6. Thus, we have created a dataset with the discriminative difficulty of MNIST and the generative difficulty of CIFAR10.
|
| 148 |
+
|
| 149 |
+
<table><tr><td></td><td>MNIST</td><td>BG-MNIST-5</td><td>BG-MNIST-1</td><td>BG-MNIST-0</td><td>CIFAR10</td></tr><tr><td>% Acc</td><td>99</td><td>99</td><td>99</td><td>98</td><td>84</td></tr><tr><td>bits/dim</td><td>1.10</td><td>1.67</td><td>3.30</td><td>4.58</td><td>3.53</td></tr></table>
|
| 150 |
+
|
| 151 |
+
Table 3: Conditional generative models trained on BG-MNIST. BG-MNIST- $X$ indicates the bandwith of blur applied to CIFAR10 backgrounds.
|
| 152 |
+
|
| 153 |
+

|
| 154 |
+
Figure 6: Average log-likelihoods and class probabilities for interpolations between BG-MNIST-0 datapoints. While classification is on par with MNIST models, the likelihood exhibits the same failures as CIFAR10 models.
|
| 155 |
+
|
| 156 |
+
# 5 RELATED WORK
|
| 157 |
+
|
| 158 |
+
Despite state of the art performance in many tasks, deep neural networks have been shown to be fragile where small image transformations, (Azulay & Weiss, 2018) or background object transplant (Rosenfeld et al., 2018) can greatly change predictions. In the more challenging case of adversarial pertubations, deep neural networks are known to be vulnerable to adversarial attacks (Akhtar & Mian, 2018), and while many attempts have been made to train robust models or detect malicious attacks, significant progress towards truly robust models has been made only on MNIST (Schott et al., 2019; Madry et al., 2017). Even CIFAR10 remains far from being solved from a standpoint of adversarial robustness.
|
| 159 |
+
|
| 160 |
+
One common belief is that adversarial attacks succeed by moving the data points off the data manifold, and therefore can possibly be detected by a generative model which should assign them low likelihood values. Although this view has been challenged in (Gilmer et al., 2018), we now discuss how their setting needs to be extended to fully study robustness guarantees of conditional generative models.
|
| 161 |
+
|
| 162 |
+
Recent work (Song et al., 2018; Frosst et al., 2018; Li et al., 2018) showed that a generative model can detect and defend adversarial attacks. However, there is a caveat when evaluating detectability of adversarial attacks: the attacker needs to be able to attack the detection algorithm as well. Not doing so has been shown to lead to drastically false robustness claims (Carlini & Wagner, 2017a). In (Li et al., 2018) the authors report difficulties training a high accuracy conditional generative model on CIFAR10, and resort to evaluation on a 2-class classification problem derived from CIFAR10. While they do show robustness similar to our Carlini-Wagner results, they do not apply the boundary attack which we found to break our models on CIFAR10. This highlights the need to utilize a diverse set of attacks. In (Schott et al., 2019) a generative model was used not just for adversarial detection but also robust classification on MNIST, leading to state-of-the-art robust classification accuracy. The method was only shown to work on MNIST, and is very slow at inference time. However, overall it provides an existence proof that conditional generative models can be very robust in practice. In (Ghosh et al., 2019) the authors also use generative models for detection and classification but only show results with the relatively weak FGSM attack, and on simple datasets. As we see in Fig. 1 and discuss in section 4, generative models trained on MNIST can display very different behavior than similar models trained on more challenging data like CIFAR10. This shows how success on MNIST may often not translate to success on other datasets.
|
| 163 |
+
|
| 164 |
+
# 6 CONCLUSION
|
| 165 |
+
|
| 166 |
+
In this work we explored limitations, both in theory and practice, of using conditional generative models to detect adversarial attacks. Most practical issues arise due to likelihood, the standard objective and evaluation metric for generative models by which probabilities can be computed. We conclude that likelihood-based density modeling and robust classification may fundamentally be at odds with one another as important aspects of the problem are not captured by this training and evaluation metric. This has wide-reaching implications for applications like out-of-distribution detection, adversarial robustness and generalization as well as semi-supervised learning with these models.
|
| 167 |
+
|
| 168 |
+
# REFERENCES
|
| 169 |
+
|
| 170 |
+
Naveed Akhtar and Ajmal S. Mian. Threat of adversarial attacks on deep learning in computer vision: A survey. IEEE Access, 6:14410–14430, 2018.
|
| 171 |
+
|
| 172 |
+
Aharon Azulay and Yair Weiss. Why do deep convolutional networks generalize so poorly to small image transformations? CoRR, 2018. URL http://arxiv.org/abs/1805.12177.
|
| 173 |
+
|
| 174 |
+
Jens Behrmann, Will Grathwohl, Ricky T. Q. Chen, David Duvenaud, and Jörn-Henrik Jacobsen. Invertible residual networks. International Conference on Machine Learning, 2019.
|
| 175 |
+
|
| 176 |
+
Wieland Brendel, Jonas Rauber, and Matthias Bethge. Decision-based adversarial attacks: Reliable attacks against black-box machine learning models. In International Conference on Learning Representations (ICLR), 2018. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } }$ SyZI0GWCZ.
|
| 177 |
+
|
| 178 |
+
Nicholas Carlini and David Wagner. Adversarial examples are not easily detected: Bypassing ten detection methods. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security, pp. 3–14. ACM, 2017a.
|
| 179 |
+
|
| 180 |
+
Nicholas Carlini and David A. Wagner. Towards evaluating the robustness of neural networks. In IEEE Symposium on Security and Privacy, SP, 2017b.
|
| 181 |
+
|
| 182 |
+
Laurent Dinh, David Krueger, and Yoshua Bengio. NICE: non-linear independent components estimation. In International Conference on Learning Representations (ICLR), 2015.
|
| 183 |
+
|
| 184 |
+
Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real NVP. In International Conference on Learning Representations, (ICLR), 2017.
|
| 185 |
+
|
| 186 |
+
Nicholas Frosst, Sara Sabour, and Geoffrey Hinton. Darccc: Detecting adversaries by reconstruction from class conditional capsules. arXiv preprint arXiv:1811.06969, 2018.
|
| 187 |
+
|
| 188 |
+
Partha Ghosh, Arpan Losalka, and Michael J Black. Resisting adversarial attacks using gaussian mixture variational autoencoders. In Conference on Artificial Intelligence (AAAI), 2019. URL https://arxiv.org/abs/1806.00081.
|
| 189 |
+
|
| 190 |
+
Justin Gilmer, Luke Metz, Fartash Faghri, Samuel S. Schoenholz, Maithra Raghu, Martin Wattenberg, and Ian J. Goodfellow. Adversarial spheres. International Conference on Learning Representations (ICLR), 2018. URL http://arxiv.org/abs/1801.02774.
|
| 191 |
+
|
| 192 |
+
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 27. 2014. URL http://papers.nips.cc/paper/ 5423-generative-adversarial-nets.pdf.
|
| 193 |
+
|
| 194 |
+
Aditya Grover, Manik Dhar, and Stefano Ermon. Flow-gan: Combining maximum likelihood and adversarial learning in generative models. In Conference on Artificial Intelligence (AAAI), 2018.
|
| 195 |
+
|
| 196 |
+
Joern-Henrik Jacobsen, Jens Behrmann, Richard Zemel, and Matthias Bethge. Excessive invariance causes adversarial vulnerability. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id $=$ BkfbpsAcF7.
|
| 197 |
+
|
| 198 |
+
Jörn-Henrik Jacobsen, Arnold W. M. Smeulders, and Edouard Oyallon. i-revnet: Deep invertible networks. International Conference on Learning Representations (ICLR), 2018. URL http: //arxiv.org/abs/1802.07088.
|
| 199 |
+
|
| 200 |
+
Durk P Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible 1x1 convolutions. In Advances in Neural Information Processing Systems, pp. 10236–10245, 2018.
|
| 201 |
+
|
| 202 |
+
Durk P Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semi-supervised learning with deep generative models. In Advances in neural information processing systems (NIPS), pp. 3581–3589, 2014.
|
| 203 |
+
|
| 204 |
+
Durk P Kingma, Tim Salimans, Rafal Jozefowicz, Xi Chen, Ilya Sutskever, and Max Welling. Improved variational inference with inverse autoregressive flow. In Advances in neural information processing systems, pp. 4743–4751, 2016.
|
| 205 |
+
|
| 206 |
+
Yingzhen Li, John Bradshaw, and Yash Sharma. Are generative classifiers more robust to adversarial attacks? arXiv preprint arXiv:1802.06552, 2018.
|
| 207 |
+
|
| 208 |
+
Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017.
|
| 209 |
+
|
| 210 |
+
Eric Nalisnick, Akihiro Matsukawa, Yee Whye Teh, Dilan Gorur, and Balaji Lakshminarayanan. Do deep generative models know what they don’t know? In International Conference on Learning Representations, 2019a. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ H1xwNhCcYm.
|
| 211 |
+
|
| 212 |
+
Eric T. Nalisnick, Akihiro Matsukawa, Yee Whye Teh, Dilan Görür, and Balaji Lakshminarayanan. Hybrid models with deep and invertible features. In International Conference on Machine Learning (ICML), 2019b.
|
| 213 |
+
|
| 214 |
+
George Papamakarios, Theo Pavlakou, and Iain Murray. Masked autoregressive flow for density estimation. In Advances in Neural Information Processing Systems, pp. 2338–2347, 2017.
|
| 215 |
+
|
| 216 |
+
Danilo Rezende and Shakir Mohamed. Variational inference with normalizing flows. In International Conference on Machine Learning (ICML), 2015.
|
| 217 |
+
|
| 218 |
+
Amir Rosenfeld, Richard S. Zemel, and John K. Tsotsos. The elephant in the room. CoRR, 2018. URL http://arxiv.org/abs/1808.03305.
|
| 219 |
+
|
| 220 |
+
Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In Advances in neural information processing systems, pp. 2234–2242, 2016.
|
| 221 |
+
|
| 222 |
+
Tim Salimans, Andrej Karpathy, Xi Chen, and Diederik P. Kingma. Pixelcnn $^ { + + }$ : A pixelcnn implementation with discretized logistic mixture likelihood and other modifications. In ICLR, 2017a.
|
| 223 |
+
|
| 224 |
+
Tim Salimans, Andrej Karpathy, Xi Chen, and Diederik P Kingma. Pixelcnn $^ { + + }$ : Improving the pixelcnn with discretized logistic mixture likelihood and other modifications. arXiv preprint arXiv:1701.05517, 2017b.
|
| 225 |
+
|
| 226 |
+
L. Schott, J. Rauber, W. Brendel, and M. Bethge. Towards the first adversarially robust neural network model on mnist. 2019. URL https://arxiv.org/pdf/1805.09190.pdf.
|
| 227 |
+
|
| 228 |
+
Yang Song, Taesup Kim, Sebastian Nowozin, Stefano Ermon, and Nate Kushman. Pixeldefend: Leveraging generative models to understand and defend against adversarial examples. In International Conference on Learning Representations (ICLR), 2018.
|
| 229 |
+
|
| 230 |
+
Aaron van den Oord, Nal Kalchbrenner, Lasse Espeholt, Oriol Vinyals, Alex Graves, et al. Conditional image generation with pixelcnn decoders. In Advances in Neural Information Processing Systems, pp. 4790–4798, 2016.
|
| 231 |
+
|
| 232 |
+
# A TRAINING CONDITIONAL GENERATIVE MODELS
|
| 233 |
+
|
| 234 |
+
A.1 LIKELIHOOD-BASED GENERATIVE MODELS AS GENERATIVE CLASSIFIERS
|
| 235 |
+
|
| 236 |
+
We present a brief overview of flow-based deep generative models, conditional generative models, and their applications to adversarial example detection.
|
| 237 |
+
|
| 238 |
+
Flow based generative models Rezende & Mohamed (2015); Dinh et al. (2015; 2017); Kingma & Dhariwal (2018) compute exact densities for complex distributions using the change of variable formula. They achieve strong empirical results Kingma & Dhariwal (2018) and the closed form likelihood makes them easier to analyze than the closely related VAE Kingma et al. (2014). The main idea behind flow-based generative models is to model the data distribution using a series of bijective mappings $z _ { N } = f ( x ) = f _ { N } \circ f _ { N - 1 } . . . \circ f _ { 1 } ( x )$ where $z _ { N }$ has a known simple distribution, e.g. Gaussian, and all $f _ { i }$ are parametric functions for which the determinant of the Jacobian can be computed efficiently. Using the change of variable formula we have $\log ( p ( x ) ) = \log ( p ( z _ { N } ) ) +$ $\begin{array} { r } { \sum _ { i = 1 } ^ { N } \log ( | \operatorname* { d e t } ( J _ { i } ( z _ { i } ) ) | ) } \end{array}$ where $J _ { i }$ is the Jacobian of $f _ { i }$ and $z _ { i - 1 } = f _ { i - 1 } . . . \circ f _ { 1 } ( x )$ .
|
| 239 |
+
|
| 240 |
+
The standard way to parameterize such functions $f _ { i }$ is by splitting the input $z _ { i - 1 }$ into two $z _ { i - 1 } =$ $( z _ { i - 1 } ^ { 1 } , z _ { i - 1 } ^ { 2 } )$ and chose
|
| 241 |
+
|
| 242 |
+
$$
|
| 243 |
+
f _ { i } \left( \left[ \begin{array} { l } { z _ { i - 1 } ^ { 1 } } \\ { z _ { i - 1 } ^ { 2 } } \end{array} \right] \right) = \left[ s ( z _ { i - 1 } ^ { 1 } ) \odot z _ { i - 1 } ^ { 2 } + t ( z _ { i - 1 } ^ { 1 } ) \right]
|
| 244 |
+
$$
|
| 245 |
+
|
| 246 |
+
which is invertible as long as $s ( z _ { i - 1 } ^ { 1 } ) _ { j } = s _ { j } \neq 0$ and we have $\begin{array} { r } { \log ( | \operatorname* { d e t } ( J _ { i } ( z _ { i - 1 } ) ) | ) = \sum _ { j } \log ( | s _ { j } | ) } \end{array}$ . For images the splitting is normally done in the channel dimension. These models are then trained by maximizing the empirical log likelihood (MLE).
|
| 247 |
+
|
| 248 |
+
A straightforward way to turn this generative model into a conditional generative model is to make $p ( z _ { N } )$ a Gaussian mixture model (GMM) with one Gaussian per class, i.e. $p ( z _ { N } | y ) = N ( \mu _ { y } , \Sigma _ { y } )$ . Assuming $p ( y )$ is known, then maximizing $\log ( p ( x , y ) )$ is equivalent to maximizing $\log ( p ( x | y ) ) { \dot { = } }$ $\begin{array} { r } { \log ( p ( z _ { N } | y ) ) + \sum _ { i = 1 } ^ { N } \log ( | \operatorname* { d e t } ( J _ { i } ( z _ { i } ) ) | ) } \end{array}$ . At inference time, one can classify by simply using Bayes rule. Note that directly optimizing $\log ( p ( x | y ) )$ results in poor classification accuracy as discussed in section 3. This issue was also addressed in the recent hybrid model work Nalisnick et al. (2019a).
|
| 249 |
+
|
| 250 |
+
We will now describe some of the various approaches we investigated in order to train the best possible flow-based conditional generative models, to achieve a better trade-off betwen classification accuracy and data-likelihood as compared to commonly-used approaches. We also discuss some failed approaches in the appendix.
|
| 251 |
+
|
| 252 |
+
# A.2 REWEIGHTING
|
| 253 |
+
|
| 254 |
+
The most basic approach, which has been used before in various works, is to reweight the discriminative part in eq. (4). While this can produce good accuracy, it can have an unfavorable trade-off with the NLL where good accuracy comes with severely sub-optimal NLL. This tradeoff has also been shown in Nalisnick et al. (2019a) where they train a somewhat similar model but classify with a generalized linear model instead of a Gaussian mixture model.
|
| 255 |
+
|
| 256 |
+
# A.3 ARCHITECTURE CHANGE
|
| 257 |
+
|
| 258 |
+
Padding channels has been shown to increase accuracy in invertible networks Jacobsen et al. (2018); Behrmann et al. (2019). This helps ameliorate a basic limitation in bijective mappings (see Eq. (5)), by allowing to increase the number of channels as a pre-processing step. Unlike the discriminative i-RevNet, we cannot just pad zeros as that would not be a continuous density. Instead we pad channels with uniform(0,1) random noise. In effect we do not model MNIST and CIFAR10 as is typically done in the literature, but rather the zero-padded version of those. While the ground-truth likelihoods for the padded and un-padded datapoints are the same due to independence of the uniform noise and unit density of the noise, this is not guaranteed to be captured by the model, making likelihoods very similar but not exactly comparable with the literature. This is not an issue for us, as we only compare models on the padded datasets.
|
| 259 |
+
|
| 260 |
+
# A.4 SPLIT PRIOR
|
| 261 |
+
|
| 262 |
+
One reason MLE is bad at capturing the label is because a small number of dimensions have a small effect on the NLL. Fortunately, we can use this property to our advantage. As the contribution of the conditional class information is negligible for the data log likelihood, we choose to model it in its distinct subspace, as proposed by Jacobsen et al. (2019). Thus, we partition the hidden dimensions $z = ( z _ { s } , z _ { n } )$ and only try to enforce the low-dimensional $z _ { s }$ to be the logits. This has two advantages: 1) we do not enforce class-conditional dimensions to be factorial; and 2) we can explicitly up-weight the loss on this subspace and treat it as standard logits of a discriminative model. A similar approach is also used by semi-supervised VAEs Kingma et al. (2014). This lets us jointly optimize the data log-likelihood alongside a classification objective without requiring most of the dimensions to be discriminative. Using the factorization $p ( z _ { s } , \bar { z _ { n } } | y ) = p ( z _ { s } | y ) \cdot p ( \bar { z } _ { n } | z _ { s } , \bar { y } )$ we model $p ( z _ { s } | y )$ as Gaussian with class conditional mean $e _ { i } = ( 0 , . . . , 0 , 1 , . . . 0 )$ and covariance matrix scaled by a constant. The distribution $p ( z _ { n } | z _ { s } , y )$ is modeled as a Gaussian where the mean and variances are a function of $y$ and $z _ { n }$ .
|
| 263 |
+
|
| 264 |
+
# B IMPLEMENTATION DETAILS
|
| 265 |
+
|
| 266 |
+
We pad MNIST with zeros so both datasets are $3 2 \mathrm { x } 3 2$ and subtract 0.5 from both datasets to have a [-0.5,0.5] range. For data augmentation we do pytorch’s random crop with a padding of 4 and ’edge’ padding mode, and random horizontal flip for CIFAR10 only.
|
| 267 |
+
|
| 268 |
+
The model is based on GLOW with 4 levels, affine coupling layers, 1x1 convolution permutations and actnorm in a multi-scale architecture. We choose 128 channels and 12 blocks per level for MNIST and 256 channels and 16 blocks for CIFAR10. In both MNIST and CIFAR10 experiments we double the number of channels with uniforrm(0,1) noise which we scale down to the range $[ 0 , 2 / 2 5 6 ]$ (taking it into account in the Jacobian term). One major difference is that we do the squeeze operation at the end of each level instead of the beginning, which is what allows us to use 4 levels. This is possible because with the added channels the number of channels is even and the standard splitting is possible before the squeeze operation.
|
| 269 |
+
|
| 270 |
+
The models are optimized using Adam, for 150 epochs. The initial learning rate is $1 e - 3$ , decayed by a factor of 10 every 60 epochs. For the reweighted optimization the objective is
|
| 271 |
+
|
| 272 |
+
$$
|
| 273 |
+
l o s s = - \log ( p ( x | y ) ) / D - \log ( p ( y | x ) )
|
| 274 |
+
$$
|
| 275 |
+
|
| 276 |
+
where $\mathbf { D }$ is the data dimension $3 \mathbf { x } 3 2 \mathbf { x } 3 2$ for CIFAR, $1 \mathrm { x } 3 2 \mathrm { x } 3 2$ for MNIST).
|
| 277 |
+
|
| 278 |
+
For adversarial detection we use a threshold of 1.4 for MNIST ( $100 \%$ of test data are below the threshold) and 4. for CIFAR10 $7 8 . 6 \%$ of test images are below the threshold).
|
| 279 |
+
|
| 280 |
+
# C NEGATIVE RESULTS
|
| 281 |
+
|
| 282 |
+
In this work explored many ideas in order to achieve better tradeoff between accuracy with little or no impact.
|
| 283 |
+
|
| 284 |
+
# C.1 ROBUST PRIORS
|
| 285 |
+
|
| 286 |
+
Since the Gaussian prior is very sensitive to outliers, one idea was that confident miss-classifications carry a strong penalty which might result in “messing" all the classes together. A solution would be to replace the Gaussian with a more robust prior, e.g. Laplace or Cauchy. Another idea we explored is a mixture of Gaussian and Laplace or Cauchy using the same location parameter. In our experiments we did not see any significant difference from the Gaussian prior.
|
| 287 |
+
|
| 288 |
+
# C.2 LABEL SMOOTHING
|
| 289 |
+
|
| 290 |
+
Another approach to try to address the same issue is a version of label smoothing. In this new model the Gaussian clusters are a latent variable that is equal to the real label with probability $1 - \epsilon$
|
| 291 |
+
|
| 292 |
+
and uniform on the other labels with probability $\epsilon .$ . Using this will bound the error for confident miss-classification as long as the data is close to one of the Gaussian centers.
|
| 293 |
+
|
| 294 |
+
# C.3 FLOW-GAN
|
| 295 |
+
|
| 296 |
+
As we claimed the main issue is with the MLE objective, it seems like a better objective is to optimize $K L ( p ( x , y ) | | p _ { \theta } ( x , y ) )$ or the Jensen-Shannon divergence as this KL term is highly penalized for miss-classification. It is also more natural when considering robustness against adversarial attacks. Optimizing this directly is hard, but generative adversarial networks (GANs) Goodfellow et al. (2014) in theory should also optimize this objective. Simply training a GAN would not work as we are interested in the likelihood value for adversarial detection and GANs only let you sample and does not give you any information regarding an input image.
|
| 297 |
+
|
| 298 |
+
Since flow algorithms are bijective, we could combine the two objective as was done in the flow-GAN paper Grover et al. (2018). We trained this approach with various conditional-GAN alternatives and found it very hard to train. GANs are know to be unstable to train, and combining them with the unstable flow generator is problematic.
|
| 299 |
+
|
| 300 |
+
# D ANALYTICAL COUNTER EXAMPLE:
|
| 301 |
+
|
| 302 |
+
$$
|
| 303 |
+
\begin{array} { c } { { p ( y = 1 ) = p ( y = 0 ) = q ( y = 1 ) = q ( y = 0 ) = 1 / 2 \mathrm { ~ a n d ~ } } } \\ { { p ( x | 0 ) = \lambda _ { 1 } U ( 0 , 1 ) + ( 1 - \lambda _ { 1 } ) U ( 1 , 1 + \Delta ) } } \\ { { p ( x | 1 ) = \lambda _ { 2 } U ( 0 , 1 ) + ( 1 - \lambda _ { 2 } ) U ( 2 , 3 ) } } \\ { { q ( x | 0 ) = U ( 0 , 1 + \Delta ) } } \\ { { q ( x | 1 ) = \lambda _ { 2 } U ( 0 , 1 ) + ( 1 - \lambda _ { 2 } ) U ( 2 , 3 ) } } \end{array}
|
| 304 |
+
$$
|
| 305 |
+
|
| 306 |
+
where $U ( a , b )$ is the uniform distribution on the annulus $R ^ { d } ( a , b ) = \{ x \in \mathbb { R } ^ { d } : a \leq | | x | | \leq b \}$ in dimension $d$ .
|
| 307 |
+
|
| 308 |
+
Lemma 1. For $| | x | | < 1$ we have
|
| 309 |
+
|
| 310 |
+
$$
|
| 311 |
+
\begin{array} { l } { \displaystyle p ( 0 | x ) = \frac { \lambda _ { 1 } } { \lambda _ { 1 } + \lambda _ { 2 } } } \\ { \displaystyle q ( 0 | x ) = \frac { 1 } { 1 + \lambda _ { 2 } ( 1 + \Delta ) ^ { d } } } \end{array}
|
| 312 |
+
$$
|
| 313 |
+
|
| 314 |
+
Proof. The $U ( a , b )$ density (when it isn’t zero) is $\frac { 1 } { C _ { d } \big ( b ^ { d } - a ^ { d } \big ) }$ where $c _ { d }$ is the volume of the $d .$ dimensional unit ball. The proof follows by a simple use of Bayes rule. □
|
| 315 |
+
|
| 316 |
+
so by having $\lambda _ { 1 } > > \lambda _ { 2 } > > \frac { 1 } { ( 1 + \Delta ) ^ { d } }$ 1(1+∆)d we can have the model switch wrongfully predictions from $y = 0$ to $y = 1$ when we move $x$ from the annulus $R ^ { d } ( 1 , 1 + \Delta )$ to $R ^ { d } ( 0 , 1 )$ Lemma 2. I $\begin{array} { r } { \hat { \bf \Phi } \lambda _ { 1 } > \frac { 1 } { ( 1 + \Delta ) ^ { d } } } \end{array}$ and $\lambda _ { 1 } < 1 - e ^ { - \epsilon }$ then $K L ( q ( x , y ) | | P ( x , y ) ) \leq \epsilon$
|
| 317 |
+
|
| 318 |
+
Proof. Using the chain rule for KL divergence, $\mathrm { K L } ( P ( x , y ) | | Q ( x , y ) ) = \mathrm { K L } ( P ( y ) | | Q ( y ) ) +$ $\mathbb { E } _ { y } [ \dot { \mathrm { K L } } ( P ( x \bar { | } y ) | | Q ( x | y ) ) ]$ we get that $\mathrm { K L } ( q ( x , y ) | | P ( x , y ) ) = \mathrm { K L } ( q ( x | y = 0 ) | | P ( x | y = 0 ) )$ . We now have
|
| 319 |
+
|
| 320 |
+
$$
|
| 321 |
+
\begin{array} { r l } & { \mathrm { K L } ( q ( x | y = 0 ) | | P ( x | y = 0 ) ) = \displaystyle \int _ { R ^ { d } ( 0 , 1 ) } \frac { 1 } { C _ { d } ( 1 + \Delta ) ^ { d } } \log \left( \frac { \frac { 1 } { C _ { d } ( 1 + \Delta ) ^ { d } } } { \frac { \lambda _ { 1 } } { C _ { d } } } \right) } \\ & { \mathrm { ~ \ } + \displaystyle \int _ { R ^ { d } ( 1 , 1 + \Delta ) } \frac { 1 } { C _ { d } ( 1 + \Delta ) ^ { d } } \log \left( \frac { \frac { 1 } { C _ { d } ( 1 + \Delta ) ^ { d } } } { \frac { 1 - \lambda _ { 1 } } { C _ { d } ( 1 + \Delta ) ^ { d } - 1 ) } } \right) = \frac { - \log ( \lambda _ { 1 } ( 1 + \Delta ) ^ { d } ) } { ( 1 + \Delta ) ^ { d } } } \\ & { \mathrm { ~ \ } + \frac { ( 1 + \Delta ) ^ { d } - 1 } { ( 1 + \Delta ) ^ { d } } \log \left( \frac { ( 1 + \Delta ) ^ { d } - 1 } { ( 1 - \lambda _ { 1 } ) ( 1 + \Delta ) ^ { d } } \right) \leq \log \left( \frac { 1 } { 1 - \lambda _ { 1 } } \right) < \epsilon } \end{array}
|
| 322 |
+
$$
|
| 323 |
+
|
| 324 |
+
Lemma 3. If $\begin{array} { r } { 1 > \lambda _ { 1 } > \frac { 1 } { ( 1 + \Delta ) ^ { d } } } \end{array}$ and $\begin{array} { r } { \lambda _ { 1 } < \frac { \epsilon } { d \log ( 1 + \Delta ) } } \end{array}$ then $K L ( P ( x , y ) | | q ( x , y ) ) \leq \epsilon$
|
| 325 |
+
|
| 326 |
+
Proof. Again using the KL chain rule we have
|
| 327 |
+
|
| 328 |
+
$$
|
| 329 |
+
\begin{array} { l } { \displaystyle \mathrm { K L } ( P ( x | y = 0 ) | | q ( x | y = 0 ) ) = \lambda _ { 1 } \int _ { R ^ { d } ( 0 , 1 ) } \frac { 1 } { C _ { d } } \log \left( \frac { \frac { \lambda _ { 1 } } { C _ { d } } } { \frac { 1 } { C _ { d } ( 1 + \Delta ) ^ { d } } } \right) } \\ { \displaystyle \int _ { R ^ { d } ( 1 , 1 + \Delta ) } \frac { ( 1 - \lambda _ { 1 } ) } { C _ { d } ( ( 1 + \Delta ) ^ { d } - 1 ) } \log \left( \frac { \frac { ( 1 - \lambda _ { 1 } ) } { C _ { d } ( ( 1 + \Delta ) ^ { d } - 1 ) } } { \frac { 1 } { C _ { d } ( 1 + \Delta ) ^ { d } } } \right) \le \lambda _ { 1 } d \log ( 1 + \Delta ) < \epsilon } \end{array}
|
| 330 |
+
$$
|
| 331 |
+
|
| 332 |
+
Proposition 1. For all $( \epsilon , \delta , \Delta )$ there is a distribution $p$ and an approximation $q$ in dimension $\begin{array} { r } { d = \tilde { \mathcal { O } } \left( \frac { \log \left( \frac { \delta } { 1 + \delta } \right) + \log \left( \frac { 1 } { \epsilon } \right) } { \log \left( 1 + \Delta \right) } \right) } \end{array}$ such that
|
| 333 |
+
|
| 334 |
+
$$
|
| 335 |
+
K L ( q ( x , y ) | | p ( x , y ) ) < \epsilon , ~ K L ( p ( x , y ) | | q ( x , y ) ) < \epsilon
|
| 336 |
+
$$
|
| 337 |
+
|
| 338 |
+
but with probability greater then $1 / 3$ over samples $x \sim p$ there is an adversarial example $\bar { x }$ satisfying
|
| 339 |
+
|
| 340 |
+
1. $y _ { q } ( x ) = y _ { p } ( x )$ with $p ( y _ { p } ( x ) | x )$ and $q ( y _ { q } ( x ) | x )$ greater or equal to $1 - \delta$ . The original point is classifier correctly and confidently.
|
| 341 |
+
|
| 342 |
+
2. $y _ { q } ( x ) \neq y ( \bar { x } )$ , $y _ { q } ( \bar { x } ) = y ( \bar { x } )$ . We change the prediction without changing the ground-truth label.
|
| 343 |
+
|
| 344 |
+
3. $q ( y _ { q } ( \bar { x } ) | \bar { x } ) < \delta$ , $p ( y _ { p } ( \bar { x } ) | \bar { x } ) > 1 - \delta$ . The classifier is confident in its wrong prediction.
|
| 345 |
+
|
| 346 |
+
4. $| | x - \bar { x } | | < \Delta$ . We make a small change to the inputs.
|
| 347 |
+
|
| 348 |
+
5. The density $q ( { \bar { x } } )$ is greater or equal to the median density, making the attack undetectable by observing $q ( x )$ .
|
| 349 |
+
|
| 350 |
+
6. For $\Delta < 1$ the probability in any radius ball can be made as small as desired.
|
| 351 |
+
|
| 352 |
+
7. The total variation of the distribution can be made as small as desired.
|
| 353 |
+
|
| 354 |
+
The last two conditions exclude degenerate trivial counter-exmaples, one where the whole distribution support is in a $\Delta$ radius ball and $\Delta$ does indeed represent a small pertubation. The other condition excludes “pathological" distributions ,e.g. misclassification on a dense zero measure set like the rationals.
|
| 355 |
+
|
| 356 |
+
Proof. In order to satisfy conditions 1-5, using previous lemmas, it is enough that
|
| 357 |
+
|
| 358 |
+
1. λ1λ1+λ2 $\begin{array} { r } { \frac { \lambda _ { 1 } } { \lambda _ { 1 } + \lambda _ { 2 } } \geq 1 - \delta } \end{array}$
|
| 359 |
+
2. $\frac { 1 } { 1 + \lambda _ { 2 } ( 1 + \Delta ) ^ { d } } \leq \delta$
|
| 360 |
+
3. $\lambda _ { 1 } \leq 1 - e ^ { - \epsilon }$
|
| 361 |
+
4. λ1 > 1(1+∆)d
|
| 362 |
+
5. λ1 < d log(1+∆)
|
| 363 |
+
|
| 364 |
+
By setting $\begin{array} { r } { \lambda _ { 2 } = \frac { \delta } { 1 - \delta } \lambda _ { 1 } } \end{array}$ we can easily satisfy condition 1. It is not hard to see that condition 2 is equivalent to $\begin{array} { r } { \lambda _ { 1 } \ge \left( \frac { 1 - \delta } { \delta } \right) ^ { 2 } \frac { 1 } { ( 1 + \Delta ) ^ { d } } } \end{array}$ which superseeds condition 4 when $\delta < 1 / 2$ . Condition 3 can be satisfied with $\lambda _ { 1 } < \epsilon / 2$ by using $1 - x \geq e ^ { - 2 x }$ for $x < 1 / 2$ .
|
| 365 |
+
|
| 366 |
+
This boils down to ensuring $d$ is large enough so that there is a valid $\lambda _ { 1 }$ such as
|
| 367 |
+
|
| 368 |
+
$$
|
| 369 |
+
\left( \frac { 1 - \delta } { \delta } \right) ^ { 2 } \frac { 1 } { ( 1 + \Delta ) ^ { d } } < \lambda _ { 1 } < \frac { \epsilon } { d \log ( 1 + \Delta ) }
|
| 370 |
+
$$
|
| 371 |
+
|
| 372 |
+
Which is true for large enough $d$ as the l.h.s decays exponentially while the r.h.s linearly.
|
| 373 |
+
|
| 374 |
+
Condition 6 is trivial as the radius of the support is fixed so as long as $\Delta < 1$ the probability in any $\Delta$ radius ball decays exponentially. Regarding total variation, we note that from the divergence theorem this can be bounded by a term that depends on the surface area of shperes with fixed radius which decreases to zero as $d$ goes to infinity.
|
| 375 |
+
|
| 376 |
+
# E PIXELCNN $^ { + + }$
|
| 377 |
+
|
| 378 |
+
We trained a conditional Pixel $\mathrm { C N N + + }$ where instead of predicting each new pixel using a mixture of 10 components, we use one mixture component per class. Using reweighting we train using the following objective $- l o g ( p ( x | y ) ) / d i m + \bar { \alpha \cdot } - l o g \bar { ( } p ( y | x ) )$ . As one can see from table 4, standard trainig, i.e. $\alpha = 0$ , results in very poor accuracy, while reweighting the classification score results in much better accuracy but worse NLL.
|
| 379 |
+
|
| 380 |
+
Table 4: Accuracy and NLL for pixel $\mathrm { { C N N + + } }$ on CIFAR10
|
| 381 |
+
|
| 382 |
+
<table><tr><td rowspan=1 colspan=1>a</td><td rowspan=1 colspan=1>acc (%)</td><td rowspan=1 colspan=1>bits/dim</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>25.48</td><td rowspan=1 colspan=1>3.05</td></tr><tr><td rowspan=1 colspan=1>1000</td><td rowspan=1 colspan=1>85.78</td><td rowspan=1 colspan=1>3.34</td></tr></table>
|
parse/train/r1lPleBFvH/r1lPleBFvH_content_list.json
ADDED
|
@@ -0,0 +1,2042 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "UNDERSTANDING THE LIMITATIONS OF CONDITIONAL GENERATIVE MODELS ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
176,
|
| 8 |
+
99,
|
| 9 |
+
823,
|
| 10 |
+
146
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Ethan Fetaya∗ Jörn-Henrik Jacobsen∗",
|
| 17 |
+
"bbox": [
|
| 18 |
+
189,
|
| 19 |
+
170,
|
| 20 |
+
478,
|
| 21 |
+
184
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Will Grathwohl Richard Zemel ",
|
| 28 |
+
"bbox": [
|
| 29 |
+
504,
|
| 30 |
+
170,
|
| 31 |
+
753,
|
| 32 |
+
184
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "Vector Institute and University of Toronto {ethanf, jjacobs,wgrathwohl, zemel} $@$ cs.toronto.edu ",
|
| 39 |
+
"bbox": [
|
| 40 |
+
186,
|
| 41 |
+
185,
|
| 42 |
+
532,
|
| 43 |
+
212
|
| 44 |
+
],
|
| 45 |
+
"page_idx": 0
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"type": "text",
|
| 49 |
+
"text": "ABSTRACT ",
|
| 50 |
+
"text_level": 1,
|
| 51 |
+
"bbox": [
|
| 52 |
+
454,
|
| 53 |
+
250,
|
| 54 |
+
544,
|
| 55 |
+
263
|
| 56 |
+
],
|
| 57 |
+
"page_idx": 0
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "Class-conditional generative models hold promise to overcome the shortcomings of their discriminative counterparts. They are a natural choice to solve discriminative tasks in a robust manner as they jointly optimize for predictive performance and accurate modeling of the input distribution. In this work, we investigate robust classification with likelihood-based generative models from a theoretical and practical perspective to investigate if they can deliver on their promises. Our analysis focuses on a spectrum of robustness properties: (1) Detection of worst-case outliers in the form of adversarial examples; (2) Detection of average-case outliers in the form of ambiguous inputs and (3) Detection of incorrectly labeled in-distribution inputs. ",
|
| 62 |
+
"bbox": [
|
| 63 |
+
233,
|
| 64 |
+
281,
|
| 65 |
+
766,
|
| 66 |
+
420
|
| 67 |
+
],
|
| 68 |
+
"page_idx": 0
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"type": "text",
|
| 72 |
+
"text": "Our theoretical result reveals that it is impossible to guarantee detectability of adversarially-perturbed inputs even for near-optimal generative classifiers. Experimentally, we find that while we are able to train robust models for MNIST, robustness completely breaks down on CIFAR10. We relate this failure to various undesirable model properties that can be traced to the maximum likelihood training objective. Despite being a common choice in the literature, our results indicate that likelihood-based conditional generative models may are surprisingly ineffective for robust classification. ",
|
| 73 |
+
"bbox": [
|
| 74 |
+
232,
|
| 75 |
+
422,
|
| 76 |
+
766,
|
| 77 |
+
534
|
| 78 |
+
],
|
| 79 |
+
"page_idx": 0
|
| 80 |
+
},
|
| 81 |
+
{
|
| 82 |
+
"type": "text",
|
| 83 |
+
"text": "1 INTRODUCTION ",
|
| 84 |
+
"text_level": 1,
|
| 85 |
+
"bbox": [
|
| 86 |
+
176,
|
| 87 |
+
563,
|
| 88 |
+
336,
|
| 89 |
+
577
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "image",
|
| 95 |
+
"img_path": "images/f51ac6cb2b483941dc45d1454d22c2a1511c6d12c1d28b8b3fc7d14e31c5e964.jpg",
|
| 96 |
+
"image_caption": [
|
| 97 |
+
"Figure 1: Linear interpolations of inputs and respective outputs of a conditional generative model between two MNIST and CIFAR10 images from different classes. X-axis is interpolation steps and Y-axis negative log-likelihood in bits/dim (higher is more likely under model). MNIST interpolated images are far less likely than real images, whereas for CIFAR10 the opposite is observed, leading to high confidence classification of ambiguous out-of-distribution images. "
|
| 98 |
+
],
|
| 99 |
+
"image_footnote": [],
|
| 100 |
+
"bbox": [
|
| 101 |
+
173,
|
| 102 |
+
595,
|
| 103 |
+
823,
|
| 104 |
+
680
|
| 105 |
+
],
|
| 106 |
+
"page_idx": 0
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"type": "text",
|
| 110 |
+
"text": "Conditional generative models have recently shown promise to overcome many limitations of their discriminative counterparts. They have been shown to be robust against adversarial attacks (Schott et al., 2019; Ghosh et al., 2019; Song et al., 2018; Li et al., 2018; Frosst et al., 2018), to enable robust classification in the presence of outliers (Nalisnick et al., 2019b) and to achieve promising results in semi-supervised learning (Kingma et al., 2014; Salimans et al., 2016). Motivated by these success stories, we study the properties of conditional generative models in more detail. ",
|
| 111 |
+
"bbox": [
|
| 112 |
+
174,
|
| 113 |
+
781,
|
| 114 |
+
825,
|
| 115 |
+
864
|
| 116 |
+
],
|
| 117 |
+
"page_idx": 0
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"type": "text",
|
| 121 |
+
"text": "Unlike discriminative models, which can ignore class-irrelevant information, conditional generative models cannot discard any information in the input, potentially making it harder to fool them. Further, jointly modeling the input and target distribution should make it easy to detect out-of-distribution inputs. These traits lend hope to the belief that good class-conditional generative models can overcome important problems faced by discriminative models. ",
|
| 122 |
+
"bbox": [
|
| 123 |
+
174,
|
| 124 |
+
871,
|
| 125 |
+
823,
|
| 126 |
+
900
|
| 127 |
+
],
|
| 128 |
+
"page_idx": 0
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"type": "text",
|
| 132 |
+
"text": "",
|
| 133 |
+
"bbox": [
|
| 134 |
+
174,
|
| 135 |
+
103,
|
| 136 |
+
823,
|
| 137 |
+
145
|
| 138 |
+
],
|
| 139 |
+
"page_idx": 1
|
| 140 |
+
},
|
| 141 |
+
{
|
| 142 |
+
"type": "text",
|
| 143 |
+
"text": "In this work, we analyze conditional generative models by assessing them on a spectrum of robustness tasks. (1) Detection of worst-case outliers in the form of adversarial examples; (2) Detection of average-case outliers in the form of ambiguous inputs and (3) Detection of incorrectly labeled indistribution inputs. If a generative classifier is able to perform well on all of these, it will naturally be robust to noisy, ambiguous or adversarially perturbed inputs. ",
|
| 144 |
+
"bbox": [
|
| 145 |
+
174,
|
| 146 |
+
152,
|
| 147 |
+
825,
|
| 148 |
+
223
|
| 149 |
+
],
|
| 150 |
+
"page_idx": 1
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"type": "text",
|
| 154 |
+
"text": "Outlier detection in the above settings is substantially different from general out-of-distribution (OOD) detection, where the goal is to use unconditional generative models to detect any OOD input. For the general case, likelihood has been shown to be a poor detector of OOD samples. In fact, often higher likelihood is assigned to OOD data than to the training data itself (Nalisnick et al., 2019a). However, class-conditional likelihood necessarily needs to decrease towards the decision-boundary for the classifier to work well. Thus, if the class-conditional generative model has high accuracy, rejection of outliers from the wrong class via likelihood may be possible. ",
|
| 155 |
+
"bbox": [
|
| 156 |
+
174,
|
| 157 |
+
229,
|
| 158 |
+
825,
|
| 159 |
+
327
|
| 160 |
+
],
|
| 161 |
+
"page_idx": 1
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"type": "text",
|
| 165 |
+
"text": "Our contributions are: ",
|
| 166 |
+
"bbox": [
|
| 167 |
+
174,
|
| 168 |
+
334,
|
| 169 |
+
318,
|
| 170 |
+
348
|
| 171 |
+
],
|
| 172 |
+
"page_idx": 1
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"type": "text",
|
| 176 |
+
"text": "Provable Robustness We answer: Can we theoretically guarantee that a strong conditional generative model can robustly detect adversarially attacked inputs? In section 2 we show that even a near-perfect conditional generative model cannot be guaranteed to reject adversarially perturbed inputs with high probability. ",
|
| 177 |
+
"bbox": [
|
| 178 |
+
174,
|
| 179 |
+
356,
|
| 180 |
+
825,
|
| 181 |
+
411
|
| 182 |
+
],
|
| 183 |
+
"page_idx": 1
|
| 184 |
+
},
|
| 185 |
+
{
|
| 186 |
+
"type": "text",
|
| 187 |
+
"text": "Assessing the Likelihood Objective We discuss the basis to empirically analyze robustness in practice. We identify several fundamental issues with the maximum likelihood objective typically used to train conditional generative models and discuss whether it is appropriate for detecting out-of-distribution inputs. ",
|
| 188 |
+
"bbox": [
|
| 189 |
+
174,
|
| 190 |
+
417,
|
| 191 |
+
825,
|
| 192 |
+
474
|
| 193 |
+
],
|
| 194 |
+
"page_idx": 1
|
| 195 |
+
},
|
| 196 |
+
{
|
| 197 |
+
"type": "text",
|
| 198 |
+
"text": "Understanding Conflicting Results We explore various properties of our trained conditional generative models and how they relate to fact that the model is robust on MNIST but not on CIFAR10. We further propose a new dataset where we combine MNIST images with CIFAR background, making the generative task as hard as CIFAR while keeping the discriminative task as easy as MNIST, and investigate how it affects robustness. ",
|
| 199 |
+
"bbox": [
|
| 200 |
+
174,
|
| 201 |
+
481,
|
| 202 |
+
826,
|
| 203 |
+
550
|
| 204 |
+
],
|
| 205 |
+
"page_idx": 1
|
| 206 |
+
},
|
| 207 |
+
{
|
| 208 |
+
"type": "text",
|
| 209 |
+
"text": "2 CONFIDENT MISTAKES CANNOT BE RULED OUT ",
|
| 210 |
+
"text_level": 1,
|
| 211 |
+
"bbox": [
|
| 212 |
+
174,
|
| 213 |
+
584,
|
| 214 |
+
607,
|
| 215 |
+
602
|
| 216 |
+
],
|
| 217 |
+
"page_idx": 1
|
| 218 |
+
},
|
| 219 |
+
{
|
| 220 |
+
"type": "text",
|
| 221 |
+
"text": "The most challenging task in robust classification is accurately classifying or detecting adversarial attacks; inputs which have been maliciously perturbed to fool the classifier. In this section we discuss the possibility of guaranteeing robustness to adversarial attacks via conditional generative models. ",
|
| 222 |
+
"bbox": [
|
| 223 |
+
174,
|
| 224 |
+
625,
|
| 225 |
+
825,
|
| 226 |
+
666
|
| 227 |
+
],
|
| 228 |
+
"page_idx": 1
|
| 229 |
+
},
|
| 230 |
+
{
|
| 231 |
+
"type": "text",
|
| 232 |
+
"text": "Detectability of Adversarial Examples In the adversarial spheres work (Gilmer et al., 2018) the authors showed that a model can be fooled without changing the ground-truth probability of the attacked datapoint. This was claimed to show that adversarial examples can lie on the data manifold and therefore cannot be detected. While (Gilmer et al., 2018) is an important work for understanding adversarial attacks, it has several limitations with regard to conditional generative models. First, just because the attack does not change the ground-truth likelihood, this does not mean the model can not detect the attack. Since the adversary needs to move the input to a location where the model is incorrect, the question arises: what kind of mistake will the model make? If the model assigns low likelihood to the correct class without increasing the likelihood of the other classes then the adversarial attack will be detected, as the joint likelihood over all classes moves below the threshold of typical inputs. Second, on the adversarial spheres dataset (Gilmer et al., 2018) the class supports do not overlap. If we were to train a model of the joint density $p _ { \\theta } ( x , y )$ (which does not have $100 \\%$ classification accuracy) then the KL divergence $K L ( p ( x , y ) | | p _ { \\theta } ( x , y ) )$ , where $p ( x , y )$ is the data density, is infinite due to division by zero (note that $K L ( p _ { \\theta } ( x , y ) | | p ( x , y ) )$ is what is minimized with maximum likelihood). This poses the question, whether small $K L ( p ( x , y ) | | p _ { \\theta } ( x , y ) )$ or small Shannon-Jensen divergence is sufficient to guarantee robustness. In the following, we show that this condition is insufficient. ",
|
| 233 |
+
"bbox": [
|
| 234 |
+
174,
|
| 235 |
+
674,
|
| 236 |
+
825,
|
| 237 |
+
910
|
| 238 |
+
],
|
| 239 |
+
"page_idx": 1
|
| 240 |
+
},
|
| 241 |
+
{
|
| 242 |
+
"type": "image",
|
| 243 |
+
"img_path": "images/a316530879e8b50532cee9ad704425a78a97859cc4e9ec32af263afaac51ccd1.jpg",
|
| 244 |
+
"image_caption": [
|
| 245 |
+
"Figure 2: Counter example construction. Shown on the left are the two class data densities, on the right the Bayes-optimal classifier for this problem (assuming $\\lambda _ { 1 } > \\lambda _ { 2 }$ ) and the model we consider. Despite being almost optimal, the model can be fooled with undetectable adversarial examples (red arrows). Detailed description in section 2. "
|
| 246 |
+
],
|
| 247 |
+
"image_footnote": [],
|
| 248 |
+
"bbox": [
|
| 249 |
+
176,
|
| 250 |
+
73,
|
| 251 |
+
826,
|
| 252 |
+
161
|
| 253 |
+
],
|
| 254 |
+
"page_idx": 2
|
| 255 |
+
},
|
| 256 |
+
{
|
| 257 |
+
"type": "text",
|
| 258 |
+
"text": "Why no Robustness Guarantee can be Given The intuition why conditional generative models should be robust is as follows: If we have a robust discriminative model then the set of confident mistakes, i.e. where the adversarial attacks must reside, has low probability but might be large in volume. For a robust conditional generative model, the set of undetectable adversarial attacks, i.e. high-density high-confidence mistakes, has to be small in volume. Since the adversary has to be $\\Delta$ close to this small volume set, the $\\Delta$ area around this small volume set should still be small. This is where the idea breaks down due to the curse of dimensionality. Expanding a set by a small radius can lead to a much larger one even with smoothness assumptions. Based on this insight we build an analytic counter-example for which we can prove that even if ",
|
| 259 |
+
"bbox": [
|
| 260 |
+
173,
|
| 261 |
+
257,
|
| 262 |
+
826,
|
| 263 |
+
383
|
| 264 |
+
],
|
| 265 |
+
"page_idx": 2
|
| 266 |
+
},
|
| 267 |
+
{
|
| 268 |
+
"type": "equation",
|
| 269 |
+
"img_path": "images/91e500f42055584245dcd728b86bf624f71ea36d93fbcf176d1506a00c5f3e0e.jpg",
|
| 270 |
+
"text": "$$\n\\begin{array} { r } { K L \\left( q | | p \\right) < \\epsilon \\quad K L \\left( p | | q \\right) < \\epsilon } \\end{array}\n$$",
|
| 271 |
+
"text_format": "latex",
|
| 272 |
+
"bbox": [
|
| 273 |
+
400,
|
| 274 |
+
393,
|
| 275 |
+
598,
|
| 276 |
+
411
|
| 277 |
+
],
|
| 278 |
+
"page_idx": 2
|
| 279 |
+
},
|
| 280 |
+
{
|
| 281 |
+
"type": "text",
|
| 282 |
+
"text": "where $p = p ( x , y )$ is the data distribution, and $q = q ( x , y )$ is the model, we can with probability $\\approx 0 . 5$ take a correctly classified input sampled from $p$ , and perturb it by at most $\\Delta$ to create an adversarial example that is classified incorrectly and is not detectable. ",
|
| 283 |
+
"bbox": [
|
| 284 |
+
174,
|
| 285 |
+
421,
|
| 286 |
+
825,
|
| 287 |
+
464
|
| 288 |
+
],
|
| 289 |
+
"page_idx": 2
|
| 290 |
+
},
|
| 291 |
+
{
|
| 292 |
+
"type": "text",
|
| 293 |
+
"text": "We note that the probability in every ball with radius $\\Delta$ can be made as small as desired, excluding degenerate cases. We also assume that the Bayes optimal classifier is confident and is not affected by the attack, i.e. we do not change the underlying class but wrongfully flip the decision of the classifier. ",
|
| 294 |
+
"bbox": [
|
| 295 |
+
174,
|
| 296 |
+
470,
|
| 297 |
+
825,
|
| 298 |
+
513
|
| 299 |
+
],
|
| 300 |
+
"page_idx": 2
|
| 301 |
+
},
|
| 302 |
+
{
|
| 303 |
+
"type": "text",
|
| 304 |
+
"text": "The counter-example goes as follows: Let $U ( a , b )$ be the density of a uniform distribution on an annulus in dimension $d$ , $\\{ x \\in \\mathbb { R } ^ { d } : a \\leq | | x | | \\leq b \\}$ then the data conditional distribution is ",
|
| 305 |
+
"bbox": [
|
| 306 |
+
173,
|
| 307 |
+
520,
|
| 308 |
+
825,
|
| 309 |
+
550
|
| 310 |
+
],
|
| 311 |
+
"page_idx": 2
|
| 312 |
+
},
|
| 313 |
+
{
|
| 314 |
+
"type": "equation",
|
| 315 |
+
"img_path": "images/c9e76b7b131085ee8412a684b0d9d935a44a2e393cbdb0ca6c2035c464654189.jpg",
|
| 316 |
+
"text": "$$\n\\begin{array} { r l r l r } { p ( x | 0 ) = } & { { } \\lambda _ { 1 } U ( 0 , 1 ) + ( 1 - \\lambda _ { 1 } ) U ( 1 , 1 + \\Delta ) } & { } & { { } 0 \\le \\lambda _ { 1 } \\le 1 } \\\\ { p ( x | 1 ) = } & { { } } & { \\lambda _ { 2 } U ( 0 , 1 ) + ( 1 - \\lambda _ { 2 } ) U ( 2 , 3 ) } & { } & { { } 0 \\le \\lambda _ { 2 } \\le 1 } \\end{array}\n$$",
|
| 317 |
+
"text_format": "latex",
|
| 318 |
+
"bbox": [
|
| 319 |
+
289,
|
| 320 |
+
558,
|
| 321 |
+
709,
|
| 322 |
+
598
|
| 323 |
+
],
|
| 324 |
+
"page_idx": 2
|
| 325 |
+
},
|
| 326 |
+
{
|
| 327 |
+
"type": "text",
|
| 328 |
+
"text": "with $p ( y = 0 ) = p ( y = 1 ) = 1 / 2$ . Both classes are a mixture of two distributions, uniform on the unit sphere and uniform on an annulus, as shown in Fig. 2. The model distribution is the following: ",
|
| 329 |
+
"bbox": [
|
| 330 |
+
169,
|
| 331 |
+
606,
|
| 332 |
+
825,
|
| 333 |
+
635
|
| 334 |
+
],
|
| 335 |
+
"page_idx": 2
|
| 336 |
+
},
|
| 337 |
+
{
|
| 338 |
+
"type": "equation",
|
| 339 |
+
"img_path": "images/5e855e445d78d5ece99bc3f1d4e31440e0ba3df1488440143ab2786c7ee80204.jpg",
|
| 340 |
+
"text": "$$\n\\begin{array} { r l } { q ( x | 0 ) = } & { { } U ( 0 , 1 + \\Delta ) } \\\\ { q ( x | 1 ) = } & { { } \\lambda _ { 2 } U ( 0 , 1 ) + ( 1 - \\lambda _ { 2 } ) U ( 2 , 3 ) } \\end{array}\n$$",
|
| 341 |
+
"text_format": "latex",
|
| 342 |
+
"bbox": [
|
| 343 |
+
352,
|
| 344 |
+
643,
|
| 345 |
+
629,
|
| 346 |
+
683
|
| 347 |
+
],
|
| 348 |
+
"page_idx": 2
|
| 349 |
+
},
|
| 350 |
+
{
|
| 351 |
+
"type": "text",
|
| 352 |
+
"text": "i.e. for $y = 1$ the model is perfect, while for $y ~ = ~ 0$ we replace the mixture with uniform distribution over the whole domain. If $\\lambda _ { 1 } \\gg \\lambda _ { 2 }$ then points in the sphere with radius 1 should be classified as class $y = 0$ with high likelihood. If $\\begin{array} { r } { \\hat { \\lambda } _ { 2 } > > \\frac { 1 } { ( 1 + \\Delta ) ^ { d } } } \\end{array}$ then the model classifies points in the unit sphere incorrectly with high likelihood. Finally if $1 > > \\lambda _ { 1 }$ then almost half the data points will fall in the annulus between 1 and $1 + \\Delta$ and can be adversarially attacked with distance lesser or equal to $\\Delta$ by moving them into the unit sphere as seen in Fig. 2. We also note that these attacks cannot be detected as the model likelihood only increases. In high dimensions, almost all the volume of a sphere is in the outer shell, and this can be used to show that in high enough dimensions we can get the condition in Eq. 1 for any value of $\\epsilon$ and $\\Delta$ (and also the confidence of the mistakes $\\delta$ ). The detailed proof is in the supplementary material. ",
|
| 353 |
+
"bbox": [
|
| 354 |
+
173,
|
| 355 |
+
690,
|
| 356 |
+
825,
|
| 357 |
+
833
|
| 358 |
+
],
|
| 359 |
+
"page_idx": 2
|
| 360 |
+
},
|
| 361 |
+
{
|
| 362 |
+
"type": "text",
|
| 363 |
+
"text": "This counter-example shows that even under very strong conditions, a good conditional generative model can be attacked. Therefore no theoretical guarantees can be given in the general case for these models. Our construction, however, does not depend on the learning model but on the data geometry. This raises interesting questions concerning the source of the susceptibility to attacks: Is it the model or an inherent issue with the data? ",
|
| 364 |
+
"bbox": [
|
| 365 |
+
174,
|
| 366 |
+
854,
|
| 367 |
+
825,
|
| 368 |
+
922
|
| 369 |
+
],
|
| 370 |
+
"page_idx": 2
|
| 371 |
+
},
|
| 372 |
+
{
|
| 373 |
+
"type": "text",
|
| 374 |
+
"text": "3 THE MAXIMUM LIKELIHOOD OBJECTIVE ",
|
| 375 |
+
"text_level": 1,
|
| 376 |
+
"bbox": [
|
| 377 |
+
174,
|
| 378 |
+
102,
|
| 379 |
+
549,
|
| 380 |
+
118
|
| 381 |
+
],
|
| 382 |
+
"page_idx": 3
|
| 383 |
+
},
|
| 384 |
+
{
|
| 385 |
+
"type": "text",
|
| 386 |
+
"text": "3.1 THE DIFFICULTY IN TRAINING CONDITIONAL GENERATIVE MODELS ",
|
| 387 |
+
"text_level": 1,
|
| 388 |
+
"bbox": [
|
| 389 |
+
174,
|
| 390 |
+
132,
|
| 391 |
+
692,
|
| 392 |
+
147
|
| 393 |
+
],
|
| 394 |
+
"page_idx": 3
|
| 395 |
+
},
|
| 396 |
+
{
|
| 397 |
+
"type": "text",
|
| 398 |
+
"text": "Most recent publications on likelihood-based generative models primarily focus on quantitative results of unconditonal density estimation (van den Oord et al., 2016; Kingma & Dhariwal, 2018; Salimans et al., 2017b; Kingma et al., 2016; Papamakarios et al., 2017). For conditional density estimation, either only qualitative samples are shown (Kingma & Dhariwal, 2018), or it is reported that conditional density estimation does not lead to better likelihoods than unconditional density estimation. In fact, it has been reported that conditional density estimation can lead to slightly worse data likelihoods (Papamakarios et al., 2017; Salimans et al., 2017b), which is surprising at first, as extra bits of important information are provided to the model. ",
|
| 399 |
+
"bbox": [
|
| 400 |
+
173,
|
| 401 |
+
159,
|
| 402 |
+
825,
|
| 403 |
+
271
|
| 404 |
+
],
|
| 405 |
+
"page_idx": 3
|
| 406 |
+
},
|
| 407 |
+
{
|
| 408 |
+
"type": "text",
|
| 409 |
+
"text": "Explaining Likelihood Behaviour One way to understand this seemingly contradictory relationship is to consider the objective we use to train our models. When we train a generative model with maximum likelihood (either exactly or through a lower bound) we are minimizing the empirical approximation of $\\mathbb { E } _ { x , y \\sim P } \\left[ - \\log ( P _ { \\theta } ( \\dot { x } , y ) ) \\right]$ which is equivalent to minimizing $K L ( \\bar { P } ( x , y ) | | \\bar { P } _ { \\theta } ( x , y ) )$ . Consider now an image $x$ with a discrete label $y$ , which we are trying to model using $P _ { \\theta } ( x , y )$ . The negative log-likelihood (NLL) objective is: ",
|
| 410 |
+
"bbox": [
|
| 411 |
+
174,
|
| 412 |
+
276,
|
| 413 |
+
825,
|
| 414 |
+
361
|
| 415 |
+
],
|
| 416 |
+
"page_idx": 3
|
| 417 |
+
},
|
| 418 |
+
{
|
| 419 |
+
"type": "equation",
|
| 420 |
+
"img_path": "images/aeefe3e4062f6a1ce6f0d6f79d715a1afdb33a9f9833e2bc83c023c73539b7ae.jpg",
|
| 421 |
+
"text": "$$\n\\begin{array} { r l } { \\mathbb { E } _ { ( x , y ) \\sim P } [ - \\log ( P _ { \\theta } ( x , y ) ) ] = } & { \\ \\mathbb { E } _ { x \\sim P } [ - \\log ( P _ { \\theta } ( x ) ) ] } \\\\ { + } & { \\mathbb { E } _ { x \\sim P } [ \\mathbb { E } _ { y } [ - \\log ( P _ { \\theta } ( y | x ) ) | x ] ] } \\end{array}\n$$",
|
| 422 |
+
"text_format": "latex",
|
| 423 |
+
"bbox": [
|
| 424 |
+
287,
|
| 425 |
+
364,
|
| 426 |
+
694,
|
| 427 |
+
404
|
| 428 |
+
],
|
| 429 |
+
"page_idx": 3
|
| 430 |
+
},
|
| 431 |
+
{
|
| 432 |
+
"type": "text",
|
| 433 |
+
"text": "If we model $P _ { \\theta } ( y | x )$ with a uniform distribution over classes, then the second term has a value of $\\log ( C )$ where $C$ is the number of classes. This value is negligible compared to the first term $\\mathbb { E } _ { x \\sim P } [ - \\log ( P _ { \\theta } ( x ) ) ]$ and therefore the “penalty\" for completely ignoring class information is negligible. So it is not surprising that models with strong generative abilities can have limited discriminative power. What makes matters even worse is that the penalty for confident mis-classification can be unbounded. This may also explain why the conditional ELBO is comparable to the unconditional ELBO (Papamakarios et al., 2017). Another way this can be seen is by thinking of the likelihood as the best lossless compression. When trying to encode an image, the benefit of the label is at most $\\log ( C )$ bits which is small compared to the whole image. While these few bits are important for users, from a likelihood perspective the difference between the correct $p ( y | x )$ and a uniform distribution is negligible. This means that when naively training a class-conditional generative model by minimizing $\\mathbb { E } _ { ( x , y ) \\sim P } [ - \\log ( P _ { \\theta } ( x | y ) ) ]$ , typically discriminative performance as a classifier is very poor. ",
|
| 434 |
+
"bbox": [
|
| 435 |
+
173,
|
| 436 |
+
405,
|
| 437 |
+
825,
|
| 438 |
+
573
|
| 439 |
+
],
|
| 440 |
+
"page_idx": 3
|
| 441 |
+
},
|
| 442 |
+
{
|
| 443 |
+
"type": "text",
|
| 444 |
+
"text": "3.2 OUTLIER DETECTION ",
|
| 445 |
+
"text_level": 1,
|
| 446 |
+
"bbox": [
|
| 447 |
+
176,
|
| 448 |
+
589,
|
| 449 |
+
364,
|
| 450 |
+
603
|
| 451 |
+
],
|
| 452 |
+
"page_idx": 3
|
| 453 |
+
},
|
| 454 |
+
{
|
| 455 |
+
"type": "text",
|
| 456 |
+
"text": "Another issue arises when models trained with maximum likelihood are used to detect outliers. The main issue is that maximum likelihood, which is equivalent to minimizing $K L ( P ( x , y ) | | P _ { \\theta } ( x , y ) )$ , is known to have a “mode-covering” behavior. It has been shown recently in (Nalisnick et al., 2019a) that generative models, trained using maximum likelihood, can be quite poor at detecting out-of-distribution example. In fact it has been shown that these models can give higher likelihood values, on average, to datasets different from the test dataset that corresponds to the training data. Intuitivily one can still hope that a high accuracy conditional generative model would recognize an input conditioned on the wrong class as an outlier, as it was successfully trained to separate these classes. In section 4.2 we show this is not the case in practice. ",
|
| 457 |
+
"bbox": [
|
| 458 |
+
174,
|
| 459 |
+
614,
|
| 460 |
+
826,
|
| 461 |
+
739
|
| 462 |
+
],
|
| 463 |
+
"page_idx": 3
|
| 464 |
+
},
|
| 465 |
+
{
|
| 466 |
+
"type": "text",
|
| 467 |
+
"text": "While (Nalisnick et al., 2019a) focuses its analysis into dataset variance, we propose this is an inherit issue with the likelihood objective. If it is correct then the way conditional generative models are trained is at odds with their desired behaviour. If this is the case, then useful conditional generative model will require a fundamentally different approach. ",
|
| 468 |
+
"bbox": [
|
| 469 |
+
174,
|
| 470 |
+
747,
|
| 471 |
+
825,
|
| 472 |
+
804
|
| 473 |
+
],
|
| 474 |
+
"page_idx": 3
|
| 475 |
+
},
|
| 476 |
+
{
|
| 477 |
+
"type": "text",
|
| 478 |
+
"text": "4 EXPERIMENTS ",
|
| 479 |
+
"text_level": 1,
|
| 480 |
+
"bbox": [
|
| 481 |
+
176,
|
| 482 |
+
823,
|
| 483 |
+
326,
|
| 484 |
+
838
|
| 485 |
+
],
|
| 486 |
+
"page_idx": 3
|
| 487 |
+
},
|
| 488 |
+
{
|
| 489 |
+
"type": "text",
|
| 490 |
+
"text": "We now present a set of experiments designed to test the robustness of conditional generative models. All experiments were performed with a flow model where the likelihood can be computed in closed form as the probability of the latent space embedding (the prior) and a Jacobian correction term; see Sec A.1 for a detailed explanation. Given that we can compute $p ( x , y )$ for each class, we can easily compute $p ( y | x )$ and classify accordingly. Besides allowing closed-form likelihood computation, the flexibility in choosing the prior distribution was important to conduct various experiments. In our work we used a version of the GLOW model; details of the models and training is in the supplementary material sec. B. We note that the results are not unique to flow models, and we verified that similar phenomenon can be seen when training with the PixelC $\\mathrm { N N } { + } { + }$ autoregressive model (Salimans et al., 2017a) in sec. E. ",
|
| 491 |
+
"bbox": [
|
| 492 |
+
174,
|
| 493 |
+
854,
|
| 494 |
+
825,
|
| 495 |
+
924
|
| 496 |
+
],
|
| 497 |
+
"page_idx": 3
|
| 498 |
+
},
|
| 499 |
+
{
|
| 500 |
+
"type": "text",
|
| 501 |
+
"text": "",
|
| 502 |
+
"bbox": [
|
| 503 |
+
174,
|
| 504 |
+
103,
|
| 505 |
+
825,
|
| 506 |
+
172
|
| 507 |
+
],
|
| 508 |
+
"page_idx": 4
|
| 509 |
+
},
|
| 510 |
+
{
|
| 511 |
+
"type": "text",
|
| 512 |
+
"text": "4.1 TRAINING CONDITIONAL GENERATIVE MODELS ",
|
| 513 |
+
"text_level": 1,
|
| 514 |
+
"bbox": [
|
| 515 |
+
173,
|
| 516 |
+
190,
|
| 517 |
+
552,
|
| 518 |
+
205
|
| 519 |
+
],
|
| 520 |
+
"page_idx": 4
|
| 521 |
+
},
|
| 522 |
+
{
|
| 523 |
+
"type": "text",
|
| 524 |
+
"text": "Here we investigate the ability to train a conditional generative model with good likelihood and accuracy simultaneously. Usually in flow models the prior distribution in latent space $z$ is Gaussian. For classification we used aclass-conditional mixture of 10 Gaussians $p ( z | y ) \\overset { \\cdot } { = } \\mathcal { N } ( \\mu _ { y } , \\sigma _ { y } ^ { 2 } )$ We compare three settings: 1) A class-conditional mixture of 10 Gaussians as the prior (Base). 2) A classconditional mixture of 10 Gaussians trained with an additional classification loss term (Reweighted). 3) Our proposed conditional split prior (Split) described in sec. A.4 in the supplementary material. Results can be found in table 1. ",
|
| 525 |
+
"bbox": [
|
| 526 |
+
174,
|
| 527 |
+
217,
|
| 528 |
+
825,
|
| 529 |
+
315
|
| 530 |
+
],
|
| 531 |
+
"page_idx": 4
|
| 532 |
+
},
|
| 533 |
+
{
|
| 534 |
+
"type": "table",
|
| 535 |
+
"img_path": "images/4590d22ff228311502027324a145b819e55828f0e72bd17f8cc51f46dd977d49.jpg",
|
| 536 |
+
"table_caption": [
|
| 537 |
+
"Table 1: Comparison between different models. "
|
| 538 |
+
],
|
| 539 |
+
"table_footnote": [],
|
| 540 |
+
"table_body": "<table><tr><td>MNIST</td><td>Base</td><td>Reweight</td><td>Split</td><td>CIFAR10</td><td>Base</td><td>Reweight</td><td>Split</td></tr><tr><td>% Acc</td><td>96.9</td><td>99.0</td><td>99.3</td><td>% Acc</td><td>56.8</td><td>83.2</td><td>84.0</td></tr><tr><td>bits/diml</td><td>0.95</td><td>1.10</td><td>1.00</td><td>bits/dim</td><td>3.47</td><td>3.54</td><td>3.53</td></tr></table>",
|
| 541 |
+
"bbox": [
|
| 542 |
+
230,
|
| 543 |
+
325,
|
| 544 |
+
764,
|
| 545 |
+
377
|
| 546 |
+
],
|
| 547 |
+
"page_idx": 4
|
| 548 |
+
},
|
| 549 |
+
{
|
| 550 |
+
"type": "text",
|
| 551 |
+
"text": "As we can see, especially on CIFAR10, pushing up the accuracy to values that are still far from stateof-the-art already results in non-negligible deterioration to the likelihood values. This exemplifies how obtaining strong classification accuracy without harming likelihood estimation is still a challenging problem. We note that while the difference between the split prior and re-weighted version is not huge, the split prior achieves better NLL and better accuracy in both experiments. We experimented with various other methods to improve training with limited success, see sec. C in the supplementary material for furture information. ",
|
| 552 |
+
"bbox": [
|
| 553 |
+
173,
|
| 554 |
+
416,
|
| 555 |
+
826,
|
| 556 |
+
513
|
| 557 |
+
],
|
| 558 |
+
"page_idx": 4
|
| 559 |
+
},
|
| 560 |
+
{
|
| 561 |
+
"type": "image",
|
| 562 |
+
"img_path": "images/f4b03d4e20682dda406b7fd2a112e30ca231087600773229b8da05cd63fe5743.jpg",
|
| 563 |
+
"image_caption": [
|
| 564 |
+
"4.2 NEGLIGIBLE IMPACT OF CLASS MEMBERSHIP ON LIKELIHOOD ",
|
| 565 |
+
"Figure 3: NLL for images conditioned on the correct class vs the highest probability wrong class. "
|
| 566 |
+
],
|
| 567 |
+
"image_footnote": [],
|
| 568 |
+
"bbox": [
|
| 569 |
+
181,
|
| 570 |
+
553,
|
| 571 |
+
802,
|
| 572 |
+
683
|
| 573 |
+
],
|
| 574 |
+
"page_idx": 4
|
| 575 |
+
},
|
| 576 |
+
{
|
| 577 |
+
"type": "text",
|
| 578 |
+
"text": "Next we show that even conditional generative models which are strong classifiers do not see images with the corrupted labels as outliers. To understand this phenomenon we first note that if we want the correct class to have a probability of at least $1 - \\delta$ then it is enough for the corresponding logit to be larger than all the others by $\\begin{array} { r } { \\log ( \\mathbf { \\bar { \\boldsymbol { C } } } ) + \\log \\left( \\frac { 1 - \\delta } { \\delta } \\right) } \\end{array}$ where $C$ is the number of classes. For $C = 1 0$ and $\\delta = 1 e - 5$ this is about 6, which is negligible relative to the likelihood of the image, which is in the scale of thousands. This means that even for a strong conditional generative model which confidently predicts the correct label, the pair $\\{ x _ { i } , y _ { w } \\neq y _ { i } \\}$ (where $w$ is the leading incorrect class) cannot be detected as an outlier according to the joint distribution, as the gap $\\log ( p ( x _ { i } | y _ { i } ) ) - \\log ( p ( x _ { i } | y _ { w } ) )$ is much smaller than the variation in likelihood values. In Fig. 3 we show this by plotting the histograms of the likelihood conditioned both on the correct class and on the most likely wrong class over the test set. In other words, in order for $\\log ( p ( x _ { i } | y _ { w } ) )$ to be considered an outlier the prediction needs to be extremely confident, much more than we expect it to be, considering test classification error. ",
|
| 579 |
+
"bbox": [
|
| 580 |
+
173,
|
| 581 |
+
719,
|
| 582 |
+
825,
|
| 583 |
+
886
|
| 584 |
+
],
|
| 585 |
+
"page_idx": 4
|
| 586 |
+
},
|
| 587 |
+
{
|
| 588 |
+
"type": "text",
|
| 589 |
+
"text": "4.3 ADVERSARIAL ATTACKS AS WORST CASE ANALYSIS ",
|
| 590 |
+
"text_level": 1,
|
| 591 |
+
"bbox": [
|
| 592 |
+
174,
|
| 593 |
+
103,
|
| 594 |
+
580,
|
| 595 |
+
117
|
| 596 |
+
],
|
| 597 |
+
"page_idx": 5
|
| 598 |
+
},
|
| 599 |
+
{
|
| 600 |
+
"type": "text",
|
| 601 |
+
"text": "We first evaluate the ability of conditional generative models to detect standard attacks, and then try to detect attacks designed to fool the detector (likelihood function). We evalulate both the gradient based Carlini-Wagner $L _ { 2 }$ attack (CW- $L _ { 2 }$ ) (Carlini & Wagner, 2017b) and the gradient free boundary attack (Brendel et al., 2018). Results are shown in table 2 on the left. It is interesting to observe the disparity between the CW- $L _ { 2 }$ attack, which is easily detectable, and the boundary attack which is much harder to detect. ",
|
| 602 |
+
"bbox": [
|
| 603 |
+
173,
|
| 604 |
+
128,
|
| 605 |
+
825,
|
| 606 |
+
213
|
| 607 |
+
],
|
| 608 |
+
"page_idx": 5
|
| 609 |
+
},
|
| 610 |
+
{
|
| 611 |
+
"type": "table",
|
| 612 |
+
"img_path": "images/d434f392a95a1682c10603f66b288324dd99b196fc3bc2f09c3e10e0edafb9a8.jpg",
|
| 613 |
+
"table_caption": [
|
| 614 |
+
"Table 2: Comparison of attack detection. Percentage of successful and undetected attacks within $L _ { 2 }$ -distance of $\\epsilon = 1 . 5$ for MNIST and $\\epsilon = 3 3 / 2 5 5$ for CIFAR10 for proposed models. Number in parentheses is percentage of attacks that successfully fool the classifier, both detected and undetected. "
|
| 615 |
+
],
|
| 616 |
+
"table_footnote": [],
|
| 617 |
+
"table_body": "<table><tr><td>Attacking</td><td colspan=\"3\">Classification</td><td colspan=\"2\">Classification and Detection</td></tr><tr><td>MNIST</td><td>Reweight</td><td>Split</td><td>Reweight</td><td>Split</td><td rowspan=\"3\"></td></tr><tr><td>CW-L2</td><td>0% (100%)</td><td>1% (100%)</td><td>17% (100%)</td><td>14% (100%)</td></tr><tr><td>Boundary attack</td><td>43% (82%)</td><td>36% (80%)</td><td>0% (0%)</td><td>0% (0%)</td></tr><tr><td>CIFAR10</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>CW-L2</td><td>0% (97%)</td><td>0% (0%)</td><td>6% (99%)</td><td></td><td>3% (100%)</td></tr><tr><td>Boundary attack</td><td>67% (100%)</td><td>72% (100%)</td><td>100% (100%)</td><td></td><td>100% (100%)</td></tr></table>",
|
| 618 |
+
"bbox": [
|
| 619 |
+
173,
|
| 620 |
+
222,
|
| 621 |
+
826,
|
| 622 |
+
352
|
| 623 |
+
],
|
| 624 |
+
"page_idx": 5
|
| 625 |
+
},
|
| 626 |
+
{
|
| 627 |
+
"type": "text",
|
| 628 |
+
"text": "Next we modify our attacks to try to fool the detector as well. With the CW- $L _ { 2 }$ attack we follow the modification suggested in (Carlini & Wagner, 2017a) and add an extra loss term $\\ell _ { d e t } ( x ^ { \\prime } ) =$ $\\operatorname* { m a x } \\{ 0 , - \\log ( p ( x ^ { \\prime } ) ) - T \\}$ where $T$ is the detection threshold. For the boundary attack we turn the $C$ -way classification into a $C + 1$ -way classification by adding another class which is “non-image” and classify any image above the detection threshold as such. We then use a targeted attack to try to fool the network to classify the image into a specific original class. This simple modification to the boundary attack will typically fail because it cannot initialize. The standard attack starts from a random image and all random images are easily detected as “non-image” and therefore do not have the right target class. To address this we start from a randomly chosen image from the target class, ensuring the original image is detected as a real image from the desired class. ",
|
| 629 |
+
"bbox": [
|
| 630 |
+
173,
|
| 631 |
+
428,
|
| 632 |
+
825,
|
| 633 |
+
568
|
| 634 |
+
],
|
| 635 |
+
"page_idx": 5
|
| 636 |
+
},
|
| 637 |
+
{
|
| 638 |
+
"type": "text",
|
| 639 |
+
"text": "From table 2 (right side) we can see that even after the modification CW- $L _ { 2 }$ still struggles to fool the detector. The boundary attack, however, succeeds completely on CIFAR10 and fails completely on MNIST, even when it managed to sometimes fool the detector without directly trying. We hypothesize that this is because the area between two images of separate classes, where the boundary attack needs to pass through, is correctly detected as out of distribution only for MNIST and not CIFAR10. We explore this further below. ",
|
| 640 |
+
"bbox": [
|
| 641 |
+
174,
|
| 642 |
+
574,
|
| 643 |
+
825,
|
| 644 |
+
657
|
| 645 |
+
],
|
| 646 |
+
"page_idx": 5
|
| 647 |
+
},
|
| 648 |
+
{
|
| 649 |
+
"type": "text",
|
| 650 |
+
"text": "4.4 AMBIGUOUS INPUTS AS AVERAGE CASE ANALYSIS ",
|
| 651 |
+
"text_level": 1,
|
| 652 |
+
"bbox": [
|
| 653 |
+
174,
|
| 654 |
+
674,
|
| 655 |
+
571,
|
| 656 |
+
689
|
| 657 |
+
],
|
| 658 |
+
"page_idx": 5
|
| 659 |
+
},
|
| 660 |
+
{
|
| 661 |
+
"type": "text",
|
| 662 |
+
"text": "To understand why the learned networks are easily attacked on CIFAR but not on MNIST with the modified boundary attack, we explore the probability density of interpolations between two real images. This is inspired by the fact that the boundary attack proceeds along the line between the attacked image and the initial image. The minimum we would expect from a decent generative model is to detect the intermediate middle images as “non-image” with low likelihood. If this was the case and each class was a disconnected high likelihood region, the boundary attack would have a difficult time when starting from a different class image. ",
|
| 663 |
+
"bbox": [
|
| 664 |
+
174,
|
| 665 |
+
700,
|
| 666 |
+
825,
|
| 667 |
+
799
|
| 668 |
+
],
|
| 669 |
+
"page_idx": 5
|
| 670 |
+
},
|
| 671 |
+
{
|
| 672 |
+
"type": "text",
|
| 673 |
+
"text": "Given images $x _ { 0 }$ and $x _ { 1 }$ from separate classes $y _ { 0 }$ and $y _ { 1 }$ and for $\\alpha \\in [ 0 , 1 ]$ we generate an intermediate image $x _ { \\alpha } = \\alpha \\cdot x _ { 1 } + ( 1 - \\alpha ) x _ { 0 }$ , and run the model on various $\\alpha$ values to see the model prediction along the line. For endpoints we sample real images that are classified correctly and are above the detection threshold used previously. See Fig. 1 for interpolation examples from MNIST and CIFAR. ",
|
| 674 |
+
"bbox": [
|
| 675 |
+
174,
|
| 676 |
+
805,
|
| 677 |
+
825,
|
| 678 |
+
861
|
| 679 |
+
],
|
| 680 |
+
"page_idx": 5
|
| 681 |
+
},
|
| 682 |
+
{
|
| 683 |
+
"type": "text",
|
| 684 |
+
"text": "In figure 4 (a) we see the average results for MNIST for 1487 randomly selected pairs. As expected, the likelihood goes down as $\\alpha$ moves away from the real images $x _ { 0 }$ and $x _ { 1 }$ . We also see the probability of both classes drop rapidly as the network predictions become less confident on the intermediate images. Sampling $1 0 0 \\alpha$ values uniformly in the range $[ 0 , 1 ]$ we can also investigate how many of the interpolations all stay above the detection threshold, i.e. all intermediate images are considered real by the model, and find that this happens only in $0 . 5 \\%$ of the cases. ",
|
| 685 |
+
"bbox": [
|
| 686 |
+
174,
|
| 687 |
+
867,
|
| 688 |
+
825,
|
| 689 |
+
924
|
| 690 |
+
],
|
| 691 |
+
"page_idx": 5
|
| 692 |
+
},
|
| 693 |
+
{
|
| 694 |
+
"type": "image",
|
| 695 |
+
"img_path": "images/a5c787f2933fe6b8728766427373b7e0d5084899b3185c8e32b4fe90b27952fe.jpg",
|
| 696 |
+
"image_caption": [
|
| 697 |
+
"Figure 4: Average Log likelihoods and class probabilities for interpolations between data points from different classes, $\\mathbf { X }$ -axis is interpolation coefficient $\\alpha$ . The MNIST model behaves as desired and robustly detects interpolated images. The CIFAR10 model, however, fails strikingly and interpolatd images are consistently more likely than true data under the model. "
|
| 698 |
+
],
|
| 699 |
+
"image_footnote": [],
|
| 700 |
+
"bbox": [
|
| 701 |
+
191,
|
| 702 |
+
101,
|
| 703 |
+
803,
|
| 704 |
+
250
|
| 705 |
+
],
|
| 706 |
+
"page_idx": 6
|
| 707 |
+
},
|
| 708 |
+
{
|
| 709 |
+
"type": "text",
|
| 710 |
+
"text": "",
|
| 711 |
+
"bbox": [
|
| 712 |
+
173,
|
| 713 |
+
352,
|
| 714 |
+
823,
|
| 715 |
+
381
|
| 716 |
+
],
|
| 717 |
+
"page_idx": 6
|
| 718 |
+
},
|
| 719 |
+
{
|
| 720 |
+
"type": "text",
|
| 721 |
+
"text": "On CIFAR images, using 1179 pairs, we get a very different picture (see fig. 4 (b)). Not only does the intermediate likelihood not drop down, it is even higher on average than on the real images albeit to a small degree. In classification we also see a very smooth transition between classes, unlike the sharp drop in the MNIST experiment. Lastly, $100 \\%$ of the interpolated images lay above the detection threshold and none are detected as a “non-image” (for reference the detection threshold has $7 8 . 6 \\%$ recall on real CIFAR10 test images). This shows that even with good likelihood and reasonable accuracy, the model still “mashes\" the classes together, as one can move from one Gaussian to another without passing through low likelihood regions in-between. It also clarifies why the boundary attack is so successful on CIFAR but fails completely on MNIST. We note that the basic attack on MNIST is allowed to pass through these low density areas which is why it sometimes succeeds. ",
|
| 722 |
+
"bbox": [
|
| 723 |
+
174,
|
| 724 |
+
387,
|
| 725 |
+
825,
|
| 726 |
+
526
|
| 727 |
+
],
|
| 728 |
+
"page_idx": 6
|
| 729 |
+
},
|
| 730 |
+
{
|
| 731 |
+
"type": "text",
|
| 732 |
+
"text": "4.5 CLASS-UNRELATED ENTROPY IS TO BLAME ",
|
| 733 |
+
"text_level": 1,
|
| 734 |
+
"bbox": [
|
| 735 |
+
178,
|
| 736 |
+
554,
|
| 737 |
+
517,
|
| 738 |
+
568
|
| 739 |
+
],
|
| 740 |
+
"page_idx": 6
|
| 741 |
+
},
|
| 742 |
+
{
|
| 743 |
+
"type": "text",
|
| 744 |
+
"text": "In this section, we show that the difference in performance between CIFAR10 and MNIST can largely be attributed to how the entropy in the datasets is distributed, i.e how much the uncertainty in the data distribution is reduced after conditioning on the class label. For MNIST digits, a large source of uncertainty in pixel-space comes from the class label. Given the class, most pixels can be predicted accurately by simply taking the mean of the training set in each class. This is exactly why a linear classifier performs well on MNIST. Conversely on CIFAR10, after conditioning on the class label there still exists considerable uncertainty. Given the class is “cat,” there still exists many complicated sources of uncertainty such as where the cat is and how it is posed. In this dataset, a much larger fraction of the uncertainty is not accounted for after conditioning on the label. This is not a function of the domain or the dimensionality of the dataset, it is a function of the dataset itself. ",
|
| 745 |
+
"bbox": [
|
| 746 |
+
176,
|
| 747 |
+
584,
|
| 748 |
+
581,
|
| 749 |
+
804
|
| 750 |
+
],
|
| 751 |
+
"page_idx": 6
|
| 752 |
+
},
|
| 753 |
+
{
|
| 754 |
+
"type": "text",
|
| 755 |
+
"text": "To empirically verify this, we have designed a dataset which replicates the challenges of CIFAR10 and places them onto a problem of the same discriminative difficulty as MNIST. To achieve this, we simply replaced the black backgrounds of MNIST images with randomly sampled (downsampled and greyscaled) images from CIFAR10. In this dataset, which we call background-MNIST (BG-MNIST), the classification problem is identically predictable from the same set of pixels as in standard MNIST but modeling the data density is much more challenging. ",
|
| 756 |
+
"bbox": [
|
| 757 |
+
174,
|
| 758 |
+
813,
|
| 759 |
+
580,
|
| 760 |
+
924
|
| 761 |
+
],
|
| 762 |
+
"page_idx": 6
|
| 763 |
+
},
|
| 764 |
+
{
|
| 765 |
+
"type": "image",
|
| 766 |
+
"img_path": "images/e895d54fe1c9ddab4efbf4cad5140ddb4ba4a365ff81937e96d87e5d9df0406e.jpg",
|
| 767 |
+
"image_caption": [
|
| 768 |
+
"Figure 5: Top: Samples from the BG-MNIST-0 dataset. Bottom: Samples from conditional generative model trained on the dataset. Note how the model has learnd to capture digit identity. "
|
| 769 |
+
],
|
| 770 |
+
"image_footnote": [],
|
| 771 |
+
"bbox": [
|
| 772 |
+
604,
|
| 773 |
+
601,
|
| 774 |
+
820,
|
| 775 |
+
804
|
| 776 |
+
],
|
| 777 |
+
"page_idx": 6
|
| 778 |
+
},
|
| 779 |
+
{
|
| 780 |
+
"type": "text",
|
| 781 |
+
"text": "",
|
| 782 |
+
"bbox": [
|
| 783 |
+
174,
|
| 784 |
+
103,
|
| 785 |
+
581,
|
| 786 |
+
132
|
| 787 |
+
],
|
| 788 |
+
"page_idx": 7
|
| 789 |
+
},
|
| 790 |
+
{
|
| 791 |
+
"type": "text",
|
| 792 |
+
"text": "To further control the entropy in a fine-grained manner, we convolve the background with a Gaussian blur filter with various bandwidths to remove varying degrees of high frequency information. With high blur, the task begins to resemble standard MNIST and conditional generative models should perform as they do on MNIST. With low and no blur we expect them to behave as they do on CIFAR10. ",
|
| 793 |
+
"bbox": [
|
| 794 |
+
174,
|
| 795 |
+
138,
|
| 796 |
+
825,
|
| 797 |
+
208
|
| 798 |
+
],
|
| 799 |
+
"page_idx": 7
|
| 800 |
+
},
|
| 801 |
+
{
|
| 802 |
+
"type": "text",
|
| 803 |
+
"text": "Table 3 summarizes the performance of conditional generative models on BG-MNIST. We train models with a “Reweighted” discriminative objective as in Section A. The reweighting allows them to perform well as classifiers but the likelihood of their generative component falls to below CIFAR10 levels. More strikingly, now when we interpolate between datapoints we observe behavior identical to our CIFAR10 models. This can be seen in Figure 6. Thus, we have created a dataset with the discriminative difficulty of MNIST and the generative difficulty of CIFAR10. ",
|
| 804 |
+
"bbox": [
|
| 805 |
+
173,
|
| 806 |
+
215,
|
| 807 |
+
825,
|
| 808 |
+
300
|
| 809 |
+
],
|
| 810 |
+
"page_idx": 7
|
| 811 |
+
},
|
| 812 |
+
{
|
| 813 |
+
"type": "table",
|
| 814 |
+
"img_path": "images/c02cc8e4952153eb63af1754a64cbd84d58e692227c9719c7fa7fc13568bf380.jpg",
|
| 815 |
+
"table_caption": [],
|
| 816 |
+
"table_footnote": [],
|
| 817 |
+
"table_body": "<table><tr><td></td><td>MNIST</td><td>BG-MNIST-5</td><td>BG-MNIST-1</td><td>BG-MNIST-0</td><td>CIFAR10</td></tr><tr><td>% Acc</td><td>99</td><td>99</td><td>99</td><td>98</td><td>84</td></tr><tr><td>bits/dim</td><td>1.10</td><td>1.67</td><td>3.30</td><td>4.58</td><td>3.53</td></tr></table>",
|
| 818 |
+
"bbox": [
|
| 819 |
+
210,
|
| 820 |
+
313,
|
| 821 |
+
787,
|
| 822 |
+
364
|
| 823 |
+
],
|
| 824 |
+
"page_idx": 7
|
| 825 |
+
},
|
| 826 |
+
{
|
| 827 |
+
"type": "text",
|
| 828 |
+
"text": "Table 3: Conditional generative models trained on BG-MNIST. BG-MNIST- $X$ indicates the bandwith of blur applied to CIFAR10 backgrounds. ",
|
| 829 |
+
"bbox": [
|
| 830 |
+
171,
|
| 831 |
+
380,
|
| 832 |
+
825,
|
| 833 |
+
409
|
| 834 |
+
],
|
| 835 |
+
"page_idx": 7
|
| 836 |
+
},
|
| 837 |
+
{
|
| 838 |
+
"type": "image",
|
| 839 |
+
"img_path": "images/53105c91c585c3628b78e75d876f74fa33113c06a57f4042bcf793784f3ea097.jpg",
|
| 840 |
+
"image_caption": [
|
| 841 |
+
"Figure 6: Average log-likelihoods and class probabilities for interpolations between BG-MNIST-0 datapoints. While classification is on par with MNIST models, the likelihood exhibits the same failures as CIFAR10 models. "
|
| 842 |
+
],
|
| 843 |
+
"image_footnote": [],
|
| 844 |
+
"bbox": [
|
| 845 |
+
181,
|
| 846 |
+
438,
|
| 847 |
+
813,
|
| 848 |
+
542
|
| 849 |
+
],
|
| 850 |
+
"page_idx": 7
|
| 851 |
+
},
|
| 852 |
+
{
|
| 853 |
+
"type": "text",
|
| 854 |
+
"text": "5 RELATED WORK ",
|
| 855 |
+
"text_level": 1,
|
| 856 |
+
"bbox": [
|
| 857 |
+
176,
|
| 858 |
+
626,
|
| 859 |
+
344,
|
| 860 |
+
642
|
| 861 |
+
],
|
| 862 |
+
"page_idx": 7
|
| 863 |
+
},
|
| 864 |
+
{
|
| 865 |
+
"type": "text",
|
| 866 |
+
"text": "Despite state of the art performance in many tasks, deep neural networks have been shown to be fragile where small image transformations, (Azulay & Weiss, 2018) or background object transplant (Rosenfeld et al., 2018) can greatly change predictions. In the more challenging case of adversarial pertubations, deep neural networks are known to be vulnerable to adversarial attacks (Akhtar & Mian, 2018), and while many attempts have been made to train robust models or detect malicious attacks, significant progress towards truly robust models has been made only on MNIST (Schott et al., 2019; Madry et al., 2017). Even CIFAR10 remains far from being solved from a standpoint of adversarial robustness. ",
|
| 867 |
+
"bbox": [
|
| 868 |
+
173,
|
| 869 |
+
659,
|
| 870 |
+
825,
|
| 871 |
+
770
|
| 872 |
+
],
|
| 873 |
+
"page_idx": 7
|
| 874 |
+
},
|
| 875 |
+
{
|
| 876 |
+
"type": "text",
|
| 877 |
+
"text": "One common belief is that adversarial attacks succeed by moving the data points off the data manifold, and therefore can possibly be detected by a generative model which should assign them low likelihood values. Although this view has been challenged in (Gilmer et al., 2018), we now discuss how their setting needs to be extended to fully study robustness guarantees of conditional generative models. ",
|
| 878 |
+
"bbox": [
|
| 879 |
+
174,
|
| 880 |
+
776,
|
| 881 |
+
825,
|
| 882 |
+
833
|
| 883 |
+
],
|
| 884 |
+
"page_idx": 7
|
| 885 |
+
},
|
| 886 |
+
{
|
| 887 |
+
"type": "text",
|
| 888 |
+
"text": "Recent work (Song et al., 2018; Frosst et al., 2018; Li et al., 2018) showed that a generative model can detect and defend adversarial attacks. However, there is a caveat when evaluating detectability of adversarial attacks: the attacker needs to be able to attack the detection algorithm as well. Not doing so has been shown to lead to drastically false robustness claims (Carlini & Wagner, 2017a). In (Li et al., 2018) the authors report difficulties training a high accuracy conditional generative model on CIFAR10, and resort to evaluation on a 2-class classification problem derived from CIFAR10. While they do show robustness similar to our Carlini-Wagner results, they do not apply the boundary attack which we found to break our models on CIFAR10. This highlights the need to utilize a diverse set of attacks. In (Schott et al., 2019) a generative model was used not just for adversarial detection but also robust classification on MNIST, leading to state-of-the-art robust classification accuracy. The method was only shown to work on MNIST, and is very slow at inference time. However, overall it provides an existence proof that conditional generative models can be very robust in practice. In (Ghosh et al., 2019) the authors also use generative models for detection and classification but only show results with the relatively weak FGSM attack, and on simple datasets. As we see in Fig. 1 and discuss in section 4, generative models trained on MNIST can display very different behavior than similar models trained on more challenging data like CIFAR10. This shows how success on MNIST may often not translate to success on other datasets. ",
|
| 889 |
+
"bbox": [
|
| 890 |
+
174,
|
| 891 |
+
839,
|
| 892 |
+
825,
|
| 893 |
+
924
|
| 894 |
+
],
|
| 895 |
+
"page_idx": 7
|
| 896 |
+
},
|
| 897 |
+
{
|
| 898 |
+
"type": "text",
|
| 899 |
+
"text": "",
|
| 900 |
+
"bbox": [
|
| 901 |
+
174,
|
| 902 |
+
103,
|
| 903 |
+
825,
|
| 904 |
+
256
|
| 905 |
+
],
|
| 906 |
+
"page_idx": 8
|
| 907 |
+
},
|
| 908 |
+
{
|
| 909 |
+
"type": "text",
|
| 910 |
+
"text": "6 CONCLUSION ",
|
| 911 |
+
"text_level": 1,
|
| 912 |
+
"bbox": [
|
| 913 |
+
174,
|
| 914 |
+
276,
|
| 915 |
+
318,
|
| 916 |
+
292
|
| 917 |
+
],
|
| 918 |
+
"page_idx": 8
|
| 919 |
+
},
|
| 920 |
+
{
|
| 921 |
+
"type": "text",
|
| 922 |
+
"text": "In this work we explored limitations, both in theory and practice, of using conditional generative models to detect adversarial attacks. Most practical issues arise due to likelihood, the standard objective and evaluation metric for generative models by which probabilities can be computed. We conclude that likelihood-based density modeling and robust classification may fundamentally be at odds with one another as important aspects of the problem are not captured by this training and evaluation metric. This has wide-reaching implications for applications like out-of-distribution detection, adversarial robustness and generalization as well as semi-supervised learning with these models. ",
|
| 923 |
+
"bbox": [
|
| 924 |
+
174,
|
| 925 |
+
308,
|
| 926 |
+
825,
|
| 927 |
+
419
|
| 928 |
+
],
|
| 929 |
+
"page_idx": 8
|
| 930 |
+
},
|
| 931 |
+
{
|
| 932 |
+
"type": "text",
|
| 933 |
+
"text": "REFERENCES ",
|
| 934 |
+
"text_level": 1,
|
| 935 |
+
"bbox": [
|
| 936 |
+
176,
|
| 937 |
+
440,
|
| 938 |
+
285,
|
| 939 |
+
455
|
| 940 |
+
],
|
| 941 |
+
"page_idx": 8
|
| 942 |
+
},
|
| 943 |
+
{
|
| 944 |
+
"type": "text",
|
| 945 |
+
"text": "Naveed Akhtar and Ajmal S. Mian. Threat of adversarial attacks on deep learning in computer vision: A survey. IEEE Access, 6:14410–14430, 2018. ",
|
| 946 |
+
"bbox": [
|
| 947 |
+
176,
|
| 948 |
+
463,
|
| 949 |
+
825,
|
| 950 |
+
492
|
| 951 |
+
],
|
| 952 |
+
"page_idx": 8
|
| 953 |
+
},
|
| 954 |
+
{
|
| 955 |
+
"type": "text",
|
| 956 |
+
"text": "Aharon Azulay and Yair Weiss. Why do deep convolutional networks generalize so poorly to small image transformations? CoRR, 2018. URL http://arxiv.org/abs/1805.12177. ",
|
| 957 |
+
"bbox": [
|
| 958 |
+
174,
|
| 959 |
+
501,
|
| 960 |
+
825,
|
| 961 |
+
530
|
| 962 |
+
],
|
| 963 |
+
"page_idx": 8
|
| 964 |
+
},
|
| 965 |
+
{
|
| 966 |
+
"type": "text",
|
| 967 |
+
"text": "Jens Behrmann, Will Grathwohl, Ricky T. Q. Chen, David Duvenaud, and Jörn-Henrik Jacobsen. Invertible residual networks. International Conference on Machine Learning, 2019. ",
|
| 968 |
+
"bbox": [
|
| 969 |
+
173,
|
| 970 |
+
537,
|
| 971 |
+
825,
|
| 972 |
+
568
|
| 973 |
+
],
|
| 974 |
+
"page_idx": 8
|
| 975 |
+
},
|
| 976 |
+
{
|
| 977 |
+
"type": "text",
|
| 978 |
+
"text": "Wieland Brendel, Jonas Rauber, and Matthias Bethge. Decision-based adversarial attacks: Reliable attacks against black-box machine learning models. In International Conference on Learning Representations (ICLR), 2018. URL https://openreview.net/forum?id $\\underline { { \\underline { { \\mathbf { \\Pi } } } } }$ SyZI0GWCZ. ",
|
| 979 |
+
"bbox": [
|
| 980 |
+
176,
|
| 981 |
+
577,
|
| 982 |
+
825,
|
| 983 |
+
619
|
| 984 |
+
],
|
| 985 |
+
"page_idx": 8
|
| 986 |
+
},
|
| 987 |
+
{
|
| 988 |
+
"type": "text",
|
| 989 |
+
"text": "Nicholas Carlini and David Wagner. Adversarial examples are not easily detected: Bypassing ten detection methods. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security, pp. 3–14. ACM, 2017a. ",
|
| 990 |
+
"bbox": [
|
| 991 |
+
176,
|
| 992 |
+
627,
|
| 993 |
+
821,
|
| 994 |
+
670
|
| 995 |
+
],
|
| 996 |
+
"page_idx": 8
|
| 997 |
+
},
|
| 998 |
+
{
|
| 999 |
+
"type": "text",
|
| 1000 |
+
"text": "Nicholas Carlini and David A. Wagner. Towards evaluating the robustness of neural networks. In IEEE Symposium on Security and Privacy, SP, 2017b. ",
|
| 1001 |
+
"bbox": [
|
| 1002 |
+
173,
|
| 1003 |
+
679,
|
| 1004 |
+
823,
|
| 1005 |
+
708
|
| 1006 |
+
],
|
| 1007 |
+
"page_idx": 8
|
| 1008 |
+
},
|
| 1009 |
+
{
|
| 1010 |
+
"type": "text",
|
| 1011 |
+
"text": "Laurent Dinh, David Krueger, and Yoshua Bengio. NICE: non-linear independent components estimation. In International Conference on Learning Representations (ICLR), 2015. ",
|
| 1012 |
+
"bbox": [
|
| 1013 |
+
171,
|
| 1014 |
+
717,
|
| 1015 |
+
823,
|
| 1016 |
+
746
|
| 1017 |
+
],
|
| 1018 |
+
"page_idx": 8
|
| 1019 |
+
},
|
| 1020 |
+
{
|
| 1021 |
+
"type": "text",
|
| 1022 |
+
"text": "Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real NVP. In International Conference on Learning Representations, (ICLR), 2017. ",
|
| 1023 |
+
"bbox": [
|
| 1024 |
+
173,
|
| 1025 |
+
753,
|
| 1026 |
+
823,
|
| 1027 |
+
784
|
| 1028 |
+
],
|
| 1029 |
+
"page_idx": 8
|
| 1030 |
+
},
|
| 1031 |
+
{
|
| 1032 |
+
"type": "text",
|
| 1033 |
+
"text": "Nicholas Frosst, Sara Sabour, and Geoffrey Hinton. Darccc: Detecting adversaries by reconstruction from class conditional capsules. arXiv preprint arXiv:1811.06969, 2018. ",
|
| 1034 |
+
"bbox": [
|
| 1035 |
+
171,
|
| 1036 |
+
791,
|
| 1037 |
+
823,
|
| 1038 |
+
821
|
| 1039 |
+
],
|
| 1040 |
+
"page_idx": 8
|
| 1041 |
+
},
|
| 1042 |
+
{
|
| 1043 |
+
"type": "text",
|
| 1044 |
+
"text": "Partha Ghosh, Arpan Losalka, and Michael J Black. Resisting adversarial attacks using gaussian mixture variational autoencoders. In Conference on Artificial Intelligence (AAAI), 2019. URL https://arxiv.org/abs/1806.00081. ",
|
| 1045 |
+
"bbox": [
|
| 1046 |
+
176,
|
| 1047 |
+
829,
|
| 1048 |
+
823,
|
| 1049 |
+
872
|
| 1050 |
+
],
|
| 1051 |
+
"page_idx": 8
|
| 1052 |
+
},
|
| 1053 |
+
{
|
| 1054 |
+
"type": "text",
|
| 1055 |
+
"text": "Justin Gilmer, Luke Metz, Fartash Faghri, Samuel S. Schoenholz, Maithra Raghu, Martin Wattenberg, and Ian J. Goodfellow. Adversarial spheres. International Conference on Learning Representations (ICLR), 2018. URL http://arxiv.org/abs/1801.02774. ",
|
| 1056 |
+
"bbox": [
|
| 1057 |
+
174,
|
| 1058 |
+
882,
|
| 1059 |
+
825,
|
| 1060 |
+
924
|
| 1061 |
+
],
|
| 1062 |
+
"page_idx": 8
|
| 1063 |
+
},
|
| 1064 |
+
{
|
| 1065 |
+
"type": "text",
|
| 1066 |
+
"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 27. 2014. URL http://papers.nips.cc/paper/ 5423-generative-adversarial-nets.pdf. ",
|
| 1067 |
+
"bbox": [
|
| 1068 |
+
174,
|
| 1069 |
+
103,
|
| 1070 |
+
826,
|
| 1071 |
+
160
|
| 1072 |
+
],
|
| 1073 |
+
"page_idx": 9
|
| 1074 |
+
},
|
| 1075 |
+
{
|
| 1076 |
+
"type": "text",
|
| 1077 |
+
"text": "Aditya Grover, Manik Dhar, and Stefano Ermon. Flow-gan: Combining maximum likelihood and adversarial learning in generative models. In Conference on Artificial Intelligence (AAAI), 2018. ",
|
| 1078 |
+
"bbox": [
|
| 1079 |
+
173,
|
| 1080 |
+
170,
|
| 1081 |
+
823,
|
| 1082 |
+
199
|
| 1083 |
+
],
|
| 1084 |
+
"page_idx": 9
|
| 1085 |
+
},
|
| 1086 |
+
{
|
| 1087 |
+
"type": "text",
|
| 1088 |
+
"text": "Joern-Henrik Jacobsen, Jens Behrmann, Richard Zemel, and Matthias Bethge. Excessive invariance causes adversarial vulnerability. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id $=$ BkfbpsAcF7. ",
|
| 1089 |
+
"bbox": [
|
| 1090 |
+
173,
|
| 1091 |
+
208,
|
| 1092 |
+
826,
|
| 1093 |
+
252
|
| 1094 |
+
],
|
| 1095 |
+
"page_idx": 9
|
| 1096 |
+
},
|
| 1097 |
+
{
|
| 1098 |
+
"type": "text",
|
| 1099 |
+
"text": "Jörn-Henrik Jacobsen, Arnold W. M. Smeulders, and Edouard Oyallon. i-revnet: Deep invertible networks. International Conference on Learning Representations (ICLR), 2018. URL http: //arxiv.org/abs/1802.07088. ",
|
| 1100 |
+
"bbox": [
|
| 1101 |
+
173,
|
| 1102 |
+
262,
|
| 1103 |
+
826,
|
| 1104 |
+
305
|
| 1105 |
+
],
|
| 1106 |
+
"page_idx": 9
|
| 1107 |
+
},
|
| 1108 |
+
{
|
| 1109 |
+
"type": "text",
|
| 1110 |
+
"text": "Durk P Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible 1x1 convolutions. In Advances in Neural Information Processing Systems, pp. 10236–10245, 2018. ",
|
| 1111 |
+
"bbox": [
|
| 1112 |
+
168,
|
| 1113 |
+
314,
|
| 1114 |
+
823,
|
| 1115 |
+
344
|
| 1116 |
+
],
|
| 1117 |
+
"page_idx": 9
|
| 1118 |
+
},
|
| 1119 |
+
{
|
| 1120 |
+
"type": "text",
|
| 1121 |
+
"text": "Durk P Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semi-supervised learning with deep generative models. In Advances in neural information processing systems (NIPS), pp. 3581–3589, 2014. ",
|
| 1122 |
+
"bbox": [
|
| 1123 |
+
174,
|
| 1124 |
+
353,
|
| 1125 |
+
823,
|
| 1126 |
+
397
|
| 1127 |
+
],
|
| 1128 |
+
"page_idx": 9
|
| 1129 |
+
},
|
| 1130 |
+
{
|
| 1131 |
+
"type": "text",
|
| 1132 |
+
"text": "Durk P Kingma, Tim Salimans, Rafal Jozefowicz, Xi Chen, Ilya Sutskever, and Max Welling. Improved variational inference with inverse autoregressive flow. In Advances in neural information processing systems, pp. 4743–4751, 2016. ",
|
| 1133 |
+
"bbox": [
|
| 1134 |
+
174,
|
| 1135 |
+
406,
|
| 1136 |
+
825,
|
| 1137 |
+
450
|
| 1138 |
+
],
|
| 1139 |
+
"page_idx": 9
|
| 1140 |
+
},
|
| 1141 |
+
{
|
| 1142 |
+
"type": "text",
|
| 1143 |
+
"text": "Yingzhen Li, John Bradshaw, and Yash Sharma. Are generative classifiers more robust to adversarial attacks? arXiv preprint arXiv:1802.06552, 2018. ",
|
| 1144 |
+
"bbox": [
|
| 1145 |
+
173,
|
| 1146 |
+
460,
|
| 1147 |
+
823,
|
| 1148 |
+
489
|
| 1149 |
+
],
|
| 1150 |
+
"page_idx": 9
|
| 1151 |
+
},
|
| 1152 |
+
{
|
| 1153 |
+
"type": "text",
|
| 1154 |
+
"text": "Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017. ",
|
| 1155 |
+
"bbox": [
|
| 1156 |
+
174,
|
| 1157 |
+
498,
|
| 1158 |
+
826,
|
| 1159 |
+
541
|
| 1160 |
+
],
|
| 1161 |
+
"page_idx": 9
|
| 1162 |
+
},
|
| 1163 |
+
{
|
| 1164 |
+
"type": "text",
|
| 1165 |
+
"text": "Eric Nalisnick, Akihiro Matsukawa, Yee Whye Teh, Dilan Gorur, and Balaji Lakshminarayanan. Do deep generative models know what they don’t know? In International Conference on Learning Representations, 2019a. URL https://openreview.net/forum?id $\\underline { { \\underline { { \\mathbf { \\Pi } } } } } =$ H1xwNhCcYm. ",
|
| 1166 |
+
"bbox": [
|
| 1167 |
+
176,
|
| 1168 |
+
551,
|
| 1169 |
+
823,
|
| 1170 |
+
594
|
| 1171 |
+
],
|
| 1172 |
+
"page_idx": 9
|
| 1173 |
+
},
|
| 1174 |
+
{
|
| 1175 |
+
"type": "text",
|
| 1176 |
+
"text": "Eric T. Nalisnick, Akihiro Matsukawa, Yee Whye Teh, Dilan Görür, and Balaji Lakshminarayanan. Hybrid models with deep and invertible features. In International Conference on Machine Learning (ICML), 2019b. ",
|
| 1177 |
+
"bbox": [
|
| 1178 |
+
174,
|
| 1179 |
+
604,
|
| 1180 |
+
825,
|
| 1181 |
+
647
|
| 1182 |
+
],
|
| 1183 |
+
"page_idx": 9
|
| 1184 |
+
},
|
| 1185 |
+
{
|
| 1186 |
+
"type": "text",
|
| 1187 |
+
"text": "George Papamakarios, Theo Pavlakou, and Iain Murray. Masked autoregressive flow for density estimation. In Advances in Neural Information Processing Systems, pp. 2338–2347, 2017. ",
|
| 1188 |
+
"bbox": [
|
| 1189 |
+
173,
|
| 1190 |
+
657,
|
| 1191 |
+
821,
|
| 1192 |
+
688
|
| 1193 |
+
],
|
| 1194 |
+
"page_idx": 9
|
| 1195 |
+
},
|
| 1196 |
+
{
|
| 1197 |
+
"type": "text",
|
| 1198 |
+
"text": "Danilo Rezende and Shakir Mohamed. Variational inference with normalizing flows. In International Conference on Machine Learning (ICML), 2015. ",
|
| 1199 |
+
"bbox": [
|
| 1200 |
+
174,
|
| 1201 |
+
696,
|
| 1202 |
+
823,
|
| 1203 |
+
727
|
| 1204 |
+
],
|
| 1205 |
+
"page_idx": 9
|
| 1206 |
+
},
|
| 1207 |
+
{
|
| 1208 |
+
"type": "text",
|
| 1209 |
+
"text": "Amir Rosenfeld, Richard S. Zemel, and John K. Tsotsos. The elephant in the room. CoRR, 2018. URL http://arxiv.org/abs/1808.03305. ",
|
| 1210 |
+
"bbox": [
|
| 1211 |
+
174,
|
| 1212 |
+
736,
|
| 1213 |
+
825,
|
| 1214 |
+
765
|
| 1215 |
+
],
|
| 1216 |
+
"page_idx": 9
|
| 1217 |
+
},
|
| 1218 |
+
{
|
| 1219 |
+
"type": "text",
|
| 1220 |
+
"text": "Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In Advances in neural information processing systems, pp. 2234–2242, 2016. ",
|
| 1221 |
+
"bbox": [
|
| 1222 |
+
174,
|
| 1223 |
+
775,
|
| 1224 |
+
826,
|
| 1225 |
+
818
|
| 1226 |
+
],
|
| 1227 |
+
"page_idx": 9
|
| 1228 |
+
},
|
| 1229 |
+
{
|
| 1230 |
+
"type": "text",
|
| 1231 |
+
"text": "Tim Salimans, Andrej Karpathy, Xi Chen, and Diederik P. Kingma. Pixelcnn $^ { + + }$ : A pixelcnn implementation with discretized logistic mixture likelihood and other modifications. In ICLR, 2017a. ",
|
| 1232 |
+
"bbox": [
|
| 1233 |
+
173,
|
| 1234 |
+
828,
|
| 1235 |
+
825,
|
| 1236 |
+
871
|
| 1237 |
+
],
|
| 1238 |
+
"page_idx": 9
|
| 1239 |
+
},
|
| 1240 |
+
{
|
| 1241 |
+
"type": "text",
|
| 1242 |
+
"text": "Tim Salimans, Andrej Karpathy, Xi Chen, and Diederik P Kingma. Pixelcnn $^ { + + }$ : Improving the pixelcnn with discretized logistic mixture likelihood and other modifications. arXiv preprint arXiv:1701.05517, 2017b. ",
|
| 1243 |
+
"bbox": [
|
| 1244 |
+
176,
|
| 1245 |
+
881,
|
| 1246 |
+
825,
|
| 1247 |
+
924
|
| 1248 |
+
],
|
| 1249 |
+
"page_idx": 9
|
| 1250 |
+
},
|
| 1251 |
+
{
|
| 1252 |
+
"type": "text",
|
| 1253 |
+
"text": "L. Schott, J. Rauber, W. Brendel, and M. Bethge. Towards the first adversarially robust neural network model on mnist. 2019. URL https://arxiv.org/pdf/1805.09190.pdf. ",
|
| 1254 |
+
"bbox": [
|
| 1255 |
+
169,
|
| 1256 |
+
103,
|
| 1257 |
+
823,
|
| 1258 |
+
132
|
| 1259 |
+
],
|
| 1260 |
+
"page_idx": 10
|
| 1261 |
+
},
|
| 1262 |
+
{
|
| 1263 |
+
"type": "text",
|
| 1264 |
+
"text": "Yang Song, Taesup Kim, Sebastian Nowozin, Stefano Ermon, and Nate Kushman. Pixeldefend: Leveraging generative models to understand and defend against adversarial examples. In International Conference on Learning Representations (ICLR), 2018. ",
|
| 1265 |
+
"bbox": [
|
| 1266 |
+
176,
|
| 1267 |
+
141,
|
| 1268 |
+
823,
|
| 1269 |
+
184
|
| 1270 |
+
],
|
| 1271 |
+
"page_idx": 10
|
| 1272 |
+
},
|
| 1273 |
+
{
|
| 1274 |
+
"type": "text",
|
| 1275 |
+
"text": "Aaron van den Oord, Nal Kalchbrenner, Lasse Espeholt, Oriol Vinyals, Alex Graves, et al. Conditional image generation with pixelcnn decoders. In Advances in Neural Information Processing Systems, pp. 4790–4798, 2016. ",
|
| 1276 |
+
"bbox": [
|
| 1277 |
+
173,
|
| 1278 |
+
193,
|
| 1279 |
+
825,
|
| 1280 |
+
234
|
| 1281 |
+
],
|
| 1282 |
+
"page_idx": 10
|
| 1283 |
+
},
|
| 1284 |
+
{
|
| 1285 |
+
"type": "text",
|
| 1286 |
+
"text": "A TRAINING CONDITIONAL GENERATIVE MODELS ",
|
| 1287 |
+
"text_level": 1,
|
| 1288 |
+
"bbox": [
|
| 1289 |
+
174,
|
| 1290 |
+
102,
|
| 1291 |
+
614,
|
| 1292 |
+
118
|
| 1293 |
+
],
|
| 1294 |
+
"page_idx": 11
|
| 1295 |
+
},
|
| 1296 |
+
{
|
| 1297 |
+
"type": "text",
|
| 1298 |
+
"text": "A.1 LIKELIHOOD-BASED GENERATIVE MODELS AS GENERATIVE CLASSIFIERS ",
|
| 1299 |
+
"bbox": [
|
| 1300 |
+
176,
|
| 1301 |
+
136,
|
| 1302 |
+
732,
|
| 1303 |
+
150
|
| 1304 |
+
],
|
| 1305 |
+
"page_idx": 11
|
| 1306 |
+
},
|
| 1307 |
+
{
|
| 1308 |
+
"type": "text",
|
| 1309 |
+
"text": "We present a brief overview of flow-based deep generative models, conditional generative models, and their applications to adversarial example detection. ",
|
| 1310 |
+
"bbox": [
|
| 1311 |
+
174,
|
| 1312 |
+
162,
|
| 1313 |
+
825,
|
| 1314 |
+
190
|
| 1315 |
+
],
|
| 1316 |
+
"page_idx": 11
|
| 1317 |
+
},
|
| 1318 |
+
{
|
| 1319 |
+
"type": "text",
|
| 1320 |
+
"text": "Flow based generative models Rezende & Mohamed (2015); Dinh et al. (2015; 2017); Kingma & Dhariwal (2018) compute exact densities for complex distributions using the change of variable formula. They achieve strong empirical results Kingma & Dhariwal (2018) and the closed form likelihood makes them easier to analyze than the closely related VAE Kingma et al. (2014). The main idea behind flow-based generative models is to model the data distribution using a series of bijective mappings $z _ { N } = f ( x ) = f _ { N } \\circ f _ { N - 1 } . . . \\circ f _ { 1 } ( x )$ where $z _ { N }$ has a known simple distribution, e.g. Gaussian, and all $f _ { i }$ are parametric functions for which the determinant of the Jacobian can be computed efficiently. Using the change of variable formula we have $\\log ( p ( x ) ) = \\log ( p ( z _ { N } ) ) +$ $\\begin{array} { r } { \\sum _ { i = 1 } ^ { N } \\log ( | \\operatorname* { d e t } ( J _ { i } ( z _ { i } ) ) | ) } \\end{array}$ where $J _ { i }$ is the Jacobian of $f _ { i }$ and $z _ { i - 1 } = f _ { i - 1 } . . . \\circ f _ { 1 } ( x )$ . ",
|
| 1321 |
+
"bbox": [
|
| 1322 |
+
173,
|
| 1323 |
+
196,
|
| 1324 |
+
826,
|
| 1325 |
+
328
|
| 1326 |
+
],
|
| 1327 |
+
"page_idx": 11
|
| 1328 |
+
},
|
| 1329 |
+
{
|
| 1330 |
+
"type": "text",
|
| 1331 |
+
"text": "The standard way to parameterize such functions $f _ { i }$ is by splitting the input $z _ { i - 1 }$ into two $z _ { i - 1 } =$ $( z _ { i - 1 } ^ { 1 } , z _ { i - 1 } ^ { 2 } )$ and chose ",
|
| 1332 |
+
"bbox": [
|
| 1333 |
+
173,
|
| 1334 |
+
333,
|
| 1335 |
+
823,
|
| 1336 |
+
362
|
| 1337 |
+
],
|
| 1338 |
+
"page_idx": 11
|
| 1339 |
+
},
|
| 1340 |
+
{
|
| 1341 |
+
"type": "equation",
|
| 1342 |
+
"img_path": "images/422de1c62e5d15029b011c2e2e79489eb54b9c6846ce0b0adbe17334a05f5daf.jpg",
|
| 1343 |
+
"text": "$$\nf _ { i } \\left( \\left[ \\begin{array} { l } { z _ { i - 1 } ^ { 1 } } \\\\ { z _ { i - 1 } ^ { 2 } } \\end{array} \\right] \\right) = \\left[ s ( z _ { i - 1 } ^ { 1 } ) \\odot z _ { i - 1 } ^ { 2 } + t ( z _ { i - 1 } ^ { 1 } ) \\right]\n$$",
|
| 1344 |
+
"text_format": "latex",
|
| 1345 |
+
"bbox": [
|
| 1346 |
+
349,
|
| 1347 |
+
372,
|
| 1348 |
+
648,
|
| 1349 |
+
409
|
| 1350 |
+
],
|
| 1351 |
+
"page_idx": 11
|
| 1352 |
+
},
|
| 1353 |
+
{
|
| 1354 |
+
"type": "text",
|
| 1355 |
+
"text": "which is invertible as long as $s ( z _ { i - 1 } ^ { 1 } ) _ { j } = s _ { j } \\neq 0$ and we have $\\begin{array} { r } { \\log ( | \\operatorname* { d e t } ( J _ { i } ( z _ { i - 1 } ) ) | ) = \\sum _ { j } \\log ( | s _ { j } | ) } \\end{array}$ . For images the splitting is normally done in the channel dimension. These models are then trained by maximizing the empirical log likelihood (MLE). ",
|
| 1356 |
+
"bbox": [
|
| 1357 |
+
174,
|
| 1358 |
+
417,
|
| 1359 |
+
825,
|
| 1360 |
+
463
|
| 1361 |
+
],
|
| 1362 |
+
"page_idx": 11
|
| 1363 |
+
},
|
| 1364 |
+
{
|
| 1365 |
+
"type": "text",
|
| 1366 |
+
"text": "A straightforward way to turn this generative model into a conditional generative model is to make $p ( z _ { N } )$ a Gaussian mixture model (GMM) with one Gaussian per class, i.e. $p ( z _ { N } | y ) = N ( \\mu _ { y } , \\Sigma _ { y } )$ . Assuming $p ( y )$ is known, then maximizing $\\log ( p ( x , y ) )$ is equivalent to maximizing $\\log ( p ( x | y ) ) { \\dot { = } }$ $\\begin{array} { r } { \\log ( p ( z _ { N } | y ) ) + \\sum _ { i = 1 } ^ { N } \\log ( | \\operatorname* { d e t } ( J _ { i } ( z _ { i } ) ) | ) } \\end{array}$ . At inference time, one can classify by simply using Bayes rule. Note that directly optimizing $\\log ( p ( x | y ) )$ results in poor classification accuracy as discussed in section 3. This issue was also addressed in the recent hybrid model work Nalisnick et al. (2019a). ",
|
| 1367 |
+
"bbox": [
|
| 1368 |
+
173,
|
| 1369 |
+
468,
|
| 1370 |
+
825,
|
| 1371 |
+
556
|
| 1372 |
+
],
|
| 1373 |
+
"page_idx": 11
|
| 1374 |
+
},
|
| 1375 |
+
{
|
| 1376 |
+
"type": "text",
|
| 1377 |
+
"text": "We will now describe some of the various approaches we investigated in order to train the best possible flow-based conditional generative models, to achieve a better trade-off betwen classification accuracy and data-likelihood as compared to commonly-used approaches. We also discuss some failed approaches in the appendix. ",
|
| 1378 |
+
"bbox": [
|
| 1379 |
+
174,
|
| 1380 |
+
563,
|
| 1381 |
+
825,
|
| 1382 |
+
618
|
| 1383 |
+
],
|
| 1384 |
+
"page_idx": 11
|
| 1385 |
+
},
|
| 1386 |
+
{
|
| 1387 |
+
"type": "text",
|
| 1388 |
+
"text": "A.2 REWEIGHTING",
|
| 1389 |
+
"text_level": 1,
|
| 1390 |
+
"bbox": [
|
| 1391 |
+
176,
|
| 1392 |
+
638,
|
| 1393 |
+
321,
|
| 1394 |
+
654
|
| 1395 |
+
],
|
| 1396 |
+
"page_idx": 11
|
| 1397 |
+
},
|
| 1398 |
+
{
|
| 1399 |
+
"type": "text",
|
| 1400 |
+
"text": "The most basic approach, which has been used before in various works, is to reweight the discriminative part in eq. (4). While this can produce good accuracy, it can have an unfavorable trade-off with the NLL where good accuracy comes with severely sub-optimal NLL. This tradeoff has also been shown in Nalisnick et al. (2019a) where they train a somewhat similar model but classify with a generalized linear model instead of a Gaussian mixture model. ",
|
| 1401 |
+
"bbox": [
|
| 1402 |
+
174,
|
| 1403 |
+
666,
|
| 1404 |
+
825,
|
| 1405 |
+
736
|
| 1406 |
+
],
|
| 1407 |
+
"page_idx": 11
|
| 1408 |
+
},
|
| 1409 |
+
{
|
| 1410 |
+
"type": "text",
|
| 1411 |
+
"text": "A.3 ARCHITECTURE CHANGE ",
|
| 1412 |
+
"text_level": 1,
|
| 1413 |
+
"bbox": [
|
| 1414 |
+
176,
|
| 1415 |
+
757,
|
| 1416 |
+
393,
|
| 1417 |
+
771
|
| 1418 |
+
],
|
| 1419 |
+
"page_idx": 11
|
| 1420 |
+
},
|
| 1421 |
+
{
|
| 1422 |
+
"type": "text",
|
| 1423 |
+
"text": "Padding channels has been shown to increase accuracy in invertible networks Jacobsen et al. (2018); Behrmann et al. (2019). This helps ameliorate a basic limitation in bijective mappings (see Eq. (5)), by allowing to increase the number of channels as a pre-processing step. Unlike the discriminative i-RevNet, we cannot just pad zeros as that would not be a continuous density. Instead we pad channels with uniform(0,1) random noise. In effect we do not model MNIST and CIFAR10 as is typically done in the literature, but rather the zero-padded version of those. While the ground-truth likelihoods for the padded and un-padded datapoints are the same due to independence of the uniform noise and unit density of the noise, this is not guaranteed to be captured by the model, making likelihoods very similar but not exactly comparable with the literature. This is not an issue for us, as we only compare models on the padded datasets. ",
|
| 1424 |
+
"bbox": [
|
| 1425 |
+
174,
|
| 1426 |
+
784,
|
| 1427 |
+
825,
|
| 1428 |
+
924
|
| 1429 |
+
],
|
| 1430 |
+
"page_idx": 11
|
| 1431 |
+
},
|
| 1432 |
+
{
|
| 1433 |
+
"type": "text",
|
| 1434 |
+
"text": "A.4 SPLIT PRIOR ",
|
| 1435 |
+
"text_level": 1,
|
| 1436 |
+
"bbox": [
|
| 1437 |
+
176,
|
| 1438 |
+
103,
|
| 1439 |
+
305,
|
| 1440 |
+
117
|
| 1441 |
+
],
|
| 1442 |
+
"page_idx": 12
|
| 1443 |
+
},
|
| 1444 |
+
{
|
| 1445 |
+
"type": "text",
|
| 1446 |
+
"text": "One reason MLE is bad at capturing the label is because a small number of dimensions have a small effect on the NLL. Fortunately, we can use this property to our advantage. As the contribution of the conditional class information is negligible for the data log likelihood, we choose to model it in its distinct subspace, as proposed by Jacobsen et al. (2019). Thus, we partition the hidden dimensions $z = ( z _ { s } , z _ { n } )$ and only try to enforce the low-dimensional $z _ { s }$ to be the logits. This has two advantages: 1) we do not enforce class-conditional dimensions to be factorial; and 2) we can explicitly up-weight the loss on this subspace and treat it as standard logits of a discriminative model. A similar approach is also used by semi-supervised VAEs Kingma et al. (2014). This lets us jointly optimize the data log-likelihood alongside a classification objective without requiring most of the dimensions to be discriminative. Using the factorization $p ( z _ { s } , \\bar { z _ { n } } | y ) = p ( z _ { s } | y ) \\cdot p ( \\bar { z } _ { n } | z _ { s } , \\bar { y } )$ we model $p ( z _ { s } | y )$ as Gaussian with class conditional mean $e _ { i } = ( 0 , . . . , 0 , 1 , . . . 0 )$ and covariance matrix scaled by a constant. The distribution $p ( z _ { n } | z _ { s } , y )$ is modeled as a Gaussian where the mean and variances are a function of $y$ and $z _ { n }$ . ",
|
| 1447 |
+
"bbox": [
|
| 1448 |
+
173,
|
| 1449 |
+
130,
|
| 1450 |
+
825,
|
| 1451 |
+
310
|
| 1452 |
+
],
|
| 1453 |
+
"page_idx": 12
|
| 1454 |
+
},
|
| 1455 |
+
{
|
| 1456 |
+
"type": "text",
|
| 1457 |
+
"text": "B IMPLEMENTATION DETAILS ",
|
| 1458 |
+
"text_level": 1,
|
| 1459 |
+
"bbox": [
|
| 1460 |
+
176,
|
| 1461 |
+
330,
|
| 1462 |
+
436,
|
| 1463 |
+
345
|
| 1464 |
+
],
|
| 1465 |
+
"page_idx": 12
|
| 1466 |
+
},
|
| 1467 |
+
{
|
| 1468 |
+
"type": "text",
|
| 1469 |
+
"text": "We pad MNIST with zeros so both datasets are $3 2 \\mathrm { x } 3 2$ and subtract 0.5 from both datasets to have a [-0.5,0.5] range. For data augmentation we do pytorch’s random crop with a padding of 4 and ’edge’ padding mode, and random horizontal flip for CIFAR10 only. ",
|
| 1470 |
+
"bbox": [
|
| 1471 |
+
174,
|
| 1472 |
+
361,
|
| 1473 |
+
825,
|
| 1474 |
+
404
|
| 1475 |
+
],
|
| 1476 |
+
"page_idx": 12
|
| 1477 |
+
},
|
| 1478 |
+
{
|
| 1479 |
+
"type": "text",
|
| 1480 |
+
"text": "The model is based on GLOW with 4 levels, affine coupling layers, 1x1 convolution permutations and actnorm in a multi-scale architecture. We choose 128 channels and 12 blocks per level for MNIST and 256 channels and 16 blocks for CIFAR10. In both MNIST and CIFAR10 experiments we double the number of channels with uniforrm(0,1) noise which we scale down to the range $[ 0 , 2 / 2 5 6 ]$ (taking it into account in the Jacobian term). One major difference is that we do the squeeze operation at the end of each level instead of the beginning, which is what allows us to use 4 levels. This is possible because with the added channels the number of channels is even and the standard splitting is possible before the squeeze operation. ",
|
| 1481 |
+
"bbox": [
|
| 1482 |
+
174,
|
| 1483 |
+
422,
|
| 1484 |
+
825,
|
| 1485 |
+
535
|
| 1486 |
+
],
|
| 1487 |
+
"page_idx": 12
|
| 1488 |
+
},
|
| 1489 |
+
{
|
| 1490 |
+
"type": "text",
|
| 1491 |
+
"text": "The models are optimized using Adam, for 150 epochs. The initial learning rate is $1 e - 3$ , decayed by a factor of 10 every 60 epochs. For the reweighted optimization the objective is ",
|
| 1492 |
+
"bbox": [
|
| 1493 |
+
169,
|
| 1494 |
+
556,
|
| 1495 |
+
823,
|
| 1496 |
+
584
|
| 1497 |
+
],
|
| 1498 |
+
"page_idx": 12
|
| 1499 |
+
},
|
| 1500 |
+
{
|
| 1501 |
+
"type": "equation",
|
| 1502 |
+
"img_path": "images/bb58f6fa4de7fe6405e223bc1348e9d43faaf3a7b409c15a7b4474ca4e152a2c.jpg",
|
| 1503 |
+
"text": "$$\nl o s s = - \\log ( p ( x | y ) ) / D - \\log ( p ( y | x ) )\n$$",
|
| 1504 |
+
"text_format": "latex",
|
| 1505 |
+
"bbox": [
|
| 1506 |
+
366,
|
| 1507 |
+
589,
|
| 1508 |
+
632,
|
| 1509 |
+
607
|
| 1510 |
+
],
|
| 1511 |
+
"page_idx": 12
|
| 1512 |
+
},
|
| 1513 |
+
{
|
| 1514 |
+
"type": "text",
|
| 1515 |
+
"text": "where $\\mathbf { D }$ is the data dimension $3 \\mathbf { x } 3 2 \\mathbf { x } 3 2$ for CIFAR, $1 \\mathrm { x } 3 2 \\mathrm { x } 3 2$ for MNIST). ",
|
| 1516 |
+
"bbox": [
|
| 1517 |
+
174,
|
| 1518 |
+
611,
|
| 1519 |
+
666,
|
| 1520 |
+
626
|
| 1521 |
+
],
|
| 1522 |
+
"page_idx": 12
|
| 1523 |
+
},
|
| 1524 |
+
{
|
| 1525 |
+
"type": "text",
|
| 1526 |
+
"text": "For adversarial detection we use a threshold of 1.4 for MNIST ( $100 \\%$ of test data are below the threshold) and 4. for CIFAR10 $7 8 . 6 \\%$ of test images are below the threshold). ",
|
| 1527 |
+
"bbox": [
|
| 1528 |
+
174,
|
| 1529 |
+
632,
|
| 1530 |
+
820,
|
| 1531 |
+
661
|
| 1532 |
+
],
|
| 1533 |
+
"page_idx": 12
|
| 1534 |
+
},
|
| 1535 |
+
{
|
| 1536 |
+
"type": "text",
|
| 1537 |
+
"text": "C NEGATIVE RESULTS ",
|
| 1538 |
+
"text_level": 1,
|
| 1539 |
+
"bbox": [
|
| 1540 |
+
174,
|
| 1541 |
+
681,
|
| 1542 |
+
375,
|
| 1543 |
+
696
|
| 1544 |
+
],
|
| 1545 |
+
"page_idx": 12
|
| 1546 |
+
},
|
| 1547 |
+
{
|
| 1548 |
+
"type": "text",
|
| 1549 |
+
"text": "In this work explored many ideas in order to achieve better tradeoff between accuracy with little or no impact. ",
|
| 1550 |
+
"bbox": [
|
| 1551 |
+
174,
|
| 1552 |
+
712,
|
| 1553 |
+
823,
|
| 1554 |
+
741
|
| 1555 |
+
],
|
| 1556 |
+
"page_idx": 12
|
| 1557 |
+
},
|
| 1558 |
+
{
|
| 1559 |
+
"type": "text",
|
| 1560 |
+
"text": "C.1 ROBUST PRIORS ",
|
| 1561 |
+
"text_level": 1,
|
| 1562 |
+
"bbox": [
|
| 1563 |
+
174,
|
| 1564 |
+
757,
|
| 1565 |
+
330,
|
| 1566 |
+
771
|
| 1567 |
+
],
|
| 1568 |
+
"page_idx": 12
|
| 1569 |
+
},
|
| 1570 |
+
{
|
| 1571 |
+
"type": "text",
|
| 1572 |
+
"text": "Since the Gaussian prior is very sensitive to outliers, one idea was that confident miss-classifications carry a strong penalty which might result in “messing\" all the classes together. A solution would be to replace the Gaussian with a more robust prior, e.g. Laplace or Cauchy. Another idea we explored is a mixture of Gaussian and Laplace or Cauchy using the same location parameter. In our experiments we did not see any significant difference from the Gaussian prior. ",
|
| 1573 |
+
"bbox": [
|
| 1574 |
+
174,
|
| 1575 |
+
782,
|
| 1576 |
+
825,
|
| 1577 |
+
853
|
| 1578 |
+
],
|
| 1579 |
+
"page_idx": 12
|
| 1580 |
+
},
|
| 1581 |
+
{
|
| 1582 |
+
"type": "text",
|
| 1583 |
+
"text": "C.2 LABEL SMOOTHING ",
|
| 1584 |
+
"text_level": 1,
|
| 1585 |
+
"bbox": [
|
| 1586 |
+
176,
|
| 1587 |
+
869,
|
| 1588 |
+
356,
|
| 1589 |
+
883
|
| 1590 |
+
],
|
| 1591 |
+
"page_idx": 12
|
| 1592 |
+
},
|
| 1593 |
+
{
|
| 1594 |
+
"type": "text",
|
| 1595 |
+
"text": "Another approach to try to address the same issue is a version of label smoothing. In this new model the Gaussian clusters are a latent variable that is equal to the real label with probability $1 - \\epsilon$ ",
|
| 1596 |
+
"bbox": [
|
| 1597 |
+
174,
|
| 1598 |
+
895,
|
| 1599 |
+
823,
|
| 1600 |
+
924
|
| 1601 |
+
],
|
| 1602 |
+
"page_idx": 12
|
| 1603 |
+
},
|
| 1604 |
+
{
|
| 1605 |
+
"type": "text",
|
| 1606 |
+
"text": "and uniform on the other labels with probability $\\epsilon .$ . Using this will bound the error for confident miss-classification as long as the data is close to one of the Gaussian centers. ",
|
| 1607 |
+
"bbox": [
|
| 1608 |
+
173,
|
| 1609 |
+
103,
|
| 1610 |
+
825,
|
| 1611 |
+
132
|
| 1612 |
+
],
|
| 1613 |
+
"page_idx": 13
|
| 1614 |
+
},
|
| 1615 |
+
{
|
| 1616 |
+
"type": "text",
|
| 1617 |
+
"text": "C.3 FLOW-GAN ",
|
| 1618 |
+
"text_level": 1,
|
| 1619 |
+
"bbox": [
|
| 1620 |
+
174,
|
| 1621 |
+
147,
|
| 1622 |
+
302,
|
| 1623 |
+
162
|
| 1624 |
+
],
|
| 1625 |
+
"page_idx": 13
|
| 1626 |
+
},
|
| 1627 |
+
{
|
| 1628 |
+
"type": "text",
|
| 1629 |
+
"text": "As we claimed the main issue is with the MLE objective, it seems like a better objective is to optimize $K L ( p ( x , y ) | | p _ { \\theta } ( x , y ) )$ or the Jensen-Shannon divergence as this KL term is highly penalized for miss-classification. It is also more natural when considering robustness against adversarial attacks. Optimizing this directly is hard, but generative adversarial networks (GANs) Goodfellow et al. (2014) in theory should also optimize this objective. Simply training a GAN would not work as we are interested in the likelihood value for adversarial detection and GANs only let you sample and does not give you any information regarding an input image. ",
|
| 1630 |
+
"bbox": [
|
| 1631 |
+
174,
|
| 1632 |
+
172,
|
| 1633 |
+
825,
|
| 1634 |
+
272
|
| 1635 |
+
],
|
| 1636 |
+
"page_idx": 13
|
| 1637 |
+
},
|
| 1638 |
+
{
|
| 1639 |
+
"type": "text",
|
| 1640 |
+
"text": "Since flow algorithms are bijective, we could combine the two objective as was done in the flow-GAN paper Grover et al. (2018). We trained this approach with various conditional-GAN alternatives and found it very hard to train. GANs are know to be unstable to train, and combining them with the unstable flow generator is problematic. ",
|
| 1641 |
+
"bbox": [
|
| 1642 |
+
174,
|
| 1643 |
+
291,
|
| 1644 |
+
825,
|
| 1645 |
+
348
|
| 1646 |
+
],
|
| 1647 |
+
"page_idx": 13
|
| 1648 |
+
},
|
| 1649 |
+
{
|
| 1650 |
+
"type": "text",
|
| 1651 |
+
"text": "D ANALYTICAL COUNTER EXAMPLE: ",
|
| 1652 |
+
"text_level": 1,
|
| 1653 |
+
"bbox": [
|
| 1654 |
+
176,
|
| 1655 |
+
367,
|
| 1656 |
+
496,
|
| 1657 |
+
383
|
| 1658 |
+
],
|
| 1659 |
+
"page_idx": 13
|
| 1660 |
+
},
|
| 1661 |
+
{
|
| 1662 |
+
"type": "equation",
|
| 1663 |
+
"img_path": "images/0f963d936bc378218b04a04da37aa5a90c80fe7d0bdc1ac007ca3629c21f67e5.jpg",
|
| 1664 |
+
"text": "$$\n\\begin{array} { c } { { p ( y = 1 ) = p ( y = 0 ) = q ( y = 1 ) = q ( y = 0 ) = 1 / 2 \\mathrm { ~ a n d ~ } } } \\\\ { { p ( x | 0 ) = \\lambda _ { 1 } U ( 0 , 1 ) + ( 1 - \\lambda _ { 1 } ) U ( 1 , 1 + \\Delta ) } } \\\\ { { p ( x | 1 ) = \\lambda _ { 2 } U ( 0 , 1 ) + ( 1 - \\lambda _ { 2 } ) U ( 2 , 3 ) } } \\\\ { { q ( x | 0 ) = U ( 0 , 1 + \\Delta ) } } \\\\ { { q ( x | 1 ) = \\lambda _ { 2 } U ( 0 , 1 ) + ( 1 - \\lambda _ { 2 } ) U ( 2 , 3 ) } } \\end{array}\n$$",
|
| 1665 |
+
"text_format": "latex",
|
| 1666 |
+
"bbox": [
|
| 1667 |
+
176,
|
| 1668 |
+
396,
|
| 1669 |
+
647,
|
| 1670 |
+
486
|
| 1671 |
+
],
|
| 1672 |
+
"page_idx": 13
|
| 1673 |
+
},
|
| 1674 |
+
{
|
| 1675 |
+
"type": "text",
|
| 1676 |
+
"text": "where $U ( a , b )$ is the uniform distribution on the annulus $R ^ { d } ( a , b ) = \\{ x \\in \\mathbb { R } ^ { d } : a \\leq | | x | | \\leq b \\}$ in dimension $d$ . ",
|
| 1677 |
+
"bbox": [
|
| 1678 |
+
174,
|
| 1679 |
+
494,
|
| 1680 |
+
823,
|
| 1681 |
+
523
|
| 1682 |
+
],
|
| 1683 |
+
"page_idx": 13
|
| 1684 |
+
},
|
| 1685 |
+
{
|
| 1686 |
+
"type": "text",
|
| 1687 |
+
"text": "Lemma 1. For $| | x | | < 1$ we have ",
|
| 1688 |
+
"bbox": [
|
| 1689 |
+
173,
|
| 1690 |
+
525,
|
| 1691 |
+
397,
|
| 1692 |
+
541
|
| 1693 |
+
],
|
| 1694 |
+
"page_idx": 13
|
| 1695 |
+
},
|
| 1696 |
+
{
|
| 1697 |
+
"type": "equation",
|
| 1698 |
+
"img_path": "images/77a50fe5ad15ffd755ae3be8245390f1b663bdd9575d6a4e8ed62cf9c2e37606.jpg",
|
| 1699 |
+
"text": "$$\n\\begin{array} { l } { \\displaystyle p ( 0 | x ) = \\frac { \\lambda _ { 1 } } { \\lambda _ { 1 } + \\lambda _ { 2 } } } \\\\ { \\displaystyle q ( 0 | x ) = \\frac { 1 } { 1 + \\lambda _ { 2 } ( 1 + \\Delta ) ^ { d } } } \\end{array}\n$$",
|
| 1700 |
+
"text_format": "latex",
|
| 1701 |
+
"bbox": [
|
| 1702 |
+
408,
|
| 1703 |
+
542,
|
| 1704 |
+
588,
|
| 1705 |
+
609
|
| 1706 |
+
],
|
| 1707 |
+
"page_idx": 13
|
| 1708 |
+
},
|
| 1709 |
+
{
|
| 1710 |
+
"type": "text",
|
| 1711 |
+
"text": "Proof. The $U ( a , b )$ density (when it isn’t zero) is $\\frac { 1 } { C _ { d } \\big ( b ^ { d } - a ^ { d } \\big ) }$ where $c _ { d }$ is the volume of the $d .$ dimensional unit ball. The proof follows by a simple use of Bayes rule. □ ",
|
| 1712 |
+
"bbox": [
|
| 1713 |
+
173,
|
| 1714 |
+
622,
|
| 1715 |
+
826,
|
| 1716 |
+
655
|
| 1717 |
+
],
|
| 1718 |
+
"page_idx": 13
|
| 1719 |
+
},
|
| 1720 |
+
{
|
| 1721 |
+
"type": "text",
|
| 1722 |
+
"text": "so by having $\\lambda _ { 1 } > > \\lambda _ { 2 } > > \\frac { 1 } { ( 1 + \\Delta ) ^ { d } }$ 1(1+∆)d we can have the model switch wrongfully predictions from $y = 0$ to $y = 1$ when we move $x$ from the annulus $R ^ { d } ( 1 , 1 + \\Delta )$ to $R ^ { d } ( 0 , 1 )$ Lemma 2. I $\\begin{array} { r } { \\hat { \\bf \\Phi } \\lambda _ { 1 } > \\frac { 1 } { ( 1 + \\Delta ) ^ { d } } } \\end{array}$ and $\\lambda _ { 1 } < 1 - e ^ { - \\epsilon }$ then $K L ( q ( x , y ) | | P ( x , y ) ) \\leq \\epsilon$ ",
|
| 1723 |
+
"bbox": [
|
| 1724 |
+
173,
|
| 1725 |
+
667,
|
| 1726 |
+
826,
|
| 1727 |
+
722
|
| 1728 |
+
],
|
| 1729 |
+
"page_idx": 13
|
| 1730 |
+
},
|
| 1731 |
+
{
|
| 1732 |
+
"type": "text",
|
| 1733 |
+
"text": "Proof. Using the chain rule for KL divergence, $\\mathrm { K L } ( P ( x , y ) | | Q ( x , y ) ) = \\mathrm { K L } ( P ( y ) | | Q ( y ) ) +$ $\\mathbb { E } _ { y } [ \\dot { \\mathrm { K L } } ( P ( x \\bar { | } y ) | | Q ( x | y ) ) ]$ we get that $\\mathrm { K L } ( q ( x , y ) | | P ( x , y ) ) = \\mathrm { K L } ( q ( x | y = 0 ) | | P ( x | y = 0 ) )$ . We now have ",
|
| 1734 |
+
"bbox": [
|
| 1735 |
+
174,
|
| 1736 |
+
737,
|
| 1737 |
+
826,
|
| 1738 |
+
780
|
| 1739 |
+
],
|
| 1740 |
+
"page_idx": 13
|
| 1741 |
+
},
|
| 1742 |
+
{
|
| 1743 |
+
"type": "equation",
|
| 1744 |
+
"img_path": "images/c75a86f36a1db6500f5f6dc30af7978968a26b511699de0936f12eb33dda3564.jpg",
|
| 1745 |
+
"text": "$$\n\\begin{array} { r l } & { \\mathrm { K L } ( q ( x | y = 0 ) | | P ( x | y = 0 ) ) = \\displaystyle \\int _ { R ^ { d } ( 0 , 1 ) } \\frac { 1 } { C _ { d } ( 1 + \\Delta ) ^ { d } } \\log \\left( \\frac { \\frac { 1 } { C _ { d } ( 1 + \\Delta ) ^ { d } } } { \\frac { \\lambda _ { 1 } } { C _ { d } } } \\right) } \\\\ & { \\mathrm { ~ \\ } + \\displaystyle \\int _ { R ^ { d } ( 1 , 1 + \\Delta ) } \\frac { 1 } { C _ { d } ( 1 + \\Delta ) ^ { d } } \\log \\left( \\frac { \\frac { 1 } { C _ { d } ( 1 + \\Delta ) ^ { d } } } { \\frac { 1 - \\lambda _ { 1 } } { C _ { d } ( 1 + \\Delta ) ^ { d } - 1 ) } } \\right) = \\frac { - \\log ( \\lambda _ { 1 } ( 1 + \\Delta ) ^ { d } ) } { ( 1 + \\Delta ) ^ { d } } } \\\\ & { \\mathrm { ~ \\ } + \\frac { ( 1 + \\Delta ) ^ { d } - 1 } { ( 1 + \\Delta ) ^ { d } } \\log \\left( \\frac { ( 1 + \\Delta ) ^ { d } - 1 } { ( 1 - \\lambda _ { 1 } ) ( 1 + \\Delta ) ^ { d } } \\right) \\leq \\log \\left( \\frac { 1 } { 1 - \\lambda _ { 1 } } \\right) < \\epsilon } \\end{array}\n$$",
|
| 1746 |
+
"text_format": "latex",
|
| 1747 |
+
"bbox": [
|
| 1748 |
+
254,
|
| 1749 |
+
799,
|
| 1750 |
+
741,
|
| 1751 |
+
926
|
| 1752 |
+
],
|
| 1753 |
+
"page_idx": 13
|
| 1754 |
+
},
|
| 1755 |
+
{
|
| 1756 |
+
"type": "text",
|
| 1757 |
+
"text": "Lemma 3. If $\\begin{array} { r } { 1 > \\lambda _ { 1 } > \\frac { 1 } { ( 1 + \\Delta ) ^ { d } } } \\end{array}$ and $\\begin{array} { r } { \\lambda _ { 1 } < \\frac { \\epsilon } { d \\log ( 1 + \\Delta ) } } \\end{array}$ then $K L ( P ( x , y ) | | q ( x , y ) ) \\leq \\epsilon$ ",
|
| 1758 |
+
"bbox": [
|
| 1759 |
+
173,
|
| 1760 |
+
126,
|
| 1761 |
+
728,
|
| 1762 |
+
147
|
| 1763 |
+
],
|
| 1764 |
+
"page_idx": 14
|
| 1765 |
+
},
|
| 1766 |
+
{
|
| 1767 |
+
"type": "text",
|
| 1768 |
+
"text": "Proof. Again using the KL chain rule we have ",
|
| 1769 |
+
"bbox": [
|
| 1770 |
+
173,
|
| 1771 |
+
161,
|
| 1772 |
+
480,
|
| 1773 |
+
178
|
| 1774 |
+
],
|
| 1775 |
+
"page_idx": 14
|
| 1776 |
+
},
|
| 1777 |
+
{
|
| 1778 |
+
"type": "equation",
|
| 1779 |
+
"img_path": "images/edafd5bdef344ccdcc51a8bf69fe95e139ff696e6deb02681b24f42dc712bc99.jpg",
|
| 1780 |
+
"text": "$$\n\\begin{array} { l } { \\displaystyle \\mathrm { K L } ( P ( x | y = 0 ) | | q ( x | y = 0 ) ) = \\lambda _ { 1 } \\int _ { R ^ { d } ( 0 , 1 ) } \\frac { 1 } { C _ { d } } \\log \\left( \\frac { \\frac { \\lambda _ { 1 } } { C _ { d } } } { \\frac { 1 } { C _ { d } ( 1 + \\Delta ) ^ { d } } } \\right) } \\\\ { \\displaystyle \\int _ { R ^ { d } ( 1 , 1 + \\Delta ) } \\frac { ( 1 - \\lambda _ { 1 } ) } { C _ { d } ( ( 1 + \\Delta ) ^ { d } - 1 ) } \\log \\left( \\frac { \\frac { ( 1 - \\lambda _ { 1 } ) } { C _ { d } ( ( 1 + \\Delta ) ^ { d } - 1 ) } } { \\frac { 1 } { C _ { d } ( 1 + \\Delta ) ^ { d } } } \\right) \\le \\lambda _ { 1 } d \\log ( 1 + \\Delta ) < \\epsilon } \\end{array}\n$$",
|
| 1781 |
+
"text_format": "latex",
|
| 1782 |
+
"bbox": [
|
| 1783 |
+
240,
|
| 1784 |
+
202,
|
| 1785 |
+
758,
|
| 1786 |
+
296
|
| 1787 |
+
],
|
| 1788 |
+
"page_idx": 14
|
| 1789 |
+
},
|
| 1790 |
+
{
|
| 1791 |
+
"type": "text",
|
| 1792 |
+
"text": "Proposition 1. For all $( \\epsilon , \\delta , \\Delta )$ there is a distribution $p$ and an approximation $q$ in dimension $\\begin{array} { r } { d = \\tilde { \\mathcal { O } } \\left( \\frac { \\log \\left( \\frac { \\delta } { 1 + \\delta } \\right) + \\log \\left( \\frac { 1 } { \\epsilon } \\right) } { \\log \\left( 1 + \\Delta \\right) } \\right) } \\end{array}$ such that ",
|
| 1793 |
+
"bbox": [
|
| 1794 |
+
173,
|
| 1795 |
+
324,
|
| 1796 |
+
825,
|
| 1797 |
+
371
|
| 1798 |
+
],
|
| 1799 |
+
"page_idx": 14
|
| 1800 |
+
},
|
| 1801 |
+
{
|
| 1802 |
+
"type": "equation",
|
| 1803 |
+
"img_path": "images/72c5e2dd4826bc18ac6dd8fcfe4dcbffe5a7fa36c86d5e59d0ff32eeb37d542a.jpg",
|
| 1804 |
+
"text": "$$\nK L ( q ( x , y ) | | p ( x , y ) ) < \\epsilon , ~ K L ( p ( x , y ) | | q ( x , y ) ) < \\epsilon\n$$",
|
| 1805 |
+
"text_format": "latex",
|
| 1806 |
+
"bbox": [
|
| 1807 |
+
321,
|
| 1808 |
+
378,
|
| 1809 |
+
674,
|
| 1810 |
+
396
|
| 1811 |
+
],
|
| 1812 |
+
"page_idx": 14
|
| 1813 |
+
},
|
| 1814 |
+
{
|
| 1815 |
+
"type": "text",
|
| 1816 |
+
"text": "but with probability greater then $1 / 3$ over samples $x \\sim p$ there is an adversarial example $\\bar { x }$ satisfying ",
|
| 1817 |
+
"bbox": [
|
| 1818 |
+
181,
|
| 1819 |
+
401,
|
| 1820 |
+
813,
|
| 1821 |
+
417
|
| 1822 |
+
],
|
| 1823 |
+
"page_idx": 14
|
| 1824 |
+
},
|
| 1825 |
+
{
|
| 1826 |
+
"type": "text",
|
| 1827 |
+
"text": "1. $y _ { q } ( x ) = y _ { p } ( x )$ with $p ( y _ { p } ( x ) | x )$ and $q ( y _ { q } ( x ) | x )$ greater or equal to $1 - \\delta$ . The original point is classifier correctly and confidently. ",
|
| 1828 |
+
"bbox": [
|
| 1829 |
+
207,
|
| 1830 |
+
428,
|
| 1831 |
+
823,
|
| 1832 |
+
458
|
| 1833 |
+
],
|
| 1834 |
+
"page_idx": 14
|
| 1835 |
+
},
|
| 1836 |
+
{
|
| 1837 |
+
"type": "text",
|
| 1838 |
+
"text": "2. $y _ { q } ( x ) \\neq y ( \\bar { x } )$ , $y _ { q } ( \\bar { x } ) = y ( \\bar { x } )$ . We change the prediction without changing the ground-truth label. ",
|
| 1839 |
+
"bbox": [
|
| 1840 |
+
205,
|
| 1841 |
+
465,
|
| 1842 |
+
825,
|
| 1843 |
+
496
|
| 1844 |
+
],
|
| 1845 |
+
"page_idx": 14
|
| 1846 |
+
},
|
| 1847 |
+
{
|
| 1848 |
+
"type": "text",
|
| 1849 |
+
"text": "3. $q ( y _ { q } ( \\bar { x } ) | \\bar { x } ) < \\delta$ , $p ( y _ { p } ( \\bar { x } ) | \\bar { x } ) > 1 - \\delta$ . The classifier is confident in its wrong prediction. ",
|
| 1850 |
+
"bbox": [
|
| 1851 |
+
205,
|
| 1852 |
+
503,
|
| 1853 |
+
803,
|
| 1854 |
+
521
|
| 1855 |
+
],
|
| 1856 |
+
"page_idx": 14
|
| 1857 |
+
},
|
| 1858 |
+
{
|
| 1859 |
+
"type": "text",
|
| 1860 |
+
"text": "4. $| | x - \\bar { x } | | < \\Delta$ . We make a small change to the inputs. ",
|
| 1861 |
+
"bbox": [
|
| 1862 |
+
212,
|
| 1863 |
+
529,
|
| 1864 |
+
586,
|
| 1865 |
+
545
|
| 1866 |
+
],
|
| 1867 |
+
"page_idx": 14
|
| 1868 |
+
},
|
| 1869 |
+
{
|
| 1870 |
+
"type": "text",
|
| 1871 |
+
"text": "5. The density $q ( { \\bar { x } } )$ is greater or equal to the median density, making the attack undetectable by observing $q ( x )$ . ",
|
| 1872 |
+
"bbox": [
|
| 1873 |
+
204,
|
| 1874 |
+
553,
|
| 1875 |
+
823,
|
| 1876 |
+
583
|
| 1877 |
+
],
|
| 1878 |
+
"page_idx": 14
|
| 1879 |
+
},
|
| 1880 |
+
{
|
| 1881 |
+
"type": "text",
|
| 1882 |
+
"text": "6. For $\\Delta < 1$ the probability in any radius ball can be made as small as desired. ",
|
| 1883 |
+
"bbox": [
|
| 1884 |
+
212,
|
| 1885 |
+
589,
|
| 1886 |
+
745,
|
| 1887 |
+
607
|
| 1888 |
+
],
|
| 1889 |
+
"page_idx": 14
|
| 1890 |
+
},
|
| 1891 |
+
{
|
| 1892 |
+
"type": "text",
|
| 1893 |
+
"text": "7. The total variation of the distribution can be made as small as desired. ",
|
| 1894 |
+
"bbox": [
|
| 1895 |
+
210,
|
| 1896 |
+
614,
|
| 1897 |
+
696,
|
| 1898 |
+
631
|
| 1899 |
+
],
|
| 1900 |
+
"page_idx": 14
|
| 1901 |
+
},
|
| 1902 |
+
{
|
| 1903 |
+
"type": "text",
|
| 1904 |
+
"text": "The last two conditions exclude degenerate trivial counter-exmaples, one where the whole distribution support is in a $\\Delta$ radius ball and $\\Delta$ does indeed represent a small pertubation. The other condition excludes “pathological\" distributions ,e.g. misclassification on a dense zero measure set like the rationals. ",
|
| 1905 |
+
"bbox": [
|
| 1906 |
+
173,
|
| 1907 |
+
641,
|
| 1908 |
+
825,
|
| 1909 |
+
698
|
| 1910 |
+
],
|
| 1911 |
+
"page_idx": 14
|
| 1912 |
+
},
|
| 1913 |
+
{
|
| 1914 |
+
"type": "text",
|
| 1915 |
+
"text": "Proof. In order to satisfy conditions 1-5, using previous lemmas, it is enough that ",
|
| 1916 |
+
"bbox": [
|
| 1917 |
+
171,
|
| 1918 |
+
714,
|
| 1919 |
+
709,
|
| 1920 |
+
731
|
| 1921 |
+
],
|
| 1922 |
+
"page_idx": 14
|
| 1923 |
+
},
|
| 1924 |
+
{
|
| 1925 |
+
"type": "text",
|
| 1926 |
+
"text": "1. λ1λ1+λ2 $\\begin{array} { r } { \\frac { \\lambda _ { 1 } } { \\lambda _ { 1 } + \\lambda _ { 2 } } \\geq 1 - \\delta } \\end{array}$ \n2. $\\frac { 1 } { 1 + \\lambda _ { 2 } ( 1 + \\Delta ) ^ { d } } \\leq \\delta$ \n3. $\\lambda _ { 1 } \\leq 1 - e ^ { - \\epsilon }$ \n4. λ1 > 1(1+∆)d \n5. λ1 < \u000fd log(1+∆) ",
|
| 1927 |
+
"bbox": [
|
| 1928 |
+
210,
|
| 1929 |
+
742,
|
| 1930 |
+
344,
|
| 1931 |
+
873
|
| 1932 |
+
],
|
| 1933 |
+
"page_idx": 14
|
| 1934 |
+
},
|
| 1935 |
+
{
|
| 1936 |
+
"type": "text",
|
| 1937 |
+
"text": "By setting $\\begin{array} { r } { \\lambda _ { 2 } = \\frac { \\delta } { 1 - \\delta } \\lambda _ { 1 } } \\end{array}$ we can easily satisfy condition 1. It is not hard to see that condition 2 is equivalent to $\\begin{array} { r } { \\lambda _ { 1 } \\ge \\left( \\frac { 1 - \\delta } { \\delta } \\right) ^ { 2 } \\frac { 1 } { ( 1 + \\Delta ) ^ { d } } } \\end{array}$ which superseeds condition 4 when $\\delta < 1 / 2$ . Condition 3 can be satisfied with $\\lambda _ { 1 } < \\epsilon / 2$ by using $1 - x \\geq e ^ { - 2 x }$ for $x < 1 / 2$ . ",
|
| 1938 |
+
"bbox": [
|
| 1939 |
+
174,
|
| 1940 |
+
887,
|
| 1941 |
+
825,
|
| 1942 |
+
928
|
| 1943 |
+
],
|
| 1944 |
+
"page_idx": 14
|
| 1945 |
+
},
|
| 1946 |
+
{
|
| 1947 |
+
"type": "text",
|
| 1948 |
+
"text": "",
|
| 1949 |
+
"bbox": [
|
| 1950 |
+
173,
|
| 1951 |
+
102,
|
| 1952 |
+
570,
|
| 1953 |
+
119
|
| 1954 |
+
],
|
| 1955 |
+
"page_idx": 15
|
| 1956 |
+
},
|
| 1957 |
+
{
|
| 1958 |
+
"type": "text",
|
| 1959 |
+
"text": "This boils down to ensuring $d$ is large enough so that there is a valid $\\lambda _ { 1 }$ such as ",
|
| 1960 |
+
"bbox": [
|
| 1961 |
+
173,
|
| 1962 |
+
138,
|
| 1963 |
+
692,
|
| 1964 |
+
155
|
| 1965 |
+
],
|
| 1966 |
+
"page_idx": 15
|
| 1967 |
+
},
|
| 1968 |
+
{
|
| 1969 |
+
"type": "equation",
|
| 1970 |
+
"img_path": "images/25aebb04f5a9b71bee0a23431ec66995a875130e5145a2a62f15b4e53b7ab546.jpg",
|
| 1971 |
+
"text": "$$\n\\left( \\frac { 1 - \\delta } { \\delta } \\right) ^ { 2 } \\frac { 1 } { ( 1 + \\Delta ) ^ { d } } < \\lambda _ { 1 } < \\frac { \\epsilon } { d \\log ( 1 + \\Delta ) }\n$$",
|
| 1972 |
+
"text_format": "latex",
|
| 1973 |
+
"bbox": [
|
| 1974 |
+
351,
|
| 1975 |
+
160,
|
| 1976 |
+
647,
|
| 1977 |
+
196
|
| 1978 |
+
],
|
| 1979 |
+
"page_idx": 15
|
| 1980 |
+
},
|
| 1981 |
+
{
|
| 1982 |
+
"type": "text",
|
| 1983 |
+
"text": "Which is true for large enough $d$ as the l.h.s decays exponentially while the r.h.s linearly. ",
|
| 1984 |
+
"bbox": [
|
| 1985 |
+
171,
|
| 1986 |
+
210,
|
| 1987 |
+
753,
|
| 1988 |
+
227
|
| 1989 |
+
],
|
| 1990 |
+
"page_idx": 15
|
| 1991 |
+
},
|
| 1992 |
+
{
|
| 1993 |
+
"type": "text",
|
| 1994 |
+
"text": "Condition 6 is trivial as the radius of the support is fixed so as long as $\\Delta < 1$ the probability in any $\\Delta$ radius ball decays exponentially. Regarding total variation, we note that from the divergence theorem this can be bounded by a term that depends on the surface area of shperes with fixed radius which decreases to zero as $d$ goes to infinity. ",
|
| 1995 |
+
"bbox": [
|
| 1996 |
+
173,
|
| 1997 |
+
231,
|
| 1998 |
+
825,
|
| 1999 |
+
289
|
| 2000 |
+
],
|
| 2001 |
+
"page_idx": 15
|
| 2002 |
+
},
|
| 2003 |
+
{
|
| 2004 |
+
"type": "text",
|
| 2005 |
+
"text": "E PIXELCNN $^ { + + }$ ",
|
| 2006 |
+
"text_level": 1,
|
| 2007 |
+
"bbox": [
|
| 2008 |
+
174,
|
| 2009 |
+
329,
|
| 2010 |
+
326,
|
| 2011 |
+
345
|
| 2012 |
+
],
|
| 2013 |
+
"page_idx": 15
|
| 2014 |
+
},
|
| 2015 |
+
{
|
| 2016 |
+
"type": "text",
|
| 2017 |
+
"text": "We trained a conditional Pixel $\\mathrm { C N N + + }$ where instead of predicting each new pixel using a mixture of 10 components, we use one mixture component per class. Using reweighting we train using the following objective $- l o g ( p ( x | y ) ) / d i m + \\bar { \\alpha \\cdot } - l o g \\bar { ( } p ( y | x ) )$ . As one can see from table 4, standard trainig, i.e. $\\alpha = 0$ , results in very poor accuracy, while reweighting the classification score results in much better accuracy but worse NLL. ",
|
| 2018 |
+
"bbox": [
|
| 2019 |
+
173,
|
| 2020 |
+
361,
|
| 2021 |
+
825,
|
| 2022 |
+
431
|
| 2023 |
+
],
|
| 2024 |
+
"page_idx": 15
|
| 2025 |
+
},
|
| 2026 |
+
{
|
| 2027 |
+
"type": "table",
|
| 2028 |
+
"img_path": "images/31afd3e23e8faee4d2c4ce33c8374981fd6b445f30e58a7f5ea84ac148314dc7.jpg",
|
| 2029 |
+
"table_caption": [
|
| 2030 |
+
"Table 4: Accuracy and NLL for pixel $\\mathrm { { C N N + + } }$ on CIFAR10 "
|
| 2031 |
+
],
|
| 2032 |
+
"table_footnote": [],
|
| 2033 |
+
"table_body": "<table><tr><td rowspan=1 colspan=1>a</td><td rowspan=1 colspan=1>acc (%)</td><td rowspan=1 colspan=1>bits/dim</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>25.48</td><td rowspan=1 colspan=1>3.05</td></tr><tr><td rowspan=1 colspan=1>1000</td><td rowspan=1 colspan=1>85.78</td><td rowspan=1 colspan=1>3.34</td></tr></table>",
|
| 2034 |
+
"bbox": [
|
| 2035 |
+
398,
|
| 2036 |
+
444,
|
| 2037 |
+
599,
|
| 2038 |
+
491
|
| 2039 |
+
],
|
| 2040 |
+
"page_idx": 15
|
| 2041 |
+
}
|
| 2042 |
+
]
|
parse/train/r1lPleBFvH/r1lPleBFvH_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/r1lPleBFvH/r1lPleBFvH_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/rkeqn1rtDH/rkeqn1rtDH.md
ADDED
|
@@ -0,0 +1,428 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# HIERARCHICAL GRAPH MATCHING NETWORKS FOR DEEP GRAPH SIMILARITY LEARNING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
While the celebrated graph neural networks yield effective representations for individual nodes of a graph, there has been relatively less success in extending to deep graph similarity learning. Recent work has considered either global-level graph-graph interactions or low-level node-node interactions, ignoring the rich cross-level interactions between parts of a graph and a whole graph. In this paper, we propose a Hierarchical Graph Matching Network (HGMN) for computing the graph similarity between any pair of graph-structured objects. Our model jointly learns graph representations and a graph matching metric function for computing graph similarity in an end-to-end fashion. The proposed HGMN model consists of a multi-perspective node-graph matching network for effectively learning crosslevel interactions between parts of a graph and a whole graph, and a siamese graph neural network for learning global-level interactions between two graphs. Our comprehensive experiments demonstrate that our proposed HGMN consistently outperforms state-of-the-art graph matching network baselines for both classification and regression tasks.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Learning a general similarity metric between arbitrary pairs of graph-structured objects is one of the key challenges in machine learning. Such learning problems often arise in a variety of applications, ranging from graph similar searching in graph-based database (Yan & Han, 2002), to Fewshot 3D Action Recognition (Guo et al., 2018), unknown malware detection (Wang et al., 2019), and promising selection in automatic theory proving (Wang et al., 2017), to name just a few.
|
| 12 |
+
|
| 13 |
+
Conceptually, classical exact (or inexact) graph matching techniques (Ullmann, 1976; Caetano et al., 2009; Bunke & Allermann, 1983; Riesen et al., 2010) provide a strong tool for learning graph similarity. However, these methods usually either require input graphs with similar sizes or consider mainly the graph structures for finding a correspondence between the nodes of different graphs without taking into account the node representations or features. In contrast, in this paper, we consider the graph matching problem of learning a mapping between a pair of graph inputs $( { \dot { G } } ^ { 1 } , G ^ { 2 } ) \in { \mathcal { G } } \times { \mathcal { G } }$ and the similarity score $y \in \mathcal { V }$ , based on a set of training triplet of structured input pairs and scalar output score $( G _ { 1 } ^ { \bar { 1 } } , G _ { 1 } ^ { 2 } , y _ { 1 } ) , . . . , ( G _ { n } ^ { 1 } , G _ { n } ^ { 2 } , y _ { n } ) \in \mathcal { G } \times \mathcal { G } \times \mathcal { Y }$ drawn from some fixed but unknown probability distribution.
|
| 14 |
+
|
| 15 |
+
Recent years have seen a surge of interests in graph neural networks (GNNs), which have been demonstrated to be a powerful class of models for learning node embeddings of graph-structured data (Bronstein et al., 2017). Various GNN models have since been developed for learning effective node representations for node classification (Li et al., 2016; Kipf & Welling, 2016; Hamilton et al., 2017; Velickovi ˇ c et al., 2017), or pooling the learned node embeddings into a graph vector for graph ´ classification (Ying et al., 2018; Ma et al., 2019), or combining with variational auto-encoder to learn the graph distribution for graph generation (Simonovsky & Komodakis, 2018; Li et al., 2018; Samanta et al., 2018; You et al., 2018). However, there is relatively less study on learning graph similarity using GNNs.
|
| 16 |
+
|
| 17 |
+
To learn graph similarity, a simple yet straightforward way is to encode each graph as a vector and combine two vectors of each graph to make a decision. This approach is useful since graphlevel embeddings contain important information of a pair of graphs. One obvious limitation of this approach lies in the fact of the ignorance of more fine-grained interactions among different level embeddings of two graphs. Very recently, a few of attempts have been made to take into account lowlevel interactions either by considering the histogram information of node-wise similarity matrix of node embeddings (Bai et al., 2019) or improving the node embeddings of one graph by incorporating implicit attentive neighbors of another graphs through a soft attention (Li et al., 2019). However, there are two significant challenges making these graph matching models potentially ineffective: i) how to learn different-level granularity (global level and local level) of interactions between a pair of graphs; ii) how to effectively learn richer cross-level interactions between parts of a graph and a whole graph.
|
| 18 |
+
|
| 19 |
+
Inspired by these observations, in this paper, we propose a Hierarchical Graph Matching Network (HGMN) for computing the graph similarity between any pair of graph-structured objects. Our model jointly learns graph representations and a graph matching metric function for computing graph similarity in an end-to-end fashion. The proposed HGMN model consists of a novel multiperspective node-graph matching network for effectively learning cross-level interactions between parts of a graph and a whole graph, and a siamese graph neural network for learning global-level interactions between two graphs. Our final small prediction networks consume these feature vectors from both cross-level and global-level interactions to perform either graph-graph classification or graph-graph regression tasks, respectively.
|
| 20 |
+
|
| 21 |
+
Recently proposed works only compute graph similarity by considering either graph-graph classification problem (with labels $Y = { \bar { \{ - 1 , 1 \} } }$ ) (Li et al., 2019), or graph-graph regression problem (with similarity score $Y = [ 0 , 1 ] ,$ ) (Bai et al., 2019). To demonstrate the effectiveness of our model, we systematically investigate the performance of our HGMN model compared with these recently proposed graph matching models on four datasets for both graph-graph classification and regression tasks. To bridge the gap of the lack of standard graph matching datasets, we also create one new dataset from a real application together with a previously released dataset by ( $\mathrm { { X u } }$ et al., 2017) for graph-graph classification task 1. One important aspect is previous works did not consider the impact of the size of two input graphs, which often plays an important role in determining the performance of graph matching. Motivated by this observation, we have considered three different ranges of graph sizes from [3, 200], [20,200], and [50,200] in order to evaluate the robustness of each graph matching model.
|
| 22 |
+
|
| 23 |
+
We highlight our main contributions of this paper as follows:
|
| 24 |
+
|
| 25 |
+
• We propose a hierarchical graph matching network (HGMN) for computing the graph similarity between any pair of graph-structured objects. Our HGMN model jointly learns graph representations and a graph matching metric function for computing graph similarity in an end-to-end fashion.
|
| 26 |
+
• In particular, we propose a multi-perspective node-graph matching network for effectively capturing the cross-level interactions between a node embeddings of a graph and a corresponding attentive graph-level embedding of another graph.
|
| 27 |
+
We systematically investigate different factors on the performance of all graph matching models such as the impact of different tasks (classification and regression) and the sizes of input graphs.
|
| 28 |
+
Our comprehensive experiments demonstrate that our proposed HGMN consistently outperforms state-of-the-art graph matching network baselines for both classification and regression tasks. Compared with previous works, our proposed model HGMN is also more robust when the sizes of the two input graphs increase.
|
| 29 |
+
|
| 30 |
+
# 2 PROBLEM FORMULATION
|
| 31 |
+
|
| 32 |
+
In this section, we briefly introduce the problem formulation. Given a pair of graph inputs $( G ^ { 1 } , G ^ { 2 } )$ , the aim of the graph matching problem we consider in this paper is to produce a graph similarity score $y = s ( \bar { G } ^ { 1 } , \bar { G } ^ { 2 } ) \in \mathcal { V }$ . The graph $G ^ { 1 } = ( V ^ { 1 } , E ^ { 1 } )$ is represented as a set of $N$ nodes $v _ { i } \in$ $V ^ { 1 }$ with a feature matrix $X ^ { 1 } \in \tilde { \mathcal { R } } ^ { N \times d }$ , edges $( \dot { v } _ { i } , v _ { j } ) \in E ^ { 1 }$ (binary or weighted) formulating anř adjacency matrix $A ^ { 1 } \in \mathcal { R } ^ { N \times N }$ , and a degree matrix $\begin{array} { r } { D _ { i i } ^ { 1 } = \sum _ { j } A _ { i j } ^ { 1 } } \end{array}$ . Similarly, the graph $G ^ { 2 } =$ $( V ^ { 2 } , E ^ { 2 } )$ is represented as a set of $M$ nodes $v _ { i } \in V ^ { 2 }$ with a feature matrix $X ^ { 2 } \in \mathcal { R } ^ { M \times d }$ , edges $( v _ { i } , v _ { j } ) \in E ^ { 2 }$ (binary or weighted) formulating an adjacency matrix ř $A ^ { 2 } \in \mathcal { R } ^ { M \times M }$ , and a degree matrix $\begin{array} { r } { D _ { i i } ^ { 2 } = \sum _ { j } A _ { i j } ^ { 2 } } \end{array}$ . Note that, when performing graph-graph classification task the scalar $y$ is the class labels $\begin{array} { r } { { \dot { y } } = \{ - 1 , 1 \} } \end{array}$ ; when performing graph-graph regression task the scalar $y$ is the the measure of the similarity score $y \in [ 0 , 1 ]$ . We train a graph matching model based on a set of training triplet of structured input pairs and scalar output score ${ \bar { ( G _ { 1 } ^ { 1 } , G _ { 1 } ^ { 2 } , y _ { 1 } { \bar { ) } } } } , . . . , ( G _ { n } ^ { 1 } , G _ { n } ^ { 2 } , Y _ { n } ) \in { \mathcal { G } } \times { \mathcal { G } } \times { \bar { \mathcal { y } } }$ drawn from some fixed but unknown probability distribution in real applications.
|
| 33 |
+
|
| 34 |
+

|
| 35 |
+
Figure 1: Overall Model Architecture of Hierarchical Graph Matching Networks (HGMN)
|
| 36 |
+
|
| 37 |
+
# 3 HIERARCHICAL GRAPH MATCHING NETWORKS ARCHITECTURE
|
| 38 |
+
|
| 39 |
+
In this section, we will introduce two key components of our HGMN architecture - Siamese Graph Neural Networks (SGNN) and Multi-Perspective Node-Graph Matching Networks (MPNGMN). We first discuss SGNN for learning the global-level interactions between two graphs and then outline MPNGMN for effectively learning the cross-level node-graph interactions between parts of one graph and one whole graph. Our overall model architecture for HGMN is shown in Fig. 1.
|
| 40 |
+
|
| 41 |
+
# 3.1 SGNN FOR GLOBAL-LEVEL INTERACTION LEARNING
|
| 42 |
+
|
| 43 |
+
The graph-level embeddings contain important information of a graph. Therefore, learning graphlevel interactions between two graphs could be an important component for learning the graph similarity of two graphs. In order to capture the global-level interactions between two graphs, we employ SGNN which is based on Siamese Networks architecture (Bromley et al., 1994), which has achieved great success in many applications such as visual recognition (Bertinetto et al., 2016; Varior et al., 2016) and sentence similarity (He et al., 2015; Mueller & Thyagarajan, 2016). Independently, a similar idea using high-order siamese graph neural networks was presented for brain network analysis (Chaudhuri et al., 2019).
|
| 44 |
+
|
| 45 |
+
Our SGNN adapts popular Graph Convolution Networks (GCN) (Kipf & Welling, 2016) with siamese neural networks for simplicity. Other variants of graph neural networks such as GraphSAGE (Hamilton et al., 2017) and Gated Graph Neural Networks (Li et al., 2016) can also be used. Our SGNN consists of three components: 1) node embedding layers; 2) graph-level embedding aggregation layers; 3) graph-graph matching and prediction layers.
|
| 46 |
+
|
| 47 |
+
Node Embeembeddings $H ^ { l } = \{ \mathbf { h } _ { i } ^ { l } \} _ { i = 1 } ^ { \{ N , M \} } \in \mathcal { R } ^ { \{ N , M \} \times d ^ { \prime } }$ layer GCN witof both graphs ´ $G ^ { 1 }$ e siaand ¯ $G ^ { 2 }$ e networks to generate node,¯ ¯
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
{ \cal H } ^ { l } = f ( X ^ { l } , A ^ { l } ) = \mathrm { R e L U } \Big ( \bar { A } ^ { l } \mathrm { R e L U } \Big ( \bar { A } ^ { l } \mathrm { R e L U } \Big ( \bar { A } ^ { l } X ^ { l } W ^ { ( 0 ) } \Big ) W ^ { ( 1 ) } \Big ) W ^ { ( 2 ) } \Big ) , l = \{ 1 , 2 \} .
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
where $\bar { A } ^ { l } = ( \widetilde { D } ^ { l } ) ^ { - \frac { 1 } { 2 } } \widetilde { A } ^ { l } ( \widetilde { D } ^ { l } ) ^ { - \frac { 1 } { 2 } }$ is the normalized Laplacian matrix for $\widetilde { A } ^ { l } = A ^ { l } + I _ { \{ N , M \} }$ depending on the graph is $G ^ { 1 }$ or $G ^ { 2 }$ , and $W ^ { ( i ) } , i = \{ 0 , 1 , 2 \}$ are hidden weighted matrices for each layer. Note
|
| 54 |
+
|
| 55 |
+
that the twin networks share the parameters of GCN when training on the pair of graphs $( G ^ { 1 } , G ^ { 2 } )$ . The number of GCN layers required depends on the real application graph data. To isolate the effect of overtuning, we choose the three layers after some initial experiments on validation sets.
|
| 56 |
+
|
| 57 |
+
Graph-level Embedding Aggregation Layers. After we compute the resulting node embeddings $H ^ { l }$ of each graph from GCN, we need to aggregate these node embeddings to formulate their corresponding graph-level embeddings of each graph.
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
{ \bf h } _ { G } ^ { l } = \mathrm { A g g r e g a t e } \Big ( \{ { \bf h } _ { i } ^ { l } \} _ { i = 1 } ^ { \{ N , M \} } \Big ) , \quad l = \{ 1 , 2 \} .
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
We employ different aggregation functions such as element-wise max pooling (Max), elementwise max pooling following a transformation by applying a fully connected layer on $H ^ { i }$ (FCMax), element-wise mean pooling (Avg), element-wise mean pooling following a transformation by applying a fully connected layer on $H ^ { i }$ (FCAvg), and a sophisticated aggregator based on LSTM architecture (Hochreiter & Schmidhuber, 1997a). Note that, among these aggregation functions, the LSTM aggregator is not permutation invariant on a set of node embeddings although LSTM may admit more expressive ability. We adapt LSTMs to operate on these node embeddings by simply applying the LSTMs to a random permutation of the node embeddings.
|
| 64 |
+
|
| 65 |
+
Graph-Graph Matching and Prediction Layers. After the graph-level embeddings $\mathbf { h } _ { \mathbf { G } } ^ { \mathbf { 1 } }$ and $\mathbf { h } _ { \mathbf { G } } ^ { 2 }$ are computed for the graphs $G ^ { 1 }$ and $G ^ { 2 }$ , we then use the resulting graph embeddings to compute the graph similarity score of $( G ^ { 1 } , G ^ { 2 } )$ . Depending on the specific tasks, we have slightly different ways to calculate the final similarity score. For classification tasks, we simply compute the cosine similarity of two graph-level embeddings,
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
\widetilde { y } = s ( G ^ { 1 } , G ^ { 2 } ) = c o s i n e ( \mathbf { h _ { G } ^ { 1 } } , \mathbf { h _ { G } ^ { 2 } } )
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
where the similarity function $s$ could also be other similarity metric such as Euclidean similarity and dot-product similarity. We find that the cosine similarity function performs generally better across different datasets.
|
| 72 |
+
|
| 73 |
+
For regression tasks, we first concatenate the two aggregated graph embeddings to $[ \mathbf { h } _ { \mathbf { G } } ^ { \mathbf { 1 } } , \mathbf { h } _ { \mathbf { G } } ^ { \mathbf { 2 } } ]$ and then employ four standard fully connected layers to gradually project the vector of dimension $[ \mathbf { h } _ { \mathbf { G } } ^ { \mathbf { 1 } } , \mathbf { h } _ { \mathbf { G } } ^ { \mathbf { 2 } } ]$ down to a scalar of the dimension 1. Since the expected similar score $\widetilde { y }$ should be in range of [0,1], we perform sigmoid function to enforce the final score in this range. We therefore compute the similarity score for graph-graph regression task as following,
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
\widetilde { y } = s ( G ^ { 1 } , G ^ { 2 } ) = \mathrm { s i g m o i d } \Big ( \mathrm { M L P } \Big ( [ \mathbf { h _ { G } ^ { 1 } } , \mathbf { h _ { G } ^ { 2 } } ] \Big ) \Big ) .
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
For both tasks, we train the SGNN model using mean square error loss function to compare the computed similarity score $\widetilde { y }$ with the groud-truth similarity score $y$ ,
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
\mathcal { L } = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \Big ( \widetilde { y } - y \Big ) ^ { 2 } .
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
# 3.2 MPNGMN FOR CROSS-LEVEL NODE-GRAPH INTERACTION LEARNING
|
| 86 |
+
|
| 87 |
+
Although global-level interaction learning could capture the important structural and feature information of two graphs to some extent, it is not enough to capture all important information of two graphs since they ignore other low-level interactions between parts of two graphs. In particular, existing works have considered either global-level graph-graph interactions or low-level node-node interactions, ignoring the rich cross-level interactions between parts of a graph and a whole graph. Inspired by these observations, we propose a novel multi-perspective node-graph matching network to effectively learn the cross-level interaction features. Our MPNGMN model consists of four parts: 1) node embedding layers; 2) node-graph matching layers; 3) aggregation layers; and 4) prediction layers, as shown in Fig. 1. We will illustrate each part in details as follows.
|
| 88 |
+
|
| 89 |
+
Node Embedding Layers: Similar as described in Sec. 3.1, we choose to employ the three-layer GCN to generate node embeddings $H ^ { 1 } = \{ { \bf h } _ { i } ^ { 1 } \} _ { i = 1 } ^ { N } \in { \mathcal R } ^ { N \times d ^ { \prime } }$ and $H ^ { 2 } = \{ { \bf h } _ { i } ^ { 2 } \} _ { i = 1 } ^ { M } \in \mathcal { R } ^ { M \times d ^ { \prime } }$ for graphs $\bar { G ^ { 1 } }$ and $G ^ { 2 }$ . Conceptually, the node embedding layers of MPNGMN (graph encoder) could be chosen to be an independent GCN or a shared GCN with SGNN. As shown in Fig. 1, our MPNGMN shares the same graph encoder with SGNN due to two reasons: i) the shared GCN parameters reduce the number of parameters by half, which helps mitigate possible overfitting; ii) the shared
|
| 90 |
+
|
| 91 |
+
GCN maintains the consistency of resulting node embeddings for both MPNGMN and SGNN, potentially leading to more aligned global-level interaction and cross-level interaction features. After the node embeddings $H ^ { 1 }$ and $H ^ { \widetilde { 2 } }$ have been computed, they will be fed into the following nodegraph matching layers.
|
| 92 |
+
|
| 93 |
+
Node-Graph Matching Layers: The node-graph matching layer is the key part of our MPNGMN, which can effectively learn the cross-level interactions between parts of a graph and a whole graph. There are generally two steps for this layer: i) calculate the graph-level embedding of a graph; ii) compare the node embeddings of a graph with the associated graph-level embeddings of a whole graph and then produce a similarity feature vector. A simple way to obtain the graph-level embedding of a graph is to perform element-wise mean pooling or max pooling. However, it does not consider any information from the node embedding that the resulting graph-level embedding will compare with later. To build more tight interactions between the two, we calculate the cross-graph attention coefficients between the node $v _ { i } \in \mathcal { V } ^ { 1 }$ in graph $G ^ { 1 }$ and all other nodes $v _ { j } \in \mathcal V ^ { 2 }$ in graph $G ^ { 2 }$ . Similarly, we calculate the cross-graph attention coefficients between the node $v _ { i } \in \mathcal { V } ^ { 2 }$ in graph $G ^ { 2 }$ and all other nodes $v _ { j } \in \mathcal V ^ { 1 }$ in graph $G ^ { 1 }$ . These two cross-graph attention coefficients can be computed independently,
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
\alpha _ { i , j } = f _ { s } ( \mathbf { h } _ { i } ^ { 1 } , \mathbf { h } _ { j } ^ { 2 } ) , \ j \in \mathscr { V } ^ { 2 } \quad \mathrm { a n d } \quad \beta _ { i , j } = f _ { s } ( \mathbf { h } _ { i } ^ { 2 } , \mathbf { h } _ { j } ^ { 1 } ) , \ j \in \mathscr { V } ^ { 1 } ,
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
where $f _ { s }$ is the attention function for computing the similarity score. For simplicity, we use cosine function in our experiments but other similarity metrics can be adopted as well. Then we compute the attentive graph-level embeddings $\tilde { \mathbf { h } } _ { G } ^ { 1 }$ or $\tilde { \mathbf { h } } _ { G } ^ { 2 } \in \mathcal { R } ^ { d ^ { \prime } }$ using weighted average of node embeddings of the other graph,
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
\widetilde { \mathbf { h } } _ { G } ^ { 2 } = \sum _ { j \in \mathscr { V } ^ { 2 } } \alpha _ { i , j } \mathbf { h } _ { j } ^ { 2 } \quad \mathrm { a n d } \quad \widetilde { \mathbf { h } } _ { G } ^ { 1 } = \sum _ { j \in \mathscr { V } ^ { 1 } } \beta _ { i , j } \mathbf { h } _ { j } ^ { 1 } .
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
Next, we define our multi-perspective matching function $f _ { m }$ to compute the similarity feature vector by comparing two vectors as follows,
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
\widetilde { \mathbf { h } } ( i ) = f _ { m } ( \mathbf { x } _ { 1 } , \mathbf { x } _ { 2 } , \mathbf { w } _ { i } ) = f _ { m } ( \mathbf { x } _ { 1 } \odot \mathbf { w } _ { i } , \mathbf { x } _ { 2 } \odot \mathbf { w } _ { i } ) , i = 1 , \ldots , \widetilde { d }
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
where $\widetilde { \mathbf { h } } \in \mathcal { R } ^ { \tilde { d } }$ is a $\widetilde { d } .$ -dimension similarity feature vector, and $W _ { m } = \{ \mathbf { w } _ { i } \} _ { i = 1 } ^ { \tilde { d } } \in \mathcal { R } ^ { d ^ { \prime } \times \tilde { d } }$ is a trainable weight matrix and each $\mathbf { w } _ { i }$ represents a perspective with total $\tilde { d }$ number of perspectives. Notably, $f _ { m }$ could be any similarity function and we use cosine similarity metric in our experiments. It is worth noting that the proposed multi-perspective matching function essentially shares similar spirit with multi-head attention (Vaswani et al., 2017), with the difference that multi-head attention uses $\tilde { d }$ number of weighted matrices instead of vectors.
|
| 112 |
+
|
| 113 |
+
Therefore, we can utilize our defined multi-perspective matching function $f _ { m }$ to compare the $j$ -th node embeddings of a graph with the corresponding attentive graph-level embeddings to capture the cross-level node-graph interactions. The resulting similarity feature vectors $\widetilde { \mathbf { h } } _ { j } ^ { 1 }$ or $\tilde { \mathbf { h } } _ { j } ^ { 2 } \in \mathcal { R } ^ { \tilde { d } }$ (w.r.t the node $v _ { j }$ in either graph $G ^ { 1 }$ or $G ^ { 2 }$ ) can thus be computed by
|
| 114 |
+
|
| 115 |
+
$$
|
| 116 |
+
\widetilde { \mathbf { h } } _ { j } ^ { 1 } = f _ { m } \big ( \mathbf { h } _ { j } ^ { 1 } , \widetilde { \mathbf { h } } _ { G } ^ { 2 } , W _ { m } \big ) , \ j \in \mathcal { V } _ { 1 } \quad \mathrm { a n d } \quad \widetilde { \mathbf { h } } _ { j } ^ { 2 } = f _ { m } \big ( \mathbf { h } _ { j } ^ { 2 } , \widetilde { \mathbf { h } } _ { G } ^ { 1 } , W _ { m } \big ) , \ j \in \mathcal { V } _ { 2 }
|
| 117 |
+
$$
|
| 118 |
+
|
| 119 |
+
After the node-graph matching layers, these newly produced interaction feature matrices $\tilde { H } ^ { 1 } =$ $\{ \tilde { \mathbf { h } } _ { i } ^ { 1 } \} _ { i = 1 } ^ { N } \in \mathcal { R } ^ { N \times \tilde { d } }$ and $\tilde { H } ^ { 2 } = \{ \bar { \mathbf { h } } _ { i } ^ { 2 } \} _ { i = 1 } ^ { M } \in \mathcal { R } ^ { M \times \tilde { d } }$ for graphs $G ^ { 1 }$ and $G ^ { 2 }$ , are ready to feed them into the aggregation layers.
|
| 120 |
+
|
| 121 |
+
Aggregation Layers: To aggregate these cross-level interaction feature matrix from the node-graph matching layer, we employ the BiLSTM (Hochreiter & Schmidhuber, 1997b) model to aggregate the unordered feature embeddings,
|
| 122 |
+
|
| 123 |
+
$$
|
| 124 |
+
\widetilde { \bf h } _ { G } ^ { l } = { \tt B i L S T M } \Big ( \{ { \widetilde { \bf h } _ { j } ^ { l } } \} _ { j = 1 } ^ { \{ N , M \} } \Big ) , \quad l = \{ 1 , 2 \} .
|
| 125 |
+
$$
|
| 126 |
+
|
| 127 |
+
where $\tilde { \mathbf { h } } _ { G } ^ { l } \in \mathcal { R } ^ { 2 \tilde { d } }$ concatenate the last hidden vectors of two directions as the aggregated graph embedding for each graph $G ^ { 1 }$ and $G ^ { 2 }$ . Note that other commutative aggregators such as max, average, or attention based aggregation (Velickovi ˇ c et al., 2017) can also be used. However, our ´ extensive experiments showed that BiLSTM aggregator achieved consistent better performance over other aggregators. Similar LSTM-type aggregator has also been exploited in the previous works (Hamilton et al., 2017; Zhang et al., 2019).
|
| 128 |
+
|
| 129 |
+
Prediction Layers: After the aggregated graph embeddings $\tilde { \mathbf { h } } _ { G } ^ { 1 }$ and $\tilde { \mathbf { h } } _ { G } ^ { 2 }$ are obtained, we then use these two embeddings to compute the similarity score of $( \breve { G } ^ { 1 } , G ^ { 2 } )$ . As discussed in Sec.3.1 for graph-graph matching and prediction layers, we use the same prediction layers to predict the similarity score. We also use the same mean square error loss function for the model training. In this way, we can also easily compare the performance difference between SGNN and MPNGMN.
|
| 130 |
+
|
| 131 |
+
# 3.3 DISCUSSIONS ON HGMN MODEL
|
| 132 |
+
|
| 133 |
+
Our model jointly learns graph representations and a graph matching metric function for computing graph similarity in an end-to-end fashion. Our HGMN model combines the advantages of both SGNN and MPNGMN to capture both global-level graph-graph interaction features and novel crosslevel node-graph interaction features between two graphs. Therefore, for final prediction layers of HGMN, we have total six aggregated graph embedding vectors where two of them are $\mathbf { h } _ { G } ^ { 1 }$ and $\mathbf { h } _ { G } ^ { 2 }$ from SGNN, and another four are $\tilde { \mathbf { h } } _ { G } ^ { 1 }$ and $\tilde { \mathbf { h } } _ { G } ^ { 2 }$ from MPNGMN.
|
| 134 |
+
|
| 135 |
+
The computation complexity of SGNN is $O ( ( | E ^ { 1 } | + | E ^ { 2 } | ) d d ^ { \prime } )$ , where the most dominant computation is sparse matrix-matrix operations in equation 1. Similarly, the computational complexity of MPNGMN is $O ( N M d + ( N + M ) d ^ { \prime } + ( N + M ) d d ^ { \prime } )$ , where the most computationally extensive operations are in equations 7, 8, and 9. Compared to recently proposed works in (Bai et al., 2019; Li et al., 2019), the computational complexity of them are comparable.
|
| 136 |
+
|
| 137 |
+
# 4 EXPERIMENTS
|
| 138 |
+
|
| 139 |
+
In this section, we systematically investigate the performance of our HGMN model compared with other recently proposed graph matching models on four datasets for both classification and regression tasks.
|
| 140 |
+
|
| 141 |
+
Table 1: Summary statistics of datasets for both classification & regression tasks.
|
| 142 |
+
|
| 143 |
+
<table><tr><td rowspan=1 colspan=1>Tasks</td><td rowspan=1 colspan=1>Datasets</td><td rowspan=1 colspan=1>Sub-datasets</td><td rowspan=1 colspan=1>#ofGraphs</td><td rowspan=1 colspan=1>#ofFunctions</td><td rowspan=1 colspan=1>AVG #of Nodes</td><td rowspan=1 colspan=1>AVG #of Edges</td><td rowspan=1 colspan=1>AVG # ofAVG Degrees</td><td rowspan=1 colspan=1>Init FeatureDimensions</td></tr><tr><td rowspan=2 colspan=1>classif-ication</td><td rowspan=1 colspan=1>FFmpeg</td><td rowspan=1 colspan=1>[3,200][20,200][50,200]</td><td rowspan=1 colspan=1>830083169610824</td><td rowspan=1 colspan=1>1037676683178</td><td rowspan=1 colspan=1>18.8351.0290.93</td><td rowspan=1 colspan=1>27.0275.88136.83</td><td rowspan=1 colspan=1>2.592.943.00</td><td rowspan=1 colspan=1>6</td></tr><tr><td rowspan=1 colspan=1>OpenSSL</td><td rowspan=1 colspan=1>[3,200][20,200][50,200]</td><td rowspan=1 colspan=1>73953158004308</td><td rowspan=1 colspan=1>42491073338</td><td rowspan=1 colspan=1>15.7344.8983.68</td><td rowspan=1 colspan=1>21.9767.15/127.75</td><td rowspan=1 colspan=1>2.442.953.04</td><td rowspan=1 colspan=1>6</td></tr><tr><td rowspan=2 colspan=1>regre-ssion</td><td rowspan=1 colspan=1>AIDS700</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>700</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>8.90</td><td rowspan=1 colspan=1>8.80</td><td rowspan=1 colspan=1>1.96)</td><td rowspan=1 colspan=1>29</td></tr><tr><td rowspan=1 colspan=1>LINUX1000</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>1000</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>7.58</td><td rowspan=1 colspan=1>6.94</td><td rowspan=1 colspan=1>1.81</td><td rowspan=1 colspan=1>1</td></tr></table>
|
| 144 |
+
|
| 145 |
+
4.1 DATASETS, EXPERIMENTS SETTINGS, AND BASELINES
|
| 146 |
+
|
| 147 |
+
# 4.1.1 DATASETS
|
| 148 |
+
|
| 149 |
+
Classification datasets: we evaluate our model on the problem of detecting similarity between two binary functions, which is the heart of many binary security problems, such as software plagiarism, malware detection, and vulnerability search (Feng et al., 2016; Xu et al., 2017; Ding et al., 2019). In particular, two binary functions that are compiled from the same source code but under different settings (architectures, compilers, optimization levels, etc) are semantically similar to each other. To learn similarity from binary functions, we represent those binaries with control flow graphs, in which the graph nodes represent the basic blocks (a basic block is a sequence of instructions without jumps) and edges represent control flow paths between these basic blocks.
|
| 150 |
+
|
| 151 |
+
Thus, detecting similarity between two binary functions can be cast as the problem of learning the similarity score $s ( G ^ { 1 } , G ^ { \bar { 2 } } )$ between two control flow graphs $G ^ { 1 }$ and $G ^ { 2 }$ , where $s ( G ^ { 1 } , G ^ { 2 } ) \stackrel { \smile } { = } + 1$ indicates $G ^ { 1 }$ and $G ^ { 2 }$ are similar; otherwise $s ( G ^ { 1 } , G ^ { \ 5 } ) \ = \ - 1$ indicates dissimilar. We prepare two benchmark datasets generated from two pieces of popular open-source software: FFmpeg and OpenSSL, with statistics shown in Table 1. For each graph in FFmpeg and OpenSSL, we initialize every node with 6 block-level numeric features. More details about the dataset generation and node features can be found in Appendix A.1.1 and Table 7.
|
| 152 |
+
|
| 153 |
+
Existing graph matching works do not consider the impact of the sizes of graphs on performance. However, we find that the larger the graph size is, the worse the performance is. Therefore, it is important to evaluate the robustness of any graph matching networks in this setting. We thus further split these two datasets into three sub-datasets according to the size range of graph pairs.
|
| 154 |
+
|
| 155 |
+
Regression datasets: we evaluate our model on learning the graph edit distance (GED) (Zeng et al., 2009; Gao et al., 2010; Riesen, 2015), which measures the structural similarity between two graphs. Formally, GED is defined as the cost of the least expensive sequence of edit operations that transform one graph into another, where an edit operation can be an insertion or a deletion of a node or an edge.
|
| 156 |
+
|
| 157 |
+
We evaluate our model on two benchmark datasets AIDS700 and LINUX1000 2. The statistic for the datasets is shown in Table 1, and more details can be found in Appendix A.1.2 and Table 7.
|
| 158 |
+
|
| 159 |
+
# 4.1.2 EXPERIMENTAL SETUP
|
| 160 |
+
|
| 161 |
+
Model Settings. For SGNN, we use 3 GCN layers in node embedding layer and each of the GCNs has an output dimension of 100. We use ReLU as the activation function along with a dropout layer after each GCN layer with dropout rate being 0.1. In the graph-level embedding aggregation layer of SGNN, we can employ different aggregation functions (i,e., Max, FCMax, Avg, FCAvg, BiLSTM, etc.) as stated previously in Section 3.1. For MPNGMN, we exploited different aggregation functions similar to SGNN and we found that BiLSTM aggregator consistently performs better than other aggregation functions (see appendix A.4). Thus, for MPNGMN, we always use BiLSTM as our default aggregation function and we make its hidden size equal to the dimension of node embeddings. For MPNGMN, we set the number of perspectives $\tilde { d }$ to 100, and use another aggregation function BiLSTM to aggregate the output of node-graph matching layer. For each graph, we concatenate the last hidden vector of two directions of BiLSTM, which results in a 200 dimensions vector as the graph embeddings.
|
| 162 |
+
|
| 163 |
+
Implementation Details. We implement our model using PyTorch 1.1 (Paszke et al., 2017), and train the model using the Adam optimizer (Kingma & Ba, 2014). The learning rate is set to $0 . 5 \mathrm { e } { - 3 }$ for classification tasks and 5e-3 for regression tasks. For classification tasks, we split each dataset into three disjoint subsets of binary functions for training/validation/testing. We train our model by running 100 epochs. At each epoch, we build the pairwise training data as follows. For each graph $G$ in training subset, we obtain one positive pair $\{ ( G , G ^ { p o s } ) , + 1 \}$ and a corresponding negative pair $\{ ( G , G ^ { n e g } ) , - 1 \}$ , where $G ^ { p o s }$ is randomly selected from all control flow graphs that compiled from the same source function as $G$ , and $G ^ { n e g }$ is selected from other graphs. By default, for each minibatch in one epoch, we train our model with 5 positive and 5 negative pairs. In regression tasks, we first split graphs of each dataset into training, validation, and testing set, and then build the pairwise training/validation/testing data as previous work Bai et al. (2019). We train our model by 10000 iterations with a mini-batch of 128 graph pairs. Each pair is a tuple of $\{ ( G ^ { 1 } , G ^ { 2 } ) , s \}$ , where $s$ is the ground-truth GED between $G ^ { 1 }$ and $G ^ { 2 }$ . Noted that all experiments are conducted on a computer equipped with 2 Intel Xeon 2.2GHz CPU, 256 GB memory and one NVIDIA GTX 1080 Ti GPU.
|
| 164 |
+
|
| 165 |
+
Baselines. We compared our HGMN against the following baselines: i) SimGNN (Bai et al. (2019)): SimGNN uses GCN to update node features and aggregates them using an attention mechanism. The final pair representation consists of 2 components: One from the interaction between aggregated pair graph features and the other from a pairwise node comparison. ii) GMN (Li et al. (2019)): This method updates node features according to not only current states and messages aggregated from neighborhoods but also information of attentive neighborhoods using cross-graph attention. After updating node features, it aggregates node features in a way similar to that in Gated Graph Neural Network (Li et al. (2016)) to get graph embedding. We have two variants of HGMN: HGMN(FCMax) stands for HGMN model with SGNN(FCMax) and HGMN(BiLSTM) stands for HGMN model with SGNN(BiLSTM).
|
| 166 |
+
|
| 167 |
+
Note that, we report the mean and standard deviation of the experimental results of both baseline and our models by repeating the experiments five times.
|
| 168 |
+
|
| 169 |
+
# 4.2 COMPARISON ON GRAPH-GRAPH CLASSIFICATION TASK
|
| 170 |
+
|
| 171 |
+
Table 2: Summary of classification results in terms of AUC scores (%).
|
| 172 |
+
|
| 173 |
+
<table><tr><td rowspan="2">Model</td><td colspan="3">FFmpeg</td><td colspan="3">OpenSSL</td></tr><tr><td>[3,200]</td><td>[20,200]</td><td>[50,200]</td><td>[3,200]</td><td>[20,200]</td><td>[50,200]</td></tr><tr><td>SimGNN</td><td>95.38±0.76</td><td>94.31±1.01</td><td>93.45±0.54</td><td>95.96±0.31</td><td>93.58±0.82</td><td>94.25±0.85</td></tr><tr><td>GMN</td><td>94.15±0.62</td><td>95.92±1.38</td><td>94.76±0.45</td><td>96.43±0.61</td><td>93.03±3.81</td><td>93.91±1.65</td></tr><tr><td>SGNN (Max)</td><td>93.92±0.07</td><td>93.82±0.28</td><td>85.15±1.39</td><td>91.07±0.10</td><td>88.94±0.47</td><td>82.10±0.51</td></tr><tr><td>MPNGMN</td><td>97.73±0.11</td><td>98.29±0.21</td><td>96.81±0.96</td><td>96.56±0.12</td><td>97.60±0.29</td><td>92.89±1.31</td></tr><tr><td>HGMN (FCMax)</td><td>98.07±0.06</td><td>98.29±0.10</td><td>97.83±0.11</td><td>96.87±0.24</td><td>97.59±0.24</td><td>95.58±1.13</td></tr><tr><td>HGMN (BiLSTM)</td><td>97.56±0.38</td><td>98.12±0.04</td><td>97.16±0.53</td><td>96.90±0.10</td><td>97.31±1.07</td><td>95.87±0.88</td></tr></table>
|
| 174 |
+
|
| 175 |
+
For the classification task of detecting whether two binary functions are similar or not, we measure the Area Under the ROC Curve (AUC) (Bradley, 1997) of different models for classifying graph pairs of the same test set, and summarize the results in Table 2.
|
| 176 |
+
|
| 177 |
+
The results show that our models clearly achieve state-of-the-art performance on all 6 sub-datasets for both FFmpeg and OpenSSL datasets. Both MPNGMN and HGMN models show better and more robust performance than the SimGNN and GMN baselines, particularly when the graph size of the two graphs increases. Compared with the SGNN (Max), our models (both MPNGMN and HGMN models) significantly outperform it, demonstrating the benefits of multi-perspective nodegraph matching mechanism that captures the cross-level interactions between node embeddings of a graph and graph-level embeddings of another graph. More experiments compared with SGNN models using other aggregation functions can be found in Appendix A.3.
|
| 178 |
+
|
| 179 |
+
# 4.3 COMPARISON ON GRAPH-GRAPH REGRESSION TASK
|
| 180 |
+
|
| 181 |
+
Table 3: Summary of regression results on AIDS700 and LINUX1000.
|
| 182 |
+
|
| 183 |
+
<table><tr><td>Datasets</td><td>Model</td><td>mse(10-)</td><td>p</td><td>T</td><td>p@10</td><td>p@20</td></tr><tr><td rowspan="5">AIDS700</td><td>SimGNN</td><td>1.376±0.066</td><td>0.824±0.009</td><td>0.665±0.011</td><td>0.400±0.023</td><td>0.489±0.024</td></tr><tr><td>GMN</td><td>4.610±0.365</td><td>0.672±0.036</td><td>0.497±0.032</td><td>0.200±0.018</td><td>0.263±0.018</td></tr><tr><td>SGNN (Max)</td><td>2.822±0.149</td><td>0.765±0.005</td><td>0.588±0.004</td><td>0.289±0.016</td><td>0.373±0.012</td></tr><tr><td>MPNGMN</td><td>1.191±0.048</td><td>0.904±0.003</td><td>0.749±0.005</td><td>0.465±0.011</td><td>0.538±0.007</td></tr><tr><td>HGMN (FCMax) HGMN (BiLSTM)</td><td>1.205±0.039</td><td>0.904±0.002</td><td>0.749±0.003</td><td>0.457±0.014</td><td>0.532±0.016</td></tr><tr><td rowspan="6">LINUX 1000</td><td></td><td>1.169±0.036</td><td>0.905±0.002</td><td>0.751±0.003</td><td>0.456±0.019</td><td>0.539±0.018</td></tr><tr><td>SimGNN</td><td>2.479±1.038</td><td>0.912±0.031</td><td>0.791±0.046</td><td>0.635±0.328</td><td>0.650±0.283</td></tr><tr><td>GMN</td><td>2.571±0.519</td><td>0.906±0.023</td><td>0.763±0.035</td><td>0.888±0.036</td><td>0.856±0.040</td></tr><tr><td>SGNN (Max)</td><td>11.832±0.698</td><td>0.566±0.022</td><td>0.404±0.017</td><td>0.226±0.106</td><td>0.492±0.190</td></tr><tr><td>MPNGMN</td><td>1.561±0.020</td><td>0.945±0.002</td><td>0.814±0.003</td><td>0.743±0.085</td><td>0.741±0.086</td></tr><tr><td>HGMN (FCMax) HGMN (BiLSTM)</td><td>1.575±0.627 0.439±0.143</td><td>0.946±0.019 0.985±0.005</td><td>0.817±0.034 0.919±0.016</td><td>0.807±0.117 0.955±0.011</td><td>0.784±0.108 0.943±0.014</td></tr></table>
|
| 184 |
+
|
| 185 |
+
For the regression task of computing the graph edit distance between two graphs, we evaluate the models using Mean Square Error (mse), Spearmans Rank Correlation Coefficient $( \rho )$ (Spearman, 1904), Kendalls Rank Correlation Coefficient $( \tau )$ (Kendall, 1938), and precision at k $( \boldsymbol { \mathrm { p } } @ \boldsymbol { \mathrm { k } } )$ . All results of both AIDS700 and LINUX1000 datasets are summarized in Table 3. In terms of all evaluation metrics, our models consistently outperform both SimGNN and GMN baseline models by a significant margin on both AIDS700 and LINUX1000 datasets. On the other hand, compared with SGNN (Max), our models achieve much better performance (see Appendix A.3 for more experiments compared with other SGNN models). The results highlight the importance of our multiperspective node-graph matching mechanism which could effectively capture cross-level node-graph interactions between parts of a graph and a whole graph.
|
| 186 |
+
|
| 187 |
+
Table 4: Classification results of Multi-Perspectives versus Multi-Heads in terms of AUC scores(%).
|
| 188 |
+
|
| 189 |
+
<table><tr><td rowspan="2">Model</td><td colspan="3">FFmpeg</td><td colspan="3">OpenSSL</td></tr><tr><td>[3,200]</td><td>[20,200]</td><td>[50,200]</td><td>[3,200]</td><td>[20,200]</td><td>[50,200]</td></tr><tr><td>Multi-Perspectives (d = 100)</td><td>97.73±0.11</td><td>98.29±0.21</td><td>96.81±0.96</td><td>96.56±0.12</td><td>97.60±0.29</td><td>92.89±1.31</td></tr><tr><td>Multi-Heads (K = 6)</td><td>91.18±5.91</td><td>77.49±5.21</td><td>68.15±6.97</td><td>92.81±5.21</td><td>85.43±5.76</td><td>56.87±7.53</td></tr></table>
|
| 190 |
+
|
| 191 |
+
4.4 FURTHER STUDY ON THE IMPACT OF DIFFERENT ATTENTION FUNCTIONS
|
| 192 |
+
|
| 193 |
+
We perform a further study on the impact of different attention functions for our proposed MPNGMN model. In particular, as we discussed in Sec. 3.2, the proposed multi-perspective matching function shares similar spirits with multi-head attention (Vaswani et al., 2017). Therefore, it is interesting to compare both attention functions in terms of AUC scores for graph-graph classification tasks. Interestingly, our proposed multi-perspective attention mechanism consistently outperforms these results of multi-head attention mechanism by quite a large margin. We suspect that our proposed multi-perspective attention uses vectors attention weights which may significantly reduce the potential overfitting. We also performed a study on the impact of the number of the perspectives on the performance and our model is not sensitive with this hyperparameter (see the appendix A.5).
|
| 194 |
+
|
| 195 |
+
# 4.5 FURTHER STUDY ON THE IMPACT OF DIFFERENT GNNS
|
| 196 |
+
|
| 197 |
+
Table 5: Classification results of different GNNs in terms of AUC scores $( \% )$ .
|
| 198 |
+
|
| 199 |
+
<table><tr><td rowspan="2">Model</td><td colspan="3">FFmpeg</td><td colspan="3">OpenSSL</td></tr><tr><td>[3,200]</td><td>[20,200]</td><td>[50,200]</td><td>[3,200]</td><td>[20,200]</td><td>[50,200]</td></tr><tr><td>MPNGMN-GCN (Our)</td><td>97.73±0.11</td><td>98.29±0.21</td><td>96.81±0.96</td><td>96.56±0.12</td><td>97.60±0.29</td><td>92.89±1.31</td></tr><tr><td>MPNGMN-GraphSAGE</td><td>97.31±0.56</td><td>98.21±0.13</td><td>97.88±0.15</td><td>96.13±0.30</td><td>97.30±0.72</td><td>93.66±3.87</td></tr><tr><td>MPNGMN-GIN</td><td>97.97±0.08</td><td>98.06±0.22</td><td>94.66±4.01</td><td>96.98±0.20</td><td>97.42±0.48</td><td>92.29±2.23</td></tr><tr><td>MPNGMN-GGNN</td><td>98.42±0.41</td><td>99.77±0.07</td><td>97.93±1.18</td><td>99.35±0.06</td><td>98.51±1.04</td><td>94.17±7.74</td></tr></table>
|
| 200 |
+
|
| 201 |
+
Table 6: Regression results of different GNNs on AIDS700 and LINUX1000.
|
| 202 |
+
|
| 203 |
+
<table><tr><td>Datasets</td><td>Model</td><td>mse(10-)</td><td>p</td><td>T</td><td>p@10</td><td>p@20</td></tr><tr><td rowspan="3">AIDS 700</td><td>MPNGMN-GCN (Our)</td><td>1.191±0.048</td><td>0.904±0.003</td><td>0.749±0.005</td><td>0.465±0.011</td><td>0.538±0.007</td></tr><tr><td>MPNGMN-(GraphSAGE)</td><td>1.275±0.054</td><td>0.901±0.006</td><td>0.745±0.008</td><td>0.448±0.016</td><td>0.533±0.014</td></tr><tr><td>MPNGMN-(GIN) MPNGMN-(GGNN)</td><td>1.367±0.085 1.870±0.082</td><td>0.889±0.008 0.871±0.004</td><td>0.729±0.010 0.706±0.005</td><td>0.400±0.022 0.388±0.015</td><td>0.492±0.021 0.457±0.017</td></tr><tr><td rowspan="3">LINUX 1000</td><td>MPNGMN-GCN (Our)</td><td>1.561±0.020</td><td>0.945±0.002</td><td>0.814±0.003</td><td>0.743±0.085</td><td>0.741±0.086</td></tr><tr><td>MPNGMN-GraphSAGE</td><td>2.784±0.705</td><td>0.915±0.019</td><td>0.767±0.028</td><td>0.682±0.183</td><td>0.693±0.167</td></tr><tr><td>MPNGMN-GIN MPNGMN-GGNN</td><td>1.126±0.164 2.068±0.991</td><td>0.963±0.006 0.938±0.028</td><td>0.858±0.015 0.815±0.055</td><td>0.792±0.068 0.628±0.189</td><td>0.821±0.035 0.654±0.176</td></tr></table>
|
| 204 |
+
|
| 205 |
+
We finally investigate the impact of different GNNs adopted by node embedding layers of our MPNGMN model for both classification and regression tasks. Following the same settings of our previous experiments, we only replace GCN with three variants: GraphSAGE (Hamilton et al., 2017), GIN (Xu et al., 2018a), and GGNN (Li et al., 2016), whose output dimensions are kept the same with GCN (i.e, 100) in our experiments. Note that, we do not fine-tune any hyper-parameter of the three GNN models, and their default hyper-parameters of these three GNNs are listed in Appendix A.2.2.
|
| 206 |
+
|
| 207 |
+
Table 5 and Table 6 present the results of GCN versus GraphSAGE/GIN/GGNN in MPNGMN for the classification and regression tasks, respectively. For all datasets of classification and regression tasks, the performance of different GNNs is quite similar. It indicates that our model is not sensitive to the choice of GNN models in node embedding layers. Moreover, we can see from Table 5 that MPNGMN models using GGNN perform even better than our default MPNGMN using GCN on both FFmpeg and OpenSSL datasets for the classification task. It is also observed from Table 6 that MPNGMN models using GIN also outperform our default model using GCN on LINUX1000 dataset for the regression task. These observations show that our model can be further improved by adopting more advanced GNN models or choosing the most appropriate GNN models according to different application tasks.
|
| 208 |
+
|
| 209 |
+
# 5 RELATED WORKS
|
| 210 |
+
|
| 211 |
+
Graph Neural Networks. Recently graph neural networks have been proven to be extremely effective and achieved promising results on various graph-structured based prediction tasks (Gao et al., 2019; Chen et al., 2019a). The main goal of graph neural networks is to learn node-level representations or (sub)graph-level representations for graph-structured data. There is a large body of GNN models (Scarselli et al., 2008; Li et al., 2016; Kipf & Welling, 2016; Hamilton et al., 2017; Velickovi ˇ c et al., 2017; Xu et al., 2018a) that have been proposed to learn node representations. With ´ the learned node representations, various tasks on graphs can be performed such as node classification and link prediction (Velickovi ˇ c et al., 2017; Zhang & Chen, 2018). In addition to learning node ´ representation, some studies try to extend pooling operations to GNNs (Ying et al., 2018; Gao & Ji, 2019; Lee et al., 2019; Ma et al., 2019). These pooling operations are expected to learn scaled-down graph representations from node representations, and can be trained in an end-to-end fashion. Recent works also exploit extending sequence-to-sequence model using bidirectional GNN for developing graph-to-sequence models in order to cope with graph inputs and show promising performance improvement (Xu et al., 2018b;c; Chen et al., 2019b) in various natural language processing tasks.
|
| 212 |
+
|
| 213 |
+
Conventional Graph Matching. In general, graph matching can be categorized into exact graph matching and error-tolerant graph matching. Exact graph matching aims to find a strict correspondence between two (in large parts) identical graphs being matched, while error-tolerant graph matching allows matching between completely nonidentical graphs (Riesen, 2015). In real-world applications, the constraint of exact graph matching is too rigid, and thus a large number of work has been proposed to solve the error-tolerant graph matching problem, which is usually quantified by a specific similarity metric. In fact, the matching similarity metrics can be defined by some measure of structure similarity like Graph Edit Distance (GED) (Gao et al., 2010), Maximum Common Subgraph (MCS) (Bunke, 1997), or even more coarse binary similarity, according to different application backgrounds. For GED and MCS, both of them are well-studies NP-hard problems (Bunke, 1997; McGregor, 1982), and thus suffer from exponential computational complexity and huge memory requirements for exact solutions in practice (Zeng et al., 2009; Blumenthal & Gamper, 2018).
|
| 214 |
+
|
| 215 |
+
Graph Similarity Computation and Graph Matching Networks. A popular line of research of graph matching focuses on developing approximations for graph similarity computations, in which most of them focus on improvements for better efficiency in computation (Gao et al., 2010; Zeng et al., 2009; Riesen, 2015; Wu et al., 2019; Yoshida et al., 2019). However, our solution is a learnable model based on GNN to approximate graph similarity in terms of GED and binary similarity for pairwise graph-based data.
|
| 216 |
+
|
| 217 |
+
The closely relevant work to our solution are two GNN based models: GMN (Li et al., 2019) and SimGNN (Bai et al., 2019). GMN directly updates the node representations of one graph by adding artificial attention-based connections for another graph. SimGNN considers the graph-level representation similarity as well as the histogram features from a pairwise node-level comparison to learn the graph similarity. However, these two models fail to capture different perspectives of graphstructured data between the pairs of graphs.
|
| 218 |
+
|
| 219 |
+
# 6 CONCLUSION AND FUTURE WORK
|
| 220 |
+
|
| 221 |
+
In this paper, we presented a novel Hierarchical Graph Matching Network (HGMN) for computing the graph similarity between any pair of graph-structured objects. Our model jointly learned graph embeddings and a data-driven graph matching metric for computing graph similarity in an end-to-end fashion. We further proposed a new multi-perspective node-graph matching network for effectively learning cross-level interactions between two graphs beyond low-level node-node and global-level graph-graph interactions. Our extensive experimental results correlated the superior performance compared with state-of-the-art baselines on both graph-graph classification and regression tasks.
|
| 222 |
+
|
| 223 |
+
One interesting future direction is to adapt our proposed HGMN model for solving different realworld applications such as unknown malware detection, text matching and entailment, and knowledge graph question answering.
|
| 224 |
+
|
| 225 |
+
# REFERENCES
|
| 226 |
+
|
| 227 |
+
Yunsheng Bai, Hao Ding, Song Bian, Ting Chen, Yizhou Sun, and Wei Wang. Simgnn: A neural network approach to fast graph similarity computation. In Proceedings of the Twelfth ACM International Conference on Web Search and Data Mining, pp. 384–392. ACM, 2019.
|
| 228 |
+
|
| 229 |
+
Luca Bertinetto, Jack Valmadre, Joao F Henriques, Andrea Vedaldi, and Philip HS Torr. Fullyconvolutional siamese networks for object tracking. In European conference on computer vision, pp. 850–865. Springer, 2016.
|
| 230 |
+
|
| 231 |
+
David B Blumenthal and Johann Gamper. On the exact computation of the graph edit distance. Pattern Recognition Letters, 2018.
|
| 232 |
+
|
| 233 |
+
Andrew P Bradley. The use of the area under the roc curve in the evaluation of machine learning algorithms. Pattern Recognition, 1997.
|
| 234 |
+
|
| 235 |
+
Jane Bromley, Isabelle Guyon, Yann LeCun, Eduard Sackinger, and Roopak Shah. Signature verifi- ¨ cation using a” siamese” time delay neural network. In Advances in neural information processing systems, pp. 737–744, 1994.
|
| 236 |
+
|
| 237 |
+
Michael M Bronstein, Joan Bruna, Yann LeCun, Arthur Szlam, and Pierre Vandergheynst. Geometric deep learning: going beyond euclidean data. IEEE Signal Processing Magazine, 34(4):18–42, 2017.
|
| 238 |
+
|
| 239 |
+
Horst Bunke. On a relation between graph edit distance and maximum common subgraph. Pattern Recognition Letters, 18(8):689–694, 1997.
|
| 240 |
+
|
| 241 |
+
Horst Bunke and Gudrun Allermann. Inexact graph matching for structural pattern recognition. Pattern Recognition Letters, 1(4):245–253, 1983.
|
| 242 |
+
|
| 243 |
+
Tiberio S Caetano, Julian J McAuley, Li Cheng, Quoc V Le, and Alex J Smola. Learning graph ´ matching. IEEE transactions on pattern analysis and machine intelligence, 31(6):1048–1058, 2009.
|
| 244 |
+
|
| 245 |
+
Ushasi Chaudhuri, Biplab Banerjee, and Avik Bhattacharya. Siamese graph convolutional network for content based remote sensing image retrieval. Computer Vision and Image Understanding, 184:22–30, 2019.
|
| 246 |
+
|
| 247 |
+
Yu Chen, Lingfei Wu, and Mohammed J Zaki. Graphflow: Exploiting conversation flow with graph neural networks for conversational machine comprehension. arXiv preprint arXiv:1908.00059, 2019a.
|
| 248 |
+
|
| 249 |
+
Yu Chen, Lingfei Wu, and Mohammed J Zaki. Reinforcement learning based graph-to-sequence model for natural question generation. arXiv preprint arXiv:1908.04942, 2019b.
|
| 250 |
+
|
| 251 |
+
Steven HH Ding, Benjamin CM Fung, and Philippe Charland. Asm2vec: Boosting static representation robustness for binary clone search against code obfuscation and compiler optimization. In IEEE Symposium on Security and Privacy (S&P) 2019, 2019.
|
| 252 |
+
|
| 253 |
+
Qian Feng, Rundong Zhou, Chengcheng Xu, Yao Cheng, Brian Testa, and Heng Yin. Scalable graph-based bug search for firmware images. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, 2016.
|
| 254 |
+
|
| 255 |
+
Hongyang Gao and Shuiwang Ji. Graph u-nets. arXiv preprint arXiv:1905.05178, 2019.
|
| 256 |
+
|
| 257 |
+
Xinbo Gao, Bing Xiao, Dacheng Tao, and Xuelong Li. A survey of graph edit distance. Pattern Analysis and applications, 13(1):113–129, 2010.
|
| 258 |
+
|
| 259 |
+
Yuyang Gao, Lingfei Wu, Houman Homayoun, and Liang Zhao. Dyngraph2seq: Dynamic-graph-tosequence interpretable learning for health stage prediction in online health forums. arXiv preprint arXiv:1908.08497, 2019.
|
| 260 |
+
|
| 261 |
+
Michelle Guo, Edward Chou, De-An Huang, Shuran Song, Serena Yeung, and Li Fei-Fei. Neural graph matching networks for fewshot 3d action recognition. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 653–669, 2018.
|
| 262 |
+
|
| 263 |
+
Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Advances in Neural Information Processing Systems, 2017.
|
| 264 |
+
|
| 265 |
+
Peter E Hart, Nils J Nilsson, and Bertram Raphael. A formal basis for the heuristic determination of minimum cost paths. IEEE transactions on Systems Science and Cybernetics, 4(2):100–107, 1968.
|
| 266 |
+
|
| 267 |
+
Hua He, Kevin Gimpel, and Jimmy Lin. Multi-perspective sentence similarity modeling with convolutional neural networks. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pp. 1576–1586, 2015.
|
| 268 |
+
|
| 269 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997a.
|
| 270 |
+
|
| 271 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 1997b.
|
| 272 |
+
|
| 273 |
+
Maurice G Kendall. A new measure of rank correlation. Biometrika, 1938.
|
| 274 |
+
|
| 275 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 276 |
+
|
| 277 |
+
Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016.
|
| 278 |
+
|
| 279 |
+
Junhyun Lee, Inyeop Lee, and Jaewoo Kang. Self-attention graph pooling. arXiv preprint arXiv:1904.08082, 2019.
|
| 280 |
+
|
| 281 |
+
Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. Gated graph sequence neural networks. International Conference on Learning Representations, 2016.
|
| 282 |
+
|
| 283 |
+
Yujia Li, Oriol Vinyals, Chris Dyer, Razvan Pascanu, and Peter Battaglia. Learning deep generative models of graphs. arXiv preprint arXiv:1803.03324, 2018.
|
| 284 |
+
|
| 285 |
+
Yujia Li, Chenjie Gu, Thomas Dullien, Oriol Vinyals, and Pushmeet Kohli. Graph matching networks for learning the similarity of graph structured objects. ICML, 2019.
|
| 286 |
+
|
| 287 |
+
Yao Ma, Suhang Wang, Charu C Aggarwal, and Jiliang Tang. Graph convolutional networks with eigenpooling. arXiv preprint arXiv:1904.13107, 2019.
|
| 288 |
+
|
| 289 |
+
James J McGregor. Backtrack search algorithms and the maximal common subgraph problem. Software: Practice and Experience, 12(1):23–34, 1982.
|
| 290 |
+
|
| 291 |
+
Jonas Mueller and Aditya Thyagarajan. Siamese recurrent architectures for learning sentence similarity. In Thirtieth AAAI Conference on Artificial Intelligence, 2016.
|
| 292 |
+
|
| 293 |
+
Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch, 2017.
|
| 294 |
+
|
| 295 |
+
Kaspar Riesen. Structural pattern recognition with graph edit distance. In Advances in computer vision and pattern recognition. Springer, 2015.
|
| 296 |
+
|
| 297 |
+
Kaspar Riesen, Xiaoyi Jiang, and Horst Bunke. Exact and inexact graph matching: Methodology and applications. In Managing and Mining Graph Data, pp. 217–247. Springer, 2010.
|
| 298 |
+
|
| 299 |
+
Kaspar Riesen, Sandro Emmenegger, and Horst Bunke. A novel software toolkit for graph edit distance computation. In International Workshop on Graph-Based Representations in Pattern Recognition, pp. 142–151. Springer, 2013.
|
| 300 |
+
|
| 301 |
+
Bidisha Samanta, Abir De, Niloy Ganguly, and Manuel Gomez-Rodriguez. Designing random graph models using variational autoencoders with applications to chemical design. arXiv preprint arXiv:1802.05283, 2018.
|
| 302 |
+
|
| 303 |
+
Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 20(1):61–80, 2008.
|
| 304 |
+
|
| 305 |
+
Martin Simonovsky and Nikos Komodakis. Graphvae: Towards generation of small graphs using variational autoencoders. arXiv preprint arXiv:1802.03480, 2018.
|
| 306 |
+
|
| 307 |
+
C Spearman. The proof and measurement of association between two things. American Journal of Psychology, 1904.
|
| 308 |
+
|
| 309 |
+
Julian R Ullmann. An algorithm for subgraph isomorphism. Journal of the ACM (JACM), 23(1): 31–42, 1976.
|
| 310 |
+
|
| 311 |
+
Rahul Rama Varior, Mrinal Haloi, and Gang Wang. Gated siamese convolutional neural network architecture for human re-identification. In European conference on computer vision, pp. 791– 808. Springer, 2016.
|
| 312 |
+
|
| 313 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017.
|
| 314 |
+
|
| 315 |
+
Petar Velickovi ˇ c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Li ´ o, and Yoshua \` Bengio. Graph attention networks. arXiv preprint arXiv:1710.10903, 2017.
|
| 316 |
+
|
| 317 |
+
Mingzhe Wang, Yihe Tang, Jian Wang, and Jia Deng. Premise selection for theorem proving by deep graph embedding. In Advances in Neural Information Processing Systems, pp. 2786–2796, 2017.
|
| 318 |
+
|
| 319 |
+
Shen Wang, Zhengzhang Chen, Xiao Yu, Ding Li, Jingchao Ni, Lu-An Tang, Jiaping Gui, Zhichun Li, Haifeng Chen, and Philip S Yu. Heterogeneous graph matching networks for unknown malware detection. In Proceedings of International Joint Conference on Artificial Intelligence, 2019.
|
| 320 |
+
|
| 321 |
+
Xiaoli Wang, Xiaofeng Ding, Anthony KH Tung, Shanshan Ying, and Hai Jin. An efficient graph indexing method. In 2012 IEEE 28th International Conference on Data Engineering, 2012.
|
| 322 |
+
|
| 323 |
+
Lingfei Wu, Ian En-Hsu Yen, Zhen Zhang, Kun Xu, Liang Zhao, Xi Peng, Yinglong Xia, and Charu Aggarwal. Scalable global alignment graph kernel using random features: From node embedding to graph embedding. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 1418–1428, 2019.
|
| 324 |
+
|
| 325 |
+
Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? arXiv preprint arXiv:1810.00826, 2018a.
|
| 326 |
+
|
| 327 |
+
Kun Xu, Lingfei Wu, Zhiguo Wang, and Vadim Sheinin. Graph2seq: Graph to sequence learning with attention-based neural networks. arXiv preprint arXiv:1804.00823, 2018b.
|
| 328 |
+
|
| 329 |
+
Kun Xu, Lingfei Wu, Zhiguo Wang, Mo Yu, Liwei Chen, and Vadim Sheinin. Exploiting rich syntactic information for semantic parsing with graph-to-sequence model. arXiv preprint arXiv:1808.07624, 2018c.
|
| 330 |
+
|
| 331 |
+
Xiaojun Xu, Chang Liu, Qian Feng, Heng Yin, Le Song, and Dawn Song. Neural network-based graph embedding for cross-platform binary code similarity detection. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, 2017.
|
| 332 |
+
|
| 333 |
+
Xifeng Yan and Jiawei Han. gspan: Graph-based substructure pattern mining. In Proceedings of IEEE International Conference on Data Mining, pp. 721–724. IEEE, 2002.
|
| 334 |
+
|
| 335 |
+
Zhitao Ying, Jiaxuan You, Christopher Morris, Xiang Ren, Will Hamilton, and Jure Leskovec. Hierarchical graph representation learning with differentiable pooling. In Advances in Neural Information Processing Systems, pp. 4800–4810, 2018.
|
| 336 |
+
|
| 337 |
+
Tomoki Yoshida, Ichiro Takeuchi, and Masayuki Karasuyama. Learning interpretable metric between graphs: Convex formulation and computation with graph mining. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 1026–1036. ACM, 2019.
|
| 338 |
+
|
| 339 |
+
Jiaxuan You, Rex Ying, Xiang Ren, William L Hamilton, and Jure Leskovec. Graphrnn: Generating realistic graphs with deep auto-regressive models. arXiv preprint arXiv:1802.08773, 2018.
|
| 340 |
+
|
| 341 |
+
Zhiping Zeng, Anthony KH Tung, Jianyong Wang, Jianhua Feng, and Lizhu Zhou. Comparing stars: On approximating graph edit distance. Proceedings of the VLDB Endowment, 2(1):25–36, 2009.
|
| 342 |
+
|
| 343 |
+
Chuxu Zhang, Dongjin Song, Chao Huang, Ananthram Swami, and Nitesh V. Chawla. Heterogeneous graph neural network. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, 2019.
|
| 344 |
+
|
| 345 |
+
Muhan Zhang and Yixin Chen. Link prediction based on graph neural networks. In Advances in Neural Information Processing Systems, pp. 5165–5175, 2018.
|
| 346 |
+
|
| 347 |
+
# A APPENDIX
|
| 348 |
+
|
| 349 |
+
# A.1 DATASETS
|
| 350 |
+
|
| 351 |
+
# A.1.1 CLASSIFICATION DATASETS
|
| 352 |
+
|
| 353 |
+
It is noted that one source code function, after compiled with different settings (architectures, compilers, optimization levels, etc), can generate various binary functions with different control flow graphs.
|
| 354 |
+
|
| 355 |
+
For FFmpeg dataset, we prepare the corresponding control flow graphs dataset as the benchmark dataset to detect binary function similarity. First, we compile FFmpeg 4.1.4 using 2 different compilers gcc 5.4.0 and clang 3.8.0, and 4 different compiler optimization levels (O0-O3), and generate 8 different binaries files. Second, these 8 generated binaries are disassembled using IDA Pro,3 which can produce CFGs for all disassembled functions. Finally, for each basic block in CFGs, we extract 6 block-level numeric features as the initial node representation based on IDAPython (a python-based plugin in IDA Pro).
|
| 356 |
+
|
| 357 |
+
OpenSSL is built from OpenSSL (v1.0.1f and v1.0.1u) using gcc 5.4 in 3 different architectures (x86, MIPS, and ARM), and 4 different optimization levels (O0-O3). The OpenSSL dataset we evaluate is previously released by (Xu et al., 2017) and public available4 with prepared 6 block-level numeric features.
|
| 358 |
+
|
| 359 |
+
Overall, for both FFmpeg and OpenSSL, each node in the control flow graphs are initialized with 6 block-level numeric features: # of string constants, $\#$ of numeric constants, # of total instructions, # of transfer instructions, $\#$ of call instructions, and $\#$ of arithmetic instructions.
|
| 360 |
+
|
| 361 |
+
# A.1.2 REGRESSION DATASETS
|
| 362 |
+
|
| 363 |
+
Instead of directly computing the GED between two graphs $G ^ { 1 }$ and $G ^ { 2 }$ , we try to learn a similarity score $s ( G ^ { 1 } , G ^ { 2 } )$ , which is the normalized exponential of GED in the range of $( 0 , 1 ]$ . To be specific, $\begin{array} { r } { s ( G ^ { 1 } , G ^ { 2 } ) \ = \ e x p ^ { - n o r m G E D ( G ^ { 1 } , G ^ { 2 } ) } , n o r m G E D ( G ^ { 1 } , G ^ { 2 } ) \ = \ \frac { G E D ( G ^ { 1 } , G ^ { 2 } ) } { ( | G ^ { 1 } | + | G ^ { 2 } | ) / 2 } } \end{array}$ , where $| G ^ { 1 } |$ or $| G ^ { 2 } |$ denotes the number of nodes of $G ^ { 1 }$ or $G ^ { 2 }$ , and $n o r m G E D ( G ^ { 1 } , \dot { G } ^ { 2 } )$ or $G \bar { E } D ( G ^ { 1 } , G ^ { 2 } )$ denotes the normalized/un-normalized GED between $G ^ { 1 }$ and $G ^ { 2 }$ .
|
| 364 |
+
|
| 365 |
+
We employ both AIDS700 and LINUX1000 released by (Bai et al., 2019), which are public available.5 Each dataset contains a set of graph pairs as well as their ground-truth GED scores, which are computed by exponential-time exact GED computation algorithm $A ^ { * }$ (Hart et al., 1968; Riesen et al., 2013). As the ground-truth GEDs of another dataset IMDB-MULTI is provided with in-exact approximation, we thus do not consider this dataset in our experiments.
|
| 366 |
+
|
| 367 |
+
AIDS700 is a subset of AIDS dataset, a collection of AIDS antiviral screen chemical compounds from Development Therapeutics Program (DTP) in the National Cancer Institute (NCI).6 Originally, AIDS dataset contains 42687 chemical compounds, where each of them can be represented as a graph with atoms as node and bonds as edges. To avoid calculating the ground-truth GED between two graphs with a large number of nodes, Bai et al. (2019) create the AIDS700 dataset that contains 700 graphs with 10 or fewer nodes. For each graph in AIDS700, every node is labeled with the element type of its atom and every edge is unlabeled (i.e., bonds features are ignored).
|
| 368 |
+
|
| 369 |
+
LINUX1000 is also a subset dataset of Linux that introduced in Wang et al. (2012). The original Linux dataset is a collection of 48747 program dependence graphs generated from Linux kernel. In this case, each graph is a static representation of data flow and control dependency within one function, with each node assigned to one statement and each edge describing the dependency between two statements. For the same reason as above that avoiding calculating the ground-truth GED between two graphs with a large number of nodes, the LINUX1000 dataset used in Bai et al. (2019) is randomly selected and contains 1000 graphs with 10 or fewer nodes. For each graph in LINUX1000, both nodes and edges are unlabeled.
|
| 370 |
+
|
| 371 |
+
For both classification and regression datasets, Table 7 provides more detailed statistics.
|
| 372 |
+
|
| 373 |
+
Table 7: Summary statistics of datasets for both classification & regression tasks.
|
| 374 |
+
|
| 375 |
+
<table><tr><td rowspan=1 colspan=1>Tasks</td><td rowspan=1 colspan=1>Datasets</td><td rowspan=1 colspan=1>Sub-datasets</td><td rowspan=1 colspan=1>#ofGraphs</td><td rowspan=1 colspan=1>#ofFunctions</td><td rowspan=1 colspan=1>#of Nodes(Min/Max/AVG)</td><td rowspan=1 colspan=1># of Edges(Min/Max/AVG)</td><td rowspan=1 colspan=1>AVG#ofDegrees(Min/Max/AVG)</td></tr><tr><td rowspan=2 colspan=1>classif-ication</td><td rowspan=1 colspan=1>FFmpeg</td><td rowspan=1 colspan=1>[3,200][20,200][50,200]</td><td rowspan=1 colspan=1>830083169610824</td><td rowspan=1 colspan=1>1037676683178</td><td rowspan=1 colspan=1>(3/200/18.83)(20/200/51.02)(50/200/90.93)</td><td rowspan=1 colspan=1>(2/332/27.02)(20/352/75.88)(52/352/136.83)</td><td rowspan=1 colspan=1>(1.25/4.33/2.59)(1.90/4.33/2.94)(2.00/4.33/3.00)</td></tr><tr><td rowspan=1 colspan=1>OpenSSL</td><td rowspan=1 colspan=1>[3,200][20,200][50,200]</td><td rowspan=1 colspan=1>73953158004308</td><td rowspan=1 colspan=1>42491073338</td><td rowspan=1 colspan=1>(3/200/15.73)(20/200/44.89)(50/200/83.68)</td><td rowspan=1 colspan=1>(1/376/21.97)(2/376/67.15)(52/376/127.75)</td><td rowspan=1 colspan=1>(0.12/3.95/2.44)(0.12/3.95/2.95)(2.00/3.95/3.04)</td></tr><tr><td rowspan=2 colspan=1>regre-ssion</td><td rowspan=1 colspan=1>AIDS700</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>700</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>(2/10/8.90)</td><td rowspan=1 colspan=1>(1/14/8.80)</td><td rowspan=1 colspan=1>(1.00/2.80/1.96)</td></tr><tr><td rowspan=1 colspan=1>LINUX1000</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1000</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>(4/10/7.58)</td><td rowspan=1 colspan=1>(3/13/6.94)</td><td rowspan=1 colspan=1>(1.50/2.60/1.81)</td></tr></table>
|
| 376 |
+
|
| 377 |
+
# A.2 MORE EXPERIMENTAL SETUP FOR MODELS
|
| 378 |
+
|
| 379 |
+
# A.2.1 MORE EXPERIMENTAL SETUP FOR BASELINE METHODS
|
| 380 |
+
|
| 381 |
+
We modified some experimental settings in baselines to fit specific tasks. Detailed settings are given in the following.
|
| 382 |
+
|
| 383 |
+
SimGNN: For regression task, we set batch size to 128 and trained the model for 10000 iterations. We used MSE loss as the training loss and set learning rate to $1 . 0 \times 1 0 ^ { - 3 }$ . Validation starts at the 9000-th iteration and is performed every 50 iterations. The best model among all the validation runs is used for the testing phase. As for the model structure, we used 3 GCNs in the first place to propagate node features, whose output dimension is set to 64, 64, and 32 respectively. Then we applied an ANPM layer implemented by author of SimGNN to perform graph-level interaction. The pair feature vector generated by this layer then passes 4 fully-connected layers and finally a 1-D scalar, which is the predicted similarity score. For classification task, we modified the training settings so now the model is trained in epoches with the same learning rate and the batch size becomes 5. Validation is carried out every iteration and the best model is saved at this time. For training loss, we used Cross-Entropy loss and applied the same learning rate as that in regression task. The model structure is the same as that in regression task except that the final output dimension of fully-connected layers is 2, the softmax of which is the predicted label and is compared with ground truth label in one-hot encoding to get the Cross-Entropy loss.
|
| 384 |
+
|
| 385 |
+
GMN: For classification task, we trained the model for 100 epoches where validation is carried out per epoch. We set batch size to 10 and learning rate to $1 . 0 \times 1 \bar { 0 } ^ { - 3 }$ . We set node feature dimension to 32 and graph representation dimension to 128. As for mode structure, we used 1-layer MLP as node encoder which encodes the initial node features to node states $h _ { i } ^ { ( 0 ) }$ . Then there are 5 propagation layers with the same structure as mentioned in the original paper (Li et al. (2019)). Besides, in this task we applied the pairwise loss based on hamming similarity defined by the author in paper. For regression task, we concatenated representation vectors of 2 graphs in the pair and passed it to a 4-layer MLP to get similarity score. As for training, we set batch size to 128 and used the same training strategy as that in the regression task of SimGNN. MSE loss is applied in this task for learning. Other settings remain the same as in classification task.
|
| 386 |
+
|
| 387 |
+
# A.2.2 MORE EXPERIMENTAL SETUP FOR DIFFERENT GNNS
|
| 388 |
+
|
| 389 |
+
When performing experiments to see how different GNNs affect performance of MPNGMN model, we only replace GCN with GraphSAGE, GIN, and GGNN using the geometric deep learning library - PyTorch Geometric7. More specifically, for GraphSAGE, we used a 3-layer GraphSAGE GNN with their output dimensions all set to 100. For GIN, we used 3 GIN modules with a 1-layer MLP with output dimension 100 as the learnable function. For GGNN, we used 3 one-layer propagation models to replace the 3 GCNs in our original setting and also set their output dimensions to 100.
|
| 390 |
+
|
| 391 |
+
# A.3 MORE EXPERIMENTS OF THE SGNN MODEL WITH DIFFERENT AGGREGATION FUNCTIONS FOR BOTH CLASSIFICATION & REGRESSION TASKS
|
| 392 |
+
|
| 393 |
+
To further compare our models with SGNN models, we train and evaluate several SGNN models with different aggregation functions, such as Max, FCMax, Avg, FCAvg, and BiLSTM. Both classification results and regression results are summarized in Table 8 and Table 9. For both classification and regression tasks, our models show statistically significantly improvement over all SGNN models with different aggregation functions, which indicates the advantage of multi-perspective node-graph matching network that adopted in our model.
|
| 394 |
+
|
| 395 |
+
Table 8: Classification results of SGNN models with different aggregation functions VS. our MPNGMN and HGMN models in term of AUC scores $( \% )$ .
|
| 396 |
+
|
| 397 |
+
<table><tr><td rowspan="2">Model</td><td colspan="3">FFmpeg</td><td colspan="3">OpenSSL</td></tr><tr><td>[3,200]</td><td>[20,200]</td><td>[50,200]</td><td>[3,200]</td><td>[20,200]</td><td>[50,200]</td></tr><tr><td>SGNN (BiLSTM)</td><td>96.92±0.13</td><td>97.62±0.13</td><td>96.35±0.33</td><td>95.24±0.06</td><td>96.30±0.27</td><td>93.99±0.62</td></tr><tr><td>SGNN (Max)</td><td>93.92±0.07</td><td>93.82±0.28</td><td>85.15±1.39</td><td>91.07±0.10</td><td>88.94±0.47</td><td>82.10±0.51</td></tr><tr><td>SGNN (FCMax)</td><td>95.37±0.04</td><td>96.29±0.14</td><td>95.98±0.32</td><td>92.64±0.15</td><td>93.79±0.17</td><td>93.21±0.82</td></tr><tr><td>SGNN (Avg)</td><td>95.61±0.05</td><td>96.09±0.05</td><td>96.70±0.13</td><td>92.89±0.09</td><td>93.90±0.24</td><td>94.12±0.35</td></tr><tr><td>SGNN (FCAvg)</td><td>95.18±0.03</td><td>95.74±0.15</td><td>96.43±0.16</td><td>92.70±0.09</td><td>93.72±0.19</td><td>93.49±0.30</td></tr><tr><td>MPNGMN</td><td>97.73±0.11</td><td>98.29±0.21</td><td>96.81±0.96</td><td>96.56±0.12</td><td>97.60±0.29</td><td>92.89±1.31</td></tr><tr><td>HGMN (Max)</td><td>97.44±0.32</td><td>97.84±0.40</td><td>97.22±0.36</td><td>94.77±1.80</td><td>97.44±0.26</td><td>94.06±1.60</td></tr><tr><td>HGMN (FCMax)</td><td>98.07±0.06</td><td>98.29±0.10</td><td>97.83±0.11</td><td>96.87±0.24</td><td>97.59±0.24</td><td>95.58±1.13</td></tr><tr><td>HGMN (BiLSTM)</td><td>97.56±0.38</td><td>98.12±0.04</td><td>97.16±0.53</td><td>96.90±0.10</td><td>97.31±1.07</td><td>95.87±0.88</td></tr></table>
|
| 398 |
+
|
| 399 |
+
Table 9: Results of SGNN models with different aggregation functions VS. our MPNGMN and HGMN models on AIDS700 and LINUX1000.
|
| 400 |
+
|
| 401 |
+
<table><tr><td>Datasets</td><td>Model</td><td>mse(10-3)</td><td>p</td><td>T</td><td>p@10</td><td>p@20</td></tr><tr><td rowspan="3">AIDS700</td><td rowspan="3">SGNN (BiLSTM) SGNN (Max) SGNN (FCMax) SGNN (Avg)</td><td rowspan="3">1.422±0.044 2.822±0.149 3.114±0.114</td><td>0.881±0.005 0.765±0.005</td><td>0.718±0.006</td><td>0.376±0.020</td><td>0.472±0.014</td></tr><tr><td></td><td>0.588±0.004</td><td>0.289±0.016</td><td>0.373±0.012</td></tr><tr><td>0.735±0.009 1.453±0.015 0.876±0.002</td><td>0.554±0.008 0.712±0.002</td><td>0.278±0.021 0.353±0.007</td><td>0.364±0.017 0.444±0.012</td></tr><tr><td rowspan="4"></td><td>SGNN (FCAvg) MPNGMN</td><td>1.658±0.067 1.191±0.048</td><td>0.857±0.007 0.904±0.003</td><td>0.689±0.008 0.749±0.005</td><td>0.305±0.018 0.465±0.011</td><td>0.399±0.021 0.538±0.007</td></tr><tr><td>HGMN (Max)</td><td>1.210±0.020</td><td>0.900±0.002</td><td>0.743±0.003</td><td>0.461±0.012</td><td>0.534±0.009</td></tr><tr><td>HGMN (FCMax)</td><td>1.205±0.039</td><td>0.904±0.002</td><td>0.749±0.003</td><td>0.457±0.014</td><td>0.532±0.016</td></tr><tr><td>HGMN (BiLSTM)</td><td>1.169±0.036</td><td>0.905±0.002</td><td>0.751±0.003</td><td>0.456±0.019</td><td>0.539±0.018</td></tr><tr><td rowspan="6">LINUX 1000</td><td>SGNN (BiLSTM)</td><td>2.140±1.668</td><td>0.935±0.050</td><td>0.825±0.100</td><td>0.978±0.012</td><td>0.965±0.007</td></tr><tr><td>SGNN (Max)</td><td>11.832±0.698</td><td>0.566±0.022</td><td>0.404±0.017</td><td>0.226±0.106</td><td>0.492±0.190</td></tr><tr><td>SGNN (FCMax)</td><td>17.795±0.406</td><td>0.362±0.021</td><td>0.252±0.015</td><td>0.239±0.000</td><td>0.241±0.000</td></tr><tr><td>SGNN (Avg)</td><td>2.343±0.453</td><td>0.933±0.012</td><td>0.790±0.017</td><td>0.778±0.048</td><td>0.811±0.050</td></tr><tr><td>SGNN (FCAvg)</td><td>3.211±0.318</td><td>0.909±0.004</td><td>0.757±0.008</td><td>0.831±0.163</td><td>0.813±0.159</td></tr><tr><td>MPNGMN</td><td>1.561±0.020</td><td>0.945±0.002</td><td>0.814±0.003</td><td>0.743±0.085</td><td>0.741±0.086</td></tr><tr><td rowspan="4"></td><td>HGMN (Max)</td><td>1.054±0.086</td><td>0.962±0.003</td><td>0.850±0.008</td><td>0.877±0.054</td><td>0.883±0.047</td></tr><tr><td>HGMN (FCMax)</td><td>1.575±0.627</td><td>0.946±0.019</td><td>0.817±0.034</td><td>0.807±0.117</td><td>0.784±0.108</td></tr><tr><td>HGMN (BiLSTM)</td><td>0.439±0.143</td><td>0.985±0.005</td><td>0.919±0.016</td><td>0.955±0.011</td><td>0.943±0.014</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 402 |
+
|
| 403 |
+
# A.4 MORE EXPERIMENTS OF THE MPNGMN MODEL WITH DIFFERENT AGGREGATION FUNCTIONS FOR BOTH CLASSIFICATION & REGRESSION TASKS
|
| 404 |
+
|
| 405 |
+
We investigate the impact of different aggregation functions adopted by Aggregation Layers of the MPNGMN model for both classification and regression tasks. Following the default and same settings of previous experiments, we only change the aggregation layer of MPNGMN and use five possible aggregation functions: Max, FCMax, Avg, FCAvg, LSTM, and BiLSTM. As can be observed from Table 10 and Table 11, BiLSTM offers superior performance over all datasets of both classification and regression tasks in terms of most evaluation metrics. Therefore, we take BiLSTM as the default aggregation function for MPNGMN, and fix it for the MPNGMN part in HGMN models.
|
| 406 |
+
|
| 407 |
+
Table 10: Classification results of MPNGMN models with different aggregation functions in term of AUC scores $( \% )$ .
|
| 408 |
+
|
| 409 |
+
<table><tr><td rowspan="2">Model</td><td colspan="3">FFmpeg</td><td colspan="3">OpenSSL</td></tr><tr><td>[3,200]</td><td>[20,200]</td><td>[50,200]</td><td>[3,200]</td><td>[20,200]</td><td>[50,200]</td></tr><tr><td>MPNGMN (Max)</td><td>73.74±8.30</td><td>73.85±1.76</td><td>77.72±2.07</td><td>67.14±2.70</td><td>63.31±3.29</td><td>63.02±2.77</td></tr><tr><td>MPNGMN (FCMax)</td><td>97.28±0.08</td><td>96.61±0.17</td><td>96.65±0.30</td><td>95.37±0.19</td><td>96.08±0.48</td><td>95.90±0.73</td></tr><tr><td>MPNGMN (Avg)</td><td>85.92±1.07</td><td>83.29±4.49</td><td>85.52±1.42</td><td>80.10±4.59</td><td>70.81±3.41</td><td>66.94±4.33</td></tr><tr><td>MPNGMN (FCAvg)</td><td>95.93±0.21</td><td>73.90±0.70</td><td>94.22±0.06</td><td>93.38±0.80</td><td>94.52±1.16</td><td>94.71±0.86</td></tr><tr><td>MPNGMN (LSTM)</td><td>97.16±0.42</td><td>97.02±0.99</td><td>84.65±6.73</td><td>96.30±0.69</td><td>97.51±0.82</td><td>89.41±8.40</td></tr><tr><td>MPNGMN (BiLSTM)</td><td>97.73±0.11</td><td>98.29±0.21</td><td>96.81±0.96</td><td>96.56±0.12</td><td>97.60±0.29</td><td>92.89±1.31</td></tr></table>
|
| 410 |
+
|
| 411 |
+
Table 11: Regression results of MPNGMN models with different aggregation functions on AIDS700 and LINUX1000.
|
| 412 |
+
|
| 413 |
+
<table><tr><td>Datasets</td><td>Model</td><td>mse(10-3)</td><td>p</td><td>T</td><td>p@10</td><td>p@20</td></tr><tr><td rowspan="4">AIDS 700</td><td>MPNGMN (Max)</td><td>2.378±0.244 2.220±1.547</td><td>0.813±0.015 0.808±0.145</td><td>0.642±0.013 0.656±0.122</td><td>0.578±0.199 0.425±0.078</td><td>0.583±0.169 0.504±0.064</td></tr><tr><td>MPNGMN (FCMax) MPNGMN (Avg)</td><td>1.524±0.161</td><td>0.880±0.010</td><td>0.717±0.012</td><td>0.408±0.044</td><td>0.474±0.027</td></tr><tr><td>MPNGMN (FCAvg)</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>MPNGMN (LSTM)</td><td>1.281±0.075 1.290±0.037</td><td>0.895±0.006 0.895±0.004</td><td>0.737±0.008 0.737±0.005</td><td>0.453±0.015 0.448±0.007</td><td>0.527±0.016 0.520±0.012</td></tr><tr><td rowspan="6">LINUX</td><td>MPNGMN(BiLSTM)</td><td>1.191±0.048</td><td>0.904±0.003</td><td>0.749±0.005</td><td>0.465±0.011</td><td>0.538±0.007</td></tr><tr><td>MPNGMN(Max)*</td><td>16.921±0.000</td><td></td><td></td><td></td><td></td></tr><tr><td>MPNGMN (FCMax)</td><td>4.793±0.262</td><td>0.829±0.006</td><td>0.665±0.011</td><td>0.764±0.170</td><td>0.767±0.166</td></tr><tr><td>MPNGMN (Avg)</td><td>4.050±0.594</td><td>0.888±0.008</td><td>0.719±0.012</td><td>0.501±0.093</td><td>0.536±0.112</td></tr><tr><td>MPNGMN (FCAvg)</td><td>6.953±0.195</td><td>0.897±0.004</td><td>0.736±0.005</td><td>0.499±0.126</td><td>0.509±0.129</td></tr><tr><td rowspan="4">1000</td><td>MPNGMN (LSTM)</td><td>1.535±0.096</td><td>0.945±0.004</td><td>0.813±0.007</td><td>0.695±0.064</td><td>0.698±0.081</td></tr><tr><td>MPNGMN(BiLSTM)</td><td>1.561±0.020</td><td>0.945±0.002</td><td>0.814±0.003</td><td>0.743±0.085</td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td>0.741±0.086</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 414 |
+
|
| 415 |
+
\* As all duplicated experiments running on this setting do not converge in their training processes, their corresponding result metrics cannot be calculated.
|
| 416 |
+
|
| 417 |
+
# A.5 MORE EXPERIMENTS OF THE MPNGMN MODEL WITH DIFFERENT NUMBER OF PERSPECTIVES FOR THE CLASSIFICATION TASK
|
| 418 |
+
|
| 419 |
+
We further investigate the impact of different number of perspectives adopted by the NodeGraph Matching Layer of the MPNGMN model for classification tasks. Following the default and same settings of previous experiments, we only change the number of perspectives (i.e., $\tilde { d } = 5 0 / 7 5 / 1 0 0 / 1 2 5 / 1 5 0 )$ of MPNGMN. As shown in Figure 2 and Table 12, when the graph size is [3, 200] and [20, 200] (more training samples), our model performance is not sensitive to the number of perspectives (from 50 to 150). When the graph size is [50,200] (fewer training samples), the variance of the model becomes relatively larger than these on [3, 200] and [20, 200]. However, when we used more perspectives (like 150), the variance of the model reduced significantly.
|
| 420 |
+
|
| 421 |
+

|
| 422 |
+
(a) classification performance of FFmpeg
|
| 423 |
+
(b) classification performance of OpenSSL
|
| 424 |
+
Figure 2: (a) and (b) show the impact of the number of perspectives on classification performance of FFmpeg and OpenSSL respectively.
|
| 425 |
+
|
| 426 |
+
Table 12: Classification results of different number of perspectives in terms of AUC scores(%).
|
| 427 |
+
|
| 428 |
+
<table><tr><td rowspan="2">Model</td><td colspan="3">FFmpeg</td><td colspan="3">OpenSSL</td></tr><tr><td>[3,200]</td><td>[20,200]</td><td>[50,200]</td><td>[3,200]</td><td>[20,200]</td><td>[50,200]</td></tr><tr><td>MPNGMN (d = 50)</td><td>98.11±0.14</td><td>97.76±0.14</td><td>96.93±0.52</td><td>97.38±0.11</td><td>97.03±0.84</td><td>93.38±3.03</td></tr><tr><td>MPNGMN (d = 75)</td><td>97.99±0.09</td><td>97.94±0.14</td><td>97.41±0.05</td><td>97.09±0.25</td><td>98.66±0.11</td><td>92.10±4.37</td></tr><tr><td>MPNGMN (d = 100)</td><td>97.73±0.11</td><td>98.29±0.21</td><td>96.81±0.96</td><td>96.56±0.12</td><td>97.60±0.29</td><td>92.89±1.31</td></tr><tr><td>MPNGMN (d = 125)</td><td>98.10±0.03</td><td>98.06±0.08</td><td>97.26±0.36</td><td>96.73±0.33</td><td>98.67±0.11</td><td>96.03±2.08</td></tr><tr><td>MPNGMN (d= 150)</td><td>98.32±0.05</td><td>98.11±0.07</td><td>97.92±0.09</td><td>96.50±0.31</td><td>98.04±0.03</td><td>97.13±0.36</td></tr></table>
|
parse/train/rkeqn1rtDH/rkeqn1rtDH_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/rkeqn1rtDH/rkeqn1rtDH_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/rkeqn1rtDH/rkeqn1rtDH_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/ryenvpEKDr/ryenvpEKDr.md
ADDED
|
@@ -0,0 +1,464 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# A CONSTRUCTIVE PREDICTION OF THEGENERALIZATION ERROR ACROSS SCALES
|
| 2 |
+
|
| 3 |
+
Jonathan S. Rosenfeld1 Amir Rosenfeld2 Yonatan Belinkov13 Nir Shavit145 {jonsr,belinkov,shanir}@csail.mit.edu amir@cse.yorku.ca
|
| 4 |
+
|
| 5 |
+
1 Massachusetts Institute of Technology 2 York University 3 Harvard University
|
| 6 |
+
4 Neural Magic Inc 5 Tel Aviv University
|
| 7 |
+
|
| 8 |
+
# ABSTRACT
|
| 9 |
+
|
| 10 |
+
The dependency of the generalization error of neural networks on model and dataset size is of critical importance both in practice and for understanding the theory of neural networks. Nevertheless, the functional form of this dependency remains elusive. In this work, we present a functional form which approximates well the generalization error in practice. Capitalizing on the successful concept of model scaling (e.g., width, depth), we are able to simultaneously construct such a form and specify the exact models which can attain it across model/data scales. Our construction follows insights obtained from observations conducted over a range of model/data scales, in various model types and datasets, in vision and language tasks. We show that the form both fits the observations well across scales, and provides accurate predictions from small- to large-scale models and data.
|
| 11 |
+
|
| 12 |
+
# 1 INTRODUCTION
|
| 13 |
+
|
| 14 |
+
With the success and heightened adoption of neural networks for real world tasks, some questions remain poorly answered. For a given task and model architecture, how much data would one require to reach a prescribed performance level? How big a model would be needed?
|
| 15 |
+
|
| 16 |
+
Addressing such questions is made especially difficult by the mounting evidence that large, deep neural networks trained on large-scale data outperform their smaller counterparts, rendering the training of high performance models prohibitively costly. Indeed, in the absence of practical answers to the above questions, surrogate approaches have proven useful. One such common approach is model scaling, where one designs and compares small-scale models, and applies the obtained architectural principles at a larger scale (e.g., Liu et al., 2018; Real et al., 2018; Zoph et al., 2018). Despite these heuristics being widely used to various degrees of success, the relation between the performance of a model in the small- and large-scale settings is not well understood. Hence, exploring the limitations or improving the efficiency of such methods remains subject to trial and error.
|
| 17 |
+
|
| 18 |
+
In this work we circle back to the fundamental question: what is the (functional) relation between generalization error and model and dataset sizes? Critically, we capitalize on the concept of model scaling in its strictest form: we consider the case where there is some given scaling policy that completely defines how to scale up a model from small to large scales. We include in this context all model parameters, such that traversing from one scale (in which all parameters are known) to another requires no additional resources for specifying the model (e.g., architecture search/design).
|
| 19 |
+
|
| 20 |
+
We empirically explore the behavior of the generalization error over a wide range of datasets and models in vision and language tasks. While the error landscape seems fairly complex at first glance, we observe the emergence of several key characteristics shared across benchmarks and domains. Chief among these characteristics is the emergence of regions where power-law behavior approximates the error well both with respect to data size, when holding model size fixed, and vice versa.
|
| 21 |
+
|
| 22 |
+
Motivated by these observations, we establish criteria which a function approximating the error landscape should meet. We propose an intuitive candidate for such a function and evaluate its quality, both in explaining the observed error landscapes and in extrapolating from small scale (seen) to large scale (unseen) errors. Critically, our functional approximation of the error depends on both model and data sizes. We find that this function leads to a high quality fit and extrapolation. For instance, the mean and standard deviation of the relative errors are under $2 \%$ when fitting across all scales investigated and under $5 \%$ when extrapolating from a slimmed-down model (1/16 of the parameters) on a fraction of the training data (1/8 of the examples) on the ImageNet (Russakovsky et al., 2015) and WikiText-103 (Merity et al., 2016) datasets, with similar results for other datasets.
|
| 23 |
+
|
| 24 |
+
To the best of our knowledge, this is the first work that provides simultaneously:
|
| 25 |
+
|
| 26 |
+
• A joint functional form of the generalization error landscape—as dependent on both data and model size—with few, interpretable degrees of freedom (section 5). Direct and complete specification (via the scaling policy) of the model configuration attaining said generalization error across model and dataset sizes. Highly accurate approximation of error measurements across model and data scales via the functional form, evaluated on different models, datasets, and tasks (section 6 ). • Highly accurate error prediction from small to large model and data (section 7).
|
| 27 |
+
|
| 28 |
+
We conclude with a discussion of some implications of our findings as a practical and principled tool for understanding network design at small scale and for efficient computation and trade-off design in general. We hope this work also provides a useful empirical leg to stand on and an invitation to search for a theory of generalization error which accounts for our findings.
|
| 29 |
+
|
| 30 |
+
# 2 RELATED WORK
|
| 31 |
+
|
| 32 |
+
Model scaling: A number of studies have explored the effect of model scaling on performance. For instance, image classification networks can be scaled by depth (number of layers; He et al., 2016) or width (number of channels; Zagoruyko & Komodakis, 2016; Howard et al., 2017). More recently, Tan & Le (2019) demonstrated how scaling width, depth, and input resolution has combined positive effects larger than scaling each factor in isolation. However, this relationship has yet to be quantified in a predictive form – by how much will error change with model scaling? In this work, we focus on finding a constructive functional form for determining the model given a specified performance.
|
| 33 |
+
|
| 34 |
+
Data scaling: It has long been recognized that more data improves performance, and various studies report such trends in both computer vision (e.g., Zhu et al., 2012; Sun et al., 2017) and language processing tasks (e.g., Banko & Brill, 2001; Talmor & Berant, 2019). A number of prior studies observed power-law relations between the generalization error and training data size (Cho et al., 2015; Miceli Barone et al., 2017; Johnson et al., 2018). Most relevant to our work, Hestness et al. (2017) explored the effect of data size on the generalization error in vision, language, and speech tasks, and observed a strikingly consistent power-law behavior in a large set of experiments. However, while these studies point to the empirical existence of a power law in terms of data, they do not offer tools for predicting the performance given a specified model. Nor do they offer low-cost methods to specify the model configuration which would attain the power law with data dependency. Indeed, Hestness et al. had to search over models and their configurations at large scale to exhibit their findings, incurring prohibitive computational costs.
|
| 35 |
+
|
| 36 |
+
In contrast, we demonstrate a constructive recipe, where we directly predict the test performance at large scale and specify the full model configuration which attains it (with no need for large-scale search), given performance at small scale.
|
| 37 |
+
|
| 38 |
+
Predicting model performance: Since training models at full data/model scale may be computationally prohibitive, a line of work tries to predict the performance of a given model on a given dataset, without training the model, for example by using a bank of previously trained models, dataset, and their associated performances (Istrate et al., 2019). Others have proposed to estimate performance on small data (Klein et al., 2017) or model sizes (Zoph et al., 2018; Real et al., 2019) in the context of neural architecture search (NAS). In this case, the small-scale evaluation is used to compare models at small cost, to expedite the search process; see Elsken et al. (2019) for a recent survey. Our work complements previous approaches by demonstrating a functional form that can predict large-scale performance from small-scale measurements. Moreover, our method may be integrated in NAS, addressing some of its current limitations (as discussed in section 8).
|
| 39 |
+
|
| 40 |
+
Table 1: The datasets and models used in this work, along with their original training data size and the range of explored scales. For more information, see appendix A.
|
| 41 |
+
(a) Training data size (number of words) and model size (number of parameters excluding word embeddings) for language modeling tasks.
|
| 42 |
+
|
| 43 |
+
<table><tr><td>Dataset</td><td>Size (N)</td><td>Scales (n)</td><td>Base Model</td><td>Size (M)</td><td>Scales (m)</td></tr><tr><td>PTB WikiText-2</td><td>0.9M 2M</td><td>2-kN,</td><td>AWD-LSTM AWD-LSTM</td><td>20M 20M</td><td>4-kM,</td></tr><tr><td>WikiText-103</td><td>100M</td><td>0≤k≤5</td><td>Transformer-XL</td><td>41M</td><td>0≤k≤6</td></tr><tr><td colspan="6">(b)Training data size (number of images)and model size (number of parameters)for image classification tasks.</td></tr><tr><td>Dataset</td><td>Size (N)</td><td>Scales (n)</td><td>Base Model</td><td>Size (M)</td><td>Scales (m)</td></tr><tr><td>ImageNet</td><td>1.2M</td><td>2-kN,0≤k≤6</td><td>ResNet-50</td><td>25.5M</td><td>4-M,0≤k≤6</td></tr><tr><td>CIFAR10</td><td>60K</td><td>2-kN,</td><td>WRN-44-16</td><td>0.7M</td><td>4-𝑘M,-3≤k≤4</td></tr><tr><td>CIFAR100</td><td>60K</td><td></td><td>WRN-44-16</td><td>0.7M</td><td>4-kM,</td></tr><tr><td>DTD</td><td>5640</td><td>0≤k≤5</td><td>WRN-44-16</td><td>0.7M</td><td></td></tr><tr><td>Aircraft</td><td>10K</td><td></td><td>WRN-44-16</td><td>0.7M</td><td>-2≤k≤4</td></tr><tr><td>UCF101</td><td>13K</td><td></td><td>WRN-44-16</td><td>0.7M</td><td></td></tr></table>
|
| 44 |
+
|
| 45 |
+
Theoretical error bounds: Much attention has been given to theoretical explanations of the generalization capabilities of deep neural networks (Neyshabur et al., 2017a;b; Allen-Zhu et al., 2018a;b; Arora et al., 2018). While fully engaging with this literature is beyond our scope, we note that recent studies have derived bounds involving power-law dependencies in both model (Yarotsky, 2018) and data size (Liang et al., 2019). We leave it as an open question for future work to find theoretical explanations for the empirical behavior and the functional form we investigate in this work.
|
| 46 |
+
|
| 47 |
+
# 3 EXPERIMENTAL SETUP
|
| 48 |
+
|
| 49 |
+
Notation: Let $\mathbb { D } _ { n } = \{ \pmb { x } _ { i } , y _ { i } \} _ { i = 1 } ^ { n }$ denote a labeled (training) dataset with $n$ samples or datapoints. Let $f _ { m }$ denote a neural network whose size is the number of parameters $m$ , such that $\hat { y } = f _ { m } ( \pmb { x } )$ is the predicted label. Let $\epsilon \left( n , m \right)$ be the generalization error as a function of $n$ and $m$ , measured by a performance metric (e.g., top-1 accuracy or cross-entropy loss) on a held-out test set. We refer to this error function as the error landscape.
|
| 50 |
+
|
| 51 |
+
# 3.1 SCALING POLICIES
|
| 52 |
+
|
| 53 |
+
Dataset scaling: We wish to scale datasets while preserving the original distribution. For image classification, we uniformly subsample all classes by a constant ratio, thus preserving the relative sample size per class. We limit the maximal sub-sampling to avoid eradicating any class. For language modeling, where the number of classes (vocabulary items) has a very long tail distribution, we randomly sample sentences such that the total number of sampled words will be a certain fraction of the original dataset. Table 1 reports the data scales we use. In all tasks the held-out test set remains untouched for evaluating the error.
|
| 54 |
+
|
| 55 |
+
Model scaling: We are critically interested in a method where moving across scales is defined by some scaling function, such that no additional significant computation would be incurred. We thus consider the case where the model architecture is given and the model size determines how to scale it. For instance, one may scale width (number of channels in convolutional networks, hidden state size in recurrent networks), depth (number of layers), do compound scaling (Tan & Le, 2019), or more generally define a function tying the model degrees of freedom and size. We focus primarily on width scaling in our experiments; the model scales are reported in Table 1. We also perform selected depth scaling to demonstrate flexibility with respect to the scaling method.
|
| 56 |
+
|
| 57 |
+

|
| 58 |
+
Figure 1: Error landscapes in log-log-log scale. Each point (blue dot) is the error resulting from training with a model/data configuration $m , n$ . The surface is a linear interpolation between the points, which is then projected on the $( m , \epsilon )$ , $( n , \epsilon )$ and $( m , n )$ planes. See Appendix C for details.
|
| 59 |
+
|
| 60 |
+

|
| 61 |
+
Figure 2: Error vs. data size (left part of each subfigure) and model size (right part) for Wiki103 and CIFAR10. Solid dots are measurements, dashed lines are best fit to saturating power-law.
|
| 62 |
+
|
| 63 |
+
Hyper-parameters: For similar reasons we wish to avoid hyper-paramater search at large scales, and thus avoid the temptation to tune hyper-parameters accordingly (learning rate, regularization, etc.). Therefore, we hold all hyper-parameters fixed. This enables us to construct a functional form that fits the error landscape and can be used to predict the error across scales while completely defining the model attaining it. We consider pros and cons of this approach in the discussion (section 8).
|
| 64 |
+
|
| 65 |
+
# 3.2 TASKS, MODELS, OPTIMIZERS AND DATASETS
|
| 66 |
+
|
| 67 |
+
We experiment with both vision and language tasks. We use 6 benchmark datasets for image classification and 3 for language modeling. For image classification, we train ResNet (He et al., 2016) and WRN models (Zagoruyko & Komodakis, 2016) with stochastic gradient decent (SGD). In section 6.2 we explore the effect of varying architectures and optimizers for a fixed task (CIFAR100), adding VGG16 (Simonyan & Zisserman, 2014) and DenseNet (Huang et al., 2017) models trained with both Adam (Kingma & Ba, 2015) and SGD. For language modeling, we train AWD-LSTM (Merity et al., 2018) and Transformer-XL models (Dai et al., 2019) with SGD and Adam optimizers respectively. Summary statistics are shown in Table 1, along with the range of explored scales. Appendix A gives additional information.
|
| 68 |
+
|
| 69 |
+
# 4 OBSERVATIONS ON THE ERROR LANDSCAPE
|
| 70 |
+
|
| 71 |
+
Figures 1a and 1b respectively show an example test error landscape for width scaling of Transformer-XL on WikiText-103 and WRN-44-16 on CIFAR10. Various additional such landscapes are found in appendix C, showing largely consistent patterns. Examining the error landscapes yields the following observations:
|
| 72 |
+
|
| 73 |
+
# O1 Model Scaling
|
| 74 |
+
|
| 75 |
+
O1.1 For a given dataset size, scaling up the model results in an initial decrease in test error, which then saturates to a level determined by the dataset size.1 This behavior has been noted by Tan & Le (2019) across varied model scaling methods, although they have not engaged with the dependency on dataset size.
|
| 76 |
+
|
| 77 |
+
O1.2 The rate of error decrease with model size appears well approximated by a power-law.
|
| 78 |
+
|
| 79 |
+
These two observations together can be summarized as the following relation:
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
\epsilon ( m , n ) \approx b ( n ) m ^ { - \beta ( n ) } + c _ { m } ( n )
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
where $b , \beta , c _ { m }$ may depend on the data size $n$ , s.t. as $m$ grows, $\epsilon \to c _ { m }$ . Example fits to this form (allowing $b , \beta , c _ { m }$ to be fit per $n$ ) are seen in figure 2a (right) and figure 2b (right).
|
| 86 |
+
|
| 87 |
+
# O2 Data scaling
|
| 88 |
+
|
| 89 |
+
O2.1 For a given model size, scaling up the dataset results in an initial increase in performance, which then saturates to a level determined by the model size.
|
| 90 |
+
|
| 91 |
+
O2.2 The rate of error decrease with dataset size appears well approximated by a power-law. Hestness et al. (2017) also noted a similar relationship, but did not functionally tie the saturation level to the dataset size.
|
| 92 |
+
|
| 93 |
+
These two observations together can be summarized as the following relation:
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
\epsilon ( m , n ) \approx a ( m ) n ^ { - \alpha ( m ) } + c _ { n } ( m )
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
where $a , \alpha , c _ { n }$ may depend on the model size $m$ , s.t. as $n$ grows, $\epsilon \to c _ { n }$ . Example fits to this form (allowing $a , \alpha , c _ { n }$ to be fit per $m$ ) are seen in figure 2a (left) and figure 2b (left).
|
| 100 |
+
|
| 101 |
+
O3 Joint properties The behavior of the error when scaling model size while holding data size fixed, and vice versa, extends to the entire error landscape in a well-behaved manner, such that the manifold $\epsilon ( m , n )$ is smooth everywhere as a function of both model and data scales.
|
| 102 |
+
|
| 103 |
+
# 5 FUNCTIONAL APPROXIMATION OF THE GENERALIZATION ERROR
|
| 104 |
+
|
| 105 |
+
# 5.1 CRITERIA
|
| 106 |
+
|
| 107 |
+
Motivated by the above observations, we now consider a functional approximation for the error landscape. In particular, let us consider function families meeting the following criteria which augment and restrict our observations:
|
| 108 |
+
|
| 109 |
+
C1 As either model or dataset size goes to zero, the expected performance is equivalent to a random-guess error level $\epsilon _ { 0 }$ .2
|
| 110 |
+
C2 For a given dataset size, scaling up the model will result in an initial increase in performance, which will then saturate, taking the form in equation 1.
|
| 111 |
+
C3 For a given model size, scaling up the dataset will result in an initial increase in performance, which will then saturate, taking the form in equation 2.
|
| 112 |
+
C4 There exists an irreducible error $\epsilon _ { \infty }$ , intrinsic to the dataset.
|
| 113 |
+
C5 The function must be smooth everywhere and monotonic non-increasing in terms of model and data size (observation O3).
|
| 114 |
+
|
| 115 |
+
While there are many possible function families meeting the above criteria, below we propose a simple function family for our evaluation. We do not claim that this is in fact the true underlying dependency, but rather that it serves as a good approximation of the error landscape—consistent with these criteria.
|
| 116 |
+
|
| 117 |
+
# 5.2 PROPOSED FUNCTION FAMILY
|
| 118 |
+
|
| 119 |
+
As a first insightful step, consider the implications of satisfying C2 and C3 simultaneously. By examining the limiting behavior as $m$ or $n$ grow, we have:
|
| 120 |
+
|
| 121 |
+
As m grows large: $\begin{array} { l } { { c _ { m } ( n ) \approx a ( m ) n ^ { - \alpha ( m ) } + c _ { n } ( m ) } } \\ { { c _ { n } ( m ) \approx b ( n ) m ^ { - \beta ( n ) } + c _ { m } ( n ) } } \end{array}$ As n grows large:
|
| 122 |
+
|
| 123 |
+
Thus, a consistent form satisfying C2 and C3 simultaneously is:
|
| 124 |
+
|
| 125 |
+
$$
|
| 126 |
+
\epsilon ( m , n ) \approx a ( m ) n ^ { - \alpha ( m ) } + b ( n ) m ^ { - \beta ( n ) } + c _ { \infty }
|
| 127 |
+
$$
|
| 128 |
+
|
| 129 |
+
where $c _ { \infty }$ is a constant not dependent on either $m$ or $n$ .
|
| 130 |
+
|
| 131 |
+
Let us now examine the simplified case where $a , b , \alpha , \beta$ are constant:
|
| 132 |
+
|
| 133 |
+
$$
|
| 134 |
+
\tilde { \epsilon } ( m , n ) = a n ^ { - \alpha } + b m ^ { - \beta } + c _ { \infty }
|
| 135 |
+
$$
|
| 136 |
+
|
| 137 |
+
where $\alpha \geq 0$ and $\beta \geq 0$ control the global rate at which error decreases with data and model size, respectively, $a > 0$ and $b > 0$ are a form of unit conversion between data and model sizes and error, and $c _ { \infty } > 0$ is the asymptotic lower value attainable. This function is a special case of equation 3 and meets criteria C2 and C3 by construction. Importantly C4 and C5 are also met.
|
| 138 |
+
|
| 139 |
+
However, by giving up the dependence of $a , b , \alpha , \beta$ on $m , n$ , this function does not meet criterion C1. We thus need to model the transition from the initial random-guess level to the power-law region. We propose to parameterize the transition using the following envelope (complex) function:
|
| 140 |
+
|
| 141 |
+
$$
|
| 142 |
+
\hat { \epsilon } ( m , n ) = \epsilon _ { 0 } \left\| \frac { \tilde { \epsilon } ( m , n ) } { \tilde { \epsilon } ( m , n ) - i \eta } \right\| = \epsilon _ { 0 } \left\| \frac { a n ^ { - \alpha } + b m ^ { - \beta } + c _ { \infty } } { a n ^ { - \alpha } + b m ^ { - \beta } + c _ { \infty } - i \eta } \right\|
|
| 143 |
+
$$
|
| 144 |
+
|
| 145 |
+
where $i = \sqrt { - 1 }$ . Here the simple pole at $\eta$ controls the transition point from the initial random-guess level $\epsilon _ { \mathrm { 0 } }$ as $( m , n )$ increase. As $( m , n )$ grow, $\tilde { \epsilon } \to c _ { \infty }$ and the final irreducible error $\epsilon _ { \infty } \triangleq \epsilon _ { 0 } c _ { \infty } \eta ^ { - 1 }$ is approached. The random-guess error, $\epsilon _ { \mathrm { 0 } }$ , is a known parameter determined by dataset statistics (e.g, $\dot { ( } N _ { c l a s s e s } - 1 ) / N _ { c l a s s e s }$ for a balanced dataset). Note that due to our choice of rational envelope, we can divide by a constant the form in equation 4. Without loss of generality, let us choose $a = 1$ .
|
| 146 |
+
|
| 147 |
+
Note that while the forms in equations 3 and 4 are well motivated, the approach taken for modeling the transition is solely a convenience one. In fact, the transition(s) as function of $m$ and $n$ may be captured in the functional forms of $a , b , \alpha , \beta$ or another envelope mechanism. We leave a more refined investigation of the nature of the transitions to future work.
|
| 148 |
+
|
| 149 |
+
# 6 ERROR LANDSCAPE ESTIMATION
|
| 150 |
+
|
| 151 |
+
We wish to empirically estimate the quality of the proposed functional parameterization as a fit to the true error landscape. Let $\hat { \epsilon } ( n , m ; \pmb { \theta } )$ be the parametric function family (equation 5) approximating the error landscape $\epsilon \left( n , m \right)$ , where $\pmb { \theta } = \{ \alpha , \beta , b , c _ { \infty } , \eta \}$ .3 Define the divergence $\delta ( n , m ; \pmb \theta )$ as the relative difference between the estimated error $\hat { \epsilon } ( m , n ; \pmb \theta )$ and the true error $\epsilon ( m , n )$ :
|
| 152 |
+
|
| 153 |
+
$$
|
| 154 |
+
\delta ( n , m ; \pmb { \theta } ) \triangleq \frac { \hat { \epsilon } ( m , n ; \pmb { \theta } ) - \epsilon ( m , n ) } { \epsilon ( m , n ) }
|
| 155 |
+
$$
|
| 156 |
+
|
| 157 |
+
We fit a least squares regression model to find the best parameters minimizing the divergence. In this section, we fit the function using 10-fold cross-validation across all model/data configurations $m , n$ (see Table 1) and evaluate the fit quality. (In the next section, we perform extrapolation experiments, from seen to unseen points.) We perform the fit separately for each dataset and evaluate its quality by the mean $\mu$ and standard deviation $\sigma$ of the divergence $\delta$ over all points $( m , n )$ . See Appendix B.1 for experimental details.
|
| 158 |
+
|
| 159 |
+
As figure 3 shows, estimated test accuracy is highly correlated with actual test accuracy for various datasets, with worst-case values $\mu < 1 \%$ and $\sigma < 5 \%$ . Note that the number of free parameters is small $( | \pmb { \theta } | \leq 6 )$ compared to the number of points (42–49 model-data configurations), demonstrating the appropriateness of the proposed function for modeling the complex error landscape.
|
| 160 |
+
|
| 161 |
+

|
| 162 |
+
Figure 3: Error estimation results, using 10-fold cross-validation on all configurations in each dataset. For reference, in blue is the identity line. The legend shows mean $\mu$ and standard deviation $\sigma$ of the divergence $\delta$ $\pm$ one std). See Appendix C for the actual and estimated landscapes in each dataset.
|
| 163 |
+
|
| 164 |
+

|
| 165 |
+
(b) Estimated vs. actual test error for various image classification datasets.
|
| 166 |
+
|
| 167 |
+

|
| 168 |
+
Figure 4: Error landscape estimation results on CIFAR10 for width and depth scaling, showing small and comparable fit errors in both cases. Numbers in legends denote mean/variance of the estimation divergence.
|
| 169 |
+
|
| 170 |
+
# 6.1 A PROBE INTO DEPTH SCALING
|
| 171 |
+
|
| 172 |
+
Here we verify that our results extend to another canonical scaling policy, namely depth scaling. Figure 4a shows the error landscape with depth scaling on CIFAR10, exhibiting the same characteristics as width scaling. Figures 4b and 4c show error landscape estimation results for both cases of width and depth scaling, exhibiting small and comparable fit errors (confidence intervals $< 3 \%$ ).
|
| 173 |
+
|
| 174 |
+
Since the difference in approximation quality is effectively indistinguishable when scaling depth or width orthogonally, we expect compound scaling to adhere to the same functional form. Indeed, we verified this on the publicly available (model scaling only) results for EfficientNet (Tan & Le, 2019).
|
| 175 |
+
|
| 176 |
+
# 6.2 ON THE VARIETY OF OPTIMIZERS AND ARCHITECTURES
|
| 177 |
+
|
| 178 |
+
Our study covers a deliberate variety of architectures (ResNet, WRN, LSTM, Transformer) and optimizers (Adam, SGD variants), following standard implementations in the literature as recommended for each dataset/model setting; see Appendix A.
|
| 179 |
+
|
| 180 |
+

|
| 181 |
+
Figure 6: Extrapolation results. (a) Illustration of the extrapolation setup, where we fit on a subset of the points (in green) and predict on larger points (in red). (b) and (c) show example results on one configuration in two benchmark datasets. Comprehensive results are given in Appendix D.
|
| 182 |
+
|
| 183 |
+
However, the model/optimizer settings differ in multiple aspects across the different tasks , rendering the comparison of, say, different optimizers, challenging. In this section we verify that the functional form holds when varying the optimizer and/or the architecture on the same task, namely image classification on CIFAR100.
|
| 184 |
+
|
| 185 |
+
In addition to the previously examined setting of WRN with SGD, we add four more settings: two well known architectures (VGG and DenseNet), each trained with both SGD and Adam optimizers. See Appendix A for experimental details. Figure 5 exhibits consistent, accurate, fit values across all architecture/optimizer settings, with mean divergence of $\mu < 1 \%$ (std: $\sigma ~ < ~ 6 \%$ ; confidence intervals $< 4 \%$ ).
|
| 186 |
+
|
| 187 |
+

|
| 188 |
+
Figure 5: CIFAR100 Error estimation results with three architectures (WRN, VGG, DenseNet) and two optimizers (SGD, Adam).
|
| 189 |
+
|
| 190 |
+
# 7 EXTRAPOLATION
|
| 191 |
+
|
| 192 |
+
In this section, we evaluate the ability of our functional approximation to extrapolate beyond seen model/data configurations. The primary question we ask is: can we predict the error of a large model/data configuration from the errors of smaller-scale model/data configurations? To do this, we fit the least squares regression on a subset of the configurations and predict the error on larger, unseen configurations. More formally, let $( m _ { i } , n _ { j } )$ denote a given model/data configuration. We first estimate parameters $\theta _ { i j }$ by fitting the function in equation 5 on all points of at most that size $( m \leq$ $m _ { i } , n \le n _ { j } )$ ). Then we predict the error $\epsilon ( m , n )$ in all points corresponding to larger configurations $( m > m _ { i } , n > n _ { j } )$ using estimated $\theta _ { i j }$ . Finally, we measure the divergence $\delta ( \bar { m } , n )$ between the estimated error and the actual error at all larger configurations. This process is illustrated in figure 6a.
|
| 193 |
+
|
| 194 |
+
Figure 6b shows the results of one such extrapolation experiment, on ImageNet. In this case, we have fit the functional form on all configurations of model size $m \le m _ { i } = M / 1 6$ and data size $n \le n _ { j } = N / 8$ , and predicted the error on all larger configurations. As the figure shows, the extrapolation is highly accurate, with a mean divergence of $\mu \stackrel { - } { = } 4 . 5 \%$ (std: $\sigma = 4 . 7 \%$ ). Figure 6c reports a similar experiment on WikiText-103. Here, again, we see very good extrapolation, with a mean divergence of $\mu = 0 . 5 \%$ (std: $\sigma = 1 . 7 \%$ ). Note that each extrapolation is run 10 times with different random initializations of $\theta _ { i j }$ in the least squares with negligible effect on the prediction.
|
| 195 |
+
|
| 196 |
+
In practice, we may be interested in extrapolation quality with different subsets of configurations. Appendix D provides detailed extrapolation results on multiple subsets of configurations, for both vision and language datasets. Generally, the extrapolation performs well once not ill-posed, which may be caused by lack of signal in the region of the initial “random-guess” level, or in degenerate cases like having fewer measurements than the number of free parameters in $\pmb \theta$ .
|
| 197 |
+
|
| 198 |
+
# 8 DISCUSSION AND CONCLUSION
|
| 199 |
+
|
| 200 |
+
In this work, through insights gained by the joint examination of the dependencies of generalization error on both model and data size, we arrive at criteria for functions consistent with the form of the generalization error under a given scaling policy. We consider one such function and find it to be in very good agreement with the actual behavior of the error landscape. Indeed, the agreement is strong enough that extrapolation from small to large scale becomes feasible: the function predicts the behavior of the generalization error in practice for the practical case of scaling models and data. We discuss several example implications of knowing such a functional form.
|
| 201 |
+
|
| 202 |
+
Small-scale network development: At the core of small fidelity searches is the notion of performance rank comparison between models. However, small scale and large scale ranks are not assured to be consistent. If indeed a functional form such as empirically found in this work holds very generally, then in contrast, one can safely assess scaling rank between models at small scale, with the assurance that it remains consistent. This suggests that one would be well served by searching over scaling policies; a pertinent example of such a success is Tan & Le (2019). The functional form also explains the limitation of small-scale search: once reaching the random-guess error level, where the sensitivity to scaling vanishes, the informativeness of ranking diminishes. Finally, the functional form allows direct usage of differentiable methods for NAS.
|
| 203 |
+
|
| 204 |
+
Principled design: Knowing the error landscape function facilitates reasoning about the choice of $( m , n )$ attaining a specified error level. In other words, for any given error level, one can solve Eq. 5 for $m , n$ based on small-scale measurements. Thus, one can quantitatively answer design questions regarding the expected (in particular, large-scale) relations between $m , n$ , and $\epsilon$ . In fact, Eq. 5 provides direct ansewrs to questions such as ”how much data would one require to reach a prescribed performance level?” or ”how big a model would be needed?” Imposing constraints is also straightforward. For instance, consider the following question: ”What is the maximal model size possibly needed (useful), when the data is limited in size, $n = n _ { l i m }$ (for a given model architecture and scaling policy)?” For a fixed dataset size, model scaling eventually contributes marginally to error reduction and becomes negligible when $b m ^ { - \beta } \ll n _ { l i m } ^ { - \alpha }$ (Eq. 5). Define the relative contribution threshold $T$ as satisfying $\begin{array} { r } { T = \frac { n _ { l i m } ^ { - \alpha } } { b m _ { m a x } ^ { - \beta } } } \end{array}$ . (For example, $T = 1 0 .$ .) Then the maximal useful model size meeting threshold $T$ is:
|
| 205 |
+
|
| 206 |
+
$$
|
| 207 |
+
m _ { m a x } ( T ) = \left( b T \right) ^ { 1 / \beta } n _ { l i m } ^ { \alpha / \beta }
|
| 208 |
+
$$
|
| 209 |
+
|
| 210 |
+
Similarly, The maximal useful amount of data for a limited sized model $\boldsymbol { m } _ { l i m }$ is:
|
| 211 |
+
|
| 212 |
+
$$
|
| 213 |
+
n _ { m a x } ( T ) = \left( 1 / b T \right) ^ { 1 / \alpha } m _ { l i m } ^ { \beta / \alpha }
|
| 214 |
+
$$
|
| 215 |
+
|
| 216 |
+
Moreover, Eq. 5 allows for complex design trade-offs. Generally, given some design-tradeoff cost function $C ( m , n , \epsilon )$ , one can minimize such cost s.t. Eq. 5. For example, consider the case of optimizing for efficient computation which has both practical and environmental importance (Schwartz et al., 2019). Since the number of FLOPs during training is $\propto m \cdot n$ (for constant epoch budget), the trade-off cost function may be formulated as $C ( \mathrm { F L O P S } , \epsilon ) = C ( m n , \epsilon )$ . Further, since constant error contour is very well approximated by c = 1nα $\begin{array} { r } { c = \frac { 1 } { n ^ { \alpha } } + \frac { b } { m ^ { \beta } } } \end{array}$ (Eq. 5), dataset and models may be scaled with optimal resource efficiency with no effect on performance by solving for:
|
| 217 |
+
|
| 218 |
+
$$
|
| 219 |
+
\operatorname { a r g m i n } _ { m , n } \quad m \cdot n \qquad \mathrm { s . t . } \quad c = { \frac { 1 } { n ^ { \alpha } } } + { \frac { b } { m ^ { \beta } } }
|
| 220 |
+
$$
|
| 221 |
+
|
| 222 |
+
The solution gives us the optimal-computational-efficiency ratio of model to data size: bβα nmβ = 1.
|
| 223 |
+
|
| 224 |
+
Limitations: We have made a few simplifying assumptions in our choice of approximating function, in particular in how to model the transition from the initial random-guess error level and the union of the random-guess level of the two scenarios (small model with large data and large model with small data). We leave a more detailed examination of the behavior of the transitions from random-guess error levels and refinements of the functional form to future work.
|
| 225 |
+
|
| 226 |
+
Critically, the restrictive nature of our scaling framework (all parameters and hyperparameters described by a policy) is both a blessing and a challenge. The blessing comes in fulfilling the goal of finding simultaneously both the form of the generalization error and the full specification of the model and hyperparameters that attain it across scales. The challenge is that we have demonstrated in this work only the case of constant hyper-parameters. We conjecture that the relation between model configuration and hyperparameter choice (Zela et al., 2018) may entail the potential to formulate hyperparameter-scaling policies similar in nature to the model-scaling polices, and that these too fall under the scope of the form we find in this work. This too will be the subject of future work.
|
| 227 |
+
|
| 228 |
+
We hope that this work will bring the actual functional form of the generalization error in this practical case of scaling to the fore, both in practice and as an empirical leg to stand on in the quest for its theoretical origins.
|
| 229 |
+
|
| 230 |
+
# ACKNOWLEDGMENTS
|
| 231 |
+
|
| 232 |
+
We thank Alexander Rakhlin, Alexander Madry, Kai Xiao, Lu Mi, Viaks Garg, Dan Alistrah, and Tommi Jaakkola for discussions and their help. We also thank the anonymous reviewers for their valuable feedback. J.R. was partly supported by the Eli and Dorothy Berman Fellowship as well as grants NSF IIS-1447786, NSF CCF-1563880 and China-Singapore Suzhou Industrial Park. A.R. was partially supported by the Air Force Office of Scientific Research USA (FA9550-18-1-0054) though a grant to John K. Tsotsos. Y.B. was partly supported by the Harvard Mind ,Brain, and Behavior Initiative.
|
| 233 |
+
|
| 234 |
+
# REFERENCES
|
| 235 |
+
|
| 236 |
+
Zeyuan Allen-Zhu, Yuanzhi Li, and Yingyu Liang. Learning and generalization in overparameterized neural networks, going beyond two layers. arXiv preprint arXiv:1811.04918, 2018a.
|
| 237 |
+
|
| 238 |
+
Zeyuan Allen-Zhu, Yuanzhi Li, and Zhao Song. On the convergence rate of training recurrent neural networks. arXiv preprint arXiv:1810.12065, 2018b.
|
| 239 |
+
|
| 240 |
+
Sanjeev Arora, Rong Ge, Behnam Neyshabur, and Yi Zhang. Stronger generalization bounds for deep nets via a compression approach. arXiv preprint arXiv:1802.05296, 2018.
|
| 241 |
+
|
| 242 |
+
Michele Banko and Eric Brill. Mitigating the paucity-of-data problem: Exploring the effect of training corpus size on classifier performance for natural language processing. In Proceedings of the first international conference on Human language technology research, pp. 1–5. Association for Computational Linguistics, 2001.
|
| 243 |
+
|
| 244 |
+
Hakan Bilen, Basura Fernando, Efstratios Gavves, Andrea Vedaldi, and Stephen Gould. Dynamic image networks for action recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3034–3042, 2016.
|
| 245 |
+
|
| 246 |
+
James Bradbury, Stephen Merity, Caiming Xiong, and Richard Socher. Quasi-recurrent neural networks. In International Conference on Learning Representations, 2017.
|
| 247 |
+
|
| 248 |
+
Junghwan Cho, Kyewook Lee, Ellie Shin, Garry Choy, and Synho Do. How much data is needed to train a medical image deep learning system to achieve necessary high accuracy? arXiv preprint arXiv:1511.06348, 2015.
|
| 249 |
+
|
| 250 |
+
Mircea Cimpoi, Subhransu Maji, Iasonas Kokkinos, Sammy Mohamed, and Andrea Vedaldi. Describing textures in the wild. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3606–3613, 2014.
|
| 251 |
+
|
| 252 |
+
Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc Le, and Ruslan Salakhutdinov. Transformer-XL: Attentive language models beyond a fixed-length context. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 2978–2988, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/v1/P19-1285. URL https://www.aclweb.org/anthology/P19-1285.
|
| 253 |
+
|
| 254 |
+
Thomas Elsken, Jan Hendrik Metzen, and Frank Hutter. Neural architecture search: A survey. Journal of Machine Learning Research, 20(55):1–21, 2019.
|
| 255 |
+
|
| 256 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. pp. 770–778, 2016.
|
| 257 |
+
|
| 258 |
+
Joel Hestness, Sharan Narang, Newsha Ardalani, Gregory Diamos, Heewoo Jun, Hassan Kianinejad, Md Patwary, Mostofa Ali, Yang Yang, and Yanqi Zhou. Deep learning scaling is predictable, empirically. arXiv preprint arXiv:1712.00409, 2017.
|
| 259 |
+
|
| 260 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
|
| 261 |
+
|
| 262 |
+
Elad Hoffer, Itay Hubara, and Daniel Soudry. Fix your classifier: the marginal value of training the last weight layer. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ S1Dh8Tg0-.
|
| 263 |
+
|
| 264 |
+
Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017.
|
| 265 |
+
|
| 266 |
+
Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. 1(2):3, 2017.
|
| 267 |
+
|
| 268 |
+
Roxana Istrate, Florian Scheidegger, Giovanni Mariani, Dimitrios Nikolopoulos, Costas Bekas, and A Cristiano I Malossi. Tapas: Train-less accuracy predictor for architecture search. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pp. 3927–3934, 2019.
|
| 269 |
+
|
| 270 |
+
Mark Johnson, Peter Anderson, Mark Dras, and Mark Steedman. Predicting accuracy on large datasets from smaller pilot data. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pp. 450–455, Melbourne, Australia, July 2018. Association for Computational Linguistics. doi: 10.18653/v1/P18-2072. URL https: //www.aclweb.org/anthology/P18-2072.
|
| 271 |
+
|
| 272 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. 2015.
|
| 273 |
+
|
| 274 |
+
Aaron Klein, Stefan Falkner, Simon Bartels, Philipp Hennig, and Frank Hutter. Fast bayesian optimization of machine learning hyperparameters on large datasets. In Artificial Intelligence and Statistics, pp. 528–536, 2017.
|
| 275 |
+
|
| 276 |
+
Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009.
|
| 277 |
+
|
| 278 |
+
Tengyuan Liang, Alexander Rakhlin, and Xiyu Zhai. On the risk of minimum-norm interpolants and restricted lower isometry of kernels. arXiv preprint arXiv:1908.10292, 2019.
|
| 279 |
+
|
| 280 |
+
Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. arXiv preprint arXiv:1806.09055, 2018.
|
| 281 |
+
|
| 282 |
+
Subhransu Maji, Esa Rahtu, Juho Kannala, Matthew Blaschko, and Andrea Vedaldi. Fine-grained visual classification of aircraft. arXiv preprint arXiv:1306.5151, 2013.
|
| 283 |
+
|
| 284 |
+
Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843, 2016.
|
| 285 |
+
|
| 286 |
+
Stephen Merity, Nitish Shirish Keskar, and Richard Socher. Regularizing and optimizing LSTM language models. In International Conference on Learning Representations, 2018. URL https: //openreview.net/forum?id=SyyGPP0TZ.
|
| 287 |
+
|
| 288 |
+
Antonio Valerio Miceli Barone, Barry Haddow, Ulrich Germann, and Rico Sennrich. Regularization techniques for fine-tuning in neural machine translation. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 1489–1494, Copenhagen, Denmark, September 2017. Association for Computational Linguistics. doi: 10.18653/v1/D17-1156. URL https://www.aclweb.org/anthology/D17-1156.
|
| 289 |
+
|
| 290 |
+
Toma´s Mikolov, Martin Karafi ˇ at, Luk ´ a´s Burget, Jan ˇ Cernock ˇ y, and Sanjeev Khudanpur. Recurrent \` neural network based language model. In Eleventh Annual Conference of the International Speech Communication Association, 2010.
|
| 291 |
+
|
| 292 |
+
Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester, and Nati Srebro. Exploring generalization in deep learning. In Advances in Neural Information Processing Systems, pp. 5947–5956, 2017a.
|
| 293 |
+
|
| 294 |
+
Behnam Neyshabur, Srinadh Bhojanapalli, and Nathan Srebro. A pac-bayesian approach to spectrally-normalized margin bounds for neural networks. arXiv preprint arXiv:1707.09564, 2017b.
|
| 295 |
+
|
| 296 |
+
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.
|
| 297 |
+
|
| 298 |
+
E Real, A Aggarwal, Y Huang, and QV Le. Aging evolution for image classifier architecture search. In AAAI Conference on Artificial Intelligence, 2019.
|
| 299 |
+
|
| 300 |
+
Esteban Real, Alok Aggarwal, Yanping Huang, and Quoc V Le. Regularized evolution for image classifier architecture search. arXiv preprint arXiv:1802.01548, 2018.
|
| 301 |
+
|
| 302 |
+
Sylvestre-Alvise Rebuffi, Hakan Bilen, and Andrea Vedaldi. Learning multiple visual domains with residual adapters. In Advances in Neural Information Processing Systems, pp. 506–516, 2017.
|
| 303 |
+
|
| 304 |
+
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.
|
| 305 |
+
|
| 306 |
+
Roy Schwartz, Jesse Dodge, Noah A Smith, and Oren Etzioni. Green ai. arXiv preprint arXiv:1907.10597, 2019.
|
| 307 |
+
|
| 308 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
|
| 309 |
+
|
| 310 |
+
Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012.
|
| 311 |
+
|
| 312 |
+
Chen Sun, Abhinav Shrivastava, Saurabh Singh, and Abhinav Gupta. Revisiting unreasonable effectiveness of data in deep learning era. In Proceedings of the IEEE international conference on computer vision, pp. 843–852, 2017.
|
| 313 |
+
|
| 314 |
+
Alon Talmor and Jonathan Berant. MultiQA: An empirical investigation of generalization and transfer in reading comprehension. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 4911–4921, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/v1/P19-1485. URL https://www.aclweb.org/ anthology/P19-1485.
|
| 315 |
+
|
| 316 |
+
Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In International Conference on Machine Learning, pp. 6105–6114, 2019.
|
| 317 |
+
|
| 318 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. Attention is all you need. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), Advances in Neural Information Processing Systems 30, pp. 5998–6008. Curran Associates, Inc., 2017. URL http://papers.nips.cc/paper/7181-attention-is-all-you-need.pdf.
|
| 319 |
+
|
| 320 |
+
Zifeng Wu, Chunhua Shen, and Anton van den Hengel. Wider or deeper: Revisiting the resnet model for visual recognition. arXiv preprint arXiv:1611.10080, 2016.
|
| 321 |
+
|
| 322 |
+
Dmitry Yarotsky. Optimal approximation of continuous functions by very deep relu networks. arXiv preprint arXiv:1802.03620, 2018.
|
| 323 |
+
|
| 324 |
+
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016.
|
| 325 |
+
|
| 326 |
+
Arber Zela, Aaron Klein, Stefan Falkner, and Frank Hutter. Towards automated deep learning: Efficient joint neural architecture and hyperparameter search. arXiv preprint arXiv:1807.06906, 2018.
|
| 327 |
+
|
| 328 |
+
Xiangxin Zhu, Carl Vondrick, Deva Ramanan, and Charless C Fowlkes. Do we need more training data or better models for object detection?. In BMVC, volume 3, pp. 5. Citeseer, 2012.
|
| 329 |
+
|
| 330 |
+
Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 8697–8710, 2018.
|
| 331 |
+
|
| 332 |
+
# A DATASETS AND MODELS
|
| 333 |
+
|
| 334 |
+
A.1 IMAGE CLASSIFICATION
|
| 335 |
+
|
| 336 |
+
# A.1.1 DATASETS
|
| 337 |
+
|
| 338 |
+
We evaluated our predictions on several popular image classification datasets: ImageNet (Russakovsky et al., 2015): a large-scale recognition benchmark consisting of natural images of 1000 object categories with 1.28M training images spread roughly uniformly over the categories. It has 50K validation and 100K testing images. It has been the most popular large-scale benchmark for image classification methods for the better part of the last decade. CIFAR10/100 (Krizhevsky et al., 2009): 60K natural RGB images of 10 classes (100 for CIFAR100) with a train/test split of 50K/10K. For each of the following datasets, we use the version collated, resized, and split into train/validation/test sets by Rebuffi et al. (2017). DTD (Cimpoi et al., 2014): a texture database of 47 categories and 5640 images. Aircraft (Maji et al., 2013): 10K images of 100 different aircraft classes. UCF101 (Soomro et al., 2012): originally a video action recognition dataset, converted using the method of Bilen et al. (2016) into a single image per video. It contains 13,320 images of 101 action classes.
|
| 339 |
+
|
| 340 |
+
# A.1.2 MODELS
|
| 341 |
+
|
| 342 |
+
We experiment with four models for image classification. We use different variants of the popular ResNet architecture (He et al., 2016) in the main experiments. For ImageNet we use ResNet-50 and build on the code from the PyTorch framework (Paszke et al., 2017) to vary the model width. For all other datasets we use WRN-44-16 (Wu et al., 2016) of varying widths, modified from the implementation of Hoffer et al. (2018).
|
| 343 |
+
|
| 344 |
+
Scaling the models’ width is performed by multiplying the number of channels in each convolutional layer and the width of the hidden linear layers by a constant factor and rounding to the nearest integer. The ranges of width scales (and data scales) for the main experiments are detailed in Table 1b.
|
| 345 |
+
|
| 346 |
+
In section 6.2, we perform width scaling for two additional architectures, VGG16bn (Simonyan & Zisserman, 2014) and DenseNet $( { \bf L } { = } 4 0 , { \bf k } { = } 3 2$ ) (Huang et al., 2017). The VGG and DenseNet models were also modified for width scaling from the implementation of Hoffer et al. (2018). The model scales in this case are $4 ^ { - k }$ , $0 \leq k \leq \bar { 5 }$ , for both VGG and DenseNEt.
|
| 347 |
+
|
| 348 |
+
Depth-scaling, in the CIFAR10 case (section 6.1), is performed by appending extra layers within each block.
|
| 349 |
+
|
| 350 |
+
# A.1.3 TRAINING
|
| 351 |
+
|
| 352 |
+
In the main experiments, training is done via SGD with a momentum of 0.9, weight decay of 1e-4 and initial learning rate of 0.1. For ImageNet we train for 90 epochs, decreasing the learning rate by a multiplicative factor of 0.1 after and 30 and after 60 epochs. We use a batch size of 16. For all other vision datasets we use a batch-size of 128. We begin training with a learning rate of 0.1, run for 200 epochs, and reduce by a multiplicative factor of 0.1 after 80, 120, and 160 epochs.
|
| 353 |
+
|
| 354 |
+
For the VGG and DenseNet experiments on CIFAR100 in section 6.2, we train with both SGD and Adam optimizers. We train VGG for 170 epochs and Densenet for 300 epochs. Adam hyperparameters are default, with an initial learning rate of 1e-3. When training with SGD, we retain initial learning rate, batch size, momentum, and weight-decay, as in the main experiment (at 0.1, 128, 0.9, and 1e-4 respectively) and follow standard stepped learning rate schedules: For VGG, learning rate multiplicative factor of 0.1 after 80, 120, and 160 epochs; For DenseNet, learning rate multiplicative factor of 0.1 after 150 and 225 epochs.
|
| 355 |
+
|
| 356 |
+
# A.2 LANGUAGE MODELING
|
| 357 |
+
|
| 358 |
+
# A.2.1 DATASETS
|
| 359 |
+
|
| 360 |
+
We evaluate on several datasets commonly used for (word-level) language modeling: Penn Treebank (Mikolov et al., 2010), WikiText-2 (Bradbury et al., 2017), and WikiText-103 (Merity et al., 2016). The PTB is a relatively small language modeling dataset of news texts, with a vocabulary of 10K unique words and about 900K/70K/80K training/validation/test words. WikiText-2 is drawn from Wikipedia articles and it is both larger and richer, with a vocabulary of 33K words and 2M/210K/240K training/validation/test words. WikiText-103 is also based on Wikipedia, but larger still, with a vocabulary of 270K words and 100M training words (and the same validation and test sets as WikiText-2).
|
| 361 |
+
|
| 362 |
+
# A.2.2 MODELS
|
| 363 |
+
|
| 364 |
+
We experiment with two standard models for language modeling: Transformer-XL (Dai et al., 2019) and AWD-LSTM (Merity et al., 2018). Transformer-XL is a recent language modeling architecture that is based on transformer self-attention (Vaswani et al., 2017), but modified to better learn dependencies beyond a fixed length by adding a segment-level recurrence mechanism. It has achieved state-of-the-art results on multiple benchmarks. We use the official PyTorch implementation4 with their base configuration: 16 layers, embedding size of 410, inner dimension of 2100 in the fullyconnected layers, and 10 attention heads. Training is done with Adam. See the implementation for other details. For scaling experiments, we decimate the inner dimension. We use Transformer-XL for WikiText-103.
|
| 365 |
+
|
| 366 |
+
AWD-LSTM is a long short-term memory (Hochreiter & Schmidhuber, 1997) language model with adaptive weight averaging. We use the official implementation5 with the recommended configuration: 3 layers, embedding size of 400, and hidden state size of 1150. Training is done with SGD. We use AWD-LSTM for PTB and WikiText-2 and follow the recommended settings for these two datasets. For scaling experiments, we decimate the hidden state size.
|
| 367 |
+
|
| 368 |
+
# B ERROR ESTIMATION EXPERIMENT
|
| 369 |
+
|
| 370 |
+
# B.1 EXPERIMENTAL DETAILS
|
| 371 |
+
|
| 372 |
+
In the experiment described in section 6, we fit a least squares regression model to find the best parameters minimizing the divergence $\delta ( m , n )$ - evaluated at configurations $m , n$ as in Table 1:
|
| 373 |
+
|
| 374 |
+
$$
|
| 375 |
+
\pmb { \theta } ^ { * } = \arg \operatorname* { m i n } _ { \pmb { \theta } } \sum _ { n , m } | \delta ( m , n ; \pmb { \theta } ) | ^ { 2 }
|
| 376 |
+
$$
|
| 377 |
+
|
| 378 |
+
We quantify the quality of the fit by the mean $\mu$ and standard deviation $\sigma$ of the fitted divergence by performing standard 10-fold cross validation over all points $( m , n )$ with confidence intervals reported as $\pm 1$ std over the folds.
|
| 379 |
+
|
| 380 |
+
# B.2 FOUND THETA VALUES
|
| 381 |
+
|
| 382 |
+
Table 2: Optimal values of $\pmb \theta$ as found by the least squres regression fitting the functional form.
|
| 383 |
+
(a) Image classification (fitting top 1 error).
|
| 384 |
+
|
| 385 |
+
<table><tr><td></td><td>α</td><td>β</td><td>b</td><td>C8</td><td>n</td></tr><tr><td>ImageNet</td><td>0.75</td><td>0.61</td><td>0.76</td><td>3.63</td><td>18.50</td></tr><tr><td>CIFAR10</td><td>0.66</td><td>0.53</td><td>5.87·10-02</td><td>7.14· 10-14</td><td>19.77</td></tr><tr><td>CIFAR100</td><td>0.70</td><td>0.51</td><td>0.15</td><td>0.71</td><td>6.93</td></tr><tr><td>DTD</td><td>0.40</td><td>1.16</td><td>4.30 · 10-05</td><td>1.27 · 10-09</td><td>0.85</td></tr><tr><td>Aircraft</td><td>1.10</td><td>0.83</td><td>3.47 · 10-03</td><td>5.16 : 10-10</td><td>1.13</td></tr><tr><td>UFC101</td><td>0.93</td><td>0.54</td><td>4.68· 10-02</td><td>1.16 : 10-09</td><td>2.98</td></tr><tr><td colspan="6">(b)Language modeling (fitting crossentropy1 loss).</td></tr><tr><td></td><td>α</td><td>β</td><td>b</td><td>Co</td><td>m</td><td>E0</td></tr><tr><td>PTB</td><td>0.81</td><td>0.34</td><td>0.15</td><td>5.00</td><td>6.27</td><td>6.10</td></tr><tr><td>WikiText-2</td><td>1.01</td><td>0.22</td><td>0.99</td><td>8.23</td><td>10.38</td><td>6.21</td></tr><tr><td>WikiText-103</td><td>0.74</td><td>0.56</td><td>0.33</td><td>9.04</td><td>16.34</td><td>6.60</td></tr></table>
|
| 386 |
+
|
| 387 |
+
# C ADDITIONAL ERROR LANDSCAPE MEASUREMENTS AND ESTIMATIONS
|
| 388 |
+
|
| 389 |
+
In this appendix, we provide error landscape measurements and estimations for all datasets, corresponding to the experiment in section 6. The results are shown in 3D graphs similar to figure 1. In each such graph, the $\mathbf { Z }$ -axis is the logarithm of the generalization error as a function of two independent variables: the model size $m$ and the data size $n$ .
|
| 390 |
+
|
| 391 |
+
The 3D graph is deliberately portrayed in log-log-log scale, as we cover a very large range of data scales and model scales and a correspondingly wide range of errors. This view is a useful one when one wishes to evaluate both large dynamic ranges (simultaneously both very large and very small values) and is especially vivid in portraying power-law like dependencies; a power-law naturally forms a straight line in a log-log view.
|
| 392 |
+
|
| 393 |
+
In each figure, subfigure (a) shows the measured error landscape is in log-log-log scale, where each point (blue dot) is the error resulting from training with a model/data configuration $m , n$ . Subfigure (b) shows the best-fit estimated error landscape. The surface is a linear interpolation between the points, which is then projected on the model-error $( m , \epsilon )$ , data-error $( n , \epsilon )$ , and model-data $( m , n )$ planes. The contour plots on each one of these planes are the projections of the error landscape surface, and are useful in considering the behavior of the surface when holding one dimension constant.
|
| 394 |
+
|
| 395 |
+
We call to attention several interesting observations on the datasets explored:
|
| 396 |
+
|
| 397 |
+
• As quantified rigorously in section 6, the fits perform well across error ranges. In these surfaces, one also gets qualitative sense of the fit adequacy across the wide ranges of the dataset and model scales directly. While perhaps slightly difficult to asses the surface directly, a helpful view is to consider the similarity between the projections of the actual and projected surfaces. With increasing model size, indeed typically the error does remain saturated. However, in one of our tested datasets (figure 12) there was a renewed slight increase. We verify that this is indeed over-fitting, in the sense that there is no corresponding increase in the training error. We note that the functional form we find can actually be used to veer clear of the $m , n$ regions where such over-fitting may occur.
|
| 398 |
+
• The simplifying approach taken by considering the random guess levels (and associated transitions) for small models or small data as identical, seems to work fairly well with some deviation apparent by examining figure 15. Indeed the simplification can hold well for balanced datasets, but need not for imbalanced ones such as in the task of language modeling. Thus, a relaxation of this simplification is expected to be important conceptually and practically.
|
| 399 |
+
|
| 400 |
+

|
| 401 |
+
Figure 7: ImageNet error landscape.
|
| 402 |
+
|
| 403 |
+

|
| 404 |
+
Figure 8: CIFAR10 error landscape.
|
| 405 |
+
|
| 406 |
+

|
| 407 |
+
Figure 9: CIFAR100 error landscape.
|
| 408 |
+
|
| 409 |
+

|
| 410 |
+
Figure 10: DTD error landscape.
|
| 411 |
+
|
| 412 |
+

|
| 413 |
+
Figure 11: Aircraft error landscape.
|
| 414 |
+
|
| 415 |
+

|
| 416 |
+
Figure 12: UFC101 error landscape.
|
| 417 |
+
|
| 418 |
+

|
| 419 |
+
Figure 13: PTB error landscape.
|
| 420 |
+
|
| 421 |
+

|
| 422 |
+
Figure 14: WikiText-2 error landscape.
|
| 423 |
+
|
| 424 |
+

|
| 425 |
+
Figure 15: WikiText-103 error landscape.
|
| 426 |
+
|
| 427 |
+
# D ADDITIONAL EXTRAPOLATION RESULTS
|
| 428 |
+
|
| 429 |
+
Here we provide detailed extrapolation results, for all datasets. All figures are structured in a similar way. Each subplot shows estimated (y-axis) vs. actual error $\mathbf { \dot { x } }$ -axis) (0 to 1 scale on both axes). Each subplot is located at the coordinate of the maximal data and model given for the task of performing the fit to the functional form in equation 5. This is the point at the top-right corner of the green dots in the illustration in figure 6a. The target is to find the error-landscape values for unseen, larger scales of both model and data (red points in the same illustration). Going from left to right in each figure indicates observed measurements of the error from models of an increasing fraction w.r.t the full size. Going from bottom-to top indicates observed measurements of the error from dataset sizes of an increasingly large fraction of the full dataset.
|
| 430 |
+
|
| 431 |
+
In each subplot, every point shows the estimated vs. actual error on a model-data configuration. Points that were given for fitting the function are colored in green, while unseen points that were not used are in red. The red points show the estimation error vs. actual error when extrapolating to all larger models and data sizes. In each subplot, the mean and standard deviation over all divergences $\delta$ at target points are given in text.
|
| 432 |
+
|
| 433 |
+
Each experiment fit of the parameters was repeated 100 times, with different random initializations of $\pmb { \theta }$ . The shaded bands show one standard deviation across these runs.
|
| 434 |
+
|
| 435 |
+
The quality of the extrapolation is critically dependent on the signal provided in the (green) fitted points. Two limiting factors are evident by examining the figures below, which both play a role in the well-posedness of the solution:
|
| 436 |
+
|
| 437 |
+
• The proximity to the initial random guess level. Only upon transitioning from the initial error plateau, does meaningful signal about the scaling rates become available. Indeed, for scales prior still in the region or close to the initial error level, one sees poor extrapolation results; see figures 18, 19, and 21, and the vivid origin of this phenomena by examining figures 11, 10, and 12. A second source of ill-posedness is tied to the number of configurations used for the estimation of $\pmb \theta$ . Clearly, when this is small, one cannot expect the extrapolation to be stable. In fact, at least two measurements in each scaling dimension (model/data) are needed, and no less than the number of parameters in $\pmb { \theta }$ in total. Indeed, for all the plots in this appendix, the smallest scale of $m , n$ is omitted form the graph such that the lowermost row and leftmost column span exactly two model and data scales correspondingly. Of course, there is nothing tying directly the number of points and scale of configurations measured, and one can decouple these two factors by taking closer spaced samples at small scale. • When both the above factors are not limiting the measurement, one readily sees that for divergences of no more than a few percent, it is sufficient to measure model/data configurations which are far-ranged from the configurations which one wishes to extrapolate to
|
| 438 |
+
|
| 439 |
+

|
| 440 |
+
Figure 16: ImageNet extrapolation results.
|
| 441 |
+
|
| 442 |
+

|
| 443 |
+
Figure 17: CIFAR100 Extrapolation Results
|
| 444 |
+
|
| 445 |
+

|
| 446 |
+
Figure 18: Aircraft extrapolation results.
|
| 447 |
+
|
| 448 |
+

|
| 449 |
+
Figure 19: DTD Results
|
| 450 |
+
|
| 451 |
+

|
| 452 |
+
Figure 20: CIFAR10 extrapolation results.
|
| 453 |
+
|
| 454 |
+

|
| 455 |
+
Figure 21: UCF101 extrapolation results.
|
| 456 |
+
|
| 457 |
+

|
| 458 |
+
Figure 22: PTB extrapolation results.
|
| 459 |
+
|
| 460 |
+

|
| 461 |
+
Figure 23: WikiText-2 extrapolation results.
|
| 462 |
+
|
| 463 |
+

|
| 464 |
+
Figure 24: WikiText-103 extrapolation results.
|
parse/train/ryenvpEKDr/ryenvpEKDr_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/ryenvpEKDr/ryenvpEKDr_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/ryenvpEKDr/ryenvpEKDr_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|