ZHANGYUXUAN-zR commited on
Commit
77dc9c6
·
verified ·
1 Parent(s): c66ae53

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. parse/train/Byj72udxe/Byj72udxe.md +297 -0
  2. parse/train/Byj72udxe/Byj72udxe_content_list.json +1557 -0
  3. parse/train/Byj72udxe/Byj72udxe_middle.json +0 -0
  4. parse/train/Byj72udxe/Byj72udxe_model.json +0 -0
  5. parse/train/HyRVBzap-/HyRVBzap-.md +307 -0
  6. parse/train/HyRVBzap-/HyRVBzap-_content_list.json +1591 -0
  7. parse/train/HyRVBzap-/HyRVBzap-_middle.json +0 -0
  8. parse/train/HyRVBzap-/HyRVBzap-_model.json +0 -0
  9. parse/train/RO4DM85Z4P7/RO4DM85Z4P7.md +192 -0
  10. parse/train/RO4DM85Z4P7/RO4DM85Z4P7_content_list.json +816 -0
  11. parse/train/RO4DM85Z4P7/RO4DM85Z4P7_middle.json +0 -0
  12. parse/train/RO4DM85Z4P7/RO4DM85Z4P7_model.json +0 -0
  13. parse/train/SkxSv6VFvS/SkxSv6VFvS.md +343 -0
  14. parse/train/SkxSv6VFvS/SkxSv6VFvS_content_list.json +1752 -0
  15. parse/train/SkxSv6VFvS/SkxSv6VFvS_middle.json +0 -0
  16. parse/train/SkxSv6VFvS/SkxSv6VFvS_model.json +0 -0
  17. parse/train/qG4ZVCCyCB0/qG4ZVCCyCB0.md +0 -0
  18. parse/train/qG4ZVCCyCB0/qG4ZVCCyCB0_content_list.json +0 -0
  19. parse/train/qG4ZVCCyCB0/qG4ZVCCyCB0_middle.json +0 -0
  20. parse/train/qG4ZVCCyCB0/qG4ZVCCyCB0_model.json +0 -0
  21. vlm/train/0lz69oI5iZP/0.png +3 -0
  22. vlm/train/0lz69oI5iZP/1.png +3 -0
  23. vlm/train/0lz69oI5iZP/11.png +3 -0
  24. vlm/train/0lz69oI5iZP/2.png +3 -0
  25. vlm/train/0lz69oI5iZP/3.png +3 -0
  26. vlm/train/0lz69oI5iZP/4.png +3 -0
  27. vlm/train/0lz69oI5iZP/5.png +3 -0
  28. vlm/train/0lz69oI5iZP/7.png +3 -0
  29. vlm/train/0lz69oI5iZP/8.png +3 -0
  30. vlm/train/0lz69oI5iZP/9.png +3 -0
  31. vlm/train/9uFiX_HRsIL/0.png +3 -0
  32. vlm/train/9uFiX_HRsIL/1.png +3 -0
  33. vlm/train/9uFiX_HRsIL/10.png +3 -0
  34. vlm/train/9uFiX_HRsIL/11.png +3 -0
  35. vlm/train/9uFiX_HRsIL/12.png +3 -0
  36. vlm/train/9uFiX_HRsIL/2.png +3 -0
  37. vlm/train/9uFiX_HRsIL/3.png +3 -0
  38. vlm/train/9uFiX_HRsIL/4.png +3 -0
  39. vlm/train/9uFiX_HRsIL/5.png +3 -0
  40. vlm/train/9uFiX_HRsIL/6.png +3 -0
  41. vlm/train/9uFiX_HRsIL/7.png +3 -0
  42. vlm/train/9uFiX_HRsIL/8.png +3 -0
  43. vlm/train/9uFiX_HRsIL/9.png +3 -0
  44. vlm/train/Aw96fN64soV/0.png +3 -0
  45. vlm/train/Aw96fN64soV/1.png +3 -0
  46. vlm/train/Aw96fN64soV/10.png +3 -0
  47. vlm/train/Aw96fN64soV/11.png +3 -0
  48. vlm/train/Aw96fN64soV/12.png +3 -0
  49. vlm/train/Aw96fN64soV/13.png +3 -0
  50. vlm/train/Aw96fN64soV/14.png +3 -0
parse/train/Byj72udxe/Byj72udxe.md ADDED
@@ -0,0 +1,297 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # POINTER SENTINEL MIXTURE MODELS
2
+
3
+ Stephen Merity, Caiming Xiong, James Bradbury & Richard Socher
4
+ MetaMind - A Salesforce Company
5
+ Palo Alto, CA, USA
6
+ {smerity,cxiong,james.bradbury,rsocher}@salesforce.com
7
+
8
+ # ABSTRACT
9
+
10
+ Recent neural network sequence models with softmax classifiers have achieved their best language modeling performance only with very large hidden states and large vocabularies. Even then they struggle to predict rare or unseen words even if the context makes the prediction unambiguous. We introduce the pointer sentinel mixture architecture for neural sequence models which has the ability to either reproduce a word from the recent context or produce a word from a standard softmax classifier. We explore applying the pointer sentinel mixture model to the LSTM, a standard recurrent neural network building block. Utilizing an LSTM that achieves 80.6 perplexity on the Penn Treebank, the pointer sentinel-LSTM model pushes perplexity down to 70.9 while using far fewer parameters than an LSTM that achieves similar results. In order to evaluate how well language models can exploit longer contexts and deal with more realistic vocabularies and corpora we also introduce the freely available WikiText corpus.1
11
+
12
+ # 1 INTRODUCTION
13
+
14
+ A major difficulty in language modeling is learning when to predict specific words from the immediate context. For instance, imagine a new person is introduced and two paragraphs later the context would allow one to very accurately predict this person’s name as the next word. For standard neural sequence models to predict this name, they would have to encode the name, store it for many time steps in their hidden state, and then decode it when appropriate. As the hidden state is limited in capacity and the optimization of such models suffer from the vanishing gradient problem, this is a lossy operation when performed over many timesteps. This is especially true for rare words.
15
+
16
+ Models with soft attention or memory components have been proposed to help deal with this challenge, aiming to allow for the retrieval and use of relevant previous hidden states, in effect increasing hidden state capacity and providing a path for gradients not tied to timesteps. Even with attention, the standard softmax classifier that is being used in these models often struggles to correctly predict rare or previously unknown words.
17
+
18
+ Pointer networks (Vinyals et al., 2015) provide one potential solution for rare and out of vocabulary (OoV) words as a pointer network uses attention to select an element from the input as output. This allows it to produce previously unseen input tokens. While pointer networks improve performance on rare words and long-term dependencies they are unable to select words that do not exist in the input.
19
+
20
+ We introduce a mixture model, illustrated in Fig. 1, that combines the advantages of standard softmax classifiers with those of a pointer component for effective and efficient language modeling. Rather than relying on the RNN hidden state to decide when to use the pointer, as in the recent work of Gulc¸ehre et al. ¨ (2016), we allow the pointer component itself to decide when to use the softmax vocabulary through a sentinel. The model improves the state of the art perplexity on the Penn Treebank. Since this commonly used dataset is small and no other freely available alternative exists that allows for learning long range dependencies, we also introduce a new benchmark dataset for language modeling called WikiText.
21
+
22
+ ![](images/8c26dfca638e32eea73667de18d4a96eb9d4f36a18ee233fb6986050ddd64f47.jpg)
23
+ Figure 1: Illustration of the pointer sentinel-RNN mixture model. $g$ is the mixture gate which uses the sentinel to dictate how much probability mass to give to the vocabulary.
24
+
25
+ # 2 THE POINTER SENTINEL FOR LANGUAGE MODELING
26
+
27
+ Given a sequence of words $w _ { 1 } , \ldots , w _ { N - 1 }$ , our task is to predict the next word $w _ { N }$
28
+
29
+ # 2.1 THE SOFTMAX-RNN COMPONENT
30
+
31
+ Recurrent neural networks (RNNs) have seen widespread use for language modeling (Mikolov et al., 2010) due to their ability to, at least in theory, retain long term dependencies. RNNs employ the chain rule to factorize the joint probabilities over a sequence of tokens: $p ( w _ { 1 } , \dots , w _ { N } ) =$ $\begin{array} { r } { \prod _ { i = 1 } ^ { N } p ( w _ { i } | w _ { 1 } , \dots , w _ { i - 1 } ) } \end{array}$ . More precisely, at each time step $i$ , we compute the RNN hidden state $h _ { i }$ according to the previous hidden state $h _ { i - 1 }$ and the input $x _ { i }$ such that $h _ { i } = R N N ( x _ { i } , h _ { i - 1 } )$ . When all the $N - 1$ words have been processed by the RNN, the final state $h _ { { N - 1 } }$ is fed into a softmax layer which computes the probability over a vocabulary of possible words: $p _ { \mathrm { v o c a b } } ( w ) =$ softmax $\left( U h _ { N - 1 } \right)$ , where $\mathbf { \Psi } _ { p _ { \mathrm { v o c a b } } } \in \dot { \mathbb { R } } ^ { V }$ , $U \in \mathbf { \overline { { R } } } ^ { V \times H }$ , $H$ is the hidden size, and $V$ the vocabulary size. RNNs can suffer from the vanishing gradient problem. The LSTM (Hochreiter & Schmidhuber, 1997) architecture has been proposed to deal with this by updating the hidden state according to a set of gates. Our work focuses on the LSTM but can be applied to any RNN architecture that ends in a vocabulary softmax.
32
+
33
+ # 2.2 THE POINTER NETWORK COMPONENT
34
+
35
+ In this section, we propose a modification to pointer networks for language modeling. To predict the next word in the sequence, a pointer network would select the member of the input sequence $p ( w _ { 1 } , \dots , w _ { N - 1 } )$ with the maximal attention score as the output.
36
+
37
+ The simplest way to compute an attention score for a specific hidden state is an inner product with all the past hidden states $h$ , with each hidden state $\boldsymbol { h } _ { i } ^ { \star } \in \mathbb { R } ^ { H }$ . However, if we want to compute such a score for the most recent word (since this word may be repeated), we need to include the last hidden state itself in this inner product. Taking the inner product of a vector with itself results in the vector’s magnitude squared, meaning the attention scores would be strongly biased towards the most recent word. Hence we project the current hidden state to a query vector $q$ first. To produce the query $q$ we compute $q = \mathrm { t a n h } ( W h _ { N - 1 } + b )$ , where $W \in \dot { \mathbb { R } ^ { H \times } } \mathbf { \check { \mathit { H } } }$ , $b \in \mathring { \mathbb { R } } ^ { H }$ , and $\boldsymbol { q } ^ { \mathbf { \lambda } } \in \mathbb { R } ^ { H }$ . To generate the pointer attention scores, we compute the match between the previous RNN output states $h _ { i }$ and the query $q$ by taking the inner product, followed by a softmax activation function to obtain a probability distribution:
38
+
39
+ $$
40
+ \begin{array} { r } { z _ { i } = q ^ { T } h _ { i } , } \\ { a = \mathrm { s o f t m a x } ( z ) , } \end{array}
41
+ $$
42
+
43
+ where $z \in \mathbb { R } ^ { L }$ , $a \in \mathbb { R } ^ { L }$ , and $L$ is the total number of hidden states. The probability mass assigned to a given word is the sum of the probability mass given to all token positions where the given word appears:
44
+
45
+ $$
46
+ p _ { \mathrm { p t r } } ( w ) = \sum _ { i \in I ( w , x ) } a _ { i } ,
47
+ $$
48
+
49
+ ![](images/0171833abe0201710740ca22ff0191abc247c1cd6f229bbb5f4880daf49a948b.jpg)
50
+ Figure 2: Visualization of the pointer sentinel-RNN mixture model. The query, produced from applying an MLP to the last output of the RNN, is used by the pointer network to identify likely matching words from the past. The $\odot$ nodes are inner products between the query and the RNN hidden states. If the pointer component is not confident, probability mass can be directed to the RNN by increasing the value of the mixture gate $g$ via the sentinel, seen in grey. If $g = 1$ then only the RNN is used. If $g = 0$ then only the pointer is used.
51
+
52
+ where $I ( w , x )$ results in all positions of the word $w$ in the input $x$ and $p _ { \mathrm { p t r } } \in \mathbb { R } ^ { V }$ . This technique, referred to as pointer sum attention, has been used for question answering (Kadlec et al., 2016).
53
+
54
+ Given the length of the documents used in language modeling, it may not be feasible for the pointer network to evaluate an attention score for all the words back to the beginning of the dataset. Instead, we may elect to maintain only a window of the $L$ most recent words for the pointer to match against. The length $L$ of the window is a hyperparameter that can be tuned on a held out dataset or by empirically analyzing how frequently a word at position $t$ appears within the last $L$ words.
55
+
56
+ To illustrate the advantages of this approach, consider a long article featuring two sentences President Obama discussed the economy and President Obama then flew to Prague. If the query was Which President is the article about?, probability mass could be applied to Obama in either sentence. If the question was instead Who flew to Prague?, only the latter occurrence of Obama provides the proper context. The attention sum model ensures that, as long as the entire attention probability mass is distributed on the occurrences of Obama, the pointer network can achieve zero loss. This flexibility provides supervision without forcing the model to put mass on supervision signals that may be incorrect or lack proper context.
57
+
58
+ # 2.3 THE POINTER SENTINEL MIXTURE MODEL
59
+
60
+ While pointer networks have proven to be effective, they cannot predict output words that are not present in the input, a common scenario in language modeling. We propose to resolve this by using a mixture model that combines a standard softmax with a pointer.
61
+
62
+ Our mixture model has two base distributions: the softmax vocabulary of the RNN output and the positional vocabulary of the pointer model. We refer to these as the RNN component and the pointer component respectively. To combine the two base distributions, we use a gating function $\bar { g } \ : = \ : p ( z _ { i } \ : = \ : k | x _ { i } )$ where $z _ { i }$ is the latent variable stating which base distribution the data point belongs to. As we only have two base distributions, $g$ can produce a scalar in the range $[ 0 , 1 ]$ . A value of 0 implies that only the pointer is used and 1 means only the softmax-RNN is used.
63
+
64
+ $$
65
+ p ( y _ { i } | x _ { i } ) = g p _ { \mathrm { v o c a b } } ( y _ { i } | x _ { i } ) + ( 1 - g ) p _ { \mathrm { p t r } } ( y _ { i } | x _ { i } ) .
66
+ $$
67
+
68
+ While the models could be entirely separate, we re-use many of the parameters for the softmaxRNN and pointer components. This sharing minimizes the total number of parameters in the model and capitalizes on the pointer network’s supervision for the RNN component.
69
+
70
+ # 2.4 DETAILS OF THE GATING FUNCTION
71
+
72
+ To compute the new pointer sentinel gate $g$ , we modify the pointer component. In particular, we add an additional element to $z$ , the vector of attention scores as defined in Eq. 1. This element is computed using an inner product between the query and the sentinel2 vector $s \in \mathbb { R } ^ { H }$ . This change can be summarized by changing Eq. 2 to $a = \operatorname { \bar { s o f t m a x } } \left( \left[ z ; q ^ { T } s \right] \right)$ . We define $a \in \mathbb { R } ^ { V + 1 }$ to be the attention distribution over both the words in the pointer window as well as the sentinel state. We interpret the last element of this vector to be the gate value: $g = a [ V + 1 ]$ .
73
+
74
+ Any probability mass assigned to $g$ is given to the standard softmax vocabulary of the RNN. The final updated, normalized pointer probability over the vocabulary in the window then becomes:
75
+
76
+ $$
77
+ p _ { \mathrm { p t r } } ( y _ { i } | x _ { i } ) = \frac { 1 } { 1 - g } a [ 1 : V ] ,
78
+ $$
79
+
80
+ where we denoted $[ 1 : V ]$ to mean the first $V$ elements of the vector. The final mixture model is the same as Eq. 4 but with the updated Eq. 5 for the pointer probability.
81
+
82
+ This setup encourages the model to have both components compete: use pointers whenever possible and back-off to the standard softmax otherwise. By integrating the gating function into the pointer computation, it is influenced by both the RNN hidden state and the pointer window’s hidden states.
83
+
84
+ # 2.5 MOTIVATION FOR THE SENTINEL AS GATING FUNCTION
85
+
86
+ To make the best decision possible regarding which component to use the gating function must have as much context as possible. As we increase the window of words for the pointer component to consider, the RNN hidden state by itself isn’t guaranteed to accurately recall the identity or order of words it has recently seen (Adi et al., 2016). This is an obvious limitation of encoding a variable length sequence into a fixed dimensionality vector.
87
+
88
+ If we want a pointer window where the length $L$ is in the hundreds, accurately modeling all of this information within the RNN hidden state is impractical. The position of specific words is also a vital feature as relevant words eventually fall out of the pointer component’s window. To correctly model this would require the RNN hidden state to store both the identity and position of each word in the pointer window. This is far beyond the capability of the fixed dimensionality RNN hidden state.
89
+
90
+ For this reason, we integrate the gating function directly into the pointer network by use of the sentinel. The decision to back-off to the softmax vocabulary is then informed by both the query $q$ , generated using the RNN hidden state $h _ { N - 1 }$ , and from the contents of the hidden states in the pointer window itself. This allows the model to accurately query what hidden states are contained in the pointer window and avoid maintaining state for words that may have fallen out of the window.
91
+
92
+ # 2.6 POINTER SENTINEL LOSS FUNCTION
93
+
94
+ We minimize the cross-entropy loss of $\begin{array} { r } { - \sum _ { j } \hat { y _ { i j } } \log p \big ( y _ { i j } | x _ { i } \big ) } \end{array}$ , where $\hat { y } _ { i }$ is a one hot encoding of the correct output. During training, as $\hat { y } _ { i }$ is one hot, only a single mixed probability $p ( y _ { i j } )$ must be computed for calculating the loss. This can result in a far more efficient GPU implementation. At prediction time, when we want all values for $p ( y _ { i } | x _ { i } )$ , a maximum of $L$ word probabilities must be mixed, as there is a maximum of $L$ unique words in the pointer window of length $L$ . This mixing can occur on the CPU where random access indexing is more efficient than the GPU.
95
+
96
+ Following the pointer sum attention network, the aim is to place probability mass from the attention mechanism on the correct output $\hat { y } _ { i }$ if it exists in the input. In the case of our mixture model the pointer loss instead becomes $\begin{array} { r } { - \log \left( g + \sum _ { i \in I ( y , x ) } a _ { i } \right) } \end{array}$ , where $I ( y , x )$ results in all positions of the correct output $y$ in the input $x$ . The gate $g$ may be assigned all probability mass if, for instance, the correct output $\hat { y } _ { i }$ exists only in the softmax-RNN vocabulary. There is no penalty if the model places the entire probability mass on any of the instances of the correct word in the input window. If the pointer component places the entirety of the probability mass on the gate $g$ , the pointer network incurs no penalty and the loss is entirely determined by the loss of the softmax-RNN component.
97
+
98
+ Table 1: Statistics of the Penn Treebank, WikiText-2, and WikiText-103. The out of vocabulary $\left( \mathrm { O o V } \right)$ rate notes what percentage of tokens have been replaced by an $\left. u n k \right.$ token. The token count includes newlines which add to the structure of the WikiText datasets.
99
+
100
+ <table><tr><td rowspan="2"></td><td colspan="3">Penn Treebank Test</td><td colspan="3">WikiText-2 Test</td><td colspan="3">WikiText-103</td></tr><tr><td colspan="3">Train Valid</td><td colspan="3">Train Valid</td><td colspan="3">Train Valid</td></tr><tr><td>Articles</td><td>-</td><td>-</td><td>-</td><td>600</td><td>60</td><td>60</td><td>28,475</td><td>60</td><td>Test 60</td></tr><tr><td>Tokens</td><td>929k</td><td>73k 10,000</td><td>82k</td><td>2,088k</td><td>217k</td><td>245k</td><td>103,227k</td><td>217k</td><td>245k</td></tr><tr><td>Vocab size OoV rate</td><td colspan="3">4.8%</td><td></td><td colspan="3">33,278 2.6%</td><td colspan="3">267,735 0.4%</td></tr></table>
101
+
102
+ # 2.7 PARAMETERS AND COMPUTATION TIME
103
+
104
+ The pointer sentinel-LSTM mixture model results in a relatively minor increase in parameters and computation time, especially when compared to the model size required to achieve similar performance using a standard LSTM. The only two additional parameters required by the model are those required for computing $q$ , specifically $\dot { W } \in \mathbb { R } ^ { H \times H }$ and $\bar { b } \in \mathbb { R } ^ { H }$ , and the sentinel vector embedding, $s \in \mathbb { R } ^ { H }$ . This is independent of the depth of the RNN as the pointer component only interacts with the output of the final RNN layer. The additional $H ^ { 2 } + 2 H \bar { }$ parameters are minor compared to a single LSTM layer’s $8 H ^ { 2 } + 4 \dot { H }$ parameters. Most models also use multiple LSTM layers.
105
+
106
+ In terms of additional computation, a pointer sentinel-LSTM of window size $L$ only requires computing the query $q$ (a linear layer with tanh activation), a total of $L$ parallelizable inner product calculations, and the attention scores for the $L$ resulting scalars via the softmax function.
107
+
108
+ # 3 RELATED WORK
109
+
110
+ Considerable research has been dedicated to the task of language modeling, from traditional machine learning techniques such as n-grams to deep neural sequence models.
111
+
112
+ Mixture models composed of various knowledge sources have been proposed in the past for language modeling. Rosenfeld (1996) uses a maximum entropy model to combine a variety of information sources to improve language modeling on news text and speech. These information sources include complex overlapping n-gram distributions and n-gram caches that aim to capture rare words.
113
+
114
+ Beyond n-grams, neural sequence models such as recurrent neural networks have been shown to achieve state of the art results (Mikolov et al., 2010). A variety of RNN regularization methods have been explored, including a number of dropout variations (Zaremba et al., 2014; Gal, 2015) which prevent overfitting of complex LSTM language models. Other work has modified the RNN architecture to better handle increased recurrence depth (Zilly et al., 2016).
115
+
116
+ In order to increase capacity and minimize the impact of vanishing gradients, some language and translation models have also added a soft attention or memory component (Bahdanau et al., 2015; Sukhbaatar et al., 2015; Cheng et al., 2016; Kumar et al., 2016; Xiong et al., 2016; Ahn et al., 2016). These mechanisms allow for the retrieval and use of relevant previous hidden states. Soft attention mechanisms need to first encode the relevant word into a state vector and then decode it again, even if the output word is identical to the input word used to compute that hidden state or memory. A drawback to soft attention is that if, for instance, January and March are both equally attended candidates, the attention mechanism may blend the two vectors, resulting in a context vector closest to February (Kadlec et al., 2016). Even with attention, the standard softmax classifier being used in these models often struggles to correctly predict rare or previously unknown words.
117
+
118
+ Attention-based pointer mechanisms were introduced in Vinyals et al. (2015) where the pointer network is able to select elements from the input as output. In the above example, only January or March would be available as options, as February does not appear in the input. The use of pointer networks have been shown to help with geometric problems (Vinyals et al., 2015), code generation (Ling et al., 2016), summarization (Gu et al., 2016; Gulc¸ehre et al. ¨ , 2016), question answering (Kadlec et al., 2016). While pointer networks improve performance on rare words and long-term dependencies they are unable to select words that do not exist in the input.
119
+
120
+ Gulc¸ehre et al. ¨ (2016) introduce a pointer softmax model that can generate output from either the vocabulary softmax of an RNN or the location softmax of the pointer network. Not only does this allow for producing OoV words which are not in the input, the pointer softmax model is able to better deal with rare and unknown words than a model only featuring an RNN softmax. Rather than constructing a mixture model as in our work, they use a switching network to decide which component to use. For neural machine translation, the switching network is conditioned on the representation of the context of the source text and the hidden state of the decoder. The pointer network is not used as a source of information for the switching network as in our model. The pointer and RNN softmax are scaled according to the switching network and the word or location with the highest final attention score is selected for output. Although this approach uses both a pointer and RNN component, it is not a mixture model and does not combine the probabilities for a word if it occurs in both the pointer location softmax and the RNN vocabulary softmax. In our model the word probability is a mix of both the RNN and pointer components, allowing for better predictions when the context may be ambiguous.
121
+
122
+ Extending this concept further, the latent predictor network (Ling et al., 2016) generates an output sequence conditioned on an arbitrary number of base models where each base model may have differing granularity. In their task of code generation, the output could be produced one character at a time using a standard softmax or instead copy entire words from referenced text fields using a pointer network. As opposed to Gulc¸ehre et al. ¨ (2016), all states which produce the same output are merged by summing their probabilities. The model requires a complex training process involving the forward-backward algorithm for Semi-Markov models to prevent an exponential path explosion.
123
+
124
+ # 4 WIKITEXT - A BENCHMARK FOR LANGUAGE MODELING
125
+
126
+ We first describe the most commonly used language modeling dataset and its pre-processing in order to then motivate the need for a new benchmark dataset.
127
+
128
+ # 4.1 PENN TREEBANK
129
+
130
+ In order to compare our model to the many recent neural language models, we conduct word-level prediction experiments on the Penn Treebank (PTB) dataset (Marcus et al., 1993), pre-processed by Mikolov et al. (2010). The dataset consists of $9 2 9 \mathrm { k }$ training, $7 3 \mathrm { k }$ validation, and ${ } ^ { 8 2 \mathrm { k } }$ test words. As part of the pre-processing performed by Mikolov et al. (2010), words were lower-cased, numbers were replaced with N, newlines were replaced with $\langle e o s \rangle$ , and all other punctuation was removed. The vocabulary is the most frequent 10k words with OoV tokens replaced by an $\left. u n k \right.$ token. For full statistics, refer to Table 1.
131
+
132
+ # 4.2 REASONS FOR A NEW DATASET
133
+
134
+ While the processed version of the PTB above has been frequently used for language modeling, it has many limitations. The tokens in PTB are all lower case, stripped of any punctuation, and limited to a vocabulary of only 10k words. These limitations mean that the PTB is unrealistic for real language use, especially when far larger vocabularies with many rare words are involved. The appendix contains a graph illustrating this using a Zipfian plot over the training partition of the PTB, with the curve stopping abruptly at the 10k limit. Given that accurately predicting rare words, such as named entities, is an important task for many applications, the lack of a long tail is problematic.
135
+
136
+ Other larger scale language modeling datasets exist. Unfortunately, they either have restrictive licensing which prevents widespread use or have randomized sentence ordering (Chelba et al., 2013) which is unrealistic for most language use and prevents the effective learning and evaluation of longer term dependencies. Hence, we constructed a language modeling dataset using text extracted from Wikipedia and have made this available to the community.
137
+
138
+ # 4.3 CONSTRUCTION AND PRE-PROCESSING
139
+
140
+ We selected articles only fitting the Good or Featured article criteria specified by editors on Wikipedia. These articles have been reviewed by humans and are considered well written, factually accurate, broad in coverage, neutral in point of view, and stable. This resulted in 23,805 Good articles and 4,790 Featured articles. The text for each article was extracted using the Wikipedia API. Extracting text from Wikipedia mark-up is nontrivial due to the large number of macros in use, used for metric conversions, abbreviations, language notation, and date handling.
141
+
142
+ Once extracted, specific sections which primarily featured lists were removed by default. Other minor bugs, such as sort keys and Edit buttons that leaked in from the HTML, were also removed. Mathematical formulae and $\mathrm { { I A T } _ { E } X }$ code were replaced with $\langle f o r m u l a \rangle$ tokens. Normalization and tokenization were performed using the Moses tokenizer (Koehn et al., 2007), slightly augmented to further split numbers $( 8 , 6 0 0 8 \ \textcircled { \omega } , @ \ 6 0 0 )$ and with some additional minor fixes. Following Chelba et al. (2013) a vocabulary was constructed by discarding all words with a count below 3. Words outside of the vocabulary were mapped to the $\left. u n k \right.$ token, also a part of the vocabulary.
143
+
144
+ # 4.4 STATISTICS
145
+
146
+ The full WikiText dataset is over 103 million words in size, a hundred times larger than the PTB. It is also a tenth the size of the One Billion Word Benchmark (Chelba et al., 2013), one of the largest publicly available language modeling benchmarks, whilst consisting of articles that allow for the capture and usage of longer term dependencies as might be found in many real world tasks.
147
+
148
+ The dataset is available in two different sizes: WikiText-2 and WikiText-103. Both feature punctuation, original casing, a larger vocabulary, and numbers. WikiText-2 is two times the size of the Penn Treebank dataset. WikiText-103 features all extracted articles. Both datasets use the same articles for validation and testing, only differing in the vocabularies. For full statistics, refer to Table 1.
149
+
150
+ # 5 EXPERIMENTS
151
+
152
+ # 5.1 TRAINING DETAILS
153
+
154
+ As the pointer sentinel mixture model uses the outputs of the RNN from up to $L$ timesteps back, this presents a challenge for training. If we do not regenerate the stale historical outputs of the RNN when we update the gradients, backpropagation through these stale outputs may result in incorrect gradient updates. If we do regenerate all stale outputs of the RNN, the training process is far slower. As we can make no theoretical guarantees on the impact of stale outputs on gradient updates, we opt to regenerate the window of RNN outputs used by the pointer component after each gradient update.
155
+
156
+ We also use truncated backpropagation through time (BPTT) in a different manner to many other RNN language models. Truncated BPTT allows for practical time-efficient training of RNN models but has fundamental trade-offs that are rarely discussed. For running truncated BPTT, BPTT is run for $k _ { 2 }$ timesteps once every $k _ { 1 }$ timesteps. For many RNN language modeling training schemes, $k _ { 1 } = k _ { 2 }$ , meaning that every $k$ timesteps truncated BPTT is performed for the $k$ previous timesteps. This results in only a single RNN output receiving backpropagation for $k$ timesteps, with the other extreme being that the first token receives backpropagation for 0 timesteps. As such, most words in the training data will never experience a full backpropagation for $k$ timesteps.
157
+
158
+ In our task, the pointer component always looks $L$ timesteps into the past if $L$ past timesteps are available. We select $k _ { 1 } = 1$ and $k _ { 2 } = L$ such that for each timestep we perform backpropagation for $L$ timesteps and advance one timestep at a time. Only the loss for the final predicted word is used for backpropagation through the window.
159
+
160
+ # 5.2 MODEL DETAILS
161
+
162
+ Our experimental setup reflects that of Zaremba et al. (2014) and Gal (2015). We increased the number of timesteps used during training from 35 to 100, matching the length of the window $L$ . Batch size was increased to 32 from 20. We also halve the learning rate when validation perplexity is worse than the previous iteration, stopping training when validation perplexity fails to improve for three epochs or when 64 epochs are reached. The gradients are rescaled if their global norm exceeds 1 (Pascanu et al., 2013b).3 We evaluate the medium model configuration which features a two layer
163
+
164
+ Table 2: Single model perplexity on validation and test sets for the Penn Treebank language modeling task. For our models and the models of Zaremba et al. (2014) and Gal (2015), medium and large refer to a 650 and 1500 unit two layer LSTM respectively. Parameter numbers with $^ \ddag$ are estimates based upon our understanding of the model and with reference to Kim et al. (2016).
165
+
166
+ <table><tr><td>Model</td><td>Parameters</td><td>Validation</td><td>Test</td></tr><tr><td>Mikolov &amp; Zweig (2012) - KN-5</td><td>2M</td><td></td><td>141.2</td></tr><tr><td>Mikolov &amp; Zweig (2012) - KN5 + cache</td><td>2M</td><td></td><td>125.7</td></tr><tr><td>Mikolov&amp;Zweig g(2012) -RNN</td><td>6M</td><td></td><td>124.7</td></tr><tr><td>Mikolov&amp;Zweig g(2012)-RNN-LDA</td><td>7M</td><td></td><td>113.7</td></tr><tr><td>Mikolov &amp; Zweig ( g(2012) - RNN-LDA + KN-5 +cache</td><td>9M</td><td></td><td>92.0</td></tr><tr><td>Pascanu et al. (2013a) - Deep RNN</td><td>6M</td><td></td><td>107.5</td></tr><tr><td>Cheng et al. (2014) - Sum-Prod Net</td><td>5Mt</td><td>一</td><td>100.0</td></tr><tr><td>Zaremba et al. (2014) - LSTM (medium) Zaremba et al. (2014) - LSTM (large)</td><td>20M</td><td>86.2</td><td>82.7</td></tr><tr><td>Gal (2015) - Variational LSTM (medium, untied)</td><td>66M</td><td>82.2</td><td>78.4</td></tr><tr><td>Gal (2015) - Variational LSTM (medium,untied, MC)</td><td>20M 20M</td><td>81.9 ± 0.2</td><td>79.7 ± 0.1</td></tr><tr><td>Gal (2015) - Variational LSTM (large,untied)</td><td>66M</td><td>一</td><td>78.6 ±0.1</td></tr><tr><td>Gal (2015) - Variational LSTM (large,untied, MC)</td><td></td><td>77.9 ± 0.3</td><td>75.2 ± 0.2</td></tr><tr><td>Kim etal. (2016) - CharCNN</td><td>66M 19M</td><td>1</td><td>73.4± 0.0</td></tr><tr><td>Zilly et al. (2016) - Variational RHN</td><td>32M</td><td>一</td><td>78.9</td></tr><tr><td></td><td></td><td>72.8</td><td>71.3</td></tr><tr><td>Zoneout + Variational LSTM (medium)</td><td>20M</td><td>84.4</td><td>80.6</td></tr><tr><td>Pointer Sentinel-LSTM (medium)</td><td>21M</td><td>72.4</td><td>70.9</td></tr></table>
167
+
168
+ LSTM of hidden size 650. We compare against the large model configuration which features a two layer LSTM of hidden size 1500.
169
+
170
+ We produce results for two model types, an LSTM model that uses dropout regularization and the pointer sentinel-LSTM model. The variants of dropout used were zoneout (Krueger et al., 2016) and variational inference based dropout (Gal, 2015). Zoneout, which stochastically forces some recurrent units to maintain their previous values, was used for the recurrent connections within the LSTM. Variational inference based dropout, where the dropout mask for a layer is locked across timesteps, was used on the input to each RNN layer and also on the output of the final RNN layer. We used a value of 0.5 for both dropout connections.
171
+
172
+ # 5.3 COMPARISON OVER PENN TREEBANK
173
+
174
+ Table 2 compares the pointer sentinel-LSTM to a variety of other models on the Penn Treebank dataset. The pointer sentinel-LSTM achieves the lowest perplexity, followed by the recent Recurrent Highway Networks (Zilly et al., 2016). The medium pointer sentinel-LSTM model also achieves lower perplexity than the large LSTM models. Note that the best performing large variational LSTM model uses computationally intensive Monte Carlo (MC) dropout averaging. Monte Carlo dropout averaging is a general improvement for any sequence model that uses dropout but comes at a greatly increased test time cost. In Gal (2015) it requires rerunning the test model with 1000 different dropout masks. The pointer sentinel-LSTM is able to achieve these results with far fewer parameters than other models with comparable performance, specifically with less than a third the parameters used in the large variational LSTM models.
175
+
176
+ We also test a variational LSTM that uses zoneout, which serves as the RNN component of our pointer sentinel-LSTM mixture. This variational LSTM model performs BPTT for the same length $L$ as the pointer sentinel-LSTM, where $L = 1 0 0$ timesteps. The results for this model ablation are worse than that of Gal (2015)’s variational LSTM without Monte Carlo dropout averaging.
177
+
178
+ # 5.4 COMPARISON OVER WIKITEXT-2
179
+
180
+ As WikiText-2 is being introduced in this dataset, there are no existing baselines. We provide two baselines to compare the pointer sentinel-LSTM against: our variational LSTM using zoneout and
181
+
182
+ <table><tr><td>Model</td><td>Parameters</td><td>Validation</td><td>Test</td></tr><tr><td>Variational LSTM implementation from Gal (2015)</td><td>20M</td><td>101.7</td><td>96.3</td></tr><tr><td>Zoneout + Variational LSTM</td><td>20M</td><td>108.7</td><td>100.9</td></tr><tr><td>Pointer Sentinel-LSTM</td><td>21M</td><td>84.8</td><td>80.8</td></tr></table>
183
+
184
+ Table 3: Single model perplexity on validation and test sets for the WikiText-2 language modeling task. All compared models use a two layer LSTM with a hidden size of 650.
185
+
186
+ the medium variational LSTM used in Gal (2015).4 Attempts to run the Gal (2015) large model variant, a two layer LSTM with hidden size 1500, resulted in out of memory errors on a 12GB K80 GPU, likely due to the increased vocabulary size. We chose the best hyperparameters from PTB experiments for all models. Table 3 shows a similar gain made by the pointer sentinel-LSTM over the variational LSTM models. The variational LSTM from Gal (2015) again beats out the variational LSTM used as a base for our experiments.
187
+
188
+ # 6 ANALYSIS
189
+
190
+ # 6.1 IMPACT ON RARE WORDS
191
+
192
+ A hypothesis as to why the pointer sentinel-LSTM can outperform an LSTM is that the pointer component allows the model to effectively reproduce rare words. The RNN may better use hidden state capacity by relying on the pointer component. The pointer component may also allow for a sharper selection of a single word than may be possible using only the softmax.
193
+
194
+ The appendix contains a graph which shows the improvement of perplexity when comparing the LSTM to the pointer sentinel-LSTM. Words are split across buckets according to frequency. As the words become rarer, the pointer sentinel-LSTM has stronger improvements in perplexity. Even on the Penn Treebank, where there is a relative absence of rare words due to only selecting the most frequent 10k words, we can see the pointer sentinel-LSTM mixture model provides a direct benefit.
195
+
196
+ While the improvements are largest on rare words, we can see the pointer sentinel-LSTM is still helpful on relatively frequent words. This may be the pointer component directly selecting the word or through the pointer supervision signal improving the RNN by allowing gradients to flow directly to other occurrences of the word in that window.
197
+
198
+ # 6.2 QUALITATIVE ANALYSIS OF POINTER USAGE
199
+
200
+ In a qualitative analysis, we visualized the gate use and pointer attention for a variety of examples in the validation set, focusing on predictions where the gate primarily used the pointer component. These visualizations are available in the appendix.
201
+
202
+ As expected, the pointer component is heavily used for rare names such as Seidman (23 times in training), Iverson (7 times in training), and Rosenthal (3 times in training). The pointer component was also heavily used when it came to other named entity names such as companies like Honeywell (8 times in training) and Integrated (41 times in training, though due to lowercasing of words this includes integrated circuits, fully integrated, and other generic usage). Surprisingly, the pointer component was also used for many frequent tokens. For selecting units of measurement (tons, kilograms, . . . ) or the short scale of numbers (thousands, millions, billions, . . . ), the pointer would refer to recent usage. This is to be expected, especially when phrases are of the form increased from N tons to N tons. The model can even be found relying on a mixture of the softmax and the pointer for predicting frequent verbs such as said.
203
+
204
+ Finally, the pointer component can be seen pointing to words at the very end of the 100 word window (position 97), a far longer horizon than the 35 steps that most language models truncate their backpropagation training to. This illustrates why the gating function must be integrated into the pointer component. If the gating function could only use the RNN hidden state, it would need to be wary of words that were near the tail of the pointer, especially if it was not able to accurately track exactly how long it was since seeing a word. By integrating the gating function into the pointer component, we avoid the RNN hidden state having to maintain this intensive bookkeeping.
205
+
206
+ # 7 CONCLUSION
207
+
208
+ We introduced the pointer sentinel mixture model and the WikiText language modeling dataset. The pointer sentinel mixture model can be applied to any classifier that ends in a softmax, including various recurrent neural network building blocks. When applied to a standard LSTM, the pointer sentinel-LSTM achieves state of the art results in language modeling over the Penn Treebank while using few additional parameters and little additional computational complexity at prediction time.
209
+
210
+ We have also motivated the need to move from Penn Treebank to a new language modeling dataset for long range dependencies, providing WikiText-2 and WikiText-103 as potential options. We hope these new datasets can serve as a platform to improve handling of rare words and the usage of long term dependencies in language modeling.
211
+
212
+ # REFERENCES
213
+
214
+ Yossi Adi, Einat Kermany, Yonatan Belinkov, Ofer Lavi, and Yoav Goldberg. Fine-grained Analysis of Sentence Embeddings Using Auxiliary Prediction Tasks. arXiv preprint arXiv:1608.04207, 2016.
215
+ Sungjin Ahn, Heeyoul Choi, Tanel Parnamaa, and Yoshua Bengio. A Neural Knowledge Language ¨ Model. CoRR, abs/1608.00318, 2016.
216
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural Machine Translation by Jointly Learning to Align and Translate. In ICLR, 2015.
217
+ 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.
218
+ Jianpeng Cheng, Li Dong, and Mirella Lapata. Long Short-Term Memory-Networks for Machine Reading. CoRR, abs/1601.06733, 2016.
219
+ Wei-Chen Cheng, Stanley Kok, Hoai Vu Pham, Hai Leong Chieu, and Kian Ming Adam Chai. Language Modeling with Sum-Product Networks. In INTERSPEECH, 2014.
220
+ Yarin Gal. A Theoretically Grounded Application of Dropout in Recurrent Neural Networks. arXiv preprint arXiv:1512.05287, 2015.
221
+ Jiatao Gu, Zhengdong Lu, Hang Li, and Victor O. K. Li. Incorporating Copying Mechanism in Sequence-to-Sequence Learning. CoRR, abs/1603.06393, 2016.
222
+ C¸ aglar Gulc¸ehre, Sungjin Ahn, Ramesh Nallapati, Bowen Zhou, and Yoshua Bengio. Pointing the ¨ Unknown Words. arXiv preprint arXiv:1603.08148, 2016.
223
+ Sepp Hochreiter and Jurgen Schmidhuber. Long Short-Term Memory. ¨ Neural Computation, 9(8): 1735–1780, Nov 1997. ISSN 0899-7667.
224
+ Rudolf Kadlec, Martin Schmid, Ondrej Bajgar, and Jan Kleindienst. Text Understanding with the Attention Sum Reader Network. arXiv preprint arXiv:1603.01547, 2016.
225
+ Yoon Kim, Yacine Jernite, David Sontag, and Alexander M. Rush. Character-aware neural language models. CoRR, abs/1508.06615, 2016.
226
+ Philipp Koehn, Hieu Hoang, Alexandra Birch, Chris Callison-Burch, Marcello Federico, Nicola Bertoldi, Brooke Cowan, Wade Shen, Christine Moran, Richard Zens, Chris Dyer, Ondej Bojar, Alexandra Constantin, and Evan Herbst. Moses: Open Source Toolkit for Statistical Machine Translation. In ACL, 2007.
227
+
228
+ David Krueger, Tegan Maharaj, Janos Kram ´ ar, Mohammad Pezeshki, Nicolas Ballas, Nan Rosemary ´ Ke, Anirudh Goyal, Yoshua Bengio, Hugo Larochelle, Aaron Courville, et al. Zoneout: Regularizing RNNs by Randomly Preserving Hidden Activations. arXiv preprint arXiv:1606.01305, 2016.
229
+
230
+ Ankit Kumar, Ozan Irsoy, Peter Ondruska, Mohit Iyyer, James Bradbury, Ishaan Gulrajani, Victor Zhong, Romain Paulus, and Richard Socher. Ask me anything: Dynamic memory networks for natural language processing. In ICML, 2016.
231
+
232
+ Wang Ling, Edward Grefenstette, Karl Moritz Hermann, Tomas Kocisk ´ y, Andrew Senior, ´ Fumin Wang, and Phil Blunsom. Latent Predictor Networks for Code Generation. CoRR, abs/1603.06744, 2016.
233
+
234
+ Mitchell P. Marcus, Beatrice Santorini, and Mary Ann Marcinkiewicz. Building a Large Annotated Corpus of English: The Penn Treebank. Computational Linguistics, 19:313–330, 1993.
235
+
236
+ Tomas Mikolov and Geoffrey Zweig. Context dependent recurrent neural network language model. In SLT, 2012.
237
+
238
+ Tomas Mikolov, Martin Karafiat, Luk ´ as Burget, Jan Cernock ´ y, and Sanjeev Khudanpur. Recurrent ´ neural network based language model. In INTERSPEECH, 2010.
239
+
240
+ Razvan Pascanu, C¸ aglar Gulc¸ehre, Kyunghyun Cho, and Yoshua Bengio. How to Construct Deep ¨ Recurrent Neural Networks. CoRR, abs/1312.6026, 2013a.
241
+
242
+ Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the difficulty of training recurrent neural networks. In ICML, 2013b.
243
+
244
+ Roni Rosenfeld. A Maximum Entropy Approach to Adaptive Statistical Language Modeling. 1996.
245
+
246
+ Sainbayar Sukhbaatar, Arthur Szlam, Jason Weston, and Rob Fergus. End-To-End Memory Networks. In NIPS, 2015.
247
+
248
+ Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. Pointer networks. In Advances in Neural Information Processing Systems, pp. 2692–2700, 2015.
249
+
250
+ Caiming Xiong, Stephen Merity, and Richard Socher. Dynamic Memory Networks for Visual and Textual Question Answering. In ICML, 2016.
251
+
252
+ Wojciech Zaremba, Ilya Sutskever, and Oriol Vinyals. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, 2014.
253
+
254
+ Julian Georg Zilly, Rupesh Kumar Srivastava, Jan Koutn´ık, and Jurgen Schmidhuber. Recurrent ¨ Highway Networks. arXiv preprint arXiv:1607.03474, 2016.
255
+
256
+ # APPENDIX
257
+
258
+ ![](images/c45d689e3a9e29ba2e76713a83dcf9f4d4092e2ed8fea40c92d7c483e5b46e8e.jpg)
259
+ Figure A1: Mean difference in log perplexity on PTB when using the pointer sentinel-LSTM compared to the LSTM model. Words were sorted by frequency and split into equal sized buckets.
260
+
261
+ # POINTER USAGE ON THE PENN TREEBANK
262
+
263
+ For a qualitative analysis, we visualize how the pointer component is used within the pointer sentinel mixture model. The gate refers to the result of the gating function, with 1 indicating the RNN component is exclusively used whilst 0 indicates the pointer component is exclusively used. We begin with predictions that are using the RNN component primarily and move to ones that use the pointer component primarily.
264
+
265
+ ![](images/bfe1101a2fb87f4dcc5d4a29f6b3f7d8300c9eaa08d693f87d33a6263f3313bb.jpg)
266
+ Figure A2: In predicting the fall season has been a good one especially for those retailers, the pointer component suggests many words from the historical window that would fit - retailers, investments, chains, and institutions. The gate is still primarily weighted towards the RNN component however.
267
+
268
+ ![](images/74f8b37f282e29b8fa0aba935aeef9ab0765afe5633d21f65b8558f8effb4fca.jpg)
269
+ Figure A3: In predicting the national cancer institute also projected that overall u.s. mortality, the pointer component is focused on mortality and rates, both of which would fit. The gate is still primarily weighted towards the RNN component.
270
+
271
+ ![](images/29f2ee31d97f97d485e728471fd2cd3eb34ab3a8f310dc8086e09059401473fd.jpg)
272
+ Figure A4: In predicting people do n’t seem to be unhappy with it he said, the pointer component correctly selects said and is almost equally weighted with the RNN component. This is surprising given how frequent the word said is used within the Penn Treebank.
273
+
274
+ ![](images/ef168c7e1ca9bc89964097cbd337eb2c1028caa5e8e233bb485daa4283e232c1.jpg)
275
+ Figure A5: For predicting the federal government has had to pump in $\$ 1$ N billion, the pointer component focuses on the recent usage of billion with highly similar context. The pointer component is also relied upon more heavily than the RNN component - surprising given the frequency of billion within the Penn Treebank and that the usage was quite recent.
276
+
277
+ ![](images/dd311d97c72a9f4fa21add99ecf8515494eb4cc97c98fcb7f45e7fd312eb7776.jpg)
278
+ Figure A6: For predicting $\left. u n k \right.$ ’s ghost sometimes runs through the e ring dressed like gen. noriega, the pointer component reaches 97 timesteps back to retrieve gen. douglas. Unfortunately this prediction is incorrect but without additional context a human would have guessed the same word. This additionally illustrates why the gating function must be integrated into the pointer component. The named entity gen. douglas would have fallen out of the window in only four more timesteps, a fact that the RNN hidden state would not be able to accurately retain for almost 100 timesteps.
279
+
280
+ ![](images/12273399d0022a69702f98b310adb69608c6c1657321fc3e0ec1618d18640606.jpg)
281
+ Figure A7: For predicting mr. iverson, the pointer component has learned the ability to point to the last name of the most recent named entity. The named entity also occurs 45 timesteps ago, which is longer than the 35 steps that most language models truncate their backpropagation to.
282
+
283
+ ![](images/81f496401397d434510e2273937e7d5a166e9cb126ae3d3fa7dc1987293081e2.jpg)
284
+ Figure A8: For predicting mr. rosenthal, the pointer is almost exclusively used and reaches back 65 timesteps to identify bruce rosenthal as the person speaking, correctly only selecting the last name.
285
+
286
+ ![](images/5244179d618289042f46d23f44db0ec07e116e8a3e2a4f736497656a6a7b8d86.jpg)
287
+ Figure A9: For predicting in composite trading on the new york stock exchange yesterday integrated, the company Integrated and the $\left. u n k \right.$ token are primarily attended to by the pointer component, with nearly the full prediction being determined by the pointer component.
288
+
289
+ # ZIPFIAN PLOT OVER PTB AND WIKITEXT-2
290
+
291
+ ![](images/fef900b9bfea3ce6d1b68bfa9dc98ab50ad06567225c817639d232fbc434491e.jpg)
292
+ Figure A10: Zipfian plot over the training partition in Penn Treebank and WikiText-2 datasets. Notice the severe drop on the Penn Treebank when the vocabulary hits $1 0 ^ { 4 }$ . Two thirds of the vocabulary in WikiText-2 are past the vocabulary cut-off of the Penn Treebank.
293
+
294
+ ZIPFIAN PLOT OVER WIKITEXT-103
295
+
296
+ ![](images/750b091fb947314259a95c5ff06b556058e55aa11164e7c6a76439cd5d72c9cf.jpg)
297
+ Figure A11: Zipfian plot over the training partition in the WikiText-103 dataset. With the dataset containing over 100 million tokens, there is reasonable coverage of the long tail of the vocabulary.
parse/train/Byj72udxe/Byj72udxe_content_list.json ADDED
@@ -0,0 +1,1557 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "POINTER SENTINEL MIXTURE MODELS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 648,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Stephen Merity, Caiming Xiong, James Bradbury & Richard Socher \nMetaMind - A Salesforce Company \nPalo Alto, CA, USA \n{smerity,cxiong,james.bradbury,rsocher}@salesforce.com ",
17
+ "bbox": [
18
+ 184,
19
+ 143,
20
+ 712,
21
+ 202
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 237,
32
+ 544,
33
+ 252
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Recent neural network sequence models with softmax classifiers have achieved their best language modeling performance only with very large hidden states and large vocabularies. Even then they struggle to predict rare or unseen words even if the context makes the prediction unambiguous. We introduce the pointer sentinel mixture architecture for neural sequence models which has the ability to either reproduce a word from the recent context or produce a word from a standard softmax classifier. We explore applying the pointer sentinel mixture model to the LSTM, a standard recurrent neural network building block. Utilizing an LSTM that achieves 80.6 perplexity on the Penn Treebank, the pointer sentinel-LSTM model pushes perplexity down to 70.9 while using far fewer parameters than an LSTM that achieves similar results. In order to evaluate how well language models can exploit longer contexts and deal with more realistic vocabularies and corpora we also introduce the freely available WikiText corpus.1 ",
40
+ "bbox": [
41
+ 233,
42
+ 272,
43
+ 764,
44
+ 452
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 487,
55
+ 336,
56
+ 503
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "A major difficulty in language modeling is learning when to predict specific words from the immediate context. For instance, imagine a new person is introduced and two paragraphs later the context would allow one to very accurately predict this person’s name as the next word. For standard neural sequence models to predict this name, they would have to encode the name, store it for many time steps in their hidden state, and then decode it when appropriate. As the hidden state is limited in capacity and the optimization of such models suffer from the vanishing gradient problem, this is a lossy operation when performed over many timesteps. This is especially true for rare words. ",
63
+ "bbox": [
64
+ 174,
65
+ 521,
66
+ 825,
67
+ 619
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Models with soft attention or memory components have been proposed to help deal with this challenge, aiming to allow for the retrieval and use of relevant previous hidden states, in effect increasing hidden state capacity and providing a path for gradients not tied to timesteps. Even with attention, the standard softmax classifier that is being used in these models often struggles to correctly predict rare or previously unknown words. ",
74
+ "bbox": [
75
+ 176,
76
+ 627,
77
+ 823,
78
+ 695
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Pointer networks (Vinyals et al., 2015) provide one potential solution for rare and out of vocabulary (OoV) words as a pointer network uses attention to select an element from the input as output. This allows it to produce previously unseen input tokens. While pointer networks improve performance on rare words and long-term dependencies they are unable to select words that do not exist in the input. ",
85
+ "bbox": [
86
+ 174,
87
+ 703,
88
+ 823,
89
+ 772
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "We introduce a mixture model, illustrated in Fig. 1, that combines the advantages of standard softmax classifiers with those of a pointer component for effective and efficient language modeling. Rather than relying on the RNN hidden state to decide when to use the pointer, as in the recent work of Gulc¸ehre et al. ¨ (2016), we allow the pointer component itself to decide when to use the softmax vocabulary through a sentinel. The model improves the state of the art perplexity on the Penn Treebank. Since this commonly used dataset is small and no other freely available alternative exists that allows for learning long range dependencies, we also introduce a new benchmark dataset for language modeling called WikiText. ",
96
+ "bbox": [
97
+ 174,
98
+ 780,
99
+ 825,
100
+ 891
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "image",
106
+ "img_path": "images/8c26dfca638e32eea73667de18d4a96eb9d4f36a18ee233fb6986050ddd64f47.jpg",
107
+ "image_caption": [
108
+ "Figure 1: Illustration of the pointer sentinel-RNN mixture model. $g$ is the mixture gate which uses the sentinel to dictate how much probability mass to give to the vocabulary. "
109
+ ],
110
+ "image_footnote": [],
111
+ "bbox": [
112
+ 305,
113
+ 98,
114
+ 692,
115
+ 246
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "2 THE POINTER SENTINEL FOR LANGUAGE MODELING ",
122
+ "text_level": 1,
123
+ "bbox": [
124
+ 174,
125
+ 313,
126
+ 650,
127
+ 329
128
+ ],
129
+ "page_idx": 1
130
+ },
131
+ {
132
+ "type": "text",
133
+ "text": "Given a sequence of words $w _ { 1 } , \\ldots , w _ { N - 1 }$ , our task is to predict the next word $w _ { N }$ ",
134
+ "bbox": [
135
+ 176,
136
+ 343,
137
+ 717,
138
+ 358
139
+ ],
140
+ "page_idx": 1
141
+ },
142
+ {
143
+ "type": "text",
144
+ "text": "2.1 THE SOFTMAX-RNN COMPONENT",
145
+ "text_level": 1,
146
+ "bbox": [
147
+ 176,
148
+ 375,
149
+ 454,
150
+ 388
151
+ ],
152
+ "page_idx": 1
153
+ },
154
+ {
155
+ "type": "text",
156
+ "text": "Recurrent neural networks (RNNs) have seen widespread use for language modeling (Mikolov et al., 2010) due to their ability to, at least in theory, retain long term dependencies. RNNs employ the chain rule to factorize the joint probabilities over a sequence of tokens: $p ( w _ { 1 } , \\dots , w _ { N } ) =$ $\\begin{array} { r } { \\prod _ { i = 1 } ^ { N } p ( w _ { i } | w _ { 1 } , \\dots , w _ { i - 1 } ) } \\end{array}$ . More precisely, at each time step $i$ , we compute the RNN hidden state $h _ { i }$ according to the previous hidden state $h _ { i - 1 }$ and the input $x _ { i }$ such that $h _ { i } = R N N ( x _ { i } , h _ { i - 1 } )$ . When all the $N - 1$ words have been processed by the RNN, the final state $h _ { { N - 1 } }$ is fed into a softmax layer which computes the probability over a vocabulary of possible words: $p _ { \\mathrm { v o c a b } } ( w ) =$ softmax $\\left( U h _ { N - 1 } \\right)$ , where $\\mathbf { \\Psi } _ { p _ { \\mathrm { v o c a b } } } \\in \\dot { \\mathbb { R } } ^ { V }$ , $U \\in \\mathbf { \\overline { { R } } } ^ { V \\times H }$ , $H$ is the hidden size, and $V$ the vocabulary size. RNNs can suffer from the vanishing gradient problem. The LSTM (Hochreiter & Schmidhuber, 1997) architecture has been proposed to deal with this by updating the hidden state according to a set of gates. Our work focuses on the LSTM but can be applied to any RNN architecture that ends in a vocabulary softmax. ",
157
+ "bbox": [
158
+ 173,
159
+ 400,
160
+ 825,
161
+ 569
162
+ ],
163
+ "page_idx": 1
164
+ },
165
+ {
166
+ "type": "text",
167
+ "text": "2.2 THE POINTER NETWORK COMPONENT",
168
+ "text_level": 1,
169
+ "bbox": [
170
+ 176,
171
+ 585,
172
+ 482,
173
+ 601
174
+ ],
175
+ "page_idx": 1
176
+ },
177
+ {
178
+ "type": "text",
179
+ "text": "In this section, we propose a modification to pointer networks for language modeling. To predict the next word in the sequence, a pointer network would select the member of the input sequence $p ( w _ { 1 } , \\dots , w _ { N - 1 } )$ with the maximal attention score as the output. ",
180
+ "bbox": [
181
+ 174,
182
+ 612,
183
+ 825,
184
+ 655
185
+ ],
186
+ "page_idx": 1
187
+ },
188
+ {
189
+ "type": "text",
190
+ "text": "The simplest way to compute an attention score for a specific hidden state is an inner product with all the past hidden states $h$ , with each hidden state $\\boldsymbol { h } _ { i } ^ { \\star } \\in \\mathbb { R } ^ { H }$ . However, if we want to compute such a score for the most recent word (since this word may be repeated), we need to include the last hidden state itself in this inner product. Taking the inner product of a vector with itself results in the vector’s magnitude squared, meaning the attention scores would be strongly biased towards the most recent word. Hence we project the current hidden state to a query vector $q$ first. To produce the query $q$ we compute $q = \\mathrm { t a n h } ( W h _ { N - 1 } + b )$ , where $W \\in \\dot { \\mathbb { R } ^ { H \\times } } \\mathbf { \\check { \\mathit { H } } }$ , $b \\in \\mathring { \\mathbb { R } } ^ { H }$ , and $\\boldsymbol { q } ^ { \\mathbf { \\lambda } } \\in \\mathbb { R } ^ { H }$ . To generate the pointer attention scores, we compute the match between the previous RNN output states $h _ { i }$ and the query $q$ by taking the inner product, followed by a softmax activation function to obtain a probability distribution: ",
191
+ "bbox": [
192
+ 173,
193
+ 661,
194
+ 825,
195
+ 800
196
+ ],
197
+ "page_idx": 1
198
+ },
199
+ {
200
+ "type": "equation",
201
+ "img_path": "images/469059124895a99c3ee85d7a23fb0904355a5368933e17f10525830a22cc6c19.jpg",
202
+ "text": "$$\n\\begin{array} { r } { z _ { i } = q ^ { T } h _ { i } , } \\\\ { a = \\mathrm { s o f t m a x } ( z ) , } \\end{array}\n$$",
203
+ "text_format": "latex",
204
+ "bbox": [
205
+ 424,
206
+ 801,
207
+ 539,
208
+ 839
209
+ ],
210
+ "page_idx": 1
211
+ },
212
+ {
213
+ "type": "text",
214
+ "text": "where $z \\in \\mathbb { R } ^ { L }$ , $a \\in \\mathbb { R } ^ { L }$ , and $L$ is the total number of hidden states. The probability mass assigned to a given word is the sum of the probability mass given to all token positions where the given word appears: ",
215
+ "bbox": [
216
+ 174,
217
+ 840,
218
+ 826,
219
+ 883
220
+ ],
221
+ "page_idx": 1
222
+ },
223
+ {
224
+ "type": "equation",
225
+ "img_path": "images/c49f022a82926ffd594334936d27746c2f690ba865c32c91e4335746848bf3ae.jpg",
226
+ "text": "$$\np _ { \\mathrm { p t r } } ( w ) = \\sum _ { i \\in I ( w , x ) } a _ { i } ,\n$$",
227
+ "text_format": "latex",
228
+ "bbox": [
229
+ 426,
230
+ 885,
231
+ 570,
232
+ 921
233
+ ],
234
+ "page_idx": 1
235
+ },
236
+ {
237
+ "type": "image",
238
+ "img_path": "images/0171833abe0201710740ca22ff0191abc247c1cd6f229bbb5f4880daf49a948b.jpg",
239
+ "image_caption": [
240
+ "Figure 2: Visualization of the pointer sentinel-RNN mixture model. The query, produced from applying an MLP to the last output of the RNN, is used by the pointer network to identify likely matching words from the past. The $\\odot$ nodes are inner products between the query and the RNN hidden states. If the pointer component is not confident, probability mass can be directed to the RNN by increasing the value of the mixture gate $g$ via the sentinel, seen in grey. If $g = 1$ then only the RNN is used. If $g = 0$ then only the pointer is used. "
241
+ ],
242
+ "image_footnote": [],
243
+ "bbox": [
244
+ 269,
245
+ 103,
246
+ 722,
247
+ 260
248
+ ],
249
+ "page_idx": 2
250
+ },
251
+ {
252
+ "type": "text",
253
+ "text": "where $I ( w , x )$ results in all positions of the word $w$ in the input $x$ and $p _ { \\mathrm { p t r } } \\in \\mathbb { R } ^ { V }$ . This technique, referred to as pointer sum attention, has been used for question answering (Kadlec et al., 2016). ",
254
+ "bbox": [
255
+ 174,
256
+ 383,
257
+ 821,
258
+ 412
259
+ ],
260
+ "page_idx": 2
261
+ },
262
+ {
263
+ "type": "text",
264
+ "text": "Given the length of the documents used in language modeling, it may not be feasible for the pointer network to evaluate an attention score for all the words back to the beginning of the dataset. Instead, we may elect to maintain only a window of the $L$ most recent words for the pointer to match against. The length $L$ of the window is a hyperparameter that can be tuned on a held out dataset or by empirically analyzing how frequently a word at position $t$ appears within the last $L$ words. ",
265
+ "bbox": [
266
+ 174,
267
+ 419,
268
+ 825,
269
+ 489
270
+ ],
271
+ "page_idx": 2
272
+ },
273
+ {
274
+ "type": "text",
275
+ "text": "To illustrate the advantages of this approach, consider a long article featuring two sentences President Obama discussed the economy and President Obama then flew to Prague. If the query was Which President is the article about?, probability mass could be applied to Obama in either sentence. If the question was instead Who flew to Prague?, only the latter occurrence of Obama provides the proper context. The attention sum model ensures that, as long as the entire attention probability mass is distributed on the occurrences of Obama, the pointer network can achieve zero loss. This flexibility provides supervision without forcing the model to put mass on supervision signals that may be incorrect or lack proper context. ",
276
+ "bbox": [
277
+ 174,
278
+ 496,
279
+ 825,
280
+ 607
281
+ ],
282
+ "page_idx": 2
283
+ },
284
+ {
285
+ "type": "text",
286
+ "text": "2.3 THE POINTER SENTINEL MIXTURE MODEL ",
287
+ "text_level": 1,
288
+ "bbox": [
289
+ 174,
290
+ 623,
291
+ 514,
292
+ 638
293
+ ],
294
+ "page_idx": 2
295
+ },
296
+ {
297
+ "type": "text",
298
+ "text": "While pointer networks have proven to be effective, they cannot predict output words that are not present in the input, a common scenario in language modeling. We propose to resolve this by using a mixture model that combines a standard softmax with a pointer. ",
299
+ "bbox": [
300
+ 174,
301
+ 650,
302
+ 825,
303
+ 691
304
+ ],
305
+ "page_idx": 2
306
+ },
307
+ {
308
+ "type": "text",
309
+ "text": "Our mixture model has two base distributions: the softmax vocabulary of the RNN output and the positional vocabulary of the pointer model. We refer to these as the RNN component and the pointer component respectively. To combine the two base distributions, we use a gating function $\\bar { g } \\ : = \\ : p ( z _ { i } \\ : = \\ : k | x _ { i } )$ where $z _ { i }$ is the latent variable stating which base distribution the data point belongs to. As we only have two base distributions, $g$ can produce a scalar in the range $[ 0 , 1 ]$ . A value of 0 implies that only the pointer is used and 1 means only the softmax-RNN is used. ",
310
+ "bbox": [
311
+ 173,
312
+ 699,
313
+ 825,
314
+ 784
315
+ ],
316
+ "page_idx": 2
317
+ },
318
+ {
319
+ "type": "equation",
320
+ "img_path": "images/eb2b3c050181bba3b3a4a7f5601676418f3c1cf66a90cacb6cc22dd22fb2ceac.jpg",
321
+ "text": "$$\np ( y _ { i } | x _ { i } ) = g p _ { \\mathrm { v o c a b } } ( y _ { i } | x _ { i } ) + ( 1 - g ) p _ { \\mathrm { p t r } } ( y _ { i } | x _ { i } ) .\n$$",
322
+ "text_format": "latex",
323
+ "bbox": [
324
+ 339,
325
+ 787,
326
+ 658,
327
+ 806
328
+ ],
329
+ "page_idx": 2
330
+ },
331
+ {
332
+ "type": "text",
333
+ "text": "While the models could be entirely separate, we re-use many of the parameters for the softmaxRNN and pointer components. This sharing minimizes the total number of parameters in the model and capitalizes on the pointer network’s supervision for the RNN component. ",
334
+ "bbox": [
335
+ 174,
336
+ 810,
337
+ 825,
338
+ 853
339
+ ],
340
+ "page_idx": 2
341
+ },
342
+ {
343
+ "type": "text",
344
+ "text": "2.4 DETAILS OF THE GATING FUNCTION ",
345
+ "text_level": 1,
346
+ "bbox": [
347
+ 176,
348
+ 869,
349
+ 468,
350
+ 883
351
+ ],
352
+ "page_idx": 2
353
+ },
354
+ {
355
+ "type": "text",
356
+ "text": "To compute the new pointer sentinel gate $g$ , we modify the pointer component. In particular, we add an additional element to $z$ , the vector of attention scores as defined in Eq. 1. This element is computed using an inner product between the query and the sentinel2 vector $s \\in \\mathbb { R } ^ { H }$ . This change can be summarized by changing Eq. 2 to $a = \\operatorname { \\bar { s o f t m a x } } \\left( \\left[ z ; q ^ { T } s \\right] \\right)$ . We define $a \\in \\mathbb { R } ^ { V + 1 }$ to be the attention distribution over both the words in the pointer window as well as the sentinel state. We interpret the last element of this vector to be the gate value: $g = a [ V + 1 ]$ . ",
357
+ "bbox": [
358
+ 174,
359
+ 895,
360
+ 823,
361
+ 924
362
+ ],
363
+ "page_idx": 2
364
+ },
365
+ {
366
+ "type": "text",
367
+ "text": "",
368
+ "bbox": [
369
+ 174,
370
+ 103,
371
+ 823,
372
+ 160
373
+ ],
374
+ "page_idx": 3
375
+ },
376
+ {
377
+ "type": "text",
378
+ "text": "Any probability mass assigned to $g$ is given to the standard softmax vocabulary of the RNN. The final updated, normalized pointer probability over the vocabulary in the window then becomes: ",
379
+ "bbox": [
380
+ 171,
381
+ 166,
382
+ 823,
383
+ 195
384
+ ],
385
+ "page_idx": 3
386
+ },
387
+ {
388
+ "type": "equation",
389
+ "img_path": "images/b60657368b68e271cad13cfea9f485c207b1c64656bcc81124ecf7ea8b6fd18e.jpg",
390
+ "text": "$$\np _ { \\mathrm { p t r } } ( y _ { i } | x _ { i } ) = \\frac { 1 } { 1 - g } a [ 1 : V ] ,\n$$",
391
+ "text_format": "latex",
392
+ "bbox": [
393
+ 400,
394
+ 205,
395
+ 596,
396
+ 238
397
+ ],
398
+ "page_idx": 3
399
+ },
400
+ {
401
+ "type": "text",
402
+ "text": "where we denoted $[ 1 : V ]$ to mean the first $V$ elements of the vector. The final mixture model is the same as Eq. 4 but with the updated Eq. 5 for the pointer probability. ",
403
+ "bbox": [
404
+ 174,
405
+ 250,
406
+ 825,
407
+ 279
408
+ ],
409
+ "page_idx": 3
410
+ },
411
+ {
412
+ "type": "text",
413
+ "text": "This setup encourages the model to have both components compete: use pointers whenever possible and back-off to the standard softmax otherwise. By integrating the gating function into the pointer computation, it is influenced by both the RNN hidden state and the pointer window’s hidden states. ",
414
+ "bbox": [
415
+ 174,
416
+ 285,
417
+ 825,
418
+ 327
419
+ ],
420
+ "page_idx": 3
421
+ },
422
+ {
423
+ "type": "text",
424
+ "text": "2.5 MOTIVATION FOR THE SENTINEL AS GATING FUNCTION ",
425
+ "text_level": 1,
426
+ "bbox": [
427
+ 174,
428
+ 349,
429
+ 604,
430
+ 364
431
+ ],
432
+ "page_idx": 3
433
+ },
434
+ {
435
+ "type": "text",
436
+ "text": "To make the best decision possible regarding which component to use the gating function must have as much context as possible. As we increase the window of words for the pointer component to consider, the RNN hidden state by itself isn’t guaranteed to accurately recall the identity or order of words it has recently seen (Adi et al., 2016). This is an obvious limitation of encoding a variable length sequence into a fixed dimensionality vector. ",
437
+ "bbox": [
438
+ 174,
439
+ 377,
440
+ 825,
441
+ 448
442
+ ],
443
+ "page_idx": 3
444
+ },
445
+ {
446
+ "type": "text",
447
+ "text": "If we want a pointer window where the length $L$ is in the hundreds, accurately modeling all of this information within the RNN hidden state is impractical. The position of specific words is also a vital feature as relevant words eventually fall out of the pointer component’s window. To correctly model this would require the RNN hidden state to store both the identity and position of each word in the pointer window. This is far beyond the capability of the fixed dimensionality RNN hidden state. ",
448
+ "bbox": [
449
+ 174,
450
+ 454,
451
+ 825,
452
+ 525
453
+ ],
454
+ "page_idx": 3
455
+ },
456
+ {
457
+ "type": "text",
458
+ "text": "For this reason, we integrate the gating function directly into the pointer network by use of the sentinel. The decision to back-off to the softmax vocabulary is then informed by both the query $q$ , generated using the RNN hidden state $h _ { N - 1 }$ , and from the contents of the hidden states in the pointer window itself. This allows the model to accurately query what hidden states are contained in the pointer window and avoid maintaining state for words that may have fallen out of the window. ",
459
+ "bbox": [
460
+ 174,
461
+ 531,
462
+ 825,
463
+ 602
464
+ ],
465
+ "page_idx": 3
466
+ },
467
+ {
468
+ "type": "text",
469
+ "text": "2.6 POINTER SENTINEL LOSS FUNCTION ",
470
+ "text_level": 1,
471
+ "bbox": [
472
+ 176,
473
+ 623,
474
+ 472,
475
+ 637
476
+ ],
477
+ "page_idx": 3
478
+ },
479
+ {
480
+ "type": "text",
481
+ "text": "We minimize the cross-entropy loss of $\\begin{array} { r } { - \\sum _ { j } \\hat { y _ { i j } } \\log p \\big ( y _ { i j } | x _ { i } \\big ) } \\end{array}$ , where $\\hat { y } _ { i }$ is a one hot encoding of the correct output. During training, as $\\hat { y } _ { i }$ is one hot, only a single mixed probability $p ( y _ { i j } )$ must be computed for calculating the loss. This can result in a far more efficient GPU implementation. At prediction time, when we want all values for $p ( y _ { i } | x _ { i } )$ , a maximum of $L$ word probabilities must be mixed, as there is a maximum of $L$ unique words in the pointer window of length $L$ . This mixing can occur on the CPU where random access indexing is more efficient than the GPU. ",
482
+ "bbox": [
483
+ 174,
484
+ 651,
485
+ 825,
486
+ 738
487
+ ],
488
+ "page_idx": 3
489
+ },
490
+ {
491
+ "type": "text",
492
+ "text": "Following the pointer sum attention network, the aim is to place probability mass from the attention mechanism on the correct output $\\hat { y } _ { i }$ if it exists in the input. In the case of our mixture model the pointer loss instead becomes $\\begin{array} { r } { - \\log \\left( g + \\sum _ { i \\in I ( y , x ) } a _ { i } \\right) } \\end{array}$ , where $I ( y , x )$ results in all positions of the correct output $y$ in the input $x$ . The gate $g$ may be assigned all probability mass if, for instance, the correct output $\\hat { y } _ { i }$ exists only in the softmax-RNN vocabulary. There is no penalty if the model places the entire probability mass on any of the instances of the correct word in the input window. If the pointer component places the entirety of the probability mass on the gate $g$ , the pointer network incurs no penalty and the loss is entirely determined by the loss of the softmax-RNN component. ",
493
+ "bbox": [
494
+ 173,
495
+ 744,
496
+ 825,
497
+ 864
498
+ ],
499
+ "page_idx": 3
500
+ },
501
+ {
502
+ "type": "table",
503
+ "img_path": "images/2771546fc5355020a468b7b395918ab24c46037349e76a1b1f3768a9a2b4eafb.jpg",
504
+ "table_caption": [
505
+ "Table 1: Statistics of the Penn Treebank, WikiText-2, and WikiText-103. The out of vocabulary $\\left( \\mathrm { O o V } \\right)$ rate notes what percentage of tokens have been replaced by an $\\left. u n k \\right.$ token. The token count includes newlines which add to the structure of the WikiText datasets. "
506
+ ],
507
+ "table_footnote": [],
508
+ "table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"3\">Penn Treebank Test</td><td colspan=\"3\">WikiText-2 Test</td><td colspan=\"3\">WikiText-103</td></tr><tr><td colspan=\"3\">Train Valid</td><td colspan=\"3\">Train Valid</td><td colspan=\"3\">Train Valid</td></tr><tr><td>Articles</td><td>-</td><td>-</td><td>-</td><td>600</td><td>60</td><td>60</td><td>28,475</td><td>60</td><td>Test 60</td></tr><tr><td>Tokens</td><td>929k</td><td>73k 10,000</td><td>82k</td><td>2,088k</td><td>217k</td><td>245k</td><td>103,227k</td><td>217k</td><td>245k</td></tr><tr><td>Vocab size OoV rate</td><td colspan=\"3\">4.8%</td><td></td><td colspan=\"3\">33,278 2.6%</td><td colspan=\"3\">267,735 0.4%</td></tr></table>",
509
+ "bbox": [
510
+ 215,
511
+ 101,
512
+ 779,
513
+ 199
514
+ ],
515
+ "page_idx": 4
516
+ },
517
+ {
518
+ "type": "text",
519
+ "text": "2.7 PARAMETERS AND COMPUTATION TIME ",
520
+ "text_level": 1,
521
+ "bbox": [
522
+ 176,
523
+ 281,
524
+ 491,
525
+ 295
526
+ ],
527
+ "page_idx": 4
528
+ },
529
+ {
530
+ "type": "text",
531
+ "text": "The pointer sentinel-LSTM mixture model results in a relatively minor increase in parameters and computation time, especially when compared to the model size required to achieve similar performance using a standard LSTM. The only two additional parameters required by the model are those required for computing $q$ , specifically $\\dot { W } \\in \\mathbb { R } ^ { H \\times H }$ and $\\bar { b } \\in \\mathbb { R } ^ { H }$ , and the sentinel vector embedding, $s \\in \\mathbb { R } ^ { H }$ . This is independent of the depth of the RNN as the pointer component only interacts with the output of the final RNN layer. The additional $H ^ { 2 } + 2 H \\bar { }$ parameters are minor compared to a single LSTM layer’s $8 H ^ { 2 } + 4 \\dot { H }$ parameters. Most models also use multiple LSTM layers. ",
532
+ "bbox": [
533
+ 174,
534
+ 306,
535
+ 825,
536
+ 405
537
+ ],
538
+ "page_idx": 4
539
+ },
540
+ {
541
+ "type": "text",
542
+ "text": "In terms of additional computation, a pointer sentinel-LSTM of window size $L$ only requires computing the query $q$ (a linear layer with tanh activation), a total of $L$ parallelizable inner product calculations, and the attention scores for the $L$ resulting scalars via the softmax function. ",
543
+ "bbox": [
544
+ 176,
545
+ 411,
546
+ 825,
547
+ 454
548
+ ],
549
+ "page_idx": 4
550
+ },
551
+ {
552
+ "type": "text",
553
+ "text": "3 RELATED WORK ",
554
+ "text_level": 1,
555
+ "bbox": [
556
+ 176,
557
+ 473,
558
+ 344,
559
+ 489
560
+ ],
561
+ "page_idx": 4
562
+ },
563
+ {
564
+ "type": "text",
565
+ "text": "Considerable research has been dedicated to the task of language modeling, from traditional machine learning techniques such as n-grams to deep neural sequence models. ",
566
+ "bbox": [
567
+ 173,
568
+ 506,
569
+ 823,
570
+ 534
571
+ ],
572
+ "page_idx": 4
573
+ },
574
+ {
575
+ "type": "text",
576
+ "text": "Mixture models composed of various knowledge sources have been proposed in the past for language modeling. Rosenfeld (1996) uses a maximum entropy model to combine a variety of information sources to improve language modeling on news text and speech. These information sources include complex overlapping n-gram distributions and n-gram caches that aim to capture rare words. ",
577
+ "bbox": [
578
+ 174,
579
+ 541,
580
+ 825,
581
+ 597
582
+ ],
583
+ "page_idx": 4
584
+ },
585
+ {
586
+ "type": "text",
587
+ "text": "Beyond n-grams, neural sequence models such as recurrent neural networks have been shown to achieve state of the art results (Mikolov et al., 2010). A variety of RNN regularization methods have been explored, including a number of dropout variations (Zaremba et al., 2014; Gal, 2015) which prevent overfitting of complex LSTM language models. Other work has modified the RNN architecture to better handle increased recurrence depth (Zilly et al., 2016). ",
588
+ "bbox": [
589
+ 174,
590
+ 603,
591
+ 825,
592
+ 674
593
+ ],
594
+ "page_idx": 4
595
+ },
596
+ {
597
+ "type": "text",
598
+ "text": "In order to increase capacity and minimize the impact of vanishing gradients, some language and translation models have also added a soft attention or memory component (Bahdanau et al., 2015; Sukhbaatar et al., 2015; Cheng et al., 2016; Kumar et al., 2016; Xiong et al., 2016; Ahn et al., 2016). These mechanisms allow for the retrieval and use of relevant previous hidden states. Soft attention mechanisms need to first encode the relevant word into a state vector and then decode it again, even if the output word is identical to the input word used to compute that hidden state or memory. A drawback to soft attention is that if, for instance, January and March are both equally attended candidates, the attention mechanism may blend the two vectors, resulting in a context vector closest to February (Kadlec et al., 2016). Even with attention, the standard softmax classifier being used in these models often struggles to correctly predict rare or previously unknown words. ",
599
+ "bbox": [
600
+ 174,
601
+ 680,
602
+ 825,
603
+ 819
604
+ ],
605
+ "page_idx": 4
606
+ },
607
+ {
608
+ "type": "text",
609
+ "text": "Attention-based pointer mechanisms were introduced in Vinyals et al. (2015) where the pointer network is able to select elements from the input as output. In the above example, only January or March would be available as options, as February does not appear in the input. The use of pointer networks have been shown to help with geometric problems (Vinyals et al., 2015), code generation (Ling et al., 2016), summarization (Gu et al., 2016; Gulc¸ehre et al. ¨ , 2016), question answering (Kadlec et al., 2016). While pointer networks improve performance on rare words and long-term dependencies they are unable to select words that do not exist in the input. ",
610
+ "bbox": [
611
+ 174,
612
+ 825,
613
+ 823,
614
+ 924
615
+ ],
616
+ "page_idx": 4
617
+ },
618
+ {
619
+ "type": "text",
620
+ "text": "Gulc¸ehre et al. ¨ (2016) introduce a pointer softmax model that can generate output from either the vocabulary softmax of an RNN or the location softmax of the pointer network. Not only does this allow for producing OoV words which are not in the input, the pointer softmax model is able to better deal with rare and unknown words than a model only featuring an RNN softmax. Rather than constructing a mixture model as in our work, they use a switching network to decide which component to use. For neural machine translation, the switching network is conditioned on the representation of the context of the source text and the hidden state of the decoder. The pointer network is not used as a source of information for the switching network as in our model. The pointer and RNN softmax are scaled according to the switching network and the word or location with the highest final attention score is selected for output. Although this approach uses both a pointer and RNN component, it is not a mixture model and does not combine the probabilities for a word if it occurs in both the pointer location softmax and the RNN vocabulary softmax. In our model the word probability is a mix of both the RNN and pointer components, allowing for better predictions when the context may be ambiguous. ",
621
+ "bbox": [
622
+ 174,
623
+ 103,
624
+ 825,
625
+ 297
626
+ ],
627
+ "page_idx": 5
628
+ },
629
+ {
630
+ "type": "text",
631
+ "text": "Extending this concept further, the latent predictor network (Ling et al., 2016) generates an output sequence conditioned on an arbitrary number of base models where each base model may have differing granularity. In their task of code generation, the output could be produced one character at a time using a standard softmax or instead copy entire words from referenced text fields using a pointer network. As opposed to Gulc¸ehre et al. ¨ (2016), all states which produce the same output are merged by summing their probabilities. The model requires a complex training process involving the forward-backward algorithm for Semi-Markov models to prevent an exponential path explosion. ",
632
+ "bbox": [
633
+ 174,
634
+ 305,
635
+ 825,
636
+ 402
637
+ ],
638
+ "page_idx": 5
639
+ },
640
+ {
641
+ "type": "text",
642
+ "text": "4 WIKITEXT - A BENCHMARK FOR LANGUAGE MODELING ",
643
+ "text_level": 1,
644
+ "bbox": [
645
+ 176,
646
+ 422,
647
+ 681,
648
+ 438
649
+ ],
650
+ "page_idx": 5
651
+ },
652
+ {
653
+ "type": "text",
654
+ "text": "We first describe the most commonly used language modeling dataset and its pre-processing in order to then motivate the need for a new benchmark dataset. ",
655
+ "bbox": [
656
+ 173,
657
+ 454,
658
+ 823,
659
+ 481
660
+ ],
661
+ "page_idx": 5
662
+ },
663
+ {
664
+ "type": "text",
665
+ "text": "4.1 PENN TREEBANK ",
666
+ "text_level": 1,
667
+ "bbox": [
668
+ 174,
669
+ 498,
670
+ 334,
671
+ 512
672
+ ],
673
+ "page_idx": 5
674
+ },
675
+ {
676
+ "type": "text",
677
+ "text": "In order to compare our model to the many recent neural language models, we conduct word-level prediction experiments on the Penn Treebank (PTB) dataset (Marcus et al., 1993), pre-processed by Mikolov et al. (2010). The dataset consists of $9 2 9 \\mathrm { k }$ training, $7 3 \\mathrm { k }$ validation, and ${ } ^ { 8 2 \\mathrm { k } }$ test words. As part of the pre-processing performed by Mikolov et al. (2010), words were lower-cased, numbers were replaced with N, newlines were replaced with $\\langle e o s \\rangle$ , and all other punctuation was removed. The vocabulary is the most frequent 10k words with OoV tokens replaced by an $\\left. u n k \\right.$ token. For full statistics, refer to Table 1. ",
678
+ "bbox": [
679
+ 174,
680
+ 525,
681
+ 825,
682
+ 622
683
+ ],
684
+ "page_idx": 5
685
+ },
686
+ {
687
+ "type": "text",
688
+ "text": "4.2 REASONS FOR A NEW DATASET ",
689
+ "text_level": 1,
690
+ "bbox": [
691
+ 176,
692
+ 638,
693
+ 434,
694
+ 652
695
+ ],
696
+ "page_idx": 5
697
+ },
698
+ {
699
+ "type": "text",
700
+ "text": "While the processed version of the PTB above has been frequently used for language modeling, it has many limitations. The tokens in PTB are all lower case, stripped of any punctuation, and limited to a vocabulary of only 10k words. These limitations mean that the PTB is unrealistic for real language use, especially when far larger vocabularies with many rare words are involved. The appendix contains a graph illustrating this using a Zipfian plot over the training partition of the PTB, with the curve stopping abruptly at the 10k limit. Given that accurately predicting rare words, such as named entities, is an important task for many applications, the lack of a long tail is problematic. ",
701
+ "bbox": [
702
+ 174,
703
+ 664,
704
+ 825,
705
+ 762
706
+ ],
707
+ "page_idx": 5
708
+ },
709
+ {
710
+ "type": "text",
711
+ "text": "Other larger scale language modeling datasets exist. Unfortunately, they either have restrictive licensing which prevents widespread use or have randomized sentence ordering (Chelba et al., 2013) which is unrealistic for most language use and prevents the effective learning and evaluation of longer term dependencies. Hence, we constructed a language modeling dataset using text extracted from Wikipedia and have made this available to the community. ",
712
+ "bbox": [
713
+ 176,
714
+ 768,
715
+ 825,
716
+ 838
717
+ ],
718
+ "page_idx": 5
719
+ },
720
+ {
721
+ "type": "text",
722
+ "text": "4.3 CONSTRUCTION AND PRE-PROCESSING ",
723
+ "text_level": 1,
724
+ "bbox": [
725
+ 176,
726
+ 856,
727
+ 486,
728
+ 869
729
+ ],
730
+ "page_idx": 5
731
+ },
732
+ {
733
+ "type": "text",
734
+ "text": "We selected articles only fitting the Good or Featured article criteria specified by editors on Wikipedia. These articles have been reviewed by humans and are considered well written, factually accurate, broad in coverage, neutral in point of view, and stable. This resulted in 23,805 Good articles and 4,790 Featured articles. The text for each article was extracted using the Wikipedia API. Extracting text from Wikipedia mark-up is nontrivial due to the large number of macros in use, used for metric conversions, abbreviations, language notation, and date handling. ",
735
+ "bbox": [
736
+ 176,
737
+ 882,
738
+ 823,
739
+ 922
740
+ ],
741
+ "page_idx": 5
742
+ },
743
+ {
744
+ "type": "text",
745
+ "text": "",
746
+ "bbox": [
747
+ 174,
748
+ 103,
749
+ 823,
750
+ 146
751
+ ],
752
+ "page_idx": 6
753
+ },
754
+ {
755
+ "type": "text",
756
+ "text": "Once extracted, specific sections which primarily featured lists were removed by default. Other minor bugs, such as sort keys and Edit buttons that leaked in from the HTML, were also removed. Mathematical formulae and $\\mathrm { { I A T } _ { E } X }$ code were replaced with $\\langle f o r m u l a \\rangle$ tokens. Normalization and tokenization were performed using the Moses tokenizer (Koehn et al., 2007), slightly augmented to further split numbers $( 8 , 6 0 0 8 \\ \\textcircled { \\omega } , @ \\ 6 0 0 )$ and with some additional minor fixes. Following Chelba et al. (2013) a vocabulary was constructed by discarding all words with a count below 3. Words outside of the vocabulary were mapped to the $\\left. u n k \\right.$ token, also a part of the vocabulary. ",
757
+ "bbox": [
758
+ 174,
759
+ 152,
760
+ 825,
761
+ 251
762
+ ],
763
+ "page_idx": 6
764
+ },
765
+ {
766
+ "type": "text",
767
+ "text": "4.4 STATISTICS ",
768
+ "text_level": 1,
769
+ "bbox": [
770
+ 174,
771
+ 268,
772
+ 294,
773
+ 282
774
+ ],
775
+ "page_idx": 6
776
+ },
777
+ {
778
+ "type": "text",
779
+ "text": "The full WikiText dataset is over 103 million words in size, a hundred times larger than the PTB. It is also a tenth the size of the One Billion Word Benchmark (Chelba et al., 2013), one of the largest publicly available language modeling benchmarks, whilst consisting of articles that allow for the capture and usage of longer term dependencies as might be found in many real world tasks. ",
780
+ "bbox": [
781
+ 174,
782
+ 295,
783
+ 825,
784
+ 349
785
+ ],
786
+ "page_idx": 6
787
+ },
788
+ {
789
+ "type": "text",
790
+ "text": "The dataset is available in two different sizes: WikiText-2 and WikiText-103. Both feature punctuation, original casing, a larger vocabulary, and numbers. WikiText-2 is two times the size of the Penn Treebank dataset. WikiText-103 features all extracted articles. Both datasets use the same articles for validation and testing, only differing in the vocabularies. For full statistics, refer to Table 1. ",
791
+ "bbox": [
792
+ 174,
793
+ 357,
794
+ 823,
795
+ 412
796
+ ],
797
+ "page_idx": 6
798
+ },
799
+ {
800
+ "type": "text",
801
+ "text": "5 EXPERIMENTS ",
802
+ "text_level": 1,
803
+ "bbox": [
804
+ 176,
805
+ 434,
806
+ 326,
807
+ 450
808
+ ],
809
+ "page_idx": 6
810
+ },
811
+ {
812
+ "type": "text",
813
+ "text": "5.1 TRAINING DETAILS ",
814
+ "text_level": 1,
815
+ "bbox": [
816
+ 176,
817
+ 467,
818
+ 351,
819
+ 481
820
+ ],
821
+ "page_idx": 6
822
+ },
823
+ {
824
+ "type": "text",
825
+ "text": "As the pointer sentinel mixture model uses the outputs of the RNN from up to $L$ timesteps back, this presents a challenge for training. If we do not regenerate the stale historical outputs of the RNN when we update the gradients, backpropagation through these stale outputs may result in incorrect gradient updates. If we do regenerate all stale outputs of the RNN, the training process is far slower. As we can make no theoretical guarantees on the impact of stale outputs on gradient updates, we opt to regenerate the window of RNN outputs used by the pointer component after each gradient update. ",
826
+ "bbox": [
827
+ 174,
828
+ 492,
829
+ 825,
830
+ 577
831
+ ],
832
+ "page_idx": 6
833
+ },
834
+ {
835
+ "type": "text",
836
+ "text": "We also use truncated backpropagation through time (BPTT) in a different manner to many other RNN language models. Truncated BPTT allows for practical time-efficient training of RNN models but has fundamental trade-offs that are rarely discussed. For running truncated BPTT, BPTT is run for $k _ { 2 }$ timesteps once every $k _ { 1 }$ timesteps. For many RNN language modeling training schemes, $k _ { 1 } = k _ { 2 }$ , meaning that every $k$ timesteps truncated BPTT is performed for the $k$ previous timesteps. This results in only a single RNN output receiving backpropagation for $k$ timesteps, with the other extreme being that the first token receives backpropagation for 0 timesteps. As such, most words in the training data will never experience a full backpropagation for $k$ timesteps. ",
837
+ "bbox": [
838
+ 174,
839
+ 583,
840
+ 825,
841
+ 695
842
+ ],
843
+ "page_idx": 6
844
+ },
845
+ {
846
+ "type": "text",
847
+ "text": "In our task, the pointer component always looks $L$ timesteps into the past if $L$ past timesteps are available. We select $k _ { 1 } = 1$ and $k _ { 2 } = L$ such that for each timestep we perform backpropagation for $L$ timesteps and advance one timestep at a time. Only the loss for the final predicted word is used for backpropagation through the window. ",
848
+ "bbox": [
849
+ 174,
850
+ 702,
851
+ 823,
852
+ 757
853
+ ],
854
+ "page_idx": 6
855
+ },
856
+ {
857
+ "type": "text",
858
+ "text": "5.2 MODEL DETAILS ",
859
+ "text_level": 1,
860
+ "bbox": [
861
+ 176,
862
+ 775,
863
+ 333,
864
+ 789
865
+ ],
866
+ "page_idx": 6
867
+ },
868
+ {
869
+ "type": "text",
870
+ "text": "Our experimental setup reflects that of Zaremba et al. (2014) and Gal (2015). We increased the number of timesteps used during training from 35 to 100, matching the length of the window $L$ . Batch size was increased to 32 from 20. We also halve the learning rate when validation perplexity is worse than the previous iteration, stopping training when validation perplexity fails to improve for three epochs or when 64 epochs are reached. The gradients are rescaled if their global norm exceeds 1 (Pascanu et al., 2013b).3 We evaluate the medium model configuration which features a two layer ",
871
+ "bbox": [
872
+ 174,
873
+ 801,
874
+ 825,
875
+ 886
876
+ ],
877
+ "page_idx": 6
878
+ },
879
+ {
880
+ "type": "table",
881
+ "img_path": "images/bb3d98ce30f7ae806c74c7ce5a6ac5f840f0ca0c2ae8bbfe76910b06718261a4.jpg",
882
+ "table_caption": [
883
+ "Table 2: Single model perplexity on validation and test sets for the Penn Treebank language modeling task. For our models and the models of Zaremba et al. (2014) and Gal (2015), medium and large refer to a 650 and 1500 unit two layer LSTM respectively. Parameter numbers with $^ \\ddag$ are estimates based upon our understanding of the model and with reference to Kim et al. (2016). "
884
+ ],
885
+ "table_footnote": [],
886
+ "table_body": "<table><tr><td>Model</td><td>Parameters</td><td>Validation</td><td>Test</td></tr><tr><td>Mikolov &amp; Zweig (2012) - KN-5</td><td>2M</td><td></td><td>141.2</td></tr><tr><td>Mikolov &amp; Zweig (2012) - KN5 + cache</td><td>2M</td><td></td><td>125.7</td></tr><tr><td>Mikolov&amp;Zweig g(2012) -RNN</td><td>6M</td><td></td><td>124.7</td></tr><tr><td>Mikolov&amp;Zweig g(2012)-RNN-LDA</td><td>7M</td><td></td><td>113.7</td></tr><tr><td>Mikolov &amp; Zweig ( g(2012) - RNN-LDA + KN-5 +cache</td><td>9M</td><td></td><td>92.0</td></tr><tr><td>Pascanu et al. (2013a) - Deep RNN</td><td>6M</td><td></td><td>107.5</td></tr><tr><td>Cheng et al. (2014) - Sum-Prod Net</td><td>5Mt</td><td>一</td><td>100.0</td></tr><tr><td>Zaremba et al. (2014) - LSTM (medium) Zaremba et al. (2014) - LSTM (large)</td><td>20M</td><td>86.2</td><td>82.7</td></tr><tr><td>Gal (2015) - Variational LSTM (medium, untied)</td><td>66M</td><td>82.2</td><td>78.4</td></tr><tr><td>Gal (2015) - Variational LSTM (medium,untied, MC)</td><td>20M 20M</td><td>81.9 ± 0.2</td><td>79.7 ± 0.1</td></tr><tr><td>Gal (2015) - Variational LSTM (large,untied)</td><td>66M</td><td>一</td><td>78.6 ±0.1</td></tr><tr><td>Gal (2015) - Variational LSTM (large,untied, MC)</td><td></td><td>77.9 ± 0.3</td><td>75.2 ± 0.2</td></tr><tr><td>Kim etal. (2016) - CharCNN</td><td>66M 19M</td><td>1</td><td>73.4± 0.0</td></tr><tr><td>Zilly et al. (2016) - Variational RHN</td><td>32M</td><td>一</td><td>78.9</td></tr><tr><td></td><td></td><td>72.8</td><td>71.3</td></tr><tr><td>Zoneout + Variational LSTM (medium)</td><td>20M</td><td>84.4</td><td>80.6</td></tr><tr><td>Pointer Sentinel-LSTM (medium)</td><td>21M</td><td>72.4</td><td>70.9</td></tr></table>",
887
+ "bbox": [
888
+ 191,
889
+ 102,
890
+ 803,
891
+ 357
892
+ ],
893
+ "page_idx": 7
894
+ },
895
+ {
896
+ "type": "text",
897
+ "text": "LSTM of hidden size 650. We compare against the large model configuration which features a two layer LSTM of hidden size 1500. ",
898
+ "bbox": [
899
+ 173,
900
+ 455,
901
+ 823,
902
+ 483
903
+ ],
904
+ "page_idx": 7
905
+ },
906
+ {
907
+ "type": "text",
908
+ "text": "We produce results for two model types, an LSTM model that uses dropout regularization and the pointer sentinel-LSTM model. The variants of dropout used were zoneout (Krueger et al., 2016) and variational inference based dropout (Gal, 2015). Zoneout, which stochastically forces some recurrent units to maintain their previous values, was used for the recurrent connections within the LSTM. Variational inference based dropout, where the dropout mask for a layer is locked across timesteps, was used on the input to each RNN layer and also on the output of the final RNN layer. We used a value of 0.5 for both dropout connections. ",
909
+ "bbox": [
910
+ 174,
911
+ 491,
912
+ 825,
913
+ 588
914
+ ],
915
+ "page_idx": 7
916
+ },
917
+ {
918
+ "type": "text",
919
+ "text": "5.3 COMPARISON OVER PENN TREEBANK ",
920
+ "text_level": 1,
921
+ "bbox": [
922
+ 176,
923
+ 612,
924
+ 475,
925
+ 626
926
+ ],
927
+ "page_idx": 7
928
+ },
929
+ {
930
+ "type": "text",
931
+ "text": "Table 2 compares the pointer sentinel-LSTM to a variety of other models on the Penn Treebank dataset. The pointer sentinel-LSTM achieves the lowest perplexity, followed by the recent Recurrent Highway Networks (Zilly et al., 2016). The medium pointer sentinel-LSTM model also achieves lower perplexity than the large LSTM models. Note that the best performing large variational LSTM model uses computationally intensive Monte Carlo (MC) dropout averaging. Monte Carlo dropout averaging is a general improvement for any sequence model that uses dropout but comes at a greatly increased test time cost. In Gal (2015) it requires rerunning the test model with 1000 different dropout masks. The pointer sentinel-LSTM is able to achieve these results with far fewer parameters than other models with comparable performance, specifically with less than a third the parameters used in the large variational LSTM models. ",
932
+ "bbox": [
933
+ 174,
934
+ 640,
935
+ 825,
936
+ 780
937
+ ],
938
+ "page_idx": 7
939
+ },
940
+ {
941
+ "type": "text",
942
+ "text": "We also test a variational LSTM that uses zoneout, which serves as the RNN component of our pointer sentinel-LSTM mixture. This variational LSTM model performs BPTT for the same length $L$ as the pointer sentinel-LSTM, where $L = 1 0 0$ timesteps. The results for this model ablation are worse than that of Gal (2015)’s variational LSTM without Monte Carlo dropout averaging. ",
943
+ "bbox": [
944
+ 176,
945
+ 787,
946
+ 825,
947
+ 843
948
+ ],
949
+ "page_idx": 7
950
+ },
951
+ {
952
+ "type": "text",
953
+ "text": "5.4 COMPARISON OVER WIKITEXT-2 ",
954
+ "text_level": 1,
955
+ "bbox": [
956
+ 176,
957
+ 866,
958
+ 442,
959
+ 881
960
+ ],
961
+ "page_idx": 7
962
+ },
963
+ {
964
+ "type": "text",
965
+ "text": "As WikiText-2 is being introduced in this dataset, there are no existing baselines. We provide two baselines to compare the pointer sentinel-LSTM against: our variational LSTM using zoneout and ",
966
+ "bbox": [
967
+ 174,
968
+ 895,
969
+ 825,
970
+ 924
971
+ ],
972
+ "page_idx": 7
973
+ },
974
+ {
975
+ "type": "table",
976
+ "img_path": "images/e118bfa88fa9949d7520597d73dce917db8fa9e729b242dd65df300d0c46b6ab.jpg",
977
+ "table_caption": [],
978
+ "table_footnote": [],
979
+ "table_body": "<table><tr><td>Model</td><td>Parameters</td><td>Validation</td><td>Test</td></tr><tr><td>Variational LSTM implementation from Gal (2015)</td><td>20M</td><td>101.7</td><td>96.3</td></tr><tr><td>Zoneout + Variational LSTM</td><td>20M</td><td>108.7</td><td>100.9</td></tr><tr><td>Pointer Sentinel-LSTM</td><td>21M</td><td>84.8</td><td>80.8</td></tr></table>",
980
+ "bbox": [
981
+ 220,
982
+ 101,
983
+ 774,
984
+ 174
985
+ ],
986
+ "page_idx": 8
987
+ },
988
+ {
989
+ "type": "text",
990
+ "text": "Table 3: Single model perplexity on validation and test sets for the WikiText-2 language modeling task. All compared models use a two layer LSTM with a hidden size of 650. ",
991
+ "bbox": [
992
+ 173,
993
+ 184,
994
+ 821,
995
+ 213
996
+ ],
997
+ "page_idx": 8
998
+ },
999
+ {
1000
+ "type": "text",
1001
+ "text": "the medium variational LSTM used in Gal (2015).4 Attempts to run the Gal (2015) large model variant, a two layer LSTM with hidden size 1500, resulted in out of memory errors on a 12GB K80 GPU, likely due to the increased vocabulary size. We chose the best hyperparameters from PTB experiments for all models. Table 3 shows a similar gain made by the pointer sentinel-LSTM over the variational LSTM models. The variational LSTM from Gal (2015) again beats out the variational LSTM used as a base for our experiments. ",
1002
+ "bbox": [
1003
+ 174,
1004
+ 222,
1005
+ 825,
1006
+ 306
1007
+ ],
1008
+ "page_idx": 8
1009
+ },
1010
+ {
1011
+ "type": "text",
1012
+ "text": "6 ANALYSIS ",
1013
+ "text_level": 1,
1014
+ "bbox": [
1015
+ 174,
1016
+ 329,
1017
+ 290,
1018
+ 344
1019
+ ],
1020
+ "page_idx": 8
1021
+ },
1022
+ {
1023
+ "type": "text",
1024
+ "text": "6.1 IMPACT ON RARE WORDS ",
1025
+ "text_level": 1,
1026
+ "bbox": [
1027
+ 176,
1028
+ 361,
1029
+ 395,
1030
+ 376
1031
+ ],
1032
+ "page_idx": 8
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "A hypothesis as to why the pointer sentinel-LSTM can outperform an LSTM is that the pointer component allows the model to effectively reproduce rare words. The RNN may better use hidden state capacity by relying on the pointer component. The pointer component may also allow for a sharper selection of a single word than may be possible using only the softmax. ",
1037
+ "bbox": [
1038
+ 176,
1039
+ 388,
1040
+ 825,
1041
+ 444
1042
+ ],
1043
+ "page_idx": 8
1044
+ },
1045
+ {
1046
+ "type": "text",
1047
+ "text": "The appendix contains a graph which shows the improvement of perplexity when comparing the LSTM to the pointer sentinel-LSTM. Words are split across buckets according to frequency. As the words become rarer, the pointer sentinel-LSTM has stronger improvements in perplexity. Even on the Penn Treebank, where there is a relative absence of rare words due to only selecting the most frequent 10k words, we can see the pointer sentinel-LSTM mixture model provides a direct benefit. ",
1048
+ "bbox": [
1049
+ 174,
1050
+ 452,
1051
+ 825,
1052
+ 522
1053
+ ],
1054
+ "page_idx": 8
1055
+ },
1056
+ {
1057
+ "type": "text",
1058
+ "text": "While the improvements are largest on rare words, we can see the pointer sentinel-LSTM is still helpful on relatively frequent words. This may be the pointer component directly selecting the word or through the pointer supervision signal improving the RNN by allowing gradients to flow directly to other occurrences of the word in that window. ",
1059
+ "bbox": [
1060
+ 176,
1061
+ 529,
1062
+ 823,
1063
+ 584
1064
+ ],
1065
+ "page_idx": 8
1066
+ },
1067
+ {
1068
+ "type": "text",
1069
+ "text": "6.2 QUALITATIVE ANALYSIS OF POINTER USAGE ",
1070
+ "text_level": 1,
1071
+ "bbox": [
1072
+ 179,
1073
+ 604,
1074
+ 526,
1075
+ 618
1076
+ ],
1077
+ "page_idx": 8
1078
+ },
1079
+ {
1080
+ "type": "text",
1081
+ "text": "In a qualitative analysis, we visualized the gate use and pointer attention for a variety of examples in the validation set, focusing on predictions where the gate primarily used the pointer component. These visualizations are available in the appendix. ",
1082
+ "bbox": [
1083
+ 176,
1084
+ 631,
1085
+ 825,
1086
+ 672
1087
+ ],
1088
+ "page_idx": 8
1089
+ },
1090
+ {
1091
+ "type": "text",
1092
+ "text": "As expected, the pointer component is heavily used for rare names such as Seidman (23 times in training), Iverson (7 times in training), and Rosenthal (3 times in training). The pointer component was also heavily used when it came to other named entity names such as companies like Honeywell (8 times in training) and Integrated (41 times in training, though due to lowercasing of words this includes integrated circuits, fully integrated, and other generic usage). Surprisingly, the pointer component was also used for many frequent tokens. For selecting units of measurement (tons, kilograms, . . . ) or the short scale of numbers (thousands, millions, billions, . . . ), the pointer would refer to recent usage. This is to be expected, especially when phrases are of the form increased from N tons to N tons. The model can even be found relying on a mixture of the softmax and the pointer for predicting frequent verbs such as said. ",
1093
+ "bbox": [
1094
+ 174,
1095
+ 680,
1096
+ 825,
1097
+ 819
1098
+ ],
1099
+ "page_idx": 8
1100
+ },
1101
+ {
1102
+ "type": "text",
1103
+ "text": "Finally, the pointer component can be seen pointing to words at the very end of the 100 word window (position 97), a far longer horizon than the 35 steps that most language models truncate their backpropagation training to. This illustrates why the gating function must be integrated into the pointer component. If the gating function could only use the RNN hidden state, it would need to be wary of words that were near the tail of the pointer, especially if it was not able to accurately track exactly how long it was since seeing a word. By integrating the gating function into the pointer component, we avoid the RNN hidden state having to maintain this intensive bookkeeping. ",
1104
+ "bbox": [
1105
+ 174,
1106
+ 827,
1107
+ 823,
1108
+ 895
1109
+ ],
1110
+ "page_idx": 8
1111
+ },
1112
+ {
1113
+ "type": "text",
1114
+ "text": "",
1115
+ "bbox": [
1116
+ 173,
1117
+ 103,
1118
+ 823,
1119
+ 132
1120
+ ],
1121
+ "page_idx": 9
1122
+ },
1123
+ {
1124
+ "type": "text",
1125
+ "text": "7 CONCLUSION ",
1126
+ "text_level": 1,
1127
+ "bbox": [
1128
+ 176,
1129
+ 152,
1130
+ 318,
1131
+ 170
1132
+ ],
1133
+ "page_idx": 9
1134
+ },
1135
+ {
1136
+ "type": "text",
1137
+ "text": "We introduced the pointer sentinel mixture model and the WikiText language modeling dataset. The pointer sentinel mixture model can be applied to any classifier that ends in a softmax, including various recurrent neural network building blocks. When applied to a standard LSTM, the pointer sentinel-LSTM achieves state of the art results in language modeling over the Penn Treebank while using few additional parameters and little additional computational complexity at prediction time. ",
1138
+ "bbox": [
1139
+ 174,
1140
+ 185,
1141
+ 825,
1142
+ 256
1143
+ ],
1144
+ "page_idx": 9
1145
+ },
1146
+ {
1147
+ "type": "text",
1148
+ "text": "We have also motivated the need to move from Penn Treebank to a new language modeling dataset for long range dependencies, providing WikiText-2 and WikiText-103 as potential options. We hope these new datasets can serve as a platform to improve handling of rare words and the usage of long term dependencies in language modeling. ",
1149
+ "bbox": [
1150
+ 176,
1151
+ 262,
1152
+ 825,
1153
+ 318
1154
+ ],
1155
+ "page_idx": 9
1156
+ },
1157
+ {
1158
+ "type": "text",
1159
+ "text": "REFERENCES ",
1160
+ "text_level": 1,
1161
+ "bbox": [
1162
+ 174,
1163
+ 340,
1164
+ 285,
1165
+ 356
1166
+ ],
1167
+ "page_idx": 9
1168
+ },
1169
+ {
1170
+ "type": "text",
1171
+ "text": "Yossi Adi, Einat Kermany, Yonatan Belinkov, Ofer Lavi, and Yoav Goldberg. Fine-grained Analysis of Sentence Embeddings Using Auxiliary Prediction Tasks. arXiv preprint arXiv:1608.04207, 2016. \nSungjin Ahn, Heeyoul Choi, Tanel Parnamaa, and Yoshua Bengio. A Neural Knowledge Language ¨ Model. CoRR, abs/1608.00318, 2016. \nDzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural Machine Translation by Jointly Learning to Align and Translate. In ICLR, 2015. \nCiprian 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. \nJianpeng Cheng, Li Dong, and Mirella Lapata. Long Short-Term Memory-Networks for Machine Reading. CoRR, abs/1601.06733, 2016. \nWei-Chen Cheng, Stanley Kok, Hoai Vu Pham, Hai Leong Chieu, and Kian Ming Adam Chai. Language Modeling with Sum-Product Networks. In INTERSPEECH, 2014. \nYarin Gal. A Theoretically Grounded Application of Dropout in Recurrent Neural Networks. arXiv preprint arXiv:1512.05287, 2015. \nJiatao Gu, Zhengdong Lu, Hang Li, and Victor O. K. Li. Incorporating Copying Mechanism in Sequence-to-Sequence Learning. CoRR, abs/1603.06393, 2016. \nC¸ aglar Gulc¸ehre, Sungjin Ahn, Ramesh Nallapati, Bowen Zhou, and Yoshua Bengio. Pointing the ¨ Unknown Words. arXiv preprint arXiv:1603.08148, 2016. \nSepp Hochreiter and Jurgen Schmidhuber. Long Short-Term Memory. ¨ Neural Computation, 9(8): 1735–1780, Nov 1997. ISSN 0899-7667. \nRudolf Kadlec, Martin Schmid, Ondrej Bajgar, and Jan Kleindienst. Text Understanding with the Attention Sum Reader Network. arXiv preprint arXiv:1603.01547, 2016. \nYoon Kim, Yacine Jernite, David Sontag, and Alexander M. Rush. Character-aware neural language models. CoRR, abs/1508.06615, 2016. \nPhilipp Koehn, Hieu Hoang, Alexandra Birch, Chris Callison-Burch, Marcello Federico, Nicola Bertoldi, Brooke Cowan, Wade Shen, Christine Moran, Richard Zens, Chris Dyer, Ondej Bojar, Alexandra Constantin, and Evan Herbst. Moses: Open Source Toolkit for Statistical Machine Translation. In ACL, 2007. ",
1172
+ "bbox": [
1173
+ 171,
1174
+ 358,
1175
+ 826,
1176
+ 922
1177
+ ],
1178
+ "page_idx": 9
1179
+ },
1180
+ {
1181
+ "type": "text",
1182
+ "text": "David Krueger, Tegan Maharaj, Janos Kram ´ ar, Mohammad Pezeshki, Nicolas Ballas, Nan Rosemary ´ Ke, Anirudh Goyal, Yoshua Bengio, Hugo Larochelle, Aaron Courville, et al. Zoneout: Regularizing RNNs by Randomly Preserving Hidden Activations. arXiv preprint arXiv:1606.01305, 2016. ",
1183
+ "bbox": [
1184
+ 174,
1185
+ 103,
1186
+ 825,
1187
+ 159
1188
+ ],
1189
+ "page_idx": 10
1190
+ },
1191
+ {
1192
+ "type": "text",
1193
+ "text": "Ankit Kumar, Ozan Irsoy, Peter Ondruska, Mohit Iyyer, James Bradbury, Ishaan Gulrajani, Victor Zhong, Romain Paulus, and Richard Socher. Ask me anything: Dynamic memory networks for natural language processing. In ICML, 2016. ",
1194
+ "bbox": [
1195
+ 176,
1196
+ 169,
1197
+ 825,
1198
+ 212
1199
+ ],
1200
+ "page_idx": 10
1201
+ },
1202
+ {
1203
+ "type": "text",
1204
+ "text": "Wang Ling, Edward Grefenstette, Karl Moritz Hermann, Tomas Kocisk ´ y, Andrew Senior, ´ Fumin Wang, and Phil Blunsom. Latent Predictor Networks for Code Generation. CoRR, abs/1603.06744, 2016. ",
1205
+ "bbox": [
1206
+ 174,
1207
+ 220,
1208
+ 825,
1209
+ 262
1210
+ ],
1211
+ "page_idx": 10
1212
+ },
1213
+ {
1214
+ "type": "text",
1215
+ "text": "Mitchell P. Marcus, Beatrice Santorini, and Mary Ann Marcinkiewicz. Building a Large Annotated Corpus of English: The Penn Treebank. Computational Linguistics, 19:313–330, 1993. ",
1216
+ "bbox": [
1217
+ 174,
1218
+ 272,
1219
+ 823,
1220
+ 301
1221
+ ],
1222
+ "page_idx": 10
1223
+ },
1224
+ {
1225
+ "type": "text",
1226
+ "text": "Tomas Mikolov and Geoffrey Zweig. Context dependent recurrent neural network language model. In SLT, 2012. ",
1227
+ "bbox": [
1228
+ 174,
1229
+ 309,
1230
+ 821,
1231
+ 338
1232
+ ],
1233
+ "page_idx": 10
1234
+ },
1235
+ {
1236
+ "type": "text",
1237
+ "text": "Tomas Mikolov, Martin Karafiat, Luk ´ as Burget, Jan Cernock ´ y, and Sanjeev Khudanpur. Recurrent ´ neural network based language model. In INTERSPEECH, 2010. ",
1238
+ "bbox": [
1239
+ 173,
1240
+ 347,
1241
+ 821,
1242
+ 376
1243
+ ],
1244
+ "page_idx": 10
1245
+ },
1246
+ {
1247
+ "type": "text",
1248
+ "text": "Razvan Pascanu, C¸ aglar Gulc¸ehre, Kyunghyun Cho, and Yoshua Bengio. How to Construct Deep ¨ Recurrent Neural Networks. CoRR, abs/1312.6026, 2013a. ",
1249
+ "bbox": [
1250
+ 173,
1251
+ 385,
1252
+ 825,
1253
+ 414
1254
+ ],
1255
+ "page_idx": 10
1256
+ },
1257
+ {
1258
+ "type": "text",
1259
+ "text": "Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the difficulty of training recurrent neural networks. In ICML, 2013b. ",
1260
+ "bbox": [
1261
+ 174,
1262
+ 422,
1263
+ 821,
1264
+ 452
1265
+ ],
1266
+ "page_idx": 10
1267
+ },
1268
+ {
1269
+ "type": "text",
1270
+ "text": "Roni Rosenfeld. A Maximum Entropy Approach to Adaptive Statistical Language Modeling. 1996. ",
1271
+ "bbox": [
1272
+ 173,
1273
+ 460,
1274
+ 821,
1275
+ 477
1276
+ ],
1277
+ "page_idx": 10
1278
+ },
1279
+ {
1280
+ "type": "text",
1281
+ "text": "Sainbayar Sukhbaatar, Arthur Szlam, Jason Weston, and Rob Fergus. End-To-End Memory Networks. In NIPS, 2015. ",
1282
+ "bbox": [
1283
+ 173,
1284
+ 484,
1285
+ 823,
1286
+ 513
1287
+ ],
1288
+ "page_idx": 10
1289
+ },
1290
+ {
1291
+ "type": "text",
1292
+ "text": "Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. Pointer networks. In Advances in Neural Information Processing Systems, pp. 2692–2700, 2015. ",
1293
+ "bbox": [
1294
+ 173,
1295
+ 522,
1296
+ 823,
1297
+ 551
1298
+ ],
1299
+ "page_idx": 10
1300
+ },
1301
+ {
1302
+ "type": "text",
1303
+ "text": "Caiming Xiong, Stephen Merity, and Richard Socher. Dynamic Memory Networks for Visual and Textual Question Answering. In ICML, 2016. ",
1304
+ "bbox": [
1305
+ 174,
1306
+ 560,
1307
+ 823,
1308
+ 589
1309
+ ],
1310
+ "page_idx": 10
1311
+ },
1312
+ {
1313
+ "type": "text",
1314
+ "text": "Wojciech Zaremba, Ilya Sutskever, and Oriol Vinyals. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, 2014. ",
1315
+ "bbox": [
1316
+ 174,
1317
+ 597,
1318
+ 821,
1319
+ 627
1320
+ ],
1321
+ "page_idx": 10
1322
+ },
1323
+ {
1324
+ "type": "text",
1325
+ "text": "Julian Georg Zilly, Rupesh Kumar Srivastava, Jan Koutn´ık, and Jurgen Schmidhuber. Recurrent ¨ Highway Networks. arXiv preprint arXiv:1607.03474, 2016. ",
1326
+ "bbox": [
1327
+ 173,
1328
+ 636,
1329
+ 823,
1330
+ 665
1331
+ ],
1332
+ "page_idx": 10
1333
+ },
1334
+ {
1335
+ "type": "text",
1336
+ "text": "APPENDIX ",
1337
+ "text_level": 1,
1338
+ "bbox": [
1339
+ 176,
1340
+ 103,
1341
+ 263,
1342
+ 117
1343
+ ],
1344
+ "page_idx": 11
1345
+ },
1346
+ {
1347
+ "type": "image",
1348
+ "img_path": "images/c45d689e3a9e29ba2e76713a83dcf9f4d4092e2ed8fea40c92d7c483e5b46e8e.jpg",
1349
+ "image_caption": [
1350
+ "Figure A1: Mean difference in log perplexity on PTB when using the pointer sentinel-LSTM compared to the LSTM model. Words were sorted by frequency and split into equal sized buckets. "
1351
+ ],
1352
+ "image_footnote": [],
1353
+ "bbox": [
1354
+ 200,
1355
+ 191,
1356
+ 761,
1357
+ 532
1358
+ ],
1359
+ "page_idx": 11
1360
+ },
1361
+ {
1362
+ "type": "text",
1363
+ "text": "POINTER USAGE ON THE PENN TREEBANK ",
1364
+ "text_level": 1,
1365
+ "bbox": [
1366
+ 176,
1367
+ 103,
1368
+ 470,
1369
+ 117
1370
+ ],
1371
+ "page_idx": 12
1372
+ },
1373
+ {
1374
+ "type": "text",
1375
+ "text": "For a qualitative analysis, we visualize how the pointer component is used within the pointer sentinel mixture model. The gate refers to the result of the gating function, with 1 indicating the RNN component is exclusively used whilst 0 indicates the pointer component is exclusively used. We begin with predictions that are using the RNN component primarily and move to ones that use the pointer component primarily. ",
1376
+ "bbox": [
1377
+ 173,
1378
+ 128,
1379
+ 825,
1380
+ 200
1381
+ ],
1382
+ "page_idx": 12
1383
+ },
1384
+ {
1385
+ "type": "image",
1386
+ "img_path": "images/bfe1101a2fb87f4dcc5d4a29f6b3f7d8300c9eaa08d693f87d33a6263f3313bb.jpg",
1387
+ "image_caption": [
1388
+ "Figure A2: In predicting the fall season has been a good one especially for those retailers, the pointer component suggests many words from the historical window that would fit - retailers, investments, chains, and institutions. The gate is still primarily weighted towards the RNN component however. "
1389
+ ],
1390
+ "image_footnote": [],
1391
+ "bbox": [
1392
+ 183,
1393
+ 217,
1394
+ 818,
1395
+ 273
1396
+ ],
1397
+ "page_idx": 12
1398
+ },
1399
+ {
1400
+ "type": "image",
1401
+ "img_path": "images/74f8b37f282e29b8fa0aba935aeef9ab0765afe5633d21f65b8558f8effb4fca.jpg",
1402
+ "image_caption": [
1403
+ "Figure A3: In predicting the national cancer institute also projected that overall u.s. mortality, the pointer component is focused on mortality and rates, both of which would fit. The gate is still primarily weighted towards the RNN component. "
1404
+ ],
1405
+ "image_footnote": [],
1406
+ "bbox": [
1407
+ 184,
1408
+ 381,
1409
+ 816,
1410
+ 435
1411
+ ],
1412
+ "page_idx": 12
1413
+ },
1414
+ {
1415
+ "type": "image",
1416
+ "img_path": "images/29f2ee31d97f97d485e728471fd2cd3eb34ab3a8f310dc8086e09059401473fd.jpg",
1417
+ "image_caption": [
1418
+ "Figure A4: In predicting people do n’t seem to be unhappy with it he said, the pointer component correctly selects said and is almost equally weighted with the RNN component. This is surprising given how frequent the word said is used within the Penn Treebank. "
1419
+ ],
1420
+ "image_footnote": [],
1421
+ "bbox": [
1422
+ 183,
1423
+ 534,
1424
+ 816,
1425
+ 582
1426
+ ],
1427
+ "page_idx": 12
1428
+ },
1429
+ {
1430
+ "type": "image",
1431
+ "img_path": "images/ef168c7e1ca9bc89964097cbd337eb2c1028caa5e8e233bb485daa4283e232c1.jpg",
1432
+ "image_caption": [
1433
+ "Figure A5: For predicting the federal government has had to pump in $\\$ 1$ N billion, the pointer component focuses on the recent usage of billion with highly similar context. The pointer component is also relied upon more heavily than the RNN component - surprising given the frequency of billion within the Penn Treebank and that the usage was quite recent. "
1434
+ ],
1435
+ "image_footnote": [],
1436
+ "bbox": [
1437
+ 179,
1438
+ 54,
1439
+ 818,
1440
+ 167
1441
+ ],
1442
+ "page_idx": 13
1443
+ },
1444
+ {
1445
+ "type": "image",
1446
+ "img_path": "images/dd311d97c72a9f4fa21add99ecf8515494eb4cc97c98fcb7f45e7fd312eb7776.jpg",
1447
+ "image_caption": [
1448
+ "Figure A6: For predicting $\\left. u n k \\right.$ ’s ghost sometimes runs through the e ring dressed like gen. noriega, the pointer component reaches 97 timesteps back to retrieve gen. douglas. Unfortunately this prediction is incorrect but without additional context a human would have guessed the same word. This additionally illustrates why the gating function must be integrated into the pointer component. The named entity gen. douglas would have fallen out of the window in only four more timesteps, a fact that the RNN hidden state would not be able to accurately retain for almost 100 timesteps. "
1449
+ ],
1450
+ "image_footnote": [],
1451
+ "bbox": [
1452
+ 183,
1453
+ 286,
1454
+ 816,
1455
+ 333
1456
+ ],
1457
+ "page_idx": 13
1458
+ },
1459
+ {
1460
+ "type": "image",
1461
+ "img_path": "images/12273399d0022a69702f98b310adb69608c6c1657321fc3e0ec1618d18640606.jpg",
1462
+ "image_caption": [
1463
+ "Figure A7: For predicting mr. iverson, the pointer component has learned the ability to point to the last name of the most recent named entity. The named entity also occurs 45 timesteps ago, which is longer than the 35 steps that most language models truncate their backpropagation to. "
1464
+ ],
1465
+ "image_footnote": [],
1466
+ "bbox": [
1467
+ 183,
1468
+ 483,
1469
+ 816,
1470
+ 534
1471
+ ],
1472
+ "page_idx": 13
1473
+ },
1474
+ {
1475
+ "type": "image",
1476
+ "img_path": "images/81f496401397d434510e2273937e7d5a166e9cb126ae3d3fa7dc1987293081e2.jpg",
1477
+ "image_caption": [
1478
+ "Figure A8: For predicting mr. rosenthal, the pointer is almost exclusively used and reaches back 65 timesteps to identify bruce rosenthal as the person speaking, correctly only selecting the last name. "
1479
+ ],
1480
+ "image_footnote": [],
1481
+ "bbox": [
1482
+ 181,
1483
+ 640,
1484
+ 816,
1485
+ 703
1486
+ ],
1487
+ "page_idx": 13
1488
+ },
1489
+ {
1490
+ "type": "image",
1491
+ "img_path": "images/5244179d618289042f46d23f44db0ec07e116e8a3e2a4f736497656a6a7b8d86.jpg",
1492
+ "image_caption": [
1493
+ "Figure A9: For predicting in composite trading on the new york stock exchange yesterday integrated, the company Integrated and the $\\left. u n k \\right.$ token are primarily attended to by the pointer component, with nearly the full prediction being determined by the pointer component. "
1494
+ ],
1495
+ "image_footnote": [],
1496
+ "bbox": [
1497
+ 181,
1498
+ 785,
1499
+ 816,
1500
+ 837
1501
+ ],
1502
+ "page_idx": 13
1503
+ },
1504
+ {
1505
+ "type": "text",
1506
+ "text": "ZIPFIAN PLOT OVER PTB AND WIKITEXT-2",
1507
+ "text_level": 1,
1508
+ "bbox": [
1509
+ 174,
1510
+ 103,
1511
+ 478,
1512
+ 117
1513
+ ],
1514
+ "page_idx": 14
1515
+ },
1516
+ {
1517
+ "type": "image",
1518
+ "img_path": "images/fef900b9bfea3ce6d1b68bfa9dc98ab50ad06567225c817639d232fbc434491e.jpg",
1519
+ "image_caption": [
1520
+ "Figure A10: Zipfian plot over the training partition in Penn Treebank and WikiText-2 datasets. Notice the severe drop on the Penn Treebank when the vocabulary hits $1 0 ^ { 4 }$ . Two thirds of the vocabulary in WikiText-2 are past the vocabulary cut-off of the Penn Treebank. "
1521
+ ],
1522
+ "image_footnote": [],
1523
+ "bbox": [
1524
+ 179,
1525
+ 137,
1526
+ 880,
1527
+ 356
1528
+ ],
1529
+ "page_idx": 14
1530
+ },
1531
+ {
1532
+ "type": "text",
1533
+ "text": "ZIPFIAN PLOT OVER WIKITEXT-103 ",
1534
+ "bbox": [
1535
+ 174,
1536
+ 445,
1537
+ 424,
1538
+ 459
1539
+ ],
1540
+ "page_idx": 14
1541
+ },
1542
+ {
1543
+ "type": "image",
1544
+ "img_path": "images/750b091fb947314259a95c5ff06b556058e55aa11164e7c6a76439cd5d72c9cf.jpg",
1545
+ "image_caption": [
1546
+ "Figure A11: Zipfian plot over the training partition in the WikiText-103 dataset. With the dataset containing over 100 million tokens, there is reasonable coverage of the long tail of the vocabulary. "
1547
+ ],
1548
+ "image_footnote": [],
1549
+ "bbox": [
1550
+ 276,
1551
+ 481,
1552
+ 712,
1553
+ 732
1554
+ ],
1555
+ "page_idx": 14
1556
+ }
1557
+ ]
parse/train/Byj72udxe/Byj72udxe_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Byj72udxe/Byj72udxe_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HyRVBzap-/HyRVBzap-.md ADDED
@@ -0,0 +1,307 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CASCADE ADVERSARIAL MACHINE LEARNING REGULARIZED WITH A UNIFIED EMBEDDING
2
+
3
+ Taesik Na, Jong Hwan Ko & Saibal Mukhopadhyay
4
+
5
+ School of Electrical and Computer Engineering
6
+ Georgia Institute of Technology
7
+ Atlanta, GA 30332, USA
8
+ {taesik.na, jonghwan.ko, smukhopadhyay6}@gatech.edu
9
+
10
+ # ABSTRACT
11
+
12
+ Injecting adversarial examples during training, known as adversarial training, can improve robustness against one-step attacks, but not for unknown iterative attacks. To address this challenge, we first show iteratively generated adversarial images easily transfer between networks trained with the same strategy. Inspired by this observation, we propose cascade adversarial training, which transfers the knowledge of the end results of adversarial training. We train a network from scratch by injecting iteratively generated adversarial images crafted from already defended networks in addition to one-step adversarial images from the network being trained. We also propose to utilize embedding space for both classification and low-level (pixel-level) similarity learning to ignore unknown pixel level perturbation. During training, we inject adversarial images without replacing their corresponding clean images and penalize the distance between the two embeddings (clean and adversarial). Experimental results show that cascade adversarial training together with our proposed low-level similarity learning efficiently enhances the robustness against iterative attacks, but at the expense of decreased robustness against one-step attacks. We show that combining those two techniques can also improve robustness under the worst case black box attack scenario.
13
+
14
+ # 1 INTRODUCTION
15
+
16
+ Injecting adversarial examples during training (adversarial training), (Goodfellow et al., 2015; Kurakin et al., 2017; Huang et al., 2015) increases the robustness of a network against adversarial attacks. The networks trained with one-step methods have shown noticeable robustness against onestep attacks, but, limited robustness against iterative attacks at test time. To address this challenge, we have made the following contributions:
17
+
18
+ Cascade adversarial training: We first show that iteratively generated adversarial images transfer well between networks when the source and the target networks are trained with the same training method. Inspired by this observation, we propose cascade adversarial training which transfers the knowledge of the end results of adversarial training. In particular, we train a network by injecting iter FGSM images (section 2.1) crafted from an already defended network (a network trained with adversarial training) in addition to the one-step adversarial images crafted from the network being trained. The concept of using already trained networks for adversarial training is also introduced in (Tramer et al., 2017). In their work, purely trained networks are used as another source networks \` to generate one-step adversarial examples for training. On the contrary, our cascade adversarial training uses already defended network for iter FGSM images generation.
19
+
20
+ Low level similarity learning: We advance the previous data augmentation approach (Kurakin et al., 2017) by adding additional regularization in deep features to encourage a network to be insensitive to adversarial perturbation. In particular, we inject adversarial images in the mini batch without replacing their corresponding clean images and penalize distance between embeddings from the clean and the adversarial examples. There are past examples of using embedding space for learning similarity of high level features like face similarity between two different images (Schroff et al., 2015; Parkhi et al., 2015; Wen et al., 2016). Instead, we use the embedding space for learning similarity of the pixel level differences between two similar images. The intuition of using this regularization is that small difference on input should not drastically change the high level feature representation.
21
+
22
+ Analysis of adversarial training: We train ResNet models (He et al., 2016) on MNIST (LeCun & Cortes, 2010) and CIFAR10 dataset (Krizhevsky, 2009) using the proposed adversarial training. We first show low level similarity learning improves robustness of the network against adversarial images generated by one-step and iterative methods compared to the prior work. We show that modifying the weight of the distance measure in the loss function can help control trade-off between accuracies for the clean and adversarial examples.
23
+
24
+ Together with cascade adversarial training and low-level similarity learning, we achieve accuracy increase against unknown iterative attacks, but at the expense of decreased accuracy for one-step attacks. We also show our cascade adversarial training and low level similarity learning provide much better robustness against black box attack.
25
+
26
+ # 2 BACKGROUND ON ADVERSARIAL ATTACKS
27
+
28
+ # 2.1 ATTACK METHODS
29
+
30
+ One-step fast gradient sign method (FGSM), referred to as “step FGSM”, generates adversarial image $\bar { X } ^ { a d v }$ by adding sign of the gradients w.r.t. the clean image $\boldsymbol { X }$ multiplied by $\epsilon \in [ 0 , 2 5 5 ]$ as shown below (Goodfellow et al., 2015):
31
+
32
+ $$
33
+ X ^ { a d v } = X + \epsilon \mathrm { s i g n } ( \nabla _ { X } J ( X , y _ { t r u e } ) )
34
+ $$
35
+
36
+ One-step target class method generates $X ^ { a d v }$ by subtracting sign of the gradients computed on a target false label as follows:
37
+
38
+ $$
39
+ X ^ { a d v } = X - \epsilon \mathrm { s i g n } ( \nabla _ { X } J ( X , y _ { t a r g e t } ) )
40
+ $$
41
+
42
+ We use least likely class $y _ { L L }$ as a target class and refer this method as “step ll”.
43
+
44
+ Basic iterative method, referred to as “iter FGSM”, applies FGSM with small $\alpha$ multiple times.
45
+
46
+ $$
47
+ X _ { 0 } ^ { a d v } = X , \quad X _ { N } ^ { a d v } = C l i p _ { X , \epsilon } \{ X _ { N - 1 } ^ { a d v } + \alpha \ \mathrm { s i g n } ( \nabla _ { X _ { N - 1 } ^ { a d v } } J ( X _ { N - 1 } ^ { a d v } , y _ { t r u e } ) ) \}
48
+ $$
49
+
50
+ We use $\alpha = 1$ , number of iterations $N$ to be $\operatorname* { m i n } ( \epsilon + 4 , 1 . 2 5 \epsilon ) . ~ C l i p _ { X , \epsilon }$ is elementwise clipping function where the input is clipped to the range $[ \mathrm { m a x } ( 0 , X - \epsilon ) , \mathrm { m i n } ( 2 5 5 , X + \epsilon ) ]$ .
51
+
52
+ Iterative least-likely class method, referred to as “iter ll”, is to apply “step ll” with small $\alpha$ multiple times.
53
+
54
+ $$
55
+ X _ { 0 } ^ { a d v } = X , \quad X _ { N } ^ { a d v } = C l i p _ { X , \epsilon } \{ X _ { N - 1 } ^ { a d v } - \alpha \ \mathrm { s i g n } ( \nabla _ { X _ { N - 1 } ^ { a d v } } J ( X _ { N - 1 } ^ { a d v } , y _ { L L } ) ) \}
56
+ $$
57
+
58
+ Carlini and Wagner attack (Carlini & Wagner, 2017) referred to as $\mathbf { \tilde { \Sigma } } ^ { 6 6 } \mathbf { C } \mathbf { W } ^ { \prime } $ solves an optimization problem which minimizes both an objective function $f$ (such that attack is success if and only if $\stackrel { \bullet } { f } ( X ^ { a d v } ) < 0 )$ and a distance measure between $X ^ { a d v }$ and $\boldsymbol { X }$ .
59
+
60
+ Black box attack is performed by testing accuracy on a target network with the adversarial images crafted from a source network different from the target network. Lower accuracy means successful black-box attack. When we use the same network for both target and source network, we call this as white-box attack.
61
+
62
+ # 2.2 DEFENSE METHODS
63
+
64
+ Adversarial training (Kurakin et al., 2017): is a form of data augmentation where it injects adversarial examples during training. In this method, $k$ examples are taken from the mini batch $B$ (size of $m$ ) and the adversarial examples are generated with one of step method. The $k$ adversarial examples replaces the corresponding clean examples when making mini batch. Below we refer this adversarial training method as “Kurakin’s”.
65
+
66
+ Table 1: CIFAR10 test results $( \% )$ under black box attacks for ${ \epsilon } { = } 1 6$ . Source networks share the same initialization which is different from the target networks. {Target: R20, $\mathsf { R } 2 0 _ { K }$ : standard, Kurakin’s, Source: $\mathbf { R } 2 0 \mathbf { _ 2 }$ , $\mathbf { R } 2 0 _ { K 2 }$ : standard, Kurakin’s.}
67
+
68
+ <table><tr><td rowspan="2">Target</td><td colspan="2">Source: step-FGSM</td><td colspan="2">Source: iter_FGSM</td></tr><tr><td>R202</td><td>R20K2</td><td>R202</td><td>R20K2</td></tr><tr><td>R20</td><td>16.2</td><td>31.6</td><td>2.7</td><td>60.1</td></tr><tr><td>R20K</td><td>66.7</td><td>82.7</td><td>55.8</td><td>28.5</td></tr></table>
69
+
70
+ ![](images/9574ecbaff76aa59c142821a74b75ca57db11c28bc841935cae1c0896257b6aa.jpg)
71
+ Figure 1: Correlation between adversarial noises from different networks for each $\epsilon$ . Shaded region shows $\pm 0 . 1$ standard deviation of each line.
72
+
73
+ Ensemble adversarial training (Tramer et al., 2017): \` is essentially the same with the adversarial training, but uses several pre-trained vanilla networks to generate one-step adversarial examples for training. Below we refer this adversarial training method as “Ensemble”.
74
+
75
+ # 3 PROPOSED APPROACH
76
+
77
+ # 3.1 TRANSFERABILITY ANALYSIS
78
+
79
+ We first show transferability between purely trained networks and adversarially trained networks under black box attack. We use ResNet (He et al., 2016) models for CIFAR10 classification. We first train 20-layer ResNets with different methods (standard training, adversarial training (Kurakin et al., 2017)) and use those as target networks. We re-train networks (standard training and adversarial training) with the different initialization from the target networks, and use the trained networks as source networks. Experimental details and model descriptions can be found in Appendix A and B. In table 1, we report test accuracies under black box attack.
80
+
81
+ Transferability (step attack): We first observe that high robustness against one-step attack between defended networks $( \mathsf { R } 2 0 _ { K 2 } \ldots \mathsf { R } 2 0 _ { K } )$ ), and low robustness between undefended networks $( \mathsf { R 2 0 _ { 2 } }$ - $> { \textrm R } 2 0 \AA ,$ ). This observation shows that error surfaces of neural networks are driven by the training method and networks trained with the same method end up similar optimum states.
82
+
83
+ It is noteworthy to observe that the accuracies against step attack from the undefended network $( \mathsf { R } 2 0 _ { 2 } )$ are always lower than those from defended network $( \mathsf { R } 2 0 _ { K { \bf 2 } } )$ . Possible explanation for this would be that adversarial training tweaks gradient seen from the clean image to point toward weaker adversarial point along that gradient direction. As a result, one-step adversarial images from defended networks become weaker than those from undefended network.
84
+
85
+ Transferability (iterative attack): We observe “iter FGSM” attack remains very strong even under the black box attack scenario but only between undefended networks or defended networks. This is because iter FGSM noises $( X ^ { a d v } – X )$ from defended networks resemble each other. As shown in figure 1, we observe higher correlation between iter FGSM noises from a defended network $( \mathsf { R } 2 0 \kappa )$ and those from another defended network $( \mathsf { R } 2 0 _ { K { \bf 2 } } )$ ).
86
+
87
+ Difficulty of defense/attack under the black box attack scenario: As seen from this observation, it is efficient to attack an undefended/defended network with iter FGSM examples crafted from another undefended/defended network. Thus, when we want to build a robust network under the black box attack scenario, it is desired to check accuracies for the adversarial examples crafted from other networks trained with the same strategy.
88
+
89
+ # 3.2 CASCADE ADVERSARIAL TRAINING
90
+
91
+ Inspired by the observation that iter FGSM images transfer well between defended networks, we propose cascade adversarial training, which trains a network by injecting iter FGSM images crafted from an already defended network. We hypothesize that the network being trained with cascade adversarial training will learn to avoid such adversarial perturbation, enhancing robustness against iter FGSM attack. The intuition behind this proposed method is that we transfer the knowledge of the end results of adversarial training. In particular, we train a network by injecting iter FGSM images crafted from already defended network in addition to the one-step adversarial images crafted from the network being trained.
92
+
93
+ ![](images/3e15aca655600181f36bed5f1e7e2e1f2bf9f8ad5a8ba6aba416917d887a4350.jpg)
94
+ Figure 2: Cascade adversarial training regularized with a unified embedding.
95
+
96
+ ![](images/94897954e10187615eda8e565cf77b8ca80a2765e4e1577dda4e06d5b6bda6a3.jpg)
97
+ Figure 3: (Left) Bidirectional loss. (Right) Pivot loss.
98
+
99
+ # 3.3 REGULARIZATION WITH A UNIFIED EMBEDDING
100
+
101
+ We advance the algorithm proposed in (Kurakin et al., 2017) by adding low level similarity learning. Unlike (Kurakin et al., 2017), we include the clean examples used for generating adversarial images in the mini batch. Once one step forward pass is performed with the mini batch, embeddings are followed by the softmax layer for the cross entropy loss for the standard classification. At the same time, we take clean embeddings and adversarial embeddings, and minimize the distance between the two with the distance based loss.
102
+
103
+ The distance based loss encourages two similar images (clean and adversarial) to produce the same outputs, not necessarily the true labels. Thus, low-level similarity learning can be considered as an unsupervised learning. By adding regularization in higher embedding layer, convolution filters gradually learn how to ignore such pixel-level perturbation. We have applied regularization on lower layers with an assumption that low level pixel perturbation can be ignored in lower hierarchy of networks. However, adding regularization term on higher embedding layer right before the softmax layer showed best performance. The more convolutional filters have chance to learn such similarity, the better the performance. Note that cross entropy doesn’t encourage two similar images to produce the same output labels. Standard image classification using cross entropy compares ground truth labels with outputs of a network regardless of how similar training images are.
104
+
105
+ The entire training process combining cascade adversarial training and low level similarity learning is shown in figure 2. We define the total loss as follows:
106
+
107
+ $$
108
+ L o s s = \frac { 1 } { ( m - k ) + \lambda k } \Bigg ( \sum _ { i = 1 } ^ { m - k } L ( { \bf X } _ { i } | y _ { i } ) + \lambda \sum _ { i = 1 } ^ { k } L ( { \bf X } _ { i } ^ { a d v } | y _ { i } ) \Bigg ) + \lambda _ { 2 } \sum _ { i = 1 } ^ { k } L _ { d i s t } ( E _ { i } ^ { a d v } , E _ { i } )
109
+ $$
110
+
111
+ $\mathbf { \mathcal { E } } _ { i }$ and $E _ { i } ^ { a d v }$ are the resulting embeddings from $X _ { i }$ and $X _ { i } ^ { a d v }$ , respectively. $m$ is the size of the mini batch, $k \left( \leq m / 2 \right)$ is the number of adversarial images in the mini batch. $\lambda$ is the parameter to control the relative weight of classification loss for adversarial images. $\lambda _ { 2 }$ is the parameter to control the relative weight of the distance based loss $L _ { d i s t }$ in the total loss.
112
+
113
+ Bidirectional loss minimizes the distance between the two embeddings by moving both clean and adversarial embeddings as shown in the left side of the figure 3.
114
+
115
+ $$
116
+ L _ { d i s t } ( \pmb { { E } } _ { i } ^ { a d v } , \pmb { { E } } _ { i } ) = | | \pmb { { E } } _ { i } ^ { a d v } - \pmb { { E } } _ { i } | | _ { N } ^ { N } , \quad N \in { 1 , 2 \quad i = 1 , 2 , . . . , k }
117
+ $$
118
+
119
+ Table 2: MNIST test results $( \% )$ for 20-layer ResNet models $\prime { \epsilon } = 0 . 3 { ^ { * } } 2 5 5$ at test time). $\{ { \bf R } 2 0 { \bf M }$ : standard training, ${ \mathrm { R } } 2 0 { \mathrm { M } } _ { K }$ : Kurakin’s adversarial training, ${ \bf R } 2 0 { \bf M } _ { B }$ : Bidirectional loss, ${ \bf R } 2 0 { \bf M } _ { P }$ : P ivot loss. $\}$ CW $L _ { \infty }$ attack is performed with 100 test samples (10 samples per each class) and the number of adversarial examples with $\epsilon > 0 . 3 ^ { * } 2 5 5$ is reported. Additional details for CW attack can be found in Appendix F
120
+
121
+ <table><tr><td>Model</td><td>clean</td><td>step_ll</td><td>step_FGSM</td><td>iter_ll</td><td>iter_FGSM</td><td>CW</td></tr><tr><td>R20M</td><td>99.6</td><td>9.7</td><td>10.3</td><td>0.0</td><td>0.0</td><td>0</td></tr><tr><td>R20MK</td><td>99.6</td><td>96.7</td><td>94.5</td><td>89.0</td><td>60.2</td><td>46</td></tr><tr><td>R20Mb (Ours)</td><td>99.5</td><td>97.3</td><td>96.2</td><td>97.2</td><td>88.5</td><td>81</td></tr><tr><td>R20Mp (Ours)</td><td>99.5</td><td>97.1</td><td>95.7</td><td>96.9</td><td>88.9</td><td>82</td></tr></table>
122
+
123
+ We tried $N = 1$ , 2 and found not much difference between the two. We report the results with $N =$ 2 for the rest of the paper otherwise noted. When $N = 2$ , $L _ { d i s t }$ becomes L2 loss.
124
+
125
+ Pivot loss minimizes the distance between the two embeddings by moving only the adversarial embeddings as shown in the right side of the figure 3.
126
+
127
+ $$
128
+ L _ { d i s t } ( \pmb { { E } } _ { i } ^ { a d v } | \pmb { { E } } _ { i } ) = | | \pmb { { E } } _ { i } ^ { a d v } - \pmb { { E } } _ { i } | | _ { N } ^ { N } , \quad N \in { 1 , 2 \quad i = 1 , 2 , . . . , k }
129
+ $$
130
+
131
+ In this case, clean embeddings ( $\mathbf { \mathcal { E } } _ { i }$ ) serve as pivots to the adversarial embeddings. In particular, we don’t back-propagate through the clean embeddings for the distance based loss. The intuition behind the use of pivot loss is that the embedding from a clean image can be treated as the ground truth embedding.
132
+
133
+ # 4 LOW LEVEL SIMILARITY LEARNING ANALYSIS
134
+
135
+ # 4.1 EXPERIMENTAL RESULTS ON MNIST
136
+
137
+ We first analyze the effect of low level similarity learning on MNIST. We train ResNet models (He et al., 2016) with different methods (standard training, Kurakin’s adversarial training and adversarial training with our distance based loss). Experimental details can be found in Appendix A.
138
+
139
+ Table 2 shows the accuracy results for MNIST test dataset for different types of attack methods. As shown in the table, our method achieves better accuracy than Kurakin’s method for all types of attacks with a little sacrifice on the accuracy for the clean images. Even though adversarial training is done only with “step ll”, additional regularization increases robustness against unknown “step FGSM”, “iter ll”, “iter FGSM” and CW $L _ { \infty }$ attacks. This shows that our low-level similarity learning can successfully regularize the one-step adversarial perturbation and its vicinity for simple image classification like MNIST.
140
+
141
+ # 4.2 EMBEDDING SPACE VISUALIZATION
142
+
143
+ To visualize the embedding space, we modify 20-layer ResNet model where the last fully connected layer $\left( 6 4 \mathbf { x } 1 0 \right)$ is changed to two fully connected layers ( $6 4 \mathrm { x } 2$ and 2x10). We re-train networks with standard training, Kurakin’s method and our pivot loss on MNIST. 1 In figure 4, we draw embeddings (dimension $^ { 1 = 2 }$ ) between two fully connected layers. As seen from this figure, adversarial images from the network trained with standard training cross the decision boundary easily as $\epsilon$ increases. With Kurakin’s adversarial training, the distances between clean and adversarial embeddings are minimized compared to standard training. And our pivot loss further minimizes distance between the clean and adversarial embeddings. Note that our pivot loss also decreases absolute value of the embeddings, thus, higher $\lambda _ { 2 }$ will eventually result in overlap between distinct embedding distributions. We also observe that intra class variation of the clean embeddings are also minimized for the network trained with our pivot loss as shown in the scatter plot in figure 4 (c).
144
+
145
+ ![](images/03d39dce6fed9b5b8ffb7ae3b4de76e2f07a5e1bf76cb53aab54a3b3914a9521.jpg)
146
+ Figure 4: Embedding space visualization for modified ResNet models trained on MNIST. $\mathbf { X }$ -axis and y-axis show first and second dimension of embeddings respectively. Scatter plot shows first 100 clean embeddings per each class on MNIST test set. Each arrow shows difference between two embeddings (one from iter FGSM image () and the other from $( \epsilon { + } 8 ) ,$ ). We draw arrows from $\epsilon = 0$ to $\epsilon = 7 6$ $( \approx 0 . 3 ^ { * } 2 5 5 )$ ) for one sample image per each class. We observe differences between clean and corresponding adversarial embeddings are minimized for the network trained with pivot loss.
147
+
148
+ # 4.3 EFFECT OF $\lambda _ { 2 }$ ON CIFAR10
149
+
150
+ We train 20-layer ResNet models with pivot loss and various $\lambda _ { \mathrm { 2 } } \mathrm { s }$ for CIFAR10 dataset to study effects of the weight of the distance measure in the loss function. Figure 5 shows that a higher $\lambda _ { 2 }$ increases accuracy of the iteratively generated adversarial images. However, it reduces accuracy on the clean images, and increasing $\lambda _ { 2 }$ above 0.3 even results in divergence of the training. This is because embedding distributions of different classes will eventually overlap since absolute value of the embedding will be decreased as $\lambda _ { 2 }$ increases as seen from the section 4.2. In this experiment, we show that there exists clear trade-off between accuracy for the clean images and that for the adversarial images, and we recommend using a very high $\lambda _ { 2 }$ only under strong adversarial environment.
151
+
152
+ ![](images/c7c186c5dd4d21b6bfbfbcbee29ca466d12198bfbe2a9938e520a56b1e3d928b.jpg)
153
+ Figure 5: Accuracy vs. $\lambda _ { 2 }$
154
+
155
+ # 5 CASCADE ADVERSARIAL TRAINING ANALYSIS
156
+
157
+ # 5.1 SOURCE NETWORK SELECTION
158
+
159
+ We further study the transferability of iter FGSM images between various architectures. To this end, we first train 56-layer ResNet networks (Kurakin’s, pivot loss) with the same initialization. Then we train another 56-layer ResNet network (Kurakin’s) with different initialization. We repeat the training for the 110-layer ResNet networks. We measure correlation between iter FGSM noises from different networks.
160
+
161
+ ![](images/34d7075ba0af839593f33f5d84485be6ec355dc2d545d65ab9e3441ef984ed68.jpg)
162
+ Figure 6 (a) shows correlation between iter FGSM noises crafted from Kurakin’s network and those from Pivot network with the same initialization. Conjectured from (Kurakin et al., 2017), we observe high corre
163
+ Figure 6: Correlation between iter FGSM noises crafted from different networks for each . Correlation is averaged over randomly chosen 128 images from CIFAR10 test-set.
164
+
165
+ Table 3: CIFAR10 test results $( \% )$ for 110-layer ResNet models. CW $L _ { \infty }$ attack is performed with 100 test samples (10 samples per each class) and the number of adversarial examples with $\epsilon > 2$ or 4 is reported. $\{ \mathrm { R 1 1 0 } _ { K }$ : Kurakin’s, $\mathrm { R } 1 0 _ { P }$ : P ivot loss, $\mathrm { R } 1 1 0 _ { E }$ : Ensemble training, $\mathrm { R 1 1 0 } _ { K , C }$ : Kurakin’s and $C$ ascade training, $\mathrm { R 1 1 0 } _ { P , E }$ : P ivot loss and Ensemble training, and $\mathrm { R 1 1 0 } _ { P , C }$ : P ivot loss and Cascade training}
166
+
167
+ <table><tr><td rowspan="2">Model</td><td rowspan="2">clean</td><td colspan="2">step_ll</td><td colspan="2">step_FGSM</td><td colspan="2">iter_FGSM</td><td colspan="2">CW</td></tr><tr><td>e=2</td><td>∈=16</td><td>e=2</td><td>∈=16</td><td>e=2</td><td>∈=4</td><td>∈=2</td><td>e=4</td></tr><tr><td>R110K</td><td>92.3</td><td>88.3</td><td>90.7</td><td>86.0</td><td>95.2</td><td>59.4</td><td>9.2</td><td>25</td><td>4</td></tr><tr><td>R110p (Ours)</td><td>92.3</td><td>86.0</td><td>89.4</td><td>81.6</td><td>91.6</td><td>64.1</td><td>20.9</td><td>32</td><td>7</td></tr><tr><td>R110E</td><td>92.3</td><td>86.3</td><td>74.3</td><td>84.1</td><td>72.9</td><td>63.5</td><td>21.1</td><td>24</td><td>6</td></tr><tr><td>R110k,c (Ours)</td><td>92.3</td><td>86.2</td><td>72.8</td><td>82.6</td><td>66.7</td><td>69.3</td><td>33.4</td><td>20</td><td>5</td></tr><tr><td>R110p,ε (Ours)</td><td>91.3</td><td>84.0</td><td>65.7</td><td>77.6</td><td>54.5</td><td>66.8</td><td>38.3</td><td>38</td><td>16</td></tr><tr><td>R110p,c (Ours)</td><td>91.5</td><td>85.7</td><td>76.4</td><td>82.4</td><td>69.1</td><td>73.5</td><td>42.5</td><td>27</td><td>15</td></tr></table>
168
+
169
+ lation between iter FGSM noises from networks with the same initialization. Correlation between iter FGSM noises from the networks with different initialization, however, becomes lower as the network is deeper as shown in figure 6 (b). Since the degree of freedom increases as the network size increases, adversarially trained networks prone to end up with different states, thus, making transfer rate lower. To maximize the benefit of the cascade adversarial training, we propose to use the same initialization for a cascade network and a source network used for iterative adversarial examples generation.
170
+
171
+ # 5.2 WHITE BOX ATTACK ANALYSIS
172
+
173
+ We first compare a network trained with Kurakin’s method and that with pivot loss. We train 110- layer ResNet models with/without pivot loss and report accuracy in table 3. We observe our lowlevel similarity learning further improves robustness against iterative attacks compared to Kurakin’s adversarial training. However, the accuracy improvements against iterative attacks (iter FGSM, CW) are limited, showing regularization effect of low-level similarity learning is not sufficient for the iterative attacks on complex color images like CIFAR10. This is different from MNIST test cases where we observed significant accuracy increase for iterative attacks only with pivot loss. We observe label leaking phenomenon reported in (Kurakin et al., 2017) happens even though we don’t train a network with step FGSM images. Additional analysis for this phenomenon is explained in Appendix D.
174
+
175
+ Next, we train a network from scratch with iter FGSM examples crafted from the defended network, $\mathrm { R } 1 0 _ { P }$ . We use the same initialization used in $\mathrm { R } 1 1 0 _ { P }$ as discussed in 5.1. In particular, iter FGSM images are crafted from $\mathrm { R } 1 0 _ { P }$ with CIFAR10 training images for $\epsilon = 1 , 2 , . . . , 1 6$ , and those are used randomly together with step ll examples from the network being trained. We train cascade networks with/without pivot loss. We also train networks with ensemble adversarial training (Tramer et al., \` 2017) with/without pivot loss for comparison. The implementation details for the trained models can be found in Appendix B.
176
+
177
+ We find several meaningful observations in table 3. First, ensemble and cascade models show improved accuracy against iterative attack although at the expense of decreased accuracy for onestep attacks compared to the baseline defended network $( \mathrm { R } 1 1 0 _ { K } )$ ). Additional data augmentation from other networks enhances the robustness against iterative attack, weakening label leaking effect caused by one-step adversarial training.
178
+
179
+ Second, our low-level similarity learning $( \mathrm { R } 1 1 0 _ { P , E }$ , $\operatorname { R 1 1 0 } _ { P , C } )$ ) further enhances robustness against iterative attacks including fully unknown CW attack (especially for $\epsilon { = } 4$ ). Additional knowledge learned from data augmentation through cascade/ensemble adversarial training enables networks to learn partial knowledge of perturbations generated by an iterative method. And the learned iterative perturbations become regularized further with our low-level similarity learning making networks robust against unknown iterative attacks.
180
+
181
+ Table 4: CIFAR10 test results $( \% )$ for 110-layer ResNet models under black box attacks $\left( \epsilon = 1 6 \right)$ . {Target: same networks in table 3 and $\mathrm { R } 1 1 0 _ { K }$ : Kurakin’s, Source: re-trained baseline, Kurakin’s, cascade and ensemble networks with/without pivot loss. Source networks use the different initialization from the target networks. Additional details of the models can be found in Appendix B.}
182
+
183
+ <table><tr><td rowspan="2">Target</td><td colspan="7">Source: iter_FGSM</td></tr><tr><td>R1102</td><td>R110K2</td><td>R110E2</td><td>R110p2</td><td>R110K,C2</td><td>R110p,E2</td><td>R110p,C2</td></tr><tr><td>R110K</td><td>70.5</td><td>73.2</td><td>27.9</td><td>77.0</td><td>67.3</td><td>54.6</td><td>80.8</td></tr><tr><td>R110E</td><td>77.9</td><td>79.5</td><td>55.8</td><td>79.0</td><td>68.2</td><td>54.7</td><td>82.7</td></tr><tr><td>R110p (Ours)</td><td>75.9</td><td>75.6</td><td>39.6</td><td>78.5</td><td>68.3</td><td>61.3</td><td>83.3</td></tr><tr><td>R110k,c (Ours)</td><td>56.4</td><td>80.2</td><td>61.1</td><td>79.5</td><td>67.4</td><td>62.6</td><td>82.1</td></tr><tr><td>R110p,E (Ours)</td><td>78.2</td><td>82.1</td><td>67.7</td><td>81.7</td><td>73.4</td><td>68.4</td><td>83.8</td></tr><tr><td>R110p,C (Ours)</td><td>71.9</td><td>80.4</td><td>63.9</td><td>80.1</td><td>71.1</td><td>64.2</td><td>83.0</td></tr></table>
184
+
185
+ Third, our low-level similarity learning serves as a good regularizer for adversarial images, but not for the clean images for ensemble/cascade models (reduced accuracy for the clean images for $\mathrm { R 1 1 0 } _ { P , E }$ and $\mathrm { R 1 1 0 } _ { P , C }$ in table 3). Compared to pure adversarial training with one-step adversarial examples, the network sees more various adversarial perturbations during training as a result of ensemble and cascade training. Those perturbations are prone to end up embeddings in the vicinity of decision boundary more often than perturbations caused by one-step adversarial training. Pivot loss pulls the vicinity of those adversarial embeddings toward their corresponding clean embeddings. During this process, clean embeddings from other classes might also be moved toward the decision boundary which results in decreased accuracy for the clean images.
186
+
187
+ # 5.3 BLACK BOX ATTACK ANALYSIS
188
+
189
+ We finally perform black box attack analysis for the cascade/ensemble networks with/without pivot loss. We report black box attack accuracy with the source networks trained with the same method, but with different initialization from the target networks. The reason for this is adversarial examples transfer well between networks trained with the same strategy as observed in section 3.1. We re-train 110-layer ResNet models using Kurakin’s, cascade and ensemble adversarial training with/without low-level similarity learning and use those networks as source networks for black-box attacks. Baseline 110-layer ResNet model is also included as a source network. Target networks are the same networks used in table 3. We found iter FGSM attack resulted in lower accuracy than step FGSM attack, thus, report iter FGSM attack only in table 4.
190
+
191
+ We first observe that iter FGSM attack from ensemble models $( \mathrm { R } 1 1 0 _ { E 2 }$ , $\mathrm { R 1 1 0 } _ { P , E 2 } )$ is strong (results in lower accuracy) compared to that from any other trained networks. 2 Since ensemble models learn various perturbation during training, adversarial noises crafted from those networks might be more general for other networks making them transfer easily between defended networks.
192
+
193
+ Second, cascade adversarial training breaks chicken and egg problem. (In section 3.1, we found that it is efficient to use a defended network as a source network to attack another defended network.) Even though the transferability between defended networks is reduced for deeper networks, cascade network $( \mathrm { R } 1 1 0 _ { K , C } )$ shows worst case performance against the attack not from a defended network, but from a purely trained network $\mathbf { ( R 1 1 0 _ { 2 } ) }$ . Possible solution to further improve the worst case robustness would be to use more than one network as source networks (including pure/defended networks) for iter FGSM images generation for cascade adversarial training.
194
+
195
+ Third, ensemble/cascade networks together with our low-level similarity learning $( \mathrm { R } 1 1 0 _ { P , E }$ , $\mathrm { R 1 1 0 } _ { P , C } )$ show better worst case accuracy under black box attack scenario. This shows that enhancing robustness against iterative white box attack also improves robustness against iterative black box attack.
196
+
197
+ # 6 CONCLUSION
198
+
199
+ We performed through transfer analysis and showed iter FGSM images transfer easily between networks trained with the same strategy. We exploited this and proposed cascade adversarial training, a method to train a network with iter FGSM adversarial images crafted from already defended networks. We also proposed adversarial training regularized with a unified embedding for classification and low- level similarity learning by penalizing distance between the clean and their corresponding adversarial embeddings. Combining those two techniques (low level similarity learning $^ +$ cascade adversarial training) with deeper networks further improved robustness against iterative attacks for both white-box and black-box attacks.
200
+
201
+ However, there is still a gap between accuracy for the clean images and that for the adversarial images. Improving robustness against both one-step and iterative attacks still remains challenging since it is shown to be difficult to train networks robust for both one-step and iterative attacks simultaneously. Future research is necessary to further improve the robustness against iterative attack without sacrificing the accuracy for step attacks or clean images under both white-box attack and black-box attack scenarios.
202
+
203
+ # ACKNOWLEDGMENTS
204
+
205
+ We thank Alexey Kurakin of Google Brain and Li Chen of Intel for comments that greatly improved the manuscript. The research reported here was supported in part by the Defense Advanced Research Projects Agency (DARPA) under contract number HR0011-17-2-0045. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of DARPA.
206
+
207
+ # REFERENCES
208
+
209
+ Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In IEEE Symposium on Security and Privacy, 2017.
210
+
211
+ Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In Proceedings of the International Conference on Learning Representations (ICLR), 2015.
212
+
213
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, Las Vegas, NV, USA, June 27-30, 2016, pp. 770–778, 2016. doi: 10.1109/CVPR.2016.90. URL http://dx.doi.org/10.1109/CVPR.2016.90.
214
+
215
+ Ruitong Huang, Bing Xu, Dale Schuurmans, and Csaba Szepesvari. Learning with a strong adver-´ sary. CoRR, abs/1511.03034, 2015. URL http://arxiv.org/abs/1511.03034.
216
+
217
+ Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, 2009.
218
+
219
+ Alexey Kurakin, Ian J. Goodfellow, and Samy Bengio. Adversarial machine learning at scale. In Proceedings of the International Conference on Learning Representations (ICLR), 2017.
220
+
221
+ Yann LeCun and Corinna Cortes. MNIST handwritten digit database. 2010. URL http://yann. lecun.com/exdb/mnist/.
222
+
223
+ O. M. Parkhi, A. Vedaldi, and A. Zisserman. Deep face recognition. In Proceedings of the British Machine Vision Conference (BMVC), 2015.
224
+
225
+ Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015.
226
+
227
+ Florian Tramer, Alexey Kurakin, Nicolas Papernot, Dan Boneh, and Patrick McDaniel. Ensem- \` ble adversarial training: Attacks and defenses. CoRR, abs/1705.07204, 2017. URL http: //arxiv.org/abs/1705.07204.
228
+
229
+ Yandong Wen, Kaipeng Zhang, Zhifeng Li, and Yu Qiao. A discriminative feature learning approach for deep face recognition. In Computer Vision - ECCV 2016 - 14th European Conference, Amsterdam, The Netherlands, October 11-14, 2016, Proceedings, Part VII, pp. 499– 515, 2016. doi: 10.1007/978-3-319-46478-7 31. URL http://dx.doi.org/10.1007/ 978-3-319-46478-7_31.
230
+
231
+ # A EXPERIMENTAL SETUP
232
+
233
+ We scale down the image values to [0,1] and don’t perform any data augmentation for MNIST. For CIFAR10, we scale down the image values to [0,1] and subtract per-pixel mean values. We perform $2 4 \times 2 4$ random crop and random flip on $3 2 \mathrm { x } 3 2 $ original images. We generate adversarial images with “step ll” after these steps otherwise noted.
234
+
235
+ We use stochastic gradient descent (SGD) optimizer with momentum of 0.9, weight decay of 0.0001 and mini batch size of 128. For adversarial training, we generate $k = 6 4$ adversarial examples among 128 images in one mini-batch. We start with a learning rate of 0.1, divide it by 10 at $4 \mathrm { k }$ and 6k iterations, and terminate training at 8k iterations for MNIST, and $4 8 \mathrm { k }$ and $7 2 \mathrm { k }$ iterations, and terminate training at 94k iterations for CIFAR10. 3
236
+
237
+ We also found that initialization affects the training results slightly as in (Kurakin et al., 2017), thus, we pre-train the networks 2 and 10 epochs for MNIST and CIFAR10, and use these as initial starting points for different configurations. We use $m a x \_ e = 0 . 3 ^ { * } 2 5 5$ and 16 for MNIST and CIFAR10 respectively.
238
+
239
+ # B MODEL DESCRIPTIONS
240
+
241
+ We summarize the model names used in this paper in table 5. For ensemble adversarial training, pre-trained networks as in table 7 together with the network being trained are used to generate onestep adversarial examples during training. For cascade adversarial training, pre-trained defended networks as in table 6 are used to generate iter FGSM images, and the network being trained is used to generate one-step adversarial examples during training.
242
+
243
+ Table 5: Model descriptions
244
+ Table 6: Ensemble model description
245
+
246
+ <table><tr><td colspan="5">Initialization</td></tr><tr><td>Dataset</td><td>ResNet</td><td>Group</td><td>Training</td><td>Model</td></tr><tr><td rowspan="2">MNIST</td><td rowspan="2">20-layer</td><td rowspan="2">A</td><td>standard training Kurakin&#x27;s</td><td>R20M R20MK</td></tr><tr><td>Bidirection loss</td><td>R20MB</td></tr><tr><td rowspan="10"></td><td rowspan="10">20-layer</td><td rowspan="4"></td><td>Pivot loss</td><td>R20Mp</td></tr><tr><td> standard training</td><td>R20</td></tr><tr><td>Kurakin&#x27;s</td><td>R20K</td></tr><tr><td>Ensemble training</td><td>R20E</td></tr><tr><td rowspan="6">B</td><td>Bidirection loss Pivot loss</td><td>R20B R20p</td></tr><tr><td>Kurakin&#x27;s &amp; Cascade training</td><td>R20K,C</td></tr><tr><td></td><td></td></tr><tr><td>Pivot loss &amp; Ensemble training</td><td>R20p,E</td></tr><tr><td>Pivot loss &amp; Cascade training</td><td>R20p,C</td></tr><tr><td> standard training</td><td>R202</td></tr><tr><td rowspan="7">CIFAR10 56-layer</td><td rowspan="7"></td><td>C</td><td>Kurakin&#x27;s</td><td>R20K2</td></tr><tr><td>D</td><td>Pivot loss standard training</td><td>R20p2 R203</td></tr><tr><td>E</td><td> standard training</td><td>R204</td></tr><tr><td>F</td><td>Kurakin&#x27;s</td><td>R56K R56p</td></tr><tr><td></td><td>Pivot loss</td><td></td></tr><tr><td>G</td><td>Kurakin&#x27;s</td><td>R56K2</td></tr><tr><td></td><td></td><td></td></tr><tr><td rowspan="7">110-layer</td><td rowspan="7"></td><td rowspan="7">H</td><td> standard training</td><td>R110</td></tr><tr><td>Kurakin&#x27;s</td><td>R110K</td></tr><tr><td>Pivot loss Ensemble training</td><td>R110p R110E</td></tr><tr><td>Kurakin&#x27;s &amp; Cascade training</td><td></td></tr><tr><td></td><td>R110K,C</td></tr><tr><td>Pivot loss &amp; Ensemble training</td><td>R110p,E</td></tr><tr><td>Pivot loss &amp; Cascade training</td><td>R110p,C</td></tr><tr><td rowspan="5"></td><td rowspan="5">I</td><td>standard training Kurakin&#x27;s</td><td>R1102</td></tr><tr><td></td><td>R110k2</td></tr><tr><td>Ensemble training</td><td>R110E2</td></tr><tr><td>Pivot loss</td><td>R110p2</td></tr><tr><td>Kurakin&#x27;s &amp; Cascade training Pivot loss &amp; Ensemble training</td><td>R110k,C2 R110p,E2</td></tr><tr><td rowspan="5"></td><td>J</td><td>Pivot loss &amp; Cascade training</td><td>R110p,C2</td></tr><tr><td></td><td>standard training</td><td>R1103</td></tr><tr><td>K</td><td>standard training</td><td>R1104</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></table>
247
+
248
+ Table 7: Cascade model description
249
+
250
+ <table><tr><td>Ensemble models</td><td>Pre-trained models</td></tr><tr><td>R20E,R20p,E,R110E,R110P,E R110E2,R110P,E2</td><td>R203,R110g R204,R1104</td></tr></table>
251
+
252
+ <table><tr><td>Cascade models</td><td>Pre-trained model</td></tr><tr><td>R20K,c,R20p,C</td><td>R20p</td></tr><tr><td>R110K,c,R110p,C</td><td>R110p</td></tr><tr><td>R110K,c2,R110P,C2</td><td>R110p2</td></tr></table>
253
+
254
+ ![](images/a63d4cd60c68a6ff53d587a7bfc58f89eb11f682c0bbc103d1fd3a001a954254.jpg)
255
+ Figure 7: Argument to the softmax vs. $\epsilon$ in test time. “step ll”, “step FGSM” and ”random sign” methods were used to generate test-time adversarial images. Arguments to the softmax were measured by changing $\epsilon$ for each test method and averaged over randomly chosen 128 images from CIFAR10 test-set. Blue line represents true class and the red line represents mean of the false classes. Shaded region shows $\pm \nobreakspace 1 \nobreakspace$ standard deviation of each line.
256
+
257
+ We draw average value of the argument to the softmax layer for the true class and the false classes to visualize how the adversarial training works as in figure 7. Standard training, as expected, shows dramatic drop in the values for the true class as we increase $\epsilon$ in “step ll” or “step FGSM direction. With adversarial training, we observe that the value drop is limited at small $\epsilon$ and our method even increases the value in certain range upto ${ \epsilon } { = } 1 0$ . Note that adversarial training is not the same as the gradient masking.As illustrated in figure 7, it exposes gradient information, however, quickly distort gradients along the sign of the gradient (“step ll” or “step FGSM) direction. We also observe improved results (broader margins than baseline) for “random sign” added images even though we didn’t inject random sign added images during training. Overall shape of the argument to the softmax layer in our case becomes smoother than Kurakin’s method, suggesting our method is good for pixel level regularization. Even though actual value of the embeddings for the true class in our case is smaller than that in Kurakin’s, the standard deviation of our case is less than Kurakin’s, making better margin between the true class and false classes.
258
+
259
+ ![](images/bb0f617516f1c753274ff6e6c797bcd0df9ac1a88e8bee55ff5efc872dab5a74.jpg)
260
+ Figure 8: Averaged Pearson’s correlation coefficient between the gradients w.r.t. two images. Correlation were measured by changing $\epsilon$ for each adversarial image and averaged over randomly chosen 128 images from CIFAR10 test-set. Shaded region represents $\pm \ : 0 . 5$ standard deviation of each line.
261
+
262
+ We observe accuracies for the “step FGSM” adversarial images become higher than those for the clean images (“label leaking” phenomenon) by training with “step FGSM” examples as in (Kurakin et al., 2017). Interestingly, we also observe “label leaking” phenomenon even without providing true labels for adversarial images generation. We argue that “label leaking” is a natural result of the adversarial training.
263
+
264
+ To understand the nature of adversarial training, we measure correlation between gradients w.r.t. different images (i.e. clean vs. adversarial) as a measure of error surface similarity. We measure correlation between gradients w.r.t. (1) clean vs. “step ll” image, (2) clean vs. “step FGSM” image, (3) clean vs. “random sign” added image, and (4) “step ll” image vs. “step FGSM” image for three trained networks (a) R20, (b) $\mathsf { R } 2 0 _ { K }$ and (c) ${ \mathrm { R } } 2 0 _ { P }$ (Ours) in table 5. Figure 8 draws average value of correlations for each case.
265
+
266
+ Meaning of the correlation: In order to make strong adversarial images with “step FGSM” method, correlation between the gradient w.r.t. the clean image and the gradient w.r.t. its corresponding adversarial image should remain high since the “step FGSM” method only use the gradient w.r.t. the clean image $( \epsilon { = } 0 )$ . Lower correlation means perturbing the adversarial image at $\epsilon$ further to the gradient (seen from the clean image) direction is no longer efficient.
267
+
268
+ Results of adversarial training: We observe that (1) and (2) become quickly lower than (3) as $\epsilon$ increases. This means that, when we move toward the steepest (gradient) direction on the error surface, gradient is more quickly uncorrelated with the gradient w.r.t. the clean image than when we move to random direction. As a result of adversarial training, this uncorrelation is observed at a lower $\epsilon$ making one-step attack less efficient even with small perturbation. (1), (2) and (3) for our case are slightly lower than Kurakin’s method at the same $\epsilon$ which means that our method is better at defending one-step attacks than Kurakin’s.
269
+
270
+ Error surface similarity between “step ll” and “step FGSM” images: We also observe (4) remains high with higher $\epsilon$ for all trained networks. This means that the error surface (gradient) of the “step ll” image and that of its corresponding ���step FGSM” image resemble each other. That is the reason why we get the robustness against “step FGSM” method only by training with “step ll” method and vice versa. (4) for our case is slightly higher than Kurakin’s method at the same $\epsilon$ and that means our similarity learning tends to make error surfaces of the adversarial images with “step ll” and “step FGSM” method to be more similar.
271
+
272
+ Analysis of label leaking phenomenon: Interestingly, (2) becomes slightly negative in certain range $1 < \epsilon < 3$ for Kurakin’s, and $1 < \epsilon < 4$ for Pivot (Ours) ) and this could be the possible reason for “label leaking” phenomenon. For example, let’s assume that we have a perturbed image (by “step FGSM” method) at $\epsilon$ where the correlation between the gradients w.r.t. that image and the corresponding clean image is negative. Further increase of $\epsilon$ with the gradient (w.r.t. the clean image) direction actually decreases the loss resulting in increased accuracy (label leaking phenomenon). Due to the error surface similarity between “step ll” and “step FGSM” images and this negative correlation effect, however, label leaking phenomenon can always happen for the networks trained with one-step adversarial examples.
273
+
274
+ # E ADDITIONAL BLACK BOX ATTACK RESULTS
275
+
276
+ Table 8: CIFAR10 test results $( \% )$ under black box attacks between the network with the same initialization $\scriptstyle \left( \epsilon = 1 6 \right) \}$
277
+
278
+ <table><tr><td rowspan="2">Target</td><td colspan="3">Source: step_FGSM</td><td colspan="3">Source: iter_FGSM</td></tr><tr><td>R20</td><td>R20K</td><td>R20p</td><td>R20</td><td>R20K</td><td>R20p</td></tr><tr><td>R20</td><td>12.2</td><td>27.4</td><td>27.5</td><td>0.0</td><td>45.9</td><td>44.7</td></tr><tr><td>R20K</td><td>65.7</td><td>81.5</td><td>81.8</td><td>51.5</td><td>0.0</td><td>18.2</td></tr><tr><td>R20p</td><td>58.1</td><td>89.3</td><td>91.7</td><td>48.9</td><td>13.4</td><td>0.0</td></tr></table>
279
+
280
+ Table 8 shows that black box attack between trained networks with the same initialization tends to be more successful than that between networks with different initialization as explained in (Kurakin et al., 2017).
281
+
282
+ Table 9: CIFAR10 test results $( \% )$ under black box attacks for ${ \epsilon } { = } 1 6$ . {Target and Source networks are switched from the table 1}
283
+
284
+ <table><tr><td rowspan="2">Target</td><td colspan="3">Source: step-FGSM</td><td colspan="3">Source: iter_FGSM</td></tr><tr><td>R20</td><td>R20K</td><td>R20p</td><td>R20</td><td>R20K</td><td>R20p</td></tr><tr><td>R202</td><td>17.9</td><td>33.9</td><td>34.5</td><td>4.1</td><td>54.8</td><td>54.3</td></tr><tr><td>R20K2</td><td>65.0</td><td>84.6</td><td>84.5</td><td>61.2</td><td>25.3</td><td>30.4</td></tr><tr><td>R20p2</td><td>66.4</td><td>88.2</td><td>87.2</td><td>61.6</td><td>27.7</td><td>36.1</td></tr></table>
285
+
286
+ In table 9, our method $( \mathsf { R } 2 0 _ { P 2 } )$ is always better at one-step and iterative black box attack from defended networks $( \mathsf { R } 2 0 _ { K } , \mathsf { R } 2 0 _ { P } )$ and undefended network (R20) than Kurakin’s method $( { \bf R } 2 0 _ { B { \bf 2 } } )$ . However, it is hard to tell which method is better than the other one as explained in the main paper.
287
+
288
+ Table 10: CIFAR10 test results $( \% )$ for cascade networks under black box attacks for ${ \epsilon } { = } 1 6$ . {Target and Source: Please see the model descriptions in Appendix B.}
289
+
290
+ <table><tr><td rowspan="2">Target</td><td colspan="7">Source: iter_FGSM</td></tr><tr><td>R110</td><td>R110K</td><td>R110E</td><td>R110p</td><td>R110K,C</td><td>R110p,E</td><td>R110p,C</td></tr><tr><td>R110K2</td><td>80.5</td><td>72.7</td><td>49.3</td><td>68.0</td><td>49.6</td><td>41.0</td><td>67.9</td></tr><tr><td>R110E2</td><td>82.7</td><td>59.1</td><td>39.5</td><td>59.6</td><td>51.5</td><td>40.3</td><td>69.6</td></tr><tr><td>R110p2 (Ours)</td><td>80.3</td><td>75.9</td><td>54.2</td><td>72.2</td><td>54.9</td><td>44.3</td><td>72.4</td></tr><tr><td>R110k,C2 (Ours)</td><td>62.1</td><td>74.7</td><td>61.5</td><td>72.3</td><td>46.5</td><td>39.0</td><td>67.9</td></tr><tr><td>R110p,E2 (Ours)</td><td>81.5</td><td>79.0</td><td>50.0</td><td>77.3</td><td>56.9</td><td>45.5</td><td>75.2</td></tr><tr><td>R110p,c2 (Ours)</td><td>72.2</td><td>76.4</td><td>60.6</td><td>73.8</td><td>51.0</td><td>40.9</td><td>72.0</td></tr></table>
291
+
292
+ In table 10, we show black box attack accuracies with the source and the target networks switched from the table 4. We also observe that networks trained with both low-level similarity learning and cascade/ensemble adversarial training $( \mathrm { R } 1 1 0 _ { P , C 2 }$ , $\mathbf { R } 1 1 0 _ { P , E 2 } )$ show better worst-case performance than other networks. Overall, iter FGSM images crafted from ensemble model families $( \mathrm { R } 1 1 0 _ { E }$ , $\operatorname { R 1 1 0 } _ { P , E } )$ remain strong on the defended networks.
293
+
294
+ ![](images/ab53c2fe8209182e38731b9aaaef260818586606f8ae3b9ef8464c393141354e.jpg)
295
+ Figure 9: Cumulative distribution function vs. $\epsilon$ for 100 test adversarial examples generated by CW $L _ { \infty }$ attack. Lower CDF value for a fixed $\epsilon$ means the better defense.
296
+
297
+ Carlini and Wagner (CW) $L _ { \infty }$ attack solves the following optimization problem for every input $\boldsymbol { X }$
298
+
299
+ $$
300
+ m i n i m i z e \quad c \cdot f ( X + \pmb { \delta } ) + \sum _ { i } [ ( | \delta _ { i } | - \tau ) ^ { + } ]
301
+ $$
302
+
303
+ where, the function $f$ is defined such that attack is success if and only if $f ( X + \delta ) < 0 , \mathfrak { c }$ δ is the target perturbation defined as $X ^ { a d v } - X$ , $c$ is the parameter to control the relative weight of function $f$ in the total cost function, and $\tau$ is the control threshold used to penalize any terms that exceed $\tau$ .
304
+
305
+ Since CW $L _ { \infty }$ attack is computationally expensive, we only use 100 test examples (10 examples per each class). We search adversarial example $X ^ { a d v }$ with $c \in \{ 0 . 1 , 0 . 2 , 0 . 5 , 1 , 2 , 5 , 1 0 , 2 0 \}$ and $\tau \in \ \{ 0 . 0 2 , 0 . 0 4 , . . . , 0 . 6 \}$ for MNIST and $c ~ \in ~ \{ 0 . 1 , 0 . 3 , 1 , 3 , 1 0 , 3 0 , 1 0 0 \}$ and $\tau \_ { \in }$ $\{ 0 . 0 0 1 , 0 . 0 0 \dot { 2 } , . . . , 0 . 0 1 , 0 . 0 1 2 , . . . , 0 . 0 2 , 0 . 0 2 4 , . . . , 0 . 0 4 , 0 . 0 4 8 , . . . , 0 . 0 8 \}$ for CIFAR10. We use Adam optimizer with an initial learning rate of $0 . 0 1 / c$ since we found constant initial learning rate for $c \cdot f ( \pmb { X } + \pmb { \delta } )$ term is critical for successful adversarial images generation. We terminate the search after 2,000 iterations for each $\boldsymbol { X }$ , $c$ and $\tau$ . If $f ( X + \delta ) < 0$ and the resulting $| | \delta | | _ { \infty }$ is lower than the current best distance, we update $X ^ { a d v }$ .
306
+
307
+ Figure 9 shows cumulative distribution function of $\epsilon$ for 100 successful adversarial examples per each network. We report the number of adversarial examples with $\epsilon > 0 . 3 ^ { * } 2 5 5$ for MNIST and that with $\epsilon > 2$ or 4 for CIFAR10. As seen from this figure, our approaches provide robust defense against CW $L _ { \infty }$ attack compared to other approaches.
parse/train/HyRVBzap-/HyRVBzap-_content_list.json ADDED
@@ -0,0 +1,1591 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "CASCADE ADVERSARIAL MACHINE LEARNING REGULARIZED WITH A UNIFIED EMBEDDING ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 99,
9
+ 820,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Taesik Na, Jong Hwan Ko & Saibal Mukhopadhyay ",
17
+ "bbox": [
18
+ 184,
19
+ 170,
20
+ 545,
21
+ 185
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "School of Electrical and Computer Engineering \nGeorgia Institute of Technology \nAtlanta, GA 30332, USA \n{taesik.na, jonghwan.ko, smukhopadhyay6}@gatech.edu ",
28
+ "bbox": [
29
+ 184,
30
+ 186,
31
+ 681,
32
+ 239
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "ABSTRACT ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 454,
42
+ 276,
43
+ 544,
44
+ 291
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Injecting adversarial examples during training, known as adversarial training, can improve robustness against one-step attacks, but not for unknown iterative attacks. To address this challenge, we first show iteratively generated adversarial images easily transfer between networks trained with the same strategy. Inspired by this observation, we propose cascade adversarial training, which transfers the knowledge of the end results of adversarial training. We train a network from scratch by injecting iteratively generated adversarial images crafted from already defended networks in addition to one-step adversarial images from the network being trained. We also propose to utilize embedding space for both classification and low-level (pixel-level) similarity learning to ignore unknown pixel level perturbation. During training, we inject adversarial images without replacing their corresponding clean images and penalize the distance between the two embeddings (clean and adversarial). Experimental results show that cascade adversarial training together with our proposed low-level similarity learning efficiently enhances the robustness against iterative attacks, but at the expense of decreased robustness against one-step attacks. We show that combining those two techniques can also improve robustness under the worst case black box attack scenario. ",
51
+ "bbox": [
52
+ 233,
53
+ 309,
54
+ 764,
55
+ 544
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 571,
66
+ 336,
67
+ 588
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Injecting adversarial examples during training (adversarial training), (Goodfellow et al., 2015; Kurakin et al., 2017; Huang et al., 2015) increases the robustness of a network against adversarial attacks. The networks trained with one-step methods have shown noticeable robustness against onestep attacks, but, limited robustness against iterative attacks at test time. To address this challenge, we have made the following contributions: ",
74
+ "bbox": [
75
+ 174,
76
+ 603,
77
+ 823,
78
+ 672
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Cascade adversarial training: We first show that iteratively generated adversarial images transfer well between networks when the source and the target networks are trained with the same training method. Inspired by this observation, we propose cascade adversarial training which transfers the knowledge of the end results of adversarial training. In particular, we train a network by injecting iter FGSM images (section 2.1) crafted from an already defended network (a network trained with adversarial training) in addition to the one-step adversarial images crafted from the network being trained. The concept of using already trained networks for adversarial training is also introduced in (Tramer et al., 2017). In their work, purely trained networks are used as another source networks \\` to generate one-step adversarial examples for training. On the contrary, our cascade adversarial training uses already defended network for iter FGSM images generation. ",
85
+ "bbox": [
86
+ 174,
87
+ 680,
88
+ 825,
89
+ 819
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Low level similarity learning: We advance the previous data augmentation approach (Kurakin et al., 2017) by adding additional regularization in deep features to encourage a network to be insensitive to adversarial perturbation. In particular, we inject adversarial images in the mini batch without replacing their corresponding clean images and penalize distance between embeddings from the clean and the adversarial examples. There are past examples of using embedding space for learning similarity of high level features like face similarity between two different images (Schroff et al., 2015; Parkhi et al., 2015; Wen et al., 2016). Instead, we use the embedding space for learning similarity of the pixel level differences between two similar images. The intuition of using this regularization is that small difference on input should not drastically change the high level feature representation. ",
96
+ "bbox": [
97
+ 174,
98
+ 827,
99
+ 823,
100
+ 924
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "",
107
+ "bbox": [
108
+ 176,
109
+ 103,
110
+ 821,
111
+ 145
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "Analysis of adversarial training: We train ResNet models (He et al., 2016) on MNIST (LeCun & Cortes, 2010) and CIFAR10 dataset (Krizhevsky, 2009) using the proposed adversarial training. We first show low level similarity learning improves robustness of the network against adversarial images generated by one-step and iterative methods compared to the prior work. We show that modifying the weight of the distance measure in the loss function can help control trade-off between accuracies for the clean and adversarial examples. ",
118
+ "bbox": [
119
+ 174,
120
+ 152,
121
+ 825,
122
+ 237
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "Together with cascade adversarial training and low-level similarity learning, we achieve accuracy increase against unknown iterative attacks, but at the expense of decreased accuracy for one-step attacks. We also show our cascade adversarial training and low level similarity learning provide much better robustness against black box attack. ",
129
+ "bbox": [
130
+ 174,
131
+ 243,
132
+ 825,
133
+ 299
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "2 BACKGROUND ON ADVERSARIAL ATTACKS ",
140
+ "text_level": 1,
141
+ "bbox": [
142
+ 174,
143
+ 320,
144
+ 566,
145
+ 335
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "2.1 ATTACK METHODS ",
152
+ "text_level": 1,
153
+ "bbox": [
154
+ 176,
155
+ 351,
156
+ 348,
157
+ 364
158
+ ],
159
+ "page_idx": 1
160
+ },
161
+ {
162
+ "type": "text",
163
+ "text": "One-step fast gradient sign method (FGSM), referred to as “step FGSM”, generates adversarial image $\\bar { X } ^ { a d v }$ by adding sign of the gradients w.r.t. the clean image $\\boldsymbol { X }$ multiplied by $\\epsilon \\in [ 0 , 2 5 5 ]$ as shown below (Goodfellow et al., 2015): ",
164
+ "bbox": [
165
+ 173,
166
+ 376,
167
+ 826,
168
+ 419
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "equation",
174
+ "img_path": "images/1255c66c34121c9e4885dd473449c158936c386b948fa1100acba8edc69c7df4.jpg",
175
+ "text": "$$\nX ^ { a d v } = X + \\epsilon \\mathrm { s i g n } ( \\nabla _ { X } J ( X , y _ { t r u e } ) )\n$$",
176
+ "text_format": "latex",
177
+ "bbox": [
178
+ 369,
179
+ 424,
180
+ 629,
181
+ 443
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "One-step target class method generates $X ^ { a d v }$ by subtracting sign of the gradients computed on a target false label as follows: ",
188
+ "bbox": [
189
+ 169,
190
+ 455,
191
+ 825,
192
+ 483
193
+ ],
194
+ "page_idx": 1
195
+ },
196
+ {
197
+ "type": "equation",
198
+ "img_path": "images/9c3704a86ae00977475deb3f9b3530a6ae7b3b615e0f4866c59366e0ca11c381.jpg",
199
+ "text": "$$\nX ^ { a d v } = X - \\epsilon \\mathrm { s i g n } ( \\nabla _ { X } J ( X , y _ { t a r g e t } ) )\n$$",
200
+ "text_format": "latex",
201
+ "bbox": [
202
+ 362,
203
+ 489,
204
+ 633,
205
+ 508
206
+ ],
207
+ "page_idx": 1
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "We use least likely class $y _ { L L }$ as a target class and refer this method as “step ll”. ",
212
+ "bbox": [
213
+ 174,
214
+ 522,
215
+ 694,
216
+ 537
217
+ ],
218
+ "page_idx": 1
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "Basic iterative method, referred to as “iter FGSM”, applies FGSM with small $\\alpha$ multiple times. ",
223
+ "bbox": [
224
+ 169,
225
+ 542,
226
+ 807,
227
+ 559
228
+ ],
229
+ "page_idx": 1
230
+ },
231
+ {
232
+ "type": "equation",
233
+ "img_path": "images/1b3e1127ee0213428c760a8433ad9167027e7c56ff6f39bbd5924f62d731f5ab.jpg",
234
+ "text": "$$\nX _ { 0 } ^ { a d v } = X , \\quad X _ { N } ^ { a d v } = C l i p _ { X , \\epsilon } \\{ X _ { N - 1 } ^ { a d v } + \\alpha \\ \\mathrm { s i g n } ( \\nabla _ { X _ { N - 1 } ^ { a d v } } J ( X _ { N - 1 } ^ { a d v } , y _ { t r u e } ) ) \\}\n$$",
235
+ "text_format": "latex",
236
+ "bbox": [
237
+ 240,
238
+ 564,
239
+ 756,
240
+ 587
241
+ ],
242
+ "page_idx": 1
243
+ },
244
+ {
245
+ "type": "text",
246
+ "text": "We use $\\alpha = 1$ , number of iterations $N$ to be $\\operatorname* { m i n } ( \\epsilon + 4 , 1 . 2 5 \\epsilon ) . ~ C l i p _ { X , \\epsilon }$ is elementwise clipping function where the input is clipped to the range $[ \\mathrm { m a x } ( 0 , X - \\epsilon ) , \\mathrm { m i n } ( 2 5 5 , X + \\epsilon ) ]$ . ",
247
+ "bbox": [
248
+ 173,
249
+ 599,
250
+ 823,
251
+ 630
252
+ ],
253
+ "page_idx": 1
254
+ },
255
+ {
256
+ "type": "text",
257
+ "text": "Iterative least-likely class method, referred to as “iter ll”, is to apply “step ll” with small $\\alpha$ multiple times. ",
258
+ "bbox": [
259
+ 173,
260
+ 636,
261
+ 823,
262
+ 665
263
+ ],
264
+ "page_idx": 1
265
+ },
266
+ {
267
+ "type": "equation",
268
+ "img_path": "images/6eb0a38899718bb27efd5684809622afb0fef795ffc29528a6180b900f0e4d25.jpg",
269
+ "text": "$$\nX _ { 0 } ^ { a d v } = X , \\quad X _ { N } ^ { a d v } = C l i p _ { X , \\epsilon } \\{ X _ { N - 1 } ^ { a d v } - \\alpha \\ \\mathrm { s i g n } ( \\nabla _ { X _ { N - 1 } ^ { a d v } } J ( X _ { N - 1 } ^ { a d v } , y _ { L L } ) ) \\}\n$$",
270
+ "text_format": "latex",
271
+ "bbox": [
272
+ 245,
273
+ 670,
274
+ 753,
275
+ 693
276
+ ],
277
+ "page_idx": 1
278
+ },
279
+ {
280
+ "type": "text",
281
+ "text": "Carlini and Wagner attack (Carlini & Wagner, 2017) referred to as $\\mathbf { \\tilde { \\Sigma } } ^ { 6 6 } \\mathbf { C } \\mathbf { W } ^ { \\prime } $ solves an optimization problem which minimizes both an objective function $f$ (such that attack is success if and only if $\\stackrel { \\bullet } { f } ( X ^ { a d v } ) < 0 )$ and a distance measure between $X ^ { a d v }$ and $\\boldsymbol { X }$ . ",
282
+ "bbox": [
283
+ 174,
284
+ 705,
285
+ 825,
286
+ 748
287
+ ],
288
+ "page_idx": 1
289
+ },
290
+ {
291
+ "type": "text",
292
+ "text": "Black box attack is performed by testing accuracy on a target network with the adversarial images crafted from a source network different from the target network. Lower accuracy means successful black-box attack. When we use the same network for both target and source network, we call this as white-box attack. ",
293
+ "bbox": [
294
+ 174,
295
+ 755,
296
+ 825,
297
+ 810
298
+ ],
299
+ "page_idx": 1
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "2.2 DEFENSE METHODS ",
304
+ "text_level": 1,
305
+ "bbox": [
306
+ 176,
307
+ 828,
308
+ 356,
309
+ 843
310
+ ],
311
+ "page_idx": 1
312
+ },
313
+ {
314
+ "type": "text",
315
+ "text": "Adversarial training (Kurakin et al., 2017): is a form of data augmentation where it injects adversarial examples during training. In this method, $k$ examples are taken from the mini batch $B$ (size of $m$ ) and the adversarial examples are generated with one of step method. The $k$ adversarial examples replaces the corresponding clean examples when making mini batch. Below we refer this adversarial training method as “Kurakin’s”. ",
316
+ "bbox": [
317
+ 174,
318
+ 853,
319
+ 823,
320
+ 924
321
+ ],
322
+ "page_idx": 1
323
+ },
324
+ {
325
+ "type": "table",
326
+ "img_path": "images/aea920e27ab8fdce7f5e623a12d60e754f7868ac8c75a3056a62de968ed1bb8d.jpg",
327
+ "table_caption": [
328
+ "Table 1: CIFAR10 test results $( \\% )$ under black box attacks for ${ \\epsilon } { = } 1 6$ . Source networks share the same initialization which is different from the target networks. {Target: R20, $\\mathsf { R } 2 0 _ { K }$ : standard, Kurakin’s, Source: $\\mathbf { R } 2 0 \\mathbf { _ 2 }$ , $\\mathbf { R } 2 0 _ { K 2 }$ : standard, Kurakin’s.} "
329
+ ],
330
+ "table_footnote": [],
331
+ "table_body": "<table><tr><td rowspan=\"2\">Target</td><td colspan=\"2\">Source: step-FGSM</td><td colspan=\"2\">Source: iter_FGSM</td></tr><tr><td>R202</td><td>R20K2</td><td>R202</td><td>R20K2</td></tr><tr><td>R20</td><td>16.2</td><td>31.6</td><td>2.7</td><td>60.1</td></tr><tr><td>R20K</td><td>66.7</td><td>82.7</td><td>55.8</td><td>28.5</td></tr></table>",
332
+ "bbox": [
333
+ 173,
334
+ 204,
335
+ 532,
336
+ 276
337
+ ],
338
+ "page_idx": 2
339
+ },
340
+ {
341
+ "type": "image",
342
+ "img_path": "images/9574ecbaff76aa59c142821a74b75ca57db11c28bc841935cae1c0896257b6aa.jpg",
343
+ "image_caption": [
344
+ "Figure 1: Correlation between adversarial noises from different networks for each $\\epsilon$ . Shaded region shows $\\pm 0 . 1$ standard deviation of each line. "
345
+ ],
346
+ "image_footnote": [],
347
+ "bbox": [
348
+ 552,
349
+ 103,
350
+ 820,
351
+ 204
352
+ ],
353
+ "page_idx": 2
354
+ },
355
+ {
356
+ "type": "text",
357
+ "text": "Ensemble adversarial training (Tramer et al., 2017): \\` is essentially the same with the adversarial training, but uses several pre-trained vanilla networks to generate one-step adversarial examples for training. Below we refer this adversarial training method as “Ensemble”. ",
358
+ "bbox": [
359
+ 173,
360
+ 301,
361
+ 825,
362
+ 343
363
+ ],
364
+ "page_idx": 2
365
+ },
366
+ {
367
+ "type": "text",
368
+ "text": "3 PROPOSED APPROACH",
369
+ "text_level": 1,
370
+ "bbox": [
371
+ 176,
372
+ 363,
373
+ 393,
374
+ 378
375
+ ],
376
+ "page_idx": 2
377
+ },
378
+ {
379
+ "type": "text",
380
+ "text": "3.1 TRANSFERABILITY ANALYSIS ",
381
+ "text_level": 1,
382
+ "bbox": [
383
+ 176,
384
+ 395,
385
+ 423,
386
+ 409
387
+ ],
388
+ "page_idx": 2
389
+ },
390
+ {
391
+ "type": "text",
392
+ "text": "We first show transferability between purely trained networks and adversarially trained networks under black box attack. We use ResNet (He et al., 2016) models for CIFAR10 classification. We first train 20-layer ResNets with different methods (standard training, adversarial training (Kurakin et al., 2017)) and use those as target networks. We re-train networks (standard training and adversarial training) with the different initialization from the target networks, and use the trained networks as source networks. Experimental details and model descriptions can be found in Appendix A and B. In table 1, we report test accuracies under black box attack. ",
393
+ "bbox": [
394
+ 174,
395
+ 420,
396
+ 825,
397
+ 517
398
+ ],
399
+ "page_idx": 2
400
+ },
401
+ {
402
+ "type": "text",
403
+ "text": "Transferability (step attack): We first observe that high robustness against one-step attack between defended networks $( \\mathsf { R } 2 0 _ { K 2 } \\ldots \\mathsf { R } 2 0 _ { K } )$ ), and low robustness between undefended networks $( \\mathsf { R 2 0 _ { 2 } }$ - $> { \\textrm R } 2 0 \\AA ,$ ). This observation shows that error surfaces of neural networks are driven by the training method and networks trained with the same method end up similar optimum states. ",
404
+ "bbox": [
405
+ 174,
406
+ 525,
407
+ 823,
408
+ 580
409
+ ],
410
+ "page_idx": 2
411
+ },
412
+ {
413
+ "type": "text",
414
+ "text": "It is noteworthy to observe that the accuracies against step attack from the undefended network $( \\mathsf { R } 2 0 _ { 2 } )$ are always lower than those from defended network $( \\mathsf { R } 2 0 _ { K { \\bf 2 } } )$ . Possible explanation for this would be that adversarial training tweaks gradient seen from the clean image to point toward weaker adversarial point along that gradient direction. As a result, one-step adversarial images from defended networks become weaker than those from undefended network. ",
415
+ "bbox": [
416
+ 174,
417
+ 588,
418
+ 823,
419
+ 657
420
+ ],
421
+ "page_idx": 2
422
+ },
423
+ {
424
+ "type": "text",
425
+ "text": "Transferability (iterative attack): We observe “iter FGSM” attack remains very strong even under the black box attack scenario but only between undefended networks or defended networks. This is because iter FGSM noises $( X ^ { a d v } – X )$ from defended networks resemble each other. As shown in figure 1, we observe higher correlation between iter FGSM noises from a defended network $( \\mathsf { R } 2 0 \\kappa )$ and those from another defended network $( \\mathsf { R } 2 0 _ { K { \\bf 2 } } )$ ). ",
426
+ "bbox": [
427
+ 174,
428
+ 665,
429
+ 825,
430
+ 734
431
+ ],
432
+ "page_idx": 2
433
+ },
434
+ {
435
+ "type": "text",
436
+ "text": "Difficulty of defense/attack under the black box attack scenario: As seen from this observation, it is efficient to attack an undefended/defended network with iter FGSM examples crafted from another undefended/defended network. Thus, when we want to build a robust network under the black box attack scenario, it is desired to check accuracies for the adversarial examples crafted from other networks trained with the same strategy. ",
437
+ "bbox": [
438
+ 174,
439
+ 741,
440
+ 825,
441
+ 811
442
+ ],
443
+ "page_idx": 2
444
+ },
445
+ {
446
+ "type": "text",
447
+ "text": "3.2 CASCADE ADVERSARIAL TRAINING ",
448
+ "text_level": 1,
449
+ "bbox": [
450
+ 176,
451
+ 828,
452
+ 465,
453
+ 842
454
+ ],
455
+ "page_idx": 2
456
+ },
457
+ {
458
+ "type": "text",
459
+ "text": "Inspired by the observation that iter FGSM images transfer well between defended networks, we propose cascade adversarial training, which trains a network by injecting iter FGSM images crafted from an already defended network. We hypothesize that the network being trained with cascade adversarial training will learn to avoid such adversarial perturbation, enhancing robustness against iter FGSM attack. The intuition behind this proposed method is that we transfer the knowledge of the end results of adversarial training. In particular, we train a network by injecting iter FGSM images crafted from already defended network in addition to the one-step adversarial images crafted from the network being trained. ",
460
+ "bbox": [
461
+ 174,
462
+ 853,
463
+ 825,
464
+ 924
465
+ ],
466
+ "page_idx": 2
467
+ },
468
+ {
469
+ "type": "image",
470
+ "img_path": "images/3e15aca655600181f36bed5f1e7e2e1f2bf9f8ad5a8ba6aba416917d887a4350.jpg",
471
+ "image_caption": [
472
+ "Figure 2: Cascade adversarial training regularized with a unified embedding. "
473
+ ],
474
+ "image_footnote": [],
475
+ "bbox": [
476
+ 223,
477
+ 98,
478
+ 785,
479
+ 237
480
+ ],
481
+ "page_idx": 3
482
+ },
483
+ {
484
+ "type": "image",
485
+ "img_path": "images/94897954e10187615eda8e565cf77b8ca80a2765e4e1577dda4e06d5b6bda6a3.jpg",
486
+ "image_caption": [
487
+ "Figure 3: (Left) Bidirectional loss. (Right) Pivot loss. "
488
+ ],
489
+ "image_footnote": [],
490
+ "bbox": [
491
+ 294,
492
+ 273,
493
+ 709,
494
+ 347
495
+ ],
496
+ "page_idx": 3
497
+ },
498
+ {
499
+ "type": "text",
500
+ "text": "",
501
+ "bbox": [
502
+ 174,
503
+ 397,
504
+ 825,
505
+ 440
506
+ ],
507
+ "page_idx": 3
508
+ },
509
+ {
510
+ "type": "text",
511
+ "text": "3.3 REGULARIZATION WITH A UNIFIED EMBEDDING ",
512
+ "text_level": 1,
513
+ "bbox": [
514
+ 174,
515
+ 457,
516
+ 552,
517
+ 472
518
+ ],
519
+ "page_idx": 3
520
+ },
521
+ {
522
+ "type": "text",
523
+ "text": "We advance the algorithm proposed in (Kurakin et al., 2017) by adding low level similarity learning. Unlike (Kurakin et al., 2017), we include the clean examples used for generating adversarial images in the mini batch. Once one step forward pass is performed with the mini batch, embeddings are followed by the softmax layer for the cross entropy loss for the standard classification. At the same time, we take clean embeddings and adversarial embeddings, and minimize the distance between the two with the distance based loss. ",
524
+ "bbox": [
525
+ 174,
526
+ 482,
527
+ 825,
528
+ 565
529
+ ],
530
+ "page_idx": 3
531
+ },
532
+ {
533
+ "type": "text",
534
+ "text": "The distance based loss encourages two similar images (clean and adversarial) to produce the same outputs, not necessarily the true labels. Thus, low-level similarity learning can be considered as an unsupervised learning. By adding regularization in higher embedding layer, convolution filters gradually learn how to ignore such pixel-level perturbation. We have applied regularization on lower layers with an assumption that low level pixel perturbation can be ignored in lower hierarchy of networks. However, adding regularization term on higher embedding layer right before the softmax layer showed best performance. The more convolutional filters have chance to learn such similarity, the better the performance. Note that cross entropy doesn’t encourage two similar images to produce the same output labels. Standard image classification using cross entropy compares ground truth labels with outputs of a network regardless of how similar training images are. ",
535
+ "bbox": [
536
+ 173,
537
+ 573,
538
+ 825,
539
+ 713
540
+ ],
541
+ "page_idx": 3
542
+ },
543
+ {
544
+ "type": "text",
545
+ "text": "The entire training process combining cascade adversarial training and low level similarity learning is shown in figure 2. We define the total loss as follows: ",
546
+ "bbox": [
547
+ 173,
548
+ 718,
549
+ 823,
550
+ 747
551
+ ],
552
+ "page_idx": 3
553
+ },
554
+ {
555
+ "type": "equation",
556
+ "img_path": "images/05961acf28424a1591ec2f03701fa08a08759e475106beffa1aa7bca3f6ec615.jpg",
557
+ "text": "$$\nL o s s = \\frac { 1 } { ( m - k ) + \\lambda k } \\Bigg ( \\sum _ { i = 1 } ^ { m - k } L ( { \\bf X } _ { i } | y _ { i } ) + \\lambda \\sum _ { i = 1 } ^ { k } L ( { \\bf X } _ { i } ^ { a d v } | y _ { i } ) \\Bigg ) + \\lambda _ { 2 } \\sum _ { i = 1 } ^ { k } L _ { d i s t } ( E _ { i } ^ { a d v } , E _ { i } )\n$$",
558
+ "text_format": "latex",
559
+ "bbox": [
560
+ 200,
561
+ 752,
562
+ 795,
563
+ 796
564
+ ],
565
+ "page_idx": 3
566
+ },
567
+ {
568
+ "type": "text",
569
+ "text": "$\\mathbf { \\mathcal { E } } _ { i }$ and $E _ { i } ^ { a d v }$ are the resulting embeddings from $X _ { i }$ and $X _ { i } ^ { a d v }$ , respectively. $m$ is the size of the mini batch, $k \\left( \\leq m / 2 \\right)$ is the number of adversarial images in the mini batch. $\\lambda$ is the parameter to control the relative weight of classification loss for adversarial images. $\\lambda _ { 2 }$ is the parameter to control the relative weight of the distance based loss $L _ { d i s t }$ in the total loss. ",
570
+ "bbox": [
571
+ 174,
572
+ 809,
573
+ 823,
574
+ 866
575
+ ],
576
+ "page_idx": 3
577
+ },
578
+ {
579
+ "type": "text",
580
+ "text": "Bidirectional loss minimizes the distance between the two embeddings by moving both clean and adversarial embeddings as shown in the left side of the figure 3. ",
581
+ "bbox": [
582
+ 173,
583
+ 872,
584
+ 821,
585
+ 901
586
+ ],
587
+ "page_idx": 3
588
+ },
589
+ {
590
+ "type": "equation",
591
+ "img_path": "images/a4d7acae9b01aadbad4425654117f9ae7745fe9216f3c571a1defe3e5244383e.jpg",
592
+ "text": "$$\nL _ { d i s t } ( \\pmb { { E } } _ { i } ^ { a d v } , \\pmb { { E } } _ { i } ) = | | \\pmb { { E } } _ { i } ^ { a d v } - \\pmb { { E } } _ { i } | | _ { N } ^ { N } , \\quad N \\in { 1 , 2 \\quad i = 1 , 2 , . . . , k }\n$$",
593
+ "text_format": "latex",
594
+ "bbox": [
595
+ 285,
596
+ 906,
597
+ 712,
598
+ 925
599
+ ],
600
+ "page_idx": 3
601
+ },
602
+ {
603
+ "type": "table",
604
+ "img_path": "images/c673904c52bc36a2ac20b6ef79b31fbb15ba9161edb999ffb29ed9aa24e870aa.jpg",
605
+ "table_caption": [
606
+ "Table 2: MNIST test results $( \\% )$ for 20-layer ResNet models $\\prime { \\epsilon } = 0 . 3 { ^ { * } } 2 5 5$ at test time). $\\{ { \\bf R } 2 0 { \\bf M }$ : standard training, ${ \\mathrm { R } } 2 0 { \\mathrm { M } } _ { K }$ : Kurakin’s adversarial training, ${ \\bf R } 2 0 { \\bf M } _ { B }$ : Bidirectional loss, ${ \\bf R } 2 0 { \\bf M } _ { P }$ : P ivot loss. $\\}$ CW $L _ { \\infty }$ attack is performed with 100 test samples (10 samples per each class) and the number of adversarial examples with $\\epsilon > 0 . 3 ^ { * } 2 5 5$ is reported. Additional details for CW attack can be found in Appendix F "
607
+ ],
608
+ "table_footnote": [],
609
+ "table_body": "<table><tr><td>Model</td><td>clean</td><td>step_ll</td><td>step_FGSM</td><td>iter_ll</td><td>iter_FGSM</td><td>CW</td></tr><tr><td>R20M</td><td>99.6</td><td>9.7</td><td>10.3</td><td>0.0</td><td>0.0</td><td>0</td></tr><tr><td>R20MK</td><td>99.6</td><td>96.7</td><td>94.5</td><td>89.0</td><td>60.2</td><td>46</td></tr><tr><td>R20Mb (Ours)</td><td>99.5</td><td>97.3</td><td>96.2</td><td>97.2</td><td>88.5</td><td>81</td></tr><tr><td>R20Mp (Ours)</td><td>99.5</td><td>97.1</td><td>95.7</td><td>96.9</td><td>88.9</td><td>82</td></tr></table>",
610
+ "bbox": [
611
+ 233,
612
+ 188,
613
+ 763,
614
+ 268
615
+ ],
616
+ "page_idx": 4
617
+ },
618
+ {
619
+ "type": "text",
620
+ "text": "We tried $N = 1$ , 2 and found not much difference between the two. We report the results with $N =$ 2 for the rest of the paper otherwise noted. When $N = 2$ , $L _ { d i s t }$ becomes L2 loss. ",
621
+ "bbox": [
622
+ 174,
623
+ 299,
624
+ 823,
625
+ 327
626
+ ],
627
+ "page_idx": 4
628
+ },
629
+ {
630
+ "type": "text",
631
+ "text": "Pivot loss minimizes the distance between the two embeddings by moving only the adversarial embeddings as shown in the right side of the figure 3. ",
632
+ "bbox": [
633
+ 173,
634
+ 334,
635
+ 821,
636
+ 363
637
+ ],
638
+ "page_idx": 4
639
+ },
640
+ {
641
+ "type": "equation",
642
+ "img_path": "images/65a51d48749309a44e801c21f9dca81d780b27d1739d48e04acf44c349841c79.jpg",
643
+ "text": "$$\nL _ { d i s t } ( \\pmb { { E } } _ { i } ^ { a d v } | \\pmb { { E } } _ { i } ) = | | \\pmb { { E } } _ { i } ^ { a d v } - \\pmb { { E } } _ { i } | | _ { N } ^ { N } , \\quad N \\in { 1 , 2 \\quad i = 1 , 2 , . . . , k }\n$$",
644
+ "text_format": "latex",
645
+ "bbox": [
646
+ 287,
647
+ 367,
648
+ 710,
649
+ 387
650
+ ],
651
+ "page_idx": 4
652
+ },
653
+ {
654
+ "type": "text",
655
+ "text": "In this case, clean embeddings ( $\\mathbf { \\mathcal { E } } _ { i }$ ) serve as pivots to the adversarial embeddings. In particular, we don’t back-propagate through the clean embeddings for the distance based loss. The intuition behind the use of pivot loss is that the embedding from a clean image can be treated as the ground truth embedding. ",
656
+ "bbox": [
657
+ 174,
658
+ 398,
659
+ 825,
660
+ 455
661
+ ],
662
+ "page_idx": 4
663
+ },
664
+ {
665
+ "type": "text",
666
+ "text": "4 LOW LEVEL SIMILARITY LEARNING ANALYSIS ",
667
+ "text_level": 1,
668
+ "bbox": [
669
+ 174,
670
+ 476,
671
+ 601,
672
+ 492
673
+ ],
674
+ "page_idx": 4
675
+ },
676
+ {
677
+ "type": "text",
678
+ "text": "4.1 EXPERIMENTAL RESULTS ON MNIST ",
679
+ "text_level": 1,
680
+ "bbox": [
681
+ 176,
682
+ 506,
683
+ 473,
684
+ 521
685
+ ],
686
+ "page_idx": 4
687
+ },
688
+ {
689
+ "type": "text",
690
+ "text": "We first analyze the effect of low level similarity learning on MNIST. We train ResNet models (He et al., 2016) with different methods (standard training, Kurakin’s adversarial training and adversarial training with our distance based loss). Experimental details can be found in Appendix A. ",
691
+ "bbox": [
692
+ 174,
693
+ 532,
694
+ 825,
695
+ 574
696
+ ],
697
+ "page_idx": 4
698
+ },
699
+ {
700
+ "type": "text",
701
+ "text": "Table 2 shows the accuracy results for MNIST test dataset for different types of attack methods. As shown in the table, our method achieves better accuracy than Kurakin’s method for all types of attacks with a little sacrifice on the accuracy for the clean images. Even though adversarial training is done only with “step ll”, additional regularization increases robustness against unknown “step FGSM”, “iter ll”, “iter FGSM” and CW $L _ { \\infty }$ attacks. This shows that our low-level similarity learning can successfully regularize the one-step adversarial perturbation and its vicinity for simple image classification like MNIST. ",
702
+ "bbox": [
703
+ 174,
704
+ 582,
705
+ 825,
706
+ 679
707
+ ],
708
+ "page_idx": 4
709
+ },
710
+ {
711
+ "type": "text",
712
+ "text": "4.2 EMBEDDING SPACE VISUALIZATION ",
713
+ "text_level": 1,
714
+ "bbox": [
715
+ 176,
716
+ 695,
717
+ 465,
718
+ 710
719
+ ],
720
+ "page_idx": 4
721
+ },
722
+ {
723
+ "type": "text",
724
+ "text": "To visualize the embedding space, we modify 20-layer ResNet model where the last fully connected layer $\\left( 6 4 \\mathbf { x } 1 0 \\right)$ is changed to two fully connected layers ( $6 4 \\mathrm { x } 2$ and 2x10). We re-train networks with standard training, Kurakin’s method and our pivot loss on MNIST. 1 In figure 4, we draw embeddings (dimension $^ { 1 = 2 }$ ) between two fully connected layers. As seen from this figure, adversarial images from the network trained with standard training cross the decision boundary easily as $\\epsilon$ increases. With Kurakin’s adversarial training, the distances between clean and adversarial embeddings are minimized compared to standard training. And our pivot loss further minimizes distance between the clean and adversarial embeddings. Note that our pivot loss also decreases absolute value of the embeddings, thus, higher $\\lambda _ { 2 }$ will eventually result in overlap between distinct embedding distributions. We also observe that intra class variation of the clean embeddings are also minimized for the network trained with our pivot loss as shown in the scatter plot in figure 4 (c). ",
725
+ "bbox": [
726
+ 174,
727
+ 722,
728
+ 825,
729
+ 875
730
+ ],
731
+ "page_idx": 4
732
+ },
733
+ {
734
+ "type": "image",
735
+ "img_path": "images/03d39dce6fed9b5b8ffb7ae3b4de76e2f07a5e1bf76cb53aab54a3b3914a9521.jpg",
736
+ "image_caption": [
737
+ "Figure 4: Embedding space visualization for modified ResNet models trained on MNIST. $\\mathbf { X }$ -axis and y-axis show first and second dimension of embeddings respectively. Scatter plot shows first 100 clean embeddings per each class on MNIST test set. Each arrow shows difference between two embeddings (one from iter FGSM image (\u000f) and the other from $( \\epsilon { + } 8 ) ,$ ). We draw arrows from $\\epsilon = 0$ to $\\epsilon = 7 6$ $( \\approx 0 . 3 ^ { * } 2 5 5 )$ ) for one sample image per each class. We observe differences between clean and corresponding adversarial embeddings are minimized for the network trained with pivot loss. "
738
+ ],
739
+ "image_footnote": [],
740
+ "bbox": [
741
+ 173,
742
+ 114,
743
+ 825,
744
+ 251
745
+ ],
746
+ "page_idx": 5
747
+ },
748
+ {
749
+ "type": "text",
750
+ "text": "4.3 EFFECT OF $\\lambda _ { 2 }$ ON CIFAR10 ",
751
+ "text_level": 1,
752
+ "bbox": [
753
+ 176,
754
+ 376,
755
+ 408,
756
+ 390
757
+ ],
758
+ "page_idx": 5
759
+ },
760
+ {
761
+ "type": "text",
762
+ "text": "We train 20-layer ResNet models with pivot loss and various $\\lambda _ { \\mathrm { 2 } } \\mathrm { s }$ for CIFAR10 dataset to study effects of the weight of the distance measure in the loss function. Figure 5 shows that a higher $\\lambda _ { 2 }$ increases accuracy of the iteratively generated adversarial images. However, it reduces accuracy on the clean images, and increasing $\\lambda _ { 2 }$ above 0.3 even results in divergence of the training. This is because embedding distributions of different classes will eventually overlap since absolute value of the embedding will be decreased as $\\lambda _ { 2 }$ increases as seen from the section 4.2. In this experiment, we show that there exists clear trade-off between accuracy for the clean images and that for the adversarial images, and we recommend using a very high $\\lambda _ { 2 }$ only under strong adversarial environment. ",
763
+ "bbox": [
764
+ 174,
765
+ 404,
766
+ 589,
767
+ 583
768
+ ],
769
+ "page_idx": 5
770
+ },
771
+ {
772
+ "type": "image",
773
+ "img_path": "images/c7c186c5dd4d21b6bfbfbcbee29ca466d12198bfbe2a9938e520a56b1e3d928b.jpg",
774
+ "image_caption": [
775
+ "Figure 5: Accuracy vs. $\\lambda _ { 2 }$ "
776
+ ],
777
+ "image_footnote": [],
778
+ "bbox": [
779
+ 599,
780
+ 406,
781
+ 816,
782
+ 531
783
+ ],
784
+ "page_idx": 5
785
+ },
786
+ {
787
+ "type": "text",
788
+ "text": "5 CASCADE ADVERSARIAL TRAINING ANALYSIS ",
789
+ "text_level": 1,
790
+ "bbox": [
791
+ 174,
792
+ 607,
793
+ 598,
794
+ 622
795
+ ],
796
+ "page_idx": 5
797
+ },
798
+ {
799
+ "type": "text",
800
+ "text": "5.1 SOURCE NETWORK SELECTION ",
801
+ "text_level": 1,
802
+ "bbox": [
803
+ 176,
804
+ 640,
805
+ 434,
806
+ 654
807
+ ],
808
+ "page_idx": 5
809
+ },
810
+ {
811
+ "type": "text",
812
+ "text": "We further study the transferability of iter FGSM images between various architectures. To this end, we first train 56-layer ResNet networks (Kurakin’s, pivot loss) with the same initialization. Then we train another 56-layer ResNet network (Kurakin’s) with different initialization. We repeat the training for the 110-layer ResNet networks. We measure correlation between iter FGSM noises from different networks. ",
813
+ "bbox": [
814
+ 174,
815
+ 666,
816
+ 419,
817
+ 832
818
+ ],
819
+ "page_idx": 5
820
+ },
821
+ {
822
+ "type": "image",
823
+ "img_path": "images/34d7075ba0af839593f33f5d84485be6ec355dc2d545d65ab9e3441ef984ed68.jpg",
824
+ "image_caption": [
825
+ "Figure 6 (a) shows correlation between iter FGSM noises crafted from Kurakin’s network and those from Pivot network with the same initialization. Conjectured from (Kurakin et al., 2017), we observe high corre",
826
+ "Figure 6: Correlation between iter FGSM noises crafted from different networks for each \u000f. Correlation is averaged over randomly chosen 128 images from CIFAR10 test-set. "
827
+ ],
828
+ "image_footnote": [],
829
+ "bbox": [
830
+ 433,
831
+ 674,
832
+ 823,
833
+ 853
834
+ ],
835
+ "page_idx": 5
836
+ },
837
+ {
838
+ "type": "table",
839
+ "img_path": "images/635c6aa003fe8ab801de926562c927629e2d923031927c6371924d96ec1dc1ef.jpg",
840
+ "table_caption": [
841
+ "Table 3: CIFAR10 test results $( \\% )$ for 110-layer ResNet models. CW $L _ { \\infty }$ attack is performed with 100 test samples (10 samples per each class) and the number of adversarial examples with $\\epsilon > 2$ or 4 is reported. $\\{ \\mathrm { R 1 1 0 } _ { K }$ : Kurakin’s, $\\mathrm { R } 1 0 _ { P }$ : P ivot loss, $\\mathrm { R } 1 1 0 _ { E }$ : Ensemble training, $\\mathrm { R 1 1 0 } _ { K , C }$ : Kurakin’s and $C$ ascade training, $\\mathrm { R 1 1 0 } _ { P , E }$ : P ivot loss and Ensemble training, and $\\mathrm { R 1 1 0 } _ { P , C }$ : P ivot loss and Cascade training} "
842
+ ],
843
+ "table_footnote": [],
844
+ "table_body": "<table><tr><td rowspan=\"2\">Model</td><td rowspan=\"2\">clean</td><td colspan=\"2\">step_ll</td><td colspan=\"2\">step_FGSM</td><td colspan=\"2\">iter_FGSM</td><td colspan=\"2\">CW</td></tr><tr><td>e=2</td><td>∈=16</td><td>e=2</td><td>∈=16</td><td>e=2</td><td>∈=4</td><td>∈=2</td><td>e=4</td></tr><tr><td>R110K</td><td>92.3</td><td>88.3</td><td>90.7</td><td>86.0</td><td>95.2</td><td>59.4</td><td>9.2</td><td>25</td><td>4</td></tr><tr><td>R110p (Ours)</td><td>92.3</td><td>86.0</td><td>89.4</td><td>81.6</td><td>91.6</td><td>64.1</td><td>20.9</td><td>32</td><td>7</td></tr><tr><td>R110E</td><td>92.3</td><td>86.3</td><td>74.3</td><td>84.1</td><td>72.9</td><td>63.5</td><td>21.1</td><td>24</td><td>6</td></tr><tr><td>R110k,c (Ours)</td><td>92.3</td><td>86.2</td><td>72.8</td><td>82.6</td><td>66.7</td><td>69.3</td><td>33.4</td><td>20</td><td>5</td></tr><tr><td>R110p,ε (Ours)</td><td>91.3</td><td>84.0</td><td>65.7</td><td>77.6</td><td>54.5</td><td>66.8</td><td>38.3</td><td>38</td><td>16</td></tr><tr><td>R110p,c (Ours)</td><td>91.5</td><td>85.7</td><td>76.4</td><td>82.4</td><td>69.1</td><td>73.5</td><td>42.5</td><td>27</td><td>15</td></tr></table>",
845
+ "bbox": [
846
+ 215,
847
+ 188,
848
+ 784,
849
+ 321
850
+ ],
851
+ "page_idx": 6
852
+ },
853
+ {
854
+ "type": "text",
855
+ "text": "lation between iter FGSM noises from networks with the same initialization. Correlation between iter FGSM noises from the networks with different initialization, however, becomes lower as the network is deeper as shown in figure 6 (b). Since the degree of freedom increases as the network size increases, adversarially trained networks prone to end up with different states, thus, making transfer rate lower. To maximize the benefit of the cascade adversarial training, we propose to use the same initialization for a cascade network and a source network used for iterative adversarial examples generation. ",
856
+ "bbox": [
857
+ 174,
858
+ 361,
859
+ 825,
860
+ 458
861
+ ],
862
+ "page_idx": 6
863
+ },
864
+ {
865
+ "type": "text",
866
+ "text": "5.2 WHITE BOX ATTACK ANALYSIS ",
867
+ "text_level": 1,
868
+ "bbox": [
869
+ 176,
870
+ 483,
871
+ 434,
872
+ 497
873
+ ],
874
+ "page_idx": 6
875
+ },
876
+ {
877
+ "type": "text",
878
+ "text": "We first compare a network trained with Kurakin’s method and that with pivot loss. We train 110- layer ResNet models with/without pivot loss and report accuracy in table 3. We observe our lowlevel similarity learning further improves robustness against iterative attacks compared to Kurakin’s adversarial training. However, the accuracy improvements against iterative attacks (iter FGSM, CW) are limited, showing regularization effect of low-level similarity learning is not sufficient for the iterative attacks on complex color images like CIFAR10. This is different from MNIST test cases where we observed significant accuracy increase for iterative attacks only with pivot loss. We observe label leaking phenomenon reported in (Kurakin et al., 2017) happens even though we don’t train a network with step FGSM images. Additional analysis for this phenomenon is explained in Appendix D. ",
879
+ "bbox": [
880
+ 174,
881
+ 512,
882
+ 825,
883
+ 651
884
+ ],
885
+ "page_idx": 6
886
+ },
887
+ {
888
+ "type": "text",
889
+ "text": "Next, we train a network from scratch with iter FGSM examples crafted from the defended network, $\\mathrm { R } 1 0 _ { P }$ . We use the same initialization used in $\\mathrm { R } 1 1 0 _ { P }$ as discussed in 5.1. In particular, iter FGSM images are crafted from $\\mathrm { R } 1 0 _ { P }$ with CIFAR10 training images for $\\epsilon = 1 , 2 , . . . , 1 6$ , and those are used randomly together with step ll examples from the network being trained. We train cascade networks with/without pivot loss. We also train networks with ensemble adversarial training (Tramer et al., \\` 2017) with/without pivot loss for comparison. The implementation details for the trained models can be found in Appendix B. ",
890
+ "bbox": [
891
+ 174,
892
+ 659,
893
+ 825,
894
+ 756
895
+ ],
896
+ "page_idx": 6
897
+ },
898
+ {
899
+ "type": "text",
900
+ "text": "We find several meaningful observations in table 3. First, ensemble and cascade models show improved accuracy against iterative attack although at the expense of decreased accuracy for onestep attacks compared to the baseline defended network $( \\mathrm { R } 1 1 0 _ { K } )$ ). Additional data augmentation from other networks enhances the robustness against iterative attack, weakening label leaking effect caused by one-step adversarial training. ",
901
+ "bbox": [
902
+ 174,
903
+ 763,
904
+ 823,
905
+ 833
906
+ ],
907
+ "page_idx": 6
908
+ },
909
+ {
910
+ "type": "text",
911
+ "text": "Second, our low-level similarity learning $( \\mathrm { R } 1 1 0 _ { P , E }$ , $\\operatorname { R 1 1 0 } _ { P , C } )$ ) further enhances robustness against iterative attacks including fully unknown CW attack (especially for $\\epsilon { = } 4$ ). Additional knowledge learned from data augmentation through cascade/ensemble adversarial training enables networks to learn partial knowledge of perturbations generated by an iterative method. And the learned iterative perturbations become regularized further with our low-level similarity learning making networks robust against unknown iterative attacks. ",
912
+ "bbox": [
913
+ 174,
914
+ 840,
915
+ 825,
916
+ 922
917
+ ],
918
+ "page_idx": 6
919
+ },
920
+ {
921
+ "type": "table",
922
+ "img_path": "images/c739090c30b8cd33548e9102c900feae48e9493fde03b6171e4d1dfecec11039.jpg",
923
+ "table_caption": [
924
+ "Table 4: CIFAR10 test results $( \\% )$ for 110-layer ResNet models under black box attacks $\\left( \\epsilon = 1 6 \\right)$ . {Target: same networks in table 3 and $\\mathrm { R } 1 1 0 _ { K }$ : Kurakin’s, Source: re-trained baseline, Kurakin’s, cascade and ensemble networks with/without pivot loss. Source networks use the different initialization from the target networks. Additional details of the models can be found in Appendix B.} "
925
+ ],
926
+ "table_footnote": [],
927
+ "table_body": "<table><tr><td rowspan=\"2\">Target</td><td colspan=\"7\">Source: iter_FGSM</td></tr><tr><td>R1102</td><td>R110K2</td><td>R110E2</td><td>R110p2</td><td>R110K,C2</td><td>R110p,E2</td><td>R110p,C2</td></tr><tr><td>R110K</td><td>70.5</td><td>73.2</td><td>27.9</td><td>77.0</td><td>67.3</td><td>54.6</td><td>80.8</td></tr><tr><td>R110E</td><td>77.9</td><td>79.5</td><td>55.8</td><td>79.0</td><td>68.2</td><td>54.7</td><td>82.7</td></tr><tr><td>R110p (Ours)</td><td>75.9</td><td>75.6</td><td>39.6</td><td>78.5</td><td>68.3</td><td>61.3</td><td>83.3</td></tr><tr><td>R110k,c (Ours)</td><td>56.4</td><td>80.2</td><td>61.1</td><td>79.5</td><td>67.4</td><td>62.6</td><td>82.1</td></tr><tr><td>R110p,E (Ours)</td><td>78.2</td><td>82.1</td><td>67.7</td><td>81.7</td><td>73.4</td><td>68.4</td><td>83.8</td></tr><tr><td>R110p,C (Ours)</td><td>71.9</td><td>80.4</td><td>63.9</td><td>80.1</td><td>71.1</td><td>64.2</td><td>83.0</td></tr></table>",
928
+ "bbox": [
929
+ 189,
930
+ 174,
931
+ 810,
932
+ 303
933
+ ],
934
+ "page_idx": 7
935
+ },
936
+ {
937
+ "type": "text",
938
+ "text": "Third, our low-level similarity learning serves as a good regularizer for adversarial images, but not for the clean images for ensemble/cascade models (reduced accuracy for the clean images for $\\mathrm { R 1 1 0 } _ { P , E }$ and $\\mathrm { R 1 1 0 } _ { P , C }$ in table 3). Compared to pure adversarial training with one-step adversarial examples, the network sees more various adversarial perturbations during training as a result of ensemble and cascade training. Those perturbations are prone to end up embeddings in the vicinity of decision boundary more often than perturbations caused by one-step adversarial training. Pivot loss pulls the vicinity of those adversarial embeddings toward their corresponding clean embeddings. During this process, clean embeddings from other classes might also be moved toward the decision boundary which results in decreased accuracy for the clean images. ",
939
+ "bbox": [
940
+ 173,
941
+ 340,
942
+ 825,
943
+ 465
944
+ ],
945
+ "page_idx": 7
946
+ },
947
+ {
948
+ "type": "text",
949
+ "text": "5.3 BLACK BOX ATTACK ANALYSIS ",
950
+ "text_level": 1,
951
+ "bbox": [
952
+ 176,
953
+ 491,
954
+ 434,
955
+ 505
956
+ ],
957
+ "page_idx": 7
958
+ },
959
+ {
960
+ "type": "text",
961
+ "text": "We finally perform black box attack analysis for the cascade/ensemble networks with/without pivot loss. We report black box attack accuracy with the source networks trained with the same method, but with different initialization from the target networks. The reason for this is adversarial examples transfer well between networks trained with the same strategy as observed in section 3.1. We re-train 110-layer ResNet models using Kurakin’s, cascade and ensemble adversarial training with/without low-level similarity learning and use those networks as source networks for black-box attacks. Baseline 110-layer ResNet model is also included as a source network. Target networks are the same networks used in table 3. We found iter FGSM attack resulted in lower accuracy than step FGSM attack, thus, report iter FGSM attack only in table 4. ",
962
+ "bbox": [
963
+ 174,
964
+ 518,
965
+ 825,
966
+ 645
967
+ ],
968
+ "page_idx": 7
969
+ },
970
+ {
971
+ "type": "text",
972
+ "text": "We first observe that iter FGSM attack from ensemble models $( \\mathrm { R } 1 1 0 _ { E 2 }$ , $\\mathrm { R 1 1 0 } _ { P , E 2 } )$ is strong (results in lower accuracy) compared to that from any other trained networks. 2 Since ensemble models learn various perturbation during training, adversarial noises crafted from those networks might be more general for other networks making them transfer easily between defended networks. ",
973
+ "bbox": [
974
+ 174,
975
+ 651,
976
+ 823,
977
+ 708
978
+ ],
979
+ "page_idx": 7
980
+ },
981
+ {
982
+ "type": "text",
983
+ "text": "Second, cascade adversarial training breaks chicken and egg problem. (In section 3.1, we found that it is efficient to use a defended network as a source network to attack another defended network.) Even though the transferability between defended networks is reduced for deeper networks, cascade network $( \\mathrm { R } 1 1 0 _ { K , C } )$ shows worst case performance against the attack not from a defended network, but from a purely trained network $\\mathbf { ( R 1 1 0 _ { 2 } ) }$ . Possible solution to further improve the worst case robustness would be to use more than one network as source networks (including pure/defended networks) for iter FGSM images generation for cascade adversarial training. ",
984
+ "bbox": [
985
+ 174,
986
+ 715,
987
+ 825,
988
+ 814
989
+ ],
990
+ "page_idx": 7
991
+ },
992
+ {
993
+ "type": "text",
994
+ "text": "Third, ensemble/cascade networks together with our low-level similarity learning $( \\mathrm { R } 1 1 0 _ { P , E }$ , $\\mathrm { R 1 1 0 } _ { P , C } )$ show better worst case accuracy under black box attack scenario. This shows that enhancing robustness against iterative white box attack also improves robustness against iterative black box attack. ",
995
+ "bbox": [
996
+ 174,
997
+ 820,
998
+ 823,
999
+ 876
1000
+ ],
1001
+ "page_idx": 7
1002
+ },
1003
+ {
1004
+ "type": "text",
1005
+ "text": "6 CONCLUSION ",
1006
+ "text_level": 1,
1007
+ "bbox": [
1008
+ 174,
1009
+ 102,
1010
+ 318,
1011
+ 117
1012
+ ],
1013
+ "page_idx": 8
1014
+ },
1015
+ {
1016
+ "type": "text",
1017
+ "text": "We performed through transfer analysis and showed iter FGSM images transfer easily between networks trained with the same strategy. We exploited this and proposed cascade adversarial training, a method to train a network with iter FGSM adversarial images crafted from already defended networks. We also proposed adversarial training regularized with a unified embedding for classification and low- level similarity learning by penalizing distance between the clean and their corresponding adversarial embeddings. Combining those two techniques (low level similarity learning $^ +$ cascade adversarial training) with deeper networks further improved robustness against iterative attacks for both white-box and black-box attacks. ",
1018
+ "bbox": [
1019
+ 174,
1020
+ 133,
1021
+ 825,
1022
+ 244
1023
+ ],
1024
+ "page_idx": 8
1025
+ },
1026
+ {
1027
+ "type": "text",
1028
+ "text": "However, there is still a gap between accuracy for the clean images and that for the adversarial images. Improving robustness against both one-step and iterative attacks still remains challenging since it is shown to be difficult to train networks robust for both one-step and iterative attacks simultaneously. Future research is necessary to further improve the robustness against iterative attack without sacrificing the accuracy for step attacks or clean images under both white-box attack and black-box attack scenarios. ",
1029
+ "bbox": [
1030
+ 174,
1031
+ 252,
1032
+ 825,
1033
+ 335
1034
+ ],
1035
+ "page_idx": 8
1036
+ },
1037
+ {
1038
+ "type": "text",
1039
+ "text": "ACKNOWLEDGMENTS ",
1040
+ "text_level": 1,
1041
+ "bbox": [
1042
+ 176,
1043
+ 354,
1044
+ 326,
1045
+ 367
1046
+ ],
1047
+ "page_idx": 8
1048
+ },
1049
+ {
1050
+ "type": "text",
1051
+ "text": "We thank Alexey Kurakin of Google Brain and Li Chen of Intel for comments that greatly improved the manuscript. The research reported here was supported in part by the Defense Advanced Research Projects Agency (DARPA) under contract number HR0011-17-2-0045. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of DARPA. ",
1052
+ "bbox": [
1053
+ 174,
1054
+ 378,
1055
+ 825,
1056
+ 449
1057
+ ],
1058
+ "page_idx": 8
1059
+ },
1060
+ {
1061
+ "type": "text",
1062
+ "text": "REFERENCES ",
1063
+ "text_level": 1,
1064
+ "bbox": [
1065
+ 176,
1066
+ 470,
1067
+ 285,
1068
+ 484
1069
+ ],
1070
+ "page_idx": 8
1071
+ },
1072
+ {
1073
+ "type": "text",
1074
+ "text": "Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In IEEE Symposium on Security and Privacy, 2017. ",
1075
+ "bbox": [
1076
+ 174,
1077
+ 494,
1078
+ 823,
1079
+ 522
1080
+ ],
1081
+ "page_idx": 8
1082
+ },
1083
+ {
1084
+ "type": "text",
1085
+ "text": "Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In Proceedings of the International Conference on Learning Representations (ICLR), 2015. ",
1086
+ "bbox": [
1087
+ 174,
1088
+ 531,
1089
+ 823,
1090
+ 574
1091
+ ],
1092
+ "page_idx": 8
1093
+ },
1094
+ {
1095
+ "type": "text",
1096
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, Las Vegas, NV, USA, June 27-30, 2016, pp. 770–778, 2016. doi: 10.1109/CVPR.2016.90. URL http://dx.doi.org/10.1109/CVPR.2016.90. ",
1097
+ "bbox": [
1098
+ 173,
1099
+ 584,
1100
+ 823,
1101
+ 641
1102
+ ],
1103
+ "page_idx": 8
1104
+ },
1105
+ {
1106
+ "type": "text",
1107
+ "text": "Ruitong Huang, Bing Xu, Dale Schuurmans, and Csaba Szepesvari. Learning with a strong adver-´ sary. CoRR, abs/1511.03034, 2015. URL http://arxiv.org/abs/1511.03034. ",
1108
+ "bbox": [
1109
+ 173,
1110
+ 650,
1111
+ 820,
1112
+ 680
1113
+ ],
1114
+ "page_idx": 8
1115
+ },
1116
+ {
1117
+ "type": "text",
1118
+ "text": "Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, 2009. ",
1119
+ "bbox": [
1120
+ 173,
1121
+ 689,
1122
+ 805,
1123
+ 705
1124
+ ],
1125
+ "page_idx": 8
1126
+ },
1127
+ {
1128
+ "type": "text",
1129
+ "text": "Alexey Kurakin, Ian J. Goodfellow, and Samy Bengio. Adversarial machine learning at scale. In Proceedings of the International Conference on Learning Representations (ICLR), 2017. ",
1130
+ "bbox": [
1131
+ 173,
1132
+ 713,
1133
+ 823,
1134
+ 742
1135
+ ],
1136
+ "page_idx": 8
1137
+ },
1138
+ {
1139
+ "type": "text",
1140
+ "text": "Yann LeCun and Corinna Cortes. MNIST handwritten digit database. 2010. URL http://yann. lecun.com/exdb/mnist/. ",
1141
+ "bbox": [
1142
+ 173,
1143
+ 751,
1144
+ 820,
1145
+ 781
1146
+ ],
1147
+ "page_idx": 8
1148
+ },
1149
+ {
1150
+ "type": "text",
1151
+ "text": "O. M. Parkhi, A. Vedaldi, and A. Zisserman. Deep face recognition. In Proceedings of the British Machine Vision Conference (BMVC), 2015. ",
1152
+ "bbox": [
1153
+ 171,
1154
+ 790,
1155
+ 825,
1156
+ 819
1157
+ ],
1158
+ "page_idx": 8
1159
+ },
1160
+ {
1161
+ "type": "text",
1162
+ "text": "Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. ",
1163
+ "bbox": [
1164
+ 173,
1165
+ 828,
1166
+ 823,
1167
+ 871
1168
+ ],
1169
+ "page_idx": 8
1170
+ },
1171
+ {
1172
+ "type": "text",
1173
+ "text": "Florian Tramer, Alexey Kurakin, Nicolas Papernot, Dan Boneh, and Patrick McDaniel. Ensem- \\` ble adversarial training: Attacks and defenses. CoRR, abs/1705.07204, 2017. URL http: //arxiv.org/abs/1705.07204. ",
1174
+ "bbox": [
1175
+ 174,
1176
+ 882,
1177
+ 823,
1178
+ 922
1179
+ ],
1180
+ "page_idx": 8
1181
+ },
1182
+ {
1183
+ "type": "text",
1184
+ "text": "Yandong Wen, Kaipeng Zhang, Zhifeng Li, and Yu Qiao. A discriminative feature learning approach for deep face recognition. In Computer Vision - ECCV 2016 - 14th European Conference, Amsterdam, The Netherlands, October 11-14, 2016, Proceedings, Part VII, pp. 499– 515, 2016. doi: 10.1007/978-3-319-46478-7 31. URL http://dx.doi.org/10.1007/ 978-3-319-46478-7_31. ",
1185
+ "bbox": [
1186
+ 176,
1187
+ 103,
1188
+ 825,
1189
+ 174
1190
+ ],
1191
+ "page_idx": 9
1192
+ },
1193
+ {
1194
+ "type": "text",
1195
+ "text": "A EXPERIMENTAL SETUP ",
1196
+ "text_level": 1,
1197
+ "bbox": [
1198
+ 176,
1199
+ 102,
1200
+ 403,
1201
+ 118
1202
+ ],
1203
+ "page_idx": 10
1204
+ },
1205
+ {
1206
+ "type": "text",
1207
+ "text": "We scale down the image values to [0,1] and don’t perform any data augmentation for MNIST. For CIFAR10, we scale down the image values to [0,1] and subtract per-pixel mean values. We perform $2 4 \\times 2 4$ random crop and random flip on $3 2 \\mathrm { x } 3 2 $ original images. We generate adversarial images with “step ll” after these steps otherwise noted. ",
1208
+ "bbox": [
1209
+ 174,
1210
+ 133,
1211
+ 823,
1212
+ 189
1213
+ ],
1214
+ "page_idx": 10
1215
+ },
1216
+ {
1217
+ "type": "text",
1218
+ "text": "We use stochastic gradient descent (SGD) optimizer with momentum of 0.9, weight decay of 0.0001 and mini batch size of 128. For adversarial training, we generate $k = 6 4$ adversarial examples among 128 images in one mini-batch. We start with a learning rate of 0.1, divide it by 10 at $4 \\mathrm { k }$ and 6k iterations, and terminate training at 8k iterations for MNIST, and $4 8 \\mathrm { k }$ and $7 2 \\mathrm { k }$ iterations, and terminate training at 94k iterations for CIFAR10. 3 ",
1219
+ "bbox": [
1220
+ 174,
1221
+ 195,
1222
+ 825,
1223
+ 266
1224
+ ],
1225
+ "page_idx": 10
1226
+ },
1227
+ {
1228
+ "type": "text",
1229
+ "text": "We also found that initialization affects the training results slightly as in (Kurakin et al., 2017), thus, we pre-train the networks 2 and 10 epochs for MNIST and CIFAR10, and use these as initial starting points for different configurations. We use $m a x \\_ e = 0 . 3 ^ { * } 2 5 5$ and 16 for MNIST and CIFAR10 respectively. ",
1230
+ "bbox": [
1231
+ 174,
1232
+ 272,
1233
+ 825,
1234
+ 329
1235
+ ],
1236
+ "page_idx": 10
1237
+ },
1238
+ {
1239
+ "type": "text",
1240
+ "text": "B MODEL DESCRIPTIONS ",
1241
+ "text_level": 1,
1242
+ "bbox": [
1243
+ 176,
1244
+ 349,
1245
+ 401,
1246
+ 366
1247
+ ],
1248
+ "page_idx": 10
1249
+ },
1250
+ {
1251
+ "type": "text",
1252
+ "text": "We summarize the model names used in this paper in table 5. For ensemble adversarial training, pre-trained networks as in table 7 together with the network being trained are used to generate onestep adversarial examples during training. For cascade adversarial training, pre-trained defended networks as in table 6 are used to generate iter FGSM images, and the network being trained is used to generate one-step adversarial examples during training. ",
1253
+ "bbox": [
1254
+ 174,
1255
+ 381,
1256
+ 825,
1257
+ 450
1258
+ ],
1259
+ "page_idx": 10
1260
+ },
1261
+ {
1262
+ "type": "table",
1263
+ "img_path": "images/6563234a98d2b1b419bf55c8773833ffa6f401037be1b161549906d5475fba30.jpg",
1264
+ "table_caption": [
1265
+ "Table 5: Model descriptions ",
1266
+ "Table 6: Ensemble model description "
1267
+ ],
1268
+ "table_footnote": [],
1269
+ "table_body": "<table><tr><td colspan=\"5\">Initialization</td></tr><tr><td>Dataset</td><td>ResNet</td><td>Group</td><td>Training</td><td>Model</td></tr><tr><td rowspan=\"2\">MNIST</td><td rowspan=\"2\">20-layer</td><td rowspan=\"2\">A</td><td>standard training Kurakin&#x27;s</td><td>R20M R20MK</td></tr><tr><td>Bidirection loss</td><td>R20MB</td></tr><tr><td rowspan=\"10\"></td><td rowspan=\"10\">20-layer</td><td rowspan=\"4\"></td><td>Pivot loss</td><td>R20Mp</td></tr><tr><td> standard training</td><td>R20</td></tr><tr><td>Kurakin&#x27;s</td><td>R20K</td></tr><tr><td>Ensemble training</td><td>R20E</td></tr><tr><td rowspan=\"6\">B</td><td>Bidirection loss Pivot loss</td><td>R20B R20p</td></tr><tr><td>Kurakin&#x27;s &amp; Cascade training</td><td>R20K,C</td></tr><tr><td></td><td></td></tr><tr><td>Pivot loss &amp; Ensemble training</td><td>R20p,E</td></tr><tr><td>Pivot loss &amp; Cascade training</td><td>R20p,C</td></tr><tr><td> standard training</td><td>R202</td></tr><tr><td rowspan=\"7\">CIFAR10 56-layer</td><td rowspan=\"7\"></td><td>C</td><td>Kurakin&#x27;s</td><td>R20K2</td></tr><tr><td>D</td><td>Pivot loss standard training</td><td>R20p2 R203</td></tr><tr><td>E</td><td> standard training</td><td>R204</td></tr><tr><td>F</td><td>Kurakin&#x27;s</td><td>R56K R56p</td></tr><tr><td></td><td>Pivot loss</td><td></td></tr><tr><td>G</td><td>Kurakin&#x27;s</td><td>R56K2</td></tr><tr><td></td><td></td><td></td></tr><tr><td rowspan=\"7\">110-layer</td><td rowspan=\"7\"></td><td rowspan=\"7\">H</td><td> standard training</td><td>R110</td></tr><tr><td>Kurakin&#x27;s</td><td>R110K</td></tr><tr><td>Pivot loss Ensemble training</td><td>R110p R110E</td></tr><tr><td>Kurakin&#x27;s &amp; Cascade training</td><td></td></tr><tr><td></td><td>R110K,C</td></tr><tr><td>Pivot loss &amp; Ensemble training</td><td>R110p,E</td></tr><tr><td>Pivot loss &amp; Cascade training</td><td>R110p,C</td></tr><tr><td rowspan=\"5\"></td><td rowspan=\"5\">I</td><td>standard training Kurakin&#x27;s</td><td>R1102</td></tr><tr><td></td><td>R110k2</td></tr><tr><td>Ensemble training</td><td>R110E2</td></tr><tr><td>Pivot loss</td><td>R110p2</td></tr><tr><td>Kurakin&#x27;s &amp; Cascade training Pivot loss &amp; Ensemble training</td><td>R110k,C2 R110p,E2</td></tr><tr><td rowspan=\"5\"></td><td>J</td><td>Pivot loss &amp; Cascade training</td><td>R110p,C2</td></tr><tr><td></td><td>standard training</td><td>R1103</td></tr><tr><td>K</td><td>standard training</td><td>R1104</td></tr><tr><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td></tr></table>",
1270
+ "bbox": [
1271
+ 209,
1272
+ 130,
1273
+ 789,
1274
+ 736
1275
+ ],
1276
+ "page_idx": 11
1277
+ },
1278
+ {
1279
+ "type": "table",
1280
+ "img_path": "images/61ea47e7a72ef68e291fac78da5b31bedcb666f76f13ac434011d7fd2ae6f1fe.jpg",
1281
+ "table_caption": [
1282
+ "Table 7: Cascade model description "
1283
+ ],
1284
+ "table_footnote": [],
1285
+ "table_body": "<table><tr><td>Ensemble models</td><td>Pre-trained models</td></tr><tr><td>R20E,R20p,E,R110E,R110P,E R110E2,R110P,E2</td><td>R203,R110g R204,R1104</td></tr></table>",
1286
+ "bbox": [
1287
+ 305,
1288
+ 768,
1289
+ 692,
1290
+ 820
1291
+ ],
1292
+ "page_idx": 11
1293
+ },
1294
+ {
1295
+ "type": "table",
1296
+ "img_path": "images/4d5bc4d9e93eb2629ea11b02196b809f6a3f4f5abfad465b7319e8a39cae28f2.jpg",
1297
+ "table_caption": [],
1298
+ "table_footnote": [],
1299
+ "table_body": "<table><tr><td>Cascade models</td><td>Pre-trained model</td></tr><tr><td>R20K,c,R20p,C</td><td>R20p</td></tr><tr><td>R110K,c,R110p,C</td><td>R110p</td></tr><tr><td>R110K,c2,R110P,C2</td><td>R110p2</td></tr></table>",
1300
+ "bbox": [
1301
+ 344,
1302
+ 854,
1303
+ 651,
1304
+ 921
1305
+ ],
1306
+ "page_idx": 11
1307
+ },
1308
+ {
1309
+ "type": "image",
1310
+ "img_path": "images/a63d4cd60c68a6ff53d587a7bfc58f89eb11f682c0bbc103d1fd3a001a954254.jpg",
1311
+ "image_caption": [
1312
+ "Figure 7: Argument to the softmax vs. $\\epsilon$ in test time. “step ll”, “step FGSM” and ”random sign” methods were used to generate test-time adversarial images. Arguments to the softmax were measured by changing $\\epsilon$ for each test method and averaged over randomly chosen 128 images from CIFAR10 test-set. Blue line represents true class and the red line represents mean of the false classes. Shaded region shows $\\pm \\nobreakspace 1 \\nobreakspace$ standard deviation of each line. "
1313
+ ],
1314
+ "image_footnote": [],
1315
+ "bbox": [
1316
+ 173,
1317
+ 145,
1318
+ 826,
1319
+ 570
1320
+ ],
1321
+ "page_idx": 12
1322
+ },
1323
+ {
1324
+ "type": "text",
1325
+ "text": "We draw average value of the argument to the softmax layer for the true class and the false classes to visualize how the adversarial training works as in figure 7. Standard training, as expected, shows dramatic drop in the values for the true class as we increase $\\epsilon$ in “step ll” or “step FGSM direction. With adversarial training, we observe that the value drop is limited at small $\\epsilon$ and our method even increases the value in certain range upto ${ \\epsilon } { = } 1 0$ . Note that adversarial training is not the same as the gradient masking.As illustrated in figure 7, it exposes gradient information, however, quickly distort gradients along the sign of the gradient (“step ll” or “step FGSM) direction. We also observe improved results (broader margins than baseline) for “random sign” added images even though we didn’t inject random sign added images during training. Overall shape of the argument to the softmax layer in our case becomes smoother than Kurakin’s method, suggesting our method is good for pixel level regularization. Even though actual value of the embeddings for the true class in our case is smaller than that in Kurakin’s, the standard deviation of our case is less than Kurakin’s, making better margin between the true class and false classes. ",
1326
+ "bbox": [
1327
+ 174,
1328
+ 667,
1329
+ 825,
1330
+ 848
1331
+ ],
1332
+ "page_idx": 12
1333
+ },
1334
+ {
1335
+ "type": "image",
1336
+ "img_path": "images/bb0f617516f1c753274ff6e6c797bcd0df9ac1a88e8bee55ff5efc872dab5a74.jpg",
1337
+ "image_caption": [
1338
+ "Figure 8: Averaged Pearson’s correlation coefficient between the gradients w.r.t. two images. Correlation were measured by changing $\\epsilon$ for each adversarial image and averaged over randomly chosen 128 images from CIFAR10 test-set. Shaded region represents $\\pm \\ : 0 . 5$ standard deviation of each line. "
1339
+ ],
1340
+ "image_footnote": [],
1341
+ "bbox": [
1342
+ 173,
1343
+ 169,
1344
+ 825,
1345
+ 304
1346
+ ],
1347
+ "page_idx": 13
1348
+ },
1349
+ {
1350
+ "type": "text",
1351
+ "text": "We observe accuracies for the “step FGSM” adversarial images become higher than those for the clean images (“label leaking” phenomenon) by training with “step FGSM” examples as in (Kurakin et al., 2017). Interestingly, we also observe “label leaking” phenomenon even without providing true labels for adversarial images generation. We argue that “label leaking” is a natural result of the adversarial training. ",
1352
+ "bbox": [
1353
+ 174,
1354
+ 372,
1355
+ 825,
1356
+ 444
1357
+ ],
1358
+ "page_idx": 13
1359
+ },
1360
+ {
1361
+ "type": "text",
1362
+ "text": "To understand the nature of adversarial training, we measure correlation between gradients w.r.t. different images (i.e. clean vs. adversarial) as a measure of error surface similarity. We measure correlation between gradients w.r.t. (1) clean vs. “step ll” image, (2) clean vs. “step FGSM” image, (3) clean vs. “random sign” added image, and (4) “step ll” image vs. “step FGSM” image for three trained networks (a) R20, (b) $\\mathsf { R } 2 0 _ { K }$ and (c) ${ \\mathrm { R } } 2 0 _ { P }$ (Ours) in table 5. Figure 8 draws average value of correlations for each case. ",
1363
+ "bbox": [
1364
+ 173,
1365
+ 450,
1366
+ 825,
1367
+ 534
1368
+ ],
1369
+ "page_idx": 13
1370
+ },
1371
+ {
1372
+ "type": "text",
1373
+ "text": "Meaning of the correlation: In order to make strong adversarial images with “step FGSM” method, correlation between the gradient w.r.t. the clean image and the gradient w.r.t. its corresponding adversarial image should remain high since the “step FGSM” method only use the gradient w.r.t. the clean image $( \\epsilon { = } 0 )$ . Lower correlation means perturbing the adversarial image at $\\epsilon$ further to the gradient (seen from the clean image) direction is no longer efficient. ",
1374
+ "bbox": [
1375
+ 174,
1376
+ 541,
1377
+ 825,
1378
+ 611
1379
+ ],
1380
+ "page_idx": 13
1381
+ },
1382
+ {
1383
+ "type": "text",
1384
+ "text": "Results of adversarial training: We observe that (1) and (2) become quickly lower than (3) as $\\epsilon$ increases. This means that, when we move toward the steepest (gradient) direction on the error surface, gradient is more quickly uncorrelated with the gradient w.r.t. the clean image than when we move to random direction. As a result of adversarial training, this uncorrelation is observed at a lower $\\epsilon$ making one-step attack less efficient even with small perturbation. (1), (2) and (3) for our case are slightly lower than Kurakin’s method at the same $\\epsilon$ which means that our method is better at defending one-step attacks than Kurakin’s. ",
1385
+ "bbox": [
1386
+ 173,
1387
+ 617,
1388
+ 825,
1389
+ 715
1390
+ ],
1391
+ "page_idx": 13
1392
+ },
1393
+ {
1394
+ "type": "text",
1395
+ "text": "Error surface similarity between “step ll” and “step FGSM” images: We also observe (4) remains high with higher $\\epsilon$ for all trained networks. This means that the error surface (gradient) of the “step ll” image and that of its corresponding “step FGSM” image resemble each other. That is the reason why we get the robustness against “step FGSM” method only by training with “step ll” method and vice versa. (4) for our case is slightly higher than Kurakin’s method at the same $\\epsilon$ and that means our similarity learning tends to make error surfaces of the adversarial images with “step ll” and “step FGSM” method to be more similar. ",
1396
+ "bbox": [
1397
+ 173,
1398
+ 722,
1399
+ 825,
1400
+ 819
1401
+ ],
1402
+ "page_idx": 13
1403
+ },
1404
+ {
1405
+ "type": "text",
1406
+ "text": "Analysis of label leaking phenomenon: Interestingly, (2) becomes slightly negative in certain range $1 < \\epsilon < 3$ for Kurakin’s, and $1 < \\epsilon < 4$ for Pivot (Ours) ) and this could be the possible reason for “label leaking” phenomenon. For example, let’s assume that we have a perturbed image (by “step FGSM” method) at $\\epsilon$ where the correlation between the gradients w.r.t. that image and the corresponding clean image is negative. Further increase of $\\epsilon$ with the gradient (w.r.t. the clean image) direction actually decreases the loss resulting in increased accuracy (label leaking phenomenon). Due to the error surface similarity between “step ll” and “step FGSM” images and this negative correlation effect, however, label leaking phenomenon can always happen for the networks trained with one-step adversarial examples. ",
1407
+ "bbox": [
1408
+ 173,
1409
+ 827,
1410
+ 825,
1411
+ 924
1412
+ ],
1413
+ "page_idx": 13
1414
+ },
1415
+ {
1416
+ "type": "text",
1417
+ "text": "",
1418
+ "bbox": [
1419
+ 173,
1420
+ 103,
1421
+ 825,
1422
+ 132
1423
+ ],
1424
+ "page_idx": 14
1425
+ },
1426
+ {
1427
+ "type": "text",
1428
+ "text": "E ADDITIONAL BLACK BOX ATTACK RESULTS ",
1429
+ "text_level": 1,
1430
+ "bbox": [
1431
+ 173,
1432
+ 151,
1433
+ 578,
1434
+ 170
1435
+ ],
1436
+ "page_idx": 14
1437
+ },
1438
+ {
1439
+ "type": "table",
1440
+ "img_path": "images/b57587db05d54f989662ee35c8d48e2d69d44fda8d60a095327d85851b575a1a.jpg",
1441
+ "table_caption": [
1442
+ "Table 8: CIFAR10 test results $( \\% )$ under black box attacks between the network with the same initialization $\\scriptstyle \\left( \\epsilon = 1 6 \\right) \\}$ "
1443
+ ],
1444
+ "table_footnote": [],
1445
+ "table_body": "<table><tr><td rowspan=\"2\">Target</td><td colspan=\"3\">Source: step_FGSM</td><td colspan=\"3\">Source: iter_FGSM</td></tr><tr><td>R20</td><td>R20K</td><td>R20p</td><td>R20</td><td>R20K</td><td>R20p</td></tr><tr><td>R20</td><td>12.2</td><td>27.4</td><td>27.5</td><td>0.0</td><td>45.9</td><td>44.7</td></tr><tr><td>R20K</td><td>65.7</td><td>81.5</td><td>81.8</td><td>51.5</td><td>0.0</td><td>18.2</td></tr><tr><td>R20p</td><td>58.1</td><td>89.3</td><td>91.7</td><td>48.9</td><td>13.4</td><td>0.0</td></tr></table>",
1446
+ "bbox": [
1447
+ 299,
1448
+ 229,
1449
+ 699,
1450
+ 318
1451
+ ],
1452
+ "page_idx": 14
1453
+ },
1454
+ {
1455
+ "type": "text",
1456
+ "text": "Table 8 shows that black box attack between trained networks with the same initialization tends to be more successful than that between networks with different initialization as explained in (Kurakin et al., 2017). ",
1457
+ "bbox": [
1458
+ 174,
1459
+ 337,
1460
+ 823,
1461
+ 378
1462
+ ],
1463
+ "page_idx": 14
1464
+ },
1465
+ {
1466
+ "type": "table",
1467
+ "img_path": "images/fe92bfdf334b84af237151b801dbe6b25b9ef4b200fd5ece97ae0d14392d78bc.jpg",
1468
+ "table_caption": [
1469
+ "Table 9: CIFAR10 test results $( \\% )$ under black box attacks for ${ \\epsilon } { = } 1 6$ . {Target and Source networks are switched from the table 1} "
1470
+ ],
1471
+ "table_footnote": [],
1472
+ "table_body": "<table><tr><td rowspan=\"2\">Target</td><td colspan=\"3\">Source: step-FGSM</td><td colspan=\"3\">Source: iter_FGSM</td></tr><tr><td>R20</td><td>R20K</td><td>R20p</td><td>R20</td><td>R20K</td><td>R20p</td></tr><tr><td>R202</td><td>17.9</td><td>33.9</td><td>34.5</td><td>4.1</td><td>54.8</td><td>54.3</td></tr><tr><td>R20K2</td><td>65.0</td><td>84.6</td><td>84.5</td><td>61.2</td><td>25.3</td><td>30.4</td></tr><tr><td>R20p2</td><td>66.4</td><td>88.2</td><td>87.2</td><td>61.6</td><td>27.7</td><td>36.1</td></tr></table>",
1473
+ "bbox": [
1474
+ 295,
1475
+ 435,
1476
+ 702,
1477
+ 521
1478
+ ],
1479
+ "page_idx": 14
1480
+ },
1481
+ {
1482
+ "type": "text",
1483
+ "text": "In table 9, our method $( \\mathsf { R } 2 0 _ { P 2 } )$ is always better at one-step and iterative black box attack from defended networks $( \\mathsf { R } 2 0 _ { K } , \\mathsf { R } 2 0 _ { P } )$ and undefended network (R20) than Kurakin’s method $( { \\bf R } 2 0 _ { B { \\bf 2 } } )$ . However, it is hard to tell which method is better than the other one as explained in the main paper. ",
1484
+ "bbox": [
1485
+ 178,
1486
+ 540,
1487
+ 821,
1488
+ 582
1489
+ ],
1490
+ "page_idx": 14
1491
+ },
1492
+ {
1493
+ "type": "table",
1494
+ "img_path": "images/19b43217da7077fd6e2e2eff14dc27cd85d13f61c08c35e6d2732ef97907066a.jpg",
1495
+ "table_caption": [
1496
+ "Table 10: CIFAR10 test results $( \\% )$ for cascade networks under black box attacks for ${ \\epsilon } { = } 1 6$ . {Target and Source: Please see the model descriptions in Appendix B.} "
1497
+ ],
1498
+ "table_footnote": [],
1499
+ "table_body": "<table><tr><td rowspan=\"2\">Target</td><td colspan=\"7\">Source: iter_FGSM</td></tr><tr><td>R110</td><td>R110K</td><td>R110E</td><td>R110p</td><td>R110K,C</td><td>R110p,E</td><td>R110p,C</td></tr><tr><td>R110K2</td><td>80.5</td><td>72.7</td><td>49.3</td><td>68.0</td><td>49.6</td><td>41.0</td><td>67.9</td></tr><tr><td>R110E2</td><td>82.7</td><td>59.1</td><td>39.5</td><td>59.6</td><td>51.5</td><td>40.3</td><td>69.6</td></tr><tr><td>R110p2 (Ours)</td><td>80.3</td><td>75.9</td><td>54.2</td><td>72.2</td><td>54.9</td><td>44.3</td><td>72.4</td></tr><tr><td>R110k,C2 (Ours)</td><td>62.1</td><td>74.7</td><td>61.5</td><td>72.3</td><td>46.5</td><td>39.0</td><td>67.9</td></tr><tr><td>R110p,E2 (Ours)</td><td>81.5</td><td>79.0</td><td>50.0</td><td>77.3</td><td>56.9</td><td>45.5</td><td>75.2</td></tr><tr><td>R110p,c2 (Ours)</td><td>72.2</td><td>76.4</td><td>60.6</td><td>73.8</td><td>51.0</td><td>40.9</td><td>72.0</td></tr></table>",
1500
+ "bbox": [
1501
+ 210,
1502
+ 638,
1503
+ 787,
1504
+ 766
1505
+ ],
1506
+ "page_idx": 14
1507
+ },
1508
+ {
1509
+ "type": "text",
1510
+ "text": "In table 10, we show black box attack accuracies with the source and the target networks switched from the table 4. We also observe that networks trained with both low-level similarity learning and cascade/ensemble adversarial training $( \\mathrm { R } 1 1 0 _ { P , C 2 }$ , $\\mathbf { R } 1 1 0 _ { P , E 2 } )$ show better worst-case performance than other networks. Overall, iter FGSM images crafted from ensemble model families $( \\mathrm { R } 1 1 0 _ { E }$ , $\\operatorname { R 1 1 0 } _ { P , E } )$ remain strong on the defended networks. ",
1511
+ "bbox": [
1512
+ 173,
1513
+ 784,
1514
+ 825,
1515
+ 854
1516
+ ],
1517
+ "page_idx": 14
1518
+ },
1519
+ {
1520
+ "type": "image",
1521
+ "img_path": "images/ab53c2fe8209182e38731b9aaaef260818586606f8ae3b9ef8464c393141354e.jpg",
1522
+ "image_caption": [
1523
+ "Figure 9: Cumulative distribution function vs. $\\epsilon$ for 100 test adversarial examples generated by CW $L _ { \\infty }$ attack. Lower CDF value for a fixed $\\epsilon$ means the better defense. "
1524
+ ],
1525
+ "image_footnote": [],
1526
+ "bbox": [
1527
+ 173,
1528
+ 147,
1529
+ 825,
1530
+ 290
1531
+ ],
1532
+ "page_idx": 15
1533
+ },
1534
+ {
1535
+ "type": "text",
1536
+ "text": "Carlini and Wagner (CW) $L _ { \\infty }$ attack solves the following optimization problem for every input $\\boldsymbol { X }$ ",
1537
+ "bbox": [
1538
+ 173,
1539
+ 343,
1540
+ 820,
1541
+ 359
1542
+ ],
1543
+ "page_idx": 15
1544
+ },
1545
+ {
1546
+ "type": "equation",
1547
+ "img_path": "images/74e24b878b8dc6c29f71fb22a4989b093871e569b0819a2be05ce3a62d8f184a.jpg",
1548
+ "text": "$$\nm i n i m i z e \\quad c \\cdot f ( X + \\pmb { \\delta } ) + \\sum _ { i } [ ( | \\delta _ { i } | - \\tau ) ^ { + } ]\n$$",
1549
+ "text_format": "latex",
1550
+ "bbox": [
1551
+ 346,
1552
+ 364,
1553
+ 651,
1554
+ 398
1555
+ ],
1556
+ "page_idx": 15
1557
+ },
1558
+ {
1559
+ "type": "text",
1560
+ "text": "where, the function $f$ is defined such that attack is success if and only if $f ( X + \\delta ) < 0 , \\mathfrak { c }$ δ is the target perturbation defined as $X ^ { a d v } - X$ , $c$ is the parameter to control the relative weight of function $f$ in the total cost function, and $\\tau$ is the control threshold used to penalize any terms that exceed $\\tau$ . ",
1561
+ "bbox": [
1562
+ 174,
1563
+ 424,
1564
+ 825,
1565
+ 467
1566
+ ],
1567
+ "page_idx": 15
1568
+ },
1569
+ {
1570
+ "type": "text",
1571
+ "text": "Since CW $L _ { \\infty }$ attack is computationally expensive, we only use 100 test examples (10 examples per each class). We search adversarial example $X ^ { a d v }$ with $c \\in \\{ 0 . 1 , 0 . 2 , 0 . 5 , 1 , 2 , 5 , 1 0 , 2 0 \\}$ and $\\tau \\in \\ \\{ 0 . 0 2 , 0 . 0 4 , . . . , 0 . 6 \\}$ for MNIST and $c ~ \\in ~ \\{ 0 . 1 , 0 . 3 , 1 , 3 , 1 0 , 3 0 , 1 0 0 \\}$ and $\\tau \\_ { \\in }$ $\\{ 0 . 0 0 1 , 0 . 0 0 \\dot { 2 } , . . . , 0 . 0 1 , 0 . 0 1 2 , . . . , 0 . 0 2 , 0 . 0 2 4 , . . . , 0 . 0 4 , 0 . 0 4 8 , . . . , 0 . 0 8 \\}$ for CIFAR10. We use Adam optimizer with an initial learning rate of $0 . 0 1 / c$ since we found constant initial learning rate for $c \\cdot f ( \\pmb { X } + \\pmb { \\delta } )$ term is critical for successful adversarial images generation. We terminate the search after 2,000 iterations for each $\\boldsymbol { X }$ , $c$ and $\\tau$ . If $f ( X + \\delta ) < 0$ and the resulting $| | \\delta | | _ { \\infty }$ is lower than the current best distance, we update $X ^ { a d v }$ . ",
1572
+ "bbox": [
1573
+ 173,
1574
+ 472,
1575
+ 825,
1576
+ 585
1577
+ ],
1578
+ "page_idx": 15
1579
+ },
1580
+ {
1581
+ "type": "text",
1582
+ "text": "Figure 9 shows cumulative distribution function of $\\epsilon$ for 100 successful adversarial examples per each network. We report the number of adversarial examples with $\\epsilon > 0 . 3 ^ { * } 2 5 5$ for MNIST and that with $\\epsilon > 2$ or 4 for CIFAR10. As seen from this figure, our approaches provide robust defense against CW $L _ { \\infty }$ attack compared to other approaches. ",
1583
+ "bbox": [
1584
+ 173,
1585
+ 590,
1586
+ 825,
1587
+ 647
1588
+ ],
1589
+ "page_idx": 15
1590
+ }
1591
+ ]
parse/train/HyRVBzap-/HyRVBzap-_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HyRVBzap-/HyRVBzap-_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/RO4DM85Z4P7/RO4DM85Z4P7.md ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # XIRL: Cross-embodiment Inverse Reinforcement Learning
2
+
3
+ Kevin Zakka1,3⇤, Andy $\mathbf { Z e n g } ^ { 2 }$ , Pete Florence2, Jonathan Tompson2, Jeannette $\mathbf { B o h g } ^ { 1 }$ , and Debidatta Dwibedi2 1Stanford University, 2Robotics at Google, 3UC Berkeley
4
+
5
+ Abstract: We investigate the visual cross-embodiment imitation setting, in which agents learn policies from videos of other agents (such as humans) demonstrating the same task, but with stark differences in their embodiments – shape, actions, end-effector dynamics, etc. In this work, we demonstrate that it is possible to automatically discover and learn vision-based reward functions from cross-embodiment demonstration videos that are robust to these differences. Specifically, we present a self-supervised method for Crossembodiment Inverse Reinforcement Learning (XIRL) that leverages temporal cycleconsistency constraints to learn deep visual embeddings that capture task progression from offline videos of demonstrations across multiple expert agents, each performing the same task differently due to embodiment differences. Prior to our work, producing rewards from self-supervised embeddings typically required alignment with a reference trajectory, which may be difficult to acquire under stark embodiment differences. We show empirically that if the embeddings are aware of task progress, simply taking the negative distance between the current state and goal state in the learned embedding space is useful as a reward for training policies with reinforcement learning. We find our learned reward function not only works for embodiments seen during training, but also generalizes to entirely new embodiments. Additionally, when transferring real-world human demonstrations to a simulated robot, we find that XIRL is more sample efficient than current best methods. Qualitative results, code, and datasets are available at https://x-irl.github.io
6
+
7
+ Keywords: inverse reinforcement learning, imitation learning, self-supervised learning
8
+
9
+ # 1 Introduction
10
+
11
+ The ability to learn new tasks from third-person demonstrations holds the potential to enable robots to leverage the vast quantities of tutorial videos that can be gleaned from the world-wide web (e.g., YouTube videos). However, distilling diverse and unstructured videos into motor skills with vision-based policies can be daunting – as the videos themselves are often not only captured from different camera viewpoints in different environments, but also with different experts that may use different tools, objects, or strategies to perform the same task. Perhaps most critically, there often exists a clear embodiment gap between the human expert demonstrator, and the robot hardware that executes the learned policies. One approach to close this gap is to learn a mapping between the human and robot embodiment [1], which is a non-trivial intermediate problem in itself.
12
+
13
+ Despite considerable progress in learning policies with paired observations and actions (e.g., collected via teleoperation) [2, 3], much less work has been done in getting robots to learn policies from tasks defined only by third-person observations of demonstrations [4, 5, 6]. This is a surprisingly challenging problem, as different embodiments are likely to use unique strategies that suit them and allow them to make progress on a given task. For example, if asked to “place five pens into a cup”, a human hand is likely to scoop up all pens before slipping them into the cup, whereas a two-fingered gripper might instead need to pick and place each pen individually. Both strategies complete the task, but generate different state-action trajectories. In this setting, it may be difficult to acquire labeled frame-to-frame correspondences between expert demonstration videos and learned embodiments [6], particularly across a multitude of embodiments or experts. The approach we investigate instead is whether we can successfully learn tasks through a learned notion of task progress that is invariant to the embodiment performing the task.
14
+
15
+ ![](images/80a7e6efe913971b206ca18932e755e85617cbe2190ac680c41ec9b31c2e8a60.jpg)
16
+ Figure 1. Cross-embodiment Inverse Reinforcement Learning. We learn embodiment-invariant visual representations from offline video demonstrations (stick agents on the left) using TCC [7], then use the trained encoder to generate embodiment-invariant visual reward functions that can be used to learn policies on new embodiments (gripper on the right) with reinforcement learning.
17
+
18
+ In this work, we propose to enable agents to imitate video demonstrations of experts – including ones with different embodiments – by using a task-specific, embodiment-invariant reward formulation trained via temporal cycle-consistency (TCC) [7]. We demonstrate how we can leverage an encoder trained with TCC to define dense rewards for downstream reinforcement learning (RL) policies via simple distances in the learned embedding space. Simulated experiments across four different embodiments show that these learned rewards are capable of generalizing to new embodiments, enabling unseen agents to learn the task via reinforcement, and surprisingly in some cases, exceeding the sample efficiency of the same agent learned with ground truth sparse rewards. We also demonstrate the effectiveness of our approach for learning robot policies using human demonstrations on the State Pusher environment from [6], where our reward is first learned on real-world human demonstrations, then used to teach a Sawyer arm how to perform the task in simulation.
19
+
20
+ Our contributions are as follows: (i) We introduce Cross-embodiment Inverse Reinforcement Learning (XIRL), an effective, label-free framework for tackling cross-embodiment visual imitation learning. Our core contribution is to use self-supervised learning on third-person demonstration videos to define dense reward functions amenable for downstream reinforcement learning policies, (ii) Along with XIRL, we release a cross-embodiment imitation learning benchmark, X-MAGICAL, which features multiple simulated agents with different embodiments performing the same manipulation task, including one thousand expert demonstrations for each agent, (iii) We show that XIRL significantly outperforms alternative methods on both the X-MAGICAL benchmark and the human-to-robot transfer benchmark from [6], and discuss our observations, which point to interesting areas for future research, (iv) Finally, we introduce a real-world dataset, X-REAL (Cross-embodiment Real demonstrations), of a manipulation task performed with nine different embodiments, which can be used to evaluate cross-embodiment reward learning methods2.
21
+
22
+ # 2 Related Work
23
+
24
+ Traditional formulations of imitation learning [8, 1, 9] assume access to a corpus of expert demonstration data which includes both state and action trajectories of the expert policy. In the context of third-person imitation learning, including when learning from expert agents with different embodiments, obtaining access to ground-truth actions is difficult or impossible3.
25
+
26
+ Inferring expert actions. To address this issue, several approaches either try to infer expert actions [10, 11, 12] – for example by training an inverse dynamics model on agent interaction data [10] – or employ forward prediction on the next state to imitate the expert without direct action supervision [13]. While these methods successfully address learning from observation-only demonstrations, they either do not support skill transfer to different policy embodiments at all, or they cannot take advantage of multiple embodiments in order to improve generalization to unseen policy configurations. We explicitly address these problems in this work.
27
+
28
+ Imitation via learned reward functions. In contrast to imitation via supervised methods, such as BCO [10], a recent body of work [4, 5, 14, 6, 15] has focused on learning reward functions from expert video data and then training RL policies to maximize this reward. In [4], the authors combine ImageNet pre-trained visual features with an L2-norm distance reward to match policy and expert observations in a latent feature space. In their follow-up work [5], the reward is computed in a viewpoint-invariant representation that is self-supervised on video data. While both these methods are compelling in their use of cheap unlabeled data to learn invariant rewards, the use of a time index as a heuristic for defining weak correspondence is a constraining limitation for tasks that need to be executed at different speeds, or are not strictly monotonic (e.g., have ambiguous sub-task ordering). In [14] a dense reward is learned via unsupervised learning on YouTube data and the authors make no assumption about time alignment. However, in their work, the expert and learned policy are executed in the same domain and embodiment, an assumption we relax in our work. Framed in a multi-task learning setting, [16] propose training policies with morphologically different embodiments first on a similar set of proxy tasks, in order to learn a latent space to map between domains, and then sharing skills on a held-out task from one policy to another. A time-index heuristic is used to define a metric reward when performing RL training of the new task. In our work, the learned embedding finds correspondences in a fully-unsupervised fashion, without the need for such strict time alignment. In [17], a small sub-set of states is human labeled for goal success and a convolutional network is then trained to detect successful task completion from image observations, where on-policy samples are used as negatives for the classifier. By contrast, our learned embedding encodes task progress in its latent representation without the use of expensive human labels.
29
+
30
+ Imitation via domain adaptation. An additional category of approaches to third-person imitation learning are those that perform domain adaptation of expert observations [18, 19, 20, 21]. For instance, in [18] a CycleGAN [22] architecture is used to perform pixel-level image-to-image translation between policy domains, which is then used to construct a reward function for a model-based RL algorithm. A similar model-free approach is proposed in [19]. In [20], a generative model is used to predict robot high-level sub-goals conditioned on a third-person demonstration video, and a lower-level control policy is trained in a task-agnostic manner. Similarly, [21] uses high level task conditioning from zero-shot transfer of expert demonstrations, but they use KL matching to perform both high and low-level imitation. In contrast to these methods, the unsupervised TCC alignment in this work avoids performing explicit domain adaptation or pixel-level image translation by instead learning a robust and invariant feature space in a fully offline fashion.
31
+
32
+ Reinforcement learning with demonstrations. Recent work in offline-reinforcement learning [6] explicitly tackles the problem of policy embodiment and domain shift. Their method, Reinforcement Learning from Videos (RLV), uses a labelled collection of expert-policy state pairs in conjunction with adversarial training to learn an inverse dynamics model jointly optimized with the policy. In contrast, we avoid the limitation of collecting human-labeled dense state correspondences by using a self-supervised algorithm (i.e., TCC [7]) which uses cycle-consistency to automatically learn the correspondence between states of two domains. We also show that this formulation improves generalization to unseen embodiments. Since the problem setup is similar to ours, we also compare to their method as a baseline.
33
+
34
+ # 3 Approach
35
+
36
+ Our overall XIRL framework (Figure 1) addresses the cross-embodiment visual imitation problem (Section 3.1). The framework consists of first using TCC to self-supervise embodiment-invariant visual representations (Section 3.2), then using a novel embodiment-invariant visual reward function (Section 3.3) to perform cross-embodiment visual imitation via reinforcement learning (Section 3.4).
37
+
38
+ # 3.1 Problem Formulation
39
+
40
+ Our objective is to extract an agent-invariant definition of a task, via a learned reward function, from a dataset of videos of separate agents performing the same task. In particular, we are interested in agents that may solve the task in entirely different ways due to differences in their end-effector, shapes, dynamics, etc., which we refer to as embodiment differences. For example, consider how differently a vacuum gripper and a parallel-jaw gripper will grasp an object as a result of their respective end-effectors. Such a setup is quite common in robotic imitation learning, where we might have access to observation data of humans demonstrating a task, but want to teach a robot to perform it. It is very likely that the way the human executes the task will diverge from how the robot would execute it.
41
+
42
+ We define a dataset of multiple agents performing the same task $T$ as $\textstyle D = \bigcup _ { i = 1 } ^ { n } D _ { i }$ , where $D _ { i }$ is an agent-specific dataset containing observations of only agent $i$ performing task $T$ . Each agent’s dataset $D _ { i }$ is a collection of videos defined as ${ { D } _ { i } } = \{ v _ { i } ^ { 1 } , v _ { i } ^ { 2 } . . . v _ { i } ^ { K } \}$ , where $v _ { i } ^ { j }$ represents the video of the $j ^ { t h }$ demonstration of agent $i$ successfully performing the task $T$ . We would like to highlight that $D$ only contains observation data, i.e., it does not store the actions taken by the respective agents. We use self-supervised representation learning techniques to learn task-specific representations from this dataset.
43
+
44
+ ![](images/d83a8d2ebcb5bc6f49888dea08e985c5543dca5689bfd625916e473bff58dfa5.jpg)
45
+ Figure 2. Difference in state distributions of the across different embodiments performing the same task in X-MAGICAL (Section 4.1).
46
+
47
+ # 3.2 Representation Learning
48
+
49
+ In this work, we use TCC [7] to learn task-specific representations in a self-supervised way. The method has been shown to learn useful representations on videos of the same action for temporally fine-grained downstream tasks. In their paper, the authors show that TCC representations can predict frame-level task progress, such as predicting how much water is in a cup during pouring, without requiring any human annotations. Task progress can provide dense signals for learning a new task and we would like to bake this property into our learned reward. Another advantage of TCC is that it does not require supervision for frame-level alignment (i.e., which frames in two videos correspond to each other). Such frame-to-frame correspondences are required by a prior method, RLV [6], to achieve successful reinforcement learning on the considered tasks, but we would like to avoid this type of manual supervision.
50
+
51
+ We train an image encoder $\phi$ , that ingests an image $I$ and returns an embedding vector $\phi ( I )$ , using TCC. TCC assumes that there exist semantic temporal correspondences between two video sequences, even though they are not labeled and the actions may be executed at different speeds. Note that in our case, the assumption holds since all sequences in our dataset originate from the same task. Furthermore, even if two different agents accomplish the task very differently, there will be a common set of states or frames that will temporally correspond. When we apply the TCC loss, we compare frames of one agent performing the task with frames from another, and search for temporal similarities in how both execute the task. By performing multiple such comparisons and cycling-back (described in the next paragraph), TCC encodes task progress in its latent representation, a property that is useful for learning task-specific, yet embodiment-invariant reward functions. For completeness, we describe the training technique below.
52
+
53
+ We define a dataset $D _ { \mathrm { a l l } } = \{ v _ { 1 } , v _ { 2 } . . . v _ { N } \}$ that contains the videos of all agents executing the same task $T$ . We are able to merge the datasets of different agents since TCC does not require embodiment labels (i.e., IDs) during training. We first sample a random batch of videos and embed all their frames using the aforementioned image encoder $\phi$ . For each video $v _ { i }$ , this results in a sequence of embeddings $V _ { i } { = } \{ \phi ( v _ { i } ^ { 1 } ) , \phi ( v _ { i } ^ { 2 } ) { \ldots } , \phi ( v _ { i } ^ { L _ { i } } ) \}$ , where $L _ { i }$ is the length of the $i ^ { t h }$ video. From this mini-batch of sequences of video frame embeddings, we choose a pair of sequences $V _ { i }$ and $V _ { j }$ and compute their TCC loss. In particular, we randomly sample a frame embedding from sequence $V _ { i } -$ say $V _ { i } ^ { t }$ corresponding to the $t ^ { t h }$ frame of video $v _ { i }$ – and compute the soft nearest-neighbor of $V _ { i } ^ { t }$ in sequence $V _ { j }$ in the embedding space as follows:
54
+
55
+ $$
56
+ \widetilde { V _ { i j } ^ { t } } = \sum _ { k } ^ { L _ { j } } \alpha _ { k } V _ { j } ^ { k } , \quad \mathrm { w h e r e } \quad \alpha _ { k } = \frac { e ^ { - \| V _ { i } ^ { t } - V _ { j } ^ { k } \| ^ { 2 } } } { \sum _ { k } ^ { L _ { j } } e ^ { - \| V _ { i } ^ { t } - V _ { j } ^ { k } \| ^ { 2 } } }
57
+ $$
58
+
59
+ We then cycle-back [7] to the first sequence $V _ { i }$ by computing the soft-nearest neighbor of $\widetilde { V _ { i j } ^ { t } }$ with all the frames in $V _ { i }$ . The probability of cycling-back to the $k ^ { t h }$ frame in $V _ { i }$ can be computed as:
60
+
61
+ $$
62
+ \beta _ { i j t } ^ { k } = \frac { e ^ { - \| \widetilde { V _ { i j } ^ { t } } - V _ { i } ^ { k } \| ^ { 2 } } } { \sum _ { k } ^ { L _ { i } } e ^ { - \| \widetilde { V _ { i j } ^ { t } } - V _ { i } ^ { k } \| ^ { 2 } } }
63
+ $$
64
+
65
+ The expected frame index we cycle-back to is then $\begin{array} { r } { \mu _ { i j } ^ { t } = \sum _ { k } ^ { L _ { i } } \beta _ { i j t } ^ { k } k } \end{array}$ . Since we know the index of the frame that started the cycle, in this case $t$ , we can minimize the mean-squared (MSE) error loss between $t$ and the closest index retrieved via soft-nearest neighbor, i.e., $\widetilde { V _ { i j } ^ { t } }$ . The loss for a single frame is thus: $L _ { i j } ^ { t } = ( \mu _ { i j } ^ { t } - t ) ^ { 2 }$ . Finally, we minimize the average loss $L$ over all frames in video $v _ { i }$ with all other videos in the dataset $v _ { j }$ , defined as $\begin{array} { r } { L = \sum _ { i j t } L _ { i j } ^ { t } } \end{array}$ .
66
+
67
+ Table 1. Statistics of Demos of the X-MAGICAL Embodiments
68
+
69
+ <table><tr><td>Embodiment</td><td>Mean ± Std.Dev. Demo Length (no. of frames)</td></tr><tr><td>Long-stick</td><td>48.0 ±28.5</td></tr><tr><td>Medium-stick</td><td>59.9 ±27.9</td></tr><tr><td>Short-stick</td><td>81.7 ±35.0</td></tr><tr><td>Gripper</td><td>110.8 ±39.8</td></tr></table>
70
+
71
+ # 3.3 Reward Function
72
+
73
+ Once the encoder $\phi$ has been trained on demonstrations of different agents performing the same task $T$ , we want to use it to transfer information about the task from one agent to another. We do this by leveraging $\phi$ to generate rewards via distances to goal observations in the learned embedding space. Specifically, we define the goal embedding $g$ as the mean embedding of the last frame of all the demonstration videos in our offline dataset $D _ { \mathrm { a l l } }$ . Concretely, $\scriptstyle g = \sum _ { i = 1 } ^ { N } \phi ( v _ { i } ^ { L _ { i } } ) \neq N$ , where $L _ { i }$ is the length of video $v _ { i }$ . Our reward $r$ then is the scaled negative distance of the current state embedding to the goal embedding $g$ i.e., $r ( s ) =$ $- 1 / \kappa \cdot \| \phi ( s ) - g \| _ { 2 } ^ { 2 }$ , where $\phi ( s )$ is the state embedding at the current timestep and $\kappa$ is a scale parameter that ensures the distances are in a range amenable for training reinforcement learning algorithms [23]. We found it effective to set $\kappa$ to be the average distance of the first frame’s embedding to the goal embedding for all the demonstrations in the dataset. Defining $r$ in this manner gives us several advantages: (a) it is dense, encoding both task completion and task progress, (b) it does not require any correspondence with a reference trajectory [5, 14] and (c) it sidesteps the need for a finite library of reference trajectories, unlike prior work [5, 16] that define time-indexed rewards relative to some reference trajectory. Thus, agents with trajectories of varying lengths (due to embodiment-specific constraints) can efficiently leverage this reward because the learned encoder can map different strategies to a common notion of task progress.
74
+
75
+ # 3.4 Reinforcement Learning
76
+
77
+ Using the pre-trained frozen encoder $\phi$ , we define a Markov Decision Process (MDP) for any agent as the tuple $\langle \bar { \boldsymbol { S } } , \boldsymbol { A } , \boldsymbol { P } , \boldsymbol { r } \rangle$ where $s$ is the set of possible states, $\mathcal { A }$ is the set of possible actions, $P$ is the state transition probability matrix encoding the dynamics of the environment (including the agent) and $r$ is the learned reward function (defined in Section 3.3). Notice how we are able to use the same reward function $r$ for any agent – even ones that the encoder may not have seen during training. Furthermore, this reward function solely depends on the learned encoder. Hence, the task represented by the MDP now depends solely on how well the encoder has learned task-specific representations since we do not use the environment reward to either define the task or learn the policy. This is an important distinction because we are expecting the encoder to generalize to new states that an agent might encounter during training, as the expert demonstrations in our dataset only contain successful trajectories. It is also possible to augment sparse rewards (which only define task success or failure) with our learned dense reward while training policies.
78
+
79
+ # 4 Experimental Setup
80
+
81
+ # 4.1 X-MAGICAL Benchmark
82
+
83
+ We introduce a cross-embodiment imitation learning benchmark, X-MAGICAL, which is based on the imitation learning benchmark MAGICAL [24], implemented on top of the physics engine PyMunk [25]. In this work, we consider a simplified 2D equivalent of a common household robotic sweeping task, wherein an agent has to push three objects into a predefined zone in the environment (colored in pink). We choose this task specifically because its long-horizon nature highlights how different agent embodiments can generate entirely different trajectories. The reward in this environment is defined as the fraction of debris swept into the zone at the end of the episode.
84
+
85
+ Multiple Embodiments in X-MAGICAL. We create multiple embodiments by designing agents with different shapes and end-effectors that induce variations in how each agent solves a task. In Figure 1, we show three of these embodiments and some sample trajectories that solve the sweeping task. Please see Appendix B for a detailed description of the benchmark. Three agents are shaped like a stick and they differ only in length. We call them short-stick, medium-stick and long-stick based on the length of their body. The agent in the last row is called gripper: it is circular in shape and has two arms that can actuate. All agents are capable of two actions - a rotation around their axis and a translation in a forward/backward direction along this axis (similar to the agent in the MAGICAL benchmark). All agents have a two-dimensional action space and use force and torque control to change their position and orientation respectively. The gripper agent has an additional degree of freedom for opening or closing its fingers. The default state of the gripper’s fingers is open. For all agents, the state representation is a 16-dimensional vector with the following information: $( { \bar { x } } , y )$ position of the agent, $( \cos \bar { \theta } , \sin \theta _ { . } ^ { \cdot }$ ) where $\theta$ is the agent’s 2D orientation, and for each of the three debris: its $( x , y )$ position, its distance to the agent and its distance to the goal zone. We frame-stack [26] three consecutive state vectors to encode temporal and velocity information, resulting in a final state dimension of 48.
86
+
87
+ Demonstrations and Different Embodiment Strategies in X-MAGICAL. To learn task-specific representations for this task, we collect 1000 demonstrations per agent, where each demonstration consists in sweeping all three debris, initialized with random positions, into the target zone. This is the dataset $D _ { \mathrm { a l l } }$ (described in Section 3.1) containing observation-only agent-specific demonstrations. In Figure 2, we highlight the differences that exist between the trajectories taken by these agents. Figure 2a shows a heat map of the frequency of visits (state visitation count) of each agent at every 2D position in the grid, across all demonstrations in the dataset. We plot the 2D projection of the state visitation count onto the $X Y$ plane with a bin width of 0.1. Yellow encodes higher state visitation whereas blue encodes lower state visitation. We observe that agent long-stick has less coverage of the environment as opposed to agent gripper, which has significantly more coverage. Similarly, we show the distribution of debris locations for all agents across all demonstrations in Figure 2b. In Figure 2c, we plot a randomly sampled trajectory from each agent’s demonstration pool. We use transparency to encode the start (lighter) and end (darker) of the trajectory. It is clear from this figure that each agent solves the task in a different manner. Additionally, there is a significant difference in the time taken by each agent to execute this task, as shown in Table 1. Agent long-stick is able to finish the task the quickest because of its long shape that can sweep all the debris at once, while agents short-stick and gripper take longer because they have to frequently push or grasp one debris at a time. These differences are the types of challenges that a representation must overcome to successfully generalize across embodiments. As such, X-MAGICAL serves to create a highly simplified version of a real-world scenario where we might want to learn new tasks from an observation dataset of humans performing these tasks in highly diverse ways.
88
+
89
+ # 4.2 Baselines
90
+
91
+ Here, we describe the alternative reward functions we baseline our method against, color coded to match their appearance in Figs. 3, 4, and 5. 1) ImageNet: We use an ImageNet pre-trained ResNet-18 encoder with no additional self-supervised training, i.e., we load the pre-trained weights, discard the classification head, and use the 512-dimensional embedding space from the previous layer. 2) Goal classifier: We follow [27] and train a goal frame classifier on a binary classification task where the last frame of all the demonstrations is considered positive and all the others are considered negatives. We use the output probabilities of the classifier as the reward function. 3) LIFS: We implement the method from [16] which learns a feature space that is invariant to different embodiments using a contrastive loss function paired with an autoencoding loss. 4) TCN: single-view Time-Contrastive Network (TCN) [5] with positive and negative frame windows of 1 and 4 respectively. For more details regarding baseline implementations, see Appendix D.1.1.
92
+
93
+ # 4.3 Implementation Details
94
+
95
+ Our encoder for all experiments and methods is a ResNet-18 [28] initialized with ImageNet pre-trained weights. We replace the classification head with an embedding layer outputting a 32-dimensional vector. The encoder is trained on images of resolution $2 2 4 \times 2 2 4$ with ADAM [29] and a learning rate of $1 0 ^ { - 5 }$ Note that our learned reward is agnostic to the RL algorithm used – in this work, we opt for Soft-Actor Critic (SAC) [30], which is a reinforcement learning algorithm that has been successfully used to train policies for continuous control tasks [31]. Once the TCC encoder is trained, we use it to embed the observation frames as the agent interacts with the environment.
96
+
97
+ # 5 Experiments
98
+
99
+ We execute a series of experiments to evaluate whether the learned reward functions are effective at visual imitation. Specifically, our experiments seek to answer the following questions: first (Section 5.1), in the same-embodiment case, where the demonstration dataset $D$ contains the embodiment of the learning agent, does our method enable successful reinforcement learning for that agent? Next (Section 5.2), we investigate our primary interest, the cross-embodiment case, where the demonstration dataset $D$ does not contain the embodiment of the learning agent. To additionally test our approach using real-world data (Section 5.3), we use the dataset from [6] to leverage real-world human demonstrations to learn policies in simulation. Note that each embodiment’s performance is evaluated over 50 episodes and all figures plot the mean performance over 5 random seeds, with a standard deviation shading of $\pm 0 . 5$ . Videos of our results are in the supplementary video.
100
+
101
+ ![](images/43e882c2e5c9ae9bc4a4cb89eead1e6c094266389993350975196c84fc86b2ae.jpg)
102
+
103
+ ![](images/aad585723541b372d579fefbbb51f0a4e09326d6305a358a51fe8ad3884e021e.jpg)
104
+ Figure 3. Same-embodiment setting: Comparison of XIRL with other baseline reward functions, using SAC [30] for RL policy learning on the X-MAGICAL sweeping task.
105
+ Figure 4. Cross-embodiment setting: XIRL performs favorably when compared with other baseline reward functions, trained on observation-only demonstrations from different embodiments. Each agent{long-stick, medium-stick, short-stick, gripper} is shown using demonstrations from the other 3 embodiments, with SAC [30] for RL policy learning on the X-MAGICAL sweeping task.
106
+
107
+ # 5.1 Results on Learning from Same-Embodiment Demonstrations
108
+
109
+ In this experiment, we want to validate whether our approach of using a reward function trained with TCC is good enough to train agents to perform the task defined in a dataset of expert demonstrations. Note that the learned reward function has to be robust enough such that it can provide a useful signal for new states an agent might encounter while learning a policy and interacting with the environment. In Figure 3, we compare our method XIRL with baselines described in Section 4.2. We find XIRL is more sample-efficient than the other learned reward baselines. We attribute this sample efficiency to the fact that the TCC embeddings encode task progress which helps the agent learn to reach for objects and goal zones while interacting with the environment, rather than exploring in a purely random manner. This experiment provides evidence that XIRL’s reward function is suitable for downstream reinforcement learning.
110
+
111
+ # 5.2 Results on Learning from Cross-Embodiment Demonstrations
112
+
113
+ After verifying that XIRL works on the embodiments it was trained with, we move to the experiments that answer the core question in our work: can XIRL generalize to unseen embodiments? In this section we conduct experiments where the reward function is learned using embodiments that are different from the ones on which the policy is trained. As noted in Table 1, the timescales with which the agents execute the task can vary significantly. We conduct four experiments, each one corresponding to holding-out one agent from the expert demonstration set. In each such experiment, we train an encoder on demonstrations from the remaining three agents. We compare with reward functions learned using TCN, LIFS, and goal frame classifiers. While both TCC and TCN are contrastive losses, the former makes explicit comparisons across different embodiments, whereas the latter implicitly relies on an encoder shared across embodiments to learn the cross-embodiment representation. In Figure 4, we show that XIRL generalizes to new agents significantly better than the other learned reward baselines.
114
+
115
+ # 5.3 Results on Learning from Real-World Cross-Embodiment Demonstrations
116
+
117
+ In this experiment, we test how well we can learn rewards from more challenging real-world human demonstration videos. To do so, we use the dataset and State Pusher environment introduced in [6]. We train two XIRL encoders: XIRL (sim only) trained on 5 teleoperated simulated trajectories (i.e., no domain shift) and XIRL (real only) trained solely on the real-world human demonstrations without using any form of human labeling of paired frames. We compare our results to training the policy on the sparse reward from the environment and the RLV method presented in [6]. As demonstrated in Figure 5, we find our approach can improve the sample-efficiency of learning in the environment, compared to using RLV or solely the environment reward.
118
+
119
+ # 5.4 Qualitative comparison between learned reward functions vs. handcrafted rewards
120
+
121
+ In Figures 6 and 7, we visualize and compare the XIRL reward function with the environment’s reward (ground truth) for the Sweeping task from X-MAGICAL (see Sec. 4.1 for details) and the State Pusher and Drawer Opening tasks from $[ 6 ] ^ { 4 }$ . We find that the learned reward is highly correlated with the ground truth reward from the environment for both successful demos (first column in Figures 6 and 7) and unsuccessful demos (second column in Figures 6 and 7). It is especially encouraging to see that in a sparser reward environment like the Drawer Opening task, XIRL provides a dense signal that should allow the agent to learn the task more efficiently. Additionally, we can see that in the example of the failed collision trajectory (i.e., second row third column in Fig. 7), where the arm collides with the drawer rather than opening it, XIRL is able to provide it with a partial reward (i.e., for correctly moving towards the drawer) as opposed to the environment reward which remains zero.
122
+
123
+ ![](images/336f6e56fadde7992fbb34f9016b8184166d06e85e5dd38fc2086c18cc15eab3.jpg)
124
+ Figure 5. Real-world-demo cross-embodiment setting: Comparison of XIRL with baselines using the simulated State Pusher environment from [6]. XIRL (real only) leverages real-world demonstration videos of humans (left, row 2) to teach a robot arm in sim (left, row 1), but unlike [6], we do not use human-labeled data of paired frame correspondences. $\mathrm { R L V ^ { \ast } }$ denotes results taken verbatim from [6] which uses a different implementation of SAC for RL policy learning.
125
+
126
+ ![](images/7dc35f5c98241570164e1208386c3d21140466f479c4540f2cf56d7b06bd8fa5.jpg)
127
+
128
+ ![](images/af497430173dbd9d9ebdd0f01e8662f043721632071535ec3723b518aa43e7bc.jpg)
129
+ Figure 6. X-MAGICAL demo cross-embodiment setting: Visualizing our learned reward function XIRL vs. the environment’s sparse reward on a successful and unsuccessful demonstration, for the short-stick agent on the X-MAGICAL sweeping task. The learned reward was trained on the three other agents.
130
+ Figure 7. Real-world-demo cross-embodiment setting: Visualizing our learned XIRL reward function vs. the environment’s sparse reward on the State Pusher (top) and Drawer Opening (bottom) tasks from [6].
131
+
132
+ # 6 Conclusion
133
+
134
+ This paper presents XIRL, a framework for learning vision-based reward functions from videos of expert demonstrators exhibiting different embodiments. XIRL uses TCC to self-supervise a deep visual encoder from videos, and uses this encoder to generate rewards via simple distances to goal observations in the embedding space. XIRL enables unseen agents with new embodiments to learn the demonstrated tasks via IRL. Reward functions from XIRL are fully self-supervised from videos, and we can successfully learn tasks without requiring manually paired video frames [6] between the demonstrator and learner. In this sense, our method presents favorable scalability to an arbitrary number of embodiments or experts with varying skill levels. Experiments show that policies learned via XIRL are more sample efficient than multiple baseline alternatives, including TCN [5], LIFS [16], and RLV [6]. While our experiments demonstrate promising results for learning policies in simulated environments using rewards learned from both simulated and real-world videos, we have yet to show policy learning on a real robot, which we look forward to trying post-COVID.
135
+
136
+ # Acknowledgments
137
+
138
+ We would like to thank Alex Nichol, Nick Hynes, Sean Kirmani, Brent Yi and Jimmy Wu for fruitful technical discussions, Sam Toyer for invaluable help with setting up the simulated benchmark, and Karl Schmeckpeper for discussions and help related to RLV.
139
+
140
+ # References
141
+
142
+ [1] B. D. Argall, S. Chernova, M. Veloso, and B. Browning. A survey of robot learning from demonstration. Robotics and autonomous systems, 57(5), 2009. 1, 2, 11
143
+ [2] T. Zhang, Z. McCarthy, O. Jow, D. Lee, X. Chen, K. Goldberg, and P. Abbeel. Deep imitation learning for complex manipulation tasks from virtual reality teleoperation. In ICRA. IEEE, 2018. 1
144
+ [3] P. Florence, L. Manuelli, and R. Tedrake. Self-supervised correspondence in visuomotor policy learning. IEEE RAL, 5(2), 2019. 1
145
+ [4] P. Sermanet, K. Xu, and S. Levine. Unsupervised perceptual rewards for imitation learning. arXiv preprint arXiv:1612.06699, 2016. 1, 2, 11
146
+ [5] P. Sermanet, C. Lynch, Y. Chebotar, J. Hsu, E. Jang, S. Schaal, and S. Levine. Time-contrastive networks: Self-supervised learning from video. In 2018 IEEE International Conference on Robotics and Automation (ICRA), pages 1134–1141. IEEE, 2018. 1, 2, 3, 5, 6, 8, 11, 16
147
+ [6] K. Schmeckpeper, O. Rybkin, K. Daniilidis, S. Levine, and C. Finn. Reinforcement learning with videos: Combining offline observations with interaction, 2020. 1, 2, 3, 4, 6, 7, 8, 11, 20
148
+ [7] D. Dwibedi, Y. Aytar, J. Tompson, P. Sermanet, and A. Zisserman. Temporal cycle-consistency learning. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2, 3, 4, 12, 16
149
+ [8] C. Atkeson and S. Schaal. Robot learning from demonstration. In ICML, 1997. 2, 11
150
+ [9] T. Osa, J. Pajarinen, G. Neumann, J. Bagnell, P. Abbeel, and J. Peters. An algorithmic perspective on imitation learning. Found. Trends Robotics, 7:1–179, 2018. 2, 11
151
+ [10] F. Torabi, G. Warnell, and P. Stone. Behavioral cloning from observation. In IJCAI, 2018. 2, 11
152
+ [11] A. D. Edwards, H. Sahni, Y. Schroecker, and C. L. Isbell. Imitating latent policies from observation. arXiv preprint arXiv:1805.07914, 2018. 2, 11
153
+ [12] I. Radosavovic, X. Wang, L. Pinto, and J. Malik. State-only imitation learning for dexterous manipulation. arXiv preprint arXiv:2004.04650, 2020. 2, 11
154
+ [13] D. Pathak, P. Mahmoudieh, G. Luo, P. Agrawal, D. Chen, Y. Shentu, E. Shelhamer, J. Malik, A. A. Efros, and T. Darrell. Zero-shot visual imitation. In Proceedings of the IEEE conference on computer vision and pattern recognition workshops, pages 2050–2053, 2018. 2, 11
155
+ [14] Y. Aytar, T. Pfaff, D. Budden, T. Paine, Z. Wang, and N. de Freitas. Playing hard exploration games by watching youtube. In Advances in Neural Information Processing Systems, pages 2930–2941, 2018. 2, 3, 5, 11
156
+ [15] O. Mees, M. Merklinger, G. Kalweit, and W. Burgard. Adversarial skill networks: Unsupervised robot skill learning from video. In 2020 IEEE International Conference on Robotics and Automation (ICRA), pages 4188–4194. IEEE, 2020. 2, 11
157
+ [16] A. Gupta, C. Devin, Y. Liu, P. Abbeel, and S. Levine. Learning invariant feature spaces to transfer skills with reinforcement learning, 2017. 3, 5, 6, 8, 11, 16
158
+ [17] A. Singh, L. Yang, K. Hartikainen, C. Finn, and S. Levine. End-to-end robotic reinforcement learning without reward engineering. arXiv preprint arXiv:1904.07854, 2019. 3, 11
159
+ [18] L. Smith, N. Dhawan, M. Zhang, P. Abbeel, and S. Levine. Avid: Learning multi-stage tasks via pixel-level translation of human videos. arXiv preprint arXiv:1912.04443, 2019. 3, 11
160
+ [19] Y. Liu, A. Gupta, P. Abbeel, and S. Levine. Imitation from observation: Learning to imitate behaviors from raw video via context translation. In ICRA. IEEE, 2018. 3, 11
161
+ [20] P. Sharma, D. Pathak, and A. Gupta. Third-person visual imitation learning via decoupled hierarchical controller. In Advances in Neural Information Processing Systems, pages 2597–2607, 2019. 3, 11
162
+ [21] D. Hejna, L. Pinto, and P. Abbeel. Hierarchically decoupled imitation for morphological transfer. In International Conference on Machine Learning, pages 4159–4171. PMLR, 2020. 3, 11
163
+ [22] J.-Y. Zhu, T. Park, P. Isola, and A. A. Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV, 2017. 3, 11
164
+ [23] P. Henderson, R. Islam, P. Bachman, J. Pineau, D. Precup, and D. Meger. Deep reinforcement learning that matters. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 32, 2018. 5
165
+ [24] S. Toyer, R. Shah, A. Critch, and S. Russell. The magical benchmark for robust imitation. arXiv preprint arXiv:2011.00401, 2020. 5, 12
166
+ [25] V. Blomqvist. Pymunk: A easy-to-use pythonic rigid body 2d physics library (version 6.0.0), 2007. URL https://www.pymunk.org. 5
167
+ [26] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, et al. Human-level control through deep reinforcement learning. nature, 518(7540): 529–533, 2015. 6
168
+ [27] M. Vecerik, O. Sushkov, D. Barker, T. Rothorl, T. Hester, and J. Scholz. A practical approach to insertion with ¨ variable socket position using deep reinforcement learning. In 2019 International Conference on Robotics and Automation (ICRA), pages 754–760. IEEE, 2019. 6, 15, 16
169
+ [28] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 770–778, 2016. 6
170
+ [29] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint:1412.6980, 2014. 6
171
+ [30] T. Haarnoja, A. Zhou, P. Abbeel, and S. Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. arXiv preprint arXiv:1801.01290, 2018. 6, 7, 17
172
+ [31] T. Haarnoja, A. Zhou, K. Hartikainen, G. Tucker, S. Ha, J. Tan, V. Kumar, H. Zhu, A. Gupta, P. Abbeel, and S. Levine. Soft actor-critic algorithms and applications. arXiv preprint arXiv:1812.05905, 2018. 6
173
+ [32] C. Yang, X. Ma, W. Huang, F. Sun, H. Liu, J. Huang, and C. Gan. Imitation learning from observations by minimizing inverse dynamics disagreement. ArXiv, abs/1910.04417, 2019. 11
174
+ [33] L. Shao, T. Migimatsu, Q. Zhang, K. Yang, and J. Bohg. Concept2robot: Learning manipulation concepts from instructions and human demonstrations. Robotics: Science and Systems, 2020. 11
175
+ [34] G. Berseth and C. Pal. Visual imitation learning with recurrent siamese networks. ArXiv, abs/1901.07186, 2019. 11
176
+ [35] B. D. Ziebart, A. L. Maas, J. A. Bagnell, and A. K. Dey. Maximum entropy inverse reinforcement learning. In Aaai, volume 8, pages 1433–1438. Chicago, IL, USA, 2008. 11
177
+ [36] B. D. Ziebart, J. A. Bagnell, and A. K. Dey. Modeling interaction via the principle of maximum causal entropy. In ICML, 2010. 11
178
+ [37] I. J. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial networks. arXiv preprint arXiv:1406.2661, 2014. 11
179
+ [38] J. Ho and S. Ermon. Generative adversarial imitation learning. In NeurIPS, 2016. 11
180
+ [39] F. Torabi, G. Warnell, and P. Stone. Generative adversarial imitation from observation. arXiv preprint arXiv:1807.06158, 2018. 11
181
+ [40] B. C. Stadie, P. Abbeel, and I. Sutskever. Third-person imitation learning. arXiv:1703.01703, 2017. 11
182
+ [41] Y. Lu and J. Tompson. Adail: Adaptive adversarial imitation learning. NeurIPS Workshop on Learning Transferable Skills,, 2019. 11
183
+ [42] F. Liu, Z. Ling, T. Mu, and H. Su. State alignment-based imitation learning. arXiv preprint arXiv:1911.10947, 2019. 11
184
+ [43] W. Sun, A. Vemula, B. Boots, and J. Bagnell. Provably efficient imitation learning from observation alone. ArXiv, abs/1905.10948, 2019. 11
185
+ [44] K. Kim, Y. Gu, J. Song, S. Zhao, and S. Ermon. Domain adaptive imitation learning. arXiv, 2020. 11
186
+ [45] A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga, A. Desmaison, A. Kopf, E. Yang, Z. DeVito, M. Raison, A. Tejani, S. Chilamkurthy, B. Steiner, L. Fang, J. Bai, and S. Chintala. Pytorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems 32. Curran Associates, Inc., 2019. 14
187
+ [46] A. Buslaev, A. Parinov, E. Khvedchenya, V. Iglovikov, and A. A. Kalinin. Albumentations: fast and flexible image augmentations. arXiv e-prints, 2018. 16
188
+ [47] D. Yarats and I. Kostrikov. Soft actor-critic (sac) implementation in pytorch. https://github.com/ denisyarats/pytorch_sac, 2020. 17
189
+ [48] H. van Hasselt, A. Guez, and D. Silver. Deep reinforcement learning with double q-learning. arXiv e-prints, 2015. 17
190
+ [49] S. Fujimoto, H. van Hoof, and D. Meger. Addressing function approximation error in actor-critic methods. In Proceedings of the 35th International Conference on Machine Learning, ICML 2018, Stockholmsmassan, Stockholm, Sweden, July 10-15, 2018, 2018. 17
191
+ [50] A. M. Saxe, J. L. McClelland, and S. Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. arXiv e-prints, 2013. 17
192
+ [51] T. Chen, S. Kornblith, M. Norouzi, and G. Hinton. A simple framework for contrastive learning of visual representations. arXiv preprint arXiv:2002.05709, 2020. 17, 18
parse/train/RO4DM85Z4P7/RO4DM85Z4P7_content_list.json ADDED
@@ -0,0 +1,816 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "XIRL: Cross-embodiment Inverse Reinforcement Learning ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 202,
8
+ 101,
9
+ 797,
10
+ 150
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Kevin Zakka1,3⇤, Andy $\\mathbf { Z e n g } ^ { 2 }$ , Pete Florence2, Jonathan Tompson2, Jeannette $\\mathbf { B o h g } ^ { 1 }$ , and Debidatta Dwibedi2 1Stanford University, 2Robotics at Google, 3UC Berkeley ",
17
+ "bbox": [
18
+ 281,
19
+ 180,
20
+ 717,
21
+ 223
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract: We investigate the visual cross-embodiment imitation setting, in which agents learn policies from videos of other agents (such as humans) demonstrating the same task, but with stark differences in their embodiments – shape, actions, end-effector dynamics, etc. In this work, we demonstrate that it is possible to automatically discover and learn vision-based reward functions from cross-embodiment demonstration videos that are robust to these differences. Specifically, we present a self-supervised method for Crossembodiment Inverse Reinforcement Learning (XIRL) that leverages temporal cycleconsistency constraints to learn deep visual embeddings that capture task progression from offline videos of demonstrations across multiple expert agents, each performing the same task differently due to embodiment differences. Prior to our work, producing rewards from self-supervised embeddings typically required alignment with a reference trajectory, which may be difficult to acquire under stark embodiment differences. We show empirically that if the embeddings are aware of task progress, simply taking the negative distance between the current state and goal state in the learned embedding space is useful as a reward for training policies with reinforcement learning. We find our learned reward function not only works for embodiments seen during training, but also generalizes to entirely new embodiments. Additionally, when transferring real-world human demonstrations to a simulated robot, we find that XIRL is more sample efficient than current best methods. Qualitative results, code, and datasets are available at https://x-irl.github.io ",
28
+ "bbox": [
29
+ 233,
30
+ 273,
31
+ 766,
32
+ 526
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Keywords: inverse reinforcement learning, imitation learning, self-supervised learning ",
39
+ "bbox": [
40
+ 233,
41
+ 540,
42
+ 763,
43
+ 554
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "1 Introduction ",
50
+ "text_level": 1,
51
+ "bbox": [
52
+ 174,
53
+ 570,
54
+ 305,
55
+ 587
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "The ability to learn new tasks from third-person demonstrations holds the potential to enable robots to leverage the vast quantities of tutorial videos that can be gleaned from the world-wide web (e.g., YouTube videos). However, distilling diverse and unstructured videos into motor skills with vision-based policies can be daunting – as the videos themselves are often not only captured from different camera viewpoints in different environments, but also with different experts that may use different tools, objects, or strategies to perform the same task. Perhaps most critically, there often exists a clear embodiment gap between the human expert demonstrator, and the robot hardware that executes the learned policies. One approach to close this gap is to learn a mapping between the human and robot embodiment [1], which is a non-trivial intermediate problem in itself. ",
62
+ "bbox": [
63
+ 174,
64
+ 595,
65
+ 825,
66
+ 715
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "Despite considerable progress in learning policies with paired observations and actions (e.g., collected via teleoperation) [2, 3], much less work has been done in getting robots to learn policies from tasks defined only by third-person observations of demonstrations [4, 5, 6]. This is a surprisingly challenging problem, as different embodiments are likely to use unique strategies that suit them and allow them to make progress on a given task. For example, if asked to “place five pens into a cup”, a human hand is likely to scoop up all pens before slipping them into the cup, whereas a two-fingered gripper might instead need to pick and place each pen individually. Both strategies complete the task, but generate different state-action trajectories. In this setting, it may be difficult to acquire labeled frame-to-frame correspondences between expert demonstration videos and learned embodiments [6], particularly across a multitude of embodiments or experts. The approach we investigate instead is whether we can successfully learn tasks through a learned notion of task progress that is invariant to the embodiment performing the task. ",
73
+ "bbox": [
74
+ 174,
75
+ 722,
76
+ 825,
77
+ 867
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "image",
83
+ "img_path": "images/80a7e6efe913971b206ca18932e755e85617cbe2190ac680c41ec9b31c2e8a60.jpg",
84
+ "image_caption": [
85
+ "Figure 1. Cross-embodiment Inverse Reinforcement Learning. We learn embodiment-invariant visual representations from offline video demonstrations (stick agents on the left) using TCC [7], then use the trained encoder to generate embodiment-invariant visual reward functions that can be used to learn policies on new embodiments (gripper on the right) with reinforcement learning. "
86
+ ],
87
+ "image_footnote": [],
88
+ "bbox": [
89
+ 176,
90
+ 92,
91
+ 821,
92
+ 300
93
+ ],
94
+ "page_idx": 1
95
+ },
96
+ {
97
+ "type": "text",
98
+ "text": "In this work, we propose to enable agents to imitate video demonstrations of experts – including ones with different embodiments – by using a task-specific, embodiment-invariant reward formulation trained via temporal cycle-consistency (TCC) [7]. We demonstrate how we can leverage an encoder trained with TCC to define dense rewards for downstream reinforcement learning (RL) policies via simple distances in the learned embedding space. Simulated experiments across four different embodiments show that these learned rewards are capable of generalizing to new embodiments, enabling unseen agents to learn the task via reinforcement, and surprisingly in some cases, exceeding the sample efficiency of the same agent learned with ground truth sparse rewards. We also demonstrate the effectiveness of our approach for learning robot policies using human demonstrations on the State Pusher environment from [6], where our reward is first learned on real-world human demonstrations, then used to teach a Sawyer arm how to perform the task in simulation. ",
99
+ "bbox": [
100
+ 174,
101
+ 344,
102
+ 825,
103
+ 477
104
+ ],
105
+ "page_idx": 1
106
+ },
107
+ {
108
+ "type": "text",
109
+ "text": "Our contributions are as follows: (i) We introduce Cross-embodiment Inverse Reinforcement Learning (XIRL), an effective, label-free framework for tackling cross-embodiment visual imitation learning. Our core contribution is to use self-supervised learning on third-person demonstration videos to define dense reward functions amenable for downstream reinforcement learning policies, (ii) Along with XIRL, we release a cross-embodiment imitation learning benchmark, X-MAGICAL, which features multiple simulated agents with different embodiments performing the same manipulation task, including one thousand expert demonstrations for each agent, (iii) We show that XIRL significantly outperforms alternative methods on both the X-MAGICAL benchmark and the human-to-robot transfer benchmark from [6], and discuss our observations, which point to interesting areas for future research, (iv) Finally, we introduce a real-world dataset, X-REAL (Cross-embodiment Real demonstrations), of a manipulation task performed with nine different embodiments, which can be used to evaluate cross-embodiment reward learning methods2. ",
110
+ "bbox": [
111
+ 174,
112
+ 483,
113
+ 825,
114
+ 631
115
+ ],
116
+ "page_idx": 1
117
+ },
118
+ {
119
+ "type": "text",
120
+ "text": "2 Related Work ",
121
+ "text_level": 1,
122
+ "bbox": [
123
+ 174,
124
+ 641,
125
+ 315,
126
+ 657
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "Traditional formulations of imitation learning [8, 1, 9] assume access to a corpus of expert demonstration data which includes both state and action trajectories of the expert policy. In the context of third-person imitation learning, including when learning from expert agents with different embodiments, obtaining access to ground-truth actions is difficult or impossible3. ",
133
+ "bbox": [
134
+ 174,
135
+ 666,
136
+ 825,
137
+ 722
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "Inferring expert actions. To address this issue, several approaches either try to infer expert actions [10, 11, 12] – for example by training an inverse dynamics model on agent interaction data [10] – or employ forward prediction on the next state to imitate the expert without direct action supervision [13]. While these methods successfully address learning from observation-only demonstrations, they either do not support skill transfer to different policy embodiments at all, or they cannot take advantage of multiple embodiments in order to improve generalization to unseen policy configurations. We explicitly address these problems in this work. ",
144
+ "bbox": [
145
+ 174,
146
+ 727,
147
+ 825,
148
+ 809
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "Imitation via learned reward functions. In contrast to imitation via supervised methods, such as BCO [10], a recent body of work [4, 5, 14, 6, 15] has focused on learning reward functions from expert video data and then training RL policies to maximize this reward. In [4], the authors combine ImageNet pre-trained visual features with an L2-norm distance reward to match policy and expert observations in a latent feature space. In their follow-up work [5], the reward is computed in a viewpoint-invariant representation that is self-supervised on video data. While both these methods are compelling in their use of cheap unlabeled data to learn invariant rewards, the use of a time index as a heuristic for defining weak correspondence is a constraining limitation for tasks that need to be executed at different speeds, or are not strictly monotonic (e.g., have ambiguous sub-task ordering). In [14] a dense reward is learned via unsupervised learning on YouTube data and the authors make no assumption about time alignment. However, in their work, the expert and learned policy are executed in the same domain and embodiment, an assumption we relax in our work. Framed in a multi-task learning setting, [16] propose training policies with morphologically different embodiments first on a similar set of proxy tasks, in order to learn a latent space to map between domains, and then sharing skills on a held-out task from one policy to another. A time-index heuristic is used to define a metric reward when performing RL training of the new task. In our work, the learned embedding finds correspondences in a fully-unsupervised fashion, without the need for such strict time alignment. In [17], a small sub-set of states is human labeled for goal success and a convolutional network is then trained to detect successful task completion from image observations, where on-policy samples are used as negatives for the classifier. By contrast, our learned embedding encodes task progress in its latent representation without the use of expensive human labels. ",
155
+ "bbox": [
156
+ 174,
157
+ 814,
158
+ 823,
159
+ 867
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "",
166
+ "bbox": [
167
+ 174,
168
+ 90,
169
+ 825,
170
+ 303
171
+ ],
172
+ "page_idx": 2
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "Imitation via domain adaptation. An additional category of approaches to third-person imitation learning are those that perform domain adaptation of expert observations [18, 19, 20, 21]. For instance, in [18] a CycleGAN [22] architecture is used to perform pixel-level image-to-image translation between policy domains, which is then used to construct a reward function for a model-based RL algorithm. A similar model-free approach is proposed in [19]. In [20], a generative model is used to predict robot high-level sub-goals conditioned on a third-person demonstration video, and a lower-level control policy is trained in a task-agnostic manner. Similarly, [21] uses high level task conditioning from zero-shot transfer of expert demonstrations, but they use KL matching to perform both high and low-level imitation. In contrast to these methods, the unsupervised TCC alignment in this work avoids performing explicit domain adaptation or pixel-level image translation by instead learning a robust and invariant feature space in a fully offline fashion. ",
177
+ "bbox": [
178
+ 174,
179
+ 309,
180
+ 825,
181
+ 443
182
+ ],
183
+ "page_idx": 2
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "Reinforcement learning with demonstrations. Recent work in offline-reinforcement learning [6] explicitly tackles the problem of policy embodiment and domain shift. Their method, Reinforcement Learning from Videos (RLV), uses a labelled collection of expert-policy state pairs in conjunction with adversarial training to learn an inverse dynamics model jointly optimized with the policy. In contrast, we avoid the limitation of collecting human-labeled dense state correspondences by using a self-supervised algorithm (i.e., TCC [7]) which uses cycle-consistency to automatically learn the correspondence between states of two domains. We also show that this formulation improves generalization to unseen embodiments. Since the problem setup is similar to ours, we also compare to their method as a baseline. ",
188
+ "bbox": [
189
+ 174,
190
+ 449,
191
+ 825,
192
+ 556
193
+ ],
194
+ "page_idx": 2
195
+ },
196
+ {
197
+ "type": "text",
198
+ "text": "3 Approach ",
199
+ "text_level": 1,
200
+ "bbox": [
201
+ 174,
202
+ 565,
203
+ 284,
204
+ 583
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "Our overall XIRL framework (Figure 1) addresses the cross-embodiment visual imitation problem (Section 3.1). The framework consists of first using TCC to self-supervise embodiment-invariant visual representations (Section 3.2), then using a novel embodiment-invariant visual reward function (Section 3.3) to perform cross-embodiment visual imitation via reinforcement learning (Section 3.4). ",
211
+ "bbox": [
212
+ 174,
213
+ 592,
214
+ 825,
215
+ 645
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "3.1 Problem Formulation ",
222
+ "text_level": 1,
223
+ "bbox": [
224
+ 174,
225
+ 652,
226
+ 354,
227
+ 666
228
+ ],
229
+ "page_idx": 2
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "Our objective is to extract an agent-invariant definition of a task, via a learned reward function, from a dataset of videos of separate agents performing the same task. In particular, we are interested in agents that may solve the task in entirely different ways due to differences in their end-effector, shapes, dynamics, etc., which we refer to as embodiment differences. For example, consider how differently a vacuum gripper and a parallel-jaw gripper will grasp an object as a result of their respective end-effectors. Such a setup is quite common in robotic imitation learning, where we might have access to observation data of humans demonstrating a task, but want to teach a robot to perform it. It is very likely that the way the human executes the task will diverge from how the robot would execute it. ",
234
+ "bbox": [
235
+ 173,
236
+ 672,
237
+ 825,
238
+ 780
239
+ ],
240
+ "page_idx": 2
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "We define a dataset of multiple agents performing the same task $T$ as $\\textstyle D = \\bigcup _ { i = 1 } ^ { n } D _ { i }$ , where $D _ { i }$ is an agent-specific dataset containing observations of only agent $i$ performing task $T$ . Each agent’s dataset $D _ { i }$ is a collection of videos defined as ${ { D } _ { i } } = \\{ v _ { i } ^ { 1 } , v _ { i } ^ { 2 } . . . v _ { i } ^ { K } \\}$ , where $v _ { i } ^ { j }$ represents the video of the $j ^ { t h }$ demonstration of agent $i$ successfully performing the task $T$ . We would like to highlight that $D$ only contains observation data, i.e., it does not store the actions taken by the respective agents. We use self-supervised representation learning techniques to learn task-specific representations from this dataset. ",
245
+ "bbox": [
246
+ 174,
247
+ 785,
248
+ 823,
249
+ 869
250
+ ],
251
+ "page_idx": 2
252
+ },
253
+ {
254
+ "type": "image",
255
+ "img_path": "images/d83a8d2ebcb5bc6f49888dea08e985c5543dca5689bfd625916e473bff58dfa5.jpg",
256
+ "image_caption": [
257
+ "Figure 2. Difference in state distributions of the across different embodiments performing the same task in X-MAGICAL (Section 4.1). "
258
+ ],
259
+ "image_footnote": [],
260
+ "bbox": [
261
+ 202,
262
+ 87,
263
+ 797,
264
+ 242
265
+ ],
266
+ "page_idx": 3
267
+ },
268
+ {
269
+ "type": "text",
270
+ "text": "3.2 Representation Learning ",
271
+ "text_level": 1,
272
+ "bbox": [
273
+ 173,
274
+ 270,
275
+ 379,
276
+ 284
277
+ ],
278
+ "page_idx": 3
279
+ },
280
+ {
281
+ "type": "text",
282
+ "text": "In this work, we use TCC [7] to learn task-specific representations in a self-supervised way. The method has been shown to learn useful representations on videos of the same action for temporally fine-grained downstream tasks. In their paper, the authors show that TCC representations can predict frame-level task progress, such as predicting how much water is in a cup during pouring, without requiring any human annotations. Task progress can provide dense signals for learning a new task and we would like to bake this property into our learned reward. Another advantage of TCC is that it does not require supervision for frame-level alignment (i.e., which frames in two videos correspond to each other). Such frame-to-frame correspondences are required by a prior method, RLV [6], to achieve successful reinforcement learning on the considered tasks, but we would like to avoid this type of manual supervision. ",
283
+ "bbox": [
284
+ 173,
285
+ 290,
286
+ 825,
287
+ 411
288
+ ],
289
+ "page_idx": 3
290
+ },
291
+ {
292
+ "type": "text",
293
+ "text": "We train an image encoder $\\phi$ , that ingests an image $I$ and returns an embedding vector $\\phi ( I )$ , using TCC. TCC assumes that there exist semantic temporal correspondences between two video sequences, even though they are not labeled and the actions may be executed at different speeds. Note that in our case, the assumption holds since all sequences in our dataset originate from the same task. Furthermore, even if two different agents accomplish the task very differently, there will be a common set of states or frames that will temporally correspond. When we apply the TCC loss, we compare frames of one agent performing the task with frames from another, and search for temporal similarities in how both execute the task. By performing multiple such comparisons and cycling-back (described in the next paragraph), TCC encodes task progress in its latent representation, a property that is useful for learning task-specific, yet embodiment-invariant reward functions. For completeness, we describe the training technique below. ",
294
+ "bbox": [
295
+ 173,
296
+ 416,
297
+ 825,
298
+ 550
299
+ ],
300
+ "page_idx": 3
301
+ },
302
+ {
303
+ "type": "text",
304
+ "text": "We define a dataset $D _ { \\mathrm { a l l } } = \\{ v _ { 1 } , v _ { 2 } . . . v _ { N } \\}$ that contains the videos of all agents executing the same task $T$ . We are able to merge the datasets of different agents since TCC does not require embodiment labels (i.e., IDs) during training. We first sample a random batch of videos and embed all their frames using the aforementioned image encoder $\\phi$ . For each video $v _ { i }$ , this results in a sequence of embeddings $V _ { i } { = } \\{ \\phi ( v _ { i } ^ { 1 } ) , \\phi ( v _ { i } ^ { 2 } ) { \\ldots } , \\phi ( v _ { i } ^ { L _ { i } } ) \\}$ , where $L _ { i }$ is the length of the $i ^ { t h }$ video. From this mini-batch of sequences of video frame embeddings, we choose a pair of sequences $V _ { i }$ and $V _ { j }$ and compute their TCC loss. In particular, we randomly sample a frame embedding from sequence $V _ { i } -$ say $V _ { i } ^ { t }$ corresponding to the $t ^ { t h }$ frame of video $v _ { i }$ – and compute the soft nearest-neighbor of $V _ { i } ^ { t }$ in sequence $V _ { j }$ in the embedding space as follows: ",
305
+ "bbox": [
306
+ 173,
307
+ 555,
308
+ 825,
309
+ 670
310
+ ],
311
+ "page_idx": 3
312
+ },
313
+ {
314
+ "type": "equation",
315
+ "img_path": "images/1aa1ecc85f3ff03327a4b6dddcafdcba98280d3be0b009e0bbd148da1397a899.jpg",
316
+ "text": "$$\n\\widetilde { V _ { i j } ^ { t } } = \\sum _ { k } ^ { L _ { j } } \\alpha _ { k } V _ { j } ^ { k } , \\quad \\mathrm { w h e r e } \\quad \\alpha _ { k } = \\frac { e ^ { - \\| V _ { i } ^ { t } - V _ { j } ^ { k } \\| ^ { 2 } } } { \\sum _ { k } ^ { L _ { j } } e ^ { - \\| V _ { i } ^ { t } - V _ { j } ^ { k } \\| ^ { 2 } } }\n$$",
317
+ "text_format": "latex",
318
+ "bbox": [
319
+ 334,
320
+ 678,
321
+ 661,
322
+ 722
323
+ ],
324
+ "page_idx": 3
325
+ },
326
+ {
327
+ "type": "text",
328
+ "text": "We then cycle-back [7] to the first sequence $V _ { i }$ by computing the soft-nearest neighbor of $\\widetilde { V _ { i j } ^ { t } }$ with all the frames in $V _ { i }$ . The probability of cycling-back to the $k ^ { t h }$ frame in $V _ { i }$ can be computed as: ",
329
+ "bbox": [
330
+ 173,
331
+ 733,
332
+ 826,
333
+ 767
334
+ ],
335
+ "page_idx": 3
336
+ },
337
+ {
338
+ "type": "equation",
339
+ "img_path": "images/5cf53c96374e1685f1e050502ffcece393d71ff448300d600ba1331a904ec29b.jpg",
340
+ "text": "$$\n\\beta _ { i j t } ^ { k } = \\frac { e ^ { - \\| \\widetilde { V _ { i j } ^ { t } } - V _ { i } ^ { k } \\| ^ { 2 } } } { \\sum _ { k } ^ { L _ { i } } e ^ { - \\| \\widetilde { V _ { i j } ^ { t } } - V _ { i } ^ { k } \\| ^ { 2 } } }\n$$",
341
+ "text_format": "latex",
342
+ "bbox": [
343
+ 419,
344
+ 773,
345
+ 578,
346
+ 820
347
+ ],
348
+ "page_idx": 3
349
+ },
350
+ {
351
+ "type": "text",
352
+ "text": "The expected frame index we cycle-back to is then $\\begin{array} { r } { \\mu _ { i j } ^ { t } = \\sum _ { k } ^ { L _ { i } } \\beta _ { i j t } ^ { k } k } \\end{array}$ . Since we know the index of the frame that started the cycle, in this case $t$ , we can minimize the mean-squared (MSE) error loss between $t$ and the closest index retrieved via soft-nearest neighbor, i.e., $\\widetilde { V _ { i j } ^ { t } }$ . The loss for a single frame is thus: $L _ { i j } ^ { t } = ( \\mu _ { i j } ^ { t } - t ) ^ { 2 }$ . Finally, we minimize the average loss $L$ over all frames in video $v _ { i }$ with all other videos in the dataset $v _ { j }$ , defined as $\\begin{array} { r } { L = \\sum _ { i j t } L _ { i j } ^ { t } } \\end{array}$ . ",
353
+ "bbox": [
354
+ 173,
355
+ 829,
356
+ 825,
357
+ 915
358
+ ],
359
+ "page_idx": 3
360
+ },
361
+ {
362
+ "type": "table",
363
+ "img_path": "images/e8a8a00b088bfc240df0ba0bc685c6840d6d6dd62347522e1e34bdf89585ff9e.jpg",
364
+ "table_caption": [
365
+ "Table 1. Statistics of Demos of the X-MAGICAL Embodiments "
366
+ ],
367
+ "table_footnote": [],
368
+ "table_body": "<table><tr><td>Embodiment</td><td>Mean ± Std.Dev. Demo Length (no. of frames)</td></tr><tr><td>Long-stick</td><td>48.0 ±28.5</td></tr><tr><td>Medium-stick</td><td>59.9 ±27.9</td></tr><tr><td>Short-stick</td><td>81.7 ±35.0</td></tr><tr><td>Gripper</td><td>110.8 ±39.8</td></tr></table>",
369
+ "bbox": [
370
+ 339,
371
+ 119,
372
+ 653,
373
+ 212
374
+ ],
375
+ "page_idx": 4
376
+ },
377
+ {
378
+ "type": "text",
379
+ "text": "3.3 Reward Function ",
380
+ "text_level": 1,
381
+ "bbox": [
382
+ 174,
383
+ 236,
384
+ 328,
385
+ 251
386
+ ],
387
+ "page_idx": 4
388
+ },
389
+ {
390
+ "type": "text",
391
+ "text": "Once the encoder $\\phi$ has been trained on demonstrations of different agents performing the same task $T$ , we want to use it to transfer information about the task from one agent to another. We do this by leveraging $\\phi$ to generate rewards via distances to goal observations in the learned embedding space. Specifically, we define the goal embedding $g$ as the mean embedding of the last frame of all the demonstration videos in our offline dataset $D _ { \\mathrm { a l l } }$ . Concretely, $\\scriptstyle g = \\sum _ { i = 1 } ^ { N } \\phi ( v _ { i } ^ { L _ { i } } ) \\neq N$ , where $L _ { i }$ is the length of video $v _ { i }$ . Our reward $r$ then is the scaled negative distance of the current state embedding to the goal embedding $g$ i.e., $r ( s ) =$ $- 1 / \\kappa \\cdot \\| \\phi ( s ) - g \\| _ { 2 } ^ { 2 }$ , where $\\phi ( s )$ is the state embedding at the current timestep and $\\kappa$ is a scale parameter that ensures the distances are in a range amenable for training reinforcement learning algorithms [23]. We found it effective to set $\\kappa$ to be the average distance of the first frame’s embedding to the goal embedding for all the demonstrations in the dataset. Defining $r$ in this manner gives us several advantages: (a) it is dense, encoding both task completion and task progress, (b) it does not require any correspondence with a reference trajectory [5, 14] and (c) it sidesteps the need for a finite library of reference trajectories, unlike prior work [5, 16] that define time-indexed rewards relative to some reference trajectory. Thus, agents with trajectories of varying lengths (due to embodiment-specific constraints) can efficiently leverage this reward because the learned encoder can map different strategies to a common notion of task progress. ",
392
+ "bbox": [
393
+ 173,
394
+ 257,
395
+ 825,
396
+ 460
397
+ ],
398
+ "page_idx": 4
399
+ },
400
+ {
401
+ "type": "text",
402
+ "text": "3.4 Reinforcement Learning ",
403
+ "text_level": 1,
404
+ "bbox": [
405
+ 174,
406
+ 467,
407
+ 375,
408
+ 482
409
+ ],
410
+ "page_idx": 4
411
+ },
412
+ {
413
+ "type": "text",
414
+ "text": "Using the pre-trained frozen encoder $\\phi$ , we define a Markov Decision Process (MDP) for any agent as the tuple $\\langle \\bar { \\boldsymbol { S } } , \\boldsymbol { A } , \\boldsymbol { P } , \\boldsymbol { r } \\rangle$ where $s$ is the set of possible states, $\\mathcal { A }$ is the set of possible actions, $P$ is the state transition probability matrix encoding the dynamics of the environment (including the agent) and $r$ is the learned reward function (defined in Section 3.3). Notice how we are able to use the same reward function $r$ for any agent – even ones that the encoder may not have seen during training. Furthermore, this reward function solely depends on the learned encoder. Hence, the task represented by the MDP now depends solely on how well the encoder has learned task-specific representations since we do not use the environment reward to either define the task or learn the policy. This is an important distinction because we are expecting the encoder to generalize to new states that an agent might encounter during training, as the expert demonstrations in our dataset only contain successful trajectories. It is also possible to augment sparse rewards (which only define task success or failure) with our learned dense reward while training policies. ",
415
+ "bbox": [
416
+ 173,
417
+ 488,
418
+ 825,
419
+ 635
420
+ ],
421
+ "page_idx": 4
422
+ },
423
+ {
424
+ "type": "text",
425
+ "text": "4 Experimental Setup ",
426
+ "text_level": 1,
427
+ "bbox": [
428
+ 174,
429
+ 645,
430
+ 362,
431
+ 662
432
+ ],
433
+ "page_idx": 4
434
+ },
435
+ {
436
+ "type": "text",
437
+ "text": "4.1 X-MAGICAL Benchmark ",
438
+ "text_level": 1,
439
+ "bbox": [
440
+ 174,
441
+ 670,
442
+ 387,
443
+ 685
444
+ ],
445
+ "page_idx": 4
446
+ },
447
+ {
448
+ "type": "text",
449
+ "text": "We introduce a cross-embodiment imitation learning benchmark, X-MAGICAL, which is based on the imitation learning benchmark MAGICAL [24], implemented on top of the physics engine PyMunk [25]. In this work, we consider a simplified 2D equivalent of a common household robotic sweeping task, wherein an agent has to push three objects into a predefined zone in the environment (colored in pink). We choose this task specifically because its long-horizon nature highlights how different agent embodiments can generate entirely different trajectories. The reward in this environment is defined as the fraction of debris swept into the zone at the end of the episode. ",
450
+ "bbox": [
451
+ 174,
452
+ 691,
453
+ 825,
454
+ 785
455
+ ],
456
+ "page_idx": 4
457
+ },
458
+ {
459
+ "type": "text",
460
+ "text": "Multiple Embodiments in X-MAGICAL. We create multiple embodiments by designing agents with different shapes and end-effectors that induce variations in how each agent solves a task. In Figure 1, we show three of these embodiments and some sample trajectories that solve the sweeping task. Please see Appendix B for a detailed description of the benchmark. Three agents are shaped like a stick and they differ only in length. We call them short-stick, medium-stick and long-stick based on the length of their body. The agent in the last row is called gripper: it is circular in shape and has two arms that can actuate. All agents are capable of two actions - a rotation around their axis and a translation in a forward/backward direction along this axis (similar to the agent in the MAGICAL benchmark). All agents have a two-dimensional action space and use force and torque control to change their position and orientation respectively. The gripper agent has an additional degree of freedom for opening or closing its fingers. The default state of the gripper’s fingers is open. For all agents, the state representation is a 16-dimensional vector with the following information: $( { \\bar { x } } , y )$ position of the agent, $( \\cos \\bar { \\theta } , \\sin \\theta _ { . } ^ { \\cdot }$ ) where $\\theta$ is the agent’s 2D orientation, and for each of the three debris: its $( x , y )$ position, its distance to the agent and its distance to the goal zone. We frame-stack [26] three consecutive state vectors to encode temporal and velocity information, resulting in a final state dimension of 48. ",
461
+ "bbox": [
462
+ 174,
463
+ 790,
464
+ 825,
465
+ 911
466
+ ],
467
+ "page_idx": 4
468
+ },
469
+ {
470
+ "type": "text",
471
+ "text": "",
472
+ "bbox": [
473
+ 174,
474
+ 90,
475
+ 825,
476
+ 171
477
+ ],
478
+ "page_idx": 5
479
+ },
480
+ {
481
+ "type": "text",
482
+ "text": "Demonstrations and Different Embodiment Strategies in X-MAGICAL. To learn task-specific representations for this task, we collect 1000 demonstrations per agent, where each demonstration consists in sweeping all three debris, initialized with random positions, into the target zone. This is the dataset $D _ { \\mathrm { a l l } }$ (described in Section 3.1) containing observation-only agent-specific demonstrations. In Figure 2, we highlight the differences that exist between the trajectories taken by these agents. Figure 2a shows a heat map of the frequency of visits (state visitation count) of each agent at every 2D position in the grid, across all demonstrations in the dataset. We plot the 2D projection of the state visitation count onto the $X Y$ plane with a bin width of 0.1. Yellow encodes higher state visitation whereas blue encodes lower state visitation. We observe that agent long-stick has less coverage of the environment as opposed to agent gripper, which has significantly more coverage. Similarly, we show the distribution of debris locations for all agents across all demonstrations in Figure 2b. In Figure 2c, we plot a randomly sampled trajectory from each agent’s demonstration pool. We use transparency to encode the start (lighter) and end (darker) of the trajectory. It is clear from this figure that each agent solves the task in a different manner. Additionally, there is a significant difference in the time taken by each agent to execute this task, as shown in Table 1. Agent long-stick is able to finish the task the quickest because of its long shape that can sweep all the debris at once, while agents short-stick and gripper take longer because they have to frequently push or grasp one debris at a time. These differences are the types of challenges that a representation must overcome to successfully generalize across embodiments. As such, X-MAGICAL serves to create a highly simplified version of a real-world scenario where we might want to learn new tasks from an observation dataset of humans performing these tasks in highly diverse ways. ",
483
+ "bbox": [
484
+ 174,
485
+ 178,
486
+ 825,
487
+ 429
488
+ ],
489
+ "page_idx": 5
490
+ },
491
+ {
492
+ "type": "text",
493
+ "text": "4.2 Baselines ",
494
+ "text_level": 1,
495
+ "bbox": [
496
+ 174,
497
+ 436,
498
+ 272,
499
+ 450
500
+ ],
501
+ "page_idx": 5
502
+ },
503
+ {
504
+ "type": "text",
505
+ "text": "Here, we describe the alternative reward functions we baseline our method against, color coded to match their appearance in Figs. 3, 4, and 5. 1) ImageNet: We use an ImageNet pre-trained ResNet-18 encoder with no additional self-supervised training, i.e., we load the pre-trained weights, discard the classification head, and use the 512-dimensional embedding space from the previous layer. 2) Goal classifier: We follow [27] and train a goal frame classifier on a binary classification task where the last frame of all the demonstrations is considered positive and all the others are considered negatives. We use the output probabilities of the classifier as the reward function. 3) LIFS: We implement the method from [16] which learns a feature space that is invariant to different embodiments using a contrastive loss function paired with an autoencoding loss. 4) TCN: single-view Time-Contrastive Network (TCN) [5] with positive and negative frame windows of 1 and 4 respectively. For more details regarding baseline implementations, see Appendix D.1.1. ",
506
+ "bbox": [
507
+ 174,
508
+ 458,
509
+ 825,
510
+ 592
511
+ ],
512
+ "page_idx": 5
513
+ },
514
+ {
515
+ "type": "text",
516
+ "text": "4.3 Implementation Details ",
517
+ "text_level": 1,
518
+ "bbox": [
519
+ 174,
520
+ 598,
521
+ 366,
522
+ 613
523
+ ],
524
+ "page_idx": 5
525
+ },
526
+ {
527
+ "type": "text",
528
+ "text": "Our encoder for all experiments and methods is a ResNet-18 [28] initialized with ImageNet pre-trained weights. We replace the classification head with an embedding layer outputting a 32-dimensional vector. The encoder is trained on images of resolution $2 2 4 \\times 2 2 4$ with ADAM [29] and a learning rate of $1 0 ^ { - 5 }$ Note that our learned reward is agnostic to the RL algorithm used – in this work, we opt for Soft-Actor Critic (SAC) [30], which is a reinforcement learning algorithm that has been successfully used to train policies for continuous control tasks [31]. Once the TCC encoder is trained, we use it to embed the observation frames as the agent interacts with the environment. ",
529
+ "bbox": [
530
+ 174,
531
+ 619,
532
+ 825,
533
+ 713
534
+ ],
535
+ "page_idx": 5
536
+ },
537
+ {
538
+ "type": "text",
539
+ "text": "5 Experiments ",
540
+ "text_level": 1,
541
+ "bbox": [
542
+ 173,
543
+ 723,
544
+ 307,
545
+ 739
546
+ ],
547
+ "page_idx": 5
548
+ },
549
+ {
550
+ "type": "text",
551
+ "text": "We execute a series of experiments to evaluate whether the learned reward functions are effective at visual imitation. Specifically, our experiments seek to answer the following questions: first (Section 5.1), in the same-embodiment case, where the demonstration dataset $D$ contains the embodiment of the learning agent, does our method enable successful reinforcement learning for that agent? Next (Section 5.2), we investigate our primary interest, the cross-embodiment case, where the demonstration dataset $D$ does not contain the embodiment of the learning agent. To additionally test our approach using real-world data (Section 5.3), we use the dataset from [6] to leverage real-world human demonstrations to learn policies in simulation. Note that each embodiment’s performance is evaluated over 50 episodes and all figures plot the mean performance over 5 random seeds, with a standard deviation shading of $\\pm 0 . 5$ . Videos of our results are in the supplementary video. ",
552
+ "bbox": [
553
+ 174,
554
+ 748,
555
+ 825,
556
+ 881
557
+ ],
558
+ "page_idx": 5
559
+ },
560
+ {
561
+ "type": "image",
562
+ "img_path": "images/43e882c2e5c9ae9bc4a4cb89eead1e6c094266389993350975196c84fc86b2ae.jpg",
563
+ "image_caption": [],
564
+ "image_footnote": [],
565
+ "bbox": [
566
+ 174,
567
+ 90,
568
+ 821,
569
+ 195
570
+ ],
571
+ "page_idx": 6
572
+ },
573
+ {
574
+ "type": "image",
575
+ "img_path": "images/aad585723541b372d579fefbbb51f0a4e09326d6305a358a51fe8ad3884e021e.jpg",
576
+ "image_caption": [
577
+ "Figure 3. Same-embodiment setting: Comparison of XIRL with other baseline reward functions, using SAC [30] for RL policy learning on the X-MAGICAL sweeping task. ",
578
+ "Figure 4. Cross-embodiment setting: XIRL performs favorably when compared with other baseline reward functions, trained on observation-only demonstrations from different embodiments. Each agent{long-stick, medium-stick, short-stick, gripper} is shown using demonstrations from the other 3 embodiments, with SAC [30] for RL policy learning on the X-MAGICAL sweeping task. "
579
+ ],
580
+ "image_footnote": [],
581
+ "bbox": [
582
+ 174,
583
+ 224,
584
+ 821,
585
+ 329
586
+ ],
587
+ "page_idx": 6
588
+ },
589
+ {
590
+ "type": "text",
591
+ "text": "5.1 Results on Learning from Same-Embodiment Demonstrations ",
592
+ "text_level": 1,
593
+ "bbox": [
594
+ 173,
595
+ 368,
596
+ 622,
597
+ 382
598
+ ],
599
+ "page_idx": 6
600
+ },
601
+ {
602
+ "type": "text",
603
+ "text": "In this experiment, we want to validate whether our approach of using a reward function trained with TCC is good enough to train agents to perform the task defined in a dataset of expert demonstrations. Note that the learned reward function has to be robust enough such that it can provide a useful signal for new states an agent might encounter while learning a policy and interacting with the environment. In Figure 3, we compare our method XIRL with baselines described in Section 4.2. We find XIRL is more sample-efficient than the other learned reward baselines. We attribute this sample efficiency to the fact that the TCC embeddings encode task progress which helps the agent learn to reach for objects and goal zones while interacting with the environment, rather than exploring in a purely random manner. This experiment provides evidence that XIRL’s reward function is suitable for downstream reinforcement learning. ",
604
+ "bbox": [
605
+ 174,
606
+ 388,
607
+ 825,
608
+ 507
609
+ ],
610
+ "page_idx": 6
611
+ },
612
+ {
613
+ "type": "text",
614
+ "text": "5.2 Results on Learning from Cross-Embodiment Demonstrations ",
615
+ "text_level": 1,
616
+ "bbox": [
617
+ 173,
618
+ 515,
619
+ 622,
620
+ 530
621
+ ],
622
+ "page_idx": 6
623
+ },
624
+ {
625
+ "type": "text",
626
+ "text": "After verifying that XIRL works on the embodiments it was trained with, we move to the experiments that answer the core question in our work: can XIRL generalize to unseen embodiments? In this section we conduct experiments where the reward function is learned using embodiments that are different from the ones on which the policy is trained. As noted in Table 1, the timescales with which the agents execute the task can vary significantly. We conduct four experiments, each one corresponding to holding-out one agent from the expert demonstration set. In each such experiment, we train an encoder on demonstrations from the remaining three agents. We compare with reward functions learned using TCN, LIFS, and goal frame classifiers. While both TCC and TCN are contrastive losses, the former makes explicit comparisons across different embodiments, whereas the latter implicitly relies on an encoder shared across embodiments to learn the cross-embodiment representation. In Figure 4, we show that XIRL generalizes to new agents significantly better than the other learned reward baselines. ",
627
+ "bbox": [
628
+ 173,
629
+ 536,
630
+ 825,
631
+ 683
632
+ ],
633
+ "page_idx": 6
634
+ },
635
+ {
636
+ "type": "text",
637
+ "text": "5.3 Results on Learning from Real-World Cross-Embodiment Demonstrations ",
638
+ "text_level": 1,
639
+ "bbox": [
640
+ 174,
641
+ 689,
642
+ 702,
643
+ 704
644
+ ],
645
+ "page_idx": 6
646
+ },
647
+ {
648
+ "type": "text",
649
+ "text": "In this experiment, we test how well we can learn rewards from more challenging real-world human demonstration videos. To do so, we use the dataset and State Pusher environment introduced in [6]. We train two XIRL encoders: XIRL (sim only) trained on 5 teleoperated simulated trajectories (i.e., no domain shift) and XIRL (real only) trained solely on the real-world human demonstrations without using any form of human labeling of paired frames. We compare our results to training the policy on the sparse reward from the environment and the RLV method presented in [6]. As demonstrated in Figure 5, we find our approach can improve the sample-efficiency of learning in the environment, compared to using RLV or solely the environment reward. ",
650
+ "bbox": [
651
+ 174,
652
+ 710,
653
+ 825,
654
+ 818
655
+ ],
656
+ "page_idx": 6
657
+ },
658
+ {
659
+ "type": "text",
660
+ "text": "5.4 Qualitative comparison between learned reward functions vs. handcrafted rewards ",
661
+ "text_level": 1,
662
+ "bbox": [
663
+ 173,
664
+ 824,
665
+ 759,
666
+ 839
667
+ ],
668
+ "page_idx": 6
669
+ },
670
+ {
671
+ "type": "text",
672
+ "text": "In Figures 6 and 7, we visualize and compare the XIRL reward function with the environment’s reward (ground truth) for the Sweeping task from X-MAGICAL (see Sec. 4.1 for details) and the State Pusher and Drawer Opening tasks from $[ 6 ] ^ { 4 }$ . We find that the learned reward is highly correlated with the ground truth reward from the environment for both successful demos (first column in Figures 6 and 7) and unsuccessful demos (second column in Figures 6 and 7). It is especially encouraging to see that in a sparser reward environment like the Drawer Opening task, XIRL provides a dense signal that should allow the agent to learn the task more efficiently. Additionally, we can see that in the example of the failed collision trajectory (i.e., second row third column in Fig. 7), where the arm collides with the drawer rather than opening it, XIRL is able to provide it with a partial reward (i.e., for correctly moving towards the drawer) as opposed to the environment reward which remains zero. ",
673
+ "bbox": [
674
+ 174,
675
+ 845,
676
+ 823,
677
+ 887
678
+ ],
679
+ "page_idx": 6
680
+ },
681
+ {
682
+ "type": "image",
683
+ "img_path": "images/336f6e56fadde7992fbb34f9016b8184166d06e85e5dd38fc2086c18cc15eab3.jpg",
684
+ "image_caption": [
685
+ "Figure 5. Real-world-demo cross-embodiment setting: Comparison of XIRL with baselines using the simulated State Pusher environment from [6]. XIRL (real only) leverages real-world demonstration videos of humans (left, row 2) to teach a robot arm in sim (left, row 1), but unlike [6], we do not use human-labeled data of paired frame correspondences. $\\mathrm { R L V ^ { \\ast } }$ denotes results taken verbatim from [6] which uses a different implementation of SAC for RL policy learning. "
686
+ ],
687
+ "image_footnote": [],
688
+ "bbox": [
689
+ 251,
690
+ 88,
691
+ 748,
692
+ 226
693
+ ],
694
+ "page_idx": 7
695
+ },
696
+ {
697
+ "type": "text",
698
+ "text": "",
699
+ "bbox": [
700
+ 173,
701
+ 282,
702
+ 826,
703
+ 376
704
+ ],
705
+ "page_idx": 7
706
+ },
707
+ {
708
+ "type": "image",
709
+ "img_path": "images/7dc35f5c98241570164e1208386c3d21140466f479c4540f2cf56d7b06bd8fa5.jpg",
710
+ "image_caption": [],
711
+ "image_footnote": [],
712
+ "bbox": [
713
+ 303,
714
+ 388,
715
+ 692,
716
+ 474
717
+ ],
718
+ "page_idx": 7
719
+ },
720
+ {
721
+ "type": "image",
722
+ "img_path": "images/af497430173dbd9d9ebdd0f01e8662f043721632071535ec3723b518aa43e7bc.jpg",
723
+ "image_caption": [
724
+ "Figure 6. X-MAGICAL demo cross-embodiment setting: Visualizing our learned reward function XIRL vs. the environment’s sparse reward on a successful and unsuccessful demonstration, for the short-stick agent on the X-MAGICAL sweeping task. The learned reward was trained on the three other agents. ",
725
+ "Figure 7. Real-world-demo cross-embodiment setting: Visualizing our learned XIRL reward function vs. the environment’s sparse reward on the State Pusher (top) and Drawer Opening (bottom) tasks from [6]. "
726
+ ],
727
+ "image_footnote": [],
728
+ "bbox": [
729
+ 238,
730
+ 515,
731
+ 756,
732
+ 674
733
+ ],
734
+ "page_idx": 7
735
+ },
736
+ {
737
+ "type": "text",
738
+ "text": "6 Conclusion ",
739
+ "text_level": 1,
740
+ "bbox": [
741
+ 173,
742
+ 726,
743
+ 294,
744
+ 742
745
+ ],
746
+ "page_idx": 7
747
+ },
748
+ {
749
+ "type": "text",
750
+ "text": "This paper presents XIRL, a framework for learning vision-based reward functions from videos of expert demonstrators exhibiting different embodiments. XIRL uses TCC to self-supervise a deep visual encoder from videos, and uses this encoder to generate rewards via simple distances to goal observations in the embedding space. XIRL enables unseen agents with new embodiments to learn the demonstrated tasks via IRL. Reward functions from XIRL are fully self-supervised from videos, and we can successfully learn tasks without requiring manually paired video frames [6] between the demonstrator and learner. In this sense, our method presents favorable scalability to an arbitrary number of embodiments or experts with varying skill levels. Experiments show that policies learned via XIRL are more sample efficient than multiple baseline alternatives, including TCN [5], LIFS [16], and RLV [6]. While our experiments demonstrate promising results for learning policies in simulated environments using rewards learned from both simulated and real-world videos, we have yet to show policy learning on a real robot, which we look forward to trying post-COVID. ",
751
+ "bbox": [
752
+ 174,
753
+ 751,
754
+ 825,
755
+ 911
756
+ ],
757
+ "page_idx": 7
758
+ },
759
+ {
760
+ "type": "text",
761
+ "text": "Acknowledgments ",
762
+ "text_level": 1,
763
+ "bbox": [
764
+ 174,
765
+ 89,
766
+ 321,
767
+ 106
768
+ ],
769
+ "page_idx": 8
770
+ },
771
+ {
772
+ "type": "text",
773
+ "text": "We would like to thank Alex Nichol, Nick Hynes, Sean Kirmani, Brent Yi and Jimmy Wu for fruitful technical discussions, Sam Toyer for invaluable help with setting up the simulated benchmark, and Karl Schmeckpeper for discussions and help related to RLV. ",
774
+ "bbox": [
775
+ 176,
776
+ 114,
777
+ 823,
778
+ 155
779
+ ],
780
+ "page_idx": 8
781
+ },
782
+ {
783
+ "type": "text",
784
+ "text": "References ",
785
+ "text_level": 1,
786
+ "bbox": [
787
+ 173,
788
+ 166,
789
+ 263,
790
+ 181
791
+ ],
792
+ "page_idx": 8
793
+ },
794
+ {
795
+ "type": "text",
796
+ "text": "[1] B. D. Argall, S. Chernova, M. Veloso, and B. Browning. A survey of robot learning from demonstration. Robotics and autonomous systems, 57(5), 2009. 1, 2, 11 \n[2] T. Zhang, Z. McCarthy, O. Jow, D. Lee, X. Chen, K. Goldberg, and P. Abbeel. Deep imitation learning for complex manipulation tasks from virtual reality teleoperation. In ICRA. IEEE, 2018. 1 \n[3] P. Florence, L. Manuelli, and R. Tedrake. Self-supervised correspondence in visuomotor policy learning. IEEE RAL, 5(2), 2019. 1 \n[4] P. Sermanet, K. Xu, and S. Levine. Unsupervised perceptual rewards for imitation learning. arXiv preprint arXiv:1612.06699, 2016. 1, 2, 11 \n[5] P. Sermanet, C. Lynch, Y. Chebotar, J. Hsu, E. Jang, S. Schaal, and S. Levine. Time-contrastive networks: Self-supervised learning from video. In 2018 IEEE International Conference on Robotics and Automation (ICRA), pages 1134–1141. IEEE, 2018. 1, 2, 3, 5, 6, 8, 11, 16 \n[6] K. Schmeckpeper, O. Rybkin, K. Daniilidis, S. Levine, and C. Finn. Reinforcement learning with videos: Combining offline observations with interaction, 2020. 1, 2, 3, 4, 6, 7, 8, 11, 20 \n[7] D. Dwibedi, Y. Aytar, J. Tompson, P. Sermanet, and A. Zisserman. Temporal cycle-consistency learning. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2, 3, 4, 12, 16 \n[8] C. Atkeson and S. Schaal. Robot learning from demonstration. In ICML, 1997. 2, 11 \n[9] T. Osa, J. Pajarinen, G. Neumann, J. Bagnell, P. Abbeel, and J. Peters. An algorithmic perspective on imitation learning. Found. Trends Robotics, 7:1–179, 2018. 2, 11 \n[10] F. Torabi, G. Warnell, and P. Stone. Behavioral cloning from observation. In IJCAI, 2018. 2, 11 \n[11] A. D. Edwards, H. Sahni, Y. Schroecker, and C. L. Isbell. Imitating latent policies from observation. arXiv preprint arXiv:1805.07914, 2018. 2, 11 \n[12] I. Radosavovic, X. Wang, L. Pinto, and J. Malik. State-only imitation learning for dexterous manipulation. arXiv preprint arXiv:2004.04650, 2020. 2, 11 \n[13] D. Pathak, P. Mahmoudieh, G. Luo, P. Agrawal, D. Chen, Y. Shentu, E. Shelhamer, J. Malik, A. A. Efros, and T. Darrell. Zero-shot visual imitation. In Proceedings of the IEEE conference on computer vision and pattern recognition workshops, pages 2050–2053, 2018. 2, 11 \n[14] Y. Aytar, T. Pfaff, D. Budden, T. Paine, Z. Wang, and N. de Freitas. Playing hard exploration games by watching youtube. In Advances in Neural Information Processing Systems, pages 2930–2941, 2018. 2, 3, 5, 11 \n[15] O. Mees, M. Merklinger, G. Kalweit, and W. Burgard. Adversarial skill networks: Unsupervised robot skill learning from video. In 2020 IEEE International Conference on Robotics and Automation (ICRA), pages 4188–4194. IEEE, 2020. 2, 11 \n[16] A. Gupta, C. Devin, Y. Liu, P. Abbeel, and S. Levine. Learning invariant feature spaces to transfer skills with reinforcement learning, 2017. 3, 5, 6, 8, 11, 16 \n[17] A. Singh, L. Yang, K. Hartikainen, C. Finn, and S. Levine. End-to-end robotic reinforcement learning without reward engineering. arXiv preprint arXiv:1904.07854, 2019. 3, 11 \n[18] L. Smith, N. Dhawan, M. Zhang, P. Abbeel, and S. Levine. Avid: Learning multi-stage tasks via pixel-level translation of human videos. arXiv preprint arXiv:1912.04443, 2019. 3, 11 \n[19] Y. Liu, A. Gupta, P. Abbeel, and S. Levine. Imitation from observation: Learning to imitate behaviors from raw video via context translation. In ICRA. IEEE, 2018. 3, 11 \n[20] P. Sharma, D. Pathak, and A. Gupta. Third-person visual imitation learning via decoupled hierarchical controller. In Advances in Neural Information Processing Systems, pages 2597–2607, 2019. 3, 11 \n[21] D. Hejna, L. Pinto, and P. Abbeel. Hierarchically decoupled imitation for morphological transfer. In International Conference on Machine Learning, pages 4159–4171. PMLR, 2020. 3, 11 \n[22] J.-Y. Zhu, T. Park, P. Isola, and A. A. Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV, 2017. 3, 11 \n[23] P. Henderson, R. Islam, P. Bachman, J. Pineau, D. Precup, and D. Meger. Deep reinforcement learning that matters. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 32, 2018. 5 \n[24] S. Toyer, R. Shah, A. Critch, and S. Russell. The magical benchmark for robust imitation. arXiv preprint arXiv:2011.00401, 2020. 5, 12 \n[25] V. Blomqvist. Pymunk: A easy-to-use pythonic rigid body 2d physics library (version 6.0.0), 2007. URL https://www.pymunk.org. 5 \n[26] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, et al. Human-level control through deep reinforcement learning. nature, 518(7540): 529–533, 2015. 6 \n[27] M. Vecerik, O. Sushkov, D. Barker, T. Rothorl, T. Hester, and J. Scholz. A practical approach to insertion with ¨ variable socket position using deep reinforcement learning. In 2019 International Conference on Robotics and Automation (ICRA), pages 754–760. IEEE, 2019. 6, 15, 16 \n[28] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 770–778, 2016. 6 \n[29] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint:1412.6980, 2014. 6 \n[30] T. Haarnoja, A. Zhou, P. Abbeel, and S. Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. arXiv preprint arXiv:1801.01290, 2018. 6, 7, 17 \n[31] T. Haarnoja, A. Zhou, K. Hartikainen, G. Tucker, S. Ha, J. Tan, V. Kumar, H. Zhu, A. Gupta, P. Abbeel, and S. Levine. Soft actor-critic algorithms and applications. arXiv preprint arXiv:1812.05905, 2018. 6 \n[32] C. Yang, X. Ma, W. Huang, F. Sun, H. Liu, J. Huang, and C. Gan. Imitation learning from observations by minimizing inverse dynamics disagreement. ArXiv, abs/1910.04417, 2019. 11 \n[33] L. Shao, T. Migimatsu, Q. Zhang, K. Yang, and J. Bohg. Concept2robot: Learning manipulation concepts from instructions and human demonstrations. Robotics: Science and Systems, 2020. 11 \n[34] G. Berseth and C. Pal. Visual imitation learning with recurrent siamese networks. ArXiv, abs/1901.07186, 2019. 11 \n[35] B. D. Ziebart, A. L. Maas, J. A. Bagnell, and A. K. Dey. Maximum entropy inverse reinforcement learning. In Aaai, volume 8, pages 1433–1438. Chicago, IL, USA, 2008. 11 \n[36] B. D. Ziebart, J. A. Bagnell, and A. K. Dey. Modeling interaction via the principle of maximum causal entropy. In ICML, 2010. 11 \n[37] I. J. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial networks. arXiv preprint arXiv:1406.2661, 2014. 11 \n[38] J. Ho and S. Ermon. Generative adversarial imitation learning. In NeurIPS, 2016. 11 \n[39] F. Torabi, G. Warnell, and P. Stone. Generative adversarial imitation from observation. arXiv preprint arXiv:1807.06158, 2018. 11 \n[40] B. C. Stadie, P. Abbeel, and I. Sutskever. Third-person imitation learning. arXiv:1703.01703, 2017. 11 \n[41] Y. Lu and J. Tompson. Adail: Adaptive adversarial imitation learning. NeurIPS Workshop on Learning Transferable Skills,, 2019. 11 \n[42] F. Liu, Z. Ling, T. Mu, and H. Su. State alignment-based imitation learning. arXiv preprint arXiv:1911.10947, 2019. 11 \n[43] W. Sun, A. Vemula, B. Boots, and J. Bagnell. Provably efficient imitation learning from observation alone. ArXiv, abs/1905.10948, 2019. 11 \n[44] K. Kim, Y. Gu, J. Song, S. Zhao, and S. Ermon. Domain adaptive imitation learning. arXiv, 2020. 11 \n[45] A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga, A. Desmaison, A. Kopf, E. Yang, Z. DeVito, M. Raison, A. Tejani, S. Chilamkurthy, B. Steiner, L. Fang, J. Bai, and S. Chintala. Pytorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems 32. Curran Associates, Inc., 2019. 14 \n[46] A. Buslaev, A. Parinov, E. Khvedchenya, V. Iglovikov, and A. A. Kalinin. Albumentations: fast and flexible image augmentations. arXiv e-prints, 2018. 16 \n[47] D. Yarats and I. Kostrikov. Soft actor-critic (sac) implementation in pytorch. https://github.com/ denisyarats/pytorch_sac, 2020. 17 \n[48] H. van Hasselt, A. Guez, and D. Silver. Deep reinforcement learning with double q-learning. arXiv e-prints, 2015. 17 \n[49] S. Fujimoto, H. van Hoof, and D. Meger. Addressing function approximation error in actor-critic methods. In Proceedings of the 35th International Conference on Machine Learning, ICML 2018, Stockholmsmassan, Stockholm, Sweden, July 10-15, 2018, 2018. 17 \n[50] A. M. Saxe, J. L. McClelland, and S. Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. arXiv e-prints, 2013. 17 \n[51] T. Chen, S. Kornblith, M. Norouzi, and G. Hinton. A simple framework for contrastive learning of visual representations. arXiv preprint arXiv:2002.05709, 2020. 17, 18 ",
797
+ "bbox": [
798
+ 171,
799
+ 191,
800
+ 826,
801
+ 907
802
+ ],
803
+ "page_idx": 8
804
+ },
805
+ {
806
+ "type": "text",
807
+ "text": "",
808
+ "bbox": [
809
+ 171,
810
+ 90,
811
+ 826,
812
+ 731
813
+ ],
814
+ "page_idx": 9
815
+ }
816
+ ]
parse/train/RO4DM85Z4P7/RO4DM85Z4P7_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/RO4DM85Z4P7/RO4DM85Z4P7_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SkxSv6VFvS/SkxSv6VFvS.md ADDED
@@ -0,0 +1,343 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DEFORMABLE KERNELS: ADAPTING EFFECTIVE RECEPTIVE FIELDS FOR OBJECT DEFORMATION
2
+
3
+ Hang $\mathbf { G a o ^ { 1 , 3 * } } ,$ Xizhou $\mathbf { Z } \mathbf { h } \mathbf { u } ^ { 2 , 3 * }$ , Steve $\mathbf { L i n ^ { 3 } }$ , Jifeng Dai3
4
+ 1UC Berkeley 2University of Science and Technology of China 3Microsoft Research Asia
5
+ hangg@eecs.berkeley.edu, ezra0408@mail.ustc.edu.cn
6
+ {stevelin,jifdai}@microsoft.com
7
+ http://people.eecs.berkeley.edu/˜hangg/deformable-kernels/
8
+
9
+ # ABSTRACT
10
+
11
+ Convolutional networks are not aware of an object’s geometric variations, which leads to inefficient utilization of model and data capacity. To overcome this issue, recent works on deformation modeling seek to spatially reconfigure the data towards a common arrangement such that semantic recognition suffers less from deformation. This is typically done by augmenting static operators with learned free-form sampling grids in the image space, dynamically tuned to the data and task for adapting the receptive field. Yet adapting the receptive field does not quite reach the actual goal – what really matters to the network is the effective receptive field (ERF), which reflects how much each pixel contributes. It is thus natural to design other approaches to adapt the ERF directly during runtime.
12
+
13
+ In this work, we instantiate one possible solution as Deformable Kernels (DKs), a family of novel and generic convolutional operators for handling object deformations by directly adapting the ERF while leaving the receptive field untouched. At the heart of our method is the ability to resample the original kernel space towards recovering the deformation of objects. This approach is justified with theoretical insights that the ERF is strictly determined by data sampling locations and kernel values. We implement DKs as generic drop-in replacements of rigid kernels and conduct a series of empirical studies whose results conform with our theories. Over several tasks and standard base models, our approach compares favorably against prior works that adapt during runtime. In addition, further experiments suggest a working mechanism orthogonal and complementary to previous works.
14
+
15
+ # 1 INTRODUCTION
16
+
17
+ The rich diversity of object appearance in images arises from variations in object semantics and deformation. Semantics describe the high-level abstraction of what we perceive, and deformation defines the geometric transformation tied to specific data (Gibson, 1950). Humans are remarkably adept at making abstractions of the world (Hudson & Manning, 2019); we see in raw visual signals, abstract semantics away from deformation, and form concepts.
18
+
19
+ Interestingly, modern convolutional networks follow an analogous process by making abstractions through local connectivity and weight sharing (Zhang, 2019). However, such a mechanism is an inefficient one, as the emergent representations encode semantics and deformation together, instead of as disjoint notions. Though a convolution responds accordingly to each input, how it responds is primarily programmed by its rigid kernels, as in Figure 1(a, b). In effect, this consumes large model capacity and data modes (Shelhamer et al., 2019).
20
+
21
+ We argue that the awareness of deformations emerges from adaptivity – the ability to adapt at runtime (Kanazawa et al., 2016; Jia et al., 2016; Li et al., 2019). Modeling of geometric transformations has been a constant pursuit for vision researchers over decades (Lowe et al., 1999; Lazebnik et al., 2006; Jaderberg et al., 2015; Dai et al., 2017). A basic idea is to spatially recompose data towards a common mode such that semantic recognition suffers less from deformation. A recent work that is representative of this direction is Deformable Convolution (Dai et al., 2017; Zhu et al., 2019). As shown in Figure 1(c), it augments the convolutions with free-form sampling grids in the data space. It is previously justified as adapting receptive field, or what we phrase as the “theoretical receptive field”, that defines which input pixels can contribute to the final output. However, theoretical receptive field does not measure how much impact an input pixel actually has. On the other hand, Luo et al. (2016) propose to measure the effective receptive field (ERF), i.e. the partial derivative of the output with respect to the input data, to quantify the exact contribution of each raw pixel to the convolution. Since adapting the theoretical receptive field is not the goal but a means to adapt the ERF, why not directly tune the ERF to specific data and tasks at runtime?
22
+
23
+ ![](images/a917c7f3a2bc01e2dd8b2cc933d94663ffbda1043f70c227f8d800fbf1704a7e.jpg)
24
+ Figure 1: Adaptation for deformation. We show how different $3 \times 3$ convolutions interact with deformations of two images. Kernel spaces are visualized as flat 2D Gaussians. Each “ $\cdot + \overrightarrow { \mathbf { \Gamma } }$ indicates a computation between a pixel and a kernel value sampled from the data and kernel space. Their colors represent corresponding kernel values. (a, b) Rigid kernels cannot adapt to specific deformations, thus consuming large model and data capacity. (c) Deformable Convolutions (Dai et al., 2017) reconfigure data towards common arrangement to counter the effects of geometric deformation. (d) Our Deformable Kernels (DKs) instead resample kernels and, in effect, adapt kernel spaces while leaving the data untouched. Note that (b) and (c) share kernel values but sample different data locations, while (b) and (d) share data locations but sample different kernel values.
25
+
26
+ Toward this end, we introduce Deformable Kernels (DKs), a family of novel and generic convolutional operators for deformation modeling. We aim to augment rigid kernels with the expressiveness to directly interact with the ERF of the computation during inference. Illustrated in Figure 1(d), DKs learn free-form offsets on kernel coordinates to deform the original kernel space towards specific data modality, rather than recomposing data. This can directly adapt ERF while leaving receptive field untouched. The design of DKs that is agnostic to data coordinates naturally leads to two variants – the global DK and the local DK, which behave differently in practice as we later investigate. We justify our approach with theoretical results which show that ERF is strictly determined by data sampling locations and kernel values. Used as a generic drop-in replacement of rigid kernels, DKs achieve empirical results coherent with our developed theory. Concretely, we evaluate our operator with standard base models on image classification and object detection. DKs perform favorably against prior works that adapt during runtime. With both quantitative and qualitative analysis, we further show that DKs can work orthogonally and complementarily with previous techniques.
27
+
28
+ # 2 RELATED WORKS
29
+
30
+ We distinguish our work within the context of deformation modeling as our goal, and dynamic inference as our means.
31
+
32
+ Deformation Modeling: We refer to deformation modeling as learning geometric transformations in 2D image space without regard to 3D. One angle to attack deformation modeling is to craft certain geometric invariances into networks. However, this usually requires designs specific to certain kinds of deformation, such as shift, rotation, reflection and scaling (Sifre & Mallat, 2013; Bruna & Mallat, 2013; Kanazawa et al., 2016; Cohen & Welling, 2016; Worrall et al., 2017; Esteves et al., 2018). Another line of work on this topic learns to recompose data by either semi-parameterized or completely free-form sampling in image space: Spatial Transformers (Jaderberg et al., 2015) learns 2D affine transformations, Deep Geometric Matchers (Rocco et al., 2017) learns thin-plate spline transformations, Deformable Convolutions (Dai et al., 2017; Zhu et al., 2019) learns free-form transformations.
33
+
34
+ We interpret sampling data space as an effective approach to adapt effective receptive fields (ERF) by directly changing receptive field. At a high-level, our Deformable Kernels (DKs) share intuitions with this line of works for learning geometric transformations, yet are instantiated by learning to sample in kernel space which directly adapt ERF while leaving theoretical receptive fields untouched. While kernel space sampling is also studied in Deformable Filter (Xiong et al., 2019) and KPConv (Thomas et al., 2019), but in their contexts, sampling grids are computed from input point clouds rather than learned from data corpora.
35
+
36
+ Dynamic Inference: Dynamic inference adapts the model or individual operators to the observed data. The computation of our approach differs from self-attention (Vaswani et al., 2017; Wang et al., 2018) in which linear or convolution modules are augmented with subsequent queries that extract from the same input. We consider our closest related works in terms of implementation as those approaches that adapt convolutional kernels at run time. It includes but is not limited to Dynamic Filters (Jia et al., 2016), Selective Kernels (Li et al., 2019) and Conditional Convolutions (Yang et al., 2019). All of these approaches can learn and infer customized kernel spaces with respect to the data, but are either less inefficient or are loosely formulated. Dynamic Filters generate new filters from scratch, while Conditional Convolutions extend this idea to linear combinations of a set of synthesized filters. Selective Kernels are, on the other hand, comparably lightweight, but aggregating activations from kernels of different size is not as compact as directly sampling the original kernel space. Another line of works contemporary to ours (Shelhamer et al., 2019; Wang et al., 2019) is to compose free-form filters with structured Gaussian filters, which essentially transforms kernel spaces by data. Our DKs also differ from these works with the emphasize of direct adaptation the ERF rather than the theoretical receptive field. As mentioned previously, the true goal should be to adapt the ERF, and to our knowledge, our work is the first to study dynamic inference of ERFs.
37
+
38
+ # 3 APPROACH
39
+
40
+ We start by covering preliminaries on convolutions, including the definition of effective receptive field (ERF). We then formulate a theoretical framework for analyzing ERFs, and thus motivate our Deformable Kernels (DKs). We finally elaborate different DK variants within such a framework. Our analysis suggests compatibility between DKs and the prior work.
41
+
42
+ # 3.1 A DIVE INTO CONVOLUTIONS
43
+
44
+ 2D Convolution: Let us first consider an input image $\pmb { I } \in \mathbb { R } ^ { D \times D }$ . By convolving it with a kernel $\pmb { W } \in \mathbb { R } ^ { K \times K }$ of stride 1, we have an output image $o$ whose pixel values at each coordinate $j \in \mathbb R ^ { 2 }$ can be expressed as
45
+
46
+ $$
47
+ O _ { j } = \sum _ { k \in \mathcal { K } } I _ { j + k } W _ { k } ,
48
+ $$
49
+
50
+ by enumerating discrete kernel positions $\boldsymbol { k }$ within the support $\mathcal { K } = [ - K / 2 , K / 2 ] ^ { 2 } \cap \mathbb { Z }$ . This defines a rigid grid for sampling data and kernels.
51
+
52
+ Theoretical Receptive Field: The same kernel $W$ can be stacked repeatedly to form a linear convolutional network with $n$ layers. The theoretical receptive field can then be imagined as the “accumulative coverage” of kernels at each given output unit on the input image by deconvolving back through the network. This property characterizes a set of input fields that could fire percepts onto corresponding output pixels. The size of a theoretical receptive field scales linearly with respect to the network depth $n$ and kernel size $K$ (He et al., 2016).
53
+
54
+ Effective Receptive Field: Intuitively, not all pixels within a theoretical receptive field contribute equally. The influence of different fields varies from region to region thanks to the central emphasis of stacked convolutions and also to the non-linearity induced by activations. The notion of effective receptive field (ERF) (Luo et al., 2016) is thus introduced to measure the impact of each input pixel on the output at given locations. It is defined as a partial derivative field of the output with respect to the input data. With the numerical approximations in linear convolution networks, the ERF was previously identified as a Gaussian-like soft attention map over input images whose size grows fractionally with respect to the network depth $n$ and linearly to the kernel size $K$ . Empirical results validate this idea under more complex and realistic cases when networks exploit non-linearities, striding, padding, skip connections, and subsampling.
55
+
56
+ # 3.2 ANALYSIS ON EFFECTIVE RECEPTIVE FIELDS
57
+
58
+ We aim to revisit and complement the previous analysis on ERFs by Luo et al. (2016). While the previous analysis concentrates on studying the expectation of an ERF, i.e., when network depth $n$ approaches infinity or all kernels are randomly distributed without learning in general, our analysis focuses on how we can perturb the computation such that the change in ERF is predictable, given an input and a set of kernel spaces.
59
+
60
+ We start our analysis by considering a linear convolutional network, without any unit activations, as defined in Section 3.1. For consistency, superscripts are introduced to image $\pmb { I }$ , kernel $W$ , and subscripts to kernel positions $\boldsymbol { k }$ to denote the index $s \in [ 1 , n ]$ of each layer. Formally, given an input image $\pmb { I } ^ { ( 0 ) }$ and a set of $K \times K$ kernels $\{ W ^ { ( s ) } \} _ { s = 1 } ^ { n }$ of stride 1, we can roll out the final output ${ \cal O } \equiv { \cal I } ^ { ( n ) }$ by unfolding Equation 1 as
61
+
62
+ $$
63
+ \begin{array} { l } { { { \cal I } _ { j } ^ { ( n ) } = \displaystyle \sum _ { k _ { n } \in { \cal K } } { \cal I } _ { j + k _ { n } } ^ { ( n - 1 ) } { \cal W } _ { k _ { n } } ^ { ( n ) } = \displaystyle \sum _ { ( k _ { n - 1 } , k _ { n } ) \in { \cal K } ^ { 2 } \atop { } } { \cal I } _ { j + k _ { n } + k _ { n - 1 } } ^ { ( n - 2 ) } { \cal W } _ { k _ { n } } ^ { ( n ) } { \cal W } _ { k _ { n - 1 } } ^ { ( n - 1 ) } = \cdots } } \\ { { = \displaystyle \sum _ { ( k _ { 1 } , k _ { 2 } , \ldots , k _ { n } ) \in { \cal K } ^ { n } } \left( { \cal I } _ { j + \sum _ { s = 1 } ^ { n } k _ { s } } ^ { ( 0 ) } \cdot \prod _ { s = 1 } ^ { n } { \cal W } _ { k _ { s } } ^ { ( s ) } \right) . } } \end{array}
64
+ $$
65
+
66
+ By definition1, the effective receptive field value $\mathcal { R } ^ { ( n ) } ( i ; j ) \equiv \partial I _ { j } ^ { ( n ) } / \partial I _ { i } ^ { ( 0 ) }$ of output coordinate $j$ that takes input coordinate $_ i$ can be computed by
67
+
68
+ $$
69
+ \mathcal { R } ^ { ( n ) } ( i ; j ) = \sum _ { ( k _ { 1 } , k _ { 2 } , \ldots , k _ { n } ) \in K ^ { n } } \left( \mathbb { 1 } \left[ j + \sum _ { s = 1 } ^ { n } k _ { s } = i \right] \cdot \prod _ { s = 1 } ^ { n } W _ { k _ { s } } ^ { ( s ) } \right) ,
70
+ $$
71
+
72
+ where $\mathbb { 1 } [ \cdot ]$ denotes the indicator function. This result indicates that ERF is related only to the data sampling location $j$ , kernel sampling location $\boldsymbol { k }$ , and kernel matrices $\{ W ^ { ( s ) } \}$ .
73
+
74
+ If we replace the $m ^ { \mathrm { t h } }$ kernel $W ^ { ( m ) }$ with a $1 \times 1$ kernel of a single parameter $W _ { \tilde { \boldsymbol { k } } _ { m } } ^ { ( m ) }$ sampled from it, the value of ERF becomes to
75
+
76
+ $$
77
+ \mathcal { R } ^ { ( n ) } ( i ; j , \tilde { k } _ { m } ) = \sum _ { ( k _ { 1 } , \dots , k _ { m - 1 } , k _ { m + 1 } , \dots , k _ { n } ) \in K ^ { n - 1 } } \left( \mathbb { 1 } \left[ j + \sum _ { s \in \mathbb { S } } k _ { s } = i \right] \cdot \prod _ { s \in \mathbb { S } } W _ { k _ { s } } ^ { ( s ) } \cdot W _ { \tilde { k } _ { m } } ^ { ( m ) } \right) ,
78
+ $$
79
+
80
+ where $\mathbb { S } = [ 1 , n ] \backslash \{ m \}$ . Since a $K \times K$ kernel can be deemed as a composition of $K ^ { 2 } 1 \times 1$ kernels distributed on a square grid, Equation 3 can thus be reformulated as
81
+
82
+ $$
83
+ \mathcal { R } ^ { ( n ) } ( i ; j ) = \sum _ { k _ { m } \in \mathcal { K } } \mathcal { R } ^ { ( n ) } ( i ; j + k _ { m } , k _ { m } ) .
84
+ $$
85
+
86
+ For the case of complex non-linearities, where we here consider post $\mathrm { R e L U } ^ { 2 }$ activations in Equation 1,
87
+
88
+ $$
89
+ O _ { j } = \operatorname* { m a x } ( \sum _ { k \in \mathcal { K } } I _ { j + k } W _ { k } , 0 ) .
90
+ $$
91
+
92
+ We can follow a similar analysis and derive corresponding ERF as
93
+
94
+ $$
95
+ \begin{array} { r l } & { \mathcal { R } ^ { ' ( n ) } ( i ; j , \tilde { k } _ { m } ) = \displaystyle \sum _ { ( k _ { 1 } , \cdots , k _ { m - 1 } , k _ { m + 1 } , \cdots , k _ { n } ) \in K ^ { n - 1 } } \left( \mathcal { C } ^ { ( n ) } ( i ; j , k _ { 1 } , \cdots , k _ { n } , \tilde { k } _ { m } ) \cdot \prod _ { s \in \mathbb { S } } W _ { \tilde { k } _ { s } } ^ { ( s ) } \cdot W _ { \tilde { k } _ { m } } ^ { m } \right) } \\ & { \mathcal { C } ^ { ( n ) } ( i ; j , k _ { 1 } , \cdots , k _ { n } , \tilde { k } _ { m } ) = \mathbb { 1 } \big [ j + \displaystyle \sum _ { s \in \mathbb { S } } k _ { s } = i \big ] \prod _ { s \in \mathbb { S } } \mathbb { 1 } \big [ \displaystyle I _ { j } ^ { ( s - 1 ) } W _ { \tilde { k } _ { s } } ^ { ( s ) } > 0 \big ] \mathbb { 1 } \big [ I _ { j } ^ { ( m - 1 ) } W _ { \tilde { k } _ { m } } ^ { ( m ) } > 0 \big ] . } \end{array}
96
+ $$
97
+
98
+ Here we can see that the ERF becomes data-dependent due to the coefficient $\mathcal { C }$ , which is tied to input coordinates, kernel sampling locations, and input data $\pmb { I } ^ { ( 0 ) }$ . The more detailed analysis of this coefficient is beyond the scope of this paper. However, it should be noted that this coefficient only “gates” the contribution of the input pixels to the output. So in practice, ERF is “porous” – there are inactive (or gated) pixel units irregularly distributed around the ones that fire. This phenomenon also appeared in previous studies (such as in Luo et al. (2016), Figure 1). The maximal size of an ERF is still controlled by the data sampling location and kernel values as in the linear cases in Equation 5.
99
+
100
+ A nice property of Equation 4 and Equation 5 is that all computations are linear, making it compatible with any linear sampling operators for querying kernel values of fractional coordinates. In other words, sampling kernels in effect samples the ERF on the data in the linear case, but also roughly generalizes to non-linear cases as well. This finding motivates our design of Deformable Kernels (DKs) in Section 3.3.
101
+
102
+ # 3.3 DEFORMABLE KERNELS
103
+
104
+ In the context of Equation 1, we resample the kernel $W$ with a group of learned kernel offsets denoted as $\{ \Delta k \}$ that correspond to each discrete kernel position $\boldsymbol { k }$ . This defines our DK as
105
+
106
+ $$
107
+ O _ { j } = \sum _ { k \in \mathcal K } I _ { j + k } W _ { k + \Delta k } ,
108
+ $$
109
+
110
+ and the value of ERF as
111
+
112
+ $$
113
+ \mathcal { R } _ { \mathrm { D K } } ^ { ( n ) } ( i ; j ) = \sum _ { k _ { m } \in { \mathcal { K } } } \mathcal { R } ^ { ( n ) } ( i ; j + k _ { m } , k _ { m } + \Delta k _ { m } ) .
114
+ $$
115
+
116
+ Note that this operation leads to sub-pixel sampling in the kernel space. In practice, we use bilinear sampling to interpolate within the discrete kernel grid.
117
+
118
+ Intuitively, the size (resolution) of the original kernel space can affect sampling performance. Concretely, suppose we want to sample a $3 \times 3$ kernel. DKs do not have any constraint on the size of the original kernel space, which we call the “scope size” of DKs. That said, we can use a $W$ of any size $K ^ { \prime }$ even though the number of sampling locations is fixed as $K ^ { 2 }$ . We can thus exploit large kernels – the largest ones can reach $9 \times 9$ in our experiments with nearly no overhead in computation since bilinear interpolations are extremely lightweight compared to the cost of convolutions. This can also increase the number of learning parameters, which in practice might become intractable if not handled properly. In our implementation, we will exploit depthwise convolutions (Howard et al., 2017) such that increasing scope size induces a negligible amount of extra parameters.
119
+
120
+ As previously discussed, sampling the kernel space in effect transforms into sampling the ERF. On the design of locality and spatial granularity of our learned offsets, DK naturally delivers two variants ��� the global DK and the local DKs, as illustrated in Figure 2. In both operators, we learn a kernel offset generator $\mathcal { G }$ that maps an input patch into a set of kernel offsets that are later applied to rigid kernels.
121
+
122
+ In practice, we implement $\mathcal { G } _ { \mathrm { g l o b a l } }$ as a stack of one global average pooling layer, which reduces feature maps into a vector, and another fully-connected layer without non-linearities, which projects the reduced vector into an offset vector of $2 K ^ { 2 }$ dimensions. Then, we apply these offsets to all convolutions for the input image following Equation 7. For local DKs, we implement $\mathcal { G } _ { \mathrm { l o c a l } }$ as an extra convolution that has the same configuration as the target kernel, except that it only has $2 K ^ { 2 }$ output channels. This produces kernel sampling offsets $\{ \Delta k \}$ that are additionally indexed by output locations $j$ . It should be noted that similar designs were also discussed in Jia et al. (2016), in which filters are generated given either an image or individual patches from scratch rather than by resampling.
123
+
124
+ ![](images/2bb9668aaa37218849f82168db9cfaca57d102ffed1c046e386e2dacf5e7d991.jpg)
125
+ Figure 2: Instantiations. We show how DK variants works with an example image that contains a large and a small object. (a) The global DK learns one set of kernel sampling grid given an input image and apply it to all data positions. (b) The local DK adapts kernels for each input patches, and induces better locality for deformation modeling.
126
+
127
+ Intuitively, we expect the global DK to adapt kernel space between different images but not within a single input. The local DK can further adpat to specific image patches: for smaller objects, it is better to have shaper kernels and thus denser ERF; for larger objects, flatter kernels can be more beneficial for accumulating a wider ERF. On a high level, local DKs can preserve better locality and have larger freedom to adapt kernel spaces comparing to its global counterpart. We later compare these operators in our experiments.
128
+
129
+ # 3.4 LINK WITH DEFORMABLE CONVOLUTIONS
130
+
131
+ The core idea of DKs is to learn adaptive offsets to sample the kernel space for modeling deformation, which makes them similar to Deformable Convolutions (Dai et al., 2017; Zhu et al., 2019), at both the conceptual and implementation levels. Here, we distinguish DKs from Deformable Convolutions and show how they can be unified.
132
+
133
+ Deformable Convolutions can be reformulated in a general form as
134
+
135
+ $$
136
+ O _ { j } = \sum _ { k \in \mathcal { K } } I _ { j + k + \Delta j } W _ { k } ,
137
+ $$
138
+
139
+ where they aim to learn a group of data offsets $\{ \Delta j \}$ with respect to discrete data positions $j$ . For consistency for analysis, the value of effective receptive field becomes
140
+
141
+ $$
142
+ \mathcal { R } _ { \mathrm { D C } } ^ { ( n ) } ( i ; j ) = \sum _ { k _ { m } \in \mathcal { K } } \mathcal { R } ^ { ( n ) } ( i ; j + k _ { m } + \Delta j _ { m } , k _ { m } ) .
143
+ $$
144
+
145
+ This approach essentially recomposes the input image towards common modes such that semantic recognition suffers less from deformation. Moreover, according to our previous analysis in Equation 5, sampling data is another way of sampling the ERF. This, to a certain extent, also explains why Deformable Convolutions are well suited for learning deformation-agnostic representations.
146
+
147
+ Moreover, we can learn both data and kernel offsets in one convolutional operator. Conceptually, this can be done by merging Equation 7 with Equation 9, which leads to
148
+
149
+ $$
150
+ \begin{array} { c } { { \displaystyle { \cal O } _ { j } = \displaystyle \sum _ { k \in { \cal K } } { \cal I } _ { j + k + \Delta j } W _ { k + \Delta k } , } } \\ { { \displaystyle \mathcal { R } _ { \mathrm { D C + D K } } ^ { ( n ) } ( i ; j ) = \displaystyle \sum _ { k _ { m } \in { \cal K } } { \cal R } ^ { ( n ) } ( i ; j + k _ { m } + \Delta j _ { m } , k _ { m } + \Delta k _ { m } ) . } } \end{array}
151
+ $$
152
+
153
+ We also investigate this operator in our experiments. Although the two techniques may be viewed as serving a similar purpose, we find the collaboration between Deformable Kernels and Deformable Convolutions to be powerful in practice, suggesting strong compatibility.
154
+
155
+ # 4 EXPERIMENTS
156
+
157
+ We evaluate our Deformable Kernels (DKs) on image classification using ILSVRC and object detection using the COCO benchmark. Necessary details are provided to reproduce our results, together with descriptions on base models and strong baselines for all experiments and ablations. For taskspecific considerations, we refer to each corresponding section.
158
+
159
+ Implementation Details: We implement our operators in PyTorch and CUDA. We exploit depthwise convolutions when designing our operator for better computational efficiency3. We initialize kernel grids to be uniformly distributed within the scope size. For the kernel offset generator, we set its learning rate to be a fraction of that of the main network, which we cross-validate for each base model. We also find it important to clip sampling locations inside the original kernel space, such that $\pmb { k } + \Delta \pmb { k } \in \mathcal { K }$ in Equation 7.
160
+
161
+ Base Models: We choose our base models to be ResNet-50 (He et al., 2016) and MobileNetV2 (Sandler et al., 2018), following the standard practice for most vision applications. As mentioned, we exploit depthwise convolution and thus make changes to the ResNet model. Concretely, we define our ResNet-50-DW base model by replacing all $3 \times 3$ convolutions by its depthwise counterpart while doubling the dimension of intermediate channels in all residual blocks. We find it to be a reasonable base model compared to the original ResNet-50, with comparable performance on both tasks. During training, we set the weight decay to be $4 \times 1 0 ^ { - 5 }$ rather than the common $1 0 ^ { - 4 }$ for both models since depthwise models usually underfit rather than overfit (Xie et al., 2017; Howard et al., 2017; Hu et al., 2018). We set the learning rate multiplier of DK operators as $1 0 ^ { - 2 }$ fo r ResNet-50-DW and $1 0 ^ { - 1 }$ for MobileNet-V2 in all of our experiments.
162
+
163
+ Strong Baselines: We develop our comparison with two previous works: Conditional Convolutions (Yang et al., 2019) for dynamics inference, and Deformable Convolutions (Dai et al., 2017; Zhu et al., 2019) for deformation modeling. We choose Conditional Convolutions due to similar computation forms – sampling can be deemed as an elementewise “expert voting” mechanism. For fair comparisons, We reimplement and reproduce their results. We also combine our operator with these previous approach to show both quantitative evidence and qualitative insight that our working mechanisms are compatible.
164
+
165
+ # 4.1 IMAGE CLASSIFICATION
166
+
167
+ We first train our networks on the ImageNet 2012 training set (Deng et al., 2009). We adopt a common experiment protocol for fair comparisons as in Goyal et al. (2017); Loshchilov & Hutter (2017). For more details, please refer to our supplement.
168
+
169
+ We first ablate the scope size of kernels for our DKs and study how it can affect model performance using ResNet-50-DW. As shown in Table 1, our DKs are sensitive to the choice of the scope size. We shown that when only applied to $3 \times 3$ convolutions inside residual bottlenecks, local DKs induce a $+ 0 . 7$ performance gain within the original scope. By further enlarging the scope size, performance increases yet quickly plateaus at scope $4 \times 4$ , yielding largest $+ 1 . 4$ gain for top-1 accuracy. Our speculation is that, although increasing scope size theoretically means better interpolation, it also makes the optimization space exponentially larger for each convolutional layer. And since number of entries for updating is fixed, this also leads to relatively sparse gradient flows. In principle, we set default scope size at $4 \times 4$ for our DKs.
170
+
171
+ We next move on and ablate our designs by comparing the global DK with the local DK, shown in the table. Both operators helps while the local variants consistently performs better than their global counterparts, bringing a $+ 0 . 5$ gap on both base models. We also study the effect of using more DKs in the models – the $1 \times 1$ convolutions are replaced by global $\mathrm { D K } \dot { \mathrm { s } } ^ { 4 }$ with scope $2 \times 2$ . Note that all $1 \times 1$ convolutions are not depthwise, and therefore this operation induces nearly 4 times of parameters. We refer their results only for ablation and show that adding more DKs still helps – especially for MobileNet-V2 since it is under-parameterized. This finding also holds for previous models (Yang et al., 2019) as well.
172
+
173
+ Table 1: Ablations of scope size and different instantiations of DK for image classification. Using proper scope size, and more DK layers boosts performance. Modeling individual offset kernel grid for each data entries is also beneficial.
174
+
175
+ <table><tr><td>Backbone</td><td>1×1Deformable Kernels</td><td>3×3Deformable Kernels</td><td>top1 (%)</td><td>#P (M)</td><td>GFLOPs</td></tr><tr><td>ResNet-50</td><td>w/o</td><td>w/o</td><td>76.7</td><td>25.6</td><td>3.86</td></tr><tr><td>ResNet-50-DW</td><td>w/o</td><td>w/o</td><td>76.3</td><td>23.7</td><td>3.82</td></tr><tr><td rowspan="4">ResNet-50-DW</td><td rowspan="4">w/o</td><td>local, scope size 3×3</td><td>77.4</td><td>24.9</td><td>4.32</td></tr><tr><td>local, scope size 4×4</td><td>78.1</td><td>25.0</td><td>4.32</td></tr><tr><td>local, scope size 5×5</td><td>77.8</td><td>25.0</td><td>4.32</td></tr><tr><td>local, scope size 9×9</td><td>77.4</td><td>25.4</td><td>4.32</td></tr><tr><td rowspan="4">ResNet-50-DW</td><td>w/o</td><td>global, scope size 4×4</td><td>77.6</td><td>23.9</td><td>3.82</td></tr><tr><td>global,scope size 2×2</td><td>global, scope size 4×4</td><td>77.9</td><td>80.1</td><td>4.09</td></tr><tr><td>w/o</td><td>local, scope size 4×4</td><td>78.1</td><td>25.0</td><td>4.32</td></tr><tr><td>global, scope size 2×2</td><td>local, scope size 4×4</td><td>78.5</td><td>81.2</td><td>4.60</td></tr><tr><td>MobileNet-V2</td><td>w/o</td><td>w/o</td><td>71.9</td><td>3.5</td><td>0.31</td></tr><tr><td rowspan="4">MobileNet-V2</td><td>w/o</td><td>global, scope size 4×4</td><td>73.6</td><td>3.7</td><td>0.31</td></tr><tr><td>global, scope size 2×2</td><td>global, scope size 4×4</td><td>74.5</td><td>10.1</td><td>0.34</td></tr><tr><td>w/o</td><td>local, scope size 4×4</td><td>74.1</td><td>4.7</td><td>0.73</td></tr><tr><td>global, scope size 2×2</td><td>local, scope size 4×4</td><td>74.8</td><td>11.1</td><td>0.76</td></tr></table>
176
+
177
+ Table 2: Comparisons to strong baselines for image classification DKs perform comparably or superiorly to previous methods. Further combinations yield consistent gain, suggesting orthogonal and compatible working mechanisms.
178
+
179
+ <table><tr><td>Backbone</td><td>1×1Deformable Kernels</td><td>3×3DeformableKernels</td><td>top1 (%)</td><td>#P (M)</td><td>GFLOPs</td></tr><tr><td>ResNet-50-DW</td><td>w/o</td><td>local, scope size 4×4</td><td>78.1</td><td>25.0</td><td>4.32</td></tr><tr><td>ResNet-50-DW</td><td>w/o</td><td>w/o</td><td>77.6</td><td>42.5</td><td>7.13</td></tr><tr><td rowspan="2">with SCC ResNet-50-DW</td><td rowspan="2">w/0</td><td>local, scope size 4×4</td><td>78.9</td><td>43.7</td><td>7.61</td></tr><tr><td>w/o</td><td>78.0</td><td>24.8</td><td>4.10</td></tr><tr><td>with DCN</td><td></td><td>local, scope size 4×4</td><td>79.0</td><td>26.1</td><td>4.60</td></tr><tr><td>MobileNet-V2 MobileNet-V2</td><td>w/o</td><td>local, scope size 4×4</td><td>74.1</td><td>4.7</td><td>0.73</td></tr><tr><td rowspan="2">with SCC</td><td rowspan="2">w/o</td><td>w/o</td><td>74.3</td><td>19.0</td><td>2.19</td></tr><tr><td>local, scope size 4×4</td><td>75.5</td><td>19.7</td><td>2.48</td></tr><tr><td rowspan="2">MobileNet-V2 with DCN</td><td rowspan="2">w/0</td><td>w/o</td><td>73.2</td><td>4.6</td><td>0.52</td></tr><tr><td>local, scope size 4×4</td><td>74.4</td><td>5.8</td><td>0.93</td></tr></table>
180
+
181
+ We further compare and combine DKs with Conditional Convolutions and Deformable Convolutions. Results are recorded in Table 2. We can see that DKs perform comparably on ResNet-V2 and compare favorably on MobileNet-V2 – improve $+ 0 . 9$ from Deformable Convolutions and achieve comparable results with less than a quarter number of parameters compared to Conditional Convolutions. Remarkably, we also show that if combined together, even larger performance gains are in reach. We see consistent boost in top-1 accuracy compared to strong baselines: $+ 1 . 3 / + 1 . 0$ on ResNet-50-DW, and $+ 1 . 2 / + 1 . 2$ on MobileNet-V2. These gaps are bigger than those from our own ablation, suggesting the working mechanisms across the operators to be orthogonal and compatible.
182
+
183
+ # 4.2 OBJECT DETECTION
184
+
185
+ We examine DKs on the COCO benchmark (Lin et al., 2014). For all experiments, we use Faster R-CNN (Ren et al., 2015) with FPN (Lin et al., 2017) as the base detector, plugging in the backbones we previously trained on ImageNet. For MobileNet-V2, we last feature maps of the each resolution for FPN post aggregation. Following the standard protocol, training and evaluation are performed on the $1 2 0 \mathrm { k }$ images in the train-val split and the 20k images in the test-dev split, respectively. For evaluation, we measure the standard mean average precision (mAP) and shattered scores for small, medium and large objects.
186
+
187
+ Table 3 and Table 4 follow the same style of analysis as in image classification. While the baseline methods of ResNet achieve $3 6 . 6 \ \mathrm { m A P } ,$ indicating a strong baseline detector, applying local DKs brings a $+ 1 . 2 \mathrm { m A P }$ improvement when replacing 3x3 rigid kernels alone and a $+ 1 . 8$ mAP improvement when replacing both 1x1 and 3x3 rigid kernels. This trend magnifies on MobileNet-v2 models, where we see an improvement of $+ 1 . 6$ mAP and $+ 2 . 4 \ \mathrm { m A P } ,$ , respectively. Results also confirm the effectiveness of local DKs against global DKs, which is again in line with our expectation that local DKs can model locality better.
188
+
189
+ Table 3: Ablations for object detection. Consistent results with image classification.
190
+
191
+ <table><tr><td>Backbone</td><td>1×1Deformable Kernels</td><td>3×3Deformable Kernels</td><td>mAP</td><td>mAPs</td><td>mAPM</td><td>mAPL</td></tr><tr><td>ResNet-50-DW</td><td>w/o</td><td>w/o</td><td>36.6</td><td>22.1</td><td>39.9</td><td>46.6</td></tr><tr><td rowspan="4">ResNet-50-DW</td><td>w/o</td><td>global, scope size 4×4</td><td>36.7</td><td>22.6</td><td>40.2</td><td>46.9</td></tr><tr><td>global,scope size 2×2</td><td>global, scope size 4×4</td><td>37.1</td><td>23.1</td><td>40.6</td><td>46.6</td></tr><tr><td>w/o</td><td>local, scope size 4×4</td><td>37.8</td><td>23.4</td><td>41.6</td><td>48.2</td></tr><tr><td>global, scope size 2×2</td><td>local, scope size 4×4</td><td>38.4</td><td>23.4</td><td>42.0</td><td>49.4</td></tr><tr><td>MobileNet-V2</td><td>w/o</td><td>w/o</td><td>31.3</td><td>18.6</td><td>33.7</td><td>40.4</td></tr><tr><td rowspan="4">MobileNet-V2</td><td>w/o</td><td>global, scope size 4×4</td><td>32.5</td><td>19.6</td><td>35.8</td><td>41.9</td></tr><tr><td>global,scope size 2×2</td><td>global, scope size 4×4</td><td>32.9</td><td>19.4</td><td>35.5</td><td>42.8</td></tr><tr><td>w/0</td><td>local, scope size 4×4</td><td>32.9</td><td>19.5</td><td>36.0</td><td>42.5</td></tr><tr><td>global, scope size 2×2</td><td>local, scope size 4×4</td><td>33.7</td><td>20.2</td><td>36.7</td><td>44.0</td></tr></table>
192
+
193
+ Table 4: Comparisons to strong baselines for object detection DKs perform fall short to Deformable Convolution, but combination still improves performance.
194
+
195
+ <table><tr><td>Backbone</td><td>1×1Deformable Kernels</td><td>3×3DeformableKernels</td><td>mAP</td><td>mAPs</td><td>mAPM</td><td>mAPL</td></tr><tr><td>ResNet-50-DW</td><td>global, scope size 2×2</td><td>local, scope size 4×4</td><td>38.4</td><td>23.4</td><td>42.0</td><td>49.4</td></tr><tr><td>ResNet-50-DW</td><td>w/o</td><td>w/o</td><td>36.3</td><td>22.1</td><td>39.3</td><td>47.0</td></tr><tr><td rowspan="2">with SCC ResNet-50-DW</td><td rowspan="2">w/o</td><td>local, scope size 4×4</td><td>38.0</td><td>23.4</td><td>41.9</td><td>48.4</td></tr><tr><td>w/o</td><td>39.9</td><td>24.0</td><td>43.4</td><td>52.6</td></tr><tr><td>with DCN</td><td></td><td>local,scope size 4×4</td><td>40.6</td><td>24.6</td><td>43.9</td><td>53.3</td></tr><tr><td>MobileNet-V2 MobileNet-V2</td><td>global, scope size 2×2</td><td>local, scope size 4×4 w/o</td><td>33.7</td><td>20.2</td><td>36.7</td><td>44.0</td></tr><tr><td rowspan="2">with SCC</td><td rowspan="2">w/o</td><td>local, scope size 4×4</td><td>33.2</td><td>20.5</td><td>35.6</td><td>43.3</td></tr><tr><td></td><td>34.3</td><td>20.2</td><td>37.3</td><td>44.7</td></tr><tr><td>MobileNet-V2 with DCN</td><td>w/o</td><td>w/o local, scope size 4×4</td><td>34.4 35.6</td><td>20.5 20.6</td><td>37.0 38.5</td><td>44.7 47.3</td></tr></table>
196
+
197
+ For the comparisons with strong baselines, an interesting phenomenon worth noting is that though DKs perform better than Deformable Convolutions on image classification, they fall noticeably short for object detection measured by mAP. We speculate that even though both techniques can adapt ERF in theory (as justified in Section 3.2), directly shifting sampling locations on data is easier to optimize. Yet after combining DKs with previous approaches, we can consistently boost performance for all the methods – $+ 0 . 7 / + 1 . 2$ for Deformable Convolutions on each base models, and $+ 1 . 7 / + 1 . 1$ for Conditional Convolutions. These findings align with the results from image classification. We next investigate what DKs learn and why they are compatible with previous methods in general.
198
+
199
+ # 4.3 WHAT DO DEFORMABLE KERNELS LEARN?
200
+
201
+ Awareness of Object Scale: Since deformation is hard to quantify, we use object scale as a rough proxy to understand what DKs learn. In Figure 3, we show the t-SNE (Maaten & Hinton, 2008) of learned model dynamics by the last convolutional layers in MobileNet-V2 using Conditional Convolution and our DKs. We validate the finding as claimed by Yang et al. (2019) that the experts of Conditional Convolutions have better correlation with object semantics than their scales (in reference to Figure 6 from their paper). Instead, our DKs learn kernel sampling offsets that strongly correlate to scales rather than semantics. This sheds light on why the two operators are complementary in our previous experiments.
202
+
203
+ Adaptation of Effective Receptive Fields: To verify our claim that DK indeed adapts ERFs in practice, we show ERF visualizations on a set of images in which they display different degrees of deformations. We compare the results of rigid kernels, Deformable Convolutions, our DKs, and the combination of the two operators. For all examples, note that the theoretical receptive field covers every pixel in the image but ERFs contain only a central portion of it. Deformable Convolutions and DKs perform similarly in terms of adapting ERFs, but Deformable Convolutions tend to spread out and have sparse responses while DKs tend to concentrate and densely activate within an object region. Combining both operators yields more consistent ERFs that exploit both of their merits.
204
+
205
+ ![](images/03fe61b3a99a4b4fe54f5e472560a43e878aaca475f9aa9552dbcdad33a82abd.jpg)
206
+ Figure 3: Semantics vs. Scales. We show t-SNE results of learned model dynamics using 10 random classes of objects from the COCO test-dev split. Each point represents an object extracted by ground-truth bounding box, whose color either denotes its class label or bounding box scale. The color of an object scale is its normalized area rank discretized by every 10th percentile among all data. Numbers inside parentheses indicate the dimension of learned dynamics before t-SNE. (a) The dynamics of Conditional Convolutions are closer to semantics than to object scales. (b) On the contrary, our DKs learn dynamics that are significantly related to scales rather than semantics.
207
+
208
+ ![](images/711d1059d1b021301141e7743d64fe5288ae4ee7f13f4809906a3a3dbc32d974.jpg)
209
+ Figure 4: Learned Effective Receptive Fields. We show learned ERFs on three images with large, medium, and small objects from the COCO test-dev split. Given each ground-truth bounding box, we visualize the non-zero ERF values of its central point. Theoretical RFs cover the whole image for all three examples and we thus ignore them in our plots. (a) Rigid kernels have strong central effects and a Gaussian-like ERF that cannot deal with object deformation alone. (b) Deformable Convolutions and (c) Deformable Kernels both tune ERFs to data. (d) Combining both operators together enables better modeling of 2D geometric transformation of objects.
210
+
211
+ # 5 CONCLUSION
212
+
213
+ In this paper, we introduced Deformable Kernels (DKs) to adapt effective receptive fields (ERFs) of convolutional networks for object deformation. We proposed to sample kernel values from the original kernel space. This in effect samples the ERF in linear networks and also roughly generalizes to non-linear cases. We instantiated two variants of DKs and validate our designs, showing connections to previous works. Consistent improvements over them and compatibility with them were found, as illustrated in visualizations.
214
+
215
+ # REFERENCES
216
+
217
+ Joan Bruna and Stephane Mallat. Invariant scattering convolution networks. ´ TPAMI, 2013.
218
+
219
+ Taco Cohen and Max Welling. Group equivariant convolutional networks. In ICML, 2016.
220
+
221
+ Jifeng Dai, Haozhi Qi, Yuwen Xiong, Yi Li, Guodong Zhang, Han Hu, and Yichen Wei. Deformable convolutional networks. In CVPR, 2017.
222
+
223
+ Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009.
224
+
225
+ Carlos Esteves, Christine Allen-Blanchette, Xiaowei Zhou, and Kostas Daniilidis. Polar transformer networks. In ICLR, 2018.
226
+
227
+ James J Gibson. The perception of the visual world. Houghton Mifflin, 1950.
228
+
229
+ 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.
230
+
231
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
232
+
233
+ 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. In CVPR, 2017.
234
+
235
+ Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In CVPR, 2018.
236
+
237
+ Drew A Hudson and Christopher D Manning. Learning by abstraction: The neural state machine. arXiv preprint arXiv:1907.03950, 2019.
238
+
239
+ Max Jaderberg, Karen Simonyan, Andrew Zisserman, et al. Spatial transformer networks. In NeurIPS, 2015.
240
+
241
+ Xu Jia, Bert De Brabandere, Tinne Tuytelaars, and Luc V Gool. Dynamic filter networks. In NeurIPS, 2016.
242
+
243
+ Angjoo Kanazawa, Abhishek Sharma, and David W. Jacobs. Locally scale-invariant convolutional neural networks. In NeurIPS Workshop, 2016.
244
+
245
+ Svetlana Lazebnik, Cordelia Schmid, and Jean Ponce. Beyond bags of features: Spatial pyramid matching for recognizing natural scene categories. In CVPR, 2006.
246
+
247
+ Xiang Li, Wenhai Wang, Xiaolin Hu, and Jian Yang. Selective kernel networks. In CVPR, 2019.
248
+
249
+ Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ´ ECCV, 2014.
250
+
251
+ Tsung-Yi Lin, Piotr Dollar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. ´ Feature pyramid networks for object detection. In CVPR, 2017.
252
+
253
+ Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. In ICLR, 2017.
254
+
255
+ David G Lowe et al. Object recognition from local scale-invariant features. In ICCV, 1999.
256
+
257
+ Wenjie Luo, Yujia Li, Raquel Urtasun, and Richard Zemel. Understanding the effective receptive field in deep convolutional neural networks. In NeurIPS, 2016.
258
+
259
+ Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 2008.
260
+
261
+ Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NeurIPS, 2015.
262
+
263
+ Ignacio Rocco, Relja Arandjelovic, and Josef Sivic. Convolutional neural network architecture for geometric matching. In CVPR, 2017.
264
+
265
+ Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In CVPR, 2018.
266
+
267
+ Evan Shelhamer, Dequan Wang, and Trevor Darrell. Blurring the line between structure and learning to optimize and adapt receptive fields. arXiv preprint arXiv:1904.11487, 2019.
268
+
269
+ Laurent Sifre and Stephane Mallat. Rotation, scaling and deformation invariant scattering for texture ´ discrimination. In CVPR, 2013.
270
+
271
+ Hugues Thomas, Charles R Qi, Jean-Emmanuel Deschaud, Beatriz Marcotegui, Franc¸ois Goulette, and Leonidas J Guibas. Kpconv: Flexible and deformable convolution for point clouds. In ICCV, 2019.
272
+
273
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017.
274
+
275
+ Dequan Wang, Evan Shelhamer, Bruno Olshausen, and Trevor Darrell. Dynamic scale inference by entropy optimization. arXiv preprint arXiv:1908.03182, 2019.
276
+
277
+ Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In CVPR, 2018.
278
+
279
+ Daniel E Worrall, Stephan J Garbin, Daniyar Turmukhambetov, and Gabriel J Brostow. Harmonic networks: Deep translation and rotation equivariance. In CVPR, 2017.
280
+
281
+ Saining Xie, Ross Girshick, Piotr Dollar, Zhuowen Tu, and Kaiming He. Aggregated residual trans-´ formations for deep neural networks. In CVPR, 2017.
282
+
283
+ Yuwen Xiong, Mengye Ren, Renjie Liao, Kelvin Wong, and Raquel Urtasun. Deformable filter convolution for point cloud reasoning. arXiv preprint arXiv:1907.13079, 2019.
284
+
285
+ Brandon Yang, Gabriel Bender, Quoc V Le, and Jiquan Ngiam. Soft conditional computation. arXiv preprint arXiv:1904.04971, 2019.
286
+
287
+ Richard Zhang. Making convolutional networks shift-invariant again. In ICML, 2019.
288
+
289
+ Xizhou Zhu, Han Hu, Stephen Lin, and Jifeng Dai. Deformable convnets v2: More deformable, better results. In CVPR, 2019.
290
+
291
+ ![](images/5abbb82c034f8a61878e301501e3654d6912395090b816e2237653329513f497.jpg)
292
+ Figure 5: Illustration of feed-forwarding through a $\mathbf { 3 \times 3 }$ local Deformable Kernel from a $4 \times 4$ scope. For each input patch, local DK first generates a group of kernel offsets $\{ \Delta k \}$ from input feature patch using the light-weight generator $\mathcal { G }$ (a $3 \times 3$ convolution of rigid kernel). Given the original kernel weights $W$ and the offset group $\{ \Delta k \}$ , DK samples a new set of kernel $W ^ { \prime }$ using a bilinear sampler $\boldsymbol { B }$ . Finally, DK convolves the input feature map and the sampled kernels to complete the whole computation.
293
+
294
+ # A COMPUTATION FLOW OF DEFORMABLE KERNELS
295
+
296
+ We now cover more details on implementing DKs by elaborating the computation flow of their forward and backward passes. We will focus on the local DK given its superior performance in practice. The extension to global DK implementation is straight-forward.
297
+
298
+ # A.1 FORWARD PASS
299
+
300
+ In Section 3.3, we introduce a kernel offset generator $\mathcal { G }$ and a bilinear sampler $\boldsymbol { B }$ . Figure 5 illustrates an example of the forward pass.
301
+
302
+ Concretely, given a kernel $W$ and a learned group of kernel offsets $\{ \Delta k \}$ on top of a regular 2D grid $\{ k \}$ , we can resample a new kernel $W ^ { \prime }$ by a bilinear operator $\boldsymbol { B }$ as
303
+
304
+ $$
305
+ \begin{array} { c } { W ^ { \prime } \equiv W _ { k + \Delta k } = \displaystyle \sum _ { k ^ { \prime } \in K } | \beta ( k + \Delta k , k ^ { \prime } ) W _ { k ^ { \prime } } , } \\ { \displaystyle \mathcal { B } ( k + \Delta k , k ^ { \prime } ) = \operatorname* { m a x } ( 0 , 1 - | k _ { x } + \Delta k _ { x } - k _ { x } ^ { \prime } | ) \cdot \operatorname* { m a x } ( 0 , 1 - | k _ { y } + \Delta k _ { y } - k _ { y } ^ { \prime } | ) . } \end{array}
306
+ $$
307
+
308
+ Given this resampled kernel, DK convolves it with the input image just as in normal convolutions using rigid kernels, characterized by Equation 1.
309
+
310
+ # A.2 BACKWARD PASS
311
+
312
+ The backward pass of local DK consists of three types of gradients: (1) the gradient to the data of the previous layer, (2) the gradient to the full scope kernel of the current layer and (3) the additional gradient to the kernel offset generator of the current layer. The first two types of gradients share same forms of the computation comparing to the normal convolutions. We now cover the computation for the third flow of gradient that directs where to sample kernel values.
313
+
314
+ In the context of Equation 7, the partial derivative of a output item $O _ { j }$ w.r.t. $x$ component of a given kernel offset $\Delta k _ { x }$ (similar for its $y$ component $\Delta k _ { y }$ ) can be computed as
315
+
316
+ $$
317
+ \frac { \partial O _ { j } } { \partial \Delta k _ { x } } = \sum _ { k } I _ { j + k } \bigg ( \sum _ { k ^ { \prime } } W _ { k ^ { \prime } } \frac { \partial \mathcal { B } ( k + \Delta k , k ^ { \prime } ) } { \partial \Delta k _ { x } } \bigg ) ,
318
+ $$
319
+
320
+ $$
321
+ \frac { \partial \mathcal { B } ( k + \Delta k , k ^ { \prime } ) } { \partial \Delta k _ { x } } = \operatorname* { m a x } ( 0 , 1 - | k _ { y } + \Delta k _ { y } - k _ { y } ^ { \prime } | ) \cdot \left\{ \begin{array} { l l } { 0 } & { | k _ { x } + \Delta k _ { x } - k _ { x } ^ { \prime } | \ge 1 } \\ { 1 } & { k _ { x } + \Delta k _ { x } < k _ { x } ^ { \prime } } \\ { - 1 } & { k _ { x } + \Delta k _ { x } \ge k _ { x } ^ { \prime } } \end{array} \right. .
322
+ $$
323
+
324
+ Table 5: Network architecture of our ResNet-50-DW comparing to the original ResNet-50 Inside the brackets are the general shape of a residual block, including filter sizes and feature dimensionalities. The number of stacked blocks on each stage is presented outside the brackets. $G = 1 2 8 ^ { \prime \prime }$ suggests the depthwise convolution with 128 input channels. Two models have similar numbers of parameters and FLOPs. At the same time, depthwise convolutions facilitate the computation efficiency of our Deformable Kernels.
325
+
326
+ <table><tr><td rowspan=1 colspan=1>Output</td><td rowspan=1 colspan=3>ResNet-50</td><td rowspan=1 colspan=4>ResNet-50-DW</td></tr><tr><td rowspan=1 colspan=1>112 × 112</td><td rowspan=1 colspan=7>7 × 7,64,stride 2</td></tr><tr><td rowspan=1 colspan=1>56×56</td><td rowspan=1 colspan=7>3 × 3 max pool, stride 2</td></tr><tr><td rowspan=1 colspan=1>56×56</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>1×1,643 ×3,641 × 1,256</td><td rowspan=1 colspan=1>×3</td><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1>1 ×1,1283 × 3,128,G = 1281 × 1,256</td><td rowspan=1 colspan=1>×3</td></tr><tr><td rowspan=1 colspan=1>28×28</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>1×1,1283 ×3,1281 × 1,512</td><td rowspan=1 colspan=1>×4</td><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1>1 ×1,2563 × 3,256,G = 2561 ×1,512</td><td rowspan=1 colspan=1>×4</td></tr><tr><td rowspan=1 colspan=1>14 ×14</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>1 ×1,2563 ×3,2561 × 1,1024</td><td rowspan=1 colspan=1>×6</td><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1>1 ×1,5123 × 3,512,G = 5121 × 1,1024</td><td rowspan=1 colspan=1>×6</td></tr><tr><td rowspan=1 colspan=1>7×7</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>1 ×1,5123 ×3,5121 × 1,2048</td><td rowspan=1 colspan=1>×3</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=2>1 ×1,10243 × 3,1024,G =10241 × 1,2048</td><td rowspan=1 colspan=1>×3</td></tr><tr><td rowspan=1 colspan=1>1×1</td><td rowspan=1 colspan=7>7 × 7 global average pool,1000-d fc, softmax</td></tr><tr><td rowspan=1 colspan=1>#P (M)</td><td rowspan=1 colspan=3>25.6</td><td rowspan=1 colspan=4>23.7</td></tr><tr><td rowspan=1 colspan=1>GFLOPs</td><td rowspan=1 colspan=3>3.86</td><td rowspan=1 colspan=4>3.82</td></tr></table>
327
+
328
+ # B NETWORK ARCHITECTURES
329
+
330
+ Table 5 shows the comparison between the original ResNet-50 (He et al., 2016) and our modified ResNet-50-DW. The motivation of introducing depthwise convolutions to ResNet is to accelerate the computation of local DKs based on our current implementations. The ResNet-50-DW model has similar model capacity/complexity and performance (see Table 1) compared to its non-depthwise counterpart, making it an ideal base architecture for our experiments.
331
+
332
+ On the other hand, in all of our experiments, MobileNet-V2 (Sandler et al., 2018) base model is left untouched.
333
+
334
+ # C ADDITIONAL COMPARISON OF EFFECTIVE RECEPTIVE FIELDS
335
+
336
+ We here show additional comparison of ERFs when objects have different kinds of deformations in Figure 6. Comparing to baseline, our method can adapt ERFs to be more persistent to object’s semantic rather than its geometric configuration.
337
+
338
+ # D ADDITIONAL EXPERIMENT DETAILS
339
+
340
+ Image Classification: Similar to Goyal et al. (2017); Loshchilov & Hutter (2017), training is performed by SGD for 90 epochs with momentum 0.9 and batch size 256. We set our learning rate of $1 0 ^ { - 1 }$ so that it linearly warms up from zero within first 5 epochs. A cosine training schedule is applied over the training epochs. We use scale and aspect ratio augmentation with color perturbation as standard data augmentations. We evaluate the performance of trained models on the ImageNet 2012 validation set. The images are resized so that the shorter side is of 256 pixels. We then centrally crop $2 2 4 \times 2 2 4$ windows from the images as input to measure recognition accuracy.
341
+
342
+ ![](images/fe8c4b789257333e32ac79b42776e417679053ca788bfbae0a2167b18b100042.jpg)
343
+ Figure 6: Effective Receptive Field Comparison between rigid kernels and DKs under different kinds of Object Deformation. At each row and from left to right, we show the original image $( 1 3 0 0 \times 8 0 0 )$ , the image rotated by -90 degrees and the image scaled by 1.5 times. Images are cropped and resized for the typesetting purpose.
parse/train/SkxSv6VFvS/SkxSv6VFvS_content_list.json ADDED
@@ -0,0 +1,1752 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "DEFORMABLE KERNELS: ADAPTING EFFECTIVE RECEPTIVE FIELDS FOR OBJECT DEFORMATION ",
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": "Hang $\\mathbf { G a o ^ { 1 , 3 * } } ,$ Xizhou $\\mathbf { Z } \\mathbf { h } \\mathbf { u } ^ { 2 , 3 * }$ , Steve $\\mathbf { L i n ^ { 3 } }$ , Jifeng Dai3 \n1UC Berkeley 2University of Science and Technology of China 3Microsoft Research Asia \nhangg@eecs.berkeley.edu, ezra0408@mail.ustc.edu.cn \n{stevelin,jifdai}@microsoft.com \nhttp://people.eecs.berkeley.edu/˜hangg/deformable-kernels/ ",
17
+ "bbox": [
18
+ 184,
19
+ 167,
20
+ 774,
21
+ 241
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 452,
31
+ 277,
32
+ 544,
33
+ 292
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Convolutional networks are not aware of an object’s geometric variations, which leads to inefficient utilization of model and data capacity. To overcome this issue, recent works on deformation modeling seek to spatially reconfigure the data towards a common arrangement such that semantic recognition suffers less from deformation. This is typically done by augmenting static operators with learned free-form sampling grids in the image space, dynamically tuned to the data and task for adapting the receptive field. Yet adapting the receptive field does not quite reach the actual goal – what really matters to the network is the effective receptive field (ERF), which reflects how much each pixel contributes. It is thus natural to design other approaches to adapt the ERF directly during runtime. ",
40
+ "bbox": [
41
+ 233,
42
+ 309,
43
+ 764,
44
+ 448
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "In this work, we instantiate one possible solution as Deformable Kernels (DKs), a family of novel and generic convolutional operators for handling object deformations by directly adapting the ERF while leaving the receptive field untouched. At the heart of our method is the ability to resample the original kernel space towards recovering the deformation of objects. This approach is justified with theoretical insights that the ERF is strictly determined by data sampling locations and kernel values. We implement DKs as generic drop-in replacements of rigid kernels and conduct a series of empirical studies whose results conform with our theories. Over several tasks and standard base models, our approach compares favorably against prior works that adapt during runtime. In addition, further experiments suggest a working mechanism orthogonal and complementary to previous works. ",
51
+ "bbox": [
52
+ 233,
53
+ 450,
54
+ 764,
55
+ 603
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 631,
66
+ 336,
67
+ 647
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "The rich diversity of object appearance in images arises from variations in object semantics and deformation. Semantics describe the high-level abstraction of what we perceive, and deformation defines the geometric transformation tied to specific data (Gibson, 1950). Humans are remarkably adept at making abstractions of the world (Hudson & Manning, 2019); we see in raw visual signals, abstract semantics away from deformation, and form concepts. ",
74
+ "bbox": [
75
+ 174,
76
+ 662,
77
+ 823,
78
+ 732
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Interestingly, modern convolutional networks follow an analogous process by making abstractions through local connectivity and weight sharing (Zhang, 2019). However, such a mechanism is an inefficient one, as the emergent representations encode semantics and deformation together, instead of as disjoint notions. Though a convolution responds accordingly to each input, how it responds is primarily programmed by its rigid kernels, as in Figure 1(a, b). In effect, this consumes large model capacity and data modes (Shelhamer et al., 2019). ",
85
+ "bbox": [
86
+ 174,
87
+ 739,
88
+ 823,
89
+ 823
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "We argue that the awareness of deformations emerges from adaptivity – the ability to adapt at runtime (Kanazawa et al., 2016; Jia et al., 2016; Li et al., 2019). Modeling of geometric transformations has been a constant pursuit for vision researchers over decades (Lowe et al., 1999; Lazebnik et al., 2006; Jaderberg et al., 2015; Dai et al., 2017). A basic idea is to spatially recompose data towards a common mode such that semantic recognition suffers less from deformation. A recent work that is representative of this direction is Deformable Convolution (Dai et al., 2017; Zhu et al., 2019). As shown in Figure 1(c), it augments the convolutions with free-form sampling grids in the data space. It is previously justified as adapting receptive field, or what we phrase as the “theoretical receptive field”, that defines which input pixels can contribute to the final output. However, theoretical receptive field does not measure how much impact an input pixel actually has. On the other hand, Luo et al. (2016) propose to measure the effective receptive field (ERF), i.e. the partial derivative of the output with respect to the input data, to quantify the exact contribution of each raw pixel to the convolution. Since adapting the theoretical receptive field is not the goal but a means to adapt the ERF, why not directly tune the ERF to specific data and tasks at runtime? ",
96
+ "bbox": [
97
+ 174,
98
+ 830,
99
+ 823,
100
+ 900
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "image",
106
+ "img_path": "images/a917c7f3a2bc01e2dd8b2cc933d94663ffbda1043f70c227f8d800fbf1704a7e.jpg",
107
+ "image_caption": [
108
+ "Figure 1: Adaptation for deformation. We show how different $3 \\times 3$ convolutions interact with deformations of two images. Kernel spaces are visualized as flat 2D Gaussians. Each “ $\\cdot + \\overrightarrow { \\mathbf { \\Gamma } }$ indicates a computation between a pixel and a kernel value sampled from the data and kernel space. Their colors represent corresponding kernel values. (a, b) Rigid kernels cannot adapt to specific deformations, thus consuming large model and data capacity. (c) Deformable Convolutions (Dai et al., 2017) reconfigure data towards common arrangement to counter the effects of geometric deformation. (d) Our Deformable Kernels (DKs) instead resample kernels and, in effect, adapt kernel spaces while leaving the data untouched. Note that (b) and (c) share kernel values but sample different data locations, while (b) and (d) share data locations but sample different kernel values. "
109
+ ],
110
+ "image_footnote": [],
111
+ "bbox": [
112
+ 191,
113
+ 102,
114
+ 808,
115
+ 347
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "",
122
+ "bbox": [
123
+ 173,
124
+ 512,
125
+ 825,
126
+ 638
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "Toward this end, we introduce Deformable Kernels (DKs), a family of novel and generic convolutional operators for deformation modeling. We aim to augment rigid kernels with the expressiveness to directly interact with the ERF of the computation during inference. Illustrated in Figure 1(d), DKs learn free-form offsets on kernel coordinates to deform the original kernel space towards specific data modality, rather than recomposing data. This can directly adapt ERF while leaving receptive field untouched. The design of DKs that is agnostic to data coordinates naturally leads to two variants – the global DK and the local DK, which behave differently in practice as we later investigate. We justify our approach with theoretical results which show that ERF is strictly determined by data sampling locations and kernel values. Used as a generic drop-in replacement of rigid kernels, DKs achieve empirical results coherent with our developed theory. Concretely, we evaluate our operator with standard base models on image classification and object detection. DKs perform favorably against prior works that adapt during runtime. With both quantitative and qualitative analysis, we further show that DKs can work orthogonally and complementarily with previous techniques. ",
133
+ "bbox": [
134
+ 173,
135
+ 645,
136
+ 825,
137
+ 825
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "2 RELATED WORKS ",
144
+ "text_level": 1,
145
+ "bbox": [
146
+ 176,
147
+ 857,
148
+ 354,
149
+ 873
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "We distinguish our work within the context of deformation modeling as our goal, and dynamic inference as our means. ",
156
+ "bbox": [
157
+ 174,
158
+ 895,
159
+ 823,
160
+ 922
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "Deformation Modeling: We refer to deformation modeling as learning geometric transformations in 2D image space without regard to 3D. One angle to attack deformation modeling is to craft certain geometric invariances into networks. However, this usually requires designs specific to certain kinds of deformation, such as shift, rotation, reflection and scaling (Sifre & Mallat, 2013; Bruna & Mallat, 2013; Kanazawa et al., 2016; Cohen & Welling, 2016; Worrall et al., 2017; Esteves et al., 2018). Another line of work on this topic learns to recompose data by either semi-parameterized or completely free-form sampling in image space: Spatial Transformers (Jaderberg et al., 2015) learns 2D affine transformations, Deep Geometric Matchers (Rocco et al., 2017) learns thin-plate spline transformations, Deformable Convolutions (Dai et al., 2017; Zhu et al., 2019) learns free-form transformations. ",
167
+ "bbox": [
168
+ 173,
169
+ 103,
170
+ 825,
171
+ 242
172
+ ],
173
+ "page_idx": 2
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "We interpret sampling data space as an effective approach to adapt effective receptive fields (ERF) by directly changing receptive field. At a high-level, our Deformable Kernels (DKs) share intuitions with this line of works for learning geometric transformations, yet are instantiated by learning to sample in kernel space which directly adapt ERF while leaving theoretical receptive fields untouched. While kernel space sampling is also studied in Deformable Filter (Xiong et al., 2019) and KPConv (Thomas et al., 2019), but in their contexts, sampling grids are computed from input point clouds rather than learned from data corpora. ",
178
+ "bbox": [
179
+ 174,
180
+ 250,
181
+ 825,
182
+ 347
183
+ ],
184
+ "page_idx": 2
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "Dynamic Inference: Dynamic inference adapts the model or individual operators to the observed data. The computation of our approach differs from self-attention (Vaswani et al., 2017; Wang et al., 2018) in which linear or convolution modules are augmented with subsequent queries that extract from the same input. We consider our closest related works in terms of implementation as those approaches that adapt convolutional kernels at run time. It includes but is not limited to Dynamic Filters (Jia et al., 2016), Selective Kernels (Li et al., 2019) and Conditional Convolutions (Yang et al., 2019). All of these approaches can learn and infer customized kernel spaces with respect to the data, but are either less inefficient or are loosely formulated. Dynamic Filters generate new filters from scratch, while Conditional Convolutions extend this idea to linear combinations of a set of synthesized filters. Selective Kernels are, on the other hand, comparably lightweight, but aggregating activations from kernels of different size is not as compact as directly sampling the original kernel space. Another line of works contemporary to ours (Shelhamer et al., 2019; Wang et al., 2019) is to compose free-form filters with structured Gaussian filters, which essentially transforms kernel spaces by data. Our DKs also differ from these works with the emphasize of direct adaptation the ERF rather than the theoretical receptive field. As mentioned previously, the true goal should be to adapt the ERF, and to our knowledge, our work is the first to study dynamic inference of ERFs. ",
189
+ "bbox": [
190
+ 174,
191
+ 354,
192
+ 825,
193
+ 575
194
+ ],
195
+ "page_idx": 2
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "3 APPROACH",
200
+ "text_level": 1,
201
+ "bbox": [
202
+ 176,
203
+ 597,
204
+ 297,
205
+ 613
206
+ ],
207
+ "page_idx": 2
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "We start by covering preliminaries on convolutions, including the definition of effective receptive field (ERF). We then formulate a theoretical framework for analyzing ERFs, and thus motivate our Deformable Kernels (DKs). We finally elaborate different DK variants within such a framework. Our analysis suggests compatibility between DKs and the prior work. ",
212
+ "bbox": [
213
+ 174,
214
+ 628,
215
+ 825,
216
+ 684
217
+ ],
218
+ "page_idx": 2
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "3.1 A DIVE INTO CONVOLUTIONS ",
223
+ "text_level": 1,
224
+ "bbox": [
225
+ 176,
226
+ 702,
227
+ 423,
228
+ 717
229
+ ],
230
+ "page_idx": 2
231
+ },
232
+ {
233
+ "type": "text",
234
+ "text": "2D Convolution: Let us first consider an input image $\\pmb { I } \\in \\mathbb { R } ^ { D \\times D }$ . By convolving it with a kernel $\\pmb { W } \\in \\mathbb { R } ^ { K \\times K }$ of stride 1, we have an output image $o$ whose pixel values at each coordinate $j \\in \\mathbb R ^ { 2 }$ can be expressed as ",
235
+ "bbox": [
236
+ 173,
237
+ 727,
238
+ 825,
239
+ 770
240
+ ],
241
+ "page_idx": 2
242
+ },
243
+ {
244
+ "type": "equation",
245
+ "img_path": "images/785106a0ed31fb4225fadcd0ab4bb64dbc2b62be4ec704e70c987b4c0793f814.jpg",
246
+ "text": "$$\nO _ { j } = \\sum _ { k \\in \\mathcal { K } } I _ { j + k } W _ { k } ,\n$$",
247
+ "text_format": "latex",
248
+ "bbox": [
249
+ 434,
250
+ 768,
251
+ 563,
252
+ 800
253
+ ],
254
+ "page_idx": 2
255
+ },
256
+ {
257
+ "type": "text",
258
+ "text": "by enumerating discrete kernel positions $\\boldsymbol { k }$ within the support $\\mathcal { K } = [ - K / 2 , K / 2 ] ^ { 2 } \\cap \\mathbb { Z }$ . This defines a rigid grid for sampling data and kernels. ",
259
+ "bbox": [
260
+ 173,
261
+ 804,
262
+ 823,
263
+ 833
264
+ ],
265
+ "page_idx": 2
266
+ },
267
+ {
268
+ "type": "text",
269
+ "text": "Theoretical Receptive Field: The same kernel $W$ can be stacked repeatedly to form a linear convolutional network with $n$ layers. The theoretical receptive field can then be imagined as the “accumulative coverage” of kernels at each given output unit on the input image by deconvolving back through the network. This property characterizes a set of input fields that could fire percepts onto corresponding output pixels. The size of a theoretical receptive field scales linearly with respect to the network depth $n$ and kernel size $K$ (He et al., 2016). ",
270
+ "bbox": [
271
+ 174,
272
+ 839,
273
+ 825,
274
+ 924
275
+ ],
276
+ "page_idx": 2
277
+ },
278
+ {
279
+ "type": "text",
280
+ "text": "Effective Receptive Field: Intuitively, not all pixels within a theoretical receptive field contribute equally. The influence of different fields varies from region to region thanks to the central emphasis of stacked convolutions and also to the non-linearity induced by activations. The notion of effective receptive field (ERF) (Luo et al., 2016) is thus introduced to measure the impact of each input pixel on the output at given locations. It is defined as a partial derivative field of the output with respect to the input data. With the numerical approximations in linear convolution networks, the ERF was previously identified as a Gaussian-like soft attention map over input images whose size grows fractionally with respect to the network depth $n$ and linearly to the kernel size $K$ . Empirical results validate this idea under more complex and realistic cases when networks exploit non-linearities, striding, padding, skip connections, and subsampling. ",
281
+ "bbox": [
282
+ 173,
283
+ 103,
284
+ 825,
285
+ 242
286
+ ],
287
+ "page_idx": 3
288
+ },
289
+ {
290
+ "type": "text",
291
+ "text": "3.2 ANALYSIS ON EFFECTIVE RECEPTIVE FIELDS ",
292
+ "text_level": 1,
293
+ "bbox": [
294
+ 174,
295
+ 258,
296
+ 531,
297
+ 273
298
+ ],
299
+ "page_idx": 3
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "We aim to revisit and complement the previous analysis on ERFs by Luo et al. (2016). While the previous analysis concentrates on studying the expectation of an ERF, i.e., when network depth $n$ approaches infinity or all kernels are randomly distributed without learning in general, our analysis focuses on how we can perturb the computation such that the change in ERF is predictable, given an input and a set of kernel spaces. ",
304
+ "bbox": [
305
+ 174,
306
+ 285,
307
+ 825,
308
+ 356
309
+ ],
310
+ "page_idx": 3
311
+ },
312
+ {
313
+ "type": "text",
314
+ "text": "We start our analysis by considering a linear convolutional network, without any unit activations, as defined in Section 3.1. For consistency, superscripts are introduced to image $\\pmb { I }$ , kernel $W$ , and subscripts to kernel positions $\\boldsymbol { k }$ to denote the index $s \\in [ 1 , n ]$ of each layer. Formally, given an input image $\\pmb { I } ^ { ( 0 ) }$ and a set of $K \\times K$ kernels $\\{ W ^ { ( s ) } \\} _ { s = 1 } ^ { n }$ of stride 1, we can roll out the final output ${ \\cal O } \\equiv { \\cal I } ^ { ( n ) }$ by unfolding Equation 1 as ",
315
+ "bbox": [
316
+ 176,
317
+ 361,
318
+ 823,
319
+ 435
320
+ ],
321
+ "page_idx": 3
322
+ },
323
+ {
324
+ "type": "equation",
325
+ "img_path": "images/4d0f6925d3ec949e4c211ec9d9a44a37fd7e28b11787c611b96446eb3b2375cd.jpg",
326
+ "text": "$$\n\\begin{array} { l } { { { \\cal I } _ { j } ^ { ( n ) } = \\displaystyle \\sum _ { k _ { n } \\in { \\cal K } } { \\cal I } _ { j + k _ { n } } ^ { ( n - 1 ) } { \\cal W } _ { k _ { n } } ^ { ( n ) } = \\displaystyle \\sum _ { ( k _ { n - 1 } , k _ { n } ) \\in { \\cal K } ^ { 2 } \\atop { } } { \\cal I } _ { j + k _ { n } + k _ { n - 1 } } ^ { ( n - 2 ) } { \\cal W } _ { k _ { n } } ^ { ( n ) } { \\cal W } _ { k _ { n - 1 } } ^ { ( n - 1 ) } = \\cdots } } \\\\ { { = \\displaystyle \\sum _ { ( k _ { 1 } , k _ { 2 } , \\ldots , k _ { n } ) \\in { \\cal K } ^ { n } } \\left( { \\cal I } _ { j + \\sum _ { s = 1 } ^ { n } k _ { s } } ^ { ( 0 ) } \\cdot \\prod _ { s = 1 } ^ { n } { \\cal W } _ { k _ { s } } ^ { ( s ) } \\right) . } } \\end{array}\n$$",
327
+ "text_format": "latex",
328
+ "bbox": [
329
+ 261,
330
+ 438,
331
+ 735,
332
+ 520
333
+ ],
334
+ "page_idx": 3
335
+ },
336
+ {
337
+ "type": "text",
338
+ "text": "By definition1, the effective receptive field value $\\mathcal { R } ^ { ( n ) } ( i ; j ) \\equiv \\partial I _ { j } ^ { ( n ) } / \\partial I _ { i } ^ { ( 0 ) }$ of output coordinate $j$ that takes input coordinate $_ i$ can be computed by ",
339
+ "bbox": [
340
+ 173,
341
+ 523,
342
+ 823,
343
+ 558
344
+ ],
345
+ "page_idx": 3
346
+ },
347
+ {
348
+ "type": "equation",
349
+ "img_path": "images/ec2d0d9d897f7d295a2405647b593cf7b72e33ca535ed390b0fef2039da745c3.jpg",
350
+ "text": "$$\n\\mathcal { R } ^ { ( n ) } ( i ; j ) = \\sum _ { ( k _ { 1 } , k _ { 2 } , \\ldots , k _ { n } ) \\in K ^ { n } } \\left( \\mathbb { 1 } \\left[ j + \\sum _ { s = 1 } ^ { n } k _ { s } = i \\right] \\cdot \\prod _ { s = 1 } ^ { n } W _ { k _ { s } } ^ { ( s ) } \\right) ,\n$$",
351
+ "text_format": "latex",
352
+ "bbox": [
353
+ 295,
354
+ 560,
355
+ 700,
356
+ 606
357
+ ],
358
+ "page_idx": 3
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "where $\\mathbb { 1 } [ \\cdot ]$ denotes the indicator function. This result indicates that ERF is related only to the data sampling location $j$ , kernel sampling location $\\boldsymbol { k }$ , and kernel matrices $\\{ W ^ { ( s ) } \\}$ . ",
363
+ "bbox": [
364
+ 173,
365
+ 609,
366
+ 823,
367
+ 641
368
+ ],
369
+ "page_idx": 3
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "If we replace the $m ^ { \\mathrm { t h } }$ kernel $W ^ { ( m ) }$ with a $1 \\times 1$ kernel of a single parameter $W _ { \\tilde { \\boldsymbol { k } } _ { m } } ^ { ( m ) }$ sampled from it, the value of ERF becomes to ",
374
+ "bbox": [
375
+ 171,
376
+ 648,
377
+ 823,
378
+ 681
379
+ ],
380
+ "page_idx": 3
381
+ },
382
+ {
383
+ "type": "equation",
384
+ "img_path": "images/66c20b6fedf15073b1f4ca65c88e193746eefcc42b4c08648ed593835186f268.jpg",
385
+ "text": "$$\n\\mathcal { R } ^ { ( n ) } ( i ; j , \\tilde { k } _ { m } ) = \\sum _ { ( k _ { 1 } , \\dots , k _ { m - 1 } , k _ { m + 1 } , \\dots , k _ { n } ) \\in K ^ { n - 1 } } \\left( \\mathbb { 1 } \\left[ j + \\sum _ { s \\in \\mathbb { S } } k _ { s } = i \\right] \\cdot \\prod _ { s \\in \\mathbb { S } } W _ { k _ { s } } ^ { ( s ) } \\cdot W _ { \\tilde { k } _ { m } } ^ { ( m ) } \\right) ,\n$$",
386
+ "text_format": "latex",
387
+ "bbox": [
388
+ 210,
389
+ 684,
390
+ 784,
391
+ 731
392
+ ],
393
+ "page_idx": 3
394
+ },
395
+ {
396
+ "type": "text",
397
+ "text": "where $\\mathbb { S } = [ 1 , n ] \\backslash \\{ m \\}$ . Since a $K \\times K$ kernel can be deemed as a composition of $K ^ { 2 } 1 \\times 1$ kernels distributed on a square grid, Equation 3 can thus be reformulated as ",
398
+ "bbox": [
399
+ 173,
400
+ 736,
401
+ 825,
402
+ 765
403
+ ],
404
+ "page_idx": 3
405
+ },
406
+ {
407
+ "type": "equation",
408
+ "img_path": "images/43a24a6a8f988ab4faf961b6a24ca6e2147206fc9cdc64011e67bf2ebce57d98.jpg",
409
+ "text": "$$\n\\mathcal { R } ^ { ( n ) } ( i ; j ) = \\sum _ { k _ { m } \\in \\mathcal { K } } \\mathcal { R } ^ { ( n ) } ( i ; j + k _ { m } , k _ { m } ) .\n$$",
410
+ "text_format": "latex",
411
+ "bbox": [
412
+ 369,
413
+ 768,
414
+ 629,
415
+ 801
416
+ ],
417
+ "page_idx": 3
418
+ },
419
+ {
420
+ "type": "text",
421
+ "text": "For the case of complex non-linearities, where we here consider post $\\mathrm { R e L U } ^ { 2 }$ activations in Equation 1, ",
422
+ "bbox": [
423
+ 174,
424
+ 806,
425
+ 823,
426
+ 833
427
+ ],
428
+ "page_idx": 3
429
+ },
430
+ {
431
+ "type": "equation",
432
+ "img_path": "images/d447143cee3fafd22e3729f18038dc74d9d5120ef20da1e1bad0d9d8716dadaf.jpg",
433
+ "text": "$$\nO _ { j } = \\operatorname* { m a x } ( \\sum _ { k \\in \\mathcal { K } } I _ { j + k } W _ { k } , 0 ) .\n$$",
434
+ "text_format": "latex",
435
+ "bbox": [
436
+ 406,
437
+ 830,
438
+ 591,
439
+ 863
440
+ ],
441
+ "page_idx": 3
442
+ },
443
+ {
444
+ "type": "text",
445
+ "text": "We can follow a similar analysis and derive corresponding ERF as ",
446
+ "bbox": [
447
+ 173,
448
+ 103,
449
+ 609,
450
+ 118
451
+ ],
452
+ "page_idx": 4
453
+ },
454
+ {
455
+ "type": "equation",
456
+ "img_path": "images/fd88a68380a532b2d2e5f0806b3d9d35dcad7145d9c4cd642d2e87175b43456d.jpg",
457
+ "text": "$$\n\\begin{array} { r l } & { \\mathcal { R } ^ { ' ( n ) } ( i ; j , \\tilde { k } _ { m } ) = \\displaystyle \\sum _ { ( k _ { 1 } , \\cdots , k _ { m - 1 } , k _ { m + 1 } , \\cdots , k _ { n } ) \\in K ^ { n - 1 } } \\left( \\mathcal { C } ^ { ( n ) } ( i ; j , k _ { 1 } , \\cdots , k _ { n } , \\tilde { k } _ { m } ) \\cdot \\prod _ { s \\in \\mathbb { S } } W _ { \\tilde { k } _ { s } } ^ { ( s ) } \\cdot W _ { \\tilde { k } _ { m } } ^ { m } \\right) } \\\\ & { \\mathcal { C } ^ { ( n ) } ( i ; j , k _ { 1 } , \\cdots , k _ { n } , \\tilde { k } _ { m } ) = \\mathbb { 1 } \\big [ j + \\displaystyle \\sum _ { s \\in \\mathbb { S } } k _ { s } = i \\big ] \\prod _ { s \\in \\mathbb { S } } \\mathbb { 1 } \\big [ \\displaystyle I _ { j } ^ { ( s - 1 ) } W _ { \\tilde { k } _ { s } } ^ { ( s ) } > 0 \\big ] \\mathbb { 1 } \\big [ I _ { j } ^ { ( m - 1 ) } W _ { \\tilde { k } _ { m } } ^ { ( m ) } > 0 \\big ] . } \\end{array}\n$$",
458
+ "text_format": "latex",
459
+ "bbox": [
460
+ 215,
461
+ 125,
462
+ 828,
463
+ 200
464
+ ],
465
+ "page_idx": 4
466
+ },
467
+ {
468
+ "type": "text",
469
+ "text": "Here we can see that the ERF becomes data-dependent due to the coefficient $\\mathcal { C }$ , which is tied to input coordinates, kernel sampling locations, and input data $\\pmb { I } ^ { ( 0 ) }$ . The more detailed analysis of this coefficient is beyond the scope of this paper. However, it should be noted that this coefficient only “gates” the contribution of the input pixels to the output. So in practice, ERF is “porous” – there are inactive (or gated) pixel units irregularly distributed around the ones that fire. This phenomenon also appeared in previous studies (such as in Luo et al. (2016), Figure 1). The maximal size of an ERF is still controlled by the data sampling location and kernel values as in the linear cases in Equation 5. ",
470
+ "bbox": [
471
+ 173,
472
+ 205,
473
+ 825,
474
+ 305
475
+ ],
476
+ "page_idx": 4
477
+ },
478
+ {
479
+ "type": "text",
480
+ "text": "A nice property of Equation 4 and Equation 5 is that all computations are linear, making it compatible with any linear sampling operators for querying kernel values of fractional coordinates. In other words, sampling kernels in effect samples the ERF on the data in the linear case, but also roughly generalizes to non-linear cases as well. This finding motivates our design of Deformable Kernels (DKs) in Section 3.3. ",
481
+ "bbox": [
482
+ 174,
483
+ 311,
484
+ 825,
485
+ 381
486
+ ],
487
+ "page_idx": 4
488
+ },
489
+ {
490
+ "type": "text",
491
+ "text": "3.3 DEFORMABLE KERNELS ",
492
+ "text_level": 1,
493
+ "bbox": [
494
+ 174,
495
+ 398,
496
+ 383,
497
+ 412
498
+ ],
499
+ "page_idx": 4
500
+ },
501
+ {
502
+ "type": "text",
503
+ "text": "In the context of Equation 1, we resample the kernel $W$ with a group of learned kernel offsets denoted as $\\{ \\Delta k \\}$ that correspond to each discrete kernel position $\\boldsymbol { k }$ . This defines our DK as ",
504
+ "bbox": [
505
+ 173,
506
+ 424,
507
+ 825,
508
+ 453
509
+ ],
510
+ "page_idx": 4
511
+ },
512
+ {
513
+ "type": "equation",
514
+ "img_path": "images/3a071f9861f1e7be515522dff815c71dcaeddb8819e4f0c10a0dc277de76b66f.jpg",
515
+ "text": "$$\nO _ { j } = \\sum _ { k \\in \\mathcal K } I _ { j + k } W _ { k + \\Delta k } ,\n$$",
516
+ "text_format": "latex",
517
+ "bbox": [
518
+ 419,
519
+ 460,
520
+ 576,
521
+ 491
522
+ ],
523
+ "page_idx": 4
524
+ },
525
+ {
526
+ "type": "text",
527
+ "text": "and the value of ERF as ",
528
+ "bbox": [
529
+ 174,
530
+ 498,
531
+ 333,
532
+ 512
533
+ ],
534
+ "page_idx": 4
535
+ },
536
+ {
537
+ "type": "equation",
538
+ "img_path": "images/f56f6e5ab1490d7e415b55fc4a12313b41979597ac64d47ec5fa095c7b81272d.jpg",
539
+ "text": "$$\n\\mathcal { R } _ { \\mathrm { D K } } ^ { ( n ) } ( i ; j ) = \\sum _ { k _ { m } \\in { \\mathcal { K } } } \\mathcal { R } ^ { ( n ) } ( i ; j + k _ { m } , k _ { m } + \\Delta k _ { m } ) .\n$$",
540
+ "text_format": "latex",
541
+ "bbox": [
542
+ 343,
543
+ 516,
544
+ 655,
545
+ 549
546
+ ],
547
+ "page_idx": 4
548
+ },
549
+ {
550
+ "type": "text",
551
+ "text": "Note that this operation leads to sub-pixel sampling in the kernel space. In practice, we use bilinear sampling to interpolate within the discrete kernel grid. ",
552
+ "bbox": [
553
+ 173,
554
+ 554,
555
+ 823,
556
+ 583
557
+ ],
558
+ "page_idx": 4
559
+ },
560
+ {
561
+ "type": "text",
562
+ "text": "Intuitively, the size (resolution) of the original kernel space can affect sampling performance. Concretely, suppose we want to sample a $3 \\times 3$ kernel. DKs do not have any constraint on the size of the original kernel space, which we call the “scope size” of DKs. That said, we can use a $W$ of any size $K ^ { \\prime }$ even though the number of sampling locations is fixed as $K ^ { 2 }$ . We can thus exploit large kernels – the largest ones can reach $9 \\times 9$ in our experiments with nearly no overhead in computation since bilinear interpolations are extremely lightweight compared to the cost of convolutions. This can also increase the number of learning parameters, which in practice might become intractable if not handled properly. In our implementation, we will exploit depthwise convolutions (Howard et al., 2017) such that increasing scope size induces a negligible amount of extra parameters. ",
563
+ "bbox": [
564
+ 173,
565
+ 588,
566
+ 825,
567
+ 715
568
+ ],
569
+ "page_idx": 4
570
+ },
571
+ {
572
+ "type": "text",
573
+ "text": "As previously discussed, sampling the kernel space in effect transforms into sampling the ERF. On the design of locality and spatial granularity of our learned offsets, DK naturally delivers two variants – the global DK and the local DKs, as illustrated in Figure 2. In both operators, we learn a kernel offset generator $\\mathcal { G }$ that maps an input patch into a set of kernel offsets that are later applied to rigid kernels. ",
574
+ "bbox": [
575
+ 174,
576
+ 722,
577
+ 825,
578
+ 791
579
+ ],
580
+ "page_idx": 4
581
+ },
582
+ {
583
+ "type": "text",
584
+ "text": "In practice, we implement $\\mathcal { G } _ { \\mathrm { g l o b a l } }$ as a stack of one global average pooling layer, which reduces feature maps into a vector, and another fully-connected layer without non-linearities, which projects the reduced vector into an offset vector of $2 K ^ { 2 }$ dimensions. Then, we apply these offsets to all convolutions for the input image following Equation 7. For local DKs, we implement $\\mathcal { G } _ { \\mathrm { l o c a l } }$ as an extra convolution that has the same configuration as the target kernel, except that it only has $2 K ^ { 2 }$ output channels. This produces kernel sampling offsets $\\{ \\Delta k \\}$ that are additionally indexed by output locations $j$ . It should be noted that similar designs were also discussed in Jia et al. (2016), in which filters are generated given either an image or individual patches from scratch rather than by resampling. ",
585
+ "bbox": [
586
+ 173,
587
+ 797,
588
+ 825,
589
+ 924
590
+ ],
591
+ "page_idx": 4
592
+ },
593
+ {
594
+ "type": "image",
595
+ "img_path": "images/2bb9668aaa37218849f82168db9cfaca57d102ffed1c046e386e2dacf5e7d991.jpg",
596
+ "image_caption": [
597
+ "Figure 2: Instantiations. We show how DK variants works with an example image that contains a large and a small object. (a) The global DK learns one set of kernel sampling grid given an input image and apply it to all data positions. (b) The local DK adapts kernels for each input patches, and induces better locality for deformation modeling. "
598
+ ],
599
+ "image_footnote": [],
600
+ "bbox": [
601
+ 196,
602
+ 102,
603
+ 808,
604
+ 328
605
+ ],
606
+ "page_idx": 5
607
+ },
608
+ {
609
+ "type": "text",
610
+ "text": "Intuitively, we expect the global DK to adapt kernel space between different images but not within a single input. The local DK can further adpat to specific image patches: for smaller objects, it is better to have shaper kernels and thus denser ERF; for larger objects, flatter kernels can be more beneficial for accumulating a wider ERF. On a high level, local DKs can preserve better locality and have larger freedom to adapt kernel spaces comparing to its global counterpart. We later compare these operators in our experiments. ",
611
+ "bbox": [
612
+ 173,
613
+ 415,
614
+ 825,
615
+ 500
616
+ ],
617
+ "page_idx": 5
618
+ },
619
+ {
620
+ "type": "text",
621
+ "text": "3.4 LINK WITH DEFORMABLE CONVOLUTIONS ",
622
+ "text_level": 1,
623
+ "bbox": [
624
+ 174,
625
+ 515,
626
+ 514,
627
+ 530
628
+ ],
629
+ "page_idx": 5
630
+ },
631
+ {
632
+ "type": "text",
633
+ "text": "The core idea of DKs is to learn adaptive offsets to sample the kernel space for modeling deformation, which makes them similar to Deformable Convolutions (Dai et al., 2017; Zhu et al., 2019), at both the conceptual and implementation levels. Here, we distinguish DKs from Deformable Convolutions and show how they can be unified. ",
634
+ "bbox": [
635
+ 173,
636
+ 541,
637
+ 825,
638
+ 597
639
+ ],
640
+ "page_idx": 5
641
+ },
642
+ {
643
+ "type": "text",
644
+ "text": "Deformable Convolutions can be reformulated in a general form as ",
645
+ "bbox": [
646
+ 179,
647
+ 604,
648
+ 611,
649
+ 618
650
+ ],
651
+ "page_idx": 5
652
+ },
653
+ {
654
+ "type": "equation",
655
+ "img_path": "images/efaef5c86c9f740a90478babf1316252a167b47cdfdcaa5be7194b813e6d9bff.jpg",
656
+ "text": "$$\nO _ { j } = \\sum _ { k \\in \\mathcal { K } } I _ { j + k + \\Delta j } W _ { k } ,\n$$",
657
+ "text_format": "latex",
658
+ "bbox": [
659
+ 421,
660
+ 621,
661
+ 576,
662
+ 652
663
+ ],
664
+ "page_idx": 5
665
+ },
666
+ {
667
+ "type": "text",
668
+ "text": "where they aim to learn a group of data offsets $\\{ \\Delta j \\}$ with respect to discrete data positions $j$ . For consistency for analysis, the value of effective receptive field becomes ",
669
+ "bbox": [
670
+ 176,
671
+ 655,
672
+ 823,
673
+ 684
674
+ ],
675
+ "page_idx": 5
676
+ },
677
+ {
678
+ "type": "equation",
679
+ "img_path": "images/7c245ee76fcf8f76a73be5d04308fd0b312e6965271bcc1a3fb5805d4dbe3ebe.jpg",
680
+ "text": "$$\n\\mathcal { R } _ { \\mathrm { D C } } ^ { ( n ) } ( i ; j ) = \\sum _ { k _ { m } \\in \\mathcal { K } } \\mathcal { R } ^ { ( n ) } ( i ; j + k _ { m } + \\Delta j _ { m } , k _ { m } ) .\n$$",
681
+ "text_format": "latex",
682
+ "bbox": [
683
+ 344,
684
+ 686,
685
+ 653,
686
+ 719
687
+ ],
688
+ "page_idx": 5
689
+ },
690
+ {
691
+ "type": "text",
692
+ "text": "This approach essentially recomposes the input image towards common modes such that semantic recognition suffers less from deformation. Moreover, according to our previous analysis in Equation 5, sampling data is another way of sampling the ERF. This, to a certain extent, also explains why Deformable Convolutions are well suited for learning deformation-agnostic representations. ",
693
+ "bbox": [
694
+ 174,
695
+ 722,
696
+ 825,
697
+ 777
698
+ ],
699
+ "page_idx": 5
700
+ },
701
+ {
702
+ "type": "text",
703
+ "text": "Moreover, we can learn both data and kernel offsets in one convolutional operator. Conceptually, this can be done by merging Equation 7 with Equation 9, which leads to ",
704
+ "bbox": [
705
+ 174,
706
+ 784,
707
+ 821,
708
+ 813
709
+ ],
710
+ "page_idx": 5
711
+ },
712
+ {
713
+ "type": "equation",
714
+ "img_path": "images/959a93bfb29f3ef6ec6a295944b46034218c0d6a06f2e29aa1487d882023ad74.jpg",
715
+ "text": "$$\n\\begin{array} { c } { { \\displaystyle { \\cal O } _ { j } = \\displaystyle \\sum _ { k \\in { \\cal K } } { \\cal I } _ { j + k + \\Delta j } W _ { k + \\Delta k } , } } \\\\ { { \\displaystyle \\mathcal { R } _ { \\mathrm { D C + D K } } ^ { ( n ) } ( i ; j ) = \\displaystyle \\sum _ { k _ { m } \\in { \\cal K } } { \\cal R } ^ { ( n ) } ( i ; j + k _ { m } + \\Delta j _ { m } , k _ { m } + \\Delta k _ { m } ) . } } \\end{array}\n$$",
716
+ "text_format": "latex",
717
+ "bbox": [
718
+ 310,
719
+ 815,
720
+ 687,
721
+ 880
722
+ ],
723
+ "page_idx": 5
724
+ },
725
+ {
726
+ "type": "text",
727
+ "text": "We also investigate this operator in our experiments. Although the two techniques may be viewed as serving a similar purpose, we find the collaboration between Deformable Kernels and Deformable Convolutions to be powerful in practice, suggesting strong compatibility. ",
728
+ "bbox": [
729
+ 176,
730
+ 882,
731
+ 823,
732
+ 924
733
+ ],
734
+ "page_idx": 5
735
+ },
736
+ {
737
+ "type": "text",
738
+ "text": "4 EXPERIMENTS ",
739
+ "text_level": 1,
740
+ "bbox": [
741
+ 176,
742
+ 102,
743
+ 326,
744
+ 117
745
+ ],
746
+ "page_idx": 6
747
+ },
748
+ {
749
+ "type": "text",
750
+ "text": "We evaluate our Deformable Kernels (DKs) on image classification using ILSVRC and object detection using the COCO benchmark. Necessary details are provided to reproduce our results, together with descriptions on base models and strong baselines for all experiments and ablations. For taskspecific considerations, we refer to each corresponding section. ",
751
+ "bbox": [
752
+ 174,
753
+ 135,
754
+ 823,
755
+ 190
756
+ ],
757
+ "page_idx": 6
758
+ },
759
+ {
760
+ "type": "text",
761
+ "text": "Implementation Details: We implement our operators in PyTorch and CUDA. We exploit depthwise convolutions when designing our operator for better computational efficiency3. We initialize kernel grids to be uniformly distributed within the scope size. For the kernel offset generator, we set its learning rate to be a fraction of that of the main network, which we cross-validate for each base model. We also find it important to clip sampling locations inside the original kernel space, such that $\\pmb { k } + \\Delta \\pmb { k } \\in \\mathcal { K }$ in Equation 7. ",
762
+ "bbox": [
763
+ 174,
764
+ 198,
765
+ 825,
766
+ 281
767
+ ],
768
+ "page_idx": 6
769
+ },
770
+ {
771
+ "type": "text",
772
+ "text": "Base Models: We choose our base models to be ResNet-50 (He et al., 2016) and MobileNetV2 (Sandler et al., 2018), following the standard practice for most vision applications. As mentioned, we exploit depthwise convolution and thus make changes to the ResNet model. Concretely, we define our ResNet-50-DW base model by replacing all $3 \\times 3$ convolutions by its depthwise counterpart while doubling the dimension of intermediate channels in all residual blocks. We find it to be a reasonable base model compared to the original ResNet-50, with comparable performance on both tasks. During training, we set the weight decay to be $4 \\times 1 0 ^ { - 5 }$ rather than the common $1 0 ^ { - 4 }$ for both models since depthwise models usually underfit rather than overfit (Xie et al., 2017; Howard et al., 2017; Hu et al., 2018). We set the learning rate multiplier of DK operators as $1 0 ^ { - 2 }$ fo r ResNet-50-DW and $1 0 ^ { - 1 }$ for MobileNet-V2 in all of our experiments. ",
773
+ "bbox": [
774
+ 173,
775
+ 287,
776
+ 825,
777
+ 426
778
+ ],
779
+ "page_idx": 6
780
+ },
781
+ {
782
+ "type": "text",
783
+ "text": "Strong Baselines: We develop our comparison with two previous works: Conditional Convolutions (Yang et al., 2019) for dynamics inference, and Deformable Convolutions (Dai et al., 2017; Zhu et al., 2019) for deformation modeling. We choose Conditional Convolutions due to similar computation forms – sampling can be deemed as an elementewise “expert voting” mechanism. For fair comparisons, We reimplement and reproduce their results. We also combine our operator with these previous approach to show both quantitative evidence and qualitative insight that our working mechanisms are compatible. ",
784
+ "bbox": [
785
+ 174,
786
+ 434,
787
+ 825,
788
+ 531
789
+ ],
790
+ "page_idx": 6
791
+ },
792
+ {
793
+ "type": "text",
794
+ "text": "4.1 IMAGE CLASSIFICATION ",
795
+ "text_level": 1,
796
+ "bbox": [
797
+ 176,
798
+ 551,
799
+ 383,
800
+ 565
801
+ ],
802
+ "page_idx": 6
803
+ },
804
+ {
805
+ "type": "text",
806
+ "text": "We first train our networks on the ImageNet 2012 training set (Deng et al., 2009). We adopt a common experiment protocol for fair comparisons as in Goyal et al. (2017); Loshchilov & Hutter (2017). For more details, please refer to our supplement. ",
807
+ "bbox": [
808
+ 176,
809
+ 577,
810
+ 823,
811
+ 619
812
+ ],
813
+ "page_idx": 6
814
+ },
815
+ {
816
+ "type": "text",
817
+ "text": "We first ablate the scope size of kernels for our DKs and study how it can affect model performance using ResNet-50-DW. As shown in Table 1, our DKs are sensitive to the choice of the scope size. We shown that when only applied to $3 \\times 3$ convolutions inside residual bottlenecks, local DKs induce a $+ 0 . 7$ performance gain within the original scope. By further enlarging the scope size, performance increases yet quickly plateaus at scope $4 \\times 4$ , yielding largest $+ 1 . 4$ gain for top-1 accuracy. Our speculation is that, although increasing scope size theoretically means better interpolation, it also makes the optimization space exponentially larger for each convolutional layer. And since number of entries for updating is fixed, this also leads to relatively sparse gradient flows. In principle, we set default scope size at $4 \\times 4$ for our DKs. ",
818
+ "bbox": [
819
+ 174,
820
+ 626,
821
+ 825,
822
+ 751
823
+ ],
824
+ "page_idx": 6
825
+ },
826
+ {
827
+ "type": "text",
828
+ "text": "We next move on and ablate our designs by comparing the global DK with the local DK, shown in the table. Both operators helps while the local variants consistently performs better than their global counterparts, bringing a $+ 0 . 5$ gap on both base models. We also study the effect of using more DKs in the models – the $1 \\times 1$ convolutions are replaced by global $\\mathrm { D K } \\dot { \\mathrm { s } } ^ { 4 }$ with scope $2 \\times 2$ . Note that all $1 \\times 1$ convolutions are not depthwise, and therefore this operation induces nearly 4 times of parameters. We refer their results only for ablation and show that adding more DKs still helps – especially for MobileNet-V2 since it is under-parameterized. This finding also holds for previous models (Yang et al., 2019) as well. ",
829
+ "bbox": [
830
+ 174,
831
+ 758,
832
+ 823,
833
+ 869
834
+ ],
835
+ "page_idx": 6
836
+ },
837
+ {
838
+ "type": "table",
839
+ "img_path": "images/652f1d996a9554cdf5fff81dbfd3812d83676c7a832f4e383c6c9aa73bd64b9c.jpg",
840
+ "table_caption": [
841
+ "Table 1: Ablations of scope size and different instantiations of DK for image classification. Using proper scope size, and more DK layers boosts performance. Modeling individual offset kernel grid for each data entries is also beneficial. "
842
+ ],
843
+ "table_footnote": [],
844
+ "table_body": "<table><tr><td>Backbone</td><td>1×1Deformable Kernels</td><td>3×3Deformable Kernels</td><td>top1 (%)</td><td>#P (M)</td><td>GFLOPs</td></tr><tr><td>ResNet-50</td><td>w/o</td><td>w/o</td><td>76.7</td><td>25.6</td><td>3.86</td></tr><tr><td>ResNet-50-DW</td><td>w/o</td><td>w/o</td><td>76.3</td><td>23.7</td><td>3.82</td></tr><tr><td rowspan=\"4\">ResNet-50-DW</td><td rowspan=\"4\">w/o</td><td>local, scope size 3×3</td><td>77.4</td><td>24.9</td><td>4.32</td></tr><tr><td>local, scope size 4×4</td><td>78.1</td><td>25.0</td><td>4.32</td></tr><tr><td>local, scope size 5×5</td><td>77.8</td><td>25.0</td><td>4.32</td></tr><tr><td>local, scope size 9×9</td><td>77.4</td><td>25.4</td><td>4.32</td></tr><tr><td rowspan=\"4\">ResNet-50-DW</td><td>w/o</td><td>global, scope size 4×4</td><td>77.6</td><td>23.9</td><td>3.82</td></tr><tr><td>global,scope size 2×2</td><td>global, scope size 4×4</td><td>77.9</td><td>80.1</td><td>4.09</td></tr><tr><td>w/o</td><td>local, scope size 4×4</td><td>78.1</td><td>25.0</td><td>4.32</td></tr><tr><td>global, scope size 2×2</td><td>local, scope size 4×4</td><td>78.5</td><td>81.2</td><td>4.60</td></tr><tr><td>MobileNet-V2</td><td>w/o</td><td>w/o</td><td>71.9</td><td>3.5</td><td>0.31</td></tr><tr><td rowspan=\"4\">MobileNet-V2</td><td>w/o</td><td>global, scope size 4×4</td><td>73.6</td><td>3.7</td><td>0.31</td></tr><tr><td>global, scope size 2×2</td><td>global, scope size 4×4</td><td>74.5</td><td>10.1</td><td>0.34</td></tr><tr><td>w/o</td><td>local, scope size 4×4</td><td>74.1</td><td>4.7</td><td>0.73</td></tr><tr><td>global, scope size 2×2</td><td>local, scope size 4×4</td><td>74.8</td><td>11.1</td><td>0.76</td></tr></table>",
845
+ "bbox": [
846
+ 192,
847
+ 101,
848
+ 805,
849
+ 329
850
+ ],
851
+ "page_idx": 7
852
+ },
853
+ {
854
+ "type": "table",
855
+ "img_path": "images/891e2d62bba2b5ccc495a0c79ec8157d0f1351b5ca0501564dc64aad1c1b79f7.jpg",
856
+ "table_caption": [
857
+ "Table 2: Comparisons to strong baselines for image classification DKs perform comparably or superiorly to previous methods. Further combinations yield consistent gain, suggesting orthogonal and compatible working mechanisms. "
858
+ ],
859
+ "table_footnote": [],
860
+ "table_body": "<table><tr><td>Backbone</td><td>1×1Deformable Kernels</td><td>3×3DeformableKernels</td><td>top1 (%)</td><td>#P (M)</td><td>GFLOPs</td></tr><tr><td>ResNet-50-DW</td><td>w/o</td><td>local, scope size 4×4</td><td>78.1</td><td>25.0</td><td>4.32</td></tr><tr><td>ResNet-50-DW</td><td>w/o</td><td>w/o</td><td>77.6</td><td>42.5</td><td>7.13</td></tr><tr><td rowspan=\"2\">with SCC ResNet-50-DW</td><td rowspan=\"2\">w/0</td><td>local, scope size 4×4</td><td>78.9</td><td>43.7</td><td>7.61</td></tr><tr><td>w/o</td><td>78.0</td><td>24.8</td><td>4.10</td></tr><tr><td>with DCN</td><td></td><td>local, scope size 4×4</td><td>79.0</td><td>26.1</td><td>4.60</td></tr><tr><td>MobileNet-V2 MobileNet-V2</td><td>w/o</td><td>local, scope size 4×4</td><td>74.1</td><td>4.7</td><td>0.73</td></tr><tr><td rowspan=\"2\">with SCC</td><td rowspan=\"2\">w/o</td><td>w/o</td><td>74.3</td><td>19.0</td><td>2.19</td></tr><tr><td>local, scope size 4×4</td><td>75.5</td><td>19.7</td><td>2.48</td></tr><tr><td rowspan=\"2\">MobileNet-V2 with DCN</td><td rowspan=\"2\">w/0</td><td>w/o</td><td>73.2</td><td>4.6</td><td>0.52</td></tr><tr><td>local, scope size 4×4</td><td>74.4</td><td>5.8</td><td>0.93</td></tr></table>",
861
+ "bbox": [
862
+ 192,
863
+ 390,
864
+ 805,
865
+ 549
866
+ ],
867
+ "page_idx": 7
868
+ },
869
+ {
870
+ "type": "text",
871
+ "text": "We further compare and combine DKs with Conditional Convolutions and Deformable Convolutions. Results are recorded in Table 2. We can see that DKs perform comparably on ResNet-V2 and compare favorably on MobileNet-V2 – improve $+ 0 . 9$ from Deformable Convolutions and achieve comparable results with less than a quarter number of parameters compared to Conditional Convolutions. Remarkably, we also show that if combined together, even larger performance gains are in reach. We see consistent boost in top-1 accuracy compared to strong baselines: $+ 1 . 3 / + 1 . 0$ on ResNet-50-DW, and $+ 1 . 2 / + 1 . 2$ on MobileNet-V2. These gaps are bigger than those from our own ablation, suggesting the working mechanisms across the operators to be orthogonal and compatible. ",
872
+ "bbox": [
873
+ 174,
874
+ 622,
875
+ 825,
876
+ 734
877
+ ],
878
+ "page_idx": 7
879
+ },
880
+ {
881
+ "type": "text",
882
+ "text": "4.2 OBJECT DETECTION ",
883
+ "text_level": 1,
884
+ "bbox": [
885
+ 176,
886
+ 751,
887
+ 356,
888
+ 765
889
+ ],
890
+ "page_idx": 7
891
+ },
892
+ {
893
+ "type": "text",
894
+ "text": "We examine DKs on the COCO benchmark (Lin et al., 2014). For all experiments, we use Faster R-CNN (Ren et al., 2015) with FPN (Lin et al., 2017) as the base detector, plugging in the backbones we previously trained on ImageNet. For MobileNet-V2, we last feature maps of the each resolution for FPN post aggregation. Following the standard protocol, training and evaluation are performed on the $1 2 0 \\mathrm { k }$ images in the train-val split and the 20k images in the test-dev split, respectively. For evaluation, we measure the standard mean average precision (mAP) and shattered scores for small, medium and large objects. ",
895
+ "bbox": [
896
+ 173,
897
+ 776,
898
+ 825,
899
+ 875
900
+ ],
901
+ "page_idx": 7
902
+ },
903
+ {
904
+ "type": "text",
905
+ "text": "Table 3 and Table 4 follow the same style of analysis as in image classification. While the baseline methods of ResNet achieve $3 6 . 6 \\ \\mathrm { m A P } ,$ indicating a strong baseline detector, applying local DKs brings a $+ 1 . 2 \\mathrm { m A P }$ improvement when replacing 3x3 rigid kernels alone and a $+ 1 . 8$ mAP improvement when replacing both 1x1 and 3x3 rigid kernels. This trend magnifies on MobileNet-v2 models, where we see an improvement of $+ 1 . 6$ mAP and $+ 2 . 4 \\ \\mathrm { m A P } ,$ , respectively. Results also confirm the effectiveness of local DKs against global DKs, which is again in line with our expectation that local DKs can model locality better. ",
906
+ "bbox": [
907
+ 176,
908
+ 882,
909
+ 823,
910
+ 924
911
+ ],
912
+ "page_idx": 7
913
+ },
914
+ {
915
+ "type": "table",
916
+ "img_path": "images/7350cae2e29b0a46813a9481577bb38913d33309325ba0ce2e1adc93f7c63273.jpg",
917
+ "table_caption": [
918
+ "Table 3: Ablations for object detection. Consistent results with image classification. "
919
+ ],
920
+ "table_footnote": [],
921
+ "table_body": "<table><tr><td>Backbone</td><td>1×1Deformable Kernels</td><td>3×3Deformable Kernels</td><td>mAP</td><td>mAPs</td><td>mAPM</td><td>mAPL</td></tr><tr><td>ResNet-50-DW</td><td>w/o</td><td>w/o</td><td>36.6</td><td>22.1</td><td>39.9</td><td>46.6</td></tr><tr><td rowspan=\"4\">ResNet-50-DW</td><td>w/o</td><td>global, scope size 4×4</td><td>36.7</td><td>22.6</td><td>40.2</td><td>46.9</td></tr><tr><td>global,scope size 2×2</td><td>global, scope size 4×4</td><td>37.1</td><td>23.1</td><td>40.6</td><td>46.6</td></tr><tr><td>w/o</td><td>local, scope size 4×4</td><td>37.8</td><td>23.4</td><td>41.6</td><td>48.2</td></tr><tr><td>global, scope size 2×2</td><td>local, scope size 4×4</td><td>38.4</td><td>23.4</td><td>42.0</td><td>49.4</td></tr><tr><td>MobileNet-V2</td><td>w/o</td><td>w/o</td><td>31.3</td><td>18.6</td><td>33.7</td><td>40.4</td></tr><tr><td rowspan=\"4\">MobileNet-V2</td><td>w/o</td><td>global, scope size 4×4</td><td>32.5</td><td>19.6</td><td>35.8</td><td>41.9</td></tr><tr><td>global,scope size 2×2</td><td>global, scope size 4×4</td><td>32.9</td><td>19.4</td><td>35.5</td><td>42.8</td></tr><tr><td>w/0</td><td>local, scope size 4×4</td><td>32.9</td><td>19.5</td><td>36.0</td><td>42.5</td></tr><tr><td>global, scope size 2×2</td><td>local, scope size 4×4</td><td>33.7</td><td>20.2</td><td>36.7</td><td>44.0</td></tr></table>",
922
+ "bbox": [
923
+ 192,
924
+ 101,
925
+ 805,
926
+ 256
927
+ ],
928
+ "page_idx": 8
929
+ },
930
+ {
931
+ "type": "table",
932
+ "img_path": "images/84f243c0470669e39536a5c1102527d64f8ccb616ae14ac691530cfd41891dfe.jpg",
933
+ "table_caption": [
934
+ "Table 4: Comparisons to strong baselines for object detection DKs perform fall short to Deformable Convolution, but combination still improves performance. "
935
+ ],
936
+ "table_footnote": [],
937
+ "table_body": "<table><tr><td>Backbone</td><td>1×1Deformable Kernels</td><td>3×3DeformableKernels</td><td>mAP</td><td>mAPs</td><td>mAPM</td><td>mAPL</td></tr><tr><td>ResNet-50-DW</td><td>global, scope size 2×2</td><td>local, scope size 4×4</td><td>38.4</td><td>23.4</td><td>42.0</td><td>49.4</td></tr><tr><td>ResNet-50-DW</td><td>w/o</td><td>w/o</td><td>36.3</td><td>22.1</td><td>39.3</td><td>47.0</td></tr><tr><td rowspan=\"2\">with SCC ResNet-50-DW</td><td rowspan=\"2\">w/o</td><td>local, scope size 4×4</td><td>38.0</td><td>23.4</td><td>41.9</td><td>48.4</td></tr><tr><td>w/o</td><td>39.9</td><td>24.0</td><td>43.4</td><td>52.6</td></tr><tr><td>with DCN</td><td></td><td>local,scope size 4×4</td><td>40.6</td><td>24.6</td><td>43.9</td><td>53.3</td></tr><tr><td>MobileNet-V2 MobileNet-V2</td><td>global, scope size 2×2</td><td>local, scope size 4×4 w/o</td><td>33.7</td><td>20.2</td><td>36.7</td><td>44.0</td></tr><tr><td rowspan=\"2\">with SCC</td><td rowspan=\"2\">w/o</td><td>local, scope size 4×4</td><td>33.2</td><td>20.5</td><td>35.6</td><td>43.3</td></tr><tr><td></td><td>34.3</td><td>20.2</td><td>37.3</td><td>44.7</td></tr><tr><td>MobileNet-V2 with DCN</td><td>w/o</td><td>w/o local, scope size 4×4</td><td>34.4 35.6</td><td>20.5 20.6</td><td>37.0 38.5</td><td>44.7 47.3</td></tr></table>",
938
+ "bbox": [
939
+ 192,
940
+ 289,
941
+ 805,
942
+ 444
943
+ ],
944
+ "page_idx": 8
945
+ },
946
+ {
947
+ "type": "text",
948
+ "text": "",
949
+ "bbox": [
950
+ 174,
951
+ 503,
952
+ 825,
953
+ 560
954
+ ],
955
+ "page_idx": 8
956
+ },
957
+ {
958
+ "type": "text",
959
+ "text": "For the comparisons with strong baselines, an interesting phenomenon worth noting is that though DKs perform better than Deformable Convolutions on image classification, they fall noticeably short for object detection measured by mAP. We speculate that even though both techniques can adapt ERF in theory (as justified in Section 3.2), directly shifting sampling locations on data is easier to optimize. Yet after combining DKs with previous approaches, we can consistently boost performance for all the methods – $+ 0 . 7 / + 1 . 2$ for Deformable Convolutions on each base models, and $+ 1 . 7 / + 1 . 1$ for Conditional Convolutions. These findings align with the results from image classification. We next investigate what DKs learn and why they are compatible with previous methods in general. ",
960
+ "bbox": [
961
+ 174,
962
+ 568,
963
+ 825,
964
+ 693
965
+ ],
966
+ "page_idx": 8
967
+ },
968
+ {
969
+ "type": "text",
970
+ "text": "4.3 WHAT DO DEFORMABLE KERNELS LEARN? ",
971
+ "text_level": 1,
972
+ "bbox": [
973
+ 174,
974
+ 709,
975
+ 516,
976
+ 723
977
+ ],
978
+ "page_idx": 8
979
+ },
980
+ {
981
+ "type": "text",
982
+ "text": "Awareness of Object Scale: Since deformation is hard to quantify, we use object scale as a rough proxy to understand what DKs learn. In Figure 3, we show the t-SNE (Maaten & Hinton, 2008) of learned model dynamics by the last convolutional layers in MobileNet-V2 using Conditional Convolution and our DKs. We validate the finding as claimed by Yang et al. (2019) that the experts of Conditional Convolutions have better correlation with object semantics than their scales (in reference to Figure 6 from their paper). Instead, our DKs learn kernel sampling offsets that strongly correlate to scales rather than semantics. This sheds light on why the two operators are complementary in our previous experiments. ",
983
+ "bbox": [
984
+ 173,
985
+ 734,
986
+ 825,
987
+ 847
988
+ ],
989
+ "page_idx": 8
990
+ },
991
+ {
992
+ "type": "text",
993
+ "text": "Adaptation of Effective Receptive Fields: To verify our claim that DK indeed adapts ERFs in practice, we show ERF visualizations on a set of images in which they display different degrees of deformations. We compare the results of rigid kernels, Deformable Convolutions, our DKs, and the combination of the two operators. For all examples, note that the theoretical receptive field covers every pixel in the image but ERFs contain only a central portion of it. Deformable Convolutions and DKs perform similarly in terms of adapting ERFs, but Deformable Convolutions tend to spread out and have sparse responses while DKs tend to concentrate and densely activate within an object region. Combining both operators yields more consistent ERFs that exploit both of their merits. ",
994
+ "bbox": [
995
+ 174,
996
+ 854,
997
+ 823,
998
+ 924
999
+ ],
1000
+ "page_idx": 8
1001
+ },
1002
+ {
1003
+ "type": "image",
1004
+ "img_path": "images/03fe61b3a99a4b4fe54f5e472560a43e878aaca475f9aa9552dbcdad33a82abd.jpg",
1005
+ "image_caption": [
1006
+ "Figure 3: Semantics vs. Scales. We show t-SNE results of learned model dynamics using 10 random classes of objects from the COCO test-dev split. Each point represents an object extracted by ground-truth bounding box, whose color either denotes its class label or bounding box scale. The color of an object scale is its normalized area rank discretized by every 10th percentile among all data. Numbers inside parentheses indicate the dimension of learned dynamics before t-SNE. (a) The dynamics of Conditional Convolutions are closer to semantics than to object scales. (b) On the contrary, our DKs learn dynamics that are significantly related to scales rather than semantics. "
1007
+ ],
1008
+ "image_footnote": [],
1009
+ "bbox": [
1010
+ 187,
1011
+ 99,
1012
+ 807,
1013
+ 227
1014
+ ],
1015
+ "page_idx": 9
1016
+ },
1017
+ {
1018
+ "type": "image",
1019
+ "img_path": "images/711d1059d1b021301141e7743d64fe5288ae4ee7f13f4809906a3a3dbc32d974.jpg",
1020
+ "image_caption": [
1021
+ "Figure 4: Learned Effective Receptive Fields. We show learned ERFs on three images with large, medium, and small objects from the COCO test-dev split. Given each ground-truth bounding box, we visualize the non-zero ERF values of its central point. Theoretical RFs cover the whole image for all three examples and we thus ignore them in our plots. (a) Rigid kernels have strong central effects and a Gaussian-like ERF that cannot deal with object deformation alone. (b) Deformable Convolutions and (c) Deformable Kernels both tune ERFs to data. (d) Combining both operators together enables better modeling of 2D geometric transformation of objects. "
1022
+ ],
1023
+ "image_footnote": [],
1024
+ "bbox": [
1025
+ 191,
1026
+ 353,
1027
+ 807,
1028
+ 593
1029
+ ],
1030
+ "page_idx": 9
1031
+ },
1032
+ {
1033
+ "type": "text",
1034
+ "text": "",
1035
+ "bbox": [
1036
+ 176,
1037
+ 731,
1038
+ 825,
1039
+ 773
1040
+ ],
1041
+ "page_idx": 9
1042
+ },
1043
+ {
1044
+ "type": "text",
1045
+ "text": "5 CONCLUSION ",
1046
+ "text_level": 1,
1047
+ "bbox": [
1048
+ 176,
1049
+ 803,
1050
+ 318,
1051
+ 819
1052
+ ],
1053
+ "page_idx": 9
1054
+ },
1055
+ {
1056
+ "type": "text",
1057
+ "text": "In this paper, we introduced Deformable Kernels (DKs) to adapt effective receptive fields (ERFs) of convolutional networks for object deformation. We proposed to sample kernel values from the original kernel space. This in effect samples the ERF in linear networks and also roughly generalizes to non-linear cases. We instantiated two variants of DKs and validate our designs, showing connections to previous works. Consistent improvements over them and compatibility with them were found, as illustrated in visualizations. ",
1058
+ "bbox": [
1059
+ 174,
1060
+ 839,
1061
+ 825,
1062
+ 922
1063
+ ],
1064
+ "page_idx": 9
1065
+ },
1066
+ {
1067
+ "type": "text",
1068
+ "text": "REFERENCES ",
1069
+ "text_level": 1,
1070
+ "bbox": [
1071
+ 174,
1072
+ 102,
1073
+ 287,
1074
+ 118
1075
+ ],
1076
+ "page_idx": 10
1077
+ },
1078
+ {
1079
+ "type": "text",
1080
+ "text": "Joan Bruna and Stephane Mallat. Invariant scattering convolution networks. ´ TPAMI, 2013. ",
1081
+ "bbox": [
1082
+ 168,
1083
+ 126,
1084
+ 769,
1085
+ 141
1086
+ ],
1087
+ "page_idx": 10
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "Taco Cohen and Max Welling. Group equivariant convolutional networks. In ICML, 2016. ",
1092
+ "bbox": [
1093
+ 168,
1094
+ 148,
1095
+ 769,
1096
+ 165
1097
+ ],
1098
+ "page_idx": 10
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "Jifeng Dai, Haozhi Qi, Yuwen Xiong, Yi Li, Guodong Zhang, Han Hu, and Yichen Wei. Deformable convolutional networks. In CVPR, 2017. ",
1103
+ "bbox": [
1104
+ 173,
1105
+ 172,
1106
+ 825,
1107
+ 202
1108
+ ],
1109
+ "page_idx": 10
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. ",
1114
+ "bbox": [
1115
+ 173,
1116
+ 209,
1117
+ 823,
1118
+ 239
1119
+ ],
1120
+ "page_idx": 10
1121
+ },
1122
+ {
1123
+ "type": "text",
1124
+ "text": "Carlos Esteves, Christine Allen-Blanchette, Xiaowei Zhou, and Kostas Daniilidis. Polar transformer networks. In ICLR, 2018. ",
1125
+ "bbox": [
1126
+ 173,
1127
+ 247,
1128
+ 823,
1129
+ 276
1130
+ ],
1131
+ "page_idx": 10
1132
+ },
1133
+ {
1134
+ "type": "text",
1135
+ "text": "James J Gibson. The perception of the visual world. Houghton Mifflin, 1950. ",
1136
+ "bbox": [
1137
+ 171,
1138
+ 285,
1139
+ 679,
1140
+ 301
1141
+ ],
1142
+ "page_idx": 10
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "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. ",
1147
+ "bbox": [
1148
+ 173,
1149
+ 309,
1150
+ 826,
1151
+ 352
1152
+ ],
1153
+ "page_idx": 10
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. ",
1158
+ "bbox": [
1159
+ 173,
1160
+ 359,
1161
+ 823,
1162
+ 390
1163
+ ],
1164
+ "page_idx": 10
1165
+ },
1166
+ {
1167
+ "type": "text",
1168
+ "text": "Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. In CVPR, 2017. ",
1169
+ "bbox": [
1170
+ 174,
1171
+ 397,
1172
+ 825,
1173
+ 440
1174
+ ],
1175
+ "page_idx": 10
1176
+ },
1177
+ {
1178
+ "type": "text",
1179
+ "text": "Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In CVPR, 2018. ",
1180
+ "bbox": [
1181
+ 171,
1182
+ 449,
1183
+ 717,
1184
+ 465
1185
+ ],
1186
+ "page_idx": 10
1187
+ },
1188
+ {
1189
+ "type": "text",
1190
+ "text": "Drew A Hudson and Christopher D Manning. Learning by abstraction: The neural state machine. arXiv preprint arXiv:1907.03950, 2019. ",
1191
+ "bbox": [
1192
+ 173,
1193
+ 472,
1194
+ 823,
1195
+ 502
1196
+ ],
1197
+ "page_idx": 10
1198
+ },
1199
+ {
1200
+ "type": "text",
1201
+ "text": "Max Jaderberg, Karen Simonyan, Andrew Zisserman, et al. Spatial transformer networks. In NeurIPS, 2015. ",
1202
+ "bbox": [
1203
+ 174,
1204
+ 510,
1205
+ 825,
1206
+ 540
1207
+ ],
1208
+ "page_idx": 10
1209
+ },
1210
+ {
1211
+ "type": "text",
1212
+ "text": "Xu Jia, Bert De Brabandere, Tinne Tuytelaars, and Luc V Gool. Dynamic filter networks. In NeurIPS, 2016. ",
1213
+ "bbox": [
1214
+ 174,
1215
+ 547,
1216
+ 825,
1217
+ 577
1218
+ ],
1219
+ "page_idx": 10
1220
+ },
1221
+ {
1222
+ "type": "text",
1223
+ "text": "Angjoo Kanazawa, Abhishek Sharma, and David W. Jacobs. Locally scale-invariant convolutional neural networks. In NeurIPS Workshop, 2016. ",
1224
+ "bbox": [
1225
+ 173,
1226
+ 584,
1227
+ 825,
1228
+ 614
1229
+ ],
1230
+ "page_idx": 10
1231
+ },
1232
+ {
1233
+ "type": "text",
1234
+ "text": "Svetlana Lazebnik, Cordelia Schmid, and Jean Ponce. Beyond bags of features: Spatial pyramid matching for recognizing natural scene categories. In CVPR, 2006. ",
1235
+ "bbox": [
1236
+ 173,
1237
+ 622,
1238
+ 821,
1239
+ 651
1240
+ ],
1241
+ "page_idx": 10
1242
+ },
1243
+ {
1244
+ "type": "text",
1245
+ "text": "Xiang Li, Wenhai Wang, Xiaolin Hu, and Jian Yang. Selective kernel networks. In CVPR, 2019. ",
1246
+ "bbox": [
1247
+ 176,
1248
+ 660,
1249
+ 805,
1250
+ 675
1251
+ ],
1252
+ "page_idx": 10
1253
+ },
1254
+ {
1255
+ "type": "text",
1256
+ "text": "Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ´ ECCV, 2014. ",
1257
+ "bbox": [
1258
+ 176,
1259
+ 683,
1260
+ 823,
1261
+ 713
1262
+ ],
1263
+ "page_idx": 10
1264
+ },
1265
+ {
1266
+ "type": "text",
1267
+ "text": "Tsung-Yi Lin, Piotr Dollar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. ´ Feature pyramid networks for object detection. In CVPR, 2017. ",
1268
+ "bbox": [
1269
+ 176,
1270
+ 720,
1271
+ 821,
1272
+ 751
1273
+ ],
1274
+ "page_idx": 10
1275
+ },
1276
+ {
1277
+ "type": "text",
1278
+ "text": "Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. In ICLR, 2017. ",
1279
+ "bbox": [
1280
+ 174,
1281
+ 758,
1282
+ 825,
1283
+ 787
1284
+ ],
1285
+ "page_idx": 10
1286
+ },
1287
+ {
1288
+ "type": "text",
1289
+ "text": "David G Lowe et al. Object recognition from local scale-invariant features. In ICCV, 1999. ",
1290
+ "bbox": [
1291
+ 171,
1292
+ 796,
1293
+ 772,
1294
+ 813
1295
+ ],
1296
+ "page_idx": 10
1297
+ },
1298
+ {
1299
+ "type": "text",
1300
+ "text": "Wenjie Luo, Yujia Li, Raquel Urtasun, and Richard Zemel. Understanding the effective receptive field in deep convolutional neural networks. In NeurIPS, 2016. ",
1301
+ "bbox": [
1302
+ 173,
1303
+ 820,
1304
+ 821,
1305
+ 849
1306
+ ],
1307
+ "page_idx": 10
1308
+ },
1309
+ {
1310
+ "type": "text",
1311
+ "text": "Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 2008. ",
1312
+ "bbox": [
1313
+ 174,
1314
+ 857,
1315
+ 823,
1316
+ 887
1317
+ ],
1318
+ "page_idx": 10
1319
+ },
1320
+ {
1321
+ "type": "text",
1322
+ "text": "Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NeurIPS, 2015. ",
1323
+ "bbox": [
1324
+ 174,
1325
+ 895,
1326
+ 821,
1327
+ 924
1328
+ ],
1329
+ "page_idx": 10
1330
+ },
1331
+ {
1332
+ "type": "text",
1333
+ "text": "Ignacio Rocco, Relja Arandjelovic, and Josef Sivic. Convolutional neural network architecture for geometric matching. In CVPR, 2017. ",
1334
+ "bbox": [
1335
+ 171,
1336
+ 103,
1337
+ 823,
1338
+ 132
1339
+ ],
1340
+ "page_idx": 11
1341
+ },
1342
+ {
1343
+ "type": "text",
1344
+ "text": "Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In CVPR, 2018. ",
1345
+ "bbox": [
1346
+ 171,
1347
+ 140,
1348
+ 823,
1349
+ 170
1350
+ ],
1351
+ "page_idx": 11
1352
+ },
1353
+ {
1354
+ "type": "text",
1355
+ "text": "Evan Shelhamer, Dequan Wang, and Trevor Darrell. Blurring the line between structure and learning to optimize and adapt receptive fields. arXiv preprint arXiv:1904.11487, 2019. ",
1356
+ "bbox": [
1357
+ 173,
1358
+ 178,
1359
+ 823,
1360
+ 208
1361
+ ],
1362
+ "page_idx": 11
1363
+ },
1364
+ {
1365
+ "type": "text",
1366
+ "text": "Laurent Sifre and Stephane Mallat. Rotation, scaling and deformation invariant scattering for texture ´ discrimination. In CVPR, 2013. ",
1367
+ "bbox": [
1368
+ 171,
1369
+ 215,
1370
+ 825,
1371
+ 246
1372
+ ],
1373
+ "page_idx": 11
1374
+ },
1375
+ {
1376
+ "type": "text",
1377
+ "text": "Hugues Thomas, Charles R Qi, Jean-Emmanuel Deschaud, Beatriz Marcotegui, Franc¸ois Goulette, and Leonidas J Guibas. Kpconv: Flexible and deformable convolution for point clouds. In ICCV, 2019. ",
1378
+ "bbox": [
1379
+ 174,
1380
+ 253,
1381
+ 823,
1382
+ 296
1383
+ ],
1384
+ "page_idx": 11
1385
+ },
1386
+ {
1387
+ "type": "text",
1388
+ "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 NeurIPS, 2017. ",
1389
+ "bbox": [
1390
+ 173,
1391
+ 305,
1392
+ 823,
1393
+ 335
1394
+ ],
1395
+ "page_idx": 11
1396
+ },
1397
+ {
1398
+ "type": "text",
1399
+ "text": "Dequan Wang, Evan Shelhamer, Bruno Olshausen, and Trevor Darrell. Dynamic scale inference by entropy optimization. arXiv preprint arXiv:1908.03182, 2019. ",
1400
+ "bbox": [
1401
+ 173,
1402
+ 343,
1403
+ 823,
1404
+ 372
1405
+ ],
1406
+ "page_idx": 11
1407
+ },
1408
+ {
1409
+ "type": "text",
1410
+ "text": "Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In CVPR, 2018. ",
1411
+ "bbox": [
1412
+ 176,
1413
+ 381,
1414
+ 821,
1415
+ 410
1416
+ ],
1417
+ "page_idx": 11
1418
+ },
1419
+ {
1420
+ "type": "text",
1421
+ "text": "Daniel E Worrall, Stephan J Garbin, Daniyar Turmukhambetov, and Gabriel J Brostow. Harmonic networks: Deep translation and rotation equivariance. In CVPR, 2017. ",
1422
+ "bbox": [
1423
+ 174,
1424
+ 419,
1425
+ 823,
1426
+ 448
1427
+ ],
1428
+ "page_idx": 11
1429
+ },
1430
+ {
1431
+ "type": "text",
1432
+ "text": "Saining Xie, Ross Girshick, Piotr Dollar, Zhuowen Tu, and Kaiming He. Aggregated residual trans-´ formations for deep neural networks. In CVPR, 2017. ",
1433
+ "bbox": [
1434
+ 174,
1435
+ 457,
1436
+ 821,
1437
+ 486
1438
+ ],
1439
+ "page_idx": 11
1440
+ },
1441
+ {
1442
+ "type": "text",
1443
+ "text": "Yuwen Xiong, Mengye Ren, Renjie Liao, Kelvin Wong, and Raquel Urtasun. Deformable filter convolution for point cloud reasoning. arXiv preprint arXiv:1907.13079, 2019. ",
1444
+ "bbox": [
1445
+ 174,
1446
+ 494,
1447
+ 820,
1448
+ 523
1449
+ ],
1450
+ "page_idx": 11
1451
+ },
1452
+ {
1453
+ "type": "text",
1454
+ "text": "Brandon Yang, Gabriel Bender, Quoc V Le, and Jiquan Ngiam. Soft conditional computation. arXiv preprint arXiv:1904.04971, 2019. ",
1455
+ "bbox": [
1456
+ 174,
1457
+ 531,
1458
+ 821,
1459
+ 561
1460
+ ],
1461
+ "page_idx": 11
1462
+ },
1463
+ {
1464
+ "type": "text",
1465
+ "text": "Richard Zhang. Making convolutional networks shift-invariant again. In ICML, 2019. ",
1466
+ "bbox": [
1467
+ 173,
1468
+ 570,
1469
+ 738,
1470
+ 585
1471
+ ],
1472
+ "page_idx": 11
1473
+ },
1474
+ {
1475
+ "type": "text",
1476
+ "text": "Xizhou Zhu, Han Hu, Stephen Lin, and Jifeng Dai. Deformable convnets v2: More deformable, better results. In CVPR, 2019. ",
1477
+ "bbox": [
1478
+ 173,
1479
+ 593,
1480
+ 821,
1481
+ 623
1482
+ ],
1483
+ "page_idx": 11
1484
+ },
1485
+ {
1486
+ "type": "image",
1487
+ "img_path": "images/5abbb82c034f8a61878e301501e3654d6912395090b816e2237653329513f497.jpg",
1488
+ "image_caption": [
1489
+ "Figure 5: Illustration of feed-forwarding through a $\\mathbf { 3 \\times 3 }$ local Deformable Kernel from a $4 \\times 4$ scope. For each input patch, local DK first generates a group of kernel offsets $\\{ \\Delta k \\}$ from input feature patch using the light-weight generator $\\mathcal { G }$ (a $3 \\times 3$ convolution of rigid kernel). Given the original kernel weights $W$ and the offset group $\\{ \\Delta k \\}$ , DK samples a new set of kernel $W ^ { \\prime }$ using a bilinear sampler $\\boldsymbol { B }$ . Finally, DK convolves the input feature map and the sampled kernels to complete the whole computation. "
1490
+ ],
1491
+ "image_footnote": [],
1492
+ "bbox": [
1493
+ 236,
1494
+ 102,
1495
+ 758,
1496
+ 297
1497
+ ],
1498
+ "page_idx": 12
1499
+ },
1500
+ {
1501
+ "type": "text",
1502
+ "text": "A COMPUTATION FLOW OF DEFORMABLE KERNELS ",
1503
+ "text_level": 1,
1504
+ "bbox": [
1505
+ 174,
1506
+ 409,
1507
+ 625,
1508
+ 426
1509
+ ],
1510
+ "page_idx": 12
1511
+ },
1512
+ {
1513
+ "type": "text",
1514
+ "text": "We now cover more details on implementing DKs by elaborating the computation flow of their forward and backward passes. We will focus on the local DK given its superior performance in practice. The extension to global DK implementation is straight-forward. ",
1515
+ "bbox": [
1516
+ 174,
1517
+ 439,
1518
+ 823,
1519
+ 483
1520
+ ],
1521
+ "page_idx": 12
1522
+ },
1523
+ {
1524
+ "type": "text",
1525
+ "text": "A.1 FORWARD PASS ",
1526
+ "text_level": 1,
1527
+ "bbox": [
1528
+ 176,
1529
+ 500,
1530
+ 328,
1531
+ 513
1532
+ ],
1533
+ "page_idx": 12
1534
+ },
1535
+ {
1536
+ "type": "text",
1537
+ "text": "In Section 3.3, we introduce a kernel offset generator $\\mathcal { G }$ and a bilinear sampler $\\boldsymbol { B }$ . Figure 5 illustrates an example of the forward pass. ",
1538
+ "bbox": [
1539
+ 174,
1540
+ 525,
1541
+ 821,
1542
+ 554
1543
+ ],
1544
+ "page_idx": 12
1545
+ },
1546
+ {
1547
+ "type": "text",
1548
+ "text": "Concretely, given a kernel $W$ and a learned group of kernel offsets $\\{ \\Delta k \\}$ on top of a regular 2D grid $\\{ k \\}$ , we can resample a new kernel $W ^ { \\prime }$ by a bilinear operator $\\boldsymbol { B }$ as ",
1549
+ "bbox": [
1550
+ 174,
1551
+ 560,
1552
+ 821,
1553
+ 589
1554
+ ],
1555
+ "page_idx": 12
1556
+ },
1557
+ {
1558
+ "type": "equation",
1559
+ "img_path": "images/a608a84c320e9f9db047d8137e472273804898794dfbeeeb983cc56c63cc8680.jpg",
1560
+ "text": "$$\n\\begin{array} { c } { W ^ { \\prime } \\equiv W _ { k + \\Delta k } = \\displaystyle \\sum _ { k ^ { \\prime } \\in K } | \\beta ( k + \\Delta k , k ^ { \\prime } ) W _ { k ^ { \\prime } } , } \\\\ { \\displaystyle \\mathcal { B } ( k + \\Delta k , k ^ { \\prime } ) = \\operatorname* { m a x } ( 0 , 1 - | k _ { x } + \\Delta k _ { x } - k _ { x } ^ { \\prime } | ) \\cdot \\operatorname* { m a x } ( 0 , 1 - | k _ { y } + \\Delta k _ { y } - k _ { y } ^ { \\prime } | ) . } \\end{array}\n$$",
1561
+ "text_format": "latex",
1562
+ "bbox": [
1563
+ 200,
1564
+ 593,
1565
+ 789,
1566
+ 650
1567
+ ],
1568
+ "page_idx": 12
1569
+ },
1570
+ {
1571
+ "type": "text",
1572
+ "text": "Given this resampled kernel, DK convolves it with the input image just as in normal convolutions using rigid kernels, characterized by Equation 1. ",
1573
+ "bbox": [
1574
+ 174,
1575
+ 651,
1576
+ 823,
1577
+ 681
1578
+ ],
1579
+ "page_idx": 12
1580
+ },
1581
+ {
1582
+ "type": "text",
1583
+ "text": "A.2 BACKWARD PASS ",
1584
+ "text_level": 1,
1585
+ "bbox": [
1586
+ 176,
1587
+ 696,
1588
+ 339,
1589
+ 712
1590
+ ],
1591
+ "page_idx": 12
1592
+ },
1593
+ {
1594
+ "type": "text",
1595
+ "text": "The backward pass of local DK consists of three types of gradients: (1) the gradient to the data of the previous layer, (2) the gradient to the full scope kernel of the current layer and (3) the additional gradient to the kernel offset generator of the current layer. The first two types of gradients share same forms of the computation comparing to the normal convolutions. We now cover the computation for the third flow of gradient that directs where to sample kernel values. ",
1596
+ "bbox": [
1597
+ 173,
1598
+ 723,
1599
+ 825,
1600
+ 794
1601
+ ],
1602
+ "page_idx": 12
1603
+ },
1604
+ {
1605
+ "type": "text",
1606
+ "text": "In the context of Equation 7, the partial derivative of a output item $O _ { j }$ w.r.t. $x$ component of a given kernel offset $\\Delta k _ { x }$ (similar for its $y$ component $\\Delta k _ { y }$ ) can be computed as ",
1607
+ "bbox": [
1608
+ 174,
1609
+ 800,
1610
+ 821,
1611
+ 829
1612
+ ],
1613
+ "page_idx": 12
1614
+ },
1615
+ {
1616
+ "type": "equation",
1617
+ "img_path": "images/cc0a8c703b7b502bedc043ba2fe0f1337abf699f80982d0d75b9a5b6be8431d4.jpg",
1618
+ "text": "$$\n\\frac { \\partial O _ { j } } { \\partial \\Delta k _ { x } } = \\sum _ { k } I _ { j + k } \\bigg ( \\sum _ { k ^ { \\prime } } W _ { k ^ { \\prime } } \\frac { \\partial \\mathcal { B } ( k + \\Delta k , k ^ { \\prime } ) } { \\partial \\Delta k _ { x } } \\bigg ) ,\n$$",
1619
+ "text_format": "latex",
1620
+ "bbox": [
1621
+ 313,
1622
+ 834,
1623
+ 643,
1624
+ 872
1625
+ ],
1626
+ "page_idx": 12
1627
+ },
1628
+ {
1629
+ "type": "equation",
1630
+ "img_path": "images/d3c53ed1a230cc95c857ea460abdc9afc9a2b467ba33c1a90d363151ea5d0218.jpg",
1631
+ "text": "$$\n\\frac { \\partial \\mathcal { B } ( k + \\Delta k , k ^ { \\prime } ) } { \\partial \\Delta k _ { x } } = \\operatorname* { m a x } ( 0 , 1 - | k _ { y } + \\Delta k _ { y } - k _ { y } ^ { \\prime } | ) \\cdot \\left\\{ \\begin{array} { l l } { 0 } & { | k _ { x } + \\Delta k _ { x } - k _ { x } ^ { \\prime } | \\ge 1 } \\\\ { 1 } & { k _ { x } + \\Delta k _ { x } < k _ { x } ^ { \\prime } } \\\\ { - 1 } & { k _ { x } + \\Delta k _ { x } \\ge k _ { x } ^ { \\prime } } \\end{array} \\right. .\n$$",
1632
+ "text_format": "latex",
1633
+ "bbox": [
1634
+ 245,
1635
+ 877,
1636
+ 794,
1637
+ 926
1638
+ ],
1639
+ "page_idx": 12
1640
+ },
1641
+ {
1642
+ "type": "table",
1643
+ "img_path": "images/a5bfd5471dec38e95309e5d40b5738522899bfb52ad9f1e2443e02b8e16a022a.jpg",
1644
+ "table_caption": [
1645
+ "Table 5: Network architecture of our ResNet-50-DW comparing to the original ResNet-50 Inside the brackets are the general shape of a residual block, including filter sizes and feature dimensionalities. The number of stacked blocks on each stage is presented outside the brackets. $G = 1 2 8 ^ { \\prime \\prime }$ suggests the depthwise convolution with 128 input channels. Two models have similar numbers of parameters and FLOPs. At the same time, depthwise convolutions facilitate the computation efficiency of our Deformable Kernels. "
1646
+ ],
1647
+ "table_footnote": [],
1648
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Output</td><td rowspan=1 colspan=3>ResNet-50</td><td rowspan=1 colspan=4>ResNet-50-DW</td></tr><tr><td rowspan=1 colspan=1>112 × 112</td><td rowspan=1 colspan=7>7 × 7,64,stride 2</td></tr><tr><td rowspan=1 colspan=1>56×56</td><td rowspan=1 colspan=7>3 × 3 max pool, stride 2</td></tr><tr><td rowspan=1 colspan=1>56×56</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>1×1,643 ×3,641 × 1,256</td><td rowspan=1 colspan=1>×3</td><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1>1 ×1,1283 × 3,128,G = 1281 × 1,256</td><td rowspan=1 colspan=1>×3</td></tr><tr><td rowspan=1 colspan=1>28×28</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>1×1,1283 ×3,1281 × 1,512</td><td rowspan=1 colspan=1>×4</td><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1>1 ×1,2563 × 3,256,G = 2561 ×1,512</td><td rowspan=1 colspan=1>×4</td></tr><tr><td rowspan=1 colspan=1>14 ×14</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>1 ×1,2563 ×3,2561 × 1,1024</td><td rowspan=1 colspan=1>×6</td><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1>1 ×1,5123 × 3,512,G = 5121 × 1,1024</td><td rowspan=1 colspan=1>×6</td></tr><tr><td rowspan=1 colspan=1>7×7</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>1 ×1,5123 ×3,5121 × 1,2048</td><td rowspan=1 colspan=1>×3</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=2>1 ×1,10243 × 3,1024,G =10241 × 1,2048</td><td rowspan=1 colspan=1>×3</td></tr><tr><td rowspan=1 colspan=1>1×1</td><td rowspan=1 colspan=7>7 × 7 global average pool,1000-d fc, softmax</td></tr><tr><td rowspan=1 colspan=1>#P (M)</td><td rowspan=1 colspan=3>25.6</td><td rowspan=1 colspan=4>23.7</td></tr><tr><td rowspan=1 colspan=1>GFLOPs</td><td rowspan=1 colspan=3>3.86</td><td rowspan=1 colspan=4>3.82</td></tr></table>",
1649
+ "bbox": [
1650
+ 256,
1651
+ 101,
1652
+ 740,
1653
+ 385
1654
+ ],
1655
+ "page_idx": 13
1656
+ },
1657
+ {
1658
+ "type": "text",
1659
+ "text": "B NETWORK ARCHITECTURES ",
1660
+ "text_level": 1,
1661
+ "bbox": [
1662
+ 176,
1663
+ 507,
1664
+ 444,
1665
+ 523
1666
+ ],
1667
+ "page_idx": 13
1668
+ },
1669
+ {
1670
+ "type": "text",
1671
+ "text": "Table 5 shows the comparison between the original ResNet-50 (He et al., 2016) and our modified ResNet-50-DW. The motivation of introducing depthwise convolutions to ResNet is to accelerate the computation of local DKs based on our current implementations. The ResNet-50-DW model has similar model capacity/complexity and performance (see Table 1) compared to its non-depthwise counterpart, making it an ideal base architecture for our experiments. ",
1672
+ "bbox": [
1673
+ 174,
1674
+ 537,
1675
+ 825,
1676
+ 608
1677
+ ],
1678
+ "page_idx": 13
1679
+ },
1680
+ {
1681
+ "type": "text",
1682
+ "text": "On the other hand, in all of our experiments, MobileNet-V2 (Sandler et al., 2018) base model is left untouched. ",
1683
+ "bbox": [
1684
+ 173,
1685
+ 614,
1686
+ 823,
1687
+ 643
1688
+ ],
1689
+ "page_idx": 13
1690
+ },
1691
+ {
1692
+ "type": "text",
1693
+ "text": "C ADDITIONAL COMPARISON OF EFFECTIVE RECEPTIVE FIELDS ",
1694
+ "text_level": 1,
1695
+ "bbox": [
1696
+ 176,
1697
+ 664,
1698
+ 727,
1699
+ 680
1700
+ ],
1701
+ "page_idx": 13
1702
+ },
1703
+ {
1704
+ "type": "text",
1705
+ "text": "We here show additional comparison of ERFs when objects have different kinds of deformations in Figure 6. Comparing to baseline, our method can adapt ERFs to be more persistent to object’s semantic rather than its geometric configuration. ",
1706
+ "bbox": [
1707
+ 174,
1708
+ 695,
1709
+ 825,
1710
+ 738
1711
+ ],
1712
+ "page_idx": 13
1713
+ },
1714
+ {
1715
+ "type": "text",
1716
+ "text": "D ADDITIONAL EXPERIMENT DETAILS ",
1717
+ "text_level": 1,
1718
+ "bbox": [
1719
+ 174,
1720
+ 758,
1721
+ 514,
1722
+ 773
1723
+ ],
1724
+ "page_idx": 13
1725
+ },
1726
+ {
1727
+ "type": "text",
1728
+ "text": "Image Classification: Similar to Goyal et al. (2017); Loshchilov & Hutter (2017), training is performed by SGD for 90 epochs with momentum 0.9 and batch size 256. We set our learning rate of $1 0 ^ { - 1 }$ so that it linearly warms up from zero within first 5 epochs. A cosine training schedule is applied over the training epochs. We use scale and aspect ratio augmentation with color perturbation as standard data augmentations. We evaluate the performance of trained models on the ImageNet 2012 validation set. The images are resized so that the shorter side is of 256 pixels. We then centrally crop $2 2 4 \\times 2 2 4$ windows from the images as input to measure recognition accuracy. ",
1729
+ "bbox": [
1730
+ 173,
1731
+ 789,
1732
+ 825,
1733
+ 887
1734
+ ],
1735
+ "page_idx": 13
1736
+ },
1737
+ {
1738
+ "type": "image",
1739
+ "img_path": "images/fe8c4b789257333e32ac79b42776e417679053ca788bfbae0a2167b18b100042.jpg",
1740
+ "image_caption": [
1741
+ "Figure 6: Effective Receptive Field Comparison between rigid kernels and DKs under different kinds of Object Deformation. At each row and from left to right, we show the original image $( 1 3 0 0 \\times 8 0 0 )$ , the image rotated by -90 degrees and the image scaled by 1.5 times. Images are cropped and resized for the typesetting purpose. "
1742
+ ],
1743
+ "image_footnote": [],
1744
+ "bbox": [
1745
+ 240,
1746
+ 310,
1747
+ 758,
1748
+ 652
1749
+ ],
1750
+ "page_idx": 14
1751
+ }
1752
+ ]
parse/train/SkxSv6VFvS/SkxSv6VFvS_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SkxSv6VFvS/SkxSv6VFvS_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/qG4ZVCCyCB0/qG4ZVCCyCB0.md ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/qG4ZVCCyCB0/qG4ZVCCyCB0_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/qG4ZVCCyCB0/qG4ZVCCyCB0_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/qG4ZVCCyCB0/qG4ZVCCyCB0_model.json ADDED
The diff for this file is too large to render. See raw diff
 
vlm/train/0lz69oI5iZP/0.png ADDED

Git LFS Details

  • SHA256: 534d14840429191b6798772f5bca3ea511acb046a4fc90bc0a4c8622bf3032ab
  • Pointer size: 131 Bytes
  • Size of remote file: 488 kB
vlm/train/0lz69oI5iZP/1.png ADDED

Git LFS Details

  • SHA256: fc7e2704cc5df60949ea14d29370c98925d09413cd6a42c4dea4bf2bb36c5f26
  • Pointer size: 131 Bytes
  • Size of remote file: 637 kB
vlm/train/0lz69oI5iZP/11.png ADDED

Git LFS Details

  • SHA256: d0fa621be285c76541e18f41172f342ac5177c01e68c64a9708afa889daaa0a1
  • Pointer size: 131 Bytes
  • Size of remote file: 295 kB
vlm/train/0lz69oI5iZP/2.png ADDED

Git LFS Details

  • SHA256: b900ad5874c6aa97d5d7d61f47e87f6f144d3cc91aef01d951ae25db2fda4018
  • Pointer size: 131 Bytes
  • Size of remote file: 603 kB
vlm/train/0lz69oI5iZP/3.png ADDED

Git LFS Details

  • SHA256: 0d9e735be9791531f05021d9f07bcc2d23c16dd512f3b7faeae1f38108515f92
  • Pointer size: 131 Bytes
  • Size of remote file: 625 kB
vlm/train/0lz69oI5iZP/4.png ADDED

Git LFS Details

  • SHA256: 413f3313c33063f11481ae32c5388fe5bd7d26c9686a7547a219ef71b621b51f
  • Pointer size: 131 Bytes
  • Size of remote file: 649 kB
vlm/train/0lz69oI5iZP/5.png ADDED

Git LFS Details

  • SHA256: 74b8ce82e464e05573ee4be4994e7551b084a7ba08da305967a8bc41209ebab3
  • Pointer size: 131 Bytes
  • Size of remote file: 651 kB
vlm/train/0lz69oI5iZP/7.png ADDED

Git LFS Details

  • SHA256: 764fe7d14595f443b5ceae73141e922ead698dd3444d91fbecf04e6b0ec00c5a
  • Pointer size: 131 Bytes
  • Size of remote file: 635 kB
vlm/train/0lz69oI5iZP/8.png ADDED

Git LFS Details

  • SHA256: a3ee66506a7b7b45f8e96605fa07236c63bd46738af16b526dc618b77bbf7e9b
  • Pointer size: 131 Bytes
  • Size of remote file: 572 kB
vlm/train/0lz69oI5iZP/9.png ADDED

Git LFS Details

  • SHA256: edaffeff85bbbee07abc27ff08677845dd114693b400551ca49a9037c25103e1
  • Pointer size: 131 Bytes
  • Size of remote file: 548 kB
vlm/train/9uFiX_HRsIL/0.png ADDED

Git LFS Details

  • SHA256: 6beb74caf633a395b466666df6adb6b908213562a54b59dc7ef25821831b849a
  • Pointer size: 131 Bytes
  • Size of remote file: 510 kB
vlm/train/9uFiX_HRsIL/1.png ADDED

Git LFS Details

  • SHA256: a3d462d6f824244cf9792711c60aebf7e421699af13dc2bb3cfdc3bd066b3c4f
  • Pointer size: 131 Bytes
  • Size of remote file: 975 kB
vlm/train/9uFiX_HRsIL/10.png ADDED

Git LFS Details

  • SHA256: 07ca355ee5f9adf5d8c5ded2d24b4ef2f4891fabe0dbcd21b4d89272f0d5a5f5
  • Pointer size: 131 Bytes
  • Size of remote file: 546 kB
vlm/train/9uFiX_HRsIL/11.png ADDED

Git LFS Details

  • SHA256: a036456aa45772db0c309b1d51288c0936bea4d96ca5763b68697e1c181fda1c
  • Pointer size: 131 Bytes
  • Size of remote file: 552 kB
vlm/train/9uFiX_HRsIL/12.png ADDED

Git LFS Details

  • SHA256: 3d10c5e6bec6164d931d41de5a696364b95d3effa4376e77fa53e1ff69182311
  • Pointer size: 131 Bytes
  • Size of remote file: 124 kB
vlm/train/9uFiX_HRsIL/2.png ADDED

Git LFS Details

  • SHA256: e3ec47c5b3265a4cff970c542d35adc8068dabb6e7fa5309d1d0ba87da3026b1
  • Pointer size: 131 Bytes
  • Size of remote file: 541 kB
vlm/train/9uFiX_HRsIL/3.png ADDED

Git LFS Details

  • SHA256: 02699be29409434dce12d99808d6f7ee48476b23c902e7cb7d1e99b39f9704e5
  • Pointer size: 131 Bytes
  • Size of remote file: 532 kB
vlm/train/9uFiX_HRsIL/4.png ADDED

Git LFS Details

  • SHA256: 0a0ec0f1a991ba20c5852e5f89b291078a64d6b67c451652e063440e9b995f6f
  • Pointer size: 131 Bytes
  • Size of remote file: 646 kB
vlm/train/9uFiX_HRsIL/5.png ADDED

Git LFS Details

  • SHA256: 072a676c7fb9522a2c47ed10635ade43f91ae69c2ec7fcc4ac6b55c5b076ecfa
  • Pointer size: 131 Bytes
  • Size of remote file: 591 kB
vlm/train/9uFiX_HRsIL/6.png ADDED

Git LFS Details

  • SHA256: 6e5715fd6362eec9c7495186d187c2a03d62a30ee6d5c2343218d23f1b03adbe
  • Pointer size: 131 Bytes
  • Size of remote file: 733 kB
vlm/train/9uFiX_HRsIL/7.png ADDED

Git LFS Details

  • SHA256: e5e64396fc424ba5382e89f4fbb2476074881236a6894f74f963c279b3481eca
  • Pointer size: 131 Bytes
  • Size of remote file: 755 kB
vlm/train/9uFiX_HRsIL/8.png ADDED

Git LFS Details

  • SHA256: 65f4b270818fc7f2bef4ae5a2f03ec4f0e75617e4587c6abadc504c53159c4a2
  • Pointer size: 131 Bytes
  • Size of remote file: 539 kB
vlm/train/9uFiX_HRsIL/9.png ADDED

Git LFS Details

  • SHA256: b1817bf09b0901b4953bdd704be59dddd1127eb6f29eab4ab9d9ca56ece3d2e3
  • Pointer size: 131 Bytes
  • Size of remote file: 586 kB
vlm/train/Aw96fN64soV/0.png ADDED

Git LFS Details

  • SHA256: 7b71f5357060166f64bdc891487d75d04effdc922865f4677262838cac22daa4
  • Pointer size: 131 Bytes
  • Size of remote file: 418 kB
vlm/train/Aw96fN64soV/1.png ADDED

Git LFS Details

  • SHA256: 09792930d2202c5954750818e85c83c76140173e01786ef30f32e313f4ad741f
  • Pointer size: 131 Bytes
  • Size of remote file: 544 kB
vlm/train/Aw96fN64soV/10.png ADDED

Git LFS Details

  • SHA256: 0e3289f72ac74e89702a762c19fd4218d778ddbf5b9bf7fe34e76ac285e8abd6
  • Pointer size: 131 Bytes
  • Size of remote file: 573 kB
vlm/train/Aw96fN64soV/11.png ADDED

Git LFS Details

  • SHA256: a96818aa6a21992faa01006fed84e9f85265baf7aef85c6cd7b2f162045911f2
  • Pointer size: 131 Bytes
  • Size of remote file: 624 kB
vlm/train/Aw96fN64soV/12.png ADDED

Git LFS Details

  • SHA256: 3d711efe1191e360e23f7a778f29529ff2030d0b105374f86a5e2c5fa98cc601
  • Pointer size: 131 Bytes
  • Size of remote file: 565 kB
vlm/train/Aw96fN64soV/13.png ADDED

Git LFS Details

  • SHA256: c7c2a69bc9180f79baf21be84712a689dd4d8ecc21774637be6ef6f0ad2fa714
  • Pointer size: 131 Bytes
  • Size of remote file: 505 kB
vlm/train/Aw96fN64soV/14.png ADDED

Git LFS Details

  • SHA256: a188b02632c128bd6671a5c3098a77049c9868e0f4263b53e49fb1100d5f37e7
  • Pointer size: 131 Bytes
  • Size of remote file: 247 kB