ZHANGYUXUAN-zR commited on
Commit
075c7c4
·
verified ·
1 Parent(s): a6ea37c

Add files using upload-large-folder tool

Browse files
parse/train/ByghKiC5YX/ByghKiC5YX.md ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ByghKiC5YX/ByghKiC5YX_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ByghKiC5YX/ByghKiC5YX_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ByghKiC5YX/ByghKiC5YX_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HktJec1RZ/HktJec1RZ.md ADDED
@@ -0,0 +1,243 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # TOWARDS NEURAL PHRASE-BASED MACHINE TRANSLATION
2
+
3
+ Po-Sen Huang?, Chong Wang∗†, Sitao Huang∗‡, Dengyong Zhou∗†, Li Deng∗ ?Microsoft Research, †Google, ‡University of Illinois at Urbana-Champaign, Citadel pshuang@microsoft.com, {chongw, dennyzhou}@google.com, shuang91@illinois.edu, l.deng@ieee.org
4
+
5
+ # ABSTRACT
6
+
7
+ In this paper, we present Neural Phrase-based Machine Translation (NPMT).1 Our method explicitly models the phrase structures in output sequences using SleepWAke Networks (SWAN), a recently proposed segmentation-based sequence modeling method. To mitigate the monotonic alignment requirement of SWAN, we introduce a new layer to perform (soft) local reordering of input sequences. Different from existing neural machine translation (NMT) approaches, NPMT does not use attention-based decoding mechanisms. Instead, it directly outputs phrases in a sequential order and can decode in linear time. Our experiments show that NPMT achieves superior performances on IWSLT 2014 German-English/EnglishGerman and IWSLT 2015 English-Vietnamese machine translation tasks compared with strong NMT baselines. We also observe that our method produces meaningful phrases in output languages.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ A word can be considered as a basic unit in languages. However, in many cases, we often need a phrase to express a concrete meaning. For example, consider understanding the following sentence, “machine learning is a field of computer science”. It may become easier to comprehend if we segment it as “[machine learning] [is] [a field of] [computer science]”, where the words in the bracket ‘[]’ are regarded as “phrases”. These phrases have their own meanings, and can often be reused in other contexts.
12
+
13
+ The goal of this paper is to explore the use of phrase structures aforementioned for neural networkbased machine translation systems (Sutskever et al., 2014; Bahdanau et al., 2015). To this end, we develop a neural machine translation method that explicitly models phrases in target language sequences. Traditional phrase-based statistical machine translation (SMT) approaches have been shown to consistently outperform word-based ones (Koehn et al., 2003; Koehn, 2009; Lopez, 2008). However, modern neural machine translation (NMT) methods (Sutskever et al., 2014; Bahdanau et al., 2015; Luong et al., 2015) do not have an explicit treatment on phrases, but they still work surprisingly well and have been deployed to industrial systems (Zhou et al., 2016; Wu et al., 2016). The proposed Neural Phrase-based Machine Translation (NPMT) method tries to explore the advantages from both kingdoms. It builds upon Sleep-WAke Networks (SWAN), a segmentation-based sequence modeling technique described in Wang et al. (2017a), where segments (or phrases) are automatically discovered given the data. However, SWAN requires monotonic alignments between inputs and outputs. This is often not an appropriate assumption in many language pairs. To mitigate this issue, we introduce a new layer to perform (soft) local reordering on input sequences. Experimental results show that NPMT outperforms attention-based NMT baselines in terms of the BLEU score (Papineni et al., 2002) on IWSLT 2014 German-English/English-German and IWSLT 2015 English-Vietnamese translation tasks. We believe our method is one step towards the full integration of the advantages from neural machine translation and phrase-based SMT.
14
+
15
+ ![](images/0018d81637be7940c2624cfd2b2a620dab6e222174a4447ecf6cebdfaccbc735.jpg)
16
+ Figure 1: (a) The overall architecture of NPMT. (b) An illustration of using NPMT in German-English translation. Ideally, phrases in the source sentence (German) are first reordered. Given the new order, phrases can be translated one by one to the target phrases. These translated phrases then compose the target sentence (English). Phrase boundaries in the target language are not predefined, but automatically discovered by the model. No attention-based decoders are used here.
17
+
18
+ This paper is organized as follows. Section 2 presents the neural phrase-based machine translation model. Section 3 demonstrates the usefulness of our approach on several language pairs. We conclude our work with some discussions in Section 4.
19
+
20
+ # 2 NEURAL PHRASE-BASED MACHINE TRANSLATION
21
+
22
+ We first give an overview of the proposed NPMT architecture and some related work on incorporating phrases into NMT. We then describe the two key building blocks in NPMT: 1) SWAN, and 2) the soft reordering layer which alleviates the monotonic alignment requirement of SWAN. In the context of machine translation, we use “segment” and “phrase” interchangeably.
23
+
24
+ # 2.1 THE OVERALL ARCHITECTURE OF NPMT
25
+
26
+ Figure 1(a) shows the overall architecture of NPMT. The input sequence is first turned into embedding representations and then they go through a (soft) reordering layer (described below in Section 2.3). We then pass these “reordered” activations to the bi-directional RNN layers, which are finally fed into the SWAN layer to directly output target language in terms of segments (or phrases). While it is possible to replace bi-directional RNN layers with other layers (Gehring et al., 2017), in this paper, we have only explored this particular setting to demonstrate our proposed idea.
27
+
28
+ There have been several works that propose different ways to incorporate phrases into attentionbased neural machine translation, such as Tang et al. (2016); Wang et al. (2017b); Dahlmann et al. (2017). These approaches typically use predefined phrases (obtained by external methods, e.g., phrase-based SMT) to guide or modify the existing attention-based decoder. The major difference from our approach is that, in NPMT, we do not use attention-based decoding mechanisms, and our phrase structures for the target language are automatically discovered from the training data. Another line of related work is the segment-to-segment neural transduction model (SSNT) (Yu et al., 2016), which shows promising results on a Chinese-to-English translation task under a noisy channel framework (Yu et al., 2017). In SSNT, the segments are implicit, and the monotonic alignments between the inputs and outputs are achieved using latent variables. The latent variables are marginalized out during training using dynamic programming.
29
+
30
+ ![](images/f2db59dcee2bd68e1529a76946c6054184d2348ccf70688216afc5eb322f7ea3.jpg)
31
+ Figure 2: Courtesy to Wang et al. (2017a). Symbol $\$ 1$ indicates the end of a segment. Given a sequence of inputs $x _ { 1 } , \ldots , x _ { 5 }$ , which is from the outputs from the bi-directional RNN of Figure 1(a), SWAN emits one particular segmentation of $y _ { 1 : 3 } = \pi ( a _ { 1 : 5 } )$ , where $\{ a _ { 1 } = \{ y _ { 1 } , \ S \} , a _ { 2 } = \{ \ S \} , a _ { 3 } = \{ \ S \} , a _ { 4 } = \{ y _ { 2 } , y _ { 3 } , \ S \} , a _ { 5 } = \{ \ S \} \}$ . Here $x _ { 1 }$ wakes (emitting segment $a _ { 1 }$ ) and $x _ { 4 }$ wakes (emitting segment $a _ { 4 }$ ) while $x _ { 2 }$ , $x _ { 3 }$ and $x _ { 5 }$ sleep (emitting empty segments $a _ { 2 } , a _ { 3 }$ and $a _ { 5 }$ respectively).
32
+
33
+ # 2.2 MODELING PHRASES WITH SWAN
34
+
35
+ Here we review the SWAN model proposed in Wang et al. (2017a). SWAN defines a probability distribution for the output sequence given an input sequence. It models all valid output segmentations of the output sequence as well as the monotonic alignments between the output segments and the input sequence. Empty segments are allowed in the output segmentations. It does not make any assumption on the lengths of input or output sequence.
36
+
37
+ Assume input sequence for SWAN is $x _ { 1 : T ^ { \prime } }$ , which is the outputs from bi-directional RNN of Figure 1(a), and output sequence is $y _ { 1 : T }$ . Let $\mathcal { S } _ { y }$ denote the set containing all valid segmentations of $y _ { 1 : T }$ , with the constraint that the number of segments in a segmentation is the same as the input sequence length, $T ^ { \prime }$ . Let $a _ { t }$ denote a segment or phrase in the target sequence. Empty segments are allowed to ensure that we can correctly align segment $a _ { t }$ to input element $x _ { t }$ . Otherwise, we might not have a valid alignment for the input and output pair. See Figure 2 for an example of the emitted segmentation of $y _ { 1 : T }$ . The probability of the sequence $y _ { 1 : T }$ is defined as the sum of the probabilities of all the segmentations in $S _ { y } \triangleq \{ a _ { 1 : T ^ { \prime } } : \pi ( a _ { 1 : T ^ { \prime } } ) = y _ { 1 : T } \}$ , 2
38
+
39
+ $$
40
+ p ( y _ { 1 : T } | x _ { 1 : T ^ { \prime } } ) \stackrel { \triangle } { = } \sum _ { a _ { 1 : T ^ { \prime } } \in S _ { y } } \prod _ { t = 1 } ^ { T ^ { \prime } } p ( a _ { t } | x _ { t } ) ,
41
+ $$
42
+
43
+ where the $p ( a _ { t } | \boldsymbol x _ { t } )$ is the segment probability given input element $x _ { t }$ , which is modeled using a recurrent neural network (RNN) with an additional softmax layer. $\pi ( \cdot )$ is the concatenation operator and the symbol $\$ 1$ , end of a segment, is ignored in the concatenation operator $\pi ( \cdot )$ . (An empty segment, which only contains $\$ 1$ will thus be ignored as well.) SWAN can be also understood via a generative model,
44
+
45
+ 1. For $t = 1 , . . . , T ^ { \prime }$ : (a) Given an initial state of $x _ { t }$ , sample words from RNN until we reach an end of segment symbol $\$ 1$ . This gives us a segment $a _ { t }$ .
46
+ 2. Concatenate $\{ a _ { 1 } , . . . , a _ { T ^ { \prime } } \}$ to obtain the output sequence via $\pi ( a _ { 1 : T ^ { \prime } } ) = y _ { 1 : T }$ .
47
+
48
+ Since there are more than one way to obtain the same $y _ { 1 : T }$ using the generative process above, the probability of observing $y _ { 1 : T }$ is obtained by summing over all possible ways, which is Eq. 1.
49
+
50
+ Note that $| S _ { y } |$ is exponentially large, direct summation quickly becomes infeasible when $T$ or $T ^ { \prime }$ is not small. Instead, Wang et al. (2017a) developed an exact dynamic programming algorithm to tackle the computation challenges.3 The key idea is that although the number of possible segmentations is exponentially large, the number of possible segments is polynomial— $O ( T ^ { 2 } )$ . In other words, it is possible to first compute all possible segment probabilities, $p ( a _ { t } | \boldsymbol x _ { t } )$ , $\forall a _ { t } , x _ { t }$ , and then use dynamic programming to calculate the output sequence probability $p \big ( y _ { 1 : T } \big | x _ { 1 : T ^ { \prime } } \big )$ in Eq. (1). The feasibility of using dynamic programming is due to a property of segmentations—a segmentation of a subsequence is also part of the segmentation of the entire sequence. In practice, a maximum length $L$ for a segment $a _ { t }$ is enforced to reduce the computational complexity, since the length of useful segments is often not very long. Wang et al. (2017a) also discussed a way to carry over information across segments using a separate RNN, which we will not elaborate here. We refer the readers to the original paper for the algorithmic details.
51
+
52
+ SWAN defines a conditional probability for an output sequence given an input one. It can be used in many sequence-to-sequence tasks. In practice, a sequence encoder like a bi-directional RNN can be used to process the raw input sequence (like speech signals or source language) to obtain $x _ { 1 : T ^ { \prime } }$ that is to be passed into SWAN for decoding. For example, Wang et al. (2017a) demonstrated the usefulness of SWAN in the context of speech recognition.
53
+
54
+ Greedy decoding for SWAN is straightforward. We first note that $p ( a _ { t } | x _ { t } )$ is modeled as an RNN with an additional softmax layer. Given each $p ( a _ { t } | x _ { t } ) , \forall t \in { 1 , \dots , T ^ { \prime } }$ , is independent of each other, we can run the RNN in parallel to produce an output segment (possibly empty) for each $p ( a _ { t } | x _ { t } )$ . We then concatenate these output segments to form the greedy decoding of the entire output sequence. The decoding satisfies the non-autoregressive property (Gu et al., 2018) and the decoding complexity is $O ( T ^ { \prime } L )$ . See Wang et al. (2017a) for the algorithmic details of the beam search decoder.
55
+
56
+ We finally note that, in SWAN (thus in NPMT), only output segments are explicit; input segments are implicitly modeled by allowing empty segments in the output. This is conceptually different from the traditional phrase-based SMT where both inputs and outputs are phrases (or segments). We leave the option of exploring explicit input segments as future work.
57
+
58
+ # 2.3 LOCAL REORDERING OF INPUT SEQUENCES
59
+
60
+ SWAN assumes a monotonic alignment between the output segments and the input elements. For speech recognition experiments in Wang et al. (2017a), this is a reasonable assumption. However, for machine translation, this is usually too restrictive. In neural machine translation literature, attention mechanisms were proposed to address alignment problems (Bahdanau et al., 2015; Luong et al., 2015; Raffel et al., 2017; Vaswani et al., 2017). But it is not clear how to apply a similar attention mechanism to SWAN due to the use of segmentations for output sequences.
61
+
62
+ One may note that in NPMT, a bi-directional RNN encoder for the source language can partially mitigate the alignment issue for SWAN, since it can access every source word. However, from our empirical studies, it is not enough to obtain the best performance. Here we augment SWAN with a reordering layer that does (soft) local reordering of the input sequence. This new model leads to promising results on the IWSLT 2014 German-English/English-German, and IWSLT 2015 EnglishVietnamese machine translation tasks. One additional advantage of using SWAN is that since SWAN does not use attention mechanisms, decoding can be done in parallel with linear complexity, as now we remove the need to query the entire input source for every output word (Raffel et al., 2017; Gu et al., 2018).
63
+
64
+ We now describe the details of the local reordering layer shown in Figure 3(a). Denote the input to the local reordering layer by $e _ { 1 : T ^ { \prime } }$ , which is the output from the word embedding layer of Figure 1(a), and the output of this layer by $h _ { 1 : T ^ { \prime } }$ , which is fed as inputs to the bi-directional RNN of Figure 1(a). We compute $h _ { t }$ as
65
+
66
+ $$
67
+ h _ { t } = \operatorname { t a n h } \left( \sum _ { i = 0 } ^ { 2 \tau } \sigma \left( w _ { i } ^ { T } [ e _ { t - \tau } ; \ldots ; e _ { t } ; \ldots ; e _ { t + \tau } ] \right) e _ { t - \tau + i } \right) .
68
+ $$
69
+
70
+ where $\sigma ( \cdot )$ is the sigmoid function, and $2 \tau + 1$ is the local reordering window size. Notation $\left[ e _ { t - \tau } ; \dots ; e _ { t } ; \dots ; e _ { t + \tau } \right]$ is the concatenation of vectors $e _ { t - \tau } , \ldots , e _ { t } , \ldots , e _ { t + \tau }$ . For $i = 0 , \ldots , 2 \tau$ , notation $w _ { i }$ is the parameter for the gate function at position $i$ of the input window. It decides the weight of $e _ { t - \tau + i }$ through the gate $\sigma \left( w _ { i } ^ { T } [ e _ { t - \tau } ; \dots ; e _ { t } ; \dots ; e _ { t + \tau } ] \right)$ . The final output $h _ { t }$ is a weighted linear combination of the input elements, $e _ { t - \tau } , \ldots , e _ { t } , \ldots , e _ { t + \tau }$ , in the window followed by a nonlinear transformation by the $\operatorname { t a n h } ( { \cdot } )$ function.
71
+
72
+ ![](images/574a196ce3e249ae84d30dc93a2745d650bb3e8078edc7966df594c046bee891.jpg)
73
+ Figure 3: (a) Example of a local reordering layer of window size 5 $\tau = 2 ,$ ) to compute $h _ { t }$ . Here $\sigma _ { t - 2 + i } \triangleq$ $\sigma ( \bar { w } _ { i } ^ { T } [ e _ { t - 2 } ; e _ { t - 1 } ; e _ { t } ; e _ { t + 1 } ; e _ { t + 2 } ] )$ , $i = 0 , \ldots , 4$ , are the gates that decides how much information $h _ { t }$ should accept from those elements from this input window. Note that all information available in this input window helps decides each gate. (b) An illustration of the reordering layer that swaps information between $e _ { 2 }$ and $e _ { 3 }$ and contributes to $h _ { 3 }$ and $h _ { 2 }$ , respectively.
74
+
75
+ Figure 3(b) illustrates how local reordering works. Here we want to (softly) select an input element from a window given all information available in this window. Suppose we have two adjacent windows, $( e _ { 1 } , e _ { 2 } , e _ { 3 } )$ and $( e _ { 2 } , e _ { 3 } , e _ { 4 } )$ . If $e _ { 3 }$ gets the largest weight $\mathrm { i } e _ { 3 }$ is picked) in the first window and $e _ { 2 }$ gets the largest weight $\stackrel { \cdot } { e } _ { 2 }$ is picked) in the second window, $e _ { 2 }$ and $e _ { 3 }$ are effectively reordered. Our layer is different from the attention mechanism (Bahdanau et al., 2015; Luong et al., 2015; Raffel et al., 2017; Vaswani et al., 2017) in following ways. First, we do not have a query to begin with as in standard attention mechanisms. Second, unlike standard attention, which is top-down from a decoder state to encoder states, the reordering operation is bottom-up. Third, the weights $\{ w _ { i } \} _ { i = 0 } ^ { 2 \tau }$ capture the relative positions of the input elements, whereas the weights are the same for different queries and encoder hidden states in the attention mechanism (no positional information). The reordering layer performs locally similar to a convolutional layer and the positional information is encoded by a different parameter $w _ { i }$ for each relative position $i$ in the window. Fourth, we do not normalize the weights for the input elements $e _ { t - \tau } , \ldots , e _ { t } , \ldots , e _ { t + \tau }$ . This provides the reordering capability and can potentially turn off everything if needed. Finally, the gate of any position $i$ in the reordering window is determined by all input elements $e _ { t - \tau } , \ldots , e _ { t } , \ldots , e _ { t + \tau }$ in the window. We provide a visualizing example of the reordering layer gates that performs input swapping in Appendix A.
76
+
77
+ One related work to our proposed reordering layer is the Gated Linear Units (GLU) (Dauphin et al., 2017) which can control the information flow of the output of a traditional convolutional layer. But GLU does not have a mechanism to decide which input element from the convolutional window to choose. From our experiments, neither GLU nor traditional convolutional layer helped our NPMT. Another related work to the window size of the reordering layer is the distortion limit in traditional phrase-based statistical machine translation methods (Brown et al., 1993). Different window sizes restrict the context of each position to different numbers of neighbors. We provide an empirical comparison of different window sizes in Appendix B.
78
+
79
+ # 3 EXPERIMENTS
80
+
81
+ In this section, we evaluate our model on the IWSLT 2014 German-English (Cettolo et al., 2014), IWSLT 2014 English-German, and IWSLT 2015 English-Vietnamese (Cettolo et al., 2015) machine translation tasks. We note that, in this paper, we limit the applications of our model to relatively small datasets to demonstrate the usefulness of our method. We plan to conduct more large scale experiments in future work.
82
+
83
+ Table 1: Translation results on the IWSLT 2014 German-English test set. MIXER Ranzato et al. (2015) uses a convolutional encoder and simpler attention. LL (attention model with log likelihood) and BSO (beam search optimization) of Wiseman & Rush (2016), and LL, $\mathsf { R F - C + L L }$ , and $\mathrm { \ A C + L L }$ of Bahdanau et al. (2017) use a one-layer GRU encoder and decoder with attention. (RF- $\mathrm { C + L L }$ and $\mathrm { \ A C + L L }$ are different settings of actor-critic algorithms combined with LL.) $\mathrm { L L ^ { * } }$ stands for a well-tuned attention model with log likelihood with the same word embedding size, and encoder and decoder size as NPMT.
84
+
85
+ <table><tr><td></td><td colspan="2">BLEU</td></tr><tr><td>MIXER (Ranzato et al., 2015)</td><td>Greedy 20.73</td><td>Beam Search 21.83</td></tr><tr><td>LL(Wiseman &amp; Rush,2016)</td><td>22.53</td><td>23.87</td></tr><tr><td>BSO (Wiseman &amp; Rush,2016)</td><td>23.83</td><td>25.48</td></tr><tr><td>LL (Bahdanau et al., 2017)</td><td>25.82</td><td>27.56</td></tr><tr><td>LL*</td><td>26.17</td><td>27.61</td></tr><tr><td>RF-C+LL (Bahdanau et al., 2017)</td><td>27.70</td><td>28.30</td></tr><tr><td>AC+LL (Bahdanau et al., 2017)</td><td>27.49</td><td>28.53</td></tr><tr><td>NPMT (this paper)</td><td>28.57</td><td>29.92</td></tr><tr><td>NPMT+LM (this paper)</td><td>1</td><td>30.08</td></tr></table>
86
+
87
+ # 3.1 IWSLT14 GERMAN-ENGLISH
88
+
89
+ We evaluate our model on the German-English machine translation track of the IWSLT 2014 evaluation campaign (Cettolo et al., 2014). The data comes from translated TED talks, and the dataset contains roughly 153K training sentences, 7K development sentences, and 7K test sentences. We use the same preprocessing and dataset splits as in Ranzato et al. (2015); Wiseman & Rush (2016); Bahdanau et al. (2017). The German and English vocabulary sizes are 32,010 and 22,823 respectively.
90
+
91
+ We report our IWSLT 2014 German-English experiments using one reordering layer with window size 7, two layers of bi-directional GRU encoder (Gated recurrent unit, Chung et al. (2014)) with 256 hidden units, and two layers of unidirectional GRU decoder with 512 hidden units. We add dropout with a rate of 0.5 in the GRU layer. We choose GRU since baselines for comparisons were using GRU. The maximum segment length is set to 6. Batch size is set as 32 (per GPU) and the Adam algorithm (Kingma & Ba, 2014) is used for optimization with an initial learning rate of 0.001. For decoding, we use greedy search and beam search with a beam size of 10. As reported in Maas et al. (2014); Bahdanau et al. (2017), we find that penalizing candidate sentences that are too short was required to obtain the best results. We add the middle term of Eq. (3) to encourage longer candidate sentences. All hyperparameters are chosen based on the development set. NPMT takes about 2–3 days to run to convergence (40 epochs) on a machine with four M40 GPUs. The results are summarized in Table 1. In addition to previous reported baselines in the literature, we also explored the best hyperparameter using the same model architecture (except the reordering layer) using sequence-to-sequence model with attention as reported as $\mathrm { L L ^ { * } }$ of Table 1.
92
+
93
+ NPMT achieves state-of-the-art results on this dataset as far as we know. Compared to the supervised sequence-to-sequence model, LL (Bahdanau et al., 2017), NPMT achieves 2.4 BLEU gain in the greedy setting and 2.25 BLEU gain using beam-search. Our results are also better than those from the actor-critic based methods in Bahdanau et al. (2017). But we note that our proposed method is orthogonal to the actor-critic method. So it is possible to further improve our results using the actor-critic method.
94
+
95
+ We also run the following two experiments to verify the sources of the gain. The first is to add a reordering layer to the original sequence-to-sequence model with attention, which gives us BLEU scores of 25.55 (greedy) and 26.91 (beam search). Since the attention mechanism and reordering layer capture similar information, adding the reordering layer to the sequence-to-sequence model with attention does not improve the performance. The second is to remove the reordering layer from NPMT, which gives us BLEU scores of 27.79 (greedy) and 29.28 (beam search). This shows that the reordering layer and SWAN are both important for the effectiveness of NPMT.
96
+
97
+ ![](images/f011df22d242d42a70b6b63be55bdc1a37a6b1215c75d9b35af60250668e7eb7.jpg)
98
+ Figure 4: An example of NPMT greedy decoding output for German-English translation. The example corresponds to the first example of Table 2. Note that for illustrating the input and output segments, we do not take into account of the behavior of the reordering layer and bi-directional RNN—the index mappings from source to target assumes monotonic alignments so some of them might be inaccurate.
99
+
100
+ Table 2: Examples of German-English translation outputs with their segmentations. We label the indexes of the words in the source sentence and we use those indexes to indicate where the output segment is emitted. For example, in greedy decoding results, $\cdots \ r { w o r d 1 } , \ldots , \ r { w o r d _ { m } } ^ { , }$ denotes $_ { i }$ -th word in the source sentence emits words $\mathtt { w o r d 1 } , \dots , \mathtt { w o r d } _ { m }$ during decoding (assuming monotonic alignments). The $\because$ represents the segment boundary in the target output. See Figure 4 for a visualization of row 1 in this table.
101
+
102
+ <table><tr><td>source greedy decoding target ground truth</td><td>1danke², aber 4dasbestekommt7noch8. 1thank you .²,. 3but · 5the best thing ·is stillcoming 8. thanks .i haven &#x27;t come to the best part .</td></tr><tr><td>source</td><td>1sie ²konnen einen 4schalter dazwischen einfugen und so haben 10sie 11einen 12kleinen13UNK14erstellt 15.</td></tr><tr><td>greedy decoding</td><td>1you can put · 4a switch · 5in between · 7and · 8so . 10they created . 12a little . 13UNK 14.</td></tr><tr><td>target ground truth source</td><td>you can put a knob in between and now you &#x27;ve made a little UNK . sie²wollen die4entscheidungwirklichrichtig7treffen 8,9wenn 10es1fur</td></tr><tr><td>greedy decoding</td><td>12alle13ewigkeit14ist1516richtig 17? 1you really want to make· 4the decision · right . 8, 9if . 10it&#x27;s . 11for ·</td></tr><tr><td>target ground truth</td><td>12all.13eternity .15.16right 17? you really want to get the decision right if it &#x27;s forall eternity,right ?</td></tr><tr><td>source</td><td>es²gibt zehntausende4maschinenrundum7dieweltdiekleine stuicke 12von 13dna14herstellen 15konnen 16,1730 18bis 1950 2buchstaben 211ang 22aber 23es</td></tr><tr><td>greedy decoding</td><td>24ist 25ein 26UNK 27 28,29als0 33ein 4stick 5macht 36, prozess 37umso8mehrfehler opasseren41. , 1there are · 3tens of thousands of · 4machines · around · 8the world ·9can make · 10litle11pieces .12of.13dna.16.1730.18to.1950.201eters .211ong .22, but o23it’&#x27;s s 26a more UNK .27process 8. 29so . 31the longer. 32you make&#x27;</td></tr><tr><td>target ground truth</td><td>34a piece . 36, 38the more 39mistakes 40happen 41. there are tens of thousands of machines around the world that make small pieces of dna - 30 to 5O letters - in length - and it &#x27;s a UNK process , so the longer you make the piece ,the more errors there are .</td></tr></table>
103
+
104
+ In greedy decoding, we can estimate the average segment length4 for the output. The average segment length is around 1.4–1.6, indicating phrases with more than one word are being decoded. Figure 4 shows an example of the input and decoding results with NPMT. We can observe phraselevel translation being captured by the model (e.g., “danke” “thank you”). The model also knows when to sleep before outputting a phrase (e.g., “das” $ ^ { 6 6 } \bar { \Phi } ^ { \bullet }$ ). We use the indexes of words in the source sentence to indicate where the output phrases are from. Table 2 shows some sampled examples. We can observe there are many informative segments in the decoding results, e.g., “tens of thousands of”, “the best thing”, “a little”, etc. There are also mappings from phrase to phrase, word to phrases, and phrase to word in the examples. Following the analysis, we show the most frequent phrase mappings in Appendix C.
105
+
106
+ We also explore an option of adding a language-model score during beam search as the traditional statistical machine translation does. This option might not make much sense in attention-based approaches, since the decoder itself is usually a neural network language model. In SWAN, however, there is no language models directly involved in the segmentation modeling,5 and we find it useful to have an external language model during beam search. We use a 4th-order language model trained using the KenLM implementation (Heafield et al., 2013) for English target training data. So the final beam search score we use is
107
+
108
+ $$
109
+ Q ( y ) = \log p ( y | x ) + \lambda _ { 1 } \mathrm { w o r d \_ c o u n t } ( y ) + \lambda _ { 2 } \log p _ { \mathrm { l m } } ( y ) ,
110
+ $$
111
+
112
+ where we empirically find that $\lambda _ { 1 } = 1 . 2$ and $\lambda _ { 2 } = 0 . 2$ give good performance, which are tuned on the development set. The results with the external language model are denoted by NPMT+LM in Table 1. If no external language models are used, we set $\lambda _ { 2 } = 0$ . This scoring function is similar to the one for speech recognition in Hannun et al. (2014).
113
+
114
+ # 3.2 IWSLT14 ENGLISH-GERMAN
115
+
116
+ We also evaluate our model on the opposition direction, English-German, which translates from a more segmented text to a more inflectional one. Following the setup in Section 3.1, we use the same dataset with the opposite source and target languages. We use the same model architecture, optimization algorithm and beam search size as the German-English translation task. NPMT takes about 2–3 days to run to convergence (40 epochs) on a machine with four M40 GPUs.
117
+
118
+ Given there is no previous sequence-to-sequence attention model baseline for this setup, we create a strong one and tune hyperparameters on the development set. The results are shown in Table 3. Based on the development set, we set $\lambda _ { 1 } = 1$ and $\lambda _ { 2 } = 0 . 1 5$ in Eq. (3). Our model outperforms sequence-to-sequence model with attention by 2.46 BLEU and 2.49 BLEU in greedy and beam search cases. We can also use a 4th-order language model trained using the KenLM implementation for German target training data, which further improves the performance. Some sampled examples are shown in Table 4. Several informative segments/phrases can be found in the decoding results, e.g., “some time ago” “vor enniger zeit”.
119
+
120
+ Table 3: Translation results on the IWSLT 2014 English-German test set.
121
+
122
+ <table><tr><td></td><td colspan="2">BLEU</td></tr><tr><td></td><td>Greedy</td><td>Beam Search</td></tr><tr><td>Sequence-to-sequence with attention</td><td>21.26</td><td>22.59</td></tr><tr><td>NPMT (this paper)</td><td>23.62</td><td>25.08</td></tr><tr><td>NPMT+LM (this paper)</td><td>1</td><td>25.36</td></tr></table>
123
+
124
+ # 3.3 IWSLT15 ENGLISH-VIETNAMESE
125
+
126
+ In this section, we evaluate our model on the IWSLT 2015 English to Vietnamese machine translation task. The data is from translated TED talks, and the dataset contains roughly 133K training sentence pairs provided by the IWSLT 2015 Evaluation Campaign (Cettolo et al., 2015). Following the same preprocessing steps in Luong & Manning (2015); Raffel et al. (2017), we use the TED tst2012 (1553 sentences) as a validation set for hyperparameter tuning and TED tst2013 (1268 sentences) as a test set. The Vietnamese and English vocabulary sizes are 7,709 and 17,191 respectively.
127
+
128
+ Table 4: Examples of English-German translation outputs with their segmentations. The meanings of the superscript indexes and the “•” symbol are the same as those in Table 2.
129
+
130
+ <table><tr><td>source greedy decoding target ground truth</td><td>1how ²would you 4guysdescribeyour7brand ? 1 wie · ²wurdet · Зsie ·ihre marke ·&amp;beschreiben ? wie wirdet ihr eure marke beschreiben ?</td></tr><tr><td>source greedy decoding target ground truth</td><td>1if²themuseum 4has given us7theimage9,10youclick 12on1it 14. 1wenn . ²das museum uns 7das bild 9gegeben hat , 10klicken sie . i3darauf 14. wenn das museum uns das bild gegeben hat,klicken sie darauf </td></tr><tr><td>source greedy decoding</td><td>theyarefrustratedashellwithit8buttheyre2notcomplaining 1about5it16ey8in2it2 1sie sind . 3frustriert 8, . 9aber 10sie UNK sich . 12nicht ·</td></tr><tr><td>target ground truth</td><td>15daruber . 16,. 17sie reparieren . 20es . 21. sie sie sind furchterlich frustriert mit ihr,aber sie beschweren sich nicht daruber,</td></tr><tr><td>source</td><td>sie reparieren sie.? 1now²some time 4ago 5,if 7you wantedto 10win 12 formula 13114race 17take 18a1 1516 19budget2 2021 22, 23bet you and 2you</td></tr><tr><td>greedy decoding</td><td>24your 25budget 26on 28 129driver 30 31 32 2good 33car34. good Pand a 2yoreiniger zeit wenn.man 11eine formel 15 5gewinnen will, . 18ein budget . 21und 23 24ihr budget ·2 27 auf einem guten .2 29fahrer · 31ein gutes · : ,dass·</td></tr><tr><td>target ground truth</td><td>33auto . 34 vor einiger zeit war es so ,dass wenn sie ein formel 1 rennen gewinnen wollten, dann nahmen sie ihr budget und setzten ihr geld auf einen guten fahrer und ein gutes auto</td></tr></table>
131
+
132
+ We use one reordering layer with window size 7, two layers of bi-directional LSTM (Long shortterm memory, Hochreiter & Schmidhuber (1997)) encoder with 512 hidden units, and three layers of unidirectional LSTM decoder with 512 hidden units. We add dropout with a rate of 0.4 in the LSTM layer. We choose LSTM since baselines for comparisons were using LSTM. The maximum segment length is set to 7. Batch size is set as 48 (per GPU) and the Adam algorithm Kingma & Ba (2014) is used for optimization with an initial learning rate of 0.001. For decoding, we use greedy decoding and beam search with a beam size of 10. The results are shown in Table 5. Based on the development set, we set $\lambda _ { 1 } = 0 . 7$ and $\lambda _ { 2 } = 0 . 1 5$ in Eq. (3). NPMT takes about one day to run to convergence (15 epochs) on a machine with $4 ~ \mathrm { M 4 0 }$ GPUs. Our model outperforms sequence-tosequence model with attention by 1.41 BLEU and 1.59 BLEU in greedy and beam search cases. We also use a 4th-order language model trained using the KenLM implementation for Vietnamese target training data, which further improves the BLEU score. Note that our reordering layer relaxes the monotonic assumption as in Raffel et al. (2017) and is able to decode in linear time. Empirically we outperform models with monotonic attention. Table 6 shows some sampled examples.
133
+
134
+ Table 5: Translation results on the IWSLT 2015 English-Vietnamese tst2013 test set. The result of the sequence-to-sequence model with attention is obtained from an open source model provided by the authors.7
135
+
136
+ <table><tr><td></td><td colspan="2">BLEU</td></tr><tr><td></td><td>Greedy</td><td>Beam Search</td></tr><tr><td>Hard monotonic (Raffel et al., 2017)</td><td>23.00</td><td></td></tr><tr><td>Luong &amp; Manning (2015)</td><td>-</td><td>23.30</td></tr><tr><td>Sequence-to-sequence model with attention</td><td>25.50</td><td>26.10</td></tr><tr><td>NPMT (this paper)</td><td>26.91</td><td>27.69</td></tr><tr><td>NPMT+LM (this paper)</td><td>1</td><td>28.07</td></tr></table>
137
+
138
+ # 4 CONCLUSION
139
+
140
+ We proposed NPMT, a neural phrase-based machine translation system that models phrase structures in the target language using SWAN. We also introduced a local reordering layer to mitigate the monotonic alignment requirement in SWAN. Our experimental results showed promising results on IWSLT 2014 German-English, English-German, and IWSLT 2015 English-Vietnamese machine translation tasks. The results suggest that NPMT can potentially be extended to explore the structures in other challenging sequence-to-sequence problems. In future work, we will explore two directions: 1) speed up NPMT and apply it to larger datasets and more language pairs; 2) investigate how to learn input and output phrases simultaneously.
141
+
142
+ Table 6: Examples of English-Vietnamese translation outputs with their segmentations. The meanings of the superscript indexes and the $\because$ symbol are the same as those in Table 2.
143
+
144
+ <table><tr><td>source greedy decoding target ground truth</td><td>1And²1³figured4,5thishas7to8stop9. 1Va · ²toi · 3nhan ra rang · 4, . 5dieu nay · phaio 8dung lai 9. Va toi nhan ra rang diéu do phai cham dut .</td></tr><tr><td>source greedy decoding</td><td>1So ²great progress 4and treatment has 7been 8madeover 10the 1years 12 1Vi vay,.²tien boo 4va . 5dieu tri da.7duoc .8tao ra trong ·10nhung ·</td></tr><tr><td>target ground truth</td><td>11nam.12. Trong suot nhung nam qua da có su tién bo to lon trong qua trinh diéu tri .</td></tr><tr><td>source</td><td>The²passion that4theperson has7forherowngrowth 1is 1²the 13most14 important15 thing1 16</td></tr><tr><td>greedy decoding</td><td>1Niem dam me · 3rang · 5nguoi . 6c6· 7 cho · 8su phat trien . 10cua co ay . 111a · 13dieu14quan trong 15nhat 16.</td></tr><tr><td>target ground truth source</td><td>Cai khat vong cua nguoi phu nu c6 cho su phat trien cua ban than la thu quan trong nhat . 1We 2haveeightspeciesofUNK that occur in 10Kenya 1112of13which4six</td></tr><tr><td>greedy decoding</td><td>15are16highly17threatened 18with 19 extinction 20. 1Chung ta .2c6.38 41oai *6 UNK 8xay ra .9%. 10Kenya.11,. 146.</td></tr><tr><td>target ground truth</td><td>17bi de doa . 19tuyet chung 20.</td></tr><tr><td></td><td>Chung ta c6 8 loai kén kén xuat hien tai Kenya ,trong dó có 6 loai bi de doa voi nguy cd tuyet chung cao.</td></tr></table>
145
+
146
+ # 5 ACKNOWLEDGMENTS
147
+
148
+ We thank Jacob Devlin, Adith Swaminathan, Frank Seide, Xiaodong He, and anonymous reviewers for their valuable feedback.
149
+
150
+ # REFERENCES
151
+
152
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In International Conference on Learning Representations, 2015.
153
+
154
+ Dzmitry Bahdanau, Philemon Brakel, Kelvin Xu, Anirudh Goyal, Ryan Lowe, Joelle Pineau, Aaron C. Courville, and Yoshua Bengio. An actor-critic algorithm for sequence prediction. In International Conference on Learning Representations, 2017.
155
+
156
+ Peter F Brown, Vincent J Della Pietra, Stephen A Della Pietra, and Robert L Mercer. The mathematics of statistical machine translation: Parameter estimation. Computational linguistics, 19(2): 263–311, 1993.
157
+
158
+ Mauro Cettolo, Jan Niehues, Sebastian Stuker, Luisa Bentivogli, and Marcello Federico. Report on ¨ the 11th IWSLT evaluation campaign, IWSLT 2014. In Proceedings of IWSLT, 2014.
159
+
160
+ Mauro Cettolo, Jan Niehues, Sebastian Stuker, Luisa Bentivogli, Roldano Cattoni, and Marcello ¨ Federico. The IWSLT 2015 evaluation campaign. In International Conference on Spoken Language, 2015.
161
+
162
+ Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014.
163
+
164
+ Leonard Dahlmann, Evgeny Matusov, Pavel Petrushkov, and Shahram Khadivi. Neural machine translation leveraging phrase-based models in a hybrid search. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 1422–1431, 2017.
165
+
166
+ Yann N Dauphin, Angela Fan, Michael Auli, and David Grangier. Language modeling with gated convolutional networks. In International Conference on Machine Learning (ICML), 2017.
167
+
168
+ Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N Dauphin. Convolutional sequence to sequence learning. In ICML, 2017.
169
+
170
+ Jiatao Gu, James Bradbury, Caiming Xiong, Victor O.K. Li, and Richard Socher. Nonautoregressive neural machine translation. In International Conference on Learning Representations, 2018.
171
+
172
+ Awni Hannun, Carl Case, Jared Casper, Bryan Catanzaro, Greg Diamos, Erich Elsen, Ryan Prenger, Sanjeev Satheesh, Shubho Sengupta, Adam Coates, et al. Deep speech: Scaling up end-to-end speech recognition. arXiv preprint arXiv:1412.5567, 2014.
173
+
174
+ Kenneth Heafield, Ivan Pouzyrevsky, Jonathan H. Clark, and Philipp Koehn. Scalable modified Kneser-Ney language model estimation. In Proceedings of the 51th Annual Meeting of the Association for Computational Linguistics: Short Papers-Volume 2, pp. 690–696, 2013.
175
+
176
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 9(8): 1735–1780, 1997.
177
+
178
+ Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
179
+
180
+ Philipp Koehn. Statistical Machine Translation. Cambridge University Press, 2009.
181
+
182
+ Philipp Koehn, Franz Josef Och, and Daniel Marcu. Statistical phrase-based translation. In Proceedings of the 2003 Conference of the North American Chapter of the Association for Computational Linguistics on Human Language Technology-Volume 1, pp. 48–54, 2003.
183
+
184
+ Adam Lopez. Statistical machine translation. ACM Computing Surveys (CSUR), 40(3):8, 2008.
185
+
186
+ Minh-Thang Luong and Christopher D Manning. Stanford neural machine translation systems for spoken language domains. In Proceedings of the International Workshop on Spoken Language Translation, 2015.
187
+
188
+ Minh-Thang Luong, Hieu Pham, and Christopher D Manning. Effective approaches to attentionbased neural machine translation. arXiv preprint arXiv:1508.04025, 2015.
189
+
190
+ Andrew L. Maas, Awni Y. Hannun, Daniel Jurafsky, and Andrew Y. Ng. First-pass large vocabulary continuous speech recognition using bi-directional recurrent DNNs. CoRR, abs/1408.2873, 2014.
191
+
192
+ Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. BLEU: a method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting on Association for Computational Linguistics, pp. 311–318, 2002.
193
+
194
+ Colin Raffel, Thang Luong, Peter J Liu, Ron J Weiss, and Douglas Eck. Online and linear-time attention by enforcing monotonic alignments. In International Conference on Machine Learning (ICML), 2017.
195
+
196
+ Marc’Aurelio Ranzato, Sumit Chopra, Michael Auli, and Wojciech Zaremba. Sequence level training with recurrent neural networks. CoRR, abs/1511.06732, 2015.
197
+
198
+ Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Advances in Neural Information Processing Systems, pp. 3104–3112, 2014.
199
+
200
+ Yaohua Tang, Fandong Meng, Zhengdong Lu, Hang Li, and Philip LH Yu. Neural machine translation with external phrase memory. arXiv preprint arXiv:1606.01792, 2016.
201
+
202
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017.
203
+
204
+ Chong Wang, Yining Wang, Po-Sen Huang, Abdelrahman Mohamed, Dengyong Zhou, and Li Deng. Sequence modeling via segmentations. In International Conference on Machine Learning (ICML), 2017a.
205
+
206
+ Xing Wang, Zhaopeng Tu, Deyi Xiong, and Min Zhang. Translating phrases in neural machine translation. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 1432–1442. Association for Computational Linguistics, 2017b.
207
+
208
+ Sam Wiseman and Alexander M. Rush. Sequence-to-sequence learning as beam-search optimization. CoRR, abs/1606.02960, 2016.
209
+
210
+ Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016.
211
+
212
+ Lei Yu, Jan Buys, and Phil Blunsom. Online segment to segment neural transduction. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pp. 1307–1316, 2016.
213
+
214
+ Lei Yu, Phil Blunsom, Chris Dyer, Edward Grefenstette, and Tomas Kocisky. The neural noisy channel. In International Conference on Learning Representations, 2017.
215
+
216
+ Jie Zhou, Ying Cao, Xuguang Wang, Peng Li, and Wei Xu. Deep recurrent models with fast-forward connections for neural machine translation. Transactions of the Association for Computational Linguistics, 4:371–383, 2016.
217
+
218
+ # A REORDERING LAYER ANALYSIS
219
+
220
+ To further understand the behavior of the reordering layer, we examine the values of the gate $\sigma \left( w _ { i } ^ { T } [ e _ { t - \tau } ; \dots ; e _ { t } ; \dots ; e _ { t + \tau } ] \right)$ in Eq. (2). We study the NPMT English-German model in Section 3.2. In Figure 5, we show an example that translates from “can you translate it $? ^ { \ast }$ to ”konnen ¨ man es ubersetzen¨ $? ^ { \mathfrak { s } }$ , where the mapping between words are as follows: “can konnen”, “you ¨ $ \mathrm { { m a n } ^ { \prime } }$ , “translate ubersetzen”, “it ¨ $ \mathrm { e s } ^ { \prime \prime }$ and $? ? ^ { \prime }$ . Note that the example needs to be reordered from “translate it” to ”es ubersetzen”. Each row of Figure 5 represents a window of size ¨ 7 that is centered at a source sentence word. The values in the matrix represent the gate values for the corresponding words. The gate values will later be multiplied with the embedding $e _ { t - \tau + i }$ of Eq. (2) and contribute to the hidden vector $h _ { t }$ . The y-axis represents the word/phrases emitted from the corresponding position. We can observe that the gates mostly focus on the central word since the first part of the sentence only requires monotonic alignment. Interestingly, the model outputs $\mathbf { \vec { \nabla } } \Phi ^ { , , }$ (empty) when the model has the word “translate” in the center of the window. Then, the model outputs “es” when the model encounters “it”. Finally, in the last window (top row), the model not only has a large gate value to the center input “?”, but the model also has a relatively large gate value to the word “translate” in order to output the translation “ubersetzen ?”. This shows an example of ¨ the reordering effect achieved by using the gating mechanism of the reordering layer.
221
+
222
+ ![](images/d43d305f0cda3e43cf948343725b33b92973759d62f03da633e78c5789801646.jpg)
223
+ Figure 5: Visualizing reordering gates in the NPMT English-German translation model.
224
+
225
+ # B EFFECT OF WINDOW SIZES IN THE REORDERING LAYER
226
+
227
+ In this section, we examine the effect of window sizes in the reordering layer. Following the setup in Section 3.2, we evaluate the performance of different window sizes on the IWSLT 2014 EnglishGerman translation task. Table 7 summarizes the results. We can observe that the performance reaches the peak with a windows size of 7. With a window size of 5, the performance drops 0.88 BLEU in greedy decoding and 0.72 BLEU using beam search. It suggests that the context window is not large enough to properly perform reordering. When the window sizes are 9 and 11, we do not observe further improvements. It might be because the translation between English and German mostly requires local word reordering.
228
+
229
+ # C PHRASE MAPPING EXAMPLES
230
+
231
+ Following the examples of Table 2, we analyze the decoding results on the test set of the GermanEnglish translation task. Given we do not have explicit input segments in NPMT, we assume input words that emit $\mathbf { \hat { \Delta } } \Psi ^ { \prime }$ symbol are within the same group as the next non- $\because \$ 3$ word. For example, in Figure 4, input words “das beste” are considered as an input segment. We then can aggregate all the input, output segments (phrases) and sort them based on the frequency. Tables $\textrm { C }$ and C show the most-frequent input, output phrase mappings.
232
+
233
+ Table 7: Analyze the effect of reordering layer window sizes in translation results on the IWSLT 2014 EnglishGerman test set.
234
+
235
+ <table><tr><td colspan="3">BLEU</td></tr><tr><td>Window Size</td><td>Greedy</td><td>Beam Search</td></tr><tr><td>5</td><td>22.74</td><td>24.36</td></tr><tr><td>7</td><td>23.62</td><td>25.08</td></tr><tr><td>9</td><td>23.11</td><td>24.68</td></tr><tr><td>11</td><td>23.12</td><td>24.65</td></tr></table>
236
+
237
+ Table 8: German-English phrase mapping results. We show the top 10 input, output phrase mappings in five categories (“One” stands for single word and “Many” stands for multiple words.). In the last column, Many Many∗, we remove the phrases with the “UNK” word as the “UNK” appears often.
238
+
239
+ <table><tr><td rowspan=1 colspan=1>One→One</td><td rowspan=1 colspan=1>One→Many</td><td rowspan=1 colspan=1>Many→One</td><td rowspan=1 colspan=1>Many→Many</td><td rowspan=1 colspan=1>Many→Many*</td></tr><tr><td rowspan=1 colspan=1>,→,</td><td rowspan=1 colspan=1>es→it&#x27;s</td><td rowspan=1 colspan=1>,dass→that</td><td rowspan=1 colspan=1>die UNK -→ the UNK</td><td rowspan=1 colspan=1>wissen sie →you know</td></tr><tr><td rowspan=1 colspan=1>.→</td><td rowspan=1 colspan=1>UNK → the UNK</td><td rowspan=1 colspan=1>in der→in</td><td rowspan=1 colspan=1>der UNK →the UNK</td><td rowspan=1 colspan=1>in diesem→in this</td></tr><tr><td rowspan=1 colspan=1>und→and</td><td rowspan=1 colspan=1>und→,and</td><td rowspan=1 colspan=1>UNK.→.</td><td rowspan=1 colspan=1>ein UNK→a UNK</td><td rowspan=1 colspan=1>die welt -→the world</td></tr><tr><td rowspan=1 colspan=1>UNK →UNK</td><td rowspan=1 colspan=1>das→this is</td><td rowspan=1 colspan=1>UNK,→,</td><td rowspan=1 colspan=1>das UNK →the UNK</td><td rowspan=1 colspan=1>ist es→it&#x27;s</td></tr><tr><td rowspan=1 colspan=1>aber→but</td><td rowspan=1 colspan=1>das,→that&#x27;s</td><td rowspan=1 colspan=1>,die→that</td><td rowspan=1 colspan=1>eine UNK →a UNK</td><td rowspan=1 colspan=1>”.→.”</td></tr><tr><td rowspan=1 colspan=1>”→”</td><td rowspan=1 colspan=1>UNK →a UNK</td><td rowspan=1 colspan=1>ist.→.</td><td rowspan=1 colspan=1>in UNK→in UNK</td><td rowspan=1 colspan=1>ein paar→a few</td></tr><tr><td rowspan=1 colspan=1>ist→is</td><td rowspan=1 colspan=1>ich →ithink</td><td rowspan=1 colspan=1>in den→in</td><td rowspan=1 colspan=1>den UNK → the UNK</td><td rowspan=1 colspan=1>gibt es→there&#x27;s</td></tr><tr><td rowspan=1 colspan=1>der→of</td><td rowspan=1 colspan=1>es→it was</td><td rowspan=1 colspan=1>ist,→,</td><td rowspan=1 colspan=1>wissen sie→you know</td><td rowspan=1 colspan=1>der welt →→ the world</td></tr><tr><td rowspan=1 colspan=1>von→of</td><td rowspan=1 colspan=1>dies→this is</td><td rowspan=1 colspan=1>sind.→.</td><td rowspan=1 colspan=1>in diesem→in this</td><td rowspan=1 colspan=1>die frage → the question</td></tr><tr><td rowspan=1 colspan=1>mit→with</td><td rowspan=1 colspan=1>es→there &#x27;s</td><td rowspan=1 colspan=1>,wenn→if</td><td rowspan=1 colspan=1>dem UNK →the UNK</td><td rowspan=1 colspan=1>haben wir→we have</td></tr></table>
240
+
241
+ <table><tr><td rowspan=1 colspan=1>Phraseswith3words</td><td rowspan=1 colspan=1>Phraseswith4words</td></tr><tr><td rowspan=1 colspan=1>auf der ganzen→all over the</td><td rowspan=1 colspan=1>auf der ganzen→a little bit of</td></tr><tr><td rowspan=1 colspan=1>gibt eine menge→a lot of</td><td rowspan=1 colspan=1>weiβ nicht,was-→what &#x27;s going to be</td></tr><tr><td rowspan=1 colspan=1>dann hat er-→he doesn &#x27;thave</td><td rowspan=1 colspan=1>tun,das wir→we can &#x27;t do</td></tr><tr><td rowspan=1 colspan=1>,die man→you can do</td><td rowspan=1 colspan=1>tat,das ich→ididn&#x27;t do</td></tr><tr><td rowspan=1 colspan=1>das konnen wir→we can do that</td><td rowspan=1 colspan=1>zu verbessern,die →that can be done</td></tr></table>
242
+
243
+ Table 9: German-English longer phrase mapping results. We show the top 5 input, output phrase mappings for two categories: input and output phrases with three words, and input and output phrases with four words.
parse/train/HktJec1RZ/HktJec1RZ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJZsR7kCZ/SJZsR7kCZ.md ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ITERATIVE DEEP COMPRESSION : COMPRESSING DEEP NETWORKS FOR CLASSIFICATION AND SEMANTIC SEGMENTATION
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Machine learning and in particular deep learning approaches have outperformed many traditional techniques in accomplishing complex tasks such as image classfication (Krizhevsky et al., 2012), natural language processing or speech recognition (Hinton et al., 2012). Most of the state-of-the art deep networks have complex architecture and use a vast number of parameters to reach this superior performance. Though these networks use a large number of learnable parameters, those parameters present significant redundancy (de Freitas, 2013). Therefore, it is possible to compress the network without much affecting its accuracy by eliminating those redundant and unimportant parameters. In this work, we propose a three stage compression pipeline, which consists of pruning, weight sharing and quantization to compress deep neural networks. Our novel pruning technique combines magnitude based ones with dense sparse dense Han et al. (2016) ideas and iteratively finds for each layer its achievable sparsity instead of selecting a single threshold for the whole network. Unlike previous works, where compression is only applied on networks performing classification, we evaluate and perform compression on networks for classification as well as semantic segmentation, which is greatly useful for understanding scenes in autonomous driving. We tested our method on LeNet-5 and FCNs, performing classification and semantic segmentation, respectively. With LeNet-5 on MNIST, pruning reduces the number of parameters by 15.3 times and storage requirement from $1 . 7 \mathrm { M B }$ to $0 . 0 0 6 \mathrm { M B }$ with accuracy loss of $0 . 0 3 \%$ . With FCN8 on Cityscapes, we decrease the number of parameters by 8 times and reduce the storage requirement from 537.47 MB to 18.23 MB with class-wise intersection-over-union (IoU) loss of $4 . 9 3 \%$ on the validation data.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Deep learning found its importance in different domains to solve tasks ranging from small-scale to large-scale problems. It has remarkably achieved human-level performance in image recognition tasks (He et al., 2016). Existing deep neural networks are very powerful but they require considerable storage and memory bandwidth. For example, AlexNet by Krizhevsky et al. (2012) has 61 million parameters, which is over 100 times more than LeCun et al. (1989) conventional model LeNet - 5 (LeCun et al., 1998). More parameters require more storage space and more computation. This makes it difficult to deploy deep neural networks on embedded devices and mobile platforms performing real time processing with limited memory and processing units. Still, not all weights in a network are important and there is in fact high redundancy in these parameters (Guo et al., 2016). Choosing the right and important parameters is essential to do the optimization between the network efficiency and resources used with minimal accuracy loss. While some success has been achieved in compressing deep neural networks performing classification, it has not been studied for networks performing semantic segmentation, where each pixel in the image is classified to a category making it possible to recognize multiple objects in an image. Semantic segmentation is extremely relevant for the self driving domain, where scenes have to be understood in real time, and is an important target for compression as deep learning methods have achieved significant success on it (Wu et al., 2016).
12
+
13
+ To achieve this goal, we present “iterative deep compression”: a three stage pipeline as illustrated in figure 1, similar to “deep compression” proposed by Han et al. (2015). As is the case for many pipelines in this field, first we prune the number of parameters in the network by removing redundant and unimportant connections. To the remaining connections, we apply weight sharing so that the same weight can be shared by multiple connections across the network. Thus, only the shared weights and the indices mapping each remaining weight to its shared weight need to be stored. Finally, we apply quantization to reduce the number of bits required to store these shared weights.
14
+
15
+ ![](images/cfdcf1b591e770c145377007c6cb58584c287e54baa3d9b03b63290ec32acfb8.jpg)
16
+ Figure 1: Three stage pipeline: pruning, weight sharing and quantization.
17
+
18
+ Our major contribution is the development of a pruning method that combines magnitude pruning with ideas from dense sparse dense (Han et al., 2016). That is done by iteratively finding for each layer its achievable sparsity instead of selecting a single threshold for the whole network and then applying dense sparse retraining while pruning. Moreover, we also investigate several options for weight sharing, such as sharing weights within layer and across the layers, examining the impact of each on network performance. We also explore different clustering techniques comparing their optimal number of clusters and resulting network performance.
19
+
20
+ In this work we compressed two state-of-the-art deep neural network architectures. The first performs classification on MNIST dataset (LeCun et al., 1998) while the second does semantic segmentation on Cityscapes (Cordts et al., 2016). While in some stages of our pipeline we may explore more than one technique, we always select the one performing best for our next stage.
21
+
22
+ # 2 RELATED WORK
23
+
24
+ In order to compress deep networks, a variety of methods have been proposed. Chen et al. (2015) accomplish network compression by HashNets, where they group the parameters of the network into hash buckets. These parameters are tuned with standard backpropagation during training, however, their binning is pre-determined by a hash function. They exploit the inherent redundancy in neural networks to achieve drastic reductions in model sizes. Gong et al. (2014) proposed another way to compress deep networks by vector quantization and found that the product quantization gives a good balance between model size and accuracy. They achieve $1 6 - 2 4$ times compression on the state-ofthe art CNN by classification accuracy loss of $1 \%$ . But both the compression methods consider only fully connected layers in the network. Lin et al. (2013) attempted to reduce the number of parameters by global average pooling the feature maps from the last convolutional layer of the network. Hubara et al. (2016) recently proposed binarized neural networks, where they use binary weights and activations during training. This bit wise operations substantially improve power-efficiency, but on the cost of accuracy loss.
25
+
26
+ Our work is based on the idea of network pruning. It helps to reduce both network complexity and over fitting (Hubara et al., 2016). Hassibi & Stork (1993) perform network pruning by using the information from second derivatives of the loss function and propose that such pruning is more accurate than magnitude based pruning, where smaller magnitude weights are eliminated. Their method does not require retraining the network after pruning, however, it is computationally expensive for large networks. Han et al. (2015) proposed magnitude based pruning while simultaneously retraining the network. They significantly reduce the number of parameters in the network without much impacting the accuracy, however, there is always the risk of deleting the important parameters. Guo et al. (2016) incorporate connection splicing in order to avoid incorrect pruning. In their splicing operation they enable the recovery of pruned connections if they are found important at any time, but they do not account for correlation between weights (Yang et al., 2016b). Recently, Han et al. (2015) proposed a deep compression pipeline. First they prune the unimportant connections based on their magnitude, then perform quantization to enforce weight sharing and finally apply Huffman encoding for lossless data compression. Their experiment on AlexNet reduced the number of parameters by $9 \mathbf { x }$ without loss of accuracy. Because of their significant effectiveness, our work is partly inspired by their work. However, we contribute to this work by improving the weight sharing technique and introducing dynamic threshold calculation for pruning. We also contribute to the work by Han et al. (2016) on dense sparse dense training by calculating the achievable sparsity in each layer.
27
+
28
+ # 3 METHOD
29
+
30
+ In this section we present our compression pipeline also depicted in figure 1, with its Pruning, Weight Sharing and Quantization steps.
31
+
32
+ Pruning, From Dense to Sparse: The objective of the pruning technique is to identify and remove unimportant and redundant weights that would least affect the performance of the network. For this, we use the simple heuristic of quantifying the importance of weights using their absolute values (Han et al., 2015). In other words, the bigger the absolute weight value, the more important it is. But it is crucial to select one threshold weight value below which all the weights could be considered unimportant. We start with a pre-trained fully connected network. One approach is to choose a single threshold value for the entire network. However, this does not take into account the difference in the weight distribution across the layers. For example, as depicted in figure 2, the weight distribution of two different dense layers of the LeNet architecture differs. Therefore, we select the threshold value layerwise which means a different threshold value for each layer. To select the threshold values we introduced a hyper parameter to the network, the sparsity. This is the starting sparsity, initialized to $100 \%$ for each layer. It gives the percentage of weights of the network that are pruned, that is, set to 0 (Han et al., 2016). We determine the sparsity for each layer using algorithm 1 . We start from output to first convolutional layer. This process gives the approximate value of achievable sparsity in each layer without much impacting the accuracy of the network.
33
+
34
+ ![](images/a4d68715bc524918c292eeccc6639c8eb470b07101c7a758166c101f92a81ed9.jpg)
35
+ Figure 2: Weight distribution of two different dense layers of LeNet architecture.
36
+
37
+ Input: error tolerance, Starting SparsityL for each layer defaults to 100, pre-trained
38
+ network
39
+ Output: Achieved sparsity in each layer
40
+ 1 foreach trainable layer L from n to 1 do
41
+ 2 SparsityL $\gets$ Starting SparsityL ;
42
+ 3 Prune the weights in layer $L$ up to defined sparsity SparsityL ;
43
+ 4 $t \gets 0$ ;
44
+ 5 current error $_ t \gets$ computed error with the modified network ;
45
+ 6 while current errort $>$ error tolerance do
46
+ 7 Train the model ;
47
+ 8 Prune again up to same level, SparsityL ;
48
+ 9 $t \gets t + 1$ ;
49
+ 10 current error $_ { t } \gets$ current error of the network ;
50
+ 11 if current errort $<$ current error $_ { t - 1 }$ then
51
+ 12 Decrease the sparsity, SparsityL, by $1 \%$ ;
52
+ 13 end
53
+ 14 end
54
+ 15 Achieved SparsityL $\gets$ SparsityL ;
55
+ 16 end
56
+ 17 return Achieved Sparsity
57
+
58
+ In this algorithm 1, first, we initialize the sparsity for each layer and receive as input the pre-trained network and a parameter called ‘error tolerance’ for the network. Error tolerance is computed by adding a very small degradation tolerance to baseline error of the model, where baseline error is the error of the pre-trained network before pruning. Then, we initialize sparsity to $100 \%$ for a layer, that is, setting all its weights to zero and then we evaluate error of the network as depicted in step 3 and 5. In step 6, we compare this error with the defined error tolerance of the network. If the current error is more than the defined error tolerance, we train the network and again prune it at same sparsity level. We repeat this process until the error of the network converges at that sparsity level and it stops improving by further retraining. We decrease the sparsity in the layer by $1 \%$ after every such convergence, as shown in step 12.
59
+
60
+ Once we got the approximated sparsity level for each layer, we start pruning our network, depicted in algorithm 2. The achieved sparsity for each layer and the overall error tolerance of the network are received as parameters from the last step. We also receive the original pre-trained weights and an extra sparsity for each layer. This extra sparsity will be added to the starting sparsity found in the previous algorithm. Then we calculate the threshold value for each layer $\lambda _ { L }$ that is needed to make the layer SparsityL sparse, pruning the weights of each layer. However, mistakenly pruning important connections or over pruning could cause high accuracy loss (Guo et al., 2016). In order to compensate the unexpected loss, we retrain the network and enable the connection recovery, that is, a pruned value is not henceforth always zero as is done in Han et al. (2015), but can regain a positive absolute value after retraining. Finding important connections in a certain network is also extremely difficult, therefore, we conduct pruning and training iteratively and continually maintain the old weights from the previous iteration. After each iteration, a pruning threshold is selected from trained weights of the previous iteration. Hence, we are dynamically calculating the threshold for each layer. After pruning, we evaluate the pruned model and compare this current error with the defined error tolerance of the network. If the current error is greater than the error tolerance, we retrain the network and prune it again as can be seen in step 11 and 12. All the layers of the network are pruned and trained together because of the dependence of each layer to its previous layer. We keep track of the error from every iteration and we stop retraining if the network converges, that is, error is not improving any more at defined sparsity level. This error has been compared with the error tolerance of the network as depicted in step 15. We decrease the sparsity by $1 \%$ and again start the iterative process pruning and retraining if the current error is still less than the error tolerance. Otherwise, it returns pruned network as can be seen in step 19. This sums up pruning of the network where we iteratively undergo the dense sparse phase under the constraint of sparsity and error tolerance.
61
+
62
+ Input: error tolerance, Achieved Sparsity for each layer, Extra SparsityL for each layer,
63
+ pre-trained network
64
+ Output: Sparse network
65
+ 1 SparsityL Achieved SparsityL + Extra SparsityL ;
66
+ 2 Sparse phase(for each layer simultaneously):
67
+ 3 Get weights $W _ { L }$ for each layer separately ;
68
+ 4 Calculate threshold, $\lambda _ { L }$ needed to obtain SparsityL ;
69
+ 5 Prune $i _ { t h }$ weight, $W _ { L } ^ { i t h } 0$ if $W _ { L } ^ { i t h } < \lambda _ { L }$ ;
70
+ 6 Dense phase ;
71
+ 7 $t \gets 0$ ;
72
+ 8 current error $_ t $ Evaluate the network ;
73
+ 9 do
74
+ 10 do
75
+ 11 Retrain the network ;
76
+ 12 Again prune the network using, $\lambda _ { L }$ ;
77
+ 13 current error $_ t \gets$ Evaluate the network ;
78
+ 14 $t \gets t + 1$ ;
79
+ 15 while current error $_ { t - 1 } >$ current errort;
80
+ 16 Decrease the SparsityL in each layer by $1 \%$ ;
81
+ 17 Recalculate $\lambda _ { L }$ ;
82
+ 18 while current error $>$ error tolerance;
83
+ 19 return pruned network
84
+
85
+ ![](images/f63717ada3f419a7fd10e302113d46e6c37aa13fc7900117b7207cde121de993.jpg)
86
+ Figure 3: Initial cluster centers by random and linear centroid initializations
87
+
88
+ ![](images/03b01977e4a87c021891b8ff26506b224692eacf5fbf3e0f834169534cc9ff47.jpg)
89
+ Figure 4: Linear initialization of clusters centers before and after codebook pruning
90
+
91
+ Weight Sharing limits the number of effective weights to store by finding the weight values that could be shared across multiple connections without affecting the accuracy of the network. Weights can be shared, first, only within a layer, that is finding shared weights among the multiple connections within a layer and second, across all the layers, that is, finding shared weights among multiple connections across all the layers. This can be done using clustering. The idea is that all the weights that belong to one cluster share the same weight value, partitioning the n original weights into $\mathbf { k }$ clusters such that $n > > k$ . The performance of the network depends upon the quality of the clustering algorithm. The value of the cluster’s centroid is assigned to all the weight values within that cluster. So at the end we need to store only the centroid values to represent the weight values of the network instead of storing all the weight values individually. We examine two different clustering algorithms: mean shift clustering and $\mathbf { k }$ -means. K-means is very sensitive to the initial position of the cluster centers (Celebi et al., 2013), so we examine two different initialization methods: random and linear initialization (Han et al., 2015). The stepwise algorithm for $\mathbf { k }$ -means with linear initialization is illustrated in algorithm 3.
92
+
93
+ Refinement of the shared weights As depicted in figure 3, linear initialization results in cluster centers scattered over the entire range. However, cluster centers at the extreme ends of the distri
94
+
95
+ Output: cluster centers
96
+ Input: starting number of partitions, error tolerance, all weights of network, step size
97
+ 1 range $ \vert \mathrm { m a x }$ all weights of networ $k | + | \mathrm { m i n }$ all weights of network| ;
98
+ 2 number of partitions starting number of partitions ;
99
+ 3 while current error $>$ error tolerance do
100
+ 4 number of clusters $=$ number of partitions $+ 1$ ;
101
+ 5 cluster centers $=$ points dividing range equally to n partitions ;
102
+ 6 Perform $\mathbf { k }$ -means with these cluster centers initialization ;
103
+ 7 Replace all the weight values of the network with their nearest cluster center ;
104
+ 8 Calculate current error by evaluating the model ;
105
+ 9 number of partitions $\gets$ number of partitions $^ +$ step size ;
106
+ 10 end
107
+
108
+ bution represent few original weights. It could be the case, however, that those underrepresented weight values are really important to the network’s performance. Thus we will evaluate the effects of merging them with the other shared weights, by pruning the code book.
109
+
110
+ Pruning of the codebook To check the possibility of reducing down the number of shared weights, we first examine the number of weights mapped to each center in the codebook. We found that there are some codes that are being assigned to zero or very few weight values. So we prune such codes. For this pruning, we empirically chose a fixed threshold of 25. Therefore, any code which is assigned to less than 25 weight values would be pruned and removed from the codebook. All the weight values assigned to such codes/cluster centers would be reassigned to next closest cluster center. In our experiments we have observed that this does not impact much the accuracy of the network. The cluster centers before and after codebook pruning are shown in figure 4.
111
+
112
+ Fine tuning of the codebook To fine tune the cluster centers we use the gradient approach (Han et al., 2015). First, gradients for each weight value are calculated using Theano symbolic differentiation. Then, the gradients of the weight values that belong to one cluster are grouped together. All the calculated gradients are grouped according to the cluster they belong and summed to give one value per cluster. This value is then multiplied with the learning rate and subtracted from the cluster centers obtained from the previous step. These new values are called fine-tuned cluster centers. Now these fine-tuned values are used as shared weights for the network.
113
+
114
+ Quantization Quantization is performed to reduce the number of bits required to represent each shared weight value. We use fixed point quantization to convert floating point weight values to fixed point weight values. Fixed point implementation facilitates the potential deployment on embedded systems (Lin et al., 2016). Based on state-of-the-art by Han et al. (2015) we convert the 32-bit floating point weight values to 8-bit fixed point values for each fully convolutional layer and to 5-bit fixed point values for each fully connected layer. The conversion of floating point to fixed point is done using the following formulation, where $q _ { f o r m a t }$ is the user defined bit width (Lin et al., 2016):
115
+
116
+ $$
117
+ { \mathrm { F i x e d ~ p o i n t ~ v a l u e } } = { \mathrm { F l o a t i n g ~ p o i n t ~ v a l u e } } * 2 ^ { q _ { f o r m a t } }
118
+ $$
119
+
120
+ # 4 EXPERIMENTS AND RESULTS
121
+
122
+ We experimentally analyzed the three stage pipeline discussed above and applied it to some popular pre-trained networks. In section 4.1 and 4.2 we present our experiment results for LeNet-5 on MNIST and FCN8 on cityscapes respectively.
123
+
124
+ # 4.1 RESULTS FOR LENET-5 ON MNIST
125
+
126
+ We trained LeNet on the training set of MNIST to accomplish the classification task. The optimizer Adam was used to train the network. We trained the network for 15 epochs with learning rate of
127
+
128
+ $1 0 ^ { - 3 }$ . Our trained LeNet has achieved the accuracy of $9 9 . 3 0 \%$ on the validation set of MNIST. So, we have $9 9 . 3 0 \%$ as baseline accuracy and consequently $0 . 7 0 \%$ as baseline error rate of the network.
129
+
130
+ Pruning The first step was to select the threshold used to prune the network. Table 1 gives the comparison between our two threshold selection methods. In the first, we fixed one threshold value for all layers while in the second we dynamically calculate a different threshold for each layer. Dynamic threshold selection achieved substantially better results.
131
+
132
+ Table 1: Accuracy based comparison of the two different threshold selection methods
133
+
134
+ <table><tr><td rowspan=1 colspan=1>Threshold selection methods</td><td rowspan=1 colspan=1>Achievable Sparsity (% of Zero Weights)</td></tr><tr><td rowspan=1 colspan=1>One fixed threshold</td><td rowspan=1 colspan=1>86.30 %</td></tr><tr><td rowspan=1 colspan=1>Different dynamically selected thresholds</td><td rowspan=1 colspan=1>93.47 %</td></tr></table>
135
+
136
+ While initializing the sparsity levels for each layer, we increased the above mentioned percentage by 5 to $6 \%$ following our algorithm. Based on these defined sparsity levels, the initial threshold has been calculated for each layer. We prune each layer of the network with these threshold values. A plot of the weight distribution of second convolutional layer before and after first pruning is shown in figure 5.
137
+
138
+ ![](images/c0a39fd972269b8ee88973e493c3e5f85878268054e94b4ca5d1b72fd791274f.jpg)
139
+ Figure 5: Weight distribution of second convolutional layer of LeNet before pruning (in the left) and after pruning (in the right)
140
+
141
+ We iteratively perform pruning and retraining using the same optimizer and learning rate on all network weights until the current validation error of the network becomes less than the defined error tolerance. Our pruning runs for 42 iterations in total for the whole network. Figure 6 depicts the convergence of error rate and accuracy rate after each iteration at initialized sparsity level. As it can be seen, after a few iterations the accuracy of the network is not improving anymore so we decreased the sparsity level by $1 \%$ in each layer and again start iteratively pruning and retraining at new decreased sparsity levels. In table 2 we compare layer by layer pruning results between our method and Han et al. (2015).
142
+
143
+ Weight Sharing Next, we applied weight sharing techniques on these remaining weights of the network. We perform clustering on all the non-zero weights. Weight sharing further reduced the number of weights to be stored, as depicted in table 3, where the comparison of each weight sharing technique we explored is shown in terms of number of clusters and accuracy achieved.
144
+
145
+ So k-means clustering with linear initialization across all the layers gives the best results. We fine tune these cluster centers by gradient approach discussed in section 3. The accuracy of the network remained unchanged after fine tuning.
146
+
147
+ Quantization Next, we applied quantization to reduce the number of bits required to store the tuned cluster centers. We applied 8-bit fixed point quantization for convolutional layers and 5-bit fixed point quantization for fully connected layers. Table 4 gives the accuracy statistics and reduction in size after each stage of pipeline.
148
+
149
+ ![](images/0eed1081cf3fd363d4694ed996ded9472afacd3b926dd870d69cefa86445c792.jpg)
150
+
151
+ (a) Convergence of error rate after each iteration of pruning and training
152
+
153
+ ![](images/16a44a3ea95627c685ac05eb61fbb47bc09f59c840b9563a9bbf1ac3dfa06983.jpg)
154
+ (b) Convergence of accuracy rate after each iteration of pruning and training
155
+ Figure 6: Convergence of error rate (a) and accuracy rate (b) after each iteration of pruning and training
156
+
157
+ Table 2: Comparison of our pruning results on LeNet-5 with that of Han et al. (2015)
158
+
159
+ <table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>Layer</td><td rowspan=1 colspan=1>Percentageof remainingparameters[ours]</td><td rowspan=1 colspan=1>Number ofremaining parameters[ours]</td><td rowspan=1 colspan=1>Percentageof remainingparameters (Han et al.,2015)</td><td rowspan=1 colspan=1>Number ofremainingparameters (Han et al., 2015)</td></tr><tr><td rowspan=4 colspan=1>LeNet-5</td><td rowspan=1 colspan=1>F2</td><td rowspan=1 colspan=1>5%</td><td rowspan=1 colspan=1>250</td><td rowspan=1 colspan=1>19 %</td><td rowspan=1 colspan=1>950</td></tr><tr><td rowspan=1 colspan=1>F1</td><td rowspan=1 colspan=1>6%</td><td rowspan=1 colspan=1>24000</td><td rowspan=1 colspan=1>8%</td><td rowspan=1 colspan=1>32000</td></tr><tr><td rowspan=1 colspan=1>C2</td><td rowspan=1 colspan=1>15%</td><td rowspan=1 colspan=1>3750</td><td rowspan=1 colspan=1>12%</td><td rowspan=1 colspan=1>3000</td></tr><tr><td rowspan=1 colspan=1>C1</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=1>90</td><td rowspan=1 colspan=1>66 %</td><td rowspan=1 colspan=1>330</td></tr><tr><td rowspan=1 colspan=2>Total</td><td rowspan=1 colspan=1>~6.5%</td><td rowspan=1 colspan=1>28090</td><td rowspan=1 colspan=1>~8%</td><td rowspan=1 colspan=1>36280</td></tr><tr><td rowspan=1 colspan=2>Accuracy</td><td rowspan=1 colspan=2>99.27%</td><td rowspan=1 colspan=2>99.26 %</td></tr><tr><td rowspan=1 colspan=2>StorageRequirement</td><td rowspan=1 colspan=2>6 KB</td><td rowspan=1 colspan=2>44 KB</td></tr></table>
160
+
161
+ # 4.2 RESULTS FOR FCN ON CITYSCAPES
162
+
163
+ We conducted second experiment on FCN (Yang et al., 2016a) performing semantic segmentation task on the Cityscapes dataset. Our trained FCN8 has achieved the baseline IU of $6 4 . 7 5 \%$ and baseline error rate of $3 5 . 2 5 \%$ on the validation set of cityscapes.
164
+
165
+ Pruning In this experiment, dynamic threshold calculation is used to calculate the threshold as it is evident from table 1 that dynamic threshold selection achieved substantially better results. We iteratively perform the pruning and retraining operation with the same optimizer and learning rate until the current validation error of the network becomes less than the defined error tolerance. It runs for 32 iterations for the whole network. Figure 7 depicts the convergence of error rate and accuracy rate after each iteration at initialized sparsity level. Plot of the weight distribution of first convolutional layer before and after first pruning is shown in figure 8. Table 5 depicts the compression statistics after pruning and table 6 depicts the mean IU statistics and reduction in storage after pruning.
166
+
167
+ Table 3: Comparison of all the weight sharing techniques discussed above
168
+
169
+ <table><tr><td rowspan=1 colspan=1>Weight sharing technique</td><td rowspan=1 colspan=1>Number of clusters found</td><td rowspan=1 colspan=1>Accuracy achieved</td></tr><tr><td rowspan=1 colspan=1>Meanshift</td><td rowspan=1 colspan=1>12</td><td rowspan=1 colspan=1>99.05%</td></tr><tr><td rowspan=1 colspan=1>k-meanswithrandom initialization</td><td rowspan=1 colspan=1>8</td><td rowspan=1 colspan=1>98.94%</td></tr><tr><td rowspan=1 colspan=1>k-meanswithlinearinitialization within layers</td><td rowspan=1 colspan=1>24</td><td rowspan=1 colspan=1>99.14%</td></tr><tr><td rowspan=1 colspan=1>k-meanswith linearinitialization across allthe layers</td><td rowspan=1 colspan=1>15</td><td rowspan=1 colspan=1>99.27%</td></tr></table>
170
+
171
+ Table 4: Accuracy statistics and reduction in size after each stage of pipeline
172
+
173
+ <table><tr><td rowspan=1 colspan=1>Stages of pipleline</td><td rowspan=1 colspan=1>Storage requirement ofparameters (in MB)</td><td rowspan=1 colspan=1>Reduction in storagerequirement (in %)</td><td rowspan=1 colspan=1>Accuracy</td></tr><tr><td rowspan=1 colspan=1>Baseline</td><td rowspan=1 colspan=1>1.7 MB</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>99.30%</td></tr><tr><td rowspan=1 colspan=1>Pruning</td><td rowspan=1 colspan=1>0.11 MB</td><td rowspan=1 colspan=1>93.52%</td><td rowspan=1 colspan=1>99.26%</td></tr><tr><td rowspan=1 colspan=1>Pruning + Weight sharing</td><td rowspan=1 colspan=1>0.008 MB</td><td rowspan=1 colspan=1>99.50%</td><td rowspan=1 colspan=1>99.28%</td></tr><tr><td rowspan=1 colspan=1>Pruning + Weight sharing +Pruned code book</td><td rowspan=1 colspan=1>0.007 MB</td><td rowspan=1 colspan=1>99.58%</td><td rowspan=1 colspan=1>99.27%</td></tr><tr><td rowspan=1 colspan=1>Pruning +Weight sharing +Pruned codebook + Quantization</td><td rowspan=1 colspan=1>0.006 MB</td><td rowspan=1 colspan=1>99.59%</td><td rowspan=1 colspan=1>99.27%</td></tr></table>
174
+
175
+ ![](images/8bba021bfd978aa91f41f2cebd65d0cf6f8b0ee4099d026450b18e3ab30c5d9b.jpg)
176
+
177
+ (a) Convergence of accuracy rate after each iteration of pruning and training
178
+
179
+ ![](images/8d39bf0aa5dafcb4bb5c052913c73212e4fee171dd3e6c41d2f81a4d3656e9bd.jpg)
180
+ (b) Convergence of error rate after each iteration of pruning and training
181
+
182
+ ![](images/abb65b62e4451dded51df6e8d18d73571ae4381a734ba910b9e78b075d6ee9fb.jpg)
183
+ Figure 7: Convergence of accuracy rate (a) and error rate (b) after each iteration of pruning and training
184
+ Figure 8: Weight distribution of first convolutional layer of FCN before pruning (in the left) and after pruning (in the right)
185
+
186
+ Weight sharing To find the shared weights, we applied $\mathbf { k }$ -means clustering with linear initialization as it achieved substantially better results in the previous experiment. To find the optimum number of clusters, we evaluate the number of clusters ranging from 10 to 1200. Figure 9 depicts the achieved IOU score corresponding to number of clusters found in this range. It can been seen that as the number of clusters increases the IOU score is improving, however, the improvement is very slow. Due to time constraints, we did not continue with weight sharing and directly applied quantization to the non-zero weights after pruning.
187
+
188
+ Table 5: FCN compression results after pruning
189
+
190
+ <table><tr><td rowspan=1 colspan=1>Layersof thenetwork to bepruned</td><td rowspan=1 colspan=1>Totalparametersbefore pruning</td><td rowspan=1 colspan=1>Achievedsparsity in each layer</td><td rowspan=1 colspan=1>Totalnon-zeroparameters afterpruning</td><td rowspan=1 colspan=1>Remainingnon-zeroweights afterpruning in % (P)</td></tr><tr><td rowspan=1 colspan=1>C1</td><td rowspan=1 colspan=1>1792</td><td rowspan=1 colspan=1>49 %</td><td rowspan=1 colspan=1>913</td><td rowspan=1 colspan=1>51%</td></tr><tr><td rowspan=1 colspan=1>C2</td><td rowspan=1 colspan=1>36928</td><td rowspan=1 colspan=1>84 %</td><td rowspan=1 colspan=1>5908</td><td rowspan=1 colspan=1>16 %</td></tr><tr><td rowspan=1 colspan=1>C3</td><td rowspan=1 colspan=1>73856</td><td rowspan=1 colspan=1>69 %</td><td rowspan=1 colspan=1>22895</td><td rowspan=1 colspan=1>31%</td></tr><tr><td rowspan=1 colspan=1>C4</td><td rowspan=1 colspan=1>147584</td><td rowspan=1 colspan=1>69 %</td><td rowspan=1 colspan=1>45751</td><td rowspan=1 colspan=1>31%</td></tr><tr><td rowspan=1 colspan=1>C5</td><td rowspan=1 colspan=1>295168</td><td rowspan=1 colspan=1>69 %</td><td rowspan=1 colspan=1>91502</td><td rowspan=1 colspan=1>31 %</td></tr><tr><td rowspan=1 colspan=1>C6</td><td rowspan=1 colspan=1>590080</td><td rowspan=1 colspan=1>70 %</td><td rowspan=1 colspan=1>177024</td><td rowspan=1 colspan=1>30%</td></tr><tr><td rowspan=1 colspan=1>C7</td><td rowspan=1 colspan=1>590080</td><td rowspan=1 colspan=1>69 %</td><td rowspan=1 colspan=1>182924</td><td rowspan=1 colspan=1>31 %</td></tr><tr><td rowspan=1 colspan=1>C8</td><td rowspan=1 colspan=1>1180160</td><td rowspan=1 colspan=1>79 %</td><td rowspan=1 colspan=1>247833</td><td rowspan=1 colspan=1>21 %</td></tr><tr><td rowspan=1 colspan=1>C9</td><td rowspan=1 colspan=1>2359808</td><td rowspan=1 colspan=1>81%</td><td rowspan=1 colspan=1>448363</td><td rowspan=1 colspan=1>19 %</td></tr><tr><td rowspan=1 colspan=1>C10</td><td rowspan=1 colspan=1>2359808</td><td rowspan=1 colspan=1>84%</td><td rowspan=1 colspan=1>377569</td><td rowspan=1 colspan=1>16 %</td></tr><tr><td rowspan=1 colspan=1>C11</td><td rowspan=1 colspan=1>2359808</td><td rowspan=1 colspan=1>83 %</td><td rowspan=1 colspan=1>401167</td><td rowspan=1 colspan=1>17 %</td></tr><tr><td rowspan=1 colspan=1>C12</td><td rowspan=1 colspan=1>2359808</td><td rowspan=1 colspan=1>83 %</td><td rowspan=1 colspan=1>401167</td><td rowspan=1 colspan=1>17 %</td></tr><tr><td rowspan=1 colspan=1>C13</td><td rowspan=1 colspan=1>2359808</td><td rowspan=1 colspan=1>83 %</td><td rowspan=1 colspan=1>401167</td><td rowspan=1 colspan=1>17 %</td></tr><tr><td rowspan=1 colspan=1>C14</td><td rowspan=1 colspan=1>102764544</td><td rowspan=1 colspan=1>89%</td><td rowspan=1 colspan=1>11304099</td><td rowspan=1 colspan=1>11%</td></tr><tr><td rowspan=1 colspan=1>C15</td><td rowspan=1 colspan=1>16781312</td><td rowspan=1 colspan=1>89 %</td><td rowspan=1 colspan=1>1845944</td><td rowspan=1 colspan=1>11%</td></tr><tr><td rowspan=1 colspan=1>C16</td><td rowspan=1 colspan=1>77843</td><td rowspan=1 colspan=1>89 %</td><td rowspan=1 colspan=1>8562</td><td rowspan=1 colspan=1>11 %</td></tr><tr><td rowspan=1 colspan=1>C17</td><td rowspan=1 colspan=1>9747</td><td rowspan=1 colspan=1>89 %</td><td rowspan=1 colspan=1>1072</td><td rowspan=1 colspan=1>11 %</td></tr><tr><td rowspan=1 colspan=1>C18</td><td rowspan=1 colspan=1>3268</td><td rowspan=1 colspan=1>89 %</td><td rowspan=1 colspan=1>359</td><td rowspan=1 colspan=1>11 %</td></tr><tr><td rowspan=1 colspan=1>C19</td><td rowspan=1 colspan=1>4883</td><td rowspan=1 colspan=1>89 %</td><td rowspan=1 colspan=1>537</td><td rowspan=1 colspan=1>11 %</td></tr><tr><td rowspan=1 colspan=1>C20</td><td rowspan=1 colspan=1>3268</td><td rowspan=1 colspan=1>89 %</td><td rowspan=1 colspan=1>359</td><td rowspan=1 colspan=1>11 %</td></tr><tr><td rowspan=1 colspan=1>C21</td><td rowspan=1 colspan=1>3268</td><td rowspan=1 colspan=1>89%</td><td rowspan=1 colspan=1>359</td><td rowspan=1 colspan=1>11%</td></tr><tr><td rowspan=1 colspan=1>C22</td><td rowspan=1 colspan=1>3268</td><td rowspan=1 colspan=1>90%</td><td rowspan=1 colspan=1>326</td><td rowspan=1 colspan=1>10%</td></tr><tr><td rowspan=1 colspan=1>C23</td><td rowspan=1 colspan=1>3268</td><td rowspan=1 colspan=1>80%</td><td rowspan=1 colspan=1>653</td><td rowspan=1 colspan=1>20%</td></tr><tr><td rowspan=1 colspan=1>Total sparsity</td><td rowspan=1 colspan=1>134369357</td><td rowspan=1 colspan=1>86.44 %</td><td rowspan=1 colspan=1>18233102</td><td rowspan=1 colspan=1>13.56 %</td></tr></table>
191
+
192
+ ![](images/4a2e0087ae512faa4876d328fabb707dfbdfeb773de495896129041effb75585.jpg)
193
+ Figure 9: Number of clusters vs IOU score
194
+
195
+ Quantization We applied 8 bit quantization to pruned weights. The size of the network reduced from 537.47 MB to $1 8 . 2 3 \mathrm { M B }$ as depicted in table 6.
196
+
197
+ Table 6: Reduction in storage requirement after pruning and quantization
198
+
199
+ <table><tr><td rowspan=1 colspan=1>Stages of pipleline</td><td rowspan=1 colspan=1>Storage requirement ofparameters (in MB)</td><td rowspan=1 colspan=1>Reduction in storagerequirement (in %)</td><td rowspan=1 colspan=1>IOU</td></tr><tr><td rowspan=1 colspan=1>Baseline</td><td rowspan=1 colspan=1>537.47 MB</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>64.75 %</td></tr><tr><td rowspan=1 colspan=1>Pruning</td><td rowspan=1 colspan=1>72.93 MB</td><td rowspan=1 colspan=1>86.43%</td><td rowspan=1 colspan=1>61.25 %</td></tr><tr><td rowspan=1 colspan=1>Pruning+Quantization</td><td rowspan=1 colspan=1>18.23MB</td><td rowspan=1 colspan=1>96.60%</td><td rowspan=1 colspan=1>59.82 %</td></tr></table>
200
+
201
+ # 5 CONCLUSION AND FUTURE WORK
202
+
203
+ Deep learning approaches have demonstrated that they can outperform many traditional techniques, but because of their complex architecture in terms of more stacked layers and a large number of parameters, it is challenging to deploy these deep networks on mobile devices with limited hardware requiting real time predictions. This work contributes to the previous research on compression of deep networks performing classification. Moreover, we have also presented the compression of a network that performs semantic segmentation. We implemented a three stage deep compression pipeline of pruning, weight sharing, and quantization. Using different sparsity levels, we calculate different thresholds in each layer to perform pruning. Our “layerwise threshold” initialization method has shown promise in providing a good trade-off between sparsity and network performance. We also examined two different weight sharing possibilities: finding shared weights within a layer or across all the layers of the network. We extend the previous work by Han et al. (2015) with $\mathbf { k } .$ - means using linear initialization by merging underrepresented shared weights. Finally, we quantize these shared weights, based on state-of-the-art by Han et al. (2015), in which they used fixed point quantization. The experimental results show that our method compresses the number of parameters in LeNet - 5 and FCN by $1 5 . 3 \mathrm { x }$ and $8 \mathbf { { X } }$ , respectively. We reduce the storage requirement for LeNet from $1 . 7 \mathrm { M B }$ to $0 . 0 0 7 \mathrm { M B }$ and for FCN from ${ 5 4 7 } \mathrm { M B }$ to $1 8 . 2 3 \mathrm { M B }$ . The reduction in storage for the FCN has extended network compression to more sophisticated tasks such as object detection and segmentation.
204
+
205
+ In our work, iterative pruning is performed to get rid of unimportant connections. This process takes 35 hours for LeNet with 430180 parameters on MNIST and 42 days for FCN with approximately 134M parameters on Cityscape to reach an optimum level of sparsity and performance. While not prohibitive, this process could be sped up by different approaches such as masking by Guo et al. (2016), where they have a gradient based heuristic for determining which weights do not come back. It would also be interesting to carry out the experiment on bigger networks and datasets for classification. Also recently, smaller deep neural network architectures, such as SqueezeNet, by Han et al. achieved AlexNet-level accuracy on ImageNet with $5 0 \mathrm { x }$ fewer parameters and is thus feasible to be deployed on FPGAs and other hardware with limited memory (Iandola et al., 2016). Compressing already smaller deep neural networks could further reduce the number of parameters and make them even more efficient on embedded systems.
206
+
207
+ # REFERENCES
208
+
209
+ M Emre Celebi, Hassan A Kingravi, and Patricio A Vela. A comparative study of efficient initialization methods for the k-means clustering algorithm. Expert systems with applications, 40(1): 200–210, 2013.
210
+
211
+ Wenlin Chen, James Wilson, Stephen Tyree, Kilian Weinberger, and Yixin Chen. Compressing neural networks with the hashing trick. In International Conference on Machine Learning, pp. 2285–2294, 2015.
212
+
213
+ Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3213–3223, 2016.
214
+
215
+ Nando de Freitas. Predicting parameters in deep learning. 2013.
216
+
217
+ Yunchao Gong, Liu Liu, Ming Yang, and Lubomir Bourdev. Compressing deep convolutional networks using vector quantization. arXiv preprint arXiv:1412.6115, 2014.
218
+
219
+ Yiwen Guo, Anbang Yao, and Yurong Chen. Dynamic network surgery for efficient dnns. In Advances In Neural Information Processing Systems, pp. 1379–1387, 2016.
220
+
221
+ Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015.
222
+
223
+ Song Han, Jeff Pool, Sharan Narang, Huizi Mao, Shijian Tang, Erich Elsen, Bryan Catanzaro, John Tran, and William J Dally. Dsd: Regularizing deep neural networks with dense-sparse-dense training flow. arXiv preprint arXiv:1607.04381, 2016.
224
+
225
+ Babak Hassibi and David G Stork. Second order derivatives for network pruning: Optimal brain surgeon. In Advances in neural information processing systems, pp. 164–171, 1993.
226
+
227
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016.
228
+
229
+ Geoffrey Hinton, Li Deng, Dong Yu, George E Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara N Sainath, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 29(6):82–97, 2012.
230
+
231
+ Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Binarized neural networks. In Advances in neural information processing systems, pp. 4107–4115, 2016.
232
+
233
+ Forrest N Iandola, Song Han, Matthew W Moskewicz, Khalid Ashraf, William J Dally, and Kurt Keutzer. Squeezenet: Alexnet-level accuracy with $5 0 \mathrm { x }$ fewer parameters and¡ $0 . 5 \mathrm { m b }$ model size. arXiv preprint arXiv:1602.07360, 2016.
234
+
235
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012.
236
+
237
+ Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to ´ document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
238
+
239
+ Yann LeCun et al. Generalization and network design strategies. Connectionism in perspective, pp. 143–155, 1989.
240
+
241
+ Darryl Lin, Sachin Talathi, and Sreekanth Annapureddy. Fixed point quantization of deep convolutional networks. In International Conference on Machine Learning, pp. 2849–2858, 2016.
242
+
243
+ Min Lin, Qiang Chen, and Shuicheng Yan. Network in network. arXiv preprint arXiv:1312.4400, 2013.
244
+
245
+ Zifeng Wu, Chunhua Shen, and Anton van den Hengel. Wider or deeper: Revisiting the resnet model for visual recognition. arXiv preprint arXiv:1611.10080, 2016.
246
+
247
+ Jimei Yang, Brian Price, Scott Cohen, Honglak Lee, and Ming-Hsuan Yang. Object contour detection with a fully convolutional encoder-decoder network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 193–202, 2016a.
248
+
249
+ Tien-Ju Yang, Yu-Hsin Chen, and Vivienne Sze. Designing energy-efficient convolutional neural networks using energy-aware pruning. arXiv preprint arXiv:1611.05128, 2016b.
parse/train/SJZsR7kCZ/SJZsR7kCZ_content_list.json ADDED
@@ -0,0 +1,1065 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "ITERATIVE DEEP COMPRESSION : COMPRESSING DEEP NETWORKS FOR CLASSIFICATION AND SEMANTIC SEGMENTATION ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 821,
10
+ 171
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 195,
20
+ 398,
21
+ 223
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 261,
32
+ 544,
33
+ 275
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Machine learning and in particular deep learning approaches have outperformed many traditional techniques in accomplishing complex tasks such as image classfication (Krizhevsky et al., 2012), natural language processing or speech recognition (Hinton et al., 2012). Most of the state-of-the art deep networks have complex architecture and use a vast number of parameters to reach this superior performance. Though these networks use a large number of learnable parameters, those parameters present significant redundancy (de Freitas, 2013). Therefore, it is possible to compress the network without much affecting its accuracy by eliminating those redundant and unimportant parameters. In this work, we propose a three stage compression pipeline, which consists of pruning, weight sharing and quantization to compress deep neural networks. Our novel pruning technique combines magnitude based ones with dense sparse dense Han et al. (2016) ideas and iteratively finds for each layer its achievable sparsity instead of selecting a single threshold for the whole network. Unlike previous works, where compression is only applied on networks performing classification, we evaluate and perform compression on networks for classification as well as semantic segmentation, which is greatly useful for understanding scenes in autonomous driving. We tested our method on LeNet-5 and FCNs, performing classification and semantic segmentation, respectively. With LeNet-5 on MNIST, pruning reduces the number of parameters by 15.3 times and storage requirement from $1 . 7 \\mathrm { M B }$ to $0 . 0 0 6 \\mathrm { M B }$ with accuracy loss of $0 . 0 3 \\%$ . With FCN8 on Cityscapes, we decrease the number of parameters by 8 times and reduce the storage requirement from 537.47 MB to 18.23 MB with class-wise intersection-over-union (IoU) loss of $4 . 9 3 \\%$ on the validation data. ",
40
+ "bbox": [
41
+ 233,
42
+ 294,
43
+ 764,
44
+ 626
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 655,
55
+ 336,
56
+ 671
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Deep learning found its importance in different domains to solve tasks ranging from small-scale to large-scale problems. It has remarkably achieved human-level performance in image recognition tasks (He et al., 2016). Existing deep neural networks are very powerful but they require considerable storage and memory bandwidth. For example, AlexNet by Krizhevsky et al. (2012) has 61 million parameters, which is over 100 times more than LeCun et al. (1989) conventional model LeNet - 5 (LeCun et al., 1998). More parameters require more storage space and more computation. This makes it difficult to deploy deep neural networks on embedded devices and mobile platforms performing real time processing with limited memory and processing units. Still, not all weights in a network are important and there is in fact high redundancy in these parameters (Guo et al., 2016). Choosing the right and important parameters is essential to do the optimization between the network efficiency and resources used with minimal accuracy loss. While some success has been achieved in compressing deep neural networks performing classification, it has not been studied for networks performing semantic segmentation, where each pixel in the image is classified to a category making it possible to recognize multiple objects in an image. Semantic segmentation is extremely relevant for the self driving domain, where scenes have to be understood in real time, and is an important target for compression as deep learning methods have achieved significant success on it (Wu et al., 2016). ",
63
+ "bbox": [
64
+ 174,
65
+ 688,
66
+ 825,
67
+ 924
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "To achieve this goal, we present “iterative deep compression”: a three stage pipeline as illustrated in figure 1, similar to “deep compression” proposed by Han et al. (2015). As is the case for many pipelines in this field, first we prune the number of parameters in the network by removing redundant and unimportant connections. To the remaining connections, we apply weight sharing so that the same weight can be shared by multiple connections across the network. Thus, only the shared weights and the indices mapping each remaining weight to its shared weight need to be stored. Finally, we apply quantization to reduce the number of bits required to store these shared weights. ",
74
+ "bbox": [
75
+ 173,
76
+ 103,
77
+ 825,
78
+ 202
79
+ ],
80
+ "page_idx": 1
81
+ },
82
+ {
83
+ "type": "image",
84
+ "img_path": "images/cfdcf1b591e770c145377007c6cb58584c287e54baa3d9b03b63290ec32acfb8.jpg",
85
+ "image_caption": [
86
+ "Figure 1: Three stage pipeline: pruning, weight sharing and quantization. "
87
+ ],
88
+ "image_footnote": [],
89
+ "bbox": [
90
+ 173,
91
+ 214,
92
+ 872,
93
+ 486
94
+ ],
95
+ "page_idx": 1
96
+ },
97
+ {
98
+ "type": "text",
99
+ "text": "Our major contribution is the development of a pruning method that combines magnitude pruning with ideas from dense sparse dense (Han et al., 2016). That is done by iteratively finding for each layer its achievable sparsity instead of selecting a single threshold for the whole network and then applying dense sparse retraining while pruning. Moreover, we also investigate several options for weight sharing, such as sharing weights within layer and across the layers, examining the impact of each on network performance. We also explore different clustering techniques comparing their optimal number of clusters and resulting network performance. ",
100
+ "bbox": [
101
+ 173,
102
+ 531,
103
+ 825,
104
+ 630
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "In this work we compressed two state-of-the-art deep neural network architectures. The first performs classification on MNIST dataset (LeCun et al., 1998) while the second does semantic segmentation on Cityscapes (Cordts et al., 2016). While in some stages of our pipeline we may explore more than one technique, we always select the one performing best for our next stage. ",
111
+ "bbox": [
112
+ 174,
113
+ 637,
114
+ 825,
115
+ 693
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "2 RELATED WORK ",
122
+ "text_level": 1,
123
+ "bbox": [
124
+ 176,
125
+ 712,
126
+ 343,
127
+ 728
128
+ ],
129
+ "page_idx": 1
130
+ },
131
+ {
132
+ "type": "text",
133
+ "text": "In order to compress deep networks, a variety of methods have been proposed. Chen et al. (2015) accomplish network compression by HashNets, where they group the parameters of the network into hash buckets. These parameters are tuned with standard backpropagation during training, however, their binning is pre-determined by a hash function. They exploit the inherent redundancy in neural networks to achieve drastic reductions in model sizes. Gong et al. (2014) proposed another way to compress deep networks by vector quantization and found that the product quantization gives a good balance between model size and accuracy. They achieve $1 6 - 2 4$ times compression on the state-ofthe art CNN by classification accuracy loss of $1 \\%$ . But both the compression methods consider only fully connected layers in the network. Lin et al. (2013) attempted to reduce the number of parameters by global average pooling the feature maps from the last convolutional layer of the network. Hubara et al. (2016) recently proposed binarized neural networks, where they use binary weights and activations during training. This bit wise operations substantially improve power-efficiency, but on the cost of accuracy loss. ",
134
+ "bbox": [
135
+ 173,
136
+ 743,
137
+ 825,
138
+ 924
139
+ ],
140
+ "page_idx": 1
141
+ },
142
+ {
143
+ "type": "text",
144
+ "text": "Our work is based on the idea of network pruning. It helps to reduce both network complexity and over fitting (Hubara et al., 2016). Hassibi & Stork (1993) perform network pruning by using the information from second derivatives of the loss function and propose that such pruning is more accurate than magnitude based pruning, where smaller magnitude weights are eliminated. Their method does not require retraining the network after pruning, however, it is computationally expensive for large networks. Han et al. (2015) proposed magnitude based pruning while simultaneously retraining the network. They significantly reduce the number of parameters in the network without much impacting the accuracy, however, there is always the risk of deleting the important parameters. Guo et al. (2016) incorporate connection splicing in order to avoid incorrect pruning. In their splicing operation they enable the recovery of pruned connections if they are found important at any time, but they do not account for correlation between weights (Yang et al., 2016b). Recently, Han et al. (2015) proposed a deep compression pipeline. First they prune the unimportant connections based on their magnitude, then perform quantization to enforce weight sharing and finally apply Huffman encoding for lossless data compression. Their experiment on AlexNet reduced the number of parameters by $9 \\mathbf { x }$ without loss of accuracy. Because of their significant effectiveness, our work is partly inspired by their work. However, we contribute to this work by improving the weight sharing technique and introducing dynamic threshold calculation for pruning. We also contribute to the work by Han et al. (2016) on dense sparse dense training by calculating the achievable sparsity in each layer. ",
145
+ "bbox": [
146
+ 174,
147
+ 104,
148
+ 825,
149
+ 353
150
+ ],
151
+ "page_idx": 2
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "3 METHOD ",
156
+ "text_level": 1,
157
+ "bbox": [
158
+ 176,
159
+ 376,
160
+ 281,
161
+ 392
162
+ ],
163
+ "page_idx": 2
164
+ },
165
+ {
166
+ "type": "text",
167
+ "text": "In this section we present our compression pipeline also depicted in figure 1, with its Pruning, Weight Sharing and Quantization steps. ",
168
+ "bbox": [
169
+ 174,
170
+ 409,
171
+ 821,
172
+ 436
173
+ ],
174
+ "page_idx": 2
175
+ },
176
+ {
177
+ "type": "text",
178
+ "text": "Pruning, From Dense to Sparse: The objective of the pruning technique is to identify and remove unimportant and redundant weights that would least affect the performance of the network. For this, we use the simple heuristic of quantifying the importance of weights using their absolute values (Han et al., 2015). In other words, the bigger the absolute weight value, the more important it is. But it is crucial to select one threshold weight value below which all the weights could be considered unimportant. We start with a pre-trained fully connected network. One approach is to choose a single threshold value for the entire network. However, this does not take into account the difference in the weight distribution across the layers. For example, as depicted in figure 2, the weight distribution of two different dense layers of the LeNet architecture differs. Therefore, we select the threshold value layerwise which means a different threshold value for each layer. To select the threshold values we introduced a hyper parameter to the network, the sparsity. This is the starting sparsity, initialized to $100 \\%$ for each layer. It gives the percentage of weights of the network that are pruned, that is, set to 0 (Han et al., 2016). We determine the sparsity for each layer using algorithm 1 . We start from output to first convolutional layer. This process gives the approximate value of achievable sparsity in each layer without much impacting the accuracy of the network. ",
179
+ "bbox": [
180
+ 173,
181
+ 455,
182
+ 825,
183
+ 662
184
+ ],
185
+ "page_idx": 2
186
+ },
187
+ {
188
+ "type": "image",
189
+ "img_path": "images/a4d68715bc524918c292eeccc6639c8eb470b07101c7a758166c101f92a81ed9.jpg",
190
+ "image_caption": [
191
+ "Figure 2: Weight distribution of two different dense layers of LeNet architecture. "
192
+ ],
193
+ "image_footnote": [],
194
+ "bbox": [
195
+ 179,
196
+ 685,
197
+ 870,
198
+ 881
199
+ ],
200
+ "page_idx": 2
201
+ },
202
+ {
203
+ "type": "text",
204
+ "text": "Input: error tolerance, Starting SparsityL for each layer defaults to 100, pre-trained \nnetwork \nOutput: Achieved sparsity in each layer \n1 foreach trainable layer L from n to 1 do \n2 SparsityL $\\gets$ Starting SparsityL ; \n3 Prune the weights in layer $L$ up to defined sparsity SparsityL ; \n4 $t \\gets 0$ ; \n5 current error $_ t \\gets$ computed error with the modified network ; \n6 while current errort $>$ error tolerance do \n7 Train the model ; \n8 Prune again up to same level, SparsityL ; \n9 $t \\gets t + 1$ ; \n10 current error $_ { t } \\gets$ current error of the network ; \n11 if current errort $<$ current error $_ { t - 1 }$ then \n12 Decrease the sparsity, SparsityL, by $1 \\%$ ; \n13 end \n14 end \n15 Achieved SparsityL $\\gets$ SparsityL ; \n16 end \n17 return Achieved Sparsity ",
205
+ "bbox": [
206
+ 156,
207
+ 121,
208
+ 759,
209
+ 407
210
+ ],
211
+ "page_idx": 3
212
+ },
213
+ {
214
+ "type": "text",
215
+ "text": "In this algorithm 1, first, we initialize the sparsity for each layer and receive as input the pre-trained network and a parameter called ‘error tolerance’ for the network. Error tolerance is computed by adding a very small degradation tolerance to baseline error of the model, where baseline error is the error of the pre-trained network before pruning. Then, we initialize sparsity to $100 \\%$ for a layer, that is, setting all its weights to zero and then we evaluate error of the network as depicted in step 3 and 5. In step 6, we compare this error with the defined error tolerance of the network. If the current error is more than the defined error tolerance, we train the network and again prune it at same sparsity level. We repeat this process until the error of the network converges at that sparsity level and it stops improving by further retraining. We decrease the sparsity in the layer by $1 \\%$ after every such convergence, as shown in step 12. ",
216
+ "bbox": [
217
+ 173,
218
+ 444,
219
+ 825,
220
+ 584
221
+ ],
222
+ "page_idx": 3
223
+ },
224
+ {
225
+ "type": "text",
226
+ "text": "Once we got the approximated sparsity level for each layer, we start pruning our network, depicted in algorithm 2. The achieved sparsity for each layer and the overall error tolerance of the network are received as parameters from the last step. We also receive the original pre-trained weights and an extra sparsity for each layer. This extra sparsity will be added to the starting sparsity found in the previous algorithm. Then we calculate the threshold value for each layer $\\lambda _ { L }$ that is needed to make the layer SparsityL sparse, pruning the weights of each layer. However, mistakenly pruning important connections or over pruning could cause high accuracy loss (Guo et al., 2016). In order to compensate the unexpected loss, we retrain the network and enable the connection recovery, that is, a pruned value is not henceforth always zero as is done in Han et al. (2015), but can regain a positive absolute value after retraining. Finding important connections in a certain network is also extremely difficult, therefore, we conduct pruning and training iteratively and continually maintain the old weights from the previous iteration. After each iteration, a pruning threshold is selected from trained weights of the previous iteration. Hence, we are dynamically calculating the threshold for each layer. After pruning, we evaluate the pruned model and compare this current error with the defined error tolerance of the network. If the current error is greater than the error tolerance, we retrain the network and prune it again as can be seen in step 11 and 12. All the layers of the network are pruned and trained together because of the dependence of each layer to its previous layer. We keep track of the error from every iteration and we stop retraining if the network converges, that is, error is not improving any more at defined sparsity level. This error has been compared with the error tolerance of the network as depicted in step 15. We decrease the sparsity by $1 \\%$ and again start the iterative process pruning and retraining if the current error is still less than the error tolerance. Otherwise, it returns pruned network as can be seen in step 19. This sums up pruning of the network where we iteratively undergo the dense sparse phase under the constraint of sparsity and error tolerance. ",
227
+ "bbox": [
228
+ 174,
229
+ 590,
230
+ 825,
231
+ 922
232
+ ],
233
+ "page_idx": 3
234
+ },
235
+ {
236
+ "type": "text",
237
+ "text": "Input: error tolerance, Achieved Sparsity for each layer, Extra SparsityL for each layer, \npre-trained network \nOutput: Sparse network \n1 SparsityL Achieved SparsityL + Extra SparsityL ; \n2 Sparse phase(for each layer simultaneously): \n3 Get weights $W _ { L }$ for each layer separately ; \n4 Calculate threshold, $\\lambda _ { L }$ needed to obtain SparsityL ; \n5 Prune $i _ { t h }$ weight, $W _ { L } ^ { i t h } 0$ if $W _ { L } ^ { i t h } < \\lambda _ { L }$ ; \n6 Dense phase ; \n7 $t \\gets 0$ ; \n8 current error $_ t $ Evaluate the network ; \n9 do \n10 do \n11 Retrain the network ; \n12 Again prune the network using, $\\lambda _ { L }$ ; \n13 current error $_ t \\gets$ Evaluate the network ; \n14 $t \\gets t + 1$ ; \n15 while current error $_ { t - 1 } >$ current errort; \n16 Decrease the SparsityL in each layer by $1 \\%$ ; \n17 Recalculate $\\lambda _ { L }$ ; \n18 while current error $>$ error tolerance; \n19 return pruned network ",
238
+ "bbox": [
239
+ 155,
240
+ 117,
241
+ 812,
242
+ 434
243
+ ],
244
+ "page_idx": 4
245
+ },
246
+ {
247
+ "type": "image",
248
+ "img_path": "images/f63717ada3f419a7fd10e302113d46e6c37aa13fc7900117b7207cde121de993.jpg",
249
+ "image_caption": [
250
+ "Figure 3: Initial cluster centers by random and linear centroid initializations "
251
+ ],
252
+ "image_footnote": [],
253
+ "bbox": [
254
+ 189,
255
+ 457,
256
+ 482,
257
+ 614
258
+ ],
259
+ "page_idx": 4
260
+ },
261
+ {
262
+ "type": "image",
263
+ "img_path": "images/03b01977e4a87c021891b8ff26506b224692eacf5fbf3e0f834169534cc9ff47.jpg",
264
+ "image_caption": [
265
+ "Figure 4: Linear initialization of clusters centers before and after codebook pruning "
266
+ ],
267
+ "image_footnote": [],
268
+ "bbox": [
269
+ 516,
270
+ 463,
271
+ 808,
272
+ 609
273
+ ],
274
+ "page_idx": 4
275
+ },
276
+ {
277
+ "type": "text",
278
+ "text": "Weight Sharing limits the number of effective weights to store by finding the weight values that could be shared across multiple connections without affecting the accuracy of the network. Weights can be shared, first, only within a layer, that is finding shared weights among the multiple connections within a layer and second, across all the layers, that is, finding shared weights among multiple connections across all the layers. This can be done using clustering. The idea is that all the weights that belong to one cluster share the same weight value, partitioning the n original weights into $\\mathbf { k }$ clusters such that $n > > k$ . The performance of the network depends upon the quality of the clustering algorithm. The value of the cluster’s centroid is assigned to all the weight values within that cluster. So at the end we need to store only the centroid values to represent the weight values of the network instead of storing all the weight values individually. We examine two different clustering algorithms: mean shift clustering and $\\mathbf { k }$ -means. K-means is very sensitive to the initial position of the cluster centers (Celebi et al., 2013), so we examine two different initialization methods: random and linear initialization (Han et al., 2015). The stepwise algorithm for $\\mathbf { k }$ -means with linear initialization is illustrated in algorithm 3. ",
279
+ "bbox": [
280
+ 174,
281
+ 684,
282
+ 825,
283
+ 878
284
+ ],
285
+ "page_idx": 4
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "Refinement of the shared weights As depicted in figure 3, linear initialization results in cluster centers scattered over the entire range. However, cluster centers at the extreme ends of the distri",
290
+ "bbox": [
291
+ 174,
292
+ 895,
293
+ 821,
294
+ 922
295
+ ],
296
+ "page_idx": 4
297
+ },
298
+ {
299
+ "type": "text",
300
+ "text": "Output: cluster centers \nInput: starting number of partitions, error tolerance, all weights of network, step size \n1 range $ \\vert \\mathrm { m a x }$ all weights of networ $k | + | \\mathrm { m i n }$ all weights of network| ; \n2 number of partitions starting number of partitions ; \n3 while current error $>$ error tolerance do \n4 number of clusters $=$ number of partitions $+ 1$ ; \n5 cluster centers $=$ points dividing range equally to n partitions ; \n6 Perform $\\mathbf { k }$ -means with these cluster centers initialization ; \n7 Replace all the weight values of the network with their nearest cluster center ; \n8 Calculate current error by evaluating the model ; \n9 number of partitions $\\gets$ number of partitions $^ +$ step size ; \n10 end ",
301
+ "bbox": [
302
+ 158,
303
+ 125,
304
+ 758,
305
+ 286
306
+ ],
307
+ "page_idx": 5
308
+ },
309
+ {
310
+ "type": "text",
311
+ "text": "bution represent few original weights. It could be the case, however, that those underrepresented weight values are really important to the network’s performance. Thus we will evaluate the effects of merging them with the other shared weights, by pruning the code book. ",
312
+ "bbox": [
313
+ 174,
314
+ 338,
315
+ 823,
316
+ 381
317
+ ],
318
+ "page_idx": 5
319
+ },
320
+ {
321
+ "type": "text",
322
+ "text": "Pruning of the codebook To check the possibility of reducing down the number of shared weights, we first examine the number of weights mapped to each center in the codebook. We found that there are some codes that are being assigned to zero or very few weight values. So we prune such codes. For this pruning, we empirically chose a fixed threshold of 25. Therefore, any code which is assigned to less than 25 weight values would be pruned and removed from the codebook. All the weight values assigned to such codes/cluster centers would be reassigned to next closest cluster center. In our experiments we have observed that this does not impact much the accuracy of the network. The cluster centers before and after codebook pruning are shown in figure 4. ",
323
+ "bbox": [
324
+ 174,
325
+ 395,
326
+ 825,
327
+ 507
328
+ ],
329
+ "page_idx": 5
330
+ },
331
+ {
332
+ "type": "text",
333
+ "text": "Fine tuning of the codebook To fine tune the cluster centers we use the gradient approach (Han et al., 2015). First, gradients for each weight value are calculated using Theano symbolic differentiation. Then, the gradients of the weight values that belong to one cluster are grouped together. All the calculated gradients are grouped according to the cluster they belong and summed to give one value per cluster. This value is then multiplied with the learning rate and subtracted from the cluster centers obtained from the previous step. These new values are called fine-tuned cluster centers. Now these fine-tuned values are used as shared weights for the network. ",
334
+ "bbox": [
335
+ 174,
336
+ 522,
337
+ 825,
338
+ 619
339
+ ],
340
+ "page_idx": 5
341
+ },
342
+ {
343
+ "type": "text",
344
+ "text": "Quantization Quantization is performed to reduce the number of bits required to represent each shared weight value. We use fixed point quantization to convert floating point weight values to fixed point weight values. Fixed point implementation facilitates the potential deployment on embedded systems (Lin et al., 2016). Based on state-of-the-art by Han et al. (2015) we convert the 32-bit floating point weight values to 8-bit fixed point values for each fully convolutional layer and to 5-bit fixed point values for each fully connected layer. The conversion of floating point to fixed point is done using the following formulation, where $q _ { f o r m a t }$ is the user defined bit width (Lin et al., 2016): ",
345
+ "bbox": [
346
+ 174,
347
+ 635,
348
+ 825,
349
+ 733
350
+ ],
351
+ "page_idx": 5
352
+ },
353
+ {
354
+ "type": "equation",
355
+ "img_path": "images/fe46ee29355b468023d289e145349d22c276aacc13decff7dcd5fcbc9d55faf9.jpg",
356
+ "text": "$$\n{ \\mathrm { F i x e d ~ p o i n t ~ v a l u e } } = { \\mathrm { F l o a t i n g ~ p o i n t ~ v a l u e } } * 2 ^ { q _ { f o r m a t } }\n$$",
357
+ "text_format": "latex",
358
+ "bbox": [
359
+ 330,
360
+ 744,
361
+ 668,
362
+ 761
363
+ ],
364
+ "page_idx": 5
365
+ },
366
+ {
367
+ "type": "text",
368
+ "text": "4 EXPERIMENTS AND RESULTS ",
369
+ "text_level": 1,
370
+ "bbox": [
371
+ 176,
372
+ 780,
373
+ 447,
374
+ 795
375
+ ],
376
+ "page_idx": 5
377
+ },
378
+ {
379
+ "type": "text",
380
+ "text": "We experimentally analyzed the three stage pipeline discussed above and applied it to some popular pre-trained networks. In section 4.1 and 4.2 we present our experiment results for LeNet-5 on MNIST and FCN8 on cityscapes respectively. ",
381
+ "bbox": [
382
+ 174,
383
+ 810,
384
+ 823,
385
+ 853
386
+ ],
387
+ "page_idx": 5
388
+ },
389
+ {
390
+ "type": "text",
391
+ "text": "4.1 RESULTS FOR LENET-5 ON MNIST ",
392
+ "text_level": 1,
393
+ "bbox": [
394
+ 174,
395
+ 869,
396
+ 460,
397
+ 883
398
+ ],
399
+ "page_idx": 5
400
+ },
401
+ {
402
+ "type": "text",
403
+ "text": "We trained LeNet on the training set of MNIST to accomplish the classification task. The optimizer Adam was used to train the network. We trained the network for 15 epochs with learning rate of ",
404
+ "bbox": [
405
+ 174,
406
+ 895,
407
+ 823,
408
+ 922
409
+ ],
410
+ "page_idx": 5
411
+ },
412
+ {
413
+ "type": "text",
414
+ "text": "$1 0 ^ { - 3 }$ . Our trained LeNet has achieved the accuracy of $9 9 . 3 0 \\%$ on the validation set of MNIST. So, we have $9 9 . 3 0 \\%$ as baseline accuracy and consequently $0 . 7 0 \\%$ as baseline error rate of the network. ",
415
+ "bbox": [
416
+ 173,
417
+ 103,
418
+ 823,
419
+ 132
420
+ ],
421
+ "page_idx": 6
422
+ },
423
+ {
424
+ "type": "text",
425
+ "text": "Pruning The first step was to select the threshold used to prune the network. Table 1 gives the comparison between our two threshold selection methods. In the first, we fixed one threshold value for all layers while in the second we dynamically calculate a different threshold for each layer. Dynamic threshold selection achieved substantially better results. ",
426
+ "bbox": [
427
+ 174,
428
+ 148,
429
+ 825,
430
+ 205
431
+ ],
432
+ "page_idx": 6
433
+ },
434
+ {
435
+ "type": "table",
436
+ "img_path": "images/229a015be4b5e15eb174493db19abbce8393125e329d61db26246f792bc8861a.jpg",
437
+ "table_caption": [
438
+ "Table 1: Accuracy based comparison of the two different threshold selection methods "
439
+ ],
440
+ "table_footnote": [],
441
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Threshold selection methods</td><td rowspan=1 colspan=1>Achievable Sparsity (% of Zero Weights)</td></tr><tr><td rowspan=1 colspan=1>One fixed threshold</td><td rowspan=1 colspan=1>86.30 %</td></tr><tr><td rowspan=1 colspan=1>Different dynamically selected thresholds</td><td rowspan=1 colspan=1>93.47 %</td></tr></table>",
442
+ "bbox": [
443
+ 209,
444
+ 246,
445
+ 789,
446
+ 292
447
+ ],
448
+ "page_idx": 6
449
+ },
450
+ {
451
+ "type": "text",
452
+ "text": "While initializing the sparsity levels for each layer, we increased the above mentioned percentage by 5 to $6 \\%$ following our algorithm. Based on these defined sparsity levels, the initial threshold has been calculated for each layer. We prune each layer of the network with these threshold values. A plot of the weight distribution of second convolutional layer before and after first pruning is shown in figure 5. ",
453
+ "bbox": [
454
+ 174,
455
+ 309,
456
+ 825,
457
+ 378
458
+ ],
459
+ "page_idx": 6
460
+ },
461
+ {
462
+ "type": "image",
463
+ "img_path": "images/c0a39fd972269b8ee88973e493c3e5f85878268054e94b4ca5d1b72fd791274f.jpg",
464
+ "image_caption": [
465
+ "Figure 5: Weight distribution of second convolutional layer of LeNet before pruning (in the left) and after pruning (in the right) "
466
+ ],
467
+ "image_footnote": [],
468
+ "bbox": [
469
+ 199,
470
+ 395,
471
+ 795,
472
+ 551
473
+ ],
474
+ "page_idx": 6
475
+ },
476
+ {
477
+ "type": "text",
478
+ "text": "We iteratively perform pruning and retraining using the same optimizer and learning rate on all network weights until the current validation error of the network becomes less than the defined error tolerance. Our pruning runs for 42 iterations in total for the whole network. Figure 6 depicts the convergence of error rate and accuracy rate after each iteration at initialized sparsity level. As it can be seen, after a few iterations the accuracy of the network is not improving anymore so we decreased the sparsity level by $1 \\%$ in each layer and again start iteratively pruning and retraining at new decreased sparsity levels. In table 2 we compare layer by layer pruning results between our method and Han et al. (2015). ",
479
+ "bbox": [
480
+ 173,
481
+ 616,
482
+ 825,
483
+ 728
484
+ ],
485
+ "page_idx": 6
486
+ },
487
+ {
488
+ "type": "text",
489
+ "text": "Weight Sharing Next, we applied weight sharing techniques on these remaining weights of the network. We perform clustering on all the non-zero weights. Weight sharing further reduced the number of weights to be stored, as depicted in table 3, where the comparison of each weight sharing technique we explored is shown in terms of number of clusters and accuracy achieved. ",
490
+ "bbox": [
491
+ 174,
492
+ 744,
493
+ 825,
494
+ 801
495
+ ],
496
+ "page_idx": 6
497
+ },
498
+ {
499
+ "type": "text",
500
+ "text": "So k-means clustering with linear initialization across all the layers gives the best results. We fine tune these cluster centers by gradient approach discussed in section 3. The accuracy of the network remained unchanged after fine tuning. ",
501
+ "bbox": [
502
+ 174,
503
+ 808,
504
+ 823,
505
+ 851
506
+ ],
507
+ "page_idx": 6
508
+ },
509
+ {
510
+ "type": "text",
511
+ "text": "Quantization Next, we applied quantization to reduce the number of bits required to store the tuned cluster centers. We applied 8-bit fixed point quantization for convolutional layers and 5-bit fixed point quantization for fully connected layers. Table 4 gives the accuracy statistics and reduction in size after each stage of pipeline. ",
512
+ "bbox": [
513
+ 174,
514
+ 867,
515
+ 823,
516
+ 924
517
+ ],
518
+ "page_idx": 6
519
+ },
520
+ {
521
+ "type": "image",
522
+ "img_path": "images/0eed1081cf3fd363d4694ed996ded9472afacd3b926dd870d69cefa86445c792.jpg",
523
+ "image_caption": [],
524
+ "image_footnote": [],
525
+ "bbox": [
526
+ 179,
527
+ 108,
528
+ 485,
529
+ 272
530
+ ],
531
+ "page_idx": 7
532
+ },
533
+ {
534
+ "type": "text",
535
+ "text": "(a) Convergence of error rate after each iteration of pruning and training ",
536
+ "bbox": [
537
+ 173,
538
+ 279,
539
+ 488,
540
+ 304
541
+ ],
542
+ "page_idx": 7
543
+ },
544
+ {
545
+ "type": "image",
546
+ "img_path": "images/16a44a3ea95627c685ac05eb61fbb47bc09f59c840b9563a9bbf1ac3dfa06983.jpg",
547
+ "image_caption": [
548
+ "(b) Convergence of accuracy rate after each iteration of pruning and training ",
549
+ "Figure 6: Convergence of error rate (a) and accuracy rate (b) after each iteration of pruning and training "
550
+ ],
551
+ "image_footnote": [],
552
+ "bbox": [
553
+ 513,
554
+ 109,
555
+ 820,
556
+ 272
557
+ ],
558
+ "page_idx": 7
559
+ },
560
+ {
561
+ "type": "table",
562
+ "img_path": "images/8b624fcecb3801cd3dae1231e5a86299642c6fdb397f22bf808d68960582c6ab.jpg",
563
+ "table_caption": [
564
+ "Table 2: Comparison of our pruning results on LeNet-5 with that of Han et al. (2015) "
565
+ ],
566
+ "table_footnote": [],
567
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>Layer</td><td rowspan=1 colspan=1>Percentageof remainingparameters[ours]</td><td rowspan=1 colspan=1>Number ofremaining parameters[ours]</td><td rowspan=1 colspan=1>Percentageof remainingparameters (Han et al.,2015)</td><td rowspan=1 colspan=1>Number ofremainingparameters (Han et al., 2015)</td></tr><tr><td rowspan=4 colspan=1>LeNet-5</td><td rowspan=1 colspan=1>F2</td><td rowspan=1 colspan=1>5%</td><td rowspan=1 colspan=1>250</td><td rowspan=1 colspan=1>19 %</td><td rowspan=1 colspan=1>950</td></tr><tr><td rowspan=1 colspan=1>F1</td><td rowspan=1 colspan=1>6%</td><td rowspan=1 colspan=1>24000</td><td rowspan=1 colspan=1>8%</td><td rowspan=1 colspan=1>32000</td></tr><tr><td rowspan=1 colspan=1>C2</td><td rowspan=1 colspan=1>15%</td><td rowspan=1 colspan=1>3750</td><td rowspan=1 colspan=1>12%</td><td rowspan=1 colspan=1>3000</td></tr><tr><td rowspan=1 colspan=1>C1</td><td rowspan=1 colspan=1>50%</td><td rowspan=1 colspan=1>90</td><td rowspan=1 colspan=1>66 %</td><td rowspan=1 colspan=1>330</td></tr><tr><td rowspan=1 colspan=2>Total</td><td rowspan=1 colspan=1>~6.5%</td><td rowspan=1 colspan=1>28090</td><td rowspan=1 colspan=1>~8%</td><td rowspan=1 colspan=1>36280</td></tr><tr><td rowspan=1 colspan=2>Accuracy</td><td rowspan=1 colspan=2>99.27%</td><td rowspan=1 colspan=2>99.26 %</td></tr><tr><td rowspan=1 colspan=2>StorageRequirement</td><td rowspan=1 colspan=2>6 KB</td><td rowspan=1 colspan=2>44 KB</td></tr></table>",
568
+ "bbox": [
569
+ 173,
570
+ 390,
571
+ 919,
572
+ 563
573
+ ],
574
+ "page_idx": 7
575
+ },
576
+ {
577
+ "type": "text",
578
+ "text": "4.2 RESULTS FOR FCN ON CITYSCAPES ",
579
+ "text_level": 1,
580
+ "bbox": [
581
+ 176,
582
+ 588,
583
+ 462,
584
+ 603
585
+ ],
586
+ "page_idx": 7
587
+ },
588
+ {
589
+ "type": "text",
590
+ "text": "We conducted second experiment on FCN (Yang et al., 2016a) performing semantic segmentation task on the Cityscapes dataset. Our trained FCN8 has achieved the baseline IU of $6 4 . 7 5 \\%$ and baseline error rate of $3 5 . 2 5 \\%$ on the validation set of cityscapes. ",
591
+ "bbox": [
592
+ 176,
593
+ 614,
594
+ 826,
595
+ 657
596
+ ],
597
+ "page_idx": 7
598
+ },
599
+ {
600
+ "type": "text",
601
+ "text": "Pruning In this experiment, dynamic threshold calculation is used to calculate the threshold as it is evident from table 1 that dynamic threshold selection achieved substantially better results. We iteratively perform the pruning and retraining operation with the same optimizer and learning rate until the current validation error of the network becomes less than the defined error tolerance. It runs for 32 iterations for the whole network. Figure 7 depicts the convergence of error rate and accuracy rate after each iteration at initialized sparsity level. Plot of the weight distribution of first convolutional layer before and after first pruning is shown in figure 8. Table 5 depicts the compression statistics after pruning and table 6 depicts the mean IU statistics and reduction in storage after pruning. ",
602
+ "bbox": [
603
+ 174,
604
+ 672,
605
+ 825,
606
+ 729
607
+ ],
608
+ "page_idx": 7
609
+ },
610
+ {
611
+ "type": "table",
612
+ "img_path": "images/cf5edef1fa28074556e903c0b4e67adfabea009ae7f86ebeb1b7ce58b4d6b154.jpg",
613
+ "table_caption": [
614
+ "Table 3: Comparison of all the weight sharing techniques discussed above "
615
+ ],
616
+ "table_footnote": [],
617
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Weight sharing technique</td><td rowspan=1 colspan=1>Number of clusters found</td><td rowspan=1 colspan=1>Accuracy achieved</td></tr><tr><td rowspan=1 colspan=1>Meanshift</td><td rowspan=1 colspan=1>12</td><td rowspan=1 colspan=1>99.05%</td></tr><tr><td rowspan=1 colspan=1>k-meanswithrandom initialization</td><td rowspan=1 colspan=1>8</td><td rowspan=1 colspan=1>98.94%</td></tr><tr><td rowspan=1 colspan=1>k-meanswithlinearinitialization within layers</td><td rowspan=1 colspan=1>24</td><td rowspan=1 colspan=1>99.14%</td></tr><tr><td rowspan=1 colspan=1>k-meanswith linearinitialization across allthe layers</td><td rowspan=1 colspan=1>15</td><td rowspan=1 colspan=1>99.27%</td></tr></table>",
618
+ "bbox": [
619
+ 236,
620
+ 776,
621
+ 761,
622
+ 921
623
+ ],
624
+ "page_idx": 7
625
+ },
626
+ {
627
+ "type": "table",
628
+ "img_path": "images/afd74d505e2ce5fc9d9875e23b331b43de9475e492b3961c61702c523305af11.jpg",
629
+ "table_caption": [
630
+ "Table 4: Accuracy statistics and reduction in size after each stage of pipeline "
631
+ ],
632
+ "table_footnote": [],
633
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Stages of pipleline</td><td rowspan=1 colspan=1>Storage requirement ofparameters (in MB)</td><td rowspan=1 colspan=1>Reduction in storagerequirement (in %)</td><td rowspan=1 colspan=1>Accuracy</td></tr><tr><td rowspan=1 colspan=1>Baseline</td><td rowspan=1 colspan=1>1.7 MB</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>99.30%</td></tr><tr><td rowspan=1 colspan=1>Pruning</td><td rowspan=1 colspan=1>0.11 MB</td><td rowspan=1 colspan=1>93.52%</td><td rowspan=1 colspan=1>99.26%</td></tr><tr><td rowspan=1 colspan=1>Pruning + Weight sharing</td><td rowspan=1 colspan=1>0.008 MB</td><td rowspan=1 colspan=1>99.50%</td><td rowspan=1 colspan=1>99.28%</td></tr><tr><td rowspan=1 colspan=1>Pruning + Weight sharing +Pruned code book</td><td rowspan=1 colspan=1>0.007 MB</td><td rowspan=1 colspan=1>99.58%</td><td rowspan=1 colspan=1>99.27%</td></tr><tr><td rowspan=1 colspan=1>Pruning +Weight sharing +Pruned codebook + Quantization</td><td rowspan=1 colspan=1>0.006 MB</td><td rowspan=1 colspan=1>99.59%</td><td rowspan=1 colspan=1>99.27%</td></tr></table>",
634
+ "bbox": [
635
+ 176,
636
+ 127,
637
+ 820,
638
+ 258
639
+ ],
640
+ "page_idx": 8
641
+ },
642
+ {
643
+ "type": "text",
644
+ "text": "",
645
+ "bbox": [
646
+ 173,
647
+ 282,
648
+ 825,
649
+ 353
650
+ ],
651
+ "page_idx": 8
652
+ },
653
+ {
654
+ "type": "image",
655
+ "img_path": "images/8bba021bfd978aa91f41f2cebd65d0cf6f8b0ee4099d026450b18e3ab30c5d9b.jpg",
656
+ "image_caption": [],
657
+ "image_footnote": [],
658
+ "bbox": [
659
+ 176,
660
+ 369,
661
+ 486,
662
+ 537
663
+ ],
664
+ "page_idx": 8
665
+ },
666
+ {
667
+ "type": "text",
668
+ "text": "(a) Convergence of accuracy rate after each iteration of pruning and training ",
669
+ "bbox": [
670
+ 173,
671
+ 542,
672
+ 488,
673
+ 569
674
+ ],
675
+ "page_idx": 8
676
+ },
677
+ {
678
+ "type": "image",
679
+ "img_path": "images/8d39bf0aa5dafcb4bb5c052913c73212e4fee171dd3e6c41d2f81a4d3656e9bd.jpg",
680
+ "image_caption": [
681
+ "(b) Convergence of error rate after each iteration of pruning and training "
682
+ ],
683
+ "image_footnote": [],
684
+ "bbox": [
685
+ 511,
686
+ 375,
687
+ 821,
688
+ 537
689
+ ],
690
+ "page_idx": 8
691
+ },
692
+ {
693
+ "type": "image",
694
+ "img_path": "images/abb65b62e4451dded51df6e8d18d73571ae4381a734ba910b9e78b075d6ee9fb.jpg",
695
+ "image_caption": [
696
+ "Figure 7: Convergence of accuracy rate (a) and error rate (b) after each iteration of pruning and training ",
697
+ "Figure 8: Weight distribution of first convolutional layer of FCN before pruning (in the left) and after pruning (in the right) "
698
+ ],
699
+ "image_footnote": [],
700
+ "bbox": [
701
+ 196,
702
+ 643,
703
+ 799,
704
+ 804
705
+ ],
706
+ "page_idx": 8
707
+ },
708
+ {
709
+ "type": "text",
710
+ "text": "Weight sharing To find the shared weights, we applied $\\mathbf { k }$ -means clustering with linear initialization as it achieved substantially better results in the previous experiment. To find the optimum number of clusters, we evaluate the number of clusters ranging from 10 to 1200. Figure 9 depicts the achieved IOU score corresponding to number of clusters found in this range. It can been seen that as the number of clusters increases the IOU score is improving, however, the improvement is very slow. Due to time constraints, we did not continue with weight sharing and directly applied quantization to the non-zero weights after pruning. ",
711
+ "bbox": [
712
+ 174,
713
+ 867,
714
+ 825,
715
+ 924
716
+ ],
717
+ "page_idx": 8
718
+ },
719
+ {
720
+ "type": "table",
721
+ "img_path": "images/0284f51df6743a84709f1b12a1a454a839f44b061f5ea4b3fef3b365c7f3bd1e.jpg",
722
+ "table_caption": [
723
+ "Table 5: FCN compression results after pruning "
724
+ ],
725
+ "table_footnote": [],
726
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Layersof thenetwork to bepruned</td><td rowspan=1 colspan=1>Totalparametersbefore pruning</td><td rowspan=1 colspan=1>Achievedsparsity in each layer</td><td rowspan=1 colspan=1>Totalnon-zeroparameters afterpruning</td><td rowspan=1 colspan=1>Remainingnon-zeroweights afterpruning in % (P)</td></tr><tr><td rowspan=1 colspan=1>C1</td><td rowspan=1 colspan=1>1792</td><td rowspan=1 colspan=1>49 %</td><td rowspan=1 colspan=1>913</td><td rowspan=1 colspan=1>51%</td></tr><tr><td rowspan=1 colspan=1>C2</td><td rowspan=1 colspan=1>36928</td><td rowspan=1 colspan=1>84 %</td><td rowspan=1 colspan=1>5908</td><td rowspan=1 colspan=1>16 %</td></tr><tr><td rowspan=1 colspan=1>C3</td><td rowspan=1 colspan=1>73856</td><td rowspan=1 colspan=1>69 %</td><td rowspan=1 colspan=1>22895</td><td rowspan=1 colspan=1>31%</td></tr><tr><td rowspan=1 colspan=1>C4</td><td rowspan=1 colspan=1>147584</td><td rowspan=1 colspan=1>69 %</td><td rowspan=1 colspan=1>45751</td><td rowspan=1 colspan=1>31%</td></tr><tr><td rowspan=1 colspan=1>C5</td><td rowspan=1 colspan=1>295168</td><td rowspan=1 colspan=1>69 %</td><td rowspan=1 colspan=1>91502</td><td rowspan=1 colspan=1>31 %</td></tr><tr><td rowspan=1 colspan=1>C6</td><td rowspan=1 colspan=1>590080</td><td rowspan=1 colspan=1>70 %</td><td rowspan=1 colspan=1>177024</td><td rowspan=1 colspan=1>30%</td></tr><tr><td rowspan=1 colspan=1>C7</td><td rowspan=1 colspan=1>590080</td><td rowspan=1 colspan=1>69 %</td><td rowspan=1 colspan=1>182924</td><td rowspan=1 colspan=1>31 %</td></tr><tr><td rowspan=1 colspan=1>C8</td><td rowspan=1 colspan=1>1180160</td><td rowspan=1 colspan=1>79 %</td><td rowspan=1 colspan=1>247833</td><td rowspan=1 colspan=1>21 %</td></tr><tr><td rowspan=1 colspan=1>C9</td><td rowspan=1 colspan=1>2359808</td><td rowspan=1 colspan=1>81%</td><td rowspan=1 colspan=1>448363</td><td rowspan=1 colspan=1>19 %</td></tr><tr><td rowspan=1 colspan=1>C10</td><td rowspan=1 colspan=1>2359808</td><td rowspan=1 colspan=1>84%</td><td rowspan=1 colspan=1>377569</td><td rowspan=1 colspan=1>16 %</td></tr><tr><td rowspan=1 colspan=1>C11</td><td rowspan=1 colspan=1>2359808</td><td rowspan=1 colspan=1>83 %</td><td rowspan=1 colspan=1>401167</td><td rowspan=1 colspan=1>17 %</td></tr><tr><td rowspan=1 colspan=1>C12</td><td rowspan=1 colspan=1>2359808</td><td rowspan=1 colspan=1>83 %</td><td rowspan=1 colspan=1>401167</td><td rowspan=1 colspan=1>17 %</td></tr><tr><td rowspan=1 colspan=1>C13</td><td rowspan=1 colspan=1>2359808</td><td rowspan=1 colspan=1>83 %</td><td rowspan=1 colspan=1>401167</td><td rowspan=1 colspan=1>17 %</td></tr><tr><td rowspan=1 colspan=1>C14</td><td rowspan=1 colspan=1>102764544</td><td rowspan=1 colspan=1>89%</td><td rowspan=1 colspan=1>11304099</td><td rowspan=1 colspan=1>11%</td></tr><tr><td rowspan=1 colspan=1>C15</td><td rowspan=1 colspan=1>16781312</td><td rowspan=1 colspan=1>89 %</td><td rowspan=1 colspan=1>1845944</td><td rowspan=1 colspan=1>11%</td></tr><tr><td rowspan=1 colspan=1>C16</td><td rowspan=1 colspan=1>77843</td><td rowspan=1 colspan=1>89 %</td><td rowspan=1 colspan=1>8562</td><td rowspan=1 colspan=1>11 %</td></tr><tr><td rowspan=1 colspan=1>C17</td><td rowspan=1 colspan=1>9747</td><td rowspan=1 colspan=1>89 %</td><td rowspan=1 colspan=1>1072</td><td rowspan=1 colspan=1>11 %</td></tr><tr><td rowspan=1 colspan=1>C18</td><td rowspan=1 colspan=1>3268</td><td rowspan=1 colspan=1>89 %</td><td rowspan=1 colspan=1>359</td><td rowspan=1 colspan=1>11 %</td></tr><tr><td rowspan=1 colspan=1>C19</td><td rowspan=1 colspan=1>4883</td><td rowspan=1 colspan=1>89 %</td><td rowspan=1 colspan=1>537</td><td rowspan=1 colspan=1>11 %</td></tr><tr><td rowspan=1 colspan=1>C20</td><td rowspan=1 colspan=1>3268</td><td rowspan=1 colspan=1>89 %</td><td rowspan=1 colspan=1>359</td><td rowspan=1 colspan=1>11 %</td></tr><tr><td rowspan=1 colspan=1>C21</td><td rowspan=1 colspan=1>3268</td><td rowspan=1 colspan=1>89%</td><td rowspan=1 colspan=1>359</td><td rowspan=1 colspan=1>11%</td></tr><tr><td rowspan=1 colspan=1>C22</td><td rowspan=1 colspan=1>3268</td><td rowspan=1 colspan=1>90%</td><td rowspan=1 colspan=1>326</td><td rowspan=1 colspan=1>10%</td></tr><tr><td rowspan=1 colspan=1>C23</td><td rowspan=1 colspan=1>3268</td><td rowspan=1 colspan=1>80%</td><td rowspan=1 colspan=1>653</td><td rowspan=1 colspan=1>20%</td></tr><tr><td rowspan=1 colspan=1>Total sparsity</td><td rowspan=1 colspan=1>134369357</td><td rowspan=1 colspan=1>86.44 %</td><td rowspan=1 colspan=1>18233102</td><td rowspan=1 colspan=1>13.56 %</td></tr></table>",
727
+ "bbox": [
728
+ 207,
729
+ 127,
730
+ 790,
731
+ 531
732
+ ],
733
+ "page_idx": 9
734
+ },
735
+ {
736
+ "type": "image",
737
+ "img_path": "images/4a2e0087ae512faa4876d328fabb707dfbdfeb773de495896129041effb75585.jpg",
738
+ "image_caption": [
739
+ "Figure 9: Number of clusters vs IOU score "
740
+ ],
741
+ "image_footnote": [],
742
+ "bbox": [
743
+ 207,
744
+ 563,
745
+ 789,
746
+ 816
747
+ ],
748
+ "page_idx": 9
749
+ },
750
+ {
751
+ "type": "text",
752
+ "text": "",
753
+ "bbox": [
754
+ 174,
755
+ 881,
756
+ 825,
757
+ 924
758
+ ],
759
+ "page_idx": 9
760
+ },
761
+ {
762
+ "type": "text",
763
+ "text": "Quantization We applied 8 bit quantization to pruned weights. The size of the network reduced from 537.47 MB to $1 8 . 2 3 \\mathrm { M B }$ as depicted in table 6. ",
764
+ "bbox": [
765
+ 173,
766
+ 103,
767
+ 825,
768
+ 132
769
+ ],
770
+ "page_idx": 10
771
+ },
772
+ {
773
+ "type": "table",
774
+ "img_path": "images/07c64ec02816fd1861780ef40ea72681d9c1887af6c5c632f5fda1f44dcbbfbf.jpg",
775
+ "table_caption": [
776
+ "Table 6: Reduction in storage requirement after pruning and quantization "
777
+ ],
778
+ "table_footnote": [],
779
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Stages of pipleline</td><td rowspan=1 colspan=1>Storage requirement ofparameters (in MB)</td><td rowspan=1 colspan=1>Reduction in storagerequirement (in %)</td><td rowspan=1 colspan=1>IOU</td></tr><tr><td rowspan=1 colspan=1>Baseline</td><td rowspan=1 colspan=1>537.47 MB</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>64.75 %</td></tr><tr><td rowspan=1 colspan=1>Pruning</td><td rowspan=1 colspan=1>72.93 MB</td><td rowspan=1 colspan=1>86.43%</td><td rowspan=1 colspan=1>61.25 %</td></tr><tr><td rowspan=1 colspan=1>Pruning+Quantization</td><td rowspan=1 colspan=1>18.23MB</td><td rowspan=1 colspan=1>96.60%</td><td rowspan=1 colspan=1>59.82 %</td></tr></table>",
780
+ "bbox": [
781
+ 212,
782
+ 171,
783
+ 787,
784
+ 247
785
+ ],
786
+ "page_idx": 10
787
+ },
788
+ {
789
+ "type": "text",
790
+ "text": "5 CONCLUSION AND FUTURE WORK ",
791
+ "text_level": 1,
792
+ "bbox": [
793
+ 173,
794
+ 275,
795
+ 495,
796
+ 291
797
+ ],
798
+ "page_idx": 10
799
+ },
800
+ {
801
+ "type": "text",
802
+ "text": "Deep learning approaches have demonstrated that they can outperform many traditional techniques, but because of their complex architecture in terms of more stacked layers and a large number of parameters, it is challenging to deploy these deep networks on mobile devices with limited hardware requiting real time predictions. This work contributes to the previous research on compression of deep networks performing classification. Moreover, we have also presented the compression of a network that performs semantic segmentation. We implemented a three stage deep compression pipeline of pruning, weight sharing, and quantization. Using different sparsity levels, we calculate different thresholds in each layer to perform pruning. Our “layerwise threshold” initialization method has shown promise in providing a good trade-off between sparsity and network performance. We also examined two different weight sharing possibilities: finding shared weights within a layer or across all the layers of the network. We extend the previous work by Han et al. (2015) with $\\mathbf { k } .$ - means using linear initialization by merging underrepresented shared weights. Finally, we quantize these shared weights, based on state-of-the-art by Han et al. (2015), in which they used fixed point quantization. The experimental results show that our method compresses the number of parameters in LeNet - 5 and FCN by $1 5 . 3 \\mathrm { x }$ and $8 \\mathbf { { X } }$ , respectively. We reduce the storage requirement for LeNet from $1 . 7 \\mathrm { M B }$ to $0 . 0 0 7 \\mathrm { M B }$ and for FCN from ${ 5 4 7 } \\mathrm { M B }$ to $1 8 . 2 3 \\mathrm { M B }$ . The reduction in storage for the FCN has extended network compression to more sophisticated tasks such as object detection and segmentation. ",
803
+ "bbox": [
804
+ 173,
805
+ 308,
806
+ 825,
807
+ 556
808
+ ],
809
+ "page_idx": 10
810
+ },
811
+ {
812
+ "type": "text",
813
+ "text": "In our work, iterative pruning is performed to get rid of unimportant connections. This process takes 35 hours for LeNet with 430180 parameters on MNIST and 42 days for FCN with approximately 134M parameters on Cityscape to reach an optimum level of sparsity and performance. While not prohibitive, this process could be sped up by different approaches such as masking by Guo et al. (2016), where they have a gradient based heuristic for determining which weights do not come back. It would also be interesting to carry out the experiment on bigger networks and datasets for classification. Also recently, smaller deep neural network architectures, such as SqueezeNet, by Han et al. achieved AlexNet-level accuracy on ImageNet with $5 0 \\mathrm { x }$ fewer parameters and is thus feasible to be deployed on FPGAs and other hardware with limited memory (Iandola et al., 2016). Compressing already smaller deep neural networks could further reduce the number of parameters and make them even more efficient on embedded systems. ",
814
+ "bbox": [
815
+ 173,
816
+ 563,
817
+ 825,
818
+ 717
819
+ ],
820
+ "page_idx": 10
821
+ },
822
+ {
823
+ "type": "text",
824
+ "text": "REFERENCES ",
825
+ "text_level": 1,
826
+ "bbox": [
827
+ 174,
828
+ 738,
829
+ 285,
830
+ 753
831
+ ],
832
+ "page_idx": 10
833
+ },
834
+ {
835
+ "type": "text",
836
+ "text": "M Emre Celebi, Hassan A Kingravi, and Patricio A Vela. A comparative study of efficient initialization methods for the k-means clustering algorithm. Expert systems with applications, 40(1): 200–210, 2013. ",
837
+ "bbox": [
838
+ 174,
839
+ 762,
840
+ 825,
841
+ 804
842
+ ],
843
+ "page_idx": 10
844
+ },
845
+ {
846
+ "type": "text",
847
+ "text": "Wenlin Chen, James Wilson, Stephen Tyree, Kilian Weinberger, and Yixin Chen. Compressing neural networks with the hashing trick. In International Conference on Machine Learning, pp. 2285–2294, 2015. ",
848
+ "bbox": [
849
+ 173,
850
+ 814,
851
+ 823,
852
+ 857
853
+ ],
854
+ "page_idx": 10
855
+ },
856
+ {
857
+ "type": "text",
858
+ "text": "Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3213–3223, 2016. ",
859
+ "bbox": [
860
+ 174,
861
+ 867,
862
+ 825,
863
+ 924
864
+ ],
865
+ "page_idx": 10
866
+ },
867
+ {
868
+ "type": "text",
869
+ "text": "Nando de Freitas. Predicting parameters in deep learning. 2013. ",
870
+ "bbox": [
871
+ 174,
872
+ 103,
873
+ 596,
874
+ 119
875
+ ],
876
+ "page_idx": 11
877
+ },
878
+ {
879
+ "type": "text",
880
+ "text": "Yunchao Gong, Liu Liu, Ming Yang, and Lubomir Bourdev. Compressing deep convolutional networks using vector quantization. arXiv preprint arXiv:1412.6115, 2014. ",
881
+ "bbox": [
882
+ 174,
883
+ 127,
884
+ 821,
885
+ 156
886
+ ],
887
+ "page_idx": 11
888
+ },
889
+ {
890
+ "type": "text",
891
+ "text": "Yiwen Guo, Anbang Yao, and Yurong Chen. Dynamic network surgery for efficient dnns. In Advances In Neural Information Processing Systems, pp. 1379–1387, 2016. ",
892
+ "bbox": [
893
+ 174,
894
+ 165,
895
+ 823,
896
+ 194
897
+ ],
898
+ "page_idx": 11
899
+ },
900
+ {
901
+ "type": "text",
902
+ "text": "Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015. ",
903
+ "bbox": [
904
+ 173,
905
+ 202,
906
+ 823,
907
+ 232
908
+ ],
909
+ "page_idx": 11
910
+ },
911
+ {
912
+ "type": "text",
913
+ "text": "Song Han, Jeff Pool, Sharan Narang, Huizi Mao, Shijian Tang, Erich Elsen, Bryan Catanzaro, John Tran, and William J Dally. Dsd: Regularizing deep neural networks with dense-sparse-dense training flow. arXiv preprint arXiv:1607.04381, 2016. ",
914
+ "bbox": [
915
+ 176,
916
+ 239,
917
+ 823,
918
+ 284
919
+ ],
920
+ "page_idx": 11
921
+ },
922
+ {
923
+ "type": "text",
924
+ "text": "Babak Hassibi and David G Stork. Second order derivatives for network pruning: Optimal brain surgeon. In Advances in neural information processing systems, pp. 164–171, 1993. ",
925
+ "bbox": [
926
+ 173,
927
+ 291,
928
+ 823,
929
+ 321
930
+ ],
931
+ "page_idx": 11
932
+ },
933
+ {
934
+ "type": "text",
935
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016. ",
936
+ "bbox": [
937
+ 176,
938
+ 329,
939
+ 821,
940
+ 372
941
+ ],
942
+ "page_idx": 11
943
+ },
944
+ {
945
+ "type": "text",
946
+ "text": "Geoffrey Hinton, Li Deng, Dong Yu, George E Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara N Sainath, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 29(6):82–97, 2012. ",
947
+ "bbox": [
948
+ 173,
949
+ 381,
950
+ 826,
951
+ 438
952
+ ],
953
+ "page_idx": 11
954
+ },
955
+ {
956
+ "type": "text",
957
+ "text": "Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Binarized neural networks. In Advances in neural information processing systems, pp. 4107–4115, 2016. ",
958
+ "bbox": [
959
+ 171,
960
+ 445,
961
+ 821,
962
+ 477
963
+ ],
964
+ "page_idx": 11
965
+ },
966
+ {
967
+ "type": "text",
968
+ "text": "Forrest N Iandola, Song Han, Matthew W Moskewicz, Khalid Ashraf, William J Dally, and Kurt Keutzer. Squeezenet: Alexnet-level accuracy with $5 0 \\mathrm { x }$ fewer parameters and¡ $0 . 5 \\mathrm { m b }$ model size. arXiv preprint arXiv:1602.07360, 2016. ",
969
+ "bbox": [
970
+ 176,
971
+ 484,
972
+ 823,
973
+ 526
974
+ ],
975
+ "page_idx": 11
976
+ },
977
+ {
978
+ "type": "text",
979
+ "text": "Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012. ",
980
+ "bbox": [
981
+ 174,
982
+ 535,
983
+ 823,
984
+ 578
985
+ ],
986
+ "page_idx": 11
987
+ },
988
+ {
989
+ "type": "text",
990
+ "text": "Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to ´ document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. ",
991
+ "bbox": [
992
+ 174,
993
+ 587,
994
+ 823,
995
+ 617
996
+ ],
997
+ "page_idx": 11
998
+ },
999
+ {
1000
+ "type": "text",
1001
+ "text": "Yann LeCun et al. Generalization and network design strategies. Connectionism in perspective, pp. 143–155, 1989. ",
1002
+ "bbox": [
1003
+ 174,
1004
+ 626,
1005
+ 821,
1006
+ 655
1007
+ ],
1008
+ "page_idx": 11
1009
+ },
1010
+ {
1011
+ "type": "text",
1012
+ "text": "Darryl Lin, Sachin Talathi, and Sreekanth Annapureddy. Fixed point quantization of deep convolutional networks. In International Conference on Machine Learning, pp. 2849–2858, 2016. ",
1013
+ "bbox": [
1014
+ 174,
1015
+ 662,
1016
+ 821,
1017
+ 693
1018
+ ],
1019
+ "page_idx": 11
1020
+ },
1021
+ {
1022
+ "type": "text",
1023
+ "text": "Min Lin, Qiang Chen, and Shuicheng Yan. Network in network. arXiv preprint arXiv:1312.4400, 2013. ",
1024
+ "bbox": [
1025
+ 171,
1026
+ 700,
1027
+ 823,
1028
+ 729
1029
+ ],
1030
+ "page_idx": 11
1031
+ },
1032
+ {
1033
+ "type": "text",
1034
+ "text": "Zifeng Wu, Chunhua Shen, and Anton van den Hengel. Wider or deeper: Revisiting the resnet model for visual recognition. arXiv preprint arXiv:1611.10080, 2016. ",
1035
+ "bbox": [
1036
+ 171,
1037
+ 738,
1038
+ 823,
1039
+ 768
1040
+ ],
1041
+ "page_idx": 11
1042
+ },
1043
+ {
1044
+ "type": "text",
1045
+ "text": "Jimei Yang, Brian Price, Scott Cohen, Honglak Lee, and Ming-Hsuan Yang. Object contour detection with a fully convolutional encoder-decoder network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 193–202, 2016a. ",
1046
+ "bbox": [
1047
+ 174,
1048
+ 776,
1049
+ 821,
1050
+ 820
1051
+ ],
1052
+ "page_idx": 11
1053
+ },
1054
+ {
1055
+ "type": "text",
1056
+ "text": "Tien-Ju Yang, Yu-Hsin Chen, and Vivienne Sze. Designing energy-efficient convolutional neural networks using energy-aware pruning. arXiv preprint arXiv:1611.05128, 2016b. ",
1057
+ "bbox": [
1058
+ 173,
1059
+ 828,
1060
+ 823,
1061
+ 858
1062
+ ],
1063
+ "page_idx": 11
1064
+ }
1065
+ ]
parse/train/SJZsR7kCZ/SJZsR7kCZ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJZsR7kCZ/SJZsR7kCZ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Skgxcn4YDS/Skgxcn4YDS.md ADDED
@@ -0,0 +1,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LAMOL: LANGUAGE MODELING FORLIFELONG LANGUAGE LEARNING
2
+
3
+ Fan-Keng Sun∗ † MIT Cambridge, MA, USA fankeng@mit.edu
4
+
5
+ Cheng-Hao Ho∗
6
+ National Taiwan University Taipei, Taiwan
7
+ jojotenya@gmail.com Hung-Yi Lee
8
+ National Taiwan University Taipei, Taiwan
9
+ hungyilee@ntu.edu.tw
10
+
11
+ # ABSTRACT
12
+
13
+ Most research on lifelong learning applies to images or games, but not language. We present LAMOL, a simple yet effective method for lifelong language learning (LLL) based on language modeling. LAMOL replays pseudo-samples of previous tasks while requiring no extra memory or model capacity. Specifically, LAMOL is a language model that simultaneously learns to solve the tasks and generate training samples. When the model is trained for a new task, it generates pseudo-samples of previous tasks for training alongside data for the new task. The results show that LAMOL prevents catastrophic forgetting without any sign of intransigence and can perform five very different language tasks sequentially with only one model. Overall, LAMOL outperforms previous methods by a considerable margin and is only $2 \mathrm {- } 3 \%$ worse than multitasking, which is usually considered the LLL upper bound. The source code is available at https://github.com/jojotenya/LAMOL.
14
+
15
+ # 1 INTRODUCTION
16
+
17
+ The current dominant paradigm for machine learning is to run an algorithm on a given dataset to produce a trained model specifically for a particular purpose; this is isolated learning (Chen & Liu, 2016, p. 150). In isolated learning, the model is unable to retain and accumulate the knowledge it has learned before. When a stream of tasks are joined to be trained sequentially, isolated learning faces catastrophic forgetting (McCloskey & Cohen, 1989) due to a non-stationary data distribution that biases the model (left figure of Figure 1). In contrast, lifelong learning is designed to address a stream of tasks by accumulating interconnected knowledge between learned tasks and retaining the performance of those tasks. A human easily achieves lifelong learning, but this is nontrivial for a machine; thus lifelong learning is a vital step toward artificial general intelligence.
18
+
19
+ In this paper, we focus on lifelong language learning, where a machine achieves lifelong learning on a stream of natural language processing (NLP) tasks. To the best of our knowledge, lifelong language learning has been studied in only a few instances; for sentiment analysis (Chen et al., 2015b; Xia et al., 2017), conversational agents (Lee, 2017), word representation learning (Xu et al., 2018), sentence representation learning (Liu et al., 2019), text classification, and question answering (d’Autume et al., 2019). However, in all previous work, the tasks in the stream are essentially the same task but in different domains. To achieve lifelong language learning on fundamentally different tasks, we propose LAMOL — LAnguage MOdeling for Lifelong language learning.
20
+
21
+ It has been shown that many NLP tasks can be considered question answering (QA) (Bryan McCann & Socher, 2018). Therefore, we address multiple NLP tasks with a single model by training a language model (LM) that generates an answer based on the context and the question. Treating QA as language modeling is beneficial because the LM can be pre-trained on a large number of sentences without any labeling (Radford et al., 2019); however, this does not directly solve the problem of LLL. If we train an LM on a stream of tasks, catastrophic forgetting still occurs. However, as an LM is intrinsically a text generator, we can use it to answer questions while generating pseudo-samples of the previous task to be replayed later. LAMOL is inspired by the data-based approach for LLL in which a generator learns to generate samples in previous tasks (middle of Figure 1) (Hanul Shin & Kim, 2017; Kemker & Kanan, 2017). In contrast to previous approaches, LAMOL needs no extra generator (right of Figure 1). LAMOL is also similar to multitask training, but the model itself generates data from previous tasks instead of using real data.
22
+
23
+ ![](images/943211a3cb25682c23c6e6dff3717feab3dad83cd4d165dd2f89aad789f51c4b.jpg)
24
+ Figure 1: Left: After learning Task 2, the learner has already forgetten how to solve Task 1. This is “catastrophic forgetting”. Middle: The basic idea of the data-based LLL approach. A generator is learned to generate examples it has seen before. Using the generator, the learner also learns from examples from the previous task to prevent it from forgetting. Right: A language model that simultaneously takes on the roles of learner and generator.
25
+
26
+ Our main contributions in this paper are:
27
+
28
+ • We present LAMOL, a simple yet effective method for LLL. Our method has the advantages of no requirements in terms of extra memory or model capacity. We also do not need to know how many tasks to train in advance and can always train on additional tasks when needed.
29
+ • Experimental results show that our methods outperform baselines and other state-of-the-art methods by a considerable margin and approaches the multitasking upper bound within $2 \mathrm { - } 3 \%$ .
30
+ • Furthermore, we propose adding task-specific tokens during pseudo-sample generation to evenly split the generated samples among all previous tasks. This extension stabilizes LLL and is particularly useful when training on a large number of tasks.
31
+ • We analyze how different amounts of pseudo-samples affect the final performance of LAMOL, considering results both with and without the task-specific tokens.
32
+ • We open-source our code to facilitate further LLL research.
33
+
34
+ # 2 RELATED WORK
35
+
36
+ Lifelong learning research is based on regularization, architecture, or data. Here is a brief survey of works in these three categories.
37
+
38
+ # 2.1 REGULARIZATION-BASED METHODS
39
+
40
+ In this approach, a constraint, i.e., a regularization term, is added to minimize deviation from trained weights while updating the weights in a new task. Most regularization based methods estimate the importance of each parameter and add the importance as a constraint to the loss function. Elastic weight consolidation (EWC) (Kirkpatrick et al., 2017) calculates a Fisher information matrix to estimate the sensitivity of parameters as importance. Online EWC (Schwarz et al., 2018) is a transformed version of EWC. Instead of tracking the importance of parameters for each task, online EWC simply accumulates the importance of the stream of tasks. Synaptic intelligence (SI) (Zenke et al., 2017) assigns importance to each parameter according to its contribution to the change in the total loss. Memory aware synapses (MAS) (Aljundi et al., 2018) estimate importance via the gradients of the model outputs. In contrast to estimating the importance of weights, incremental moment matching (IMM) (Lee et al., 2017) matches the moment of weights between different tasks.
41
+
42
+ # 2.2 ARCHITECTURE-BASED METHODS
43
+
44
+ For this category, the main idea is to assign a dedicated capacity inside a model for each task. After completing a task, the weights are frozen and may not be changed thereafter. Some methods allow models to expand, whereas some fix the size but must allocate capacity for tasks at the beginning. Progressive neural networks (Rusu et al., 2016) utilize one column of the neural network per task. Once a new task is trained, progressive neural networks augment a new column of the neural network for the task while freezing the past trained columns. Columns that have been frozen are not allowed to change but are connected to the new column to transfer knowledge from old tasks. Towards Training Recurrent Neural Networks for Lifelong Learning (Sodhani et al., 2018) unifies Gradient episodic memory (Lopez-Paz et al., 2017) and Net2Net (Chen et al., 2015a). Using the curriculumbased setting, the model learns the tasks in easy-to-hard order. The model alleviates the forgetting problem by GEM method, and if it fails to learn the current task and has not been expanded yet, the model will expand to a larger model by the Net2Net approach.
45
+
46
+ PathNet (Fernando et al., 2017) reuses subsets of a neural network to transfer knowledge between tasks. Unlike progressive neural networks, PathNet does not allow the model to expand. Instead, it builds a huge fixed-size model composed of a neural network and paths between different layers of the neural networks. While training a task, it selects the best combination of neural networks and paths for that particular task. Similar to progressive neural networks, selected parts are fixed to allow only inference and not training. Inspired by network pruning, PackNet (Mallya & Lazebnik, 2018) prunes and re-trains the network iteratively to pack numerous tasks into a single huge model.
47
+
48
+ This category has some drawbacks. When resources are limited, model expansion is prohibited. Also, some architecture-based methods require the number of tasks in advance to allocate the capacity for the tasks, which greatly reduces their practicality.
49
+
50
+ # 2.3 DATA-BASED METHODS
51
+
52
+ This method restricts weights through the data distribution of old tasks. One data-based approach keeps a small amount of real samples from old tasks, and the other distills the knowledge from old data and imagines pseudo-data of old tasks later on. While training a new task, the data or pseudo-data is used to prevent weights from greatly deviating from the previous status.
53
+
54
+ Gradient episodic memory (GEM) (Lopez-Paz et al., 2017) preserves a subset of real samples from previous tasks. Utilizing these real samples during optimization helps somewhat to constrain parameter gradients. Averaged-GEM (A-GEM) (Chaudhry et al., 2018) is a more efficient version of GEM which achieves the same or even better performance than the original GEM. Learning without forgetting (Li & Hoiem, 2017) minimizes the alteration of shared parameters by recording the outputs from old task modules on data from the new task before updating. Hanul Shin & Kim (2017) and Kemker & Kanan (2017) encode data from old tasks into a generative model system. The latter imitates the dual-memory system of the human brain, in that the model automatically decides which memory should be consolidated. Both methods replay pseudo-data of previous tasks using the generative model during training.
55
+
56
+ d’Autume et al. (2019) investigates the performance of the episodic memory system on NLP problems. It distills the knowledge of previous tasks into episodic memory and replays it afterward. This work evaluates the method on two streams of tasks: question answering and text classification.
57
+
58
+ # 3 LAMOL
59
+
60
+ A pre-trained LM can generate a coherent sequence of text given a context. Thus, we propose LAMOL, a method of training a single LM that learns not only to answer the question given the context but also to generate the context, the question, and the answer given a generation token. That is, in LAMOL, a model plays the role of both LM and QA model. Hence, answering questions and generating pseudo-old samples can both be done by a single model. During LLL, these pseudo-old samples are trained with new samples from new tasks to help mitigate catastrophic forgetting.
61
+
62
+ ![](images/e1b62c928eeed01c6505bb09c1f94b5828fc74de029902eff5952bdcaef728e9.jpg)
63
+ Figure 2: Upper: LM learns to answer question given context. Lower: LM learns to generate training samples given generation token GEN.
64
+
65
+ # 3.1 DATA FORMATTING
66
+
67
+ Inspired by the protocol used by decaNLP (Bryan McCann & Socher, 2018), samples from the datasets we used are framed into a SQuAD-like scheme, which consists of context, question, and answer. Although the LM is simultaneously a QA model, the data format depends on the training objective. When training as a QA model, the LM learns to decode the answer after reading the context and question. On the other hand, when training as an LM, the LM learns to decode all three parts given a generation token.
68
+
69
+ In addition to context, question, and answer, we add three special tokens:
70
+
71
+ ANS Inserted between question and answer. As the context and question are known during inference, decoding starts after inputting ANS.
72
+
73
+ EOS The last token of every example. Decoding stops when EOS is encountered.
74
+
75
+ GEN The first token during pseudo-sample generation. Decoding starts after inputting GEN.
76
+
77
+ The data formats for QA and LM training are shown in Figure 2.
78
+
79
+ # 3.2 TRAINING
80
+
81
+ Assume a stream of tasks $\{ T _ { 1 } , T _ { 2 } , \dots \}$ , where the number of tasks may be unknown. Directly training the LM on these tasks sequentially results in catastrophic forgetting. Thus, before beginning training on a new task $T _ { i } , i > 1$ , the model first generates pseudo samples $\boldsymbol { T } _ { i } ^ { ' }$ by top- $k$ sampling that represent the data distribution of previous tasks $T _ { 1 } , \dots , T _ { i - 1 }$ . Then, the LM trains on the mixture of $T _ { i }$ and $\boldsymbol { T } _ { i } ^ { ' }$ . To balance the ratio between $\left| T _ { i } \right|$ and $| T _ { i } ^ { ' } |$ , the LM generates $\gamma | T _ { i } |$ pseudo samples, where $\left| T _ { i } \right|$ denotes the number of samples in task $T _ { i }$ and $\gamma$ is the sampling ratio. If the generated sample does not have exactly one ANS in it, then the sample is discarded. This happens in only $0 . 5 \% - 1 \%$ of generated samples.
82
+
83
+ During training, each sample is formatted into both the QA format and the LM format. Then, in the same optimization step, both formats are fed into the LM to minimize the QA loss $L _ { \mathrm { Q A } }$ and LM loss $L _ { \mathrm { L M } }$ together. Overall, the loss is $L = L _ { \mathrm { Q A } } + \lambda L _ { \mathrm { L M } }$ , where $\lambda$ is the weight of the LM loss.
84
+
85
+ # 3.3 TASK-SPECIFIC TOKENS
86
+
87
+ Using the same GEN token for all tasks is problematic when training for many tasks because the portion of old tasks decreases exponentially in theory. For instance, if $\gamma = 0 . 0 1$ , then the portion of the first task when training the second task is about $1 \%$ , but is only about $0 . 0 1 \%$ when training the third task. This issue is definitely harmful to LLL. To mitigate this, we can choose to replace the GEN token with a task-specific token for each task to inform the model to generate pseudo-samples belonging to the specific task. Under this setup, all previous tasks have the same share of the $\gamma | T _ { i } |$ generated pseudo samples. That is, when beginning training for the $i$ -th task $T _ { i }$ , we generate $\frac { \gamma } { i - 1 } | T _ { i } |$
88
+
89
+ Table 1: Summary of tasks, datasets, dataset sizes, and their corresponding metrics. As this work uses no development set, only the training and test datasets are shown. nF1 is the normalized version of the F1 score; EM represents an exact match between texts: for text classification, this amounts to accuracy; for WOZ, it is equivalent to dfEM (turn-based dialogue state exact match); for WikiSQL, it is equivalent to lfEM (exact match of logical forms).
90
+
91
+ <table><tr><td>Task</td><td>Dataset</td><td># Train # Test Metric</td><td></td><td></td></tr><tr><td rowspan="3">Question answering Semantic parsing Sentiment analysis Semantic role labeling Goal-oriented dialogue</td><td>SQuAD</td><td>87599</td><td>10570</td><td>nF1</td></tr><tr><td>WikiSQL SST</td><td>56355 6920</td><td>15878 1821</td><td>1fEM EM</td></tr><tr><td>QA-SRL WOZ</td><td>6414 2536</td><td>2201 1646</td><td>nF1 dsEM</td></tr><tr><td>Text classification</td><td>AGNews Amazon Yahoo Yelp</td><td>DBPedia 115000</td><td>7600</td><td>EM</td></tr></table>
92
+
93
+ <table><tr><td></td><td>SQuAD</td><td>WikiSQL</td><td>SST</td><td>SRL</td><td>WOZ</td><td>AGNews</td><td>Amazon</td><td>DBPedia</td><td>Yahoo</td><td>Yelp</td></tr><tr><td>GPT-2 score</td><td>72.3</td><td>70.7</td><td>90.9</td><td>70.4</td><td>84.9</td><td>94.6</td><td>62.3</td><td>99.1</td><td>73.9</td><td>67.7</td></tr><tr><td>Other scores</td><td>75.5</td><td>72.6</td><td>88.1</td><td>75.2</td><td>84.4</td><td>93.8</td><td>60.1</td><td>30.5</td><td>68.6</td><td>50.7</td></tr></table>
94
+
95
+ Table 2: Comparison of GPT-2 and other methods on single task scores. Other scores are retrieved from Bryan McCann & Socher (2018) or d’Autume et al. (2019). Better performance in boldface.
96
+
97
+ for the previous $i - 1$ tasks. Note that as each task uses a specific token, the vocabulary size and the embedding weight of the LM increase slightly as more tasks are trained.
98
+
99
+ # 4 EXPERIMENT SETUP
100
+
101
+ # 4.1 TASKS, DATASETS, AND METRICS
102
+
103
+ We collect five disparate tasks mentioned in decaNLP (Bryan McCann & Socher, 2018): question answering, semantic parsing, sentiment analysis, semantic role labeling, and goal-oriented dialogue, with a dataset for each task.
104
+
105
+ Furthermore, to compare our method with d’Autume et al. (2019), we conducted experiments on four text classification tasks: news classification, sentiment analysis, Wikipedia article classification, and question-and-answer categorization with five datasets. We use the procedure from d’Autume et al. (2019) to produce equal-sized datasets.
106
+
107
+ We do not train on all datasets from both papers due to a lack of computational resources. For each task, there is a corresponding evaluation metric. Table 1 contains a summary of tasks, datasets, and metrics. Additional details are provided in Appendix A. Note that the score of any metric lies between 0 and $100 \%$ .
108
+
109
+ # 4.2 METHODS TO BE COMPARED
110
+
111
+ All methods use the smallest pre-trained GPT-2 model (Radford et al., 2019)1 as the LM. Each task is trained for nine epochs; greedy decoding is applied during inference.
112
+
113
+ • LAMOL In all experiments, $k = 2 0$ in top- $k$ sampling and $\lambda = 0 . 2 5$ for weight of the LM loss are set. $\mathrm { L A M O L } _ { \mathrm { G E N } } ^ { \gamma }$ denotes LAMOL with a sampling ratio of $\gamma$ , and the same GEN token is used for all tasks. If the task-specific tokens are used, GEN is replaced by TASK. • Keep real data Pseudo-samples are replaced by real samples from previous tasks. The quantity of real samples is equally split between previous tasks. This approach can be considered the upper bound of LAMOL. We denote it as LAMOLγREAL.
114
+
115
+ Table 3: Summary of averaged metric scores for different methods under permuted task orders using models at last epoch of last task. The Average and Std columns respectively are the average and standard deviation of the averaged scores for each row of the methods. Multitasked learning as an upper bound is shown at the bottom.
116
+
117
+ <table><tr><td>Methods</td><td>SST SRL WOZ</td><td>SST WOZ SRL</td><td>SRL SST WOZ</td><td>SRL WOZ SST</td><td>WOZ SST SRL</td><td>WOZ SRL SST</td><td>Average</td><td>Std</td></tr><tr><td>Fine-tuned</td><td>50.2</td><td>24.7</td><td>62.9</td><td>31.3</td><td>32.8</td><td>33.9</td><td>39.3</td><td>12</td></tr><tr><td>EWC</td><td>50.6</td><td>48.4</td><td>64.7</td><td>35.5</td><td>43.9</td><td>39.0</td><td>47.0</td><td>8.7</td></tr><tr><td>MAS</td><td>36.5</td><td>45.3</td><td>56.6</td><td>31.0</td><td>49.7</td><td>30.8</td><td>41.6</td><td>8.9</td></tr><tr><td>GEM</td><td>50.4</td><td>29.8</td><td>63.3</td><td>32.6</td><td>44.1</td><td>36.3</td><td>42.8</td><td>11</td></tr><tr><td>LAMOLG GEN</td><td>46.5</td><td>36.6</td><td>56.6</td><td>38.6</td><td>44.9</td><td>45.2</td><td>44.8</td><td>6.0</td></tr><tr><td>LAMOL 0.05 GN</td><td>79.6</td><td>78.9</td><td>73.1</td><td>73.7</td><td>68.6</td><td>75.7</td><td>74.9</td><td>3.4</td></tr><tr><td>LAMOLGEN</td><td>80.0</td><td>80.7</td><td>79.6</td><td>78.7</td><td>78.4</td><td>80.5</td><td>79.7</td><td>0.8</td></tr><tr><td>LAMOLTASK 0</td><td>41.0</td><td>33.5</td><td>50.1</td><td>41.9</td><td>49.3</td><td>41.5</td><td>42.9</td><td>5.2</td></tr><tr><td>LAMOL 0.05 TASK</td><td>77.3</td><td>76.9</td><td>78.1</td><td>74.7</td><td>73.4</td><td>75.8</td><td>76.0</td><td>1.5</td></tr><tr><td>LAMOL TASK</td><td>79.4</td><td>79.9</td><td>80.1</td><td>78.7</td><td>79.8</td><td>79.0</td><td>79.5</td><td>0.5</td></tr><tr><td>LAMOL 0.05</td><td>81.0</td><td>78.9</td><td>80.1</td><td>80.9</td><td>77.7</td><td>78.0</td><td>79.4</td><td>1.2</td></tr><tr><td>LAMOLR0AL</td><td>81.8</td><td>80.6</td><td>81.6</td><td>81.2</td><td>80.4</td><td>80.5</td><td>81.0</td><td>0.5</td></tr><tr><td colspan="3">Multitasked</td><td></td><td>81.5</td><td></td><td></td><td></td><td></td></tr></table>
118
+
119
+ <table><tr><td>Fine-tuned</td><td>MAS</td><td>LAMOLG5 0.05</td><td>LAMOLGEN 0.2</td><td>LAMOLTSK 0.05</td><td>LAMOLTASK 0.2</td><td>LAMOLREL 0.05</td><td>LAMOLREAL 0.2</td><td>Multitasked</td></tr><tr><td>51.5</td><td>49.5</td><td>69.6</td><td>73.1</td><td>71.5</td><td>74.3</td><td>74.5</td><td>76.0</td><td>76.6</td></tr></table>
120
+
121
+ Table 4: Summary of averaged score on five tasks. The scores are reported as the averaged score over all tasks of the models after training on every task. The rightmost three columns – LAMOL with $\gamma = 0 . 0 5$ and $\gamma = 0 . 2$ of real samples from previous tasks and Multitasked – are upper bounds for comparison. Best performance in boldface.
122
+
123
+ • Fine-tune The model is directly fine-tuned on the stream of tasks, one after another.
124
+
125
+ • Multitask learning All tasks are trained simultaneously. Multitask learning is often seen as an upper bound of lifelong learning. In addition, it is also used to determine whether forgetting is caused by a lack of model capacity.
126
+
127
+ • Regularization-based methods Online EWC (Schwarz et al., 2018) and MAS (Aljundi et al., 2018) are compared. They are chosen because they are more computationally efficient than SI (Zenke et al., 2017) and more memory efficient than IMM (Lee et al., 2017). Additionally, experiments such as Elhoseiny et al. (2018) show that MAS has better performance overall.
128
+
129
+ • Gradient Episodic Memory (GEM) When training each task, we randomly sample data from previous task with the amount equivalent to $5 \%$ of the current task size into the memory. In each optimization step, the GEM (Lopez-Paz et al., 2017) approach retrieves all the data in the memory to calculate the gradients for the previous tasks.
130
+
131
+ • Improved memory-based parameter adaptation $\mathbf { ( M B P A + + ) }$ ) Sparse experience replay and local adaptation for LLL as proposed in d’Autume et al. (2019). We also re-implement the paper and report better scores using different hyperparameters.
132
+
133
+ # 5 EXPERIMENTAL RESULTS
134
+
135
+ # 5.1 SINGLE TASK
136
+
137
+ To establish a reference on the capability of the GPT-2 model on every dataset, we trained the model on each dataset independently. The results are shown in Table 2. We observe that the performance of the GPT-2 model is actually quite good, even beating the BERT-based model (d’Autume et al., 2019) on text classification datasets by a large margin. Thus, the GPT-2 model has the potential for superior LLL performance, as long as we can prevent catastrophic forgetting.
138
+
139
+ # 5.2 SST, QA-SRL, AND WOZ TASKS
140
+
141
+ For an initial understanding of the performance on all of the methods and the effect of task order, we first conducted a small-scale experiment on three small datasets: SST, QA-SRL, and WOZ. We trained all but the the multitasked method on all six permutations of the task order. The final score for each order was obtained by evaluating the model at the conclusion of the training process. The results are shown in Table 3; we make several observations. Note that LAMOL with $\gamma = 0$ is not the same as Fine-tuned, as the LM loss is still optimized.
142
+
143
+ • Fine-tuned, EWC, MAS, and LAMOL with $\gamma = 0$ show similar performance and are much worse than LAMOL with $\gamma > 0$ .
144
+ • LAMOL0.2GEN, our best performing method, is only 1.8 percent away from Multitasked, which implies almost no forgetting during LLL.
145
+ • The order of the tasks is crucial to the performance. For instance, the WOZ score drops significantly after training other tasks. Thus, if WOZ is not the last task, the performance is usually noticeably worse.
146
+ • When using LAMOL, the performance of old tasks maintains almost the same level throughout the training process. When the sampling ratio $\gamma$ is increased, the performance also increases, especially when increased from 0 to 0.05.
147
+ • When $\gamma = 0$ , adding task-specific tokens harms performance, because the model must fit additional special tokens that are useless. Adding task-specific tokens is also not helpful if $\gamma = 0 . 2$ . We believe that 0.2 is enough for three tasks; thus task-specific tokens are redundant. However, when $\gamma = 0 . 0 5$ , task-specific tokens are beneficial because the tokens are needed to help retain a substantial presence of the first task when training the third task. • We see that a better LLL method usually has a smaller standard deviation, which implies that it is effected less by task order. Adding task-specific tokens also has a stabilizing effect.
148
+
149
+ $\mathrm { L A M O L } _ { \mathrm { G E N } } ^ { \mathrm { 6 } }$ e for, and $\bar { \mathrm { L A M O L } } _ { \mathrm { T A S K } } ^ { 0 }$ ss is illustrated in Appendix B. Creveal similar patterns. However, t WC,with $\gamma > 0$ $\mathrm { { W O Z } { S R L } { S S T } }$ score even increases after training the third task using LAMOL with $\gamma = 0 . 2$ .
150
+
151
+ # 5.3 FIVE DECANLP TASKS
152
+
153
+ Here, we train the following five tasks sequentially: SQuAD, WikiSQL, SST, QA-SRL, and WOZ. Given the limited computing resources, we explore only one task order: from large to small tasks, according to the number of training samples.
154
+
155
+ As shown in Table 4, LAMOL outperforms all baselines by a large margin and on average approaches within $2 \mathrm { - } 3 \%$ of the multitasked upper bound. Also, as expected, the performance of LAMOL improves as the sampling ratio $\gamma$ increases and task-specific tokens are used.
156
+
157
+ There is also a gap between our method and the method of keeping real samples. As shown in the table, using real samples is much more sample-efficient, as $5 \%$ of real samples beats $20 \%$ of pseudo-samples. This may be due to the less-than-ideal quality of the pseudo-data. The longer the paragraphs are, the harder it is for the model to create high-quality samples. After observing the samples generated when using task-specific tokens, we discover some “chaos”. That is, some examples generated by the model do not exactly correspond to the task-specific token. This implies that the task-specific tokens are sometimes too weak to constrain the model; thus their influence is overshadowed by other tokens. We believe that solving this problem will bring the performance when using task-specific tokens closer to using real samples; however, we leave this as future work.
158
+
159
+ Figure 3 illustrates the test scores of each method on each task throughout the training. We clearly see that when using LAMOL, the model remembers nearly perfectly.
160
+
161
+ We make several observations:
162
+
163
+ • When training SQuAD, QA-SRL has not been trained yet, but the score of QA-SRL is already around 40. Also, when training QA-SRL, the SQuAD score revives if the model has forgotten SQuAD. These two facts imply that SQuAD and SRL are similar tasks, such that the model is capable of transferring knowledge from one to the other.
164
+
165
+ ![](images/b65f0bc94e2368784de8fbd88770dba973cc07821dda7316678f74876c2909ea.jpg)
166
+ Figure 3: Training progress of five tasks. The graph records the performance of the model at each epoch of each task.
167
+
168
+ ![](images/241301bab661c8d39d04977a8cf22ff05da6fdb99e6a8484395a5d6e3846ae36.jpg)
169
+ Figure 4: Performance after each epoch under five different sampling ratios, with or without task specific-specific tokens.
170
+
171
+ • If forward transfer exists, replaying pseudo-data also retains the forward transfer. That is, the QA-SRL score does not drop after training on WikiSQL and SST when LAMOL is used but drops significantly for other methods.
172
+
173
+ • The transferability between SQuAD and QA-SRL is expected. On the other hand, the transferability between WikiSQL and QA-SRL is quite surprising; the WikiSQL score improves considerably when training on QA-SRL for Fine-tuned and MAS after WikiSQL is forgotten during SST training.
174
+
175
+ # 5.4 TEXT CLASSIFICATION TASKS
176
+
177
+ We compared the proposed method against the state-of-the-art $\mathrm { M B P A + + }$ proposed in d’Autume et al. (2019), both by citing their original numbers and also by reproducing their methods. We chose text classification as opposed to QA because we believe that LM has more of a disadvantage in text classification than in QA. We compared with $\mathrm { L A M O L _ { T A S K } ^ { 0 . 2 } }$ due to its good performance and stability. Following their paper and testing our model on the same four kinds of task orders, the results are shown in Table 5.
178
+
179
+ Our implementation results in much higher scores thLAMOL0.2TASK still outperforms our implementation of $\mathrm { M B P A + + }$ ginal ones. However, the proposed.
180
+
181
+ # 5.5 INFLUENCE OF SAMPLING RATIO $\gamma$
182
+
183
+ As the value of $\gamma$ determines the performance of LLL, we conducted a medium-scale experiment to understand the influence of $\gamma$ with and without task-specific tokens. In this experiment we used
184
+
185
+ Table 5: Summary of results on text classification tasks using averaged EM score (equivalent to averaged accuracy in d’Autume et al. (2019)) of models at last epoch of last task. The four orders mirror those in d’Autume et al. (2019). For $\mathrm { M B P A + + }$ (out impl.) and $\mathrm { L A M O L _ { T A S K } ^ { 0 . 2 } }$ , the results are averaged over two runs. The -value of pairted $t$ -test between eight numbers of $\mathrm { M B P A + + }$ (our impl.) and $\mathrm { L A M O L _ { T A S K } ^ { 0 . 2 } }$ is smaller than $1 \%$ , which shows that there is significant difference. Our implementation of $\mathrm { M B P A + + }$ is available at https://github.com/Daikon-Sun/EM-in-LLL.
186
+
187
+ <table><tr><td>Order</td><td>MBPA++</td><td>MBPA++ (our impl.)</td><td></td></tr><tr><td>i</td><td>70.8</td><td>74.1</td><td>76.7</td></tr><tr><td>ii</td><td>70.9</td><td>74.9</td><td>77.2</td></tr><tr><td>ii</td><td>70.2</td><td>73.1</td><td>76.1</td></tr><tr><td>iv</td><td>70.7</td><td>74.9</td><td>76.1</td></tr><tr><td>Average</td><td>70.7</td><td>74.2</td><td>76.5</td></tr></table>
188
+
189
+ WikiSQL (blue color), SST (orange), QA-SRL (green), and WOZ (red), in that training order. The results are shown in Figure 4.
190
+
191
+ Unsurprisingly, the less generation done by the model, the more likely the vanishing distribution in Section 3 occurs: the model forgets how to generate previous tasks, as the ratio of previous tasks in the total dataset decreases exponentially over time. Models using task-specific tokens mitigate this somewhat, as demonstrated in the first subgraph where the performance of LAMOL0.03TASK is much better than that of LAMOL0.03GEN.
192
+
193
+ In addition, the more samples the model generates, the better the overall performance of the model.
194
+ However, this performance gain disappears when the sampling ratio $\gamma$ is around 0.1 to 0.3.
195
+
196
+ # 6 CONCLUSION
197
+
198
+ We propose LAMOL, a simple yet effective method for LLL based on language modeling. A single LM achieves LLL without additional model components and without keeping old examples. Moreover, any pre-trained LM can be used to leverage a large amount of unlabeled text to improve LLL. Finally, more tasks can be added whenever needed.
199
+
200
+ # ACKNOWLEDGEMENT
201
+
202
+ This work was supported by the Ministry of Science and Technology of Taiwan.
203
+
204
+ # REFERENCES
205
+
206
+ Rahaf Aljundi, Francesca Babiloni, Mohamed Elhoseiny, Marcus Rohrbach, and Tinne Tuytelaars. Memory aware synapses: Learning what (not) to forget. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 139–154, 2018.
207
+
208
+ Caiming Xiong Bryan McCann, Nitish Shirish Keskar and Richard Socher. The natural language decathlon: Multitask learning as question answering. arXiv preprint arXiv:1806.08730, 2018.
209
+
210
+ Arslan Chaudhry, Marc’Aurelio Ranzato, Marcus Rohrbach, and Mohamed Elhoseiny. Efficient lifelong learning with a-gem. arXiv preprint arXiv:1812.00420, 2018.
211
+
212
+ Tianqi Chen, Ian Goodfellow, and Jonathon Shlens. Net2net: Accelerating learning via knowledge transfer. arXiv preprint arXiv:1511.05641, 2015a.
213
+
214
+ Zhiyuan Chen and Bing Liu. Lifelong Machine Learning. Morgan & Claypool Publishers, 2016.
215
+
216
+ Zhiyuan Chen, Nianzu Ma, and Bing Liu. Lifelong learning for sentiment classification. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 2: Short Papers), 2015b.
217
+
218
+ Cyprien de Masson d’Autume, Sebastian Ruder, Lingpeng Kong, and Dani Yogatama. Episodic memory in lifelong language learning. arXiv preprint arXiv:1906.01076, 2019.
219
+
220
+ Mohamed Elhoseiny, Francesca Babiloni, Rahaf Aljundi, Marcus Rohrbach, Manohar Paluri, and Tinne Tuytelaars. Exploring the challenges towards lifelong fact learning. In Asian Conference on Computer Vision, pp. 66–84. Springer, 2018.
221
+
222
+ Chrisantha Fernando, Dylan Banarse, Charles Blundell, Yori Zwols, David Ha, Andrei A Rusu, Alexander Pritzel, and Daan Wierstra. Pathnet: Evolution channels gradient descent in super neural networks. arXiv preprint arXiv:1701.08734, 2017.
223
+
224
+ Jaehong Kim Hanul Shin, Jung Kwon Lee and Jiwon Kim. Continual learning with deep generative replay. arXiv preprint arXiv:1705.08690, 2017.
225
+
226
+ Luheng He, Kenton Lee, Mike Lewis, and Luke Zettlemoyer. Deep semantic role labeling: What works and whats next. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 473–483, 2017.
227
+
228
+ Ronald Kemker and Christopher Kanan. Fearnet: Brain-inspired model for incremental learning. arXiv preprint arXiv:1711.10563, 2017.
229
+
230
+ James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, et al. Overcoming catastrophic forgetting in neural networks. Proceedings of the national academy of sciences, 114(13):3521–3526, 2017.
231
+
232
+ Sang-Woo Lee, Jin-Hwa Kim, Jaehyun Jun, Jung-Woo Ha, and Byoung-Tak Zhang. Overcoming catastrophic forgetting by incremental moment matching. In Advances in neural information processing systems, pp. 4652–4662, 2017.
233
+
234
+ Sungjin Lee. Toward continual learning for conversational agents. In arXiv, 2017.
235
+
236
+ Zhizhong Li and Derek Hoiem. Learning without forgetting. IEEE transactions on pattern analysis and machine intelligence, 40(12):2935–2947, 2017.
237
+
238
+ Tianlin Liu, Lyle Ungar, and Joao Sedoc. Continual learning for sentence representations using ˜ conceptors. In NAACL-HLT, 2019.
239
+
240
+ David Lopez-Paz et al. Gradient episodic memory for continual learning. In Advances in Neural Information Processing Systems, pp. 6467–6476, 2017.
241
+
242
+ Arun Mallya and Svetlana Lazebnik. Packnet: Adding multiple tasks to a single network by iterative pruning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 7765–7773, 2018.
243
+
244
+ Michael McCloskey and Neal J Cohen. Catastrophic interference in connectionist networks: The sequential learning problem. In Psychology of learning and motivation, volume 24, pp. 109–165. Elsevier, 1989.
245
+
246
+ Alec Radford, Rafal Jozefowicz, and Ilya Sutskever. Learning to generate reviews and discovering sentiment. arXiv preprint arXiv:1704.01444, 2017.
247
+
248
+ Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. OpenAI Blog, 1(8), 2019.
249
+
250
+ Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: $1 0 0 { , } 0 0 0 { + }$ questions for machine comprehension of text. arXiv preprint arXiv:1606.05250, 2016.
251
+
252
+ Andrei A Rusu, Neil C Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. arXiv preprint arXiv:1606.04671, 2016.
253
+
254
+ Jonathan Schwarz, Jelena Luketina, Wojciech M Czarnecki, Agnieszka Grabska-Barwinska, Yee Whye Teh, Razvan Pascanu, and Raia Hadsell. Progress & compress: A scalable framework for continual learning. arXiv preprint arXiv:1805.06370, 2018.
255
+
256
+ Shagun Sodhani, Sarath Chandar, and Yoshua Bengio. On training recurrent neural networks for lifelong learning. arXiv preprint arXiv:1811.07017, 2018.
257
+ Tsung-Hsien Wen, David Vandyke, Nikola Mrksic, Milica Gasic, Lina M Rojas-Barahona, Pei-Hao Su, Stefan Ultes, and Steve Young. A network-based end-to-end trainable task-oriented dialogue system. arXiv preprint arXiv:1604.04562, 2016.
258
+ R. Xia, J. Jiang, and H. He. Distantly supervised lifelong learning for large-scale social media sentiment analysis. IEEE Transactions on Affective Computing, 8(4):480–491, 2017.
259
+ Yann LeCun Xiang Zhang, Junbo Zhao. Character-level convolutional networks for text classification. arXiv preprint arXiv:1509.01626, 2015.
260
+ Hu Xu, Bing Liu, Lei Shu, and Philip S. Yu. Lifelong domain word embedding via meta-learning. In Proceedings of the 27th International Joint Conference on Artificial Intelligence, 2018.
261
+ Friedemann Zenke, Ben Poole, and Surya Ganguli. Continual learning through synaptic intelligence. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 3987– 3995. JMLR. org, 2017.
262
+ Victor Zhong, Caiming Xiong, and Richard Socher. Seq2sql: Generating structured queries from natural language using reinforcement learning. arXiv preprint arXiv:1709.00103, 2017.
263
+
264
+ A TASKS, DATASET, AND METRICS
265
+
266
+ Five tasks and their corresponding datasets from decaNLP (Bryan McCann & Socher, 2018):
267
+
268
+ Question Answering – Stanford Question Answering Dataset (SQuAD) (Rajpurkar et al., 2016): This dataset consists of context, questions, and answers. The context is paragraphs from English Wikipedia, and the answers are spans from its corresponding question paragraphs. For evaluation, we use the normalized F1 score (nF1), which strips out articles and punctuation as in Bryan McCann & Socher (2018). Test datasets in this task are hidden from the host so that users must upload models to their platform to generate the test results; due to this inconvenience and our many models, we elected to use the development set to test the metric. Note that we do not use the development set in the training process. The size of the training set is 87,599 while that of the development set is 10,570.
269
+
270
+ • Semantic Parsing – WikiSQL (Zhong et al., 2017): In this task, normal sentences are translated into SQL-structured SQL queries. WikiSQL provides logical forms along with natural language utterances. The exact match of the logical forms (lfEM) is used to evaluate the performance. The model outputs are required to be matched the SQL format. Otherwise, its won’t get any score. The size of the training set is 56,355; that of the test set is 15,878.
271
+
272
+ • Sentiment Analysis – Stanford Sentiment Treebank (SST, binary version) (Radford et al., 2017): This dataset consists of movie reviews with its answers, including positive and negative binary options. The exact match score is used as the metric. The size of the training set is 6,920; that of the test set is 1,821.
273
+
274
+ • Semantic Role Labeling – QA-SRL (He et al., 2017): QA-SRL is a question answering form of the SRL task. The normalized F1 (nF1) score is used. The size of the training set is 6,414; that of the test set is 2,201.
275
+
276
+ • Goal-Oriented Dialogue – English Wizard of Oz (WOZ) (Wen et al., 2016): WOZ is a restaurant reservation task that provides a predefined ontology of a series of information for helping an agent to make reservations for customers. To keep track of the dialogue state, turn-based dialogue state EM (dsEM), which requires the model outputs exactly follow the characters’ conversation order, is used for judgment. The size of the training set is 2,536; that of the test set is 1,646.
277
+
278
+ Four text classification tasks and five datasets from MBPA $^ { + + }$ (dAutume et al. 2019):
279
+
280
+ • News Classification – AGNews: News articles to be classified into 4 classes.
281
+ • Sentiment Analysis – Yelp and Amazon: Customer reviews and ratings on Yelp and Amazon. Both datasets include 5 classes. Wikipedia Article Classification – DBPedia: Articles and their corresponding categories on Wikipedia, including 14 classes.
282
+ Questions and Answers Categorization – Yahoo: Questions and answers on the Yahoo! platform, including 10 classes.
283
+
284
+ The dataset collected by Xiang Zhang (2015) is available at http://goo.gl/JyCnZq. Given the unbalanced dataset sizes, we randomly sample 115,000 training examples and 7,600 test examples from all the datasets per d’Autume et al. (2019). All the tasks use exact match accuracy as the evaluation metric.
285
+
286
+ ![](images/911e6b4f02ab88dee55f45e36a773a1eb1410ee756b1728c3c9668741df0ded8.jpg)
287
+ Figure 5: Overview of the forgetting progress for different methods and permuted orders. The blue line indicate the scores of the first task after training each task. The orange line corresponds to that of the second task.
288
+
289
+ # C REVERSE ORDER OF FIVE DECANLP TASKS
290
+
291
+ <table><tr><td>Fine-tuned</td><td>MAS</td><td>LAMOLGO5 0.05</td><td>LAMOLGEN 0.2</td><td>LAMOLTAOSK 0.05</td><td>LAMOLTASsK 0.2</td><td>LAMOLREAL 0.05</td><td>LAMOLREAL 0.2</td><td>Multitasked</td></tr><tr><td>45.4</td><td>44.7</td><td>63.2</td><td>73.0</td><td>75.3</td><td>76.9</td><td>75.9</td><td>78.2</td><td>76.6</td></tr></table>
292
+
293
+ Table 6: Summary of averaged score on reversed five tasks. The scores are reported as the averaged score over all tasks of the models after training on every task. The rightmost three columns – LAMOL with $\gamma = 0 . 0 5$ and $\gamma = 0 . 2$ of real samples from previous tasks. Best performance in boldface.
294
+
295
+ ![](images/213270af153d5e5188969e07642a9131e1781328bf66f4215021ab11ef247b2a.jpg)
296
+ Figure 6: Training progress of the five tasks with reverse order, i.e. small to large. The graph records the performance of the model at each epoch of each tasks. The order of tasks in the progress follows: WOZ, QA-SRL, SST, WikiSQL, and then SQuAD. From the figure, we can clearly see that Fine-tune and MAS completely forget WOZ and WikiSQL.
297
+
298
+ # D GENERATED EXAMPLES
299
+
300
+ # Normal Examples
301
+
302
+ squad1 The United States has been accused of a wide ranging war in Afghanistan since 9 / 11. During the campaign, US forces in Afghanistan were involved in an extensive air campaign. At least 1,600 American servicemen and women were killed, while more than 1,600 civilians were injured. After the US-led invasion of Afghanistan on 12 / 11 / 2001, an estimated 10,000 American soldiers were killed in combat.What were the targets included in the conflict? ans Afghanistan
303
+
304
+ squad1 In 1849, the French army was forced to withdraw, and the French were finally expelled, although it was not until late November that the French recaptured most of their territories. French troops then reached Egypt. On 21 January 1852 (the year after he left), in Cairo, they captured Tripoli, Benghazi, Benghazi, and the eastern part of Libya. After Gaddafi’s return to office, he established the Gaddafi regime. On 13 February 1856, the Gaddafi family relocated to Egypt. On 13 May 1857, the army was forced to withdraw from Libya, and the army returned to Benghazi.On whom did Gaddafi’s army return to Benghazi? ans Gaddafi’s family
305
+
306
+ wikisql the table has columns rank, athlete, sport, nation, gold, silver and key words max, min, count, sum, avg, =, >, <, op, select, where, and, col, table, caption, page, section, op, cond, question, agg, aggops, condops - - what is the nation when they have the rank 10 and the gold is 6?what is the translation from english to sql? ans select nation from table where rank $= I O$ and gold $= 6$
307
+
308
+ wikisql the table has columns home team, home team score, away team, away team score, venue, crowd, date and key words max, min, count, sum, avg, $=$ , >, <, op, select, where, and, col, table, caption, page, section, op, cond, question, agg, aggops, condops - - what is the home team’s score when they played at richfield?what is the translation from english to sql? ans select home team score from table where venue $=$ richfield
309
+
310
+ sst it’s a movie that’s not worth a look.is this review negative or positive? ans negative sst it’s an ugly movie about an old man who’s been given power by a new god to bring about a new era.is this review negative or positive? ans negative
311
+
312
+ srl in a statement on his official page, juan valderrama said that the president’s nominees would be appointed by the president and confirmed by the national senate.who might be appointed? ans president
313
+
314
+ srl the first two films, released on august 21, 1999, are the first in a line of films that were made by two different people, each of whom worked in tandem on the film.what was released? ans the first two films
315
+
316
+ # Examples of Chaos
317
+
318
+ squad1 the table has columns rank ( nation ), gold, silver, bronze, total and key words max, min, count, sum, avg, $=$ , >, <, op, select, where, and, col, table, caption, page, section, op, cond, question, agg, aggops, condops - - which total has a gold smaller than 2, and has the lowest rank of bronze of 3?what is the translation from english to sql? ans select min total from table where gold $< 2$ and bronze $= 3$
319
+
320
+ squad1 In addition to the role played by the main characters, the main cast members are played by the same cast members who were in season one of the original series.is this review negative or positive? ans positive
321
+
322
+ wikisql it’s a shame that the story doesn’t end with a good ending, but it certainly means the world to me.is this review negative or positive? ans positive
323
+
324
+ wikisql on the same day, june 19, 2012, former heavyweight champion arthur lang defended his title against alexander green in the final of the world heavyweight championship.what did someone defend? ans his title
325
+
326
+ sst at this point, he was only twenty - five years old at the time of his first appearance on the mcf tv series.who was something twenty - five years old? ans he
327
+
328
+ sst on paper, the movie’s two most fascinating characters are two peas in the same class, both of whom have made an appearance in this film.who did something feature? ans two most fascinating characters
329
+
330
+ srl a popular seasonal film in austrian films and the most influential in the history of cinema.is this review negative or positive? ans positive
331
+
332
+ srl it’s not a bad film, it’s just not as good as you’ve seen it before.is this review negative or positive? ans negative
333
+
334
+ Table 7: Examples generated by LAMOL with task-specific tokens. Annotations squad1 wikisql , $_ { -- } s s t _ { -- } , \ _ { - } s r l _ { -- }$ correspond to each task-specific token of SQuAD, WikiSQL, SST, and QA-SRL, respectively. ans is the ANS token that separates the question from the answer. The upper frame shows the normal situation whereas the lower frame shows generated contents that are inconsistent with their task-specific token.
parse/train/Skgxcn4YDS/Skgxcn4YDS_content_list.json ADDED
@@ -0,0 +1,1782 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "LAMOL: LANGUAGE MODELING FORLIFELONG LANGUAGE LEARNING",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 173,
8
+ 98,
9
+ 642,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Fan-Keng Sun∗ † MIT Cambridge, MA, USA fankeng@mit.edu ",
17
+ "bbox": [
18
+ 183,
19
+ 170,
20
+ 333,
21
+ 226
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Cheng-Hao Ho∗ \nNational Taiwan University Taipei, Taiwan \njojotenya@gmail.com Hung-Yi Lee \nNational Taiwan University Taipei, Taiwan \nhungyilee@ntu.edu.tw ",
28
+ "bbox": [
29
+ 370,
30
+ 170,
31
+ 560,
32
+ 227
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "",
39
+ "bbox": [
40
+ 596,
41
+ 170,
42
+ 794,
43
+ 227
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "ABSTRACT ",
50
+ "text_level": 1,
51
+ "bbox": [
52
+ 454,
53
+ 262,
54
+ 544,
55
+ 277
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "Most research on lifelong learning applies to images or games, but not language. We present LAMOL, a simple yet effective method for lifelong language learning (LLL) based on language modeling. LAMOL replays pseudo-samples of previous tasks while requiring no extra memory or model capacity. Specifically, LAMOL is a language model that simultaneously learns to solve the tasks and generate training samples. When the model is trained for a new task, it generates pseudo-samples of previous tasks for training alongside data for the new task. The results show that LAMOL prevents catastrophic forgetting without any sign of intransigence and can perform five very different language tasks sequentially with only one model. Overall, LAMOL outperforms previous methods by a considerable margin and is only $2 \\mathrm {- } 3 \\%$ worse than multitasking, which is usually considered the LLL upper bound. The source code is available at https://github.com/jojotenya/LAMOL. ",
62
+ "bbox": [
63
+ 233,
64
+ 295,
65
+ 764,
66
+ 476
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "1 INTRODUCTION ",
73
+ "text_level": 1,
74
+ "bbox": [
75
+ 176,
76
+ 505,
77
+ 336,
78
+ 520
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "The current dominant paradigm for machine learning is to run an algorithm on a given dataset to produce a trained model specifically for a particular purpose; this is isolated learning (Chen & Liu, 2016, p. 150). In isolated learning, the model is unable to retain and accumulate the knowledge it has learned before. When a stream of tasks are joined to be trained sequentially, isolated learning faces catastrophic forgetting (McCloskey & Cohen, 1989) due to a non-stationary data distribution that biases the model (left figure of Figure 1). In contrast, lifelong learning is designed to address a stream of tasks by accumulating interconnected knowledge between learned tasks and retaining the performance of those tasks. A human easily achieves lifelong learning, but this is nontrivial for a machine; thus lifelong learning is a vital step toward artificial general intelligence. ",
85
+ "bbox": [
86
+ 174,
87
+ 536,
88
+ 825,
89
+ 662
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "In this paper, we focus on lifelong language learning, where a machine achieves lifelong learning on a stream of natural language processing (NLP) tasks. To the best of our knowledge, lifelong language learning has been studied in only a few instances; for sentiment analysis (Chen et al., 2015b; Xia et al., 2017), conversational agents (Lee, 2017), word representation learning (Xu et al., 2018), sentence representation learning (Liu et al., 2019), text classification, and question answering (d’Autume et al., 2019). However, in all previous work, the tasks in the stream are essentially the same task but in different domains. To achieve lifelong language learning on fundamentally different tasks, we propose LAMOL — LAnguage MOdeling for Lifelong language learning. ",
96
+ "bbox": [
97
+ 174,
98
+ 669,
99
+ 825,
100
+ 781
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "It has been shown that many NLP tasks can be considered question answering (QA) (Bryan McCann & Socher, 2018). Therefore, we address multiple NLP tasks with a single model by training a language model (LM) that generates an answer based on the context and the question. Treating QA as language modeling is beneficial because the LM can be pre-trained on a large number of sentences without any labeling (Radford et al., 2019); however, this does not directly solve the problem of LLL. If we train an LM on a stream of tasks, catastrophic forgetting still occurs. However, as an LM is intrinsically a text generator, we can use it to answer questions while generating pseudo-samples of the previous task to be replayed later. LAMOL is inspired by the data-based approach for LLL in which a generator learns to generate samples in previous tasks (middle of Figure 1) (Hanul Shin & Kim, 2017; Kemker & Kanan, 2017). In contrast to previous approaches, LAMOL needs no extra generator (right of Figure 1). LAMOL is also similar to multitask training, but the model itself generates data from previous tasks instead of using real data. ",
107
+ "bbox": [
108
+ 174,
109
+ 787,
110
+ 825,
111
+ 885
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "image",
117
+ "img_path": "images/943211a3cb25682c23c6e6dff3717feab3dad83cd4d165dd2f89aad789f51c4b.jpg",
118
+ "image_caption": [
119
+ "Figure 1: Left: After learning Task 2, the learner has already forgetten how to solve Task 1. This is “catastrophic forgetting”. Middle: The basic idea of the data-based LLL approach. A generator is learned to generate examples it has seen before. Using the generator, the learner also learns from examples from the previous task to prevent it from forgetting. Right: A language model that simultaneously takes on the roles of learner and generator. "
120
+ ],
121
+ "image_footnote": [],
122
+ "bbox": [
123
+ 189,
124
+ 102,
125
+ 808,
126
+ 229
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "",
133
+ "bbox": [
134
+ 174,
135
+ 343,
136
+ 825,
137
+ 414
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "Our main contributions in this paper are: ",
144
+ "bbox": [
145
+ 176,
146
+ 420,
147
+ 439,
148
+ 435
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "• We present LAMOL, a simple yet effective method for LLL. Our method has the advantages of no requirements in terms of extra memory or model capacity. We also do not need to know how many tasks to train in advance and can always train on additional tasks when needed. \n• Experimental results show that our methods outperform baselines and other state-of-the-art methods by a considerable margin and approaches the multitasking upper bound within $2 \\mathrm { - } 3 \\%$ . \n• Furthermore, we propose adding task-specific tokens during pseudo-sample generation to evenly split the generated samples among all previous tasks. This extension stabilizes LLL and is particularly useful when training on a large number of tasks. \n• We analyze how different amounts of pseudo-samples affect the final performance of LAMOL, considering results both with and without the task-specific tokens. \n• We open-source our code to facilitate further LLL research. ",
155
+ "bbox": [
156
+ 173,
157
+ 449,
158
+ 826,
159
+ 636
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "2 RELATED WORK ",
166
+ "text_level": 1,
167
+ "bbox": [
168
+ 176,
169
+ 660,
170
+ 344,
171
+ 676
172
+ ],
173
+ "page_idx": 1
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "Lifelong learning research is based on regularization, architecture, or data. Here is a brief survey of works in these three categories. ",
178
+ "bbox": [
179
+ 174,
180
+ 694,
181
+ 823,
182
+ 722
183
+ ],
184
+ "page_idx": 1
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "2.1 REGULARIZATION-BASED METHODS ",
189
+ "text_level": 1,
190
+ "bbox": [
191
+ 176,
192
+ 743,
193
+ 465,
194
+ 757
195
+ ],
196
+ "page_idx": 1
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "In this approach, a constraint, i.e., a regularization term, is added to minimize deviation from trained weights while updating the weights in a new task. Most regularization based methods estimate the importance of each parameter and add the importance as a constraint to the loss function. Elastic weight consolidation (EWC) (Kirkpatrick et al., 2017) calculates a Fisher information matrix to estimate the sensitivity of parameters as importance. Online EWC (Schwarz et al., 2018) is a transformed version of EWC. Instead of tracking the importance of parameters for each task, online EWC simply accumulates the importance of the stream of tasks. Synaptic intelligence (SI) (Zenke et al., 2017) assigns importance to each parameter according to its contribution to the change in the total loss. Memory aware synapses (MAS) (Aljundi et al., 2018) estimate importance via the gradients of the model outputs. In contrast to estimating the importance of weights, incremental moment matching (IMM) (Lee et al., 2017) matches the moment of weights between different tasks. ",
201
+ "bbox": [
202
+ 174,
203
+ 770,
204
+ 825,
205
+ 924
206
+ ],
207
+ "page_idx": 1
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "2.2 ARCHITECTURE-BASED METHODS ",
212
+ "text_level": 1,
213
+ "bbox": [
214
+ 176,
215
+ 104,
216
+ 450,
217
+ 117
218
+ ],
219
+ "page_idx": 2
220
+ },
221
+ {
222
+ "type": "text",
223
+ "text": "For this category, the main idea is to assign a dedicated capacity inside a model for each task. After completing a task, the weights are frozen and may not be changed thereafter. Some methods allow models to expand, whereas some fix the size but must allocate capacity for tasks at the beginning. Progressive neural networks (Rusu et al., 2016) utilize one column of the neural network per task. Once a new task is trained, progressive neural networks augment a new column of the neural network for the task while freezing the past trained columns. Columns that have been frozen are not allowed to change but are connected to the new column to transfer knowledge from old tasks. Towards Training Recurrent Neural Networks for Lifelong Learning (Sodhani et al., 2018) unifies Gradient episodic memory (Lopez-Paz et al., 2017) and Net2Net (Chen et al., 2015a). Using the curriculumbased setting, the model learns the tasks in easy-to-hard order. The model alleviates the forgetting problem by GEM method, and if it fails to learn the current task and has not been expanded yet, the model will expand to a larger model by the Net2Net approach. ",
224
+ "bbox": [
225
+ 174,
226
+ 132,
227
+ 825,
228
+ 299
229
+ ],
230
+ "page_idx": 2
231
+ },
232
+ {
233
+ "type": "text",
234
+ "text": "PathNet (Fernando et al., 2017) reuses subsets of a neural network to transfer knowledge between tasks. Unlike progressive neural networks, PathNet does not allow the model to expand. Instead, it builds a huge fixed-size model composed of a neural network and paths between different layers of the neural networks. While training a task, it selects the best combination of neural networks and paths for that particular task. Similar to progressive neural networks, selected parts are fixed to allow only inference and not training. Inspired by network pruning, PackNet (Mallya & Lazebnik, 2018) prunes and re-trains the network iteratively to pack numerous tasks into a single huge model. ",
235
+ "bbox": [
236
+ 174,
237
+ 306,
238
+ 825,
239
+ 405
240
+ ],
241
+ "page_idx": 2
242
+ },
243
+ {
244
+ "type": "text",
245
+ "text": "This category has some drawbacks. When resources are limited, model expansion is prohibited. Also, some architecture-based methods require the number of tasks in advance to allocate the capacity for the tasks, which greatly reduces their practicality. ",
246
+ "bbox": [
247
+ 176,
248
+ 411,
249
+ 823,
250
+ 453
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "2.3 DATA-BASED METHODS ",
257
+ "text_level": 1,
258
+ "bbox": [
259
+ 176,
260
+ 479,
261
+ 379,
262
+ 493
263
+ ],
264
+ "page_idx": 2
265
+ },
266
+ {
267
+ "type": "text",
268
+ "text": "This method restricts weights through the data distribution of old tasks. One data-based approach keeps a small amount of real samples from old tasks, and the other distills the knowledge from old data and imagines pseudo-data of old tasks later on. While training a new task, the data or pseudo-data is used to prevent weights from greatly deviating from the previous status. ",
269
+ "bbox": [
270
+ 174,
271
+ 508,
272
+ 823,
273
+ 564
274
+ ],
275
+ "page_idx": 2
276
+ },
277
+ {
278
+ "type": "text",
279
+ "text": "Gradient episodic memory (GEM) (Lopez-Paz et al., 2017) preserves a subset of real samples from previous tasks. Utilizing these real samples during optimization helps somewhat to constrain parameter gradients. Averaged-GEM (A-GEM) (Chaudhry et al., 2018) is a more efficient version of GEM which achieves the same or even better performance than the original GEM. Learning without forgetting (Li & Hoiem, 2017) minimizes the alteration of shared parameters by recording the outputs from old task modules on data from the new task before updating. Hanul Shin & Kim (2017) and Kemker & Kanan (2017) encode data from old tasks into a generative model system. The latter imitates the dual-memory system of the human brain, in that the model automatically decides which memory should be consolidated. Both methods replay pseudo-data of previous tasks using the generative model during training. ",
280
+ "bbox": [
281
+ 174,
282
+ 571,
283
+ 825,
284
+ 710
285
+ ],
286
+ "page_idx": 2
287
+ },
288
+ {
289
+ "type": "text",
290
+ "text": "d’Autume et al. (2019) investigates the performance of the episodic memory system on NLP problems. It distills the knowledge of previous tasks into episodic memory and replays it afterward. This work evaluates the method on two streams of tasks: question answering and text classification. ",
291
+ "bbox": [
292
+ 176,
293
+ 718,
294
+ 825,
295
+ 760
296
+ ],
297
+ "page_idx": 2
298
+ },
299
+ {
300
+ "type": "text",
301
+ "text": "3 LAMOL ",
302
+ "text_level": 1,
303
+ "bbox": [
304
+ 176,
305
+ 803,
306
+ 279,
307
+ 819
308
+ ],
309
+ "page_idx": 2
310
+ },
311
+ {
312
+ "type": "text",
313
+ "text": "A pre-trained LM can generate a coherent sequence of text given a context. Thus, we propose LAMOL, a method of training a single LM that learns not only to answer the question given the context but also to generate the context, the question, and the answer given a generation token. That is, in LAMOL, a model plays the role of both LM and QA model. Hence, answering questions and generating pseudo-old samples can both be done by a single model. During LLL, these pseudo-old samples are trained with new samples from new tasks to help mitigate catastrophic forgetting. ",
314
+ "bbox": [
315
+ 174,
316
+ 840,
317
+ 825,
318
+ 924
319
+ ],
320
+ "page_idx": 2
321
+ },
322
+ {
323
+ "type": "image",
324
+ "img_path": "images/e1b62c928eeed01c6505bb09c1f94b5828fc74de029902eff5952bdcaef728e9.jpg",
325
+ "image_caption": [
326
+ "Figure 2: Upper: LM learns to answer question given context. Lower: LM learns to generate training samples given generation token GEN. "
327
+ ],
328
+ "image_footnote": [],
329
+ "bbox": [
330
+ 354,
331
+ 101,
332
+ 643,
333
+ 270
334
+ ],
335
+ "page_idx": 3
336
+ },
337
+ {
338
+ "type": "text",
339
+ "text": "3.1 DATA FORMATTING ",
340
+ "text_level": 1,
341
+ "bbox": [
342
+ 176,
343
+ 340,
344
+ 349,
345
+ 354
346
+ ],
347
+ "page_idx": 3
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "Inspired by the protocol used by decaNLP (Bryan McCann & Socher, 2018), samples from the datasets we used are framed into a SQuAD-like scheme, which consists of context, question, and answer. Although the LM is simultaneously a QA model, the data format depends on the training objective. When training as a QA model, the LM learns to decode the answer after reading the context and question. On the other hand, when training as an LM, the LM learns to decode all three parts given a generation token. ",
352
+ "bbox": [
353
+ 174,
354
+ 366,
355
+ 825,
356
+ 449
357
+ ],
358
+ "page_idx": 3
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "In addition to context, question, and answer, we add three special tokens: ",
363
+ "bbox": [
364
+ 174,
365
+ 457,
366
+ 651,
367
+ 472
368
+ ],
369
+ "page_idx": 3
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "ANS Inserted between question and answer. As the context and question are known during inference, decoding starts after inputting ANS. ",
374
+ "bbox": [
375
+ 174,
376
+ 483,
377
+ 825,
378
+ 512
379
+ ],
380
+ "page_idx": 3
381
+ },
382
+ {
383
+ "type": "text",
384
+ "text": "EOS The last token of every example. Decoding stops when EOS is encountered. ",
385
+ "bbox": [
386
+ 176,
387
+ 515,
388
+ 715,
389
+ 531
390
+ ],
391
+ "page_idx": 3
392
+ },
393
+ {
394
+ "type": "text",
395
+ "text": "GEN The first token during pseudo-sample generation. Decoding starts after inputting GEN. ",
396
+ "bbox": [
397
+ 176,
398
+ 535,
399
+ 785,
400
+ 549
401
+ ],
402
+ "page_idx": 3
403
+ },
404
+ {
405
+ "type": "text",
406
+ "text": "The data formats for QA and LM training are shown in Figure 2. ",
407
+ "bbox": [
408
+ 174,
409
+ 560,
410
+ 598,
411
+ 575
412
+ ],
413
+ "page_idx": 3
414
+ },
415
+ {
416
+ "type": "text",
417
+ "text": "3.2 TRAINING ",
418
+ "text_level": 1,
419
+ "bbox": [
420
+ 176,
421
+ 592,
422
+ 287,
423
+ 607
424
+ ],
425
+ "page_idx": 3
426
+ },
427
+ {
428
+ "type": "text",
429
+ "text": "Assume a stream of tasks $\\{ T _ { 1 } , T _ { 2 } , \\dots \\}$ , where the number of tasks may be unknown. Directly training the LM on these tasks sequentially results in catastrophic forgetting. Thus, before beginning training on a new task $T _ { i } , i > 1$ , the model first generates pseudo samples $\\boldsymbol { T } _ { i } ^ { ' }$ by top- $k$ sampling that represent the data distribution of previous tasks $T _ { 1 } , \\dots , T _ { i - 1 }$ . Then, the LM trains on the mixture of $T _ { i }$ and $\\boldsymbol { T } _ { i } ^ { ' }$ . To balance the ratio between $\\left| T _ { i } \\right|$ and $| T _ { i } ^ { ' } |$ , the LM generates $\\gamma | T _ { i } |$ pseudo samples, where $\\left| T _ { i } \\right|$ denotes the number of samples in task $T _ { i }$ and $\\gamma$ is the sampling ratio. If the generated sample does not have exactly one ANS in it, then the sample is discarded. This happens in only $0 . 5 \\% - 1 \\%$ of generated samples. ",
430
+ "bbox": [
431
+ 174,
432
+ 617,
433
+ 825,
434
+ 734
435
+ ],
436
+ "page_idx": 3
437
+ },
438
+ {
439
+ "type": "text",
440
+ "text": "During training, each sample is formatted into both the QA format and the LM format. Then, in the same optimization step, both formats are fed into the LM to minimize the QA loss $L _ { \\mathrm { Q A } }$ and LM loss $L _ { \\mathrm { L M } }$ together. Overall, the loss is $L = L _ { \\mathrm { Q A } } + \\lambda L _ { \\mathrm { L M } }$ , where $\\lambda$ is the weight of the LM loss. ",
441
+ "bbox": [
442
+ 174,
443
+ 741,
444
+ 823,
445
+ 784
446
+ ],
447
+ "page_idx": 3
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "3.3 TASK-SPECIFIC TOKENS ",
452
+ "text_level": 1,
453
+ "bbox": [
454
+ 176,
455
+ 800,
456
+ 380,
457
+ 814
458
+ ],
459
+ "page_idx": 3
460
+ },
461
+ {
462
+ "type": "text",
463
+ "text": "Using the same GEN token for all tasks is problematic when training for many tasks because the portion of old tasks decreases exponentially in theory. For instance, if $\\gamma = 0 . 0 1$ , then the portion of the first task when training the second task is about $1 \\%$ , but is only about $0 . 0 1 \\%$ when training the third task. This issue is definitely harmful to LLL. To mitigate this, we can choose to replace the GEN token with a task-specific token for each task to inform the model to generate pseudo-samples belonging to the specific task. Under this setup, all previous tasks have the same share of the $\\gamma | T _ { i } |$ generated pseudo samples. That is, when beginning training for the $i$ -th task $T _ { i }$ , we generate $\\frac { \\gamma } { i - 1 } | T _ { i } |$ ",
464
+ "bbox": [
465
+ 173,
466
+ 825,
467
+ 825,
468
+ 924
469
+ ],
470
+ "page_idx": 3
471
+ },
472
+ {
473
+ "type": "table",
474
+ "img_path": "images/57e2c2b516923c91433e27d80d239a5ef5e971031d52f274ac6ea2b19fbdf2e7.jpg",
475
+ "table_caption": [
476
+ "Table 1: Summary of tasks, datasets, dataset sizes, and their corresponding metrics. As this work uses no development set, only the training and test datasets are shown. nF1 is the normalized version of the F1 score; EM represents an exact match between texts: for text classification, this amounts to accuracy; for WOZ, it is equivalent to dfEM (turn-based dialogue state exact match); for WikiSQL, it is equivalent to lfEM (exact match of logical forms). "
477
+ ],
478
+ "table_footnote": [],
479
+ "table_body": "<table><tr><td>Task</td><td>Dataset</td><td># Train # Test Metric</td><td></td><td></td></tr><tr><td rowspan=\"3\">Question answering Semantic parsing Sentiment analysis Semantic role labeling Goal-oriented dialogue</td><td>SQuAD</td><td>87599</td><td>10570</td><td>nF1</td></tr><tr><td>WikiSQL SST</td><td>56355 6920</td><td>15878 1821</td><td>1fEM EM</td></tr><tr><td>QA-SRL WOZ</td><td>6414 2536</td><td>2201 1646</td><td>nF1 dsEM</td></tr><tr><td>Text classification</td><td>AGNews Amazon Yahoo Yelp</td><td>DBPedia 115000</td><td>7600</td><td>EM</td></tr></table>",
480
+ "bbox": [
481
+ 333,
482
+ 101,
483
+ 663,
484
+ 250
485
+ ],
486
+ "page_idx": 4
487
+ },
488
+ {
489
+ "type": "table",
490
+ "img_path": "images/2fa08a88fc6323c85175ad02f7948979872dea40da49e4b4836170db905ab47e.jpg",
491
+ "table_caption": [],
492
+ "table_footnote": [],
493
+ "table_body": "<table><tr><td></td><td>SQuAD</td><td>WikiSQL</td><td>SST</td><td>SRL</td><td>WOZ</td><td>AGNews</td><td>Amazon</td><td>DBPedia</td><td>Yahoo</td><td>Yelp</td></tr><tr><td>GPT-2 score</td><td>72.3</td><td>70.7</td><td>90.9</td><td>70.4</td><td>84.9</td><td>94.6</td><td>62.3</td><td>99.1</td><td>73.9</td><td>67.7</td></tr><tr><td>Other scores</td><td>75.5</td><td>72.6</td><td>88.1</td><td>75.2</td><td>84.4</td><td>93.8</td><td>60.1</td><td>30.5</td><td>68.6</td><td>50.7</td></tr></table>",
494
+ "bbox": [
495
+ 174,
496
+ 343,
497
+ 825,
498
+ 393
499
+ ],
500
+ "page_idx": 4
501
+ },
502
+ {
503
+ "type": "text",
504
+ "text": "Table 2: Comparison of GPT-2 and other methods on single task scores. Other scores are retrieved from Bryan McCann & Socher (2018) or d’Autume et al. (2019). Better performance in boldface. ",
505
+ "bbox": [
506
+ 173,
507
+ 404,
508
+ 823,
509
+ 433
510
+ ],
511
+ "page_idx": 4
512
+ },
513
+ {
514
+ "type": "text",
515
+ "text": "for the previous $i - 1$ tasks. Note that as each task uses a specific token, the vocabulary size and the embedding weight of the LM increase slightly as more tasks are trained. ",
516
+ "bbox": [
517
+ 173,
518
+ 457,
519
+ 823,
520
+ 484
521
+ ],
522
+ "page_idx": 4
523
+ },
524
+ {
525
+ "type": "text",
526
+ "text": "4 EXPERIMENT SETUP ",
527
+ "text_level": 1,
528
+ "bbox": [
529
+ 176,
530
+ 505,
531
+ 377,
532
+ 521
533
+ ],
534
+ "page_idx": 4
535
+ },
536
+ {
537
+ "type": "text",
538
+ "text": "4.1 TASKS, DATASETS, AND METRICS ",
539
+ "text_level": 1,
540
+ "bbox": [
541
+ 176,
542
+ 536,
543
+ 444,
544
+ 550
545
+ ],
546
+ "page_idx": 4
547
+ },
548
+ {
549
+ "type": "text",
550
+ "text": "We collect five disparate tasks mentioned in decaNLP (Bryan McCann & Socher, 2018): question answering, semantic parsing, sentiment analysis, semantic role labeling, and goal-oriented dialogue, with a dataset for each task. ",
551
+ "bbox": [
552
+ 174,
553
+ 561,
554
+ 825,
555
+ 603
556
+ ],
557
+ "page_idx": 4
558
+ },
559
+ {
560
+ "type": "text",
561
+ "text": "Furthermore, to compare our method with d’Autume et al. (2019), we conducted experiments on four text classification tasks: news classification, sentiment analysis, Wikipedia article classification, and question-and-answer categorization with five datasets. We use the procedure from d’Autume et al. (2019) to produce equal-sized datasets. ",
562
+ "bbox": [
563
+ 174,
564
+ 611,
565
+ 825,
566
+ 666
567
+ ],
568
+ "page_idx": 4
569
+ },
570
+ {
571
+ "type": "text",
572
+ "text": "We do not train on all datasets from both papers due to a lack of computational resources. For each task, there is a corresponding evaluation metric. Table 1 contains a summary of tasks, datasets, and metrics. Additional details are provided in Appendix A. Note that the score of any metric lies between 0 and $100 \\%$ . ",
573
+ "bbox": [
574
+ 174,
575
+ 674,
576
+ 825,
577
+ 729
578
+ ],
579
+ "page_idx": 4
580
+ },
581
+ {
582
+ "type": "text",
583
+ "text": "4.2 METHODS TO BE COMPARED ",
584
+ "text_level": 1,
585
+ "bbox": [
586
+ 176,
587
+ 746,
588
+ 413,
589
+ 761
590
+ ],
591
+ "page_idx": 4
592
+ },
593
+ {
594
+ "type": "text",
595
+ "text": "All methods use the smallest pre-trained GPT-2 model (Radford et al., 2019)1 as the LM. Each task is trained for nine epochs; greedy decoding is applied during inference. ",
596
+ "bbox": [
597
+ 174,
598
+ 772,
599
+ 823,
600
+ 801
601
+ ],
602
+ "page_idx": 4
603
+ },
604
+ {
605
+ "type": "text",
606
+ "text": "• LAMOL In all experiments, $k = 2 0$ in top- $k$ sampling and $\\lambda = 0 . 2 5$ for weight of the LM loss are set. $\\mathrm { L A M O L } _ { \\mathrm { G E N } } ^ { \\gamma }$ denotes LAMOL with a sampling ratio of $\\gamma$ , and the same GEN token is used for all tasks. If the task-specific tokens are used, GEN is replaced by TASK. • Keep real data Pseudo-samples are replaced by real samples from previous tasks. The quantity of real samples is equally split between previous tasks. This approach can be considered the upper bound of LAMOL. We denote it as LAMOLγREAL. ",
607
+ "bbox": [
608
+ 173,
609
+ 811,
610
+ 826,
611
+ 901
612
+ ],
613
+ "page_idx": 4
614
+ },
615
+ {
616
+ "type": "table",
617
+ "img_path": "images/945d7ac6342915d2fcdee3be7f3aab1c9af7926a2b2f9c24d156627a86f8150e.jpg",
618
+ "table_caption": [
619
+ "Table 3: Summary of averaged metric scores for different methods under permuted task orders using models at last epoch of last task. The Average and Std columns respectively are the average and standard deviation of the averaged scores for each row of the methods. Multitasked learning as an upper bound is shown at the bottom. "
620
+ ],
621
+ "table_footnote": [],
622
+ "table_body": "<table><tr><td>Methods</td><td>SST SRL WOZ</td><td>SST WOZ SRL</td><td>SRL SST WOZ</td><td>SRL WOZ SST</td><td>WOZ SST SRL</td><td>WOZ SRL SST</td><td>Average</td><td>Std</td></tr><tr><td>Fine-tuned</td><td>50.2</td><td>24.7</td><td>62.9</td><td>31.3</td><td>32.8</td><td>33.9</td><td>39.3</td><td>12</td></tr><tr><td>EWC</td><td>50.6</td><td>48.4</td><td>64.7</td><td>35.5</td><td>43.9</td><td>39.0</td><td>47.0</td><td>8.7</td></tr><tr><td>MAS</td><td>36.5</td><td>45.3</td><td>56.6</td><td>31.0</td><td>49.7</td><td>30.8</td><td>41.6</td><td>8.9</td></tr><tr><td>GEM</td><td>50.4</td><td>29.8</td><td>63.3</td><td>32.6</td><td>44.1</td><td>36.3</td><td>42.8</td><td>11</td></tr><tr><td>LAMOLG GEN</td><td>46.5</td><td>36.6</td><td>56.6</td><td>38.6</td><td>44.9</td><td>45.2</td><td>44.8</td><td>6.0</td></tr><tr><td>LAMOL 0.05 GN</td><td>79.6</td><td>78.9</td><td>73.1</td><td>73.7</td><td>68.6</td><td>75.7</td><td>74.9</td><td>3.4</td></tr><tr><td>LAMOLGEN</td><td>80.0</td><td>80.7</td><td>79.6</td><td>78.7</td><td>78.4</td><td>80.5</td><td>79.7</td><td>0.8</td></tr><tr><td>LAMOLTASK 0</td><td>41.0</td><td>33.5</td><td>50.1</td><td>41.9</td><td>49.3</td><td>41.5</td><td>42.9</td><td>5.2</td></tr><tr><td>LAMOL 0.05 TASK</td><td>77.3</td><td>76.9</td><td>78.1</td><td>74.7</td><td>73.4</td><td>75.8</td><td>76.0</td><td>1.5</td></tr><tr><td>LAMOL TASK</td><td>79.4</td><td>79.9</td><td>80.1</td><td>78.7</td><td>79.8</td><td>79.0</td><td>79.5</td><td>0.5</td></tr><tr><td>LAMOL 0.05</td><td>81.0</td><td>78.9</td><td>80.1</td><td>80.9</td><td>77.7</td><td>78.0</td><td>79.4</td><td>1.2</td></tr><tr><td>LAMOLR0AL</td><td>81.8</td><td>80.6</td><td>81.6</td><td>81.2</td><td>80.4</td><td>80.5</td><td>81.0</td><td>0.5</td></tr><tr><td colspan=\"3\">Multitasked</td><td></td><td>81.5</td><td></td><td></td><td></td><td></td></tr></table>",
623
+ "bbox": [
624
+ 173,
625
+ 101,
626
+ 825,
627
+ 296
628
+ ],
629
+ "page_idx": 5
630
+ },
631
+ {
632
+ "type": "table",
633
+ "img_path": "images/b2bf7fed1d9ac11be3ac1980c2a6852b8f393531d984ef1283ce89f6f21f5482.jpg",
634
+ "table_caption": [],
635
+ "table_footnote": [],
636
+ "table_body": "<table><tr><td>Fine-tuned</td><td>MAS</td><td>LAMOLG5 0.05</td><td>LAMOLGEN 0.2</td><td>LAMOLTSK 0.05</td><td>LAMOLTASK 0.2</td><td>LAMOLREL 0.05</td><td>LAMOLREAL 0.2</td><td>Multitasked</td></tr><tr><td>51.5</td><td>49.5</td><td>69.6</td><td>73.1</td><td>71.5</td><td>74.3</td><td>74.5</td><td>76.0</td><td>76.6</td></tr></table>",
637
+ "bbox": [
638
+ 173,
639
+ 382,
640
+ 823,
641
+ 419
642
+ ],
643
+ "page_idx": 5
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "Table 4: Summary of averaged score on five tasks. The scores are reported as the averaged score over all tasks of the models after training on every task. The rightmost three columns – LAMOL with $\\gamma = 0 . 0 5$ and $\\gamma = 0 . 2$ of real samples from previous tasks and Multitasked – are upper bounds for comparison. Best performance in boldface. ",
648
+ "bbox": [
649
+ 173,
650
+ 429,
651
+ 825,
652
+ 484
653
+ ],
654
+ "page_idx": 5
655
+ },
656
+ {
657
+ "type": "text",
658
+ "text": "• Fine-tune The model is directly fine-tuned on the stream of tasks, one after another. ",
659
+ "bbox": [
660
+ 176,
661
+ 517,
662
+ 740,
663
+ 531
664
+ ],
665
+ "page_idx": 5
666
+ },
667
+ {
668
+ "type": "text",
669
+ "text": "• Multitask learning All tasks are trained simultaneously. Multitask learning is often seen as an upper bound of lifelong learning. In addition, it is also used to determine whether forgetting is caused by a lack of model capacity. ",
670
+ "bbox": [
671
+ 176,
672
+ 540,
673
+ 825,
674
+ 583
675
+ ],
676
+ "page_idx": 5
677
+ },
678
+ {
679
+ "type": "text",
680
+ "text": "• Regularization-based methods Online EWC (Schwarz et al., 2018) and MAS (Aljundi et al., 2018) are compared. They are chosen because they are more computationally efficient than SI (Zenke et al., 2017) and more memory efficient than IMM (Lee et al., 2017). Additionally, experiments such as Elhoseiny et al. (2018) show that MAS has better performance overall. ",
681
+ "bbox": [
682
+ 174,
683
+ 592,
684
+ 825,
685
+ 648
686
+ ],
687
+ "page_idx": 5
688
+ },
689
+ {
690
+ "type": "text",
691
+ "text": "• Gradient Episodic Memory (GEM) When training each task, we randomly sample data from previous task with the amount equivalent to $5 \\%$ of the current task size into the memory. In each optimization step, the GEM (Lopez-Paz et al., 2017) approach retrieves all the data in the memory to calculate the gradients for the previous tasks. ",
692
+ "bbox": [
693
+ 174,
694
+ 657,
695
+ 825,
696
+ 713
697
+ ],
698
+ "page_idx": 5
699
+ },
700
+ {
701
+ "type": "text",
702
+ "text": "• Improved memory-based parameter adaptation $\\mathbf { ( M B P A + + ) }$ ) Sparse experience replay and local adaptation for LLL as proposed in d’Autume et al. (2019). We also re-implement the paper and report better scores using different hyperparameters. ",
703
+ "bbox": [
704
+ 174,
705
+ 723,
706
+ 825,
707
+ 765
708
+ ],
709
+ "page_idx": 5
710
+ },
711
+ {
712
+ "type": "text",
713
+ "text": "5 EXPERIMENTAL RESULTS ",
714
+ "text_level": 1,
715
+ "bbox": [
716
+ 176,
717
+ 791,
718
+ 419,
719
+ 808
720
+ ],
721
+ "page_idx": 5
722
+ },
723
+ {
724
+ "type": "text",
725
+ "text": "5.1 SINGLE TASK",
726
+ "text_level": 1,
727
+ "bbox": [
728
+ 174,
729
+ 825,
730
+ 310,
731
+ 840
732
+ ],
733
+ "page_idx": 5
734
+ },
735
+ {
736
+ "type": "text",
737
+ "text": "To establish a reference on the capability of the GPT-2 model on every dataset, we trained the model on each dataset independently. The results are shown in Table 2. We observe that the performance of the GPT-2 model is actually quite good, even beating the BERT-based model (d’Autume et al., 2019) on text classification datasets by a large margin. Thus, the GPT-2 model has the potential for superior LLL performance, as long as we can prevent catastrophic forgetting. ",
738
+ "bbox": [
739
+ 174,
740
+ 853,
741
+ 825,
742
+ 924
743
+ ],
744
+ "page_idx": 5
745
+ },
746
+ {
747
+ "type": "text",
748
+ "text": "5.2 SST, QA-SRL, AND WOZ TASKS ",
749
+ "text_level": 1,
750
+ "bbox": [
751
+ 176,
752
+ 103,
753
+ 450,
754
+ 117
755
+ ],
756
+ "page_idx": 6
757
+ },
758
+ {
759
+ "type": "text",
760
+ "text": "For an initial understanding of the performance on all of the methods and the effect of task order, we first conducted a small-scale experiment on three small datasets: SST, QA-SRL, and WOZ. We trained all but the the multitasked method on all six permutations of the task order. The final score for each order was obtained by evaluating the model at the conclusion of the training process. The results are shown in Table 3; we make several observations. Note that LAMOL with $\\gamma = 0$ is not the same as Fine-tuned, as the LM loss is still optimized. ",
761
+ "bbox": [
762
+ 174,
763
+ 130,
764
+ 825,
765
+ 213
766
+ ],
767
+ "page_idx": 6
768
+ },
769
+ {
770
+ "type": "text",
771
+ "text": "• Fine-tuned, EWC, MAS, and LAMOL with $\\gamma = 0$ show similar performance and are much worse than LAMOL with $\\gamma > 0$ . \n• LAMOL0.2GEN, our best performing method, is only 1.8 percent away from Multitasked, which implies almost no forgetting during LLL. \n• The order of the tasks is crucial to the performance. For instance, the WOZ score drops significantly after training other tasks. Thus, if WOZ is not the last task, the performance is usually noticeably worse. \n• When using LAMOL, the performance of old tasks maintains almost the same level throughout the training process. When the sampling ratio $\\gamma$ is increased, the performance also increases, especially when increased from 0 to 0.05. \n• When $\\gamma = 0$ , adding task-specific tokens harms performance, because the model must fit additional special tokens that are useless. Adding task-specific tokens is also not helpful if $\\gamma = 0 . 2$ . We believe that 0.2 is enough for three tasks; thus task-specific tokens are redundant. However, when $\\gamma = 0 . 0 5$ , task-specific tokens are beneficial because the tokens are needed to help retain a substantial presence of the first task when training the third task. • We see that a better LLL method usually has a smaller standard deviation, which implies that it is effected less by task order. Adding task-specific tokens also has a stabilizing effect. ",
772
+ "bbox": [
773
+ 173,
774
+ 226,
775
+ 826,
776
+ 491
777
+ ],
778
+ "page_idx": 6
779
+ },
780
+ {
781
+ "type": "text",
782
+ "text": "$\\mathrm { L A M O L } _ { \\mathrm { G E N } } ^ { \\mathrm { 6 } }$ e for, and $\\bar { \\mathrm { L A M O L } } _ { \\mathrm { T A S K } } ^ { 0 }$ ss is illustrated in Appendix B. Creveal similar patterns. However, t WC,with $\\gamma > 0$ $\\mathrm { { W O Z } { S R L } { S S T } }$ score even increases after training the third task using LAMOL with $\\gamma = 0 . 2$ . ",
783
+ "bbox": [
784
+ 174,
785
+ 502,
786
+ 825,
787
+ 559
788
+ ],
789
+ "page_idx": 6
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "5.3 FIVE DECANLP TASKS ",
794
+ "text_level": 1,
795
+ "bbox": [
796
+ 176,
797
+ 577,
798
+ 375,
799
+ 592
800
+ ],
801
+ "page_idx": 6
802
+ },
803
+ {
804
+ "type": "text",
805
+ "text": "Here, we train the following five tasks sequentially: SQuAD, WikiSQL, SST, QA-SRL, and WOZ. Given the limited computing resources, we explore only one task order: from large to small tasks, according to the number of training samples. ",
806
+ "bbox": [
807
+ 174,
808
+ 603,
809
+ 821,
810
+ 645
811
+ ],
812
+ "page_idx": 6
813
+ },
814
+ {
815
+ "type": "text",
816
+ "text": "As shown in Table 4, LAMOL outperforms all baselines by a large margin and on average approaches within $2 \\mathrm { - } 3 \\%$ of the multitasked upper bound. Also, as expected, the performance of LAMOL improves as the sampling ratio $\\gamma$ increases and task-specific tokens are used. ",
817
+ "bbox": [
818
+ 176,
819
+ 652,
820
+ 820,
821
+ 694
822
+ ],
823
+ "page_idx": 6
824
+ },
825
+ {
826
+ "type": "text",
827
+ "text": "There is also a gap between our method and the method of keeping real samples. As shown in the table, using real samples is much more sample-efficient, as $5 \\%$ of real samples beats $20 \\%$ of pseudo-samples. This may be due to the less-than-ideal quality of the pseudo-data. The longer the paragraphs are, the harder it is for the model to create high-quality samples. After observing the samples generated when using task-specific tokens, we discover some “chaos”. That is, some examples generated by the model do not exactly correspond to the task-specific token. This implies that the task-specific tokens are sometimes too weak to constrain the model; thus their influence is overshadowed by other tokens. We believe that solving this problem will bring the performance when using task-specific tokens closer to using real samples; however, we leave this as future work. ",
828
+ "bbox": [
829
+ 174,
830
+ 700,
831
+ 825,
832
+ 827
833
+ ],
834
+ "page_idx": 6
835
+ },
836
+ {
837
+ "type": "text",
838
+ "text": "Figure 3 illustrates the test scores of each method on each task throughout the training. We clearly see that when using LAMOL, the model remembers nearly perfectly. ",
839
+ "bbox": [
840
+ 173,
841
+ 833,
842
+ 820,
843
+ 862
844
+ ],
845
+ "page_idx": 6
846
+ },
847
+ {
848
+ "type": "text",
849
+ "text": "We make several observations: ",
850
+ "bbox": [
851
+ 176,
852
+ 869,
853
+ 375,
854
+ 882
855
+ ],
856
+ "page_idx": 6
857
+ },
858
+ {
859
+ "type": "text",
860
+ "text": "• When training SQuAD, QA-SRL has not been trained yet, but the score of QA-SRL is already around 40. Also, when training QA-SRL, the SQuAD score revives if the model has forgotten SQuAD. These two facts imply that SQuAD and SRL are similar tasks, such that the model is capable of transferring knowledge from one to the other. ",
861
+ "bbox": [
862
+ 215,
863
+ 895,
864
+ 823,
865
+ 924
866
+ ],
867
+ "page_idx": 6
868
+ },
869
+ {
870
+ "type": "image",
871
+ "img_path": "images/b65f0bc94e2368784de8fbd88770dba973cc07821dda7316678f74876c2909ea.jpg",
872
+ "image_caption": [
873
+ "Figure 3: Training progress of five tasks. The graph records the performance of the model at each epoch of each task. "
874
+ ],
875
+ "image_footnote": [],
876
+ "bbox": [
877
+ 184,
878
+ 102,
879
+ 465,
880
+ 462
881
+ ],
882
+ "page_idx": 7
883
+ },
884
+ {
885
+ "type": "image",
886
+ "img_path": "images/241301bab661c8d39d04977a8cf22ff05da6fdb99e6a8484395a5d6e3846ae36.jpg",
887
+ "image_caption": [
888
+ "Figure 4: Performance after each epoch under five different sampling ratios, with or without task specific-specific tokens. "
889
+ ],
890
+ "image_footnote": [],
891
+ "bbox": [
892
+ 486,
893
+ 111,
894
+ 818,
895
+ 450
896
+ ],
897
+ "page_idx": 7
898
+ },
899
+ {
900
+ "type": "text",
901
+ "text": "",
902
+ "bbox": [
903
+ 227,
904
+ 545,
905
+ 823,
906
+ 573
907
+ ],
908
+ "page_idx": 7
909
+ },
910
+ {
911
+ "type": "text",
912
+ "text": "• If forward transfer exists, replaying pseudo-data also retains the forward transfer. That is, the QA-SRL score does not drop after training on WikiSQL and SST when LAMOL is used but drops significantly for other methods. ",
913
+ "bbox": [
914
+ 215,
915
+ 579,
916
+ 825,
917
+ 621
918
+ ],
919
+ "page_idx": 7
920
+ },
921
+ {
922
+ "type": "text",
923
+ "text": "• The transferability between SQuAD and QA-SRL is expected. On the other hand, the transferability between WikiSQL and QA-SRL is quite surprising; the WikiSQL score improves considerably when training on QA-SRL for Fine-tuned and MAS after WikiSQL is forgotten during SST training. ",
924
+ "bbox": [
925
+ 214,
926
+ 627,
927
+ 823,
928
+ 683
929
+ ],
930
+ "page_idx": 7
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "5.4 TEXT CLASSIFICATION TASKS ",
935
+ "text_level": 1,
936
+ "bbox": [
937
+ 176,
938
+ 702,
939
+ 419,
940
+ 715
941
+ ],
942
+ "page_idx": 7
943
+ },
944
+ {
945
+ "type": "text",
946
+ "text": "We compared the proposed method against the state-of-the-art $\\mathrm { M B P A + + }$ proposed in d’Autume et al. (2019), both by citing their original numbers and also by reproducing their methods. We chose text classification as opposed to QA because we believe that LM has more of a disadvantage in text classification than in QA. We compared with $\\mathrm { L A M O L _ { T A S K } ^ { 0 . 2 } }$ due to its good performance and stability. Following their paper and testing our model on the same four kinds of task orders, the results are shown in Table 5. ",
947
+ "bbox": [
948
+ 174,
949
+ 728,
950
+ 825,
951
+ 814
952
+ ],
953
+ "page_idx": 7
954
+ },
955
+ {
956
+ "type": "text",
957
+ "text": "Our implementation results in much higher scores thLAMOL0.2TASK still outperforms our implementation of $\\mathrm { M B P A + + }$ ginal ones. However, the proposed. ",
958
+ "bbox": [
959
+ 174,
960
+ 820,
961
+ 821,
962
+ 849
963
+ ],
964
+ "page_idx": 7
965
+ },
966
+ {
967
+ "type": "text",
968
+ "text": "5.5 INFLUENCE OF SAMPLING RATIO $\\gamma$ ",
969
+ "text_level": 1,
970
+ "bbox": [
971
+ 176,
972
+ 868,
973
+ 452,
974
+ 882
975
+ ],
976
+ "page_idx": 7
977
+ },
978
+ {
979
+ "type": "text",
980
+ "text": "As the value of $\\gamma$ determines the performance of LLL, we conducted a medium-scale experiment to understand the influence of $\\gamma$ with and without task-specific tokens. In this experiment we used ",
981
+ "bbox": [
982
+ 173,
983
+ 895,
984
+ 823,
985
+ 924
986
+ ],
987
+ "page_idx": 7
988
+ },
989
+ {
990
+ "type": "table",
991
+ "img_path": "images/a6ddb1d2b74e4cb17e1b4dc704db67c45751e97bf14a48cecd80902f5c2cf83b.jpg",
992
+ "table_caption": [
993
+ "Table 5: Summary of results on text classification tasks using averaged EM score (equivalent to averaged accuracy in d’Autume et al. (2019)) of models at last epoch of last task. The four orders mirror those in d’Autume et al. (2019). For $\\mathrm { M B P A + + }$ (out impl.) and $\\mathrm { L A M O L _ { T A S K } ^ { 0 . 2 } }$ , the results are averaged over two runs. The -value of pairted $t$ -test between eight numbers of $\\mathrm { M B P A + + }$ (our impl.) and $\\mathrm { L A M O L _ { T A S K } ^ { 0 . 2 } }$ is smaller than $1 \\%$ , which shows that there is significant difference. Our implementation of $\\mathrm { M B P A + + }$ is available at https://github.com/Daikon-Sun/EM-in-LLL. "
994
+ ],
995
+ "table_footnote": [],
996
+ "table_body": "<table><tr><td>Order</td><td>MBPA++</td><td>MBPA++ (our impl.)</td><td></td></tr><tr><td>i</td><td>70.8</td><td>74.1</td><td>76.7</td></tr><tr><td>ii</td><td>70.9</td><td>74.9</td><td>77.2</td></tr><tr><td>ii</td><td>70.2</td><td>73.1</td><td>76.1</td></tr><tr><td>iv</td><td>70.7</td><td>74.9</td><td>76.1</td></tr><tr><td>Average</td><td>70.7</td><td>74.2</td><td>76.5</td></tr></table>",
997
+ "bbox": [
998
+ 320,
999
+ 101,
1000
+ 676,
1001
+ 196
1002
+ ],
1003
+ "page_idx": 8
1004
+ },
1005
+ {
1006
+ "type": "text",
1007
+ "text": "WikiSQL (blue color), SST (orange), QA-SRL (green), and WOZ (red), in that training order. The results are shown in Figure 4. ",
1008
+ "bbox": [
1009
+ 173,
1010
+ 319,
1011
+ 823,
1012
+ 348
1013
+ ],
1014
+ "page_idx": 8
1015
+ },
1016
+ {
1017
+ "type": "text",
1018
+ "text": "Unsurprisingly, the less generation done by the model, the more likely the vanishing distribution in Section 3 occurs: the model forgets how to generate previous tasks, as the ratio of previous tasks in the total dataset decreases exponentially over time. Models using task-specific tokens mitigate this somewhat, as demonstrated in the first subgraph where the performance of LAMOL0.03TASK is much better than that of LAMOL0.03GEN. ",
1019
+ "bbox": [
1020
+ 174,
1021
+ 354,
1022
+ 825,
1023
+ 429
1024
+ ],
1025
+ "page_idx": 8
1026
+ },
1027
+ {
1028
+ "type": "text",
1029
+ "text": "In addition, the more samples the model generates, the better the overall performance of the model. \nHowever, this performance gain disappears when the sampling ratio $\\gamma$ is around 0.1 to 0.3. ",
1030
+ "bbox": [
1031
+ 174,
1032
+ 434,
1033
+ 823,
1034
+ 463
1035
+ ],
1036
+ "page_idx": 8
1037
+ },
1038
+ {
1039
+ "type": "text",
1040
+ "text": "6 CONCLUSION ",
1041
+ "text_level": 1,
1042
+ "bbox": [
1043
+ 176,
1044
+ 483,
1045
+ 318,
1046
+ 498
1047
+ ],
1048
+ "page_idx": 8
1049
+ },
1050
+ {
1051
+ "type": "text",
1052
+ "text": "We propose LAMOL, a simple yet effective method for LLL based on language modeling. A single LM achieves LLL without additional model components and without keeping old examples. Moreover, any pre-trained LM can be used to leverage a large amount of unlabeled text to improve LLL. Finally, more tasks can be added whenever needed. ",
1053
+ "bbox": [
1054
+ 174,
1055
+ 515,
1056
+ 825,
1057
+ 570
1058
+ ],
1059
+ "page_idx": 8
1060
+ },
1061
+ {
1062
+ "type": "text",
1063
+ "text": "ACKNOWLEDGEMENT ",
1064
+ "text_level": 1,
1065
+ "bbox": [
1066
+ 176,
1067
+ 592,
1068
+ 357,
1069
+ 606
1070
+ ],
1071
+ "page_idx": 8
1072
+ },
1073
+ {
1074
+ "type": "text",
1075
+ "text": "This work was supported by the Ministry of Science and Technology of Taiwan. ",
1076
+ "bbox": [
1077
+ 176,
1078
+ 621,
1079
+ 696,
1080
+ 636
1081
+ ],
1082
+ "page_idx": 8
1083
+ },
1084
+ {
1085
+ "type": "text",
1086
+ "text": "REFERENCES ",
1087
+ "text_level": 1,
1088
+ "bbox": [
1089
+ 176,
1090
+ 656,
1091
+ 287,
1092
+ 672
1093
+ ],
1094
+ "page_idx": 8
1095
+ },
1096
+ {
1097
+ "type": "text",
1098
+ "text": "Rahaf Aljundi, Francesca Babiloni, Mohamed Elhoseiny, Marcus Rohrbach, and Tinne Tuytelaars. Memory aware synapses: Learning what (not) to forget. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 139–154, 2018. ",
1099
+ "bbox": [
1100
+ 176,
1101
+ 680,
1102
+ 823,
1103
+ 723
1104
+ ],
1105
+ "page_idx": 8
1106
+ },
1107
+ {
1108
+ "type": "text",
1109
+ "text": "Caiming Xiong Bryan McCann, Nitish Shirish Keskar and Richard Socher. The natural language decathlon: Multitask learning as question answering. arXiv preprint arXiv:1806.08730, 2018. ",
1110
+ "bbox": [
1111
+ 174,
1112
+ 731,
1113
+ 820,
1114
+ 761
1115
+ ],
1116
+ "page_idx": 8
1117
+ },
1118
+ {
1119
+ "type": "text",
1120
+ "text": "Arslan Chaudhry, Marc’Aurelio Ranzato, Marcus Rohrbach, and Mohamed Elhoseiny. Efficient lifelong learning with a-gem. arXiv preprint arXiv:1812.00420, 2018. ",
1121
+ "bbox": [
1122
+ 174,
1123
+ 768,
1124
+ 821,
1125
+ 797
1126
+ ],
1127
+ "page_idx": 8
1128
+ },
1129
+ {
1130
+ "type": "text",
1131
+ "text": "Tianqi Chen, Ian Goodfellow, and Jonathon Shlens. Net2net: Accelerating learning via knowledge transfer. arXiv preprint arXiv:1511.05641, 2015a. ",
1132
+ "bbox": [
1133
+ 171,
1134
+ 806,
1135
+ 823,
1136
+ 835
1137
+ ],
1138
+ "page_idx": 8
1139
+ },
1140
+ {
1141
+ "type": "text",
1142
+ "text": "Zhiyuan Chen and Bing Liu. Lifelong Machine Learning. Morgan & Claypool Publishers, 2016. ",
1143
+ "bbox": [
1144
+ 173,
1145
+ 843,
1146
+ 807,
1147
+ 859
1148
+ ],
1149
+ "page_idx": 8
1150
+ },
1151
+ {
1152
+ "type": "text",
1153
+ "text": "Zhiyuan Chen, Nianzu Ma, and Bing Liu. Lifelong learning for sentiment classification. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 2: Short Papers), 2015b. ",
1154
+ "bbox": [
1155
+ 174,
1156
+ 867,
1157
+ 825,
1158
+ 922
1159
+ ],
1160
+ "page_idx": 8
1161
+ },
1162
+ {
1163
+ "type": "text",
1164
+ "text": "Cyprien de Masson d’Autume, Sebastian Ruder, Lingpeng Kong, and Dani Yogatama. Episodic memory in lifelong language learning. arXiv preprint arXiv:1906.01076, 2019. ",
1165
+ "bbox": [
1166
+ 171,
1167
+ 103,
1168
+ 823,
1169
+ 132
1170
+ ],
1171
+ "page_idx": 9
1172
+ },
1173
+ {
1174
+ "type": "text",
1175
+ "text": "Mohamed Elhoseiny, Francesca Babiloni, Rahaf Aljundi, Marcus Rohrbach, Manohar Paluri, and Tinne Tuytelaars. Exploring the challenges towards lifelong fact learning. In Asian Conference on Computer Vision, pp. 66–84. Springer, 2018. ",
1176
+ "bbox": [
1177
+ 176,
1178
+ 140,
1179
+ 823,
1180
+ 184
1181
+ ],
1182
+ "page_idx": 9
1183
+ },
1184
+ {
1185
+ "type": "text",
1186
+ "text": "Chrisantha Fernando, Dylan Banarse, Charles Blundell, Yori Zwols, David Ha, Andrei A Rusu, Alexander Pritzel, and Daan Wierstra. Pathnet: Evolution channels gradient descent in super neural networks. arXiv preprint arXiv:1701.08734, 2017. ",
1187
+ "bbox": [
1188
+ 176,
1189
+ 190,
1190
+ 823,
1191
+ 234
1192
+ ],
1193
+ "page_idx": 9
1194
+ },
1195
+ {
1196
+ "type": "text",
1197
+ "text": "Jaehong Kim Hanul Shin, Jung Kwon Lee and Jiwon Kim. Continual learning with deep generative replay. arXiv preprint arXiv:1705.08690, 2017. ",
1198
+ "bbox": [
1199
+ 168,
1200
+ 242,
1201
+ 825,
1202
+ 271
1203
+ ],
1204
+ "page_idx": 9
1205
+ },
1206
+ {
1207
+ "type": "text",
1208
+ "text": "Luheng He, Kenton Lee, Mike Lewis, and Luke Zettlemoyer. Deep semantic role labeling: What works and whats next. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 473–483, 2017. ",
1209
+ "bbox": [
1210
+ 173,
1211
+ 279,
1212
+ 823,
1213
+ 323
1214
+ ],
1215
+ "page_idx": 9
1216
+ },
1217
+ {
1218
+ "type": "text",
1219
+ "text": "Ronald Kemker and Christopher Kanan. Fearnet: Brain-inspired model for incremental learning. arXiv preprint arXiv:1711.10563, 2017. ",
1220
+ "bbox": [
1221
+ 169,
1222
+ 330,
1223
+ 823,
1224
+ 359
1225
+ ],
1226
+ "page_idx": 9
1227
+ },
1228
+ {
1229
+ "type": "text",
1230
+ "text": "James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, et al. Overcoming catastrophic forgetting in neural networks. Proceedings of the national academy of sciences, 114(13):3521–3526, 2017. ",
1231
+ "bbox": [
1232
+ 173,
1233
+ 367,
1234
+ 825,
1235
+ 424
1236
+ ],
1237
+ "page_idx": 9
1238
+ },
1239
+ {
1240
+ "type": "text",
1241
+ "text": "Sang-Woo Lee, Jin-Hwa Kim, Jaehyun Jun, Jung-Woo Ha, and Byoung-Tak Zhang. Overcoming catastrophic forgetting by incremental moment matching. In Advances in neural information processing systems, pp. 4652–4662, 2017. ",
1242
+ "bbox": [
1243
+ 174,
1244
+ 431,
1245
+ 825,
1246
+ 474
1247
+ ],
1248
+ "page_idx": 9
1249
+ },
1250
+ {
1251
+ "type": "text",
1252
+ "text": "Sungjin Lee. Toward continual learning for conversational agents. In arXiv, 2017. ",
1253
+ "bbox": [
1254
+ 173,
1255
+ 483,
1256
+ 712,
1257
+ 498
1258
+ ],
1259
+ "page_idx": 9
1260
+ },
1261
+ {
1262
+ "type": "text",
1263
+ "text": "Zhizhong Li and Derek Hoiem. Learning without forgetting. IEEE transactions on pattern analysis and machine intelligence, 40(12):2935–2947, 2017. ",
1264
+ "bbox": [
1265
+ 171,
1266
+ 506,
1267
+ 823,
1268
+ 535
1269
+ ],
1270
+ "page_idx": 9
1271
+ },
1272
+ {
1273
+ "type": "text",
1274
+ "text": "Tianlin Liu, Lyle Ungar, and Joao Sedoc. Continual learning for sentence representations using ˜ conceptors. In NAACL-HLT, 2019. ",
1275
+ "bbox": [
1276
+ 173,
1277
+ 542,
1278
+ 823,
1279
+ 571
1280
+ ],
1281
+ "page_idx": 9
1282
+ },
1283
+ {
1284
+ "type": "text",
1285
+ "text": "David Lopez-Paz et al. Gradient episodic memory for continual learning. In Advances in Neural Information Processing Systems, pp. 6467–6476, 2017. ",
1286
+ "bbox": [
1287
+ 171,
1288
+ 580,
1289
+ 823,
1290
+ 609
1291
+ ],
1292
+ "page_idx": 9
1293
+ },
1294
+ {
1295
+ "type": "text",
1296
+ "text": "Arun Mallya and Svetlana Lazebnik. Packnet: Adding multiple tasks to a single network by iterative pruning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 7765–7773, 2018. ",
1297
+ "bbox": [
1298
+ 173,
1299
+ 617,
1300
+ 823,
1301
+ 660
1302
+ ],
1303
+ "page_idx": 9
1304
+ },
1305
+ {
1306
+ "type": "text",
1307
+ "text": "Michael McCloskey and Neal J Cohen. Catastrophic interference in connectionist networks: The sequential learning problem. In Psychology of learning and motivation, volume 24, pp. 109–165. Elsevier, 1989. ",
1308
+ "bbox": [
1309
+ 171,
1310
+ 667,
1311
+ 825,
1312
+ 710
1313
+ ],
1314
+ "page_idx": 9
1315
+ },
1316
+ {
1317
+ "type": "text",
1318
+ "text": "Alec Radford, Rafal Jozefowicz, and Ilya Sutskever. Learning to generate reviews and discovering sentiment. arXiv preprint arXiv:1704.01444, 2017. ",
1319
+ "bbox": [
1320
+ 173,
1321
+ 719,
1322
+ 823,
1323
+ 748
1324
+ ],
1325
+ "page_idx": 9
1326
+ },
1327
+ {
1328
+ "type": "text",
1329
+ "text": "Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. OpenAI Blog, 1(8), 2019. ",
1330
+ "bbox": [
1331
+ 174,
1332
+ 756,
1333
+ 821,
1334
+ 786
1335
+ ],
1336
+ "page_idx": 9
1337
+ },
1338
+ {
1339
+ "type": "text",
1340
+ "text": "Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: $1 0 0 { , } 0 0 0 { + }$ questions for machine comprehension of text. arXiv preprint arXiv:1606.05250, 2016. ",
1341
+ "bbox": [
1342
+ 171,
1343
+ 792,
1344
+ 823,
1345
+ 821
1346
+ ],
1347
+ "page_idx": 9
1348
+ },
1349
+ {
1350
+ "type": "text",
1351
+ "text": "Andrei A Rusu, Neil C Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. arXiv preprint arXiv:1606.04671, 2016. ",
1352
+ "bbox": [
1353
+ 174,
1354
+ 830,
1355
+ 823,
1356
+ 872
1357
+ ],
1358
+ "page_idx": 9
1359
+ },
1360
+ {
1361
+ "type": "text",
1362
+ "text": "Jonathan Schwarz, Jelena Luketina, Wojciech M Czarnecki, Agnieszka Grabska-Barwinska, Yee Whye Teh, Razvan Pascanu, and Raia Hadsell. Progress & compress: A scalable framework for continual learning. arXiv preprint arXiv:1805.06370, 2018. ",
1363
+ "bbox": [
1364
+ 174,
1365
+ 882,
1366
+ 823,
1367
+ 924
1368
+ ],
1369
+ "page_idx": 9
1370
+ },
1371
+ {
1372
+ "type": "text",
1373
+ "text": "Shagun Sodhani, Sarath Chandar, and Yoshua Bengio. On training recurrent neural networks for lifelong learning. arXiv preprint arXiv:1811.07017, 2018. \nTsung-Hsien Wen, David Vandyke, Nikola Mrksic, Milica Gasic, Lina M Rojas-Barahona, Pei-Hao Su, Stefan Ultes, and Steve Young. A network-based end-to-end trainable task-oriented dialogue system. arXiv preprint arXiv:1604.04562, 2016. \nR. Xia, J. Jiang, and H. He. Distantly supervised lifelong learning for large-scale social media sentiment analysis. IEEE Transactions on Affective Computing, 8(4):480–491, 2017. \nYann LeCun Xiang Zhang, Junbo Zhao. Character-level convolutional networks for text classification. arXiv preprint arXiv:1509.01626, 2015. \nHu Xu, Bing Liu, Lei Shu, and Philip S. Yu. Lifelong domain word embedding via meta-learning. In Proceedings of the 27th International Joint Conference on Artificial Intelligence, 2018. \nFriedemann Zenke, Ben Poole, and Surya Ganguli. Continual learning through synaptic intelligence. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 3987– 3995. JMLR. org, 2017. \nVictor Zhong, Caiming Xiong, and Richard Socher. Seq2sql: Generating structured queries from natural language using reinforcement learning. arXiv preprint arXiv:1709.00103, 2017. ",
1374
+ "bbox": [
1375
+ 171,
1376
+ 102,
1377
+ 826,
1378
+ 388
1379
+ ],
1380
+ "page_idx": 10
1381
+ },
1382
+ {
1383
+ "type": "text",
1384
+ "text": "A TASKS, DATASET, AND METRICS ",
1385
+ "bbox": [
1386
+ 176,
1387
+ 102,
1388
+ 483,
1389
+ 118
1390
+ ],
1391
+ "page_idx": 11
1392
+ },
1393
+ {
1394
+ "type": "text",
1395
+ "text": "Five tasks and their corresponding datasets from decaNLP (Bryan McCann & Socher, 2018): ",
1396
+ "bbox": [
1397
+ 173,
1398
+ 133,
1399
+ 781,
1400
+ 148
1401
+ ],
1402
+ "page_idx": 11
1403
+ },
1404
+ {
1405
+ "type": "text",
1406
+ "text": "Question Answering – Stanford Question Answering Dataset (SQuAD) (Rajpurkar et al., 2016): This dataset consists of context, questions, and answers. The context is paragraphs from English Wikipedia, and the answers are spans from its corresponding question paragraphs. For evaluation, we use the normalized F1 score (nF1), which strips out articles and punctuation as in Bryan McCann & Socher (2018). Test datasets in this task are hidden from the host so that users must upload models to their platform to generate the test results; due to this inconvenience and our many models, we elected to use the development set to test the metric. Note that we do not use the development set in the training process. The size of the training set is 87,599 while that of the development set is 10,570. ",
1407
+ "bbox": [
1408
+ 217,
1409
+ 160,
1410
+ 825,
1411
+ 285
1412
+ ],
1413
+ "page_idx": 11
1414
+ },
1415
+ {
1416
+ "type": "text",
1417
+ "text": "• Semantic Parsing – WikiSQL (Zhong et al., 2017): In this task, normal sentences are translated into SQL-structured SQL queries. WikiSQL provides logical forms along with natural language utterances. The exact match of the logical forms (lfEM) is used to evaluate the performance. The model outputs are required to be matched the SQL format. Otherwise, its won’t get any score. The size of the training set is 56,355; that of the test set is 15,878. ",
1418
+ "bbox": [
1419
+ 217,
1420
+ 289,
1421
+ 825,
1422
+ 372
1423
+ ],
1424
+ "page_idx": 11
1425
+ },
1426
+ {
1427
+ "type": "text",
1428
+ "text": "• Sentiment Analysis – Stanford Sentiment Treebank (SST, binary version) (Radford et al., 2017): This dataset consists of movie reviews with its answers, including positive and negative binary options. The exact match score is used as the metric. The size of the training set is 6,920; that of the test set is 1,821. ",
1429
+ "bbox": [
1430
+ 217,
1431
+ 377,
1432
+ 825,
1433
+ 433
1434
+ ],
1435
+ "page_idx": 11
1436
+ },
1437
+ {
1438
+ "type": "text",
1439
+ "text": "• Semantic Role Labeling – QA-SRL (He et al., 2017): QA-SRL is a question answering form of the SRL task. The normalized F1 (nF1) score is used. The size of the training set is 6,414; that of the test set is 2,201. ",
1440
+ "bbox": [
1441
+ 218,
1442
+ 438,
1443
+ 823,
1444
+ 479
1445
+ ],
1446
+ "page_idx": 11
1447
+ },
1448
+ {
1449
+ "type": "text",
1450
+ "text": "• Goal-Oriented Dialogue – English Wizard of Oz (WOZ) (Wen et al., 2016): WOZ is a restaurant reservation task that provides a predefined ontology of a series of information for helping an agent to make reservations for customers. To keep track of the dialogue state, turn-based dialogue state EM (dsEM), which requires the model outputs exactly follow the characters’ conversation order, is used for judgment. The size of the training set is 2,536; that of the test set is 1,646. ",
1451
+ "bbox": [
1452
+ 217,
1453
+ 484,
1454
+ 825,
1455
+ 568
1456
+ ],
1457
+ "page_idx": 11
1458
+ },
1459
+ {
1460
+ "type": "text",
1461
+ "text": "Four text classification tasks and five datasets from MBPA $^ { + + }$ (dAutume et al. 2019): ",
1462
+ "bbox": [
1463
+ 176,
1464
+ 579,
1465
+ 725,
1466
+ 594
1467
+ ],
1468
+ "page_idx": 11
1469
+ },
1470
+ {
1471
+ "type": "text",
1472
+ "text": "• News Classification – AGNews: News articles to be classified into 4 classes. \n• Sentiment Analysis – Yelp and Amazon: Customer reviews and ratings on Yelp and Amazon. Both datasets include 5 classes. Wikipedia Article Classification – DBPedia: Articles and their corresponding categories on Wikipedia, including 14 classes. \nQuestions and Answers Categorization – Yahoo: Questions and answers on the Yahoo! platform, including 10 classes. ",
1473
+ "bbox": [
1474
+ 215,
1475
+ 607,
1476
+ 825,
1477
+ 720
1478
+ ],
1479
+ "page_idx": 11
1480
+ },
1481
+ {
1482
+ "type": "text",
1483
+ "text": "The dataset collected by Xiang Zhang (2015) is available at http://goo.gl/JyCnZq. Given the unbalanced dataset sizes, we randomly sample 115,000 training examples and 7,600 test examples from all the datasets per d’Autume et al. (2019). All the tasks use exact match accuracy as the evaluation metric. ",
1484
+ "bbox": [
1485
+ 176,
1486
+ 733,
1487
+ 825,
1488
+ 789
1489
+ ],
1490
+ "page_idx": 11
1491
+ },
1492
+ {
1493
+ "type": "image",
1494
+ "img_path": "images/911e6b4f02ab88dee55f45e36a773a1eb1410ee756b1728c3c9668741df0ded8.jpg",
1495
+ "image_caption": [
1496
+ "Figure 5: Overview of the forgetting progress for different methods and permuted orders. The blue line indicate the scores of the first task after training each task. The orange line corresponds to that of the second task. "
1497
+ ],
1498
+ "image_footnote": [],
1499
+ "bbox": [
1500
+ 176,
1501
+ 135,
1502
+ 818,
1503
+ 421
1504
+ ],
1505
+ "page_idx": 12
1506
+ },
1507
+ {
1508
+ "type": "text",
1509
+ "text": "C REVERSE ORDER OF FIVE DECANLP TASKS ",
1510
+ "text_level": 1,
1511
+ "bbox": [
1512
+ 173,
1513
+ 102,
1514
+ 580,
1515
+ 118
1516
+ ],
1517
+ "page_idx": 13
1518
+ },
1519
+ {
1520
+ "type": "table",
1521
+ "img_path": "images/493a42191b17705fe0811d05b0d421fec0e6ee2bb7927410a39a79b622c200f9.jpg",
1522
+ "table_caption": [],
1523
+ "table_footnote": [],
1524
+ "table_body": "<table><tr><td>Fine-tuned</td><td>MAS</td><td>LAMOLGO5 0.05</td><td>LAMOLGEN 0.2</td><td>LAMOLTAOSK 0.05</td><td>LAMOLTASsK 0.2</td><td>LAMOLREAL 0.05</td><td>LAMOLREAL 0.2</td><td>Multitasked</td></tr><tr><td>45.4</td><td>44.7</td><td>63.2</td><td>73.0</td><td>75.3</td><td>76.9</td><td>75.9</td><td>78.2</td><td>76.6</td></tr></table>",
1525
+ "bbox": [
1526
+ 173,
1527
+ 137,
1528
+ 825,
1529
+ 172
1530
+ ],
1531
+ "page_idx": 13
1532
+ },
1533
+ {
1534
+ "type": "text",
1535
+ "text": "Table 6: Summary of averaged score on reversed five tasks. The scores are reported as the averaged score over all tasks of the models after training on every task. The rightmost three columns – LAMOL with $\\gamma = 0 . 0 5$ and $\\gamma = 0 . 2$ of real samples from previous tasks. Best performance in boldface. ",
1536
+ "bbox": [
1537
+ 173,
1538
+ 183,
1539
+ 825,
1540
+ 239
1541
+ ],
1542
+ "page_idx": 13
1543
+ },
1544
+ {
1545
+ "type": "image",
1546
+ "img_path": "images/213270af153d5e5188969e07642a9131e1781328bf66f4215021ab11ef247b2a.jpg",
1547
+ "image_caption": [
1548
+ "Figure 6: Training progress of the five tasks with reverse order, i.e. small to large. The graph records the performance of the model at each epoch of each tasks. The order of tasks in the progress follows: WOZ, QA-SRL, SST, WikiSQL, and then SQuAD. From the figure, we can clearly see that Fine-tune and MAS completely forget WOZ and WikiSQL. "
1549
+ ],
1550
+ "image_footnote": [],
1551
+ "bbox": [
1552
+ 318,
1553
+ 258,
1554
+ 691,
1555
+ 742
1556
+ ],
1557
+ "page_idx": 13
1558
+ },
1559
+ {
1560
+ "type": "text",
1561
+ "text": "D GENERATED EXAMPLES ",
1562
+ "text_level": 1,
1563
+ "bbox": [
1564
+ 176,
1565
+ 102,
1566
+ 411,
1567
+ 118
1568
+ ],
1569
+ "page_idx": 14
1570
+ },
1571
+ {
1572
+ "type": "text",
1573
+ "text": "Normal Examples ",
1574
+ "text_level": 1,
1575
+ "bbox": [
1576
+ 179,
1577
+ 137,
1578
+ 282,
1579
+ 150
1580
+ ],
1581
+ "page_idx": 14
1582
+ },
1583
+ {
1584
+ "type": "text",
1585
+ "text": "squad1 The United States has been accused of a wide ranging war in Afghanistan since 9 / 11. During the campaign, US forces in Afghanistan were involved in an extensive air campaign. At least 1,600 American servicemen and women were killed, while more than 1,600 civilians were injured. After the US-led invasion of Afghanistan on 12 / 11 / 2001, an estimated 10,000 American soldiers were killed in combat.What were the targets included in the conflict? ans Afghanistan ",
1586
+ "bbox": [
1587
+ 179,
1588
+ 160,
1589
+ 818,
1590
+ 204
1591
+ ],
1592
+ "page_idx": 14
1593
+ },
1594
+ {
1595
+ "type": "text",
1596
+ "text": "squad1 In 1849, the French army was forced to withdraw, and the French were finally expelled, although it was not until late November that the French recaptured most of their territories. French troops then reached Egypt. On 21 January 1852 (the year after he left), in Cairo, they captured Tripoli, Benghazi, Benghazi, and the eastern part of Libya. After Gaddafi’s return to office, he established the Gaddafi regime. On 13 February 1856, the Gaddafi family relocated to Egypt. On 13 May 1857, the army was forced to withdraw from Libya, and the army returned to Benghazi.On whom did Gaddafi’s army return to Benghazi? ans Gaddafi’s family ",
1597
+ "bbox": [
1598
+ 181,
1599
+ 213,
1600
+ 816,
1601
+ 280
1602
+ ],
1603
+ "page_idx": 14
1604
+ },
1605
+ {
1606
+ "type": "text",
1607
+ "text": "wikisql the table has columns rank, athlete, sport, nation, gold, silver and key words max, min, count, sum, avg, =, >, <, op, select, where, and, col, table, caption, page, section, op, cond, question, agg, aggops, condops - - what is the nation when they have the rank 10 and the gold is 6?what is the translation from english to sql? ans select nation from table where rank $= I O$ and gold $= 6$ ",
1608
+ "bbox": [
1609
+ 181,
1610
+ 289,
1611
+ 816,
1612
+ 333
1613
+ ],
1614
+ "page_idx": 14
1615
+ },
1616
+ {
1617
+ "type": "text",
1618
+ "text": "wikisql the table has columns home team, home team score, away team, away team score, venue, crowd, date and key words max, min, count, sum, avg, $=$ , >, <, op, select, where, and, col, table, caption, page, section, op, cond, question, agg, aggops, condops - - what is the home team’s score when they played at richfield?what is the translation from english to sql? ans select home team score from table where venue $=$ richfield ",
1619
+ "bbox": [
1620
+ 183,
1621
+ 343,
1622
+ 818,
1623
+ 387
1624
+ ],
1625
+ "page_idx": 14
1626
+ },
1627
+ {
1628
+ "type": "text",
1629
+ "text": "sst it’s a movie that’s not worth a look.is this review negative or positive? ans negative sst it’s an ugly movie about an old man who’s been given power by a new god to bring about a new era.is this review negative or positive? ans negative ",
1630
+ "bbox": [
1631
+ 183,
1632
+ 397,
1633
+ 647,
1634
+ 410
1635
+ ],
1636
+ "page_idx": 14
1637
+ },
1638
+ {
1639
+ "type": "text",
1640
+ "text": "",
1641
+ "bbox": [
1642
+ 181,
1643
+ 419,
1644
+ 813,
1645
+ 441
1646
+ ],
1647
+ "page_idx": 14
1648
+ },
1649
+ {
1650
+ "type": "text",
1651
+ "text": "srl in a statement on his official page, juan valderrama said that the president’s nominees would be appointed by the president and confirmed by the national senate.who might be appointed? ans president ",
1652
+ "bbox": [
1653
+ 179,
1654
+ 452,
1655
+ 816,
1656
+ 474
1657
+ ],
1658
+ "page_idx": 14
1659
+ },
1660
+ {
1661
+ "type": "text",
1662
+ "text": "srl the first two films, released on august 21, 1999, are the first in a line of films that were made by two different people, each of whom worked in tandem on the film.what was released? ans the first two films ",
1663
+ "bbox": [
1664
+ 183,
1665
+ 483,
1666
+ 815,
1667
+ 507
1668
+ ],
1669
+ "page_idx": 14
1670
+ },
1671
+ {
1672
+ "type": "text",
1673
+ "text": "Examples of Chaos ",
1674
+ "text_level": 1,
1675
+ "bbox": [
1676
+ 179,
1677
+ 517,
1678
+ 287,
1679
+ 529
1680
+ ],
1681
+ "page_idx": 14
1682
+ },
1683
+ {
1684
+ "type": "text",
1685
+ "text": "squad1 the table has columns rank ( nation ), gold, silver, bronze, total and key words max, min, count, sum, avg, $=$ , >, <, op, select, where, and, col, table, caption, page, section, op, cond, question, agg, aggops, condops - - which total has a gold smaller than 2, and has the lowest rank of bronze of 3?what is the translation from english to sql? ans select min total from table where gold $< 2$ and bronze $= 3$ ",
1686
+ "bbox": [
1687
+ 179,
1688
+ 539,
1689
+ 818,
1690
+ 584
1691
+ ],
1692
+ "page_idx": 14
1693
+ },
1694
+ {
1695
+ "type": "text",
1696
+ "text": "squad1 In addition to the role played by the main characters, the main cast members are played by the same cast members who were in season one of the original series.is this review negative or positive? ans positive ",
1697
+ "bbox": [
1698
+ 179,
1699
+ 593,
1700
+ 816,
1701
+ 616
1702
+ ],
1703
+ "page_idx": 14
1704
+ },
1705
+ {
1706
+ "type": "text",
1707
+ "text": "wikisql it’s a shame that the story doesn’t end with a good ending, but it certainly means the world to me.is this review negative or positive? ans positive ",
1708
+ "bbox": [
1709
+ 179,
1710
+ 626,
1711
+ 818,
1712
+ 648
1713
+ ],
1714
+ "page_idx": 14
1715
+ },
1716
+ {
1717
+ "type": "text",
1718
+ "text": "wikisql on the same day, june 19, 2012, former heavyweight champion arthur lang defended his title against alexander green in the final of the world heavyweight championship.what did someone defend? ans his title ",
1719
+ "bbox": [
1720
+ 178,
1721
+ 657,
1722
+ 815,
1723
+ 681
1724
+ ],
1725
+ "page_idx": 14
1726
+ },
1727
+ {
1728
+ "type": "text",
1729
+ "text": "sst at this point, he was only twenty - five years old at the time of his first appearance on the mcf tv series.who was something twenty - five years old? ans he ",
1730
+ "bbox": [
1731
+ 178,
1732
+ 690,
1733
+ 816,
1734
+ 713
1735
+ ],
1736
+ "page_idx": 14
1737
+ },
1738
+ {
1739
+ "type": "text",
1740
+ "text": "sst on paper, the movie’s two most fascinating characters are two peas in the same class, both of whom have made an appearance in this film.who did something feature? ans two most fascinating characters ",
1741
+ "bbox": [
1742
+ 178,
1743
+ 723,
1744
+ 816,
1745
+ 746
1746
+ ],
1747
+ "page_idx": 14
1748
+ },
1749
+ {
1750
+ "type": "text",
1751
+ "text": "srl a popular seasonal film in austrian films and the most influential in the history of cinema.is this review negative or positive? ans positive ",
1752
+ "bbox": [
1753
+ 181,
1754
+ 756,
1755
+ 815,
1756
+ 779
1757
+ ],
1758
+ "page_idx": 14
1759
+ },
1760
+ {
1761
+ "type": "text",
1762
+ "text": "srl it’s not a bad film, it’s just not as good as you’ve seen it before.is this review negative or positive? ans negative ",
1763
+ "bbox": [
1764
+ 183,
1765
+ 787,
1766
+ 789,
1767
+ 801
1768
+ ],
1769
+ "page_idx": 14
1770
+ },
1771
+ {
1772
+ "type": "text",
1773
+ "text": "Table 7: Examples generated by LAMOL with task-specific tokens. Annotations squad1 wikisql , $_ { -- } s s t _ { -- } , \\ _ { - } s r l _ { -- }$ correspond to each task-specific token of SQuAD, WikiSQL, SST, and QA-SRL, respectively. ans is the ANS token that separates the question from the answer. The upper frame shows the normal situation whereas the lower frame shows generated contents that are inconsistent with their task-specific token. ",
1774
+ "bbox": [
1775
+ 173,
1776
+ 823,
1777
+ 825,
1778
+ 893
1779
+ ],
1780
+ "page_idx": 14
1781
+ }
1782
+ ]
parse/train/Skgxcn4YDS/Skgxcn4YDS_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Skgxcn4YDS/Skgxcn4YDS_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SklVEnR5K7/SklVEnR5K7.md ADDED
@@ -0,0 +1,356 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MAKING CONVOLUTIONAL NETWORKS SHIFT-INVARIANT AGAIN
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Modern convolutional networks are not shift-invariant, despite their convolutional nature: small shifts in the input can cause drastic changes in the internal feature maps and output. In this paper, we isolate the cause – the downsampling operation in convolutional and pooling layers – and apply the appropriate signal processing fix – low-pass filtering before downsampling. This simple architectural modification boosts the shift-equivariance of the internal representations and consequently, shift-invariance of the output. Importantly, this is achieved while maintaining downstream classification performance. In addition, incorporating the inductive bias of shift-invariance largely removes the need for shift-based data augmentation. Lastly, we observe that the modification induces spatially-smoother learned convolutional kernels. Our results suggest that this classical signal processing technique has a place in modern deep networks.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Deep convolutional neural networks (CNNs) are designed to perform high-level tasks and be robust to low-level nuisance factors. For example, small shifts in the input should simply shift the internal feature maps (shift-equivariance), and leave the output relatively unaffected (shift-invariance). This property has been explicitly engineered through convolutional and pooling layers, where the same function is applied on a local region across the image in a sliding window fashion. However, recent work (Engstrom et al., 2017; Azulay & Weiss, 2018) has found that small shifts can drastically change the output of a classification network. Why is this the case?
12
+
13
+ Shift-invariance is lost when spatial resolution is lost, for example, from pooling layers. Our insight is that conventional strided-pooling, as shown in Fig. 1 (top), is inherently composed of two operations: (1) evaluating the pooling operator densely (without striding), and (2) downsampling. Naive downsampling loses shift-equivariance, as high-frequency components of the signal alias into low-frequencies. This phenomenon is commonly illustrated in movies, where wheels appear to spin backwards, due to the frame rate not meeting the Nyquist sampling criterion (known as the Stroboscopic effect). Separating these operations is important, as it allows us to keep the pooling operation, while applying the appropriate fix to the downsampling operation.
14
+
15
+ We propose to add the signal processing tool of low-pass filtering before downsampling, as shown in Fig. 1 (bottom). By low-pass filtering, the high-frequency components of the signal are reduced, reducing aliasing and better preserving shift-equivariance. This ultimately cascades into better shiftinvariance in the output. We show example classification instabilities in Fig. 2.
16
+
17
+ A potential concern is that over-aggressive low-pass filtering can result in heavy loss of information. However, we find that with a reasonable selection of low-pass filter weights, we can maintain classification performance while increasing shift-invariance. Furthermore, we show that without shift-based data augmentation, incorporating this inductive bias actually improves performance.
18
+
19
+ We find that the learned filters also naturally become smoother after adding the blurring layer. These results indicate that incorporating this small modification not only induces shift-invariance, but causes the network to learn a smoother feature extractor.
20
+
21
+ In summary, our contributions are as follows:
22
+
23
+ ![](images/b1534bd0f0fb60573d0a3b7fe9a4971fb4233f3c2674a268778f097b9d86cf29.jpg)
24
+ Figure 1: (Top) Pooling does not preserve shift-equivariance. It is functionally equivalent to densely evaluated pooling followed by naive downsampling. The latter operation ignores the Nyquist sampling theorem and loses shift-equivariance. (Bottom) We low-pass filter between the operations. This keeps the original pooling operation, while antialiasing the appropriate signal. This equivalent analysis and modification can be applied to any strided layer, such as convolution.
25
+
26
+ • We isolate the cause for loss of shift-invariance – downsampling. Separating the downsampling from pooling enables us to keep the desired pooling, while fixing the loss of shift-equivariance. We propose to low-pass filter before downsampling, a common signal processing technique.
27
+ • We validate on a classification task, and demonstrate increased shift-equivariance in the features and shift-invariance in the output.
28
+ • In addition, we observe large improvements in classification performance when training without shift-augmentation, indicating more efficient usage of data.
29
+
30
+ # 2 RELATED WORK
31
+
32
+ Local connectivity and weight sharing have been a central tenet of neural networks, including the Neocognitron (Fukushima & Miyake, 1982), LeNet (LeCun et al., 1998) and modern networks such as Alexnet (Krizhevsky et al., 2012), VGG (Simonyan & Zisserman, 2014), ResNet (He et al., 2016), and DenseNet (Huang et al., 2017). In biological systems, local connectivity was famously discovered observed in a cat’s visual system by Hubel & Wiesel (1962). Recent work has strived to build in additional types of invariances, such as rotation, reflection, and scaling (Sifre & Mallat, 2013; Bruna & Mallat, 2013; Esteves et al., 2017; Kanazawa et al., 2014; Worrall et al., 2017; Cohen & Welling, 2016). Our work focusses on the elusive goal of shift-invariance.
33
+
34
+ Though properties such as shift-equivariance have been engineered into networks, what factors and invariances does an emergent representation actually learn? Analysis of deep networks have included qualitative approaches, such as showing patches which activate hidden units (Girshick et al., 2014; Zhou et al., 2014), actively maximizing hidden units (Mordvintsev et al., 2015), and mapping features back into pixel space (Dosovitskiy & Brox, 2016a;b; Mahendran & Vedaldi, 2015; Zeiler & Fergus, 2014; Nguyen et al., 2017; Henaff & Simoncelli, 2015). Our analysis is focused on a ´ specific, low-level property and is complementary to these qualitative approaches.
35
+
36
+ A more quantitative approach for analyzing networks is measuring representation or output changes (or robustness to changes) in response to manually generated perturbations to the input, such as image transformations (Goodfellow et al., 2009; Lenc & Vedaldi, 2015; Azulay & Weiss, 2018), geometric transforms (Ruderman et al., 2018; Fawzi & Frossard, 2015), and CG renderings with various shape, poses, and colors (Aubry & Russell, 2015). A related line of work is in adversarial examples, where directed perturbations in the input can result in large changes in the output. These perturbations can be directly on pixels (Goodfellow et al., 2014a;b), a single pixel (Su et al., 2017), small deformations (Xiao et al., 2018), or even affine transformations (Engstrom et al., 2017). We aim make the network robust to the simplest of these types of attacks and perturbations: shifts. Both Henaff & Simoncelli (2015) and Azulay & Weiss (2018) identify that modern deep networks ´ ignore the Nyquist sampling criterion when downsampling. In our work, we propose and empirically validate an easily adoptable fix which minimally perturbs the existing network architecture.
37
+
38
+ ![](images/1cd533bc2787fa282b5d53439894ed09354873ddb2169d1ab70ac5972c85782b.jpg)
39
+ Figure 2: Classification stability for selected images. Predicted probability of the correct class changes when shifting the image. The baseline (black) exhibits chaotic behavior, which is stabilized by our method (blue).
40
+
41
+ Classic hand-engineered computer vision and image processing representations, such as SIFT (Lowe, 1999), wavelets, and image pyramids (Burt & Adelson, 1987; Adelson et al., 1984) also extract features in a sliding window manner, often with some subsampling factor. As discussed in Simoncelli et al. (1992), literal shift-equivariance cannot hold when with subsampling. Shiftequivariance can be recovered if features are extracted densely, for example textons (Leung & Malik, 2001), the Stationary Wavelet Transform (Fowler, 2005), and DenseSIFT (Vedaldi & Fulkerson, 2010). Deep networks can also be evaluated densely, by removing striding and making appropriate changes to subsequent layers by using a trous ´ /dilated convolutions (Chen et al., 2014; 2018; Yu & Koltun, 2015). This comes at great computation and memory cost. Our work investigates achieving shift-equivariance with minimal additional computation, by blurring before subsampling.
42
+
43
+ Blurring before downsampling is fundamental technique in signal processing (Oppenheim et al., 1999), image processing (Gonzalez & Woods, 1992), computer graphics (Foley et al., 1995), and vision (Szeliski, 2010). In deep learning, average pooling (LeCun et al., 1990) is a form of blurring. Scherer et al. (2010) finds max-pooling to more effective than variants of blurred-downsampling, under the assumption that they are alternatives. Conversely, we show that they are compatible.
44
+
45
+ # 3 METHODS
46
+
47
+ # 3.1 PRELIMINARIES
48
+
49
+ Deep convolutional networks as feature extractors Let an image with resolution $H \times W$ be represented by $X \in \mathbb { R } ^ { H \times W \times 3 }$ . An $L$ -layer CNN can be expressed as a feature extractor $\mathcal { F } _ { l } ( X ) \in$ $\mathbb { R } ^ { \mathbf { \dot { H } } _ { l } \times W \times C _ { l } }$ , with layer $l \in [ 0 , L ]$ , spatial resolution $H _ { l } \times W _ { l }$ and $C _ { l }$ channels. Each feature map can also be upsampled to original resolution, $\widetilde { \mathcal { F } } _ { l } ( X ) \in \mathbb { R } ^ { H _ { l } \times W _ { l } \times C _ { l } }$ .
50
+
51
+ Shift-equivariance and shift-invariance A representation $\widetilde { \mathcal F }$ is shift-equivariant if shifting the input produces a shifted feature map, meaning that shifting and feature extraction are commutable. We more rigorously define the Shift function in Eqn. 4.
52
+
53
+ $$
54
+ \begin{array} { r } { \mathrm { S h i f t } _ { \Delta h , \Delta w } ( \widetilde { \mathcal { F } } ( X ) ) = \widetilde { \mathcal { F } } ( \mathrm { S h i f t } _ { \Delta h , \Delta w } ( X ) ) \quad \forall ( \Delta h , \Delta w ) } \end{array}
55
+ $$
56
+
57
+ ![](images/1c8d92ee51284948f1fcf5480c6dffec1e736d92a5bab930c5c9b6d1de9e7351.jpg)
58
+ 8 Max-Pooling Densley 8 Max-Pooling Densley Figure 3: Toy example of sensitivity to shifts. We illustrate how downsampling affects shift-equivariance 6 Max-Pooling (shift-1) 6 MaxPool-Blur-DS (shift-0) with a toy example. (Top-Left) An input toy signal is in light gray; max-pooled $k = 2$ , $s = 2$ ) toy signal is MaxPool-Blur-DS (shift-1) in blue. (Top-Right) Simply shifting the input and then max-pooling provides a completely different answer (red). (Bot-Left) The blue and red points are inherently sampled from densely max-pooled $k = 2$ , $s = 1$ ) 2 2 intermediate signal (thick black). (Bot-Right) We instead sample from the low-passed intermediate signal, 0 0 shown in green and magenta, better preserving shift-equivariance.
59
+
60
+ A representation is shift-invariant if shifting the input results in an identical representation.
61
+
62
+ $$
63
+ \begin{array} { r } { \mathcal { \widetilde { F } } ( X ) = \mathcal { \widetilde { F } } ( \mathrm { S h i f t } _ { \Delta h , \Delta w } ( X ) ) \quad \forall \ : ( \Delta h , \Delta w ) } \end{array}
64
+ $$
65
+
66
+ For modern classifiers, layer $l = 0$ is the raw pixels, and final layer $L$ is a probability distribution over $D$ classes, $\mathcal { F } _ { L } \in \dot { \Delta } ^ { 1 \times 1 \times D }$ . The net typically progressively reduces spatial resolution, until all resolution is lost and features are of shape $\mathbb { R } ^ { 1 \times \mathbf { i } \times ^ { \mathbf { \dot { C } } _ { l } } }$ . A common technique, such as used in (Lin et al., 2013; He et al., 2016; Huang et al., 2017), is to average across the entire convolutional feature map spatially, and use fully-connected layers in all subsequent layers, which can be expressed as $1 \times 1$ convolutions (Long et al., 2015). In such a setting, as proven by Azulay & Weiss (2018), shift-invariance on the output will necessarily emerge from shift-equivariance in the convolutional features.
67
+
68
+ Modulo-N shift-equivariance/invariance In some cases, the definitions in Equations 1, 2 may hold only when shifts $( \Delta h , \Delta w )$ are integer multiples of N. We refer to these scenarios as modulo$\mathbf { N }$ shift-equivariance or invariance. For example, modulo-2 shift-invariance means that even-pixel shifts of the input result in an identical representation, but odd-pixel shifts may not.
69
+
70
+ # 3.2 CONVENTIONAL POOLING VS PROPOSED POOL-BLUR-DOWNSAMPLE
71
+
72
+ Conventional strided pooling breaks shift-equivariance In Fig. 3, we show an example 1-D signal $[ 0 , 0 , 1 , 1 , 0 , 0 , 1 , 1 ]$ . Max-pooling (kernel $k = 2$ , stride $s = 2$ ) will result in $[ 0 , 1 , 0 , 1 ]$ . Simply shifting the input by one index results a dramatically different answer of $[ 1 , 1 , { \bar { 1 } } , 1 ]$ . Shift-equivariance is lost. As seen in the bottom-left, both of these results are inherently downsampling from an intermediate signal – the input signal densely max-pooled $( k = 2 , s = 1 )$ . We can write a maxpooling layer as a composition of two functions, max-pooling densely evaluated, followed by naive downsampling: $\mathbf { M a x P o o l } _ { k , s } ( X ) = \mathbf { D o w n s a m p l e } _ { s } ( \mathbf { M a x P o o l } _ { k , 1 } ^ { - } ( X ) )$ . Max-pooling preserves shiftequivariance (when evaluated densely), but naive downsampling does not.
73
+
74
+ Blurring before downsampling better preserves shift-equivariance We propose to low-pass filter the intermediate signal before downsampling, as shown in Fig. 3(bot-right). We define our MaxPoolBlurDownsample operator below.
75
+
76
+ $$
77
+ \mathrm { M a x P o o l B l u r D S } _ { k , s } ( X ) = \mathrm { D o w n s a m p l e } _ { s } ( \mathrm { B l u r } _ { k _ { b l u r } } ( \mathrm { M a x P o o l } _ { k , 1 } ( X ) ) )
78
+ $$
79
+
80
+ Sampling from the low-pass filtered signal gives [.5, 1, .5, 1] and [.75, .75, .75, .75] (Fig. 3 bot-right).
81
+ These are closer to each other and better representations of the intermediate signal.
82
+
83
+ The method allows for a choice of blur kernel. In image processing, small kernels are often used across applications such as edge detection (Canny, 1986) and image pyramids (Adelson et al., 1984). We try a number of kernels, ranging from size $2 \times 2$ to $7 \times 7$ . As the blur kernels are separable, it
84
+
85
+ ![](images/aeda7e117f91687fd406623a17882e4e141ee7d064a05b94a8ec819292b758e6.jpg)
86
+ Figure 4: Shift-equivariance throughout the network. We compute feature distance between left and righthand sides of the shift-equivariance condition in Equation 1. Each point in each heatmap is a shift $( \Delta h , \Delta w )$ . Layer resolution is in [brackets]; in the last three, shift-equivariance is equivalent to shift-invariance. Layers pix-pool1(dense) have perfect equivariance (distance 0 at all shifts, shown by blue). Red is half mean distance between two random different images, and is adjusted depending on the layer. (a) On the baseline, shift-equivariance is reduced each time downsampling takes place. Modulo-N shift-equivariance holds, with $_ \mathrm { N }$ doubling with each downsampling. (b) With our proposed change, shift-equivariance is better maintained, and the resulting classfication (softmax) layer is more shift-invariant.
87
+
88
+ can be implemented as a series of two convolutions (vertical blur followed by horizontal), and added computation scales linearly with $k _ { b l u r }$ , rather than quadratically.
89
+
90
+ # 4 EXPERIMENTS
91
+
92
+ # 4.1 EXPERIMENTAL SETUP
93
+
94
+ Data, architecture, training schedule We test on CIFAR10 classification (Krizhevsky & Hinton, 2009), which consists of 50k training and 10k testing images at resolution $3 2 \times 3 2$ . We use the VGG13 architecture (Simonyan & Zisserman, 2014) from the PyTorch framework (Paszke et al., $2 0 1 7 ) ^ { 1 }$ and will make code available.
95
+
96
+ Each block consists of 2 Conv-BatchNorm-ReLU chunks, followed by MaxPool, doubling feature channels and halving spatial resolution until all resolution is lost. A final softmax predicts a probability vector. We use stochastic gradient descent (SGD) with momentum 0.9 and batch size 128. We train for 100 epochs at initial learning rate 0.1 and 50 additional epochs at 0.01 and 0.01.
97
+
98
+ Low-pass filter kernels We try a number of standard low-pass filters, shown in Table 1, ranging from size $2 \times 2$ to $7 \times 7$ . All filters allow the DC signal pass and suppress (or completely kill) the highest frequency. Variations in filters correspond to tradeoffs between location of the cutoff frequency, slope of the cutoff, and variation of lobes in the passband and stopband. These properties are well-studied in the context of finite impulse response (FIR) filter design. However, it is unclear which types of filters are best suited for deep networks, so we empirically investigate their effects.
99
+
100
+ Circular convolution and shifting Edge artifacts are an important consideration. When an image is shifted, information is necessarily lost on one side, and has to be filled in on the other. In all our experiments, we use circular shifting and convolution. When the convolutional kernel hits the edge, it wraps to the other side. When shifting, pixels are “rolled” off the edge to the other side.
101
+
102
+ ![](images/e65d8f20853722e10aa0a22cbb15926d1b7d59d123e19babcf8f14dc818ac2ed.jpg)
103
+ 0.04 0.02 0.00 0.02 0.04Figure 5: Classification consistency vs. classification. Networks trained (left) without and (right) with shiftbased data augmentation, using various filters. Up (more consistent) and to the right (more accurate) is better. Number of sides corresponds to number of filter taps used (e.g., diamond for 4-tap filter); colors correspond to different methods for generating FIR filters. We highlight filters Rectangle (4), Triangle (5), and Binomial (5-7), which perform consistently well in both metrics and settings.
104
+
105
+ Table 1: Classification consistency and classification. Results across blurring filters and training scenarios (without and with data augmentation). We evaluate classification accuracy without shifts (Test accuracy – None) and on random shifts (Test accuracy – Random), as well as classification consistency. Highlighted filters perform consistently well in both metrics and settings, as more easily seen in Fig. 5.
106
+
107
+ <table><tr><td rowspan="3">Filter shape</td><td rowspan="3">#Taps</td><td rowspan="3">Weights</td><td colspan="3">Train with no augmentation</td><td colspan="3">Train with augmentation</td></tr><tr><td colspan="2">Test accuracy</td><td>Classification</td><td colspan="2">Test accuracy</td><td>Classification</td></tr><tr><td>None</td><td>Rand</td><td>Consistency</td><td>None</td><td>Rand</td><td>Consistency</td></tr><tr><td>Delta (baseline)</td><td>1</td><td>[三]</td><td>91.6</td><td>87.4</td><td>88.1</td><td>93.4</td><td>93.7</td><td>96.6</td></tr><tr><td>Rectangle</td><td>2</td><td>[1,1]</td><td>92.8</td><td>89.3</td><td>90.5</td><td>93.9</td><td>93.8</td><td>97.6</td></tr><tr><td>Rectangle</td><td>3</td><td>[1,1,1]</td><td>93.4</td><td>91.8</td><td>94.5</td><td>93.6</td><td>93.7</td><td>97.9</td></tr><tr><td>Rectangle</td><td>4</td><td>[1, 1, 1, 1]</td><td>93.2</td><td>92.9</td><td>97.7</td><td>93.4</td><td>93.4</td><td>98.5</td></tr><tr><td>Rectangle</td><td>5</td><td>[1, 1, 1, 1, 1]</td><td>92.2</td><td>92.1</td><td>98.3</td><td>92.4</td><td>92.5</td><td>98.7</td></tr><tr><td>Rectangle Rectangle</td><td>6</td><td>[1,1,1,1,1, 1]</td><td>91.4</td><td>91.2</td><td>97.3</td><td>91.4</td><td>91.5</td><td>98.9</td></tr><tr><td></td><td>7</td><td>[1, 1, 1,1, 1,1, 1]</td><td>90.8</td><td>90.7</td><td>98.8</td><td>90.5</td><td>90.5</td><td>99.0</td></tr><tr><td>Triangle</td><td>3</td><td>[1,2, 1]</td><td>93.1</td><td>91.4</td><td>93.9</td><td>93.6</td><td>93.5</td><td>98.0</td></tr><tr><td>Triangle</td><td>5</td><td>[1,2,3,2, 1]</td><td>93.3</td><td>93.0</td><td>98.2</td><td>93.3</td><td>93.2</td><td>98.6</td></tr><tr><td>Triangle</td><td>7</td><td>[1,2, 3,4, 3,2, 1]</td><td>92.3</td><td>92.3</td><td>98.8</td><td>92.4</td><td>92.3</td><td>99.0</td></tr><tr><td>Binomial</td><td>4</td><td>[1, 3,3,1]</td><td>93.0</td><td>91.1</td><td>93.2</td><td>93.4</td><td>93.3</td><td>98.1</td></tr><tr><td>Binomial Binomial</td><td>5</td><td>[1, 4, 6, 4, 1]</td><td>93.2</td><td>92.6</td><td>96.3</td><td>93.1</td><td>93.2</td><td>98.4</td></tr><tr><td>Binomial</td><td>6 7</td><td>[1,5,10,10,5,1] [1,6,15,20,15,6,1]</td><td>93.0 93.0</td><td>92.4</td><td>96.9</td><td>93.4 93.2</td><td>93.3</td><td>98.6 98.8</td></tr><tr><td></td><td></td><td></td><td></td><td>93.0</td><td>98.1</td><td></td><td>93.2</td><td></td></tr><tr><td>Window Window</td><td>3</td><td>[1, 1.57,1]</td><td>93.3</td><td>91.5</td><td>94.2</td><td>93.5</td><td>93.5</td><td>98.0</td></tr><tr><td>Window</td><td>6 7</td><td>[-1,1.67,5,5,1.67,-1] [-1,0,3,4.71,3,0,-1]</td><td>92.9 92.4</td><td>90.2 91.1</td><td>91.0</td><td>93.4 93.4</td><td>93.5</td><td>98.1</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td>94.0</td><td></td><td>93.5</td><td>97.8</td></tr><tr><td>Least Squares Least Squares</td><td>3 7</td><td>[1, 1,63,1] [-1,0,3.80,6.13,3.80,0,-1]</td><td>93.1 92.7</td><td>91.4 91.0</td><td>93.8 93.9</td><td>93.7 93.4</td><td>93.8 93.5</td><td>98.0 97.9</td></tr></table>
108
+
109
+ This modification minorly decreases classification performance, $9 3 . 8 \%$ vs $9 3 . 4 \%$ with data augmentation. This could potentially be mitigated by additional padding, at the expense of memory and computation. But more importantly, this methodology affords us a clean testbed. Any loss in shift-equivariance or invariance is purely due to characteristics of the feature extractor.
110
+
111
+ # 4.2 ANALYSIS
112
+
113
+ We measure shift-equivariance/invariance in three ways, targeting different aspects. We first focus on the shift-equivariance of the internal layers. We then check on the agreement of the hard output classification. Finally, we measure how much the soft predicted probability itself varies.
114
+
115
+ 1. Feature distance (lower is better). We test how close shift-equivariance and invariance are to being fulfilled by computing $d ( \mathrm { S h i f t } _ { \Delta h , \Delta w } ( \widetilde { \mathcal { F } } ( X ) ) , \widetilde { \mathcal { F } } ( \mathrm { S h i f t } _ { \Delta h , \Delta w } ( X ) ) )$ and $d ( \widetilde { \mathcal { F } } ( X ) , \widetilde { \mathcal { F } } ( \mathrm { S h i f t } _ { \Delta h , \Delta w } ( X ) )$ (left & right-hand sides of Eq. 1, 2), respectively. We use cosine distance, which is commonly used for deep features (Kiros et al., 2015; Zhang et al., 2018).
116
+
117
+ ![](images/bed342aeaffe9da628817a2390853f95a8e30ab95edbcb8ff270570f9ae50a3b.jpg)
118
+ Figure 6: Distribution of per-image classification variation. We show the distribution of classification variation in the test set, (left) without and (right) with data augmentation at training. Lower variation means more consistent classifications (and increased shift-invariance). Training with data augmentation drastically reduces variation in classification. Adding filtering further decreases variation.
119
+
120
+ 2. Classification consistency (higher is better). Perhaps of greatest interest is the actual decisions the classifier makes. We can measure its consistency by checking how often the network outputs the same classification, given the same image with two different shifts: $\mathbb { E } _ { ( X , h _ { 1 } , w _ { 1 } , h _ { 2 } , w _ { 2 } ) } \mathbb { 1 } \{ \arg \operatorname* { m a x } P ( \mathrm { S h i f t } _ { h _ { 1 } , w _ { 1 } } ( X ) ) = \arg \operatorname* { m a x } P ( \mathrm { S h i f t } _ { h _ { 2 } , w _ { 2 } } ( X ) ) \} .$ .
121
+
122
+ 3. Classification variation (lower is better). The metric above looks at the hard classification, discounting classifier confidence. Similar to Azulay & Weiss (2018), we trace the variation in probability of correct classification, given different shifts. We can capture the variation across all possible shifts: $\sqrt { V a r _ { h , w } ( \{ P _ { \mathrm { c o r r e c t \thinspace c l a s s } } ( \mathrm { S h i f t } _ { h , w } ( X ) ) \} \} ) }$ .
123
+
124
+ Table 1 shows results across a number of different low-pass filters, training with and without data augmentation. We dissect the results below.
125
+
126
+ How shift-equivariant are deep features? In Fig. 4 (top), we compute distance from shiftequivariance, as a function of all possible shift-offsets $( \Delta h , \Delta w )$ and layers. MaxPool layers are broken into two components – before and after downsampling. Pixels are trivially shift-equivariant, as are all layers before the first downsampling. Once downsampling occurs in pool1(ds), shiftequivariance is lost. However, modulo-N shift-equivariance still holds, and each subsequent downsampling doubles the factor.
127
+
128
+ Additionally, we observe that before the downsampling operation, the pooling layer first increases shift-equivariance (e.g., conv3 2 to pool3(dense)). This is consistent with the long-held intuition that pooling build invariances inside the network (LeCun et al., 1990) and isolates the downsampling operation as the culprit behind loss of shift-equivariance.
129
+
130
+ Does blurring before downsampling achieve better shift-equivariance? In Fig. 4 (bottom), we add a blurring filter to the MaxPool layers, as proposed in Section 3, and again plot shiftequivariance maps for each layer. Shift-equivariance is clearly better preserved. In particular, the severe drop-offs in downsampling layers do not occur. Improved shift-equivariance throughout the network cascades into more consistent classifications in the final softmax layer.
131
+
132
+ Some selected examples are in Fig. 2. Our method stabilizes the classifications. In Fig. 6, we show the distribution of classification variations, before and after adding in the low-pass filter. Even a small $2 \times 2$ filter, immediately variation. As the filter size is increased, the output classification variation decreases. This has a larger effect when training without data augmentation, but is still observable when training with data augmentation.
133
+
134
+ Does shift-invariance degrade performance? Our method produces more shift-equivariant feature maps and consequently, more shift-invariant outputs. However, does this come at a cost?
135
+
136
+ We study the output classification consistency versus classification accuracy. In Fig. 5 (left), we show results, trained without shift-based data augmentation. Training with the baseline MaxPooling gives accuracy $9 1 . 6 \%$ and consistency $8 8 . 1 \%$ . Our proposed change – with a $5 \times 5$ triangle filter improves accuracy to $9 3 . 3 \%$ and consistency to $9 8 . { \bar { 2 } } \%$ . This indicates that low-pass filtering does not destroy the signal, or make learning harder. On the contrary, preserving shift-equivariance serves as “built-in” augmentation, indicating more efficient data usage.
137
+
138
+ In principle, networks can learn to be shift-invariant from data. Does adding shift-based data augmentation remove the benefit from method? Shift-based data augmentation with the baseline network results in consistency of $9 6 . 6 \%$ , lower than our method trained without data augmentation. In addition, as seen in Fig. 5 (right), applying out method with data augmentation provides an immediate jump in classification consistency, while maintaining accuracy. From there, a clear tradeoff appears – higher amounts of shift-invariance can be achieved at the cost of decreased accuracy. For example, very large rectangular filters over-aggressively smooth the signal. Downstream applications may favor one factor over another, and the choice of filter allows one to explore this space.
139
+
140
+ Fig. 6 investigates the distribution of classification variations. Training with data augmentation with the baseline network reduces variation (black lines on both plots). Our method reduces variation in both scenarios. More aggressive filtering further decreases variation.
141
+
142
+ ![](images/70eb9b477c581899fd0bd138cd0ee7b70af1acfd55e729f557bf23afa2de39cc.jpg)
143
+ Figure 7: Total Variation (TV) by layer. We compute average smoothness of learned conv filters per layer (lower is smoother). Baseline MaxPool is in black, and adding additional blurring is shown in colors. Note that the learned convolutional layers become smoother, indicating that a smoother feature extractor is induced. The Binomial7 filter produces consistently strong results, in both consistency and accuracy.
144
+
145
+ How do the learned convolutional filters change with the proposed modification? We measure spatial smoothness using the normalized Total Variation (TV) metric proposed in Ruderman et al. (2018). Our proposed change smooths the internal feature maps for purposes of downsampling. As shown in Fig. 7, this induces smoother learned filters throughout the network. Adding in more aggressive blur kernels further decreases the TV (increasing smoothness). This indicates that our modification actually induces a smoother feature extractor overall.
146
+
147
+ How does the proposed method affect timing? In Tab. 2, we show the added time each element of the proposed method takes: evaluating the MaxPool layer at stride 1 instead of stride 2, and running a blurring filter. Since the blurring filters are separable, time increases linearly with filter size. The largest filter adds $1 2 . 3 \%$ per forward pass. This is significantly cheaper than evaluating multiple forward passes in an ensembling approach $1 0 2 4 \times$ computation to evaluate every shift), or evaluating each layer more densely by exchanging striding for dilation $( 4 \times , 1 6 \times , 6 4 \times , 2 5 6 \times$ computation for conv2-conv5, respectively). These timings are on our VGG13 network setup. With deeper networks, the relative added computation decreases.
148
+
149
+ Table 2: Timing analysis We test the average speed of a forward pass on a GTX1080Ti Nvidia GPU for a batch size of 100 of $3 2 \times 3 2$ image with the VGG13 network.
150
+
151
+ <table><tr><td>Model</td><td>Timing [ms]</td><td>% added</td></tr><tr><td>Baseline</td><td>10.19</td><td>+0.00%</td></tr><tr><td>+ dense pool</td><td>10.50</td><td>+3.04%</td></tr><tr><td>+ dense pool+3× 3 filter</td><td>11.06</td><td>+8.52%</td></tr><tr><td>+ dense pool +5 × 5 filter</td><td>11.27</td><td>+10.6%</td></tr><tr><td>+ dense pool +7 × 7 filter</td><td>11.45</td><td>+12.3%</td></tr></table>
152
+
153
+ # 5 CONCLUSIONS AND DISCUSSION
154
+
155
+ In summary, we show that shift-invariance is lost through a deep network, as downsampling in pooling layers do not meet the Nyquist criteria. We propose a simple architectural modification, following signal processing principles, to improve shift-equivariance. This change allows the network architecture designer to keep their pooling layer of choice untouched.
156
+
157
+ We achieve higher consistency while maintaining classification performance. In addition, we show large improvements in both performance and consistency when training without data augmentation. This is potentially applicable to online learning scenarios, where the data distribution is changing. Future directions include exploring the potential benefit to downstream applications, such as nearest-neighbor retrieval, improving temporal consistency in video models, robustness to adversarial examples, and high-level vision tasks such as detection. Another possible future direction is learning the downsampling kernels. Overall, our experiments indicate that this classical signal processing technique has a place in modern deep networks.
158
+
159
+ # APPENDIX
160
+
161
+ # A DENSENET ARCHITECTURE
162
+
163
+ Blurring before downsampling can be applied to any strided layer in any network. We provide an additional experiment using the DenseNet architecture (Huang et al., 2017). In Fig. 8, we show classification consistency vs. accuracy, similar to Fig. 5 for VGG13 in the main paper.
164
+
165
+ ![](images/108620dd16b85b40ed1a5261de83c7a85ee25eb99e98169ddb969b4de9d6526a.jpg)
166
+ 0.04 0.02 0.00 0.02 0.04 Figure 8: Classification consistency vs. classification for DenseNet Same test in as in Fig. 5, but with DenseNet (Huang et al., 2017) instead of VGG13 (Simonyan & Zisserman, 2014). We show networks trained (left) without and (right) with shift-based data augmentation, using various blurring filters. Consistency is computed by computing classification of an image with two random shifts, and checking for agreement. Up (more consistent) and to the right (more accurate) is better. Number of sides corresponds to number of filter taps used (e.g., triangle for 3-tap filter); colors correspond to different methods for generating FIR filters.
167
+
168
+ Comparison to VGG13 for Baseline Network We use the DenseNet-40-12 architecture, from a publicly available implementation.2 Relative to VGG13, DenseNet achieves higher performance $( 9 4 . 4 \%$ vs $9 3 . 8 \%$ ), despite using fewer parameters (1M vs 9M). DenseNet also starts with higher shift-invariance $( 9 7 . 7 \%$ vs. $9 6 . 6 \hat { \% } _ { . }$ ) for two reasons: (a) fewer downsampling layers (2 vs 5) and (b) already using blurring before downsampling, in the form of AveragePool layers, equivalent to using a Rectangle (2) filter. We investigate the effects of replacing this $2 \times 2$ filter.
169
+
170
+ Results on DenseNet Our method improves the DenseNet results, and confirms the findings in the main paper. In some cases, results are actually stronger. The primary findings are:
171
+
172
+ • As seen in Fig. 8 (left), using a stronger low-pass filter, such as Binomial (5, 7) without data augmentation, provides competitive performance compared to the baseline trained with data augmentation. For Binomial (7), performance is actually better in both consistency and accuracy. • As seen in Fig. 8 (right), when training with data augmentation, using filters such as Rect (3), Triangle (3,5), and Binomial (5,7) not only increase consistency, as expected, but also slightly increases accuracy, surprisingly.
173
+
174
+ The observations for DenseNet corroborate the results from VGG13 in the main paper, further demonstrating the effectiveness of blurring before downsampling.
175
+
176
+ # B ROBUSTNESS TO SHIFT-BASED ADVERSARY
177
+
178
+ In the main paper, we show that using the proposed PoolBlurDownsample method increases the classification consistency, while maintaining accuracy. A logical consequence is increased accuracy in presence of a shift-based adversary. We empirically confirm this in Fig. 9 for VGG13 on CIFAR10. We compute classification accuracy as a function of maximum adversarial shift. A max shift of 2 means the adversary can choose any of the 25 positions within a $5 \times 5$ window. For the classifier to “win”, it must correctly classify all of them correctly. Max shift of 0 means that there is no adversary. Conversely, a max shift of 16 means the image must be correctly classified at all $3 2 \times 3 2 = 1 0 2 4$ positions.
179
+
180
+ Our primary observations are as follows:
181
+
182
+ • As seen in Fig. 9 (left), the baseline network (gray) is very sensitive to the adversary.
183
+ • Adding larger Binomial filters (from red to purple) increases robustness to the adversary. In fact, Binomial (7) filter (purple) without augmentation outperforms the baseline (black) with augmentation.
184
+ • As seen in Fig. 9 (right), adding larger Binomial filters also increases adversarial robustness, even when training with augmentation.
185
+
186
+ These results corroborate the findings in the main paper, and demonstrate a use case: increased robustness to shift-based adversarial attack.
187
+
188
+ ![](images/60212be8f0cdf442f60f771a46812a06b113c0639bc21e17b65231cf46189bd4.jpg)
189
+ Figure 9: Robustness to shift-based adversarial attack. Classification accuracy as a function of the number of pixels an adversary is allowed to shift the image. Applying our proposed filtering increases robustness, both without (left) and with right data augmentation.
190
+
191
+ # C EFFECT OF BLURRING BEFORE POOLING
192
+
193
+ In our proposed method, we break the strided-pooling operation into two, and blur in between. This allows us to directly blur before downsampling, which has solid theoretical backing in sampling theory (Oppenheim et al., 1999), and is commonly used in image processing (Gonzalez & Woods, 1992), graphics (Foley et al., 1995), and computer vision (Szeliski, 2010). Here, we empirically investigate blurring before pooling instead.
194
+
195
+ Fig. 10 shows the results by applying blurring first (shown in the gray points), in comparison our proposed method (colored polygons, as shown before in Fig. 5). We make the following observations:
196
+
197
+ • In Fig. 10 (right), when training with augmentation, blurring before pooling reduces performance for all filters. For almost all filters (with few exceptions), both classification accuracy and consistency are significantly reduced.
198
+ • In Fig. 10 (left), when training without augmentation, the lower performing filters actually perform better when blurring before filtering. For the better filters, however, blurring before pooling lowers performance (similar shift-invariance, but lower accuracy).
199
+
200
+ The signal pre-pooling is undoubtedly related to the signal post-pooling. Thus, blurring before pooling provides “second-hand” anti-aliasing, and still increases shift-invariance over the baseline. Though it does empirically help in certain circumstances (the lower-performing filters, without augmentation), the best performing filters use the proposed PoolBlurDownsample ordering.
201
+
202
+ ![](images/fc3fc005ad0c6c35b42051c1829110a12875808e7553f2a75e56d966788cb20a.jpg)
203
+ 0.00 0.02 0.04 0.06 0.08 0.10Figure 10: Blurring before pooling. Blurring before the max-pooling (gray points) for different filters, as compared to their PoolBlurDownsample counterparts (colored polygons). The poorer performing filters, when training without data augmentation, observe an increase in performance. For almost all filters when training with data augmentation, and for the higher-performing filters training without data augmentation, performance is significantly reduced, often in both accuracy and consistency. Directly blurring the downsampled signal (after the pooling layer), as proposed in the main paper, is more effective.
204
+
205
+ # D AVERAGE ACCURACY ACROSS SPATIAL POSITIONS
206
+
207
+ In Figure 11, we show how accuracy systematically degrades as a function of spatial shift, when training without augmentation. We observe the following:
208
+
209
+ • On the left, the baseline heatmap shows that classification accuracy when testing with no shift, but quickly degrades when shifting.
210
+ • The proposed filtering decreases the degradation. Binomial-7 is largely consistent across all spatial positions.
211
+ • On the right, we plot the accuracy when making diagonal shifts. As increased filtering is added, classification accuracy becomes consistent in all positions.
212
+
213
+ ![](images/a7418dcd5979dfe859cf8528d7af7af9e9ecb04c245903404c8ea80c7c54d37f.jpg)
214
+ Figure 11: Average accuracy as a function of shift. (Left) We show classification accuracy across the test set as a function of shift, given different filters. (Right) We plot accuracy vs diagonal shift in the input image, across different filters. Note that accuracy degrades quickly with the baseline, but as increased filtering is added, classifications become consistent across spatial positions.
215
+
216
+ # E FILTER DISCUSSION
217
+
218
+ # E.1 FILTER SELECTION
219
+
220
+ We use select standard low-pass filters to empirically test. The filter weights are shown in Tab. 1 in the main paper. Note that weights are normalized to sum to 1. Rectangle, Triangle, and Binomial filters are discussed in textbooks such as (Szeliski, 2010). Window and Least Squares are more advanced FIR filter design techniques.
221
+
222
+ • Rectangle: a moving average, often referred to as a box filter. The filter is a vector of length ones. For example, Rect-2, is [1, 1]. This filter, followed by subsampling, is equivalent to the AveragePooling layer.
223
+
224
+ • Triangle: linearly decreases weight of neighboring values. This is equivalent of applying box filtering twice. For example, Triangle-3 is $[ 1 , 2 , 1 ]$ , is two Rect-2 [1, 1] filters convolved together, and Triangle-5 is $[ 1 , 2 , 3 , 2 , 1 ]$ , is two Rect-3 $[ 1 , 1 , 1 ]$ filters convolved together.
225
+
226
+ • Binomial: Filter used in Laplacian Pyramids (Burt & Adelson, 1987); [1, 1] filter convolved with itself repeatedly. Note that Binomial-2,3 is equivalent to Rectangle-2 and Triangle-3, respectively.
227
+
228
+ • Window: filter produced using the window method (firwin), as described in “7.4 Optimum Approximations for FIR Filters” in Oppenheim et al. (1999).
229
+
230
+ • Least Squares: least squares error minimization (firls), from Python scipy.signal toolbox, as described in Selesnick (2005).
231
+
232
+ # E.2 FILTER SEPARABILITY
233
+
234
+ As discussed in Section 3.2, our filters are separable. Consider a $G \in \mathbb { R }$ . If $G$ is rank-1, it can be decomposed (or separated) into $G _ { \mathrm { y } } G _ { \mathrm { x } }$ , where $G _ { \mathrm { y } } \in \mathbb { R } ^ { K \times 1 }$ and $G _ { \mathrm { x } } \in \mathbb { R } ^ { 1 \times K }$ . This is an important consideration when convolving G with signal X ∈ RH×W .
235
+
236
+ $$
237
+ G * X = ( G _ { \mathrm { y } } * G _ { \mathrm { x } } ) * X = G _ { \mathrm { y } } * ( G _ { \mathrm { x } } * X ) \mathrm { , w h e r e * i s c o n v o l u t i o n }
238
+ $$
239
+
240
+ The left-hand side, evaluating the blur with 2-D convolution takes $H \times W \times K \times K$ multiply-adds, with runtime scaling quadratically with $K ^ { 2 }$ . Meanwhile, evaluating a horizontal and vertical blur sequentially takes $H \times W \times K$ multiply-adds each, scaling linearly by $K$ .
241
+
242
+ # REFERENCES
243
+
244
+ Edward H Adelson, Charles H Anderson, James R Bergen, Peter J Burt, and Joan M Ogden. Pyramid methods in image processing. RCA engineer, 29(6):33–41, 1984.
245
+
246
+ Mathieu Aubry and Bryan C Russell. Understanding deep features with computer-generated imagery. In Proceedings of the IEEE International Conference on Computer Vision, pp. 2875–2883, 2015.
247
+
248
+ Aharon Azulay and Yair Weiss. Why do deep convolutional networks generalize so poorly to small image transformations? arXiv preprint arXiv:1805.12177, 2018.
249
+
250
+ Joan Bruna and Stephane Mallat. Invariant scattering convolution networks. ´ IEEE transactions on pattern analysis and machine intelligence, 35(8):1872–1886, 2013.
251
+
252
+ Peter J Burt and Edward H Adelson. The laplacian pyramid as a compact image code. In Readings in Computer Vision, pp. 671–679. Elsevier, 1987.
253
+
254
+ John Canny. A computational approach to edge detection. IEEE Transactions on pattern analysis and machine intelligence, (6):679–698, 1986.
255
+
256
+ Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Semantic image segmentation with deep convolutional nets and fully connected crfs. arXiv preprint arXiv:1412.7062, 2014.
257
+
258
+ Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. IEEE transactions on pattern analysis and machine intelligence, 40(4): 834–848, 2018.
259
+
260
+ Taco Cohen and Max Welling. Group equivariant convolutional networks. In International conference on machine learning, pp. 2990–2999, 2016.
261
+
262
+ Alexey Dosovitskiy and Thomas Brox. Generating images with perceptual similarity metrics based on deep networks. In Advances in Neural Information Processing Systems, pp. 658–666, 2016a.
263
+
264
+ Alexey Dosovitskiy and Thomas Brox. Inverting visual representations with convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4829– 4837, 2016b.
265
+
266
+ Logan Engstrom, Dimitris Tsipras, Ludwig Schmidt, and Aleksander Madry. A rotation and a translation suffice: Fooling cnns with simple transformations. arXiv preprint arXiv:1712.02779, 2017.
267
+
268
+ Carlos Esteves, Christine Allen-Blanchette, Xiaowei Zhou, and Kostas Daniilidis. Polar transformer networks. arXiv preprint arXiv:1709.01889, 2017.
269
+
270
+ Alhussein Fawzi and Pascal Frossard. Manitest: Are classifiers really invariant? arXiv preprint arXiv:1507.06535, 2015.
271
+
272
+ James D. Foley, Andries van Dam, Steven K. Feiner, and John F. Hughes. Computer Graphics: Principles and Practice. Addison-Wesley, 2nd edition, 1995.
273
+
274
+ James E Fowler. The redundant discrete wavelet transform and additive noise. IEEE Signal Processing Letters, 12(9):629–632, 2005.
275
+
276
+ Kunihiko Fukushima and Sei Miyake. Neocognitron: A self-organizing neural network model for a mechanism of visual pattern recognition. In Competition and cooperation in neural nets, pp. 267–285. Springer, 1982.
277
+
278
+ Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 580–587, 2014.
279
+
280
+ Rafael C. Gonzalez and Richard E. Woods. Digital Image Processing. Pearson, 2nd edition, 1992.
281
+
282
+ Ian Goodfellow, Honglak Lee, Quoc V Le, Andrew Saxe, and Andrew Y Ng. Measuring invariances in deep networks. In Advances in neural information processing systems, pp. 646–654, 2009.
283
+
284
+ Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing systems, 2014a.
285
+
286
+ Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014b.
287
+
288
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Computer Vision and Pattern Recognition (CVPR), June 2016.
289
+
290
+ Olivier J Henaff and Eero P Simoncelli. Geodesics of learned representations. ´ arXiv preprint arXiv:1511.06394, 2015.
291
+
292
+ Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In CVPR, volume 1, pp. 3, 2017.
293
+
294
+ David H Hubel and Torsten N Wiesel. Receptive fields, binocular interaction and functional architecture in the cat’s visual cortex. The Journal of physiology, 160(1):106–154, 1962.
295
+
296
+ Angjoo Kanazawa, Abhishek Sharma, and David Jacobs. Locally scale-invariant convolutional neural networks. arXiv preprint arXiv:1412.5104, 2014.
297
+
298
+ Ryan Kiros, Yukun Zhu, Ruslan R Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Skip-thought vectors. In Advances in neural information processing systems, pp. 3294–3302, 2015.
299
+
300
+ Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009.
301
+
302
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012.
303
+
304
+ Yann LeCun, Bernhard E Boser, John S Denker, Donnie Henderson, Richard E Howard, Wayne E Hubbard, and Lawrence D Jackel. Handwritten digit recognition with a back-propagation network. In Advances in neural information processing systems, pp. 396–404, 1990.
305
+
306
+ Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to ´ document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
307
+
308
+ Karel Lenc and Andrea Vedaldi. Understanding image representations by measuring their equivariance and equivalence. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 991–999, 2015.
309
+
310
+ Thomas Leung and Jitendra Malik. Representing and recognizing the visual appearance of materials using three-dimensional textons. International journal of computer vision, 43(1):29–44, 2001.
311
+
312
+ Min Lin, Qiang Chen, and Shuicheng Yan. Network in network. arXiv preprint arXiv:1312.4400, 2013.
313
+
314
+ Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Computer Vision and Pattern Recognition (CVPR), 2015.
315
+
316
+ David G Lowe. Object recognition from local scale-invariant features. In Computer vision, 1999. The proceedings of the seventh IEEE international conference on, volume 2, pp. 1150–1157. Ieee, 1999.
317
+
318
+ Aravindh Mahendran and Andrea Vedaldi. Understanding deep image representations by inverting them. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 5188–5196, 2015.
319
+
320
+ Alexander Mordvintsev, Christopher Olah, and Mike Tyka. Deepdream-a code example for visualizing neural networks. Google Research, 2:5, 2015.
321
+
322
+ Anh Nguyen, Jeff Clune, Yoshua Bengio, Alexey Dosovitskiy, and Jason Yosinski. Plug & play generative networks: Conditional iterative generation of images in latent space. In CVPR, volume 2, pp. 7, 2017.
323
+
324
+ Alan V. Oppenheim, Ronald W. Schafer, and John R. Buck. Discrete-Time Signal Processing. Pearson, 2nd edition, 1999.
325
+
326
+ Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017.
327
+
328
+ Avraham Ruderman, Neil C Rabinowitz, Ari S Morcos, and Daniel Zoran. Pooling is neither necessary nor sufficient for appropriate deformation stability in cnns. arXiv preprint arXiv:1804.04438, 2018.
329
+
330
+ Dominik Scherer, Andreas Muller, and Sven Behnke. Evaluation of pooling operations in con- ¨ volutional architectures for object recognition. In Artificial Neural Networks–ICANN 2010, pp. 92–101. Springer, 2010.
331
+
332
+ Ivan Selesnick. Linear-phase fir filter design by least squares, 2005. URL http: //web.archive.org/web/20080207010024/http://www.808multimedia. com/winnt/kernel.htm.
333
+
334
+ Laurent Sifre and Stephane Mallat. Rotation, scaling and deformation invariant scattering for texture ´ discrimination. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1233–1240, 2013.
335
+
336
+ Eero P Simoncelli, William T Freeman, Edward H Adelson, and David J Heeger. Shiftable multiscale transforms. IEEE transactions on Information Theory, 38(2):587–607, 1992.
337
+
338
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
339
+
340
+ Jiawei Su, Danilo Vasconcellos Vargas, and Sakurai Kouichi. One pixel attack for fooling deep neural networks. arXiv preprint arXiv:1710.08864, 2017.
341
+
342
+ Richard Szeliski. Computer vision: algorithms and applications. Springer Science & Business Media, 2010.
343
+
344
+ Andrea Vedaldi and Brian Fulkerson. Vlfeat: An open and portable library of computer vision algorithms. In Proceedings of the 18th ACM international conference on Multimedia, pp. 1469– 1472. ACM, 2010.
345
+
346
+ Daniel E Worrall, Stephan J Garbin, Daniyar Turmukhambetov, and Gabriel J Brostow. Harmonic networks: Deep translation and rotation equivariance. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), volume 2, 2017.
347
+
348
+ Chaowei Xiao, Jun-Yan Zhu, Bo Li, Warren He, Mingyan Liu, and Dawn Song. Spatially transformed adversarial examples. arXiv preprint arXiv:1801.02612, 2018.
349
+
350
+ Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. arXiv preprint arXiv:1511.07122, 2015.
351
+
352
+ Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In European conference on computer vision, pp. 818–833. Springer, 2014.
353
+
354
+ Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In CVPR, 2018.
355
+
356
+ Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Object detectors emerge in deep scene cnns. arXiv preprint arXiv:1412.6856, 2014.
parse/train/SklVEnR5K7/SklVEnR5K7_content_list.json ADDED
@@ -0,0 +1,1921 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "MAKING CONVOLUTIONAL NETWORKS SHIFT-INVARIANT AGAIN ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 99,
9
+ 650,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 171,
20
+ 398,
21
+ 198
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 236,
32
+ 544,
33
+ 251
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Modern convolutional networks are not shift-invariant, despite their convolutional nature: small shifts in the input can cause drastic changes in the internal feature maps and output. In this paper, we isolate the cause – the downsampling operation in convolutional and pooling layers – and apply the appropriate signal processing fix – low-pass filtering before downsampling. This simple architectural modification boosts the shift-equivariance of the internal representations and consequently, shift-invariance of the output. Importantly, this is achieved while maintaining downstream classification performance. In addition, incorporating the inductive bias of shift-invariance largely removes the need for shift-based data augmentation. Lastly, we observe that the modification induces spatially-smoother learned convolutional kernels. Our results suggest that this classical signal processing technique has a place in modern deep networks. ",
40
+ "bbox": [
41
+ 233,
42
+ 271,
43
+ 764,
44
+ 438
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 476,
55
+ 336,
56
+ 492
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Deep convolutional neural networks (CNNs) are designed to perform high-level tasks and be robust to low-level nuisance factors. For example, small shifts in the input should simply shift the internal feature maps (shift-equivariance), and leave the output relatively unaffected (shift-invariance). This property has been explicitly engineered through convolutional and pooling layers, where the same function is applied on a local region across the image in a sliding window fashion. However, recent work (Engstrom et al., 2017; Azulay & Weiss, 2018) has found that small shifts can drastically change the output of a classification network. Why is this the case? ",
63
+ "bbox": [
64
+ 174,
65
+ 512,
66
+ 825,
67
+ 609
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Shift-invariance is lost when spatial resolution is lost, for example, from pooling layers. Our insight is that conventional strided-pooling, as shown in Fig. 1 (top), is inherently composed of two operations: (1) evaluating the pooling operator densely (without striding), and (2) downsampling. Naive downsampling loses shift-equivariance, as high-frequency components of the signal alias into low-frequencies. This phenomenon is commonly illustrated in movies, where wheels appear to spin backwards, due to the frame rate not meeting the Nyquist sampling criterion (known as the Stroboscopic effect). Separating these operations is important, as it allows us to keep the pooling operation, while applying the appropriate fix to the downsampling operation. ",
74
+ "bbox": [
75
+ 174,
76
+ 616,
77
+ 825,
78
+ 728
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "We propose to add the signal processing tool of low-pass filtering before downsampling, as shown in Fig. 1 (bottom). By low-pass filtering, the high-frequency components of the signal are reduced, reducing aliasing and better preserving shift-equivariance. This ultimately cascades into better shiftinvariance in the output. We show example classification instabilities in Fig. 2. ",
85
+ "bbox": [
86
+ 176,
87
+ 734,
88
+ 823,
89
+ 790
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "A potential concern is that over-aggressive low-pass filtering can result in heavy loss of information. However, we find that with a reasonable selection of low-pass filter weights, we can maintain classification performance while increasing shift-invariance. Furthermore, we show that without shift-based data augmentation, incorporating this inductive bias actually improves performance. ",
96
+ "bbox": [
97
+ 174,
98
+ 797,
99
+ 823,
100
+ 853
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "We find that the learned filters also naturally become smoother after adding the blurring layer. These results indicate that incorporating this small modification not only induces shift-invariance, but causes the network to learn a smoother feature extractor. ",
107
+ "bbox": [
108
+ 176,
109
+ 859,
110
+ 823,
111
+ 901
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "In summary, our contributions are as follows: ",
118
+ "bbox": [
119
+ 174,
120
+ 910,
121
+ 470,
122
+ 922
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "image",
128
+ "img_path": "images/b1534bd0f0fb60573d0a3b7fe9a4971fb4233f3c2674a268778f097b9d86cf29.jpg",
129
+ "image_caption": [
130
+ "Figure 1: (Top) Pooling does not preserve shift-equivariance. It is functionally equivalent to densely evaluated pooling followed by naive downsampling. The latter operation ignores the Nyquist sampling theorem and loses shift-equivariance. (Bottom) We low-pass filter between the operations. This keeps the original pooling operation, while antialiasing the appropriate signal. This equivalent analysis and modification can be applied to any strided layer, such as convolution. "
131
+ ],
132
+ "image_footnote": [],
133
+ "bbox": [
134
+ 173,
135
+ 97,
136
+ 823,
137
+ 422
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "• We isolate the cause for loss of shift-invariance – downsampling. Separating the downsampling from pooling enables us to keep the desired pooling, while fixing the loss of shift-equivariance. We propose to low-pass filter before downsampling, a common signal processing technique. \n• We validate on a classification task, and demonstrate increased shift-equivariance in the features and shift-invariance in the output. \n• In addition, we observe large improvements in classification performance when training without shift-augmentation, indicating more efficient usage of data. ",
144
+ "bbox": [
145
+ 179,
146
+ 508,
147
+ 825,
148
+ 606
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "2 RELATED WORK ",
155
+ "text_level": 1,
156
+ "bbox": [
157
+ 176,
158
+ 626,
159
+ 344,
160
+ 642
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "Local connectivity and weight sharing have been a central tenet of neural networks, including the Neocognitron (Fukushima & Miyake, 1982), LeNet (LeCun et al., 1998) and modern networks such as Alexnet (Krizhevsky et al., 2012), VGG (Simonyan & Zisserman, 2014), ResNet (He et al., 2016), and DenseNet (Huang et al., 2017). In biological systems, local connectivity was famously discovered observed in a cat’s visual system by Hubel & Wiesel (1962). Recent work has strived to build in additional types of invariances, such as rotation, reflection, and scaling (Sifre & Mallat, 2013; Bruna & Mallat, 2013; Esteves et al., 2017; Kanazawa et al., 2014; Worrall et al., 2017; Cohen & Welling, 2016). Our work focusses on the elusive goal of shift-invariance. ",
167
+ "bbox": [
168
+ 174,
169
+ 659,
170
+ 825,
171
+ 770
172
+ ],
173
+ "page_idx": 1
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "Though properties such as shift-equivariance have been engineered into networks, what factors and invariances does an emergent representation actually learn? Analysis of deep networks have included qualitative approaches, such as showing patches which activate hidden units (Girshick et al., 2014; Zhou et al., 2014), actively maximizing hidden units (Mordvintsev et al., 2015), and mapping features back into pixel space (Dosovitskiy & Brox, 2016a;b; Mahendran & Vedaldi, 2015; Zeiler & Fergus, 2014; Nguyen et al., 2017; Henaff & Simoncelli, 2015). Our analysis is focused on a ´ specific, low-level property and is complementary to these qualitative approaches. ",
178
+ "bbox": [
179
+ 174,
180
+ 776,
181
+ 825,
182
+ 875
183
+ ],
184
+ "page_idx": 1
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "A more quantitative approach for analyzing networks is measuring representation or output changes (or robustness to changes) in response to manually generated perturbations to the input, such as image transformations (Goodfellow et al., 2009; Lenc & Vedaldi, 2015; Azulay & Weiss, 2018), geometric transforms (Ruderman et al., 2018; Fawzi & Frossard, 2015), and CG renderings with various shape, poses, and colors (Aubry & Russell, 2015). A related line of work is in adversarial examples, where directed perturbations in the input can result in large changes in the output. These perturbations can be directly on pixels (Goodfellow et al., 2014a;b), a single pixel (Su et al., 2017), small deformations (Xiao et al., 2018), or even affine transformations (Engstrom et al., 2017). We aim make the network robust to the simplest of these types of attacks and perturbations: shifts. Both Henaff & Simoncelli (2015) and Azulay & Weiss (2018) identify that modern deep networks ´ ignore the Nyquist sampling criterion when downsampling. In our work, we propose and empirically validate an easily adoptable fix which minimally perturbs the existing network architecture. ",
189
+ "bbox": [
190
+ 176,
191
+ 882,
192
+ 823,
193
+ 924
194
+ ],
195
+ "page_idx": 1
196
+ },
197
+ {
198
+ "type": "image",
199
+ "img_path": "images/1cd533bc2787fa282b5d53439894ed09354873ddb2169d1ab70ac5972c85782b.jpg",
200
+ "image_caption": [
201
+ "Figure 2: Classification stability for selected images. Predicted probability of the correct class changes when shifting the image. The baseline (black) exhibits chaotic behavior, which is stabilized by our method (blue). "
202
+ ],
203
+ "image_footnote": [],
204
+ "bbox": [
205
+ 187,
206
+ 104,
207
+ 805,
208
+ 342
209
+ ],
210
+ "page_idx": 2
211
+ },
212
+ {
213
+ "type": "text",
214
+ "text": "",
215
+ "bbox": [
216
+ 174,
217
+ 386,
218
+ 825,
219
+ 513
220
+ ],
221
+ "page_idx": 2
222
+ },
223
+ {
224
+ "type": "text",
225
+ "text": "Classic hand-engineered computer vision and image processing representations, such as SIFT (Lowe, 1999), wavelets, and image pyramids (Burt & Adelson, 1987; Adelson et al., 1984) also extract features in a sliding window manner, often with some subsampling factor. As discussed in Simoncelli et al. (1992), literal shift-equivariance cannot hold when with subsampling. Shiftequivariance can be recovered if features are extracted densely, for example textons (Leung & Malik, 2001), the Stationary Wavelet Transform (Fowler, 2005), and DenseSIFT (Vedaldi & Fulkerson, 2010). Deep networks can also be evaluated densely, by removing striding and making appropriate changes to subsequent layers by using a trous ´ /dilated convolutions (Chen et al., 2014; 2018; Yu & Koltun, 2015). This comes at great computation and memory cost. Our work investigates achieving shift-equivariance with minimal additional computation, by blurring before subsampling. ",
226
+ "bbox": [
227
+ 173,
228
+ 520,
229
+ 825,
230
+ 659
231
+ ],
232
+ "page_idx": 2
233
+ },
234
+ {
235
+ "type": "text",
236
+ "text": "Blurring before downsampling is fundamental technique in signal processing (Oppenheim et al., 1999), image processing (Gonzalez & Woods, 1992), computer graphics (Foley et al., 1995), and vision (Szeliski, 2010). In deep learning, average pooling (LeCun et al., 1990) is a form of blurring. Scherer et al. (2010) finds max-pooling to more effective than variants of blurred-downsampling, under the assumption that they are alternatives. Conversely, we show that they are compatible. ",
237
+ "bbox": [
238
+ 174,
239
+ 665,
240
+ 825,
241
+ 736
242
+ ],
243
+ "page_idx": 2
244
+ },
245
+ {
246
+ "type": "text",
247
+ "text": "3 METHODS ",
248
+ "text_level": 1,
249
+ "bbox": [
250
+ 174,
251
+ 750,
252
+ 290,
253
+ 766
254
+ ],
255
+ "page_idx": 2
256
+ },
257
+ {
258
+ "type": "text",
259
+ "text": "3.1 PRELIMINARIES ",
260
+ "text_level": 1,
261
+ "bbox": [
262
+ 174,
263
+ 775,
264
+ 326,
265
+ 790
266
+ ],
267
+ "page_idx": 2
268
+ },
269
+ {
270
+ "type": "text",
271
+ "text": "Deep convolutional networks as feature extractors Let an image with resolution $H \\times W$ be represented by $X \\in \\mathbb { R } ^ { H \\times W \\times 3 }$ . An $L$ -layer CNN can be expressed as a feature extractor $\\mathcal { F } _ { l } ( X ) \\in$ $\\mathbb { R } ^ { \\mathbf { \\dot { H } } _ { l } \\times W \\times C _ { l } }$ , with layer $l \\in [ 0 , L ]$ , spatial resolution $H _ { l } \\times W _ { l }$ and $C _ { l }$ channels. Each feature map can also be upsampled to original resolution, $\\widetilde { \\mathcal { F } } _ { l } ( X ) \\in \\mathbb { R } ^ { H _ { l } \\times W _ { l } \\times C _ { l } }$ . ",
272
+ "bbox": [
273
+ 174,
274
+ 795,
275
+ 825,
276
+ 854
277
+ ],
278
+ "page_idx": 2
279
+ },
280
+ {
281
+ "type": "text",
282
+ "text": "Shift-equivariance and shift-invariance A representation $\\widetilde { \\mathcal F }$ is shift-equivariant if shifting the input produces a shifted feature map, meaning that shifting and feature extraction are commutable. We more rigorously define the Shift function in Eqn. 4. ",
283
+ "bbox": [
284
+ 174,
285
+ 859,
286
+ 825,
287
+ 902
288
+ ],
289
+ "page_idx": 2
290
+ },
291
+ {
292
+ "type": "equation",
293
+ "img_path": "images/d7aee021008d6a3dbbb76f97352c5480c43c9b6c22272f711c14605b05e00bdb.jpg",
294
+ "text": "$$\n\\begin{array} { r } { \\mathrm { S h i f t } _ { \\Delta h , \\Delta w } ( \\widetilde { \\mathcal { F } } ( X ) ) = \\widetilde { \\mathcal { F } } ( \\mathrm { S h i f t } _ { \\Delta h , \\Delta w } ( X ) ) \\quad \\forall ( \\Delta h , \\Delta w ) } \\end{array}\n$$",
295
+ "text_format": "latex",
296
+ "bbox": [
297
+ 305,
298
+ 905,
299
+ 691,
300
+ 926
301
+ ],
302
+ "page_idx": 2
303
+ },
304
+ {
305
+ "type": "image",
306
+ "img_path": "images/1c8d92ee51284948f1fcf5480c6dffec1e736d92a5bab930c5c9b6d1de9e7351.jpg",
307
+ "image_caption": [
308
+ "8 Max-Pooling Densley 8 Max-Pooling Densley Figure 3: Toy example of sensitivity to shifts. We illustrate how downsampling affects shift-equivariance 6 Max-Pooling (shift-1) 6 MaxPool-Blur-DS (shift-0) with a toy example. (Top-Left) An input toy signal is in light gray; max-pooled $k = 2$ , $s = 2$ ) toy signal is MaxPool-Blur-DS (shift-1) in blue. (Top-Right) Simply shifting the input and then max-pooling provides a completely different answer (red). (Bot-Left) The blue and red points are inherently sampled from densely max-pooled $k = 2$ , $s = 1$ ) 2 2 intermediate signal (thick black). (Bot-Right) We instead sample from the low-passed intermediate signal, 0 0 shown in green and magenta, better preserving shift-equivariance. "
309
+ ],
310
+ "image_footnote": [],
311
+ "bbox": [
312
+ 209,
313
+ 104,
314
+ 785,
315
+ 297
316
+ ],
317
+ "page_idx": 3
318
+ },
319
+ {
320
+ "type": "text",
321
+ "text": "A representation is shift-invariant if shifting the input results in an identical representation. ",
322
+ "bbox": [
323
+ 171,
324
+ 390,
325
+ 767,
326
+ 405
327
+ ],
328
+ "page_idx": 3
329
+ },
330
+ {
331
+ "type": "equation",
332
+ "img_path": "images/1eb1cf4c75d5cc48a3e0bd4f2ca96545d9e50a8380864e9cc5eb94ed311ccc5b.jpg",
333
+ "text": "$$\n\\begin{array} { r } { \\mathcal { \\widetilde { F } } ( X ) = \\mathcal { \\widetilde { F } } ( \\mathrm { S h i f t } _ { \\Delta h , \\Delta w } ( X ) ) \\quad \\forall \\ : ( \\Delta h , \\Delta w ) } \\end{array}\n$$",
334
+ "text_format": "latex",
335
+ "bbox": [
336
+ 349,
337
+ 406,
338
+ 647,
339
+ 426
340
+ ],
341
+ "page_idx": 3
342
+ },
343
+ {
344
+ "type": "text",
345
+ "text": "For modern classifiers, layer $l = 0$ is the raw pixels, and final layer $L$ is a probability distribution over $D$ classes, $\\mathcal { F } _ { L } \\in \\dot { \\Delta } ^ { 1 \\times 1 \\times D }$ . The net typically progressively reduces spatial resolution, until all resolution is lost and features are of shape $\\mathbb { R } ^ { 1 \\times \\mathbf { i } \\times ^ { \\mathbf { \\dot { C } } _ { l } } }$ . A common technique, such as used in (Lin et al., 2013; He et al., 2016; Huang et al., 2017), is to average across the entire convolutional feature map spatially, and use fully-connected layers in all subsequent layers, which can be expressed as $1 \\times 1$ convolutions (Long et al., 2015). In such a setting, as proven by Azulay & Weiss (2018), shift-invariance on the output will necessarily emerge from shift-equivariance in the convolutional features. ",
346
+ "bbox": [
347
+ 173,
348
+ 436,
349
+ 825,
350
+ 547
351
+ ],
352
+ "page_idx": 3
353
+ },
354
+ {
355
+ "type": "text",
356
+ "text": "Modulo-N shift-equivariance/invariance In some cases, the definitions in Equations 1, 2 may hold only when shifts $( \\Delta h , \\Delta w )$ are integer multiples of N. We refer to these scenarios as modulo$\\mathbf { N }$ shift-equivariance or invariance. For example, modulo-2 shift-invariance means that even-pixel shifts of the input result in an identical representation, but odd-pixel shifts may not. ",
357
+ "bbox": [
358
+ 174,
359
+ 555,
360
+ 825,
361
+ 611
362
+ ],
363
+ "page_idx": 3
364
+ },
365
+ {
366
+ "type": "text",
367
+ "text": "3.2 CONVENTIONAL POOLING VS PROPOSED POOL-BLUR-DOWNSAMPLE",
368
+ "text_level": 1,
369
+ "bbox": [
370
+ 176,
371
+ 628,
372
+ 694,
373
+ 643
374
+ ],
375
+ "page_idx": 3
376
+ },
377
+ {
378
+ "type": "text",
379
+ "text": "Conventional strided pooling breaks shift-equivariance In Fig. 3, we show an example 1-D signal $[ 0 , 0 , 1 , 1 , 0 , 0 , 1 , 1 ]$ . Max-pooling (kernel $k = 2$ , stride $s = 2$ ) will result in $[ 0 , 1 , 0 , 1 ]$ . Simply shifting the input by one index results a dramatically different answer of $[ 1 , 1 , { \\bar { 1 } } , 1 ]$ . Shift-equivariance is lost. As seen in the bottom-left, both of these results are inherently downsampling from an intermediate signal – the input signal densely max-pooled $( k = 2 , s = 1 )$ . We can write a maxpooling layer as a composition of two functions, max-pooling densely evaluated, followed by naive downsampling: $\\mathbf { M a x P o o l } _ { k , s } ( X ) = \\mathbf { D o w n s a m p l e } _ { s } ( \\mathbf { M a x P o o l } _ { k , 1 } ^ { - } ( X ) )$ . Max-pooling preserves shiftequivariance (when evaluated densely), but naive downsampling does not. ",
380
+ "bbox": [
381
+ 173,
382
+ 655,
383
+ 825,
384
+ 767
385
+ ],
386
+ "page_idx": 3
387
+ },
388
+ {
389
+ "type": "text",
390
+ "text": "Blurring before downsampling better preserves shift-equivariance We propose to low-pass filter the intermediate signal before downsampling, as shown in Fig. 3(bot-right). We define our MaxPoolBlurDownsample operator below. ",
391
+ "bbox": [
392
+ 174,
393
+ 773,
394
+ 825,
395
+ 815
396
+ ],
397
+ "page_idx": 3
398
+ },
399
+ {
400
+ "type": "equation",
401
+ "img_path": "images/e1829e3cca7db2e391e12096bb6b6a305ae0840c520d8eb595bc188d0fefd68b.jpg",
402
+ "text": "$$\n\\mathrm { M a x P o o l B l u r D S } _ { k , s } ( X ) = \\mathrm { D o w n s a m p l e } _ { s } ( \\mathrm { B l u r } _ { k _ { b l u r } } ( \\mathrm { M a x P o o l } _ { k , 1 } ( X ) ) )\n$$",
403
+ "text_format": "latex",
404
+ "bbox": [
405
+ 266,
406
+ 818,
407
+ 730,
408
+ 835
409
+ ],
410
+ "page_idx": 3
411
+ },
412
+ {
413
+ "type": "text",
414
+ "text": "Sampling from the low-pass filtered signal gives [.5, 1, .5, 1] and [.75, .75, .75, .75] (Fig. 3 bot-right). \nThese are closer to each other and better representations of the intermediate signal. ",
415
+ "bbox": [
416
+ 176,
417
+ 845,
418
+ 821,
419
+ 875
420
+ ],
421
+ "page_idx": 3
422
+ },
423
+ {
424
+ "type": "text",
425
+ "text": "The method allows for a choice of blur kernel. In image processing, small kernels are often used across applications such as edge detection (Canny, 1986) and image pyramids (Adelson et al., 1984). We try a number of kernels, ranging from size $2 \\times 2$ to $7 \\times 7$ . As the blur kernels are separable, it ",
426
+ "bbox": [
427
+ 176,
428
+ 881,
429
+ 825,
430
+ 924
431
+ ],
432
+ "page_idx": 3
433
+ },
434
+ {
435
+ "type": "image",
436
+ "img_path": "images/aeda7e117f91687fd406623a17882e4e141ee7d064a05b94a8ec819292b758e6.jpg",
437
+ "image_caption": [
438
+ "Figure 4: Shift-equivariance throughout the network. We compute feature distance between left and righthand sides of the shift-equivariance condition in Equation 1. Each point in each heatmap is a shift $( \\Delta h , \\Delta w )$ . Layer resolution is in [brackets]; in the last three, shift-equivariance is equivalent to shift-invariance. Layers pix-pool1(dense) have perfect equivariance (distance 0 at all shifts, shown by blue). Red is half mean distance between two random different images, and is adjusted depending on the layer. (a) On the baseline, shift-equivariance is reduced each time downsampling takes place. Modulo-N shift-equivariance holds, with $_ \\mathrm { N }$ doubling with each downsampling. (b) With our proposed change, shift-equivariance is better maintained, and the resulting classfication (softmax) layer is more shift-invariant. "
439
+ ],
440
+ "image_footnote": [],
441
+ "bbox": [
442
+ 179,
443
+ 99,
444
+ 818,
445
+ 378
446
+ ],
447
+ "page_idx": 4
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "can be implemented as a series of two convolutions (vertical blur followed by horizontal), and added computation scales linearly with $k _ { b l u r }$ , rather than quadratically. ",
452
+ "bbox": [
453
+ 174,
454
+ 497,
455
+ 823,
456
+ 526
457
+ ],
458
+ "page_idx": 4
459
+ },
460
+ {
461
+ "type": "text",
462
+ "text": "4 EXPERIMENTS ",
463
+ "text_level": 1,
464
+ "bbox": [
465
+ 176,
466
+ 546,
467
+ 326,
468
+ 563
469
+ ],
470
+ "page_idx": 4
471
+ },
472
+ {
473
+ "type": "text",
474
+ "text": "4.1 EXPERIMENTAL SETUP ",
475
+ "text_level": 1,
476
+ "bbox": [
477
+ 176,
478
+ 575,
479
+ 375,
480
+ 589
481
+ ],
482
+ "page_idx": 4
483
+ },
484
+ {
485
+ "type": "text",
486
+ "text": "Data, architecture, training schedule We test on CIFAR10 classification (Krizhevsky & Hinton, 2009), which consists of 50k training and 10k testing images at resolution $3 2 \\times 3 2$ . We use the VGG13 architecture (Simonyan & Zisserman, 2014) from the PyTorch framework (Paszke et al., $2 0 1 7 ) ^ { 1 }$ and will make code available. ",
487
+ "bbox": [
488
+ 174,
489
+ 602,
490
+ 825,
491
+ 657
492
+ ],
493
+ "page_idx": 4
494
+ },
495
+ {
496
+ "type": "text",
497
+ "text": "Each block consists of 2 Conv-BatchNorm-ReLU chunks, followed by MaxPool, doubling feature channels and halving spatial resolution until all resolution is lost. A final softmax predicts a probability vector. We use stochastic gradient descent (SGD) with momentum 0.9 and batch size 128. We train for 100 epochs at initial learning rate 0.1 and 50 additional epochs at 0.01 and 0.01. ",
498
+ "bbox": [
499
+ 174,
500
+ 665,
501
+ 825,
502
+ 720
503
+ ],
504
+ "page_idx": 4
505
+ },
506
+ {
507
+ "type": "text",
508
+ "text": "Low-pass filter kernels We try a number of standard low-pass filters, shown in Table 1, ranging from size $2 \\times 2$ to $7 \\times 7$ . All filters allow the DC signal pass and suppress (or completely kill) the highest frequency. Variations in filters correspond to tradeoffs between location of the cutoff frequency, slope of the cutoff, and variation of lobes in the passband and stopband. These properties are well-studied in the context of finite impulse response (FIR) filter design. However, it is unclear which types of filters are best suited for deep networks, so we empirically investigate their effects. ",
509
+ "bbox": [
510
+ 173,
511
+ 727,
512
+ 825,
513
+ 811
514
+ ],
515
+ "page_idx": 4
516
+ },
517
+ {
518
+ "type": "text",
519
+ "text": "Circular convolution and shifting Edge artifacts are an important consideration. When an image is shifted, information is necessarily lost on one side, and has to be filled in on the other. In all our experiments, we use circular shifting and convolution. When the convolutional kernel hits the edge, it wraps to the other side. When shifting, pixels are “rolled” off the edge to the other side. ",
520
+ "bbox": [
521
+ 174,
522
+ 818,
523
+ 823,
524
+ 875
525
+ ],
526
+ "page_idx": 4
527
+ },
528
+ {
529
+ "type": "image",
530
+ "img_path": "images/e65d8f20853722e10aa0a22cbb15926d1b7d59d123e19babcf8f14dc818ac2ed.jpg",
531
+ "image_caption": [
532
+ "0.04 0.02 0.00 0.02 0.04Figure 5: Classification consistency vs. classification. Networks trained (left) without and (right) with shiftbased data augmentation, using various filters. Up (more consistent) and to the right (more accurate) is better. Number of sides corresponds to number of filter taps used (e.g., diamond for 4-tap filter); colors correspond to different methods for generating FIR filters. We highlight filters Rectangle (4), Triangle (5), and Binomial (5-7), which perform consistently well in both metrics and settings. "
533
+ ],
534
+ "image_footnote": [],
535
+ "bbox": [
536
+ 178,
537
+ 98,
538
+ 816,
539
+ 301
540
+ ],
541
+ "page_idx": 5
542
+ },
543
+ {
544
+ "type": "table",
545
+ "img_path": "images/0733813d7b1a2fde4147cbdef9bd169fc510ce92119df72d660fd772b7f7028f.jpg",
546
+ "table_caption": [
547
+ "Table 1: Classification consistency and classification. Results across blurring filters and training scenarios (without and with data augmentation). We evaluate classification accuracy without shifts (Test accuracy – None) and on random shifts (Test accuracy – Random), as well as classification consistency. Highlighted filters perform consistently well in both metrics and settings, as more easily seen in Fig. 5. "
548
+ ],
549
+ "table_footnote": [],
550
+ "table_body": "<table><tr><td rowspan=\"3\">Filter shape</td><td rowspan=\"3\">#Taps</td><td rowspan=\"3\">Weights</td><td colspan=\"3\">Train with no augmentation</td><td colspan=\"3\">Train with augmentation</td></tr><tr><td colspan=\"2\">Test accuracy</td><td>Classification</td><td colspan=\"2\">Test accuracy</td><td>Classification</td></tr><tr><td>None</td><td>Rand</td><td>Consistency</td><td>None</td><td>Rand</td><td>Consistency</td></tr><tr><td>Delta (baseline)</td><td>1</td><td>[三]</td><td>91.6</td><td>87.4</td><td>88.1</td><td>93.4</td><td>93.7</td><td>96.6</td></tr><tr><td>Rectangle</td><td>2</td><td>[1,1]</td><td>92.8</td><td>89.3</td><td>90.5</td><td>93.9</td><td>93.8</td><td>97.6</td></tr><tr><td>Rectangle</td><td>3</td><td>[1,1,1]</td><td>93.4</td><td>91.8</td><td>94.5</td><td>93.6</td><td>93.7</td><td>97.9</td></tr><tr><td>Rectangle</td><td>4</td><td>[1, 1, 1, 1]</td><td>93.2</td><td>92.9</td><td>97.7</td><td>93.4</td><td>93.4</td><td>98.5</td></tr><tr><td>Rectangle</td><td>5</td><td>[1, 1, 1, 1, 1]</td><td>92.2</td><td>92.1</td><td>98.3</td><td>92.4</td><td>92.5</td><td>98.7</td></tr><tr><td>Rectangle Rectangle</td><td>6</td><td>[1,1,1,1,1, 1]</td><td>91.4</td><td>91.2</td><td>97.3</td><td>91.4</td><td>91.5</td><td>98.9</td></tr><tr><td></td><td>7</td><td>[1, 1, 1,1, 1,1, 1]</td><td>90.8</td><td>90.7</td><td>98.8</td><td>90.5</td><td>90.5</td><td>99.0</td></tr><tr><td>Triangle</td><td>3</td><td>[1,2, 1]</td><td>93.1</td><td>91.4</td><td>93.9</td><td>93.6</td><td>93.5</td><td>98.0</td></tr><tr><td>Triangle</td><td>5</td><td>[1,2,3,2, 1]</td><td>93.3</td><td>93.0</td><td>98.2</td><td>93.3</td><td>93.2</td><td>98.6</td></tr><tr><td>Triangle</td><td>7</td><td>[1,2, 3,4, 3,2, 1]</td><td>92.3</td><td>92.3</td><td>98.8</td><td>92.4</td><td>92.3</td><td>99.0</td></tr><tr><td>Binomial</td><td>4</td><td>[1, 3,3,1]</td><td>93.0</td><td>91.1</td><td>93.2</td><td>93.4</td><td>93.3</td><td>98.1</td></tr><tr><td>Binomial Binomial</td><td>5</td><td>[1, 4, 6, 4, 1]</td><td>93.2</td><td>92.6</td><td>96.3</td><td>93.1</td><td>93.2</td><td>98.4</td></tr><tr><td>Binomial</td><td>6 7</td><td>[1,5,10,10,5,1] [1,6,15,20,15,6,1]</td><td>93.0 93.0</td><td>92.4</td><td>96.9</td><td>93.4 93.2</td><td>93.3</td><td>98.6 98.8</td></tr><tr><td></td><td></td><td></td><td></td><td>93.0</td><td>98.1</td><td></td><td>93.2</td><td></td></tr><tr><td>Window Window</td><td>3</td><td>[1, 1.57,1]</td><td>93.3</td><td>91.5</td><td>94.2</td><td>93.5</td><td>93.5</td><td>98.0</td></tr><tr><td>Window</td><td>6 7</td><td>[-1,1.67,5,5,1.67,-1] [-1,0,3,4.71,3,0,-1]</td><td>92.9 92.4</td><td>90.2 91.1</td><td>91.0</td><td>93.4 93.4</td><td>93.5</td><td>98.1</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td>94.0</td><td></td><td>93.5</td><td>97.8</td></tr><tr><td>Least Squares Least Squares</td><td>3 7</td><td>[1, 1,63,1] [-1,0,3.80,6.13,3.80,0,-1]</td><td>93.1 92.7</td><td>91.4 91.0</td><td>93.8 93.9</td><td>93.7 93.4</td><td>93.8 93.5</td><td>98.0 97.9</td></tr></table>",
551
+ "bbox": [
552
+ 197,
553
+ 378,
554
+ 800,
555
+ 633
556
+ ],
557
+ "page_idx": 5
558
+ },
559
+ {
560
+ "type": "text",
561
+ "text": "This modification minorly decreases classification performance, $9 3 . 8 \\%$ vs $9 3 . 4 \\%$ with data augmentation. This could potentially be mitigated by additional padding, at the expense of memory and computation. But more importantly, this methodology affords us a clean testbed. Any loss in shift-equivariance or invariance is purely due to characteristics of the feature extractor. ",
562
+ "bbox": [
563
+ 174,
564
+ 708,
565
+ 823,
566
+ 765
567
+ ],
568
+ "page_idx": 5
569
+ },
570
+ {
571
+ "type": "text",
572
+ "text": "4.2 ANALYSIS ",
573
+ "text_level": 1,
574
+ "bbox": [
575
+ 174,
576
+ 785,
577
+ 285,
578
+ 799
579
+ ],
580
+ "page_idx": 5
581
+ },
582
+ {
583
+ "type": "text",
584
+ "text": "We measure shift-equivariance/invariance in three ways, targeting different aspects. We first focus on the shift-equivariance of the internal layers. We then check on the agreement of the hard output classification. Finally, we measure how much the soft predicted probability itself varies. ",
585
+ "bbox": [
586
+ 174,
587
+ 811,
588
+ 825,
589
+ 854
590
+ ],
591
+ "page_idx": 5
592
+ },
593
+ {
594
+ "type": "text",
595
+ "text": "1. Feature distance (lower is better). We test how close shift-equivariance and invariance are to being fulfilled by computing $d ( \\mathrm { S h i f t } _ { \\Delta h , \\Delta w } ( \\widetilde { \\mathcal { F } } ( X ) ) , \\widetilde { \\mathcal { F } } ( \\mathrm { S h i f t } _ { \\Delta h , \\Delta w } ( X ) ) )$ and $d ( \\widetilde { \\mathcal { F } } ( X ) , \\widetilde { \\mathcal { F } } ( \\mathrm { S h i f t } _ { \\Delta h , \\Delta w } ( X ) )$ (left & right-hand sides of Eq. 1, 2), respectively. We use cosine distance, which is commonly used for deep features (Kiros et al., 2015; Zhang et al., 2018). ",
596
+ "bbox": [
597
+ 176,
598
+ 862,
599
+ 823,
600
+ 924
601
+ ],
602
+ "page_idx": 5
603
+ },
604
+ {
605
+ "type": "image",
606
+ "img_path": "images/bed342aeaffe9da628817a2390853f95a8e30ab95edbcb8ff270570f9ae50a3b.jpg",
607
+ "image_caption": [
608
+ "Figure 6: Distribution of per-image classification variation. We show the distribution of classification variation in the test set, (left) without and (right) with data augmentation at training. Lower variation means more consistent classifications (and increased shift-invariance). Training with data augmentation drastically reduces variation in classification. Adding filtering further decreases variation. "
609
+ ],
610
+ "image_footnote": [],
611
+ "bbox": [
612
+ 178,
613
+ 103,
614
+ 815,
615
+ 290
616
+ ],
617
+ "page_idx": 6
618
+ },
619
+ {
620
+ "type": "text",
621
+ "text": "2. Classification consistency (higher is better). Perhaps of greatest interest is the actual decisions the classifier makes. We can measure its consistency by checking how often the network outputs the same classification, given the same image with two different shifts: $\\mathbb { E } _ { ( X , h _ { 1 } , w _ { 1 } , h _ { 2 } , w _ { 2 } ) } \\mathbb { 1 } \\{ \\arg \\operatorname* { m a x } P ( \\mathrm { S h i f t } _ { h _ { 1 } , w _ { 1 } } ( X ) ) = \\arg \\operatorname* { m a x } P ( \\mathrm { S h i f t } _ { h _ { 2 } , w _ { 2 } } ( X ) ) \\} .$ . ",
622
+ "bbox": [
623
+ 174,
624
+ 359,
625
+ 825,
626
+ 417
627
+ ],
628
+ "page_idx": 6
629
+ },
630
+ {
631
+ "type": "text",
632
+ "text": "3. Classification variation (lower is better). The metric above looks at the hard classification, discounting classifier confidence. Similar to Azulay & Weiss (2018), we trace the variation in probability of correct classification, given different shifts. We can capture the variation across all possible shifts: $\\sqrt { V a r _ { h , w } ( \\{ P _ { \\mathrm { c o r r e c t \\thinspace c l a s s } } ( \\mathrm { S h i f t } _ { h , w } ( X ) ) \\} \\} ) }$ . ",
633
+ "bbox": [
634
+ 174,
635
+ 421,
636
+ 825,
637
+ 479
638
+ ],
639
+ "page_idx": 6
640
+ },
641
+ {
642
+ "type": "text",
643
+ "text": "Table 1 shows results across a number of different low-pass filters, training with and without data augmentation. We dissect the results below. ",
644
+ "bbox": [
645
+ 171,
646
+ 489,
647
+ 823,
648
+ 518
649
+ ],
650
+ "page_idx": 6
651
+ },
652
+ {
653
+ "type": "text",
654
+ "text": "How shift-equivariant are deep features? In Fig. 4 (top), we compute distance from shiftequivariance, as a function of all possible shift-offsets $( \\Delta h , \\Delta w )$ and layers. MaxPool layers are broken into two components – before and after downsampling. Pixels are trivially shift-equivariant, as are all layers before the first downsampling. Once downsampling occurs in pool1(ds), shiftequivariance is lost. However, modulo-N shift-equivariance still holds, and each subsequent downsampling doubles the factor. ",
655
+ "bbox": [
656
+ 173,
657
+ 525,
658
+ 825,
659
+ 609
660
+ ],
661
+ "page_idx": 6
662
+ },
663
+ {
664
+ "type": "text",
665
+ "text": "Additionally, we observe that before the downsampling operation, the pooling layer first increases shift-equivariance (e.g., conv3 2 to pool3(dense)). This is consistent with the long-held intuition that pooling build invariances inside the network (LeCun et al., 1990) and isolates the downsampling operation as the culprit behind loss of shift-equivariance. ",
666
+ "bbox": [
667
+ 174,
668
+ 616,
669
+ 825,
670
+ 672
671
+ ],
672
+ "page_idx": 6
673
+ },
674
+ {
675
+ "type": "text",
676
+ "text": "Does blurring before downsampling achieve better shift-equivariance? In Fig. 4 (bottom), we add a blurring filter to the MaxPool layers, as proposed in Section 3, and again plot shiftequivariance maps for each layer. Shift-equivariance is clearly better preserved. In particular, the severe drop-offs in downsampling layers do not occur. Improved shift-equivariance throughout the network cascades into more consistent classifications in the final softmax layer. ",
677
+ "bbox": [
678
+ 174,
679
+ 679,
680
+ 825,
681
+ 750
682
+ ],
683
+ "page_idx": 6
684
+ },
685
+ {
686
+ "type": "text",
687
+ "text": "Some selected examples are in Fig. 2. Our method stabilizes the classifications. In Fig. 6, we show the distribution of classification variations, before and after adding in the low-pass filter. Even a small $2 \\times 2$ filter, immediately variation. As the filter size is increased, the output classification variation decreases. This has a larger effect when training without data augmentation, but is still observable when training with data augmentation. ",
688
+ "bbox": [
689
+ 174,
690
+ 756,
691
+ 825,
692
+ 827
693
+ ],
694
+ "page_idx": 6
695
+ },
696
+ {
697
+ "type": "text",
698
+ "text": "Does shift-invariance degrade performance? Our method produces more shift-equivariant feature maps and consequently, more shift-invariant outputs. However, does this come at a cost? ",
699
+ "bbox": [
700
+ 174,
701
+ 832,
702
+ 821,
703
+ 861
704
+ ],
705
+ "page_idx": 6
706
+ },
707
+ {
708
+ "type": "text",
709
+ "text": "We study the output classification consistency versus classification accuracy. In Fig. 5 (left), we show results, trained without shift-based data augmentation. Training with the baseline MaxPooling gives accuracy $9 1 . 6 \\%$ and consistency $8 8 . 1 \\%$ . Our proposed change – with a $5 \\times 5$ triangle filter improves accuracy to $9 3 . 3 \\%$ and consistency to $9 8 . { \\bar { 2 } } \\%$ . This indicates that low-pass filtering does not destroy the signal, or make learning harder. On the contrary, preserving shift-equivariance serves as “built-in” augmentation, indicating more efficient data usage. ",
710
+ "bbox": [
711
+ 176,
712
+ 867,
713
+ 825,
714
+ 924
715
+ ],
716
+ "page_idx": 6
717
+ },
718
+ {
719
+ "type": "text",
720
+ "text": "",
721
+ "bbox": [
722
+ 171,
723
+ 103,
724
+ 821,
725
+ 132
726
+ ],
727
+ "page_idx": 7
728
+ },
729
+ {
730
+ "type": "text",
731
+ "text": "In principle, networks can learn to be shift-invariant from data. Does adding shift-based data augmentation remove the benefit from method? Shift-based data augmentation with the baseline network results in consistency of $9 6 . 6 \\%$ , lower than our method trained without data augmentation. In addition, as seen in Fig. 5 (right), applying out method with data augmentation provides an immediate jump in classification consistency, while maintaining accuracy. From there, a clear tradeoff appears – higher amounts of shift-invariance can be achieved at the cost of decreased accuracy. For example, very large rectangular filters over-aggressively smooth the signal. Downstream applications may favor one factor over another, and the choice of filter allows one to explore this space. ",
732
+ "bbox": [
733
+ 174,
734
+ 140,
735
+ 549,
736
+ 332
737
+ ],
738
+ "page_idx": 7
739
+ },
740
+ {
741
+ "type": "text",
742
+ "text": "Fig. 6 investigates the distribution of classification variations. Training with data augmentation with the baseline network reduces variation (black lines on both plots). Our method reduces variation in both scenarios. More aggressive filtering further decreases variation. ",
743
+ "bbox": [
744
+ 173,
745
+ 340,
746
+ 547,
747
+ 410
748
+ ],
749
+ "page_idx": 7
750
+ },
751
+ {
752
+ "type": "image",
753
+ "img_path": "images/70eb9b477c581899fd0bd138cd0ee7b70af1acfd55e729f557bf23afa2de39cc.jpg",
754
+ "image_caption": [
755
+ "Figure 7: Total Variation (TV) by layer. We compute average smoothness of learned conv filters per layer (lower is smoother). Baseline MaxPool is in black, and adding additional blurring is shown in colors. Note that the learned convolutional layers become smoother, indicating that a smoother feature extractor is induced. The Binomial7 filter produces consistently strong results, in both consistency and accuracy. "
756
+ ],
757
+ "image_footnote": [],
758
+ "bbox": [
759
+ 562,
760
+ 137,
761
+ 818,
762
+ 280
763
+ ],
764
+ "page_idx": 7
765
+ },
766
+ {
767
+ "type": "text",
768
+ "text": "How do the learned convolutional filters change with the proposed modification? We measure spatial smoothness using the normalized Total Variation (TV) metric proposed in Ruderman et al. (2018). Our proposed change smooths the internal feature maps for purposes of downsampling. As shown in Fig. 7, this induces smoother learned filters throughout the network. Adding in more aggressive blur kernels further decreases the TV (increasing smoothness). This indicates that our modification actually induces a smoother feature extractor overall. ",
769
+ "bbox": [
770
+ 173,
771
+ 416,
772
+ 825,
773
+ 500
774
+ ],
775
+ "page_idx": 7
776
+ },
777
+ {
778
+ "type": "text",
779
+ "text": "How does the proposed method affect timing? In Tab. 2, we show the added time each element of the proposed method takes: evaluating the MaxPool layer at stride 1 instead of stride 2, and running a blurring filter. Since the blurring filters are separable, time increases linearly with filter size. The largest filter adds $1 2 . 3 \\%$ per forward pass. This is significantly cheaper than evaluating multiple forward passes in an ensembling approach $1 0 2 4 \\times$ computation to evaluate every shift), or evaluating each layer more densely by exchanging striding for dilation $( 4 \\times , 1 6 \\times , 6 4 \\times , 2 5 6 \\times$ computation for conv2-conv5, respectively). These timings are on our VGG13 network setup. With deeper networks, the relative added computation decreases. ",
780
+ "bbox": [
781
+ 174,
782
+ 507,
783
+ 539,
784
+ 646
785
+ ],
786
+ "page_idx": 7
787
+ },
788
+ {
789
+ "type": "table",
790
+ "img_path": "images/0d8a20df4d5b809a981a9eaf59bae0a26527a137794fba84009a51884c24f4ae.jpg",
791
+ "table_caption": [
792
+ "Table 2: Timing analysis We test the average speed of a forward pass on a GTX1080Ti Nvidia GPU for a batch size of 100 of $3 2 \\times 3 2$ image with the VGG13 network. "
793
+ ],
794
+ "table_footnote": [],
795
+ "table_body": "<table><tr><td>Model</td><td>Timing [ms]</td><td>% added</td></tr><tr><td>Baseline</td><td>10.19</td><td>+0.00%</td></tr><tr><td>+ dense pool</td><td>10.50</td><td>+3.04%</td></tr><tr><td>+ dense pool+3× 3 filter</td><td>11.06</td><td>+8.52%</td></tr><tr><td>+ dense pool +5 × 5 filter</td><td>11.27</td><td>+10.6%</td></tr><tr><td>+ dense pool +7 × 7 filter</td><td>11.45</td><td>+12.3%</td></tr></table>",
796
+ "bbox": [
797
+ 558,
798
+ 512,
799
+ 831,
800
+ 577
801
+ ],
802
+ "page_idx": 7
803
+ },
804
+ {
805
+ "type": "text",
806
+ "text": "",
807
+ "bbox": [
808
+ 173,
809
+ 647,
810
+ 826,
811
+ 674
812
+ ],
813
+ "page_idx": 7
814
+ },
815
+ {
816
+ "type": "text",
817
+ "text": "5 CONCLUSIONS AND DISCUSSION ",
818
+ "text_level": 1,
819
+ "bbox": [
820
+ 176,
821
+ 694,
822
+ 478,
823
+ 710
824
+ ],
825
+ "page_idx": 7
826
+ },
827
+ {
828
+ "type": "text",
829
+ "text": "In summary, we show that shift-invariance is lost through a deep network, as downsampling in pooling layers do not meet the Nyquist criteria. We propose a simple architectural modification, following signal processing principles, to improve shift-equivariance. This change allows the network architecture designer to keep their pooling layer of choice untouched. ",
830
+ "bbox": [
831
+ 174,
832
+ 726,
833
+ 823,
834
+ 781
835
+ ],
836
+ "page_idx": 7
837
+ },
838
+ {
839
+ "type": "text",
840
+ "text": "We achieve higher consistency while maintaining classification performance. In addition, we show large improvements in both performance and consistency when training without data augmentation. This is potentially applicable to online learning scenarios, where the data distribution is changing. Future directions include exploring the potential benefit to downstream applications, such as nearest-neighbor retrieval, improving temporal consistency in video models, robustness to adversarial examples, and high-level vision tasks such as detection. Another possible future direction is learning the downsampling kernels. Overall, our experiments indicate that this classical signal processing technique has a place in modern deep networks. ",
841
+ "bbox": [
842
+ 174,
843
+ 789,
844
+ 823,
845
+ 900
846
+ ],
847
+ "page_idx": 7
848
+ },
849
+ {
850
+ "type": "text",
851
+ "text": "APPENDIX ",
852
+ "text_level": 1,
853
+ "bbox": [
854
+ 176,
855
+ 103,
856
+ 263,
857
+ 117
858
+ ],
859
+ "page_idx": 8
860
+ },
861
+ {
862
+ "type": "text",
863
+ "text": "A DENSENET ARCHITECTURE ",
864
+ "text_level": 1,
865
+ "bbox": [
866
+ 178,
867
+ 136,
868
+ 439,
869
+ 152
870
+ ],
871
+ "page_idx": 8
872
+ },
873
+ {
874
+ "type": "text",
875
+ "text": "Blurring before downsampling can be applied to any strided layer in any network. We provide an additional experiment using the DenseNet architecture (Huang et al., 2017). In Fig. 8, we show classification consistency vs. accuracy, similar to Fig. 5 for VGG13 in the main paper. ",
876
+ "bbox": [
877
+ 174,
878
+ 167,
879
+ 825,
880
+ 210
881
+ ],
882
+ "page_idx": 8
883
+ },
884
+ {
885
+ "type": "image",
886
+ "img_path": "images/108620dd16b85b40ed1a5261de83c7a85ee25eb99e98169ddb969b4de9d6526a.jpg",
887
+ "image_caption": [
888
+ "0.04 0.02 0.00 0.02 0.04 Figure 8: Classification consistency vs. classification for DenseNet Same test in as in Fig. 5, but with DenseNet (Huang et al., 2017) instead of VGG13 (Simonyan & Zisserman, 2014). We show networks trained (left) without and (right) with shift-based data augmentation, using various blurring filters. Consistency is computed by computing classification of an image with two random shifts, and checking for agreement. Up (more consistent) and to the right (more accurate) is better. Number of sides corresponds to number of filter taps used (e.g., triangle for 3-tap filter); colors correspond to different methods for generating FIR filters. "
889
+ ],
890
+ "image_footnote": [],
891
+ "bbox": [
892
+ 178,
893
+ 222,
894
+ 816,
895
+ 426
896
+ ],
897
+ "page_idx": 8
898
+ },
899
+ {
900
+ "type": "text",
901
+ "text": "Comparison to VGG13 for Baseline Network We use the DenseNet-40-12 architecture, from a publicly available implementation.2 Relative to VGG13, DenseNet achieves higher performance $( 9 4 . 4 \\%$ vs $9 3 . 8 \\%$ ), despite using fewer parameters (1M vs 9M). DenseNet also starts with higher shift-invariance $( 9 7 . 7 \\%$ vs. $9 6 . 6 \\hat { \\% } _ { . }$ ) for two reasons: (a) fewer downsampling layers (2 vs 5) and (b) already using blurring before downsampling, in the form of AveragePool layers, equivalent to using a Rectangle (2) filter. We investigate the effects of replacing this $2 \\times 2$ filter. ",
902
+ "bbox": [
903
+ 173,
904
+ 523,
905
+ 825,
906
+ 608
907
+ ],
908
+ "page_idx": 8
909
+ },
910
+ {
911
+ "type": "text",
912
+ "text": "Results on DenseNet Our method improves the DenseNet results, and confirms the findings in the main paper. In some cases, results are actually stronger. The primary findings are: ",
913
+ "bbox": [
914
+ 173,
915
+ 623,
916
+ 823,
917
+ 651
918
+ ],
919
+ "page_idx": 8
920
+ },
921
+ {
922
+ "type": "text",
923
+ "text": "• As seen in Fig. 8 (left), using a stronger low-pass filter, such as Binomial (5, 7) without data augmentation, provides competitive performance compared to the baseline trained with data augmentation. For Binomial (7), performance is actually better in both consistency and accuracy. • As seen in Fig. 8 (right), when training with data augmentation, using filters such as Rect (3), Triangle (3,5), and Binomial (5,7) not only increase consistency, as expected, but also slightly increases accuracy, surprisingly. ",
924
+ "bbox": [
925
+ 179,
926
+ 665,
927
+ 825,
928
+ 750
929
+ ],
930
+ "page_idx": 8
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "The observations for DenseNet corroborate the results from VGG13 in the main paper, further demonstrating the effectiveness of blurring before downsampling. ",
935
+ "bbox": [
936
+ 173,
937
+ 762,
938
+ 823,
939
+ 791
940
+ ],
941
+ "page_idx": 8
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "B ROBUSTNESS TO SHIFT-BASED ADVERSARY ",
946
+ "text_level": 1,
947
+ "bbox": [
948
+ 174,
949
+ 813,
950
+ 570,
951
+ 828
952
+ ],
953
+ "page_idx": 8
954
+ },
955
+ {
956
+ "type": "text",
957
+ "text": "In the main paper, we show that using the proposed PoolBlurDownsample method increases the classification consistency, while maintaining accuracy. A logical consequence is increased accuracy in presence of a shift-based adversary. We empirically confirm this in Fig. 9 for VGG13 on CIFAR10. We compute classification accuracy as a function of maximum adversarial shift. A max shift of 2 means the adversary can choose any of the 25 positions within a $5 \\times 5$ window. For the classifier to “win”, it must correctly classify all of them correctly. Max shift of 0 means that there is no adversary. Conversely, a max shift of 16 means the image must be correctly classified at all $3 2 \\times 3 2 = 1 0 2 4$ positions. ",
958
+ "bbox": [
959
+ 174,
960
+ 843,
961
+ 825,
962
+ 898
963
+ ],
964
+ "page_idx": 8
965
+ },
966
+ {
967
+ "type": "text",
968
+ "text": "",
969
+ "bbox": [
970
+ 174,
971
+ 103,
972
+ 825,
973
+ 160
974
+ ],
975
+ "page_idx": 9
976
+ },
977
+ {
978
+ "type": "text",
979
+ "text": "Our primary observations are as follows: ",
980
+ "bbox": [
981
+ 176,
982
+ 166,
983
+ 441,
984
+ 181
985
+ ],
986
+ "page_idx": 9
987
+ },
988
+ {
989
+ "type": "text",
990
+ "text": "• As seen in Fig. 9 (left), the baseline network (gray) is very sensitive to the adversary. \n• Adding larger Binomial filters (from red to purple) increases robustness to the adversary. In fact, Binomial (7) filter (purple) without augmentation outperforms the baseline (black) with augmentation. \n• As seen in Fig. 9 (right), adding larger Binomial filters also increases adversarial robustness, even when training with augmentation. ",
991
+ "bbox": [
992
+ 179,
993
+ 193,
994
+ 825,
995
+ 276
996
+ ],
997
+ "page_idx": 9
998
+ },
999
+ {
1000
+ "type": "text",
1001
+ "text": "These results corroborate the findings in the main paper, and demonstrate a use case: increased robustness to shift-based adversarial attack. ",
1002
+ "bbox": [
1003
+ 174,
1004
+ 287,
1005
+ 825,
1006
+ 315
1007
+ ],
1008
+ "page_idx": 9
1009
+ },
1010
+ {
1011
+ "type": "image",
1012
+ "img_path": "images/60212be8f0cdf442f60f771a46812a06b113c0639bc21e17b65231cf46189bd4.jpg",
1013
+ "image_caption": [
1014
+ "Figure 9: Robustness to shift-based adversarial attack. Classification accuracy as a function of the number of pixels an adversary is allowed to shift the image. Applying our proposed filtering increases robustness, both without (left) and with right data augmentation. "
1015
+ ],
1016
+ "image_footnote": [],
1017
+ "bbox": [
1018
+ 179,
1019
+ 323,
1020
+ 816,
1021
+ 546
1022
+ ],
1023
+ "page_idx": 9
1024
+ },
1025
+ {
1026
+ "type": "text",
1027
+ "text": "C EFFECT OF BLURRING BEFORE POOLING ",
1028
+ "text_level": 1,
1029
+ "bbox": [
1030
+ 174,
1031
+ 608,
1032
+ 544,
1033
+ 623
1034
+ ],
1035
+ "page_idx": 9
1036
+ },
1037
+ {
1038
+ "type": "text",
1039
+ "text": "In our proposed method, we break the strided-pooling operation into two, and blur in between. This allows us to directly blur before downsampling, which has solid theoretical backing in sampling theory (Oppenheim et al., 1999), and is commonly used in image processing (Gonzalez & Woods, 1992), graphics (Foley et al., 1995), and computer vision (Szeliski, 2010). Here, we empirically investigate blurring before pooling instead. ",
1040
+ "bbox": [
1041
+ 174,
1042
+ 638,
1043
+ 825,
1044
+ 709
1045
+ ],
1046
+ "page_idx": 9
1047
+ },
1048
+ {
1049
+ "type": "text",
1050
+ "text": "Fig. 10 shows the results by applying blurring first (shown in the gray points), in comparison our proposed method (colored polygons, as shown before in Fig. 5). We make the following observations: ",
1051
+ "bbox": [
1052
+ 174,
1053
+ 715,
1054
+ 821,
1055
+ 756
1056
+ ],
1057
+ "page_idx": 9
1058
+ },
1059
+ {
1060
+ "type": "text",
1061
+ "text": "• In Fig. 10 (right), when training with augmentation, blurring before pooling reduces performance for all filters. For almost all filters (with few exceptions), both classification accuracy and consistency are significantly reduced. \n• In Fig. 10 (left), when training without augmentation, the lower performing filters actually perform better when blurring before filtering. For the better filters, however, blurring before pooling lowers performance (similar shift-invariance, but lower accuracy). ",
1062
+ "bbox": [
1063
+ 179,
1064
+ 768,
1065
+ 825,
1066
+ 857
1067
+ ],
1068
+ "page_idx": 9
1069
+ },
1070
+ {
1071
+ "type": "text",
1072
+ "text": "The signal pre-pooling is undoubtedly related to the signal post-pooling. Thus, blurring before pooling provides “second-hand” anti-aliasing, and still increases shift-invariance over the baseline. Though it does empirically help in certain circumstances (the lower-performing filters, without augmentation), the best performing filters use the proposed PoolBlurDownsample ordering. ",
1073
+ "bbox": [
1074
+ 174,
1075
+ 867,
1076
+ 823,
1077
+ 924
1078
+ ],
1079
+ "page_idx": 9
1080
+ },
1081
+ {
1082
+ "type": "image",
1083
+ "img_path": "images/fc3fc005ad0c6c35b42051c1829110a12875808e7553f2a75e56d966788cb20a.jpg",
1084
+ "image_caption": [
1085
+ "0.00 0.02 0.04 0.06 0.08 0.10Figure 10: Blurring before pooling. Blurring before the max-pooling (gray points) for different filters, as compared to their PoolBlurDownsample counterparts (colored polygons). The poorer performing filters, when training without data augmentation, observe an increase in performance. For almost all filters when training with data augmentation, and for the higher-performing filters training without data augmentation, performance is significantly reduced, often in both accuracy and consistency. Directly blurring the downsampled signal (after the pooling layer), as proposed in the main paper, is more effective. "
1086
+ ],
1087
+ "image_footnote": [],
1088
+ "bbox": [
1089
+ 179,
1090
+ 98,
1091
+ 816,
1092
+ 303
1093
+ ],
1094
+ "page_idx": 10
1095
+ },
1096
+ {
1097
+ "type": "text",
1098
+ "text": "D AVERAGE ACCURACY ACROSS SPATIAL POSITIONS ",
1099
+ "text_level": 1,
1100
+ "bbox": [
1101
+ 174,
1102
+ 405,
1103
+ 627,
1104
+ 419
1105
+ ],
1106
+ "page_idx": 10
1107
+ },
1108
+ {
1109
+ "type": "text",
1110
+ "text": "In Figure 11, we show how accuracy systematically degrades as a function of spatial shift, when training without augmentation. We observe the following: ",
1111
+ "bbox": [
1112
+ 173,
1113
+ 435,
1114
+ 823,
1115
+ 464
1116
+ ],
1117
+ "page_idx": 10
1118
+ },
1119
+ {
1120
+ "type": "text",
1121
+ "text": "• On the left, the baseline heatmap shows that classification accuracy when testing with no shift, but quickly degrades when shifting. \n• The proposed filtering decreases the degradation. Binomial-7 is largely consistent across all spatial positions. \n• On the right, we plot the accuracy when making diagonal shifts. As increased filtering is added, classification accuracy becomes consistent in all positions. ",
1122
+ "bbox": [
1123
+ 179,
1124
+ 478,
1125
+ 825,
1126
+ 561
1127
+ ],
1128
+ "page_idx": 10
1129
+ },
1130
+ {
1131
+ "type": "image",
1132
+ "img_path": "images/a7418dcd5979dfe859cf8528d7af7af9e9ecb04c245903404c8ea80c7c54d37f.jpg",
1133
+ "image_caption": [
1134
+ "Figure 11: Average accuracy as a function of shift. (Left) We show classification accuracy across the test set as a function of shift, given different filters. (Right) We plot accuracy vs diagonal shift in the input image, across different filters. Note that accuracy degrades quickly with the baseline, but as increased filtering is added, classifications become consistent across spatial positions. "
1135
+ ],
1136
+ "image_footnote": [],
1137
+ "bbox": [
1138
+ 183,
1139
+ 587,
1140
+ 816,
1141
+ 718
1142
+ ],
1143
+ "page_idx": 10
1144
+ },
1145
+ {
1146
+ "type": "text",
1147
+ "text": "E FILTER DISCUSSION ",
1148
+ "text_level": 1,
1149
+ "bbox": [
1150
+ 176,
1151
+ 809,
1152
+ 374,
1153
+ 824
1154
+ ],
1155
+ "page_idx": 10
1156
+ },
1157
+ {
1158
+ "type": "text",
1159
+ "text": "E.1 FILTER SELECTION ",
1160
+ "text_level": 1,
1161
+ "bbox": [
1162
+ 176,
1163
+ 840,
1164
+ 348,
1165
+ 856
1166
+ ],
1167
+ "page_idx": 10
1168
+ },
1169
+ {
1170
+ "type": "text",
1171
+ "text": "We use select standard low-pass filters to empirically test. The filter weights are shown in Tab. 1 in the main paper. Note that weights are normalized to sum to 1. Rectangle, Triangle, and Binomial filters are discussed in textbooks such as (Szeliski, 2010). Window and Least Squares are more advanced FIR filter design techniques. ",
1172
+ "bbox": [
1173
+ 174,
1174
+ 867,
1175
+ 825,
1176
+ 924
1177
+ ],
1178
+ "page_idx": 10
1179
+ },
1180
+ {
1181
+ "type": "text",
1182
+ "text": "• Rectangle: a moving average, often referred to as a box filter. The filter is a vector of length ones. For example, Rect-2, is [1, 1]. This filter, followed by subsampling, is equivalent to the AveragePooling layer. ",
1183
+ "bbox": [
1184
+ 181,
1185
+ 103,
1186
+ 823,
1187
+ 146
1188
+ ],
1189
+ "page_idx": 11
1190
+ },
1191
+ {
1192
+ "type": "text",
1193
+ "text": "• Triangle: linearly decreases weight of neighboring values. This is equivalent of applying box filtering twice. For example, Triangle-3 is $[ 1 , 2 , 1 ]$ , is two Rect-2 [1, 1] filters convolved together, and Triangle-5 is $[ 1 , 2 , 3 , 2 , 1 ]$ , is two Rect-3 $[ 1 , 1 , 1 ]$ filters convolved together. ",
1194
+ "bbox": [
1195
+ 181,
1196
+ 151,
1197
+ 821,
1198
+ 194
1199
+ ],
1200
+ "page_idx": 11
1201
+ },
1202
+ {
1203
+ "type": "text",
1204
+ "text": "• Binomial: Filter used in Laplacian Pyramids (Burt & Adelson, 1987); [1, 1] filter convolved with itself repeatedly. Note that Binomial-2,3 is equivalent to Rectangle-2 and Triangle-3, respectively. ",
1205
+ "bbox": [
1206
+ 179,
1207
+ 196,
1208
+ 826,
1209
+ 239
1210
+ ],
1211
+ "page_idx": 11
1212
+ },
1213
+ {
1214
+ "type": "text",
1215
+ "text": "• Window: filter produced using the window method (firwin), as described in “7.4 Optimum Approximations for FIR Filters” in Oppenheim et al. (1999). ",
1216
+ "bbox": [
1217
+ 181,
1218
+ 244,
1219
+ 821,
1220
+ 273
1221
+ ],
1222
+ "page_idx": 11
1223
+ },
1224
+ {
1225
+ "type": "text",
1226
+ "text": "• Least Squares: least squares error minimization (firls), from Python scipy.signal toolbox, as described in Selesnick (2005). ",
1227
+ "bbox": [
1228
+ 179,
1229
+ 279,
1230
+ 821,
1231
+ 306
1232
+ ],
1233
+ "page_idx": 11
1234
+ },
1235
+ {
1236
+ "type": "text",
1237
+ "text": "E.2 FILTER SEPARABILITY ",
1238
+ "text_level": 1,
1239
+ "bbox": [
1240
+ 174,
1241
+ 324,
1242
+ 370,
1243
+ 338
1244
+ ],
1245
+ "page_idx": 11
1246
+ },
1247
+ {
1248
+ "type": "text",
1249
+ "text": "As discussed in Section 3.2, our filters are separable. Consider a $G \\in \\mathbb { R }$ . If $G$ is rank-1, it can be decomposed (or separated) into $G _ { \\mathrm { y } } G _ { \\mathrm { x } }$ , where $G _ { \\mathrm { y } } \\in \\mathbb { R } ^ { K \\times 1 }$ and $G _ { \\mathrm { x } } \\in \\mathbb { R } ^ { 1 \\times K }$ . This is an important consideration when convolving G with signal X ∈ RH×W . ",
1250
+ "bbox": [
1251
+ 174,
1252
+ 349,
1253
+ 825,
1254
+ 393
1255
+ ],
1256
+ "page_idx": 11
1257
+ },
1258
+ {
1259
+ "type": "equation",
1260
+ "img_path": "images/c8748109a49351a014116f1b9d2b8efdff5d82f79d6ceb86263a58fc5bc8187c.jpg",
1261
+ "text": "$$\nG * X = ( G _ { \\mathrm { y } } * G _ { \\mathrm { x } } ) * X = G _ { \\mathrm { y } } * ( G _ { \\mathrm { x } } * X ) \\mathrm { , w h e r e * i s c o n v o l u t i o n }\n$$",
1262
+ "text_format": "latex",
1263
+ "bbox": [
1264
+ 279,
1265
+ 414,
1266
+ 718,
1267
+ 431
1268
+ ],
1269
+ "page_idx": 11
1270
+ },
1271
+ {
1272
+ "type": "text",
1273
+ "text": "The left-hand side, evaluating the blur with 2-D convolution takes $H \\times W \\times K \\times K$ multiply-adds, with runtime scaling quadratically with $K ^ { 2 }$ . Meanwhile, evaluating a horizontal and vertical blur sequentially takes $H \\times W \\times K$ multiply-adds each, scaling linearly by $K$ . ",
1274
+ "bbox": [
1275
+ 174,
1276
+ 443,
1277
+ 825,
1278
+ 486
1279
+ ],
1280
+ "page_idx": 11
1281
+ },
1282
+ {
1283
+ "type": "text",
1284
+ "text": "REFERENCES ",
1285
+ "text_level": 1,
1286
+ "bbox": [
1287
+ 174,
1288
+ 506,
1289
+ 287,
1290
+ 521
1291
+ ],
1292
+ "page_idx": 11
1293
+ },
1294
+ {
1295
+ "type": "text",
1296
+ "text": "Edward H Adelson, Charles H Anderson, James R Bergen, Peter J Burt, and Joan M Ogden. Pyramid methods in image processing. RCA engineer, 29(6):33–41, 1984. ",
1297
+ "bbox": [
1298
+ 173,
1299
+ 530,
1300
+ 825,
1301
+ 559
1302
+ ],
1303
+ "page_idx": 11
1304
+ },
1305
+ {
1306
+ "type": "text",
1307
+ "text": "Mathieu Aubry and Bryan C Russell. Understanding deep features with computer-generated imagery. In Proceedings of the IEEE International Conference on Computer Vision, pp. 2875–2883, 2015. ",
1308
+ "bbox": [
1309
+ 173,
1310
+ 568,
1311
+ 825,
1312
+ 611
1313
+ ],
1314
+ "page_idx": 11
1315
+ },
1316
+ {
1317
+ "type": "text",
1318
+ "text": "Aharon Azulay and Yair Weiss. Why do deep convolutional networks generalize so poorly to small image transformations? arXiv preprint arXiv:1805.12177, 2018. ",
1319
+ "bbox": [
1320
+ 171,
1321
+ 621,
1322
+ 823,
1323
+ 650
1324
+ ],
1325
+ "page_idx": 11
1326
+ },
1327
+ {
1328
+ "type": "text",
1329
+ "text": "Joan Bruna and Stephane Mallat. Invariant scattering convolution networks. ´ IEEE transactions on pattern analysis and machine intelligence, 35(8):1872–1886, 2013. ",
1330
+ "bbox": [
1331
+ 173,
1332
+ 660,
1333
+ 823,
1334
+ 689
1335
+ ],
1336
+ "page_idx": 11
1337
+ },
1338
+ {
1339
+ "type": "text",
1340
+ "text": "Peter J Burt and Edward H Adelson. The laplacian pyramid as a compact image code. In Readings in Computer Vision, pp. 671–679. Elsevier, 1987. ",
1341
+ "bbox": [
1342
+ 173,
1343
+ 698,
1344
+ 823,
1345
+ 728
1346
+ ],
1347
+ "page_idx": 11
1348
+ },
1349
+ {
1350
+ "type": "text",
1351
+ "text": "John Canny. A computational approach to edge detection. IEEE Transactions on pattern analysis and machine intelligence, (6):679–698, 1986. ",
1352
+ "bbox": [
1353
+ 173,
1354
+ 737,
1355
+ 823,
1356
+ 766
1357
+ ],
1358
+ "page_idx": 11
1359
+ },
1360
+ {
1361
+ "type": "text",
1362
+ "text": "Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Semantic image segmentation with deep convolutional nets and fully connected crfs. arXiv preprint arXiv:1412.7062, 2014. ",
1363
+ "bbox": [
1364
+ 173,
1365
+ 775,
1366
+ 823,
1367
+ 819
1368
+ ],
1369
+ "page_idx": 11
1370
+ },
1371
+ {
1372
+ "type": "text",
1373
+ "text": "Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. IEEE transactions on pattern analysis and machine intelligence, 40(4): 834–848, 2018. ",
1374
+ "bbox": [
1375
+ 173,
1376
+ 828,
1377
+ 825,
1378
+ 885
1379
+ ],
1380
+ "page_idx": 11
1381
+ },
1382
+ {
1383
+ "type": "text",
1384
+ "text": "Taco Cohen and Max Welling. Group equivariant convolutional networks. In International conference on machine learning, pp. 2990–2999, 2016. ",
1385
+ "bbox": [
1386
+ 173,
1387
+ 895,
1388
+ 820,
1389
+ 924
1390
+ ],
1391
+ "page_idx": 11
1392
+ },
1393
+ {
1394
+ "type": "text",
1395
+ "text": "Alexey Dosovitskiy and Thomas Brox. Generating images with perceptual similarity metrics based on deep networks. In Advances in Neural Information Processing Systems, pp. 658–666, 2016a. ",
1396
+ "bbox": [
1397
+ 171,
1398
+ 103,
1399
+ 825,
1400
+ 132
1401
+ ],
1402
+ "page_idx": 12
1403
+ },
1404
+ {
1405
+ "type": "text",
1406
+ "text": "Alexey Dosovitskiy and Thomas Brox. Inverting visual representations with convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4829– 4837, 2016b. ",
1407
+ "bbox": [
1408
+ 174,
1409
+ 141,
1410
+ 823,
1411
+ 184
1412
+ ],
1413
+ "page_idx": 12
1414
+ },
1415
+ {
1416
+ "type": "text",
1417
+ "text": "Logan Engstrom, Dimitris Tsipras, Ludwig Schmidt, and Aleksander Madry. A rotation and a translation suffice: Fooling cnns with simple transformations. arXiv preprint arXiv:1712.02779, 2017. ",
1418
+ "bbox": [
1419
+ 176,
1420
+ 193,
1421
+ 823,
1422
+ 236
1423
+ ],
1424
+ "page_idx": 12
1425
+ },
1426
+ {
1427
+ "type": "text",
1428
+ "text": "Carlos Esteves, Christine Allen-Blanchette, Xiaowei Zhou, and Kostas Daniilidis. Polar transformer networks. arXiv preprint arXiv:1709.01889, 2017. ",
1429
+ "bbox": [
1430
+ 173,
1431
+ 244,
1432
+ 821,
1433
+ 273
1434
+ ],
1435
+ "page_idx": 12
1436
+ },
1437
+ {
1438
+ "type": "text",
1439
+ "text": "Alhussein Fawzi and Pascal Frossard. Manitest: Are classifiers really invariant? arXiv preprint arXiv:1507.06535, 2015. ",
1440
+ "bbox": [
1441
+ 173,
1442
+ 282,
1443
+ 823,
1444
+ 313
1445
+ ],
1446
+ "page_idx": 12
1447
+ },
1448
+ {
1449
+ "type": "text",
1450
+ "text": "James D. Foley, Andries van Dam, Steven K. Feiner, and John F. Hughes. Computer Graphics: Principles and Practice. Addison-Wesley, 2nd edition, 1995. ",
1451
+ "bbox": [
1452
+ 173,
1453
+ 320,
1454
+ 821,
1455
+ 351
1456
+ ],
1457
+ "page_idx": 12
1458
+ },
1459
+ {
1460
+ "type": "text",
1461
+ "text": "James E Fowler. The redundant discrete wavelet transform and additive noise. IEEE Signal Processing Letters, 12(9):629–632, 2005. ",
1462
+ "bbox": [
1463
+ 171,
1464
+ 359,
1465
+ 823,
1466
+ 388
1467
+ ],
1468
+ "page_idx": 12
1469
+ },
1470
+ {
1471
+ "type": "text",
1472
+ "text": "Kunihiko Fukushima and Sei Miyake. Neocognitron: A self-organizing neural network model for a mechanism of visual pattern recognition. In Competition and cooperation in neural nets, pp. 267–285. Springer, 1982. ",
1473
+ "bbox": [
1474
+ 173,
1475
+ 397,
1476
+ 825,
1477
+ 440
1478
+ ],
1479
+ "page_idx": 12
1480
+ },
1481
+ {
1482
+ "type": "text",
1483
+ "text": "Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 580–587, 2014. ",
1484
+ "bbox": [
1485
+ 173,
1486
+ 449,
1487
+ 823,
1488
+ 492
1489
+ ],
1490
+ "page_idx": 12
1491
+ },
1492
+ {
1493
+ "type": "text",
1494
+ "text": "Rafael C. Gonzalez and Richard E. Woods. Digital Image Processing. Pearson, 2nd edition, 1992. ",
1495
+ "bbox": [
1496
+ 171,
1497
+ 500,
1498
+ 816,
1499
+ 517
1500
+ ],
1501
+ "page_idx": 12
1502
+ },
1503
+ {
1504
+ "type": "text",
1505
+ "text": "Ian Goodfellow, Honglak Lee, Quoc V Le, Andrew Saxe, and Andrew Y Ng. Measuring invariances in deep networks. In Advances in neural information processing systems, pp. 646–654, 2009. ",
1506
+ "bbox": [
1507
+ 171,
1508
+ 525,
1509
+ 823,
1510
+ 555
1511
+ ],
1512
+ "page_idx": 12
1513
+ },
1514
+ {
1515
+ "type": "text",
1516
+ "text": "Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing systems, 2014a. ",
1517
+ "bbox": [
1518
+ 174,
1519
+ 563,
1520
+ 823,
1521
+ 606
1522
+ ],
1523
+ "page_idx": 12
1524
+ },
1525
+ {
1526
+ "type": "text",
1527
+ "text": "Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014b. ",
1528
+ "bbox": [
1529
+ 169,
1530
+ 614,
1531
+ 825,
1532
+ 645
1533
+ ],
1534
+ "page_idx": 12
1535
+ },
1536
+ {
1537
+ "type": "text",
1538
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Computer Vision and Pattern Recognition (CVPR), June 2016. ",
1539
+ "bbox": [
1540
+ 173,
1541
+ 652,
1542
+ 823,
1543
+ 683
1544
+ ],
1545
+ "page_idx": 12
1546
+ },
1547
+ {
1548
+ "type": "text",
1549
+ "text": "Olivier J Henaff and Eero P Simoncelli. Geodesics of learned representations. ´ arXiv preprint arXiv:1511.06394, 2015. ",
1550
+ "bbox": [
1551
+ 173,
1552
+ 690,
1553
+ 823,
1554
+ 720
1555
+ ],
1556
+ "page_idx": 12
1557
+ },
1558
+ {
1559
+ "type": "text",
1560
+ "text": "Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In CVPR, volume 1, pp. 3, 2017. ",
1561
+ "bbox": [
1562
+ 173,
1563
+ 728,
1564
+ 823,
1565
+ 758
1566
+ ],
1567
+ "page_idx": 12
1568
+ },
1569
+ {
1570
+ "type": "text",
1571
+ "text": "David H Hubel and Torsten N Wiesel. Receptive fields, binocular interaction and functional architecture in the cat’s visual cortex. The Journal of physiology, 160(1):106–154, 1962. ",
1572
+ "bbox": [
1573
+ 173,
1574
+ 767,
1575
+ 823,
1576
+ 796
1577
+ ],
1578
+ "page_idx": 12
1579
+ },
1580
+ {
1581
+ "type": "text",
1582
+ "text": "Angjoo Kanazawa, Abhishek Sharma, and David Jacobs. Locally scale-invariant convolutional neural networks. arXiv preprint arXiv:1412.5104, 2014. ",
1583
+ "bbox": [
1584
+ 169,
1585
+ 804,
1586
+ 823,
1587
+ 835
1588
+ ],
1589
+ "page_idx": 12
1590
+ },
1591
+ {
1592
+ "type": "text",
1593
+ "text": "Ryan Kiros, Yukun Zhu, Ruslan R Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Skip-thought vectors. In Advances in neural information processing systems, pp. 3294–3302, 2015. ",
1594
+ "bbox": [
1595
+ 176,
1596
+ 843,
1597
+ 821,
1598
+ 886
1599
+ ],
1600
+ "page_idx": 12
1601
+ },
1602
+ {
1603
+ "type": "text",
1604
+ "text": "Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009. ",
1605
+ "bbox": [
1606
+ 173,
1607
+ 895,
1608
+ 820,
1609
+ 924
1610
+ ],
1611
+ "page_idx": 12
1612
+ },
1613
+ {
1614
+ "type": "text",
1615
+ "text": "Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012. ",
1616
+ "bbox": [
1617
+ 174,
1618
+ 103,
1619
+ 823,
1620
+ 146
1621
+ ],
1622
+ "page_idx": 13
1623
+ },
1624
+ {
1625
+ "type": "text",
1626
+ "text": "Yann LeCun, Bernhard E Boser, John S Denker, Donnie Henderson, Richard E Howard, Wayne E Hubbard, and Lawrence D Jackel. Handwritten digit recognition with a back-propagation network. In Advances in neural information processing systems, pp. 396–404, 1990. ",
1627
+ "bbox": [
1628
+ 178,
1629
+ 154,
1630
+ 821,
1631
+ 198
1632
+ ],
1633
+ "page_idx": 13
1634
+ },
1635
+ {
1636
+ "type": "text",
1637
+ "text": "Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to ´ document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. ",
1638
+ "bbox": [
1639
+ 176,
1640
+ 205,
1641
+ 821,
1642
+ 236
1643
+ ],
1644
+ "page_idx": 13
1645
+ },
1646
+ {
1647
+ "type": "text",
1648
+ "text": "Karel Lenc and Andrea Vedaldi. Understanding image representations by measuring their equivariance and equivalence. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 991–999, 2015. ",
1649
+ "bbox": [
1650
+ 176,
1651
+ 243,
1652
+ 823,
1653
+ 286
1654
+ ],
1655
+ "page_idx": 13
1656
+ },
1657
+ {
1658
+ "type": "text",
1659
+ "text": "Thomas Leung and Jitendra Malik. Representing and recognizing the visual appearance of materials using three-dimensional textons. International journal of computer vision, 43(1):29–44, 2001. ",
1660
+ "bbox": [
1661
+ 174,
1662
+ 295,
1663
+ 821,
1664
+ 325
1665
+ ],
1666
+ "page_idx": 13
1667
+ },
1668
+ {
1669
+ "type": "text",
1670
+ "text": "Min Lin, Qiang Chen, and Shuicheng Yan. Network in network. arXiv preprint arXiv:1312.4400, 2013. ",
1671
+ "bbox": [
1672
+ 173,
1673
+ 332,
1674
+ 821,
1675
+ 362
1676
+ ],
1677
+ "page_idx": 13
1678
+ },
1679
+ {
1680
+ "type": "text",
1681
+ "text": "Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Computer Vision and Pattern Recognition (CVPR), 2015. ",
1682
+ "bbox": [
1683
+ 173,
1684
+ 369,
1685
+ 821,
1686
+ 400
1687
+ ],
1688
+ "page_idx": 13
1689
+ },
1690
+ {
1691
+ "type": "text",
1692
+ "text": "David G Lowe. Object recognition from local scale-invariant features. In Computer vision, 1999. The proceedings of the seventh IEEE international conference on, volume 2, pp. 1150–1157. Ieee, 1999. ",
1693
+ "bbox": [
1694
+ 173,
1695
+ 407,
1696
+ 825,
1697
+ 450
1698
+ ],
1699
+ "page_idx": 13
1700
+ },
1701
+ {
1702
+ "type": "text",
1703
+ "text": "Aravindh Mahendran and Andrea Vedaldi. Understanding deep image representations by inverting them. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 5188–5196, 2015. ",
1704
+ "bbox": [
1705
+ 174,
1706
+ 459,
1707
+ 825,
1708
+ 502
1709
+ ],
1710
+ "page_idx": 13
1711
+ },
1712
+ {
1713
+ "type": "text",
1714
+ "text": "Alexander Mordvintsev, Christopher Olah, and Mike Tyka. Deepdream-a code example for visualizing neural networks. Google Research, 2:5, 2015. ",
1715
+ "bbox": [
1716
+ 174,
1717
+ 511,
1718
+ 823,
1719
+ 541
1720
+ ],
1721
+ "page_idx": 13
1722
+ },
1723
+ {
1724
+ "type": "text",
1725
+ "text": "Anh Nguyen, Jeff Clune, Yoshua Bengio, Alexey Dosovitskiy, and Jason Yosinski. Plug & play generative networks: Conditional iterative generation of images in latent space. In CVPR, volume 2, pp. 7, 2017. ",
1726
+ "bbox": [
1727
+ 174,
1728
+ 547,
1729
+ 825,
1730
+ 592
1731
+ ],
1732
+ "page_idx": 13
1733
+ },
1734
+ {
1735
+ "type": "text",
1736
+ "text": "Alan V. Oppenheim, Ronald W. Schafer, and John R. Buck. Discrete-Time Signal Processing. Pearson, 2nd edition, 1999. ",
1737
+ "bbox": [
1738
+ 173,
1739
+ 599,
1740
+ 823,
1741
+ 630
1742
+ ],
1743
+ "page_idx": 13
1744
+ },
1745
+ {
1746
+ "type": "text",
1747
+ "text": "Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017. ",
1748
+ "bbox": [
1749
+ 174,
1750
+ 637,
1751
+ 825,
1752
+ 680
1753
+ ],
1754
+ "page_idx": 13
1755
+ },
1756
+ {
1757
+ "type": "text",
1758
+ "text": "Avraham Ruderman, Neil C Rabinowitz, Ari S Morcos, and Daniel Zoran. Pooling is neither necessary nor sufficient for appropriate deformation stability in cnns. arXiv preprint arXiv:1804.04438, 2018. ",
1759
+ "bbox": [
1760
+ 176,
1761
+ 689,
1762
+ 823,
1763
+ 732
1764
+ ],
1765
+ "page_idx": 13
1766
+ },
1767
+ {
1768
+ "type": "text",
1769
+ "text": "Dominik Scherer, Andreas Muller, and Sven Behnke. Evaluation of pooling operations in con- ¨ volutional architectures for object recognition. In Artificial Neural Networks–ICANN 2010, pp. 92–101. Springer, 2010. ",
1770
+ "bbox": [
1771
+ 173,
1772
+ 739,
1773
+ 823,
1774
+ 784
1775
+ ],
1776
+ "page_idx": 13
1777
+ },
1778
+ {
1779
+ "type": "text",
1780
+ "text": "Ivan Selesnick. Linear-phase fir filter design by least squares, 2005. URL http: //web.archive.org/web/20080207010024/http://www.808multimedia. com/winnt/kernel.htm. ",
1781
+ "bbox": [
1782
+ 173,
1783
+ 792,
1784
+ 820,
1785
+ 834
1786
+ ],
1787
+ "page_idx": 13
1788
+ },
1789
+ {
1790
+ "type": "text",
1791
+ "text": "Laurent Sifre and Stephane Mallat. Rotation, scaling and deformation invariant scattering for texture ´ discrimination. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1233–1240, 2013. ",
1792
+ "bbox": [
1793
+ 173,
1794
+ 843,
1795
+ 823,
1796
+ 886
1797
+ ],
1798
+ "page_idx": 13
1799
+ },
1800
+ {
1801
+ "type": "text",
1802
+ "text": "Eero P Simoncelli, William T Freeman, Edward H Adelson, and David J Heeger. Shiftable multiscale transforms. IEEE transactions on Information Theory, 38(2):587–607, 1992. ",
1803
+ "bbox": [
1804
+ 171,
1805
+ 895,
1806
+ 820,
1807
+ 924
1808
+ ],
1809
+ "page_idx": 13
1810
+ },
1811
+ {
1812
+ "type": "text",
1813
+ "text": "Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. ",
1814
+ "bbox": [
1815
+ 171,
1816
+ 103,
1817
+ 823,
1818
+ 132
1819
+ ],
1820
+ "page_idx": 14
1821
+ },
1822
+ {
1823
+ "type": "text",
1824
+ "text": "Jiawei Su, Danilo Vasconcellos Vargas, and Sakurai Kouichi. One pixel attack for fooling deep neural networks. arXiv preprint arXiv:1710.08864, 2017. ",
1825
+ "bbox": [
1826
+ 171,
1827
+ 140,
1828
+ 823,
1829
+ 170
1830
+ ],
1831
+ "page_idx": 14
1832
+ },
1833
+ {
1834
+ "type": "text",
1835
+ "text": "Richard Szeliski. Computer vision: algorithms and applications. Springer Science & Business Media, 2010. ",
1836
+ "bbox": [
1837
+ 173,
1838
+ 178,
1839
+ 823,
1840
+ 208
1841
+ ],
1842
+ "page_idx": 14
1843
+ },
1844
+ {
1845
+ "type": "text",
1846
+ "text": "Andrea Vedaldi and Brian Fulkerson. Vlfeat: An open and portable library of computer vision algorithms. In Proceedings of the 18th ACM international conference on Multimedia, pp. 1469– 1472. ACM, 2010. ",
1847
+ "bbox": [
1848
+ 173,
1849
+ 215,
1850
+ 825,
1851
+ 260
1852
+ ],
1853
+ "page_idx": 14
1854
+ },
1855
+ {
1856
+ "type": "text",
1857
+ "text": "Daniel E Worrall, Stephan J Garbin, Daniyar Turmukhambetov, and Gabriel J Brostow. Harmonic networks: Deep translation and rotation equivariance. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), volume 2, 2017. ",
1858
+ "bbox": [
1859
+ 174,
1860
+ 267,
1861
+ 823,
1862
+ 310
1863
+ ],
1864
+ "page_idx": 14
1865
+ },
1866
+ {
1867
+ "type": "text",
1868
+ "text": "Chaowei Xiao, Jun-Yan Zhu, Bo Li, Warren He, Mingyan Liu, and Dawn Song. Spatially transformed adversarial examples. arXiv preprint arXiv:1801.02612, 2018. ",
1869
+ "bbox": [
1870
+ 173,
1871
+ 319,
1872
+ 823,
1873
+ 349
1874
+ ],
1875
+ "page_idx": 14
1876
+ },
1877
+ {
1878
+ "type": "text",
1879
+ "text": "Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. arXiv preprint arXiv:1511.07122, 2015. ",
1880
+ "bbox": [
1881
+ 174,
1882
+ 357,
1883
+ 821,
1884
+ 387
1885
+ ],
1886
+ "page_idx": 14
1887
+ },
1888
+ {
1889
+ "type": "text",
1890
+ "text": "Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In European conference on computer vision, pp. 818–833. Springer, 2014. ",
1891
+ "bbox": [
1892
+ 173,
1893
+ 395,
1894
+ 823,
1895
+ 425
1896
+ ],
1897
+ "page_idx": 14
1898
+ },
1899
+ {
1900
+ "type": "text",
1901
+ "text": "Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In CVPR, 2018. ",
1902
+ "bbox": [
1903
+ 173,
1904
+ 433,
1905
+ 823,
1906
+ 462
1907
+ ],
1908
+ "page_idx": 14
1909
+ },
1910
+ {
1911
+ "type": "text",
1912
+ "text": "Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Object detectors emerge in deep scene cnns. arXiv preprint arXiv:1412.6856, 2014. ",
1913
+ "bbox": [
1914
+ 173,
1915
+ 470,
1916
+ 821,
1917
+ 500
1918
+ ],
1919
+ "page_idx": 14
1920
+ }
1921
+ ]
parse/train/SklVEnR5K7/SklVEnR5K7_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SklVEnR5K7/SklVEnR5K7_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/r1gdj2EKPB/r1gdj2EKPB_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/r1gdj2EKPB/r1gdj2EKPB_model.json ADDED
The diff for this file is too large to render. See raw diff