ZHANGYUXUAN-zR commited on
Commit
67635c6
·
verified ·
1 Parent(s): 22be8bc

Add files using upload-large-folder tool

Browse files
parse/train/4cEapqXfP30/4cEapqXfP30.md ADDED
@@ -0,0 +1,266 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Adversarial Neuron Pruning Purifies Backdoored Deep Models
2
+
3
+ Dongxian $\mathbf { W _ { u } 1 * }$ Yisen Wang2,3† 1Dept. of Computer Science and Technology, Tsinghua University, China 2Key Lab. of Machine Perception, School of Artificial Intelligence, Peking Univesity, China 3Institute for Artificial Intelligence, Peking Univesity, China
4
+
5
+ # Abstract
6
+
7
+ As deep neural networks (DNNs) are growing larger, their requirements for computational resources become huge, which makes outsourcing training more popular. Training in a third-party platform, however, may introduce potential risks that a malicious trainer will return backdoored DNNs, which behave normally on clean samples but output targeted misclassifications whenever a trigger appears at the test time. Without any knowledge of the trigger, it is difficult to distinguish or recover benign DNNs from backdoored ones. In this paper, we first identify an unexpected sensitivity of backdoored DNNs, that is, they are much easier to collapse and tend to predict the target label on clean samples when their neurons are adversarially perturbed. Based on these observations, we propose a novel model repairing method, termed Adversarial Neuron Pruning (ANP), which prunes some sensitive neurons to purify the injected backdoor. Experiments show, even with only an extremely small amount of clean data (e.g., $1 \%$ ), ANP effectively removes the injected backdoor without causing obvious performance degradation. Our code is available at https://github.com/csdongxian/ANP_backdoor.
8
+
9
+ # 1 Introduction
10
+
11
+ In recent years, deep neural networks (DNNs) achieve satisfactory performance in many tasks, including computer vision [15], speech recognition [45], and gaming agents [36]. However, their success heavily relies on a large amount of computation and data, forcing researchers to outsource the training in “Machine Learning as a Service” (MLaaS) platforms or download pretrained models from the Internet, which brings potential risks of training-time attacks [17, 35, 2]. Among them, backdoor attack [14, 6, 42] is remarkably dangerous because it stealthily builds a strong relationship between a trigger pattern and a target label inside DNNs by poisoning a small proportion of the training data. As a result, the returned model always behaves normally on the clean data but is controlled to make target misclassification by presenting the trigger pattern such as a specific single-pixel [41] or a black-white checkerboard [14] at the test time.
12
+
13
+ Since DNNs are deployed in many real-world and safety-critical applications, it is urgent to defend against backdoor attacks. While there are many defense methods during training [38, 41, 8, 29, 20], this work focuses on a more realistic scenario in outsourcing training that repairs models after training. In particular, the defenders try to remove the injected backdoor without access to the model training process. Without knowledge of the trigger pattern, previous methods only achieve limited robustness [7, 24, 22]. Some works try to reconstruct the trigger [43, 5, 33, 50, 44], however, the trigger pattern in brand-new attacks becomes natural [26], invisible [49], and dynamic [30], leading to the reconstruction infeasible. Different from them, in this paper, we turn to explore whether we can successfully remove the injected backdoor even without knowing the trigger pattern.
14
+
15
+ Usually, the adversary perturbs inputs to cause misclassification, e.g., attaching triggers for backdoored models or adding adversarial perturbations. Parallel to this, we are also able to cause misclassification by perturbing neurons of DNNs [47]. For any neuron inside DNN, we could perturb its weight and bias by multiplying a relatively small number, to change its output. Similar to adversarial perturbations, we can optimize the neuron perturbations to increase its classification loss. Surprisingly, we find that, within the same perturbation budget, backdoored DNNs are much easier to collapse and prone to output the target label than normal DNNs even without the presence of the trigger. That is, the neurons that are sensitive to adversarial neuron perturbation are strongly related to the injected backdoor. Motivated by this, we propose a novel model repairing method, named Adversarial Neuron Pruning (ANP), which prunes most sensitive neurons under the adversarial neuron perturbation. Since the number of neurons is much smaller than weight parameters, e.g., only 4810 neurons for ResNet-18 while 11M parameters for the same model, our method can work well only based on $1 \%$ of clean data. Our main contributions are summarized as follows:
16
+
17
+ • We find that through adversarially perturbing neurons, backdoored DNNs can present backdoor behaviors even without the presence of the trigger patterns and are much easier to output misclassification than normal DNNs.
18
+ • To defend backdoor attacks, we propose a simple yet effective model repairing method, Adversarial Neuron Pruning (ANP), which prunes the most sensitive neurons under adversarial neuron perturbations without fine-tuning.
19
+ • Extensive experiments demonstrate that ANP consistently provides state-of-the-art defense performance against various backdoor attacks, even using an extremely small amount of clean data.
20
+
21
+ # 2 Related Work
22
+
23
+ # 2.1 Backdoor Attacks
24
+
25
+ The backdoor attack is a type of attacks occurring during DNN training. The adversary usually poisons a fraction of training data via attaching a predefined trigger and relabeling them as target labels (dirty-label setting) [14, 6]. All poisoned samples can be relabeled as a single target class (all-to-one), or poisoned samples from different source classes are relabeled as different target classes (all-to-all) [30]. After training, the model can be controlled to predict the target label in the presence of the trigger at the test time. Different from evasion attacks (e.g., adversarial attacks) [3, 39, 13], backdoor attacks aim to embed a input- and model-agnostic trigger into the model, which is a severe threat to the applications of deep learning [12]. Since incorrectly-labeled samples are easy to be detected, some attacks attach the trigger to samples from the target class (clean-label setting) [35, 42, 1]. Apart from simple forms like a single-pixel [41] or a black-and-white checkerboard [14], the trigger patterns can be more complex such as a sinusoidal strip [1] and a dynamic pattern [30]. These triggers in recent attacks become more natural [26] and human-imperceptible [49, 31], making them stealthy and hard to be detected by human inspection. Besides, powerful adversaries who have access to the model can optimize the trigger pattern [25], and even co-optimize the trigger pattern and the model together to enhance the power of backdoor attacks [32].
26
+
27
+ # 2.2 Backdoor Defense
28
+
29
+ Defense during Training. With access to training, the defender is able to detect the poisoned data or make poisoning invalid during the training process. Regarding poisoned data as outliers, we can detect and filter them out using robust statistics in the input space [38, 18, 8, 9] or the feature space [17, 41, 28, 10]. Meanwhile, other studies focus on training strategies to make the poisoned data have little or no effect on the trained model [23, 40] through randomized smoothing [34, 46], majority vote [21], differential privacy [29], and input preprocessing [27, 4].
30
+
31
+ Defense after Training. For a downloaded model, we have lost control of its training. To repair the risk model, one direct way is to first reconstruct an approximation of the backdoor trigger via adversarial perturbation [43] or generative adversarial network (GAN) [5, 33, 50]. Once the trigger is reconstructed, it is feasible to prune neurons that are activated in the presence of the trigger, or fine-tune the model to unlearn the trigger [43]. As the trigger patterns in recently proposed attacks become more complicated such as the dynamics trigger [30] or natural phenomenon-based trigger [26], reconstruction becomes increasingly difficult. There are other studies on trigger-agnostic repairing via model pruning [24] or fine-tuning [7, 22] on the clean data. While they may suffer from severe accuracy degradation when only small clean data are available [7]. Unlike previous defensive pruning methods which are based on the rule-of-thumb, our proposed method is data-driven and does not require additional fine-tuning.
32
+
33
+ # 3 The Proposed Method
34
+
35
+ # 3.1 Preliminary
36
+
37
+ Deep Neural Network and Its Neurons. In this paper, we take a fully-connected network as an example (other convolutional networks are also applicable). Its layers are numbered from 0 (input) to $L$ (output) and each layer contains $n _ { 0 } , \cdots , n _ { L }$ neurons. The network has $n = n _ { 1 } + n _ { 2 } + \cdot \cdot \cdot + n _ { L }$ parameterized neurons in total3. We denote the weight parameters of the $k$ -th neuron in $l$ -th layer as w(l)k , the bias as b $b _ { k } ^ { ( l ) }$ , and its output is
38
+
39
+ $$
40
+ h _ { k } ^ { ( l ) } = \sigma ( \mathbf { w } _ { k } ^ { ( l ) \top } \mathbf { h } ^ { ( l - 1 ) } + b _ { k } ^ { ( l ) } ) ,
41
+ $$
42
+
43
+ where $\sigma ( \cdot )$ is the nonlinear function and $\mathbf { h } ^ { ( l - 1 ) }$ is the outputs of all neurons in the previous layer, $i . e . , { \bf h } ^ { ( l - 1 ) } = [ h _ { 1 } ^ { ( l - 1 ) } , \cdot \cdot \cdot , h _ { n _ { l } } ^ { ( l - 1 ) } ]$ . For simplicity, we denote all weights of the network as $\mathbf { w } =$ $\begin{array} { r l r } { } & { } & { [ { \bf w } _ { 1 } ^ { ( 1 ) } , \cdot \cdot \cdot , { \bf w } _ { n _ { 1 } } ^ { ( 1 ) } , \cdot \cdot \cdot , { \bf w } _ { 1 } ^ { ( L ) } , \cdot \cdot \cdot , { \bf w } _ { n _ { L } } ^ { ( L ) } ] } \end{array}$ , and all biases as $\mathbf { b } = [ b _ { 1 } ^ { ( 1 ) } , \cdots , b _ { n _ { l } } ^ { ( 1 ) } , \cdots , b _ { 1 } ^ { ( L ) } , \cdots , b _ { n _ { L } } ^ { ( L ) } ]$ For a given input $\mathbf { x }$ , the network makes the prediction $f ( \mathbf { x } ; \mathbf { w } , \mathbf { b } )$ .
44
+
45
+ DNN Training. We consider a $c$ -class classification problem. The parameters of weights and biases in DNN are learned on a training dataset $\mathcal { D } _ { \mathcal { T } } = \{ ( \bar { \bf x } _ { 1 } , \bar { y } _ { 1 } ) , \cdot \cdot \cdot , ( \bar { \bf x } _ { s } , \bar { y } _ { s } ) \}$ containing $s$ inputs, where each input is $\mathbf { x } _ { i } \in \mathbb { R } ^ { d } , i = 1 , \cdots , s .$ , and its ground-truth label is $y _ { i } \in \{ 1 , \cdots , c \}$ . The training procedure tries to find the optimal $( \mathbf { w } ^ { \star } , \mathbf { b } ^ { \star } )$ which minimize the training loss on the training data $\mathcal { D } _ { \mathcal { T } }$ ,
46
+
47
+ $$
48
+ \mathcal { L } _ { \mathcal { D } _ { T } } ( \mathbf { w } , \mathbf { b } ) = \underset { \mathbf { x } , y \sim \mathcal { D } _ { T } } { \mathbb { E } } \ell ( f ( \mathbf { x } ; \mathbf { w } , \mathbf { b } ) , y ) ,
49
+ $$
50
+
51
+ where $\ell ( \cdot , \cdot )$ is usually cross entropy loss.
52
+
53
+ Defense Setting. We adopt a typical defense setting that an untrustworthy model is downloaded from a third party (e.g., outsourcing training) without knowledge of the training data $\mathcal { D } _ { \mathcal { T } }$ . For defense, we are assumed to have a small amount of clean data $\mathcal { D } _ { \mathcal { V } }$ . The goals of model repairing are to remove the backdoor behavior while keeping the accuracy on clean samples.
54
+
55
+ # 3.2 Adversarial Neuron Perturbations
56
+
57
+ In previous studies, the adversary causes misclassification by perturbing inputs before feeding them to DNNs. For example, attaching triggers to inputs to make backdoored DNN output the target label or adversarially perturbing inputs to make normal/backdoored DNN output incorrectly.
58
+
59
+ Here, we try another direction to perturb DNN neurons to cause misclassification. Given the $k$ -th neuron in the $l$ -th layers, we can perturb its weight $\mathbf { w } _ { k } ^ { ( l ) }$ and bias $b _ { k } ^ { ( l ) }$ by multiplying a small number respectively. As a result, the perturbed weight is and the output of the perturbed neuron becomes $( 1 + \delta _ { k } ^ { ( l ) } ) \mathbf { w } _ { k } ^ { ( l ) }$ , the perturbed bias is $( 1 + \xi _ { k } ^ { ( l ) } ) b _ { k } ^ { ( l ) }$
60
+
61
+ $$
62
+ h _ { k } ^ { ( l ) } = \sigma \big ( ( 1 + \delta _ { k } ^ { ( l ) } ) \mathbf { w } _ { k } ^ { ( l ) \top } \mathbf { h } ^ { ( l - 1 ) } + ( 1 + \xi _ { k } ^ { ( l ) } ) b _ { k } ^ { ( l ) } \big ) ,
63
+ $$
64
+
65
+ where δ(l)k and $\xi _ { k } ^ { ( l ) }$ indicate the relative sizes of the perturbations to the weight and bias respectively. Similarly, all neurons can be perturbed like Eq. (3). We denote the relative weight perturbation size of all neurons as $\pmb { \delta } = [ \delta _ { 1 } ^ { ( 1 ) } , \cdots , \delta _ { n _ { 1 } } ^ { ( 1 ) } , \cdots , \delta _ { 1 } ^ { ( L ) } , \cdots , \delta _ { n _ { L } } ^ { ( L ) } ] ,$ , and the relative bias perturbation
66
+
67
+ ![](images/6ac1e440c839cc232f6a83883b01fc0b0c8fea8f16523aab7310035f8bb29735.jpg)
68
+
69
+ Figure 1: The performance of neuron-perturbed models with different perturbation budgets.
70
+
71
+ size as $\pmb { \xi } = [ \xi _ { 1 } ^ { ( 1 ) } , \cdots , \xi _ { n _ { 1 } } ^ { ( 1 ) } , \cdots , \xi _ { 1 } ^ { ( L ) } , \cdots , \xi _ { n _ { L } } ^ { ( L ) } ]$ for simplicity. For a clean input $\mathbf { x }$ , the output of the perturbed model is
72
+
73
+ $$
74
+ f ( \mathbf { x } ; ( 1 + \delta ) \odot \mathbf { w } , ( 1 + \pmb { \xi } ) \odot \mathbf { b } ) ,
75
+ $$
76
+
77
+ where neuron-wise multiplication $\odot$ multiplies the parameters by the perturbation sizes belonging to the same neuron as follows:
78
+
79
+ $$
80
+ ( 1 + \pmb \delta ) \odot \mathbf { w } = \big [ ( 1 + \delta _ { 1 } ^ { ( 1 ) } ) \mathbf { w } _ { 1 } ^ { ( 1 ) } , \cdots , ( 1 + \delta _ { n _ { 1 } } ^ { ( 1 ) } ) \mathbf { w } _ { n _ { 1 } } ^ { ( 1 ) } , \cdots , ( 1 + \delta _ { 1 } ^ { ( L ) } ) \mathbf { w } _ { 1 } ^ { ( L ) } , \cdots , ( 1 + \delta _ { n _ { L } } ^ { ( L ) } ) \mathbf { w } _ { n _ { L } } ^ { ( L ) } \big ] ,
81
+ $$
82
+
83
+ $$
84
+ ( 1 + \pmb { \xi } ) \odot \mathbf { b } = \big [ ( 1 + \xi _ { 1 } ^ { ( 1 ) } ) b _ { 1 } ^ { ( 1 ) } , \cdots , ( 1 + \xi _ { n _ { 1 } } ^ { ( 1 ) } ) b _ { n _ { 1 } } ^ { ( 1 ) } , \cdots , ( 1 + \xi _ { 1 } ^ { ( L ) } ) b _ { 1 } ^ { ( L ) } , \cdots , ( 1 + \xi _ { n _ { L } } ^ { ( L ) } ) b _ { n _ { L } } ^ { ( L ) } \big ] .
85
+ $$
86
+
87
+ Given a trained model, similar to adversarial perturbations [39, 13], we optimize the neuron perturbations $\delta$ and $\boldsymbol { \xi }$ to increase the classification loss on the clean data:
88
+
89
+ $$
90
+ \operatorname* { m a x } _ { \delta , \xi \in [ - \epsilon , \epsilon ] ^ { n } } \mathcal { L } _ { \mathcal { D } _ { \mathcal { V } } } \big ( ( 1 + \delta ) \odot \mathbf { w } , ( 1 + \xi ) \odot \mathbf { b } \big ) ,
91
+ $$
92
+
93
+ where $\epsilon$ is the perturbation budget, which limits the maximum perturbation size.
94
+
95
+ Specifically, we generate adversarial neuron perturbations for three ResNet-18 models [15] on CIFAR10 [19]: a benign model, a backdoored one with a predefined trigger (Badnets [14]), and a backdoored one with a dynamic trigger (Input-aware Backdoor Attack [30], IAB). We all set the target label in backdoor as class 0. We solve the maximization in Eq. (7) using project gradient descent (PGD) with random initialization similar to generating adversarial examples. The number of iterations is 300 and the step size is 0.001. Figure 1(a) shows adversarial neuron perturbations leads to misclassification, and the larger the perturbation budget $\epsilon$ is, the larger the error rate is. In addition, backdoored models always have larger error rates with the same perturbation budget compared to the benign one. To explore the misclassification in detail, we illustrate the proportion of different classes in predictions by three models in Figure 1(b). For benign model, adversarial neuron perturbations mislead the model to output the untargeted class (e.g., class 3). While for backdoored models, the majority of misclassified samples are predicted as the target label (e.g., class 0) whose proportion rate is much higher than the benign model. More results to support these findings can be found in Appendix B. Therefore, even without the trigger, we can still induce the backdoor behaviours via adversarial neuron perturbations. The reasons can be explained as follows: assuming the $k$ -th neuron in $l$ -th layers is backdoor-related, it is dormant on clean sample [24] (i.e., output is close to 0: $h _ { k } ^ { ( l ) } \approx 0 ,$ ). If w(l)>k hl−1 > 0 and b(l)k > 0, we can increase its output by enlarging the norm of the weights (i.e., $\delta _ { k } ^ { ( l ) } > 0 \}$ ), and further continue to increase it by adding a larger bias (i.e., $\xi _ { k } ^ { ( l ) } > 0 ) ^ { 4 }$ . With suitable perturbations, the backdoor-related neuron is activated even on clean samples. Thus, the neurons that are sensitive to adversarial neuron perturbation are strongly related to the injected backdoor.
96
+
97
+ # 3.3 The Proposed Adversarial Neuron Pruning (ANP)
98
+
99
+ As mentioned above, the sensitivity under adversarial neuron perturbations is strongly related to the injected backdoor. Inspired by this, we try to prune some sensitive neurons to defend backdoor attacks, named Adversarial Neuron Pruning method (ANP). We denote the pruning masks as $\mathbf { m } =$ $[ m _ { 1 } ^ { ( 1 ) } , \cdots , m _ { n _ { 1 } } ^ { ( 1 ) } , \cdots , m _ { 1 } ^ { ( L ) } , \cdots , m _ { n _ { L } } ^ { ( L ) } ] \in \bar { \{ 0 , 1 \} } ^ { n }$ . For the $k$ -th neuron in the $l$ -th layer, we set its weight w(k l ) = 0 if m( l )k = L , and keep it unchanged if $m _ { k } ^ { ( l ) } = 1$ . Similar to Ghorbani and Zou [11], we always keep the bias $b _ { k } ^ { ( l ) }$ to avoid extra harm to the accuracy on clean data5.
100
+
101
+ Continuous Relaxation and Optimization. Due to the binary masks, pruning is a discrete optimization problem that is difficult to solve within feasible time. To address this, we apply continuous relaxation to let $\mathbf { m } \in [ 0 , 1 ] ^ { n }$ and optimizes them using projected gradient descent (PGD). To restore the continuous masks to discreteness after optimization, we set all mask smaller than a threshold as 0 (prune neurons with small masks), and others as 1 (keep neurons with large masks). We expect the pruned model to not only behaves well on clean data but also keep stable under adversarial neuron perturbations. Therefore, we solve the following minimization problem,
102
+
103
+ $$
104
+ \operatorname* { m i n } _ { \mathbf { m } \in \left[ 0 , 1 \right] ^ { n } } \left[ \alpha \mathcal { L } _ { { D } _ { \mathcal { V } } } ( \mathbf { m } \odot \mathbf { w } , \mathbf { b } ) + \left( 1 - \alpha \right) \operatorname* { m a x } _ { \delta , \xi \in \left[ - \epsilon , \epsilon \right] ^ { n } } \mathcal { L } _ { { D } _ { \mathcal { V } } } ( ( \mathbf { m } + \delta ) \odot \mathbf { w } , ( 1 + \pm \xi ) \odot \mathbf { b } ) \right] ,
105
+ $$
106
+
107
+ where $\alpha \in [ 0 , 1 ]$ is a trade-off coefficient. If $\alpha$ is close to 1, the minimization object focuses more on accuracy of the pruned model on clean data, while if $\alpha$ is close to 0, it focuses more on robustness against backdoor attacks.
108
+
109
+ Implementation of ANP. As shown in Algorithm 1, we start from an unpruned network, that is, initializing all masks as 1 (Line 2). We randomly initialize perturbations (Line 5), and update them using one step (Line 6-7), then project them onto the feasible regime (Line 8-9). Following that, we update mask values based on the adversarial neuron perturbation (Line 10) and project mask value onto [0, 1] (Line 11). As convergence after iterations, we pruned neurons with small mask value and keep others unchanged (Line 13). Note that the proposed ANP is data-driven, different from previous pruning-based defenses which are based on the thumb-of-rule [24, 43]. Besides, ANP can work well on an extremely small amount of clean data due to the small number of masks.
110
+
111
+ # Algorithm 1 Adversarial Neuron Pruning (ANP)
112
+
113
+ 1: Input: Network $f ( \cdot ; { \bf w } , { \bf b } )$ , hyper-parameter $\alpha$ , learning rate $\eta$ , batch size $b$ , maximum perturba
114
+ tion size $\epsilon$
115
+ 2: Initialize all elements in $\mathbf { m }$ as 1
116
+ 3: repeat
117
+ 4: Read mini-batch $B = \{ ( \mathbf { x } _ { 1 } , y _ { 1 } ) , . . . , ( \mathbf { x } _ { b } , y _ { b } ) \}$ from training set
118
+ 5: $\delta _ { 0 } , \xi _ { 0 } \sim U ( - \epsilon , \epsilon )$ , where $U ( - \epsilon , \epsilon )$ is the uniform distribution
119
+ 6: $\begin{array} { r } { \pmb { \delta } \pmb { \delta } _ { 0 } + \epsilon \mathrm { s i g n } ( \nabla _ { \delta } \mathcal { L } ( ( \mathbf { m } + \pmb { \delta } _ { 0 } ) \odot \mathbf { w } , } \end{array}$ , $( { \bf 1 } + { \pmb \xi } _ { 0 } ) \odot { \bf b } ) )$
120
+ 7: $\pmb { \xi } \pmb { \xi } _ { 0 } + \epsilon \mathrm { s i g n } ( \nabla _ { \pmb { \xi } } \mathcal { L } ( ( \mathbf { m } + \pmb { \delta } _ { 0 } ) \odot \mathbf { w }$ , $\left( \mathbf { 1 } + \pmb { \xi } _ { 0 } \right) \odot \mathbf { b } ) _ { }$ )
121
+ 8: $\delta \gets \operatorname* { m a x } ( - \epsilon , \operatorname* { m i n } ( \delta , \epsilon ) )$
122
+ 9: $\pmb { \xi } \gets \operatorname* { m a x } ( - \epsilon , \operatorname* { m i n } ( \pmb { \xi } , \epsilon ) )$
123
+ 10: m ← m − η∇m[αL(m w, b) + (1 − α)L((m + δ) w, (1 + ξ) b)]
124
+ 11: $\mathbf { m } \gets \mathrm { m a x } ( 0 , \mathrm { m i n } ( \mathbf { m } , 1 ) )$
125
+ 12: until training converged
126
+ 13: $m _ { k } ^ { ( l ) } = \mathbb { I } ( m _ { k } ^ { ( \bar { l } ) } > t h r e s h o l d )$ , for all $k , l$
127
+ 14: Output: A robust network $f ( \cdot ; \mathbf { m } \odot \mathbf { w } , \mathbf { b } )$ against backdoor attacks
128
+
129
+ Adaptation to Batch Normalization. Batch Normalization (BatchNorm) [16] always normalizes its input and controls the mean and variance of the output by a pair of trainable parameters (scale $\gamma$ and shift $\beta$ ). If BatchNorm is inserted between matrix multiplication and the nonlinear activation, the perturbations to weight and bias may cancel each other out. For example, if we perturb the weight and bias of a neuron to the maximum by multiplying $( 1 + \epsilon )$ , the normalization offsets them and nothing changes after BatchNorm. To address this problem, we perturb the scale and shift parameters instead. We also make similar changes to the pruning masks.
130
+
131
+ Table 1: Performance (average over 5 random runs) of 4 defense methods against 6 backdoor attacks on $1 \%$ (500 images) of clean data on CIFAR-10 training set using ResNet-18. The AvgDrop indicates the average changes in ACC or ASR over 6 backdoor attacks compared to no defense results (Before).
132
+
133
+ <table><tr><td rowspan=1 colspan=1>Metric</td><td rowspan=1 colspan=1>Defense</td><td rowspan=1 colspan=1>Badnets Blend IAB-one IAB-all CLB SIG</td><td rowspan=1 colspan=1>AvgDrop</td></tr><tr><td rowspan=5 colspan=1>ACC</td><td rowspan=5 colspan=1>BeforeFT(lr = 0.01)FT(lr = 0.02)FPMCR(t = 0.3)ANP</td><td rowspan=1 colspan=1>93.73 94.82 93.89 94.10 93.78 93.64</td><td rowspan=1 colspan=1>一</td></tr><tr><td rowspan=1 colspan=1>90.48 92.12 88.68 89.06 91.26 91.19</td><td rowspan=1 colspan=1>↓3.53</td></tr><tr><td rowspan=1 colspan=1>87.23 88.98 84.85 83.77 88.25 88.63</td><td rowspan=1 colspan=1>↓7.04</td></tr><tr><td rowspan=2 colspan=1>92.18 92.40 91.57 92.28 91.91 91.6485.95 88.26 86.30 84.53 86.87 85.8890.20 93.44 92.62 92.79 92.67 93.40</td><td rowspan=1 colspan=1>↓2.00</td></tr><tr><td rowspan=1 colspan=1>7.70↓1.47</td></tr><tr><td rowspan=5 colspan=1>ASR</td><td rowspan=5 colspan=1>BeforeFT(lr = 0.01)FT(lr = 0.02)FPMCR(t = 0.3)ANP</td><td rowspan=1 colspan=1>99.97 100.0 98.49 92.88 99.94 94.2611.70 47.17 0.99 1.36 12.51 0.40</td><td rowspan=1 colspan=1>一↓85.24</td></tr><tr><td rowspan=2 colspan=1>2.95 10.20 1.70 1.83 1.17 0.395.34 65.39 20.73 32.36 3.40 0.32</td><td rowspan=1 colspan=1>↓94.55</td></tr><tr><td rowspan=1 colspan=1>↓76.33</td></tr><tr><td rowspan=1 colspan=1>5.70 13.57 30.23 35.17 12.77 0.52</td><td rowspan=1 colspan=1>←81.26</td></tr><tr><td rowspan=1 colspan=1>0.45 0.46 0.88 0.86 3.98 0.28</td><td rowspan=1 colspan=1>↓96.44</td></tr></table>
134
+
135
+ # 4 Experiments
136
+
137
+ In this section, we conduct comprehensive experiments to evaluate the effectiveness of ANP, including its benchmarking robustness, ablation studies and performance under limited computation resources.
138
+
139
+ # 4.1 Experimental Settings
140
+
141
+ Backdoor Attacks and Settings. We consider 5 state-of-the-art backdoor attacks: 1) BadNets [14], 2) Blend backdoor attack (Blend) [6], 3) Input-aware backdoor attack with all-to-one target label (IAB-one) or all-to-all target label (IAB-all) [30], 4) Clean-label backdoor (CLB) [42], and 5) Sinusoidal signal backdoor attack (SIG) [1]. For fair comparisons, we follow the default configuration in their original papers such as the trigger patterns, the trigger sizes and the target labels. We evaluate the performance of all attacks and defenses on CIFAR-10 [19] using ResNet-18 [15] as the base model. We use $9 0 \%$ training data to train the backdoored DNNs and use the all or part of the remaining $1 0 \%$ training data for defense. More details about implementation can be found in Appendix A.
142
+
143
+ Backdoor Defenses and Settings. We compare our proposed ANP with 3 existing model repairing methods: 1) standard fine-tuning (FT), 2) fine-pruning (FP) [24], and 3) mode connectivity repair (MCR) [48]. All defense methods are assumed to have access to the same $1 \%$ of clean training data (500 images). The results based on $1 0 \%$ (5000 images) and $0 . 1 \%$ (50 images) of clean training data can be found in Appendix. For ANP, we optimize all masks using Stochastic Gradient Descent (SGD) with the perturbation budget $\epsilon = 0 . 4$ and the trade-off coefficient $\alpha = 0 . 2$ . We set the batch size 128, the constant learning rate 0.2, and the momentum 0.9 for 2000 iterations in total. Typical data augmentation like random crop and horizontal flipping are applied. After optimization, neurons with mask value smaller than 0.2 are pruned.
144
+
145
+ Evaluation Metrics. We evaluate the performance of different defenses using two metrics: 1) the accuracy on clean data (ACC), and 2) and the attack success rate (ASR) that is the ratio of triggered samples that are misclassified as the target label. For better comparison between different strategies for the target label (e.g., all-to-one and all-to-all), we remove the samples whose ground-truth labels already belong to the target class in the all-to-one setting before calculating ASR. Therefore, an ideal defense always has close-to-zero ASR and high ACC.
146
+
147
+ # 4.2 Benchmarking the State-of-the-art Robustness
148
+
149
+ To verify the effectiveness of the proposed ANP, we compare its performance with other 3 existing model repairing methods using ACC and ASR in Table 1. All experiments are repeated over 5 runs with different random seeds, and we only report the average performance without the standard deviation due to the space constraint. More detailed results including the standard deviation can be found in Appendix C.
150
+
151
+ Table 2: The average training time of defense method against 6 backdoor attacks on $1 \%$ (500 images) of clean data on CIFAR-10 training set using ResNet-18.
152
+
153
+ <table><tr><td>Defense</td><td>FT</td><td>FP</td><td>MCR</td><td>ANP</td></tr><tr><td>Time (s)</td><td>93.80</td><td>1427.1</td><td>286.1</td><td>241.5</td></tr></table>
154
+
155
+ The experimental results show that the proposed ANP remarkably provides almost the highest robustness against several state-of-the-art backdoor attacks. In particular, in 5 of total 6 attacks, our proposed ANP successfully reduces the ASR to lower than $1 \%$ while only has a slight drop $( \sim 1 . 4 7 \%$ on average) in ACC. Note that we only use $1 \%$ of clean data from CIFAR-10 training set, which is extremely small. We find the standard fine-tuning (FT) with a larger learning rate ${ l r = 0 . 0 2 } )$ also provides strong robustness similar to ANP. However, it has an obvious drop in ACC since a large learning rate may destroy the features learned before and the new ones learned on limited data are poor in generalization. The poor accuracy hinders its usage in practical scenarios. In contrast, ANP has similar robustness against backdoor attacks while maintains ACC at a relatively high level at the same time. Similar to our method, Fine-pruning (FP) [24] also prunes some neurons and fine-tunes the pruned model on clean data. Specifically, It only prunes neurons in the last convolutional layer using a rule-of-thumb6, and provides limited robustness against backdoor attacks. Differently, the proposed ANP is data-driven (i.e., optimizing pruning masks based on data) and prunes neurons globally (i.e., pruning neurons in all layers), leading to higher ACC and lower ASR than FP. MCR suggests mitigating backdoor by using a curve model lying on a path connection between two backdoored models in the loss landscapes. However, with limited data, it fails in providing high robustness against complex triggers (e.g. a random trigger sampled from Gaussian in blend backdoor attack or the dynamic trigger in input-aware attack). By contrast, ANP always reduces ASR significantly no matter what the trigger looks like. Note that ANP only prunes neurons and never changes any parameters of backdoored DNNs, while other methods all fine-tune parameters. Under this situation, ANP still provides the almost best robustness against these state-of-the-art attacks, which indicates that pure pruning (without fine-tuning) is still a promising defense against backdoor attacks.
156
+
157
+ We also compare the training time of ANP and other baselines in Table 2, which indicates the efficiency of the proposed ANP. In particular, we apply 2000 iterations for FT, FP, and ANP, and 200 epochs (i.e., 800 iterations) for MCR following the open-sourced code7. Note that ANP is not as slow as the vanilla adversarial training (AT) since ANP only requires one extra backpropagation while PGD inside AT usually needs 10 extra backpropagations (PGD-10) in each update of model parameters. Besides, although ANP takes $2 . 5 \times$ time compared to FT, it improves accuracy (e.g., $8 8 . 9 8 \% 9 3 . 4 4 \%$ for Blend) and reduce vulnerability $( e . g . , \bar { 1 0 . 2 0 \% } \to 0 . 4 6 \%$ for Blend) significantly, making the overhead caused by ANP acceptable.
158
+
159
+ # 4.3 Ablation Studies
160
+
161
+ Effect of Adversarial Neuron Perturbation. Recalling Section 3.2, we apply adversarial neuron perturbations to induce the injected backdoor and then defend against backdoor attacks. Here, we evaluate the effect of the adversarial neuron perturbation in our defense strategy. In the following experiments, we defend against Badnets attack by default, unless otherwise specified. First, we optimize masks with perturbations $\alpha = 0 . 2$ and $\epsilon = 0 . 4$ , i.e., ANP) and without perturbations $\alpha = 1 . 0$ , i.e., the vanilla pruning method). Figure 2(a) shows the ACC and ASR on the test set during optimization. We find the optimization under adversarial neuron perturbations helps the backdoored model suppress ASR significantly while the vanilla one always has high ASR throughout the training process. Next, we illustrate the mask distribution after optimization. Figure 2(b) illustrates a certain fraction of masks becomes zero, which means that adversarial neuron perturbations indeed find some sensitive neurons and helps the model to remove them. In contrast, there is no mask close to 0 for the vanilla pruning method in Figure 2(c). Finally, we prune different fractions of neurons according to their mask in Figure 2(d). For both methods, ASR becomes low after pruning more than $5 \%$ of neurons8. However, ACC also starts to degrade significantly for the vanilla pruning method with more than $5 \%$ of neurons pruned. Since backdoored-related neurons are still mixed with other neurons (e.g., discriminant neurons), the vanilla pruning method prunes some discriminant neurons incorrectly. Meanwhile, ANP always keeps ACC at a relatively high level. In conclusion, the adversarial neuron perturbation is the key to distinguish the backdoor-related neurons from the other neurons, which thereby successfully obtains high ACC as well as low ASR.
162
+
163
+ ![](images/cdbe97c81ddf9f981dadc8bb71c5c721160bf778af2dfe13da667aa21c43f690.jpg)
164
+ Figure 2: Comparison between optimization with and without adversarial neuron perturbations.
165
+
166
+ Table 3: Results with small budget $\epsilon = 0 . 1$ against Blend attack on 500 clean images. “Neurons↓” indicates the number of neurons pruned by ANP.
167
+
168
+ <table><tr><td>Steps</td><td>1</td><td>2</td><td>5</td><td>10</td></tr><tr><td>Time (s)</td><td>239.9</td><td>359.2</td><td>551.8</td><td>943.9</td></tr><tr><td>Neurons↓</td><td>159</td><td>188</td><td>235</td><td>259</td></tr><tr><td>ASR (%)</td><td>65.19</td><td>13.40</td><td>1.06</td><td>0.90</td></tr><tr><td>ACC (%)</td><td>93.62</td><td>93.07</td><td>92.95</td><td>92.72</td></tr></table>
169
+
170
+ Table 4: Results with large budget $\epsilon = 0 . 4$ against Blend attack on 500 clean images. “Neurons↓” indicates the number of neurons pruned by ANP.
171
+
172
+ <table><tr><td>Steps</td><td>1</td><td>2</td><td>5</td><td>10</td></tr><tr><td>Time (s)</td><td>241.5</td><td>357.2</td><td>557.1</td><td>950.1</td></tr><tr><td>Neurons↓</td><td>233</td><td>239</td><td>281</td><td>296</td></tr><tr><td>ASR (%)</td><td>0.46</td><td>1.30</td><td>5.30</td><td>31.34</td></tr><tr><td>ACC (%)</td><td>93.44</td><td>94.07</td><td>93.57</td><td>94.28</td></tr></table>
173
+
174
+ In addition, we explore the effects of number of iterations in crafting adversarial neuron perturbations. We conduct experiments with varying numbers of steps (1/2/5/10) in ANP with a small perturbation budget $\mathit { \check { \Psi } } _ { \epsilon } = 0 . 1 $ ) and a large perturbation budget $\mathit { \check { \Psi } } \epsilon = 0 . 4$ ) respectively. The other settings are the same as Section 4.1. The experimental results are shown in Tables 3-4. Under a small perturbation budget, with more steps for ANP, the ASR decreases with a slight drop in ACC. This is because ANP with a single step and small size is too weak to distinguish benign neurons and backdoor-related neurons, while more steps can help ANP find more backdoor-related neurons. However, under a large perturbation budget, ANP with more steps has worse robustness. This is because, with a large perturbation budget, more neurons become sensitive. As a result, ANP with more steps finds too many “suspicious” neurons, and it is unable to identify backdoor-related neurons from them. In conclusion, we can strengthen the power of ANP to find backdoor-related neurons using a larger perturbation budget or more steps. Among them, single-step ANP with a slightly larger budget is more practical due to its time efficiency, and we adopt this by default.
175
+
176
+ Results with Varying Hyperparameters. As mentioned in Section 3.3, the hyper-parameter $\alpha$ in ANP controls the trade-off between the accuracy on clean data and the robustness against backdoor attacks. To test the performance with different $\alpha$ , we optimize masks for a Badnets ResNet-18 based on $1 \%$ of clean data using different $\alpha \in [ 0 , 1 ]$ with a fixed budget $\epsilon = 0 . 4$ . In pruning, we always prune neurons by the threshold 0.2. As shown in the left plot of Figure 4, ANP is able to achieve a high robustness $\mathrm { \Delta A S R } < 4 \%$ ) when $\alpha \leq 0 . 6$ . Meanwhile, ANP maintains a high natural accuracy $( \mathrm { A C C } \geq 9 0 \% )$ as long as $\alpha \ge 0 . 1$ . As a result, ANP behaves well with high ACC and low ASR in a range of $\alpha \in [ 0 . 1 , 0 . 6 ]$ .
177
+
178
+ Similarly, we also test the performance with different perturbation budgets $\epsilon$ . The experiment settings are almost the same except a fixed trade-off coefficient $\alpha = 0 . 2$ and varying budgets $\epsilon \in [ 0 , 1 ]$ . For example, we can provide obvious robustness (ASR becomes $7 . 4 5 \%$ ) with a small perturbation budget $\epsilon = 0 . 2$ ) as shown in the right plot of Figure 4. However, we find the accuracy on clean data degrades with a large perturbation budget. This is because too large perturbation budget brings much difficulty to converge well and ANP only finds a poor solution, which fails in identifying these discriminant and robust neurons and prunes part of them. As a result, ACC decreases significantly. In conclusion, the proposed ANP is stable in a large range of the trade-off coefficient $\alpha \in [ 0 . 1 , 0 . 6 ]$ and the perturbation budget $\epsilon \in [ 0 . 2 , 0 . 7 ]$ , demonstrating that ANP is not sensitive to hyper-parameters.
179
+
180
+ ![](images/8bf3858ee9e476f3adbe69766b659fe02bcb8becb61c2541e03275132706fc2f.jpg)
181
+ Figure 3: Performance $\pm$ std over 5 random runs) of pruned models using different architectures by different pruning fractions or different thresholds.
182
+
183
+ From the discussion above, we find that the hyperparameters are insensitive as shown in Figure 4 and ANP performs well across a wide range of hyperparameters, e.g., trade-off coefficient $\alpha \in [ 0 . 1 , 0 . 6 ]$ against Badnets attack. In addition, with varying hyperparameters, the performance trends are very consistent across different backdoor attacks as shown in Figure $\mathrm { X }$ in Appendix C.1. As a result, even though the attack (e.g., Blend) is unknown, the defender could tune $\alpha$ against a known attack (e.g., Badnets) and find the 0.2 is a good choice. ANP with $\alpha = 0 . 2$ also achieves satisfactory performance against Blend attack. In conclusion, the selection of hyperparameters in ANP is not difficult.
184
+
185
+ Pruning by Fraction or by Threshold. Different from previous pruning methods that use a fixed pruning fraction, the proposed ANP prunes neurons by a threshold when generalized across different model architectures. To verify this, we train different Badnets models using ResNet-18 [15], ResNet50 [15], and VGG-19 [37] with the same settings as Section 4.1. We also train a model with Badnets MobileNet-V2 with 300 epochs . We optimize the pruning masks for these models with $\epsilon = 0 . 4 , \alpha = 0 . 2$ for ResNet-18, ResNet-50, and VGG-19. For MobileNet-V2, we found the perturbation budget $\epsilon = 0 . 4$ is too large, leading to a failure in convergence. So we apply a smaller budget $\epsilon = 0 . 2$ and the same trade-off coefficient $\alpha = 0 . 2$ . We show the ACC and ASR after pruning by varying pruning fractions in Figure 3(a) and 3(b), which indicates that the suitable fraction varies across model architectures. For example, ResNet-18 only has low ASR after pruning $5 \%$ of neurons, while MobileNet-V2 has a large accuracy drop on clean samples with more than $5 \%$ neurons pruned. Figure 3(c) and Figure 3(d) show ACC and ASR after pruning by different thresholds respectively. When pruning by the threshold, we find there is a large overlap in [0.2, 0.5] (the gray zone) in which all models have high ACC and low ASR simultaneously. That is why we adopt the strategy of pruning by the threshold in ANP. Note that, even for low-capacity models as MobileNet-V2, it is still possible to remove the injected backdoor by neuron pruning (without the fine-tuning).
186
+
187
+ Pruning on Different Components. We also compare the performance when applying ANP to different components inside DNNs. We prune a backdoored 4-layer CNN (2 conv layers $^ { + 1 }$ fullyconnected layer $^ +$ output layer) on MNIST, and find it more efficient to prune neurons in some layers. In particular, we achieve $0 . 4 3 \%$ of ASR $( 9 9 . 0 4 \%$ of ACC) when two neurons in the 2nd layer are pruned, while we only achieve $4 . 4 2 \%$ of ASR $( 9 2 . 4 8 \%$ of ACC) even after pruning 150 neurons in the fully-connected layer. The experimental settings and more results can be found in Appendix C.2. This indicates that the structure of components matter in pruning-based defense. We leave this in our future work.
188
+
189
+ # 4.4 Performance under Limited Computation Resource
190
+
191
+ In practical scenarios, the defender usually has limited clean data and computation resources, bringing more difficulty to repair backdoored models. While Section 4.2 has discussed the effectiveness of the proposed ANP on the extremely small amount of data, this part focuses on the performance with limited computation resources in defense.
192
+
193
+ In particular, we optimize all masks for a Badnets ResNet-18 with varying number of iterations (20, 100, 400, and 2000) on $1 \%$ of clean data (500 images) and prune the model from neurons with the small mask to neurons with the large mask. Figure 5 shows the ACC and ASR with varying pruning fractions based on different numbers of iterations. We find that some backdoor-related neurons have already been distinguished just after 20 iterations. For example, after removing $4 \%$ of neurons with the smallest masks, the pruned model has $6 . 2 8 \%$ of ASR and $8 6 . 6 5 \%$ of ACC. As the pruning fraction increases, ASR falls significantly first and raises again after $1 0 \%$ of neurons are pruned. This is because ANP has not yet separated them completely due to extremely limited computation (only 20 iterations). With more than 100 iterations, this phenomenon disappears. And ANP based on 100 iterations already has comparable performance to ANP on 2000 iterations, especially when we have not pruned too many neurons $( < 8 \%$ ).
194
+
195
+ ![](images/93472c8a66980e364dd261efb96c5ac684e0055908acf754d698dfc147542165.jpg)
196
+ Figure 4: Performance ( $\pm$ std over 5 random runs) of the pruned model by a threshold 0.2 with different hyper-parameters (Left: trade-off coefficient $\alpha$ ; Right: perturbation budget $\dot { \epsilon }$ ).
197
+
198
+ ![](images/b26378fa2b0246eadadac2f1c4a88e337567f18989a4f533b8eb7e774663c072.jpg)
199
+ Figure 5: Performance ( $\pm$ std over 5 random runs) of the proposed ANP with varying pruning fractions based on different numbers of iterations.
200
+
201
+ We also find that ANP with 2000 iterations should prune more $( + 1 \% )$ neurons to degrade ASR than ones with fewer iterations. We conjecture this is because there also exist some sensitive neurons that are unrelated to the injected backdoor9, which are assigned with small masks at the late optimization stage. Besides, for ACC, we can see that more iterations maintain a higher ACC than fewer iterations, especially when more neurons are pruned, as the left neurons are almost the discriminant and robust ones. In conclusion, even with extremely small number of iterations (e.g., 20 iterations), ANP is able to distinguish the backdoor-related neurons from other neurons and obtains satisfactory robustness against backdoor attacks.
202
+
203
+ # 5 Conclusion
204
+
205
+ In this paper, we identified a sensitivity of backdoored DNNs to adversarial neuron perturbations, which induces them to present backdoor behaviours even without the presence of the trigger patterns. Based on these findings, we proposed Adversarial Neuron Pruning (ANP) to prune the sensitive neurons under adversarial neuron perturbations. Comprehensive experiments show that ANP consistently removes the injected backdoor and provides the highest robustness against several state-of-the-art backdoor attacks even with a limited amount of clean data and computation resources. Finally, our work also reminds researchers that pruning (without fine-tuning) is still a promising defense against backdoor attacks.
206
+
207
+ # Broader Impact
208
+
209
+ The backdoor attack has become a threat to outsourcing training and open-sourcing models. We propose ANP to improve the robustness against these backdoor attacks, which may help to build a more secure model even trained in an untrustworthy third-party platform. Further, we do not want this paper to bring overoptimism about AI safety to the society. Since the backdoor attack is only a part of potential risks ( e.g., adversarial attacks, privacy leakage, and model extraction), there is still a long way towards secure AI and trustworthy AI.
210
+
211
+ # Acknowledgments
212
+
213
+ Yisen Wang is partially supported by the National Natural Science Foundation of China under Grant 62006153, and Project 2020BD006 supported by PKU-Baidu Fund.
214
+
215
+ # References
216
+
217
+ [1] Mauro Barni, Kassem Kallas, and Benedetta Tondi. A new backdoor attack in cnns by training set corruption without label poisoning. In ICIP, 2019.
218
+ [2] Battista Biggio, Blaine Nelson, and Pavel Laskov. Support vector machines under adversarial label noise. In ACML, 2011.
219
+ [3] Battista Biggio, Igino Corona, Davide Maiorca, Blaine Nelson, Nedim Šrndic, Pavel Laskov, ´ Giorgio Giacinto, and Fabio Roli. Evasion attacks against machine learning at test time. In ECML/PKDD, 2013.
220
+ [4] Eitan Borgnia, Valeriia Cherepanova, Liam Fowl, Amin Ghiasi, Jonas Geiping, Micah Goldblum, Tom Goldstein, and Arjun Gupta. Strong data augmentation sanitizes poisoning and backdoor attacks without an accuracy tradeoff. In ICASSP, 2021.
221
+ [5] Huili Chen, Cheng Fu, Jishen Zhao, and Farinaz Koushanfar. Deepinspect: A black-box trojan detection and mitigation framework for deep neural networks. In IJCAI, 2019.
222
+ [6] Xinyun Chen, Chang Liu, Bo Li, Kimberly Lu, and Dawn Song. Targeted backdoor attacks on deep learning systems using data poisoning. arXiv preprint arXiv:1712.05526, 2017.
223
+ [7] Xinyun Chen, Wenxiao Wang, Chris Bender, Yiming Ding, Ruoxi Jia, Bo Li, and Dawn Song. Refit: a unified watermark removal framework for deep learning systems with limited data. arXiv preprint arXiv:1911.07205, 2019.
224
+ [8] Ilias Diakonikolas, Gautam Kamath, Daniel Kane, Jerry Li, Jacob Steinhardt, and Alistair Stewart. Sever: A robust meta-algorithm for stochastic optimization. In ICML, 2019.
225
+ [9] Chao Gao, Yuan Yao, and Weizhi Zhu. Generative adversarial nets for robust scatter estimation: A proper scoring rule perspective. Journal of Machine Learning Research, 21(160):1–48, 2020.
226
+ [10] Yansong Gao, Change Xu, Derui Wang, Shiping Chen, Damith C Ranasinghe, and Surya Nepal. Strip: A defence against trojan attacks on deep neural networks. In ACSAC, 2019.
227
+ [11] Amirata Ghorbani and James Zou. Neuron shapley: Discovering the responsible neurons. In NeurIPS, 2021.
228
+ [12] Micah Goldblum, Dimitris Tsipras, Chulin Xie, Xinyun Chen, Avi Schwarzschild, Dawn Song, Aleksander Madry, Bo Li, and Tom Goldstein. Data security for machine learning: Data poisoning, backdoor attacks, and defenses. arXiv preprint arXiv:2012.10544, 2020.
229
+ [13] Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In ICLR, 2015.
230
+ [14] Tianyu Gu, Kang Liu, Brendan Dolan-Gavitt, and Siddharth Garg. Badnets: Evaluating backdooring attacks on deep neural networks. IEEE Access, 7:47230–47244, 2019.
231
+ [15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
232
+ [16] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015.
233
+ [17] Pang Wei Koh and Percy Liang. Understanding black-box predictions via influence functions. In ICML, 2017.
234
+ [18] Pang Wei Koh, Jacob Steinhardt, and Percy Liang. Stronger data poisoning attacks break data sanitization defenses. arXiv preprint arXiv:1811.00741, 2018.
235
+ [19] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical Report, University of Toronto, 2009.
236
+ [20] Alexander Levine and Soheil Feizi. Deep partition aggregation: Provable defense against general poisoning attacks. arXiv preprint arXiv:2006.14768, 2020.
237
+ [21] Alexander Levine and Soheil Feizi. Deep partition aggregation: Provable defense against general poisoning attacks. In ICLR, 2021.
238
+ [22] Yige Li, Nodens Koren, Lingjuan Lyu, Xixiang Lyu, Bo Li, and Xingjun Ma. Neural attention distillation: Erasing backdoor triggers from deep neural networks. In ICLR, 2021.
239
+ [23] Yige Li, Xixiang Lyu, Nodens Koren, Lingjuan Lyu, Bo Li, and Xingjun Ma. Anti-backdoor learning: Training clean models on poisoned data. In NeurIPS, 2021.
240
+ [24] Kang Liu, Brendan Dolan-Gavitt, and Siddharth Garg. Fine-pruning: Defending against backdooring attacks on deep neural networks. In RAID, 2018.
241
+ [25] Yingqi Liu, Shiqing Ma, Yousra Aafer, Wen-Chuan Lee, Juan Zhai, Weihang Wang, and Xiangyu Zhang. Trojaning attack on neural networks. In NDSS, 2018.
242
+ [26] Yunfei Liu, Xingjun Ma, James Bailey, and Feng Lu. Reflection backdoor: A natural backdoor attack on deep neural networks. In ECCV, 2020.
243
+ [27] Yuntao Liu, Yang Xie, and Ankur Srivastava. Neural trojans. In ICCD, 2017.
244
+ [28] Shiqing Ma and Yingqi Liu. Nic: Detecting adversarial samples with neural network invariant checking. In NDSS, 2019.
245
+ [29] Yuzhe Ma, Xiaojin Zhu Zhu, and Justin Hsu. Data poisoning against differentially-private learners: Attacks and defenses. In IJCAI, 2019.
246
+ [30] Anh Nguyen and Anh Tran. Input-aware dynamic backdoor attack. In NeurIPS, 2020.
247
+ [31] Anh Nguyen and Anh Tran. Wanet–imperceptible warping-based backdoor attack. In ICLR, 2021.
248
+ [32] Ren Pang, Hua Shen, Xinyang Zhang, Shouling Ji, Yevgeniy Vorobeychik, Xiapu Luo, Alex Liu, and Ting Wang. A tale of evil twins: Adversarial inputs versus poisoned models. In CCS, 2020.
249
+ [33] Ximing Qiao, Yukun Yang, and Hai Li. Defending neural backdoors via generative distribution modeling. In NeurIPS, 2019.
250
+ [34] Elan Rosenfeld, Ezra Winston, Pradeep Ravikumar, and Zico Kolter. Certified robustness to label-flipping attacks via randomized smoothing. In ICML, 2020.
251
+ [35] Ali Shafahi, W Ronny Huang, Mahyar Najibi, Octavian Suciu, Christoph Studer, Tudor Dumitras, and Tom Goldstein. Poison frogs! targeted clean-label poisoning attacks on neural networks. In NeurIPS, 2018.
252
+ [36] David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016.
253
+ [37] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015.
254
+ [38] Jacob Steinhardt, Pang Wei Koh, and Percy Liang. Certified defenses for data poisoning attacks. In NeurIPS, 2017.
255
+ [39] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In ICLR, 2014.
256
+ [40] Lue Tao, Lei Feng, Jinfeng Yi, Sheng-Jun Huang, and Songcan Chen. Better safe than sorry: Preventing delusive adversaries with adversarial training. In NeurIPS, 2021.
257
+ [41] Brandon Tran, Jerry Li, and Aleksander Madry. Spectral signatures in backdoor attacks. In NeurIPS, 2018.
258
+ [42] Alexander Turner, Dimitris Tsipras, and Aleksander Madry. Label-consistent backdoor attacks. arXiv preprint arXiv:1912.02771, 2019.
259
+ [43] Bolun Wang, Yuanshun Yao, Shawn Shan, Huiying Li, Bimal Viswanath, Haitao Zheng, and Ben Y Zhao. Neural cleanse: Identifying and mitigating backdoor attacks in neural networks. In S&P, 2019.
260
+ [44] Ren Wang, Gaoyuan Zhang, Sijia Liu, Pin-Yu Chen, Jinjun Xiong, and Meng Wang. Practical detection of trojan neural networks: Data-limited and data-free cases. In ECCV, 2020.
261
+ [45] Yisen Wang, Xuejiao Deng, Songbai Pu, and Zhiheng Huang. Residual convolutional ctc networks for automatic speech recognition. arXiv preprint arXiv:1702.07793, 2017.
262
+ [46] Maurice Weber, Xiaojun Xu, Bojan Karlas, Ce Zhang, and Bo Li. Rab: Provable robustness against backdoor attacks. arXiv preprint arXiv:2003.08904, 2020.
263
+ [47] Dongxian Wu, Shu-Tao Xia, and Yisen Wang. Adversarial weight perturbation helps robust generalization. In NeurIPS, 2020.
264
+ [48] Pu Zhao, Pin-Yu Chen, Payel Das, Karthikeyan Natesan Ramamurthy, and Xue Lin. Bridging mode connectivity in loss landscapes and adversarial robustness. In ICLR, 2019.
265
+ [49] Haoti Zhong, Cong Liao, Anna Cinzia Squicciarini, Sencun Zhu, and David Miller. Backdoor embedding in convolutional neural network models via invisible perturbation. In CODASPY, 2020.
266
+ [50] Liuwan Zhu, Rui Ning, Cong Wang, Chunsheng Xin, and Hongyi Wu. Gangsweep: Sweep out neural backdoors by gan. In MM, 2020.
parse/train/4cEapqXfP30/4cEapqXfP30_content_list.json ADDED
@@ -0,0 +1,1121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Adversarial Neuron Pruning Purifies Backdoored Deep Models ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 274,
8
+ 122,
9
+ 722,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Dongxian $\\mathbf { W _ { u } 1 * }$ Yisen Wang2,3† 1Dept. of Computer Science and Technology, Tsinghua University, China 2Key Lab. of Machine Perception, School of Artificial Intelligence, Peking Univesity, China 3Institute for Artificial Intelligence, Peking Univesity, China ",
17
+ "bbox": [
18
+ 196,
19
+ 224,
20
+ 802,
21
+ 285
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 462,
31
+ 319,
32
+ 535,
33
+ 337
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "As deep neural networks (DNNs) are growing larger, their requirements for computational resources become huge, which makes outsourcing training more popular. Training in a third-party platform, however, may introduce potential risks that a malicious trainer will return backdoored DNNs, which behave normally on clean samples but output targeted misclassifications whenever a trigger appears at the test time. Without any knowledge of the trigger, it is difficult to distinguish or recover benign DNNs from backdoored ones. In this paper, we first identify an unexpected sensitivity of backdoored DNNs, that is, they are much easier to collapse and tend to predict the target label on clean samples when their neurons are adversarially perturbed. Based on these observations, we propose a novel model repairing method, termed Adversarial Neuron Pruning (ANP), which prunes some sensitive neurons to purify the injected backdoor. Experiments show, even with only an extremely small amount of clean data (e.g., $1 \\%$ ), ANP effectively removes the injected backdoor without causing obvious performance degradation. Our code is available at https://github.com/csdongxian/ANP_backdoor. ",
40
+ "bbox": [
41
+ 233,
42
+ 353,
43
+ 766,
44
+ 560
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 174,
54
+ 587,
55
+ 310,
56
+ 604
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "In recent years, deep neural networks (DNNs) achieve satisfactory performance in many tasks, including computer vision [15], speech recognition [45], and gaming agents [36]. However, their success heavily relies on a large amount of computation and data, forcing researchers to outsource the training in “Machine Learning as a Service” (MLaaS) platforms or download pretrained models from the Internet, which brings potential risks of training-time attacks [17, 35, 2]. Among them, backdoor attack [14, 6, 42] is remarkably dangerous because it stealthily builds a strong relationship between a trigger pattern and a target label inside DNNs by poisoning a small proportion of the training data. As a result, the returned model always behaves normally on the clean data but is controlled to make target misclassification by presenting the trigger pattern such as a specific single-pixel [41] or a black-white checkerboard [14] at the test time. ",
63
+ "bbox": [
64
+ 174,
65
+ 619,
66
+ 825,
67
+ 757
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Since DNNs are deployed in many real-world and safety-critical applications, it is urgent to defend against backdoor attacks. While there are many defense methods during training [38, 41, 8, 29, 20], this work focuses on a more realistic scenario in outsourcing training that repairs models after training. In particular, the defenders try to remove the injected backdoor without access to the model training process. Without knowledge of the trigger pattern, previous methods only achieve limited robustness [7, 24, 22]. Some works try to reconstruct the trigger [43, 5, 33, 50, 44], however, the trigger pattern in brand-new attacks becomes natural [26], invisible [49], and dynamic [30], leading to the reconstruction infeasible. Different from them, in this paper, we turn to explore whether we can successfully remove the injected backdoor even without knowing the trigger pattern. ",
74
+ "bbox": [
75
+ 174,
76
+ 763,
77
+ 825,
78
+ 848
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "",
85
+ "bbox": [
86
+ 174,
87
+ 92,
88
+ 823,
89
+ 132
90
+ ],
91
+ "page_idx": 1
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Usually, the adversary perturbs inputs to cause misclassification, e.g., attaching triggers for backdoored models or adding adversarial perturbations. Parallel to this, we are also able to cause misclassification by perturbing neurons of DNNs [47]. For any neuron inside DNN, we could perturb its weight and bias by multiplying a relatively small number, to change its output. Similar to adversarial perturbations, we can optimize the neuron perturbations to increase its classification loss. Surprisingly, we find that, within the same perturbation budget, backdoored DNNs are much easier to collapse and prone to output the target label than normal DNNs even without the presence of the trigger. That is, the neurons that are sensitive to adversarial neuron perturbation are strongly related to the injected backdoor. Motivated by this, we propose a novel model repairing method, named Adversarial Neuron Pruning (ANP), which prunes most sensitive neurons under the adversarial neuron perturbation. Since the number of neurons is much smaller than weight parameters, e.g., only 4810 neurons for ResNet-18 while 11M parameters for the same model, our method can work well only based on $1 \\%$ of clean data. Our main contributions are summarized as follows: ",
96
+ "bbox": [
97
+ 173,
98
+ 140,
99
+ 825,
100
+ 319
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "• We find that through adversarially perturbing neurons, backdoored DNNs can present backdoor behaviors even without the presence of the trigger patterns and are much easier to output misclassification than normal DNNs. \n• To defend backdoor attacks, we propose a simple yet effective model repairing method, Adversarial Neuron Pruning (ANP), which prunes the most sensitive neurons under adversarial neuron perturbations without fine-tuning. \n• Extensive experiments demonstrate that ANP consistently provides state-of-the-art defense performance against various backdoor attacks, even using an extremely small amount of clean data. ",
107
+ "bbox": [
108
+ 217,
109
+ 330,
110
+ 825,
111
+ 467
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "2 Related Work ",
118
+ "text_level": 1,
119
+ "bbox": [
120
+ 174,
121
+ 486,
122
+ 321,
123
+ 503
124
+ ],
125
+ "page_idx": 1
126
+ },
127
+ {
128
+ "type": "text",
129
+ "text": "2.1 Backdoor Attacks ",
130
+ "text_level": 1,
131
+ "bbox": [
132
+ 174,
133
+ 518,
134
+ 338,
135
+ 532
136
+ ],
137
+ "page_idx": 1
138
+ },
139
+ {
140
+ "type": "text",
141
+ "text": "The backdoor attack is a type of attacks occurring during DNN training. The adversary usually poisons a fraction of training data via attaching a predefined trigger and relabeling them as target labels (dirty-label setting) [14, 6]. All poisoned samples can be relabeled as a single target class (all-to-one), or poisoned samples from different source classes are relabeled as different target classes (all-to-all) [30]. After training, the model can be controlled to predict the target label in the presence of the trigger at the test time. Different from evasion attacks (e.g., adversarial attacks) [3, 39, 13], backdoor attacks aim to embed a input- and model-agnostic trigger into the model, which is a severe threat to the applications of deep learning [12]. Since incorrectly-labeled samples are easy to be detected, some attacks attach the trigger to samples from the target class (clean-label setting) [35, 42, 1]. Apart from simple forms like a single-pixel [41] or a black-and-white checkerboard [14], the trigger patterns can be more complex such as a sinusoidal strip [1] and a dynamic pattern [30]. These triggers in recent attacks become more natural [26] and human-imperceptible [49, 31], making them stealthy and hard to be detected by human inspection. Besides, powerful adversaries who have access to the model can optimize the trigger pattern [25], and even co-optimize the trigger pattern and the model together to enhance the power of backdoor attacks [32]. ",
142
+ "bbox": [
143
+ 173,
144
+ 544,
145
+ 825,
146
+ 751
147
+ ],
148
+ "page_idx": 1
149
+ },
150
+ {
151
+ "type": "text",
152
+ "text": "2.2 Backdoor Defense ",
153
+ "text_level": 1,
154
+ "bbox": [
155
+ 174,
156
+ 768,
157
+ 339,
158
+ 782
159
+ ],
160
+ "page_idx": 1
161
+ },
162
+ {
163
+ "type": "text",
164
+ "text": "Defense during Training. With access to training, the defender is able to detect the poisoned data or make poisoning invalid during the training process. Regarding poisoned data as outliers, we can detect and filter them out using robust statistics in the input space [38, 18, 8, 9] or the feature space [17, 41, 28, 10]. Meanwhile, other studies focus on training strategies to make the poisoned data have little or no effect on the trained model [23, 40] through randomized smoothing [34, 46], majority vote [21], differential privacy [29], and input preprocessing [27, 4]. ",
165
+ "bbox": [
166
+ 174,
167
+ 794,
168
+ 825,
169
+ 877
170
+ ],
171
+ "page_idx": 1
172
+ },
173
+ {
174
+ "type": "text",
175
+ "text": "Defense after Training. For a downloaded model, we have lost control of its training. To repair the risk model, one direct way is to first reconstruct an approximation of the backdoor trigger via adversarial perturbation [43] or generative adversarial network (GAN) [5, 33, 50]. Once the trigger is reconstructed, it is feasible to prune neurons that are activated in the presence of the trigger, or fine-tune the model to unlearn the trigger [43]. As the trigger patterns in recently proposed attacks become more complicated such as the dynamics trigger [30] or natural phenomenon-based trigger [26], reconstruction becomes increasingly difficult. There are other studies on trigger-agnostic repairing via model pruning [24] or fine-tuning [7, 22] on the clean data. While they may suffer from severe accuracy degradation when only small clean data are available [7]. Unlike previous defensive pruning methods which are based on the rule-of-thumb, our proposed method is data-driven and does not require additional fine-tuning. ",
176
+ "bbox": [
177
+ 173,
178
+ 883,
179
+ 820,
180
+ 911
181
+ ],
182
+ "page_idx": 1
183
+ },
184
+ {
185
+ "type": "text",
186
+ "text": "",
187
+ "bbox": [
188
+ 173,
189
+ 90,
190
+ 826,
191
+ 217
192
+ ],
193
+ "page_idx": 2
194
+ },
195
+ {
196
+ "type": "text",
197
+ "text": "3 The Proposed Method ",
198
+ "text_level": 1,
199
+ "bbox": [
200
+ 174,
201
+ 234,
202
+ 392,
203
+ 252
204
+ ],
205
+ "page_idx": 2
206
+ },
207
+ {
208
+ "type": "text",
209
+ "text": "3.1 Preliminary ",
210
+ "text_level": 1,
211
+ "bbox": [
212
+ 174,
213
+ 266,
214
+ 295,
215
+ 281
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "Deep Neural Network and Its Neurons. In this paper, we take a fully-connected network as an example (other convolutional networks are also applicable). Its layers are numbered from 0 (input) to $L$ (output) and each layer contains $n _ { 0 } , \\cdots , n _ { L }$ neurons. The network has $n = n _ { 1 } + n _ { 2 } + \\cdot \\cdot \\cdot + n _ { L }$ parameterized neurons in total3. We denote the weight parameters of the $k$ -th neuron in $l$ -th layer as w(l)k , the bias as b $b _ { k } ^ { ( l ) }$ , and its output is ",
222
+ "bbox": [
223
+ 173,
224
+ 291,
225
+ 825,
226
+ 366
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "equation",
232
+ "img_path": "images/271e33dc8b33af0bfb78aba2722af37574ad1eed153da4fb5baf8de4bdc8aa46.jpg",
233
+ "text": "$$\nh _ { k } ^ { ( l ) } = \\sigma ( \\mathbf { w } _ { k } ^ { ( l ) \\top } \\mathbf { h } ^ { ( l - 1 ) } + b _ { k } ^ { ( l ) } ) ,\n$$",
234
+ "text_format": "latex",
235
+ "bbox": [
236
+ 398,
237
+ 372,
238
+ 598,
239
+ 395
240
+ ],
241
+ "page_idx": 2
242
+ },
243
+ {
244
+ "type": "text",
245
+ "text": "where $\\sigma ( \\cdot )$ is the nonlinear function and $\\mathbf { h } ^ { ( l - 1 ) }$ is the outputs of all neurons in the previous layer, $i . e . , { \\bf h } ^ { ( l - 1 ) } = [ h _ { 1 } ^ { ( l - 1 ) } , \\cdot \\cdot \\cdot , h _ { n _ { l } } ^ { ( l - 1 ) } ]$ . For simplicity, we denote all weights of the network as $\\mathbf { w } =$ $\\begin{array} { r l r } { } & { } & { [ { \\bf w } _ { 1 } ^ { ( 1 ) } , \\cdot \\cdot \\cdot , { \\bf w } _ { n _ { 1 } } ^ { ( 1 ) } , \\cdot \\cdot \\cdot , { \\bf w } _ { 1 } ^ { ( L ) } , \\cdot \\cdot \\cdot , { \\bf w } _ { n _ { L } } ^ { ( L ) } ] } \\end{array}$ , and all biases as $\\mathbf { b } = [ b _ { 1 } ^ { ( 1 ) } , \\cdots , b _ { n _ { l } } ^ { ( 1 ) } , \\cdots , b _ { 1 } ^ { ( L ) } , \\cdots , b _ { n _ { L } } ^ { ( L ) } ]$ For a given input $\\mathbf { x }$ , the network makes the prediction $f ( \\mathbf { x } ; \\mathbf { w } , \\mathbf { b } )$ . ",
246
+ "bbox": [
247
+ 173,
248
+ 401,
249
+ 826,
250
+ 468
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "DNN Training. We consider a $c$ -class classification problem. The parameters of weights and biases in DNN are learned on a training dataset $\\mathcal { D } _ { \\mathcal { T } } = \\{ ( \\bar { \\bf x } _ { 1 } , \\bar { y } _ { 1 } ) , \\cdot \\cdot \\cdot , ( \\bar { \\bf x } _ { s } , \\bar { y } _ { s } ) \\}$ containing $s$ inputs, where each input is $\\mathbf { x } _ { i } \\in \\mathbb { R } ^ { d } , i = 1 , \\cdots , s .$ , and its ground-truth label is $y _ { i } \\in \\{ 1 , \\cdots , c \\}$ . The training procedure tries to find the optimal $( \\mathbf { w } ^ { \\star } , \\mathbf { b } ^ { \\star } )$ which minimize the training loss on the training data $\\mathcal { D } _ { \\mathcal { T } }$ , ",
257
+ "bbox": [
258
+ 173,
259
+ 473,
260
+ 825,
261
+ 531
262
+ ],
263
+ "page_idx": 2
264
+ },
265
+ {
266
+ "type": "equation",
267
+ "img_path": "images/f3364f80e5b67dd56d21b64f0eee85cb357978fdb9182499adbbea91e6f0bedd.jpg",
268
+ "text": "$$\n\\mathcal { L } _ { \\mathcal { D } _ { T } } ( \\mathbf { w } , \\mathbf { b } ) = \\underset { \\mathbf { x } , y \\sim \\mathcal { D } _ { T } } { \\mathbb { E } } \\ell ( f ( \\mathbf { x } ; \\mathbf { w } , \\mathbf { b } ) , y ) ,\n$$",
269
+ "text_format": "latex",
270
+ "bbox": [
271
+ 369,
272
+ 542,
273
+ 627,
274
+ 566
275
+ ],
276
+ "page_idx": 2
277
+ },
278
+ {
279
+ "type": "text",
280
+ "text": "where $\\ell ( \\cdot , \\cdot )$ is usually cross entropy loss. ",
281
+ "bbox": [
282
+ 176,
283
+ 570,
284
+ 446,
285
+ 585
286
+ ],
287
+ "page_idx": 2
288
+ },
289
+ {
290
+ "type": "text",
291
+ "text": "Defense Setting. We adopt a typical defense setting that an untrustworthy model is downloaded from a third party (e.g., outsourcing training) without knowledge of the training data $\\mathcal { D } _ { \\mathcal { T } }$ . For defense, we are assumed to have a small amount of clean data $\\mathcal { D } _ { \\mathcal { V } }$ . The goals of model repairing are to remove the backdoor behavior while keeping the accuracy on clean samples. ",
292
+ "bbox": [
293
+ 173,
294
+ 592,
295
+ 825,
296
+ 647
297
+ ],
298
+ "page_idx": 2
299
+ },
300
+ {
301
+ "type": "text",
302
+ "text": "3.2 Adversarial Neuron Perturbations ",
303
+ "text_level": 1,
304
+ "bbox": [
305
+ 176,
306
+ 664,
307
+ 450,
308
+ 679
309
+ ],
310
+ "page_idx": 2
311
+ },
312
+ {
313
+ "type": "text",
314
+ "text": "In previous studies, the adversary causes misclassification by perturbing inputs before feeding them to DNNs. For example, attaching triggers to inputs to make backdoored DNN output the target label or adversarially perturbing inputs to make normal/backdoored DNN output incorrectly. ",
315
+ "bbox": [
316
+ 174,
317
+ 689,
318
+ 825,
319
+ 732
320
+ ],
321
+ "page_idx": 2
322
+ },
323
+ {
324
+ "type": "text",
325
+ "text": "Here, we try another direction to perturb DNN neurons to cause misclassification. Given the $k$ -th neuron in the $l$ -th layers, we can perturb its weight $\\mathbf { w } _ { k } ^ { ( l ) }$ and bias $b _ { k } ^ { ( l ) }$ by multiplying a small number respectively. As a result, the perturbed weight is and the output of the perturbed neuron becomes $( 1 + \\delta _ { k } ^ { ( l ) } ) \\mathbf { w } _ { k } ^ { ( l ) }$ , the perturbed bias is $( 1 + \\xi _ { k } ^ { ( l ) } ) b _ { k } ^ { ( l ) }$ ",
326
+ "bbox": [
327
+ 173,
328
+ 737,
329
+ 825,
330
+ 801
331
+ ],
332
+ "page_idx": 2
333
+ },
334
+ {
335
+ "type": "equation",
336
+ "img_path": "images/bbdb534de652f2146abbf3f98ac580f7354f75dd735c92638536f552bd2b9755.jpg",
337
+ "text": "$$\nh _ { k } ^ { ( l ) } = \\sigma \\big ( ( 1 + \\delta _ { k } ^ { ( l ) } ) \\mathbf { w } _ { k } ^ { ( l ) \\top } \\mathbf { h } ^ { ( l - 1 ) } + ( 1 + \\xi _ { k } ^ { ( l ) } ) b _ { k } ^ { ( l ) } \\big ) ,\n$$",
338
+ "text_format": "latex",
339
+ "bbox": [
340
+ 333,
341
+ 808,
342
+ 663,
343
+ 830
344
+ ],
345
+ "page_idx": 2
346
+ },
347
+ {
348
+ "type": "text",
349
+ "text": "where δ(l)k and $\\xi _ { k } ^ { ( l ) }$ indicate the relative sizes of the perturbations to the weight and bias respectively. Similarly, all neurons can be perturbed like Eq. (3). We denote the relative weight perturbation size of all neurons as $\\pmb { \\delta } = [ \\delta _ { 1 } ^ { ( 1 ) } , \\cdots , \\delta _ { n _ { 1 } } ^ { ( 1 ) } , \\cdots , \\delta _ { 1 } ^ { ( L ) } , \\cdots , \\delta _ { n _ { L } } ^ { ( L ) } ] ,$ , and the relative bias perturbation ",
350
+ "bbox": [
351
+ 174,
352
+ 838,
353
+ 825,
354
+ 888
355
+ ],
356
+ "page_idx": 2
357
+ },
358
+ {
359
+ "type": "image",
360
+ "img_path": "images/6ac1e440c839cc232f6a83883b01fc0b0c8fea8f16523aab7310035f8bb29735.jpg",
361
+ "image_caption": [],
362
+ "image_footnote": [],
363
+ "bbox": [
364
+ 174,
365
+ 97,
366
+ 820,
367
+ 253
368
+ ],
369
+ "page_idx": 3
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "Figure 1: The performance of neuron-perturbed models with different perturbation budgets. ",
374
+ "bbox": [
375
+ 196,
376
+ 257,
377
+ 799,
378
+ 272
379
+ ],
380
+ "page_idx": 3
381
+ },
382
+ {
383
+ "type": "text",
384
+ "text": "size as $\\pmb { \\xi } = [ \\xi _ { 1 } ^ { ( 1 ) } , \\cdots , \\xi _ { n _ { 1 } } ^ { ( 1 ) } , \\cdots , \\xi _ { 1 } ^ { ( L ) } , \\cdots , \\xi _ { n _ { L } } ^ { ( L ) } ]$ for simplicity. For a clean input $\\mathbf { x }$ , the output of the perturbed model is ",
385
+ "bbox": [
386
+ 174,
387
+ 294,
388
+ 821,
389
+ 324
390
+ ],
391
+ "page_idx": 3
392
+ },
393
+ {
394
+ "type": "equation",
395
+ "img_path": "images/4a2800c50ea96b4168f8f72c505221fc8cb1a7eaddf035d70ab9c827a3a570b5.jpg",
396
+ "text": "$$\nf ( \\mathbf { x } ; ( 1 + \\delta ) \\odot \\mathbf { w } , ( 1 + \\pmb { \\xi } ) \\odot \\mathbf { b } ) ,\n$$",
397
+ "text_format": "latex",
398
+ "bbox": [
399
+ 388,
400
+ 324,
401
+ 607,
402
+ 342
403
+ ],
404
+ "page_idx": 3
405
+ },
406
+ {
407
+ "type": "text",
408
+ "text": "where neuron-wise multiplication $\\odot$ multiplies the parameters by the perturbation sizes belonging to the same neuron as follows: ",
409
+ "bbox": [
410
+ 176,
411
+ 344,
412
+ 823,
413
+ 372
414
+ ],
415
+ "page_idx": 3
416
+ },
417
+ {
418
+ "type": "equation",
419
+ "img_path": "images/8b737e9e5e17ed7d142d2b5e26aef86d52f922ee24349f7c5ee1faf97362bb57.jpg",
420
+ "text": "$$\n( 1 + \\pmb \\delta ) \\odot \\mathbf { w } = \\big [ ( 1 + \\delta _ { 1 } ^ { ( 1 ) } ) \\mathbf { w } _ { 1 } ^ { ( 1 ) } , \\cdots , ( 1 + \\delta _ { n _ { 1 } } ^ { ( 1 ) } ) \\mathbf { w } _ { n _ { 1 } } ^ { ( 1 ) } , \\cdots , ( 1 + \\delta _ { 1 } ^ { ( L ) } ) \\mathbf { w } _ { 1 } ^ { ( L ) } , \\cdots , ( 1 + \\delta _ { n _ { L } } ^ { ( L ) } ) \\mathbf { w } _ { n _ { L } } ^ { ( L ) } \\big ] ,\n$$",
421
+ "text_format": "latex",
422
+ "bbox": [
423
+ 183,
424
+ 375,
425
+ 826,
426
+ 397
427
+ ],
428
+ "page_idx": 3
429
+ },
430
+ {
431
+ "type": "equation",
432
+ "img_path": "images/1bcd1eceaae398c0951e86fbbc4af6fcbf8e19cdbd94e4eaff6cf704b519603a.jpg",
433
+ "text": "$$\n( 1 + \\pmb { \\xi } ) \\odot \\mathbf { b } = \\big [ ( 1 + \\xi _ { 1 } ^ { ( 1 ) } ) b _ { 1 } ^ { ( 1 ) } , \\cdots , ( 1 + \\xi _ { n _ { 1 } } ^ { ( 1 ) } ) b _ { n _ { 1 } } ^ { ( 1 ) } , \\cdots , ( 1 + \\xi _ { 1 } ^ { ( L ) } ) b _ { 1 } ^ { ( L ) } , \\cdots , ( 1 + \\xi _ { n _ { L } } ^ { ( L ) } ) b _ { n _ { L } } ^ { ( L ) } \\big ] .\n$$",
434
+ "text_format": "latex",
435
+ "bbox": [
436
+ 183,
437
+ 412,
438
+ 794,
439
+ 435
440
+ ],
441
+ "page_idx": 3
442
+ },
443
+ {
444
+ "type": "text",
445
+ "text": "Given a trained model, similar to adversarial perturbations [39, 13], we optimize the neuron perturbations $\\delta$ and $\\boldsymbol { \\xi }$ to increase the classification loss on the clean data: ",
446
+ "bbox": [
447
+ 176,
448
+ 440,
449
+ 823,
450
+ 468
451
+ ],
452
+ "page_idx": 3
453
+ },
454
+ {
455
+ "type": "equation",
456
+ "img_path": "images/a103abdea57a9e286ea31fc2de6f996314495bf31678be7f5a682aa0cc2a0a69.jpg",
457
+ "text": "$$\n\\operatorname* { m a x } _ { \\delta , \\xi \\in [ - \\epsilon , \\epsilon ] ^ { n } } \\mathcal { L } _ { \\mathcal { D } _ { \\mathcal { V } } } \\big ( ( 1 + \\delta ) \\odot \\mathbf { w } , ( 1 + \\xi ) \\odot \\mathbf { b } \\big ) ,\n$$",
458
+ "text_format": "latex",
459
+ "bbox": [
460
+ 352,
461
+ 474,
462
+ 643,
463
+ 501
464
+ ],
465
+ "page_idx": 3
466
+ },
467
+ {
468
+ "type": "text",
469
+ "text": "where $\\epsilon$ is the perturbation budget, which limits the maximum perturbation size. ",
470
+ "bbox": [
471
+ 176,
472
+ 507,
473
+ 696,
474
+ 522
475
+ ],
476
+ "page_idx": 3
477
+ },
478
+ {
479
+ "type": "text",
480
+ "text": "Specifically, we generate adversarial neuron perturbations for three ResNet-18 models [15] on CIFAR10 [19]: a benign model, a backdoored one with a predefined trigger (Badnets [14]), and a backdoored one with a dynamic trigger (Input-aware Backdoor Attack [30], IAB). We all set the target label in backdoor as class 0. We solve the maximization in Eq. (7) using project gradient descent (PGD) with random initialization similar to generating adversarial examples. The number of iterations is 300 and the step size is 0.001. Figure 1(a) shows adversarial neuron perturbations leads to misclassification, and the larger the perturbation budget $\\epsilon$ is, the larger the error rate is. In addition, backdoored models always have larger error rates with the same perturbation budget compared to the benign one. To explore the misclassification in detail, we illustrate the proportion of different classes in predictions by three models in Figure 1(b). For benign model, adversarial neuron perturbations mislead the model to output the untargeted class (e.g., class 3). While for backdoored models, the majority of misclassified samples are predicted as the target label (e.g., class 0) whose proportion rate is much higher than the benign model. More results to support these findings can be found in Appendix B. Therefore, even without the trigger, we can still induce the backdoor behaviours via adversarial neuron perturbations. The reasons can be explained as follows: assuming the $k$ -th neuron in $l$ -th layers is backdoor-related, it is dormant on clean sample [24] (i.e., output is close to 0: $h _ { k } ^ { ( l ) } \\approx 0 ,$ ). If w(l)>k hl−1 > 0 and b(l)k > 0, we can increase its output by enlarging the norm of the weights (i.e., $\\delta _ { k } ^ { ( l ) } > 0 \\}$ ), and further continue to increase it by adding a larger bias (i.e., $\\xi _ { k } ^ { ( l ) } > 0 ) ^ { 4 }$ . With suitable perturbations, the backdoor-related neuron is activated even on clean samples. Thus, the neurons that are sensitive to adversarial neuron perturbation are strongly related to the injected backdoor. ",
481
+ "bbox": [
482
+ 173,
483
+ 526,
484
+ 826,
485
+ 816
486
+ ],
487
+ "page_idx": 3
488
+ },
489
+ {
490
+ "type": "text",
491
+ "text": "3.3 The Proposed Adversarial Neuron Pruning (ANP) ",
492
+ "text_level": 1,
493
+ "bbox": [
494
+ 173,
495
+ 832,
496
+ 562,
497
+ 847
498
+ ],
499
+ "page_idx": 3
500
+ },
501
+ {
502
+ "type": "text",
503
+ "text": "As mentioned above, the sensitivity under adversarial neuron perturbations is strongly related to the injected backdoor. Inspired by this, we try to prune some sensitive neurons to defend backdoor attacks, named Adversarial Neuron Pruning method (ANP). We denote the pruning masks as $\\mathbf { m } =$ $[ m _ { 1 } ^ { ( 1 ) } , \\cdots , m _ { n _ { 1 } } ^ { ( 1 ) } , \\cdots , m _ { 1 } ^ { ( L ) } , \\cdots , m _ { n _ { L } } ^ { ( L ) } ] \\in \\bar { \\{ 0 , 1 \\} } ^ { n }$ . For the $k$ -th neuron in the $l$ -th layer, we set its weight w(k l ) = 0 if m( l )k = L , and keep it unchanged if $m _ { k } ^ { ( l ) } = 1$ . Similar to Ghorbani and Zou [11], we always keep the bias $b _ { k } ^ { ( l ) }$ to avoid extra harm to the accuracy on clean data5. ",
504
+ "bbox": [
505
+ 176,
506
+ 858,
507
+ 821,
508
+ 887
509
+ ],
510
+ "page_idx": 3
511
+ },
512
+ {
513
+ "type": "text",
514
+ "text": "",
515
+ "bbox": [
516
+ 173,
517
+ 90,
518
+ 825,
519
+ 160
520
+ ],
521
+ "page_idx": 4
522
+ },
523
+ {
524
+ "type": "text",
525
+ "text": "Continuous Relaxation and Optimization. Due to the binary masks, pruning is a discrete optimization problem that is difficult to solve within feasible time. To address this, we apply continuous relaxation to let $\\mathbf { m } \\in [ 0 , 1 ] ^ { n }$ and optimizes them using projected gradient descent (PGD). To restore the continuous masks to discreteness after optimization, we set all mask smaller than a threshold as 0 (prune neurons with small masks), and others as 1 (keep neurons with large masks). We expect the pruned model to not only behaves well on clean data but also keep stable under adversarial neuron perturbations. Therefore, we solve the following minimization problem, ",
526
+ "bbox": [
527
+ 173,
528
+ 165,
529
+ 825,
530
+ 262
531
+ ],
532
+ "page_idx": 4
533
+ },
534
+ {
535
+ "type": "equation",
536
+ "img_path": "images/be916f3a3bfa01bbdbdeba9a9614f93c3d22339b730c0aacedbf416eef2b05fe.jpg",
537
+ "text": "$$\n\\operatorname* { m i n } _ { \\mathbf { m } \\in \\left[ 0 , 1 \\right] ^ { n } } \\left[ \\alpha \\mathcal { L } _ { { D } _ { \\mathcal { V } } } ( \\mathbf { m } \\odot \\mathbf { w } , \\mathbf { b } ) + \\left( 1 - \\alpha \\right) \\operatorname* { m a x } _ { \\delta , \\xi \\in \\left[ - \\epsilon , \\epsilon \\right] ^ { n } } \\mathcal { L } _ { { D } _ { \\mathcal { V } } } ( ( \\mathbf { m } + \\delta ) \\odot \\mathbf { w } , ( 1 + \\pm \\xi ) \\odot \\mathbf { b } ) \\right] ,\n$$",
538
+ "text_format": "latex",
539
+ "bbox": [
540
+ 214,
541
+ 277,
542
+ 781,
543
+ 313
544
+ ],
545
+ "page_idx": 4
546
+ },
547
+ {
548
+ "type": "text",
549
+ "text": "where $\\alpha \\in [ 0 , 1 ]$ is a trade-off coefficient. If $\\alpha$ is close to 1, the minimization object focuses more on accuracy of the pruned model on clean data, while if $\\alpha$ is close to 0, it focuses more on robustness against backdoor attacks. ",
550
+ "bbox": [
551
+ 176,
552
+ 328,
553
+ 825,
554
+ 371
555
+ ],
556
+ "page_idx": 4
557
+ },
558
+ {
559
+ "type": "text",
560
+ "text": "Implementation of ANP. As shown in Algorithm 1, we start from an unpruned network, that is, initializing all masks as 1 (Line 2). We randomly initialize perturbations (Line 5), and update them using one step (Line 6-7), then project them onto the feasible regime (Line 8-9). Following that, we update mask values based on the adversarial neuron perturbation (Line 10) and project mask value onto [0, 1] (Line 11). As convergence after iterations, we pruned neurons with small mask value and keep others unchanged (Line 13). Note that the proposed ANP is data-driven, different from previous pruning-based defenses which are based on the thumb-of-rule [24, 43]. Besides, ANP can work well on an extremely small amount of clean data due to the small number of masks. ",
561
+ "bbox": [
562
+ 173,
563
+ 377,
564
+ 826,
565
+ 488
566
+ ],
567
+ "page_idx": 4
568
+ },
569
+ {
570
+ "type": "text",
571
+ "text": "Algorithm 1 Adversarial Neuron Pruning (ANP) ",
572
+ "text_level": 1,
573
+ "bbox": [
574
+ 174,
575
+ 512,
576
+ 496,
577
+ 527
578
+ ],
579
+ "page_idx": 4
580
+ },
581
+ {
582
+ "type": "text",
583
+ "text": "1: Input: Network $f ( \\cdot ; { \\bf w } , { \\bf b } )$ , hyper-parameter $\\alpha$ , learning rate $\\eta$ , batch size $b$ , maximum perturba \ntion size $\\epsilon$ \n2: Initialize all elements in $\\mathbf { m }$ as 1 \n3: repeat \n4: Read mini-batch $B = \\{ ( \\mathbf { x } _ { 1 } , y _ { 1 } ) , . . . , ( \\mathbf { x } _ { b } , y _ { b } ) \\}$ from training set \n5: $\\delta _ { 0 } , \\xi _ { 0 } \\sim U ( - \\epsilon , \\epsilon )$ , where $U ( - \\epsilon , \\epsilon )$ is the uniform distribution \n6: $\\begin{array} { r } { \\pmb { \\delta } \\pmb { \\delta } _ { 0 } + \\epsilon \\mathrm { s i g n } ( \\nabla _ { \\delta } \\mathcal { L } ( ( \\mathbf { m } + \\pmb { \\delta } _ { 0 } ) \\odot \\mathbf { w } , } \\end{array}$ , $( { \\bf 1 } + { \\pmb \\xi } _ { 0 } ) \\odot { \\bf b } ) )$ \n7: $\\pmb { \\xi } \\pmb { \\xi } _ { 0 } + \\epsilon \\mathrm { s i g n } ( \\nabla _ { \\pmb { \\xi } } \\mathcal { L } ( ( \\mathbf { m } + \\pmb { \\delta } _ { 0 } ) \\odot \\mathbf { w }$ , $\\left( \\mathbf { 1 } + \\pmb { \\xi } _ { 0 } \\right) \\odot \\mathbf { b } ) _ { }$ ) \n8: $\\delta \\gets \\operatorname* { m a x } ( - \\epsilon , \\operatorname* { m i n } ( \\delta , \\epsilon ) )$ \n9: $\\pmb { \\xi } \\gets \\operatorname* { m a x } ( - \\epsilon , \\operatorname* { m i n } ( \\pmb { \\xi } , \\epsilon ) )$ \n10: m ← m − η∇m[αL(m \f w, b) + (1 − α)L((m + δ) \f w, (1 + ξ) \f b)] \n11: $\\mathbf { m } \\gets \\mathrm { m a x } ( 0 , \\mathrm { m i n } ( \\mathbf { m } , 1 ) )$ \n12: until training converged \n13: $m _ { k } ^ { ( l ) } = \\mathbb { I } ( m _ { k } ^ { ( \\bar { l } ) } > t h r e s h o l d )$ , for all $k , l$ \n14: Output: A robust network $f ( \\cdot ; \\mathbf { m } \\odot \\mathbf { w } , \\mathbf { b } )$ against backdoor attacks ",
584
+ "bbox": [
585
+ 178,
586
+ 531,
587
+ 821,
588
+ 743
589
+ ],
590
+ "page_idx": 4
591
+ },
592
+ {
593
+ "type": "text",
594
+ "text": "Adaptation to Batch Normalization. Batch Normalization (BatchNorm) [16] always normalizes its input and controls the mean and variance of the output by a pair of trainable parameters (scale $\\gamma$ and shift $\\beta$ ). If BatchNorm is inserted between matrix multiplication and the nonlinear activation, the perturbations to weight and bias may cancel each other out. For example, if we perturb the weight and bias of a neuron to the maximum by multiplying $( 1 + \\epsilon )$ , the normalization offsets them and nothing changes after BatchNorm. To address this problem, we perturb the scale and shift parameters instead. We also make similar changes to the pruning masks. ",
595
+ "bbox": [
596
+ 173,
597
+ 771,
598
+ 825,
599
+ 869
600
+ ],
601
+ "page_idx": 4
602
+ },
603
+ {
604
+ "type": "table",
605
+ "img_path": "images/01889cad0d7db84f889603a0e44f0bf8f015c137207a10a6a4dcb012cb6a0d94.jpg",
606
+ "table_caption": [
607
+ "Table 1: Performance (average over 5 random runs) of 4 defense methods against 6 backdoor attacks on $1 \\%$ (500 images) of clean data on CIFAR-10 training set using ResNet-18. The AvgDrop indicates the average changes in ACC or ASR over 6 backdoor attacks compared to no defense results (Before). "
608
+ ],
609
+ "table_footnote": [],
610
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Metric</td><td rowspan=1 colspan=1>Defense</td><td rowspan=1 colspan=1>Badnets Blend IAB-one IAB-all CLB SIG</td><td rowspan=1 colspan=1>AvgDrop</td></tr><tr><td rowspan=5 colspan=1>ACC</td><td rowspan=5 colspan=1>BeforeFT(lr = 0.01)FT(lr = 0.02)FPMCR(t = 0.3)ANP</td><td rowspan=1 colspan=1>93.73 94.82 93.89 94.10 93.78 93.64</td><td rowspan=1 colspan=1>一</td></tr><tr><td rowspan=1 colspan=1>90.48 92.12 88.68 89.06 91.26 91.19</td><td rowspan=1 colspan=1>↓3.53</td></tr><tr><td rowspan=1 colspan=1>87.23 88.98 84.85 83.77 88.25 88.63</td><td rowspan=1 colspan=1>↓7.04</td></tr><tr><td rowspan=2 colspan=1>92.18 92.40 91.57 92.28 91.91 91.6485.95 88.26 86.30 84.53 86.87 85.8890.20 93.44 92.62 92.79 92.67 93.40</td><td rowspan=1 colspan=1>↓2.00</td></tr><tr><td rowspan=1 colspan=1>7.70↓1.47</td></tr><tr><td rowspan=5 colspan=1>ASR</td><td rowspan=5 colspan=1>BeforeFT(lr = 0.01)FT(lr = 0.02)FPMCR(t = 0.3)ANP</td><td rowspan=1 colspan=1>99.97 100.0 98.49 92.88 99.94 94.2611.70 47.17 0.99 1.36 12.51 0.40</td><td rowspan=1 colspan=1>一↓85.24</td></tr><tr><td rowspan=2 colspan=1>2.95 10.20 1.70 1.83 1.17 0.395.34 65.39 20.73 32.36 3.40 0.32</td><td rowspan=1 colspan=1>↓94.55</td></tr><tr><td rowspan=1 colspan=1>↓76.33</td></tr><tr><td rowspan=1 colspan=1>5.70 13.57 30.23 35.17 12.77 0.52</td><td rowspan=1 colspan=1>←81.26</td></tr><tr><td rowspan=1 colspan=1>0.45 0.46 0.88 0.86 3.98 0.28</td><td rowspan=1 colspan=1>↓96.44</td></tr></table>",
611
+ "bbox": [
612
+ 173,
613
+ 137,
614
+ 825,
615
+ 339
616
+ ],
617
+ "page_idx": 5
618
+ },
619
+ {
620
+ "type": "text",
621
+ "text": "4 Experiments ",
622
+ "text_level": 1,
623
+ "bbox": [
624
+ 173,
625
+ 364,
626
+ 312,
627
+ 382
628
+ ],
629
+ "page_idx": 5
630
+ },
631
+ {
632
+ "type": "text",
633
+ "text": "In this section, we conduct comprehensive experiments to evaluate the effectiveness of ANP, including its benchmarking robustness, ablation studies and performance under limited computation resources. ",
634
+ "bbox": [
635
+ 174,
636
+ 396,
637
+ 825,
638
+ 424
639
+ ],
640
+ "page_idx": 5
641
+ },
642
+ {
643
+ "type": "text",
644
+ "text": "4.1 Experimental Settings ",
645
+ "text_level": 1,
646
+ "bbox": [
647
+ 174,
648
+ 441,
649
+ 367,
650
+ 457
651
+ ],
652
+ "page_idx": 5
653
+ },
654
+ {
655
+ "type": "text",
656
+ "text": "Backdoor Attacks and Settings. We consider 5 state-of-the-art backdoor attacks: 1) BadNets [14], 2) Blend backdoor attack (Blend) [6], 3) Input-aware backdoor attack with all-to-one target label (IAB-one) or all-to-all target label (IAB-all) [30], 4) Clean-label backdoor (CLB) [42], and 5) Sinusoidal signal backdoor attack (SIG) [1]. For fair comparisons, we follow the default configuration in their original papers such as the trigger patterns, the trigger sizes and the target labels. We evaluate the performance of all attacks and defenses on CIFAR-10 [19] using ResNet-18 [15] as the base model. We use $9 0 \\%$ training data to train the backdoored DNNs and use the all or part of the remaining $1 0 \\%$ training data for defense. More details about implementation can be found in Appendix A. ",
657
+ "bbox": [
658
+ 173,
659
+ 467,
660
+ 825,
661
+ 578
662
+ ],
663
+ "page_idx": 5
664
+ },
665
+ {
666
+ "type": "text",
667
+ "text": "Backdoor Defenses and Settings. We compare our proposed ANP with 3 existing model repairing methods: 1) standard fine-tuning (FT), 2) fine-pruning (FP) [24], and 3) mode connectivity repair (MCR) [48]. All defense methods are assumed to have access to the same $1 \\%$ of clean training data (500 images). The results based on $1 0 \\%$ (5000 images) and $0 . 1 \\%$ (50 images) of clean training data can be found in Appendix. For ANP, we optimize all masks using Stochastic Gradient Descent (SGD) with the perturbation budget $\\epsilon = 0 . 4$ and the trade-off coefficient $\\alpha = 0 . 2$ . We set the batch size 128, the constant learning rate 0.2, and the momentum 0.9 for 2000 iterations in total. Typical data augmentation like random crop and horizontal flipping are applied. After optimization, neurons with mask value smaller than 0.2 are pruned. ",
668
+ "bbox": [
669
+ 173,
670
+ 584,
671
+ 825,
672
+ 709
673
+ ],
674
+ "page_idx": 5
675
+ },
676
+ {
677
+ "type": "text",
678
+ "text": "Evaluation Metrics. We evaluate the performance of different defenses using two metrics: 1) the accuracy on clean data (ACC), and 2) and the attack success rate (ASR) that is the ratio of triggered samples that are misclassified as the target label. For better comparison between different strategies for the target label (e.g., all-to-one and all-to-all), we remove the samples whose ground-truth labels already belong to the target class in the all-to-one setting before calculating ASR. Therefore, an ideal defense always has close-to-zero ASR and high ACC. ",
679
+ "bbox": [
680
+ 174,
681
+ 715,
682
+ 825,
683
+ 799
684
+ ],
685
+ "page_idx": 5
686
+ },
687
+ {
688
+ "type": "text",
689
+ "text": "4.2 Benchmarking the State-of-the-art Robustness ",
690
+ "text_level": 1,
691
+ "bbox": [
692
+ 174,
693
+ 815,
694
+ 535,
695
+ 830
696
+ ],
697
+ "page_idx": 5
698
+ },
699
+ {
700
+ "type": "text",
701
+ "text": "To verify the effectiveness of the proposed ANP, we compare its performance with other 3 existing model repairing methods using ACC and ASR in Table 1. All experiments are repeated over 5 runs with different random seeds, and we only report the average performance without the standard deviation due to the space constraint. More detailed results including the standard deviation can be found in Appendix C. ",
702
+ "bbox": [
703
+ 174,
704
+ 842,
705
+ 825,
706
+ 911
707
+ ],
708
+ "page_idx": 5
709
+ },
710
+ {
711
+ "type": "table",
712
+ "img_path": "images/f8047a5753f3018f6176e6b7d756d668e01f922b5f5cd6e5c1ea85d6e78a16cd.jpg",
713
+ "table_caption": [
714
+ "Table 2: The average training time of defense method against 6 backdoor attacks on $1 \\%$ (500 images) of clean data on CIFAR-10 training set using ResNet-18. "
715
+ ],
716
+ "table_footnote": [],
717
+ "table_body": "<table><tr><td>Defense</td><td>FT</td><td>FP</td><td>MCR</td><td>ANP</td></tr><tr><td>Time (s)</td><td>93.80</td><td>1427.1</td><td>286.1</td><td>241.5</td></tr></table>",
718
+ "bbox": [
719
+ 339,
720
+ 119,
721
+ 651,
722
+ 165
723
+ ],
724
+ "page_idx": 6
725
+ },
726
+ {
727
+ "type": "text",
728
+ "text": "The experimental results show that the proposed ANP remarkably provides almost the highest robustness against several state-of-the-art backdoor attacks. In particular, in 5 of total 6 attacks, our proposed ANP successfully reduces the ASR to lower than $1 \\%$ while only has a slight drop $( \\sim 1 . 4 7 \\%$ on average) in ACC. Note that we only use $1 \\%$ of clean data from CIFAR-10 training set, which is extremely small. We find the standard fine-tuning (FT) with a larger learning rate ${ l r = 0 . 0 2 } )$ also provides strong robustness similar to ANP. However, it has an obvious drop in ACC since a large learning rate may destroy the features learned before and the new ones learned on limited data are poor in generalization. The poor accuracy hinders its usage in practical scenarios. In contrast, ANP has similar robustness against backdoor attacks while maintains ACC at a relatively high level at the same time. Similar to our method, Fine-pruning (FP) [24] also prunes some neurons and fine-tunes the pruned model on clean data. Specifically, It only prunes neurons in the last convolutional layer using a rule-of-thumb6, and provides limited robustness against backdoor attacks. Differently, the proposed ANP is data-driven (i.e., optimizing pruning masks based on data) and prunes neurons globally (i.e., pruning neurons in all layers), leading to higher ACC and lower ASR than FP. MCR suggests mitigating backdoor by using a curve model lying on a path connection between two backdoored models in the loss landscapes. However, with limited data, it fails in providing high robustness against complex triggers (e.g. a random trigger sampled from Gaussian in blend backdoor attack or the dynamic trigger in input-aware attack). By contrast, ANP always reduces ASR significantly no matter what the trigger looks like. Note that ANP only prunes neurons and never changes any parameters of backdoored DNNs, while other methods all fine-tune parameters. Under this situation, ANP still provides the almost best robustness against these state-of-the-art attacks, which indicates that pure pruning (without fine-tuning) is still a promising defense against backdoor attacks. ",
729
+ "bbox": [
730
+ 173,
731
+ 179,
732
+ 825,
733
+ 484
734
+ ],
735
+ "page_idx": 6
736
+ },
737
+ {
738
+ "type": "text",
739
+ "text": "We also compare the training time of ANP and other baselines in Table 2, which indicates the efficiency of the proposed ANP. In particular, we apply 2000 iterations for FT, FP, and ANP, and 200 epochs (i.e., 800 iterations) for MCR following the open-sourced code7. Note that ANP is not as slow as the vanilla adversarial training (AT) since ANP only requires one extra backpropagation while PGD inside AT usually needs 10 extra backpropagations (PGD-10) in each update of model parameters. Besides, although ANP takes $2 . 5 \\times$ time compared to FT, it improves accuracy (e.g., $8 8 . 9 8 \\% 9 3 . 4 4 \\%$ for Blend) and reduce vulnerability $( e . g . , \\bar { 1 0 . 2 0 \\% } \\to 0 . 4 6 \\%$ for Blend) significantly, making the overhead caused by ANP acceptable. ",
740
+ "bbox": [
741
+ 173,
742
+ 489,
743
+ 825,
744
+ 601
745
+ ],
746
+ "page_idx": 6
747
+ },
748
+ {
749
+ "type": "text",
750
+ "text": "4.3 Ablation Studies ",
751
+ "text_level": 1,
752
+ "bbox": [
753
+ 174,
754
+ 616,
755
+ 328,
756
+ 631
757
+ ],
758
+ "page_idx": 6
759
+ },
760
+ {
761
+ "type": "text",
762
+ "text": "Effect of Adversarial Neuron Perturbation. Recalling Section 3.2, we apply adversarial neuron perturbations to induce the injected backdoor and then defend against backdoor attacks. Here, we evaluate the effect of the adversarial neuron perturbation in our defense strategy. In the following experiments, we defend against Badnets attack by default, unless otherwise specified. First, we optimize masks with perturbations $\\alpha = 0 . 2$ and $\\epsilon = 0 . 4$ , i.e., ANP) and without perturbations $\\alpha = 1 . 0$ , i.e., the vanilla pruning method). Figure 2(a) shows the ACC and ASR on the test set during optimization. We find the optimization under adversarial neuron perturbations helps the backdoored model suppress ASR significantly while the vanilla one always has high ASR throughout the training process. Next, we illustrate the mask distribution after optimization. Figure 2(b) illustrates a certain fraction of masks becomes zero, which means that adversarial neuron perturbations indeed find some sensitive neurons and helps the model to remove them. In contrast, there is no mask close to 0 for the vanilla pruning method in Figure 2(c). Finally, we prune different fractions of neurons according to their mask in Figure 2(d). For both methods, ASR becomes low after pruning more than $5 \\%$ of neurons8. However, ACC also starts to degrade significantly for the vanilla pruning method with more than $5 \\%$ of neurons pruned. Since backdoored-related neurons are still mixed with other neurons (e.g., discriminant neurons), the vanilla pruning method prunes some discriminant neurons incorrectly. Meanwhile, ANP always keeps ACC at a relatively high level. In conclusion, the adversarial neuron perturbation is the key to distinguish the backdoor-related neurons from the other neurons, which thereby successfully obtains high ACC as well as low ASR. ",
763
+ "bbox": [
764
+ 173,
765
+ 642,
766
+ 825,
767
+ 835
768
+ ],
769
+ "page_idx": 6
770
+ },
771
+ {
772
+ "type": "image",
773
+ "img_path": "images/cdbe97c81ddf9f981dadc8bb71c5c721160bf778af2dfe13da667aa21c43f690.jpg",
774
+ "image_caption": [
775
+ "Figure 2: Comparison between optimization with and without adversarial neuron perturbations. "
776
+ ],
777
+ "image_footnote": [],
778
+ "bbox": [
779
+ 179,
780
+ 98,
781
+ 813,
782
+ 229
783
+ ],
784
+ "page_idx": 7
785
+ },
786
+ {
787
+ "type": "table",
788
+ "img_path": "images/3256376efc1771b95e75397e179754596782b9606cff25fe03f9273f61db1245.jpg",
789
+ "table_caption": [
790
+ "Table 3: Results with small budget $\\epsilon = 0 . 1$ against Blend attack on 500 clean images. “Neurons↓” indicates the number of neurons pruned by ANP. "
791
+ ],
792
+ "table_footnote": [],
793
+ "table_body": "<table><tr><td>Steps</td><td>1</td><td>2</td><td>5</td><td>10</td></tr><tr><td>Time (s)</td><td>239.9</td><td>359.2</td><td>551.8</td><td>943.9</td></tr><tr><td>Neurons↓</td><td>159</td><td>188</td><td>235</td><td>259</td></tr><tr><td>ASR (%)</td><td>65.19</td><td>13.40</td><td>1.06</td><td>0.90</td></tr><tr><td>ACC (%)</td><td>93.62</td><td>93.07</td><td>92.95</td><td>92.72</td></tr></table>",
794
+ "bbox": [
795
+ 173,
796
+ 337,
797
+ 485,
798
+ 421
799
+ ],
800
+ "page_idx": 7
801
+ },
802
+ {
803
+ "type": "table",
804
+ "img_path": "images/6d6e7e34649de585125457cd9d72e41a00c6fe4f7582f02fc5e3ce420c48c159.jpg",
805
+ "table_caption": [
806
+ "Table 4: Results with large budget $\\epsilon = 0 . 4$ against Blend attack on 500 clean images. “Neurons↓” indicates the number of neurons pruned by ANP. "
807
+ ],
808
+ "table_footnote": [],
809
+ "table_body": "<table><tr><td>Steps</td><td>1</td><td>2</td><td>5</td><td>10</td></tr><tr><td>Time (s)</td><td>241.5</td><td>357.2</td><td>557.1</td><td>950.1</td></tr><tr><td>Neurons↓</td><td>233</td><td>239</td><td>281</td><td>296</td></tr><tr><td>ASR (%)</td><td>0.46</td><td>1.30</td><td>5.30</td><td>31.34</td></tr><tr><td>ACC (%)</td><td>93.44</td><td>94.07</td><td>93.57</td><td>94.28</td></tr></table>",
810
+ "bbox": [
811
+ 509,
812
+ 337,
813
+ 820,
814
+ 421
815
+ ],
816
+ "page_idx": 7
817
+ },
818
+ {
819
+ "type": "text",
820
+ "text": "",
821
+ "bbox": [
822
+ 173,
823
+ 435,
824
+ 825,
825
+ 505
826
+ ],
827
+ "page_idx": 7
828
+ },
829
+ {
830
+ "type": "text",
831
+ "text": "In addition, we explore the effects of number of iterations in crafting adversarial neuron perturbations. We conduct experiments with varying numbers of steps (1/2/5/10) in ANP with a small perturbation budget $\\mathit { \\check { \\Psi } } _ { \\epsilon } = 0 . 1 $ ) and a large perturbation budget $\\mathit { \\check { \\Psi } } \\epsilon = 0 . 4$ ) respectively. The other settings are the same as Section 4.1. The experimental results are shown in Tables 3-4. Under a small perturbation budget, with more steps for ANP, the ASR decreases with a slight drop in ACC. This is because ANP with a single step and small size is too weak to distinguish benign neurons and backdoor-related neurons, while more steps can help ANP find more backdoor-related neurons. However, under a large perturbation budget, ANP with more steps has worse robustness. This is because, with a large perturbation budget, more neurons become sensitive. As a result, ANP with more steps finds too many “suspicious” neurons, and it is unable to identify backdoor-related neurons from them. In conclusion, we can strengthen the power of ANP to find backdoor-related neurons using a larger perturbation budget or more steps. Among them, single-step ANP with a slightly larger budget is more practical due to its time efficiency, and we adopt this by default. ",
832
+ "bbox": [
833
+ 173,
834
+ 511,
835
+ 825,
836
+ 690
837
+ ],
838
+ "page_idx": 7
839
+ },
840
+ {
841
+ "type": "text",
842
+ "text": "Results with Varying Hyperparameters. As mentioned in Section 3.3, the hyper-parameter $\\alpha$ in ANP controls the trade-off between the accuracy on clean data and the robustness against backdoor attacks. To test the performance with different $\\alpha$ , we optimize masks for a Badnets ResNet-18 based on $1 \\%$ of clean data using different $\\alpha \\in [ 0 , 1 ]$ with a fixed budget $\\epsilon = 0 . 4$ . In pruning, we always prune neurons by the threshold 0.2. As shown in the left plot of Figure 4, ANP is able to achieve a high robustness $\\mathrm { \\Delta A S R } < 4 \\%$ ) when $\\alpha \\leq 0 . 6$ . Meanwhile, ANP maintains a high natural accuracy $( \\mathrm { A C C } \\geq 9 0 \\% )$ as long as $\\alpha \\ge 0 . 1$ . As a result, ANP behaves well with high ACC and low ASR in a range of $\\alpha \\in [ 0 . 1 , 0 . 6 ]$ . ",
843
+ "bbox": [
844
+ 173,
845
+ 696,
846
+ 825,
847
+ 809
848
+ ],
849
+ "page_idx": 7
850
+ },
851
+ {
852
+ "type": "text",
853
+ "text": "Similarly, we also test the performance with different perturbation budgets $\\epsilon$ . The experiment settings are almost the same except a fixed trade-off coefficient $\\alpha = 0 . 2$ and varying budgets $\\epsilon \\in [ 0 , 1 ]$ . For example, we can provide obvious robustness (ASR becomes $7 . 4 5 \\%$ ) with a small perturbation budget $\\epsilon = 0 . 2$ ) as shown in the right plot of Figure 4. However, we find the accuracy on clean data degrades with a large perturbation budget. This is because too large perturbation budget brings much difficulty to converge well and ANP only finds a poor solution, which fails in identifying these discriminant and robust neurons and prunes part of them. As a result, ACC decreases significantly. In conclusion, the proposed ANP is stable in a large range of the trade-off coefficient $\\alpha \\in [ 0 . 1 , 0 . 6 ]$ and the perturbation budget $\\epsilon \\in [ 0 . 2 , 0 . 7 ]$ , demonstrating that ANP is not sensitive to hyper-parameters. ",
854
+ "bbox": [
855
+ 173,
856
+ 814,
857
+ 825,
858
+ 911
859
+ ],
860
+ "page_idx": 7
861
+ },
862
+ {
863
+ "type": "image",
864
+ "img_path": "images/8bf3858ee9e476f3adbe69766b659fe02bcb8becb61c2541e03275132706fc2f.jpg",
865
+ "image_caption": [
866
+ "Figure 3: Performance $\\pm$ std over 5 random runs) of pruned models using different architectures by different pruning fractions or different thresholds. "
867
+ ],
868
+ "image_footnote": [],
869
+ "bbox": [
870
+ 181,
871
+ 97,
872
+ 815,
873
+ 229
874
+ ],
875
+ "page_idx": 8
876
+ },
877
+ {
878
+ "type": "text",
879
+ "text": "",
880
+ "bbox": [
881
+ 174,
882
+ 287,
883
+ 821,
884
+ 315
885
+ ],
886
+ "page_idx": 8
887
+ },
888
+ {
889
+ "type": "text",
890
+ "text": "From the discussion above, we find that the hyperparameters are insensitive as shown in Figure 4 and ANP performs well across a wide range of hyperparameters, e.g., trade-off coefficient $\\alpha \\in [ 0 . 1 , 0 . 6 ]$ against Badnets attack. In addition, with varying hyperparameters, the performance trends are very consistent across different backdoor attacks as shown in Figure $\\mathrm { X }$ in Appendix C.1. As a result, even though the attack (e.g., Blend) is unknown, the defender could tune $\\alpha$ against a known attack (e.g., Badnets) and find the 0.2 is a good choice. ANP with $\\alpha = 0 . 2$ also achieves satisfactory performance against Blend attack. In conclusion, the selection of hyperparameters in ANP is not difficult. ",
891
+ "bbox": [
892
+ 174,
893
+ 321,
894
+ 825,
895
+ 419
896
+ ],
897
+ "page_idx": 8
898
+ },
899
+ {
900
+ "type": "text",
901
+ "text": "Pruning by Fraction or by Threshold. Different from previous pruning methods that use a fixed pruning fraction, the proposed ANP prunes neurons by a threshold when generalized across different model architectures. To verify this, we train different Badnets models using ResNet-18 [15], ResNet50 [15], and VGG-19 [37] with the same settings as Section 4.1. We also train a model with Badnets MobileNet-V2 with 300 epochs . We optimize the pruning masks for these models with $\\epsilon = 0 . 4 , \\alpha = 0 . 2$ for ResNet-18, ResNet-50, and VGG-19. For MobileNet-V2, we found the perturbation budget $\\epsilon = 0 . 4$ is too large, leading to a failure in convergence. So we apply a smaller budget $\\epsilon = 0 . 2$ and the same trade-off coefficient $\\alpha = 0 . 2$ . We show the ACC and ASR after pruning by varying pruning fractions in Figure 3(a) and 3(b), which indicates that the suitable fraction varies across model architectures. For example, ResNet-18 only has low ASR after pruning $5 \\%$ of neurons, while MobileNet-V2 has a large accuracy drop on clean samples with more than $5 \\%$ neurons pruned. Figure 3(c) and Figure 3(d) show ACC and ASR after pruning by different thresholds respectively. When pruning by the threshold, we find there is a large overlap in [0.2, 0.5] (the gray zone) in which all models have high ACC and low ASR simultaneously. That is why we adopt the strategy of pruning by the threshold in ANP. Note that, even for low-capacity models as MobileNet-V2, it is still possible to remove the injected backdoor by neuron pruning (without the fine-tuning). ",
902
+ "bbox": [
903
+ 173,
904
+ 425,
905
+ 825,
906
+ 646
907
+ ],
908
+ "page_idx": 8
909
+ },
910
+ {
911
+ "type": "text",
912
+ "text": "Pruning on Different Components. We also compare the performance when applying ANP to different components inside DNNs. We prune a backdoored 4-layer CNN (2 conv layers $^ { + 1 }$ fullyconnected layer $^ +$ output layer) on MNIST, and find it more efficient to prune neurons in some layers. In particular, we achieve $0 . 4 3 \\%$ of ASR $( 9 9 . 0 4 \\%$ of ACC) when two neurons in the 2nd layer are pruned, while we only achieve $4 . 4 2 \\%$ of ASR $( 9 2 . 4 8 \\%$ of ACC) even after pruning 150 neurons in the fully-connected layer. The experimental settings and more results can be found in Appendix C.2. This indicates that the structure of components matter in pruning-based defense. We leave this in our future work. ",
913
+ "bbox": [
914
+ 174,
915
+ 652,
916
+ 826,
917
+ 763
918
+ ],
919
+ "page_idx": 8
920
+ },
921
+ {
922
+ "type": "text",
923
+ "text": "4.4 Performance under Limited Computation Resource ",
924
+ "text_level": 1,
925
+ "bbox": [
926
+ 173,
927
+ 781,
928
+ 571,
929
+ 796
930
+ ],
931
+ "page_idx": 8
932
+ },
933
+ {
934
+ "type": "text",
935
+ "text": "In practical scenarios, the defender usually has limited clean data and computation resources, bringing more difficulty to repair backdoored models. While Section 4.2 has discussed the effectiveness of the proposed ANP on the extremely small amount of data, this part focuses on the performance with limited computation resources in defense. ",
936
+ "bbox": [
937
+ 174,
938
+ 808,
939
+ 825,
940
+ 863
941
+ ],
942
+ "page_idx": 8
943
+ },
944
+ {
945
+ "type": "text",
946
+ "text": "In particular, we optimize all masks for a Badnets ResNet-18 with varying number of iterations (20, 100, 400, and 2000) on $1 \\%$ of clean data (500 images) and prune the model from neurons with the small mask to neurons with the large mask. Figure 5 shows the ACC and ASR with varying pruning fractions based on different numbers of iterations. We find that some backdoor-related neurons have already been distinguished just after 20 iterations. For example, after removing $4 \\%$ of neurons with the smallest masks, the pruned model has $6 . 2 8 \\%$ of ASR and $8 6 . 6 5 \\%$ of ACC. As the pruning fraction increases, ASR falls significantly first and raises again after $1 0 \\%$ of neurons are pruned. This is because ANP has not yet separated them completely due to extremely limited computation (only 20 iterations). With more than 100 iterations, this phenomenon disappears. And ANP based on 100 iterations already has comparable performance to ANP on 2000 iterations, especially when we have not pruned too many neurons $( < 8 \\%$ ). ",
947
+ "bbox": [
948
+ 176,
949
+ 869,
950
+ 825,
951
+ 911
952
+ ],
953
+ "page_idx": 8
954
+ },
955
+ {
956
+ "type": "image",
957
+ "img_path": "images/93472c8a66980e364dd261efb96c5ac684e0055908acf754d698dfc147542165.jpg",
958
+ "image_caption": [
959
+ "Figure 4: Performance ( $\\pm$ std over 5 random runs) of the pruned model by a threshold 0.2 with different hyper-parameters (Left: trade-off coefficient $\\alpha$ ; Right: perturbation budget $\\dot { \\epsilon }$ ). "
960
+ ],
961
+ "image_footnote": [],
962
+ "bbox": [
963
+ 178,
964
+ 92,
965
+ 472,
966
+ 200
967
+ ],
968
+ "page_idx": 9
969
+ },
970
+ {
971
+ "type": "image",
972
+ "img_path": "images/b26378fa2b0246eadadac2f1c4a88e337567f18989a4f533b8eb7e774663c072.jpg",
973
+ "image_caption": [
974
+ "Figure 5: Performance ( $\\pm$ std over 5 random runs) of the proposed ANP with varying pruning fractions based on different numbers of iterations. "
975
+ ],
976
+ "image_footnote": [],
977
+ "bbox": [
978
+ 522,
979
+ 92,
980
+ 818,
981
+ 202
982
+ ],
983
+ "page_idx": 9
984
+ },
985
+ {
986
+ "type": "text",
987
+ "text": "",
988
+ "bbox": [
989
+ 174,
990
+ 304,
991
+ 825,
992
+ 415
993
+ ],
994
+ "page_idx": 9
995
+ },
996
+ {
997
+ "type": "text",
998
+ "text": "We also find that ANP with 2000 iterations should prune more $( + 1 \\% )$ neurons to degrade ASR than ones with fewer iterations. We conjecture this is because there also exist some sensitive neurons that are unrelated to the injected backdoor9, which are assigned with small masks at the late optimization stage. Besides, for ACC, we can see that more iterations maintain a higher ACC than fewer iterations, especially when more neurons are pruned, as the left neurons are almost the discriminant and robust ones. In conclusion, even with extremely small number of iterations (e.g., 20 iterations), ANP is able to distinguish the backdoor-related neurons from other neurons and obtains satisfactory robustness against backdoor attacks. ",
999
+ "bbox": [
1000
+ 174,
1001
+ 421,
1002
+ 825,
1003
+ 532
1004
+ ],
1005
+ "page_idx": 9
1006
+ },
1007
+ {
1008
+ "type": "text",
1009
+ "text": "5 Conclusion ",
1010
+ "text_level": 1,
1011
+ "bbox": [
1012
+ 174,
1013
+ 560,
1014
+ 299,
1015
+ 578
1016
+ ],
1017
+ "page_idx": 9
1018
+ },
1019
+ {
1020
+ "type": "text",
1021
+ "text": "In this paper, we identified a sensitivity of backdoored DNNs to adversarial neuron perturbations, which induces them to present backdoor behaviours even without the presence of the trigger patterns. Based on these findings, we proposed Adversarial Neuron Pruning (ANP) to prune the sensitive neurons under adversarial neuron perturbations. Comprehensive experiments show that ANP consistently removes the injected backdoor and provides the highest robustness against several state-of-the-art backdoor attacks even with a limited amount of clean data and computation resources. Finally, our work also reminds researchers that pruning (without fine-tuning) is still a promising defense against backdoor attacks. ",
1022
+ "bbox": [
1023
+ 174,
1024
+ 597,
1025
+ 826,
1026
+ 708
1027
+ ],
1028
+ "page_idx": 9
1029
+ },
1030
+ {
1031
+ "type": "text",
1032
+ "text": "Broader Impact ",
1033
+ "text_level": 1,
1034
+ "bbox": [
1035
+ 174,
1036
+ 737,
1037
+ 310,
1038
+ 755
1039
+ ],
1040
+ "page_idx": 9
1041
+ },
1042
+ {
1043
+ "type": "text",
1044
+ "text": "The backdoor attack has become a threat to outsourcing training and open-sourcing models. We propose ANP to improve the robustness against these backdoor attacks, which may help to build a more secure model even trained in an untrustworthy third-party platform. Further, we do not want this paper to bring overoptimism about AI safety to the society. Since the backdoor attack is only a part of potential risks ( e.g., adversarial attacks, privacy leakage, and model extraction), there is still a long way towards secure AI and trustworthy AI. ",
1045
+ "bbox": [
1046
+ 174,
1047
+ 775,
1048
+ 825,
1049
+ 858
1050
+ ],
1051
+ "page_idx": 9
1052
+ },
1053
+ {
1054
+ "type": "text",
1055
+ "text": "Acknowledgments ",
1056
+ "text_level": 1,
1057
+ "bbox": [
1058
+ 176,
1059
+ 89,
1060
+ 328,
1061
+ 106
1062
+ ],
1063
+ "page_idx": 10
1064
+ },
1065
+ {
1066
+ "type": "text",
1067
+ "text": "Yisen Wang is partially supported by the National Natural Science Foundation of China under Grant 62006153, and Project 2020BD006 supported by PKU-Baidu Fund. ",
1068
+ "bbox": [
1069
+ 174,
1070
+ 121,
1071
+ 823,
1072
+ 148
1073
+ ],
1074
+ "page_idx": 10
1075
+ },
1076
+ {
1077
+ "type": "text",
1078
+ "text": "References ",
1079
+ "text_level": 1,
1080
+ "bbox": [
1081
+ 174,
1082
+ 169,
1083
+ 266,
1084
+ 184
1085
+ ],
1086
+ "page_idx": 10
1087
+ },
1088
+ {
1089
+ "type": "text",
1090
+ "text": "[1] Mauro Barni, Kassem Kallas, and Benedetta Tondi. A new backdoor attack in cnns by training set corruption without label poisoning. In ICIP, 2019. \n[2] Battista Biggio, Blaine Nelson, and Pavel Laskov. Support vector machines under adversarial label noise. In ACML, 2011. \n[3] Battista Biggio, Igino Corona, Davide Maiorca, Blaine Nelson, Nedim Šrndic, Pavel Laskov, ´ Giorgio Giacinto, and Fabio Roli. Evasion attacks against machine learning at test time. In ECML/PKDD, 2013. \n[4] Eitan Borgnia, Valeriia Cherepanova, Liam Fowl, Amin Ghiasi, Jonas Geiping, Micah Goldblum, Tom Goldstein, and Arjun Gupta. Strong data augmentation sanitizes poisoning and backdoor attacks without an accuracy tradeoff. In ICASSP, 2021. \n[5] Huili Chen, Cheng Fu, Jishen Zhao, and Farinaz Koushanfar. Deepinspect: A black-box trojan detection and mitigation framework for deep neural networks. In IJCAI, 2019. \n[6] Xinyun Chen, Chang Liu, Bo Li, Kimberly Lu, and Dawn Song. Targeted backdoor attacks on deep learning systems using data poisoning. arXiv preprint arXiv:1712.05526, 2017. \n[7] Xinyun Chen, Wenxiao Wang, Chris Bender, Yiming Ding, Ruoxi Jia, Bo Li, and Dawn Song. Refit: a unified watermark removal framework for deep learning systems with limited data. arXiv preprint arXiv:1911.07205, 2019. \n[8] Ilias Diakonikolas, Gautam Kamath, Daniel Kane, Jerry Li, Jacob Steinhardt, and Alistair Stewart. Sever: A robust meta-algorithm for stochastic optimization. In ICML, 2019. \n[9] Chao Gao, Yuan Yao, and Weizhi Zhu. Generative adversarial nets for robust scatter estimation: A proper scoring rule perspective. Journal of Machine Learning Research, 21(160):1–48, 2020. \n[10] Yansong Gao, Change Xu, Derui Wang, Shiping Chen, Damith C Ranasinghe, and Surya Nepal. Strip: A defence against trojan attacks on deep neural networks. In ACSAC, 2019. \n[11] Amirata Ghorbani and James Zou. Neuron shapley: Discovering the responsible neurons. In NeurIPS, 2021. \n[12] Micah Goldblum, Dimitris Tsipras, Chulin Xie, Xinyun Chen, Avi Schwarzschild, Dawn Song, Aleksander Madry, Bo Li, and Tom Goldstein. Data security for machine learning: Data poisoning, backdoor attacks, and defenses. arXiv preprint arXiv:2012.10544, 2020. \n[13] Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In ICLR, 2015. \n[14] Tianyu Gu, Kang Liu, Brendan Dolan-Gavitt, and Siddharth Garg. Badnets: Evaluating backdooring attacks on deep neural networks. IEEE Access, 7:47230–47244, 2019. \n[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. \n[16] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. \n[17] Pang Wei Koh and Percy Liang. Understanding black-box predictions via influence functions. In ICML, 2017. \n[18] Pang Wei Koh, Jacob Steinhardt, and Percy Liang. Stronger data poisoning attacks break data sanitization defenses. arXiv preprint arXiv:1811.00741, 2018. \n[19] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical Report, University of Toronto, 2009. \n[20] Alexander Levine and Soheil Feizi. Deep partition aggregation: Provable defense against general poisoning attacks. arXiv preprint arXiv:2006.14768, 2020. \n[21] Alexander Levine and Soheil Feizi. Deep partition aggregation: Provable defense against general poisoning attacks. In ICLR, 2021. \n[22] Yige Li, Nodens Koren, Lingjuan Lyu, Xixiang Lyu, Bo Li, and Xingjun Ma. Neural attention distillation: Erasing backdoor triggers from deep neural networks. In ICLR, 2021. \n[23] Yige Li, Xixiang Lyu, Nodens Koren, Lingjuan Lyu, Bo Li, and Xingjun Ma. Anti-backdoor learning: Training clean models on poisoned data. In NeurIPS, 2021. \n[24] Kang Liu, Brendan Dolan-Gavitt, and Siddharth Garg. Fine-pruning: Defending against backdooring attacks on deep neural networks. In RAID, 2018. \n[25] Yingqi Liu, Shiqing Ma, Yousra Aafer, Wen-Chuan Lee, Juan Zhai, Weihang Wang, and Xiangyu Zhang. Trojaning attack on neural networks. In NDSS, 2018. \n[26] Yunfei Liu, Xingjun Ma, James Bailey, and Feng Lu. Reflection backdoor: A natural backdoor attack on deep neural networks. In ECCV, 2020. \n[27] Yuntao Liu, Yang Xie, and Ankur Srivastava. Neural trojans. In ICCD, 2017. \n[28] Shiqing Ma and Yingqi Liu. Nic: Detecting adversarial samples with neural network invariant checking. In NDSS, 2019. \n[29] Yuzhe Ma, Xiaojin Zhu Zhu, and Justin Hsu. Data poisoning against differentially-private learners: Attacks and defenses. In IJCAI, 2019. \n[30] Anh Nguyen and Anh Tran. Input-aware dynamic backdoor attack. In NeurIPS, 2020. \n[31] Anh Nguyen and Anh Tran. Wanet–imperceptible warping-based backdoor attack. In ICLR, 2021. \n[32] Ren Pang, Hua Shen, Xinyang Zhang, Shouling Ji, Yevgeniy Vorobeychik, Xiapu Luo, Alex Liu, and Ting Wang. A tale of evil twins: Adversarial inputs versus poisoned models. In CCS, 2020. \n[33] Ximing Qiao, Yukun Yang, and Hai Li. Defending neural backdoors via generative distribution modeling. In NeurIPS, 2019. \n[34] Elan Rosenfeld, Ezra Winston, Pradeep Ravikumar, and Zico Kolter. Certified robustness to label-flipping attacks via randomized smoothing. In ICML, 2020. \n[35] Ali Shafahi, W Ronny Huang, Mahyar Najibi, Octavian Suciu, Christoph Studer, Tudor Dumitras, and Tom Goldstein. Poison frogs! targeted clean-label poisoning attacks on neural networks. In NeurIPS, 2018. \n[36] David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016. \n[37] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. \n[38] Jacob Steinhardt, Pang Wei Koh, and Percy Liang. Certified defenses for data poisoning attacks. In NeurIPS, 2017. \n[39] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In ICLR, 2014. \n[40] Lue Tao, Lei Feng, Jinfeng Yi, Sheng-Jun Huang, and Songcan Chen. Better safe than sorry: Preventing delusive adversaries with adversarial training. In NeurIPS, 2021. \n[41] Brandon Tran, Jerry Li, and Aleksander Madry. Spectral signatures in backdoor attacks. In NeurIPS, 2018. \n[42] Alexander Turner, Dimitris Tsipras, and Aleksander Madry. Label-consistent backdoor attacks. arXiv preprint arXiv:1912.02771, 2019. \n[43] Bolun Wang, Yuanshun Yao, Shawn Shan, Huiying Li, Bimal Viswanath, Haitao Zheng, and Ben Y Zhao. Neural cleanse: Identifying and mitigating backdoor attacks in neural networks. In S&P, 2019. \n[44] Ren Wang, Gaoyuan Zhang, Sijia Liu, Pin-Yu Chen, Jinjun Xiong, and Meng Wang. Practical detection of trojan neural networks: Data-limited and data-free cases. In ECCV, 2020. \n[45] Yisen Wang, Xuejiao Deng, Songbai Pu, and Zhiheng Huang. Residual convolutional ctc networks for automatic speech recognition. arXiv preprint arXiv:1702.07793, 2017. \n[46] Maurice Weber, Xiaojun Xu, Bojan Karlas, Ce Zhang, and Bo Li. Rab: Provable robustness against backdoor attacks. arXiv preprint arXiv:2003.08904, 2020. \n[47] Dongxian Wu, Shu-Tao Xia, and Yisen Wang. Adversarial weight perturbation helps robust generalization. In NeurIPS, 2020. \n[48] Pu Zhao, Pin-Yu Chen, Payel Das, Karthikeyan Natesan Ramamurthy, and Xue Lin. Bridging mode connectivity in loss landscapes and adversarial robustness. In ICLR, 2019. \n[49] Haoti Zhong, Cong Liao, Anna Cinzia Squicciarini, Sencun Zhu, and David Miller. Backdoor embedding in convolutional neural network models via invisible perturbation. In CODASPY, 2020. \n[50] Liuwan Zhu, Rui Ning, Cong Wang, Chunsheng Xin, and Hongyi Wu. Gangsweep: Sweep out neural backdoors by gan. In MM, 2020. ",
1091
+ "bbox": [
1092
+ 174,
1093
+ 195,
1094
+ 828,
1095
+ 914
1096
+ ],
1097
+ "page_idx": 10
1098
+ },
1099
+ {
1100
+ "type": "text",
1101
+ "text": "",
1102
+ "bbox": [
1103
+ 171,
1104
+ 49,
1105
+ 830,
1106
+ 920
1107
+ ],
1108
+ "page_idx": 11
1109
+ },
1110
+ {
1111
+ "type": "text",
1112
+ "text": "",
1113
+ "bbox": [
1114
+ 171,
1115
+ 90,
1116
+ 828,
1117
+ 525
1118
+ ],
1119
+ "page_idx": 12
1120
+ }
1121
+ ]
parse/train/4cEapqXfP30/4cEapqXfP30_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/4cEapqXfP30/4cEapqXfP30_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1p461b0W/B1p461b0W.md ADDED
@@ -0,0 +1,216 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DEEP LEARNING IS ROBUST TOMASSIVE LABEL NOISE
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Deep neural networks trained on large supervised datasets have led to impressive results in recent years. However, since well-annotated datasets can be prohibitively expensive and time-consuming to collect, recent work has explored the use of larger but noisy datasets that can be more easily obtained. In this paper, we investigate the behavior of deep neural networks on training sets with massively noisy labels. We show on multiple datasets such as MINST, CIFAR-10 and ImageNet that successful learning is possible even with an essentially arbitrary amount of noise. For example, on MNIST we find that accuracy of above 90 percent is still attainable even when the dataset has been diluted with 100 noisy examples for each clean example. Such behavior holds across multiple patterns of label noise, even when noisy labels are biased towards confusing classes. Further, we show how the required dataset size for successful training increases with higher label noise. Finally, we present simple actionable techniques for improving learning in the regime of high label noise.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Deep learning has proven to be powerful for a wide range of problems, from image classification to machine translation. Typically, deep neural networks are trained using supervised learning on large, carefully annotated datasets. However, the need for such datasets restricts the space of problems that can be addressed. This has led to a proliferation of deep learning results on the same tasks using the same well-known datasets. Carefully annotated data is difficult to obtain, especially for classification tasks with large numbers of classes (requiring extensive annotation) or with fine-grained classes (requiring skilled annotation). Thus, annotation can be expensive and, for tasks requiring expert knowledge, may simply be unattainable at scale.
12
+
13
+ To address this limitation, other training paradigms have been investigated to alleviate the need for expensive annotations, such as unsupervised learning (Le, 2013), self-supervised learning (Pinto et al., 2016; Wang & Gupta, 2015) and learning from noisy annotations (Joulin et al., 2016; Natarajan et al., 2013; Veit et al., 2017). Very large datasets (e.g., Krasin et al. (2016); Thomee et al. (2016)) can often be attained, for example from web sources, with partial or unreliable annotation. This can allow neural networks to be trained on a much wider variety of tasks or classes and with less manual effort. The good performance obtained from these large noisy datasets indicates that deep learning approaches can tolerate modest amounts of noise in the training set.
14
+
15
+ In this work, we take this trend to an extreme, and consider the performance of deep neural networks under extremely low label reliability, only slightly above chance. We envision a future in which arbitrarily large amounts of data will easily be obtained, but in which labels come without any guarantee of validity and may merely be biased towards the correct distribution.
16
+
17
+ The key takeaways from this paper may be summarized as follows:
18
+
19
+ • Deep neural networks are able to learn from data that has been diluted by an arbitrary amount of noise. We demonstrate that standard deep neural networks still perform well even on training sets in which label accuracy is as low as 1 percent above chance. On MNIST, for example, performance still exceeds 90 percent even with this level of label noise (see Figure 1). This behavior holds, to varying extents, across datasets as well as patterns of label noise, including when noisy labels are biased towards confused classes.
20
+
21
+ • A sufficiently large training set can accommodate a wide range of noise levels. We find that the minimum dataset size required for effective training increases with the noise level. A large enough training set can accommodate a wide range of noise levels. Increasing the dataset size further, however, does not appreciably increase accuracy.
22
+
23
+ • Adjusting batch size and learning rate can allow conventional neural networks to operate in the regime of very high label noise. We find that label noise reduces the effective batch size, as noisy labels roughly cancel out and only a small learning signal remains. We show that dataset noise can be partly compensated for by larger batch sizes and by scaling the learning rate with the effective batch size.
24
+
25
+ # 2 RELATED WORK
26
+
27
+ Learning from noisy data. Several studies have investigated the impact of noisy datasets on machine classifiers. Approaches to learn from noisy data can generally be categorized into two groups: In the first group, approaches aim to learn directly from noisy labels and focus on noise-robust algorithms, e.g., Beigman & Klebanov (2009); Guan et al. (2017); Joulin et al. (2016); Krause et al. (2016); Manwani & Sastry (2013); Misra et al. (2016); Van Horn et al. (2015). The second group comprises mostly label-cleansing methods that aim to remove or correct mislabeled data, e.g., Brodley & Friedl (1999). Methods in this group frequently face the challenge of disambiguating between mislabeled and hard training examples. To address this challenge, they often use semi-supervised approaches by combining noisy data with a small set of clean labels (Zhu, 2005). Some approaches model the label noise as conditionally independent from the input image (Natarajan et al., 2013; Sukhbaatar et al., 2014) and some propose image-conditional noise models (Veit et al., 2017; Xiao et al., 2015). Our work differs from these approaches in that we do not aim to clean the training dataset or propose new noise-robust training algorithms. Instead, we study the behavior of standard neural network training procedures in settings with massive label noise. We show that even without explicit cleaning or noise-robust algorithms, neural networks can learn from data that has been diluted by an arbitrary amount of label noise.
28
+
29
+ Analyzing the robustness of neural networks. Several investigative studies aim to improve our understanding of convolutional neural networks. One particular stream of research in this space seeks to investigate neural networks by analyzing their robustness. For example, Veit et al. (2016) show that network architectures with residual connections have a high redundancy in terms of parameters and are robust to the deletion of multiple complete layers during test time. Further, Szegedy et al. (2014) investigate the robustness of neural networks to adversarial examples. They show that even for fully trained networks, small changes in the input can lead to large changes in the output and thus misclassification. In contrast, we are focusing on non-adversarial noise during training time. Within this stream of research, closest to our work are studies that focus on the impact of noisy training datasets on classification performance (e.g., Sukhbaatar et al. (2014); Van Horn et al. (2015); Zhang et al. (2017)). In these studies an increase in noise is assumed to decrease not only the proportion of correct examples, but also their absolute number. In contrast to these studies, we separate the effects and show in $\ S 4$ that a decrease in the number of correct examples is more destructive to learning than an increase in the number of noisy labels.
30
+
31
+ # 3 LEARNING WITH MASSIVE LABEL NOISE
32
+
33
+ In this work, we are concerned with scenarios of abundant data of very poor label quality, i.e., the regime in which falsely labeled training examples vastly outnumber correctly labeled examples. In particular, our experiments involve observing the performance of deep neural networks on multiclass classification tasks as label noise is increased.
34
+
35
+ To formalize the problem, we denote the number of original training examples by $n$ . To model the amount of noise, we dilute the dataset by adding $\alpha$ noisy examples to the training set for each original training example. Thus, the total number of noisy labels in the training set is αn. Note that by varying the noise level $\alpha$ , we do not change the available number of original examples. Thus, even in the presence of high noise, there is still appreciable data to learn from, if we are able to pick it out. This is in contrast to previous work (e.g., Sukhbaatar et al. (2014); Van Horn et al. (2015); Zhang et al. (2017)), in which an increase in noise also implies a decrease in the absolute number of correct examples. In the following experiments we investigate three different types of noise: uniform label-swapping, structured label-swapping, and out-of-vocabulary examples.
36
+
37
+ ![](images/f9c133111a2234ff5fd59247babd2c15f1298502c70a3f8cfbe2d33f50745d89.jpg)
38
+
39
+ ![](images/78e2b59393d4882edaaed93c66ab902845a045efd4a4cb2301e175d57533b2b3.jpg)
40
+ Figure 1: Performance on Figure 2: Performance on MNIST as different amounts of CIFAR-10 as different amounts noisy labels are added to a fixed of noisy labels are added to a training set of clean labels. We fixed training set of clean lacompare a perceptron, MLPs bels. We tested ConvNets with with 1, 2, and 4 hidden layers, 4 and 6 layers, and a ResNet and a 4-layer ConvNet. Even with 101 layers. Even with 10 with 100 noisy labels for every noisy labels for every clean laclean label the ConvNet still at- bel the ResNet still attains a pertains a performance of $91 \%$ . formance of $85 \%$ .
41
+
42
+ ![](images/9dd4bc5738563f214ee2d67f43b7bac997d30529a5f2edbe58cc0bbdca6ce3f7.jpg)
43
+ Figure 3: Performance on ImageNet as different amounts of noisy labels are added to a fixed training set of clean labels. Even with 5 noisy labels for every clean label, the 18- layer ResNet still attains a performance of $70 \%$ .
44
+
45
+ A key assumption in this paper is that unreliable labels are better modeled by an unknown stochastic process rather than by the output of an adversary. This is a natural assumption for data that is pulled from the environment, in which antagonism is not to be expected in the noisy annotation process. Deep neural networks have been shown to be exceedingly brittle to adversarial noise patterns (Szegedy et al., 2014). In this work, we demonstrate that even massive amounts of non-adversarial noise present far less of an impediment to learning.
46
+
47
+ # 3.1 EXPERIMENT 1: TRAINING WITH UNIFORM LABEL NOISE
48
+
49
+ As a first experiment, we will show that common training procedures for neural networks are resilient even to settings where correct labels are outnumbered by labels sampled uniformly at random at a ratio of 100 to 1. For this experiment we focus on the task of image classification and work with three commonly used datasets, MNIST (LeCun et al., 1998), CIFAR-10 (Krizhevsky & Hinton, 2009) and ImageNet (Deng et al., 2009).
50
+
51
+ In Figures 1 and 2 we show the classification performance with varying levels of label noise. For MNIST, we vary the ratio $\alpha$ of randomly labeled examples to cleanly labeled examples from 0 (no noise) to 100 (only 11 out of 101 labels are correct, as compared with 10.1 for pure chance). For the more challenging dataset CIFAR-10, we vary $\alpha$ from 0 to 10. For the most challenging dataset ImageNet, we let $\alpha$ range from 0 to 5. We compare various architectures of neural networks: multilayer perceptrons with different numbers of hidden layers, convolutional networks (ConvNets) with different numbers of convolutional layers, and residual networks (ResNets) with different numbers of layers (He et al., 2016). We evaluate performance after training on a test dataset that is free from noisy labels. Full details of our experimental setup are provided in $\ S 3 . 4$ .
52
+
53
+ Our results show that, remarkably, it is possible to attain over 90 percent accuracy on MNIST, even when there are 100 randomly labeled images for every cleanly labeled example, to attain over 85 percent accuracy on CIFAR-10 with 10 random labels for every clean label, and to attain over 70 percent top-5 accuracy on ImageNet with 5 random labels for every clean label. Thus, in this highnoise regime, deep networks are able not merely to perform above chance, but to attain accuracies that would be respectable even without noise.
54
+
55
+ Further, we observe from Figures 1 and 2 that larger neural network architectures tend also to be more robust to label noise. On MNIST, the performance of a perceptron decays rapidly with increasing noise (though it still attains 40 percent accuracy, well above chance, at $\alpha = 1 0 0$ ). The performance of a multilayer perceptron drops off more slowly, and the ConvNet is even more robust. Likewise, for CIFAR-10, the accuracy of the residual network drops more slowly than that of the smaller ConvNets. This observation provides further support for the effectiveness of ConvNets and ResNets in particular for applications where noise tolerance may be important.
56
+
57
+ ![](images/a40a9a284ee6fd7dda9b80e4d4f3fca2f337a8782ed7c386d90983f93f7e6a09.jpg)
58
+ Figure 4: Illustration of uniform and structured noise models. In the case of structured noise, the order of false labels is important; we tested decreasing order of confusion, increasing order of confusion, and random order. The parameter $\delta$ parameterizes the degree of structure in the noise. It defines how much more likely the second most likely class is over chance.
59
+
60
+ # 3.2 EXPERIMENT 2: TRAINING WITH STRUCTURED LABEL NOISE
61
+
62
+ We have seen that neural networks are extremely robust to uniform label noise. However, label noise in datasets gathered from a natural environment is unlikely to follow a perfectly uniform distribution. In this experiment, we investigate the effects of various forms of structured noise on the performance of neural networks. Figure 4 illustrates the procedure used to model noise structure.
63
+
64
+ In the uniform noise setting, as illustrated on the left side of Figure 4, correct labels are more likely than any individual false label. However, overall false labels vastly outnumber correct labels. We denote the likelihood over chance for a label to be correct as $\epsilon$ . Note that $\epsilon = 1 / ( 1 + \alpha )$ , where $\alpha$ is the ratio of noisy labels to certainly correct labels. To induce structure in the noise, we bias noisy labels to certain classes. We introduce the parameter $\delta$ to parameterize the degree of structure in the noise. It defines how much more likely the second most likely class is over chance. With $\delta = 0$ the noise is uniform, whereas for $\delta = 1$ the second most likely class is equally likely as the correct class. The likelihood for the remaining classes is scaled linearly, as illustrated in Figure 4 on the right. We investigate three different setups for structured noise: labels biased towards easily confused classes, towards hardly confused classes and towards random classes.
65
+
66
+ Figure 5 shows the results on MNIST for the three different types of structured noise, as $\delta$ varies from 0 to 1. In this experiment, we train 4-layer ConvNets on a dataset that is diluted with 20 noisy labels for each clean label. We vary the order of false labels so that, besides the correct class, labels are assigned most frequently to (1) those most often confused with the correct class, (2) those least often confused with it, and (3) in a random order. We determine commonly confused labels by training the network repeatedly on a small subset of MNIST and observing the errors it makes on a test set.
67
+
68
+ The results show that deep neural nets are robust even to structured noise, as long as the correct label remains the most likely by at least a small margin. Generally, we do not observe large differences between the different models of noise structure, only that bias towards random classes seems to hurt the performance a little more than bias towards confused classes. This result might help explain why we often observe quite good results from real world noisy datasets, where label noise is more likely to be biased towards related and confusing classes.
69
+
70
+ # 3.3 EXPERIMENT 3: SOURCE OF NOISY LABELS
71
+
72
+ In the preceding experiments, we diluted the training sets with noisy examples drawn from the same dataset; i.e., falsely labeled examples were images from within other categories of the dataset. In natural scenarios, however, noisy examples likely also include categories not included in the dataset that have erroneously been assigned labels within the dataset.
73
+
74
+ ![](images/39e1b367b8f1cfe0c62387b7a9f5848b19b58283aacd07d334c5f26174a4d483.jpg)
75
+ Figure 5: Performance on MNIST with fixed $\alpha = 2 0$ noisy labels per clean label. Noise is drawn from three types of structured distribution: (1) “confusing order” (highest probability for the most confusing label), (2) “reverse confusing order”, and (3) random order. We interpolate between uniform noise, $\delta = 0$ , and noise so highly skewed that the most common false label is as likely as the correct label, $\delta \ = \ 1$ Except for $\delta \approx 1$ , performance is similar to uniform noise.
76
+ Figure 6: Performance on CIFAR-10 for varying amounts of noisy labels. Noisy training examples are drawn from (1) CIFAR-10 itself, but mislabeled uniformly at random, (2) CIFAR100, with uniformly random labels, and (3) white noise with mean and variance chosen to match those of CIFAR-10. Noise drawn from CIFAR-100 resulted in only half the drop in performance observed with noise from CIFAR-10 itself, while white noise examples did not appreciable affect performance.
77
+
78
+ Thus, we now consider two alternative sources for noisy training examples. First, we dilute the training set with examples that are drawn from a similar but different dataset. In particular, we use CIFAR-10 as our training dataset and dilute it with examples from CIFAR-100, assigning each image a category from CIFAR-10 at random. Second, we also consider a dilution of the training set with “examples” that are simply white noise; in this case, we match the mean and variance of pixels within CIFAR-10 and again assign labels uniformly at random.
79
+
80
+ Figure 6 shows the results obtained by a six-layer ConvNet on the different noise sources for varying levels of noise. We observe that both alternative sources of noise lead to better performance than the noise originating from the same dataset. For noisy examples drawn from CIFAR-100, performance drops only about half as much as when noise originates from CIFAR-10 itself. This trend is consistent across noise levels. For white noise, performance does not drop regardless of noise level; this is in line with prior work that has shown that neural networks are able to fit random input (Zhang et al., 2017). This indicates the scenarios considered in Experiments 1 and 2 represent in some sense a worst case.
81
+
82
+ In natural scenarios, we may expect massively noisy datasets to fall somewhere in between the cases exemplified by CIFAR-10 and CIFAR-100. That is, some examples will be relevant but mislabeled. However, it is likely that many examples will not be from any classes under consideration and therefore will influence training less negatively. In fact, it is possible that such examples might increase accuracy, if the erroneous labels reflect underlying similarity between the examples in question.
83
+
84
+ # 3.4 EXPERIMENTAL SETUP
85
+
86
+ All models are trained with AdaDelta (Zeiler, 2012) as optimizer and a batch size of 128. For each level of label noise we train separate models with different learning rates ranging from 0.01 to 1 and pick the learning rate that results in the best performance. Generally, we observe that the higher the label noise, the lower the optimal learning rate. We investigate this trend in detail in §5.
87
+
88
+ ![](images/c21857a56a07b66737e2dc89fac883ddfa7637fbd412b8852778adb42a2d2904.jpg)
89
+ Figure 7: Comparison of the effect of reusing images vs. using novel images as noisy examples. Essentially no difference is observed between the two types of noisy examples, supporting the use of repeated examples in our experiments.
90
+
91
+ ![](images/188024bc06883009c65ceb60641d43e949b8968342b6ec41f0de7af7dee4a316.jpg)
92
+ Figure 8: Performance on MNIST at various noise levels, as a function of the number of clean labels. There seems to be a critical amount of clean training data required to successfully train the networks. This threshold increases as the noise level rises. For example, at $\alpha = 1 0$ , 2,000 clean labels are needed to attain $90 \%$ performance, while at $\alpha = 5 0$ , 10,000 clean labels are needed.
93
+
94
+ In Experiments 1 and 2, noisy labels are drawn from the same dataset as the labels guaranteed to be correct. This involves drawing the same example many times from the dataset, giving it the correct label once, and in every other instance picking a random label according to the noise distribution in question. We show in Figure 7 that performance would have been comparable had we been able to draw noisy labels from an extended dataset, instead of repeating images. Specifically, we train a convolutional network on a subset of MNIST, with 2,500 certainly correct labels and with noisy labels drawn either with repetition from this set of 2,500 or without repetition from the remaining examples in the MNIST dataset. The results are essentially identical between repeated and unique examples, supporting our setup in the preceding experiments.
95
+
96
+ # 4 THE IMPORTANCE OF LARGER DATASETS
97
+
98
+ Underlying the ability of deep networks to learn from massively noisy data is the size of the data in question. It is well-established, see e.g., Deng et al. (2009), that traditional deep learning relies upon large datasets. We will now see how this is particularly true of noisy datasets.
99
+
100
+ In Figure 8, we compare the performance of a ConvNet on MNIST as the size of the training set varies. We also show the performance of the same ConvNet trained on MNIST diluted with noisy labels sampled uniformly. We show how the performance of the ConvNet varies with the number of cleanly labeled training examples. For example, for the blue curve of $\alpha = 1 0$ and 1,000 clean labels, the network is trained on 11,000 examples: 1,000 cleanly labeled examples and 10,000 with random labels.
101
+
102
+ Generally, we observe that independent of the noise level the networks benefit from more data and that, given sufficient data, the networks reach similar results. Further, the results indicate that there seems to be a critical amount of clean training data that is required to successfully train the networks. This critical amount of clean data depends on the noise level; in particular, it increases as the noise level rises. Since performance rapidly levels off past the critical threshold the main requirement for the clean training set is to be of sufficient size.
103
+
104
+ It is because of the critical amount of required clean data that we have not attempted to train networks for $\alpha \gg 1 0 0$ . The number of correct examples needed to train such a network might rise above the 60,000 provided in the MNIST dataset. In a real-world dataset, the amount of (noisy) data available for training is likely not to be the limiting factor. Rather, considerations such as training time and learning rate may play a more important role, as we discuss in the following section.
105
+
106
+ ![](images/a1590b2c0e7c28dcefe6239ed9d9264e2b853c999e75f71c9ce77e8aabbae055.jpg)
107
+ Figure 9: Performance on MNIST for varying batch size as a function of noise level. Higher batch size gives better performance. We approximate the limit of infinite batch size by training without noisy labels, but using the noisy loss function $H _ { \alpha }$ .
108
+
109
+ ![](images/75e753a6581173fda8d01a6a18351eca675a2a2366feea4d91de9c2fc98173fe.jpg)
110
+ Figure 10: Performance on CIFAR-10 for varying learning rate as a function of noise level. Lower learning rates are generally optimal as the noise level increases.
111
+
112
+ # 5 TRAINING ON NOISY DATASETS
113
+
114
+ In the preceding sections, our results were obtained by training neural networks with fixed batch size and running a parameter search to pick the optimal learning rate. We now look in more detail into how the choice of hyperparameters affects learning on noisy datasets.
115
+
116
+ # 5.1 BATCH SIZE
117
+
118
+ First, we investigate the effect of the batch size on the noise robustness of neural network training. In Figure 9, we compare the performance of a simple 2-layer ConvNet on MNIST with increasing noise, as batch size varies from 32 to 256. We observe that increasing the batch size provides greater robustness to noisy labels. One reason for this behavior could be that, within a batch, gradient updates from randomly sampled noisy labels cancel out, while gradients from correct examples that are marginally more frequent sum together and contribute to learning. By this logic, large batch sizes would be more robust to noise since the mean gradient over a larger batch is closer to the gradient for correct labels. All other experiments in this paper are performed with a fixed batch size of 128.
119
+
120
+ We may also consider the theoretical case of infinite batch size, in which gradients are averaged over the entire space of possible inputs at each training step. While this is often impossible to perform in practice, we can simulate such behavior by an auxiliary loss function.
121
+
122
+ In classification tasks, we are given an input $\mathbf { x }$ and aim to predict the class $f ( \mathbf { x } ) \in \{ 1 , 2 , \dots , m \}$ . The value $f ( \mathbf { x } )$ is encoded within a neural network by the 1-hot vector $\mathbf { y } ( \mathbf { x } )$ such that
123
+
124
+ $$
125
+ y _ { k } ( \mathbf x ) = { \left\{ \begin{array} { l l } { 1 } & { { \mathrm { ~ i f ~ } } k = f ( \mathbf x ) } \\ { 0 } & { { \mathrm { ~ o t h e r w i s e ~ } } } \end{array} \right. }
126
+ $$
127
+
128
+ for $1 \leq k \leq m$ . Then, the standard cross-entropy loss over a batch $X$ is given by:
129
+
130
+ $$
131
+ H ( X ) = - \langle \log \hat { y } _ { f ( \mathbf { x } ) } \rangle _ { X } ,
132
+ $$
133
+
134
+ where $\hat { \mathbf { y } }$ is the predicted vector and $\langle \cdot \rangle _ { X }$ denotes the expected value over the batch $X$ . We assume that $\hat { \mathbf { y } }$ is normalized (e.g. by the softmax function) so that the entries sum to 1.
135
+
136
+ For a training set with noisy labels, we may consider the label $f ( \mathbf { x } )$ given in the training set to be merely an approximation to the true label $f _ { 0 } ( x )$ . Consider the case of $n$ training examples, and $\alpha n$ noisy labels that are sampled uniformly at random from the set $\{ 1 , 2 , \ldots , m \}$ . Then, $f ( \mathbf { x } ) = f _ { 0 } ( \mathbf { x } )$ with probability $\frac { 1 } { 1 + \alpha }$ , and otherwise it is $1 , 2 , \ldots , m$ , each with probability $\frac { \alpha } { m ( 1 + \alpha ) }$ . As batch size increases, the expected value over the batch $X$ is approximated more closely by these probabilities. In the limit of infinite batch size, equation (2) takes the form of a noisy loss function $H _ { \alpha }$ :
137
+
138
+ $$
139
+ \begin{array} { l } { { \displaystyle { \cal H } _ { \alpha } ( X ) : = - \frac { 1 } { 1 + \alpha } \langle \log \hat { y } _ { f _ { 0 } ( { \bf x } ) } \rangle _ { X } - \frac { \alpha } { m ( 1 + \alpha ) } \sum _ { k = 1 } ^ { m } \langle \log \hat { y } _ { k } \rangle _ { X } } } \\ { { \displaystyle \propto - \langle \log \hat { y } _ { f _ { 0 } ( { \bf x } ) } \rangle _ { X } - \alpha \left. \log \prod _ { k = 1 } ^ { m } \hat { y } _ { k } ^ { 1 / m } \right. _ { X } } } \end{array}
140
+ $$
141
+
142
+ We can therefore compare training using the cross-entropy loss with $\alpha n$ noisy labels to training using the noisy loss function $H _ { \alpha }$ without noisy labels. The term on the right-hand side of (3) represents the noise contribution, and is clearly minimized where $\hat { y } _ { k }$ are all equal. As $\alpha$ increases, this contribution is weighted more heavily against $- \left. \log \hat { y } _ { f _ { 0 } ( \mathbf { x } ) } \right. _ { X }$ , which is minimized at $\hat { \mathbf { y } } ( \mathbf x ) = \mathbf { y } ( \mathbf x )$ .
143
+
144
+ We show in Figure 9 the results of training our 2-layer ConvNet on MNIST with the noisy loss function $H _ { \alpha }$ , simulating $\alpha n$ noisy labels with infinite batch size. We can observe that the network’s accuracy does not decrease as $\alpha$ increases. This can be explained by the observation that an increasing $\alpha$ is merely decreasing the magnitude of the true gradient, rather than altering its direction.
145
+
146
+ Our observations indicate that increasing noise in the training set reduces the effective batch size, as noisy signals roughly cancel out and only small learning signal remains. We show that increasing the batch size is a simple practical means to mitigate the effect of noisy training labels.
147
+
148
+ # 5.2 LEARNING RATE
149
+
150
+ It has become common practice in training deep neural networks to scale the learning rate with the batch size. In particular, it has been shown that the smaller the batch size, the lower the optimal learning rate (Krizhevsky, 2014). In our experiments, we have observed that noisy labels reduce the effective batch size. As such, we would expect that lower learning rates perform better than large learning rates as noise increases. Figure 10 shows the performance of a 4-layer ConvNet trained with different learning rates on CIFAR-10 for varying label noise. As expected, we observe that the optimal learning rate decreases as noise increases. For example, the optimal learning rate for the clean dataset is 1, while, with the introduction of noise, this learning rate becomes unstable.
151
+
152
+ To sum up, we observe that increasing label noise reduces the effective batch size. We have shown that the effect of label noise can be partly counterbalanced for by a larger training batch size. Now, we see that one can additionally scale the learning rate to compensate for any remaining change in effective batch size induced by noisy labels.
153
+
154
+ # 6 CONCLUSION
155
+
156
+ In this paper, we have considered the behavior of deep neural networks on training sets with very noisy labels. In a series of experiments, we have demonstrated that learning is robust to an essentially arbitrary amount of label noise, provided that the number of clean labels is sufficiently large. We have further shown that the threshold required for clean labels increases as the noise level does. Finally, we have observed that noisy labels reduce the effective batch size, an effect that can be mitigated by larger batch sizes and downscaling the learning rate.
157
+
158
+ It is worthy of note that although deep networks appear robust to even high degrees of label noise, clean labels still always perform better than noisy labels, given the same quantity of training data. Further, one still requires expert-vetted test sets for evaluation. Lastly, it is important to reiterate that our studies focus on non-adversarial noise.
159
+
160
+ Our work suggests numerous directions for future investigation. For example, we are interested in how label-cleaning and semi-supervised methods affect the performance of networks in a high-noise regime. Are such approaches able to lower the threshold for training set size? Finally, it remains to translate the results we present into an actionable trade-off between data annotation and acquisition costs, which can be utilized in real world training pipelines for deep networks on massive noisy data.
161
+
162
+ # REFERENCES
163
+
164
+ Eyal Beigman and Beata Beigman Klebanov. Learning with annotation noise. In Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP. Association for Computational Linguistics, 2009.
165
+
166
+ Carla E Brodley and Mark A Friedl. Identifying mislabeled training data. Journal of artificial intelligence research (JAIR), 11:131–167, 1999.
167
+
168
+ Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, (CVPR), 2009.
169
+
170
+ Melody Y Guan, Varun Gulshan, Andrew M Dai, and Geoffrey E Hinton. Who said what: Modeling individual labelers improves classification. arXiv:1703.08774, 2017.
171
+
172
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Computer Vision and Pattern Recognition, (CVPR), 2016.
173
+
174
+ Armand Joulin, Laurens van der Maaten, Allan Jabri, and Nicolas Vasilache. Learning visual features from large weakly supervised data. In European Conference on Computer Vision, (ECCV). Springer, 2016.
175
+
176
+ I Krasin, T Duerig, N Alldrin, A Veit, S Abu-El-Haija, S Belongie, D Cai, Z Feng, V Ferrari, V Gomes, et al. Openimages: A public dataset for large-scale multi-label and multiclass image classification. Dataset available from https://github. com/openimages, 2(6):7, 2016.
177
+
178
+ Jonathan Krause, Benjamin Sapp, Andrew Howard, Howard Zhou, Alexander Toshev, Tom Duerig, James Philbin, and Li Fei-Fei. The unreasonable effectiveness of noisy data for fine-grained recognition. In European Conference on Computer Vision, (ECCV). Springer, 2016.
179
+
180
+ Alex Krizhevsky. One weird trick for parallelizing convolutional neural networks. arXiv preprint arXiv:1404.5997, 2014.
181
+
182
+ Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images, 2009.
183
+
184
+ Quoc V Le. Building high-level features using large scale unsupervised learning. In International Conference on Acoustics, Speech and Signal Processing, (ICASSP). IEEE, 2013.
185
+
186
+ Yann LeCun, Corinna Cortes, and Christopher JC Burges. The MNIST database of handwritten digits, 1998.
187
+
188
+ Naresh Manwani and PS Sastry. Noise tolerance under risk minimization. IEEE Transactions on cybernetics, 43(3):1146–1151, 2013.
189
+
190
+ Ishan Misra, C Lawrence Zitnick, Margaret Mitchell, and Ross Girshick. Seeing through the human reporting bias: Visual classifiers from noisy human-centric labels. In Computer Vision and Pattern Recognition, (CVPR), 2016.
191
+
192
+ Nagarajan Natarajan, Inderjit S Dhillon, Pradeep K Ravikumar, and Ambuj Tewari. Learning with noisy labels. In Advances in neural information processing systems, (NIPS), 2013.
193
+
194
+ Lerrel Pinto, Dhiraj Gandhi, Yuanfeng Han, Yong-Lae Park, and Abhinav Gupta. The curious robot: Learning visual representations via physical interactions. In European Conference on Computer Vision, (ECCV). Springer, 2016.
195
+
196
+ Sainbayar Sukhbaatar, Joan Bruna, Manohar Paluri, Lubomir Bourdev, and Rob Fergus. Training convolutional networks with noisy labels. arXiv preprint arXiv:1406.2080, 2014.
197
+
198
+ Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In International Conference on Learning Representations, (ICLR), 2014.
199
+
200
+ Bart Thomee, David A Shamma, Gerald Friedland, Benjamin Elizalde, Karl Ni, Douglas Poland, Damian Borth, and Li-Jia Li. YFCC100M: The new data in multimedia research. Communications of the ACM, 59(2):64–73, 2016.
201
+
202
+ Grant Van Horn, Steve Branson, Ryan Farrell, Scott Haber, Jessie Barry, Panos Ipeirotis, Pietro Perona, and Serge Belongie. Building a bird recognition app and large scale dataset with citizen scientists: The fine print in fine-grained dataset collection. In Computer Vision and Pattern Recognition, (CVPR), 2015.
203
+
204
+ Andreas Veit, Michael Wilber, and Serge Belongie. Residual networks behave like ensembles of relatively shallow networks. In Neural Information Processing Systems, (NIPS), 2016.
205
+
206
+ Andreas Veit, Neil Alldrin, Gal Chechik, Ivan Krasin, Abhinav Gupta, and Serge Belongie. Learning from noisy large-scale datasets with minimal supervision. In Computer Vision and Pattern Recognition, (CVPR), 2017. URL https://vision.cornell.edu/se3/ wp-content/uploads/2017/04/DeepLabelCleaning_CVPR.pdf.
207
+
208
+ Xiaolong Wang and Abhinav Gupta. Unsupervised learning of visual representations using videos. In International Conference on Computer Vision, (ICCV), 2015.
209
+
210
+ Tong Xiao, Tian Xia, Yi Yang, Chang Huang, and Xiaogang Wang. Learning from massive noisy labeled data for image classification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 2691–2699, 2015.
211
+
212
+ Matthew D Zeiler. Adadelta: an adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012.
213
+
214
+ Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. In International Conference on Learning Representations, (ICLR), 2017.
215
+
216
+ Xiaojin Zhu. Semi-supervised learning literature survey. Computer Science, University of Wisconsin-Madison, 2(3):4, 2005.
parse/train/B1p461b0W/B1p461b0W_content_list.json ADDED
@@ -0,0 +1,1224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "DEEP LEARNING IS ROBUST TOMASSIVE LABEL NOISE",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 99,
9
+ 553,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 184,
19
+ 170,
20
+ 398,
21
+ 198
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 234,
32
+ 544,
33
+ 251
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Deep neural networks trained on large supervised datasets have led to impressive results in recent years. However, since well-annotated datasets can be prohibitively expensive and time-consuming to collect, recent work has explored the use of larger but noisy datasets that can be more easily obtained. In this paper, we investigate the behavior of deep neural networks on training sets with massively noisy labels. We show on multiple datasets such as MINST, CIFAR-10 and ImageNet that successful learning is possible even with an essentially arbitrary amount of noise. For example, on MNIST we find that accuracy of above 90 percent is still attainable even when the dataset has been diluted with 100 noisy examples for each clean example. Such behavior holds across multiple patterns of label noise, even when noisy labels are biased towards confusing classes. Further, we show how the required dataset size for successful training increases with higher label noise. Finally, we present simple actionable techniques for improving learning in the regime of high label noise. ",
40
+ "bbox": [
41
+ 233,
42
+ 265,
43
+ 764,
44
+ 459
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 484,
55
+ 336,
56
+ 500
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Deep learning has proven to be powerful for a wide range of problems, from image classification to machine translation. Typically, deep neural networks are trained using supervised learning on large, carefully annotated datasets. However, the need for such datasets restricts the space of problems that can be addressed. This has led to a proliferation of deep learning results on the same tasks using the same well-known datasets. Carefully annotated data is difficult to obtain, especially for classification tasks with large numbers of classes (requiring extensive annotation) or with fine-grained classes (requiring skilled annotation). Thus, annotation can be expensive and, for tasks requiring expert knowledge, may simply be unattainable at scale. ",
63
+ "bbox": [
64
+ 174,
65
+ 515,
66
+ 825,
67
+ 626
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "To address this limitation, other training paradigms have been investigated to alleviate the need for expensive annotations, such as unsupervised learning (Le, 2013), self-supervised learning (Pinto et al., 2016; Wang & Gupta, 2015) and learning from noisy annotations (Joulin et al., 2016; Natarajan et al., 2013; Veit et al., 2017). Very large datasets (e.g., Krasin et al. (2016); Thomee et al. (2016)) can often be attained, for example from web sources, with partial or unreliable annotation. This can allow neural networks to be trained on a much wider variety of tasks or classes and with less manual effort. The good performance obtained from these large noisy datasets indicates that deep learning approaches can tolerate modest amounts of noise in the training set. ",
74
+ "bbox": [
75
+ 174,
76
+ 633,
77
+ 825,
78
+ 744
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "In this work, we take this trend to an extreme, and consider the performance of deep neural networks under extremely low label reliability, only slightly above chance. We envision a future in which arbitrarily large amounts of data will easily be obtained, but in which labels come without any guarantee of validity and may merely be biased towards the correct distribution. ",
85
+ "bbox": [
86
+ 174,
87
+ 752,
88
+ 823,
89
+ 808
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "The key takeaways from this paper may be summarized as follows: ",
96
+ "bbox": [
97
+ 174,
98
+ 814,
99
+ 612,
100
+ 829
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "• Deep neural networks are able to learn from data that has been diluted by an arbitrary amount of noise. We demonstrate that standard deep neural networks still perform well even on training sets in which label accuracy is as low as 1 percent above chance. On MNIST, for example, performance still exceeds 90 percent even with this level of label noise (see Figure 1). This behavior holds, to varying extents, across datasets as well as patterns of label noise, including when noisy labels are biased towards confused classes. ",
107
+ "bbox": [
108
+ 217,
109
+ 840,
110
+ 823,
111
+ 922
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "• A sufficiently large training set can accommodate a wide range of noise levels. We find that the minimum dataset size required for effective training increases with the noise level. A large enough training set can accommodate a wide range of noise levels. Increasing the dataset size further, however, does not appreciably increase accuracy. ",
118
+ "bbox": [
119
+ 215,
120
+ 103,
121
+ 825,
122
+ 159
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "• Adjusting batch size and learning rate can allow conventional neural networks to operate in the regime of very high label noise. We find that label noise reduces the effective batch size, as noisy labels roughly cancel out and only a small learning signal remains. We show that dataset noise can be partly compensated for by larger batch sizes and by scaling the learning rate with the effective batch size. ",
129
+ "bbox": [
130
+ 217,
131
+ 165,
132
+ 825,
133
+ 234
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "2 RELATED WORK ",
140
+ "text_level": 1,
141
+ "bbox": [
142
+ 176,
143
+ 255,
144
+ 344,
145
+ 271
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "Learning from noisy data. Several studies have investigated the impact of noisy datasets on machine classifiers. Approaches to learn from noisy data can generally be categorized into two groups: In the first group, approaches aim to learn directly from noisy labels and focus on noise-robust algorithms, e.g., Beigman & Klebanov (2009); Guan et al. (2017); Joulin et al. (2016); Krause et al. (2016); Manwani & Sastry (2013); Misra et al. (2016); Van Horn et al. (2015). The second group comprises mostly label-cleansing methods that aim to remove or correct mislabeled data, e.g., Brodley & Friedl (1999). Methods in this group frequently face the challenge of disambiguating between mislabeled and hard training examples. To address this challenge, they often use semi-supervised approaches by combining noisy data with a small set of clean labels (Zhu, 2005). Some approaches model the label noise as conditionally independent from the input image (Natarajan et al., 2013; Sukhbaatar et al., 2014) and some propose image-conditional noise models (Veit et al., 2017; Xiao et al., 2015). Our work differs from these approaches in that we do not aim to clean the training dataset or propose new noise-robust training algorithms. Instead, we study the behavior of standard neural network training procedures in settings with massive label noise. We show that even without explicit cleaning or noise-robust algorithms, neural networks can learn from data that has been diluted by an arbitrary amount of label noise. ",
152
+ "bbox": [
153
+ 173,
154
+ 287,
155
+ 825,
156
+ 508
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "Analyzing the robustness of neural networks. Several investigative studies aim to improve our understanding of convolutional neural networks. One particular stream of research in this space seeks to investigate neural networks by analyzing their robustness. For example, Veit et al. (2016) show that network architectures with residual connections have a high redundancy in terms of parameters and are robust to the deletion of multiple complete layers during test time. Further, Szegedy et al. (2014) investigate the robustness of neural networks to adversarial examples. They show that even for fully trained networks, small changes in the input can lead to large changes in the output and thus misclassification. In contrast, we are focusing on non-adversarial noise during training time. Within this stream of research, closest to our work are studies that focus on the impact of noisy training datasets on classification performance (e.g., Sukhbaatar et al. (2014); Van Horn et al. (2015); Zhang et al. (2017)). In these studies an increase in noise is assumed to decrease not only the proportion of correct examples, but also their absolute number. In contrast to these studies, we separate the effects and show in $\\ S 4$ that a decrease in the number of correct examples is more destructive to learning than an increase in the number of noisy labels. ",
163
+ "bbox": [
164
+ 174,
165
+ 517,
166
+ 825,
167
+ 710
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "3 LEARNING WITH MASSIVE LABEL NOISE ",
174
+ "text_level": 1,
175
+ "bbox": [
176
+ 174,
177
+ 733,
178
+ 542,
179
+ 747
180
+ ],
181
+ "page_idx": 1
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "In this work, we are concerned with scenarios of abundant data of very poor label quality, i.e., the regime in which falsely labeled training examples vastly outnumber correctly labeled examples. In particular, our experiments involve observing the performance of deep neural networks on multiclass classification tasks as label noise is increased. ",
186
+ "bbox": [
187
+ 174,
188
+ 763,
189
+ 825,
190
+ 819
191
+ ],
192
+ "page_idx": 1
193
+ },
194
+ {
195
+ "type": "text",
196
+ "text": "To formalize the problem, we denote the number of original training examples by $n$ . To model the amount of noise, we dilute the dataset by adding $\\alpha$ noisy examples to the training set for each original training example. Thus, the total number of noisy labels in the training set is αn. Note that by varying the noise level $\\alpha$ , we do not change the available number of original examples. Thus, even in the presence of high noise, there is still appreciable data to learn from, if we are able to pick it out. This is in contrast to previous work (e.g., Sukhbaatar et al. (2014); Van Horn et al. (2015); Zhang et al. (2017)), in which an increase in noise also implies a decrease in the absolute number of correct examples. In the following experiments we investigate three different types of noise: uniform label-swapping, structured label-swapping, and out-of-vocabulary examples. ",
197
+ "bbox": [
198
+ 174,
199
+ 827,
200
+ 823,
201
+ 924
202
+ ],
203
+ "page_idx": 1
204
+ },
205
+ {
206
+ "type": "image",
207
+ "img_path": "images/f9c133111a2234ff5fd59247babd2c15f1298502c70a3f8cfbe2d33f50745d89.jpg",
208
+ "image_caption": [],
209
+ "image_footnote": [],
210
+ "bbox": [
211
+ 614,
212
+ 101,
213
+ 821,
214
+ 239
215
+ ],
216
+ "page_idx": 2
217
+ },
218
+ {
219
+ "type": "image",
220
+ "img_path": "images/78e2b59393d4882edaaed93c66ab902845a045efd4a4cb2301e175d57533b2b3.jpg",
221
+ "image_caption": [
222
+ "Figure 1: Performance on Figure 2: Performance on MNIST as different amounts of CIFAR-10 as different amounts noisy labels are added to a fixed of noisy labels are added to a training set of clean labels. We fixed training set of clean lacompare a perceptron, MLPs bels. We tested ConvNets with with 1, 2, and 4 hidden layers, 4 and 6 layers, and a ResNet and a 4-layer ConvNet. Even with 101 layers. Even with 10 with 100 noisy labels for every noisy labels for every clean laclean label the ConvNet still at- bel the ResNet still attains a pertains a performance of $91 \\%$ . formance of $85 \\%$ . "
223
+ ],
224
+ "image_footnote": [],
225
+ "bbox": [
226
+ 174,
227
+ 104,
228
+ 383,
229
+ 238
230
+ ],
231
+ "page_idx": 2
232
+ },
233
+ {
234
+ "type": "image",
235
+ "img_path": "images/9dd4bc5738563f214ee2d67f43b7bac997d30529a5f2edbe58cc0bbdca6ce3f7.jpg",
236
+ "image_caption": [
237
+ "Figure 3: Performance on ImageNet as different amounts of noisy labels are added to a fixed training set of clean labels. Even with 5 noisy labels for every clean label, the 18- layer ResNet still attains a performance of $70 \\%$ . "
238
+ ],
239
+ "image_footnote": [],
240
+ "bbox": [
241
+ 393,
242
+ 102,
243
+ 599,
244
+ 238
245
+ ],
246
+ "page_idx": 2
247
+ },
248
+ {
249
+ "type": "text",
250
+ "text": "",
251
+ "bbox": [
252
+ 171,
253
+ 428,
254
+ 821,
255
+ 455
256
+ ],
257
+ "page_idx": 2
258
+ },
259
+ {
260
+ "type": "text",
261
+ "text": "A key assumption in this paper is that unreliable labels are better modeled by an unknown stochastic process rather than by the output of an adversary. This is a natural assumption for data that is pulled from the environment, in which antagonism is not to be expected in the noisy annotation process. Deep neural networks have been shown to be exceedingly brittle to adversarial noise patterns (Szegedy et al., 2014). In this work, we demonstrate that even massive amounts of non-adversarial noise present far less of an impediment to learning. ",
262
+ "bbox": [
263
+ 174,
264
+ 462,
265
+ 825,
266
+ 546
267
+ ],
268
+ "page_idx": 2
269
+ },
270
+ {
271
+ "type": "text",
272
+ "text": "3.1 EXPERIMENT 1: TRAINING WITH UNIFORM LABEL NOISE ",
273
+ "text_level": 1,
274
+ "bbox": [
275
+ 174,
276
+ 568,
277
+ 609,
278
+ 582
279
+ ],
280
+ "page_idx": 2
281
+ },
282
+ {
283
+ "type": "text",
284
+ "text": "As a first experiment, we will show that common training procedures for neural networks are resilient even to settings where correct labels are outnumbered by labels sampled uniformly at random at a ratio of 100 to 1. For this experiment we focus on the task of image classification and work with three commonly used datasets, MNIST (LeCun et al., 1998), CIFAR-10 (Krizhevsky & Hinton, 2009) and ImageNet (Deng et al., 2009). ",
285
+ "bbox": [
286
+ 174,
287
+ 595,
288
+ 825,
289
+ 665
290
+ ],
291
+ "page_idx": 2
292
+ },
293
+ {
294
+ "type": "text",
295
+ "text": "In Figures 1 and 2 we show the classification performance with varying levels of label noise. For MNIST, we vary the ratio $\\alpha$ of randomly labeled examples to cleanly labeled examples from 0 (no noise) to 100 (only 11 out of 101 labels are correct, as compared with 10.1 for pure chance). For the more challenging dataset CIFAR-10, we vary $\\alpha$ from 0 to 10. For the most challenging dataset ImageNet, we let $\\alpha$ range from 0 to 5. We compare various architectures of neural networks: multilayer perceptrons with different numbers of hidden layers, convolutional networks (ConvNets) with different numbers of convolutional layers, and residual networks (ResNets) with different numbers of layers (He et al., 2016). We evaluate performance after training on a test dataset that is free from noisy labels. Full details of our experimental setup are provided in $\\ S 3 . 4$ . ",
296
+ "bbox": [
297
+ 174,
298
+ 672,
299
+ 825,
300
+ 797
301
+ ],
302
+ "page_idx": 2
303
+ },
304
+ {
305
+ "type": "text",
306
+ "text": "Our results show that, remarkably, it is possible to attain over 90 percent accuracy on MNIST, even when there are 100 randomly labeled images for every cleanly labeled example, to attain over 85 percent accuracy on CIFAR-10 with 10 random labels for every clean label, and to attain over 70 percent top-5 accuracy on ImageNet with 5 random labels for every clean label. Thus, in this highnoise regime, deep networks are able not merely to perform above chance, but to attain accuracies that would be respectable even without noise. ",
307
+ "bbox": [
308
+ 174,
309
+ 805,
310
+ 823,
311
+ 888
312
+ ],
313
+ "page_idx": 2
314
+ },
315
+ {
316
+ "type": "text",
317
+ "text": "Further, we observe from Figures 1 and 2 that larger neural network architectures tend also to be more robust to label noise. On MNIST, the performance of a perceptron decays rapidly with increasing noise (though it still attains 40 percent accuracy, well above chance, at $\\alpha = 1 0 0$ ). The performance of a multilayer perceptron drops off more slowly, and the ConvNet is even more robust. Likewise, for CIFAR-10, the accuracy of the residual network drops more slowly than that of the smaller ConvNets. This observation provides further support for the effectiveness of ConvNets and ResNets in particular for applications where noise tolerance may be important. ",
318
+ "bbox": [
319
+ 176,
320
+ 895,
321
+ 821,
322
+ 924
323
+ ],
324
+ "page_idx": 2
325
+ },
326
+ {
327
+ "type": "image",
328
+ "img_path": "images/a40a9a284ee6fd7dda9b80e4d4f3fca2f337a8782ed7c386d90983f93f7e6a09.jpg",
329
+ "image_caption": [
330
+ "Figure 4: Illustration of uniform and structured noise models. In the case of structured noise, the order of false labels is important; we tested decreasing order of confusion, increasing order of confusion, and random order. The parameter $\\delta$ parameterizes the degree of structure in the noise. It defines how much more likely the second most likely class is over chance. "
331
+ ],
332
+ "image_footnote": [],
333
+ "bbox": [
334
+ 271,
335
+ 99,
336
+ 728,
337
+ 236
338
+ ],
339
+ "page_idx": 3
340
+ },
341
+ {
342
+ "type": "text",
343
+ "text": "",
344
+ "bbox": [
345
+ 174,
346
+ 325,
347
+ 825,
348
+ 395
349
+ ],
350
+ "page_idx": 3
351
+ },
352
+ {
353
+ "type": "text",
354
+ "text": "3.2 EXPERIMENT 2: TRAINING WITH STRUCTURED LABEL NOISE ",
355
+ "text_level": 1,
356
+ "bbox": [
357
+ 176,
358
+ 417,
359
+ 637,
360
+ 433
361
+ ],
362
+ "page_idx": 3
363
+ },
364
+ {
365
+ "type": "text",
366
+ "text": "We have seen that neural networks are extremely robust to uniform label noise. However, label noise in datasets gathered from a natural environment is unlikely to follow a perfectly uniform distribution. In this experiment, we investigate the effects of various forms of structured noise on the performance of neural networks. Figure 4 illustrates the procedure used to model noise structure. ",
367
+ "bbox": [
368
+ 174,
369
+ 446,
370
+ 825,
371
+ 502
372
+ ],
373
+ "page_idx": 3
374
+ },
375
+ {
376
+ "type": "text",
377
+ "text": "In the uniform noise setting, as illustrated on the left side of Figure 4, correct labels are more likely than any individual false label. However, overall false labels vastly outnumber correct labels. We denote the likelihood over chance for a label to be correct as $\\epsilon$ . Note that $\\epsilon = 1 / ( 1 + \\alpha )$ , where $\\alpha$ is the ratio of noisy labels to certainly correct labels. To induce structure in the noise, we bias noisy labels to certain classes. We introduce the parameter $\\delta$ to parameterize the degree of structure in the noise. It defines how much more likely the second most likely class is over chance. With $\\delta = 0$ the noise is uniform, whereas for $\\delta = 1$ the second most likely class is equally likely as the correct class. The likelihood for the remaining classes is scaled linearly, as illustrated in Figure 4 on the right. We investigate three different setups for structured noise: labels biased towards easily confused classes, towards hardly confused classes and towards random classes. ",
378
+ "bbox": [
379
+ 173,
380
+ 510,
381
+ 825,
382
+ 648
383
+ ],
384
+ "page_idx": 3
385
+ },
386
+ {
387
+ "type": "text",
388
+ "text": "Figure 5 shows the results on MNIST for the three different types of structured noise, as $\\delta$ varies from 0 to 1. In this experiment, we train 4-layer ConvNets on a dataset that is diluted with 20 noisy labels for each clean label. We vary the order of false labels so that, besides the correct class, labels are assigned most frequently to (1) those most often confused with the correct class, (2) those least often confused with it, and (3) in a random order. We determine commonly confused labels by training the network repeatedly on a small subset of MNIST and observing the errors it makes on a test set. ",
389
+ "bbox": [
390
+ 173,
391
+ 655,
392
+ 825,
393
+ 752
394
+ ],
395
+ "page_idx": 3
396
+ },
397
+ {
398
+ "type": "text",
399
+ "text": "The results show that deep neural nets are robust even to structured noise, as long as the correct label remains the most likely by at least a small margin. Generally, we do not observe large differences between the different models of noise structure, only that bias towards random classes seems to hurt the performance a little more than bias towards confused classes. This result might help explain why we often observe quite good results from real world noisy datasets, where label noise is more likely to be biased towards related and confusing classes. ",
400
+ "bbox": [
401
+ 174,
402
+ 760,
403
+ 825,
404
+ 843
405
+ ],
406
+ "page_idx": 3
407
+ },
408
+ {
409
+ "type": "text",
410
+ "text": "3.3 EXPERIMENT 3: SOURCE OF NOISY LABELS ",
411
+ "text_level": 1,
412
+ "bbox": [
413
+ 176,
414
+ 867,
415
+ 514,
416
+ 881
417
+ ],
418
+ "page_idx": 3
419
+ },
420
+ {
421
+ "type": "text",
422
+ "text": "In the preceding experiments, we diluted the training sets with noisy examples drawn from the same dataset; i.e., falsely labeled examples were images from within other categories of the dataset. In natural scenarios, however, noisy examples likely also include categories not included in the dataset that have erroneously been assigned labels within the dataset. ",
423
+ "bbox": [
424
+ 174,
425
+ 895,
426
+ 823,
427
+ 924
428
+ ],
429
+ "page_idx": 3
430
+ },
431
+ {
432
+ "type": "image",
433
+ "img_path": "images/39e1b367b8f1cfe0c62387b7a9f5848b19b58283aacd07d334c5f26174a4d483.jpg",
434
+ "image_caption": [
435
+ "Figure 5: Performance on MNIST with fixed $\\alpha = 2 0$ noisy labels per clean label. Noise is drawn from three types of structured distribution: (1) “confusing order” (highest probability for the most confusing label), (2) “reverse confusing order”, and (3) random order. We interpolate between uniform noise, $\\delta = 0$ , and noise so highly skewed that the most common false label is as likely as the correct label, $\\delta \\ = \\ 1$ Except for $\\delta \\approx 1$ , performance is similar to uniform noise. ",
436
+ "Figure 6: Performance on CIFAR-10 for varying amounts of noisy labels. Noisy training examples are drawn from (1) CIFAR-10 itself, but mislabeled uniformly at random, (2) CIFAR100, with uniformly random labels, and (3) white noise with mean and variance chosen to match those of CIFAR-10. Noise drawn from CIFAR-100 resulted in only half the drop in performance observed with noise from CIFAR-10 itself, while white noise examples did not appreciable affect performance. "
437
+ ],
438
+ "image_footnote": [],
439
+ "bbox": [
440
+ 179,
441
+ 101,
442
+ 812,
443
+ 306
444
+ ],
445
+ "page_idx": 4
446
+ },
447
+ {
448
+ "type": "text",
449
+ "text": "",
450
+ "bbox": [
451
+ 173,
452
+ 494,
453
+ 821,
454
+ 522
455
+ ],
456
+ "page_idx": 4
457
+ },
458
+ {
459
+ "type": "text",
460
+ "text": "Thus, we now consider two alternative sources for noisy training examples. First, we dilute the training set with examples that are drawn from a similar but different dataset. In particular, we use CIFAR-10 as our training dataset and dilute it with examples from CIFAR-100, assigning each image a category from CIFAR-10 at random. Second, we also consider a dilution of the training set with “examples” that are simply white noise; in this case, we match the mean and variance of pixels within CIFAR-10 and again assign labels uniformly at random. ",
461
+ "bbox": [
462
+ 174,
463
+ 530,
464
+ 825,
465
+ 613
466
+ ],
467
+ "page_idx": 4
468
+ },
469
+ {
470
+ "type": "text",
471
+ "text": "Figure 6 shows the results obtained by a six-layer ConvNet on the different noise sources for varying levels of noise. We observe that both alternative sources of noise lead to better performance than the noise originating from the same dataset. For noisy examples drawn from CIFAR-100, performance drops only about half as much as when noise originates from CIFAR-10 itself. This trend is consistent across noise levels. For white noise, performance does not drop regardless of noise level; this is in line with prior work that has shown that neural networks are able to fit random input (Zhang et al., 2017). This indicates the scenarios considered in Experiments 1 and 2 represent in some sense a worst case. ",
472
+ "bbox": [
473
+ 173,
474
+ 619,
475
+ 825,
476
+ 731
477
+ ],
478
+ "page_idx": 4
479
+ },
480
+ {
481
+ "type": "text",
482
+ "text": "In natural scenarios, we may expect massively noisy datasets to fall somewhere in between the cases exemplified by CIFAR-10 and CIFAR-100. That is, some examples will be relevant but mislabeled. However, it is likely that many examples will not be from any classes under consideration and therefore will influence training less negatively. In fact, it is possible that such examples might increase accuracy, if the erroneous labels reflect underlying similarity between the examples in question. ",
483
+ "bbox": [
484
+ 174,
485
+ 738,
486
+ 823,
487
+ 808
488
+ ],
489
+ "page_idx": 4
490
+ },
491
+ {
492
+ "type": "text",
493
+ "text": "3.4 EXPERIMENTAL SETUP ",
494
+ "text_level": 1,
495
+ "bbox": [
496
+ 176,
497
+ 838,
498
+ 372,
499
+ 851
500
+ ],
501
+ "page_idx": 4
502
+ },
503
+ {
504
+ "type": "text",
505
+ "text": "All models are trained with AdaDelta (Zeiler, 2012) as optimizer and a batch size of 128. For each level of label noise we train separate models with different learning rates ranging from 0.01 to 1 and pick the learning rate that results in the best performance. Generally, we observe that the higher the label noise, the lower the optimal learning rate. We investigate this trend in detail in §5. ",
506
+ "bbox": [
507
+ 174,
508
+ 867,
509
+ 823,
510
+ 924
511
+ ],
512
+ "page_idx": 4
513
+ },
514
+ {
515
+ "type": "image",
516
+ "img_path": "images/c21857a56a07b66737e2dc89fac883ddfa7637fbd412b8852778adb42a2d2904.jpg",
517
+ "image_caption": [
518
+ "Figure 7: Comparison of the effect of reusing images vs. using novel images as noisy examples. Essentially no difference is observed between the two types of noisy examples, supporting the use of repeated examples in our experiments. "
519
+ ],
520
+ "image_footnote": [],
521
+ "bbox": [
522
+ 181,
523
+ 102,
524
+ 486,
525
+ 306
526
+ ],
527
+ "page_idx": 5
528
+ },
529
+ {
530
+ "type": "image",
531
+ "img_path": "images/188024bc06883009c65ceb60641d43e949b8968342b6ec41f0de7af7dee4a316.jpg",
532
+ "image_caption": [
533
+ "Figure 8: Performance on MNIST at various noise levels, as a function of the number of clean labels. There seems to be a critical amount of clean training data required to successfully train the networks. This threshold increases as the noise level rises. For example, at $\\alpha = 1 0$ , 2,000 clean labels are needed to attain $90 \\%$ performance, while at $\\alpha = 5 0$ , 10,000 clean labels are needed. "
534
+ ],
535
+ "image_footnote": [],
536
+ "bbox": [
537
+ 501,
538
+ 104,
539
+ 807,
540
+ 304
541
+ ],
542
+ "page_idx": 5
543
+ },
544
+ {
545
+ "type": "text",
546
+ "text": "In Experiments 1 and 2, noisy labels are drawn from the same dataset as the labels guaranteed to be correct. This involves drawing the same example many times from the dataset, giving it the correct label once, and in every other instance picking a random label according to the noise distribution in question. We show in Figure 7 that performance would have been comparable had we been able to draw noisy labels from an extended dataset, instead of repeating images. Specifically, we train a convolutional network on a subset of MNIST, with 2,500 certainly correct labels and with noisy labels drawn either with repetition from this set of 2,500 or without repetition from the remaining examples in the MNIST dataset. The results are essentially identical between repeated and unique examples, supporting our setup in the preceding experiments. ",
547
+ "bbox": [
548
+ 173,
549
+ 460,
550
+ 825,
551
+ 587
552
+ ],
553
+ "page_idx": 5
554
+ },
555
+ {
556
+ "type": "text",
557
+ "text": "4 THE IMPORTANCE OF LARGER DATASETS ",
558
+ "text_level": 1,
559
+ "bbox": [
560
+ 173,
561
+ 616,
562
+ 544,
563
+ 631
564
+ ],
565
+ "page_idx": 5
566
+ },
567
+ {
568
+ "type": "text",
569
+ "text": "Underlying the ability of deep networks to learn from massively noisy data is the size of the data in question. It is well-established, see e.g., Deng et al. (2009), that traditional deep learning relies upon large datasets. We will now see how this is particularly true of noisy datasets. ",
570
+ "bbox": [
571
+ 174,
572
+ 651,
573
+ 825,
574
+ 693
575
+ ],
576
+ "page_idx": 5
577
+ },
578
+ {
579
+ "type": "text",
580
+ "text": "In Figure 8, we compare the performance of a ConvNet on MNIST as the size of the training set varies. We also show the performance of the same ConvNet trained on MNIST diluted with noisy labels sampled uniformly. We show how the performance of the ConvNet varies with the number of cleanly labeled training examples. For example, for the blue curve of $\\alpha = 1 0$ and 1,000 clean labels, the network is trained on 11,000 examples: 1,000 cleanly labeled examples and 10,000 with random labels. ",
581
+ "bbox": [
582
+ 174,
583
+ 700,
584
+ 825,
585
+ 784
586
+ ],
587
+ "page_idx": 5
588
+ },
589
+ {
590
+ "type": "text",
591
+ "text": "Generally, we observe that independent of the noise level the networks benefit from more data and that, given sufficient data, the networks reach similar results. Further, the results indicate that there seems to be a critical amount of clean training data that is required to successfully train the networks. This critical amount of clean data depends on the noise level; in particular, it increases as the noise level rises. Since performance rapidly levels off past the critical threshold the main requirement for the clean training set is to be of sufficient size. ",
592
+ "bbox": [
593
+ 174,
594
+ 791,
595
+ 825,
596
+ 875
597
+ ],
598
+ "page_idx": 5
599
+ },
600
+ {
601
+ "type": "text",
602
+ "text": "It is because of the critical amount of required clean data that we have not attempted to train networks for $\\alpha \\gg 1 0 0$ . The number of correct examples needed to train such a network might rise above the 60,000 provided in the MNIST dataset. In a real-world dataset, the amount of (noisy) data available for training is likely not to be the limiting factor. Rather, considerations such as training time and learning rate may play a more important role, as we discuss in the following section. ",
603
+ "bbox": [
604
+ 176,
605
+ 882,
606
+ 823,
607
+ 924
608
+ ],
609
+ "page_idx": 5
610
+ },
611
+ {
612
+ "type": "image",
613
+ "img_path": "images/a1590b2c0e7c28dcefe6239ed9d9264e2b853c999e75f71c9ce77e8aabbae055.jpg",
614
+ "image_caption": [
615
+ "Figure 9: Performance on MNIST for varying batch size as a function of noise level. Higher batch size gives better performance. We approximate the limit of infinite batch size by training without noisy labels, but using the noisy loss function $H _ { \\alpha }$ . "
616
+ ],
617
+ "image_footnote": [],
618
+ "bbox": [
619
+ 179,
620
+ 106,
621
+ 488,
622
+ 305
623
+ ],
624
+ "page_idx": 6
625
+ },
626
+ {
627
+ "type": "image",
628
+ "img_path": "images/75e753a6581173fda8d01a6a18351eca675a2a2366feea4d91de9c2fc98173fe.jpg",
629
+ "image_caption": [
630
+ "Figure 10: Performance on CIFAR-10 for varying learning rate as a function of noise level. Lower learning rates are generally optimal as the noise level increases. "
631
+ ],
632
+ "image_footnote": [],
633
+ "bbox": [
634
+ 501,
635
+ 102,
636
+ 810,
637
+ 306
638
+ ],
639
+ "page_idx": 6
640
+ },
641
+ {
642
+ "type": "text",
643
+ "text": "",
644
+ "bbox": [
645
+ 173,
646
+ 416,
647
+ 823,
648
+ 444
649
+ ],
650
+ "page_idx": 6
651
+ },
652
+ {
653
+ "type": "text",
654
+ "text": "5 TRAINING ON NOISY DATASETS ",
655
+ "text_level": 1,
656
+ "bbox": [
657
+ 176,
658
+ 464,
659
+ 467,
660
+ 479
661
+ ],
662
+ "page_idx": 6
663
+ },
664
+ {
665
+ "type": "text",
666
+ "text": "In the preceding sections, our results were obtained by training neural networks with fixed batch size and running a parameter search to pick the optimal learning rate. We now look in more detail into how the choice of hyperparameters affects learning on noisy datasets. ",
667
+ "bbox": [
668
+ 174,
669
+ 494,
670
+ 825,
671
+ 537
672
+ ],
673
+ "page_idx": 6
674
+ },
675
+ {
676
+ "type": "text",
677
+ "text": "5.1 BATCH SIZE ",
678
+ "text_level": 1,
679
+ "bbox": [
680
+ 174,
681
+ 553,
682
+ 299,
683
+ 568
684
+ ],
685
+ "page_idx": 6
686
+ },
687
+ {
688
+ "type": "text",
689
+ "text": "First, we investigate the effect of the batch size on the noise robustness of neural network training. In Figure 9, we compare the performance of a simple 2-layer ConvNet on MNIST with increasing noise, as batch size varies from 32 to 256. We observe that increasing the batch size provides greater robustness to noisy labels. One reason for this behavior could be that, within a batch, gradient updates from randomly sampled noisy labels cancel out, while gradients from correct examples that are marginally more frequent sum together and contribute to learning. By this logic, large batch sizes would be more robust to noise since the mean gradient over a larger batch is closer to the gradient for correct labels. All other experiments in this paper are performed with a fixed batch size of 128. ",
690
+ "bbox": [
691
+ 174,
692
+ 579,
693
+ 825,
694
+ 691
695
+ ],
696
+ "page_idx": 6
697
+ },
698
+ {
699
+ "type": "text",
700
+ "text": "We may also consider the theoretical case of infinite batch size, in which gradients are averaged over the entire space of possible inputs at each training step. While this is often impossible to perform in practice, we can simulate such behavior by an auxiliary loss function. ",
701
+ "bbox": [
702
+ 174,
703
+ 698,
704
+ 825,
705
+ 739
706
+ ],
707
+ "page_idx": 6
708
+ },
709
+ {
710
+ "type": "text",
711
+ "text": "In classification tasks, we are given an input $\\mathbf { x }$ and aim to predict the class $f ( \\mathbf { x } ) \\in \\{ 1 , 2 , \\dots , m \\}$ . The value $f ( \\mathbf { x } )$ is encoded within a neural network by the 1-hot vector $\\mathbf { y } ( \\mathbf { x } )$ such that ",
712
+ "bbox": [
713
+ 173,
714
+ 746,
715
+ 823,
716
+ 775
717
+ ],
718
+ "page_idx": 6
719
+ },
720
+ {
721
+ "type": "equation",
722
+ "img_path": "images/18d4f9d5c1dfa98b60aec3c6950849a98b78fdc33043eb25c49a692c61f1c9a5.jpg",
723
+ "text": "$$\ny _ { k } ( \\mathbf x ) = { \\left\\{ \\begin{array} { l l } { 1 } & { { \\mathrm { ~ i f ~ } } k = f ( \\mathbf x ) } \\\\ { 0 } & { { \\mathrm { ~ o t h e r w i s e ~ } } } \\end{array} \\right. }\n$$",
724
+ "text_format": "latex",
725
+ "bbox": [
726
+ 406,
727
+ 780,
728
+ 589,
729
+ 815
730
+ ],
731
+ "page_idx": 6
732
+ },
733
+ {
734
+ "type": "text",
735
+ "text": "for $1 \\leq k \\leq m$ . Then, the standard cross-entropy loss over a batch $X$ is given by: ",
736
+ "bbox": [
737
+ 173,
738
+ 819,
739
+ 705,
740
+ 834
741
+ ],
742
+ "page_idx": 6
743
+ },
744
+ {
745
+ "type": "equation",
746
+ "img_path": "images/4c189d95322892db05fd567f9d3a08c9dc0f8fd00f879c4840f716556e4e4d40.jpg",
747
+ "text": "$$\nH ( X ) = - \\langle \\log \\hat { y } _ { f ( \\mathbf { x } ) } \\rangle _ { X } ,\n$$",
748
+ "text_format": "latex",
749
+ "bbox": [
750
+ 415,
751
+ 838,
752
+ 581,
753
+ 856
754
+ ],
755
+ "page_idx": 6
756
+ },
757
+ {
758
+ "type": "text",
759
+ "text": "where $\\hat { \\mathbf { y } }$ is the predicted vector and $\\langle \\cdot \\rangle _ { X }$ denotes the expected value over the batch $X$ . We assume that $\\hat { \\mathbf { y } }$ is normalized (e.g. by the softmax function) so that the entries sum to 1. ",
760
+ "bbox": [
761
+ 174,
762
+ 859,
763
+ 825,
764
+ 888
765
+ ],
766
+ "page_idx": 6
767
+ },
768
+ {
769
+ "type": "text",
770
+ "text": "For a training set with noisy labels, we may consider the label $f ( \\mathbf { x } )$ given in the training set to be merely an approximation to the true label $f _ { 0 } ( x )$ . Consider the case of $n$ training examples, and $\\alpha n$ noisy labels that are sampled uniformly at random from the set $\\{ 1 , 2 , \\ldots , m \\}$ . Then, $f ( \\mathbf { x } ) = f _ { 0 } ( \\mathbf { x } )$ with probability $\\frac { 1 } { 1 + \\alpha }$ , and otherwise it is $1 , 2 , \\ldots , m$ , each with probability $\\frac { \\alpha } { m ( 1 + \\alpha ) }$ . As batch size increases, the expected value over the batch $X$ is approximated more closely by these probabilities. In the limit of infinite batch size, equation (2) takes the form of a noisy loss function $H _ { \\alpha }$ : ",
771
+ "bbox": [
772
+ 173,
773
+ 895,
774
+ 823,
775
+ 924
776
+ ],
777
+ "page_idx": 6
778
+ },
779
+ {
780
+ "type": "text",
781
+ "text": "",
782
+ "bbox": [
783
+ 176,
784
+ 102,
785
+ 821,
786
+ 162
787
+ ],
788
+ "page_idx": 7
789
+ },
790
+ {
791
+ "type": "equation",
792
+ "img_path": "images/6aae83939a8d4dfab8c8ed2207f1be86c162f385fe38ec2f94cf942e35130348.jpg",
793
+ "text": "$$\n\\begin{array} { l } { { \\displaystyle { \\cal H } _ { \\alpha } ( X ) : = - \\frac { 1 } { 1 + \\alpha } \\langle \\log \\hat { y } _ { f _ { 0 } ( { \\bf x } ) } \\rangle _ { X } - \\frac { \\alpha } { m ( 1 + \\alpha ) } \\sum _ { k = 1 } ^ { m } \\langle \\log \\hat { y } _ { k } \\rangle _ { X } } } \\\\ { { \\displaystyle \\propto - \\langle \\log \\hat { y } _ { f _ { 0 } ( { \\bf x } ) } \\rangle _ { X } - \\alpha \\left. \\log \\prod _ { k = 1 } ^ { m } \\hat { y } _ { k } ^ { 1 / m } \\right. _ { X } } } \\end{array}\n$$",
794
+ "text_format": "latex",
795
+ "bbox": [
796
+ 295,
797
+ 166,
798
+ 700,
799
+ 255
800
+ ],
801
+ "page_idx": 7
802
+ },
803
+ {
804
+ "type": "text",
805
+ "text": "We can therefore compare training using the cross-entropy loss with $\\alpha n$ noisy labels to training using the noisy loss function $H _ { \\alpha }$ without noisy labels. The term on the right-hand side of (3) represents the noise contribution, and is clearly minimized where $\\hat { y } _ { k }$ are all equal. As $\\alpha$ increases, this contribution is weighted more heavily against $- \\left. \\log \\hat { y } _ { f _ { 0 } ( \\mathbf { x } ) } \\right. _ { X }$ , which is minimized at $\\hat { \\mathbf { y } } ( \\mathbf x ) = \\mathbf { y } ( \\mathbf x )$ . ",
806
+ "bbox": [
807
+ 174,
808
+ 263,
809
+ 825,
810
+ 321
811
+ ],
812
+ "page_idx": 7
813
+ },
814
+ {
815
+ "type": "text",
816
+ "text": "We show in Figure 9 the results of training our 2-layer ConvNet on MNIST with the noisy loss function $H _ { \\alpha }$ , simulating $\\alpha n$ noisy labels with infinite batch size. We can observe that the network’s accuracy does not decrease as $\\alpha$ increases. This can be explained by the observation that an increasing $\\alpha$ is merely decreasing the magnitude of the true gradient, rather than altering its direction. ",
817
+ "bbox": [
818
+ 174,
819
+ 327,
820
+ 823,
821
+ 383
822
+ ],
823
+ "page_idx": 7
824
+ },
825
+ {
826
+ "type": "text",
827
+ "text": "Our observations indicate that increasing noise in the training set reduces the effective batch size, as noisy signals roughly cancel out and only small learning signal remains. We show that increasing the batch size is a simple practical means to mitigate the effect of noisy training labels. ",
828
+ "bbox": [
829
+ 176,
830
+ 390,
831
+ 823,
832
+ 433
833
+ ],
834
+ "page_idx": 7
835
+ },
836
+ {
837
+ "type": "text",
838
+ "text": "5.2 LEARNING RATE ",
839
+ "text_level": 1,
840
+ "bbox": [
841
+ 176,
842
+ 449,
843
+ 330,
844
+ 463
845
+ ],
846
+ "page_idx": 7
847
+ },
848
+ {
849
+ "type": "text",
850
+ "text": "It has become common practice in training deep neural networks to scale the learning rate with the batch size. In particular, it has been shown that the smaller the batch size, the lower the optimal learning rate (Krizhevsky, 2014). In our experiments, we have observed that noisy labels reduce the effective batch size. As such, we would expect that lower learning rates perform better than large learning rates as noise increases. Figure 10 shows the performance of a 4-layer ConvNet trained with different learning rates on CIFAR-10 for varying label noise. As expected, we observe that the optimal learning rate decreases as noise increases. For example, the optimal learning rate for the clean dataset is 1, while, with the introduction of noise, this learning rate becomes unstable. ",
851
+ "bbox": [
852
+ 174,
853
+ 474,
854
+ 825,
855
+ 587
856
+ ],
857
+ "page_idx": 7
858
+ },
859
+ {
860
+ "type": "text",
861
+ "text": "To sum up, we observe that increasing label noise reduces the effective batch size. We have shown that the effect of label noise can be partly counterbalanced for by a larger training batch size. Now, we see that one can additionally scale the learning rate to compensate for any remaining change in effective batch size induced by noisy labels. ",
862
+ "bbox": [
863
+ 174,
864
+ 593,
865
+ 825,
866
+ 648
867
+ ],
868
+ "page_idx": 7
869
+ },
870
+ {
871
+ "type": "text",
872
+ "text": "6 CONCLUSION ",
873
+ "text_level": 1,
874
+ "bbox": [
875
+ 176,
876
+ 669,
877
+ 318,
878
+ 685
879
+ ],
880
+ "page_idx": 7
881
+ },
882
+ {
883
+ "type": "text",
884
+ "text": "In this paper, we have considered the behavior of deep neural networks on training sets with very noisy labels. In a series of experiments, we have demonstrated that learning is robust to an essentially arbitrary amount of label noise, provided that the number of clean labels is sufficiently large. We have further shown that the threshold required for clean labels increases as the noise level does. Finally, we have observed that noisy labels reduce the effective batch size, an effect that can be mitigated by larger batch sizes and downscaling the learning rate. ",
885
+ "bbox": [
886
+ 174,
887
+ 700,
888
+ 825,
889
+ 785
890
+ ],
891
+ "page_idx": 7
892
+ },
893
+ {
894
+ "type": "text",
895
+ "text": "It is worthy of note that although deep networks appear robust to even high degrees of label noise, clean labels still always perform better than noisy labels, given the same quantity of training data. Further, one still requires expert-vetted test sets for evaluation. Lastly, it is important to reiterate that our studies focus on non-adversarial noise. ",
896
+ "bbox": [
897
+ 174,
898
+ 791,
899
+ 825,
900
+ 847
901
+ ],
902
+ "page_idx": 7
903
+ },
904
+ {
905
+ "type": "text",
906
+ "text": "Our work suggests numerous directions for future investigation. For example, we are interested in how label-cleaning and semi-supervised methods affect the performance of networks in a high-noise regime. Are such approaches able to lower the threshold for training set size? Finally, it remains to translate the results we present into an actionable trade-off between data annotation and acquisition costs, which can be utilized in real world training pipelines for deep networks on massive noisy data. ",
907
+ "bbox": [
908
+ 174,
909
+ 854,
910
+ 823,
911
+ 924
912
+ ],
913
+ "page_idx": 7
914
+ },
915
+ {
916
+ "type": "text",
917
+ "text": "REFERENCES ",
918
+ "text_level": 1,
919
+ "bbox": [
920
+ 176,
921
+ 102,
922
+ 285,
923
+ 117
924
+ ],
925
+ "page_idx": 8
926
+ },
927
+ {
928
+ "type": "text",
929
+ "text": "Eyal Beigman and Beata Beigman Klebanov. Learning with annotation noise. In Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP. Association for Computational Linguistics, 2009. ",
930
+ "bbox": [
931
+ 173,
932
+ 127,
933
+ 825,
934
+ 183
935
+ ],
936
+ "page_idx": 8
937
+ },
938
+ {
939
+ "type": "text",
940
+ "text": "Carla E Brodley and Mark A Friedl. Identifying mislabeled training data. Journal of artificial intelligence research (JAIR), 11:131–167, 1999. ",
941
+ "bbox": [
942
+ 171,
943
+ 193,
944
+ 825,
945
+ 222
946
+ ],
947
+ "page_idx": 8
948
+ },
949
+ {
950
+ "type": "text",
951
+ "text": "Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, (CVPR), 2009. ",
952
+ "bbox": [
953
+ 173,
954
+ 232,
955
+ 821,
956
+ 262
957
+ ],
958
+ "page_idx": 8
959
+ },
960
+ {
961
+ "type": "text",
962
+ "text": "Melody Y Guan, Varun Gulshan, Andrew M Dai, and Geoffrey E Hinton. Who said what: Modeling individual labelers improves classification. arXiv:1703.08774, 2017. ",
963
+ "bbox": [
964
+ 173,
965
+ 272,
966
+ 825,
967
+ 301
968
+ ],
969
+ "page_idx": 8
970
+ },
971
+ {
972
+ "type": "text",
973
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Computer Vision and Pattern Recognition, (CVPR), 2016. ",
974
+ "bbox": [
975
+ 173,
976
+ 311,
977
+ 825,
978
+ 342
979
+ ],
980
+ "page_idx": 8
981
+ },
982
+ {
983
+ "type": "text",
984
+ "text": "Armand Joulin, Laurens van der Maaten, Allan Jabri, and Nicolas Vasilache. Learning visual features from large weakly supervised data. In European Conference on Computer Vision, (ECCV). Springer, 2016. ",
985
+ "bbox": [
986
+ 174,
987
+ 351,
988
+ 823,
989
+ 393
990
+ ],
991
+ "page_idx": 8
992
+ },
993
+ {
994
+ "type": "text",
995
+ "text": "I Krasin, T Duerig, N Alldrin, A Veit, S Abu-El-Haija, S Belongie, D Cai, Z Feng, V Ferrari, V Gomes, et al. Openimages: A public dataset for large-scale multi-label and multiclass image classification. Dataset available from https://github. com/openimages, 2(6):7, 2016. ",
996
+ "bbox": [
997
+ 176,
998
+ 405,
999
+ 821,
1000
+ 448
1001
+ ],
1002
+ "page_idx": 8
1003
+ },
1004
+ {
1005
+ "type": "text",
1006
+ "text": "Jonathan Krause, Benjamin Sapp, Andrew Howard, Howard Zhou, Alexander Toshev, Tom Duerig, James Philbin, and Li Fei-Fei. The unreasonable effectiveness of noisy data for fine-grained recognition. In European Conference on Computer Vision, (ECCV). Springer, 2016. ",
1007
+ "bbox": [
1008
+ 173,
1009
+ 458,
1010
+ 825,
1011
+ 501
1012
+ ],
1013
+ "page_idx": 8
1014
+ },
1015
+ {
1016
+ "type": "text",
1017
+ "text": "Alex Krizhevsky. One weird trick for parallelizing convolutional neural networks. arXiv preprint arXiv:1404.5997, 2014. ",
1018
+ "bbox": [
1019
+ 174,
1020
+ 511,
1021
+ 823,
1022
+ 540
1023
+ ],
1024
+ "page_idx": 8
1025
+ },
1026
+ {
1027
+ "type": "text",
1028
+ "text": "Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images, 2009. ",
1029
+ "bbox": [
1030
+ 173,
1031
+ 550,
1032
+ 821,
1033
+ 566
1034
+ ],
1035
+ "page_idx": 8
1036
+ },
1037
+ {
1038
+ "type": "text",
1039
+ "text": "Quoc V Le. Building high-level features using large scale unsupervised learning. In International Conference on Acoustics, Speech and Signal Processing, (ICASSP). IEEE, 2013. ",
1040
+ "bbox": [
1041
+ 171,
1042
+ 577,
1043
+ 823,
1044
+ 606
1045
+ ],
1046
+ "page_idx": 8
1047
+ },
1048
+ {
1049
+ "type": "text",
1050
+ "text": "Yann LeCun, Corinna Cortes, and Christopher JC Burges. The MNIST database of handwritten digits, 1998. ",
1051
+ "bbox": [
1052
+ 173,
1053
+ 616,
1054
+ 823,
1055
+ 645
1056
+ ],
1057
+ "page_idx": 8
1058
+ },
1059
+ {
1060
+ "type": "text",
1061
+ "text": "Naresh Manwani and PS Sastry. Noise tolerance under risk minimization. IEEE Transactions on cybernetics, 43(3):1146–1151, 2013. ",
1062
+ "bbox": [
1063
+ 169,
1064
+ 656,
1065
+ 823,
1066
+ 685
1067
+ ],
1068
+ "page_idx": 8
1069
+ },
1070
+ {
1071
+ "type": "text",
1072
+ "text": "Ishan Misra, C Lawrence Zitnick, Margaret Mitchell, and Ross Girshick. Seeing through the human reporting bias: Visual classifiers from noisy human-centric labels. In Computer Vision and Pattern Recognition, (CVPR), 2016. ",
1073
+ "bbox": [
1074
+ 173,
1075
+ 695,
1076
+ 825,
1077
+ 738
1078
+ ],
1079
+ "page_idx": 8
1080
+ },
1081
+ {
1082
+ "type": "text",
1083
+ "text": "Nagarajan Natarajan, Inderjit S Dhillon, Pradeep K Ravikumar, and Ambuj Tewari. Learning with noisy labels. In Advances in neural information processing systems, (NIPS), 2013. ",
1084
+ "bbox": [
1085
+ 171,
1086
+ 748,
1087
+ 823,
1088
+ 779
1089
+ ],
1090
+ "page_idx": 8
1091
+ },
1092
+ {
1093
+ "type": "text",
1094
+ "text": "Lerrel Pinto, Dhiraj Gandhi, Yuanfeng Han, Yong-Lae Park, and Abhinav Gupta. The curious robot: Learning visual representations via physical interactions. In European Conference on Computer Vision, (ECCV). Springer, 2016. ",
1095
+ "bbox": [
1096
+ 176,
1097
+ 787,
1098
+ 823,
1099
+ 830
1100
+ ],
1101
+ "page_idx": 8
1102
+ },
1103
+ {
1104
+ "type": "text",
1105
+ "text": "Sainbayar Sukhbaatar, Joan Bruna, Manohar Paluri, Lubomir Bourdev, and Rob Fergus. Training convolutional networks with noisy labels. arXiv preprint arXiv:1406.2080, 2014. ",
1106
+ "bbox": [
1107
+ 169,
1108
+ 842,
1109
+ 823,
1110
+ 871
1111
+ ],
1112
+ "page_idx": 8
1113
+ },
1114
+ {
1115
+ "type": "text",
1116
+ "text": "Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In International Conference on Learning Representations, (ICLR), 2014. ",
1117
+ "bbox": [
1118
+ 174,
1119
+ 882,
1120
+ 823,
1121
+ 924
1122
+ ],
1123
+ "page_idx": 8
1124
+ },
1125
+ {
1126
+ "type": "text",
1127
+ "text": "Bart Thomee, David A Shamma, Gerald Friedland, Benjamin Elizalde, Karl Ni, Douglas Poland, Damian Borth, and Li-Jia Li. YFCC100M: The new data in multimedia research. Communications of the ACM, 59(2):64–73, 2016. ",
1128
+ "bbox": [
1129
+ 178,
1130
+ 103,
1131
+ 821,
1132
+ 146
1133
+ ],
1134
+ "page_idx": 9
1135
+ },
1136
+ {
1137
+ "type": "text",
1138
+ "text": "Grant Van Horn, Steve Branson, Ryan Farrell, Scott Haber, Jessie Barry, Panos Ipeirotis, Pietro Perona, and Serge Belongie. Building a bird recognition app and large scale dataset with citizen scientists: The fine print in fine-grained dataset collection. In Computer Vision and Pattern Recognition, (CVPR), 2015. ",
1139
+ "bbox": [
1140
+ 174,
1141
+ 155,
1142
+ 825,
1143
+ 210
1144
+ ],
1145
+ "page_idx": 9
1146
+ },
1147
+ {
1148
+ "type": "text",
1149
+ "text": "Andreas Veit, Michael Wilber, and Serge Belongie. Residual networks behave like ensembles of relatively shallow networks. In Neural Information Processing Systems, (NIPS), 2016. ",
1150
+ "bbox": [
1151
+ 173,
1152
+ 219,
1153
+ 823,
1154
+ 250
1155
+ ],
1156
+ "page_idx": 9
1157
+ },
1158
+ {
1159
+ "type": "text",
1160
+ "text": "Andreas Veit, Neil Alldrin, Gal Chechik, Ivan Krasin, Abhinav Gupta, and Serge Belongie. Learning from noisy large-scale datasets with minimal supervision. In Computer Vision and Pattern Recognition, (CVPR), 2017. URL https://vision.cornell.edu/se3/ wp-content/uploads/2017/04/DeepLabelCleaning_CVPR.pdf. ",
1161
+ "bbox": [
1162
+ 174,
1163
+ 257,
1164
+ 825,
1165
+ 315
1166
+ ],
1167
+ "page_idx": 9
1168
+ },
1169
+ {
1170
+ "type": "text",
1171
+ "text": "Xiaolong Wang and Abhinav Gupta. Unsupervised learning of visual representations using videos. In International Conference on Computer Vision, (ICCV), 2015. ",
1172
+ "bbox": [
1173
+ 173,
1174
+ 323,
1175
+ 823,
1176
+ 353
1177
+ ],
1178
+ "page_idx": 9
1179
+ },
1180
+ {
1181
+ "type": "text",
1182
+ "text": "Tong Xiao, Tian Xia, Yi Yang, Chang Huang, and Xiaogang Wang. Learning from massive noisy labeled data for image classification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 2691–2699, 2015. ",
1183
+ "bbox": [
1184
+ 173,
1185
+ 361,
1186
+ 825,
1187
+ 404
1188
+ ],
1189
+ "page_idx": 9
1190
+ },
1191
+ {
1192
+ "type": "text",
1193
+ "text": "Matthew D Zeiler. Adadelta: an adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012. ",
1194
+ "bbox": [
1195
+ 173,
1196
+ 412,
1197
+ 823,
1198
+ 440
1199
+ ],
1200
+ "page_idx": 9
1201
+ },
1202
+ {
1203
+ "type": "text",
1204
+ "text": "Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. In International Conference on Learning Representations, (ICLR), 2017. ",
1205
+ "bbox": [
1206
+ 173,
1207
+ 450,
1208
+ 823,
1209
+ 492
1210
+ ],
1211
+ "page_idx": 9
1212
+ },
1213
+ {
1214
+ "type": "text",
1215
+ "text": "Xiaojin Zhu. Semi-supervised learning literature survey. Computer Science, University of Wisconsin-Madison, 2(3):4, 2005. ",
1216
+ "bbox": [
1217
+ 169,
1218
+ 502,
1219
+ 825,
1220
+ 531
1221
+ ],
1222
+ "page_idx": 9
1223
+ }
1224
+ ]
parse/train/B1p461b0W/B1p461b0W_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1p461b0W/B1p461b0W_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/JWOiYxMG92s/JWOiYxMG92s.md ADDED
@@ -0,0 +1,316 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # FREE LUNCH FOR FEW-SHOT LEARNING: DISTRIBUTION CALIBRATION
2
+
3
+ Shuo $\mathbf { Y a n g ^ { 1 } }$ , Lu $\mathbf { L i u ^ { 2 } }$ , Min $\mathbf { X } \mathbf { u } ^ { 1 * }$ 1School of Electrical and Data Engineering, University of Technology Sydney, 2Australian Artificial Intelligence Institute, University of Technology Sydney {shuo.yang, lu.liu-10}@student.uts.edu.au, min.xu@uts.edu.au,
4
+
5
+ # ABSTRACT
6
+
7
+ Learning from a limited number of samples is challenging since the learned model can easily become overfitted based on the biased distribution formed by only a few training examples. In this paper, we calibrate the distribution of these fewsample classes by transferring statistics from the classes with sufficient examples. Then an adequate number of examples can be sampled from the calibrated distribution to expand the inputs to the classifier. We assume every dimension in the feature representation follows a Gaussian distribution so that the mean and the variance of the distribution can borrow from that of similar classes whose statistics are better estimated with an adequate number of samples. Our method can be built on top of off-the-shelf pretrained feature extractors and classification models without extra parameters. We show that a simple logistic regression classifier trained using the features sampled from our calibrated distribution can outperform the state-of-the-art accuracy on three datasets $5 \%$ improvement on miniImageNet compared to the next best). The visualization of these generated features demonstrates that our calibrated distribution is an accurate estimation. The code is available at: https://github.com/ShuoYang-1998/Few_ Shot_Distribution_Calibration
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Learning from a limited number of training samples has drawn increasing attention due to the high cost of collecting and annotating a large amount of data. Researchers have developed algorithms to improve the performance of models that have been trained with very few data. Finn et al. (2017); Snell et al. (2017) train models in a meta-learning fashion so that the model can adapt quickly on tasks with only a few training samples available. Hariharan & Girshick (2017); Wang et al. (2018) try to synthesize data or features by learning a generative model to alleviate the data insufficiency problem. Ren et al. (2018) propose to leverage unlabeled data and predict pseudo labels to improve the performance of fewshot learning.
12
+
13
+ Table 1: The class mean similarity (“mean sim”) and class variance similarity (“var sim”) between Arctic fox and different classes.
14
+
15
+ <table><tr><td rowspan="2"></td><td colspan="2">Arctic fox</td></tr><tr><td>mean sim</td><td>var sim</td></tr><tr><td>white wolf</td><td>97%</td><td>97%</td></tr><tr><td>malamute</td><td>85%</td><td>78%</td></tr><tr><td>lion</td><td>81%</td><td>70%</td></tr><tr><td>meerkat</td><td>78%</td><td>70%</td></tr><tr><td> jellyfish</td><td>46%</td><td>26%</td></tr><tr><td>orange</td><td>40%</td><td>19%</td></tr><tr><td>beer bottle</td><td>34%</td><td>11%</td></tr></table>
16
+
17
+ While most previous works focus on developing stronger models, scant attention has been paid to the property of the data itself. It is natural that when the number of data grows, the ground truth distribution can be more accurately uncovered. Models trained with a wide coverage of data can generalize well during evaluation. On the other hand, when training a model with only a few training data, the model tends to overfit on these few samples by minimizing the training loss over these samples. These phenomena are illustrated in Figure 1. This biased distribution based on a few examples can damage the generalization ability of the model since it is far from mirroring the ground truth distribution from which test cases are sampled during evaluation.
18
+
19
+ ![](images/f4ca58d351dd312c05898a42b7dc7690158afa432c5ba49f7761c4aa20e3bb2e.jpg)
20
+ Figure 1: Training a classifier from few-shot features makes the classifier overfit to the few examples (Left). Classifier trained with features sampled from calibrated distribution has better generalization ability (Right).
21
+
22
+ Here, we consider calibrating this biased distribution into a more accurate approximation of the ground truth distribution. In this way, a model trained with inputs sampled from the calibrated distribution can generalize over a broader range of data from a more accurate distribution rather than only fitting itself to those few samples. Instead of calibrating the distribution of the original data space, we try to calibrate the distribution in the feature space, which has much lower dimensions and is easier to calibrate (Xian et al. (2018)). We assume every dimension in the feature vectors follows a Gaussian distribution and observe that similar classes usually have similar mean and variance of the feature representations, as shown in Table 1. Thus, the mean and variance of the Gaussian distribution can be transferred across similar classes (Salakhutdinov et al. (2012)). Meanwhile, the statistics can be estimated more accurately when there are adequate samples for this class. Based on these observations, we reuse the statistics from many-shot classes and transfer them to better estimate the distribution of the few-shot classes according to their class similarity. More samples can be generated according to the estimated distribution which provides sufficient supervision for training the classification model.
23
+
24
+ In the experiments, we show that a simple logistic regression classifier trained with our strategy can achieve state-of-the-art accuracy on three datasets. Our distribution calibration strategy can be paired with any classifier and feature extractor with no extra learnable parameters. Training with samples selected from the calibrated distribution can achieve $12 \%$ accuracy gain compared to the baseline which is only trained with the few samples given in a 5way1shot task. We also visualize the calibrated distribution and show that it is an accurate approximation of the ground truth that can better cover the test cases.
25
+
26
+ # 2 RELATED WORKS
27
+
28
+ Few-shot classification is a challenging machine learning problem and researchers have explored the idea of learning to learn or meta-learning to improve the quick adaptation ability to alleviate the few-shot challenge. One of the most general algorithms for meta-learning is the optimizationbased algorithm. Finn et al. (2017) and Li et al. (2017) proposed to learn how to optimize the gradient descent procedure so that the learner can have a good initialization, update direction, and learning rate. For the classification problem, researchers proposed simple but effective algorithms based on metric learning. MatchingNet (Vinyals et al., 2016) and ProtoNet (Snell et al., 2017) learned to classify samples by comparing the distance to the representatives of each class. Our distribution calibration and feature sampling procedure does not include any learnable parameters and the classifier is trained in a traditional supervised learning way.
29
+
30
+ Another line of algorithms is to compensate for the insufficient number of available samples by generation. Most methods use the idea of Generative Adversarial Networks (GANs) (Goodfellow et al., 2014) or autoencoder (Rumelhart et al., 1986) to generate samples (Zhang et al. (2018); Chen et al. (2019b); Schwartz et al. (2018); Gao et al. (2018)) or features (Xian et al. (2018); Zhang et al. (2019)) to augment the training set. Specifically, Zhang et al. (2018) and Xian et al. (2018) proposed to synthesize data by introducing an adversarial generator conditioned on tasks. Zhang et al. (2019) tried to learn a variational autoencoder to approximate the distribution and predict labels based on the estimated statistics. The autoencoder can also augment samples by projecting between the visual space and the semantic space (Chen et al., 2019b) or encoding the intra-class deformations (Schwartz et al., 2018). Liu et al. (2019b) and Liu et al. (2019a) propose to generate features through the class hierarchy. While these methods can generate extra samples or features for training, they require the design of a complex model and loss function to learn how to generate. However, our distribution calibration strategy is simple and does not need extra learnable parameters.
31
+
32
+ Data augmentation is a traditional and effective way of increasing the number of training samples. Qin et al. (2020) and Antoniou & Storkey (2019) proposed the used of the traditional data augmentation technique to construct pretext tasks for unsupervised few-shot learning. Wang et al. (2018) and Hariharan & Girshick (2017) leveraged the general idea of data augmentation, they designed a hallucination model to generate the augmented version of the image with different choices for the model’s input, i.e., an image and a noise (Wang et al., 2018) or the concatenation of multiple features (Hariharan & Girshick, 2017). Park et al. (2020); Wang et al. (2019); Liu et al. (2020b) tried to augment feature representations by leveraging intra-class variance. These methods learn to augment from the original samples or their feature representation while we try to estimate the classlevel distribution and thus can eliminate the inductive bias from a single sample and provide more diverse generations from the calibrated distribution.
33
+
34
+ # 3 MAIN APPROACH
35
+
36
+ In this section, we introduce the few-shot classification problem definition in Section 3.1 and details of our proposed approach in Section 3.2.
37
+
38
+ # 3.1 PROBLEM DEFINITION
39
+
40
+ We follow a typical few-shot classification setting. Given a dataset with data-label pairs $\mathcal { D } =$ $\{ ( x _ { i } , y _ { i } ) \}$ where $\pmb { x } _ { i } \in \mathbb { R } ^ { d }$ is the feature vector of a sample and $y _ { i } \in C$ , where $C$ denotes the set of
41
+ classes. This set of classes is divided into base classes $C _ { b }$ and novel classes $C _ { n }$ , where $C _ { b } \cap C _ { n } = \emptyset$
42
+ and $C _ { b } \cup C _ { n } = C$ . The goal is to train a model on the data from the base classes so that the model
43
+ can generalize well on tasks sampled from the novel classes. In order to evaluate the fast adaptation
44
+ ability or the generalization ability of the model, there are only a few available labeled samples for
45
+ each task $\tau$ . The most common way to build a task is called an N-way-K-shot task (Vinyals et al.
46
+ (2016)), where $\mathbf { N }$ classes are sampled from the novel set and only $\mathbf { K }$ (e.g., 1 or 5) labeled samples are
47
+ provideand the for each class. The few available labeodel is evaluated on another query set set , wh $\boldsymbol { S } = \{ ( \boldsymbol { x } _ { i } , y _ { i } ) \} _ { i = 1 } ^ { N \times K }$ $\mathcal { Q } = \{ ( \pmb { x } _ { i } , y _ { i } ) \} _ { i = N \times K + 1 } ^ { N \times K + N \times q }$ $q$
48
+ query set of) multiple tasks sampled from the novel classes.
49
+
50
+ # 3.2 DISTRIBUTION CALIBRATION
51
+
52
+ As introduced in Section 3.1, the base classes have a sufficient amount of data while the evaluation tasks sampled from the novel classes only have a limited number of labeled samples. The statistics of the distribution for the base class can be estimated more accurately compared to the estimation based on few-shot samples, which is an ill-posed problem. As shown in Table 1, we observe that if we assume the feature distribution is Gaussian, the mean and variance with respect to each class are correlated to the semantic similarity of each class. With this in mind, the statistics can be transferred from the base classes to the novel classes if we learn how similar the two classes are. In the following sections, we discuss how we calibrate the distribution estimation of the classes with only a few samples (Section 3.2.2) with the help of the statistics of the base classes (Section 3.2.1). We will also elaborate on how do we leverage the calibrated distribution to improve the performance of few-shot learning (Section 3.2.3).
53
+
54
+ Note that our distribution calibration strategy is over the feature-level and is agnostic to any feature extractor. Thus, it can be built on top of any pretrained feature extractors without further costly finetuning. In our experiments, we use the pretrained WideResNet Zagoruyko & Komodakis (2016) following previous work (Mangla et al. (2020)). The WideResNet is trained to classify the base classes, along with a self-supervised pretext task to learn the general-purpose representations suitable for image understanding tasks. Please refer to their paper for more details on training the feature extractor.
55
+
56
+ # Algorithm 1 Training procedure for an N-way-K-shot task
57
+
58
+ $\pmb { S } = ( \pmb { x } _ { i } , y ) _ { i = 1 } ^ { N \times K }$ $\{ \pmb { \mu } _ { i } \} _ { i = 1 } ^ { | C _ { b } | } , \{ \pmb { \Sigma } _ { i } \} _ { i = 1 } ^ { | C _ { b } | }$
59
+
60
+ 1: Transform $\left( \pmb { x } _ { i } \right) _ { i = 1 } ^ { N \times K }$ i=1 i=1with Tukey’s Ladder of Powers as Equation 3
61
+ 2: for $( x _ { i } , y _ { i } ) \in S$ do
62
+ 3: Calibrate the mean $\mu ^ { \prime }$ and the covariance $\pmb { \Sigma } ^ { \prime }$ for class $y _ { i }$ using $\mathbf { \Delta } \mathbf { x } _ { i }$ with Equation 6
63
+ 4: Sample features for class $y _ { i }$ from the calibrated distribution as Equation 7
64
+ 5: end for
65
+ 6: Train a classifier using both support set features and all sampled features as Equation 8
66
+
67
+ # 3.2.1 STATISTICS OF THE BASE CLASSES
68
+
69
+ We assume the feature distribution of base classes is Gaussian. The mean of the feature vector from a base class $i$ is calculated as the mean of every single dimension in the vector:
70
+
71
+ $$
72
+ \mu _ { i } = \frac { \sum _ { j = 1 } ^ { n _ { i } } { \pmb x } _ { j } } { n _ { i } } ,
73
+ $$
74
+
75
+ where $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { j } }$ is a feature vector of the $j$ -th sample from the base class $i$ and $n _ { i }$ is the total number of samples in class $i$ . As the feature vector $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { j } }$ is multi-dimensional, we use covariance for a better representation of the variance between any pair of elements in the feature vector. The covariance matrix $\Sigma _ { i }$ for the features from class $i$ is calculated as:
76
+
77
+ $$
78
+ \pmb { \Sigma } _ { i } = \frac { 1 } { n _ { i } - 1 } \sum _ { j = 1 } ^ { n _ { i } } \left( \pmb { x } _ { j } - \pmb { \mu } _ { i } \right) \left( \pmb { x } _ { j } - \pmb { \mu } _ { i } \right) ^ { T } .
79
+ $$
80
+
81
+ # 3.2.2 CALIBRATING STATISTICS OF THE NOVEL CLASSES
82
+
83
+ Here, we consider an N-way-K-shot task sampled from the novel classes.
84
+
85
+ # Tukey’s Ladder of Powers Transformation
86
+
87
+ To make the feature distribution more Gaussian-like, we first transform the features of the support set and query set in the target task using Tukey’s Ladder of Powers transformation (Tukey (1977)). Tukey’s Ladder of Powers transformation is a family of power transformations which can reduce the skewness of distributions and make distributions more Gaussian-like. Tukey’s Ladder of Powers transformation is formulated as:
88
+
89
+ $$
90
+ \tilde { \mathbf { x } } = \left\{ \begin{array} { l l } { x ^ { \lambda } } & { \mathrm { ~ i f ~ } \lambda \neq 0 } \\ { \log ( \pmb { x } ) } & { \mathrm { ~ i f ~ } \lambda = 0 } \end{array} \right.
91
+ $$
92
+
93
+ where $\lambda$ is a hyper-parameter to adjust how to correct the distribution. The original feature can be recovered by setting $\lambda$ as 1. Decreasing $\lambda$ makes the distribution less positively skewed and vice versa.
94
+
95
+ # Calibration through statistics transfer
96
+
97
+ Using the statistics from the base classes introduced in Section 3.2.1, we transfer the statistics from the base classes which are estimated more accurately on sufficient data to the novel classes. The transfer is based on the Euclidean distance between the feature space of the novel classes and the mean of the features from the base classes $\pmb { \mu _ { i } }$ as computed in Equation 1. Specifically, we select the top $k$ base classes with the closest distance to the feature of a sample $\tilde { \pmb x }$ from the support set:
98
+
99
+ $$
100
+ \begin{array} { r } { \mathbb { S } _ { d } = \{ - \| \pmb { \mu } _ { i } - \tilde { \pmb { x } } \| ^ { 2 } | i \in C _ { b } \} , } \\ { \mathbb { S } _ { N } = \{ i | - \| \pmb { \mu } _ { i } - \tilde { \pmb { x } } \| ^ { 2 } \in t o p k ( \mathbb { S } _ { d } ) \} , } \end{array}
101
+ $$
102
+
103
+ where $t o p k ( \cdot )$ is an operator to select the top elements from the input distance set $\mathbb { S } _ { d }$ . $\mathbb { S } _ { N }$ stores the $k$ nearest base classes with respect to a feature vector $\tilde { \pmb x }$ . Then, the mean and covariance of the distribution is calibrated by the statistics from the nearest base classes:
104
+
105
+ $$
106
+ \pmb { \mu } ^ { \prime } = \frac { \sum _ { i \in \mathbb { S } _ { N } } \pmb { \mu } _ { i } + \tilde { \pmb { x } } } { k + 1 } , \pmb { \Sigma } ^ { \prime } = \frac { \sum _ { i \in \mathbb { S } _ { N } } \pmb { \Sigma } _ { i } } { k } + \alpha ,
107
+ $$
108
+
109
+ Table 2: 5way1shot and 5way5shot classification accuracy $( \% )$ on miniImageNet and CUB with $9 5 \%$ confidence intervals. The numbers in bold have intersecting confidence intervals with the most accurate method.
110
+
111
+ <table><tr><td rowspan="2">Methods</td><td colspan="2">miniImageNet</td><td colspan="2">CUB</td></tr><tr><td>5way1shot</td><td>5way5shot</td><td>5way1shot</td><td>5way5shot</td></tr><tr><td>Optimization-based</td><td></td><td></td><td></td><td></td></tr><tr><td>MAML (Finn et al. (2017))</td><td>48.70 ±1.84</td><td>63.10 ± 0.92</td><td>50.45 ±0.97 59.60 ± 0.84</td><td></td></tr><tr><td>Meta-SGD (Li et al. (2017))</td><td>50.47 ± 1.87</td><td>64.03 ±0.94</td><td>53.34± 0.97</td><td>67.59 ±0.82</td></tr><tr><td>LEO (Rusu et al. (2019))</td><td>61.76 ± 0.08</td><td>77.59 ± 0.12</td><td></td><td></td></tr><tr><td>E3BM (Liu et al. (2020c))</td><td>63.80 ±0.40</td><td>80.29 ±0.25</td><td></td><td></td></tr><tr><td>Metric-based</td><td></td><td></td><td></td><td></td></tr><tr><td>Matching Net (Vinyals et al. (2016))</td><td>43.56 ± 0.84</td><td>55.31 ± 0.73</td><td>56.53 ± 0.99</td><td>63.54 ± 0.85</td></tr><tr><td>Prototypical Net (Snell et al. (2017))</td><td>54.16 ± 0.82</td><td>73.68 ±0.65</td><td>72.99±0.88</td><td>86.64± 0.51</td></tr><tr><td>Baseline++ (Chen et al. (2019a))</td><td>51.87 ± 0.77</td><td>75.68 ± 0.63</td><td>67.02 ±0.90</td><td>83.58 ± 0.54</td></tr><tr><td>Variational Few-shot(Zhang et al. (2019))</td><td>61.23 ±0.26</td><td>77.69 ± 0.17</td><td></td><td></td></tr><tr><td>Negative-Cosine(Liu et al. (2020a))</td><td>62.33 ±0.82</td><td>80.94± 0.59</td><td>72.66 ± 0.85</td><td>89.40 ± 0.43</td></tr><tr><td>Generation-based</td><td></td><td></td><td></td><td></td></tr><tr><td>MetaGAN (Zhang et al. (2018))</td><td>52.71 ± 0.64</td><td>68.63±0.67</td><td></td><td></td></tr><tr><td>Delta-Encoder (Schwartz et al. (2018))</td><td>59.9</td><td>69.7</td><td>69.8</td><td>82.6</td></tr><tr><td>TriNet (Chen et al. (2019b))</td><td>58.12 ± 1.37</td><td>76.92 ±0.69</td><td>69.61± 0.46</td><td>84.10 ± 0.35</td></tr><tr><td>Meta Variance Transfer (Park etal. (2020))</td><td>-</td><td>67.67 ± 0.70</td><td>1</td><td>80.33 ±0.61</td></tr><tr><td>Maximum Likelihood with DC (Ours)</td><td>66.91± 0.17</td><td>80.74±0.48</td><td>77.22± 0.14</td><td>89.58±0.27</td></tr><tr><td>SVM with DC (Ours)</td><td>67.31 ± 0.83</td><td>82.30 ± 0.34</td><td>79.49 ± 0.33</td><td>90.26 ± 0.98</td></tr><tr><td>Logistic Regression with DC (Ours)</td><td>68.57 ± 0.55</td><td>82.88 ± 0.42</td><td>79.56 ± 0.87</td><td>90.67 ± 0.35</td></tr></table>
112
+
113
+ where $\alpha$ is a hyper-parameter that determines the degree of dispersion of features sampled from the calibrated distribution.
114
+
115
+ For few-shot learning with more than one shot, the aforementioned procedure of the distribution calibration should be undertaken multiple times with each time using one feature vector from the support set. This avoids the bias provided by one specific sample and potentially achieves more diverse and accurate distribution estimation. Thus, for simplicity, we denote the calibrated distribution as a set of statistics. For a class $y \in C _ { n }$ , we denote the set of statistics as $\mathbb { S } _ { y } = \{ ( \boldsymbol { \mu } _ { 1 } ^ { \prime } , \boldsymbol { \Sigma } _ { 1 } ^ { \prime } ) , . . . , ( \boldsymbol { \mu } _ { K } ^ { \prime } , \boldsymbol { \Sigma } _ { K } ^ { \prime } ) \}$ , where $\mu _ { i } ^ { ' } , \Sigma _ { i } ^ { ' }$ are the calibrated mean and covariance, respectively, computed based on the $i$ -th feature in the support set of class $y$ . Here, the size of the set is the value of $K$ for an $\mathbf { N } .$ -way-K-shot task.
116
+
117
+ # 3.2.3 HOW TO LEVERAGE THE CALIBRATED DISTRIBUTION?
118
+
119
+ With a set of calibrated statistics $\mathbb { S } _ { y }$ for class $y$ in a target task, we generate a set of feature vectors with label $y$ by sampling from the calibrated Gaussian distributions:
120
+
121
+ $$
122
+ \mathbb { D } _ { y } = \{ ( \boldsymbol { x } , y ) | \boldsymbol { x } \sim \mathcal { N } ( \boldsymbol { \mu } , \boldsymbol { \Sigma } ) , \forall ( \boldsymbol { \mu } , \boldsymbol { \Sigma } ) \in \mathbb { S } ^ { y } \} .
123
+ $$
124
+
125
+ Here, the total number of generated features per class is set as a hyperparameter and they are equally distributed for every calibrated distribution in $\mathbb { S } _ { y }$ . The generated features along with the original support set features for a few-shot task is then served as the training data for a task-specific classifier. We train the classifier for a task by minimizing the cross-entropy loss over both the features of its support set $s$ and the generated features $\mathbb { D } _ { y }$ :
126
+
127
+ $$
128
+ \ell = \sum _ { ( \pmb { x } , y ) \sim \tilde { S } \cup \mathbb { D } _ { y , y \in \mathcal { V } } \mathcal { T } } - \log \operatorname* { P r } ( y | \pmb { x } ; \theta ) ,
129
+ $$
130
+
131
+ where $y ^ { \tau }$ is the set of classes for the task $\tau$ . $\tilde { \cal S }$ denotes the support set with features transformed by Turkey’s Ladder of Powers transformation and the classifier model is parameterized by $\theta$ .
132
+
133
+ # 4 EXPERIMENTS
134
+
135
+ In this section, we answer the following questions:
136
+
137
+ • How does our distribution calibration strategy perform compared to the state-of-the-art methods?
138
+
139
+ Table 3: 5way1shot and 5way5shot classification accuracy $( \% )$ on tieredImageNet (Ren et al., 2018). The numbers in bold have intersecting confidence intervals with the most accurate method.
140
+
141
+ <table><tr><td>Methods</td><td colspan="2">tieredImageNet</td></tr><tr><td></td><td>5way1shot</td><td>5way5shot</td></tr><tr><td>Matching Net (Vinyals et al. (2016))</td><td>68.50 ± 0.92</td><td>80.60±0.71</td></tr><tr><td>Prototypical Net (Snell et al. (2017))</td><td>65.65 ± 0.92</td><td>83.40 ± 0.65</td></tr><tr><td>LEO (Rusu et al. (2019))</td><td>66.33± ( 0.05</td><td>82.06 ±0.08</td></tr><tr><td>E3BM (Liu et al. (2020c))</td><td>71.20 士 0.40</td><td>85.30 ± 0.30</td></tr><tr><td>DeepEMD (Zhang et al., 2020)</td><td>71.16 ± 0.87</td><td>86.03 ± 0.58</td></tr><tr><td rowspan="2">MaximumLikelihood with DC (Ours) SVM with DC (Ours)</td><td>75.92 士 0.60</td><td>87.84 ± 0.65</td></tr><tr><td>77.93 ± ( 0.12</td><td>89.72 ± 0.37</td></tr><tr><td rowspan="2">Logistic Regression with DC (Ours)</td><td>78.19 ± 0.25</td><td>89.90 ± 0.41</td></tr><tr><td></td><td></td></tr></table>
142
+
143
+ • What does calibrated distribution look like? Is it an accurate approximation for this class? • How does Tukey’s Ladder of Power transformation interact with the feature generations? How important is each in relation to performance?
144
+
145
+ # 4.1 EXPERIMENTAL SETUP
146
+
147
+ # 4.1.1 DATASETS
148
+
149
+ We evaluate our distribution calibration strategy on miniImageNet (Ravi & Larochelle (2017)), tieredImageNet (Ren et al. (2018)) and CUB (Welinder et al. (2010)). miniImageNet and tieredImageNet have a brand range of classes including various animals and objects while CUB is a more fine-grained dataset that includes various species of birds. Datasets with different levels of granularity may have different distributions for their feature space. We want to show the effectiveness and generality of our strategy on all three datasets.
150
+
151
+ miniImageNet is derived from ILSVRC-12 dataset (Russakovsky et al., 2014). It contains 100 diverse classes with 600 samples per class. The image size is $8 4 \times 8 4 \times 3$ . We follow the splits used in previous works (Ravi & Larochelle, 2017), which split the dataset into 64 base classes, 16 validation classes, and 20 novel classes.
152
+
153
+ tieredImageNet is a larger subset of ILSVRC-12 dataset (Russakovsky et al., 2014), which contains 608 classes sampled from hierarchical category structure. Each class belongs to one of 34 higherlevel categories sampled from the high-level nodes in the ImageNet. The average number of images in each class is 1281. We use 351, 97, and 160 classes for training, validation, and test, respectively.
154
+
155
+ CUB is a fine-grained few-shot classification benchmark. It contains 200 different classes of birds with a total of 11,788 images of size $8 4 \times 8 4 \times 3$ . Following previous works (Chen et al., 2019a), we split the dataset into 100 base classes, 50 validation classes, and 50 novel classes.
156
+
157
+ # 4.1.2 EVALUATION METRIC
158
+
159
+ We use the top-1 accuracy as the evaluation metric to measure the performance of our method. We report the accuracy on 5way1shot and 5way5shot settings for miniImageNet, tieredImageNet and CUB. The reported results are the averaged classification accuracy over 10,000 tasks.
160
+
161
+ # 4.1.3 IMPLEMENTATION DETAILS
162
+
163
+ For feature extractor, we use the WideResNet (Zagoruyko & Komodakis, 2016) trained following previous work (Mangla et al. (2020)). For each dataset, we train the feature extractor with base classes and test the performance using novel classes. Note that the feature representation is extracted from the penultimate layer (with a ReLU activation function) from the feature extractor, thus the values are all non-negative so that the inputs to Tukey’s Ladder of Powers transformation in Equation 3 are valid. At the distribution calibration stage, we compute the base class statistics and transfer them to calibrate novel class distribution for each dataset. We use the LR and SVM implementation of scikit-learn (Pedregosa et al. (2011)) with the default settings. We use the same hyperparameter value for all datasets except for $\alpha$ . Specifically, the number of generated features is 750; $k = 2$ and $\lambda = 0 . 5$ . $\alpha$ is 0.21, 0.21 and 0.3 for miniImageNet, tieredImageNet and CUB, respectively.
164
+
165
+ ![](images/deecfda56372ac9b0994653778df74588488d220e75ca612d156efd4b51701da.jpg)
166
+ Figure 2: t-SNE visualization of our distribution estimation. Different colors represent different classes. ‘F’ represents support set features, $\mathbf { \dot { x } } _ { } ,$ in figure (d) represents query set features, $\mathbf { \check { \Psi } } _ { \mathbf { A } } \mathbf { \Psi } ^ { * }$ in figure (b)(c) represents generated features.
167
+
168
+ ![](images/225124df96764e8072f5bdd807a6440c9593e2d01102fc20827feba072ac1a98.jpg)
169
+ Figure 3: Left: Accuracy when increasing the power in Tukey’s transformation when training with (red) or without (blue) the generated features. Right: Accuracy when increasing the number of generated features with the features are transformed by Tukey’s transformation (red) and without Tukey’s transformation (blue).
170
+
171
+ # 4.2 COMPARISION TO STATE-OF-THE-ART
172
+
173
+ Table 2 and Table 3 presents the 5way1shot and 5way5shot classification results of our method on miniImageNet, tieredImageNet and CUB. We compare our method with the three groups of the fewshot learning method, optimization-based, metric-based, and generation-based. Our method can be built on top of any classifier, and we use two popular and simple classifiers, namely SVM and LR to prove the effectiveness of our method. Simple linear classifiers equipped with our method perform better than the state-of-the-art few-shot classification method and achieve the best performance on 1-shot and 5-shot settings of miniImageNet, tieredImageNet and CUB. The performance of our distribution calibration surpasses the state-of-the-art generation-based method by $10 \%$ for the 5way1shot setting, which proves that our method can handle extremely low-shot classification tasks better. Compared to other generation-based methods, which require the design of a generative model with extra training costs on the learnable parameters, simple machine learning classifier with DC is much more simple, effective and flexible and can be equipped with any feature extractors and classifier model structures. Specifically, we show three variants, i.e, Maximum likelihood with DC, SVM with DC, Logistic Regression with DC in Table 2 and Table 3. A simple maximum likelihood classifier based on the calibrated distribution can outperform previous baselines and training a SVM classifier or Logistic Regression classifier using the samples from the calibrated distribution can further improve the performance.
174
+
175
+ # 4.3 VISUALIZATION OF GENERATED SAMPLES
176
+
177
+ We show what the calibrated distribution looks like by visualizing the generated features sampled from the distribution. In Figure 2, we show the t-SNE representation (van der Maaten & Hinton (2008)) of the original support set (a), the generated features (b,c) as well as the query set (d). Based on the calibrated distribution, the sampled features form a Gaussian distribution and more samples (c) can have a more comprehensive representation of the distribution. Due to the limited number of examples in the support set, only 1 in this case, the samples from the query set usually cover a greater area and are a mismatch with the support set. This mismatch can be fixed to some extent by the generated features, i.e., the generated features in (c) can overlap areas of the query set. Thus, training with these generated features can alleviate the mismatch between the distribution estimated only from the few-shot samples and the ground truth distribution.
178
+
179
+ Table 4: Ablation study on miniImageNet 5way1shot and 5way5shot showing accuracy $( \% )$ with $9 5 \%$ confidence intervals.
180
+
181
+ <table><tr><td rowspan="2"></td><td rowspan="2">Tukey transformationTraining with generated features</td><td colspan="2">miniImageNet</td></tr><tr><td>5way1shot</td><td>5way5shot</td></tr><tr><td>X</td><td>X</td><td>56.37± 0.68</td><td>79.03 ± 0.51</td></tr><tr><td></td><td>X</td><td>64.30 ± 0.53</td><td>81.33 ± 0.35</td></tr><tr><td>X</td><td>√</td><td>63.70 ± 0.38</td><td>82.26 ± 0.73</td></tr><tr><td>√</td><td>~</td><td>68.57 ± 0.55</td><td>82.88 ± 0.42</td></tr></table>
182
+
183
+ Table 5: 5way1shot classification accuracy $( \% )$ on miniImageNet with different backbones.
184
+
185
+ <table><tr><td>Backbones</td><td>without DC</td><td>with DC</td></tr><tr><td>conv4 (Chen et al., 2019a)</td><td>42.11 ± 0.71</td><td>54.62± 0.64 (个12.51)</td></tr><tr><td>conv6 (Chen et al., 2019a)</td><td>46.07 ± 0.26</td><td>57.14 ± 0.45 (个 11.07)</td></tr><tr><td>resnet18 (Chen et al., 2019a)</td><td>52.32 土 0.82</td><td>61.50 士 0.47 (个 9.180)</td></tr><tr><td>WRN28 (Mangla etal., 2020)</td><td>54.53± 0.56</td><td>64.38 士 0.63 (个 9.850)</td></tr><tr><td>WRN28 + Rotation Loss (Mangla et al., 2020)</td><td>56.37 ± 0.68</td><td>68.57 士 0.55 5(个12.20)</td></tr></table>
186
+
187
+ # 4.4 APPLICABILITY OF DISTRIBUTION CALIBRATION
188
+
189
+ # Applying distribution calibration on different backbones
190
+
191
+ Our distribution calibration strategy is agnostic to backbones $/$ feature extractors. Table 5 shows the consistent performance boost when applying distribution calibration on different feature extractors, i.e, four convolutional layers (conv4), six convolutional layers (conv6), resnet18, WRN28 and WRN28 trained with rotation loss. Distribution calibration achieves around $10 \%$ accuracy improvement compared to the backbones trained with different baselines.
192
+
193
+ # Applying distribution calibration on other baselines
194
+
195
+ A variety of works can benefit from training with the features generated by our distribution calibration strategy. We apply our distribution calibration strategy on two simple few-shot classification algorithms, Baseline (Chen et al., 2019a) and Baseline $^ { + + }$ (Chen et al., 2019a). Table 6 shows that our distribution calibration brings over $10 \%$ of accuracy improvement on both.
196
+
197
+ # 4.5 EFFECTS OF FEATURE TRANSFORMATION AND TRAINING WITH GENERATED FEATURES
198
+
199
+ # Ablation Study
200
+
201
+ Table 4 shows the performance when our model is trained without Tukey’s Ladder of Powers transformation for the features as in Equation 3 and when it is trained without the generated features as in Equation 7. It is clear that there is a severe decline in performance of over $10 \%$ if both are not used in the 5way1shot setting. The ablation of either one results in a performance drop of around $5 \%$ in the 5way1shot setting.
202
+
203
+ # Choices of Power for Tukey’s Ladder of Powers Transformation
204
+
205
+ The left side of Figure 3 shows the 5way1shot accuracy when choosing different powers for the Tukey’s transformation in Equation 3 when training the classifier with the generated features (red) and without (blue). Note that when the power $\lambda$ equals 1, the transformation keeps the original feature representations. There is a consistent general tendency for training with and without the generated features and in both cases, we found $\lambda = 0 . 5$ is the optimum choice. With the Tukey’s transformation, the distribution of query set features in target tasks become more aligned to the calibrated Gaussian distribution, thus benefits the classifier which is trained on features sampled from the calibrated distribution.
206
+
207
+ Table 6: 5way1shot classification accuracy $( \% )$ on miniImageNet with different baselines using distribution calibration.
208
+
209
+ <table><tr><td>Method</td><td>without DC</td><td>with DC</td></tr><tr><td>Baseline (Chen et al.,2019a) Baseline++ (Chen et al.,2019a)</td><td>42.11±0.71 48.24 ± 0.75</td><td>54.62 ± 0.64 (个 12.51) 61.24 ± 0.37 (个13.00)</td></tr></table>
210
+
211
+ # Number of generated features
212
+
213
+ The right side of Figure 3 analyzes whether more generated features results in consistent improvement in both cases, namely when the features of support and query set are transformed by Tukey’s transformation (red) and when they are not (blue). We found that when the number of generated features is below 500, both cases can benefit from more generated features. However, when more features are sampled, the performance of the classifier tested on untransformed features begins to decline. By training with the generated samples, the simple logistic regression classifier has a $12 \%$ relative performance improvement in a 1-shot classification setting.
214
+
215
+ # 4.6 OTHER HYPER-PARAMETERS
216
+
217
+ We select the hyperparameters based on the performance of the validation set. The $k$ base class statistics to calibrate the novel class distribution in Equation 5 is set to 2. Figure 4 shows the effect of different values of $k$ . The $\alpha$ in Equation 6 is a constant added on each element of the estimated covariance matrix, which can determine the degree of dispersion of features sampled from the calibrated distributions. An appropriate value of $\alpha$ can ensure a good decision boundary for the classifier. Different datasets have different statistics and an appropriate value of $\alpha$ may vary for different datasets. Figure 5 explores the effect of $\alpha$ on all three datasets, i.e. miniImageNet, tieredImageNet and CUB. We observe that in each dataset, the performance of the validation set and the novel (testing) set generally has the same tendency, which indicates that the variance is dataset-dependent and is not overfitting to a specific set.
218
+
219
+ ![](images/6c98d8c600fda1cf93a0bef20bb528be60e2ba30644285b61ad6f647f5bae774.jpg)
220
+ Figure 4: The effect of different values of $k$ .
221
+
222
+ ![](images/99d76257658bffe4a53b0ccea91b4619d0c3d8a51aeb9a45d4da77130bf715b8.jpg)
223
+ Figure 5: The effect of different values of $\alpha$
224
+
225
+ # 5 CONCLUSION AND FUTURE WORKS
226
+
227
+ We propose a simple but effective distribution calibration strategy for few-shot classification. Without complex generative models, training loss and extra parameters to learn, a simple logistic regression trained with features generated by our strategy outperforms the current state-of-the-art methods by $\sim 5 \%$ on miniImageNet. The calibrated distribution is visualized and demonstrates an accurate estimation of the feature distribution. Future works will explore the applicability of distribution calibration on more problem settings, such as multi-domain few-shot classification, and more methods, such as metric-based meta-learning algorithms.
228
+
229
+ # REFERENCES
230
+
231
+ Antreas Antoniou and Amos J. Storkey. Assume, augment and learn: Unsupervised few-shot metalearning via random labels and data augmentation. CoRR, 2019.
232
+
233
+ Wei-Yu Chen, Yen-Cheng Liu, Zsolt Kira, Yu-Chiang Frank Wang, and Jia-Bin Huang. A closer look at few-shot classification. In ICLR, 2019a.
234
+
235
+ Zitian Chen, Yanwei Fu, Yinda Zhang, Yu-Gang Jiang, Xiangyang Xue, and Leonid Sigal. Multilevel semantic feature augmentation for one-shot learning. TIP, 28(9):4594–4605, 2019b.
236
+
237
+ Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In ICML, 2017.
238
+
239
+ Hang Gao, Zheng Shou, Alireza Zareian, Hanwang Zhang, and Shih-Fu Chang. Low-shot learning via covariance-preserving adversarial augmentation networks. In NeurIPS, 2018.
240
+
241
+ Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NeurIPS, 2014.
242
+
243
+ Bharath Hariharan and Ross Girshick. Low-shot visual recognition by shrinking and hallucinating features. In ICCV, 2017.
244
+
245
+ Zhenguo Li, Fengwei Zhou, Fei Chen, and Hang Li. Meta-sgd: Learning to learn quickly for few shot learning. CoRR, 2017.
246
+
247
+ Bin Liu, Yue Cao, Yutong Lin, Qi Li, Zheng Zhang, Mingsheng Long, and Han Hu. Negative margin matters: Understanding margin in few-shot classification. In ECCV, 2020a.
248
+
249
+ Jialun Liu, Yifan Sun, Chuchu Han, Zhaopeng Dou, and Wenhui Li. Deep representation learning on long-tailed data: A learnable embedding augmentation perspective. In CVPR, June 2020b.
250
+
251
+ Lu Liu, Tianyi Zhou, Guodong Long, Jing Jiang, Lina Yao, and Chengqi Zhang. Prototype propagation networks (PPN) for weakly-supervised few-shot learning on category graph. In IJCAI, 2019a.
252
+
253
+ Lu Liu, Tianyi Zhou, Guodong Long, Jing Jiang, and Chengqi Zhang. Learning to propagate for graph meta-learning. In NeurIPS, 2019b.
254
+
255
+ Yaoyao Liu, Bernt Schiele, and Qianru Sun. An ensemble of epoch-wise empirical bayes for fewshot learning. In ECCV, 2020c.
256
+
257
+ Puneet Mangla, Nupur Kumari, Abhishek Sinha, Mayank Singh, Balaji Krishnamurthy, and Vineeth N Balasubramanian. Charting the right manifold: Manifold mixup for few-shot learning. In WACV, 2020.
258
+
259
+ Seong-Jin Park, Seungju Han, Ji-won Baek, Insoo Kim, Juhwan Song, Hae Beom Lee, Jae-Joon Han, and Sung Ju Hwang. Meta variance transfer: Learning to augment from the others. In ICML, 2020.
260
+
261
+ F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011.
262
+
263
+ Tiexin Qin, Wenbin Li, Yinghuan Shi, and Yang Gao. Diversity helps: Unsupervised few-shot learning via distribution shift-based data augmentation, 2020.
264
+
265
+ Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. In ICLR, 2017.
266
+
267
+ Mengye Ren, Eleni Triantafillou, Sachin Ravi, Jake Snell, Kevin Swersky, Joshua B Tenenbaum, Hugo Larochelle, and Richard S Zemel. Meta-learning for semi-supervised few-shot classification. In ICLR, 2018.
268
+
269
+ David E. Rumelhart, Geoffrey E. Hinton, and Ronald J. Williams. Learning Representations by Back-propagating Errors. Nature, 323:533–536, 1986.
270
+ Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael S. Bernstein, Alexander C. Berg, and Fei-Fei Li. Imagenet large scale visual recognition challenge. CoRR, abs/1409.0575, 2014.
271
+ Andrei A. Rusu, Dushyant Rao, Jakub Sygnowski, Oriol Vinyals, Razvan Pascanu, Simon Osindero, and Raia Hadsell. Meta-learning with latent embedding optimization. In ICLR, 2019.
272
+ Ruslan Salakhutdinov, Joshua Tenenbaum, and Antonio Torralba. One-shot learning with a hierarchical nonparametric bayesian model. In ICML workshop, 2012.
273
+ Eli Schwartz, Leonid Karlinsky, Joseph Shtok, Sivan Harary, Mattias Marder, Abhishek Kumar, Rogerio Feris, Raja Giryes, and Alex Bronstein. Delta-encoder: an effective sample synthesis method for few-shot object recognition. In NeurIPS, 2018.
274
+ Jake Snell, Kevin Swersky, and Richard S. Zemel. Prototypical networks for few-shot learning. In NeurIPS, 2017.
275
+ John W Tukey. Exploratory data analysis. Addison-Wesley Series in Behavioral Science. AddisonWesley, Reading, MA, 1977. URL https://cds.cern.ch/record/107005.
276
+ Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-SNE. Journal of Machine Learning Research, 2008.
277
+ Oriol Vinyals, Charles Blundell, Tim Lillicrap, Koray Kavukcuoglu, and Daan Wierstra. Matching networks for one shot learning. In NeurIPS, 2016.
278
+ Yu-Xiong Wang, Ross Girshick, Martial Hebert, and Bharath Hariharan. Low-shot learning from imaginary data. In CVPR, 2018.
279
+ Yulin Wang, Xuran Pan, Shiji Song, Hong Zhang, Gao Huang, and Cheng Wu. Implicit semantic data augmentation for deep networks. In NeurIPS, 2019.
280
+ P. Welinder, S. Branson, T. Mita, C. Wah, F. Schroff, S. Belongie, and P. Perona. Caltech-UCSD Birds 200. Technical Report CNS-TR-2010-001, California Institute of Technology, 2010.
281
+ Yongqin Xian, Tobias Lorenz, Bernt Schiele, and Zeynep Akata. Feature generating networks for zero-shot learning. In CVPR, 2018.
282
+ Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. In BMVC, 2016.
283
+ Chi Zhang, Yujun Cai, Guosheng Lin, and Chunhua Shen. Deepemd: Few-shot image classification with differentiable earth mover’s distance and structured classifiers. In CVPR, 2020.
284
+ Jian Zhang, Chenglong Zhao, Bingbing Ni, Minghao Xu, and Xiaokang Yang. Variational few-shot learning. In ICCV, 2019.
285
+ Ruixiang Zhang, Tong Che, Zoubin Ghahramani, Yoshua Bengio, and Yangqiu Song. Metagan: An adversarial approach to few-shot learning. In NeurIPS, 2018.
286
+
287
+ ![](images/0a660f4a0195daaa4161ed37a66854e795c54db5921767dfa35670ef13d69928.jpg)
288
+ Figure 6: We show the feature distribution of 5 base classes, and the feature distribution of 5 novel classes before/after Tukey’s Transformation.
289
+
290
+ Table 7: The comparison with nearest class feature augmentation.
291
+
292
+ <table><tr><td>Training data</td><td>miniImageNet 5way1shot</td></tr><tr><td>Support set only</td><td>56.37±0.68</td></tr><tr><td>Support set + 1 feature from the nearest class</td><td>62.39 ± 0.49</td></tr><tr><td>Support set + 5 features from the nearest class</td><td>59.73 ± 0.42</td></tr><tr><td>Support set + 1O features from the nearest class</td><td>58.93 ± 0.49</td></tr><tr><td>Support set+1OO features from the nearest class</td><td>57.33 ± 0.48</td></tr><tr><td>Support set + 1OO features sampled from calibrated distribution</td><td>68.53 ± 0.32</td></tr></table>
293
+
294
+ # A AUGMENTATION WITH NEAREST CLASS FEATURES
295
+
296
+ Instead of sampling from the calibrated distribution, we can simply retrieve examples from the nearest class to augment the support set. Table 7 shows the comparison of training using samples from the calibrated distribution, the different number of retrieved features from the nearest class, and only using the support set. We found the retrieved features can improve the performance compared to only using the support set but can damage the performance when increasing the number of retrieved features, where the retrieved samples probably serve as noisy data for tasks targeting different classes.
297
+
298
+ # B DISTRIBUTION CALIBRATION WITHOUT NOVEL FEATURE
299
+
300
+ We calibrate the novel class mean by averaging the novel class mean and the retrieved base class means in Equation 6. Table 8 shows the distribution calibration without averaging novel feature, in which the calibrated mean is calculated as $\begin{array} { r } { \pmb { \mu } ^ { \prime } = \frac { \Sigma _ { i \in \mathbb { S } _ { N } } \pmb { \mu } _ { i } } { k } } \end{array}$ .
301
+
302
+ # C THE EFFECTS OF TUKEY’S TRANSFORMATION
303
+
304
+ Figure 6 shows the distribution of 5 base classes and 5 novel classes before/after Tukey’s transformation. It is observed that the base class distribution satisfies Gaussian assumption well (left) while the novel class distribution is more skew (middle). The novel class distribution after Tukey’s transformation (right) is more aligned with the Gaussian-like base class distribution.
305
+
306
+ Table 8: The comparison between distribution calibration with and without novel feature $\tilde { \pmb x }$ .
307
+
308
+ <table><tr><td></td><td>miniImageNet 5way1shot</td></tr><tr><td>Distribution Calibration w/o novel feature x</td><td>59.38 ± 0.73</td></tr><tr><td>Distribution Calibration w/ novel feature x</td><td>68.57 ± 0.55</td></tr></table>
309
+
310
+ <table><tr><td>Novel class</td><td>Top-1 base class similarity</td><td>Top-2 base class similarity</td><td>DC improvement</td></tr><tr><td>malamute</td><td>93%</td><td>85%</td><td>↑21.30%</td></tr><tr><td>golden retriever</td><td>85%</td><td>74%</td><td>个 18.37%</td></tr><tr><td>ant</td><td>71%</td><td>67%</td><td>↑9.77%</td></tr></table>
311
+
312
+ Table 9: Performance improvement with respect to the similarity level between a query novel class and the most similar base classes.
313
+
314
+ # D THE SIMILARITY LEVEL ANALYSIS
315
+
316
+ We found that the higher similarities between the retrieved base class distribution and the novel class ground-truth distribution, the higher the performance improvement our method will bring as shown in Table 9. The results in the table are under 5-way-1-shot setting.
parse/train/JWOiYxMG92s/JWOiYxMG92s_content_list.json ADDED
@@ -0,0 +1,1560 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "FREE LUNCH FOR FEW-SHOT LEARNING: DISTRIBUTION CALIBRATION ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 669,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Shuo $\\mathbf { Y a n g ^ { 1 } }$ , Lu $\\mathbf { L i u ^ { 2 } }$ , Min $\\mathbf { X } \\mathbf { u } ^ { 1 * }$ 1School of Electrical and Data Engineering, University of Technology Sydney, 2Australian Artificial Intelligence Institute, University of Technology Sydney {shuo.yang, lu.liu-10}@student.uts.edu.au, min.xu@uts.edu.au, ",
17
+ "bbox": [
18
+ 186,
19
+ 169,
20
+ 763,
21
+ 227
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 263,
32
+ 544,
33
+ 279
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Learning from a limited number of samples is challenging since the learned model can easily become overfitted based on the biased distribution formed by only a few training examples. In this paper, we calibrate the distribution of these fewsample classes by transferring statistics from the classes with sufficient examples. Then an adequate number of examples can be sampled from the calibrated distribution to expand the inputs to the classifier. We assume every dimension in the feature representation follows a Gaussian distribution so that the mean and the variance of the distribution can borrow from that of similar classes whose statistics are better estimated with an adequate number of samples. Our method can be built on top of off-the-shelf pretrained feature extractors and classification models without extra parameters. We show that a simple logistic regression classifier trained using the features sampled from our calibrated distribution can outperform the state-of-the-art accuracy on three datasets $5 \\%$ improvement on miniImageNet compared to the next best). The visualization of these generated features demonstrates that our calibrated distribution is an accurate estimation. The code is available at: https://github.com/ShuoYang-1998/Few_ Shot_Distribution_Calibration ",
40
+ "bbox": [
41
+ 232,
42
+ 297,
43
+ 766,
44
+ 532
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 564,
55
+ 336,
56
+ 580
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Learning from a limited number of training samples has drawn increasing attention due to the high cost of collecting and annotating a large amount of data. Researchers have developed algorithms to improve the performance of models that have been trained with very few data. Finn et al. (2017); Snell et al. (2017) train models in a meta-learning fashion so that the model can adapt quickly on tasks with only a few training samples available. Hariharan & Girshick (2017); Wang et al. (2018) try to synthesize data or features by learning a generative model to alleviate the data insufficiency problem. Ren et al. (2018) propose to leverage unlabeled data and predict pseudo labels to improve the performance of fewshot learning. ",
63
+ "bbox": [
64
+ 174,
65
+ 598,
66
+ 607,
67
+ 763
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "table",
73
+ "img_path": "images/729640e0c5cebe352c754de3283eba5aab89eb8e4d37dda0bd3487455079d830.jpg",
74
+ "table_caption": [
75
+ "Table 1: The class mean similarity (“mean sim”) and class variance similarity (“var sim”) between Arctic fox and different classes. "
76
+ ],
77
+ "table_footnote": [],
78
+ "table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"2\">Arctic fox</td></tr><tr><td>mean sim</td><td>var sim</td></tr><tr><td>white wolf</td><td>97%</td><td>97%</td></tr><tr><td>malamute</td><td>85%</td><td>78%</td></tr><tr><td>lion</td><td>81%</td><td>70%</td></tr><tr><td>meerkat</td><td>78%</td><td>70%</td></tr><tr><td> jellyfish</td><td>46%</td><td>26%</td></tr><tr><td>orange</td><td>40%</td><td>19%</td></tr><tr><td>beer bottle</td><td>34%</td><td>11%</td></tr></table>",
79
+ "bbox": [
80
+ 627,
81
+ 675,
82
+ 816,
83
+ 792
84
+ ],
85
+ "page_idx": 0
86
+ },
87
+ {
88
+ "type": "text",
89
+ "text": "While most previous works focus on developing stronger models, scant attention has been paid to the property of the data itself. It is natural that when the number of data grows, the ground truth distribution can be more accurately uncovered. Models trained with a wide coverage of data can generalize well during evaluation. On the other hand, when training a model with only a few training data, the model tends to overfit on these few samples by minimizing the training loss over these samples. These phenomena are illustrated in Figure 1. This biased distribution based on a few examples can damage the generalization ability of the model since it is far from mirroring the ground truth distribution from which test cases are sampled during evaluation. ",
90
+ "bbox": [
91
+ 173,
92
+ 771,
93
+ 607,
94
+ 813
95
+ ],
96
+ "page_idx": 0
97
+ },
98
+ {
99
+ "type": "text",
100
+ "text": "",
101
+ "bbox": [
102
+ 174,
103
+ 813,
104
+ 825,
105
+ 896
106
+ ],
107
+ "page_idx": 0
108
+ },
109
+ {
110
+ "type": "image",
111
+ "img_path": "images/f4ca58d351dd312c05898a42b7dc7690158afa432c5ba49f7761c4aa20e3bb2e.jpg",
112
+ "image_caption": [
113
+ "Figure 1: Training a classifier from few-shot features makes the classifier overfit to the few examples (Left). Classifier trained with features sampled from calibrated distribution has better generalization ability (Right). "
114
+ ],
115
+ "image_footnote": [],
116
+ "bbox": [
117
+ 176,
118
+ 99,
119
+ 823,
120
+ 241
121
+ ],
122
+ "page_idx": 1
123
+ },
124
+ {
125
+ "type": "text",
126
+ "text": "Here, we consider calibrating this biased distribution into a more accurate approximation of the ground truth distribution. In this way, a model trained with inputs sampled from the calibrated distribution can generalize over a broader range of data from a more accurate distribution rather than only fitting itself to those few samples. Instead of calibrating the distribution of the original data space, we try to calibrate the distribution in the feature space, which has much lower dimensions and is easier to calibrate (Xian et al. (2018)). We assume every dimension in the feature vectors follows a Gaussian distribution and observe that similar classes usually have similar mean and variance of the feature representations, as shown in Table 1. Thus, the mean and variance of the Gaussian distribution can be transferred across similar classes (Salakhutdinov et al. (2012)). Meanwhile, the statistics can be estimated more accurately when there are adequate samples for this class. Based on these observations, we reuse the statistics from many-shot classes and transfer them to better estimate the distribution of the few-shot classes according to their class similarity. More samples can be generated according to the estimated distribution which provides sufficient supervision for training the classification model. ",
127
+ "bbox": [
128
+ 174,
129
+ 309,
130
+ 825,
131
+ 502
132
+ ],
133
+ "page_idx": 1
134
+ },
135
+ {
136
+ "type": "text",
137
+ "text": "In the experiments, we show that a simple logistic regression classifier trained with our strategy can achieve state-of-the-art accuracy on three datasets. Our distribution calibration strategy can be paired with any classifier and feature extractor with no extra learnable parameters. Training with samples selected from the calibrated distribution can achieve $12 \\%$ accuracy gain compared to the baseline which is only trained with the few samples given in a 5way1shot task. We also visualize the calibrated distribution and show that it is an accurate approximation of the ground truth that can better cover the test cases. ",
138
+ "bbox": [
139
+ 174,
140
+ 510,
141
+ 825,
142
+ 607
143
+ ],
144
+ "page_idx": 1
145
+ },
146
+ {
147
+ "type": "text",
148
+ "text": "2 RELATED WORKS ",
149
+ "text_level": 1,
150
+ "bbox": [
151
+ 176,
152
+ 632,
153
+ 354,
154
+ 648
155
+ ],
156
+ "page_idx": 1
157
+ },
158
+ {
159
+ "type": "text",
160
+ "text": "Few-shot classification is a challenging machine learning problem and researchers have explored the idea of learning to learn or meta-learning to improve the quick adaptation ability to alleviate the few-shot challenge. One of the most general algorithms for meta-learning is the optimizationbased algorithm. Finn et al. (2017) and Li et al. (2017) proposed to learn how to optimize the gradient descent procedure so that the learner can have a good initialization, update direction, and learning rate. For the classification problem, researchers proposed simple but effective algorithms based on metric learning. MatchingNet (Vinyals et al., 2016) and ProtoNet (Snell et al., 2017) learned to classify samples by comparing the distance to the representatives of each class. Our distribution calibration and feature sampling procedure does not include any learnable parameters and the classifier is trained in a traditional supervised learning way. ",
161
+ "bbox": [
162
+ 174,
163
+ 666,
164
+ 825,
165
+ 805
166
+ ],
167
+ "page_idx": 1
168
+ },
169
+ {
170
+ "type": "text",
171
+ "text": "Another line of algorithms is to compensate for the insufficient number of available samples by generation. Most methods use the idea of Generative Adversarial Networks (GANs) (Goodfellow et al., 2014) or autoencoder (Rumelhart et al., 1986) to generate samples (Zhang et al. (2018); Chen et al. (2019b); Schwartz et al. (2018); Gao et al. (2018)) or features (Xian et al. (2018); Zhang et al. (2019)) to augment the training set. Specifically, Zhang et al. (2018) and Xian et al. (2018) proposed to synthesize data by introducing an adversarial generator conditioned on tasks. Zhang et al. (2019) tried to learn a variational autoencoder to approximate the distribution and predict labels based on the estimated statistics. The autoencoder can also augment samples by projecting between the visual space and the semantic space (Chen et al., 2019b) or encoding the intra-class deformations (Schwartz et al., 2018). Liu et al. (2019b) and Liu et al. (2019a) propose to generate features through the class hierarchy. While these methods can generate extra samples or features for training, they require the design of a complex model and loss function to learn how to generate. However, our distribution calibration strategy is simple and does not need extra learnable parameters. ",
172
+ "bbox": [
173
+ 174,
174
+ 813,
175
+ 823,
176
+ 924
177
+ ],
178
+ "page_idx": 1
179
+ },
180
+ {
181
+ "type": "text",
182
+ "text": "",
183
+ "bbox": [
184
+ 174,
185
+ 103,
186
+ 823,
187
+ 172
188
+ ],
189
+ "page_idx": 2
190
+ },
191
+ {
192
+ "type": "text",
193
+ "text": "Data augmentation is a traditional and effective way of increasing the number of training samples. Qin et al. (2020) and Antoniou & Storkey (2019) proposed the used of the traditional data augmentation technique to construct pretext tasks for unsupervised few-shot learning. Wang et al. (2018) and Hariharan & Girshick (2017) leveraged the general idea of data augmentation, they designed a hallucination model to generate the augmented version of the image with different choices for the model’s input, i.e., an image and a noise (Wang et al., 2018) or the concatenation of multiple features (Hariharan & Girshick, 2017). Park et al. (2020); Wang et al. (2019); Liu et al. (2020b) tried to augment feature representations by leveraging intra-class variance. These methods learn to augment from the original samples or their feature representation while we try to estimate the classlevel distribution and thus can eliminate the inductive bias from a single sample and provide more diverse generations from the calibrated distribution. ",
194
+ "bbox": [
195
+ 174,
196
+ 180,
197
+ 825,
198
+ 333
199
+ ],
200
+ "page_idx": 2
201
+ },
202
+ {
203
+ "type": "text",
204
+ "text": "3 MAIN APPROACH",
205
+ "text_level": 1,
206
+ "bbox": [
207
+ 176,
208
+ 352,
209
+ 352,
210
+ 368
211
+ ],
212
+ "page_idx": 2
213
+ },
214
+ {
215
+ "type": "text",
216
+ "text": "In this section, we introduce the few-shot classification problem definition in Section 3.1 and details of our proposed approach in Section 3.2. ",
217
+ "bbox": [
218
+ 174,
219
+ 382,
220
+ 821,
221
+ 411
222
+ ],
223
+ "page_idx": 2
224
+ },
225
+ {
226
+ "type": "text",
227
+ "text": "3.1 PROBLEM DEFINITION ",
228
+ "text_level": 1,
229
+ "bbox": [
230
+ 176,
231
+ 428,
232
+ 370,
233
+ 441
234
+ ],
235
+ "page_idx": 2
236
+ },
237
+ {
238
+ "type": "text",
239
+ "text": "We follow a typical few-shot classification setting. Given a dataset with data-label pairs $\\mathcal { D } =$ $\\{ ( x _ { i } , y _ { i } ) \\}$ where $\\pmb { x } _ { i } \\in \\mathbb { R } ^ { d }$ is the feature vector of a sample and $y _ { i } \\in C$ , where $C$ denotes the set of \nclasses. This set of classes is divided into base classes $C _ { b }$ and novel classes $C _ { n }$ , where $C _ { b } \\cap C _ { n } = \\emptyset$ \nand $C _ { b } \\cup C _ { n } = C$ . The goal is to train a model on the data from the base classes so that the model \ncan generalize well on tasks sampled from the novel classes. In order to evaluate the fast adaptation \nability or the generalization ability of the model, there are only a few available labeled samples for \neach task $\\tau$ . The most common way to build a task is called an N-way-K-shot task (Vinyals et al. \n(2016)), where $\\mathbf { N }$ classes are sampled from the novel set and only $\\mathbf { K }$ (e.g., 1 or 5) labeled samples are \nprovideand the for each class. The few available labeodel is evaluated on another query set set , wh $\\boldsymbol { S } = \\{ ( \\boldsymbol { x } _ { i } , y _ { i } ) \\} _ { i = 1 } ^ { N \\times K }$ $\\mathcal { Q } = \\{ ( \\pmb { x } _ { i } , y _ { i } ) \\} _ { i = N \\times K + 1 } ^ { N \\times K + N \\times q }$ $q$ \nquery set of) multiple tasks sampled from the novel classes. ",
240
+ "bbox": [
241
+ 173,
242
+ 453,
243
+ 825,
244
+ 625
245
+ ],
246
+ "page_idx": 2
247
+ },
248
+ {
249
+ "type": "text",
250
+ "text": "3.2 DISTRIBUTION CALIBRATION ",
251
+ "text_level": 1,
252
+ "bbox": [
253
+ 176,
254
+ 640,
255
+ 419,
256
+ 655
257
+ ],
258
+ "page_idx": 2
259
+ },
260
+ {
261
+ "type": "text",
262
+ "text": "As introduced in Section 3.1, the base classes have a sufficient amount of data while the evaluation tasks sampled from the novel classes only have a limited number of labeled samples. The statistics of the distribution for the base class can be estimated more accurately compared to the estimation based on few-shot samples, which is an ill-posed problem. As shown in Table 1, we observe that if we assume the feature distribution is Gaussian, the mean and variance with respect to each class are correlated to the semantic similarity of each class. With this in mind, the statistics can be transferred from the base classes to the novel classes if we learn how similar the two classes are. In the following sections, we discuss how we calibrate the distribution estimation of the classes with only a few samples (Section 3.2.2) with the help of the statistics of the base classes (Section 3.2.1). We will also elaborate on how do we leverage the calibrated distribution to improve the performance of few-shot learning (Section 3.2.3). ",
263
+ "bbox": [
264
+ 174,
265
+ 666,
266
+ 825,
267
+ 819
268
+ ],
269
+ "page_idx": 2
270
+ },
271
+ {
272
+ "type": "text",
273
+ "text": "Note that our distribution calibration strategy is over the feature-level and is agnostic to any feature extractor. Thus, it can be built on top of any pretrained feature extractors without further costly finetuning. In our experiments, we use the pretrained WideResNet Zagoruyko & Komodakis (2016) following previous work (Mangla et al. (2020)). The WideResNet is trained to classify the base classes, along with a self-supervised pretext task to learn the general-purpose representations suitable for image understanding tasks. Please refer to their paper for more details on training the feature extractor. ",
274
+ "bbox": [
275
+ 173,
276
+ 827,
277
+ 823,
278
+ 922
279
+ ],
280
+ "page_idx": 2
281
+ },
282
+ {
283
+ "type": "text",
284
+ "text": "Algorithm 1 Training procedure for an N-way-K-shot task ",
285
+ "text_level": 1,
286
+ "bbox": [
287
+ 173,
288
+ 103,
289
+ 560,
290
+ 118
291
+ ],
292
+ "page_idx": 3
293
+ },
294
+ {
295
+ "type": "text",
296
+ "text": "$\\pmb { S } = ( \\pmb { x } _ { i } , y ) _ { i = 1 } ^ { N \\times K }$ $\\{ \\pmb { \\mu } _ { i } \\} _ { i = 1 } ^ { | C _ { b } | } , \\{ \\pmb { \\Sigma } _ { i } \\} _ { i = 1 } ^ { | C _ { b } | }$ ",
297
+ "bbox": [
298
+ 176,
299
+ 125,
300
+ 460,
301
+ 138
302
+ ],
303
+ "page_idx": 3
304
+ },
305
+ {
306
+ "type": "text",
307
+ "text": "",
308
+ "bbox": [
309
+ 176,
310
+ 141,
311
+ 490,
312
+ 154
313
+ ],
314
+ "page_idx": 3
315
+ },
316
+ {
317
+ "type": "text",
318
+ "text": "1: Transform $\\left( \\pmb { x } _ { i } \\right) _ { i = 1 } ^ { N \\times K }$ i=1 i=1with Tukey’s Ladder of Powers as Equation 3 \n2: for $( x _ { i } , y _ { i } ) \\in S$ do \n3: Calibrate the mean $\\mu ^ { \\prime }$ and the covariance $\\pmb { \\Sigma } ^ { \\prime }$ for class $y _ { i }$ using $\\mathbf { \\Delta } \\mathbf { x } _ { i }$ with Equation 6 \n4: Sample features for class $y _ { i }$ from the calibrated distribution as Equation 7 \n5: end for \n6: Train a classifier using both support set features and all sampled features as Equation 8 ",
319
+ "bbox": [
320
+ 179,
321
+ 155,
322
+ 710,
323
+ 234
324
+ ],
325
+ "page_idx": 3
326
+ },
327
+ {
328
+ "type": "text",
329
+ "text": "3.2.1 STATISTICS OF THE BASE CLASSES ",
330
+ "text_level": 1,
331
+ "bbox": [
332
+ 176,
333
+ 262,
334
+ 468,
335
+ 277
336
+ ],
337
+ "page_idx": 3
338
+ },
339
+ {
340
+ "type": "text",
341
+ "text": "We assume the feature distribution of base classes is Gaussian. The mean of the feature vector from a base class $i$ is calculated as the mean of every single dimension in the vector: ",
342
+ "bbox": [
343
+ 171,
344
+ 287,
345
+ 823,
346
+ 315
347
+ ],
348
+ "page_idx": 3
349
+ },
350
+ {
351
+ "type": "equation",
352
+ "img_path": "images/298c1e0652e4d470640e61c9f2900dfc8ff2cdad3fe60b2d2ed9aa32be5d13a0.jpg",
353
+ "text": "$$\n\\mu _ { i } = \\frac { \\sum _ { j = 1 } ^ { n _ { i } } { \\pmb x } _ { j } } { n _ { i } } ,\n$$",
354
+ "text_format": "latex",
355
+ "bbox": [
356
+ 442,
357
+ 320,
358
+ 553,
359
+ 357
360
+ ],
361
+ "page_idx": 3
362
+ },
363
+ {
364
+ "type": "text",
365
+ "text": "where $\\mathbf { \\Delta } _ { \\mathbf { \\mathcal { X } } _ { j } }$ is a feature vector of the $j$ -th sample from the base class $i$ and $n _ { i }$ is the total number of samples in class $i$ . As the feature vector $\\mathbf { \\Delta } _ { \\mathbf { \\mathcal { X } } _ { j } }$ is multi-dimensional, we use covariance for a better representation of the variance between any pair of elements in the feature vector. The covariance matrix $\\Sigma _ { i }$ for the features from class $i$ is calculated as: ",
366
+ "bbox": [
367
+ 174,
368
+ 362,
369
+ 825,
370
+ 417
371
+ ],
372
+ "page_idx": 3
373
+ },
374
+ {
375
+ "type": "equation",
376
+ "img_path": "images/297eab7cfd165ab965607a507a4f84db0d001d81e04c02a5ca15cc9ece11c7c8.jpg",
377
+ "text": "$$\n\\pmb { \\Sigma } _ { i } = \\frac { 1 } { n _ { i } - 1 } \\sum _ { j = 1 } ^ { n _ { i } } \\left( \\pmb { x } _ { j } - \\pmb { \\mu } _ { i } \\right) \\left( \\pmb { x } _ { j } - \\pmb { \\mu } _ { i } \\right) ^ { T } .\n$$",
378
+ "text_format": "latex",
379
+ "bbox": [
380
+ 361,
381
+ 422,
382
+ 637,
383
+ 465
384
+ ],
385
+ "page_idx": 3
386
+ },
387
+ {
388
+ "type": "text",
389
+ "text": "3.2.2 CALIBRATING STATISTICS OF THE NOVEL CLASSES ",
390
+ "text_level": 1,
391
+ "bbox": [
392
+ 173,
393
+ 478,
394
+ 583,
395
+ 492
396
+ ],
397
+ "page_idx": 3
398
+ },
399
+ {
400
+ "type": "text",
401
+ "text": "Here, we consider an N-way-K-shot task sampled from the novel classes. ",
402
+ "bbox": [
403
+ 176,
404
+ 502,
405
+ 653,
406
+ 517
407
+ ],
408
+ "page_idx": 3
409
+ },
410
+ {
411
+ "type": "text",
412
+ "text": "Tukey’s Ladder of Powers Transformation ",
413
+ "text_level": 1,
414
+ "bbox": [
415
+ 176,
416
+ 523,
417
+ 472,
418
+ 539
419
+ ],
420
+ "page_idx": 3
421
+ },
422
+ {
423
+ "type": "text",
424
+ "text": "To make the feature distribution more Gaussian-like, we first transform the features of the support set and query set in the target task using Tukey’s Ladder of Powers transformation (Tukey (1977)). Tukey’s Ladder of Powers transformation is a family of power transformations which can reduce the skewness of distributions and make distributions more Gaussian-like. Tukey’s Ladder of Powers transformation is formulated as: ",
425
+ "bbox": [
426
+ 174,
427
+ 545,
428
+ 825,
429
+ 614
430
+ ],
431
+ "page_idx": 3
432
+ },
433
+ {
434
+ "type": "equation",
435
+ "img_path": "images/4ec8c825328536e635434f148cb10d0bdf4d0b5439e07a8a5d281462caaff3fe.jpg",
436
+ "text": "$$\n\\tilde { \\mathbf { x } } = \\left\\{ \\begin{array} { l l } { x ^ { \\lambda } } & { \\mathrm { ~ i f ~ } \\lambda \\neq 0 } \\\\ { \\log ( \\pmb { x } ) } & { \\mathrm { ~ i f ~ } \\lambda = 0 } \\end{array} \\right.\n$$",
437
+ "text_format": "latex",
438
+ "bbox": [
439
+ 405,
440
+ 617,
441
+ 584,
442
+ 654
443
+ ],
444
+ "page_idx": 3
445
+ },
446
+ {
447
+ "type": "text",
448
+ "text": "where $\\lambda$ is a hyper-parameter to adjust how to correct the distribution. The original feature can be recovered by setting $\\lambda$ as 1. Decreasing $\\lambda$ makes the distribution less positively skewed and vice versa. ",
449
+ "bbox": [
450
+ 174,
451
+ 657,
452
+ 825,
453
+ 700
454
+ ],
455
+ "page_idx": 3
456
+ },
457
+ {
458
+ "type": "text",
459
+ "text": "Calibration through statistics transfer ",
460
+ "text_level": 1,
461
+ "bbox": [
462
+ 176,
463
+ 707,
464
+ 441,
465
+ 722
466
+ ],
467
+ "page_idx": 3
468
+ },
469
+ {
470
+ "type": "text",
471
+ "text": "Using the statistics from the base classes introduced in Section 3.2.1, we transfer the statistics from the base classes which are estimated more accurately on sufficient data to the novel classes. The transfer is based on the Euclidean distance between the feature space of the novel classes and the mean of the features from the base classes $\\pmb { \\mu _ { i } }$ as computed in Equation 1. Specifically, we select the top $k$ base classes with the closest distance to the feature of a sample $\\tilde { \\pmb x }$ from the support set: ",
472
+ "bbox": [
473
+ 173,
474
+ 728,
475
+ 825,
476
+ 799
477
+ ],
478
+ "page_idx": 3
479
+ },
480
+ {
481
+ "type": "equation",
482
+ "img_path": "images/59d97707c1272a00da2a6e8cc19017ea60e5b0d6ad6fd3e33601ca3beeff2506.jpg",
483
+ "text": "$$\n\\begin{array} { r } { \\mathbb { S } _ { d } = \\{ - \\| \\pmb { \\mu } _ { i } - \\tilde { \\pmb { x } } \\| ^ { 2 } | i \\in C _ { b } \\} , } \\\\ { \\mathbb { S } _ { N } = \\{ i | - \\| \\pmb { \\mu } _ { i } - \\tilde { \\pmb { x } } \\| ^ { 2 } \\in t o p k ( \\mathbb { S } _ { d } ) \\} , } \\end{array}\n$$",
484
+ "text_format": "latex",
485
+ "bbox": [
486
+ 370,
487
+ 801,
488
+ 625,
489
+ 843
490
+ ],
491
+ "page_idx": 3
492
+ },
493
+ {
494
+ "type": "text",
495
+ "text": "where $t o p k ( \\cdot )$ is an operator to select the top elements from the input distance set $\\mathbb { S } _ { d }$ . $\\mathbb { S } _ { N }$ stores the $k$ nearest base classes with respect to a feature vector $\\tilde { \\pmb x }$ . Then, the mean and covariance of the distribution is calibrated by the statistics from the nearest base classes: ",
496
+ "bbox": [
497
+ 174,
498
+ 847,
499
+ 825,
500
+ 888
501
+ ],
502
+ "page_idx": 3
503
+ },
504
+ {
505
+ "type": "equation",
506
+ "img_path": "images/4ce25a499ae02fd026afcbfd1ea4026ef73782c79e790ab4f08553917a609657.jpg",
507
+ "text": "$$\n\\pmb { \\mu } ^ { \\prime } = \\frac { \\sum _ { i \\in \\mathbb { S } _ { N } } \\pmb { \\mu } _ { i } + \\tilde { \\pmb { x } } } { k + 1 } , \\pmb { \\Sigma } ^ { \\prime } = \\frac { \\sum _ { i \\in \\mathbb { S } _ { N } } \\pmb { \\Sigma } _ { i } } { k } + \\alpha ,\n$$",
508
+ "text_format": "latex",
509
+ "bbox": [
510
+ 348,
511
+ 893,
512
+ 648,
513
+ 929
514
+ ],
515
+ "page_idx": 3
516
+ },
517
+ {
518
+ "type": "table",
519
+ "img_path": "images/11ad467cb85ab8e79b861d18690e5eef31d74bee53d821d1d91b753a15452d15.jpg",
520
+ "table_caption": [
521
+ "Table 2: 5way1shot and 5way5shot classification accuracy $( \\% )$ on miniImageNet and CUB with $9 5 \\%$ confidence intervals. The numbers in bold have intersecting confidence intervals with the most accurate method. "
522
+ ],
523
+ "table_footnote": [],
524
+ "table_body": "<table><tr><td rowspan=\"2\">Methods</td><td colspan=\"2\">miniImageNet</td><td colspan=\"2\">CUB</td></tr><tr><td>5way1shot</td><td>5way5shot</td><td>5way1shot</td><td>5way5shot</td></tr><tr><td>Optimization-based</td><td></td><td></td><td></td><td></td></tr><tr><td>MAML (Finn et al. (2017))</td><td>48.70 ±1.84</td><td>63.10 ± 0.92</td><td>50.45 ±0.97 59.60 ± 0.84</td><td></td></tr><tr><td>Meta-SGD (Li et al. (2017))</td><td>50.47 ± 1.87</td><td>64.03 ±0.94</td><td>53.34± 0.97</td><td>67.59 ±0.82</td></tr><tr><td>LEO (Rusu et al. (2019))</td><td>61.76 ± 0.08</td><td>77.59 ± 0.12</td><td></td><td></td></tr><tr><td>E3BM (Liu et al. (2020c))</td><td>63.80 ±0.40</td><td>80.29 ±0.25</td><td></td><td></td></tr><tr><td>Metric-based</td><td></td><td></td><td></td><td></td></tr><tr><td>Matching Net (Vinyals et al. (2016))</td><td>43.56 ± 0.84</td><td>55.31 ± 0.73</td><td>56.53 ± 0.99</td><td>63.54 ± 0.85</td></tr><tr><td>Prototypical Net (Snell et al. (2017))</td><td>54.16 ± 0.82</td><td>73.68 ±0.65</td><td>72.99±0.88</td><td>86.64± 0.51</td></tr><tr><td>Baseline++ (Chen et al. (2019a))</td><td>51.87 ± 0.77</td><td>75.68 ± 0.63</td><td>67.02 ±0.90</td><td>83.58 ± 0.54</td></tr><tr><td>Variational Few-shot(Zhang et al. (2019))</td><td>61.23 ±0.26</td><td>77.69 ± 0.17</td><td></td><td></td></tr><tr><td>Negative-Cosine(Liu et al. (2020a))</td><td>62.33 ±0.82</td><td>80.94± 0.59</td><td>72.66 ± 0.85</td><td>89.40 ± 0.43</td></tr><tr><td>Generation-based</td><td></td><td></td><td></td><td></td></tr><tr><td>MetaGAN (Zhang et al. (2018))</td><td>52.71 ± 0.64</td><td>68.63±0.67</td><td></td><td></td></tr><tr><td>Delta-Encoder (Schwartz et al. (2018))</td><td>59.9</td><td>69.7</td><td>69.8</td><td>82.6</td></tr><tr><td>TriNet (Chen et al. (2019b))</td><td>58.12 ± 1.37</td><td>76.92 ±0.69</td><td>69.61± 0.46</td><td>84.10 ± 0.35</td></tr><tr><td>Meta Variance Transfer (Park etal. (2020))</td><td>-</td><td>67.67 ± 0.70</td><td>1</td><td>80.33 ±0.61</td></tr><tr><td>Maximum Likelihood with DC (Ours)</td><td>66.91± 0.17</td><td>80.74±0.48</td><td>77.22± 0.14</td><td>89.58±0.27</td></tr><tr><td>SVM with DC (Ours)</td><td>67.31 ± 0.83</td><td>82.30 ± 0.34</td><td>79.49 ± 0.33</td><td>90.26 ± 0.98</td></tr><tr><td>Logistic Regression with DC (Ours)</td><td>68.57 ± 0.55</td><td>82.88 ± 0.42</td><td>79.56 ± 0.87</td><td>90.67 ± 0.35</td></tr></table>",
525
+ "bbox": [
526
+ 179,
527
+ 137,
528
+ 818,
529
+ 409
530
+ ],
531
+ "page_idx": 4
532
+ },
533
+ {
534
+ "type": "text",
535
+ "text": "where $\\alpha$ is a hyper-parameter that determines the degree of dispersion of features sampled from the calibrated distribution. ",
536
+ "bbox": [
537
+ 174,
538
+ 431,
539
+ 823,
540
+ 459
541
+ ],
542
+ "page_idx": 4
543
+ },
544
+ {
545
+ "type": "text",
546
+ "text": "For few-shot learning with more than one shot, the aforementioned procedure of the distribution calibration should be undertaken multiple times with each time using one feature vector from the support set. This avoids the bias provided by one specific sample and potentially achieves more diverse and accurate distribution estimation. Thus, for simplicity, we denote the calibrated distribution as a set of statistics. For a class $y \\in C _ { n }$ , we denote the set of statistics as $\\mathbb { S } _ { y } = \\{ ( \\boldsymbol { \\mu } _ { 1 } ^ { \\prime } , \\boldsymbol { \\Sigma } _ { 1 } ^ { \\prime } ) , . . . , ( \\boldsymbol { \\mu } _ { K } ^ { \\prime } , \\boldsymbol { \\Sigma } _ { K } ^ { \\prime } ) \\}$ , where $\\mu _ { i } ^ { ' } , \\Sigma _ { i } ^ { ' }$ are the calibrated mean and covariance, respectively, computed based on the $i$ -th feature in the support set of class $y$ . Here, the size of the set is the value of $K$ for an $\\mathbf { N } .$ -way-K-shot task. ",
547
+ "bbox": [
548
+ 173,
549
+ 465,
550
+ 826,
551
+ 582
552
+ ],
553
+ "page_idx": 4
554
+ },
555
+ {
556
+ "type": "text",
557
+ "text": "3.2.3 HOW TO LEVERAGE THE CALIBRATED DISTRIBUTION? ",
558
+ "text_level": 1,
559
+ "bbox": [
560
+ 173,
561
+ 597,
562
+ 604,
563
+ 611
564
+ ],
565
+ "page_idx": 4
566
+ },
567
+ {
568
+ "type": "text",
569
+ "text": "With a set of calibrated statistics $\\mathbb { S } _ { y }$ for class $y$ in a target task, we generate a set of feature vectors with label $y$ by sampling from the calibrated Gaussian distributions: ",
570
+ "bbox": [
571
+ 173,
572
+ 621,
573
+ 820,
574
+ 648
575
+ ],
576
+ "page_idx": 4
577
+ },
578
+ {
579
+ "type": "equation",
580
+ "img_path": "images/77713cd24fecbab7d209f19a561ba84822628074bf420a6fbf7482c4dcf53b20.jpg",
581
+ "text": "$$\n\\mathbb { D } _ { y } = \\{ ( \\boldsymbol { x } , y ) | \\boldsymbol { x } \\sim \\mathcal { N } ( \\boldsymbol { \\mu } , \\boldsymbol { \\Sigma } ) , \\forall ( \\boldsymbol { \\mu } , \\boldsymbol { \\Sigma } ) \\in \\mathbb { S } ^ { y } \\} .\n$$",
582
+ "text_format": "latex",
583
+ "bbox": [
584
+ 348,
585
+ 652,
586
+ 648,
587
+ 670
588
+ ],
589
+ "page_idx": 4
590
+ },
591
+ {
592
+ "type": "text",
593
+ "text": "Here, the total number of generated features per class is set as a hyperparameter and they are equally distributed for every calibrated distribution in $\\mathbb { S } _ { y }$ . The generated features along with the original support set features for a few-shot task is then served as the training data for a task-specific classifier. We train the classifier for a task by minimizing the cross-entropy loss over both the features of its support set $s$ and the generated features $\\mathbb { D } _ { y }$ : ",
594
+ "bbox": [
595
+ 173,
596
+ 672,
597
+ 825,
598
+ 743
599
+ ],
600
+ "page_idx": 4
601
+ },
602
+ {
603
+ "type": "equation",
604
+ "img_path": "images/6e01653938acccc253d7761e7b2976f4c72b273d7dd9e6800450d7bc8b2ba681.jpg",
605
+ "text": "$$\n\\ell = \\sum _ { ( \\pmb { x } , y ) \\sim \\tilde { S } \\cup \\mathbb { D } _ { y , y \\in \\mathcal { V } } \\mathcal { T } } - \\log \\operatorname* { P r } ( y | \\pmb { x } ; \\theta ) ,\n$$",
606
+ "text_format": "latex",
607
+ "bbox": [
608
+ 369,
609
+ 746,
610
+ 627,
611
+ 786
612
+ ],
613
+ "page_idx": 4
614
+ },
615
+ {
616
+ "type": "text",
617
+ "text": "where $y ^ { \\tau }$ is the set of classes for the task $\\tau$ . $\\tilde { \\cal S }$ denotes the support set with features transformed by Turkey’s Ladder of Powers transformation and the classifier model is parameterized by $\\theta$ . ",
618
+ "bbox": [
619
+ 171,
620
+ 791,
621
+ 825,
622
+ 820
623
+ ],
624
+ "page_idx": 4
625
+ },
626
+ {
627
+ "type": "text",
628
+ "text": "4 EXPERIMENTS ",
629
+ "text_level": 1,
630
+ "bbox": [
631
+ 176,
632
+ 839,
633
+ 328,
634
+ 856
635
+ ],
636
+ "page_idx": 4
637
+ },
638
+ {
639
+ "type": "text",
640
+ "text": "In this section, we answer the following questions: ",
641
+ "bbox": [
642
+ 173,
643
+ 869,
644
+ 504,
645
+ 886
646
+ ],
647
+ "page_idx": 4
648
+ },
649
+ {
650
+ "type": "text",
651
+ "text": "• How does our distribution calibration strategy perform compared to the state-of-the-art methods? ",
652
+ "bbox": [
653
+ 212,
654
+ 895,
655
+ 825,
656
+ 924
657
+ ],
658
+ "page_idx": 4
659
+ },
660
+ {
661
+ "type": "table",
662
+ "img_path": "images/8f25a110b59b2faf4dd832ccf5f222edc3ac26dbe5959bca90660d9ce0c8dc8c.jpg",
663
+ "table_caption": [
664
+ "Table 3: 5way1shot and 5way5shot classification accuracy $( \\% )$ on tieredImageNet (Ren et al., 2018). The numbers in bold have intersecting confidence intervals with the most accurate method. "
665
+ ],
666
+ "table_footnote": [],
667
+ "table_body": "<table><tr><td>Methods</td><td colspan=\"2\">tieredImageNet</td></tr><tr><td></td><td>5way1shot</td><td>5way5shot</td></tr><tr><td>Matching Net (Vinyals et al. (2016))</td><td>68.50 ± 0.92</td><td>80.60±0.71</td></tr><tr><td>Prototypical Net (Snell et al. (2017))</td><td>65.65 ± 0.92</td><td>83.40 ± 0.65</td></tr><tr><td>LEO (Rusu et al. (2019))</td><td>66.33± ( 0.05</td><td>82.06 ±0.08</td></tr><tr><td>E3BM (Liu et al. (2020c))</td><td>71.20 士 0.40</td><td>85.30 ± 0.30</td></tr><tr><td>DeepEMD (Zhang et al., 2020)</td><td>71.16 ± 0.87</td><td>86.03 ± 0.58</td></tr><tr><td rowspan=\"2\">MaximumLikelihood with DC (Ours) SVM with DC (Ours)</td><td>75.92 士 0.60</td><td>87.84 ± 0.65</td></tr><tr><td>77.93 ± ( 0.12</td><td>89.72 ± 0.37</td></tr><tr><td rowspan=\"2\">Logistic Regression with DC (Ours)</td><td>78.19 ± 0.25</td><td>89.90 ± 0.41</td></tr><tr><td></td><td></td></tr></table>",
668
+ "bbox": [
669
+ 264,
670
+ 138,
671
+ 732,
672
+ 281
673
+ ],
674
+ "page_idx": 5
675
+ },
676
+ {
677
+ "type": "text",
678
+ "text": "• What does calibrated distribution look like? Is it an accurate approximation for this class? • How does Tukey’s Ladder of Power transformation interact with the feature generations? How important is each in relation to performance? ",
679
+ "bbox": [
680
+ 215,
681
+ 305,
682
+ 825,
683
+ 352
684
+ ],
685
+ "page_idx": 5
686
+ },
687
+ {
688
+ "type": "text",
689
+ "text": "4.1 EXPERIMENTAL SETUP ",
690
+ "text_level": 1,
691
+ "bbox": [
692
+ 174,
693
+ 368,
694
+ 375,
695
+ 383
696
+ ],
697
+ "page_idx": 5
698
+ },
699
+ {
700
+ "type": "text",
701
+ "text": "4.1.1 DATASETS ",
702
+ "text_level": 1,
703
+ "bbox": [
704
+ 174,
705
+ 395,
706
+ 302,
707
+ 409
708
+ ],
709
+ "page_idx": 5
710
+ },
711
+ {
712
+ "type": "text",
713
+ "text": "We evaluate our distribution calibration strategy on miniImageNet (Ravi & Larochelle (2017)), tieredImageNet (Ren et al. (2018)) and CUB (Welinder et al. (2010)). miniImageNet and tieredImageNet have a brand range of classes including various animals and objects while CUB is a more fine-grained dataset that includes various species of birds. Datasets with different levels of granularity may have different distributions for their feature space. We want to show the effectiveness and generality of our strategy on all three datasets. ",
714
+ "bbox": [
715
+ 174,
716
+ 419,
717
+ 825,
718
+ 502
719
+ ],
720
+ "page_idx": 5
721
+ },
722
+ {
723
+ "type": "text",
724
+ "text": "miniImageNet is derived from ILSVRC-12 dataset (Russakovsky et al., 2014). It contains 100 diverse classes with 600 samples per class. The image size is $8 4 \\times 8 4 \\times 3$ . We follow the splits used in previous works (Ravi & Larochelle, 2017), which split the dataset into 64 base classes, 16 validation classes, and 20 novel classes. ",
725
+ "bbox": [
726
+ 174,
727
+ 510,
728
+ 825,
729
+ 565
730
+ ],
731
+ "page_idx": 5
732
+ },
733
+ {
734
+ "type": "text",
735
+ "text": "tieredImageNet is a larger subset of ILSVRC-12 dataset (Russakovsky et al., 2014), which contains 608 classes sampled from hierarchical category structure. Each class belongs to one of 34 higherlevel categories sampled from the high-level nodes in the ImageNet. The average number of images in each class is 1281. We use 351, 97, and 160 classes for training, validation, and test, respectively. ",
736
+ "bbox": [
737
+ 174,
738
+ 571,
739
+ 825,
740
+ 628
741
+ ],
742
+ "page_idx": 5
743
+ },
744
+ {
745
+ "type": "text",
746
+ "text": "CUB is a fine-grained few-shot classification benchmark. It contains 200 different classes of birds with a total of 11,788 images of size $8 4 \\times 8 4 \\times 3$ . Following previous works (Chen et al., 2019a), we split the dataset into 100 base classes, 50 validation classes, and 50 novel classes. ",
747
+ "bbox": [
748
+ 174,
749
+ 635,
750
+ 825,
751
+ 678
752
+ ],
753
+ "page_idx": 5
754
+ },
755
+ {
756
+ "type": "text",
757
+ "text": "4.1.2 EVALUATION METRIC ",
758
+ "text_level": 1,
759
+ "bbox": [
760
+ 174,
761
+ 693,
762
+ 382,
763
+ 707
764
+ ],
765
+ "page_idx": 5
766
+ },
767
+ {
768
+ "type": "text",
769
+ "text": "We use the top-1 accuracy as the evaluation metric to measure the performance of our method. We report the accuracy on 5way1shot and 5way5shot settings for miniImageNet, tieredImageNet and CUB. The reported results are the averaged classification accuracy over 10,000 tasks. ",
770
+ "bbox": [
771
+ 176,
772
+ 717,
773
+ 823,
774
+ 760
775
+ ],
776
+ "page_idx": 5
777
+ },
778
+ {
779
+ "type": "text",
780
+ "text": "4.1.3 IMPLEMENTATION DETAILS ",
781
+ "text_level": 1,
782
+ "bbox": [
783
+ 176,
784
+ 773,
785
+ 419,
786
+ 789
787
+ ],
788
+ "page_idx": 5
789
+ },
790
+ {
791
+ "type": "text",
792
+ "text": "For feature extractor, we use the WideResNet (Zagoruyko & Komodakis, 2016) trained following previous work (Mangla et al. (2020)). For each dataset, we train the feature extractor with base classes and test the performance using novel classes. Note that the feature representation is extracted from the penultimate layer (with a ReLU activation function) from the feature extractor, thus the values are all non-negative so that the inputs to Tukey’s Ladder of Powers transformation in Equation 3 are valid. At the distribution calibration stage, we compute the base class statistics and transfer them to calibrate novel class distribution for each dataset. We use the LR and SVM implementation of scikit-learn (Pedregosa et al. (2011)) with the default settings. We use the same hyperparameter value for all datasets except for $\\alpha$ . Specifically, the number of generated features is 750; $k = 2$ and $\\lambda = 0 . 5$ . $\\alpha$ is 0.21, 0.21 and 0.3 for miniImageNet, tieredImageNet and CUB, respectively. ",
793
+ "bbox": [
794
+ 174,
795
+ 797,
796
+ 825,
797
+ 924
798
+ ],
799
+ "page_idx": 5
800
+ },
801
+ {
802
+ "type": "image",
803
+ "img_path": "images/deecfda56372ac9b0994653778df74588488d220e75ca612d156efd4b51701da.jpg",
804
+ "image_caption": [
805
+ "Figure 2: t-SNE visualization of our distribution estimation. Different colors represent different classes. ‘F’ represents support set features, $\\mathbf { \\dot { x } } _ { } ,$ in figure (d) represents query set features, $\\mathbf { \\check { \\Psi } } _ { \\mathbf { A } } \\mathbf { \\Psi } ^ { * }$ in figure (b)(c) represents generated features. "
806
+ ],
807
+ "image_footnote": [],
808
+ "bbox": [
809
+ 173,
810
+ 98,
811
+ 823,
812
+ 238
813
+ ],
814
+ "page_idx": 6
815
+ },
816
+ {
817
+ "type": "image",
818
+ "img_path": "images/225124df96764e8072f5bdd807a6440c9593e2d01102fc20827feba072ac1a98.jpg",
819
+ "image_caption": [
820
+ "Figure 3: Left: Accuracy when increasing the power in Tukey’s transformation when training with (red) or without (blue) the generated features. Right: Accuracy when increasing the number of generated features with the features are transformed by Tukey’s transformation (red) and without Tukey’s transformation (blue). "
821
+ ],
822
+ "image_footnote": [],
823
+ "bbox": [
824
+ 207,
825
+ 303,
826
+ 792,
827
+ 462
828
+ ],
829
+ "page_idx": 6
830
+ },
831
+ {
832
+ "type": "text",
833
+ "text": "",
834
+ "bbox": [
835
+ 171,
836
+ 540,
837
+ 825,
838
+ 570
839
+ ],
840
+ "page_idx": 6
841
+ },
842
+ {
843
+ "type": "text",
844
+ "text": "4.2 COMPARISION TO STATE-OF-THE-ART ",
845
+ "text_level": 1,
846
+ "bbox": [
847
+ 176,
848
+ 588,
849
+ 477,
850
+ 602
851
+ ],
852
+ "page_idx": 6
853
+ },
854
+ {
855
+ "type": "text",
856
+ "text": "Table 2 and Table 3 presents the 5way1shot and 5way5shot classification results of our method on miniImageNet, tieredImageNet and CUB. We compare our method with the three groups of the fewshot learning method, optimization-based, metric-based, and generation-based. Our method can be built on top of any classifier, and we use two popular and simple classifiers, namely SVM and LR to prove the effectiveness of our method. Simple linear classifiers equipped with our method perform better than the state-of-the-art few-shot classification method and achieve the best performance on 1-shot and 5-shot settings of miniImageNet, tieredImageNet and CUB. The performance of our distribution calibration surpasses the state-of-the-art generation-based method by $10 \\%$ for the 5way1shot setting, which proves that our method can handle extremely low-shot classification tasks better. Compared to other generation-based methods, which require the design of a generative model with extra training costs on the learnable parameters, simple machine learning classifier with DC is much more simple, effective and flexible and can be equipped with any feature extractors and classifier model structures. Specifically, we show three variants, i.e, Maximum likelihood with DC, SVM with DC, Logistic Regression with DC in Table 2 and Table 3. A simple maximum likelihood classifier based on the calibrated distribution can outperform previous baselines and training a SVM classifier or Logistic Regression classifier using the samples from the calibrated distribution can further improve the performance. ",
857
+ "bbox": [
858
+ 173,
859
+ 614,
860
+ 825,
861
+ 851
862
+ ],
863
+ "page_idx": 6
864
+ },
865
+ {
866
+ "type": "text",
867
+ "text": "4.3 VISUALIZATION OF GENERATED SAMPLES ",
868
+ "text_level": 1,
869
+ "bbox": [
870
+ 174,
871
+ 869,
872
+ 509,
873
+ 882
874
+ ],
875
+ "page_idx": 6
876
+ },
877
+ {
878
+ "type": "text",
879
+ "text": "We show what the calibrated distribution looks like by visualizing the generated features sampled from the distribution. In Figure 2, we show the t-SNE representation (van der Maaten & Hinton (2008)) of the original support set (a), the generated features (b,c) as well as the query set (d). Based on the calibrated distribution, the sampled features form a Gaussian distribution and more samples (c) can have a more comprehensive representation of the distribution. Due to the limited number of examples in the support set, only 1 in this case, the samples from the query set usually cover a greater area and are a mismatch with the support set. This mismatch can be fixed to some extent by the generated features, i.e., the generated features in (c) can overlap areas of the query set. Thus, training with these generated features can alleviate the mismatch between the distribution estimated only from the few-shot samples and the ground truth distribution. ",
880
+ "bbox": [
881
+ 176,
882
+ 895,
883
+ 823,
884
+ 924
885
+ ],
886
+ "page_idx": 6
887
+ },
888
+ {
889
+ "type": "table",
890
+ "img_path": "images/495800d492a5909be5c38c856e3eb02e222275b3e92ee3c159e4ba62484336bf.jpg",
891
+ "table_caption": [
892
+ "Table 4: Ablation study on miniImageNet 5way1shot and 5way5shot showing accuracy $( \\% )$ with $9 5 \\%$ confidence intervals. "
893
+ ],
894
+ "table_footnote": [],
895
+ "table_body": "<table><tr><td rowspan=\"2\"></td><td rowspan=\"2\">Tukey transformationTraining with generated features</td><td colspan=\"2\">miniImageNet</td></tr><tr><td>5way1shot</td><td>5way5shot</td></tr><tr><td>X</td><td>X</td><td>56.37± 0.68</td><td>79.03 ± 0.51</td></tr><tr><td></td><td>X</td><td>64.30 ± 0.53</td><td>81.33 ± 0.35</td></tr><tr><td>X</td><td>√</td><td>63.70 ± 0.38</td><td>82.26 ± 0.73</td></tr><tr><td>√</td><td>~</td><td>68.57 ± 0.55</td><td>82.88 ± 0.42</td></tr></table>",
896
+ "bbox": [
897
+ 196,
898
+ 137,
899
+ 803,
900
+ 226
901
+ ],
902
+ "page_idx": 7
903
+ },
904
+ {
905
+ "type": "table",
906
+ "img_path": "images/8b6d7116be072f066fab11c8d3844461b9a80e995d051819d9b360c696eb93ae.jpg",
907
+ "table_caption": [
908
+ "Table 5: 5way1shot classification accuracy $( \\% )$ on miniImageNet with different backbones. "
909
+ ],
910
+ "table_footnote": [],
911
+ "table_body": "<table><tr><td>Backbones</td><td>without DC</td><td>with DC</td></tr><tr><td>conv4 (Chen et al., 2019a)</td><td>42.11 ± 0.71</td><td>54.62± 0.64 (个12.51)</td></tr><tr><td>conv6 (Chen et al., 2019a)</td><td>46.07 ± 0.26</td><td>57.14 ± 0.45 (个 11.07)</td></tr><tr><td>resnet18 (Chen et al., 2019a)</td><td>52.32 土 0.82</td><td>61.50 士 0.47 (个 9.180)</td></tr><tr><td>WRN28 (Mangla etal., 2020)</td><td>54.53± 0.56</td><td>64.38 士 0.63 (个 9.850)</td></tr><tr><td>WRN28 + Rotation Loss (Mangla et al., 2020)</td><td>56.37 ± 0.68</td><td>68.57 士 0.55 5(个12.20)</td></tr></table>",
912
+ "bbox": [
913
+ 210,
914
+ 263,
915
+ 789,
916
+ 351
917
+ ],
918
+ "page_idx": 7
919
+ },
920
+ {
921
+ "type": "text",
922
+ "text": "",
923
+ "bbox": [
924
+ 173,
925
+ 375,
926
+ 825,
927
+ 487
928
+ ],
929
+ "page_idx": 7
930
+ },
931
+ {
932
+ "type": "text",
933
+ "text": "4.4 APPLICABILITY OF DISTRIBUTION CALIBRATION ",
934
+ "text_level": 1,
935
+ "bbox": [
936
+ 176,
937
+ 505,
938
+ 549,
939
+ 518
940
+ ],
941
+ "page_idx": 7
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "Applying distribution calibration on different backbones ",
946
+ "text_level": 1,
947
+ "bbox": [
948
+ 174,
949
+ 530,
950
+ 570,
951
+ 545
952
+ ],
953
+ "page_idx": 7
954
+ },
955
+ {
956
+ "type": "text",
957
+ "text": "Our distribution calibration strategy is agnostic to backbones $/$ feature extractors. Table 5 shows the consistent performance boost when applying distribution calibration on different feature extractors, i.e, four convolutional layers (conv4), six convolutional layers (conv6), resnet18, WRN28 and WRN28 trained with rotation loss. Distribution calibration achieves around $10 \\%$ accuracy improvement compared to the backbones trained with different baselines. ",
958
+ "bbox": [
959
+ 173,
960
+ 551,
961
+ 825,
962
+ 619
963
+ ],
964
+ "page_idx": 7
965
+ },
966
+ {
967
+ "type": "text",
968
+ "text": "Applying distribution calibration on other baselines ",
969
+ "text_level": 1,
970
+ "bbox": [
971
+ 174,
972
+ 627,
973
+ 535,
974
+ 642
975
+ ],
976
+ "page_idx": 7
977
+ },
978
+ {
979
+ "type": "text",
980
+ "text": "A variety of works can benefit from training with the features generated by our distribution calibration strategy. We apply our distribution calibration strategy on two simple few-shot classification algorithms, Baseline (Chen et al., 2019a) and Baseline $^ { + + }$ (Chen et al., 2019a). Table 6 shows that our distribution calibration brings over $10 \\%$ of accuracy improvement on both. ",
981
+ "bbox": [
982
+ 174,
983
+ 648,
984
+ 825,
985
+ 705
986
+ ],
987
+ "page_idx": 7
988
+ },
989
+ {
990
+ "type": "text",
991
+ "text": "4.5 EFFECTS OF FEATURE TRANSFORMATION AND TRAINING WITH GENERATED FEATURES ",
992
+ "text_level": 1,
993
+ "bbox": [
994
+ 173,
995
+ 723,
996
+ 810,
997
+ 736
998
+ ],
999
+ "page_idx": 7
1000
+ },
1001
+ {
1002
+ "type": "text",
1003
+ "text": "Ablation Study ",
1004
+ "text_level": 1,
1005
+ "bbox": [
1006
+ 174,
1007
+ 748,
1008
+ 281,
1009
+ 762
1010
+ ],
1011
+ "page_idx": 7
1012
+ },
1013
+ {
1014
+ "type": "text",
1015
+ "text": "Table 4 shows the performance when our model is trained without Tukey’s Ladder of Powers transformation for the features as in Equation 3 and when it is trained without the generated features as in Equation 7. It is clear that there is a severe decline in performance of over $10 \\%$ if both are not used in the 5way1shot setting. The ablation of either one results in a performance drop of around $5 \\%$ in the 5way1shot setting. ",
1016
+ "bbox": [
1017
+ 174,
1018
+ 770,
1019
+ 825,
1020
+ 839
1021
+ ],
1022
+ "page_idx": 7
1023
+ },
1024
+ {
1025
+ "type": "text",
1026
+ "text": "Choices of Power for Tukey’s Ladder of Powers Transformation ",
1027
+ "text_level": 1,
1028
+ "bbox": [
1029
+ 174,
1030
+ 845,
1031
+ 620,
1032
+ 861
1033
+ ],
1034
+ "page_idx": 7
1035
+ },
1036
+ {
1037
+ "type": "text",
1038
+ "text": "The left side of Figure 3 shows the 5way1shot accuracy when choosing different powers for the Tukey’s transformation in Equation 3 when training the classifier with the generated features (red) and without (blue). Note that when the power $\\lambda$ equals 1, the transformation keeps the original feature representations. There is a consistent general tendency for training with and without the generated features and in both cases, we found $\\lambda = 0 . 5$ is the optimum choice. With the Tukey’s transformation, the distribution of query set features in target tasks become more aligned to the calibrated Gaussian distribution, thus benefits the classifier which is trained on features sampled from the calibrated distribution. ",
1039
+ "bbox": [
1040
+ 176,
1041
+ 868,
1042
+ 823,
1043
+ 924
1044
+ ],
1045
+ "page_idx": 7
1046
+ },
1047
+ {
1048
+ "type": "table",
1049
+ "img_path": "images/a89032156b55e27bd72e23b3ac5152b30ec74af1be7c4612d2136e36853077a8.jpg",
1050
+ "table_caption": [
1051
+ "Table 6: 5way1shot classification accuracy $( \\% )$ on miniImageNet with different baselines using distribution calibration. "
1052
+ ],
1053
+ "table_footnote": [],
1054
+ "table_body": "<table><tr><td>Method</td><td>without DC</td><td>with DC</td></tr><tr><td>Baseline (Chen et al.,2019a) Baseline++ (Chen et al.,2019a)</td><td>42.11±0.71 48.24 ± 0.75</td><td>54.62 ± 0.64 (个 12.51) 61.24 ± 0.37 (个13.00)</td></tr></table>",
1055
+ "bbox": [
1056
+ 254,
1057
+ 138,
1058
+ 738,
1059
+ 184
1060
+ ],
1061
+ "page_idx": 8
1062
+ },
1063
+ {
1064
+ "type": "text",
1065
+ "text": "",
1066
+ "bbox": [
1067
+ 174,
1068
+ 207,
1069
+ 823,
1070
+ 262
1071
+ ],
1072
+ "page_idx": 8
1073
+ },
1074
+ {
1075
+ "type": "text",
1076
+ "text": "Number of generated features ",
1077
+ "text_level": 1,
1078
+ "bbox": [
1079
+ 174,
1080
+ 270,
1081
+ 385,
1082
+ 284
1083
+ ],
1084
+ "page_idx": 8
1085
+ },
1086
+ {
1087
+ "type": "text",
1088
+ "text": "The right side of Figure 3 analyzes whether more generated features results in consistent improvement in both cases, namely when the features of support and query set are transformed by Tukey’s transformation (red) and when they are not (blue). We found that when the number of generated features is below 500, both cases can benefit from more generated features. However, when more features are sampled, the performance of the classifier tested on untransformed features begins to decline. By training with the generated samples, the simple logistic regression classifier has a $12 \\%$ relative performance improvement in a 1-shot classification setting. ",
1089
+ "bbox": [
1090
+ 174,
1091
+ 291,
1092
+ 825,
1093
+ 388
1094
+ ],
1095
+ "page_idx": 8
1096
+ },
1097
+ {
1098
+ "type": "text",
1099
+ "text": "4.6 OTHER HYPER-PARAMETERS ",
1100
+ "text_level": 1,
1101
+ "bbox": [
1102
+ 176,
1103
+ 405,
1104
+ 416,
1105
+ 419
1106
+ ],
1107
+ "page_idx": 8
1108
+ },
1109
+ {
1110
+ "type": "text",
1111
+ "text": "We select the hyperparameters based on the performance of the validation set. The $k$ base class statistics to calibrate the novel class distribution in Equation 5 is set to 2. Figure 4 shows the effect of different values of $k$ . The $\\alpha$ in Equation 6 is a constant added on each element of the estimated covariance matrix, which can determine the degree of dispersion of features sampled from the calibrated distributions. An appropriate value of $\\alpha$ can ensure a good decision boundary for the classifier. Different datasets have different statistics and an appropriate value of $\\alpha$ may vary for different datasets. Figure 5 explores the effect of $\\alpha$ on all three datasets, i.e. miniImageNet, tieredImageNet and CUB. We observe that in each dataset, the performance of the validation set and the novel (testing) set generally has the same tendency, which indicates that the variance is dataset-dependent and is not overfitting to a specific set. ",
1112
+ "bbox": [
1113
+ 173,
1114
+ 431,
1115
+ 825,
1116
+ 570
1117
+ ],
1118
+ "page_idx": 8
1119
+ },
1120
+ {
1121
+ "type": "image",
1122
+ "img_path": "images/6c98d8c600fda1cf93a0bef20bb528be60e2ba30644285b61ad6f647f5bae774.jpg",
1123
+ "image_caption": [
1124
+ "Figure 4: The effect of different values of $k$ . "
1125
+ ],
1126
+ "image_footnote": [],
1127
+ "bbox": [
1128
+ 194,
1129
+ 583,
1130
+ 475,
1131
+ 744
1132
+ ],
1133
+ "page_idx": 8
1134
+ },
1135
+ {
1136
+ "type": "image",
1137
+ "img_path": "images/99d76257658bffe4a53b0ccea91b4619d0c3d8a51aeb9a45d4da77130bf715b8.jpg",
1138
+ "image_caption": [
1139
+ "Figure 5: The effect of different values of $\\alpha$ "
1140
+ ],
1141
+ "image_footnote": [],
1142
+ "bbox": [
1143
+ 522,
1144
+ 582,
1145
+ 803,
1146
+ 744
1147
+ ],
1148
+ "page_idx": 8
1149
+ },
1150
+ {
1151
+ "type": "text",
1152
+ "text": "5 CONCLUSION AND FUTURE WORKS ",
1153
+ "text_level": 1,
1154
+ "bbox": [
1155
+ 174,
1156
+ 796,
1157
+ 498,
1158
+ 810
1159
+ ],
1160
+ "page_idx": 8
1161
+ },
1162
+ {
1163
+ "type": "text",
1164
+ "text": "We propose a simple but effective distribution calibration strategy for few-shot classification. Without complex generative models, training loss and extra parameters to learn, a simple logistic regression trained with features generated by our strategy outperforms the current state-of-the-art methods by $\\sim 5 \\%$ on miniImageNet. The calibrated distribution is visualized and demonstrates an accurate estimation of the feature distribution. Future works will explore the applicability of distribution calibration on more problem settings, such as multi-domain few-shot classification, and more methods, such as metric-based meta-learning algorithms. ",
1165
+ "bbox": [
1166
+ 173,
1167
+ 825,
1168
+ 825,
1169
+ 924
1170
+ ],
1171
+ "page_idx": 8
1172
+ },
1173
+ {
1174
+ "type": "text",
1175
+ "text": "REFERENCES ",
1176
+ "text_level": 1,
1177
+ "bbox": [
1178
+ 176,
1179
+ 102,
1180
+ 287,
1181
+ 118
1182
+ ],
1183
+ "page_idx": 9
1184
+ },
1185
+ {
1186
+ "type": "text",
1187
+ "text": "Antreas Antoniou and Amos J. Storkey. Assume, augment and learn: Unsupervised few-shot metalearning via random labels and data augmentation. CoRR, 2019. ",
1188
+ "bbox": [
1189
+ 173,
1190
+ 126,
1191
+ 823,
1192
+ 155
1193
+ ],
1194
+ "page_idx": 9
1195
+ },
1196
+ {
1197
+ "type": "text",
1198
+ "text": "Wei-Yu Chen, Yen-Cheng Liu, Zsolt Kira, Yu-Chiang Frank Wang, and Jia-Bin Huang. A closer look at few-shot classification. In ICLR, 2019a. ",
1199
+ "bbox": [
1200
+ 171,
1201
+ 165,
1202
+ 823,
1203
+ 194
1204
+ ],
1205
+ "page_idx": 9
1206
+ },
1207
+ {
1208
+ "type": "text",
1209
+ "text": "Zitian Chen, Yanwei Fu, Yinda Zhang, Yu-Gang Jiang, Xiangyang Xue, and Leonid Sigal. Multilevel semantic feature augmentation for one-shot learning. TIP, 28(9):4594–4605, 2019b. ",
1210
+ "bbox": [
1211
+ 173,
1212
+ 203,
1213
+ 823,
1214
+ 233
1215
+ ],
1216
+ "page_idx": 9
1217
+ },
1218
+ {
1219
+ "type": "text",
1220
+ "text": "Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In ICML, 2017. ",
1221
+ "bbox": [
1222
+ 171,
1223
+ 242,
1224
+ 823,
1225
+ 272
1226
+ ],
1227
+ "page_idx": 9
1228
+ },
1229
+ {
1230
+ "type": "text",
1231
+ "text": "Hang Gao, Zheng Shou, Alireza Zareian, Hanwang Zhang, and Shih-Fu Chang. Low-shot learning via covariance-preserving adversarial augmentation networks. In NeurIPS, 2018. ",
1232
+ "bbox": [
1233
+ 173,
1234
+ 281,
1235
+ 821,
1236
+ 310
1237
+ ],
1238
+ "page_idx": 9
1239
+ },
1240
+ {
1241
+ "type": "text",
1242
+ "text": "Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NeurIPS, 2014. ",
1243
+ "bbox": [
1244
+ 173,
1245
+ 320,
1246
+ 823,
1247
+ 349
1248
+ ],
1249
+ "page_idx": 9
1250
+ },
1251
+ {
1252
+ "type": "text",
1253
+ "text": "Bharath Hariharan and Ross Girshick. Low-shot visual recognition by shrinking and hallucinating features. In ICCV, 2017. ",
1254
+ "bbox": [
1255
+ 173,
1256
+ 358,
1257
+ 823,
1258
+ 388
1259
+ ],
1260
+ "page_idx": 9
1261
+ },
1262
+ {
1263
+ "type": "text",
1264
+ "text": "Zhenguo Li, Fengwei Zhou, Fei Chen, and Hang Li. Meta-sgd: Learning to learn quickly for few shot learning. CoRR, 2017. ",
1265
+ "bbox": [
1266
+ 173,
1267
+ 397,
1268
+ 823,
1269
+ 428
1270
+ ],
1271
+ "page_idx": 9
1272
+ },
1273
+ {
1274
+ "type": "text",
1275
+ "text": "Bin Liu, Yue Cao, Yutong Lin, Qi Li, Zheng Zhang, Mingsheng Long, and Han Hu. Negative margin matters: Understanding margin in few-shot classification. In ECCV, 2020a. ",
1276
+ "bbox": [
1277
+ 173,
1278
+ 436,
1279
+ 823,
1280
+ 467
1281
+ ],
1282
+ "page_idx": 9
1283
+ },
1284
+ {
1285
+ "type": "text",
1286
+ "text": "Jialun Liu, Yifan Sun, Chuchu Han, Zhaopeng Dou, and Wenhui Li. Deep representation learning on long-tailed data: A learnable embedding augmentation perspective. In CVPR, June 2020b. ",
1287
+ "bbox": [
1288
+ 173,
1289
+ 476,
1290
+ 823,
1291
+ 506
1292
+ ],
1293
+ "page_idx": 9
1294
+ },
1295
+ {
1296
+ "type": "text",
1297
+ "text": "Lu Liu, Tianyi Zhou, Guodong Long, Jing Jiang, Lina Yao, and Chengqi Zhang. Prototype propagation networks (PPN) for weakly-supervised few-shot learning on category graph. In IJCAI, 2019a. ",
1298
+ "bbox": [
1299
+ 173,
1300
+ 513,
1301
+ 825,
1302
+ 558
1303
+ ],
1304
+ "page_idx": 9
1305
+ },
1306
+ {
1307
+ "type": "text",
1308
+ "text": "Lu Liu, Tianyi Zhou, Guodong Long, Jing Jiang, and Chengqi Zhang. Learning to propagate for graph meta-learning. In NeurIPS, 2019b. ",
1309
+ "bbox": [
1310
+ 171,
1311
+ 566,
1312
+ 823,
1313
+ 597
1314
+ ],
1315
+ "page_idx": 9
1316
+ },
1317
+ {
1318
+ "type": "text",
1319
+ "text": "Yaoyao Liu, Bernt Schiele, and Qianru Sun. An ensemble of epoch-wise empirical bayes for fewshot learning. In ECCV, 2020c. ",
1320
+ "bbox": [
1321
+ 171,
1322
+ 606,
1323
+ 821,
1324
+ 636
1325
+ ],
1326
+ "page_idx": 9
1327
+ },
1328
+ {
1329
+ "type": "text",
1330
+ "text": "Puneet Mangla, Nupur Kumari, Abhishek Sinha, Mayank Singh, Balaji Krishnamurthy, and Vineeth N Balasubramanian. Charting the right manifold: Manifold mixup for few-shot learning. In WACV, 2020. ",
1331
+ "bbox": [
1332
+ 174,
1333
+ 645,
1334
+ 825,
1335
+ 688
1336
+ ],
1337
+ "page_idx": 9
1338
+ },
1339
+ {
1340
+ "type": "text",
1341
+ "text": "Seong-Jin Park, Seungju Han, Ji-won Baek, Insoo Kim, Juhwan Song, Hae Beom Lee, Jae-Joon Han, and Sung Ju Hwang. Meta variance transfer: Learning to augment from the others. In ICML, 2020. ",
1342
+ "bbox": [
1343
+ 173,
1344
+ 696,
1345
+ 825,
1346
+ 741
1347
+ ],
1348
+ "page_idx": 9
1349
+ },
1350
+ {
1351
+ "type": "text",
1352
+ "text": "F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011. ",
1353
+ "bbox": [
1354
+ 173,
1355
+ 750,
1356
+ 825,
1357
+ 806
1358
+ ],
1359
+ "page_idx": 9
1360
+ },
1361
+ {
1362
+ "type": "text",
1363
+ "text": "Tiexin Qin, Wenbin Li, Yinghuan Shi, and Yang Gao. Diversity helps: Unsupervised few-shot learning via distribution shift-based data augmentation, 2020. ",
1364
+ "bbox": [
1365
+ 171,
1366
+ 818,
1367
+ 823,
1368
+ 847
1369
+ ],
1370
+ "page_idx": 9
1371
+ },
1372
+ {
1373
+ "type": "text",
1374
+ "text": "Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. In ICLR, 2017. ",
1375
+ "bbox": [
1376
+ 171,
1377
+ 856,
1378
+ 813,
1379
+ 872
1380
+ ],
1381
+ "page_idx": 9
1382
+ },
1383
+ {
1384
+ "type": "text",
1385
+ "text": "Mengye Ren, Eleni Triantafillou, Sachin Ravi, Jake Snell, Kevin Swersky, Joshua B Tenenbaum, Hugo Larochelle, and Richard S Zemel. Meta-learning for semi-supervised few-shot classification. In ICLR, 2018. ",
1386
+ "bbox": [
1387
+ 174,
1388
+ 881,
1389
+ 823,
1390
+ 924
1391
+ ],
1392
+ "page_idx": 9
1393
+ },
1394
+ {
1395
+ "type": "text",
1396
+ "text": "David E. Rumelhart, Geoffrey E. Hinton, and Ronald J. Williams. Learning Representations by Back-propagating Errors. Nature, 323:533–536, 1986. \nOlga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael S. Bernstein, Alexander C. Berg, and Fei-Fei Li. Imagenet large scale visual recognition challenge. CoRR, abs/1409.0575, 2014. \nAndrei A. Rusu, Dushyant Rao, Jakub Sygnowski, Oriol Vinyals, Razvan Pascanu, Simon Osindero, and Raia Hadsell. Meta-learning with latent embedding optimization. In ICLR, 2019. \nRuslan Salakhutdinov, Joshua Tenenbaum, and Antonio Torralba. One-shot learning with a hierarchical nonparametric bayesian model. In ICML workshop, 2012. \nEli Schwartz, Leonid Karlinsky, Joseph Shtok, Sivan Harary, Mattias Marder, Abhishek Kumar, Rogerio Feris, Raja Giryes, and Alex Bronstein. Delta-encoder: an effective sample synthesis method for few-shot object recognition. In NeurIPS, 2018. \nJake Snell, Kevin Swersky, and Richard S. Zemel. Prototypical networks for few-shot learning. In NeurIPS, 2017. \nJohn W Tukey. Exploratory data analysis. Addison-Wesley Series in Behavioral Science. AddisonWesley, Reading, MA, 1977. URL https://cds.cern.ch/record/107005. \nLaurens van der Maaten and Geoffrey Hinton. Visualizing data using t-SNE. Journal of Machine Learning Research, 2008. \nOriol Vinyals, Charles Blundell, Tim Lillicrap, Koray Kavukcuoglu, and Daan Wierstra. Matching networks for one shot learning. In NeurIPS, 2016. \nYu-Xiong Wang, Ross Girshick, Martial Hebert, and Bharath Hariharan. Low-shot learning from imaginary data. In CVPR, 2018. \nYulin Wang, Xuran Pan, Shiji Song, Hong Zhang, Gao Huang, and Cheng Wu. Implicit semantic data augmentation for deep networks. In NeurIPS, 2019. \nP. Welinder, S. Branson, T. Mita, C. Wah, F. Schroff, S. Belongie, and P. Perona. Caltech-UCSD Birds 200. Technical Report CNS-TR-2010-001, California Institute of Technology, 2010. \nYongqin Xian, Tobias Lorenz, Bernt Schiele, and Zeynep Akata. Feature generating networks for zero-shot learning. In CVPR, 2018. \nSergey Zagoruyko and Nikos Komodakis. Wide residual networks. In BMVC, 2016. \nChi Zhang, Yujun Cai, Guosheng Lin, and Chunhua Shen. Deepemd: Few-shot image classification with differentiable earth mover’s distance and structured classifiers. In CVPR, 2020. \nJian Zhang, Chenglong Zhao, Bingbing Ni, Minghao Xu, and Xiaokang Yang. Variational few-shot learning. In ICCV, 2019. \nRuixiang Zhang, Tong Che, Zoubin Ghahramani, Yoshua Bengio, and Yangqiu Song. Metagan: An adversarial approach to few-shot learning. In NeurIPS, 2018. ",
1397
+ "bbox": [
1398
+ 171,
1399
+ 97,
1400
+ 826,
1401
+ 751
1402
+ ],
1403
+ "page_idx": 10
1404
+ },
1405
+ {
1406
+ "type": "image",
1407
+ "img_path": "images/0a660f4a0195daaa4161ed37a66854e795c54db5921767dfa35670ef13d69928.jpg",
1408
+ "image_caption": [
1409
+ "Figure 6: We show the feature distribution of 5 base classes, and the feature distribution of 5 novel classes before/after Tukey’s Transformation. "
1410
+ ],
1411
+ "image_footnote": [],
1412
+ "bbox": [
1413
+ 187,
1414
+ 101,
1415
+ 807,
1416
+ 257
1417
+ ],
1418
+ "page_idx": 11
1419
+ },
1420
+ {
1421
+ "type": "table",
1422
+ "img_path": "images/6329281b2ec553ea23700d925efbd023ffb292b91f31d48a87dcdc4a394bb89a.jpg",
1423
+ "table_caption": [
1424
+ "Table 7: The comparison with nearest class feature augmentation. "
1425
+ ],
1426
+ "table_footnote": [],
1427
+ "table_body": "<table><tr><td>Training data</td><td>miniImageNet 5way1shot</td></tr><tr><td>Support set only</td><td>56.37±0.68</td></tr><tr><td>Support set + 1 feature from the nearest class</td><td>62.39 ± 0.49</td></tr><tr><td>Support set + 5 features from the nearest class</td><td>59.73 ± 0.42</td></tr><tr><td>Support set + 1O features from the nearest class</td><td>58.93 ± 0.49</td></tr><tr><td>Support set+1OO features from the nearest class</td><td>57.33 ± 0.48</td></tr><tr><td>Support set + 1OO features sampled from calibrated distribution</td><td>68.53 ± 0.32</td></tr></table>",
1428
+ "bbox": [
1429
+ 186,
1430
+ 313,
1431
+ 810,
1432
+ 412
1433
+ ],
1434
+ "page_idx": 11
1435
+ },
1436
+ {
1437
+ "type": "text",
1438
+ "text": "A AUGMENTATION WITH NEAREST CLASS FEATURES ",
1439
+ "text_level": 1,
1440
+ "bbox": [
1441
+ 174,
1442
+ 468,
1443
+ 625,
1444
+ 483
1445
+ ],
1446
+ "page_idx": 11
1447
+ },
1448
+ {
1449
+ "type": "text",
1450
+ "text": "Instead of sampling from the calibrated distribution, we can simply retrieve examples from the nearest class to augment the support set. Table 7 shows the comparison of training using samples from the calibrated distribution, the different number of retrieved features from the nearest class, and only using the support set. We found the retrieved features can improve the performance compared to only using the support set but can damage the performance when increasing the number of retrieved features, where the retrieved samples probably serve as noisy data for tasks targeting different classes. ",
1451
+ "bbox": [
1452
+ 173,
1453
+ 501,
1454
+ 825,
1455
+ 585
1456
+ ],
1457
+ "page_idx": 11
1458
+ },
1459
+ {
1460
+ "type": "text",
1461
+ "text": "B DISTRIBUTION CALIBRATION WITHOUT NOVEL FEATURE ",
1462
+ "text_level": 1,
1463
+ "bbox": [
1464
+ 173,
1465
+ 626,
1466
+ 683,
1467
+ 641
1468
+ ],
1469
+ "page_idx": 11
1470
+ },
1471
+ {
1472
+ "type": "text",
1473
+ "text": "We calibrate the novel class mean by averaging the novel class mean and the retrieved base class means in Equation 6. Table 8 shows the distribution calibration without averaging novel feature, in which the calibrated mean is calculated as $\\begin{array} { r } { \\pmb { \\mu } ^ { \\prime } = \\frac { \\Sigma _ { i \\in \\mathbb { S } _ { N } } \\pmb { \\mu } _ { i } } { k } } \\end{array}$ . ",
1474
+ "bbox": [
1475
+ 174,
1476
+ 660,
1477
+ 825,
1478
+ 707
1479
+ ],
1480
+ "page_idx": 11
1481
+ },
1482
+ {
1483
+ "type": "text",
1484
+ "text": "C THE EFFECTS OF TUKEY’S TRANSFORMATION ",
1485
+ "text_level": 1,
1486
+ "bbox": [
1487
+ 174,
1488
+ 732,
1489
+ 591,
1490
+ 748
1491
+ ],
1492
+ "page_idx": 11
1493
+ },
1494
+ {
1495
+ "type": "text",
1496
+ "text": "Figure 6 shows the distribution of 5 base classes and 5 novel classes before/after Tukey’s transformation. It is observed that the base class distribution satisfies Gaussian assumption well (left) while the novel class distribution is more skew (middle). The novel class distribution after Tukey’s transformation (right) is more aligned with the Gaussian-like base class distribution. ",
1497
+ "bbox": [
1498
+ 173,
1499
+ 766,
1500
+ 825,
1501
+ 823
1502
+ ],
1503
+ "page_idx": 11
1504
+ },
1505
+ {
1506
+ "type": "table",
1507
+ "img_path": "images/a8016ee8cf85e6290eb91a0e95ef88c08d70efcd66587e70e40baa467bb7ecdb.jpg",
1508
+ "table_caption": [
1509
+ "Table 8: The comparison between distribution calibration with and without novel feature $\\tilde { \\pmb x }$ . "
1510
+ ],
1511
+ "table_footnote": [],
1512
+ "table_body": "<table><tr><td></td><td>miniImageNet 5way1shot</td></tr><tr><td>Distribution Calibration w/o novel feature x</td><td>59.38 ± 0.73</td></tr><tr><td>Distribution Calibration w/ novel feature x</td><td>68.57 ± 0.55</td></tr></table>",
1513
+ "bbox": [
1514
+ 248,
1515
+ 851,
1516
+ 748,
1517
+ 897
1518
+ ],
1519
+ "page_idx": 11
1520
+ },
1521
+ {
1522
+ "type": "table",
1523
+ "img_path": "images/ff6e8034d2f5de641d2d926d1800a7565d2f2f3c6641c0fc50ec9c8504308c57.jpg",
1524
+ "table_caption": [],
1525
+ "table_footnote": [
1526
+ "Table 9: Performance improvement with respect to the similarity level between a query novel class and the most similar base classes. "
1527
+ ],
1528
+ "table_body": "<table><tr><td>Novel class</td><td>Top-1 base class similarity</td><td>Top-2 base class similarity</td><td>DC improvement</td></tr><tr><td>malamute</td><td>93%</td><td>85%</td><td>↑21.30%</td></tr><tr><td>golden retriever</td><td>85%</td><td>74%</td><td>个 18.37%</td></tr><tr><td>ant</td><td>71%</td><td>67%</td><td>↑9.77%</td></tr></table>",
1529
+ "bbox": [
1530
+ 174,
1531
+ 101,
1532
+ 821,
1533
+ 160
1534
+ ],
1535
+ "page_idx": 12
1536
+ },
1537
+ {
1538
+ "type": "text",
1539
+ "text": "D THE SIMILARITY LEVEL ANALYSIS ",
1540
+ "text_level": 1,
1541
+ "bbox": [
1542
+ 173,
1543
+ 223,
1544
+ 498,
1545
+ 238
1546
+ ],
1547
+ "page_idx": 12
1548
+ },
1549
+ {
1550
+ "type": "text",
1551
+ "text": "We found that the higher similarities between the retrieved base class distribution and the novel class ground-truth distribution, the higher the performance improvement our method will bring as shown in Table 9. The results in the table are under 5-way-1-shot setting. ",
1552
+ "bbox": [
1553
+ 174,
1554
+ 252,
1555
+ 823,
1556
+ 296
1557
+ ],
1558
+ "page_idx": 12
1559
+ }
1560
+ ]
parse/train/JWOiYxMG92s/JWOiYxMG92s_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/JWOiYxMG92s/JWOiYxMG92s_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJCPLLpaW/SJCPLLpaW.md ADDED
@@ -0,0 +1,313 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # EXPLORING THE HIDDEN DIMENSION IN ACCELERATING CONVOLUTIONAL NEURAL NETWORKS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ DeePa is a deep learning framework that explores parallelism in all parallelizable dimensions to accelerate the training process of convolutional neural networks. DeePa optimizes parallelism at the granularity of each individual layer in the network. We present an elimination-based algorithm that finds an optimal parallelism configuration for every layer. Our evaluation shows that DeePa achieves up to $6 . 5 \times$ speedup compared to state-of-the-art deep learning frameworks and reduces data transfers by up to $2 3 \times$ .
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Training convolutional neural networks (CNNs) is increasingly compute-intensive and timeconsuming. It takes days or even weeks to train deep CNNs from scratch (Szegedy et al., 2014; Zeiler & Fergus, 2014; Simonyan & Zisserman, 2014; Szegedy et al., 2016). Existing deep learning frameworks such as TensorFlow, PyTorch, and Caffe2 parallelize the training process onto multiple processors (usually GPUs) using image parallelism1 dividing the entire image dataset into batches with the same number of images and assigning each batch to a dedicated processor.
12
+
13
+ The standard parallelization of CNN training only exploits image parallelism. However, other dimensions can also parallelize the training process. For example, in CNNs for 2D images, data is commonly organized as 4-dimensional tensors (i.e., image, height, width, channel). The image dimension includes an index for each image in the input dataset. The height and width dimensions specify a position in an image. For a particular position, the channel dimension2 indexes different neurons for that position. Exploring these other parallelizable dimensions can potentially reduce the compute time and data transfer cost when training CNNs (see Section 2). Moreover, different layers in a CNN may prefer different parallelism configurations for achieving optimal performance.
14
+
15
+ We propose DeePa, a deep learning framework that explores parallelism in all parallelizable dimensions to accelerate the training of CNNs. To the best of our knowledge, DeePa is the first system that models and exploits the parallelism of neural networks at the granularity of each individual layer. To generate a parallelism configuration for each layer, DeePa uses an elimination-based algorithm that automatically finds the configuration with the best estimated performance.
16
+
17
+ The main contributions of this paper are:
18
+
19
+ • We present DeePa, a deep learning framework that explores parallelism in all parallelizable dimensions to accelerate the training of CNNs.
20
+ • The parallelization strategy is selected at the granularity of each individual layer.
21
+ • We present an elimination-based algorithm for finding the parallelism configuration with optimal estimated performance for each layer.
22
+ • Our evaluation shows that, compared to state-of-the-art deep learning frameworks (e.g., TensorFlow and PyTorch), DeePa achieves $6 . 5 \times$ , $1 . 9 \times$ , and $1 . 5 \times$ speedup for AlexNet,
23
+
24
+ Table 1: Detailed information for the example convolutional layers used in Figure 1 and 2.
25
+
26
+ <table><tr><td>Name</td><td>Input Channels</td><td>Output Channels</td><td>Height</td><td>Width</td><td>Kernel</td><td>Stride</td><td>Description</td></tr><tr><td>C1</td><td>128</td><td>128</td><td>112</td><td>112</td><td>3x3</td><td>1x1</td><td>Conv4 in VGG-16</td></tr><tr><td>C2</td><td>512</td><td>512</td><td>28</td><td>28</td><td>3x3</td><td>1x1</td><td>Conv8,Conv9,and Conv10 in VGG-16</td></tr><tr><td>C3</td><td>192</td><td>64</td><td>35</td><td>35</td><td>1x1</td><td>1x1</td><td>Conv1x1 in an Inception-v3 module</td></tr><tr><td>C4</td><td>48</td><td>64</td><td>35</td><td>35</td><td>5x5</td><td>1x1</td><td>Conv5x5 in an Inception-v3 module</td></tr><tr><td>C5</td><td>64</td><td>192</td><td>27</td><td>27</td><td>5x5</td><td>1x1</td><td>Conv2 in AlexNet</td></tr><tr><td>C6</td><td>256</td><td>256</td><td>13</td><td>13</td><td>3x3</td><td>1x1</td><td>Conv5 in AlexNet</td></tr><tr><td>C7</td><td>32</td><td>64</td><td>147</td><td>147</td><td>3x3</td><td>1x1</td><td>Conv3 in Inception-v3</td></tr><tr><td>C8</td><td>448</td><td>384</td><td>8</td><td>8</td><td>3x3</td><td>1x1</td><td>Conv3x3 in an Inception-v3 module</td></tr></table>
27
+
28
+ VGG-16, and Inception-v3, respectively. The performance improvement comes from reducing overall data transfers, automatically overlapping computation with data movement, and accelerating computation throughput.
29
+
30
+ # 2 MOTIVATION
31
+
32
+ This work is motivated by the following observations.
33
+
34
+ # 2.1 ACCELERATING COMPUTATION THROUGHPUT
35
+
36
+ ![](images/20ab3eaf0d3e2ade09d05eae1955907088f1ca0e086505fac32f7f4307ee3b86.jpg)
37
+ Figure 1: Relative performance for training different convolutional layers. Computation throughput is calculated by dividing the batch size with computation time (both forward processing and back propagation) and is normalized by the worst case.
38
+
39
+ ![](images/d2511e9fd175b0a8fcefd5e352fb34b1abd24d077f8f81f5254a1be85aa5735c.jpg)
40
+ Figure 2: Computation and data transfer time to process a batch of 512 images using image parallelism for the third layer, an intermediate layer, and the last layer of Inception-v3.
41
+
42
+ Convolutional layers generally consume the bulk of the training time in CNNs, and parallelizing training in different data dimensions results in significantly different performance. Figure 1 shows the relative speed of training six different convolutional layers from AlexNet, VGG-16, and Inception-v3. The properties of the convolutional layers are shown in Table 1. For each convolutional layer, we tried parallelizing the computation in each individual parallelizable dimension as well as combinations of different parallelizable dimensions, and we report the performance of the standard parallelization over images along with the worst and best parallelization strategies we discovered. Figure 1 shows that different parallelism configurations result in very different performance, and image parallelism generally achieves suboptimal performance. Therefore, exploring parallelism in other dimensions can potentially accelerate the training of convolutional layers.
43
+
44
+ # 2.2 REDUCING DATA TRANSFER COST
45
+
46
+ Different parallelization strategies can also result in significantly different amounts of data movement. Figure 3 shows an example of parallelizing the first fully-connected layer of VGG-16 on two GPUs in different dimensions. In image parallelism (Figure 3a), each GPU processes a batch of images and computes the gradient for the entire fully-connected layer. This requires each GPU to synchronize the gradients for the entire fully-connected layer (shown as the shadow rectangles) after each step. An alternative approach (Figure 3b) parallelizes in the channel dimension by assigning a subset of the output channels to each GPU. As a result, different GPUs compute the gradients for disjoint subsets of the fully-connected layer, which eliminates transferring the fully-connected layer but introduces additional data transfers for input tensors (shown as the shadow rectangles). For this particular case, using parallelism in the channel dimension reduces data transfer costs by $1 2 \times$ .
47
+
48
+ ![](images/087082065dd2852e1aabf15f08fb37a71a5eb1ca792911dba8159579f380fdec.jpg)
49
+ (a) Parallelism in the image dimension. (b) Parallelism in the channel dimension.
50
+ Figure 3: Different configurations for parallelizing the first fully-connected layer of VGG-16. Rectangles with solid lines indicate tensors managed by the local GPU, while rectangles with dot lines are tensors managed by a remote GPU. The shadow rectangles indicate data transfers for each step.
51
+
52
+ # 2.3 OPTIMIZING PER-LAYER PERFORMANCE
53
+
54
+ When processing a batch of images, increasing the number of workers does not always improve overall execution time, due to the data transfer overhead to synchronize gradients across different workers. Figure 2 shows the per-step training time for three different layers in Inception-v3 for a batch size of 512 images on up to 16 GPUs. The training time includes forward processing, backward propagation, and gradient aggregation. The figure shows that different layers in a neural network may prefer different hardware configurations, and there is no single configuration that is optimal for all layers. For example, the third layer performs best on 16 GPUs while the last layer performs best on 4 GPUs. Thus, a parallelism configuration includes both selecting the data dimensions to be parallelized and the number of parallel workers (or, equivalently, the number of subsets into which the data is partitioned).
55
+
56
+ # 3 DEEPA
57
+
58
+ ![](images/d0339f1478608f95400a49f9cc1d88ec5ec106b9fc53a5614d8c8e826fa5c6ad.jpg)
59
+ Figure 4: Example configurations that parallelize an operation in a single dimension or combinations of multiple dimensions. The figure shows how each image is partitioned in different configurations. Each configuration needs a total of 4 workers.
60
+
61
+ Similar to TensorFlow and PyTorch, DeePa uses computation graphs to describe dependencies between operations. In a computation graph $G = ( V , E )$ , each node $n \in V$ is an operation (e.g., a convolution or matrix-multiply), and each directed edge $( u , v ) \in E$ is a tensor that is an output of $u$ and an input of $v$ .
62
+
63
+ One key difference between DeePa and TensorFlow or PyTorch is that each node in the DeePa computation graph also includes a configuration that describes how the corresponding operation is parallelized across different workers. For each parallelizable dimension (i.e., image, height, width, and channel), the configuration includes an integer that describes the degree of parallelism in that dimension. For a configuration, the product of the integers over all dimensions is the number of workers needed to process the operation in that configuration. Figure 4 demonstrates some example configurations that explore parallelism in a single dimension as well as combinations of different dimensions. DeePa assumes equal partitioning in each dimension. As a result, each worker receives the same size input, which provides well-balanced workload distribution in our experiments.
64
+
65
+ For each node in the computation graph, its configuration describes how the output tensor is divided onto multiple workers. Each worker computes a disjoint subset of the output tensor, and thus each worker can process the operation in parallel without data dependencies. Given a node’s configuration, DeePa calculates the input sets for each worker and automatically schedules proper data transfers between operations.
66
+
67
+ DeePa also provides three additional functions:
68
+
69
+ • For each node $v$ and configuration $c$ , v.compute $( c )$ estimates the time to process the corresponding operation under the parallelism configuration $c$ . This includes both the forward processing and back propagation time and is estimated by running the operation in that configuration multiple times on the device and measuring the average execution time.
70
+ • For each edge $\boldsymbol { e } ~ = ~ ( u , v )$ , $e . x f e r ( c _ { u } , c _ { v } )$ estimates the time to transfer the input tensor $e$ to each worker, using the size of the data to be moved and the known communication bandwidth. Note that $e . x f e r ( c _ { u } , c _ { v } )$ is zero if $u$ and $v$ have the same configuration (i.e., $c _ { u } = c _ { v } ,$ , in which case no data is transferred. As with compute(), we precompute the $x f e r ( )$ function for each edge in the graph by calculating the overall data transfer size for all possible source and destination configurations.
71
+ • For each node $v$ and configuration $c$ , v.update $( c )$ estimates the time to update parameters for the corresponding operation. We use the data transfer time to approximate the update time, since the data transfer time is much longer than the compute time for updating parameters. Note that different configurations can have significantly different update time, as described in Section 2.2.
72
+
73
+ A global configuration $g$ includes a parallelism configuration for each node in a computation graph: $g ( v )$ describes the parallelism configuration for node $v$ . Using the functions defined above, we can model the per-step execution time for a computation graph:
74
+
75
+ $$
76
+ C o s t ( g , ( V , E ) ) = \sum _ { v \in V } \{ v . c o m p u t e ( g ( v ) ) + v . u p d a t e ( g ( v ) ) \} + \sum _ { e = ( u , v ) \in E } e . x f e r ( g ( u ) , g ( v ) )
77
+ $$
78
+
79
+ $C o s t ( g , ( V , E ) )$ estimates the per-step execution time if the computation graph $( V , E )$ is parallelized using global configuration $g$ . This execution time includes forwarding processing, backward propagation, and gradient aggregation. Equation 1 expresses the problem of finding the configuration for each individual node as a global optimization problem.
80
+
81
+ # 4 FINDING OPTIMAL GLOBAL CONFIGURATIONS
82
+
83
+ ![](images/c82e48e9ee621289587ff7e0281f5657624601010588e74df4e479f713a5683c.jpg)
84
+ Figure 5: Performing a node/edge elimination on a computation graph.
85
+
86
+ We now describe our algorithm for finding a global configuration that minimizes Equation 1. In DeePa, each node can select any of a fixed (but large) set of parallelism configurations. Therefore the number of potential global configurations is exponential in the number of nodes in a computation graph, which makes it impractical to enumerate all global configurations for deep CNNs such as VGG-16 and Inception-v3.
87
+
88
+ However, the CNNs we have seen in practice exhibit strong locality: each node is only connected to a few nodes with similar depth in a computation graph. Based on this observation, we use the following two elimination strategies to iteratively simplify the computation graph while preserving the globally optimal configuration.
89
+
90
+ Node elimination. For each node $w$ with a single in-edge $\boldsymbol { e } _ { 1 } ~ = ~ ( u , w )$ and a single out-edge $e _ { 2 } = \left( w , v \right)$ , we remove node $w$ and the two edges $e _ { 1 }$ and $e _ { 2 }$ from the graph and insert a new edge $\boldsymbol { e } ^ { \prime } = \left( \boldsymbol { u } , \boldsymbol { v } \right)$ (shown in Figure 5a). The xfer() function for node $e ^ { \prime }$ is
91
+
92
+ $$
93
+ e ^ { \prime } . x f e r ( c _ { u } , c _ { v } ) = \operatorname* { m i n } _ { c _ { w } } \{ e _ { 1 } . x f e r ( c _ { u } , c _ { w } ) + w . c o m p u t e ( c _ { w } ) + w . u p d a t e ( c _ { w } ) + e _ { 2 } . x f e r ( c _ { w } , c _ { v } ) \}
94
+ $$
95
+
96
+ Note that because we have precomputed the $x f e r ( )$ function for edges in the original graph, we can similarly compute the $x f e r ( )$ function for the transitive edge added by a node elimination; i.e., we use dynamic programming to compute the optimal configuration for node $w$ for every possible choice of configurations for nodes $u$ and $v$ . For CNNs with a linear computation graph (e.g., AlexNet and VGG-16), node elimination is sufficient to reduce the original graph to a graph with only 2 nodes.
97
+
98
+ Edge elimination. For two edges with the same source and destination node (i.e., $\boldsymbol { e } _ { 1 } = ( u , v )$ and $e _ { 2 } = ( u , v ) )$ , we can remove $e _ { 1 }$ and $e _ { 2 }$ from the graph and insert a new edge $\boldsymbol { e } ^ { \prime } = \left( u , v \right)$ (shown in Figure 5b). The $x f e r ( )$ function for node $e ^ { \prime }$ is
99
+
100
+ $$
101
+ e ^ { \prime } . x f e r ( c _ { u } , c _ { v } ) = e _ { 1 } . x f e r ( c _ { u } , c _ { v } ) + e _ { 2 } . x f e r ( c _ { u } , c _ { v } )
102
+ $$
103
+
104
+ ![](images/dda15850056babc26c99b6228694861bbb715df2bba3cd953aaee45bc92c0dab.jpg)
105
+ Figure 6: Iteratively performing node/edge eliminations on an Inception module.
106
+
107
+ As with node elimination, we compute the $x f e r ( )$ function for $e ^ { \prime }$ using the already computed xfer() functions for $e _ { 1 }$ and $e _ { 2 }$ . Figure 6 shows how DeePa iteratively eliminates nodes and edges for an
108
+
109
+ Inception-v3 module. The full Inception-v3 computation graph has 120 nodes, which DeePa reduces to a 2-node graph.
110
+
111
+ DeePa iteratively uses node and edge eliminations to simplify a computation graph until neither elimination can be applied. DeePa then enumerates all global configurations for the final graph and chooses the one that minimizes the Cost function in Equation 1.
112
+
113
+ After deciding the configuration for each node in the final graph, DeePa then decides the configuration for the eliminated nodes by undoing the node and edge eliminations in reverse order. When undoing a node elimination for node $w$ , DeePa selects the configuration that minimizes Equation 2 for node $w$ . After undoing all eliminations, DeePa has a configuration for every node in the original graph. In Appendix A.1, we prove that our algorithm finds an optimal global configuration. In our experiments, DeePa finds an optimal configuration for parallelizing the largest CNN we have worked with, Inception-v3, on 16 GPUs in about $1 0 0 \mathrm { m s }$ .
114
+
115
+ # 5 IMPLEMENTATION
116
+
117
+ We found that it is non-trivial to parallelize the training of CNNs in the height, width, and channel dimensions in existing frameworks (e.g., TensorFlow, PyTorch, and Caffe2), and none provides an interface for controlling per-operation parallelism. We implemented DeePa in Legion (Bauer et al., 2012), a high-performance parallel runtime for distributed heterogeneous architectures, and use cuDNN (Chetlur et al., 2014) and cuBLAS (cub, 2016) as the underlying libraries for processing neural network operations. The following Legion features significantly simplify our implementation for DeePa. First, Legion supports high-dimensional partitioning that allows us to parallelize any operation in any combination of the dimensions. Second, Legion allows DeePa to control parallelism at the granularity of each operation. Third, Legion allows fine-grain control over the placement of data in memory. Fourth, Legion’s asynchronous tasking model makes it easy to exploit task as well as image parallelism. We also include two critical optimizations that help achieve good performance.
118
+
119
+ Overlapping computation with data transfers. DeePa manages the gradients of each operation separately and transfers an operation’s gradients as long as its back propagation is completed. We have found that this can effectively hide the data transfer overhead for gradient synchronization. As a result, the synchronous training performance matches asynchronous training in DeePa, which allows users to use synchronous training with its better algorithmic efficiency.
120
+
121
+ Distributing parameter servers. Existing frameworks use parameter servers to store and update variables for a CNN model. Parameter servers are located in CPU memory in TensorFlow and PyTorch. Because DeePa manages the parameters for each operation separately, DeePa can opportunistically distribute the parameter server onto the GPU memories whenever possible. This eliminates data transfers for operations whose gradients and parameter server are located on the same GPU and transforms all GPU to CPU copies into faster GPU to GPU copies.
122
+
123
+ # 6 RELATED WORK
124
+
125
+ To the best of our knowledge, DeePa is the first deep learning framework that controls and optimizes the parallelism of neural networks in all dimensions at the granularity of each operation.
126
+
127
+ Existing frameworks such as TensorFlow (Abadi et al., 2016), Caffe2 (Caf, 2016), and PyTorch (Pyt, 2017) use image parallelism to distribute the training of CNNs and only explore parallelism in the image dimension. The standard image parallelism configuration keeps a replica of the entire network on each worker, which results in large data transfers for synchronizing the gradients in each step.
128
+
129
+ Mirhoseini et al. (2017) uses model parallelism that assigns each operation to a dedicated processor for training Inception-v3. It uses a reinforcement learning algorithm to optimize the placement of each operation on a GPU device. The learned device placement on 4 GPUs achieves $19 \%$ speedup compared to single GPU performance. However, parallelism in each operation is not explored.
130
+
131
+ Krizhevsky (2014) introduces “one weird trick” (OWT) that combines image parallelism with model parallelism to accelerate the distributed training of AlexNet, which efficiently reduces the data transfer cost compared to the standard image parallelism configuration. In Section 7.1.2, we show that
132
+
133
+ DeePa further reduces the overall data transfers for AlexNet by $3 \times$ and the per-step training time by $2 . 3 \times$ compared to OWT.
134
+
135
+ Goyal et al. (2017) empirically shows no loss of accuracy for training ResNet-50 on the ImageNet dataset with a large minibatch size of 8192 images3. It uses the standard image parallelism configuration to distribute the training onto 256 GPUs and includes a number of optimizations for reducing communication overhead. As communication is a bottleneck in distributed deep learning, we believe our techniques for reducing data transfers can substantially benefit training on large numbers of GPUs.
136
+
137
+ # 7 EVALUATION
138
+
139
+ ![](images/6a8603f4feaccae978b2b90aca2c6b48a954047e9d30946644ba57eefa039cca.jpg)
140
+ Figure 7: Training throughput (images/second) for AlexNet, VGG-16, and Inception-v3 on 16 GPUs. The purple and green bar shows the DeePa performance by restricting DeePa to use image and OWT parallelism, respectively.
141
+
142
+ ![](images/88771cf8f78487d7c8ae7da1c16f6db428cc51628e774ad66dc7dd7ecc60e9da.jpg)
143
+ Figure 8: Total amount of data transferred in each step for training AlexNet, VGG-16, and Inception-v3 on 16 GPUs with a minibatch size of 512.
144
+
145
+ We use AlexNet (Krizhevsky, 2014), VGG-16 (Simonyan & Zisserman, 2014), and Inceptionv3 (Szegedy et al., 2016) as benchmark CNNs and use the ImageNet dataset (Russakovsky et al., 2015) as the input. For each CNN, we compare the performance of DeePa against TensorFlow, PyTorch, and OWT. We implement OWT in DeePa by restricting all convolutional and pooling layers to use image parallelism and all fully-connected layers to use model parallelism.
146
+
147
+ # 7.1 CASE STUDY ON A 16-GPU MACHINE
148
+
149
+ We conduct a detailed case study for training the three CNNs on a 16-GPU machine, with two Intel 10-core E5-2680 Xeon processors, 256 GB main memory, and 16 NVIDIA Tesla K80 GPUs4. We use all 16 GPUs for training each CNN model with a minibatch size of 512 images. As a result, each GPU processes a batch of 32 images in the image parallelism configuration. DeePa uses the search algorithm in Section 4 to find the optimal parallelism configurations, which requires 0.7, 1.1, and 4.8 seconds for AlexNet, VGG-16, and Inception-v3, respectively.
150
+
151
+ Figure 7 shows the synchronous training throughput for a minibatch size of 512 images on 16 GPUs. When DeePa uses image parallelism for all operations, DeePa achieves competitive performance compared to the best of TensorFlow and PyTorch. The OWT approach that uses model parallelism for fully-connected layers speeds up the training throughput by $1 . 4 \times , 1 . 2 \times$ , and $1 . 0 7 \times$ compared to image parallelism using DeePa. The best configurations found by DeePa achieve $6 . 5 \times$ , $1 . 9 \times$ , and $1 . 5 \times$ speedup compared to TensorFlow and PyTorch.
152
+
153
+ Three main optimizations in DeePa achieve most of the performance benefit over the other frameworks. First, DeePa significantly reduces data transfers in each step, as shown in Figure 8. Compared to image parallelism, the OWT approach reduces data transfers by $1 . 0 5 { - } 8 . 4 \times$ . However, the best configuration used by DeePa further reduces data transfers by $1 . 2 \mathrm { - } 2 . 7 \mathrm { \times }$ compared to OWT. Second, the optimization for overlapping computation with data transfers (described in Section 5) effectively hides data transfer latency and achieves better GPU utilization. The grey bars in Figure 7 illustrate DeePa’s performance when the overlap optimization is disabled, which shows that overlapping computation with data transfers can improve the training throughput by $10 \% { - } 3 0 \%$ . Third, DeePa also improves performance by exploring parallelism in the height and width dimensions (see Section 7.1.3).
154
+
155
+ Table 2: The cost for different configurations for the first fully-connected of AlexNet.
156
+
157
+ <table><tr><td>Configuration</td><td>#GPU Workers</td><td>Transfer Cost</td><td>Compute Cost</td><td>Update Cost</td><td>Total Cost</td><td>Parallelism Configurations</td></tr><tr><td>{n=16,c=1}</td><td>16</td><td>0</td><td>+1.28</td><td>+1075</td><td>= 1076</td><td>ImageParallelism</td></tr><tr><td>{n=1,c=16}</td><td>16</td><td>134.4</td><td>+1.28</td><td>+0</td><td>= 135.7</td><td>OWT</td></tr><tr><td>{n=1,c=4}</td><td>4</td><td>33.6</td><td>+5.1</td><td>+0</td><td>=38.7</td><td></td></tr><tr><td>{n=1,c=2}</td><td>2</td><td>16.8</td><td>+10.2</td><td>+0</td><td>= 27.0</td><td>DeePa</td></tr><tr><td>{n=1,c=1}</td><td>1</td><td>8.4</td><td>+20.4</td><td>+0</td><td>=28.8</td><td></td></tr></table>
158
+
159
+ # 7.1.1 THE BEST CONFIGURATIONS
160
+
161
+ We describe the best configurations discovered for AlexNet, VGG-16, and Inception-v3 in Sections 7.1.2 to 7.1.4. The best configurations have several similarities.
162
+
163
+ First, for the beginning layers with large height/width dimensions and small channel dimensions, DeePa uses image parallelism on all available GPUs, since the data transfers for synchronizing gradients are much smaller than the data transfers for moving tensors between operations.
164
+
165
+ Second, deeper layers in CNNs tend to have smaller height/width dimensions and larger channel dimensions. As a result, the cost for moving tensors between different operations decreases, while the cost for synchronizing gradients increases. DeePa adaptively reduces the number of GPU workers for these layers to reduce the expensive data transfers for synchronizing gradients at the cost of introducing cheaper data transfers for moving tensors.
166
+
167
+ Third, DeePa uses model parallelism on a small number of GPU workers for fully-connected layers, because synchronizing gradients and moving tensors are both much more expensive than the compute time for fully-connected layers. DeePa reduces the data transfers for synchronizing gradients and moving tensors at the cost of using fewer GPUs.
168
+
169
+ # 7.1.2 ALEXNET
170
+
171
+ ![](images/1fdc606e91795c844913b613431e568e584b2d6b849313aba4b291b077c06bbb.jpg)
172
+ Figure 9: The global configuration for parallelizing AlexNet on 16 GPU workers.
173
+
174
+ Figure 9 shows the global configuration for AlexNet on 16 GPU workers. Note that DeePa selects the parallelism configuration that optimizes the performance for each layer. Table 2 lists the cost for different configurations of the first fully-connected layer. The standard image parallelism configuration eliminates the cost for transferring the input tensors but introduces additional data transfers for synchronizing gradients. The OWT approach completely eliminates gradient synchronization at the cost of replicating the input tensors on every GPU worker. The configuration chosen by DeePa only uses 2 GPU workers for training the first fully-connected layer, which prolongs the compute time but significantly reduces the cost for both transferring input tensors and synchronizing gradients. As a result, DeePa reduces the total cost by $5 \times$ compared to other approaches.
175
+
176
+ DeePa uses image parallelism for all convolutional and pooling layers, because the additional data transfer cost introduced by transforming configurations outweighs any performance benefits.
177
+
178
+ # 7.1.3 VGG-16
179
+
180
+ ![](images/95df748900bc84eba803cc88fd5a97ef3361566c57dcdd7501747e30ff8bc4d5.jpg)
181
+ Figure 10: The global configuration for parallelizing VGG-16 on 16 GPU workers.
182
+
183
+ Table 3: The cost for different configurations for the last three convolutional layers of VGG-16.
184
+
185
+ <table><tr><td>Configuration</td><td># GPU Workers</td><td>Transfer Cost</td><td>Compute Cost</td><td>Update Cost</td><td>Total Cost</td><td>Parallelism Configurations</td></tr><tr><td>{n=16,c=1,h=1,w=1}</td><td>16</td><td>0</td><td>+15.9</td><td>+134.4</td><td>=150.3</td><td>ImageParallelism&amp;OWT</td></tr><tr><td>{n=8,c=1,h=1,w=1}</td><td>8</td><td>39.2</td><td>+31.8</td><td>+67.2</td><td>=138.2</td><td></td></tr><tr><td>{n=4,c=1,h=1,w=1}</td><td>4</td><td>39.2</td><td>+63.7</td><td>+33.6</td><td>=136.5</td><td></td></tr><tr><td>n=1,c=1,h=2,w=2}</td><td>4</td><td>39.2</td><td>+54.7</td><td>+33.6</td><td>= 127.5</td><td>DeePa</td></tr><tr><td>{n=2,c=1,h=1,w=1}</td><td>2</td><td>39.2</td><td>+127.4</td><td>+16.8</td><td>= 183.4</td><td></td></tr></table>
186
+
187
+ DeePa uses similar configurations for parallelizing the fully-connected layers in VGG-16 (Figure 10). In addition, DeePa also uses a different configuration to cooperatively accelerate the last three convolutional layers (the yellow node in Figure 10). Table 3 lists the cost for different parallelism configurations for the last three convolutional layers. The configuration with optimal total cost uses only four GPU workers for the last three convolutional layers to reduce data transfers for synchronizing gradients. DeePa also exploits parallelism in the height and width dimensions to further reduce the compute time.
188
+
189
+ # 7.1.4 INCEPTION-V3
190
+
191
+ ![](images/24622793c7d9a18be1849cfbf2f27bf3f3b7217458333dcd812989ffb48a683f.jpg)
192
+ Figure 11: The global configuration for parallelizing Inception-v3 on 16 GPU workers. Each module is shown as a single node for simplicity.
193
+
194
+ ![](images/a90e2a59301a873254383b009ff421c72d65c2019d8ddc83463f23f0cfa9dbb8.jpg)
195
+ Figure 12: The configurations for parallelizing the InceptionE1 module.
196
+
197
+ The Inception-v3 model has multiple Inception modules (Szegedy et al., 2016). Each module has several branches of convolutional and pooling layers, which are then concatenated as the output tensor of the module. Figure 11 shows the global configuration for Inception-v3. DeePa uses different configurations to parallelize different branches for the InceptionE1 module, as shown in Figure 12. We found that this configuration reduces data transfers by $30 \%$ in InceptionE1 and InceptionE2 and reduces overall data transfers by $20 \%$ .
198
+
199
+ # 7.2 MINIBATCH SIZE
200
+
201
+ The minibatch size plays an important rule on the performance of CNNs. Figure 13 compares DeePa, PyTorch, and TensorFlow with different minibatch sizes. All three networks were trained on 16 Tesla K80 GPUs on a single node, as described in Section 7.1. We were not able to train VGG-16 and Inception-v3 with a minibatch size of 2048 images, because the required metadata size exceeds the aggregate memory capacity of the 16 GPUs.
202
+
203
+ Figure 13 shows that, DeePa achieves constant speedups compared to PyTorch and TensorFlow for various minibatch sizes. In particular, DeePa achieves $4 . 6 { - } 6 . 5 \times$ , $1 . 6 \mathrm { - } 1 . 9 \times$ , and $1 . 2 \mathrm { - } 1 . 5 \times$ speedup for AlexNet, VGG-16, and Inception-v3, respectively.
204
+
205
+ # 7.3 MULTI-NODE RESULTS
206
+
207
+ We evaluate the scalability of different frameworks by comparing their training throughput with different number of GPUs and compute nodes. The experiments were performed on a GPU cluster with 4 nodes, each of which is equipped with two Intel 10-core E5-2600 Xeon processors, 256G main memory, and four NVIDIA Tesla P100 GPUs. GPUs on the same node are connected by NVLink, and nodes are connected over 100Gb/s EDR Infiniband.
208
+
209
+ ![](images/93d7458c30e952d22471ba797bc25194e958c53604a5bbb842f5261434b76644.jpg)
210
+ Figure 13: Performance comparisons among DeePa, PyTorch, and TensorFlow with different minibatch sizes.
211
+
212
+ ![](images/bb0caedab1734e4586484851a263b00c77853d7a82ca74ef5d38bc970f581d94.jpg)
213
+ Figure 14: Performance results for DeePa, PyTorch, and TensorFlow on up to 4 nodes. We perform weak-scaling, where each GPU worker processes a batch of 32 images in every iteration. We use all 4 GPUs on each node in the last two subfigures.
214
+
215
+ Figure 14 shows the performance comparison among DeePa, PyTorch, and TensorFlow for weakscaling. DeePa achieves competitive performance compared to PyTorch and TensorFlow for training on a single GPU, in which all three frameworks place all operations on a single GPU. For training on 4 GPUs on a single node, DeePa achieves $3 . 1 \times$ , $1 . 6 \times$ , and $1 . 3 \times$ speedup for AlexNet, VGG-16, and Inception-v3, respectively. DeePa achieves even better performance speedups for trainings on multiple nodes, where the data transfer time becomes a larger component of the per-iteration training time. For training on 4 nodes, DeePa achieves $8 . 1 \times$ , $3 . 2 \times$ , and $1 . 8 \times$ speedup for AlexNet, VGG-16, and Inception-v3, respectively.
216
+
217
+ # 8 CONCLUSION
218
+
219
+ We have presented DeePa, a deep learning framework that explores parallelism in all parallelizable dimensions to accelerate the training of CNNs. DeePa optimizes the parallelism configuration chosen at the granularity of individual layers. DeePa achieves up to $6 . 5 \times$ for training CNNs and reduces overall data transfers by up to $2 3 \times$ compared to state-of-the-art deep learning frameworks.
220
+
221
+ # REFERENCES
222
+
223
+ A New Lightweight, Modular, and Scalable Deep Learning Framework. https://caffe2.ai, 2016.
224
+
225
+ Dense Linear Algebra on GPUs. https://developer.nvidia.com/cublas, 2016.
226
+
227
+ Tensors and Dynamic neural networks in Python with strong GPU acceleration. https:// pytorch.org, 2017.
228
+
229
+ Mart´ın Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, et al. Tensorflow: A system for largescale machine learning. In OSDI, volume 16, pp. 265–283, 2016.
230
+
231
+ Michael Bauer, Sean Treichler, Elliott Slaughter, and Alex Aiken. Legion: Expressing locality and independence with logical regions. In Proceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis, 2012.
232
+
233
+ Sharan Chetlur, Cliff Woolley, Philippe Vandermersch, Jonathan Cohen, John Tran, Bryan Catanzaro, and Evan Shelhamer. cudnn: Efficient primitives for deep learning. CoRR, abs/1410.0759, 2014. URL http://arxiv.org/abs/1410.0759.
234
+
235
+ Priya Goyal, Piotr Dollar, Ross B. Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, ´ Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch SGD: training imagenet in 1 hour. CoRR, abs/1706.02677, 2017. URL http://arxiv.org/abs/1706. 02677.
236
+
237
+ Alex Krizhevsky. One weird trick for parallelizing convolutional neural networks. CoRR, abs/1404.5997, 2014. URL http://arxiv.org/abs/1404.5997.
238
+
239
+ Azalia Mirhoseini, Hieu Pham, Quoc V Le, Benoit Steiner, Rasmus Larsen, Yuefeng Zhou, Naveen Kumar, Mohammad Norouzi, Samy Bengio, and Jeff Dean. Device placement optimization with reinforcement learning. CoRR, abs/1706.04972, 2017. URL http://arxiv.org/abs/ 1706.04972.
240
+
241
+ Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 2015.
242
+
243
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. URL http://arxiv.org/abs/1409.1556.
244
+
245
+ Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott E. Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. CoRR, abs/1409.4842, 2014. URL http://arxiv.org/abs/1409.4842.
246
+
247
+ Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2016.
248
+
249
+ Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In European conference on computer vision, 2014.
250
+
251
+ # A APPENDIX
252
+
253
+ # A.1 NODE AND EDGE ELIMINATION
254
+
255
+ We prove the correctness of the node and edge eliminations in Section 4. In particular, we prove that after applying node and edge eliminations, the modified graph has the same optimal configuration as the original graph.
256
+
257
+ # A.1.1 NODE ELIMINATION
258
+
259
+ For a given computation graph $G = ( V , E )$ , applying a node elimination on $w$ requires $w$ having a single in-edge $\boldsymbol { e } _ { 1 } = ( u , w )$ and a single out-edge $e _ { 2 } = ( w , v )$ . The node elimination results in a modified graph $G ^ { \prime } = ( V ^ { \prime } , E ^ { \prime } )$ , where $V ^ { \prime } = V - \{ w \}$ , $E ^ { \prime } = E - e _ { 1 } - e _ { 2 } + e ^ { \prime }$ , and $\boldsymbol { e } ^ { \prime } = \left( \boldsymbol { u } , \boldsymbol { v } \right)$ .
260
+
261
+ Theorem 1. Consider graphs $( V , E )$ and the result of a single node elimination $( V ^ { \prime } , E ^ { \prime } )$ . Then an optimal configuration of $V , E )$ ) is also an optimal configuration of $( V ^ { \prime } , E ^ { \prime } )$ , and an optimal configuration of $( V ^ { \prime } , E ^ { \prime } )$ is extensible to a an optimal configuration of $( V , E )$ .
262
+
263
+ Proof. The Cost function is defined in Equation 1. Let $g$ be any configuration. We first compute the difference between $C o s t ( g , ( V , E ) )$ and $C o s t ( g , ( V ^ { \prime } , E ^ { \prime } ) )$ .
264
+
265
+ $$
266
+ \begin{array} { l } { { \displaystyle C o s t ( g , ( V , E ) ) - C o s t ( g , ( V ^ { \prime } , E ^ { \prime } ) ) } } \\ { { \displaystyle = \sum _ { v \in V } \{ v . c o m p u t e ( g ( v ) ) + v . u p d a t e ( g ( v ) ) \} + \sum _ { e = ( u , v ) \in E } e . x f e r ( g ( u ) , g ( v ) ) } } \\ { { \displaystyle ~ - \sum _ { v \in V ^ { \prime } } \{ v . c o m p u t e ( g ( v ) ) + v . u p d a t e ( g ( v ) ) \} + \sum _ { e = ( u , v ) \in E ^ { \prime } } e . x f e r ( g ( u ) , g ( v ) ) } } \\ { { \displaystyle = w . c o m p u t e ( g ( w ) ) + w . u p d a t e ( g ( w ) ) } } \\ { { \displaystyle ~ + e . \cdot x f e r ( g ( u ) , g ( w ) ) + e . \cdot x f e r ( g ( w ) , g ( v ) ) - e ^ { \prime } . x f e r ( g ( u ) , g ( v ) ) } } \end{array}
267
+ $$
268
+
269
+ Now assume $g$ is an optimal configuration for $( V , E )$ . Then we have
270
+
271
+ $$
272
+ \begin{array} { r l } & { \quad w . c o m p u t e ( g ( w ) ) + w . u p d a t e ( g ( w ) ) + e _ { 1 } . x f e r ( g ( u ) , g ( w ) ) + e _ { 2 } . x f e r ( g ( w ) , g ( v ) ) } \\ & { = \underset { c _ { w } } { \operatorname* { m i n } } \{ w . c o m p u t e ( c _ { w } ) + w . u p d a t e ( c _ { w } ) + e _ { 1 } . x f e r ( g ( u ) , c _ { w } ) + e _ { 2 } . x f e r ( c _ { w } , g ( v ) ) \} } \end{array}
273
+ $$
274
+
275
+ Therefore, $g$ is an optimal configuration of $( V ^ { \prime } , E ^ { \prime } )$ . For the other direction, note that if $g$ is an optimal configuration of $( V ^ { \prime } , E ^ { \prime } )$ , then it can be extended to an optimal configuration of $( V , E )$ by adding the node $w$ with the same minimal assignment. □
276
+
277
+ # A.1.2 EDGE ELIMINATION
278
+
279
+ For a computation graph $G ( V , E )$ , applying an edge elimination on $\boldsymbol { e } _ { 1 } = ( u , v )$ and $\boldsymbol { e } _ { 2 } = ( u , v )$ results in a modified graph $G ^ { \prime } = ( V , E ^ { \prime } )$ , where $E ^ { \prime } = E - e _ { 1 } - e _ { 2 } + e ^ { \prime }$ and $\boldsymbol { e } ^ { \prime } = \left( \boldsymbol { u } , \boldsymbol { v } \right)$ . We prove that $C o s t ( g , ( V , E ) ) = C o s t ( g , ( V , E ^ { \prime } ) )$ for any global configuration $g$ of $( V , E )$ .
280
+
281
+ Theorem 2. For any global configuration $g$ of graph $\begin{array} { r c l } { G } & { = } & { ( V , E ) } \end{array}$ , $C o s t ( g , ( V , E ) ) \quad = \quad$ $C o s t ( g , ( V , E ^ { \prime } ) )$ , where $( V , E ^ { \prime } )$ is the modified graph of $( V , E )$ after an edge elimination.
282
+
283
+ Proof. We compute the difference between $C o s t ( g , ( V , E ) )$ and $C o s t ( g , ( V , E ^ { \prime } ) )$ .
284
+
285
+ $$
286
+ \begin{array} { r l } & { \quad C o s t ( g , ( V , E ) ) - C o s t ( g , ( V , E ^ { \prime } ) ) } \\ & { = e _ { 1 } . x f e r ( g ( u ) , g ( v ) ) - e _ { 2 } . x f e r ( g ( u ) , g ( v ) ) + e ^ { \prime } . x f e r ( g ( u ) , g ( v ) ) } \\ & { = 0 } \end{array}
287
+ $$
288
+
289
+ The last equation uses Equation 3.
290
+
291
+ # A.2 RELATED WORK ON OVERLAPPING COMMUNICATION WITH DATA TRANSFER
292
+
293
+ The overlap optimization in Section 5 is motivated by Goyal et al. (2017), which performs gradient aggregation in parallel with back propagation to scale synchronous training to large number of GPUs. We extend their design and implementation by also enabling the optimization for asynchronous training in DeePa.
294
+
295
+ # A.3 PROFILING RESULTS
296
+
297
+ We show profiling results for visualizing the performance bottlenecks in different parallelism approaches. The experiment was performed on a single node with four Tesla P100 GPUs (as described in Section 7.3). We enable overlapping computation with data transfers (described in Section 5) in this experiment.
298
+
299
+ Figure 15 shows the profiling results for training VGG-16 on 4 GPUs with different parallelism configurations. Note that DeePa with image parallelism achieves $10 \%$ higher training throughput compared to PyTorch and TensorFlow, as shown in Figure 14. Figure 15a shows that all GPUs are highly utilized during forward and backward passes, as indicated by the tight packing of tasks in the timeline. However, the image parallelism approach requires moving 4GB of metadata in every iteration, which cannot be fully overlapped with back propagation, therefore the image parallelism approach has a performance gap between iterations (shown as the white space on the GPU timelines).
300
+
301
+ ![](images/dfe354450aec70902555e21661a7d63eaf3b55d3bdfe2b63f4ce187cb4786c07.jpg)
302
+ Figure 15: Timelines for training VGG-16 with a minibatch size of 128 images on 4 GPUs. The first horizontal line in each figure shows the overall GPU utilization at different timesteps, and each of the following lines shows the run times for individual operations on each GPU.
303
+
304
+ Figure 15b shows the profiling of the optimal parallelism configuration chosen by DeePa, which uses image parallelism on 4 GPUs for all convolutional layers and pooling layers and uses model parallelism on 2 GPUs for the fully connected layers. Therefore, the training with the optimal configuration includes data transfers for each fully connected layers, which adds small performance gaps at the end of the forward pass and the beginning of the backward pass (shown as the small white space on the GPU timelines). However, the optimal configuration reduces the per-iteration data transfers from 4GB to 490MB, which effectively hides data transfer overhead and achieves better GPU utilization. As a result, the optimal configuration reduces the per-iteration training time from 0.34 seconds to 0.24 seconds.
305
+
306
+ # A.4 IMANGENET-22K
307
+
308
+ We compare the performance of DeePa, PyTorch, and TensorFlow on the ImageNet-22K dataset (Russakovsky et al., 2015) that contains 21,841 different categories (the ImageNet dataset used in Section 7 contains 1,000 catagories). The last fully-connected layer in AlexNet, VGG-16, and Inception-v3 originally have 1,000 neurons followed by a 1,000-way softmax layer. To train the three networks on the ImageNet-22K dataset, we change the last fully-connected layer to have 21,841 neurons and use a 21,841-way softmax layer at the end. The modified networks were trained on 16 Tesla K80 GPUs on a single node with a minibatch size of 512 images.
309
+
310
+ Figure 16 compares the training throughput and per-iteration data transfers among DeePa, PyTorch, and TensorFlow on the ImageNet and ImageNet-22K datasets. Figure 16a shows that, on the ImageNet-22K dataset, the training throughput of PyTorch and TensorFlow is reduced by $20 \%$ - $45 \%$ , while DeePa’s throughput falls off by $3 \%$ , compared to training on the original ImageNet dataset. Figure 16b compares the per-iteration data transfers between image parallelism and the global configurations used by DeePa. Using image parallelism increases the data transfers in each iteration by 5-10GB, while DeePa only increases the per-iteration data transfers by 40MB. As a result, for training on the ImageNet-22K dataset, DeePa reduces the per-iteration data transfers by $3 . 7 – 4 4 . 5 \times$ compared to image parallelism.
311
+
312
+ ![](images/77258f4c33113381b171df167a6b62265e6737ee838ead9a1aa8de95aa53aa34.jpg)
313
+ Figure 16: Performance comparisons among DeePa, PyTorch, and TensorFlow on the ImageNet-22k dataset.
parse/train/SJCPLLpaW/SJCPLLpaW_content_list.json ADDED
@@ -0,0 +1,1684 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "EXPLORING THE HIDDEN DIMENSION IN ACCELERATING CONVOLUTIONAL NEURAL NETWORKS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 820,
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": "DeePa is a deep learning framework that explores parallelism in all parallelizable dimensions to accelerate the training process of convolutional neural networks. DeePa optimizes parallelism at the granularity of each individual layer in the network. We present an elimination-based algorithm that finds an optimal parallelism configuration for every layer. Our evaluation shows that DeePa achieves up to $6 . 5 \\times$ speedup compared to state-of-the-art deep learning frameworks and reduces data transfers by up to $2 3 \\times$ . ",
40
+ "bbox": [
41
+ 232,
42
+ 267,
43
+ 764,
44
+ 364
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 391,
55
+ 336,
56
+ 406
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Training convolutional neural networks (CNNs) is increasingly compute-intensive and timeconsuming. It takes days or even weeks to train deep CNNs from scratch (Szegedy et al., 2014; Zeiler & Fergus, 2014; Simonyan & Zisserman, 2014; Szegedy et al., 2016). Existing deep learning frameworks such as TensorFlow, PyTorch, and Caffe2 parallelize the training process onto multiple processors (usually GPUs) using image parallelism1 dividing the entire image dataset into batches with the same number of images and assigning each batch to a dedicated processor. ",
63
+ "bbox": [
64
+ 174,
65
+ 422,
66
+ 823,
67
+ 506
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "The standard parallelization of CNN training only exploits image parallelism. However, other dimensions can also parallelize the training process. For example, in CNNs for 2D images, data is commonly organized as 4-dimensional tensors (i.e., image, height, width, channel). The image dimension includes an index for each image in the input dataset. The height and width dimensions specify a position in an image. For a particular position, the channel dimension2 indexes different neurons for that position. Exploring these other parallelizable dimensions can potentially reduce the compute time and data transfer cost when training CNNs (see Section 2). Moreover, different layers in a CNN may prefer different parallelism configurations for achieving optimal performance. ",
74
+ "bbox": [
75
+ 174,
76
+ 513,
77
+ 825,
78
+ 625
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "We propose DeePa, a deep learning framework that explores parallelism in all parallelizable dimensions to accelerate the training of CNNs. To the best of our knowledge, DeePa is the first system that models and exploits the parallelism of neural networks at the granularity of each individual layer. To generate a parallelism configuration for each layer, DeePa uses an elimination-based algorithm that automatically finds the configuration with the best estimated performance. ",
85
+ "bbox": [
86
+ 176,
87
+ 632,
88
+ 823,
89
+ 702
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "The main contributions of this paper are: ",
96
+ "bbox": [
97
+ 176,
98
+ 708,
99
+ 441,
100
+ 723
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "• We present DeePa, a deep learning framework that explores parallelism in all parallelizable dimensions to accelerate the training of CNNs. \n• The parallelization strategy is selected at the granularity of each individual layer. \n• We present an elimination-based algorithm for finding the parallelism configuration with optimal estimated performance for each layer. \n• Our evaluation shows that, compared to state-of-the-art deep learning frameworks (e.g., TensorFlow and PyTorch), DeePa achieves $6 . 5 \\times$ , $1 . 9 \\times$ , and $1 . 5 \\times$ speedup for AlexNet, ",
107
+ "bbox": [
108
+ 215,
109
+ 734,
110
+ 825,
111
+ 848
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "table",
117
+ "img_path": "images/88e879f366f247facb2b422db75f569491000c1d650872608042d54d61544ea8.jpg",
118
+ "table_caption": [
119
+ "Table 1: Detailed information for the example convolutional layers used in Figure 1 and 2. "
120
+ ],
121
+ "table_footnote": [],
122
+ "table_body": "<table><tr><td>Name</td><td>Input Channels</td><td>Output Channels</td><td>Height</td><td>Width</td><td>Kernel</td><td>Stride</td><td>Description</td></tr><tr><td>C1</td><td>128</td><td>128</td><td>112</td><td>112</td><td>3x3</td><td>1x1</td><td>Conv4 in VGG-16</td></tr><tr><td>C2</td><td>512</td><td>512</td><td>28</td><td>28</td><td>3x3</td><td>1x1</td><td>Conv8,Conv9,and Conv10 in VGG-16</td></tr><tr><td>C3</td><td>192</td><td>64</td><td>35</td><td>35</td><td>1x1</td><td>1x1</td><td>Conv1x1 in an Inception-v3 module</td></tr><tr><td>C4</td><td>48</td><td>64</td><td>35</td><td>35</td><td>5x5</td><td>1x1</td><td>Conv5x5 in an Inception-v3 module</td></tr><tr><td>C5</td><td>64</td><td>192</td><td>27</td><td>27</td><td>5x5</td><td>1x1</td><td>Conv2 in AlexNet</td></tr><tr><td>C6</td><td>256</td><td>256</td><td>13</td><td>13</td><td>3x3</td><td>1x1</td><td>Conv5 in AlexNet</td></tr><tr><td>C7</td><td>32</td><td>64</td><td>147</td><td>147</td><td>3x3</td><td>1x1</td><td>Conv3 in Inception-v3</td></tr><tr><td>C8</td><td>448</td><td>384</td><td>8</td><td>8</td><td>3x3</td><td>1x1</td><td>Conv3x3 in an Inception-v3 module</td></tr></table>",
123
+ "bbox": [
124
+ 178,
125
+ 109,
126
+ 820,
127
+ 228
128
+ ],
129
+ "page_idx": 1
130
+ },
131
+ {
132
+ "type": "text",
133
+ "text": "VGG-16, and Inception-v3, respectively. The performance improvement comes from reducing overall data transfers, automatically overlapping computation with data movement, and accelerating computation throughput. ",
134
+ "bbox": [
135
+ 230,
136
+ 244,
137
+ 823,
138
+ 286
139
+ ],
140
+ "page_idx": 1
141
+ },
142
+ {
143
+ "type": "text",
144
+ "text": "2 MOTIVATION ",
145
+ "text_level": 1,
146
+ "bbox": [
147
+ 176,
148
+ 306,
149
+ 313,
150
+ 323
151
+ ],
152
+ "page_idx": 1
153
+ },
154
+ {
155
+ "type": "text",
156
+ "text": "This work is motivated by the following observations. ",
157
+ "bbox": [
158
+ 176,
159
+ 338,
160
+ 527,
161
+ 353
162
+ ],
163
+ "page_idx": 1
164
+ },
165
+ {
166
+ "type": "text",
167
+ "text": "2.1 ACCELERATING COMPUTATION THROUGHPUT",
168
+ "text_level": 1,
169
+ "bbox": [
170
+ 174,
171
+ 371,
172
+ 534,
173
+ 385
174
+ ],
175
+ "page_idx": 1
176
+ },
177
+ {
178
+ "type": "image",
179
+ "img_path": "images/20ab3eaf0d3e2ade09d05eae1955907088f1ca0e086505fac32f7f4307ee3b86.jpg",
180
+ "image_caption": [
181
+ "Figure 1: Relative performance for training different convolutional layers. Computation throughput is calculated by dividing the batch size with computation time (both forward processing and back propagation) and is normalized by the worst case. "
182
+ ],
183
+ "image_footnote": [],
184
+ "bbox": [
185
+ 209,
186
+ 404,
187
+ 452,
188
+ 542
189
+ ],
190
+ "page_idx": 1
191
+ },
192
+ {
193
+ "type": "image",
194
+ "img_path": "images/d2511e9fd175b0a8fcefd5e352fb34b1abd24d077f8f81f5254a1be85aa5735c.jpg",
195
+ "image_caption": [
196
+ "Figure 2: Computation and data transfer time to process a batch of 512 images using image parallelism for the third layer, an intermediate layer, and the last layer of Inception-v3. "
197
+ ],
198
+ "image_footnote": [],
199
+ "bbox": [
200
+ 539,
201
+ 411,
202
+ 792,
203
+ 561
204
+ ],
205
+ "page_idx": 1
206
+ },
207
+ {
208
+ "type": "text",
209
+ "text": "Convolutional layers generally consume the bulk of the training time in CNNs, and parallelizing training in different data dimensions results in significantly different performance. Figure 1 shows the relative speed of training six different convolutional layers from AlexNet, VGG-16, and Inception-v3. The properties of the convolutional layers are shown in Table 1. For each convolutional layer, we tried parallelizing the computation in each individual parallelizable dimension as well as combinations of different parallelizable dimensions, and we report the performance of the standard parallelization over images along with the worst and best parallelization strategies we discovered. Figure 1 shows that different parallelism configurations result in very different performance, and image parallelism generally achieves suboptimal performance. Therefore, exploring parallelism in other dimensions can potentially accelerate the training of convolutional layers. ",
210
+ "bbox": [
211
+ 174,
212
+ 657,
213
+ 825,
214
+ 796
215
+ ],
216
+ "page_idx": 1
217
+ },
218
+ {
219
+ "type": "text",
220
+ "text": "2.2 REDUCING DATA TRANSFER COST ",
221
+ "text_level": 1,
222
+ "bbox": [
223
+ 176,
224
+ 814,
225
+ 447,
226
+ 828
227
+ ],
228
+ "page_idx": 1
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "Different parallelization strategies can also result in significantly different amounts of data movement. Figure 3 shows an example of parallelizing the first fully-connected layer of VGG-16 on two GPUs in different dimensions. In image parallelism (Figure 3a), each GPU processes a batch of images and computes the gradient for the entire fully-connected layer. This requires each GPU to synchronize the gradients for the entire fully-connected layer (shown as the shadow rectangles) after each step. An alternative approach (Figure 3b) parallelizes in the channel dimension by assigning a subset of the output channels to each GPU. As a result, different GPUs compute the gradients for disjoint subsets of the fully-connected layer, which eliminates transferring the fully-connected layer but introduces additional data transfers for input tensors (shown as the shadow rectangles). For this particular case, using parallelism in the channel dimension reduces data transfer costs by $1 2 \\times$ . ",
233
+ "bbox": [
234
+ 174,
235
+ 840,
236
+ 825,
237
+ 924
238
+ ],
239
+ "page_idx": 1
240
+ },
241
+ {
242
+ "type": "image",
243
+ "img_path": "images/087082065dd2852e1aabf15f08fb37a71a5eb1ca792911dba8159579f380fdec.jpg",
244
+ "image_caption": [
245
+ "(a) Parallelism in the image dimension. (b) Parallelism in the channel dimension. ",
246
+ "Figure 3: Different configurations for parallelizing the first fully-connected layer of VGG-16. Rectangles with solid lines indicate tensors managed by the local GPU, while rectangles with dot lines are tensors managed by a remote GPU. The shadow rectangles indicate data transfers for each step. "
247
+ ],
248
+ "image_footnote": [],
249
+ "bbox": [
250
+ 246,
251
+ 94,
252
+ 753,
253
+ 256
254
+ ],
255
+ "page_idx": 2
256
+ },
257
+ {
258
+ "type": "text",
259
+ "text": "",
260
+ "bbox": [
261
+ 174,
262
+ 338,
263
+ 825,
264
+ 395
265
+ ],
266
+ "page_idx": 2
267
+ },
268
+ {
269
+ "type": "text",
270
+ "text": "2.3 OPTIMIZING PER-LAYER PERFORMANCE ",
271
+ "text_level": 1,
272
+ "bbox": [
273
+ 178,
274
+ 414,
275
+ 493,
276
+ 428
277
+ ],
278
+ "page_idx": 2
279
+ },
280
+ {
281
+ "type": "text",
282
+ "text": "When processing a batch of images, increasing the number of workers does not always improve overall execution time, due to the data transfer overhead to synchronize gradients across different workers. Figure 2 shows the per-step training time for three different layers in Inception-v3 for a batch size of 512 images on up to 16 GPUs. The training time includes forward processing, backward propagation, and gradient aggregation. The figure shows that different layers in a neural network may prefer different hardware configurations, and there is no single configuration that is optimal for all layers. For example, the third layer performs best on 16 GPUs while the last layer performs best on 4 GPUs. Thus, a parallelism configuration includes both selecting the data dimensions to be parallelized and the number of parallel workers (or, equivalently, the number of subsets into which the data is partitioned). ",
283
+ "bbox": [
284
+ 173,
285
+ 439,
286
+ 825,
287
+ 579
288
+ ],
289
+ "page_idx": 2
290
+ },
291
+ {
292
+ "type": "text",
293
+ "text": "3 DEEPA ",
294
+ "text_level": 1,
295
+ "bbox": [
296
+ 174,
297
+ 599,
298
+ 264,
299
+ 616
300
+ ],
301
+ "page_idx": 2
302
+ },
303
+ {
304
+ "type": "image",
305
+ "img_path": "images/d0339f1478608f95400a49f9cc1d88ec5ec106b9fc53a5614d8c8e826fa5c6ad.jpg",
306
+ "image_caption": [
307
+ "Figure 4: Example configurations that parallelize an operation in a single dimension or combinations of multiple dimensions. The figure shows how each image is partitioned in different configurations. Each configuration needs a total of 4 workers. "
308
+ ],
309
+ "image_footnote": [],
310
+ "bbox": [
311
+ 179,
312
+ 631,
313
+ 815,
314
+ 765
315
+ ],
316
+ "page_idx": 2
317
+ },
318
+ {
319
+ "type": "text",
320
+ "text": "Similar to TensorFlow and PyTorch, DeePa uses computation graphs to describe dependencies between operations. In a computation graph $G = ( V , E )$ , each node $n \\in V$ is an operation (e.g., a convolution or matrix-multiply), and each directed edge $( u , v ) \\in E$ is a tensor that is an output of $u$ and an input of $v$ . ",
321
+ "bbox": [
322
+ 174,
323
+ 832,
324
+ 825,
325
+ 888
326
+ ],
327
+ "page_idx": 2
328
+ },
329
+ {
330
+ "type": "text",
331
+ "text": "One key difference between DeePa and TensorFlow or PyTorch is that each node in the DeePa computation graph also includes a configuration that describes how the corresponding operation is parallelized across different workers. For each parallelizable dimension (i.e., image, height, width, and channel), the configuration includes an integer that describes the degree of parallelism in that dimension. For a configuration, the product of the integers over all dimensions is the number of workers needed to process the operation in that configuration. Figure 4 demonstrates some example configurations that explore parallelism in a single dimension as well as combinations of different dimensions. DeePa assumes equal partitioning in each dimension. As a result, each worker receives the same size input, which provides well-balanced workload distribution in our experiments. ",
332
+ "bbox": [
333
+ 174,
334
+ 895,
335
+ 823,
336
+ 924
337
+ ],
338
+ "page_idx": 2
339
+ },
340
+ {
341
+ "type": "text",
342
+ "text": "",
343
+ "bbox": [
344
+ 174,
345
+ 103,
346
+ 825,
347
+ 202
348
+ ],
349
+ "page_idx": 3
350
+ },
351
+ {
352
+ "type": "text",
353
+ "text": "For each node in the computation graph, its configuration describes how the output tensor is divided onto multiple workers. Each worker computes a disjoint subset of the output tensor, and thus each worker can process the operation in parallel without data dependencies. Given a node’s configuration, DeePa calculates the input sets for each worker and automatically schedules proper data transfers between operations. ",
354
+ "bbox": [
355
+ 174,
356
+ 208,
357
+ 825,
358
+ 279
359
+ ],
360
+ "page_idx": 3
361
+ },
362
+ {
363
+ "type": "text",
364
+ "text": "DeePa also provides three additional functions: ",
365
+ "bbox": [
366
+ 174,
367
+ 285,
368
+ 483,
369
+ 299
370
+ ],
371
+ "page_idx": 3
372
+ },
373
+ {
374
+ "type": "text",
375
+ "text": "• For each node $v$ and configuration $c$ , v.compute $( c )$ estimates the time to process the corresponding operation under the parallelism configuration $c$ . This includes both the forward processing and back propagation time and is estimated by running the operation in that configuration multiple times on the device and measuring the average execution time. \n• For each edge $\\boldsymbol { e } ~ = ~ ( u , v )$ , $e . x f e r ( c _ { u } , c _ { v } )$ estimates the time to transfer the input tensor $e$ to each worker, using the size of the data to be moved and the known communication bandwidth. Note that $e . x f e r ( c _ { u } , c _ { v } )$ is zero if $u$ and $v$ have the same configuration (i.e., $c _ { u } = c _ { v } ,$ , in which case no data is transferred. As with compute(), we precompute the $x f e r ( )$ function for each edge in the graph by calculating the overall data transfer size for all possible source and destination configurations. \n• For each node $v$ and configuration $c$ , v.update $( c )$ estimates the time to update parameters for the corresponding operation. We use the data transfer time to approximate the update time, since the data transfer time is much longer than the compute time for updating parameters. Note that different configurations can have significantly different update time, as described in Section 2.2. ",
376
+ "bbox": [
377
+ 215,
378
+ 311,
379
+ 825,
380
+ 531
381
+ ],
382
+ "page_idx": 3
383
+ },
384
+ {
385
+ "type": "text",
386
+ "text": "A global configuration $g$ includes a parallelism configuration for each node in a computation graph: $g ( v )$ describes the parallelism configuration for node $v$ . Using the functions defined above, we can model the per-step execution time for a computation graph: ",
387
+ "bbox": [
388
+ 176,
389
+ 544,
390
+ 825,
391
+ 587
392
+ ],
393
+ "page_idx": 3
394
+ },
395
+ {
396
+ "type": "equation",
397
+ "img_path": "images/e722f2d81f67fef5e1ca9fa1e8bacc7477641004404efa4f3b656f71e7c6db6d.jpg",
398
+ "text": "$$\nC o s t ( g , ( V , E ) ) = \\sum _ { v \\in V } \\{ v . c o m p u t e ( g ( v ) ) + v . u p d a t e ( g ( v ) ) \\} + \\sum _ { e = ( u , v ) \\in E } e . x f e r ( g ( u ) , g ( v ) )\n$$",
399
+ "text_format": "latex",
400
+ "bbox": [
401
+ 186,
402
+ 611,
403
+ 790,
404
+ 647
405
+ ],
406
+ "page_idx": 3
407
+ },
408
+ {
409
+ "type": "text",
410
+ "text": "$C o s t ( g , ( V , E ) )$ estimates the per-step execution time if the computation graph $( V , E )$ is parallelized using global configuration $g$ . This execution time includes forwarding processing, backward propagation, and gradient aggregation. Equation 1 expresses the problem of finding the configuration for each individual node as a global optimization problem. ",
411
+ "bbox": [
412
+ 174,
413
+ 662,
414
+ 825,
415
+ 720
416
+ ],
417
+ "page_idx": 3
418
+ },
419
+ {
420
+ "type": "text",
421
+ "text": "4 FINDING OPTIMAL GLOBAL CONFIGURATIONS ",
422
+ "text_level": 1,
423
+ "bbox": [
424
+ 173,
425
+ 741,
426
+ 596,
427
+ 757
428
+ ],
429
+ "page_idx": 3
430
+ },
431
+ {
432
+ "type": "image",
433
+ "img_path": "images/c82e48e9ee621289587ff7e0281f5657624601010588e74df4e479f713a5683c.jpg",
434
+ "image_caption": [
435
+ "Figure 5: Performing a node/edge elimination on a computation graph. "
436
+ ],
437
+ "image_footnote": [],
438
+ "bbox": [
439
+ 356,
440
+ 768,
441
+ 635,
442
+ 898
443
+ ],
444
+ "page_idx": 3
445
+ },
446
+ {
447
+ "type": "text",
448
+ "text": "We now describe our algorithm for finding a global configuration that minimizes Equation 1. In DeePa, each node can select any of a fixed (but large) set of parallelism configurations. Therefore the number of potential global configurations is exponential in the number of nodes in a computation graph, which makes it impractical to enumerate all global configurations for deep CNNs such as VGG-16 and Inception-v3. ",
449
+ "bbox": [
450
+ 174,
451
+ 103,
452
+ 825,
453
+ 174
454
+ ],
455
+ "page_idx": 4
456
+ },
457
+ {
458
+ "type": "text",
459
+ "text": "However, the CNNs we have seen in practice exhibit strong locality: each node is only connected to a few nodes with similar depth in a computation graph. Based on this observation, we use the following two elimination strategies to iteratively simplify the computation graph while preserving the globally optimal configuration. ",
460
+ "bbox": [
461
+ 174,
462
+ 180,
463
+ 825,
464
+ 237
465
+ ],
466
+ "page_idx": 4
467
+ },
468
+ {
469
+ "type": "text",
470
+ "text": "Node elimination. For each node $w$ with a single in-edge $\\boldsymbol { e } _ { 1 } ~ = ~ ( u , w )$ and a single out-edge $e _ { 2 } = \\left( w , v \\right)$ , we remove node $w$ and the two edges $e _ { 1 }$ and $e _ { 2 }$ from the graph and insert a new edge $\\boldsymbol { e } ^ { \\prime } = \\left( \\boldsymbol { u } , \\boldsymbol { v } \\right)$ (shown in Figure 5a). The xfer() function for node $e ^ { \\prime }$ is ",
471
+ "bbox": [
472
+ 173,
473
+ 243,
474
+ 825,
475
+ 286
476
+ ],
477
+ "page_idx": 4
478
+ },
479
+ {
480
+ "type": "equation",
481
+ "img_path": "images/b60f2bf2162eda225f3744b2ff87ccfaa3907b497d2a9cb4d0269097e8a7f792.jpg",
482
+ "text": "$$\ne ^ { \\prime } . x f e r ( c _ { u } , c _ { v } ) = \\operatorname* { m i n } _ { c _ { w } } \\{ e _ { 1 } . x f e r ( c _ { u } , c _ { w } ) + w . c o m p u t e ( c _ { w } ) + w . u p d a t e ( c _ { w } ) + e _ { 2 } . x f e r ( c _ { w } , c _ { v } ) \\}\n$$",
483
+ "text_format": "latex",
484
+ "bbox": [
485
+ 183,
486
+ 291,
487
+ 794,
488
+ 316
489
+ ],
490
+ "page_idx": 4
491
+ },
492
+ {
493
+ "type": "text",
494
+ "text": "Note that because we have precomputed the $x f e r ( )$ function for edges in the original graph, we can similarly compute the $x f e r ( )$ function for the transitive edge added by a node elimination; i.e., we use dynamic programming to compute the optimal configuration for node $w$ for every possible choice of configurations for nodes $u$ and $v$ . For CNNs with a linear computation graph (e.g., AlexNet and VGG-16), node elimination is sufficient to reduce the original graph to a graph with only 2 nodes. ",
495
+ "bbox": [
496
+ 173,
497
+ 324,
498
+ 825,
499
+ 395
500
+ ],
501
+ "page_idx": 4
502
+ },
503
+ {
504
+ "type": "text",
505
+ "text": "Edge elimination. For two edges with the same source and destination node (i.e., $\\boldsymbol { e } _ { 1 } = ( u , v )$ and $e _ { 2 } = ( u , v ) )$ , we can remove $e _ { 1 }$ and $e _ { 2 }$ from the graph and insert a new edge $\\boldsymbol { e } ^ { \\prime } = \\left( u , v \\right)$ (shown in Figure 5b). The $x f e r ( )$ function for node $e ^ { \\prime }$ is ",
506
+ "bbox": [
507
+ 173,
508
+ 401,
509
+ 821,
510
+ 443
511
+ ],
512
+ "page_idx": 4
513
+ },
514
+ {
515
+ "type": "equation",
516
+ "img_path": "images/2d87808698f88478d022087039d80a59658db128c107c75766fa5f3d09d07cd2.jpg",
517
+ "text": "$$\ne ^ { \\prime } . x f e r ( c _ { u } , c _ { v } ) = e _ { 1 } . x f e r ( c _ { u } , c _ { v } ) + e _ { 2 } . x f e r ( c _ { u } , c _ { v } )\n$$",
518
+ "text_format": "latex",
519
+ "bbox": [
520
+ 333,
521
+ 450,
522
+ 663,
523
+ 468
524
+ ],
525
+ "page_idx": 4
526
+ },
527
+ {
528
+ "type": "image",
529
+ "img_path": "images/dda15850056babc26c99b6228694861bbb715df2bba3cd953aaee45bc92c0dab.jpg",
530
+ "image_caption": [
531
+ "Figure 6: Iteratively performing node/edge eliminations on an Inception module. "
532
+ ],
533
+ "image_footnote": [],
534
+ "bbox": [
535
+ 215,
536
+ 491,
537
+ 761,
538
+ 859
539
+ ],
540
+ "page_idx": 4
541
+ },
542
+ {
543
+ "type": "text",
544
+ "text": "As with node elimination, we compute the $x f e r ( )$ function for $e ^ { \\prime }$ using the already computed xfer() functions for $e _ { 1 }$ and $e _ { 2 }$ . Figure 6 shows how DeePa iteratively eliminates nodes and edges for an ",
545
+ "bbox": [
546
+ 174,
547
+ 895,
548
+ 823,
549
+ 924
550
+ ],
551
+ "page_idx": 4
552
+ },
553
+ {
554
+ "type": "text",
555
+ "text": "Inception-v3 module. The full Inception-v3 computation graph has 120 nodes, which DeePa reduces to a 2-node graph. ",
556
+ "bbox": [
557
+ 173,
558
+ 103,
559
+ 823,
560
+ 132
561
+ ],
562
+ "page_idx": 5
563
+ },
564
+ {
565
+ "type": "text",
566
+ "text": "DeePa iteratively uses node and edge eliminations to simplify a computation graph until neither elimination can be applied. DeePa then enumerates all global configurations for the final graph and chooses the one that minimizes the Cost function in Equation 1. ",
567
+ "bbox": [
568
+ 176,
569
+ 138,
570
+ 821,
571
+ 180
572
+ ],
573
+ "page_idx": 5
574
+ },
575
+ {
576
+ "type": "text",
577
+ "text": "After deciding the configuration for each node in the final graph, DeePa then decides the configuration for the eliminated nodes by undoing the node and edge eliminations in reverse order. When undoing a node elimination for node $w$ , DeePa selects the configuration that minimizes Equation 2 for node $w$ . After undoing all eliminations, DeePa has a configuration for every node in the original graph. In Appendix A.1, we prove that our algorithm finds an optimal global configuration. In our experiments, DeePa finds an optimal configuration for parallelizing the largest CNN we have worked with, Inception-v3, on 16 GPUs in about $1 0 0 \\mathrm { m s }$ . ",
578
+ "bbox": [
579
+ 174,
580
+ 188,
581
+ 825,
582
+ 285
583
+ ],
584
+ "page_idx": 5
585
+ },
586
+ {
587
+ "type": "text",
588
+ "text": "5 IMPLEMENTATION ",
589
+ "text_level": 1,
590
+ "bbox": [
591
+ 176,
592
+ 309,
593
+ 357,
594
+ 325
595
+ ],
596
+ "page_idx": 5
597
+ },
598
+ {
599
+ "type": "text",
600
+ "text": "We found that it is non-trivial to parallelize the training of CNNs in the height, width, and channel dimensions in existing frameworks (e.g., TensorFlow, PyTorch, and Caffe2), and none provides an interface for controlling per-operation parallelism. We implemented DeePa in Legion (Bauer et al., 2012), a high-performance parallel runtime for distributed heterogeneous architectures, and use cuDNN (Chetlur et al., 2014) and cuBLAS (cub, 2016) as the underlying libraries for processing neural network operations. The following Legion features significantly simplify our implementation for DeePa. First, Legion supports high-dimensional partitioning that allows us to parallelize any operation in any combination of the dimensions. Second, Legion allows DeePa to control parallelism at the granularity of each operation. Third, Legion allows fine-grain control over the placement of data in memory. Fourth, Legion’s asynchronous tasking model makes it easy to exploit task as well as image parallelism. We also include two critical optimizations that help achieve good performance. ",
601
+ "bbox": [
602
+ 173,
603
+ 342,
604
+ 825,
605
+ 496
606
+ ],
607
+ "page_idx": 5
608
+ },
609
+ {
610
+ "type": "text",
611
+ "text": "Overlapping computation with data transfers. DeePa manages the gradients of each operation separately and transfers an operation’s gradients as long as its back propagation is completed. We have found that this can effectively hide the data transfer overhead for gradient synchronization. As a result, the synchronous training performance matches asynchronous training in DeePa, which allows users to use synchronous training with its better algorithmic efficiency. ",
612
+ "bbox": [
613
+ 174,
614
+ 502,
615
+ 825,
616
+ 571
617
+ ],
618
+ "page_idx": 5
619
+ },
620
+ {
621
+ "type": "text",
622
+ "text": "Distributing parameter servers. Existing frameworks use parameter servers to store and update variables for a CNN model. Parameter servers are located in CPU memory in TensorFlow and PyTorch. Because DeePa manages the parameters for each operation separately, DeePa can opportunistically distribute the parameter server onto the GPU memories whenever possible. This eliminates data transfers for operations whose gradients and parameter server are located on the same GPU and transforms all GPU to CPU copies into faster GPU to GPU copies. ",
623
+ "bbox": [
624
+ 174,
625
+ 579,
626
+ 825,
627
+ 662
628
+ ],
629
+ "page_idx": 5
630
+ },
631
+ {
632
+ "type": "text",
633
+ "text": "6 RELATED WORK ",
634
+ "text_level": 1,
635
+ "bbox": [
636
+ 176,
637
+ 686,
638
+ 344,
639
+ 703
640
+ ],
641
+ "page_idx": 5
642
+ },
643
+ {
644
+ "type": "text",
645
+ "text": "To the best of our knowledge, DeePa is the first deep learning framework that controls and optimizes the parallelism of neural networks in all dimensions at the granularity of each operation. ",
646
+ "bbox": [
647
+ 176,
648
+ 719,
649
+ 823,
650
+ 748
651
+ ],
652
+ "page_idx": 5
653
+ },
654
+ {
655
+ "type": "text",
656
+ "text": "Existing frameworks such as TensorFlow (Abadi et al., 2016), Caffe2 (Caf, 2016), and PyTorch (Pyt, 2017) use image parallelism to distribute the training of CNNs and only explore parallelism in the image dimension. The standard image parallelism configuration keeps a replica of the entire network on each worker, which results in large data transfers for synchronizing the gradients in each step. ",
657
+ "bbox": [
658
+ 174,
659
+ 756,
660
+ 825,
661
+ 811
662
+ ],
663
+ "page_idx": 5
664
+ },
665
+ {
666
+ "type": "text",
667
+ "text": "Mirhoseini et al. (2017) uses model parallelism that assigns each operation to a dedicated processor for training Inception-v3. It uses a reinforcement learning algorithm to optimize the placement of each operation on a GPU device. The learned device placement on 4 GPUs achieves $19 \\%$ speedup compared to single GPU performance. However, parallelism in each operation is not explored. ",
668
+ "bbox": [
669
+ 174,
670
+ 818,
671
+ 825,
672
+ 875
673
+ ],
674
+ "page_idx": 5
675
+ },
676
+ {
677
+ "type": "text",
678
+ "text": "Krizhevsky (2014) introduces “one weird trick” (OWT) that combines image parallelism with model parallelism to accelerate the distributed training of AlexNet, which efficiently reduces the data transfer cost compared to the standard image parallelism configuration. In Section 7.1.2, we show that ",
679
+ "bbox": [
680
+ 176,
681
+ 881,
682
+ 823,
683
+ 924
684
+ ],
685
+ "page_idx": 5
686
+ },
687
+ {
688
+ "type": "text",
689
+ "text": "DeePa further reduces the overall data transfers for AlexNet by $3 \\times$ and the per-step training time by $2 . 3 \\times$ compared to OWT. ",
690
+ "bbox": [
691
+ 173,
692
+ 103,
693
+ 821,
694
+ 131
695
+ ],
696
+ "page_idx": 6
697
+ },
698
+ {
699
+ "type": "text",
700
+ "text": "Goyal et al. (2017) empirically shows no loss of accuracy for training ResNet-50 on the ImageNet dataset with a large minibatch size of 8192 images3. It uses the standard image parallelism configuration to distribute the training onto 256 GPUs and includes a number of optimizations for reducing communication overhead. As communication is a bottleneck in distributed deep learning, we believe our techniques for reducing data transfers can substantially benefit training on large numbers of GPUs. ",
701
+ "bbox": [
702
+ 173,
703
+ 138,
704
+ 825,
705
+ 222
706
+ ],
707
+ "page_idx": 6
708
+ },
709
+ {
710
+ "type": "text",
711
+ "text": "7 EVALUATION ",
712
+ "text_level": 1,
713
+ "bbox": [
714
+ 174,
715
+ 243,
716
+ 315,
717
+ 258
718
+ ],
719
+ "page_idx": 6
720
+ },
721
+ {
722
+ "type": "image",
723
+ "img_path": "images/6a8603f4feaccae978b2b90aca2c6b48a954047e9d30946644ba57eefa039cca.jpg",
724
+ "image_caption": [
725
+ "Figure 7: Training throughput (images/second) for AlexNet, VGG-16, and Inception-v3 on 16 GPUs. The purple and green bar shows the DeePa performance by restricting DeePa to use image and OWT parallelism, respectively. "
726
+ ],
727
+ "image_footnote": [],
728
+ "bbox": [
729
+ 197,
730
+ 263,
731
+ 455,
732
+ 407
733
+ ],
734
+ "page_idx": 6
735
+ },
736
+ {
737
+ "type": "image",
738
+ "img_path": "images/88771cf8f78487d7c8ae7da1c16f6db428cc51628e774ad66dc7dd7ecc60e9da.jpg",
739
+ "image_caption": [
740
+ "Figure 8: Total amount of data transferred in each step for training AlexNet, VGG-16, and Inception-v3 on 16 GPUs with a minibatch size of 512. "
741
+ ],
742
+ "image_footnote": [],
743
+ "bbox": [
744
+ 517,
745
+ 266,
746
+ 784,
747
+ 417
748
+ ],
749
+ "page_idx": 6
750
+ },
751
+ {
752
+ "type": "text",
753
+ "text": "We use AlexNet (Krizhevsky, 2014), VGG-16 (Simonyan & Zisserman, 2014), and Inceptionv3 (Szegedy et al., 2016) as benchmark CNNs and use the ImageNet dataset (Russakovsky et al., 2015) as the input. For each CNN, we compare the performance of DeePa against TensorFlow, PyTorch, and OWT. We implement OWT in DeePa by restricting all convolutional and pooling layers to use image parallelism and all fully-connected layers to use model parallelism. ",
754
+ "bbox": [
755
+ 174,
756
+ 508,
757
+ 823,
758
+ 579
759
+ ],
760
+ "page_idx": 6
761
+ },
762
+ {
763
+ "type": "text",
764
+ "text": "7.1 CASE STUDY ON A 16-GPU MACHINE ",
765
+ "text_level": 1,
766
+ "bbox": [
767
+ 176,
768
+ 594,
769
+ 478,
770
+ 609
771
+ ],
772
+ "page_idx": 6
773
+ },
774
+ {
775
+ "type": "text",
776
+ "text": "We conduct a detailed case study for training the three CNNs on a 16-GPU machine, with two Intel 10-core E5-2680 Xeon processors, 256 GB main memory, and 16 NVIDIA Tesla K80 GPUs4. We use all 16 GPUs for training each CNN model with a minibatch size of 512 images. As a result, each GPU processes a batch of 32 images in the image parallelism configuration. DeePa uses the search algorithm in Section 4 to find the optimal parallelism configurations, which requires 0.7, 1.1, and 4.8 seconds for AlexNet, VGG-16, and Inception-v3, respectively. ",
777
+ "bbox": [
778
+ 174,
779
+ 621,
780
+ 825,
781
+ 705
782
+ ],
783
+ "page_idx": 6
784
+ },
785
+ {
786
+ "type": "text",
787
+ "text": "Figure 7 shows the synchronous training throughput for a minibatch size of 512 images on 16 GPUs. When DeePa uses image parallelism for all operations, DeePa achieves competitive performance compared to the best of TensorFlow and PyTorch. The OWT approach that uses model parallelism for fully-connected layers speeds up the training throughput by $1 . 4 \\times , 1 . 2 \\times$ , and $1 . 0 7 \\times$ compared to image parallelism using DeePa. The best configurations found by DeePa achieve $6 . 5 \\times$ , $1 . 9 \\times$ , and $1 . 5 \\times$ speedup compared to TensorFlow and PyTorch. ",
788
+ "bbox": [
789
+ 174,
790
+ 712,
791
+ 825,
792
+ 796
793
+ ],
794
+ "page_idx": 6
795
+ },
796
+ {
797
+ "type": "text",
798
+ "text": "Three main optimizations in DeePa achieve most of the performance benefit over the other frameworks. First, DeePa significantly reduces data transfers in each step, as shown in Figure 8. Compared to image parallelism, the OWT approach reduces data transfers by $1 . 0 5 { - } 8 . 4 \\times$ . However, the best configuration used by DeePa further reduces data transfers by $1 . 2 \\mathrm { - } 2 . 7 \\mathrm { \\times }$ compared to OWT. Second, the optimization for overlapping computation with data transfers (described in Section 5) effectively hides data transfer latency and achieves better GPU utilization. The grey bars in Figure 7 illustrate DeePa’s performance when the overlap optimization is disabled, which shows that overlapping computation with data transfers can improve the training throughput by $10 \\% { - } 3 0 \\%$ . Third, DeePa also improves performance by exploring parallelism in the height and width dimensions (see Section 7.1.3). ",
799
+ "bbox": [
800
+ 174,
801
+ 803,
802
+ 823,
803
+ 886
804
+ ],
805
+ "page_idx": 6
806
+ },
807
+ {
808
+ "type": "table",
809
+ "img_path": "images/10f6abdaa2f9fe0fdab260bc1a7deda8ec803c449b147978a2d48f549e9e7116.jpg",
810
+ "table_caption": [
811
+ "Table 2: The cost for different configurations for the first fully-connected of AlexNet. "
812
+ ],
813
+ "table_footnote": [],
814
+ "table_body": "<table><tr><td>Configuration</td><td>#GPU Workers</td><td>Transfer Cost</td><td>Compute Cost</td><td>Update Cost</td><td>Total Cost</td><td>Parallelism Configurations</td></tr><tr><td>{n=16,c=1}</td><td>16</td><td>0</td><td>+1.28</td><td>+1075</td><td>= 1076</td><td>ImageParallelism</td></tr><tr><td>{n=1,c=16}</td><td>16</td><td>134.4</td><td>+1.28</td><td>+0</td><td>= 135.7</td><td>OWT</td></tr><tr><td>{n=1,c=4}</td><td>4</td><td>33.6</td><td>+5.1</td><td>+0</td><td>=38.7</td><td></td></tr><tr><td>{n=1,c=2}</td><td>2</td><td>16.8</td><td>+10.2</td><td>+0</td><td>= 27.0</td><td>DeePa</td></tr><tr><td>{n=1,c=1}</td><td>1</td><td>8.4</td><td>+20.4</td><td>+0</td><td>=28.8</td><td></td></tr></table>",
815
+ "bbox": [
816
+ 227,
817
+ 102,
818
+ 766,
819
+ 186
820
+ ],
821
+ "page_idx": 7
822
+ },
823
+ {
824
+ "type": "text",
825
+ "text": "",
826
+ "bbox": [
827
+ 174,
828
+ 200,
829
+ 825,
830
+ 257
831
+ ],
832
+ "page_idx": 7
833
+ },
834
+ {
835
+ "type": "text",
836
+ "text": "7.1.1 THE BEST CONFIGURATIONS ",
837
+ "text_level": 1,
838
+ "bbox": [
839
+ 176,
840
+ 272,
841
+ 424,
842
+ 286
843
+ ],
844
+ "page_idx": 7
845
+ },
846
+ {
847
+ "type": "text",
848
+ "text": "We describe the best configurations discovered for AlexNet, VGG-16, and Inception-v3 in Sections 7.1.2 to 7.1.4. The best configurations have several similarities. ",
849
+ "bbox": [
850
+ 176,
851
+ 296,
852
+ 821,
853
+ 324
854
+ ],
855
+ "page_idx": 7
856
+ },
857
+ {
858
+ "type": "text",
859
+ "text": "First, for the beginning layers with large height/width dimensions and small channel dimensions, DeePa uses image parallelism on all available GPUs, since the data transfers for synchronizing gradients are much smaller than the data transfers for moving tensors between operations. ",
860
+ "bbox": [
861
+ 174,
862
+ 332,
863
+ 825,
864
+ 373
865
+ ],
866
+ "page_idx": 7
867
+ },
868
+ {
869
+ "type": "text",
870
+ "text": "Second, deeper layers in CNNs tend to have smaller height/width dimensions and larger channel dimensions. As a result, the cost for moving tensors between different operations decreases, while the cost for synchronizing gradients increases. DeePa adaptively reduces the number of GPU workers for these layers to reduce the expensive data transfers for synchronizing gradients at the cost of introducing cheaper data transfers for moving tensors. ",
871
+ "bbox": [
872
+ 174,
873
+ 380,
874
+ 825,
875
+ 450
876
+ ],
877
+ "page_idx": 7
878
+ },
879
+ {
880
+ "type": "text",
881
+ "text": "Third, DeePa uses model parallelism on a small number of GPU workers for fully-connected layers, because synchronizing gradients and moving tensors are both much more expensive than the compute time for fully-connected layers. DeePa reduces the data transfers for synchronizing gradients and moving tensors at the cost of using fewer GPUs. ",
882
+ "bbox": [
883
+ 174,
884
+ 457,
885
+ 825,
886
+ 513
887
+ ],
888
+ "page_idx": 7
889
+ },
890
+ {
891
+ "type": "text",
892
+ "text": "7.1.2 ALEXNET ",
893
+ "text_level": 1,
894
+ "bbox": [
895
+ 174,
896
+ 529,
897
+ 299,
898
+ 542
899
+ ],
900
+ "page_idx": 7
901
+ },
902
+ {
903
+ "type": "image",
904
+ "img_path": "images/1fdc606e91795c844913b613431e568e584b2d6b849313aba4b291b077c06bbb.jpg",
905
+ "image_caption": [
906
+ "Figure 9: The global configuration for parallelizing AlexNet on 16 GPU workers. "
907
+ ],
908
+ "image_footnote": [],
909
+ "bbox": [
910
+ 192,
911
+ 556,
912
+ 807,
913
+ 609
914
+ ],
915
+ "page_idx": 7
916
+ },
917
+ {
918
+ "type": "text",
919
+ "text": "Figure 9 shows the global configuration for AlexNet on 16 GPU workers. Note that DeePa selects the parallelism configuration that optimizes the performance for each layer. Table 2 lists the cost for different configurations of the first fully-connected layer. The standard image parallelism configuration eliminates the cost for transferring the input tensors but introduces additional data transfers for synchronizing gradients. The OWT approach completely eliminates gradient synchronization at the cost of replicating the input tensors on every GPU worker. The configuration chosen by DeePa only uses 2 GPU workers for training the first fully-connected layer, which prolongs the compute time but significantly reduces the cost for both transferring input tensors and synchronizing gradients. As a result, DeePa reduces the total cost by $5 \\times$ compared to other approaches. ",
920
+ "bbox": [
921
+ 173,
922
+ 643,
923
+ 825,
924
+ 768
925
+ ],
926
+ "page_idx": 7
927
+ },
928
+ {
929
+ "type": "text",
930
+ "text": "DeePa uses image parallelism for all convolutional and pooling layers, because the additional data transfer cost introduced by transforming configurations outweighs any performance benefits. ",
931
+ "bbox": [
932
+ 173,
933
+ 775,
934
+ 823,
935
+ 804
936
+ ],
937
+ "page_idx": 7
938
+ },
939
+ {
940
+ "type": "text",
941
+ "text": "7.1.3 VGG-16 ",
942
+ "text_level": 1,
943
+ "bbox": [
944
+ 174,
945
+ 819,
946
+ 290,
947
+ 833
948
+ ],
949
+ "page_idx": 7
950
+ },
951
+ {
952
+ "type": "image",
953
+ "img_path": "images/95df748900bc84eba803cc88fd5a97ef3361566c57dcdd7501747e30ff8bc4d5.jpg",
954
+ "image_caption": [
955
+ "Figure 10: The global configuration for parallelizing VGG-16 on 16 GPU workers. "
956
+ ],
957
+ "image_footnote": [],
958
+ "bbox": [
959
+ 192,
960
+ 848,
961
+ 807,
962
+ 896
963
+ ],
964
+ "page_idx": 7
965
+ },
966
+ {
967
+ "type": "table",
968
+ "img_path": "images/86e71464cd56728964614dbc559679fa9d3180740c98a8befb9f7239eac39609.jpg",
969
+ "table_caption": [
970
+ "Table 3: The cost for different configurations for the last three convolutional layers of VGG-16. "
971
+ ],
972
+ "table_footnote": [],
973
+ "table_body": "<table><tr><td>Configuration</td><td># GPU Workers</td><td>Transfer Cost</td><td>Compute Cost</td><td>Update Cost</td><td>Total Cost</td><td>Parallelism Configurations</td></tr><tr><td>{n=16,c=1,h=1,w=1}</td><td>16</td><td>0</td><td>+15.9</td><td>+134.4</td><td>=150.3</td><td>ImageParallelism&amp;OWT</td></tr><tr><td>{n=8,c=1,h=1,w=1}</td><td>8</td><td>39.2</td><td>+31.8</td><td>+67.2</td><td>=138.2</td><td></td></tr><tr><td>{n=4,c=1,h=1,w=1}</td><td>4</td><td>39.2</td><td>+63.7</td><td>+33.6</td><td>=136.5</td><td></td></tr><tr><td>n=1,c=1,h=2,w=2}</td><td>4</td><td>39.2</td><td>+54.7</td><td>+33.6</td><td>= 127.5</td><td>DeePa</td></tr><tr><td>{n=2,c=1,h=1,w=1}</td><td>2</td><td>39.2</td><td>+127.4</td><td>+16.8</td><td>= 183.4</td><td></td></tr></table>",
974
+ "bbox": [
975
+ 178,
976
+ 119,
977
+ 820,
978
+ 205
979
+ ],
980
+ "page_idx": 8
981
+ },
982
+ {
983
+ "type": "text",
984
+ "text": "DeePa uses similar configurations for parallelizing the fully-connected layers in VGG-16 (Figure 10). In addition, DeePa also uses a different configuration to cooperatively accelerate the last three convolutional layers (the yellow node in Figure 10). Table 3 lists the cost for different parallelism configurations for the last three convolutional layers. The configuration with optimal total cost uses only four GPU workers for the last three convolutional layers to reduce data transfers for synchronizing gradients. DeePa also exploits parallelism in the height and width dimensions to further reduce the compute time. ",
985
+ "bbox": [
986
+ 173,
987
+ 222,
988
+ 825,
989
+ 320
990
+ ],
991
+ "page_idx": 8
992
+ },
993
+ {
994
+ "type": "text",
995
+ "text": "7.1.4 INCEPTION-V3",
996
+ "text_level": 1,
997
+ "bbox": [
998
+ 174,
999
+ 335,
1000
+ 331,
1001
+ 349
1002
+ ],
1003
+ "page_idx": 8
1004
+ },
1005
+ {
1006
+ "type": "image",
1007
+ "img_path": "images/24622793c7d9a18be1849cfbf2f27bf3f3b7217458333dcd812989ffb48a683f.jpg",
1008
+ "image_caption": [
1009
+ "Figure 11: The global configuration for parallelizing Inception-v3 on 16 GPU workers. Each module is shown as a single node for simplicity. "
1010
+ ],
1011
+ "image_footnote": [],
1012
+ "bbox": [
1013
+ 192,
1014
+ 366,
1015
+ 807,
1016
+ 415
1017
+ ],
1018
+ "page_idx": 8
1019
+ },
1020
+ {
1021
+ "type": "image",
1022
+ "img_path": "images/a90e2a59301a873254383b009ff421c72d65c2019d8ddc83463f23f0cfa9dbb8.jpg",
1023
+ "image_caption": [
1024
+ "Figure 12: The configurations for parallelizing the InceptionE1 module. "
1025
+ ],
1026
+ "image_footnote": [],
1027
+ "bbox": [
1028
+ 383,
1029
+ 467,
1030
+ 612,
1031
+ 568
1032
+ ],
1033
+ "page_idx": 8
1034
+ },
1035
+ {
1036
+ "type": "text",
1037
+ "text": "The Inception-v3 model has multiple Inception modules (Szegedy et al., 2016). Each module has several branches of convolutional and pooling layers, which are then concatenated as the output tensor of the module. Figure 11 shows the global configuration for Inception-v3. DeePa uses different configurations to parallelize different branches for the InceptionE1 module, as shown in Figure 12. We found that this configuration reduces data transfers by $30 \\%$ in InceptionE1 and InceptionE2 and reduces overall data transfers by $20 \\%$ . ",
1038
+ "bbox": [
1039
+ 174,
1040
+ 604,
1041
+ 825,
1042
+ 689
1043
+ ],
1044
+ "page_idx": 8
1045
+ },
1046
+ {
1047
+ "type": "text",
1048
+ "text": "7.2 MINIBATCH SIZE ",
1049
+ "text_level": 1,
1050
+ "bbox": [
1051
+ 176,
1052
+ 705,
1053
+ 334,
1054
+ 720
1055
+ ],
1056
+ "page_idx": 8
1057
+ },
1058
+ {
1059
+ "type": "text",
1060
+ "text": "The minibatch size plays an important rule on the performance of CNNs. Figure 13 compares DeePa, PyTorch, and TensorFlow with different minibatch sizes. All three networks were trained on 16 Tesla K80 GPUs on a single node, as described in Section 7.1. We were not able to train VGG-16 and Inception-v3 with a minibatch size of 2048 images, because the required metadata size exceeds the aggregate memory capacity of the 16 GPUs. ",
1061
+ "bbox": [
1062
+ 174,
1063
+ 732,
1064
+ 825,
1065
+ 803
1066
+ ],
1067
+ "page_idx": 8
1068
+ },
1069
+ {
1070
+ "type": "text",
1071
+ "text": "Figure 13 shows that, DeePa achieves constant speedups compared to PyTorch and TensorFlow for various minibatch sizes. In particular, DeePa achieves $4 . 6 { - } 6 . 5 \\times$ , $1 . 6 \\mathrm { - } 1 . 9 \\times$ , and $1 . 2 \\mathrm { - } 1 . 5 \\times$ speedup for AlexNet, VGG-16, and Inception-v3, respectively. ",
1072
+ "bbox": [
1073
+ 174,
1074
+ 809,
1075
+ 825,
1076
+ 852
1077
+ ],
1078
+ "page_idx": 8
1079
+ },
1080
+ {
1081
+ "type": "text",
1082
+ "text": "7.3 MULTI-NODE RESULTS ",
1083
+ "text_level": 1,
1084
+ "bbox": [
1085
+ 176,
1086
+ 868,
1087
+ 375,
1088
+ 882
1089
+ ],
1090
+ "page_idx": 8
1091
+ },
1092
+ {
1093
+ "type": "text",
1094
+ "text": "We evaluate the scalability of different frameworks by comparing their training throughput with different number of GPUs and compute nodes. The experiments were performed on a GPU cluster with 4 nodes, each of which is equipped with two Intel 10-core E5-2600 Xeon processors, 256G main memory, and four NVIDIA Tesla P100 GPUs. GPUs on the same node are connected by NVLink, and nodes are connected over 100Gb/s EDR Infiniband. ",
1095
+ "bbox": [
1096
+ 174,
1097
+ 895,
1098
+ 823,
1099
+ 924
1100
+ ],
1101
+ "page_idx": 8
1102
+ },
1103
+ {
1104
+ "type": "image",
1105
+ "img_path": "images/93d7458c30e952d22471ba797bc25194e958c53604a5bbb842f5261434b76644.jpg",
1106
+ "image_caption": [
1107
+ "Figure 13: Performance comparisons among DeePa, PyTorch, and TensorFlow with different minibatch sizes. "
1108
+ ],
1109
+ "image_footnote": [],
1110
+ "bbox": [
1111
+ 174,
1112
+ 104,
1113
+ 818,
1114
+ 242
1115
+ ],
1116
+ "page_idx": 9
1117
+ },
1118
+ {
1119
+ "type": "image",
1120
+ "img_path": "images/bb0caedab1734e4586484851a263b00c77853d7a82ca74ef5d38bc970f581d94.jpg",
1121
+ "image_caption": [
1122
+ "Figure 14: Performance results for DeePa, PyTorch, and TensorFlow on up to 4 nodes. We perform weak-scaling, where each GPU worker processes a batch of 32 images in every iteration. We use all 4 GPUs on each node in the last two subfigures. "
1123
+ ],
1124
+ "image_footnote": [],
1125
+ "bbox": [
1126
+ 181,
1127
+ 310,
1128
+ 821,
1129
+ 450
1130
+ ],
1131
+ "page_idx": 9
1132
+ },
1133
+ {
1134
+ "type": "text",
1135
+ "text": "",
1136
+ "bbox": [
1137
+ 176,
1138
+ 541,
1139
+ 823,
1140
+ 584
1141
+ ],
1142
+ "page_idx": 9
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "Figure 14 shows the performance comparison among DeePa, PyTorch, and TensorFlow for weakscaling. DeePa achieves competitive performance compared to PyTorch and TensorFlow for training on a single GPU, in which all three frameworks place all operations on a single GPU. For training on 4 GPUs on a single node, DeePa achieves $3 . 1 \\times$ , $1 . 6 \\times$ , and $1 . 3 \\times$ speedup for AlexNet, VGG-16, and Inception-v3, respectively. DeePa achieves even better performance speedups for trainings on multiple nodes, where the data transfer time becomes a larger component of the per-iteration training time. For training on 4 nodes, DeePa achieves $8 . 1 \\times$ , $3 . 2 \\times$ , and $1 . 8 \\times$ speedup for AlexNet, VGG-16, and Inception-v3, respectively. ",
1147
+ "bbox": [
1148
+ 173,
1149
+ 590,
1150
+ 825,
1151
+ 703
1152
+ ],
1153
+ "page_idx": 9
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "8 CONCLUSION ",
1158
+ "text_level": 1,
1159
+ "bbox": [
1160
+ 176,
1161
+ 727,
1162
+ 318,
1163
+ 742
1164
+ ],
1165
+ "page_idx": 9
1166
+ },
1167
+ {
1168
+ "type": "text",
1169
+ "text": "We have presented DeePa, a deep learning framework that explores parallelism in all parallelizable dimensions to accelerate the training of CNNs. DeePa optimizes the parallelism configuration chosen at the granularity of individual layers. DeePa achieves up to $6 . 5 \\times$ for training CNNs and reduces overall data transfers by up to $2 3 \\times$ compared to state-of-the-art deep learning frameworks. ",
1170
+ "bbox": [
1171
+ 174,
1172
+ 760,
1173
+ 825,
1174
+ 815
1175
+ ],
1176
+ "page_idx": 9
1177
+ },
1178
+ {
1179
+ "type": "text",
1180
+ "text": "REFERENCES ",
1181
+ "text_level": 1,
1182
+ "bbox": [
1183
+ 174,
1184
+ 840,
1185
+ 287,
1186
+ 856
1187
+ ],
1188
+ "page_idx": 9
1189
+ },
1190
+ {
1191
+ "type": "text",
1192
+ "text": "A New Lightweight, Modular, and Scalable Deep Learning Framework. https://caffe2.ai, 2016. ",
1193
+ "bbox": [
1194
+ 171,
1195
+ 866,
1196
+ 825,
1197
+ 895
1198
+ ],
1199
+ "page_idx": 9
1200
+ },
1201
+ {
1202
+ "type": "text",
1203
+ "text": "Dense Linear Algebra on GPUs. https://developer.nvidia.com/cublas, 2016. ",
1204
+ "bbox": [
1205
+ 169,
1206
+ 910,
1207
+ 781,
1208
+ 924
1209
+ ],
1210
+ "page_idx": 9
1211
+ },
1212
+ {
1213
+ "type": "text",
1214
+ "text": "Tensors and Dynamic neural networks in Python with strong GPU acceleration. https:// pytorch.org, 2017. ",
1215
+ "bbox": [
1216
+ 173,
1217
+ 103,
1218
+ 823,
1219
+ 132
1220
+ ],
1221
+ "page_idx": 10
1222
+ },
1223
+ {
1224
+ "type": "text",
1225
+ "text": "Mart´ın Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, et al. Tensorflow: A system for largescale machine learning. In OSDI, volume 16, pp. 265–283, 2016. ",
1226
+ "bbox": [
1227
+ 176,
1228
+ 140,
1229
+ 823,
1230
+ 183
1231
+ ],
1232
+ "page_idx": 10
1233
+ },
1234
+ {
1235
+ "type": "text",
1236
+ "text": "Michael Bauer, Sean Treichler, Elliott Slaughter, and Alex Aiken. Legion: Expressing locality and independence with logical regions. In Proceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis, 2012. ",
1237
+ "bbox": [
1238
+ 174,
1239
+ 190,
1240
+ 823,
1241
+ 233
1242
+ ],
1243
+ "page_idx": 10
1244
+ },
1245
+ {
1246
+ "type": "text",
1247
+ "text": "Sharan Chetlur, Cliff Woolley, Philippe Vandermersch, Jonathan Cohen, John Tran, Bryan Catanzaro, and Evan Shelhamer. cudnn: Efficient primitives for deep learning. CoRR, abs/1410.0759, 2014. URL http://arxiv.org/abs/1410.0759. ",
1248
+ "bbox": [
1249
+ 174,
1250
+ 241,
1251
+ 823,
1252
+ 284
1253
+ ],
1254
+ "page_idx": 10
1255
+ },
1256
+ {
1257
+ "type": "text",
1258
+ "text": "Priya Goyal, Piotr Dollar, Ross B. Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, ´ Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch SGD: training imagenet in 1 hour. CoRR, abs/1706.02677, 2017. URL http://arxiv.org/abs/1706. 02677. ",
1259
+ "bbox": [
1260
+ 173,
1261
+ 291,
1262
+ 825,
1263
+ 347
1264
+ ],
1265
+ "page_idx": 10
1266
+ },
1267
+ {
1268
+ "type": "text",
1269
+ "text": "Alex Krizhevsky. One weird trick for parallelizing convolutional neural networks. CoRR, abs/1404.5997, 2014. URL http://arxiv.org/abs/1404.5997. ",
1270
+ "bbox": [
1271
+ 171,
1272
+ 356,
1273
+ 823,
1274
+ 385
1275
+ ],
1276
+ "page_idx": 10
1277
+ },
1278
+ {
1279
+ "type": "text",
1280
+ "text": "Azalia Mirhoseini, Hieu Pham, Quoc V Le, Benoit Steiner, Rasmus Larsen, Yuefeng Zhou, Naveen Kumar, Mohammad Norouzi, Samy Bengio, and Jeff Dean. Device placement optimization with reinforcement learning. CoRR, abs/1706.04972, 2017. URL http://arxiv.org/abs/ 1706.04972. ",
1281
+ "bbox": [
1282
+ 173,
1283
+ 392,
1284
+ 825,
1285
+ 448
1286
+ ],
1287
+ "page_idx": 10
1288
+ },
1289
+ {
1290
+ "type": "text",
1291
+ "text": "Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 2015. ",
1292
+ "bbox": [
1293
+ 176,
1294
+ 457,
1295
+ 821,
1296
+ 500
1297
+ ],
1298
+ "page_idx": 10
1299
+ },
1300
+ {
1301
+ "type": "text",
1302
+ "text": "Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. URL http://arxiv.org/abs/1409.1556. ",
1303
+ "bbox": [
1304
+ 174,
1305
+ 507,
1306
+ 821,
1307
+ 536
1308
+ ],
1309
+ "page_idx": 10
1310
+ },
1311
+ {
1312
+ "type": "text",
1313
+ "text": "Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott E. Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. CoRR, abs/1409.4842, 2014. URL http://arxiv.org/abs/1409.4842. ",
1314
+ "bbox": [
1315
+ 176,
1316
+ 542,
1317
+ 823,
1318
+ 587
1319
+ ],
1320
+ "page_idx": 10
1321
+ },
1322
+ {
1323
+ "type": "text",
1324
+ "text": "Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2016. ",
1325
+ "bbox": [
1326
+ 173,
1327
+ 594,
1328
+ 821,
1329
+ 637
1330
+ ],
1331
+ "page_idx": 10
1332
+ },
1333
+ {
1334
+ "type": "text",
1335
+ "text": "Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In European conference on computer vision, 2014. ",
1336
+ "bbox": [
1337
+ 174,
1338
+ 645,
1339
+ 821,
1340
+ 672
1341
+ ],
1342
+ "page_idx": 10
1343
+ },
1344
+ {
1345
+ "type": "text",
1346
+ "text": "A APPENDIX ",
1347
+ "text_level": 1,
1348
+ "bbox": [
1349
+ 176,
1350
+ 698,
1351
+ 297,
1352
+ 713
1353
+ ],
1354
+ "page_idx": 10
1355
+ },
1356
+ {
1357
+ "type": "text",
1358
+ "text": "A.1 NODE AND EDGE ELIMINATION ",
1359
+ "text_level": 1,
1360
+ "bbox": [
1361
+ 176,
1362
+ 728,
1363
+ 436,
1364
+ 743
1365
+ ],
1366
+ "page_idx": 10
1367
+ },
1368
+ {
1369
+ "type": "text",
1370
+ "text": "We prove the correctness of the node and edge eliminations in Section 4. In particular, we prove that after applying node and edge eliminations, the modified graph has the same optimal configuration as the original graph. ",
1371
+ "bbox": [
1372
+ 174,
1373
+ 755,
1374
+ 825,
1375
+ 797
1376
+ ],
1377
+ "page_idx": 10
1378
+ },
1379
+ {
1380
+ "type": "text",
1381
+ "text": "A.1.1 NODE ELIMINATION ",
1382
+ "text_level": 1,
1383
+ "bbox": [
1384
+ 176,
1385
+ 811,
1386
+ 370,
1387
+ 827
1388
+ ],
1389
+ "page_idx": 10
1390
+ },
1391
+ {
1392
+ "type": "text",
1393
+ "text": "For a given computation graph $G = ( V , E )$ , applying a node elimination on $w$ requires $w$ having a single in-edge $\\boldsymbol { e } _ { 1 } = ( u , w )$ and a single out-edge $e _ { 2 } = ( w , v )$ . The node elimination results in a modified graph $G ^ { \\prime } = ( V ^ { \\prime } , E ^ { \\prime } )$ , where $V ^ { \\prime } = V - \\{ w \\}$ , $E ^ { \\prime } = E - e _ { 1 } - e _ { 2 } + e ^ { \\prime }$ , and $\\boldsymbol { e } ^ { \\prime } = \\left( \\boldsymbol { u } , \\boldsymbol { v } \\right)$ . ",
1394
+ "bbox": [
1395
+ 174,
1396
+ 835,
1397
+ 825,
1398
+ 878
1399
+ ],
1400
+ "page_idx": 10
1401
+ },
1402
+ {
1403
+ "type": "text",
1404
+ "text": "Theorem 1. Consider graphs $( V , E )$ and the result of a single node elimination $( V ^ { \\prime } , E ^ { \\prime } )$ . Then an optimal configuration of $V , E )$ ) is also an optimal configuration of $( V ^ { \\prime } , E ^ { \\prime } )$ , and an optimal configuration of $( V ^ { \\prime } , E ^ { \\prime } )$ is extensible to a an optimal configuration of $( V , E )$ . ",
1405
+ "bbox": [
1406
+ 174,
1407
+ 881,
1408
+ 825,
1409
+ 924
1410
+ ],
1411
+ "page_idx": 10
1412
+ },
1413
+ {
1414
+ "type": "text",
1415
+ "text": "Proof. The Cost function is defined in Equation 1. Let $g$ be any configuration. We first compute the difference between $C o s t ( g , ( V , E ) )$ and $C o s t ( g , ( V ^ { \\prime } , E ^ { \\prime } ) )$ . ",
1416
+ "bbox": [
1417
+ 171,
1418
+ 103,
1419
+ 825,
1420
+ 133
1421
+ ],
1422
+ "page_idx": 11
1423
+ },
1424
+ {
1425
+ "type": "equation",
1426
+ "img_path": "images/dc9da573458996f841e41630daab0f17d1b184f20d104f564fac4d2ae22b20e2.jpg",
1427
+ "text": "$$\n\\begin{array} { l } { { \\displaystyle C o s t ( g , ( V , E ) ) - C o s t ( g , ( V ^ { \\prime } , E ^ { \\prime } ) ) } } \\\\ { { \\displaystyle = \\sum _ { v \\in V } \\{ v . c o m p u t e ( g ( v ) ) + v . u p d a t e ( g ( v ) ) \\} + \\sum _ { e = ( u , v ) \\in E } e . x f e r ( g ( u ) , g ( v ) ) } } \\\\ { { \\displaystyle ~ - \\sum _ { v \\in V ^ { \\prime } } \\{ v . c o m p u t e ( g ( v ) ) + v . u p d a t e ( g ( v ) ) \\} + \\sum _ { e = ( u , v ) \\in E ^ { \\prime } } e . x f e r ( g ( u ) , g ( v ) ) } } \\\\ { { \\displaystyle = w . c o m p u t e ( g ( w ) ) + w . u p d a t e ( g ( w ) ) } } \\\\ { { \\displaystyle ~ + e . \\cdot x f e r ( g ( u ) , g ( w ) ) + e . \\cdot x f e r ( g ( w ) , g ( v ) ) - e ^ { \\prime } . x f e r ( g ( u ) , g ( v ) ) } } \\end{array}\n$$",
1428
+ "text_format": "latex",
1429
+ "bbox": [
1430
+ 235,
1431
+ 138,
1432
+ 761,
1433
+ 271
1434
+ ],
1435
+ "page_idx": 11
1436
+ },
1437
+ {
1438
+ "type": "text",
1439
+ "text": "Now assume $g$ is an optimal configuration for $( V , E )$ . Then we have ",
1440
+ "bbox": [
1441
+ 171,
1442
+ 276,
1443
+ 622,
1444
+ 292
1445
+ ],
1446
+ "page_idx": 11
1447
+ },
1448
+ {
1449
+ "type": "equation",
1450
+ "img_path": "images/fe52b82e9a33b3fcb590b7db357367479f25567c3fcb6515a1d88acca45629b1.jpg",
1451
+ "text": "$$\n\\begin{array} { r l } & { \\quad w . c o m p u t e ( g ( w ) ) + w . u p d a t e ( g ( w ) ) + e _ { 1 } . x f e r ( g ( u ) , g ( w ) ) + e _ { 2 } . x f e r ( g ( w ) , g ( v ) ) } \\\\ & { = \\underset { c _ { w } } { \\operatorname* { m i n } } \\{ w . c o m p u t e ( c _ { w } ) + w . u p d a t e ( c _ { w } ) + e _ { 1 } . x f e r ( g ( u ) , c _ { w } ) + e _ { 2 } . x f e r ( c _ { w } , g ( v ) ) \\} } \\end{array}\n$$",
1452
+ "text_format": "latex",
1453
+ "bbox": [
1454
+ 217,
1455
+ 297,
1456
+ 777,
1457
+ 340
1458
+ ],
1459
+ "page_idx": 11
1460
+ },
1461
+ {
1462
+ "type": "text",
1463
+ "text": "Therefore, $g$ is an optimal configuration of $( V ^ { \\prime } , E ^ { \\prime } )$ . For the other direction, note that if $g$ is an optimal configuration of $( V ^ { \\prime } , E ^ { \\prime } )$ , then it can be extended to an optimal configuration of $( V , E )$ by adding the node $w$ with the same minimal assignment. □ ",
1464
+ "bbox": [
1465
+ 174,
1466
+ 347,
1467
+ 823,
1468
+ 390
1469
+ ],
1470
+ "page_idx": 11
1471
+ },
1472
+ {
1473
+ "type": "text",
1474
+ "text": "A.1.2 EDGE ELIMINATION ",
1475
+ "text_level": 1,
1476
+ "bbox": [
1477
+ 176,
1478
+ 406,
1479
+ 369,
1480
+ 421
1481
+ ],
1482
+ "page_idx": 11
1483
+ },
1484
+ {
1485
+ "type": "text",
1486
+ "text": "For a computation graph $G ( V , E )$ , applying an edge elimination on $\\boldsymbol { e } _ { 1 } = ( u , v )$ and $\\boldsymbol { e } _ { 2 } = ( u , v )$ results in a modified graph $G ^ { \\prime } = ( V , E ^ { \\prime } )$ , where $E ^ { \\prime } = E - e _ { 1 } - e _ { 2 } + e ^ { \\prime }$ and $\\boldsymbol { e } ^ { \\prime } = \\left( \\boldsymbol { u } , \\boldsymbol { v } \\right)$ . We prove that $C o s t ( g , ( V , E ) ) = C o s t ( g , ( V , E ^ { \\prime } ) )$ for any global configuration $g$ of $( V , E )$ . ",
1487
+ "bbox": [
1488
+ 174,
1489
+ 431,
1490
+ 825,
1491
+ 474
1492
+ ],
1493
+ "page_idx": 11
1494
+ },
1495
+ {
1496
+ "type": "text",
1497
+ "text": "Theorem 2. For any global configuration $g$ of graph $\\begin{array} { r c l } { G } & { = } & { ( V , E ) } \\end{array}$ , $C o s t ( g , ( V , E ) ) \\quad = \\quad$ $C o s t ( g , ( V , E ^ { \\prime } ) )$ , where $( V , E ^ { \\prime } )$ is the modified graph of $( V , E )$ after an edge elimination. ",
1498
+ "bbox": [
1499
+ 173,
1500
+ 477,
1501
+ 823,
1502
+ 507
1503
+ ],
1504
+ "page_idx": 11
1505
+ },
1506
+ {
1507
+ "type": "text",
1508
+ "text": "Proof. We compute the difference between $C o s t ( g , ( V , E ) )$ and $C o s t ( g , ( V , E ^ { \\prime } ) )$ . ",
1509
+ "bbox": [
1510
+ 173,
1511
+ 521,
1512
+ 705,
1513
+ 537
1514
+ ],
1515
+ "page_idx": 11
1516
+ },
1517
+ {
1518
+ "type": "equation",
1519
+ "img_path": "images/7cb2ac2c05098a998553c8bac7b597e68aaf6f2f455a8e0f28b7d17a8a0d3432.jpg",
1520
+ "text": "$$\n\\begin{array} { r l } & { \\quad C o s t ( g , ( V , E ) ) - C o s t ( g , ( V , E ^ { \\prime } ) ) } \\\\ & { = e _ { 1 } . x f e r ( g ( u ) , g ( v ) ) - e _ { 2 } . x f e r ( g ( u ) , g ( v ) ) + e ^ { \\prime } . x f e r ( g ( u ) , g ( v ) ) } \\\\ & { = 0 } \\end{array}\n$$",
1521
+ "text_format": "latex",
1522
+ "bbox": [
1523
+ 281,
1524
+ 544,
1525
+ 714,
1526
+ 599
1527
+ ],
1528
+ "page_idx": 11
1529
+ },
1530
+ {
1531
+ "type": "text",
1532
+ "text": "The last equation uses Equation 3. ",
1533
+ "bbox": [
1534
+ 174,
1535
+ 606,
1536
+ 398,
1537
+ 621
1538
+ ],
1539
+ "page_idx": 11
1540
+ },
1541
+ {
1542
+ "type": "text",
1543
+ "text": "A.2 RELATED WORK ON OVERLAPPING COMMUNICATION WITH DATA TRANSFER ",
1544
+ "text_level": 1,
1545
+ "bbox": [
1546
+ 176,
1547
+ 638,
1548
+ 743,
1549
+ 652
1550
+ ],
1551
+ "page_idx": 11
1552
+ },
1553
+ {
1554
+ "type": "text",
1555
+ "text": "The overlap optimization in Section 5 is motivated by Goyal et al. (2017), which performs gradient aggregation in parallel with back propagation to scale synchronous training to large number of GPUs. We extend their design and implementation by also enabling the optimization for asynchronous training in DeePa. ",
1556
+ "bbox": [
1557
+ 174,
1558
+ 662,
1559
+ 825,
1560
+ 719
1561
+ ],
1562
+ "page_idx": 11
1563
+ },
1564
+ {
1565
+ "type": "text",
1566
+ "text": "A.3 PROFILING RESULTS ",
1567
+ "text_level": 1,
1568
+ "bbox": [
1569
+ 176,
1570
+ 737,
1571
+ 362,
1572
+ 751
1573
+ ],
1574
+ "page_idx": 11
1575
+ },
1576
+ {
1577
+ "type": "text",
1578
+ "text": "We show profiling results for visualizing the performance bottlenecks in different parallelism approaches. The experiment was performed on a single node with four Tesla P100 GPUs (as described in Section 7.3). We enable overlapping computation with data transfers (described in Section 5) in this experiment. ",
1579
+ "bbox": [
1580
+ 174,
1581
+ 762,
1582
+ 825,
1583
+ 819
1584
+ ],
1585
+ "page_idx": 11
1586
+ },
1587
+ {
1588
+ "type": "text",
1589
+ "text": "Figure 15 shows the profiling results for training VGG-16 on 4 GPUs with different parallelism configurations. Note that DeePa with image parallelism achieves $10 \\%$ higher training throughput compared to PyTorch and TensorFlow, as shown in Figure 14. Figure 15a shows that all GPUs are highly utilized during forward and backward passes, as indicated by the tight packing of tasks in the timeline. However, the image parallelism approach requires moving 4GB of metadata in every iteration, which cannot be fully overlapped with back propagation, therefore the image parallelism approach has a performance gap between iterations (shown as the white space on the GPU timelines). ",
1590
+ "bbox": [
1591
+ 173,
1592
+ 825,
1593
+ 825,
1594
+ 924
1595
+ ],
1596
+ "page_idx": 11
1597
+ },
1598
+ {
1599
+ "type": "image",
1600
+ "img_path": "images/dfe354450aec70902555e21661a7d63eaf3b55d3bdfe2b63f4ce187cb4786c07.jpg",
1601
+ "image_caption": [
1602
+ "Figure 15: Timelines for training VGG-16 with a minibatch size of 128 images on 4 GPUs. The first horizontal line in each figure shows the overall GPU utilization at different timesteps, and each of the following lines shows the run times for individual operations on each GPU. "
1603
+ ],
1604
+ "image_footnote": [],
1605
+ "bbox": [
1606
+ 232,
1607
+ 102,
1608
+ 764,
1609
+ 502
1610
+ ],
1611
+ "page_idx": 12
1612
+ },
1613
+ {
1614
+ "type": "text",
1615
+ "text": "Figure 15b shows the profiling of the optimal parallelism configuration chosen by DeePa, which uses image parallelism on 4 GPUs for all convolutional layers and pooling layers and uses model parallelism on 2 GPUs for the fully connected layers. Therefore, the training with the optimal configuration includes data transfers for each fully connected layers, which adds small performance gaps at the end of the forward pass and the beginning of the backward pass (shown as the small white space on the GPU timelines). However, the optimal configuration reduces the per-iteration data transfers from 4GB to 490MB, which effectively hides data transfer overhead and achieves better GPU utilization. As a result, the optimal configuration reduces the per-iteration training time from 0.34 seconds to 0.24 seconds. ",
1616
+ "bbox": [
1617
+ 173,
1618
+ 590,
1619
+ 825,
1620
+ 715
1621
+ ],
1622
+ "page_idx": 12
1623
+ },
1624
+ {
1625
+ "type": "text",
1626
+ "text": "A.4 IMANGENET-22K ",
1627
+ "text_level": 1,
1628
+ "bbox": [
1629
+ 176,
1630
+ 736,
1631
+ 341,
1632
+ 751
1633
+ ],
1634
+ "page_idx": 12
1635
+ },
1636
+ {
1637
+ "type": "text",
1638
+ "text": "We compare the performance of DeePa, PyTorch, and TensorFlow on the ImageNet-22K dataset (Russakovsky et al., 2015) that contains 21,841 different categories (the ImageNet dataset used in Section 7 contains 1,000 catagories). The last fully-connected layer in AlexNet, VGG-16, and Inception-v3 originally have 1,000 neurons followed by a 1,000-way softmax layer. To train the three networks on the ImageNet-22K dataset, we change the last fully-connected layer to have 21,841 neurons and use a 21,841-way softmax layer at the end. The modified networks were trained on 16 Tesla K80 GPUs on a single node with a minibatch size of 512 images. ",
1639
+ "bbox": [
1640
+ 174,
1641
+ 763,
1642
+ 825,
1643
+ 861
1644
+ ],
1645
+ "page_idx": 12
1646
+ },
1647
+ {
1648
+ "type": "text",
1649
+ "text": "Figure 16 compares the training throughput and per-iteration data transfers among DeePa, PyTorch, and TensorFlow on the ImageNet and ImageNet-22K datasets. Figure 16a shows that, on the ImageNet-22K dataset, the training throughput of PyTorch and TensorFlow is reduced by $20 \\%$ - $45 \\%$ , while DeePa’s throughput falls off by $3 \\%$ , compared to training on the original ImageNet dataset. Figure 16b compares the per-iteration data transfers between image parallelism and the global configurations used by DeePa. Using image parallelism increases the data transfers in each iteration by 5-10GB, while DeePa only increases the per-iteration data transfers by 40MB. As a result, for training on the ImageNet-22K dataset, DeePa reduces the per-iteration data transfers by $3 . 7 – 4 4 . 5 \\times$ compared to image parallelism. ",
1650
+ "bbox": [
1651
+ 174,
1652
+ 867,
1653
+ 823,
1654
+ 924
1655
+ ],
1656
+ "page_idx": 12
1657
+ },
1658
+ {
1659
+ "type": "image",
1660
+ "img_path": "images/77258f4c33113381b171df167a6b62265e6737ee838ead9a1aa8de95aa53aa34.jpg",
1661
+ "image_caption": [
1662
+ "Figure 16: Performance comparisons among DeePa, PyTorch, and TensorFlow on the ImageNet-22k dataset. "
1663
+ ],
1664
+ "image_footnote": [],
1665
+ "bbox": [
1666
+ 187,
1667
+ 130,
1668
+ 816,
1669
+ 324
1670
+ ],
1671
+ "page_idx": 13
1672
+ },
1673
+ {
1674
+ "type": "text",
1675
+ "text": "",
1676
+ "bbox": [
1677
+ 174,
1678
+ 397,
1679
+ 825,
1680
+ 468
1681
+ ],
1682
+ "page_idx": 13
1683
+ }
1684
+ ]
parse/train/SJCPLLpaW/SJCPLLpaW_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJCPLLpaW/SJCPLLpaW_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Ske6wiAcKQ/Ske6wiAcKQ.md ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # REAL-TIME NEURAL-BASED INPUT METHOD
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ The input method is an essential service on every mobile and desktop devices that provides text suggestions. It converts sequential keyboard inputs to the characters in its target language, which is indispensable for Japanese and Chinese users. Due to critical resource constraints and limited network bandwidth of the target devices, applying neural models to input method is not well explored. In this work, we apply a LSTM-based language model to input method and evaluate its performance for both prediction and conversion tasks with Japanese BCCWJ corpus. We articulate the bottleneck to be the slow softmax computation during conversion. To solve the issue, we propose incremental softmax approximation approach, which computes softmax with a selected subset vocabulary and fix the stale probabilities when the vocabulary is updated in future steps. We refer to this method as incremental selective softmax. The results show a two order speedup for the softmax computation when converting Japanese input sequences with a large vocabulary, reaching real-time speed on commodity CPU. We also exploit the model compressing potential to achieve a $92 \%$ model size reduction without losing accuracy.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Typing is one of the core activities users interact with devices. The input method is an intelligent service in operating systems that provides text suggestions to boost typing efficiency. With a large user base, commercial input products have helped users save trillions of key presses. Being able to provide an input method service in high quality makes a huge business impact.
12
+
13
+ Among various features an input method provides, we consider two essential text suggestion tasks in this work: next word prediction task and conversion task. Next word prediction task relies on a language model, which gives the probability of the next word $p \big ( w _ { t } | w _ { 1 : t - 1 } \big )$ . Usually, top 3 or 5 candidates are shown to users. Conversion task, however, is not a common scenario for Latin users. Latin users can type directly with a keyboard, but there are thousands of characters in the Chinese and Japanese language. Conversion task takes a key sequence and converts it to target word sequence that best matches users’ original intentions. It is a sequence decoding task similar to machine translation.
14
+
15
+ Conventionally, an n-gram language model is used to solve these two tasks (Stolcke, 2002). However, due to the exponential increase in model size , the $\mathbf { n }$ -gram model can only support up to tri-gram. The decoding results often fail to have global consistency as the tri-gram language model is not capable of considering distant context. Also, n-gram models are often pruned to meet model size requirement with a loss in accuracy. In contrast, neural-based language models are proven to solve such issues more efficiently(Bengio et al., 2003; Mikolov et al., 2010; Jozefowicz et al., 2016).
16
+
17
+ Although neural-based language model has achieved enormous success, conventionally, it is not considered feasible for input method task. One major reason is that the input method has to run interactively at user devices with critical constraints of resources and run-time speed. This is different from speech recognition or machine translation services that are normally served from online servers. Input applications have to sacrifice accuracy for execution speed and model size.
18
+
19
+ In this work, we enhance a neural language model tailored for input method task to meet both runtime speed and model size requirement. Our baseline model is composed of a LSTM-based language model (Hochreiter & Schmidhuber, 1997) with a Viterbi decoder (Forney, 1973) as Figure 1 shows.
20
+
21
+ ![](images/0bfa12a95181689e0155dd0c85df34a7db7d0491abb46b1baf290a433572667b.jpg)
22
+ Figure 1: Illustration of the proposed neural-based input method. (a) Input context. (b) Conversion with LSTM LM and Viterbi decoder. (c) Word prediction.
23
+
24
+ It improves the performance for both conversion and next word prediction task and is capable of capturing distant context.
25
+
26
+ For languages like Japanese and Chinese, a large vocabulary is required in the conversion task. we articulate the bottleneck of run-time speed as the vocabulary size matrix operation before softmax. We propose an incremental selective softmax approach that builds a subset vocabulary $V _ { t }$ at each decoding step $t$ . By only computing softmax over $V _ { t }$ , the cost of softmax significantly drops since $| V _ { t } |$ is usually a small number that is less than $1 \%$ of the original vocabulary size. We evaluate the speedup comparing to other softmax optimization. To further handle the model disk size and memory size, we apply $\mathbf { k }$ -means based quantization algorithm and analyze its performance with various compression ratio.
27
+
28
+ We summarize the main contributions of this paper as follows:
29
+
30
+ 1) We empirically evaluate using a LSTM-based language model to address input method challenges and demonstrate its performance for a complex language with large vocabulary size.
31
+
32
+ 2) We propose an effective approach to accelerate the inference time with incremental selective softmax. By avoiding computing the full softmax, our approach achieves two orders inference speed boost without negatively impact the accuracy of conversion.
33
+
34
+ 3) To let the neural language model with a large vocabulary fit into the execution environment on consumer devices, we compress the model with quantization techniques, achieving a $92 \%$ reduction on model size.
35
+
36
+ # 2 NEURAL-BASED INPUT METHOD
37
+
38
+ The neural-based approach we propose for input method is illustrated in Figure 1. We use LSTM language model for both the conversion and prediction tasks. A noticeable difference from the ngram approach is the use of a latent vector to capture input context. It is the hidden vector from the last recurrent unit of the previous sequence. In a real scenario, users don’t type the full sentence in one effort. Instead, they type and convert in fragments, where each fragment contains a few words. It is important to carry the context of the previously determined results to current conversion task.
39
+
40
+ Conversion task is described in Figure 1(b). As the user starts to type in an editor control, the input method first converts the alphabet user typed into syllables. Take Japanese as an example, Japanese Kana, also called “fifty sounds”, can be converted from the alphabet with fixed rules. In lexicon, Japanese words are indexed by Kana characters with an efficient structure such as Trie. A word lattice is then built with all possible words from a Kana sequence by lexicon lookup. To find the best combination of words aligned with the Kana sequence, we use a Viterbi decoder to decode with a beam size $S$ . LSTM language model is used here to evaluate path probabilities. The best path is then shown to the user as the conversion candidate.
41
+
42
+ Once the user selects the conversion candidate, last hidden vector of the best path becomes the new context vector. We compute the softmax based on the context vector and provides a probability distribution of the next words as shown in Figure 1(c).
43
+
44
+ Although several commercial input products have already tried to apply neural models1, they mainly aim to solve the prediction task for Latin languages. Conversion task has a different scale of computational cost and is not yet tackled.
45
+
46
+ # 3 MODEL ACCELERATION
47
+
48
+ # 3.1 BACKGROUND
49
+
50
+ Comparing to a prediction task, the conversion task is even more costly to compute. We further articulate three issues that make the conversion task difficult to solve: 1) For Japanese or Chinese input method, a much larger vocabulary size is required, which is usually several times larger than English. 2) During decoding, we have to evaluate probabilities for all paths with a beam size $S$ . 3) Most importantly, there are no natural word boundaries in Chinese or Japanese, such as a space character. The path evaluation has to run each time a new key input arrives, instead of when space is inserted. With all above constraints, the conversion task has to compute $S \times | V | \times | X |$ steps of LSTM computation for one input sequence, where $| V |$ is the vocabulary size, $| X |$ is the sequence length.
51
+
52
+ Heavy computation cost of LSTM model comes from two operations: the matrix operations inside LSTM cell and the matrix projection at softmax. In the case of a LSTM model with a vocabulary size of 100K, a hidden size of 512, and an embedding size of 256, estimated by simple matrix multiplication, the number of multiplication operations for LSTM cell is about $1 . 5 \mathbf { M }$ , while the softmax has 50M operations. In practice, the softmax occupies $9 7 \%$ of the total computation cost, which is the bottleneck for the conversion task with a large vocabulary size.
53
+
54
+ # 3.2 INCREMENTAL SELECTIVE SOFTMAX
55
+
56
+ To solve the challenges, we propose an incremental selective softmax approach to obtain correct probabilities for paths in the lattice. Given a partial observed character input sequence $( x _ { 1 } , . . . , x _ { t } )$ , we search for a set of words in the dictionary that match any suffix of the observation:
57
+
58
+ $$
59
+ D _ { t } = \bigcup _ { i = 1 } ^ { t } { \mathrm { m a t c h } } ( x _ { i } , . . . , x _ { t } ) ,
60
+ $$
61
+
62
+ where the function $\mathrm { { m a t c h } ( \cdot ) }$ returns all lexicon items matching the partial sequence. For example, given the observation “ha ru ka”, the lexicon set $D _ { t }$ contains all words matching “ha ru $\mathbf { k } \mathbf { a } ^ { \prime \prime }$ or “ru ka” or “ka”. With the lexicon set in each step, we can construct a subset vocabulary $V _ { t }$ that covers all possible output words until step $t$ as:
63
+
64
+ $$
65
+ V _ { t } = \bigcup _ { i = 1 } ^ { t } D _ { i } .
66
+ $$
67
+
68
+ In this work, we refer to $V _ { t }$ as the lattice vocabulary. In contrast to the beam search in machine translation, we have to rank paths that contain different number of words. If we directly compute path probabilities on $V _ { t }$ with a language model, as the denominator of the softmax becomes smaller, all words will have higher probabilities. Therefore, the paths containing more words will have advantage due to the incorrect probabilities. As a result, the paths can be ranked wrongly.
69
+
70
+ To circumvent the probability issue, we also sample a subset vocabulary from the full vocabulary, denoted by $\tilde { V }$ . We use $V _ { t }$ jointly with $\tilde { V }$ to make the word probabilities closer to their original probabilities, thus minimizing the impact of exposure bias.
71
+
72
+ ![](images/3d562e15cb3e0776b6f6525eadd76ad810f72b2a4af90e6045eff1b1b9a53610.jpg)
73
+ Figure 2: Illustration of incremental selective softmax: (a) Vocabulary sampling strategies (b) Incrementally correct path probabilities with new lattice vocabulary.
74
+
75
+ As shown in Figure 2(a), we experiment two sampling methods. The first one samples mostly frequent words from the vocabulary, whereas the second one uniformly samples from the full vocabulary. We found the first sampling method (top sampling) delivers the best performance. In practice, both $V _ { t }$ and $\tilde { V }$ have less than $1 \%$ of the words in the original vocabulary.
76
+
77
+ Our proposed softmax approximation technique has two passes. When a new input character $x _ { t + 1 }$ arrives, we merge the current vocabulary $V _ { t }$ with new words from the lexicon set $D _ { t + 1 }$ , forming a new vocabulary $V _ { t + 1 }$ . Then for each path in the lattice, we compute the language model probability at step $t + 1$ with the joint vocabulary $V _ { t + 1 } \cup \tilde { V }$ as:
78
+
79
+ $$
80
+ P ( y _ { t } = i | h _ { t } ) = \frac { \exp ( h _ { t } ^ { \top } W _ { i } ) } { \sum _ { j \in V _ { t + 1 } \cup \tilde { V } } \exp ( h _ { t } ^ { \top } W _ { j } ) } ,
81
+ $$
82
+
83
+ where $h _ { t }$ is the LSTM hidden state in step $t$ . In this pass, we only compute the word probabilities for top paths in batch with a beam size $S$ .
84
+
85
+ Now we computed the latest word probabilities using the lattice vocabulary $V _ { t + 1 }$ . Unfortunately, as previous word probabilities are computed on old vocabularies, they are not comparable with the new ones. Therefore, in the second pass, we correct the stale word probabilities to let them have the same denominator as the ones computed on the latest lattice vocabulary.
86
+
87
+ In principle, we can correct an old probability in step $k$ by adding the logits of missing vocabulary to the denominator as:
88
+
89
+ $$
90
+ P ( y _ { k } = i | h _ { k } ) = \frac { \exp ( h _ { k } ^ { \top } W _ { i } ) } { \displaystyle \sum _ { j \in V _ { k + 1 } \cup { \tilde { V } } } \exp ( h _ { k } ^ { \top } W _ { j } ) + \sum _ { j \in V _ { t + 1 } , j \notin V _ { k + 1 } \cup { \tilde { V } } } \exp ( h _ { k } ^ { \top } W _ { j } ) } .
91
+ $$
92
+
93
+ However, in practice, as each path has different missing vocabularies, we compute a union of all missing vocabularies, and then recompute the logits of them in batch. Experiments show that our proposed incremental selective softmax strategy achieves a 76x speedup comparing to the baseline.
94
+
95
+ # 4 EXPERIMENTS
96
+
97
+ In this section, we compare the performance of the neural-based approach with conventional approaches. Then, we report the results of applying model acceleration and compression techniques.
98
+
99
+ # 4.1 DATASET
100
+
101
+ We use BCCWJ (Balanced Corpus of Contemporary Written Japanese) corpus (Maekawa et al., 2014) for evaluating our model. The corpus is well balanced with various sources of text representing contemporary written Japanese. This corpus contains 5.8M sentences, which are segmented into 127M tokens. In our experiments, all words are further segmented into short unit words. Each word has a format of ”display/reading/POS”. The reading and POS attributes are attached to tell different usages of the same word. Among the 611K unique words, we choose top 50K frequent ones that cover $9 7 . 3 \%$ of token appearances as an appropriate vocabulary size for the input method task. The words in the vocabulary are ranked with frequency. Most frequent words are at the top.
102
+
103
+ # 4.2 EXPERIMENT SETTINGS
104
+
105
+ The BCCWJ dataset is split into training, valid, and test set. The ratio is $70 \%$ , $20 \%$ , and $10 \%$ respectively. We randomly sample 2000 sentences from the test set for evaluating conversion accuracy. For input method task, we evaluate the conversion accuracy using a Viterbi decoder with a beam size of 10. In Japanese, there are often more than one correct conversion results. For instance, a verb may have two acceptable styles, one in original Japanese Kana, the other in Chinese characters. To better evaluate the model performance, we also report the top-10 accuracy in addition to top-1 accuracy.
106
+
107
+ We implement the model using TensorFlow2. We use a batch size of 384, and dropout with a drop rate of 0.9. Adam optimizer is used with a fixed learning rate of 0.001. The hyper-parameters are shared for all experiments.
108
+
109
+ A replica of the same model is written in numpy to work with a Viterbi decoder in python. It uses the weights learned with TensorFlow model. The inference performance is measure with numpy on a single Intel E5 CPU. We also apply the underline BLAS library to accelerate matrix operation.
110
+
111
+ # 4.3 EVALUATION OF NEURAL-BASED INPUT METHOD
112
+
113
+ We first compared the neural model performance with a conventional n-gram model. We calculate the perplexity of the n-gram model with SRILM package (Stolcke, 2002). We choose modified Kneser Ney (Kneser & Ney, 1995; James, 2000) as the smoothing algorithm when learning the ngram model. The learned language model is plugged into our input method pipeline for evaluating the sentence conversation accuracy. The prediction accuracy is not provided as it is directly reflected by model perplexity.
114
+
115
+ The LSTM baseline model has a standard architecture. The embedding size is 256, and the hidden size is 256. The size of LSTM cells is selected empirically on a validation dataset. In practice, using a network size bigger than 256 cannot gain significant improvement on perplexity. In all following experiments, we bind the input embedding and output embedding according to Press & Wolf (2017). The idea is proven to save space and almost loss-less. We treat it as the baseline model in following experiments.
116
+
117
+ <table><tr><td>Models</td><td>pp</td><td>top1 hit %</td><td>top10 hit %</td></tr><tr><td>uni-gram</td><td>833.55</td><td>26.95</td><td>45.85</td></tr><tr><td>bi-gram KN</td><td>99.30</td><td>51.15</td><td>78.10</td></tr><tr><td>tri-gram KN</td><td>68.11</td><td>55.60</td><td>79.65</td></tr><tr><td>LSTMbaseline</td><td>41.39</td><td>61.20</td><td>88.30</td></tr></table>
118
+
119
+ Table 1: Performance comparison of baseline LSTM model with conventional n-gram model.
120
+
121
+ As shown in Table 1, the LSTM baseline achieved a significant improvement on perplexity, comparing to conventional n-gram based models. The top-1 and top-10 path conversion accuracy were increased by $5 . 6 \%$ and $8 . 6 5 \%$ respectively comparing to tri-gram KN. In real products, bi-gram is often used for decoding while tri-gram is only used for re-ranking the best paths. Please note that in this evaluation, we didn’t apply any pruning for n-gram. The n-gram model takes over 1GB storage size.
122
+
123
+ # 4.4 EVALUATION OF RUN-TIME SPEED
124
+
125
+ In this section, we compare the inference speed of various softmax acceleration approaches. We measure the execution speed only for the component that computes the language model probabilities. For neural-based methods, the component includes the LSTM and softmax layer. For the n-gram model, the computation of probability is only a lookup in the hash tables. Other components such as lattice construction are not included as they heavily depend on implementation.
126
+
127
+ Here, we report the decoding time in each step receiving a key input, because the per-step latency is critical for the real-time requirement. The computation cost for decoding the whole sequence is linear to the number of steps. For comparison, we also report the computation time of the softmax alone.
128
+
129
+ Table 2: Model acceleration among different methods with accuracy.
130
+
131
+ <table><tr><td>Models</td><td>Total Time (ms)</td><td>Softmax Time (ms)</td><td>Top-1 Hit (%)</td><td>Top-10 Hit (%)</td></tr><tr><td>tri-gram Kneser-Ney</td><td>0.0025</td><td>1</td><td>55.6</td><td>79.6</td></tr><tr><td>LSTMbaselinew/obatch</td><td>526</td><td>513</td><td>61.2</td><td>88.3</td></tr><tr><td>LSTMbaselinew/batch</td><td>87</td><td>84</td><td>61.2</td><td>88.3</td></tr><tr><td>Char LSTM</td><td>63</td><td>21</td><td>53.2</td><td>79.8</td></tr><tr><td>Char LSTM w/ large beam3</td><td>152</td><td>55</td><td>54.4</td><td>85.2</td></tr><tr><td>D-Softmax</td><td>38</td><td>35</td><td>60.8</td><td>86.8</td></tr><tr><td>D-Softmax*</td><td>37</td><td>35</td><td>60.9</td><td>87.5</td></tr><tr><td>IS-Softmax</td><td>3</td><td>1</td><td>58.8</td><td>86.9</td></tr><tr><td>w/ top sampling</td><td>4</td><td>2</td><td>60.1</td><td>88.2</td></tr><tr><td>w/uniform sampling</td><td>4</td><td>2</td><td>58.9</td><td>87.2</td></tr><tr><td>non-incremental S-Softmax</td><td>11</td><td>2</td><td>58.8</td><td>86.9</td></tr></table>
132
+
133
+ As Table 2 shows, our proposed incremental selective softmax (IS-Softmax) achieves a 76x speedup comparing to the LSTM baseline. The lattice vocabulary in our experiments contains only a few hundred words, while the full vocabulary has 50k words. IS-Softmax only takes $3 ~ \mathrm { m s }$ to handle a new coming key. Such a high processing speed meets the real-time latency requirement.
134
+
135
+ As a comparison, the non-incremental selective softmax is less efficient since it recalculates from the beginning in each step. Therefore, the majority of its cost comes from computing LSTM cells. We also evaluate various sampling methods with IS-Softmax. We find top sampling help close the accuracy gap between the baseline and softmax approximations. In our experiments, the number of samples used in top sampling and uniform sampling methods are both 400.
136
+
137
+ Differentiated softmax (D-Softmax) (Chen et al., 2016) and its variation (D-softmax∗) (Joulin et al., 2017) can also reduce the amount of softmax computation by over a half depends on the segmentation strategy. However, since the vocabulary size is still large, the room for speedup is limited. For character-based LSTM models, we use a hidden size of 1024 and embedding size of 512. Since there is no direct mapping between a single Kana and a single Chinese character, we use the word lattice and evaluate the path probability by character-based LSTM. It reduces the vocabulary size from 50K to 3717 in this experiment. However, the amount of vocabulary is still non-trivial. Furthermore, the integration of character-based models is not as efficient as word-based models in this task. Consequently, we have to use a large beam size to improve accuracy.
138
+
139
+ We also confirmed that batching is critical for acceleration matrix operations even on CPU. The LSTM computation without batching is almost $7 \mathbf { x }$ slower with a beam size 10. Therefore, we batch all the softmax computations when fixing the vocabulary in the second pass of IS-Softmax to achieve the best speed.
140
+
141
+ # 4.5 EVALUATION OF MODEL COMPRESSION
142
+
143
+ Due to the limited resource on user devices, the model for the input method has to be extremely compact for both storage and memory footprint. For the mobile platforms, the distribution package that contains the neural model shall have a size small than $1 0 \mathrm { { M B } }$ in order to handle various network environments. For commercial products, a large model size directly hinders the adoption of neural models even a higher accuracy is achieved.
144
+
145
+ ![](images/5b4504a3b3ce8f35b3119fff7dd45853970f1f6946637df7b70e6ea79c4bbbb4.jpg)
146
+ Figure 3: Model compression with k-means clusters from $2 ^ { 1 }$ to $2 ^ { 8 }$ .
147
+
148
+ In our experiments, we implement a $\mathbf { k }$ -means clustering algorithm (Han et al., 2016) to compress our neural language model. Instead of applying clustering method to all the weights of the LSTM model, we generate code and codebook for each trained matrix. As Figure 3 shows, the quantization method using codes of 8 bits works well without degrading the conversion accuracy. Even with very low bits such as 3 and 4, the conversion accuracy is still higher than the n-gram baseline. The model size for n-gram has over than 1GB storage footprint. In practice, pruning the n-gram model inevitably causes a loss in accuracy. The neural language model shows a big advantage over n-gram in terms of model compression. By applying 5-bit quantization, together with the tie embedding approach, we reduce $92 \%$ of model size without noticeable accuracy loss.
149
+
150
+ # 5 QUALITATIVE ANALYSIS
151
+
152
+ Among the sentences that n-gram cannot simply decode, we select a few examples to perform a qualitative study from the user experience point of view. Figure 4 shows the decoded results from the n-gram and LSTM-based language models. The text in red shows the wrong conversion results, and the text in blue is the correct results. According to human judgment, the most important hint words for a correct conversion are set to bold font. To better align with the Japanese text, the English translation is not in its original order.
153
+
154
+ We observe that the LSTM-based language model is capable of capturing distant context and producing correct results that are difficult for a statistical language model to predict. In case 1, the writer uses parallel structure to describe the core difference between two famous universities in Japan. Such long tail sentence is very creative and doesn’t appear twice in the corpus. Also, the middle word is separated by parenthesis, which causes trouble for the n-gram model. As word embedding can easily identify the antonyms, the LSTM-based model successfully predicts the correct output in such cases. Case 2 and 3 show that distant trigger can be captured by the neural model. Even when the trigger word is in a distant context, the LSTM-based model still understands the topic and selects the correct candidate as case 4 and 5 demonstrate.
155
+
156
+ We also found that when two correct candidates exist, n-gram models tend to keep only one of them in the lattice. In contrast, the LSTM-based model keeps the variety in the lattice and thus resulting in a better top 10 hit rate. We argue that the word embeddings for such interchangeable words are very close in the vector space after training. As a result, they retain similar probabilities during the decoding process.
157
+
158
+ Figure 4: Case study between conversion results of LSTM-based language model and n-gram model.
159
+
160
+ <table><tr><td rowspan="2"></td><td>n-gram</td><td>論理(具体)の東大、凳送(中小)の兄弟 Logical (concrete) University of Tokyo,delivery (medium small) brother</td></tr><tr><td>LSTM baseline</td><td>論理(具体)の東大、凳想(抽象)の京大 Logical (concrete) University of Tokyo, creative (abstract) University of Kyoto</td></tr><tr><td rowspan="3">2</td><td>n-gram</td><td>昔は駐車た抗生物質</td></tr><tr><td>LSTM baseline</td><td>In the past parking antibiotics 昔は注射だた抗生物質</td></tr><tr><td></td><td>In the past injected antibiotics 自民党だけとな���と非常に偏体</td></tr><tr><td rowspan="2">3</td><td>n-gram LSTMbaseline</td><td>Liberal Democratic Party only about very biased experience 自民党けとなまと非常に偏た意見</td></tr><tr><td></td><td>Liberal Democratic Party only about very biased opinion 子供二人を幼くして亡くし、百二十二歳で妻も高い</td></tr><tr><td rowspan="2">4</td><td>n-gram</td><td>Children as child lost life,at the age of 122 wife also tall 子供2人を幼&lt;して亡&lt;し、百二十二歳妻も他界</td></tr><tr><td>LSTM baseline</td><td>Children as child lost life,at the age of 122 wife also died 飛行場行てみると、予約をれてあーたのに、何かの都合での日はに飛</td></tr><tr><td rowspan="2">5</td><td>n-gram</td><td>はずのものがー気しか飛ばなかたのである Airport went to,reservation had made,for some reason at the day Ki didn&#x27;t flew only one stroke flew. 飛行場行てみると、予約をれてあーたのに、何かの都合でその日は二機飛</td></tr><tr><td>LSTMbaseline</td><td>はのものがー機しか飛ばなかたのである Airport went to,reservation had made,for some reason at the day two aircraft didn&#x27;t flew only one aircraft flew.</td></tr></table>
161
+
162
+ # 6 RELATED WORKS
163
+
164
+ Applying a neural-based model for input method is studied in a few previous works. Chen et al. (2015) proposed a MLP architecture for Chinese Pinyin input method. Due to the huge computation cost of matrix operations, the neural model is only applied to rank the best paths decoded with n-gram language model. Though not in literature, we have found implementation of RNN-based input method4. The decoding results on BCCWJ corpus show promising accuracy improvement comparing to the n-gram model. Huang et al. (2018) treat the Chinese input conversion as machine translation and apply seq2seq with attention model. The conversion model and a few other features are served as cloud services. Our work focus on enabling neural-based models on devices especially with limited computation resources.
165
+
166
+ While there are various choices for the neural-based model, we choose a single layer LSTM model (Hochreiter & Schmidhuber, 1997) primarily due to the run-time speed consideration. For other DNN models, we argue that seq2seq like models (Cho et al., 2014) are not feasible to input method task because in each step the decoder needs to compute from start with a new latent vector. Bi-directional architectures such as Bi-LSTM (Huang et al., 2015) normally requires full input sequence beforehand, it cannot compute incrementally. Character-based RNN (Mikolov et al., 2010) is a good alternative for word-based models. It has a smaller vocabulary size. However, for Chinese and Japanese, there are still thousands of characters. Also, it doesn’t predict the next word directly.
167
+
168
+ To reduce the cost of softmax computation, Chen et al. (2016) proposed a differentiated softmax (D-Softmax), which computes the logits with weight matrices differ in size depending on word frequency. It argues that less frequent words require fewer softmax parameters compared to frequently used words. Joulin et al. (2017) is a variation of the D-softmax with more efficient weight segmentation. Together with the tie embedding approach (Press & Wolf, 2017), the cost of the differentiated softmax becomes $\scriptstyle \sum _ { i = 0 } ^ { n } | V _ { i } | \times E _ { i }$ , where each $E _ { i }$ is smaller value than its original size. Although the embedding optimization approach can reduce softmax cost, the amount of reduction is limited. It is still proportional to the reduced embedding size.
169
+
170
+ Another direction of reducing softmax cost comes from vocabulary manipulation. In machine translation, given a source sentence, the vocabulary of target words can be limited before translation. It is possible to calculate the softmax on a subset of the full vocabulary (Jean et al., 2015; Mi et al., 2016). However, for the input method, the conversion task takes user input incrementally. Our proposed incremental selective softmax can work without knowing full vocabulary beforehand. It is generally applicable for incremental sequence decoding task with a large vocabulary.
171
+
172
+ # 7 CONCLUSION
173
+
174
+ Input method plays an important role in improving typing efficiency and user experiences. It has to work on various devices with minimized latency. We study the key challenges to apply neural-based input method to real commodity devices. The proposed incremental selective softmax significantly reduces cost in the softmax computation without losing accuracy. We also demonstrate that the neural-based models can be highly compressed comparing to the conventional n-gram language models. Our proposed method sets a strong baseline in real-time input method. More importantly, as the computation has a low latency, the model is production-ready to be used on real devices.
175
+
176
+ # REFERENCES
177
+
178
+ Yoshua Bengio, Rejean Ducharme, Pascal Vincent, and Christian Jauvin. A neural probabilistic ´ language model. Journal of machine learning research, 3(Feb):1137–1155, 2003.
179
+
180
+ Shenyuan Chen, Hai Zhao, and Rui Wang. Neural network language model for chinese pinyin input method engine. In Proceedings of the 29th Pacific Asia Conference on Language, Information and Computation, pp. 455–461, 2015.
181
+
182
+ Wenlin Chen, David Grangier, and Michael Auli. Strategies for training large vocabulary neural language models. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), volume 1, pp. 1975–1985, 2016.
183
+
184
+ Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder–decoder for statistical machine translation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 1724–1734, 2014.
185
+
186
+ G David Forney. The viterbi algorithm. Proceedings of the IEEE, 61(3):268–278, 1973.
187
+
188
+ Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. In ICLR, 2016.
189
+
190
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
191
+
192
+ Yafang Huang, Zuchao Li, Zhuosheng Zhang, and Hai Zhao. Moon ime: Neural-based chinese pinyin aided input method with customizable association. In Proceedings of ACL 2018, System Demonstrations, pp. 140–145. Association for Computational Linguistics, 2018.
193
+
194
+ Zhiheng Huang, Wei Xu, and Kai Yu. Bidirectional lstm-crf models for sequence tagging. arXiv preprint arXiv:1508.01991, 2015.
195
+
196
+ Frankie James. Modified kneser-ney smoothing of n-gram models. Technical report, 2000.
197
+
198
+ Sebastien Jean, Kyunghyun Cho, Roland Memisevic, and Yoshua Bengio. On using very large target vocabulary for neural machine translation. In 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing of the Asian Federation of Natural Language Processing, ACL-IJCNLP 2015, pp. 1–10. Association for Computational Linguistics (ACL), 2015.
199
+
200
+ Armand Joulin, Moustapha Cisse, David Grangier, Herv ´ e J ´ egou, et al. Efficient softmax approxi-´ mation for gpus. In International Conference on Machine Learning, pp. 1302–1310, 2017.
201
+
202
+ Rafal Jozefowicz, Oriol Vinyals, Mike Schuster, Noam Shazeer, and Yonghui Wu. Exploring the limits of language modeling. arXiv preprint arXiv:1602.02410, 2016.
203
+
204
+ Reinhard Kneser and Hermann Ney. Improved backing-off for m-gram language modeling. In icassp, volume 1, pp. 181e4, 1995.
205
+
206
+ Kikuo Maekawa, Makoto Yamazaki, Toshinobu Ogiso, Takehiko Maruyama, Hideki Ogura, Wakako Kashino, Hanae Koiso, Masaya Yamaguchi, Makiro Tanaka, and Yasuharu Den. Balanced corpus of contemporary written japanese. Language resources and evaluation, 48(2):345–371, 2014.
207
+
208
+ Haitao Mi, Zhiguo Wang, and Abe Ittycheriah. Vocabulary manipulation for neural machine translation. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), volume 2, pp. 124–129, 2016.
209
+
210
+ Toma´s Mikolov, Martin Karafi ˇ at, Luk ´ a´s Burget, Jan ˇ Cernock ˇ y, and Sanjeev Khudanpur. Recurrent \` neural network based language model. In Eleventh Annual Conference of the International Speech Communication Association, 2010.
211
+
212
+ Ofir Press and Lior Wolf. Using the output embedding to improve language models. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers, volume 2, pp. 157–163, 2017.
213
+
214
+ Andreas Stolcke. Srilm-an extensible language modeling toolkit. In Seventh international conference on spoken language processing, 2002.
parse/train/Ske6wiAcKQ/Ske6wiAcKQ_content_list.json ADDED
@@ -0,0 +1,1163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "REAL-TIME NEURAL-BASED INPUT METHOD ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 714,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 145,
20
+ 400,
21
+ 172
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 210,
32
+ 544,
33
+ 226
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "The input method is an essential service on every mobile and desktop devices that provides text suggestions. It converts sequential keyboard inputs to the characters in its target language, which is indispensable for Japanese and Chinese users. Due to critical resource constraints and limited network bandwidth of the target devices, applying neural models to input method is not well explored. In this work, we apply a LSTM-based language model to input method and evaluate its performance for both prediction and conversion tasks with Japanese BCCWJ corpus. We articulate the bottleneck to be the slow softmax computation during conversion. To solve the issue, we propose incremental softmax approximation approach, which computes softmax with a selected subset vocabulary and fix the stale probabilities when the vocabulary is updated in future steps. We refer to this method as incremental selective softmax. The results show a two order speedup for the softmax computation when converting Japanese input sequences with a large vocabulary, reaching real-time speed on commodity CPU. We also exploit the model compressing potential to achieve a $92 \\%$ model size reduction without losing accuracy. ",
40
+ "bbox": [
41
+ 233,
42
+ 244,
43
+ 764,
44
+ 467
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 500,
55
+ 336,
56
+ 515
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Typing is one of the core activities users interact with devices. The input method is an intelligent service in operating systems that provides text suggestions to boost typing efficiency. With a large user base, commercial input products have helped users save trillions of key presses. Being able to provide an input method service in high quality makes a huge business impact. ",
63
+ "bbox": [
64
+ 174,
65
+ 532,
66
+ 823,
67
+ 588
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Among various features an input method provides, we consider two essential text suggestion tasks in this work: next word prediction task and conversion task. Next word prediction task relies on a language model, which gives the probability of the next word $p \\big ( w _ { t } | w _ { 1 : t - 1 } \\big )$ . Usually, top 3 or 5 candidates are shown to users. Conversion task, however, is not a common scenario for Latin users. Latin users can type directly with a keyboard, but there are thousands of characters in the Chinese and Japanese language. Conversion task takes a key sequence and converts it to target word sequence that best matches users’ original intentions. It is a sequence decoding task similar to machine translation. ",
74
+ "bbox": [
75
+ 174,
76
+ 595,
77
+ 825,
78
+ 707
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Conventionally, an n-gram language model is used to solve these two tasks (Stolcke, 2002). However, due to the exponential increase in model size , the $\\mathbf { n }$ -gram model can only support up to tri-gram. The decoding results often fail to have global consistency as the tri-gram language model is not capable of considering distant context. Also, n-gram models are often pruned to meet model size requirement with a loss in accuracy. In contrast, neural-based language models are proven to solve such issues more efficiently(Bengio et al., 2003; Mikolov et al., 2010; Jozefowicz et al., 2016). ",
85
+ "bbox": [
86
+ 174,
87
+ 714,
88
+ 823,
89
+ 797
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Although neural-based language model has achieved enormous success, conventionally, it is not considered feasible for input method task. One major reason is that the input method has to run interactively at user devices with critical constraints of resources and run-time speed. This is different from speech recognition or machine translation services that are normally served from online servers. Input applications have to sacrifice accuracy for execution speed and model size. ",
96
+ "bbox": [
97
+ 176,
98
+ 805,
99
+ 823,
100
+ 875
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "In this work, we enhance a neural language model tailored for input method task to meet both runtime speed and model size requirement. Our baseline model is composed of a LSTM-based language model (Hochreiter & Schmidhuber, 1997) with a Viterbi decoder (Forney, 1973) as Figure 1 shows. ",
107
+ "bbox": [
108
+ 176,
109
+ 882,
110
+ 823,
111
+ 922
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "image",
117
+ "img_path": "images/0bfa12a95181689e0155dd0c85df34a7db7d0491abb46b1baf290a433572667b.jpg",
118
+ "image_caption": [
119
+ "Figure 1: Illustration of the proposed neural-based input method. (a) Input context. (b) Conversion with LSTM LM and Viterbi decoder. (c) Word prediction. "
120
+ ],
121
+ "image_footnote": [],
122
+ "bbox": [
123
+ 184,
124
+ 107,
125
+ 815,
126
+ 324
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "It improves the performance for both conversion and next word prediction task and is capable of capturing distant context. ",
133
+ "bbox": [
134
+ 176,
135
+ 395,
136
+ 821,
137
+ 422
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "For languages like Japanese and Chinese, a large vocabulary is required in the conversion task. we articulate the bottleneck of run-time speed as the vocabulary size matrix operation before softmax. We propose an incremental selective softmax approach that builds a subset vocabulary $V _ { t }$ at each decoding step $t$ . By only computing softmax over $V _ { t }$ , the cost of softmax significantly drops since $| V _ { t } |$ is usually a small number that is less than $1 \\%$ of the original vocabulary size. We evaluate the speedup comparing to other softmax optimization. To further handle the model disk size and memory size, we apply $\\mathbf { k }$ -means based quantization algorithm and analyze its performance with various compression ratio. ",
144
+ "bbox": [
145
+ 174,
146
+ 430,
147
+ 825,
148
+ 541
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "We summarize the main contributions of this paper as follows: ",
155
+ "bbox": [
156
+ 174,
157
+ 549,
158
+ 583,
159
+ 563
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "1) We empirically evaluate using a LSTM-based language model to address input method challenges and demonstrate its performance for a complex language with large vocabulary size. ",
166
+ "bbox": [
167
+ 173,
168
+ 569,
169
+ 821,
170
+ 598
171
+ ],
172
+ "page_idx": 1
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "2) We propose an effective approach to accelerate the inference time with incremental selective softmax. By avoiding computing the full softmax, our approach achieves two orders inference speed boost without negatively impact the accuracy of conversion. ",
177
+ "bbox": [
178
+ 174,
179
+ 606,
180
+ 823,
181
+ 647
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "3) To let the neural language model with a large vocabulary fit into the execution environment on consumer devices, we compress the model with quantization techniques, achieving a $92 \\%$ reduction on model size. ",
188
+ "bbox": [
189
+ 176,
190
+ 655,
191
+ 821,
192
+ 695
193
+ ],
194
+ "page_idx": 1
195
+ },
196
+ {
197
+ "type": "text",
198
+ "text": "2 NEURAL-BASED INPUT METHOD ",
199
+ "text_level": 1,
200
+ "bbox": [
201
+ 174,
202
+ 717,
203
+ 478,
204
+ 733
205
+ ],
206
+ "page_idx": 1
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "The neural-based approach we propose for input method is illustrated in Figure 1. We use LSTM language model for both the conversion and prediction tasks. A noticeable difference from the ngram approach is the use of a latent vector to capture input context. It is the hidden vector from the last recurrent unit of the previous sequence. In a real scenario, users don’t type the full sentence in one effort. Instead, they type and convert in fragments, where each fragment contains a few words. It is important to carry the context of the previously determined results to current conversion task. ",
211
+ "bbox": [
212
+ 174,
213
+ 750,
214
+ 823,
215
+ 833
216
+ ],
217
+ "page_idx": 1
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "Conversion task is described in Figure 1(b). As the user starts to type in an editor control, the input method first converts the alphabet user typed into syllables. Take Japanese as an example, Japanese Kana, also called “fifty sounds”, can be converted from the alphabet with fixed rules. In lexicon, Japanese words are indexed by Kana characters with an efficient structure such as Trie. A word lattice is then built with all possible words from a Kana sequence by lexicon lookup. To find the best combination of words aligned with the Kana sequence, we use a Viterbi decoder to decode with a beam size $S$ . LSTM language model is used here to evaluate path probabilities. The best path is then shown to the user as the conversion candidate. ",
222
+ "bbox": [
223
+ 174,
224
+ 840,
225
+ 823,
226
+ 922
227
+ ],
228
+ "page_idx": 1
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "",
233
+ "bbox": [
234
+ 173,
235
+ 103,
236
+ 823,
237
+ 132
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "Once the user selects the conversion candidate, last hidden vector of the best path becomes the new context vector. We compute the softmax based on the context vector and provides a probability distribution of the next words as shown in Figure 1(c). ",
244
+ "bbox": [
245
+ 176,
246
+ 138,
247
+ 821,
248
+ 181
249
+ ],
250
+ "page_idx": 2
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "Although several commercial input products have already tried to apply neural models1, they mainly aim to solve the prediction task for Latin languages. Conversion task has a different scale of computational cost and is not yet tackled. ",
255
+ "bbox": [
256
+ 176,
257
+ 188,
258
+ 823,
259
+ 229
260
+ ],
261
+ "page_idx": 2
262
+ },
263
+ {
264
+ "type": "text",
265
+ "text": "3 MODEL ACCELERATION ",
266
+ "text_level": 1,
267
+ "bbox": [
268
+ 176,
269
+ 250,
270
+ 406,
271
+ 266
272
+ ],
273
+ "page_idx": 2
274
+ },
275
+ {
276
+ "type": "text",
277
+ "text": "3.1 BACKGROUND ",
278
+ "text_level": 1,
279
+ "bbox": [
280
+ 174,
281
+ 281,
282
+ 315,
283
+ 296
284
+ ],
285
+ "page_idx": 2
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "Comparing to a prediction task, the conversion task is even more costly to compute. We further articulate three issues that make the conversion task difficult to solve: 1) For Japanese or Chinese input method, a much larger vocabulary size is required, which is usually several times larger than English. 2) During decoding, we have to evaluate probabilities for all paths with a beam size $S$ . 3) Most importantly, there are no natural word boundaries in Chinese or Japanese, such as a space character. The path evaluation has to run each time a new key input arrives, instead of when space is inserted. With all above constraints, the conversion task has to compute $S \\times | V | \\times | X |$ steps of LSTM computation for one input sequence, where $| V |$ is the vocabulary size, $| X |$ is the sequence length. ",
290
+ "bbox": [
291
+ 173,
292
+ 308,
293
+ 825,
294
+ 433
295
+ ],
296
+ "page_idx": 2
297
+ },
298
+ {
299
+ "type": "text",
300
+ "text": "Heavy computation cost of LSTM model comes from two operations: the matrix operations inside LSTM cell and the matrix projection at softmax. In the case of a LSTM model with a vocabulary size of 100K, a hidden size of 512, and an embedding size of 256, estimated by simple matrix multiplication, the number of multiplication operations for LSTM cell is about $1 . 5 \\mathbf { M }$ , while the softmax has 50M operations. In practice, the softmax occupies $9 7 \\%$ of the total computation cost, which is the bottleneck for the conversion task with a large vocabulary size. ",
301
+ "bbox": [
302
+ 173,
303
+ 439,
304
+ 825,
305
+ 523
306
+ ],
307
+ "page_idx": 2
308
+ },
309
+ {
310
+ "type": "text",
311
+ "text": "3.2 INCREMENTAL SELECTIVE SOFTMAX ",
312
+ "text_level": 1,
313
+ "bbox": [
314
+ 176,
315
+ 540,
316
+ 473,
317
+ 554
318
+ ],
319
+ "page_idx": 2
320
+ },
321
+ {
322
+ "type": "text",
323
+ "text": "To solve the challenges, we propose an incremental selective softmax approach to obtain correct probabilities for paths in the lattice. Given a partial observed character input sequence $( x _ { 1 } , . . . , x _ { t } )$ , we search for a set of words in the dictionary that match any suffix of the observation: ",
324
+ "bbox": [
325
+ 173,
326
+ 565,
327
+ 825,
328
+ 608
329
+ ],
330
+ "page_idx": 2
331
+ },
332
+ {
333
+ "type": "equation",
334
+ "img_path": "images/e4548308e32a38b9911aa4ae1c0f1f49cd1fee2e749cc4a5374bd9d01b1b1939.jpg",
335
+ "text": "$$\nD _ { t } = \\bigcup _ { i = 1 } ^ { t } { \\mathrm { m a t c h } } ( x _ { i } , . . . , x _ { t } ) ,\n$$",
336
+ "text_format": "latex",
337
+ "bbox": [
338
+ 405,
339
+ 614,
340
+ 591,
341
+ 656
342
+ ],
343
+ "page_idx": 2
344
+ },
345
+ {
346
+ "type": "text",
347
+ "text": "where the function $\\mathrm { { m a t c h } ( \\cdot ) }$ returns all lexicon items matching the partial sequence. For example, given the observation “ha ru ka”, the lexicon set $D _ { t }$ contains all words matching “ha ru $\\mathbf { k } \\mathbf { a } ^ { \\prime \\prime }$ or “ru ka” or “ka”. With the lexicon set in each step, we can construct a subset vocabulary $V _ { t }$ that covers all possible output words until step $t$ as: ",
348
+ "bbox": [
349
+ 173,
350
+ 662,
351
+ 823,
352
+ 718
353
+ ],
354
+ "page_idx": 2
355
+ },
356
+ {
357
+ "type": "equation",
358
+ "img_path": "images/5f0448fd8c4a07e391d516f19ad5e008f126f58305f2873921a8f5f552f0dc52.jpg",
359
+ "text": "$$\nV _ { t } = \\bigcup _ { i = 1 } ^ { t } D _ { i } .\n$$",
360
+ "text_format": "latex",
361
+ "bbox": [
362
+ 454,
363
+ 724,
364
+ 544,
365
+ 767
366
+ ],
367
+ "page_idx": 2
368
+ },
369
+ {
370
+ "type": "text",
371
+ "text": "In this work, we refer to $V _ { t }$ as the lattice vocabulary. In contrast to the beam search in machine translation, we have to rank paths that contain different number of words. If we directly compute path probabilities on $V _ { t }$ with a language model, as the denominator of the softmax becomes smaller, all words will have higher probabilities. Therefore, the paths containing more words will have advantage due to the incorrect probabilities. As a result, the paths can be ranked wrongly. ",
372
+ "bbox": [
373
+ 174,
374
+ 779,
375
+ 825,
376
+ 849
377
+ ],
378
+ "page_idx": 2
379
+ },
380
+ {
381
+ "type": "text",
382
+ "text": "To circumvent the probability issue, we also sample a subset vocabulary from the full vocabulary, denoted by $\\tilde { V }$ . We use $V _ { t }$ jointly with $\\tilde { V }$ to make the word probabilities closer to their original probabilities, thus minimizing the impact of exposure bias. ",
383
+ "bbox": [
384
+ 174,
385
+ 856,
386
+ 823,
387
+ 900
388
+ ],
389
+ "page_idx": 2
390
+ },
391
+ {
392
+ "type": "image",
393
+ "img_path": "images/3d562e15cb3e0776b6f6525eadd76ad810f72b2a4af90e6045eff1b1b9a53610.jpg",
394
+ "image_caption": [
395
+ "Figure 2: Illustration of incremental selective softmax: (a) Vocabulary sampling strategies (b) Incrementally correct path probabilities with new lattice vocabulary. "
396
+ ],
397
+ "image_footnote": [],
398
+ "bbox": [
399
+ 181,
400
+ 108,
401
+ 816,
402
+ 313
403
+ ],
404
+ "page_idx": 3
405
+ },
406
+ {
407
+ "type": "text",
408
+ "text": "As shown in Figure 2(a), we experiment two sampling methods. The first one samples mostly frequent words from the vocabulary, whereas the second one uniformly samples from the full vocabulary. We found the first sampling method (top sampling) delivers the best performance. In practice, both $V _ { t }$ and $\\tilde { V }$ have less than $1 \\%$ of the words in the original vocabulary. ",
409
+ "bbox": [
410
+ 174,
411
+ 383,
412
+ 825,
413
+ 441
414
+ ],
415
+ "page_idx": 3
416
+ },
417
+ {
418
+ "type": "text",
419
+ "text": "Our proposed softmax approximation technique has two passes. When a new input character $x _ { t + 1 }$ arrives, we merge the current vocabulary $V _ { t }$ with new words from the lexicon set $D _ { t + 1 }$ , forming a new vocabulary $V _ { t + 1 }$ . Then for each path in the lattice, we compute the language model probability at step $t + 1$ with the joint vocabulary $V _ { t + 1 } \\cup \\tilde { V }$ as: ",
420
+ "bbox": [
421
+ 173,
422
+ 448,
423
+ 825,
424
+ 507
425
+ ],
426
+ "page_idx": 3
427
+ },
428
+ {
429
+ "type": "equation",
430
+ "img_path": "images/f49cc1069d4d5fb5cd72b5f43e3f57b84d8da225b27615e1765da9a9421af81b.jpg",
431
+ "text": "$$\nP ( y _ { t } = i | h _ { t } ) = \\frac { \\exp ( h _ { t } ^ { \\top } W _ { i } ) } { \\sum _ { j \\in V _ { t + 1 } \\cup \\tilde { V } } \\exp ( h _ { t } ^ { \\top } W _ { j } ) } ,\n$$",
432
+ "text_format": "latex",
433
+ "bbox": [
434
+ 352,
435
+ 531,
436
+ 645,
437
+ 587
438
+ ],
439
+ "page_idx": 3
440
+ },
441
+ {
442
+ "type": "text",
443
+ "text": "where $h _ { t }$ is the LSTM hidden state in step $t$ . In this pass, we only compute the word probabilities for top paths in batch with a beam size $S$ . ",
444
+ "bbox": [
445
+ 173,
446
+ 599,
447
+ 823,
448
+ 628
449
+ ],
450
+ "page_idx": 3
451
+ },
452
+ {
453
+ "type": "text",
454
+ "text": "Now we computed the latest word probabilities using the lattice vocabulary $V _ { t + 1 }$ . Unfortunately, as previous word probabilities are computed on old vocabularies, they are not comparable with the new ones. Therefore, in the second pass, we correct the stale word probabilities to let them have the same denominator as the ones computed on the latest lattice vocabulary. ",
455
+ "bbox": [
456
+ 174,
457
+ 636,
458
+ 825,
459
+ 691
460
+ ],
461
+ "page_idx": 3
462
+ },
463
+ {
464
+ "type": "text",
465
+ "text": "In principle, we can correct an old probability in step $k$ by adding the logits of missing vocabulary to the denominator as: ",
466
+ "bbox": [
467
+ 173,
468
+ 698,
469
+ 825,
470
+ 727
471
+ ],
472
+ "page_idx": 3
473
+ },
474
+ {
475
+ "type": "equation",
476
+ "img_path": "images/02b54ea9089458bdc6880db54fe9b54487e38c4a7dc1795138df603d502930cc.jpg",
477
+ "text": "$$\nP ( y _ { k } = i | h _ { k } ) = \\frac { \\exp ( h _ { k } ^ { \\top } W _ { i } ) } { \\displaystyle \\sum _ { j \\in V _ { k + 1 } \\cup { \\tilde { V } } } \\exp ( h _ { k } ^ { \\top } W _ { j } ) + \\sum _ { j \\in V _ { t + 1 } , j \\notin V _ { k + 1 } \\cup { \\tilde { V } } } \\exp ( h _ { k } ^ { \\top } W _ { j } ) } .\n$$",
478
+ "text_format": "latex",
479
+ "bbox": [
480
+ 215,
481
+ 731,
482
+ 781,
483
+ 786
484
+ ],
485
+ "page_idx": 3
486
+ },
487
+ {
488
+ "type": "text",
489
+ "text": "However, in practice, as each path has different missing vocabularies, we compute a union of all missing vocabularies, and then recompute the logits of them in batch. Experiments show that our proposed incremental selective softmax strategy achieves a 76x speedup comparing to the baseline. ",
490
+ "bbox": [
491
+ 176,
492
+ 799,
493
+ 825,
494
+ 843
495
+ ],
496
+ "page_idx": 3
497
+ },
498
+ {
499
+ "type": "text",
500
+ "text": "4 EXPERIMENTS ",
501
+ "text_level": 1,
502
+ "bbox": [
503
+ 176,
504
+ 863,
505
+ 326,
506
+ 880
507
+ ],
508
+ "page_idx": 3
509
+ },
510
+ {
511
+ "type": "text",
512
+ "text": "In this section, we compare the performance of the neural-based approach with conventional approaches. Then, we report the results of applying model acceleration and compression techniques. ",
513
+ "bbox": [
514
+ 173,
515
+ 895,
516
+ 823,
517
+ 924
518
+ ],
519
+ "page_idx": 3
520
+ },
521
+ {
522
+ "type": "text",
523
+ "text": "4.1 DATASET ",
524
+ "text_level": 1,
525
+ "bbox": [
526
+ 174,
527
+ 103,
528
+ 279,
529
+ 117
530
+ ],
531
+ "page_idx": 4
532
+ },
533
+ {
534
+ "type": "text",
535
+ "text": "We use BCCWJ (Balanced Corpus of Contemporary Written Japanese) corpus (Maekawa et al., 2014) for evaluating our model. The corpus is well balanced with various sources of text representing contemporary written Japanese. This corpus contains 5.8M sentences, which are segmented into 127M tokens. In our experiments, all words are further segmented into short unit words. Each word has a format of ”display/reading/POS”. The reading and POS attributes are attached to tell different usages of the same word. Among the 611K unique words, we choose top 50K frequent ones that cover $9 7 . 3 \\%$ of token appearances as an appropriate vocabulary size for the input method task. The words in the vocabulary are ranked with frequency. Most frequent words are at the top. ",
536
+ "bbox": [
537
+ 174,
538
+ 128,
539
+ 825,
540
+ 241
541
+ ],
542
+ "page_idx": 4
543
+ },
544
+ {
545
+ "type": "text",
546
+ "text": "4.2 EXPERIMENT SETTINGS ",
547
+ "text_level": 1,
548
+ "bbox": [
549
+ 174,
550
+ 257,
551
+ 382,
552
+ 272
553
+ ],
554
+ "page_idx": 4
555
+ },
556
+ {
557
+ "type": "text",
558
+ "text": "The BCCWJ dataset is split into training, valid, and test set. The ratio is $70 \\%$ , $20 \\%$ , and $10 \\%$ respectively. We randomly sample 2000 sentences from the test set for evaluating conversion accuracy. For input method task, we evaluate the conversion accuracy using a Viterbi decoder with a beam size of 10. In Japanese, there are often more than one correct conversion results. For instance, a verb may have two acceptable styles, one in original Japanese Kana, the other in Chinese characters. To better evaluate the model performance, we also report the top-10 accuracy in addition to top-1 accuracy. ",
559
+ "bbox": [
560
+ 174,
561
+ 284,
562
+ 825,
563
+ 367
564
+ ],
565
+ "page_idx": 4
566
+ },
567
+ {
568
+ "type": "text",
569
+ "text": "We implement the model using TensorFlow2. We use a batch size of 384, and dropout with a drop rate of 0.9. Adam optimizer is used with a fixed learning rate of 0.001. The hyper-parameters are shared for all experiments. ",
570
+ "bbox": [
571
+ 174,
572
+ 373,
573
+ 825,
574
+ 416
575
+ ],
576
+ "page_idx": 4
577
+ },
578
+ {
579
+ "type": "text",
580
+ "text": "A replica of the same model is written in numpy to work with a Viterbi decoder in python. It uses the weights learned with TensorFlow model. The inference performance is measure with numpy on a single Intel E5 CPU. We also apply the underline BLAS library to accelerate matrix operation. ",
581
+ "bbox": [
582
+ 174,
583
+ 422,
584
+ 825,
585
+ 465
586
+ ],
587
+ "page_idx": 4
588
+ },
589
+ {
590
+ "type": "text",
591
+ "text": "4.3 EVALUATION OF NEURAL-BASED INPUT METHOD ",
592
+ "text_level": 1,
593
+ "bbox": [
594
+ 173,
595
+ 482,
596
+ 560,
597
+ 496
598
+ ],
599
+ "page_idx": 4
600
+ },
601
+ {
602
+ "type": "text",
603
+ "text": "We first compared the neural model performance with a conventional n-gram model. We calculate the perplexity of the n-gram model with SRILM package (Stolcke, 2002). We choose modified Kneser Ney (Kneser & Ney, 1995; James, 2000) as the smoothing algorithm when learning the ngram model. The learned language model is plugged into our input method pipeline for evaluating the sentence conversation accuracy. The prediction accuracy is not provided as it is directly reflected by model perplexity. ",
604
+ "bbox": [
605
+ 174,
606
+ 507,
607
+ 825,
608
+ 592
609
+ ],
610
+ "page_idx": 4
611
+ },
612
+ {
613
+ "type": "text",
614
+ "text": "The LSTM baseline model has a standard architecture. The embedding size is 256, and the hidden size is 256. The size of LSTM cells is selected empirically on a validation dataset. In practice, using a network size bigger than 256 cannot gain significant improvement on perplexity. In all following experiments, we bind the input embedding and output embedding according to Press & Wolf (2017). The idea is proven to save space and almost loss-less. We treat it as the baseline model in following experiments. ",
615
+ "bbox": [
616
+ 173,
617
+ 598,
618
+ 826,
619
+ 681
620
+ ],
621
+ "page_idx": 4
622
+ },
623
+ {
624
+ "type": "table",
625
+ "img_path": "images/242a3f7a7e2592dde537d04ee10516d20906be197a1a49b7428618cbb0faf08d.jpg",
626
+ "table_caption": [],
627
+ "table_footnote": [],
628
+ "table_body": "<table><tr><td>Models</td><td>pp</td><td>top1 hit %</td><td>top10 hit %</td></tr><tr><td>uni-gram</td><td>833.55</td><td>26.95</td><td>45.85</td></tr><tr><td>bi-gram KN</td><td>99.30</td><td>51.15</td><td>78.10</td></tr><tr><td>tri-gram KN</td><td>68.11</td><td>55.60</td><td>79.65</td></tr><tr><td>LSTMbaseline</td><td>41.39</td><td>61.20</td><td>88.30</td></tr></table>",
629
+ "bbox": [
630
+ 307,
631
+ 695,
632
+ 691,
633
+ 772
634
+ ],
635
+ "page_idx": 4
636
+ },
637
+ {
638
+ "type": "text",
639
+ "text": "Table 1: Performance comparison of baseline LSTM model with conventional n-gram model. ",
640
+ "bbox": [
641
+ 186,
642
+ 784,
643
+ 803,
644
+ 797
645
+ ],
646
+ "page_idx": 4
647
+ },
648
+ {
649
+ "type": "text",
650
+ "text": "As shown in Table 1, the LSTM baseline achieved a significant improvement on perplexity, comparing to conventional n-gram based models. The top-1 and top-10 path conversion accuracy were increased by $5 . 6 \\%$ and $8 . 6 5 \\%$ respectively comparing to tri-gram KN. In real products, bi-gram is often used for decoding while tri-gram is only used for re-ranking the best paths. Please note that in this evaluation, we didn’t apply any pruning for n-gram. The n-gram model takes over 1GB storage size. ",
651
+ "bbox": [
652
+ 174,
653
+ 819,
654
+ 825,
655
+ 901
656
+ ],
657
+ "page_idx": 4
658
+ },
659
+ {
660
+ "type": "text",
661
+ "text": "4.4 EVALUATION OF RUN-TIME SPEED ",
662
+ "text_level": 1,
663
+ "bbox": [
664
+ 176,
665
+ 103,
666
+ 454,
667
+ 117
668
+ ],
669
+ "page_idx": 5
670
+ },
671
+ {
672
+ "type": "text",
673
+ "text": "In this section, we compare the inference speed of various softmax acceleration approaches. We measure the execution speed only for the component that computes the language model probabilities. For neural-based methods, the component includes the LSTM and softmax layer. For the n-gram model, the computation of probability is only a lookup in the hash tables. Other components such as lattice construction are not included as they heavily depend on implementation. ",
674
+ "bbox": [
675
+ 174,
676
+ 135,
677
+ 825,
678
+ 205
679
+ ],
680
+ "page_idx": 5
681
+ },
682
+ {
683
+ "type": "text",
684
+ "text": "Here, we report the decoding time in each step receiving a key input, because the per-step latency is critical for the real-time requirement. The computation cost for decoding the whole sequence is linear to the number of steps. For comparison, we also report the computation time of the softmax alone. ",
685
+ "bbox": [
686
+ 174,
687
+ 212,
688
+ 823,
689
+ 267
690
+ ],
691
+ "page_idx": 5
692
+ },
693
+ {
694
+ "type": "table",
695
+ "img_path": "images/9651b44fd383e8f322caa04ff6cc78ca8282cb0152535f13e93265ad2f526260.jpg",
696
+ "table_caption": [
697
+ "Table 2: Model acceleration among different methods with accuracy. "
698
+ ],
699
+ "table_footnote": [],
700
+ "table_body": "<table><tr><td>Models</td><td>Total Time (ms)</td><td>Softmax Time (ms)</td><td>Top-1 Hit (%)</td><td>Top-10 Hit (%)</td></tr><tr><td>tri-gram Kneser-Ney</td><td>0.0025</td><td>1</td><td>55.6</td><td>79.6</td></tr><tr><td>LSTMbaselinew/obatch</td><td>526</td><td>513</td><td>61.2</td><td>88.3</td></tr><tr><td>LSTMbaselinew/batch</td><td>87</td><td>84</td><td>61.2</td><td>88.3</td></tr><tr><td>Char LSTM</td><td>63</td><td>21</td><td>53.2</td><td>79.8</td></tr><tr><td>Char LSTM w/ large beam3</td><td>152</td><td>55</td><td>54.4</td><td>85.2</td></tr><tr><td>D-Softmax</td><td>38</td><td>35</td><td>60.8</td><td>86.8</td></tr><tr><td>D-Softmax*</td><td>37</td><td>35</td><td>60.9</td><td>87.5</td></tr><tr><td>IS-Softmax</td><td>3</td><td>1</td><td>58.8</td><td>86.9</td></tr><tr><td>w/ top sampling</td><td>4</td><td>2</td><td>60.1</td><td>88.2</td></tr><tr><td>w/uniform sampling</td><td>4</td><td>2</td><td>58.9</td><td>87.2</td></tr><tr><td>non-incremental S-Softmax</td><td>11</td><td>2</td><td>58.8</td><td>86.9</td></tr></table>",
701
+ "bbox": [
702
+ 199,
703
+ 292,
704
+ 797,
705
+ 482
706
+ ],
707
+ "page_idx": 5
708
+ },
709
+ {
710
+ "type": "text",
711
+ "text": "As Table 2 shows, our proposed incremental selective softmax (IS-Softmax) achieves a 76x speedup comparing to the LSTM baseline. The lattice vocabulary in our experiments contains only a few hundred words, while the full vocabulary has 50k words. IS-Softmax only takes $3 ~ \\mathrm { m s }$ to handle a new coming key. Such a high processing speed meets the real-time latency requirement. ",
712
+ "bbox": [
713
+ 174,
714
+ 545,
715
+ 825,
716
+ 602
717
+ ],
718
+ "page_idx": 5
719
+ },
720
+ {
721
+ "type": "text",
722
+ "text": "As a comparison, the non-incremental selective softmax is less efficient since it recalculates from the beginning in each step. Therefore, the majority of its cost comes from computing LSTM cells. We also evaluate various sampling methods with IS-Softmax. We find top sampling help close the accuracy gap between the baseline and softmax approximations. In our experiments, the number of samples used in top sampling and uniform sampling methods are both 400. ",
723
+ "bbox": [
724
+ 174,
725
+ 608,
726
+ 825,
727
+ 679
728
+ ],
729
+ "page_idx": 5
730
+ },
731
+ {
732
+ "type": "text",
733
+ "text": "Differentiated softmax (D-Softmax) (Chen et al., 2016) and its variation (D-softmax∗) (Joulin et al., 2017) can also reduce the amount of softmax computation by over a half depends on the segmentation strategy. However, since the vocabulary size is still large, the room for speedup is limited. For character-based LSTM models, we use a hidden size of 1024 and embedding size of 512. Since there is no direct mapping between a single Kana and a single Chinese character, we use the word lattice and evaluate the path probability by character-based LSTM. It reduces the vocabulary size from 50K to 3717 in this experiment. However, the amount of vocabulary is still non-trivial. Furthermore, the integration of character-based models is not as efficient as word-based models in this task. Consequently, we have to use a large beam size to improve accuracy. ",
734
+ "bbox": [
735
+ 174,
736
+ 685,
737
+ 825,
738
+ 810
739
+ ],
740
+ "page_idx": 5
741
+ },
742
+ {
743
+ "type": "text",
744
+ "text": "We also confirmed that batching is critical for acceleration matrix operations even on CPU. The LSTM computation without batching is almost $7 \\mathbf { x }$ slower with a beam size 10. Therefore, we batch all the softmax computations when fixing the vocabulary in the second pass of IS-Softmax to achieve the best speed. ",
745
+ "bbox": [
746
+ 174,
747
+ 818,
748
+ 825,
749
+ 873
750
+ ],
751
+ "page_idx": 5
752
+ },
753
+ {
754
+ "type": "text",
755
+ "text": "4.5 EVALUATION OF MODEL COMPRESSION ",
756
+ "text_level": 1,
757
+ "bbox": [
758
+ 176,
759
+ 103,
760
+ 490,
761
+ 117
762
+ ],
763
+ "page_idx": 6
764
+ },
765
+ {
766
+ "type": "text",
767
+ "text": "Due to the limited resource on user devices, the model for the input method has to be extremely compact for both storage and memory footprint. For the mobile platforms, the distribution package that contains the neural model shall have a size small than $1 0 \\mathrm { { M B } }$ in order to handle various network environments. For commercial products, a large model size directly hinders the adoption of neural models even a higher accuracy is achieved. ",
768
+ "bbox": [
769
+ 174,
770
+ 133,
771
+ 825,
772
+ 204
773
+ ],
774
+ "page_idx": 6
775
+ },
776
+ {
777
+ "type": "image",
778
+ "img_path": "images/5b4504a3b3ce8f35b3119fff7dd45853970f1f6946637df7b70e6ea79c4bbbb4.jpg",
779
+ "image_caption": [
780
+ "Figure 3: Model compression with k-means clusters from $2 ^ { 1 }$ to $2 ^ { 8 }$ . "
781
+ ],
782
+ "image_footnote": [],
783
+ "bbox": [
784
+ 241,
785
+ 229,
786
+ 753,
787
+ 386
788
+ ],
789
+ "page_idx": 6
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "In our experiments, we implement a $\\mathbf { k }$ -means clustering algorithm (Han et al., 2016) to compress our neural language model. Instead of applying clustering method to all the weights of the LSTM model, we generate code and codebook for each trained matrix. As Figure 3 shows, the quantization method using codes of 8 bits works well without degrading the conversion accuracy. Even with very low bits such as 3 and 4, the conversion accuracy is still higher than the n-gram baseline. The model size for n-gram has over than 1GB storage footprint. In practice, pruning the n-gram model inevitably causes a loss in accuracy. The neural language model shows a big advantage over n-gram in terms of model compression. By applying 5-bit quantization, together with the tie embedding approach, we reduce $92 \\%$ of model size without noticeable accuracy loss. ",
794
+ "bbox": [
795
+ 173,
796
+ 436,
797
+ 825,
798
+ 561
799
+ ],
800
+ "page_idx": 6
801
+ },
802
+ {
803
+ "type": "text",
804
+ "text": "5 QUALITATIVE ANALYSIS ",
805
+ "text_level": 1,
806
+ "bbox": [
807
+ 176,
808
+ 593,
809
+ 411,
810
+ 609
811
+ ],
812
+ "page_idx": 6
813
+ },
814
+ {
815
+ "type": "text",
816
+ "text": "Among the sentences that n-gram cannot simply decode, we select a few examples to perform a qualitative study from the user experience point of view. Figure 4 shows the decoded results from the n-gram and LSTM-based language models. The text in red shows the wrong conversion results, and the text in blue is the correct results. According to human judgment, the most important hint words for a correct conversion are set to bold font. To better align with the Japanese text, the English translation is not in its original order. ",
817
+ "bbox": [
818
+ 174,
819
+ 631,
820
+ 825,
821
+ 715
822
+ ],
823
+ "page_idx": 6
824
+ },
825
+ {
826
+ "type": "text",
827
+ "text": "We observe that the LSTM-based language model is capable of capturing distant context and producing correct results that are difficult for a statistical language model to predict. In case 1, the writer uses parallel structure to describe the core difference between two famous universities in Japan. Such long tail sentence is very creative and doesn’t appear twice in the corpus. Also, the middle word is separated by parenthesis, which causes trouble for the n-gram model. As word embedding can easily identify the antonyms, the LSTM-based model successfully predicts the correct output in such cases. Case 2 and 3 show that distant trigger can be captured by the neural model. Even when the trigger word is in a distant context, the LSTM-based model still understands the topic and selects the correct candidate as case 4 and 5 demonstrate. ",
828
+ "bbox": [
829
+ 173,
830
+ 722,
831
+ 825,
832
+ 847
833
+ ],
834
+ "page_idx": 6
835
+ },
836
+ {
837
+ "type": "text",
838
+ "text": "We also found that when two correct candidates exist, n-gram models tend to keep only one of them in the lattice. In contrast, the LSTM-based model keeps the variety in the lattice and thus resulting in a better top 10 hit rate. We argue that the word embeddings for such interchangeable words are very close in the vector space after training. As a result, they retain similar probabilities during the decoding process. ",
839
+ "bbox": [
840
+ 174,
841
+ 854,
842
+ 823,
843
+ 924
844
+ ],
845
+ "page_idx": 6
846
+ },
847
+ {
848
+ "type": "table",
849
+ "img_path": "images/ad645d6a69e07549366611d576e7d40d8205039c24783ce64d2b9a0fe69b8468.jpg",
850
+ "table_caption": [
851
+ "Figure 4: Case study between conversion results of LSTM-based language model and n-gram model. "
852
+ ],
853
+ "table_footnote": [],
854
+ "table_body": "<table><tr><td rowspan=\"2\"></td><td>n-gram</td><td>論理(具体)の東大、凳送(中小)の兄弟 Logical (concrete) University of Tokyo,delivery (medium small) brother</td></tr><tr><td>LSTM baseline</td><td>論理(具体)の東大、凳想(抽象)の京大 Logical (concrete) University of Tokyo, creative (abstract) University of Kyoto</td></tr><tr><td rowspan=\"3\">2</td><td>n-gram</td><td>昔は駐車た抗生物質</td></tr><tr><td>LSTM baseline</td><td>In the past parking antibiotics 昔は注射だた抗生物質</td></tr><tr><td></td><td>In the past injected antibiotics 自民党だけとなまと非常に偏体</td></tr><tr><td rowspan=\"2\">3</td><td>n-gram LSTMbaseline</td><td>Liberal Democratic Party only about very biased experience 自民党けとなまと非常に偏た意見</td></tr><tr><td></td><td>Liberal Democratic Party only about very biased opinion 子供二人を幼くして亡くし、百二十二歳で妻も高い</td></tr><tr><td rowspan=\"2\">4</td><td>n-gram</td><td>Children as child lost life,at the age of 122 wife also tall 子供2人を幼&lt;して亡&lt;し、百二十二歳妻も他界</td></tr><tr><td>LSTM baseline</td><td>Children as child lost life,at the age of 122 wife also died 飛行場行てみると、予約をれてあーたのに、何かの都合での日はに飛</td></tr><tr><td rowspan=\"2\">5</td><td>n-gram</td><td>はずのものがー気しか飛ばなかたのである Airport went to,reservation had made,for some reason at the day Ki didn&#x27;t flew only one stroke flew. 飛行場行てみると、予約をれてあーたのに、何かの都合でその日は二機飛</td></tr><tr><td>LSTMbaseline</td><td>はのものがー機しか飛ばなかたのである Airport went to,reservation had made,for some reason at the day two aircraft didn&#x27;t flew only one aircraft flew.</td></tr></table>",
855
+ "bbox": [
856
+ 181,
857
+ 107,
858
+ 816,
859
+ 440
860
+ ],
861
+ "page_idx": 7
862
+ },
863
+ {
864
+ "type": "text",
865
+ "text": "6 RELATED WORKS ",
866
+ "text_level": 1,
867
+ "bbox": [
868
+ 176,
869
+ 498,
870
+ 354,
871
+ 513
872
+ ],
873
+ "page_idx": 7
874
+ },
875
+ {
876
+ "type": "text",
877
+ "text": "Applying a neural-based model for input method is studied in a few previous works. Chen et al. (2015) proposed a MLP architecture for Chinese Pinyin input method. Due to the huge computation cost of matrix operations, the neural model is only applied to rank the best paths decoded with n-gram language model. Though not in literature, we have found implementation of RNN-based input method4. The decoding results on BCCWJ corpus show promising accuracy improvement comparing to the n-gram model. Huang et al. (2018) treat the Chinese input conversion as machine translation and apply seq2seq with attention model. The conversion model and a few other features are served as cloud services. Our work focus on enabling neural-based models on devices especially with limited computation resources. ",
878
+ "bbox": [
879
+ 174,
880
+ 531,
881
+ 825,
882
+ 656
883
+ ],
884
+ "page_idx": 7
885
+ },
886
+ {
887
+ "type": "text",
888
+ "text": "While there are various choices for the neural-based model, we choose a single layer LSTM model (Hochreiter & Schmidhuber, 1997) primarily due to the run-time speed consideration. For other DNN models, we argue that seq2seq like models (Cho et al., 2014) are not feasible to input method task because in each step the decoder needs to compute from start with a new latent vector. Bi-directional architectures such as Bi-LSTM (Huang et al., 2015) normally requires full input sequence beforehand, it cannot compute incrementally. Character-based RNN (Mikolov et al., 2010) is a good alternative for word-based models. It has a smaller vocabulary size. However, for Chinese and Japanese, there are still thousands of characters. Also, it doesn’t predict the next word directly. ",
889
+ "bbox": [
890
+ 174,
891
+ 664,
892
+ 825,
893
+ 775
894
+ ],
895
+ "page_idx": 7
896
+ },
897
+ {
898
+ "type": "text",
899
+ "text": "To reduce the cost of softmax computation, Chen et al. (2016) proposed a differentiated softmax (D-Softmax), which computes the logits with weight matrices differ in size depending on word frequency. It argues that less frequent words require fewer softmax parameters compared to frequently used words. Joulin et al. (2017) is a variation of the D-softmax with more efficient weight segmentation. Together with the tie embedding approach (Press & Wolf, 2017), the cost of the differentiated softmax becomes $\\scriptstyle \\sum _ { i = 0 } ^ { n } | V _ { i } | \\times E _ { i }$ , where each $E _ { i }$ is smaller value than its original size. Although the embedding optimization approach can reduce softmax cost, the amount of reduction is limited. It is still proportional to the reduced embedding size. ",
900
+ "bbox": [
901
+ 174,
902
+ 781,
903
+ 823,
904
+ 893
905
+ ],
906
+ "page_idx": 7
907
+ },
908
+ {
909
+ "type": "text",
910
+ "text": "Another direction of reducing softmax cost comes from vocabulary manipulation. In machine translation, given a source sentence, the vocabulary of target words can be limited before translation. It is possible to calculate the softmax on a subset of the full vocabulary (Jean et al., 2015; Mi et al., 2016). However, for the input method, the conversion task takes user input incrementally. Our proposed incremental selective softmax can work without knowing full vocabulary beforehand. It is generally applicable for incremental sequence decoding task with a large vocabulary. ",
911
+ "bbox": [
912
+ 174,
913
+ 103,
914
+ 825,
915
+ 188
916
+ ],
917
+ "page_idx": 8
918
+ },
919
+ {
920
+ "type": "text",
921
+ "text": "7 CONCLUSION ",
922
+ "text_level": 1,
923
+ "bbox": [
924
+ 176,
925
+ 208,
926
+ 318,
927
+ 224
928
+ ],
929
+ "page_idx": 8
930
+ },
931
+ {
932
+ "type": "text",
933
+ "text": "Input method plays an important role in improving typing efficiency and user experiences. It has to work on various devices with minimized latency. We study the key challenges to apply neural-based input method to real commodity devices. The proposed incremental selective softmax significantly reduces cost in the softmax computation without losing accuracy. We also demonstrate that the neural-based models can be highly compressed comparing to the conventional n-gram language models. Our proposed method sets a strong baseline in real-time input method. More importantly, as the computation has a low latency, the model is production-ready to be used on real devices. ",
934
+ "bbox": [
935
+ 174,
936
+ 241,
937
+ 825,
938
+ 338
939
+ ],
940
+ "page_idx": 8
941
+ },
942
+ {
943
+ "type": "text",
944
+ "text": "REFERENCES ",
945
+ "text_level": 1,
946
+ "bbox": [
947
+ 176,
948
+ 359,
949
+ 285,
950
+ 375
951
+ ],
952
+ "page_idx": 8
953
+ },
954
+ {
955
+ "type": "text",
956
+ "text": "Yoshua Bengio, Rejean Ducharme, Pascal Vincent, and Christian Jauvin. A neural probabilistic ´ language model. Journal of machine learning research, 3(Feb):1137–1155, 2003. ",
957
+ "bbox": [
958
+ 173,
959
+ 382,
960
+ 823,
961
+ 412
962
+ ],
963
+ "page_idx": 8
964
+ },
965
+ {
966
+ "type": "text",
967
+ "text": "Shenyuan Chen, Hai Zhao, and Rui Wang. Neural network language model for chinese pinyin input method engine. In Proceedings of the 29th Pacific Asia Conference on Language, Information and Computation, pp. 455–461, 2015. ",
968
+ "bbox": [
969
+ 174,
970
+ 421,
971
+ 823,
972
+ 464
973
+ ],
974
+ "page_idx": 8
975
+ },
976
+ {
977
+ "type": "text",
978
+ "text": "Wenlin Chen, David Grangier, and Michael Auli. Strategies for training large vocabulary neural language models. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), volume 1, pp. 1975–1985, 2016. ",
979
+ "bbox": [
980
+ 174,
981
+ 474,
982
+ 823,
983
+ 517
984
+ ],
985
+ "page_idx": 8
986
+ },
987
+ {
988
+ "type": "text",
989
+ "text": "Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder–decoder for statistical machine translation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 1724–1734, 2014. ",
990
+ "bbox": [
991
+ 173,
992
+ 527,
993
+ 825,
994
+ 584
995
+ ],
996
+ "page_idx": 8
997
+ },
998
+ {
999
+ "type": "text",
1000
+ "text": "G David Forney. The viterbi algorithm. Proceedings of the IEEE, 61(3):268–278, 1973. ",
1001
+ "bbox": [
1002
+ 173,
1003
+ 593,
1004
+ 751,
1005
+ 609
1006
+ ],
1007
+ "page_idx": 8
1008
+ },
1009
+ {
1010
+ "type": "text",
1011
+ "text": "Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. In ICLR, 2016. ",
1012
+ "bbox": [
1013
+ 174,
1014
+ 619,
1015
+ 823,
1016
+ 648
1017
+ ],
1018
+ "page_idx": 8
1019
+ },
1020
+ {
1021
+ "type": "text",
1022
+ "text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997. ",
1023
+ "bbox": [
1024
+ 174,
1025
+ 659,
1026
+ 821,
1027
+ 688
1028
+ ],
1029
+ "page_idx": 8
1030
+ },
1031
+ {
1032
+ "type": "text",
1033
+ "text": "Yafang Huang, Zuchao Li, Zhuosheng Zhang, and Hai Zhao. Moon ime: Neural-based chinese pinyin aided input method with customizable association. In Proceedings of ACL 2018, System Demonstrations, pp. 140–145. Association for Computational Linguistics, 2018. ",
1034
+ "bbox": [
1035
+ 174,
1036
+ 696,
1037
+ 826,
1038
+ 739
1039
+ ],
1040
+ "page_idx": 8
1041
+ },
1042
+ {
1043
+ "type": "text",
1044
+ "text": "Zhiheng Huang, Wei Xu, and Kai Yu. Bidirectional lstm-crf models for sequence tagging. arXiv preprint arXiv:1508.01991, 2015. ",
1045
+ "bbox": [
1046
+ 173,
1047
+ 751,
1048
+ 823,
1049
+ 779
1050
+ ],
1051
+ "page_idx": 8
1052
+ },
1053
+ {
1054
+ "type": "text",
1055
+ "text": "Frankie James. Modified kneser-ney smoothing of n-gram models. Technical report, 2000. ",
1056
+ "bbox": [
1057
+ 174,
1058
+ 789,
1059
+ 769,
1060
+ 804
1061
+ ],
1062
+ "page_idx": 8
1063
+ },
1064
+ {
1065
+ "type": "text",
1066
+ "text": "Sebastien Jean, Kyunghyun Cho, Roland Memisevic, and Yoshua Bengio. On using very large target vocabulary for neural machine translation. In 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing of the Asian Federation of Natural Language Processing, ACL-IJCNLP 2015, pp. 1–10. Association for Computational Linguistics (ACL), 2015. ",
1067
+ "bbox": [
1068
+ 174,
1069
+ 814,
1070
+ 825,
1071
+ 885
1072
+ ],
1073
+ "page_idx": 8
1074
+ },
1075
+ {
1076
+ "type": "text",
1077
+ "text": "Armand Joulin, Moustapha Cisse, David Grangier, Herv ´ e J ´ egou, et al. Efficient softmax approxi-´ mation for gpus. In International Conference on Machine Learning, pp. 1302–1310, 2017. ",
1078
+ "bbox": [
1079
+ 174,
1080
+ 895,
1081
+ 820,
1082
+ 924
1083
+ ],
1084
+ "page_idx": 8
1085
+ },
1086
+ {
1087
+ "type": "text",
1088
+ "text": "Rafal Jozefowicz, Oriol Vinyals, Mike Schuster, Noam Shazeer, and Yonghui Wu. Exploring the limits of language modeling. arXiv preprint arXiv:1602.02410, 2016. ",
1089
+ "bbox": [
1090
+ 169,
1091
+ 103,
1092
+ 825,
1093
+ 132
1094
+ ],
1095
+ "page_idx": 9
1096
+ },
1097
+ {
1098
+ "type": "text",
1099
+ "text": "Reinhard Kneser and Hermann Ney. Improved backing-off for m-gram language modeling. In icassp, volume 1, pp. 181e4, 1995. ",
1100
+ "bbox": [
1101
+ 173,
1102
+ 141,
1103
+ 823,
1104
+ 170
1105
+ ],
1106
+ "page_idx": 9
1107
+ },
1108
+ {
1109
+ "type": "text",
1110
+ "text": "Kikuo Maekawa, Makoto Yamazaki, Toshinobu Ogiso, Takehiko Maruyama, Hideki Ogura, Wakako Kashino, Hanae Koiso, Masaya Yamaguchi, Makiro Tanaka, and Yasuharu Den. Balanced corpus of contemporary written japanese. Language resources and evaluation, 48(2):345–371, 2014. ",
1111
+ "bbox": [
1112
+ 176,
1113
+ 178,
1114
+ 823,
1115
+ 222
1116
+ ],
1117
+ "page_idx": 9
1118
+ },
1119
+ {
1120
+ "type": "text",
1121
+ "text": "Haitao Mi, Zhiguo Wang, and Abe Ittycheriah. Vocabulary manipulation for neural machine translation. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), volume 2, pp. 124–129, 2016. ",
1122
+ "bbox": [
1123
+ 176,
1124
+ 229,
1125
+ 821,
1126
+ 273
1127
+ ],
1128
+ "page_idx": 9
1129
+ },
1130
+ {
1131
+ "type": "text",
1132
+ "text": "Toma´s Mikolov, Martin Karafi ˇ at, Luk ´ a´s Burget, Jan ˇ Cernock ˇ y, and Sanjeev Khudanpur. Recurrent \\` neural network based language model. In Eleventh Annual Conference of the International Speech Communication Association, 2010. ",
1133
+ "bbox": [
1134
+ 173,
1135
+ 281,
1136
+ 826,
1137
+ 325
1138
+ ],
1139
+ "page_idx": 9
1140
+ },
1141
+ {
1142
+ "type": "text",
1143
+ "text": "Ofir Press and Lior Wolf. Using the output embedding to improve language models. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers, volume 2, pp. 157–163, 2017. ",
1144
+ "bbox": [
1145
+ 174,
1146
+ 335,
1147
+ 825,
1148
+ 377
1149
+ ],
1150
+ "page_idx": 9
1151
+ },
1152
+ {
1153
+ "type": "text",
1154
+ "text": "Andreas Stolcke. Srilm-an extensible language modeling toolkit. In Seventh international conference on spoken language processing, 2002. ",
1155
+ "bbox": [
1156
+ 173,
1157
+ 386,
1158
+ 823,
1159
+ 416
1160
+ ],
1161
+ "page_idx": 9
1162
+ }
1163
+ ]
parse/train/Ske6wiAcKQ/Ske6wiAcKQ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Ske6wiAcKQ/Ske6wiAcKQ_model.json ADDED
The diff for this file is too large to render. See raw diff