ZHANGYUXUAN-zR commited on
Commit
452e9bf
·
verified ·
1 Parent(s): 8fb7eb7

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. parse/train/Bke6vTVYwH/Bke6vTVYwH.md +291 -0
  2. parse/train/Bke6vTVYwH/Bke6vTVYwH_content_list.json +1575 -0
  3. parse/train/Bke6vTVYwH/Bke6vTVYwH_middle.json +0 -0
  4. parse/train/Bke6vTVYwH/Bke6vTVYwH_model.json +0 -0
  5. parse/train/Hk2aImxAb/Hk2aImxAb.md +241 -0
  6. parse/train/Hk2aImxAb/Hk2aImxAb_content_list.json +1186 -0
  7. parse/train/Hk2aImxAb/Hk2aImxAb_middle.json +0 -0
  8. parse/train/Hk2aImxAb/Hk2aImxAb_model.json +0 -0
  9. parse/train/HyeaSkrYPH/HyeaSkrYPH.md +356 -0
  10. parse/train/HyeaSkrYPH/HyeaSkrYPH_content_list.json +1829 -0
  11. parse/train/HyeaSkrYPH/HyeaSkrYPH_middle.json +0 -0
  12. parse/train/HyeaSkrYPH/HyeaSkrYPH_model.json +0 -0
  13. parse/train/Hyg96gBKPS/Hyg96gBKPS.md +334 -0
  14. parse/train/Hyg96gBKPS/Hyg96gBKPS_content_list.json +1693 -0
  15. parse/train/Hyg96gBKPS/Hyg96gBKPS_middle.json +0 -0
  16. parse/train/Hyg96gBKPS/Hyg96gBKPS_model.json +0 -0
  17. parse/train/SJeLIgBKPS/SJeLIgBKPS.md +0 -0
  18. parse/train/SJeLIgBKPS/SJeLIgBKPS_content_list.json +0 -0
  19. parse/train/SJeLIgBKPS/SJeLIgBKPS_middle.json +0 -0
  20. parse/train/SJeLIgBKPS/SJeLIgBKPS_model.json +0 -0
  21. parse/train/Skdvd2xAZ/Skdvd2xAZ.md +373 -0
  22. parse/train/Skdvd2xAZ/Skdvd2xAZ_content_list.json +1919 -0
  23. parse/train/Skdvd2xAZ/Skdvd2xAZ_middle.json +0 -0
  24. parse/train/Skdvd2xAZ/Skdvd2xAZ_model.json +0 -0
  25. parse/train/SywMS6ZfM/SywMS6ZfM.md +517 -0
  26. parse/train/SywMS6ZfM/SywMS6ZfM_content_list.json +0 -0
  27. parse/train/SywMS6ZfM/SywMS6ZfM_middle.json +0 -0
  28. parse/train/SywMS6ZfM/SywMS6ZfM_model.json +0 -0
  29. parse/train/Wga_hrCa3P3/Wga_hrCa3P3_content_list.json +0 -0
  30. parse/train/Wga_hrCa3P3/Wga_hrCa3P3_middle.json +0 -0
  31. parse/train/Wi5KUNlqWty/Wi5KUNlqWty.md +0 -0
  32. parse/train/Wi5KUNlqWty/Wi5KUNlqWty_content_list.json +0 -0
  33. parse/train/Wi5KUNlqWty/Wi5KUNlqWty_middle.json +0 -0
  34. parse/train/Wi5KUNlqWty/Wi5KUNlqWty_model.json +0 -0
  35. parse/train/hhU9TEvB6AF/hhU9TEvB6AF.md +273 -0
  36. parse/train/hhU9TEvB6AF/hhU9TEvB6AF_content_list.json +1193 -0
  37. parse/train/hhU9TEvB6AF/hhU9TEvB6AF_middle.json +0 -0
  38. parse/train/hhU9TEvB6AF/hhU9TEvB6AF_model.json +0 -0
  39. parse/train/rk6H0ZbRb/rk6H0ZbRb.md +334 -0
  40. parse/train/rk6H0ZbRb/rk6H0ZbRb_model.json +0 -0
  41. vlm/test/0A5o6dCKeK/0.png +3 -0
  42. vlm/test/0A5o6dCKeK/1.png +3 -0
  43. vlm/test/0A5o6dCKeK/10.png +3 -0
  44. vlm/test/0A5o6dCKeK/11.png +3 -0
  45. vlm/test/0A5o6dCKeK/12.png +3 -0
  46. vlm/test/0A5o6dCKeK/13.png +3 -0
  47. vlm/test/0A5o6dCKeK/14.png +3 -0
  48. vlm/test/0A5o6dCKeK/15.png +3 -0
  49. vlm/test/0A5o6dCKeK/16.png +3 -0
  50. vlm/test/0A5o6dCKeK/17.png +3 -0
parse/train/Bke6vTVYwH/Bke6vTVYwH.md ADDED
@@ -0,0 +1,291 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GRAPH CONVOLUTIONAL NETWORKS FOR LEARNING WITH FEW CLEAN AND MANY NOISY LABELS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ In this work we consider the problem of learning a classifier from noisy labels when a few clean labeled examples are given. The structure of clean and noisy data is modeled by a graph per class and Graph Convolutional Networks (GCN) are used to predict class relevance of noisy examples. For each class, the GCN is treated as a binary classifier learning to discriminate clean from noisy examples using a weighted binary cross-entropy loss function, and then the GCN-inferred “clean” probability is exploited as a relevance measure. Each noisy example is weighted by its relevance when learning a classifier for the end task. We evaluate our method on an extended version of a few-shot learning problem, where the few clean examples of novel classes are supplemented with additional noisy data. Experimental results show that our GCN-based cleaning process significantly improves the classification accuracy over not cleaning the noisy data and standard few-shot classification where only few clean examples are used. The proposed GCN-based method outperforms the transductive approach (Douze et al., 2018) that is using the same additional data without labels.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ State-of-the-art deep learning methods require a large amount of manually labeled data. The need for supervision may be reduced by decoupling representation learning from the end task and/or using additional training data that are unlabeled, weakly labeled (with noisy labels), or belong to different domains or classes. Example approaches are transfer learning (Wang & Gupta, 2015), unsupervised representation learning (Wang & Gupta, 2015), semi-supervised learning (Weston et al., 2008), learning from noisy labels (Joulin et al., 2016) and few-shot learning (Snell et al., 2017).
12
+
13
+ Learning from noisy labels allows using large-scale data and labels from the web without human annotation effort. Most work focuses on learning the representation jointly with the end task, assuming there is still a considerable amount of clean labeled data (Patrini et al., 2017; Lee et al., 2018; Li et al., 2017). However, for a number of classes only very few or even no clean labeled examples might be available at the representation learning stage. Few-shot learning limits the labeled data to very few on the end task, while the representation is learned on a large training set of different classes (Hariharan & Girshick, 2017; Snell et al., 2017; Vinyals et al., 2016). Nevertheless, in many situations, more data with noisy labels are available or can be acquired for the end task.
14
+
15
+ One interesting mix of few-shot learning with additional large-scale data is the work of Douze et al. (2018), where labels are propagated from few clean labeled examples to a large-scale collection. This collection is unlabeled and actually contains data of many more classes than the end task. Their method overall improves the classification accuracy, but at an additional computational cost; it is a transductive method, i.e., instead of learning a parametric classifier, the large-scale collection is still necessary at inference.
16
+
17
+ In this work, we learn a classifier from few clean labeled examples and additional weakly labeled data, while the representation is learned on different classes, as in few-shot learning. We assume the class names are known, and we use them to search an existing large collection of images with textual description. The result is a set of images with potentially relevant, but noisy labels. As shown in Figure 1, we clean this data using a graph convolutional network (GCN) (Kipf & Welling, 2017), which learns to predict a class relevance score per image based on the source (clean vs. noisy) of its connections in the graph. Both the clean and the noisy images are then used to learn a classifier, where the noisy examples are weighted by relevance. Unlike most existing work, our method operates independently per class and applies when clean labeled examples are few or even one per class.
18
+
19
+ ![](images/7eed9d45df54f8a4f9857ca30afe31d8710a4404ec6cdacce1d0af912c397be2.jpg)
20
+ Figure 1: Overview of our cleaning approach for 1-shot learning with noisy examples. We use the class name admiral to crawl noisy images from web and create an adjacency graph based on visual similarity. We then assign a relevance score to each noisy example with a graph convolutional network (GCN). Relevance scores are displayed next to the images.
21
+
22
+ We make the following contributions:
23
+
24
+ • We learn a classifier on a large-scale weakly-labeled collection jointly with only few clean labeled examples.
25
+ • To our knowledge, we are the first to use a GCN to clean noisy data: we cast a GCN as a binary classifier learning to discriminate clean from noisy data, and we use its inferred probabilities for the “clean” class as a relevance score per example.
26
+ We apply our method to a few-shot learning benchmark and show significant improvement in accuracy, while outperforming the method by Douze et al. (2018) using the same large-scale collection of data.
27
+
28
+ # 2 RELATED WORK
29
+
30
+ Learning with noisy labels is often concerned with estimating or learning a transition matrix (Natarajan et al., 2013; Patrini et al., 2017; Sukhbaatar et al., 2014) or knowledge graph (Li et al., 2017) between labels and correcting the loss function, which does not apply in our case since the classes in the noisy data are unknown. Most recent work on learning from large-scale weakly-labeled data focuses on learning the representation e.g. by metric learning (Lee et al., 2018; Wang et al., 2018a), bootstrapping (Reed et al., 2015), or distillation (Li et al., 2017). In our case however, since the clean labeled examples are few, we need to keep the representation mostly fixed.
31
+
32
+ Dealing with the noise, e.g. by thresholding (Lee et al., 2018), outlier detection (Wang et al., 2018a) or reweighting (Liu & Tao, 2015), is applicable while the representation is learned, based e.g. on the gradient of the loss (Ren et al., 2018b). In contrast, the relatively-shallow GCN that we propose effectively decouples reweighting from both representation learning and classifier learning. Learning to clean the noisy labels (Veit et al., 2017) typically assumes adequate human verified labels for training, which again is not the case in this work.
33
+
34
+ Few-shot learning. Meta-learning (Vilalta & Drissi, 2002) refers to learning at two levels, where generic knowledge is acquired before adapting to more specific tasks. In few-shot learning, this translates to learning on a set of base classes how to learn from few examples on a distinct set of novel classes without overfitting. For instance, optimization meta-learning (Finn et al., 2017; 2018; Ravi & Larochelle, 2017) amounts to learning a model that is easy to fine-tune in few steps. In our work, we study an extension of few-shot learning where more data are available on novel classes, reducing the risk of overfitting when fine-tuning the model. Metric learning approaches learn how to compare queries for instance to few examples (Vinyals et al., 2016) or to the corresponding class prototypes (Snell et al., 2017). Hariharan & Girshick (2017) and Wang et al. (2018b) learn how to generate novel-class examples, which is not needed when more data are actually available.
35
+
36
+ Gidaris & Komodakis (2018) learn on base classes a simpler cosine similarity-based parametric classifier, or simply cosine classifier, without meta-learning. The same classifier has been introduced independently by Qi et al. (2018), who further fine-tune the network, assuming access to the base class training set. A recent survey (Chen et al., 2019) confirms the superiority of the cosine classifier to previous work including meta-learning (Finn et al., 2017). We use the cosine classifier in this work, both for base and novel classes. All of the above use only the few labeled examples of the novel classes.
37
+
38
+ Making use of unlabeled data has been little explored in few-shot learning until recently. Ren et al. (2018a) introduce a semi-supervised few-shot classification task, where some labels are unknown. Liu et al. (2019) follow the same semi-supervised setup, but use graph-based label propagation (LP) (Zhou et al., 2003a) for classification and consider jointly all test images. These methods assume a meta-learning scenario, where only small-scale data is available at each training episode; arguably, such a small amount of data limits the representation adaptation and generalization to unseen data. Similarly, Rohrbach et al. (2013) use label propagation in a transductive setting, but at a larger scale assuming that all examples come from a set of known classes. Douze et al. (2018) extend to even larger scale, leveraging 100M unlabeled images in a graph without using additional text information. We focus on the latter large-scale scenario using the same 100M dataset. However, we filter by text to obtain noisy labels and follow an inductive approach by training a classifier for novel classes, such that the 100M collection is not needed at inference.
39
+
40
+ Graph neural networks are generalizations of convolutional networks to non-Euclidean spaces (Bronstein et al., 2017). Early spectral methods (Bruna et al., 2014; Henaff et al., 2015) have been succeeded by Chebyshev polynomial approximations (Defferrard et al., 2016), which avoid the high computational cost of computing eigenvectors. Graph convolutional networks (GCN) (Kipf & Welling, 2017) provide a further simplification by a first-order approximation of graph filtering and are applied to semi-supervised (Kipf & Welling, 2017) and subsequently to few-shot learning (Garcia & Bruna, 2018). In Kipf & Welling (2017), the loss function is applied to labeled examples to make predictions on unlabeled ones. Similarly in Garcia & Bruna (2018), GCNs make predictions on novel class examples. Gidaris & Komodakis (2019) use Graph Neural Networks as denoising autoencoders to generate class weights for novel classes. In contrast, we cast GCNs as binary classifiers discriminating clean from noisy examples: we apply a loss function to all examples, and then use the inferred probabilities as a class relevance measure, effectively cleaning the data.
41
+
42
+ Our counter-intuitive objective of treating all noisy examples as negative can be compared to treating each example as a different class in instance-level discrimination (Wu et al., 2018). In fact, our loss function is similar to noise-contrastive estimation (NCE) (Gutmann & Hyvärinen, 2010) used in that work. According to our experiments, our GCN-based classifier outperforms classical LP (Zhou et al., 2003a) used for a similar purpose by Rohrbach et al. (2013).
43
+
44
+ # 3 PROBLEM FORMULATION
45
+
46
+ We consider a space $\mathcal { X }$ of examples. We are given a set $X _ { \mathcal { L } } \subset \mathcal { X }$ of examples, each having a clean (manually verified) label in a set $C _ { \mathcal { L } }$ of classes with $| C _ { \mathcal { L } } | = K _ { \mathcal { L } }$ . For any set $X \subset { \mathcal { X } }$ , we denote by $X ^ { c }$ its subset of examples having a label in class $c$ . We assume that the number $| X _ { \mathcal { L } } ^ { c } |$ of examples labeled in each class $c \in C _ { \mathcal { L } }$ is only $k$ , typically in $\{ 1 , 2 , 5 , 1 0 , 2 0 \}$ . We are also given an additional set $X _ { \mathcal { Z } } ^ { c }$ of examples, each with a set of noisy labels in $C _ { \mathcal { L } }$ . The extended set of examples for class $c$ is now $X _ { \mathcal { E } } ^ { c } = X _ { \mathcal { L } } ^ { c } \cup X _ { \mathcal { Z } } ^ { c }$ . Examples or sets of examples having clean (noisy) labels are referred to as clean (noisy) as well. The goal is to train a classifier, using the additional noisy set in order to improve the accuracy compared to only using the small clean set.
47
+
48
+ We assume that we are given a feature extractor $g _ { \theta } : \mathcal { X } \mathbb { R } ^ { d }$ , mapping an example to a $d .$ -dimensional vector. For instance, when examples are images, the feature extractor is typically a convolutional neural network (CNN) and $\theta$ are the parameters of all layers.
49
+
50
+ In this work, we assume that the noisy set $X z$ is collected via web crawling with examples that are images accompanied with free-form text description and/or user tags originating from community photo collections. To make use of text data, we assume that the names of classes in $C _ { \mathcal { L } }$ are given. An example in $X z$ is given a label in class $c \in C _ { \mathcal { L } }$ if its textual information contains the name of class $c$ ; it may then have none, one or more labels. In this way, we automatically infer labels for $X z$ without human effort, which are however noisy.
51
+
52
+ We perform cleaning by predicting a class relevance measure for each noisy example in $X _ { \mathcal { Z } } ^ { c }$ , independently per class $c \in C _ { \mathcal { L } }$ . To simplify notation, we drop superscript $c$ where possible in this subsection and we denote $X _ { \mathcal { E } } ^ { c }$ by $\left\{ x _ { 1 } , \ldots , x _ { k } , x _ { k + 1 } , \ldots , x _ { N } \right\}$ , where $X _ { \mathcal { L } } ^ { c } ~ = ~ \{ \bar { x _ { 1 } } , \ldots , x _ { k } \}$ and $X _ { \mathcal { Z } } ^ { c } = \{ x _ { k + 1 } , \ldots , x _ { N } \}$ . The features of these examples are similarly represented by matrix $V = [ \ b { \mathrm { v } } _ { 1 } , \ b { \mathrm { ~ . ~ . ~ . ~ } } , \ b { \mathrm { v } } _ { k } , \ b { \mathrm { v } } _ { k + 1 } , \ b { \mathrm { ~ . ~ . ~ . ~ } } , \ b { \mathrm { v } } _ { N } ] \in \mathbb { R } ^ { d \times N }$ , where $\mathbf { v } _ { i } = g _ { \theta } ( x _ { i } )$ for $i = 1 , \ldots , N$ .
53
+
54
+ We construct an affinity matrix $A \in \mathbb { R } ^ { N \times N }$ with elements $a _ { i j } = [ \mathbf { v } _ { i } ^ { \top } \mathbf { v } _ { j } ] _ { + }$ if examples $\mathbf { v } _ { i }$ and $\mathbf { v } _ { j }$ are reciprocal nearest neighbors in $X _ { \mathcal { E } } ^ { c }$ and 0 otherwise. Matrix $A$ has zero diagonal, but self-connections are added and then $A$ is normalized as $\tilde { A } = D ^ { - 1 } ( A + I )$ with $D = \mathrm { d i a g } ( ( A + I ) \mathbf { 1 } )$ being the degree matrix of $A + I$ and 1 the all-ones vector.
55
+
56
+ Graph convolutional networks (GCNs) (Kipf & Welling, 2017) are formed by a sequence of layers. Each layer is a function $f _ { \Theta } : \mathbb { R } ^ { \hat { N } \times N } \times \mathbb { R } ^ { l \times \hat { N } } \mathbb { R } ^ { n \times \hat { N } }$ of the form
57
+
58
+ $$
59
+ f _ { \Theta } ( \tilde { A } , Z ) = h ( \Theta ^ { \top } Z \tilde { A } ) ,
60
+ $$
61
+
62
+ where $Z \in \mathbb { R } ^ { l \times N }$ represents the input features, $\boldsymbol { \Theta } \in \mathbb { R } ^ { l \times n }$ holds the parameters of the layer to be learned, and $h$ is a nonlinear activation function. Function $f _ { \Theta }$ maps $l$ -dimensional input features to $n$ -dimensional output features.
63
+
64
+ In this work we consider a two layer GCN with a scalar output per example. This network is a function $F _ { \Theta } : \mathbb { R } ^ { N \times N } \times \mathbb { R } ^ { d \times N } \bar { \mathbb { R } } ^ { N }$ given by
65
+
66
+ $$
67
+ F _ { \Theta } ( \tilde { A } , V ) = \sigma ( \Theta _ { 2 } ^ { \top } [ \Theta _ { 1 } ^ { \top } V \tilde { A } ] _ { + } \tilde { A } ) ,
68
+ $$
69
+
70
+ where $\Theta = \{ \Theta _ { 1 } , \Theta _ { 2 } \}$ , $\Theta _ { 1 } \in \mathbb { R } ^ { d \times m }$ , $\Theta _ { 2 } \in \mathbb { R } ^ { m \times 1 }$ , $[ \cdot ] _ { + }$ is the positive part or ReLU function (Nair & Hinton, 2010) and $\bar { \sigma ( } x ) = ( 1 + e ^ { - x } ) ^ { - 1 }$ for $x \in \mathbb { R }$ is the sigmoid function. Function $F _ { \Theta }$ performs feature propagation through the affinity matrix in an analogy to classical graph-based propagation methods for classification (Zhou et al., 2003a) or search (Zhou et al., 2003b).
71
+
72
+ The output $F _ { \Theta } ( \tilde { A } , V )$ is a vector of length $N$ , with element $F _ { \Theta } ( { \tilde { A } } , V ) _ { i }$ in $[ 0 , 1 ]$ representing a relevance value of example $x _ { i }$ for class $c$ . To learn the parameters $\Theta$ , we treat the GCN as a binary classifier where target output 1 corresponds to clean examples and 0 to noisy. In particular, we minimize the loss function
73
+
74
+ $$
75
+ L _ { \mathcal { G } } ( V , \tilde { A } ; \Theta ) = - \frac { 1 } { k } \sum _ { i = 1 } ^ { k } \log \left( F _ { \Theta } ( \tilde { A } , V ) _ { i } \right) - \frac { \lambda } { N - k } \sum _ { i = k + 1 } ^ { N } \log \left( 1 - F _ { \Theta } ( \tilde { A } , V ) _ { i } \right) .
76
+ $$
77
+
78
+ This is a binary cross-entropy loss function where noisy examples are given an importance weight $\lambda$ . Given the propagation on the nearest neighbor graph, and depending on the relative importance $\lambda$ of the second term, noisy examples that are strongly connected to clean ones are still expected to receive high class relevance, while noisy examples that are not relevant to the current class are expected to get a class relevance near zero.
79
+
80
+ The impact of parameter $\lambda$ is validated in Section 6, where we show that the fewer the available clean images are (smaller $k$ ) the smaller the importance weight should be. As is standard practice for GCNs in classification (Kipf & Welling, 2017), training is performed in batches of size $N$ , that is the entire set of features.
81
+
82
+ Figure 2 shows examples of clean images, corresponding noisy ones and the predicted relevance. Thanks to the visual similarity to the clean image, we can use relevance to resolve cases of polysemy, e.g. black widow (spider) vs. black widow (superhero), or cases like pineapple vs. pineapple juice.
83
+
84
+ Discussion. Loss function (3) is similar to noise-contrastive estimation (NCE) (Gutmann & Hyvärinen, 2010) as used by Wu et al. (2018) for instance-level discrimination, whereas we discriminate clean from noisy examples. The semi-supervised learning setup of GCNs (Kipf & Welling, 2017) uses a loss function that applies only to the labeled examples, and makes discrete predictions on unlabeled examples. In our case, all examples contribute to the loss but with different importance, while we infer real-valued class relevance for the noisy examples, to be used for subsequent learning.
85
+
86
+ Function $F _ { \Theta }$ in (2) reduces to a Multi-Layer Perceptron (MLP) when the affinity matrix $A$ is zero, in which case all examples are disconnected. Using an MLP to perform cleaning would take each example into account independently of the others, while the GCN considers the collection of examples as a whole. MLP training is performed identically to GCN by minimizing (3). We compare the two alternatives in our experiments.
87
+
88
+ ![](images/d562245fb1728f832564e87b5ff05688b13eb6f98c403180ec263fd140ddad27.jpg)
89
+ Figure 2: Examples of clean images (left) for 1-shot classification, cumulative histogram of the predicted relevance for noisy images (middle), and representative noisy images (right), each having its position in the (descending) ranked list according to relevance and relevance value reported below. Test accuracy without and with additional data using class prototypes (6) is shown next to class names.
90
+
91
+ # 5 LEARNING A CLASSIFIER WITH FEW CLEAN AND MANY NOISY EXAMPLES
92
+
93
+ Our cleaning process applies when the clean labeled examples are few, but assumes a feature extractor $g _ { \theta }$ . That is, representation learning, label cleaning and classifier learning are decoupled. We follow few-shot learning in that we learn the representation by supervised classification on a set of base classes, obtaining $g _ { \theta }$ , and then solving new classification tasks on a distinct set of novel classes. In these new tasks, we assume few clean and many noisy labels as specified in Section 3, perform GCN-based cleaning as described in Section 4, and learn a classifier by weighing examples according to class relevance. Representation and classifier learning are described below.
94
+
95
+ # 5.1 COSINE-SIMILARITY BASED CLASSIFIER
96
+
97
+ We use a cosine-similarity based classifier (Gidaris & Komodakis, 2018; Qi et al., 2018), or cosine classifier for short. Given classes $C$ with $| C | = K$ , each class $c \in C$ is represented by a learnable parameter $\mathbf { w } _ { c } \in \mathbb { R } ^ { d }$ . The prediction of example $x \in \mathcal { X }$ is the class $c$ of maximum cosine similarity $\hat { \mathbf { w } } _ { c } ^ { \top } \hat { g } _ { \boldsymbol { \theta } } ( x ) ^ { 1 }$
98
+
99
+ $$
100
+ \pi _ { \boldsymbol { \theta } , W } ( x ) = \arg \operatorname* { m a x } _ { c } \hat { \mathbf { w } } _ { c } ^ { \top } \hat { g } _ { \boldsymbol { \theta } } ( x ) ,
101
+ $$
102
+
103
+ where $W = [ \mathbf { w } _ { 1 } , \ j . . . , \mathbf { w } _ { K } ] \in \mathbb { R } ^ { d \times K }$ .
104
+
105
+ # 5.2 REPRESENTATION LEARNING: BASE CLASSES
106
+
107
+ We are given a set $X _ { B } \subset { \mathcal { X } }$ of examples, each having a clean label in a set of base classes $C _ { B }$ with $| C _ { B } | = K _ { B }$ . These data are used to learn a feature representation, i.e. a feature extractor $g _ { \theta }$ , by learning a $K _ { B }$ -way base-class classifier for unseen data in $\mathcal { X }$ . The parameters $\theta$ of the feature extractor and $W _ { B }$ of the classifier are jointly learned by minimizing the cross entropy loss
108
+
109
+ $$
110
+ { \cal L } _ { \mathcal B } ( C _ { \mathcal B } , X _ { \mathcal B } ; \boldsymbol { \theta } , W _ { \mathcal B } ) = - \sum _ { c \in C _ { \mathcal B } } \frac { 1 } { | X _ { \mathcal B } ^ { c } | } \sum _ { x \in X _ { \mathcal B } ^ { c } } \log ( \sigma ( s \hat { W } _ { \mathcal B } ^ { \top } \hat { g } _ { \boldsymbol \theta } ( x ) ) _ { c } ) ,
111
+ $$
112
+
113
+ where $\sigma : \mathbb { R } ^ { K } \mathbb { R } ^ { K }$ is the softmax function with $\pmb { \sigma } ( \mathbf { a } ) _ { c } = e ^ { a _ { c } } / \sum _ { j \in C } e ^ { a _ { j } }$ for $\mathbf { a } \in \mathbb { R } ^ { K }$ , $s$ is a learnable scale parameter and $\hat { W } _ { \mathcal { B } } = [ \hat { \mathbf { w } } _ { 1 } , \hdots , \hat { \mathbf { w } } _ { K _ { \mathcal { B } } } ] \in \mathbb { R } ^ { d \times K _ { \mathcal { B } } }$ . Learning and inference are
114
+
115
+ performed on base classes by $L _ { B } ( C _ { B } , X _ { B } ; \theta , W _ { B } )$ (5) and $\pi _ { \boldsymbol { \theta } , W _ { B } }$ (4), respectively. As a result, learned feature extractor parameters $\theta$ are used for base or novel classes, while the classifier parameters $W _ { B }$ can be used for base class or all-class classification, as discussed below.
116
+
117
+ # 5.3 NEW CLASSIFICATION TASKS: NOVEL OR ALL CLASSES
118
+
119
+ Each new task is related to a set of novel classes $C _ { \mathcal { L } }$ , disjoint from $C _ { B }$ . The goal is to learn a $K _ { \mathcal { L } }$ -way novel-class classifier or a $K _ { A }$ -way classifier on all classes $C _ { A } = C _ { B } \cup C _ { \mathcal { L } }$ for unseen data in $\mathcal { X }$ , where $K _ { \mathcal { A } } = K _ { B } + K _ { \mathcal { L } }$ . Unlike the typical few-shot learning task, each novel class contains few clean and many noise examples.
120
+
121
+ Prior to learning classifiers for novel classes, training examples $x _ { i } \in X _ { \mathcal { Z } } ^ { c }$ are weighted by their relevance $r ( x _ { i } )$ to class $c$ . For a noisy example $x _ { i } \in X _ { \mathcal { E } } ^ { c }$ , we define $r ( x _ { i } ) = F _ { \Theta } ( \tilde { A } , V ) _ { i }$ where $F _ { \Theta } ( \tilde { A } , V )$ is the output vector of the GCN, while for a clean example $x _ { i } \in X _ { \mathcal { L } } ^ { c }$ we fix $r ( x _ { i } ) = 1$ Note that optimizing (3) does not guarantee $F _ { \Theta } ( \tilde { A } , V ) _ { i } = 1$ for clean examples $x _ { i } \in X _ { \mathcal { L } } ^ { c }$ . We define $\textstyle r ( X ) = \sum _ { x \in X } r ( x )$ for any set $X \subset { \mathcal { X } }$ .
122
+
123
+ We first assume that we no longer have access to examples of base classes in new classification tasks and consider two different classifiers, class prototypes and cosine-similarity based classifier. Then, this assumption is dropped and the classifier and feature representation are learned jointly by fine-tuning the entire network.
124
+
125
+ Class prototypes. For each novel class $c \in C _ { \mathcal { L } }$ , we define prototype ${ \bf w } _ { c }$ by
126
+
127
+ $$
128
+ \mathbf { w } _ { c } = \frac { 1 } { r ( X _ { \mathcal { E } } ^ { c } ) } \sum _ { x \in X _ { \mathcal { E } } ^ { c } } r ( x ) g _ { \theta } ( x ) .
129
+ $$
130
+
131
+ Prototypes are fixed vectors, not learnable parameters. Collecting them into matrix $\begin{array} { r l } { W _ { \mathcal { L } } } & { { } = } \end{array}$ $[ \mathbf { w } _ { 1 } , \dots , \mathbf { w } _ { K _ { \mathcal { L } } } ] \in \mathbb { R } ^ { d \times K _ { \mathcal { L } } }$ , $K _ { \mathcal { L } }$ -way prediction on novel classes is made by classifier $\pi _ { \boldsymbol { \theta } , W _ { \mathcal { L } } }$ (4), while $K _ { A }$ -way prediction on all (base and novel) classes by $\pi _ { \boldsymbol { \theta } , W _ { A } }$ , where $W _ { \mathcal { A } } = [ W _ { B } , W _ { \mathcal { L } } ]$ and $W _ { B }$ is learned according to $L _ { B } ( C _ { B } , X _ { B } ; \theta , W _ { B } )$ (5) and then kept fixed.
132
+
133
+ Cosine classifier learning. Similarly to Section 5.2, given clean and noisy novel-class examples $X _ { \mathcal { E } }$ , we learn a parametric cosine classifier with parameters $W _ { \mathcal { L } } = [ \mathbf { w } _ { 1 } , \dots , \mathbf { w } _ { K _ { \mathcal { L } } } ] \in \mathbb { R } ^ { d \times K _ { \mathcal { L } } }$ by minimizing the weighted cross entropy loss $L _ { \mathcal { L } } ( C _ { \mathcal { L } } , X _ { \mathcal { E } } ; \theta , W _ { \mathcal { L } } )$ over $W _ { \mathcal { L } }$ , where
134
+
135
+ $$
136
+ L _ { \mathcal { L } } ( C _ { \mathcal { L } } , X _ { \mathcal { E } } ; \theta , W _ { \mathcal { L } } ) = - \sum _ { c \in C _ { \mathcal { L } } } \frac { 1 } { r ( X _ { \mathcal { E } } ^ { c } ) } \sum _ { x \in X _ { \mathcal { E } } ^ { c } } r ( x ) \log ( \sigma ( s \hat { W } _ { \mathcal { L } } ^ { \top } \hat { g } _ { \theta } ( x ) ) _ { c } ) ,
137
+ $$
138
+
139
+ while the parameters $\theta$ of the feature extractor are fixed. The scale parameter $s$ is also fixed to the value obtained during base class learning. Prediction on novel only or all classes is then made as in the previous case.
140
+
141
+ Deep network fine-tuning. We now drop the assumption that base class examples are not accessible and, given all examples $X _ { \mathcal { A } } = X _ { \mathcal { B } } \cup X _ { \mathcal { E } }$ , we jointly learn the parameters $\theta$ of the feature extractor and $W _ { \mathcal { A } } = ( W _ { B } , W _ { \mathcal { L } } )$ of the $K _ { A }$ -way cosine classifier for all classes by minimizing loss function
142
+
143
+ $$
144
+ L _ { A } ( C _ { A } , X _ { A } ; \theta , W _ { A } ) = L _ { B } ( C _ { B } , X _ { B } ; \theta , W _ { B } ) + L _ { \mathcal { L } } ( C _ { \mathcal { L } } , X _ { \mathcal { E } } ; \theta , W _ { \mathcal { L } } ) .
145
+ $$
146
+
147
+ Note that, due to overfitting on the few available examples, such learning is avoided in a few-shot learning setup. In a few cases, it takes the form of fine-tuning including all base class data (Qi et al., 2018), or only lasts for a few iterations when the base class data is not accessible (Finn et al., 2017).
148
+
149
+ # 6 EXPERIMENTS
150
+
151
+ # 6.1 EXPERIMENTAL SETUP
152
+
153
+ Datasets and task setup. We extend the Low-Shot ImageNet benchmark introduced by Hariharan & Girshick (2017) by assuming many noisy examples for novel classes, in addition to the few clean ones. In this benchmark, the 1000 ImageNet classes (Russakovsky et al., 2015) are split into 389 base classes and 611 novel classes. The validation set contains 193 base and 300 novel classes, and the test set the remaining 196 base and 311 novel classes. The standard benchmark includes $k$ -shot classification, i.e. classification on $k$ clean examples per class, which we extend to $k$ clean and many noisy examples per class, with $k \in \{ 1 , 2 , 5 , 1 0 , 2 0 \}$ . Similar to Hariharan & Girshick (2017) we perform 5 tasks, each drawing a subset of $k$ clean examples per class. We report the average top-5 accuracy over the 5 tasks on novel or all classes of the test set.
154
+
155
+ We use the YFCC100M dataset (Thomee et al., 2016) as a source for additional data with noisy labels. It contains approximatively 100M images collected from Flickr. Each image comes with a text description obtained from the user title and caption. We use the text description to obtain images with noisy labels. as discussed in Section 3. This process results in very different numbers of additional examples per class, with a minimum of zero for classes maillot and missile, and a maximum of 620,142 for class church/church building.
156
+
157
+ Representation and classifier learning. In most experiments, we use ResNet-10 (He et al., 2016) as feature extractor as in Gidaris & Komodakis (2018). Classification for novel classes is performed with class prototypes (6), cosine classifier learning (7) or deep network fine-tuning (8). Hyper-parameters such as batch size and number of epochs, are tuned on the validation set. Possible values are 2048, 4096, and 8192 for batchsize and 10, 30 and 50 for number of epochs. The learning rate starts from 0.1 and is reduced to 0.001 at the end of training with cosine annealing (Loshchilov & Hutter, 2017).
158
+
159
+ We handle the imbalance of the noisy set by normalizing by $r ( X _ { c } )$ in (7). Prototypes (6) are used to initialize $W _ { \mathcal { L } }$ of cosine classifier in (7), and the learned $W _ { \mathcal { L } }$ is used to initialize the corresponding part of $W _ { A }$ when fine-tuning the network by (8). In the latter case, we train all layers for 10 epochs with learning rate 0.01. We ignore examples $x _ { i }$ with relevance $r ( x _ { i } ) < 0 . 1$ to reduce the complexity when fine-tuning the network.
160
+
161
+ We also report results with ResNet-50 as feature extractor, using the model trained on base classes by Hariharan & Girshick (2017). Following Douze et al. (2018), we apply PCA to the features to reduce their dimensionality to 256. Base classes are represented by class prototypes (6) in this case.
162
+
163
+ GCN training is performed with Adam optimizer and a learning rate of 0.1 for 100 iterations. We use dropout with probability 0.5. The dimensionality of the input descriptors is $d = 5 1 2$ for ResNet-10 and $d = 2 5 6$ for ResNet-50 (after PCA). Dimensionality of the internal representation in (1) is $m = 1 6$ . The affinity matrix is constructed with reciprocal top-50 nearest neighbors.
164
+
165
+ Baselines. We implement and evaluate several baseline methods. $\beta$ -cleaning assigns $r ( x _ { i } ) = \beta$ to all additional examples. We report results for $\beta = 1 . 0$ (unit relevance score) and $\beta ^ { * }$ , the optimal $\beta$ for all $k$ obtained on the validation set. $M L P$ , discussed in Section 4, learns a nonlinear mapping to assign relevance, but does not propagate over the graph. Label Propagation (LP) (Zhou et al., 2003a) propagates information by a linear operation. It solves the linear system $( I - \alpha D ^ { - 1 / 2 } A D ^ { - 1 / 2 } ) \mathbf { r } _ { c } =$ $\mathbf { y } _ { c }$ (Iscen et al., 2017) for each class $c$ , where $D$ is the degree matrix of $A$ , $\alpha = 0 . 9$ and $\mathbf { y } _ { c } \in \mathbb { R } ^ { N }$ is a $k$ -hot binary vector indicating the labeled examples of class $c$ . Relevance $r ( x _ { i } )$ is then the $i$ -th element $( \mathbf { r } _ { c } ) _ { i }$ of the solution.
166
+
167
+ # 6.2 EXPERIMENTAL RESULTS
168
+
169
+ The impact of importance weight $\lambda$ is measured on the validation set and the best performing value is used on the test set for each value of $k$ . Results are shown in Appendix A. The larger the value of $\lambda$ , the more the loss encourages noisy examples to be classified as negatives. As a consequence, large (small) $\lambda$ results in smaller (larger) relevance, on average, for noisy examples. The optimal $\lambda$ per value of $k$ suggests that the fewer the clean examples the larger the need for additional ones.
170
+
171
+ Comparison with baselines using additional data is presented in Table 1. The use of additional data is mostly harmful for $\beta$ -weighting except for 1 and 2-shot. MLP offers improvements in most cases, implying that it manages to appropriately downweigh irrelevant examples. The consistent improvement of our method compared to MLP, especially large for small $k$ , suggests that it is beneficial to incorporate relations, with the affinity matrix $A$ modeling the structure of the feature space. LP is a classic approach that also uses $A$ but is a linear operation with no parameters, and is inferior to our method. The gain of cleaning ( $\beta = 1$ vs. ours) ranges from $11 \%$ to $20 \%$ .
172
+
173
+ Table 1: Comparison with baselines using noisy examples. We report top-5 accuracy on novel classes with classification by class prototypes (6).
174
+
175
+ <table><tr><td>Method</td><td>k=1</td><td>2</td><td>5</td><td>10</td><td>20</td></tr><tr><td colspan="6">FEW CLEAN EXAMPLES</td></tr><tr><td>Class proto.Gidaris &amp; Komodakis (2018)</td><td>45.3±0.65</td><td>57.1±0.37</td><td>69.3±0.32</td><td>74.8±0.20</td><td>77.8±0.24</td></tr><tr><td colspan="6">FEW CLEAN &amp; MANY NOISY EXAMPLES</td></tr><tr><td>β-weighting,β=1</td><td>56.1±0.06</td><td>56.4±0.08</td><td>57.1±0.05</td><td>57.7±0.08</td><td>58.7±0.06</td></tr><tr><td>β-weighting,β*</td><td>55.6±0.24</td><td>58.3±0.14</td><td>63.4±0.25</td><td>67.5±0.34</td><td>71.0±0.22</td></tr><tr><td>Label Propagation Zhou et al. (2003a)</td><td>62.6±0.35</td><td>67.0±0.41</td><td>74.6±0.30</td><td>76.3±0.23</td><td>77.7±0.18</td></tr><tr><td>MLP</td><td>63.6±0.41</td><td>68.8±0.42</td><td>73.9±0.25</td><td>75.6±0.21</td><td>77.6±0.21</td></tr><tr><td>Ours</td><td>67.8±0.10</td><td>70.9±0.30</td><td>73.7±0.17</td><td>76.1±0.12</td><td>78.2±0.14</td></tr></table>
176
+
177
+ <table><tr><td>METHOD</td><td colspan="4">NoVEL CLASSES</td><td colspan="5">ALL CLASSES</td></tr><tr><td>k=1</td><td>2</td><td>5</td><td>10</td><td>20</td><td>k=1</td><td>2</td><td>5</td><td>10</td><td>20</td></tr><tr><td colspan="10">RESNET-10 -FEW CLEAN EXAMPLES</td></tr><tr><td>Proto.-Nets (Snell et al., 2017)</td><td>39.3</td><td>54.4 66.3</td><td>71.2</td><td>73.9</td><td>49.5</td><td>61.0</td><td>69.7</td><td>72.9</td><td>74.6</td></tr><tr><td>Logistic reg.w/H(Wang et al.,2018b)</td><td>40.7</td><td>50.8 62.0</td><td>69.3</td><td>76.5</td><td>52.2</td><td>59.4</td><td>67.6</td><td>72.8</td><td>76.9</td></tr><tr><td>PMN w/H(Wang et al., 2018b)</td><td>45.8</td><td>57.8 69.0</td><td>74.3</td><td>77.4</td><td>57.6</td><td>64.7</td><td>71.9</td><td>75.2</td><td>77.5</td></tr><tr><td>Class proto.(Gidaris &amp; Komodakis,2018)</td><td></td><td></td><td>45.3±0.6557.1±0.37 69.3±0.32 74.8±0.20 77.8±0.24</td><td></td><td></td><td></td><td></td><td></td><td>57.0±0.3664.7±0.1672.5±0.1875.8±0.1677.4±0.19 58.1±0.4865.2±0.15 72.9±0.25 76.6±0.18 78.8±0.16</td></tr><tr><td colspan="10">Class proto.w/At.(Gidaris&amp; Komodakis,2018) 45.8±0.74 57.4±0.38 69.6±0.27 75.0±0.29 78.2±0.23</td></tr><tr><td></td><td></td><td></td><td>RESNET-1O -FEW CLEAN&amp; MANY NOISY EXAMPLES</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Ours -class proto.(6) Ours-cosine (7)</td><td></td><td></td><td>67.8±0.10 70.9±0.30 73.7±0.20 76.1±0.16 78.2±0.14</td><td></td><td></td><td></td><td></td><td></td><td>70.3±0.05 72.1±0.18 74.1±0.12 75.6±0.13 76.9±0.09</td></tr><tr><td>Ours - fine-tune (8)</td><td></td><td>73.2±0.14 75.3±0.25 75.6±0.24 78.5±0.32 80.7±0.26 74.6±0.13 76.6±0.26 78.2±0.23 80.9±0.34 82.9±0.20</td><td></td><td></td><td></td><td></td><td></td><td></td><td>71.9±0.0774.0±0.2376.5±0.1678.3±0.2380.2±0.18 76.0±0.1077.3±0.1378.7±0.1980.7±0.2582.2±0.14</td></tr><tr><td colspan="10">RESNET-50 - FEW CLEAN EXAMPLES</td></tr><tr><td>Proto.-Nets (Snell et al., 2017)</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>PMN w/H(Wang et al.,2018b)</td><td>49.6 64.0 54.7 66.8</td><td>74.4 77.4</td><td>78.1 81.4</td><td>80.0 83.8</td><td>61.4 65.7</td><td>71.4 73.5</td><td>78.0 80.2</td><td>80.0 82.8</td><td>81.1 84.5</td></tr><tr><td colspan="10">RESNET-5O-FEW CLEAN&amp;MANYUNLABELED EXAMPLES</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Diffusion (Douze et al., 2018) Diffusion -logistic (Douze et al.,2018)</td><td></td><td></td><td>63.6±0.61 69.5±0.60 75.2±0.40 78.5±0.34 80.8±0.18</td><td></td><td></td><td>=</td><td>-</td><td></td><td></td></tr><tr><td colspan="10">64.0±0.7071.1±0.82 79.7±0.3883.9±0.10 86.3±0.17 RESNET-5O-FEWCLEAN&amp;MANY NOISY EXAMPLES</td></tr><tr><td>Ours - class proto.(6)</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Ours - cosine (7)</td><td></td><td>78.0±0.38 80.2±0.3380.9±0.17 83.7±0.1985.7±0.11</td><td>69.7±0.44 73.7±0.56 77.0±0.20 79.9±0.30 81.9±0.29</td><td></td><td></td><td>77.6±0.26 79.1±0.20 79.9±0.09 82.1±0.22 83.8±0.11</td><td></td><td></td><td>73.8±0.33 76.6±0.36 78.9±0.19 80.8±0.21 82.2±0.14</td></tr><tr><td>Ours - fine-tune (8)</td><td>80.8±0.25 83.0±0.23 83.8±0.39 86.4±0.23 88.5±0.20</td><td></td><td></td><td></td><td></td><td>81.6±0.20 83.2±0.16 84.3±0.23 86.2±0.17 87.8±0.03</td><td></td><td></td><td></td></tr></table>
178
+
179
+ Table 2: Comparison to the state of the art on the Low-shot ImageNet benchmark. We report top-5 accuracy on novel and all classes. We use class prototypes (6), cosine classifier learning (7) and deep network fine-tuning (8) for classification with our GCN-based data addition method.
180
+
181
+ Comparison with the state of the art is presented in Table 2. We significantly improve the performance by using additional data and cleaning compared to a number of different approaches, including the work by Gidaris & Komodakis (2018), which is our starting point. As expected, the gain is more pronounced for small $k$ , reaching more than $20 \%$ improvement for 1-shot novel accuracy.
182
+
183
+ Closest to ours is the work of Douze et al. (2018), who use the same experimental setup and the same additional data, but without filtering by text and using noisy labels. We outperform their approach in all cases, while requiring much less computation: offline, we construct a separate small graph per class rather than a single graph over the entire 100M collection; online, we perform inference by cosine similarity to one prototype per class or a learned classifier rather than iterative diffusion on the entire collection. Note that by ignoring examples that are not given any noisy label, we are only using a tiny fraction of the 100M collection: in particular, only 3,744,994 images for the 311-class test split of the Low-shot ImageNet benchmark. In contrast to Douze et al. (2018), additional data brings improvement even at 20-shot with classifier learning or network fine-tuning. Most importantly, our approach does not require the entire 100M collection at inference.
184
+
185
+ # 7 CONCLUSIONS
186
+
187
+ In this paper we have introduced a new method for assigning class relevance to noisy images obtained by textual queries with class names. Our approach leverages one or a few labeled images per class and relies on a graph convolutional network (GCN) to propagate visual information from the labeled images to the noisy ones. The GCN is a binary classifier discriminating clean from noisy examples using a weighted binary cross-entropy loss function and inferring “clean” probability as a relevance measure for that class. Experimental results show that using noisy images weighted by this relevance measure significantly improves the classification accuracy.
188
+
189
+ # REFERENCES
190
+
191
+ Michael M Bronstein, Joan Bruna, Yann LeCun, Arthur Szlam, and Pierre Vandergheynst. Geometric deep learning: going beyond euclidean data. IEEE Signal Processing Magazine, 34(4):18–42, 2017.
192
+
193
+ Joan Bruna, Wojciech Zaremba, Arthur Szlam, and Yann Lecun. Spectral networks and locally connected networks on graphs. In ICLR, 2014.
194
+
195
+ Wei-Yu Chen, Yen-Cheng Liu, Zsolt Kira, Yu-Chiang Frank Wang, and Jia-Bin Huang. A closer look at few-shot classification. ICLR, 2019.
196
+
197
+ Michaël Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on graphs with fast localized spectral filtering. In NeurIPS, 2016.
198
+
199
+ Matthijs Douze, Arthur Szlam, Bharath Hariharan, and Hervé Jégou. Low-shot learning with large-scale diffusion. In CVPR, 2018.
200
+
201
+ Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In ICML, 2017.
202
+
203
+ Chelsea Finn, Kelvin Xu, and Sergey Levine. Probabilistic model-agnostic meta-learning. In NeurIPS, 2018.
204
+
205
+ Victor Garcia and Joan Bruna. Few-shot learning with graph neural networks. In ICLR, 2018.
206
+
207
+ Spyros Gidaris and Nikos Komodakis. Dynamic few-shot visual learning without forgetting. In CVPR, 2018.
208
+
209
+ Spyros Gidaris and Nikos Komodakis. Generating classification weights with gnn denoising autoencoders for few-shot learning. In CVPR, 2019.
210
+
211
+ Michael Gutmann and Aapo Hyvärinen. Noise-contrastive estimation: A new estimation principle for unnormalized statistical models. In International Conference on Artificial Intelligence and Statistics, 2010.
212
+
213
+ Bharath Hariharan and Ross Girshick. Low-shot visual recognition by shrinking and hallucinating features. In CVPR, 2017.
214
+
215
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
216
+
217
+ Mikael Henaff, Joan Bruna, and Yann LeCun. Deep convolutional networks on graph-structured data. arXiv preprint arXiv:1506.05163, 2015.
218
+
219
+ Ahmet Iscen, Giorgos Tolias, Yannis Avrithis, Teddy Furon, and Ondrej Chum. Efficient diffusion on region manifolds: Recovering small objects with compact cnn representations. In CVPR, 2017.
220
+
221
+ Armand Joulin, Laurens van der Maaten, Allan Jabri, and Nicolas Vasilache. Learning visual features from large weakly supervised data. In ECCV, 2016.
222
+
223
+ Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017.
224
+
225
+ Kuang-Huei Lee, Xiaodong He, Lei Zhang, and Linjun Yang. CleanNet: Transfer learning for scalable image classifier training with label noise. In CVPR, 2018.
226
+
227
+ Yuncheng Li, Jianchao Yang, Yale Song, Liangliang Cao, Jiebo Luo, and Li-Jia Li. Learning from noisy labels with distillation. In ICCV, 2017.
228
+
229
+ Tongliang Liu and Dacheng Tao. Classification with noisy labels by importance reweighting. IEEE Trans. PAMI, 38(3), 2015.
230
+
231
+ Yanbin Liu, Juho Lee, Minseop Park, Saehoon Kim, Eunho Yang, Sung Ju Hwang, and Yi Yang. Learning to propagate labels: Transductive propagation network for few-shot learning. In ICLR, 2019.
232
+
233
+ Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. ICLR, 2017.
234
+
235
+ Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. In ICML, 2010.
236
+
237
+ Nagarajan Natarajan, Inderjit S Dhillon, Pradeep K Ravikumar, and Ambuj Tewari. Learning with noisy labels. In NeurIPS, 2013.
238
+
239
+ Giorgio Patrini, Alessandro Rozza, Aditya Krishna Menon, Richard Nock, and Lizhen Qu. Making deep neural networks robust to label noise: A loss correction approach. In CVPR, 2017.
240
+
241
+ Hang Qi, Matthew Brown, and David G. Lowe. Low-shot learning with imprinted weights. In CVPR, June 2018.
242
+
243
+ Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. In ICLR, 2017.
244
+
245
+ Scott Reed, Honglak Lee, Dragomir Anguelov, Christian Szegedy, Dumitru Erhan, and Andrew Rabinovich. Training deep neural networks on noisy labels with bootstrapping. ICLR, 2015.
246
+
247
+ Mengye Ren, Sachin Ravi, Eleni Triantafillou, Jake Snell, Kevin Swersky, Josh B. Tenenbaum, Hugo Larochelle, and Richard S. Zemel. Meta-learning for semi-supervised few-shot classification. In ICLR, 2018a.
248
+
249
+ Mengye Ren, Wenyuan Zeng, Bin Yang, and Raquel Urtasun. Learning to reweight examples for robust deep learning. In ICML, 2018b.
250
+
251
+ Marcus Rohrbach, Sandra Ebert, and Bernt Schiele. Transfer learning in a transductive setting. In NeurIPS, 2013.
252
+
253
+ 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. IJCV, 115(3), 2015.
254
+
255
+ Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In NeurIPS, 2017.
256
+
257
+ Sainbayar Sukhbaatar, Joan Bruna, Manohar Paluri, Lubomir Bourdev, and Rob Fergus. Training convolutional networks with noisy labels. arXiv preprint arXiv:1406.2080, 2014.
258
+
259
+ Bart Thomee, David A. Shamma, Gerald Friedland, Benjamin Elizalde, Karl Ni, Douglas Poland, Damian Borth, and Li-Jia Li. Yfcc $1 0 0 \mathrm { m }$ : The new data in multimedia research. Commun. ACM, 59(2), 2016.
260
+
261
+ Andreas Veit, Neil Alldrin, Gal Chechik, Ivan Krasin, Abhinav Gupta, and Serge Belongie. Learning from noisy large-scale datasets with minimal supervision. In CVPR, July 2017.
262
+
263
+ Ricardo Vilalta and Youssef Drissi. A perspective view and survey of meta-learning. Artificial intelligence review, 18(2):77–95, 2002.
264
+
265
+ Oriol Vinyals, Charles Blundell, Tim Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In NeurIPS, 2016.
266
+
267
+ Xiaolong Wang and Abhinav Gupta. Unsupervised learning of visual representations using videos. In CVPR, 2015.
268
+
269
+ Yisen Wang, Weiyang Liu, Xingjun Ma, James Bailey, Hongyuan Zha, Le Song, and Shu-Tao Xia. Iterative learning with open-set noisy labels. In CVPR, 2018a.
270
+
271
+ Yu-Xiong Wang, Ross Girshick, Martial Hebert, and Bharath Hariharan. Low-shot learning from imaginary data. In CVPR, 2018b.
272
+
273
+ Jason Weston, Frédéric Ratle, and Ronan Collobert. Deep learning via semi-supervised embedding. In ICML, 2008.
274
+
275
+ Zhirong Wu, Yuanjun Xiong, Stella Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance-level discrimination. CVPR, 2018.
276
+
277
+ Dengyong Zhou, Olivier Bousquet, Thomas Navin Lal, Jason Weston, and Bernhard Schölkopf. Learning with local and global consistency. In NeurIPS, 2003a.
278
+
279
+ Dengyong Zhou, Jason Weston, Arthur Gretton, Olivier Bousquet, and Bernhard Schölkopf. Ranking on data manifolds. In NeurIPS, 2003b.
280
+
281
+ ![](images/d75584f0f38734e1f60b1588c31cd97d99ef2d5781c2f1c3f7deaf0d2182f12d.jpg)
282
+ Figure 3: (a) Number of additional images per class $c$ sampled from YFCC-100M for all novel classes of Low-Shot ImageNet. (b) Number of classes per group, when $| X _ { \mathcal { Z } } ^ { c } |$ is sampled logarithmically into groups. (c) Accuracy improvement $\Delta$ Acc (difference of accuracy between our method with noisy examples and the baseline without noisy examples) for prototype classifier, for same groups as in (b).
283
+
284
+ # A APPENDIX
285
+
286
+ Noisy data statistics. We present statistics about the noisy examples of novel classes and the improvements of our method per class. Figure 3 (a) shows that the noisy examples for novel classes are long tailed (in log scale). There is a significant number of classes where we end up with less than 1000 extra examples, but we improve nevertheless; see Figure 3 (c). A small exception is 4 very rare classes out of 311, with around 3 additional images per class (leftmost bin in Figure 3 (b) and (c)). Note that in real world applications, one could use more resources like web queries for additional data.
287
+
288
+ Impact of importance weight $\lambda ,$ . We present the impact of $\lambda$ (3) for different values of $k$ in the validation set of the extended Low-shot ImageNet benchmark in Figure 4.
289
+
290
+ ![](images/75723f011baed9f80d3665089fcfcb5e9cf2105defc23b6659f2c9df36dc3084.jpg)
291
+ Figure 4: Impact of $\lambda$ on the validation set of the extended Low-shot ImageNet benchmark with YFCC-100M for noisy examples using class prototypes (6).
parse/train/Bke6vTVYwH/Bke6vTVYwH_content_list.json ADDED
@@ -0,0 +1,1575 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "GRAPH CONVOLUTIONAL NETWORKS FOR LEARNING WITH FEW CLEAN AND MANY NOISY LABELS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 101,
9
+ 823,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
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": "In this work we consider the problem of learning a classifier from noisy labels when a few clean labeled examples are given. The structure of clean and noisy data is modeled by a graph per class and Graph Convolutional Networks (GCN) are used to predict class relevance of noisy examples. For each class, the GCN is treated as a binary classifier learning to discriminate clean from noisy examples using a weighted binary cross-entropy loss function, and then the GCN-inferred “clean” probability is exploited as a relevance measure. Each noisy example is weighted by its relevance when learning a classifier for the end task. We evaluate our method on an extended version of a few-shot learning problem, where the few clean examples of novel classes are supplemented with additional noisy data. Experimental results show that our GCN-based cleaning process significantly improves the classification accuracy over not cleaning the noisy data and standard few-shot classification where only few clean examples are used. The proposed GCN-based method outperforms the transductive approach (Douze et al., 2018) that is using the same additional data without labels. ",
40
+ "bbox": [
41
+ 233,
42
+ 263,
43
+ 766,
44
+ 472
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 496,
55
+ 336,
56
+ 512
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "State-of-the-art deep learning methods require a large amount of manually labeled data. The need for supervision may be reduced by decoupling representation learning from the end task and/or using additional training data that are unlabeled, weakly labeled (with noisy labels), or belong to different domains or classes. Example approaches are transfer learning (Wang & Gupta, 2015), unsupervised representation learning (Wang & Gupta, 2015), semi-supervised learning (Weston et al., 2008), learning from noisy labels (Joulin et al., 2016) and few-shot learning (Snell et al., 2017). ",
63
+ "bbox": [
64
+ 174,
65
+ 526,
66
+ 825,
67
+ 611
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Learning from noisy labels allows using large-scale data and labels from the web without human annotation effort. Most work focuses on learning the representation jointly with the end task, assuming there is still a considerable amount of clean labeled data (Patrini et al., 2017; Lee et al., 2018; Li et al., 2017). However, for a number of classes only very few or even no clean labeled examples might be available at the representation learning stage. Few-shot learning limits the labeled data to very few on the end task, while the representation is learned on a large training set of different classes (Hariharan & Girshick, 2017; Snell et al., 2017; Vinyals et al., 2016). Nevertheless, in many situations, more data with noisy labels are available or can be acquired for the end task. ",
74
+ "bbox": [
75
+ 174,
76
+ 617,
77
+ 825,
78
+ 728
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "One interesting mix of few-shot learning with additional large-scale data is the work of Douze et al. (2018), where labels are propagated from few clean labeled examples to a large-scale collection. This collection is unlabeled and actually contains data of many more classes than the end task. Their method overall improves the classification accuracy, but at an additional computational cost; it is a transductive method, i.e., instead of learning a parametric classifier, the large-scale collection is still necessary at inference. ",
85
+ "bbox": [
86
+ 174,
87
+ 734,
88
+ 825,
89
+ 819
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "In this work, we learn a classifier from few clean labeled examples and additional weakly labeled data, while the representation is learned on different classes, as in few-shot learning. We assume the class names are known, and we use them to search an existing large collection of images with textual description. The result is a set of images with potentially relevant, but noisy labels. As shown in Figure 1, we clean this data using a graph convolutional network (GCN) (Kipf & Welling, 2017), which learns to predict a class relevance score per image based on the source (clean vs. noisy) of its connections in the graph. Both the clean and the noisy images are then used to learn a classifier, where the noisy examples are weighted by relevance. Unlike most existing work, our method operates independently per class and applies when clean labeled examples are few or even one per class. ",
96
+ "bbox": [
97
+ 174,
98
+ 825,
99
+ 825,
100
+ 924
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "image",
106
+ "img_path": "images/7eed9d45df54f8a4f9857ca30afe31d8710a4404ec6cdacce1d0af912c397be2.jpg",
107
+ "image_caption": [
108
+ "Figure 1: Overview of our cleaning approach for 1-shot learning with noisy examples. We use the class name admiral to crawl noisy images from web and create an adjacency graph based on visual similarity. We then assign a relevance score to each noisy example with a graph convolutional network (GCN). Relevance scores are displayed next to the images. "
109
+ ],
110
+ "image_footnote": [],
111
+ "bbox": [
112
+ 204,
113
+ 87,
114
+ 782,
115
+ 228
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "",
122
+ "bbox": [
123
+ 176,
124
+ 311,
125
+ 821,
126
+ 339
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "We make the following contributions: ",
133
+ "bbox": [
134
+ 176,
135
+ 347,
136
+ 419,
137
+ 361
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "• We learn a classifier on a large-scale weakly-labeled collection jointly with only few clean labeled examples. \n• To our knowledge, we are the first to use a GCN to clean noisy data: we cast a GCN as a binary classifier learning to discriminate clean from noisy data, and we use its inferred probabilities for the “clean” class as a relevance score per example. \nWe apply our method to a few-shot learning benchmark and show significant improvement in accuracy, while outperforming the method by Douze et al. (2018) using the same large-scale collection of data. ",
144
+ "bbox": [
145
+ 215,
146
+ 367,
147
+ 825,
148
+ 479
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "2 RELATED WORK ",
155
+ "text_level": 1,
156
+ "bbox": [
157
+ 174,
158
+ 500,
159
+ 341,
160
+ 516
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "Learning with noisy labels is often concerned with estimating or learning a transition matrix (Natarajan et al., 2013; Patrini et al., 2017; Sukhbaatar et al., 2014) or knowledge graph (Li et al., 2017) between labels and correcting the loss function, which does not apply in our case since the classes in the noisy data are unknown. Most recent work on learning from large-scale weakly-labeled data focuses on learning the representation e.g. by metric learning (Lee et al., 2018; Wang et al., 2018a), bootstrapping (Reed et al., 2015), or distillation (Li et al., 2017). In our case however, since the clean labeled examples are few, we need to keep the representation mostly fixed. ",
167
+ "bbox": [
168
+ 173,
169
+ 536,
170
+ 826,
171
+ 633
172
+ ],
173
+ "page_idx": 1
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "Dealing with the noise, e.g. by thresholding (Lee et al., 2018), outlier detection (Wang et al., 2018a) or reweighting (Liu & Tao, 2015), is applicable while the representation is learned, based e.g. on the gradient of the loss (Ren et al., 2018b). In contrast, the relatively-shallow GCN that we propose effectively decouples reweighting from both representation learning and classifier learning. Learning to clean the noisy labels (Veit et al., 2017) typically assumes adequate human verified labels for training, which again is not the case in this work. ",
178
+ "bbox": [
179
+ 173,
180
+ 640,
181
+ 825,
182
+ 724
183
+ ],
184
+ "page_idx": 1
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "Few-shot learning. Meta-learning (Vilalta & Drissi, 2002) refers to learning at two levels, where generic knowledge is acquired before adapting to more specific tasks. In few-shot learning, this translates to learning on a set of base classes how to learn from few examples on a distinct set of novel classes without overfitting. For instance, optimization meta-learning (Finn et al., 2017; 2018; Ravi & Larochelle, 2017) amounts to learning a model that is easy to fine-tune in few steps. In our work, we study an extension of few-shot learning where more data are available on novel classes, reducing the risk of overfitting when fine-tuning the model. Metric learning approaches learn how to compare queries for instance to few examples (Vinyals et al., 2016) or to the corresponding class prototypes (Snell et al., 2017). Hariharan & Girshick (2017) and Wang et al. (2018b) learn how to generate novel-class examples, which is not needed when more data are actually available. ",
189
+ "bbox": [
190
+ 174,
191
+ 734,
192
+ 825,
193
+ 875
194
+ ],
195
+ "page_idx": 1
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "Gidaris & Komodakis (2018) learn on base classes a simpler cosine similarity-based parametric classifier, or simply cosine classifier, without meta-learning. The same classifier has been introduced independently by Qi et al. (2018), who further fine-tune the network, assuming access to the base class training set. A recent survey (Chen et al., 2019) confirms the superiority of the cosine classifier to previous work including meta-learning (Finn et al., 2017). We use the cosine classifier in this work, both for base and novel classes. All of the above use only the few labeled examples of the novel classes. ",
200
+ "bbox": [
201
+ 176,
202
+ 882,
203
+ 823,
204
+ 924
205
+ ],
206
+ "page_idx": 1
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "",
211
+ "bbox": [
212
+ 174,
213
+ 103,
214
+ 825,
215
+ 159
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "Making use of unlabeled data has been little explored in few-shot learning until recently. Ren et al. (2018a) introduce a semi-supervised few-shot classification task, where some labels are unknown. Liu et al. (2019) follow the same semi-supervised setup, but use graph-based label propagation (LP) (Zhou et al., 2003a) for classification and consider jointly all test images. These methods assume a meta-learning scenario, where only small-scale data is available at each training episode; arguably, such a small amount of data limits the representation adaptation and generalization to unseen data. Similarly, Rohrbach et al. (2013) use label propagation in a transductive setting, but at a larger scale assuming that all examples come from a set of known classes. Douze et al. (2018) extend to even larger scale, leveraging 100M unlabeled images in a graph without using additional text information. We focus on the latter large-scale scenario using the same 100M dataset. However, we filter by text to obtain noisy labels and follow an inductive approach by training a classifier for novel classes, such that the 100M collection is not needed at inference. ",
222
+ "bbox": [
223
+ 173,
224
+ 166,
225
+ 826,
226
+ 333
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "Graph neural networks are generalizations of convolutional networks to non-Euclidean spaces (Bronstein et al., 2017). Early spectral methods (Bruna et al., 2014; Henaff et al., 2015) have been succeeded by Chebyshev polynomial approximations (Defferrard et al., 2016), which avoid the high computational cost of computing eigenvectors. Graph convolutional networks (GCN) (Kipf & Welling, 2017) provide a further simplification by a first-order approximation of graph filtering and are applied to semi-supervised (Kipf & Welling, 2017) and subsequently to few-shot learning (Garcia & Bruna, 2018). In Kipf & Welling (2017), the loss function is applied to labeled examples to make predictions on unlabeled ones. Similarly in Garcia & Bruna (2018), GCNs make predictions on novel class examples. Gidaris & Komodakis (2019) use Graph Neural Networks as denoising autoencoders to generate class weights for novel classes. In contrast, we cast GCNs as binary classifiers discriminating clean from noisy examples: we apply a loss function to all examples, and then use the inferred probabilities as a class relevance measure, effectively cleaning the data. ",
233
+ "bbox": [
234
+ 173,
235
+ 351,
236
+ 825,
237
+ 517
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "Our counter-intuitive objective of treating all noisy examples as negative can be compared to treating each example as a different class in instance-level discrimination (Wu et al., 2018). In fact, our loss function is similar to noise-contrastive estimation (NCE) (Gutmann & Hyvärinen, 2010) used in that work. According to our experiments, our GCN-based classifier outperforms classical LP (Zhou et al., 2003a) used for a similar purpose by Rohrbach et al. (2013). ",
244
+ "bbox": [
245
+ 174,
246
+ 525,
247
+ 825,
248
+ 594
249
+ ],
250
+ "page_idx": 2
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "3 PROBLEM FORMULATION ",
255
+ "text_level": 1,
256
+ "bbox": [
257
+ 176,
258
+ 632,
259
+ 415,
260
+ 647
261
+ ],
262
+ "page_idx": 2
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "We consider a space $\\mathcal { X }$ of examples. We are given a set $X _ { \\mathcal { L } } \\subset \\mathcal { X }$ of examples, each having a clean (manually verified) label in a set $C _ { \\mathcal { L } }$ of classes with $| C _ { \\mathcal { L } } | = K _ { \\mathcal { L } }$ . For any set $X \\subset { \\mathcal { X } }$ , we denote by $X ^ { c }$ its subset of examples having a label in class $c$ . We assume that the number $| X _ { \\mathcal { L } } ^ { c } |$ of examples labeled in each class $c \\in C _ { \\mathcal { L } }$ is only $k$ , typically in $\\{ 1 , 2 , 5 , 1 0 , 2 0 \\}$ . We are also given an additional set $X _ { \\mathcal { Z } } ^ { c }$ of examples, each with a set of noisy labels in $C _ { \\mathcal { L } }$ . The extended set of examples for class $c$ is now $X _ { \\mathcal { E } } ^ { c } = X _ { \\mathcal { L } } ^ { c } \\cup X _ { \\mathcal { Z } } ^ { c }$ . Examples or sets of examples having clean (noisy) labels are referred to as clean (noisy) as well. The goal is to train a classifier, using the additional noisy set in order to improve the accuracy compared to only using the small clean set. ",
267
+ "bbox": [
268
+ 174,
269
+ 671,
270
+ 825,
271
+ 784
272
+ ],
273
+ "page_idx": 2
274
+ },
275
+ {
276
+ "type": "text",
277
+ "text": "We assume that we are given a feature extractor $g _ { \\theta } : \\mathcal { X } \\mathbb { R } ^ { d }$ , mapping an example to a $d .$ -dimensional vector. For instance, when examples are images, the feature extractor is typically a convolutional neural network (CNN) and $\\theta$ are the parameters of all layers. ",
278
+ "bbox": [
279
+ 176,
280
+ 790,
281
+ 823,
282
+ 833
283
+ ],
284
+ "page_idx": 2
285
+ },
286
+ {
287
+ "type": "text",
288
+ "text": "In this work, we assume that the noisy set $X z$ is collected via web crawling with examples that are images accompanied with free-form text description and/or user tags originating from community photo collections. To make use of text data, we assume that the names of classes in $C _ { \\mathcal { L } }$ are given. An example in $X z$ is given a label in class $c \\in C _ { \\mathcal { L } }$ if its textual information contains the name of class $c$ ; it may then have none, one or more labels. In this way, we automatically infer labels for $X z$ without human effort, which are however noisy. ",
289
+ "bbox": [
290
+ 174,
291
+ 840,
292
+ 825,
293
+ 924
294
+ ],
295
+ "page_idx": 2
296
+ },
297
+ {
298
+ "type": "text",
299
+ "text": "We perform cleaning by predicting a class relevance measure for each noisy example in $X _ { \\mathcal { Z } } ^ { c }$ , independently per class $c \\in C _ { \\mathcal { L } }$ . To simplify notation, we drop superscript $c$ where possible in this subsection and we denote $X _ { \\mathcal { E } } ^ { c }$ by $\\left\\{ x _ { 1 } , \\ldots , x _ { k } , x _ { k + 1 } , \\ldots , x _ { N } \\right\\}$ , where $X _ { \\mathcal { L } } ^ { c } ~ = ~ \\{ \\bar { x _ { 1 } } , \\ldots , x _ { k } \\}$ and $X _ { \\mathcal { Z } } ^ { c } = \\{ x _ { k + 1 } , \\ldots , x _ { N } \\}$ . The features of these examples are similarly represented by matrix $V = [ \\ b { \\mathrm { v } } _ { 1 } , \\ b { \\mathrm { ~ . ~ . ~ . ~ } } , \\ b { \\mathrm { v } } _ { k } , \\ b { \\mathrm { v } } _ { k + 1 } , \\ b { \\mathrm { ~ . ~ . ~ . ~ } } , \\ b { \\mathrm { v } } _ { N } ] \\in \\mathbb { R } ^ { d \\times N }$ , where $\\mathbf { v } _ { i } = g _ { \\theta } ( x _ { i } )$ for $i = 1 , \\ldots , N$ . ",
300
+ "bbox": [
301
+ 174,
302
+ 132,
303
+ 825,
304
+ 207
305
+ ],
306
+ "page_idx": 3
307
+ },
308
+ {
309
+ "type": "text",
310
+ "text": "We construct an affinity matrix $A \\in \\mathbb { R } ^ { N \\times N }$ with elements $a _ { i j } = [ \\mathbf { v } _ { i } ^ { \\top } \\mathbf { v } _ { j } ] _ { + }$ if examples $\\mathbf { v } _ { i }$ and $\\mathbf { v } _ { j }$ are reciprocal nearest neighbors in $X _ { \\mathcal { E } } ^ { c }$ and 0 otherwise. Matrix $A$ has zero diagonal, but self-connections are added and then $A$ is normalized as $\\tilde { A } = D ^ { - 1 } ( A + I )$ with $D = \\mathrm { d i a g } ( ( A + I ) \\mathbf { 1 } )$ being the degree matrix of $A + I$ and 1 the all-ones vector. ",
311
+ "bbox": [
312
+ 174,
313
+ 209,
314
+ 825,
315
+ 270
316
+ ],
317
+ "page_idx": 3
318
+ },
319
+ {
320
+ "type": "text",
321
+ "text": "Graph convolutional networks (GCNs) (Kipf & Welling, 2017) are formed by a sequence of layers. Each layer is a function $f _ { \\Theta } : \\mathbb { R } ^ { \\hat { N } \\times N } \\times \\mathbb { R } ^ { l \\times \\hat { N } } \\mathbb { R } ^ { n \\times \\hat { N } }$ of the form ",
322
+ "bbox": [
323
+ 171,
324
+ 276,
325
+ 825,
326
+ 305
327
+ ],
328
+ "page_idx": 3
329
+ },
330
+ {
331
+ "type": "equation",
332
+ "img_path": "images/13b3539b42a92529ba0733c4bb034de201e83b06236457e097f398a2fd35d52b.jpg",
333
+ "text": "$$\nf _ { \\Theta } ( \\tilde { A } , Z ) = h ( \\Theta ^ { \\top } Z \\tilde { A } ) ,\n$$",
334
+ "text_format": "latex",
335
+ "bbox": [
336
+ 416,
337
+ 310,
338
+ 578,
339
+ 329
340
+ ],
341
+ "page_idx": 3
342
+ },
343
+ {
344
+ "type": "text",
345
+ "text": "where $Z \\in \\mathbb { R } ^ { l \\times N }$ represents the input features, $\\boldsymbol { \\Theta } \\in \\mathbb { R } ^ { l \\times n }$ holds the parameters of the layer to be learned, and $h$ is a nonlinear activation function. Function $f _ { \\Theta }$ maps $l$ -dimensional input features to $n$ -dimensional output features. ",
346
+ "bbox": [
347
+ 174,
348
+ 333,
349
+ 825,
350
+ 376
351
+ ],
352
+ "page_idx": 3
353
+ },
354
+ {
355
+ "type": "text",
356
+ "text": "In this work we consider a two layer GCN with a scalar output per example. This network is a function $F _ { \\Theta } : \\mathbb { R } ^ { N \\times N } \\times \\mathbb { R } ^ { d \\times N } \\bar { \\mathbb { R } } ^ { N }$ given by ",
357
+ "bbox": [
358
+ 176,
359
+ 382,
360
+ 821,
361
+ 411
362
+ ],
363
+ "page_idx": 3
364
+ },
365
+ {
366
+ "type": "equation",
367
+ "img_path": "images/aa8f3059c25a8e88d03f34ad4a60198132485042f75fe3825f0e8940f8ab17b9.jpg",
368
+ "text": "$$\nF _ { \\Theta } ( \\tilde { A } , V ) = \\sigma ( \\Theta _ { 2 } ^ { \\top } [ \\Theta _ { 1 } ^ { \\top } V \\tilde { A } ] _ { + } \\tilde { A } ) ,\n$$",
369
+ "text_format": "latex",
370
+ "bbox": [
371
+ 387,
372
+ 416,
373
+ 611,
374
+ 435
375
+ ],
376
+ "page_idx": 3
377
+ },
378
+ {
379
+ "type": "text",
380
+ "text": "where $\\Theta = \\{ \\Theta _ { 1 } , \\Theta _ { 2 } \\}$ , $\\Theta _ { 1 } \\in \\mathbb { R } ^ { d \\times m }$ , $\\Theta _ { 2 } \\in \\mathbb { R } ^ { m \\times 1 }$ , $[ \\cdot ] _ { + }$ is the positive part or ReLU function (Nair & Hinton, 2010) and $\\bar { \\sigma ( } x ) = ( 1 + e ^ { - x } ) ^ { - 1 }$ for $x \\in \\mathbb { R }$ is the sigmoid function. Function $F _ { \\Theta }$ performs feature propagation through the affinity matrix in an analogy to classical graph-based propagation methods for classification (Zhou et al., 2003a) or search (Zhou et al., 2003b). ",
381
+ "bbox": [
382
+ 174,
383
+ 440,
384
+ 825,
385
+ 500
386
+ ],
387
+ "page_idx": 3
388
+ },
389
+ {
390
+ "type": "text",
391
+ "text": "The output $F _ { \\Theta } ( \\tilde { A } , V )$ is a vector of length $N$ , with element $F _ { \\Theta } ( { \\tilde { A } } , V ) _ { i }$ in $[ 0 , 1 ]$ representing a relevance value of example $x _ { i }$ for class $c$ . To learn the parameters $\\Theta$ , we treat the GCN as a binary classifier where target output 1 corresponds to clean examples and 0 to noisy. In particular, we minimize the loss function ",
392
+ "bbox": [
393
+ 174,
394
+ 503,
395
+ 825,
396
+ 560
397
+ ],
398
+ "page_idx": 3
399
+ },
400
+ {
401
+ "type": "equation",
402
+ "img_path": "images/d837015149b4cf45be34663d466e1cbfb336b844aff7679816550bc5ca1f8182.jpg",
403
+ "text": "$$\nL _ { \\mathcal { G } } ( V , \\tilde { A } ; \\Theta ) = - \\frac { 1 } { k } \\sum _ { i = 1 } ^ { k } \\log \\left( F _ { \\Theta } ( \\tilde { A } , V ) _ { i } \\right) - \\frac { \\lambda } { N - k } \\sum _ { i = k + 1 } ^ { N } \\log \\left( 1 - F _ { \\Theta } ( \\tilde { A } , V ) _ { i } \\right) .\n$$",
404
+ "text_format": "latex",
405
+ "bbox": [
406
+ 228,
407
+ 563,
408
+ 767,
409
+ 608
410
+ ],
411
+ "page_idx": 3
412
+ },
413
+ {
414
+ "type": "text",
415
+ "text": "This is a binary cross-entropy loss function where noisy examples are given an importance weight $\\lambda$ . Given the propagation on the nearest neighbor graph, and depending on the relative importance $\\lambda$ of the second term, noisy examples that are strongly connected to clean ones are still expected to receive high class relevance, while noisy examples that are not relevant to the current class are expected to get a class relevance near zero. ",
416
+ "bbox": [
417
+ 173,
418
+ 612,
419
+ 825,
420
+ 683
421
+ ],
422
+ "page_idx": 3
423
+ },
424
+ {
425
+ "type": "text",
426
+ "text": "The impact of parameter $\\lambda$ is validated in Section 6, where we show that the fewer the available clean images are (smaller $k$ ) the smaller the importance weight should be. As is standard practice for GCNs in classification (Kipf & Welling, 2017), training is performed in batches of size $N$ , that is the entire set of features. ",
427
+ "bbox": [
428
+ 174,
429
+ 689,
430
+ 825,
431
+ 746
432
+ ],
433
+ "page_idx": 3
434
+ },
435
+ {
436
+ "type": "text",
437
+ "text": "Figure 2 shows examples of clean images, corresponding noisy ones and the predicted relevance. Thanks to the visual similarity to the clean image, we can use relevance to resolve cases of polysemy, e.g. black widow (spider) vs. black widow (superhero), or cases like pineapple vs. pineapple juice. ",
438
+ "bbox": [
439
+ 176,
440
+ 752,
441
+ 823,
442
+ 795
443
+ ],
444
+ "page_idx": 3
445
+ },
446
+ {
447
+ "type": "text",
448
+ "text": "Discussion. Loss function (3) is similar to noise-contrastive estimation (NCE) (Gutmann & Hyvärinen, 2010) as used by Wu et al. (2018) for instance-level discrimination, whereas we discriminate clean from noisy examples. The semi-supervised learning setup of GCNs (Kipf & Welling, 2017) uses a loss function that applies only to the labeled examples, and makes discrete predictions on unlabeled examples. In our case, all examples contribute to the loss but with different importance, while we infer real-valued class relevance for the noisy examples, to be used for subsequent learning. ",
449
+ "bbox": [
450
+ 173,
451
+ 804,
452
+ 825,
453
+ 888
454
+ ],
455
+ "page_idx": 3
456
+ },
457
+ {
458
+ "type": "text",
459
+ "text": "Function $F _ { \\Theta }$ in (2) reduces to a Multi-Layer Perceptron (MLP) when the affinity matrix $A$ is zero, in which case all examples are disconnected. Using an MLP to perform cleaning would take each example into account independently of the others, while the GCN considers the collection of examples as a whole. MLP training is performed identically to GCN by minimizing (3). We compare the two alternatives in our experiments. ",
460
+ "bbox": [
461
+ 173,
462
+ 895,
463
+ 823,
464
+ 924
465
+ ],
466
+ "page_idx": 3
467
+ },
468
+ {
469
+ "type": "image",
470
+ "img_path": "images/d562245fb1728f832564e87b5ff05688b13eb6f98c403180ec263fd140ddad27.jpg",
471
+ "image_caption": [
472
+ "Figure 2: Examples of clean images (left) for 1-shot classification, cumulative histogram of the predicted relevance for noisy images (middle), and representative noisy images (right), each having its position in the (descending) ranked list according to relevance and relevance value reported below. Test accuracy without and with additional data using class prototypes (6) is shown next to class names. "
473
+ ],
474
+ "image_footnote": [],
475
+ "bbox": [
476
+ 205,
477
+ 94,
478
+ 790,
479
+ 309
480
+ ],
481
+ "page_idx": 4
482
+ },
483
+ {
484
+ "type": "text",
485
+ "text": "",
486
+ "bbox": [
487
+ 174,
488
+ 383,
489
+ 825,
490
+ 426
491
+ ],
492
+ "page_idx": 4
493
+ },
494
+ {
495
+ "type": "text",
496
+ "text": "5 LEARNING A CLASSIFIER WITH FEW CLEAN AND MANY NOISY EXAMPLES",
497
+ "text_level": 1,
498
+ "bbox": [
499
+ 173,
500
+ 446,
501
+ 820,
502
+ 462
503
+ ],
504
+ "page_idx": 4
505
+ },
506
+ {
507
+ "type": "text",
508
+ "text": "Our cleaning process applies when the clean labeled examples are few, but assumes a feature extractor $g _ { \\theta }$ . That is, representation learning, label cleaning and classifier learning are decoupled. We follow few-shot learning in that we learn the representation by supervised classification on a set of base classes, obtaining $g _ { \\theta }$ , and then solving new classification tasks on a distinct set of novel classes. In these new tasks, we assume few clean and many noisy labels as specified in Section 3, perform GCN-based cleaning as described in Section 4, and learn a classifier by weighing examples according to class relevance. Representation and classifier learning are described below. ",
509
+ "bbox": [
510
+ 173,
511
+ 477,
512
+ 825,
513
+ 575
514
+ ],
515
+ "page_idx": 4
516
+ },
517
+ {
518
+ "type": "text",
519
+ "text": "5.1 COSINE-SIMILARITY BASED CLASSIFIER ",
520
+ "text_level": 1,
521
+ "bbox": [
522
+ 174,
523
+ 592,
524
+ 493,
525
+ 606
526
+ ],
527
+ "page_idx": 4
528
+ },
529
+ {
530
+ "type": "text",
531
+ "text": "We use a cosine-similarity based classifier (Gidaris & Komodakis, 2018; Qi et al., 2018), or cosine classifier for short. Given classes $C$ with $| C | = K$ , each class $c \\in C$ is represented by a learnable parameter $\\mathbf { w } _ { c } \\in \\mathbb { R } ^ { d }$ . The prediction of example $x \\in \\mathcal { X }$ is the class $c$ of maximum cosine similarity $\\hat { \\mathbf { w } } _ { c } ^ { \\top } \\hat { g } _ { \\boldsymbol { \\theta } } ( x ) ^ { 1 }$ ",
532
+ "bbox": [
533
+ 173,
534
+ 616,
535
+ 825,
536
+ 674
537
+ ],
538
+ "page_idx": 4
539
+ },
540
+ {
541
+ "type": "equation",
542
+ "img_path": "images/40e6a0f31bb15db55ac4c34edda9ebe293e0f22aac7359518e37b8c95fccd4b7.jpg",
543
+ "text": "$$\n\\pi _ { \\boldsymbol { \\theta } , W } ( x ) = \\arg \\operatorname* { m a x } _ { c } \\hat { \\mathbf { w } } _ { c } ^ { \\top } \\hat { g } _ { \\boldsymbol { \\theta } } ( x ) ,\n$$",
544
+ "text_format": "latex",
545
+ "bbox": [
546
+ 393,
547
+ 671,
548
+ 601,
549
+ 695
550
+ ],
551
+ "page_idx": 4
552
+ },
553
+ {
554
+ "type": "text",
555
+ "text": "where $W = [ \\mathbf { w } _ { 1 } , \\ j . . . , \\mathbf { w } _ { K } ] \\in \\mathbb { R } ^ { d \\times K }$ . ",
556
+ "bbox": [
557
+ 174,
558
+ 699,
559
+ 416,
560
+ 715
561
+ ],
562
+ "page_idx": 4
563
+ },
564
+ {
565
+ "type": "text",
566
+ "text": "5.2 REPRESENTATION LEARNING: BASE CLASSES ",
567
+ "text_level": 1,
568
+ "bbox": [
569
+ 173,
570
+ 731,
571
+ 529,
572
+ 746
573
+ ],
574
+ "page_idx": 4
575
+ },
576
+ {
577
+ "type": "text",
578
+ "text": "We are given a set $X _ { B } \\subset { \\mathcal { X } }$ of examples, each having a clean label in a set of base classes $C _ { B }$ with $| C _ { B } | = K _ { B }$ . These data are used to learn a feature representation, i.e. a feature extractor $g _ { \\theta }$ , by learning a $K _ { B }$ -way base-class classifier for unseen data in $\\mathcal { X }$ . The parameters $\\theta$ of the feature extractor and $W _ { B }$ of the classifier are jointly learned by minimizing the cross entropy loss ",
579
+ "bbox": [
580
+ 174,
581
+ 756,
582
+ 826,
583
+ 814
584
+ ],
585
+ "page_idx": 4
586
+ },
587
+ {
588
+ "type": "equation",
589
+ "img_path": "images/ae61401e91b7b7148fa78affb508b0916a0836a3c71827c7dbf2006dd9558870.jpg",
590
+ "text": "$$\n{ \\cal L } _ { \\mathcal B } ( C _ { \\mathcal B } , X _ { \\mathcal B } ; \\boldsymbol { \\theta } , W _ { \\mathcal B } ) = - \\sum _ { c \\in C _ { \\mathcal B } } \\frac { 1 } { | X _ { \\mathcal B } ^ { c } | } \\sum _ { x \\in X _ { \\mathcal B } ^ { c } } \\log ( \\sigma ( s \\hat { W } _ { \\mathcal B } ^ { \\top } \\hat { g } _ { \\boldsymbol \\theta } ( x ) ) _ { c } ) ,\n$$",
591
+ "text_format": "latex",
592
+ "bbox": [
593
+ 282,
594
+ 818,
595
+ 712,
596
+ 858
597
+ ],
598
+ "page_idx": 4
599
+ },
600
+ {
601
+ "type": "text",
602
+ "text": "where $\\sigma : \\mathbb { R } ^ { K } \\mathbb { R } ^ { K }$ is the softmax function with $\\pmb { \\sigma } ( \\mathbf { a } ) _ { c } = e ^ { a _ { c } } / \\sum _ { j \\in C } e ^ { a _ { j } }$ for $\\mathbf { a } \\in \\mathbb { R } ^ { K }$ , $s$ is a learnable scale parameter and $\\hat { W } _ { \\mathcal { B } } = [ \\hat { \\mathbf { w } } _ { 1 } , \\hdots , \\hat { \\mathbf { w } } _ { K _ { \\mathcal { B } } } ] \\in \\mathbb { R } ^ { d \\times K _ { \\mathcal { B } } }$ . Learning and inference are ",
603
+ "bbox": [
604
+ 174,
605
+ 864,
606
+ 825,
607
+ 901
608
+ ],
609
+ "page_idx": 4
610
+ },
611
+ {
612
+ "type": "text",
613
+ "text": "performed on base classes by $L _ { B } ( C _ { B } , X _ { B } ; \\theta , W _ { B } )$ (5) and $\\pi _ { \\boldsymbol { \\theta } , W _ { B } }$ (4), respectively. As a result, learned feature extractor parameters $\\theta$ are used for base or novel classes, while the classifier parameters $W _ { B }$ can be used for base class or all-class classification, as discussed below. ",
614
+ "bbox": [
615
+ 173,
616
+ 103,
617
+ 825,
618
+ 146
619
+ ],
620
+ "page_idx": 5
621
+ },
622
+ {
623
+ "type": "text",
624
+ "text": "5.3 NEW CLASSIFICATION TASKS: NOVEL OR ALL CLASSES ",
625
+ "text_level": 1,
626
+ "bbox": [
627
+ 173,
628
+ 162,
629
+ 596,
630
+ 176
631
+ ],
632
+ "page_idx": 5
633
+ },
634
+ {
635
+ "type": "text",
636
+ "text": "Each new task is related to a set of novel classes $C _ { \\mathcal { L } }$ , disjoint from $C _ { B }$ . The goal is to learn a $K _ { \\mathcal { L } }$ -way novel-class classifier or a $K _ { A }$ -way classifier on all classes $C _ { A } = C _ { B } \\cup C _ { \\mathcal { L } }$ for unseen data in $\\mathcal { X }$ , where $K _ { \\mathcal { A } } = K _ { B } + K _ { \\mathcal { L } }$ . Unlike the typical few-shot learning task, each novel class contains few clean and many noise examples. ",
637
+ "bbox": [
638
+ 174,
639
+ 188,
640
+ 826,
641
+ 244
642
+ ],
643
+ "page_idx": 5
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "Prior to learning classifiers for novel classes, training examples $x _ { i } \\in X _ { \\mathcal { Z } } ^ { c }$ are weighted by their relevance $r ( x _ { i } )$ to class $c$ . For a noisy example $x _ { i } \\in X _ { \\mathcal { E } } ^ { c }$ , we define $r ( x _ { i } ) = F _ { \\Theta } ( \\tilde { A } , V ) _ { i }$ where $F _ { \\Theta } ( \\tilde { A } , V )$ is the output vector of the GCN, while for a clean example $x _ { i } \\in X _ { \\mathcal { L } } ^ { c }$ we fix $r ( x _ { i } ) = 1$ Note that optimizing (3) does not guarantee $F _ { \\Theta } ( \\tilde { A } , V ) _ { i } = 1$ for clean examples $x _ { i } \\in X _ { \\mathcal { L } } ^ { c }$ . We define $\\textstyle r ( X ) = \\sum _ { x \\in X } r ( x )$ for any set $X \\subset { \\mathcal { X } }$ . ",
648
+ "bbox": [
649
+ 173,
650
+ 251,
651
+ 825,
652
+ 330
653
+ ],
654
+ "page_idx": 5
655
+ },
656
+ {
657
+ "type": "text",
658
+ "text": "We first assume that we no longer have access to examples of base classes in new classification tasks and consider two different classifiers, class prototypes and cosine-similarity based classifier. Then, this assumption is dropped and the classifier and feature representation are learned jointly by fine-tuning the entire network. ",
659
+ "bbox": [
660
+ 174,
661
+ 335,
662
+ 825,
663
+ 392
664
+ ],
665
+ "page_idx": 5
666
+ },
667
+ {
668
+ "type": "text",
669
+ "text": "Class prototypes. For each novel class $c \\in C _ { \\mathcal { L } }$ , we define prototype ${ \\bf w } _ { c }$ by ",
670
+ "bbox": [
671
+ 173,
672
+ 401,
673
+ 666,
674
+ 417
675
+ ],
676
+ "page_idx": 5
677
+ },
678
+ {
679
+ "type": "equation",
680
+ "img_path": "images/9d641c429881b24c6da69fdf3b5c2603b24182d5a2b4595d7fba7984967050ee.jpg",
681
+ "text": "$$\n\\mathbf { w } _ { c } = \\frac { 1 } { r ( X _ { \\mathcal { E } } ^ { c } ) } \\sum _ { x \\in X _ { \\mathcal { E } } ^ { c } } r ( x ) g _ { \\theta } ( x ) .\n$$",
682
+ "text_format": "latex",
683
+ "bbox": [
684
+ 397,
685
+ 424,
686
+ 601,
687
+ 463
688
+ ],
689
+ "page_idx": 5
690
+ },
691
+ {
692
+ "type": "text",
693
+ "text": "Prototypes are fixed vectors, not learnable parameters. Collecting them into matrix $\\begin{array} { r l } { W _ { \\mathcal { L } } } & { { } = } \\end{array}$ $[ \\mathbf { w } _ { 1 } , \\dots , \\mathbf { w } _ { K _ { \\mathcal { L } } } ] \\in \\mathbb { R } ^ { d \\times K _ { \\mathcal { L } } }$ , $K _ { \\mathcal { L } }$ -way prediction on novel classes is made by classifier $\\pi _ { \\boldsymbol { \\theta } , W _ { \\mathcal { L } } }$ (4), while $K _ { A }$ -way prediction on all (base and novel) classes by $\\pi _ { \\boldsymbol { \\theta } , W _ { A } }$ , where $W _ { \\mathcal { A } } = [ W _ { B } , W _ { \\mathcal { L } } ]$ and $W _ { B }$ is learned according to $L _ { B } ( C _ { B } , X _ { B } ; \\theta , W _ { B } )$ (5) and then kept fixed. ",
694
+ "bbox": [
695
+ 174,
696
+ 469,
697
+ 825,
698
+ 526
699
+ ],
700
+ "page_idx": 5
701
+ },
702
+ {
703
+ "type": "text",
704
+ "text": "Cosine classifier learning. Similarly to Section 5.2, given clean and noisy novel-class examples $X _ { \\mathcal { E } }$ , we learn a parametric cosine classifier with parameters $W _ { \\mathcal { L } } = [ \\mathbf { w } _ { 1 } , \\dots , \\mathbf { w } _ { K _ { \\mathcal { L } } } ] \\in \\mathbb { R } ^ { d \\times K _ { \\mathcal { L } } }$ by minimizing the weighted cross entropy loss $L _ { \\mathcal { L } } ( C _ { \\mathcal { L } } , X _ { \\mathcal { E } } ; \\theta , W _ { \\mathcal { L } } )$ over $W _ { \\mathcal { L } }$ , where ",
705
+ "bbox": [
706
+ 174,
707
+ 535,
708
+ 825,
709
+ 579
710
+ ],
711
+ "page_idx": 5
712
+ },
713
+ {
714
+ "type": "equation",
715
+ "img_path": "images/9d9cc6a68fc31b95d6d72f3677cd4daa097ce6fca886266a36bbf086a956fc14.jpg",
716
+ "text": "$$\nL _ { \\mathcal { L } } ( C _ { \\mathcal { L } } , X _ { \\mathcal { E } } ; \\theta , W _ { \\mathcal { L } } ) = - \\sum _ { c \\in C _ { \\mathcal { L } } } \\frac { 1 } { r ( X _ { \\mathcal { E } } ^ { c } ) } \\sum _ { x \\in X _ { \\mathcal { E } } ^ { c } } r ( x ) \\log ( \\sigma ( s \\hat { W } _ { \\mathcal { L } } ^ { \\top } \\hat { g } _ { \\theta } ( x ) ) _ { c } ) ,\n$$",
717
+ "text_format": "latex",
718
+ "bbox": [
719
+ 263,
720
+ 585,
721
+ 735,
722
+ 626
723
+ ],
724
+ "page_idx": 5
725
+ },
726
+ {
727
+ "type": "text",
728
+ "text": "while the parameters $\\theta$ of the feature extractor are fixed. The scale parameter $s$ is also fixed to the value obtained during base class learning. Prediction on novel only or all classes is then made as in the previous case. ",
729
+ "bbox": [
730
+ 174,
731
+ 632,
732
+ 825,
733
+ 674
734
+ ],
735
+ "page_idx": 5
736
+ },
737
+ {
738
+ "type": "text",
739
+ "text": "Deep network fine-tuning. We now drop the assumption that base class examples are not accessible and, given all examples $X _ { \\mathcal { A } } = X _ { \\mathcal { B } } \\cup X _ { \\mathcal { E } }$ , we jointly learn the parameters $\\theta$ of the feature extractor and $W _ { \\mathcal { A } } = ( W _ { B } , W _ { \\mathcal { L } } )$ of the $K _ { A }$ -way cosine classifier for all classes by minimizing loss function ",
740
+ "bbox": [
741
+ 173,
742
+ 684,
743
+ 825,
744
+ 728
745
+ ],
746
+ "page_idx": 5
747
+ },
748
+ {
749
+ "type": "equation",
750
+ "img_path": "images/379610d627fb0113437714afc09f9e9a7331a93b4bb191ea3d1aaf2e77db7ced.jpg",
751
+ "text": "$$\nL _ { A } ( C _ { A } , X _ { A } ; \\theta , W _ { A } ) = L _ { B } ( C _ { B } , X _ { B } ; \\theta , W _ { B } ) + L _ { \\mathcal { L } } ( C _ { \\mathcal { L } } , X _ { \\mathcal { E } } ; \\theta , W _ { \\mathcal { L } } ) .\n$$",
752
+ "text_format": "latex",
753
+ "bbox": [
754
+ 271,
755
+ 733,
756
+ 725,
757
+ 752
758
+ ],
759
+ "page_idx": 5
760
+ },
761
+ {
762
+ "type": "text",
763
+ "text": "Note that, due to overfitting on the few available examples, such learning is avoided in a few-shot learning setup. In a few cases, it takes the form of fine-tuning including all base class data (Qi et al., 2018), or only lasts for a few iterations when the base class data is not accessible (Finn et al., 2017). ",
764
+ "bbox": [
765
+ 174,
766
+ 757,
767
+ 825,
768
+ 800
769
+ ],
770
+ "page_idx": 5
771
+ },
772
+ {
773
+ "type": "text",
774
+ "text": "6 EXPERIMENTS ",
775
+ "text_level": 1,
776
+ "bbox": [
777
+ 174,
778
+ 820,
779
+ 326,
780
+ 837
781
+ ],
782
+ "page_idx": 5
783
+ },
784
+ {
785
+ "type": "text",
786
+ "text": "6.1 EXPERIMENTAL SETUP ",
787
+ "text_level": 1,
788
+ "bbox": [
789
+ 174,
790
+ 852,
791
+ 374,
792
+ 866
793
+ ],
794
+ "page_idx": 5
795
+ },
796
+ {
797
+ "type": "text",
798
+ "text": "Datasets and task setup. We extend the Low-Shot ImageNet benchmark introduced by Hariharan & Girshick (2017) by assuming many noisy examples for novel classes, in addition to the few clean ones. In this benchmark, the 1000 ImageNet classes (Russakovsky et al., 2015) are split into 389 base classes and 611 novel classes. The validation set contains 193 base and 300 novel classes, and the test set the remaining 196 base and 311 novel classes. The standard benchmark includes $k$ -shot classification, i.e. classification on $k$ clean examples per class, which we extend to $k$ clean and many noisy examples per class, with $k \\in \\{ 1 , 2 , 5 , 1 0 , 2 0 \\}$ . Similar to Hariharan & Girshick (2017) we perform 5 tasks, each drawing a subset of $k$ clean examples per class. We report the average top-5 accuracy over the 5 tasks on novel or all classes of the test set. ",
799
+ "bbox": [
800
+ 174,
801
+ 881,
802
+ 825,
803
+ 924
804
+ ],
805
+ "page_idx": 5
806
+ },
807
+ {
808
+ "type": "text",
809
+ "text": "",
810
+ "bbox": [
811
+ 174,
812
+ 103,
813
+ 825,
814
+ 186
815
+ ],
816
+ "page_idx": 6
817
+ },
818
+ {
819
+ "type": "text",
820
+ "text": "We use the YFCC100M dataset (Thomee et al., 2016) as a source for additional data with noisy labels. It contains approximatively 100M images collected from Flickr. Each image comes with a text description obtained from the user title and caption. We use the text description to obtain images with noisy labels. as discussed in Section 3. This process results in very different numbers of additional examples per class, with a minimum of zero for classes maillot and missile, and a maximum of 620,142 for class church/church building. ",
821
+ "bbox": [
822
+ 174,
823
+ 194,
824
+ 825,
825
+ 279
826
+ ],
827
+ "page_idx": 6
828
+ },
829
+ {
830
+ "type": "text",
831
+ "text": "Representation and classifier learning. In most experiments, we use ResNet-10 (He et al., 2016) as feature extractor as in Gidaris & Komodakis (2018). Classification for novel classes is performed with class prototypes (6), cosine classifier learning (7) or deep network fine-tuning (8). Hyper-parameters such as batch size and number of epochs, are tuned on the validation set. Possible values are 2048, 4096, and 8192 for batchsize and 10, 30 and 50 for number of epochs. The learning rate starts from 0.1 and is reduced to 0.001 at the end of training with cosine annealing (Loshchilov & Hutter, 2017). ",
832
+ "bbox": [
833
+ 174,
834
+ 290,
835
+ 825,
836
+ 375
837
+ ],
838
+ "page_idx": 6
839
+ },
840
+ {
841
+ "type": "text",
842
+ "text": "We handle the imbalance of the noisy set by normalizing by $r ( X _ { c } )$ in (7). Prototypes (6) are used to initialize $W _ { \\mathcal { L } }$ of cosine classifier in (7), and the learned $W _ { \\mathcal { L } }$ is used to initialize the corresponding part of $W _ { A }$ when fine-tuning the network by (8). In the latter case, we train all layers for 10 epochs with learning rate 0.01. We ignore examples $x _ { i }$ with relevance $r ( x _ { i } ) < 0 . 1$ to reduce the complexity when fine-tuning the network. ",
843
+ "bbox": [
844
+ 174,
845
+ 381,
846
+ 825,
847
+ 450
848
+ ],
849
+ "page_idx": 6
850
+ },
851
+ {
852
+ "type": "text",
853
+ "text": "We also report results with ResNet-50 as feature extractor, using the model trained on base classes by Hariharan & Girshick (2017). Following Douze et al. (2018), we apply PCA to the features to reduce their dimensionality to 256. Base classes are represented by class prototypes (6) in this case. ",
854
+ "bbox": [
855
+ 174,
856
+ 457,
857
+ 825,
858
+ 500
859
+ ],
860
+ "page_idx": 6
861
+ },
862
+ {
863
+ "type": "text",
864
+ "text": "GCN training is performed with Adam optimizer and a learning rate of 0.1 for 100 iterations. We use dropout with probability 0.5. The dimensionality of the input descriptors is $d = 5 1 2$ for ResNet-10 and $d = 2 5 6$ for ResNet-50 (after PCA). Dimensionality of the internal representation in (1) is $m = 1 6$ . The affinity matrix is constructed with reciprocal top-50 nearest neighbors. ",
865
+ "bbox": [
866
+ 174,
867
+ 506,
868
+ 825,
869
+ 563
870
+ ],
871
+ "page_idx": 6
872
+ },
873
+ {
874
+ "type": "text",
875
+ "text": "Baselines. We implement and evaluate several baseline methods. $\\beta$ -cleaning assigns $r ( x _ { i } ) = \\beta$ to all additional examples. We report results for $\\beta = 1 . 0$ (unit relevance score) and $\\beta ^ { * }$ , the optimal $\\beta$ for all $k$ obtained on the validation set. $M L P$ , discussed in Section 4, learns a nonlinear mapping to assign relevance, but does not propagate over the graph. Label Propagation (LP) (Zhou et al., 2003a) propagates information by a linear operation. It solves the linear system $( I - \\alpha D ^ { - 1 / 2 } A D ^ { - 1 / 2 } ) \\mathbf { r } _ { c } =$ $\\mathbf { y } _ { c }$ (Iscen et al., 2017) for each class $c$ , where $D$ is the degree matrix of $A$ , $\\alpha = 0 . 9$ and $\\mathbf { y } _ { c } \\in \\mathbb { R } ^ { N }$ is a $k$ -hot binary vector indicating the labeled examples of class $c$ . Relevance $r ( x _ { i } )$ is then the $i$ -th element $( \\mathbf { r } _ { c } ) _ { i }$ of the solution. ",
876
+ "bbox": [
877
+ 174,
878
+ 575,
879
+ 825,
880
+ 689
881
+ ],
882
+ "page_idx": 6
883
+ },
884
+ {
885
+ "type": "text",
886
+ "text": "6.2 EXPERIMENTAL RESULTS ",
887
+ "text_level": 1,
888
+ "bbox": [
889
+ 174,
890
+ 710,
891
+ 390,
892
+ 724
893
+ ],
894
+ "page_idx": 6
895
+ },
896
+ {
897
+ "type": "text",
898
+ "text": "The impact of importance weight $\\lambda$ is measured on the validation set and the best performing value is used on the test set for each value of $k$ . Results are shown in Appendix A. The larger the value of $\\lambda$ , the more the loss encourages noisy examples to be classified as negatives. As a consequence, large (small) $\\lambda$ results in smaller (larger) relevance, on average, for noisy examples. The optimal $\\lambda$ per value of $k$ suggests that the fewer the clean examples the larger the need for additional ones. ",
899
+ "bbox": [
900
+ 174,
901
+ 743,
902
+ 825,
903
+ 814
904
+ ],
905
+ "page_idx": 6
906
+ },
907
+ {
908
+ "type": "text",
909
+ "text": "Comparison with baselines using additional data is presented in Table 1. The use of additional data is mostly harmful for $\\beta$ -weighting except for 1 and 2-shot. MLP offers improvements in most cases, implying that it manages to appropriately downweigh irrelevant examples. The consistent improvement of our method compared to MLP, especially large for small $k$ , suggests that it is beneficial to incorporate relations, with the affinity matrix $A$ modeling the structure of the feature space. LP is a classic approach that also uses $A$ but is a linear operation with no parameters, and is inferior to our method. The gain of cleaning ( $\\beta = 1$ vs. ours) ranges from $11 \\%$ to $20 \\%$ . ",
910
+ "bbox": [
911
+ 174,
912
+ 825,
913
+ 825,
914
+ 924
915
+ ],
916
+ "page_idx": 6
917
+ },
918
+ {
919
+ "type": "table",
920
+ "img_path": "images/a459708462385f825bec2f32d3a41cf64b24997f7906997386decb7226e7f454.jpg",
921
+ "table_caption": [
922
+ "Table 1: Comparison with baselines using noisy examples. We report top-5 accuracy on novel classes with classification by class prototypes (6). "
923
+ ],
924
+ "table_footnote": [],
925
+ "table_body": "<table><tr><td>Method</td><td>k=1</td><td>2</td><td>5</td><td>10</td><td>20</td></tr><tr><td colspan=\"6\">FEW CLEAN EXAMPLES</td></tr><tr><td>Class proto.Gidaris &amp; Komodakis (2018)</td><td>45.3±0.65</td><td>57.1±0.37</td><td>69.3±0.32</td><td>74.8±0.20</td><td>77.8±0.24</td></tr><tr><td colspan=\"6\">FEW CLEAN &amp; MANY NOISY EXAMPLES</td></tr><tr><td>β-weighting,β=1</td><td>56.1±0.06</td><td>56.4±0.08</td><td>57.1±0.05</td><td>57.7±0.08</td><td>58.7±0.06</td></tr><tr><td>β-weighting,β*</td><td>55.6±0.24</td><td>58.3±0.14</td><td>63.4±0.25</td><td>67.5±0.34</td><td>71.0±0.22</td></tr><tr><td>Label Propagation Zhou et al. (2003a)</td><td>62.6±0.35</td><td>67.0±0.41</td><td>74.6±0.30</td><td>76.3±0.23</td><td>77.7±0.18</td></tr><tr><td>MLP</td><td>63.6±0.41</td><td>68.8±0.42</td><td>73.9±0.25</td><td>75.6±0.21</td><td>77.6±0.21</td></tr><tr><td>Ours</td><td>67.8±0.10</td><td>70.9±0.30</td><td>73.7±0.17</td><td>76.1±0.12</td><td>78.2±0.14</td></tr></table>",
926
+ "bbox": [
927
+ 225,
928
+ 101,
929
+ 761,
930
+ 224
931
+ ],
932
+ "page_idx": 7
933
+ },
934
+ {
935
+ "type": "table",
936
+ "img_path": "images/2b93b35a59e17c23022787514572c2915798f4e6c89bd4a24615df6a04cefb60.jpg",
937
+ "table_caption": [],
938
+ "table_footnote": [],
939
+ "table_body": "<table><tr><td>METHOD</td><td colspan=\"4\">NoVEL CLASSES</td><td colspan=\"5\">ALL CLASSES</td></tr><tr><td>k=1</td><td>2</td><td>5</td><td>10</td><td>20</td><td>k=1</td><td>2</td><td>5</td><td>10</td><td>20</td></tr><tr><td colspan=\"10\">RESNET-10 -FEW CLEAN EXAMPLES</td></tr><tr><td>Proto.-Nets (Snell et al., 2017)</td><td>39.3</td><td>54.4 66.3</td><td>71.2</td><td>73.9</td><td>49.5</td><td>61.0</td><td>69.7</td><td>72.9</td><td>74.6</td></tr><tr><td>Logistic reg.w/H(Wang et al.,2018b)</td><td>40.7</td><td>50.8 62.0</td><td>69.3</td><td>76.5</td><td>52.2</td><td>59.4</td><td>67.6</td><td>72.8</td><td>76.9</td></tr><tr><td>PMN w/H(Wang et al., 2018b)</td><td>45.8</td><td>57.8 69.0</td><td>74.3</td><td>77.4</td><td>57.6</td><td>64.7</td><td>71.9</td><td>75.2</td><td>77.5</td></tr><tr><td>Class proto.(Gidaris &amp; Komodakis,2018)</td><td></td><td></td><td>45.3±0.6557.1±0.37 69.3±0.32 74.8±0.20 77.8±0.24</td><td></td><td></td><td></td><td></td><td></td><td>57.0±0.3664.7±0.1672.5±0.1875.8±0.1677.4±0.19 58.1±0.4865.2±0.15 72.9±0.25 76.6±0.18 78.8±0.16</td></tr><tr><td colspan=\"10\">Class proto.w/At.(Gidaris&amp; Komodakis,2018) 45.8±0.74 57.4±0.38 69.6±0.27 75.0±0.29 78.2±0.23</td></tr><tr><td></td><td></td><td></td><td>RESNET-1O -FEW CLEAN&amp; MANY NOISY EXAMPLES</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Ours -class proto.(6) Ours-cosine (7)</td><td></td><td></td><td>67.8±0.10 70.9±0.30 73.7±0.20 76.1±0.16 78.2±0.14</td><td></td><td></td><td></td><td></td><td></td><td>70.3±0.05 72.1±0.18 74.1±0.12 75.6±0.13 76.9±0.09</td></tr><tr><td>Ours - fine-tune (8)</td><td></td><td>73.2±0.14 75.3±0.25 75.6±0.24 78.5±0.32 80.7±0.26 74.6±0.13 76.6±0.26 78.2±0.23 80.9±0.34 82.9±0.20</td><td></td><td></td><td></td><td></td><td></td><td></td><td>71.9±0.0774.0±0.2376.5±0.1678.3±0.2380.2±0.18 76.0±0.1077.3±0.1378.7±0.1980.7±0.2582.2±0.14</td></tr><tr><td colspan=\"10\">RESNET-50 - FEW CLEAN EXAMPLES</td></tr><tr><td>Proto.-Nets (Snell et al., 2017)</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>PMN w/H(Wang et al.,2018b)</td><td>49.6 64.0 54.7 66.8</td><td>74.4 77.4</td><td>78.1 81.4</td><td>80.0 83.8</td><td>61.4 65.7</td><td>71.4 73.5</td><td>78.0 80.2</td><td>80.0 82.8</td><td>81.1 84.5</td></tr><tr><td colspan=\"10\">RESNET-5O-FEW CLEAN&amp;MANYUNLABELED EXAMPLES</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Diffusion (Douze et al., 2018) Diffusion -logistic (Douze et al.,2018)</td><td></td><td></td><td>63.6±0.61 69.5±0.60 75.2±0.40 78.5±0.34 80.8±0.18</td><td></td><td></td><td>=</td><td>-</td><td></td><td></td></tr><tr><td colspan=\"10\">64.0±0.7071.1±0.82 79.7±0.3883.9±0.10 86.3±0.17 RESNET-5O-FEWCLEAN&amp;MANY NOISY EXAMPLES</td></tr><tr><td>Ours - class proto.(6)</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Ours - cosine (7)</td><td></td><td>78.0±0.38 80.2±0.3380.9±0.17 83.7±0.1985.7±0.11</td><td>69.7±0.44 73.7±0.56 77.0±0.20 79.9±0.30 81.9±0.29</td><td></td><td></td><td>77.6±0.26 79.1±0.20 79.9±0.09 82.1±0.22 83.8±0.11</td><td></td><td></td><td>73.8±0.33 76.6±0.36 78.9±0.19 80.8±0.21 82.2±0.14</td></tr><tr><td>Ours - fine-tune (8)</td><td>80.8±0.25 83.0±0.23 83.8±0.39 86.4±0.23 88.5±0.20</td><td></td><td></td><td></td><td></td><td>81.6±0.20 83.2±0.16 84.3±0.23 86.2±0.17 87.8±0.03</td><td></td><td></td><td></td></tr></table>",
940
+ "bbox": [
941
+ 178,
942
+ 262,
943
+ 820,
944
+ 512
945
+ ],
946
+ "page_idx": 7
947
+ },
948
+ {
949
+ "type": "text",
950
+ "text": "Table 2: Comparison to the state of the art on the Low-shot ImageNet benchmark. We report top-5 accuracy on novel and all classes. We use class prototypes (6), cosine classifier learning (7) and deep network fine-tuning (8) for classification with our GCN-based data addition method. ",
951
+ "bbox": [
952
+ 176,
953
+ 517,
954
+ 821,
955
+ 559
956
+ ],
957
+ "page_idx": 7
958
+ },
959
+ {
960
+ "type": "text",
961
+ "text": "Comparison with the state of the art is presented in Table 2. We significantly improve the performance by using additional data and cleaning compared to a number of different approaches, including the work by Gidaris & Komodakis (2018), which is our starting point. As expected, the gain is more pronounced for small $k$ , reaching more than $20 \\%$ improvement for 1-shot novel accuracy. ",
962
+ "bbox": [
963
+ 174,
964
+ 565,
965
+ 825,
966
+ 621
967
+ ],
968
+ "page_idx": 7
969
+ },
970
+ {
971
+ "type": "text",
972
+ "text": "Closest to ours is the work of Douze et al. (2018), who use the same experimental setup and the same additional data, but without filtering by text and using noisy labels. We outperform their approach in all cases, while requiring much less computation: offline, we construct a separate small graph per class rather than a single graph over the entire 100M collection; online, we perform inference by cosine similarity to one prototype per class or a learned classifier rather than iterative diffusion on the entire collection. Note that by ignoring examples that are not given any noisy label, we are only using a tiny fraction of the 100M collection: in particular, only 3,744,994 images for the 311-class test split of the Low-shot ImageNet benchmark. In contrast to Douze et al. (2018), additional data brings improvement even at 20-shot with classifier learning or network fine-tuning. Most importantly, our approach does not require the entire 100M collection at inference. ",
973
+ "bbox": [
974
+ 174,
975
+ 628,
976
+ 825,
977
+ 767
978
+ ],
979
+ "page_idx": 7
980
+ },
981
+ {
982
+ "type": "text",
983
+ "text": "7 CONCLUSIONS ",
984
+ "text_level": 1,
985
+ "bbox": [
986
+ 176,
987
+ 787,
988
+ 328,
989
+ 804
990
+ ],
991
+ "page_idx": 7
992
+ },
993
+ {
994
+ "type": "text",
995
+ "text": "In this paper we have introduced a new method for assigning class relevance to noisy images obtained by textual queries with class names. Our approach leverages one or a few labeled images per class and relies on a graph convolutional network (GCN) to propagate visual information from the labeled images to the noisy ones. The GCN is a binary classifier discriminating clean from noisy examples using a weighted binary cross-entropy loss function and inferring “clean” probability as a relevance measure for that class. Experimental results show that using noisy images weighted by this relevance measure significantly improves the classification accuracy. ",
996
+ "bbox": [
997
+ 174,
998
+ 819,
999
+ 825,
1000
+ 917
1001
+ ],
1002
+ "page_idx": 7
1003
+ },
1004
+ {
1005
+ "type": "text",
1006
+ "text": "REFERENCES ",
1007
+ "text_level": 1,
1008
+ "bbox": [
1009
+ 176,
1010
+ 103,
1011
+ 287,
1012
+ 117
1013
+ ],
1014
+ "page_idx": 8
1015
+ },
1016
+ {
1017
+ "type": "text",
1018
+ "text": "Michael M Bronstein, Joan Bruna, Yann LeCun, Arthur Szlam, and Pierre Vandergheynst. Geometric deep learning: going beyond euclidean data. IEEE Signal Processing Magazine, 34(4):18–42, 2017. ",
1019
+ "bbox": [
1020
+ 174,
1021
+ 125,
1022
+ 823,
1023
+ 151
1024
+ ],
1025
+ "page_idx": 8
1026
+ },
1027
+ {
1028
+ "type": "text",
1029
+ "text": "Joan Bruna, Wojciech Zaremba, Arthur Szlam, and Yann Lecun. Spectral networks and locally connected networks on graphs. In ICLR, 2014. ",
1030
+ "bbox": [
1031
+ 173,
1032
+ 160,
1033
+ 821,
1034
+ 188
1035
+ ],
1036
+ "page_idx": 8
1037
+ },
1038
+ {
1039
+ "type": "text",
1040
+ "text": "Wei-Yu Chen, Yen-Cheng Liu, Zsolt Kira, Yu-Chiang Frank Wang, and Jia-Bin Huang. A closer look at few-shot classification. ICLR, 2019. ",
1041
+ "bbox": [
1042
+ 173,
1043
+ 195,
1044
+ 820,
1045
+ 223
1046
+ ],
1047
+ "page_idx": 8
1048
+ },
1049
+ {
1050
+ "type": "text",
1051
+ "text": "Michaël Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on graphs with fast localized spectral filtering. In NeurIPS, 2016. ",
1052
+ "bbox": [
1053
+ 174,
1054
+ 231,
1055
+ 823,
1056
+ 258
1057
+ ],
1058
+ "page_idx": 8
1059
+ },
1060
+ {
1061
+ "type": "text",
1062
+ "text": "Matthijs Douze, Arthur Szlam, Bharath Hariharan, and Hervé Jégou. Low-shot learning with large-scale diffusion. In CVPR, 2018. ",
1063
+ "bbox": [
1064
+ 174,
1065
+ 267,
1066
+ 823,
1067
+ 295
1068
+ ],
1069
+ "page_idx": 8
1070
+ },
1071
+ {
1072
+ "type": "text",
1073
+ "text": "Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In ICML, 2017. ",
1074
+ "bbox": [
1075
+ 174,
1076
+ 303,
1077
+ 821,
1078
+ 330
1079
+ ],
1080
+ "page_idx": 8
1081
+ },
1082
+ {
1083
+ "type": "text",
1084
+ "text": "Chelsea Finn, Kelvin Xu, and Sergey Levine. Probabilistic model-agnostic meta-learning. In NeurIPS, 2018. ",
1085
+ "bbox": [
1086
+ 174,
1087
+ 338,
1088
+ 816,
1089
+ 354
1090
+ ],
1091
+ "page_idx": 8
1092
+ },
1093
+ {
1094
+ "type": "text",
1095
+ "text": "Victor Garcia and Joan Bruna. Few-shot learning with graph neural networks. In ICLR, 2018. ",
1096
+ "bbox": [
1097
+ 178,
1098
+ 362,
1099
+ 735,
1100
+ 377
1101
+ ],
1102
+ "page_idx": 8
1103
+ },
1104
+ {
1105
+ "type": "text",
1106
+ "text": "Spyros Gidaris and Nikos Komodakis. Dynamic few-shot visual learning without forgetting. In CVPR, 2018. ",
1107
+ "bbox": [
1108
+ 173,
1109
+ 385,
1110
+ 816,
1111
+ 400
1112
+ ],
1113
+ "page_idx": 8
1114
+ },
1115
+ {
1116
+ "type": "text",
1117
+ "text": "Spyros Gidaris and Nikos Komodakis. Generating classification weights with gnn denoising autoencoders for few-shot learning. In CVPR, 2019. ",
1118
+ "bbox": [
1119
+ 174,
1120
+ 409,
1121
+ 821,
1122
+ 435
1123
+ ],
1124
+ "page_idx": 8
1125
+ },
1126
+ {
1127
+ "type": "text",
1128
+ "text": "Michael Gutmann and Aapo Hyvärinen. Noise-contrastive estimation: A new estimation principle for unnormalized statistical models. In International Conference on Artificial Intelligence and Statistics, 2010. ",
1129
+ "bbox": [
1130
+ 173,
1131
+ 444,
1132
+ 823,
1133
+ 472
1134
+ ],
1135
+ "page_idx": 8
1136
+ },
1137
+ {
1138
+ "type": "text",
1139
+ "text": "Bharath Hariharan and Ross Girshick. Low-shot visual recognition by shrinking and hallucinating features. In CVPR, 2017. ",
1140
+ "bbox": [
1141
+ 174,
1142
+ 479,
1143
+ 823,
1144
+ 507
1145
+ ],
1146
+ "page_idx": 8
1147
+ },
1148
+ {
1149
+ "type": "text",
1150
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. ",
1151
+ "bbox": [
1152
+ 173,
1153
+ 515,
1154
+ 823,
1155
+ 544
1156
+ ],
1157
+ "page_idx": 8
1158
+ },
1159
+ {
1160
+ "type": "text",
1161
+ "text": "Mikael Henaff, Joan Bruna, and Yann LeCun. Deep convolutional networks on graph-structured data. arXiv preprint arXiv:1506.05163, 2015. ",
1162
+ "bbox": [
1163
+ 173,
1164
+ 551,
1165
+ 823,
1166
+ 579
1167
+ ],
1168
+ "page_idx": 8
1169
+ },
1170
+ {
1171
+ "type": "text",
1172
+ "text": "Ahmet Iscen, Giorgos Tolias, Yannis Avrithis, Teddy Furon, and Ondrej Chum. Efficient diffusion on region manifolds: Recovering small objects with compact cnn representations. In CVPR, 2017. ",
1173
+ "bbox": [
1174
+ 174,
1175
+ 587,
1176
+ 823,
1177
+ 614
1178
+ ],
1179
+ "page_idx": 8
1180
+ },
1181
+ {
1182
+ "type": "text",
1183
+ "text": "Armand Joulin, Laurens van der Maaten, Allan Jabri, and Nicolas Vasilache. Learning visual features from large weakly supervised data. In ECCV, 2016. ",
1184
+ "bbox": [
1185
+ 174,
1186
+ 623,
1187
+ 823,
1188
+ 650
1189
+ ],
1190
+ "page_idx": 8
1191
+ },
1192
+ {
1193
+ "type": "text",
1194
+ "text": "Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017. ",
1195
+ "bbox": [
1196
+ 174,
1197
+ 659,
1198
+ 823,
1199
+ 686
1200
+ ],
1201
+ "page_idx": 8
1202
+ },
1203
+ {
1204
+ "type": "text",
1205
+ "text": "Kuang-Huei Lee, Xiaodong He, Lei Zhang, and Linjun Yang. CleanNet: Transfer learning for scalable image classifier training with label noise. In CVPR, 2018. ",
1206
+ "bbox": [
1207
+ 174,
1208
+ 694,
1209
+ 823,
1210
+ 722
1211
+ ],
1212
+ "page_idx": 8
1213
+ },
1214
+ {
1215
+ "type": "text",
1216
+ "text": "Yuncheng Li, Jianchao Yang, Yale Song, Liangliang Cao, Jiebo Luo, and Li-Jia Li. Learning from noisy labels with distillation. In ICCV, 2017. ",
1217
+ "bbox": [
1218
+ 173,
1219
+ 731,
1220
+ 823,
1221
+ 757
1222
+ ],
1223
+ "page_idx": 8
1224
+ },
1225
+ {
1226
+ "type": "text",
1227
+ "text": "Tongliang Liu and Dacheng Tao. Classification with noisy labels by importance reweighting. IEEE Trans. PAMI, 38(3), 2015. ",
1228
+ "bbox": [
1229
+ 174,
1230
+ 766,
1231
+ 823,
1232
+ 794
1233
+ ],
1234
+ "page_idx": 8
1235
+ },
1236
+ {
1237
+ "type": "text",
1238
+ "text": "Yanbin Liu, Juho Lee, Minseop Park, Saehoon Kim, Eunho Yang, Sung Ju Hwang, and Yi Yang. Learning to propagate labels: Transductive propagation network for few-shot learning. In ICLR, 2019. ",
1239
+ "bbox": [
1240
+ 171,
1241
+ 801,
1242
+ 823,
1243
+ 829
1244
+ ],
1245
+ "page_idx": 8
1246
+ },
1247
+ {
1248
+ "type": "text",
1249
+ "text": "Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. ICLR, 2017. ",
1250
+ "bbox": [
1251
+ 176,
1252
+ 838,
1253
+ 772,
1254
+ 853
1255
+ ],
1256
+ "page_idx": 8
1257
+ },
1258
+ {
1259
+ "type": "text",
1260
+ "text": "Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. In ICML, 2010. ",
1261
+ "bbox": [
1262
+ 176,
1263
+ 861,
1264
+ 823,
1265
+ 888
1266
+ ],
1267
+ "page_idx": 8
1268
+ },
1269
+ {
1270
+ "type": "text",
1271
+ "text": "Nagarajan Natarajan, Inderjit S Dhillon, Pradeep K Ravikumar, and Ambuj Tewari. Learning with noisy labels. In NeurIPS, 2013. ",
1272
+ "bbox": [
1273
+ 174,
1274
+ 897,
1275
+ 825,
1276
+ 924
1277
+ ],
1278
+ "page_idx": 8
1279
+ },
1280
+ {
1281
+ "type": "text",
1282
+ "text": "Giorgio Patrini, Alessandro Rozza, Aditya Krishna Menon, Richard Nock, and Lizhen Qu. Making deep neural networks robust to label noise: A loss correction approach. In CVPR, 2017. ",
1283
+ "bbox": [
1284
+ 171,
1285
+ 103,
1286
+ 825,
1287
+ 131
1288
+ ],
1289
+ "page_idx": 9
1290
+ },
1291
+ {
1292
+ "type": "text",
1293
+ "text": "Hang Qi, Matthew Brown, and David G. Lowe. Low-shot learning with imprinted weights. In CVPR, June 2018. ",
1294
+ "bbox": [
1295
+ 171,
1296
+ 143,
1297
+ 823,
1298
+ 159
1299
+ ],
1300
+ "page_idx": 9
1301
+ },
1302
+ {
1303
+ "type": "text",
1304
+ "text": "Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. In ICLR, 2017. ",
1305
+ "bbox": [
1306
+ 171,
1307
+ 172,
1308
+ 754,
1309
+ 188
1310
+ ],
1311
+ "page_idx": 9
1312
+ },
1313
+ {
1314
+ "type": "text",
1315
+ "text": "Scott Reed, Honglak Lee, Dragomir Anguelov, Christian Szegedy, Dumitru Erhan, and Andrew Rabinovich. Training deep neural networks on noisy labels with bootstrapping. ICLR, 2015. ",
1316
+ "bbox": [
1317
+ 176,
1318
+ 200,
1319
+ 828,
1320
+ 228
1321
+ ],
1322
+ "page_idx": 9
1323
+ },
1324
+ {
1325
+ "type": "text",
1326
+ "text": "Mengye Ren, Sachin Ravi, Eleni Triantafillou, Jake Snell, Kevin Swersky, Josh B. Tenenbaum, Hugo Larochelle, and Richard S. Zemel. Meta-learning for semi-supervised few-shot classification. In ICLR, 2018a. ",
1327
+ "bbox": [
1328
+ 173,
1329
+ 241,
1330
+ 825,
1331
+ 268
1332
+ ],
1333
+ "page_idx": 9
1334
+ },
1335
+ {
1336
+ "type": "text",
1337
+ "text": "Mengye Ren, Wenyuan Zeng, Bin Yang, and Raquel Urtasun. Learning to reweight examples for robust deep learning. In ICML, 2018b. ",
1338
+ "bbox": [
1339
+ 174,
1340
+ 281,
1341
+ 823,
1342
+ 308
1343
+ ],
1344
+ "page_idx": 9
1345
+ },
1346
+ {
1347
+ "type": "text",
1348
+ "text": "Marcus Rohrbach, Sandra Ebert, and Bernt Schiele. Transfer learning in a transductive setting. In NeurIPS, 2013. ",
1349
+ "bbox": [
1350
+ 173,
1351
+ 321,
1352
+ 825,
1353
+ 349
1354
+ ],
1355
+ "page_idx": 9
1356
+ },
1357
+ {
1358
+ "type": "text",
1359
+ "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. IJCV, 115(3), 2015. ",
1360
+ "bbox": [
1361
+ 174,
1362
+ 362,
1363
+ 825,
1364
+ 401
1365
+ ],
1366
+ "page_idx": 9
1367
+ },
1368
+ {
1369
+ "type": "text",
1370
+ "text": "Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In NeurIPS, 2017. ",
1371
+ "bbox": [
1372
+ 174,
1373
+ 415,
1374
+ 825,
1375
+ 430
1376
+ ],
1377
+ "page_idx": 9
1378
+ },
1379
+ {
1380
+ "type": "text",
1381
+ "text": "Sainbayar Sukhbaatar, Joan Bruna, Manohar Paluri, Lubomir Bourdev, and Rob Fergus. Training convolutional networks with noisy labels. arXiv preprint arXiv:1406.2080, 2014. ",
1382
+ "bbox": [
1383
+ 174,
1384
+ 444,
1385
+ 823,
1386
+ 470
1387
+ ],
1388
+ "page_idx": 9
1389
+ },
1390
+ {
1391
+ "type": "text",
1392
+ "text": "Bart Thomee, David A. Shamma, Gerald Friedland, Benjamin Elizalde, Karl Ni, Douglas Poland, Damian Borth, and Li-Jia Li. Yfcc $1 0 0 \\mathrm { m }$ : The new data in multimedia research. Commun. ACM, 59(2), 2016. ",
1393
+ "bbox": [
1394
+ 174,
1395
+ 483,
1396
+ 825,
1397
+ 511
1398
+ ],
1399
+ "page_idx": 9
1400
+ },
1401
+ {
1402
+ "type": "text",
1403
+ "text": "Andreas Veit, Neil Alldrin, Gal Chechik, Ivan Krasin, Abhinav Gupta, and Serge Belongie. Learning from noisy large-scale datasets with minimal supervision. In CVPR, July 2017. ",
1404
+ "bbox": [
1405
+ 173,
1406
+ 523,
1407
+ 825,
1408
+ 551
1409
+ ],
1410
+ "page_idx": 9
1411
+ },
1412
+ {
1413
+ "type": "text",
1414
+ "text": "Ricardo Vilalta and Youssef Drissi. A perspective view and survey of meta-learning. Artificial intelligence review, 18(2):77–95, 2002. ",
1415
+ "bbox": [
1416
+ 173,
1417
+ 564,
1418
+ 823,
1419
+ 592
1420
+ ],
1421
+ "page_idx": 9
1422
+ },
1423
+ {
1424
+ "type": "text",
1425
+ "text": "Oriol Vinyals, Charles Blundell, Tim Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In NeurIPS, 2016. ",
1426
+ "bbox": [
1427
+ 174,
1428
+ 604,
1429
+ 825,
1430
+ 632
1431
+ ],
1432
+ "page_idx": 9
1433
+ },
1434
+ {
1435
+ "type": "text",
1436
+ "text": "Xiaolong Wang and Abhinav Gupta. Unsupervised learning of visual representations using videos. In CVPR, 2015. ",
1437
+ "bbox": [
1438
+ 173,
1439
+ 645,
1440
+ 825,
1441
+ 672
1442
+ ],
1443
+ "page_idx": 9
1444
+ },
1445
+ {
1446
+ "type": "text",
1447
+ "text": "Yisen Wang, Weiyang Liu, Xingjun Ma, James Bailey, Hongyuan Zha, Le Song, and Shu-Tao Xia. Iterative learning with open-set noisy labels. In CVPR, 2018a. ",
1448
+ "bbox": [
1449
+ 173,
1450
+ 686,
1451
+ 825,
1452
+ 713
1453
+ ],
1454
+ "page_idx": 9
1455
+ },
1456
+ {
1457
+ "type": "text",
1458
+ "text": "Yu-Xiong Wang, Ross Girshick, Martial Hebert, and Bharath Hariharan. Low-shot learning from imaginary data. In CVPR, 2018b. ",
1459
+ "bbox": [
1460
+ 171,
1461
+ 727,
1462
+ 825,
1463
+ 753
1464
+ ],
1465
+ "page_idx": 9
1466
+ },
1467
+ {
1468
+ "type": "text",
1469
+ "text": "Jason Weston, Frédéric Ratle, and Ronan Collobert. Deep learning via semi-supervised embedding. In ICML, 2008. ",
1470
+ "bbox": [
1471
+ 171,
1472
+ 767,
1473
+ 825,
1474
+ 795
1475
+ ],
1476
+ "page_idx": 9
1477
+ },
1478
+ {
1479
+ "type": "text",
1480
+ "text": "Zhirong Wu, Yuanjun Xiong, Stella Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance-level discrimination. CVPR, 2018. ",
1481
+ "bbox": [
1482
+ 173,
1483
+ 808,
1484
+ 825,
1485
+ 835
1486
+ ],
1487
+ "page_idx": 9
1488
+ },
1489
+ {
1490
+ "type": "text",
1491
+ "text": "Dengyong Zhou, Olivier Bousquet, Thomas Navin Lal, Jason Weston, and Bernhard Schölkopf. Learning with local and global consistency. In NeurIPS, 2003a. ",
1492
+ "bbox": [
1493
+ 173,
1494
+ 848,
1495
+ 823,
1496
+ 876
1497
+ ],
1498
+ "page_idx": 9
1499
+ },
1500
+ {
1501
+ "type": "text",
1502
+ "text": "Dengyong Zhou, Jason Weston, Arthur Gretton, Olivier Bousquet, and Bernhard Schölkopf. Ranking on data manifolds. In NeurIPS, 2003b. ",
1503
+ "bbox": [
1504
+ 171,
1505
+ 888,
1506
+ 823,
1507
+ 916
1508
+ ],
1509
+ "page_idx": 9
1510
+ },
1511
+ {
1512
+ "type": "image",
1513
+ "img_path": "images/d75584f0f38734e1f60b1588c31cd97d99ef2d5781c2f1c3f7deaf0d2182f12d.jpg",
1514
+ "image_caption": [
1515
+ "Figure 3: (a) Number of additional images per class $c$ sampled from YFCC-100M for all novel classes of Low-Shot ImageNet. (b) Number of classes per group, when $| X _ { \\mathcal { Z } } ^ { c } |$ is sampled logarithmically into groups. (c) Accuracy improvement $\\Delta$ Acc (difference of accuracy between our method with noisy examples and the baseline without noisy examples) for prototype classifier, for same groups as in (b). "
1516
+ ],
1517
+ "image_footnote": [],
1518
+ "bbox": [
1519
+ 184,
1520
+ 99,
1521
+ 828,
1522
+ 250
1523
+ ],
1524
+ "page_idx": 10
1525
+ },
1526
+ {
1527
+ "type": "text",
1528
+ "text": "A APPENDIX ",
1529
+ "text_level": 1,
1530
+ "bbox": [
1531
+ 176,
1532
+ 342,
1533
+ 297,
1534
+ 357
1535
+ ],
1536
+ "page_idx": 10
1537
+ },
1538
+ {
1539
+ "type": "text",
1540
+ "text": "Noisy data statistics. We present statistics about the noisy examples of novel classes and the improvements of our method per class. Figure 3 (a) shows that the noisy examples for novel classes are long tailed (in log scale). There is a significant number of classes where we end up with less than 1000 extra examples, but we improve nevertheless; see Figure 3 (c). A small exception is 4 very rare classes out of 311, with around 3 additional images per class (leftmost bin in Figure 3 (b) and (c)). Note that in real world applications, one could use more resources like web queries for additional data. ",
1541
+ "bbox": [
1542
+ 173,
1543
+ 376,
1544
+ 825,
1545
+ 474
1546
+ ],
1547
+ "page_idx": 10
1548
+ },
1549
+ {
1550
+ "type": "text",
1551
+ "text": "Impact of importance weight $\\lambda ,$ . We present the impact of $\\lambda$ (3) for different values of $k$ in the validation set of the extended Low-shot ImageNet benchmark in Figure 4. ",
1552
+ "bbox": [
1553
+ 171,
1554
+ 497,
1555
+ 825,
1556
+ 526
1557
+ ],
1558
+ "page_idx": 10
1559
+ },
1560
+ {
1561
+ "type": "image",
1562
+ "img_path": "images/75723f011baed9f80d3665089fcfcb5e9cf2105defc23b6659f2c9df36dc3084.jpg",
1563
+ "image_caption": [
1564
+ "Figure 4: Impact of $\\lambda$ on the validation set of the extended Low-shot ImageNet benchmark with YFCC-100M for noisy examples using class prototypes (6). "
1565
+ ],
1566
+ "image_footnote": [],
1567
+ "bbox": [
1568
+ 321,
1569
+ 554,
1570
+ 676,
1571
+ 656
1572
+ ],
1573
+ "page_idx": 10
1574
+ }
1575
+ ]
parse/train/Bke6vTVYwH/Bke6vTVYwH_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Bke6vTVYwH/Bke6vTVYwH_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hk2aImxAb/Hk2aImxAb.md ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MULTI-SCALE DENSE NETWORKS FOR RESOURCE EFFICIENT IMAGE CLASSIFICATION
2
+
3
+ Gao Huang Cornell University
4
+
5
+ Danlu Chen Fudan University
6
+
7
+ Tianhong Li Tsinghua University
8
+
9
+ Felix Wu Cornell University
10
+
11
+ Laurens van der Maaten Facebook AI Research
12
+
13
+ Kilian Weinberger Cornell University
14
+
15
+ # ABSTRACT
16
+
17
+ In this paper we investigate image classification with computational resource limits at test time. Two such settings are: 1. anytime classification, where the network’s prediction for a test example is progressively updated, facilitating the output of a prediction at any time; and 2. budgeted batch classification, where a fixed amount of computation is available to classify a set of examples that can be spent unevenly across “easier” and “harder” inputs. In contrast to most prior work, such as the popular Viola and Jones algorithm, our approach is based on convolutional neural networks. We train multiple classifiers with varying resource demands, which we adaptively apply during test time. To maximally re-use computation between the classifiers, we incorporate them as early-exits into a single deep convolutional neural network and inter-connect them with dense connectivity. To facilitate high quality classification early on, we use a two-dimensional multi-scale network architecture that maintains coarse and fine level features all-throughout the network. Experiments on three image-classification tasks demonstrate that our framework substantially improves the existing state-of-the-art in both settings.
18
+
19
+ # 1 INTRODUCTION
20
+
21
+ Recent years have witnessed a surge in demand for applications of visual object recognition, for instance, in self-driving cars (Bojarski et al., 2016) and content-based image search (Wan et al., 2014). This demand has in part been fueled through the promise generated by the astonishing progress of convolutional networks (CNNs) on visual object recognition benchmark competition datasets, such as ILSVRC (Deng et al., 2009) and COCO (Lin et al., 2014), where state-of-the-art models may have even surpassed human-level performance (He et al., 2015; 2016).
22
+
23
+ However, the requirements of such competitions differ from realworld applications, which tend to incentivize resource-hungry models with high computational demands at inference time. For example, the COCO 2016 competition was won by a large ensemble of computationally intensive $\mathrm { \dot { C } N N s ^ { 1 } }$ — a model likely far too computationally expensive for any resource-aware application. Although much smaller models would also obtain decent error, very large, computationally intensive models seem necessary to correctly classify the hard examples that make up the bulk of the remaining misclassifications of modern algorithms. To illustrate this point, Figure 1 shows two images of horses. The left image depicts a horse in canonical pose and is easy to classify, whereas the right image is taken from a rare viewpoint and is likely in the tail of the data distribution. Computationally intensive models are needed to classify such tail examples correctly, but are wasteful when applied to canonical images such as the left one.
24
+
25
+ ![](images/2e2e080304ad2c7be1e5890d21d32ed57f0cf575c439df5f869a545d4f732d05.jpg)
26
+ Figure 1: Two images containing a horse. The left image is canonical and easy to detect even with a small model, whereas the right image requires a computationally more expensive network architecture. (Copyright Pixel Addict and Doyle (CC BY-ND 2.0).)
27
+
28
+ In real-world applications, computation directly translates into power consumption, which should be minimized for environmental and economical reasons, and is a scarce commodity on mobile devices. This begs the question: why do we choose between either wasting computational resources by applying an unnecessarily computationally expensive model to easy images, or making mistakes by using an efficient model that fails to recognize difficult images? Ideally, our systems should automatically use small networks when test images are easy or computational resources limited, and use big networks when test images are hard or computation is abundant.
29
+
30
+ Such systems would be beneficial in at least two settings with computational constraints at testtime: anytime prediction, where the network can be forced to output a prediction at any given point in time; and budgeted batch classification, where a fixed computational budget is shared across a large set of examples which can be spent unevenly across “easy” and “hard” examples. A practical use-case of anytime prediction is in mobile apps on Android devices: in 2015, there existed 24, 093 distinct Android devices2, each with its own distinct computational limitations. It is infeasible to train a different network that processes video frame-by-frame at a fixed framerate for each of these devices. Instead, you would like to train a single network that maximizes accuracy on all these devices, within the computational constraints of that device. The budget batch classification setting is ubiquitous in large-scale machine learning applications. Search engines, social media companies, on-line advertising agencies, all must process large volumes of data on limited hardware resources. For example, as of 2010, Google Image Search had over 10 Billion images indexed3, which has likely grown to over 1 Trillion since. Even if a new model to process these images is only 1/10s slower per image, this additional cost would add 3170 years of CPU time. In the budget batch classification setting, companies can improve the average accuracy by reducing the amount of computation spent on “easy” cases to save up computation for “hard” cases.
31
+
32
+ Motivated by prior work in computer vision on resource-efficient recognition (Viola & Jones, 2001), we aim to develop CNNs that “slice” the computation and process these slices one-by-one, stopping the evaluation once the CPU time is depleted or the classification sufficiently certain (through “early exits”). Unfortunately, the architecture of CNNs is inherently at odds with the introduction of early exits. CNNs learn the data representation and the classifier jointly, which leads to two problems with early exits: 1. The features in the last layer are extracted directly to be used by the classifier, whereas earlier features are not. The inherent dilemma is that different kinds of features need to be extracted depending on how many layers are left until the classification. 2. The features in different layers of the network may have different scale. Typically, the first layers of a deep nets operate on a fine scale (to extract low-level features), whereas later layers transition (through pooling or strided convolution) to coarse scales that allow global context to enter the classifier. Both scales are needed but happen at different places in the network.
33
+
34
+ We propose a novel network architecture that addresses both of these problems through careful design changes, allowing for resource-efficient image classification. Our network uses a cascade of intermediate classifiers throughout the network. The first problem, of classifiers altering the internal representation, is addressed through the introduction of dense connectivity (Huang et al., 2017). By connecting all layers to all classifiers, features are no longer dominated by the most imminent earlyexit and the trade-off between early or later classification can be performed elegantly as part of the loss function. The second problem, the lack of coarse-scale features in early layers, is addressed by adopting a multi-scale network structure. At each layer we produce features of all scales (fine-tocoarse), which facilitates good classification early on but also extracts low-level features that only become useful after several more layers of processing. Our network architecture is illustrated in Figure 2, and we refer to it as Multi-Scale DenseNet (MSDNet).
35
+
36
+ We evaluate MSDNets on three image-classification datasets. In the anytime classification setting, we show that it is possible to provide the ability to output a prediction at any time while maintain high accuracies throughout. In the budget batch classification setting we show that MSDNets can be effectively used to adapt the amount of computation to the difficulty of the example to be classified, which allows us to reduce the computational requirements of our models drastically whilst performing on par with state-of-the-art CNNs in terms of overall classification accuracy. To our knowledge this is the first deep learning architecture of its kind that allows dynamic resource adaptation with a single model and obtains competitive results throughout.
37
+
38
+ ![](images/393456a645a070145e34d48f149ac9a7ed180043707a693bf4407c8f3be79371.jpg)
39
+ Figure 2: Illustration of the first four layers of an MSDNet with three scales. The horizontal direction corresponds to the layer direction (depth) of the network. The vertical direction corresponds to the scale of the feature maps. Horizontal arrows indicate a regular convolution operation, whereas diagonal and vertical arrows indicate a strided convolution operation. Classifiers only operate on feature maps at the coarsest scale. Connections across more than one layer are not drawn explicitly: they are implicit through recursive concatenations.
40
+
41
+ # 2 RELATED WORK
42
+
43
+ We briefly review related prior work on computation-efficient networks, memory-efficient networks, and resource-sensitive machine learning, from which our network architecture draws inspiration.
44
+
45
+ Computation-efficient networks. Most prior work on (convolutional) networks that are computationally efficient at test time focuses on reducing model size after training. In particular, many studies propose to prune weights (LeCun et al., 1989; Hassibi et al., 1993; Li et al., 2017) or quantize weights (Hubara et al., 2016; Rastegari et al., 2016) during or after training. These approaches are generally effective because deep networks often have a substantial number of redundant weights that can be pruned or quantized without sacrificing (and sometimes even improving) performance. Prior work also studies approaches that directly learn compact models with less parameter redundancy. For example, the knowledge-distillation method (Bucilua et al., 2006; Hinton et al., 2014) trains small student networks to reproduce the output of a much larger teacher network or ensemble. Our work differs from those approaches in that we train a single model that trades off computation for accuracy at test time without any re-training or finetuning. Indeed, weight pruning and knowledge distillation can be used in combination with our approach, and may lead to further improvements.
46
+
47
+ Resource-efficient machine learning. Various prior studies explore computationally efficient variants of traditional machine-learning models (Viola & Jones, 2001; Grubb & Bagnell, 2012; Karayev et al., 2014; Trapeznikov & Saligrama, 2013; Xu et al., 2012; 2013; Nan et al., 2015; Wang et al., 2015). Most of these studies focus on how to incorporate the computational requirements of computing particular features in the training of machine-learning models such as (gradient-boosted) decision trees. Whilst our study is certainly inspired by these results, the architecture we explore differs substantially: most prior work exploits characteristics of machine-learning models (such as decision trees) that do not apply to deep networks. Our work is possibly most closely related to recent work on FractalNets (Larsson et al., 2017), which can perform anytime prediction by progressively evaluating subnetworks of the full network. FractalNets differ from our work in that they are not explicitly optimized for computation efficiency and consequently our experiments show that MSDNets substantially outperform FractalNets. Our dynamic evaluation strategy for reducing batch computational cost is closely related to the the adaptive computation time approach (Graves, 2016; Figurnov et al., 2016), and the recently proposed method of adaptively evaluating neural networks (Bolukbasi et al., 2017). Different from these works, our method adopts a specially designed network with multiple classifiers, which are jointly optimized during training and can directly output confidence scores to control the evaluation process for each test example. The adaptive computation time method (Graves, 2016) and its extension (Figurnov et al., 2016) also perform adaptive evaluation on test examples to save batch computational cost, but focus on skipping units rather than layers. In (Odena et al., 2017), a “composer”model is trained to construct the evaluation network from a set of sub-modules for each test example. By contrast, our work uses a single CNN with multiple intermediate classifiers that is trained end-to-end. The Feedback Networks (Zamir et al., 2016) enable early predictions by making predictions in a recurrent fashion, which heavily shares parameters among classifiers, but is less efficient in sharing computation.
48
+
49
+ Related network architectures. Our network architecture borrows elements from neural fabrics (Saxena & Verbeek, 2016) and others (Zhou et al., 2015; Jacobsen et al., 2017; Ke et al., 2016)
50
+
51
+ ![](images/6c59242daaab86116b0562f24208342d867eb57b7d0db805e434894dcf77ee2c.jpg)
52
+ Figure 3: Relative accuracy of the intermediate classifier (left) and the final classifier (right) when introducing a single intermediate classifier at different layers in a ResNet, DenseNet and MSDNet. All experiments were performed on the CIFAR-100 dataset. Higher is better.
53
+
54
+ to rapidly construct a low-resolution feature map that is amenable to classification, whilst also maintaining feature maps of higher resolution that are essential for obtaining high classification accuracy. Our design differs from the neural fabrics (Saxena & Verbeek, 2016) substantially in that MSDNets have a reduced number of scales and no sparse channel connectivity or up-sampling paths. MSDNets are at least one order of magnitude more efficient and typically more accurate — for example, an MSDNet with less than 1 million parameters obtains a test error below $7 . 0 \%$ on CIFAR-10 (Krizhevsky & Hinton, 2009), whereas Saxena & Verbeek (2016) report $7 . 4 3 \%$ with over 20 million parameters. We use the same feature-concatenation approach as DenseNets (Huang et al., 2017), which allows us to bypass features optimized for early classifiers in later layers of the network. Our architecture is related to deeply supervised networks (Lee et al., 2015) in that it incorporates classifiers at multiple layers throughout the network. In contrast to all these prior architectures, our network is specifically designed to operate in resource-aware settings.
55
+
56
+ # 3 PROBLEM SETUP
57
+
58
+ We consider two settings that impose computational constraints at prediction time.
59
+
60
+ Anytime prediction. In the anytime prediction setting (Grubb & Bagnell, 2012), there is a finite computational budget $B > 0$ available for each test example $\mathbf { x }$ . The computational budget is nondeterministic, and varies per test instance. It is determined by the occurrence of an event that requires the model to output a prediction immediately. We assume that the budget is drawn from some joint distribution $P ( \mathbf { x } , B )$ . In some applications $P ( B )$ may be independent of $P ( \mathbf { x } )$ and can be estimated. For example, if the event is governed by a Poisson process, $P ( B )$ is an exponential distribution. We denote the loss of a model $f ( \mathbf { x } )$ that has to produce a prediction for instance $\mathbf { x }$ within budget $B$ by $L ( f ( \mathbf { x } ) , B )$ . The goal of an anytime learner is to minimize the expected loss under the budget distribution: $L ( f ) = \mathbb { E } \left[ L ( f ( \mathbf { x } ) , B ) \right] _ { P ( \mathbf { x } , B ) } .$ Here, $L ( \cdot )$ denotes a suitable loss function. As is common in the empirical risk minimization framework, the expectation under $P ( \mathbf { x } , B )$ may be estimated by an average over samples from $P ( \mathbf { x } , B )$ .
61
+
62
+ Budgeted batch classification. In the budgeted batch classification setting, the model needs to classify a set of examples $\mathcal { D } _ { t e s t } = \{ \mathbf { x } _ { 1 } , \ldots , \mathbf { x } _ { M } \}$ within a finite computational budget $B > 0$ that is known in advance. The learner aims to minimize the loss across all examples in $\mathcal { D } _ { t e s t }$ within a cumulative cost bounded by $B$ , which we denote by $L ( f ( \mathcal { D } _ { t e s t } ) , B )$ for some suitable loss function $L ( \cdot )$ . It can potentially do so by spending less than BM computation on classifying an “easy” example whilst using more than $\textstyle { \frac { B } { M } }$ computation on classifying a “difficult” example. Therefore, the budget considered here is a soft constraint when we have a large batch of testing samples.
63
+
64
+ # 4 MULTI-SCALE DENSE CONVOLUTIONAL NETWORKS
65
+
66
+ A straightforward solution to the two problems introduced in Section 3 is to train multiple networks of increasing capacity, and sequentially evaluate them at test time (as in Bolukbasi et al. (2017)). In the anytime setting the evaluation can be stopped at any point and the most recent prediction is returned. In the batch setting, the evaluation is stopped prematurely the moment a network classifies the test sample with sufficient confidence. When the resources are so limited that the execution is terminated after the first network, this approach is optimal because the first network is trained for exactly this computational budget without compromises. However, in both settings, this scenario is rare. In the more common scenario where some test samples can require more processing time than others the approach is far from optimal because previously learned features are never re-used across the different networks.
67
+
68
+ An alternative solution is to build a deep network with a cascade of classifiers operating on the features of internal layers: in such a network features computed for an earlier classifier can be re-used by later classifiers. However, na¨ıvely attaching intermediate early-exit classifiers to a stateof-the-art deep network leads to poor performance.
69
+
70
+ There are two reasons why intermediate early-exit classifiers hurt the performance of deep neural networks: early classifiers lack coarse-level features and classifiers throughout interfere with the feature generation process. In this section we investigate these effects empirically (see Figure 3) and, in response to our findings, propose the MSDNet architecture illustrated in Figure 2.
71
+
72
+ Problem: The lack of coarse-level features. Traditional neural networks learn features of fine scale in early layers and coarse scale in later layers (through repeated convolution, pooling, and strided convolution). Coarse scale features in the final layers are important to classify the content of the whole image into a single class. Early layers lack coarse-level features and early-exit classifiers attached to these layers will likely yield unsatisfactory high error rates. To illustrate this point, we attached4 intermediate classifiers to varying layers of a ResNet (He et al., 2016) and a DenseNet (Huang et al., 2017) on the CIFAR-100 dataset (Krizhevsky & Hinton, 2009). The blue and red dashed lines in the left plot of Figure 3 show the relative accuracies of these classifiers. All three plots gives rise to a clear trend: the accuracy of a classifier is highly correlated with its position within the network. Particularly in the case of the ResNet (blue line), one can observe a visible “staircase” pattern, with big improvements after the 2nd and 4th classifiers — located right after pooling layers.
73
+
74
+ Solution: Multi-scale feature maps. To address this issue, MSDNets maintain a feature representation at multiple scales throughout the network, and all the classifiers only use the coarse-level features. The feature maps at a particular layer5 and scale are computed by concatenating the results of one or two convolutions: 1. the result of a regular convolution applied on the same-scale features from the previous layer (horizontal connections) and, if possible, 2. the result of a strided convolution applied on the finer-scale feature map from the previous layer (diagonal connections). The horizontal connections preserve and progress high-resolution information, which facilitates the construction of high-quality coarse features in later layers. The vertical connections produce coarse features throughout that are amenable to classification. The dashed black line in Figure 3 shows that MSDNets substantially increase the accuracy of early classifiers.
75
+
76
+ Problem: Early classifiers interfere with later classifiers. The right plot of Figure 3 shows the accuracies of the final classifier as a function of the location of a single intermediate classifier, relative to the accuracy of a network without intermediate classifiers. The results show that the introduction of an intermediate classifier harms the final ResNet classifier (blue line), reducing its accuracy by up to $7 \%$ . We postulate that this accuracy degradation in the ResNet may be caused by the intermediate classifier influencing the early features to be optimized for the short-term and not for the final layers. This improves the accuracy of the immediate classifier but collapses information required to generate high quality features in later layers. This effect becomes more pronounced when the first classifier is attached to an earlier layer.
77
+
78
+ Solution: Dense connectivity. By contrast, the DenseNet (red line) suffers much less from this effect. Dense connectivity (Huang et al., 2017) connects each layer with all subsequent layers and allows later layers to bypass features optimized for the short-term, to maintain the high accuracy of the final classifier. If an earlier layer collapses information to generate short-term features, the lost information can be recovered through the direct connection to its preceding layer. The final classifier’s performance becomes (more or less) independent of the location of the intermediate classifier. As far as we know, this is the first paper that discovers that dense connectivity is an important element to early-exit classifiers in deep networks, and we make it an integral design choice in MSDNets.
79
+
80
+ ![](images/8de8c69d9d36a341a0373469c5e2695c92df31ad7bca8cfbfd76709c742d677e.jpg)
81
+ Figure 4: The output $\mathbf { x } _ { \ell } ^ { s }$ of layer $\ell$ at the $s ^ { \mathrm { t h } }$ scale in a MSDNet. Herein, [. . . ] denotes the concatenation operator, $h _ { \ell } ^ { s } ( \cdot )$ a regular convolution transformation, and $\tilde { h } _ { \ell } ^ { s } ( \cdot )$ a strided convolutional. Note that the outputs of $h _ { \ell } ^ { s }$ and $\tilde { h } _ { \ell } ^ { s }$ have the same feature map size; their outputs are concatenated along the channel dimension.
82
+
83
+ # 4.1 THE MSDNET ARCHITECTURE
84
+
85
+ The MSDNet architecture is illustrated in Figure 2. We present its main components below. Additional details on the architecture are presented in Appendix A.
86
+
87
+ First layer. The first layer $\ell = 1 $ ) is unique as it includes vertical connections in Figure 2. Its main purpose is to “seed” representations on all $S$ scales. One could view its vertical layout as a miniature “S-layers” convolutional network $S { = } 3$ in Figure 2). Let us denote the output feature maps at layer $\ell$ and scale $s$ as $\mathbf { x } _ { \ell } ^ { s }$ and the original input image as $\mathbf { x } _ { 0 } ^ { 1 }$ . Feature maps at coarser scales are obtained via down-sampling. The output $\mathbf { x } _ { 1 } ^ { s }$ of the first layer is formally given in the top row of Figure 4.
88
+
89
+ Subsequent layers. Following Huang et al. (2017), the output feature maps $\mathbf { x } _ { \ell } ^ { s }$ produced at subsequent layers, $\ell > 1$ , and scales, $s$ , are a concatenation of transformed feature maps from all previous feature maps of scale $s$ and $s - 1$ (if $s > 1$ ). Formally, the $\ell \cdot$ -th layer of our network outputs a set of features at $S$ scales $\big \{ \mathbf { x } _ { \ell } ^ { 1 } , \dots , \mathbf { x } _ { \ell } ^ { S } \big \}$ , given in the last row of Figure 4.
90
+
91
+ Classifiers. The classifiers in MSDNets also follow the dense connectivity pattern within the coarsest scale, $S$ , i.e., the classifier at layer $\ell$ uses all the features $\left[ \mathbf { x } _ { 1 } ^ { S } , \ldots , \mathbf { x } _ { \ell } ^ { S } \right]$ . Each classifier consists of two convolutional layers, followed by one average pooling layer and one linear layer. In practice, we only attach classifiers to some of the intermediate layers, and we let $f _ { k } ( \cdot )$ denote the $k ^ { \mathrm { { t h } } }$ classifier. During testing in the anytime setting we propagate the input through the network until the budget is exhausted and output the most recent prediction. In the batch budget setting at test time, an example traverses the network and exits after classifier $f _ { k }$ if its prediction confidence (we use the maximum value of the softmax probability as a confidence measure) exceeds a pre-determined threshold $\theta _ { k }$ . Before training, we compute the computational cost, $C _ { k }$ , required to process the network up to the $k ^ { \mathrm { { t h } } }$ classifier. We denote by $0 < q \le 1$ a fixed exit probability that a sample that reaches a classifier will obtain a classification with sufficient confidence to exit. We assume that $q$ is constant across all layers, which allows us to compute the probability that a sample exits at classifier $k$ as: $q _ { k } = z ( 1 - q ) ^ { \bar { k ^ { - 1 } } q }$ , where $z$ is a normalizing constant that ensures that $\begin{array} { r } { \sum _ { k } p ( q _ { k } ) = 1 } \end{array}$ . At test time, we need to ensure that the overall cost of classifying all samples in $\mathcal { D } _ { t e s t }$ does not exceed our budget $B$ (in expectation). This gives rise to the constraint $\begin{array} { r } { \left| \mathcal { D } _ { t e s t } \right| \sum _ { k } q _ { k } C _ { k } \le B } \end{array}$ . We can solve this constraint for $q$ and determine the thresholds $\theta _ { k }$ on a validation set in such a way that approximately $| \mathcal { D } _ { t e s t } | q _ { k }$ validation samples exit at the $k ^ { \mathrm { { t h } } }$ classifier.
92
+
93
+ Loss functions. During training we use cross entropy loss functions $L ( f _ { k } )$ for all classifiers and minimize a weighted cumulative loss: $\begin{array} { r } { \frac { 1 } { | \mathcal { D } | } \sum _ { ( \mathbf { x } , y ) \in \mathcal { D } } \mathbf { \tilde { \sum } } _ { k } w _ { k } L ( f _ { k } ) } \end{array}$ . Herein, $\mathcal { D }$ denotes the training set and $w _ { k } \ge 0$ the weight of the $k$ -th classifier. If the budget distribution $P ( B )$ is known, we can use the weights $w _ { k }$ to incorporate our prior knowledge about the budget $B$ in the learning. Empirically, we find that using the same weight for all loss functions (i.e., setting $\forall k : w _ { k } = 1$ ) works well in practice.
94
+
95
+ Network reduction and lazy evaluation. There are two straightforward ways to further reduce the computational requirements of MSDNets. First, it is inefficient to maintain all the finer scales until the last layer of the network. One simple strategy to reduce the size of the network is by splitting it into $S$ blocks along the depth dimension, and only keeping the coarsest $( S - i + 1 )$ scales in the $i ^ { \mathrm { t h } }$ block (a schematic layout of this structure is shown in Figure 9). This reduces computational cost for both training and testing. Every time a scale is removed from the network, we add a transition layer between the two blocks that merges the concatenated features using a $1 \times 1$ convolution and cuts the number of channels in half before feeding the fine-scale features into the coarser scale via a strided convolution (this is similar to the DenseNet-BC architecture of Huang et al. (2017)). Second, since a classifier at layer $\ell$ only uses features from the coarsest scale, the finer feature maps in layer $\ell$ (and some of the finer feature maps in the previous $S - 2$ layers) do not influence the prediction of that classifier. Therefore, we group the computation in “diagonal blocks” such that we only propagate the example along paths that are required for the evaluation of the next classifier. This minimizes unnecessary computations when we need to stop because the computational budget is exhausted. We call this strategy lazy evaluation.
96
+
97
+ # 5 EXPERIMENTS
98
+
99
+ We evaluate the effectiveness of our approach on three image classification datasets, i.e., the CIFAR10, CIFAR-100 (Krizhevsky & Hinton, 2009) and ILSVRC 2012 (ImageNet; Deng et al. (2009)) datasets. Code to reproduce all results is available at https://anonymous-url. Details on architectural configurations of MSDNets are described in Appendix A.
100
+
101
+ Datasets. The two CIFAR datasets contain 50, 000 training and 10, 000 test images of $3 2 \times 3 2$ pixels; we hold out 5, 000 training images as a validation set. The datasets comprise 10 and 100 classes, respectively. We follow He et al. (2016) and apply standard data-augmentation techniques to the training images: images are zero-padded with 4 pixels on each side, and then randomly cropped to produce $3 2 \times 3 2$ images. Images are flipped horizontally with probability 0.5, and normalized by subtracting channel means and dividing by channel standard deviations. The ImageNet dataset comprises 1, 000 classes, with a total of 1.2 million training images and 50,000 validation images. We hold out 50,000 images from the training set to estimate the confidence threshold for classifiers in MSDNet. We adopt the data augmentation scheme of He et al. (2016) at training time; at test time, we classify a $2 2 4 \times 2 2 4$ center crop of images that were resized to $2 5 6 \times 2 5 6$ pixels.
102
+
103
+ Training Details. We train all models using the framework of Gross & Wilber (2016). On the two CIFAR datasets, all models (including all baselines) are trained using stochastic gradient descent (SGD) with mini-batch size 64. We use Nesterov momentum with a momentum weight of 0.9 without dampening, and a weight decay of $1 0 ^ { - 4 }$ . All models are trained for 300 epochs, with an initial learning rate of 0.1, which is divided by a factor 10 after 150 and 225 epochs. We apply the same optimization scheme to the ImageNet dataset, except that we increase the mini-batch size to 256, and all the models are trained for 90 epochs with learning rate drops after 30 and 60 epochs.
104
+
105
+ # 5.1 ANYTIME PREDICTION
106
+
107
+ In the anytime prediction setting, the model maintains a progressively updated distribution over classes, and it can be forced to output its most up-to-date prediction at an arbitrary time.
108
+
109
+ Baselines. There exist several baseline approaches for anytime prediction: FractalNets (Larsson et al., 2017), deeply supervised networks (Lee et al., 2015), and ensembles of deep networks of varying or identical sizes. FractalNets allow for multiple evaluation paths during inference time, which vary in computation time. In the anytime setting, paths are evaluated in order of increasing computation. In our result figures, we replicate the FractalNet results reported in the original paper (Larsson et al., 2017) for reference. Deeply supervised networks introduce multiple early-exit classifiers throughout a network, which are applied on the features of the particular layer they are attached to. Instead of using the original model proposed in Lee et al. (2015), we use the more competitive ResNet and DenseNet architectures (referred to as DenseNet- $B C$ in Huang et al. (2017)) as the base networks in our experiments with deeply supervised networks. We refer to these as $R e s N e t ^ { M C }$ and DenseNetMC, where $M C$ stands for multiple classifiers. Both networks require about $1 . 3 \times 1 0 ^ { 8 }$ FLOPs when fully evaluated; the detailed network configurations are presented in the supplementary material. In addition, we include ensembles of ResNets and DenseNets of varying or identical sizes. At test time, the networks are evaluated sequentially (in ascending order of network size) to obtain predictions for the test data. All predictions are averaged over the evaluated classifiers. On
110
+
111
+ ![](images/0e595351824a020ac424bb128829df21d92c0ecca2b1cea17c58c737e1308b61.jpg)
112
+ Figure 5: Accuracy (top-1) of anytime prediction models as a function of computational budget on the ImageNet (left) and CIFAR-100 (right) datasets. Higher is better.
113
+
114
+ ImageNet, we compare MSDNet against a highly competitive ensemble of ResNets and DenseNets, with depth varying from 10 layers to 50 layers, and 36 layers to 121 layers, respectively.
115
+
116
+ Anytime prediction results are presented in Figure 5. The left plot shows the top-1 classification accuracy on the ImageNet validation set. Here, for all budgets in our evaluation, the accuracy of MSDNet substantially outperforms the ResNets and DenseNets ensemble. In particular, when the budget ranges from $0 . 1 \times \bar { 1 0 } ^ { 1 0 }$ to $0 . 3 \times 1 0 ^ { 1 0 }$ FLOPs, MSDNet achieves $\sim 4 \% - 8 \%$ higher accuracy.
117
+
118
+ We evaluate more baselines on CIFAR-100 (and CIFAR-10; see supplementary materials). We observe that MSDNet substantially outperforms ResNetsMC and DenseNetsMC at any computational budget within our range. This is due to the fact that after just a few layers, MSDNets have produced low-resolution feature maps that are much more suitable for classification than the high-resolution feature maps in the early layers of ResNets or DenseNets. MSDNet also outperforms the other baselines for nearly all computational budgets, although it performs on par with ensembles when the budget is very small. In the extremely low-budget regime, ensembles have an advantage because their predictions are performed by the first (small) network, which is optimized exclusively for the low budget. However, the accuracy of ensembles does not increase nearly as fast when the budget is increased. The MSDNet outperforms the ensemble as soon as the latter needs to evaluate a second model: unlike MSDNets, this forces the ensemble to repeat the computation of similar low-level features repeatedly. Ensemble accuracies saturate rapidly when all networks are shallow.
119
+
120
+ # 5.2 BUDGETED BATCH CLASSIFICATION
121
+
122
+ In budgeted batch classification setting, the predictive model receives a batch of $M$ instances and a computational budget $B$ for classifying all $M$ instances. In this setting, we use dynamic evaluation: we perform early-exiting of “easy” examples at early classifiers whilst propagating “hard” examples through the entire network, using the procedure described in Section 4.
123
+
124
+ Baselines. On ImageNet, we compare the dynamically evaluated MSDNet with five ResNets (He et al., 2016) and five DenseNets (Huang et al., 2017), AlexNet (Krizhevsky et al., 2012), and GoogleLeNet (Szegedy et al., 2015); see the supplementary material for details. We also evaluate an ensemble of the five ResNets that uses exactly the same dynamic-evaluation procedure as MSDNets at test time: “easy” images are only propagated through the smallest ResNet-10, whereas “hard” images are classified by all five ResNet models (predictions are averaged across all evaluated networks in the ensemble). We classify batches of $M = 1 2 8$ images.
125
+
126
+ On CIFAR-100, we compare MSDNet with several highly competitive baselines, including ResNets (He et al., 2016), DenseNets (Huang et al., 2017) of varying sizes, Stochastic Depth Networks (Huang et al., 2016), Wide ResNets (Zagoruyko & Komodakis, 2016) and FractalNets (Larsson et al., 2017). We also compare MSDNet to the $\mathrm { R e s N e t ^ { M C } }$ and DenseNetMC models that were used in Section 5.1, using dynamic evaluation at test time. We denote these baselines as $R e s N e t ^ { M C }$ / DenseNetMC with early-exits. To prevent the result plots from becoming too cluttered, we present CIFAR-100 results with dynamically evaluated ensembles in the supplementary material. We classify batches of $M = 2 5 6$ images at test time.
127
+
128
+ Budgeted batch classification results on ImageNet are shown in the left panel of Figure 7. We trained three MSDNets with different depths, each of which covers a different range of computational budgets. We plot the performance of each MSDNet as a gray curve; we select the best model for each budget based on its accuracy on the validation set, and plot the corresponding accuracy as a black curve. The plot shows that the predictions of MSDNets with dynamic evaluation are substantially more accurate than those of ResNets and DenseNets that use the same amount of computation. For instance, with an average budget of $1 . 7 \times 1 0 ^ { 9 }$ FLOPs, MSDNet achieves a top-1 accuracy of ${ \sim } 7 5 \%$ , which is ${ \sim } 6 \%$ higher than that achieved by a ResNet with the same number of FLOPs. Compared to the computationally efficient DenseNets, MSDNet uses $\sim 2 - 3 \times$ times fewer FLOPs to achieve the same classification accuracy. Moreover, MSDNet with dynamic evaluation allows for very precise tuning of the computational budget that is consumed, which is not possible with individual ResNet or DenseNet models. The ensemble of ResNets or DenseNets with dynamic evaluation performs on par with or worse than their individual counterparts (but they do allow for setting the computational budget very precisely).
129
+
130
+ ![](images/047b8902b777ad1edf01cc1798508fdcb86d98ce8b5ec9a2971efe96719d19ec.jpg)
131
+ Figure 7: Accuracy (top-1) of budgeted batch classification models as a function of average computational budget per image the on ImageNet (left) and CIFAR-100 (right) datasets. Higher is better.
132
+
133
+ The right panel of Figure 7 shows our results on CIFAR-100. The results show that MSDNets consistently outperform all baselines across all budgets. Notably, MSDNet performs on par with a 110- layer ResNet using only 1/10th of the computational budget and it is up to $\sim 5$ times more efficient than DenseNets, Stochastic Depth Networks, Wide ResNets, and FractalNets. Similar to results in the anytime-prediction setting, MSDNet substantially outperform ResNetsMC and DenseNets $_ { M C }$ with multiple intermediate classifiers, which provides further evidence that the coarse features in the MSDNet are important for high performance in earlier layers.
134
+
135
+ Visualization. To illustrate the ability of our approach to reduce the computational requirements for classifying “easy” examples, we show twelve randomly sampled test images from two ImageNet classes in Figure 6. The top row shows “easy” examples that were correctly classified and exited by the first classifier. The bottom row shows “hard” examples that would have been incorrectly classified by the first classifier but were passed on because its uncertainty was too high. The figure suggests that early classifiers recognize prototypical class examples, whereas the last classifier recognizes non-typical images.
136
+
137
+ ![](images/105e212787f02ba3ad81fe470cd4782e898e2825cb6b2147833e9bbcf9aa8bfb.jpg)
138
+ Figure 6: Sampled images from the ImageNet classes Red wine and Volcano. Top row: images exited from the first classifier of a MSDNet with correct prediction; Bottom row: images failed to be correctly classified at the first classifier but were correctly predicted and exited at the last layer.
139
+
140
+ # 5.3 MORE COMPUTATIONALLY EFFICIENT DENSENETS
141
+
142
+ Here, we discuss an interesting finding during our exploration of the MSDNet architecture. We found that following the DenseNet structure to design our network, i.e., by keeping the number of output channels (or growth rate) the same at all scales, did not lead to optimal results in terms of the accuracy-speed trade-off. The main reason for this is that compared to network architectures like ResNets, the DenseNet structure tends to apply more filters on the high-resolution feature maps in the network. This helps to reduce the number of parameters in the model, but at the same time, it greatly increases the computational cost. We tried to modify DenseNets by doubling the growth rate after each transition layer, so that more filters are applied to low-resolution feature maps. It turns out that the resulting network, which we denote as DenseNet\*, significantly outperform the original DenseNet in terms of computational efficiency.
143
+
144
+ ![](images/f82f1fa9b6ae7df691196495c61b67a76cd3e63f7fdf3cb3be3f5fd5bc49b88b.jpg)
145
+ Figure 8: Test accuracy of DenseNet\* on CIFAR-100 under the anytime learning setting (left) and the budgeted batch setting (right).
146
+
147
+ We experimented with DenseNet\* in our two settings with test time budget constraints. The left panel of Figure 8 shows the anytime prediction performance of an ensemble of DenseNets\* of varying depths. It outperforms the ensemble of original DenseNets of varying depth by a large margin, but is still slightly worse than MSDNets. In the budgeted batch budget setting, DenseNet\* also leads to significantly higher accuracy over its counterpart under all budgets, but is still substantially outperformed by MSDNets.
148
+
149
+ # 6 CONCLUSION
150
+
151
+ We presented the MSDNet, a novel convolutional network architecture, optimized to incorporate CPU budgets at test-time. Our design is based on two high-level design principles, to generate and maintain coarse level features throughout the network and to inter-connect the layers with dense connectivity. The former allows us to introduce intermediate classifiers even at early layers and the latter ensures that these classifiers do not interfere with each other. The final design is a two dimensional array of horizontal and vertical layers, which decouples depth and feature coarseness. Whereas in traditional convolutional networks features only become coarser with increasing depth, the MSDNet generates features of all resolutions from the first layer on and maintains them throughout. The result is an architecture with an unprecedented range of efficiency. A single network can outperform all competitive baselines on an impressive range of computational budgets ranging from highly limited CPU constraints to almost unconstrained settings.
152
+
153
+ As future work we plan to investigate the use of resource-aware deep architectures beyond object classification, e.g. image segmentation (Long et al., 2015). Further, we intend to explore approaches that combine MSDNets with model compression (Chen et al., 2015; Han et al., 2015), spatially adaptive computation (Figurnov et al., 2016) and more efficient convolution operations (Chollet, 2016; Howard et al., 2017) to further improve computational efficiency.
154
+
155
+ # ACKNOWLEDGMENTS
156
+
157
+ The authors are supported in part by grants from the National Science Foundation ( III-1525919, IIS-1550179, IIS-1618134, S&AS 1724282, and CCF-1740822), the Office of Naval Research DOD (N00014-17-1-2175), and the Bill and Melinda Gates Foundation.
158
+
159
+ # REFERENCES
160
+
161
+ Mariusz Bojarski, Davide Del Testa, Daniel Dworakowski, Bernhard Firner, Beat Flepp, Prasoon Goyal, Lawrence D Jackel, Mathew Monfort, Urs Muller, Jiakai Zhang, et al. End to end learning for self-driving cars. arXiv preprint arXiv:1604.07316, 2016.
162
+
163
+ Tolga Bolukbasi, Joseph Wang, Ofer Dekel, and Venkatesh Saligrama. Adaptive neural networks for fast test-time prediction. arXiv preprint arXiv:1702.07811, 2017.
164
+ Cristian Bucilua, Rich Caruana, and Alexandru Niculescu-Mizil. Model compression. In ACM SIGKDD, pp. 535–541. ACM, 2006.
165
+ Wenlin Chen, James T Wilson, Stephen Tyree, Kilian Q Weinberger, and Yixin Chen. Compressing neural networks with the hashing trick. In ICML, pp. 2285–2294, 2015.
166
+ Franc¸ois Chollet. Xception: Deep learning with depthwise separable convolutions. arXiv preprint arXiv:1610.02357, 2016.
167
+ Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, pp. 248–255, 2009.
168
+ Michael Figurnov, Maxwell D Collins, Yukun Zhu, Li Zhang, Jonathan Huang, Dmitry Vetrov, and Ruslan Salakhutdinov. Spatially adaptive computation time for residual networks. arXiv preprint arXiv:1612.02297, 2016.
169
+ Alex Graves. Adaptive computation time for recurrent neural networks. arXiv preprint arXiv:1603.08983, 2016.
170
+ Sam Gross and Michael Wilber. Training and investigating residual nets. 2016. URL http: //torch.ch/blog/2016/02/04/resnets.html.
171
+ Alexander Grubb and Drew Bagnell. Speedboost: Anytime prediction with uniform near-optimality. In AISTATS, volume 15, pp. 458–466, 2012.
172
+ Song Han, Huizi Mao, and William J. Dally. Deep compression: Compressing deep neural network with pruning, trained quantization and huffman coding. CoRR, abs/1510.00149, 2015.
173
+ Babak Hassibi, David G Stork, and Gregory J Wolff. Optimal brain surgeon and general network pruning. In IJCNN, pp. 293–299, 1993.
174
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In ICCV, pp. 1026–1034, 2015.
175
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pp. 770–778, 2016.
176
+ Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. In NIPS Deep Learning Workshop, 2014.
177
+ Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017.
178
+ Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q Weinberger. Deep networks with stochastic depth. In ECCV, pp. 646–661. Springer, 2016.
179
+ Gao Huang, Zhuang Liu, Kilian Q Weinberger, and Laurens van der Maaten. Densely connected convolutional networks. In CVPR, 2017.
180
+ Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Binarized neural networks. In NIPS, pp. 4107–4115, 2016.
181
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, pp. 770–778, 2015.
182
+ Jorn-Henrik Jacobsen, Edouard Oyallon, St ¨ ephane Mallat, and Arnold WM Smeulders. Multiscale ´ hierarchical convolutional networks. arXiv preprint arXiv:1703.04140, 2017.
183
+ Sergey Karayev, Mario Fritz, and Trevor Darrell. Anytime recognition of objects and scenes. In CVPR, pp. 572–579, 2014.
184
+ Tsung-Wei Ke, Michael Maire, and Stella X. Yu. Neural multigrid. CoRR, abs/1611.07661, 2016. URL http://arxiv.org/abs/1611.07661.
185
+ Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Tech Report, 2009.
186
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pp. 1097–1105, 2012.
187
+ Gustav Larsson, Michael Maire, and Gregory Shakhnarovich. Fractalnet: Ultra-deep neural networks without residuals. In ICLR, 2017.
188
+ Yann LeCun, John S Denker, Sara A Solla, Richard E Howard, and Lawrence D Jackel. Optimal brain damage. In NIPS, volume 2, pp. 598–605, 1989.
189
+ Chen-Yu Lee, Saining Xie, Patrick W Gallagher, Zhengyou Zhang, and Zhuowen Tu. Deeplysupervised nets. In AISTATS, volume 2, pp. 5, 2015.
190
+ Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. In ICLR, 2017.
191
+ Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ´ ECCV, pp. 740–755. Springer, 2014.
192
+ Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, pp. 3431–3440, 2015.
193
+ Feng Nan, Joseph Wang, and Venkatesh Saligrama. Feature-budgeted random forest. In ICML, pp. 1983–1991, 2015.
194
+ Augustus Odena, Dieterich Lawson, and Christopher Olah. Changing model behavior at test-time using reinforcement learning. arXiv preprint arXiv:1702.07780, 2017.
195
+ Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. In ECCV, pp. 525–542. Springer, 2016.
196
+ Shreyas Saxena and Jakob Verbeek. Convolutional neural fabrics. In NIPS, pp. 4053–4061, 2016.
197
+ Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In CVPR, pp. 1–9, 2015.
198
+ Kirill Trapeznikov and Venkatesh Saligrama. Supervised sequential classification under budget constraints. In AI-STATS, pp. 581–589, 2013.
199
+ Paul Viola and Michael Jones. Robust real-time object detection. International Journal of Computer Vision, 4(34–47), 2001.
200
+ Ji Wan, Dayong Wang, Steven Chu Hong Hoi, Pengcheng Wu, Jianke Zhu, Yongdong Zhang, and Jintao Li. Deep learning for content-based image retrieval: A comprehensive study. In ACM Multimedia, pp. 157–166, 2014.
201
+ Joseph Wang, Kirill Trapeznikov, and Venkatesh Saligrama. Efficient learning by directed acyclic graph for resource constrained prediction. In NIPS, pp. 2152–2160. 2015.
202
+ Zhixiang Xu, Olivier Chapelle, and Kilian Q. Weinberger. The greedy miser: Learning under testtime budgets. In ICML, pp. 1175–1182, 2012.
203
+ Zhixiang Xu, Matt Kusner, Minmin Chen, and Kilian Q. Weinberger. Cost-sensitive tree of classifiers. In ICML, volume 28, pp. 133–141, 2013.
204
+ Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. In BMVC, 2016.
205
+ A. R. Zamir, T.-L. Wu, L. Sun, W. Shen, B. E. Shi, J. Malik, and S. Savarese. Feedback Networks. ArXiv e-prints, December 2016.
206
+ Yisu Zhou, Xiaolin Hu, and Bo Zhang. Interlinked convolutional neural networks for face parsing. In International Symposium on Neural Networks, pp. 222–231. Springer, 2015.
207
+
208
+ # A DETAILS OF MSDNET ARCHITECTURE AND BASELINE NETWORKS
209
+
210
+ We use MSDNet with three scales on the CIFAR datasets, and the network reduction method introduced in 4.1 is applied. Figure 9 gives an illustration of the reduced network. The convolutional layer functions in the first layer, $h _ { 1 } ^ { s }$ , denote a sequence of $3 { \times } 3$ convolutions (Conv), batch normalization (BN; Ioffe & Szegedy (2015)), and rectified linear unit (ReLU) activation. In the computation of $\tilde { h } _ { 1 } ^ { s }$ , down-sampling is performed by applying convolutions using strides that are powers of two. For subsequent feature layers, the transformations $h _ { \ell } ^ { s }$ and $\tilde { h } _ { \ell } ^ { s }$ are defined following the design in DenseNets (Huang et al., 2017): Conv $( 1 \times 1 )$ -BN-ReLU-Conv $\left( 3 \times 3 \right)$ -BN-ReLU. We set the number of output channels of the three scales to 6, 12, and 24, respectively. Each classifier has two down-sampling convolutional layers with 128 dimensional $3 \times 3$ filters, followed by a $2 \times 2$ average pooling layer and a linear layer.
211
+
212
+ The MSDNet used for ImageNet has four scales, respectively producing 16, 32, 64, and 64 feature maps at each layer. The network reduction is also applied to reduce computational cost. The original images are first transformed by a $7 \times 7$ convolution and a $3 \times 3$ max pooling (both with stride 2), before entering the first layer of MSDNets. The classifiers have the same structure as those used for the CIFAR datasets, except that the number of output channels of each convolutional layer is set to be equal to the number of its input channels.
213
+
214
+ ![](images/d0de6b68dce803aca2a16de6affb943796e7f0bf1bb1eac9cef6c06e5c471db7.jpg)
215
+ Figure 9: Illustration of an MSDNet with network reduction. The network has $S = 3$ scales, and it is divided into three blocks, which maintain a decreasing number of scales. A transition layer is placed between two contiguous blocks.
216
+
217
+ Network architecture for anytime prediction. The MSDNet used in our anytime-prediction experiments has 24 layers (each layer corresponds to a column in Fig. 1 of the main paper), using the reduced network with transition layers as described in Section 4. The classifiers operate on the output of the $2 \times ( i { + } 1 ) ^ { \mathrm { t h } }$ layers, with $i = 1 , \ldots , 1 1$ . On ImageNet, we use MSDNets with four scales, and the $i ^ { \mathrm { { t h } } }$ classifier operates on the $( k \times i + 3 ) ^ { \mathrm { t h } }$ layer (with $i = 1 , \ldots , 5$ ), where $k = 4 , 6$ and 7. For simplicity, the losses of all the classifiers are weighted equally during training.
218
+
219
+ Network architecture for budgeted batch setting. The MSDNets used here for the two CIFAR datasets have depths ranging from 10 to 36 layers, using the reduced network with transition layers as described in Section 4. The $k ^ { \mathrm { { t h } } }$ classifier is attached to the $( \sum _ { i = 1 } ^ { k } i ) ^ { \mathrm { t h } }$ layer. The MSDNets used for ImageNet are the same as those described for the anytime learning setting.
220
+
221
+ $\mathbf { R e s N e t } ^ { \mathbf { M C } }$ and DenseNetMC. The ResNetMC has 62 layers, with 10 residual blocks at each spatial resolution (for three resolutions): we train early-exit classifiers on the output of the $4 ^ { \mathrm { t h } }$ and $8 ^ { \mathrm { t h } }$ residual blocks at each resolution, producing a total of 6 intermediate classifiers (plus the final classification layer). The DenseNetMC consists of 52 layers with three dense blocks and each of them has 16 layers. The six intermediate classifiers are attached to the $6 ^ { \mathrm { { t h } } }$ and $1 2 ^ { \mathrm { t h } }$ layer in each block, also with dense connections to all previous layers in that block.
222
+
223
+ # B ADDITIONAL RESULTS
224
+
225
+ # B.1 ABLATION STUDY
226
+
227
+ We perform additional experiments to shed light on the contributions of the three main components of MSDNet, viz., multi-scale feature maps, dense connectivity, and intermediate classifiers.
228
+
229
+ We start from an MSDNet with six intermediate classifiers and remove the three main components one at a time. To make our comparisons fair, we keep the computational costs of the full networks similar, at around $3 . 0 \times 1 0 ^ { 8 }$ FLOPs, by adapting the network width, i.e., number of output channels at each layer. After removing all the three components in an MSDNet, we obtain a regular VGG-like convolutional network. We show the classification accuracy of all classifiers in a model in the left panel of Figure 10. Several observations can be made: 1. the dense connectivity is crucial for the performance of MSDNet and removing it hurts the overall accuracy drastically (orange vs. black curve); 2. removing multi-scale convolution hurts the accuracy only in the lower budget regions, which is consistent with our mo
230
+
231
+ ![](images/36de99964e9e6ab4f6f1967fffee5d8d4816d0686cfae2751a7e8cef27def4c9.jpg)
232
+ Figure 10: Ablation study (on CIFAR-100) of MSDNets that shows the effect of dense connectivity, multi-scale features, and intermediate classifiers. Higher is better.
233
+
234
+ tivation that the multi-scale design introduces discriminative features early on; 3. the final canonical CNN (star) performs similarly as MSDNet under the specific budget that matches its evaluation cost exactly, but it is unsuited for varying budget constraints. The final CNN performs substantially better at its particular budget region than the model without dense connectivity (orange curve). This suggests that dense connectivity is particularly important in combination with multiple classifiers.
235
+
236
+ # B.2 RESULTS ON CIFAR-10
237
+
238
+ For the CIFAR-10 dataset, we use the same MSDNets and baseline models as we used for CIFAR100, except that the networks used here have a 10-way fully connected layer at the end. The results under the anytime learning setting and the batch computational budget setting are shown in the left and right panel of Figure 11, respectively. Similar to what we have observed from the results on CIFAR-100 and ImageNet, MSDNets outperform all the baselines by a significant margin in both settings. As in the experiments presented in the main paper, ResNet and DenseNet models with multiple intermediate classifiers perform relatively poorly.
239
+
240
+ ![](images/adf6b406c38b10a1e3fedffbeafa7e030553b2ab7ceb4700cb0a1fb272d4ff92.jpg)
241
+ Figure 11: Classification accuracies on the CIFAR-10 dataset in the anytime-prediction setting (left) and the budgeted batch setting (right).
parse/train/Hk2aImxAb/Hk2aImxAb_content_list.json ADDED
@@ -0,0 +1,1186 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "MULTI-SCALE DENSE NETWORKS FOR RESOURCE EFFICIENT IMAGE CLASSIFICATION ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 99,
9
+ 794,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Gao Huang Cornell University ",
17
+ "bbox": [
18
+ 184,
19
+ 170,
20
+ 305,
21
+ 199
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Danlu Chen Fudan University ",
28
+ "bbox": [
29
+ 351,
30
+ 170,
31
+ 465,
32
+ 198
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Tianhong Li Tsinghua University ",
39
+ "bbox": [
40
+ 511,
41
+ 171,
42
+ 647,
43
+ 199
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "Felix Wu Cornell University ",
50
+ "bbox": [
51
+ 689,
52
+ 170,
53
+ 813,
54
+ 199
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "Laurens van der Maaten Facebook AI Research ",
61
+ "bbox": [
62
+ 183,
63
+ 219,
64
+ 357,
65
+ 248
66
+ ],
67
+ "page_idx": 0
68
+ },
69
+ {
70
+ "type": "text",
71
+ "text": "Kilian Weinberger Cornell University ",
72
+ "bbox": [
73
+ 529,
74
+ 219,
75
+ 660,
76
+ 248
77
+ ],
78
+ "page_idx": 0
79
+ },
80
+ {
81
+ "type": "text",
82
+ "text": "ABSTRACT ",
83
+ "text_level": 1,
84
+ "bbox": [
85
+ 454,
86
+ 285,
87
+ 544,
88
+ 299
89
+ ],
90
+ "page_idx": 0
91
+ },
92
+ {
93
+ "type": "text",
94
+ "text": "In this paper we investigate image classification with computational resource limits at test time. Two such settings are: 1. anytime classification, where the network’s prediction for a test example is progressively updated, facilitating the output of a prediction at any time; and 2. budgeted batch classification, where a fixed amount of computation is available to classify a set of examples that can be spent unevenly across “easier” and “harder” inputs. In contrast to most prior work, such as the popular Viola and Jones algorithm, our approach is based on convolutional neural networks. We train multiple classifiers with varying resource demands, which we adaptively apply during test time. To maximally re-use computation between the classifiers, we incorporate them as early-exits into a single deep convolutional neural network and inter-connect them with dense connectivity. To facilitate high quality classification early on, we use a two-dimensional multi-scale network architecture that maintains coarse and fine level features all-throughout the network. Experiments on three image-classification tasks demonstrate that our framework substantially improves the existing state-of-the-art in both settings. ",
95
+ "bbox": [
96
+ 233,
97
+ 309,
98
+ 764,
99
+ 517
100
+ ],
101
+ "page_idx": 0
102
+ },
103
+ {
104
+ "type": "text",
105
+ "text": "1 INTRODUCTION ",
106
+ "text_level": 1,
107
+ "bbox": [
108
+ 176,
109
+ 536,
110
+ 336,
111
+ 551
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "Recent years have witnessed a surge in demand for applications of visual object recognition, for instance, in self-driving cars (Bojarski et al., 2016) and content-based image search (Wan et al., 2014). This demand has in part been fueled through the promise generated by the astonishing progress of convolutional networks (CNNs) on visual object recognition benchmark competition datasets, such as ILSVRC (Deng et al., 2009) and COCO (Lin et al., 2014), where state-of-the-art models may have even surpassed human-level performance (He et al., 2015; 2016). ",
118
+ "bbox": [
119
+ 174,
120
+ 566,
121
+ 825,
122
+ 650
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "However, the requirements of such competitions differ from realworld applications, which tend to incentivize resource-hungry models with high computational demands at inference time. For example, the COCO 2016 competition was won by a large ensemble of computationally intensive $\\mathrm { \\dot { C } N N s ^ { 1 } }$ — a model likely far too computationally expensive for any resource-aware application. Although much smaller models would also obtain decent error, very large, computationally intensive models seem necessary to correctly classify the hard examples that make up the bulk of the remaining misclassifications of modern algorithms. To illustrate this point, Figure 1 shows two images of horses. The left image depicts a horse in canonical pose and is easy to classify, whereas the right image is taken from a rare viewpoint and is likely in the tail of the data distribution. Computationally intensive models are needed to classify such tail examples correctly, but are wasteful when applied to canonical images such as the left one. ",
129
+ "bbox": [
130
+ 174,
131
+ 659,
132
+ 612,
133
+ 856
134
+ ],
135
+ "page_idx": 0
136
+ },
137
+ {
138
+ "type": "image",
139
+ "img_path": "images/2e2e080304ad2c7be1e5890d21d32ed57f0cf575c439df5f869a545d4f732d05.jpg",
140
+ "image_caption": [
141
+ "Figure 1: Two images containing a horse. The left image is canonical and easy to detect even with a small model, whereas the right image requires a computationally more expensive network architecture. (Copyright Pixel Addict and Doyle (CC BY-ND 2.0).) "
142
+ ],
143
+ "image_footnote": [],
144
+ "bbox": [
145
+ 627,
146
+ 664,
147
+ 823,
148
+ 732
149
+ ],
150
+ "page_idx": 0
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "",
155
+ "bbox": [
156
+ 178,
157
+ 852,
158
+ 823,
159
+ 866
160
+ ],
161
+ "page_idx": 0
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "In real-world applications, computation directly translates into power consumption, which should be minimized for environmental and economical reasons, and is a scarce commodity on mobile devices. This begs the question: why do we choose between either wasting computational resources by applying an unnecessarily computationally expensive model to easy images, or making mistakes by using an efficient model that fails to recognize difficult images? Ideally, our systems should automatically use small networks when test images are easy or computational resources limited, and use big networks when test images are hard or computation is abundant. ",
166
+ "bbox": [
167
+ 178,
168
+ 873,
169
+ 820,
170
+ 900
171
+ ],
172
+ "page_idx": 0
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "",
177
+ "bbox": [
178
+ 174,
179
+ 103,
180
+ 823,
181
+ 172
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "Such systems would be beneficial in at least two settings with computational constraints at testtime: anytime prediction, where the network can be forced to output a prediction at any given point in time; and budgeted batch classification, where a fixed computational budget is shared across a large set of examples which can be spent unevenly across “easy” and “hard” examples. A practical use-case of anytime prediction is in mobile apps on Android devices: in 2015, there existed 24, 093 distinct Android devices2, each with its own distinct computational limitations. It is infeasible to train a different network that processes video frame-by-frame at a fixed framerate for each of these devices. Instead, you would like to train a single network that maximizes accuracy on all these devices, within the computational constraints of that device. The budget batch classification setting is ubiquitous in large-scale machine learning applications. Search engines, social media companies, on-line advertising agencies, all must process large volumes of data on limited hardware resources. For example, as of 2010, Google Image Search had over 10 Billion images indexed3, which has likely grown to over 1 Trillion since. Even if a new model to process these images is only 1/10s slower per image, this additional cost would add 3170 years of CPU time. In the budget batch classification setting, companies can improve the average accuracy by reducing the amount of computation spent on “easy” cases to save up computation for “hard” cases. ",
188
+ "bbox": [
189
+ 174,
190
+ 181,
191
+ 825,
192
+ 401
193
+ ],
194
+ "page_idx": 1
195
+ },
196
+ {
197
+ "type": "text",
198
+ "text": "Motivated by prior work in computer vision on resource-efficient recognition (Viola & Jones, 2001), we aim to develop CNNs that “slice” the computation and process these slices one-by-one, stopping the evaluation once the CPU time is depleted or the classification sufficiently certain (through “early exits”). Unfortunately, the architecture of CNNs is inherently at odds with the introduction of early exits. CNNs learn the data representation and the classifier jointly, which leads to two problems with early exits: 1. The features in the last layer are extracted directly to be used by the classifier, whereas earlier features are not. The inherent dilemma is that different kinds of features need to be extracted depending on how many layers are left until the classification. 2. The features in different layers of the network may have different scale. Typically, the first layers of a deep nets operate on a fine scale (to extract low-level features), whereas later layers transition (through pooling or strided convolution) to coarse scales that allow global context to enter the classifier. Both scales are needed but happen at different places in the network. ",
199
+ "bbox": [
200
+ 174,
201
+ 410,
202
+ 825,
203
+ 575
204
+ ],
205
+ "page_idx": 1
206
+ },
207
+ {
208
+ "type": "text",
209
+ "text": "We propose a novel network architecture that addresses both of these problems through careful design changes, allowing for resource-efficient image classification. Our network uses a cascade of intermediate classifiers throughout the network. The first problem, of classifiers altering the internal representation, is addressed through the introduction of dense connectivity (Huang et al., 2017). By connecting all layers to all classifiers, features are no longer dominated by the most imminent earlyexit and the trade-off between early or later classification can be performed elegantly as part of the loss function. The second problem, the lack of coarse-scale features in early layers, is addressed by adopting a multi-scale network structure. At each layer we produce features of all scales (fine-tocoarse), which facilitates good classification early on but also extracts low-level features that only become useful after several more layers of processing. Our network architecture is illustrated in Figure 2, and we refer to it as Multi-Scale DenseNet (MSDNet). ",
210
+ "bbox": [
211
+ 174,
212
+ 583,
213
+ 825,
214
+ 736
215
+ ],
216
+ "page_idx": 1
217
+ },
218
+ {
219
+ "type": "text",
220
+ "text": "We evaluate MSDNets on three image-classification datasets. In the anytime classification setting, we show that it is possible to provide the ability to output a prediction at any time while maintain high accuracies throughout. In the budget batch classification setting we show that MSDNets can be effectively used to adapt the amount of computation to the difficulty of the example to be classified, which allows us to reduce the computational requirements of our models drastically whilst performing on par with state-of-the-art CNNs in terms of overall classification accuracy. To our knowledge this is the first deep learning architecture of its kind that allows dynamic resource adaptation with a single model and obtains competitive results throughout. ",
221
+ "bbox": [
222
+ 174,
223
+ 742,
224
+ 825,
225
+ 854
226
+ ],
227
+ "page_idx": 1
228
+ },
229
+ {
230
+ "type": "image",
231
+ "img_path": "images/393456a645a070145e34d48f149ac9a7ed180043707a693bf4407c8f3be79371.jpg",
232
+ "image_caption": [
233
+ "Figure 2: Illustration of the first four layers of an MSDNet with three scales. The horizontal direction corresponds to the layer direction (depth) of the network. The vertical direction corresponds to the scale of the feature maps. Horizontal arrows indicate a regular convolution operation, whereas diagonal and vertical arrows indicate a strided convolution operation. Classifiers only operate on feature maps at the coarsest scale. Connections across more than one layer are not drawn explicitly: they are implicit through recursive concatenations. "
234
+ ],
235
+ "image_footnote": [],
236
+ "bbox": [
237
+ 181,
238
+ 83,
239
+ 826,
240
+ 213
241
+ ],
242
+ "page_idx": 2
243
+ },
244
+ {
245
+ "type": "text",
246
+ "text": "2 RELATED WORK ",
247
+ "text_level": 1,
248
+ "bbox": [
249
+ 176,
250
+ 318,
251
+ 344,
252
+ 334
253
+ ],
254
+ "page_idx": 2
255
+ },
256
+ {
257
+ "type": "text",
258
+ "text": "We briefly review related prior work on computation-efficient networks, memory-efficient networks, and resource-sensitive machine learning, from which our network architecture draws inspiration. ",
259
+ "bbox": [
260
+ 176,
261
+ 347,
262
+ 823,
263
+ 376
264
+ ],
265
+ "page_idx": 2
266
+ },
267
+ {
268
+ "type": "text",
269
+ "text": "Computation-efficient networks. Most prior work on (convolutional) networks that are computationally efficient at test time focuses on reducing model size after training. In particular, many studies propose to prune weights (LeCun et al., 1989; Hassibi et al., 1993; Li et al., 2017) or quantize weights (Hubara et al., 2016; Rastegari et al., 2016) during or after training. These approaches are generally effective because deep networks often have a substantial number of redundant weights that can be pruned or quantized without sacrificing (and sometimes even improving) performance. Prior work also studies approaches that directly learn compact models with less parameter redundancy. For example, the knowledge-distillation method (Bucilua et al., 2006; Hinton et al., 2014) trains small student networks to reproduce the output of a much larger teacher network or ensemble. Our work differs from those approaches in that we train a single model that trades off computation for accuracy at test time without any re-training or finetuning. Indeed, weight pruning and knowledge distillation can be used in combination with our approach, and may lead to further improvements. ",
270
+ "bbox": [
271
+ 174,
272
+ 382,
273
+ 825,
274
+ 549
275
+ ],
276
+ "page_idx": 2
277
+ },
278
+ {
279
+ "type": "text",
280
+ "text": "Resource-efficient machine learning. Various prior studies explore computationally efficient variants of traditional machine-learning models (Viola & Jones, 2001; Grubb & Bagnell, 2012; Karayev et al., 2014; Trapeznikov & Saligrama, 2013; Xu et al., 2012; 2013; Nan et al., 2015; Wang et al., 2015). Most of these studies focus on how to incorporate the computational requirements of computing particular features in the training of machine-learning models such as (gradient-boosted) decision trees. Whilst our study is certainly inspired by these results, the architecture we explore differs substantially: most prior work exploits characteristics of machine-learning models (such as decision trees) that do not apply to deep networks. Our work is possibly most closely related to recent work on FractalNets (Larsson et al., 2017), which can perform anytime prediction by progressively evaluating subnetworks of the full network. FractalNets differ from our work in that they are not explicitly optimized for computation efficiency and consequently our experiments show that MSDNets substantially outperform FractalNets. Our dynamic evaluation strategy for reducing batch computational cost is closely related to the the adaptive computation time approach (Graves, 2016; Figurnov et al., 2016), and the recently proposed method of adaptively evaluating neural networks (Bolukbasi et al., 2017). Different from these works, our method adopts a specially designed network with multiple classifiers, which are jointly optimized during training and can directly output confidence scores to control the evaluation process for each test example. The adaptive computation time method (Graves, 2016) and its extension (Figurnov et al., 2016) also perform adaptive evaluation on test examples to save batch computational cost, but focus on skipping units rather than layers. In (Odena et al., 2017), a “composer”model is trained to construct the evaluation network from a set of sub-modules for each test example. By contrast, our work uses a single CNN with multiple intermediate classifiers that is trained end-to-end. The Feedback Networks (Zamir et al., 2016) enable early predictions by making predictions in a recurrent fashion, which heavily shares parameters among classifiers, but is less efficient in sharing computation. ",
281
+ "bbox": [
282
+ 173,
283
+ 555,
284
+ 825,
285
+ 888
286
+ ],
287
+ "page_idx": 2
288
+ },
289
+ {
290
+ "type": "text",
291
+ "text": "Related network architectures. Our network architecture borrows elements from neural fabrics (Saxena & Verbeek, 2016) and others (Zhou et al., 2015; Jacobsen et al., 2017; Ke et al., 2016) ",
292
+ "bbox": [
293
+ 173,
294
+ 896,
295
+ 821,
296
+ 924
297
+ ],
298
+ "page_idx": 2
299
+ },
300
+ {
301
+ "type": "image",
302
+ "img_path": "images/6c59242daaab86116b0562f24208342d867eb57b7d0db805e434894dcf77ee2c.jpg",
303
+ "image_caption": [
304
+ "Figure 3: Relative accuracy of the intermediate classifier (left) and the final classifier (right) when introducing a single intermediate classifier at different layers in a ResNet, DenseNet and MSDNet. All experiments were performed on the CIFAR-100 dataset. Higher is better. "
305
+ ],
306
+ "image_footnote": [],
307
+ "bbox": [
308
+ 187,
309
+ 93,
310
+ 792,
311
+ 265
312
+ ],
313
+ "page_idx": 3
314
+ },
315
+ {
316
+ "type": "text",
317
+ "text": "to rapidly construct a low-resolution feature map that is amenable to classification, whilst also maintaining feature maps of higher resolution that are essential for obtaining high classification accuracy. Our design differs from the neural fabrics (Saxena & Verbeek, 2016) substantially in that MSDNets have a reduced number of scales and no sparse channel connectivity or up-sampling paths. MSDNets are at least one order of magnitude more efficient and typically more accurate — for example, an MSDNet with less than 1 million parameters obtains a test error below $7 . 0 \\%$ on CIFAR-10 (Krizhevsky & Hinton, 2009), whereas Saxena & Verbeek (2016) report $7 . 4 3 \\%$ with over 20 million parameters. We use the same feature-concatenation approach as DenseNets (Huang et al., 2017), which allows us to bypass features optimized for early classifiers in later layers of the network. Our architecture is related to deeply supervised networks (Lee et al., 2015) in that it incorporates classifiers at multiple layers throughout the network. In contrast to all these prior architectures, our network is specifically designed to operate in resource-aware settings. ",
318
+ "bbox": [
319
+ 173,
320
+ 330,
321
+ 825,
322
+ 496
323
+ ],
324
+ "page_idx": 3
325
+ },
326
+ {
327
+ "type": "text",
328
+ "text": "3 PROBLEM SETUP ",
329
+ "text_level": 1,
330
+ "bbox": [
331
+ 176,
332
+ 512,
333
+ 348,
334
+ 529
335
+ ],
336
+ "page_idx": 3
337
+ },
338
+ {
339
+ "type": "text",
340
+ "text": "We consider two settings that impose computational constraints at prediction time. ",
341
+ "bbox": [
342
+ 176,
343
+ 539,
344
+ 710,
345
+ 554
346
+ ],
347
+ "page_idx": 3
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "Anytime prediction. In the anytime prediction setting (Grubb & Bagnell, 2012), there is a finite computational budget $B > 0$ available for each test example $\\mathbf { x }$ . The computational budget is nondeterministic, and varies per test instance. It is determined by the occurrence of an event that requires the model to output a prediction immediately. We assume that the budget is drawn from some joint distribution $P ( \\mathbf { x } , B )$ . In some applications $P ( B )$ may be independent of $P ( \\mathbf { x } )$ and can be estimated. For example, if the event is governed by a Poisson process, $P ( B )$ is an exponential distribution. We denote the loss of a model $f ( \\mathbf { x } )$ that has to produce a prediction for instance $\\mathbf { x }$ within budget $B$ by $L ( f ( \\mathbf { x } ) , B )$ . The goal of an anytime learner is to minimize the expected loss under the budget distribution: $L ( f ) = \\mathbb { E } \\left[ L ( f ( \\mathbf { x } ) , B ) \\right] _ { P ( \\mathbf { x } , B ) } .$ Here, $L ( \\cdot )$ denotes a suitable loss function. As is common in the empirical risk minimization framework, the expectation under $P ( \\mathbf { x } , B )$ may be estimated by an average over samples from $P ( \\mathbf { x } , B )$ . ",
352
+ "bbox": [
353
+ 173,
354
+ 560,
355
+ 825,
356
+ 717
357
+ ],
358
+ "page_idx": 3
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "Budgeted batch classification. In the budgeted batch classification setting, the model needs to classify a set of examples $\\mathcal { D } _ { t e s t } = \\{ \\mathbf { x } _ { 1 } , \\ldots , \\mathbf { x } _ { M } \\}$ within a finite computational budget $B > 0$ that is known in advance. The learner aims to minimize the loss across all examples in $\\mathcal { D } _ { t e s t }$ within a cumulative cost bounded by $B$ , which we denote by $L ( f ( \\mathcal { D } _ { t e s t } ) , B )$ for some suitable loss function $L ( \\cdot )$ . It can potentially do so by spending less than BM computation on classifying an “easy” example whilst using more than $\\textstyle { \\frac { B } { M } }$ computation on classifying a “difficult” example. Therefore, the budget considered here is a soft constraint when we have a large batch of testing samples. ",
363
+ "bbox": [
364
+ 174,
365
+ 723,
366
+ 825,
367
+ 825
368
+ ],
369
+ "page_idx": 3
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "4 MULTI-SCALE DENSE CONVOLUTIONAL NETWORKS ",
374
+ "text_level": 1,
375
+ "bbox": [
376
+ 174,
377
+ 840,
378
+ 643,
379
+ 857
380
+ ],
381
+ "page_idx": 3
382
+ },
383
+ {
384
+ "type": "text",
385
+ "text": "A straightforward solution to the two problems introduced in Section 3 is to train multiple networks of increasing capacity, and sequentially evaluate them at test time (as in Bolukbasi et al. (2017)). In the anytime setting the evaluation can be stopped at any point and the most recent prediction is returned. In the batch setting, the evaluation is stopped prematurely the moment a network classifies the test sample with sufficient confidence. When the resources are so limited that the execution is terminated after the first network, this approach is optimal because the first network is trained for exactly this computational budget without compromises. However, in both settings, this scenario is rare. In the more common scenario where some test samples can require more processing time than others the approach is far from optimal because previously learned features are never re-used across the different networks. ",
386
+ "bbox": [
387
+ 174,
388
+ 867,
389
+ 823,
390
+ 924
391
+ ],
392
+ "page_idx": 3
393
+ },
394
+ {
395
+ "type": "text",
396
+ "text": "",
397
+ "bbox": [
398
+ 174,
399
+ 103,
400
+ 825,
401
+ 186
402
+ ],
403
+ "page_idx": 4
404
+ },
405
+ {
406
+ "type": "text",
407
+ "text": "An alternative solution is to build a deep network with a cascade of classifiers operating on the features of internal layers: in such a network features computed for an earlier classifier can be re-used by later classifiers. However, na¨ıvely attaching intermediate early-exit classifiers to a stateof-the-art deep network leads to poor performance. ",
408
+ "bbox": [
409
+ 174,
410
+ 194,
411
+ 823,
412
+ 251
413
+ ],
414
+ "page_idx": 4
415
+ },
416
+ {
417
+ "type": "text",
418
+ "text": "There are two reasons why intermediate early-exit classifiers hurt the performance of deep neural networks: early classifiers lack coarse-level features and classifiers throughout interfere with the feature generation process. In this section we investigate these effects empirically (see Figure 3) and, in response to our findings, propose the MSDNet architecture illustrated in Figure 2. ",
419
+ "bbox": [
420
+ 174,
421
+ 257,
422
+ 825,
423
+ 313
424
+ ],
425
+ "page_idx": 4
426
+ },
427
+ {
428
+ "type": "text",
429
+ "text": "Problem: The lack of coarse-level features. Traditional neural networks learn features of fine scale in early layers and coarse scale in later layers (through repeated convolution, pooling, and strided convolution). Coarse scale features in the final layers are important to classify the content of the whole image into a single class. Early layers lack coarse-level features and early-exit classifiers attached to these layers will likely yield unsatisfactory high error rates. To illustrate this point, we attached4 intermediate classifiers to varying layers of a ResNet (He et al., 2016) and a DenseNet (Huang et al., 2017) on the CIFAR-100 dataset (Krizhevsky & Hinton, 2009). The blue and red dashed lines in the left plot of Figure 3 show the relative accuracies of these classifiers. All three plots gives rise to a clear trend: the accuracy of a classifier is highly correlated with its position within the network. Particularly in the case of the ResNet (blue line), one can observe a visible “staircase” pattern, with big improvements after the 2nd and 4th classifiers — located right after pooling layers. ",
430
+ "bbox": [
431
+ 173,
432
+ 318,
433
+ 825,
434
+ 483
435
+ ],
436
+ "page_idx": 4
437
+ },
438
+ {
439
+ "type": "text",
440
+ "text": "Solution: Multi-scale feature maps. To address this issue, MSDNets maintain a feature representation at multiple scales throughout the network, and all the classifiers only use the coarse-level features. The feature maps at a particular layer5 and scale are computed by concatenating the results of one or two convolutions: 1. the result of a regular convolution applied on the same-scale features from the previous layer (horizontal connections) and, if possible, 2. the result of a strided convolution applied on the finer-scale feature map from the previous layer (diagonal connections). The horizontal connections preserve and progress high-resolution information, which facilitates the construction of high-quality coarse features in later layers. The vertical connections produce coarse features throughout that are amenable to classification. The dashed black line in Figure 3 shows that MSDNets substantially increase the accuracy of early classifiers. ",
441
+ "bbox": [
442
+ 173,
443
+ 491,
444
+ 825,
445
+ 630
446
+ ],
447
+ "page_idx": 4
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "Problem: Early classifiers interfere with later classifiers. The right plot of Figure 3 shows the accuracies of the final classifier as a function of the location of a single intermediate classifier, relative to the accuracy of a network without intermediate classifiers. The results show that the introduction of an intermediate classifier harms the final ResNet classifier (blue line), reducing its accuracy by up to $7 \\%$ . We postulate that this accuracy degradation in the ResNet may be caused by the intermediate classifier influencing the early features to be optimized for the short-term and not for the final layers. This improves the accuracy of the immediate classifier but collapses information required to generate high quality features in later layers. This effect becomes more pronounced when the first classifier is attached to an earlier layer. ",
452
+ "bbox": [
453
+ 174,
454
+ 635,
455
+ 825,
456
+ 758
457
+ ],
458
+ "page_idx": 4
459
+ },
460
+ {
461
+ "type": "text",
462
+ "text": "Solution: Dense connectivity. By contrast, the DenseNet (red line) suffers much less from this effect. Dense connectivity (Huang et al., 2017) connects each layer with all subsequent layers and allows later layers to bypass features optimized for the short-term, to maintain the high accuracy of the final classifier. If an earlier layer collapses information to generate short-term features, the lost information can be recovered through the direct connection to its preceding layer. The final classifier’s performance becomes (more or less) independent of the location of the intermediate classifier. As far as we know, this is the first paper that discovers that dense connectivity is an important element to early-exit classifiers in deep networks, and we make it an integral design choice in MSDNets. ",
463
+ "bbox": [
464
+ 173,
465
+ 766,
466
+ 825,
467
+ 849
468
+ ],
469
+ "page_idx": 4
470
+ },
471
+ {
472
+ "type": "image",
473
+ "img_path": "images/8de8c69d9d36a341a0373469c5e2695c92df31ad7bca8cfbfd76709c742d677e.jpg",
474
+ "image_caption": [
475
+ "Figure 4: The output $\\mathbf { x } _ { \\ell } ^ { s }$ of layer $\\ell$ at the $s ^ { \\mathrm { t h } }$ scale in a MSDNet. Herein, [. . . ] denotes the concatenation operator, $h _ { \\ell } ^ { s } ( \\cdot )$ a regular convolution transformation, and $\\tilde { h } _ { \\ell } ^ { s } ( \\cdot )$ a strided convolutional. Note that the outputs of $h _ { \\ell } ^ { s }$ and $\\tilde { h } _ { \\ell } ^ { s }$ have the same feature map size; their outputs are concatenated along the channel dimension. "
476
+ ],
477
+ "image_footnote": [],
478
+ "bbox": [
479
+ 176,
480
+ 102,
481
+ 826,
482
+ 226
483
+ ],
484
+ "page_idx": 5
485
+ },
486
+ {
487
+ "type": "text",
488
+ "text": "",
489
+ "bbox": [
490
+ 173,
491
+ 295,
492
+ 825,
493
+ 337
494
+ ],
495
+ "page_idx": 5
496
+ },
497
+ {
498
+ "type": "text",
499
+ "text": "4.1 THE MSDNET ARCHITECTURE ",
500
+ "text_level": 1,
501
+ "bbox": [
502
+ 176,
503
+ 357,
504
+ 418,
505
+ 371
506
+ ],
507
+ "page_idx": 5
508
+ },
509
+ {
510
+ "type": "text",
511
+ "text": "The MSDNet architecture is illustrated in Figure 2. We present its main components below. Additional details on the architecture are presented in Appendix A. ",
512
+ "bbox": [
513
+ 174,
514
+ 383,
515
+ 820,
516
+ 412
517
+ ],
518
+ "page_idx": 5
519
+ },
520
+ {
521
+ "type": "text",
522
+ "text": "First layer. The first layer $\\ell = 1 $ ) is unique as it includes vertical connections in Figure 2. Its main purpose is to “seed” representations on all $S$ scales. One could view its vertical layout as a miniature “S-layers” convolutional network $S { = } 3$ in Figure 2). Let us denote the output feature maps at layer $\\ell$ and scale $s$ as $\\mathbf { x } _ { \\ell } ^ { s }$ and the original input image as $\\mathbf { x } _ { 0 } ^ { 1 }$ . Feature maps at coarser scales are obtained via down-sampling. The output $\\mathbf { x } _ { 1 } ^ { s }$ of the first layer is formally given in the top row of Figure 4. ",
523
+ "bbox": [
524
+ 174,
525
+ 419,
526
+ 825,
527
+ 489
528
+ ],
529
+ "page_idx": 5
530
+ },
531
+ {
532
+ "type": "text",
533
+ "text": "Subsequent layers. Following Huang et al. (2017), the output feature maps $\\mathbf { x } _ { \\ell } ^ { s }$ produced at subsequent layers, $\\ell > 1$ , and scales, $s$ , are a concatenation of transformed feature maps from all previous feature maps of scale $s$ and $s - 1$ (if $s > 1$ ). Formally, the $\\ell \\cdot$ -th layer of our network outputs a set of features at $S$ scales $\\big \\{ \\mathbf { x } _ { \\ell } ^ { 1 } , \\dots , \\mathbf { x } _ { \\ell } ^ { S } \\big \\}$ , given in the last row of Figure 4. ",
534
+ "bbox": [
535
+ 174,
536
+ 496,
537
+ 825,
538
+ 553
539
+ ],
540
+ "page_idx": 5
541
+ },
542
+ {
543
+ "type": "text",
544
+ "text": "Classifiers. The classifiers in MSDNets also follow the dense connectivity pattern within the coarsest scale, $S$ , i.e., the classifier at layer $\\ell$ uses all the features $\\left[ \\mathbf { x } _ { 1 } ^ { S } , \\ldots , \\mathbf { x } _ { \\ell } ^ { S } \\right]$ . Each classifier consists of two convolutional layers, followed by one average pooling layer and one linear layer. In practice, we only attach classifiers to some of the intermediate layers, and we let $f _ { k } ( \\cdot )$ denote the $k ^ { \\mathrm { { t h } } }$ classifier. During testing in the anytime setting we propagate the input through the network until the budget is exhausted and output the most recent prediction. In the batch budget setting at test time, an example traverses the network and exits after classifier $f _ { k }$ if its prediction confidence (we use the maximum value of the softmax probability as a confidence measure) exceeds a pre-determined threshold $\\theta _ { k }$ . Before training, we compute the computational cost, $C _ { k }$ , required to process the network up to the $k ^ { \\mathrm { { t h } } }$ classifier. We denote by $0 < q \\le 1$ a fixed exit probability that a sample that reaches a classifier will obtain a classification with sufficient confidence to exit. We assume that $q$ is constant across all layers, which allows us to compute the probability that a sample exits at classifier $k$ as: $q _ { k } = z ( 1 - q ) ^ { \\bar { k ^ { - 1 } } q }$ , where $z$ is a normalizing constant that ensures that $\\begin{array} { r } { \\sum _ { k } p ( q _ { k } ) = 1 } \\end{array}$ . At test time, we need to ensure that the overall cost of classifying all samples in $\\mathcal { D } _ { t e s t }$ does not exceed our budget $B$ (in expectation). This gives rise to the constraint $\\begin{array} { r } { \\left| \\mathcal { D } _ { t e s t } \\right| \\sum _ { k } q _ { k } C _ { k } \\le B } \\end{array}$ . We can solve this constraint for $q$ and determine the thresholds $\\theta _ { k }$ on a validation set in such a way that approximately $| \\mathcal { D } _ { t e s t } | q _ { k }$ validation samples exit at the $k ^ { \\mathrm { { t h } } }$ classifier. ",
545
+ "bbox": [
546
+ 173,
547
+ 559,
548
+ 825,
549
+ 794
550
+ ],
551
+ "page_idx": 5
552
+ },
553
+ {
554
+ "type": "text",
555
+ "text": "Loss functions. During training we use cross entropy loss functions $L ( f _ { k } )$ for all classifiers and minimize a weighted cumulative loss: $\\begin{array} { r } { \\frac { 1 } { | \\mathcal { D } | } \\sum _ { ( \\mathbf { x } , y ) \\in \\mathcal { D } } \\mathbf { \\tilde { \\sum } } _ { k } w _ { k } L ( f _ { k } ) } \\end{array}$ . Herein, $\\mathcal { D }$ denotes the training set and $w _ { k } \\ge 0$ the weight of the $k$ -th classifier. If the budget distribution $P ( B )$ is known, we can use the weights $w _ { k }$ to incorporate our prior knowledge about the budget $B$ in the learning. Empirically, we find that using the same weight for all loss functions (i.e., setting $\\forall k : w _ { k } = 1$ ) works well in practice. ",
556
+ "bbox": [
557
+ 174,
558
+ 801,
559
+ 825,
560
+ 888
561
+ ],
562
+ "page_idx": 5
563
+ },
564
+ {
565
+ "type": "text",
566
+ "text": "Network reduction and lazy evaluation. There are two straightforward ways to further reduce the computational requirements of MSDNets. First, it is inefficient to maintain all the finer scales until the last layer of the network. One simple strategy to reduce the size of the network is by splitting it into $S$ blocks along the depth dimension, and only keeping the coarsest $( S - i + 1 )$ scales in the $i ^ { \\mathrm { t h } }$ block (a schematic layout of this structure is shown in Figure 9). This reduces computational cost for both training and testing. Every time a scale is removed from the network, we add a transition layer between the two blocks that merges the concatenated features using a $1 \\times 1$ convolution and cuts the number of channels in half before feeding the fine-scale features into the coarser scale via a strided convolution (this is similar to the DenseNet-BC architecture of Huang et al. (2017)). Second, since a classifier at layer $\\ell$ only uses features from the coarsest scale, the finer feature maps in layer $\\ell$ (and some of the finer feature maps in the previous $S - 2$ layers) do not influence the prediction of that classifier. Therefore, we group the computation in “diagonal blocks” such that we only propagate the example along paths that are required for the evaluation of the next classifier. This minimizes unnecessary computations when we need to stop because the computational budget is exhausted. We call this strategy lazy evaluation. ",
567
+ "bbox": [
568
+ 173,
569
+ 895,
570
+ 823,
571
+ 924
572
+ ],
573
+ "page_idx": 5
574
+ },
575
+ {
576
+ "type": "text",
577
+ "text": "",
578
+ "bbox": [
579
+ 174,
580
+ 103,
581
+ 825,
582
+ 284
583
+ ],
584
+ "page_idx": 6
585
+ },
586
+ {
587
+ "type": "text",
588
+ "text": "5 EXPERIMENTS ",
589
+ "text_level": 1,
590
+ "bbox": [
591
+ 176,
592
+ 304,
593
+ 326,
594
+ 320
595
+ ],
596
+ "page_idx": 6
597
+ },
598
+ {
599
+ "type": "text",
600
+ "text": "We evaluate the effectiveness of our approach on three image classification datasets, i.e., the CIFAR10, CIFAR-100 (Krizhevsky & Hinton, 2009) and ILSVRC 2012 (ImageNet; Deng et al. (2009)) datasets. Code to reproduce all results is available at https://anonymous-url. Details on architectural configurations of MSDNets are described in Appendix A. ",
601
+ "bbox": [
602
+ 174,
603
+ 334,
604
+ 823,
605
+ 390
606
+ ],
607
+ "page_idx": 6
608
+ },
609
+ {
610
+ "type": "text",
611
+ "text": "Datasets. The two CIFAR datasets contain 50, 000 training and 10, 000 test images of $3 2 \\times 3 2$ pixels; we hold out 5, 000 training images as a validation set. The datasets comprise 10 and 100 classes, respectively. We follow He et al. (2016) and apply standard data-augmentation techniques to the training images: images are zero-padded with 4 pixels on each side, and then randomly cropped to produce $3 2 \\times 3 2$ images. Images are flipped horizontally with probability 0.5, and normalized by subtracting channel means and dividing by channel standard deviations. The ImageNet dataset comprises 1, 000 classes, with a total of 1.2 million training images and 50,000 validation images. We hold out 50,000 images from the training set to estimate the confidence threshold for classifiers in MSDNet. We adopt the data augmentation scheme of He et al. (2016) at training time; at test time, we classify a $2 2 4 \\times 2 2 4$ center crop of images that were resized to $2 5 6 \\times 2 5 6$ pixels. ",
612
+ "bbox": [
613
+ 174,
614
+ 393,
615
+ 825,
616
+ 532
617
+ ],
618
+ "page_idx": 6
619
+ },
620
+ {
621
+ "type": "text",
622
+ "text": "Training Details. We train all models using the framework of Gross & Wilber (2016). On the two CIFAR datasets, all models (including all baselines) are trained using stochastic gradient descent (SGD) with mini-batch size 64. We use Nesterov momentum with a momentum weight of 0.9 without dampening, and a weight decay of $1 0 ^ { - 4 }$ . All models are trained for 300 epochs, with an initial learning rate of 0.1, which is divided by a factor 10 after 150 and 225 epochs. We apply the same optimization scheme to the ImageNet dataset, except that we increase the mini-batch size to 256, and all the models are trained for 90 epochs with learning rate drops after 30 and 60 epochs. ",
623
+ "bbox": [
624
+ 174,
625
+ 537,
626
+ 825,
627
+ 635
628
+ ],
629
+ "page_idx": 6
630
+ },
631
+ {
632
+ "type": "text",
633
+ "text": "5.1 ANYTIME PREDICTION ",
634
+ "text_level": 1,
635
+ "bbox": [
636
+ 174,
637
+ 652,
638
+ 374,
639
+ 666
640
+ ],
641
+ "page_idx": 6
642
+ },
643
+ {
644
+ "type": "text",
645
+ "text": "In the anytime prediction setting, the model maintains a progressively updated distribution over classes, and it can be forced to output its most up-to-date prediction at an arbitrary time. ",
646
+ "bbox": [
647
+ 173,
648
+ 680,
649
+ 821,
650
+ 708
651
+ ],
652
+ "page_idx": 6
653
+ },
654
+ {
655
+ "type": "text",
656
+ "text": "Baselines. There exist several baseline approaches for anytime prediction: FractalNets (Larsson et al., 2017), deeply supervised networks (Lee et al., 2015), and ensembles of deep networks of varying or identical sizes. FractalNets allow for multiple evaluation paths during inference time, which vary in computation time. In the anytime setting, paths are evaluated in order of increasing computation. In our result figures, we replicate the FractalNet results reported in the original paper (Larsson et al., 2017) for reference. Deeply supervised networks introduce multiple early-exit classifiers throughout a network, which are applied on the features of the particular layer they are attached to. Instead of using the original model proposed in Lee et al. (2015), we use the more competitive ResNet and DenseNet architectures (referred to as DenseNet- $B C$ in Huang et al. (2017)) as the base networks in our experiments with deeply supervised networks. We refer to these as $R e s N e t ^ { M C }$ and DenseNetMC, where $M C$ stands for multiple classifiers. Both networks require about $1 . 3 \\times 1 0 ^ { 8 }$ FLOPs when fully evaluated; the detailed network configurations are presented in the supplementary material. In addition, we include ensembles of ResNets and DenseNets of varying or identical sizes. At test time, the networks are evaluated sequentially (in ascending order of network size) to obtain predictions for the test data. All predictions are averaged over the evaluated classifiers. On ",
657
+ "bbox": [
658
+ 174,
659
+ 715,
660
+ 825,
661
+ 922
662
+ ],
663
+ "page_idx": 6
664
+ },
665
+ {
666
+ "type": "image",
667
+ "img_path": "images/0e595351824a020ac424bb128829df21d92c0ecca2b1cea17c58c737e1308b61.jpg",
668
+ "image_caption": [
669
+ "Figure 5: Accuracy (top-1) of anytime prediction models as a function of computational budget on the ImageNet (left) and CIFAR-100 (right) datasets. Higher is better. "
670
+ ],
671
+ "image_footnote": [],
672
+ "bbox": [
673
+ 189,
674
+ 92,
675
+ 810,
676
+ 261
677
+ ],
678
+ "page_idx": 7
679
+ },
680
+ {
681
+ "type": "text",
682
+ "text": "ImageNet, we compare MSDNet against a highly competitive ensemble of ResNets and DenseNets, with depth varying from 10 layers to 50 layers, and 36 layers to 121 layers, respectively. ",
683
+ "bbox": [
684
+ 173,
685
+ 314,
686
+ 821,
687
+ 342
688
+ ],
689
+ "page_idx": 7
690
+ },
691
+ {
692
+ "type": "text",
693
+ "text": "Anytime prediction results are presented in Figure 5. The left plot shows the top-1 classification accuracy on the ImageNet validation set. Here, for all budgets in our evaluation, the accuracy of MSDNet substantially outperforms the ResNets and DenseNets ensemble. In particular, when the budget ranges from $0 . 1 \\times \\bar { 1 0 } ^ { 1 0 }$ to $0 . 3 \\times 1 0 ^ { 1 0 }$ FLOPs, MSDNet achieves $\\sim 4 \\% - 8 \\%$ higher accuracy. ",
694
+ "bbox": [
695
+ 174,
696
+ 349,
697
+ 825,
698
+ 405
699
+ ],
700
+ "page_idx": 7
701
+ },
702
+ {
703
+ "type": "text",
704
+ "text": "We evaluate more baselines on CIFAR-100 (and CIFAR-10; see supplementary materials). We observe that MSDNet substantially outperforms ResNetsMC and DenseNetsMC at any computational budget within our range. This is due to the fact that after just a few layers, MSDNets have produced low-resolution feature maps that are much more suitable for classification than the high-resolution feature maps in the early layers of ResNets or DenseNets. MSDNet also outperforms the other baselines for nearly all computational budgets, although it performs on par with ensembles when the budget is very small. In the extremely low-budget regime, ensembles have an advantage because their predictions are performed by the first (small) network, which is optimized exclusively for the low budget. However, the accuracy of ensembles does not increase nearly as fast when the budget is increased. The MSDNet outperforms the ensemble as soon as the latter needs to evaluate a second model: unlike MSDNets, this forces the ensemble to repeat the computation of similar low-level features repeatedly. Ensemble accuracies saturate rapidly when all networks are shallow. ",
705
+ "bbox": [
706
+ 174,
707
+ 411,
708
+ 825,
709
+ 579
710
+ ],
711
+ "page_idx": 7
712
+ },
713
+ {
714
+ "type": "text",
715
+ "text": "5.2 BUDGETED BATCH CLASSIFICATION ",
716
+ "text_level": 1,
717
+ "bbox": [
718
+ 178,
719
+ 590,
720
+ 462,
721
+ 603
722
+ ],
723
+ "page_idx": 7
724
+ },
725
+ {
726
+ "type": "text",
727
+ "text": "In budgeted batch classification setting, the predictive model receives a batch of $M$ instances and a computational budget $B$ for classifying all $M$ instances. In this setting, we use dynamic evaluation: we perform early-exiting of “easy” examples at early classifiers whilst propagating “hard” examples through the entire network, using the procedure described in Section 4. ",
728
+ "bbox": [
729
+ 174,
730
+ 609,
731
+ 825,
732
+ 665
733
+ ],
734
+ "page_idx": 7
735
+ },
736
+ {
737
+ "type": "text",
738
+ "text": "Baselines. On ImageNet, we compare the dynamically evaluated MSDNet with five ResNets (He et al., 2016) and five DenseNets (Huang et al., 2017), AlexNet (Krizhevsky et al., 2012), and GoogleLeNet (Szegedy et al., 2015); see the supplementary material for details. We also evaluate an ensemble of the five ResNets that uses exactly the same dynamic-evaluation procedure as MSDNets at test time: “easy” images are only propagated through the smallest ResNet-10, whereas “hard” images are classified by all five ResNet models (predictions are averaged across all evaluated networks in the ensemble). We classify batches of $M = 1 2 8$ images. ",
739
+ "bbox": [
740
+ 173,
741
+ 672,
742
+ 825,
743
+ 770
744
+ ],
745
+ "page_idx": 7
746
+ },
747
+ {
748
+ "type": "text",
749
+ "text": "On CIFAR-100, we compare MSDNet with several highly competitive baselines, including ResNets (He et al., 2016), DenseNets (Huang et al., 2017) of varying sizes, Stochastic Depth Networks (Huang et al., 2016), Wide ResNets (Zagoruyko & Komodakis, 2016) and FractalNets (Larsson et al., 2017). We also compare MSDNet to the $\\mathrm { R e s N e t ^ { M C } }$ and DenseNetMC models that were used in Section 5.1, using dynamic evaluation at test time. We denote these baselines as $R e s N e t ^ { M C }$ / DenseNetMC with early-exits. To prevent the result plots from becoming too cluttered, we present CIFAR-100 results with dynamically evaluated ensembles in the supplementary material. We classify batches of $M = 2 5 6$ images at test time. ",
750
+ "bbox": [
751
+ 173,
752
+ 776,
753
+ 825,
754
+ 888
755
+ ],
756
+ "page_idx": 7
757
+ },
758
+ {
759
+ "type": "text",
760
+ "text": "Budgeted batch classification results on ImageNet are shown in the left panel of Figure 7. We trained three MSDNets with different depths, each of which covers a different range of computational budgets. We plot the performance of each MSDNet as a gray curve; we select the best model for each budget based on its accuracy on the validation set, and plot the corresponding accuracy as a black curve. The plot shows that the predictions of MSDNets with dynamic evaluation are substantially more accurate than those of ResNets and DenseNets that use the same amount of computation. For instance, with an average budget of $1 . 7 \\times 1 0 ^ { 9 }$ FLOPs, MSDNet achieves a top-1 accuracy of ${ \\sim } 7 5 \\%$ , which is ${ \\sim } 6 \\%$ higher than that achieved by a ResNet with the same number of FLOPs. Compared to the computationally efficient DenseNets, MSDNet uses $\\sim 2 - 3 \\times$ times fewer FLOPs to achieve the same classification accuracy. Moreover, MSDNet with dynamic evaluation allows for very precise tuning of the computational budget that is consumed, which is not possible with individual ResNet or DenseNet models. The ensemble of ResNets or DenseNets with dynamic evaluation performs on par with or worse than their individual counterparts (but they do allow for setting the computational budget very precisely). ",
761
+ "bbox": [
762
+ 173,
763
+ 895,
764
+ 821,
765
+ 924
766
+ ],
767
+ "page_idx": 7
768
+ },
769
+ {
770
+ "type": "image",
771
+ "img_path": "images/047b8902b777ad1edf01cc1798508fdcb86d98ce8b5ec9a2971efe96719d19ec.jpg",
772
+ "image_caption": [
773
+ "Figure 7: Accuracy (top-1) of budgeted batch classification models as a function of average computational budget per image the on ImageNet (left) and CIFAR-100 (right) datasets. Higher is better. "
774
+ ],
775
+ "image_footnote": [],
776
+ "bbox": [
777
+ 189,
778
+ 93,
779
+ 807,
780
+ 262
781
+ ],
782
+ "page_idx": 8
783
+ },
784
+ {
785
+ "type": "text",
786
+ "text": "",
787
+ "bbox": [
788
+ 174,
789
+ 320,
790
+ 825,
791
+ 488
792
+ ],
793
+ "page_idx": 8
794
+ },
795
+ {
796
+ "type": "text",
797
+ "text": "The right panel of Figure 7 shows our results on CIFAR-100. The results show that MSDNets consistently outperform all baselines across all budgets. Notably, MSDNet performs on par with a 110- layer ResNet using only 1/10th of the computational budget and it is up to $\\sim 5$ times more efficient than DenseNets, Stochastic Depth Networks, Wide ResNets, and FractalNets. Similar to results in the anytime-prediction setting, MSDNet substantially outperform ResNetsMC and DenseNets $_ { M C }$ with multiple intermediate classifiers, which provides further evidence that the coarse features in the MSDNet are important for high performance in earlier layers. ",
798
+ "bbox": [
799
+ 173,
800
+ 494,
801
+ 825,
802
+ 592
803
+ ],
804
+ "page_idx": 8
805
+ },
806
+ {
807
+ "type": "text",
808
+ "text": "Visualization. To illustrate the ability of our approach to reduce the computational requirements for classifying “easy” examples, we show twelve randomly sampled test images from two ImageNet classes in Figure 6. The top row shows “easy” examples that were correctly classified and exited by the first classifier. The bottom row shows “hard” examples that would have been incorrectly classified by the first classifier but were passed on because its uncertainty was too high. The figure suggests that early classifiers recognize prototypical class examples, whereas the last classifier recognizes non-typical images. ",
809
+ "bbox": [
810
+ 174,
811
+ 599,
812
+ 496,
813
+ 779
814
+ ],
815
+ "page_idx": 8
816
+ },
817
+ {
818
+ "type": "image",
819
+ "img_path": "images/105e212787f02ba3ad81fe470cd4782e898e2825cb6b2147833e9bbcf9aa8bfb.jpg",
820
+ "image_caption": [
821
+ "Figure 6: Sampled images from the ImageNet classes Red wine and Volcano. Top row: images exited from the first classifier of a MSDNet with correct prediction; Bottom row: images failed to be correctly classified at the first classifier but were correctly predicted and exited at the last layer. "
822
+ ],
823
+ "image_footnote": [],
824
+ "bbox": [
825
+ 509,
826
+ 604,
827
+ 821,
828
+ 693
829
+ ],
830
+ "page_idx": 8
831
+ },
832
+ {
833
+ "type": "text",
834
+ "text": "5.3 MORE COMPUTATIONALLY EFFICIENT DENSENETS ",
835
+ "text_level": 1,
836
+ "bbox": [
837
+ 174,
838
+ 799,
839
+ 570,
840
+ 814
841
+ ],
842
+ "page_idx": 8
843
+ },
844
+ {
845
+ "type": "text",
846
+ "text": "Here, we discuss an interesting finding during our exploration of the MSDNet architecture. We found that following the DenseNet structure to design our network, i.e., by keeping the number of output channels (or growth rate) the same at all scales, did not lead to optimal results in terms of the accuracy-speed trade-off. The main reason for this is that compared to network architectures like ResNets, the DenseNet structure tends to apply more filters on the high-resolution feature maps in the network. This helps to reduce the number of parameters in the model, but at the same time, it greatly increases the computational cost. We tried to modify DenseNets by doubling the growth rate after each transition layer, so that more filters are applied to low-resolution feature maps. It turns out that the resulting network, which we denote as DenseNet\\*, significantly outperform the original DenseNet in terms of computational efficiency. ",
847
+ "bbox": [
848
+ 174,
849
+ 825,
850
+ 825,
851
+ 924
852
+ ],
853
+ "page_idx": 8
854
+ },
855
+ {
856
+ "type": "image",
857
+ "img_path": "images/f82f1fa9b6ae7df691196495c61b67a76cd3e63f7fdf3cb3be3f5fd5bc49b88b.jpg",
858
+ "image_caption": [
859
+ "Figure 8: Test accuracy of DenseNet\\* on CIFAR-100 under the anytime learning setting (left) and the budgeted batch setting (right). "
860
+ ],
861
+ "image_footnote": [],
862
+ "bbox": [
863
+ 191,
864
+ 104,
865
+ 808,
866
+ 273
867
+ ],
868
+ "page_idx": 9
869
+ },
870
+ {
871
+ "type": "text",
872
+ "text": "",
873
+ "bbox": [
874
+ 174,
875
+ 344,
876
+ 825,
877
+ 386
878
+ ],
879
+ "page_idx": 9
880
+ },
881
+ {
882
+ "type": "text",
883
+ "text": "We experimented with DenseNet\\* in our two settings with test time budget constraints. The left panel of Figure 8 shows the anytime prediction performance of an ensemble of DenseNets\\* of varying depths. It outperforms the ensemble of original DenseNets of varying depth by a large margin, but is still slightly worse than MSDNets. In the budgeted batch budget setting, DenseNet\\* also leads to significantly higher accuracy over its counterpart under all budgets, but is still substantially outperformed by MSDNets. ",
884
+ "bbox": [
885
+ 174,
886
+ 392,
887
+ 825,
888
+ 477
889
+ ],
890
+ "page_idx": 9
891
+ },
892
+ {
893
+ "type": "text",
894
+ "text": "6 CONCLUSION ",
895
+ "text_level": 1,
896
+ "bbox": [
897
+ 176,
898
+ 488,
899
+ 318,
900
+ 505
901
+ ],
902
+ "page_idx": 9
903
+ },
904
+ {
905
+ "type": "text",
906
+ "text": "We presented the MSDNet, a novel convolutional network architecture, optimized to incorporate CPU budgets at test-time. Our design is based on two high-level design principles, to generate and maintain coarse level features throughout the network and to inter-connect the layers with dense connectivity. The former allows us to introduce intermediate classifiers even at early layers and the latter ensures that these classifiers do not interfere with each other. The final design is a two dimensional array of horizontal and vertical layers, which decouples depth and feature coarseness. Whereas in traditional convolutional networks features only become coarser with increasing depth, the MSDNet generates features of all resolutions from the first layer on and maintains them throughout. The result is an architecture with an unprecedented range of efficiency. A single network can outperform all competitive baselines on an impressive range of computational budgets ranging from highly limited CPU constraints to almost unconstrained settings. ",
907
+ "bbox": [
908
+ 174,
909
+ 516,
910
+ 825,
911
+ 669
912
+ ],
913
+ "page_idx": 9
914
+ },
915
+ {
916
+ "type": "text",
917
+ "text": "As future work we plan to investigate the use of resource-aware deep architectures beyond object classification, e.g. image segmentation (Long et al., 2015). Further, we intend to explore approaches that combine MSDNets with model compression (Chen et al., 2015; Han et al., 2015), spatially adaptive computation (Figurnov et al., 2016) and more efficient convolution operations (Chollet, 2016; Howard et al., 2017) to further improve computational efficiency. ",
918
+ "bbox": [
919
+ 174,
920
+ 676,
921
+ 823,
922
+ 746
923
+ ],
924
+ "page_idx": 9
925
+ },
926
+ {
927
+ "type": "text",
928
+ "text": "ACKNOWLEDGMENTS ",
929
+ "text_level": 1,
930
+ "bbox": [
931
+ 176,
932
+ 765,
933
+ 326,
934
+ 779
935
+ ],
936
+ "page_idx": 9
937
+ },
938
+ {
939
+ "type": "text",
940
+ "text": "The authors are supported in part by grants from the National Science Foundation ( III-1525919, IIS-1550179, IIS-1618134, S&AS 1724282, and CCF-1740822), the Office of Naval Research DOD (N00014-17-1-2175), and the Bill and Melinda Gates Foundation. ",
941
+ "bbox": [
942
+ 176,
943
+ 790,
944
+ 821,
945
+ 832
946
+ ],
947
+ "page_idx": 9
948
+ },
949
+ {
950
+ "type": "text",
951
+ "text": "REFERENCES ",
952
+ "text_level": 1,
953
+ "bbox": [
954
+ 176,
955
+ 856,
956
+ 285,
957
+ 871
958
+ ],
959
+ "page_idx": 9
960
+ },
961
+ {
962
+ "type": "text",
963
+ "text": "Mariusz Bojarski, Davide Del Testa, Daniel Dworakowski, Bernhard Firner, Beat Flepp, Prasoon Goyal, Lawrence D Jackel, Mathew Monfort, Urs Muller, Jiakai Zhang, et al. End to end learning for self-driving cars. arXiv preprint arXiv:1604.07316, 2016. ",
964
+ "bbox": [
965
+ 176,
966
+ 882,
967
+ 823,
968
+ 922
969
+ ],
970
+ "page_idx": 9
971
+ },
972
+ {
973
+ "type": "text",
974
+ "text": "Tolga Bolukbasi, Joseph Wang, Ofer Dekel, and Venkatesh Saligrama. Adaptive neural networks for fast test-time prediction. arXiv preprint arXiv:1702.07811, 2017. \nCristian Bucilua, Rich Caruana, and Alexandru Niculescu-Mizil. Model compression. In ACM SIGKDD, pp. 535–541. ACM, 2006. \nWenlin Chen, James T Wilson, Stephen Tyree, Kilian Q Weinberger, and Yixin Chen. Compressing neural networks with the hashing trick. In ICML, pp. 2285–2294, 2015. \nFranc¸ois Chollet. Xception: Deep learning with depthwise separable convolutions. arXiv preprint arXiv:1610.02357, 2016. \nJia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, pp. 248–255, 2009. \nMichael Figurnov, Maxwell D Collins, Yukun Zhu, Li Zhang, Jonathan Huang, Dmitry Vetrov, and Ruslan Salakhutdinov. Spatially adaptive computation time for residual networks. arXiv preprint arXiv:1612.02297, 2016. \nAlex Graves. Adaptive computation time for recurrent neural networks. arXiv preprint arXiv:1603.08983, 2016. \nSam Gross and Michael Wilber. Training and investigating residual nets. 2016. URL http: //torch.ch/blog/2016/02/04/resnets.html. \nAlexander Grubb and Drew Bagnell. Speedboost: Anytime prediction with uniform near-optimality. In AISTATS, volume 15, pp. 458–466, 2012. \nSong Han, Huizi Mao, and William J. Dally. Deep compression: Compressing deep neural network with pruning, trained quantization and huffman coding. CoRR, abs/1510.00149, 2015. \nBabak Hassibi, David G Stork, and Gregory J Wolff. Optimal brain surgeon and general network pruning. In IJCNN, pp. 293–299, 1993. \nKaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In ICCV, pp. 1026–1034, 2015. \nKaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pp. 770–778, 2016. \nGeoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. In NIPS Deep Learning Workshop, 2014. \nAndrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017. \nGao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q Weinberger. Deep networks with stochastic depth. In ECCV, pp. 646–661. Springer, 2016. \nGao Huang, Zhuang Liu, Kilian Q Weinberger, and Laurens van der Maaten. Densely connected convolutional networks. In CVPR, 2017. \nItay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Binarized neural networks. In NIPS, pp. 4107–4115, 2016. \nSergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, pp. 770–778, 2015. \nJorn-Henrik Jacobsen, Edouard Oyallon, St ¨ ephane Mallat, and Arnold WM Smeulders. Multiscale ´ hierarchical convolutional networks. arXiv preprint arXiv:1703.04140, 2017. \nSergey Karayev, Mario Fritz, and Trevor Darrell. Anytime recognition of objects and scenes. In CVPR, pp. 572–579, 2014. \nTsung-Wei Ke, Michael Maire, and Stella X. Yu. Neural multigrid. CoRR, abs/1611.07661, 2016. URL http://arxiv.org/abs/1611.07661. \nAlex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Tech Report, 2009. \nAlex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pp. 1097–1105, 2012. \nGustav Larsson, Michael Maire, and Gregory Shakhnarovich. Fractalnet: Ultra-deep neural networks without residuals. In ICLR, 2017. \nYann LeCun, John S Denker, Sara A Solla, Richard E Howard, and Lawrence D Jackel. Optimal brain damage. In NIPS, volume 2, pp. 598–605, 1989. \nChen-Yu Lee, Saining Xie, Patrick W Gallagher, Zhengyou Zhang, and Zhuowen Tu. Deeplysupervised nets. In AISTATS, volume 2, pp. 5, 2015. \nHao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. In ICLR, 2017. \nTsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ´ ECCV, pp. 740–755. Springer, 2014. \nJonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, pp. 3431–3440, 2015. \nFeng Nan, Joseph Wang, and Venkatesh Saligrama. Feature-budgeted random forest. In ICML, pp. 1983–1991, 2015. \nAugustus Odena, Dieterich Lawson, and Christopher Olah. Changing model behavior at test-time using reinforcement learning. arXiv preprint arXiv:1702.07780, 2017. \nMohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. In ECCV, pp. 525–542. Springer, 2016. \nShreyas Saxena and Jakob Verbeek. Convolutional neural fabrics. In NIPS, pp. 4053–4061, 2016. \nChristian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In CVPR, pp. 1–9, 2015. \nKirill Trapeznikov and Venkatesh Saligrama. Supervised sequential classification under budget constraints. In AI-STATS, pp. 581–589, 2013. \nPaul Viola and Michael Jones. Robust real-time object detection. International Journal of Computer Vision, 4(34–47), 2001. \nJi Wan, Dayong Wang, Steven Chu Hong Hoi, Pengcheng Wu, Jianke Zhu, Yongdong Zhang, and Jintao Li. Deep learning for content-based image retrieval: A comprehensive study. In ACM Multimedia, pp. 157–166, 2014. \nJoseph Wang, Kirill Trapeznikov, and Venkatesh Saligrama. Efficient learning by directed acyclic graph for resource constrained prediction. In NIPS, pp. 2152–2160. 2015. \nZhixiang Xu, Olivier Chapelle, and Kilian Q. Weinberger. The greedy miser: Learning under testtime budgets. In ICML, pp. 1175–1182, 2012. \nZhixiang Xu, Matt Kusner, Minmin Chen, and Kilian Q. Weinberger. Cost-sensitive tree of classifiers. In ICML, volume 28, pp. 133–141, 2013. \nSergey Zagoruyko and Nikos Komodakis. Wide residual networks. In BMVC, 2016. \nA. R. Zamir, T.-L. Wu, L. Sun, W. Shen, B. E. Shi, J. Malik, and S. Savarese. Feedback Networks. ArXiv e-prints, December 2016. \nYisu Zhou, Xiaolin Hu, and Bo Zhang. Interlinked convolutional neural networks for face parsing. In International Symposium on Neural Networks, pp. 222–231. Springer, 2015. ",
975
+ "bbox": [
976
+ 171,
977
+ 58,
978
+ 828,
979
+ 924
980
+ ],
981
+ "page_idx": 10
982
+ },
983
+ {
984
+ "type": "text",
985
+ "text": "",
986
+ "bbox": [
987
+ 171,
988
+ 78,
989
+ 828,
990
+ 921
991
+ ],
992
+ "page_idx": 11
993
+ },
994
+ {
995
+ "type": "text",
996
+ "text": "A DETAILS OF MSDNET ARCHITECTURE AND BASELINE NETWORKS",
997
+ "text_level": 1,
998
+ "bbox": [
999
+ 173,
1000
+ 102,
1001
+ 769,
1002
+ 118
1003
+ ],
1004
+ "page_idx": 12
1005
+ },
1006
+ {
1007
+ "type": "text",
1008
+ "text": "We use MSDNet with three scales on the CIFAR datasets, and the network reduction method introduced in 4.1 is applied. Figure 9 gives an illustration of the reduced network. The convolutional layer functions in the first layer, $h _ { 1 } ^ { s }$ , denote a sequence of $3 { \\times } 3$ convolutions (Conv), batch normalization (BN; Ioffe & Szegedy (2015)), and rectified linear unit (ReLU) activation. In the computation of $\\tilde { h } _ { 1 } ^ { s }$ , down-sampling is performed by applying convolutions using strides that are powers of two. For subsequent feature layers, the transformations $h _ { \\ell } ^ { s }$ and $\\tilde { h } _ { \\ell } ^ { s }$ are defined following the design in DenseNets (Huang et al., 2017): Conv $( 1 \\times 1 )$ -BN-ReLU-Conv $\\left( 3 \\times 3 \\right)$ -BN-ReLU. We set the number of output channels of the three scales to 6, 12, and 24, respectively. Each classifier has two down-sampling convolutional layers with 128 dimensional $3 \\times 3$ filters, followed by a $2 \\times 2$ average pooling layer and a linear layer. ",
1009
+ "bbox": [
1010
+ 173,
1011
+ 135,
1012
+ 825,
1013
+ 279
1014
+ ],
1015
+ "page_idx": 12
1016
+ },
1017
+ {
1018
+ "type": "text",
1019
+ "text": "The MSDNet used for ImageNet has four scales, respectively producing 16, 32, 64, and 64 feature maps at each layer. The network reduction is also applied to reduce computational cost. The original images are first transformed by a $7 \\times 7$ convolution and a $3 \\times 3$ max pooling (both with stride 2), before entering the first layer of MSDNets. The classifiers have the same structure as those used for the CIFAR datasets, except that the number of output channels of each convolutional layer is set to be equal to the number of its input channels. ",
1020
+ "bbox": [
1021
+ 174,
1022
+ 285,
1023
+ 825,
1024
+ 369
1025
+ ],
1026
+ "page_idx": 12
1027
+ },
1028
+ {
1029
+ "type": "image",
1030
+ "img_path": "images/d0de6b68dce803aca2a16de6affb943796e7f0bf1bb1eac9cef6c06e5c471db7.jpg",
1031
+ "image_caption": [
1032
+ "Figure 9: Illustration of an MSDNet with network reduction. The network has $S = 3$ scales, and it is divided into three blocks, which maintain a decreasing number of scales. A transition layer is placed between two contiguous blocks. "
1033
+ ],
1034
+ "image_footnote": [],
1035
+ "bbox": [
1036
+ 238,
1037
+ 388,
1038
+ 743,
1039
+ 507
1040
+ ],
1041
+ "page_idx": 12
1042
+ },
1043
+ {
1044
+ "type": "text",
1045
+ "text": "Network architecture for anytime prediction. The MSDNet used in our anytime-prediction experiments has 24 layers (each layer corresponds to a column in Fig. 1 of the main paper), using the reduced network with transition layers as described in Section 4. The classifiers operate on the output of the $2 \\times ( i { + } 1 ) ^ { \\mathrm { t h } }$ layers, with $i = 1 , \\ldots , 1 1$ . On ImageNet, we use MSDNets with four scales, and the $i ^ { \\mathrm { { t h } } }$ classifier operates on the $( k \\times i + 3 ) ^ { \\mathrm { t h } }$ layer (with $i = 1 , \\ldots , 5$ ), where $k = 4 , 6$ and 7. For simplicity, the losses of all the classifiers are weighted equally during training. ",
1046
+ "bbox": [
1047
+ 174,
1048
+ 568,
1049
+ 825,
1050
+ 651
1051
+ ],
1052
+ "page_idx": 12
1053
+ },
1054
+ {
1055
+ "type": "text",
1056
+ "text": "Network architecture for budgeted batch setting. The MSDNets used here for the two CIFAR datasets have depths ranging from 10 to 36 layers, using the reduced network with transition layers as described in Section 4. The $k ^ { \\mathrm { { t h } } }$ classifier is attached to the $( \\sum _ { i = 1 } ^ { k } i ) ^ { \\mathrm { t h } }$ layer. The MSDNets used for ImageNet are the same as those described for the anytime learning setting. ",
1057
+ "bbox": [
1058
+ 174,
1059
+ 659,
1060
+ 825,
1061
+ 717
1062
+ ],
1063
+ "page_idx": 12
1064
+ },
1065
+ {
1066
+ "type": "text",
1067
+ "text": "$\\mathbf { R e s N e t } ^ { \\mathbf { M C } }$ and DenseNetMC. The ResNetMC has 62 layers, with 10 residual blocks at each spatial resolution (for three resolutions): we train early-exit classifiers on the output of the $4 ^ { \\mathrm { t h } }$ and $8 ^ { \\mathrm { t h } }$ residual blocks at each resolution, producing a total of 6 intermediate classifiers (plus the final classification layer). The DenseNetMC consists of 52 layers with three dense blocks and each of them has 16 layers. The six intermediate classifiers are attached to the $6 ^ { \\mathrm { { t h } } }$ and $1 2 ^ { \\mathrm { t h } }$ layer in each block, also with dense connections to all previous layers in that block. ",
1068
+ "bbox": [
1069
+ 174,
1070
+ 722,
1071
+ 825,
1072
+ 808
1073
+ ],
1074
+ "page_idx": 12
1075
+ },
1076
+ {
1077
+ "type": "text",
1078
+ "text": "B ADDITIONAL RESULTS ",
1079
+ "text_level": 1,
1080
+ "bbox": [
1081
+ 176,
1082
+ 832,
1083
+ 398,
1084
+ 847
1085
+ ],
1086
+ "page_idx": 12
1087
+ },
1088
+ {
1089
+ "type": "text",
1090
+ "text": "B.1 ABLATION STUDY ",
1091
+ "text_level": 1,
1092
+ "bbox": [
1093
+ 176,
1094
+ 866,
1095
+ 341,
1096
+ 880
1097
+ ],
1098
+ "page_idx": 12
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "We perform additional experiments to shed light on the contributions of the three main components of MSDNet, viz., multi-scale feature maps, dense connectivity, and intermediate classifiers. ",
1103
+ "bbox": [
1104
+ 173,
1105
+ 892,
1106
+ 823,
1107
+ 921
1108
+ ],
1109
+ "page_idx": 12
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "We start from an MSDNet with six intermediate classifiers and remove the three main components one at a time. To make our comparisons fair, we keep the computational costs of the full networks similar, at around $3 . 0 \\times 1 0 ^ { 8 }$ FLOPs, by adapting the network width, i.e., number of output channels at each layer. After removing all the three components in an MSDNet, we obtain a regular VGG-like convolutional network. We show the classification accuracy of all classifiers in a model in the left panel of Figure 10. Several observations can be made: 1. the dense connectivity is crucial for the performance of MSDNet and removing it hurts the overall accuracy drastically (orange vs. black curve); 2. removing multi-scale convolution hurts the accuracy only in the lower budget regions, which is consistent with our mo",
1114
+ "bbox": [
1115
+ 174,
1116
+ 104,
1117
+ 496,
1118
+ 338
1119
+ ],
1120
+ "page_idx": 13
1121
+ },
1122
+ {
1123
+ "type": "image",
1124
+ "img_path": "images/36de99964e9e6ab4f6f1967fffee5d8d4816d0686cfae2751a7e8cef27def4c9.jpg",
1125
+ "image_caption": [
1126
+ "Figure 10: Ablation study (on CIFAR-100) of MSDNets that shows the effect of dense connectivity, multi-scale features, and intermediate classifiers. Higher is better. "
1127
+ ],
1128
+ "image_footnote": [],
1129
+ "bbox": [
1130
+ 516,
1131
+ 104,
1132
+ 818,
1133
+ 267
1134
+ ],
1135
+ "page_idx": 13
1136
+ },
1137
+ {
1138
+ "type": "text",
1139
+ "text": "tivation that the multi-scale design introduces discriminative features early on; 3. the final canonical CNN (star) performs similarly as MSDNet under the specific budget that matches its evaluation cost exactly, but it is unsuited for varying budget constraints. The final CNN performs substantially better at its particular budget region than the model without dense connectivity (orange curve). This suggests that dense connectivity is particularly important in combination with multiple classifiers. ",
1140
+ "bbox": [
1141
+ 174,
1142
+ 339,
1143
+ 825,
1144
+ 409
1145
+ ],
1146
+ "page_idx": 13
1147
+ },
1148
+ {
1149
+ "type": "text",
1150
+ "text": "B.2 RESULTS ON CIFAR-10 ",
1151
+ "text_level": 1,
1152
+ "bbox": [
1153
+ 174,
1154
+ 425,
1155
+ 385,
1156
+ 440
1157
+ ],
1158
+ "page_idx": 13
1159
+ },
1160
+ {
1161
+ "type": "text",
1162
+ "text": "For the CIFAR-10 dataset, we use the same MSDNets and baseline models as we used for CIFAR100, except that the networks used here have a 10-way fully connected layer at the end. The results under the anytime learning setting and the batch computational budget setting are shown in the left and right panel of Figure 11, respectively. Similar to what we have observed from the results on CIFAR-100 and ImageNet, MSDNets outperform all the baselines by a significant margin in both settings. As in the experiments presented in the main paper, ResNet and DenseNet models with multiple intermediate classifiers perform relatively poorly. ",
1163
+ "bbox": [
1164
+ 173,
1165
+ 452,
1166
+ 825,
1167
+ 549
1168
+ ],
1169
+ "page_idx": 13
1170
+ },
1171
+ {
1172
+ "type": "image",
1173
+ "img_path": "images/adf6b406c38b10a1e3fedffbeafa7e030553b2ab7ceb4700cb0a1fb272d4ff92.jpg",
1174
+ "image_caption": [
1175
+ "Figure 11: Classification accuracies on the CIFAR-10 dataset in the anytime-prediction setting (left) and the budgeted batch setting (right). "
1176
+ ],
1177
+ "image_footnote": [],
1178
+ "bbox": [
1179
+ 189,
1180
+ 564,
1181
+ 810,
1182
+ 734
1183
+ ],
1184
+ "page_idx": 13
1185
+ }
1186
+ ]
parse/train/Hk2aImxAb/Hk2aImxAb_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hk2aImxAb/Hk2aImxAb_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HyeaSkrYPH/HyeaSkrYPH.md ADDED
@@ -0,0 +1,356 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CERTIFIED DEFENSES FOR ADVERSARIAL PATCHES∗
2
+
3
+ Ping-yeh Chiang†, Renkun Ni†, Ahmed Abdelkader, Chen Zhu University of Maryland, College Park {pchiang,rn9zm,akader,chenzhu}@cs.umd.edu
4
+
5
+ Christoph Studer Cornell University studer@cornell.edu
6
+
7
+ Tom Goldstein
8
+ University of Maryland, College Park
9
+ tomg@cs.umd.edu
10
+
11
+ # ABSTRACT
12
+
13
+ Adversarial patch attacks are among one of the most practical threat models against real-world computer vision systems. This paper studies certified and empirical defenses against patch attacks. We begin with a set of experiments showing that most existing defenses, which work by pre-processing input images to mitigate adversarial patches, are easily broken by simple white-box adversaries. Motivated by this finding, we propose the first certified defense against patch attacks, and propose faster methods for its training. Furthermore, we experiment with different patch shapes for testing, obtaining surprisingly good robustness transfer across shapes, and present preliminary results on certified defense against sparse attacks. Our complete implementation can be found on: https://github.com/Ping-C/certifiedpatchdefense.
14
+
15
+ # 1 INTRODUCTION
16
+
17
+ Despite the great success of neural networks for vision problems, they are easily fooled by adversarial attacks in which the input to a machine learning model is modified with the goal of manipulating its output. Research in this area is largely focused on norm-bounded attack (Madry et al., 2017; Tramer\` & Boneh, 2019; Shafahi et al., 2019), where the adversary is allowed to perturb all pixels in an image provided that the $\ell _ { p }$ -norm of the perturbation is within prescribed bounds. Other adversarial models were also proposed, such as functional (Laidlaw & Feizi, 2019), rotation/translation (Engstrom et al., 2017), and Wasserstein (Wong et al., 2019), all of which allow modification to all pixels.
18
+
19
+ Whole-image perturbations are unrealistic for modeling ”physical-world” attacks, in which a realworld object is modified to evade detection. A physical adversary usually modifies an object using stickers or paint. Because this object may only occupy a small portion of an image, the adversary can only manipulate a limited number of pixels. As such, the more practical patch attack model was proposed (Brown et al., 2017). In a patch attack, the adversary may only change the pixels in a confined region, but is otherwise free to choose the values yielding the strongest attack. The threat to real-world computer vision systems is well-demonstrated in recent literature where carefully crafted patches can fool a classifier with high reliability (Brown et al., 2017; Karmon et al., 2018), make objects invisible to an object detector (Wu et al., 2019; Lee & Kolter, 2019), or fool a face recognition system (Sharif et al., 2017). In light of such effective physical-world patch attacks, very few defenses are known to date.
20
+
21
+ In this paper, we study principled defenses against patch attacks. We begin by looking at existing defenses in the literature that claim to be effective against patch attacks, including Local Gradient Smoothing (LGS) (Naseer et al., 2019) and Digital Watermarking (DW) (Hayes, 2018). Similar to what has been observed for whole-image attacks by (Athalye et al., 2018), we show that these patch defenses are easily broken by stronger adversaries. Concretely, we demonstrate successful white-box attacks, where the adversary designs an attack against a known model, including any pre-processing steps. To cope with such potentially stronger adversaries, we train a robust model that produces a lower-bound on adversarial accuracy. In particular, we propose the first certifiable defense against patch attacks by extending interval bound propagation (IBP) defenses (Gowal et al., 2018; Mirman et al., 2018). We also propose modifications to IBP training to make it faster in the patch setting. Furthermore, we study the generalization of certified patch defenses to patches of different shapes, and observe that robustness transfers well across different patch types. We also present preliminary results on certified defense against the stronger sparse attack model, where a fixed number of possibly non-adjacent pixels can be arbitrarily modified (Modas et al., 2019).
22
+
23
+ # 2 PROBLEM SETUP
24
+
25
+ We consider a white-box adversary that is allowed to choose the location of the patch (chosen from a set $\mathbb { L }$ of possible locations) and can modify pixels within the particular patch (chosen from the set $\mathbb { P }$ ) similar to (Karmon et al., 2018). An attack is successful if the adversary changes the classification of the network to a wrong label. In this paper, we are primarily interested in the patch attack robust accuracy (adversarial accuracy for short) as defined by
26
+
27
+ $$
28
+ \underset { x \sim X } { \mathbb { E } } \operatorname* { m i n } _ { p \in \mathbb { P } , l \in \mathbb { L } } \mathcal { X } [ f ( A ( x , p , l ) ; \theta ) = y ] ,
29
+ $$
30
+
31
+ where the operator $A$ places the adversarial patch p on a given image $\mathbf { X }$ at location $l$ , f is a neural network with parameter $\theta$ , $X$ is a distribution of images, and $\mathcal { X }$ is a characteristic function that takes value 1 if its argument is true, and 0 otherwise.
32
+
33
+ In this model, the strength of the adversary can vary depending on the set of possible patches allowed, and the type of perturbation allowed within the patch. In what follows, we assume the standard setup in which the adversary is allowed any perturbation that maintains pixel intensities in the range $[ 0 , 1 ]$ . Unless otherwise noted, we also assume the patch is restricted to a square of prescribed size. We consider two different options for the set $\mathbb { L }$ of possible patch locations. First, we consider a weak adversary that can only place patches at the corner of an image. We find that even this weak model is enough to break existing patch defenses. Then, we consider a stronger adversary with no restrictions on patch location, and use this model to evaluate our proposed defenses. Note that an adversary, when restricted to modify only a square patch at location $l$ in the image, has the freedom to modify any non-square subset of these pixels. In other words, a certified defense against square patch attacks also provably subverts any non-square patch attack that fits inside a small enough square.
34
+
35
+ In general, calculating the adversarial accuracy (1) is intractable due to non-convexity. Common approaches try to approximate it by solving the inner minimization using a gradient-based method. However, in Section 3, we show that depending on how the minimization is solved, the upper bound could be very loose: a model may appear to be very robust, but fail when faced with a stronger attack. To side-step the arms race between attacks and defenses, in Section 4, we extend the work of (Gowal et al., 2018) and (Mirman et al., 2018) to train a network that produces a lower bound on adversarial accuracy. We will refer to approximations of the upper bound as empirical adversarial accuracy and the lower bound as certified accuracy.
36
+
37
+ # 3 VULNERABILITY OF EXISTING DEFENSES
38
+
39
+ We start by examining existing defense strategies that claim to be effective against patch attacks. Similar to what has been observed for whole-image attacks by Athalye et al. (2018), we show that these patch defenses can easily be broken by white-box attacks, where the adversary optimizes against a given model including any pre-processing steps.
40
+
41
+ # 3.1 EXISTING DEFENSES
42
+
43
+ Under our threat model, two defenses have been proposed that each use input transformations to detect and remove adversarial patches.
44
+
45
+ The first defense is based on the observation that the gradient of the loss with respect to the input image often exhibits large values near the perturbed pixels. In (Hayes, 2018), the proposed digital watermarking (DW) approach exploits this behavior to detect unusually dense regions of large gradient entries using saliency maps, before masking them out in the image. Despite a $1 2 \%$ drop in accuracy on clean (non-adversarial) images, this defense method supposedly achieves an empirical adversarial accuracy of $6 3 \%$ for non-targeted patch attacks of size $4 2 \times 4 2$ ( $\dot { 2 } \%$ of the image pixels), using 400 randomly picked images from ImageNet (Deng et al., 2009) on VGG19 (Simonyan & Zisserman, 2014).
46
+
47
+ Table 1: Empirical adversarial accuracy of ImageNet classifiers defended with Local Gradient Smoothing and Digital Watermarking. We consider two types of adversaries, one that takes the defense into account during backpropagation and one that does not
48
+
49
+ <table><tr><td colspan="2"></td><td colspan="3">Patch Size</td></tr><tr><td>Attack</td><td>Defense</td><td>42 × 42</td><td>52 × 52</td><td>60 ×60</td></tr><tr><td>IFGSM</td><td>LGS</td><td>78%</td><td>75%</td><td>71%</td></tr><tr><td>IFGSM+LGS</td><td>LGS</td><td>14%</td><td>5%</td><td>3%</td></tr><tr><td>IFGSM</td><td>DW</td><td>56%</td><td>49%</td><td>45%</td></tr><tr><td>IFGSM+DW</td><td>DW</td><td>13%</td><td>8%</td><td>5%</td></tr></table>
50
+
51
+ The second defense, Local Gradient Smoothing (LGS) by Naseer et al. (2019) is based on the empirical observation that pixel values tend to change sharply within these adversarial patches. In other words, the image gradients tend to be large within these adversarial patches. Note that the image gradient here differs from the gradient in Hayes (2018), the former is with respect the changes of adjacent pixel values and the later is with respect to the classification loss. Naseer et al. (2019) propose suppressing this adversarial noise by multiplying each pixel with one minus its image gradient as in (2). To make their methods more effective, Naseer et al. (2019) also pre-process the image gradient with a normalization and a thresholding step.
52
+
53
+ $$
54
+ { \hat { x } } = x \odot ( 1 - \lambda g ( x ) ) .
55
+ $$
56
+
57
+ The $\lambda$ here is a smoothing hyper-parameter. Naseer et al. (2019) claim the best adversarial accuracy on ImageNet with respect to patch attacks among all of the defenses we studied. They also claim that their defense is resilient to Backward Pass Differential Approximation (BPDA) from Athalye et al. (2018), one of the most effective methods to attack models that include a non-differentiable operator as a pre-processing step.
58
+
59
+ # 3.2 BREAKING EXISTING DEFENSES
60
+
61
+ Using a similar setup as in (Hayes, 2018; Naseer et al., 2019), we are able to mostly replicate the reported empirical adversarial accuracy for Iterative Fast Gradient Sign Method (IFGSM), a common gradient based attack, but we show that when the pre-processing step is taken into account, the empirical adversarial accuracy on ImageNet quickly drops from $\bar { \sim } 7 0 \% ( \sim 5 0 \% )$ for LGS(DW) to levels around $\sim 1 0 \%$ as shown in Table 1.
62
+
63
+ Specifically, we break DW (Hayes, 2018) by applying BPDA, in which the non-differentiable operator is approximated with an identity mapping during the backward pass. We break LGS (Naseer et al., 2019) by directly incorporating the smoothing step during backpropagation. Even though the windowing and thresholding steps are non-differentiable, the smoothing operator provides enough gradient information for the attack to be effective.
64
+
65
+ To make sure that our evaluation is fair, we used the exact same models as Hayes (2018) (VGG19) and Szegedy et al. (2016) (Inception V3). We also consider a weaker set of attackers that can only attack the corners, the same as their setting. Further, we ensure that we were able to replicate their reported result under similar setting.
66
+
67
+ # 4 CERTIFIED DEFENSES
68
+
69
+ Given the ease with which these supposedly strong defenses are broken, it is natural to seek methods that can rigorously guarantee robustness of a given model to patch attacks. With such certifiable guarantees in hand, we need not worry about an adversary with a stronger optimizer, or a more clever algorithm for choosing patch locations.
70
+
71
+ # 4.1 BACKGROUND ON CERTIFIED DEFENSES
72
+
73
+ Certified defenses have been intensely studied with respect to norm-bounded attacks (Cohen et al., 2019; Wong & Kolter, 2017; Gowal et al., 2018; Mirman et al., 2018; Zhang et al., 2019b). In all of these methods, in addition to the prediction model, there is also a verifier. Given a model and an input, the verifier outputs a certificate if it is guaranteed that the image can not be adversarially perturbed. This is done by checking whether there exists any nearby image (within a prescribed $\ell _ { p }$ distance) with a different label than the image being classified. While theoretical bounds exist on the size of this distance that hold for any classifier (Shafahi et al., 2018), exactly computing bounds for a specific classifier and test image is hard. Alternatively, the verifier may output a lower bound on the distance to the nearest image of a different label. This latter distance is referred to as the certifiable radius. Most of these verifiers provide a rather loose bound on the certifiable radius. However, if the verifier is differentiable, then the network can be trained with a loss that promotes tightness of this bound. We use the term certificate training to refer to the process of training with a loss that promotes strong certificates. Interval bound propagation (IBP) (Mirman et al., 2018; Gowal et al., 2018) is a very simple verifier that uses layer-wise interval arithmetic to produce a certificate. Even though the IBP certificate is generally loose, after certificate training, it yields state-of-the-art certifiably-robust models for $l _ { \infty }$ -norm bounded attacks (Gowal et al., 2018; Zhang et al., 2019b). In this paper, we extend IBP to train certifiably-robust networks resilient to patch attacks. We first introduce some notation and basic algorithms for IBP training.
74
+
75
+ Notation We represent a neural network with a series of transformations $h ^ { ( k ) }$ for each of its $k$ layers. We use $z ^ { ( k ) } \in \bar { \mathbb { R } } ^ { n _ { k } }$ to denote the output of layer $k$ , where $n _ { k }$ is the number of units in the $k ^ { t h }$ layer and $z ^ { ( 0 ) }$ stands for the input. Specifically, the network computes
76
+
77
+ $$
78
+ z ^ { ( k ) } = h ^ { ( k - 1 ) } ( z ^ { ( k - 1 ) } ) \forall k = 1 , \dots , K .
79
+ $$
80
+
81
+ Certification Problem To produce a certificate for an input $x _ { 0 }$ , we want to verify that the following condition is true with respect to all possible labels $y$ :
82
+
83
+ $$
84
+ ( e _ { y _ { t r u e } } - e _ { y } ) ^ { T } z ^ { ( K ) } = { \bf m } _ { y } \geq 0 \qquad \forall z ^ { ( 0 ) } \in \mathbb { B } ( x _ { 0 } ) \qquad \forall y .
85
+ $$
86
+
87
+ Here, $e _ { i }$ is the $i ^ { t h }$ basis vector, and $\mathbf { m } _ { y }$ is called the margin following Wong & Kolter (2017). Note that $\mathbf { m } _ { y _ { t r u e } }$ is always equal to 0. The vector $\mathbf { m }$ contains all margins corresponding to all labels. $\mathbb { B } ( x _ { 0 } )$ is the constraint set over which the adversarial input image may range. In a conventional setting, this is an $\ell _ { \infty }$ ball around $x _ { 0 }$ . In the case of patch attack, the constraint set contains all images formed by applying a patch to $x _ { 0 }$ ;
88
+
89
+ $$
90
+ \mathbb { B } ( x _ { 0 } ) = \{ A ( x _ { 0 } , p , l ) | p \in \mathbb { P } { \mathrm { ~ a n d ~ } } l \in \mathbb { L } \} .
91
+ $$
92
+
93
+ The Basics of Interval Bound Propagation (IBP) We now describe how to produce certificates using interval bound propagation as in (Gowal et al., 2018). Suppose that for each component in $z ^ { ( k - \bar { 1 } ) }$ we have an interval containing all the values which this component reaches as $z ^ { ( 0 ) }$ ranges over the ball $\mathbb { B } ( x _ { 0 } )$ . If $z ^ { ( k ) } = h ^ { ( k ) } ( z ^ { \top } )$ is a linear (or convolutional) layer of the form ${ z } ^ { ( k ) ^ { - } } =$ $W ^ { ( k ) } z ^ { ( k - 1 ) } + b ^ { ( k ) }$ , then we can get an outer approximation of the reachable interval range of activations by the next layer $z ^ { ( k ) }$ using the formulas below
94
+
95
+ $$
96
+ \begin{array} { r l } & { \overline { { z } } ^ { ( k ) } = W ^ { ( k ) } \frac { \overline { { z } } ^ { ( k - 1 ) } + \underline { { z } } ^ { ( k - 1 ) } } { 2 } + | W ^ { ( k ) } | \frac { \overline { { z } } ^ { ( k - 1 ) } - \underline { { z } } ^ { ( k - 1 ) } } { 2 } + b ^ { ( k ) } , } \\ & { \underline { { z } } ^ { ( k ) } = W ^ { ( k ) } \frac { \overline { { z } } ^ { ( k - 1 ) } + \underline { { z } } ^ { ( k - 1 ) } } { 2 } - | W ^ { ( k ) } | \frac { \overline { { z } } ^ { ( k - 1 ) } - \underline { { z } } ^ { ( k - 1 ) } } { 2 } + b ^ { ( k ) } . } \end{array}
97
+ $$
98
+
99
+ Here $\overline { { z } } ^ { ( k - 1 ) }$ denotes the upper bound of each interval, $\underline { z } ^ { ( k - 1 ) }$ the lower bound, and $| W ^ { ( k ) } |$ the element-wise absolute value. Alternatively, if $h ^ { ( k ) } ( z ^ { ( k - 1 ) } )$ is an element-wise monotonic activation (e.g., a ReLU), then we can calculate the outer approximation of the reachable interval range of the next layer using the formulas below.
100
+
101
+ $$
102
+ \begin{array} { r } { \overline { z } ^ { ( k ) } = h ^ { ( k ) } ( \overline { z } ^ { ( k - 1 ) } ) } \\ { \underline { z } ^ { ( k ) } = h ^ { ( k ) } ( \underline { z } ^ { ( k - 1 ) } ) . } \end{array}
103
+ $$
104
+
105
+ When the feasible set $\mathbb { B } ( x _ { 0 } )$ represents a simple $\ell _ { \infty }$ attack, the range of possible $z ^ { ( 0 ) }$ values is trivially characterized by an interval bound $\overline { { z } } ^ { ( 0 ) }$ and $\underline { z } ^ { ( 0 ) }$ . Then, by iteratively applying the above rules, we can propagate intervals through the network and eventually get $\overline { { z } } ^ { ( K ) }$ and $\smash { \mathcal { Z } ^ { ( K ) } }$ . A certificate can then be given if we can show that (3) is always true for outputs in the range $\overline { { z } } ^ { ( K ) }$ and $\smash { \boldsymbol { \mathcal { Z } } ^ { ( K ) } }$ with respect to all possible labels. More specifically, we can check that the following holds for all $y$
106
+
107
+ $$
108
+ \begin{array} { r } { \underline { { \mathbf { m } } } _ { y } = e _ { y _ { t r u e } } ^ { T } \underline { { z } } ^ { ( K ) } - e _ { y } ^ { T } \overline { { z } } ^ { ( K ) } = \underline { { z } } _ { y _ { t r u e } } ^ { ( K ) } - \overline { { z } } _ { y } ^ { ( K ) } \geq 0 \quad \forall y . } \end{array}
109
+ $$
110
+
111
+ Training for Interval Bound Propagation To train a network to produce accurate interval bounds, we simply replace standard logits with the $- \mathbf { m }$ vector in (3). Note that all elements of $\mathbf { m }$ need to be larger than zero to satisfy the conditions in (3), and mytrue is always equal to zero. Put simply, we would like mytrue to be the least of all margins. We can promote this condition by training with the loss function
112
+
113
+ $$
114
+ \mathrm { C e r t i f i c a t e \ L o s s } = \mathrm { C r o s s \ E n t r o p y \ L o s s } ( - \mathbf { m } , y ) .
115
+ $$
116
+
117
+ Unlike regular neural network training, stochastic gradient descent for minimizing equation 10 is unstable, and a range of tricks are necessary to stabilize IBP training (Gowal et al., 2018). The first trick is merging the last linear weight matrix with $( e _ { y } - e _ { y _ { t r u e } } )$ before calculating $- { \underline { { \mathbf { m } } } } _ { y }$ . This allows a tighter characterization of the interval bound that noticeably improves results. The second trick uses an “epsilon schedule” in which training begins with a perturbation radius of zero, and this radius is slowly increased over time until a sentinel value is reached. Finally, a mixed loss function containing both a standard natural loss and an IBP loss is used.
118
+
119
+ In all of our experiments, we use the merging technique and the epsilon schedule, but we do not use a mixed loss function containing a natural loss as it does not increase our certificate performance.
120
+
121
+ # 4.2 CERTIFYING AGAINST PATCH ATTACKS
122
+
123
+ We can now describe the extension of IBP to patches. If we specify the patch location, one can represent the feasible set of images with a simple interval bound: for pixels within the patch, the upper and lower bound is equal to 1 and 0. For pixels outside of the patch, the upper and lower bounds are both equal to the original pixel value. By passing this bound through the network, we would be able to get msingle location and verify that they satisfy the conditions in (3).
124
+
125
+ However, we have to consider not just a single location, but all possible locations $\mathbb { L }$ to give a certificate. To adapt the bound to all possible location, we pass each of the possible patches through the network, and take the worst case margin. More specifically,
126
+
127
+ $$
128
+ \mathbf { m } ^ { \mathrm { e s } } ( \mathbb { L } ) _ { y } = \operatorname* { m i n } _ { l \in \mathbb { L } } \mathbf { m } ^ { \mathrm { s i n g l e ~ p a t c h } } ( l ) _ { y } \forall y .
129
+ $$
130
+
131
+ Similar to regular IBP training, we simply use $\underline { { \mathbf { m } } } ^ { \mathrm { e s } } ( \mathbb { L } )$ to calculate the cross entropy loss for training and backpropagation,
132
+
133
+ $$
134
+ \operatorname { C e r t i f i c a t e \operatorname { L o s s } } = \operatorname { C r o s s \operatorname { E n t r o p y \operatorname { L o s s } } } ( - \underline { { \mathbf { m } } } ^ { \mathrm { e s } } ( \mathbb { L } ) , y ) .
135
+ $$
136
+
137
+ Unfortunately, the cost of producing this na¨ıve certificate increases quadratically with image size. Consider that a CIFAR-10 image is of size $3 2 \times 3 2$ , requiring over a thousand interval bounds, one for each possible patch location. To alleviate this problem, we propose two certificate training methods: Random Patch and Guided Patch, so that the number of forward passes does not scale with the dimension of the inputs.
138
+
139
+ Random Patch Certificate Training In this method, we simply select a random set of patches out of the possible patches and pass them forward. A level of robustness is achieved even though a very small number of random patches are selected compared to the total number of possible patches
140
+
141
+ $$
142
+ \underline { { \mathbf { m } } } ^ { \mathrm { r a n d o m \ p a t c h e s } } ( \mathbb { L } ) _ { y } = \underline { { \mathbf { m } } } ^ { \mathrm { e s } } ( S ) _ { y }
143
+ $$
144
+
145
+ where $S$ is a random subset of $\mathbb { L }$ . Similarly, the random patch certificate loss is calculated as below.
146
+
147
+ $$
148
+ \mathrm { R a n d o m ~ P a t c h ~ C e r t i f i c a t e ~ L o s s } = \mathrm { C r o s s ~ E n t r o p y ~ L o s s } ( - \underline { { \mathbf { m } } } ^ { \mathrm { r a n d o m ~ p a t c h e s } } ( \mathbb { L } ) , y )
149
+ $$
150
+
151
+ Guided Patch Certificate Training In this method, we propose using a U-net (Ronneberger et al., 2015) to predict msingle patch, and then randomly select a couple of locations based on the predicted $\mathbf { m } ^ { \mathrm { s i n g l e } \mathrm { p a t c h } }$ so that fewer patches need to be passed forward.
152
+
153
+ Note that very few patches contribute to the worst case bound $\underline { { \mathbf { m } } } ^ { \mathrm { e s } }$ in (11). In fact, the number of patches that yield the worst case margins will be no more than the number of labels. If we know the worst-case patches beforehand, then we can simply select the few worst-case patches during training.
154
+
155
+ We propose to use U-net as the number of locations and margins is very large. For a square patch of size $n \times n$ and an image of size $m \times m$ , the total number of possible locations is $( m - n + \mathbf { \hat { 1 } } ) ^ { 2 }$ , and for each location the number of margins is equal to the number of possible labels.
156
+
157
+ $$
158
+ \begin{array} { l } { { \bf { m } } ^ { \mathrm { { p r e d } } } = { \bf { U } } { \mathrm { - n e t } } ( \mathrm { i m a g e } ) } \\ { { \bf { d i m } } ( { \bf { m } } ^ { \mathrm { { p r e d } } } ) = ( m - n + 1 , m - n + 1 , \# \mathrm { o f } \mathrm { l a b e l s } ) . } \end{array}
159
+ $$
160
+
161
+ Given the U-net prediction of $\underline { { \mathbf { m } } } ^ { \mathrm { p r e d } }$ , we then randomly select a single patch for each label based on the softmax of the predicted $\underline { { \mathbf { m } } } ^ { \mathrm { p r e d } }$ . The number of selected patches is equal to the number of labels. After these patches are passed forward, the U-net is then updated with a mean-squared-error loss between the predicted margins $\underline { { \mathbf { m } } } ^ { \mathrm { p r e d } }$ and the actual margins $\underline { { \mathbf { m } } } ^ { \mathrm { a c t u a l } }$ . Note that only a few patches are selected at a time, so that the mean-squared-error only passes through the selected patches.
162
+
163
+ $$
164
+ \mathrm { U } \mathrm { - n e t } \mathrm { L o s s } = \mathbf { M } \mathrm { S E } ( \mathbf { \underline { { m } } } ^ { \mathrm { p r e d } } , \mathbf { \underline { { m } } } ^ { \mathrm { a c t u a l } } ) .
165
+ $$
166
+
167
+ The network is trained with the following loss:
168
+
169
+ Guided Patch Certificate $\operatorname { L o s s } = \operatorname { C r o s s } \operatorname { E n t r o p y } \operatorname { L o s s } ( - \underline { { \mathbf { m } } } ^ { \mathrm { g u i d e d } \mathrm { p a t c h e s } } ( \mathbb { L } ) , y ) .$
170
+
171
+ Certification Process In all our experiments, we check that equation (3) is satisfied by iterating over all possible patches and forward-passing the interval bounds generated for each patch; this overhead is tolerable at evaluation time.
172
+
173
+ # 4.3 CERTIFYING AGAINST SPARSE ATTACKS
174
+
175
+ IBP can also be adapted to defend against sparse attack where the attacker is allowed to modify a fixed number $( k )$ of pixels that may not be adjacent to each other (Modas et al., 2019). The only modification is that we have to change the bound calculated from the first layer to
176
+
177
+ $$
178
+ \overline { { { z } } } _ { i } ^ { ( 1 ) } = W _ { i , : } ^ { ( 1 ) } z ^ { ( 0 ) } + | W _ { i , : } ^ { ( 1 ) } | _ { t o p _ { k } } ~ z _ { i } ^ { ( 1 ) } = W _ { i , : } ^ { ( 1 ) } z ^ { ( 0 ) } - | W _ { i , : } ^ { ( 1 ) } | _ { t o p _ { k } } ~ \forall i
179
+ $$
180
+
181
+ and apply equation (5) and (6) for the subsequent layers. Here, $( . ) _ { t o p _ { k } }$ is the sum of the largest $k$ elements in the vector.
182
+
183
+ # 5 EXPERIMENTS
184
+
185
+ In this section, we compare our certified defenses with exiting algorithms on two datasets and three model architectures of varying complexity. We consider a strong attack setting in which adversarial patches can appear anywhere in the image. Different training strategies for the certified defense are also compared, which shows a trade-off between performance and training efficiency. Furthermore, we evaluate the transferability of a model trained using square patches to other adversarial shapes, including shapes that do not fit in any certified square. The training and architectural details can be found in Appendix A.1. We also present preliminary results on certified defense against sparse attacks.
186
+
187
+ # 5.1 COMPARISON AGAINST EXISTING DEFENSES
188
+
189
+ In this section, we study the effectiveness of our proposed IBP certified models against an adversary that is allowed to place patches anywhere in the image, even on top of the salient object. If the patch is sufficiently small, and does not cover a large portion of the salient object, then the model should still classify correctly, and defense against the perturbation should be possible.
190
+
191
+ In the best case, our IBP certified model is able to achieve $9 1 . 6 \%$ certified (Table 2) with respect to a $2 \times 2$ patch $( \sim . 5 \%$ of image pixels) adversary on MNIST. For more challenging cases, such as a 5 $\times 5$ ( $\sim 2 . 5 \%$ of image pixels) patch adversary on CIFAR-10, the certified adversarial accuracy is only $2 4 . 9 \%$ (Table 2). Even though these existing defenses appear to achieve better or comparable adversarial accuracy as our IBP certified model when faced with a weak adversary, when faced with a stronger adversary their adversarial accuracy dropped to levels below our certified accuracy for all cases that we analyzed.
192
+
193
+ When evaluating existing defenses, we only report cases where non-trivial adversarial accuracy is achieved against a weaker adversary. We do not explore cases where LGS and DW perform so poorly that no meaningful comparison can be done. LGS and DW are highly dependent on hyperparameters to work effectively against naive attacks, and yet neither Naseer et al. (2019) nor Hayes (2018) proposed a way to learn these hyperparameters. By trial and error, we were able to increase the adversarial accuracy against a weaker adversary for some settings, but not all. In addition, we also notice a peculiar feature of DW: when we increase the adversarial accuracy, the clean accuracy degrades, sometimes so much that it is even lower than the empirical adversarial accuracy. This happens because DW always removes a patch from the prediction. When an adversarial patch is detected, it is likely to be removed, enabling correct prediction. On the other hand, when there are no adversarial patches, DW removes actual salient information, resulting in lower clean accuracy.
194
+
195
+ Here we did not compare our results with adversarial training, because even though it produces some of the most adversarially robust models, it does not offer any guarantees on the empirical robust accuracy, and could still be decreased further with stronger attacks. For example, Wang et al. (2019) proposed a stronger attack that could find $47 \%$ more adversarial examples compared to gradient based method. Further, adversarial training on all possible patches would be even more expensive compared to certificate training, and is slightly beyond our computational budget.
196
+
197
+ Compared to state-of-the-art certified models for CIFAR with $L _ { \infty }$ -perturbation, where Zhang et al. (2019a) proposed a deterministic algorithm that achieves clean accuracy of $3 4 . 0 \%$ , our clean accuracy for our most robust CIFAR $5 \times 5$ model is $4 7 . 8 \%$ when using a large model (Table 2).
198
+
199
+ Table 2: Comparison of our IBP certified patch defense against existing defenses. Empirical adversarial accuracy is calculated for 400 random images in both datasets. All results are averaged over three different models.
200
+
201
+ <table><tr><td>Dataset</td><td>Patch Size</td><td>Adversary</td><td>Defense</td><td>Clean Accuracy</td><td>Accuracy</td><td>Empirical Certified Adversarial Accuracy</td></tr><tr><td rowspan="5">MNIST</td><td>2×2</td><td>IFGSM</td><td>None</td><td>98.4%</td><td>80.1%</td><td></td></tr><tr><td>2×2</td><td>IFGSM</td><td>LGS</td><td>97.4%</td><td>90.0%</td><td></td></tr><tr><td>2×2</td><td>IFGSM+LGS</td><td>LGS</td><td>97.4%</td><td>60.7%</td><td></td></tr><tr><td>2×2</td><td>IFGSM</td><td>IBP</td><td>98.5%</td><td>93.9%</td><td>91.6%</td></tr><tr><td>5×5</td><td>IFGSM</td><td>None</td><td>98.5%</td><td>3.3%</td><td></td></tr><tr><td rowspan="10">CIFAR</td><td>5×5</td><td>IFGSM</td><td>IBP</td><td>92.9%</td><td>66.1%</td><td>62.0%</td></tr><tr><td>2×2</td><td>IFGSM</td><td>None</td><td>66.3%</td><td>25.4%</td><td>1</td></tr><tr><td>2×2</td><td>IFGSM</td><td>LGS</td><td>64.9%</td><td>31.3%</td><td></td></tr><tr><td>2×2</td><td>IFGSM+LGS</td><td>LGS</td><td>64.9%</td><td>24.2%</td><td></td></tr><tr><td>2×2</td><td>IFGSM</td><td>DW</td><td>47.1%</td><td>43.3%</td><td></td></tr><tr><td>2×2</td><td>IFGSM+DW</td><td>DW</td><td>47.1%</td><td>20.2%</td><td>=</td></tr><tr><td>2×2</td><td>IFGSM</td><td>IBP</td><td>48.6%</td><td>45.2%</td><td>41.6%</td></tr><tr><td>5×5</td><td>IFGSM</td><td>None</td><td>66.5%</td><td>0.4%</td><td></td></tr><tr><td>5×5</td><td>IFGSM</td><td>LGS</td><td>51.2% 51.2%</td><td>22.11%</td><td></td></tr><tr><td>5×5</td><td>IFGSM +LGS</td><td>LGS DW</td><td>45.3%</td><td>0.5% 59.3%</td><td></td></tr><tr><td>5×5</td><td></td><td>IFGSM</td><td></td><td></td><td></td></tr><tr><td>5×5</td><td>IFGSM+DW</td><td>DW</td><td>45.3%</td><td>15.6%</td><td></td></tr><tr><td>5×5</td><td>IFGSM</td><td>IBP</td><td>33.9%</td><td>29.1%</td><td>24.9%</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
202
+
203
+ # 5.2 COMPARISON OF TRAINING STRATEGIES
204
+
205
+ We find that given a fixed architecture all-patch certificate training achieves the best certified accuracy. However, given a fixed computational budget, random and guided training significantly outperform all-patch training. Finally, guided-patch certificate training consistently outperforms random-patch certificate training by a slim margin, indicating that the U-net is learning how to predict the minimum margin m.
206
+
207
+ In Table 3, we see that given a fixed architecture all-patch certificate training significantly outperforms both random-patch certificate training and guided-patch certificate training in terms of certified accuracy, outperforming the second best certified defenses in each task by $2 . 6 \%$ (MNIST, $2 \times 2$ ), $7 . 3 \%$ (MNIST, $5 \times 5$ ), $3 . 9 \%$ (CIFAR-10, $2 \times 2 )$ ), and $3 . 4 \%$ (CIFAR-10, $5 \times 5$ ). However, all-patch certificate training is very expensive, taking on average 4 to 15 times longer than guided-patch certificate training and over 30 to 70 times longer than random-patch certificate training.
208
+
209
+ On the other hand, given a limited computational budget, random-patch and guided-patch training significantly outperforms all-patch training. Due to the efficiency of random-patch and guided-patch training, they scale much better to large architectures. By switching to a large architecture (5 layer wide convolutional network), we are able to boost the certified accuracy by over $10 \%$ compared to the best performing all-patch small model (Table 2). Note that we are unable to all-patch train the same architecture as it will take almost 15 days to complete, and is out of our computational budget.
210
+
211
+ Guided-patch certificate training is slightly more expensive compared to random patch, due to overhead from the U-net architecture. However, given the 10 patches picked, guided-patch certificate training consistently outperforms random-patch certificate training, indicating that the U-net is learning how to predict the minimum margin m.
212
+
213
+ Table 3: Trade-off between certified accuracy and training time for different strategies. The numbers next to training strategies indicate the number of patches used for estimating the lower bound during training. Most training times are measured on a single 2080Ti GPU, with the exception of all-patch training which is run on four 2080Ti GPUs. For that specific case, the training time is multiplied by 4 for fair comparison. See Appendix A.6 for more detailed statistics. \*indicates the performance of the best performing large model trained with either random or guided patch. Detailed performance of the large models can be found in Appendix A.5
214
+
215
+ <table><tr><td colspan="2"></td><td colspan="3">2×2</td><td colspan="3">5×5</td></tr><tr><td>Dataset</td><td>Training Strategy</td><td>Clean Accuracy</td><td>Certified Accuracy</td><td>Training Time(h)</td><td>Clean Accuracy</td><td>Certified Accuracy</td><td>Training Time(h)</td></tr><tr><td rowspan="4">MNIST</td><td>AllPatch</td><td>98.5%</td><td>91.5%</td><td>9.3</td><td>92.0%</td><td>60.4%</td><td>8.4</td></tr><tr><td>Random(1)</td><td>98.5%</td><td>82.9%</td><td>0.2</td><td>96.9%</td><td>24.1%</td><td>0.4</td></tr><tr><td>Random(5)</td><td>98.6%</td><td>86.6%</td><td>0.3</td><td>95.8%</td><td>42.1%</td><td>0.3</td></tr><tr><td>Random(10)</td><td>98.6%</td><td>87.7%</td><td>0.3</td><td>95.6%</td><td>49.6%</td><td>0.3</td></tr><tr><td rowspan="6">CIFAR</td><td>Guided(10) All Patch</td><td>98.6% 50.9%</td><td>88.9% 39.9%</td><td>2.2 56.4</td><td>95.0% 33.5%</td><td>53.1% 22.0%</td><td>2.6 45.8</td></tr><tr><td>Random(1)</td><td>53.6%</td><td>21.6%</td><td>0.6</td><td>43.6%</td><td>6.1%</td><td>0.6</td></tr><tr><td>Random(5)</td><td>52.9%</td><td>32.3%</td><td>0.7</td><td>39.0%</td><td>14.6%</td><td>0.7</td></tr><tr><td>Random(10)</td><td>51.9%</td><td>35.6%</td><td>0.8</td><td>38.8%</td><td>18.6%</td><td></td></tr><tr><td>Guided(10)</td><td>52.4%</td><td>36.0%</td><td>3.7</td><td>37.9%</td><td>18.8%</td><td>0.8 3.7</td></tr><tr><td>Large Model*</td><td>65.8%</td><td>51.9%</td><td>22.4</td><td>47.8%</td><td>30.3%</td><td>15.4</td></tr></table>
216
+
217
+ # 5.3 EFFECTIVENESS AGAINST SPARSE ATTACK
218
+
219
+ The IBP based method can also be used to defend against sparse attack, see Section 4.3. Its performance is reasonable compared to patch defense (e.g. $9 1 . 5 \%$ certified accuracy for $2 \times 2$ patch vs $9 0 . 8 \%$ for $\mathrm { k } { = } 4$ ), even though the sparse attack model is much stronger. For convolutional networks, we increase the size of the first convolutional layer (i.e. from $3 \times 3$ to $1 1 \times 1 1$ ) so the interval bounds calculated are tighter. However, despite the change, fully-connected network still performs much better. For example, the certified accuracy drops from $2 5 . 6 \%$ to $1 3 . 8 \%$ when we switch from fully-connected to convolutional network for CIFAR10 and drops from $9 0 . 8 \%$ to $7 5 . 9 \%$ for MNIST respectively. Detailed results are shown in the Appendix A.4 Table 7.
220
+
221
+ Table 4 compares our approach with the state-of-the-art certified sparse defense (Random Ablation) Levine & Feizi (2019). We use their best model with the largest medium radii to certify against various levels of sparsity. As shown in the table, our method achieves higher certified accuracy on the MNIST dataset over all the sparse radii, but lower on CIFAR-10. It is worth noting that we are using a much smaller and simpler model (a fully-connected network) compared to Random Ablation, which uses ResNet-50.
222
+
223
+ Table 4: Certified accuracy for sparse defenses with IBP and Random Ablation.
224
+
225
+ <table><tr><td>Dataset</td><td>Sparsity (k)</td><td>Model</td><td>Clean Accuracy</td><td>Certified Accuracy</td></tr><tr><td rowspan="6">MNIST</td><td>1</td><td>IBP-sparse</td><td>98.4%</td><td>96.0%</td></tr><tr><td>4</td><td>IBP-sparse</td><td>97.8%</td><td>90.8%</td></tr><tr><td>10</td><td>IBP-sparse</td><td>95.2%</td><td>86.8%</td></tr><tr><td>1</td><td>Random Ablation</td><td>96.7%</td><td>90.3%</td></tr><tr><td>4</td><td>Random Ablation</td><td>96.7%</td><td>79.1%</td></tr><tr><td>10</td><td>Random Ablation</td><td>96.7%</td><td>29.2%</td></tr><tr><td rowspan="6">CIFAR</td><td>1</td><td>IBP-sparse</td><td>48.4%</td><td>40.0%</td></tr><tr><td>4</td><td>IBP-sparse</td><td>42.2%</td><td>31.2%</td></tr><tr><td>10</td><td>IBP-sparse</td><td>37.0%</td><td>25.6%</td></tr><tr><td>1</td><td>Random Ablation</td><td>78.3%</td><td>68.6%</td></tr><tr><td>4</td><td>Random Ablation</td><td>78.3%</td><td>61.3%</td></tr><tr><td>10</td><td>Random Ablation</td><td>78.3%</td><td>45.0%</td></tr></table>
226
+
227
+ # 5.4 TRANSFERABILITY TO PATCHES OF DIFFERENT SHAPES
228
+
229
+ Since real-world adversarial patches may not always be square, the robust transferability of the model to shapes other than the square is important.
230
+
231
+ Therefore, we evaluate the robustness of the square-patch-trained model to adversarial patches of different shapes while fixing the number of pixels. In all these experiments, we evaluate the certified accuracy for our largest model, on both MNIST and CIFAR datasets. We evaluate the transferability to various shapes including rectangle, line, parallelogram, and diamond. With the exception of rectangles, all the shapes have the exact same pixel count as the patches used for training. For rectangles, we use multiple choices of width and length, obtaining some combinations with slightly more pixels, and the worst accuracy is reported in Table 5. The exact shapes used can be found in Appendix A.2.
232
+
233
+ The certified accuracy of our models generalize surprisingly well to other shapes, losing no more than than $5 \%$ in most cases for MNIST and no more than $6 \%$ for CIFAR-10 (Table 5). The largest degradation of accuracy happens for rectangles and lines, and it is mostly because the rectangle considered has more pixels compared to the square, and the line has less overlaps. However, it is still interesting that the certificate even generalizes to a straight line, even though the model was never trained to be robust to lines. In the case of MNIST with small patch size, the certified accuracy even improves when transferred to lines.
234
+
235
+ Table 5: Certified accuracy for square-patch trained model for different shapes
236
+
237
+ <table><tr><td>Dataset</td><td>Pixel Count</td><td>Square</td><td>Rectangle</td><td>Line</td><td>Diamond</td><td>Parallelogram</td></tr><tr><td>MNIST</td><td>4</td><td>91.6%</td><td>=</td><td>92.5%</td><td>91.6%</td><td>92.3%</td></tr><tr><td rowspan="5">CIFAR</td><td>16</td><td>69.4%</td><td>55.4%</td><td>46.7%</td><td>68.13%</td><td>70.2%</td></tr><tr><td>25</td><td>59.7%</td><td>50.9%</td><td>32.4%</td><td>53.6%</td><td>55.2%</td></tr><tr><td>4</td><td>50.8%</td><td>=</td><td>46.1%</td><td>48.6%</td><td>49.8%</td></tr><tr><td>16</td><td>36.9%</td><td>29.0%</td><td>32.1%</td><td>35.7%</td><td>36.3%</td></tr><tr><td>25</td><td>30.3%</td><td>25.1%</td><td>29.0%</td><td>30.1%</td><td>30.7%</td></tr></table>
238
+
239
+ # 6 CONCLUSION AND FUTURE WORK
240
+
241
+ After establishing the weakness of known defenses to patch attacks, we proposed the first certified defense against this model. We demonstrated the effectiveness of our defense on two datasets, and proposed strategies to speed up robust training. Finally, we established the robust transferability of trained certified models to different shapes. In its current form, the proposed certified defense is unlikely to scale to ImageNet, and we hope the presented experiments will encourage further work along this direction.
242
+
243
+ # REFERENCES
244
+
245
+ Anish Athalye, Nicholas Carlini, and David Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. arXiv preprint arXiv:1802.00420, 2018.
246
+
247
+ Tom B Brown, Dandelion Mane, Aurko Roy, Mart ´ ´ın Abadi, and Justin Gilmer. Adversarial patch. arXiv preprint arXiv:1712.09665, 2017.
248
+
249
+ Jeremy M Cohen, Elan Rosenfeld, and J Zico Kolter. Certified adversarial robustness via randomized smoothing. arXiv preprint arXiv:1902.02918, 2019.
250
+
251
+ Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248–255. Ieee, 2009.
252
+
253
+ Logan Engstrom, Brandon Tran, Dimitris Tsipras, Ludwig Schmidt, and Aleksander Madry. A rotation and a translation suffice: Fooling cnns with simple transformations. arXiv preprint arXiv:1712.02779, 2017.
254
+
255
+ Sven Gowal, Krishnamurthy Dvijotham, Robert Stanforth, Rudy Bunel, Chongli Qin, Jonathan Uesato, Timothy Mann, and Pushmeet Kohli. On the effectiveness of interval bound propagation for training verifiably robust models. arXiv preprint arXiv:1810.12715, 2018.
256
+
257
+ Jamie Hayes. On visible adversarial perturbations & digital watermarking. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pp. 1597–1604, 2018.
258
+
259
+ Danny Karmon, Daniel Zoran, and Yoav Goldberg. Lavan: Localized and visible adversarial noise. arXiv preprint arXiv:1801.02608, 2018.
260
+
261
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
262
+
263
+ Cassidy Laidlaw and Soheil Feizi. Functional adversarial attacks, 2019.
264
+
265
+ Mark Lee and Zico Kolter. On physical adversarial patches for object detection, 2019.
266
+
267
+ Alexander Levine and Soheil Feizi. Robustness certificates for sparse adversarial attacks by randomized ablation. arXiv preprint arXiv:1911.09272, 2019.
268
+
269
+ Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017.
270
+
271
+ Matthew Mirman, Timon Gehr, and Martin Vechev. Differentiable abstract interpretation for provably robust neural networks. In International Conference on Machine Learning, pp. 3575–3583, 2018.
272
+
273
+ Apostolos Modas, Seyed-Mohsen Moosavi-Dezfooli, and Pascal Frossard. Sparsefool: a few pixels make a big difference. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 9087–9096, 2019.
274
+
275
+ Muzammal Naseer, Salman Khan, and Fatih Porikli. Local gradients smoothing: Defense against localized adversarial attacks. In 2019 IEEE Winter Conference on Applications of Computer Vision (WACV), pp. 1300–1307. IEEE, 2019.
276
+
277
+ Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computerassisted intervention, pp. 234–241. Springer, 2015.
278
+
279
+ Ali Shafahi, W Ronny Huang, Christoph Studer, Soheil Feizi, and Tom Goldstein. Are adversarial examples inevitable? arXiv preprint arXiv:1809.02104, 2018.
280
+
281
+ Ali Shafahi, Mahyar Najibi, Amin Ghiasi, Zheng Xu, John Dickerson, Christoph Studer, Larry S Davis, Gavin Taylor, and Tom Goldstein. Adversarial training for free! arXiv preprint arXiv:1904.12843, 2019.
282
+
283
+ Mahmood Sharif, Sruti Bhagavatula, Lujo Bauer, and Michael K Reiter. Adversarial generative nets: Neural network attacks on state-of-the-art face recognition. arXiv preprint arXiv:1801.00349, 2017.
284
+
285
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
286
+
287
+ Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2818–2826, 2016.
288
+
289
+ Florian Tramer and Dan Boneh. Adversarial training and robustness for multiple perturbations. \` arXiv preprint arXiv:1904.13000, 2019.
290
+
291
+ Shiqi Wang, Yizheng Chen, Ahmed Abdou, and Suman Jana. Enhancing gradient-based attacks with symbolic intervals, 2019.
292
+
293
+ Eric Wong and J Zico Kolter. Provable defenses against adversarial examples via the convex outer adversarial polytope. arXiv preprint arXiv:1711.00851, 2017.
294
+
295
+ Eric Wong, Frank R Schmidt, and J Zico Kolter. Wasserstein adversarial examples via projected sinkhorn iterations. arXiv preprint arXiv:1902.07906, 2019.
296
+
297
+ Zuxuan Wu, Ser-Nam Lim, Larry Davis, and Tom Goldstein. Making an invisibility cloak: Real world adversarial attacks on object detectors. arXiv preprint arXiv:1910.14667, 2019.
298
+
299
+ Huan Zhang, Hongge Chen, Chaowei Xiao, Bo Li, Duane Boning, and Cho-Jui Hsieh. Towards stable and efficient training of verifiably robust neural networks, 2019a.
300
+
301
+ Huan Zhang, Hongge Chen, Chaowei Xiao, Bo Li, Duane Boning, and Cho-Jui Hsieh. Towards stable and efficient training of verifiably robust neural networks. arXiv preprint arXiv:1906.06316, 2019b.
302
+
303
+ # A APPENDIX
304
+
305
+ # A.1 EXPERIMENTAL SETTINGS AND NETWORK STRUCTURE
306
+
307
+ We evaluate the proposed certified patch defense on three neural networks: a multilayer perceptron (MLP) with one 255-neuron hidden layer, and two convolutional neural networks (CNN) with different depths. The small CNN has two convolutional layers (kernel size 4, stride 2) of 4 and 8 output channels each, and a fully connected layer with 256 neurons. The large CNN has four convolutional layers with kernel size (3, 4, 3, 4), stride (1, 2, 1, 2), output channels (4, 4, 8 ,8), and two fully connected layer with 256 neurons. We run experiments on two datasets, MNIST and CIFAR10, with two different patch sizes $2 \times 2$ and $5 \times 5$ . For all experiments, we are using Adam (Kingma & Ba, 2014) with a learning rate of $5 e - 4$ for MNIST and $1 e - 3$ for CIFAR10, and with no weight decay. We also adopt a warm-up schedule in all experiments like (Zhang et al., 2019b), where the input interval bounds start at zero and grow to [-1,1] after 61/121 epochs for MNIST/CIFAR10 respectively. We train the models for a total of 100/200 epochs for MNIST/CIFAR10, where in the first 61/121 epochs the learning rate is fixed and in the following epochs, we reduce the learning rate by one half every 10 epochs.
308
+
309
+ In addition, following (Gowal et al., 2018), we further evaluate the CIFAR10 on a larger model which has 5 convolutional layers with kernel size 3 and a fully connected layer with 512 neurons. This deeper and wider model achieves the clean accuracy around $8 9 \%$ , and has 17M parameters in total. Table 8 in Appendix A.5 describes the full certified patch results for this large model.
310
+
311
+ # A.2 SAMPLE SHAPES FOR GENERALIZATION EXPERIMENTS
312
+
313
+ We demonstrate generalization to other patch shapes that were not considered in training, obtaining surprisingly good transfer in robust accuracy; see the figure below and the results in Table 5.
314
+
315
+ ![](images/9f216bf62fce941917ea81757e0b262fd04bf16bd11424b98f95987ef90455cd.jpg)
316
+ Figure 1: Examples of shapes with pixels number 4 and 25. From left to right are square, parallelogram, diamond and rectangle (line) respectively.
317
+
318
+ # A.3 BOUND POOLING
319
+
320
+ Besides random-patch certificate training and guided-patch certificate training, we also experimented with the idea of bound pooling. All-patch training is very expensive as bounds generated by each potential patch has to be forward passed through the complete network. Bound pooling partially relieves the problem be pooling the interval bounds in intermediate layers thus reducing the forward pass in subsequent layers.
321
+
322
+ Specifically, given a set of patches $\mathbb { P }$ , the interval bounds in the ith layer are $\bar { Z } ^ { ( i ) } ( \mathbb { P } ) = \{ \bar { z } ^ { ( i ) } ( p ) : p \in$ $\mathbb { P } \}$ and $\underline { { Z } } ^ { ( i ) } \mathbb { P } = \{ \underline { { z } } ^ { ( i ) } ( p ) : p \in \mathbb { P } \}$ . We can reduce the number of interval bounds by partitioning $\mathbb { P }$ into $n$ subsets $\{ \mathbb { S } ^ { 1 } , . . . , \mathbb { S } ^ { n } \}$ and calculate a new set of bounds $\begin{array} { r } { \bar { Z } _ { p o o l } ^ { ( i ) } ( \mathbb { P } ) = \{ \operatorname* { m a x } _ { p \in \mathbb { S } _ { i } } \bar { z } ^ { ( i ) } ( p ) : i \in [ n ] \} } \end{array}$ and Z(i) ( $\begin{array} { r } { \underline { { Z } } _ { p o o l } ^ { ( i ) } ( \mathbb { P } ) = \{ \operatorname* { m i n } _ { p \in \mathbb { S } _ { i } } \underline { { z } } ^ { ( i ) } ( p ) : i \in [ n ] \} } \end{array}$ . Depending on how $\mathbb { P }$ is partitioned, the bound pooling would work differently. In our experiments, we always select adjacent patches for each $\mathbb { S } _ { i }$ with the assumption that adjacent patches tend to generate similar bounds thus resulting in tighter certificate.
323
+
324
+ Bound pooling, similar to random- and guided- patch training, trades performance for efficiency compared to all-patch certificate training. However, the trade off is not as favorable compared to random-patch and guided-patch training. For example, in Table 6, Pooling 16 $( 4 \times 4 )$ patches in the first layer reduces training time by $3 5 \%$ while loosing $0 . 7 \%$ in performance (on MNIST $2 \times 2$ ), but a similar level of performance can be achieved with guided-patch training with almost $90 \%$ reduction in training time. The trade off becomes greater when the model becomes larger. Overall, bound pooling is still quite expensive, and cannot scale to larger models like random-patch or guided-patch training.
325
+
326
+ Table 6: Comparing bound pooling with the guided-patch and random-patch training. Pool 4 means that the adjacent $4 \times 4$ patches (16 patches) are pooled together in the first layer. Pool 2-2 means that the adjacent $2 \times 2$ bounds are pooled together in the first layer and then another $2 \times 2$ bound pooling happens at the second layer. This is similar to $4 \times 4$ pooling except the pooling operation is distributed between the first and second layer. All experiments are performed on a 4-layer convolutional network.
327
+
328
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>2×2</td><td rowspan=1 colspan=1>5×5</td></tr><tr><td rowspan=2 colspan=1>Dataset TrainingStrategy</td><td rowspan=1 colspan=1>Clean Certified Training</td><td rowspan=1 colspan=1>Clean Certified Training</td></tr><tr><td rowspan=1 colspan=1>Accuracy Accuracy Time(h)</td><td rowspan=1 colspan=1>Accuracy Accuracy Time(h)</td></tr><tr><td rowspan=1 colspan=1>MNIST All Patch</td><td rowspan=1 colspan=1>98.5% 91.6% 20.1</td><td rowspan=1 colspan=1>90.0% 59.7% 16.3</td></tr><tr><td rowspan=6 colspan=1>Pool 2Pool 4Random(1)Random(5)Random(10)Guided(10)</td><td rowspan=1 colspan=1>98.0% 91.1% 15.8</td><td rowspan=1 colspan=1>85.2% 54.2% 11.6</td></tr><tr><td rowspan=1 colspan=1>97.2% 89.9% 13.2</td><td rowspan=1 colspan=1>70.4% 38.3% 10.2</td></tr><tr><td rowspan=1 colspan=1>98.5% 81.9% 0.3</td><td rowspan=1 colspan=1>96.8% 24.8% 0.4</td></tr><tr><td rowspan=1 colspan=1>98.6% 86.5% 0.3</td><td rowspan=1 colspan=1>94.9% 42.0% 0.5</td></tr><tr><td rowspan=1 colspan=1>98.6% 87.5% 0.5</td><td rowspan=1 colspan=1>94.7% 50.4% 0.6</td></tr><tr><td rowspan=1 colspan=1>98.7% 88.9% 2.2</td><td rowspan=1 colspan=1>94.0% 53.2% 3.4</td></tr><tr><td rowspan=1 colspan=1>CIFAR All Patch</td><td rowspan=1 colspan=1>49.6% 41.6% 22.5</td><td rowspan=1 colspan=1>34.0% 25.0% 18.6</td></tr><tr><td rowspan=2 colspan=1>Pool 2Pool4</td><td rowspan=1 colspan=1>48.1% 39.4% 17.3</td><td rowspan=1 colspan=1>32.4% 24.2% 14.5</td></tr><tr><td rowspan=2 colspan=1>Pool4Pool 2-2</td><td rowspan=1 colspan=1>44.9% 37.1% 16.3</td><td rowspan=1 colspan=1>28.3% 20.6% 13.6</td></tr><tr><td rowspan=1 colspan=1>45.0% 37.4% 16.5</td><td rowspan=1 colspan=1>25.3% 19.1% 13.8</td></tr><tr><td rowspan=1 colspan=1>Random(1)</td><td rowspan=1 colspan=1>53.2% 32.4% 0.6</td><td rowspan=1 colspan=1>42.7% 11.0% 0.6</td></tr><tr><td rowspan=2 colspan=1>Random(5)Random(10)</td><td rowspan=1 colspan=1>52.2% 39.5% 0.9</td><td rowspan=1 colspan=1>37.8% 19.6% 0.9</td></tr><tr><td rowspan=1 colspan=1>50.8% 38.6% 1.0</td><td rowspan=1 colspan=1>38.4% 21.9% 1.0</td></tr><tr><td rowspan=1 colspan=1>Guided(10)</td><td rowspan=1 colspan=1>53.0% 39.8% 4.0</td><td rowspan=1 colspan=1>36.1% 23.0% 3.9</td></tr></table>
329
+
330
+ # A.4 MULTI-PATCH SPARSE TRAINING
331
+
332
+ Here we list the detailed certified accuracy for various sparsity levels and model architectures.
333
+
334
+ Table 7: Certified accuracy for sparse defenses with varying sparsity $k$ and models on both MNIST and CIFAR10, where “Conv $c \times c ^ { \prime \prime }$ represents for the convolutional network with first layer kernel size c.
335
+
336
+ <table><tr><td>Dataset</td><td>Sparsity (k)</td><td>Model</td><td>Clean Accuracy</td><td>Certified Accuracy</td></tr><tr><td rowspan="4">MNIST</td><td>1</td><td>mlp</td><td>98.4%</td><td>96.0%</td></tr><tr><td>4</td><td>mlp</td><td>97.8%</td><td>90.8%</td></tr><tr><td>10</td><td>mlp</td><td>95.2%</td><td>86.8%</td></tr><tr><td>1</td><td>Conv3x3</td><td>97.0%</td><td>88.3%</td></tr><tr><td rowspan="8">CIFAR</td><td>4</td><td>Conv3x3</td><td>92.7%</td><td>75.9%</td></tr><tr><td>1</td><td>mlp</td><td>48.4%</td><td>40.0%</td></tr><tr><td>4</td><td>mlp</td><td>42.2%</td><td>31.2%</td></tr><tr><td>10</td><td>mlp</td><td>37.0%</td><td>25.6%</td></tr><tr><td>1</td><td>Conv11x11</td><td>34.8%</td><td>27.4%</td></tr><tr><td>4</td><td>Conv11x11</td><td>25.1%</td><td>18.3%</td></tr><tr><td>10</td><td>Conv11x11</td><td>17.2%</td><td>13.8%</td></tr><tr><td>1</td><td>Conv13x13</td><td>38.6%</td><td>29.7%</td></tr><tr><td></td><td>4</td><td>Conv13x13</td><td>28.1%</td><td>19.6%</td></tr><tr><td></td><td>10</td><td>Conv13x13</td><td>22.4%</td><td>15.3%</td></tr></table>
337
+
338
+ # A.5 TRAINING WITH LARGER MODELS
339
+
340
+ Recall that all-patch training considers all possible patches during training, which can be too expensive for larger models and/or images. The proposed random- and guided-patch training methods aim to reduce the training cost by considering only a subset of patches; please see Section 4.2 for more details.
341
+
342
+ Table 8: The random and guided training strategy could yield significantly stronger model compared to all-patch training given a fixed computational budget. The random and guided training strategy allows us to train a larger model that would be infeasible to train otherwise. The guided-patch large model is able to boost the certified accuracy by over $10 \%$ compared to the best performing all-patch small model.
343
+
344
+ <table><tr><td>Dataset</td><td>Patch Size</td><td>Training Strategy</td><td>Model</td><td>Clean Accuracy</td><td>Certified Accuracy</td><td>Training Time(h)</td></tr><tr><td rowspan="5">CIFAR</td><td rowspan="5">2×2</td><td>All Patch</td><td>mlp</td><td>50.8%</td><td>35.5%</td><td>9.1</td></tr><tr><td></td><td>2 layer conv</td><td>52.4%</td><td>42.6%</td><td>10.7</td></tr><tr><td></td><td> 4 layer conv</td><td>49.6%</td><td>41.6%</td><td>22.5</td></tr><tr><td></td><td>5 layer conv (wide)</td><td>1</td><td>-</td><td>~360.0</td></tr><tr><td>Random(10) Random(20)</td><td>5 layer conv (wide) 5 layer conv (wide)</td><td>64.7% 64.4%</td><td>49.0%</td><td>9.5</td></tr><tr><td rowspan="6">CIFAR 5×5</td><td>Guided(10)</td><td>5 layer conv (wide)</td><td>66.5%</td><td>50.8% 49.2%</td><td></td><td>15.8 12.2</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Guided(20) All Patch</td><td>5 layer conv (wide)</td><td>65.8%</td><td>51.9%</td><td></td><td>22.4</td></tr><tr><td></td><td>mlp</td><td></td><td>31.1%</td><td>18.8%</td><td>7.1</td></tr><tr><td></td><td>2 layer conv</td><td>35.5%</td><td></td><td>22.3%</td><td>8.7</td></tr><tr><td></td><td></td><td>4 layer conv.</td><td>34.0%</td><td>25.0%</td><td></td><td>18.6</td></tr><tr><td></td><td></td><td></td><td>5 layer conv (wide)</td><td>1</td><td>、</td><td>~360.0</td></tr><tr><td></td><td></td><td>Random(10) Random(20)</td><td>5 layer conv (wide)</td><td>48.6%</td><td>29.9%</td><td>9.4</td></tr><tr><td></td><td></td><td></td><td>5 layer conv (wide)</td><td>47.8%</td><td>30.3%</td><td>15.4</td></tr><tr><td></td><td>Guided(10)</td><td>5 layer conv (wide)</td><td></td><td>48.4%</td><td>29.0%</td><td>12.4</td></tr><tr><td></td><td></td><td>Guided(20)</td><td>5 layer conv (wide)</td><td>47.6%</td><td>29.6%</td><td>23.8</td></tr></table>
345
+
346
+ # A.6 DETAILED STATISTICS ON TRAINING STRATEGIES
347
+
348
+ Here we list the detailed statistics for each training strategies for Table 3
349
+
350
+ Table 9: Detailed statistics for the comparison of training strategies - $2 \times 2$
351
+
352
+ <table><tr><td>Dataset</td><td>Training Strategies</td><td>Model Architecture</td><td>Clean Accuracy</td><td>Certified Accuracy</td><td>Training Time</td></tr><tr><td>MNIST</td><td>All Patch</td><td>2 layer convolution</td><td>98.63/%</td><td>91.38%</td><td>21.0</td></tr><tr><td rowspan="10"></td><td rowspan="4">Random (1)</td><td>4 layer convolution</td><td>98.48%</td><td>91.63%</td><td>80.3</td></tr><tr><td>fully connected (255,10)</td><td>98.46%</td><td>91.47%</td><td>9.8</td></tr><tr><td>2 layer convolution</td><td>98.69%</td><td>82.57%</td><td>0.2</td></tr><tr><td>4 layer convolution</td><td>98.45%</td><td>81.87%</td><td>0.3</td></tr><tr><td rowspan="3">Random (5)</td><td>fully connected (255,10)</td><td>98.48%</td><td>84.32%</td><td>0.2</td></tr><tr><td>2 layer convolution</td><td>98.75%</td><td>85.87%</td><td>0.3</td></tr><tr><td>4 layer convolution</td><td>98.57%</td><td>86.50%</td><td>0.3</td></tr><tr><td rowspan="3">Random (10)</td><td>fully connected (255,10)</td><td>98.62%</td><td>87.32%</td><td>0.2</td></tr><tr><td>2 layer convolution</td><td>98.73%</td><td>87.31%</td><td>0.3</td></tr><tr><td>4 layer convolution</td><td>98.63%</td><td>87.54%</td><td>0.5</td></tr><tr><td rowspan="3">Guided (10)</td><td>fully connected (255,10)</td><td>98.49%</td><td>88.13%</td><td>0.2</td></tr><tr><td>2 layer convolution</td><td>98.60%</td><td>88.49%</td><td>2.3</td></tr><tr><td>4 layer convolution</td><td>98.70%</td><td>88.85%</td><td>2.2</td></tr><tr><td rowspan="3">CIFAR All Patch</td><td>fully connected (255,10)</td><td>98.63%</td><td>89.44%</td><td>2.2</td></tr><tr><td>2 layer convolution</td><td>52.42%</td><td>42.57%</td><td>42.6</td></tr><tr><td>4 layer convolution</td><td>49.58%</td><td>41.57%</td><td>89.8</td></tr><tr><td rowspan="3">Random (1)</td><td>fully connected (255,10)</td><td>50.83%</td><td>35.49%</td><td>36.6</td></tr><tr><td>2 layer convolution</td><td>54.93%</td><td>29.13%</td><td>0.6</td></tr><tr><td>4 layer convolution</td><td>53.22%</td><td>32.35%</td><td>0.6</td></tr><tr><td rowspan="3">Random (5)</td><td>fully connected (255,10)</td><td>52.76%</td><td>03.21%</td><td>0.5</td></tr><tr><td>2 layer convolution</td><td>54.15%</td><td>37.30%</td><td>0.6</td></tr><tr><td>4 layer convolution</td><td>52.19%</td><td>39.45%</td><td>0.9</td></tr><tr><td rowspan="3">Random (10)</td><td>fully connected (255,10)</td><td>52.38%</td><td>20.17%</td><td>0.6</td></tr><tr><td>2 layer convolution</td><td>53.08%</td><td>39.32%</td><td>0.7</td></tr><tr><td>4 layer convolution</td><td>50.80%</td><td>38.57%</td><td>1.0</td></tr><tr><td rowspan="4">Guided (10)</td><td>fully connected (255,10)</td><td>51.90%</td><td>28.97%</td><td>0.6</td></tr><tr><td>2 layer convolution</td><td>53.04%</td><td>38.81%</td><td>3.7</td></tr><tr><td>4 layer convolution</td><td>52.97%</td><td>39.84%</td><td>4.0</td></tr><tr><td>fully connected (255,10)</td><td>51.32%</td><td>29.44%</td><td>3.6</td></tr></table>
353
+
354
+ Table 10: Detailed statistics for the comparison of training strategies - $5 \times 5$
355
+
356
+ <table><tr><td>Dataset</td><td>Training Strategies</td><td>Model Architecture</td><td>Clean Accuracy</td><td>Certified Accuracy</td><td>Training Time</td></tr><tr><td>MNIST</td><td>All Patch</td><td>2 layer convolution</td><td>91.88%</td><td>59.59%</td><td>28.4</td></tr><tr><td rowspan="10"></td><td></td><td>4 layer convolution</td><td>90.03%</td><td>59.72%</td><td>65.2</td></tr><tr><td>Random (1)</td><td>fully connected (255,10)</td><td>93.96%</td><td>61.97%</td><td>7.2</td></tr><tr><td></td><td>2 layer convolution</td><td>96.27%</td><td>18.57%</td><td>0.2</td></tr><tr><td></td><td>4 layer convolution</td><td>96.83%</td><td>24.79%</td><td>0.4</td></tr><tr><td>Random (5)</td><td>fully connected (255,10)</td><td>97.60%</td><td>29.04%</td><td>0.2</td></tr><tr><td></td><td>2 layer convolution</td><td>95.82%</td><td>38.47%</td><td>0.2</td></tr><tr><td></td><td>4 layer convolution</td><td>94.85%</td><td>42.02%</td><td>0.5</td></tr><tr><td>Random (10)</td><td>fully connected (255,10)</td><td>96.73%</td><td>45.89%</td><td>0.2</td></tr><tr><td></td><td>2 layer convolution</td><td>95.55%</td><td>46.13%</td><td>0.3</td></tr><tr><td></td><td>4 layer convolution fully connected (255,10)</td><td>94.76% 96.40%</td><td>50.43% 52.30%</td><td>0.6</td></tr><tr><td>Guided (10)</td><td>2 layer convolution</td><td>95.28%</td><td>50.28%</td><td>0.2 2.3</td></tr><tr><td rowspan="3"></td><td></td><td>93.98%</td><td>53.17%</td><td>3.4</td></tr><tr><td>4 layer convolution</td><td>95.82%</td><td>55.89%</td><td>2.2</td></tr><tr><td>fully connected (255,10)</td><td>35.48%</td><td></td><td></td></tr><tr><td rowspan="3">CIFAR All Patch Random (1)</td><td>2 layer convolution</td><td>33.95%</td><td>22.31% 24.96%</td><td>34.8</td></tr><tr><td>4 layer convolution fully connected (255,10)</td><td>31.05%</td><td>18.78%</td><td>74.4 28.4</td></tr><tr><td></td><td>45.71%</td><td>07.14%</td><td>0.6</td></tr><tr><td rowspan="3"></td><td>2 layer convolution</td><td>42.65%</td><td>10.99%</td><td></td></tr><tr><td>4 layer convolution</td><td>42.34%</td><td></td><td>0.6</td></tr><tr><td>fully connected (255,10)</td><td></td><td>00.10%</td><td>0.5</td></tr><tr><td rowspan="3">Random (5)</td><td>2 layer convolution</td><td>42.85%</td><td>17.29%</td><td>0.6</td></tr><tr><td>4 layer convolution</td><td>37.80%</td><td>19.63%</td><td>0.9</td></tr><tr><td>fully connected (255,10)</td><td>36.23%</td><td>06.99%</td><td>0.6</td></tr><tr><td rowspan="4">Random (10)</td><td>2 layer convolution</td><td>41.90%</td><td>21.40%</td><td>0.7</td></tr><tr><td>4 layer convolution</td><td>38.41%</td><td>21.90%</td><td>1.0</td></tr><tr><td>fully connected (255,10) Guided (10)</td><td>36.04%</td><td>12.46%</td><td>0.6</td></tr><tr><td>2 layer convolution</td><td>42.08%</td><td>20.77%</td><td>3.6</td></tr><tr><td></td><td>4 layer convolution fully connected (255,10)</td><td>36.08% 35.51%</td><td>23.01% 12.56%</td><td>3.9 3.5</td></tr></table>
parse/train/HyeaSkrYPH/HyeaSkrYPH_content_list.json ADDED
@@ -0,0 +1,1829 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "CERTIFIED DEFENSES FOR ADVERSARIAL PATCHES∗ ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 173,
8
+ 99,
9
+ 802,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Ping-yeh Chiang†, Renkun Ni†, Ahmed Abdelkader, Chen Zhu University of Maryland, College Park {pchiang,rn9zm,akader,chenzhu}@cs.umd.edu ",
17
+ "bbox": [
18
+ 184,
19
+ 143,
20
+ 607,
21
+ 188
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Christoph Studer Cornell University studer@cornell.edu ",
28
+ "bbox": [
29
+ 635,
30
+ 146,
31
+ 813,
32
+ 186
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Tom Goldstein \nUniversity of Maryland, College Park \ntomg@cs.umd.edu ",
39
+ "bbox": [
40
+ 184,
41
+ 209,
42
+ 431,
43
+ 250
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "ABSTRACT ",
50
+ "text_level": 1,
51
+ "bbox": [
52
+ 454,
53
+ 287,
54
+ 544,
55
+ 303
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "Adversarial patch attacks are among one of the most practical threat models against real-world computer vision systems. This paper studies certified and empirical defenses against patch attacks. We begin with a set of experiments showing that most existing defenses, which work by pre-processing input images to mitigate adversarial patches, are easily broken by simple white-box adversaries. Motivated by this finding, we propose the first certified defense against patch attacks, and propose faster methods for its training. Furthermore, we experiment with different patch shapes for testing, obtaining surprisingly good robustness transfer across shapes, and present preliminary results on certified defense against sparse attacks. Our complete implementation can be found on: https://github.com/Ping-C/certifiedpatchdefense. ",
62
+ "bbox": [
63
+ 233,
64
+ 318,
65
+ 766,
66
+ 470
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "1 INTRODUCTION ",
73
+ "text_level": 1,
74
+ "bbox": [
75
+ 176,
76
+ 496,
77
+ 336,
78
+ 512
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Despite the great success of neural networks for vision problems, they are easily fooled by adversarial attacks in which the input to a machine learning model is modified with the goal of manipulating its output. Research in this area is largely focused on norm-bounded attack (Madry et al., 2017; Tramer\\` & Boneh, 2019; Shafahi et al., 2019), where the adversary is allowed to perturb all pixels in an image provided that the $\\ell _ { p }$ -norm of the perturbation is within prescribed bounds. Other adversarial models were also proposed, such as functional (Laidlaw & Feizi, 2019), rotation/translation (Engstrom et al., 2017), and Wasserstein (Wong et al., 2019), all of which allow modification to all pixels. ",
85
+ "bbox": [
86
+ 174,
87
+ 527,
88
+ 825,
89
+ 626
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Whole-image perturbations are unrealistic for modeling ”physical-world” attacks, in which a realworld object is modified to evade detection. A physical adversary usually modifies an object using stickers or paint. Because this object may only occupy a small portion of an image, the adversary can only manipulate a limited number of pixels. As such, the more practical patch attack model was proposed (Brown et al., 2017). In a patch attack, the adversary may only change the pixels in a confined region, but is otherwise free to choose the values yielding the strongest attack. The threat to real-world computer vision systems is well-demonstrated in recent literature where carefully crafted patches can fool a classifier with high reliability (Brown et al., 2017; Karmon et al., 2018), make objects invisible to an object detector (Wu et al., 2019; Lee & Kolter, 2019), or fool a face recognition system (Sharif et al., 2017). In light of such effective physical-world patch attacks, very few defenses are known to date. ",
96
+ "bbox": [
97
+ 174,
98
+ 632,
99
+ 825,
100
+ 785
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "In this paper, we study principled defenses against patch attacks. We begin by looking at existing defenses in the literature that claim to be effective against patch attacks, including Local Gradient Smoothing (LGS) (Naseer et al., 2019) and Digital Watermarking (DW) (Hayes, 2018). Similar to what has been observed for whole-image attacks by (Athalye et al., 2018), we show that these patch defenses are easily broken by stronger adversaries. Concretely, we demonstrate successful white-box attacks, where the adversary designs an attack against a known model, including any pre-processing steps. To cope with such potentially stronger adversaries, we train a robust model that produces a lower-bound on adversarial accuracy. In particular, we propose the first certifiable defense against patch attacks by extending interval bound propagation (IBP) defenses (Gowal et al., 2018; Mirman et al., 2018). We also propose modifications to IBP training to make it faster in the patch setting. Furthermore, we study the generalization of certified patch defenses to patches of different shapes, and observe that robustness transfers well across different patch types. We also present preliminary results on certified defense against the stronger sparse attack model, where a fixed number of possibly non-adjacent pixels can be arbitrarily modified (Modas et al., 2019). ",
107
+ "bbox": [
108
+ 174,
109
+ 791,
110
+ 825,
111
+ 876
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "",
118
+ "bbox": [
119
+ 174,
120
+ 103,
121
+ 825,
122
+ 215
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "2 PROBLEM SETUP ",
129
+ "text_level": 1,
130
+ "bbox": [
131
+ 176,
132
+ 234,
133
+ 348,
134
+ 252
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "We consider a white-box adversary that is allowed to choose the location of the patch (chosen from a set $\\mathbb { L }$ of possible locations) and can modify pixels within the particular patch (chosen from the set $\\mathbb { P }$ ) similar to (Karmon et al., 2018). An attack is successful if the adversary changes the classification of the network to a wrong label. In this paper, we are primarily interested in the patch attack robust accuracy (adversarial accuracy for short) as defined by ",
141
+ "bbox": [
142
+ 174,
143
+ 266,
144
+ 825,
145
+ 337
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "equation",
151
+ "img_path": "images/a0c0b8fdaf4c03e2875d72b7ae98100dc0f9e0040781d003defee5ac2d30b80f.jpg",
152
+ "text": "$$\n\\underset { x \\sim X } { \\mathbb { E } } \\operatorname* { m i n } _ { p \\in \\mathbb { P } , l \\in \\mathbb { L } } \\mathcal { X } [ f ( A ( x , p , l ) ; \\theta ) = y ] ,\n$$",
153
+ "text_format": "latex",
154
+ "bbox": [
155
+ 377,
156
+ 343,
157
+ 619,
158
+ 368
159
+ ],
160
+ "page_idx": 1
161
+ },
162
+ {
163
+ "type": "text",
164
+ "text": "where the operator $A$ places the adversarial patch p on a given image $\\mathbf { X }$ at location $l$ , f is a neural network with parameter $\\theta$ , $X$ is a distribution of images, and $\\mathcal { X }$ is a characteristic function that takes value 1 if its argument is true, and 0 otherwise. ",
165
+ "bbox": [
166
+ 174,
167
+ 375,
168
+ 825,
169
+ 416
170
+ ],
171
+ "page_idx": 1
172
+ },
173
+ {
174
+ "type": "text",
175
+ "text": "In this model, the strength of the adversary can vary depending on the set of possible patches allowed, and the type of perturbation allowed within the patch. In what follows, we assume the standard setup in which the adversary is allowed any perturbation that maintains pixel intensities in the range $[ 0 , 1 ]$ . Unless otherwise noted, we also assume the patch is restricted to a square of prescribed size. We consider two different options for the set $\\mathbb { L }$ of possible patch locations. First, we consider a weak adversary that can only place patches at the corner of an image. We find that even this weak model is enough to break existing patch defenses. Then, we consider a stronger adversary with no restrictions on patch location, and use this model to evaluate our proposed defenses. Note that an adversary, when restricted to modify only a square patch at location $l$ in the image, has the freedom to modify any non-square subset of these pixels. In other words, a certified defense against square patch attacks also provably subverts any non-square patch attack that fits inside a small enough square. ",
176
+ "bbox": [
177
+ 174,
178
+ 424,
179
+ 825,
180
+ 577
181
+ ],
182
+ "page_idx": 1
183
+ },
184
+ {
185
+ "type": "text",
186
+ "text": "In general, calculating the adversarial accuracy (1) is intractable due to non-convexity. Common approaches try to approximate it by solving the inner minimization using a gradient-based method. However, in Section 3, we show that depending on how the minimization is solved, the upper bound could be very loose: a model may appear to be very robust, but fail when faced with a stronger attack. To side-step the arms race between attacks and defenses, in Section 4, we extend the work of (Gowal et al., 2018) and (Mirman et al., 2018) to train a network that produces a lower bound on adversarial accuracy. We will refer to approximations of the upper bound as empirical adversarial accuracy and the lower bound as certified accuracy. ",
187
+ "bbox": [
188
+ 174,
189
+ 583,
190
+ 826,
191
+ 695
192
+ ],
193
+ "page_idx": 1
194
+ },
195
+ {
196
+ "type": "text",
197
+ "text": "3 VULNERABILITY OF EXISTING DEFENSES ",
198
+ "text_level": 1,
199
+ "bbox": [
200
+ 174,
201
+ 715,
202
+ 553,
203
+ 732
204
+ ],
205
+ "page_idx": 1
206
+ },
207
+ {
208
+ "type": "text",
209
+ "text": "We start by examining existing defense strategies that claim to be effective against patch attacks. Similar to what has been observed for whole-image attacks by Athalye et al. (2018), we show that these patch defenses can easily be broken by white-box attacks, where the adversary optimizes against a given model including any pre-processing steps. ",
210
+ "bbox": [
211
+ 174,
212
+ 747,
213
+ 825,
214
+ 804
215
+ ],
216
+ "page_idx": 1
217
+ },
218
+ {
219
+ "type": "text",
220
+ "text": "3.1 EXISTING DEFENSES ",
221
+ "text_level": 1,
222
+ "bbox": [
223
+ 176,
224
+ 820,
225
+ 361,
226
+ 834
227
+ ],
228
+ "page_idx": 1
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "Under our threat model, two defenses have been proposed that each use input transformations to detect and remove adversarial patches. ",
233
+ "bbox": [
234
+ 176,
235
+ 845,
236
+ 823,
237
+ 875
238
+ ],
239
+ "page_idx": 1
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "The first defense is based on the observation that the gradient of the loss with respect to the input image often exhibits large values near the perturbed pixels. In (Hayes, 2018), the proposed digital watermarking (DW) approach exploits this behavior to detect unusually dense regions of large gradient entries using saliency maps, before masking them out in the image. Despite a $1 2 \\%$ drop in accuracy on clean (non-adversarial) images, this defense method supposedly achieves an empirical adversarial accuracy of $6 3 \\%$ for non-targeted patch attacks of size $4 2 \\times 4 2$ ( $\\dot { 2 } \\%$ of the image pixels), using 400 randomly picked images from ImageNet (Deng et al., 2009) on VGG19 (Simonyan & Zisserman, 2014). ",
244
+ "bbox": [
245
+ 176,
246
+ 881,
247
+ 823,
248
+ 924
249
+ ],
250
+ "page_idx": 1
251
+ },
252
+ {
253
+ "type": "table",
254
+ "img_path": "images/643c1861bcf8cdebdd5fec558151ec5ffcdf3a16ae36fca9652c576e12ae2e0d.jpg",
255
+ "table_caption": [
256
+ "Table 1: Empirical adversarial accuracy of ImageNet classifiers defended with Local Gradient Smoothing and Digital Watermarking. We consider two types of adversaries, one that takes the defense into account during backpropagation and one that does not "
257
+ ],
258
+ "table_footnote": [],
259
+ "table_body": "<table><tr><td colspan=\"2\"></td><td colspan=\"3\">Patch Size</td></tr><tr><td>Attack</td><td>Defense</td><td>42 × 42</td><td>52 × 52</td><td>60 ×60</td></tr><tr><td>IFGSM</td><td>LGS</td><td>78%</td><td>75%</td><td>71%</td></tr><tr><td>IFGSM+LGS</td><td>LGS</td><td>14%</td><td>5%</td><td>3%</td></tr><tr><td>IFGSM</td><td>DW</td><td>56%</td><td>49%</td><td>45%</td></tr><tr><td>IFGSM+DW</td><td>DW</td><td>13%</td><td>8%</td><td>5%</td></tr></table>",
260
+ "bbox": [
261
+ 285,
262
+ 156,
263
+ 712,
264
+ 244
265
+ ],
266
+ "page_idx": 2
267
+ },
268
+ {
269
+ "type": "text",
270
+ "text": "",
271
+ "bbox": [
272
+ 174,
273
+ 270,
274
+ 826,
275
+ 340
276
+ ],
277
+ "page_idx": 2
278
+ },
279
+ {
280
+ "type": "text",
281
+ "text": "The second defense, Local Gradient Smoothing (LGS) by Naseer et al. (2019) is based on the empirical observation that pixel values tend to change sharply within these adversarial patches. In other words, the image gradients tend to be large within these adversarial patches. Note that the image gradient here differs from the gradient in Hayes (2018), the former is with respect the changes of adjacent pixel values and the later is with respect to the classification loss. Naseer et al. (2019) propose suppressing this adversarial noise by multiplying each pixel with one minus its image gradient as in (2). To make their methods more effective, Naseer et al. (2019) also pre-process the image gradient with a normalization and a thresholding step. ",
282
+ "bbox": [
283
+ 173,
284
+ 347,
285
+ 825,
286
+ 459
287
+ ],
288
+ "page_idx": 2
289
+ },
290
+ {
291
+ "type": "equation",
292
+ "img_path": "images/dacb9233c630d057e61b3d43c8d6e60411d85925020064ef1856ce95cb2d16f8.jpg",
293
+ "text": "$$\n{ \\hat { x } } = x \\odot ( 1 - \\lambda g ( x ) ) .\n$$",
294
+ "text_format": "latex",
295
+ "bbox": [
296
+ 424,
297
+ 467,
298
+ 573,
299
+ 483
300
+ ],
301
+ "page_idx": 2
302
+ },
303
+ {
304
+ "type": "text",
305
+ "text": "The $\\lambda$ here is a smoothing hyper-parameter. Naseer et al. (2019) claim the best adversarial accuracy on ImageNet with respect to patch attacks among all of the defenses we studied. They also claim that their defense is resilient to Backward Pass Differential Approximation (BPDA) from Athalye et al. (2018), one of the most effective methods to attack models that include a non-differentiable operator as a pre-processing step. ",
306
+ "bbox": [
307
+ 173,
308
+ 491,
309
+ 825,
310
+ 561
311
+ ],
312
+ "page_idx": 2
313
+ },
314
+ {
315
+ "type": "text",
316
+ "text": "3.2 BREAKING EXISTING DEFENSES ",
317
+ "text_level": 1,
318
+ "bbox": [
319
+ 178,
320
+ 578,
321
+ 441,
322
+ 593
323
+ ],
324
+ "page_idx": 2
325
+ },
326
+ {
327
+ "type": "text",
328
+ "text": "Using a similar setup as in (Hayes, 2018; Naseer et al., 2019), we are able to mostly replicate the reported empirical adversarial accuracy for Iterative Fast Gradient Sign Method (IFGSM), a common gradient based attack, but we show that when the pre-processing step is taken into account, the empirical adversarial accuracy on ImageNet quickly drops from $\\bar { \\sim } 7 0 \\% ( \\sim 5 0 \\% )$ for LGS(DW) to levels around $\\sim 1 0 \\%$ as shown in Table 1. ",
329
+ "bbox": [
330
+ 174,
331
+ 604,
332
+ 825,
333
+ 674
334
+ ],
335
+ "page_idx": 2
336
+ },
337
+ {
338
+ "type": "text",
339
+ "text": "Specifically, we break DW (Hayes, 2018) by applying BPDA, in which the non-differentiable operator is approximated with an identity mapping during the backward pass. We break LGS (Naseer et al., 2019) by directly incorporating the smoothing step during backpropagation. Even though the windowing and thresholding steps are non-differentiable, the smoothing operator provides enough gradient information for the attack to be effective. ",
340
+ "bbox": [
341
+ 174,
342
+ 681,
343
+ 825,
344
+ 752
345
+ ],
346
+ "page_idx": 2
347
+ },
348
+ {
349
+ "type": "text",
350
+ "text": "To make sure that our evaluation is fair, we used the exact same models as Hayes (2018) (VGG19) and Szegedy et al. (2016) (Inception V3). We also consider a weaker set of attackers that can only attack the corners, the same as their setting. Further, we ensure that we were able to replicate their reported result under similar setting. ",
351
+ "bbox": [
352
+ 174,
353
+ 758,
354
+ 825,
355
+ 815
356
+ ],
357
+ "page_idx": 2
358
+ },
359
+ {
360
+ "type": "text",
361
+ "text": "4 CERTIFIED DEFENSES ",
362
+ "text_level": 1,
363
+ "bbox": [
364
+ 176,
365
+ 835,
366
+ 388,
367
+ 852
368
+ ],
369
+ "page_idx": 2
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "Given the ease with which these supposedly strong defenses are broken, it is natural to seek methods that can rigorously guarantee robustness of a given model to patch attacks. With such certifiable guarantees in hand, we need not worry about an adversary with a stronger optimizer, or a more clever algorithm for choosing patch locations. ",
374
+ "bbox": [
375
+ 174,
376
+ 867,
377
+ 825,
378
+ 924
379
+ ],
380
+ "page_idx": 2
381
+ },
382
+ {
383
+ "type": "text",
384
+ "text": "4.1 BACKGROUND ON CERTIFIED DEFENSES ",
385
+ "text_level": 1,
386
+ "bbox": [
387
+ 176,
388
+ 103,
389
+ 491,
390
+ 117
391
+ ],
392
+ "page_idx": 3
393
+ },
394
+ {
395
+ "type": "text",
396
+ "text": "Certified defenses have been intensely studied with respect to norm-bounded attacks (Cohen et al., 2019; Wong & Kolter, 2017; Gowal et al., 2018; Mirman et al., 2018; Zhang et al., 2019b). In all of these methods, in addition to the prediction model, there is also a verifier. Given a model and an input, the verifier outputs a certificate if it is guaranteed that the image can not be adversarially perturbed. This is done by checking whether there exists any nearby image (within a prescribed $\\ell _ { p }$ distance) with a different label than the image being classified. While theoretical bounds exist on the size of this distance that hold for any classifier (Shafahi et al., 2018), exactly computing bounds for a specific classifier and test image is hard. Alternatively, the verifier may output a lower bound on the distance to the nearest image of a different label. This latter distance is referred to as the certifiable radius. Most of these verifiers provide a rather loose bound on the certifiable radius. However, if the verifier is differentiable, then the network can be trained with a loss that promotes tightness of this bound. We use the term certificate training to refer to the process of training with a loss that promotes strong certificates. Interval bound propagation (IBP) (Mirman et al., 2018; Gowal et al., 2018) is a very simple verifier that uses layer-wise interval arithmetic to produce a certificate. Even though the IBP certificate is generally loose, after certificate training, it yields state-of-the-art certifiably-robust models for $l _ { \\infty }$ -norm bounded attacks (Gowal et al., 2018; Zhang et al., 2019b). In this paper, we extend IBP to train certifiably-robust networks resilient to patch attacks. We first introduce some notation and basic algorithms for IBP training. ",
397
+ "bbox": [
398
+ 174,
399
+ 130,
400
+ 825,
401
+ 380
402
+ ],
403
+ "page_idx": 3
404
+ },
405
+ {
406
+ "type": "text",
407
+ "text": "Notation We represent a neural network with a series of transformations $h ^ { ( k ) }$ for each of its $k$ layers. We use $z ^ { ( k ) } \\in \\bar { \\mathbb { R } } ^ { n _ { k } }$ to denote the output of layer $k$ , where $n _ { k }$ is the number of units in the $k ^ { t h }$ layer and $z ^ { ( 0 ) }$ stands for the input. Specifically, the network computes ",
408
+ "bbox": [
409
+ 174,
410
+ 387,
411
+ 826,
412
+ 433
413
+ ],
414
+ "page_idx": 3
415
+ },
416
+ {
417
+ "type": "equation",
418
+ "img_path": "images/38a6af5bab14c81bc65b7bef9be01f14a5bb4b97642c51ad7f33b7744213b048.jpg",
419
+ "text": "$$\nz ^ { ( k ) } = h ^ { ( k - 1 ) } ( z ^ { ( k - 1 ) } ) \\forall k = 1 , \\dots , K .\n$$",
420
+ "text_format": "latex",
421
+ "bbox": [
422
+ 357,
423
+ 439,
424
+ 640,
425
+ 458
426
+ ],
427
+ "page_idx": 3
428
+ },
429
+ {
430
+ "type": "text",
431
+ "text": "Certification Problem To produce a certificate for an input $x _ { 0 }$ , we want to verify that the following condition is true with respect to all possible labels $y$ : ",
432
+ "bbox": [
433
+ 173,
434
+ 472,
435
+ 826,
436
+ 502
437
+ ],
438
+ "page_idx": 3
439
+ },
440
+ {
441
+ "type": "equation",
442
+ "img_path": "images/1f9d5c8120ecf851be6c3fa5abf5008341345ccf925375410a3fec3f6230774b.jpg",
443
+ "text": "$$\n( e _ { y _ { t r u e } } - e _ { y } ) ^ { T } z ^ { ( K ) } = { \\bf m } _ { y } \\geq 0 \\qquad \\forall z ^ { ( 0 ) } \\in \\mathbb { B } ( x _ { 0 } ) \\qquad \\forall y .\n$$",
444
+ "text_format": "latex",
445
+ "bbox": [
446
+ 308,
447
+ 507,
448
+ 689,
449
+ 529
450
+ ],
451
+ "page_idx": 3
452
+ },
453
+ {
454
+ "type": "text",
455
+ "text": "Here, $e _ { i }$ is the $i ^ { t h }$ basis vector, and $\\mathbf { m } _ { y }$ is called the margin following Wong & Kolter (2017). Note that $\\mathbf { m } _ { y _ { t r u e } }$ is always equal to 0. The vector $\\mathbf { m }$ contains all margins corresponding to all labels. $\\mathbb { B } ( x _ { 0 } )$ is the constraint set over which the adversarial input image may range. In a conventional setting, this is an $\\ell _ { \\infty }$ ball around $x _ { 0 }$ . In the case of patch attack, the constraint set contains all images formed by applying a patch to $x _ { 0 }$ ; ",
456
+ "bbox": [
457
+ 173,
458
+ 535,
459
+ 825,
460
+ 607
461
+ ],
462
+ "page_idx": 3
463
+ },
464
+ {
465
+ "type": "equation",
466
+ "img_path": "images/2ea4cbd9d09807a5ce309163b0be61414fa8ffa9ac763bf3b36027fab0c675a2.jpg",
467
+ "text": "$$\n\\mathbb { B } ( x _ { 0 } ) = \\{ A ( x _ { 0 } , p , l ) | p \\in \\mathbb { P } { \\mathrm { ~ a n d ~ } } l \\in \\mathbb { L } \\} .\n$$",
468
+ "text_format": "latex",
469
+ "bbox": [
470
+ 364,
471
+ 613,
472
+ 632,
473
+ 631
474
+ ],
475
+ "page_idx": 3
476
+ },
477
+ {
478
+ "type": "text",
479
+ "text": "The Basics of Interval Bound Propagation (IBP) We now describe how to produce certificates using interval bound propagation as in (Gowal et al., 2018). Suppose that for each component in $z ^ { ( k - \\bar { 1 } ) }$ we have an interval containing all the values which this component reaches as $z ^ { ( 0 ) }$ ranges over the ball $\\mathbb { B } ( x _ { 0 } )$ . If $z ^ { ( k ) } = h ^ { ( k ) } ( z ^ { \\top } )$ is a linear (or convolutional) layer of the form ${ z } ^ { ( k ) ^ { - } } =$ $W ^ { ( k ) } z ^ { ( k - 1 ) } + b ^ { ( k ) }$ , then we can get an outer approximation of the reachable interval range of activations by the next layer $z ^ { ( k ) }$ using the formulas below ",
480
+ "bbox": [
481
+ 173,
482
+ 643,
483
+ 825,
484
+ 734
485
+ ],
486
+ "page_idx": 3
487
+ },
488
+ {
489
+ "type": "equation",
490
+ "img_path": "images/1a03423793112af4d36e70a00c1d8a1e7b0b9581ec976adf34c671d6d1020242.jpg",
491
+ "text": "$$\n\\begin{array} { r l } & { \\overline { { z } } ^ { ( k ) } = W ^ { ( k ) } \\frac { \\overline { { z } } ^ { ( k - 1 ) } + \\underline { { z } } ^ { ( k - 1 ) } } { 2 } + | W ^ { ( k ) } | \\frac { \\overline { { z } } ^ { ( k - 1 ) } - \\underline { { z } } ^ { ( k - 1 ) } } { 2 } + b ^ { ( k ) } , } \\\\ & { \\underline { { z } } ^ { ( k ) } = W ^ { ( k ) } \\frac { \\overline { { z } } ^ { ( k - 1 ) } + \\underline { { z } } ^ { ( k - 1 ) } } { 2 } - | W ^ { ( k ) } | \\frac { \\overline { { z } } ^ { ( k - 1 ) } - \\underline { { z } } ^ { ( k - 1 ) } } { 2 } + b ^ { ( k ) } . } \\end{array}\n$$",
492
+ "text_format": "latex",
493
+ "bbox": [
494
+ 285,
495
+ 739,
496
+ 710,
497
+ 810
498
+ ],
499
+ "page_idx": 3
500
+ },
501
+ {
502
+ "type": "text",
503
+ "text": "Here $\\overline { { z } } ^ { ( k - 1 ) }$ denotes the upper bound of each interval, $\\underline { z } ^ { ( k - 1 ) }$ the lower bound, and $| W ^ { ( k ) } |$ the element-wise absolute value. Alternatively, if $h ^ { ( k ) } ( z ^ { ( k - 1 ) } )$ is an element-wise monotonic activation (e.g., a ReLU), then we can calculate the outer approximation of the reachable interval range of the next layer using the formulas below. ",
504
+ "bbox": [
505
+ 173,
506
+ 814,
507
+ 825,
508
+ 875
509
+ ],
510
+ "page_idx": 3
511
+ },
512
+ {
513
+ "type": "equation",
514
+ "img_path": "images/cc84f47f77535e3848b5ecc1e3a75d1e9012e03c6831c3c6e1882607141dc290.jpg",
515
+ "text": "$$\n\\begin{array} { r } { \\overline { z } ^ { ( k ) } = h ^ { ( k ) } ( \\overline { z } ^ { ( k - 1 ) } ) } \\\\ { \\underline { z } ^ { ( k ) } = h ^ { ( k ) } ( \\underline { z } ^ { ( k - 1 ) } ) . } \\end{array}\n$$",
516
+ "text_format": "latex",
517
+ "bbox": [
518
+ 428,
519
+ 880,
520
+ 568,
521
+ 922
522
+ ],
523
+ "page_idx": 3
524
+ },
525
+ {
526
+ "type": "text",
527
+ "text": "When the feasible set $\\mathbb { B } ( x _ { 0 } )$ represents a simple $\\ell _ { \\infty }$ attack, the range of possible $z ^ { ( 0 ) }$ values is trivially characterized by an interval bound $\\overline { { z } } ^ { ( 0 ) }$ and $\\underline { z } ^ { ( 0 ) }$ . Then, by iteratively applying the above rules, we can propagate intervals through the network and eventually get $\\overline { { z } } ^ { ( K ) }$ and $\\smash { \\mathcal { Z } ^ { ( K ) } }$ . A certificate can then be given if we can show that (3) is always true for outputs in the range $\\overline { { z } } ^ { ( K ) }$ and $\\smash { \\boldsymbol { \\mathcal { Z } } ^ { ( K ) } }$ with respect to all possible labels. More specifically, we can check that the following holds for all $y$ ",
528
+ "bbox": [
529
+ 173,
530
+ 102,
531
+ 825,
532
+ 179
533
+ ],
534
+ "page_idx": 4
535
+ },
536
+ {
537
+ "type": "equation",
538
+ "img_path": "images/25fc8a53f7effcf2cd2df99ffb77095bfce036a317c1d5ceee2a63e54835de6c.jpg",
539
+ "text": "$$\n\\begin{array} { r } { \\underline { { \\mathbf { m } } } _ { y } = e _ { y _ { t r u e } } ^ { T } \\underline { { z } } ^ { ( K ) } - e _ { y } ^ { T } \\overline { { z } } ^ { ( K ) } = \\underline { { z } } _ { y _ { t r u e } } ^ { ( K ) } - \\overline { { z } } _ { y } ^ { ( K ) } \\geq 0 \\quad \\forall y . } \\end{array}\n$$",
540
+ "text_format": "latex",
541
+ "bbox": [
542
+ 315,
543
+ 185,
544
+ 681,
545
+ 207
546
+ ],
547
+ "page_idx": 4
548
+ },
549
+ {
550
+ "type": "text",
551
+ "text": "Training for Interval Bound Propagation To train a network to produce accurate interval bounds, we simply replace standard logits with the $- \\mathbf { m }$ vector in (3). Note that all elements of $\\mathbf { m }$ need to be larger than zero to satisfy the conditions in (3), and mytrue is always equal to zero. Put simply, we would like mytrue to be the least of all margins. We can promote this condition by training with the loss function ",
552
+ "bbox": [
553
+ 173,
554
+ 219,
555
+ 825,
556
+ 289
557
+ ],
558
+ "page_idx": 4
559
+ },
560
+ {
561
+ "type": "equation",
562
+ "img_path": "images/72be3c53136bd187f40252a50653129ebf5fd67da8e8f872b8121036efc17f7a.jpg",
563
+ "text": "$$\n\\mathrm { C e r t i f i c a t e \\ L o s s } = \\mathrm { C r o s s \\ E n t r o p y \\ L o s s } ( - \\mathbf { m } , y ) .\n$$",
564
+ "text_format": "latex",
565
+ "bbox": [
566
+ 338,
567
+ 296,
568
+ 658,
569
+ 314
570
+ ],
571
+ "page_idx": 4
572
+ },
573
+ {
574
+ "type": "text",
575
+ "text": "Unlike regular neural network training, stochastic gradient descent for minimizing equation 10 is unstable, and a range of tricks are necessary to stabilize IBP training (Gowal et al., 2018). The first trick is merging the last linear weight matrix with $( e _ { y } - e _ { y _ { t r u e } } )$ before calculating $- { \\underline { { \\mathbf { m } } } } _ { y }$ . This allows a tighter characterization of the interval bound that noticeably improves results. The second trick uses an “epsilon schedule” in which training begins with a perturbation radius of zero, and this radius is slowly increased over time until a sentinel value is reached. Finally, a mixed loss function containing both a standard natural loss and an IBP loss is used. ",
576
+ "bbox": [
577
+ 173,
578
+ 327,
579
+ 825,
580
+ 426
581
+ ],
582
+ "page_idx": 4
583
+ },
584
+ {
585
+ "type": "text",
586
+ "text": "In all of our experiments, we use the merging technique and the epsilon schedule, but we do not use a mixed loss function containing a natural loss as it does not increase our certificate performance. ",
587
+ "bbox": [
588
+ 173,
589
+ 431,
590
+ 823,
591
+ 462
592
+ ],
593
+ "page_idx": 4
594
+ },
595
+ {
596
+ "type": "text",
597
+ "text": "4.2 CERTIFYING AGAINST PATCH ATTACKS ",
598
+ "text_level": 1,
599
+ "bbox": [
600
+ 176,
601
+ 478,
602
+ 482,
603
+ 492
604
+ ],
605
+ "page_idx": 4
606
+ },
607
+ {
608
+ "type": "text",
609
+ "text": "We can now describe the extension of IBP to patches. If we specify the patch location, one can represent the feasible set of images with a simple interval bound: for pixels within the patch, the upper and lower bound is equal to 1 and 0. For pixels outside of the patch, the upper and lower bounds are both equal to the original pixel value. By passing this bound through the network, we would be able to get msingle location and verify that they satisfy the conditions in (3). ",
610
+ "bbox": [
611
+ 174,
612
+ 503,
613
+ 825,
614
+ 575
615
+ ],
616
+ "page_idx": 4
617
+ },
618
+ {
619
+ "type": "text",
620
+ "text": "However, we have to consider not just a single location, but all possible locations $\\mathbb { L }$ to give a certificate. To adapt the bound to all possible location, we pass each of the possible patches through the network, and take the worst case margin. More specifically, ",
621
+ "bbox": [
622
+ 174,
623
+ 580,
624
+ 825,
625
+ 622
626
+ ],
627
+ "page_idx": 4
628
+ },
629
+ {
630
+ "type": "equation",
631
+ "img_path": "images/a4e469b062571eede31119d89cf7867b9051bdc6b2d1f47c03973309a1cc4ae1.jpg",
632
+ "text": "$$\n\\mathbf { m } ^ { \\mathrm { e s } } ( \\mathbb { L } ) _ { y } = \\operatorname* { m i n } _ { l \\in \\mathbb { L } } \\mathbf { m } ^ { \\mathrm { s i n g l e ~ p a t c h } } ( l ) _ { y } \\forall y .\n$$",
633
+ "text_format": "latex",
634
+ "bbox": [
635
+ 377,
636
+ 630,
637
+ 619,
638
+ 655
639
+ ],
640
+ "page_idx": 4
641
+ },
642
+ {
643
+ "type": "text",
644
+ "text": "Similar to regular IBP training, we simply use $\\underline { { \\mathbf { m } } } ^ { \\mathrm { e s } } ( \\mathbb { L } )$ to calculate the cross entropy loss for training and backpropagation, ",
645
+ "bbox": [
646
+ 173,
647
+ 661,
648
+ 826,
649
+ 690
650
+ ],
651
+ "page_idx": 4
652
+ },
653
+ {
654
+ "type": "equation",
655
+ "img_path": "images/badccbe6659e45077e905312268debefca934cb3ec05550287f687b5304211fa.jpg",
656
+ "text": "$$\n\\operatorname { C e r t i f i c a t e \\operatorname { L o s s } } = \\operatorname { C r o s s \\operatorname { E n t r o p y \\operatorname { L o s s } } } ( - \\underline { { \\mathbf { m } } } ^ { \\mathrm { e s } } ( \\mathbb { L } ) , y ) .\n$$",
657
+ "text_format": "latex",
658
+ "bbox": [
659
+ 323,
660
+ 698,
661
+ 676,
662
+ 715
663
+ ],
664
+ "page_idx": 4
665
+ },
666
+ {
667
+ "type": "text",
668
+ "text": "Unfortunately, the cost of producing this na¨ıve certificate increases quadratically with image size. Consider that a CIFAR-10 image is of size $3 2 \\times 3 2$ , requiring over a thousand interval bounds, one for each possible patch location. To alleviate this problem, we propose two certificate training methods: Random Patch and Guided Patch, so that the number of forward passes does not scale with the dimension of the inputs. ",
669
+ "bbox": [
670
+ 174,
671
+ 728,
672
+ 825,
673
+ 800
674
+ ],
675
+ "page_idx": 4
676
+ },
677
+ {
678
+ "type": "text",
679
+ "text": "Random Patch Certificate Training In this method, we simply select a random set of patches out of the possible patches and pass them forward. A level of robustness is achieved even though a very small number of random patches are selected compared to the total number of possible patches ",
680
+ "bbox": [
681
+ 174,
682
+ 806,
683
+ 825,
684
+ 848
685
+ ],
686
+ "page_idx": 4
687
+ },
688
+ {
689
+ "type": "equation",
690
+ "img_path": "images/44945ff3b0611e84f9e7c490e701923833d7e3bd6d9b926f7bcd4dee8156df28.jpg",
691
+ "text": "$$\n\\underline { { \\mathbf { m } } } ^ { \\mathrm { r a n d o m \\ p a t c h e s } } ( \\mathbb { L } ) _ { y } = \\underline { { \\mathbf { m } } } ^ { \\mathrm { e s } } ( S ) _ { y }\n$$",
692
+ "text_format": "latex",
693
+ "bbox": [
694
+ 395,
695
+ 856,
696
+ 599,
697
+ 875
698
+ ],
699
+ "page_idx": 4
700
+ },
701
+ {
702
+ "type": "text",
703
+ "text": "where $S$ is a random subset of $\\mathbb { L }$ . Similarly, the random patch certificate loss is calculated as below. ",
704
+ "bbox": [
705
+ 176,
706
+ 881,
707
+ 823,
708
+ 896
709
+ ],
710
+ "page_idx": 4
711
+ },
712
+ {
713
+ "type": "equation",
714
+ "img_path": "images/40631a922fd1252beda45689f839d46b44e018b350319daebbe860eeb763a5e7.jpg",
715
+ "text": "$$\n\\mathrm { R a n d o m ~ P a t c h ~ C e r t i f i c a t e ~ L o s s } = \\mathrm { C r o s s ~ E n t r o p y ~ L o s s } ( - \\underline { { \\mathbf { m } } } ^ { \\mathrm { r a n d o m ~ p a t c h e s } } ( \\mathbb { L } ) , y )\n$$",
716
+ "text_format": "latex",
717
+ "bbox": [
718
+ 236,
719
+ 904,
720
+ 753,
721
+ 921
722
+ ],
723
+ "page_idx": 4
724
+ },
725
+ {
726
+ "type": "text",
727
+ "text": "Guided Patch Certificate Training In this method, we propose using a U-net (Ronneberger et al., 2015) to predict msingle patch, and then randomly select a couple of locations based on the predicted $\\mathbf { m } ^ { \\mathrm { s i n g l e } \\mathrm { p a t c h } }$ so that fewer patches need to be passed forward. ",
728
+ "bbox": [
729
+ 173,
730
+ 103,
731
+ 823,
732
+ 146
733
+ ],
734
+ "page_idx": 5
735
+ },
736
+ {
737
+ "type": "text",
738
+ "text": "Note that very few patches contribute to the worst case bound $\\underline { { \\mathbf { m } } } ^ { \\mathrm { e s } }$ in (11). In fact, the number of patches that yield the worst case margins will be no more than the number of labels. If we know the worst-case patches beforehand, then we can simply select the few worst-case patches during training. ",
739
+ "bbox": [
740
+ 174,
741
+ 152,
742
+ 823,
743
+ 195
744
+ ],
745
+ "page_idx": 5
746
+ },
747
+ {
748
+ "type": "text",
749
+ "text": "We propose to use U-net as the number of locations and margins is very large. For a square patch of size $n \\times n$ and an image of size $m \\times m$ , the total number of possible locations is $( m - n + \\mathbf { \\hat { 1 } } ) ^ { 2 }$ , and for each location the number of margins is equal to the number of possible labels. ",
750
+ "bbox": [
751
+ 174,
752
+ 202,
753
+ 823,
754
+ 244
755
+ ],
756
+ "page_idx": 5
757
+ },
758
+ {
759
+ "type": "equation",
760
+ "img_path": "images/6e2b722e690020b0cd598c157f790ae7ddb81b815c1fc7d409fbc09cdc855329.jpg",
761
+ "text": "$$\n\\begin{array} { l } { { \\bf { m } } ^ { \\mathrm { { p r e d } } } = { \\bf { U } } { \\mathrm { - n e t } } ( \\mathrm { i m a g e } ) } \\\\ { { \\bf { d i m } } ( { \\bf { m } } ^ { \\mathrm { { p r e d } } } ) = ( m - n + 1 , m - n + 1 , \\# \\mathrm { o f } \\mathrm { l a b e l s } ) . } \\end{array}\n$$",
762
+ "text_format": "latex",
763
+ "bbox": [
764
+ 325,
765
+ 248,
766
+ 671,
767
+ 289
768
+ ],
769
+ "page_idx": 5
770
+ },
771
+ {
772
+ "type": "text",
773
+ "text": "Given the U-net prediction of $\\underline { { \\mathbf { m } } } ^ { \\mathrm { p r e d } }$ , we then randomly select a single patch for each label based on the softmax of the predicted $\\underline { { \\mathbf { m } } } ^ { \\mathrm { p r e d } }$ . The number of selected patches is equal to the number of labels. After these patches are passed forward, the U-net is then updated with a mean-squared-error loss between the predicted margins $\\underline { { \\mathbf { m } } } ^ { \\mathrm { p r e d } }$ and the actual margins $\\underline { { \\mathbf { m } } } ^ { \\mathrm { a c t u a l } }$ . Note that only a few patches are selected at a time, so that the mean-squared-error only passes through the selected patches. ",
774
+ "bbox": [
775
+ 173,
776
+ 300,
777
+ 826,
778
+ 371
779
+ ],
780
+ "page_idx": 5
781
+ },
782
+ {
783
+ "type": "equation",
784
+ "img_path": "images/d2bc1ac4b92bf8f45f0b03b98a291aaf65de753c0cb1dc9cce77eef4b0b12473.jpg",
785
+ "text": "$$\n\\mathrm { U } \\mathrm { - n e t } \\mathrm { L o s s } = \\mathbf { M } \\mathrm { S E } ( \\mathbf { \\underline { { m } } } ^ { \\mathrm { p r e d } } , \\mathbf { \\underline { { m } } } ^ { \\mathrm { a c t u a l } } ) .\n$$",
786
+ "text_format": "latex",
787
+ "bbox": [
788
+ 379,
789
+ 376,
790
+ 616,
791
+ 393
792
+ ],
793
+ "page_idx": 5
794
+ },
795
+ {
796
+ "type": "text",
797
+ "text": "The network is trained with the following loss: ",
798
+ "bbox": [
799
+ 173,
800
+ 398,
801
+ 480,
802
+ 412
803
+ ],
804
+ "page_idx": 5
805
+ },
806
+ {
807
+ "type": "text",
808
+ "text": "Guided Patch Certificate $\\operatorname { L o s s } = \\operatorname { C r o s s } \\operatorname { E n t r o p y } \\operatorname { L o s s } ( - \\underline { { \\mathbf { m } } } ^ { \\mathrm { g u i d e d } \\mathrm { p a t c h e s } } ( \\mathbb { L } ) , y ) .$ ",
809
+ "bbox": [
810
+ 248,
811
+ 419,
812
+ 750,
813
+ 436
814
+ ],
815
+ "page_idx": 5
816
+ },
817
+ {
818
+ "type": "text",
819
+ "text": "Certification Process In all our experiments, we check that equation (3) is satisfied by iterating over all possible patches and forward-passing the interval bounds generated for each patch; this overhead is tolerable at evaluation time. ",
820
+ "bbox": [
821
+ 173,
822
+ 440,
823
+ 826,
824
+ 483
825
+ ],
826
+ "page_idx": 5
827
+ },
828
+ {
829
+ "type": "text",
830
+ "text": "4.3 CERTIFYING AGAINST SPARSE ATTACKS ",
831
+ "text_level": 1,
832
+ "bbox": [
833
+ 176,
834
+ 500,
835
+ 490,
836
+ 513
837
+ ],
838
+ "page_idx": 5
839
+ },
840
+ {
841
+ "type": "text",
842
+ "text": "IBP can also be adapted to defend against sparse attack where the attacker is allowed to modify a fixed number $( k )$ of pixels that may not be adjacent to each other (Modas et al., 2019). The only modification is that we have to change the bound calculated from the first layer to ",
843
+ "bbox": [
844
+ 174,
845
+ 525,
846
+ 826,
847
+ 568
848
+ ],
849
+ "page_idx": 5
850
+ },
851
+ {
852
+ "type": "equation",
853
+ "img_path": "images/17a421e1da69fa4d200afc0f132582985c1be61c501fb76dbccbf41606d6b64e.jpg",
854
+ "text": "$$\n\\overline { { { z } } } _ { i } ^ { ( 1 ) } = W _ { i , : } ^ { ( 1 ) } z ^ { ( 0 ) } + | W _ { i , : } ^ { ( 1 ) } | _ { t o p _ { k } } ~ z _ { i } ^ { ( 1 ) } = W _ { i , : } ^ { ( 1 ) } z ^ { ( 0 ) } - | W _ { i , : } ^ { ( 1 ) } | _ { t o p _ { k } } ~ \\forall i\n$$",
855
+ "text_format": "latex",
856
+ "bbox": [
857
+ 263,
858
+ 571,
859
+ 735,
860
+ 594
861
+ ],
862
+ "page_idx": 5
863
+ },
864
+ {
865
+ "type": "text",
866
+ "text": "and apply equation (5) and (6) for the subsequent layers. Here, $( . ) _ { t o p _ { k } }$ is the sum of the largest $k$ elements in the vector. ",
867
+ "bbox": [
868
+ 174,
869
+ 599,
870
+ 826,
871
+ 628
872
+ ],
873
+ "page_idx": 5
874
+ },
875
+ {
876
+ "type": "text",
877
+ "text": "5 EXPERIMENTS ",
878
+ "text_level": 1,
879
+ "bbox": [
880
+ 176,
881
+ 647,
882
+ 326,
883
+ 662
884
+ ],
885
+ "page_idx": 5
886
+ },
887
+ {
888
+ "type": "text",
889
+ "text": "In this section, we compare our certified defenses with exiting algorithms on two datasets and three model architectures of varying complexity. We consider a strong attack setting in which adversarial patches can appear anywhere in the image. Different training strategies for the certified defense are also compared, which shows a trade-off between performance and training efficiency. Furthermore, we evaluate the transferability of a model trained using square patches to other adversarial shapes, including shapes that do not fit in any certified square. The training and architectural details can be found in Appendix A.1. We also present preliminary results on certified defense against sparse attacks. ",
890
+ "bbox": [
891
+ 173,
892
+ 678,
893
+ 825,
894
+ 790
895
+ ],
896
+ "page_idx": 5
897
+ },
898
+ {
899
+ "type": "text",
900
+ "text": "5.1 COMPARISON AGAINST EXISTING DEFENSES ",
901
+ "text_level": 1,
902
+ "bbox": [
903
+ 174,
904
+ 808,
905
+ 522,
906
+ 820
907
+ ],
908
+ "page_idx": 5
909
+ },
910
+ {
911
+ "type": "text",
912
+ "text": "In this section, we study the effectiveness of our proposed IBP certified models against an adversary that is allowed to place patches anywhere in the image, even on top of the salient object. If the patch is sufficiently small, and does not cover a large portion of the salient object, then the model should still classify correctly, and defense against the perturbation should be possible. ",
913
+ "bbox": [
914
+ 174,
915
+ 832,
916
+ 825,
917
+ 888
918
+ ],
919
+ "page_idx": 5
920
+ },
921
+ {
922
+ "type": "text",
923
+ "text": "In the best case, our IBP certified model is able to achieve $9 1 . 6 \\%$ certified (Table 2) with respect to a $2 \\times 2$ patch $( \\sim . 5 \\%$ of image pixels) adversary on MNIST. For more challenging cases, such as a 5 $\\times 5$ ( $\\sim 2 . 5 \\%$ of image pixels) patch adversary on CIFAR-10, the certified adversarial accuracy is only $2 4 . 9 \\%$ (Table 2). Even though these existing defenses appear to achieve better or comparable adversarial accuracy as our IBP certified model when faced with a weak adversary, when faced with a stronger adversary their adversarial accuracy dropped to levels below our certified accuracy for all cases that we analyzed. ",
924
+ "bbox": [
925
+ 173,
926
+ 895,
927
+ 823,
928
+ 924
929
+ ],
930
+ "page_idx": 5
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "",
935
+ "bbox": [
936
+ 174,
937
+ 103,
938
+ 825,
939
+ 172
940
+ ],
941
+ "page_idx": 6
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "When evaluating existing defenses, we only report cases where non-trivial adversarial accuracy is achieved against a weaker adversary. We do not explore cases where LGS and DW perform so poorly that no meaningful comparison can be done. LGS and DW are highly dependent on hyperparameters to work effectively against naive attacks, and yet neither Naseer et al. (2019) nor Hayes (2018) proposed a way to learn these hyperparameters. By trial and error, we were able to increase the adversarial accuracy against a weaker adversary for some settings, but not all. In addition, we also notice a peculiar feature of DW: when we increase the adversarial accuracy, the clean accuracy degrades, sometimes so much that it is even lower than the empirical adversarial accuracy. This happens because DW always removes a patch from the prediction. When an adversarial patch is detected, it is likely to be removed, enabling correct prediction. On the other hand, when there are no adversarial patches, DW removes actual salient information, resulting in lower clean accuracy. ",
946
+ "bbox": [
947
+ 174,
948
+ 180,
949
+ 825,
950
+ 333
951
+ ],
952
+ "page_idx": 6
953
+ },
954
+ {
955
+ "type": "text",
956
+ "text": "Here we did not compare our results with adversarial training, because even though it produces some of the most adversarially robust models, it does not offer any guarantees on the empirical robust accuracy, and could still be decreased further with stronger attacks. For example, Wang et al. (2019) proposed a stronger attack that could find $47 \\%$ more adversarial examples compared to gradient based method. Further, adversarial training on all possible patches would be even more expensive compared to certificate training, and is slightly beyond our computational budget. ",
957
+ "bbox": [
958
+ 174,
959
+ 340,
960
+ 825,
961
+ 424
962
+ ],
963
+ "page_idx": 6
964
+ },
965
+ {
966
+ "type": "text",
967
+ "text": "Compared to state-of-the-art certified models for CIFAR with $L _ { \\infty }$ -perturbation, where Zhang et al. (2019a) proposed a deterministic algorithm that achieves clean accuracy of $3 4 . 0 \\%$ , our clean accuracy for our most robust CIFAR $5 \\times 5$ model is $4 7 . 8 \\%$ when using a large model (Table 2). ",
968
+ "bbox": [
969
+ 174,
970
+ 431,
971
+ 825,
972
+ 473
973
+ ],
974
+ "page_idx": 6
975
+ },
976
+ {
977
+ "type": "table",
978
+ "img_path": "images/c05cfeed2d4e9f23cc5ab7a5b77dd639884d8719c99778848ff0b07130af40b8.jpg",
979
+ "table_caption": [
980
+ "Table 2: Comparison of our IBP certified patch defense against existing defenses. Empirical adversarial accuracy is calculated for 400 random images in both datasets. All results are averaged over three different models. "
981
+ ],
982
+ "table_footnote": [],
983
+ "table_body": "<table><tr><td>Dataset</td><td>Patch Size</td><td>Adversary</td><td>Defense</td><td>Clean Accuracy</td><td>Accuracy</td><td>Empirical Certified Adversarial Accuracy</td></tr><tr><td rowspan=\"5\">MNIST</td><td>2×2</td><td>IFGSM</td><td>None</td><td>98.4%</td><td>80.1%</td><td></td></tr><tr><td>2×2</td><td>IFGSM</td><td>LGS</td><td>97.4%</td><td>90.0%</td><td></td></tr><tr><td>2×2</td><td>IFGSM+LGS</td><td>LGS</td><td>97.4%</td><td>60.7%</td><td></td></tr><tr><td>2×2</td><td>IFGSM</td><td>IBP</td><td>98.5%</td><td>93.9%</td><td>91.6%</td></tr><tr><td>5×5</td><td>IFGSM</td><td>None</td><td>98.5%</td><td>3.3%</td><td></td></tr><tr><td rowspan=\"10\">CIFAR</td><td>5×5</td><td>IFGSM</td><td>IBP</td><td>92.9%</td><td>66.1%</td><td>62.0%</td></tr><tr><td>2×2</td><td>IFGSM</td><td>None</td><td>66.3%</td><td>25.4%</td><td>1</td></tr><tr><td>2×2</td><td>IFGSM</td><td>LGS</td><td>64.9%</td><td>31.3%</td><td></td></tr><tr><td>2×2</td><td>IFGSM+LGS</td><td>LGS</td><td>64.9%</td><td>24.2%</td><td></td></tr><tr><td>2×2</td><td>IFGSM</td><td>DW</td><td>47.1%</td><td>43.3%</td><td></td></tr><tr><td>2×2</td><td>IFGSM+DW</td><td>DW</td><td>47.1%</td><td>20.2%</td><td>=</td></tr><tr><td>2×2</td><td>IFGSM</td><td>IBP</td><td>48.6%</td><td>45.2%</td><td>41.6%</td></tr><tr><td>5×5</td><td>IFGSM</td><td>None</td><td>66.5%</td><td>0.4%</td><td></td></tr><tr><td>5×5</td><td>IFGSM</td><td>LGS</td><td>51.2% 51.2%</td><td>22.11%</td><td></td></tr><tr><td>5×5</td><td>IFGSM +LGS</td><td>LGS DW</td><td>45.3%</td><td>0.5% 59.3%</td><td></td></tr><tr><td>5×5</td><td></td><td>IFGSM</td><td></td><td></td><td></td></tr><tr><td>5×5</td><td>IFGSM+DW</td><td>DW</td><td>45.3%</td><td>15.6%</td><td></td></tr><tr><td>5×5</td><td>IFGSM</td><td>IBP</td><td>33.9%</td><td>29.1%</td><td>24.9%</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>",
984
+ "bbox": [
985
+ 197,
986
+ 537,
987
+ 800,
988
+ 833
989
+ ],
990
+ "page_idx": 6
991
+ },
992
+ {
993
+ "type": "text",
994
+ "text": "5.2 COMPARISON OF TRAINING STRATEGIES ",
995
+ "text_level": 1,
996
+ "bbox": [
997
+ 176,
998
+ 856,
999
+ 493,
1000
+ 869
1001
+ ],
1002
+ "page_idx": 6
1003
+ },
1004
+ {
1005
+ "type": "text",
1006
+ "text": "We find that given a fixed architecture all-patch certificate training achieves the best certified accuracy. However, given a fixed computational budget, random and guided training significantly outperform all-patch training. Finally, guided-patch certificate training consistently outperforms random-patch certificate training by a slim margin, indicating that the U-net is learning how to predict the minimum margin m. ",
1007
+ "bbox": [
1008
+ 176,
1009
+ 882,
1010
+ 825,
1011
+ 924
1012
+ ],
1013
+ "page_idx": 6
1014
+ },
1015
+ {
1016
+ "type": "text",
1017
+ "text": "",
1018
+ "bbox": [
1019
+ 173,
1020
+ 103,
1021
+ 823,
1022
+ 132
1023
+ ],
1024
+ "page_idx": 7
1025
+ },
1026
+ {
1027
+ "type": "text",
1028
+ "text": "In Table 3, we see that given a fixed architecture all-patch certificate training significantly outperforms both random-patch certificate training and guided-patch certificate training in terms of certified accuracy, outperforming the second best certified defenses in each task by $2 . 6 \\%$ (MNIST, $2 \\times 2$ ), $7 . 3 \\%$ (MNIST, $5 \\times 5$ ), $3 . 9 \\%$ (CIFAR-10, $2 \\times 2 )$ ), and $3 . 4 \\%$ (CIFAR-10, $5 \\times 5$ ). However, all-patch certificate training is very expensive, taking on average 4 to 15 times longer than guided-patch certificate training and over 30 to 70 times longer than random-patch certificate training. ",
1029
+ "bbox": [
1030
+ 174,
1031
+ 138,
1032
+ 825,
1033
+ 223
1034
+ ],
1035
+ "page_idx": 7
1036
+ },
1037
+ {
1038
+ "type": "text",
1039
+ "text": "On the other hand, given a limited computational budget, random-patch and guided-patch training significantly outperforms all-patch training. Due to the efficiency of random-patch and guided-patch training, they scale much better to large architectures. By switching to a large architecture (5 layer wide convolutional network), we are able to boost the certified accuracy by over $10 \\%$ compared to the best performing all-patch small model (Table 2). Note that we are unable to all-patch train the same architecture as it will take almost 15 days to complete, and is out of our computational budget. ",
1040
+ "bbox": [
1041
+ 174,
1042
+ 229,
1043
+ 825,
1044
+ 313
1045
+ ],
1046
+ "page_idx": 7
1047
+ },
1048
+ {
1049
+ "type": "text",
1050
+ "text": "Guided-patch certificate training is slightly more expensive compared to random patch, due to overhead from the U-net architecture. However, given the 10 patches picked, guided-patch certificate training consistently outperforms random-patch certificate training, indicating that the U-net is learning how to predict the minimum margin m. ",
1051
+ "bbox": [
1052
+ 174,
1053
+ 319,
1054
+ 825,
1055
+ 376
1056
+ ],
1057
+ "page_idx": 7
1058
+ },
1059
+ {
1060
+ "type": "table",
1061
+ "img_path": "images/0eb115ffa03813f8cc48e12d421e5fbc40bdd687872b5c2e1df4dfd6b768f92f.jpg",
1062
+ "table_caption": [
1063
+ "Table 3: Trade-off between certified accuracy and training time for different strategies. The numbers next to training strategies indicate the number of patches used for estimating the lower bound during training. Most training times are measured on a single 2080Ti GPU, with the exception of all-patch training which is run on four 2080Ti GPUs. For that specific case, the training time is multiplied by 4 for fair comparison. See Appendix A.6 for more detailed statistics. \\*indicates the performance of the best performing large model trained with either random or guided patch. Detailed performance of the large models can be found in Appendix A.5 "
1064
+ ],
1065
+ "table_footnote": [],
1066
+ "table_body": "<table><tr><td colspan=\"2\"></td><td colspan=\"3\">2×2</td><td colspan=\"3\">5×5</td></tr><tr><td>Dataset</td><td>Training Strategy</td><td>Clean Accuracy</td><td>Certified Accuracy</td><td>Training Time(h)</td><td>Clean Accuracy</td><td>Certified Accuracy</td><td>Training Time(h)</td></tr><tr><td rowspan=\"4\">MNIST</td><td>AllPatch</td><td>98.5%</td><td>91.5%</td><td>9.3</td><td>92.0%</td><td>60.4%</td><td>8.4</td></tr><tr><td>Random(1)</td><td>98.5%</td><td>82.9%</td><td>0.2</td><td>96.9%</td><td>24.1%</td><td>0.4</td></tr><tr><td>Random(5)</td><td>98.6%</td><td>86.6%</td><td>0.3</td><td>95.8%</td><td>42.1%</td><td>0.3</td></tr><tr><td>Random(10)</td><td>98.6%</td><td>87.7%</td><td>0.3</td><td>95.6%</td><td>49.6%</td><td>0.3</td></tr><tr><td rowspan=\"6\">CIFAR</td><td>Guided(10) All Patch</td><td>98.6% 50.9%</td><td>88.9% 39.9%</td><td>2.2 56.4</td><td>95.0% 33.5%</td><td>53.1% 22.0%</td><td>2.6 45.8</td></tr><tr><td>Random(1)</td><td>53.6%</td><td>21.6%</td><td>0.6</td><td>43.6%</td><td>6.1%</td><td>0.6</td></tr><tr><td>Random(5)</td><td>52.9%</td><td>32.3%</td><td>0.7</td><td>39.0%</td><td>14.6%</td><td>0.7</td></tr><tr><td>Random(10)</td><td>51.9%</td><td>35.6%</td><td>0.8</td><td>38.8%</td><td>18.6%</td><td></td></tr><tr><td>Guided(10)</td><td>52.4%</td><td>36.0%</td><td>3.7</td><td>37.9%</td><td>18.8%</td><td>0.8 3.7</td></tr><tr><td>Large Model*</td><td>65.8%</td><td>51.9%</td><td>22.4</td><td>47.8%</td><td>30.3%</td><td>15.4</td></tr></table>",
1067
+ "bbox": [
1068
+ 173,
1069
+ 501,
1070
+ 838,
1071
+ 700
1072
+ ],
1073
+ "page_idx": 7
1074
+ },
1075
+ {
1076
+ "type": "text",
1077
+ "text": "5.3 EFFECTIVENESS AGAINST SPARSE ATTACK ",
1078
+ "text_level": 1,
1079
+ "bbox": [
1080
+ 174,
1081
+ 723,
1082
+ 511,
1083
+ 738
1084
+ ],
1085
+ "page_idx": 7
1086
+ },
1087
+ {
1088
+ "type": "text",
1089
+ "text": "The IBP based method can also be used to defend against sparse attack, see Section 4.3. Its performance is reasonable compared to patch defense (e.g. $9 1 . 5 \\%$ certified accuracy for $2 \\times 2$ patch vs $9 0 . 8 \\%$ for $\\mathrm { k } { = } 4$ ), even though the sparse attack model is much stronger. For convolutional networks, we increase the size of the first convolutional layer (i.e. from $3 \\times 3$ to $1 1 \\times 1 1$ ) so the interval bounds calculated are tighter. However, despite the change, fully-connected network still performs much better. For example, the certified accuracy drops from $2 5 . 6 \\%$ to $1 3 . 8 \\%$ when we switch from fully-connected to convolutional network for CIFAR10 and drops from $9 0 . 8 \\%$ to $7 5 . 9 \\%$ for MNIST respectively. Detailed results are shown in the Appendix A.4 Table 7. ",
1090
+ "bbox": [
1091
+ 173,
1092
+ 750,
1093
+ 825,
1094
+ 861
1095
+ ],
1096
+ "page_idx": 7
1097
+ },
1098
+ {
1099
+ "type": "text",
1100
+ "text": "Table 4 compares our approach with the state-of-the-art certified sparse defense (Random Ablation) Levine & Feizi (2019). We use their best model with the largest medium radii to certify against various levels of sparsity. As shown in the table, our method achieves higher certified accuracy on the MNIST dataset over all the sparse radii, but lower on CIFAR-10. It is worth noting that we are using a much smaller and simpler model (a fully-connected network) compared to Random Ablation, which uses ResNet-50. ",
1101
+ "bbox": [
1102
+ 174,
1103
+ 867,
1104
+ 825,
1105
+ 924
1106
+ ],
1107
+ "page_idx": 7
1108
+ },
1109
+ {
1110
+ "type": "text",
1111
+ "text": "",
1112
+ "bbox": [
1113
+ 173,
1114
+ 103,
1115
+ 825,
1116
+ 132
1117
+ ],
1118
+ "page_idx": 8
1119
+ },
1120
+ {
1121
+ "type": "table",
1122
+ "img_path": "images/db03a2cb6fdb10975ea7bf080ddad1ceeaf16035224cb90629be05a5c6fed02e.jpg",
1123
+ "table_caption": [
1124
+ "Table 4: Certified accuracy for sparse defenses with IBP and Random Ablation. "
1125
+ ],
1126
+ "table_footnote": [],
1127
+ "table_body": "<table><tr><td>Dataset</td><td>Sparsity (k)</td><td>Model</td><td>Clean Accuracy</td><td>Certified Accuracy</td></tr><tr><td rowspan=\"6\">MNIST</td><td>1</td><td>IBP-sparse</td><td>98.4%</td><td>96.0%</td></tr><tr><td>4</td><td>IBP-sparse</td><td>97.8%</td><td>90.8%</td></tr><tr><td>10</td><td>IBP-sparse</td><td>95.2%</td><td>86.8%</td></tr><tr><td>1</td><td>Random Ablation</td><td>96.7%</td><td>90.3%</td></tr><tr><td>4</td><td>Random Ablation</td><td>96.7%</td><td>79.1%</td></tr><tr><td>10</td><td>Random Ablation</td><td>96.7%</td><td>29.2%</td></tr><tr><td rowspan=\"6\">CIFAR</td><td>1</td><td>IBP-sparse</td><td>48.4%</td><td>40.0%</td></tr><tr><td>4</td><td>IBP-sparse</td><td>42.2%</td><td>31.2%</td></tr><tr><td>10</td><td>IBP-sparse</td><td>37.0%</td><td>25.6%</td></tr><tr><td>1</td><td>Random Ablation</td><td>78.3%</td><td>68.6%</td></tr><tr><td>4</td><td>Random Ablation</td><td>78.3%</td><td>61.3%</td></tr><tr><td>10</td><td>Random Ablation</td><td>78.3%</td><td>45.0%</td></tr></table>",
1128
+ "bbox": [
1129
+ 214,
1130
+ 167,
1131
+ 785,
1132
+ 353
1133
+ ],
1134
+ "page_idx": 8
1135
+ },
1136
+ {
1137
+ "type": "text",
1138
+ "text": "5.4 TRANSFERABILITY TO PATCHES OF DIFFERENT SHAPES ",
1139
+ "text_level": 1,
1140
+ "bbox": [
1141
+ 173,
1142
+ 377,
1143
+ 596,
1144
+ 390
1145
+ ],
1146
+ "page_idx": 8
1147
+ },
1148
+ {
1149
+ "type": "text",
1150
+ "text": "Since real-world adversarial patches may not always be square, the robust transferability of the model to shapes other than the square is important. ",
1151
+ "bbox": [
1152
+ 176,
1153
+ 401,
1154
+ 823,
1155
+ 430
1156
+ ],
1157
+ "page_idx": 8
1158
+ },
1159
+ {
1160
+ "type": "text",
1161
+ "text": "Therefore, we evaluate the robustness of the square-patch-trained model to adversarial patches of different shapes while fixing the number of pixels. In all these experiments, we evaluate the certified accuracy for our largest model, on both MNIST and CIFAR datasets. We evaluate the transferability to various shapes including rectangle, line, parallelogram, and diamond. With the exception of rectangles, all the shapes have the exact same pixel count as the patches used for training. For rectangles, we use multiple choices of width and length, obtaining some combinations with slightly more pixels, and the worst accuracy is reported in Table 5. The exact shapes used can be found in Appendix A.2. ",
1162
+ "bbox": [
1163
+ 173,
1164
+ 436,
1165
+ 825,
1166
+ 547
1167
+ ],
1168
+ "page_idx": 8
1169
+ },
1170
+ {
1171
+ "type": "text",
1172
+ "text": "The certified accuracy of our models generalize surprisingly well to other shapes, losing no more than than $5 \\%$ in most cases for MNIST and no more than $6 \\%$ for CIFAR-10 (Table 5). The largest degradation of accuracy happens for rectangles and lines, and it is mostly because the rectangle considered has more pixels compared to the square, and the line has less overlaps. However, it is still interesting that the certificate even generalizes to a straight line, even though the model was never trained to be robust to lines. In the case of MNIST with small patch size, the certified accuracy even improves when transferred to lines. ",
1173
+ "bbox": [
1174
+ 173,
1175
+ 554,
1176
+ 825,
1177
+ 652
1178
+ ],
1179
+ "page_idx": 8
1180
+ },
1181
+ {
1182
+ "type": "table",
1183
+ "img_path": "images/5a45d2fb484cb951e71d7c77fd43e0fc10e7fd8eb4c7d8f6baba9438a01d4c7d.jpg",
1184
+ "table_caption": [
1185
+ "Table 5: Certified accuracy for square-patch trained model for different shapes "
1186
+ ],
1187
+ "table_footnote": [],
1188
+ "table_body": "<table><tr><td>Dataset</td><td>Pixel Count</td><td>Square</td><td>Rectangle</td><td>Line</td><td>Diamond</td><td>Parallelogram</td></tr><tr><td>MNIST</td><td>4</td><td>91.6%</td><td>=</td><td>92.5%</td><td>91.6%</td><td>92.3%</td></tr><tr><td rowspan=\"5\">CIFAR</td><td>16</td><td>69.4%</td><td>55.4%</td><td>46.7%</td><td>68.13%</td><td>70.2%</td></tr><tr><td>25</td><td>59.7%</td><td>50.9%</td><td>32.4%</td><td>53.6%</td><td>55.2%</td></tr><tr><td>4</td><td>50.8%</td><td>=</td><td>46.1%</td><td>48.6%</td><td>49.8%</td></tr><tr><td>16</td><td>36.9%</td><td>29.0%</td><td>32.1%</td><td>35.7%</td><td>36.3%</td></tr><tr><td>25</td><td>30.3%</td><td>25.1%</td><td>29.0%</td><td>30.1%</td><td>30.7%</td></tr></table>",
1189
+ "bbox": [
1190
+ 210,
1191
+ 688,
1192
+ 782,
1193
+ 790
1194
+ ],
1195
+ "page_idx": 8
1196
+ },
1197
+ {
1198
+ "type": "text",
1199
+ "text": "6 CONCLUSION AND FUTURE WORK ",
1200
+ "text_level": 1,
1201
+ "bbox": [
1202
+ 173,
1203
+ 809,
1204
+ 495,
1205
+ 825
1206
+ ],
1207
+ "page_idx": 8
1208
+ },
1209
+ {
1210
+ "type": "text",
1211
+ "text": "After establishing the weakness of known defenses to patch attacks, we proposed the first certified defense against this model. We demonstrated the effectiveness of our defense on two datasets, and proposed strategies to speed up robust training. Finally, we established the robust transferability of trained certified models to different shapes. In its current form, the proposed certified defense is unlikely to scale to ImageNet, and we hope the presented experiments will encourage further work along this direction. ",
1212
+ "bbox": [
1213
+ 173,
1214
+ 839,
1215
+ 825,
1216
+ 924
1217
+ ],
1218
+ "page_idx": 8
1219
+ },
1220
+ {
1221
+ "type": "text",
1222
+ "text": "REFERENCES ",
1223
+ "text_level": 1,
1224
+ "bbox": [
1225
+ 176,
1226
+ 102,
1227
+ 287,
1228
+ 118
1229
+ ],
1230
+ "page_idx": 9
1231
+ },
1232
+ {
1233
+ "type": "text",
1234
+ "text": "Anish Athalye, Nicholas Carlini, and David Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. arXiv preprint arXiv:1802.00420, 2018. ",
1235
+ "bbox": [
1236
+ 174,
1237
+ 126,
1238
+ 826,
1239
+ 155
1240
+ ],
1241
+ "page_idx": 9
1242
+ },
1243
+ {
1244
+ "type": "text",
1245
+ "text": "Tom B Brown, Dandelion Mane, Aurko Roy, Mart ´ ´ın Abadi, and Justin Gilmer. Adversarial patch. arXiv preprint arXiv:1712.09665, 2017. ",
1246
+ "bbox": [
1247
+ 171,
1248
+ 162,
1249
+ 825,
1250
+ 193
1251
+ ],
1252
+ "page_idx": 9
1253
+ },
1254
+ {
1255
+ "type": "text",
1256
+ "text": "Jeremy M Cohen, Elan Rosenfeld, and J Zico Kolter. Certified adversarial robustness via randomized smoothing. arXiv preprint arXiv:1902.02918, 2019. ",
1257
+ "bbox": [
1258
+ 169,
1259
+ 200,
1260
+ 825,
1261
+ 231
1262
+ ],
1263
+ "page_idx": 9
1264
+ },
1265
+ {
1266
+ "type": "text",
1267
+ "text": "Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248–255. Ieee, 2009. ",
1268
+ "bbox": [
1269
+ 173,
1270
+ 239,
1271
+ 825,
1272
+ 282
1273
+ ],
1274
+ "page_idx": 9
1275
+ },
1276
+ {
1277
+ "type": "text",
1278
+ "text": "Logan Engstrom, Brandon Tran, Dimitris Tsipras, Ludwig Schmidt, and Aleksander Madry. A rotation and a translation suffice: Fooling cnns with simple transformations. arXiv preprint arXiv:1712.02779, 2017. ",
1279
+ "bbox": [
1280
+ 173,
1281
+ 291,
1282
+ 825,
1283
+ 334
1284
+ ],
1285
+ "page_idx": 9
1286
+ },
1287
+ {
1288
+ "type": "text",
1289
+ "text": "Sven Gowal, Krishnamurthy Dvijotham, Robert Stanforth, Rudy Bunel, Chongli Qin, Jonathan Uesato, Timothy Mann, and Pushmeet Kohli. On the effectiveness of interval bound propagation for training verifiably robust models. arXiv preprint arXiv:1810.12715, 2018. ",
1290
+ "bbox": [
1291
+ 173,
1292
+ 343,
1293
+ 826,
1294
+ 387
1295
+ ],
1296
+ "page_idx": 9
1297
+ },
1298
+ {
1299
+ "type": "text",
1300
+ "text": "Jamie Hayes. On visible adversarial perturbations & digital watermarking. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pp. 1597–1604, 2018. ",
1301
+ "bbox": [
1302
+ 171,
1303
+ 395,
1304
+ 823,
1305
+ 426
1306
+ ],
1307
+ "page_idx": 9
1308
+ },
1309
+ {
1310
+ "type": "text",
1311
+ "text": "Danny Karmon, Daniel Zoran, and Yoav Goldberg. Lavan: Localized and visible adversarial noise. arXiv preprint arXiv:1801.02608, 2018. ",
1312
+ "bbox": [
1313
+ 173,
1314
+ 434,
1315
+ 823,
1316
+ 463
1317
+ ],
1318
+ "page_idx": 9
1319
+ },
1320
+ {
1321
+ "type": "text",
1322
+ "text": "Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. ",
1323
+ "bbox": [
1324
+ 173,
1325
+ 472,
1326
+ 825,
1327
+ 501
1328
+ ],
1329
+ "page_idx": 9
1330
+ },
1331
+ {
1332
+ "type": "text",
1333
+ "text": "Cassidy Laidlaw and Soheil Feizi. Functional adversarial attacks, 2019. ",
1334
+ "bbox": [
1335
+ 174,
1336
+ 510,
1337
+ 647,
1338
+ 526
1339
+ ],
1340
+ "page_idx": 9
1341
+ },
1342
+ {
1343
+ "type": "text",
1344
+ "text": "Mark Lee and Zico Kolter. On physical adversarial patches for object detection, 2019. ",
1345
+ "bbox": [
1346
+ 174,
1347
+ 535,
1348
+ 738,
1349
+ 550
1350
+ ],
1351
+ "page_idx": 9
1352
+ },
1353
+ {
1354
+ "type": "text",
1355
+ "text": "Alexander Levine and Soheil Feizi. Robustness certificates for sparse adversarial attacks by randomized ablation. arXiv preprint arXiv:1911.09272, 2019. ",
1356
+ "bbox": [
1357
+ 173,
1358
+ 559,
1359
+ 825,
1360
+ 588
1361
+ ],
1362
+ "page_idx": 9
1363
+ },
1364
+ {
1365
+ "type": "text",
1366
+ "text": "Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017. ",
1367
+ "bbox": [
1368
+ 174,
1369
+ 595,
1370
+ 826,
1371
+ 638
1372
+ ],
1373
+ "page_idx": 9
1374
+ },
1375
+ {
1376
+ "type": "text",
1377
+ "text": "Matthew Mirman, Timon Gehr, and Martin Vechev. Differentiable abstract interpretation for provably robust neural networks. In International Conference on Machine Learning, pp. 3575–3583, 2018. ",
1378
+ "bbox": [
1379
+ 173,
1380
+ 648,
1381
+ 825,
1382
+ 679
1383
+ ],
1384
+ "page_idx": 9
1385
+ },
1386
+ {
1387
+ "type": "text",
1388
+ "text": "Apostolos Modas, Seyed-Mohsen Moosavi-Dezfooli, and Pascal Frossard. Sparsefool: a few pixels make a big difference. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 9087–9096, 2019. ",
1389
+ "bbox": [
1390
+ 174,
1391
+ 686,
1392
+ 825,
1393
+ 729
1394
+ ],
1395
+ "page_idx": 9
1396
+ },
1397
+ {
1398
+ "type": "text",
1399
+ "text": "Muzammal Naseer, Salman Khan, and Fatih Porikli. Local gradients smoothing: Defense against localized adversarial attacks. In 2019 IEEE Winter Conference on Applications of Computer Vision (WACV), pp. 1300–1307. IEEE, 2019. ",
1400
+ "bbox": [
1401
+ 173,
1402
+ 738,
1403
+ 823,
1404
+ 782
1405
+ ],
1406
+ "page_idx": 9
1407
+ },
1408
+ {
1409
+ "type": "text",
1410
+ "text": "Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computerassisted intervention, pp. 234–241. Springer, 2015. ",
1411
+ "bbox": [
1412
+ 174,
1413
+ 790,
1414
+ 825,
1415
+ 834
1416
+ ],
1417
+ "page_idx": 9
1418
+ },
1419
+ {
1420
+ "type": "text",
1421
+ "text": "Ali Shafahi, W Ronny Huang, Christoph Studer, Soheil Feizi, and Tom Goldstein. Are adversarial examples inevitable? arXiv preprint arXiv:1809.02104, 2018. ",
1422
+ "bbox": [
1423
+ 169,
1424
+ 843,
1425
+ 823,
1426
+ 872
1427
+ ],
1428
+ "page_idx": 9
1429
+ },
1430
+ {
1431
+ "type": "text",
1432
+ "text": "Ali Shafahi, Mahyar Najibi, Amin Ghiasi, Zheng Xu, John Dickerson, Christoph Studer, Larry S Davis, Gavin Taylor, and Tom Goldstein. Adversarial training for free! arXiv preprint arXiv:1904.12843, 2019. ",
1433
+ "bbox": [
1434
+ 176,
1435
+ 881,
1436
+ 825,
1437
+ 924
1438
+ ],
1439
+ "page_idx": 9
1440
+ },
1441
+ {
1442
+ "type": "text",
1443
+ "text": "Mahmood Sharif, Sruti Bhagavatula, Lujo Bauer, and Michael K Reiter. Adversarial generative nets: Neural network attacks on state-of-the-art face recognition. arXiv preprint arXiv:1801.00349, 2017. ",
1444
+ "bbox": [
1445
+ 176,
1446
+ 103,
1447
+ 823,
1448
+ 146
1449
+ ],
1450
+ "page_idx": 10
1451
+ },
1452
+ {
1453
+ "type": "text",
1454
+ "text": "Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. ",
1455
+ "bbox": [
1456
+ 173,
1457
+ 155,
1458
+ 823,
1459
+ 184
1460
+ ],
1461
+ "page_idx": 10
1462
+ },
1463
+ {
1464
+ "type": "text",
1465
+ "text": "Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2818–2826, 2016. ",
1466
+ "bbox": [
1467
+ 176,
1468
+ 193,
1469
+ 823,
1470
+ 236
1471
+ ],
1472
+ "page_idx": 10
1473
+ },
1474
+ {
1475
+ "type": "text",
1476
+ "text": "Florian Tramer and Dan Boneh. Adversarial training and robustness for multiple perturbations. \\` arXiv preprint arXiv:1904.13000, 2019. ",
1477
+ "bbox": [
1478
+ 169,
1479
+ 244,
1480
+ 823,
1481
+ 272
1482
+ ],
1483
+ "page_idx": 10
1484
+ },
1485
+ {
1486
+ "type": "text",
1487
+ "text": "Shiqi Wang, Yizheng Chen, Ahmed Abdou, and Suman Jana. Enhancing gradient-based attacks with symbolic intervals, 2019. ",
1488
+ "bbox": [
1489
+ 173,
1490
+ 281,
1491
+ 823,
1492
+ 310
1493
+ ],
1494
+ "page_idx": 10
1495
+ },
1496
+ {
1497
+ "type": "text",
1498
+ "text": "Eric Wong and J Zico Kolter. Provable defenses against adversarial examples via the convex outer adversarial polytope. arXiv preprint arXiv:1711.00851, 2017. ",
1499
+ "bbox": [
1500
+ 174,
1501
+ 319,
1502
+ 823,
1503
+ 349
1504
+ ],
1505
+ "page_idx": 10
1506
+ },
1507
+ {
1508
+ "type": "text",
1509
+ "text": "Eric Wong, Frank R Schmidt, and J Zico Kolter. Wasserstein adversarial examples via projected sinkhorn iterations. arXiv preprint arXiv:1902.07906, 2019. ",
1510
+ "bbox": [
1511
+ 174,
1512
+ 357,
1513
+ 821,
1514
+ 387
1515
+ ],
1516
+ "page_idx": 10
1517
+ },
1518
+ {
1519
+ "type": "text",
1520
+ "text": "Zuxuan Wu, Ser-Nam Lim, Larry Davis, and Tom Goldstein. Making an invisibility cloak: Real world adversarial attacks on object detectors. arXiv preprint arXiv:1910.14667, 2019. ",
1521
+ "bbox": [
1522
+ 174,
1523
+ 395,
1524
+ 823,
1525
+ 424
1526
+ ],
1527
+ "page_idx": 10
1528
+ },
1529
+ {
1530
+ "type": "text",
1531
+ "text": "Huan Zhang, Hongge Chen, Chaowei Xiao, Bo Li, Duane Boning, and Cho-Jui Hsieh. Towards stable and efficient training of verifiably robust neural networks, 2019a. ",
1532
+ "bbox": [
1533
+ 174,
1534
+ 433,
1535
+ 823,
1536
+ 462
1537
+ ],
1538
+ "page_idx": 10
1539
+ },
1540
+ {
1541
+ "type": "text",
1542
+ "text": "Huan Zhang, Hongge Chen, Chaowei Xiao, Bo Li, Duane Boning, and Cho-Jui Hsieh. Towards stable and efficient training of verifiably robust neural networks. arXiv preprint arXiv:1906.06316, 2019b. ",
1543
+ "bbox": [
1544
+ 174,
1545
+ 470,
1546
+ 826,
1547
+ 513
1548
+ ],
1549
+ "page_idx": 10
1550
+ },
1551
+ {
1552
+ "type": "text",
1553
+ "text": "A APPENDIX ",
1554
+ "text_level": 1,
1555
+ "bbox": [
1556
+ 176,
1557
+ 102,
1558
+ 297,
1559
+ 117
1560
+ ],
1561
+ "page_idx": 11
1562
+ },
1563
+ {
1564
+ "type": "text",
1565
+ "text": "A.1 EXPERIMENTAL SETTINGS AND NETWORK STRUCTURE ",
1566
+ "text_level": 1,
1567
+ "bbox": [
1568
+ 176,
1569
+ 133,
1570
+ 602,
1571
+ 148
1572
+ ],
1573
+ "page_idx": 11
1574
+ },
1575
+ {
1576
+ "type": "text",
1577
+ "text": "We evaluate the proposed certified patch defense on three neural networks: a multilayer perceptron (MLP) with one 255-neuron hidden layer, and two convolutional neural networks (CNN) with different depths. The small CNN has two convolutional layers (kernel size 4, stride 2) of 4 and 8 output channels each, and a fully connected layer with 256 neurons. The large CNN has four convolutional layers with kernel size (3, 4, 3, 4), stride (1, 2, 1, 2), output channels (4, 4, 8 ,8), and two fully connected layer with 256 neurons. We run experiments on two datasets, MNIST and CIFAR10, with two different patch sizes $2 \\times 2$ and $5 \\times 5$ . For all experiments, we are using Adam (Kingma & Ba, 2014) with a learning rate of $5 e - 4$ for MNIST and $1 e - 3$ for CIFAR10, and with no weight decay. We also adopt a warm-up schedule in all experiments like (Zhang et al., 2019b), where the input interval bounds start at zero and grow to [-1,1] after 61/121 epochs for MNIST/CIFAR10 respectively. We train the models for a total of 100/200 epochs for MNIST/CIFAR10, where in the first 61/121 epochs the learning rate is fixed and in the following epochs, we reduce the learning rate by one half every 10 epochs. ",
1578
+ "bbox": [
1579
+ 173,
1580
+ 160,
1581
+ 825,
1582
+ 340
1583
+ ],
1584
+ "page_idx": 11
1585
+ },
1586
+ {
1587
+ "type": "text",
1588
+ "text": "In addition, following (Gowal et al., 2018), we further evaluate the CIFAR10 on a larger model which has 5 convolutional layers with kernel size 3 and a fully connected layer with 512 neurons. This deeper and wider model achieves the clean accuracy around $8 9 \\%$ , and has 17M parameters in total. Table 8 in Appendix A.5 describes the full certified patch results for this large model. ",
1589
+ "bbox": [
1590
+ 174,
1591
+ 347,
1592
+ 825,
1593
+ 402
1594
+ ],
1595
+ "page_idx": 11
1596
+ },
1597
+ {
1598
+ "type": "text",
1599
+ "text": "A.2 SAMPLE SHAPES FOR GENERALIZATION EXPERIMENTS",
1600
+ "text_level": 1,
1601
+ "bbox": [
1602
+ 174,
1603
+ 421,
1604
+ 596,
1605
+ 434
1606
+ ],
1607
+ "page_idx": 11
1608
+ },
1609
+ {
1610
+ "type": "text",
1611
+ "text": "We demonstrate generalization to other patch shapes that were not considered in training, obtaining surprisingly good transfer in robust accuracy; see the figure below and the results in Table 5. ",
1612
+ "bbox": [
1613
+ 173,
1614
+ 445,
1615
+ 823,
1616
+ 474
1617
+ ],
1618
+ "page_idx": 11
1619
+ },
1620
+ {
1621
+ "type": "image",
1622
+ "img_path": "images/9f216bf62fce941917ea81757e0b262fd04bf16bd11424b98f95987ef90455cd.jpg",
1623
+ "image_caption": [
1624
+ "Figure 1: Examples of shapes with pixels number 4 and 25. From left to right are square, parallelogram, diamond and rectangle (line) respectively. "
1625
+ ],
1626
+ "image_footnote": [],
1627
+ "bbox": [
1628
+ 308,
1629
+ 497,
1630
+ 689,
1631
+ 775
1632
+ ],
1633
+ "page_idx": 11
1634
+ },
1635
+ {
1636
+ "type": "text",
1637
+ "text": "A.3 BOUND POOLING ",
1638
+ "text_level": 1,
1639
+ "bbox": [
1640
+ 176,
1641
+ 103,
1642
+ 338,
1643
+ 117
1644
+ ],
1645
+ "page_idx": 12
1646
+ },
1647
+ {
1648
+ "type": "text",
1649
+ "text": "Besides random-patch certificate training and guided-patch certificate training, we also experimented with the idea of bound pooling. All-patch training is very expensive as bounds generated by each potential patch has to be forward passed through the complete network. Bound pooling partially relieves the problem be pooling the interval bounds in intermediate layers thus reducing the forward pass in subsequent layers. ",
1650
+ "bbox": [
1651
+ 174,
1652
+ 128,
1653
+ 825,
1654
+ 199
1655
+ ],
1656
+ "page_idx": 12
1657
+ },
1658
+ {
1659
+ "type": "text",
1660
+ "text": "Specifically, given a set of patches $\\mathbb { P }$ , the interval bounds in the ith layer are $\\bar { Z } ^ { ( i ) } ( \\mathbb { P } ) = \\{ \\bar { z } ^ { ( i ) } ( p ) : p \\in$ $\\mathbb { P } \\}$ and $\\underline { { Z } } ^ { ( i ) } \\mathbb { P } = \\{ \\underline { { z } } ^ { ( i ) } ( p ) : p \\in \\mathbb { P } \\}$ . We can reduce the number of interval bounds by partitioning $\\mathbb { P }$ into $n$ subsets $\\{ \\mathbb { S } ^ { 1 } , . . . , \\mathbb { S } ^ { n } \\}$ and calculate a new set of bounds $\\begin{array} { r } { \\bar { Z } _ { p o o l } ^ { ( i ) } ( \\mathbb { P } ) = \\{ \\operatorname* { m a x } _ { p \\in \\mathbb { S } _ { i } } \\bar { z } ^ { ( i ) } ( p ) : i \\in [ n ] \\} } \\end{array}$ and Z(i) ( $\\begin{array} { r } { \\underline { { Z } } _ { p o o l } ^ { ( i ) } ( \\mathbb { P } ) = \\{ \\operatorname* { m i n } _ { p \\in \\mathbb { S } _ { i } } \\underline { { z } } ^ { ( i ) } ( p ) : i \\in [ n ] \\} } \\end{array}$ . Depending on how $\\mathbb { P }$ is partitioned, the bound pooling would work differently. In our experiments, we always select adjacent patches for each $\\mathbb { S } _ { i }$ with the assumption that adjacent patches tend to generate similar bounds thus resulting in tighter certificate. ",
1661
+ "bbox": [
1662
+ 173,
1663
+ 207,
1664
+ 825,
1665
+ 306
1666
+ ],
1667
+ "page_idx": 12
1668
+ },
1669
+ {
1670
+ "type": "text",
1671
+ "text": "Bound pooling, similar to random- and guided- patch training, trades performance for efficiency compared to all-patch certificate training. However, the trade off is not as favorable compared to random-patch and guided-patch training. For example, in Table 6, Pooling 16 $( 4 \\times 4 )$ patches in the first layer reduces training time by $3 5 \\%$ while loosing $0 . 7 \\%$ in performance (on MNIST $2 \\times 2$ ), but a similar level of performance can be achieved with guided-patch training with almost $90 \\%$ reduction in training time. The trade off becomes greater when the model becomes larger. Overall, bound pooling is still quite expensive, and cannot scale to larger models like random-patch or guided-patch training. ",
1672
+ "bbox": [
1673
+ 173,
1674
+ 311,
1675
+ 825,
1676
+ 424
1677
+ ],
1678
+ "page_idx": 12
1679
+ },
1680
+ {
1681
+ "type": "table",
1682
+ "img_path": "images/6cedc241deed68c58913df8996a321dcb92824b0a654c9ed4cb84781332740b1.jpg",
1683
+ "table_caption": [
1684
+ "Table 6: Comparing bound pooling with the guided-patch and random-patch training. Pool 4 means that the adjacent $4 \\times 4$ patches (16 patches) are pooled together in the first layer. Pool 2-2 means that the adjacent $2 \\times 2$ bounds are pooled together in the first layer and then another $2 \\times 2$ bound pooling happens at the second layer. This is similar to $4 \\times 4$ pooling except the pooling operation is distributed between the first and second layer. All experiments are performed on a 4-layer convolutional network. "
1685
+ ],
1686
+ "table_footnote": [],
1687
+ "table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>2×2</td><td rowspan=1 colspan=1>5×5</td></tr><tr><td rowspan=2 colspan=1>Dataset TrainingStrategy</td><td rowspan=1 colspan=1>Clean Certified Training</td><td rowspan=1 colspan=1>Clean Certified Training</td></tr><tr><td rowspan=1 colspan=1>Accuracy Accuracy Time(h)</td><td rowspan=1 colspan=1>Accuracy Accuracy Time(h)</td></tr><tr><td rowspan=1 colspan=1>MNIST All Patch</td><td rowspan=1 colspan=1>98.5% 91.6% 20.1</td><td rowspan=1 colspan=1>90.0% 59.7% 16.3</td></tr><tr><td rowspan=6 colspan=1>Pool 2Pool 4Random(1)Random(5)Random(10)Guided(10)</td><td rowspan=1 colspan=1>98.0% 91.1% 15.8</td><td rowspan=1 colspan=1>85.2% 54.2% 11.6</td></tr><tr><td rowspan=1 colspan=1>97.2% 89.9% 13.2</td><td rowspan=1 colspan=1>70.4% 38.3% 10.2</td></tr><tr><td rowspan=1 colspan=1>98.5% 81.9% 0.3</td><td rowspan=1 colspan=1>96.8% 24.8% 0.4</td></tr><tr><td rowspan=1 colspan=1>98.6% 86.5% 0.3</td><td rowspan=1 colspan=1>94.9% 42.0% 0.5</td></tr><tr><td rowspan=1 colspan=1>98.6% 87.5% 0.5</td><td rowspan=1 colspan=1>94.7% 50.4% 0.6</td></tr><tr><td rowspan=1 colspan=1>98.7% 88.9% 2.2</td><td rowspan=1 colspan=1>94.0% 53.2% 3.4</td></tr><tr><td rowspan=1 colspan=1>CIFAR All Patch</td><td rowspan=1 colspan=1>49.6% 41.6% 22.5</td><td rowspan=1 colspan=1>34.0% 25.0% 18.6</td></tr><tr><td rowspan=2 colspan=1>Pool 2Pool4</td><td rowspan=1 colspan=1>48.1% 39.4% 17.3</td><td rowspan=1 colspan=1>32.4% 24.2% 14.5</td></tr><tr><td rowspan=2 colspan=1>Pool4Pool 2-2</td><td rowspan=1 colspan=1>44.9% 37.1% 16.3</td><td rowspan=1 colspan=1>28.3% 20.6% 13.6</td></tr><tr><td rowspan=1 colspan=1>45.0% 37.4% 16.5</td><td rowspan=1 colspan=1>25.3% 19.1% 13.8</td></tr><tr><td rowspan=1 colspan=1>Random(1)</td><td rowspan=1 colspan=1>53.2% 32.4% 0.6</td><td rowspan=1 colspan=1>42.7% 11.0% 0.6</td></tr><tr><td rowspan=2 colspan=1>Random(5)Random(10)</td><td rowspan=1 colspan=1>52.2% 39.5% 0.9</td><td rowspan=1 colspan=1>37.8% 19.6% 0.9</td></tr><tr><td rowspan=1 colspan=1>50.8% 38.6% 1.0</td><td rowspan=1 colspan=1>38.4% 21.9% 1.0</td></tr><tr><td rowspan=1 colspan=1>Guided(10)</td><td rowspan=1 colspan=1>53.0% 39.8% 4.0</td><td rowspan=1 colspan=1>36.1% 23.0% 3.9</td></tr></table>",
1688
+ "bbox": [
1689
+ 173,
1690
+ 520,
1691
+ 828,
1692
+ 775
1693
+ ],
1694
+ "page_idx": 12
1695
+ },
1696
+ {
1697
+ "type": "text",
1698
+ "text": "A.4 MULTI-PATCH SPARSE TRAINING ",
1699
+ "text_level": 1,
1700
+ "bbox": [
1701
+ 176,
1702
+ 103,
1703
+ 449,
1704
+ 118
1705
+ ],
1706
+ "page_idx": 13
1707
+ },
1708
+ {
1709
+ "type": "text",
1710
+ "text": "Here we list the detailed certified accuracy for various sparsity levels and model architectures. ",
1711
+ "bbox": [
1712
+ 173,
1713
+ 130,
1714
+ 787,
1715
+ 145
1716
+ ],
1717
+ "page_idx": 13
1718
+ },
1719
+ {
1720
+ "type": "table",
1721
+ "img_path": "images/a4aaae91eba1ccdf0daccfb7c8539b3eb04cd6dcb4465a68c0780caebe05faae.jpg",
1722
+ "table_caption": [
1723
+ "Table 7: Certified accuracy for sparse defenses with varying sparsity $k$ and models on both MNIST and CIFAR10, where “Conv $c \\times c ^ { \\prime \\prime }$ represents for the convolutional network with first layer kernel size c. "
1724
+ ],
1725
+ "table_footnote": [],
1726
+ "table_body": "<table><tr><td>Dataset</td><td>Sparsity (k)</td><td>Model</td><td>Clean Accuracy</td><td>Certified Accuracy</td></tr><tr><td rowspan=\"4\">MNIST</td><td>1</td><td>mlp</td><td>98.4%</td><td>96.0%</td></tr><tr><td>4</td><td>mlp</td><td>97.8%</td><td>90.8%</td></tr><tr><td>10</td><td>mlp</td><td>95.2%</td><td>86.8%</td></tr><tr><td>1</td><td>Conv3x3</td><td>97.0%</td><td>88.3%</td></tr><tr><td rowspan=\"8\">CIFAR</td><td>4</td><td>Conv3x3</td><td>92.7%</td><td>75.9%</td></tr><tr><td>1</td><td>mlp</td><td>48.4%</td><td>40.0%</td></tr><tr><td>4</td><td>mlp</td><td>42.2%</td><td>31.2%</td></tr><tr><td>10</td><td>mlp</td><td>37.0%</td><td>25.6%</td></tr><tr><td>1</td><td>Conv11x11</td><td>34.8%</td><td>27.4%</td></tr><tr><td>4</td><td>Conv11x11</td><td>25.1%</td><td>18.3%</td></tr><tr><td>10</td><td>Conv11x11</td><td>17.2%</td><td>13.8%</td></tr><tr><td>1</td><td>Conv13x13</td><td>38.6%</td><td>29.7%</td></tr><tr><td></td><td>4</td><td>Conv13x13</td><td>28.1%</td><td>19.6%</td></tr><tr><td></td><td>10</td><td>Conv13x13</td><td>22.4%</td><td>15.3%</td></tr></table>",
1727
+ "bbox": [
1728
+ 232,
1729
+ 210,
1730
+ 764,
1731
+ 422
1732
+ ],
1733
+ "page_idx": 13
1734
+ },
1735
+ {
1736
+ "type": "text",
1737
+ "text": "A.5 TRAINING WITH LARGER MODELS ",
1738
+ "text_level": 1,
1739
+ "bbox": [
1740
+ 176,
1741
+ 454,
1742
+ 454,
1743
+ 469
1744
+ ],
1745
+ "page_idx": 13
1746
+ },
1747
+ {
1748
+ "type": "text",
1749
+ "text": "Recall that all-patch training considers all possible patches during training, which can be too expensive for larger models and/or images. The proposed random- and guided-patch training methods aim to reduce the training cost by considering only a subset of patches; please see Section 4.2 for more details. ",
1750
+ "bbox": [
1751
+ 174,
1752
+ 481,
1753
+ 825,
1754
+ 536
1755
+ ],
1756
+ "page_idx": 13
1757
+ },
1758
+ {
1759
+ "type": "table",
1760
+ "img_path": "images/42fc43caae4763d84f07dee1ef9d2252f3eb9def932e7d51cdf8bbff610d1244.jpg",
1761
+ "table_caption": [
1762
+ "Table 8: The random and guided training strategy could yield significantly stronger model compared to all-patch training given a fixed computational budget. The random and guided training strategy allows us to train a larger model that would be infeasible to train otherwise. The guided-patch large model is able to boost the certified accuracy by over $10 \\%$ compared to the best performing all-patch small model. "
1763
+ ],
1764
+ "table_footnote": [],
1765
+ "table_body": "<table><tr><td>Dataset</td><td>Patch Size</td><td>Training Strategy</td><td>Model</td><td>Clean Accuracy</td><td>Certified Accuracy</td><td>Training Time(h)</td></tr><tr><td rowspan=\"5\">CIFAR</td><td rowspan=\"5\">2×2</td><td>All Patch</td><td>mlp</td><td>50.8%</td><td>35.5%</td><td>9.1</td></tr><tr><td></td><td>2 layer conv</td><td>52.4%</td><td>42.6%</td><td>10.7</td></tr><tr><td></td><td> 4 layer conv</td><td>49.6%</td><td>41.6%</td><td>22.5</td></tr><tr><td></td><td>5 layer conv (wide)</td><td>1</td><td>-</td><td>~360.0</td></tr><tr><td>Random(10) Random(20)</td><td>5 layer conv (wide) 5 layer conv (wide)</td><td>64.7% 64.4%</td><td>49.0%</td><td>9.5</td></tr><tr><td rowspan=\"6\">CIFAR 5×5</td><td>Guided(10)</td><td>5 layer conv (wide)</td><td>66.5%</td><td>50.8% 49.2%</td><td></td><td>15.8 12.2</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Guided(20) All Patch</td><td>5 layer conv (wide)</td><td>65.8%</td><td>51.9%</td><td></td><td>22.4</td></tr><tr><td></td><td>mlp</td><td></td><td>31.1%</td><td>18.8%</td><td>7.1</td></tr><tr><td></td><td>2 layer conv</td><td>35.5%</td><td></td><td>22.3%</td><td>8.7</td></tr><tr><td></td><td></td><td>4 layer conv.</td><td>34.0%</td><td>25.0%</td><td></td><td>18.6</td></tr><tr><td></td><td></td><td></td><td>5 layer conv (wide)</td><td>1</td><td>、</td><td>~360.0</td></tr><tr><td></td><td></td><td>Random(10) Random(20)</td><td>5 layer conv (wide)</td><td>48.6%</td><td>29.9%</td><td>9.4</td></tr><tr><td></td><td></td><td></td><td>5 layer conv (wide)</td><td>47.8%</td><td>30.3%</td><td>15.4</td></tr><tr><td></td><td>Guided(10)</td><td>5 layer conv (wide)</td><td></td><td>48.4%</td><td>29.0%</td><td>12.4</td></tr><tr><td></td><td></td><td>Guided(20)</td><td>5 layer conv (wide)</td><td>47.6%</td><td>29.6%</td><td>23.8</td></tr></table>",
1766
+ "bbox": [
1767
+ 178,
1768
+ 630,
1769
+ 820,
1770
+ 882
1771
+ ],
1772
+ "page_idx": 13
1773
+ },
1774
+ {
1775
+ "type": "text",
1776
+ "text": "A.6 DETAILED STATISTICS ON TRAINING STRATEGIES ",
1777
+ "text_level": 1,
1778
+ "bbox": [
1779
+ 174,
1780
+ 103,
1781
+ 565,
1782
+ 118
1783
+ ],
1784
+ "page_idx": 14
1785
+ },
1786
+ {
1787
+ "type": "text",
1788
+ "text": "Here we list the detailed statistics for each training strategies for Table 3 ",
1789
+ "bbox": [
1790
+ 173,
1791
+ 128,
1792
+ 647,
1793
+ 145
1794
+ ],
1795
+ "page_idx": 14
1796
+ },
1797
+ {
1798
+ "type": "table",
1799
+ "img_path": "images/fc04836ff4526e02b899ef602f30c5f44a6e919fce529c81f7427fcc1fb2231a.jpg",
1800
+ "table_caption": [
1801
+ "Table 9: Detailed statistics for the comparison of training strategies - $2 \\times 2$ "
1802
+ ],
1803
+ "table_footnote": [],
1804
+ "table_body": "<table><tr><td>Dataset</td><td>Training Strategies</td><td>Model Architecture</td><td>Clean Accuracy</td><td>Certified Accuracy</td><td>Training Time</td></tr><tr><td>MNIST</td><td>All Patch</td><td>2 layer convolution</td><td>98.63/%</td><td>91.38%</td><td>21.0</td></tr><tr><td rowspan=\"10\"></td><td rowspan=\"4\">Random (1)</td><td>4 layer convolution</td><td>98.48%</td><td>91.63%</td><td>80.3</td></tr><tr><td>fully connected (255,10)</td><td>98.46%</td><td>91.47%</td><td>9.8</td></tr><tr><td>2 layer convolution</td><td>98.69%</td><td>82.57%</td><td>0.2</td></tr><tr><td>4 layer convolution</td><td>98.45%</td><td>81.87%</td><td>0.3</td></tr><tr><td rowspan=\"3\">Random (5)</td><td>fully connected (255,10)</td><td>98.48%</td><td>84.32%</td><td>0.2</td></tr><tr><td>2 layer convolution</td><td>98.75%</td><td>85.87%</td><td>0.3</td></tr><tr><td>4 layer convolution</td><td>98.57%</td><td>86.50%</td><td>0.3</td></tr><tr><td rowspan=\"3\">Random (10)</td><td>fully connected (255,10)</td><td>98.62%</td><td>87.32%</td><td>0.2</td></tr><tr><td>2 layer convolution</td><td>98.73%</td><td>87.31%</td><td>0.3</td></tr><tr><td>4 layer convolution</td><td>98.63%</td><td>87.54%</td><td>0.5</td></tr><tr><td rowspan=\"3\">Guided (10)</td><td>fully connected (255,10)</td><td>98.49%</td><td>88.13%</td><td>0.2</td></tr><tr><td>2 layer convolution</td><td>98.60%</td><td>88.49%</td><td>2.3</td></tr><tr><td>4 layer convolution</td><td>98.70%</td><td>88.85%</td><td>2.2</td></tr><tr><td rowspan=\"3\">CIFAR All Patch</td><td>fully connected (255,10)</td><td>98.63%</td><td>89.44%</td><td>2.2</td></tr><tr><td>2 layer convolution</td><td>52.42%</td><td>42.57%</td><td>42.6</td></tr><tr><td>4 layer convolution</td><td>49.58%</td><td>41.57%</td><td>89.8</td></tr><tr><td rowspan=\"3\">Random (1)</td><td>fully connected (255,10)</td><td>50.83%</td><td>35.49%</td><td>36.6</td></tr><tr><td>2 layer convolution</td><td>54.93%</td><td>29.13%</td><td>0.6</td></tr><tr><td>4 layer convolution</td><td>53.22%</td><td>32.35%</td><td>0.6</td></tr><tr><td rowspan=\"3\">Random (5)</td><td>fully connected (255,10)</td><td>52.76%</td><td>03.21%</td><td>0.5</td></tr><tr><td>2 layer convolution</td><td>54.15%</td><td>37.30%</td><td>0.6</td></tr><tr><td>4 layer convolution</td><td>52.19%</td><td>39.45%</td><td>0.9</td></tr><tr><td rowspan=\"3\">Random (10)</td><td>fully connected (255,10)</td><td>52.38%</td><td>20.17%</td><td>0.6</td></tr><tr><td>2 layer convolution</td><td>53.08%</td><td>39.32%</td><td>0.7</td></tr><tr><td>4 layer convolution</td><td>50.80%</td><td>38.57%</td><td>1.0</td></tr><tr><td rowspan=\"4\">Guided (10)</td><td>fully connected (255,10)</td><td>51.90%</td><td>28.97%</td><td>0.6</td></tr><tr><td>2 layer convolution</td><td>53.04%</td><td>38.81%</td><td>3.7</td></tr><tr><td>4 layer convolution</td><td>52.97%</td><td>39.84%</td><td>4.0</td></tr><tr><td>fully connected (255,10)</td><td>51.32%</td><td>29.44%</td><td>3.6</td></tr></table>",
1805
+ "bbox": [
1806
+ 181,
1807
+ 152,
1808
+ 825,
1809
+ 603
1810
+ ],
1811
+ "page_idx": 14
1812
+ },
1813
+ {
1814
+ "type": "table",
1815
+ "img_path": "images/968fcf41618a93d42b437f4d935589049dd9f94c63cb8390f1d702d87b6949c2.jpg",
1816
+ "table_caption": [
1817
+ "Table 10: Detailed statistics for the comparison of training strategies - $5 \\times 5$ "
1818
+ ],
1819
+ "table_footnote": [],
1820
+ "table_body": "<table><tr><td>Dataset</td><td>Training Strategies</td><td>Model Architecture</td><td>Clean Accuracy</td><td>Certified Accuracy</td><td>Training Time</td></tr><tr><td>MNIST</td><td>All Patch</td><td>2 layer convolution</td><td>91.88%</td><td>59.59%</td><td>28.4</td></tr><tr><td rowspan=\"10\"></td><td></td><td>4 layer convolution</td><td>90.03%</td><td>59.72%</td><td>65.2</td></tr><tr><td>Random (1)</td><td>fully connected (255,10)</td><td>93.96%</td><td>61.97%</td><td>7.2</td></tr><tr><td></td><td>2 layer convolution</td><td>96.27%</td><td>18.57%</td><td>0.2</td></tr><tr><td></td><td>4 layer convolution</td><td>96.83%</td><td>24.79%</td><td>0.4</td></tr><tr><td>Random (5)</td><td>fully connected (255,10)</td><td>97.60%</td><td>29.04%</td><td>0.2</td></tr><tr><td></td><td>2 layer convolution</td><td>95.82%</td><td>38.47%</td><td>0.2</td></tr><tr><td></td><td>4 layer convolution</td><td>94.85%</td><td>42.02%</td><td>0.5</td></tr><tr><td>Random (10)</td><td>fully connected (255,10)</td><td>96.73%</td><td>45.89%</td><td>0.2</td></tr><tr><td></td><td>2 layer convolution</td><td>95.55%</td><td>46.13%</td><td>0.3</td></tr><tr><td></td><td>4 layer convolution fully connected (255,10)</td><td>94.76% 96.40%</td><td>50.43% 52.30%</td><td>0.6</td></tr><tr><td>Guided (10)</td><td>2 layer convolution</td><td>95.28%</td><td>50.28%</td><td>0.2 2.3</td></tr><tr><td rowspan=\"3\"></td><td></td><td>93.98%</td><td>53.17%</td><td>3.4</td></tr><tr><td>4 layer convolution</td><td>95.82%</td><td>55.89%</td><td>2.2</td></tr><tr><td>fully connected (255,10)</td><td>35.48%</td><td></td><td></td></tr><tr><td rowspan=\"3\">CIFAR All Patch Random (1)</td><td>2 layer convolution</td><td>33.95%</td><td>22.31% 24.96%</td><td>34.8</td></tr><tr><td>4 layer convolution fully connected (255,10)</td><td>31.05%</td><td>18.78%</td><td>74.4 28.4</td></tr><tr><td></td><td>45.71%</td><td>07.14%</td><td>0.6</td></tr><tr><td rowspan=\"3\"></td><td>2 layer convolution</td><td>42.65%</td><td>10.99%</td><td></td></tr><tr><td>4 layer convolution</td><td>42.34%</td><td></td><td>0.6</td></tr><tr><td>fully connected (255,10)</td><td></td><td>00.10%</td><td>0.5</td></tr><tr><td rowspan=\"3\">Random (5)</td><td>2 layer convolution</td><td>42.85%</td><td>17.29%</td><td>0.6</td></tr><tr><td>4 layer convolution</td><td>37.80%</td><td>19.63%</td><td>0.9</td></tr><tr><td>fully connected (255,10)</td><td>36.23%</td><td>06.99%</td><td>0.6</td></tr><tr><td rowspan=\"4\">Random (10)</td><td>2 layer convolution</td><td>41.90%</td><td>21.40%</td><td>0.7</td></tr><tr><td>4 layer convolution</td><td>38.41%</td><td>21.90%</td><td>1.0</td></tr><tr><td>fully connected (255,10) Guided (10)</td><td>36.04%</td><td>12.46%</td><td>0.6</td></tr><tr><td>2 layer convolution</td><td>42.08%</td><td>20.77%</td><td>3.6</td></tr><tr><td></td><td>4 layer convolution fully connected (255,10)</td><td>36.08% 35.51%</td><td>23.01% 12.56%</td><td>3.9 3.5</td></tr></table>",
1821
+ "bbox": [
1822
+ 181,
1823
+ 98,
1824
+ 823,
1825
+ 546
1826
+ ],
1827
+ "page_idx": 15
1828
+ }
1829
+ ]
parse/train/HyeaSkrYPH/HyeaSkrYPH_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HyeaSkrYPH/HyeaSkrYPH_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hyg96gBKPS/Hyg96gBKPS.md ADDED
@@ -0,0 +1,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MONOTONIC MULTIHEAD ATTENTION
2
+
3
+ Xutai $\mathbf { M } \mathbf { a } ^ { 2 }$ ∗, Juan Pino1, James Cross1, Liezl Puzon1, Jiatao $\mathbf { G u } ^ { 1 }$
4
+
5
+ 1Facebook
6
+ 2Johns Hopkins University
7
+
8
+ xutai ma@jhu.edu, puzon@cs.stanford.edu {juancarabina,jcross,jgu}@fb.com
9
+
10
+ # ABSTRACT
11
+
12
+ Simultaneous machine translation models start generating a target sequence before they have encoded the source sequence. Recent approaches for this task either apply a fixed policy on a state-of-the art Transformer model, or a learnable monotonic attention on a weaker recurrent neural network-based structure. In this paper, we propose a new attention mechanism, Monotonic Multihead Attention (MMA), which extends the monotonic attention mechanism to multihead attention. We also introduce two novel and interpretable approaches for latency control that are specifically designed for multiple attention heads. We apply MMA to the simultaneous machine translation task and demonstrate better latency-quality tradeoffs compared to MILk, the previous state-of-the-art approach. We analyze how the latency controls affect the attention span and we study the relationship between the speed of a head and the layer it belongs to. Finally, we motivate the introduction of our model by analyzing the effect of the number of decoder layers and heads on quality and latency.1
13
+
14
+ # 1 INTRODUCTION
15
+
16
+ Simultaneous machine translation adds the capability of a live interpreter to machine translation: a simultaneous model starts generating a translation before it has finished reading the entire source sentence. Such models are useful in any situation where translation needs to be done in real time. For example, simultaneous models can translate live video captions or facilitate conversations between people speaking different languages. In a usual translation model, the encoder first reads the entire sentence, then the decoder writes the target sentence. On the other hand, a simultaneous neural machine translation model alternates between reading the input and writing the output using either a fixed or learned policy.
17
+
18
+ Monotonic attention mechanisms fall into the flexible policy category, in which the policies are automatically learned from data. Recent work exploring monotonic attention variants for simultaneous translation include: hard monotonic attention (Raffel et al., 2017), monotonic chunkwise attention (MoChA) (Chiu & Raffel, 2018) and monotonic infinite lookback attention (MILk) (Arivazhagan et al., 2019). MILk in particular has shown better quality/latency trade-offs than fixed policy approaches, such as wait- $k$ (Ma et al., 2019) or wait-if-\* (Cho & Esipova, 2016) policies. MILk also outperforms hard monotonic attention and MoChA; while the other two monotonic attention mechanisms only consider a fixed window, MILk computes a softmax attention over all previous encoder states, which may be the key to its improved latency-quality tradeoffs. These monotonic attention approaches also provide a closed-form expression for the expected alignment between source and target tokens.
19
+
20
+ However, monotonic attention-based models, including the state-of-the-art MILk, were built on top of RNN-based models. RNN-based models have been outperformed by the recent state-of-the-art Transformer model (Vaswani et al., 2017), which features multiple encoder-decoder attention layers and multihead attention at each layer.
21
+
22
+ We thus propose monotonic multihead attention (MMA), which combines the high translation quality from multilayer multihead attention and low latency from monotonic attention. We propose two variants, Hard MMA (MMA-H) and Infinite Lookback MMA (MMA-IL). MMA-H is designed with streaming systems in mind where the attention span must be limited. MMA-IL emphasizes the quality of the translation system. We also propose two novel latency regularization methods. The first encourages the model to be faster by directly minimizing the average latency. The second encourages the attention heads to maintain similar positions, preventing the latency from being dominated by a single or a few heads.
23
+
24
+ The main contributions of this paper are: (1) A novel monotonic attention mechanism, monotonic multihead attention, which enables the Transformer model to perform online decoding. This model leverages the power of the Transformer and the efficiency of monotonic attention. (2) Better latency/quality tradeoffs compared to the MILk model, the previous state-of-the-art, on two standard translation benchmarks, IWSLT15 English-Vietnamese (En-Vi) and WMT15 German-English (DeEn). (3) Analyses on how our model is able to control the attention span and on the relationship between the speed of a head and the layer it belongs to. We motivate the design of our model with an ablation study on the number of decoder layers and the number of decoder heads.
25
+
26
+ # 2 MONOTONIC MULTIHEAD ATTENTION MODEL
27
+
28
+ In this section, we review the monotonic attention-based approaches in RNN-based encoder-decoder models. We then introduce the two types of Monotonic Multihead Attention (MMA) for Transformer models: MMA-H and MMA-IL. Finally, we introduce strategies to control latency and coverage.
29
+
30
+ # 2.1 MONOTONIC ATTENTION
31
+
32
+ The hard monotonic attention mechanism (Raffel et al., 2017) was first introduced in order to achieve online linear time decoding for RNN-based encoder-decoder models. We denote the input sequence as $\mathbf { x } = \{ x _ { 1 } , . . . , x _ { T } \}$ , and the corresponding encoder states as $\mathbf { m } = \{ m _ { 1 } , . . . , m _ { T } \}$ , with $T$ being the length of the source sequence. The model generates a target sequence $\mathbf { y } = \{ y _ { 1 } , . . . , y _ { U } \}$ with $U$ being the length of the target sequence. At the $i$ -th decoding step, the decoder only attends to one encoder state $m _ { t _ { i } }$ with $t _ { i } = j$ . When generating a new target token $y _ { i }$ , the decoder chooses whether to move one step forward or to stay at the current position based on a Bernoulli selection probability $p _ { i , j }$ , so that $t _ { i } \ \geq \ t _ { i - 1 }$ . Denoting the decoder state at the $i$ -th position, starting from $j = t _ { i - 1 } , t _ { i - 1 } + 1 , t _ { i - 1 } + 2 , . . . _ $ , this process can be calculated as follows: 2
33
+
34
+ $$
35
+ \begin{array} { l c l } { e _ { i , j } } & { = } & { \mathrm { M o n o t o n i c E n e r g y } ( s _ { i - 1 } , m _ { j } ) } \\ { p _ { i , j } } & { = } & { \mathrm { S i g m o i d } \left( e _ { i , j } \right) } \\ { z _ { i , j } } & { \sim } & { \mathrm { B e r n o u l l i } ( p _ { i , j } ) } \end{array}
36
+ $$
37
+
38
+ When $z _ { i , j } = 1$ , we set $t _ { i } = j$ and start generating a target token $y _ { i }$ ; otherwise, we set $t _ { i } = j + 1$ and repeat the process. During training, an expected alignment $_ { \pmb { \alpha } }$ is introduced to replace the softmax attention. It can be calculated in a recurrent manner, shown in Equation 4:
39
+
40
+ $$
41
+ \begin{array} { l } { \displaystyle \alpha _ { i , j } = p _ { i , j } \sum _ { k = 1 } ^ { j } \left( \alpha _ { i - 1 , k } \prod _ { l = k } ^ { j - 1 } \left( 1 - p _ { i , l } \right) \right) } \\ { \displaystyle = p _ { i , j } \left( \left( 1 - p _ { i , j - 1 } \right) \frac { \alpha _ { i , j - 1 } } { p _ { i , j - 1 } } + \alpha _ { i - 1 , j } \right) } \end{array}
42
+ $$
43
+
44
+ Raffel et al. (2017) also introduce a closed-form parallel solution for the recurrence relation in Equation 5:
45
+
46
+ $$
47
+ \alpha _ { i , : } = p _ { i , : } \mathrm { c u m p r o d } ( 1 - p _ { i , : } ) \mathrm { c u m s u m } \left( \frac { \alpha _ { i - 1 , : } } { \mathrm { c u m p r o d } ( 1 - p _ { i , : } ) } \right)
48
+ $$
49
+
50
+ where $\begin{array} { r } { \mathtt { c u m p r o d } ( x ) = [ 1 , x _ { 1 } , x _ { 1 } x _ { 2 } , . . . , \prod _ { i = 1 } ^ { | x | - 1 } x _ { i } ] } \end{array}$ and $\mathsf { c u m s u m } ( { \pmb x } ) = [ x _ { 1 } , x _ { 1 } + x _ { 2 } , . . . , \sum _ { i = 1 } ^ { | { \pmb x } | } x _ { i } ]$ In practice, the denominator in Equation 5 is clamped into a range of [, 1] to avoid numerical instabilities introduced by cumprod. Although this monotonic attention mechanism achieves online linear time decoding, the decoder can only attend to one encoder state. This limitation can diminish translation quality as there may be insufficient information for reordering.
51
+
52
+ Moreover, the model lacks a mechanism to adjust latency based on different requirements at decoding time. To address these issues, Chiu & Raffel (2018) introduce Monotonic Chunkwise Attention (MoChA), which allows the decoder to apply softmax attention to a fixed-length subsequence of encoder states. Alternatively, Arivazhagan et al. (2019) introduce Monotonic Infinite Lookback Attention (MILk) which allows the decoder to access encoder states from the beginning of the source sequence. The expected attention for the MILk model is defined in Equation 6.
53
+
54
+ $$
55
+ \beta _ { i , j } = \sum _ { k = j } ^ { | x | } \left( \frac { \alpha _ { i , k } \exp ( u _ { i , j } ) } { \sum _ { l = 1 } ^ { k } \exp ( u _ { i , l } ) } \right)
56
+ $$
57
+
58
+ # 2.2 MONOTONIC MULTIHEAD ATTENTION
59
+
60
+ Previous monotonic attention approaches are based on RNN encoder-decoder models with a single attention and haven’t explored the power of the Transformer model. 3 The Transformer architecture (Vaswani et al., 2017) has recently become the state-of-the-art for machine translation (Barrault et al., 2019). An important feature of the Transformer is the use of a separate multihead attention module at each layer. Thus, we propose a new approach, Monotonic Multihead Attention (MMA), which combines the expressive power of multihead attention and the low latency of monotonic attention.
61
+
62
+ Multihead attention allows each decoder layer to have multiple heads, where each head can compute a different attention distribution. Given queries $Q$ , keys $K$ and values $V$ , multihead attention MultiHead $( Q , K , V )$ is defined in Equation 7.
63
+
64
+ $$
65
+ \begin{array} { r } { \begin{array} { l } { \mathrm { M u l t i H e a d } ( Q , K , V ) = \mathrm { C o n c a t } ( \mathrm { h e a d } _ { 1 } , . . . , \mathrm { h e a d } _ { H } ) W ^ { O } } \\ { \mathrm { w h e r e ~ h e a d } _ { h } = \mathrm { A t t e n t i o n } \left( Q W _ { h } ^ { Q } , K W _ { h } ^ { K } , V W _ { h } ^ { V } , \right) } \end{array} } \end{array}
66
+ $$
67
+
68
+ The attention function is the scaled dot-product attention, defined in Equation 8:
69
+
70
+ $$
71
+ { \mathrm { A t t e n t i o n } } ( Q , K , V ) = { \mathrm { S o f t m a x } } \left( { \frac { Q K ^ { T } } { \sqrt { d _ { k } } } } \right) V
72
+ $$
73
+
74
+ There are three applications of multihead attention in the Transformer model:
75
+
76
+ 1. The Encoder contains self-attention layers where all of the queries, keys and values come from previous layers.
77
+ 2. The Decoder contains self-attention layers that allow each position in the decoder to attend to all positions in the decoder up to and including that position.
78
+ 3. The Encoder-Decoder attention contains multihead attention layers where queries come from the previous decoder layer and the keys and values come from the output of the encoder. Every decoder layer has a separate encoder-decoder attention.
79
+
80
+ For MMA, we assign each head to operate as a separate monotonic attention in encoder-decoder attention.
81
+
82
+ For a transformer with $L$ decoder layers and $H$ attention heads per layer, we define the selection process of the $h$ -th head encoder-decoder attention in the $l$ -th decoder layer as
83
+
84
+ $$
85
+ \begin{array} { l c l } { e _ { i , j } ^ { { l , h } } } & { = } & { \left( \frac { m _ { j } W _ { { l , h } } ^ { K } ( s _ { i - 1 } W _ { { l , h } } ^ { Q } ) ^ { T } } { \sqrt { d _ { k } } } \right) _ { i , j } } \\ { p _ { i , j } ^ { { l , h } } } & { = } & { \mathrm { S i g m o i d } ( e _ { i , j } ) } \\ { z _ { i , j } ^ { { l , h } } } & { \sim } & { \mathrm { B e r n o u l l i } ( p _ { i , j } ) } \end{array}
86
+ $$
87
+
88
+ ![](images/d597335b4efb8a0b81899a74e4bee9cd4514669123bca34eef86fbf7c1b7c310.jpg)
89
+ Figure 1: Monotonic Attention (Left) versus Monotonic Multihead Attention (Right).
90
+
91
+ where $W _ { l , h }$ is the input projection matrix, $d _ { k }$ is the dimension of the attention head. We make the selection process independent for each head in each layer. We then investigate two types of MMA, MMA-H(ard) and MMA-IL(infinite lookback). For MMA-H, we use Equation 4 in order to calculate the expected alignment for each layer each head, given $p _ { i , j } ^ { l , h }$ . For MMA-IL, we calculate the softmax energy for each head as follows:
92
+
93
+ $$
94
+ u _ { i , j } ^ { l , h } = \mathrm { S o f t E n e r g y } = \left( \frac { m _ { j } \hat { W } _ { l , h } ^ { K } ( s _ { i - 1 } \hat { W } _ { l , h } ^ { Q } ) ^ { T } } { \sqrt { d _ { k } } } \right) _ { i , j }
95
+ $$
96
+
97
+ and then use Equation 6 to calculate the expected attention. Each attention head in MMA-H hardattends to one encoder state. On the other hand, each attention head in MMA-IL can attend to all previous encoder states. Thus, MMA-IL allows the model to leverage more information for translation, but MMA-H may be better suited for streaming systems with stricter efficiency requirements. Finally, our models use unidirectional encoders: the encoder self-attention can only attend to previous states, which is also required for simultaneous translation.
98
+
99
+ At inference time, our decoding strategy is shown in Algorithm 1. For each $l , h$ , at decoding step $i$ , we apply the sampling processes discussed in subsection 2.1 individually and set the encoder step at $t _ { i } ^ { l , \bar { h } }$ . Then a hard alignment or partial softmax attention from encoder states, shown in Equation 13, will be retrieved to feed into the decoder to generate the $i$ -th token. The model will write a new target token only after all the attentions have decided to write. In other words, the heads that have decided to write must wait until the others have finished reading.
100
+
101
+ $$
102
+ \begin{array}{c} \begin{array} { r l } & { \qquad c _ { i } ^ { l } = \mathrm { C o n c a t } ( c _ { i } ^ { l , 1 } , c _ { i } ^ { l , 2 } , . . . , c _ { i } ^ { l , H } ) } \\ & { \qquad \mathrm \quad \mathbf { \ " } } \\ & { \qquad \mathbf { \ " } \mathbf { \ " } e _ { i } ^ { l , h } = f _ { \mathrm { c o n t e x t } } ( \boldsymbol { h } , t _ { i } ^ { l , h } ) = \displaystyle \left\{ \sum _ { j = 1 } ^ { m _ { t _ { i } ^ { l , h } } } \frac { \mathrm { e x p } \left( u _ { i , j } ^ { l , h } \right) } { \sum _ { j = 1 } ^ { t _ { i } ^ { l , h } } \mathrm { e x p } \left( u _ { i , j } ^ { l , h } \right) } m _ { j } \quad \mathrm { M M A \mathrm { - } I L } \right.} \end{array} \end{array}
103
+ $$
104
+
105
+ Figure 1 illustrates a comparison between our model and the monotonic model with one attention head. Compared with the monotonic model, the MMA model is able to set attention to different positions so that it can still attend to previous states while reading each new token. Each head can adjust its speed on-the-fly. Some heads read new inputs, while the others can stay in the past to retain the source history information. Even with the hard alignment variant (MMA-H), the model is still able to preserve the history information by setting heads to past states. In contrast, the hard monotonic model, which only has one head, loses the previous information at the attention layer.
106
+
107
+ # 2.3 LATENCY CONTROL
108
+
109
+ Effective simultaneous machine translation must balance quality and latency. At a high level, latency measures how many source tokens the model has read until a translation is generated. The model we have introduced in subsection 2.2 is not able to control latency on its own. While MMA allows simultaneous translation by having a read or write schedule for each head, the overall latency is determined by the fastest head, i.e. the head that reads the most. It is possible that a head always reads new input without producing output, which would result in the maximum possible latency. Note that the attention behaviors in MMA-H and MMA-IL can be different. In MMA-IL, a head reaching the end of the sentence will provide the model with maximum information about the source sentence. On the other hand, in the case of MMA-H, reaching the end of sentence for a head only
110
+
111
+ Algorithm 1 MMA monotonic decoding. Because each head is independent, we compute line 3 to 16 in parallel
112
+
113
+ Input: ${ \bf { \delta } } _ { \bf { \mathcal { X } } } =$ source tokens, $h =$ encoder states, $i = 1 , j = 1 , t _ { 0 } ^ { l , h } = 1 , y _ { 0 } =$ StartOfSequence.
114
+
115
+ <table><tr><td colspan="3">1:while yi-1 ≠ EndOfSequence do</td></tr><tr><td>2:</td><td>tmax =1</td><td></td></tr><tr><td>3:</td><td>h = empty sequence</td><td></td></tr><tr><td>4:</td><td>forl←1toLdo</td><td></td></tr><tr><td>5:</td><td>forh←1to Hdo</td><td></td></tr><tr><td>6:</td><td>forj←ttoacldo</td><td></td></tr><tr><td>7:</td><td>l,h Pi,j, = Sigmoid (MonotonicEnergy(Si-1,mj ))</td><td></td></tr><tr><td>8:</td><td>ifpi l,h &gt; 0.5 then</td><td></td></tr><tr><td>9:</td><td>=j</td><td></td></tr><tr><td>10:</td><td>l,h =fcontext(h,t,h)</td><td></td></tr><tr><td>11:</td><td>Ci Break</td><td></td></tr><tr><td>12:</td><td>else</td><td></td></tr><tr><td>13:</td><td>if j&gt;tmax then</td><td></td></tr><tr><td>14:</td><td>Read token x j</td><td></td></tr><tr><td>15:</td><td></td><td>Calculate state h j and append to h</td></tr><tr><td>16:</td><td>tmax =j</td><td></td></tr><tr><td>17:</td><td>c = Concat(c,1,</td><td>,cH)</td></tr><tr><td>18:</td><td>s =DecoderLayer&#x27;(s-1,s)</td><td></td></tr><tr><td>19:</td><td>yi = Output(s)</td><td></td></tr><tr><td>20:</td><td></td><td></td></tr></table>
116
+
117
+ gives a hard alignment to the end-of-sentence token, which provides very little information to the decoder. Furthermore, it is possible that an MMA-H attention head stays at the beginning of sentence without moving forward. Such a head would not cause latency issues but would degrade the model quality since the decoder would not have any information about the input. In addition, this behavior is not suited for streaming systems.
118
+
119
+ To address these issues, we introduce two latency control methods. The first one is weighted average latency, shown in Equation 14:
120
+
121
+ $$
122
+ g _ { i } ^ { W } = \frac { \exp ( g _ { i } ^ { l , h } ) } { \sum _ { l = 1 } ^ { L } \sum _ { h = 1 } ^ { H } \exp ( g _ { i } ^ { l , h } ) } g _ { i } ^ { l , h }
123
+ $$
124
+
125
+ where $\begin{array} { r } { g _ { i } ^ { l , h } = \sum _ { j = 1 } ^ { | x | } j \alpha _ { i , j } } \end{array}$ . Then we calculate the latency loss with a differentiable latency metric $\mathcal { C }$
126
+
127
+ $$
128
+ \begin{array} { r c l } { { L _ { a v g } } } & { { = } } & { { { \mathcal { C } } \left( g ^ { W } \right) } } \end{array}
129
+ $$
130
+
131
+ Like Arivazhagan et al. (2019), we use the Differentiable Average Lagging. It is important to note that, unlike the original latency augmented training in Arivazhagan et al. (2019), Equation 15 is not the expected latency metric given $\mathcal { C }$ , but weighted average $\mathcal { C }$ on all the attentions. The real expected latency is $\hat { \pmb g } = \mathrm { m a x } _ { l , h } \left( \pmb g ^ { l , h } \right)$ instead of $\bar { \pmb { g } }$ , but using this directly would only affect the speed of the fastest head. Equation 15 can control every head in a way that the faster heads will be automatically assigned to larger weights and slower heads will also be moderately regularized. For MMA-H models, we found that the latency of are mainly due to outliers that skip almost every token. The weighted average latency loss is not sufficient to control the outliers. We therefore introduce the head divergence loss, the average variance of expected delays at each step, defined in Equation 16:
132
+
133
+ $$
134
+ \begin{array} { c c l } { { { \cal L } _ { v a r } } } & { { = } } & { { \displaystyle \frac { 1 } { L H } \sum _ { l = 1 } ^ { L } \sum _ { h = 1 } ^ { H } \left( g _ { i } ^ { l , h } - \bar { g } _ { i } \right) ^ { 2 } } } \end{array}
135
+ $$
136
+
137
+ where $\begin{array} { r } { \bar { g _ { i } } = \frac { 1 } { L H } \sum g _ { i } } \end{array}$ The final objective function is presented in Equation 17:
138
+
139
+ $$
140
+ L ( \theta ) = - \log ( \pmb { y } \mid \pmb { x } ; \theta ) + \lambda _ { a v g } L _ { a v g } + \lambda _ { v a r } L _ { v a r }
141
+ $$
142
+
143
+ where $\lambda _ { a v g } , \lambda _ { v a r }$ are hyperparameters that control both losses. Intuitively, while $\lambda _ { a v g }$ controls the overall speed, $\lambda _ { v a r }$ controls the divergence of the heads. Combining these two losses, we are able to dynamically control the range of attention heads so that we can control the latency and the reading buffer. For MMA-IL model, we only use $L _ { a v g }$ ; for MMA-H we only use $L _ { v a r }$ .
144
+
145
+ # 3 EXPERIMENTAL SETUP
146
+
147
+ # 3.1 EVALUATION METRICS
148
+
149
+ We evaluate our model using quality and latency. For translation quality, we use tokenized BLEU 4 for IWSLT15 En-Vi and detokenized BLEU with SacreBLEU (Post, 2018) for WMT15 De-En. For latency, we use three different recent metrics, Average Proportion (AP) (Cho & Esipova, 2016), Average Lagging (AL) (Ma et al., 2019) and Differentiable Average Lagging (DAL) (Arivazhagan et al., 2019) 5. We remind the reader of the metric definitions in Appendix A.2.
150
+
151
+ # 3.2 DATASETS
152
+
153
+ Table 1: Number of sentences in each split.
154
+
155
+ <table><tr><td>Dataset</td><td>Train</td><td>Validation</td><td>Test</td></tr><tr><td>IWSLT15 En-Vi</td><td>133k</td><td>1268</td><td>1553</td></tr><tr><td>WMT15 De-En</td><td>4.5M</td><td>3000</td><td>2169</td></tr></table>
156
+
157
+ Table 2: Offline model performance with unidirectional encoder and greedy decoding.
158
+
159
+ <table><tr><td>Dataset</td><td>RNN</td><td>Transformer</td></tr><tr><td>IWSLT15 En-Vi</td><td>25.66</td><td>28.7</td></tr><tr><td>WMT15 De-En</td><td>28.4 (Arivazhagan et al., 2019)</td><td>32.3</td></tr></table>
160
+
161
+ <table><tr><td>Dataset</td><td>Beam Search</td><td>Bidirectional Encoder</td><td>Unidirectional Encoder</td></tr><tr><td rowspan="2">WMT15 De-En</td><td>1</td><td>32.6</td><td>32.3</td></tr><tr><td>4</td><td>33.0</td><td>33.0</td></tr><tr><td rowspan="2">IWSLT15 En-Vi</td><td>1</td><td>28.7</td><td>29.4</td></tr><tr><td>10</td><td>28.8</td><td>29.5</td></tr></table>
162
+
163
+ Table 3: Effect of using a unidirectional encoder and greedy decoding to BLEU score.
164
+
165
+ We evaluate our method on two standard machine translation datasets, IWSLT14 En-Vi and WMT15 De-En. Statistics of the datasets can be found in Table 1. For each dataset, we apply tokenization with the Moses (Koehn et al., 2007) tokenizer and preserve casing.
166
+
167
+ IWSLT15 English-Vietnamese TED talks from IWSLT 2015 Evaluation Campaign (Cettolo et al., 2016). We follow the settings from Luong & Manning (2015) and Raffel et al. (2017). We replace words with frequency less than 5 by $< u n k >$ . We use tst2012 as a validation set tst2013 as a test set.
168
+
169
+ WMT15 German-English We follow the setting from Arivazhagan et al. (2019). We apply byte pair encoding (BPE) (Sennrich et al., 2016) jointly on the source and target to construct a shared vocabulary with 32K symbols. We use newstest2013 as validation set and newstest2015 as test set.
170
+
171
+ # 3.3 MODELS
172
+
173
+ We evaluate MMA-H and MMA-IL models on both datasets. The MILK model we evaluate on IWSLT15 En-Vi is based on Luong et al. (2015) rather than RNMT $^ +$ (Chen et al., 2018). In general, our offline models use unidirectional encoders, i.e. the encoder self-attention can only attend to previous states, and greedy decoding. We report offline model performance in Table 2 and the effect of using unidirectional encoders and greedy decoding in Table 3. For MMA models, we replace the encoder-decoder layers with MMA and keep other hyperparameter settings the same as the offline model. Detailed hyperparameter settings can be found in subsection A.1. We use the Fairseq library (Ott et al., 2019) for our implementation.
174
+
175
+ # 4 RESULTS
176
+
177
+ In this section, we present the main results of our model in terms of latency-quality tradeoffs, ablation studies and analyses. In the first study, we analyze the effect of the variance loss on the attention span. Then, we study the effect of the number of decoder layers and decoder heads on quality and latency. We also provide a case study for the behavior of attention heads in an example. Finally, we study the relationship between the rank of an attention head and the layer it belongs to.
178
+
179
+ ![](images/e122b7036362526ca9df24fd1d502cd25f56d35adb6686383751be035f195e06.jpg)
180
+ Figure 2: Latency-quality tradeoffs for MILk (Arivazhagan et al., 2019) and MMA on IWSLT15 En-Vi and WMT15 De-En. Black dashed line indicates the unidirectional offline transformer model with greedy search.
181
+
182
+ # 4.1 LATENCY-QUALITY TRADEOFFS
183
+
184
+ We plot the quality-latency curves for MMA-H and MMA-IL in Figure 2. The BLEU and latency scores on the test sets are generated by setting a latency range and selecting the checkpoint with best BLEU score on the validation set. We use differentiable average lagging (Arivazhagan et al., 2019) when setting the latency range. We find that for a given latency, our models obtain a better translation quality. While MMA-IL tends to have a decrease in quality as the latency decreases, MMA-H has a small gain in quality as latency decreases: a larger latency does not necessarily mean an increase in source information available to the model. In fact, the large latency is from the outlier attention heads, which skip the entire source sentence and point to the end of the sentence. The outliers not only increase the latency but they also do not provide useful information. We introduce the attention variance loss to eliminate the outliers, as such a loss makes the attention heads focus on the current context for translating the new target token.
185
+
186
+ It is interesting to observe that MMA-H has a better latency-quality tradeoff than $\mathrm { M I L K } ^ { 7 }$ even though each head only attends to only one state. Although MMA-H is not yet able to handle an arbitrarily long input (without resorting to segmenting the input), since both encoder and decoder self-attention have an infinite lookback, that model represents a good step in that direction.
187
+
188
+ # 4.2 ATTENTION SPAN
189
+
190
+ In subsection 2.3, we introduced the attention variance loss to MMA-H in order to prevent outlier attention heads from increasing the latency or increasing the attention span. We have already evaluated the effectiveness of this method on latency in subsection 4.1. We also want to measure the difference between the fastest and slowest heads at each decoding step. We define the average
191
+
192
+ attention span in Equation 18:
193
+
194
+ $$
195
+ \bar { S } = \frac { 1 } { \vert \pmb { y } \vert } \left( \sum _ { i } ^ { \vert \pmb { y } \vert } \underset { l , h } { \operatorname* { m a x } } t _ { i } ^ { l , h } - \underset { l , h } { \operatorname* { m i n } } t _ { i } ^ { l , h } \right)
196
+ $$
197
+
198
+ It estimates the reading buffer we need for streaming translation. We show the relation between the average attention span versus $\lambda _ { v a r }$ in Figure 3. As expected, the average attention span is reduced as we increase $\lambda _ { v a r }$ .
199
+
200
+ ![](images/0f751c2faf86a11373cba7cf525d322dc182947f9c6a18f187c49c68d5fad146.jpg)
201
+ Figure 3: Effect of $\lambda _ { v a r }$ on the average attention span. The variance loss works as intended by reducing the span with higher weights.
202
+
203
+ # 4.3 EFFECT ON NUMBER OF LAYERS AND NUMBER OF HEADS
204
+
205
+ One motivation to introduce MMA is to adapt the Transformer, which is the current state-of-the-art model for machine translation, to online decoding. Important features of the Transformer architecture include having a separate attention layer for each decoder layer block and multihead attention. In this section, we test the effect of these two components on the offline, MMA-H, and MMA-IL models from a quality and latency perspective. We report quality as measured by detokenized BLEU and latency as measured by DAL on the WMT13 validation set in Figure 4. We set $\lambda _ { a v g } = 0 . 2$ for MMA-IL and $\lambda _ { v a r } = 0 . 2$ for MMA-H.
206
+
207
+ The offline model benefits from having more than one decoder layer. In the case of 1 decoder layer, increasing the number of attention heads is beneficial but in the case of 3 and 6 decoder layers, we do not see much benefit from using more than 2 heads. The best performance is obtained for 3 layers and 2 heads (6 effective heads). The MMA-IL model behaves similarly to the offline model, and the best performance is observed with 6 layers and 4 heads (24 effective heads). For MMA-H, with 1 layer, performance improves with more heads. With 3 layers, the single-head setting is the most effective (3 effective heads). Finally, with 6 layers, the best performance is reached with 16 heads (96 effective heads).
208
+
209
+ The general trend we observe is that performance improves as we increase the number of effective heads, either from multiple layers or multihead attention, up to a certain point, then either plateaus or degrades. This motivates the introduction of the MMA model.
210
+
211
+ We also note that latency increases with the number of effective attention heads. This is due to having fixed loss weights: when more heads are involved, we should increase $\lambda _ { v a r }$ or $\lambda _ { a v g }$ to better control latency.
212
+
213
+ # 4.4 ATTENTION BEHAVIORS
214
+
215
+ We characterize attention behaviors by providing a running example of MMA-H and MMA-IL, shown in Figure 5. Each curve represents the path that an attention head goes through at inference time. For MMA-H, shown in Figure 5a, we found that when the source and target tokens have the same order, the attention heads behave linearly and the distance between fastest head and slowest head is small. For example, this can be observed from partial sentence pair “I also didn’t know that” and target tokens “Tôi cũng không biết rằng”, which have the same order. However, when the source tokens and target tokens have different orders, such as “the second step” and “bước (step) thứ hai (second)”, the model will generate “bước (step)” first and some heads will stay in the past to retain the information for later reordered translation “thứ hai (second)”. We can also see that the attention heads have a near-diagonal trajectory, which is appropriate for streaming inputs.
216
+
217
+ ![](images/587b8944db8cce31706c574a36a9ec6d40a868064c34c383e996803aed29b0b0.jpg)
218
+ Figure 4: Effect of the number of decoder attention heads and the number of decoder attention layers on quality and latency, reported on the WMT13 validation set.
219
+
220
+ The behavior of the heads in MMA-IL models is shown in Figure 5b. Notice that we remove the partial softmax alignment in this figure. We don’t expect streaming capability for MMA-IL: some heads stop at early position of the source sentence to retain the history information. Moreover, because MMA-IL has more information when generating a new target token, it tends to produce translations with better quality. In this example, the MMA-IL model has a better translation on “isolate the victim” than MMA-H (“là cô lập nạn nhân” vs “là tách biệt nạn nhân”)
221
+
222
+ ![](images/f9caf5f55023339b16fb95b389bc65cc48ec79600f2fc76d230026679d0627e7.jpg)
223
+ Figure 5: Running examples on IWSLT15 English-Vietnamese dataset
224
+
225
+ # 4.5 RANK OF THE HEADS
226
+
227
+ In Figure 6, we calculate the average and standard deviation of rank of each head when generating every target token. For MMA-IL, we find that heads in lower layers tend to have higher rank and are thus slower. However, in MMA-H, the difference of the average rank are smaller. Furthermore, the standard deviation is very large which means that the order of the heads in MMA-H changes frequently over the inference process.
228
+
229
+ ![](images/945370a5e1d53aa3ee0f21fc5e5f3110a0171fb97a8e1797f201cb0464090bba.jpg)
230
+ Figure 6: The average rank of attention heads during inference on IWSLT15 En-Vi. Error bars indicate the standard deviation. L indicates the layer number and $\mathrm { H }$ indicates the head number.
231
+
232
+ # 5 RELATED WORK
233
+
234
+ Recent work on simultaneous machine translation falls into three categories. In the first one, models use a rule-based policy for reading input and writing output. Cho & Esipova (2016) propose a WaitIf-\* policy to enable an offline model to decode simultaneously. Ma et al. (2019) propose a wait- $k$ policy where the model first reads $k$ tokens, then alternates between read and write actions. Dalvi et al. (2018) propose an incremental decoding method, also based on a rule-based schedule. In the second category, a flexible policy is learnt from data. Grissom II et al. (2014) introduce a Markov chain to phrase-based machine translation models for simultaneous machine translation, in which they apply reinforcement learning to learn the read-write policy based on states. Gu et al. (2017) introduce an agent which learns to make decisions on when to translate from the interaction with a pre-trained offline neural machine translation model. Luo et al. (2017) used continuous rewards policy gradient for online alignments for speech recognition. Lawson et al. (2018) proposed a hard alignment with variational inference for online decoding. Alinejad et al. (2018) propose a new operation ”predict” which predicts future source tokens. Zheng et al. (2019b) introduce a restricted dynamic oracle and restricted imitation learning for simultaneous translation. Zheng et al. (2019a) train the agent with an action sequence from labels that are generated based on the rank of the gold target word given partial input. Models from the last category leverage monotonic attention and replace the softmax attention with an expected attention calculated from a stepwise Bernoulli selection probability. Raffel et al. (2017) first introduce the concept of monotonic attention for online linear time decoding, where the attention only attends to one encoder state at a time. Chiu & Raffel (2018) extended that work to let the model attend to a chunk of encoder state. Arivazhagan et al. (2019) also make use of the monotonic attention but introduce an infinite lookback to improve the translation quality.
235
+
236
+ # 6 CONCLUSION
237
+
238
+ In this paper, we propose two variants of the monotonic multihead attention model for simultaneous machine translation. By introducing two new targeted loss terms which allow us to control both latency and attention span, we are able to leverage the power of the Transformer architecture to achieve better quality-latency trade-offs than the previous state-of-the-art model. We also present detailed ablation studies demonstrating the efficacy and rationale of our approach. By introducing these stronger simultaneous sequence-to-sequence models, we hope to facilitate important applications, such as high-quality real-time interpretation between human speakers.
239
+
240
+ # REFERENCES
241
+
242
+ Ashkan Alinejad, Maryam Siahbani, and Anoop Sarkar. Prediction improves simultaneous neural machine translation. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 3022–3027, 2018.
243
+
244
+ Naveen Arivazhagan, Colin Cherry, Wolfgang Macherey, Chung-Cheng Chiu, Semih Yavuz, Ruoming Pang, Wei Li, and Colin Raffel. Monotonic infinite lookback attention for simultaneous machine translation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 1313–1323, Florence, Italy, July 2019. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/P19-1126.
245
+
246
+ Lo¨ıc Barrault, Ondˇrej Bojar, Marta R. Costa-jussa, Christian Federmann, Mark Fishel, Yvette \` Graham, Barry Haddow, Matthias Huck, Philipp Koehn, Shervin Malmasi, Christof Monz, Mathias Muller, Santanu Pal, Matt Post, and Marcos Zampieri. Findings of the 2019 con- ¨ ference on machine translation (WMT19). In Proceedings of the Fourth Conference on Machine Translation (Volume 2: Shared Task Papers, Day 1), pp. 1–61, Florence, Italy, August 2019. Association for Computational Linguistics. doi: 10.18653/v1/W19-5301. URL https://www.aclweb.org/anthology/W19-5301.
247
+
248
+ Mauro Cettolo, Niehues Jan, Stuker Sebastian, Luisa Bentivogli, Roldano Cattoni, and Marcello ¨ Federico. The iwslt 2016 evaluation campaign. In International Workshop on Spoken Language Translation, 2016.
249
+
250
+ Mia Xu Chen, Orhan Firat, Ankur Bapna, Melvin Johnson, Wolfgang Macherey, George Foster, Llion Jones, Mike Schuster, Noam Shazeer, Niki Parmar, et al. The best of both worlds: Combining recent advances in neural machine translation. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 76–86, 2018.
251
+
252
+ Chung-Cheng Chiu and Colin Raffel. Monotonic chunkwise attention. 2018. URL https:// openreview.net/pdf?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ Hko85plCW.
253
+
254
+ Kyunghyun Cho and Masha Esipova. Can neural machine translation do simultaneous translation? arXiv preprint arXiv:1606.02012, 2016.
255
+
256
+ Fahim Dalvi, Nadir Durrani, Hassan Sajjad, and Stephan Vogel. Incremental decoding and training methods for simultaneous translation in neural machine translation. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pp. 493–499, New Orleans, Louisiana, June 2018. Association for Computational Linguistics. doi: 10.18653/v1/N18-2079. URL https://www.aclweb.org/anthology/N18-2079.
257
+
258
+ Alvin Grissom II, He He, Jordan Boyd-Graber, John Morgan, and Hal Daume III. Don’t until the ´ final verb wait: Reinforcement learning for simultaneous machine translation. In Proceedings of the 2014 Conference on empirical methods in natural language processing (EMNLP), pp. 1342– 1352, 2014.
259
+
260
+ Jiatao Gu, Graham Neubig, Kyunghyun Cho, and Victor OK Li. Learning to translate in real-time with neural machine translation. In 15th Conference of the European Chapter of the Association for Computational Linguistics, EACL 2017, pp. 1053–1062. Association for Computational Linguistics (ACL), 2017.
261
+
262
+ Philipp Koehn, Hieu Hoang, Alexandra Birch, Chris Callison-Burch, Marcello Federico, Nicola Bertoldi, Brooke Cowan, Wade Shen, Christine Moran, Richard Zens, Chris Dyer, Ondˇrej Bojar, Alexandra Constantin, and Evan Herbst. Moses: Open source toolkit for statistical machine translation. In Proceedings of the 45th Annual Meeting of the Association for Computational Linguistics Companion Volume Proceedings of the Demo and Poster Sessions, pp. 177–180, Prague, Czech Republic, June 2007. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/P07-2045.
263
+
264
+ Dieterich Lawson, Chung-Cheng Chiu, George Tucker, Colin Raffel, Kevin Swersky, and Navdeep Jaitly. Learning hard alignments with variational inference. In 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 5799–5803. IEEE, 2018.
265
+
266
+ Yuping Luo, Chung-Cheng Chiu, Navdeep Jaitly, and Ilya Sutskever. Learning online alignments with continuous rewards policy gradient. In 2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 2801–2805. IEEE, 2017.
267
+
268
+ Minh-Thang Luong and Christopher D Manning. Stanford neural machine translation systems for spoken language domains. 2015.
269
+
270
+ Minh-Thang Luong, Hieu Pham, and Christopher D Manning. Effective approaches to attentionbased neural machine translation. arXiv preprint arXiv:1508.04025, 2015.
271
+
272
+ Mingbo Ma, Liang Huang, Hao Xiong, Renjie Zheng, Kaibo Liu, Baigong Zheng, Chuanqiang Zhang, Zhongjun He, Hairong Liu, Xing Li, Hua Wu, and Haifeng Wang. STACL: Simultaneous translation with implicit anticipation and controllable latency using prefix-to-prefix framework. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 3025–3036, Florence, Italy, July 2019. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/P19-1289.
273
+
274
+ Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. fairseq: A fast, extensible toolkit for sequence modeling. In Proceedings of NAACL-HLT 2019: Demonstrations, 2019.
275
+
276
+ Matt Post. A call for clarity in reporting BLEU scores. In Proceedings of the Third Conference on Machine Translation: Research Papers, pp. 186–191, Belgium, Brussels, October 2018. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/ W18-6319.
277
+
278
+ Colin Raffel, Minh-Thang Luong, Peter J Liu, Ron J Weiss, and Douglas Eck. Online and linear-time attention by enforcing monotonic alignments. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 2837–2846. JMLR. org, 2017.
279
+
280
+ Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1715–1725, 2016.
281
+
282
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017.
283
+
284
+ Baigong Zheng, Renjie Zheng, Mingbo Ma, and Liang Huang. Simpler and faster learning of adaptive policies for simultaneous translation. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 1349–1354, Hong Kong, China, November 2019a. Association for Computational Linguistics. doi: 10.18653/v1/D19-1137. URL https://www.aclweb.org/anthology/D19-1137.
285
+
286
+ Baigong Zheng, Renjie Zheng, Mingbo Ma, and Liang Huang. Simultaneous translation with flexible policy via restricted imitation learning. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 5816–5822, Florence, Italy, July 2019b. Association for Computational Linguistics. doi: 10.18653/v1/P19-1582. URL https://www.aclweb. org/anthology/P19-1582.
287
+
288
+ # A APPENDIX
289
+
290
+ # A.1 HYPERPARAMETERS
291
+
292
+ The hyperparameters we used for offline and monotonic transformer models are defined in Table 4.
293
+
294
+ # A.2 LATENCY METRICS DEFINITIONS
295
+
296
+ Given the delays $\mathbf { g } = \{ g _ { 1 } , g _ { 2 } , . . . , g _ { | \mathbf { y } | } \}$ of generating each target token, AP, AL and DAL are defined in Table 5.
297
+
298
+ Table 4: Offline and monotonic models hyperparameters.
299
+
300
+ <table><tr><td>Hyperparameter</td><td>WMT15 German-English</td><td>IWSLT English-Vietnamese</td></tr><tr><td>encoder embed dim</td><td>1024</td><td>512</td></tr><tr><td>encoder ffn embed dim</td><td>4096</td><td>1024</td></tr><tr><td>encoder attention heads</td><td>16</td><td>4</td></tr><tr><td>encoder layers</td><td></td><td>6</td></tr><tr><td>decoder embed dim</td><td>1024</td><td>512</td></tr><tr><td>decoder ffn embed dim</td><td>4096</td><td>1024</td></tr><tr><td>decoder attention heads</td><td>16</td><td>4</td></tr><tr><td>decoder layers</td><td></td><td>6</td></tr><tr><td>dropout</td><td>0.3</td><td></td></tr><tr><td>optimizer</td><td></td><td>adam</td></tr><tr><td>adam-β</td><td></td><td>(0.9,0.98)</td></tr><tr><td>clip-norm</td><td></td><td>0.0</td></tr><tr><td>lr lr scheduler</td><td></td><td>0.0005</td></tr><tr><td></td><td></td><td>inverse sqrt</td></tr><tr><td>warmup-updates</td><td></td><td>4000</td></tr><tr><td>warmup-init-lr</td><td></td><td>1e-07</td></tr><tr><td>label-smoothing</td><td></td><td>0.1</td></tr><tr><td>max tokens</td><td>3584×8×8×2</td><td>16000</td></tr></table>
301
+
302
+ Table 5: The calculation of latency metrics, given source $_ { \textbf { \em x } }$ , target $\textbf { { y } }$ and delays $\pmb { g }$
303
+
304
+ <table><tr><td colspan="2">Latency Metric</td></tr><tr><td>Average Proportion</td><td>y 1 M gi lacllyl i=1</td></tr><tr><td>Average Lagging</td><td>1 T i-1 gi 1y1/ac T i=1 where T = arg maxi(gi = |xl)</td></tr><tr><td>1 ly Differentiable Average Lagging</td><td>lyl i-1 M gi lyl//ac| i=1 gi i=0 where g&#x27; = ly max(gi, 9i-1 i&lt;0 [x</td></tr></table>
305
+
306
+ # A.3 DETAILED RESULTS
307
+
308
+ We provide the detailed results in Figure 2 as Table 6 and Table 7.
309
+
310
+ # A.4 THRESHOLD OF READING ACTION
311
+
312
+ We explore a simple method that can adjust system’s latency at inference time without training new models. In Algorithm 1 line 8, 0.5 was used as an threshold. One can set different threshold $p$ during the inference time to control the latency. We run the pilot experiments on IWSLT15 En-Vi dataset and the results are shown as Table 8. Although this method doesn’t require training new model, it dramatically hurts the translation quality.
313
+
314
+ Table 6: Detailed results for MMA-H and MMA-IL on WMT15 DeEn
315
+
316
+ <table><tr><td rowspan=1 colspan=1>BLEU AP AL DAL</td></tr><tr><td rowspan=1 colspan=1>Xavg MMA-IL</td></tr><tr><td rowspan=1 colspan=1>0.05 30.7 0.78 10.91 12.64</td></tr><tr><td rowspan=1 colspan=1>0.1 30.5 0.70 7.42 8.82</td></tr><tr><td rowspan=1 colspan=1>0.2 30.1 0.63 5.17 6.41</td></tr><tr><td rowspan=1 colspan=1>0.3 30.3 0.60 4.18 5.35</td></tr><tr><td rowspan=1 colspan=1>0.4 29.2 0.59 3.75 4.90</td></tr><tr><td rowspan=1 colspan=1>0.5 26.7 0.59 3.69 4.83</td></tr><tr><td rowspan=1 colspan=1>0.75 25.5 0.58 3.40 4.46</td></tr><tr><td rowspan=1 colspan=1>1.0 25.1 0.56 3.00 4.03</td></tr><tr><td rowspan=1 colspan=1>Xvar MMA-H</td></tr><tr><td rowspan=1 colspan=1>0.1 28.5 0.74 8.94 10.83</td></tr><tr><td rowspan=1 colspan=1>0.2 28.9 0.69 6.82 8.622</td></tr><tr><td rowspan=1 colspan=1>0.3 29.2 0.64 5.45 7.03</td></tr><tr><td rowspan=1 colspan=1>0.4 28.5 0.59 3.90 5.21</td></tr><tr><td rowspan=1 colspan=1>0.5 28.5 0.59 3.88 5.19</td></tr><tr><td rowspan=1 colspan=1>0.6 29.6 0.56 3.13 4.32</td></tr><tr><td rowspan=1 colspan=1>0.7 29.1 0.56 2.93 4.10</td></tr></table>
317
+
318
+ Table 7: Detailed results for MILk, MMA-H and MMA-IL on IWSLT15 En-Vi
319
+
320
+ <table><tr><td>BLEU</td><td></td><td>AP</td><td>AL</td><td>DAL</td></tr><tr><td>入</td><td></td><td>MILk</td><td></td><td></td></tr><tr><td>0.1</td><td>24.62</td><td>0.71</td><td>5.93</td><td>7.19</td></tr><tr><td>0.2</td><td>24.68</td><td>0.67</td><td>4.90</td><td>5.97</td></tr><tr><td>0.3</td><td>24.31</td><td>0.65</td><td>4.45</td><td>5.43</td></tr><tr><td>0.4</td><td>23.73</td><td>0.64</td><td>4.28</td><td>5.24</td></tr><tr><td>Xaug</td><td></td><td>MMA-IL</td><td></td><td></td></tr><tr><td>0.02</td><td>28.28</td><td>0.76</td><td>7.09</td><td>8.29</td></tr><tr><td>0.04</td><td>28.33</td><td>0.70</td><td>5.44</td><td>6.57</td></tr><tr><td>0.1</td><td>28.42</td><td>0.67</td><td>4.63</td><td>5.65</td></tr><tr><td>0.2</td><td>28.47</td><td>0.63</td><td>3.57</td><td>4.44</td></tr><tr><td>0.3</td><td>27.9</td><td>0.59</td><td>2.98</td><td>3.81</td></tr><tr><td>0.4</td><td>27.73</td><td>0.58</td><td>2.68</td><td>3.46</td></tr><tr><td>Xuar</td><td></td><td>MMA-H</td><td></td><td></td></tr><tr><td>0.02</td><td>27.26</td><td>0.77</td><td>7.52</td><td>8.71</td></tr><tr><td>0.1</td><td></td><td></td><td>5.22</td><td>6.31</td></tr><tr><td></td><td>27.68</td><td>0.69</td><td>3.81</td><td></td></tr><tr><td>0.2</td><td>28.06</td><td>0.63</td><td></td><td>4.84</td></tr><tr><td>0.4</td><td>27.79</td><td>0.62</td><td>3.57</td><td>4.59</td></tr><tr><td>0.8</td><td>27.95</td><td>0.60</td><td>3.22</td><td>4.19</td></tr></table>
321
+
322
+ # A.5 AVERAGE LOSS FOR MMA-H
323
+
324
+ We explore applying a simple average instead of a weighted average loss to MMA-H. The results are shown in Figure 7 and Table 9. We find that even with very large weights, we are unable to reduce the overall latency. In addition, we find that the weighted average loss severely affects the translation quality negatively. On the other hand, the divergence loss we propose in Equation 16 can efficiently reduce the latency while retaining relatively good translation quality for MMA-H models.
325
+
326
+ <table><tr><td colspan="6">Reading Threshold</td><td colspan="4">Weighted Average Latency Loss</td></tr><tr><td>p</td><td>BLEU</td><td>AP</td><td>AL</td><td>DAL</td><td>Lavg</td><td>BLEU</td><td>AP</td><td>AL</td><td>DAL</td></tr><tr><td>0.5</td><td>25.5</td><td>0.792387</td><td>7.13673</td><td>8.27187</td><td>0.02</td><td>25.5</td><td>0.792387</td><td>7.13673</td><td>8.27187</td></tr><tr><td>0.4</td><td>25.25</td><td>0.73749</td><td>5.72003</td><td>6.85812</td><td>0.04</td><td>25.68</td><td>0.728107</td><td>5.52856</td><td>6.61744</td></tr><tr><td>0.3</td><td>23.06</td><td>0.697398</td><td>4.88087</td><td>6.03342</td><td>0.3</td><td>24.9</td><td>0.602703</td><td>2.90054</td><td>3.68039</td></tr><tr><td>0.2</td><td>18.37</td><td>0.678298</td><td>4.71099</td><td>5.94636</td><td>0.2</td><td>25.3</td><td>0.636914</td><td>3.54577</td><td>4.38623</td></tr><tr><td>0.1</td><td>8.73</td><td>0.696452</td><td>5.5225</td><td>7.20439</td><td>0.1</td><td>25.48</td><td>0.684424</td><td>4.57901</td><td>5.54102</td></tr></table>
327
+
328
+ Table 8: Comparison between setting threshold for reading action and weighted average latency loss.
329
+
330
+ ![](images/aea53beea98c86b1baeb911bfa9ca93df3d5c23c9dfd3fe4f079a502cf059346.jpg)
331
+ Figure 7: Effect average loss, weighted average loss and variance loss on MMA-H on WMT15 DeEn development set.
332
+ Table 9: Detailed numbers on average loss, weighted average loss and head divergence loss on WMT15 De-En development set
333
+
334
+ <table><tr><td></td><td>BLEU</td><td>AP</td><td>AL</td><td>DAL</td></tr><tr><td>Xaug</td><td colspan="4">Average</td></tr><tr><td>0.05</td><td>28.5</td><td>0.862581</td><td>14.3847</td><td>17.3702</td></tr><tr><td>0.1</td><td>27.8</td><td>0.855435</td><td>13.974</td><td>17.02</td></tr><tr><td>0.2</td><td>28</td><td>0.835324</td><td>12.8531</td><td>15.908</td></tr><tr><td>0.4</td><td>28.1</td><td>0.819408</td><td>11.9816</td><td>14.9763</td></tr><tr><td>1.0</td><td>28.2</td><td>0.810609</td><td>11.7528</td><td>14.6695</td></tr><tr><td>2.0</td><td>28.1</td><td>0.800258</td><td>11.1763</td><td>14.0761</td></tr><tr><td>8.0</td><td>28.4</td><td>0.806439</td><td>11.5289</td><td>14.6431</td></tr><tr><td>Xaug</td><td colspan="4">Weighted Average</td></tr><tr><td>0.02</td><td>28.24</td><td>0.773922</td><td>10.2109</td><td>12.2274</td></tr><tr><td>0.04</td><td>24.35</td><td>0.685834</td><td>7.06716</td><td>8.64069</td></tr><tr><td>0.06</td><td>7.80</td><td>0.875825</td><td>16.2046</td><td>19.0892</td></tr><tr><td>0.08</td><td>9.51</td><td>0.57372</td><td>3.92011</td><td>6.1421</td></tr><tr><td>0.1</td><td>9.78</td><td>0.556585</td><td>3.3007</td><td>5.46142</td></tr><tr><td>Xvar</td><td colspan="4">Divergence</td></tr><tr><td>0.1</td><td>27.35</td><td>0.736025</td><td>8.70968</td><td>10.5253</td></tr><tr><td>0.2</td><td>27.64</td><td>0.681491</td><td>6.63914</td><td>8.3856</td></tr><tr><td>0.3</td><td>27.37</td><td>0.6623</td><td>6.04902</td><td>7.71922</td></tr><tr><td>0.4</td><td>27.62</td><td>0.638188</td><td>5.31672</td><td>6.86834</td></tr><tr><td>0.5</td><td>27.50</td><td>0.625759</td><td>4.93044</td><td>6.38998</td></tr><tr><td>1.0</td><td>27.1</td><td>0.582194</td><td>3.64864</td><td>4.90997</td></tr></table>
parse/train/Hyg96gBKPS/Hyg96gBKPS_content_list.json ADDED
@@ -0,0 +1,1693 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "MONOTONIC MULTIHEAD ATTENTION ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 99,
9
+ 633,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Xutai $\\mathbf { M } \\mathbf { a } ^ { 2 }$ ∗, Juan Pino1, James Cross1, Liezl Puzon1, Jiatao $\\mathbf { G u } ^ { 1 }$ ",
17
+ "bbox": [
18
+ 186,
19
+ 143,
20
+ 637,
21
+ 160
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "1Facebook \n2Johns Hopkins University ",
28
+ "bbox": [
29
+ 186,
30
+ 166,
31
+ 361,
32
+ 195
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "xutai ma@jhu.edu, puzon@cs.stanford.edu {juancarabina,jcross,jgu}@fb.com ",
39
+ "bbox": [
40
+ 186,
41
+ 203,
42
+ 565,
43
+ 231
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "ABSTRACT ",
50
+ "text_level": 1,
51
+ "bbox": [
52
+ 454,
53
+ 267,
54
+ 544,
55
+ 282
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "Simultaneous machine translation models start generating a target sequence before they have encoded the source sequence. Recent approaches for this task either apply a fixed policy on a state-of-the art Transformer model, or a learnable monotonic attention on a weaker recurrent neural network-based structure. In this paper, we propose a new attention mechanism, Monotonic Multihead Attention (MMA), which extends the monotonic attention mechanism to multihead attention. We also introduce two novel and interpretable approaches for latency control that are specifically designed for multiple attention heads. We apply MMA to the simultaneous machine translation task and demonstrate better latency-quality tradeoffs compared to MILk, the previous state-of-the-art approach. We analyze how the latency controls affect the attention span and we study the relationship between the speed of a head and the layer it belongs to. Finally, we motivate the introduction of our model by analyzing the effect of the number of decoder layers and heads on quality and latency.1 ",
62
+ "bbox": [
63
+ 233,
64
+ 295,
65
+ 764,
66
+ 489
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "1 INTRODUCTION ",
73
+ "text_level": 1,
74
+ "bbox": [
75
+ 176,
76
+ 512,
77
+ 336,
78
+ 529
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Simultaneous machine translation adds the capability of a live interpreter to machine translation: a simultaneous model starts generating a translation before it has finished reading the entire source sentence. Such models are useful in any situation where translation needs to be done in real time. For example, simultaneous models can translate live video captions or facilitate conversations between people speaking different languages. In a usual translation model, the encoder first reads the entire sentence, then the decoder writes the target sentence. On the other hand, a simultaneous neural machine translation model alternates between reading the input and writing the output using either a fixed or learned policy. ",
85
+ "bbox": [
86
+ 174,
87
+ 542,
88
+ 825,
89
+ 655
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Monotonic attention mechanisms fall into the flexible policy category, in which the policies are automatically learned from data. Recent work exploring monotonic attention variants for simultaneous translation include: hard monotonic attention (Raffel et al., 2017), monotonic chunkwise attention (MoChA) (Chiu & Raffel, 2018) and monotonic infinite lookback attention (MILk) (Arivazhagan et al., 2019). MILk in particular has shown better quality/latency trade-offs than fixed policy approaches, such as wait- $k$ (Ma et al., 2019) or wait-if-\\* (Cho & Esipova, 2016) policies. MILk also outperforms hard monotonic attention and MoChA; while the other two monotonic attention mechanisms only consider a fixed window, MILk computes a softmax attention over all previous encoder states, which may be the key to its improved latency-quality tradeoffs. These monotonic attention approaches also provide a closed-form expression for the expected alignment between source and target tokens. ",
96
+ "bbox": [
97
+ 174,
98
+ 661,
99
+ 825,
100
+ 814
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "However, monotonic attention-based models, including the state-of-the-art MILk, were built on top of RNN-based models. RNN-based models have been outperformed by the recent state-of-the-art Transformer model (Vaswani et al., 2017), which features multiple encoder-decoder attention layers and multihead attention at each layer. ",
107
+ "bbox": [
108
+ 174,
109
+ 821,
110
+ 825,
111
+ 877
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "We thus propose monotonic multihead attention (MMA), which combines the high translation quality from multilayer multihead attention and low latency from monotonic attention. We propose two variants, Hard MMA (MMA-H) and Infinite Lookback MMA (MMA-IL). MMA-H is designed with streaming systems in mind where the attention span must be limited. MMA-IL emphasizes the quality of the translation system. We also propose two novel latency regularization methods. The first encourages the model to be faster by directly minimizing the average latency. The second encourages the attention heads to maintain similar positions, preventing the latency from being dominated by a single or a few heads. ",
118
+ "bbox": [
119
+ 174,
120
+ 103,
121
+ 825,
122
+ 214
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "The main contributions of this paper are: (1) A novel monotonic attention mechanism, monotonic multihead attention, which enables the Transformer model to perform online decoding. This model leverages the power of the Transformer and the efficiency of monotonic attention. (2) Better latency/quality tradeoffs compared to the MILk model, the previous state-of-the-art, on two standard translation benchmarks, IWSLT15 English-Vietnamese (En-Vi) and WMT15 German-English (DeEn). (3) Analyses on how our model is able to control the attention span and on the relationship between the speed of a head and the layer it belongs to. We motivate the design of our model with an ablation study on the number of decoder layers and the number of decoder heads. ",
129
+ "bbox": [
130
+ 174,
131
+ 222,
132
+ 825,
133
+ 333
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "2 MONOTONIC MULTIHEAD ATTENTION MODEL ",
140
+ "text_level": 1,
141
+ "bbox": [
142
+ 174,
143
+ 352,
144
+ 591,
145
+ 369
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "In this section, we review the monotonic attention-based approaches in RNN-based encoder-decoder models. We then introduce the two types of Monotonic Multihead Attention (MMA) for Transformer models: MMA-H and MMA-IL. Finally, we introduce strategies to control latency and coverage. ",
152
+ "bbox": [
153
+ 174,
154
+ 383,
155
+ 825,
156
+ 426
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "2.1 MONOTONIC ATTENTION ",
163
+ "text_level": 1,
164
+ "bbox": [
165
+ 174,
166
+ 441,
167
+ 390,
168
+ 457
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": "The hard monotonic attention mechanism (Raffel et al., 2017) was first introduced in order to achieve online linear time decoding for RNN-based encoder-decoder models. We denote the input sequence as $\\mathbf { x } = \\{ x _ { 1 } , . . . , x _ { T } \\}$ , and the corresponding encoder states as $\\mathbf { m } = \\{ m _ { 1 } , . . . , m _ { T } \\}$ , with $T$ being the length of the source sequence. The model generates a target sequence $\\mathbf { y } = \\{ y _ { 1 } , . . . , y _ { U } \\}$ with $U$ being the length of the target sequence. At the $i$ -th decoding step, the decoder only attends to one encoder state $m _ { t _ { i } }$ with $t _ { i } = j$ . When generating a new target token $y _ { i }$ , the decoder chooses whether to move one step forward or to stay at the current position based on a Bernoulli selection probability $p _ { i , j }$ , so that $t _ { i } \\ \\geq \\ t _ { i - 1 }$ . Denoting the decoder state at the $i$ -th position, starting from $j = t _ { i - 1 } , t _ { i - 1 } + 1 , t _ { i - 1 } + 2 , . . . _ $ , this process can be calculated as follows: 2 ",
175
+ "bbox": [
176
+ 173,
177
+ 467,
178
+ 825,
179
+ 595
180
+ ],
181
+ "page_idx": 1
182
+ },
183
+ {
184
+ "type": "equation",
185
+ "img_path": "images/1e00e4ac01ca17148a42234276fd2bfe3915f021f95dc26ea66ee0c9a33d3eed.jpg",
186
+ "text": "$$\n\\begin{array} { l c l } { e _ { i , j } } & { = } & { \\mathrm { M o n o t o n i c E n e r g y } ( s _ { i - 1 } , m _ { j } ) } \\\\ { p _ { i , j } } & { = } & { \\mathrm { S i g m o i d } \\left( e _ { i , j } \\right) } \\\\ { z _ { i , j } } & { \\sim } & { \\mathrm { B e r n o u l l i } ( p _ { i , j } ) } \\end{array}\n$$",
187
+ "text_format": "latex",
188
+ "bbox": [
189
+ 366,
190
+ 598,
191
+ 630,
192
+ 652
193
+ ],
194
+ "page_idx": 1
195
+ },
196
+ {
197
+ "type": "text",
198
+ "text": "When $z _ { i , j } = 1$ , we set $t _ { i } = j$ and start generating a target token $y _ { i }$ ; otherwise, we set $t _ { i } = j + 1$ and repeat the process. During training, an expected alignment $_ { \\pmb { \\alpha } }$ is introduced to replace the softmax attention. It can be calculated in a recurrent manner, shown in Equation 4: ",
199
+ "bbox": [
200
+ 174,
201
+ 655,
202
+ 825,
203
+ 696
204
+ ],
205
+ "page_idx": 1
206
+ },
207
+ {
208
+ "type": "equation",
209
+ "img_path": "images/9fcfcb3331ff46aa76bca6824b0c78a69ca6768a0880249b79da62fe5c67246e.jpg",
210
+ "text": "$$\n\\begin{array} { l } { \\displaystyle \\alpha _ { i , j } = p _ { i , j } \\sum _ { k = 1 } ^ { j } \\left( \\alpha _ { i - 1 , k } \\prod _ { l = k } ^ { j - 1 } \\left( 1 - p _ { i , l } \\right) \\right) } \\\\ { \\displaystyle = p _ { i , j } \\left( \\left( 1 - p _ { i , j - 1 } \\right) \\frac { \\alpha _ { i , j - 1 } } { p _ { i , j - 1 } } + \\alpha _ { i - 1 , j } \\right) } \\end{array}\n$$",
211
+ "text_format": "latex",
212
+ "bbox": [
213
+ 352,
214
+ 699,
215
+ 645,
216
+ 780
217
+ ],
218
+ "page_idx": 1
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "Raffel et al. (2017) also introduce a closed-form parallel solution for the recurrence relation in Equation 5: ",
223
+ "bbox": [
224
+ 171,
225
+ 781,
226
+ 825,
227
+ 809
228
+ ],
229
+ "page_idx": 1
230
+ },
231
+ {
232
+ "type": "equation",
233
+ "img_path": "images/f0260ef1810c1eebfba3c0000f312b7b966bc53ade5ae602fbde952ecf9512af.jpg",
234
+ "text": "$$\n\\alpha _ { i , : } = p _ { i , : } \\mathrm { c u m p r o d } ( 1 - p _ { i , : } ) \\mathrm { c u m s u m } \\left( \\frac { \\alpha _ { i - 1 , : } } { \\mathrm { c u m p r o d } ( 1 - p _ { i , : } ) } \\right)\n$$",
235
+ "text_format": "latex",
236
+ "bbox": [
237
+ 287,
238
+ 806,
239
+ 709,
240
+ 842
241
+ ],
242
+ "page_idx": 1
243
+ },
244
+ {
245
+ "type": "text",
246
+ "text": "where $\\begin{array} { r } { \\mathtt { c u m p r o d } ( x ) = [ 1 , x _ { 1 } , x _ { 1 } x _ { 2 } , . . . , \\prod _ { i = 1 } ^ { | x | - 1 } x _ { i } ] } \\end{array}$ and $\\mathsf { c u m s u m } ( { \\pmb x } ) = [ x _ { 1 } , x _ { 1 } + x _ { 2 } , . . . , \\sum _ { i = 1 } ^ { | { \\pmb x } | } x _ { i } ]$ In practice, the denominator in Equation 5 is clamped into a range of [\u000f, 1] to avoid numerical instabilities introduced by cumprod. Although this monotonic attention mechanism achieves online linear time decoding, the decoder can only attend to one encoder state. This limitation can diminish translation quality as there may be insufficient information for reordering. ",
247
+ "bbox": [
248
+ 174,
249
+ 844,
250
+ 825,
251
+ 888
252
+ ],
253
+ "page_idx": 1
254
+ },
255
+ {
256
+ "type": "text",
257
+ "text": "",
258
+ "bbox": [
259
+ 171,
260
+ 103,
261
+ 823,
262
+ 132
263
+ ],
264
+ "page_idx": 2
265
+ },
266
+ {
267
+ "type": "text",
268
+ "text": "Moreover, the model lacks a mechanism to adjust latency based on different requirements at decoding time. To address these issues, Chiu & Raffel (2018) introduce Monotonic Chunkwise Attention (MoChA), which allows the decoder to apply softmax attention to a fixed-length subsequence of encoder states. Alternatively, Arivazhagan et al. (2019) introduce Monotonic Infinite Lookback Attention (MILk) which allows the decoder to access encoder states from the beginning of the source sequence. The expected attention for the MILk model is defined in Equation 6. ",
269
+ "bbox": [
270
+ 173,
271
+ 138,
272
+ 825,
273
+ 223
274
+ ],
275
+ "page_idx": 2
276
+ },
277
+ {
278
+ "type": "equation",
279
+ "img_path": "images/78bfc0bec32bf57998374bb3d9fd4320e604813236b365050f7ae485aaf76c8b.jpg",
280
+ "text": "$$\n\\beta _ { i , j } = \\sum _ { k = j } ^ { | x | } \\left( \\frac { \\alpha _ { i , k } \\exp ( u _ { i , j } ) } { \\sum _ { l = 1 } ^ { k } \\exp ( u _ { i , l } ) } \\right)\n$$",
281
+ "text_format": "latex",
282
+ "bbox": [
283
+ 395,
284
+ 227,
285
+ 602,
286
+ 272
287
+ ],
288
+ "page_idx": 2
289
+ },
290
+ {
291
+ "type": "text",
292
+ "text": "2.2 MONOTONIC MULTIHEAD ATTENTION ",
293
+ "text_level": 1,
294
+ "bbox": [
295
+ 176,
296
+ 286,
297
+ 480,
298
+ 301
299
+ ],
300
+ "page_idx": 2
301
+ },
302
+ {
303
+ "type": "text",
304
+ "text": "Previous monotonic attention approaches are based on RNN encoder-decoder models with a single attention and haven’t explored the power of the Transformer model. 3 The Transformer architecture (Vaswani et al., 2017) has recently become the state-of-the-art for machine translation (Barrault et al., 2019). An important feature of the Transformer is the use of a separate multihead attention module at each layer. Thus, we propose a new approach, Monotonic Multihead Attention (MMA), which combines the expressive power of multihead attention and the low latency of monotonic attention. ",
305
+ "bbox": [
306
+ 173,
307
+ 311,
308
+ 825,
309
+ 410
310
+ ],
311
+ "page_idx": 2
312
+ },
313
+ {
314
+ "type": "text",
315
+ "text": "Multihead attention allows each decoder layer to have multiple heads, where each head can compute a different attention distribution. Given queries $Q$ , keys $K$ and values $V$ , multihead attention MultiHead $( Q , K , V )$ is defined in Equation 7. ",
316
+ "bbox": [
317
+ 174,
318
+ 416,
319
+ 823,
320
+ 459
321
+ ],
322
+ "page_idx": 2
323
+ },
324
+ {
325
+ "type": "equation",
326
+ "img_path": "images/de1d1097b118ce2087ff6b092be4c6925950224ebff552137d1e4295e9316fbe.jpg",
327
+ "text": "$$\n\\begin{array} { r } { \\begin{array} { l } { \\mathrm { M u l t i H e a d } ( Q , K , V ) = \\mathrm { C o n c a t } ( \\mathrm { h e a d } _ { 1 } , . . . , \\mathrm { h e a d } _ { H } ) W ^ { O } } \\\\ { \\mathrm { w h e r e ~ h e a d } _ { h } = \\mathrm { A t t e n t i o n } \\left( Q W _ { h } ^ { Q } , K W _ { h } ^ { K } , V W _ { h } ^ { V } , \\right) } \\end{array} } \\end{array}\n$$",
328
+ "text_format": "latex",
329
+ "bbox": [
330
+ 297,
331
+ 463,
332
+ 691,
333
+ 512
334
+ ],
335
+ "page_idx": 2
336
+ },
337
+ {
338
+ "type": "text",
339
+ "text": "The attention function is the scaled dot-product attention, defined in Equation 8: ",
340
+ "bbox": [
341
+ 174,
342
+ 512,
343
+ 699,
344
+ 526
345
+ ],
346
+ "page_idx": 2
347
+ },
348
+ {
349
+ "type": "equation",
350
+ "img_path": "images/0d323037e45d49bd45cbb4027ffc444fe6c4f1f38ef8e2f5e64f180bada2e268.jpg",
351
+ "text": "$$\n{ \\mathrm { A t t e n t i o n } } ( Q , K , V ) = { \\mathrm { S o f t m a x } } \\left( { \\frac { Q K ^ { T } } { \\sqrt { d _ { k } } } } \\right) V\n$$",
352
+ "text_format": "latex",
353
+ "bbox": [
354
+ 351,
355
+ 530,
356
+ 647,
357
+ 565
358
+ ],
359
+ "page_idx": 2
360
+ },
361
+ {
362
+ "type": "text",
363
+ "text": "There are three applications of multihead attention in the Transformer model: ",
364
+ "bbox": [
365
+ 173,
366
+ 566,
367
+ 681,
368
+ 582
369
+ ],
370
+ "page_idx": 2
371
+ },
372
+ {
373
+ "type": "text",
374
+ "text": "1. The Encoder contains self-attention layers where all of the queries, keys and values come from previous layers. \n2. The Decoder contains self-attention layers that allow each position in the decoder to attend to all positions in the decoder up to and including that position. \n3. The Encoder-Decoder attention contains multihead attention layers where queries come from the previous decoder layer and the keys and values come from the output of the encoder. Every decoder layer has a separate encoder-decoder attention. ",
375
+ "bbox": [
376
+ 212,
377
+ 590,
378
+ 825,
379
+ 699
380
+ ],
381
+ "page_idx": 2
382
+ },
383
+ {
384
+ "type": "text",
385
+ "text": "For MMA, we assign each head to operate as a separate monotonic attention in encoder-decoder attention. ",
386
+ "bbox": [
387
+ 173,
388
+ 708,
389
+ 821,
390
+ 737
391
+ ],
392
+ "page_idx": 2
393
+ },
394
+ {
395
+ "type": "text",
396
+ "text": "For a transformer with $L$ decoder layers and $H$ attention heads per layer, we define the selection process of the $h$ -th head encoder-decoder attention in the $l$ -th decoder layer as ",
397
+ "bbox": [
398
+ 173,
399
+ 743,
400
+ 823,
401
+ 772
402
+ ],
403
+ "page_idx": 2
404
+ },
405
+ {
406
+ "type": "equation",
407
+ "img_path": "images/06a1000b3fd8419e67564e93aa659485bec477830abd46b839218bb915b6434b.jpg",
408
+ "text": "$$\n\\begin{array} { l c l } { e _ { i , j } ^ { { l , h } } } & { = } & { \\left( \\frac { m _ { j } W _ { { l , h } } ^ { K } ( s _ { i - 1 } W _ { { l , h } } ^ { Q } ) ^ { T } } { \\sqrt { d _ { k } } } \\right) _ { i , j } } \\\\ { p _ { i , j } ^ { { l , h } } } & { = } & { \\mathrm { S i g m o i d } ( e _ { i , j } ) } \\\\ { z _ { i , j } ^ { { l , h } } } & { \\sim } & { \\mathrm { B e r n o u l l i } ( p _ { i , j } ) } \\end{array}\n$$",
409
+ "text_format": "latex",
410
+ "bbox": [
411
+ 369,
412
+ 775,
413
+ 625,
414
+ 866
415
+ ],
416
+ "page_idx": 2
417
+ },
418
+ {
419
+ "type": "image",
420
+ "img_path": "images/d597335b4efb8a0b81899a74e4bee9cd4514669123bca34eef86fbf7c1b7c310.jpg",
421
+ "image_caption": [
422
+ "Figure 1: Monotonic Attention (Left) versus Monotonic Multihead Attention (Right). "
423
+ ],
424
+ "image_footnote": [],
425
+ "bbox": [
426
+ 269,
427
+ 97,
428
+ 730,
429
+ 181
430
+ ],
431
+ "page_idx": 3
432
+ },
433
+ {
434
+ "type": "text",
435
+ "text": "where $W _ { l , h }$ is the input projection matrix, $d _ { k }$ is the dimension of the attention head. We make the selection process independent for each head in each layer. We then investigate two types of MMA, MMA-H(ard) and MMA-IL(infinite lookback). For MMA-H, we use Equation 4 in order to calculate the expected alignment for each layer each head, given $p _ { i , j } ^ { l , h }$ . For MMA-IL, we calculate the softmax energy for each head as follows: ",
436
+ "bbox": [
437
+ 174,
438
+ 229,
439
+ 825,
440
+ 303
441
+ ],
442
+ "page_idx": 3
443
+ },
444
+ {
445
+ "type": "equation",
446
+ "img_path": "images/76dbee94d92d243f0b5d5234e42d63c1c42aef73bfbee0d4196977dd708667e3.jpg",
447
+ "text": "$$\nu _ { i , j } ^ { l , h } = \\mathrm { S o f t E n e r g y } = \\left( \\frac { m _ { j } \\hat { W } _ { l , h } ^ { K } ( s _ { i - 1 } \\hat { W } _ { l , h } ^ { Q } ) ^ { T } } { \\sqrt { d _ { k } } } \\right) _ { i , j }\n$$",
448
+ "text_format": "latex",
449
+ "bbox": [
450
+ 316,
451
+ 309,
452
+ 647,
453
+ 356
454
+ ],
455
+ "page_idx": 3
456
+ },
457
+ {
458
+ "type": "text",
459
+ "text": "and then use Equation 6 to calculate the expected attention. Each attention head in MMA-H hardattends to one encoder state. On the other hand, each attention head in MMA-IL can attend to all previous encoder states. Thus, MMA-IL allows the model to leverage more information for translation, but MMA-H may be better suited for streaming systems with stricter efficiency requirements. Finally, our models use unidirectional encoders: the encoder self-attention can only attend to previous states, which is also required for simultaneous translation. ",
460
+ "bbox": [
461
+ 173,
462
+ 361,
463
+ 825,
464
+ 445
465
+ ],
466
+ "page_idx": 3
467
+ },
468
+ {
469
+ "type": "text",
470
+ "text": "At inference time, our decoding strategy is shown in Algorithm 1. For each $l , h$ , at decoding step $i$ , we apply the sampling processes discussed in subsection 2.1 individually and set the encoder step at $t _ { i } ^ { l , \\bar { h } }$ . Then a hard alignment or partial softmax attention from encoder states, shown in Equation 13, will be retrieved to feed into the decoder to generate the $i$ -th token. The model will write a new target token only after all the attentions have decided to write. In other words, the heads that have decided to write must wait until the others have finished reading. ",
471
+ "bbox": [
472
+ 174,
473
+ 452,
474
+ 825,
475
+ 537
476
+ ],
477
+ "page_idx": 3
478
+ },
479
+ {
480
+ "type": "equation",
481
+ "img_path": "images/55a64c3eb31107e09be4521a10e290bda8cf5aa3c978766c5de794153806eee4.jpg",
482
+ "text": "$$\n\\begin{array}{c} \\begin{array} { r l } & { \\qquad c _ { i } ^ { l } = \\mathrm { C o n c a t } ( c _ { i } ^ { l , 1 } , c _ { i } ^ { l , 2 } , . . . , c _ { i } ^ { l , H } ) } \\\\ & { \\qquad \\mathrm \\quad \\mathbf { \\ \" } } \\\\ & { \\qquad \\mathbf { \\ \" } \\mathbf { \\ \" } e _ { i } ^ { l , h } = f _ { \\mathrm { c o n t e x t } } ( \\boldsymbol { h } , t _ { i } ^ { l , h } ) = \\displaystyle \\left\\{ \\sum _ { j = 1 } ^ { m _ { t _ { i } ^ { l , h } } } \\frac { \\mathrm { e x p } \\left( u _ { i , j } ^ { l , h } \\right) } { \\sum _ { j = 1 } ^ { t _ { i } ^ { l , h } } \\mathrm { e x p } \\left( u _ { i , j } ^ { l , h } \\right) } m _ { j } \\quad \\mathrm { M M A \\mathrm { - } I L } \\right.} \\end{array} \\end{array}\n$$",
483
+ "text_format": "latex",
484
+ "bbox": [
485
+ 295,
486
+ 542,
487
+ 733,
488
+ 643
489
+ ],
490
+ "page_idx": 3
491
+ },
492
+ {
493
+ "type": "text",
494
+ "text": "Figure 1 illustrates a comparison between our model and the monotonic model with one attention head. Compared with the monotonic model, the MMA model is able to set attention to different positions so that it can still attend to previous states while reading each new token. Each head can adjust its speed on-the-fly. Some heads read new inputs, while the others can stay in the past to retain the source history information. Even with the hard alignment variant (MMA-H), the model is still able to preserve the history information by setting heads to past states. In contrast, the hard monotonic model, which only has one head, loses the previous information at the attention layer. ",
495
+ "bbox": [
496
+ 173,
497
+ 656,
498
+ 825,
499
+ 755
500
+ ],
501
+ "page_idx": 3
502
+ },
503
+ {
504
+ "type": "text",
505
+ "text": "2.3 LATENCY CONTROL ",
506
+ "text_level": 1,
507
+ "bbox": [
508
+ 176,
509
+ 772,
510
+ 352,
511
+ 786
512
+ ],
513
+ "page_idx": 3
514
+ },
515
+ {
516
+ "type": "text",
517
+ "text": "Effective simultaneous machine translation must balance quality and latency. At a high level, latency measures how many source tokens the model has read until a translation is generated. The model we have introduced in subsection 2.2 is not able to control latency on its own. While MMA allows simultaneous translation by having a read or write schedule for each head, the overall latency is determined by the fastest head, i.e. the head that reads the most. It is possible that a head always reads new input without producing output, which would result in the maximum possible latency. Note that the attention behaviors in MMA-H and MMA-IL can be different. In MMA-IL, a head reaching the end of the sentence will provide the model with maximum information about the source sentence. On the other hand, in the case of MMA-H, reaching the end of sentence for a head only ",
518
+ "bbox": [
519
+ 174,
520
+ 797,
521
+ 825,
522
+ 924
523
+ ],
524
+ "page_idx": 3
525
+ },
526
+ {
527
+ "type": "text",
528
+ "text": "Algorithm 1 MMA monotonic decoding. Because each head is independent, we compute line 3 to 16 in parallel ",
529
+ "bbox": [
530
+ 169,
531
+ 103,
532
+ 825,
533
+ 132
534
+ ],
535
+ "page_idx": 4
536
+ },
537
+ {
538
+ "type": "text",
539
+ "text": "Input: ${ \\bf { \\delta } } _ { \\bf { \\mathcal { X } } } =$ source tokens, $h =$ encoder states, $i = 1 , j = 1 , t _ { 0 } ^ { l , h } = 1 , y _ { 0 } =$ StartOfSequence. ",
540
+ "bbox": [
541
+ 174,
542
+ 137,
543
+ 735,
544
+ 154
545
+ ],
546
+ "page_idx": 4
547
+ },
548
+ {
549
+ "type": "table",
550
+ "img_path": "images/d3ce67f84553fcb769a11cd9c9b6bc0f2cc38f43189af848cae8c2b15b180a38.jpg",
551
+ "table_caption": [],
552
+ "table_footnote": [],
553
+ "table_body": "<table><tr><td colspan=\"3\">1:while yi-1 ≠ EndOfSequence do</td></tr><tr><td>2:</td><td>tmax =1</td><td></td></tr><tr><td>3:</td><td>h = empty sequence</td><td></td></tr><tr><td>4:</td><td>forl←1toLdo</td><td></td></tr><tr><td>5:</td><td>forh←1to Hdo</td><td></td></tr><tr><td>6:</td><td>forj←ttoacldo</td><td></td></tr><tr><td>7:</td><td>l,h Pi,j, = Sigmoid (MonotonicEnergy(Si-1,mj ))</td><td></td></tr><tr><td>8:</td><td>ifpi l,h &gt; 0.5 then</td><td></td></tr><tr><td>9:</td><td>=j</td><td></td></tr><tr><td>10:</td><td>l,h =fcontext(h,t,h)</td><td></td></tr><tr><td>11:</td><td>Ci Break</td><td></td></tr><tr><td>12:</td><td>else</td><td></td></tr><tr><td>13:</td><td>if j&gt;tmax then</td><td></td></tr><tr><td>14:</td><td>Read token x j</td><td></td></tr><tr><td>15:</td><td></td><td>Calculate state h j and append to h</td></tr><tr><td>16:</td><td>tmax =j</td><td></td></tr><tr><td>17:</td><td>c = Concat(c,1,</td><td>,cH)</td></tr><tr><td>18:</td><td>s =DecoderLayer&#x27;(s-1,s)</td><td></td></tr><tr><td>19:</td><td>yi = Output(s)</td><td></td></tr><tr><td>20:</td><td></td><td></td></tr></table>",
554
+ "bbox": [
555
+ 176,
556
+ 148,
557
+ 830,
558
+ 430
559
+ ],
560
+ "page_idx": 4
561
+ },
562
+ {
563
+ "type": "text",
564
+ "text": "gives a hard alignment to the end-of-sentence token, which provides very little information to the decoder. Furthermore, it is possible that an MMA-H attention head stays at the beginning of sentence without moving forward. Such a head would not cause latency issues but would degrade the model quality since the decoder would not have any information about the input. In addition, this behavior is not suited for streaming systems. ",
565
+ "bbox": [
566
+ 173,
567
+ 453,
568
+ 825,
569
+ 523
570
+ ],
571
+ "page_idx": 4
572
+ },
573
+ {
574
+ "type": "text",
575
+ "text": "To address these issues, we introduce two latency control methods. The first one is weighted average latency, shown in Equation 14: ",
576
+ "bbox": [
577
+ 173,
578
+ 530,
579
+ 823,
580
+ 559
581
+ ],
582
+ "page_idx": 4
583
+ },
584
+ {
585
+ "type": "equation",
586
+ "img_path": "images/dbc1c8df2033f3a8bb69ca4c0b77443bdc70f12f5d733fc36d65bd4af90e8f1b.jpg",
587
+ "text": "$$\ng _ { i } ^ { W } = \\frac { \\exp ( g _ { i } ^ { l , h } ) } { \\sum _ { l = 1 } ^ { L } \\sum _ { h = 1 } ^ { H } \\exp ( g _ { i } ^ { l , h } ) } g _ { i } ^ { l , h }\n$$",
588
+ "text_format": "latex",
589
+ "bbox": [
590
+ 385,
591
+ 561,
592
+ 611,
593
+ 603
594
+ ],
595
+ "page_idx": 4
596
+ },
597
+ {
598
+ "type": "text",
599
+ "text": "where $\\begin{array} { r } { g _ { i } ^ { l , h } = \\sum _ { j = 1 } ^ { | x | } j \\alpha _ { i , j } } \\end{array}$ . Then we calculate the latency loss with a differentiable latency metric $\\mathcal { C }$ ",
600
+ "bbox": [
601
+ 171,
602
+ 608,
603
+ 821,
604
+ 625
605
+ ],
606
+ "page_idx": 4
607
+ },
608
+ {
609
+ "type": "equation",
610
+ "img_path": "images/6fb597bba8952ce63096825ef7fd9a9f8875bf203ed1269e09e958a57183435b.jpg",
611
+ "text": "$$\n\\begin{array} { r c l } { { L _ { a v g } } } & { { = } } & { { { \\mathcal { C } } \\left( g ^ { W } \\right) } } \\end{array}\n$$",
612
+ "text_format": "latex",
613
+ "bbox": [
614
+ 431,
615
+ 628,
616
+ 565,
617
+ 650
618
+ ],
619
+ "page_idx": 4
620
+ },
621
+ {
622
+ "type": "text",
623
+ "text": "Like Arivazhagan et al. (2019), we use the Differentiable Average Lagging. It is important to note that, unlike the original latency augmented training in Arivazhagan et al. (2019), Equation 15 is not the expected latency metric given $\\mathcal { C }$ , but weighted average $\\mathcal { C }$ on all the attentions. The real expected latency is $\\hat { \\pmb g } = \\mathrm { m a x } _ { l , h } \\left( \\pmb g ^ { l , h } \\right)$ instead of $\\bar { \\pmb { g } }$ , but using this directly would only affect the speed of the fastest head. Equation 15 can control every head in a way that the faster heads will be automatically assigned to larger weights and slower heads will also be moderately regularized. For MMA-H models, we found that the latency of are mainly due to outliers that skip almost every token. The weighted average latency loss is not sufficient to control the outliers. We therefore introduce the head divergence loss, the average variance of expected delays at each step, defined in Equation 16: ",
624
+ "bbox": [
625
+ 173,
626
+ 651,
627
+ 825,
628
+ 777
629
+ ],
630
+ "page_idx": 4
631
+ },
632
+ {
633
+ "type": "equation",
634
+ "img_path": "images/d133be55bb9c06500803d6386f5b6eccc9edfd580fd7b016a14f265bd0e6ae51.jpg",
635
+ "text": "$$\n\\begin{array} { c c l } { { { \\cal L } _ { v a r } } } & { { = } } & { { \\displaystyle \\frac { 1 } { L H } \\sum _ { l = 1 } ^ { L } \\sum _ { h = 1 } ^ { H } \\left( g _ { i } ^ { l , h } - \\bar { g } _ { i } \\right) ^ { 2 } } } \\end{array}\n$$",
636
+ "text_format": "latex",
637
+ "bbox": [
638
+ 372,
639
+ 780,
640
+ 624,
641
+ 825
642
+ ],
643
+ "page_idx": 4
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "where $\\begin{array} { r } { \\bar { g _ { i } } = \\frac { 1 } { L H } \\sum g _ { i } } \\end{array}$ The final objective function is presented in Equation 17: ",
648
+ "bbox": [
649
+ 171,
650
+ 828,
651
+ 683,
652
+ 844
653
+ ],
654
+ "page_idx": 4
655
+ },
656
+ {
657
+ "type": "equation",
658
+ "img_path": "images/4b3bedce76971cb30dbdf17af15e5198dd875394ef3d36c4eb5806191c3ef503.jpg",
659
+ "text": "$$\nL ( \\theta ) = - \\log ( \\pmb { y } \\mid \\pmb { x } ; \\theta ) + \\lambda _ { a v g } L _ { a v g } + \\lambda _ { v a r } L _ { v a r }\n$$",
660
+ "text_format": "latex",
661
+ "bbox": [
662
+ 338,
663
+ 847,
664
+ 660,
665
+ 864
666
+ ],
667
+ "page_idx": 4
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "where $\\lambda _ { a v g } , \\lambda _ { v a r }$ are hyperparameters that control both losses. Intuitively, while $\\lambda _ { a v g }$ controls the overall speed, $\\lambda _ { v a r }$ controls the divergence of the heads. Combining these two losses, we are able to dynamically control the range of attention heads so that we can control the latency and the reading buffer. For MMA-IL model, we only use $L _ { a v g }$ ; for MMA-H we only use $L _ { v a r }$ . ",
672
+ "bbox": [
673
+ 174,
674
+ 867,
675
+ 825,
676
+ 924
677
+ ],
678
+ "page_idx": 4
679
+ },
680
+ {
681
+ "type": "text",
682
+ "text": "3 EXPERIMENTAL SETUP ",
683
+ "text_level": 1,
684
+ "bbox": [
685
+ 176,
686
+ 102,
687
+ 398,
688
+ 118
689
+ ],
690
+ "page_idx": 5
691
+ },
692
+ {
693
+ "type": "text",
694
+ "text": "3.1 EVALUATION METRICS ",
695
+ "text_level": 1,
696
+ "bbox": [
697
+ 176,
698
+ 132,
699
+ 375,
700
+ 147
701
+ ],
702
+ "page_idx": 5
703
+ },
704
+ {
705
+ "type": "text",
706
+ "text": "We evaluate our model using quality and latency. For translation quality, we use tokenized BLEU 4 for IWSLT15 En-Vi and detokenized BLEU with SacreBLEU (Post, 2018) for WMT15 De-En. For latency, we use three different recent metrics, Average Proportion (AP) (Cho & Esipova, 2016), Average Lagging (AL) (Ma et al., 2019) and Differentiable Average Lagging (DAL) (Arivazhagan et al., 2019) 5. We remind the reader of the metric definitions in Appendix A.2. ",
707
+ "bbox": [
708
+ 174,
709
+ 159,
710
+ 825,
711
+ 229
712
+ ],
713
+ "page_idx": 5
714
+ },
715
+ {
716
+ "type": "text",
717
+ "text": "3.2 DATASETS ",
718
+ "text_level": 1,
719
+ "bbox": [
720
+ 174,
721
+ 246,
722
+ 287,
723
+ 260
724
+ ],
725
+ "page_idx": 5
726
+ },
727
+ {
728
+ "type": "table",
729
+ "img_path": "images/a4adcb998588a1deeeefc79d3a485af2e00f0490e81384c1c82b26e2507977b3.jpg",
730
+ "table_caption": [
731
+ "Table 1: Number of sentences in each split. "
732
+ ],
733
+ "table_footnote": [],
734
+ "table_body": "<table><tr><td>Dataset</td><td>Train</td><td>Validation</td><td>Test</td></tr><tr><td>IWSLT15 En-Vi</td><td>133k</td><td>1268</td><td>1553</td></tr><tr><td>WMT15 De-En</td><td>4.5M</td><td>3000</td><td>2169</td></tr></table>",
735
+ "bbox": [
736
+ 348,
737
+ 273,
738
+ 647,
739
+ 327
740
+ ],
741
+ "page_idx": 5
742
+ },
743
+ {
744
+ "type": "table",
745
+ "img_path": "images/5a20b82351116b7130fbb23c91d9e020a3379820bc239f4a9c9b9c1744ddac41.jpg",
746
+ "table_caption": [
747
+ "Table 2: Offline model performance with unidirectional encoder and greedy decoding. "
748
+ ],
749
+ "table_footnote": [],
750
+ "table_body": "<table><tr><td>Dataset</td><td>RNN</td><td>Transformer</td></tr><tr><td>IWSLT15 En-Vi</td><td>25.66</td><td>28.7</td></tr><tr><td>WMT15 De-En</td><td>28.4 (Arivazhagan et al., 2019)</td><td>32.3</td></tr></table>",
751
+ "bbox": [
752
+ 289,
753
+ 352,
754
+ 702,
755
+ 406
756
+ ],
757
+ "page_idx": 5
758
+ },
759
+ {
760
+ "type": "table",
761
+ "img_path": "images/3318ac05024d09cb9e614ffff33ca527e2945c2fe72be0d076ab05741cb6c556.jpg",
762
+ "table_caption": [],
763
+ "table_footnote": [
764
+ "Table 3: Effect of using a unidirectional encoder and greedy decoding to BLEU score. "
765
+ ],
766
+ "table_body": "<table><tr><td>Dataset</td><td>Beam Search</td><td>Bidirectional Encoder</td><td>Unidirectional Encoder</td></tr><tr><td rowspan=\"2\">WMT15 De-En</td><td>1</td><td>32.6</td><td>32.3</td></tr><tr><td>4</td><td>33.0</td><td>33.0</td></tr><tr><td rowspan=\"2\">IWSLT15 En-Vi</td><td>1</td><td>28.7</td><td>29.4</td></tr><tr><td>10</td><td>28.8</td><td>29.5</td></tr></table>",
767
+ "bbox": [
768
+ 236,
769
+ 431,
770
+ 758,
771
+ 510
772
+ ],
773
+ "page_idx": 5
774
+ },
775
+ {
776
+ "type": "text",
777
+ "text": "We evaluate our method on two standard machine translation datasets, IWSLT14 En-Vi and WMT15 De-En. Statistics of the datasets can be found in Table 1. For each dataset, we apply tokenization with the Moses (Koehn et al., 2007) tokenizer and preserve casing. ",
778
+ "bbox": [
779
+ 176,
780
+ 540,
781
+ 823,
782
+ 583
783
+ ],
784
+ "page_idx": 5
785
+ },
786
+ {
787
+ "type": "text",
788
+ "text": "IWSLT15 English-Vietnamese TED talks from IWSLT 2015 Evaluation Campaign (Cettolo et al., 2016). We follow the settings from Luong & Manning (2015) and Raffel et al. (2017). We replace words with frequency less than 5 by $< u n k >$ . We use tst2012 as a validation set tst2013 as a test set. ",
789
+ "bbox": [
790
+ 174,
791
+ 593,
792
+ 821,
793
+ 636
794
+ ],
795
+ "page_idx": 5
796
+ },
797
+ {
798
+ "type": "text",
799
+ "text": "WMT15 German-English We follow the setting from Arivazhagan et al. (2019). We apply byte pair encoding (BPE) (Sennrich et al., 2016) jointly on the source and target to construct a shared vocabulary with 32K symbols. We use newstest2013 as validation set and newstest2015 as test set. ",
800
+ "bbox": [
801
+ 174,
802
+ 638,
803
+ 821,
804
+ 681
805
+ ],
806
+ "page_idx": 5
807
+ },
808
+ {
809
+ "type": "text",
810
+ "text": "3.3 MODELS ",
811
+ "text_level": 1,
812
+ "bbox": [
813
+ 174,
814
+ 698,
815
+ 276,
816
+ 712
817
+ ],
818
+ "page_idx": 5
819
+ },
820
+ {
821
+ "type": "text",
822
+ "text": "We evaluate MMA-H and MMA-IL models on both datasets. The MILK model we evaluate on IWSLT15 En-Vi is based on Luong et al. (2015) rather than RNMT $^ +$ (Chen et al., 2018). In general, our offline models use unidirectional encoders, i.e. the encoder self-attention can only attend to previous states, and greedy decoding. We report offline model performance in Table 2 and the effect of using unidirectional encoders and greedy decoding in Table 3. For MMA models, we replace the encoder-decoder layers with MMA and keep other hyperparameter settings the same as the offline model. Detailed hyperparameter settings can be found in subsection A.1. We use the Fairseq library (Ott et al., 2019) for our implementation. ",
823
+ "bbox": [
824
+ 174,
825
+ 723,
826
+ 825,
827
+ 835
828
+ ],
829
+ "page_idx": 5
830
+ },
831
+ {
832
+ "type": "text",
833
+ "text": "4 RESULTS ",
834
+ "text_level": 1,
835
+ "bbox": [
836
+ 174,
837
+ 102,
838
+ 281,
839
+ 117
840
+ ],
841
+ "page_idx": 6
842
+ },
843
+ {
844
+ "type": "text",
845
+ "text": "In this section, we present the main results of our model in terms of latency-quality tradeoffs, ablation studies and analyses. In the first study, we analyze the effect of the variance loss on the attention span. Then, we study the effect of the number of decoder layers and decoder heads on quality and latency. We also provide a case study for the behavior of attention heads in an example. Finally, we study the relationship between the rank of an attention head and the layer it belongs to. ",
846
+ "bbox": [
847
+ 174,
848
+ 136,
849
+ 825,
850
+ 205
851
+ ],
852
+ "page_idx": 6
853
+ },
854
+ {
855
+ "type": "image",
856
+ "img_path": "images/e122b7036362526ca9df24fd1d502cd25f56d35adb6686383751be035f195e06.jpg",
857
+ "image_caption": [
858
+ "Figure 2: Latency-quality tradeoffs for MILk (Arivazhagan et al., 2019) and MMA on IWSLT15 En-Vi and WMT15 De-En. Black dashed line indicates the unidirectional offline transformer model with greedy search. "
859
+ ],
860
+ "image_footnote": [],
861
+ "bbox": [
862
+ 174,
863
+ 224,
864
+ 808,
865
+ 465
866
+ ],
867
+ "page_idx": 6
868
+ },
869
+ {
870
+ "type": "text",
871
+ "text": "4.1 LATENCY-QUALITY TRADEOFFS ",
872
+ "text_level": 1,
873
+ "bbox": [
874
+ 176,
875
+ 545,
876
+ 437,
877
+ 559
878
+ ],
879
+ "page_idx": 6
880
+ },
881
+ {
882
+ "type": "text",
883
+ "text": "We plot the quality-latency curves for MMA-H and MMA-IL in Figure 2. The BLEU and latency scores on the test sets are generated by setting a latency range and selecting the checkpoint with best BLEU score on the validation set. We use differentiable average lagging (Arivazhagan et al., 2019) when setting the latency range. We find that for a given latency, our models obtain a better translation quality. While MMA-IL tends to have a decrease in quality as the latency decreases, MMA-H has a small gain in quality as latency decreases: a larger latency does not necessarily mean an increase in source information available to the model. In fact, the large latency is from the outlier attention heads, which skip the entire source sentence and point to the end of the sentence. The outliers not only increase the latency but they also do not provide useful information. We introduce the attention variance loss to eliminate the outliers, as such a loss makes the attention heads focus on the current context for translating the new target token. ",
884
+ "bbox": [
885
+ 174,
886
+ 573,
887
+ 825,
888
+ 726
889
+ ],
890
+ "page_idx": 6
891
+ },
892
+ {
893
+ "type": "text",
894
+ "text": "It is interesting to observe that MMA-H has a better latency-quality tradeoff than $\\mathrm { M I L K } ^ { 7 }$ even though each head only attends to only one state. Although MMA-H is not yet able to handle an arbitrarily long input (without resorting to segmenting the input), since both encoder and decoder self-attention have an infinite lookback, that model represents a good step in that direction. ",
895
+ "bbox": [
896
+ 174,
897
+ 733,
898
+ 825,
899
+ 789
900
+ ],
901
+ "page_idx": 6
902
+ },
903
+ {
904
+ "type": "text",
905
+ "text": "4.2 ATTENTION SPAN ",
906
+ "text_level": 1,
907
+ "bbox": [
908
+ 176,
909
+ 809,
910
+ 338,
911
+ 824
912
+ ],
913
+ "page_idx": 6
914
+ },
915
+ {
916
+ "type": "text",
917
+ "text": "In subsection 2.3, we introduced the attention variance loss to MMA-H in order to prevent outlier attention heads from increasing the latency or increasing the attention span. We have already evaluated the effectiveness of this method on latency in subsection 4.1. We also want to measure the difference between the fastest and slowest heads at each decoding step. We define the average ",
918
+ "bbox": [
919
+ 174,
920
+ 837,
921
+ 825,
922
+ 892
923
+ ],
924
+ "page_idx": 6
925
+ },
926
+ {
927
+ "type": "text",
928
+ "text": "attention span in Equation 18: ",
929
+ "bbox": [
930
+ 174,
931
+ 103,
932
+ 370,
933
+ 118
934
+ ],
935
+ "page_idx": 7
936
+ },
937
+ {
938
+ "type": "equation",
939
+ "img_path": "images/abf4018244aad5899baee17fe91fedebf02e95cb4d0f3e9cc679c572b65b9cc5.jpg",
940
+ "text": "$$\n\\bar { S } = \\frac { 1 } { \\vert \\pmb { y } \\vert } \\left( \\sum _ { i } ^ { \\vert \\pmb { y } \\vert } \\underset { l , h } { \\operatorname* { m a x } } t _ { i } ^ { l , h } - \\underset { l , h } { \\operatorname* { m i n } } t _ { i } ^ { l , h } \\right)\n$$",
941
+ "text_format": "latex",
942
+ "bbox": [
943
+ 375,
944
+ 126,
945
+ 620,
946
+ 176
947
+ ],
948
+ "page_idx": 7
949
+ },
950
+ {
951
+ "type": "text",
952
+ "text": "It estimates the reading buffer we need for streaming translation. We show the relation between the average attention span versus $\\lambda _ { v a r }$ in Figure 3. As expected, the average attention span is reduced as we increase $\\lambda _ { v a r }$ . ",
953
+ "bbox": [
954
+ 174,
955
+ 183,
956
+ 825,
957
+ 227
958
+ ],
959
+ "page_idx": 7
960
+ },
961
+ {
962
+ "type": "image",
963
+ "img_path": "images/0f751c2faf86a11373cba7cf525d322dc182947f9c6a18f187c49c68d5fad146.jpg",
964
+ "image_caption": [
965
+ "Figure 3: Effect of $\\lambda _ { v a r }$ on the average attention span. The variance loss works as intended by reducing the span with higher weights. "
966
+ ],
967
+ "image_footnote": [],
968
+ "bbox": [
969
+ 289,
970
+ 239,
971
+ 710,
972
+ 351
973
+ ],
974
+ "page_idx": 7
975
+ },
976
+ {
977
+ "type": "text",
978
+ "text": "4.3 EFFECT ON NUMBER OF LAYERS AND NUMBER OF HEADS ",
979
+ "text_level": 1,
980
+ "bbox": [
981
+ 174,
982
+ 428,
983
+ 611,
984
+ 440
985
+ ],
986
+ "page_idx": 7
987
+ },
988
+ {
989
+ "type": "text",
990
+ "text": "One motivation to introduce MMA is to adapt the Transformer, which is the current state-of-the-art model for machine translation, to online decoding. Important features of the Transformer architecture include having a separate attention layer for each decoder layer block and multihead attention. In this section, we test the effect of these two components on the offline, MMA-H, and MMA-IL models from a quality and latency perspective. We report quality as measured by detokenized BLEU and latency as measured by DAL on the WMT13 validation set in Figure 4. We set $\\lambda _ { a v g } = 0 . 2$ for MMA-IL and $\\lambda _ { v a r } = 0 . 2$ for MMA-H. ",
991
+ "bbox": [
992
+ 174,
993
+ 453,
994
+ 825,
995
+ 550
996
+ ],
997
+ "page_idx": 7
998
+ },
999
+ {
1000
+ "type": "text",
1001
+ "text": "The offline model benefits from having more than one decoder layer. In the case of 1 decoder layer, increasing the number of attention heads is beneficial but in the case of 3 and 6 decoder layers, we do not see much benefit from using more than 2 heads. The best performance is obtained for 3 layers and 2 heads (6 effective heads). The MMA-IL model behaves similarly to the offline model, and the best performance is observed with 6 layers and 4 heads (24 effective heads). For MMA-H, with 1 layer, performance improves with more heads. With 3 layers, the single-head setting is the most effective (3 effective heads). Finally, with 6 layers, the best performance is reached with 16 heads (96 effective heads). ",
1002
+ "bbox": [
1003
+ 174,
1004
+ 558,
1005
+ 825,
1006
+ 669
1007
+ ],
1008
+ "page_idx": 7
1009
+ },
1010
+ {
1011
+ "type": "text",
1012
+ "text": "The general trend we observe is that performance improves as we increase the number of effective heads, either from multiple layers or multihead attention, up to a certain point, then either plateaus or degrades. This motivates the introduction of the MMA model. ",
1013
+ "bbox": [
1014
+ 176,
1015
+ 676,
1016
+ 821,
1017
+ 718
1018
+ ],
1019
+ "page_idx": 7
1020
+ },
1021
+ {
1022
+ "type": "text",
1023
+ "text": "We also note that latency increases with the number of effective attention heads. This is due to having fixed loss weights: when more heads are involved, we should increase $\\lambda _ { v a r }$ or $\\lambda _ { a v g }$ to better control latency. ",
1024
+ "bbox": [
1025
+ 174,
1026
+ 724,
1027
+ 825,
1028
+ 767
1029
+ ],
1030
+ "page_idx": 7
1031
+ },
1032
+ {
1033
+ "type": "text",
1034
+ "text": "4.4 ATTENTION BEHAVIORS ",
1035
+ "text_level": 1,
1036
+ "bbox": [
1037
+ 176,
1038
+ 786,
1039
+ 380,
1040
+ 800
1041
+ ],
1042
+ "page_idx": 7
1043
+ },
1044
+ {
1045
+ "type": "text",
1046
+ "text": "We characterize attention behaviors by providing a running example of MMA-H and MMA-IL, shown in Figure 5. Each curve represents the path that an attention head goes through at inference time. For MMA-H, shown in Figure 5a, we found that when the source and target tokens have the same order, the attention heads behave linearly and the distance between fastest head and slowest head is small. For example, this can be observed from partial sentence pair “I also didn’t know that” and target tokens “Tôi cũng không biết rằng”, which have the same order. However, when the source tokens and target tokens have different orders, such as “the second step” and “bước (step) thứ hai (second)”, the model will generate “bước (step)” first and some heads will stay in the past to retain the information for later reordered translation “thứ hai (second)”. We can also see that the attention heads have a near-diagonal trajectory, which is appropriate for streaming inputs. ",
1047
+ "bbox": [
1048
+ 174,
1049
+ 811,
1050
+ 825,
1051
+ 924
1052
+ ],
1053
+ "page_idx": 7
1054
+ },
1055
+ {
1056
+ "type": "image",
1057
+ "img_path": "images/587b8944db8cce31706c574a36a9ec6d40a868064c34c383e996803aed29b0b0.jpg",
1058
+ "image_caption": [
1059
+ "Figure 4: Effect of the number of decoder attention heads and the number of decoder attention layers on quality and latency, reported on the WMT13 validation set. "
1060
+ ],
1061
+ "image_footnote": [],
1062
+ "bbox": [
1063
+ 189,
1064
+ 103,
1065
+ 810,
1066
+ 343
1067
+ ],
1068
+ "page_idx": 8
1069
+ },
1070
+ {
1071
+ "type": "text",
1072
+ "text": "",
1073
+ "bbox": [
1074
+ 174,
1075
+ 412,
1076
+ 821,
1077
+ 441
1078
+ ],
1079
+ "page_idx": 8
1080
+ },
1081
+ {
1082
+ "type": "text",
1083
+ "text": "The behavior of the heads in MMA-IL models is shown in Figure 5b. Notice that we remove the partial softmax alignment in this figure. We don’t expect streaming capability for MMA-IL: some heads stop at early position of the source sentence to retain the history information. Moreover, because MMA-IL has more information when generating a new target token, it tends to produce translations with better quality. In this example, the MMA-IL model has a better translation on “isolate the victim” than MMA-H (“là cô lập nạn nhân” vs “là tách biệt nạn nhân”) ",
1084
+ "bbox": [
1085
+ 174,
1086
+ 448,
1087
+ 825,
1088
+ 532
1089
+ ],
1090
+ "page_idx": 8
1091
+ },
1092
+ {
1093
+ "type": "image",
1094
+ "img_path": "images/f9caf5f55023339b16fb95b389bc65cc48ec79600f2fc76d230026679d0627e7.jpg",
1095
+ "image_caption": [
1096
+ "Figure 5: Running examples on IWSLT15 English-Vietnamese dataset "
1097
+ ],
1098
+ "image_footnote": [],
1099
+ "bbox": [
1100
+ 240,
1101
+ 550,
1102
+ 758,
1103
+ 767
1104
+ ],
1105
+ "page_idx": 8
1106
+ },
1107
+ {
1108
+ "type": "text",
1109
+ "text": "4.5 RANK OF THE HEADS ",
1110
+ "text_level": 1,
1111
+ "bbox": [
1112
+ 176,
1113
+ 827,
1114
+ 362,
1115
+ 840
1116
+ ],
1117
+ "page_idx": 8
1118
+ },
1119
+ {
1120
+ "type": "text",
1121
+ "text": "In Figure 6, we calculate the average and standard deviation of rank of each head when generating every target token. For MMA-IL, we find that heads in lower layers tend to have higher rank and are thus slower. However, in MMA-H, the difference of the average rank are smaller. Furthermore, the standard deviation is very large which means that the order of the heads in MMA-H changes frequently over the inference process. ",
1122
+ "bbox": [
1123
+ 174,
1124
+ 853,
1125
+ 825,
1126
+ 924
1127
+ ],
1128
+ "page_idx": 8
1129
+ },
1130
+ {
1131
+ "type": "image",
1132
+ "img_path": "images/945370a5e1d53aa3ee0f21fc5e5f3110a0171fb97a8e1797f201cb0464090bba.jpg",
1133
+ "image_caption": [
1134
+ "Figure 6: The average rank of attention heads during inference on IWSLT15 En-Vi. Error bars indicate the standard deviation. L indicates the layer number and $\\mathrm { H }$ indicates the head number. "
1135
+ ],
1136
+ "image_footnote": [],
1137
+ "bbox": [
1138
+ 238,
1139
+ 101,
1140
+ 754,
1141
+ 299
1142
+ ],
1143
+ "page_idx": 9
1144
+ },
1145
+ {
1146
+ "type": "text",
1147
+ "text": "5 RELATED WORK ",
1148
+ "text_level": 1,
1149
+ "bbox": [
1150
+ 176,
1151
+ 361,
1152
+ 344,
1153
+ 377
1154
+ ],
1155
+ "page_idx": 9
1156
+ },
1157
+ {
1158
+ "type": "text",
1159
+ "text": "Recent work on simultaneous machine translation falls into three categories. In the first one, models use a rule-based policy for reading input and writing output. Cho & Esipova (2016) propose a WaitIf-\\* policy to enable an offline model to decode simultaneously. Ma et al. (2019) propose a wait- $k$ policy where the model first reads $k$ tokens, then alternates between read and write actions. Dalvi et al. (2018) propose an incremental decoding method, also based on a rule-based schedule. In the second category, a flexible policy is learnt from data. Grissom II et al. (2014) introduce a Markov chain to phrase-based machine translation models for simultaneous machine translation, in which they apply reinforcement learning to learn the read-write policy based on states. Gu et al. (2017) introduce an agent which learns to make decisions on when to translate from the interaction with a pre-trained offline neural machine translation model. Luo et al. (2017) used continuous rewards policy gradient for online alignments for speech recognition. Lawson et al. (2018) proposed a hard alignment with variational inference for online decoding. Alinejad et al. (2018) propose a new operation ”predict” which predicts future source tokens. Zheng et al. (2019b) introduce a restricted dynamic oracle and restricted imitation learning for simultaneous translation. Zheng et al. (2019a) train the agent with an action sequence from labels that are generated based on the rank of the gold target word given partial input. Models from the last category leverage monotonic attention and replace the softmax attention with an expected attention calculated from a stepwise Bernoulli selection probability. Raffel et al. (2017) first introduce the concept of monotonic attention for online linear time decoding, where the attention only attends to one encoder state at a time. Chiu & Raffel (2018) extended that work to let the model attend to a chunk of encoder state. Arivazhagan et al. (2019) also make use of the monotonic attention but introduce an infinite lookback to improve the translation quality. ",
1160
+ "bbox": [
1161
+ 173,
1162
+ 392,
1163
+ 825,
1164
+ 698
1165
+ ],
1166
+ "page_idx": 9
1167
+ },
1168
+ {
1169
+ "type": "text",
1170
+ "text": "6 CONCLUSION ",
1171
+ "text_level": 1,
1172
+ "bbox": [
1173
+ 174,
1174
+ 718,
1175
+ 318,
1176
+ 734
1177
+ ],
1178
+ "page_idx": 9
1179
+ },
1180
+ {
1181
+ "type": "text",
1182
+ "text": "In this paper, we propose two variants of the monotonic multihead attention model for simultaneous machine translation. By introducing two new targeted loss terms which allow us to control both latency and attention span, we are able to leverage the power of the Transformer architecture to achieve better quality-latency trade-offs than the previous state-of-the-art model. We also present detailed ablation studies demonstrating the efficacy and rationale of our approach. By introducing these stronger simultaneous sequence-to-sequence models, we hope to facilitate important applications, such as high-quality real-time interpretation between human speakers. ",
1183
+ "bbox": [
1184
+ 173,
1185
+ 750,
1186
+ 825,
1187
+ 847
1188
+ ],
1189
+ "page_idx": 9
1190
+ },
1191
+ {
1192
+ "type": "text",
1193
+ "text": "REFERENCES ",
1194
+ "text_level": 1,
1195
+ "bbox": [
1196
+ 176,
1197
+ 103,
1198
+ 285,
1199
+ 117
1200
+ ],
1201
+ "page_idx": 10
1202
+ },
1203
+ {
1204
+ "type": "text",
1205
+ "text": "Ashkan Alinejad, Maryam Siahbani, and Anoop Sarkar. Prediction improves simultaneous neural machine translation. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 3022–3027, 2018. ",
1206
+ "bbox": [
1207
+ 174,
1208
+ 126,
1209
+ 823,
1210
+ 167
1211
+ ],
1212
+ "page_idx": 10
1213
+ },
1214
+ {
1215
+ "type": "text",
1216
+ "text": "Naveen Arivazhagan, Colin Cherry, Wolfgang Macherey, Chung-Cheng Chiu, Semih Yavuz, Ruoming Pang, Wei Li, and Colin Raffel. Monotonic infinite lookback attention for simultaneous machine translation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 1313–1323, Florence, Italy, July 2019. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/P19-1126. ",
1217
+ "bbox": [
1218
+ 173,
1219
+ 176,
1220
+ 825,
1221
+ 247
1222
+ ],
1223
+ "page_idx": 10
1224
+ },
1225
+ {
1226
+ "type": "text",
1227
+ "text": "Lo¨ıc Barrault, Ondˇrej Bojar, Marta R. Costa-jussa, Christian Federmann, Mark Fishel, Yvette \\` Graham, Barry Haddow, Matthias Huck, Philipp Koehn, Shervin Malmasi, Christof Monz, Mathias Muller, Santanu Pal, Matt Post, and Marcos Zampieri. Findings of the 2019 con- ¨ ference on machine translation (WMT19). In Proceedings of the Fourth Conference on Machine Translation (Volume 2: Shared Task Papers, Day 1), pp. 1–61, Florence, Italy, August 2019. Association for Computational Linguistics. doi: 10.18653/v1/W19-5301. URL https://www.aclweb.org/anthology/W19-5301. ",
1228
+ "bbox": [
1229
+ 173,
1230
+ 255,
1231
+ 825,
1232
+ 353
1233
+ ],
1234
+ "page_idx": 10
1235
+ },
1236
+ {
1237
+ "type": "text",
1238
+ "text": "Mauro Cettolo, Niehues Jan, Stuker Sebastian, Luisa Bentivogli, Roldano Cattoni, and Marcello ¨ Federico. The iwslt 2016 evaluation campaign. In International Workshop on Spoken Language Translation, 2016. ",
1239
+ "bbox": [
1240
+ 174,
1241
+ 362,
1242
+ 825,
1243
+ 405
1244
+ ],
1245
+ "page_idx": 10
1246
+ },
1247
+ {
1248
+ "type": "text",
1249
+ "text": "Mia Xu Chen, Orhan Firat, Ankur Bapna, Melvin Johnson, Wolfgang Macherey, George Foster, Llion Jones, Mike Schuster, Noam Shazeer, Niki Parmar, et al. The best of both worlds: Combining recent advances in neural machine translation. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 76–86, 2018. ",
1250
+ "bbox": [
1251
+ 174,
1252
+ 412,
1253
+ 825,
1254
+ 469
1255
+ ],
1256
+ "page_idx": 10
1257
+ },
1258
+ {
1259
+ "type": "text",
1260
+ "text": "Chung-Cheng Chiu and Colin Raffel. Monotonic chunkwise attention. 2018. URL https:// openreview.net/pdf?id $\\underline { { \\underline { { \\mathbf { \\Pi } } } } } =$ Hko85plCW. ",
1261
+ "bbox": [
1262
+ 168,
1263
+ 478,
1264
+ 821,
1265
+ 506
1266
+ ],
1267
+ "page_idx": 10
1268
+ },
1269
+ {
1270
+ "type": "text",
1271
+ "text": "Kyunghyun Cho and Masha Esipova. Can neural machine translation do simultaneous translation? arXiv preprint arXiv:1606.02012, 2016. ",
1272
+ "bbox": [
1273
+ 171,
1274
+ 515,
1275
+ 823,
1276
+ 544
1277
+ ],
1278
+ "page_idx": 10
1279
+ },
1280
+ {
1281
+ "type": "text",
1282
+ "text": "Fahim Dalvi, Nadir Durrani, Hassan Sajjad, and Stephan Vogel. Incremental decoding and training methods for simultaneous translation in neural machine translation. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pp. 493–499, New Orleans, Louisiana, June 2018. Association for Computational Linguistics. doi: 10.18653/v1/N18-2079. URL https://www.aclweb.org/anthology/N18-2079. ",
1283
+ "bbox": [
1284
+ 174,
1285
+ 553,
1286
+ 825,
1287
+ 637
1288
+ ],
1289
+ "page_idx": 10
1290
+ },
1291
+ {
1292
+ "type": "text",
1293
+ "text": "Alvin Grissom II, He He, Jordan Boyd-Graber, John Morgan, and Hal Daume III. Don’t until the ´ final verb wait: Reinforcement learning for simultaneous machine translation. In Proceedings of the 2014 Conference on empirical methods in natural language processing (EMNLP), pp. 1342– 1352, 2014. ",
1294
+ "bbox": [
1295
+ 173,
1296
+ 645,
1297
+ 826,
1298
+ 702
1299
+ ],
1300
+ "page_idx": 10
1301
+ },
1302
+ {
1303
+ "type": "text",
1304
+ "text": "Jiatao Gu, Graham Neubig, Kyunghyun Cho, and Victor OK Li. Learning to translate in real-time with neural machine translation. In 15th Conference of the European Chapter of the Association for Computational Linguistics, EACL 2017, pp. 1053–1062. Association for Computational Linguistics (ACL), 2017. ",
1305
+ "bbox": [
1306
+ 173,
1307
+ 709,
1308
+ 825,
1309
+ 766
1310
+ ],
1311
+ "page_idx": 10
1312
+ },
1313
+ {
1314
+ "type": "text",
1315
+ "text": "Philipp Koehn, Hieu Hoang, Alexandra Birch, Chris Callison-Burch, Marcello Federico, Nicola Bertoldi, Brooke Cowan, Wade Shen, Christine Moran, Richard Zens, Chris Dyer, Ondˇrej Bojar, Alexandra Constantin, and Evan Herbst. Moses: Open source toolkit for statistical machine translation. In Proceedings of the 45th Annual Meeting of the Association for Computational Linguistics Companion Volume Proceedings of the Demo and Poster Sessions, pp. 177–180, Prague, Czech Republic, June 2007. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/P07-2045. ",
1316
+ "bbox": [
1317
+ 173,
1318
+ 775,
1319
+ 825,
1320
+ 873
1321
+ ],
1322
+ "page_idx": 10
1323
+ },
1324
+ {
1325
+ "type": "text",
1326
+ "text": "Dieterich Lawson, Chung-Cheng Chiu, George Tucker, Colin Raffel, Kevin Swersky, and Navdeep Jaitly. Learning hard alignments with variational inference. In 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 5799–5803. IEEE, 2018. ",
1327
+ "bbox": [
1328
+ 176,
1329
+ 882,
1330
+ 823,
1331
+ 924
1332
+ ],
1333
+ "page_idx": 10
1334
+ },
1335
+ {
1336
+ "type": "text",
1337
+ "text": "Yuping Luo, Chung-Cheng Chiu, Navdeep Jaitly, and Ilya Sutskever. Learning online alignments with continuous rewards policy gradient. In 2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 2801–2805. IEEE, 2017. ",
1338
+ "bbox": [
1339
+ 176,
1340
+ 103,
1341
+ 823,
1342
+ 146
1343
+ ],
1344
+ "page_idx": 11
1345
+ },
1346
+ {
1347
+ "type": "text",
1348
+ "text": "Minh-Thang Luong and Christopher D Manning. Stanford neural machine translation systems for spoken language domains. 2015. ",
1349
+ "bbox": [
1350
+ 174,
1351
+ 155,
1352
+ 823,
1353
+ 183
1354
+ ],
1355
+ "page_idx": 11
1356
+ },
1357
+ {
1358
+ "type": "text",
1359
+ "text": "Minh-Thang Luong, Hieu Pham, and Christopher D Manning. Effective approaches to attentionbased neural machine translation. arXiv preprint arXiv:1508.04025, 2015. ",
1360
+ "bbox": [
1361
+ 174,
1362
+ 191,
1363
+ 821,
1364
+ 220
1365
+ ],
1366
+ "page_idx": 11
1367
+ },
1368
+ {
1369
+ "type": "text",
1370
+ "text": "Mingbo Ma, Liang Huang, Hao Xiong, Renjie Zheng, Kaibo Liu, Baigong Zheng, Chuanqiang Zhang, Zhongjun He, Hairong Liu, Xing Li, Hua Wu, and Haifeng Wang. STACL: Simultaneous translation with implicit anticipation and controllable latency using prefix-to-prefix framework. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 3025–3036, Florence, Italy, July 2019. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/P19-1289. ",
1371
+ "bbox": [
1372
+ 174,
1373
+ 228,
1374
+ 825,
1375
+ 314
1376
+ ],
1377
+ "page_idx": 11
1378
+ },
1379
+ {
1380
+ "type": "text",
1381
+ "text": "Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. fairseq: A fast, extensible toolkit for sequence modeling. In Proceedings of NAACL-HLT 2019: Demonstrations, 2019. ",
1382
+ "bbox": [
1383
+ 174,
1384
+ 321,
1385
+ 825,
1386
+ 364
1387
+ ],
1388
+ "page_idx": 11
1389
+ },
1390
+ {
1391
+ "type": "text",
1392
+ "text": "Matt Post. A call for clarity in reporting BLEU scores. In Proceedings of the Third Conference on Machine Translation: Research Papers, pp. 186–191, Belgium, Brussels, October 2018. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/ W18-6319. ",
1393
+ "bbox": [
1394
+ 173,
1395
+ 373,
1396
+ 825,
1397
+ 429
1398
+ ],
1399
+ "page_idx": 11
1400
+ },
1401
+ {
1402
+ "type": "text",
1403
+ "text": "Colin Raffel, Minh-Thang Luong, Peter J Liu, Ron J Weiss, and Douglas Eck. Online and linear-time attention by enforcing monotonic alignments. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 2837–2846. JMLR. org, 2017. ",
1404
+ "bbox": [
1405
+ 176,
1406
+ 438,
1407
+ 823,
1408
+ 481
1409
+ ],
1410
+ "page_idx": 11
1411
+ },
1412
+ {
1413
+ "type": "text",
1414
+ "text": "Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1715–1725, 2016. ",
1415
+ "bbox": [
1416
+ 173,
1417
+ 489,
1418
+ 823,
1419
+ 532
1420
+ ],
1421
+ "page_idx": 11
1422
+ },
1423
+ {
1424
+ "type": "text",
1425
+ "text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017. ",
1426
+ "bbox": [
1427
+ 174,
1428
+ 540,
1429
+ 825,
1430
+ 583
1431
+ ],
1432
+ "page_idx": 11
1433
+ },
1434
+ {
1435
+ "type": "text",
1436
+ "text": "Baigong Zheng, Renjie Zheng, Mingbo Ma, and Liang Huang. Simpler and faster learning of adaptive policies for simultaneous translation. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 1349–1354, Hong Kong, China, November 2019a. Association for Computational Linguistics. doi: 10.18653/v1/D19-1137. URL https://www.aclweb.org/anthology/D19-1137. ",
1437
+ "bbox": [
1438
+ 173,
1439
+ 592,
1440
+ 825,
1441
+ 676
1442
+ ],
1443
+ "page_idx": 11
1444
+ },
1445
+ {
1446
+ "type": "text",
1447
+ "text": "Baigong Zheng, Renjie Zheng, Mingbo Ma, and Liang Huang. Simultaneous translation with flexible policy via restricted imitation learning. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 5816–5822, Florence, Italy, July 2019b. Association for Computational Linguistics. doi: 10.18653/v1/P19-1582. URL https://www.aclweb. org/anthology/P19-1582. ",
1448
+ "bbox": [
1449
+ 174,
1450
+ 685,
1451
+ 825,
1452
+ 755
1453
+ ],
1454
+ "page_idx": 11
1455
+ },
1456
+ {
1457
+ "type": "text",
1458
+ "text": "A APPENDIX ",
1459
+ "text_level": 1,
1460
+ "bbox": [
1461
+ 176,
1462
+ 781,
1463
+ 299,
1464
+ 796
1465
+ ],
1466
+ "page_idx": 11
1467
+ },
1468
+ {
1469
+ "type": "text",
1470
+ "text": "A.1 HYPERPARAMETERS ",
1471
+ "text_level": 1,
1472
+ "bbox": [
1473
+ 176,
1474
+ 811,
1475
+ 361,
1476
+ 827
1477
+ ],
1478
+ "page_idx": 11
1479
+ },
1480
+ {
1481
+ "type": "text",
1482
+ "text": "The hyperparameters we used for offline and monotonic transformer models are defined in Table 4. ",
1483
+ "bbox": [
1484
+ 173,
1485
+ 838,
1486
+ 818,
1487
+ 853
1488
+ ],
1489
+ "page_idx": 11
1490
+ },
1491
+ {
1492
+ "type": "text",
1493
+ "text": "A.2 LATENCY METRICS DEFINITIONS ",
1494
+ "text_level": 1,
1495
+ "bbox": [
1496
+ 176,
1497
+ 868,
1498
+ 450,
1499
+ 883
1500
+ ],
1501
+ "page_idx": 11
1502
+ },
1503
+ {
1504
+ "type": "text",
1505
+ "text": "Given the delays $\\mathbf { g } = \\{ g _ { 1 } , g _ { 2 } , . . . , g _ { | \\mathbf { y } | } \\}$ of generating each target token, AP, AL and DAL are defined in Table 5. ",
1506
+ "bbox": [
1507
+ 174,
1508
+ 895,
1509
+ 823,
1510
+ 922
1511
+ ],
1512
+ "page_idx": 11
1513
+ },
1514
+ {
1515
+ "type": "table",
1516
+ "img_path": "images/786fa73e10dfc49d9f8315c3ad84f607dc02200090f3349dded387e08a2387cf.jpg",
1517
+ "table_caption": [
1518
+ "Table 4: Offline and monotonic models hyperparameters. "
1519
+ ],
1520
+ "table_footnote": [],
1521
+ "table_body": "<table><tr><td>Hyperparameter</td><td>WMT15 German-English</td><td>IWSLT English-Vietnamese</td></tr><tr><td>encoder embed dim</td><td>1024</td><td>512</td></tr><tr><td>encoder ffn embed dim</td><td>4096</td><td>1024</td></tr><tr><td>encoder attention heads</td><td>16</td><td>4</td></tr><tr><td>encoder layers</td><td></td><td>6</td></tr><tr><td>decoder embed dim</td><td>1024</td><td>512</td></tr><tr><td>decoder ffn embed dim</td><td>4096</td><td>1024</td></tr><tr><td>decoder attention heads</td><td>16</td><td>4</td></tr><tr><td>decoder layers</td><td></td><td>6</td></tr><tr><td>dropout</td><td>0.3</td><td></td></tr><tr><td>optimizer</td><td></td><td>adam</td></tr><tr><td>adam-β</td><td></td><td>(0.9,0.98)</td></tr><tr><td>clip-norm</td><td></td><td>0.0</td></tr><tr><td>lr lr scheduler</td><td></td><td>0.0005</td></tr><tr><td></td><td></td><td>inverse sqrt</td></tr><tr><td>warmup-updates</td><td></td><td>4000</td></tr><tr><td>warmup-init-lr</td><td></td><td>1e-07</td></tr><tr><td>label-smoothing</td><td></td><td>0.1</td></tr><tr><td>max tokens</td><td>3584×8×8×2</td><td>16000</td></tr></table>",
1522
+ "bbox": [
1523
+ 218,
1524
+ 101,
1525
+ 781,
1526
+ 380
1527
+ ],
1528
+ "page_idx": 12
1529
+ },
1530
+ {
1531
+ "type": "table",
1532
+ "img_path": "images/e2b50d79a218d254a363d0b2b6eb603cad830f95fe74ac3ffb11fbfe8fcddcd5.jpg",
1533
+ "table_caption": [
1534
+ "Table 5: The calculation of latency metrics, given source $_ { \\textbf { \\em x } }$ , target $\\textbf { { y } }$ and delays $\\pmb { g }$ "
1535
+ ],
1536
+ "table_footnote": [],
1537
+ "table_body": "<table><tr><td colspan=\"2\">Latency Metric</td></tr><tr><td>Average Proportion</td><td>y 1 M gi lacllyl i=1</td></tr><tr><td>Average Lagging</td><td>1 T i-1 gi 1y1/ac T i=1 where T = arg maxi(gi = |xl)</td></tr><tr><td>1 ly Differentiable Average Lagging</td><td>lyl i-1 M gi lyl//ac| i=1 gi i=0 where g&#x27; = ly max(gi, 9i-1 i&lt;0 [x</td></tr></table>",
1538
+ "bbox": [
1539
+ 232,
1540
+ 434,
1541
+ 766,
1542
+ 670
1543
+ ],
1544
+ "page_idx": 12
1545
+ },
1546
+ {
1547
+ "type": "text",
1548
+ "text": "A.3 DETAILED RESULTS ",
1549
+ "text_level": 1,
1550
+ "bbox": [
1551
+ 176,
1552
+ 738,
1553
+ 354,
1554
+ 752
1555
+ ],
1556
+ "page_idx": 12
1557
+ },
1558
+ {
1559
+ "type": "text",
1560
+ "text": "We provide the detailed results in Figure 2 as Table 6 and Table 7. ",
1561
+ "bbox": [
1562
+ 174,
1563
+ 770,
1564
+ 606,
1565
+ 785
1566
+ ],
1567
+ "page_idx": 12
1568
+ },
1569
+ {
1570
+ "type": "text",
1571
+ "text": "A.4 THRESHOLD OF READING ACTION ",
1572
+ "text_level": 1,
1573
+ "bbox": [
1574
+ 176,
1575
+ 820,
1576
+ 452,
1577
+ 835
1578
+ ],
1579
+ "page_idx": 12
1580
+ },
1581
+ {
1582
+ "type": "text",
1583
+ "text": "We explore a simple method that can adjust system’s latency at inference time without training new models. In Algorithm 1 line 8, 0.5 was used as an threshold. One can set different threshold $p$ during the inference time to control the latency. We run the pilot experiments on IWSLT15 En-Vi dataset and the results are shown as Table 8. Although this method doesn’t require training new model, it dramatically hurts the translation quality. ",
1584
+ "bbox": [
1585
+ 174,
1586
+ 853,
1587
+ 825,
1588
+ 924
1589
+ ],
1590
+ "page_idx": 12
1591
+ },
1592
+ {
1593
+ "type": "table",
1594
+ "img_path": "images/a524a579244b5b105b551d4c29c7040c9b89dc48418684ab944b7caf945bb225.jpg",
1595
+ "table_caption": [
1596
+ "Table 6: Detailed results for MMA-H and MMA-IL on WMT15 DeEn "
1597
+ ],
1598
+ "table_footnote": [],
1599
+ "table_body": "<table><tr><td rowspan=1 colspan=1>BLEU AP AL DAL</td></tr><tr><td rowspan=1 colspan=1>Xavg MMA-IL</td></tr><tr><td rowspan=1 colspan=1>0.05 30.7 0.78 10.91 12.64</td></tr><tr><td rowspan=1 colspan=1>0.1 30.5 0.70 7.42 8.82</td></tr><tr><td rowspan=1 colspan=1>0.2 30.1 0.63 5.17 6.41</td></tr><tr><td rowspan=1 colspan=1>0.3 30.3 0.60 4.18 5.35</td></tr><tr><td rowspan=1 colspan=1>0.4 29.2 0.59 3.75 4.90</td></tr><tr><td rowspan=1 colspan=1>0.5 26.7 0.59 3.69 4.83</td></tr><tr><td rowspan=1 colspan=1>0.75 25.5 0.58 3.40 4.46</td></tr><tr><td rowspan=1 colspan=1>1.0 25.1 0.56 3.00 4.03</td></tr><tr><td rowspan=1 colspan=1>Xvar MMA-H</td></tr><tr><td rowspan=1 colspan=1>0.1 28.5 0.74 8.94 10.83</td></tr><tr><td rowspan=1 colspan=1>0.2 28.9 0.69 6.82 8.622</td></tr><tr><td rowspan=1 colspan=1>0.3 29.2 0.64 5.45 7.03</td></tr><tr><td rowspan=1 colspan=1>0.4 28.5 0.59 3.90 5.21</td></tr><tr><td rowspan=1 colspan=1>0.5 28.5 0.59 3.88 5.19</td></tr><tr><td rowspan=1 colspan=1>0.6 29.6 0.56 3.13 4.32</td></tr><tr><td rowspan=1 colspan=1>0.7 29.1 0.56 2.93 4.10</td></tr></table>",
1600
+ "bbox": [
1601
+ 359,
1602
+ 101,
1603
+ 638,
1604
+ 385
1605
+ ],
1606
+ "page_idx": 13
1607
+ },
1608
+ {
1609
+ "type": "table",
1610
+ "img_path": "images/ed333637461fbbafe957ae247c9ae36cee6ce1c0619093324347790c2ab3639c.jpg",
1611
+ "table_caption": [
1612
+ "Table 7: Detailed results for MILk, MMA-H and MMA-IL on IWSLT15 En-Vi "
1613
+ ],
1614
+ "table_footnote": [],
1615
+ "table_body": "<table><tr><td>BLEU</td><td></td><td>AP</td><td>AL</td><td>DAL</td></tr><tr><td>入</td><td></td><td>MILk</td><td></td><td></td></tr><tr><td>0.1</td><td>24.62</td><td>0.71</td><td>5.93</td><td>7.19</td></tr><tr><td>0.2</td><td>24.68</td><td>0.67</td><td>4.90</td><td>5.97</td></tr><tr><td>0.3</td><td>24.31</td><td>0.65</td><td>4.45</td><td>5.43</td></tr><tr><td>0.4</td><td>23.73</td><td>0.64</td><td>4.28</td><td>5.24</td></tr><tr><td>Xaug</td><td></td><td>MMA-IL</td><td></td><td></td></tr><tr><td>0.02</td><td>28.28</td><td>0.76</td><td>7.09</td><td>8.29</td></tr><tr><td>0.04</td><td>28.33</td><td>0.70</td><td>5.44</td><td>6.57</td></tr><tr><td>0.1</td><td>28.42</td><td>0.67</td><td>4.63</td><td>5.65</td></tr><tr><td>0.2</td><td>28.47</td><td>0.63</td><td>3.57</td><td>4.44</td></tr><tr><td>0.3</td><td>27.9</td><td>0.59</td><td>2.98</td><td>3.81</td></tr><tr><td>0.4</td><td>27.73</td><td>0.58</td><td>2.68</td><td>3.46</td></tr><tr><td>Xuar</td><td></td><td>MMA-H</td><td></td><td></td></tr><tr><td>0.02</td><td>27.26</td><td>0.77</td><td>7.52</td><td>8.71</td></tr><tr><td>0.1</td><td></td><td></td><td>5.22</td><td>6.31</td></tr><tr><td></td><td>27.68</td><td>0.69</td><td>3.81</td><td></td></tr><tr><td>0.2</td><td>28.06</td><td>0.63</td><td></td><td>4.84</td></tr><tr><td>0.4</td><td>27.79</td><td>0.62</td><td>3.57</td><td>4.59</td></tr><tr><td>0.8</td><td>27.95</td><td>0.60</td><td>3.22</td><td>4.19</td></tr></table>",
1616
+ "bbox": [
1617
+ 366,
1618
+ 422,
1619
+ 632,
1620
+ 734
1621
+ ],
1622
+ "page_idx": 13
1623
+ },
1624
+ {
1625
+ "type": "text",
1626
+ "text": "A.5 AVERAGE LOSS FOR MMA-H ",
1627
+ "text_level": 1,
1628
+ "bbox": [
1629
+ 176,
1630
+ 784,
1631
+ 423,
1632
+ 799
1633
+ ],
1634
+ "page_idx": 13
1635
+ },
1636
+ {
1637
+ "type": "text",
1638
+ "text": "We explore applying a simple average instead of a weighted average loss to MMA-H. The results are shown in Figure 7 and Table 9. We find that even with very large weights, we are unable to reduce the overall latency. In addition, we find that the weighted average loss severely affects the translation quality negatively. On the other hand, the divergence loss we propose in Equation 16 can efficiently reduce the latency while retaining relatively good translation quality for MMA-H models. ",
1639
+ "bbox": [
1640
+ 174,
1641
+ 810,
1642
+ 825,
1643
+ 881
1644
+ ],
1645
+ "page_idx": 13
1646
+ },
1647
+ {
1648
+ "type": "table",
1649
+ "img_path": "images/4d553d6e69ce5de1583cfa97a411d692404d8e6b604846e59cf235e6f7445988.jpg",
1650
+ "table_caption": [],
1651
+ "table_footnote": [
1652
+ "Table 8: Comparison between setting threshold for reading action and weighted average latency loss. "
1653
+ ],
1654
+ "table_body": "<table><tr><td colspan=\"6\">Reading Threshold</td><td colspan=\"4\">Weighted Average Latency Loss</td></tr><tr><td>p</td><td>BLEU</td><td>AP</td><td>AL</td><td>DAL</td><td>Lavg</td><td>BLEU</td><td>AP</td><td>AL</td><td>DAL</td></tr><tr><td>0.5</td><td>25.5</td><td>0.792387</td><td>7.13673</td><td>8.27187</td><td>0.02</td><td>25.5</td><td>0.792387</td><td>7.13673</td><td>8.27187</td></tr><tr><td>0.4</td><td>25.25</td><td>0.73749</td><td>5.72003</td><td>6.85812</td><td>0.04</td><td>25.68</td><td>0.728107</td><td>5.52856</td><td>6.61744</td></tr><tr><td>0.3</td><td>23.06</td><td>0.697398</td><td>4.88087</td><td>6.03342</td><td>0.3</td><td>24.9</td><td>0.602703</td><td>2.90054</td><td>3.68039</td></tr><tr><td>0.2</td><td>18.37</td><td>0.678298</td><td>4.71099</td><td>5.94636</td><td>0.2</td><td>25.3</td><td>0.636914</td><td>3.54577</td><td>4.38623</td></tr><tr><td>0.1</td><td>8.73</td><td>0.696452</td><td>5.5225</td><td>7.20439</td><td>0.1</td><td>25.48</td><td>0.684424</td><td>4.57901</td><td>5.54102</td></tr></table>",
1655
+ "bbox": [
1656
+ 173,
1657
+ 111,
1658
+ 844,
1659
+ 231
1660
+ ],
1661
+ "page_idx": 14
1662
+ },
1663
+ {
1664
+ "type": "image",
1665
+ "img_path": "images/aea53beea98c86b1baeb911bfa9ca93df3d5c23c9dfd3fe4f079a502cf059346.jpg",
1666
+ "image_caption": [
1667
+ "Figure 7: Effect average loss, weighted average loss and variance loss on MMA-H on WMT15 DeEn development set. ",
1668
+ "Table 9: Detailed numbers on average loss, weighted average loss and head divergence loss on WMT15 De-En development set "
1669
+ ],
1670
+ "image_footnote": [],
1671
+ "bbox": [
1672
+ 184,
1673
+ 286,
1674
+ 810,
1675
+ 453
1676
+ ],
1677
+ "page_idx": 14
1678
+ },
1679
+ {
1680
+ "type": "table",
1681
+ "img_path": "images/4e530cf2f50274c42af2cc82e308e69bcf9358bdf52a0d674618eb44495a7b1b.jpg",
1682
+ "table_caption": [],
1683
+ "table_footnote": [],
1684
+ "table_body": "<table><tr><td></td><td>BLEU</td><td>AP</td><td>AL</td><td>DAL</td></tr><tr><td>Xaug</td><td colspan=\"4\">Average</td></tr><tr><td>0.05</td><td>28.5</td><td>0.862581</td><td>14.3847</td><td>17.3702</td></tr><tr><td>0.1</td><td>27.8</td><td>0.855435</td><td>13.974</td><td>17.02</td></tr><tr><td>0.2</td><td>28</td><td>0.835324</td><td>12.8531</td><td>15.908</td></tr><tr><td>0.4</td><td>28.1</td><td>0.819408</td><td>11.9816</td><td>14.9763</td></tr><tr><td>1.0</td><td>28.2</td><td>0.810609</td><td>11.7528</td><td>14.6695</td></tr><tr><td>2.0</td><td>28.1</td><td>0.800258</td><td>11.1763</td><td>14.0761</td></tr><tr><td>8.0</td><td>28.4</td><td>0.806439</td><td>11.5289</td><td>14.6431</td></tr><tr><td>Xaug</td><td colspan=\"4\">Weighted Average</td></tr><tr><td>0.02</td><td>28.24</td><td>0.773922</td><td>10.2109</td><td>12.2274</td></tr><tr><td>0.04</td><td>24.35</td><td>0.685834</td><td>7.06716</td><td>8.64069</td></tr><tr><td>0.06</td><td>7.80</td><td>0.875825</td><td>16.2046</td><td>19.0892</td></tr><tr><td>0.08</td><td>9.51</td><td>0.57372</td><td>3.92011</td><td>6.1421</td></tr><tr><td>0.1</td><td>9.78</td><td>0.556585</td><td>3.3007</td><td>5.46142</td></tr><tr><td>Xvar</td><td colspan=\"4\">Divergence</td></tr><tr><td>0.1</td><td>27.35</td><td>0.736025</td><td>8.70968</td><td>10.5253</td></tr><tr><td>0.2</td><td>27.64</td><td>0.681491</td><td>6.63914</td><td>8.3856</td></tr><tr><td>0.3</td><td>27.37</td><td>0.6623</td><td>6.04902</td><td>7.71922</td></tr><tr><td>0.4</td><td>27.62</td><td>0.638188</td><td>5.31672</td><td>6.86834</td></tr><tr><td>0.5</td><td>27.50</td><td>0.625759</td><td>4.93044</td><td>6.38998</td></tr><tr><td>1.0</td><td>27.1</td><td>0.582194</td><td>3.64864</td><td>4.90997</td></tr></table>",
1685
+ "bbox": [
1686
+ 326,
1687
+ 521,
1688
+ 671,
1689
+ 873
1690
+ ],
1691
+ "page_idx": 14
1692
+ }
1693
+ ]
parse/train/Hyg96gBKPS/Hyg96gBKPS_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hyg96gBKPS/Hyg96gBKPS_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJeLIgBKPS/SJeLIgBKPS.md ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJeLIgBKPS/SJeLIgBKPS_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJeLIgBKPS/SJeLIgBKPS_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJeLIgBKPS/SJeLIgBKPS_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Skdvd2xAZ/Skdvd2xAZ.md ADDED
@@ -0,0 +1,373 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # A SCALABLE LAPLACE APPROXIMATION FOR NEURAL NETWORKS
2
+
3
+ Hippolyt Ritter1∗, Aleksandar Botev1, David Barber1 2 1University College London 2Alan Turing Institute
4
+
5
+ # ABSTRACT
6
+
7
+ We leverage recent insights from second-order optimisation for neural networks to construct a Kronecker factored Laplace approximation to the posterior over the weights of a trained network. Our approximation requires no modification of the training procedure, enabling practitioners to estimate the uncertainty of their models currently used in production without having to retrain them. We extensively compare our method to using Dropout and a diagonal Laplace approximation for estimating the uncertainty of a network. We demonstrate that our Kronecker factored method leads to better uncertainty estimates on out-of-distribution data and is more robust to simple adversarial attacks. Our approach only requires calculating two square curvature factor matrices for each layer. Their size is equal to the respective square of the input and output size of the layer, making the method efficient both computationally and in terms of memory usage. We illustrate its scalability by applying it to a state-of-the-art convolutional network architecture.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Neural networks are most commonly trained in a maximum a posteriori (MAP) setting, which only yields point estimates of the parameters, ignoring any uncertainty about them. This often leads to overconfident predictions, especially in regimes that are weakly covered by training data or far away from the data manifold. While the confidence of wrong predictions is usually irrelevant in a research context, it is essential that a Machine Learning algorithm knows when it does not know in the real world, as the consequences of mistakes can be fatal, be it when driving a car or diagnosing a disease.
12
+
13
+ The Bayesian framework of statistics provides a principled way for avoiding overconfidence in the parameters by treating them as unknown quantities and integrating over all possible values. Specifically, for the prediction of new data under a model, it fits a posterior distribution over the parameters given the training data and weighs the contribution of each setting of the parameters to the prediction by the probability of the data under those parameters times their prior probability. However, the posterior of neural networks is usually intractable due to their size and nonlinearity.
14
+
15
+ There has been previous interest in integrating neural networks into the Bayesian framework (MacKay, 1992; Hinton & Van Camp, 1993; Neal, 1993; Barber & Bishop, 1998), however these approaches were designed for small networks by current standards. Recent adaptations to architectures of modern scale rely on crude approximations of the posterior to become tractable. All of (Graves, 2011; Hernandez-Lobato & Adams, 2015; Blundell et al., 2015) assume independence between the ´ individual weights. While they achieve good results on small datasets, this strong restriction of the posterior is susceptible to underestimating the uncertainty, in particular when optimising the variational bound. The approach in (Gal & Ghahramani, 2016) requires the use of certain stochastic regularisers which are not commonly present in most recent architectures. Furthermore, it is not clear if the approximate posterior defined by these regularisers is a good fit to the true posterior.
16
+
17
+ Recent work on second-order optimisation of neural networks (Martens & Grosse, 2015; Botev et al., 2017) has demonstrated that the diagonal blocks of the curvature can be well approximated by a Kronecker product. We combine this insight with the idea of modelling the posterior over the weights as a Gaussian, using a Laplace approximation (MacKay, 1992) with Kronecker factored covariance matrices. This leads to a computationally efficient matrix normal posterior distribution (Gupta & Nagar, 1999) over the weights of every layer. Since the Laplace approximation is applied after training, our approach can be used to obtain uncertainty estimates from existing networks.
18
+
19
+ # 2 THE CURVATURE OF NEURAL NETWORKS
20
+
21
+ Our method is inspired by recent Kronecker factored approximations of the curvature of a neural network (Martens & Grosse, 2015; Botev et al., 2017) for optimisation and we give a high-level review of these in the following. While the two methods approximate the Gauss-Newton and Fisher matrix respectively, as they are guaranteed to be positive semi-definite (p.s.d.), we base all of our discussion on the Hessian in order to be as general as possible.
22
+
23
+ # 2.1 NEURAL NETWORK NOTATION
24
+
25
+ We denote a feedforward network as taking an input $a _ { 0 } = x$ and producing an output $h _ { L }$ . The intermediate representations for layers $\lambda = 1 , . . . , L$ are denoted as $h _ { \lambda } = W _ { \lambda } a _ { \lambda - 1 }$ and $a _ { \lambda } = f _ { \lambda } ( h _ { \lambda } )$ . We refer to $a _ { \lambda }$ as the activations, and $h _ { \lambda }$ as the (linear) pre-activations. The bias terms are absorbed into the $W _ { \lambda }$ by appending a 1 to each $a _ { \lambda }$ . The network parameters are optimised w.r.t. an error function $E ( y , h _ { L } )$ for targets $y$ . Most commonly used error functions, such as squared error and categorical cross-entropy, can be interpreted as exponential family negative log likelihoods $- \log p ( y | h _ { L } )$ .
26
+
27
+ # 2.2 KRONECKER FACTORED SECOND-ORDER OPTIMISATION
28
+
29
+ Traditional second-order methods use either the Hessian matrix or a positive semi-definite approximation thereof to generate parameter updates of the form $\Delta = C ^ { - 1 } g$ , where $C$ is the chosen curvature matrix and $g$ the gradient of the error function parameterised by the network. However, this curvature matrix is infeasbile to compute for modern neural networks as their number of parameters is often in the millions, rendering the size of $C$ of the order of several terabytes.
30
+
31
+ Recent work (Martens & Grosse, 2015; Botev et al., 2017) exploits that, for a single data point, the diagonal blocks of these curvature matrices are Kronecker factored:
32
+
33
+ $$
34
+ H _ { \lambda } = \frac { \partial ^ { 2 } E } { \partial \operatorname { v e c } ( W _ { \lambda } ) \partial \operatorname { v e c } ( W _ { \lambda } ) } = \mathcal { Q } _ { \lambda } \otimes \mathcal { H } _ { \lambda }
35
+ $$
36
+
37
+ where $H _ { \lambda }$ is the Hessian w.r.t. the weights in layer $\lambda$ . $\mathcal { Q } _ { \lambda } = a _ { \lambda - 1 } a _ { \lambda - 1 } ^ { \top }$ denotes the covariance of the incoming activations aλ−1 and Hλ = ∂ E∂h ∂h the pre-activation Hessian, i.e. the Hessian of the error w.r.t. the linear pre-activations $h _ { \lambda }$ in a layer. We provide the derivation for this result as well as the recursion for calculating $\mathcal { H }$ in Appendix A.
38
+
39
+ The Kronecker factorisation holds two key advantages: the matrices that need be computed and stored are much smaller — if we assume all layers to be of dimensionality $D$ , the two factors are each of size $D ^ { 2 }$ , whereas the full Hessian for the weights of only one layer would have $D ^ { 4 }$ elements. Furthermore, the inverse of a Kronecker product is equal to the Kronecker product of the inverses, so it is only necessary to invert those two moderately sized matrices.
40
+
41
+ In order to maintain this structure over a minibatch of data, all Kronecker factored second-order methods make two core approximations: First, they only model the diagonal blocks corresponding to the weights of a layer, such that the curvature decomposes into $L$ independent matrices. Second, they assume $\mathcal { Q } _ { \lambda }$ and $\mathcal { H } _ { \lambda }$ to be independent. This is in order to maintain the Kronecker factorisation in expectation, i.e. $\mathbb { E } \left[ \mathcal { Q } _ { \lambda } \otimes \mathcal { H } _ { \lambda } \right] \approx \mathbb { E } \left[ \mathcal { Q } _ { \lambda } \right] \otimes \mathbb { E } \left[ \mathcal { H } _ { \lambda } \right]$ , since the expectation of a Kronecker product is not guaranteed to be Kronecker factored itself.
42
+
43
+ The main difference between the Kronecker factored second-order optimisers lies in how they efficiently approximate $\mathbb { E } \left[ \mathcal { H } _ { \lambda } \right]$ . For exact calculation, it would be necessary to pass back an entire matrix per data point in a minibatch, which imposes infeasible memory and computational requirements. KFRA (Botev et al., 2017) simply passes back the expectation at every layer, while KFAC (Martens & Grosse, 2015) utilises the Fisher identity to only propagate a vector rather than a matrix, approximating the Kronecker factors with a stochastic rank-one matrix for each data point.
44
+
45
+ The diagonal blocks of the Hessian and Gauss-Newton matrix are equal for neural networks with piecewise linear activation functions (Botev et al., 2017), thus both methods can be used to directly approximate the diagonal blocks of the Hessian of such networks, as the Gauss-Newton and Fisher are equivalent for networks that parameterise an exponential family log likelihood.
46
+
47
+ # 3 A SCALABLE LAPLACE APPROXIMATION FOR NEURAL NETWORKS
48
+
49
+ # 3.1 THE LAPLACE APPROXIMATION
50
+
51
+ The standard Laplace approximation is obtained by taking the second-order Taylor expansion around a mode of a distribution. For a neural network, such a mode can be found using standard gradientbased methods. Specifically, if we approximate the log posterior over the weights of a network given some data $\mathcal { D }$ around a MAP estimate $\boldsymbol { \theta } ^ { * }$ , we obtain:
52
+
53
+ $$
54
+ \log p ( \boldsymbol { \theta } | \mathcal { D } ) \approx \log p ( \boldsymbol { \theta } ^ { * } | \mathcal { D } ) - \frac { 1 } { 2 } \big ( \boldsymbol { \theta } - \boldsymbol { \theta } ^ { * } \big ) ^ { \top } \bar { H } ( \boldsymbol { \theta } - \boldsymbol { \theta } ^ { * } )
55
+ $$
56
+
57
+ where $\theta = [ \mathrm { v e c } ( W _ { 1 } ) , . . . , \mathrm { v e c } ( W _ { L } ) ]$ is the stacked vector of weights and $\bar { H } = \mathbb { E } \left[ H \right]$ the average Hessian of the negative log posterior1. The first order term is missing because we expand the function around a maximum $\boldsymbol { \theta } ^ { * }$ , where the gradient is zero. If we exponentiate this equation, it is easy to notice that the right-hand side is of Gaussian functional form for $\theta$ , thus we obtain a normal distribution by integrating over it. The posterior over the weights is then approximated as Gaussian:
58
+
59
+ $$
60
+ \theta \sim \mathcal { N } ( \theta ^ { * } , \bar { H } ^ { - 1 } )
61
+ $$
62
+
63
+ assuming $\bar { H }$ is p.s.d. We can then approximate the posterior mean when predicting on unseen data $D ^ { * }$ by averaging the predictions of $T$ Monte Carlo samples ${ \boldsymbol { \theta } } ^ { ( t ) }$ from the approximate posterior:
64
+
65
+ $$
66
+ p ( \mathcal { D } ^ { * } | \mathcal { D } ) = \int p ( \mathcal { D } ^ { * } | \boldsymbol { \theta } ) p ( \boldsymbol { \theta } | \mathcal { D } ) d \boldsymbol { \theta } \approx \frac { 1 } { T } \sum _ { t = 1 } ^ { T } p ( \mathcal { D } ^ { * } | \boldsymbol { \theta } ^ { ( t ) } )
67
+ $$
68
+
69
+ # 3.2 DIAGONAL LAPLACE APPROXIMATION
70
+
71
+ Unfortunately, it is not feasible to compute or invert the Hessian matrix w.r.t. all of the weights jointly. An approximation that is easy to compute in modern automatic differentiation frameworks is the diagonal of the Fisher matrix $F$ , which is simply the expectation of the squared gradients:
72
+
73
+ $$
74
+ H \approx \mathrm { d i a g } ( F ) = \mathrm { d i a g } ( \mathbb { E } \left[ \nabla _ { \theta } \log p ( y | x ) \nabla _ { \theta } \log p ( y | x ) ^ { \top } \right] ) = \mathrm { d i a g } ( \mathbb { E } \left[ ( \nabla _ { \theta } \log p ( y | x ) ) ^ { 2 } \right] )
75
+ $$
76
+
77
+ where diag extracts the diagonal of a matrix or turns a vector into a diagonal matrix. Such diagonal approximations to the curvature of a neural network have been used successfully for pruning the weights (LeCun et al., 1990) and, more recently, for transfer learning (Kirkpatrick et al., 2017).
78
+
79
+ This corresponds to modelling the weights with a Normal distribution with diagonal covariance:
80
+
81
+ $$
82
+ \operatorname { v e c } ( W _ { \lambda } ) \sim { \mathcal { N } } ( \operatorname { v e c } ( W _ { \lambda } ^ { * } ) , \operatorname { d i a g } ( F _ { \lambda } ) ^ { - 1 } ) \quad { \mathrm { f o r ~ } } \lambda = 1 , \dots , L
83
+ $$
84
+
85
+ Unfortunately, even if the Taylor approximation is accurate, this will place significant probability mass in low probability areas of the true posterior if some weights exhibit high covariance.
86
+
87
+ # 3.3 KRONECKER FACTORED LAPLACE APPROXIMATION
88
+
89
+ So while it is desirable to model the covariance between the weights, some approximations are needed in order to remain computationally efficient. First, we assume the weights of the different layers to be independent. This corresponds to the block-diagonal approximation in KFAC and KFRA, which empirically preserves sufficient information about the curvature to obtain competitive optimisation performance. For our purposes this means that our posterior factorises over the layers.
90
+
91
+ As discussed above, the Hessian of the log-likelihood for a single datapoint is Kronecker factored, and we denote the two factor matrices as ${ \cal H } _ { \lambda } = { \mathcal Q } _ { \lambda } \otimes { \mathcal H } _ { \lambda }$ .2 By further assuming independence between $\mathcal { Q }$ and $\mathcal { H }$ in all layers, we can approximate the expected Hessian of each layer as:
92
+
93
+ $$
94
+ \mathbb { E } \left[ H _ { \lambda } \right] = \mathbb { E } \left[ \mathcal { Q } _ { \lambda } \otimes \mathcal { H } _ { \lambda } \right] \approx \mathbb { E } \left[ \mathcal { Q } _ { \lambda } \right] \otimes \mathbb { E } \left[ \mathcal { H } _ { \lambda } \right]
95
+ $$
96
+
97
+ Hence, the Hessian of every layer is Kronecker factored over an entire dataset and the Laplace approximation can be approximated by a product of Gaussians. Each Gaussian has a Kronecker factored covariance, corresponding to a matrix normal distribution (Gupta & Nagar, 1999), which considers the two Kronecker factors of the covariance to be the covariances of the rows and columns of a matrix. The two factors are much smaller than the full covariance and allow for significantly more efficient inversion and sampling (we review the matrix normal distribution in Appendix B).
98
+
99
+ Our resulting posterior for the weights in layer $\lambda$ is then:
100
+
101
+ $$
102
+ W _ { \lambda } \sim \mathcal { M N } ( W _ { \lambda } ^ { \ast } , \bar { \mathcal { Q } } _ { \lambda } ^ { - 1 } , \bar { \mathcal { H } } _ { \lambda } ^ { - 1 } )
103
+ $$
104
+
105
+ In contrast to optimisation methods, we do not need to approximate $\mathbb { E } \left[ \mathcal { H } _ { \lambda } \right]$ as it is only calculated once. However, when it is possible to augment the data (e.g. randomised cropping of images), it may be advantageous. We provide a more detailed discussion of this in Appendix C.
106
+
107
+ # 3.4 INCORPORATING THE PRIOR AND REGULARISING THE CURVATURE FACTORS
108
+
109
+ Just as the log posterior, the Hessian decomposes into a term depending on the data log likelihood and one on the prior. For the commonly used $L _ { 2 }$ -regularisation, corresponding to a Gaussian prior, the Hessian is equal to the precision of the prior times the identity matrix. We approximate this by adding a multiple of the identity to each of the Kronecker factors from the log likelihood:
110
+
111
+ $$
112
+ H _ { \lambda } = N \mathbb { E } \left[ - \frac { \partial ^ { 2 } \log p ( \mathcal { D } | \theta ) } { \partial \theta ^ { 2 } } \right] + \tau I \approx ( \sqrt { N } \mathbb { E } \left[ \mathcal { Q } _ { \lambda } \right] + \sqrt { \tau } I ) \otimes ( \sqrt { N } \mathbb { E } \left[ \mathcal { H } _ { \lambda } \right] + \sqrt { \tau } I )
113
+ $$
114
+
115
+ where $\tau$ is the precision of the Gaussian prior on the weights and $N$ the size of the dataset. However, we can also treat them as hyperparameters and optimise them w.r.t. the predictive performance on a validation set. We emphasise that this can be done without retraining the network, so it does not impose a large computational overhead and is trivial to parallelise.
116
+
117
+ Setting $N$ to a larger value than the size of the dataset can be interpreted as including duplicates of the data points as pseudo-observations. Adding a multiple of the uncertainty to the precision matrix decreases the uncertainty about each parameter. This has a regularising effect both on our approximation to the true Laplace, which may be overestimating the variance in certain directions due to ignoring the covariances between the layers, as well as the Laplace approximation itself, which may be placing probability mass in low probability areas of the true posterior.
118
+
119
+ # 4 RELATED WORK
120
+
121
+ Most recent attempts to approximating the posterior of a neural network are based on formulating an approximate distribution to the posterior and optimising the variational lower bound w.r.t. its parameters. (Graves, 2011; Blundell et al., 2015; Kingma et al., 2015) as well as the expectation propagation based approaches of (Hernandez-Lobato & Adams, 2015) and (Ghosh et al., 2016) ´ assume independence between the individual weights which, particularly when optimising the KL divergence, often lets the model underestimate the uncertainty about the weights. Gal & Ghahramani (2016) interpret Dropout to approximate the posterior with a mixture of delta functions, assuming independence between the columns. (Lakshminarayanan et al., 2016) suggest using an ensemble of networks for estimating the uncertainty.
122
+
123
+ Our work is a scalable approximation of (MacKay, 1992). Since the per-layer Hessian of a neural network is infeasible to compute, we suggest a factorisation of the covariance into a Kronecker product, leading to a more efficient matrix normal distribution. The posterior that we obtain is reminiscent of (Louizos & Welling, 2016) and (Sun et al., 2017), who optimise the parameters of a matrix normal distribution as their weights, which requires a modification of the training procedure.
124
+
125
+ # 5 EXPERIMENTS
126
+
127
+ Since the Laplace approximation is a method for predicting in a Bayesian manner and not for training, we focus on comparing to uncertainty estimates obtained from Dropout (Gal & Ghahramani, 2016). The trained networks will be identical, but the prediction methods will differ. We also compare to a diagonal Laplace approximation to highlight the benefit from modelling the covariances between the weights. All experiments are implemented using Theano (Theano Development Team, 2016) and Lasagne (Dieleman et al., 2015).3
128
+
129
+ # 5.1 TOY REGRESSION DATASET
130
+
131
+ As a first experiment, we visualise the uncertainty obtained from the Laplace approximations on a toy regression dataset, similar to (Hernandez-Lobato´ $\&$ Adams, 2015). We create a dataset of 20 uniformly distributed points $x \sim \mathcal { U } ( - 4 , 4 )$ and sample $y \sim \mathcal { N } ( x ^ { 3 } , 3 ^ { 2 } )$ . In contrast to (Hernandez- ´ Lobato & Adams, 2015), we use a two-layer network with seven units per layer rather than one layer with 100 units. This is because both the input and output are one-dimensional, hence the weight matrices are vectors and the matrix normal distribution reduces to a multivariate normal distribution. Furthermore, the Laplace approximation is sensitive to the ratio of the number of data points to parameters, and we want to visualise it both with and without hyperparameter tuning.
132
+
133
+ ![](images/debac792cdab601dfb06184753b4dcbf42158c1124917b3079299c753416bc64.jpg)
134
+ Figure 1: Toy regression uncertainty. Black dots are data points, the black line shows the noiseless function. The red line shows the deterministic prediction of the network, the blue line the mean output. Each shade of blue visualises one additional standard deviation. Best viewed on screen.
135
+
136
+ Fig. 1 shows the uncertainty obtained from the Kronecker factored and diagonal Laplace approximation applied to the same network, as well as from a full Laplace approximation and $5 0 , 0 0 0 \mathrm { H M C }$ (Neal, 1993) samples. The latter two methods are feasible only for such a small model and dataset. For the diagonal and full Laplace approximation we use the Fisher identity and draw one sample per data point. We set the hyperparameters of the Laplace approximations (see Section 3.4) using a grid search over the likelihood of 20 validation points that are sampled the same way as the training set.
137
+
138
+ The regularised Laplace approximations all give an overall good fit to the HMC predictive posterior. Their uncertainty is slightly higher close to the training data and increases more slowly away from the data than that of the HMC posterior. The diagonal and full Laplace approximation require stronger regularisation than our Kronecker factored one, as they have higher uncertainty when not regularised. In particular the full Laplace approximation vastly overestimates the uncertainty without additional regularisation, leading to a bad predictive mean (see Appendix E for the corresponding figures), as the Hessian of the log likelihood is underdetermined. This is commonly the case in deep learning, as the number of parameters is typically much larger than the number of data points. Hence restricting the structure of the covariance is not only a computational necessity for most architectures, but also allows for more precise estimation of the approximate covariance.
139
+
140
+ # 5.2 OUT-OF-DISTRIBUTION UNCERTAINTY
141
+
142
+ For a more realistic test, similar to (Louizos & Welling, 2017), we assess the uncertainty of the predictions when classifying data from a different distribution than the training data. For this we train a network with two layers of 1024 hidden units and ReLU transfer functions to classify MNIST digits. We use a learning rate of $1 0 ^ { - 2 }$ and momentum of 0.9 for 250 epochs. We apply Dropout with $p { = } 0 . 5$ after each inner layer, as our chief interest is to compare against its uncertainty estimates. We further use $L _ { 2 }$ -regularisation with a factor of $1 0 ^ { - 2 }$ and randomly binarise the images during training according to their pixel intensities and draw $1 , 0 0 0$ such samples per datapoint for estimating the curvature factors. We use this network to classify the images in the notMNIST dataset4, which contains $2 8 \times 2 8$ grey-scale images of the letters $\mathbf { \dot { A } } ^ { \prime }$ to $\mathbf { \hat { J } } ^ { \star }$ from various computer fonts, i.e. not digits. An ideal classifier would make uniform predictions over its classes.
143
+
144
+ We compare the uncertainty obtained by predicting the digit class of the notMNIST images using 1. a deterministic forward pass through the Dropout trained network, 2. by sampling different Dropout masks and averaging the predictions, and by sampling different weight matrices from 3. the matrix normal distribution obtained from our Kronecker factored Laplace approximation as well as 4. the diagonal one. As an additional baseline similar to (Blundell et al., 2015; Graves, 2011), we compare to a network with identical architecture with a fully factorised Gaussian (FFG) approximate posterior on the weights and a standard normal prior. We train the model on the variational lower bound using the reparametrisation trick (Kingma & Welling, 2013). We use 100 samples for the stochastic forward passes and optimise the hyperparameters of the Laplace approximations w.r.t. the cross-entropy on the validation set of MNIST.
145
+
146
+ ![](images/d894a7edf56530a450cd12d773fa589c25cc119d5b25ad9f5c7d7640b554c41f.jpg)
147
+ Figure 2: Predictive entropy on notMNIST obtained from different methods for the forward pass on a network trained on MNIST.
148
+
149
+ We measure the uncertainty of the different methods as the entropy of the predictive distribution, which has a minimal value of 0 when a single class is predicted with certainty and a maximum of about 2.3 for uniform predictions. Fig. 2 shows the inverse empirical cumulative distribution of the entropy values obtained from the four methods. Consistent with the results in (Gal & Ghahramani, 2016), averaging the probabilities of multiple passes through the network yields predictions with higher uncertainty than a deterministic pass that approximates the geometric average (Srivastava et al., 2014). However, there still are some images that are predicted to be a digit with certainty. Our Kronecker factored Laplace approximation makes hardly any predictions with absolute certainty and assigns high uncertainty to most of the letters as desired. The diagonal Laplace approximation required stronger regularisation towards predicting deterministically, yet it performs similarly to Dropout. As shown in Table 1, however, the network makes predictions on the test set of MNIST with similar accuracy to the deterministic forward pass and MC Dropout when using our approximation. The variational factorised Gaussian posterior has low uncertainty as expected.
150
+
151
+ # 5.3 ADVERSARIAL EXAMPLES
152
+
153
+ ![](images/ed41abe45c3623949c3b8185e71c83cf08c0f3240991f92ab6369cada44c3cfe.jpg)
154
+ Figure 3: Untargeted adversarial attack.
155
+
156
+ ![](images/bd7abf0110987c858acf90a823a00cb267f5508f27375bc544386b20b41304ac.jpg)
157
+ Figure 4: Targeted adversarial attack.
158
+
159
+ To further test the robustness of our prediction method close to the data distribution, we perform an adversarial attack on a neural network. As first demonstrated in (Szegedy et al., 2013), neural networks are prone to being fooled by gradient-based changes to their inputs. Li & Gal (2017) suggest, and provide empirical support, that Bayesian models may be more robust to such attacks, since they implicitly form an infinitely large ensemble by integrating over the model parameters. For our experiments, we use the fully connected net trained on MNIST from the previous section and compare the sensitivity of the different prediction methods for two kinds of adversarial attacks.
160
+
161
+ First, we use the untargeted Fast Gradient Sign method $\begin{array} { r } { x _ { a d v } = x - \eta \mathrm { s g n } ( \nabla _ { x } \operatorname* { m a x } _ { y } \log p ^ { ( M ) } ( y | x ) ) } \end{array}$ suggested in (Goodfellow et al., 2014), which takes the gradient of the class predicted with maximal probability by method $M$ w.r.t. the input $x$ and reduces this probability with varying step size $\eta$ This step size is rescaled by the difference between the maximal and minimal value per dimension in the dataset. It is to be expected that this method generates examples away from the data manifold, as there is no clear subset of the data that corresponds to e.g. ”not ones”.
162
+
163
+ Fig. 3 shows the average predictive uncertainty and the accuracy on the original class on the MNIST test set as the step size $\eta$ increases. The Kronecker factored Laplace approximation achieves significantly higher uncertainty than any other prediction method as the images move away from the data. Both the diagonal and the Kronecker factored Laplace maintain higher accuracy than MC Dropout on their original predictions. Interestingly, the deterministic forward pass appears to be most robust in terms of accuracy, however it has much smaller uncertainty on the predictions it makes and will confidently predict a false class for most images, whereas the other methods are more uncertain.
164
+
165
+ Furthermore, we perform a targeted attack that attempts to force the network to predict a specific class, in our case $\cdot _ { 0 } \cdot \mathrm { \ }$ following (Li & Gal, 2017). Hence, for each method, we exclude all data points in the test set that are already predicted as $\cdot _ { 0 } \cdot \mathrm { \ }$ . The updates are of similar form to the untargeted attack, however they increase the probability of the pre-specified class $y$ rather than decreasing the current maximum as x(ty $x _ { y } ^ { ( t + 1 ) } = x _ { y } ^ { ( \bar { t } ) } + \eta \mathrm { s g n } \big ( \bar { \nabla } _ { x } \log \bar { p ^ { ( M ) } } ( y | x _ { y } ^ { ( t ) } ) \big )$ , where $x _ { y } ^ { ( 0 ) } = x$ .
166
+
167
+ We use a step size of $\eta { = } 1 0 ^ { - 2 }$ for the targeted attack. The uncertainty and accuracy on the original and target class are shown in Fig. 4. Here, the Kronecker factored Laplace approximation has slightly smaller uncertainty at its peak in comparison to the other methods, however it appears to be much more robust. It only misclassifies over $5 0 \%$ of the images after about 20 steps, whereas for the other methods this is the case after roughly 10 steps and reaches $1 0 0 \%$ accuracy on the target class after almost 50 updates, whereas the other methods are fooled on all images after about 25 steps.
168
+
169
+ In conjunction with the experiment on notMNIST, it appears that the Laplace approximation achieves higher uncertainty than Dropout away from the data, as in the untargeted attack. In the targeted attack it exhibits smaller uncertainty than Dropout, yet it is more robust to having its prediction changed. The diagonal Laplace approximation again performs similarly to Dropout.
170
+
171
+ # 5.4 UNCERTAINTY ON MISCLASSIFICATIONS
172
+
173
+ To highlight the scalability of our method, we apply it to a state-of-the-art convolutional network architecture. Recently, deep residual networks (He et al., 2016a;b) have been the most successful ones among those. As demonstrated in (Grosse & Martens, 2016), Kronecker factored curvature methods are applicable to convolutional layers by interpreting them as matrix-matrix multiplications.
174
+
175
+ ![](images/5ed41153d9002457c121cab0e2d0510ad1bedc3708935fa9b5bfa70ad80fe8a9.jpg)
176
+ Figure 5: Inverse ecdf of the predictive entropy from Wide Residual Networks trained with and without Dropout on CIFAR100. For misclassifications, curves on top corresponding to higher uncertainty are desirable, and curves on the bottom for correct classifications.
177
+
178
+ We compare our uncertainty estimates on wide residual networks (Zagoruyko & Komodakis, 2016), a recent variation that achieved competitive performance on CIFAR100 (Krizhevsky & Hinton, 2009) while, in contrast to most other residual architectures, including Dropout at specific points. While this does not correspond to using Dropout in the Bayesian sense (Gal & Ghahramani, 2015), it allows us to at least compare our method to the uncertainty estimates obtained from Dropout.
179
+
180
+ We note that it is straightforward to incorporate batch normalisation (Ioffe & Szegedy, 2015) into the curvature backpropagation algorithms, so we apply a standard Laplace approximation to its parameters as well. We are not aware of any interpretation of Dropout as performing Bayesian inference on the parameters of batch normalisation. Further implementation details are in Appendix G.
181
+
182
+ Again, the accuracy of the prediction methods is comparable (see Table 2 in Appendix F). For calculating the curvature factors, we draw 5, 000 samples per image using the same data augmentation as during training, effectively increasing the dataset size to $2 . 5 \times 1 0 ^ { 8 }$ . The diagonal approximation had to be regularised to the extent of becoming deterministic, so we omit it from the results.
183
+
184
+ In Fig. 5 we compare the distribution of the predictive uncertainty on the test set.5 We distinguish between the uncertainty on correct and incorrect classifications, as the mistakes of a system used in practice may be less severe if the network can at least indicate that it is uncertain. Thus, high uncertainty on misclassifications and low uncertainty on correct ones would be desirable, such that a system could return control to a human expert when it can not make a confident decision. In general, the network tends to be more uncertain on its misclassifcations than its correct ones regardless of whether it was trained with or without Dropout and of the method used for prediction. Both Dropout and the Laplace approximation similarly increase the uncertainty in the predictions, however this is irrespective of the correctness of the classification. Yet, our experiments show that the Kronecker factored Laplace approximation can be scaled to modern convolutional networks and maintain good classification accuracy while having similar uncertainty about the predictions as Dropout.
185
+
186
+ We had to use much stronger regularisation for the Laplace approximation on the wide residual network, possibly because the block-diagonal approximation becomes more inaccurate on deep networks, possibly because the number of parameters is much higher relative to the number of data. It would be interesting to see how the Laplace approximations behaves on a much larger dataset like ImageNet for similarly sized networks, where we have a better ratio of data to parameters and curvature directions. However, even on a relatively small dataset like CIFAR we did not have to regularise the Laplace approximation to the degree of the posterior becoming deterministic.
187
+
188
+ # 6 CONCLUSION
189
+
190
+ We presented a scalable approximation to the Laplace approximation for the posterior of a neural network and provided experimental results suggesting that the uncertainty estimates are on par with current alternatives like Dropout, if not better. It enables practitioners to obtain principled uncertainty estimates from their models, even if they were trained in a maximum likelihood/MAP setting.
191
+
192
+ There are many possible extensions to this work. One would be to automatically determine the scale and regularisation hyperparameters of the Kronecker factored Laplace approximation using the model evidence similar to how (MacKay, 1992) interpolates between the data log likelihood and the width of the prior. The model evidence could further be used to perform Bayesian model averaging on ensembles of neural networks, potentially improving their generalisation ability and uncertainty estimates. A challenging application would be active learning, where only little data is available relative to the number of curvature directions that need to be estimated.
193
+
194
+ # ACKNOWLEDGEMENTS
195
+
196
+ This work was supported by the Alan Turing Institute under the EPSRC grant EP/N510129/1. We thank the anonymous reviewers for their feedback and Harshil Shah for his comments on an earlier draft of this paper.
197
+
198
+ # REFERENCES
199
+
200
+ Anoop Korattikara Balan, Vivek Rathod, Kevin P Murphy, and Max Welling. Bayesian Dark Knowledge. In Advances in Neural Information Processing Systems, pp. 3438–3446, 2015.
201
+ David Barber and Christopher M Bishop. Ensemble Learning for Multi-layer Networks. In Advances in Neural Information Processing Systems, pp. 395–401, 1998.
202
+ Charles Blundell, Julien Cornebise, Koray Kavukcuoglu, and Daan Wierstra. Weight Uncertainty in Neural Networks. In ICML, pp. 1613–1622, 2015.
203
+ Aleksandar Botev, Hippolyt Ritter, and David Barber. Practical Gauss-Newton Optimisation for Deep Learning. In ICML, pp. 557 – 565, 2017.
204
+ Sander Dieleman, Jan Schluter, Colin Raffel, Eben Olson, Søren Kaae Sønderby, Daniel Nouri, et al. ¨ Lasagne: First release., August 2015.
205
+ Yarin Gal and Zoubin Ghahramani. Bayesian Convolutional Neural Networks with BernoulliAapproximate Variational Inference. arXiv preprint arXiv:1506.02158, 2015.
206
+ Yarin Gal and Zoubin Ghahramani. Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning. In ICML, pp. 1050–1059, 2016.
207
+ Soumya Ghosh, Francesco Maria Delle Fave, and Jonathan S Yedidia. Assumed Density Filtering Methods for Learning Bayesian Neural Networks. In AAAI, pp. 1589–1595, 2016.
208
+ Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and Harnessing Adversarial Examples. arXiv preprint arXiv:1412.6572, 2014.
209
+ Alex Graves. Practical Variational Inference for Neural Networks. In Advances in Neural Information Processing Systems, pp. 2348–2356, 2011.
210
+ Roger Grosse and James Martens. A Kronecker-factored Approximate Fisher Matrix for Convolution Layers. In ICML, pp. 573–582, 2016.
211
+ Arjun K Gupta and Daya K Nagar. Matrix Variate Distributions, volume 104. CRC Press, 1999.
212
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016a.
213
+
214
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity Mappings in Deep Residual Networks. In European Conference on Computer Vision, pp. 630–645. Springer, 2016b.
215
+
216
+ Jose Miguel Hern ´ andez-Lobato and Ryan Adams. Probabilistic Backpropagation for Scalable ´ Learning of Bayesian Neural Networks. In ICML, pp. 1861–1869, 2015.
217
+
218
+ Geoffrey E Hinton and Drew Van Camp. Keeping the Neural Networks Simple by Minimizing the Description Length of the Weights. In COLT, pp. 5–13, 1993.
219
+
220
+ Sergey Ioffe and Christian Szegedy. Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift. In ICML, pp. 448–456, 2015.
221
+
222
+ Diederik P Kingma and Max Welling. Auto-encoding Variational Bayes. arXiv preprint arXiv:1312.6114, 2013.
223
+
224
+ Diederik P Kingma, Tim Salimans, and Max Welling. Variational Dropout and the Local Reparameterization Trick. In Advances in Neural Information Processing Systems, pp. 2575–2583, 2015.
225
+
226
+ James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, et al. Overcoming Catastrophic Forgetting in Neural Networks. Proceedings of the National Academy of Sciences, pp. 201611835, 2017.
227
+
228
+ Alex Krizhevsky and Geoffrey Hinton. Learning Multiple Layers of Features from Tiny Images. 2009.
229
+
230
+ Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and Scalable Predictive Uncertainty Estimation using Deep Ensembles. arXiv preprint arXiv:1612.01474, 2016.
231
+
232
+ Yann LeCun, John S. Denker, and Sara A. Solla. Optimal Brain Damage. In Advances in Neural Information Processing Systems, pp. 598–605, 1990.
233
+
234
+ Yingzhen Li and Yarin Gal. Dropout Inference in Bayesian Neural Networks with Alphadivergences. arXiv preprint arXiv:1703.02914, 2017.
235
+
236
+ Christos Louizos and Max Welling. Structured and Efficient Variational Deep Learning with Matrix Gaussian Posteriors. In ICML, pp. 1708–1716, 2016.
237
+
238
+ Christos Louizos and Max Welling. Multiplicative Normalizing Flows for Variational Bayesian Neural Networks. In ICML, pp. 2218–2227, 2017.
239
+
240
+ David J. C. MacKay. A Practical Bayesian Framework for Backpropagation Networks. Neural Computation, 4(3):448–472, 1992.
241
+
242
+ James Martens and Roger Grosse. Optimizing Neural Networks with Kronecker-factored Approximate Curvature. In ICML, pp. 2408–2417, 2015.
243
+
244
+ Radford M Neal. Bayesian Learning via Stochastic Dynamics. In Advances in Neural Information Processing Systems, pp. 475–482, 1993.
245
+
246
+ Nitish Srivastava, Geoffrey E Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: A Simple Way to Prevent Neural Networks from Overfitting. Journal of Machine Learning Research, 15(1):1929–1958, 2014.
247
+
248
+ Shengyang Sun, Changyou Chen, and Lawrence Carin. Learning Structured Weight Uncertainty in Bayesian Neural Networks. In Artificial Intelligence and Statistics, pp. 1283–1292, 2017.
249
+
250
+ Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing Properties of Neural Networks. arXiv preprint arXiv:1312.6199, 2013.
251
+
252
+ Theano Development Team. Theano: A Python Framework for Fast Computation of Mathematical Expressions. arXiv e-prints, abs/1605.02688, May 2016.
253
+
254
+ Sergey Zagoruyko and Nikos Komodakis. Wide Residual Networks. arXiv preprint arXiv:1605.07146, 2016.
255
+
256
+ # Appendices
257
+
258
+ # A DERIVATION OF THE ACTIVATION HESSIAN RECURSION
259
+
260
+ Here, we provide the basic derivation of the factorisation of the diagonal blocks of the Hessian in Eq. 1 and the recursive formula for calculating $\mathcal { H }$ as presented in (Botev et al., 2017).
261
+
262
+ The Hessian of a neural network with parameters $\theta$ as defined in the main text has elements:
263
+
264
+ $$
265
+ [ H ] _ { i j } = \frac { \partial ^ { 2 } } { \partial \theta _ { i } \partial \theta _ { j } } E ( \theta )
266
+ $$
267
+
268
+ For a given layer $\lambda$ , the gradient w.r.t. a weight $W _ { a , b } ^ { \lambda }$ is:
269
+
270
+ $$
271
+ { \frac { \partial E } { \partial W _ { a , b } ^ { \lambda } } } = \sum _ { i } { \frac { \partial h _ { i } ^ { \lambda } } { \partial W _ { a , b } ^ { \lambda } } } { \frac { \partial E } { \partial h _ { i } ^ { \lambda } } } = a _ { b } ^ { \lambda - 1 } { \frac { \partial E } { \partial h _ { a } ^ { \lambda } } }
272
+ $$
273
+
274
+ Keeping $\lambda$ fixed and differentiating again, we find that the per-sample Hessian of that layer is:
275
+
276
+ $$
277
+ \left[ H _ { \lambda } \right] _ { ( a , b ) , ( c , d ) } \equiv \frac { \partial ^ { 2 } E } { \partial W _ { a , b } ^ { \lambda } \partial W _ { c , d } ^ { \lambda } } = a _ { b } ^ { \lambda - 1 } a _ { d } ^ { \lambda - 1 } \left[ \mathcal { H } _ { \lambda } \right] _ { a , c }
278
+ $$
279
+
280
+ where
281
+
282
+ $$
283
+ [ \mathcal { H } _ { \lambda } ] _ { a , b } = \frac { \partial ^ { 2 } E } { \partial h _ { a } ^ { \lambda } \partial h _ { b } ^ { \lambda } }
284
+ $$
285
+
286
+ is the pre-activation Hessian.
287
+
288
+ We can reexpress this in matrix notation as a Kronecker product as in Eq. 1:
289
+
290
+ $$
291
+ H _ { \lambda } = \frac { \partial ^ { 2 } E } { \partial \operatorname { v e c } \left( W _ { \lambda } \right) \partial \operatorname { v e c } \left( W _ { \lambda } \right) } = \left( a _ { \lambda - 1 } a _ { \lambda - 1 } ^ { \mathsf { T } } \right) \otimes \mathcal { H } _ { \lambda }
292
+ $$
293
+
294
+ The pre-activation Hessian can be calculated recursively as:
295
+
296
+ $$
297
+ \mathcal { H } _ { \lambda } = B _ { \lambda } W _ { \lambda + 1 } ^ { \mathsf { T } } \mathcal { H } _ { \lambda + 1 } W _ { \lambda + 1 } B _ { \lambda } + D _ { \lambda }
298
+ $$
299
+
300
+ where the diagonal matrices $B$ and $D$ are defined as:
301
+
302
+ $$
303
+ \begin{array} { l } { { B _ { \lambda } = \mathrm { d i a g } \left( \mathbf f _ { \lambda } ^ { \prime } ( h _ { \lambda } ) \right) } } \\ { { D _ { \lambda } = \mathrm { d i a g } \left( \mathbf f _ { \lambda } ^ { \prime \prime } ( h _ { \lambda } ) { \frac { \partial E } { \partial a _ { \lambda } } } \right) } } \end{array}
304
+ $$
305
+
306
+ $\mathbf { f ^ { \prime } }$ and $\mathbf { f } ^ { \prime \prime }$ denote the first and second derivative of the transfer function. The recursion is initialised with the Hessian of the error w.r.t. the linear network outputs.
307
+
308
+ For further details and on how to calculate the diagonal blocks of the Gauss-Newton and Fisher matrix, we refer the reader to (Botev et al., 2017) and (Martens & Grosse, 2015).
309
+
310
+ # B MATRIX NORMAL DISTRIBUTION
311
+
312
+ The matrix normal distribution (Gupta & Nagar, 1999) is a multivariate distribution over an entire matrix of shape $n \times p$ rather than just a vector. In contrast to the multivariate normal distribution, it is parameterised by two p.s.d. covariance matrices, $U : n \times n$ and $V : p \times p$ , which indicate the covariance of the rows and columns respectively. In addition it has a mean matrix $M : n \times p$ .
313
+
314
+ A vectorised sample from a matrix normal distribution $X \sim { \mathcal { M N } } ( M , U , V )$ corresponds to a sample from a normal distribution $\operatorname { v e c } ( X ) \sim { \mathcal { N } } ( \operatorname { v e c } ( M ) , U \otimes V )$ . However, samples can be drawn more efficiently as $X = M + A Z B$ with $Z \sim \mathcal { M N } ( 0 , I , I )$ , and $A A ^ { \mathsf { T } } = U$ and $B ^ { \intercal } B = V$ . The sample $Z$ corresponds to a sample from a normal distribution of length $n p$ that has been reshaped to a $n \times p$ matrix. This is more efficient in the sense that we only need to calculate two matrix-matrix products of small matrices, rather than a matrix-vector product with one big one.
315
+
316
+ # C APPROXIMATION OF THE EXPECTED ACTIVATION HESSIAN
317
+
318
+ While the square root of $\mathcal { Q } _ { \lambda }$ is calculated during the forward pass on all layers, $\mathcal { H }$ requires an additional backward pass. Strictly speaking, it is not essential to approximate $\mathbb { E } \left[ \mathcal { H } \right]$ for the Kronecker factored Laplace approximation, as in contrast to optimisation procedures the curvature only needs to be calculated once and is thus not time critical. For datasets of the scale of ImageNet and the networks used for such datasets, it would still be impractically slow to perform the calculation for every data point individually. Furthermore, as most datasets are augmented during training, e.g. random cropping or reflections of images, the curvature of the network can be estimated using the same augmentations, effectively increasing the size of the dataset by orders of magnitude. Thus, we make use of the minibatch approximation in our experiments — as we make use of data augmentation — in order to demonstrate its practical applicability.
319
+
320
+ We note that E [H] can be calculated exactly by running KFRA (Botev et al., 2017) with a minibatchsize of one, and then averaging the results. KFAC (Martens & Grosse, 2015), in contrast, stochastically approximates the Fisher matrix, so even when run for every datapoint separately, it cannot calculate the curvature factor exactly.
321
+
322
+ In the following, we also show figures for the adversarial experiments in which we calculate the curvature per datapoint and without data augmentation:
323
+
324
+ ![](images/bd401ad0b8e9d0a6e372927c134409d5b015ccf19eb9e8745ca37ac78fb7f7a9.jpg)
325
+ Figure 6: Untargeted adversarial attack for Kronecker factored Laplace approximation with the curvature calculated with and without data augmentation/approximating the activation Hessian.
326
+
327
+ Fig. 6 and Fig. 7 show how the Laplace approximation with the curvature estimated from 1000 randomly sampled binary MNIST images and the activation Hessian calculated with a minibatch size of 100 performs in comparison to the curvature factor being calculated without any data augmentation with a batch size of 100 or exactly. We note that without data augmentation we had to use much stronger regularisation of the curvature factors, in particular we had to add a non-negligible multiple of the identity to the factors, whereas with data augmentation it was only needed to ensure that the matrices are invertible. The Kronecker factored Laplace approximation reaches particularly high uncertainty on the untargeted adversarial attack and is most robust on the targeted attack when using data augmentation, suggesting that it is particularly well suited for large datasets and ones where some form of data augmentation can be applied. The difference between approximating the activation Hessian over a minibatch and calculating it exactly appears to be negligible.
328
+
329
+ ![](images/e31a6b6b0d0ab2399091e0aa6f1e8ffc0b21f98d8546841f2ad9096b7c2ec352.jpg)
330
+ Figure 7: Targeted adversarial attack for Kronecker factored Laplace approximation with the curvature calculated with and without data augmentation/approximating the activation Hessian.
331
+
332
+ # D MEMORY AND COMPUTATIONAL REQUIREMENTS
333
+
334
+ If we denote the dimensionality of the input to layer $\lambda$ as $D _ { \lambda - 1 }$ and its output as $D _ { \lambda }$ , the curvature factors correspond to the two precision matrices with Dλ−1(Dλ−1+1)2 and $\frac { D _ { \lambda } ( D _ { \lambda } + 1 ) } { 2 }$ ‘parameters’ to estimate, since they are symmetric. So across a network, the number of curvature directions that we are estimating grows linearly in the number of layers and quadratically in the dimension of the layers, i.e. the number of columns of the weight matrices. The size of the full Hessian, on the other hand, grows quadratically in the number of layers and with the fourth power in the dimensionality of the layers (assuming they are all the same size).
335
+
336
+ Once the curvature factors are calculated, which only needs to be done once, we use their Cholesky decomposition to solve two triangular linear systems when sampling weights from the matrix normal distribution. We use the same weight samples for each minibatch, i.e. we do not sample a weight matrix per datapoint. This is for computational efficiency and does not change the expectation.
337
+
338
+ One possibility to save computation time would be to sample a fixed set of weight matrices from the approximate posterior — in order to avoid solving the linear system on every forward pass — and treat the networks that they define as an ensemble. The individual ensemble members can be evaluated in parallel and their outputs averaged, which can be done with a small overhead over evaluating a single network given sufficient compute resources. A further speed up can be achieved by distilling the predictive distributions of the Laplace network into a smaller, deterministic feedforward network as successfully demonstrated in (Balan et al., 2015) for posterior samples using HMC.
339
+
340
+ # E COMPLEMENTARY FIGURES FOR THE TOY DATASET
341
+
342
+ Fig. 8 shows the different Laplace approximations (Kronecker factored, diagonal, full) from the main text without any hyperparameter tuning. The figure of the uncertainty obtained from samples using HMC is repeated. Note that the scale is larger than in the main text due to the high uncertainty of the Laplace approximations.
343
+
344
+ The Laplace approximations are increasingly uncertain away from the data, as the true posterior estimated from HMC samples, however they all overestimate the uncertainty without regularisation. This is easy to fix by optimising the hyperparameters on a validation set as discussed in the main text, resulting in posterior uncertainty much more similar to the true posterior. As previously discussed in (Botev et al., 2017), the Hessian of a neural network is usually underdetermined as the number of data points is much smaller than the number of parameters — in our case we have 20 data points to estimate a $7 8 \times 7 8$ precision matrix. This leads to the full Laplace approximation vastly overestimating the uncertainty and a bad predictive mean. Both the Kronecker factored and the diagonal approximation exhibit smaller variance than the full Laplace approximation as they restrict the structure of the precision matrix. Consistently with the other experiments, we find the diagonal
345
+
346
+ ![](images/8728ab113d8def68159f046cb816ff9c7101a0cf17ad7545a887f6a29fd79c4f.jpg)
347
+ Figure 8: Toy regression uncertainty. Black dots are data points, the black line shows the underlying noiseless function. The red line shows the deterministic prediction of the trained network, the blue line the mean output. Each shade of blue visualises one additional standard deviation.
348
+
349
+ Laplace approximation to place more mass in low probability areas of the posterior than the Kronecker factored approximation, resulting in higher variance on the regression problem. This leads to a need for greater regularisation of the diagonal approximation to obtain acceptable predictive performance, and underestimating the uncertainty.
350
+
351
+ # F PREDICTION ACCURACY
352
+
353
+ This section shows the accuracy values obtained from the different predictions methods on the feedforward networks for MNIST and the wide residual network for CIFAR100. The results for MNIST are shown in Table 1 and the results for CIFAR in Table 2.
354
+
355
+ In all cases, neither MC Dropout nor the Laplace approximation significantly change the classification accuracy of the network in comparison to a deterministic forward pass.
356
+
357
+ Table 1: Test accuracy of the feedforward network trained on MNIST
358
+
359
+ <table><tr><td>Prediction Method</td><td>Accuracy</td></tr><tr><td>FFG Deterministic</td><td>98.88% 98.86%</td></tr><tr><td>MC Dropout Diagonal Laplace</td><td>98.85% 98.85%</td></tr><tr><td>KF Laplace</td><td>98.80%</td></tr></table>
360
+
361
+ Table 2: Accuracy on the final 5, 000 CIFAR100 test images for a wide residual network trained with and without Dropout.
362
+
363
+ <table><tr><td colspan="3">Accuracy</td></tr><tr><td>Prediction Method</td><td>Dropout</td><td>Deterministic</td></tr><tr><td>Deterministic</td><td>79.12%</td><td>79.18%</td></tr><tr><td>MC Dropout</td><td>79.20%</td><td>1</td></tr><tr><td>KF Laplace</td><td>79.10%</td><td>79.36%</td></tr></table>
364
+
365
+ # G IMPLEMENTATION DETAILS FOR RESIDUAL NETWORKS
366
+
367
+ Our wide residual network has $n { = } 3$ block repetitions and a width factor of $k { = } 8$ on CIFAR100 with and without Dropout using hyperparameters taken from (Zagoruyko & Komodakis, 2016): the network parameters are trained on a cross-entropy loss using Nesterov momentum with an initial learning rate of 0.1 and momentum of 0.9 for 200 epochs with a minibatch size of 128. We decay the learning rate every 50 epochs by a factor of 0.2, which is slightly different to the schedule used in (Zagoruyko & Komodakis, 2016) (they decay after 60, 120 and 160 epochs). As the original authors, we use $L _ { 2 }$ -regularisation with a factor of $5 \times 1 0 ^ { - 4 }$ .
368
+
369
+ We make one small modification to the architecture: instead of downsampling with $1 \times 1$ convolutions with stride 2, we use $2 \times 2$ convolutions. This is due to Theano not supporting the transformation of images into the patches extracted by a convolution for $1 \times 1$ convolutions with stride greater than 1, which we require for our curvature backpropagation through convolutions.
370
+
371
+ We apply a standard Laplace approximation to the batch normalisation parameters — a Kronecker factorisation is not needed, since the parameters are one-dimensional. When calculating the curvature factors, we use the moving averages for the per-layer means and standard deviations obtained after training, in order to maintain independence between the data points in a minibatch.
372
+
373
+ We need to make a further approximation to the ones discussed in Section 2.2 when backpropagating the curvature for residual networks. The residual blocks compute a function of the form $r e s ( x ) =$ $x + f _ { \phi } ( x )$ , where $f _ { \phi }$ typically is a sequence of convolutions, batch normalisation and elementwise nonlinearities. This means that we would need to pass back two curvature matrices, one for each summand. However, this would double the number of backpropagated matrices for each residual connection, hence the computation time/memory requirements would grow exponentially in the number of residual blocks. Therefore, we simply add the curvature matrices after each residual connection.
parse/train/Skdvd2xAZ/Skdvd2xAZ_content_list.json ADDED
@@ -0,0 +1,1919 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "A SCALABLE LAPLACE APPROXIMATION FOR NEURAL NETWORKS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 99,
9
+ 666,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Hippolyt Ritter1∗, Aleksandar Botev1, David Barber1 2 1University College London 2Alan Turing Institute ",
17
+ "bbox": [
18
+ 184,
19
+ 166,
20
+ 562,
21
+ 200
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 237,
32
+ 544,
33
+ 252
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "We leverage recent insights from second-order optimisation for neural networks to construct a Kronecker factored Laplace approximation to the posterior over the weights of a trained network. Our approximation requires no modification of the training procedure, enabling practitioners to estimate the uncertainty of their models currently used in production without having to retrain them. We extensively compare our method to using Dropout and a diagonal Laplace approximation for estimating the uncertainty of a network. We demonstrate that our Kronecker factored method leads to better uncertainty estimates on out-of-distribution data and is more robust to simple adversarial attacks. Our approach only requires calculating two square curvature factor matrices for each layer. Their size is equal to the respective square of the input and output size of the layer, making the method efficient both computationally and in terms of memory usage. We illustrate its scalability by applying it to a state-of-the-art convolutional network architecture. ",
40
+ "bbox": [
41
+ 233,
42
+ 267,
43
+ 764,
44
+ 448
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 473,
55
+ 336,
56
+ 489
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Neural networks are most commonly trained in a maximum a posteriori (MAP) setting, which only yields point estimates of the parameters, ignoring any uncertainty about them. This often leads to overconfident predictions, especially in regimes that are weakly covered by training data or far away from the data manifold. While the confidence of wrong predictions is usually irrelevant in a research context, it is essential that a Machine Learning algorithm knows when it does not know in the real world, as the consequences of mistakes can be fatal, be it when driving a car or diagnosing a disease. ",
63
+ "bbox": [
64
+ 174,
65
+ 505,
66
+ 823,
67
+ 588
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "The Bayesian framework of statistics provides a principled way for avoiding overconfidence in the parameters by treating them as unknown quantities and integrating over all possible values. Specifically, for the prediction of new data under a model, it fits a posterior distribution over the parameters given the training data and weighs the contribution of each setting of the parameters to the prediction by the probability of the data under those parameters times their prior probability. However, the posterior of neural networks is usually intractable due to their size and nonlinearity. ",
74
+ "bbox": [
75
+ 174,
76
+ 594,
77
+ 823,
78
+ 678
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "There has been previous interest in integrating neural networks into the Bayesian framework (MacKay, 1992; Hinton & Van Camp, 1993; Neal, 1993; Barber & Bishop, 1998), however these approaches were designed for small networks by current standards. Recent adaptations to architectures of modern scale rely on crude approximations of the posterior to become tractable. All of (Graves, 2011; Hernandez-Lobato & Adams, 2015; Blundell et al., 2015) assume independence between the ´ individual weights. While they achieve good results on small datasets, this strong restriction of the posterior is susceptible to underestimating the uncertainty, in particular when optimising the variational bound. The approach in (Gal & Ghahramani, 2016) requires the use of certain stochastic regularisers which are not commonly present in most recent architectures. Furthermore, it is not clear if the approximate posterior defined by these regularisers is a good fit to the true posterior. ",
85
+ "bbox": [
86
+ 174,
87
+ 685,
88
+ 825,
89
+ 824
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Recent work on second-order optimisation of neural networks (Martens & Grosse, 2015; Botev et al., 2017) has demonstrated that the diagonal blocks of the curvature can be well approximated by a Kronecker product. We combine this insight with the idea of modelling the posterior over the weights as a Gaussian, using a Laplace approximation (MacKay, 1992) with Kronecker factored covariance matrices. This leads to a computationally efficient matrix normal posterior distribution (Gupta & Nagar, 1999) over the weights of every layer. Since the Laplace approximation is applied after training, our approach can be used to obtain uncertainty estimates from existing networks. ",
96
+ "bbox": [
97
+ 174,
98
+ 832,
99
+ 823,
100
+ 901
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "",
107
+ "bbox": [
108
+ 173,
109
+ 103,
110
+ 825,
111
+ 132
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "2 THE CURVATURE OF NEURAL NETWORKS ",
118
+ "text_level": 1,
119
+ "bbox": [
120
+ 174,
121
+ 152,
122
+ 555,
123
+ 169
124
+ ],
125
+ "page_idx": 1
126
+ },
127
+ {
128
+ "type": "text",
129
+ "text": "Our method is inspired by recent Kronecker factored approximations of the curvature of a neural network (Martens & Grosse, 2015; Botev et al., 2017) for optimisation and we give a high-level review of these in the following. While the two methods approximate the Gauss-Newton and Fisher matrix respectively, as they are guaranteed to be positive semi-definite (p.s.d.), we base all of our discussion on the Hessian in order to be as general as possible. ",
130
+ "bbox": [
131
+ 174,
132
+ 184,
133
+ 825,
134
+ 255
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "2.1 NEURAL NETWORK NOTATION ",
141
+ "text_level": 1,
142
+ "bbox": [
143
+ 176,
144
+ 272,
145
+ 429,
146
+ 286
147
+ ],
148
+ "page_idx": 1
149
+ },
150
+ {
151
+ "type": "text",
152
+ "text": "We denote a feedforward network as taking an input $a _ { 0 } = x$ and producing an output $h _ { L }$ . The intermediate representations for layers $\\lambda = 1 , . . . , L$ are denoted as $h _ { \\lambda } = W _ { \\lambda } a _ { \\lambda - 1 }$ and $a _ { \\lambda } = f _ { \\lambda } ( h _ { \\lambda } )$ . We refer to $a _ { \\lambda }$ as the activations, and $h _ { \\lambda }$ as the (linear) pre-activations. The bias terms are absorbed into the $W _ { \\lambda }$ by appending a 1 to each $a _ { \\lambda }$ . The network parameters are optimised w.r.t. an error function $E ( y , h _ { L } )$ for targets $y$ . Most commonly used error functions, such as squared error and categorical cross-entropy, can be interpreted as exponential family negative log likelihoods $- \\log p ( y | h _ { L } )$ . ",
153
+ "bbox": [
154
+ 173,
155
+ 297,
156
+ 825,
157
+ 382
158
+ ],
159
+ "page_idx": 1
160
+ },
161
+ {
162
+ "type": "text",
163
+ "text": "2.2 KRONECKER FACTORED SECOND-ORDER OPTIMISATION ",
164
+ "text_level": 1,
165
+ "bbox": [
166
+ 174,
167
+ 398,
168
+ 609,
169
+ 414
170
+ ],
171
+ "page_idx": 1
172
+ },
173
+ {
174
+ "type": "text",
175
+ "text": "Traditional second-order methods use either the Hessian matrix or a positive semi-definite approximation thereof to generate parameter updates of the form $\\Delta = C ^ { - 1 } g$ , where $C$ is the chosen curvature matrix and $g$ the gradient of the error function parameterised by the network. However, this curvature matrix is infeasbile to compute for modern neural networks as their number of parameters is often in the millions, rendering the size of $C$ of the order of several terabytes. ",
176
+ "bbox": [
177
+ 173,
178
+ 424,
179
+ 825,
180
+ 497
181
+ ],
182
+ "page_idx": 1
183
+ },
184
+ {
185
+ "type": "text",
186
+ "text": "Recent work (Martens & Grosse, 2015; Botev et al., 2017) exploits that, for a single data point, the diagonal blocks of these curvature matrices are Kronecker factored: ",
187
+ "bbox": [
188
+ 171,
189
+ 503,
190
+ 823,
191
+ 532
192
+ ],
193
+ "page_idx": 1
194
+ },
195
+ {
196
+ "type": "equation",
197
+ "img_path": "images/b8521042e25f111bdaac593dbe6b67fc61fa70b6a3348105b00e1d36391546d9.jpg",
198
+ "text": "$$\nH _ { \\lambda } = \\frac { \\partial ^ { 2 } E } { \\partial \\operatorname { v e c } ( W _ { \\lambda } ) \\partial \\operatorname { v e c } ( W _ { \\lambda } ) } = \\mathcal { Q } _ { \\lambda } \\otimes \\mathcal { H } _ { \\lambda }\n$$",
199
+ "text_format": "latex",
200
+ "bbox": [
201
+ 357,
202
+ 549,
203
+ 638,
204
+ 587
205
+ ],
206
+ "page_idx": 1
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "where $H _ { \\lambda }$ is the Hessian w.r.t. the weights in layer $\\lambda$ . $\\mathcal { Q } _ { \\lambda } = a _ { \\lambda - 1 } a _ { \\lambda - 1 } ^ { \\top }$ denotes the covariance of the incoming activations aλ−1 and Hλ = ∂ E∂h ∂h the pre-activation Hessian, i.e. the Hessian of the error w.r.t. the linear pre-activations $h _ { \\lambda }$ in a layer. We provide the derivation for this result as well as the recursion for calculating $\\mathcal { H }$ in Appendix A. ",
211
+ "bbox": [
212
+ 174,
213
+ 598,
214
+ 825,
215
+ 665
216
+ ],
217
+ "page_idx": 1
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "The Kronecker factorisation holds two key advantages: the matrices that need be computed and stored are much smaller — if we assume all layers to be of dimensionality $D$ , the two factors are each of size $D ^ { 2 }$ , whereas the full Hessian for the weights of only one layer would have $D ^ { 4 }$ elements. Furthermore, the inverse of a Kronecker product is equal to the Kronecker product of the inverses, so it is only necessary to invert those two moderately sized matrices. ",
222
+ "bbox": [
223
+ 174,
224
+ 670,
225
+ 825,
226
+ 742
227
+ ],
228
+ "page_idx": 1
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "In order to maintain this structure over a minibatch of data, all Kronecker factored second-order methods make two core approximations: First, they only model the diagonal blocks corresponding to the weights of a layer, such that the curvature decomposes into $L$ independent matrices. Second, they assume $\\mathcal { Q } _ { \\lambda }$ and $\\mathcal { H } _ { \\lambda }$ to be independent. This is in order to maintain the Kronecker factorisation in expectation, i.e. $\\mathbb { E } \\left[ \\mathcal { Q } _ { \\lambda } \\otimes \\mathcal { H } _ { \\lambda } \\right] \\approx \\mathbb { E } \\left[ \\mathcal { Q } _ { \\lambda } \\right] \\otimes \\mathbb { E } \\left[ \\mathcal { H } _ { \\lambda } \\right]$ , since the expectation of a Kronecker product is not guaranteed to be Kronecker factored itself. ",
233
+ "bbox": [
234
+ 173,
235
+ 750,
236
+ 825,
237
+ 833
238
+ ],
239
+ "page_idx": 1
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "The main difference between the Kronecker factored second-order optimisers lies in how they efficiently approximate $\\mathbb { E } \\left[ \\mathcal { H } _ { \\lambda } \\right]$ . For exact calculation, it would be necessary to pass back an entire matrix per data point in a minibatch, which imposes infeasible memory and computational requirements. KFRA (Botev et al., 2017) simply passes back the expectation at every layer, while KFAC (Martens & Grosse, 2015) utilises the Fisher identity to only propagate a vector rather than a matrix, approximating the Kronecker factors with a stochastic rank-one matrix for each data point. ",
244
+ "bbox": [
245
+ 174,
246
+ 839,
247
+ 825,
248
+ 924
249
+ ],
250
+ "page_idx": 1
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "The diagonal blocks of the Hessian and Gauss-Newton matrix are equal for neural networks with piecewise linear activation functions (Botev et al., 2017), thus both methods can be used to directly approximate the diagonal blocks of the Hessian of such networks, as the Gauss-Newton and Fisher are equivalent for networks that parameterise an exponential family log likelihood. ",
255
+ "bbox": [
256
+ 174,
257
+ 103,
258
+ 825,
259
+ 160
260
+ ],
261
+ "page_idx": 2
262
+ },
263
+ {
264
+ "type": "text",
265
+ "text": "3 A SCALABLE LAPLACE APPROXIMATION FOR NEURAL NETWORKS ",
266
+ "text_level": 1,
267
+ "bbox": [
268
+ 171,
269
+ 183,
270
+ 764,
271
+ 199
272
+ ],
273
+ "page_idx": 2
274
+ },
275
+ {
276
+ "type": "text",
277
+ "text": "3.1 THE LAPLACE APPROXIMATION ",
278
+ "text_level": 1,
279
+ "bbox": [
280
+ 176,
281
+ 214,
282
+ 436,
283
+ 229
284
+ ],
285
+ "page_idx": 2
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "The standard Laplace approximation is obtained by taking the second-order Taylor expansion around a mode of a distribution. For a neural network, such a mode can be found using standard gradientbased methods. Specifically, if we approximate the log posterior over the weights of a network given some data $\\mathcal { D }$ around a MAP estimate $\\boldsymbol { \\theta } ^ { * }$ , we obtain: ",
290
+ "bbox": [
291
+ 173,
292
+ 241,
293
+ 825,
294
+ 299
295
+ ],
296
+ "page_idx": 2
297
+ },
298
+ {
299
+ "type": "equation",
300
+ "img_path": "images/333314683c0abf6a5a733994f08d5666621f38a95390596a723f4505fce14fb6.jpg",
301
+ "text": "$$\n\\log p ( \\boldsymbol { \\theta } | \\mathcal { D } ) \\approx \\log p ( \\boldsymbol { \\theta } ^ { * } | \\mathcal { D } ) - \\frac { 1 } { 2 } \\big ( \\boldsymbol { \\theta } - \\boldsymbol { \\theta } ^ { * } \\big ) ^ { \\top } \\bar { H } ( \\boldsymbol { \\theta } - \\boldsymbol { \\theta } ^ { * } )\n$$",
302
+ "text_format": "latex",
303
+ "bbox": [
304
+ 328,
305
+ 318,
306
+ 671,
307
+ 348
308
+ ],
309
+ "page_idx": 2
310
+ },
311
+ {
312
+ "type": "text",
313
+ "text": "where $\\theta = [ \\mathrm { v e c } ( W _ { 1 } ) , . . . , \\mathrm { v e c } ( W _ { L } ) ]$ is the stacked vector of weights and $\\bar { H } = \\mathbb { E } \\left[ H \\right]$ the average Hessian of the negative log posterior1. The first order term is missing because we expand the function around a maximum $\\boldsymbol { \\theta } ^ { * }$ , where the gradient is zero. If we exponentiate this equation, it is easy to notice that the right-hand side is of Gaussian functional form for $\\theta$ , thus we obtain a normal distribution by integrating over it. The posterior over the weights is then approximated as Gaussian: ",
314
+ "bbox": [
315
+ 173,
316
+ 359,
317
+ 825,
318
+ 435
319
+ ],
320
+ "page_idx": 2
321
+ },
322
+ {
323
+ "type": "equation",
324
+ "img_path": "images/cf1e95882914704d05c830b48d2f12d37440a3d90aa302355aba74889230764b.jpg",
325
+ "text": "$$\n\\theta \\sim \\mathcal { N } ( \\theta ^ { * } , \\bar { H } ^ { - 1 } )\n$$",
326
+ "text_format": "latex",
327
+ "bbox": [
328
+ 441,
329
+ 454,
330
+ 558,
331
+ 474
332
+ ],
333
+ "page_idx": 2
334
+ },
335
+ {
336
+ "type": "text",
337
+ "text": "assuming $\\bar { H }$ is p.s.d. We can then approximate the posterior mean when predicting on unseen data $D ^ { * }$ by averaging the predictions of $T$ Monte Carlo samples ${ \\boldsymbol { \\theta } } ^ { ( t ) }$ from the approximate posterior: ",
338
+ "bbox": [
339
+ 173,
340
+ 486,
341
+ 828,
342
+ 520
343
+ ],
344
+ "page_idx": 2
345
+ },
346
+ {
347
+ "type": "equation",
348
+ "img_path": "images/7f13d48c5e36c255d6f912a3e1f350bef6320aee46d47d9383bec0c07e6aafda.jpg",
349
+ "text": "$$\np ( \\mathcal { D } ^ { * } | \\mathcal { D } ) = \\int p ( \\mathcal { D } ^ { * } | \\boldsymbol { \\theta } ) p ( \\boldsymbol { \\theta } | \\mathcal { D } ) d \\boldsymbol { \\theta } \\approx \\frac { 1 } { T } \\sum _ { t = 1 } ^ { T } p ( \\mathcal { D } ^ { * } | \\boldsymbol { \\theta } ^ { ( t ) } )\n$$",
350
+ "text_format": "latex",
351
+ "bbox": [
352
+ 320,
353
+ 537,
354
+ 678,
355
+ 582
356
+ ],
357
+ "page_idx": 2
358
+ },
359
+ {
360
+ "type": "text",
361
+ "text": "3.2 DIAGONAL LAPLACE APPROXIMATION ",
362
+ "text_level": 1,
363
+ "bbox": [
364
+ 176,
365
+ 598,
366
+ 483,
367
+ 613
368
+ ],
369
+ "page_idx": 2
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "Unfortunately, it is not feasible to compute or invert the Hessian matrix w.r.t. all of the weights jointly. An approximation that is easy to compute in modern automatic differentiation frameworks is the diagonal of the Fisher matrix $F$ , which is simply the expectation of the squared gradients: ",
374
+ "bbox": [
375
+ 174,
376
+ 625,
377
+ 826,
378
+ 667
379
+ ],
380
+ "page_idx": 2
381
+ },
382
+ {
383
+ "type": "equation",
384
+ "img_path": "images/67d188bafccb6d7e7a78a805a8871adc852fc39c49b2f49bd9a5d47743c3ee5d.jpg",
385
+ "text": "$$\nH \\approx \\mathrm { d i a g } ( F ) = \\mathrm { d i a g } ( \\mathbb { E } \\left[ \\nabla _ { \\theta } \\log p ( y | x ) \\nabla _ { \\theta } \\log p ( y | x ) ^ { \\top } \\right] ) = \\mathrm { d i a g } ( \\mathbb { E } \\left[ ( \\nabla _ { \\theta } \\log p ( y | x ) ) ^ { 2 } \\right] )\n$$",
386
+ "text_format": "latex",
387
+ "bbox": [
388
+ 196,
389
+ 694,
390
+ 781,
391
+ 722
392
+ ],
393
+ "page_idx": 2
394
+ },
395
+ {
396
+ "type": "text",
397
+ "text": "where diag extracts the diagonal of a matrix or turns a vector into a diagonal matrix. Such diagonal approximations to the curvature of a neural network have been used successfully for pruning the weights (LeCun et al., 1990) and, more recently, for transfer learning (Kirkpatrick et al., 2017). ",
398
+ "bbox": [
399
+ 174,
400
+ 737,
401
+ 825,
402
+ 780
403
+ ],
404
+ "page_idx": 2
405
+ },
406
+ {
407
+ "type": "text",
408
+ "text": "This corresponds to modelling the weights with a Normal distribution with diagonal covariance: ",
409
+ "bbox": [
410
+ 171,
411
+ 785,
412
+ 803,
413
+ 801
414
+ ],
415
+ "page_idx": 2
416
+ },
417
+ {
418
+ "type": "equation",
419
+ "img_path": "images/d202f8c5ff2b2edab4d5ba7d43596938a2eb555b65c7068640ed3f9320b4c52f.jpg",
420
+ "text": "$$\n\\operatorname { v e c } ( W _ { \\lambda } ) \\sim { \\mathcal { N } } ( \\operatorname { v e c } ( W _ { \\lambda } ^ { * } ) , \\operatorname { d i a g } ( F _ { \\lambda } ) ^ { - 1 } ) \\quad { \\mathrm { f o r ~ } } \\lambda = 1 , \\dots , L\n$$",
421
+ "text_format": "latex",
422
+ "bbox": [
423
+ 305,
424
+ 820,
425
+ 694,
426
+ 840
427
+ ],
428
+ "page_idx": 2
429
+ },
430
+ {
431
+ "type": "text",
432
+ "text": "Unfortunately, even if the Taylor approximation is accurate, this will place significant probability mass in low probability areas of the true posterior if some weights exhibit high covariance. ",
433
+ "bbox": [
434
+ 171,
435
+ 853,
436
+ 823,
437
+ 883
438
+ ],
439
+ "page_idx": 2
440
+ },
441
+ {
442
+ "type": "text",
443
+ "text": "3.3 KRONECKER FACTORED LAPLACE APPROXIMATION ",
444
+ "text_level": 1,
445
+ "bbox": [
446
+ 173,
447
+ 103,
448
+ 575,
449
+ 118
450
+ ],
451
+ "page_idx": 3
452
+ },
453
+ {
454
+ "type": "text",
455
+ "text": "So while it is desirable to model the covariance between the weights, some approximations are needed in order to remain computationally efficient. First, we assume the weights of the different layers to be independent. This corresponds to the block-diagonal approximation in KFAC and KFRA, which empirically preserves sufficient information about the curvature to obtain competitive optimisation performance. For our purposes this means that our posterior factorises over the layers. ",
456
+ "bbox": [
457
+ 174,
458
+ 128,
459
+ 825,
460
+ 200
461
+ ],
462
+ "page_idx": 3
463
+ },
464
+ {
465
+ "type": "text",
466
+ "text": "As discussed above, the Hessian of the log-likelihood for a single datapoint is Kronecker factored, and we denote the two factor matrices as ${ \\cal H } _ { \\lambda } = { \\mathcal Q } _ { \\lambda } \\otimes { \\mathcal H } _ { \\lambda }$ .2 By further assuming independence between $\\mathcal { Q }$ and $\\mathcal { H }$ in all layers, we can approximate the expected Hessian of each layer as: ",
467
+ "bbox": [
468
+ 174,
469
+ 205,
470
+ 825,
471
+ 252
472
+ ],
473
+ "page_idx": 3
474
+ },
475
+ {
476
+ "type": "equation",
477
+ "img_path": "images/d4e47d88af0576da23b9a0a7ce485ed4397c8ae1f2380f8a4bc9dfa977f43fd8.jpg",
478
+ "text": "$$\n\\mathbb { E } \\left[ H _ { \\lambda } \\right] = \\mathbb { E } \\left[ \\mathcal { Q } _ { \\lambda } \\otimes \\mathcal { H } _ { \\lambda } \\right] \\approx \\mathbb { E } \\left[ \\mathcal { Q } _ { \\lambda } \\right] \\otimes \\mathbb { E } \\left[ \\mathcal { H } _ { \\lambda } \\right]\n$$",
479
+ "text_format": "latex",
480
+ "bbox": [
481
+ 354,
482
+ 270,
483
+ 645,
484
+ 287
485
+ ],
486
+ "page_idx": 3
487
+ },
488
+ {
489
+ "type": "text",
490
+ "text": "Hence, the Hessian of every layer is Kronecker factored over an entire dataset and the Laplace approximation can be approximated by a product of Gaussians. Each Gaussian has a Kronecker factored covariance, corresponding to a matrix normal distribution (Gupta & Nagar, 1999), which considers the two Kronecker factors of the covariance to be the covariances of the rows and columns of a matrix. The two factors are much smaller than the full covariance and allow for significantly more efficient inversion and sampling (we review the matrix normal distribution in Appendix B). ",
491
+ "bbox": [
492
+ 174,
493
+ 296,
494
+ 825,
495
+ 382
496
+ ],
497
+ "page_idx": 3
498
+ },
499
+ {
500
+ "type": "text",
501
+ "text": "Our resulting posterior for the weights in layer $\\lambda$ is then: ",
502
+ "bbox": [
503
+ 173,
504
+ 388,
505
+ 545,
506
+ 404
507
+ ],
508
+ "page_idx": 3
509
+ },
510
+ {
511
+ "type": "equation",
512
+ "img_path": "images/f8e7ca58ef6b39545d43d71a592e83d9d0fa209d6d79cfde44af829dd7be389d.jpg",
513
+ "text": "$$\nW _ { \\lambda } \\sim \\mathcal { M N } ( W _ { \\lambda } ^ { \\ast } , \\bar { \\mathcal { Q } } _ { \\lambda } ^ { - 1 } , \\bar { \\mathcal { H } } _ { \\lambda } ^ { - 1 } )\n$$",
514
+ "text_format": "latex",
515
+ "bbox": [
516
+ 398,
517
+ 420,
518
+ 599,
519
+ 440
520
+ ],
521
+ "page_idx": 3
522
+ },
523
+ {
524
+ "type": "text",
525
+ "text": "In contrast to optimisation methods, we do not need to approximate $\\mathbb { E } \\left[ \\mathcal { H } _ { \\lambda } \\right]$ as it is only calculated once. However, when it is possible to augment the data (e.g. randomised cropping of images), it may be advantageous. We provide a more detailed discussion of this in Appendix C. ",
526
+ "bbox": [
527
+ 174,
528
+ 449,
529
+ 826,
530
+ 492
531
+ ],
532
+ "page_idx": 3
533
+ },
534
+ {
535
+ "type": "text",
536
+ "text": "3.4 INCORPORATING THE PRIOR AND REGULARISING THE CURVATURE FACTORS ",
537
+ "text_level": 1,
538
+ "bbox": [
539
+ 171,
540
+ 508,
541
+ 748,
542
+ 523
543
+ ],
544
+ "page_idx": 3
545
+ },
546
+ {
547
+ "type": "text",
548
+ "text": "Just as the log posterior, the Hessian decomposes into a term depending on the data log likelihood and one on the prior. For the commonly used $L _ { 2 }$ -regularisation, corresponding to a Gaussian prior, the Hessian is equal to the precision of the prior times the identity matrix. We approximate this by adding a multiple of the identity to each of the Kronecker factors from the log likelihood: ",
549
+ "bbox": [
550
+ 174,
551
+ 534,
552
+ 825,
553
+ 592
554
+ ],
555
+ "page_idx": 3
556
+ },
557
+ {
558
+ "type": "equation",
559
+ "img_path": "images/6f831ef21c86d130330cc83051752a1f5eecb53501d281a26f3ec861b7202903.jpg",
560
+ "text": "$$\nH _ { \\lambda } = N \\mathbb { E } \\left[ - \\frac { \\partial ^ { 2 } \\log p ( \\mathcal { D } | \\theta ) } { \\partial \\theta ^ { 2 } } \\right] + \\tau I \\approx ( \\sqrt { N } \\mathbb { E } \\left[ \\mathcal { Q } _ { \\lambda } \\right] + \\sqrt { \\tau } I ) \\otimes ( \\sqrt { N } \\mathbb { E } \\left[ \\mathcal { H } _ { \\lambda } \\right] + \\sqrt { \\tau } I )\n$$",
561
+ "text_format": "latex",
562
+ "bbox": [
563
+ 217,
564
+ 607,
565
+ 781,
566
+ 650
567
+ ],
568
+ "page_idx": 3
569
+ },
570
+ {
571
+ "type": "text",
572
+ "text": "where $\\tau$ is the precision of the Gaussian prior on the weights and $N$ the size of the dataset. However, we can also treat them as hyperparameters and optimise them w.r.t. the predictive performance on a validation set. We emphasise that this can be done without retraining the network, so it does not impose a large computational overhead and is trivial to parallelise. ",
573
+ "bbox": [
574
+ 176,
575
+ 659,
576
+ 823,
577
+ 715
578
+ ],
579
+ "page_idx": 3
580
+ },
581
+ {
582
+ "type": "text",
583
+ "text": "Setting $N$ to a larger value than the size of the dataset can be interpreted as including duplicates of the data points as pseudo-observations. Adding a multiple of the uncertainty to the precision matrix decreases the uncertainty about each parameter. This has a regularising effect both on our approximation to the true Laplace, which may be overestimating the variance in certain directions due to ignoring the covariances between the layers, as well as the Laplace approximation itself, which may be placing probability mass in low probability areas of the true posterior. ",
584
+ "bbox": [
585
+ 174,
586
+ 722,
587
+ 825,
588
+ 806
589
+ ],
590
+ "page_idx": 3
591
+ },
592
+ {
593
+ "type": "text",
594
+ "text": "4 RELATED WORK ",
595
+ "text_level": 1,
596
+ "bbox": [
597
+ 176,
598
+ 827,
599
+ 344,
600
+ 842
601
+ ],
602
+ "page_idx": 3
603
+ },
604
+ {
605
+ "type": "text",
606
+ "text": "Most recent attempts to approximating the posterior of a neural network are based on formulating an approximate distribution to the posterior and optimising the variational lower bound w.r.t. its parameters. (Graves, 2011; Blundell et al., 2015; Kingma et al., 2015) as well as the expectation propagation based approaches of (Hernandez-Lobato & Adams, 2015) and (Ghosh et al., 2016) ´ assume independence between the individual weights which, particularly when optimising the KL divergence, often lets the model underestimate the uncertainty about the weights. Gal & Ghahramani (2016) interpret Dropout to approximate the posterior with a mixture of delta functions, assuming independence between the columns. (Lakshminarayanan et al., 2016) suggest using an ensemble of networks for estimating the uncertainty. ",
607
+ "bbox": [
608
+ 176,
609
+ 858,
610
+ 821,
611
+ 887
612
+ ],
613
+ "page_idx": 3
614
+ },
615
+ {
616
+ "type": "text",
617
+ "text": "",
618
+ "bbox": [
619
+ 174,
620
+ 103,
621
+ 825,
622
+ 202
623
+ ],
624
+ "page_idx": 4
625
+ },
626
+ {
627
+ "type": "text",
628
+ "text": "Our work is a scalable approximation of (MacKay, 1992). Since the per-layer Hessian of a neural network is infeasible to compute, we suggest a factorisation of the covariance into a Kronecker product, leading to a more efficient matrix normal distribution. The posterior that we obtain is reminiscent of (Louizos & Welling, 2016) and (Sun et al., 2017), who optimise the parameters of a matrix normal distribution as their weights, which requires a modification of the training procedure. ",
629
+ "bbox": [
630
+ 174,
631
+ 208,
632
+ 825,
633
+ 279
634
+ ],
635
+ "page_idx": 4
636
+ },
637
+ {
638
+ "type": "text",
639
+ "text": "5 EXPERIMENTS ",
640
+ "text_level": 1,
641
+ "bbox": [
642
+ 176,
643
+ 301,
644
+ 326,
645
+ 316
646
+ ],
647
+ "page_idx": 4
648
+ },
649
+ {
650
+ "type": "text",
651
+ "text": "Since the Laplace approximation is a method for predicting in a Bayesian manner and not for training, we focus on comparing to uncertainty estimates obtained from Dropout (Gal & Ghahramani, 2016). The trained networks will be identical, but the prediction methods will differ. We also compare to a diagonal Laplace approximation to highlight the benefit from modelling the covariances between the weights. All experiments are implemented using Theano (Theano Development Team, 2016) and Lasagne (Dieleman et al., 2015).3 ",
652
+ "bbox": [
653
+ 174,
654
+ 334,
655
+ 825,
656
+ 420
657
+ ],
658
+ "page_idx": 4
659
+ },
660
+ {
661
+ "type": "text",
662
+ "text": "5.1 TOY REGRESSION DATASET ",
663
+ "text_level": 1,
664
+ "bbox": [
665
+ 176,
666
+ 440,
667
+ 406,
668
+ 454
669
+ ],
670
+ "page_idx": 4
671
+ },
672
+ {
673
+ "type": "text",
674
+ "text": "As a first experiment, we visualise the uncertainty obtained from the Laplace approximations on a toy regression dataset, similar to (Hernandez-Lobato´ $\\&$ Adams, 2015). We create a dataset of 20 uniformly distributed points $x \\sim \\mathcal { U } ( - 4 , 4 )$ and sample $y \\sim \\mathcal { N } ( x ^ { 3 } , 3 ^ { 2 } )$ . In contrast to (Hernandez- ´ Lobato & Adams, 2015), we use a two-layer network with seven units per layer rather than one layer with 100 units. This is because both the input and output are one-dimensional, hence the weight matrices are vectors and the matrix normal distribution reduces to a multivariate normal distribution. Furthermore, the Laplace approximation is sensitive to the ratio of the number of data points to parameters, and we want to visualise it both with and without hyperparameter tuning. ",
675
+ "bbox": [
676
+ 173,
677
+ 467,
678
+ 825,
679
+ 582
680
+ ],
681
+ "page_idx": 4
682
+ },
683
+ {
684
+ "type": "image",
685
+ "img_path": "images/debac792cdab601dfb06184753b4dcbf42158c1124917b3079299c753416bc64.jpg",
686
+ "image_caption": [
687
+ "Figure 1: Toy regression uncertainty. Black dots are data points, the black line shows the noiseless function. The red line shows the deterministic prediction of the network, the blue line the mean output. Each shade of blue visualises one additional standard deviation. Best viewed on screen. "
688
+ ],
689
+ "image_footnote": [],
690
+ "bbox": [
691
+ 184,
692
+ 608,
693
+ 807,
694
+ 739
695
+ ],
696
+ "page_idx": 4
697
+ },
698
+ {
699
+ "type": "text",
700
+ "text": "Fig. 1 shows the uncertainty obtained from the Kronecker factored and diagonal Laplace approximation applied to the same network, as well as from a full Laplace approximation and $5 0 , 0 0 0 \\mathrm { H M C }$ (Neal, 1993) samples. The latter two methods are feasible only for such a small model and dataset. For the diagonal and full Laplace approximation we use the Fisher identity and draw one sample per data point. We set the hyperparameters of the Laplace approximations (see Section 3.4) using a grid search over the likelihood of 20 validation points that are sampled the same way as the training set. ",
701
+ "bbox": [
702
+ 173,
703
+ 809,
704
+ 825,
705
+ 893
706
+ ],
707
+ "page_idx": 4
708
+ },
709
+ {
710
+ "type": "text",
711
+ "text": "The regularised Laplace approximations all give an overall good fit to the HMC predictive posterior. Their uncertainty is slightly higher close to the training data and increases more slowly away from the data than that of the HMC posterior. The diagonal and full Laplace approximation require stronger regularisation than our Kronecker factored one, as they have higher uncertainty when not regularised. In particular the full Laplace approximation vastly overestimates the uncertainty without additional regularisation, leading to a bad predictive mean (see Appendix E for the corresponding figures), as the Hessian of the log likelihood is underdetermined. This is commonly the case in deep learning, as the number of parameters is typically much larger than the number of data points. Hence restricting the structure of the covariance is not only a computational necessity for most architectures, but also allows for more precise estimation of the approximate covariance. ",
712
+ "bbox": [
713
+ 173,
714
+ 103,
715
+ 825,
716
+ 242
717
+ ],
718
+ "page_idx": 5
719
+ },
720
+ {
721
+ "type": "text",
722
+ "text": "5.2 OUT-OF-DISTRIBUTION UNCERTAINTY ",
723
+ "text_level": 1,
724
+ "bbox": [
725
+ 176,
726
+ 267,
727
+ 482,
728
+ 281
729
+ ],
730
+ "page_idx": 5
731
+ },
732
+ {
733
+ "type": "text",
734
+ "text": "For a more realistic test, similar to (Louizos & Welling, 2017), we assess the uncertainty of the predictions when classifying data from a different distribution than the training data. For this we train a network with two layers of 1024 hidden units and ReLU transfer functions to classify MNIST digits. We use a learning rate of $1 0 ^ { - 2 }$ and momentum of 0.9 for 250 epochs. We apply Dropout with $p { = } 0 . 5$ after each inner layer, as our chief interest is to compare against its uncertainty estimates. We further use $L _ { 2 }$ -regularisation with a factor of $1 0 ^ { - 2 }$ and randomly binarise the images during training according to their pixel intensities and draw $1 , 0 0 0$ such samples per datapoint for estimating the curvature factors. We use this network to classify the images in the notMNIST dataset4, which contains $2 8 \\times 2 8$ grey-scale images of the letters $\\mathbf { \\dot { A } } ^ { \\prime }$ to $\\mathbf { \\hat { J } } ^ { \\star }$ from various computer fonts, i.e. not digits. An ideal classifier would make uniform predictions over its classes. ",
735
+ "bbox": [
736
+ 174,
737
+ 296,
738
+ 825,
739
+ 440
740
+ ],
741
+ "page_idx": 5
742
+ },
743
+ {
744
+ "type": "text",
745
+ "text": "We compare the uncertainty obtained by predicting the digit class of the notMNIST images using 1. a deterministic forward pass through the Dropout trained network, 2. by sampling different Dropout masks and averaging the predictions, and by sampling different weight matrices from 3. the matrix normal distribution obtained from our Kronecker factored Laplace approximation as well as 4. the diagonal one. As an additional baseline similar to (Blundell et al., 2015; Graves, 2011), we compare to a network with identical architecture with a fully factorised Gaussian (FFG) approximate posterior on the weights and a standard normal prior. We train the model on the variational lower bound using the reparametrisation trick (Kingma & Welling, 2013). We use 100 samples for the stochastic forward passes and optimise the hyperparameters of the Laplace approximations w.r.t. the cross-entropy on the validation set of MNIST. ",
746
+ "bbox": [
747
+ 174,
748
+ 449,
749
+ 483,
750
+ 712
751
+ ],
752
+ "page_idx": 5
753
+ },
754
+ {
755
+ "type": "image",
756
+ "img_path": "images/d894a7edf56530a450cd12d773fa589c25cc119d5b25ad9f5c7d7640b554c41f.jpg",
757
+ "image_caption": [
758
+ "Figure 2: Predictive entropy on notMNIST obtained from different methods for the forward pass on a network trained on MNIST. "
759
+ ],
760
+ "image_footnote": [],
761
+ "bbox": [
762
+ 511,
763
+ 483,
764
+ 792,
765
+ 631
766
+ ],
767
+ "page_idx": 5
768
+ },
769
+ {
770
+ "type": "text",
771
+ "text": "",
772
+ "bbox": [
773
+ 176,
774
+ 712,
775
+ 625,
776
+ 726
777
+ ],
778
+ "page_idx": 5
779
+ },
780
+ {
781
+ "type": "text",
782
+ "text": "We measure the uncertainty of the different methods as the entropy of the predictive distribution, which has a minimal value of 0 when a single class is predicted with certainty and a maximum of about 2.3 for uniform predictions. Fig. 2 shows the inverse empirical cumulative distribution of the entropy values obtained from the four methods. Consistent with the results in (Gal & Ghahramani, 2016), averaging the probabilities of multiple passes through the network yields predictions with higher uncertainty than a deterministic pass that approximates the geometric average (Srivastava et al., 2014). However, there still are some images that are predicted to be a digit with certainty. Our Kronecker factored Laplace approximation makes hardly any predictions with absolute certainty and assigns high uncertainty to most of the letters as desired. The diagonal Laplace approximation required stronger regularisation towards predicting deterministically, yet it performs similarly to Dropout. As shown in Table 1, however, the network makes predictions on the test set of MNIST with similar accuracy to the deterministic forward pass and MC Dropout when using our approximation. The variational factorised Gaussian posterior has low uncertainty as expected. ",
783
+ "bbox": [
784
+ 174,
785
+ 733,
786
+ 825,
787
+ 885
788
+ ],
789
+ "page_idx": 5
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "",
794
+ "bbox": [
795
+ 171,
796
+ 103,
797
+ 821,
798
+ 132
799
+ ],
800
+ "page_idx": 6
801
+ },
802
+ {
803
+ "type": "text",
804
+ "text": "5.3 ADVERSARIAL EXAMPLES ",
805
+ "text_level": 1,
806
+ "bbox": [
807
+ 174,
808
+ 148,
809
+ 398,
810
+ 161
811
+ ],
812
+ "page_idx": 6
813
+ },
814
+ {
815
+ "type": "image",
816
+ "img_path": "images/ed41abe45c3623949c3b8185e71c83cf08c0f3240991f92ab6369cada44c3cfe.jpg",
817
+ "image_caption": [
818
+ "Figure 3: Untargeted adversarial attack. "
819
+ ],
820
+ "image_footnote": [],
821
+ "bbox": [
822
+ 204,
823
+ 176,
824
+ 495,
825
+ 279
826
+ ],
827
+ "page_idx": 6
828
+ },
829
+ {
830
+ "type": "image",
831
+ "img_path": "images/bd7abf0110987c858acf90a823a00cb267f5508f27375bc544386b20b41304ac.jpg",
832
+ "image_caption": [
833
+ "Figure 4: Targeted adversarial attack. "
834
+ ],
835
+ "image_footnote": [],
836
+ "bbox": [
837
+ 501,
838
+ 176,
839
+ 792,
840
+ 279
841
+ ],
842
+ "page_idx": 6
843
+ },
844
+ {
845
+ "type": "text",
846
+ "text": "To further test the robustness of our prediction method close to the data distribution, we perform an adversarial attack on a neural network. As first demonstrated in (Szegedy et al., 2013), neural networks are prone to being fooled by gradient-based changes to their inputs. Li & Gal (2017) suggest, and provide empirical support, that Bayesian models may be more robust to such attacks, since they implicitly form an infinitely large ensemble by integrating over the model parameters. For our experiments, we use the fully connected net trained on MNIST from the previous section and compare the sensitivity of the different prediction methods for two kinds of adversarial attacks. ",
847
+ "bbox": [
848
+ 174,
849
+ 321,
850
+ 825,
851
+ 419
852
+ ],
853
+ "page_idx": 6
854
+ },
855
+ {
856
+ "type": "text",
857
+ "text": "First, we use the untargeted Fast Gradient Sign method $\\begin{array} { r } { x _ { a d v } = x - \\eta \\mathrm { s g n } ( \\nabla _ { x } \\operatorname* { m a x } _ { y } \\log p ^ { ( M ) } ( y | x ) ) } \\end{array}$ suggested in (Goodfellow et al., 2014), which takes the gradient of the class predicted with maximal probability by method $M$ w.r.t. the input $x$ and reduces this probability with varying step size $\\eta$ This step size is rescaled by the difference between the maximal and minimal value per dimension in the dataset. It is to be expected that this method generates examples away from the data manifold, as there is no clear subset of the data that corresponds to e.g. ”not ones”. ",
858
+ "bbox": [
859
+ 174,
860
+ 428,
861
+ 823,
862
+ 512
863
+ ],
864
+ "page_idx": 6
865
+ },
866
+ {
867
+ "type": "text",
868
+ "text": "Fig. 3 shows the average predictive uncertainty and the accuracy on the original class on the MNIST test set as the step size $\\eta$ increases. The Kronecker factored Laplace approximation achieves significantly higher uncertainty than any other prediction method as the images move away from the data. Both the diagonal and the Kronecker factored Laplace maintain higher accuracy than MC Dropout on their original predictions. Interestingly, the deterministic forward pass appears to be most robust in terms of accuracy, however it has much smaller uncertainty on the predictions it makes and will confidently predict a false class for most images, whereas the other methods are more uncertain. ",
869
+ "bbox": [
870
+ 173,
871
+ 518,
872
+ 825,
873
+ 617
874
+ ],
875
+ "page_idx": 6
876
+ },
877
+ {
878
+ "type": "text",
879
+ "text": "Furthermore, we perform a targeted attack that attempts to force the network to predict a specific class, in our case $\\cdot _ { 0 } \\cdot \\mathrm { \\ }$ following (Li & Gal, 2017). Hence, for each method, we exclude all data points in the test set that are already predicted as $\\cdot _ { 0 } \\cdot \\mathrm { \\ }$ . The updates are of similar form to the untargeted attack, however they increase the probability of the pre-specified class $y$ rather than decreasing the current maximum as x(ty $x _ { y } ^ { ( t + 1 ) } = x _ { y } ^ { ( \\bar { t } ) } + \\eta \\mathrm { s g n } \\big ( \\bar { \\nabla } _ { x } \\log \\bar { p ^ { ( M ) } } ( y | x _ { y } ^ { ( t ) } ) \\big )$ , where $x _ { y } ^ { ( 0 ) } = x$ . ",
880
+ "bbox": [
881
+ 173,
882
+ 623,
883
+ 825,
884
+ 698
885
+ ],
886
+ "page_idx": 6
887
+ },
888
+ {
889
+ "type": "text",
890
+ "text": "We use a step size of $\\eta { = } 1 0 ^ { - 2 }$ for the targeted attack. The uncertainty and accuracy on the original and target class are shown in Fig. 4. Here, the Kronecker factored Laplace approximation has slightly smaller uncertainty at its peak in comparison to the other methods, however it appears to be much more robust. It only misclassifies over $5 0 \\%$ of the images after about 20 steps, whereas for the other methods this is the case after roughly 10 steps and reaches $1 0 0 \\%$ accuracy on the target class after almost 50 updates, whereas the other methods are fooled on all images after about 25 steps. ",
891
+ "bbox": [
892
+ 174,
893
+ 705,
894
+ 825,
895
+ 790
896
+ ],
897
+ "page_idx": 6
898
+ },
899
+ {
900
+ "type": "text",
901
+ "text": "In conjunction with the experiment on notMNIST, it appears that the Laplace approximation achieves higher uncertainty than Dropout away from the data, as in the untargeted attack. In the targeted attack it exhibits smaller uncertainty than Dropout, yet it is more robust to having its prediction changed. The diagonal Laplace approximation again performs similarly to Dropout. ",
902
+ "bbox": [
903
+ 174,
904
+ 797,
905
+ 825,
906
+ 854
907
+ ],
908
+ "page_idx": 6
909
+ },
910
+ {
911
+ "type": "text",
912
+ "text": "5.4 UNCERTAINTY ON MISCLASSIFICATIONS ",
913
+ "text_level": 1,
914
+ "bbox": [
915
+ 176,
916
+ 869,
917
+ 495,
918
+ 883
919
+ ],
920
+ "page_idx": 6
921
+ },
922
+ {
923
+ "type": "text",
924
+ "text": "To highlight the scalability of our method, we apply it to a state-of-the-art convolutional network architecture. Recently, deep residual networks (He et al., 2016a;b) have been the most successful ones among those. As demonstrated in (Grosse & Martens, 2016), Kronecker factored curvature methods are applicable to convolutional layers by interpreting them as matrix-matrix multiplications. ",
925
+ "bbox": [
926
+ 176,
927
+ 895,
928
+ 823,
929
+ 924
930
+ ],
931
+ "page_idx": 6
932
+ },
933
+ {
934
+ "type": "image",
935
+ "img_path": "images/5ed41153d9002457c121cab0e2d0510ad1bedc3708935fa9b5bfa70ad80fe8a9.jpg",
936
+ "image_caption": [
937
+ "Figure 5: Inverse ecdf of the predictive entropy from Wide Residual Networks trained with and without Dropout on CIFAR100. For misclassifications, curves on top corresponding to higher uncertainty are desirable, and curves on the bottom for correct classifications. "
938
+ ],
939
+ "image_footnote": [],
940
+ "bbox": [
941
+ 204,
942
+ 99,
943
+ 794,
944
+ 241
945
+ ],
946
+ "page_idx": 7
947
+ },
948
+ {
949
+ "type": "text",
950
+ "text": "",
951
+ "bbox": [
952
+ 173,
953
+ 343,
954
+ 823,
955
+ 372
956
+ ],
957
+ "page_idx": 7
958
+ },
959
+ {
960
+ "type": "text",
961
+ "text": "We compare our uncertainty estimates on wide residual networks (Zagoruyko & Komodakis, 2016), a recent variation that achieved competitive performance on CIFAR100 (Krizhevsky & Hinton, 2009) while, in contrast to most other residual architectures, including Dropout at specific points. While this does not correspond to using Dropout in the Bayesian sense (Gal & Ghahramani, 2015), it allows us to at least compare our method to the uncertainty estimates obtained from Dropout. ",
962
+ "bbox": [
963
+ 174,
964
+ 378,
965
+ 825,
966
+ 449
967
+ ],
968
+ "page_idx": 7
969
+ },
970
+ {
971
+ "type": "text",
972
+ "text": "We note that it is straightforward to incorporate batch normalisation (Ioffe & Szegedy, 2015) into the curvature backpropagation algorithms, so we apply a standard Laplace approximation to its parameters as well. We are not aware of any interpretation of Dropout as performing Bayesian inference on the parameters of batch normalisation. Further implementation details are in Appendix G. ",
973
+ "bbox": [
974
+ 174,
975
+ 455,
976
+ 823,
977
+ 511
978
+ ],
979
+ "page_idx": 7
980
+ },
981
+ {
982
+ "type": "text",
983
+ "text": "Again, the accuracy of the prediction methods is comparable (see Table 2 in Appendix F). For calculating the curvature factors, we draw 5, 000 samples per image using the same data augmentation as during training, effectively increasing the dataset size to $2 . 5 \\times 1 0 ^ { 8 }$ . The diagonal approximation had to be regularised to the extent of becoming deterministic, so we omit it from the results. ",
984
+ "bbox": [
985
+ 174,
986
+ 518,
987
+ 825,
988
+ 575
989
+ ],
990
+ "page_idx": 7
991
+ },
992
+ {
993
+ "type": "text",
994
+ "text": "In Fig. 5 we compare the distribution of the predictive uncertainty on the test set.5 We distinguish between the uncertainty on correct and incorrect classifications, as the mistakes of a system used in practice may be less severe if the network can at least indicate that it is uncertain. Thus, high uncertainty on misclassifications and low uncertainty on correct ones would be desirable, such that a system could return control to a human expert when it can not make a confident decision. In general, the network tends to be more uncertain on its misclassifcations than its correct ones regardless of whether it was trained with or without Dropout and of the method used for prediction. Both Dropout and the Laplace approximation similarly increase the uncertainty in the predictions, however this is irrespective of the correctness of the classification. Yet, our experiments show that the Kronecker factored Laplace approximation can be scaled to modern convolutional networks and maintain good classification accuracy while having similar uncertainty about the predictions as Dropout. ",
995
+ "bbox": [
996
+ 174,
997
+ 584,
998
+ 825,
999
+ 738
1000
+ ],
1001
+ "page_idx": 7
1002
+ },
1003
+ {
1004
+ "type": "text",
1005
+ "text": "We had to use much stronger regularisation for the Laplace approximation on the wide residual network, possibly because the block-diagonal approximation becomes more inaccurate on deep networks, possibly because the number of parameters is much higher relative to the number of data. It would be interesting to see how the Laplace approximations behaves on a much larger dataset like ImageNet for similarly sized networks, where we have a better ratio of data to parameters and curvature directions. However, even on a relatively small dataset like CIFAR we did not have to regularise the Laplace approximation to the degree of the posterior becoming deterministic. ",
1006
+ "bbox": [
1007
+ 174,
1008
+ 744,
1009
+ 825,
1010
+ 843
1011
+ ],
1012
+ "page_idx": 7
1013
+ },
1014
+ {
1015
+ "type": "text",
1016
+ "text": "6 CONCLUSION ",
1017
+ "text_level": 1,
1018
+ "bbox": [
1019
+ 174,
1020
+ 102,
1021
+ 318,
1022
+ 117
1023
+ ],
1024
+ "page_idx": 8
1025
+ },
1026
+ {
1027
+ "type": "text",
1028
+ "text": "We presented a scalable approximation to the Laplace approximation for the posterior of a neural network and provided experimental results suggesting that the uncertainty estimates are on par with current alternatives like Dropout, if not better. It enables practitioners to obtain principled uncertainty estimates from their models, even if they were trained in a maximum likelihood/MAP setting. ",
1029
+ "bbox": [
1030
+ 174,
1031
+ 133,
1032
+ 823,
1033
+ 189
1034
+ ],
1035
+ "page_idx": 8
1036
+ },
1037
+ {
1038
+ "type": "text",
1039
+ "text": "There are many possible extensions to this work. One would be to automatically determine the scale and regularisation hyperparameters of the Kronecker factored Laplace approximation using the model evidence similar to how (MacKay, 1992) interpolates between the data log likelihood and the width of the prior. The model evidence could further be used to perform Bayesian model averaging on ensembles of neural networks, potentially improving their generalisation ability and uncertainty estimates. A challenging application would be active learning, where only little data is available relative to the number of curvature directions that need to be estimated. ",
1040
+ "bbox": [
1041
+ 174,
1042
+ 196,
1043
+ 825,
1044
+ 294
1045
+ ],
1046
+ "page_idx": 8
1047
+ },
1048
+ {
1049
+ "type": "text",
1050
+ "text": "ACKNOWLEDGEMENTS ",
1051
+ "text_level": 1,
1052
+ "bbox": [
1053
+ 176,
1054
+ 316,
1055
+ 367,
1056
+ 330
1057
+ ],
1058
+ "page_idx": 8
1059
+ },
1060
+ {
1061
+ "type": "text",
1062
+ "text": "This work was supported by the Alan Turing Institute under the EPSRC grant EP/N510129/1. We thank the anonymous reviewers for their feedback and Harshil Shah for his comments on an earlier draft of this paper. ",
1063
+ "bbox": [
1064
+ 176,
1065
+ 347,
1066
+ 825,
1067
+ 388
1068
+ ],
1069
+ "page_idx": 8
1070
+ },
1071
+ {
1072
+ "type": "text",
1073
+ "text": "REFERENCES ",
1074
+ "text_level": 1,
1075
+ "bbox": [
1076
+ 176,
1077
+ 410,
1078
+ 285,
1079
+ 425
1080
+ ],
1081
+ "page_idx": 8
1082
+ },
1083
+ {
1084
+ "type": "text",
1085
+ "text": "Anoop Korattikara Balan, Vivek Rathod, Kevin P Murphy, and Max Welling. Bayesian Dark Knowledge. In Advances in Neural Information Processing Systems, pp. 3438–3446, 2015. \nDavid Barber and Christopher M Bishop. Ensemble Learning for Multi-layer Networks. In Advances in Neural Information Processing Systems, pp. 395–401, 1998. \nCharles Blundell, Julien Cornebise, Koray Kavukcuoglu, and Daan Wierstra. Weight Uncertainty in Neural Networks. In ICML, pp. 1613–1622, 2015. \nAleksandar Botev, Hippolyt Ritter, and David Barber. Practical Gauss-Newton Optimisation for Deep Learning. In ICML, pp. 557 – 565, 2017. \nSander Dieleman, Jan Schluter, Colin Raffel, Eben Olson, Søren Kaae Sønderby, Daniel Nouri, et al. ¨ Lasagne: First release., August 2015. \nYarin Gal and Zoubin Ghahramani. Bayesian Convolutional Neural Networks with BernoulliAapproximate Variational Inference. arXiv preprint arXiv:1506.02158, 2015. \nYarin Gal and Zoubin Ghahramani. Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning. In ICML, pp. 1050–1059, 2016. \nSoumya Ghosh, Francesco Maria Delle Fave, and Jonathan S Yedidia. Assumed Density Filtering Methods for Learning Bayesian Neural Networks. In AAAI, pp. 1589–1595, 2016. \nIan J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and Harnessing Adversarial Examples. arXiv preprint arXiv:1412.6572, 2014. \nAlex Graves. Practical Variational Inference for Neural Networks. In Advances in Neural Information Processing Systems, pp. 2348–2356, 2011. \nRoger Grosse and James Martens. A Kronecker-factored Approximate Fisher Matrix for Convolution Layers. In ICML, pp. 573–582, 2016. \nArjun K Gupta and Daya K Nagar. Matrix Variate Distributions, volume 104. CRC Press, 1999. \nKaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016a. ",
1086
+ "bbox": [
1087
+ 171,
1088
+ 421,
1089
+ 826,
1090
+ 928
1091
+ ],
1092
+ "page_idx": 8
1093
+ },
1094
+ {
1095
+ "type": "text",
1096
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity Mappings in Deep Residual Networks. In European Conference on Computer Vision, pp. 630–645. Springer, 2016b. ",
1097
+ "bbox": [
1098
+ 173,
1099
+ 103,
1100
+ 823,
1101
+ 133
1102
+ ],
1103
+ "page_idx": 9
1104
+ },
1105
+ {
1106
+ "type": "text",
1107
+ "text": "Jose Miguel Hern ´ andez-Lobato and Ryan Adams. Probabilistic Backpropagation for Scalable ´ Learning of Bayesian Neural Networks. In ICML, pp. 1861–1869, 2015. ",
1108
+ "bbox": [
1109
+ 176,
1110
+ 138,
1111
+ 821,
1112
+ 169
1113
+ ],
1114
+ "page_idx": 9
1115
+ },
1116
+ {
1117
+ "type": "text",
1118
+ "text": "Geoffrey E Hinton and Drew Van Camp. Keeping the Neural Networks Simple by Minimizing the Description Length of the Weights. In COLT, pp. 5–13, 1993. ",
1119
+ "bbox": [
1120
+ 178,
1121
+ 175,
1122
+ 821,
1123
+ 205
1124
+ ],
1125
+ "page_idx": 9
1126
+ },
1127
+ {
1128
+ "type": "text",
1129
+ "text": "Sergey Ioffe and Christian Szegedy. Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift. In ICML, pp. 448–456, 2015. ",
1130
+ "bbox": [
1131
+ 176,
1132
+ 212,
1133
+ 823,
1134
+ 241
1135
+ ],
1136
+ "page_idx": 9
1137
+ },
1138
+ {
1139
+ "type": "text",
1140
+ "text": "Diederik P Kingma and Max Welling. Auto-encoding Variational Bayes. arXiv preprint arXiv:1312.6114, 2013. ",
1141
+ "bbox": [
1142
+ 176,
1143
+ 247,
1144
+ 821,
1145
+ 276
1146
+ ],
1147
+ "page_idx": 9
1148
+ },
1149
+ {
1150
+ "type": "text",
1151
+ "text": "Diederik P Kingma, Tim Salimans, and Max Welling. Variational Dropout and the Local Reparameterization Trick. In Advances in Neural Information Processing Systems, pp. 2575–2583, 2015. ",
1152
+ "bbox": [
1153
+ 176,
1154
+ 284,
1155
+ 823,
1156
+ 325
1157
+ ],
1158
+ "page_idx": 9
1159
+ },
1160
+ {
1161
+ "type": "text",
1162
+ "text": "James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, et al. Overcoming Catastrophic Forgetting in Neural Networks. Proceedings of the National Academy of Sciences, pp. 201611835, 2017. ",
1163
+ "bbox": [
1164
+ 173,
1165
+ 333,
1166
+ 826,
1167
+ 390
1168
+ ],
1169
+ "page_idx": 9
1170
+ },
1171
+ {
1172
+ "type": "text",
1173
+ "text": "Alex Krizhevsky and Geoffrey Hinton. Learning Multiple Layers of Features from Tiny Images. 2009. ",
1174
+ "bbox": [
1175
+ 173,
1176
+ 396,
1177
+ 821,
1178
+ 426
1179
+ ],
1180
+ "page_idx": 9
1181
+ },
1182
+ {
1183
+ "type": "text",
1184
+ "text": "Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and Scalable Predictive Uncertainty Estimation using Deep Ensembles. arXiv preprint arXiv:1612.01474, 2016. ",
1185
+ "bbox": [
1186
+ 174,
1187
+ 433,
1188
+ 821,
1189
+ 463
1190
+ ],
1191
+ "page_idx": 9
1192
+ },
1193
+ {
1194
+ "type": "text",
1195
+ "text": "Yann LeCun, John S. Denker, and Sara A. Solla. Optimal Brain Damage. In Advances in Neural Information Processing Systems, pp. 598–605, 1990. ",
1196
+ "bbox": [
1197
+ 176,
1198
+ 468,
1199
+ 823,
1200
+ 498
1201
+ ],
1202
+ "page_idx": 9
1203
+ },
1204
+ {
1205
+ "type": "text",
1206
+ "text": "Yingzhen Li and Yarin Gal. Dropout Inference in Bayesian Neural Networks with Alphadivergences. arXiv preprint arXiv:1703.02914, 2017. ",
1207
+ "bbox": [
1208
+ 174,
1209
+ 505,
1210
+ 823,
1211
+ 535
1212
+ ],
1213
+ "page_idx": 9
1214
+ },
1215
+ {
1216
+ "type": "text",
1217
+ "text": "Christos Louizos and Max Welling. Structured and Efficient Variational Deep Learning with Matrix Gaussian Posteriors. In ICML, pp. 1708–1716, 2016. ",
1218
+ "bbox": [
1219
+ 173,
1220
+ 541,
1221
+ 823,
1222
+ 570
1223
+ ],
1224
+ "page_idx": 9
1225
+ },
1226
+ {
1227
+ "type": "text",
1228
+ "text": "Christos Louizos and Max Welling. Multiplicative Normalizing Flows for Variational Bayesian Neural Networks. In ICML, pp. 2218–2227, 2017. ",
1229
+ "bbox": [
1230
+ 173,
1231
+ 577,
1232
+ 823,
1233
+ 606
1234
+ ],
1235
+ "page_idx": 9
1236
+ },
1237
+ {
1238
+ "type": "text",
1239
+ "text": "David J. C. MacKay. A Practical Bayesian Framework for Backpropagation Networks. Neural Computation, 4(3):448–472, 1992. ",
1240
+ "bbox": [
1241
+ 173,
1242
+ 613,
1243
+ 823,
1244
+ 642
1245
+ ],
1246
+ "page_idx": 9
1247
+ },
1248
+ {
1249
+ "type": "text",
1250
+ "text": "James Martens and Roger Grosse. Optimizing Neural Networks with Kronecker-factored Approximate Curvature. In ICML, pp. 2408–2417, 2015. ",
1251
+ "bbox": [
1252
+ 171,
1253
+ 648,
1254
+ 823,
1255
+ 679
1256
+ ],
1257
+ "page_idx": 9
1258
+ },
1259
+ {
1260
+ "type": "text",
1261
+ "text": "Radford M Neal. Bayesian Learning via Stochastic Dynamics. In Advances in Neural Information Processing Systems, pp. 475–482, 1993. ",
1262
+ "bbox": [
1263
+ 173,
1264
+ 685,
1265
+ 825,
1266
+ 714
1267
+ ],
1268
+ "page_idx": 9
1269
+ },
1270
+ {
1271
+ "type": "text",
1272
+ "text": "Nitish Srivastava, Geoffrey E Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: A Simple Way to Prevent Neural Networks from Overfitting. Journal of Machine Learning Research, 15(1):1929–1958, 2014. ",
1273
+ "bbox": [
1274
+ 173,
1275
+ 720,
1276
+ 825,
1277
+ 763
1278
+ ],
1279
+ "page_idx": 9
1280
+ },
1281
+ {
1282
+ "type": "text",
1283
+ "text": "Shengyang Sun, Changyou Chen, and Lawrence Carin. Learning Structured Weight Uncertainty in Bayesian Neural Networks. In Artificial Intelligence and Statistics, pp. 1283–1292, 2017. ",
1284
+ "bbox": [
1285
+ 173,
1286
+ 771,
1287
+ 821,
1288
+ 800
1289
+ ],
1290
+ "page_idx": 9
1291
+ },
1292
+ {
1293
+ "type": "text",
1294
+ "text": "Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing Properties of Neural Networks. arXiv preprint arXiv:1312.6199, 2013. ",
1295
+ "bbox": [
1296
+ 174,
1297
+ 808,
1298
+ 823,
1299
+ 849
1300
+ ],
1301
+ "page_idx": 9
1302
+ },
1303
+ {
1304
+ "type": "text",
1305
+ "text": "Theano Development Team. Theano: A Python Framework for Fast Computation of Mathematical Expressions. arXiv e-prints, abs/1605.02688, May 2016. ",
1306
+ "bbox": [
1307
+ 174,
1308
+ 857,
1309
+ 821,
1310
+ 887
1311
+ ],
1312
+ "page_idx": 9
1313
+ },
1314
+ {
1315
+ "type": "text",
1316
+ "text": "Sergey Zagoruyko and Nikos Komodakis. Wide Residual Networks. arXiv preprint arXiv:1605.07146, 2016. ",
1317
+ "bbox": [
1318
+ 173,
1319
+ 893,
1320
+ 823,
1321
+ 922
1322
+ ],
1323
+ "page_idx": 9
1324
+ },
1325
+ {
1326
+ "type": "text",
1327
+ "text": "Appendices ",
1328
+ "text_level": 1,
1329
+ "bbox": [
1330
+ 176,
1331
+ 99,
1332
+ 334,
1333
+ 127
1334
+ ],
1335
+ "page_idx": 10
1336
+ },
1337
+ {
1338
+ "type": "text",
1339
+ "text": "A DERIVATION OF THE ACTIVATION HESSIAN RECURSION ",
1340
+ "text_level": 1,
1341
+ "bbox": [
1342
+ 176,
1343
+ 145,
1344
+ 676,
1345
+ 162
1346
+ ],
1347
+ "page_idx": 10
1348
+ },
1349
+ {
1350
+ "type": "text",
1351
+ "text": "Here, we provide the basic derivation of the factorisation of the diagonal blocks of the Hessian in Eq. 1 and the recursive formula for calculating $\\mathcal { H }$ as presented in (Botev et al., 2017). ",
1352
+ "bbox": [
1353
+ 171,
1354
+ 179,
1355
+ 825,
1356
+ 208
1357
+ ],
1358
+ "page_idx": 10
1359
+ },
1360
+ {
1361
+ "type": "text",
1362
+ "text": "The Hessian of a neural network with parameters $\\theta$ as defined in the main text has elements: ",
1363
+ "bbox": [
1364
+ 176,
1365
+ 214,
1366
+ 777,
1367
+ 231
1368
+ ],
1369
+ "page_idx": 10
1370
+ },
1371
+ {
1372
+ "type": "equation",
1373
+ "img_path": "images/0f296d35cb406ef6eb9012ee3b6a4216e5267cab6413a299488245fd078eadb1.jpg",
1374
+ "text": "$$\n[ H ] _ { i j } = \\frac { \\partial ^ { 2 } } { \\partial \\theta _ { i } \\partial \\theta _ { j } } E ( \\theta )\n$$",
1375
+ "text_format": "latex",
1376
+ "bbox": [
1377
+ 426,
1378
+ 250,
1379
+ 573,
1380
+ 287
1381
+ ],
1382
+ "page_idx": 10
1383
+ },
1384
+ {
1385
+ "type": "text",
1386
+ "text": "For a given layer $\\lambda$ , the gradient w.r.t. a weight $W _ { a , b } ^ { \\lambda }$ is: ",
1387
+ "bbox": [
1388
+ 173,
1389
+ 303,
1390
+ 539,
1391
+ 320
1392
+ ],
1393
+ "page_idx": 10
1394
+ },
1395
+ {
1396
+ "type": "equation",
1397
+ "img_path": "images/83dba684467e560f40061ae37edaec35ad0a2115e940c900c683886e03489863.jpg",
1398
+ "text": "$$\n{ \\frac { \\partial E } { \\partial W _ { a , b } ^ { \\lambda } } } = \\sum _ { i } { \\frac { \\partial h _ { i } ^ { \\lambda } } { \\partial W _ { a , b } ^ { \\lambda } } } { \\frac { \\partial E } { \\partial h _ { i } ^ { \\lambda } } } = a _ { b } ^ { \\lambda - 1 } { \\frac { \\partial E } { \\partial h _ { a } ^ { \\lambda } } }\n$$",
1399
+ "text_format": "latex",
1400
+ "bbox": [
1401
+ 367,
1402
+ 339,
1403
+ 630,
1404
+ 381
1405
+ ],
1406
+ "page_idx": 10
1407
+ },
1408
+ {
1409
+ "type": "text",
1410
+ "text": "Keeping $\\lambda$ fixed and differentiating again, we find that the per-sample Hessian of that layer is: ",
1411
+ "bbox": [
1412
+ 171,
1413
+ 393,
1414
+ 787,
1415
+ 410
1416
+ ],
1417
+ "page_idx": 10
1418
+ },
1419
+ {
1420
+ "type": "equation",
1421
+ "img_path": "images/e4a81dbe7d6040535c7d848c28f2c79f66c521dabc27e35ecc127cf4e545e4a9.jpg",
1422
+ "text": "$$\n\\left[ H _ { \\lambda } \\right] _ { ( a , b ) , ( c , d ) } \\equiv \\frac { \\partial ^ { 2 } E } { \\partial W _ { a , b } ^ { \\lambda } \\partial W _ { c , d } ^ { \\lambda } } = a _ { b } ^ { \\lambda - 1 } a _ { d } ^ { \\lambda - 1 } \\left[ \\mathcal { H } _ { \\lambda } \\right] _ { a , c }\n$$",
1423
+ "text_format": "latex",
1424
+ "bbox": [
1425
+ 326,
1426
+ 429,
1427
+ 671,
1428
+ 469
1429
+ ],
1430
+ "page_idx": 10
1431
+ },
1432
+ {
1433
+ "type": "text",
1434
+ "text": "where ",
1435
+ "bbox": [
1436
+ 173,
1437
+ 483,
1438
+ 217,
1439
+ 497
1440
+ ],
1441
+ "page_idx": 10
1442
+ },
1443
+ {
1444
+ "type": "equation",
1445
+ "img_path": "images/19269707e999e2664986cce1d5888ad8b2f6e20b86f3dc7bbadf68aee2228634.jpg",
1446
+ "text": "$$\n[ \\mathcal { H } _ { \\lambda } ] _ { a , b } = \\frac { \\partial ^ { 2 } E } { \\partial h _ { a } ^ { \\lambda } \\partial h _ { b } ^ { \\lambda } }\n$$",
1447
+ "text_format": "latex",
1448
+ "bbox": [
1449
+ 433,
1450
+ 517,
1451
+ 566,
1452
+ 556
1453
+ ],
1454
+ "page_idx": 10
1455
+ },
1456
+ {
1457
+ "type": "text",
1458
+ "text": "is the pre-activation Hessian. ",
1459
+ "bbox": [
1460
+ 174,
1461
+ 569,
1462
+ 364,
1463
+ 583
1464
+ ],
1465
+ "page_idx": 10
1466
+ },
1467
+ {
1468
+ "type": "text",
1469
+ "text": "We can reexpress this in matrix notation as a Kronecker product as in Eq. 1: ",
1470
+ "bbox": [
1471
+ 171,
1472
+ 590,
1473
+ 671,
1474
+ 606
1475
+ ],
1476
+ "page_idx": 10
1477
+ },
1478
+ {
1479
+ "type": "equation",
1480
+ "img_path": "images/36187593be22e70d34cda56a97545b1794bc291950b32db101df9d3a58cf5d5e.jpg",
1481
+ "text": "$$\nH _ { \\lambda } = \\frac { \\partial ^ { 2 } E } { \\partial \\operatorname { v e c } \\left( W _ { \\lambda } \\right) \\partial \\operatorname { v e c } \\left( W _ { \\lambda } \\right) } = \\left( a _ { \\lambda - 1 } a _ { \\lambda - 1 } ^ { \\mathsf { T } } \\right) \\otimes \\mathcal { H } _ { \\lambda }\n$$",
1482
+ "text_format": "latex",
1483
+ "bbox": [
1484
+ 323,
1485
+ 625,
1486
+ 674,
1487
+ 662
1488
+ ],
1489
+ "page_idx": 10
1490
+ },
1491
+ {
1492
+ "type": "text",
1493
+ "text": "The pre-activation Hessian can be calculated recursively as: ",
1494
+ "bbox": [
1495
+ 173,
1496
+ 675,
1497
+ 565,
1498
+ 690
1499
+ ],
1500
+ "page_idx": 10
1501
+ },
1502
+ {
1503
+ "type": "equation",
1504
+ "img_path": "images/066d8f5662937414b7ff787c091a3dc30e6371e80531770315d17352185108d7.jpg",
1505
+ "text": "$$\n\\mathcal { H } _ { \\lambda } = B _ { \\lambda } W _ { \\lambda + 1 } ^ { \\mathsf { T } } \\mathcal { H } _ { \\lambda + 1 } W _ { \\lambda + 1 } B _ { \\lambda } + D _ { \\lambda }\n$$",
1506
+ "text_format": "latex",
1507
+ "bbox": [
1508
+ 372,
1509
+ 709,
1510
+ 625,
1511
+ 732
1512
+ ],
1513
+ "page_idx": 10
1514
+ },
1515
+ {
1516
+ "type": "text",
1517
+ "text": "where the diagonal matrices $B$ and $D$ are defined as: ",
1518
+ "bbox": [
1519
+ 173,
1520
+ 744,
1521
+ 521,
1522
+ 760
1523
+ ],
1524
+ "page_idx": 10
1525
+ },
1526
+ {
1527
+ "type": "equation",
1528
+ "img_path": "images/2d283728938d16ef2672bdb5f416bcd470208dcd734b67d9666da1668ae8810e.jpg",
1529
+ "text": "$$\n\\begin{array} { l } { { B _ { \\lambda } = \\mathrm { d i a g } \\left( \\mathbf f _ { \\lambda } ^ { \\prime } ( h _ { \\lambda } ) \\right) } } \\\\ { { D _ { \\lambda } = \\mathrm { d i a g } \\left( \\mathbf f _ { \\lambda } ^ { \\prime \\prime } ( h _ { \\lambda } ) { \\frac { \\partial E } { \\partial a _ { \\lambda } } } \\right) } } \\end{array}\n$$",
1530
+ "text_format": "latex",
1531
+ "bbox": [
1532
+ 413,
1533
+ 787,
1534
+ 584,
1535
+ 843
1536
+ ],
1537
+ "page_idx": 10
1538
+ },
1539
+ {
1540
+ "type": "text",
1541
+ "text": "$\\mathbf { f ^ { \\prime } }$ and $\\mathbf { f } ^ { \\prime \\prime }$ denote the first and second derivative of the transfer function. The recursion is initialised with the Hessian of the error w.r.t. the linear network outputs. ",
1542
+ "bbox": [
1543
+ 174,
1544
+ 859,
1545
+ 823,
1546
+ 888
1547
+ ],
1548
+ "page_idx": 10
1549
+ },
1550
+ {
1551
+ "type": "text",
1552
+ "text": "For further details and on how to calculate the diagonal blocks of the Gauss-Newton and Fisher matrix, we refer the reader to (Botev et al., 2017) and (Martens & Grosse, 2015). ",
1553
+ "bbox": [
1554
+ 173,
1555
+ 895,
1556
+ 821,
1557
+ 924
1558
+ ],
1559
+ "page_idx": 10
1560
+ },
1561
+ {
1562
+ "type": "text",
1563
+ "text": "B MATRIX NORMAL DISTRIBUTION ",
1564
+ "text_level": 1,
1565
+ "bbox": [
1566
+ 174,
1567
+ 102,
1568
+ 488,
1569
+ 118
1570
+ ],
1571
+ "page_idx": 11
1572
+ },
1573
+ {
1574
+ "type": "text",
1575
+ "text": "The matrix normal distribution (Gupta & Nagar, 1999) is a multivariate distribution over an entire matrix of shape $n \\times p$ rather than just a vector. In contrast to the multivariate normal distribution, it is parameterised by two p.s.d. covariance matrices, $U : n \\times n$ and $V : p \\times p$ , which indicate the covariance of the rows and columns respectively. In addition it has a mean matrix $M : n \\times p$ . ",
1576
+ "bbox": [
1577
+ 174,
1578
+ 133,
1579
+ 825,
1580
+ 190
1581
+ ],
1582
+ "page_idx": 11
1583
+ },
1584
+ {
1585
+ "type": "text",
1586
+ "text": "A vectorised sample from a matrix normal distribution $X \\sim { \\mathcal { M N } } ( M , U , V )$ corresponds to a sample from a normal distribution $\\operatorname { v e c } ( X ) \\sim { \\mathcal { N } } ( \\operatorname { v e c } ( M ) , U \\otimes V )$ . However, samples can be drawn more efficiently as $X = M + A Z B$ with $Z \\sim \\mathcal { M N } ( 0 , I , I )$ , and $A A ^ { \\mathsf { T } } = U$ and $B ^ { \\intercal } B = V$ . The sample $Z$ corresponds to a sample from a normal distribution of length $n p$ that has been reshaped to a $n \\times p$ matrix. This is more efficient in the sense that we only need to calculate two matrix-matrix products of small matrices, rather than a matrix-vector product with one big one. ",
1587
+ "bbox": [
1588
+ 173,
1589
+ 196,
1590
+ 825,
1591
+ 284
1592
+ ],
1593
+ "page_idx": 11
1594
+ },
1595
+ {
1596
+ "type": "text",
1597
+ "text": "C APPROXIMATION OF THE EXPECTED ACTIVATION HESSIAN ",
1598
+ "text_level": 1,
1599
+ "bbox": [
1600
+ 176,
1601
+ 304,
1602
+ 699,
1603
+ 320
1604
+ ],
1605
+ "page_idx": 11
1606
+ },
1607
+ {
1608
+ "type": "text",
1609
+ "text": "While the square root of $\\mathcal { Q } _ { \\lambda }$ is calculated during the forward pass on all layers, $\\mathcal { H }$ requires an additional backward pass. Strictly speaking, it is not essential to approximate $\\mathbb { E } \\left[ \\mathcal { H } \\right]$ for the Kronecker factored Laplace approximation, as in contrast to optimisation procedures the curvature only needs to be calculated once and is thus not time critical. For datasets of the scale of ImageNet and the networks used for such datasets, it would still be impractically slow to perform the calculation for every data point individually. Furthermore, as most datasets are augmented during training, e.g. random cropping or reflections of images, the curvature of the network can be estimated using the same augmentations, effectively increasing the size of the dataset by orders of magnitude. Thus, we make use of the minibatch approximation in our experiments — as we make use of data augmentation — in order to demonstrate its practical applicability. ",
1610
+ "bbox": [
1611
+ 173,
1612
+ 335,
1613
+ 825,
1614
+ 476
1615
+ ],
1616
+ "page_idx": 11
1617
+ },
1618
+ {
1619
+ "type": "text",
1620
+ "text": "We note that E [H] can be calculated exactly by running KFRA (Botev et al., 2017) with a minibatchsize of one, and then averaging the results. KFAC (Martens & Grosse, 2015), in contrast, stochastically approximates the Fisher matrix, so even when run for every datapoint separately, it cannot calculate the curvature factor exactly. ",
1621
+ "bbox": [
1622
+ 174,
1623
+ 482,
1624
+ 825,
1625
+ 537
1626
+ ],
1627
+ "page_idx": 11
1628
+ },
1629
+ {
1630
+ "type": "text",
1631
+ "text": "In the following, we also show figures for the adversarial experiments in which we calculate the curvature per datapoint and without data augmentation: ",
1632
+ "bbox": [
1633
+ 174,
1634
+ 545,
1635
+ 823,
1636
+ 573
1637
+ ],
1638
+ "page_idx": 11
1639
+ },
1640
+ {
1641
+ "type": "image",
1642
+ "img_path": "images/bd401ad0b8e9d0a6e372927c134409d5b015ccf19eb9e8745ca37ac78fb7f7a9.jpg",
1643
+ "image_caption": [
1644
+ "Figure 6: Untargeted adversarial attack for Kronecker factored Laplace approximation with the curvature calculated with and without data augmentation/approximating the activation Hessian. "
1645
+ ],
1646
+ "image_footnote": [],
1647
+ "bbox": [
1648
+ 178,
1649
+ 587,
1650
+ 821,
1651
+ 741
1652
+ ],
1653
+ "page_idx": 11
1654
+ },
1655
+ {
1656
+ "type": "text",
1657
+ "text": "Fig. 6 and Fig. 7 show how the Laplace approximation with the curvature estimated from 1000 randomly sampled binary MNIST images and the activation Hessian calculated with a minibatch size of 100 performs in comparison to the curvature factor being calculated without any data augmentation with a batch size of 100 or exactly. We note that without data augmentation we had to use much stronger regularisation of the curvature factors, in particular we had to add a non-negligible multiple of the identity to the factors, whereas with data augmentation it was only needed to ensure that the matrices are invertible. The Kronecker factored Laplace approximation reaches particularly high uncertainty on the untargeted adversarial attack and is most robust on the targeted attack when using data augmentation, suggesting that it is particularly well suited for large datasets and ones where some form of data augmentation can be applied. The difference between approximating the activation Hessian over a minibatch and calculating it exactly appears to be negligible. ",
1658
+ "bbox": [
1659
+ 173,
1660
+ 797,
1661
+ 825,
1662
+ 924
1663
+ ],
1664
+ "page_idx": 11
1665
+ },
1666
+ {
1667
+ "type": "image",
1668
+ "img_path": "images/e31a6b6b0d0ab2399091e0aa6f1e8ffc0b21f98d8546841f2ad9096b7c2ec352.jpg",
1669
+ "image_caption": [
1670
+ "Figure 7: Targeted adversarial attack for Kronecker factored Laplace approximation with the curvature calculated with and without data augmentation/approximating the activation Hessian. "
1671
+ ],
1672
+ "image_footnote": [],
1673
+ "bbox": [
1674
+ 176,
1675
+ 101,
1676
+ 823,
1677
+ 256
1678
+ ],
1679
+ "page_idx": 12
1680
+ },
1681
+ {
1682
+ "type": "text",
1683
+ "text": "",
1684
+ "bbox": [
1685
+ 174,
1686
+ 321,
1687
+ 823,
1688
+ 351
1689
+ ],
1690
+ "page_idx": 12
1691
+ },
1692
+ {
1693
+ "type": "text",
1694
+ "text": "D MEMORY AND COMPUTATIONAL REQUIREMENTS ",
1695
+ "text_level": 1,
1696
+ "bbox": [
1697
+ 174,
1698
+ 371,
1699
+ 620,
1700
+ 386
1701
+ ],
1702
+ "page_idx": 12
1703
+ },
1704
+ {
1705
+ "type": "text",
1706
+ "text": "If we denote the dimensionality of the input to layer $\\lambda$ as $D _ { \\lambda - 1 }$ and its output as $D _ { \\lambda }$ , the curvature factors correspond to the two precision matrices with Dλ−1(Dλ−1+1)2 and $\\frac { D _ { \\lambda } ( D _ { \\lambda } + 1 ) } { 2 }$ ‘parameters’ to estimate, since they are symmetric. So across a network, the number of curvature directions that we are estimating grows linearly in the number of layers and quadratically in the dimension of the layers, i.e. the number of columns of the weight matrices. The size of the full Hessian, on the other hand, grows quadratically in the number of layers and with the fourth power in the dimensionality of the layers (assuming they are all the same size). ",
1707
+ "bbox": [
1708
+ 173,
1709
+ 400,
1710
+ 825,
1711
+ 503
1712
+ ],
1713
+ "page_idx": 12
1714
+ },
1715
+ {
1716
+ "type": "text",
1717
+ "text": "Once the curvature factors are calculated, which only needs to be done once, we use their Cholesky decomposition to solve two triangular linear systems when sampling weights from the matrix normal distribution. We use the same weight samples for each minibatch, i.e. we do not sample a weight matrix per datapoint. This is for computational efficiency and does not change the expectation. ",
1718
+ "bbox": [
1719
+ 174,
1720
+ 511,
1721
+ 825,
1722
+ 566
1723
+ ],
1724
+ "page_idx": 12
1725
+ },
1726
+ {
1727
+ "type": "text",
1728
+ "text": "One possibility to save computation time would be to sample a fixed set of weight matrices from the approximate posterior — in order to avoid solving the linear system on every forward pass — and treat the networks that they define as an ensemble. The individual ensemble members can be evaluated in parallel and their outputs averaged, which can be done with a small overhead over evaluating a single network given sufficient compute resources. A further speed up can be achieved by distilling the predictive distributions of the Laplace network into a smaller, deterministic feedforward network as successfully demonstrated in (Balan et al., 2015) for posterior samples using HMC. ",
1729
+ "bbox": [
1730
+ 173,
1731
+ 573,
1732
+ 825,
1733
+ 671
1734
+ ],
1735
+ "page_idx": 12
1736
+ },
1737
+ {
1738
+ "type": "text",
1739
+ "text": "E COMPLEMENTARY FIGURES FOR THE TOY DATASET ",
1740
+ "text_level": 1,
1741
+ "bbox": [
1742
+ 174,
1743
+ 690,
1744
+ 640,
1745
+ 707
1746
+ ],
1747
+ "page_idx": 12
1748
+ },
1749
+ {
1750
+ "type": "text",
1751
+ "text": "Fig. 8 shows the different Laplace approximations (Kronecker factored, diagonal, full) from the main text without any hyperparameter tuning. The figure of the uncertainty obtained from samples using HMC is repeated. Note that the scale is larger than in the main text due to the high uncertainty of the Laplace approximations. ",
1752
+ "bbox": [
1753
+ 173,
1754
+ 722,
1755
+ 823,
1756
+ 777
1757
+ ],
1758
+ "page_idx": 12
1759
+ },
1760
+ {
1761
+ "type": "text",
1762
+ "text": "The Laplace approximations are increasingly uncertain away from the data, as the true posterior estimated from HMC samples, however they all overestimate the uncertainty without regularisation. This is easy to fix by optimising the hyperparameters on a validation set as discussed in the main text, resulting in posterior uncertainty much more similar to the true posterior. As previously discussed in (Botev et al., 2017), the Hessian of a neural network is usually underdetermined as the number of data points is much smaller than the number of parameters — in our case we have 20 data points to estimate a $7 8 \\times 7 8$ precision matrix. This leads to the full Laplace approximation vastly overestimating the uncertainty and a bad predictive mean. Both the Kronecker factored and the diagonal approximation exhibit smaller variance than the full Laplace approximation as they restrict the structure of the precision matrix. Consistently with the other experiments, we find the diagonal ",
1763
+ "bbox": [
1764
+ 173,
1765
+ 785,
1766
+ 825,
1767
+ 924
1768
+ ],
1769
+ "page_idx": 12
1770
+ },
1771
+ {
1772
+ "type": "image",
1773
+ "img_path": "images/8728ab113d8def68159f046cb816ff9c7101a0cf17ad7545a887f6a29fd79c4f.jpg",
1774
+ "image_caption": [
1775
+ "Figure 8: Toy regression uncertainty. Black dots are data points, the black line shows the underlying noiseless function. The red line shows the deterministic prediction of the trained network, the blue line the mean output. Each shade of blue visualises one additional standard deviation. "
1776
+ ],
1777
+ "image_footnote": [],
1778
+ "bbox": [
1779
+ 210,
1780
+ 121,
1781
+ 769,
1782
+ 593
1783
+ ],
1784
+ "page_idx": 13
1785
+ },
1786
+ {
1787
+ "type": "text",
1788
+ "text": "Laplace approximation to place more mass in low probability areas of the posterior than the Kronecker factored approximation, resulting in higher variance on the regression problem. This leads to a need for greater regularisation of the diagonal approximation to obtain acceptable predictive performance, and underestimating the uncertainty. ",
1789
+ "bbox": [
1790
+ 173,
1791
+ 696,
1792
+ 825,
1793
+ 753
1794
+ ],
1795
+ "page_idx": 13
1796
+ },
1797
+ {
1798
+ "type": "text",
1799
+ "text": "F PREDICTION ACCURACY ",
1800
+ "text_level": 1,
1801
+ "bbox": [
1802
+ 176,
1803
+ 799,
1804
+ 411,
1805
+ 815
1806
+ ],
1807
+ "page_idx": 13
1808
+ },
1809
+ {
1810
+ "type": "text",
1811
+ "text": "This section shows the accuracy values obtained from the different predictions methods on the feedforward networks for MNIST and the wide residual network for CIFAR100. The results for MNIST are shown in Table 1 and the results for CIFAR in Table 2. ",
1812
+ "bbox": [
1813
+ 174,
1814
+ 847,
1815
+ 825,
1816
+ 888
1817
+ ],
1818
+ "page_idx": 13
1819
+ },
1820
+ {
1821
+ "type": "text",
1822
+ "text": "In all cases, neither MC Dropout nor the Laplace approximation significantly change the classification accuracy of the network in comparison to a deterministic forward pass. ",
1823
+ "bbox": [
1824
+ 173,
1825
+ 895,
1826
+ 821,
1827
+ 924
1828
+ ],
1829
+ "page_idx": 13
1830
+ },
1831
+ {
1832
+ "type": "table",
1833
+ "img_path": "images/2917d1b2ef29894240396badcccee0730023770a1a2a6738ee3bf4a150af869d.jpg",
1834
+ "table_caption": [
1835
+ "Table 1: Test accuracy of the feedforward network trained on MNIST "
1836
+ ],
1837
+ "table_footnote": [],
1838
+ "table_body": "<table><tr><td>Prediction Method</td><td>Accuracy</td></tr><tr><td>FFG Deterministic</td><td>98.88% 98.86%</td></tr><tr><td>MC Dropout Diagonal Laplace</td><td>98.85% 98.85%</td></tr><tr><td>KF Laplace</td><td>98.80%</td></tr></table>",
1839
+ "bbox": [
1840
+ 382,
1841
+ 126,
1842
+ 611,
1843
+ 215
1844
+ ],
1845
+ "page_idx": 14
1846
+ },
1847
+ {
1848
+ "type": "table",
1849
+ "img_path": "images/52092b0b4adc367a00e011aebda2cedf442164045a787b26e985b415a1e76a5f.jpg",
1850
+ "table_caption": [
1851
+ "Table 2: Accuracy on the final 5, 000 CIFAR100 test images for a wide residual network trained with and without Dropout. "
1852
+ ],
1853
+ "table_footnote": [],
1854
+ "table_body": "<table><tr><td colspan=\"3\">Accuracy</td></tr><tr><td>Prediction Method</td><td>Dropout</td><td>Deterministic</td></tr><tr><td>Deterministic</td><td>79.12%</td><td>79.18%</td></tr><tr><td>MC Dropout</td><td>79.20%</td><td>1</td></tr><tr><td>KF Laplace</td><td>79.10%</td><td>79.36%</td></tr></table>",
1855
+ "bbox": [
1856
+ 333,
1857
+ 270,
1858
+ 660,
1859
+ 343
1860
+ ],
1861
+ "page_idx": 14
1862
+ },
1863
+ {
1864
+ "type": "text",
1865
+ "text": "G IMPLEMENTATION DETAILS FOR RESIDUAL NETWORKS ",
1866
+ "text_level": 1,
1867
+ "bbox": [
1868
+ 174,
1869
+ 367,
1870
+ 673,
1871
+ 385
1872
+ ],
1873
+ "page_idx": 14
1874
+ },
1875
+ {
1876
+ "type": "text",
1877
+ "text": "Our wide residual network has $n { = } 3$ block repetitions and a width factor of $k { = } 8$ on CIFAR100 with and without Dropout using hyperparameters taken from (Zagoruyko & Komodakis, 2016): the network parameters are trained on a cross-entropy loss using Nesterov momentum with an initial learning rate of 0.1 and momentum of 0.9 for 200 epochs with a minibatch size of 128. We decay the learning rate every 50 epochs by a factor of 0.2, which is slightly different to the schedule used in (Zagoruyko & Komodakis, 2016) (they decay after 60, 120 and 160 epochs). As the original authors, we use $L _ { 2 }$ -regularisation with a factor of $5 \\times 1 0 ^ { - 4 }$ . ",
1878
+ "bbox": [
1879
+ 173,
1880
+ 398,
1881
+ 825,
1882
+ 500
1883
+ ],
1884
+ "page_idx": 14
1885
+ },
1886
+ {
1887
+ "type": "text",
1888
+ "text": "We make one small modification to the architecture: instead of downsampling with $1 \\times 1$ convolutions with stride 2, we use $2 \\times 2$ convolutions. This is due to Theano not supporting the transformation of images into the patches extracted by a convolution for $1 \\times 1$ convolutions with stride greater than 1, which we require for our curvature backpropagation through convolutions. ",
1889
+ "bbox": [
1890
+ 174,
1891
+ 506,
1892
+ 825,
1893
+ 563
1894
+ ],
1895
+ "page_idx": 14
1896
+ },
1897
+ {
1898
+ "type": "text",
1899
+ "text": "We apply a standard Laplace approximation to the batch normalisation parameters — a Kronecker factorisation is not needed, since the parameters are one-dimensional. When calculating the curvature factors, we use the moving averages for the per-layer means and standard deviations obtained after training, in order to maintain independence between the data points in a minibatch. ",
1900
+ "bbox": [
1901
+ 174,
1902
+ 569,
1903
+ 825,
1904
+ 625
1905
+ ],
1906
+ "page_idx": 14
1907
+ },
1908
+ {
1909
+ "type": "text",
1910
+ "text": "We need to make a further approximation to the ones discussed in Section 2.2 when backpropagating the curvature for residual networks. The residual blocks compute a function of the form $r e s ( x ) =$ $x + f _ { \\phi } ( x )$ , where $f _ { \\phi }$ typically is a sequence of convolutions, batch normalisation and elementwise nonlinearities. This means that we would need to pass back two curvature matrices, one for each summand. However, this would double the number of backpropagated matrices for each residual connection, hence the computation time/memory requirements would grow exponentially in the number of residual blocks. Therefore, we simply add the curvature matrices after each residual connection. ",
1911
+ "bbox": [
1912
+ 173,
1913
+ 631,
1914
+ 825,
1915
+ 743
1916
+ ],
1917
+ "page_idx": 14
1918
+ }
1919
+ ]
parse/train/Skdvd2xAZ/Skdvd2xAZ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Skdvd2xAZ/Skdvd2xAZ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SywMS6ZfM/SywMS6ZfM.md ADDED
@@ -0,0 +1,517 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DISTRIBUTIONAL INCLUSION VECTOR EMBEDDING FOR UNSUPERVISED HYPERNYMY DETECTION
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Modeling hypernymy, such as poodle is-a dog, is an important generalization aid to many NLP tasks, such as entailment, relation extraction, and question answering. Supervised learning from labeled hypernym sources, such as WordNet, limit the coverage of these models, which can be addressed by learning hypernyms from unlabeled text. Existing unsupervised methods either do not scale to large vocabularies or yield unacceptably poor accuracy. This paper introduces distributional inclusion vector embedding (DIVE), a simple-to-implement unsupervised method of hypernym discovery via per-word non-negative vector embeddings which preserve the inclusion property of word contexts. In experimental evaluations more comprehensive than any previous literature of which we are aware—evaluating on 11 datasets using multiple existing as well as newly proposed scoring functions— we find that our method provides up to double the precision of previous unsupervised methods, and the highest average performance, using a much more compact word representation, and yielding many new state-of-the-art results. In addition, the meaning of each dimension in DIVE is interpretable, which leads to a novel approach on word sense disambiguation as another promising application of DIVE.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Numerous applications benefit from compactly representing context distributions, which assign meaning to objects under the rubric of distributional semantics. In natural language processing, distributional semantics has long been used to assign meanings to words (that is, to lexemes in the dictionary, not individual instances of word tokens). The meaning of a word in the distributional sense is often taken to be the set of textual contexts (nearby tokens) in which that word appears, represented as a large sparse bag of words (SBOW). Without any supervision, word2vec (Mikolov et al., 2013), among other approaches based on matrix factorization (Levy et al., 2015a), successfully compress the SBOW into a much lower dimensional embedding space, increasing the scalability and applicability of the embeddings while preserving (or even improving) the correlation of geometric embedding similarities with human word similarity judgments.
12
+
13
+ While embedding models have achieved impressive results, context distributions capture more semantic features than just word similarity. The distributional inclusion hypothesis (DIH) (Weeds & Weir, 2003; Geffet & Dagan, 2005; Cimiano et al., 2005) posits that the context set of a word tends to be a subset of the contexts of its hypernyms. For a concrete example, most adjectives that can be applied to poodle can also be applied to dog, because dog is a hypernym of poodle. For instance, both can be obedient. However, the converse is not necessarily true — a dog can be straight-haired but a poodle cannot. Therefore, dog tends to have a broader context set than poodle. Many asymmetric scoring functions comparing SBOW based on DIH have been developed for automatic hypernymy detection (Weeds & Weir, 2003; Geffet & Dagan, 2005; Santus et al., 2017).
14
+
15
+ Hypernymy detection plays a key role in many challenging NLP tasks, such as textual entailment (Sammons et al., 2011), coreference (Ponzetto & Strube, 2006), relation extraction (Demeester et al., 2016) and question answering (Huang et al., 2008). Leveraging the variety of contexts and inclusion properties in context distributions can greatly increase the ability to discover taxonomic structure among words (Santus et al., 2017). The inability to preserve these features limits the semantic representation power and downstream applicability of some popular existing unsupervised learning approaches such as word2vec.
16
+
17
+ Several recently proposed methods aim to encode hypernym relations between words in dense embeddings, such as Gaussian embedding (Vilnis & McCallum, 2015; Athiwaratkun & Wilson, 2017), order embedding (Vendrov et al., 2016), H-feature detector (Roller & Erk, 2016), HyperScore (Nguyen et al., 2017), dual tensor (Glavas & Ponzetto, 2017), Poincar ˇ e embedding (Nickel ´ & Kiela, 2017), and LEAR (Vulic & Mrk ´ siˇ c, 2017). However, the methods focus on supervised ´ or semi-supervised setting (Vendrov et al., 2016; Roller & Erk, 2016; Nguyen et al., 2017; Glavasˇ & Ponzetto, 2017; Vulic & Mrk ´ siˇ c, 2017), do not learn from raw text (Nickel & Kiela, 2017) or ´ lack comprehensive experiments on the hypernym detection task (Vilnis & McCallum, 2015; Athiwaratkun & Wilson, 2017).
18
+
19
+ Recent studies (Levy et al., 2015b; Santus et al., 2017) have underscored the difficulty of generalizing supervised hypernymy annotations to unseen pairs — classifiers often effectively memorize prototypical hypernyms (‘general’ words) and ignore relations between words. These findings motivate us to develop more accurate and scalable unsupervised embeddings to detect hypernymy and propose several scoring functions to analyze the embeddings from different perspectives.
20
+
21
+ # 1.1 CONTRIBUTIONS
22
+
23
+ • A novel unsupervised low-dimensional embedding method to model inclusion relations among word contexts via performing non-negative matrix factorization (NMF) on a weighted PMI matrix, which can be efficiently optimized using modified skip-grams. Several new asymmetric comparison functions to measure inclusion and generality properties and to evaluate different aspects of unsupervised embeddings. Extensive experiments on 11 datasets demonstrate the learned embeddings and comparison functions achieve state-of-the-art performances on unsupervised hypernym detection while requiring much less memory and compute than approaches based on the full SBOW. • A qualitative experiment illustrates DIVE can be used to solve word sense disambiguation, especially when efficiently modeling word senses at multiple granularities is desirable.
24
+
25
+ # 2 METHOD
26
+
27
+ The distributional inclusion hypothesis (DIH) suggests that the context set of a hypernym tends to contain the context set of its hyponyms. That is, when representing a word as the counts of contextual co-occurrences, the count in every dimension of hypernym $y$ tends to be larger than or equal to the corresponding count of its hyponym $x$ :
28
+
29
+ $$
30
+ x \preceq y \iff \forall c \in V , \# ( x , c ) \leq \# ( y , c ) ,
31
+ $$
32
+
33
+ where $x \preceq y$ means $y$ is a hypernym of $x , V$ is the set of vocabulary, and $\# ( x , c )$ indicates the number of times that word $x$ and its context word $c$ co-occur in a small window with size $| W |$ in corpus $D$ .
34
+
35
+ Our goal is to produce lower-dimensional embeddings that preserve the inclusion property that the embedding of hypernym $y$ is larger than or equal to the embedding of its hyponym $x$ in every dimension. Formally, the desirable property can be written as
36
+
37
+ $$
38
+ x \preceq y \iff \mathbf { x } [ i ] \leq \mathbf { y } [ i ] , \forall i \in \{ 1 , . . . , d _ { 0 } \} ,
39
+ $$
40
+
41
+ where $d _ { 0 }$ is number of dimensions in the embedding space. We add additional non-negativity constraints, i.e. $x [ i ] \ge 0 , y [ i ] \ge 0 , \forall i$ , in order to increase the interpretability of the embeddings (the reason will be explained later in this section).
42
+
43
+ This is a challenging task. In reality, there are a lot of noise and systematic biases which cause the violation of DIH in Equation (1) (i.e. $\# ( x , c ) > \# ( y , c )$ for some neighboring word $c$ ), but the general trend can be discovered by processing several thousands of neighboring words in SBOW together. After the compression, the same trend has to be estimated in a much smaller embedding space which discards most of the information in SBOW, so it is not surprising to see most of the unsupervised hypernymy detection studies use SBOW (Santus et al., 2017) and the existing unsupervised embeddings like Gaussian embedding have degraded accuracy (Vulic et al., 2016). ´
44
+
45
+ # 2.1 INCLUSION PRESERVING MATRIX FACTORIZATION
46
+
47
+ Popular methods of unsupervised word embedding are usually based on matrix factorization (Levy et al., 2015a). The approaches first compute a co-occurrence statistic between the wth word and the cth context word as the $( w , c )$ th element of the matrix $M [ w , c ]$ . Next, the matrix $M$ is factorized such that $M [ w , c ] \approx \mathbf { w } ^ { T } \mathbf { \dot { c } }$ , where w is the low dimension embedding of $w$ th word and $\mathbf { c }$ is the cth context embedding.
48
+
49
+ The statistic in $M [ w , c ]$ is usually related to pointwise mutual information: $P M I ( w , c ) ~ =$ $\textstyle \log ( { \frac { P ( w , c ) } { P ( w ) \cdot P ( c ) } } )$ , where $\begin{array} { r } { P ( w , c ) = \frac { \# ( w , c ) } { | D | } } \end{array}$ , $| D | = \sum _ { w \in V } \sum _ { c \in V } \# ( w , c )$ is number of co-occurrence word pairs in the corpus, $\begin{array} { r } { P ( w ) = \frac { \# ( w ) } { | D | } } \end{array}$ , $\# ( w ) = \sum _ { c \in V } \# ( w , c )$ is the frequency of the word $w$ times the window size $| W |$ , and similarly for $P ( c )$ . For example, $M [ w , c ]$ could be set as positive PMI (PPMI), $\operatorname* { m a x } ( P M I ( w , c ) , 0 )$ , or shifted PMI, $P M I ( w , c ) - \log ( k )$ , like skip-grams with negative sampling (SGNS) (Levy et al., 2015a). Intuitively, since $\dot { M } [ w , \bar { c ] } \approx \mathbf { w } ^ { T } \mathbf { c }$ , larger embedding values of w at every dimension seems to imply larger $\mathbf { \bar { w } } ^ { T } \mathbf { c }$ , larger $M [ w , c ]$ , larger $\bar { P } M I ( w , c )$ , and thus larger co-occurrence count $\# ( w , c )$ . However, the derivation has two flaws: (1) c could be negative and (2) lower $\# ( w , c )$ could still lead to larger $P M I ( w , c )$ as long as the $\# ( w )$ is small enough.
50
+
51
+ To preserve DIH, we propose a novel word embedding method, distributional inclusion vector embedding $( D I V E )$ , which fixes the two flaws by performing non-negative factorization (NMF) on the matrix $M$ , where
52
+
53
+ $$
54
+ M [ w , c ] = \log ( \frac { P ( w , c ) } { P ( w ) \cdot P ( c ) } \cdot \frac { \# ( w ) } { k \cdot Z } ) = \log ( \frac { \# ( w , c ) | V | } { \# ( c ) k } ) ,
55
+ $$
56
+
57
+ where $k$ is a constant which shifts PMI value like SGNS, $\begin{array} { r } { Z = \frac { | D | } { | V | } } \end{array}$ is the average word frequency, and $| V |$ is the vocabulary size.
58
+
59
+ The design encourages the inclusion property in DIVE (i.e. Equation (2)) to be satisfied because the property implies that Equation (1) (DIH) holds if the matrix is reconstructed perfectly. The derivation is simple: Since context vector c is non-negative, if the embedding of hypernym $\mathbf { y }$ is greater than or equal to the embedding of its hyponym $\mathbf { X }$ in every dimension, $\mathbf { \bar { x } } ^ { T } \mathbf { c } \leq \mathbf { y } ^ { T } \mathbf { c }$ . Then, $\mathbf { \bar { \boldsymbol { M } } } [ \boldsymbol { x } , \boldsymbol { c } ] \le M [ \boldsymbol { y } , \boldsymbol { \bar { c } } ]$ tends to be true because $\mathbf { w } ^ { \hat { T } } \mathbf { c } \ \tilde { \approx } \ M [ w , c ]$ . This leads to $\# ( x , c ) \leq \# ( y , c )$ because M [w, c] = log( #(w,c)|V |#(c)k ) and only $\# ( w , c )$ change with $w$ .
60
+
61
+ # 2.2 OPTIMIZATION
62
+
63
+ Due to its appealing scalability properties during training time (Levy et al., 2015a), we optimize our embedding based on the skip-gram with negative sampling (SGNS) (Mikolov et al., 2013). The objective function of SGNS is
64
+
65
+ $$
66
+ l _ { S G N S } = \sum _ { w \in V } \sum _ { c \in V } \# ( w , c ) \log \sigma ( \mathbf { w } ^ { T } \mathbf { c } ) \ + \ \sum _ { w \in V } k ^ { \prime } \sum _ { c \in V } \# ( w , c ) \operatorname { \mathbb { E } } _ { c _ { N } \sim P _ { D } } [ \log \sigma ( - \mathbf { w } ^ { T } \mathbf { c } _ { \mathbf { N } } ) ] ,
67
+ $$
68
+
69
+ where $\mathbf { w } \in \mathbb { R } , \mathbf { c } \in \mathbb { R } , \mathbf { c _ { N } } \in \mathbb { R } , k ^ { \prime }$ is a constant hyper-parameter indicating the ratio between positive and negative samples.
70
+
71
+ Levy & Goldberg (2014) prove SGNS is equivalent to factorizing a shifted PMI matrix $M ^ { \prime }$ , where $\begin{array} { r } { M ^ { \prime } [ w , c ] = \log ( \frac { P ( w , c ) } { P ( w ) \cdot P ( c ) } \cdot \frac { 1 } { k ^ { \prime } } ) } \end{array}$ . By setting $\begin{array} { r } { k ^ { \prime } = \frac { k \cdot Z } { \# ( w ) } } \end{array}$ and applying non-negativity constraints to the embeddings, DIVE can be optimized using the similar objective function:
72
+
73
+ $$
74
+ l _ { D I V E } = \sum _ { w \in V } \sum _ { c \in V } \# ( w , c ) \log \sigma ( \mathbf { w } ^ { T } \mathbf { c } ) \ + k \sum _ { w \in V } \frac { Z } { \# ( w ) } \sum _ { c \in V } \# ( w , c ) \operatorname { \mathbb { E } } _ { c _ { N } \sim P _ { D } } [ \log \sigma ( - \mathbf { w } ^ { T } \mathbf { c } _ { \mathbf { N } } ) ] ,
75
+ $$
76
+
77
+ where $\mathbf { w } \geq 0 , \mathbf { c } \geq 0 , \mathbf { c } _ { \mathbf { N } } \geq 0 ,$ $\sigma$ is the logistic sigmoid function, and $k$ is a constant hyper-parameter. $P _ { D }$ is the distribution of negative samples, which we set to be the corpus word frequency distribution in this paper. Equation (5) is optimized by ADAM (Kingma & Ba, 2015), a variant of stochastic gradient descent (SGD). The non-negativity constraint is implemented by projection (i.e., clipping any embedding which crosses the zero boundary after an update).
78
+
79
+ ![](images/bc81173fe9f03c1c3657656ec72c8d5249f2772d104addb772d049e2d14a7de5.jpg)
80
+
81
+ Figure 1: The top 15 dimensions in the distributional inclusion vector embedding (DIVE) of the word core trained by the co-occurrence statistics of context words. The index of dimensions is sorted by the embedding values. The words in each row of the table are sorted by its embedding value in the dimension.
82
+
83
+ <table><tr><td rowspan=1 colspan=1>id</td><td rowspan=1 colspan=1>Top 1-5 words</td><td rowspan=1 colspan=1>Top 101-105 words</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>element,gas,atom,rock,carbon</td><td rowspan=1 colspan=1>methane,llio</td></tr><tr><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>system,rcieturvelope,ge</td><td rowspan=1 colspan=1>functional,rnt,ocsing,</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>also, well,svral,rly</td><td rowspan=1 colspan=1>fall, eventually, main,ise,mosty</td></tr><tr><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>part</td><td rowspan=1 colspan=1>incorporate,ge,iead,oing,dd</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>star,orbit,snbital,</td><td rowspan=1 colspan=1>bright,posion,turieractio</td></tr><tr><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>several,ic</td><td rowspan=1 colspan=1>designate,ist,iss,bch,i</td></tr><tr><td rowspan=1 colspan=1>7</td><td rowspan=1 colspan=1>science,plosophy, thory,plosophr,r</td><td rowspan=1 colspan=1>ethical,dvocte,oic,bic,</td></tr><tr><td rowspan=1 colspan=1>8</td><td rowspan=1 colspan=1>version,game,release,original,ile</td><td rowspan=1 colspan=1>cassette, rtual,code,project, kb</td></tr><tr><td rowspan=1 colspan=1>9</td><td rowspan=1 colspan=1>electron,ttric,cit</td><td rowspan=1 colspan=1>anode,wire,ac,perform,eistor</td></tr><tr><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>tank, cylinder,heel,gi</td><td rowspan=1 colspan=1>aluminumtic,ott</td></tr><tr><td rowspan=1 colspan=1>11</td><td rowspan=1 colspan=1>school,itil</td><td rowspan=1 colspan=1>doctorateldert</td></tr><tr><td rowspan=1 colspan=1>12</td><td rowspan=1 colspan=1>network,r,er,dtum,prl</td><td rowspan=1 colspan=1>technologyoutgnt,crooft,</td></tr><tr><td rowspan=1 colspan=1>13</td><td rowspan=1 colspan=1>high,low,turergy</td><td rowspan=1 colspan=1>atmosphric,tod,,io</td></tr><tr><td rowspan=1 colspan=1>14</td><td rowspan=1 colspan=1>acid, carbon, product, ue,inc</td><td rowspan=1 colspan=1>ph,monoided</td></tr><tr><td rowspan=1 colspan=1>15</td><td rowspan=1 colspan=1>access,nd,rquire,llow,program</td><td rowspan=1 colspan=1>size,abilitytlly</td></tr></table>
84
+
85
+ The optimization process provides an alternative angle to explain how DIVE preserves DIH. The gradients for the word embedding w is
86
+
87
+ $$
88
+ \frac { d l _ { D I V E } } { d \mathbf { w } } = \sum _ { c \in V } \# ( w , c ) ( 1 - \sigma ( \mathbf { w } ^ { T } \mathbf { c } ) ) \mathbf { c } - k \sum _ { c _ { N } \in V } \frac { \# ( c _ { N } ) } { | V | } \sigma ( \mathbf { w } ^ { T } \mathbf { c } _ { \mathbf { N } } ) \mathbf { c } _ { \mathbf { N } } .
89
+ $$
90
+
91
+ Assume hyponym $\mathbf { X }$ and hypernym y satisfy DIH in Equation (1) and the embeddings $\mathbf { x }$ and $\mathbf { y }$ are the same at some point during the gradient ascent. In the case, the gradients coming from negative sampling (the second term) decrease the same amount of embedding values for both $x$ and $y$ because $k$ is a constant hyper-parameter. However, the embedding of hypernym $\mathbf { y }$ would get higher or equal positive gradients from the first term than $\mathbf { x }$ in every dimension because $\# ( x , \bar { c } ) \leq \bar { \# } ( y , c )$ . This means Equation (1) tends to imply Equation (2). Combining the analysis from the matrix factorization viewpoint, DIH in Equation (1) is approximately equivalent to the inclusion property in DIVE (i.e. Equation (2)).
92
+
93
+ # 2.3 PMI FILTERING
94
+
95
+ For a frequent target word, there must be many neighboring words that incidentally appear near the target word without being semantically meaningful, especially when a large context window size is used. The unrelated context words cause noise in both the word vector and the context vector of DIVE. We address this issue by filtering out context words $c$ for each target word $w$ when the PMI of the co-occurring words is too small (i.e., $\begin{array} { r } { \log ( \frac { P ( w , c ) } { P ( w ) \cdot P ( c ) } ) < \log ( k _ { f } ) ) } \end{array}$ . That is, we set $\# ( w , c ) = 0$ in the objective function. This preprocessing step is similar with computing PPMI in SBOW (Bullinaria & Levy, 2007), where low PMI co-occurrences are removed from the count-based representation.
96
+
97
+ # 2.4 INTERPRETABILITY
98
+
99
+ After applying the non-negativity constraint, we observe that each dimension roughly corresponds to a topic, as previous findings suggest (Pauca et al., 2004; Murphy et al., 2012). This gives rise to a natural and intuitive interpretation of our word embeddings: the word embeddings can be seen as unnormalized probability distributions over topics. By removing the normalization of the target word frequency in the shifted PMI matrix, specific words have values in few dimensions (topics), while general words appear in more topics and correspondingly have high values in more dimensions, so the concreteness level of two words can be easily compared using the magnitude of their embeddings. In other words, general words have more diverse context distributions, so we need more dimensions to store the information in order to compress SBOW well (Nalisnick & Ravi, 2015).
100
+
101
+ In Figure 1, we present three mentions of the word core and its surrounding contexts. These various context words increase the embedding values in different dimensions. Each dimension of the learned embeddings roughly corresponds to a topic, and the more general or representative words for each topic tend to have the higher value in the corresponding dimension (e.g. words in the second column of the table). The embedding is able to capture the common contexts where the word core appears. For example, the context of the first mention is related to the atom topic (dimension id 1) and the electron topic (id 9), while the second and third mention occur in the computer architecture topic (id 2) and education topic (id 11), respectively.
102
+
103
+ # 3 EXPERIMENT SETUP
104
+
105
+ We describe four experiments in Section 4-7. The first 3 experiments compare DIVE with other unsupervised embeddings and SBOW using different hypernymy scoring functions. In these experiments, unsupervised approaches refer to the methods that only train on plaintext corpus without using any hypernymy or lexicon annotation. The last experiment presents qualitative results on word sense disambiguation.
106
+
107
+ # 3.1 DATASETS AND TESTING SETUP
108
+
109
+ The SBOW and embeddings are tested on 11 datasets. The first 4 datasets come from the recent review of Santus et al. (2017): BLESS (Baroni & Lenci, 2011), EVALution (Santus et al., 2015), Lenci/Benotto (Benotto, 2015), and Weeds (Weeds et al., 2014). The next 4 datasets are downloaded from the code repository of the H-feature detector (Roller & Erk, 2016): Medical (i.e., Levy 2014) (Levy et al., 2014), LEDS (also referred to as ENTAILMENT or Baroni 2012) (Baroni et al., 2012), TM14 (i.e., Turney 2014) (Turney & Mohammad, 2015), and Kotlerman 2010 (Kotlerman et al., 2010). In addition, the performance on the test set of HyperNet (Shwartz et al., 2016) (using the random train/test split), the test set of WordNet (Vendrov et al., 2016), and all pairs in HyperLex (Vulic et al., 2016) are also evaluated. ´
110
+
111
+ The F1 and accuracy measurements are sometimes very similar even though the quality of prediction varies, so average precision $\operatorname { A P } @$ all is adopted as the main evaluation metric. The HyperLex dataset has a continuous score on each candidate word pair, so we adopt Spearman rank coefficient $\rho$ as suggested by the review study of Vulic et al. (2016). Any OOV (out-of-vocabulary) word en- ´ countered in the testing data is pushed to the bottom of the prediction list (effectively assuming the word pair does not have a hypernym relation).
112
+
113
+ # 3.2 TRAINING SETUP
114
+
115
+ We use WaCkypedia corpus (Baroni et al., 2009), a 2009 Wikipedia dump, to compute SBOW and train the embedding. For the datasets without Part of Speech (POS) information (i.e. Medical, LEDS, TM14, Kotlerman 2010, and HyperNet), the training data of SBOW and embeddings are raw text. For other datasets, we concatenate each token with the Part of Speech (POS) of the token before training the models except the case when we need to match the training setup of another paper.
116
+
117
+ All words are lower cased. Stop words and rare words (occurs less than 10 times) are removed during our preprocessing step. The number of embedding dimensions in DIVE $d _ { 0 }$ is set to be 100. Other hyper-parameters used in the experiments are listed in the supplementary materials. The hyper-parameters of DIVE were decided based on the performance of HyperNet training set. To train embeddings more efficiently, we chunk the corpus into subsets/lines of 100 tokens instead of using sentence segmentation. Preliminary experiments show that this implementation simplification does not hurt the performance.
118
+
119
+ Table 1: Comparison with previous unsupervised embeddings. All values are percentages. $\mathbf { A P } @$ all $( \% )$ for 10 datasets and Spearman $\rho$ $( \% )$ for HyperLex. Word2Vec $+ \mathrm { C }$ scores the word pairs using the cosine similarity on skip-grams (SGNS). $\mathrm { G E + C }$ and $\mathrm { G E + K L }$ computes cosine similarity and negative KL divergence on Gaussian embedding, respectively.
120
+
121
+ <table><tr><td>Dataset</td><td>BLESS</td><td>EVALution</td><td>LenciBenotto</td><td>Weeds</td><td>Medical</td><td>LEDS</td></tr><tr><td>Random Word2Vec+C</td><td>5.3 9.2</td><td>26.6 25.4</td><td>41.2 40.8</td><td>51.4 51.6</td><td>8.5 11.2</td><td>50.5 71.8</td></tr><tr><td>GE+C GE+KL</td><td>10.5 7.6</td><td>26.7 29.6</td><td>43.3</td><td>52.0</td><td>14.9</td><td>69.7</td></tr><tr><td>DIVE+C.△S</td><td></td><td></td><td>45.1</td><td>51.3</td><td>15.7</td><td>64.6</td></tr><tr><td></td><td>16.3</td><td>33.0</td><td>50.4</td><td>65.5</td><td>25.3</td><td>83.5</td></tr><tr><td>Dataset</td><td>TM14</td><td>Kotlerman 2010</td><td>HyperNet</td><td>WordNet</td><td>HyperLex</td><td></td></tr><tr><td>Random</td><td>52.0</td><td>30.8</td><td>24.5</td><td>55.2</td><td>0</td><td></td></tr><tr><td>Word2Vec+C</td><td>52.1</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>39.5</td><td>20.7</td><td>63.0</td><td>16.3</td><td></td></tr><tr><td>GE+C</td><td>53.9</td><td>36.0</td><td>21.6</td><td>58.2</td><td>16.4</td><td></td></tr><tr><td>GE+KL</td><td>52.0</td><td>39.4</td><td>23.7</td><td>54.4</td><td>9.6</td><td></td></tr><tr><td>DIVE+C·△S</td><td>57.2</td><td>36.6</td><td>41.9</td><td>60.9</td><td>32.8</td><td></td></tr></table>
122
+
123
+ In the following experiments, we train both SBOW and DIVE on only the first 512,000 lines (51.2 million tokens) because we find this way of training setting provides better performances (for both SBOW and DIVE) than training on the whole WaCkypedia or training on randomly sampled 512,000 lines. We suspect this is due to the corpus being sorted by the Wikipedia page titles, which makes some categorical words such as animal and mammal occur 3-4 times more frequently in the first 51.2 million tokens than the rest. The performances of training SBOW PPMI on the whole WaCkypedia is also provided for reference in Table 4 and Table 5.
124
+
125
+ # 4 EXPERIMENT 1: COMPARISON WITH UNSUPERVISED EMBEDDINGS
126
+
127
+ If a pair of words has the hypernym relation, the words tend to be similar and the hypernym should be more general than the hyponym. As in HyperScore (Nguyen et al., 2017), we score the hypernym candidates by multiplying two factors corresponding to these properties. The ${ \bf C } { \cdot } { \Delta } { \cal S }$ (i.e. the cosine similarity multiply the difference of summation) scoring function is defined as
128
+
129
+ $$
130
+ C \cdot \Delta S ( \mathbf { w } _ { q } \mathbf { w } _ { p } ) = \frac { \mathbf { w } _ { q } ^ { T } \mathbf { w } _ { p } } { | | \mathbf { w } _ { q } | | _ { 2 } \cdot | | \mathbf { w } _ { p } | | _ { 2 } } \cdot ( | | \mathbf { w } _ { p } | | _ { 1 } - | | \mathbf { w } _ { q } | | _ { 1 } ) ,
131
+ $$
132
+
133
+ where ${ \bf w } _ { p }$ is the embedding of hypernym and ${ \bf w } _ { q }$ is the embedding of hyponym.
134
+
135
+ As far as we know, Gaussian embedding (GE) is the only unsupervised embedding method which can capture the asymmetric relations between a hypernym and its hyponyms. Using the same training and testing setup, we use the code implemented by Athiwaratkun $\&$ Wilson $( 2 0 1 7 ) ^ { 1 }$ to train Gaussian embedding on the first 51.2 million tokens and test the embeddings on 11 datasets. Its hyper-parameters are determined using the same way as DIVE (i.e. maximizing the AP on HyperNet training set). We compare DIVE with $\mathrm { G E } ^ { 2 }$ in Table 1, and the performances of random scores and only measuring word similarity using skip-grams are also presented for reference. As we can see, DIVE is usually significantly better than other baselines.
136
+
137
+ # 5 EXPERIMENT 2: HYPERNYMY SCORING FUNCTIONS ANALYSIS
138
+
139
+ In Experiment 1, we show that there exists a scoring function $\left( \mathbf { C } { \cdot } \Delta \mathbf { S } \right)$ which detects hypernymy accurately using the embedding space of DIVE. Nevertheless, different scoring functions measure different signals in SBOW or embeddings. Since there are so many scoring functions and datasets available in the domain, we first introduce and test the performances of various scoring functions so as to select the representative ones for a more comprehensive evaluation of DIVE on the hypernymy detection tasks. We denote the embedding/context vector of the hypernym candidate and the hyponym candidate as ${ \bf w } _ { p }$ and ${ \bf w } _ { q }$ , respectively. The SBOW model which represents a word by the frequency of its neighboring words is denoted as SBOW Freq, while the SBOW which uses PPMI of its neighboring words as the features (Bullinaria & Levy, 2007) is denoted as SBOW PPMI.
140
+
141
+ # 5.1 UNSUPERVISED SCORING FUNCTIONS
142
+
143
+ # 5.1.1 SIMILARITY
144
+
145
+ A hypernym tends to be similar to its hyponym, so we measure the cosine similarity between word vectors of the SBOW features (Levy et al., 2015b) or DIVE. We refer to the symmetric scoring function as Cosine or C for short in the following tables. We also train the original skip-grams with 100 dimensions and measure the cosine similarity between the resulting word2vec embeddings. This scoring function is referred to as Word2vec or W.
146
+
147
+ # 5.1.2 GENERALITY
148
+
149
+ The distributional informativeness hypothesis (Santus et al., 2014) observes that in many corpora, semantically ‘general’ words tend to appear more frequently and in more varied contexts. Thus, Santus et al. (2014) advocate using entropy of context distributions to capture the diversity of context. We adopt the two variations of the approach proposed by Santus et al. (2017): SLQS Row and SLQS Sub functions. We also refer to SLQS Row as $\Delta \mathrm { E }$ because it measures the entropy difference of context distributions. For SLQS Sub, the number of top context words is fixed as 100.
150
+
151
+ Although effective at measuring diversity, the entropy totally ignores the frequency signal from the corpus. To leverage the information, we measure the generality of a word by its L1 norm $( | \mathbf { w } _ { p } | _ { 1 } )$ and L2 norm $( | | \mathbf { w } _ { p } | | _ { 2 } )$ . Recall that Equation (2) indicates that the embedding of the hypernym $\mathbf { y }$ should have a larger value at every dimension than the embedding of the hyponym x. When the inclusion property holds, $\begin{array} { r } { | { \bf y } | _ { 1 } = \sum _ { i } { \bf y } [ i ] \geq \sum _ { i } { \bf x } [ i ] = | { \bf x } | _ { 1 } } \end{array}$ and similarly $| | \mathbf { y } | | _ { 2 } \geq | | \mathbf { x } | | _ { 2 }$ . Thus, we propose two scoring functions, difference of vector summation $( | \mathbf { w } _ { p } | _ { 1 } - | \mathbf { w } _ { q } | _ { 1 } )$ and the difference of vector 2-norm $( | | \mathbf { \bar { w } } _ { p } | | _ { 2 } - | | \mathbf { w } _ { q } | | _ { 2 } )$ . Notice that when applying the difference of vector summations (denoted as $\Delta S$ ) to SBOW Freq, it is equivalent to computing the word frequency difference between the hypernym candidate pair.
152
+
153
+ # 5.1.3 COMBINATION
154
+
155
+ The combination of 2 similarity functions (Cosine and Word2vec) and the 3 generality functions (difference of entropy, summation, and 2-norm of vectors) leads to six different scoring functions as shown in Table 2, and ${ \bf C } { \cdot } { \Delta } { \cal S }$ is the same scoring function we used in Experiment 1. It should be noted that if we use skip-grams with negative sampling (word2vec) as the similarity measurement (i.e., $W \cdot \Delta \ \{ \mathrm { E } , \mathrm { S } , \mathrm { Q } \} ,$ ), the scores are determined by two embedding/feature spaces together (word2vec and DIVE/SBOW).
156
+
157
+ # 5.1.4 INCLUSION
158
+
159
+ Several scoring functions are proposed to measure inclusion properties of SBOW based on DIH. Weeds Precision (Weeds & Weir, 2003) and CDE (Clarke, 2009) both measure the magnitude of the intersection between feature vectors $( | \mathbf { w } _ { p } \cap \mathbf { w } _ { q } | )$ . For example, ${ \bf w } _ { p } \cap { \bf w } _ { q }$ is defined by the elementwise minimum in CDE. Then, both scoring functions divide the intersection by the magnitude of the potential hyponym vector $( | \mathbf { w } _ { q } | )$ . invCL (Lenci & Benotto, 2012) (A variant of CDE) is also tested.
160
+
161
+ We choose these 3 functions because they have been shown to detect hypernymy well in a recent study (Santus et al., 2017). However, it is hard to confirm that their good performances come from the inclusion property between context distributions — it is also possible that the context vectors of more general words have higher chance to overlap with all other words due to their high frequency. For instance, considering a one dimension feature which stores only the frequency of words, the naive embedding could still have reasonable performance on the CDE function, but the embedding in fact only memorizes the general words without modeling relations between words (Levy et al., 2015b) and loses lots of inclusion signals in the word co-occurrence statistics.
162
+
163
+ Table 2: Micro average AP@all $( \% )$ of 10 datasets using different scoring functions. The feature space is SBOW using word frequency.
164
+
165
+ <table><tr><td>Word2vec (W) 24.8</td><td>Cosine (C) 26.7</td><td>SLQS Sub 27.4</td><td>SLQS Row (△E) 27.6</td><td>Summation (△S) 31.5</td><td>Two norm (△Q) 31.2</td></tr><tr><td>W.△E</td><td>C.△E</td><td>W.△S</td><td>C.△S</td><td>W.△Q</td><td>C.△Q</td></tr><tr><td>28.8</td><td>29.5</td><td>31.6</td><td>31.2</td><td>31.4</td><td>31.1</td></tr><tr><td>Weeds</td><td>CDE</td><td>invCL</td><td>Asymmetric L1(AL1)</td><td></td><td></td></tr><tr><td>19.0</td><td>31.1</td><td>30.7</td><td>28.2</td><td></td><td></td></tr></table>
166
+
167
+ In order to measure the inclusion property without the interference of the word frequency signal from the SBOW or embeddings, we propose a new measurement called asymmetric $L _ { 1 }$ distance. We first get context distributions ${ \bf d } _ { p }$ and ${ \bf d } _ { q }$ by normalizing $\mathbf { w } _ { p }$ and ${ \bf w } _ { q }$ , respectively. Ideally, the context distribution of the hypernym ${ \bf d } _ { p }$ will include ${ \bf d } _ { q }$ . This suggests the hypernym distribution ${ \bf d } _ { p }$ is larger than context distribution of the hyponym with a proper scaling factor $a \mathbf { d } _ { q }$ (i.e., $\operatorname* { m a x } ( a \mathbf { d } _ { q } \bar { - }$ ${ \bf d } _ { p } , 0 )$ should be small). Furthermore, both distributions should be similar, so $a \mathbf { d } _ { q }$ should not be too different from ${ \bf d } _ { p }$ (i.e., $\operatorname* { m a x } ( \mathbf { d } _ { p } - a \mathbf { d } _ { q } , 0 )$ should also be small). Therefore, we define asymmetric L1 distance as
168
+
169
+ $$
170
+ A L _ { 1 } = \operatorname* { m i n } _ { a } \sum _ { c } w _ { 0 } \cdot \operatorname* { m a x } ( a \mathbf { d } _ { q } [ c ] - \mathbf { d } _ { p } [ c ] , 0 ) + \operatorname* { m a x } ( \mathbf { d } _ { p } [ c ] - a \mathbf { d } _ { q } [ c ] , 0 ) ,
171
+ $$
172
+
173
+ where $w _ { 0 }$ is a constant which emphasizes the inclusion penalty. If $w _ { 0 } ~ = ~ 1$ and $a \ = \ 1$ , $A L _ { 1 }$ is equivalent to L1 distance. The lower $A L _ { 1 }$ distance implies a higher chance of observing the hypernym relation. We tried $w _ { 0 } = 5$ and $w _ { 0 } = 2 0$ . $w _ { 0 } = 2 0$ produces a worse micro-average AP@all on SBOW Freq, SBOW PPMI and DIVE, so we fix $w _ { 0 }$ to be 5 in all experiments. An efficient way to solve the optimization in $A L _ { 1 }$ is presented in the supplementary materials.
174
+
175
+ # 5.2 RESULTS AND DISCUSSIONS
176
+
177
+ We show the micro average $\mathbf { A P } @$ all on 10 datasets using different hypernymy scoring functions in Table 2. We can see the combination functions such as ${ \bf C } { \cdot } { \Delta } { \cal S }$ and ${ \bf W } { \cdot } { \Delta } { \cal S }$ perform the best overall. Among the unnormalized inclusion based scoring functions, CDE works the best. $A L _ { 1 }$ performs well compared with other functions which remove the frequency signal such as Word2vec, Cosine, and SLQS Row. The summation is the most robust generality measurement. In the table, the scoring functions are applied to SBOW Freq, but the performances of hypernymy scoring functions on the other feature spaces (e.g. DIVE) have a similar trend.
178
+
179
+ # 6 EXPERIMENT 3: COMPARISON WITH SBOW
180
+
181
+ # 6.1 COMPARISON WITH PREVIOUSLY REPORTED RESULTS
182
+
183
+ In Table 3, DIVE with two of the best scoring functions $C { \cdot } \Delta s$ and ${ \bf W } { \cdot } { \Delta S }$ ) is compared with the previous unsupervised state-of-the-art approaches based on SBOW on different datasets.
184
+
185
+ There are several reasons which might cause the large performance gaps in some datasets. In addition to the effectiveness of DIVE, some improvements come from our proposed scoring functions. The fact that every paper uses a different training corpus also affects the performances. Furthermore, Santus et al. (2017) select the scoring functions and feature space for the first 4 datasets based on $\mathbf { A P } @ 1 0 0$ , which we believe is too sensitive to the hyper-parameter settings of different methods. To isolate the impact of each factor, we perform a more comprehensive comparison next.
186
+
187
+ # 6.2 PERFORMANCE ANALYSIS
188
+
189
+ In this experiment, we examine whether DIVE successfully preserves the signals for hypernymy detection tasks, which are measured by the same scoring functions designed for SBOW. Summation difference $( \Delta \boldsymbol { S } )$ and CDE perform the best among generality and inclusion functions in Table 2,
190
+
191
+ Table 3: Comparison with previous methods based on sparse bag of word (SBOW). All values are percentages. The results of invCL (Lenci & Benotto, 2012), APSyn (Santus et al., 2016), and CDE (Clarke, 2009) are selected because they have the best $\mathbf { A P } @ 1 0 0$ in the first 4 datasets (Santus et al., 2017). Cosine similarity (Levy et al., 2015b), balAPinc (Kotlerman et al., 2010) in 3 datasets (Turney & Mohammad, 2015), SLQS (Santus et al., 2014) in HyperNet dataset (Shwartz et al., 2016), and Freq ratio (FR) (Vulic et al., 2016) are compared. ´
192
+
193
+ <table><tr><td rowspan=1 colspan=1>Dataset</td><td rowspan=1 colspan=2>BLESS EVALution</td><td rowspan=1 colspan=1>LenciBenotto</td><td rowspan=1 colspan=1>Weeds</td><td rowspan=1 colspan=1>Medical</td></tr><tr><td rowspan=1 colspan=1>Metric</td><td rowspan=1 colspan=4>AP@all</td><td rowspan=1 colspan=1>F1</td></tr><tr><td rowspan=2 colspan=1>Baselines</td><td rowspan=1 colspan=2>invCL</td><td rowspan=1 colspan=1>APSyn</td><td rowspan=1 colspan=1>CDE</td><td rowspan=1 colspan=1>Cosine</td></tr><tr><td rowspan=1 colspan=1>5.1</td><td rowspan=1 colspan=1>35.3</td><td rowspan=1 colspan=1>38.2</td><td rowspan=1 colspan=1>44.1</td><td rowspan=1 colspan=1>23.1</td></tr><tr><td rowspan=1 colspan=1>DIVE+C·△S</td><td rowspan=1 colspan=1>16.3</td><td rowspan=1 colspan=1>33.0</td><td rowspan=1 colspan=1>50.4</td><td rowspan=1 colspan=1>65.5</td><td rowspan=1 colspan=1>25.3</td></tr><tr><td rowspan=1 colspan=1>DIVE +W·△S</td><td rowspan=1 colspan=1>18.6</td><td rowspan=1 colspan=1>32.3</td><td rowspan=1 colspan=1>51.5</td><td rowspan=1 colspan=1>68.6</td><td rowspan=1 colspan=1>25.7</td></tr><tr><td rowspan=1 colspan=1>Dataset</td><td rowspan=1 colspan=1>LEDS</td><td rowspan=1 colspan=1>TM14</td><td rowspan=1 colspan=1>Kotlerman 2010</td><td rowspan=1 colspan=1>HyperNet</td><td rowspan=1 colspan=1>HyperLex</td></tr><tr><td rowspan=1 colspan=1>Metric</td><td rowspan=1 colspan=2>AP@all</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>F1</td><td rowspan=1 colspan=1>Spearman p</td></tr><tr><td rowspan=2 colspan=1>Baselines</td><td rowspan=1 colspan=3>balAPinc</td><td rowspan=1 colspan=1>SLQS</td><td rowspan=1 colspan=1>Freq ratio</td></tr><tr><td rowspan=1 colspan=1>73</td><td rowspan=1 colspan=1>56</td><td rowspan=1 colspan=1>37</td><td rowspan=1 colspan=1>22.8</td><td rowspan=1 colspan=1>27.9</td></tr><tr><td rowspan=1 colspan=1>DIVE+C·△S</td><td rowspan=1 colspan=1>83.5</td><td rowspan=1 colspan=1>57.2</td><td rowspan=1 colspan=1>36.6</td><td rowspan=1 colspan=1>41.9</td><td rowspan=1 colspan=1>32.8</td></tr><tr><td rowspan=1 colspan=1>DIVE+W·△S</td><td rowspan=1 colspan=1>86.4</td><td rowspan=1 colspan=1>57.3</td><td rowspan=1 colspan=1>37.4</td><td rowspan=1 colspan=1>38.6</td><td rowspan=1 colspan=1>33.3</td></tr></table>
194
+
195
+ respectively. $A L _ { 1 }$ could be used to examine the inclusion properties after removing the frequency signal. Therefore, we will present the results using these 3 scoring functions, along with ${ \bf W } { \cdot } { \Delta } S$ and ${ \bf C } { \cdot } { \Delta } { \cal S }$ .
196
+
197
+ # 6.2.1 BASELINES
198
+
199
+ In addition to classic representations such as SBOW Freq and SBOW PPMI, we compare distributional inclusion vector embedding (DIVE) with additional 4 baselines in Table 4.
200
+
201
+ • SBOW PPMI with additional frequency weighting (PPMI w/ FW). Specifically, $\mathbf { w } [ c ] =$ $\begin{array} { r } { \operatorname* { m a x } ( \log ( \frac { P ( w , c ) } { P ( w ) * P ( c ) * \frac { Z } { \# ( w ) } } ) , 0 ) } \end{array}$ . This forms the matrix reconstructed by DIVE when $k = 1$ .
202
+ • DIVE without the PMI filter (DIVE w/o PMI)
203
+ • NMF on shifted PMI: Non-negative matrix factorization (NMF) on the shifted PMI without frequency weighting for DIVE (DIVE w/o FW). This is the same as applying the nonnegative constraint on the skip-gram model.
204
+ K-means (Freq NMF): The method first uses Mini-batch $\mathbf { k }$ -means (Sculley, 2010) to cluster words in skip-gram embedding space into 100 topics, and hashes each frequency count in SBOW into the corresponding topic. If running $\mathbf { k }$ -means on skip-grams is viewed as an approximation of clustering the SBOW context vectors, the method can be viewed as a kind of NMF (Ding et al., 2005). Let the $N \times N$ context matrix be denoted as $M _ { c }$ , where the $( i , j )$ th element stores the count of word $j$ appearing beside word $i$ . K-means hashing creates a $N \times 1 0 0$ matrix $G$ with orthonormal rows $\tilde { G } ^ { T } G = I )$ , where the $( i , k )$ th element is 0 if the word $i$ does not belong to cluster $k$ . The orthonormal $G$ is also an approximated solution of a type of NMF $( M _ { c } \overset { \mathbf { \backsimeq } } { \approx } F G ^ { T }$ ) (Ding et al., 2005). Hashing context vectors into topic vectors can be written as $M _ { c } G \approx F G ^ { T } G = F$ .
205
+
206
+ In the experiment, we also tried to apply a constant $\log ( k )$ shifting to SBOW PPMI (i.e. $\operatorname* { m a x } ( P M I - \log ( k ) , 0 ) )$ ). We found that the performance degrades as $k$ increases. Similarly, applying PMI filter to SBOW PPMI (set context feature to be 0 if the value is lower than $\log ( k _ { f } ) )$ usually makes the performances worse, especially when $k _ { f }$ is large. Applying PMI filter to SBOW Freq only makes its performances closer to (but still much worse than) SBOW PPMI, so we omit this baseline as well.
207
+
208
+ # 6.2.2 RESULTS AND DISCUSSIONS
209
+
210
+ In Table 4, we first confirm the finding of the previous review study of Santus et al. (2017): there is no single hypernymy scoring function which always outperforms others. One of the main reasons is that different datasets collect negative samples differently. This is also why we evaluate our method on many datasets to make sure our conclusions hold in general. For example, if negative samples come from random word pairs (e.g. WordNet dataset), a symmetric similarity measure is already a pretty good scoring function. On the other hand, negative samples come from related or similar words in HyperNet, EVALution, Lenci/Benotto, and Weeds, so only computing generality difference leads to the best (or close to the best) performance. The negative samples in many datasets are composed of both random samples and similar words (such as BLESS), so the combination of similarity and generality difference yields the most stable results.
211
+
212
+ Table 4: $\mathbf { A P } @$ all $( \% )$ of 10 datasets. The box at lower right corner compares the micro average AP across all 10 datasets. Numbers in different rows come from different feature or embedding spaces. Numbers in different columns come from different datasets and unsupervised scoring functions. We also present the micro average AP across the first 4 datasets (BLESS, EVALution, Lenci/Benotto and Weeds). All wiki means SBOW using PPMI features trained on the whole WaCkypedia. FW refers to frequency weighting on the shifted PMI matrix.
213
+
214
+ <table><tr><td rowspan="2" colspan="2">AP@all(%)</td><td colspan="5">BLESS</td><td colspan="4">EVALution</td><td colspan="5">Lenci/Benotto</td></tr><tr><td>CDE</td><td>AL1</td><td>△S</td><td>W△S</td><td>C△S</td><td>CDE AL1</td><td>△S</td><td>W△S</td><td>C△S</td><td>CDE</td><td>AL1</td><td>△S</td><td>W△S</td><td>C△S</td></tr><tr><td rowspan="4">SBOW</td><td>Freq</td><td>6.3</td><td>7.3 5.6 5.6</td><td>11.0 17.2</td><td>5.9 15.3</td><td>35.3 30.4</td><td>32.6 27.7</td><td>36.2</td><td>33.0</td><td>36.3</td><td>51.8</td><td>47.6</td><td>51.0</td><td>51.8</td><td>51.1</td></tr><tr><td>PPMI</td><td>13.6</td><td>5.1</td><td></td><td></td><td></td><td>27.5</td><td>34.1</td><td>31.9</td><td>34.3</td><td>47.2</td><td>39.7</td><td>50.8</td><td>51.1</td><td>52.0</td></tr><tr><td>PPMI w/FW</td><td>6.2</td><td>5.0</td><td>5.5 12.4</td><td></td><td>5.8</td><td>36.0</td><td>36.3</td><td>32.9</td><td>36.4</td><td>52.0</td><td>43.1</td><td>50.9</td><td>51.9</td><td>50.7</td></tr><tr><td>All wiki</td><td>12.1</td><td>5.2</td><td>6.9 12.5</td><td></td><td>13.4 28.5</td><td>27.1</td><td>30.3</td><td>29.9</td><td>31.0</td><td>47.1</td><td>39.9</td><td>48.5</td><td>48.7</td><td>51.1</td></tr><tr><td rowspan="3">DIVE</td><td>Full</td><td>9.3</td><td>7.6 6.0 5.6</td><td>18.6</td><td>16.3</td><td>30.0</td><td>27.5</td><td>34.9</td><td>33.0</td><td>46.7</td><td>43.2</td><td>51.3</td><td>51.5</td><td>50.4</td><td></td></tr><tr><td>w/o PMI</td><td>7.8</td><td>6.9</td><td>16.7</td><td>7.1</td><td>32.8</td><td>32.2</td><td>35.7</td><td>32.3 32.5</td><td>35.4</td><td>47.6</td><td>44.9</td><td>50.9</td><td>51.6</td><td>49.7</td></tr><tr><td>w/o FW</td><td>9.0</td><td>6.2</td><td>6.2</td><td>7.3</td><td>24.3</td><td>25.0</td><td>22.9</td><td>23.5</td><td>23.9</td><td>38.8</td><td>38.1</td><td>38.2</td><td>38.2</td><td>38.4</td></tr><tr><td>Kmean (Freq NMF)</td><td></td><td>6.5</td><td>7.3 5.6</td><td>10.9</td><td>5.8</td><td>33.7</td><td>27.2</td><td>36.2</td><td>33.0</td><td>36.2</td><td>49.6</td><td>42.5</td><td>51.0</td><td>51.8</td><td>51.2</td></tr><tr><td colspan="2"></td><td colspan="4">7.3 Weeds</td><td colspan="4">Micro Average (4 datasets)</td><td></td><td colspan="4">Medical</td><td></td></tr><tr><td colspan="2">AP@all(%)</td><td>CDE AL1</td><td colspan="3">△S</td><td>CDE</td><td colspan="3">AL1</td><td></td><td>CDE</td><td>AL1</td><td>△S</td><td>W·△S</td><td>C△S</td></tr><tr><td rowspan="5">SBOW</td><td>Freq</td><td>69.5</td><td>58.0 68.8</td><td>W△S 68.2</td><td>C△S 68.4</td><td>23.1</td><td>21.8</td><td>△S 22.9</td><td>W△S 25.0</td><td>C△S 23.0</td><td>19.4</td><td>19.2</td><td>14.1</td><td>18.4</td><td>15.3</td></tr><tr><td>PPMI</td><td>61.0</td><td>50.3</td><td>70.3</td><td>69.2</td><td>69.3</td><td>24.7 17.9</td><td>22.3</td><td>28.1</td><td>27.8</td><td>23.4</td><td>8.7</td><td>13.2</td><td>20.1</td><td>24.4</td></tr><tr><td>PPMI w/FW</td><td>67.6</td><td>52.2</td><td>69.4</td><td>68.7</td><td>67.7</td><td>23.2 18.2</td><td>22.9</td><td>25.8</td><td>22.9</td><td>22.8</td><td>10.6</td><td>13.7</td><td>18.6</td><td>17.0</td></tr><tr><td>All wiki</td><td>61.3</td><td>48.6</td><td>70.0</td><td></td><td>70.4</td><td>23.4</td><td></td><td></td><td>25.8</td><td>22.3</td><td>8.9</td><td>12.2</td><td>17.6</td><td>21.1</td></tr><tr><td>Full</td><td>59.2</td><td>55.0</td><td>68.5</td><td></td><td></td><td>17.7 19.8</td><td>21.7 22.8</td><td>24.6 28.9</td><td>27.6</td><td>11.7</td><td>9.3</td><td>13.7</td><td>21.4</td><td>19.2</td></tr><tr><td>DIVE w/o PMI</td><td>60.4</td><td>56.4</td><td>69.7 69.3</td><td>68.6 68.6</td><td>65.5 64.8</td><td>22.1 22.2</td><td>21.0</td><td></td><td>23.1</td><td>10.7</td><td>8.4</td><td>13.3</td><td>19.8</td><td></td><td>16.2</td></tr><tr><td rowspan="3"></td><td>w/o FW</td><td>49.2</td><td>47.3 45.1</td><td>45.1</td><td>44.9</td><td>18.9</td><td>17.3</td><td>22.7 17.2</td><td>28.0 16.8</td><td>17.5</td><td>10.9</td><td>9.8</td><td>7.4</td><td>7.6</td><td>7.7</td></tr><tr><td>Kmean (Freq NMF)</td><td>69.4</td><td>51.1 68.8</td><td>68.2</td><td>68.9</td><td>22.5</td><td>19.3</td><td>22.9</td><td>24.9</td><td>23.0</td><td>12.6</td><td>10.9</td><td>14.0</td><td>18.1</td><td>14.6</td></tr><tr><td></td><td></td><td>LEDS</td><td></td><td></td><td></td><td></td><td>TM14</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td colspan="2">AP@all(%)</td><td colspan="4">AL1 △S</td><td colspan="4">CDE AL1</td><td></td><td colspan="4">Kotlerman 2010</td><td></td></tr><tr><td colspan="2">SBOWFreq</td><td>CDE</td><td>70.4 70.7</td><td>W·△S 83.3</td><td>C△S 73.3</td><td>55.6</td><td>53.2</td><td>△S 54.9</td><td>W·△S 55.7</td><td>C.△S 55.0</td><td>CDE 35.9</td><td>AL1 40.5</td><td>△S 34.5</td><td>W.△S 37.0</td><td>C.△S 35.4</td></tr><tr><td colspan="2">SBOWPPMI</td><td>82.7 84.4</td><td>50.2 72.2</td><td>86.5</td><td>84.5</td><td>56.2</td><td>52.3</td><td>54.4</td><td></td><td>57.6</td><td>39.1</td><td>30.9</td><td>33.0</td><td>37.0</td><td>36.3</td></tr><tr><td colspan="2">All wiki</td><td>83.1</td><td>49.7 67.9</td><td>82.9</td><td>81.4</td><td>54.7</td><td>50.5</td><td>52.6</td><td>57.0 55.1</td><td>54.9</td><td>38.5</td><td>31.2</td><td>32.2</td><td>35.4</td><td>35.3</td></tr><tr><td colspan="2">DIVE</td><td>83.3</td><td>72.7</td><td>86.4</td><td>83.5</td><td>55.3</td><td>52.6</td><td>55.2</td><td>57.3</td><td>57.2</td><td>35.3</td><td>31.6</td><td>33.6</td><td>37.4</td><td>36.6 MicroAverage(10datasets)</td></tr><tr><td colspan="2">AP@all (%)</td><td>74.7</td><td>HyperNet</td><td></td><td></td><td></td><td></td><td>WordNet</td><td></td><td></td></table>
215
+
216
+ DIVE performs similar or better on all the scoring functions compared with SBOW consistently across all datasets in Table 4, while using many fewer dimensions (see Table 6). Its results on combination scoring functions outperform SBOW Freq. Meanwhile, its results on $A L _ { 1 }$ outperform SBOW PPMI. The fact that combination scoring functions (i.e., W·∆S or $\mathbf { C } { \cdot } \Delta \mathbf { S }$ ) usually outperform generality functions suggests that only memorizing general words is not sufficient. The best average performance on 4 and 10 datasets are both produced by ${ \bf W } { \cdot } { \Delta } { \cal S }$ on DIVE.
217
+
218
+ SBOW PPMI improves the combination functions from SBOW Freq but sacrifices AP on the inclusion functions. It generally hurts performance to change the frequency sampling of PPMI (PPMI w/ FW) or compute SBOW PPMI on the whole WaCkypedia (all wiki) instead of the first 51.2 million tokens. The similar trend can also be seen in Table 5. Note that $A L _ { 1 }$ completely fails in HyperLex dataset using SBOW PPMI, which suggests that PPMI might not necessarily preserve the distributional inclusion property, even though it can have good performance on combination functions.
219
+
220
+ Removing the PMI filter from DIVE slightly drops the overall precision while removing frequency weights on shifted PMI (w/o FW) leads to poor performances. K-means (Freq NMF) produces similar AP compared with SBOW Freq, but has worse $A L _ { 1 }$ scores. Its best AP scores on different datasets are also significantly worse than the best AP of DIVE. This means that only making word2vec (skip-grams with negative sampling) non-negative or naively accumulating topic distribution in contexts cannot lead to satisfactory embeddings.
221
+
222
+ Table 5: Spearman $\rho \left( \% \right)$ in HyperLex.
223
+
224
+ <table><tr><td rowspan="2">Spearman p (%)</td><td colspan="5">HyperLex</td></tr><tr><td>CDE</td><td>AL1</td><td>△S</td><td>W·△S</td><td>C.△S</td></tr><tr><td>SBOWFreq</td><td>31.7</td><td>19.6</td><td>27.6</td><td>29.6</td><td>27.3</td></tr><tr><td>SBOW PPMI</td><td>28.1</td><td>-2.3</td><td>31.8</td><td>34.3</td><td>34.5</td></tr><tr><td>All wiki</td><td>25.3</td><td>-2.2</td><td>28.0</td><td>30.5</td><td>31.0</td></tr><tr><td>DIVE</td><td>28.9</td><td>18.7</td><td>31.2</td><td>33.3</td><td>32.8</td></tr></table>
225
+
226
+ Table 6: The average number of non-zero dimensions across all testing words in 10 datasets.
227
+
228
+ <table><tr><td rowspan=1 colspan=1>SBOW Freq</td><td rowspan=1 colspan=1>SBOWPPMI</td><td rowspan=1 colspan=1>DIVE</td></tr><tr><td rowspan=1 colspan=1>5799</td><td rowspan=1 colspan=1>3808</td><td rowspan=1 colspan=1>20</td></tr></table>
229
+
230
+ Table 7: Spectral clustering on the non-zero DIVE dimensions of the query word. When the number of clusters is set to be 2, we present the top 4 dimensions in each cluster, which have the highest values on the query word embedding. Otherwise, the top 2 dimensions are presented. CID refers to cluster ID. The top 5 words with the highest values of each dimension are presented.
231
+
232
+ <table><tr><td>Query</td><td>CID</td><td colspan="2">Top 5 words in the top dimensions</td></tr><tr><td rowspan="2">rock</td><td>1</td><td>element,gas,atom,rock,carbon find, specie,species,animal,bird</td><td>sea,lake,river,area,water point,side,line, front,circle</td></tr><tr><td>2</td><td>band,song,album,music,rock early,work,century,late,begin</td><td>write,john,guitar,band,author include,several, show, television,film</td></tr><tr><td rowspan="2">bank</td><td>1</td><td>county,area,city, town,west building,build,house, palace, site</td><td>several,main, province, include,consist sea,lake,river,area,water</td></tr><tr><td>2</td><td>money, tax,price, pay, income united, states,country, world, europe</td><td>company,corporation,system,agency, service state,palestinian,israel,right, palestine</td></tr><tr><td rowspan="2">apple</td><td>1</td><td>food, fruit,vegetable,meat, potato war,german,ii,germany,world</td><td>goddess,zeus,god,hero,sauron write, john,guitar,band,author</td></tr><tr><td>2</td><td>version, game,release,original, file system,architecture,develop,base,language</td><td>car,company,sell, manufacturer,model include,several, show, television,film</td></tr><tr><td rowspan="2">star</td><td>1</td><td>film, role, production, play, stage wear,blue,color, instrument,red</td><td>character,series,game,novel, fantasy write, john,guitar,band,author</td></tr><tr><td>2</td><td>element,gas,atom,rock,carbon give, term,vector,mass,momentum</td><td>star,orbit,sun,orbital,planet light, image,lens,telescope,camera</td></tr><tr><td rowspan="2">tank</td><td>1</td><td>tank,cylinder,wheel, engine,steel acid,carbon,product, use, zinc</td><td>industry, export, industrial, economy,company network,user,server, datum, protocol</td></tr><tr><td>2</td><td>army,force,infantry,military,battle however,attempt,result, despite, fail</td><td>aircraft,navy,missile,ship,flight war, german, ii, germany, world</td></tr><tr><td rowspan="3">race</td><td>1</td><td>win,world,cup,play,championship</td><td>two,one,three,four,another</td></tr><tr><td>2 3</td><td>railway, line, train,road, rail</td><td>car,company, sell, manufacturer,model</td></tr><tr><td></td><td>population,language, ethnic, native, people</td><td>female,age,woman,male,household</td></tr><tr><td rowspan="3">run</td><td>1</td><td>system,architecture, develop,base,language</td><td>access, need, require,allow, program</td></tr><tr><td>2</td><td>railway,line,train,road,rail</td><td>also,well, several, early, see</td></tr><tr><td>3</td><td>game,team,season,win,league</td><td>game,player,run,deal,baseball</td></tr><tr><td rowspan="3">tablet</td><td>1</td><td>bc, source, greek, ancient, date</td><td>book,publish,write,work,edition</td></tr><tr><td>2</td><td>use,system,design,term,method</td><td>version, game,release,original, file</td></tr><tr><td>3</td><td>system,blood,vessel,artery,intestine</td><td>patient, symptom, treatment,disorder, may</td></tr></table>
233
+
234
+ # 7 EXPERIMENT 4: WORD SENSE DISAMBIGUATION
235
+
236
+ In addition to hypernymy detection, Athiwaratkun & Wilson (2017) show that the mixture of Gaussian distributions can also be used to discover multiple senses of each word. In our qualitative experiment, we show that DIVE can achieve the similar goal without fixing the number of senses before training the embedding.
237
+
238
+ Recall that each dimension roughly corresponds to one topic. Given a query word, the higher embedding value on a dimension implies higher likelihood to observe the word in the context of the topic. The embedding of a polysemy would have high values on different groups of topics/dimensions. This allows us to discover the senses by clustering the topics/dimensions of the polysemy. We use the embedding values as the feature each dimension, compute the pairwise similarity between dimensions, and apply spectral clustering (Stella & Shi, 2003) to group topics as shown in the Table 7. See more implementation details in the supplementary materials.
239
+
240
+ In the word sense disambiguation tasks, it is usually challenging to determine how many senses/clusters each word should have. Many existing approaches fix the number of senses before training the embedding (Tian et al., 2014; Athiwaratkun & Wilson, 2017). Neelakantan et al. (2014) make the number of clusters approximately proportional to the diversity of the context, but the assumption does not always hold. Furthermore, the training process cannot capture different granularity of senses. For instance, race in the car context could share the same sense with the race in the game topic because they all mean contest, but the race in the car context actually refers to the specific contest of speed. Therefore, they can also be viewed as separate senses (like the results in Table 7). This means the correct number of clusters is not unique, and the methods, which fixes the cluster numbers, need to re-train the embedding many times to capture such granularity.
241
+
242
+ In our approach, clustering dimensions is done after the training process of DIVE is completed, so it is fairly efficient to change the cluster numbers and hierarchical clustering is also an option. Similar to our method, Pelevina et al. (2016) also discover word senses by graph-based clustering. The main difference is that they cluster the top $n$ words which are most related to the query word instead of topics. However, choosing the hyper-parameter $n$ is difficult. Large $n$ would make graph clustering algorithm inefficient, while small $n$ would make less frequent senses difficult to discover.
243
+
244
+ # 8 RELATED WORK
245
+
246
+ Most previous unsupervised approaches focus on designing better hypernymy scoring functions for sparse bag of word (SBOW) features. They are well summarized in the recent study (Santus et al., 2017). Santus et al. (2017) also evaluate the influence of different contexts, such as changing the window size of contexts or incorporating dependency parsing information, but neglect scalability issues inherent to SBOW methods.
247
+
248
+ A notable exception is the Gaussian embedding model (Vilnis & McCallum, 2015). The context distribution of each word is encoded as a multivariate Gaussian distribution, where the embeddings of hypernyms tend to have higher variance and overlap with the embedding of their hyponyms. However, since a Gaussian distribution is normalized, it is difficult to retain frequency information during the embedding process, and experiments on HyperLex (Vulic et al., 2016) demonstrate that a simple ´ baseline only relying on word frequency can achieve good results. Follow-up work models contexts by a mixture of Gaussians (Athiwaratkun & Wilson, 2017) relaxing the unimodality assumption but achieves little improvement on hypernym detection tasks.
249
+
250
+ Kiela et al. (2015) show that images retrieved by a search engine can be a useful source of information to determine the generality of lexicons, but the resources might not be available for some corpora such as scientific literature.
251
+
252
+ Order embedding (Vendrov et al., 2016) is a supervised approach to encode many annotated hypernym pairs (e.g. all of the whole WordNet (Miller, 1995)) into a compact embedding space, where the embedding of a hypernym should be smaller than the embedding of its hyponym in every dimension. Our method learns embedding from raw text, where a hypernym embedding should be larger than the embedding of its hyponym in every dimension. Thus, DIVE can be viewed as an unsupervised and reversed form of order embedding.
253
+
254
+ Other semi-supervised hypernym detection methods aim to generalize from sets of annotated word pairs using raw text corpora. The goal of HyperScore (Nguyen et al., 2017) is similar to our model: the embedding of a hypernym should be similar to its hyponym but with higher magnitude. However, their training process relies heavily on annotated hypernym pairs, and the performance drops significantly when reducing the amount of supervision. In addition to context distributions, previous work also leverages training data to discover useful text pattern indicating is-a relation (Shwartz et al., 2016; Roller & Erk, 2016), but it remains challenging to increase recall of hypernym detection because commonsense facts like cat is-a animal might not appear in the corpus.
255
+
256
+ Non-negative matrix factorization (NMF) has a long history in NLP, for example in the construction of topic models (Pauca et al., 2004). Non-negative sparse embedding (NNSE) (Murphy et al., 2012) and Faruqui et al. (2015) indicate that non-negativity can make embeddings more interpretable and improve word similarity evaluations. The sparse NMF is also shown to be effective in cross-lingual lexical entailment tasks but does not necessarily improve monolingual hypernymy detection (Vyas &
257
+
258
+ Carpuat, 2016). In our study, a new type of NMF is proposed, and the comprehensive experimental analysis demonstrates its state-of-the-art performances on unsupervised hypernymy detection.
259
+
260
+ # 9 CONCLUSIONS
261
+
262
+ Compressing unsupervised SBOW models into a compact representation is challenging while preserving the inclusion, generality, and similarity signals which are important for hypernym detection. Our experiments suggest that simple baselines such as accumulating K-mean clusters and non-negative skip-grams do not lead to satisfactory performances in this task.
263
+
264
+ To achieve this goal, we proposed an interpretable and scalable embedding method called distributional inclusion vector embedding (DIVE) by performing non-negative matrix factorization (NMF) on a weighted PMI matrix. We demonstrate that scoring functions which measure inclusion and generality properties in SBOW can also be applied to DIVE to detect hypernymy, and DIVE performs the best on average, slightly better than SBOW while using many fewer dimensions.
265
+
266
+ Our experiments also indicate that unsupervised scoring functions, which combine similarity and generality measurements, work the best in general, but no one scoring function dominates across all datasets. A combination of unsupervised DIVE with the proposed scoring functions produces new state-of-the-art performances on many datasets under the unsupervised setup.
267
+
268
+ Finally, a qualitative experiment shows that clusters of the topics discovered by DIVE often correspond to the word senses, which allow us to do word sense disambiguation without the need to know the number of senses before training the embeddings.
269
+
270
+ # REFERENCES
271
+
272
+ Ben Athiwaratkun and Andrew Gordon Wilson. Multimodal word distributions. In ACL, 2017.
273
+
274
+ Marco Baroni and Alessandro Lenci. How we BLESSed distributional semantic evaluation. In Workshop on GEometrical Models of Natural Language Semantics (GEMS), 2011.
275
+
276
+ Marco Baroni, Silvia Bernardini, Adriano Ferraresi, and Eros Zanchetta. The WaCky wide web: a collection of very large linguistically processed web-crawled corpora. Language resources and evaluation, 43(3):209–226, 2009.
277
+
278
+ Marco Baroni, Raffaella Bernardi, Ngoc-Quynh Do, and Chung-chieh Shan. Entailment above the word level in distributional semantics. In EACL, 2012.
279
+
280
+ Giulia Benotto. Distributional models for semantic relations: A study on hyponymy and antonymy. PhD Thesis, University of Pisa, 2015.
281
+
282
+ John A Bullinaria and Joseph P Levy. Extracting semantic representations from word co-occurrence statistics: A computational study. Behavior research methods, 39(3):510–526, 2007.
283
+
284
+ Philipp Cimiano, Andreas Hotho, and Steffen Staab. Learning concept hierarchies from text corpora using formal concept analysis. J. Artif. Intell. Res.(JAIR), 24(1):305–339, 2005.
285
+
286
+ Daoud Clarke. Context-theoretic semantics for natural language: an overview. In workshop on geometrical models of natural language semantics, pp. 112–119, 2009.
287
+
288
+ Thomas Demeester, Tim Rocktaschel, and Sebastian Riedel. Lifted rule injection for relation em- ¨ beddings. In EMNLP, 2016.
289
+
290
+ Chris Ding, Xiaofeng He, and Horst D Simon. On the equivalence of nonnegative matrix factorization and spectral clustering. In ICDM, 2005.
291
+
292
+ Manaal Faruqui, Yulia Tsvetkov, Dani Yogatama, Chris Dyer, and Noah Smith. Sparse overcomplete word vector representations. In ACL, 2015.
293
+
294
+ Maayan Geffet and Ido Dagan. The distributional inclusion hypotheses and lexical entailment. In ACL, 2005.
295
+
296
+ Goran Glavas and Simone Paolo Ponzetto. Dual tensor model for detecting asymmetric lexico- ˇ semantic relations. In EMNLP, 2017.
297
+
298
+ Zhiheng Huang, Marcus Thint, and Zengchang Qin. Question classification using head words and their hypernyms. In EMNLP, 2008.
299
+
300
+ Douwe Kiela, Laura Rimell, Ivan Vulic, and Stephen Clark. Exploiting image generality for lexical entailment detection. In ACL, 2015.
301
+
302
+ Diederik Kingma and Jimmy Ba. ADAM: A method for stochastic optimization. In ICLR, 2015.
303
+
304
+ Lili Kotlerman, Ido Dagan, Idan Szpektor, and Maayan Zhitomirsky-Geffet. Directional distributional similarity for lexical inference. Natural Language Engineering, 16(4):359–389, 2010.
305
+
306
+ Alessandro Lenci and Giulia Benotto. Identifying hypernyms in distributional semantic spaces. In SemEval, 2012.
307
+
308
+ Omer Levy and Yoav Goldberg. Neural word embedding as implicit matrix factorization. In NIPS, 2014.
309
+
310
+ Omer Levy, Ido Dagan, and Jacob Goldberger. Focused entailment graphs for open IE propositions. In CoNLL, 2014.
311
+
312
+ Omer Levy, Yoav Goldberg, and Ido Dagan. Improving distributional similarity with lessons learned from word embeddings. Transactions of the Association for Computational Linguistics, 3:211– 225, 2015a.
313
+
314
+ Omer Levy, Steffen Remus, Chris Biemann, and Ido Dagan. Do supervised distributional methods really learn lexical inference relations? In NAACL-HTL, 2015b.
315
+
316
+ Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. In NIPS, 2013.
317
+
318
+ George A. Miller. Wordnet: a lexical database for english. Communications of the ACM, 38(11): 39–41, 1995.
319
+
320
+ Brian Murphy, Partha Talukdar, and Tom Mitchell. Learning effective and interpretable semantic models using non-negative sparse embedding. COLING, pp. 1933–1950, 2012.
321
+
322
+ Eric Nalisnick and Sachin Ravi. Infinite dimensional word embeddings. arXiv preprint arXiv:1511.05392, 2015.
323
+
324
+ Arvind Neelakantan, Jeevan Shankar, Alexandre Passos, and Andrew McCallum. Efficient nonparametric estimation of multiple embeddings per word in vector space. In EMNLP, 2014.
325
+
326
+ Kim Anh Nguyen, Maximilian Koper, Sabine Schulte im Walde, and Ngoc Thang Vu. Hierarchical ¨ embeddings for hypernymy detection and directionality. In EMNLP, 2017.
327
+
328
+ Maximilian Nickel and Douwe Kiela. Poincare embeddings for learning hierarchical representa- ´ tions. In NIPS, 2017.
329
+
330
+ V. Paul Pauca, Farial Shahnaz, Michael W Berry, and Robert J. Plemmons. Text mining using non-negative matrix factorizations. In ICDM, 2004.
331
+
332
+ 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(Oct):2825–2830, 2011.
333
+
334
+ Maria Pelevina, Nikolay Arefyev, Chris Biemann, and Alexander Panchenko. Making sense of word embeddings. In Workshop on Representation Learning for NLP, 2016.
335
+
336
+ Simone Paolo Ponzetto and Michael Strube. Exploiting semantic role labeling, wordnet and wikipedia for coreference resolution. In ACL, 2006.
337
+
338
+ Stephen Roller and Katrin Erk. Relations such as hypernymy: Identifying and exploiting hearst patterns in distributional vectors for lexical entailment. In EMNLP, 2016.
339
+
340
+ Mark Sammons, V Vydiswaran, and Dan Roth. Recognizing textual entailment. Multilingual Natural Language Applications: From Theory to Practice. Prentice Hall, Jun, 2011.
341
+
342
+ Enrico Santus, Alessandro Lenci, Qin Lu, and Sabine Schulte Im Walde. Chasing hypernyms in vector spaces with entropy. In EACL, 2014.
343
+
344
+ Enrico Santus, Frances Yung, Alessandro Lenci, and Chu-Ren Huang. EVALution 1.0: an evolving semantic dataset for training and evaluation of distributional semantic models. In Workshop on Linked Data in Linguistics (LDL), 2015.
345
+
346
+ Enrico Santus, Tin-Shing Chiu, Qin Lu, Alessandro Lenci, and Chu-Ren Huang. Unsupervised measure of word similarity: how to outperform co-occurrence and vector cosine in vsms. arXiv preprint arXiv:1603.09054, 2016.
347
+
348
+ Enrico Santus, Vered Shwartz, and Dominik Schlechtweg. Hypernyms under siege: Linguisticallymotivated artillery for hypernymy detection. In EACL, 2017.
349
+
350
+ David Sculley. Web-scale k-means clustering. In WWW, 2010.
351
+
352
+ Vered Shwartz, Yoav Goldberg, and Ido Dagan. Improving hypernymy detection with an integrated path-based and distributional method. In ACL, 2016.
353
+
354
+ X Yu Stella and Jianbo Shi. Multiclass spectral clustering. In ICCV, 2003.
355
+
356
+ Fei Tian, Hanjun Dai, Jiang Bian, Bin Gao, Rui Zhang, Enhong Chen, and Tie-Yan Liu. A probabilistic model for learning multi-prototype word embeddings. In COLING, 2014.
357
+
358
+ Peter D Turney and Saif M Mohammad. Experiments with three approaches to recognizing lexical entailment. Natural Language Engineering, 21(3):437–476, 2015.
359
+
360
+ Ivan Vendrov, Ryan Kiros, Sanja Fidler, and Raquel Urtasun. Order-embeddings of images and language. In ICLR, 2016.
361
+
362
+ Luke Vilnis and Andrew McCallum. Word representations via gaussian embedding. In ICLR, 2015.
363
+
364
+ Ivan Vulic and Nikola Mrk ´ siˇ c. Specialising word vectors for lexical entailment. ´ arXiv preprint arXiv:1710.06371, 2017.
365
+
366
+ Ivan Vulic, Daniela Gerz, Douwe Kiela, Felix Hill, and Anna Korhonen. Hyperlex: A large-scale ´ evaluation of graded lexical entailment. arXiv preprint arXiv:1608.02117, 2016.
367
+
368
+ Yogarshi Vyas and Marine Carpuat. Sparse bilingual word representations for cross-lingual lexical entailment. In HLT-NAACL, 2016.
369
+
370
+ Julie Weeds and David Weir. A general framework for distributional similarity. In EMNLP, 2003.
371
+
372
+ Julie Weeds, Daoud Clarke, Jeremy Reffin, David Weir, and Bill Keller. Learning to distinguish hypernyms and co-hyponyms. In COLING, 2014.
373
+
374
+ Table 8: Comparison with semi-supervised embeddings (with limited training data). All values are percentages. The number in parentheses beside each approach indicates the number of annotated hypernymy word pairs used to train the model. Semi-supervised embeddings include HyperScore (Nguyen et al., 2017) and H-feature (Roller & Erk, 2016). When we compare F1 with the results from other papers, we use 20 fold cross validation to determine prediction thresholds, as done by Roller & Erk (2016). Note that HyperScore ignores POS in the testing data, so we follow the setup when comparing with it.
375
+
376
+ <table><tr><td rowspan=1 colspan=1>Dataset</td><td rowspan=1 colspan=1>HyperLex</td><td rowspan=1 colspan=3>EVALution LenciBenotto Weeds</td><td rowspan=1 colspan=1>Medical</td></tr><tr><td rowspan=1 colspan=1>Metric</td><td rowspan=1 colspan=1>Spearman p</td><td rowspan=1 colspan=3>AP@all</td><td rowspan=1 colspan=1>F1</td></tr><tr><td rowspan=2 colspan=1>Baselines(#Training Hypernymy)</td><td rowspan=1 colspan=4>HyperScore(1337)</td><td rowspan=1 colspan=1>H-feature (897)</td></tr><tr><td rowspan=1 colspan=1>30</td><td rowspan=1 colspan=1>39</td><td rowspan=1 colspan=1>44.8</td><td rowspan=1 colspan=1>58.5</td><td rowspan=1 colspan=1>26</td></tr><tr><td rowspan=1 colspan=1>DIVE+C·△S (0)</td><td rowspan=1 colspan=1>34.5</td><td rowspan=1 colspan=1>33.8</td><td rowspan=1 colspan=1>52.9</td><td rowspan=1 colspan=1>70.0</td><td rowspan=1 colspan=1>25.3</td></tr></table>
377
+
378
+ Table 9: We show the top 30 words with the highest embedding magnitude after dot product with the query embedding $\mathbf { q }$ (i.e. showing w such that $| \mathbf { w } ^ { T } \mathbf { q } | _ { 1 }$ is one of the top 30 highest values). The rows with the empty query word sort words based on $| \mathbf { w } | _ { 1 }$ .
379
+
380
+ <table><tr><td>Query</td><td colspan="6">Top30 generalwords</td></tr><tr><td></td><td>use large american design study</td><td>name state life work lead</td><td>system group may produce type</td><td>include power small control people</td><td>base death find great high</td><td>city form body write create</td></tr><tr><td>species</td><td>specie human gene fish evidence</td><td>species bird tree disease breed</td><td>animal genus name live protein</td><td>find family genetic food wild</td><td>plant organism study cell similar</td><td>may suggest occur mammal fossil</td></tr><tr><td>system</td><td>system standard allow process network</td><td>use type function code file</td><td>design computer datum via development</td><td>provide application device base service</td><td>operate develop control program transport</td><td>model method information software law</td></tr></table>
381
+
382
+ # A SUPPLEMENTARY MATERIALS
383
+
384
+ # A.1 COMPARISON WITH SEMI-SUPERVISED EMBEDDINGS
385
+
386
+ In addition to the unsupervised approach, we also compare DIVE with semi-supervised approaches. When there are sufficient training data, there is no doubt that the semi-supervised embedding approaches such as HyperNet (Shwartz et al., 2016), H-feature detector (Roller & Erk, 2016), and HyperScore (Nguyen et al., 2017) can achieve better performance than all unsupervised methods. However, in many domains such as scientific literature, there are often not many annotated hypernymy pairs (e.g. Medical dataset (Levy et al., 2014)).
387
+
388
+ Since we are comparing an unsupervised method with semi-supervised methods, it is hard to fairly control the experimental setups and tune the hyper-parameters. In Table 8, we only show several performances which are copied from the original paper when training data are limited3. As we can see, the performance from DIVE is roughly comparable to the previous semi-supervised approaches trained on small amount of hypernym pairs. This demonstrates the robustness of our approach and the difficulty of generalizing hypernymy annotations with semi-supervised approaches.
389
+
390
+ # A.2 GENERALITY ESTIMATION AND HYPERNYM DIRECTIONALITY DETECTION
391
+
392
+ In Table 9, we show the most general words in DIVE under different queries as constraints. We also present the accuracy of judging which word is a hypernym (more general) given word pairs with
393
+
394
+ Table 10: Accuracy $( \% )$ of hypernym directionality prediction across 10 datasets.
395
+
396
+ <table><tr><td rowspan=1 colspan=4>Micro Average (1O datasets)</td></tr><tr><td rowspan=1 colspan=1>SBOW Freq+ SLQS Sub64.4</td><td rowspan=1 colspan=1>SBOW Freq +△S66.8</td><td rowspan=1 colspan=1>SBOW PPMI+△S66.8</td><td rowspan=1 colspan=1>DIVE+△S67.0</td></tr></table>
397
+
398
+ Table 11: Dataset sizes. N denotes the number of word pairs in the dataset, and OOV shows how many word pairs are not processed by all the methods in Table 4 and Table 5.
399
+
400
+ <table><tr><td colspan="2">BLESS</td><td colspan="2">EVALution</td><td colspan="2">Lenci/Benotto</td><td colspan="2">Weeds</td><td colspan="2">Avg (4 datasets)</td></tr><tr><td>N 26554</td><td>0OV 1507</td><td>N 13675</td><td>OOV 2475</td><td>N 5010</td><td>OOV 1464</td><td>N 2928</td><td>0OV 643</td><td>N 48167</td><td>OOv 6089</td></tr><tr><td colspan="2">Medical</td><td colspan="2"></td><td colspan="2"></td><td colspan="2">Kotlerman 2010</td><td colspan="2"></td></tr><tr><td colspan="2">N</td><td colspan="2">LEDS</td><td colspan="2">TM14</td><td colspan="2"></td><td colspan="2">HyperNet</td></tr><tr><td>12602</td><td>OOV 3711</td><td>N</td><td>OOV 28</td><td>N</td><td>OOV 178</td><td>N</td><td>OOV 89</td><td>N</td><td>OOV 9424</td></tr><tr><td colspan="2"></td><td colspan="2">2770</td><td colspan="2">2188</td><td colspan="2">2940</td><td colspan="2">17670</td></tr><tr><td colspan="2">WordNet</td><td colspan="2">Avg(10 datasets)</td><td colspan="2">HyperLex</td><td colspan="2"></td><td colspan="2"></td></tr><tr><td colspan="2">N OOV</td><td colspan="2">N</td><td colspan="2">N</td><td colspan="2"></td><td colspan="2"></td></tr><tr><td colspan="2">8000 3596</td><td colspan="2">94337</td><td colspan="2">2616</td><td colspan="2">0OV 59</td><td colspan="2"></td></tr></table>
401
+
402
+ hypernym relations in Table 10. The direction is classified correctly if the generality score is greater than 0 (hypernym is indeed predicted as the more general word). For instance, summation difference $( \Delta \mathsf { S } )$ classifies correctly if $\vert \mathbf { \bar { w } } _ { p } \vert _ { 1 } - \vert \mathbf { w } _ { q } \vert _ { 1 } > 0$ $( | \bar { \mathbf { w } _ { p } } | _ { 1 } > | \mathbf { w } _ { q } | _ { 1 } )$ .
403
+
404
+ From the table, we can see that the simple summation difference performs better than SQLS Sub, and DIVE predicts directionality as well as SBOW. Notice that whenever we encounter OOV, the directionality is predicted randomly. If OOV is excluded, the accuracy of predicting directionality using unsupervised methods can reach around 0.7-0.75.
405
+
406
+ # A.3 EXPERIMENTAL DETAILS FOR HYPERNYMY DETECTION
407
+
408
+ In HyperNet and WordNet, some hypernym relations are determined between phrases instead of words. Phrase embeddings are composed by averaging word embeddings or SBOW features. For WordNet, we assume the Part of Speech (POS) tags of the words are the same as the phrase. All part-of-speech (POS) tags in the experiments come from NLTK.
409
+
410
+ The window size $| W |$ of SBOW, DIVE, and GE are set as 20 (left 10 words and right 10 words). For DIVE, the number of epochs is 15, the learning rate is 0.001, the batch size is 128, the threshold in PMI filter $k _ { f }$ is set to be 30, and the ratio between negative and positive samples ${ \mathrm { ( k ) } }$ is 1.5. The hyper-parameters of DIVE were decided based on the performance of HyperNet training set. The window size of skip-grams (word2vec) is 10. The number of negative samples $( k ^ { \prime } )$ in skip-gram is set as 5. When composing skip gram into phrase embedding, average embedding is used.
411
+
412
+ For Gaussian embedding (GE), the number of mixture is 1, the number of dimension is 100, the learning rate is 0.01, the lowest variance is 0.1, the highest variance is 100, the highest Gaussian mean is 10, and other hyper-parameters are the default value in https://github.com/ benathi/word2gm. The hyper-parameters of GE were also decided based on the performance of HyperNet training set. When determining the score between two phrases, we use the average score of every pair of tokens in two phrases.
413
+
414
+ The number of testing pairs $_ \mathrm { N }$ and the number of OOV word pairs is presented in Table 11.
415
+
416
+ # A.4 CLUSTERING DIMENSIONS FOR WORD SENSE DISAMBIGUATION
417
+
418
+ We use all the default hyper-parameters of the spectral clustering library in Scikit-learn 0.18.2 (Pedregosa et al., 2011) except the number of clusters is set manually. A simple way to prepare the feature of each dimension $f ( c _ { i } )$ is to use the embedding values in that dimension $\mathbf { w } [ c _ { i } ]$ of all the words in our vocabulary $w \in V$ . That is,
419
+
420
+ $$
421
+ f ( c _ { i } ) = [ \mathbf { w } [ c _ { i } ] ] _ { w \in V } .
422
+ $$
423
+
424
+ However, clustering on the global features might group topics together based on the co-occurrence of words which are unrelated to the query words and we want to make the similarity dependent on the query word. For example, a country topic should be clustered together with a city topic if the query word is place, but it makes more sense to group the country topic with the money topic together if the query word is bank like we did in the word sense disambiguation experiment (Table 7). This means we want to focus on the geographical meaning of country when the query is related to geography, while focus on the economic meaning of country when the query is about economics.
425
+
426
+ To create query dependent similarity measurement, we only consider the embedding of words which are related to the query word when preparing the features of dimensions. Specifically, given a query word $q$ , the feature vector of the $i$ th dimension $f ( c _ { i } , q )$ is defined as:
427
+
428
+ $$
429
+ f ( c _ { i } , q ) = \bigoplus _ { j = 1 } ^ { d _ { 0 } } \left[ \mathbf { w } [ c _ { i } ] \cdot \mathbf { w } _ { q } [ c _ { j } ] \right] _ { w \in C _ { j } ( n ) } ,
430
+ $$
431
+
432
+ where ${ \bf w } _ { q } [ c _ { j } ]$ is the value of $j$ th dimension of query word embedding, $C _ { j } ( n )$ is the set of embeddings of top $n$ words in the $j$ th dimension, and the operator $\oplus$ means concatenation. This means instead of considering all the words in the vocabulary, we only take the top $n$ words of every dimension $j$ (n is fixed as 100 in the experiment), weight the feature based on how likely to observe query word in dimension $j$ $( \mathbf { w } _ { q } [ c _ { j } ] )$ , and concatenate all features together. That is, when measuring the similarity of dimensions, we only consider the aspects related to query word (e.g. mostly considering words related to facility and money when the query word is bank).
433
+
434
+ After the features of all dimensions are collected, we normalize the feature of each dimension to have the norm 1, compute the pairwise similarity and run the spectral clustering to get the clustering results.
435
+
436
+ # A.5 EFFICIENT WAY TO COMPUTE ASYMMETRIC L1 $( A L _ { 1 } )$
437
+
438
+ Recall that Equation (8) defines $A L _ { 1 }$ as follows:
439
+
440
+ $$
441
+ A L _ { 1 } = \mathcal { L } = \operatorname* { m i n } _ { a } \ \sum _ { c } w _ { 0 } \operatorname* { m a x } ( a \mathbf { d } _ { q } [ c ] - \mathbf { d } _ { p } [ c ] , 0 ) + \operatorname* { m a x } ( \mathbf { d } _ { p } [ c ] - a \mathbf { d } _ { q } [ c ] , 0 ) ,
442
+ $$
443
+
444
+ where $\mathbf { d } _ { p } [ c ]$ is one of dimension in the feature vector of hypernym $\mathbf { d } _ { p }$ , $a \mathbf { d } _ { q }$ is the feature vector of hyponym after proper scaling. In Figure 2, an simple example is visualized to illustrate the intuition behind the distance function.
445
+
446
+ By adding slack variables $\zeta$ and $\xi$ , the problem could be converted into a linear programming problem:
447
+
448
+ $$
449
+ \begin{array} { l } { \mathcal { L } = \displaystyle \operatorname* { m i n } _ { a , \zeta , \xi } ~ w _ { 0 } \sum _ { c } \zeta _ { c } + \sum _ { c } \xi _ { c } } \\ { ~ \zeta _ { c } \geq a \mathbf { d } _ { q } [ c ] - \mathbf { d } _ { p } [ c ] , ~ \zeta _ { c } \geq 0 } \\ { \displaystyle ~ \xi _ { c } \geq \mathbf { d } _ { p } [ c ] - a \mathbf { d } _ { q } [ c ] , ~ \xi _ { c } \geq 0 } \\ { ~ a \geq 0 , ~ } \end{array}
450
+ $$
451
+
452
+ so it can be simply solved by a general linear programming library.
453
+
454
+ Nevertheless, the structure in the problem actually allows us to solve this optimization by a simple sorting. In this section, we are going to derive the efficient optimization algorithm.
455
+
456
+ By introducing Lagrangian multiplier for the constraints, we can rewrite the problem as
457
+
458
+ $$
459
+ \begin{array} { l l } { { \mathcal { L } = \displaystyle \operatorname* { m i n } _ { a , \zeta , \xi } \operatorname* { m a x } _ { \alpha , \beta , \gamma , \delta } w _ { 0 } \sum _ { c } \zeta _ { c } + \sum _ { c } \xi _ { c } - \sum _ { c } \alpha _ { c } ( \zeta _ { c } - a { \bf d } _ { q } [ c ] + { \bf d } _ { p } [ c ] ) } } \\ { { \mathrm { ~ } } } \\ { { \mathrm { ~ } - \sum _ { c } \beta _ { c } ( \xi _ { c } - { \bf d } _ { p } [ c ] + a { \bf d } _ { q } [ c ] ) - \sum _ { c } \gamma _ { c } \zeta _ { c } - \sum _ { c } \delta _ { c } \xi _ { c } } } \\ { { \mathrm { ~ } } } \\ { { \zeta _ { c } \geq 0 , \xi _ { c } \geq 0 , \alpha _ { c } \geq 0 , \beta _ { c } \geq 0 , \gamma _ { c } \geq 0 , \delta _ { c } \geq 0 , a \geq 0 } } \end{array}
460
+ $$
461
+
462
+ ![](images/8c0cf76ff70a7b6ae235a8767dbac4aa77b900b1aa3ec191dfbdfa9da0d93c69.jpg)
463
+ Figure 2: An example of $A L _ { 1 }$ distance. If the word pair indeed has the hypernym relation, the context distribution of hyponym $( \mathbf { d } _ { q } )$ tends to be included in the context distribution of hypernym $( \mathbf { d } _ { p } )$ after proper scaling according to DIH. Thus, the context words only appear beside the hyponym candidate $( a \mathbf { d } _ { q } [ c ] - \mathbf { d } _ { p } [ c ] )$ causes higher penalty.
464
+
465
+ First, we eliminate the slack variables by taking derivatives with respect to them:
466
+
467
+ $$
468
+ \begin{array} { r l r } { \displaystyle \frac { \partial \mathcal { L } } { \partial \zeta _ { c } } = 0 = 1 - \beta _ { c } - \delta _ { c } } & { } & \\ { \displaystyle \delta _ { c } = 1 - \beta _ { c } , ~ \beta _ { c } \le 1 } & { } \\ { \displaystyle \frac { \partial \mathcal { L } } { \partial \xi _ { c } } = 0 = 1 - \gamma _ { c } - \alpha _ { c } } & { } \\ { \displaystyle \gamma _ { c } = w _ { 0 } - \alpha _ { c } , ~ \alpha _ { c } \le w _ { 0 } . } & { } \end{array}
469
+ $$
470
+
471
+ By substituting in these values for $\gamma _ { c }$ and $\delta _ { c }$ , we get rid of the slack variables and have a new Lagrangian:
472
+
473
+ $$
474
+ \begin{array} { c l l } { { } } & { { { \mathcal { L } } = \underset { a } { \mathrm { m i n } } \underset { \alpha , \beta } { \mathrm { m a x } } ~ - \sum _ { c } \alpha _ { c } ( - a \mathbf { d } _ { q } [ c ] + \mathbf { d } _ { p } [ c ] ) - \sum _ { c } \beta _ { c } ( - \mathbf { d } _ { p } [ c ] + a \mathbf { d } _ { q } [ c ] ) } } \\ { { } } & { { } } \\ { { } } & { { 0 \leq \alpha _ { c } \leq w _ { 0 } , 0 \leq \beta _ { c } \leq 1 , a \geq 0 } } \end{array}
475
+ $$
476
+
477
+ We can introduce a new dual variable $\lambda _ { c } = \alpha _ { c } - \beta _ { c } + 1$ and rewrite this as:
478
+
479
+ $$
480
+ \begin{array} { c } { \mathcal { L } = \displaystyle \underset { a } { \mathrm { m i n } } \displaystyle \operatorname* { m a x } _ { \lambda } \ \sum _ { c } ( \lambda _ { c } - 1 ) ( a \mathbf { d } _ { q } [ c ] - \mathbf { d } _ { p } [ c ] ) } \\ { 0 \leq \lambda _ { c } \leq w _ { 0 } + 1 , a \geq 0 } \end{array}
481
+ $$
482
+
483
+ Let’s remove the constraint on $a$ and replace with a dual variable $\eta$ :
484
+
485
+ $$
486
+ \begin{array} { c } { \mathcal { L } = \displaystyle \underset { a } { \mathrm { m i n } } \displaystyle \operatorname* { m a x } _ { \lambda } \ \sum _ { c } ( \lambda _ { c } - 1 ) ( a \mathbf { d } _ { q } [ c ] - \mathbf { d } _ { p } [ c ] ) - \eta a } \\ { 0 \leq \lambda _ { c } \leq w _ { 0 } + 1 , \eta \geq 0 } \end{array}
487
+ $$
488
+
489
+ Now let’s differentiate with respect to $a$ to get rid of the primal objective and add a new constraint:
490
+
491
+ $$
492
+ \begin{array} { c } { { \displaystyle \frac { \partial \mathcal { L } } { \partial a } = 0 = \sum _ { c } \lambda _ { c } \mathbf { d } _ { q } [ c ] - \sum _ { c } \mathbf { d } _ { q } [ c ] - \eta } } \\ { { \displaystyle \sum _ { c } \lambda _ { c } \mathbf { d } _ { q } [ c ] = \sum _ { c } \mathbf { d } _ { q } [ c ] + \eta } } \\ { { \displaystyle \mathcal { L } = \operatorname* { m a x } _ { \lambda } \ \sum _ { c } \mathbf { d } _ { p } [ c ] - \sum _ { c } \lambda _ { c } \mathbf { d } _ { p } [ c ] } } \\ { { \displaystyle \sum _ { c } \lambda _ { c } \mathbf { d } _ { q } [ c ] = \sum _ { c } \mathbf { d } _ { q } [ c ] + \eta } } \\ { { \displaystyle 0 \leq \lambda _ { c } \leq w _ { 0 } + 1 , \eta \geq 0 } } \end{array}
493
+ $$
494
+
495
+ Now we have some constant terms that are just the sums of $\mathbf { d } _ { p }$ and ${ \mathbf { d } } _ { q }$ , which will be 1 if they are distributions.
496
+
497
+ $$
498
+ \begin{array} { l } { \displaystyle \mathcal { L } = \displaystyle \operatorname* { m a x } _ { \lambda } ~ 1 - \sum _ { c } \lambda _ { c } \mathbf { d } _ { p } [ c ] } \\ { \displaystyle \sum _ { c } \lambda _ { c } \mathbf { d } _ { q } [ c ] = 1 + \eta } \\ { \displaystyle 0 \leq \lambda _ { c } \leq w _ { 0 } + 1 , \eta \geq 0 } \end{array}
499
+ $$
500
+
501
+ Now we introduce a new set of variables $\mu _ { c } = \lambda _ { c } \mathbf { d } _ { q } [ c ]$ and we can rewrite the objective as:
502
+
503
+ $$
504
+ \begin{array} { l } { \displaystyle \mathcal { L } = \underset { \mu } { \mathrm { m a x } } ~ 1 - \sum _ { c } \mu _ { c } \frac { \mathbf { d } _ { p } [ c ] } { \mathbf { d } _ { q } [ c ] } } \\ { \displaystyle \sum _ { c } \mu _ { c } = 1 + \eta } \\ { \displaystyle 0 \leq \mu _ { c } \leq ( w _ { 0 } + 1 ) \mathbf { d } _ { q } [ c ] , \eta \geq 0 } \end{array}
505
+ $$
506
+
507
+ Note that for terms where $\mathbf { d } _ { q } [ c ] = 0$ we can just set $\mathbf { d } _ { q } [ c ] = \epsilon$ for some very small epsilon, and in practice, our algorithm will not encounter these because it sorts.
508
+
509
+ So $\mu$ we can think of as some fixed budget that we have to spend up until it adds up to 1, but it has a limit of how much we can spend for each coordinate, given by $( w _ { 0 } + 1 ) { \bf d } _ { q } [ c ]$ . Since we’re trying to minimize the term involving $\mu$ , we want to allocate as much budget as possible to the smallest terms in the summand, and then 0 to the rest once we’ve spent the budget. This also shows us that our optimal value for the dual variable $\eta$ is just 0 since we want to minimize the amount of budget we have to allocate.
510
+
511
+ To make presentation easier, lets assume we sort the vectors in order of increasing $\begin{array} { r } { \frac { \mathbf { d } _ { p } [ c ] } { \mathbf { d } _ { q } [ c ] } } \end{array}$ , so that $\frac { \mathbf { d } _ { p } [ 1 ] } { \mathbf { d } _ { q } [ 1 ] }$ is the smallest element, etc. We can now give the following algorithm to find the optimal $\mu$ .
512
+
513
+ $$
514
+ \begin{array} { r l } & { \operatorname { i n i t } \ S = 0 , c = 1 , \mu = 0 } \\ & { \operatorname { w h i l e } \ S \le 1 : } \\ & { \ \mu _ { c } = \operatorname* { m i n } ( 1 - S , ( w _ { 0 } + 1 ) { \bf d } _ { q } [ c ] ) } \\ & { \ { S = S + \mu _ { c } } } \\ & { \ { c = c + 1 } } \end{array}
515
+ $$
516
+
517
+ At the end we can just plug in this optimal $\mu$ to the objective to get the value of our scoring function.
parse/train/SywMS6ZfM/SywMS6ZfM_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SywMS6ZfM/SywMS6ZfM_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SywMS6ZfM/SywMS6ZfM_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Wga_hrCa3P3/Wga_hrCa3P3_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Wga_hrCa3P3/Wga_hrCa3P3_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Wi5KUNlqWty/Wi5KUNlqWty.md ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Wi5KUNlqWty/Wi5KUNlqWty_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Wi5KUNlqWty/Wi5KUNlqWty_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Wi5KUNlqWty/Wi5KUNlqWty_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/hhU9TEvB6AF/hhU9TEvB6AF.md ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Meta Learning Backpropagation And Improving It
2
+
3
+ Louis Kirsch1, Jürgen Schmidhuber1,2
4
+ 1The Swiss AI Lab IDSIA, University of Lugano (USI) & SUPSI, Lugano, Switzerland
5
+ 2King Abdullah University of Science and Technology (KAUST), Thuwal, Saudi Arabia {louis, juergen}@idsia.ch
6
+
7
+ # Abstract
8
+
9
+ Many concepts have been proposed for meta learning with neural networks (NNs), e.g., NNs that learn to reprogram fast weights, Hebbian plasticity, learned learning rules, and meta recurrent NNs. Our Variable Shared Meta Learning (VSML) unifies the above and demonstrates that simple weight-sharing and sparsity in an NN is sufficient to express powerful learning algorithms (LAs) in a reusable fashion. A simple implementation of VSML where the weights of a neural network are replaced by tiny LSTMs allows for implementing the backpropagation LA solely by running in forward-mode. It can even meta learn new LAs that differ from online backpropagation and generalize to datasets outside of the meta training distribution without explicit gradient calculation. Introspection reveals that our meta learned LAs learn through fast association in a way that is qualitatively different from gradient descent.
10
+
11
+ # 1 Introduction
12
+
13
+ The shift from standard machine learning to meta learning involves learning the learning algorithm (LA) itself, reducing the burden on the human designer to craft useful learning algorithms [43]. Recent meta learning has primarily focused on generalization from training tasks to similar test tasks, e.g., few-shot learning [11], or from training environments to similar test environments [17]. This contrasts human-engineered LAs that generalize across a wide range of datasets or environments. Without such generalization, meta learned LAs can not entirely replace human-engineered variants. Recent work demonstrated that meta learning can also successfully generate more general LAs that generalize across wide spectra of environments [20, 1, 31], e.g., from toy environments to Mujoco and Atari. Unfortunately, however, many recent approaches still rely on a large number of human-designed and unmodifiable inner-loop components such as backpropagation.
14
+
15
+ Is it possible to implement modifiable versions of backpropagation or related algorithms as part of the end-to-end differentiable activation dynamics of a neural net (NN), instead of inserting them as separate fixed routines? Here we propose the Variable Shared Meta Learning (VSML) principle for this purpose. It introduces a novel way of using sparsity and weight-sharing in NNs for meta learning. We build on the arguably simplest neural meta learner, the meta recurrent neural network (Meta RNN) [16, 10, 56], by replacing the weights of a neural network with tiny LSTMs. The resulting system can be viewed as many RNNs passing messages to each other, or as one big RNN with a sparse shared weight matrix, or as a system learning each neuron’s functionality and its LA. VSML generalizes the principle behind end-to-end differentiable fast weight programmers [45, 46, 3, 41], hyper networks [14], learned learning rules [4, 13, 33], and hebbian-like synaptic plasticity [44, 46, 25, 26, 30]. Our mechanism, VSML, can implement backpropagation solely in the forward-dynamics of an RNN. Consequently, it enables meta-optimization of backproplike algorithms. We envision a future where novel methods of credit assignment can be meta learned while still generalizing across vastly different tasks. This may lead to improvements in sample efficiency, memory efficiency, continual learning, and others. As a first step, our system meta learns online LAs from scratch that frequently learn faster than gradient descent and generalize to datasets outside of the meta training distribution (e.g., from MNIST to Fashion MNIST). Our VSML RNN is the first neural meta learner without hard-coded backpropagation that shows such strong generalization.
16
+
17
+ # 2 Background
18
+
19
+ Deep learning-based meta learning that does not rely on fixed gradient descent in the inner loop has historically fallen into two categories, 1) Learnable weight update mechanisms that allow for changing the parameters of an NN to implement a learning rule (FWPs / LLRs), and 2) Learning algorithms implemented in black-box models such as recurrent neural networks (Meta RNNs).
20
+
21
+ Fast weight programmers & Learned learning rules (FWPs / LLRs) In a standard NN, the weights are updated by a fixed LA. This framework can be extended to meta learning by defining an explicit architecture that allows for modifying these weights. This weight-update architecture augments a standard NN architecture. NNs that generate or change the weights of another or the same NN are known as fast weight programmers (FWPs) [44, 45, 46, 3, 41], hypernetworks [14], NNs with synaptic plasticity [25, 26, 30] or learned learning rules [4, 13, 33]. Often these architectures make use of local Hebbian-like update rules or outer-products, and we summarize this category as FWPs / LLRs. In FWPs / LLRs the variables $V _ { L }$ that are subject to learning are the weights of the network, whereas the meta-variables $V _ { M }$ that implement the LA are defined by the weight-update architecture. Note that the dimensionality of $V _ { L }$ and $V _ { M }$ can be defined independently of each other and often $V _ { M }$ are reused in a coordinate-wise fashion for $V _ { L }$ resulting in $| V _ { L } | \gg | V _ { M } |$ , where $| \cdot |$ is the number of elements.
22
+
23
+ Black-box learning in activations (Meta RNNs) It was shown that an RNN such as LSTM can learn to implement an LA [16] when the reward or error is given as an input [47]. After meta training, the LA is encoded in the weights of this RNN and determines learning during meta testing. The activations serve as the memory used for the LA solution. We refer to this as Meta RNNs [16, 10, 56] (Also sometimes referred to as memory-based meta learning.). They are conceptually simpler than FWPs / LLRs as no additional weight-update rules with many degrees of freedom need to be defined. In Meta RNNs $V _ { L }$ are the RNN activations and $V _ { M }$ are the parameters for the RNN. Note that an RNN with $N$ neurons will yield $| V _ { L } | = O ( N )$ and $| V _ { M } | = \stackrel { \cdot } { O } ( N ^ { 2 } )$ [46]. This means that the LA is largely overparameterized whereas the available memory for learning is very small, making this approach prone to overfitting [20]. As a result, the RNN parameters often encode task-specific solutions instead of generic LAs. Meta learning a simple and generalizing LA would benefit from $| V _ { L } | \gg | V _ { M } |$ . Previous approaches have tried to mend this issue by adding architectural complexity through additional memory mechanisms [53, 29, 40, 27, 42].
24
+
25
+ # 3 Variable Shared Meta Learning (VSML)
26
+
27
+ In VSML we build on the simplicity of Meta RNNs while retaining $| V _ { L } | \gg | V _ { M } |$ from FWPs / LLRs. We do this by reusing the same few parameters $V _ { M }$ many times in an RNN (via variable sharing) and introducing sparsity in the connectivity. This yields several interpretations for VSML:
28
+
29
+ $\textcircled{8}$ VSML as a single Meta RNN with a sparse shared weight matrix (Figure 1a). The most general description.
30
+ $\textcircled{8}$ VSML as message passing between RNNs (Figure 1b). We choose a simple sharing and sparsity scheme for the weight matrix such that it corresponds to multiple RNNs with shared parameters that exchange information.
31
+ $©$ VSML as complex neurons with learned updates (Figure 1c). When choosing a specific connectivity between RNNs, states / activations $V _ { L }$ of these RNNs can be interpreted as the weights of a conventional NN, consequently blurring the distinction between a weight and an activation.
32
+
33
+ Introducing variable sharing to Meta RNNs We begin by formalizing Meta RNNs which often use multiplicative gates such as the LSTM [12, 15] or its variant GRU [6]. For notational simplicity, we consider a vanilla RNN. Let $s \in \mathbb { R } ^ { N }$ be the hidden state of an RNN. The update for an element $j \in \{ 1 , \ldots , N \}$ is given by
34
+
35
+ ![](images/b1ae57af27d23bff08bcfc6f114db04ece9a7f8b38923249b2e9e1b42ad6a50f.jpg)
36
+ Figure 1: Different perspectives on VSML: (a) A single Meta RNN [16] where entries in the weight matrix are shared or zero. (a) VSML consists of many sub-RNNs with shared parameters $V _ { M }$ passing messages between each other. (c) VSML implements an NN with complex neurons (here 2 neurons). $V _ { M }$ determines the nature of weights, how these are used in the neural computation, and the LA by which those are updated. Each weight $w _ { a b } \in \mathbb { R }$ is represented by the multi-dimensional RNN state ${ s _ { a b } } \in \mathbb { R } ^ { N }$ . Neuron activations correspond to messages $\overrightarrow { m }$ passed between sub-RNNs.
37
+
38
+ $$
39
+ s _ { j } \gets f _ { \mathrm { R N N } } ( s ) _ { j } = \sigma ( \sum _ { i } s _ { i } W _ { i j } ) ,
40
+ $$
41
+
42
+ where $\sigma$ is a non-linear activation function, $W \in \mathbb { R } ^ { N \times N }$ , and the bias is omitted for simplicity. We also omit inputs by assuming a subset of $s$ to be externally provided. Each application of Equation 1 reflects a single time tick in the RNN.
43
+
44
+ We now introduce variable sharing (reusing $W$ ) into the RNN by duplicating the computation along two axes of size $A , B$ (here $A = B$ , which will later be relaxed) giving $\bar { s } \in \mathbb { R } ^ { A \times B \times N }$ . For $a \in \{ 1 , \dotsc , A \} , b \in \{ 1 , \dotsc , B \}$ we have
45
+
46
+ $$
47
+ s _ { a b j } \gets f _ { \mathrm { R N N } } ( s _ { a b } ) _ { j } = \sigma ( \sum _ { i } s _ { a b i } W _ { i j } ) .
48
+ $$
49
+
50
+ This can be viewed as multiple RNNs arranged on a 2-dimensional grid, with shared parameters that update independent states. Here, we chose a particular arrangement (two axes) that will facilitate the interpretation $©$ of RNNs as weights.
51
+
52
+ VSML as message passing between RNNs The computation so far describes $A \cdot B$ independent RNNs. We connect those by passing messages (interpretation $\textcircled{8}$ )
53
+
54
+ $$
55
+ s _ { a b } \gets f _ { \mathrm { R N N } } ( s _ { a b } , \overrightarrow { m } _ { a } ) ,
56
+ $$
57
+
58
+ where the message $\begin{array} { r } { \vec { m } _ { b } = \sum _ { a ^ { \prime } } f _ { \vec { m } } ( s _ { a ^ { \prime } b } ) } \end{array}$ with $b \in \{ 1 , \dots , A = B \}$ , $f _ { \overrightarrow { m } } : \mathbb { R } ^ { N } \mathbb { R } ^ { N ^ { \prime } }$ is fed as an additional input to each RNN. This is related to Graph Neural Networks [51, 58]. Summing over the axis $A$ (elements $a ^ { \prime }$ ) corresponds to an RNN connectivity mimicking those of weights in an NN (to facilitate interpretation $©$ . We emphasise that other schemes based on different kinds of message passing and graph connectivity are possible. For a simple $f _ { \overrightarrow { m } }$ defined by the matrix $C \in \mathbb { R } ^ { N \times N }$ , we may equivalently write
59
+
60
+ $$
61
+ s _ { a b j } \gets \sigma ( \sum _ { i } s _ { a b i } W _ { i j } + \sum _ { a ^ { \prime } } f _ { \overrightarrow { m } } ( s _ { a ^ { \prime } a } ) ) = \sigma ( \sum _ { i } s _ { a b i } W _ { i j } + \sum _ { a ^ { \prime } , i } s _ { a ^ { \prime } a i } C _ { i j } ) .
62
+ $$
63
+
64
+ This constitutes the minimal version of VSML with $V _ { M } : = ( W , C )$ and is visualized in Figure 1b.
65
+
66
+ VSML as a Meta RNN with a sparse shared weight matrix It is trivial to see that with $A = 1$ and $B = 1$ we obtain a single RNN and Equation 4 recovers the original Meta RNN Equation 1. In the general case, we can derive an equivalent formulation that corresponds to a single standard RNN with a single matrix $\tilde { W }$ that has entries of zero and shared entries
67
+
68
+ $$
69
+ s _ { a b j } \gets \sigma ( \sum _ { c , d , i } s _ { c d i } \tilde { W } _ { c d i a b j } ) ,
70
+ $$
71
+
72
+ where the six axes can be flattened to obtain the two axes. For Equation 4 and Equation 5 to be equivalent, $\tilde { W }$ must satisfy (derivation in Appendix A)
73
+
74
+ $$
75
+ \tilde { W } _ { c d i a b j } = \left\{ \begin{array} { l l } { C _ { i j } , } & { \mathrm { i f ~ } d = a \wedge ( d \neq b \vee c \neq a ) . } \\ { W _ { i j } , } & { \mathrm { i f ~ } d \neq a \wedge d = b \wedge c = a . } \\ { C _ { i j } + W _ { i j } , } & { \mathrm { i f ~ } d = a \wedge d = b \wedge c = a . } \\ { 0 , } & { \mathrm { o t h e r w i s e . } } \end{array} \right.
76
+ $$
77
+
78
+ This corresponds to interpretation $\textcircled{8}$ with the weight matrix visualized in Figure 1a. To distinguish between the single sparse shared RNN and the connected RNNs, we now call the latter sub-RNNs.
79
+
80
+ VSML as complex neurons with learned updates The arrangement and connectivity of the subRNNs as described in the previous paragraphs corresponds to that of weights in a standard NN. Thus, in interpretation $@$ , VSML can be viewed as defining complex neurons where each sub-RNN corresponds to a weight in a standard NN as visualized in Figure 1c. All these sub-RNNs share the same parameters but have distinct states. The current formulation corresponds to a single NN layer that is run recurrently. We will generalize this to other architectures in the next section. A corresponds to the dimensionality of the inputs and $B$ to that of the outputs in that layer.
81
+
82
+ The role of weights in a standard neural network is now assigned to the states of RNNs. This allows these RNNs to define both the neural forward computation as well as the learning algorithm that determines how the network is updated (where the mechanism is shared across the network). In the case of backpropagation, this would correspond to the forward and backward passes being implemented purely in the recurrent dynamics. We will demonstrate the practical feasibility of this in Section 3.2. The emergence of
83
+
84
+ ![](images/0ccd0fdb8442f57b99da7d0266c5c9a62738c64d643b90443c68ed18becb66cf.jpg)
85
+ Figure 2: The neural interpretation of VSML replaces all weights of a standard NN with tiny LSTMs using shared parameters (resembling complex neurons). This allows these LSTMs to define both the neural forward computation as well as the learning algorithm that determines how the network is updated. Information flows forward and backward in the network through multi-dimensional messages $\overrightarrow { m }$ and $\scriptstyle { \overleftarrow { m } }$ , generalizing the dynamics of an NN trained using backpropagation.
86
+
87
+ RNN states as weights quickly leads to confusing terminology when RNNs have ‘meta weights’.
88
+ Instead, we simply refer to meta variables $V _ { M }$ and learned variables $V _ { L }$ .
89
+
90
+ With this interpretation, VSML can be seen as a generalization of learned learning rules [4, 13, 33] and Hebbian-like differentiable mechanisms or fast weights more generally [44, 46, 25, 26] where RNNs replace explicit weight updates. In standard NNs, weights and activations have multiplicative interactions. For VSML RNNs to mimic such computation we require multiplicative interactions between parts of the state $s$ . Fortunately, LSTMs already incorporate this through gating and can be directly used in place of RNNs.
91
+
92
+ Stacking VSML RNNs and feeding inputs To get a structure similar to one of the non-recurrent deep feed-forward architectures (FNNs), we stack multiple VSML RNNs where their states are untied and their parameters are tied.1 This is visualized with two layers in Figure 2 where the states $s ^ { ( 2 ) }$ of the second column of sub-RNNs are distinct from the first column $\mathbf { \boldsymbol { s } } ^ { ( 1 ) }$ . The parameters $A ^ { ( k ) }$ and $B ^ { ( k ) }$ describing layer sizes can then be varied for each layer $k \in \{ 1 , \ldots , K \}$ constrained by $A ^ { ( k ) } ~ = ~ B ^ { ( k - 1 ) }$ . The updated Equation 3 with distinct layers $k$ is given by $s _ { a b } ^ { ( k ) } f _ { \mathrm { R N N } } ( s _ { a b } ^ { ( k ) } , \overrightarrow { m } _ { a } ^ { ( k ) } )$ where $\begin{array} { r } { \vec { m } _ { b } ^ { ( k + 1 ) } : = \sum _ { a ^ { \prime } } \bar { f } _ { \vec { m } } ( s _ { a ^ { \prime } b } ^ { ( k ) } ) } \end{array}$ with $b \in \{ 1 , \ldots , B ^ { ( k ) } = A ^ { ( k + 1 ) } \}$
93
+
94
+ To prevent information from flowing only forward in the network, we use an additional backward message
95
+
96
+ $$
97
+ s _ { a b } ^ { ( k ) } \gets f _ { R N N } \big ( s _ { a b } ^ { ( k ) } , \overrightarrow { m } _ { a } ^ { ( k ) } , \overleftarrow { m } _ { b } ^ { ( k ) } \big ) ,
98
+ $$
99
+
100
+ where $\begin{array} { r } { \overleftarrow { m } _ { a } ^ { ( k - 1 ) } : = \sum _ { b ^ { \prime } } f _ { \overleftarrow { m } } ( s _ { a b ^ { \prime } } ^ { ( k ) } ) } \end{array}$ with $a \in$ $\{ 1 , . . . , A ^ { ( k ) } = B ^ { ( k - 1 ) } \}$ (visualized in Figure 3). The backward transformation is given by f←−m : RN → RN 00 .
101
+
102
+ Similarly, other neural architectures can be explicitly constructed (e.g. convolutional NNs, Section B.2). Some architectures may be learned implicitly if positional information is fed into each sub-RNN (Appendix C). We then update all states $s ^ { ( k ) }$ in sequence $1 , \ldots , K$ to mimic sequential layer execution. We may also apply multiple RNN ticks for each layer $k$ .
103
+
104
+ ![](images/a5613155d304964c2e8b7d7e753eadbc7c640e13696034612df8983dd1ae3ff5.jpg)
105
+ Figure 3: VSML with forward messages $\overrightarrow { m }$ and backward messages $\scriptstyle { \overleftarrow { m } }$ to form a two-layer NN with shared LSTM parameters but distinct states.
106
+
107
+ To provide the VSML RNN with data, each time we execute the operations of the first layer, a single new datum $x \in \mathbb { R } ^ { A ( 1 ) }$ (e.g. one flattened image) is distributed across all sub-RNNs. In our present experiments, we match the axis $A ( 1 )$ to the input datum dimensionality such that each dimension (e.g., pixel) is fed to different RNNs. This corresponds to initializing the forward message $\vec { m } _ { a 1 } ^ { ( 1 ) } : = \boldsymbol { x } _ { a }$ dding . Fina $\overrightarrow { m }$ with zeros if nece we feed the error larly, we read the outpuat the output such that $\boldsymbol { \hat { y } } \in \mathbb { R } ^ { B ( K ) }$ from. See $\hat { y } _ { a } : = \overrightarrow { m } _ { a 1 } ^ { ( K + 1 ) }$ $e \in \mathbb { R } ^ { B ( K ) }$ $ _ { b 1 } : = e _ { b }$ Figure 2 for a visualization. Alternatively, multiple input or output dimensions could be patched together and fed into fewer sub-RNNs.
108
+
109
+ # 3.1 Meta learning general-purpose learning algorithms from scratch
110
+
111
+ Having formalized VSML, we can now use end-to-end meta learning to create LAs from scratch in Algorithm 1. We simply optimize the LSTM parameters $V _ { M }$ to minimize the sum of prediction losses over many time steps starting with random states $V _ { L } : = \{ s _ { a b } ^ { ( k ) } \}$ . We focus on meta learning online LAs where one example is fed at a time as done in Meta RNNs [16, 56, 10]. Meta training may be performed using end-to-end gradient descent or gradient-free optimization such as evolutionary strategies [57, 38]. The latter is significantly more efficient on VSML compared to standard NNs due to the small parameter space $V _ { M }$ . Crucially, during meta testing, no explicit gradient descent is used.
112
+
113
+ # Algorithm 1 VSML: Meta Training
114
+
115
+ Require: Dataset(s) $D = \{ ( x _ { i } , y _ { i } ) \}$ $V _ { M } \gets$ initialize LSTM parameters while meta loss has not converged do . Outer loop in parallel over datasets $D$ ${ \cal V } _ { L } = \{ s _ { a b } ^ { ( k ) } \} $ initialize LSTM states $\forall a , b , k$ for $( x , y ) ^ { \top } \in \{ ( x _ { 1 } , y _ { 1 } ) , \dotsc , ( x _ { T } , y _ { T } ) \} \subset D$ do $\triangleright$ Inner loop over $T$ examples $ { \vec { m } } _ { a 1 } ^ { ( 1 ) } : = x _ { a }$ ∀a $\triangleright$ Initialize from input image $\mathbf { X }$ for $\bar { k } \in \{ 1 , \ldots , K \}$ do $\triangleright$ Iterating over $K$ layers $s _ { a b } ^ { ( k ) } \gets f _ { R N N } \big ( s _ { a b } ^ { ( k ) } , \overrightarrow { m } _ { a } ^ { ( k ) } , \overleftarrow { m } _ { b } ^ { ( k ) } \big ) \quad \forall a , b$ . Equation 7 ←−m m (k+1)b := Pa0 f−→m (s(k)a0b) (k−1)a := Pb0 f←−m (s(k)ab0 ) ∀a ∀b . Create backward message . Create forward message yˆa := −→m(K+1)a1 ∀a $\triangleright$ Read output e := ∇yˆL(ˆy, y) . Compute error at outputs using loss $L$ ←−m(K)b1 := eb ∀b $\triangleright$ Input errors $\begin{array} { r } { V _ { M } \gets V _ { M } - \alpha \nabla _ { V _ { M } } \sum _ { t = 1 } ^ { T } L ( \hat { y } ( t ) , y ( t ) ) } \end{array}$ , obtaining $\nabla _ { V _ { M } }$ either by • back-propagation through the inner loop • evolution strategies, using a search distribution $p ( V _ { M } )$
116
+
117
+ # 3.2 Learning to implement backpropagation in RNNs
118
+
119
+ ![](images/c33778dd74e4643cf3ee884dd15c7cd4f5d7da2efc2ed6fb055153758c4435ca.jpg)
120
+ Figure 4: To implement backpropagation we optimize the VSML RNN to use and update weights $w$ and biases $b$ as part of the state $s _ { a b }$ in each subRNN. Inputs are pre-synaptic $x$ and error $e$ . Outputs are post-synaptic $\hat { y }$ and error $\cdot$ .
121
+
122
+ An alternative to end-to-end meta learning is to first investigate whether the VSML RNN can implement backpropagation. Due to the algorithm’s ubiquitous use, it seems desirable to be able to meta learn backpropagation-like algorithms. Here we investigate how VSML RNNs can learn to implement backpropagation purely in their recurrent dynamics. We do this by optimizing $V _ { M }$ to (1) store a weight $w$ and bias $b$ as a subset of each state $s _ { a b }$ , (2) compute $y = \operatorname { t a n h } ( x ) w + b$ to implement neural forward computation, and (3) update $w$ and $b$ according to the backpropagation algorithm [23]. We call this process learning algorithm cloning and it is visualized in Figure 4.
123
+
124
+ We designate an element of each message $\vec { m } _ { a } ^ { ( k ) }$ , $\{ \overline { { m } } _ { b } ^ { ( k ) }$ , $f _ { \vec { m } } ( s _ { a b } ^ { ( k ) } )$ $f _ { \overleftarrow { m } } ( s _ { a b } ^ { ( k ) } )$ as the input $x$ , error $e$ , and output $\hat { y }$ and error $\hat { e } ^ { \prime }$ . Similarly, we set $w : = s _ { a b 1 }$ and $b : = s _ { a b 2 }$ . We then optimize $V _ { M }$ via gradient descent to regress $\hat { y }$ , $\Delta w$ , $\Delta b$ , and $\hat { e } ^ { \prime }$ toward their respective targets. We can either generate the training dataset $D : = \{ ( x , \bar { w } , b , y , e , \bar { e ^ { \prime } } ) _ { i } \}$ randomly or run a ‘shadow’ NN on some supervised problem and fit the VSML RNN to its activations and parameter updates. Multiple iterations in the VSML RNN would then correspond to evaluating the network and updating it via backpropagation. The activations from the forward pass necessary for credit assignment could be memorized as part of the state $s$ or be explicitly stored and fed back. For simplicity, we chose the latter to clone backpropagation. We continuously run the VSML RNN forward, alternately running the layers in order $1 , \ldots , K$ and in reverse order $K , \ldots , 1$ .2
125
+
126
+ # 4 Experiments
127
+
128
+ First, we demonstrate the capabilities of the VSML RNN by showing that it can implement neural forward computation and backpropagation in its recurrent dynamics on the MNIST [21] and Fashion MNIST [59] dataset. Then, we show how we can meta learn an LA from scratch on one set of datasets and then successfully apply it to another (out of distribution). Such generalization is enabled by extensive variable sharing where we have very few meta variables $| V _ { M } | ~ \approx ~ 2 , 4 0 0$ and many learned variables $| V _ { L } | \approx 2 5 7 , 2 0 0$ . We also investigate the robustness of the discovered LA. Finally, we introspect the meta learned LA and compare it to gradient descent.
129
+
130
+ ![](images/dbb2f1c0cc8cade0dc1f709d779c51876fa020bd13a4a622b6679683d6100ede.jpg)
131
+ Figure 5: The VSML RNN is optimized to implement backpropagation in its recurrent dynamics on MNIST, then tested both on MNIST and Fashion MNIST where it performs learning purely by unrolling the LSTM. We test on shallow and deep architectures (single hidden layer of 32 units). Standard deviations are over 6 seeds.
132
+
133
+ Our implementation uses LSTMs and the message interpretation from Equation 7. Hyperparameters, training details, and additional experiments can be found in the appendix.
134
+
135
+ # 4.1 VSML RNNs can implement backpropagation
136
+
137
+ As described in Section 3.2, we optimize the VSML RNN to implement backpropagation. We structure the sub-RNNs to mimic a feed-forward NN with either one hidden layer or no hidden layers. To obtain training targets, we instantiate a standard NN, the shadow network, and feed it MNIST data. After cloning, we then run the LA encoded in the VSML RNN on the MNIST and Fashion MNIST dataset and observe that it performs learning purely in its recurrent dynamics, making explicit gradient calculations unnecessary. Figure 5 shows the learning curve on these two datasets. Notably, learning works both on MNIST (within distribution) and on Fashion MNIST (out of distribution). We observe that the loss is decently minimized, albeit regular gradient descent still outperforms our cloned backpropagation. This may be due to non-zero errors during learning algorithm cloning, in particular when these errors accumulate in the deeper architecture. It is also possible that the VSML states (‘weights’) deviate too far from ranges seen during cloning, in particular in the deep case when the loss starts increasing. We obtain $87 \%$ (deep) and $90 \%$ (shallow) test accuracy on MNIST and $76 \%$ (deep) and $80 \%$ (shallow) on Fashion MNIST (focusing on successful cloning over performance).
138
+
139
+ # 4.2 Meta learning supervised learning from scratch
140
+
141
+ In the previous experiments, we have established that VSML is expressive enough to metaoptimize backpropagation-like algorithms. Instead of cloning an LA, we now meta learn from scratch as described in Section 3.1. Here, we use a single layer ( $K = 1$ ) from input to output dimension and run it for two ticks per image with $N = 1 6$ and $N ^ { \prime } = N ^ { \prime \prime } = 8$ . First, the VSML RNN is meta trained end-to-end using evolutionary strategies (ES) [38] on MNIST to minimize the sum of cross-entropies over 500 data points starting from random state initializations. As each image is unique and $V _ { M }$ can not memorize the data, we are implicitly optimizing the VSML RNN to generalize to future inputs given all inputs it has seen so far. We do not pre-train $V _ { M }$ with a human-engineered LA.
142
+
143
+ ![](images/7b033cbe1d2c5cc6f6e774fb5334f6d5b86759ee6986d192914ef27be40db278.jpg)
144
+ Figure 6: The VSML RNN can be directly meta trained on MNIST to minimize the sum of errors when classifying online starting from a random state initialization. This allows for faster learning during meta testing compared to online gradient descent with Adam on the same dataset and even generalizes to a different dataset (Fashion MNIST). In comparison, a standard Meta RNN [16] strongly overfits in the same setting. Standard deviations are over 128 seeds.
145
+
146
+ During meta testing on MNIST (Figure 6) we plot the cumulativputs on the y axis $\textstyle { \bigl ( } { \frac { 1 } { T } } \sum _ { t = 1 } ^ { T } c _ { t }$ n all previous after example $T$
147
+
148
+ indicating prediction correctness). For each example, the prediction when this example was fed to the RNN is used, thus measuring sample efficient learning. This evaluation protocol is similar to the one used in Meta RNNs [56, 10]. We observe that learning is considerably faster compared to the baseline of online gradient descent (no mini batching, the learning rate appropriately tuned). One possibility is that VSML simply overfits to the training distribution. We reject this possibility by meta testing the same unmodified RNN on a different dataset, here Fashion MNIST. Learning still works well, meaning we have meta learned a fairly general LA (although performance at convergence still lacks behind a little). This generalization is achieved without using any hardcoded gradients during meta testing purely by running the RNN forward. In comparison to VSML, a Meta RNN heavily overfits.
149
+
150
+ # 4.3 Robustness to varying inputs and outputs
151
+
152
+ A defining property of VSML is that the same parameters $V _ { M }$ can be used to learn on varying input and output sizes. Further, the architecture and thus the meta learned LA is invariant to the order of inputs and outputs. In this experiment, we investigate how robust we are to such changes. We meta train across MNIST with 3, 4, 6, and 7 classes. Likewise, we train across rescaled versions with 14x14, $2 8 \mathbf { x } 2 8$ , and $3 2 \mathrm { x } 3 2$ pixels. We also randomly project all inputs using a linear transformation, with the transforma
153
+
154
+ ![](images/c628948506067fe04ffbb9c085630d6448553be811bf1db3b99f5a94303b235f.jpg)
155
+ Figure 7: The meta learned learning algorithm is robust to permutations and size changes in the inputs and outputs. All six configurations have not been seen during training and perform comparable to the unchanged reference. Standard deviations are over 32 seeds.
156
+
157
+ tion fixed for all inner learning steps. In Figure 7 we meta test on 6 configurations that were not seen during meta training. Performance on all of these configurations is comparable to the unchanged reference from the previous section. In particular, the invariance to random projections suggests that we have meta learned a learning algorithm beyond transferring learned representations [compare 11, 54, 55].
158
+
159
+ ![](images/319cf9db2760a541d350ef7249d327ed4957d5292c4dc26af98cc095f61ec93b.jpg)
160
+ Figure 8: Online learning on various datasets. Cumulative accuracy in $\%$ after having seen $2 \mathrm { k }$ training examples evaluated after each prediction starting with random states (VSML, Meta RNN, HebbianFW, FWMemory) or random parameters (SGD). Standard deviations are over 32 meta test training runs. Meta testing is done on the official test set of each dataset. Meta training is on subsets of datasets excluding the Sum Sign dataset. Unseen tasks, most relevant from a general-purpose LA perspective, are opaque.
161
+
162
+ # 4.4 Varying datasets
163
+
164
+ To better understand how different meta training distributions and meta test datasets affect VSML RNNs and our baselines, we present several different combinations in Figure 8. The opaque bars represent tasks that were not seen during meta training and are thus most relevant for this analysis. This includes four additional datasets: (1) Kuzushiji MNIST [7] with 10 classes, (2) EMNIST [9] with 62 classes, (3) A randomly generated classification dataset (Random) with 20 data points that changes with each step in the outer loop, and (4) Sum Sign which generates random inputs and requires classifying the sign of the sum of all inputs. Meta training is done over 500 randomly drawn samples per outer iteration. Each algorithm is meta trained for $1 0 \mathrm { k }$ outer iterations. Inputs are randomly projected as in Section 4.3 (for VSML; the baselines did not benefit from these augmentations). We again report the cumulative accuracy on all data seen since the beginning of meta test training. We compare to SGD with a single layer, matching the architecture of VSML, and a hidden layer, matching the number of weights to the size of $V _ { L }$ in VSML. We also have included a Hebbian fast weight baseline [25] and an external (fast weight) memory approach [42].
165
+
166
+ We observe that VSML generalizes much better than Meta RNNs, Hebbian fast weights, and the external memory. These baselines overfit to the training environments. Notably, VSML even generalizes to the unseen tasks Random and Sum Sign which have no shared structure with the other datasets. In many cases VSML’s performance is similar to SGD but a little more sample efficient in the beginning of training (learning curves in Appendix B). This suggests that our meta learned LAs are good at quickly associating new inputs with their labels. We further investigate this in the next Section 5.
167
+
168
+ # 5 Analysis
169
+
170
+ Given that VSML seems to learn faster than online gradient descent in many cases we would like to qualitatively investigate how learning differs. We first meta train on the full MNIST dataset as before. During meta testing, we plot the output probabilities for each digit against the number of samples seen in Figure 9. We highlight the ground truth input class $\boxed { \begin{array} { r l } \end{array} }$ as well as the predicted class $\bigcirc$ . In this case, our meta test dataset consists of MNIST digits with two examples of each type. The same digit is always repeated twice. This allows us to observe and visualize the effect with only a few examples. We have done the same introspection with the full dataset in Appendix B.
171
+
172
+ We observe that in VSML almost all failed predictions are followed by the correct prediction with high certainty. In contrast, SGD
173
+
174
+ ![](images/eaac26941486bc755c21019531e0870ec146a660bf3bfc809cb2fca51d5e7b20.jpg)
175
+ Figure 9: Introspection of how output probabilities change after observing an input and the prediction error when meta testing on MNIST with two examples for each type. We highlight the ground truth class $\boxed { \begin{array} { r l } \end{array} }$ as well as the predicted class $\bigcirc$ . The top plot shows VSML quickly associating the input images with the right label, almost always making the right prediction the second time with high confidence. The bottom plot shows the same dataset processed by SGD with Adam which fails to learn quickly.
176
+
177
+ makes many incorrect predictions and fails to adapt correctly in only 20 steps. It seems that SGD learns qualitatively different from VSML. The VSML RNN meta learns to quickly associate new inputs with their class whereas SGD fails to do so. We tried several different SGD learning rates and considered multiple steps on the same input. In both cases, SGD does not behave similar to VSML, either learning much slower or forgetting previous examples. As evident from high accuracies in Figure 8, VSML does not only memorize inputs using this strategy of fast association, but the associations generalize to future unseen inputs.
178
+
179
+ # 6 Related Work
180
+
181
+ Memory based meta learning (Meta RNNs) Memory-based meta learning in RNNs [16, 10, 56] is a simple neural meta learner (see Section 2). Unfortunately, the LA encoded in the RNN parameters is largely overparameterized which leads to overfitting. VSML demonstrates that weight sharing can address this issue resulting in more general-purpose LAs.
182
+
183
+ Learned Learning Rules / Fast Weights NNs that generate or change the weights of another or the same NN are known as fast weight programmers [44], hypernetworks [14], NNs with synaptic plasticity [25] or learned learning rules [4] (see Section 2). In VSML we do not require explicit architectures for weight updates as weights are emergent from RNN state updates. In addition to the learning rule, we implicitly learn how the neural forward computation is defined. Concurrent to this work, fast weights have also been used to meta learn more general LAs [39].
184
+
185
+ Learned gradient-based optimizers Meta learning has been used to find optimizers that update the parameters of a model by taking the loss and gradient with respect to these parameters as an input [34, 2, 22, 24]. In this work, we are interested in meta learning that does not rely on fixed gradient calculation in the inner loop.
186
+
187
+ Discrete program search An interesting alternative to distributed variable updates in VSML is meta learning via discrete program search [48, 35]. In this paradigm, a separate programming language needs to be defined that gives rise to neural computation when its instructions are combined. This led to the automated rediscovery of backpropagation [35]. In VSML we demonstrate that a symbolic programming language is not required and general-purpose LAs can be discovered and encoded in variable-shared RNNs. Search over neural network parameters is usually easier compared to symbolic program search due to smoothness in the loss landscape.
188
+
189
+ Multi-agent systems In the reinforcement learning setting multiple agents can be modeled with shared parameters [50, 32, 18], also in the context of meta learning [36]. This is related to the variable sharing in VSML depending on how the agent-environment boundary is drawn. Unlike these works, we demonstrate the advantage of variable sharing in meta learning more general-purpose LAs and present a weight update interpretation.
190
+
191
+ # 7 Discussion and Limitations
192
+
193
+ The research community has perfected the art of leveraging backpropagation for learning for a long time. At the same time, there are open questions such as how to minimize memory requirements, effectively learn online and continually, learn sample efficiently, learn without separate backward phases, and others. VSML suggests that instead of building on top of backpropagation as a fixed routine, meta learning offers an alternative to discover general-purpose LAs. Nevertheless, this paper is only a proof of concept—until now we have only investigated small-scale problems and performance does not yet quite match the mini-batched setting with large quantities of data. In particular, we observed premature convergence of the solution at meta test time which calls for further investigations. Scaling our system to harder problems and larger meta task distributions will be important future work.
194
+
195
+ The computational cost of the current VSML variant is also larger than the one of standard backpropagation. If we run a sub-RNN for each weight in a standard NN with $W$ weights, the cost is in $O ( W N ^ { 2 } )$ , where $N$ is the state size of a sub-RNN. If $N$ is small enough, and our experiments suggest small $N$ may be feasible, this may be an acceptable cost. However, VSML is not bound to the interpretation of a sub-RNN as one weight. Future work may relax this particular choice.
196
+
197
+ Meta optimization is also prone to local minima. In particular, when the number of ticks between input and feedback increases (e.g. deeper architectures), credit assignment becomes harder. Early experiments suggest that diverse meta task distributions can help mitigate these issues. Additionally, learning horizons are limited when using backprop-based meta optimization. Using ES allowed for training across longer horizons and more stable optimization.
198
+
199
+ VSML can also be viewed as regularizing the NN weights that encode the LA through a representational bottleneck. It is conceivable that LA generalization as obtained by VSML can also be achieved through other regularization techniques. Unlike most regularizers, VSML also introduces substantial reuse of the same learning principle and permutation invariance through variable sharing.
200
+
201
+ # 8 Conclusion
202
+
203
+ We introduced Variable Shared Meta Learning (VSML), a simple principle of weight sharing and sparsity for meta learning powerful learning algorithms (LAs). Our implementation replaces the weights of a neural network with tiny LSTMs that share parameters. We discuss connections to meta recurrent neural networks, fast weight generators (hyper networks), and learned learning rules.
204
+
205
+ Using learning algorithm cloning, VSML RNNs can learn to implement the backpropagation algorithm and its parameter updates encoded implicitly in the recurrent dynamics. On MNIST it learns to predict well without any human-designed explicit computational graph for gradient calculation.
206
+
207
+ VSML can meta learn from scratch supervised LAs that do not explicitly rely on gradient computation and that generalize to unseen datasets. Introspection reveals that VSML LAs learn by fast association in a way that is qualitatively different from stochastic gradient descent. This leads to gains in sample efficiency. Future work will focus on reinforcement learning settings, improvements of meta learning, larger task distributions, and learning over longer horizons.
208
+
209
+ # Acknowledgements
210
+
211
+ We thank Sjoerd van Steenkiste, Imanol Schlag, Kazuki Irie, and the anonymous reviewers for their comments and feedback. This work was supported by the ERC Advanced Grant (no: 742870) and computational resources by the Swiss National Supercomputing Centre (CSCS, projects $s 9 7 8$ and s1041). We also thank NVIDIA Corporation for donating several DGX machines as part of the Pioneers of AI Research Award, IBM for donating a Minsky machine, and weights & biases [5] for their great experiment tracking software and support.
212
+
213
+ # References
214
+
215
+ [1] F. Alet, M. F. Schneider, T. Lozano-Perez, and L. P. Kaelbling. Meta-learning curiosity algorithms. In International Conference on Learning Representations, 2020.
216
+ [2] M. Andrychowicz, M. Denil, S. G. Colmenarejo, M. W. Hoffman, D. Pfau, T. Schaul, B. Shillingford, and N. De Freitas. Learning to learn by gradient descent by gradient descent. In Advances in Neural Information Processing Systems, pages 3988–3996, 6 2016.
217
+ [3] J. Ba, G. Hinton, V. Mnih, J. Z. Leibo, and C. Ionescu. Using Fast Weights to Attend to the Recent Past. In Advances in Neural Information Processing Systems, pages 4331–4339, 2016.
218
+ [4] S. Bengio, Y. Bengio, J. Cloutier, and J. Gecsei. On the optimization of a synaptic learning rule. In Preprints Conf. Optimality in Artificial and Biological Neural Networks, pages 6–8, 1992.
219
+ [5] L. Biewald. Experiment Tracking with Weights and Biases, 2020. URL https://www.wandb. com/.
220
+ [6] K. Cho, B. van Merrienboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio. Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation. Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1724–1734, 6 2014.
221
+ [7] T. Clanuwat, M. Bober-Irizar, A. Kitamoto, A. Lamb, K. Yamamoto, and D. Ha. Deep Learning for Classical Japanese Literature, 2018.
222
+ [8] E. F. Codd. Cellular automata. Academic press, 2014.
223
+ [9] G. Cohen, S. Afshar, J. Tapson, and A. V. Schaik. EMNIST: Extending MNIST to handwritten letters. 2017 International Joint Conference on Neural Networks (IJCNN), 2017. doi: 10.1109/ ijcnn.2017.7966217.
224
+ [10] Y. Duan, J. Schulman, X. Chen, P. L. Bartlett, I. Sutskever, and P. Abbeel. RLˆ2: Fast Reinforcement Learning via Slow Reinforcement Learning. arXiv preprint arXiv:1611.02779, 2016.
225
+ [11] C. Finn, P. Abbeel, and S. Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 1126–1135, 2017.
226
+ [12] F. A. Gers, J. Schmidhuber, and F. Cummins. Learning to Forget: Continual Prediction with LSTM. Neural Computation, 12(10):2451–2471, 2000.
227
+ [13] K. Gregor. Finding online neural update rules by learning to remember. arXiv preprint arXiv:2003.03124, 3 2020.
228
+ [14] D. Ha, A. Dai, and Q. V. Le. HyperNetworks. In International Conference on Learning Representations, 2016.
229
+ [15] S. Hochreiter and J. Schmidhuber. Long Short-Term Memory. Neural Computation, 9(8): 1735–1780, 1997.
230
+ [16] S. Hochreiter, A. S. Younger, and P. R. Conwell. Learning to learn using gradient descent. In International Conference on Artificial Neural Networks, 2001.
231
+ [17] R. Houthooft, R. Y. Chen, P. Isola, B. C. Stadie, F. Wolski, J. Ho, and P. Abbeel. Evolved Policy Gradients. In Advances in Neural Information Processing Systems, pages 5400–5409, 2018.
232
+ [18] W. Huang, I. Mordatch, and D. Pathak. One Policy to Control Them All: Shared Modular Policies for Agent-Agnostic Control. In International Conference on Machine Learning, 2020.
233
+ [19] L. Kirsch, J. Kunze, and D. Barber. Modular Networks: Learning to Decompose Neural Computation. Advances in Neural Information Processing Systems, 2018.
234
+ [20] L. Kirsch, S. van Steenkiste, and J. Schmidhuber. Improving Generalization in Meta Reinforcement Learning using Learned Objectives. In International Conference on Learning Representations, 2020.
235
+ [21] Y. LeCun, C. Cortes, and C. J. Burges. MNIST handwritten digit database. ATT Labs [Online]. Available: http://yann.lecun.com/exdb/mnist, 2, 2010.
236
+ [22] K. Li and J. Malik. Learning to Optimize. arXiv preprint arXiv:1606.01885, 2016.
237
+ [23] S. Linnainmaa. The representation of the cumulative rounding error of an algorithm as a Taylor expansion of the local rounding errors. PhD thesis, Univ. Helsinki, 1970.
238
+ [24] L. Metz, N. Maheswaranathan, C. D. Freeman, B. Poole, and J. Sohl-Dickstein. Tasks, stability, architecture, and compute: Training more effective learned optimizers, and using them to train themselves. arXiv preprint arXiv:2009.11243, 9 2020.
239
+ [25] T. Miconi, J. Clune, and K. O. Stanley. Differentiable plasticity: training plastic neural networks with backpropagation. In International Conference on Machine Learning, 2018.
240
+ [26] T. Miconi, A. Rawal, J. Clune, and K. O. Stanley. Backpropamine: training self-modifying neural networks with differentiable neuromodulated plasticity. In International Conference on Learning Representations, 2019.
241
+ [27] N. Mishra, M. Rohaninejad, and X. U. Chen Pieter Abbeel Berkeley. A Simple Neural Attentive Meta-Learner. In International Conference on Learning Representations, 2018.
242
+ [28] A. Mordvintsev, E. Randazzo, E. Niklasson, and M. Levin. Growing neural cellular automata. Distill, 5(2):e23, 2020.
243
+ [29] M. C. Mozer and S. Das. A connectionist symbol manipulator that discovers the structure of context-free languages. In Advances in neural information processing systems, pages 863–870, 1993.
244
+ [30] E. Najarro and S. Risi. Meta-Learning through Hebbian Plasticity in Random Networks. Advances in Neural Information Processing Systems, 2020.
245
+ [31] J. Oh, M. Hessel, W. M. Czarnecki, Z. Xu, H. van Hasselt, S. Singh, and D. Silver. Discovering Reinforcement Learning Algorithms. arXiv preprint arXiv:2007.08794, 2020.
246
+ [32] D. Pathak, C. Lu, T. Darrell, P. Isola, and A. A. Efros. Learning to Control Self-Assembling Morphologies: A Study of Generalization via Modularity. In Advances in Neural Information Processing Systems, 2019.
247
+ [33] E. Randazzo, E. Niklasson, and A. Mordvintsev. MPLP: Learning a Message Passing Learning Protocol. arXiv preprint arXiv:2007.00970, 2020.
248
+ [34] S. Ravi and H. Larochelle. Optimization as a model for few-shot learning. In International Conference on Learning Representations, 2016.
249
+ [35] E. Real, C. Liang, D. R. So, and Q. V. Le. AutoML-Zero: Evolving Machine Learning Algorithms From Scratch. In International Conference on Machine Learning, pages 8007–8019, 2020.
250
+ [36] M. Rosa, O. Afanasjeva, S. Andersson, J. Davidson, N. Guttenberg, P. Hlubucek, M. Poliak, ˇ J. Vítku, and J. Feyereisl. BADGER: Learning to (Learn [Learning Algorithms] through Multi-Agent Communication). arXiv preprint arXiv:1912.01513, 2019.
251
+ [37] C. Rosenbaum, T. Klinger, and M. Riemer. Routing Networks: Adaptive Selection of NonLinear Functions for Multi-Task Learning. In International Conference on Learning Representations, 2018.
252
+ [38] T. Salimans, J. Ho, X. Chen, S. Sidor, and I. Sutskever. Evolution Strategies as a Scalable Alternative to Reinforcement Learning. arXiv preprint arXiv:1703.03864, 3 2017. ISSN ISSN 0302-9743. doi: 10.1.1.51.6328.
253
+ [39] M. Sandler, M. Vladymyrov, A. Zhmoginov, N. Miller, A. Jackson, T. Madams, and others. Meta-Learning Bidirectional Update Rules. arXiv preprint arXiv:2104.04657, 2021.
254
+ [40] A. Santoro, S. Bartunov, M. Botvinick, D. Wierstra, and T. Lillicrap. Meta-Learning with Memory-Augmented Neural Networks. In International conference on machine learning, pages 1842–1850, 2016.
255
+ [41] I. Schlag and J. Schmidhuber. Gated Fast Weights for On-The-Fly Neural Program Generation. In NIPS Metalearning Workshop, 2017.
256
+ [42] I. Schlag, T. Munkhdalai, and J. Schmidhuber. Learning Associative Inference Using Fast Weight Memory. In International Conference on Learning Representations, 2021.
257
+ [43] J. Schmidhuber. Evolutionary principles in self-referential learning. Diploma thesis, Institut für Informatik, Technische Universität München, 1987.
258
+ [44] J. Schmidhuber. Learning to Control Fast-Weight Memories: An Alternative to Recurrent Nets. Technical Report FKI-147-91, Institut für Informatik, Technische Universität München, 3 1991.
259
+ [45] J. Schmidhuber. Learning to Control Fast-Weight Memories: An Alternative to Dynamic Recurrent Networks. Neural Computation, 4(1):131–139, 1992. ISSN 0899-7667. doi: 10.1162/neco.1992.4.1.131.
260
+ [46] J. Schmidhuber. Reducing the ratio between learning complexity and number of time varying variables in fully recurrent nets. In International Conference on Artificial Neural Networks, pages 460–463. Springer, 1993.
261
+ [47] J. Schmidhuber. A self-referential weight matrix. In Proceedings of the International Conference on Artificial Neural Networks, Amsterdam, pages 446–451. Springer, 1993.
262
+ [48] J. Schmidhuber. Discovering Problem Solutions with Low Kolmogorov Complexity and High Generalization Capability. Technical Report FKI-194-94, Fakultät für Informatik, Technische Universität München, 1994.
263
+ [49] N. Shazeer, A. Mirhoseini, K. Maziarz, A. Davis, Q. Le, G. Hinton, and J. Dean. Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer. arXiv preprint arXiv:1701.06538, 2017.
264
+ [50] Sims, Karl. Evolving Virtual Creatures. ACM SIGGRAPH, 1994.
265
+ [51] A. Sperduti. Encoding labeled graphs by labeling raam. Advances in Neural Information Processing Systems, pages 1125–1125, 1994.
266
+ [52] S. Sudhakaran, D. Grbic, S. Li, A. Katona, E. Najarro, C. Glanois, and S. Risi. Growing 3d artefacts and functional machines with neural cellular automata. arXiv preprint arXiv:2103.08737, 2021.
267
+ [53] G. Z. Sun. Neural networks with external memeory stack that learn context-free grammars from examples. In Proceedings of the Conference on Information Science and Systems, 1991, pages 649–653. Princeton University, 1991.
268
+ [54] E. Triantafillou, T. Zhu, V. Dumoulin, P. Lamblin, U. Evci, K. Xu, R. Goroshin, C. Gelada, K. Swersky, P.-A. Manzagol, and H. Larochelle. Meta-Dataset: A Dataset of Datasets for Learning to Learn from Few Examples. 3 2019.
269
+ [55] H.-Y. Tseng, H.-Y. Lee, J.-B. Huang, and M.-H. Yang. Cross-domain few-shot classification via learned feature-wise transformation. arXiv preprint arXiv:2001.08735, 2020.
270
+ [56] J. X. Wang, Z. Kurth-Nelson, D. Tirumala, H. Soyer, J. Z. Leibo, R. Munos, C. Blundell, D. Kumaran, and M. Botvinick. Learning to reinforcement learn. arXiv preprint arXiv:1611.05763, 2016.
271
+ [57] D. Wierstra, T. Schaul, J. Peters, and J. Schmidhuber. Natural Evolution Strategies. In 2008 IEEE Congress on Evolutionary Computation (IEEE World Congress on Computational Intelligence), pages 3381–3387, 2008.
272
+ [58] Z. Wu, S. Pan, F. Chen, G. Long, C. Zhang, and S. Y. Philip. A comprehensive survey on graph neural networks. IEEE Transactions on Neural Networks and Learning Systems, 2020.
273
+ [59] H. Xiao, K. Rasul, and R. Vollgraf. Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms. CoRR, abs/1708.0, 2017.
parse/train/hhU9TEvB6AF/hhU9TEvB6AF_content_list.json ADDED
@@ -0,0 +1,1193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Meta Learning Backpropagation And Improving It ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 187,
8
+ 122,
9
+ 808,
10
+ 148
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Louis Kirsch1, Jürgen Schmidhuber1,2 \n1The Swiss AI Lab IDSIA, University of Lugano (USI) & SUPSI, Lugano, Switzerland \n2King Abdullah University of Science and Technology (KAUST), Thuwal, Saudi Arabia {louis, juergen}@idsia.ch ",
17
+ "bbox": [
18
+ 210,
19
+ 199,
20
+ 789,
21
+ 258
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 462,
31
+ 292,
32
+ 535,
33
+ 310
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Many concepts have been proposed for meta learning with neural networks (NNs), e.g., NNs that learn to reprogram fast weights, Hebbian plasticity, learned learning rules, and meta recurrent NNs. Our Variable Shared Meta Learning (VSML) unifies the above and demonstrates that simple weight-sharing and sparsity in an NN is sufficient to express powerful learning algorithms (LAs) in a reusable fashion. A simple implementation of VSML where the weights of a neural network are replaced by tiny LSTMs allows for implementing the backpropagation LA solely by running in forward-mode. It can even meta learn new LAs that differ from online backpropagation and generalize to datasets outside of the meta training distribution without explicit gradient calculation. Introspection reveals that our meta learned LAs learn through fast association in a way that is qualitatively different from gradient descent. ",
40
+ "bbox": [
41
+ 233,
42
+ 325,
43
+ 766,
44
+ 491
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 174,
54
+ 517,
55
+ 310,
56
+ 535
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "The shift from standard machine learning to meta learning involves learning the learning algorithm (LA) itself, reducing the burden on the human designer to craft useful learning algorithms [43]. Recent meta learning has primarily focused on generalization from training tasks to similar test tasks, e.g., few-shot learning [11], or from training environments to similar test environments [17]. This contrasts human-engineered LAs that generalize across a wide range of datasets or environments. Without such generalization, meta learned LAs can not entirely replace human-engineered variants. Recent work demonstrated that meta learning can also successfully generate more general LAs that generalize across wide spectra of environments [20, 1, 31], e.g., from toy environments to Mujoco and Atari. Unfortunately, however, many recent approaches still rely on a large number of human-designed and unmodifiable inner-loop components such as backpropagation. ",
63
+ "bbox": [
64
+ 174,
65
+ 547,
66
+ 825,
67
+ 688
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Is it possible to implement modifiable versions of backpropagation or related algorithms as part of the end-to-end differentiable activation dynamics of a neural net (NN), instead of inserting them as separate fixed routines? Here we propose the Variable Shared Meta Learning (VSML) principle for this purpose. It introduces a novel way of using sparsity and weight-sharing in NNs for meta learning. We build on the arguably simplest neural meta learner, the meta recurrent neural network (Meta RNN) [16, 10, 56], by replacing the weights of a neural network with tiny LSTMs. The resulting system can be viewed as many RNNs passing messages to each other, or as one big RNN with a sparse shared weight matrix, or as a system learning each neuron’s functionality and its LA. VSML generalizes the principle behind end-to-end differentiable fast weight programmers [45, 46, 3, 41], hyper networks [14], learned learning rules [4, 13, 33], and hebbian-like synaptic plasticity [44, 46, 25, 26, 30]. Our mechanism, VSML, can implement backpropagation solely in the forward-dynamics of an RNN. Consequently, it enables meta-optimization of backproplike algorithms. We envision a future where novel methods of credit assignment can be meta learned while still generalizing across vastly different tasks. This may lead to improvements in sample efficiency, memory efficiency, continual learning, and others. As a first step, our system meta learns online LAs from scratch that frequently learn faster than gradient descent and generalize to datasets outside of the meta training distribution (e.g., from MNIST to Fashion MNIST). Our VSML RNN is the first neural meta learner without hard-coded backpropagation that shows such strong generalization. ",
74
+ "bbox": [
75
+ 174,
76
+ 693,
77
+ 825,
78
+ 900
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "",
85
+ "bbox": [
86
+ 174,
87
+ 90,
88
+ 825,
89
+ 147
90
+ ],
91
+ "page_idx": 1
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "2 Background ",
96
+ "text_level": 1,
97
+ "bbox": [
98
+ 174,
99
+ 165,
100
+ 308,
101
+ 183
102
+ ],
103
+ "page_idx": 1
104
+ },
105
+ {
106
+ "type": "text",
107
+ "text": "Deep learning-based meta learning that does not rely on fixed gradient descent in the inner loop has historically fallen into two categories, 1) Learnable weight update mechanisms that allow for changing the parameters of an NN to implement a learning rule (FWPs / LLRs), and 2) Learning algorithms implemented in black-box models such as recurrent neural networks (Meta RNNs). ",
108
+ "bbox": [
109
+ 174,
110
+ 196,
111
+ 825,
112
+ 252
113
+ ],
114
+ "page_idx": 1
115
+ },
116
+ {
117
+ "type": "text",
118
+ "text": "Fast weight programmers & Learned learning rules (FWPs / LLRs) In a standard NN, the weights are updated by a fixed LA. This framework can be extended to meta learning by defining an explicit architecture that allows for modifying these weights. This weight-update architecture augments a standard NN architecture. NNs that generate or change the weights of another or the same NN are known as fast weight programmers (FWPs) [44, 45, 46, 3, 41], hypernetworks [14], NNs with synaptic plasticity [25, 26, 30] or learned learning rules [4, 13, 33]. Often these architectures make use of local Hebbian-like update rules or outer-products, and we summarize this category as FWPs / LLRs. In FWPs / LLRs the variables $V _ { L }$ that are subject to learning are the weights of the network, whereas the meta-variables $V _ { M }$ that implement the LA are defined by the weight-update architecture. Note that the dimensionality of $V _ { L }$ and $V _ { M }$ can be defined independently of each other and often $V _ { M }$ are reused in a coordinate-wise fashion for $V _ { L }$ resulting in $| V _ { L } | \\gg | V _ { M } |$ , where $| \\cdot |$ is the number of elements. ",
119
+ "bbox": [
120
+ 173,
121
+ 266,
122
+ 825,
123
+ 431
124
+ ],
125
+ "page_idx": 1
126
+ },
127
+ {
128
+ "type": "text",
129
+ "text": "Black-box learning in activations (Meta RNNs) It was shown that an RNN such as LSTM can learn to implement an LA [16] when the reward or error is given as an input [47]. After meta training, the LA is encoded in the weights of this RNN and determines learning during meta testing. The activations serve as the memory used for the LA solution. We refer to this as Meta RNNs [16, 10, 56] (Also sometimes referred to as memory-based meta learning.). They are conceptually simpler than FWPs / LLRs as no additional weight-update rules with many degrees of freedom need to be defined. In Meta RNNs $V _ { L }$ are the RNN activations and $V _ { M }$ are the parameters for the RNN. Note that an RNN with $N$ neurons will yield $| V _ { L } | = O ( N )$ and $| V _ { M } | = \\stackrel { \\cdot } { O } ( N ^ { 2 } )$ [46]. This means that the LA is largely overparameterized whereas the available memory for learning is very small, making this approach prone to overfitting [20]. As a result, the RNN parameters often encode task-specific solutions instead of generic LAs. Meta learning a simple and generalizing LA would benefit from $| V _ { L } | \\gg | V _ { M } |$ . Previous approaches have tried to mend this issue by adding architectural complexity through additional memory mechanisms [53, 29, 40, 27, 42]. ",
130
+ "bbox": [
131
+ 173,
132
+ 446,
133
+ 826,
134
+ 626
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "3 Variable Shared Meta Learning (VSML) ",
141
+ "text_level": 1,
142
+ "bbox": [
143
+ 173,
144
+ 643,
145
+ 545,
146
+ 662
147
+ ],
148
+ "page_idx": 1
149
+ },
150
+ {
151
+ "type": "text",
152
+ "text": "In VSML we build on the simplicity of Meta RNNs while retaining $| V _ { L } | \\gg | V _ { M } |$ from FWPs / LLRs. We do this by reusing the same few parameters $V _ { M }$ many times in an RNN (via variable sharing) and introducing sparsity in the connectivity. This yields several interpretations for VSML: ",
153
+ "bbox": [
154
+ 174,
155
+ 675,
156
+ 826,
157
+ 717
158
+ ],
159
+ "page_idx": 1
160
+ },
161
+ {
162
+ "type": "text",
163
+ "text": "$\\textcircled{8}$ VSML as a single Meta RNN with a sparse shared weight matrix (Figure 1a). The most general description. \n$\\textcircled{8}$ VSML as message passing between RNNs (Figure 1b). We choose a simple sharing and sparsity scheme for the weight matrix such that it corresponds to multiple RNNs with shared parameters that exchange information. \n$©$ VSML as complex neurons with learned updates (Figure 1c). When choosing a specific connectivity between RNNs, states / activations $V _ { L }$ of these RNNs can be interpreted as the weights of a conventional NN, consequently blurring the distinction between a weight and an activation. ",
164
+ "bbox": [
165
+ 205,
166
+ 728,
167
+ 825,
168
+ 866
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": "Introducing variable sharing to Meta RNNs We begin by formalizing Meta RNNs which often use multiplicative gates such as the LSTM [12, 15] or its variant GRU [6]. For notational simplicity, we consider a vanilla RNN. Let $s \\in \\mathbb { R } ^ { N }$ be the hidden state of an RNN. The update for an element $j \\in \\{ 1 , \\ldots , N \\}$ is given by ",
175
+ "bbox": [
176
+ 173,
177
+ 882,
178
+ 821,
179
+ 911
180
+ ],
181
+ "page_idx": 1
182
+ },
183
+ {
184
+ "type": "image",
185
+ "img_path": "images/b1ae57af27d23bff08bcfc6f114db04ece9a7f8b38923249b2e9e1b42ad6a50f.jpg",
186
+ "image_caption": [
187
+ "Figure 1: Different perspectives on VSML: (a) A single Meta RNN [16] where entries in the weight matrix are shared or zero. (a) VSML consists of many sub-RNNs with shared parameters $V _ { M }$ passing messages between each other. (c) VSML implements an NN with complex neurons (here 2 neurons). $V _ { M }$ determines the nature of weights, how these are used in the neural computation, and the LA by which those are updated. Each weight $w _ { a b } \\in \\mathbb { R }$ is represented by the multi-dimensional RNN state ${ s _ { a b } } \\in \\mathbb { R } ^ { N }$ . Neuron activations correspond to messages $\\overrightarrow { m }$ passed between sub-RNNs. "
188
+ ],
189
+ "image_footnote": [],
190
+ "bbox": [
191
+ 191,
192
+ 87,
193
+ 818,
194
+ 223
195
+ ],
196
+ "page_idx": 2
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "",
201
+ "bbox": [
202
+ 176,
203
+ 339,
204
+ 823,
205
+ 369
206
+ ],
207
+ "page_idx": 2
208
+ },
209
+ {
210
+ "type": "equation",
211
+ "img_path": "images/aec312823b19fbd3996491d88091d87c5725063323dbba06de0ca3464831a762.jpg",
212
+ "text": "$$\ns _ { j } \\gets f _ { \\mathrm { R N N } } ( s ) _ { j } = \\sigma ( \\sum _ { i } s _ { i } W _ { i j } ) ,\n$$",
213
+ "text_format": "latex",
214
+ "bbox": [
215
+ 388,
216
+ 367,
217
+ 606,
218
+ 401
219
+ ],
220
+ "page_idx": 2
221
+ },
222
+ {
223
+ "type": "text",
224
+ "text": "where $\\sigma$ is a non-linear activation function, $W \\in \\mathbb { R } ^ { N \\times N }$ , and the bias is omitted for simplicity. We also omit inputs by assuming a subset of $s$ to be externally provided. Each application of Equation 1 reflects a single time tick in the RNN. ",
225
+ "bbox": [
226
+ 173,
227
+ 402,
228
+ 825,
229
+ 448
230
+ ],
231
+ "page_idx": 2
232
+ },
233
+ {
234
+ "type": "text",
235
+ "text": "We now introduce variable sharing (reusing $W$ ) into the RNN by duplicating the computation along two axes of size $A , B$ (here $A = B$ , which will later be relaxed) giving $\\bar { s } \\in \\mathbb { R } ^ { A \\times B \\times N }$ . For $a \\in \\{ 1 , \\dotsc , A \\} , b \\in \\{ 1 , \\dotsc , B \\}$ we have ",
236
+ "bbox": [
237
+ 173,
238
+ 452,
239
+ 825,
240
+ 497
241
+ ],
242
+ "page_idx": 2
243
+ },
244
+ {
245
+ "type": "equation",
246
+ "img_path": "images/bd446ad5b95522b305babefe9b762f10f82ec8bf83cb2ee5e6827d94874df36a.jpg",
247
+ "text": "$$\ns _ { a b j } \\gets f _ { \\mathrm { R N N } } ( s _ { a b } ) _ { j } = \\sigma ( \\sum _ { i } s _ { a b i } W _ { i j } ) .\n$$",
248
+ "text_format": "latex",
249
+ "bbox": [
250
+ 367,
251
+ 502,
252
+ 629,
253
+ 535
254
+ ],
255
+ "page_idx": 2
256
+ },
257
+ {
258
+ "type": "text",
259
+ "text": "This can be viewed as multiple RNNs arranged on a 2-dimensional grid, with shared parameters that update independent states. Here, we chose a particular arrangement (two axes) that will facilitate the interpretation $©$ of RNNs as weights. ",
260
+ "bbox": [
261
+ 173,
262
+ 539,
263
+ 825,
264
+ 584
265
+ ],
266
+ "page_idx": 2
267
+ },
268
+ {
269
+ "type": "text",
270
+ "text": "VSML as message passing between RNNs The computation so far describes $A \\cdot B$ independent RNNs. We connect those by passing messages (interpretation $\\textcircled{8}$ ) ",
271
+ "bbox": [
272
+ 173,
273
+ 597,
274
+ 823,
275
+ 627
276
+ ],
277
+ "page_idx": 2
278
+ },
279
+ {
280
+ "type": "equation",
281
+ "img_path": "images/dbe020d5af66f40b67afaa6858cc17392b6229b77c392d47d8f437e8f795275d.jpg",
282
+ "text": "$$\ns _ { a b } \\gets f _ { \\mathrm { R N N } } ( s _ { a b } , \\overrightarrow { m } _ { a } ) ,\n$$",
283
+ "text_format": "latex",
284
+ "bbox": [
285
+ 421,
286
+ 631,
287
+ 575,
288
+ 648
289
+ ],
290
+ "page_idx": 2
291
+ },
292
+ {
293
+ "type": "text",
294
+ "text": "where the message $\\begin{array} { r } { \\vec { m } _ { b } = \\sum _ { a ^ { \\prime } } f _ { \\vec { m } } ( s _ { a ^ { \\prime } b } ) } \\end{array}$ with $b \\in \\{ 1 , \\dots , A = B \\}$ , $f _ { \\overrightarrow { m } } : \\mathbb { R } ^ { N } \\mathbb { R } ^ { N ^ { \\prime } }$ is fed as an additional input to each RNN. This is related to Graph Neural Networks [51, 58]. Summing over the axis $A$ (elements $a ^ { \\prime }$ ) corresponds to an RNN connectivity mimicking those of weights in an NN (to facilitate interpretation $©$ . We emphasise that other schemes based on different kinds of message passing and graph connectivity are possible. For a simple $f _ { \\overrightarrow { m } }$ defined by the matrix $C \\in \\mathbb { R } ^ { N \\times N }$ , we may equivalently write ",
295
+ "bbox": [
296
+ 173,
297
+ 655,
298
+ 826,
299
+ 744
300
+ ],
301
+ "page_idx": 2
302
+ },
303
+ {
304
+ "type": "equation",
305
+ "img_path": "images/a4fa3ae13d4eb053bd2e1b570e336ff4662b2e762e505e889dc05c1a0c6ebc4a.jpg",
306
+ "text": "$$\ns _ { a b j } \\gets \\sigma ( \\sum _ { i } s _ { a b i } W _ { i j } + \\sum _ { a ^ { \\prime } } f _ { \\overrightarrow { m } } ( s _ { a ^ { \\prime } a } ) ) = \\sigma ( \\sum _ { i } s _ { a b i } W _ { i j } + \\sum _ { a ^ { \\prime } , i } s _ { a ^ { \\prime } a i } C _ { i j } ) .\n$$",
307
+ "text_format": "latex",
308
+ "bbox": [
309
+ 251,
310
+ 748,
311
+ 745,
312
+ 782
313
+ ],
314
+ "page_idx": 2
315
+ },
316
+ {
317
+ "type": "text",
318
+ "text": "This constitutes the minimal version of VSML with $V _ { M } : = ( W , C )$ and is visualized in Figure 1b. ",
319
+ "bbox": [
320
+ 174,
321
+ 787,
322
+ 813,
323
+ 805
324
+ ],
325
+ "page_idx": 2
326
+ },
327
+ {
328
+ "type": "text",
329
+ "text": "VSML as a Meta RNN with a sparse shared weight matrix It is trivial to see that with $A = 1$ and $B = 1$ we obtain a single RNN and Equation 4 recovers the original Meta RNN Equation 1. In the general case, we can derive an equivalent formulation that corresponds to a single standard RNN with a single matrix $\\tilde { W }$ that has entries of zero and shared entries ",
330
+ "bbox": [
331
+ 173,
332
+ 816,
333
+ 825,
334
+ 876
335
+ ],
336
+ "page_idx": 2
337
+ },
338
+ {
339
+ "type": "equation",
340
+ "img_path": "images/eeb3ae8d9676dd584d8b30e1f2e7cd87e1831ed2eae316f1470b3cdab7e9006f.jpg",
341
+ "text": "$$\ns _ { a b j } \\gets \\sigma ( \\sum _ { c , d , i } s _ { c d i } \\tilde { W } _ { c d i a b j } ) ,\n$$",
342
+ "text_format": "latex",
343
+ "bbox": [
344
+ 405,
345
+ 881,
346
+ 593,
347
+ 915
348
+ ],
349
+ "page_idx": 2
350
+ },
351
+ {
352
+ "type": "text",
353
+ "text": "where the six axes can be flattened to obtain the two axes. For Equation 4 and Equation 5 to be equivalent, $\\tilde { W }$ must satisfy (derivation in Appendix A) ",
354
+ "bbox": [
355
+ 169,
356
+ 90,
357
+ 823,
358
+ 122
359
+ ],
360
+ "page_idx": 3
361
+ },
362
+ {
363
+ "type": "equation",
364
+ "img_path": "images/aba9ee62d2cb9e4441538f13c5f01b18fd44f40ab8e22078076d3cef95f3da60.jpg",
365
+ "text": "$$\n\\tilde { W } _ { c d i a b j } = \\left\\{ \\begin{array} { l l } { C _ { i j } , } & { \\mathrm { i f ~ } d = a \\wedge ( d \\neq b \\vee c \\neq a ) . } \\\\ { W _ { i j } , } & { \\mathrm { i f ~ } d \\neq a \\wedge d = b \\wedge c = a . } \\\\ { C _ { i j } + W _ { i j } , } & { \\mathrm { i f ~ } d = a \\wedge d = b \\wedge c = a . } \\\\ { 0 , } & { \\mathrm { o t h e r w i s e . } } \\end{array} \\right.\n$$",
366
+ "text_format": "latex",
367
+ "bbox": [
368
+ 315,
369
+ 131,
370
+ 678,
371
+ 199
372
+ ],
373
+ "page_idx": 3
374
+ },
375
+ {
376
+ "type": "text",
377
+ "text": "This corresponds to interpretation $\\textcircled{8}$ with the weight matrix visualized in Figure 1a. To distinguish between the single sparse shared RNN and the connected RNNs, we now call the latter sub-RNNs. ",
378
+ "bbox": [
379
+ 173,
380
+ 210,
381
+ 825,
382
+ 239
383
+ ],
384
+ "page_idx": 3
385
+ },
386
+ {
387
+ "type": "text",
388
+ "text": "VSML as complex neurons with learned updates The arrangement and connectivity of the subRNNs as described in the previous paragraphs corresponds to that of weights in a standard NN. Thus, in interpretation $@$ , VSML can be viewed as defining complex neurons where each sub-RNN corresponds to a weight in a standard NN as visualized in Figure 1c. All these sub-RNNs share the same parameters but have distinct states. The current formulation corresponds to a single NN layer that is run recurrently. We will generalize this to other architectures in the next section. A corresponds to the dimensionality of the inputs and $B$ to that of the outputs in that layer. ",
389
+ "bbox": [
390
+ 173,
391
+ 256,
392
+ 826,
393
+ 356
394
+ ],
395
+ "page_idx": 3
396
+ },
397
+ {
398
+ "type": "text",
399
+ "text": "The role of weights in a standard neural network is now assigned to the states of RNNs. This allows these RNNs to define both the neural forward computation as well as the learning algorithm that determines how the network is updated (where the mechanism is shared across the network). In the case of backpropagation, this would correspond to the forward and backward passes being implemented purely in the recurrent dynamics. We will demonstrate the practical feasibility of this in Section 3.2. The emergence of ",
400
+ "bbox": [
401
+ 174,
402
+ 361,
403
+ 356,
404
+ 637
405
+ ],
406
+ "page_idx": 3
407
+ },
408
+ {
409
+ "type": "image",
410
+ "img_path": "images/0ccd0fdb8442f57b99da7d0266c5c9a62738c64d643b90443c68ed18becb66cf.jpg",
411
+ "image_caption": [
412
+ "Figure 2: The neural interpretation of VSML replaces all weights of a standard NN with tiny LSTMs using shared parameters (resembling complex neurons). This allows these LSTMs to define both the neural forward computation as well as the learning algorithm that determines how the network is updated. Information flows forward and backward in the network through multi-dimensional messages $\\overrightarrow { m }$ and $\\scriptstyle { \\overleftarrow { m } }$ , generalizing the dynamics of an NN trained using backpropagation. "
413
+ ],
414
+ "image_footnote": [],
415
+ "bbox": [
416
+ 369,
417
+ 366,
418
+ 823,
419
+ 518
420
+ ],
421
+ "page_idx": 3
422
+ },
423
+ {
424
+ "type": "text",
425
+ "text": "RNN states as weights quickly leads to confusing terminology when RNNs have ‘meta weights’. \nInstead, we simply refer to meta variables $V _ { M }$ and learned variables $V _ { L }$ . ",
426
+ "bbox": [
427
+ 173,
428
+ 637,
429
+ 821,
430
+ 665
431
+ ],
432
+ "page_idx": 3
433
+ },
434
+ {
435
+ "type": "text",
436
+ "text": "With this interpretation, VSML can be seen as a generalization of learned learning rules [4, 13, 33] and Hebbian-like differentiable mechanisms or fast weights more generally [44, 46, 25, 26] where RNNs replace explicit weight updates. In standard NNs, weights and activations have multiplicative interactions. For VSML RNNs to mimic such computation we require multiplicative interactions between parts of the state $s$ . Fortunately, LSTMs already incorporate this through gating and can be directly used in place of RNNs. ",
437
+ "bbox": [
438
+ 173,
439
+ 671,
440
+ 825,
441
+ 755
442
+ ],
443
+ "page_idx": 3
444
+ },
445
+ {
446
+ "type": "text",
447
+ "text": "Stacking VSML RNNs and feeding inputs To get a structure similar to one of the non-recurrent deep feed-forward architectures (FNNs), we stack multiple VSML RNNs where their states are untied and their parameters are tied.1 This is visualized with two layers in Figure 2 where the states $s ^ { ( 2 ) }$ of the second column of sub-RNNs are distinct from the first column $\\mathbf { \\boldsymbol { s } } ^ { ( 1 ) }$ . The parameters $A ^ { ( k ) }$ and $B ^ { ( k ) }$ describing layer sizes can then be varied for each layer $k \\in \\{ 1 , \\ldots , K \\}$ constrained by $A ^ { ( k ) } ~ = ~ B ^ { ( k - 1 ) }$ . The updated Equation 3 with distinct layers $k$ is given by $s _ { a b } ^ { ( k ) } f _ { \\mathrm { R N N } } ( s _ { a b } ^ { ( k ) } , \\overrightarrow { m } _ { a } ^ { ( k ) } )$ where $\\begin{array} { r } { \\vec { m } _ { b } ^ { ( k + 1 ) } : = \\sum _ { a ^ { \\prime } } \\bar { f } _ { \\vec { m } } ( s _ { a ^ { \\prime } b } ^ { ( k ) } ) } \\end{array}$ with $b \\in \\{ 1 , \\ldots , B ^ { ( k ) } = A ^ { ( k + 1 ) } \\}$ ",
448
+ "bbox": [
449
+ 173,
450
+ 771,
451
+ 826,
452
+ 880
453
+ ],
454
+ "page_idx": 3
455
+ },
456
+ {
457
+ "type": "text",
458
+ "text": "To prevent information from flowing only forward in the network, we use an additional backward message ",
459
+ "bbox": [
460
+ 173,
461
+ 92,
462
+ 486,
463
+ 133
464
+ ],
465
+ "page_idx": 4
466
+ },
467
+ {
468
+ "type": "equation",
469
+ "img_path": "images/92c1ed6925a96948824b0b65811fe3cd0faa25865ff4b0c03f5daa7040659ab8.jpg",
470
+ "text": "$$\ns _ { a b } ^ { ( k ) } \\gets f _ { R N N } \\big ( s _ { a b } ^ { ( k ) } , \\overrightarrow { m } _ { a } ^ { ( k ) } , \\overleftarrow { m } _ { b } ^ { ( k ) } \\big ) ,\n$$",
471
+ "text_format": "latex",
472
+ "bbox": [
473
+ 217,
474
+ 140,
475
+ 439,
476
+ 162
477
+ ],
478
+ "page_idx": 4
479
+ },
480
+ {
481
+ "type": "text",
482
+ "text": "where $\\begin{array} { r } { \\overleftarrow { m } _ { a } ^ { ( k - 1 ) } : = \\sum _ { b ^ { \\prime } } f _ { \\overleftarrow { m } } ( s _ { a b ^ { \\prime } } ^ { ( k ) } ) } \\end{array}$ with $a \\in$ $\\{ 1 , . . . , A ^ { ( k ) } = B ^ { ( k - 1 ) } \\}$ (visualized in Figure 3). The backward transformation is given by f←−m : RN → RN 00 . ",
483
+ "bbox": [
484
+ 173,
485
+ 167,
486
+ 485,
487
+ 234
488
+ ],
489
+ "page_idx": 4
490
+ },
491
+ {
492
+ "type": "text",
493
+ "text": "Similarly, other neural architectures can be explicitly constructed (e.g. convolutional NNs, Section B.2). Some architectures may be learned implicitly if positional information is fed into each sub-RNN (Appendix C). We then update all states $s ^ { ( k ) }$ in sequence $1 , \\ldots , K$ to mimic sequential layer execution. We may also apply multiple RNN ticks for each layer $k$ . ",
494
+ "bbox": [
495
+ 174,
496
+ 239,
497
+ 485,
498
+ 325
499
+ ],
500
+ "page_idx": 4
501
+ },
502
+ {
503
+ "type": "image",
504
+ "img_path": "images/a5613155d304964c2e8b7d7e753eadbc7c640e13696034612df8983dd1ae3ff5.jpg",
505
+ "image_caption": [
506
+ "Figure 3: VSML with forward messages $\\overrightarrow { m }$ and backward messages $\\scriptstyle { \\overleftarrow { m } }$ to form a two-layer NN with shared LSTM parameters but distinct states. "
507
+ ],
508
+ "image_footnote": [],
509
+ "bbox": [
510
+ 500,
511
+ 92,
512
+ 821,
513
+ 252
514
+ ],
515
+ "page_idx": 4
516
+ },
517
+ {
518
+ "type": "text",
519
+ "text": "",
520
+ "bbox": [
521
+ 171,
522
+ 324,
523
+ 766,
524
+ 338
525
+ ],
526
+ "page_idx": 4
527
+ },
528
+ {
529
+ "type": "text",
530
+ "text": "To provide the VSML RNN with data, each time we execute the operations of the first layer, a single new datum $x \\in \\mathbb { R } ^ { A ( 1 ) }$ (e.g. one flattened image) is distributed across all sub-RNNs. In our present experiments, we match the axis $A ( 1 )$ to the input datum dimensionality such that each dimension (e.g., pixel) is fed to different RNNs. This corresponds to initializing the forward message $\\vec { m } _ { a 1 } ^ { ( 1 ) } : = \\boldsymbol { x } _ { a }$ dding . Fina $\\overrightarrow { m }$ with zeros if nece we feed the error larly, we read the outpuat the output such that $\\boldsymbol { \\hat { y } } \\in \\mathbb { R } ^ { B ( K ) }$ from. See $\\hat { y } _ { a } : = \\overrightarrow { m } _ { a 1 } ^ { ( K + 1 ) }$ $e \\in \\mathbb { R } ^ { B ( K ) }$ $ _ { b 1 } : = e _ { b }$ Figure 2 for a visualization. Alternatively, multiple input or output dimensions could be patched together and fed into fewer sub-RNNs. ",
531
+ "bbox": [
532
+ 173,
533
+ 344,
534
+ 826,
535
+ 465
536
+ ],
537
+ "page_idx": 4
538
+ },
539
+ {
540
+ "type": "text",
541
+ "text": "3.1 Meta learning general-purpose learning algorithms from scratch ",
542
+ "text_level": 1,
543
+ "bbox": [
544
+ 176,
545
+ 482,
546
+ 661,
547
+ 497
548
+ ],
549
+ "page_idx": 4
550
+ },
551
+ {
552
+ "type": "text",
553
+ "text": "Having formalized VSML, we can now use end-to-end meta learning to create LAs from scratch in Algorithm 1. We simply optimize the LSTM parameters $V _ { M }$ to minimize the sum of prediction losses over many time steps starting with random states $V _ { L } : = \\{ s _ { a b } ^ { ( k ) } \\}$ . We focus on meta learning online LAs where one example is fed at a time as done in Meta RNNs [16, 56, 10]. Meta training may be performed using end-to-end gradient descent or gradient-free optimization such as evolutionary strategies [57, 38]. The latter is significantly more efficient on VSML compared to standard NNs due to the small parameter space $V _ { M }$ . Crucially, during meta testing, no explicit gradient descent is used. ",
554
+ "bbox": [
555
+ 173,
556
+ 507,
557
+ 825,
558
+ 608
559
+ ],
560
+ "page_idx": 4
561
+ },
562
+ {
563
+ "type": "text",
564
+ "text": "Algorithm 1 VSML: Meta Training ",
565
+ "text_level": 1,
566
+ "bbox": [
567
+ 174,
568
+ 625,
569
+ 411,
570
+ 640
571
+ ],
572
+ "page_idx": 4
573
+ },
574
+ {
575
+ "type": "text",
576
+ "text": "Require: Dataset(s) $D = \\{ ( x _ { i } , y _ { i } ) \\}$ $V _ { M } \\gets$ initialize LSTM parameters while meta loss has not converged do . Outer loop in parallel over datasets $D$ ${ \\cal V } _ { L } = \\{ s _ { a b } ^ { ( k ) } \\} $ initialize LSTM states $\\forall a , b , k$ for $( x , y ) ^ { \\top } \\in \\{ ( x _ { 1 } , y _ { 1 } ) , \\dotsc , ( x _ { T } , y _ { T } ) \\} \\subset D$ do $\\triangleright$ Inner loop over $T$ examples $ { \\vec { m } } _ { a 1 } ^ { ( 1 ) } : = x _ { a }$ ∀a $\\triangleright$ Initialize from input image $\\mathbf { X }$ for $\\bar { k } \\in \\{ 1 , \\ldots , K \\}$ do $\\triangleright$ Iterating over $K$ layers $s _ { a b } ^ { ( k ) } \\gets f _ { R N N } \\big ( s _ { a b } ^ { ( k ) } , \\overrightarrow { m } _ { a } ^ { ( k ) } , \\overleftarrow { m } _ { b } ^ { ( k ) } \\big ) \\quad \\forall a , b$ . Equation 7 ←−m m (k+1)b := Pa0 f−→m (s(k)a0b) (k−1)a := Pb0 f←−m (s(k)ab0 ) ∀a ∀b . Create backward message . Create forward message yˆa := −→m(K+1)a1 ∀a $\\triangleright$ Read output e := ∇yˆL(ˆy, y) . Compute error at outputs using loss $L$ ←−m(K)b1 := eb ∀b $\\triangleright$ Input errors $\\begin{array} { r } { V _ { M } \\gets V _ { M } - \\alpha \\nabla _ { V _ { M } } \\sum _ { t = 1 } ^ { T } L ( \\hat { y } ( t ) , y ( t ) ) } \\end{array}$ , obtaining $\\nabla _ { V _ { M } }$ either by • back-propagation through the inner loop • evolution strategies, using a search distribution $p ( V _ { M } )$ ",
577
+ "bbox": [
578
+ 165,
579
+ 640,
580
+ 826,
581
+ 902
582
+ ],
583
+ "page_idx": 4
584
+ },
585
+ {
586
+ "type": "text",
587
+ "text": "3.2 Learning to implement backpropagation in RNNs ",
588
+ "text_level": 1,
589
+ "bbox": [
590
+ 176,
591
+ 92,
592
+ 555,
593
+ 106
594
+ ],
595
+ "page_idx": 5
596
+ },
597
+ {
598
+ "type": "image",
599
+ "img_path": "images/c33778dd74e4643cf3ee884dd15c7cd4f5d7da2efc2ed6fb055153758c4435ca.jpg",
600
+ "image_caption": [
601
+ "Figure 4: To implement backpropagation we optimize the VSML RNN to use and update weights $w$ and biases $b$ as part of the state $s _ { a b }$ in each subRNN. Inputs are pre-synaptic $x$ and error $e$ . Outputs are post-synaptic $\\hat { y }$ and error $\\cdot$ . "
602
+ ],
603
+ "image_footnote": [],
604
+ "bbox": [
605
+ 200,
606
+ 121,
607
+ 343,
608
+ 242
609
+ ],
610
+ "page_idx": 5
611
+ },
612
+ {
613
+ "type": "text",
614
+ "text": "An alternative to end-to-end meta learning is to first investigate whether the VSML RNN can implement backpropagation. Due to the algorithm’s ubiquitous use, it seems desirable to be able to meta learn backpropagation-like algorithms. Here we investigate how VSML RNNs can learn to implement backpropagation purely in their recurrent dynamics. We do this by optimizing $V _ { M }$ to (1) store a weight $w$ and bias $b$ as a subset of each state $s _ { a b }$ , (2) compute $y = \\operatorname { t a n h } ( x ) w + b$ to implement neural forward computation, and (3) update $w$ and $b$ according to the backpropagation algorithm [23]. We call this process learning algorithm cloning and it is visualized in Figure 4. ",
615
+ "bbox": [
616
+ 383,
617
+ 117,
618
+ 825,
619
+ 268
620
+ ],
621
+ "page_idx": 5
622
+ },
623
+ {
624
+ "type": "text",
625
+ "text": "We designate an element of each message $\\vec { m } _ { a } ^ { ( k ) }$ , $\\{ \\overline { { m } } _ { b } ^ { ( k ) }$ , $f _ { \\vec { m } } ( s _ { a b } ^ { ( k ) } )$ $f _ { \\overleftarrow { m } } ( s _ { a b } ^ { ( k ) } )$ as the input $x$ , error $e$ , and output $\\hat { y }$ and error $\\hat { e } ^ { \\prime }$ . Similarly, we set $w : = s _ { a b 1 }$ and $b : = s _ { a b 2 }$ . We then optimize $V _ { M }$ via gradient descent to regress $\\hat { y }$ , $\\Delta w$ , $\\Delta b$ , and $\\hat { e } ^ { \\prime }$ toward their respective targets. We can either generate the training dataset $D : = \\{ ( x , \\bar { w } , b , y , e , \\bar { e ^ { \\prime } } ) _ { i } \\}$ randomly or run a ‘shadow’ NN on some supervised problem and fit the VSML RNN to its activations and parameter updates. Multiple iterations in the VSML RNN would then correspond to evaluating the network and updating it via backpropagation. The activations from the forward pass necessary for credit assignment could be memorized as part of the state $s$ or be explicitly stored and fed back. For simplicity, we chose the latter to clone backpropagation. We continuously run the VSML RNN forward, alternately running the layers in order $1 , \\ldots , K$ and in reverse order $K , \\ldots , 1$ .2 ",
626
+ "bbox": [
627
+ 385,
628
+ 275,
629
+ 825,
630
+ 380
631
+ ],
632
+ "page_idx": 5
633
+ },
634
+ {
635
+ "type": "text",
636
+ "text": "",
637
+ "bbox": [
638
+ 174,
639
+ 381,
640
+ 825,
641
+ 450
642
+ ],
643
+ "page_idx": 5
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "4 Experiments ",
648
+ "text_level": 1,
649
+ "bbox": [
650
+ 174,
651
+ 469,
652
+ 312,
653
+ 487
654
+ ],
655
+ "page_idx": 5
656
+ },
657
+ {
658
+ "type": "text",
659
+ "text": "First, we demonstrate the capabilities of the VSML RNN by showing that it can implement neural forward computation and backpropagation in its recurrent dynamics on the MNIST [21] and Fashion MNIST [59] dataset. Then, we show how we can meta learn an LA from scratch on one set of datasets and then successfully apply it to another (out of distribution). Such generalization is enabled by extensive variable sharing where we have very few meta variables $| V _ { M } | ~ \\approx ~ 2 , 4 0 0$ and many learned variables $| V _ { L } | \\approx 2 5 7 , 2 0 0$ . We also investigate the robustness of the discovered LA. Finally, we introspect the meta learned LA and compare it to gradient descent. ",
660
+ "bbox": [
661
+ 174,
662
+ 502,
663
+ 485,
664
+ 709
665
+ ],
666
+ "page_idx": 5
667
+ },
668
+ {
669
+ "type": "image",
670
+ "img_path": "images/dbb2f1c0cc8cade0dc1f709d779c51876fa020bd13a4a622b6679683d6100ede.jpg",
671
+ "image_caption": [
672
+ "Figure 5: The VSML RNN is optimized to implement backpropagation in its recurrent dynamics on MNIST, then tested both on MNIST and Fashion MNIST where it performs learning purely by unrolling the LSTM. We test on shallow and deep architectures (single hidden layer of 32 units). Standard deviations are over 6 seeds. "
673
+ ],
674
+ "image_footnote": [],
675
+ "bbox": [
676
+ 496,
677
+ 482,
678
+ 823,
679
+ 602
680
+ ],
681
+ "page_idx": 5
682
+ },
683
+ {
684
+ "type": "text",
685
+ "text": "Our implementation uses LSTMs and the message interpretation from Equation 7. Hyperparameters, training details, and additional experiments can be found in the appendix. ",
686
+ "bbox": [
687
+ 173,
688
+ 715,
689
+ 825,
690
+ 744
691
+ ],
692
+ "page_idx": 5
693
+ },
694
+ {
695
+ "type": "text",
696
+ "text": "4.1 VSML RNNs can implement backpropagation ",
697
+ "text_level": 1,
698
+ "bbox": [
699
+ 174,
700
+ 762,
701
+ 534,
702
+ 776
703
+ ],
704
+ "page_idx": 5
705
+ },
706
+ {
707
+ "type": "text",
708
+ "text": "As described in Section 3.2, we optimize the VSML RNN to implement backpropagation. We structure the sub-RNNs to mimic a feed-forward NN with either one hidden layer or no hidden layers. To obtain training targets, we instantiate a standard NN, the shadow network, and feed it MNIST data. After cloning, we then run the LA encoded in the VSML RNN on the MNIST and Fashion MNIST dataset and observe that it performs learning purely in its recurrent dynamics, making explicit gradient calculations unnecessary. Figure 5 shows the learning curve on these two datasets. Notably, learning works both on MNIST (within distribution) and on Fashion MNIST (out of distribution). We observe that the loss is decently minimized, albeit regular gradient descent still outperforms our cloned backpropagation. This may be due to non-zero errors during learning algorithm cloning, in particular when these errors accumulate in the deeper architecture. It is also possible that the VSML states (‘weights’) deviate too far from ranges seen during cloning, in particular in the deep case when the loss starts increasing. We obtain $87 \\%$ (deep) and $90 \\%$ (shallow) test accuracy on MNIST and $76 \\%$ (deep) and $80 \\%$ (shallow) on Fashion MNIST (focusing on successful cloning over performance). ",
709
+ "bbox": [
710
+ 174,
711
+ 787,
712
+ 825,
713
+ 872
714
+ ],
715
+ "page_idx": 5
716
+ },
717
+ {
718
+ "type": "text",
719
+ "text": "",
720
+ "bbox": [
721
+ 173,
722
+ 92,
723
+ 826,
724
+ 189
725
+ ],
726
+ "page_idx": 6
727
+ },
728
+ {
729
+ "type": "text",
730
+ "text": "4.2 Meta learning supervised learning from scratch ",
731
+ "text_level": 1,
732
+ "bbox": [
733
+ 173,
734
+ 208,
735
+ 544,
736
+ 223
737
+ ],
738
+ "page_idx": 6
739
+ },
740
+ {
741
+ "type": "text",
742
+ "text": "In the previous experiments, we have established that VSML is expressive enough to metaoptimize backpropagation-like algorithms. Instead of cloning an LA, we now meta learn from scratch as described in Section 3.1. Here, we use a single layer ( $K = 1$ ) from input to output dimension and run it for two ticks per image with $N = 1 6$ and $N ^ { \\prime } = N ^ { \\prime \\prime } = 8$ . First, the VSML RNN is meta trained end-to-end using evolutionary strategies (ES) [38] on MNIST to minimize the sum of cross-entropies over 500 data points starting from random state initializations. As each image is unique and $V _ { M }$ can not memorize the data, we are implicitly optimizing the VSML RNN to generalize to future inputs given all inputs it has seen so far. We do not pre-train $V _ { M }$ with a human-engineered LA. ",
743
+ "bbox": [
744
+ 174,
745
+ 234,
746
+ 485,
747
+ 469
748
+ ],
749
+ "page_idx": 6
750
+ },
751
+ {
752
+ "type": "image",
753
+ "img_path": "images/7b033cbe1d2c5cc6f6e774fb5334f6d5b86759ee6986d192914ef27be40db278.jpg",
754
+ "image_caption": [
755
+ "Figure 6: The VSML RNN can be directly meta trained on MNIST to minimize the sum of errors when classifying online starting from a random state initialization. This allows for faster learning during meta testing compared to online gradient descent with Adam on the same dataset and even generalizes to a different dataset (Fashion MNIST). In comparison, a standard Meta RNN [16] strongly overfits in the same setting. Standard deviations are over 128 seeds. "
756
+ ],
757
+ "image_footnote": [],
758
+ "bbox": [
759
+ 496,
760
+ 232,
761
+ 821,
762
+ 359
763
+ ],
764
+ "page_idx": 6
765
+ },
766
+ {
767
+ "type": "text",
768
+ "text": "During meta testing on MNIST (Figure 6) we plot the cumulativputs on the y axis $\\textstyle { \\bigl ( } { \\frac { 1 } { T } } \\sum _ { t = 1 } ^ { T } c _ { t }$ n all previous after example $T$ ",
769
+ "bbox": [
770
+ 174,
771
+ 476,
772
+ 483,
773
+ 521
774
+ ],
775
+ "page_idx": 6
776
+ },
777
+ {
778
+ "type": "text",
779
+ "text": "indicating prediction correctness). For each example, the prediction when this example was fed to the RNN is used, thus measuring sample efficient learning. This evaluation protocol is similar to the one used in Meta RNNs [56, 10]. We observe that learning is considerably faster compared to the baseline of online gradient descent (no mini batching, the learning rate appropriately tuned). One possibility is that VSML simply overfits to the training distribution. We reject this possibility by meta testing the same unmodified RNN on a different dataset, here Fashion MNIST. Learning still works well, meaning we have meta learned a fairly general LA (although performance at convergence still lacks behind a little). This generalization is achieved without using any hardcoded gradients during meta testing purely by running the RNN forward. In comparison to VSML, a Meta RNN heavily overfits. ",
780
+ "bbox": [
781
+ 173,
782
+ 520,
783
+ 826,
784
+ 657
785
+ ],
786
+ "page_idx": 6
787
+ },
788
+ {
789
+ "type": "text",
790
+ "text": "4.3 Robustness to varying inputs and outputs ",
791
+ "text_level": 1,
792
+ "bbox": [
793
+ 174,
794
+ 678,
795
+ 501,
796
+ 691
797
+ ],
798
+ "page_idx": 6
799
+ },
800
+ {
801
+ "type": "text",
802
+ "text": "A defining property of VSML is that the same parameters $V _ { M }$ can be used to learn on varying input and output sizes. Further, the architecture and thus the meta learned LA is invariant to the order of inputs and outputs. In this experiment, we investigate how robust we are to such changes. We meta train across MNIST with 3, 4, 6, and 7 classes. Likewise, we train across rescaled versions with 14x14, $2 8 \\mathbf { x } 2 8$ , and $3 2 \\mathrm { x } 3 2$ pixels. We also randomly project all inputs using a linear transformation, with the transforma",
803
+ "bbox": [
804
+ 173,
805
+ 704,
806
+ 419,
807
+ 897
808
+ ],
809
+ "page_idx": 6
810
+ },
811
+ {
812
+ "type": "image",
813
+ "img_path": "images/c628948506067fe04ffbb9c085630d6448553be811bf1db3b99f5a94303b235f.jpg",
814
+ "image_caption": [
815
+ "Figure 7: The meta learned learning algorithm is robust to permutations and size changes in the inputs and outputs. All six configurations have not been seen during training and perform comparable to the unchanged reference. Standard deviations are over 32 seeds. "
816
+ ],
817
+ "image_footnote": [],
818
+ "bbox": [
819
+ 433,
820
+ 693,
821
+ 825,
822
+ 815
823
+ ],
824
+ "page_idx": 6
825
+ },
826
+ {
827
+ "type": "text",
828
+ "text": "tion fixed for all inner learning steps. In Figure 7 we meta test on 6 configurations that were not seen during meta training. Performance on all of these configurations is comparable to the unchanged reference from the previous section. In particular, the invariance to random projections suggests that we have meta learned a learning algorithm beyond transferring learned representations [compare 11, 54, 55]. ",
829
+ "bbox": [
830
+ 174,
831
+ 897,
832
+ 825,
833
+ 911
834
+ ],
835
+ "page_idx": 6
836
+ },
837
+ {
838
+ "type": "image",
839
+ "img_path": "images/319cf9db2760a541d350ef7249d327ed4957d5292c4dc26af98cc095f61ec93b.jpg",
840
+ "image_caption": [
841
+ "Figure 8: Online learning on various datasets. Cumulative accuracy in $\\%$ after having seen $2 \\mathrm { k }$ training examples evaluated after each prediction starting with random states (VSML, Meta RNN, HebbianFW, FWMemory) or random parameters (SGD). Standard deviations are over 32 meta test training runs. Meta testing is done on the official test set of each dataset. Meta training is on subsets of datasets excluding the Sum Sign dataset. Unseen tasks, most relevant from a general-purpose LA perspective, are opaque. "
842
+ ],
843
+ "image_footnote": [],
844
+ "bbox": [
845
+ 173,
846
+ 87,
847
+ 826,
848
+ 424
849
+ ],
850
+ "page_idx": 7
851
+ },
852
+ {
853
+ "type": "text",
854
+ "text": "",
855
+ "bbox": [
856
+ 174,
857
+ 526,
858
+ 825,
859
+ 582
860
+ ],
861
+ "page_idx": 7
862
+ },
863
+ {
864
+ "type": "text",
865
+ "text": "4.4 Varying datasets ",
866
+ "text_level": 1,
867
+ "bbox": [
868
+ 174,
869
+ 602,
870
+ 328,
871
+ 617
872
+ ],
873
+ "page_idx": 7
874
+ },
875
+ {
876
+ "type": "text",
877
+ "text": "To better understand how different meta training distributions and meta test datasets affect VSML RNNs and our baselines, we present several different combinations in Figure 8. The opaque bars represent tasks that were not seen during meta training and are thus most relevant for this analysis. This includes four additional datasets: (1) Kuzushiji MNIST [7] with 10 classes, (2) EMNIST [9] with 62 classes, (3) A randomly generated classification dataset (Random) with 20 data points that changes with each step in the outer loop, and (4) Sum Sign which generates random inputs and requires classifying the sign of the sum of all inputs. Meta training is done over 500 randomly drawn samples per outer iteration. Each algorithm is meta trained for $1 0 \\mathrm { k }$ outer iterations. Inputs are randomly projected as in Section 4.3 (for VSML; the baselines did not benefit from these augmentations). We again report the cumulative accuracy on all data seen since the beginning of meta test training. We compare to SGD with a single layer, matching the architecture of VSML, and a hidden layer, matching the number of weights to the size of $V _ { L }$ in VSML. We also have included a Hebbian fast weight baseline [25] and an external (fast weight) memory approach [42]. ",
878
+ "bbox": [
879
+ 174,
880
+ 628,
881
+ 825,
882
+ 808
883
+ ],
884
+ "page_idx": 7
885
+ },
886
+ {
887
+ "type": "text",
888
+ "text": "We observe that VSML generalizes much better than Meta RNNs, Hebbian fast weights, and the external memory. These baselines overfit to the training environments. Notably, VSML even generalizes to the unseen tasks Random and Sum Sign which have no shared structure with the other datasets. In many cases VSML’s performance is similar to SGD but a little more sample efficient in the beginning of training (learning curves in Appendix B). This suggests that our meta learned LAs are good at quickly associating new inputs with their labels. We further investigate this in the next Section 5. ",
889
+ "bbox": [
890
+ 174,
891
+ 814,
892
+ 825,
893
+ 911
894
+ ],
895
+ "page_idx": 7
896
+ },
897
+ {
898
+ "type": "text",
899
+ "text": "5 Analysis ",
900
+ "text_level": 1,
901
+ "bbox": [
902
+ 174,
903
+ 89,
904
+ 276,
905
+ 106
906
+ ],
907
+ "page_idx": 8
908
+ },
909
+ {
910
+ "type": "text",
911
+ "text": "Given that VSML seems to learn faster than online gradient descent in many cases we would like to qualitatively investigate how learning differs. We first meta train on the full MNIST dataset as before. During meta testing, we plot the output probabilities for each digit against the number of samples seen in Figure 9. We highlight the ground truth input class $\\boxed { \\begin{array} { r l } \\end{array} }$ as well as the predicted class $\\bigcirc$ . In this case, our meta test dataset consists of MNIST digits with two examples of each type. The same digit is always repeated twice. This allows us to observe and visualize the effect with only a few examples. We have done the same introspection with the full dataset in Appendix B. ",
912
+ "bbox": [
913
+ 174,
914
+ 121,
915
+ 356,
916
+ 481
917
+ ],
918
+ "page_idx": 8
919
+ },
920
+ {
921
+ "type": "text",
922
+ "text": "We observe that in VSML almost all failed predictions are followed by the correct prediction with high certainty. In contrast, SGD ",
923
+ "bbox": [
924
+ 173,
925
+ 486,
926
+ 354,
927
+ 555
928
+ ],
929
+ "page_idx": 8
930
+ },
931
+ {
932
+ "type": "image",
933
+ "img_path": "images/eaac26941486bc755c21019531e0870ec146a660bf3bfc809cb2fca51d5e7b20.jpg",
934
+ "image_caption": [
935
+ "Figure 9: Introspection of how output probabilities change after observing an input and the prediction error when meta testing on MNIST with two examples for each type. We highlight the ground truth class $\\boxed { \\begin{array} { r l } \\end{array} }$ as well as the predicted class $\\bigcirc$ . The top plot shows VSML quickly associating the input images with the right label, almost always making the right prediction the second time with high confidence. The bottom plot shows the same dataset processed by SGD with Adam which fails to learn quickly. "
936
+ ],
937
+ "image_footnote": [],
938
+ "bbox": [
939
+ 367,
940
+ 116,
941
+ 826,
942
+ 431
943
+ ],
944
+ "page_idx": 8
945
+ },
946
+ {
947
+ "type": "text",
948
+ "text": "makes many incorrect predictions and fails to adapt correctly in only 20 steps. It seems that SGD learns qualitatively different from VSML. The VSML RNN meta learns to quickly associate new inputs with their class whereas SGD fails to do so. We tried several different SGD learning rates and considered multiple steps on the same input. In both cases, SGD does not behave similar to VSML, either learning much slower or forgetting previous examples. As evident from high accuracies in Figure 8, VSML does not only memorize inputs using this strategy of fast association, but the associations generalize to future unseen inputs. ",
949
+ "bbox": [
950
+ 174,
951
+ 555,
952
+ 825,
953
+ 651
954
+ ],
955
+ "page_idx": 8
956
+ },
957
+ {
958
+ "type": "text",
959
+ "text": "6 Related Work ",
960
+ "text_level": 1,
961
+ "bbox": [
962
+ 174,
963
+ 671,
964
+ 321,
965
+ 689
966
+ ],
967
+ "page_idx": 8
968
+ },
969
+ {
970
+ "type": "text",
971
+ "text": "Memory based meta learning (Meta RNNs) Memory-based meta learning in RNNs [16, 10, 56] is a simple neural meta learner (see Section 2). Unfortunately, the LA encoded in the RNN parameters is largely overparameterized which leads to overfitting. VSML demonstrates that weight sharing can address this issue resulting in more general-purpose LAs. ",
972
+ "bbox": [
973
+ 174,
974
+ 704,
975
+ 825,
976
+ 760
977
+ ],
978
+ "page_idx": 8
979
+ },
980
+ {
981
+ "type": "text",
982
+ "text": "Learned Learning Rules / Fast Weights NNs that generate or change the weights of another or the same NN are known as fast weight programmers [44], hypernetworks [14], NNs with synaptic plasticity [25] or learned learning rules [4] (see Section 2). In VSML we do not require explicit architectures for weight updates as weights are emergent from RNN state updates. In addition to the learning rule, we implicitly learn how the neural forward computation is defined. Concurrent to this work, fast weights have also been used to meta learn more general LAs [39]. ",
983
+ "bbox": [
984
+ 173,
985
+ 766,
986
+ 825,
987
+ 849
988
+ ],
989
+ "page_idx": 8
990
+ },
991
+ {
992
+ "type": "text",
993
+ "text": "Learned gradient-based optimizers Meta learning has been used to find optimizers that update the parameters of a model by taking the loss and gradient with respect to these parameters as an input [34, 2, 22, 24]. In this work, we are interested in meta learning that does not rely on fixed gradient calculation in the inner loop. ",
994
+ "bbox": [
995
+ 176,
996
+ 856,
997
+ 823,
998
+ 911
999
+ ],
1000
+ "page_idx": 8
1001
+ },
1002
+ {
1003
+ "type": "text",
1004
+ "text": "Discrete program search An interesting alternative to distributed variable updates in VSML is meta learning via discrete program search [48, 35]. In this paradigm, a separate programming language needs to be defined that gives rise to neural computation when its instructions are combined. This led to the automated rediscovery of backpropagation [35]. In VSML we demonstrate that a symbolic programming language is not required and general-purpose LAs can be discovered and encoded in variable-shared RNNs. Search over neural network parameters is usually easier compared to symbolic program search due to smoothness in the loss landscape. ",
1005
+ "bbox": [
1006
+ 174,
1007
+ 92,
1008
+ 825,
1009
+ 188
1010
+ ],
1011
+ "page_idx": 9
1012
+ },
1013
+ {
1014
+ "type": "text",
1015
+ "text": "Multi-agent systems In the reinforcement learning setting multiple agents can be modeled with shared parameters [50, 32, 18], also in the context of meta learning [36]. This is related to the variable sharing in VSML depending on how the agent-environment boundary is drawn. Unlike these works, we demonstrate the advantage of variable sharing in meta learning more general-purpose LAs and present a weight update interpretation. ",
1016
+ "bbox": [
1017
+ 174,
1018
+ 194,
1019
+ 825,
1020
+ 263
1021
+ ],
1022
+ "page_idx": 9
1023
+ },
1024
+ {
1025
+ "type": "text",
1026
+ "text": "7 Discussion and Limitations ",
1027
+ "text_level": 1,
1028
+ "bbox": [
1029
+ 176,
1030
+ 282,
1031
+ 431,
1032
+ 300
1033
+ ],
1034
+ "page_idx": 9
1035
+ },
1036
+ {
1037
+ "type": "text",
1038
+ "text": "The research community has perfected the art of leveraging backpropagation for learning for a long time. At the same time, there are open questions such as how to minimize memory requirements, effectively learn online and continually, learn sample efficiently, learn without separate backward phases, and others. VSML suggests that instead of building on top of backpropagation as a fixed routine, meta learning offers an alternative to discover general-purpose LAs. Nevertheless, this paper is only a proof of concept—until now we have only investigated small-scale problems and performance does not yet quite match the mini-batched setting with large quantities of data. In particular, we observed premature convergence of the solution at meta test time which calls for further investigations. Scaling our system to harder problems and larger meta task distributions will be important future work. ",
1039
+ "bbox": [
1040
+ 174,
1041
+ 314,
1042
+ 825,
1043
+ 453
1044
+ ],
1045
+ "page_idx": 9
1046
+ },
1047
+ {
1048
+ "type": "text",
1049
+ "text": "The computational cost of the current VSML variant is also larger than the one of standard backpropagation. If we run a sub-RNN for each weight in a standard NN with $W$ weights, the cost is in $O ( W N ^ { 2 } )$ , where $N$ is the state size of a sub-RNN. If $N$ is small enough, and our experiments suggest small $N$ may be feasible, this may be an acceptable cost. However, VSML is not bound to the interpretation of a sub-RNN as one weight. Future work may relax this particular choice. ",
1050
+ "bbox": [
1051
+ 174,
1052
+ 459,
1053
+ 825,
1054
+ 529
1055
+ ],
1056
+ "page_idx": 9
1057
+ },
1058
+ {
1059
+ "type": "text",
1060
+ "text": "Meta optimization is also prone to local minima. In particular, when the number of ticks between input and feedback increases (e.g. deeper architectures), credit assignment becomes harder. Early experiments suggest that diverse meta task distributions can help mitigate these issues. Additionally, learning horizons are limited when using backprop-based meta optimization. Using ES allowed for training across longer horizons and more stable optimization. ",
1061
+ "bbox": [
1062
+ 174,
1063
+ 535,
1064
+ 825,
1065
+ 604
1066
+ ],
1067
+ "page_idx": 9
1068
+ },
1069
+ {
1070
+ "type": "text",
1071
+ "text": "VSML can also be viewed as regularizing the NN weights that encode the LA through a representational bottleneck. It is conceivable that LA generalization as obtained by VSML can also be achieved through other regularization techniques. Unlike most regularizers, VSML also introduces substantial reuse of the same learning principle and permutation invariance through variable sharing. ",
1072
+ "bbox": [
1073
+ 174,
1074
+ 611,
1075
+ 825,
1076
+ 666
1077
+ ],
1078
+ "page_idx": 9
1079
+ },
1080
+ {
1081
+ "type": "text",
1082
+ "text": "8 Conclusion ",
1083
+ "text_level": 1,
1084
+ "bbox": [
1085
+ 174,
1086
+ 685,
1087
+ 299,
1088
+ 703
1089
+ ],
1090
+ "page_idx": 9
1091
+ },
1092
+ {
1093
+ "type": "text",
1094
+ "text": "We introduced Variable Shared Meta Learning (VSML), a simple principle of weight sharing and sparsity for meta learning powerful learning algorithms (LAs). Our implementation replaces the weights of a neural network with tiny LSTMs that share parameters. We discuss connections to meta recurrent neural networks, fast weight generators (hyper networks), and learned learning rules. ",
1095
+ "bbox": [
1096
+ 174,
1097
+ 717,
1098
+ 825,
1099
+ 773
1100
+ ],
1101
+ "page_idx": 9
1102
+ },
1103
+ {
1104
+ "type": "text",
1105
+ "text": "Using learning algorithm cloning, VSML RNNs can learn to implement the backpropagation algorithm and its parameter updates encoded implicitly in the recurrent dynamics. On MNIST it learns to predict well without any human-designed explicit computational graph for gradient calculation. ",
1106
+ "bbox": [
1107
+ 176,
1108
+ 779,
1109
+ 821,
1110
+ 821
1111
+ ],
1112
+ "page_idx": 9
1113
+ },
1114
+ {
1115
+ "type": "text",
1116
+ "text": "VSML can meta learn from scratch supervised LAs that do not explicitly rely on gradient computation and that generalize to unseen datasets. Introspection reveals that VSML LAs learn by fast association in a way that is qualitatively different from stochastic gradient descent. This leads to gains in sample efficiency. Future work will focus on reinforcement learning settings, improvements of meta learning, larger task distributions, and learning over longer horizons. ",
1117
+ "bbox": [
1118
+ 174,
1119
+ 827,
1120
+ 825,
1121
+ 897
1122
+ ],
1123
+ "page_idx": 9
1124
+ },
1125
+ {
1126
+ "type": "text",
1127
+ "text": "Acknowledgements ",
1128
+ "text_level": 1,
1129
+ "bbox": [
1130
+ 176,
1131
+ 89,
1132
+ 338,
1133
+ 106
1134
+ ],
1135
+ "page_idx": 10
1136
+ },
1137
+ {
1138
+ "type": "text",
1139
+ "text": "We thank Sjoerd van Steenkiste, Imanol Schlag, Kazuki Irie, and the anonymous reviewers for their comments and feedback. This work was supported by the ERC Advanced Grant (no: 742870) and computational resources by the Swiss National Supercomputing Centre (CSCS, projects $s 9 7 8$ and s1041). We also thank NVIDIA Corporation for donating several DGX machines as part of the Pioneers of AI Research Award, IBM for donating a Minsky machine, and weights & biases [5] for their great experiment tracking software and support. ",
1140
+ "bbox": [
1141
+ 173,
1142
+ 121,
1143
+ 825,
1144
+ 204
1145
+ ],
1146
+ "page_idx": 10
1147
+ },
1148
+ {
1149
+ "type": "text",
1150
+ "text": "References ",
1151
+ "text_level": 1,
1152
+ "bbox": [
1153
+ 174,
1154
+ 224,
1155
+ 266,
1156
+ 241
1157
+ ],
1158
+ "page_idx": 10
1159
+ },
1160
+ {
1161
+ "type": "text",
1162
+ "text": "[1] F. Alet, M. F. Schneider, T. Lozano-Perez, and L. P. Kaelbling. Meta-learning curiosity algorithms. In International Conference on Learning Representations, 2020. \n[2] M. Andrychowicz, M. Denil, S. G. Colmenarejo, M. W. Hoffman, D. Pfau, T. Schaul, B. Shillingford, and N. De Freitas. Learning to learn by gradient descent by gradient descent. In Advances in Neural Information Processing Systems, pages 3988–3996, 6 2016. \n[3] J. Ba, G. Hinton, V. Mnih, J. Z. Leibo, and C. Ionescu. Using Fast Weights to Attend to the Recent Past. In Advances in Neural Information Processing Systems, pages 4331–4339, 2016. \n[4] S. Bengio, Y. Bengio, J. Cloutier, and J. Gecsei. On the optimization of a synaptic learning rule. In Preprints Conf. Optimality in Artificial and Biological Neural Networks, pages 6–8, 1992. \n[5] L. Biewald. Experiment Tracking with Weights and Biases, 2020. URL https://www.wandb. com/. \n[6] K. Cho, B. van Merrienboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio. Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation. Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1724–1734, 6 2014. \n[7] T. Clanuwat, M. Bober-Irizar, A. Kitamoto, A. Lamb, K. Yamamoto, and D. Ha. Deep Learning for Classical Japanese Literature, 2018. \n[8] E. F. Codd. Cellular automata. Academic press, 2014. \n[9] G. Cohen, S. Afshar, J. Tapson, and A. V. Schaik. EMNIST: Extending MNIST to handwritten letters. 2017 International Joint Conference on Neural Networks (IJCNN), 2017. doi: 10.1109/ ijcnn.2017.7966217. \n[10] Y. Duan, J. Schulman, X. Chen, P. L. Bartlett, I. Sutskever, and P. Abbeel. RLˆ2: Fast Reinforcement Learning via Slow Reinforcement Learning. arXiv preprint arXiv:1611.02779, 2016. \n[11] C. Finn, P. Abbeel, and S. Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 1126–1135, 2017. \n[12] F. A. Gers, J. Schmidhuber, and F. Cummins. Learning to Forget: Continual Prediction with LSTM. Neural Computation, 12(10):2451–2471, 2000. \n[13] K. Gregor. Finding online neural update rules by learning to remember. arXiv preprint arXiv:2003.03124, 3 2020. \n[14] D. Ha, A. Dai, and Q. V. Le. HyperNetworks. In International Conference on Learning Representations, 2016. \n[15] S. Hochreiter and J. Schmidhuber. Long Short-Term Memory. Neural Computation, 9(8): 1735–1780, 1997. \n[16] S. Hochreiter, A. S. Younger, and P. R. Conwell. Learning to learn using gradient descent. In International Conference on Artificial Neural Networks, 2001. \n[17] R. Houthooft, R. Y. Chen, P. Isola, B. C. Stadie, F. Wolski, J. Ho, and P. Abbeel. Evolved Policy Gradients. In Advances in Neural Information Processing Systems, pages 5400–5409, 2018. \n[18] W. Huang, I. Mordatch, and D. Pathak. One Policy to Control Them All: Shared Modular Policies for Agent-Agnostic Control. In International Conference on Machine Learning, 2020. \n[19] L. Kirsch, J. Kunze, and D. Barber. Modular Networks: Learning to Decompose Neural Computation. Advances in Neural Information Processing Systems, 2018. \n[20] L. Kirsch, S. van Steenkiste, and J. Schmidhuber. Improving Generalization in Meta Reinforcement Learning using Learned Objectives. In International Conference on Learning Representations, 2020. \n[21] Y. LeCun, C. Cortes, and C. J. Burges. MNIST handwritten digit database. ATT Labs [Online]. Available: http://yann.lecun.com/exdb/mnist, 2, 2010. \n[22] K. Li and J. Malik. Learning to Optimize. arXiv preprint arXiv:1606.01885, 2016. \n[23] S. Linnainmaa. The representation of the cumulative rounding error of an algorithm as a Taylor expansion of the local rounding errors. PhD thesis, Univ. Helsinki, 1970. \n[24] L. Metz, N. Maheswaranathan, C. D. Freeman, B. Poole, and J. Sohl-Dickstein. Tasks, stability, architecture, and compute: Training more effective learned optimizers, and using them to train themselves. arXiv preprint arXiv:2009.11243, 9 2020. \n[25] T. Miconi, J. Clune, and K. O. Stanley. Differentiable plasticity: training plastic neural networks with backpropagation. In International Conference on Machine Learning, 2018. \n[26] T. Miconi, A. Rawal, J. Clune, and K. O. Stanley. Backpropamine: training self-modifying neural networks with differentiable neuromodulated plasticity. In International Conference on Learning Representations, 2019. \n[27] N. Mishra, M. Rohaninejad, and X. U. Chen Pieter Abbeel Berkeley. A Simple Neural Attentive Meta-Learner. In International Conference on Learning Representations, 2018. \n[28] A. Mordvintsev, E. Randazzo, E. Niklasson, and M. Levin. Growing neural cellular automata. Distill, 5(2):e23, 2020. \n[29] M. C. Mozer and S. Das. A connectionist symbol manipulator that discovers the structure of context-free languages. In Advances in neural information processing systems, pages 863–870, 1993. \n[30] E. Najarro and S. Risi. Meta-Learning through Hebbian Plasticity in Random Networks. Advances in Neural Information Processing Systems, 2020. \n[31] J. Oh, M. Hessel, W. M. Czarnecki, Z. Xu, H. van Hasselt, S. Singh, and D. Silver. Discovering Reinforcement Learning Algorithms. arXiv preprint arXiv:2007.08794, 2020. \n[32] D. Pathak, C. Lu, T. Darrell, P. Isola, and A. A. Efros. Learning to Control Self-Assembling Morphologies: A Study of Generalization via Modularity. In Advances in Neural Information Processing Systems, 2019. \n[33] E. Randazzo, E. Niklasson, and A. Mordvintsev. MPLP: Learning a Message Passing Learning Protocol. arXiv preprint arXiv:2007.00970, 2020. \n[34] S. Ravi and H. Larochelle. Optimization as a model for few-shot learning. In International Conference on Learning Representations, 2016. \n[35] E. Real, C. Liang, D. R. So, and Q. V. Le. AutoML-Zero: Evolving Machine Learning Algorithms From Scratch. In International Conference on Machine Learning, pages 8007–8019, 2020. \n[36] M. Rosa, O. Afanasjeva, S. Andersson, J. Davidson, N. Guttenberg, P. Hlubucek, M. Poliak, ˇ J. Vítku, and J. Feyereisl. BADGER: Learning to (Learn [Learning Algorithms] through Multi-Agent Communication). arXiv preprint arXiv:1912.01513, 2019. \n[37] C. Rosenbaum, T. Klinger, and M. Riemer. Routing Networks: Adaptive Selection of NonLinear Functions for Multi-Task Learning. In International Conference on Learning Representations, 2018. \n[38] T. Salimans, J. Ho, X. Chen, S. Sidor, and I. Sutskever. Evolution Strategies as a Scalable Alternative to Reinforcement Learning. arXiv preprint arXiv:1703.03864, 3 2017. ISSN ISSN 0302-9743. doi: 10.1.1.51.6328. \n[39] M. Sandler, M. Vladymyrov, A. Zhmoginov, N. Miller, A. Jackson, T. Madams, and others. Meta-Learning Bidirectional Update Rules. arXiv preprint arXiv:2104.04657, 2021. \n[40] A. Santoro, S. Bartunov, M. Botvinick, D. Wierstra, and T. Lillicrap. Meta-Learning with Memory-Augmented Neural Networks. In International conference on machine learning, pages 1842–1850, 2016. \n[41] I. Schlag and J. Schmidhuber. Gated Fast Weights for On-The-Fly Neural Program Generation. In NIPS Metalearning Workshop, 2017. \n[42] I. Schlag, T. Munkhdalai, and J. Schmidhuber. Learning Associative Inference Using Fast Weight Memory. In International Conference on Learning Representations, 2021. \n[43] J. Schmidhuber. Evolutionary principles in self-referential learning. Diploma thesis, Institut für Informatik, Technische Universität München, 1987. \n[44] J. Schmidhuber. Learning to Control Fast-Weight Memories: An Alternative to Recurrent Nets. Technical Report FKI-147-91, Institut für Informatik, Technische Universität München, 3 1991. \n[45] J. Schmidhuber. Learning to Control Fast-Weight Memories: An Alternative to Dynamic Recurrent Networks. Neural Computation, 4(1):131–139, 1992. ISSN 0899-7667. doi: 10.1162/neco.1992.4.1.131. \n[46] J. Schmidhuber. Reducing the ratio between learning complexity and number of time varying variables in fully recurrent nets. In International Conference on Artificial Neural Networks, pages 460–463. Springer, 1993. \n[47] J. Schmidhuber. A self-referential weight matrix. In Proceedings of the International Conference on Artificial Neural Networks, Amsterdam, pages 446–451. Springer, 1993. \n[48] J. Schmidhuber. Discovering Problem Solutions with Low Kolmogorov Complexity and High Generalization Capability. Technical Report FKI-194-94, Fakultät für Informatik, Technische Universität München, 1994. \n[49] N. Shazeer, A. Mirhoseini, K. Maziarz, A. Davis, Q. Le, G. Hinton, and J. Dean. Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer. arXiv preprint arXiv:1701.06538, 2017. \n[50] Sims, Karl. Evolving Virtual Creatures. ACM SIGGRAPH, 1994. \n[51] A. Sperduti. Encoding labeled graphs by labeling raam. Advances in Neural Information Processing Systems, pages 1125–1125, 1994. \n[52] S. Sudhakaran, D. Grbic, S. Li, A. Katona, E. Najarro, C. Glanois, and S. Risi. Growing 3d artefacts and functional machines with neural cellular automata. arXiv preprint arXiv:2103.08737, 2021. \n[53] G. Z. Sun. Neural networks with external memeory stack that learn context-free grammars from examples. In Proceedings of the Conference on Information Science and Systems, 1991, pages 649–653. Princeton University, 1991. \n[54] E. Triantafillou, T. Zhu, V. Dumoulin, P. Lamblin, U. Evci, K. Xu, R. Goroshin, C. Gelada, K. Swersky, P.-A. Manzagol, and H. Larochelle. Meta-Dataset: A Dataset of Datasets for Learning to Learn from Few Examples. 3 2019. \n[55] H.-Y. Tseng, H.-Y. Lee, J.-B. Huang, and M.-H. Yang. Cross-domain few-shot classification via learned feature-wise transformation. arXiv preprint arXiv:2001.08735, 2020. \n[56] J. X. Wang, Z. Kurth-Nelson, D. Tirumala, H. Soyer, J. Z. Leibo, R. Munos, C. Blundell, D. Kumaran, and M. Botvinick. Learning to reinforcement learn. arXiv preprint arXiv:1611.05763, 2016. \n[57] D. Wierstra, T. Schaul, J. Peters, and J. Schmidhuber. Natural Evolution Strategies. In 2008 IEEE Congress on Evolutionary Computation (IEEE World Congress on Computational Intelligence), pages 3381–3387, 2008. \n[58] Z. Wu, S. Pan, F. Chen, G. Long, C. Zhang, and S. Y. Philip. A comprehensive survey on graph neural networks. IEEE Transactions on Neural Networks and Learning Systems, 2020. \n[59] H. Xiao, K. Rasul, and R. Vollgraf. Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms. CoRR, abs/1708.0, 2017. ",
1163
+ "bbox": [
1164
+ 173,
1165
+ 248,
1166
+ 828,
1167
+ 915
1168
+ ],
1169
+ "page_idx": 10
1170
+ },
1171
+ {
1172
+ "type": "text",
1173
+ "text": "",
1174
+ "bbox": [
1175
+ 171,
1176
+ 64,
1177
+ 828,
1178
+ 917
1179
+ ],
1180
+ "page_idx": 11
1181
+ },
1182
+ {
1183
+ "type": "text",
1184
+ "text": "",
1185
+ "bbox": [
1186
+ 171,
1187
+ 82,
1188
+ 828,
1189
+ 868
1190
+ ],
1191
+ "page_idx": 12
1192
+ }
1193
+ ]
parse/train/hhU9TEvB6AF/hhU9TEvB6AF_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/hhU9TEvB6AF/hhU9TEvB6AF_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rk6H0ZbRb/rk6H0ZbRb.md ADDED
@@ -0,0 +1,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # INTRIGUING PROPERTIES OF ADVERSARIAL EXAM-PLES
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ It is becoming increasingly clear that many machine learning classifiers are vulnerable to adversarial examples. In attempting to explain the origin of adversarial examples, previous studies have typically focused on the fact that neural networks operate on high dimensional data, they overfit, or they are too linear. Here we show that distributions of logit differences have a universal functional form. This functional form is independent of architecture, dataset, and training protocol; nor does it change during training. This leads to adversarial error having a universal scaling, as a power-law, with respect to the size of the adversarial perturbation. We show that this universality holds for a broad range of datasets (MNIST, CIFAR10, ImageNet, and random data), models (including state-of-the-art deep networks, linear models, adversarially trained networks, and networks trained on randomly shuffled labels), and attacks (FGSM, step l.l., PGD). Motivated by these results, we study the effects of reducing prediction entropy on adversarial robustness. Finally, we study the effect of network architectures on adversarial sensitivity. To do this, we use neural architecture search with reinforcement learning to find adversarially robust architectures on CIFAR10. Our resulting architecture is more robust to white and black box attacks compared to previous attempts.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ An intriguing aspect of deep learning models in computer vision is that while they can classify images with high accuracy, they fail catastrophically when those same images are perturbed slightly in an adversarial fashion (Szegedy et al., 2013; Goodfellow et al., 2014). The prevalence of adversarial examples presents challenges to our understanding of how deep networks generalize and pose security risks in real world applications (Papernot et al., 2016a; Kurakin et al., 2016a). Several techniques have been proposed to defend against adversarial examples. Adversarial training (Goodfellow et al., 2014) augments the training data with adversarial examples. It has been shown that using stronger adversarial attacks in adversarial training can increase the robustness to stronger attacks, but at the cost of a decrease in clean accuracy (i.e. accuracy on samples that have not been adversarially perturbed) (Madry et al., 2017). Defensive distillation (Papernot et al., 2016b), feature squeezing (Xu et al., 2017), and Parseval training (Cisse et al., 2017) have also been shown to make models more robust against adversarial attacks.
12
+
13
+ The goal of this work is to study the common properties of adversarial examples. We calculate the adversarial error, defined as the difference between clean accuracy and adversarial accuracy at a given size of adversarial perturbation (). Surprisingly, adversarial error has a similar dependence on small values of $\epsilon$ for all network models and datasets we studied, including linear, fully-connected, simple convolutional networks, Inception v3 (Szegedy et al., 2016), Inception-ResNet v2, Inception v4 (Szegedy et al., 2017), ResNet v1, ResNet v2 (He et al., 2016), NasNet-A (Zoph & Le, 2016; Zoph et al., 2017), adversarially trained Inception v3 (Kurakin et al., 2016b) and Inception-ResNet v2 (Tramer et al., 2017), and networks trained on randomly shuffled labels of MNIST. Adversarial \` error due to the Fast Gradient Sign Method (FGSM), its L2-norm variant, and Projected Gradient Descent (PGD) attack grows as a power-law like $A \epsilon ^ { B }$ with $B$ between 0.9 and 1.3. By contrast, we find that adversarial error caused by one-step least likely class method (step l.l.) also scales as a power-law where $B$ is between 1.8 and 2.5 for small $\epsilon$ . This observed universality points to a mysterious commonality between these models and datasets, despite the different number of channels, pixels, and classes present. Adversarial error caused by FGSM on the training set of randomly shuffled labels of MNIST (LeCun & Cortes) also has the power-law form where $B = 1 . 2$ , which implies that the universality is not a result of the specific content of these datasets nor the ability of the model to generalize.
14
+
15
+ To discover the mechanism behind this universality we show how, at small $\epsilon$ , the success of an adversarial attack depends on the input-logit Jacobian of the model and on the logits of the network. We demonstrate that the susceptibility of a model to FGSM and PGD attacks is in large part dictated by the cumulative distribution of the difference between the most likely logit and the second most likely logit. We observe that this cumulative distribution has a universal form among all datasets and models studied, including randomly produced data. Together, we believe these results provide a compelling story regarding the susceptibility of machine learning models to adversarial examples at small $\epsilon$ .
16
+
17
+ We show that training with single-step adversarial examples offers protection against large $\epsilon$ attacks (between 0.2 and 32), but does not help appreciably at defending against small $\epsilon$ attacks (below 0.2). At $\epsilon = 0 . 2$ , all ImageNet models we studied incur 10 to $2 5 \%$ adversarial error, and surprisingly, vanilla NASNet-A (best clean accuracy in our study) has a lower adversarial error than adversarially trained Inception-ResNet v2 or Inception v3 (Kurakin et al., 2016b) (Fig. 1(a)). In light of these results, we explore a different avenue to adversarial robustness through architecture selection. We perform neural architecture search (NAS) using reinforcement learning (Zoph & Le, 2016; Zoph et al., 2017). These techniques allow us to find several architectures that are especially robust to adversarial perturbations. In addition, by analyzing the adversarial robustness of the tens-of-thousands of architectures constructed by NAS, we gain insights into the relationship between size of a model, its clean accuracy, and its adversarial robustness. In summary, the key contributions of our work are:
18
+
19
+ • We study the functional form of adversarial error and logit differences across several models and datasets, which turn out to be universal. We analytically derive the commonality in the power-law tails of the logit differences, and show how it leads to the commonality in the form of adversarial error.
20
+ • We observe that although the qualitative form of logit differences and adversarial error is universal, it can be quantitatively improved with entropy regularization and better network architectures.
21
+ • We study the dependence of adversarial robustness on the network architecture via NAS. We show that while adversarial accuracy is strongly correlated with clean accuracy, it is only weakly correlated with model size. Our work leads to architectures that are more robust to white-box and black-box attacks on CIFAR10 (Krizhevsky & Hinton, 2009) than previous studies.
22
+
23
+ # 2 SURPRISING UNIVERSALITY OF ADVERSARIAL ERROR AT SMALL 
24
+
25
+ FGSM computes adversarial examples as:
26
+
27
+ $$
28
+ \boldsymbol { x } ^ { \mathrm { a d v } } = \boldsymbol { x } + \epsilon \mathrm { s i g n } \left( \nabla _ { \boldsymbol { x } } L ( \boldsymbol { x } , \boldsymbol { y } ) \right) ,
29
+ $$
30
+
31
+ where $x$ is the clean image, $y$ is the correct label for that image, $x ^ { \mathrm { a d v } }$ is the adversarial image, $\epsilon$ is the size of the adversarial perturbation, and $L ( x , y )$ is the loss function. $\epsilon$ values are specified in range [0,255]. We only study white-box attacks in this section.
32
+
33
+ We begin with a preliminary examination of the architectural dependence of adversarial robustness. To that end, in Fig. 1 (a) we plot the test set adversarial error due to an FGSM attack as a function of $\epsilon$ for several models on ImageNet (Russakovsky et al., 2015). We note that for $\epsilon < 0 . 2$ , the adversarial error follows a power law form with an exponent between 0.9 and 1.1 for all models studied. Even adversarially trained models Kurakin et al. (2016b), while adversarially much more robust for larger values of $\epsilon$ , follow a similar form and reach as large as $20 \%$ adversarial error at smaller $\epsilon$ .
34
+
35
+ In light of the surprising commonality in adversarial error at small- $\epsilon$ , we investigate whether there is any way to get a different form for the adversarial error. To do this, we evaluate the adversarial error due to step l.l. attack, which is computed as:
36
+
37
+ $$
38
+ x ^ { \mathrm { a d v } } = x - \epsilon \mathrm { s i g n } \left( \nabla _ { x } L ( x , y _ { l . l . } ) \right) ,
39
+ $$
40
+
41
+ where $y _ { l . l . }$ is least likely class predicted by the network on clean image $x$ (Kurakin et al., 2016b). The adversarial error also follows a power law, however with a larger exponent. The exponents range from 1.8 to 2.2 for ImageNet models (Fig. 1(b)), and 1.8 to 2.5 for models trained on MNIST (Fig. 2(c)) and CIFAR10. Thus, we see that attack protocol can change the exponent of the observed power-law.
42
+
43
+ ![](images/96e44a0d4a3fd367b209184ba9b25c3986431a5b883e6cfe8c25726059b999c8.jpg)
44
+ Figure 1: Test set adversarial error as a function of $\epsilon$ for models trained on ImageNet due to FGSM and step l.l. attack in (a) and (b), respectively. adv. tr. denotes models that are adversarially trained (Kurakin et al., 2016b). In (b), we also show two of the power law fits with straight lines.
45
+
46
+ To test the limits of the universality observed in Fig. 1, we perform a number of more extensive tests. First, we investigate the effect of architecture by stochastically sampling thousands of different neural networks and train them on MNIST. We then measure their adversarial error due to FGSM on the test set. The architectures we sample are either fully-connected networks with 1-4 hidden layers and 30-2000 hidden nodes in each layer, or simple convolutional networks with dropout rates between 0-0.5. The adversarial error of representative linear, fully-connected, and convolutional networks are shown in Fig. 2 (a). As above, these models all have the same form of adversarial error with a powerlaw dependence on $\epsilon$ with exponents between 0.9 and 1.2.
47
+
48
+ See Fig. 9 in the Appendix for a plot with all of the generated networks. We perform the same analysis on a 32-layer ResNet trained on CIFAR10 (He et al., 2016), which achieves a $9 2 . 6 \%$ clean accuracy on the test set. The result is shown in Appendix Fig. 10, where the adversarial error follows a power law with an exponent of 0.99 up to an $\epsilon$ of 1.
49
+
50
+ Next, we probe the relationship between generalization and adversarial robustness following a similar approach to Zhang et al. (2016). In particular, we train a fully connected network on MNIST with shuffled labels until it reaches perfect accuracy on the training set. The adversarial error on the training set is shown in Fig. 2(b). Once again we see that the adversarial error follows an almost identical power-law form at small $\epsilon$ with an exponent of 1.2.
51
+
52
+ Finally, we further investigate the dependence of adversarial robustness on attack protocol. We plot in Fig. 2 (c) the adversarial error on MNIST with an $L _ { \infty }$ -normalized FGSM attack, an $L _ { 2 }$ - normalized FGSM attack, and a 20-step projected gradient descent (PGD) attack (Madry et al., 2017). We see that despite the anomalous exponent observed for step-l.l. attacks, the other attack methods display the same universality with exponents of 1.1, 1.2, and 1.3 for L2-norm, FGSM, and PGD attacks, respectively. step-l.l. attack on MNIST has an exponent of 2.3.
53
+
54
+ # 3 A MEAN-FIELD THEORY OF ADVERSARIAL PERTURBATIONS
55
+
56
+ # 3.1 LINEAR RESPONSE
57
+
58
+ We now offer a theoretical explanation for the observed universal behavior of adversarial error. The breadth of these observations shows that adversarial error for small adversarial perturbations does not depend on the specifics of the neural network, which implies that we can understand the small $\epsilon$ regime by making simplifying approximations. We begin by considering the linear response of a neural network to adversarial perturbations. Another approach to adversarial examples that considers the linear response of the network can be found in Nayebi & Ganguli (2017). The effect of margins on adversarial robustness has been brought up in ?.
59
+
60
+ ![](images/71a2d3a2071be278b30c68ebe087ca022a4b5a62472b42ec80cadf2f1fe43425.jpg)
61
+ Figure 2: Points represent adversarial error as a function of $\epsilon$ for models trained on MNIST. Straight lines are power-law fits. (a) FGSM attack on fully-connected 3-layer network (FC), a linear model, and a convolutional network (b) FGSM attack on FC trained on randomly shuffled labels (evaluated on the training set). (c) Different attacks on FC.
62
+
63
+ We will study an $L _ { 2 }$ -variant of the FGSM attack. Here, the adversarial perturbation is given by,
64
+
65
+ $$
66
+ x ^ { \mathrm { a d v } } = x + \epsilon \frac { \nabla _ { x } L } { | | \nabla _ { x } L | | _ { 2 } }
67
+ $$
68
+
69
+ instead of the more commonly used $\ell _ { \infty }$ variant. As shown above, the form and exponent of adversarial error is qualitatively insensitive to this choice (see Fig. 2(c)). We will now attempt to compute the minimum $\epsilon$ , that we call $\hat { \epsilon } ( x )$ , required before the class assigned to an input, $x$ , changes. Assuming the network was able to perfectly classify clean images, the adversarial error rate will then be $P ( \bar { \hat { \epsilon } } < \epsilon )$ . While perfect classification will not be achieved in practice, the insensitivity of the form of adversarial error to clean accuracy demonstrated above for many systems suggests that this approximation is sound.
70
+
71
+ Notationally, we will refer to the output of the network as ${ \hat { y } } _ { i } ( x )$ and the corresponding logits as $h _ { i } ( x )$ . The class prediction of the network will then be arg $\operatorname* { m a x } ( \hat { y } ( x ) ) = \operatorname { a r g m a x } ( h ( x ) )$ . For simplicity we will choose an ordering of the logits such that $h _ { 1 } ( x ) \geq h _ { 2 } ( x ) \geq \cdot \cdot \cdot \geq h _ { N } ( x )$ . We can then enumerate a set of logit-differences, $\Delta _ { i j } ( x ) = h _ { i } ( x ) - \dot { h _ { j } } ( x )$ . If an adversarial perturbation is to successfully cause the network to make an erroneous prediction, then it must be true that $h _ { 1 } ( x ^ { \mathrm { a d v } } ) < h _ { j } ( \dot { x } ^ { \mathrm { a d v } } )$ for at least one $j$ .
72
+
73
+ We calculate the response of the logits to adversarial perturbation. We consider the linearized response of the network and find that in the limit of small $\epsilon$ (see Appendix 6.2.1),
74
+
75
+ $$
76
+ h ( x ^ { \mathrm { a d v } } ) = h ( x ) + \epsilon \frac { J ^ { T } J \delta } { | | J \delta | | _ { 2 } } + \mathcal { O } ( \epsilon ^ { 2 } )
77
+ $$
78
+
79
+ where $J _ { i j } = \partial h _ { j } / \partial x _ { i }$ is the input-logit Jacobian of the network and $\delta _ { i } = \partial L / \partial h _ { i }$ is the error of the outputs of the network. For notational convenience we will define $\Gamma ( x ) = J ^ { T } J \delta / | J \delta | | _ { 2 }$ . In this linear model we therefore predict that the logit-differences will scale as follows,
80
+
81
+ $$
82
+ \Delta _ { i j } ( x ^ { \mathrm { a d v } } ) \approx \Delta _ { i j } ( x ) + \epsilon ( \Gamma _ { i } ( x ) - \Gamma _ { j } ( x ) ) + \mathcal { O } ( \epsilon ^ { 2 } ) .
83
+ $$
84
+
85
+ Recall that the adversarial perturbation will successfully cause the network to just barely misclassify an input precisely when $\Delta _ { 1 j } ( x ^ { \mathrm { a d v } } ) = 0$ for at least one $j$ . We can predict per-class $\epsilon$ -thresholds beyond which the network will misclassify a given point,
86
+
87
+ $$
88
+ \hat { \epsilon } _ { j } ( x ) = \frac { \Delta _ { 1 j } ( x ) } { \Gamma _ { j } ( x ) - \Gamma _ { 1 } ( x ) } .
89
+ $$
90
+
91
+ Together this allows us to compute a linear approximation to $\hat { \epsilon }$ given by $\hat { \epsilon } _ { \mathrm { l i n e a r } } ( x ) = \operatorname* { m i n } _ { j } ( \epsilon _ { j } ( x ) )$
92
+
93
+ We can confirm that the change in the logits for small changes in the inputs is well-described by this linear model. This is shown in fig. 3 (a) where we see the logits for a single example upon perturbation over a range of $\epsilon$ . In particular, for small $\epsilon$ we see an excellent agreement between the linear approximation and the true logit dynamics. We also see that the $\epsilon$ where the first and second logit cross is well-approximated by the linear prediction. In Fig. 3 (b) we plot $\hat { \epsilon } _ { \mathrm { l i n e a r } } ( x )$ against $\hat { \epsilon } ( x )$ evaluated on every MNIST example in the test set. The white dashed line is the line $\hat { \epsilon } ( x ) = \hat { \epsilon } _ { \mathrm { l i n e a r } } ( x )$ . We see that when $\hat { \epsilon } ( x )$ is small the $\hat { \epsilon } _ { \mathrm { l i n e a r } } ( x )$ concentrate increasingly around the $\hat { \epsilon } ( x )$ . Together these results show that the linear response predictions are valid for small adversarial perturbations.
94
+
95
+ ![](images/85f4e581191d1aa2d9b2fce3b1c7c6baf8327e01427ec09910818f8323319cd2.jpg)
96
+ Figure 3: Linear approximation for the response of the logits to adversarial perturbation. (a) The dynamics of logits to an adversarial perturbation as a function of size $\epsilon$ for a single training example. Dashed lines show the linear approximation. Colors indicate the ranking of the logit from largest (red) to smallest (blue). (b) The smallest $\epsilon$ needed to fool the network (ˆ) for individual test examples compared with the prediction from the linear theory. (c) Mean field prediction of $\hat { \epsilon }$ .
97
+
98
+ While the linear model outlined above gives excellent agreement in the $\epsilon 0$ limit, the $\Gamma _ { i } ( x )$ are themselves complicated objects (being functions of the Jacobian). This makes the analytic evaluation of Eq. (6) challenging. We therefore introduce a “mean-field” approximation to Eq. (6) by replacing $\Gamma _ { i } ( x )$ by its average over the dataset, $\langle \Gamma _ { i } ( x ) \rangle$ . Similar independence approximations have previously been successful in analyzing the expressivity and trainability of neural networks (Schoenholz et al., 2016; Poole et al., 2016). Finally, we observe that the vast majority of the time (for example, more than $9 5 \%$ of successful FGSM attacks for $\epsilon < 5 0$ ), it is $\Delta _ { 1 2 } ( x ^ { \mathrm { a d v } } )$ that goes to zero before any of the other $\Delta _ { 1 j }$ . We therefore assume that this will be the dominant failure mode for neural networks and write down a mean-field estimate for $\hat { \epsilon }$ ,
99
+
100
+ $$
101
+ \hat { \epsilon } _ { \mathrm { M . F . } } = \frac { \Delta _ { 1 2 } ( x ) } { \langle \Gamma _ { 2 } \rangle - \langle \Gamma _ { 1 } \rangle } .
102
+ $$
103
+
104
+ We show in Fig. 3 (c) that this approximation continues to be strongly correlated with ˆ. Together these results suggest that the adversarial error rate for perturbations of size $\epsilon$ will be
105
+
106
+ $$
107
+ P ( \hat { \epsilon } \le \epsilon ) \approx P \left[ \Delta _ { 1 2 } \le \epsilon ( \langle \Gamma _ { 2 } \rangle - \langle \Gamma _ { 1 } \rangle ) \right] = P ( \Delta _ { 1 2 } \le \tilde { \epsilon } )
108
+ $$
109
+
110
+ where we have defined $\tilde { \epsilon } = \epsilon ( \left. \Gamma _ { 2 } \right. - \left. \Gamma _ { 1 } \right. )$ to be a network-specific rescaling of $\epsilon$ . We therefore expect the adversarial error rate at small $\epsilon$ to be dictated by the cumulative distribution of $\Delta _ { 1 2 }$ for attacks that effectively target the second most likely class (e.g. FGSM, PGD ...etc.).
111
+
112
+ # 3.2 UNIVERSAL PROPERTIES OF THE LOGIT DIFFERENCE DISTRIBUTION
113
+
114
+ With the results from the preceding section in hand, we now investigate the distribution of logit differences, $P ( \Delta _ { 1 j } )$ . Since we are particularly interested in the small $\epsilon$ regime, we seek to compute $P ( \Delta _ { 1 j } )$ for small $\Delta _ { 1 j }$ . To make progress we will again make a mean field approximation and assume that each of the logits are i.i.d. with arbitrary distribution. With this approximation we find that for small $\Delta _ { 1 j }$ (see Appendix 6.2.2),
115
+
116
+ $$
117
+ P ( \Delta _ { 1 j } ) = C \Delta _ { 1 j } ^ { j - 2 } + \mathcal { O } ( \Delta _ { 1 j } ^ { j - 1 } )
118
+ $$
119
+
120
+ where $C$ is a network specific constant. An interesting consequence of this result is that the difference that we are particularly interested in, $P ( \Delta _ { 1 2 } )$ , scales as $\mathcal { O } ( 1 )$ as $\Delta _ { 1 2 } 0$ . This implies that, generically, we expect the most likely logit and second most likely logit to have a finite probability of being arbitrarily close together. We interpret this as an inherent uncertainty in the predictions of neural networks.
121
+
122
+ While it is not obvious that the assumption of a factorial logit distribution is valid here, we will see that Eq. (9) captures the universal features of the distribution at small values of the logit difference. Indeed, from the previous section we see that the form of Eq. (9) implies that the adversarial error rate should scale as follows
123
+
124
+ $$
125
+ P ( \hat { \epsilon } < \epsilon ) \approx P ( \Delta _ { 1 2 } < \tilde { \epsilon } ) \approx C \tilde { \epsilon } + \mathcal { O } ( \tilde { \epsilon } ^ { 2 } )
126
+ $$
127
+
128
+ as was broadly observed in the previous section.
129
+
130
+ To further test whether or not the mean field approximation is valid, we evaluate $\Delta _ { 1 j }$ for a number of different neural network architectures and datasets. We find that on all datasets and models studied, the $\Delta _ { 1 j }$ distributions have power-law tails. As predicted, $\Delta _ { 1 2 }$ has a power-law tail with an exponent of about 0, and $\Delta _ { 1 j }$ for $j > 2$ have power-law tails with positive exponents increasing with $j$ . We note, however, that the powers are typically not integral for large $j$ . It seems likely that this breakdown is the result of correlations between the logits. In Fig. 4, we compare distribution of $\Delta _ { 1 j }$ with $j = 2 , 3 , 4$ for ImageNet and logits that are independently sampled from a uniform distribution for 5 million samples with 10 classes. In Fig. 6 we see similar results for MNIST. Together these results verify our predictions over a vast set of networks and datasets.
131
+
132
+ The empirical results above show that adversarial error has a power-law form for well-studied and random datasets, simple full connected networks as well as complicated state-of-the-art models. It follows that the prevalence and commonality of adversarial examples is not due to the depth of the model (for example, see the linear model in Fig. 2 (a)), or the high-dimensionality of the datasets. Rather, they are due to the fact that lots of examples have small $\Delta _ { 1 2 }$ values. This makes it easy to find examples to fool the model at test-time.
133
+
134
+ It is interesting that the distribution of $\Delta _ { 1 j }$ , at small $\Delta _ { 1 j }$ , for trained models is essentially identical to that of i.i.d. random logits (especially for $j = 2$ ). This suggests that while our training procedures are good at modifying the largest logit in a way that leads to good clean accuracies, these procedures do not induce strong enough correlations between the logits to disrupt the essential scaling uncovered above. This problem is reminiscent of the problem distillation (Hinton et al., 2015) attempts to solve, by incorporating information about ratios of incorrect classes. This might be one of the reasons defensive distillation improves adversarial robustness. It would be interesting to study the distributions of logit differences during training of distillation networks.
135
+
136
+ ![](images/dfac972faeb31b0e791b25975de81e491597615df9ab61798b0539d59233dbbe.jpg)
137
+ Figure 4: (a) Distribution of $\Delta _ { 1 j }$ of NASNet-A trained on ImageNet. (b) Distribution of $\Delta _ { 1 j }$ for logits that are sampled independently from a uniform random distribution for 5 million samples with 10 classes. $\Delta _ { 1 j }$ of other models are in Appendix Fig. 14
138
+
139
+ Given the large density of small more robust. Our proposed los $\Delta _ { 1 2 }$ values, we study an entronction can be written as: $\begin{array} { r } { \mathrm { \bar { l o s s } } = \mathrm { o l d } \mathrm { \bar { l o s s } } - \lambda \sum _ { i = 1 } ^ { n } p _ { i } \log p _ { i } } \end{array}$ where is a hyperparameter, $n$ is the number of classes, and $p _ { i }$ are the outputs of the neural network. This regularization term has been used by Miyato et al. (2017) for semi-supervised learning tasks. It aims to increase the confidence of the network on each sample, which is the opposite of previous regularization attempts that penalized confidence to increase generalization accuracy (Pereyra et al.,
140
+
141
+ 2017; Szegedy et al., 2015). By penalizing the entropy of the softmax outputs, we aim to increase the logit differences.
142
+
143
+ In Fig. 5, we show that entropy regularization with a $\lambda = 4 . 5$ increases the adversarial robustness both for regularly trained networks and step l.l. adversarially trained networks, and both for permutation invariant and regular MNIST. We note that the same qualitative results hold for other values of $\lambda$ we tried. Despite the increase in adversarial accuracy, the permutation invariant MNIST model has $0 . 8 \%$ lower clean accuracy when trained with the entropy penalty. In Appendix Fig. 11, we show that a wide ResNet trained with the entropy regularizer has improved robustness with no loss in clean accuracy.
144
+
145
+ ![](images/c1869225e39aa09f2326fc23af8d98fa31a28439eb1d8da0aed3cd53b95f57fc.jpg)
146
+ Figure 5: Step l.l. attack adversarial accuracy as a function of $\epsilon$ for CNN and permutation invariant MNIST in (a) and (b), respectively. Regular training (purple), entropy regularization (red), adversarial training (green), and adversarial training with entropy regularization (blue) have been implemented. Adversarial training was done using the step l.l. method. In (c), we show the PGD attack adversarial accuracy on permutation invariant MNIST trained with and without step l.l. adversarial training.
147
+
148
+ We investigate whether the increased adversarial robustness is due to increased logit differences. In Fig. 6, we plot the distribution of $\Delta _ { 1 j }$ for $j$ up to 4, for two networks trained on permutation invariant MNIST, with and without entropy regularization. As expected, margins are shifted to larger values and density of samples with small $\Delta _ { 1 j }$ are reduced. The tails still follow a power-law form with the same exponents, however there are fewer samples with small margins compared to a regularly trained network. Although entropy regularization made our networks white-box attacks, it did not lead to a significant improvement against black-box attacks. For this reason, we focus on the influence of network architectures on adversarial sensitivity below.
149
+
150
+ ![](images/77dfdc0bb5f0bde75a3a7b36d8a17c63ceb148055a493141d5e6090904603350.jpg)
151
+ Figure 6: Distribution of $\Delta _ { 1 j }$ up to $j = 5$ for permutation invariant MNIST trained with and without entropy regularization in red and purple, respectively.
152
+
153
+ # 4 ROLE OF NETWORK ARCHITECTURES IN ADVERSARIAL ROBUSTNESS
154
+
155
+ Several recent papers observe that larger networks are more robust against adversarial examples, regardless if they are adversarially trained or not (Kurakin et al., 2016b; Madry et al., 2017). However, it is not clear if network architectures play an important role in adversarial robustness. Are larger models more robust because they have more trainable parameters, or simply because they have higher clean accuracy? Is it possible to find more robust network architectures that do not necessarily have more parameters? We run several experiments to answer these questions, as well as to find an adversarially more robust model on CIFAR10. We perform neural architecture search (NAS) with reinforcement learning. Our search space and procedure are almost exactly the same as in Zoph et al. (2017). One difference is that we restrict the search space so that the normal cell must be the same as the reduction cell. This reduces the complexity of the search space as now we have only half as many predictions. Finally, we increase the number of prediction steps from 5 to 7 to slightly gain back the complexity that was lost when we restricted the normal cell to be equal to the reduction cell.
156
+
157
+ We carry out two experiments:
158
+
159
+ • Experiment 1: NAS where child models are trained with clean and step l.l. adversarial examples and the reward is computed on the validation set with FGSM adversarial accuracy at $\epsilon = 8$ .
160
+ • Experiment 2: NAS where child models are trained with clean and PGD adversarial examples and the reward is computed on the validation set with FGSM adversarial accuracy at $\epsilon = 8$ .
161
+
162
+ In both experiments, child models are trained for 10 epochs on a training set of 25 thousand samples. Child models are trained on mini-batches where half of the samples are adversarially perturbed, following the procedure in (Kurakin et al., 2016b). At the end of each experiment, we pick the child model with the highest FGSM adversarial accuracy at $\epsilon = 8$ on the validation set of 5000 samples, and scale up the number of filters. We train the enlarged models for 100 epochs on the full training set of 45000 samples for 12 different hyperparameter sets, and pick the one with the highest adversarial accuracy on the validation set. Finally, we report below the performance of these models on a held-out test set of 10 thousand samples. To provide a comparison with the results of our two experiments, we also run a vanilla NAS where the reward is clean validation accuracy. We will refer to the best architecture from vanilla NAS as NAS Baseline. When trained using the setup above only on clean examples, NAS Baseline reaches a test set accuracy of $9 5 . 3 \%$ .
163
+
164
+ ![](images/45725418240ff962864ee69771205d42909fa7e90b2d0a5a3159452fdd5e53aa.jpg)
165
+ Figure 7: (a) step l.l. adversarial accuracy of NAS Baseline trained with and without step l.l. adversarial examples in green and red, respectively. Best model from Experiment 1 is shown in blue. (b) PGD adversarial accuracy of NAS Baseline trained with and without PGD adversarial examples in green and red, respectively. Best model from Experiment 2 is shown in blue.
166
+
167
+ We present the results of Experiment 1 in Fig 7(a). Here the green curve is the adversarial accuracy NAS Baseline. The blue curve is the adversarial accuracy of a network architecture that was found by Experiment 1. Both of these architectures are trained with the same adversarial training procedure. We try the same sets of hyperparameters and report here the models with best adversarial accuracy at $\epsilon = 8$ on the validation set. Adversarial training reduced the clean accuracy by $0 . 2 \%$ . Adversarially trained models both have clean accuracy of $9 5 . 1 \%$ on the test set, whereas the model that was trained without adversarial training reached $9 5 . 3 \%$ accuracy.
168
+
169
+ We next use PGD adversarial examples in the training of child models, to find architectures that are more robust to any adversarial attack within an $\epsilon$ ball (Madry et al., 2017). Following the training procedure by Madry et al. (2017), we use 7 steps of size 2, for a total $\epsilon = 8$ . We present the results of Experiment 2 in Fig. 7(b). As was the case in Experiment 1, the architecture found by adversarial NAS leads to a more robust model. At $\epsilon = 8$ , the architecture from Experiment 2 reaches a $17 \%$ higher adversarial accuracy on PGD examples. We compare our results to the results by Madry et al. (2017). Madry et al. (2017) trained only on PGD examples, whereas half of our minibatches are clean examples. Despite this, we match their accuracy on white-box PGD attacks. Against other white- and black-box attacks our model is more robust, and our clean accuracy is $5 . 9 \%$ higher. We also note that NAS Baseline model has 4.9 million trainable parameters, whereas the model from Experiments 1 and 2 have 2.3 million and 3.5 million parameters, respectively. NAS found an adversarially more robust architecture with many fewer parameters. Best architecture from Experiment 2 and NAS Baseline are presented in Appendix Fig. 16. Finally, we study the performance statistics of child models during NAS. In Fig. 8, we report the results for 9360 child models that were trained during Experiment 1. As explained above, these models are only trained for 10 epochs. In Fig. 8(a), we see that the correlation between adversarialy accuracy and the number of trainable parameters of the model is not very strong. On the other hand, adversarial accuracy is strongly correlated with clean accuracy (Fig. 8(b)). We hypothesize that this is the reason both Madry et al. (2017) and Kurakin et al. (2016b) found that making networks larger increased adversarial robustness, because it also increased the clean accuracy. This implies that commonly used architectures, like Inception v3 and ResNet, benefit from having more parameters. This however was not the case for most child models during NAS. On the other hand, having a high clean accuracy is not sufficient for adversarial robustness. As seen in Fig. 8(c), there is a large variance in the adversarial accuracy of models with good clean accuracy. The range of adversarial accuracies in the histogram of models with larger than $85 \%$ clean accuracy is $22 \%$ and the standard deviation is $2 . 6 \%$ . For this reason, our experiments led to more robust architectures than NAS Baseline.
170
+
171
+ Table 1: Performance of our best architecture from Experiment 2 at $\epsilon = 8$ . Black-box attacks are sourced from a copy of the network independently initialized and trained.
172
+
173
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>White-box</td><td rowspan=1 colspan=3>Black-box</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Clean</td><td rowspan=1 colspan=1>FGSM</td><td rowspan=1 colspan=1>step 1.1.</td><td rowspan=1 colspan=1>PGD</td><td rowspan=1 colspan=1>FGSM</td><td rowspan=1 colspan=1>step 1.1.</td><td rowspan=1 colspan=1>PGD</td></tr><tr><td rowspan=1 colspan=1>Madry et al. (2017)</td><td rowspan=1 colspan=1>87.3%</td><td rowspan=1 colspan=1>56.1%</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>50.0%</td><td rowspan=1 colspan=1>67.0 %</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>64.2%</td></tr><tr><td rowspan=1 colspan=1>This work</td><td rowspan=1 colspan=1>93.2%</td><td rowspan=1 colspan=1>63.6%</td><td rowspan=1 colspan=1>77.9%</td><td rowspan=1 colspan=1>50.1%</td><td rowspan=1 colspan=1>78.1 %</td><td rowspan=1 colspan=1>84.9%</td><td rowspan=1 colspan=1>75.0%</td></tr></table>
174
+
175
+ ![](images/0207438d01698c7a498a79f722099d8aa9424e42d55368ce98b83ff84f3350d9.jpg)
176
+ Figure 8: Performance of child models on the validation set. FGSM adversarial accuracy at $\epsilon = 8$ vs. number of trainable parameters and clean accuracy in (a) and (b), respectively. Black dots represent each child model, purple line is a running average. Figure (c) is the histogram of the adversarial accuracy for models with clean accuracy larger than $85 \%$ .
177
+
178
+ # 5 CONCLUSION
179
+
180
+ In this paper we studied common properties of adversarial examples across different models and datasets. We theoretically derived a universality in logit differences and adversarial error of machine learning models. We showed that architecture plays an important role in adversarial robustness, which correlates strongly with clean accuracy.
181
+
182
+ # REFERENCES
183
+
184
+ Moustapha Cisse, Piotr Bojanowski, Edouard Grave, Yann Dauphin, and Nicolas Usunier. Parseval networks: Improving robustness to adversarial examples. In International Conference on Machine Learning, pp. 854–863, 2017.
185
+
186
+ Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014.
187
+
188
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016.
189
+
190
+ Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015.
191
+
192
+ Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009.
193
+
194
+ Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. arXiv preprint arXiv:1607.02533, 2016a.
195
+
196
+ Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial machine learning at scale. arXiv preprint arXiv:1611.01236, 2016b.
197
+
198
+ Yann LeCun and Corinna Cortes. The mnist database of handwritten digits. http://yann. lecun. com/exdb/mnist/.
199
+
200
+ Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017.
201
+
202
+ Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, and Shin Ishii. Virtual adversarial training: a regularization method for supervised and semi-supervised learning. arXiv preprint arXiv:1704.03976, 2017.
203
+
204
+ Aran Nayebi and Surya Ganguli. Biologically inspired protection of deep networks from adversarial attacks. arXiv preprint arXiv:1703.09202, 2017.
205
+
206
+ Nicolas Papernot, Patrick McDaniel, Ian Goodfellow, Somesh Jha, Z Berkay Celik, and Ananthram Swami. Practical black-box attacks against deep learning systems using adversarial examples. arXiv preprint arXiv:1602.02697, 2016a.
207
+
208
+ Nicolas Papernot, Patrick McDaniel, Xi Wu, Somesh Jha, and Ananthram Swami. Distillation as a defense to adversarial perturbations against deep neural networks. In Security and Privacy (SP), 2016 IEEE Symposium on, pp. 582–597. IEEE, 2016b.
209
+
210
+ Gabriel Pereyra, George Tucker, Jan Chorowski, Łukasz Kaiser, and Geoffrey Hinton. Regularizing neural networks by penalizing confident output distributions. arXiv preprint arXiv:1701.06548, 2017.
211
+
212
+ Ben Poole, Subhaneil Lahiri, Maithreyi Raghu, Jascha Sohl-Dickstein, and Surya Ganguli. Exponential expressivity in deep neural networks through transient chaos. In Advances In Neural Information Processing Systems, pp. 3360–3368, 2016.
213
+
214
+ Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211–252, 2015.
215
+
216
+ Samuel S Schoenholz, Justin Gilmer, Surya Ganguli, and Jascha Sohl-Dickstein. Deep information propagation. arXiv preprint arXiv:1611.01232, 2016.
217
+
218
+ Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013.
219
+
220
+ Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1–9, 2015.
221
+
222
+ Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2818–2826, 2016.
223
+
224
+ Christian Szegedy, Sergey Ioffe, Vincent Vanhoucke, and Alexander A Alemi. Inception-v4, inception-resnet and the impact of residual connections on learning. In AAAI, pp. 4278–4284, 2017.
225
+
226
+ Florian Tramer, Alexey Kurakin, Nicolas Papernot, Dan Boneh, and Patrick McDaniel. Ensemble \` adversarial training: Attacks and defenses. arXiv preprint arXiv:1705.07204, 2017.
227
+
228
+ Weilin Xu, David Evans, and Yanjun Qi. Feature squeezing: Detecting adversarial examples in deep neural networks. arXiv preprint arXiv:1704.01155, 2017.
229
+
230
+ Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. arXiv preprint arXiv:1611.03530, 2016.
231
+
232
+ Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016.
233
+
234
+ Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. arXiv preprint arXiv:1707.07012, 2017.
235
+
236
+ # 6 APPENDIX
237
+
238
+ # 6.1 FURTHER EXPERIMENTS
239
+
240
+ ![](images/b670571accf1ec3148d8641417d4a6b43fdf7c353720d8907853cc342b1807d3.jpg)
241
+ Figure 9: Adversarial error for hundreds of models trained on MNIST, including fully-connected and convolutional models. We only show models with clean accuracy larger than $80 \%$ .
242
+
243
+ ![](images/0cda1546173e20803b367c7e26e3db58e2dabb30fc58a20a86e6556b80a83117.jpg)
244
+ Figure 10: Points represent the adversarial error due to FGSM as a function of $\epsilon$ for a 32-layer ResNet trained on CIFAR10. Straight line is a power law fit with an exponent of 0.99.
245
+
246
+ ![](images/19c453a2f89cb39d463cccfb8014f80f6dddd6dcf92298ac8ab322959b8de828.jpg)
247
+ Figure 11: Effect of adding an entropy regularization $( \lambda = 3 . 0 )$ ): step l.l. adversarial accuracy of wide ResNet on CIFAR10, with and without entropy regularization. Both models have a clean accuracy of $9 4 \%$ . They were both trained for 100 epochs with the same hyperparameters.
248
+
249
+ # 6.2 DERIVATIONS
250
+
251
+ Here we derive several of the results found in the main text.
252
+
253
+ # 6.2.1 LINEAR RESPONSE
254
+
255
+ First, we compute the linear response of the network to the $L _ { 2 }$ FGSM attack. Let, $f : \mathbb { R } ^ { N } \to \mathbb { R } ^ { M }$ be a neural network (or other model) structured such that $f = \operatorname { s o f t m a x } \circ h$ where $h : \mathbb { R } ^ { N } \to \mathbb { R } ^ { M }$ maps inputs to logits. Additionally define a loss $L : \mathbb { R } ^ { M } \to \mathbb { R }$ which can be cross-entropy, $L ^ { 2 }$ , etc.. To generate adversarial examples we start with an input $\boldsymbol { x } \in \mathbb { R } ^ { N }$ and a corresponding target $t \in \mathbb { R } ^ { M }$ such that $t _ { \beta } = 1$ if $\beta = \gamma$ for some $\gamma$ and $t _ { \beta } = 0$ otherwise. We assume our network gets the answer correct so that $h _ { \gamma } > h _ { \beta }$ for all $\beta \neq \gamma$ . Then we apply the adversarial perturbation,
256
+
257
+ $$
258
+ x _ { \alpha } ^ { \prime } = x _ { \alpha } + \epsilon \frac { \nabla _ { x } L } { | | \nabla _ { x } L | | _ { 2 } } .
259
+ $$
260
+
261
+ Note that we can write
262
+
263
+ $$
264
+ \nabla _ { x } L = { \frac { \partial L } { \partial x _ { \alpha } } } = \sum _ { \beta } { \frac { \partial h _ { \beta } } { \partial x _ { \alpha } } } { \frac { \partial L } { \partial h _ { \beta } } } = \sum _ { \beta } J _ { \alpha \beta } { \frac { \partial L } { \partial h _ { \beta } } } = J \delta .
265
+ $$
266
+
267
+ Where we associate $J _ { \alpha \beta } = \partial h _ { \beta } / \partial x _ { \alpha }$ with the input-to-logit Jacobian linking the inputs to the logits and $\delta = \partial L / \partial h _ { \beta }$ the error of the outputs of the network.
268
+
269
+ ![](images/1d995c793653d9be88818c8a1da8189e47e3b0c071c1153919643df49d15ff93.jpg)
270
+ Figure 12: Fully connected network trained on MNIST with hinge loss. (a) Distributions of logit differences. (b) Red dots represent the adversarial error when FGSM attack uses the same hinge loss from training. Blue dots represent the adversarial error when FGSM attack uses a cross-entropy loss to create the adversarial examples.The line is a power-law fit with an exponent of 0.98
271
+
272
+ ![](images/917b69d3b380562fee50ab581eb866d83a8e46674d25a3848452158d9ecbe7a4.jpg)
273
+ Figure 13: Fully connected network trained on MNIST with L2-norm loss. (a) Distributions of logit differences. (b) Black dots represent the adversarial error due to FGSM. The line is a power-law fit with an exponent of 1.02
274
+
275
+ We can compute the change to the logits of the network due to this perturbation. We find,
276
+
277
+ $$
278
+ \begin{array} { l } { \displaystyle h ( \boldsymbol { x } ^ { \prime } ) = h ( \boldsymbol { x } + \epsilon \nabla _ { \boldsymbol { x } } L / | | \nabla _ { \boldsymbol { x } } L | | _ { 2 } ) } \\ { \displaystyle h _ { \beta } ^ { \prime } \approx h _ { \beta } + \frac { \epsilon } { | | \nabla _ { \boldsymbol { x } } L | | _ { 2 } } \sum _ { \alpha } \frac { \partial h _ { \beta } } { \partial x _ { \alpha } } \frac { \partial L } { \partial x _ { \alpha } } + \mathcal { O } ( \epsilon ^ { 2 } ) } \\ { \displaystyle ~ = h _ { \beta } + \frac { \epsilon } { | | \nabla _ { \boldsymbol { x } } L | | _ { 2 } } \sum _ { \alpha \delta } \frac { \partial h _ { \beta } } { \partial x _ { \alpha } } \frac { \partial h _ { \delta } } { \partial x _ { \alpha } } \frac { \partial L } { \partial h _ { \delta } } } \end{array}
279
+ $$
280
+
281
+ where we have plugged in for eq. (11). Expressing the above equation in terms of the Jacobian, it follows that we can write the effect of the adversarial perturbation on the logits by,
282
+
283
+ $$
284
+ h ^ { \prime } = h + \epsilon \frac { J ^ { T } J \delta } { | | J \delta | | _ { 2 } }
285
+ $$
286
+
287
+ as postulated.
288
+
289
+ ![](images/c88352a66455538e3ceb30d420cf36b2a3ba9a8e1ccaa6907bbe9c8b2c3f27af.jpg)
290
+ Figure 14: (a) Distribution of $\Delta _ { 1 N }$ for other ImageNet models.
291
+
292
+ ![](images/0969b6740619fa492073f02b297f60c5b900679948f3b95b0f698427fc978a31.jpg)
293
+ Figure 15: (a) FGSM adversarial accuracy of NAS Baseline trained with and without step l.l. adversarial examples in green and red, respectively. Best model from Experiment 1 is shown in blue. (b) FGSM adversarial accuracy of NAS Baseline trained with and without PGD adversarial examples in green and red, respectively. Best model from Experiment 2 is shown in blue.
294
+
295
+ 6.2.2 UNIVERSAL PROPERTIES OF THE LOGIT DIFFERENCE DISTRIBUTION
296
+
297
+ We now show that
298
+
299
+ $$
300
+ P ( \Delta _ { 1 j } ) = C \Delta _ { 1 j } ^ { j - 2 } + \mathcal { O } ( \Delta _ { 1 j } ^ { j - 1 } ) .
301
+ $$
302
+
303
+ To make progress we will again make a mean field approximation and assume that each of the logits are i.i.d. with arbitrary distribution $P ( h )$ . We denote the cumulative distribution $F ( h )$ . While it is not obvious that the factorial approximation is valid here, we will see that the resulting distribution of $P ( \Delta _ { 1 j } )$ shares many qualitative similarities with the distribution observed in real networks.
304
+
305
+ We first change variables from the logits to a sorted version of the logits, $r _ { i }$ . The ranked logits are defined such that $r _ { 1 } = \operatorname* { m a x } ( \{ h _ { i } \} )$ , $r _ { 2 } = \mathrm { m a x } ( \{ h _ { i } \} \backslash \{ r _ { 1 } \} ) , \cdot \cdot \cdot$ . Our first result is to compute the resulting joint distribution between $r _ { 1 }$ and $r _ { j }$ ,
306
+
307
+ $$
308
+ P _ { j } ( r _ { 1 } , r _ { j } ) = A ( N , j ) F ^ { N - j } ( r _ { j } ) \left[ F ( r _ { 1 } ) - F ( r _ { j } ) \right] ^ { j - 2 } P ( r _ { j } ) P ( r _ { 1 } )
309
+ $$
310
+
311
+ where $A ( N , j ) = N ( N - 1 ) { \binom { N - 2 } { j - 2 } }$ is a combinatorial factor. Eq. (18) has a simple interpretation. $F ^ { N - j } ( r _ { j } )$ is the probability that there are $N - j$ variables less than $r _ { j }$ ; $[ F ( r _ { 1 } ) - F ( r _ { j } ) ] ^ { j - 2 }$ is the probability that $j - 2$ variables are between $r _ { j }$ and $r _ { 1 }$ ; $P ( r _ { j } ) P ( r _ { 1 } )$ is the probability that there is one variable equal to each of $r _ { 1 }$ and $r _ { j }$ . The combinatorial factor can be understood since there are $N$ ways of selecting $r _ { 1 }$ , $N - 1$ ways of selecting $r _ { j }$ , and $\binom { N - 2 } { j - 2 }$ ways of choosing $j - 2$ variables out of the remaining $N - 2$ to be between $r _ { j }$ and $r _ { 1 }$ .
312
+
313
+ In terms of eq. (18) we can compute the distribution over $\Delta _ { 1 j }$ to be given by,
314
+
315
+ $$
316
+ \begin{array} { l } { { P ( \Delta _ { 1 j } ) = \displaystyle \int d r P _ { j } ( r + \Delta _ { 1 j } , r ) } } \\ { { \displaystyle \qquad = A ( N , j ) \int d r F ^ { N - j } ( r ) \left[ F ( r + \Delta _ { 1 j } ) - F ( r ) \right] ^ { j - 2 } P ( r ) P ( r + \Delta _ { 1 j } ) . } } \end{array}
317
+ $$
318
+
319
+ We can analyze this equation for small $\Delta _ { 1 j }$ . Expanding to lowest order in $\Delta _ { 1 j }$ ,
320
+
321
+ $$
322
+ \begin{array} { l } { P ( \Delta _ { 1 j } ) \approx A ( N , j ) \displaystyle \int d r { \cal F } ^ { N - j } ( r ) \left[ { \cal F } ( r ) + \Delta _ { 1 j } P ( r ) - { \cal F } ( r ) \right] ^ { j - 2 } P ( r ) \left[ P ( r ) + \Delta _ { 1 j } \frac { d P ( r ) } { d r } \right] } \\ { \displaystyle ~ ( \Delta ( N , j ) \Delta _ { 1 j } ^ { j - 2 } \int d r { \cal F } ^ { N - j } ( r ) P ^ { j } ( r ) + \mathcal { O } ( \Delta _ { 1 j } ^ { j - 1 } ) . ~ } \end{array}
323
+ $$
324
+
325
+ Since the term in the integral does not depend on $\Delta _ { 1 j }$ the result follows with,
326
+
327
+ $$
328
+ { \cal C } = { \cal N } ( N - 1 ) { \binom { N - 2 } { j - 2 } } \int d r F ^ { N - j } ( r ) P ^ { j } ( r ) .
329
+ $$
330
+
331
+ # 6.2.3 ARCHITECTURES
332
+
333
+ ![](images/156b53fcd92de96aae41c52a10d1da280a0afb23260f06022ef070bf60dba302.jpg)
334
+ Figure 16: Left: Best architecture from Experiment 1. Right: Architecture of NAS Baseline. We note that the architecture from Experiment 1 is “longer” and “narrower” than previous architectures found by NAS for higher clean accuracy (Zoph & Le, 2016; Zoph et al., 2017).
parse/train/rk6H0ZbRb/rk6H0ZbRb_model.json ADDED
The diff for this file is too large to render. See raw diff
 
vlm/test/0A5o6dCKeK/0.png ADDED

Git LFS Details

  • SHA256: 4b33fa37f470755846b20811432c28ca436e8ab7115d900e46e7de7a8d8a1789
  • Pointer size: 131 Bytes
  • Size of remote file: 531 kB
vlm/test/0A5o6dCKeK/1.png ADDED

Git LFS Details

  • SHA256: f26fed488f6d41829a2213740aa70581ef0eab457b5b5b0528a8d7a36bbbcf00
  • Pointer size: 131 Bytes
  • Size of remote file: 565 kB
vlm/test/0A5o6dCKeK/10.png ADDED

Git LFS Details

  • SHA256: 1ae39f1fbf7cda4ef2164fc035fde6b5dd15c2952b3deb0fa5ce7238c58b5ba6
  • Pointer size: 131 Bytes
  • Size of remote file: 562 kB
vlm/test/0A5o6dCKeK/11.png ADDED

Git LFS Details

  • SHA256: 117913116c929e58f7346805595c1aaf23243d211b528e430cbf8c1f7056b1ef
  • Pointer size: 131 Bytes
  • Size of remote file: 572 kB
vlm/test/0A5o6dCKeK/12.png ADDED

Git LFS Details

  • SHA256: 0c80f626e12553be54bd404b6e07a5970ebed9a167eb51af62f9cdb12eb49472
  • Pointer size: 131 Bytes
  • Size of remote file: 549 kB
vlm/test/0A5o6dCKeK/13.png ADDED

Git LFS Details

  • SHA256: 5e3ee0491f36a80b8f9c67a3ef172bb1373abc61d2c5e4fdbde4f7ee66b8bbd8
  • Pointer size: 131 Bytes
  • Size of remote file: 547 kB
vlm/test/0A5o6dCKeK/14.png ADDED

Git LFS Details

  • SHA256: 050cf4c69be1f880e903fa47bb7a29d8bbe9d0d4e4580f97cce13d32d4a7da9d
  • Pointer size: 131 Bytes
  • Size of remote file: 530 kB
vlm/test/0A5o6dCKeK/15.png ADDED

Git LFS Details

  • SHA256: ac056110351c9ab08a05afb354b54622522c267061557eea9ceaa9e49c04a26a
  • Pointer size: 131 Bytes
  • Size of remote file: 516 kB
vlm/test/0A5o6dCKeK/16.png ADDED

Git LFS Details

  • SHA256: 9ac73db27a1c68a6cdce30faf4f08ddb7c32a10278b119c065152f1b82b04a95
  • Pointer size: 131 Bytes
  • Size of remote file: 536 kB
vlm/test/0A5o6dCKeK/17.png ADDED

Git LFS Details

  • SHA256: 5090ed4d2a23ed67c5d543129dd8a9a163a04d1591e9f6c1bdae70301807ef62
  • Pointer size: 131 Bytes
  • Size of remote file: 108 kB