ZHANGYUXUAN-zR commited on
Commit
12d4241
·
verified ·
1 Parent(s): 1ea2e3f

Add files using upload-large-folder tool

Browse files
parse/train/BJ--gPcxl/BJ--gPcxl.md ADDED
@@ -0,0 +1,221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SEMI-SUPERVISED LEARNING WITHCONTEXT-CONDITIONAL GENERATIVEADVERSARIAL NETWORKS
2
+
3
+ Emily Denton Dept. of Computer Science Courant Institute, New York University denton@cs.nyu.edu
4
+
5
+ Sam Gross
6
+ Facebook AI Research New York
7
+ sgross@fb.com Rob Fergus
8
+ Facebook AI Research New York
9
+ robfergus@fb.com
10
+
11
+ # ABSTRACT
12
+
13
+ We introduce a simple semi-supervised learning approach for images based on in-painting using an adversarial loss. Images with random patches removed are presented to a generator whose task is to fill in the hole, based on the surrounding pixels. The in-painted images are then presented to a discriminator network that judges if they are real (unaltered training images) or not. This task acts as a regularizer for standard supervised training of the discriminator. Using our approach we are able to directly train large VGG-style networks in a semi-supervised fashion. We evaluate on STL-10 and PASCAL datasets, where our approach obtains performance comparable or superior to existing methods.
14
+
15
+ # 1 INTRODUCTION
16
+
17
+ Deep neural networks have yielded dramatic performance gains in recent years on tasks such as object classification (Krizhevsky et al., 2012), text classification (Zhang et al., 2015) and machine translation (Sutskever et al., 2014; Bahdanau et al., 2015). These successes are heavily dependent on large training sets of manually annotated data. In many settings however, such large collections of labels may not be readily available, motivating the need for methods that can learn from data where labels are rare.
18
+
19
+ We propose a method for harnessing unlabeled image data based on image in-painting. A generative model is trained to generate pixels within a missing hole, based on the context provided by surrounding parts of the image. These in-painted images are then used in an adversarial setting (Goodfellow et al., 2014) to train a large discriminator model whose task is to determine if the image was real (from the unlabeled training set) or fake (an in-painted image). The realistic looking fake examples provided by the generative model cause the discriminator to learn features that generalize to the related task of classifying objects. Thus adversarial training for the in-painting task can be used to regularize large discriminative models during supervised training on a handful of labeled images.
20
+
21
+ # 1.1 RELATED WORK
22
+
23
+ Learning From Context: The closest work to ours is the independently developed context-encoder approach of Pathak et al. (2016). This introduces an encoder-decoder framework, shown in Fig. 1(a), that is used to in-paint images where a patch has been randomly removed. After using this as a pre-training task, a classifier is added to the encoder and the model is fine-tuned using the labeled examples. Although both approaches use the concept of in-painting, they differ in several important ways. First, the architectures are different (see Fig. 1): in Pathak et al. (2016), the features for the classifier are taken from the encoder, whereas ours come from the discriminator network. In practice this makes an important difference as we are able to directly train large models such as VGG (Simonyan & Zisserman, 2015) using adversarial loss alone. By contrast, Pathak et al. (2016) report difficulties in training an AlexNet encoder with this loss. This leads to the second difference, namely that on account of these issues, they instead employ an $\ell _ { 2 }$ loss when training models for classification and detection (however they do use a joint $\ell _ { 2 }$ and adversarial loss to achieve impressive in-painting results). Finally, the unsupervised learning task differs between the two models. The context-encoder learns a feature representation suitable for in-painting whereas our model learns a feature representation suitable for differentiating real/fake in-paintings. Notably, while we also use a neural network to generate the in-paintings, this model is only used as an adversary for the discriminator, rather than as a feature extractor. In section 4, we compare the performance of our model to the context-encoder on the PASCAL dataset.
24
+
25
+ ![](images/653f69b4fb4d07b57d1405e1c9be333ecdac968a44279a554e551e716c3ac2fa.jpg)
26
+ Figure 1: (a) Context-encoder of Pathak et al. (2016), configured for object classification task. (b) Semi-supervised learning with GANs (SSL-GAN). (c) Semi-supervised learning with CC-GANs. In (a-c) the blue network indicates the feature representation being learned (encoder network in the context-encoder model and discriminator network in the GAN and CC-GAN models).
27
+
28
+ Other forms of spatial context within images have recently been utilized for representation learning. Doersch et al. (2015) propose training a CNN to predict the spatial location of one image patch relative to another. Noroozi & Favaro (2016) propose a model that learns by unscrambling image patches, essentially solving a jigsaw puzzle to learn visual representations. In the text domain, context has been successfully leveraged as an unsupervised criterion for training useful word and sentence level representations (Collobert et al., 2011; Mikolov et al., 2015; Kiros et al., 2015).
29
+
30
+ Deep unsupervised and semi-supervised learning: A popular method of utilizing unlabeled data is to layer-wise train a deep autoencoder or restricted Botlzmann machine (Hinton et al., 2006) and then fine tune with labels on a discriminative task. More recently, several autoencoding variants have been proposed for unsupervised and semi-supervised learning, such as the ladder network (Rasmus et al., 2015), stacked what-where autoencoders (Zhao et al., 2016) and variational autoencoders (Kingma & Welling, 2014; Kingma et al., 2014).
31
+
32
+ Dosovitskiy et al. (2014) achieved state-of-the-art results by training a CNN with a different class for each training example and introducing a set of transformations to provide multiple examples per class. The pseudo-label approach (Lee, 2013) is a simple semi-supervised method that trains using the maximumly predicted class as a label when labels are unavailable. Springenberg (2015) propose a categorical generative adversarial network (CatGAN) which can be used for unsupervised and semi-supervised learning. The discriminator in a CatGAN outputs a distribution over classes and is trained to minimize the predicted entropy for real data and maximize the predicted entropy for fake data. Similar to our model, CatGANs use the feature space learned by the discriminator for the final supervised learning task. Salimans et al. (2016) recently proposed a semi-supervised GAN model in which the discriminator outputs a softmax over classes rather than a probability of real vs. fake. An additional ‘generated’ class is used as the target for generated samples. This method differs from our work in that it does not utilize context information and has only been applied to datasets of small resolution. However, the discriminator loss is similar to the one we propose and could be combined with our context-conditional approach.
33
+
34
+ More traditional semi-supervised methods include graph-based approaches (Zhou et al., 2004; Zhu, 2006) that show impressive performance when good image representations are available. However, the focus of our work is on learning such representations.
35
+
36
+ Generative models of images: Restricted Boltzmann machines (Salakhutdinov, 2015), de-noising autoencoders (Vincent et al., 2008) and variational autoencoders (Kingma & Welling, 2014) optimize a maximum likelihood criterion and thus learn decoders that map from latent space to image space. More recently, generative adversarial networks (Goodfellow et al., 2014) and generative moment matching networks (Li et al., 2015; Dziugaite et al., 2015) have been proposed. These methods ignore data likelihoods and instead directly train a generative model to produce realistic samples. Several extensions to the generative adversarial network framework have been proposed to scale the approach to larger images (Denton et al., 2015; Radford et al., 2016; Salimans et al., 2016). Our work draws on the insights of Radford et al. (2016) regarding adversarial training practices and architecture for the generator network, as well as the notion that the discriminator can produce useful features for classification tasks.
37
+
38
+ Other models used recurrent approaches to generate images (Gregor et al., 2015; Theis & Bethge, 2015; Mansimov et al., 2016; van den Oord et al., 2016). Dosovitskiy et al. (2015) trained a CNN to generate objects with different shapes, viewpoints and color. Sohl-Dickstein et al. (2015) propose a generative model based on a reverse diffusion process. While our model does involve image generation, it differs from these approaches in that the main focus is on learning a good representation for classification tasks.
39
+
40
+ Predictive generative models of videos aim to extrapolate from current frames to future ones and in doing so learn a feature representation that is useful for other tasks. In this vein, Ranzato et al. (2014) used an $\ell _ { 2 }$ -loss in pixel-space. Mathieu et al. (2015) combined an adversarial loss with $\ell _ { 2 }$ , giving models that generate crisper images. While our model is also predictive, it only considers interpolation within an image, rather than extrapolation in time.
41
+
42
+ # 2 APPROACH
43
+
44
+ We present a semi-supervised learning framework built on generative adversarial networks (GANs) of Goodfellow et al. (2014). We first review the generative adversarial network framework and then introduce context conditional generative adversarial networks (CC-GANs). Finally, we show how combining a classification objective and a CC-GAN objective provides a unified framework for semi-supervised learning.
45
+
46
+ # 2.1 GENERATIVE ADVERSARIAL NETWORKS
47
+
48
+ The generative adversarial network approach (Goodfellow et al., 2014) is a framework for training generative models, which we briefly review. It consists of two networks pitted against one another in a two player game: A generative model, $G$ , is trained to synthesize images resembling the data distribution and a discriminative model, $D$ , is trained to distinguish between samples drawn from $G$ and images drawn from the training data.
49
+
50
+ More formally, let $\mathcal { X } = \{ \mathbf { x } ^ { 1 } , . . . , \mathbf { x } ^ { n } \}$ be a dataset of images of dimensionality $d$ . Let $D$ denote a discriminative function that takes as input an image $\mathbf { x } \in \mathbb { R } ^ { d }$ and outputs a scalar representing the probability of input $\mathbf { x }$ being a real sample. Let $G$ denote the generative function that takes as input a random vector $\mathbf { z } \in \mathbb { R } ^ { z }$ sampled from a prior noise distribution $p _ { \mathrm { N o i s e } }$ and outputs a synthesized image $\widetilde { \mathbf { x } } = G ( \mathbf { z } ) \in \mathbb { R } ^ { d }$ . Ideally, $D ( \mathbf { x } ) = 1$ when $\mathbf { x } \in \mathcal { X }$ and $D ( \mathbf { x } ) = 0$ when $\mathbf { x }$ was generated from $G$ . The GAN objective is given by:
51
+
52
+ $$
53
+ \operatorname* { m i n } _ { G } \operatorname* { m a x } _ { D } \ \mathbb { E } _ { \mathbf { x } \sim \mathcal { X } } [ \log D ( \mathbf { x } ) ] + \mathbb { E } _ { \mathbf { z } \sim p _ { \mathrm { N o i s e } } ( \mathbf { z } ) } [ \log ( 1 - D ( G ( \mathbf { z } ) ) ) ]
54
+ $$
55
+
56
+ The conditional generative adversarial network (Mirza $\&$ Osindero, 2014) is an extension of the GAN in which both $D$ and $G$ receive an additional vector of information $\mathbf { y }$ as input. The conditional GAN objective is given by:
57
+
58
+ $$
59
+ \operatorname* { m i n } _ { G } \operatorname* { m a x } _ { D } \ \mathbb { E } _ { \mathbf { x } , \mathbf { y } \sim \mathcal { X } } [ \log D ( \mathbf { x } , \mathbf { y } ) ] + \mathbb { E } _ { \mathbf { z } \sim p _ { \mathrm { N o i s e } } ( \mathbf { z } ) } [ \log ( 1 - D ( G ( \mathbf { z } , \mathbf { y } ) , \mathbf { x } ) ) ]
60
+ $$
61
+
62
+ # 2.2 CONTEXT-CONDITIONAL GENERATIVE ADVERSARIAL NETWORKS
63
+
64
+ We propose context-conditional generative adversarial networks (CC-GANs) which are conditional GANs where the generator is trained to fill in a missing image patch and the generator and discriminator are conditioned on the surrounding pixels.
65
+
66
+ In particular, the generator $G$ receives as input an image with a randomly masked out patch. The generator outputs an entire image. We fill in the missing patch from the generated output and then pass the completed image into $D$ . We pass the completed image into $D$ rather than the context and the patch as two separate inputs so as to prevent $D$ from simply learning to identify discontinuities along the edge of the missing patch.
67
+
68
+ More formally, let $\mathbf { m } \in \mathbb { R } ^ { d }$ denote to a binary mask that will be used to drop out a specified portion of an image. The generator receives as input $\mathbf { m } \odot \mathbf { x }$ where $\odot$ denotes element-wise multiplication. The generator outputs $\mathbf { x _ { G } } = G ( \mathbf { m } \odot \mathbf { x } , \mathbf { z } ) \in \mathbb { R } ^ { d }$ and the in-painted image $\mathbf { x _ { I } }$ is given by:
69
+
70
+ $$
71
+ \mathbf { x _ { I } } = \left( 1 - \mathbf { m } \right) \odot \mathbf { x _ { G } } + \mathbf { m } \odot \mathbf { x }
72
+ $$
73
+
74
+ The CC-GAN objective is given by:
75
+
76
+ $$
77
+ \operatorname* { m i n } _ { G } \operatorname* { m a x } _ { D } \mathbb { E } _ { \mathbf { x } \sim \mathcal { X } } [ \log D ( \mathbf { x } ) ] + \mathbb { E } _ { \mathbf { x } \sim \mathcal { X } , \mathbf { m } \sim \mathcal { M } } [ \log ( 1 - D ( \mathbf { x _ { I } } ) ) ]
78
+ $$
79
+
80
+ # 2.3 COMBINED GAN AND CC-GAN
81
+
82
+ While the generator of the CC-GAN outputs a full image, only a portion of it (corresponding to the missing hole) is seen by the discriminator. In the combined model, which we denote by $\mathrm { C C - \bar { G } A N ^ { 2 } }$ , the fake examples for the discriminator include both the in-painted image $\mathbf { x _ { I } }$ and the full image $\mathbf { x _ { G } }$ produced by the generator (i.e. not just the missing patch). By combining the GAN and CC-GAN approaches, we introduce a wider array of negative examples to the discriminator. The CC-GAN2 objective given by:
83
+
84
+ $$
85
+ \begin{array} { r l } { { \operatorname* { m i n } \operatorname* { m a x } _ { D } \mathbb { E } _ { \mathbf { x } \sim \mathcal { X } } [ \log D ( \mathbf { x } ) ] } } \\ & { + \ \mathbb { E } _ { \mathbf { x } \sim \mathcal { X } , \mathbf { m } \sim \mathcal { M } } [ \log ( 1 - D ( \mathbf { x _ { I } } ) ) ] } \\ & { + \ \mathbb { E } _ { \mathbf { x } \sim \mathcal { X } , \mathbf { m } \sim \mathcal { M } } [ \log ( 1 - D ( \mathbf { x _ { G } } ) ) ] } \end{array}
86
+ $$
87
+
88
+ # 2.4 SEMI-SUPERVISED LEARNING WITH CC-GANS
89
+
90
+ A common approach to semi-supervised learning is to combine a supervised and unsupervised objective during training. As a result unlabeled data can be leveraged to aid the supervised task.
91
+
92
+ Intuitively, a GAN discriminator must learn something about the structure of natural images in order to effectively distinguish real from generated images. Recently, Radford et al. (2016) showed that a GAN discriminator learns a hierarchical image representation that is useful for object classification. Such results suggest that combining an unsupervised GAN objective with a supervised classification objective would produce a simple and effective semi-supervised learning method. This approach, denoted by SSL-GAN, is illustrated in Fig. 1(b). The discriminator network receives a gradient from the real/fake loss for every real and generated image. The discriminator also receives a gradient from the classification loss on the subset of (real) images for which labels are available.
93
+
94
+ Generative adversarial networks have shown impressive performance on many diverse datasets. However, samples are most coherent when the set of images the network is trained on comes from a limited domain (eg. churches or faces). Additionally, it is difficult to train GANs on very large images. Both these issues suggest semi-supervised learning with vanilla GANs may not scale well to datasets of large diverse images. Rather than determining if a full image is real or fake, context conditional GANs address a different task: determining if a part of an image is real or fake given the surrounding context.
95
+
96
+ Formally, let $\mathcal { X } _ { \mathcal { L } } = \{ ( \mathbf { x } ^ { 1 } , y ^ { 1 } ) , . . . , ( \mathbf { x } ^ { n } , y ^ { n } ) \}$ denote a dataset of labeled images. Let $D _ { c } ( x )$ denote the output of the classifier head on the discriminator (see Fig. 1(c) for details). Then the semisupervised CC-GAN objective is:
97
+
98
+ $$
99
+ \underset { G } { \mathrm { m i n } } \underset { D } { \mathrm { m a x } } \mathbb { E } _ { \mathbf { x } \sim \mathcal { X } } [ \log D ( \mathbf { x } ) ] + \mathbb { E } _ { \mathbf { x } \sim \mathcal { X } , \mathbf { m } \sim \mathcal { M } } [ \log ( 1 - D ( \mathbf { x _ { I } } ) ) ] + \lambda _ { c } \mathbb { E } _ { \mathbf { x } , y \sim \mathcal { X } _ { \mathcal { L } } } [ \log ( D _ { c } ( y | \mathbf { x } ) ) ]
100
+ $$
101
+
102
+ The hyperparameter $\lambda _ { c }$ balances the classification and adversarial losses. We only consider the CCGAN in the semi-supervised setting and thus drop the SSL notation when referring to this model.
103
+
104
+ # 2.5 MODEL ARCHITECTURE AND TRAINING DETAILS
105
+
106
+ The architecture of our generative model, $G$ , is inspired by the generator architecture of the DCGAN (Radford et al., 2016). The model consists of a sequence of convolutional layers with subsampling (but no pooling) followed by a sequence of fractionally-strided convolutional layers. For the discriminator, $D$ , we used the VGG-A network (Simonyan & Zisserman, 2015) without the fully connected layers (which we call the VGG-A’ architecture). Details of the generator and discriminator are given in Fig. 2. The input to the generator is an image with a patch zeroed out. In preliminary experiments we also tried passing in a separate mask to the generator to make the missing area more explicit but found this did not effect performance.
107
+
108
+ ![](images/75e463c4a6f6e0e416af86d2fb282f317b8f489cea266141a491353b03c04d11.jpg)
109
+ Figure 2: Architecture of our context-conditional generative adversarial network (CC-GAN). conv(64, $4 \times 4$ , $2 \times 2$ ) denotes a conv layer with 64 channels, 4x4 kernels and stride $2 \mathbf { x } 2$ . Each convolution layer is followed by a spatial batch normalization and rectified linear layer. Dashed lines indicate optional pathways.
110
+
111
+ Even with the context conditioning it is difficult to generate large image patches that look realistic, making it problematic to scale our approach to high resolution images. To address this, we propose conditioning the generator on both the high resolution image with a missing patch and a low resolution version of the whole image (with no missing region). In this setting, the generators task becomes one of super-resolution on a portion of an image. However, the discriminator does not receive the low resolution image and thus is still faced with the same problem of determining if a given in-painting is viable or not. Where indicated, we used this approach in our PASCAL VOC 2007 experiments, with the original image being downsampled by a factor of 4. This provided enough information for the generator to fill in larger holes but not so much that it made the task trivial. This optional low resolution image is illustrated in Fig. 2(left) with the dotted line.
112
+
113
+ We followed the training procedures of Radford et al. (2016). We used the Adam optimizer (Kingma & Ba, 2015) in all our experiments with learning rate of 0.0002, momentum term $\beta _ { 1 }$ of 0.5, and the remaining Adam hyperparameters set to their default values. We set $\lambda _ { c } = 1$ for all experiments.
114
+
115
+ Table 1: Comparison of CC-GAN and other published results on STL-10.
116
+
117
+ <table><tr><td>Method</td><td>Accuracy</td></tr><tr><td>Multi-task Bayesian Optimization (Swersky et al.,2013) Exemplar CNN(Dosovitskiy et al.,2014) Stacked What-Where Autoencoder (Zhao et al.,2016)</td><td>70.10± 0.6 75.40 ± 0.3 74.33</td></tr><tr><td>Supervised VGG-A&#x27;</td><td>61.19 ± 1.1</td></tr><tr><td>SSL-GAN</td><td>73.81 ± 0.5</td></tr><tr><td>CC-GAN</td><td>75.67 ± 0.5</td></tr><tr><td>CC-GAN²</td><td>77.79 ± 0.8</td></tr></table>
118
+
119
+ # 3 EXPERIMENTS
120
+
121
+ # 3.1 STL-10 CLASSIFICATION
122
+
123
+ STL-10 is a dataset of $9 6 \times 9 6$ color images with a 1:100 ratio of labeled to unlabeled examples, making it an ideal fit for our semi-supervised learning framework. The training set consists of 5000 labeled images, mapped to 10 pre-defined folds of 1000 images each, and 100,000 unlabeled images. The labeled images belong to 10 classes and were extracted from the ImageNet dataset and the unlabeled images come from a broader distribution of classes. We follow the standard testing protocol and train 10 different models on each of the 10 predefined folds of data. We then evaluate classification accuracy of each model on the test set and report the mean and standard deviation.
124
+
125
+ We trained our CC-GAN and $\mathrm { C C - G A N ^ { 2 } }$ models on $6 4 \times 6 4$ crops of the $9 6 \times 9 6$ image. The hole was $3 2 \times 3 2$ pixels and the location of the hole varied randomly (see Fig. 3(top)). We trained for 100 epochs and then fine-tuned the discriminator on the $9 6 \mathbf { x } 9 6$ labeled images, stopping when training accuracy reached $100 \%$ . As shown in Table 1, the CC-GAN model performs comparably to current state of the art (Dosovitskiy et al., 2014) and the $\mathrm { C C - G A N ^ { 2 } }$ model improves upon it.
126
+
127
+ We also trained two baseline models in an attempt to tease apart the contributions of adversarial training and context conditional adversarial training. The first is a purely supervised training of the VGG-A’ model (the same architecture as the discriminator in the CC-GAN framework). This was trained using a dropout of 0.5 on the final layer and weight decay of 0.001. The performance of this model is significantly worse than the CC-GAN model.
128
+
129
+ We also trained a semi-supervised GAN (SSL-GAN, see Fig. 1(b)) on STL-10. This consisted of the same discriminator as the CC-GAN (VGG-A’ architecture) and generator from the DCGAN model (Radford et al., 2016). The training setup in this case is identical to the CC-GAN model. The SSLGAN performs almost as well as the CC-GAN, confirming our hypothesis that the GAN objective is a useful unsupervised criterion.
130
+
131
+ # 3.2 PASCAL VOC CLASSIFICATION
132
+
133
+ In order to compare against other methods that utilize spatial context we ran the CC-GAN model on PASCAL VOC 2007 dataset. This dataset consists of natural images coming from 20 classes. The dataset contains a large amount of variability with objects varying in size, pose, and position. The training and validation sets combined contain 5,011 images, and the test set contains 4,952 images. The standard measure of performance is mean average precision (mAP).
134
+
135
+ We trained each model on the combined training and validation set for ${ \sim } 5 0 0 0$ epochs and evaluated on the test set once1. Following Pathak et al. (2016), we train using random cropping, and then evaluate using the average prediction from 10 random crops.
136
+
137
+ Our best performing model was trained on images of resolution $1 2 8 \times 1 2 8$ with a hole size of $6 4 \times 6 4$ and a low resolution input of size $3 2 \times 3 2$ . Table 2 compares our CC-GAN method to other feature learning approaches on the PASCAL test set. It outperforms them, beating the current state of the art (Wang & Gupta, 2015) by $3 . 8 \%$ . It is important to note that our feature extractor is the VGGA’ model which is larger than the AlexNet architecture (Krizhevsky et al., 2012) used by other approaches in Table 2. However, purely supervised training of the two models reveals that VGG-A’ is less than $2 \%$ better than AlexNet. Furthermore, our model outperforms the supervised VGG-A’ baseline by a $7 \%$ margin ( $6 2 . 2 \%$ vs. $5 5 . 2 \%$ ). This suggests that our gains stem from the CC-GAN method rather than the use of a better architecture.
138
+
139
+ Table 2: Comparison of CC-GAN and other methods (as reported by Pathak et al. (2016)) on PASCAL VOC 2007.
140
+
141
+ <table><tr><td>Method</td><td>mAP</td></tr><tr><td>Supervised AlexNet</td><td>53.3 %</td></tr><tr><td>Visual tracking from video (Wang &amp; Gupta, 2015)</td><td>58.4%</td></tr><tr><td>Context prediction (Doersch et al.,2015)</td><td>55.3%</td></tr><tr><td>Context encoders (Pathak et al., 2016)</td><td>56.5%</td></tr><tr><td>Supervised VGG-A&#x27;</td><td>55.2%</td></tr><tr><td>CC-GAN</td><td>62.2%</td></tr><tr><td>CC-GAN²</td><td>62.7%</td></tr></table>
142
+
143
+ Table 3: Comparison of different CC-GAN variants on PASCAL VOC 2007.
144
+
145
+ <table><tr><td rowspan=1 colspan=1>Method</td><td rowspan=1 colspan=1>Image size</td><td rowspan=1 colspan=1>Hole size</td><td rowspan=1 colspan=1>Low res size</td><td rowspan=1 colspan=1>mAP</td></tr><tr><td rowspan=1 colspan=1>Supervised VGG-A&#x27;CC-GAN</td><td rowspan=1 colspan=1>64×6464×64</td><td rowspan=1 colspan=1>32×32</td><td rowspan=1 colspan=1>=</td><td rowspan=1 colspan=1>52.97%56.79%</td></tr><tr><td rowspan=1 colspan=1>Supervised VGG-A&#x27;CC-GANCC-GAN</td><td rowspan=1 colspan=1>96×9696×9696×96</td><td rowspan=1 colspan=1>=48×4848×48</td><td rowspan=1 colspan=1>=24×24</td><td rowspan=1 colspan=1>55.22%60.38%60.98%</td></tr><tr><td rowspan=1 colspan=1>Supervised VGG-A&#x27;CC-GANCC-GAN</td><td rowspan=1 colspan=1>128×128128×128128×128</td><td rowspan=1 colspan=1>=64×6464×64</td><td rowspan=1 colspan=1>-=32×32</td><td rowspan=1 colspan=1>55.2%61.3%62.2%</td></tr></table>
146
+
147
+ Table 3 shows the effect of training on different resolutions. The CC-GAN improves over the baseline CNN consistently regardless of image size. We found that conditioning on the low resolution image began to help when the hole size was largest $( 6 4 \times 6 4 )$ . We hypothesize that the low resolution conditioning would be more important for larger images, potentially allowing the method to scale to larger image sizes than we explored in this work.
148
+
149
+ # 3.3 INPAINTING
150
+
151
+ We now show some sample in-paintings produced by our CC-GAN generators. In our semisupervised learning experiments on STL-10 we remove a single fixed size hole from the image. The top row of Fig. 3 shows in-paintings produced by this model. We can also explored different masking schemes as illustrated in the remaining rows of Fig. 3 (however these did not improve classification results). In all cases we see that training the generator with the adversarial loss produces sharp semantically plausible in-painting results.
152
+
153
+ Fig. 4 shows generated images and in-painted images from a model trained with the CC-GAN2 criterion. The output of a CC-GAN generator tends to be corrupted outside the patch used to inpaint the image (since gradients only flow back to the missing patch). However, in the CC-GAN2 model, we see that both the in-painted image and the generated image are coherent and semantically consistent with the masked input image.
154
+
155
+ Fig. 5 shows in-painted images from a generator trained on $1 2 8 \times 1 2 8$ PASCAL images. Fig. 6 shows the effect of adding a low resolution $( 3 2 \times 3 2 )$ image as input to the generator. For comparison we also show the result of in-painting by filling in with a bi-linearly upsampled image. Here we see the generator produces high-frequency structure rather than simply learning to copy the low resolution patch.
156
+
157
+ # 4 DISCUSSION
158
+
159
+ We have presented a simple semi-supervised learning framework based on in-painting with an adversarial loss. The generator in our CC-GAN model is capable of producing semantically meaningful in-paintings and the discriminator performs comparable to or better than existing semi-supervised methods on two classification benchmarks.
160
+
161
+ ![](images/84e72393ad78ba91756006fb5a57e6c9cb91c209426da709b0af98f36dd5292e.jpg)
162
+ Figure 3: STL-10 in-painting with CC-GAN training and varying methods of dropping out the image.
163
+
164
+ ![](images/e3c40c35812801b637189c53c273f3f7a1c66f8ffea838a8a4e23d1dbf0c1bcc.jpg)
165
+ Figure 4: STL-10 in-painting with combined CC-GAN2 training.
166
+
167
+ ![](images/7c2cc9d7e2e34e5d761bccd468b83b706503506dcc091649f12805a89d06b2a3.jpg)
168
+ Figure 5: PASCAL in-painting with CC-GAN.
169
+
170
+ ![](images/69cca881be43870bc111ff5f24aaf4848fbd7c70d7b79aa7280b9ffb4ffe5286.jpg)
171
+ Figure 6: PASCAL in-painting with CC-GAN conditioned on low resolution image. Top two rows show input to generator. Third row shows inpainting my bilinear upsampling. Bottom row shows inpainted image by generator.
172
+
173
+ Since discrimination of real/fake in-paintings is more closely related to the target task of object classification than extracting a feature representation suitable for in-filling, it is not surprising that we are able to exceed the performance of Pathak et al. (2016) on PASCAL classification. Furthermore, since our model operates on images half the resolution as those used by other approaches ( $1 2 8 \times 1 2 8$ vs. $2 2 4 \times 2 4 4$ , there is potential for further gains if improvements in the generator resolution can be made. Our models and code are available at https://github.com/edenton/cc-gan.
174
+
175
+ Acknowledgements: Emily Denton is supported by a Google Fellowship. Rob Fergus is grateful for the support of CIFAR.
176
+
177
+ # REFERENCES
178
+
179
+ D. Bahdanau, K. Cho, and Y. Bengio. Neural machine translation by jointly learning to align and translate. In The International Conference on Learning Representations, 2015.
180
+ R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu, and P. Kuksa. Natural language processing (almost) from scratch. Journal of Machine Learning Research, 2011.
181
+ Emily Denton, Soumith Chintala, Arthur Szlam, and Rob Fergus. Deep generative image models using a laplacian pyramid of adversarial networks. In Advances in Neural Information Processing Systems 28, 2015.
182
+ Carl Doersch, Abhinav Gupta, and Alexei A. Efros. Unsupervised visual representation learning by context prediction. In International Conference on Computer Vision, 2015.
183
+ Alexey Dosovitskiy, Jost Tobias Springenberg, Martin Riedmiller, and Thomas Brox. Discriminative unsupervised feature learning with convolutional neural networks. In Advances in Neural Information Processing Systems 27, 2014.
184
+ Alexey Dosovitskiy, Jost Tobias Springenberg, and Thomas Brox. Learning to generate chairs, tables and cars with convolutional networks. In Computer Vision and Pattern Recognition, 2015.
185
+ Gintare Karolina Dziugaite, Daniel M. Roy, and Zoubin Ghahramani. Training generative neural networks via maximum mean discrepancy optimization. In Uncertainty in Artificial Intelligence, 2015.
186
+ Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems 27, 2014.
187
+ Karol Gregor, Ivo Danihelka, Alex Graves, Danilo Jimenez Rezende, and Daan Wierstra. Draw: A recurrent neural network for image generation. In International Conference on Machine Learning, 2015.
188
+ G. E. Hinton, S. Osindero, and Y. Teh. A fast learning algorithm for deep belief nets. Neural Computation, 18, 2006.
189
+ D.P. Kingma and J. Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations, 2015.
190
+ D.P. Kingma and M. Welling. Auto-encoding variational bayes. In International Conference on Learning Representations, 2014.
191
+ D.P. Kingma, D.J. Rezende, S. Mohamed, and M. Welling. Semi-supervised learning with deep generative models. In Advances in Neural Information Processing Systems 27, 2014.
192
+ Ryan Kiros, Yukun Zhu, Ruslan Salakhutdinov, Richard S. Zemel, Antonio Torralba, Raquel Urtasun, and Sanja Fidler. Skip-thought vectors. In Advances in Neural Information Processing Systems 28, 2015.
193
+ Alex Krizhevsky, Ilya Sutskever, and Geoff Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems 25, pp. 1106–1114, 2012.
194
+ D. H. Lee. Pseudo-label: The simple and efficient semi-supervised learning method for deep neural networks. In Workshop on Challenges in Representation Learning, ICML, 2013.
195
+ Yujia Li, Kevin Swersky, and Richard Zemel. Generative moment matching networks. In ICML, 2015.
196
+ Elman Mansimov, Emilio Parisotto, Jimmy Ba, and Ruslan Salakhutdinov. Generating images from captions with attention. In The International Conference on Learning Representations, 2016.
197
+
198
+ Michael Mathieu, Camille Couprie, and Yann LeCun. Deep multi-scale video prediction beyond mean square ¨ error. arXiv 1511.05440, 2015.
199
+ T. Mikolov, I. Sutskever, K. Chen, G. S. Corrado, and J. Dean. Distributed representations of words and phrases and their compositionality. In Advances in Neural Information Processing Systems 28, 2015.
200
+ Mehdi Mirza and Simon Osindero. Conditional generative adversarial nets. CoRR, abs/1411.1784, 2014.
201
+ Mehdi Noroozi and Paolo Favaro. Unsupervised learning of visual representations by solving jigsaw puzzles. CoRR, abs/1603.09246, 2016.
202
+ Deepak Pathak, Philipp Krahenbuhl, Jeff Donahue, Trevor Darrell, and Alexei A. Efros. Context encoders: Feature learning by inpainting. In Computer Vision and Pattern Recognition, 2016.
203
+ Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In The International Conference on Learning Representations, 2016.
204
+ Marc’Aurelio Ranzato, Arthur Szlam, Joan Bruna, Michael Mathieu, Ronan Collobert, and Sumit Chopra. ¨ Video (language) modeling: a baseline for generative models of natural videos. arXiv 1412.6604, 2014.
205
+ Antti Rasmus, Mathias Berglund, Mikko Honkala, Harri Valpola, and Tapani Raiko. Semi-supervised learning with ladder network. In Advances in Neural Information Processing Systems 28, 2015.
206
+ Ruslan Salakhutdinov. Learning deep generative models. Annual Review of Statistics and Its Application, 2: 361–385, 2015.
207
+ Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In Advances in Neural Information Processing Systems 29, 2016.
208
+ K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In The International Conference on Learning Representations, 2015.
209
+ Jascha Sohl-Dickstein, Eric A. Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. CoRR, abs/1503.03585, 2015.
210
+ Jost Tobias Springenberg. Unsupervised and semi-supervised learning with categorical generative adversarial networks. arXiv 1511.06390, 2015.
211
+ Ilya Sutskever, Oriol Vinyals, and Quoc Le. Sequence to sequence learning with neural networks. In Advances in Neural Information Processing Systems 27, 2014.
212
+ Kevin Swersky, Jasper Snoek, and Ryan P. Adams. Multi-task bayesian optimization. In Advances in Neural Information Processing Systems 26, 2013.
213
+ L. Theis and M. Bethge. Generative image modeling using spatial lstms. In Advances in Neural Information Processing Systems 28, 2015.
214
+ Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. In ICML, 2016.
215
+ P. Vincent, H. Larochelle, Y. Bengio, and P.A. Manzagol. Extracting and composing robust features with denoising autoencoders. In International Conference on Machine Learning, 2008.
216
+ Xiaolong Wang and Abhinav Gupta. Unsupervised learning of visual representations using videos. In ICCV, 2015.
217
+ Xiang Zhang, Junbo Zhao, and Yann LeCun. Character-level convolutional networks for text classification. In Advances in Neural Information Processing Systems 28, 2015.
218
+ Junbo Zhao, Michael Mathieu, Ross Goroshin, and Yann LeCun. Stacked what-where auto-encoders. In International Conference on Learning Representations, 2016.
219
+ D. Zhou, O. Bousquet, T. Lal, J. Weston, and B. Schoelkopf. Learning with local and global consistency. In Advances in Neural Information Processing Systemsi 17, 2004.
220
+
221
+ Xiaojin Zhu. Semi-supervised learning literature survey, 2006.
parse/train/BJ--gPcxl/BJ--gPcxl_content_list.json ADDED
@@ -0,0 +1,1004 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "SEMI-SUPERVISED LEARNING WITHCONTEXT-CONDITIONAL GENERATIVEADVERSARIAL NETWORKS",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 99,
9
+ 642,
10
+ 171
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Emily Denton Dept. of Computer Science Courant Institute, New York University denton@cs.nyu.edu ",
17
+ "bbox": [
18
+ 183,
19
+ 195,
20
+ 442,
21
+ 251
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Sam Gross \nFacebook AI Research New York \nsgross@fb.com Rob Fergus \nFacebook AI Research New York \nrobfergus@fb.com ",
28
+ "bbox": [
29
+ 468,
30
+ 195,
31
+ 619,
32
+ 251
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "",
39
+ "bbox": [
40
+ 645,
41
+ 195,
42
+ 805,
43
+ 251
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "ABSTRACT ",
50
+ "text_level": 1,
51
+ "bbox": [
52
+ 454,
53
+ 270,
54
+ 544,
55
+ 285
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "We introduce a simple semi-supervised learning approach for images based on in-painting using an adversarial loss. Images with random patches removed are presented to a generator whose task is to fill in the hole, based on the surrounding pixels. The in-painted images are then presented to a discriminator network that judges if they are real (unaltered training images) or not. This task acts as a regularizer for standard supervised training of the discriminator. Using our approach we are able to directly train large VGG-style networks in a semi-supervised fashion. We evaluate on STL-10 and PASCAL datasets, where our approach obtains performance comparable or superior to existing methods. ",
62
+ "bbox": [
63
+ 233,
64
+ 300,
65
+ 764,
66
+ 425
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "1 INTRODUCTION ",
73
+ "text_level": 1,
74
+ "bbox": [
75
+ 176,
76
+ 444,
77
+ 336,
78
+ 460
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Deep neural networks have yielded dramatic performance gains in recent years on tasks such as object classification (Krizhevsky et al., 2012), text classification (Zhang et al., 2015) and machine translation (Sutskever et al., 2014; Bahdanau et al., 2015). These successes are heavily dependent on large training sets of manually annotated data. In many settings however, such large collections of labels may not be readily available, motivating the need for methods that can learn from data where labels are rare. ",
85
+ "bbox": [
86
+ 174,
87
+ 470,
88
+ 825,
89
+ 554
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "We propose a method for harnessing unlabeled image data based on image in-painting. A generative model is trained to generate pixels within a missing hole, based on the context provided by surrounding parts of the image. These in-painted images are then used in an adversarial setting (Goodfellow et al., 2014) to train a large discriminator model whose task is to determine if the image was real (from the unlabeled training set) or fake (an in-painted image). The realistic looking fake examples provided by the generative model cause the discriminator to learn features that generalize to the related task of classifying objects. Thus adversarial training for the in-painting task can be used to regularize large discriminative models during supervised training on a handful of labeled images. ",
96
+ "bbox": [
97
+ 174,
98
+ 560,
99
+ 825,
100
+ 672
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "1.1 RELATED WORK ",
107
+ "text_level": 1,
108
+ "bbox": [
109
+ 176,
110
+ 680,
111
+ 331,
112
+ 694
113
+ ],
114
+ "page_idx": 0
115
+ },
116
+ {
117
+ "type": "text",
118
+ "text": "Learning From Context: The closest work to ours is the independently developed context-encoder approach of Pathak et al. (2016). This introduces an encoder-decoder framework, shown in Fig. 1(a), that is used to in-paint images where a patch has been randomly removed. After using this as a pre-training task, a classifier is added to the encoder and the model is fine-tuned using the labeled examples. Although both approaches use the concept of in-painting, they differ in several important ways. First, the architectures are different (see Fig. 1): in Pathak et al. (2016), the features for the classifier are taken from the encoder, whereas ours come from the discriminator network. In practice this makes an important difference as we are able to directly train large models such as VGG (Simonyan & Zisserman, 2015) using adversarial loss alone. By contrast, Pathak et al. (2016) report difficulties in training an AlexNet encoder with this loss. This leads to the second difference, namely that on account of these issues, they instead employ an $\\ell _ { 2 }$ loss when training models for classification and detection (however they do use a joint $\\ell _ { 2 }$ and adversarial loss to achieve impressive in-painting results). Finally, the unsupervised learning task differs between the two models. The context-encoder learns a feature representation suitable for in-painting whereas our model learns a feature representation suitable for differentiating real/fake in-paintings. Notably, while we also use a neural network to generate the in-paintings, this model is only used as an adversary for the discriminator, rather than as a feature extractor. In section 4, we compare the performance of our model to the context-encoder on the PASCAL dataset. ",
119
+ "bbox": [
120
+ 174,
121
+ 702,
122
+ 825,
123
+ 924
124
+ ],
125
+ "page_idx": 0
126
+ },
127
+ {
128
+ "type": "image",
129
+ "img_path": "images/653f69b4fb4d07b57d1405e1c9be333ecdac968a44279a554e551e716c3ac2fa.jpg",
130
+ "image_caption": [
131
+ "Figure 1: (a) Context-encoder of Pathak et al. (2016), configured for object classification task. (b) Semi-supervised learning with GANs (SSL-GAN). (c) Semi-supervised learning with CC-GANs. In (a-c) the blue network indicates the feature representation being learned (encoder network in the context-encoder model and discriminator network in the GAN and CC-GAN models). "
132
+ ],
133
+ "image_footnote": [],
134
+ "bbox": [
135
+ 171,
136
+ 98,
137
+ 823,
138
+ 297
139
+ ],
140
+ "page_idx": 1
141
+ },
142
+ {
143
+ "type": "text",
144
+ "text": "",
145
+ "bbox": [
146
+ 173,
147
+ 401,
148
+ 823,
149
+ 429
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "Other forms of spatial context within images have recently been utilized for representation learning. Doersch et al. (2015) propose training a CNN to predict the spatial location of one image patch relative to another. Noroozi & Favaro (2016) propose a model that learns by unscrambling image patches, essentially solving a jigsaw puzzle to learn visual representations. In the text domain, context has been successfully leveraged as an unsupervised criterion for training useful word and sentence level representations (Collobert et al., 2011; Mikolov et al., 2015; Kiros et al., 2015). ",
156
+ "bbox": [
157
+ 174,
158
+ 436,
159
+ 825,
160
+ 520
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "Deep unsupervised and semi-supervised learning: A popular method of utilizing unlabeled data is to layer-wise train a deep autoencoder or restricted Botlzmann machine (Hinton et al., 2006) and then fine tune with labels on a discriminative task. More recently, several autoencoding variants have been proposed for unsupervised and semi-supervised learning, such as the ladder network (Rasmus et al., 2015), stacked what-where autoencoders (Zhao et al., 2016) and variational autoencoders (Kingma & Welling, 2014; Kingma et al., 2014). ",
167
+ "bbox": [
168
+ 174,
169
+ 526,
170
+ 825,
171
+ 611
172
+ ],
173
+ "page_idx": 1
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "Dosovitskiy et al. (2014) achieved state-of-the-art results by training a CNN with a different class for each training example and introducing a set of transformations to provide multiple examples per class. The pseudo-label approach (Lee, 2013) is a simple semi-supervised method that trains using the maximumly predicted class as a label when labels are unavailable. Springenberg (2015) propose a categorical generative adversarial network (CatGAN) which can be used for unsupervised and semi-supervised learning. The discriminator in a CatGAN outputs a distribution over classes and is trained to minimize the predicted entropy for real data and maximize the predicted entropy for fake data. Similar to our model, CatGANs use the feature space learned by the discriminator for the final supervised learning task. Salimans et al. (2016) recently proposed a semi-supervised GAN model in which the discriminator outputs a softmax over classes rather than a probability of real vs. fake. An additional ‘generated’ class is used as the target for generated samples. This method differs from our work in that it does not utilize context information and has only been applied to datasets of small resolution. However, the discriminator loss is similar to the one we propose and could be combined with our context-conditional approach. ",
178
+ "bbox": [
179
+ 174,
180
+ 617,
181
+ 825,
182
+ 811
183
+ ],
184
+ "page_idx": 1
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "More traditional semi-supervised methods include graph-based approaches (Zhou et al., 2004; Zhu, 2006) that show impressive performance when good image representations are available. However, the focus of our work is on learning such representations. ",
189
+ "bbox": [
190
+ 174,
191
+ 819,
192
+ 825,
193
+ 861
194
+ ],
195
+ "page_idx": 1
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "Generative models of images: Restricted Boltzmann machines (Salakhutdinov, 2015), de-noising autoencoders (Vincent et al., 2008) and variational autoencoders (Kingma & Welling, 2014) optimize a maximum likelihood criterion and thus learn decoders that map from latent space to image space. More recently, generative adversarial networks (Goodfellow et al., 2014) and generative moment matching networks (Li et al., 2015; Dziugaite et al., 2015) have been proposed. These methods ignore data likelihoods and instead directly train a generative model to produce realistic samples. Several extensions to the generative adversarial network framework have been proposed to scale the approach to larger images (Denton et al., 2015; Radford et al., 2016; Salimans et al., 2016). Our work draws on the insights of Radford et al. (2016) regarding adversarial training practices and architecture for the generator network, as well as the notion that the discriminator can produce useful features for classification tasks. ",
200
+ "bbox": [
201
+ 174,
202
+ 867,
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
+ 200
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "Other models used recurrent approaches to generate images (Gregor et al., 2015; Theis & Bethge, 2015; Mansimov et al., 2016; van den Oord et al., 2016). Dosovitskiy et al. (2015) trained a CNN to generate objects with different shapes, viewpoints and color. Sohl-Dickstein et al. (2015) propose a generative model based on a reverse diffusion process. While our model does involve image generation, it differs from these approaches in that the main focus is on learning a good representation for classification tasks. ",
222
+ "bbox": [
223
+ 174,
224
+ 208,
225
+ 825,
226
+ 291
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "Predictive generative models of videos aim to extrapolate from current frames to future ones and in doing so learn a feature representation that is useful for other tasks. In this vein, Ranzato et al. (2014) used an $\\ell _ { 2 }$ -loss in pixel-space. Mathieu et al. (2015) combined an adversarial loss with $\\ell _ { 2 }$ , giving models that generate crisper images. While our model is also predictive, it only considers interpolation within an image, rather than extrapolation in time. ",
233
+ "bbox": [
234
+ 174,
235
+ 297,
236
+ 825,
237
+ 368
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "2 APPROACH",
244
+ "text_level": 1,
245
+ "bbox": [
246
+ 174,
247
+ 380,
248
+ 299,
249
+ 396
250
+ ],
251
+ "page_idx": 2
252
+ },
253
+ {
254
+ "type": "text",
255
+ "text": "We present a semi-supervised learning framework built on generative adversarial networks (GANs) of Goodfellow et al. (2014). We first review the generative adversarial network framework and then introduce context conditional generative adversarial networks (CC-GANs). Finally, we show how combining a classification objective and a CC-GAN objective provides a unified framework for semi-supervised learning. ",
256
+ "bbox": [
257
+ 174,
258
+ 406,
259
+ 825,
260
+ 477
261
+ ],
262
+ "page_idx": 2
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "2.1 GENERATIVE ADVERSARIAL NETWORKS ",
267
+ "text_level": 1,
268
+ "bbox": [
269
+ 174,
270
+ 484,
271
+ 500,
272
+ 498
273
+ ],
274
+ "page_idx": 2
275
+ },
276
+ {
277
+ "type": "text",
278
+ "text": "The generative adversarial network approach (Goodfellow et al., 2014) is a framework for training generative models, which we briefly review. It consists of two networks pitted against one another in a two player game: A generative model, $G$ , is trained to synthesize images resembling the data distribution and a discriminative model, $D$ , is trained to distinguish between samples drawn from $G$ and images drawn from the training data. ",
279
+ "bbox": [
280
+ 174,
281
+ 505,
282
+ 825,
283
+ 575
284
+ ],
285
+ "page_idx": 2
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "More formally, let $\\mathcal { X } = \\{ \\mathbf { x } ^ { 1 } , . . . , \\mathbf { x } ^ { n } \\}$ be a dataset of images of dimensionality $d$ . Let $D$ denote a discriminative function that takes as input an image $\\mathbf { x } \\in \\mathbb { R } ^ { d }$ and outputs a scalar representing the probability of input $\\mathbf { x }$ being a real sample. Let $G$ denote the generative function that takes as input a random vector $\\mathbf { z } \\in \\mathbb { R } ^ { z }$ sampled from a prior noise distribution $p _ { \\mathrm { N o i s e } }$ and outputs a synthesized image $\\widetilde { \\mathbf { x } } = G ( \\mathbf { z } ) \\in \\mathbb { R } ^ { d }$ . Ideally, $D ( \\mathbf { x } ) = 1$ when $\\mathbf { x } \\in \\mathcal { X }$ and $D ( \\mathbf { x } ) = 0$ when $\\mathbf { x }$ was generated from $G$ . The GAN objective is given by: ",
290
+ "bbox": [
291
+ 174,
292
+ 582,
293
+ 825,
294
+ 666
295
+ ],
296
+ "page_idx": 2
297
+ },
298
+ {
299
+ "type": "equation",
300
+ "img_path": "images/cd55540991498b61f346789720e7e33bb93fed9e81b812e1097b290d5236b595.jpg",
301
+ "text": "$$\n\\operatorname* { m i n } _ { G } \\operatorname* { m a x } _ { D } \\ \\mathbb { E } _ { \\mathbf { x } \\sim \\mathcal { X } } [ \\log D ( \\mathbf { x } ) ] + \\mathbb { E } _ { \\mathbf { z } \\sim p _ { \\mathrm { N o i s e } } ( \\mathbf { z } ) } [ \\log ( 1 - D ( G ( \\mathbf { z } ) ) ) ]\n$$",
302
+ "text_format": "latex",
303
+ "bbox": [
304
+ 292,
305
+ 669,
306
+ 702,
307
+ 693
308
+ ],
309
+ "page_idx": 2
310
+ },
311
+ {
312
+ "type": "text",
313
+ "text": "The conditional generative adversarial network (Mirza $\\&$ Osindero, 2014) is an extension of the GAN in which both $D$ and $G$ receive an additional vector of information $\\mathbf { y }$ as input. The conditional GAN objective is given by: ",
314
+ "bbox": [
315
+ 176,
316
+ 703,
317
+ 826,
318
+ 746
319
+ ],
320
+ "page_idx": 2
321
+ },
322
+ {
323
+ "type": "equation",
324
+ "img_path": "images/42e15f9a7473f19c91c51e344a4475bdd01c04069d38b3d803f26cd67a5636d9.jpg",
325
+ "text": "$$\n\\operatorname* { m i n } _ { G } \\operatorname* { m a x } _ { D } \\ \\mathbb { E } _ { \\mathbf { x } , \\mathbf { y } \\sim \\mathcal { X } } [ \\log D ( \\mathbf { x } , \\mathbf { y } ) ] + \\mathbb { E } _ { \\mathbf { z } \\sim p _ { \\mathrm { N o i s e } } ( \\mathbf { z } ) } [ \\log ( 1 - D ( G ( \\mathbf { z } , \\mathbf { y } ) , \\mathbf { x } ) ) ]\n$$",
326
+ "text_format": "latex",
327
+ "bbox": [
328
+ 259,
329
+ 748,
330
+ 735,
331
+ 772
332
+ ],
333
+ "page_idx": 2
334
+ },
335
+ {
336
+ "type": "text",
337
+ "text": "2.2 CONTEXT-CONDITIONAL GENERATIVE ADVERSARIAL NETWORKS ",
338
+ "text_level": 1,
339
+ "bbox": [
340
+ 176,
341
+ 784,
342
+ 676,
343
+ 797
344
+ ],
345
+ "page_idx": 2
346
+ },
347
+ {
348
+ "type": "text",
349
+ "text": "We propose context-conditional generative adversarial networks (CC-GANs) which are conditional GANs where the generator is trained to fill in a missing image patch and the generator and discriminator are conditioned on the surrounding pixels. ",
350
+ "bbox": [
351
+ 174,
352
+ 804,
353
+ 825,
354
+ 848
355
+ ],
356
+ "page_idx": 2
357
+ },
358
+ {
359
+ "type": "text",
360
+ "text": "In particular, the generator $G$ receives as input an image with a randomly masked out patch. The generator outputs an entire image. We fill in the missing patch from the generated output and then pass the completed image into $D$ . We pass the completed image into $D$ rather than the context and the patch as two separate inputs so as to prevent $D$ from simply learning to identify discontinuities along the edge of the missing patch. ",
361
+ "bbox": [
362
+ 174,
363
+ 853,
364
+ 823,
365
+ 924
366
+ ],
367
+ "page_idx": 2
368
+ },
369
+ {
370
+ "type": "text",
371
+ "text": "More formally, let $\\mathbf { m } \\in \\mathbb { R } ^ { d }$ denote to a binary mask that will be used to drop out a specified portion of an image. The generator receives as input $\\mathbf { m } \\odot \\mathbf { x }$ where $\\odot$ denotes element-wise multiplication. The generator outputs $\\mathbf { x _ { G } } = G ( \\mathbf { m } \\odot \\mathbf { x } , \\mathbf { z } ) \\in \\mathbb { R } ^ { d }$ and the in-painted image $\\mathbf { x _ { I } }$ is given by: ",
372
+ "bbox": [
373
+ 173,
374
+ 103,
375
+ 825,
376
+ 146
377
+ ],
378
+ "page_idx": 3
379
+ },
380
+ {
381
+ "type": "equation",
382
+ "img_path": "images/b08d51b758b56a25fbd92132723b48f0ebc6c37e8caf179d9936cdcfc82fd613.jpg",
383
+ "text": "$$\n\\mathbf { x _ { I } } = \\left( 1 - \\mathbf { m } \\right) \\odot \\mathbf { x _ { G } } + \\mathbf { m } \\odot \\mathbf { x }\n$$",
384
+ "text_format": "latex",
385
+ "bbox": [
386
+ 395,
387
+ 154,
388
+ 602,
389
+ 170
390
+ ],
391
+ "page_idx": 3
392
+ },
393
+ {
394
+ "type": "text",
395
+ "text": "The CC-GAN objective is given by: ",
396
+ "bbox": [
397
+ 176,
398
+ 184,
399
+ 411,
400
+ 199
401
+ ],
402
+ "page_idx": 3
403
+ },
404
+ {
405
+ "type": "equation",
406
+ "img_path": "images/63f3c23806a52b6f1cd546afb3f83caaf20f29375d10c2beadfc081fa8fc15c4.jpg",
407
+ "text": "$$\n\\operatorname* { m i n } _ { G } \\operatorname* { m a x } _ { D } \\mathbb { E } _ { \\mathbf { x } \\sim \\mathcal { X } } [ \\log D ( \\mathbf { x } ) ] + \\mathbb { E } _ { \\mathbf { x } \\sim \\mathcal { X } , \\mathbf { m } \\sim \\mathcal { M } } [ \\log ( 1 - D ( \\mathbf { x _ { I } } ) ) ]\n$$",
408
+ "text_format": "latex",
409
+ "bbox": [
410
+ 297,
411
+ 205,
412
+ 699,
413
+ 229
414
+ ],
415
+ "page_idx": 3
416
+ },
417
+ {
418
+ "type": "text",
419
+ "text": "2.3 COMBINED GAN AND CC-GAN ",
420
+ "text_level": 1,
421
+ "bbox": [
422
+ 176,
423
+ 243,
424
+ 441,
425
+ 258
426
+ ],
427
+ "page_idx": 3
428
+ },
429
+ {
430
+ "type": "text",
431
+ "text": "While the generator of the CC-GAN outputs a full image, only a portion of it (corresponding to the missing hole) is seen by the discriminator. In the combined model, which we denote by $\\mathrm { C C - \\bar { G } A N ^ { 2 } }$ , the fake examples for the discriminator include both the in-painted image $\\mathbf { x _ { I } }$ and the full image $\\mathbf { x _ { G } }$ produced by the generator (i.e. not just the missing patch). By combining the GAN and CC-GAN approaches, we introduce a wider array of negative examples to the discriminator. The CC-GAN2 objective given by: ",
432
+ "bbox": [
433
+ 173,
434
+ 265,
435
+ 826,
436
+ 349
437
+ ],
438
+ "page_idx": 3
439
+ },
440
+ {
441
+ "type": "equation",
442
+ "img_path": "images/f6216d9f08f1bd9f49dd7e560cc09cdec6aacbe671994376e8ac9209e0283ced.jpg",
443
+ "text": "$$\n\\begin{array} { r l } { { \\operatorname* { m i n } \\operatorname* { m a x } _ { D } \\mathbb { E } _ { \\mathbf { x } \\sim \\mathcal { X } } [ \\log D ( \\mathbf { x } ) ] } } \\\\ & { + \\ \\mathbb { E } _ { \\mathbf { x } \\sim \\mathcal { X } , \\mathbf { m } \\sim \\mathcal { M } } [ \\log ( 1 - D ( \\mathbf { x _ { I } } ) ) ] } \\\\ & { + \\ \\mathbb { E } _ { \\mathbf { x } \\sim \\mathcal { X } , \\mathbf { m } \\sim \\mathcal { M } } [ \\log ( 1 - D ( \\mathbf { x _ { G } } ) ) ] } \\end{array}\n$$",
444
+ "text_format": "latex",
445
+ "bbox": [
446
+ 361,
447
+ 356,
448
+ 635,
449
+ 419
450
+ ],
451
+ "page_idx": 3
452
+ },
453
+ {
454
+ "type": "text",
455
+ "text": "2.4 SEMI-SUPERVISED LEARNING WITH CC-GANS ",
456
+ "text_level": 1,
457
+ "bbox": [
458
+ 174,
459
+ 430,
460
+ 542,
461
+ 445
462
+ ],
463
+ "page_idx": 3
464
+ },
465
+ {
466
+ "type": "text",
467
+ "text": "A common approach to semi-supervised learning is to combine a supervised and unsupervised objective during training. As a result unlabeled data can be leveraged to aid the supervised task. ",
468
+ "bbox": [
469
+ 173,
470
+ 452,
471
+ 821,
472
+ 481
473
+ ],
474
+ "page_idx": 3
475
+ },
476
+ {
477
+ "type": "text",
478
+ "text": "Intuitively, a GAN discriminator must learn something about the structure of natural images in order to effectively distinguish real from generated images. Recently, Radford et al. (2016) showed that a GAN discriminator learns a hierarchical image representation that is useful for object classification. Such results suggest that combining an unsupervised GAN objective with a supervised classification objective would produce a simple and effective semi-supervised learning method. This approach, denoted by SSL-GAN, is illustrated in Fig. 1(b). The discriminator network receives a gradient from the real/fake loss for every real and generated image. The discriminator also receives a gradient from the classification loss on the subset of (real) images for which labels are available. ",
479
+ "bbox": [
480
+ 173,
481
+ 486,
482
+ 825,
483
+ 598
484
+ ],
485
+ "page_idx": 3
486
+ },
487
+ {
488
+ "type": "text",
489
+ "text": "Generative adversarial networks have shown impressive performance on many diverse datasets. However, samples are most coherent when the set of images the network is trained on comes from a limited domain (eg. churches or faces). Additionally, it is difficult to train GANs on very large images. Both these issues suggest semi-supervised learning with vanilla GANs may not scale well to datasets of large diverse images. Rather than determining if a full image is real or fake, context conditional GANs address a different task: determining if a part of an image is real or fake given the surrounding context. ",
490
+ "bbox": [
491
+ 173,
492
+ 604,
493
+ 825,
494
+ 703
495
+ ],
496
+ "page_idx": 3
497
+ },
498
+ {
499
+ "type": "text",
500
+ "text": "Formally, let $\\mathcal { X } _ { \\mathcal { L } } = \\{ ( \\mathbf { x } ^ { 1 } , y ^ { 1 } ) , . . . , ( \\mathbf { x } ^ { n } , y ^ { n } ) \\}$ denote a dataset of labeled images. Let $D _ { c } ( x )$ denote the output of the classifier head on the discriminator (see Fig. 1(c) for details). Then the semisupervised CC-GAN objective is: ",
501
+ "bbox": [
502
+ 176,
503
+ 708,
504
+ 825,
505
+ 752
506
+ ],
507
+ "page_idx": 3
508
+ },
509
+ {
510
+ "type": "equation",
511
+ "img_path": "images/50d531740f74295750ae505cde4b9fd0c47309bde8eec5e5f1f05e10655552b0.jpg",
512
+ "text": "$$\n\\underset { G } { \\mathrm { m i n } } \\underset { D } { \\mathrm { m a x } } \\mathbb { E } _ { \\mathbf { x } \\sim \\mathcal { X } } [ \\log D ( \\mathbf { x } ) ] + \\mathbb { E } _ { \\mathbf { x } \\sim \\mathcal { X } , \\mathbf { m } \\sim \\mathcal { M } } [ \\log ( 1 - D ( \\mathbf { x _ { I } } ) ) ] + \\lambda _ { c } \\mathbb { E } _ { \\mathbf { x } , y \\sim \\mathcal { X } _ { \\mathcal { L } } } [ \\log ( D _ { c } ( y | \\mathbf { x } ) ) ]\n$$",
513
+ "text_format": "latex",
514
+ "bbox": [
515
+ 192,
516
+ 758,
517
+ 784,
518
+ 781
519
+ ],
520
+ "page_idx": 3
521
+ },
522
+ {
523
+ "type": "text",
524
+ "text": "The hyperparameter $\\lambda _ { c }$ balances the classification and adversarial losses. We only consider the CCGAN in the semi-supervised setting and thus drop the SSL notation when referring to this model. ",
525
+ "bbox": [
526
+ 176,
527
+ 796,
528
+ 825,
529
+ 825
530
+ ],
531
+ "page_idx": 3
532
+ },
533
+ {
534
+ "type": "text",
535
+ "text": "2.5 MODEL ARCHITECTURE AND TRAINING DETAILS ",
536
+ "text_level": 1,
537
+ "bbox": [
538
+ 173,
539
+ 832,
540
+ 560,
541
+ 847
542
+ ],
543
+ "page_idx": 3
544
+ },
545
+ {
546
+ "type": "text",
547
+ "text": "The architecture of our generative model, $G$ , is inspired by the generator architecture of the DCGAN (Radford et al., 2016). The model consists of a sequence of convolutional layers with subsampling (but no pooling) followed by a sequence of fractionally-strided convolutional layers. For the discriminator, $D$ , we used the VGG-A network (Simonyan & Zisserman, 2015) without the fully connected layers (which we call the VGG-A’ architecture). Details of the generator and discriminator are given in Fig. 2. The input to the generator is an image with a patch zeroed out. In preliminary experiments we also tried passing in a separate mask to the generator to make the missing area more explicit but found this did not effect performance. ",
548
+ "bbox": [
549
+ 174,
550
+ 853,
551
+ 825,
552
+ 924
553
+ ],
554
+ "page_idx": 3
555
+ },
556
+ {
557
+ "type": "image",
558
+ "img_path": "images/75e463c4a6f6e0e416af86d2fb282f317b8f489cea266141a491353b03c04d11.jpg",
559
+ "image_caption": [
560
+ "Figure 2: Architecture of our context-conditional generative adversarial network (CC-GAN). conv(64, $4 \\times 4$ , $2 \\times 2$ ) denotes a conv layer with 64 channels, 4x4 kernels and stride $2 \\mathbf { x } 2$ . Each convolution layer is followed by a spatial batch normalization and rectified linear layer. Dashed lines indicate optional pathways. "
561
+ ],
562
+ "image_footnote": [],
563
+ "bbox": [
564
+ 228,
565
+ 95,
566
+ 764,
567
+ 526
568
+ ],
569
+ "page_idx": 4
570
+ },
571
+ {
572
+ "type": "text",
573
+ "text": "",
574
+ "bbox": [
575
+ 174,
576
+ 671,
577
+ 825,
578
+ 713
579
+ ],
580
+ "page_idx": 4
581
+ },
582
+ {
583
+ "type": "text",
584
+ "text": "Even with the context conditioning it is difficult to generate large image patches that look realistic, making it problematic to scale our approach to high resolution images. To address this, we propose conditioning the generator on both the high resolution image with a missing patch and a low resolution version of the whole image (with no missing region). In this setting, the generators task becomes one of super-resolution on a portion of an image. However, the discriminator does not receive the low resolution image and thus is still faced with the same problem of determining if a given in-painting is viable or not. Where indicated, we used this approach in our PASCAL VOC 2007 experiments, with the original image being downsampled by a factor of 4. This provided enough information for the generator to fill in larger holes but not so much that it made the task trivial. This optional low resolution image is illustrated in Fig. 2(left) with the dotted line. ",
585
+ "bbox": [
586
+ 174,
587
+ 719,
588
+ 825,
589
+ 859
590
+ ],
591
+ "page_idx": 4
592
+ },
593
+ {
594
+ "type": "text",
595
+ "text": "We followed the training procedures of Radford et al. (2016). We used the Adam optimizer (Kingma & Ba, 2015) in all our experiments with learning rate of 0.0002, momentum term $\\beta _ { 1 }$ of 0.5, and the remaining Adam hyperparameters set to their default values. We set $\\lambda _ { c } = 1$ for all experiments. ",
596
+ "bbox": [
597
+ 174,
598
+ 866,
599
+ 821,
600
+ 909
601
+ ],
602
+ "page_idx": 4
603
+ },
604
+ {
605
+ "type": "table",
606
+ "img_path": "images/83930ec27c79baafb2fbd31eb6562bffee5e021bd31aa54342f0011f237c4d3b.jpg",
607
+ "table_caption": [
608
+ "Table 1: Comparison of CC-GAN and other published results on STL-10. "
609
+ ],
610
+ "table_footnote": [],
611
+ "table_body": "<table><tr><td>Method</td><td>Accuracy</td></tr><tr><td>Multi-task Bayesian Optimization (Swersky et al.,2013) Exemplar CNN(Dosovitskiy et al.,2014) Stacked What-Where Autoencoder (Zhao et al.,2016)</td><td>70.10± 0.6 75.40 ± 0.3 74.33</td></tr><tr><td>Supervised VGG-A&#x27;</td><td>61.19 ± 1.1</td></tr><tr><td>SSL-GAN</td><td>73.81 ± 0.5</td></tr><tr><td>CC-GAN</td><td>75.67 ± 0.5</td></tr><tr><td>CC-GAN²</td><td>77.79 ± 0.8</td></tr></table>",
612
+ "bbox": [
613
+ 267,
614
+ 99,
615
+ 727,
616
+ 210
617
+ ],
618
+ "page_idx": 5
619
+ },
620
+ {
621
+ "type": "text",
622
+ "text": "3 EXPERIMENTS ",
623
+ "text_level": 1,
624
+ "bbox": [
625
+ 176,
626
+ 267,
627
+ 328,
628
+ 284
629
+ ],
630
+ "page_idx": 5
631
+ },
632
+ {
633
+ "type": "text",
634
+ "text": "3.1 STL-10 CLASSIFICATION ",
635
+ "text_level": 1,
636
+ "bbox": [
637
+ 174,
638
+ 295,
639
+ 390,
640
+ 309
641
+ ],
642
+ "page_idx": 5
643
+ },
644
+ {
645
+ "type": "text",
646
+ "text": "STL-10 is a dataset of $9 6 \\times 9 6$ color images with a 1:100 ratio of labeled to unlabeled examples, making it an ideal fit for our semi-supervised learning framework. The training set consists of 5000 labeled images, mapped to 10 pre-defined folds of 1000 images each, and 100,000 unlabeled images. The labeled images belong to 10 classes and were extracted from the ImageNet dataset and the unlabeled images come from a broader distribution of classes. We follow the standard testing protocol and train 10 different models on each of the 10 predefined folds of data. We then evaluate classification accuracy of each model on the test set and report the mean and standard deviation. ",
647
+ "bbox": [
648
+ 173,
649
+ 316,
650
+ 825,
651
+ 414
652
+ ],
653
+ "page_idx": 5
654
+ },
655
+ {
656
+ "type": "text",
657
+ "text": "We trained our CC-GAN and $\\mathrm { C C - G A N ^ { 2 } }$ models on $6 4 \\times 6 4$ crops of the $9 6 \\times 9 6$ image. The hole was $3 2 \\times 3 2$ pixels and the location of the hole varied randomly (see Fig. 3(top)). We trained for 100 epochs and then fine-tuned the discriminator on the $9 6 \\mathbf { x } 9 6$ labeled images, stopping when training accuracy reached $100 \\%$ . As shown in Table 1, the CC-GAN model performs comparably to current state of the art (Dosovitskiy et al., 2014) and the $\\mathrm { C C - G A N ^ { 2 } }$ model improves upon it. ",
658
+ "bbox": [
659
+ 174,
660
+ 420,
661
+ 825,
662
+ 491
663
+ ],
664
+ "page_idx": 5
665
+ },
666
+ {
667
+ "type": "text",
668
+ "text": "We also trained two baseline models in an attempt to tease apart the contributions of adversarial training and context conditional adversarial training. The first is a purely supervised training of the VGG-A’ model (the same architecture as the discriminator in the CC-GAN framework). This was trained using a dropout of 0.5 on the final layer and weight decay of 0.001. The performance of this model is significantly worse than the CC-GAN model. ",
669
+ "bbox": [
670
+ 174,
671
+ 497,
672
+ 825,
673
+ 568
674
+ ],
675
+ "page_idx": 5
676
+ },
677
+ {
678
+ "type": "text",
679
+ "text": "We also trained a semi-supervised GAN (SSL-GAN, see Fig. 1(b)) on STL-10. This consisted of the same discriminator as the CC-GAN (VGG-A’ architecture) and generator from the DCGAN model (Radford et al., 2016). The training setup in this case is identical to the CC-GAN model. The SSLGAN performs almost as well as the CC-GAN, confirming our hypothesis that the GAN objective is a useful unsupervised criterion. ",
680
+ "bbox": [
681
+ 174,
682
+ 574,
683
+ 825,
684
+ 643
685
+ ],
686
+ "page_idx": 5
687
+ },
688
+ {
689
+ "type": "text",
690
+ "text": "3.2 PASCAL VOC CLASSIFICATION ",
691
+ "text_level": 1,
692
+ "bbox": [
693
+ 176,
694
+ 651,
695
+ 439,
696
+ 666
697
+ ],
698
+ "page_idx": 5
699
+ },
700
+ {
701
+ "type": "text",
702
+ "text": "In order to compare against other methods that utilize spatial context we ran the CC-GAN model on PASCAL VOC 2007 dataset. This dataset consists of natural images coming from 20 classes. The dataset contains a large amount of variability with objects varying in size, pose, and position. The training and validation sets combined contain 5,011 images, and the test set contains 4,952 images. The standard measure of performance is mean average precision (mAP). ",
703
+ "bbox": [
704
+ 174,
705
+ 674,
706
+ 825,
707
+ 743
708
+ ],
709
+ "page_idx": 5
710
+ },
711
+ {
712
+ "type": "text",
713
+ "text": "We trained each model on the combined training and validation set for ${ \\sim } 5 0 0 0$ epochs and evaluated on the test set once1. Following Pathak et al. (2016), we train using random cropping, and then evaluate using the average prediction from 10 random crops. ",
714
+ "bbox": [
715
+ 174,
716
+ 751,
717
+ 825,
718
+ 792
719
+ ],
720
+ "page_idx": 5
721
+ },
722
+ {
723
+ "type": "text",
724
+ "text": "Our best performing model was trained on images of resolution $1 2 8 \\times 1 2 8$ with a hole size of $6 4 \\times 6 4$ and a low resolution input of size $3 2 \\times 3 2$ . Table 2 compares our CC-GAN method to other feature learning approaches on the PASCAL test set. It outperforms them, beating the current state of the art (Wang & Gupta, 2015) by $3 . 8 \\%$ . It is important to note that our feature extractor is the VGGA’ model which is larger than the AlexNet architecture (Krizhevsky et al., 2012) used by other approaches in Table 2. However, purely supervised training of the two models reveals that VGG-A’ is less than $2 \\%$ better than AlexNet. Furthermore, our model outperforms the supervised VGG-A’ baseline by a $7 \\%$ margin ( $6 2 . 2 \\%$ vs. $5 5 . 2 \\%$ ). This suggests that our gains stem from the CC-GAN method rather than the use of a better architecture. ",
725
+ "bbox": [
726
+ 173,
727
+ 799,
728
+ 825,
729
+ 883
730
+ ],
731
+ "page_idx": 5
732
+ },
733
+ {
734
+ "type": "table",
735
+ "img_path": "images/9cf929429a7fedc6d30cae15830981583f8293831fe4446a994435a4feeef545.jpg",
736
+ "table_caption": [
737
+ "Table 2: Comparison of CC-GAN and other methods (as reported by Pathak et al. (2016)) on PASCAL VOC 2007. "
738
+ ],
739
+ "table_footnote": [],
740
+ "table_body": "<table><tr><td>Method</td><td>mAP</td></tr><tr><td>Supervised AlexNet</td><td>53.3 %</td></tr><tr><td>Visual tracking from video (Wang &amp; Gupta, 2015)</td><td>58.4%</td></tr><tr><td>Context prediction (Doersch et al.,2015)</td><td>55.3%</td></tr><tr><td>Context encoders (Pathak et al., 2016)</td><td>56.5%</td></tr><tr><td>Supervised VGG-A&#x27;</td><td>55.2%</td></tr><tr><td>CC-GAN</td><td>62.2%</td></tr><tr><td>CC-GAN²</td><td>62.7%</td></tr></table>",
741
+ "bbox": [
742
+ 267,
743
+ 99,
744
+ 727,
745
+ 209
746
+ ],
747
+ "page_idx": 6
748
+ },
749
+ {
750
+ "type": "table",
751
+ "img_path": "images/f0961dc5be29f291e8ea8c70039be171b9df89f2fc33011ac60992d382e28b1e.jpg",
752
+ "table_caption": [
753
+ "Table 3: Comparison of different CC-GAN variants on PASCAL VOC 2007. "
754
+ ],
755
+ "table_footnote": [],
756
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Method</td><td rowspan=1 colspan=1>Image size</td><td rowspan=1 colspan=1>Hole size</td><td rowspan=1 colspan=1>Low res size</td><td rowspan=1 colspan=1>mAP</td></tr><tr><td rowspan=1 colspan=1>Supervised VGG-A&#x27;CC-GAN</td><td rowspan=1 colspan=1>64×6464×64</td><td rowspan=1 colspan=1>32×32</td><td rowspan=1 colspan=1>=</td><td rowspan=1 colspan=1>52.97%56.79%</td></tr><tr><td rowspan=1 colspan=1>Supervised VGG-A&#x27;CC-GANCC-GAN</td><td rowspan=1 colspan=1>96×9696×9696×96</td><td rowspan=1 colspan=1>=48×4848×48</td><td rowspan=1 colspan=1>=24×24</td><td rowspan=1 colspan=1>55.22%60.38%60.98%</td></tr><tr><td rowspan=1 colspan=1>Supervised VGG-A&#x27;CC-GANCC-GAN</td><td rowspan=1 colspan=1>128×128128×128128×128</td><td rowspan=1 colspan=1>=64×6464×64</td><td rowspan=1 colspan=1>-=32×32</td><td rowspan=1 colspan=1>55.2%61.3%62.2%</td></tr></table>",
757
+ "bbox": [
758
+ 236,
759
+ 279,
760
+ 758,
761
+ 404
762
+ ],
763
+ "page_idx": 6
764
+ },
765
+ {
766
+ "type": "text",
767
+ "text": "",
768
+ "bbox": [
769
+ 176,
770
+ 472,
771
+ 821,
772
+ 513
773
+ ],
774
+ "page_idx": 6
775
+ },
776
+ {
777
+ "type": "text",
778
+ "text": "Table 3 shows the effect of training on different resolutions. The CC-GAN improves over the baseline CNN consistently regardless of image size. We found that conditioning on the low resolution image began to help when the hole size was largest $( 6 4 \\times 6 4 )$ . We hypothesize that the low resolution conditioning would be more important for larger images, potentially allowing the method to scale to larger image sizes than we explored in this work. ",
779
+ "bbox": [
780
+ 174,
781
+ 521,
782
+ 825,
783
+ 590
784
+ ],
785
+ "page_idx": 6
786
+ },
787
+ {
788
+ "type": "text",
789
+ "text": "3.3 INPAINTING ",
790
+ "text_level": 1,
791
+ "bbox": [
792
+ 174,
793
+ 599,
794
+ 299,
795
+ 613
796
+ ],
797
+ "page_idx": 6
798
+ },
799
+ {
800
+ "type": "text",
801
+ "text": "We now show some sample in-paintings produced by our CC-GAN generators. In our semisupervised learning experiments on STL-10 we remove a single fixed size hole from the image. The top row of Fig. 3 shows in-paintings produced by this model. We can also explored different masking schemes as illustrated in the remaining rows of Fig. 3 (however these did not improve classification results). In all cases we see that training the generator with the adversarial loss produces sharp semantically plausible in-painting results. ",
802
+ "bbox": [
803
+ 174,
804
+ 621,
805
+ 825,
806
+ 704
807
+ ],
808
+ "page_idx": 6
809
+ },
810
+ {
811
+ "type": "text",
812
+ "text": "Fig. 4 shows generated images and in-painted images from a model trained with the CC-GAN2 criterion. The output of a CC-GAN generator tends to be corrupted outside the patch used to inpaint the image (since gradients only flow back to the missing patch). However, in the CC-GAN2 model, we see that both the in-painted image and the generated image are coherent and semantically consistent with the masked input image. ",
813
+ "bbox": [
814
+ 174,
815
+ 710,
816
+ 823,
817
+ 781
818
+ ],
819
+ "page_idx": 6
820
+ },
821
+ {
822
+ "type": "text",
823
+ "text": "Fig. 5 shows in-painted images from a generator trained on $1 2 8 \\times 1 2 8$ PASCAL images. Fig. 6 shows the effect of adding a low resolution $( 3 2 \\times 3 2 )$ image as input to the generator. For comparison we also show the result of in-painting by filling in with a bi-linearly upsampled image. Here we see the generator produces high-frequency structure rather than simply learning to copy the low resolution patch. ",
824
+ "bbox": [
825
+ 174,
826
+ 787,
827
+ 825,
828
+ 858
829
+ ],
830
+ "page_idx": 6
831
+ },
832
+ {
833
+ "type": "text",
834
+ "text": "4 DISCUSSION ",
835
+ "text_level": 1,
836
+ "bbox": [
837
+ 174,
838
+ 869,
839
+ 310,
840
+ 886
841
+ ],
842
+ "page_idx": 6
843
+ },
844
+ {
845
+ "type": "text",
846
+ "text": "We have presented a simple semi-supervised learning framework based on in-painting with an adversarial loss. The generator in our CC-GAN model is capable of producing semantically meaningful in-paintings and the discriminator performs comparable to or better than existing semi-supervised methods on two classification benchmarks. ",
847
+ "bbox": [
848
+ 174,
849
+ 895,
850
+ 821,
851
+ 924
852
+ ],
853
+ "page_idx": 6
854
+ },
855
+ {
856
+ "type": "image",
857
+ "img_path": "images/84e72393ad78ba91756006fb5a57e6c9cb91c209426da709b0af98f36dd5292e.jpg",
858
+ "image_caption": [
859
+ "Figure 3: STL-10 in-painting with CC-GAN training and varying methods of dropping out the image. "
860
+ ],
861
+ "image_footnote": [],
862
+ "bbox": [
863
+ 183,
864
+ 101,
865
+ 821,
866
+ 329
867
+ ],
868
+ "page_idx": 7
869
+ },
870
+ {
871
+ "type": "image",
872
+ "img_path": "images/e3c40c35812801b637189c53c273f3f7a1c66f8ffea838a8a4e23d1dbf0c1bcc.jpg",
873
+ "image_caption": [
874
+ "Figure 4: STL-10 in-painting with combined CC-GAN2 training. "
875
+ ],
876
+ "image_footnote": [],
877
+ "bbox": [
878
+ 181,
879
+ 390,
880
+ 823,
881
+ 493
882
+ ],
883
+ "page_idx": 7
884
+ },
885
+ {
886
+ "type": "image",
887
+ "img_path": "images/7c2cc9d7e2e34e5d761bccd468b83b706503506dcc091649f12805a89d06b2a3.jpg",
888
+ "image_caption": [
889
+ "Figure 5: PASCAL in-painting with CC-GAN. "
890
+ ],
891
+ "image_footnote": [],
892
+ "bbox": [
893
+ 176,
894
+ 540,
895
+ 823,
896
+ 622
897
+ ],
898
+ "page_idx": 7
899
+ },
900
+ {
901
+ "type": "image",
902
+ "img_path": "images/69cca881be43870bc111ff5f24aaf4848fbd7c70d7b79aa7280b9ffb4ffe5286.jpg",
903
+ "image_caption": [
904
+ "Figure 6: PASCAL in-painting with CC-GAN conditioned on low resolution image. Top two rows show input to generator. Third row shows inpainting my bilinear upsampling. Bottom row shows inpainted image by generator. "
905
+ ],
906
+ "image_footnote": [],
907
+ "bbox": [
908
+ 176,
909
+ 670,
910
+ 821,
911
+ 830
912
+ ],
913
+ "page_idx": 7
914
+ },
915
+ {
916
+ "type": "text",
917
+ "text": "",
918
+ "bbox": [
919
+ 173,
920
+ 103,
921
+ 823,
922
+ 132
923
+ ],
924
+ "page_idx": 8
925
+ },
926
+ {
927
+ "type": "text",
928
+ "text": "Since discrimination of real/fake in-paintings is more closely related to the target task of object classification than extracting a feature representation suitable for in-filling, it is not surprising that we are able to exceed the performance of Pathak et al. (2016) on PASCAL classification. Furthermore, since our model operates on images half the resolution as those used by other approaches ( $1 2 8 \\times 1 2 8$ vs. $2 2 4 \\times 2 4 4$ , there is potential for further gains if improvements in the generator resolution can be made. Our models and code are available at https://github.com/edenton/cc-gan. ",
929
+ "bbox": [
930
+ 174,
931
+ 138,
932
+ 825,
933
+ 223
934
+ ],
935
+ "page_idx": 8
936
+ },
937
+ {
938
+ "type": "text",
939
+ "text": "Acknowledgements: Emily Denton is supported by a Google Fellowship. Rob Fergus is grateful for the support of CIFAR. ",
940
+ "bbox": [
941
+ 173,
942
+ 229,
943
+ 823,
944
+ 257
945
+ ],
946
+ "page_idx": 8
947
+ },
948
+ {
949
+ "type": "text",
950
+ "text": "REFERENCES ",
951
+ "text_level": 1,
952
+ "bbox": [
953
+ 174,
954
+ 270,
955
+ 285,
956
+ 285
957
+ ],
958
+ "page_idx": 8
959
+ },
960
+ {
961
+ "type": "text",
962
+ "text": "D. Bahdanau, K. Cho, and Y. Bengio. Neural machine translation by jointly learning to align and translate. In The International Conference on Learning Representations, 2015. \nR. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu, and P. Kuksa. Natural language processing (almost) from scratch. Journal of Machine Learning Research, 2011. \nEmily Denton, Soumith Chintala, Arthur Szlam, and Rob Fergus. Deep generative image models using a laplacian pyramid of adversarial networks. In Advances in Neural Information Processing Systems 28, 2015. \nCarl Doersch, Abhinav Gupta, and Alexei A. Efros. Unsupervised visual representation learning by context prediction. In International Conference on Computer Vision, 2015. \nAlexey Dosovitskiy, Jost Tobias Springenberg, Martin Riedmiller, and Thomas Brox. Discriminative unsupervised feature learning with convolutional neural networks. In Advances in Neural Information Processing Systems 27, 2014. \nAlexey Dosovitskiy, Jost Tobias Springenberg, and Thomas Brox. Learning to generate chairs, tables and cars with convolutional networks. In Computer Vision and Pattern Recognition, 2015. \nGintare Karolina Dziugaite, Daniel M. Roy, and Zoubin Ghahramani. Training generative neural networks via maximum mean discrepancy optimization. In Uncertainty in Artificial Intelligence, 2015. \nIan J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems 27, 2014. \nKarol Gregor, Ivo Danihelka, Alex Graves, Danilo Jimenez Rezende, and Daan Wierstra. Draw: A recurrent neural network for image generation. In International Conference on Machine Learning, 2015. \nG. E. Hinton, S. Osindero, and Y. Teh. A fast learning algorithm for deep belief nets. Neural Computation, 18, 2006. \nD.P. Kingma and J. Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations, 2015. \nD.P. Kingma and M. Welling. Auto-encoding variational bayes. In International Conference on Learning Representations, 2014. \nD.P. Kingma, D.J. Rezende, S. Mohamed, and M. Welling. Semi-supervised learning with deep generative models. In Advances in Neural Information Processing Systems 27, 2014. \nRyan Kiros, Yukun Zhu, Ruslan Salakhutdinov, Richard S. Zemel, Antonio Torralba, Raquel Urtasun, and Sanja Fidler. Skip-thought vectors. In Advances in Neural Information Processing Systems 28, 2015. \nAlex Krizhevsky, Ilya Sutskever, and Geoff Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems 25, pp. 1106–1114, 2012. \nD. H. Lee. Pseudo-label: The simple and efficient semi-supervised learning method for deep neural networks. In Workshop on Challenges in Representation Learning, ICML, 2013. \nYujia Li, Kevin Swersky, and Richard Zemel. Generative moment matching networks. In ICML, 2015. \nElman Mansimov, Emilio Parisotto, Jimmy Ba, and Ruslan Salakhutdinov. Generating images from captions with attention. In The International Conference on Learning Representations, 2016. ",
963
+ "bbox": [
964
+ 169,
965
+ 282,
966
+ 826,
967
+ 917
968
+ ],
969
+ "page_idx": 8
970
+ },
971
+ {
972
+ "type": "text",
973
+ "text": "",
974
+ "bbox": [
975
+ 173,
976
+ 897,
977
+ 826,
978
+ 924
979
+ ],
980
+ "page_idx": 8
981
+ },
982
+ {
983
+ "type": "text",
984
+ "text": "Michael Mathieu, Camille Couprie, and Yann LeCun. Deep multi-scale video prediction beyond mean square ¨ error. arXiv 1511.05440, 2015. \nT. Mikolov, I. Sutskever, K. Chen, G. S. Corrado, and J. Dean. Distributed representations of words and phrases and their compositionality. In Advances in Neural Information Processing Systems 28, 2015. \nMehdi Mirza and Simon Osindero. Conditional generative adversarial nets. CoRR, abs/1411.1784, 2014. \nMehdi Noroozi and Paolo Favaro. Unsupervised learning of visual representations by solving jigsaw puzzles. CoRR, abs/1603.09246, 2016. \nDeepak Pathak, Philipp Krahenbuhl, Jeff Donahue, Trevor Darrell, and Alexei A. Efros. Context encoders: Feature learning by inpainting. In Computer Vision and Pattern Recognition, 2016. \nAlec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In The International Conference on Learning Representations, 2016. \nMarc’Aurelio Ranzato, Arthur Szlam, Joan Bruna, Michael Mathieu, Ronan Collobert, and Sumit Chopra. ¨ Video (language) modeling: a baseline for generative models of natural videos. arXiv 1412.6604, 2014. \nAntti Rasmus, Mathias Berglund, Mikko Honkala, Harri Valpola, and Tapani Raiko. Semi-supervised learning with ladder network. In Advances in Neural Information Processing Systems 28, 2015. \nRuslan Salakhutdinov. Learning deep generative models. Annual Review of Statistics and Its Application, 2: 361–385, 2015. \nTim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In Advances in Neural Information Processing Systems 29, 2016. \nK. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In The International Conference on Learning Representations, 2015. \nJascha Sohl-Dickstein, Eric A. Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. CoRR, abs/1503.03585, 2015. \nJost Tobias Springenberg. Unsupervised and semi-supervised learning with categorical generative adversarial networks. arXiv 1511.06390, 2015. \nIlya Sutskever, Oriol Vinyals, and Quoc Le. Sequence to sequence learning with neural networks. In Advances in Neural Information Processing Systems 27, 2014. \nKevin Swersky, Jasper Snoek, and Ryan P. Adams. Multi-task bayesian optimization. In Advances in Neural Information Processing Systems 26, 2013. \nL. Theis and M. Bethge. Generative image modeling using spatial lstms. In Advances in Neural Information Processing Systems 28, 2015. \nAaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. In ICML, 2016. \nP. Vincent, H. Larochelle, Y. Bengio, and P.A. Manzagol. Extracting and composing robust features with denoising autoencoders. In International Conference on Machine Learning, 2008. \nXiaolong Wang and Abhinav Gupta. Unsupervised learning of visual representations using videos. In ICCV, 2015. \nXiang Zhang, Junbo Zhao, and Yann LeCun. Character-level convolutional networks for text classification. In Advances in Neural Information Processing Systems 28, 2015. \nJunbo Zhao, Michael Mathieu, Ross Goroshin, and Yann LeCun. Stacked what-where auto-encoders. In International Conference on Learning Representations, 2016. \nD. Zhou, O. Bousquet, T. Lal, J. Weston, and B. Schoelkopf. Learning with local and global consistency. In Advances in Neural Information Processing Systemsi 17, 2004. ",
985
+ "bbox": [
986
+ 171,
987
+ 65,
988
+ 828,
989
+ 875
990
+ ],
991
+ "page_idx": 9
992
+ },
993
+ {
994
+ "type": "text",
995
+ "text": "Xiaojin Zhu. Semi-supervised learning literature survey, 2006. ",
996
+ "bbox": [
997
+ 173,
998
+ 867,
999
+ 544,
1000
+ 881
1001
+ ],
1002
+ "page_idx": 9
1003
+ }
1004
+ ]
parse/train/BJ--gPcxl/BJ--gPcxl_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJ--gPcxl/BJ--gPcxl_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/D9I3drBz4UC/D9I3drBz4UC.md ADDED
@@ -0,0 +1,353 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LONG-TAILED RECOGNITION BYROUTING DIVERSE DISTRIBUTION-AWARE EXPERTS
2
+
3
+ Xudong Wang1, Long Lian1, Zhongqi Miao1, Ziwei Liu2, Stella X. $\mathbf { Y u } ^ { 1 }$
4
+
5
+ 1UC Berkeley / ICSI, 2Nanyang Technological University {xdwang,longlian,zhongqi.miao,stellayu}@berkeley.edu ziwei.liu@ntu.edu.sg
6
+
7
+ # ABSTRACT
8
+
9
+ Natural data are often long-tail distributed over semantic classes. Existing recognition methods tackle this imbalanced classification by placing more emphasis on the tail data, through class re-balancing/re-weighting or ensembling over different data groups, resulting in increased tail accuracies but reduced head accuracies.
10
+
11
+ We take a dynamic view of the training data and provide a principled model bias and variance analysis as the training data fluctuates: Existing long-tail classifiers invariably increase the model variance and the head-tail model bias gap remains large, due to more and larger confusion with hard negatives for the tail.
12
+
13
+ We propose a new long-tailed classifier called RoutIng Diverse Experts (RIDE). It reduces the model variance with multiple experts, reduces the model bias with a distribution-aware diversity loss, reduces the computational cost with a dynamic expert routing module. RIDE outperforms the state-of-the-art by $5 \%$ to $7 \%$ on CIFAR100-LT, ImageNet-LT and iNaturalist 2018 benchmarks. It is also a universal framework that is applicable to various backbone networks, long-tailed algorithms, and training mechanisms for consistent performance gains. Our code is available at: https://github.com/frank-xwang/RIDE-LongTailRecognition.
14
+
15
+ # 1 INTRODUCTION
16
+
17
+ Real-world data are often long-tail distributed over semantic classes: A few classes contain many instances, whereas most classes contain only a few instances. Long-tailed recognition is challenging, as it needs to handle not only a multitude of small-data learning problems on the tail classes, but also extreme imbalanced classification over all the classes.
18
+
19
+ There are two ways to prevent the many head instances from overwhelming the few tail instances in the classifier training objective: 1) class re-balancing/re-weighting which gives more importance to tail instances (Cao et al., 2019; Kang et al., 2020; Liu et al., 2019), 2) ensembling over different data distributions which re-organizes long-tailed data into groups, trains a model per group, and then combines individual models in a multi-expert framework (Zhou et al., 2020; Xiang et al., 2020).
20
+
21
+ We compare three state-of-the-art (SOTA) long-tail classifiers against the standard cross-entropy (CE) classifier: cRT and $\tau$ -norm (Kang et al., 2020) which adopt a two-stage optimization, first representation learning and then classification learning, and LDAM (Cao et al., 2019), which is trained end-to-end with a marginal loss. In terms of the classification accuracy, a common metric for model selection on a fixed training set, Fig. 1a shows that, all these existing long-tail methods increase the overall, medium- and few-shot accuracies over CE, but decrease the many-shot accuracy.
22
+
23
+ These intuitive solutions and their experimental results seem to suggest that there is a head-tail performance trade-off in long-tailed recognition. We need a principled performance analysis approach that could shed light on such a limitation if it exists and provide guidance on how to overcome it.
24
+
25
+ Our insight comes from a dynamic view of the training set: It is merely a sample set of some underlying data distribution. Instead of evaluating how a long-tailed classifier performs on the fixed training set, we evaluate how it performs as the training set fluctuates according to the data distribution.
26
+
27
+ <table><tr><td rowspan="2"></td><td colspan="3">All</td><td colspan="3">Many-shot</td><td colspan="3">Med-shot</td><td colspan="3">Few-shot</td></tr><tr><td>acc</td><td>bias</td><td>var</td><td>acc</td><td>bias</td><td>var</td><td>acc</td><td>bias</td><td>var</td><td>acc</td><td>bias</td><td>var</td></tr><tr><td>CE</td><td>31.6</td><td>0.60</td><td>0.47</td><td>57.3</td><td>0.28</td><td>0.35</td><td>28.2</td><td>0.61</td><td>0.51</td><td>6.3</td><td>0.94</td><td>0.57</td></tr><tr><td>T-norm</td><td>35.8</td><td>0.52</td><td>0.49</td><td>55.9</td><td>0.28</td><td>0.37</td><td>33.2</td><td>0.53</td><td>0.52</td><td>16.1</td><td>0.78</td><td>0.60</td></tr><tr><td>cRT</td><td>36.4</td><td>0.50</td><td>0.50</td><td>51.3</td><td>0.32</td><td>0.41</td><td>38.6</td><td>0.44</td><td>0.50</td><td>17.0</td><td>0.76</td><td>0.61</td></tr><tr><td>LDAM</td><td>34.4</td><td>0.53</td><td>0.51</td><td>55.1</td><td>0.28</td><td>0.38</td><td>31.9</td><td>0.53</td><td>0.54</td><td>13.9</td><td>0.81</td><td>0.63</td></tr><tr><td>RIDE + LDAM</td><td>40.5</td><td>0.50</td><td>0.42</td><td>60.5</td><td>0.28</td><td>0.30</td><td>38.7</td><td>0.50</td><td>0.44</td><td>20.1</td><td>0.74</td><td>0.52</td></tr></table>
28
+
29
+ (a) Comparisons of the mean accuracy, per-class bias and variance of baselines and our RIDE method. Better (worse) metrics than the distribution-unaware cross entropy (CE) reference are marked in green (red).
30
+
31
+ ![](images/1b1cf846f346b6cdd587ca59d616df0ee927280983b0f7037c4506e0f6a87532.jpg)
32
+ (b) Histograms of the largest softmax score of the other classes (the hardest negative) per instance.
33
+ Figure 1: Our method RIDE outperforms SOTA by reducing both model bias and variance. a) These metrics are evaluated over 20 independently trained models, each on a random sampled set of CIFAR100 with an imbalance ratio of 100 and 300 samples for class 0. Compared to the standard head performance loss from increased classifier variance. The low tail perfor-CE classifier, existing SOTA methods almost always increase the variance and some reduce the tail mance manifests itself in large between-class confusion and high classifier vari-bias at the cost of increasing the head bias. b) The metrics are evaluated over CIFAR100-LT Liu ance. We aim to reduce both the bias and the variance of a long-tailed classifieret al. (2019). LDAM is more likely to confuse the tail (rather than head) classes with the hardest by RoutIng Diverse Experts (RIDE). It has three components: 1) a shared archi-negative class, with an average score of 0.59. RIDE with LDAM can greatly reduce the confusion tecture for multiple classifiers (experts); 2) a distribution-aware diversity loss thatwith the nearest negative class, especially for samples from the few-shot categories.
34
+
35
+ to additional expertConsider the training data $D$ With on-par computational complexity, RIDE significantlyas a random variable. The prediction error of model $h$ on instance $x$ outwith output $Y$ forms the state-of-the-art methodvaries with the realization of $D$ y 5% to 7% on all the benchmarks in-. The expected variance with respect to variable $D$ cluding CIFAR100-LT, ImageNet-LT andhas a well-known bias-variance decomposition:
36
+
37
+ $$
38
+ \operatorname { E r r o r } ( x ; h ) = E [ ( h ( x ; D ) - Y ) ^ { 2 } ] = \operatorname { B i a s } ( x ; h ) + \operatorname { V a r i a n c e } ( x ; h ) + { \mathrm { i r r e d u c i b l e ~ e r r o r } } ( x ) .
39
+ $$
40
+
41
+ For the above L2 loss on regression $h ( x ) Y$ , the model bias measures the accuracy of the prediction with respect to the true value, the variance measures the stability of the prediction, and the irreducible error measures the precision of the prediction and is irrelevant to the model $h$ .
42
+
43
+ Empirically, for $n$ random sample sets of data, $D ^ { ( 1 ) } , \ldots , D ^ { ( n ) }$ , the $k$ -th model trained on $D ^ { ( k ) }$ The natupredicts $y ^ { ( k ) }$ ata we encou on instance $x$ er in practice often has a long tail distribution: A, and collectively they have a mean prediction $y _ { m }$ classes contain. For the L2 regression many instances, while most classes contain only a feloss, the model bias is simply the L2 loss between $y _ { m }$ stances. Learningand ground-truth $t = E [ Y ]$ ation among, whereas the model them is challenging, as the fvariance is the variance of $y ^ { ( k ) }$ il instances can be easily overwith respect to their mean $y _ { m }$ l:
44
+
45
+ $$
46
+ \begin{array} { r l } { \displaystyle \mathcal { L } ( y ; z ) = ( y - z ) ^ { 2 } } \\ { \displaystyle y _ { m } = \frac { 1 } { n } \sum _ { k = 1 } ^ { n } y ^ { ( k ) } } & { ~ = \mathrm { a r g } \operatorname* { m i n } _ { z } E _ { D } [ \mathcal { L } \left( h ( x ) ; z ) \right] } \\ { \displaystyle \mathrm { B i a s } ( x ; h ) = ( y _ { m } - t ) ^ { 2 } } & { ~ = \mathcal { L } \left( y _ { m } ; t \right) } \\ { \displaystyle \mathrm { V a r i a n c e } ( x ; h ) = \frac { 1 } { n } \sum _ { k = 1 } ^ { n } \left( y ^ { ( k ) } - y _ { m } \right) ^ { 2 } } & { ~ = E _ { D } [ \mathcal { L } \left( h ( x ) ; y _ { m } \right) ] . } \end{array}
47
+ $$
48
+
49
+ We analyze the performance of a long-tail classifier in terms of bias and variance with respectAs shown on the above right, these concepts can be expressed entirely in terms of L2 loss $\mathcal { L }$ . We can fluctuations in the training set: We randomly sample CIFAR100 (Krizhevthus extended them to classification (Domingos, 2000) by replacing $\mathcal { L }$ y, 200 with $\mathcal { L } _ { 0 - 1 }$ cording to afor classification:
50
+
51
+ The mean prediction $y _ { m }$ minimizes $\begin{array} { r } { \sum _ { k = 1 } ^ { n } \mathcal { L } _ { 0 - 1 } \left( y ^ { ( k ) } ; y _ { m } \right) } \end{array}$ and becomes the most often or main prediction. The bias and variance terms become $\mathcal { L } _ { 0 - 1 } ( y _ { m } ; t )$ and $\begin{array} { r } { \frac { 1 } { n } \sum _ { k = 1 } ^ { n } \mathcal { L } _ { 0 - 1 } ( y ^ { ( k ) } ; y _ { m } ) } \end{array}$ respectively.
52
+
53
+ We apply such bias and variance analysis to the CE and long-tail classifiers. We sample CIFAR100 (Krizhevsky, 2009) according to a long-tail distribution multiple times. For each method, we train a model per long-tail sampled dataset and then estimate the per-class bias and variance over these multiple models on the balanced test set of CIFAR100-LT Liu et al. (2019). Fig. 1a shows that:
54
+
55
+ 1. On the model bias: The head bias is significantly smaller than the tail bias, at 0.3 vs. 0.9 for CE. All the existing long-tail methods reduce the overall bias by primarily reducing the tail bias. However, the head-tail bias gap remains large at 0.3 vs. 0.8.
56
+ 2. On the model variance: All the existing long-tail methods increase the model variance across all class splits, with a slight reduction in the medium-shot variance for cRT.
57
+
58
+ That is, existing long-tail methods reduce the model bias for the tail at the cost of increased model variance for all the classes, and the head-tail model bias gap remains large.
59
+
60
+ We conduct further statistical analysis to understand the head-tail model bias gap. We examine the largest softmax score in the other classes of $\{ c : c \neq t \}$ , where $t$ is the ground-truth class of an instance. The smaller this hardest negative score is, the less the confusion, and the lower the model bias. Fig. 1b shows that there is increasingly more and larger confusion from the head to the tail.
61
+
62
+ Guided by our model bias/variance and confusion pattern analysis, we propose a new long-tail classifier with four distinctive features: 1) It reduces the model variance for all the classes with multiple experts. 2) It reduces the model bias for the tail with an additional distribution-aware diversity loss. 3) It reduces the computational complexity that comes with multiple experts with a dynamic expert routing module which deploys another trained distinctive expert for a second (or third, ...) opinion only when it is called for. 4) The routing module and a shared architecture for experts of reduced complexity effectively cut down the computational cost of our multi-expert model, to a level that could be even lower than the commonly adopted baseline with the same backbone.
63
+
64
+ Our so-called RoutIng Diverse Experts (RIDE) not only reduces the model variance for all the classes, but also significantly reduces the model bias for the tail classes and increases the mean accuracies for all class splits, all of which existing long-tail methods fail to accomplish.
65
+
66
+ RIDE delivers $5 \% \sim 7 \%$ higher accuracies than the current SOTA methods on CIFAR100-LT, ImageNet-LT (Liu et al., 2019) and iNaturalist (Van Horn et al., 2018). RIDE is also a universal framework that can be applied to different backbone networks for improving existing long-tail algorithms such as focal loss (Lin et al., 2017), LDAM (Cao et al., 2019), $\tau$ -norm (Kang et al., 2020).
67
+
68
+ # 2 RELATED WORKS
69
+
70
+ Few-shot learning. To generalize from small training data, meta-learning (Bertinetto et al., 2016; Ravi & Larochelle, 2017; Santoro et al., 2016; Finn et al., 2017; Yang et al., 2018) and data augmentation/generation are two most studied approaches (Chen et al., 2019; Schwartz et al., 2018; Zhang et al., 2019; Liu et al., 2018). Matching Network (Vinyals et al., 2016) and Prototypical Network (Snell et al., 2017) learn discriminative features that can be transferred to new classes through meta-learners without big training data. Hariharan & Girshick (2017), Wang et al. (2018) and Liu et al. (2018) utilize samples from a generative model to augment the training data. However, fewshot learning relies on balanced training data, whereas long-tail recognition has to deal with highly imbalanced training data, e.g., from hundreds in the head to a few instances in the tail.
71
+
72
+ Re-balancing/re-weighting. A direct approach to achieve sample balance is to under- or oversample training instances according to their class sizes (He & Garcia, 2009). Another option is data augmentation, where additional samples are generated to supplement tail classes, sometimes directly in the feature space (Liu et al., 2020; Chu et al., 2020; Kim et al., 2020). Re-weighting modifies the loss function and puts larger weights on tail classes (Lin et al., 2017; Cui et al., 2019; Cao et al., 2019; Wu et al., 2020) or randomly ignoring gradients from head classes (Tan et al., 2020). However, both sample-wise and loss-wise balancing focus on tail classes, resulting in more sensitivity to fluctuations in the small tail classes and thus much increased model variances (Fig. 1a).
73
+
74
+ Knowledge transfer. OLTR (Liu et al., 2019) and inflated memory (Zhu & Yang, 2020) use memory banks to store and transfer mid- and high-level features from head to tail classes, enhancing feature generalization for the tail. However, this line of work (Liu et al., 2019; Zhu & Yang, 2020; Kang et al., 2020; Jamal et al., 2020; Wang et al., 2017) usually does not have effective control over the knowledge transfer process, often resulting in head performance loss.
75
+
76
+ Ensembling and grouping. One way to counter imbalance is to separate training instances into different groups based their class sizes. Models trained on individual groups are ensembled together in a multi-expert framework. BBN (Zhou et al., 2020) adaptively fuses two-branches that each focus on the head and the tail respectively. LFME (Xiang et al., 2020) distills multiple teacher models into a unified model, each teacher focusing on a relatively balanced group such as many-shot classes, medium-shot classes, and few-shot classes. BBN and LFME still lose head performance and overall generalizability, as no expert has a balanced access to the entire dataset.
77
+
78
+ Our RIDE is a non-traditional ensemble method. 1) Its experts have shared earlier layers and reduced later channels, less prone to small tail overfitting. 2) Its experts are jointly optimized. 3) It deploys experts on an as-needed basis for individual instances with a dynamic expert assignment module. 4) It reaches higher accuracies with a smaller model complexity and computational cost.
79
+
80
+ # 3 RIDE: ROUTING DIVERSE DISTRIBUTION-AWARE EXPERTS
81
+
82
+ We propose a novel multi-expert model (Fig. 2) with shared earlier layers $f _ { \theta }$ and $n$ independent channel-reduced later layers $\Psi = \{ \psi _ { \theta _ { 1 } } , . . . , \psi _ { \theta _ { n } } \}$ . They are jointly optimized at Stage 1 and dynamically deployed with a learned expert assignment module at Stage 2. At the inference time, all the $m$ active experts are averaged together in their logits for final ensemble softmax classification:
83
+
84
+ $$
85
+ \mathbf { p } = \mathrm { s o f t m a x } \left( \frac { 1 } { m } \sum _ { i = 1 } ^ { m } \psi _ { \theta _ { i } } \left( f _ { \theta } ( x ) \right) \right) .
86
+ $$
87
+
88
+ Softmax of the average logits is equivalent to the product of individual classification probabilities, which approximates their joint probability if individual experts makes independent decisions.
89
+
90
+ Experts with a shared early backbone and reduced later channels. Consider $n$ independent experts of the same convolutional neural network (CNN) architecture. Since early layers of a CNN tend to encode generic low-level features, we adopt the common practice in transfer learning and have all the $n$ experts share the same backbone $f _ { \theta }$ . Each expert retains independent later layers $\psi _ { \boldsymbol { \theta } _ { i } }$ , $i = 1 , \ldots , n$ . To reduce overfitting to small training data in the tail classes, we reduce the number of filter channels in $\psi _ { \theta _ { i } }$ , e.g., by $1 / 4$ . All these $n$ experts are trained together on long-tailed data distribution-aware diversity loss $\mathcal { L } _ { \mathrm { D } }$ -Diversify and classification loss $\mathcal { L } _ { \mathrm { C l a s s i f y } }$ , such as CE and LDAM.
91
+
92
+ Individual expert classification loss. One way to combine multiple experts is to apply the classification loss to the aggregated logits of individual experts. While this idea works for several recently proposed multi-expert models (Zhou et al., 2020; Xiang et al., 2020), it does not work for our shared experts: Its performance is on-par with an equal-sized single-expert model. Let $\mathcal { L }$ denote the classification loss (e.g. CE) over instance $x$ and its label $y$ . We call such an aggregation loss collaborative:
93
+
94
+ ![](images/0d63952f3af398ad49a8d8ddd426a0d1eab5f99c76968cf24f009158bc101969.jpg)
95
+ Figure 2: RIDE learns experts and their router in two stages. a) We first jointly optimize multiple experts with individual classification losses and mutual distribution-aware diversity losses. b) We then train a router that dynamically assigns ambiguous samples to additional experts on an as-needed basis. The distribution of instances seen by each expert shows that head instances need fewer experts and the imbalance between classes gets reduced for later experts. At the test time, we collect the logits of assigned experts to make a final decision. c) RIDE outperforms SOTA methods (i.e. LFME (Xiang et al., 2020) for CIFAR100-LT, LWS (Kang et al., 2020) for ImageNet-LT and BBN (Zhou et al., 2020) for iNaturalist) on all the benchmarks.
96
+
97
+ $$
98
+ \mathcal { L } ^ { \mathrm { c o l l a b o r a t i v e } } ( x , y ) = \mathcal { L } \left( \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \psi _ { \theta _ { i } } \left( f _ { \theta } ( x ) \right) , y \right)
99
+ $$
100
+
101
+ as it leads to correlated instead of complementary experts. To discourage correlation, we require each expert to do the job well by itself. Such an aggregation loss is essentially an individual loss, and it contributes a large portion of our performance gain in most of our experiments:
102
+
103
+ $$
104
+ \mathcal { L } ^ { \mathrm { i n d i v i d u a l } } ( x , y ) = \sum _ { i = 1 } ^ { n } \mathcal { L } \left( \psi _ { \theta _ { i } } \left( f _ { \theta } ( x ) \right) , y \right) .
105
+ $$
106
+
107
+ Distribution-aware diversity loss. The individual classification loss and random initialization lead to diversified experts with a shared backbone. For long-tailed data, we add a regularization term to encourage complementary decisions from multiple experts. That is, we maximize the KL-divergence between different experts’ classification probabilities on instance $x$ in class $y$ over a total of $c$ classes:
108
+
109
+ $$
110
+ \begin{array} { r l r l } & { \mathrm { d i v e r s i t y ~ l o s s : } \quad } & { \mathcal { L } _ { \mathrm { D - D i v e r s i f y } } ( x , y ; \theta _ { i } ) = \displaystyle \frac { - 1 } { n - 1 } \sum _ { j = 1 , j \neq i } ^ { n } D _ { \mathrm { K L } } \left( \mathbf { p } ^ { ( i ) } ( x , y ) \| \mathbf { p } ^ { ( j ) } ( x , y ) \right) } \\ & { \mathrm { K L ~ d i v e r g e n c e : } \quad } & { D _ { \mathrm { K L } } ( \mathbf { p } \| \mathbf { q } ) = \displaystyle \sum _ { k = 1 } ^ { c } \mathbf { p } _ { k } \log \left( \frac { \mathbf { p } _ { k } } { \mathbf { q } _ { k } } \right) } \\ & { \mathrm { c l a s s i f i c a t i o n ~ b y } \theta _ { i } : \quad } & { \mathbf { p } ^ { ( i ) } ( x , y ) = \mathrm { s o f t m a x } \left( \left[ \frac { \psi _ { \theta _ { i } } ( f _ { \theta } ( x ) ) _ { 1 } } { T _ { 1 } } \quad . . . \quad \frac { \psi _ { \theta _ { i } } ( f _ { \theta } ( x ) ) _ { c } } { T _ { c } } \right] \right) . } \end{array}
111
+ $$
112
+
113
+ We vary the temperature $T$ (or concentration) (Hadsell et al., 2006; Wu et al., 2018) applied to class $k$ ’s logit $\psi _ { \boldsymbol { \theta } _ { i } } ( f _ { \boldsymbol { \theta } } ( \boldsymbol { x } ) ) _ { k }$ : For class $k$ with $n _ { k }$ instances, the smaller the $n _ { k }$ , the lower the temperature $T _ { k }$ , the more sensitive the classification probability $\mathbf { p }$ is to a change in the feature $\psi$ . Specifically,
114
+
115
+ class-wise temperature:
116
+
117
+ normalized class size:
118
+
119
+ $$
120
+ \begin{array} { r l } & { T _ { k } = \alpha \left( \beta _ { k } + 1 - \underset { j } { \operatorname* { m a x } } \beta _ { j } \right) } \\ & { \beta _ { k } = \gamma \cdot \frac { n _ { k } } { \frac { 1 } { c } \sum _ { s = 1 } ^ { c } n _ { s } } + ( 1 - \gamma ) . } \end{array}
121
+ $$
122
+
123
+ $T$ scales linearly with the class size, ensuring $\beta _ { k } = 1 , T _ { k } = \alpha$ for a balanced set. This simple adaptation allows us to find classifiers of enough complexity for the head and enough robustness for the tail: On one hand, we need strong classifiers to handle large sample variations within head classes; on the other hand, such classifiers are prone to overfit small training data within tail classes. We adapt the temperature only after the CNN network is trained for several epochs and the feature is stabilized, similar to the training scheme for deferred reweighting (Cao et al., 2019).
124
+
125
+ Joint expert optimization. For our $n$ experts $\theta _ { 1 }$ , . . . , $\theta _ { n }$ with a shared backbone $\theta$ , we optimize their individual classification losses ${ \mathcal { L } } _ { \mathrm { C l a s s i f y } } = { \mathcal { L } }$ , any classification loss such as CE, LDAM, and focal loss) and their mutual distribution-aware divergency losses, weighted by hyperparameter $\lambda$ :
126
+
127
+ $$
128
+ \mathcal { L } _ { \mathrm { T o t a l } } ( x , y ) = \sum _ { i = 1 } ^ { n } \left( \mathcal { L } _ { \mathrm { C l a s s i f y } } ( x , y ; \theta _ { i } ) + \lambda \cdot \mathcal { L } _ { \mathrm { D - D i v e r s i f y } } ( x , y ; \theta _ { i } ) \right) .
129
+ $$
130
+
131
+ Since these loss terms are completely symmetrical with respect to each other, the $n$ experts learned at Stage 1 are equally good and distinctive from each other.
132
+
133
+ Routing diversified experts. To cut down the test-time computational cost that comes with multiple experts, we train a router at Stage 2 to deploy these (arbitrarily ordered) experts sequentially on an as-needed basis. Assume that the first $k$ experts have been deployed for instance $x$ . The router takes in the image feature and the mean logits from the first to the $k$ -th expert, and makes a binary decision $y _ { \mathrm { o n } }$ on whether to deploy the $k + 1$ -th expert. If the $k$ -th expert wrongly classifies $x$ , but one of the rest $n - k$ experts correctly classifies $x$ , ideally the router should switch on, i.e., output $y _ { \mathrm { o n } } = 1$ , and otherwise $y _ { \mathrm { o n } } = 0$ . We construct a simple binary classifier with two fully connected layers to learn each router. Each of the $n - 1$ routers for $n$ experts has a shared component to reduce the feature dimensions and an individual component to make decisions.
134
+
135
+ Specifically, we normalize the image feature $f _ { \boldsymbol { \theta } } ( \boldsymbol { x } )$ (for training stability), reduce the feature dimension (to e.g. 16 in our experiments) by a fully connected layer $\mathbf { W } _ { 1 }$ which is shared with all routers, followed by ReLU and flattening, concatenate with the top- $s$ ranked mean logits from the first to $k$ - th expert $\textstyle { \frac { 1 } { k } } \sum _ { i = 1 } ^ { k } \psi _ { \theta _ { i } } ( f _ { \theta } ( x ) )$ , project it to a scalar by $\mathbf { W } _ { 2 } ^ { ( k ) }$ which is independent between routers, and finally apply Sigmoid function $\begin{array} { r } { S ( x ) = \frac { 1 } { 1 + e ^ { - x } } } \end{array}$ to get a continuous activation value in [0,1]:
136
+
137
+ $$
138
+ \mathrm { r o u t e r \ a c t i v a t i o n ; } \ r ( x ) = S \left( \mathbf { W } _ { 2 } ^ { ( k ) } \left[ \begin{array} { c } { \mathrm { f a t t e n } \cdot \mathrm { R e L U } \left( \mathbf { W } _ { 1 } \frac { f _ { \theta } ( x ) } { \vert \vert f _ { \theta } ( x ) \vert \vert } \right) } \\ { \frac { 1 } { k } \sum _ { i = 1 } ^ { k } \psi _ { \theta _ { k } } ( f _ { \theta } ( x ) ) \vert _ { \mathrm { t o p } \cdot s \cdot \mathrm { c o m p o n e n t s } } } \end{array} \right] \right) .
139
+ $$
140
+
141
+ The router has a negligible size and compute, where $s$ ranges from 30 for CIFAR100 to 50 for iNaturalist (8,142 classes). It is optimized with a weighted variant of binary CE loss:
142
+
143
+ $$
144
+ \mathcal { L } _ { \mathrm { R o u t i n g } } ( r ( x ) , y _ { \mathrm { o n } } ) = - \omega _ { \mathrm { o n } } y _ { \mathrm { o n } } \log \left( r ( x ) \right) - ( 1 - y _ { \mathrm { o n } } ) \log \left( 1 - r ( x ) \right)
145
+ $$
146
+
147
+ where $\omega _ { \mathrm { o n } }$ controls the easiness to switch on the router. We find $\omega _ { \mathrm { o n } } = 1 0 0$ to be a good trade-off between classification accuracy and computational cost for all our experiments. At the test time, we simply threshold the activation with 0.5: If $r ( x ) < 0 . 5$ , the classifier makes the final decision with the current collective logits, otherwise it proceeds to the next expert.
148
+
149
+ Optional self-distillation. While existing long-tail classifiers such as BBN Zhou et al. (2020) and LFME Xiang et al. (2020) have a fixed number of experts, our method could have an arbitrary number of experts to balance classification accuracy and computation cost. We can optionally apply self-distillation from a model with more (6 in our setting) experts to the same model with fewer experts for further performance gain $0 . 4 \% \sim 0 . 8 \%$ for most experiments). We choose knowledge distillation (Hinton et al., 2015) by default. Implementation details and comparisons with various distillation algorithms such as CRD (Tian et al., 2019) are investigated in Appendix Section A.2.
150
+
151
+ # 4 EXPERIMENTS
152
+
153
+ We experiment on major long-tailed recognition benchmarks and various backbone networks.
154
+
155
+ 1. CIFAR100-LT (Cao et al., 2019): CIFAR100 is sampled by class per an exponential decay across classes. We choose imbalance factor 100 and ResNet-32 (He et al., 2016) backbone.
156
+
157
+ 2. ImageNet-LT (Liu et al., 2019): Multiple backbone networks are experimented on ImageNetLT, including ResNet-10, ResNet-50 and ResNeXt-50 (Xie et al., 2017). All backbone networks are trained with a batch size of 256 on 8 RTX 2080Ti GPUs for 100 epochs using SGD with an initial learning rate of 0.1 decayed by 0.1 at 60 epochs and 80 epochs. See more details and results on other backbones in Appendix.
158
+
159
+ 3. iNaturalist 2018 (Van Horn et al., 2018): It is a naturally imbalanced fine-grained dataset with 8,142 categories. We use ResNet-50 as the backbone and apply the same training recipe as for ImageNet-LT except batch size 512, as in (Kang et al., 2020).
160
+
161
+ CIFAR100-LT Results. Table 1 shows that RIDE outperforms SOTA by a large margin on CIFAR100-LT. The average computational cost is even about $10 \%$ less than baseline models with two experts as in BBN. RIDE surpasses multi-expert methods, LFME (Xiang et al., 2020) and BBN (Zhou et al., 2020), by more than $5 . 3 \%$ and $6 . 5 \%$ respectively.
162
+
163
+ ![](images/93ea4d77db3384af3de52450596f2d525a817497ee8de8c71fb7fc30f3af19a8.jpg)
164
+ Figure 3: RIDE is a universal framework that can be extended to various long-tail recognition methods and obtain a consistent top-1 accuracy increase. RIDE is experimented on CIFAR100- LT and applied to various training mechanisms. By using RIDE, cross-entropy loss (without any re-balancing strategies) can even outperforms previous SOTA method on CIFAR100-LT. Although higher accuracy can be obtained using distillation, we did not apply it here.
165
+
166
+ Table 1: RIDE achieves the state-of-the-art results on CIFAR100-LT without sacrificing the performance of many-shot classes like all previous methods. Compared with BBN (Zhou et al., 2020) and LFME (Xiang et al., 2020), which also contain multiple experts (or branches), RIDE (2 experts) outperforms them by a large margin with fewer GFlops. The relative computation cost (averaged on testing set) with respect to the baseline model and absolute improvements against SOTA (colored in green) are reported. $\dagger$ denotes our reproduced results with released code. $\ddagger$ denotes results copied from (Cao et al., 2019) and the imbalance ratio is 100.
167
+
168
+ <table><tr><td rowspan=1 colspan=2>Methods</td><td rowspan=1 colspan=1>MFlops</td><td rowspan=1 colspan=1>All</td><td rowspan=1 colspan=4>Many</td><td rowspan=1 colspan=1>Med</td><td rowspan=1 colspan=1>Few</td></tr><tr><td rowspan=1 colspan=2>Cross Entropy (CE) tCross Entropy (CE) t</td><td rowspan=1 colspan=1>69.5 (1.0x)69.5 (1.0x)</td><td rowspan=1 colspan=1>38.339.1</td><td rowspan=1 colspan=4>166.1</td><td rowspan=1 colspan=1>-37.3</td><td rowspan=1 colspan=1>110.6</td></tr><tr><td rowspan=6 colspan=2>Focal Loss t (Lin et al., 2017)OLTR † (Liu et al., 2019)LDAM + DRW (Cao et al.,2019)LDAM + DRW + (Cao et al., 2019)BBN (Zhou et al., 2020)T-norm t (Kang et al., 2020)cRT + (Kang et al., 2020)M2m (Kim et al., 2020)LFME (Xiang et al., 2020)</td><td rowspan=6 colspan=1>69.5 (1.0x)69.5 (1.0x)69.5 (1.0x)74.3 (1.1x)69.5 (1.0x)69.5 (1.0x)11</td><td rowspan=5 colspan=1>38.441.242.042.042.643.243.343.5</td><td rowspan=2 colspan=4>161.8161.5</td><td rowspan=2 colspan=1>141.4-41.7</td><td rowspan=1 colspan=1>117.61</td></tr><tr><td rowspan=1 colspan=1>20.2</td></tr><tr><td rowspan=4 colspan=4>165.764.011</td><td rowspan=1 colspan=1>-43.6</td><td rowspan=4 colspan=1>■17.318.111</td></tr><tr><td rowspan=1 colspan=1>44.8</td></tr><tr><td rowspan=2 colspan=1>11</td></tr><tr><td rowspan=1 colspan=1>43.8</td><td rowspan=1 colspan=2>1</td></tr><tr><td rowspan=1 colspan=1>RIDE (2 experts)RIDE (3 experts)RIDE (4 experts)</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>64.8 (0.9x)77.8 (1.1x)91.9 (1.3x)</td><td rowspan=1 colspan=1>47.0 (+3.2)48.0 (+4.2)49.1 (+5.3)</td><td rowspan=1 colspan=3>67.9</td><td rowspan=1 colspan=2>67.968.169.3</td><td rowspan=1 colspan=1>48.449.249.3</td></tr></table>
169
+
170
+ Table 2: RIDE achieves state-of-the-art results on ImageNet-LT (Liu et al., 2019) and obtains consistent performance improvements on various backbones. The top-1 accuracy and computational cost are compared with the state-of-the-art methods on ImageNet-LT, with ResNet-50 and ResNeXt50 as the backbone networks. Results marked with $\dagger$ are copied from (Kang et al., 2020). Detailed results on each split are listed in appendix materials.
171
+
172
+ <table><tr><td rowspan="2">Methods</td><td colspan="2">ResNet-50</td><td colspan="2">ResNeXt-50</td></tr><tr><td>GFlops</td><td>Acc. (%)</td><td>GFlops</td><td>Acc. (%)</td></tr><tr><td>Cross Entropy (CE) t</td><td>4.11 (1.0x)</td><td>41.6</td><td>4.26 (1.0x)</td><td>44.4</td></tr><tr><td>OLTR † (Liu et al., 2019)</td><td></td><td>、</td><td></td><td>46.3</td></tr><tr><td>NCM (Kang et al., 2020)</td><td>4.11 (1.0x)</td><td>44.3</td><td>4.26 (1.0x)</td><td>47.3</td></tr><tr><td>T-norm (Kang et al.,2020)</td><td>4.11 (1.0x)</td><td>46.7</td><td>4.26 (1.0x)</td><td>49.4</td></tr><tr><td>cRT (Kang et al., 2020)</td><td>4.11 (1.0x)</td><td>47.3</td><td>4.26 (1.0x)</td><td>49.6</td></tr><tr><td>LWS (Kang et al., 2020)</td><td>4.11 (1.0x)</td><td>47.7</td><td>4.26 (1.0x)</td><td>49.9</td></tr><tr><td>RIDE (2 experts)</td><td>3.71 (0.9x)</td><td>54.4 (+6.7)</td><td>3.92 (0.9x)</td><td>55.9 (+6.0)</td></tr><tr><td>RIDE (3 experts)</td><td>4.36 (1.1x)</td><td>54.9 (+7.2)</td><td>4.69 (1.1x)</td><td>56.4 (+6.5)</td></tr><tr><td>RIDE (4 experts)</td><td>5.15 (1.3x)</td><td>55.4 (+7.7)</td><td>5.19 (1.2x)</td><td>56.8 (+6.9)</td></tr></table>
173
+
174
+ RIDE as a universal framework. Fig. 3 shows that RIDE consistently benefits from better loss functions and training processes. Whether the model is trained end-to-end (focal loss, CE, LDAM) or in two stages (cRT, $\tau$ -norm, cosine), RIDE delivers consistent accuracy gains. In particular, RIDE with a simple cosine classifier, which we constructed by normalizing the classifier weights and retraining them with a long-tail re-sampling strategy (similar to cRT), achieves on-par performance with the current SOTA methods. Fig. 3 also shows that two-stage methods are generally better than single-stage ones. Nevertheless, since they require an additional training stage, for simplicity, we use the single-stage LDAM as the default $\mathcal { L } _ { \mathrm { C l a s s i f y } }$ in RIDE throughout our remaining experiments.
175
+
176
+ ImageNet-LT Results. Table 2 shows that RIDE outperforms SOTA, LWS and cRT, by more than $7 . 7 \%$ with ResNet-50. ResNeXt-50 is based on group convolution (Xie et al., 2017), which divides all filters into several groups and aggregates information from multiple groups. ResNeXt-50 generally performs better than ResNet-50 on multiple tasks. It provides $6 . 9 \%$ gain on ImageNet-LT.
177
+
178
+ iNaturalist 2018 Results. Table 3 shows that RIDE outperforms current SOTA by $6 . 3 \%$ . Surprisingly, RIDE obtains very similar results on many-shots, medium-shots and few-shots, ideal for long tailed recognition. Current SOTA method BBN also uses multiple experts; however, it significantly decreases the performance on many-shots by about $23 \%$ . RIDE is remarkable at increasing the few-shot accuracy without reducing the many-shot accuracy.
179
+
180
+ Table 3: RIDE outperforms previous state-of-the-art methods on challenging iNaturalist 2018 (Van Horn et al., 2018) dataset, which contains 8,142 classes, by a large margin. Relative improvements to SOTA result of each split (colored with gray) are also listed, with the largest boost from few-shot classes. Compared with previous SOTA method BBN, which also contains multiple “experts”, RIDE achieves more than $20 \%$ higher top-1 accuracy on many-shot classes. Results marked with $\dagger$ are from BBN (Zhou et al., 2020) and Decouple (Kang et al., 2020). BBN’s results are from the released checkpoint.
181
+
182
+ <table><tr><td>Methods</td><td>GFlops</td><td>All</td><td>Many</td><td>Medium</td><td>Few</td></tr><tr><td>CE+</td><td>4.14 (1.0x)</td><td>61.7</td><td>72.2</td><td>63.0</td><td>57.2</td></tr><tr><td>CB-Focal t</td><td>4.14 (1.0x)</td><td>61.1</td><td>1</td><td>1</td><td>1</td></tr><tr><td>OLTR</td><td>4.14 (1.0x)</td><td>63.9</td><td>59.0</td><td>64.1</td><td>64.9</td></tr><tr><td>LDAM + DRW †</td><td>4.14 (1.0x)</td><td>64.6</td><td>1</td><td>1</td><td>1</td></tr><tr><td>cRT</td><td>4.14 (1.0x)</td><td>65.2</td><td>69.0</td><td>66.0</td><td>63.2</td></tr><tr><td>T-norm</td><td>4.14 (1.0x)</td><td>65.6</td><td>65.6</td><td>65.3</td><td>65.9</td></tr><tr><td>LWS</td><td>4.14 (1.0x)</td><td>65.9</td><td>65.0</td><td>66.3</td><td>65.5</td></tr><tr><td>BBN</td><td>4.36 (1.1x)</td><td>66.3</td><td>49.4</td><td>70.8</td><td>65.3</td></tr><tr><td>RIDE (2 experts)</td><td>3.67 (0.9x)</td><td>71.4 4 (+5.1)</td><td>70.2 (+1.2)</td><td>71.3 (+0.5)</td><td>71.7 (+5.8)</td></tr><tr><td>RIDE (3 experts)</td><td>4.17 (1.0x)</td><td>72.2 (+5.9)</td><td>70.2 (+1.2)</td><td>72.2 (+1.4)</td><td>72.7 (+6.8)</td></tr><tr><td>RIDE (4 experts)</td><td>4.51 (1.1x)</td><td>72.6 (+6.3)</td><td>70.9 (+1.9)</td><td>72.4 (+1.6)</td><td>73.1 (+7.2)</td></tr></table>
183
+
184
+ ![](images/b2b3787077638275c5a73098091370295779f41ab43823667b14776dbc013444.jpg)
185
+ Figure 4: Compared to SOTAs, RIDE improves top-1 accuracy on all three splits (many-/med-/fewshot). The absolute accuracy differences of RIDE (blue) over iNaturalist’s current state-of-theart method BBN (Zhou et al., 2020) (left) and ImageNet-LT’s current state-of-the-art method cRT (Kang et al., 2020) (right) are shown. RIDE improves the performance of few- and medium-shots categories without sacrificing the accuracy on many-shots, and outperforms BBN on many-shots by a large margin.
186
+
187
+ Comparing with SOTAs on iNaturalist and ImageNet-LT. As illustrated in Fig. 4, our approach provides a comprehensive treatment to all the many-shot, medium-shot and few-shot classes, achieving substantial improvements to current state-of-the-art on all aspects. Compared with cRT which reduces the performance on the many-shot classes, RIDE can achieves significantly better performance on the few-shot classes without impairing the many-shot classes. Similar observations can be obtained in the comparison with the state-of-the-art method BBN (Zhou et al., 2020) on iNaturalist.
188
+
189
+ Contribution of each component of RIDE. RIDE is jointly trained with $\mathcal { L } _ { \mathrm { D - D i v e r s i f y } }$ and $\mathcal { L } _ { \mathrm { C l a s s i f y } }$ , we use LDAM for $\mathcal { L } _ { \mathrm { C l a s s i f y } }$ by default. Table 4 shows that the architectural change from the original ResNet-32 to the RIDE variant with $2 \sim 4$ experts contributes $2 . 7 \% \sim 4 . 3 \%$ gain. Applying the individual classification loss instead of the collaborative loss brings $1 . 5 \%$ gain. Adding the diversity loss further improves about $0 . 9 \%$ . The computational cost is greatly reduced by adding the dynamic expert router. Knowledge distillation from RIDE with 6 experts obtains another $0 . 6 \%$ gain. All these components deliver $7 . 1 \%$ gain over baseline LDAM.
190
+
191
+ Impact of the number of experts. Fig. 5 shows that whether in terms of relative or absolute gains, few-shots benefit more with more experts. For example, the relative gain is $16 \%$ vs. $3 . 8 \%$ for few-shots and many-shots respectively. No distillation is applied in this comparison.
192
+
193
+ Table 4: Ablation studies on the effectiveness of each component on CIFAR100-LT. LDAM is used as our classification loss. The first 3 RIDE models only have architectural change without changes in training method. The performance without $\mathcal { L } _ { \mathrm { { I n d i v i d u a l } } }$ checked indicates directly applying classification loss onto the final model output, which is the mean expert logits. This is referred to as collaborative loss above. In contrast, if $\mathcal { L } _ { \mathrm { { I n d i v i d u a l } } }$ if checked, we apply individual loss to each individual expert. The difference between collaborative loss and individual loss is described above. By adding the router module, the computational cost of RIDE can be significantly reduced, while the accuracy degradation is negligible. Knowledge distillation step is optional if further improvements are desired. Various knowledge distillation techniques are compared in the appendix.
194
+
195
+ <table><tr><td>Methods</td><td>#expert</td><td>LIndividual</td><td>LD-Diversify</td><td>Router</td><td>distill</td><td>GFlops</td><td>Acc.(%)</td></tr><tr><td>LDAM+DRW</td><td>1</td><td></td><td></td><td></td><td></td><td></td><td>42.0</td></tr><tr><td rowspan="7">RIDE</td><td>2</td><td></td><td></td><td></td><td></td><td>1.1x</td><td>44.7 (+2.7)</td></tr><tr><td>3</td><td></td><td></td><td></td><td></td><td>1.5x</td><td>46.1 (+4.1)</td></tr><tr><td>4</td><td></td><td></td><td></td><td></td><td>1.8x</td><td>46.3 (+4.3)</td></tr><tr><td>4</td><td></td><td></td><td></td><td></td><td>1.8x</td><td>47.8 (+5.8)</td></tr><tr><td>4</td><td>&lt;</td><td>√</td><td></td><td></td><td>1.8x</td><td>48.7 (+6.7)</td></tr><tr><td>4</td><td>√</td><td>√</td><td></td><td>1</td><td>1.8x</td><td>49.3 (+7.3)</td></tr><tr><td>4</td><td>√</td><td>&lt;</td><td>√</td><td></td><td>1.3x</td><td>49.1 (+7.1)</td></tr></table>
196
+
197
+ ![](images/8cf6029a1e2ab72917f85036752a1e85a7545e1164698474f0fb18f990efe206.jpg)
198
+ Figure 5: # experts vs. top-1 accuracy for each split (All, Many/Medium/Few) of CIFAR100- LT. Compared with the many-shot split, which is $3 . 8 \%$ relatively improved by adding more experts, the few-shot split can get more benefits, that is, a relative improvement of $1 6 . 1 \%$ .
199
+
200
+ ![](images/1631bd4dd73a9a43fc47a06387029dba617d11f1c20c50069ba839f092929c00.jpg)
201
+ Figure 6: The proportion of the number of experts allocated to each split of CIFAR100-LT. For RIDE with 3 or 4 experts, more than half of many-shot instances only require one expert. On the contrary, more than $76 \%$ samples of few-shot classes require opinions from additional experts.
202
+
203
+ The number of experts allocated to each split. Fig. 6 shows that instances in few-shots need more experts whereas most instances in many-shots just need the first expert. That is, low confidence in tail instances often requires the model to seek a second (or a third, ...) opinion.
204
+
205
+ # 5 SUMMARY
206
+
207
+ We take a dynamic view of training data and study long-tailed recognition with model bias and variance analysis. Existing long-tail classifiers do not reduce head-tail model bias gap enough while increasing model variance across all the classes. We propose a novel multi-expert model called RIDE to reduce model biases and variances throughout. It trains partially shared diverse distributionaware experts and routes an instance to additional experts when necessary, with computational costs comparable to a single expert. RIDE outperforms SOTA by a large margin. It is also a universal framework that works with various backbones and training schemes for consistent gains.
208
+
209
+ Acknowledgments. This work was supported, in part, by Berkeley Deep Drive, US Government fund through Etegent Technologies on Low-Shot Detection and Semi-supervised Detection, and NTU NAP and A\*STAR via Industry Alignment Fund: Industry Collaboration Projects Grant.
210
+
211
+ # REFERENCES
212
+
213
+ Luca Bertinetto, Joao F Henriques, Jack Valmadre, Philip Torr, and Andrea Vedaldi. Learning feed- ˜ forward one-shot learners. In NeurIPS, 2016.
214
+
215
+ Kaidi Cao, Colin Wei, Adrien Gaidon, Nikos Arechiga, and Tengyu Ma. Learning imbalanced datasets with label-distribution-aware margin loss. In Advances in Neural Information Processing Systems, pp. 1567–1578, 2019.
216
+
217
+ Zitian Chen, Yanwei Fu, Yu-Xiong Wang, Lin Ma, Wei Liu, and Martial Hebert. Image deformation meta-networks for one-shot learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8680–8689, 2019.
218
+
219
+ Peng Chu, Xiao Bian, Shaopeng Liu, and Haibin Ling. Feature space augmentation for long-tailed data. arXiv preprint arXiv:2008.03673, 2020.
220
+
221
+ Yin Cui, Menglin Jia, Tsung-Yi Lin, Yang Song, and Serge Belongie. Class-balanced loss based on effective number of samples. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9268–9277, 2019.
222
+
223
+ Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 248–255, 2009.
224
+
225
+ Pedro Domingos. A unified bias-variance decomposition. In Proceedings of 17th International Conference on Machine Learning, pp. 231–238, 2000.
226
+
227
+ Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. arXiv preprint arXiv:1703.03400, 2017.
228
+
229
+ Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1735–1742, 2006.
230
+
231
+ Bharath Hariharan and Ross Girshick. Low-shot visual recognition by shrinking and hallucinating features. In Proceedings of the IEEE International Conference on Computer Vision, pp. 3018– 3027, 2017.
232
+
233
+ Haibo He and Edwardo A Garcia. Learning from imbalanced data. IEEE Transactions on knowledge and data engineering, 21(9):1263–1284, 2009.
234
+
235
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 770–778, 2016.
236
+
237
+ Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015.
238
+
239
+ Muhammad Abdullah Jamal, Matthew Brown, Ming-Hsuan Yang, Liqiang Wang, and Boqing Gong. Rethinking class-balanced methods for long-tailed visual recognition from a domain adaptation perspective. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7610–7619, 2020.
240
+
241
+ Bingyi Kang, Saining Xie, Marcus Rohrbach, Zhicheng Yan, Albert Gordo, Jiashi Feng, and Yannis Kalantidis. Learning imbalanced datasets with label-distribution-aware margin loss. In International Conference on Learning Representations, pp. 1567–1578, 2020.
242
+
243
+ Jaehyung Kim, Jongheon Jeong, and Jinwoo Shin. M2m: Imbalanced classification via major-tominor translation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13896–13905, 2020.
244
+
245
+ Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, 2009.
246
+
247
+ Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollar. Focal loss for dense ´ object detection. In Proceedings of the IEEE international conference on computer vision, pp. 2980–2988, 2017.
248
+
249
+ Bo Liu, Xudong Wang, Mandar Dixit, Roland Kwitt, and Nuno Vasconcelos. Feature space transfer for data augmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 9090–9098, 2018.
250
+
251
+ Jialun Liu, Yifan Sun, Chuchu Han, Zhaopeng Dou, and Wenhui Li. Deep representation learning on long-tailed data: A learnable embedding augmentation perspective. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2970–2979, 2020.
252
+
253
+ Ziwei Liu, Zhongqi Miao, Xiaohang Zhan, Jiayun Wang, Boqing Gong, and Stella X Yu. Largescale long-tailed recognition in an open world. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2537–2546, 2019.
254
+
255
+ Hyun Oh Song, Yu Xiang, Stefanie Jegelka, and Silvio Savarese. Deep metric learning via lifted structured feature embedding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4004–4012, 2016.
256
+
257
+ Nikolaos Passalis and Anastasios Tefas. Learning deep representations with probabilistic knowledge transfer. In Proceedings of the European Conference on Computer Vision, pp. 268–284, 2018.
258
+
259
+ Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. In ICLR, 2017.
260
+
261
+ Adam Santoro, Sergey Bartunov, Matthew Botvinick, Daan Wierstra, and Timothy Lillicrap. Metalearning with memory-augmented neural networks. In ICML, 2016.
262
+
263
+ Eli Schwartz, Leonid Karlinsky, Joseph Shtok, Sivan Harary, Mattias Marder, Rogerio Feris, Abhishek Kumar, Raja Giryes, and Alex M Bronstein. Delta-encoder: an effective sample synthesis method for few-shot object recognition. arXiv preprint arXiv:1806.04734, 2018.
264
+
265
+ Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In NeurIPS, 2017.
266
+
267
+ Jingru Tan, Changbao Wang, Buyu Li, Quanquan Li, Wanli Ouyang, Changqing Yin, and Junjie Yan. Equalization loss for long-tailed object recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11662–11671, 2020.
268
+
269
+ Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive representation distillation. In International Conference on Learning Representations, 2019.
270
+
271
+ Frederick Tung and Greg Mori. Similarity-preserving knowledge distillation. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1365–1374, 2019.
272
+
273
+ Grant Van Horn, Oisin Mac Aodha, Yang Song, Yin Cui, Chen Sun, Alex Shepard, Hartwig Adam, Pietro Perona, and Serge Belongie. The iNaturalist species classification and detection dataset. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8769–8778, 2018.
274
+
275
+ Oriol Vinyals, Charles Blundell, Tim Lillicrap, and Daan Wierstra. Matching networks for one shot learning. In NeurIPS, 2016.
276
+
277
+ Yu-Xiong Wang, Deva Ramanan, and Martial Hebert. Learning to model the tail. In Advances in Neural Information Processing Systems, pp. 7029–7039, 2017.
278
+
279
+ Yu-Xiong Wang, Ross Girshick, Martial Hebert, and Bharath Hariharan. Low-shot learning from imaginary data. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 7278–7286, 2018.
280
+
281
+ Tong Wu, Qingqiu Huang, Ziwei Liu, Yu Wang, and Dahua Lin. Distribution-balanced loss for multi-label classification in long-tailed datasets. In Proceedings of the European Conference on Computer Vision, pp. 162–178. Springer, 2020.
282
+
283
+ Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via nonparametric instance discrimination. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 3733–3742, 2018.
284
+
285
+ Liuyu Xiang, Guiguang Ding, and Jungong Han. Learning from multiple experts: Self-paced knowledge distillation for long-tailed classification. In Proceedings of the European Conference on Computer Vision, pp. 247–263. Springer, 2020.
286
+
287
+ Saining Xie, Ross Girshick, Piotr Dollar, Zhuowen Tu, and Kaiming He. Aggregated residual trans-´ formations for deep neural networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1492–1500, 2017.
288
+
289
+ Flood Sung Yongxin Yang, Li Zhang, Tao Xiang, Philip HS Torr, and Timothy M Hospedales. Learning to compare: Relation network for few-shot learning. In CVPR, 2018.
290
+
291
+ Hongguang Zhang, Jing Zhang, and Piotr Koniusz. Few-shot learning via saliency-guided hallucination of samples. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2770–2779, 2019.
292
+
293
+ Xiao Zhang, Zhiyuan Fang, Yandong Wen, Zhifeng Li, and Yu Qiao. Range loss for deep face recognition with long-tailed training data. In Proceedings of the IEEE International Conference on Computer Vision, pp. 5409–5418, 2017.
294
+
295
+ Boyan Zhou, Quan Cui, Xiu-Shen Wei, and Zhao-Min Chen. BBN: Bilateral-branch network with cumulative learning for long-tailed visual recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9719–9728, 2020.
296
+
297
+ Linchao Zhu and Yi Yang. Inflated episodic memory with region self-attention for long-tailed visual recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4344–4353, 2020.
298
+
299
+ # A APPENDIX
300
+
301
+ # A.1 DATASETS AND IMPLEMENTATIONS
302
+
303
+ We conduct experiments on three major long-tailed recognition benchmarks and different backbone networks to prove the effectiveness and universality of RIDE:
304
+
305
+ 1.CIFAR100-LT (Krizhevsky, 2009; Cao et al., 2019): The original version of CIFAR-100 contains 50,000 images on training set and 10,000 images on validation set with 100 categories. The long-tailed version of CIFAR-100 follows an exponential decay in sample sizes across different categories. We conduct experiment on CIFAR100-LT with an imbalance factor of 100, i.e. the ratio between the most frequent class and the least frequent class.
306
+
307
+ To make fair comparison with previous works, we follow the training recipe of (Cao et al., 2019) on CIFAR100-LT. We train the ResNet-32 (He et al., 2016) backbone network by SGD optimizer with a momentum of 0.9. CIFAR100-LT is trained for 200 epochs with standard data augmentations (He et al., 2016) and a batch size of 128 on one RTX 2080Ti GPU. The learning rate is initialized as 0.1 and decayed by 0.01 at epoch 120 and 160 respectively.
308
+
309
+ 2.ImageNet-LT (Deng et al., 2009; Liu et al., 2019): ImageNet-LT is constructed by sampling a subset of ImageNet-2012 following the Pareto distribution with the power value $\alpha = 6$ (Liu et al., 2019). ImageNet-LT consists of $1 1 5 . 8 \mathrm { k }$ images from 1,000 categories, with the largest and smallest categories containing 1,280 and 5 images, respectively.
310
+
311
+ Multiple backbone networks are experimented on ImageNet-LT, including ResNet-10, ResNet-50 and ResNeXt-50 (Xie et al., 2017). All backbone networks are trained with a batch size of 256 on 8 RTX 2080Ti GPUs for 100 epochs using SGD with an initial learning rate of 0.1 decayed by 0.1 at 60 epochs and 80 epochs. We utilize standard data augmentations as in (He et al., 2016).
312
+
313
+ 3.iNaturalist (Van Horn et al., 2018): The iNaturalist-2018 dataset is an imbalanced datasets with 437,513 training images from 8,142 classes with a balanced test set of 24,426 images. We use ResNet-50 as the backbone network and apply the same training recipe as ImageNet-LT, except that we use a batch size of 512.
314
+
315
+ # A.2 ADDITIONAL EXPERIMENTS
316
+
317
+ Ablation study on distillation methods. Self-distillation step is optional but recommended if further improvements $( 0 . 4 \% \sim 0 . 8 \%$ for most experiments) are desired. We apply distillation from a more powerful model with more experts into a model with fewer experts. A simple way to transfer knowledge is knowledge distillation (KD) (Hinton et al., 2015), which applies KD loss $( \mathcal { L } _ { \mathrm { K D } } = T ^ { 2 } D _ { \mathrm { K L } } ( \tilde { \vec { l } _ { \mathrm { t e a c h e r } } } / T , \vec { l } _ { \mathrm { e x p e r t } _ { i } } / T ) )$ to match the distribution of logits of a teacher and a student. We found that for teacher model with more experts using smaller distillation loss factor gives better performance. We hypothesize that since we distill from the same teachers, giving large distillation factor prevents the branches from becoming as diversified as it is able to. We also explored other distillation methods, such as CRD (Tian et al., 2019), PKT (Passalis & Tefas, 2018), and SP (Tung & Mori, 2019), and compared the differences in Table 5. Although adding other methods along with KD may boost performance, the difference is small. Therefore, we opt for simplicity and use KD only unless otherwise noticed.
318
+
319
+ Detailed results for ImageNet-LT experiments. We list details of our ResNet-50 experiments in ImageNet-LT on Table 7. With 2 experts, we are able to achieve about $7 \%$ gain in accuracy with computational cost about $10 \%$ less than baseline. In contrast to previous methods that sacrifice many-shot accuracy to get few-shot accuracy, we improve on all three splits on ImageNet-LT. From 3 experts to 4 experts, we keep the same many-shot accuracy while increasing the few-shot accuracy, indicating that we are using the additional computational power to improve on the hardest part of the data rather than uniformly applying to all samples.
320
+
321
+ We also list our ResNet-10 and ResNeXt-50 experiments on Table 6 and 8, respectively, to compare against other works evaluated on these backbones. Our method also achieves lower computational cost and higher performance when compared to other methods.
322
+
323
+ Comparison with ensemble method. Since our method requires the joint decision from several experts, which raw ensembles also do, we also compare against ensembles of LDAM in Fig.7 on
324
+
325
+ Table 5: Comparison of different distillation methods. We transfer from a model based on ResNet-32 with 6 experts to a model of the same type, except with fewer experts. We use CIFAR100- LT for the following comparison. No expert assignment module is used in the following experiments. Following the procedure for CRD (Tian et al., 2019), we also apply KD when we transfer from a teacher to students with other distillation methods.
326
+
327
+ RIDE and Ensembles of LDAM
328
+
329
+ <table><tr><td>Model Type</td><td>#expert</td><td>DistillationMethod</td><td>Accuracy (%)</td></tr><tr><td>Teacher</td><td>6</td><td></td><td>49.7</td></tr><tr><td rowspan="10">Student</td><td>2</td><td>No Distillation</td><td>46.6</td></tr><tr><td>2</td><td>KD (Hinton et al., 2015)</td><td>47.3</td></tr><tr><td>2</td><td>CRD (Tian et al., 2019)</td><td>47.5</td></tr><tr><td>2</td><td>PKT (Passalis &amp; Tefas,2018)</td><td>47.2</td></tr><tr><td>2</td><td>SP(Tung&amp;Mori,2019)</td><td>47.2</td></tr><tr><td>3 3</td><td>No Distillation</td><td>47.9</td></tr><tr><td></td><td>KD (Hinton et al., 2015)</td><td>48.4</td></tr><tr><td>3</td><td>CRD (Tian et al., 2019)</td><td>48.5</td></tr><tr><td>3</td><td>PKT (Passalis &amp; Tefas,2018)</td><td>48.3</td></tr><tr><td>3 4</td><td>SP(Tung&amp; Mori,2019)</td><td>48.7</td></tr><tr><td></td><td>No Distillation</td><td></td><td>48.7</td></tr><tr><td></td><td>4</td><td>KD (Hinton et al., 2015)</td><td>49.3</td></tr><tr><td></td><td>4</td><td>CRD (Tian et al., 2019)</td><td>49.0</td></tr><tr><td></td><td>4</td><td>PKT (Passalis &amp; Tefas,2018)</td><td>48.9</td></tr><tr><td>4</td><td></td><td>SP (Tung&amp; Mori,2019)</td><td>49.0</td></tr></table>
330
+
331
+ ![](images/ed58db4791e1f89ea35cfff8e371d2ead6b40c0516b6979d8bf036e41da4d9b4.jpg)
332
+ Figure 7: Comparison between our method and multiple LDAM models ensembled together. In the figure, ensembles of LDAM start from 1 ensemble (original LDAM) to 7 ensembles, and RIDE starts from 2 experts to 4 experts. Our method achieves higher accuracy with substantially less computational cost compared to ensemble method.
333
+
334
+ CIFAR100-LT. In the figure, even our method with 4 experts has less computational cost than the minimum computational cost for the ensemble of 2 LDAM models. This indicates that our model is much more efficient and powerful in terms of computational cost and accuracy than ensemble on long-tailed datasets.
335
+
336
+ ![](images/e6115ad05a8234a5953def47587d79cb117043662a85d302d1fee6d35a65ae44.jpg)
337
+ Figure 8: t-SNE visualization of LDAM’s and our model’s embedding space of CIFAR100-LT. The feature embedding of RIDE is more compact for both head and tail classes and better separated. This behavior greatly reduces the difficulty for the classifier to distinguish the tail category.
338
+
339
+ t-SNE visualization. We also provide the t-SNE visualization of embedding space on CIFAR100- LT as in Fig. 8. Compared with the baseline method LDAM, the feature embedding of RIDE is more compact for both the head and tail classes and better separated from the neighboring classes. This greatly reduces the difficulty for the classifier to distinguish the tail category.
340
+
341
+ What if we apply RIDE to balanced datasets? We also conducted experiments on CIFAR100 to check if our method can achieve similar performance gains on balanced datasets. However, we only obtained an improvement of about $1 \%$ , which is much smaller than the improvements observed on the CIFAR100-LT. Compared with balanced datasets, long-tailed datasets can get more benefits from RIDE.
342
+
343
+ Table 6: Top-1 accuracy comparison with state-of-the-art methods on ImageNet-LT (Liu et al., 2019) with ResNet-10. Performance on Many-shot $( > 1 0 0 )$ , Medum-shot $\leq 1 0 0$ & ${ > } 2 0$ ) and Fewshot $( \leq 2 0 )$ are also provided. Results marked with $\dagger$ are copied from (Liu et al., 2019). Results with $\ddagger$ are from (Xiang et al., 2020).
344
+
345
+ <table><tr><td>Methods</td><td>GFlops</td><td>Many</td><td>Medium</td><td>Few</td><td>Overall</td></tr><tr><td>Cross Entropy(CE) t</td><td>0.89 (1.0x)</td><td>40.9</td><td>10.7</td><td>0.4</td><td>20.9</td></tr><tr><td>Focal Loss † (Lin et al.,2017)</td><td>0.89 (1.0x) 0.89 (1.0x)</td><td>36.4</td><td>29.9</td><td>16.0</td><td>30.5</td></tr><tr><td>Range Loss † (Zhang et al., 2017) Lifted Loss † (Oh Song et al., 2016)</td><td>0.89 (1.0x)</td><td>35.8</td><td>30.3</td><td>17.6</td><td>30.7</td></tr><tr><td></td><td></td><td>35.8</td><td>30.4</td><td>17.9</td><td>30.8</td></tr><tr><td>OLTR (Liu et al., 2019) LFME (Xiang et al., 2020)</td><td>0.89 (1.0x)</td><td>43.2</td><td>35.1</td><td>18.5</td><td>35.6</td></tr><tr><td>Many-shot only t</td><td>- 1</td><td>47.0 59.3</td><td>37.9</td><td>19.2</td><td>38.8</td></tr><tr><td>Medium-shot only t</td><td>1</td><td></td><td>35.9</td><td></td><td></td></tr><tr><td>Few-shot only ‡</td><td>1</td><td></td><td></td><td>14.3</td><td></td></tr><tr><td>RIDE (2 experts)</td><td>0.85 (1.0x)</td><td>57.5</td><td>40.8</td><td>26.9</td><td>45.3 (+6.5)</td></tr><tr><td>RIDE (3 experts)</td><td>0.97 (1.1x)</td><td>57.6</td><td>41.7</td><td>28.0</td><td>45.9 (+7.1)</td></tr><tr><td>RIDE (4 experts)</td><td>1.07 (1.2x)</td><td>58.5</td><td>42.4</td><td>27.7</td><td>46.6 ( (+7.8)</td></tr></table>
346
+
347
+ Table 7: Top-1 accuracy comparison with state-of-the-art methods on ImageNet-LT (Liu et al., 2019) with ResNet-50. Performance on Many-shot $( > 1 0 0 )$ , Medum-shot $( \leq 1 0 0$ & ${ > } 2 0$ ) and Fewshot $( \leq 2 0 )$ are also provided. Results marked with $\dagger$ are copied from (Kang et al., 2020).
348
+
349
+ <table><tr><td>Methods</td><td>GFlops</td><td>Many</td><td>Medium</td><td>Few</td><td>Overall</td></tr><tr><td>Cross Entropy (CE) t</td><td>4.11 (1.0x)</td><td>64.0</td><td>33.8</td><td>5.8</td><td>41.6</td></tr><tr><td>NCM (Kang et al., 2020)</td><td>=</td><td>53.1</td><td>42.3</td><td>26.5</td><td>44.3</td></tr><tr><td>cRT (Kang et al., 2020)</td><td>4.11 (1.0x)</td><td>58.8</td><td>44.0</td><td>26.1</td><td>47.3</td></tr><tr><td>T-norm (Kang et al., 2020)</td><td>4.11 (1.0x)</td><td>56.6</td><td>44.2</td><td>27.4</td><td>46.7</td></tr><tr><td>LWS (Kang et al., 2020)</td><td>4.11 (1.0x)</td><td>57.1</td><td>45.2</td><td>29.3</td><td>47.7</td></tr><tr><td>RIDE (2 experts)</td><td>3.71 (0.9x)</td><td>65.8</td><td>51.0</td><td>34.6</td><td>54.4 (+6.7)</td></tr><tr><td>RIDE (3 experts)</td><td>4.36 (1.1x)</td><td>66.2</td><td>51.7</td><td>34.9</td><td>54.9 (+7.2)</td></tr><tr><td>RIDE (4 experts)</td><td>5.15 (1.3x)</td><td>66.2</td><td>52.3</td><td>36.5</td><td> 55.4 (+7.7)</td></tr></table>
350
+
351
+ Table 8: Top-1 accuracy comparison with state-of-the-art methods on ImageNet-LT (Liu et al., 2019) with ResNeXt-50. Performance on Many-shot $( > 1 0 0 )$ , Medum-shot $( \leq 1 0 0$ & ${ > } 2 0 _ { , }$ ) and Few-shot $( \leq 2 0 )$ are also provided. Results marked with $\dagger$ are copied from (Kang et al., 2020).
352
+
353
+ <table><tr><td>Methods</td><td>GFlops</td><td>Many</td><td>Medium</td><td>Few</td><td>Overall</td></tr><tr><td>Cross Entropy(CE) + NCM (Kang et al., 2020)</td><td>4.26 (1.0x)</td><td>65.9</td><td>37.5</td><td>7.7</td><td>44.4</td></tr><tr><td>cRT (Kang et al., 2020)</td><td>4.26 (1.0x)</td><td>56.6 61.8</td><td>45.3 46.2</td><td>28.1 27.4</td><td>47.3 49.6</td></tr><tr><td>T-norm (Kang et al., 2020)</td><td>4.26 (1.0x)</td><td>59.1</td><td>46.9</td><td>30.7</td><td>49.4</td></tr><tr><td>LWS (Kang et al., 2020)</td><td>4.26 (1.0x)</td><td>60.2</td><td>47.2</td><td>30.3</td><td></td></tr><tr><td></td><td>3.92 (0.9x)</td><td>67.6</td><td>52.5</td><td>35.0</td><td>49.9</td></tr><tr><td>RIDE (2 experts)</td><td>4.69 (1.1x)</td><td>67.6</td><td>53.5</td><td>35.9</td><td>55.9 (+6.0)</td></tr><tr><td>RIDE (3 experts)</td><td>5.19 (1.2x)</td><td></td><td></td><td></td><td>56.4 (+6.5)</td></tr><tr><td>RIDE (4 experts)</td><td></td><td>68.2</td><td>53.8</td><td>36.0</td><td>56.8 (+6.9)</td></tr></table>
parse/train/D9I3drBz4UC/D9I3drBz4UC_content_list.json ADDED
@@ -0,0 +1,1845 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "LONG-TAILED RECOGNITION BYROUTING DIVERSE DISTRIBUTION-AWARE EXPERTS",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 99,
9
+ 805,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Xudong Wang1, Long Lian1, Zhongqi Miao1, Ziwei Liu2, Stella X. $\\mathbf { Y u } ^ { 1 }$ ",
17
+ "bbox": [
18
+ 184,
19
+ 169,
20
+ 674,
21
+ 185
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "1UC Berkeley / ICSI, 2Nanyang Technological University {xdwang,longlian,zhongqi.miao,stellayu}@berkeley.edu ziwei.liu@ntu.edu.sg ",
28
+ "bbox": [
29
+ 184,
30
+ 185,
31
+ 691,
32
+ 227
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "ABSTRACT ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 454,
42
+ 263,
43
+ 544,
44
+ 279
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Natural data are often long-tail distributed over semantic classes. Existing recognition methods tackle this imbalanced classification by placing more emphasis on the tail data, through class re-balancing/re-weighting or ensembling over different data groups, resulting in increased tail accuracies but reduced head accuracies. ",
51
+ "bbox": [
52
+ 233,
53
+ 297,
54
+ 764,
55
+ 354
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "We take a dynamic view of the training data and provide a principled model bias and variance analysis as the training data fluctuates: Existing long-tail classifiers invariably increase the model variance and the head-tail model bias gap remains large, due to more and larger confusion with hard negatives for the tail. ",
62
+ "bbox": [
63
+ 233,
64
+ 359,
65
+ 764,
66
+ 415
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "We propose a new long-tailed classifier called RoutIng Diverse Experts (RIDE). It reduces the model variance with multiple experts, reduces the model bias with a distribution-aware diversity loss, reduces the computational cost with a dynamic expert routing module. RIDE outperforms the state-of-the-art by $5 \\%$ to $7 \\%$ on CIFAR100-LT, ImageNet-LT and iNaturalist 2018 benchmarks. It is also a universal framework that is applicable to various backbone networks, long-tailed algorithms, and training mechanisms for consistent performance gains. Our code is available at: https://github.com/frank-xwang/RIDE-LongTailRecognition. ",
73
+ "bbox": [
74
+ 233,
75
+ 420,
76
+ 764,
77
+ 531
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "1 INTRODUCTION ",
84
+ "text_level": 1,
85
+ "bbox": [
86
+ 176,
87
+ 568,
88
+ 336,
89
+ 583
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Real-world data are often long-tail distributed over semantic classes: A few classes contain many instances, whereas most classes contain only a few instances. Long-tailed recognition is challenging, as it needs to handle not only a multitude of small-data learning problems on the tail classes, but also extreme imbalanced classification over all the classes. ",
96
+ "bbox": [
97
+ 174,
98
+ 602,
99
+ 823,
100
+ 657
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "There are two ways to prevent the many head instances from overwhelming the few tail instances in the classifier training objective: 1) class re-balancing/re-weighting which gives more importance to tail instances (Cao et al., 2019; Kang et al., 2020; Liu et al., 2019), 2) ensembling over different data distributions which re-organizes long-tailed data into groups, trains a model per group, and then combines individual models in a multi-expert framework (Zhou et al., 2020; Xiang et al., 2020). ",
107
+ "bbox": [
108
+ 174,
109
+ 665,
110
+ 825,
111
+ 734
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "We compare three state-of-the-art (SOTA) long-tail classifiers against the standard cross-entropy (CE) classifier: cRT and $\\tau$ -norm (Kang et al., 2020) which adopt a two-stage optimization, first representation learning and then classification learning, and LDAM (Cao et al., 2019), which is trained end-to-end with a marginal loss. In terms of the classification accuracy, a common metric for model selection on a fixed training set, Fig. 1a shows that, all these existing long-tail methods increase the overall, medium- and few-shot accuracies over CE, but decrease the many-shot accuracy. ",
118
+ "bbox": [
119
+ 174,
120
+ 741,
121
+ 825,
122
+ 825
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "These intuitive solutions and their experimental results seem to suggest that there is a head-tail performance trade-off in long-tailed recognition. We need a principled performance analysis approach that could shed light on such a limitation if it exists and provide guidance on how to overcome it. ",
129
+ "bbox": [
130
+ 176,
131
+ 833,
132
+ 825,
133
+ 875
134
+ ],
135
+ "page_idx": 0
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "Our insight comes from a dynamic view of the training set: It is merely a sample set of some underlying data distribution. Instead of evaluating how a long-tailed classifier performs on the fixed training set, we evaluate how it performs as the training set fluctuates according to the data distribution. ",
140
+ "bbox": [
141
+ 176,
142
+ 882,
143
+ 823,
144
+ 924
145
+ ],
146
+ "page_idx": 0
147
+ },
148
+ {
149
+ "type": "table",
150
+ "img_path": "images/de3d797b0da934214264aa007c0ae0473262e22bf2e1e01c7d1d49322ac90f13.jpg",
151
+ "table_caption": [],
152
+ "table_footnote": [],
153
+ "table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"3\">All</td><td colspan=\"3\">Many-shot</td><td colspan=\"3\">Med-shot</td><td colspan=\"3\">Few-shot</td></tr><tr><td>acc</td><td>bias</td><td>var</td><td>acc</td><td>bias</td><td>var</td><td>acc</td><td>bias</td><td>var</td><td>acc</td><td>bias</td><td>var</td></tr><tr><td>CE</td><td>31.6</td><td>0.60</td><td>0.47</td><td>57.3</td><td>0.28</td><td>0.35</td><td>28.2</td><td>0.61</td><td>0.51</td><td>6.3</td><td>0.94</td><td>0.57</td></tr><tr><td>T-norm</td><td>35.8</td><td>0.52</td><td>0.49</td><td>55.9</td><td>0.28</td><td>0.37</td><td>33.2</td><td>0.53</td><td>0.52</td><td>16.1</td><td>0.78</td><td>0.60</td></tr><tr><td>cRT</td><td>36.4</td><td>0.50</td><td>0.50</td><td>51.3</td><td>0.32</td><td>0.41</td><td>38.6</td><td>0.44</td><td>0.50</td><td>17.0</td><td>0.76</td><td>0.61</td></tr><tr><td>LDAM</td><td>34.4</td><td>0.53</td><td>0.51</td><td>55.1</td><td>0.28</td><td>0.38</td><td>31.9</td><td>0.53</td><td>0.54</td><td>13.9</td><td>0.81</td><td>0.63</td></tr><tr><td>RIDE + LDAM</td><td>40.5</td><td>0.50</td><td>0.42</td><td>60.5</td><td>0.28</td><td>0.30</td><td>38.7</td><td>0.50</td><td>0.44</td><td>20.1</td><td>0.74</td><td>0.52</td></tr></table>",
154
+ "bbox": [
155
+ 174,
156
+ 102,
157
+ 821,
158
+ 199
159
+ ],
160
+ "page_idx": 1
161
+ },
162
+ {
163
+ "type": "text",
164
+ "text": "(a) Comparisons of the mean accuracy, per-class bias and variance of baselines and our RIDE method. Better (worse) metrics than the distribution-unaware cross entropy (CE) reference are marked in green (red). ",
165
+ "bbox": [
166
+ 173,
167
+ 205,
168
+ 821,
169
+ 231
170
+ ],
171
+ "page_idx": 1
172
+ },
173
+ {
174
+ "type": "image",
175
+ "img_path": "images/1b1cf846f346b6cdd587ca59d616df0ee927280983b0f7037c4506e0f6a87532.jpg",
176
+ "image_caption": [
177
+ "(b) Histograms of the largest softmax score of the other classes (the hardest negative) per instance. ",
178
+ "Figure 1: Our method RIDE outperforms SOTA by reducing both model bias and variance. a) These metrics are evaluated over 20 independently trained models, each on a random sampled set of CIFAR100 with an imbalance ratio of 100 and 300 samples for class 0. Compared to the standard head performance loss from increased classifier variance. The low tail perfor-CE classifier, existing SOTA methods almost always increase the variance and some reduce the tail mance manifests itself in large between-class confusion and high classifier vari-bias at the cost of increasing the head bias. b) The metrics are evaluated over CIFAR100-LT Liu ance. We aim to reduce both the bias and the variance of a long-tailed classifieret al. (2019). LDAM is more likely to confuse the tail (rather than head) classes with the hardest by RoutIng Diverse Experts (RIDE). It has three components: 1) a shared archi-negative class, with an average score of 0.59. RIDE with LDAM can greatly reduce the confusion tecture for multiple classifiers (experts); 2) a distribution-aware diversity loss thatwith the nearest negative class, especially for samples from the few-shot categories. "
179
+ ],
180
+ "image_footnote": [],
181
+ "bbox": [
182
+ 179,
183
+ 238,
184
+ 820,
185
+ 332
186
+ ],
187
+ "page_idx": 1
188
+ },
189
+ {
190
+ "type": "text",
191
+ "text": "to additional expertConsider the training data $D$ With on-par computational complexity, RIDE significantlyas a random variable. The prediction error of model $h$ on instance $x$ outwith output $Y$ forms the state-of-the-art methodvaries with the realization of $D$ y 5% to 7% on all the benchmarks in-. The expected variance with respect to variable $D$ cluding CIFAR100-LT, ImageNet-LT andhas a well-known bias-variance decomposition: ",
192
+ "bbox": [
193
+ 173,
194
+ 497,
195
+ 825,
196
+ 540
197
+ ],
198
+ "page_idx": 1
199
+ },
200
+ {
201
+ "type": "equation",
202
+ "img_path": "images/d456d2e6152dcecb364cef8b2a36eda341b097599bccfc5646aa530c4c639cb4.jpg",
203
+ "text": "$$\n\\operatorname { E r r o r } ( x ; h ) = E [ ( h ( x ; D ) - Y ) ^ { 2 } ] = \\operatorname { B i a s } ( x ; h ) + \\operatorname { V a r i a n c e } ( x ; h ) + { \\mathrm { i r r e d u c i b l e ~ e r r o r } } ( x ) .\n$$",
204
+ "text_format": "latex",
205
+ "bbox": [
206
+ 196,
207
+ 542,
208
+ 781,
209
+ 560
210
+ ],
211
+ "page_idx": 1
212
+ },
213
+ {
214
+ "type": "text",
215
+ "text": "For the above L2 loss on regression $h ( x ) Y$ , the model bias measures the accuracy of the prediction with respect to the true value, the variance measures the stability of the prediction, and the irreducible error measures the precision of the prediction and is irrelevant to the model $h$ . ",
216
+ "bbox": [
217
+ 176,
218
+ 564,
219
+ 823,
220
+ 607
221
+ ],
222
+ "page_idx": 1
223
+ },
224
+ {
225
+ "type": "text",
226
+ "text": "Empirically, for $n$ random sample sets of data, $D ^ { ( 1 ) } , \\ldots , D ^ { ( n ) }$ , the $k$ -th model trained on $D ^ { ( k ) }$ The natupredicts $y ^ { ( k ) }$ ata we encou on instance $x$ er in practice often has a long tail distribution: A, and collectively they have a mean prediction $y _ { m }$ classes contain. For the L2 regression many instances, while most classes contain only a feloss, the model bias is simply the L2 loss between $y _ { m }$ stances. Learningand ground-truth $t = E [ Y ]$ ation among, whereas the model them is challenging, as the fvariance is the variance of $y ^ { ( k ) }$ il instances can be easily overwith respect to their mean $y _ { m }$ l: ",
227
+ "bbox": [
228
+ 174,
229
+ 612,
230
+ 823,
231
+ 674
232
+ ],
233
+ "page_idx": 1
234
+ },
235
+ {
236
+ "type": "equation",
237
+ "img_path": "images/cc97362fbc6e41a7680904b5d96a98055cd18adb96ca3ac3c608c656a3637bc9.jpg",
238
+ "text": "$$\n\\begin{array} { r l } { \\displaystyle \\mathcal { L } ( y ; z ) = ( y - z ) ^ { 2 } } \\\\ { \\displaystyle y _ { m } = \\frac { 1 } { n } \\sum _ { k = 1 } ^ { n } y ^ { ( k ) } } & { ~ = \\mathrm { a r g } \\operatorname* { m i n } _ { z } E _ { D } [ \\mathcal { L } \\left( h ( x ) ; z ) \\right] } \\\\ { \\displaystyle \\mathrm { B i a s } ( x ; h ) = ( y _ { m } - t ) ^ { 2 } } & { ~ = \\mathcal { L } \\left( y _ { m } ; t \\right) } \\\\ { \\displaystyle \\mathrm { V a r i a n c e } ( x ; h ) = \\frac { 1 } { n } \\sum _ { k = 1 } ^ { n } \\left( y ^ { ( k ) } - y _ { m } \\right) ^ { 2 } } & { ~ = E _ { D } [ \\mathcal { L } \\left( h ( x ) ; y _ { m } \\right) ] . } \\end{array}\n$$",
239
+ "text_format": "latex",
240
+ "bbox": [
241
+ 331,
242
+ 675,
243
+ 787,
244
+ 801
245
+ ],
246
+ "page_idx": 1
247
+ },
248
+ {
249
+ "type": "text",
250
+ "text": "We analyze the performance of a long-tail classifier in terms of bias and variance with respectAs shown on the above right, these concepts can be expressed entirely in terms of L2 loss $\\mathcal { L }$ . We can fluctuations in the training set: We randomly sample CIFAR100 (Krizhevthus extended them to classification (Domingos, 2000) by replacing $\\mathcal { L }$ y, 200 with $\\mathcal { L } _ { 0 - 1 }$ cording to afor classification: ",
251
+ "bbox": [
252
+ 176,
253
+ 803,
254
+ 823,
255
+ 832
256
+ ],
257
+ "page_idx": 1
258
+ },
259
+ {
260
+ "type": "text",
261
+ "text": "The mean prediction $y _ { m }$ minimizes $\\begin{array} { r } { \\sum _ { k = 1 } ^ { n } \\mathcal { L } _ { 0 - 1 } \\left( y ^ { ( k ) } ; y _ { m } \\right) } \\end{array}$ and becomes the most often or main prediction. The bias and variance terms become $\\mathcal { L } _ { 0 - 1 } ( y _ { m } ; t )$ and $\\begin{array} { r } { \\frac { 1 } { n } \\sum _ { k = 1 } ^ { n } \\mathcal { L } _ { 0 - 1 } ( y ^ { ( k ) } ; y _ { m } ) } \\end{array}$ respectively. ",
262
+ "bbox": [
263
+ 176,
264
+ 856,
265
+ 823,
266
+ 890
267
+ ],
268
+ "page_idx": 1
269
+ },
270
+ {
271
+ "type": "text",
272
+ "text": "We apply such bias and variance analysis to the CE and long-tail classifiers. We sample CIFAR100 (Krizhevsky, 2009) according to a long-tail distribution multiple times. For each method, we train a model per long-tail sampled dataset and then estimate the per-class bias and variance over these multiple models on the balanced test set of CIFAR100-LT Liu et al. (2019). Fig. 1a shows that: ",
273
+ "bbox": [
274
+ 173,
275
+ 895,
276
+ 823,
277
+ 924
278
+ ],
279
+ "page_idx": 1
280
+ },
281
+ {
282
+ "type": "text",
283
+ "text": "",
284
+ "bbox": [
285
+ 171,
286
+ 103,
287
+ 823,
288
+ 132
289
+ ],
290
+ "page_idx": 2
291
+ },
292
+ {
293
+ "type": "text",
294
+ "text": "1. On the model bias: The head bias is significantly smaller than the tail bias, at 0.3 vs. 0.9 for CE. All the existing long-tail methods reduce the overall bias by primarily reducing the tail bias. However, the head-tail bias gap remains large at 0.3 vs. 0.8. \n2. On the model variance: All the existing long-tail methods increase the model variance across all class splits, with a slight reduction in the medium-shot variance for cRT. ",
295
+ "bbox": [
296
+ 173,
297
+ 143,
298
+ 825,
299
+ 217
300
+ ],
301
+ "page_idx": 2
302
+ },
303
+ {
304
+ "type": "text",
305
+ "text": "That is, existing long-tail methods reduce the model bias for the tail at the cost of increased model variance for all the classes, and the head-tail model bias gap remains large. ",
306
+ "bbox": [
307
+ 173,
308
+ 229,
309
+ 823,
310
+ 257
311
+ ],
312
+ "page_idx": 2
313
+ },
314
+ {
315
+ "type": "text",
316
+ "text": "We conduct further statistical analysis to understand the head-tail model bias gap. We examine the largest softmax score in the other classes of $\\{ c : c \\neq t \\}$ , where $t$ is the ground-truth class of an instance. The smaller this hardest negative score is, the less the confusion, and the lower the model bias. Fig. 1b shows that there is increasingly more and larger confusion from the head to the tail. ",
317
+ "bbox": [
318
+ 174,
319
+ 265,
320
+ 825,
321
+ 320
322
+ ],
323
+ "page_idx": 2
324
+ },
325
+ {
326
+ "type": "text",
327
+ "text": "Guided by our model bias/variance and confusion pattern analysis, we propose a new long-tail classifier with four distinctive features: 1) It reduces the model variance for all the classes with multiple experts. 2) It reduces the model bias for the tail with an additional distribution-aware diversity loss. 3) It reduces the computational complexity that comes with multiple experts with a dynamic expert routing module which deploys another trained distinctive expert for a second (or third, ...) opinion only when it is called for. 4) The routing module and a shared architecture for experts of reduced complexity effectively cut down the computational cost of our multi-expert model, to a level that could be even lower than the commonly adopted baseline with the same backbone. ",
328
+ "bbox": [
329
+ 174,
330
+ 327,
331
+ 825,
332
+ 439
333
+ ],
334
+ "page_idx": 2
335
+ },
336
+ {
337
+ "type": "text",
338
+ "text": "Our so-called RoutIng Diverse Experts (RIDE) not only reduces the model variance for all the classes, but also significantly reduces the model bias for the tail classes and increases the mean accuracies for all class splits, all of which existing long-tail methods fail to accomplish. ",
339
+ "bbox": [
340
+ 174,
341
+ 445,
342
+ 825,
343
+ 488
344
+ ],
345
+ "page_idx": 2
346
+ },
347
+ {
348
+ "type": "text",
349
+ "text": "RIDE delivers $5 \\% \\sim 7 \\%$ higher accuracies than the current SOTA methods on CIFAR100-LT, ImageNet-LT (Liu et al., 2019) and iNaturalist (Van Horn et al., 2018). RIDE is also a universal framework that can be applied to different backbone networks for improving existing long-tail algorithms such as focal loss (Lin et al., 2017), LDAM (Cao et al., 2019), $\\tau$ -norm (Kang et al., 2020). ",
350
+ "bbox": [
351
+ 174,
352
+ 494,
353
+ 823,
354
+ 550
355
+ ],
356
+ "page_idx": 2
357
+ },
358
+ {
359
+ "type": "text",
360
+ "text": "2 RELATED WORKS ",
361
+ "text_level": 1,
362
+ "bbox": [
363
+ 176,
364
+ 570,
365
+ 380,
366
+ 587
367
+ ],
368
+ "page_idx": 2
369
+ },
370
+ {
371
+ "type": "text",
372
+ "text": "Few-shot learning. To generalize from small training data, meta-learning (Bertinetto et al., 2016; Ravi & Larochelle, 2017; Santoro et al., 2016; Finn et al., 2017; Yang et al., 2018) and data augmentation/generation are two most studied approaches (Chen et al., 2019; Schwartz et al., 2018; Zhang et al., 2019; Liu et al., 2018). Matching Network (Vinyals et al., 2016) and Prototypical Network (Snell et al., 2017) learn discriminative features that can be transferred to new classes through meta-learners without big training data. Hariharan & Girshick (2017), Wang et al. (2018) and Liu et al. (2018) utilize samples from a generative model to augment the training data. However, fewshot learning relies on balanced training data, whereas long-tail recognition has to deal with highly imbalanced training data, e.g., from hundreds in the head to a few instances in the tail. ",
373
+ "bbox": [
374
+ 174,
375
+ 603,
376
+ 825,
377
+ 728
378
+ ],
379
+ "page_idx": 2
380
+ },
381
+ {
382
+ "type": "text",
383
+ "text": "Re-balancing/re-weighting. A direct approach to achieve sample balance is to under- or oversample training instances according to their class sizes (He & Garcia, 2009). Another option is data augmentation, where additional samples are generated to supplement tail classes, sometimes directly in the feature space (Liu et al., 2020; Chu et al., 2020; Kim et al., 2020). Re-weighting modifies the loss function and puts larger weights on tail classes (Lin et al., 2017; Cui et al., 2019; Cao et al., 2019; Wu et al., 2020) or randomly ignoring gradients from head classes (Tan et al., 2020). However, both sample-wise and loss-wise balancing focus on tail classes, resulting in more sensitivity to fluctuations in the small tail classes and thus much increased model variances (Fig. 1a). ",
384
+ "bbox": [
385
+ 173,
386
+ 736,
387
+ 825,
388
+ 847
389
+ ],
390
+ "page_idx": 2
391
+ },
392
+ {
393
+ "type": "text",
394
+ "text": "Knowledge transfer. OLTR (Liu et al., 2019) and inflated memory (Zhu & Yang, 2020) use memory banks to store and transfer mid- and high-level features from head to tail classes, enhancing feature generalization for the tail. However, this line of work (Liu et al., 2019; Zhu & Yang, 2020; Kang et al., 2020; Jamal et al., 2020; Wang et al., 2017) usually does not have effective control over the knowledge transfer process, often resulting in head performance loss. ",
395
+ "bbox": [
396
+ 174,
397
+ 853,
398
+ 823,
399
+ 924
400
+ ],
401
+ "page_idx": 2
402
+ },
403
+ {
404
+ "type": "text",
405
+ "text": "Ensembling and grouping. One way to counter imbalance is to separate training instances into different groups based their class sizes. Models trained on individual groups are ensembled together in a multi-expert framework. BBN (Zhou et al., 2020) adaptively fuses two-branches that each focus on the head and the tail respectively. LFME (Xiang et al., 2020) distills multiple teacher models into a unified model, each teacher focusing on a relatively balanced group such as many-shot classes, medium-shot classes, and few-shot classes. BBN and LFME still lose head performance and overall generalizability, as no expert has a balanced access to the entire dataset. ",
406
+ "bbox": [
407
+ 173,
408
+ 103,
409
+ 825,
410
+ 202
411
+ ],
412
+ "page_idx": 3
413
+ },
414
+ {
415
+ "type": "text",
416
+ "text": "Our RIDE is a non-traditional ensemble method. 1) Its experts have shared earlier layers and reduced later channels, less prone to small tail overfitting. 2) Its experts are jointly optimized. 3) It deploys experts on an as-needed basis for individual instances with a dynamic expert assignment module. 4) It reaches higher accuracies with a smaller model complexity and computational cost. ",
417
+ "bbox": [
418
+ 174,
419
+ 208,
420
+ 825,
421
+ 265
422
+ ],
423
+ "page_idx": 3
424
+ },
425
+ {
426
+ "type": "text",
427
+ "text": "3 RIDE: ROUTING DIVERSE DISTRIBUTION-AWARE EXPERTS",
428
+ "text_level": 1,
429
+ "bbox": [
430
+ 174,
431
+ 285,
432
+ 704,
433
+ 303
434
+ ],
435
+ "page_idx": 3
436
+ },
437
+ {
438
+ "type": "text",
439
+ "text": "We propose a novel multi-expert model (Fig. 2) with shared earlier layers $f _ { \\theta }$ and $n$ independent channel-reduced later layers $\\Psi = \\{ \\psi _ { \\theta _ { 1 } } , . . . , \\psi _ { \\theta _ { n } } \\}$ . They are jointly optimized at Stage 1 and dynamically deployed with a learned expert assignment module at Stage 2. At the inference time, all the $m$ active experts are averaged together in their logits for final ensemble softmax classification: ",
440
+ "bbox": [
441
+ 174,
442
+ 316,
443
+ 825,
444
+ 373
445
+ ],
446
+ "page_idx": 3
447
+ },
448
+ {
449
+ "type": "equation",
450
+ "img_path": "images/86ff879e2e4553da7ea865b051bb87f9860ca5af8add36cd9dbae870f5a51980.jpg",
451
+ "text": "$$\n\\mathbf { p } = \\mathrm { s o f t m a x } \\left( \\frac { 1 } { m } \\sum _ { i = 1 } ^ { m } \\psi _ { \\theta _ { i } } \\left( f _ { \\theta } ( x ) \\right) \\right) .\n$$",
452
+ "text_format": "latex",
453
+ "bbox": [
454
+ 372,
455
+ 381,
456
+ 624,
457
+ 424
458
+ ],
459
+ "page_idx": 3
460
+ },
461
+ {
462
+ "type": "text",
463
+ "text": "Softmax of the average logits is equivalent to the product of individual classification probabilities, which approximates their joint probability if individual experts makes independent decisions. ",
464
+ "bbox": [
465
+ 173,
466
+ 431,
467
+ 823,
468
+ 459
469
+ ],
470
+ "page_idx": 3
471
+ },
472
+ {
473
+ "type": "text",
474
+ "text": "Experts with a shared early backbone and reduced later channels. Consider $n$ independent experts of the same convolutional neural network (CNN) architecture. Since early layers of a CNN tend to encode generic low-level features, we adopt the common practice in transfer learning and have all the $n$ experts share the same backbone $f _ { \\theta }$ . Each expert retains independent later layers $\\psi _ { \\boldsymbol { \\theta } _ { i } }$ , $i = 1 , \\ldots , n$ . To reduce overfitting to small training data in the tail classes, we reduce the number of filter channels in $\\psi _ { \\theta _ { i } }$ , e.g., by $1 / 4$ . All these $n$ experts are trained together on long-tailed data distribution-aware diversity loss $\\mathcal { L } _ { \\mathrm { D } }$ -Diversify and classification loss $\\mathcal { L } _ { \\mathrm { C l a s s i f y } }$ , such as CE and LDAM. ",
475
+ "bbox": [
476
+ 173,
477
+ 465,
478
+ 825,
479
+ 564
480
+ ],
481
+ "page_idx": 3
482
+ },
483
+ {
484
+ "type": "text",
485
+ "text": "Individual expert classification loss. One way to combine multiple experts is to apply the classification loss to the aggregated logits of individual experts. While this idea works for several recently proposed multi-expert models (Zhou et al., 2020; Xiang et al., 2020), it does not work for our shared experts: Its performance is on-par with an equal-sized single-expert model. Let $\\mathcal { L }$ denote the classification loss (e.g. CE) over instance $x$ and its label $y$ . We call such an aggregation loss collaborative: ",
486
+ "bbox": [
487
+ 173,
488
+ 570,
489
+ 825,
490
+ 627
491
+ ],
492
+ "page_idx": 3
493
+ },
494
+ {
495
+ "type": "image",
496
+ "img_path": "images/0d63952f3af398ad49a8d8ddd426a0d1eab5f99c76968cf24f009158bc101969.jpg",
497
+ "image_caption": [
498
+ "Figure 2: RIDE learns experts and their router in two stages. a) We first jointly optimize multiple experts with individual classification losses and mutual distribution-aware diversity losses. b) We then train a router that dynamically assigns ambiguous samples to additional experts on an as-needed basis. The distribution of instances seen by each expert shows that head instances need fewer experts and the imbalance between classes gets reduced for later experts. At the test time, we collect the logits of assigned experts to make a final decision. c) RIDE outperforms SOTA methods (i.e. LFME (Xiang et al., 2020) for CIFAR100-LT, LWS (Kang et al., 2020) for ImageNet-LT and BBN (Zhou et al., 2020) for iNaturalist) on all the benchmarks. "
499
+ ],
500
+ "image_footnote": [],
501
+ "bbox": [
502
+ 174,
503
+ 650,
504
+ 823,
505
+ 801
506
+ ],
507
+ "page_idx": 3
508
+ },
509
+ {
510
+ "type": "text",
511
+ "text": "",
512
+ "bbox": [
513
+ 171,
514
+ 102,
515
+ 823,
516
+ 119
517
+ ],
518
+ "page_idx": 4
519
+ },
520
+ {
521
+ "type": "equation",
522
+ "img_path": "images/ecf8313c4b59e5378af2bbb8225487f87fb0a8fd9f7053e6879b3dc21b612012.jpg",
523
+ "text": "$$\n\\mathcal { L } ^ { \\mathrm { c o l l a b o r a t i v e } } ( x , y ) = \\mathcal { L } \\left( \\frac { 1 } { n } \\sum _ { i = 1 } ^ { n } \\psi _ { \\theta _ { i } } \\left( f _ { \\theta } ( x ) \\right) , y \\right)\n$$",
524
+ "text_format": "latex",
525
+ "bbox": [
526
+ 343,
527
+ 125,
528
+ 653,
529
+ 167
530
+ ],
531
+ "page_idx": 4
532
+ },
533
+ {
534
+ "type": "text",
535
+ "text": "as it leads to correlated instead of complementary experts. To discourage correlation, we require each expert to do the job well by itself. Such an aggregation loss is essentially an individual loss, and it contributes a large portion of our performance gain in most of our experiments: ",
536
+ "bbox": [
537
+ 174,
538
+ 174,
539
+ 825,
540
+ 217
541
+ ],
542
+ "page_idx": 4
543
+ },
544
+ {
545
+ "type": "equation",
546
+ "img_path": "images/fa0e3550101c76d64a4aec4485ac5ebb6390c5e9fe4cc2e60246e829f1a9f8a9.jpg",
547
+ "text": "$$\n\\mathcal { L } ^ { \\mathrm { i n d i v i d u a l } } ( x , y ) = \\sum _ { i = 1 } ^ { n } \\mathcal { L } \\left( \\psi _ { \\theta _ { i } } \\left( f _ { \\theta } ( x ) \\right) , y \\right) .\n$$",
548
+ "text_format": "latex",
549
+ "bbox": [
550
+ 361,
551
+ 223,
552
+ 635,
553
+ 265
554
+ ],
555
+ "page_idx": 4
556
+ },
557
+ {
558
+ "type": "text",
559
+ "text": "Distribution-aware diversity loss. The individual classification loss and random initialization lead to diversified experts with a shared backbone. For long-tailed data, we add a regularization term to encourage complementary decisions from multiple experts. That is, we maximize the KL-divergence between different experts’ classification probabilities on instance $x$ in class $y$ over a total of $c$ classes: ",
560
+ "bbox": [
561
+ 174,
562
+ 270,
563
+ 823,
564
+ 328
565
+ ],
566
+ "page_idx": 4
567
+ },
568
+ {
569
+ "type": "equation",
570
+ "img_path": "images/2d867ff75a0ff5f86155415b5bfb9f9950f7d295b5ff852a4548e7de2e3b4b20.jpg",
571
+ "text": "$$\n\\begin{array} { r l r l } & { \\mathrm { d i v e r s i t y ~ l o s s : } \\quad } & { \\mathcal { L } _ { \\mathrm { D - D i v e r s i f y } } ( x , y ; \\theta _ { i } ) = \\displaystyle \\frac { - 1 } { n - 1 } \\sum _ { j = 1 , j \\neq i } ^ { n } D _ { \\mathrm { K L } } \\left( \\mathbf { p } ^ { ( i ) } ( x , y ) \\| \\mathbf { p } ^ { ( j ) } ( x , y ) \\right) } \\\\ & { \\mathrm { K L ~ d i v e r g e n c e : } \\quad } & { D _ { \\mathrm { K L } } ( \\mathbf { p } \\| \\mathbf { q } ) = \\displaystyle \\sum _ { k = 1 } ^ { c } \\mathbf { p } _ { k } \\log \\left( \\frac { \\mathbf { p } _ { k } } { \\mathbf { q } _ { k } } \\right) } \\\\ & { \\mathrm { c l a s s i f i c a t i o n ~ b y } \\theta _ { i } : \\quad } & { \\mathbf { p } ^ { ( i ) } ( x , y ) = \\mathrm { s o f t m a x } \\left( \\left[ \\frac { \\psi _ { \\theta _ { i } } ( f _ { \\theta } ( x ) ) _ { 1 } } { T _ { 1 } } \\quad . . . \\quad \\frac { \\psi _ { \\theta _ { i } } ( f _ { \\theta } ( x ) ) _ { c } } { T _ { c } } \\right] \\right) . } \\end{array}\n$$",
572
+ "text_format": "latex",
573
+ "bbox": [
574
+ 187,
575
+ 333,
576
+ 779,
577
+ 449
578
+ ],
579
+ "page_idx": 4
580
+ },
581
+ {
582
+ "type": "text",
583
+ "text": "We vary the temperature $T$ (or concentration) (Hadsell et al., 2006; Wu et al., 2018) applied to class $k$ ’s logit $\\psi _ { \\boldsymbol { \\theta } _ { i } } ( f _ { \\boldsymbol { \\theta } } ( \\boldsymbol { x } ) ) _ { k }$ : For class $k$ with $n _ { k }$ instances, the smaller the $n _ { k }$ , the lower the temperature $T _ { k }$ , the more sensitive the classification probability $\\mathbf { p }$ is to a change in the feature $\\psi$ . Specifically, ",
584
+ "bbox": [
585
+ 174,
586
+ 453,
587
+ 826,
588
+ 496
589
+ ],
590
+ "page_idx": 4
591
+ },
592
+ {
593
+ "type": "text",
594
+ "text": "class-wise temperature: ",
595
+ "bbox": [
596
+ 267,
597
+ 512,
598
+ 424,
599
+ 527
600
+ ],
601
+ "page_idx": 4
602
+ },
603
+ {
604
+ "type": "text",
605
+ "text": "normalized class size: ",
606
+ "bbox": [
607
+ 267,
608
+ 542,
609
+ 413,
610
+ 558
611
+ ],
612
+ "page_idx": 4
613
+ },
614
+ {
615
+ "type": "equation",
616
+ "img_path": "images/fd058a7abbc2be72ddb1f18819c8d1464f41b6118d4588c5d07d42605ced1462.jpg",
617
+ "text": "$$\n\\begin{array} { r l } & { T _ { k } = \\alpha \\left( \\beta _ { k } + 1 - \\underset { j } { \\operatorname* { m a x } } \\beta _ { j } \\right) } \\\\ & { \\beta _ { k } = \\gamma \\cdot \\frac { n _ { k } } { \\frac { 1 } { c } \\sum _ { s = 1 } ^ { c } n _ { s } } + ( 1 - \\gamma ) . } \\end{array}\n$$",
618
+ "text_format": "latex",
619
+ "bbox": [
620
+ 514,
621
+ 502,
622
+ 730,
623
+ 571
624
+ ],
625
+ "page_idx": 4
626
+ },
627
+ {
628
+ "type": "text",
629
+ "text": "$T$ scales linearly with the class size, ensuring $\\beta _ { k } = 1 , T _ { k } = \\alpha$ for a balanced set. This simple adaptation allows us to find classifiers of enough complexity for the head and enough robustness for the tail: On one hand, we need strong classifiers to handle large sample variations within head classes; on the other hand, such classifiers are prone to overfit small training data within tail classes. We adapt the temperature only after the CNN network is trained for several epochs and the feature is stabilized, similar to the training scheme for deferred reweighting (Cao et al., 2019). ",
630
+ "bbox": [
631
+ 173,
632
+ 575,
633
+ 825,
634
+ 661
635
+ ],
636
+ "page_idx": 4
637
+ },
638
+ {
639
+ "type": "text",
640
+ "text": "Joint expert optimization. For our $n$ experts $\\theta _ { 1 }$ , . . . , $\\theta _ { n }$ with a shared backbone $\\theta$ , we optimize their individual classification losses ${ \\mathcal { L } } _ { \\mathrm { C l a s s i f y } } = { \\mathcal { L } }$ , any classification loss such as CE, LDAM, and focal loss) and their mutual distribution-aware divergency losses, weighted by hyperparameter $\\lambda$ : ",
641
+ "bbox": [
642
+ 173,
643
+ 666,
644
+ 825,
645
+ 709
646
+ ],
647
+ "page_idx": 4
648
+ },
649
+ {
650
+ "type": "equation",
651
+ "img_path": "images/27618f1031b0366f0aff1a10ff3bd9c301c3d00370b18cc77fe9ce00b98f15f3.jpg",
652
+ "text": "$$\n\\mathcal { L } _ { \\mathrm { T o t a l } } ( x , y ) = \\sum _ { i = 1 } ^ { n } \\left( \\mathcal { L } _ { \\mathrm { C l a s s i f y } } ( x , y ; \\theta _ { i } ) + \\lambda \\cdot \\mathcal { L } _ { \\mathrm { D - D i v e r s i f y } } ( x , y ; \\theta _ { i } ) \\right) .\n$$",
653
+ "text_format": "latex",
654
+ "bbox": [
655
+ 287,
656
+ 715,
657
+ 710,
658
+ 757
659
+ ],
660
+ "page_idx": 4
661
+ },
662
+ {
663
+ "type": "text",
664
+ "text": "Since these loss terms are completely symmetrical with respect to each other, the $n$ experts learned at Stage 1 are equally good and distinctive from each other. ",
665
+ "bbox": [
666
+ 173,
667
+ 763,
668
+ 823,
669
+ 792
670
+ ],
671
+ "page_idx": 4
672
+ },
673
+ {
674
+ "type": "text",
675
+ "text": "Routing diversified experts. To cut down the test-time computational cost that comes with multiple experts, we train a router at Stage 2 to deploy these (arbitrarily ordered) experts sequentially on an as-needed basis. Assume that the first $k$ experts have been deployed for instance $x$ . The router takes in the image feature and the mean logits from the first to the $k$ -th expert, and makes a binary decision $y _ { \\mathrm { o n } }$ on whether to deploy the $k + 1$ -th expert. If the $k$ -th expert wrongly classifies $x$ , but one of the rest $n - k$ experts correctly classifies $x$ , ideally the router should switch on, i.e., output $y _ { \\mathrm { o n } } = 1$ , and otherwise $y _ { \\mathrm { o n } } = 0$ . We construct a simple binary classifier with two fully connected layers to learn each router. Each of the $n - 1$ routers for $n$ experts has a shared component to reduce the feature dimensions and an individual component to make decisions. ",
676
+ "bbox": [
677
+ 173,
678
+ 797,
679
+ 825,
680
+ 924
681
+ ],
682
+ "page_idx": 4
683
+ },
684
+ {
685
+ "type": "text",
686
+ "text": "Specifically, we normalize the image feature $f _ { \\boldsymbol { \\theta } } ( \\boldsymbol { x } )$ (for training stability), reduce the feature dimension (to e.g. 16 in our experiments) by a fully connected layer $\\mathbf { W } _ { 1 }$ which is shared with all routers, followed by ReLU and flattening, concatenate with the top- $s$ ranked mean logits from the first to $k$ - th expert $\\textstyle { \\frac { 1 } { k } } \\sum _ { i = 1 } ^ { k } \\psi _ { \\theta _ { i } } ( f _ { \\theta } ( x ) )$ , project it to a scalar by $\\mathbf { W } _ { 2 } ^ { ( k ) }$ which is independent between routers, and finally apply Sigmoid function $\\begin{array} { r } { S ( x ) = \\frac { 1 } { 1 + e ^ { - x } } } \\end{array}$ to get a continuous activation value in [0,1]: ",
687
+ "bbox": [
688
+ 173,
689
+ 102,
690
+ 825,
691
+ 181
692
+ ],
693
+ "page_idx": 5
694
+ },
695
+ {
696
+ "type": "equation",
697
+ "img_path": "images/c9041762c812a29be0eeb2d2cd2b33a3d59b73dc23c100ef3e205aa756676fe5.jpg",
698
+ "text": "$$\n\\mathrm { r o u t e r \\ a c t i v a t i o n ; } \\ r ( x ) = S \\left( \\mathbf { W } _ { 2 } ^ { ( k ) } \\left[ \\begin{array} { c } { \\mathrm { f a t t e n } \\cdot \\mathrm { R e L U } \\left( \\mathbf { W } _ { 1 } \\frac { f _ { \\theta } ( x ) } { \\vert \\vert f _ { \\theta } ( x ) \\vert \\vert } \\right) } \\\\ { \\frac { 1 } { k } \\sum _ { i = 1 } ^ { k } \\psi _ { \\theta _ { k } } ( f _ { \\theta } ( x ) ) \\vert _ { \\mathrm { t o p } \\cdot s \\cdot \\mathrm { c o m p o n e n t s } } } \\end{array} \\right] \\right) .\n$$",
699
+ "text_format": "latex",
700
+ "bbox": [
701
+ 248,
702
+ 188,
703
+ 746,
704
+ 233
705
+ ],
706
+ "page_idx": 5
707
+ },
708
+ {
709
+ "type": "text",
710
+ "text": "The router has a negligible size and compute, where $s$ ranges from 30 for CIFAR100 to 50 for iNaturalist (8,142 classes). It is optimized with a weighted variant of binary CE loss: ",
711
+ "bbox": [
712
+ 173,
713
+ 238,
714
+ 823,
715
+ 267
716
+ ],
717
+ "page_idx": 5
718
+ },
719
+ {
720
+ "type": "equation",
721
+ "img_path": "images/25e29ddc6d40f26f304073bb72ce1bdba8efb9cdaa6b5dff5436ba071e4cec22.jpg",
722
+ "text": "$$\n\\mathcal { L } _ { \\mathrm { R o u t i n g } } ( r ( x ) , y _ { \\mathrm { o n } } ) = - \\omega _ { \\mathrm { o n } } y _ { \\mathrm { o n } } \\log \\left( r ( x ) \\right) - ( 1 - y _ { \\mathrm { o n } } ) \\log \\left( 1 - r ( x ) \\right)\n$$",
723
+ "text_format": "latex",
724
+ "bbox": [
725
+ 274,
726
+ 273,
727
+ 723,
728
+ 291
729
+ ],
730
+ "page_idx": 5
731
+ },
732
+ {
733
+ "type": "text",
734
+ "text": "where $\\omega _ { \\mathrm { o n } }$ controls the easiness to switch on the router. We find $\\omega _ { \\mathrm { o n } } = 1 0 0$ to be a good trade-off between classification accuracy and computational cost for all our experiments. At the test time, we simply threshold the activation with 0.5: If $r ( x ) < 0 . 5$ , the classifier makes the final decision with the current collective logits, otherwise it proceeds to the next expert. ",
735
+ "bbox": [
736
+ 173,
737
+ 297,
738
+ 825,
739
+ 354
740
+ ],
741
+ "page_idx": 5
742
+ },
743
+ {
744
+ "type": "text",
745
+ "text": "Optional self-distillation. While existing long-tail classifiers such as BBN Zhou et al. (2020) and LFME Xiang et al. (2020) have a fixed number of experts, our method could have an arbitrary number of experts to balance classification accuracy and computation cost. We can optionally apply self-distillation from a model with more (6 in our setting) experts to the same model with fewer experts for further performance gain $0 . 4 \\% \\sim 0 . 8 \\%$ for most experiments). We choose knowledge distillation (Hinton et al., 2015) by default. Implementation details and comparisons with various distillation algorithms such as CRD (Tian et al., 2019) are investigated in Appendix Section A.2. ",
746
+ "bbox": [
747
+ 173,
748
+ 359,
749
+ 825,
750
+ 458
751
+ ],
752
+ "page_idx": 5
753
+ },
754
+ {
755
+ "type": "text",
756
+ "text": "4 EXPERIMENTS ",
757
+ "text_level": 1,
758
+ "bbox": [
759
+ 176,
760
+ 478,
761
+ 326,
762
+ 494
763
+ ],
764
+ "page_idx": 5
765
+ },
766
+ {
767
+ "type": "text",
768
+ "text": "We experiment on major long-tailed recognition benchmarks and various backbone networks. ",
769
+ "bbox": [
770
+ 174,
771
+ 510,
772
+ 785,
773
+ 525
774
+ ],
775
+ "page_idx": 5
776
+ },
777
+ {
778
+ "type": "text",
779
+ "text": "1. CIFAR100-LT (Cao et al., 2019): CIFAR100 is sampled by class per an exponential decay across classes. We choose imbalance factor 100 and ResNet-32 (He et al., 2016) backbone. ",
780
+ "bbox": [
781
+ 174,
782
+ 536,
783
+ 823,
784
+ 564
785
+ ],
786
+ "page_idx": 5
787
+ },
788
+ {
789
+ "type": "text",
790
+ "text": "2. ImageNet-LT (Liu et al., 2019): Multiple backbone networks are experimented on ImageNetLT, including ResNet-10, ResNet-50 and ResNeXt-50 (Xie et al., 2017). All backbone networks are trained with a batch size of 256 on 8 RTX 2080Ti GPUs for 100 epochs using SGD with an initial learning rate of 0.1 decayed by 0.1 at 60 epochs and 80 epochs. See more details and results on other backbones in Appendix. ",
791
+ "bbox": [
792
+ 174,
793
+ 566,
794
+ 825,
795
+ 636
796
+ ],
797
+ "page_idx": 5
798
+ },
799
+ {
800
+ "type": "text",
801
+ "text": "3. iNaturalist 2018 (Van Horn et al., 2018): It is a naturally imbalanced fine-grained dataset with 8,142 categories. We use ResNet-50 as the backbone and apply the same training recipe as for ImageNet-LT except batch size 512, as in (Kang et al., 2020). ",
802
+ "bbox": [
803
+ 178,
804
+ 638,
805
+ 823,
806
+ 681
807
+ ],
808
+ "page_idx": 5
809
+ },
810
+ {
811
+ "type": "text",
812
+ "text": "CIFAR100-LT Results. Table 1 shows that RIDE outperforms SOTA by a large margin on CIFAR100-LT. The average computational cost is even about $10 \\%$ less than baseline models with two experts as in BBN. RIDE surpasses multi-expert methods, LFME (Xiang et al., 2020) and BBN (Zhou et al., 2020), by more than $5 . 3 \\%$ and $6 . 5 \\%$ respectively. ",
813
+ "bbox": [
814
+ 173,
815
+ 693,
816
+ 825,
817
+ 750
818
+ ],
819
+ "page_idx": 5
820
+ },
821
+ {
822
+ "type": "image",
823
+ "img_path": "images/93ea4d77db3384af3de52450596f2d525a817497ee8de8c71fb7fc30f3af19a8.jpg",
824
+ "image_caption": [
825
+ "Figure 3: RIDE is a universal framework that can be extended to various long-tail recognition methods and obtain a consistent top-1 accuracy increase. RIDE is experimented on CIFAR100- LT and applied to various training mechanisms. By using RIDE, cross-entropy loss (without any re-balancing strategies) can even outperforms previous SOTA method on CIFAR100-LT. Although higher accuracy can be obtained using distillation, we did not apply it here. "
826
+ ],
827
+ "image_footnote": [],
828
+ "bbox": [
829
+ 178,
830
+ 767,
831
+ 477,
832
+ 922
833
+ ],
834
+ "page_idx": 5
835
+ },
836
+ {
837
+ "type": "table",
838
+ "img_path": "images/df7986dba57577abeabffc08f5fc8623f0d47f24b0e4ace2df45d9f4c5e14044.jpg",
839
+ "table_caption": [
840
+ "Table 1: RIDE achieves the state-of-the-art results on CIFAR100-LT without sacrificing the performance of many-shot classes like all previous methods. Compared with BBN (Zhou et al., 2020) and LFME (Xiang et al., 2020), which also contain multiple experts (or branches), RIDE (2 experts) outperforms them by a large margin with fewer GFlops. The relative computation cost (averaged on testing set) with respect to the baseline model and absolute improvements against SOTA (colored in green) are reported. $\\dagger$ denotes our reproduced results with released code. $\\ddagger$ denotes results copied from (Cao et al., 2019) and the imbalance ratio is 100. "
841
+ ],
842
+ "table_footnote": [],
843
+ "table_body": "<table><tr><td rowspan=1 colspan=2>Methods</td><td rowspan=1 colspan=1>MFlops</td><td rowspan=1 colspan=1>All</td><td rowspan=1 colspan=4>Many</td><td rowspan=1 colspan=1>Med</td><td rowspan=1 colspan=1>Few</td></tr><tr><td rowspan=1 colspan=2>Cross Entropy (CE) tCross Entropy (CE) t</td><td rowspan=1 colspan=1>69.5 (1.0x)69.5 (1.0x)</td><td rowspan=1 colspan=1>38.339.1</td><td rowspan=1 colspan=4>166.1</td><td rowspan=1 colspan=1>-37.3</td><td rowspan=1 colspan=1>110.6</td></tr><tr><td rowspan=6 colspan=2>Focal Loss t (Lin et al., 2017)OLTR † (Liu et al., 2019)LDAM + DRW (Cao et al.,2019)LDAM + DRW + (Cao et al., 2019)BBN (Zhou et al., 2020)T-norm t (Kang et al., 2020)cRT + (Kang et al., 2020)M2m (Kim et al., 2020)LFME (Xiang et al., 2020)</td><td rowspan=6 colspan=1>69.5 (1.0x)69.5 (1.0x)69.5 (1.0x)74.3 (1.1x)69.5 (1.0x)69.5 (1.0x)11</td><td rowspan=5 colspan=1>38.441.242.042.042.643.243.343.5</td><td rowspan=2 colspan=4>161.8161.5</td><td rowspan=2 colspan=1>141.4-41.7</td><td rowspan=1 colspan=1>117.61</td></tr><tr><td rowspan=1 colspan=1>20.2</td></tr><tr><td rowspan=4 colspan=4>165.764.011</td><td rowspan=1 colspan=1>-43.6</td><td rowspan=4 colspan=1>■17.318.111</td></tr><tr><td rowspan=1 colspan=1>44.8</td></tr><tr><td rowspan=2 colspan=1>11</td></tr><tr><td rowspan=1 colspan=1>43.8</td><td rowspan=1 colspan=2>1</td></tr><tr><td rowspan=1 colspan=1>RIDE (2 experts)RIDE (3 experts)RIDE (4 experts)</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>64.8 (0.9x)77.8 (1.1x)91.9 (1.3x)</td><td rowspan=1 colspan=1>47.0 (+3.2)48.0 (+4.2)49.1 (+5.3)</td><td rowspan=1 colspan=3>67.9</td><td rowspan=1 colspan=2>67.968.169.3</td><td rowspan=1 colspan=1>48.449.249.3</td></tr></table>",
844
+ "bbox": [
845
+ 183,
846
+ 209,
847
+ 813,
848
+ 424
849
+ ],
850
+ "page_idx": 6
851
+ },
852
+ {
853
+ "type": "table",
854
+ "img_path": "images/84213c61afdf462e5fbdb1fceb3614a0fa3a0abe4212422587f9e6d114dc56c1.jpg",
855
+ "table_caption": [
856
+ "Table 2: RIDE achieves state-of-the-art results on ImageNet-LT (Liu et al., 2019) and obtains consistent performance improvements on various backbones. The top-1 accuracy and computational cost are compared with the state-of-the-art methods on ImageNet-LT, with ResNet-50 and ResNeXt50 as the backbone networks. Results marked with $\\dagger$ are copied from (Kang et al., 2020). Detailed results on each split are listed in appendix materials. "
857
+ ],
858
+ "table_footnote": [],
859
+ "table_body": "<table><tr><td rowspan=\"2\">Methods</td><td colspan=\"2\">ResNet-50</td><td colspan=\"2\">ResNeXt-50</td></tr><tr><td>GFlops</td><td>Acc. (%)</td><td>GFlops</td><td>Acc. (%)</td></tr><tr><td>Cross Entropy (CE) t</td><td>4.11 (1.0x)</td><td>41.6</td><td>4.26 (1.0x)</td><td>44.4</td></tr><tr><td>OLTR † (Liu et al., 2019)</td><td></td><td>、</td><td></td><td>46.3</td></tr><tr><td>NCM (Kang et al., 2020)</td><td>4.11 (1.0x)</td><td>44.3</td><td>4.26 (1.0x)</td><td>47.3</td></tr><tr><td>T-norm (Kang et al.,2020)</td><td>4.11 (1.0x)</td><td>46.7</td><td>4.26 (1.0x)</td><td>49.4</td></tr><tr><td>cRT (Kang et al., 2020)</td><td>4.11 (1.0x)</td><td>47.3</td><td>4.26 (1.0x)</td><td>49.6</td></tr><tr><td>LWS (Kang et al., 2020)</td><td>4.11 (1.0x)</td><td>47.7</td><td>4.26 (1.0x)</td><td>49.9</td></tr><tr><td>RIDE (2 experts)</td><td>3.71 (0.9x)</td><td>54.4 (+6.7)</td><td>3.92 (0.9x)</td><td>55.9 (+6.0)</td></tr><tr><td>RIDE (3 experts)</td><td>4.36 (1.1x)</td><td>54.9 (+7.2)</td><td>4.69 (1.1x)</td><td>56.4 (+6.5)</td></tr><tr><td>RIDE (4 experts)</td><td>5.15 (1.3x)</td><td>55.4 (+7.7)</td><td>5.19 (1.2x)</td><td>56.8 (+6.9)</td></tr></table>",
860
+ "bbox": [
861
+ 187,
862
+ 526,
863
+ 808,
864
+ 686
865
+ ],
866
+ "page_idx": 6
867
+ },
868
+ {
869
+ "type": "text",
870
+ "text": "RIDE as a universal framework. Fig. 3 shows that RIDE consistently benefits from better loss functions and training processes. Whether the model is trained end-to-end (focal loss, CE, LDAM) or in two stages (cRT, $\\tau$ -norm, cosine), RIDE delivers consistent accuracy gains. In particular, RIDE with a simple cosine classifier, which we constructed by normalizing the classifier weights and retraining them with a long-tail re-sampling strategy (similar to cRT), achieves on-par performance with the current SOTA methods. Fig. 3 also shows that two-stage methods are generally better than single-stage ones. Nevertheless, since they require an additional training stage, for simplicity, we use the single-stage LDAM as the default $\\mathcal { L } _ { \\mathrm { C l a s s i f y } }$ in RIDE throughout our remaining experiments. ",
871
+ "bbox": [
872
+ 173,
873
+ 699,
874
+ 825,
875
+ 813
876
+ ],
877
+ "page_idx": 6
878
+ },
879
+ {
880
+ "type": "text",
881
+ "text": "ImageNet-LT Results. Table 2 shows that RIDE outperforms SOTA, LWS and cRT, by more than $7 . 7 \\%$ with ResNet-50. ResNeXt-50 is based on group convolution (Xie et al., 2017), which divides all filters into several groups and aggregates information from multiple groups. ResNeXt-50 generally performs better than ResNet-50 on multiple tasks. It provides $6 . 9 \\%$ gain on ImageNet-LT. ",
882
+ "bbox": [
883
+ 174,
884
+ 818,
885
+ 825,
886
+ 875
887
+ ],
888
+ "page_idx": 6
889
+ },
890
+ {
891
+ "type": "text",
892
+ "text": "iNaturalist 2018 Results. Table 3 shows that RIDE outperforms current SOTA by $6 . 3 \\%$ . Surprisingly, RIDE obtains very similar results on many-shots, medium-shots and few-shots, ideal for long tailed recognition. Current SOTA method BBN also uses multiple experts; however, it significantly decreases the performance on many-shots by about $23 \\%$ . RIDE is remarkable at increasing the few-shot accuracy without reducing the many-shot accuracy. ",
893
+ "bbox": [
894
+ 174,
895
+ 881,
896
+ 823,
897
+ 924
898
+ ],
899
+ "page_idx": 6
900
+ },
901
+ {
902
+ "type": "table",
903
+ "img_path": "images/19c27112fd3b0a560438f8a2135d5c8c963afd8b2ceb57b3d23fd919f267269f.jpg",
904
+ "table_caption": [
905
+ "Table 3: RIDE outperforms previous state-of-the-art methods on challenging iNaturalist 2018 (Van Horn et al., 2018) dataset, which contains 8,142 classes, by a large margin. Relative improvements to SOTA result of each split (colored with gray) are also listed, with the largest boost from few-shot classes. Compared with previous SOTA method BBN, which also contains multiple “experts”, RIDE achieves more than $20 \\%$ higher top-1 accuracy on many-shot classes. Results marked with $\\dagger$ are from BBN (Zhou et al., 2020) and Decouple (Kang et al., 2020). BBN’s results are from the released checkpoint. "
906
+ ],
907
+ "table_footnote": [],
908
+ "table_body": "<table><tr><td>Methods</td><td>GFlops</td><td>All</td><td>Many</td><td>Medium</td><td>Few</td></tr><tr><td>CE+</td><td>4.14 (1.0x)</td><td>61.7</td><td>72.2</td><td>63.0</td><td>57.2</td></tr><tr><td>CB-Focal t</td><td>4.14 (1.0x)</td><td>61.1</td><td>1</td><td>1</td><td>1</td></tr><tr><td>OLTR</td><td>4.14 (1.0x)</td><td>63.9</td><td>59.0</td><td>64.1</td><td>64.9</td></tr><tr><td>LDAM + DRW †</td><td>4.14 (1.0x)</td><td>64.6</td><td>1</td><td>1</td><td>1</td></tr><tr><td>cRT</td><td>4.14 (1.0x)</td><td>65.2</td><td>69.0</td><td>66.0</td><td>63.2</td></tr><tr><td>T-norm</td><td>4.14 (1.0x)</td><td>65.6</td><td>65.6</td><td>65.3</td><td>65.9</td></tr><tr><td>LWS</td><td>4.14 (1.0x)</td><td>65.9</td><td>65.0</td><td>66.3</td><td>65.5</td></tr><tr><td>BBN</td><td>4.36 (1.1x)</td><td>66.3</td><td>49.4</td><td>70.8</td><td>65.3</td></tr><tr><td>RIDE (2 experts)</td><td>3.67 (0.9x)</td><td>71.4 4 (+5.1)</td><td>70.2 (+1.2)</td><td>71.3 (+0.5)</td><td>71.7 (+5.8)</td></tr><tr><td>RIDE (3 experts)</td><td>4.17 (1.0x)</td><td>72.2 (+5.9)</td><td>70.2 (+1.2)</td><td>72.2 (+1.4)</td><td>72.7 (+6.8)</td></tr><tr><td>RIDE (4 experts)</td><td>4.51 (1.1x)</td><td>72.6 (+6.3)</td><td>70.9 (+1.9)</td><td>72.4 (+1.6)</td><td>73.1 (+7.2)</td></tr></table>",
909
+ "bbox": [
910
+ 184,
911
+ 209,
912
+ 812,
913
+ 382
914
+ ],
915
+ "page_idx": 7
916
+ },
917
+ {
918
+ "type": "image",
919
+ "img_path": "images/b2b3787077638275c5a73098091370295779f41ab43823667b14776dbc013444.jpg",
920
+ "image_caption": [
921
+ "Figure 4: Compared to SOTAs, RIDE improves top-1 accuracy on all three splits (many-/med-/fewshot). The absolute accuracy differences of RIDE (blue) over iNaturalist’s current state-of-theart method BBN (Zhou et al., 2020) (left) and ImageNet-LT’s current state-of-the-art method cRT (Kang et al., 2020) (right) are shown. RIDE improves the performance of few- and medium-shots categories without sacrificing the accuracy on many-shots, and outperforms BBN on many-shots by a large margin. "
922
+ ],
923
+ "image_footnote": [],
924
+ "bbox": [
925
+ 186,
926
+ 409,
927
+ 823,
928
+ 525
929
+ ],
930
+ "page_idx": 7
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "",
935
+ "bbox": [
936
+ 173,
937
+ 651,
938
+ 823,
939
+ 680
940
+ ],
941
+ "page_idx": 7
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "Comparing with SOTAs on iNaturalist and ImageNet-LT. As illustrated in Fig. 4, our approach provides a comprehensive treatment to all the many-shot, medium-shot and few-shot classes, achieving substantial improvements to current state-of-the-art on all aspects. Compared with cRT which reduces the performance on the many-shot classes, RIDE can achieves significantly better performance on the few-shot classes without impairing the many-shot classes. Similar observations can be obtained in the comparison with the state-of-the-art method BBN (Zhou et al., 2020) on iNaturalist. ",
946
+ "bbox": [
947
+ 174,
948
+ 686,
949
+ 825,
950
+ 770
951
+ ],
952
+ "page_idx": 7
953
+ },
954
+ {
955
+ "type": "text",
956
+ "text": "Contribution of each component of RIDE. RIDE is jointly trained with $\\mathcal { L } _ { \\mathrm { D - D i v e r s i f y } }$ and $\\mathcal { L } _ { \\mathrm { C l a s s i f y } }$ , we use LDAM for $\\mathcal { L } _ { \\mathrm { C l a s s i f y } }$ by default. Table 4 shows that the architectural change from the original ResNet-32 to the RIDE variant with $2 \\sim 4$ experts contributes $2 . 7 \\% \\sim 4 . 3 \\%$ gain. Applying the individual classification loss instead of the collaborative loss brings $1 . 5 \\%$ gain. Adding the diversity loss further improves about $0 . 9 \\%$ . The computational cost is greatly reduced by adding the dynamic expert router. Knowledge distillation from RIDE with 6 experts obtains another $0 . 6 \\%$ gain. All these components deliver $7 . 1 \\%$ gain over baseline LDAM. ",
957
+ "bbox": [
958
+ 174,
959
+ 776,
960
+ 825,
961
+ 875
962
+ ],
963
+ "page_idx": 7
964
+ },
965
+ {
966
+ "type": "text",
967
+ "text": "Impact of the number of experts. Fig. 5 shows that whether in terms of relative or absolute gains, few-shots benefit more with more experts. For example, the relative gain is $16 \\%$ vs. $3 . 8 \\%$ for few-shots and many-shots respectively. No distillation is applied in this comparison. ",
968
+ "bbox": [
969
+ 176,
970
+ 882,
971
+ 823,
972
+ 924
973
+ ],
974
+ "page_idx": 7
975
+ },
976
+ {
977
+ "type": "text",
978
+ "text": "Table 4: Ablation studies on the effectiveness of each component on CIFAR100-LT. LDAM is used as our classification loss. The first 3 RIDE models only have architectural change without changes in training method. The performance without $\\mathcal { L } _ { \\mathrm { { I n d i v i d u a l } } }$ checked indicates directly applying classification loss onto the final model output, which is the mean expert logits. This is referred to as collaborative loss above. In contrast, if $\\mathcal { L } _ { \\mathrm { { I n d i v i d u a l } } }$ if checked, we apply individual loss to each individual expert. The difference between collaborative loss and individual loss is described above. By adding the router module, the computational cost of RIDE can be significantly reduced, while the accuracy degradation is negligible. Knowledge distillation step is optional if further improvements are desired. Various knowledge distillation techniques are compared in the appendix. ",
979
+ "bbox": [
980
+ 173,
981
+ 92,
982
+ 825,
983
+ 218
984
+ ],
985
+ "page_idx": 8
986
+ },
987
+ {
988
+ "type": "table",
989
+ "img_path": "images/2604146ecf077b01f67970cfdfd832e7fdf6971321e6c8935454f8549028f8bf.jpg",
990
+ "table_caption": [],
991
+ "table_footnote": [],
992
+ "table_body": "<table><tr><td>Methods</td><td>#expert</td><td>LIndividual</td><td>LD-Diversify</td><td>Router</td><td>distill</td><td>GFlops</td><td>Acc.(%)</td></tr><tr><td>LDAM+DRW</td><td>1</td><td></td><td></td><td></td><td></td><td></td><td>42.0</td></tr><tr><td rowspan=\"7\">RIDE</td><td>2</td><td></td><td></td><td></td><td></td><td>1.1x</td><td>44.7 (+2.7)</td></tr><tr><td>3</td><td></td><td></td><td></td><td></td><td>1.5x</td><td>46.1 (+4.1)</td></tr><tr><td>4</td><td></td><td></td><td></td><td></td><td>1.8x</td><td>46.3 (+4.3)</td></tr><tr><td>4</td><td></td><td></td><td></td><td></td><td>1.8x</td><td>47.8 (+5.8)</td></tr><tr><td>4</td><td>&lt;</td><td>√</td><td></td><td></td><td>1.8x</td><td>48.7 (+6.7)</td></tr><tr><td>4</td><td>√</td><td>√</td><td></td><td>1</td><td>1.8x</td><td>49.3 (+7.3)</td></tr><tr><td>4</td><td>√</td><td>&lt;</td><td>√</td><td></td><td>1.3x</td><td>49.1 (+7.1)</td></tr></table>",
993
+ "bbox": [
994
+ 179,
995
+ 227,
996
+ 818,
997
+ 357
998
+ ],
999
+ "page_idx": 8
1000
+ },
1001
+ {
1002
+ "type": "image",
1003
+ "img_path": "images/8cf6029a1e2ab72917f85036752a1e85a7545e1164698474f0fb18f990efe206.jpg",
1004
+ "image_caption": [
1005
+ "Figure 5: # experts vs. top-1 accuracy for each split (All, Many/Medium/Few) of CIFAR100- LT. Compared with the many-shot split, which is $3 . 8 \\%$ relatively improved by adding more experts, the few-shot split can get more benefits, that is, a relative improvement of $1 6 . 1 \\%$ . "
1006
+ ],
1007
+ "image_footnote": [],
1008
+ "bbox": [
1009
+ 179,
1010
+ 386,
1011
+ 482,
1012
+ 547
1013
+ ],
1014
+ "page_idx": 8
1015
+ },
1016
+ {
1017
+ "type": "image",
1018
+ "img_path": "images/1631bd4dd73a9a43fc47a06387029dba617d11f1c20c50069ba839f092929c00.jpg",
1019
+ "image_caption": [
1020
+ "Figure 6: The proportion of the number of experts allocated to each split of CIFAR100-LT. For RIDE with 3 or 4 experts, more than half of many-shot instances only require one expert. On the contrary, more than $76 \\%$ samples of few-shot classes require opinions from additional experts. "
1021
+ ],
1022
+ "image_footnote": [],
1023
+ "bbox": [
1024
+ 504,
1025
+ 383,
1026
+ 823,
1027
+ 547
1028
+ ],
1029
+ "page_idx": 8
1030
+ },
1031
+ {
1032
+ "type": "text",
1033
+ "text": "The number of experts allocated to each split. Fig. 6 shows that instances in few-shots need more experts whereas most instances in many-shots just need the first expert. That is, low confidence in tail instances often requires the model to seek a second (or a third, ...) opinion. ",
1034
+ "bbox": [
1035
+ 176,
1036
+ 671,
1037
+ 825,
1038
+ 713
1039
+ ],
1040
+ "page_idx": 8
1041
+ },
1042
+ {
1043
+ "type": "text",
1044
+ "text": "5 SUMMARY ",
1045
+ "text_level": 1,
1046
+ "bbox": [
1047
+ 174,
1048
+ 741,
1049
+ 294,
1050
+ 757
1051
+ ],
1052
+ "page_idx": 8
1053
+ },
1054
+ {
1055
+ "type": "text",
1056
+ "text": "We take a dynamic view of training data and study long-tailed recognition with model bias and variance analysis. Existing long-tail classifiers do not reduce head-tail model bias gap enough while increasing model variance across all the classes. We propose a novel multi-expert model called RIDE to reduce model biases and variances throughout. It trains partially shared diverse distributionaware experts and routes an instance to additional experts when necessary, with computational costs comparable to a single expert. RIDE outperforms SOTA by a large margin. It is also a universal framework that works with various backbones and training schemes for consistent gains. ",
1057
+ "bbox": [
1058
+ 174,
1059
+ 776,
1060
+ 825,
1061
+ 875
1062
+ ],
1063
+ "page_idx": 8
1064
+ },
1065
+ {
1066
+ "type": "text",
1067
+ "text": "Acknowledgments. This work was supported, in part, by Berkeley Deep Drive, US Government fund through Etegent Technologies on Low-Shot Detection and Semi-supervised Detection, and NTU NAP and A\\*STAR via Industry Alignment Fund: Industry Collaboration Projects Grant. ",
1068
+ "bbox": [
1069
+ 176,
1070
+ 882,
1071
+ 823,
1072
+ 924
1073
+ ],
1074
+ "page_idx": 8
1075
+ },
1076
+ {
1077
+ "type": "text",
1078
+ "text": "REFERENCES ",
1079
+ "text_level": 1,
1080
+ "bbox": [
1081
+ 174,
1082
+ 102,
1083
+ 287,
1084
+ 118
1085
+ ],
1086
+ "page_idx": 9
1087
+ },
1088
+ {
1089
+ "type": "text",
1090
+ "text": "Luca Bertinetto, Joao F Henriques, Jack Valmadre, Philip Torr, and Andrea Vedaldi. Learning feed- ˜ forward one-shot learners. In NeurIPS, 2016. ",
1091
+ "bbox": [
1092
+ 171,
1093
+ 126,
1094
+ 823,
1095
+ 155
1096
+ ],
1097
+ "page_idx": 9
1098
+ },
1099
+ {
1100
+ "type": "text",
1101
+ "text": "Kaidi Cao, Colin Wei, Adrien Gaidon, Nikos Arechiga, and Tengyu Ma. Learning imbalanced datasets with label-distribution-aware margin loss. In Advances in Neural Information Processing Systems, pp. 1567–1578, 2019. ",
1102
+ "bbox": [
1103
+ 174,
1104
+ 165,
1105
+ 823,
1106
+ 208
1107
+ ],
1108
+ "page_idx": 9
1109
+ },
1110
+ {
1111
+ "type": "text",
1112
+ "text": "Zitian Chen, Yanwei Fu, Yu-Xiong Wang, Lin Ma, Wei Liu, and Martial Hebert. Image deformation meta-networks for one-shot learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8680–8689, 2019. ",
1113
+ "bbox": [
1114
+ 173,
1115
+ 218,
1116
+ 821,
1117
+ 262
1118
+ ],
1119
+ "page_idx": 9
1120
+ },
1121
+ {
1122
+ "type": "text",
1123
+ "text": "Peng Chu, Xiao Bian, Shaopeng Liu, and Haibin Ling. Feature space augmentation for long-tailed data. arXiv preprint arXiv:2008.03673, 2020. ",
1124
+ "bbox": [
1125
+ 171,
1126
+ 271,
1127
+ 823,
1128
+ 301
1129
+ ],
1130
+ "page_idx": 9
1131
+ },
1132
+ {
1133
+ "type": "text",
1134
+ "text": "Yin Cui, Menglin Jia, Tsung-Yi Lin, Yang Song, and Serge Belongie. Class-balanced loss based on effective number of samples. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9268–9277, 2019. ",
1135
+ "bbox": [
1136
+ 173,
1137
+ 310,
1138
+ 825,
1139
+ 354
1140
+ ],
1141
+ "page_idx": 9
1142
+ },
1143
+ {
1144
+ "type": "text",
1145
+ "text": "Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 248–255, 2009. ",
1146
+ "bbox": [
1147
+ 173,
1148
+ 363,
1149
+ 825,
1150
+ 407
1151
+ ],
1152
+ "page_idx": 9
1153
+ },
1154
+ {
1155
+ "type": "text",
1156
+ "text": "Pedro Domingos. A unified bias-variance decomposition. In Proceedings of 17th International Conference on Machine Learning, pp. 231–238, 2000. ",
1157
+ "bbox": [
1158
+ 171,
1159
+ 417,
1160
+ 823,
1161
+ 446
1162
+ ],
1163
+ "page_idx": 9
1164
+ },
1165
+ {
1166
+ "type": "text",
1167
+ "text": "Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. arXiv preprint arXiv:1703.03400, 2017. ",
1168
+ "bbox": [
1169
+ 171,
1170
+ 457,
1171
+ 823,
1172
+ 486
1173
+ ],
1174
+ "page_idx": 9
1175
+ },
1176
+ {
1177
+ "type": "text",
1178
+ "text": "Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1735–1742, 2006. ",
1179
+ "bbox": [
1180
+ 173,
1181
+ 496,
1182
+ 825,
1183
+ 540
1184
+ ],
1185
+ "page_idx": 9
1186
+ },
1187
+ {
1188
+ "type": "text",
1189
+ "text": "Bharath Hariharan and Ross Girshick. Low-shot visual recognition by shrinking and hallucinating features. In Proceedings of the IEEE International Conference on Computer Vision, pp. 3018– 3027, 2017. ",
1190
+ "bbox": [
1191
+ 173,
1192
+ 549,
1193
+ 823,
1194
+ 593
1195
+ ],
1196
+ "page_idx": 9
1197
+ },
1198
+ {
1199
+ "type": "text",
1200
+ "text": "Haibo He and Edwardo A Garcia. Learning from imbalanced data. IEEE Transactions on knowledge and data engineering, 21(9):1263–1284, 2009. ",
1201
+ "bbox": [
1202
+ 169,
1203
+ 603,
1204
+ 823,
1205
+ 632
1206
+ ],
1207
+ "page_idx": 9
1208
+ },
1209
+ {
1210
+ "type": "text",
1211
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 770–778, 2016. ",
1212
+ "bbox": [
1213
+ 173,
1214
+ 642,
1215
+ 823,
1216
+ 685
1217
+ ],
1218
+ "page_idx": 9
1219
+ },
1220
+ {
1221
+ "type": "text",
1222
+ "text": "Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. ",
1223
+ "bbox": [
1224
+ 173,
1225
+ 695,
1226
+ 823,
1227
+ 724
1228
+ ],
1229
+ "page_idx": 9
1230
+ },
1231
+ {
1232
+ "type": "text",
1233
+ "text": "Muhammad Abdullah Jamal, Matthew Brown, Ming-Hsuan Yang, Liqiang Wang, and Boqing Gong. Rethinking class-balanced methods for long-tailed visual recognition from a domain adaptation perspective. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7610–7619, 2020. ",
1234
+ "bbox": [
1235
+ 173,
1236
+ 734,
1237
+ 825,
1238
+ 791
1239
+ ],
1240
+ "page_idx": 9
1241
+ },
1242
+ {
1243
+ "type": "text",
1244
+ "text": "Bingyi Kang, Saining Xie, Marcus Rohrbach, Zhicheng Yan, Albert Gordo, Jiashi Feng, and Yannis Kalantidis. Learning imbalanced datasets with label-distribution-aware margin loss. In International Conference on Learning Representations, pp. 1567–1578, 2020. ",
1245
+ "bbox": [
1246
+ 173,
1247
+ 801,
1248
+ 823,
1249
+ 845
1250
+ ],
1251
+ "page_idx": 9
1252
+ },
1253
+ {
1254
+ "type": "text",
1255
+ "text": "Jaehyung Kim, Jongheon Jeong, and Jinwoo Shin. M2m: Imbalanced classification via major-tominor translation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13896–13905, 2020. ",
1256
+ "bbox": [
1257
+ 174,
1258
+ 856,
1259
+ 821,
1260
+ 898
1261
+ ],
1262
+ "page_idx": 9
1263
+ },
1264
+ {
1265
+ "type": "text",
1266
+ "text": "Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, 2009. ",
1267
+ "bbox": [
1268
+ 169,
1269
+ 909,
1270
+ 803,
1271
+ 924
1272
+ ],
1273
+ "page_idx": 9
1274
+ },
1275
+ {
1276
+ "type": "text",
1277
+ "text": "Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollar. Focal loss for dense ´ object detection. In Proceedings of the IEEE international conference on computer vision, pp. 2980–2988, 2017. ",
1278
+ "bbox": [
1279
+ 173,
1280
+ 103,
1281
+ 823,
1282
+ 146
1283
+ ],
1284
+ "page_idx": 10
1285
+ },
1286
+ {
1287
+ "type": "text",
1288
+ "text": "Bo Liu, Xudong Wang, Mandar Dixit, Roland Kwitt, and Nuno Vasconcelos. Feature space transfer for data augmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 9090–9098, 2018. ",
1289
+ "bbox": [
1290
+ 176,
1291
+ 155,
1292
+ 823,
1293
+ 198
1294
+ ],
1295
+ "page_idx": 10
1296
+ },
1297
+ {
1298
+ "type": "text",
1299
+ "text": "Jialun Liu, Yifan Sun, Chuchu Han, Zhaopeng Dou, and Wenhui Li. Deep representation learning on long-tailed data: A learnable embedding augmentation perspective. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2970–2979, 2020. ",
1300
+ "bbox": [
1301
+ 174,
1302
+ 207,
1303
+ 823,
1304
+ 251
1305
+ ],
1306
+ "page_idx": 10
1307
+ },
1308
+ {
1309
+ "type": "text",
1310
+ "text": "Ziwei Liu, Zhongqi Miao, Xiaohang Zhan, Jiayun Wang, Boqing Gong, and Stella X Yu. Largescale long-tailed recognition in an open world. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2537–2546, 2019. ",
1311
+ "bbox": [
1312
+ 176,
1313
+ 260,
1314
+ 823,
1315
+ 303
1316
+ ],
1317
+ "page_idx": 10
1318
+ },
1319
+ {
1320
+ "type": "text",
1321
+ "text": "Hyun Oh Song, Yu Xiang, Stefanie Jegelka, and Silvio Savarese. Deep metric learning via lifted structured feature embedding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4004–4012, 2016. ",
1322
+ "bbox": [
1323
+ 173,
1324
+ 311,
1325
+ 825,
1326
+ 356
1327
+ ],
1328
+ "page_idx": 10
1329
+ },
1330
+ {
1331
+ "type": "text",
1332
+ "text": "Nikolaos Passalis and Anastasios Tefas. Learning deep representations with probabilistic knowledge transfer. In Proceedings of the European Conference on Computer Vision, pp. 268–284, 2018. ",
1333
+ "bbox": [
1334
+ 173,
1335
+ 364,
1336
+ 823,
1337
+ 395
1338
+ ],
1339
+ "page_idx": 10
1340
+ },
1341
+ {
1342
+ "type": "text",
1343
+ "text": "Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. In ICLR, 2017. ",
1344
+ "bbox": [
1345
+ 171,
1346
+ 402,
1347
+ 816,
1348
+ 419
1349
+ ],
1350
+ "page_idx": 10
1351
+ },
1352
+ {
1353
+ "type": "text",
1354
+ "text": "Adam Santoro, Sergey Bartunov, Matthew Botvinick, Daan Wierstra, and Timothy Lillicrap. Metalearning with memory-augmented neural networks. In ICML, 2016. ",
1355
+ "bbox": [
1356
+ 171,
1357
+ 428,
1358
+ 821,
1359
+ 457
1360
+ ],
1361
+ "page_idx": 10
1362
+ },
1363
+ {
1364
+ "type": "text",
1365
+ "text": "Eli Schwartz, Leonid Karlinsky, Joseph Shtok, Sivan Harary, Mattias Marder, Rogerio Feris, Abhishek Kumar, Raja Giryes, and Alex M Bronstein. Delta-encoder: an effective sample synthesis method for few-shot object recognition. arXiv preprint arXiv:1806.04734, 2018. ",
1366
+ "bbox": [
1367
+ 176,
1368
+ 465,
1369
+ 821,
1370
+ 510
1371
+ ],
1372
+ "page_idx": 10
1373
+ },
1374
+ {
1375
+ "type": "text",
1376
+ "text": "Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In NeurIPS, 2017. ",
1377
+ "bbox": [
1378
+ 171,
1379
+ 517,
1380
+ 823,
1381
+ 547
1382
+ ],
1383
+ "page_idx": 10
1384
+ },
1385
+ {
1386
+ "type": "text",
1387
+ "text": "Jingru Tan, Changbao Wang, Buyu Li, Quanquan Li, Wanli Ouyang, Changqing Yin, and Junjie Yan. Equalization loss for long-tailed object recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11662–11671, 2020. ",
1388
+ "bbox": [
1389
+ 173,
1390
+ 556,
1391
+ 821,
1392
+ 601
1393
+ ],
1394
+ "page_idx": 10
1395
+ },
1396
+ {
1397
+ "type": "text",
1398
+ "text": "Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive representation distillation. In International Conference on Learning Representations, 2019. ",
1399
+ "bbox": [
1400
+ 173,
1401
+ 608,
1402
+ 820,
1403
+ 638
1404
+ ],
1405
+ "page_idx": 10
1406
+ },
1407
+ {
1408
+ "type": "text",
1409
+ "text": "Frederick Tung and Greg Mori. Similarity-preserving knowledge distillation. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1365–1374, 2019. ",
1410
+ "bbox": [
1411
+ 173,
1412
+ 647,
1413
+ 823,
1414
+ 678
1415
+ ],
1416
+ "page_idx": 10
1417
+ },
1418
+ {
1419
+ "type": "text",
1420
+ "text": "Grant Van Horn, Oisin Mac Aodha, Yang Song, Yin Cui, Chen Sun, Alex Shepard, Hartwig Adam, Pietro Perona, and Serge Belongie. The iNaturalist species classification and detection dataset. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8769–8778, 2018. ",
1421
+ "bbox": [
1422
+ 173,
1423
+ 685,
1424
+ 825,
1425
+ 742
1426
+ ],
1427
+ "page_idx": 10
1428
+ },
1429
+ {
1430
+ "type": "text",
1431
+ "text": "Oriol Vinyals, Charles Blundell, Tim Lillicrap, and Daan Wierstra. Matching networks for one shot learning. In NeurIPS, 2016. ",
1432
+ "bbox": [
1433
+ 169,
1434
+ 751,
1435
+ 825,
1436
+ 781
1437
+ ],
1438
+ "page_idx": 10
1439
+ },
1440
+ {
1441
+ "type": "text",
1442
+ "text": "Yu-Xiong Wang, Deva Ramanan, and Martial Hebert. Learning to model the tail. In Advances in Neural Information Processing Systems, pp. 7029–7039, 2017. ",
1443
+ "bbox": [
1444
+ 171,
1445
+ 790,
1446
+ 823,
1447
+ 820
1448
+ ],
1449
+ "page_idx": 10
1450
+ },
1451
+ {
1452
+ "type": "text",
1453
+ "text": "Yu-Xiong Wang, Ross Girshick, Martial Hebert, and Bharath Hariharan. Low-shot learning from imaginary data. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 7278–7286, 2018. ",
1454
+ "bbox": [
1455
+ 174,
1456
+ 829,
1457
+ 823,
1458
+ 872
1459
+ ],
1460
+ "page_idx": 10
1461
+ },
1462
+ {
1463
+ "type": "text",
1464
+ "text": "Tong Wu, Qingqiu Huang, Ziwei Liu, Yu Wang, and Dahua Lin. Distribution-balanced loss for multi-label classification in long-tailed datasets. In Proceedings of the European Conference on Computer Vision, pp. 162–178. Springer, 2020. ",
1465
+ "bbox": [
1466
+ 174,
1467
+ 881,
1468
+ 825,
1469
+ 924
1470
+ ],
1471
+ "page_idx": 10
1472
+ },
1473
+ {
1474
+ "type": "text",
1475
+ "text": "Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via nonparametric instance discrimination. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 3733–3742, 2018. ",
1476
+ "bbox": [
1477
+ 176,
1478
+ 103,
1479
+ 821,
1480
+ 146
1481
+ ],
1482
+ "page_idx": 11
1483
+ },
1484
+ {
1485
+ "type": "text",
1486
+ "text": "Liuyu Xiang, Guiguang Ding, and Jungong Han. Learning from multiple experts: Self-paced knowledge distillation for long-tailed classification. In Proceedings of the European Conference on Computer Vision, pp. 247–263. Springer, 2020. ",
1487
+ "bbox": [
1488
+ 176,
1489
+ 155,
1490
+ 820,
1491
+ 198
1492
+ ],
1493
+ "page_idx": 11
1494
+ },
1495
+ {
1496
+ "type": "text",
1497
+ "text": "Saining Xie, Ross Girshick, Piotr Dollar, Zhuowen Tu, and Kaiming He. Aggregated residual trans-´ formations for deep neural networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1492–1500, 2017. ",
1498
+ "bbox": [
1499
+ 174,
1500
+ 207,
1501
+ 821,
1502
+ 250
1503
+ ],
1504
+ "page_idx": 11
1505
+ },
1506
+ {
1507
+ "type": "text",
1508
+ "text": "Flood Sung Yongxin Yang, Li Zhang, Tao Xiang, Philip HS Torr, and Timothy M Hospedales. Learning to compare: Relation network for few-shot learning. In CVPR, 2018. ",
1509
+ "bbox": [
1510
+ 173,
1511
+ 257,
1512
+ 818,
1513
+ 286
1514
+ ],
1515
+ "page_idx": 11
1516
+ },
1517
+ {
1518
+ "type": "text",
1519
+ "text": "Hongguang Zhang, Jing Zhang, and Piotr Koniusz. Few-shot learning via saliency-guided hallucination of samples. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2770–2779, 2019. ",
1520
+ "bbox": [
1521
+ 174,
1522
+ 295,
1523
+ 825,
1524
+ 338
1525
+ ],
1526
+ "page_idx": 11
1527
+ },
1528
+ {
1529
+ "type": "text",
1530
+ "text": "Xiao Zhang, Zhiyuan Fang, Yandong Wen, Zhifeng Li, and Yu Qiao. Range loss for deep face recognition with long-tailed training data. In Proceedings of the IEEE International Conference on Computer Vision, pp. 5409–5418, 2017. ",
1531
+ "bbox": [
1532
+ 174,
1533
+ 347,
1534
+ 825,
1535
+ 390
1536
+ ],
1537
+ "page_idx": 11
1538
+ },
1539
+ {
1540
+ "type": "text",
1541
+ "text": "Boyan Zhou, Quan Cui, Xiu-Shen Wei, and Zhao-Min Chen. BBN: Bilateral-branch network with cumulative learning for long-tailed visual recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9719–9728, 2020. ",
1542
+ "bbox": [
1543
+ 173,
1544
+ 398,
1545
+ 825,
1546
+ 441
1547
+ ],
1548
+ "page_idx": 11
1549
+ },
1550
+ {
1551
+ "type": "text",
1552
+ "text": "Linchao Zhu and Yi Yang. Inflated episodic memory with region self-attention for long-tailed visual recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4344–4353, 2020. ",
1553
+ "bbox": [
1554
+ 176,
1555
+ 450,
1556
+ 821,
1557
+ 493
1558
+ ],
1559
+ "page_idx": 11
1560
+ },
1561
+ {
1562
+ "type": "text",
1563
+ "text": "A APPENDIX ",
1564
+ "text_level": 1,
1565
+ "bbox": [
1566
+ 176,
1567
+ 102,
1568
+ 297,
1569
+ 117
1570
+ ],
1571
+ "page_idx": 12
1572
+ },
1573
+ {
1574
+ "type": "text",
1575
+ "text": "A.1 DATASETS AND IMPLEMENTATIONS ",
1576
+ "text_level": 1,
1577
+ "bbox": [
1578
+ 176,
1579
+ 133,
1580
+ 462,
1581
+ 148
1582
+ ],
1583
+ "page_idx": 12
1584
+ },
1585
+ {
1586
+ "type": "text",
1587
+ "text": "We conduct experiments on three major long-tailed recognition benchmarks and different backbone networks to prove the effectiveness and universality of RIDE: ",
1588
+ "bbox": [
1589
+ 174,
1590
+ 160,
1591
+ 823,
1592
+ 188
1593
+ ],
1594
+ "page_idx": 12
1595
+ },
1596
+ {
1597
+ "type": "text",
1598
+ "text": "1.CIFAR100-LT (Krizhevsky, 2009; Cao et al., 2019): The original version of CIFAR-100 contains 50,000 images on training set and 10,000 images on validation set with 100 categories. The long-tailed version of CIFAR-100 follows an exponential decay in sample sizes across different categories. We conduct experiment on CIFAR100-LT with an imbalance factor of 100, i.e. the ratio between the most frequent class and the least frequent class. ",
1599
+ "bbox": [
1600
+ 174,
1601
+ 200,
1602
+ 825,
1603
+ 270
1604
+ ],
1605
+ "page_idx": 12
1606
+ },
1607
+ {
1608
+ "type": "text",
1609
+ "text": "To make fair comparison with previous works, we follow the training recipe of (Cao et al., 2019) on CIFAR100-LT. We train the ResNet-32 (He et al., 2016) backbone network by SGD optimizer with a momentum of 0.9. CIFAR100-LT is trained for 200 epochs with standard data augmentations (He et al., 2016) and a batch size of 128 on one RTX 2080Ti GPU. The learning rate is initialized as 0.1 and decayed by 0.01 at epoch 120 and 160 respectively. ",
1610
+ "bbox": [
1611
+ 174,
1612
+ 272,
1613
+ 823,
1614
+ 342
1615
+ ],
1616
+ "page_idx": 12
1617
+ },
1618
+ {
1619
+ "type": "text",
1620
+ "text": "2.ImageNet-LT (Deng et al., 2009; Liu et al., 2019): ImageNet-LT is constructed by sampling a subset of ImageNet-2012 following the Pareto distribution with the power value $\\alpha = 6$ (Liu et al., 2019). ImageNet-LT consists of $1 1 5 . 8 \\mathrm { k }$ images from 1,000 categories, with the largest and smallest categories containing 1,280 and 5 images, respectively. ",
1621
+ "bbox": [
1622
+ 174,
1623
+ 347,
1624
+ 825,
1625
+ 404
1626
+ ],
1627
+ "page_idx": 12
1628
+ },
1629
+ {
1630
+ "type": "text",
1631
+ "text": "Multiple backbone networks are experimented on ImageNet-LT, including ResNet-10, ResNet-50 and ResNeXt-50 (Xie et al., 2017). All backbone networks are trained with a batch size of 256 on 8 RTX 2080Ti GPUs for 100 epochs using SGD with an initial learning rate of 0.1 decayed by 0.1 at 60 epochs and 80 epochs. We utilize standard data augmentations as in (He et al., 2016). ",
1632
+ "bbox": [
1633
+ 174,
1634
+ 405,
1635
+ 825,
1636
+ 462
1637
+ ],
1638
+ "page_idx": 12
1639
+ },
1640
+ {
1641
+ "type": "text",
1642
+ "text": "3.iNaturalist (Van Horn et al., 2018): The iNaturalist-2018 dataset is an imbalanced datasets with 437,513 training images from 8,142 classes with a balanced test set of 24,426 images. We use ResNet-50 as the backbone network and apply the same training recipe as ImageNet-LT, except that we use a batch size of 512. ",
1643
+ "bbox": [
1644
+ 174,
1645
+ 465,
1646
+ 825,
1647
+ 522
1648
+ ],
1649
+ "page_idx": 12
1650
+ },
1651
+ {
1652
+ "type": "text",
1653
+ "text": "A.2 ADDITIONAL EXPERIMENTS ",
1654
+ "text_level": 1,
1655
+ "bbox": [
1656
+ 176,
1657
+ 540,
1658
+ 413,
1659
+ 554
1660
+ ],
1661
+ "page_idx": 12
1662
+ },
1663
+ {
1664
+ "type": "text",
1665
+ "text": "Ablation study on distillation methods. Self-distillation step is optional but recommended if further improvements $( 0 . 4 \\% \\sim 0 . 8 \\%$ for most experiments) are desired. We apply distillation from a more powerful model with more experts into a model with fewer experts. A simple way to transfer knowledge is knowledge distillation (KD) (Hinton et al., 2015), which applies KD loss $( \\mathcal { L } _ { \\mathrm { K D } } = T ^ { 2 } D _ { \\mathrm { K L } } ( \\tilde { \\vec { l } _ { \\mathrm { t e a c h e r } } } / T , \\vec { l } _ { \\mathrm { e x p e r t } _ { i } } / T ) )$ to match the distribution of logits of a teacher and a student. We found that for teacher model with more experts using smaller distillation loss factor gives better performance. We hypothesize that since we distill from the same teachers, giving large distillation factor prevents the branches from becoming as diversified as it is able to. We also explored other distillation methods, such as CRD (Tian et al., 2019), PKT (Passalis & Tefas, 2018), and SP (Tung & Mori, 2019), and compared the differences in Table 5. Although adding other methods along with KD may boost performance, the difference is small. Therefore, we opt for simplicity and use KD only unless otherwise noticed. ",
1666
+ "bbox": [
1667
+ 173,
1668
+ 565,
1669
+ 825,
1670
+ 734
1671
+ ],
1672
+ "page_idx": 12
1673
+ },
1674
+ {
1675
+ "type": "text",
1676
+ "text": "Detailed results for ImageNet-LT experiments. We list details of our ResNet-50 experiments in ImageNet-LT on Table 7. With 2 experts, we are able to achieve about $7 \\%$ gain in accuracy with computational cost about $10 \\%$ less than baseline. In contrast to previous methods that sacrifice many-shot accuracy to get few-shot accuracy, we improve on all three splits on ImageNet-LT. From 3 experts to 4 experts, we keep the same many-shot accuracy while increasing the few-shot accuracy, indicating that we are using the additional computational power to improve on the hardest part of the data rather than uniformly applying to all samples. ",
1677
+ "bbox": [
1678
+ 174,
1679
+ 742,
1680
+ 825,
1681
+ 840
1682
+ ],
1683
+ "page_idx": 12
1684
+ },
1685
+ {
1686
+ "type": "text",
1687
+ "text": "We also list our ResNet-10 and ResNeXt-50 experiments on Table 6 and 8, respectively, to compare against other works evaluated on these backbones. Our method also achieves lower computational cost and higher performance when compared to other methods. ",
1688
+ "bbox": [
1689
+ 174,
1690
+ 847,
1691
+ 823,
1692
+ 888
1693
+ ],
1694
+ "page_idx": 12
1695
+ },
1696
+ {
1697
+ "type": "text",
1698
+ "text": "Comparison with ensemble method. Since our method requires the joint decision from several experts, which raw ensembles also do, we also compare against ensembles of LDAM in Fig.7 on ",
1699
+ "bbox": [
1700
+ 174,
1701
+ 895,
1702
+ 821,
1703
+ 924
1704
+ ],
1705
+ "page_idx": 12
1706
+ },
1707
+ {
1708
+ "type": "text",
1709
+ "text": "Table 5: Comparison of different distillation methods. We transfer from a model based on ResNet-32 with 6 experts to a model of the same type, except with fewer experts. We use CIFAR100- LT for the following comparison. No expert assignment module is used in the following experiments. Following the procedure for CRD (Tian et al., 2019), we also apply KD when we transfer from a teacher to students with other distillation methods. ",
1710
+ "bbox": [
1711
+ 173,
1712
+ 101,
1713
+ 825,
1714
+ 170
1715
+ ],
1716
+ "page_idx": 13
1717
+ },
1718
+ {
1719
+ "type": "table",
1720
+ "img_path": "images/67c24892b146eae20888ff65f6fe77f98cba76c3d2300f11ad54c6105dfa0786.jpg",
1721
+ "table_caption": [
1722
+ "RIDE and Ensembles of LDAM "
1723
+ ],
1724
+ "table_footnote": [],
1725
+ "table_body": "<table><tr><td>Model Type</td><td>#expert</td><td>DistillationMethod</td><td>Accuracy (%)</td></tr><tr><td>Teacher</td><td>6</td><td></td><td>49.7</td></tr><tr><td rowspan=\"10\">Student</td><td>2</td><td>No Distillation</td><td>46.6</td></tr><tr><td>2</td><td>KD (Hinton et al., 2015)</td><td>47.3</td></tr><tr><td>2</td><td>CRD (Tian et al., 2019)</td><td>47.5</td></tr><tr><td>2</td><td>PKT (Passalis &amp; Tefas,2018)</td><td>47.2</td></tr><tr><td>2</td><td>SP(Tung&amp;Mori,2019)</td><td>47.2</td></tr><tr><td>3 3</td><td>No Distillation</td><td>47.9</td></tr><tr><td></td><td>KD (Hinton et al., 2015)</td><td>48.4</td></tr><tr><td>3</td><td>CRD (Tian et al., 2019)</td><td>48.5</td></tr><tr><td>3</td><td>PKT (Passalis &amp; Tefas,2018)</td><td>48.3</td></tr><tr><td>3 4</td><td>SP(Tung&amp; Mori,2019)</td><td>48.7</td></tr><tr><td></td><td>No Distillation</td><td></td><td>48.7</td></tr><tr><td></td><td>4</td><td>KD (Hinton et al., 2015)</td><td>49.3</td></tr><tr><td></td><td>4</td><td>CRD (Tian et al., 2019)</td><td>49.0</td></tr><tr><td></td><td>4</td><td>PKT (Passalis &amp; Tefas,2018)</td><td>48.9</td></tr><tr><td>4</td><td></td><td>SP (Tung&amp; Mori,2019)</td><td>49.0</td></tr></table>",
1726
+ "bbox": [
1727
+ 250,
1728
+ 189,
1729
+ 746,
1730
+ 430
1731
+ ],
1732
+ "page_idx": 13
1733
+ },
1734
+ {
1735
+ "type": "image",
1736
+ "img_path": "images/ed58db4791e1f89ea35cfff8e371d2ead6b40c0516b6979d8bf036e41da4d9b4.jpg",
1737
+ "image_caption": [
1738
+ "Figure 7: Comparison between our method and multiple LDAM models ensembled together. In the figure, ensembles of LDAM start from 1 ensemble (original LDAM) to 7 ensembles, and RIDE starts from 2 experts to 4 experts. Our method achieves higher accuracy with substantially less computational cost compared to ensemble method. "
1739
+ ],
1740
+ "image_footnote": [],
1741
+ "bbox": [
1742
+ 184,
1743
+ 465,
1744
+ 490,
1745
+ 617
1746
+ ],
1747
+ "page_idx": 13
1748
+ },
1749
+ {
1750
+ "type": "text",
1751
+ "text": "CIFAR100-LT. In the figure, even our method with 4 experts has less computational cost than the minimum computational cost for the ensemble of 2 LDAM models. This indicates that our model is much more efficient and powerful in terms of computational cost and accuracy than ensemble on long-tailed datasets. ",
1752
+ "bbox": [
1753
+ 174,
1754
+ 628,
1755
+ 825,
1756
+ 684
1757
+ ],
1758
+ "page_idx": 13
1759
+ },
1760
+ {
1761
+ "type": "image",
1762
+ "img_path": "images/e6115ad05a8234a5953def47587d79cb117043662a85d302d1fee6d35a65ae44.jpg",
1763
+ "image_caption": [
1764
+ "Figure 8: t-SNE visualization of LDAM’s and our model’s embedding space of CIFAR100-LT. The feature embedding of RIDE is more compact for both head and tail classes and better separated. This behavior greatly reduces the difficulty for the classifier to distinguish the tail category. "
1765
+ ],
1766
+ "image_footnote": [],
1767
+ "bbox": [
1768
+ 183,
1769
+ 699,
1770
+ 816,
1771
+ 797
1772
+ ],
1773
+ "page_idx": 13
1774
+ },
1775
+ {
1776
+ "type": "text",
1777
+ "text": "t-SNE visualization. We also provide the t-SNE visualization of embedding space on CIFAR100- LT as in Fig. 8. Compared with the baseline method LDAM, the feature embedding of RIDE is more compact for both the head and tail classes and better separated from the neighboring classes. This greatly reduces the difficulty for the classifier to distinguish the tail category. ",
1778
+ "bbox": [
1779
+ 174,
1780
+ 867,
1781
+ 825,
1782
+ 924
1783
+ ],
1784
+ "page_idx": 13
1785
+ },
1786
+ {
1787
+ "type": "text",
1788
+ "text": "What if we apply RIDE to balanced datasets? We also conducted experiments on CIFAR100 to check if our method can achieve similar performance gains on balanced datasets. However, we only obtained an improvement of about $1 \\%$ , which is much smaller than the improvements observed on the CIFAR100-LT. Compared with balanced datasets, long-tailed datasets can get more benefits from RIDE. ",
1789
+ "bbox": [
1790
+ 174,
1791
+ 103,
1792
+ 825,
1793
+ 172
1794
+ ],
1795
+ "page_idx": 14
1796
+ },
1797
+ {
1798
+ "type": "table",
1799
+ "img_path": "images/f396f564beb65f78ce35f7478298dc1ad3e54b303feea6c358a392f5dfb3cda2.jpg",
1800
+ "table_caption": [
1801
+ "Table 6: Top-1 accuracy comparison with state-of-the-art methods on ImageNet-LT (Liu et al., 2019) with ResNet-10. Performance on Many-shot $( > 1 0 0 )$ , Medum-shot $\\leq 1 0 0$ & ${ > } 2 0$ ) and Fewshot $( \\leq 2 0 )$ are also provided. Results marked with $\\dagger$ are copied from (Liu et al., 2019). Results with $\\ddagger$ are from (Xiang et al., 2020). "
1802
+ ],
1803
+ "table_footnote": [],
1804
+ "table_body": "<table><tr><td>Methods</td><td>GFlops</td><td>Many</td><td>Medium</td><td>Few</td><td>Overall</td></tr><tr><td>Cross Entropy(CE) t</td><td>0.89 (1.0x)</td><td>40.9</td><td>10.7</td><td>0.4</td><td>20.9</td></tr><tr><td>Focal Loss † (Lin et al.,2017)</td><td>0.89 (1.0x) 0.89 (1.0x)</td><td>36.4</td><td>29.9</td><td>16.0</td><td>30.5</td></tr><tr><td>Range Loss † (Zhang et al., 2017) Lifted Loss † (Oh Song et al., 2016)</td><td>0.89 (1.0x)</td><td>35.8</td><td>30.3</td><td>17.6</td><td>30.7</td></tr><tr><td></td><td></td><td>35.8</td><td>30.4</td><td>17.9</td><td>30.8</td></tr><tr><td>OLTR (Liu et al., 2019) LFME (Xiang et al., 2020)</td><td>0.89 (1.0x)</td><td>43.2</td><td>35.1</td><td>18.5</td><td>35.6</td></tr><tr><td>Many-shot only t</td><td>- 1</td><td>47.0 59.3</td><td>37.9</td><td>19.2</td><td>38.8</td></tr><tr><td>Medium-shot only t</td><td>1</td><td></td><td>35.9</td><td></td><td></td></tr><tr><td>Few-shot only ‡</td><td>1</td><td></td><td></td><td>14.3</td><td></td></tr><tr><td>RIDE (2 experts)</td><td>0.85 (1.0x)</td><td>57.5</td><td>40.8</td><td>26.9</td><td>45.3 (+6.5)</td></tr><tr><td>RIDE (3 experts)</td><td>0.97 (1.1x)</td><td>57.6</td><td>41.7</td><td>28.0</td><td>45.9 (+7.1)</td></tr><tr><td>RIDE (4 experts)</td><td>1.07 (1.2x)</td><td>58.5</td><td>42.4</td><td>27.7</td><td>46.6 ( (+7.8)</td></tr></table>",
1805
+ "bbox": [
1806
+ 179,
1807
+ 258,
1808
+ 818,
1809
+ 445
1810
+ ],
1811
+ "page_idx": 14
1812
+ },
1813
+ {
1814
+ "type": "table",
1815
+ "img_path": "images/a68c86c223d1604da2c563c318f76bd864457ef48096ba37b6cc0704c0c992c5.jpg",
1816
+ "table_caption": [
1817
+ "Table 7: Top-1 accuracy comparison with state-of-the-art methods on ImageNet-LT (Liu et al., 2019) with ResNet-50. Performance on Many-shot $( > 1 0 0 )$ , Medum-shot $( \\leq 1 0 0$ & ${ > } 2 0$ ) and Fewshot $( \\leq 2 0 )$ are also provided. Results marked with $\\dagger$ are copied from (Kang et al., 2020). "
1818
+ ],
1819
+ "table_footnote": [],
1820
+ "table_body": "<table><tr><td>Methods</td><td>GFlops</td><td>Many</td><td>Medium</td><td>Few</td><td>Overall</td></tr><tr><td>Cross Entropy (CE) t</td><td>4.11 (1.0x)</td><td>64.0</td><td>33.8</td><td>5.8</td><td>41.6</td></tr><tr><td>NCM (Kang et al., 2020)</td><td>=</td><td>53.1</td><td>42.3</td><td>26.5</td><td>44.3</td></tr><tr><td>cRT (Kang et al., 2020)</td><td>4.11 (1.0x)</td><td>58.8</td><td>44.0</td><td>26.1</td><td>47.3</td></tr><tr><td>T-norm (Kang et al., 2020)</td><td>4.11 (1.0x)</td><td>56.6</td><td>44.2</td><td>27.4</td><td>46.7</td></tr><tr><td>LWS (Kang et al., 2020)</td><td>4.11 (1.0x)</td><td>57.1</td><td>45.2</td><td>29.3</td><td>47.7</td></tr><tr><td>RIDE (2 experts)</td><td>3.71 (0.9x)</td><td>65.8</td><td>51.0</td><td>34.6</td><td>54.4 (+6.7)</td></tr><tr><td>RIDE (3 experts)</td><td>4.36 (1.1x)</td><td>66.2</td><td>51.7</td><td>34.9</td><td>54.9 (+7.2)</td></tr><tr><td>RIDE (4 experts)</td><td>5.15 (1.3x)</td><td>66.2</td><td>52.3</td><td>36.5</td><td> 55.4 (+7.7)</td></tr></table>",
1821
+ "bbox": [
1822
+ 209,
1823
+ 532,
1824
+ 789,
1825
+ 664
1826
+ ],
1827
+ "page_idx": 14
1828
+ },
1829
+ {
1830
+ "type": "table",
1831
+ "img_path": "images/f371a6c094ee4c012f0474f893d8eaaa39350cb8654b956a2835a31d56985897.jpg",
1832
+ "table_caption": [
1833
+ "Table 8: Top-1 accuracy comparison with state-of-the-art methods on ImageNet-LT (Liu et al., 2019) with ResNeXt-50. Performance on Many-shot $( > 1 0 0 )$ , Medum-shot $( \\leq 1 0 0$ & ${ > } 2 0 _ { , }$ ) and Few-shot $( \\leq 2 0 )$ are also provided. Results marked with $\\dagger$ are copied from (Kang et al., 2020). "
1834
+ ],
1835
+ "table_footnote": [],
1836
+ "table_body": "<table><tr><td>Methods</td><td>GFlops</td><td>Many</td><td>Medium</td><td>Few</td><td>Overall</td></tr><tr><td>Cross Entropy(CE) + NCM (Kang et al., 2020)</td><td>4.26 (1.0x)</td><td>65.9</td><td>37.5</td><td>7.7</td><td>44.4</td></tr><tr><td>cRT (Kang et al., 2020)</td><td>4.26 (1.0x)</td><td>56.6 61.8</td><td>45.3 46.2</td><td>28.1 27.4</td><td>47.3 49.6</td></tr><tr><td>T-norm (Kang et al., 2020)</td><td>4.26 (1.0x)</td><td>59.1</td><td>46.9</td><td>30.7</td><td>49.4</td></tr><tr><td>LWS (Kang et al., 2020)</td><td>4.26 (1.0x)</td><td>60.2</td><td>47.2</td><td>30.3</td><td></td></tr><tr><td></td><td>3.92 (0.9x)</td><td>67.6</td><td>52.5</td><td>35.0</td><td>49.9</td></tr><tr><td>RIDE (2 experts)</td><td>4.69 (1.1x)</td><td>67.6</td><td>53.5</td><td>35.9</td><td>55.9 (+6.0)</td></tr><tr><td>RIDE (3 experts)</td><td>5.19 (1.2x)</td><td></td><td></td><td></td><td>56.4 (+6.5)</td></tr><tr><td>RIDE (4 experts)</td><td></td><td>68.2</td><td>53.8</td><td>36.0</td><td>56.8 (+6.9)</td></tr></table>",
1837
+ "bbox": [
1838
+ 209,
1839
+ 751,
1840
+ 789,
1841
+ 882
1842
+ ],
1843
+ "page_idx": 14
1844
+ }
1845
+ ]
parse/train/D9I3drBz4UC/D9I3drBz4UC_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/D9I3drBz4UC/D9I3drBz4UC_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HJ0UKP9ge/HJ0UKP9ge.md ADDED
@@ -0,0 +1,285 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # BI-DIRECTIONAL ATTENTION FLOW FOR MACHINE COMPREHENSION
2
+
3
+ Minjoon $\mathbf { S e o ^ { 1 * } }$ Aniruddha Kembhavi2 Ali Farhadi1,2 Hananneh Hajishirzi1 University of Washington1, Allen Institute for Artificial Intelligence2 {minjoon,ali,hannaneh}@cs.washington.edu, $\{ \mathtt { a n i k } \} \ @ \mathtt { a l l e n a i . o r g }$
4
+
5
+ # ABSTRACT
6
+
7
+ Machine comprehension (MC), answering a query about a given context paragraph, requires modeling complex interactions between the context and the query. Recently, attention mechanisms have been successfully extended to MC. Typically these methods use attention to focus on a small portion of the context and summarize it with a fixed-size vector, couple attentions temporally, and/or often form a uni-directional attention. In this paper we introduce the Bi-Directional Attention Flow (BIDAF) network, a multi-stage hierarchical process that represents the context at different levels of granularity and uses bidirectional attention flow mechanism to obtain a query-aware context representation without early summarization. Our experimental evaluations show that our model achieves the state-of-the-art results in Stanford Question Answering Dataset (SQuAD) and CNN/DailyMail cloze test.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ The tasks of machine comprehension (MC) and question answering (QA) have gained significant popularity over the past few years within the natural language processing and computer vision communities. Systems trained end-to-end now achieve promising results on a variety of tasks in the text and image domains. One of the key factors to the advancement has been the use of neural attention mechanism, which enables the system to focus on a targeted area within a context paragraph (for MC) or within an image (for Visual QA), that is most relevant to answer the question (Weston et al., 2015; Antol et al., 2015; Xiong et al., 2016a). Attention mechanisms in previous works typically have one or more of the following characteristics. First, the computed attention weights are often used to extract the most relevant information from the context for answering the question by summarizing the context into a fixed-size vector. Second, in the text domain, they are often temporally dynamic, whereby the attention weights at the current time step are a function of the attended vector at the previous time step. Third, they are usually uni-directional, wherein the query attends on the context paragraph or the image.
12
+
13
+ In this paper, we introduce the Bi-Directional Attention Flow (BIDAF) network, a hierarchical multi-stage architecture for modeling the representations of the context paragraph at different levels of granularity (Figure 1). BIDAF includes character-level, word-level, and contextual embeddings, and uses bi-directional attention flow to obtain a query-aware context representation. Our attention mechanism offers following improvements to the previously popular attention paradigms. First, our attention layer is not used to summarize the context paragraph into a fixed-size vector. Instead, the attention is computed for every time step, and the attended vector at each time step, along with the representations from previous layers, is allowed to flow through to the subsequent modeling layer. This reduces the information loss caused by early summarization. Second, we use a memory-less attention mechanism. That is, while we iteratively compute attention through time as in Bahdanau et al. (2015), the attention at each time step is a function of only the query and the context paragraph at the current time step and does not directly depend on the attention at the previous time step. We hypothesize that this simplification leads to the division of labor between the attention layer and the modeling layer. It forces the attention layer to focus on learning the attention between the query and the context, and enables the modeling layer to focus on learning the interaction within the query-aware context representation (the output of the attention layer). It also allows the attention at each time step to be unaffected from incorrect attendances at previous time steps. Our experiments show that memory-less attention gives a clear advantage over dynamic attention. Third, we use attention mechanisms in both directions, query-to-context and context-to-query, which provide complimentary information to each other.
14
+
15
+ ![](images/8ae29f18b08da1ee65cc07b50c3d43461883b2cbc78ed590d8d2592a92dfe01e.jpg)
16
+ Figure 1: BiDirectional Attention Flow Model (best viewed in color)
17
+
18
+ Our BIDAF model1 outperforms all previous approaches on the highly-competitive Stanford Question Answering Dataset (SQuAD) test set leaderboard at the time of submission. With a modification to only the output layer, BIDAF achieves the state-of-the-art results on the CNN/DailyMail cloze test. We also provide an in-depth ablation study of our model on the SQuAD development set, visualize the intermediate feature spaces in our model, and analyse its performance as compared to a more traditional language model for machine comprehension (Rajpurkar et al., 2016).
19
+
20
+ # 2 MODEL
21
+
22
+ Our machine comprehension model is a hierarchical multi-stage process and consists of six layers (Figure 1):
23
+
24
+ 1. Character Embedding Layer maps each word to a vector space using character-level CNNs.
25
+ 2. Word Embedding Layer maps each word to a vector space using a pre-trained word embedding model.
26
+ 3. Contextual Embedding Layer utilizes contextual cues from surrounding words to refine the embedding of the words. These first three layers are applied to both the query and context.
27
+ 4. Attention Flow Layer couples the query and context vectors and produces a set of queryaware feature vectors for each word in the context.
28
+ 5. Modeling Layer employs a Recurrent Neural Network to scan the context.
29
+ 6. Output Layer provides an answer to the query.
30
+
31
+ 1. Character Embedding Layer. Character embedding layer is responsible for mapping each word to a high-dimensional vector space. Let $\{ \pmb { x } _ { 1 } , \hdots \pmb { x } _ { T } \}$ and $\{ q _ { 1 } , \dots q _ { J } \}$ represent the words in the input context paragraph and query, respectively. Following Kim (2014), we obtain the characterlevel embedding of each word using Convolutional Neural Networks (CNN). Characters are embedded into vectors, which can be considered as 1D inputs to the CNN, and whose size is the input channel size of the CNN. The outputs of the CNN are max-pooled over the entire width to obtain a fixed-size vector for each word.
32
+
33
+ 2. Word Embedding Layer. Word embedding layer also maps each word to a high-dimensional vector space. We use pre-trained word vectors, GloVe (Pennington et al., 2014), to obtain the fixed word embedding of each word.
34
+
35
+ The concatenation of the character and word embedding vectors is passed to a two-layer Highway Network (Srivastava et al., 2015). The outputs of the Highway Network are two sequences of $d$ - dimensional vectors, or more conveniently, two matrices: $\breve { \mathbf { X } } \in \breve { \mathbb { R } } ^ { d \times T }$ for the context and $\mathbf { Q } \in \mathbb { R } ^ { d \times J }$ for the query.
36
+
37
+ 3. Contextual Embedding Layer. We use a Long Short-Term Memory Network (LSTM) (Hochreiter & Schmidhuber, 1997) on top of the embeddings provided by the previous layers to model the temporal interactions between words. We place an LSTM in both directions, and concatenate the outputs of the two LSTMs. Hence we obtain $\mathbf { H } \in \mathbb { R } ^ { 2 d \times T }$ from the context word vectors $\mathbf { X }$ , and $\mathbf { U } \in \mathbb { R } ^ { 2 d \times J }$ from query word vectors $\mathbf { Q }$ . Note that each column vector of $\mathbf { H }$ and $\mathbf { U }$ is $2 d$ -dimensional because of the concatenation of the outputs of the forward and backward LSTMs, each with $d .$ -dimensional output.
38
+
39
+ It is worth noting that the first three layers of the model are computing features from the query and context at different levels of granularity, akin to the multi-stage feature computation of convolutional neural networks in the computer vision field.
40
+
41
+ 4. Attention Flow Layer. Attention flow layer is responsible for linking and fusing information from the context and the query words. Unlike previously popular attention mechanisms (Weston et al., 2015; Hill et al., 2016; Sordoni et al., 2016; Shen et al., 2016), the attention flow layer is not used to summarize the query and context into single feature vectors. Instead, the attention vector at each time step, along with the embeddings from previous layers, are allowed to flow through to the subsequent modeling layer. This reduces the information loss caused by early summarization.
42
+
43
+ The inputs to the layer are contextual vector representations of the context H and the query U. The outputs of the layer are the query-aware vector representations of the context words, $\mathbf { G }$ , along with the contextual embeddings from the previous layer.
44
+
45
+ In this layer, we compute attentions in two directions: from context to query as well as from query to context. Both of these attentions, which will be discussed below, are derived from a shared similarity matrix, $\mathbf { S } \in \mathbb { R } ^ { T \times J }$ , between the contextual embeddings of the context $( \mathbf { H } )$ and the query (U), where $\mathbf { S } _ { t j }$ indicates the similarity between $t$ -th context word and $j$ -th query word. The similarity matrix is computed by
46
+
47
+ $$
48
+ \mathbf { S } _ { t j } = \alpha ( \mathbf { H } _ { : t } , \mathbf { U } _ { : j } ) \in \mathbb { R }
49
+ $$
50
+
51
+ where $\alpha$ is a trainable scalar function that encodes the similarity between its two input vectors, $\mathbf { H } _ { : t }$ is $t$ -th column vector of $\mathbf { H }$ , and $\mathbf { U } _ { : j }$ is $j$ -th column vector of $\mathbf { U }$ , We choose $\alpha ( \mathbf { h } , \mathbf { u } ) { \bf \bar { \alpha } } = \mathbf { w } _ { ( \mathbf { s } ) } ^ { \top } [ \mathbf { h } ; \mathbf { u } ; \mathbf { h } \circ$ $\mathbf { u } ]$ , where $\mathbf { w } _ { ( \mathbf { S } ) } \in \mathbb { R } ^ { 6 d }$ is a trainable weight vector, $\circ$ is elementwise multiplication, $[ ; ]$ is vector concatenation across row, and implicit multiplication is matrix multiplication. Now we use $\mathbf { S }$ to obtain the attentions and the attended vectors in both directions.
52
+
53
+ Context-to-query Attention. Context-to-query (C2Q) attention signifies which query words are most relevant to each context word. Let $\mathbf { a } _ { t } \in \mathbf { \overline { { \mathbb { R } } } } ^ { J }$ represent the attention weights on the query words by $t { \cdot }$ -th context word, $\textstyle \sum { \mathbf { a } } _ { t j } = 1$ for all $t$ . The attention weight is computed by $\mathbf { a } _ { t } = \mathrm { s o f t m a x } ( \mathbf { S } _ { t : } ) \in$ $\mathbb { R } ^ { J }$ , and subsequently each attended query vector is $\begin{array} { r } { \tilde { \mathbf { U } } _ { : t } = \sum _ { j } \mathbf { a } _ { t j } \mathbf { U } _ { : j } } \end{array}$ . Hence $\tilde { \textbf { U } }$ is a $2 d$ -by- $\mathcal { T }$ matrix containing the attended query vectors for the entire context.
54
+
55
+ Query-to-context Attention. Query-to-context (Q2C) attention signifies which context words have the closest similarity to one of the query words and are hence critical for answering the query.
56
+
57
+ We obtain the attention weights on the context words by $\mathbf { b } = \mathrm { s o f t m a x } ( \operatorname* { m a x } _ { c o l } ( \mathbf { S } ) ) \in \mathbb { R } ^ { T }$ , where the maximum function $( \mathrm { m a x } _ { c o l } )$ is performed across the column. Then the attended context vector is $\begin{array} { r } { \tilde { \mathbf { h } } = \sum _ { t } \mathbf { b } _ { t } \mathbf { H } _ { : t } \in \mathbb { R } ^ { 2 d } } \end{array}$ . This vector indicates the weighted sum of the most important words in the context with respect to the query. $\tilde { \mathbf { h } }$ is tiled $T$ times across the column, thus giving $\tilde { \mathbf { H } } \in \mathbb { R } ^ { 2 d \times T }$ .
58
+
59
+ Finally, the contextual embeddings and the attention vectors are combined together to yield $\mathbf { G }$ , where each column vector can be considered as the query-aware representation of each context word. We define $\mathbf { G }$ by
60
+
61
+ $$
62
+ \mathbf { G } _ { : t } = \beta ( \mathbf { H } _ { : t } , \tilde { \mathbf { U } } _ { : t } , \tilde { \mathbf { H } } _ { : t } ) \in \mathbb { R } ^ { d _ { \mathbf { G } } }
63
+ $$
64
+
65
+ where $\mathbf { G } _ { : t }$ is the $t { \cdot }$ -th column vector (corresponding to $t$ -th context word), $\beta$ is a trainable vector function that fuses its (three) input vectors, and $d _ { \mathbf { G } }$ is the output dimension of the $\beta$ function. While the $\beta$ function can be an arbitrary trainable neural network, such as multi-layer perceptron, a simple concatenation as following still shows good performance in our experiments: $\bar { \beta } ( { \bf h } , \bar { \tilde { \bf u } } , \tilde { \bf h } ) =$ $[ \mathbf { h } ; \tilde { \mathbf { u } } ; \mathbf { h } \circ \tilde { \mathbf { u } } ; \mathbf { h } \circ \tilde { \mathbf { h } } ] \in \mathbb { R } ^ { 8 d \times T }$ (i.e., $d _ { \mathbf { G } } = 8 d _ { \mathbf { \rho } }$ ).
66
+
67
+ 5. Modeling Layer. The input to the modeling layer is $\mathbf { G }$ , which encodes the query-aware representations of context words. The output of the modeling layer captures the interaction among the context words conditioned on the query. This is different from the contextual embedding layer, which captures the interaction among context words independent of the query. We use two layers of bi-directional LSTM, with the output size of $d$ for each direction. Hence we obtain a matrix $\mathbf { M } \in \mathbb { R } ^ { 2 d \times T }$ , which is passed onto the output layer to predict the answer. Each column vector of M is expected to contain contextual information about the word with respect to the entire context paragraph and the query.
68
+
69
+ 6. Output Layer. The output layer is application-specific. The modular nature of BIDAF allows us to easily swap out the output layer based on the task, with the rest of the architecture remaining exactly the same. Here, we describe the output layer for the QA task. In section 5, we use a slight modification of this output layer for cloze-style comprehension.
70
+
71
+ The QA task requires the model to find a sub-phrase of the paragraph to answer the query. The phrase is derived by predicting the start and the end indices of the phrase in the paragraph. We obtain the probability distribution of the start index over the entire paragraph by
72
+
73
+ $$
74
+ \mathbf { p } ^ { 1 } = \mathrm { s o f t m a x } ( \mathbf { w } _ { ( \mathbf { p } ^ { 1 } ) } ^ { \top } [ \mathbf { G } ; \mathbf { M } ] ) ,
75
+ $$
76
+
77
+ where $\mathbf { w } _ { ( \mathbf { p } ^ { 1 } ) } \in \mathbb { R } ^ { 1 0 d }$ is a trainable weight vector. For the end index of the answer phrase, we pass $\mathbf { M }$ to another bidirectional LSTM layer and obtain $\mathbf { M } ^ { 2 } \in \mathbb { R } ^ { 2 d \times T }$ . Then we use $\mathbf { M } ^ { 2 }$ to obtain the probability distribution of the end index in a similar manner:
78
+
79
+ $$
80
+ \mathbf { p } ^ { 2 } = \mathrm { s o f t m a x } ( \mathbf { w } _ { ( \mathbf { p } ^ { 2 } ) } ^ { \top } [ \mathbf { G } ; \mathbf { M } ^ { 2 } ] )
81
+ $$
82
+
83
+ Training. We define the training loss (to be minimized) as the sum of the negative log probabilities of the true start and end indices by the predicted distributions, averaged over all examples:
84
+
85
+ $$
86
+ L ( \theta ) = - \frac { 1 } { N } \sum _ { i } ^ { N } \log ( \mathbf { p } _ { y _ { i } ^ { 1 } } ^ { 1 } ) + \log ( \mathbf { p } _ { y _ { i } ^ { 2 } } ^ { 2 } )
87
+ $$
88
+
89
+ where $\theta$ is the set of all trainable weights in the model (the weights and biases of CNN filters and LSTM cells, $\mathbf { w } _ { ( \mathbf { S } ) } , \mathbf { w } _ { ( \mathbf { p } ^ { 1 } ) }$ and $\mathbf { w } _ { ( \mathbf { p } ^ { 2 } ) , }$ ), $N$ is the number of examples in the dataset, $y _ { i } ^ { 1 }$ and $y _ { i } ^ { 2 }$ are the true start and end indices of the $i$ -th example, respectively, and $\mathbf { p } _ { k }$ indicates the $k$ -th value of the vector $\mathbf { p }$ .
90
+
91
+ Test. The answer span $( k , l )$ where $k \leq l$ with the maximum value of $\mathbf { p } _ { k } ^ { 1 } \mathbf { p } _ { l } ^ { 2 }$ is chosen, which can be computed in linear time with dynamic programming.
92
+
93
+ # 3 RELATED WORK
94
+
95
+ Machine comprehension. A significant contributor to the advancement of MC models has been the availability of large datasets. Early datasets such as MCTest (Richardson et al., 2013) were too small to train end-to-end neural models. Massive cloze test datasets (CNN/DailyMail by Hermann et al. (2015) and Childrens Book Test by Hill et al. (2016)), enabled the application of deep neural architectures to this task. More recently, Rajpurkar et al. (2016) released the Stanford Question Answering (SQuAD) dataset with over 100,000 questions. We evaluate the performance of our comprehension system on both SQuAD and CNN/DailyMail datasets.
96
+
97
+ Previous works in end-to-end machine comprehension use attention mechanisms in three distinct ways. The first group (largely inspired by Bahdanau et al. (2015)) uses a dynamic attention mechanism, in which the attention weights are updated dynamically given the query and the context as well as the previous attention. Hermann et al. (2015) argue that the dynamic attention model performs better than using a single fixed query vector to attend on context words on CNN & DailyMail datasets. Chen et al. (2016) show that simply using bilinear term for computing the attention weights in the same model drastically improves the accuracy. Wang & Jiang (2016) reverse the direction of the attention (attending on query words as the context RNN progresses) for SQuAD. In contrast to these models, BIDAF uses a memory-less attention mechanism.
98
+
99
+ The second group computes the attention weights once, which are then fed into an output layer for final prediction (e.g., Kadlec et al. (2016)). Attention-over-attention model (Cui et al., 2016) uses a 2D similarity matrix between the query and context words (similar to Equation 1) to compute the weighted average of query-to-context attention. In contrast to these models, BIDAF does not summarize the two modalities in the attention layer and instead lets the attention vectors flow into the modeling (RNN) layer.
100
+
101
+ The third group (considered as variants of Memory Network (Weston et al., 2015)) repeats computing an attention vector between the query and the context through multiple layers, typically referred to as multi-hop (Sordoni et al., 2016; Dhingra et al., 2016). Shen et al. (2016) combine Memory Networks with Reinforcement Learning in order to dynamically control the number of hops. One can also extend our BIDAF model to incorporate multiple hops.
102
+
103
+ Visual question answering. The task of question answering has also gained a lot of interest in the computer vision community. Early works on visual question answering (VQA) involved encoding the question using an RNN, encoding the image using a CNN and combining them to answer the question (Antol et al., 2015; Malinowski et al., 2015). Attention mechanisms have also been successfully employed for the VQA task and can be broadly clustered based on the granularity of their attention and the approach to construct the attention matrix. At the coarse level of granularity, the question attends to different patches in the image (Zhu et al., 2016; Xiong et al., 2016a). At a finer level, each question word attends to each image patch and the highest attention value for each spatial location (Xu & Saenko, 2016) is adopted. A hybrid approach is to combine questions representations at multiple levels of granularity (unigrams, bigrams, trigrams) (Yang et al., 2015). Several approaches to constructing the attention matrix have been used including element-wise product, element-wise sum, concatenation and Multimodal Compact Bilinear Pooling (Fukui et al., 2016).
104
+
105
+ Lu et al. (2016) have recently shown that in addition to attending from the question to image patches, attending from the image back to the question words provides an improvement on the VQA task. This finding in the visual domain is consistent with our finding in the language domain, where our bi-directional attention between the query and context provides improved results. Their model, however, uses the attention weights directly in the output layer and does not take advantage of the attention flow to the modeling layer.
106
+
107
+ # 4 QUESTION ANSWERING EXPERIMENTS
108
+
109
+ In this section, we evaluate our model on the task of question answering using the recently released SQuAD (Rajpurkar et al., 2016), which has gained a huge attention over a few months. In the next section, we evaluate our model on the task of cloze-style reading comprehension.
110
+
111
+ Dataset. SQuAD is a machine comprehension dataset on a large set of Wikipedia articles, with more than 100,000 questions. The answer to each question is always a span in the context. The model is given a credit if its answer matches one of the human written answers. Two metrics are used to evaluate models: Exact Match (EM) and a softer metric, F1 score, which measures the weighted average of the precision and recall rate at character level. The dataset consists of $9 0 \mathrm { k } / 1 0 \mathrm { k }$
112
+
113
+ <table><tr><td></td><td colspan="2">Single Model</td><td colspan="2">Ensemble</td></tr><tr><td></td><td>EM</td><td>F1</td><td>EM</td><td>F1</td></tr><tr><td>Logistic Regression Baselinea</td><td>40.4</td><td>51.0</td><td>-</td><td>-</td></tr><tr><td>Dynamic Chunk Readerb</td><td>62.5</td><td>71.0</td><td>-</td><td>-</td></tr><tr><td>Fine-Grained Gatingc</td><td>62.5</td><td>73.3</td><td>1</td><td>-</td></tr><tr><td>Match-LSTMd</td><td>64.7</td><td>73.7</td><td>67.9</td><td>77.0</td></tr><tr><td>Multi-Perspective Matchinge</td><td>65.5</td><td>75.1</td><td>68.2</td><td>77.2</td></tr><tr><td>Dynamic Coattention Networksf</td><td>66.2</td><td>75.9</td><td>71.6</td><td>80.4</td></tr><tr><td>R-Net9</td><td>68.4</td><td>77.5</td><td>72.1</td><td>79.7</td></tr><tr><td>BIDAF (Ours)</td><td>68.0</td><td>77.3</td><td>73.3</td><td>81.1</td></tr></table>
114
+
115
+ (a) Results on the SQuAD test set
116
+
117
+ <table><tr><td></td><td>EM</td><td>F1</td></tr><tr><td>No char embedding No word embedding No C2Q attention</td><td>65.0 55.5 57.2</td><td>75.4 66.8 67.7</td></tr><tr><td>No Q2C attention Dynamic attention</td><td>63.6 63.5</td><td>73.7 73.6</td></tr><tr><td>BIDAF (single)</td><td>67.7</td><td>77.3</td></tr><tr><td>BIDAF (ensemble)</td><td>72.6</td><td>80.7</td></tr></table>
118
+
119
+ (b) Ablations on the SQuAD dev set
120
+
121
+ Table 1: (1a) The performance of our model BIDAF and competing approaches by Rajpurkar et al. $( 2 0 1 6 ) ^ { a }$ , Yu et al. $( 2 0 1 6 ) ^ { b }$ , Yang et al. $( 2 0 1 6 ) ^ { c }$ , Wang & Jiang $( 2 0 1 6 ) ^ { d }$ , IBM Watsone (unpublished), Xiong et al. $( 2 0 1 6 \mathrm { b } ) ^ { f }$ , and Microsoft Research $\mathrm { A s i a } ^ { g }$ (unpublished) on the SQuAD test set. A concurrent work by Lee et al. (2016) does not report the test scores. All results shown here reflect the SQuAD leaderboard (stanford-qa.com) as of 6 Dec 2016, $1 2 \mathrm { p m }$ PST. (1b) The performance of our model and its ablations on the SQuAD dev set. Ablation results are presented only for single runs.
122
+
123
+ train/dev question-context tuples with a large hidden test set. It is one of the largest available MC datasets with human-written questions and serves as a great test bed for our model.
124
+
125
+ Model Details. The model architecture used for this task is depicted in Figure 1. Each paragraph and question are tokenized by a regular-expression-based word tokenizer (PTB Tokenizer) and fed into the model. We use $1 0 0 ~ 1 \mathrm { D }$ filters for CNN char embedding, each with a width of 5. The hidden state size $( d )$ of the model is 100. The model has about 2.6 million parameters. We use the AdaDelta (Zeiler, 2012) optimizer, with a minibatch size of 60 and an initial learning rate of 0.5, for 12 epochs. A dropout (Srivastava et al., 2014) rate of 0.2 is used for the CNN, all LSTM layers, and the linear transformation before the softmax for the answers. During training, the moving averages of all weights of the model are maintained with the exponential decay rate of 0.999. At test time, the moving averages instead of the raw weights are used. The training process takes roughly 20 hours on a single Titan X GPU. We also train an ensemble model consisting of 12 training runs with the identical architecture and hyper-parameters. At test time, we choose the answer with the highest sum of confidence scores amongst the 12 runs for each question.
126
+
127
+ Results. The results of our model and competing approaches on the hidden test are summarized in Table 1a. BIDAF (ensemble) achieves an EM score of 73.3 and an F1 score of 81.1, outperforming all previous approaches.
128
+
129
+ Ablations. Table 1b shows the performance of our model and its ablations on the SQuAD dev set. Both char-level and word-level embeddings contribute towards the model’s performance. We conjecture that word-level embedding is better at representing the semantics of each word as a whole, while char-level embedding can better handle out-of-vocab (OOV) or rare words. To evaluate bidirectional attention, we remove C2Q and Q2C attentions. For ablating C2Q attention, we replace the attended question vector $\tilde { \textbf { U } }$ with the average of the output vectors of the question’s contextual embedding layer (LSTM). C2Q attention proves to be critical with a drop of more than 10 points on both metrics. For ablating Q2C attention, the output of the attention layer, G, does not include terms that have the attended Q2C vectors, $\tilde { \bf H }$ . To evaluate the attention flow, we study a dynamic attention model, where the attention is dynamically computed within the modeling layer’s LSTM, following previous work (Bahdanau et al., 2015; Wang & Jiang, 2016). This is in contrast with our approach, where the attention is pre-computed before flowing to the modeling layer. Despite being a simpler attention mechanism, our proposed static attention outperforms the dynamically computed attention by more than 3 points. We conjecture that separating out the attention layer results in a richer set of features computed in the first 4 layers which are then incorporated by the modeling layer. We also show the performance of BIDAF with several different definitions of $\alpha$ and $\beta$ functions (Equation 1 and 2) in Appendix B.
130
+
131
+ <table><tr><td>Layer</td><td>Query</td><td>Closest words in the Context using cosine similarity</td></tr><tr><td>Word</td><td>When</td><td>when,When,After,after,He,he,But,but,before,Before</td></tr><tr><td>Contextual</td><td>When</td><td>When, when,1945,1991,1971,1967,1990,1972,1965,1953</td></tr><tr><td>Word</td><td>Where</td><td>Where,where,It,IT,it,they,They,that,That,city</td></tr><tr><td>Contextual</td><td>Where</td><td>where,Where,Rotterdam,area,Nearby,location,outside,Area,across,locations</td></tr><tr><td>Word Contextual</td><td>Who Who</td><td>Who,who,He,he,had,have,she,She,They,they who,whose,whom,Guiscard, person, John,Thomas,families,Elway,Louis</td></tr><tr><td>Word Contextual</td><td>city</td><td>City,city, town,Town, Capital,capital, district, cities,province,Downtown</td></tr><tr><td>Word</td><td>city January</td><td>city,City,Angeles,Paris,Prague,Chicago,Port,Pittsburgh,London,Manhattan July,December,June,October,Juary,eptember,February,April,November,rch</td></tr><tr><td>Contextual</td><td>January</td><td>January,March,December,August,December,July,July,July,March,December</td></tr><tr><td>Word</td><td>Seahawks</td><td>Seahawks,Broncos,49ers,Ravens,Chargers,Steelers,quarterback,Vikings,Colts,NFL</td></tr><tr><td>Contextual Word</td><td>Seahawks</td><td>Seahawks,Broncos,Panthers,Vikings,Packers,Ravens,Patriots,Falcons,Steelers,Chargers</td></tr><tr><td>Contextual</td><td>date</td><td>date,dates,until,Until,June,July,Year,year,December,deadline</td></tr><tr><td></td><td>date</td><td>date,dates,December,July,January,October,June,November,March,February</td></tr></table>
132
+
133
+ ![](images/7757c7656332a6a3b06f97b0ebf7763ba27b455d0c2af2acf07a0dcd8b41d2e2.jpg)
134
+ Table 2: Closest context words to a given query word, using a cosine similarity metric computed in the Word Embedding feature space and the Phrase Embedding feature space.
135
+ Figure 2: (a) t-SNE visualizations of the months names embedded in the two feature spaces. The contextual embedding layer is able to distinguish the two usages of the word May using context from the surrounding text. (b) Venn diagram of the questions answered correctly by our model and the more traditional baseline (Rajpurkar et al., 2016). (c) Correctly answered questions broken down by the 10 most frequent first words in the question.
136
+
137
+ Visualizations. We now provide a qualitative analysis of our model on the SQuAD dev set. First, we visualize the feature spaces after the word and contextual embedding layers. These two layers are responsible for aligning the embeddings between the query and context words which are the inputs to the subsequent attention layer. To visualize the embeddings, we choose a few frequent query words in the dev data and look at the context words that have the highest cosine similarity to the query words (Table 2). At the word embedding layer, query words such as When, Where and Who are not well aligned to possible answers in the context, but this dramatically changes in the contextual embedding layer which has access to context from surrounding words and is just 1 layer below the attention layer. When begins to match years, Where matches locations, and Who matches names.
138
+
139
+ We also visualize these two feature spaces using t-SNE in Figure 2. t-SNE is performed on a large fraction of dev data but we only plot data points corresponding to the months of the year. An interesting pattern emerges in the Word space, where May is separated from the rest of the months because May has multiple meanings in the English language. The contextual embedding layer uses contextual cues from surrounding words and is able to separate the usages of the word May. Finally we visualize the attention matrices for some question-context tuples in the dev data in Figure 3. In the first example, Where matches locations and in the second example, many matches quantities and numerical symbols. Also, entities in the question typically attend to the same entities in the context, thus providing a feature for the model to localize possible answers.
140
+
141
+ Discussions. We analyse the performance of our our model with a traditional language-featurebased baseline (Rajpurkar et al., 2016). Figure 2b shows a Venn diagram of the dev set questions correctly answered by the models. Our model is able to answer more than $86 \%$ of the questions correctly answered by the baseline. The $14 \%$ that are incorrectly answered does not have a clear pattern. This suggests that neural architectures are able to exploit much of the information captured by the language features. We also break this comparison down by the first words in the questions (Figure 2c). Our model outperforms the traditional baseline comfortably in every category.
142
+
143
+ ![](images/26d62f32002af2aad3857c67045cb6f5ec597c54027d4550e780e69ce794908c.jpg)
144
+ Figure 3: Attention matrices for question-context tuples. The left palette shows the context paragraph (correct answer in red and underlined), the middle palette shows the attention matrix (each row is a question word, each column is a context word), and the right palette shows the top attention points for each question word, above a threshold.
145
+
146
+ Error Analysis. We randomly select 50 incorrect questions (based on EM) and categorize them into 6 classes. $50 \%$ of errors are due to the imprecise boundaries of the answers, $28 \%$ involve syntactic complications and ambiguities, $14 \%$ are paraphrase problems, $4 \%$ require external knowledge, $2 \%$ need multiple sentences to answer, and $2 \%$ are due to mistakes during tokenization. See Appendix A for the examples of the error modes.
147
+
148
+ # 5 CLOZE TEST EXPERIMENTS
149
+
150
+ We also evaluate our model on the task of cloze-style reading comprehension using the CNN and Daily Mail datasets (Hermann et al., 2015).
151
+
152
+ Dataset. In a cloze test, the reader is asked to fill in words that have been removed from a passage, for measuring one’s ability to comprehend text. Hermann et al. (2015) have recently compiled a massive Cloze-style comprehension dataset, consisting of $3 0 0 \mathrm { k } / 4 \mathrm { k } / 3 \mathrm { k }$ and 879k/65k/53k (train/dev/test) examples from CNN and DailyMail news articles, respectively. Each example has a news article and an incomplete sentence extracted from the human-written summary of the article. To distinguish this task from language modeling and force one to refer to the article to predict the correct missing word, the missing word is always a named entity, anonymized with a random ID. Also, the IDs must be shuffled constantly during test, which is also critical for full anonymization.
153
+
154
+ Model Details. The model architecture used for this task is very similar to that for SQuAD (Section 4) with only a few small changes to adapt it to the cloze test. Since each answer in the CNN/DailyMail datasets is always a single word (entity), we only need to predict the start index $( \mathbf { p } ^ { 1 } )$ ; the prediction for the end index $( \mathbf { p } ^ { 2 } )$ is omitted from the loss function. Also, we mask out all non-entity words in the final classification layer so that they are forced to be excluded from possible answers. Another important difference from SQuAD is that the answer entity might appear more than once in the context paragraph. To address this, we follow a similar strategy from Kadlec et al. (2016). During training, after we obtain $\mathbf { p } ^ { 1 }$ , we sum all probability values of the entity instances in the context that correspond to the correct answer. Then the loss function is computed from the summed probability. We use a minibatch size of 48 and train for 8 epochs, with early stop when the accuracy on validation data starts to drop. Inspired by the window-based method (Hill et al., 2016), we split each article into short sentences where each sentence is a 19-word window around each entity (hence the same word might appear in multiple sentences). The RNNs in BIDAF are not feed-forwarded or back-propagated across sentences, which speed up the training process by parallelization. The entire training process takes roughly 60 hours on eight Titan X GPUs. The other hyper-parameters are identical to the model described in Section 4.
155
+
156
+ Results. The results of our single-run models and competing approaches on the CNN/DailyMail datasets are summarized in Table 3. ∗ indicates ensemble methods. BIDAF outperforms previous single-run models on both datasets for both val and test data. On the DailyMail test, our single-run model even outperforms the best ensemble method.
157
+
158
+ Table 3: Results on CNN/DailyMail datasets. We also include the results of previous ensemble methods (marked with $^ *$ ) for completeness.
159
+
160
+ <table><tr><td rowspan="2"></td><td colspan="2">CNN</td><td colspan="2">DailyMail</td></tr><tr><td>val</td><td>test</td><td>val</td><td>test</td></tr><tr><td>Attentive Reader (Hermann et al.,2015)</td><td>61.6</td><td>63.0</td><td>70.5</td><td>69.0</td></tr><tr><td>MemNN (Hill et al.,2016)</td><td>63.4</td><td>6.8</td><td>=</td><td></td></tr><tr><td>AS Reader (Kadlec et al.,2016)</td><td>68.6</td><td>69.5</td><td>75.0</td><td>73.9</td></tr><tr><td>DER Network (Kobayashi et al.,2016)</td><td>71.3</td><td>72.9</td><td>1</td><td>-</td></tr><tr><td>Iterative Attention (Sordoni et al.,2016)</td><td>72.6</td><td>73.3</td><td>-</td><td>=</td></tr><tr><td>EpiReader (Trischler et al.,2016) Stanford AR (Chen et al.,2016)</td><td>73.4</td><td>74.0</td><td>=</td><td>-</td></tr><tr><td>GAReader (Dhingra et al.,2016)</td><td>73.8</td><td>73.6</td><td>77.6</td><td>76.6</td></tr><tr><td>AoA Reader (Cui et al., 2016)</td><td>73.0</td><td>73.8</td><td>76.7</td><td>75.7</td></tr><tr><td></td><td>73.1</td><td>74.4</td><td></td><td>=</td></tr><tr><td>ReasoNet (Shen et al.,2016) BIDAF (Ours)</td><td>72.9</td><td>74.7</td><td>77.6</td><td>76.6</td></tr><tr><td>MemNN* (Hill et al., 2016)</td><td>76.3</td><td>76.9</td><td>80.3</td><td>79.6</td></tr><tr><td></td><td>66.2</td><td>69.4</td><td>-</td><td>=</td></tr><tr><td>ASReader* (Kadlec et al.,2016)</td><td>73.9</td><td>75.4</td><td>78.7</td><td>77.7</td></tr><tr><td>Iterative Attention*(Sordoni et al.,2016)</td><td>74.5</td><td>75.7</td><td>-</td><td>-</td></tr><tr><td>GA Reader* (Dhingra et al.,2016)</td><td>76.4</td><td>77.4</td><td>79.1</td><td>78.1</td></tr><tr><td>Stanford AR*(Chen et al., 2016)</td><td>77.2</td><td>77.6</td><td>80.2</td><td>79.2</td></tr></table>
161
+
162
+ # 6 CONCLUSION
163
+
164
+ In this paper, we introduce BIDAF, a multi-stage hierarchical process that represents the context at different levels of granularity and uses a bi-directional attention flow mechanism to achieve a queryaware context representation without early summarization. The experimental evaluations show that our model achieves the state-of-the-art results in Stanford Question Answering Dataset (SQuAD) and CNN/DailyMail cloze test. The ablation analyses demonstrate the importance of each component in our model. The visualizations and discussions show that our model is learning a suitable representation for MC and is capable of answering complex questions by attending to correct locations in the given paragraph. Future work involves extending our approach to incorporate multiple hops of the attention layer.
165
+
166
+ # ACKNOWLEDGMENTS
167
+
168
+ This research was supported by the NSF (IIS 1616112), NSF (III 1703166), Allen Institute for AI (66-9175), Allen Distinguished Investigator Award, Google Research Faculty Award, and Samsung GRO Award. We thank the anonymous reviewers for their helpful comments.
169
+
170
+ # REFERENCES
171
+
172
+ Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C Lawrence Zitnick, and Devi Parikh. Vqa: Visual question answering. In ICCV, 2015.
173
+
174
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. ICLR, 2015.
175
+
176
+ Danqi Chen, Jason Bolton, and Christopher D. Manning. A thorough examination of the cnn/daily mail reading comprehension task. In ACL, 2016.
177
+
178
+ Yiming Cui, Zhipeng Chen, Si Wei, Shijin Wang, Ting Liu, and Guoping Hu. Attention-overattention neural networks for reading comprehension. arXiv preprint arXiv:1607.04423, 2016.
179
+
180
+ Bhuwan Dhingra, Hanxiao Liu, William W Cohen, and Ruslan Salakhutdinov. Gated-attention readers for text comprehension. arXiv preprint arXiv:1606.01549, 2016.
181
+
182
+ Akira Fukui, Dong Huk Park, Daylen Yang, Anna Rohrbach, Trevor Darrell, and Marcus Rohrbach. Multimodal compact bilinear pooling for visual question answering and visual grounding. In EMNLP, 2016.
183
+
184
+ Karl Moritz Hermann, Tomas Kocisk ´ y, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa ´ Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. In NIPS, 2015.
185
+
186
+ Felix Hill, Antoine Bordes, Sumit Chopra, and Jason Weston. The goldilocks principle: Reading children’s books with explicit memory representations. In ICLR, 2016.
187
+
188
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. Neural Computation, 1997.
189
+
190
+ Rudolf Kadlec, Martin Schmid, Ondrej Bajgar, and Jan Kleindienst. Text understanding with the attention sum reader network. In ACL, 2016.
191
+
192
+ Yoon Kim. Convolutional neural networks for sentence classification. In EMNLP, 2014.
193
+
194
+ Sosuke Kobayashi, Ran Tian, Naoaki Okazaki, and Kentaro Inui. Dynamic entity representation with max-pooling improves machine reading. In NAACL-HLT, 2016.
195
+
196
+ Kenton Lee, Tom Kwiatkowski, Ankur Parikh, and Dipanjan Das. Learning recurrent span representations for extractive question answering. arXiv preprint arXiv:1611.01436, 2016.
197
+
198
+ Jiasen Lu, Jianwei Yang, Dhruv Batra, and Devi Parikh. Hierarchical question-image co-attention for visual question answering. In NIPS, 2016.
199
+
200
+ Mateusz Malinowski, Marcus Rohrbach, and Mario Fritz. Ask your neurons: A neural-based approach to answering questions about images. In ICCV, 2015.
201
+
202
+ Jeffrey Pennington, Richard Socher, and Christopher D Manning. Glove: Global vectors for word representation. In EMNLP, 2014.
203
+
204
+ Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: $1 0 0 { , } 0 0 0 { + }$ questions for machine comprehension of text. In EMNLP, 2016.
205
+
206
+ Matthew Richardson, Christopher JC Burges, and Erin Renshaw. Mctest: A challenge dataset for the open-domain machine comprehension of text. In EMNLP, 2013.
207
+
208
+ Yelong Shen, Po-Sen Huang, Jianfeng Gao, and Weizhu Chen. Reasonet: Learning to stop reading in machine comprehension. arXiv preprint arXiv:1609.05284, 2016.
209
+
210
+ Alessandro Sordoni, Phillip Bachman, and Yoshua Bengio. Iterative alternating neural attention for machine reading. arXiv preprint arXiv:1606.02245, 2016.
211
+
212
+ Nitish Srivastava, Geoffrey E. Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. JMLR, 2014.
213
+
214
+ Rupesh Kumar Srivastava, Klaus Greff, and Jurgen Schmidhuber. Highway networks. ¨ arXiv preprint arXiv:1505.00387, 2015.
215
+
216
+ Adam Trischler, Zheng Ye, Xingdi Yuan, and Kaheer Suleman. Natural language comprehension with the epireader. In EMNLP, 2016.
217
+ Shuohang Wang and Jing Jiang. Machine comprehension using match-lstm and answer pointer. arXiv preprint arXiv:1608.07905, 2016.
218
+ Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. In ICLR, 2015.
219
+ Caiming Xiong, Stephen Merity, and Richard Socher. Dynamic memory networks for visual and textual question answering. In ICML, 2016a.
220
+ Caiming Xiong, Victor Zhong, and Richard Socher. Dynamic coattention networks for question answering. arXiv preprint arXiv:1611.01604, 2016b.
221
+ Huijuan Xu and Kate Saenko. Ask, attend and answer: Exploring question-guided spatial attention for visual question answering. In ECCV, 2016.
222
+ Zhilin Yang, Bhuwan Dhingra, Ye Yuan, Junjie Hu, William W Cohen, and Ruslan Salakhutdinov. Words or characters? fine-grained gating for reading comprehension. arXiv preprint arXiv:1611.01724, 2016.
223
+ Zichao Yang, Xiaodong He, Jianfeng Gao, Li Deng, and Alex Smola. Stacked attention networks for image question answering. arXiv preprint arXiv:1511.02274, 2015.
224
+ Yang Yu, Wei Zhang, Kazi Hasan, Mo Yu, Bing Xiang, and Bowen Zhou. End-to-end reading comprehension with dynamic answer chunk ranking. arXiv preprint arXiv:1610.09996, 2016.
225
+ Matthew D Zeiler. Adadelta: an adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012.
226
+ Yuke Zhu, Oliver Groth, Michael S. Bernstein, and Li Fei-Fei. Visual7w: Grounded question answering in images. In CVPR, 2016.
227
+
228
+ # A ERROR ANALYSIS
229
+
230
+ Table 4 summarizes the modes of errors by BIDAF and shows examples for each category of error in SQuAD.
231
+
232
+ <table><tr><td>Error type</td><td>Ratio (%)</td><td>Example</td></tr><tr><td>Imprecise answer boundaries</td><td>50</td><td>Context: “The Free Movement of Workers Regulation articles 1 to 7 set out the main provisions on equal treatment of workers.” Question:“Which articles of the Free Movement of Workers Regulation set out the primary provisions on equal treatment of workers?” Prediction: “1 to 7&quot;, Answer: “articles 1 to 7”</td></tr><tr><td>Syntactic complications and ambiguities</td><td>28</td><td>Context: “A piece of paper was later found on which Luther had written his last statement.” Question: “What was later discovered written by Luther?&quot; Prediction: “A piece of paper&quot;,Answer: “his last statement&quot;</td></tr><tr><td>Paraphrase problems</td><td>14</td><td>tier model which includes primary education (primary schools), followed by secondary education (secondary schools/high schools) and tertiary education (universities and/or TAFE colleges).” Question:“What is the first model of education, in the Aus- tralian system?” Prediction: “three-tier”,Answer: “primary education&quot;</td></tr><tr><td>External knowledge</td><td>4</td><td>Context:“On June 4, 2014, the NFL announced that the practice of branding Super Bowl games with Roman numerals, a practice established at Super Bowl V,would be temporarily suspended,and that the game would be named using Arabic numerals as Super Bowl 50 as opposed to Super Bowl L.&quot; Question: “If Roman numerals were used in the naming of the 50th Super Bowl, which one would have been used?&#x27; Prediction: “Super Bowl 5O”, Answer: “L&quot;</td></tr><tr><td>Multi- sentence</td><td>2 starting in the mid-1980s.&quot;</td><td>interactive connections the network was enhanced to support terminal to host connections,host to host batch connections (remote job submission,remote printing,batch file transfer), interactive file transfer, gateways to the Tymnet and Telenet public data networks, X.25 host atachments, gateways to X.25 data networks,Ethernet attached hosts,and eventually TCP/IP and additional public universities in Michigan join the network. All of this set the stage for Merit&#x27;s role in the NSFNET project Question: “What set the stage for Merits role in NSFNET&quot; Prediction:“All of this set the stage for Merit &#x27;s role in the</td></tr><tr><td>Incorrect preprocessing</td><td>2</td><td>this work by showing that fire requires only a part of air that he called spiritus nitroaereus or just nitroaereus.&quot; Question: “John Mayow died in what year?&quot; Prediction: “1641-1679&quot;,Answer: “1679&quot;</td></tr></table>
233
+
234
+ into 6 different categories. Only relevant sentence(s) from the context shown for brevity.
235
+
236
+ # B VARIATIONS OF SIMILARITY AND FUSION FUNCTIONS
237
+
238
+ <table><tr><td></td><td>EM</td><td>F1</td></tr><tr><td>Eqn. 1: dot product Eqn. 1: linear Eqn. 1: bilinear</td><td>65.5 59.5 61.6</td><td>75.5 69.7 71.8</td></tr><tr><td>Eqn. 1: linear after MLP</td><td>66.2</td><td>76.4</td></tr><tr><td>Eqn. 2: MLP after concat</td><td>67.1</td><td>77.0</td></tr><tr><td>BIDAF (single)</td><td>68.0</td><td>77.3</td></tr></table>
239
+
240
+ Table 5: Variations of similarity function $\alpha$ (Equation 1) and fusion function $\beta$ (Equation 2) and their performance on the dev data of SQuAD. See Appendix B for the details of each variation.
241
+
242
+ In this appendix section, we experimentally demonstrate how different choices of the similarity function $\alpha$ (Equation 1) and the fusion function $\beta$ (Equation 2) impact the performance of our model. Each variation is defined as following:
243
+
244
+ Eqn. 1: dot product. Dot product $\alpha$ is defined as
245
+
246
+ $$
247
+ \alpha ( \mathbf { h } , \mathbf { u } ) = \mathbf { h } ^ { \top } \mathbf { u }
248
+ $$
249
+
250
+ where $\top$ indicates matrix transpose. Dot product has been used for the measurement of similarity between two vectors by Hill et al. (2016).
251
+
252
+ Eqn. 1: linear. Linear $\alpha$ is defined as
253
+
254
+ $$
255
+ \alpha ( \mathbf { h } , \mathbf { u } ) = \mathbf { w } _ { \mathrm { l i n } } ^ { \top } [ \mathbf { h } ; \mathbf { u } ]
256
+ $$
257
+
258
+ where $\mathbf { w } _ { \mathrm { l i n } } ^ { \top } \in \mathbb { R } ^ { 4 d }$ is a trainable weight matrix. This can be considered as the simplification of Equation 1 by dropping the term $\mathbf { h } \circ \mathbf { u }$ in the concatenation.
259
+
260
+ Eqn. 1: bilinear. Bilinear $\alpha$ is defined as
261
+
262
+ $$
263
+ \alpha ( \mathbf { h } , \mathbf { u } ) = \mathbf { h } ^ { \top } \mathbf { W } _ { \mathbf { \mathrm { b i } } } \mathbf { u }
264
+ $$
265
+
266
+ where $\mathbf { W _ { \mathrm { b i } } } \in \mathbb { R } ^ { 2 d \times 2 d }$ is a trainable weight matrix. Bilinear term has been used by Chen et al.
267
+ (2016).
268
+
269
+ Eqn. 1: linear after MLP. We can also perform linear mapping after single layer of perceptron:
270
+
271
+ $$
272
+ \alpha ( \mathbf { h } , \mathbf { u } ) = \mathbf { w } _ { \mathrm { l i n } } ^ { \top } \operatorname { t a n h } ( \mathbf { W } _ { \mathrm { m l p } } [ \mathbf { h } ; \mathbf { u } ] + \mathbf { b } _ { \mathrm { m l p } } )
273
+ $$
274
+
275
+ where $\mathbf { W } _ { \mathrm { m l p } }$ and $\mathbf { b } _ { \mathrm { m l p } }$ are trainable weight matrix and bias, respectively. Linear mapping after perceptron layer has been used by Hermann et al. (2015).
276
+
277
+ Eqn. 2: MLP after concatenation. We can define $\beta$ as
278
+
279
+ $$
280
+ \beta ( \mathbf { h } , { \tilde { \mathbf { u } } } , { \tilde { \mathbf { h } } } ) = \operatorname* { m a x } ( 0 , \mathbf { W } _ { \mathrm { m l p } } [ \mathbf { h } ; { \tilde { \mathbf { u } } } ; \mathbf { h } \circ { \tilde { \mathbf { u } } } ; \mathbf { h } \circ { \tilde { \mathbf { h } } } ] + \mathbf { b } _ { \mathrm { m l p } } )
281
+ $$
282
+
283
+ where $\mathbf { W } _ { \mathrm { m l p } } \in \mathbb { R } ^ { 2 d \times 8 d }$ and ${ \bf b } _ { \mathrm { m l p } } \in \mathbb { R } ^ { 2 d }$ are trainable weight matrix and bias. This is equivalent to adding ReLU after linearly transforming the original definition of $\beta$ . Since the output dimension of $\beta$ changes, the input dimension of the first LSTM of the modeling layer will change as well.
284
+
285
+ The results of these variations on the dev data of SQuAD are shown in Table 5. It is important to note that there are non-trivial gaps between our definition of $\alpha$ and other definitions employed by previous work. Adding MLP in $\beta$ does not seem to help, yielding slightly worse result than $\beta$ without MLP.
parse/train/HJ0UKP9ge/HJ0UKP9ge_content_list.json ADDED
@@ -0,0 +1,1417 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "BI-DIRECTIONAL ATTENTION FLOW FOR MACHINE COMPREHENSION ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 99,
9
+ 611,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Minjoon $\\mathbf { S e o ^ { 1 * } }$ Aniruddha Kembhavi2 Ali Farhadi1,2 Hananneh Hajishirzi1 University of Washington1, Allen Institute for Artificial Intelligence2 {minjoon,ali,hannaneh}@cs.washington.edu, $\\{ \\mathtt { a n i k } \\} \\ @ \\mathtt { a l l e n a i . o r g }$ ",
17
+ "bbox": [
18
+ 183,
19
+ 169,
20
+ 789,
21
+ 213
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 250,
32
+ 544,
33
+ 265
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Machine comprehension (MC), answering a query about a given context paragraph, requires modeling complex interactions between the context and the query. Recently, attention mechanisms have been successfully extended to MC. Typically these methods use attention to focus on a small portion of the context and summarize it with a fixed-size vector, couple attentions temporally, and/or often form a uni-directional attention. In this paper we introduce the Bi-Directional Attention Flow (BIDAF) network, a multi-stage hierarchical process that represents the context at different levels of granularity and uses bidirectional attention flow mechanism to obtain a query-aware context representation without early summarization. Our experimental evaluations show that our model achieves the state-of-the-art results in Stanford Question Answering Dataset (SQuAD) and CNN/DailyMail cloze test. ",
40
+ "bbox": [
41
+ 233,
42
+ 281,
43
+ 764,
44
+ 446
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 474,
55
+ 336,
56
+ 489
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "The tasks of machine comprehension (MC) and question answering (QA) have gained significant popularity over the past few years within the natural language processing and computer vision communities. Systems trained end-to-end now achieve promising results on a variety of tasks in the text and image domains. One of the key factors to the advancement has been the use of neural attention mechanism, which enables the system to focus on a targeted area within a context paragraph (for MC) or within an image (for Visual QA), that is most relevant to answer the question (Weston et al., 2015; Antol et al., 2015; Xiong et al., 2016a). Attention mechanisms in previous works typically have one or more of the following characteristics. First, the computed attention weights are often used to extract the most relevant information from the context for answering the question by summarizing the context into a fixed-size vector. Second, in the text domain, they are often temporally dynamic, whereby the attention weights at the current time step are a function of the attended vector at the previous time step. Third, they are usually uni-directional, wherein the query attends on the context paragraph or the image. ",
63
+ "bbox": [
64
+ 174,
65
+ 506,
66
+ 825,
67
+ 686
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "In this paper, we introduce the Bi-Directional Attention Flow (BIDAF) network, a hierarchical multi-stage architecture for modeling the representations of the context paragraph at different levels of granularity (Figure 1). BIDAF includes character-level, word-level, and contextual embeddings, and uses bi-directional attention flow to obtain a query-aware context representation. Our attention mechanism offers following improvements to the previously popular attention paradigms. First, our attention layer is not used to summarize the context paragraph into a fixed-size vector. Instead, the attention is computed for every time step, and the attended vector at each time step, along with the representations from previous layers, is allowed to flow through to the subsequent modeling layer. This reduces the information loss caused by early summarization. Second, we use a memory-less attention mechanism. That is, while we iteratively compute attention through time as in Bahdanau et al. (2015), the attention at each time step is a function of only the query and the context paragraph at the current time step and does not directly depend on the attention at the previous time step. We hypothesize that this simplification leads to the division of labor between the attention layer and the modeling layer. It forces the attention layer to focus on learning the attention between the query and the context, and enables the modeling layer to focus on learning the interaction within the query-aware context representation (the output of the attention layer). It also allows the attention at each time step to be unaffected from incorrect attendances at previous time steps. Our experiments show that memory-less attention gives a clear advantage over dynamic attention. Third, we use attention mechanisms in both directions, query-to-context and context-to-query, which provide complimentary information to each other. ",
74
+ "bbox": [
75
+ 174,
76
+ 693,
77
+ 825,
78
+ 901
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "image",
84
+ "img_path": "images/8ae29f18b08da1ee65cc07b50c3d43461883b2cbc78ed590d8d2592a92dfe01e.jpg",
85
+ "image_caption": [
86
+ "Figure 1: BiDirectional Attention Flow Model (best viewed in color) "
87
+ ],
88
+ "image_footnote": [],
89
+ "bbox": [
90
+ 173,
91
+ 102,
92
+ 841,
93
+ 401
94
+ ],
95
+ "page_idx": 1
96
+ },
97
+ {
98
+ "type": "text",
99
+ "text": "",
100
+ "bbox": [
101
+ 173,
102
+ 458,
103
+ 825,
104
+ 527
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "Our BIDAF model1 outperforms all previous approaches on the highly-competitive Stanford Question Answering Dataset (SQuAD) test set leaderboard at the time of submission. With a modification to only the output layer, BIDAF achieves the state-of-the-art results on the CNN/DailyMail cloze test. We also provide an in-depth ablation study of our model on the SQuAD development set, visualize the intermediate feature spaces in our model, and analyse its performance as compared to a more traditional language model for machine comprehension (Rajpurkar et al., 2016). ",
111
+ "bbox": [
112
+ 174,
113
+ 535,
114
+ 825,
115
+ 618
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "2 MODEL ",
122
+ "text_level": 1,
123
+ "bbox": [
124
+ 176,
125
+ 640,
126
+ 267,
127
+ 656
128
+ ],
129
+ "page_idx": 1
130
+ },
131
+ {
132
+ "type": "text",
133
+ "text": "Our machine comprehension model is a hierarchical multi-stage process and consists of six layers (Figure 1): ",
134
+ "bbox": [
135
+ 176,
136
+ 672,
137
+ 825,
138
+ 700
139
+ ],
140
+ "page_idx": 1
141
+ },
142
+ {
143
+ "type": "text",
144
+ "text": "1. Character Embedding Layer maps each word to a vector space using character-level CNNs. \n2. Word Embedding Layer maps each word to a vector space using a pre-trained word embedding model. \n3. Contextual Embedding Layer utilizes contextual cues from surrounding words to refine the embedding of the words. These first three layers are applied to both the query and context. \n4. Attention Flow Layer couples the query and context vectors and produces a set of queryaware feature vectors for each word in the context. \n5. Modeling Layer employs a Recurrent Neural Network to scan the context. \n6. Output Layer provides an answer to the query. ",
145
+ "bbox": [
146
+ 210,
147
+ 713,
148
+ 825,
149
+ 900
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "1. Character Embedding Layer. Character embedding layer is responsible for mapping each word to a high-dimensional vector space. Let $\\{ \\pmb { x } _ { 1 } , \\hdots \\pmb { x } _ { T } \\}$ and $\\{ q _ { 1 } , \\dots q _ { J } \\}$ represent the words in the input context paragraph and query, respectively. Following Kim (2014), we obtain the characterlevel embedding of each word using Convolutional Neural Networks (CNN). Characters are embedded into vectors, which can be considered as 1D inputs to the CNN, and whose size is the input channel size of the CNN. The outputs of the CNN are max-pooled over the entire width to obtain a fixed-size vector for each word. ",
156
+ "bbox": [
157
+ 173,
158
+ 103,
159
+ 825,
160
+ 202
161
+ ],
162
+ "page_idx": 2
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "2. Word Embedding Layer. Word embedding layer also maps each word to a high-dimensional vector space. We use pre-trained word vectors, GloVe (Pennington et al., 2014), to obtain the fixed word embedding of each word. ",
167
+ "bbox": [
168
+ 174,
169
+ 217,
170
+ 823,
171
+ 260
172
+ ],
173
+ "page_idx": 2
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "The concatenation of the character and word embedding vectors is passed to a two-layer Highway Network (Srivastava et al., 2015). The outputs of the Highway Network are two sequences of $d$ - dimensional vectors, or more conveniently, two matrices: $\\breve { \\mathbf { X } } \\in \\breve { \\mathbb { R } } ^ { d \\times T }$ for the context and $\\mathbf { Q } \\in \\mathbb { R } ^ { d \\times J }$ for the query. ",
178
+ "bbox": [
179
+ 173,
180
+ 266,
181
+ 825,
182
+ 323
183
+ ],
184
+ "page_idx": 2
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "3. Contextual Embedding Layer. We use a Long Short-Term Memory Network (LSTM) (Hochreiter & Schmidhuber, 1997) on top of the embeddings provided by the previous layers to model the temporal interactions between words. We place an LSTM in both directions, and concatenate the outputs of the two LSTMs. Hence we obtain $\\mathbf { H } \\in \\mathbb { R } ^ { 2 d \\times T }$ from the context word vectors $\\mathbf { X }$ , and $\\mathbf { U } \\in \\mathbb { R } ^ { 2 d \\times J }$ from query word vectors $\\mathbf { Q }$ . Note that each column vector of $\\mathbf { H }$ and $\\mathbf { U }$ is $2 d$ -dimensional because of the concatenation of the outputs of the forward and backward LSTMs, each with $d .$ -dimensional output. ",
189
+ "bbox": [
190
+ 173,
191
+ 339,
192
+ 825,
193
+ 436
194
+ ],
195
+ "page_idx": 2
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "It is worth noting that the first three layers of the model are computing features from the query and context at different levels of granularity, akin to the multi-stage feature computation of convolutional neural networks in the computer vision field. ",
200
+ "bbox": [
201
+ 174,
202
+ 444,
203
+ 825,
204
+ 486
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "4. Attention Flow Layer. Attention flow layer is responsible for linking and fusing information from the context and the query words. Unlike previously popular attention mechanisms (Weston et al., 2015; Hill et al., 2016; Sordoni et al., 2016; Shen et al., 2016), the attention flow layer is not used to summarize the query and context into single feature vectors. Instead, the attention vector at each time step, along with the embeddings from previous layers, are allowed to flow through to the subsequent modeling layer. This reduces the information loss caused by early summarization. ",
211
+ "bbox": [
212
+ 174,
213
+ 502,
214
+ 825,
215
+ 587
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "The inputs to the layer are contextual vector representations of the context H and the query U. The outputs of the layer are the query-aware vector representations of the context words, $\\mathbf { G }$ , along with the contextual embeddings from the previous layer. ",
222
+ "bbox": [
223
+ 174,
224
+ 593,
225
+ 825,
226
+ 636
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "In this layer, we compute attentions in two directions: from context to query as well as from query to context. Both of these attentions, which will be discussed below, are derived from a shared similarity matrix, $\\mathbf { S } \\in \\mathbb { R } ^ { T \\times J }$ , between the contextual embeddings of the context $( \\mathbf { H } )$ and the query (U), where $\\mathbf { S } _ { t j }$ indicates the similarity between $t$ -th context word and $j$ -th query word. The similarity matrix is computed by ",
233
+ "bbox": [
234
+ 174,
235
+ 642,
236
+ 823,
237
+ 712
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "equation",
243
+ "img_path": "images/bf4318ffe54749fd59c99d2261d600c2c1c80b3543e9e5a49312f46ec06d90ec.jpg",
244
+ "text": "$$\n\\mathbf { S } _ { t j } = \\alpha ( \\mathbf { H } _ { : t } , \\mathbf { U } _ { : j } ) \\in \\mathbb { R }\n$$",
245
+ "text_format": "latex",
246
+ "bbox": [
247
+ 419,
248
+ 712,
249
+ 578,
250
+ 729
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "where $\\alpha$ is a trainable scalar function that encodes the similarity between its two input vectors, $\\mathbf { H } _ { : t }$ is $t$ -th column vector of $\\mathbf { H }$ , and $\\mathbf { U } _ { : j }$ is $j$ -th column vector of $\\mathbf { U }$ , We choose $\\alpha ( \\mathbf { h } , \\mathbf { u } ) { \\bf \\bar { \\alpha } } = \\mathbf { w } _ { ( \\mathbf { s } ) } ^ { \\top } [ \\mathbf { h } ; \\mathbf { u } ; \\mathbf { h } \\circ$ $\\mathbf { u } ]$ , where $\\mathbf { w } _ { ( \\mathbf { S } ) } \\in \\mathbb { R } ^ { 6 d }$ is a trainable weight vector, $\\circ$ is elementwise multiplication, $[ ; ]$ is vector concatenation across row, and implicit multiplication is matrix multiplication. Now we use $\\mathbf { S }$ to obtain the attentions and the attended vectors in both directions. ",
257
+ "bbox": [
258
+ 174,
259
+ 733,
260
+ 823,
261
+ 808
262
+ ],
263
+ "page_idx": 2
264
+ },
265
+ {
266
+ "type": "text",
267
+ "text": "Context-to-query Attention. Context-to-query (C2Q) attention signifies which query words are most relevant to each context word. Let $\\mathbf { a } _ { t } \\in \\mathbf { \\overline { { \\mathbb { R } } } } ^ { J }$ represent the attention weights on the query words by $t { \\cdot }$ -th context word, $\\textstyle \\sum { \\mathbf { a } } _ { t j } = 1$ for all $t$ . The attention weight is computed by $\\mathbf { a } _ { t } = \\mathrm { s o f t m a x } ( \\mathbf { S } _ { t : } ) \\in$ $\\mathbb { R } ^ { J }$ , and subsequently each attended query vector is $\\begin{array} { r } { \\tilde { \\mathbf { U } } _ { : t } = \\sum _ { j } \\mathbf { a } _ { t j } \\mathbf { U } _ { : j } } \\end{array}$ . Hence $\\tilde { \\textbf { U } }$ is a $2 d$ -by- $\\mathcal { T }$ matrix containing the attended query vectors for the entire context. ",
268
+ "bbox": [
269
+ 174,
270
+ 814,
271
+ 823,
272
+ 888
273
+ ],
274
+ "page_idx": 2
275
+ },
276
+ {
277
+ "type": "text",
278
+ "text": "Query-to-context Attention. Query-to-context (Q2C) attention signifies which context words have the closest similarity to one of the query words and are hence critical for answering the query. ",
279
+ "bbox": [
280
+ 173,
281
+ 895,
282
+ 823,
283
+ 924
284
+ ],
285
+ "page_idx": 2
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "We obtain the attention weights on the context words by $\\mathbf { b } = \\mathrm { s o f t m a x } ( \\operatorname* { m a x } _ { c o l } ( \\mathbf { S } ) ) \\in \\mathbb { R } ^ { T }$ , where the maximum function $( \\mathrm { m a x } _ { c o l } )$ is performed across the column. Then the attended context vector is $\\begin{array} { r } { \\tilde { \\mathbf { h } } = \\sum _ { t } \\mathbf { b } _ { t } \\mathbf { H } _ { : t } \\in \\mathbb { R } ^ { 2 d } } \\end{array}$ . This vector indicates the weighted sum of the most important words in the context with respect to the query. $\\tilde { \\mathbf { h } }$ is tiled $T$ times across the column, thus giving $\\tilde { \\mathbf { H } } \\in \\mathbb { R } ^ { 2 d \\times T }$ . ",
290
+ "bbox": [
291
+ 173,
292
+ 102,
293
+ 825,
294
+ 165
295
+ ],
296
+ "page_idx": 3
297
+ },
298
+ {
299
+ "type": "text",
300
+ "text": "Finally, the contextual embeddings and the attention vectors are combined together to yield $\\mathbf { G }$ , where each column vector can be considered as the query-aware representation of each context word. We define $\\mathbf { G }$ by ",
301
+ "bbox": [
302
+ 174,
303
+ 171,
304
+ 825,
305
+ 213
306
+ ],
307
+ "page_idx": 3
308
+ },
309
+ {
310
+ "type": "equation",
311
+ "img_path": "images/f812340ff296a2eccd94efb27b9cd1ce9a3d621a09ac24ef9687ca1811ba6ec0.jpg",
312
+ "text": "$$\n\\mathbf { G } _ { : t } = \\beta ( \\mathbf { H } _ { : t } , \\tilde { \\mathbf { U } } _ { : t } , \\tilde { \\mathbf { H } } _ { : t } ) \\in \\mathbb { R } ^ { d _ { \\mathbf { G } } }\n$$",
313
+ "text_format": "latex",
314
+ "bbox": [
315
+ 393,
316
+ 210,
317
+ 602,
318
+ 231
319
+ ],
320
+ "page_idx": 3
321
+ },
322
+ {
323
+ "type": "text",
324
+ "text": "where $\\mathbf { G } _ { : t }$ is the $t { \\cdot }$ -th column vector (corresponding to $t$ -th context word), $\\beta$ is a trainable vector function that fuses its (three) input vectors, and $d _ { \\mathbf { G } }$ is the output dimension of the $\\beta$ function. While the $\\beta$ function can be an arbitrary trainable neural network, such as multi-layer perceptron, a simple concatenation as following still shows good performance in our experiments: $\\bar { \\beta } ( { \\bf h } , \\bar { \\tilde { \\bf u } } , \\tilde { \\bf h } ) =$ $[ \\mathbf { h } ; \\tilde { \\mathbf { u } } ; \\mathbf { h } \\circ \\tilde { \\mathbf { u } } ; \\mathbf { h } \\circ \\tilde { \\mathbf { h } } ] \\in \\mathbb { R } ^ { 8 d \\times T }$ (i.e., $d _ { \\mathbf { G } } = 8 d _ { \\mathbf { \\rho } }$ ). ",
325
+ "bbox": [
326
+ 174,
327
+ 232,
328
+ 825,
329
+ 308
330
+ ],
331
+ "page_idx": 3
332
+ },
333
+ {
334
+ "type": "text",
335
+ "text": "5. Modeling Layer. The input to the modeling layer is $\\mathbf { G }$ , which encodes the query-aware representations of context words. The output of the modeling layer captures the interaction among the context words conditioned on the query. This is different from the contextual embedding layer, which captures the interaction among context words independent of the query. We use two layers of bi-directional LSTM, with the output size of $d$ for each direction. Hence we obtain a matrix $\\mathbf { M } \\in \\mathbb { R } ^ { 2 d \\times T }$ , which is passed onto the output layer to predict the answer. Each column vector of M is expected to contain contextual information about the word with respect to the entire context paragraph and the query. ",
336
+ "bbox": [
337
+ 173,
338
+ 320,
339
+ 825,
340
+ 434
341
+ ],
342
+ "page_idx": 3
343
+ },
344
+ {
345
+ "type": "text",
346
+ "text": "6. Output Layer. The output layer is application-specific. The modular nature of BIDAF allows us to easily swap out the output layer based on the task, with the rest of the architecture remaining exactly the same. Here, we describe the output layer for the QA task. In section 5, we use a slight modification of this output layer for cloze-style comprehension. ",
347
+ "bbox": [
348
+ 173,
349
+ 446,
350
+ 825,
351
+ 505
352
+ ],
353
+ "page_idx": 3
354
+ },
355
+ {
356
+ "type": "text",
357
+ "text": "The QA task requires the model to find a sub-phrase of the paragraph to answer the query. The phrase is derived by predicting the start and the end indices of the phrase in the paragraph. We obtain the probability distribution of the start index over the entire paragraph by ",
358
+ "bbox": [
359
+ 173,
360
+ 511,
361
+ 825,
362
+ 554
363
+ ],
364
+ "page_idx": 3
365
+ },
366
+ {
367
+ "type": "equation",
368
+ "img_path": "images/1969557cf23df1f8bdc2accfd0548a82a2a41185a1e3dcce4dcbf923df10bf59.jpg",
369
+ "text": "$$\n\\mathbf { p } ^ { 1 } = \\mathrm { s o f t m a x } ( \\mathbf { w } _ { ( \\mathbf { p } ^ { 1 } ) } ^ { \\top } [ \\mathbf { G } ; \\mathbf { M } ] ) ,\n$$",
370
+ "text_format": "latex",
371
+ "bbox": [
372
+ 395,
373
+ 559,
374
+ 599,
375
+ 580
376
+ ],
377
+ "page_idx": 3
378
+ },
379
+ {
380
+ "type": "text",
381
+ "text": "where $\\mathbf { w } _ { ( \\mathbf { p } ^ { 1 } ) } \\in \\mathbb { R } ^ { 1 0 d }$ is a trainable weight vector. For the end index of the answer phrase, we pass $\\mathbf { M }$ to another bidirectional LSTM layer and obtain $\\mathbf { M } ^ { 2 } \\in \\mathbb { R } ^ { 2 d \\times T }$ . Then we use $\\mathbf { M } ^ { 2 }$ to obtain the probability distribution of the end index in a similar manner: ",
382
+ "bbox": [
383
+ 174,
384
+ 585,
385
+ 825,
386
+ 632
387
+ ],
388
+ "page_idx": 3
389
+ },
390
+ {
391
+ "type": "equation",
392
+ "img_path": "images/91b29fde4dc63e86f332602185b38be0cb927f43bcccbf80b53123ea813c3cf3.jpg",
393
+ "text": "$$\n\\mathbf { p } ^ { 2 } = \\mathrm { s o f t m a x } ( \\mathbf { w } _ { ( \\mathbf { p } ^ { 2 } ) } ^ { \\top } [ \\mathbf { G } ; \\mathbf { M } ^ { 2 } ] )\n$$",
394
+ "text_format": "latex",
395
+ "bbox": [
396
+ 393,
397
+ 637,
398
+ 602,
399
+ 659
400
+ ],
401
+ "page_idx": 3
402
+ },
403
+ {
404
+ "type": "text",
405
+ "text": "Training. We define the training loss (to be minimized) as the sum of the negative log probabilities of the true start and end indices by the predicted distributions, averaged over all examples: ",
406
+ "bbox": [
407
+ 173,
408
+ 670,
409
+ 826,
410
+ 699
411
+ ],
412
+ "page_idx": 3
413
+ },
414
+ {
415
+ "type": "equation",
416
+ "img_path": "images/fd322f72d8f1795d7e7b3b7ca0d064d0b8637364f2ebc2689046a949bae647a3.jpg",
417
+ "text": "$$\nL ( \\theta ) = - \\frac { 1 } { N } \\sum _ { i } ^ { N } \\log ( \\mathbf { p } _ { y _ { i } ^ { 1 } } ^ { 1 } ) + \\log ( \\mathbf { p } _ { y _ { i } ^ { 2 } } ^ { 2 } )\n$$",
418
+ "text_format": "latex",
419
+ "bbox": [
420
+ 370,
421
+ 704,
422
+ 627,
423
+ 747
424
+ ],
425
+ "page_idx": 3
426
+ },
427
+ {
428
+ "type": "text",
429
+ "text": "where $\\theta$ is the set of all trainable weights in the model (the weights and biases of CNN filters and LSTM cells, $\\mathbf { w } _ { ( \\mathbf { S } ) } , \\mathbf { w } _ { ( \\mathbf { p } ^ { 1 } ) }$ and $\\mathbf { w } _ { ( \\mathbf { p } ^ { 2 } ) , }$ ), $N$ is the number of examples in the dataset, $y _ { i } ^ { 1 }$ and $y _ { i } ^ { 2 }$ are the true start and end indices of the $i$ -th example, respectively, and $\\mathbf { p } _ { k }$ indicates the $k$ -th value of the vector $\\mathbf { p }$ . ",
430
+ "bbox": [
431
+ 173,
432
+ 752,
433
+ 825,
434
+ 809
435
+ ],
436
+ "page_idx": 3
437
+ },
438
+ {
439
+ "type": "text",
440
+ "text": "Test. The answer span $( k , l )$ where $k \\leq l$ with the maximum value of $\\mathbf { p } _ { k } ^ { 1 } \\mathbf { p } _ { l } ^ { 2 }$ is chosen, which can be computed in linear time with dynamic programming. ",
441
+ "bbox": [
442
+ 173,
443
+ 814,
444
+ 825,
445
+ 844
446
+ ],
447
+ "page_idx": 3
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "3 RELATED WORK ",
452
+ "text_level": 1,
453
+ "bbox": [
454
+ 176,
455
+ 863,
456
+ 344,
457
+ 881
458
+ ],
459
+ "page_idx": 3
460
+ },
461
+ {
462
+ "type": "text",
463
+ "text": "Machine comprehension. A significant contributor to the advancement of MC models has been the availability of large datasets. Early datasets such as MCTest (Richardson et al., 2013) were too small to train end-to-end neural models. Massive cloze test datasets (CNN/DailyMail by Hermann et al. (2015) and Childrens Book Test by Hill et al. (2016)), enabled the application of deep neural architectures to this task. More recently, Rajpurkar et al. (2016) released the Stanford Question Answering (SQuAD) dataset with over 100,000 questions. We evaluate the performance of our comprehension system on both SQuAD and CNN/DailyMail datasets. ",
464
+ "bbox": [
465
+ 173,
466
+ 895,
467
+ 825,
468
+ 924
469
+ ],
470
+ "page_idx": 3
471
+ },
472
+ {
473
+ "type": "text",
474
+ "text": "",
475
+ "bbox": [
476
+ 174,
477
+ 103,
478
+ 823,
479
+ 172
480
+ ],
481
+ "page_idx": 4
482
+ },
483
+ {
484
+ "type": "text",
485
+ "text": "Previous works in end-to-end machine comprehension use attention mechanisms in three distinct ways. The first group (largely inspired by Bahdanau et al. (2015)) uses a dynamic attention mechanism, in which the attention weights are updated dynamically given the query and the context as well as the previous attention. Hermann et al. (2015) argue that the dynamic attention model performs better than using a single fixed query vector to attend on context words on CNN & DailyMail datasets. Chen et al. (2016) show that simply using bilinear term for computing the attention weights in the same model drastically improves the accuracy. Wang & Jiang (2016) reverse the direction of the attention (attending on query words as the context RNN progresses) for SQuAD. In contrast to these models, BIDAF uses a memory-less attention mechanism. ",
486
+ "bbox": [
487
+ 174,
488
+ 180,
489
+ 825,
490
+ 305
491
+ ],
492
+ "page_idx": 4
493
+ },
494
+ {
495
+ "type": "text",
496
+ "text": "The second group computes the attention weights once, which are then fed into an output layer for final prediction (e.g., Kadlec et al. (2016)). Attention-over-attention model (Cui et al., 2016) uses a 2D similarity matrix between the query and context words (similar to Equation 1) to compute the weighted average of query-to-context attention. In contrast to these models, BIDAF does not summarize the two modalities in the attention layer and instead lets the attention vectors flow into the modeling (RNN) layer. ",
497
+ "bbox": [
498
+ 174,
499
+ 313,
500
+ 825,
501
+ 396
502
+ ],
503
+ "page_idx": 4
504
+ },
505
+ {
506
+ "type": "text",
507
+ "text": "The third group (considered as variants of Memory Network (Weston et al., 2015)) repeats computing an attention vector between the query and the context through multiple layers, typically referred to as multi-hop (Sordoni et al., 2016; Dhingra et al., 2016). Shen et al. (2016) combine Memory Networks with Reinforcement Learning in order to dynamically control the number of hops. One can also extend our BIDAF model to incorporate multiple hops. ",
508
+ "bbox": [
509
+ 174,
510
+ 402,
511
+ 825,
512
+ 472
513
+ ],
514
+ "page_idx": 4
515
+ },
516
+ {
517
+ "type": "text",
518
+ "text": "Visual question answering. The task of question answering has also gained a lot of interest in the computer vision community. Early works on visual question answering (VQA) involved encoding the question using an RNN, encoding the image using a CNN and combining them to answer the question (Antol et al., 2015; Malinowski et al., 2015). Attention mechanisms have also been successfully employed for the VQA task and can be broadly clustered based on the granularity of their attention and the approach to construct the attention matrix. At the coarse level of granularity, the question attends to different patches in the image (Zhu et al., 2016; Xiong et al., 2016a). At a finer level, each question word attends to each image patch and the highest attention value for each spatial location (Xu & Saenko, 2016) is adopted. A hybrid approach is to combine questions representations at multiple levels of granularity (unigrams, bigrams, trigrams) (Yang et al., 2015). Several approaches to constructing the attention matrix have been used including element-wise product, element-wise sum, concatenation and Multimodal Compact Bilinear Pooling (Fukui et al., 2016). ",
519
+ "bbox": [
520
+ 174,
521
+ 488,
522
+ 825,
523
+ 654
524
+ ],
525
+ "page_idx": 4
526
+ },
527
+ {
528
+ "type": "text",
529
+ "text": "Lu et al. (2016) have recently shown that in addition to attending from the question to image patches, attending from the image back to the question words provides an improvement on the VQA task. This finding in the visual domain is consistent with our finding in the language domain, where our bi-directional attention between the query and context provides improved results. Their model, however, uses the attention weights directly in the output layer and does not take advantage of the attention flow to the modeling layer. ",
530
+ "bbox": [
531
+ 174,
532
+ 661,
533
+ 825,
534
+ 746
535
+ ],
536
+ "page_idx": 4
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "4 QUESTION ANSWERING EXPERIMENTS ",
541
+ "text_level": 1,
542
+ "bbox": [
543
+ 176,
544
+ 765,
545
+ 531,
546
+ 781
547
+ ],
548
+ "page_idx": 4
549
+ },
550
+ {
551
+ "type": "text",
552
+ "text": "In this section, we evaluate our model on the task of question answering using the recently released SQuAD (Rajpurkar et al., 2016), which has gained a huge attention over a few months. In the next section, we evaluate our model on the task of cloze-style reading comprehension. ",
553
+ "bbox": [
554
+ 174,
555
+ 796,
556
+ 823,
557
+ 838
558
+ ],
559
+ "page_idx": 4
560
+ },
561
+ {
562
+ "type": "text",
563
+ "text": "Dataset. SQuAD is a machine comprehension dataset on a large set of Wikipedia articles, with more than 100,000 questions. The answer to each question is always a span in the context. The model is given a credit if its answer matches one of the human written answers. Two metrics are used to evaluate models: Exact Match (EM) and a softer metric, F1 score, which measures the weighted average of the precision and recall rate at character level. The dataset consists of $9 0 \\mathrm { k } / 1 0 \\mathrm { k }$ ",
564
+ "bbox": [
565
+ 174,
566
+ 854,
567
+ 823,
568
+ 922
569
+ ],
570
+ "page_idx": 4
571
+ },
572
+ {
573
+ "type": "table",
574
+ "img_path": "images/d5be28906fe9556b22047bf7df3beeafa32e1d9004d52aec9fec2af3aab6c4ec.jpg",
575
+ "table_caption": [],
576
+ "table_footnote": [
577
+ "(a) Results on the SQuAD test set "
578
+ ],
579
+ "table_body": "<table><tr><td></td><td colspan=\"2\">Single Model</td><td colspan=\"2\">Ensemble</td></tr><tr><td></td><td>EM</td><td>F1</td><td>EM</td><td>F1</td></tr><tr><td>Logistic Regression Baselinea</td><td>40.4</td><td>51.0</td><td>-</td><td>-</td></tr><tr><td>Dynamic Chunk Readerb</td><td>62.5</td><td>71.0</td><td>-</td><td>-</td></tr><tr><td>Fine-Grained Gatingc</td><td>62.5</td><td>73.3</td><td>1</td><td>-</td></tr><tr><td>Match-LSTMd</td><td>64.7</td><td>73.7</td><td>67.9</td><td>77.0</td></tr><tr><td>Multi-Perspective Matchinge</td><td>65.5</td><td>75.1</td><td>68.2</td><td>77.2</td></tr><tr><td>Dynamic Coattention Networksf</td><td>66.2</td><td>75.9</td><td>71.6</td><td>80.4</td></tr><tr><td>R-Net9</td><td>68.4</td><td>77.5</td><td>72.1</td><td>79.7</td></tr><tr><td>BIDAF (Ours)</td><td>68.0</td><td>77.3</td><td>73.3</td><td>81.1</td></tr></table>",
580
+ "bbox": [
581
+ 178,
582
+ 101,
583
+ 573,
584
+ 234
585
+ ],
586
+ "page_idx": 5
587
+ },
588
+ {
589
+ "type": "table",
590
+ "img_path": "images/bd63f00351babffdbccd8606e70f2c30e637db2a89b08deb1b3e5dab361ce306.jpg",
591
+ "table_caption": [],
592
+ "table_footnote": [
593
+ "(b) Ablations on the SQuAD dev set "
594
+ ],
595
+ "table_body": "<table><tr><td></td><td>EM</td><td>F1</td></tr><tr><td>No char embedding No word embedding No C2Q attention</td><td>65.0 55.5 57.2</td><td>75.4 66.8 67.7</td></tr><tr><td>No Q2C attention Dynamic attention</td><td>63.6 63.5</td><td>73.7 73.6</td></tr><tr><td>BIDAF (single)</td><td>67.7</td><td>77.3</td></tr><tr><td>BIDAF (ensemble)</td><td>72.6</td><td>80.7</td></tr></table>",
596
+ "bbox": [
597
+ 583,
598
+ 113,
599
+ 810,
600
+ 220
601
+ ],
602
+ "page_idx": 5
603
+ },
604
+ {
605
+ "type": "text",
606
+ "text": "Table 1: (1a) The performance of our model BIDAF and competing approaches by Rajpurkar et al. $( 2 0 1 6 ) ^ { a }$ , Yu et al. $( 2 0 1 6 ) ^ { b }$ , Yang et al. $( 2 0 1 6 ) ^ { c }$ , Wang & Jiang $( 2 0 1 6 ) ^ { d }$ , IBM Watsone (unpublished), Xiong et al. $( 2 0 1 6 \\mathrm { b } ) ^ { f }$ , and Microsoft Research $\\mathrm { A s i a } ^ { g }$ (unpublished) on the SQuAD test set. A concurrent work by Lee et al. (2016) does not report the test scores. All results shown here reflect the SQuAD leaderboard (stanford-qa.com) as of 6 Dec 2016, $1 2 \\mathrm { p m }$ PST. (1b) The performance of our model and its ablations on the SQuAD dev set. Ablation results are presented only for single runs. ",
607
+ "bbox": [
608
+ 173,
609
+ 263,
610
+ 825,
611
+ 362
612
+ ],
613
+ "page_idx": 5
614
+ },
615
+ {
616
+ "type": "text",
617
+ "text": "train/dev question-context tuples with a large hidden test set. It is one of the largest available MC datasets with human-written questions and serves as a great test bed for our model. ",
618
+ "bbox": [
619
+ 173,
620
+ 392,
621
+ 823,
622
+ 420
623
+ ],
624
+ "page_idx": 5
625
+ },
626
+ {
627
+ "type": "text",
628
+ "text": "Model Details. The model architecture used for this task is depicted in Figure 1. Each paragraph and question are tokenized by a regular-expression-based word tokenizer (PTB Tokenizer) and fed into the model. We use $1 0 0 ~ 1 \\mathrm { D }$ filters for CNN char embedding, each with a width of 5. The hidden state size $( d )$ of the model is 100. The model has about 2.6 million parameters. We use the AdaDelta (Zeiler, 2012) optimizer, with a minibatch size of 60 and an initial learning rate of 0.5, for 12 epochs. A dropout (Srivastava et al., 2014) rate of 0.2 is used for the CNN, all LSTM layers, and the linear transformation before the softmax for the answers. During training, the moving averages of all weights of the model are maintained with the exponential decay rate of 0.999. At test time, the moving averages instead of the raw weights are used. The training process takes roughly 20 hours on a single Titan X GPU. We also train an ensemble model consisting of 12 training runs with the identical architecture and hyper-parameters. At test time, we choose the answer with the highest sum of confidence scores amongst the 12 runs for each question. ",
629
+ "bbox": [
630
+ 174,
631
+ 439,
632
+ 825,
633
+ 604
634
+ ],
635
+ "page_idx": 5
636
+ },
637
+ {
638
+ "type": "text",
639
+ "text": "Results. The results of our model and competing approaches on the hidden test are summarized in Table 1a. BIDAF (ensemble) achieves an EM score of 73.3 and an F1 score of 81.1, outperforming all previous approaches. ",
640
+ "bbox": [
641
+ 174,
642
+ 625,
643
+ 825,
644
+ 665
645
+ ],
646
+ "page_idx": 5
647
+ },
648
+ {
649
+ "type": "text",
650
+ "text": "Ablations. Table 1b shows the performance of our model and its ablations on the SQuAD dev set. Both char-level and word-level embeddings contribute towards the model’s performance. We conjecture that word-level embedding is better at representing the semantics of each word as a whole, while char-level embedding can better handle out-of-vocab (OOV) or rare words. To evaluate bidirectional attention, we remove C2Q and Q2C attentions. For ablating C2Q attention, we replace the attended question vector $\\tilde { \\textbf { U } }$ with the average of the output vectors of the question’s contextual embedding layer (LSTM). C2Q attention proves to be critical with a drop of more than 10 points on both metrics. For ablating Q2C attention, the output of the attention layer, G, does not include terms that have the attended Q2C vectors, $\\tilde { \\bf H }$ . To evaluate the attention flow, we study a dynamic attention model, where the attention is dynamically computed within the modeling layer’s LSTM, following previous work (Bahdanau et al., 2015; Wang & Jiang, 2016). This is in contrast with our approach, where the attention is pre-computed before flowing to the modeling layer. Despite being a simpler attention mechanism, our proposed static attention outperforms the dynamically computed attention by more than 3 points. We conjecture that separating out the attention layer results in a richer set of features computed in the first 4 layers which are then incorporated by the modeling layer. We also show the performance of BIDAF with several different definitions of $\\alpha$ and $\\beta$ functions (Equation 1 and 2) in Appendix B. ",
651
+ "bbox": [
652
+ 173,
653
+ 684,
654
+ 825,
655
+ 924
656
+ ],
657
+ "page_idx": 5
658
+ },
659
+ {
660
+ "type": "table",
661
+ "img_path": "images/f2fcc8f85c406edc8d18f820bfac664997346ceeb8d178ef7aee259977ac81bc.jpg",
662
+ "table_caption": [],
663
+ "table_footnote": [],
664
+ "table_body": "<table><tr><td>Layer</td><td>Query</td><td>Closest words in the Context using cosine similarity</td></tr><tr><td>Word</td><td>When</td><td>when,When,After,after,He,he,But,but,before,Before</td></tr><tr><td>Contextual</td><td>When</td><td>When, when,1945,1991,1971,1967,1990,1972,1965,1953</td></tr><tr><td>Word</td><td>Where</td><td>Where,where,It,IT,it,they,They,that,That,city</td></tr><tr><td>Contextual</td><td>Where</td><td>where,Where,Rotterdam,area,Nearby,location,outside,Area,across,locations</td></tr><tr><td>Word Contextual</td><td>Who Who</td><td>Who,who,He,he,had,have,she,She,They,they who,whose,whom,Guiscard, person, John,Thomas,families,Elway,Louis</td></tr><tr><td>Word Contextual</td><td>city</td><td>City,city, town,Town, Capital,capital, district, cities,province,Downtown</td></tr><tr><td>Word</td><td>city January</td><td>city,City,Angeles,Paris,Prague,Chicago,Port,Pittsburgh,London,Manhattan July,December,June,October,Juary,eptember,February,April,November,rch</td></tr><tr><td>Contextual</td><td>January</td><td>January,March,December,August,December,July,July,July,March,December</td></tr><tr><td>Word</td><td>Seahawks</td><td>Seahawks,Broncos,49ers,Ravens,Chargers,Steelers,quarterback,Vikings,Colts,NFL</td></tr><tr><td>Contextual Word</td><td>Seahawks</td><td>Seahawks,Broncos,Panthers,Vikings,Packers,Ravens,Patriots,Falcons,Steelers,Chargers</td></tr><tr><td>Contextual</td><td>date</td><td>date,dates,until,Until,June,July,Year,year,December,deadline</td></tr><tr><td></td><td>date</td><td>date,dates,December,July,January,October,June,November,March,February</td></tr></table>",
665
+ "bbox": [
666
+ 207,
667
+ 99,
668
+ 790,
669
+ 261
670
+ ],
671
+ "page_idx": 6
672
+ },
673
+ {
674
+ "type": "image",
675
+ "img_path": "images/7757c7656332a6a3b06f97b0ebf7763ba27b455d0c2af2acf07a0dcd8b41d2e2.jpg",
676
+ "image_caption": [
677
+ "Table 2: Closest context words to a given query word, using a cosine similarity metric computed in the Word Embedding feature space and the Phrase Embedding feature space. ",
678
+ "Figure 2: (a) t-SNE visualizations of the months names embedded in the two feature spaces. The contextual embedding layer is able to distinguish the two usages of the word May using context from the surrounding text. (b) Venn diagram of the questions answered correctly by our model and the more traditional baseline (Rajpurkar et al., 2016). (c) Correctly answered questions broken down by the 10 most frequent first words in the question. "
679
+ ],
680
+ "image_footnote": [],
681
+ "bbox": [
682
+ 174,
683
+ 318,
684
+ 841,
685
+ 501
686
+ ],
687
+ "page_idx": 6
688
+ },
689
+ {
690
+ "type": "text",
691
+ "text": "Visualizations. We now provide a qualitative analysis of our model on the SQuAD dev set. First, we visualize the feature spaces after the word and contextual embedding layers. These two layers are responsible for aligning the embeddings between the query and context words which are the inputs to the subsequent attention layer. To visualize the embeddings, we choose a few frequent query words in the dev data and look at the context words that have the highest cosine similarity to the query words (Table 2). At the word embedding layer, query words such as When, Where and Who are not well aligned to possible answers in the context, but this dramatically changes in the contextual embedding layer which has access to context from surrounding words and is just 1 layer below the attention layer. When begins to match years, Where matches locations, and Who matches names. ",
692
+ "bbox": [
693
+ 174,
694
+ 593,
695
+ 825,
696
+ 731
697
+ ],
698
+ "page_idx": 6
699
+ },
700
+ {
701
+ "type": "text",
702
+ "text": "We also visualize these two feature spaces using t-SNE in Figure 2. t-SNE is performed on a large fraction of dev data but we only plot data points corresponding to the months of the year. An interesting pattern emerges in the Word space, where May is separated from the rest of the months because May has multiple meanings in the English language. The contextual embedding layer uses contextual cues from surrounding words and is able to separate the usages of the word May. Finally we visualize the attention matrices for some question-context tuples in the dev data in Figure 3. In the first example, Where matches locations and in the second example, many matches quantities and numerical symbols. Also, entities in the question typically attend to the same entities in the context, thus providing a feature for the model to localize possible answers. ",
703
+ "bbox": [
704
+ 174,
705
+ 738,
706
+ 825,
707
+ 864
708
+ ],
709
+ "page_idx": 6
710
+ },
711
+ {
712
+ "type": "text",
713
+ "text": "Discussions. We analyse the performance of our our model with a traditional language-featurebased baseline (Rajpurkar et al., 2016). Figure 2b shows a Venn diagram of the dev set questions correctly answered by the models. Our model is able to answer more than $86 \\%$ of the questions correctly answered by the baseline. The $14 \\%$ that are incorrectly answered does not have a clear pattern. This suggests that neural architectures are able to exploit much of the information captured by the language features. We also break this comparison down by the first words in the questions (Figure 2c). Our model outperforms the traditional baseline comfortably in every category. ",
714
+ "bbox": [
715
+ 176,
716
+ 882,
717
+ 823,
718
+ 922
719
+ ],
720
+ "page_idx": 6
721
+ },
722
+ {
723
+ "type": "image",
724
+ "img_path": "images/26d62f32002af2aad3857c67045cb6f5ec597c54027d4550e780e69ce794908c.jpg",
725
+ "image_caption": [
726
+ "Figure 3: Attention matrices for question-context tuples. The left palette shows the context paragraph (correct answer in red and underlined), the middle palette shows the attention matrix (each row is a question word, each column is a context word), and the right palette shows the top attention points for each question word, above a threshold. "
727
+ ],
728
+ "image_footnote": [],
729
+ "bbox": [
730
+ 210,
731
+ 108,
732
+ 787,
733
+ 353
734
+ ],
735
+ "page_idx": 7
736
+ },
737
+ {
738
+ "type": "text",
739
+ "text": "",
740
+ "bbox": [
741
+ 174,
742
+ 448,
743
+ 823,
744
+ 503
745
+ ],
746
+ "page_idx": 7
747
+ },
748
+ {
749
+ "type": "text",
750
+ "text": "Error Analysis. We randomly select 50 incorrect questions (based on EM) and categorize them into 6 classes. $50 \\%$ of errors are due to the imprecise boundaries of the answers, $28 \\%$ involve syntactic complications and ambiguities, $14 \\%$ are paraphrase problems, $4 \\%$ require external knowledge, $2 \\%$ need multiple sentences to answer, and $2 \\%$ are due to mistakes during tokenization. See Appendix A for the examples of the error modes. ",
751
+ "bbox": [
752
+ 174,
753
+ 520,
754
+ 825,
755
+ 588
756
+ ],
757
+ "page_idx": 7
758
+ },
759
+ {
760
+ "type": "text",
761
+ "text": "5 CLOZE TEST EXPERIMENTS ",
762
+ "text_level": 1,
763
+ "bbox": [
764
+ 176,
765
+ 609,
766
+ 437,
767
+ 626
768
+ ],
769
+ "page_idx": 7
770
+ },
771
+ {
772
+ "type": "text",
773
+ "text": "We also evaluate our model on the task of cloze-style reading comprehension using the CNN and Daily Mail datasets (Hermann et al., 2015). ",
774
+ "bbox": [
775
+ 176,
776
+ 641,
777
+ 823,
778
+ 670
779
+ ],
780
+ "page_idx": 7
781
+ },
782
+ {
783
+ "type": "text",
784
+ "text": "Dataset. In a cloze test, the reader is asked to fill in words that have been removed from a passage, for measuring one’s ability to comprehend text. Hermann et al. (2015) have recently compiled a massive Cloze-style comprehension dataset, consisting of $3 0 0 \\mathrm { k } / 4 \\mathrm { k } / 3 \\mathrm { k }$ and 879k/65k/53k (train/dev/test) examples from CNN and DailyMail news articles, respectively. Each example has a news article and an incomplete sentence extracted from the human-written summary of the article. To distinguish this task from language modeling and force one to refer to the article to predict the correct missing word, the missing word is always a named entity, anonymized with a random ID. Also, the IDs must be shuffled constantly during test, which is also critical for full anonymization. ",
785
+ "bbox": [
786
+ 174,
787
+ 685,
788
+ 825,
789
+ 796
790
+ ],
791
+ "page_idx": 7
792
+ },
793
+ {
794
+ "type": "text",
795
+ "text": "Model Details. The model architecture used for this task is very similar to that for SQuAD (Section 4) with only a few small changes to adapt it to the cloze test. Since each answer in the CNN/DailyMail datasets is always a single word (entity), we only need to predict the start index $( \\mathbf { p } ^ { 1 } )$ ; the prediction for the end index $( \\mathbf { p } ^ { 2 } )$ is omitted from the loss function. Also, we mask out all non-entity words in the final classification layer so that they are forced to be excluded from possible answers. Another important difference from SQuAD is that the answer entity might appear more than once in the context paragraph. To address this, we follow a similar strategy from Kadlec et al. (2016). During training, after we obtain $\\mathbf { p } ^ { 1 }$ , we sum all probability values of the entity instances in the context that correspond to the correct answer. Then the loss function is computed from the summed probability. We use a minibatch size of 48 and train for 8 epochs, with early stop when the accuracy on validation data starts to drop. Inspired by the window-based method (Hill et al., 2016), we split each article into short sentences where each sentence is a 19-word window around each entity (hence the same word might appear in multiple sentences). The RNNs in BIDAF are not feed-forwarded or back-propagated across sentences, which speed up the training process by parallelization. The entire training process takes roughly 60 hours on eight Titan X GPUs. The other hyper-parameters are identical to the model described in Section 4. ",
796
+ "bbox": [
797
+ 174,
798
+ 811,
799
+ 823,
800
+ 924
801
+ ],
802
+ "page_idx": 7
803
+ },
804
+ {
805
+ "type": "text",
806
+ "text": "",
807
+ "bbox": [
808
+ 174,
809
+ 103,
810
+ 825,
811
+ 214
812
+ ],
813
+ "page_idx": 8
814
+ },
815
+ {
816
+ "type": "text",
817
+ "text": "Results. The results of our single-run models and competing approaches on the CNN/DailyMail datasets are summarized in Table 3. ∗ indicates ensemble methods. BIDAF outperforms previous single-run models on both datasets for both val and test data. On the DailyMail test, our single-run model even outperforms the best ensemble method. ",
818
+ "bbox": [
819
+ 176,
820
+ 231,
821
+ 823,
822
+ 286
823
+ ],
824
+ "page_idx": 8
825
+ },
826
+ {
827
+ "type": "table",
828
+ "img_path": "images/b3455d1bcda92df746b7c3eb45ff04084e0e86625a0bbfd7fb1543ade71a3ec1.jpg",
829
+ "table_caption": [
830
+ "Table 3: Results on CNN/DailyMail datasets. We also include the results of previous ensemble methods (marked with $^ *$ ) for completeness. "
831
+ ],
832
+ "table_footnote": [],
833
+ "table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"2\">CNN</td><td colspan=\"2\">DailyMail</td></tr><tr><td>val</td><td>test</td><td>val</td><td>test</td></tr><tr><td>Attentive Reader (Hermann et al.,2015)</td><td>61.6</td><td>63.0</td><td>70.5</td><td>69.0</td></tr><tr><td>MemNN (Hill et al.,2016)</td><td>63.4</td><td>6.8</td><td>=</td><td></td></tr><tr><td>AS Reader (Kadlec et al.,2016)</td><td>68.6</td><td>69.5</td><td>75.0</td><td>73.9</td></tr><tr><td>DER Network (Kobayashi et al.,2016)</td><td>71.3</td><td>72.9</td><td>1</td><td>-</td></tr><tr><td>Iterative Attention (Sordoni et al.,2016)</td><td>72.6</td><td>73.3</td><td>-</td><td>=</td></tr><tr><td>EpiReader (Trischler et al.,2016) Stanford AR (Chen et al.,2016)</td><td>73.4</td><td>74.0</td><td>=</td><td>-</td></tr><tr><td>GAReader (Dhingra et al.,2016)</td><td>73.8</td><td>73.6</td><td>77.6</td><td>76.6</td></tr><tr><td>AoA Reader (Cui et al., 2016)</td><td>73.0</td><td>73.8</td><td>76.7</td><td>75.7</td></tr><tr><td></td><td>73.1</td><td>74.4</td><td></td><td>=</td></tr><tr><td>ReasoNet (Shen et al.,2016) BIDAF (Ours)</td><td>72.9</td><td>74.7</td><td>77.6</td><td>76.6</td></tr><tr><td>MemNN* (Hill et al., 2016)</td><td>76.3</td><td>76.9</td><td>80.3</td><td>79.6</td></tr><tr><td></td><td>66.2</td><td>69.4</td><td>-</td><td>=</td></tr><tr><td>ASReader* (Kadlec et al.,2016)</td><td>73.9</td><td>75.4</td><td>78.7</td><td>77.7</td></tr><tr><td>Iterative Attention*(Sordoni et al.,2016)</td><td>74.5</td><td>75.7</td><td>-</td><td>-</td></tr><tr><td>GA Reader* (Dhingra et al.,2016)</td><td>76.4</td><td>77.4</td><td>79.1</td><td>78.1</td></tr><tr><td>Stanford AR*(Chen et al., 2016)</td><td>77.2</td><td>77.6</td><td>80.2</td><td>79.2</td></tr></table>",
834
+ "bbox": [
835
+ 279,
836
+ 299,
837
+ 720,
838
+ 530
839
+ ],
840
+ "page_idx": 8
841
+ },
842
+ {
843
+ "type": "text",
844
+ "text": "6 CONCLUSION ",
845
+ "text_level": 1,
846
+ "bbox": [
847
+ 174,
848
+ 597,
849
+ 318,
850
+ 612
851
+ ],
852
+ "page_idx": 8
853
+ },
854
+ {
855
+ "type": "text",
856
+ "text": "In this paper, we introduce BIDAF, a multi-stage hierarchical process that represents the context at different levels of granularity and uses a bi-directional attention flow mechanism to achieve a queryaware context representation without early summarization. The experimental evaluations show that our model achieves the state-of-the-art results in Stanford Question Answering Dataset (SQuAD) and CNN/DailyMail cloze test. The ablation analyses demonstrate the importance of each component in our model. The visualizations and discussions show that our model is learning a suitable representation for MC and is capable of answering complex questions by attending to correct locations in the given paragraph. Future work involves extending our approach to incorporate multiple hops of the attention layer. ",
857
+ "bbox": [
858
+ 174,
859
+ 627,
860
+ 825,
861
+ 753
862
+ ],
863
+ "page_idx": 8
864
+ },
865
+ {
866
+ "type": "text",
867
+ "text": "ACKNOWLEDGMENTS ",
868
+ "text_level": 1,
869
+ "bbox": [
870
+ 176,
871
+ 770,
872
+ 326,
873
+ 782
874
+ ],
875
+ "page_idx": 8
876
+ },
877
+ {
878
+ "type": "text",
879
+ "text": "This research was supported by the NSF (IIS 1616112), NSF (III 1703166), Allen Institute for AI (66-9175), Allen Distinguished Investigator Award, Google Research Faculty Award, and Samsung GRO Award. We thank the anonymous reviewers for their helpful comments. ",
880
+ "bbox": [
881
+ 174,
882
+ 792,
883
+ 825,
884
+ 834
885
+ ],
886
+ "page_idx": 8
887
+ },
888
+ {
889
+ "type": "text",
890
+ "text": "REFERENCES ",
891
+ "text_level": 1,
892
+ "bbox": [
893
+ 174,
894
+ 103,
895
+ 287,
896
+ 117
897
+ ],
898
+ "page_idx": 9
899
+ },
900
+ {
901
+ "type": "text",
902
+ "text": "Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C Lawrence Zitnick, and Devi Parikh. Vqa: Visual question answering. In ICCV, 2015. ",
903
+ "bbox": [
904
+ 176,
905
+ 126,
906
+ 821,
907
+ 155
908
+ ],
909
+ "page_idx": 9
910
+ },
911
+ {
912
+ "type": "text",
913
+ "text": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. ICLR, 2015. ",
914
+ "bbox": [
915
+ 176,
916
+ 162,
917
+ 821,
918
+ 191
919
+ ],
920
+ "page_idx": 9
921
+ },
922
+ {
923
+ "type": "text",
924
+ "text": "Danqi Chen, Jason Bolton, and Christopher D. Manning. A thorough examination of the cnn/daily mail reading comprehension task. In ACL, 2016. ",
925
+ "bbox": [
926
+ 174,
927
+ 199,
928
+ 823,
929
+ 229
930
+ ],
931
+ "page_idx": 9
932
+ },
933
+ {
934
+ "type": "text",
935
+ "text": "Yiming Cui, Zhipeng Chen, Si Wei, Shijin Wang, Ting Liu, and Guoping Hu. Attention-overattention neural networks for reading comprehension. arXiv preprint arXiv:1607.04423, 2016. ",
936
+ "bbox": [
937
+ 174,
938
+ 237,
939
+ 823,
940
+ 267
941
+ ],
942
+ "page_idx": 9
943
+ },
944
+ {
945
+ "type": "text",
946
+ "text": "Bhuwan Dhingra, Hanxiao Liu, William W Cohen, and Ruslan Salakhutdinov. Gated-attention readers for text comprehension. arXiv preprint arXiv:1606.01549, 2016. ",
947
+ "bbox": [
948
+ 174,
949
+ 273,
950
+ 823,
951
+ 304
952
+ ],
953
+ "page_idx": 9
954
+ },
955
+ {
956
+ "type": "text",
957
+ "text": "Akira Fukui, Dong Huk Park, Daylen Yang, Anna Rohrbach, Trevor Darrell, and Marcus Rohrbach. Multimodal compact bilinear pooling for visual question answering and visual grounding. In EMNLP, 2016. ",
958
+ "bbox": [
959
+ 174,
960
+ 311,
961
+ 825,
962
+ 354
963
+ ],
964
+ "page_idx": 9
965
+ },
966
+ {
967
+ "type": "text",
968
+ "text": "Karl Moritz Hermann, Tomas Kocisk ´ y, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa ´ Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. In NIPS, 2015. ",
969
+ "bbox": [
970
+ 174,
971
+ 363,
972
+ 823,
973
+ 392
974
+ ],
975
+ "page_idx": 9
976
+ },
977
+ {
978
+ "type": "text",
979
+ "text": "Felix Hill, Antoine Bordes, Sumit Chopra, and Jason Weston. The goldilocks principle: Reading children’s books with explicit memory representations. In ICLR, 2016. ",
980
+ "bbox": [
981
+ 173,
982
+ 400,
983
+ 821,
984
+ 429
985
+ ],
986
+ "page_idx": 9
987
+ },
988
+ {
989
+ "type": "text",
990
+ "text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. Neural Computation, 1997. ",
991
+ "bbox": [
992
+ 174,
993
+ 438,
994
+ 810,
995
+ 453
996
+ ],
997
+ "page_idx": 9
998
+ },
999
+ {
1000
+ "type": "text",
1001
+ "text": "Rudolf Kadlec, Martin Schmid, Ondrej Bajgar, and Jan Kleindienst. Text understanding with the attention sum reader network. In ACL, 2016. ",
1002
+ "bbox": [
1003
+ 173,
1004
+ 460,
1005
+ 821,
1006
+ 491
1007
+ ],
1008
+ "page_idx": 9
1009
+ },
1010
+ {
1011
+ "type": "text",
1012
+ "text": "Yoon Kim. Convolutional neural networks for sentence classification. In EMNLP, 2014. ",
1013
+ "bbox": [
1014
+ 171,
1015
+ 498,
1016
+ 754,
1017
+ 513
1018
+ ],
1019
+ "page_idx": 9
1020
+ },
1021
+ {
1022
+ "type": "text",
1023
+ "text": "Sosuke Kobayashi, Ran Tian, Naoaki Okazaki, and Kentaro Inui. Dynamic entity representation with max-pooling improves machine reading. In NAACL-HLT, 2016. ",
1024
+ "bbox": [
1025
+ 173,
1026
+ 521,
1027
+ 825,
1028
+ 551
1029
+ ],
1030
+ "page_idx": 9
1031
+ },
1032
+ {
1033
+ "type": "text",
1034
+ "text": "Kenton Lee, Tom Kwiatkowski, Ankur Parikh, and Dipanjan Das. Learning recurrent span representations for extractive question answering. arXiv preprint arXiv:1611.01436, 2016. ",
1035
+ "bbox": [
1036
+ 173,
1037
+ 559,
1038
+ 823,
1039
+ 589
1040
+ ],
1041
+ "page_idx": 9
1042
+ },
1043
+ {
1044
+ "type": "text",
1045
+ "text": "Jiasen Lu, Jianwei Yang, Dhruv Batra, and Devi Parikh. Hierarchical question-image co-attention for visual question answering. In NIPS, 2016. ",
1046
+ "bbox": [
1047
+ 173,
1048
+ 595,
1049
+ 823,
1050
+ 626
1051
+ ],
1052
+ "page_idx": 9
1053
+ },
1054
+ {
1055
+ "type": "text",
1056
+ "text": "Mateusz Malinowski, Marcus Rohrbach, and Mario Fritz. Ask your neurons: A neural-based approach to answering questions about images. In ICCV, 2015. ",
1057
+ "bbox": [
1058
+ 173,
1059
+ 633,
1060
+ 821,
1061
+ 664
1062
+ ],
1063
+ "page_idx": 9
1064
+ },
1065
+ {
1066
+ "type": "text",
1067
+ "text": "Jeffrey Pennington, Richard Socher, and Christopher D Manning. Glove: Global vectors for word representation. In EMNLP, 2014. ",
1068
+ "bbox": [
1069
+ 174,
1070
+ 670,
1071
+ 823,
1072
+ 700
1073
+ ],
1074
+ "page_idx": 9
1075
+ },
1076
+ {
1077
+ "type": "text",
1078
+ "text": "Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: $1 0 0 { , } 0 0 0 { + }$ questions for machine comprehension of text. In EMNLP, 2016. ",
1079
+ "bbox": [
1080
+ 173,
1081
+ 708,
1082
+ 823,
1083
+ 738
1084
+ ],
1085
+ "page_idx": 9
1086
+ },
1087
+ {
1088
+ "type": "text",
1089
+ "text": "Matthew Richardson, Christopher JC Burges, and Erin Renshaw. Mctest: A challenge dataset for the open-domain machine comprehension of text. In EMNLP, 2013. ",
1090
+ "bbox": [
1091
+ 173,
1092
+ 746,
1093
+ 823,
1094
+ 775
1095
+ ],
1096
+ "page_idx": 9
1097
+ },
1098
+ {
1099
+ "type": "text",
1100
+ "text": "Yelong Shen, Po-Sen Huang, Jianfeng Gao, and Weizhu Chen. Reasonet: Learning to stop reading in machine comprehension. arXiv preprint arXiv:1609.05284, 2016. ",
1101
+ "bbox": [
1102
+ 173,
1103
+ 782,
1104
+ 823,
1105
+ 813
1106
+ ],
1107
+ "page_idx": 9
1108
+ },
1109
+ {
1110
+ "type": "text",
1111
+ "text": "Alessandro Sordoni, Phillip Bachman, and Yoshua Bengio. Iterative alternating neural attention for machine reading. arXiv preprint arXiv:1606.02245, 2016. ",
1112
+ "bbox": [
1113
+ 173,
1114
+ 820,
1115
+ 821,
1116
+ 849
1117
+ ],
1118
+ "page_idx": 9
1119
+ },
1120
+ {
1121
+ "type": "text",
1122
+ "text": "Nitish Srivastava, Geoffrey E. Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. JMLR, 2014. ",
1123
+ "bbox": [
1124
+ 176,
1125
+ 858,
1126
+ 820,
1127
+ 887
1128
+ ],
1129
+ "page_idx": 9
1130
+ },
1131
+ {
1132
+ "type": "text",
1133
+ "text": "Rupesh Kumar Srivastava, Klaus Greff, and Jurgen Schmidhuber. Highway networks. ¨ arXiv preprint arXiv:1505.00387, 2015. ",
1134
+ "bbox": [
1135
+ 174,
1136
+ 895,
1137
+ 820,
1138
+ 924
1139
+ ],
1140
+ "page_idx": 9
1141
+ },
1142
+ {
1143
+ "type": "text",
1144
+ "text": "Adam Trischler, Zheng Ye, Xingdi Yuan, and Kaheer Suleman. Natural language comprehension with the epireader. In EMNLP, 2016. \nShuohang Wang and Jing Jiang. Machine comprehension using match-lstm and answer pointer. arXiv preprint arXiv:1608.07905, 2016. \nJason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. In ICLR, 2015. \nCaiming Xiong, Stephen Merity, and Richard Socher. Dynamic memory networks for visual and textual question answering. In ICML, 2016a. \nCaiming Xiong, Victor Zhong, and Richard Socher. Dynamic coattention networks for question answering. arXiv preprint arXiv:1611.01604, 2016b. \nHuijuan Xu and Kate Saenko. Ask, attend and answer: Exploring question-guided spatial attention for visual question answering. In ECCV, 2016. \nZhilin Yang, Bhuwan Dhingra, Ye Yuan, Junjie Hu, William W Cohen, and Ruslan Salakhutdinov. Words or characters? fine-grained gating for reading comprehension. arXiv preprint arXiv:1611.01724, 2016. \nZichao Yang, Xiaodong He, Jianfeng Gao, Li Deng, and Alex Smola. Stacked attention networks for image question answering. arXiv preprint arXiv:1511.02274, 2015. \nYang Yu, Wei Zhang, Kazi Hasan, Mo Yu, Bing Xiang, and Bowen Zhou. End-to-end reading comprehension with dynamic answer chunk ranking. arXiv preprint arXiv:1610.09996, 2016. \nMatthew D Zeiler. Adadelta: an adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012. \nYuke Zhu, Oliver Groth, Michael S. Bernstein, and Li Fei-Fei. Visual7w: Grounded question answering in images. In CVPR, 2016. ",
1145
+ "bbox": [
1146
+ 171,
1147
+ 101,
1148
+ 826,
1149
+ 513
1150
+ ],
1151
+ "page_idx": 10
1152
+ },
1153
+ {
1154
+ "type": "text",
1155
+ "text": "A ERROR ANALYSIS ",
1156
+ "text_level": 1,
1157
+ "bbox": [
1158
+ 176,
1159
+ 102,
1160
+ 361,
1161
+ 118
1162
+ ],
1163
+ "page_idx": 11
1164
+ },
1165
+ {
1166
+ "type": "table",
1167
+ "img_path": "images/c89daff472cb59789f6d16c0dd62bfa25ad697e77e404d8aebeb180a2e4fe0a9.jpg",
1168
+ "table_caption": [
1169
+ "Table 4 summarizes the modes of errors by BIDAF and shows examples for each category of error in SQuAD. "
1170
+ ],
1171
+ "table_footnote": [
1172
+ "into 6 different categories. Only relevant sentence(s) from the context shown for brevity. "
1173
+ ],
1174
+ "table_body": "<table><tr><td>Error type</td><td>Ratio (%)</td><td>Example</td></tr><tr><td>Imprecise answer boundaries</td><td>50</td><td>Context: “The Free Movement of Workers Regulation articles 1 to 7 set out the main provisions on equal treatment of workers.” Question:“Which articles of the Free Movement of Workers Regulation set out the primary provisions on equal treatment of workers?” Prediction: “1 to 7&quot;, Answer: “articles 1 to 7”</td></tr><tr><td>Syntactic complications and ambiguities</td><td>28</td><td>Context: “A piece of paper was later found on which Luther had written his last statement.” Question: “What was later discovered written by Luther?&quot; Prediction: “A piece of paper&quot;,Answer: “his last statement&quot;</td></tr><tr><td>Paraphrase problems</td><td>14</td><td>tier model which includes primary education (primary schools), followed by secondary education (secondary schools/high schools) and tertiary education (universities and/or TAFE colleges).” Question:“What is the first model of education, in the Aus- tralian system?” Prediction: “three-tier”,Answer: “primary education&quot;</td></tr><tr><td>External knowledge</td><td>4</td><td>Context:“On June 4, 2014, the NFL announced that the practice of branding Super Bowl games with Roman numerals, a practice established at Super Bowl V,would be temporarily suspended,and that the game would be named using Arabic numerals as Super Bowl 50 as opposed to Super Bowl L.&quot; Question: “If Roman numerals were used in the naming of the 50th Super Bowl, which one would have been used?&#x27; Prediction: “Super Bowl 5O”, Answer: “L&quot;</td></tr><tr><td>Multi- sentence</td><td>2 starting in the mid-1980s.&quot;</td><td>interactive connections the network was enhanced to support terminal to host connections,host to host batch connections (remote job submission,remote printing,batch file transfer), interactive file transfer, gateways to the Tymnet and Telenet public data networks, X.25 host atachments, gateways to X.25 data networks,Ethernet attached hosts,and eventually TCP/IP and additional public universities in Michigan join the network. All of this set the stage for Merit&#x27;s role in the NSFNET project Question: “What set the stage for Merits role in NSFNET&quot; Prediction:“All of this set the stage for Merit &#x27;s role in the</td></tr><tr><td>Incorrect preprocessing</td><td>2</td><td>this work by showing that fire requires only a part of air that he called spiritus nitroaereus or just nitroaereus.&quot; Question: “John Mayow died in what year?&quot; Prediction: “1641-1679&quot;,Answer: “1679&quot;</td></tr></table>",
1175
+ "bbox": [
1176
+ 176,
1177
+ 176,
1178
+ 838,
1179
+ 905
1180
+ ],
1181
+ "page_idx": 11
1182
+ },
1183
+ {
1184
+ "type": "text",
1185
+ "text": "B VARIATIONS OF SIMILARITY AND FUSION FUNCTIONS ",
1186
+ "text_level": 1,
1187
+ "bbox": [
1188
+ 173,
1189
+ 102,
1190
+ 661,
1191
+ 119
1192
+ ],
1193
+ "page_idx": 12
1194
+ },
1195
+ {
1196
+ "type": "table",
1197
+ "img_path": "images/40d69b450a344d34ad00545609fe529e7ceb8a0508d872ce0aa5b8302b59ff67.jpg",
1198
+ "table_caption": [],
1199
+ "table_footnote": [],
1200
+ "table_body": "<table><tr><td></td><td>EM</td><td>F1</td></tr><tr><td>Eqn. 1: dot product Eqn. 1: linear Eqn. 1: bilinear</td><td>65.5 59.5 61.6</td><td>75.5 69.7 71.8</td></tr><tr><td>Eqn. 1: linear after MLP</td><td>66.2</td><td>76.4</td></tr><tr><td>Eqn. 2: MLP after concat</td><td>67.1</td><td>77.0</td></tr><tr><td>BIDAF (single)</td><td>68.0</td><td>77.3</td></tr></table>",
1201
+ "bbox": [
1202
+ 370,
1203
+ 136,
1204
+ 629,
1205
+ 229
1206
+ ],
1207
+ "page_idx": 12
1208
+ },
1209
+ {
1210
+ "type": "text",
1211
+ "text": "Table 5: Variations of similarity function $\\alpha$ (Equation 1) and fusion function $\\beta$ (Equation 2) and their performance on the dev data of SQuAD. See Appendix B for the details of each variation. ",
1212
+ "bbox": [
1213
+ 171,
1214
+ 241,
1215
+ 825,
1216
+ 270
1217
+ ],
1218
+ "page_idx": 12
1219
+ },
1220
+ {
1221
+ "type": "text",
1222
+ "text": "In this appendix section, we experimentally demonstrate how different choices of the similarity function $\\alpha$ (Equation 1) and the fusion function $\\beta$ (Equation 2) impact the performance of our model. Each variation is defined as following: ",
1223
+ "bbox": [
1224
+ 174,
1225
+ 287,
1226
+ 825,
1227
+ 330
1228
+ ],
1229
+ "page_idx": 12
1230
+ },
1231
+ {
1232
+ "type": "text",
1233
+ "text": "Eqn. 1: dot product. Dot product $\\alpha$ is defined as ",
1234
+ "bbox": [
1235
+ 174,
1236
+ 344,
1237
+ 513,
1238
+ 361
1239
+ ],
1240
+ "page_idx": 12
1241
+ },
1242
+ {
1243
+ "type": "equation",
1244
+ "img_path": "images/6fa89ff813c1d136328e6c070b71598f381c5098b1f722d4f8530cbc6a355e13.jpg",
1245
+ "text": "$$\n\\alpha ( \\mathbf { h } , \\mathbf { u } ) = \\mathbf { h } ^ { \\top } \\mathbf { u }\n$$",
1246
+ "text_format": "latex",
1247
+ "bbox": [
1248
+ 444,
1249
+ 366,
1250
+ 553,
1251
+ 386
1252
+ ],
1253
+ "page_idx": 12
1254
+ },
1255
+ {
1256
+ "type": "text",
1257
+ "text": "where $\\top$ indicates matrix transpose. Dot product has been used for the measurement of similarity between two vectors by Hill et al. (2016). ",
1258
+ "bbox": [
1259
+ 173,
1260
+ 391,
1261
+ 825,
1262
+ 421
1263
+ ],
1264
+ "page_idx": 12
1265
+ },
1266
+ {
1267
+ "type": "text",
1268
+ "text": "Eqn. 1: linear. Linear $\\alpha$ is defined as ",
1269
+ "bbox": [
1270
+ 174,
1271
+ 435,
1272
+ 434,
1273
+ 450
1274
+ ],
1275
+ "page_idx": 12
1276
+ },
1277
+ {
1278
+ "type": "equation",
1279
+ "img_path": "images/6d678d4d0e3d8ef01aacef302643fe6f2f2da851c115ec517ee093b301177dd5.jpg",
1280
+ "text": "$$\n\\alpha ( \\mathbf { h } , \\mathbf { u } ) = \\mathbf { w } _ { \\mathrm { l i n } } ^ { \\top } [ \\mathbf { h } ; \\mathbf { u } ]\n$$",
1281
+ "text_format": "latex",
1282
+ "bbox": [
1283
+ 429,
1284
+ 457,
1285
+ 570,
1286
+ 476
1287
+ ],
1288
+ "page_idx": 12
1289
+ },
1290
+ {
1291
+ "type": "text",
1292
+ "text": "where $\\mathbf { w } _ { \\mathrm { l i n } } ^ { \\top } \\in \\mathbb { R } ^ { 4 d }$ is a trainable weight matrix. This can be considered as the simplification of Equation 1 by dropping the term $\\mathbf { h } \\circ \\mathbf { u }$ in the concatenation. ",
1293
+ "bbox": [
1294
+ 176,
1295
+ 481,
1296
+ 825,
1297
+ 511
1298
+ ],
1299
+ "page_idx": 12
1300
+ },
1301
+ {
1302
+ "type": "text",
1303
+ "text": "Eqn. 1: bilinear. Bilinear $\\alpha$ is defined as ",
1304
+ "bbox": [
1305
+ 174,
1306
+ 525,
1307
+ 459,
1308
+ 541
1309
+ ],
1310
+ "page_idx": 12
1311
+ },
1312
+ {
1313
+ "type": "equation",
1314
+ "img_path": "images/d24caebcc9d9499277220fef2ea362fde5962d5c485b462bee314f3f860f4e92.jpg",
1315
+ "text": "$$\n\\alpha ( \\mathbf { h } , \\mathbf { u } ) = \\mathbf { h } ^ { \\top } \\mathbf { W } _ { \\mathbf { \\mathrm { b i } } } \\mathbf { u }\n$$",
1316
+ "text_format": "latex",
1317
+ "bbox": [
1318
+ 429,
1319
+ 546,
1320
+ 568,
1321
+ 565
1322
+ ],
1323
+ "page_idx": 12
1324
+ },
1325
+ {
1326
+ "type": "text",
1327
+ "text": "where $\\mathbf { W _ { \\mathrm { b i } } } \\in \\mathbb { R } ^ { 2 d \\times 2 d }$ is a trainable weight matrix. Bilinear term has been used by Chen et al. \n(2016). ",
1328
+ "bbox": [
1329
+ 174,
1330
+ 571,
1331
+ 825,
1332
+ 602
1333
+ ],
1334
+ "page_idx": 12
1335
+ },
1336
+ {
1337
+ "type": "text",
1338
+ "text": "Eqn. 1: linear after MLP. We can also perform linear mapping after single layer of perceptron: ",
1339
+ "bbox": [
1340
+ 171,
1341
+ 614,
1342
+ 815,
1343
+ 632
1344
+ ],
1345
+ "page_idx": 12
1346
+ },
1347
+ {
1348
+ "type": "equation",
1349
+ "img_path": "images/0d8226a4fcc9b2f626c0cc6df22dd93d629bfa3e1588c462d0d4c9009b45c5c0.jpg",
1350
+ "text": "$$\n\\alpha ( \\mathbf { h } , \\mathbf { u } ) = \\mathbf { w } _ { \\mathrm { l i n } } ^ { \\top } \\operatorname { t a n h } ( \\mathbf { W } _ { \\mathrm { m l p } } [ \\mathbf { h } ; \\mathbf { u } ] + \\mathbf { b } _ { \\mathrm { m l p } } )\n$$",
1351
+ "text_format": "latex",
1352
+ "bbox": [
1353
+ 361,
1354
+ 637,
1355
+ 637,
1356
+ 656
1357
+ ],
1358
+ "page_idx": 12
1359
+ },
1360
+ {
1361
+ "type": "text",
1362
+ "text": "where $\\mathbf { W } _ { \\mathrm { m l p } }$ and $\\mathbf { b } _ { \\mathrm { m l p } }$ are trainable weight matrix and bias, respectively. Linear mapping after perceptron layer has been used by Hermann et al. (2015). ",
1363
+ "bbox": [
1364
+ 169,
1365
+ 662,
1366
+ 825,
1367
+ 691
1368
+ ],
1369
+ "page_idx": 12
1370
+ },
1371
+ {
1372
+ "type": "text",
1373
+ "text": "Eqn. 2: MLP after concatenation. We can define $\\beta$ as ",
1374
+ "bbox": [
1375
+ 174,
1376
+ 705,
1377
+ 553,
1378
+ 722
1379
+ ],
1380
+ "page_idx": 12
1381
+ },
1382
+ {
1383
+ "type": "equation",
1384
+ "img_path": "images/3db20fbae49fbe88ba2ccf79f56fa769a5c9c74c05e60dadee74ea9be971db76.jpg",
1385
+ "text": "$$\n\\beta ( \\mathbf { h } , { \\tilde { \\mathbf { u } } } , { \\tilde { \\mathbf { h } } } ) = \\operatorname* { m a x } ( 0 , \\mathbf { W } _ { \\mathrm { m l p } } [ \\mathbf { h } ; { \\tilde { \\mathbf { u } } } ; \\mathbf { h } \\circ { \\tilde { \\mathbf { u } } } ; \\mathbf { h } \\circ { \\tilde { \\mathbf { h } } } ] + \\mathbf { b } _ { \\mathrm { m l p } } )\n$$",
1386
+ "text_format": "latex",
1387
+ "bbox": [
1388
+ 315,
1389
+ 727,
1390
+ 681,
1391
+ 747
1392
+ ],
1393
+ "page_idx": 12
1394
+ },
1395
+ {
1396
+ "type": "text",
1397
+ "text": "where $\\mathbf { W } _ { \\mathrm { m l p } } \\in \\mathbb { R } ^ { 2 d \\times 8 d }$ and ${ \\bf b } _ { \\mathrm { m l p } } \\in \\mathbb { R } ^ { 2 d }$ are trainable weight matrix and bias. This is equivalent to adding ReLU after linearly transforming the original definition of $\\beta$ . Since the output dimension of $\\beta$ changes, the input dimension of the first LSTM of the modeling layer will change as well. ",
1398
+ "bbox": [
1399
+ 174,
1400
+ 753,
1401
+ 825,
1402
+ 797
1403
+ ],
1404
+ "page_idx": 12
1405
+ },
1406
+ {
1407
+ "type": "text",
1408
+ "text": "The results of these variations on the dev data of SQuAD are shown in Table 5. It is important to note that there are non-trivial gaps between our definition of $\\alpha$ and other definitions employed by previous work. Adding MLP in $\\beta$ does not seem to help, yielding slightly worse result than $\\beta$ without MLP. ",
1409
+ "bbox": [
1410
+ 174,
1411
+ 804,
1412
+ 825,
1413
+ 861
1414
+ ],
1415
+ "page_idx": 12
1416
+ }
1417
+ ]
parse/train/HJ0UKP9ge/HJ0UKP9ge_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HJ0UKP9ge/HJ0UKP9ge_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rkdU7tCaZ/rkdU7tCaZ.md ADDED
@@ -0,0 +1,251 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DYNAMIC EVALUATION OF NEURAL SEQUENCE MODELS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ We present methodology for using dynamic evaluation to improve neural sequence models. Models are adapted to recent history via a gradient descent based mechanism, causing them to assign higher probabilities to re-occurring sequential patterns. Dynamic evaluation outperforms existing adaptation approaches in our comparisons. Dynamic evaluation improves the state-of-the-art word-level perplexities on the Penn Treebank and WikiText-2 datasets to 51.1 and 44.3 respectively, and the state-of-the-art character-level cross-entropies on the text8 and Hutter Prize datasets to 1.19 bits/char and 1.08 bits/char respectively.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Sequence generation and prediction tasks span many modes of data, ranging from audio and language modelling, to more general timeseries prediction tasks. Applications of such models include speech recognition, machine translation, dialogue generation, speech synthesis, forecasting, and music generation, among others. Neural networks can be applied to these tasks by predicting sequence elements one-by-one, conditioning on the history of sequence elements, forming an autoregressive model. Convolutional neural networks (CNNs) and recurrent neural networks (RNNs), including long-short term memory (LSTM) networks (Hochreiter & Schmidhuber, 1997) in particular, have achieved many successes at these tasks. However, in their basic form, these models have a limited ability to adapt to recently observed parts of a sequence.
12
+
13
+ Many sequences contain repetition; a pattern that occurs once is more likely to occur again. For instance, a word that occurs once in a document is much more likely to occur again. A sequence of handwriting will generally stay in the same handwriting style. A sequence of speech will generally stay in the same voice. Although RNNs have a hidden state that can summarize the recent past, they are often unable to exploit new patterns that occur repeatedly in a test sequence.
14
+
15
+ This paper concerns dynamic evaluation, which we investigate as a candidate solution to this problem. Our approach adapts models to recent sequences using gradient descent based mechanisms. We show several ways to improve on past dynamic evaluation approaches in Section 5, and use our improved methodology to achieve state-of-the-art results in Section 7. In Section 6 we design a method to dramatically to reduce the number of adaptation parameters in dynamic evaluation, making it practical in a wider range of situations. In Section 7.4 we analyse dynamic evaluation’s performance over varying time-scales and distribution shifts, and demonstrate that dynamically evaluated models can generate conditional samples that repeat many patterns from the conditioning data.
16
+
17
+ # 2 MOTIVATION
18
+
19
+ Generative models can assign probabilities to sequences by modelling each term in the factorization given by the product rule. The probability of a sequence $\stackrel { \cdot } { x _ { 1 : T } } = \{ x _ { 1 } , \stackrel { \cdot } { \dots } , x _ { T } \}$ factorizes as
20
+
21
+ $$
22
+ P ( x _ { 1 : T } ) = P ( x _ { 1 } ) P ( x _ { 2 } | x _ { 1 } ) P ( x _ { 3 } | x _ { 2 } , x _ { 1 } ) \cdot \cdot \cdot P ( x _ { T } | x _ { 1 } \ldots x _ { T - 1 } ) .
23
+ $$
24
+
25
+ Methods that apply this factorization either use a fixed context when predicting $P ( x _ { t } | x _ { 1 : t - 1 } )$ , for instance as in $\mathbf { N } .$ -grams or CNNs, or use a recurrent hidden state to summarize the context, as in an RNN. However, for longer sequences, the history $x _ { 1 : t - 1 }$ often contains re-occurring patterns that are difficult to capture using models with fixed parameters (static models).
26
+
27
+ In many domains, in a dataset of sequences $\{ x _ { 1 : T } ^ { 1 } , x _ { 1 : T } ^ { 2 } , . . . , x _ { 1 : T } ^ { M } \}$ , each sequence $\boldsymbol { x } _ { 1 : T } ^ { i }$ is generated from a slightly different distribution $P ( x _ { 1 : T } ^ { i } )$ . At any point in time $t$ , the history of a sequence $x _ { 1 : t - 1 } ^ { i }$ contains useful information about the generating distribution for that specific sequence $P ( x _ { 1 : T } ^ { i } )$ Therefore adapting the model parameters learned during training $\theta _ { g }$ is justified. We aim to infer a set of model parameters $\theta _ { l }$ from $x _ { 1 : t - 1 } ^ { i }$ that will better approximate $\bar { P } ( x _ { t } ^ { i } | x _ { 1 : t - 1 } ^ { i } )$ within sequence $i$ .
28
+
29
+ Many sequence modelling tasks are characterised by sequences generated from slightly different distributions as in the scenario described above. The generating distribution may also change continuously across a single sequence; for instance, a text excerpt may change topic. Furthermore, many machine learning benchmarks do not distinguish between sequence boundaries, and concatenate all sequences into one continuous sequence. Thus, many sequence modelling tasks could be seen as having a local distribution $P _ { l } ( x )$ as well as a global distribution $\textstyle P _ { g } ( x ) : = { \bar { J } } P ( l ) P _ { l } ( x ) d l$ . During training time, the goal is to find the best fixed model possible for $P _ { g } ( x )$ . However, during evaluation time, a model that can infer the current $P _ { l } ( x )$ from the recent history has an advantage.
30
+
31
+ # 3 DYNAMIC EVALUATION
32
+
33
+ Dynamic evaluation methods continuously adapt the model parameters $\theta _ { g }$ , learned at training time, to parts of a sequence during evaluation. The goal is to learn adapted parameters $\theta _ { l }$ that provide a better model of the local sequence distribution, $P _ { l } ( x )$ . When dynamic evaluation is applied in the present work, a long test sequence $x _ { 1 : T }$ is divided up into shorter sequences of length $n$ . We define $s _ { 1 : M }$ to be a sequence of shorter sequence segments $s _ { i }$
34
+
35
+ $$
36
+ s _ { 1 : M } = \{ s _ { 1 } = x _ { 1 : n } , \ s _ { 2 } = x _ { n + 1 : 2 n } , \ s _ { 3 } = x _ { 2 n + 1 : 3 n } , \ . . . , \ s _ { M } \} .
37
+ $$
38
+
39
+ The initial adapted parameters $\theta _ { l } ^ { 0 }$ are set to $\theta _ { g }$ , and used to compute the probability of the first segment, $P ( s _ { 1 } | \theta _ { l } ^ { 0 } )$ . This probability gives a cross entropy loss $\mathcal { L } ( s _ { 1 } )$ , with gradient $\nabla \mathcal { L } ( s _ { 1 } )$ , which is computed using truncated back-propagation through time (Werbos, 1990). The gradient $\nabla { \mathcal { L } } ( s _ { 1 } )$ is used to update the model, resulting in adapted parameters $\theta _ { l } ^ { 1 }$ , before evaluating $\bar { P ( s _ { 2 } | \theta _ { l } ^ { 1 } ) }$ . The same procedure is then repeated for $s _ { 2 }$ , and for each $s _ { i }$ in the sequence as shown in Figure 1. Gradients for each loss $\mathcal { L } ( s _ { i } )$ are only backpropagated to the beginning of $s _ { i }$ , so computation is linear in the sequence length. Each update applies one maximum likelihood training step to approximate the current local distribution $P _ { l } ( x )$ . The computational cost of dynamic evaluation is one forward pass and one gradient computation through the data, with some slight overhead to apply the update rule for every sequence segment.
40
+
41
+ As in all autoregressive models, dynamic evaluation only conditions on sequence elements that it has already predicted, and so evaluates a valid log-probability for each sequence. Dynamic evaluation can also be used while generating sequences. In this case, the model generates each sequence segment $s _ { i }$ using fixed weights, and performs a gradient descent based update step on $\mathcal { L } ( s _ { i } )$ . Applying dynamic evaluation for sequence generation could result in generated sequences with more consistent regularities, meaning that patterns that occur in the generated sequence are more likely to occur again.
42
+
43
+ # 4 BACKGROUND
44
+
45
+ # 4.1 RELATED APPROACHES
46
+
47
+ Adaptive language modelling was first considered for n-grams, adapting to recent history via caching (Jelinek et al., 1991; Kuhn, 1988), and other methods Bellegarda (2004). More recently, the neural cache approach (Grave et al., 2017) and the closely related pointer sentinel-LSTM (Merity et al., 2017b) have been used to for adaptive neural language modelling. Neural caching has recently been used to improve the state-of-the-art at word-level language modelling (Merity et al., 2017a).
48
+
49
+ The neural cache model learns a type of non-parametric output layer on the fly at test time, which allows the network to adapt to recent observations. Each past hidden state $h _ { i }$ is paired with the next input $x _ { i + 1 }$ , and is stored as a tuple $\left( h _ { i } , x _ { i + 1 } \right)$ . When a new hidden state $h _ { t }$ is observed, the output probabilities are adjusted to give a higher weight to output words that coincided with past hidden states with a large inner product $( h _ { t } ^ { T } h _ { i } )$ .
50
+
51
+ $$
52
+ P _ { c a c h e } ( x _ { t + 1 } | x _ { 1 : t } , h _ { 1 : t } ) \propto \sum _ { i = 1 } ^ { t - 1 } e ^ { ( x _ { i + 1 } ) } \exp ( \omega h _ { t } ^ { T } h _ { i } ) ,
53
+ $$
54
+
55
+ ![](images/df95773861d69acd90535594ea1cc660128237411e8542a90cf739be28c92fe5.jpg)
56
+ Figure 1: Illustration of dynamic evaluation. The model evaluates the probability of sequence segments $s _ { i }$ . The gradient $\dot { \nabla } \mathcal { L } ( s _ { i } )$ with respect to the log probability of $s _ { i }$ is used to update the model parameters $\theta _ { l } ^ { i - 1 }$ to $\theta _ { l } ^ { i }$ before the model progresses to the next sequence segment. Dashed edges are what distinguish dynamic evaluation from static (normal) evaluation.
57
+
58
+ where $e ^ { ( x _ { i + 1 } ) }$ is a one hot encoding of $x _ { i + 1 }$ , and $\omega$ is a scaling parameter. The cache probabilities are interpolated with the base network probabilities to adapt the base network at test time.
59
+
60
+ The neural cache closely relates to dynamic evaluation, as both methods can be added on top of a base model for adaptation at test time. The main difference is the mechanism used to fit to recent history: the neural cache approach uses a non-parametric, nearest neighbours-like method, whereas dynamic evaluation uses a gradient descent based method to change model parameters dynamically. Both methods rely on an autoregressive factorisation, as they depend on observing sequence elements after they are predicted in order to perform adaptation. Dynamic evaluation and neural caching methods are therefore both applicable to sequence prediction and generation tasks, but not directly to more general supervised learning tasks.
61
+
62
+ One drawback of the neural cache method is that it cannot adjust the recurrent hidden state dynamics. As a result, the neural cache’s ability to capture information that occurs jointly between successive sequence elements is limited. This capability is critical for adapting to sequences where each element has very little independent meaning, e.g. character level language modelling.
63
+
64
+ Another related approach is fast weights, (Ba et al., 2016; Schmidhuber, 1992). Fast weights feature recurrent architectures with dynamically changing weight matrices as a function of recent sequence history. Thus, dynamic evaluation as applied at test time, could be considered a form of fast-weights. In traditional fast weights, the network learns to control changes to the weights during training time, allowing it to be applied to more general sequence problems including sequence labeling. In dynamic evaluation, the procedure to change the weights is automated at test time via gradient descent optimization, making it only directly applicable to autoregressive sequence modelling. As dynamic evaluation leverages gradient descent, it has the potential to generalize better to previously unseen pattern repetitions at test time.
65
+
66
+ # 4.2 DYNAMIC EVALUATION IN NEURAL NETWORKS
67
+
68
+ Dynamic evaluation of neural language models was proposed by Mikolov et al. (2010). Their approach simply used stochastic gradient descent (SGD) updates at every time step, computing the gradient with fully truncated backpropagation through time, which is equivalent to setting $n = 1$ in equation (2). Dynamic evaluation has since been applied to character and word-level language models (Graves, 2013; Krause et al., 2017; Ororbia II et al., 2017; Fortunato et al., 2017). Previous work using dynamic evaluation considered it as an aside, and did not explore it in depth.
69
+
70
+ # 5 UPDATE RULE METHODOLOGY FOR DYNAMIC EVALUATION
71
+
72
+ We propose several changes to Mikolov et al. (2010)’s dynamic evaluation method with SGD and fully truncated backpropagation, which we refer to as traditional dynamic evaluation. The first modification reduces the update frequency, so that gradients are backpropagated over more timesteps. This change provides more accurate gradient information, and also improves the computational efficiency of dynamic evaluation, since the update rule is applied much less often. We use sequence segments of length 5 for word-level tasks and 20 for character-level tasks.
73
+
74
+ Next, we add a global decay prior to bias the model towards the parameters $\theta _ { g }$ learned during training. Our motivation for dynamic evaluation assumes that the local generating distribution $P _ { l } ( x )$ is constantly changing, so it is potentially desirable to weight recent sequence history higher in adaptation. Adding a global decay prior accomplishes this by causing previous adaptation updates to decay exponentially over time. The use of a decay prior for dynamic evaluation relates to the update rule used for fast weights in Ba et al. (2016), which decayed fast weights towards zero exponentially over time. For SGD with a global prior, learning rate $\eta$ and decay rate $\lambda$ ; we form the update rule
75
+
76
+ $$
77
+ \begin{array} { r } { \theta _ { i } \theta _ { i - 1 } - \eta \nabla \mathcal { L } ( s _ { i } ) + \lambda ( \theta _ { g } - \theta _ { l } ^ { i - 1 } ) . } \end{array}
78
+ $$
79
+
80
+ We then consider using an RMSprop (Tieleman & Hinton, 2012) derived update rule for the learning rule in place of SGD. RMSprop uses a moving average of recent squared gradients to scale learning rates for each weight. In dynamic evaluation, near the start of a test sequence, RMSprop has had very few gradients to average, and therefore may not be able to leverage its updates as effectively. For this reason, we collect mean squared gradients, $M S _ { g }$ , on the training data rather than on recent test data (which is what RMSprop would do). $M S _ { g }$ is given by
81
+
82
+ $$
83
+ M S _ { g } = \frac { 1 } { N _ { b } } \sum _ { k = 1 } ^ { N _ { b } } ( \nabla \mathcal { L } _ { k } ) ^ { 2 } ,
84
+ $$
85
+
86
+ where $N _ { b }$ is the number of training batches and $\nabla \mathcal L _ { k }$ is the gradient on the $k$ th training batch. The mini-batch size for this computation becomes a hyper-parameter, as larger mini-batches will result in smaller mean squared gradients. The update rule, which we call RMS with a global prior in our experiments, is then
87
+
88
+ $$
89
+ \theta _ { l } ^ { i } \theta _ { l } ^ { i - 1 } - \eta \frac { \nabla \mathcal { L } ( s _ { i } ) } { \sqrt { M S _ { g } } + \epsilon } + \lambda ( \theta _ { g } - \theta _ { l } ^ { i - 1 } ) ,
90
+ $$
91
+
92
+ where $\epsilon$ is a stabilization parameter. For the decay step of our update rule, we also consider scaling the decay rate for each parameter proportionally to $\sqrt { M S _ { g } }$ . Parameters with a high RMS gradient affect the dynamics of the network more, so it makes sense to decay them faster. $R M S _ { \mathrm { n o r m } }$ is $\sqrt { M S _ { g } }$ divided by its mean, resulting in a normalized version of $\sqrt { M S _ { g } }$ with a mean of 1:
93
+
94
+ $$
95
+ R M S _ { \mathrm { n o r m } } = \frac { \sqrt { M S _ { g } } } { \mathrm { a v g } ( \sqrt { M S _ { g } } ) } .
96
+ $$
97
+
98
+ We clip the values of $R M S _ { \mathrm { n o r m } }$ to be no greater than $^ 1 / \lambda$ to be sure that the decay rate does not exceed 1 for any parameter. Combining the learning component and the regularization component results in the final update equation, which we refer to as RMS with an RMS global prior
99
+
100
+ $$
101
+ \theta _ { l } ^ { i } \theta _ { l } ^ { i - 1 } - \eta \frac { \nabla \mathcal { L } ( s _ { i } ) } { \sqrt { M S _ { g } } + \epsilon } + \lambda ( \theta _ { g } - \theta _ { l } ^ { i - 1 } ) \odot R M S _ { \mathrm { n o r m } } .
102
+ $$
103
+
104
+ # 6 SPARSE DYNAMIC EVALUATION
105
+
106
+ Mini-batching over sequences is desirable for some test-time sequence modelling applications because it allows faster processing of multiple sequences in parallel. Dynamic evaluation has a high memory cost for mini-batching because it is necessary to store a different set of parameters for each sequence in the mini-batch. Therefore, we consider a sparse dynamic evaluation variant that updates a smaller number of parameters. We introduce a new adaptation matrix $\mathcal { M }$ which is initialized to zeros. $\mathcal { M }$ multiplies hidden state vector $h _ { t }$ of an RNN at every time-step to get a new hidden state $h _ { t } ^ { \prime }$ , via
107
+
108
+ $$
109
+ h _ { t } ^ { \prime } = h _ { t } + \mathscr { M } h _ { t } .
110
+ $$
111
+
112
+ $h _ { t } ^ { \prime }$ then replaces $h _ { t }$ and is propagated throughout the network via both recurrent and feed-forward connections. In a stacked RNN, this formulation could be applied to every layer or just one layer. Applying dynamic evaluation to $\mathcal { M }$ avoids the need to apply dynamic evaluation to the original parameters of the network, reduces the number of adaptation parameters, and makes mini-batching less memory intensive. We reduce the number of adaptation parameters further by only using $\mathcal { M }$ to transform an arbitrary subset of $H$ hidden units. This results in $\mathcal { M }$ being an $H \times H$ matrix with $d = H ^ { 2 }$ adaptation parameters. If $H$ is chosen to be much less than the number of hidden units, this reduces the number of adaptation parameters dramatically. In Section 7.3 we experiment with sparse dynamic evaluation for character-level language models.
113
+
114
+ # 7 EXPERIMENTS
115
+
116
+ We applied dynamic evaluation to word-level and character-level language modelling. In all tasks, we evaluate dynamic evaluation on top of a base model. After training the base model, we tune hyper-parameters for dynamic evaluation on the validation set, and evaluate both the static and dynamic versions of the model on the test set. We also consider follow up experiments that analyse the sequence lengths for which dynamic evaluation is useful.
117
+
118
+ # 7.1 SMALL SCALE WORD-LEVEL LANGUAGE MODELLING
119
+
120
+ We train base models on the Penn Treebank (PTB, Marcus et al., 1993), WikiText-2 (Merity et al., 2017b) datasets, and compare the performance of static and dynamic evaluation. These experiments compare dynamic evaluation against past approaches such as the neural cache and measure dynamic evaluation’s general performance across different models and datasets.
121
+
122
+ PTB is derived from articles of the Wall Street Journal. It contains 929k training tokens and a vocab size limited to 10k words. It is one of the most commonly used benchmarks in language modelling. We consider two baseline models on PTB, a standard LSTM implementation with recurrent dropout (Zaremba et al., 2014), and the recent state-of-the-art averaged SGD (ASGD) weight-dropped LSTM (AWD-LSTM, Merity et al., 2017a).
123
+
124
+ Our standard LSTM was taken from the Chainer (Tokui et al., 2015) tutorial on language modelling1, and used two LSTM layers with 650 units each, trained with SGD and regularized with recurrent dropout. On our standard LSTM, we experiment with traditional dynamic evaluation as applied by Mikolov et al. (2010), as well as each modification we make building up to our final update rule as described in Section 5. As our final update rule $( { \mathrm { R M S } } + { \mathrm { R M S } }$ global prior) worked best, we use this for all other experiments and use “dynamic eval” by default to refer to this update rule in tables.
125
+
126
+ We applied dynamic evaluation on an AWD-LSTM (Merity et al., 2017a). The AWD-LSTM is a vanilla LSTM that combines the use of drop-connect (Wan et al., 2013) on recurrent weights for regularization, and a variant of ASGD (Polyak & Juditsky, 1992) for optimisation. Our model, which used 3 layers and tied input and output embeddings (Press & Wolf, 2017; Inan et al., 2017), was intended to be a direct replication of AWD-LSTM, using code from their implementation2. Results are given in Table 1.
127
+
128
+ Dynamic evaluation gives significant overall improvements to both models on this dataset. Dynamic evaluation also achieves better final results than the neural cache on both a standard LSTM and the AWD-LSTM reimplementation, and improves the state-of-the-art on PTB.
129
+
130
+ Table 1: Penn Treebank perplexities. bptt refers to sequence segment lengths.
131
+
132
+ <table><tr><td>model</td><td>parameters</td><td>valid</td><td>test</td></tr><tr><td>RNN+LDA+kN-5+cache (Mikolov &amp; Zweig,2012)</td><td></td><td></td><td>92.0</td></tr><tr><td>CharCNN (Kim et al., 2016)</td><td>19M</td><td></td><td>78.9</td></tr><tr><td>LSTM (Zaremba et al., 2014)</td><td>66M</td><td>82.2</td><td>78.4</td></tr><tr><td>Variational LSTM (Gal &amp; Ghahramani, 2016)</td><td>66M</td><td></td><td>73.4</td></tr><tr><td>Pointer sentinel-LSTM (Merity et al.,2017b)</td><td>21M</td><td>72.4</td><td>70.9</td></tr><tr><td>Variational LSTM + augmented loss (Inan et al., 2017)</td><td>51M</td><td>71.1</td><td>68.5</td></tr><tr><td>Variational RHN (Zilly et al.,2017)</td><td>23M</td><td>67.9</td><td>65.4</td></tr><tr><td>NAS cell (Zoph &amp; Le,2017)</td><td>54M</td><td></td><td>62.4</td></tr><tr><td>Variational LSTM + gradual learning (Aharoni et al., 2017)</td><td>105M</td><td></td><td>61.7</td></tr><tr><td>LSTM + BB tuning (Melis et al.,2017)</td><td>24M</td><td>60.9</td><td>58.3</td></tr><tr><td>LSTM (Grave et al., 2017)</td><td></td><td>86.9</td><td>82.3</td></tr><tr><td>LSTM + neural cache (Grave et al., 2017)</td><td></td><td>74.6</td><td>72.1</td></tr><tr><td>LSTM (ours)</td><td>20M</td><td>88.0</td><td>85.6</td></tr><tr><td>LSTM + traditional dynamic eval (sgd, bptt=1)</td><td>20M</td><td>78.6</td><td>76.2</td></tr><tr><td>LSTM + dynamic eval (sgd, bptt=5)</td><td>20M</td><td>78.0</td><td>75.6</td></tr><tr><td>LSTM + dynamic eval (sgd, bptt=5, global prior)</td><td>20M</td><td>77.4</td><td>74.8</td></tr><tr><td>LSTM + dynamic eval (RMS,bptt=5, global prior)</td><td>20M</td><td>74.3</td><td>72.2</td></tr><tr><td>LSTM + dynamic eval (RMS, bptt=5, RMS global prior)</td><td>20M</td><td>73.5</td><td>71.7</td></tr><tr><td>AWD-LSTM (Merity et al., 2017a)</td><td>24M</td><td>60.0</td><td>57.3</td></tr><tr><td>AWD-LSTM +neural cache (Merity et al., 2017a)</td><td>24M</td><td>53.9</td><td>52.8</td></tr><tr><td>AWD-LSTM (ours)</td><td>24M</td><td>59.8</td><td>57.7</td></tr><tr><td>AWD-LSTM + dynamic eval</td><td>24M</td><td>51.6</td><td>51.1</td></tr></table>
133
+
134
+ Table 2: WikiText-2 perplexities.
135
+
136
+ <table><tr><td>model</td><td>parameters</td><td>valid</td><td>test</td></tr><tr><td>Byte mLSTM (Krause et al., 2016)</td><td>46M</td><td>92.8</td><td>88.8</td></tr><tr><td>Variational LSTM (Inan et al., 2017)</td><td>28M</td><td>91.5</td><td>87.0</td></tr><tr><td>Pointer sentinel-LSTM (Merity et al., 2017b)</td><td></td><td>84.8</td><td>80.8</td></tr><tr><td>LSTM + BB tuning (Melis et al., 2017)</td><td>24M</td><td>69.1</td><td>65.9</td></tr><tr><td>LSTM (Grave et al., 2017)</td><td></td><td>104.2</td><td>99.3</td></tr><tr><td>LSTM + neural cache (Grave et al., 2017)</td><td></td><td>72.1</td><td>68.9</td></tr><tr><td>LSTM (ours)</td><td>50M</td><td>109.1</td><td>103.4</td></tr><tr><td>LSTM + dynamic eval</td><td>50M</td><td>63.7</td><td>59.8</td></tr><tr><td>AWD-LSTM (Merity et al., 2017a)</td><td>33M</td><td>68.6</td><td>65.8</td></tr><tr><td>AWD-LSTM + neural cache (Merity et al., 2017a)</td><td>33M</td><td>53.8</td><td>52.0</td></tr><tr><td>AWD-LSTM (ours)</td><td>33M</td><td>68.9</td><td>66.1</td></tr><tr><td>AWD-LSTM + dynamic eval</td><td>33M</td><td>46.4</td><td>44.3</td></tr></table>
137
+
138
+ WikiText-2 is roughly twice the size of PTB, with 2 million training tokens and a vocab size of 33k. It features articles in a non-shuffled order, with dependencies across articles that adaptive methods should be able to exploit. For this dataset, we use the same baseline LSTM implementation and AWD-LSTM re-implementation as on PTB. Results are given in Table 2.
139
+
140
+ Dynamic evaluation improves the state-of-the-art perplexity on WikiText-2, and provides a significantly greater improvement than neural caching to both base models. This suggests that dynamic evaluation is effective at exploiting regularities that co-occur across non-shuffled documents.
141
+
142
+ Table 3: text8 (word-level) perplexities
143
+
144
+ <table><tr><td>model</td><td>valid</td><td>test</td></tr><tr><td>LSTM (Grave et al., 2017)</td><td></td><td>121.8</td></tr><tr><td>LSTM + neural cache (Grave et al., 2017)</td><td></td><td>99.9</td></tr><tr><td>AWD-LSTM</td><td>80.0</td><td>87.5</td></tr><tr><td>AWD-LSTM + neural cache</td><td>67.5</td><td>75.1</td></tr><tr><td>AWD-LSTM + dynamic eval</td><td>63.3</td><td>70.3</td></tr></table>
145
+
146
+ # 7.2 MEDIUM SCALE WORD-LEVEL LANGUAGE MODELLING
147
+
148
+ We benchmark the performance of dynamic evaluation against static evaluation and the neural cache on the larger text8 dataset. Like WikiText-2, text8 is derived from Wikipedia text. Text8 was introduced for word level language modelling by Mikolov et al. (2014), which preprocessed the data by mapping rare words to an ‘<unk>’ token, resulting in a vocab of 44k and 17M training tokens. We use the same test set as in Mikolov et al. (2014), but also hold out the final $1 0 0 \mathrm { k }$ training tokens as a validation set to allow for fair hyper-parameter tuning (the original task did not have a validation set). We trained an AWD-LSTM with 52M parameters using the implementation from Merity et al. (2017a). We then compare the performance of static evaluation, dynamic evaluation, and neural caching at test time.
149
+
150
+ To ensure a fair comparison between dynamic evaluation and the neural cache, we used robust hyper-parameter tuning on the validation set for both methods. For dynamic evaluation, we used the hyper-parameter settings found on PTB, and only tuned the learning rate (to 2 significant figures). The neural cache uses 3 hyper-parameters: the cache length, a mixing parameter and a flatness parameter. Starting from a cache size of 3000, we used a series of grid searches to find optimal values for the mixing parameter and flatness parameter (to 2 significant figures). We then varied the cache size in the range of 2000-4000, and found that the affect of this was negligible, so we kept the cache size at 3000. Results are given in table 3, with the results from Grave et al. (2017) that used the same test set given for context.
151
+
152
+ Dynamic evaluation soundly outperforms static evaluation and the neural cache method, demonstrating that the benefits of dynamic evaluation do not wash away when using a stronger model with more training data.
153
+
154
+ # 7.3 CHARACTER-LEVEL LANGUAGE MODELLING
155
+
156
+ We consider dynamic evaluation on the character-level text8, and Hutter Prize (Hutter, 2006) datasets. The Hutter Prize dataset is comprised of Wikipedia text, and includes XML and characters from non-Latin languages. It is 100 million UTF-8 bytes long and contains 205 unique bytes. Similarly to other reported results, we use a 90-5-5 split for training, validation, and testing. The text8 dataset is derived the Hutter Prize dataset, but has all XML removed, and is lower cased to only have 26 characters of English text plus spaces. The character-level text8 task corresponds to the unprocessed version of the text8 data used for our medium-scale word level language modelling experiments. As with Hutter Prize, we use the standard 90-5-5 split for training, validation, and testing for text8. We used a multiplicative LSTM (mLSTM) (Krause et al., 2016)3 as our base model for both datasets. The mLSTMs for both tasks used 2800 hidden units, an embedding layer of 400 units, weight normalization (Salimans & Kingma, 2016), variational dropout (Gal & Ghahramani, 2016), and ADAM (Kingma & Ba, 2014) for training.
157
+
158
+ We also consider sparse dynamic evaluation, as described in Section 6, on the Hutter Prize dataset. For sparse dynamic evaluation, we adapted a subset of 500 hidden units, resulting in a $5 0 0 \times 5 0 0$ adaptation matrix and $2 5 0 \mathrm { k }$ adaptation parameters. Our mLSTM only contained one recurrent layer, so only one adaptation matrix was used for sparse dynamic evaluation. All of our dynamic evaluation results in this section use the final update rule given in Section 5. Results for Hutter Prize are given in Table 4, and results for text8 are given in Table 5.
159
+
160
+ Table 4: Hutter Prize test set error in bits/char.
161
+
162
+ <table><tr><td>model</td><td>parameters</td><td>test</td></tr><tr><td>Stacked LSTM (Graves,2013)</td><td>21M</td><td>1.67</td></tr><tr><td rowspan="4">Stacked LSTM + traditional dynamic eval (Graves,2013) Multiplicative integration LSTM (Wu et al.,2016) HyperLSTM (Ha et al., 2017)</td><td>21M</td><td>1.33</td></tr><tr><td>17M</td><td>1.44</td></tr><tr><td>27M</td><td>1.34</td></tr><tr><td></td><td>1.32</td></tr><tr><td>Bytenet decoder (Kalchbrenner et al., 2016)</td><td></td><td>1.31</td></tr><tr><td>LSTM + BB tuning (Melis et al., 2017)</td><td>46M</td><td>1.30</td></tr><tr><td>Recurrent highway networks (Zilly et al.,2017) Fast-slow LSTM (Mujika et al.,2017)</td><td>46M</td><td>1.27</td></tr><tr><td></td><td>47M</td><td>1.25</td></tr><tr><td>mLSTM (Krause et al., 2016)</td><td>46M</td><td>1.24</td></tr><tr><td>mLSTM + sparse dynamic eval (d = 250k) mLSTM + dynamic eval</td><td>46M 46M</td><td>1.13 1.08</td></tr></table>
163
+
164
+ Table 5: text8 (char-level) test set error in bits/char.
165
+
166
+ <table><tr><td>model</td><td>parameters</td><td>test</td></tr><tr><td>Multiplicative RNN (Mikolov et al., 2012)</td><td>5M</td><td>1.54</td></tr><tr><td>Multiplicative integration LSTM (Wu et al., 2016)</td><td>4M</td><td>1.44</td></tr><tr><td>LSTM (Cooijmans et al., 2017)</td><td></td><td>1.43</td></tr><tr><td>Batch normalised LSTM (Cooijmans et al., 2017)</td><td></td><td>1.36</td></tr><tr><td>Hierarchical multiscale LSTM (Chung et al., 2017)</td><td></td><td>1.29</td></tr><tr><td>Recurrent highway networks (Zilly et al., 2017)</td><td>45M</td><td>1.27</td></tr><tr><td>mLSTM (Krause et al., 2016)</td><td>45M</td><td>1.27</td></tr><tr><td>mLSTM + dynamic eval</td><td>45M</td><td>1.19</td></tr></table>
167
+
168
+ Dynamic evaluation achieves large improvements to our base models and state-of-the-art results on both datasets. Sparse dynamic evaluation also achieves significant improvements on Hutter Prize using only $0 . 5 \%$ of the adaptation parameters of regular dynamic evaluation.
169
+
170
+ # 7.4 TIME-SCALES OF DYNAMIC EVALUATION
171
+
172
+ We measure time-scales at which dynamic evaluation gains an advantage over static evaluation. Starting from the model trained on Hutter Prize, we plot the performance of static and dynamic evaluation against the number of characters processed on sequences from the Hutter Prize test set, and sequences in Spanish from the European Parliament dataset (Koehn, 2005).
173
+
174
+ The Hutter Prize data experiments show the timescales at which dynamic evaluation gained the advantage observed in Table 4. We divided the Hutter Prize test set into 500 sequences of length 10000, and applied static and dynamic evaluation to these sequences using the same model and methodology used to obtain results in Table 4. Losses were averaged across these 500 sequences to obtain average losses at each time step. Plots of the average cross-entropy errors against the number of Hutter characters sequenced are given in Figure 2a.
175
+
176
+ The Spanish experiments measure how dynamic evaluation handles large distribution shifts between training and test time, as Hutter Prize contains very little Spanish. We used the first 5 million characters of the Spanish European Parliament data in place of the Hutter Prize test set. The Spanish experiments used the same base model and dynamic evaluation settings as Hutter Prize. Plots of the average cross-entropy errors against the number of Spanish characters sequenced are given in Figure 2b.
177
+
178
+ On both datasets, dynamic evaluation gave a very noticeable advantage after a few hundred characters. For Spanish this advantage continued to grow as more of the sequence was processed, whereas for Hutter, this advantage was maximized after viewing around $2 \mathrm { - } 3 \mathrm { k }$ characters. The advantage of dynamic evaluation was also much greater on Spanish sequences than Hutter sequences.
179
+
180
+ ![](images/73266d39851529ff033477c1b7cc5ebfcf82ccb745d2822af2bf1efb79932a2c.jpg)
181
+ Figure 2: Average losses in bits/char of dynamic evaluation and static evaluation plotted against number of characters processed; on sequences from the Hutter Prize test set (left) and European Parliament dataset in Spanish (right), averaged over 500 trials for each. Losses at each data point are averaged over sequence segments of length 100, and are not cumulative. Note the different y-axis scales in the two plots.
182
+
183
+ We also drew 300 character conditional samples from the static and dynamic versions of our model after viewing 10k characters of Spanish. For the dynamic model, we continued to apply dynamic evaluation during sampling as well, by the process described in Section 3. The conditional samples are given in the appendix. The static samples quickly switched to English that resembled Hutter Prize data. The dynamic model generated data with some Spanish words and a number of made up words with characteristics of Spanish words for the entirety of the sample. This is an example of the kinds of features that dynamic evaluation was able to learn to model on the fly.
184
+
185
+ # 8 CONCLUSION
186
+
187
+ This work explores and develops methodology for applying dynamic evaluation to sequence modelling tasks. Experiments show that the proposed dynamic evaluation methodology gives large test time improvements across character and word level language modelling. Our improvements to language modelling have applications to speech recognition and machine translation over longer contexts, including broadcast speech recognition and paragraph level machine translation. Overall, dynamic evaluation is shown to be an effective method for exploiting pattern re-occurrence in sequences.
188
+
189
+ # REFERENCES
190
+
191
+ Z. Aharoni, G. Rattner, and H. Permuter. Gradual learning of deep recurrent neural networks. arXiv preprint arXiv:1708.08863, 2017.
192
+ Jimmy Ba, Geoffrey E Hinton, Volodymyr Mnih, Joel Z Leibo, and Catalin Ionescu. Using fast weights to attend to the recent past. In Advances In Neural Information Processing Systems, pp. 4331–4339, 2016.
193
+ J. R. Bellegarda. Statistical language model adaptation: review and perspectives. Speech Communication, 42(1): 93–108, 2004.
194
+ J. Chung, S. Ahn, and Y. Bengio. Hierarchical multiscale recurrent neural networks. ICLR, 2017.
195
+ T. Cooijmans, N. Ballas, C. Laurent, and A. Courville. Recurrent batch normalization. ICLR, 2017.
196
+ M. Fortunato, C. Blundell, and O. Vinyals. Bayesian recurrent neural networks. arXiv preprint arXiv:1704.02798, 2017.
197
+ Y. Gal and Z. Ghahramani. A theoretically grounded application of dropout in recurrent neural networks. In Advances in neural information processing systems, pp. 1019–1027, 2016.
198
+ E. Grave, A. Joulin, and N. Usunier. Improving neural language models with a continuous cache. ICLR, 2017.
199
+ A. Graves. Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850, 2013.
200
+ D. Ha, A. Dai, and Q. Lee. Hypernetworks. ICLR, 2017.
201
+ S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Computation, 9:1735–1780, 1997.
202
+ M. Hutter. The human knowledge compression prize. URL http://prize.hutter1.net, 2006.
203
+ H. Inan, K. Khosravi, and R. Socher. Tying word vectors and word classifiers: A loss framework for language modeling. ICLR, 2017.
204
+ F. Jelinek, B. Merialdo, S. Roukos, and M. Strauss. A dynamic language model for speech recognition. In HLT, volume 91, pp. 293–295, 1991.
205
+ N. Kalchbrenner, L. Espeholt, K. Simonyan, A. Oord, A. Graves, and K. Kavukcuoglu. Neural machine translation in linear time. arXiv preprint arXiv:1610.10099, 2016.
206
+ Y. Kim, Y. Jernite, D. Sontag, and A. M. Rush. Character-aware neural language models. In Thirtieth AAAI Conference on Artificial Intelligence, 2016.
207
+ D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
208
+ P. Koehn. Europarl: A parallel corpus for statistical machine translation. In MT Summit, volume 5, pp. 79–86, 2005.
209
+ B. Krause, L. Lu, I. Murray, and S. Renals. Multiplicative LSTM for sequence modelling. arXiv preprint arXiv:1609.07959, 2016.
210
+ B. Krause, I. Murray, S. Renals, and L. Lu. Multiplicative LSTM for sequence modelling. ICLR Workshop track, 2017. URL https://openreview.net/forum?id $=$ SJCS5rXFl.
211
+ R. Kuhn. Speech recognition and the frequency of recently used words: A modified Markov model for natural language. In Proceedings of the 12th conference on Computational linguistics-Volume 1, pp. 348–350. Association for Computational Linguistics, 1988.
212
+ M. P. Marcus, M. A. Marcinkiewicz, and B. Santorini. Building a large annotated corpus of English: The Penn Treebank. Computational linguistics, 19(2):313–330, 1993.
213
+ G. Melis, C. Dyer, and P. Blunsom. On the state of the art of evaluation in neural language models. arXiv preprint arXiv:1707.05589, 2017.
214
+ S. Merity, N. S. Keskar, and R. Socher. Regularizing and optimizing LSTM language models. arXiv preprint arXiv:1708.02182, 2017a.
215
+ S. Merity, C. Xiong, J. Bradbury, and R. Socher. Pointer sentinel mixture models. ICLR, 2017b.
216
+ T. Mikolov and G. Zweig. Context dependent recurrent neural network language model. SLT, 12:234–239, 2012.
217
+ T. Mikolov, M. Karafiát, L. Burget, J. Cernocky, and S. Khudanpur. Recurrent neural network based language \` model. In Interspeech, volume 2, pp. 3, 2010.
218
+ T. Mikolov, I. Sutskever, A. Deoras, H. Le, S. Kombrink, and J. Cernocky. Subword language modeling with neural networks. preprint (http://www. fit. vutbr. cz/imikolov/rnnlm/char. pdf), 2012.
219
+ Tomas Mikolov, Armand Joulin, Sumit Chopra, Michael Mathieu, and Marc’Aurelio Ranzato. Learning longer memory in recurrent neural networks. arXiv preprint arXiv:1412.7753, 2014.
220
+ A. Mujika, F. Meier, and A. Steger. Fast-slow recurrent neural networks. arXiv preprint arXiv:1705.08639, 2017.
221
+ A. G. Ororbia II, T. Mikolov, and D. Reitter. Learning simpler language models with the differential state framework. Neural Computation, 2017.
222
+ B. T. Polyak and A. B. Juditsky. Acceleration of stochastic approximation by averaging. SIAM Journal on Control and Optimization, 30(4):838–855, 1992.
223
+ O. Press and L. Wolf. Using the output embedding to improve language models. EACL 2017, pp. 157, 2017.
224
+ T. Salimans and D. P. Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. In Advances in Neural Information Processing Systems, pp. 901–909, 2016.
225
+ Jürgen Schmidhuber. Learning to control fast-weight memories: An alternative to dynamic recurrent networks. Neural Computation, 4(1):131–139, 1992.
226
+ T. Tieleman and G. E. Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural Networks for Machine Learning, 4(2), 2012.
227
+ Seiya Tokui, Kenta Oono, Shohei Hido, and Justin Clayton. Chainer: a next-generation open source framework for deep learning. In Proceedings of workshop on machine learning systems (LearningSys) in the twenty-ninth annual conference on neural information processing systems (NIPS), volume 5, 2015.
228
+ L. Wan, M. Zeiler, S. Zhang, Yann L. Cun, and R. Fergus. Regularization of neural networks using dropconnect. In Proceedings of the 30th international conference on machine learning (ICML-13), pp. 1058–1066, 2013.
229
+ P. J. Werbos. Backpropagation through time: what it does and how to do it. Proceedings of the IEEE, 78: 1550–1560, 1990.
230
+ Y. Wu, S. Zhang, Y. Zhang, Y. Bengio, and R. Salakhutdinov. On multiplicative integration with recurrent neural networks. In NIPS, 2016.
231
+ W. Zaremba, I. Sutskever, and O. Vinyals. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, 2014.
232
+ J. G. Zilly, R. K. Srivastava, J. Koutník, and J. Schmidhuber. Recurrent highway networks. ICLR, 2017.
233
+ B. Zoph and Quoc V Le. Neural architecture search with reinforcement learning. ICLR, 2017.
234
+
235
+ # A APPENDIX
236
+
237
+ # A.1 DYNAMIC SAMPLES CONDITIONED ON SPANISH
238
+
239
+ 300 character samples generated from the dynamic version of the model trained on Hutter Prize, conditioned on 10k of Spanish characters. The final sentence fragment of the 10k conditioning characters is given to the reader, with the generated text given in bold:
240
+
241
+ Tiene importancia este compromiso en la medida en que la Comisión es un organismo que tiene el montembre tas procedíns la conscriptione se ha Tesalo del Pómienda que et hanemos que Pe la Siemina.
242
+
243
+ De la Pedrera Orden es Señora Presidente civil, Orden de siemin presente relevante frónmida que esculdad pludiore e formidad President de la Presidenta Antidorne Adamirmidad i ciemano de el 200’. Fo
244
+
245
+ # A.2 STATIC SAMPLES CONDITIONED ON SPANISH
246
+
247
+ 300 character samples generated from the static version of the model trained on Hutter Prize, conditioned on 10k of Spanish characters. The final sentence fragment of the 10k conditioning characters is given to the reader, with the generated text given in bold:
248
+
249
+ Tiene importancia este compromiso en la medida en que la Comisión es un organismo que tiene el monde,
250
+
251
+ &lt;br&gt;There is a secret act in the world except Cape Town, seen in now flat comalo and ball market and has seen the closure of the eagle as imprints in a dallas within the country.&quot; Is a topic for an increasingly small contract saying Allan Roth acquired the government in [[1916]].
parse/train/rkdU7tCaZ/rkdU7tCaZ_content_list.json ADDED
@@ -0,0 +1,1096 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "DYNAMIC EVALUATION OF NEURAL SEQUENCE MODELS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 825,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 147,
20
+ 398,
21
+ 175
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 212,
32
+ 544,
33
+ 227
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "We present methodology for using dynamic evaluation to improve neural sequence models. Models are adapted to recent history via a gradient descent based mechanism, causing them to assign higher probabilities to re-occurring sequential patterns. Dynamic evaluation outperforms existing adaptation approaches in our comparisons. Dynamic evaluation improves the state-of-the-art word-level perplexities on the Penn Treebank and WikiText-2 datasets to 51.1 and 44.3 respectively, and the state-of-the-art character-level cross-entropies on the text8 and Hutter Prize datasets to 1.19 bits/char and 1.08 bits/char respectively. ",
40
+ "bbox": [
41
+ 232,
42
+ 241,
43
+ 766,
44
+ 353
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 377,
55
+ 336,
56
+ 393
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Sequence generation and prediction tasks span many modes of data, ranging from audio and language modelling, to more general timeseries prediction tasks. Applications of such models include speech recognition, machine translation, dialogue generation, speech synthesis, forecasting, and music generation, among others. Neural networks can be applied to these tasks by predicting sequence elements one-by-one, conditioning on the history of sequence elements, forming an autoregressive model. Convolutional neural networks (CNNs) and recurrent neural networks (RNNs), including long-short term memory (LSTM) networks (Hochreiter & Schmidhuber, 1997) in particular, have achieved many successes at these tasks. However, in their basic form, these models have a limited ability to adapt to recently observed parts of a sequence. ",
63
+ "bbox": [
64
+ 174,
65
+ 407,
66
+ 825,
67
+ 534
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Many sequences contain repetition; a pattern that occurs once is more likely to occur again. For instance, a word that occurs once in a document is much more likely to occur again. A sequence of handwriting will generally stay in the same handwriting style. A sequence of speech will generally stay in the same voice. Although RNNs have a hidden state that can summarize the recent past, they are often unable to exploit new patterns that occur repeatedly in a test sequence. ",
74
+ "bbox": [
75
+ 174,
76
+ 540,
77
+ 825,
78
+ 611
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "This paper concerns dynamic evaluation, which we investigate as a candidate solution to this problem. Our approach adapts models to recent sequences using gradient descent based mechanisms. We show several ways to improve on past dynamic evaluation approaches in Section 5, and use our improved methodology to achieve state-of-the-art results in Section 7. In Section 6 we design a method to dramatically to reduce the number of adaptation parameters in dynamic evaluation, making it practical in a wider range of situations. In Section 7.4 we analyse dynamic evaluation’s performance over varying time-scales and distribution shifts, and demonstrate that dynamically evaluated models can generate conditional samples that repeat many patterns from the conditioning data. ",
85
+ "bbox": [
86
+ 174,
87
+ 617,
88
+ 825,
89
+ 729
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "2 MOTIVATION ",
96
+ "text_level": 1,
97
+ "bbox": [
98
+ 176,
99
+ 747,
100
+ 313,
101
+ 763
102
+ ],
103
+ "page_idx": 0
104
+ },
105
+ {
106
+ "type": "text",
107
+ "text": "Generative models can assign probabilities to sequences by modelling each term in the factorization given by the product rule. The probability of a sequence $\\stackrel { \\cdot } { x _ { 1 : T } } = \\{ x _ { 1 } , \\stackrel { \\cdot } { \\dots } , x _ { T } \\}$ factorizes as ",
108
+ "bbox": [
109
+ 173,
110
+ 779,
111
+ 823,
112
+ 808
113
+ ],
114
+ "page_idx": 0
115
+ },
116
+ {
117
+ "type": "equation",
118
+ "img_path": "images/9f50fa0d935242efbb3705e582b2c0dd98c67d749d608b3a1ba70a8f73e05c99.jpg",
119
+ "text": "$$\nP ( x _ { 1 : T } ) = P ( x _ { 1 } ) P ( x _ { 2 } | x _ { 1 } ) P ( x _ { 3 } | x _ { 2 } , x _ { 1 } ) \\cdot \\cdot \\cdot P ( x _ { T } | x _ { 1 } \\ldots x _ { T - 1 } ) .\n$$",
120
+ "text_format": "latex",
121
+ "bbox": [
122
+ 284,
123
+ 810,
124
+ 714,
125
+ 829
126
+ ],
127
+ "page_idx": 0
128
+ },
129
+ {
130
+ "type": "text",
131
+ "text": "Methods that apply this factorization either use a fixed context when predicting $P ( x _ { t } | x _ { 1 : t - 1 } )$ , for instance as in $\\mathbf { N } .$ -grams or CNNs, or use a recurrent hidden state to summarize the context, as in an RNN. However, for longer sequences, the history $x _ { 1 : t - 1 }$ often contains re-occurring patterns that are difficult to capture using models with fixed parameters (static models). ",
132
+ "bbox": [
133
+ 174,
134
+ 832,
135
+ 825,
136
+ 887
137
+ ],
138
+ "page_idx": 0
139
+ },
140
+ {
141
+ "type": "text",
142
+ "text": "In many domains, in a dataset of sequences $\\{ x _ { 1 : T } ^ { 1 } , x _ { 1 : T } ^ { 2 } , . . . , x _ { 1 : T } ^ { M } \\}$ , each sequence $\\boldsymbol { x } _ { 1 : T } ^ { i }$ is generated from a slightly different distribution $P ( x _ { 1 : T } ^ { i } )$ . At any point in time $t$ , the history of a sequence $x _ { 1 : t - 1 } ^ { i }$ contains useful information about the generating distribution for that specific sequence $P ( x _ { 1 : T } ^ { i } )$ Therefore adapting the model parameters learned during training $\\theta _ { g }$ is justified. We aim to infer a set of model parameters $\\theta _ { l }$ from $x _ { 1 : t - 1 } ^ { i }$ that will better approximate $\\bar { P } ( x _ { t } ^ { i } | x _ { 1 : t - 1 } ^ { i } )$ within sequence $i$ . ",
143
+ "bbox": [
144
+ 174,
145
+ 892,
146
+ 821,
147
+ 925
148
+ ],
149
+ "page_idx": 0
150
+ },
151
+ {
152
+ "type": "text",
153
+ "text": "",
154
+ "bbox": [
155
+ 174,
156
+ 103,
157
+ 825,
158
+ 148
159
+ ],
160
+ "page_idx": 1
161
+ },
162
+ {
163
+ "type": "text",
164
+ "text": "Many sequence modelling tasks are characterised by sequences generated from slightly different distributions as in the scenario described above. The generating distribution may also change continuously across a single sequence; for instance, a text excerpt may change topic. Furthermore, many machine learning benchmarks do not distinguish between sequence boundaries, and concatenate all sequences into one continuous sequence. Thus, many sequence modelling tasks could be seen as having a local distribution $P _ { l } ( x )$ as well as a global distribution $\\textstyle P _ { g } ( x ) : = { \\bar { J } } P ( l ) P _ { l } ( x ) d l$ . During training time, the goal is to find the best fixed model possible for $P _ { g } ( x )$ . However, during evaluation time, a model that can infer the current $P _ { l } ( x )$ from the recent history has an advantage. ",
165
+ "bbox": [
166
+ 173,
167
+ 154,
168
+ 825,
169
+ 266
170
+ ],
171
+ "page_idx": 1
172
+ },
173
+ {
174
+ "type": "text",
175
+ "text": "3 DYNAMIC EVALUATION ",
176
+ "text_level": 1,
177
+ "bbox": [
178
+ 176,
179
+ 286,
180
+ 400,
181
+ 303
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "Dynamic evaluation methods continuously adapt the model parameters $\\theta _ { g }$ , learned at training time, to parts of a sequence during evaluation. The goal is to learn adapted parameters $\\theta _ { l }$ that provide a better model of the local sequence distribution, $P _ { l } ( x )$ . When dynamic evaluation is applied in the present work, a long test sequence $x _ { 1 : T }$ is divided up into shorter sequences of length $n$ . We define $s _ { 1 : M }$ to be a sequence of shorter sequence segments $s _ { i }$ ",
188
+ "bbox": [
189
+ 174,
190
+ 318,
191
+ 825,
192
+ 388
193
+ ],
194
+ "page_idx": 1
195
+ },
196
+ {
197
+ "type": "equation",
198
+ "img_path": "images/bd4d0aa3bf06110fcfa9f98cd8d61d4fc1aa73e4e222ba48cf3fb68c422ab79d.jpg",
199
+ "text": "$$\ns _ { 1 : M } = \\{ s _ { 1 } = x _ { 1 : n } , \\ s _ { 2 } = x _ { n + 1 : 2 n } , \\ s _ { 3 } = x _ { 2 n + 1 : 3 n } , \\ . . . , \\ s _ { M } \\} .\n$$",
200
+ "text_format": "latex",
201
+ "bbox": [
202
+ 303,
203
+ 396,
204
+ 692,
205
+ 414
206
+ ],
207
+ "page_idx": 1
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "The initial adapted parameters $\\theta _ { l } ^ { 0 }$ are set to $\\theta _ { g }$ , and used to compute the probability of the first segment, $P ( s _ { 1 } | \\theta _ { l } ^ { 0 } )$ . This probability gives a cross entropy loss $\\mathcal { L } ( s _ { 1 } )$ , with gradient $\\nabla \\mathcal { L } ( s _ { 1 } )$ , which is computed using truncated back-propagation through time (Werbos, 1990). The gradient $\\nabla { \\mathcal { L } } ( s _ { 1 } )$ is used to update the model, resulting in adapted parameters $\\theta _ { l } ^ { 1 }$ , before evaluating $\\bar { P ( s _ { 2 } | \\theta _ { l } ^ { 1 } ) }$ . The same procedure is then repeated for $s _ { 2 }$ , and for each $s _ { i }$ in the sequence as shown in Figure 1. Gradients for each loss $\\mathcal { L } ( s _ { i } )$ are only backpropagated to the beginning of $s _ { i }$ , so computation is linear in the sequence length. Each update applies one maximum likelihood training step to approximate the current local distribution $P _ { l } ( x )$ . The computational cost of dynamic evaluation is one forward pass and one gradient computation through the data, with some slight overhead to apply the update rule for every sequence segment. ",
212
+ "bbox": [
213
+ 174,
214
+ 419,
215
+ 825,
216
+ 560
217
+ ],
218
+ "page_idx": 1
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "As in all autoregressive models, dynamic evaluation only conditions on sequence elements that it has already predicted, and so evaluates a valid log-probability for each sequence. Dynamic evaluation can also be used while generating sequences. In this case, the model generates each sequence segment $s _ { i }$ using fixed weights, and performs a gradient descent based update step on $\\mathcal { L } ( s _ { i } )$ . Applying dynamic evaluation for sequence generation could result in generated sequences with more consistent regularities, meaning that patterns that occur in the generated sequence are more likely to occur again. ",
223
+ "bbox": [
224
+ 174,
225
+ 568,
226
+ 825,
227
+ 651
228
+ ],
229
+ "page_idx": 1
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "4 BACKGROUND ",
234
+ "text_level": 1,
235
+ "bbox": [
236
+ 176,
237
+ 672,
238
+ 326,
239
+ 689
240
+ ],
241
+ "page_idx": 1
242
+ },
243
+ {
244
+ "type": "text",
245
+ "text": "4.1 RELATED APPROACHES",
246
+ "text_level": 1,
247
+ "bbox": [
248
+ 176,
249
+ 704,
250
+ 375,
251
+ 719
252
+ ],
253
+ "page_idx": 1
254
+ },
255
+ {
256
+ "type": "text",
257
+ "text": "Adaptive language modelling was first considered for n-grams, adapting to recent history via caching (Jelinek et al., 1991; Kuhn, 1988), and other methods Bellegarda (2004). More recently, the neural cache approach (Grave et al., 2017) and the closely related pointer sentinel-LSTM (Merity et al., 2017b) have been used to for adaptive neural language modelling. Neural caching has recently been used to improve the state-of-the-art at word-level language modelling (Merity et al., 2017a). ",
258
+ "bbox": [
259
+ 174,
260
+ 731,
261
+ 825,
262
+ 801
263
+ ],
264
+ "page_idx": 1
265
+ },
266
+ {
267
+ "type": "text",
268
+ "text": "The neural cache model learns a type of non-parametric output layer on the fly at test time, which allows the network to adapt to recent observations. Each past hidden state $h _ { i }$ is paired with the next input $x _ { i + 1 }$ , and is stored as a tuple $\\left( h _ { i } , x _ { i + 1 } \\right)$ . When a new hidden state $h _ { t }$ is observed, the output probabilities are adjusted to give a higher weight to output words that coincided with past hidden states with a large inner product $( h _ { t } ^ { T } h _ { i } )$ . ",
269
+ "bbox": [
270
+ 174,
271
+ 808,
272
+ 823,
273
+ 878
274
+ ],
275
+ "page_idx": 1
276
+ },
277
+ {
278
+ "type": "equation",
279
+ "img_path": "images/79a12e458ef8add7fbbf84e037f5861488187ee31f3d5709ff1167dd801570fa.jpg",
280
+ "text": "$$\nP _ { c a c h e } ( x _ { t + 1 } | x _ { 1 : t } , h _ { 1 : t } ) \\propto \\sum _ { i = 1 } ^ { t - 1 } e ^ { ( x _ { i + 1 } ) } \\exp ( \\omega h _ { t } ^ { T } h _ { i } ) ,\n$$",
281
+ "text_format": "latex",
282
+ "bbox": [
283
+ 330,
284
+ 886,
285
+ 666,
286
+ 928
287
+ ],
288
+ "page_idx": 1
289
+ },
290
+ {
291
+ "type": "image",
292
+ "img_path": "images/df95773861d69acd90535594ea1cc660128237411e8542a90cf739be28c92fe5.jpg",
293
+ "image_caption": [
294
+ "Figure 1: Illustration of dynamic evaluation. The model evaluates the probability of sequence segments $s _ { i }$ . The gradient $\\dot { \\nabla } \\mathcal { L } ( s _ { i } )$ with respect to the log probability of $s _ { i }$ is used to update the model parameters $\\theta _ { l } ^ { i - 1 }$ to $\\theta _ { l } ^ { i }$ before the model progresses to the next sequence segment. Dashed edges are what distinguish dynamic evaluation from static (normal) evaluation. "
295
+ ],
296
+ "image_footnote": [],
297
+ "bbox": [
298
+ 179,
299
+ 106,
300
+ 818,
301
+ 462
302
+ ],
303
+ "page_idx": 2
304
+ },
305
+ {
306
+ "type": "text",
307
+ "text": "where $e ^ { ( x _ { i + 1 } ) }$ is a one hot encoding of $x _ { i + 1 }$ , and $\\omega$ is a scaling parameter. The cache probabilities are interpolated with the base network probabilities to adapt the base network at test time. ",
308
+ "bbox": [
309
+ 176,
310
+ 582,
311
+ 823,
312
+ 611
313
+ ],
314
+ "page_idx": 2
315
+ },
316
+ {
317
+ "type": "text",
318
+ "text": "The neural cache closely relates to dynamic evaluation, as both methods can be added on top of a base model for adaptation at test time. The main difference is the mechanism used to fit to recent history: the neural cache approach uses a non-parametric, nearest neighbours-like method, whereas dynamic evaluation uses a gradient descent based method to change model parameters dynamically. Both methods rely on an autoregressive factorisation, as they depend on observing sequence elements after they are predicted in order to perform adaptation. Dynamic evaluation and neural caching methods are therefore both applicable to sequence prediction and generation tasks, but not directly to more general supervised learning tasks. ",
319
+ "bbox": [
320
+ 174,
321
+ 617,
322
+ 825,
323
+ 729
324
+ ],
325
+ "page_idx": 2
326
+ },
327
+ {
328
+ "type": "text",
329
+ "text": "One drawback of the neural cache method is that it cannot adjust the recurrent hidden state dynamics. As a result, the neural cache’s ability to capture information that occurs jointly between successive sequence elements is limited. This capability is critical for adapting to sequences where each element has very little independent meaning, e.g. character level language modelling. ",
330
+ "bbox": [
331
+ 174,
332
+ 736,
333
+ 825,
334
+ 791
335
+ ],
336
+ "page_idx": 2
337
+ },
338
+ {
339
+ "type": "text",
340
+ "text": "Another related approach is fast weights, (Ba et al., 2016; Schmidhuber, 1992). Fast weights feature recurrent architectures with dynamically changing weight matrices as a function of recent sequence history. Thus, dynamic evaluation as applied at test time, could be considered a form of fast-weights. In traditional fast weights, the network learns to control changes to the weights during training time, allowing it to be applied to more general sequence problems including sequence labeling. In dynamic evaluation, the procedure to change the weights is automated at test time via gradient descent optimization, making it only directly applicable to autoregressive sequence modelling. As dynamic evaluation leverages gradient descent, it has the potential to generalize better to previously unseen pattern repetitions at test time. ",
341
+ "bbox": [
342
+ 173,
343
+ 797,
344
+ 825,
345
+ 924
346
+ ],
347
+ "page_idx": 2
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "4.2 DYNAMIC EVALUATION IN NEURAL NETWORKS ",
352
+ "text_level": 1,
353
+ "bbox": [
354
+ 176,
355
+ 104,
356
+ 540,
357
+ 117
358
+ ],
359
+ "page_idx": 3
360
+ },
361
+ {
362
+ "type": "text",
363
+ "text": "Dynamic evaluation of neural language models was proposed by Mikolov et al. (2010). Their approach simply used stochastic gradient descent (SGD) updates at every time step, computing the gradient with fully truncated backpropagation through time, which is equivalent to setting $n = 1$ in equation (2). Dynamic evaluation has since been applied to character and word-level language models (Graves, 2013; Krause et al., 2017; Ororbia II et al., 2017; Fortunato et al., 2017). Previous work using dynamic evaluation considered it as an aside, and did not explore it in depth. ",
364
+ "bbox": [
365
+ 174,
366
+ 128,
367
+ 825,
368
+ 213
369
+ ],
370
+ "page_idx": 3
371
+ },
372
+ {
373
+ "type": "text",
374
+ "text": "5 UPDATE RULE METHODOLOGY FOR DYNAMIC EVALUATION ",
375
+ "text_level": 1,
376
+ "bbox": [
377
+ 174,
378
+ 233,
379
+ 699,
380
+ 250
381
+ ],
382
+ "page_idx": 3
383
+ },
384
+ {
385
+ "type": "text",
386
+ "text": "We propose several changes to Mikolov et al. (2010)’s dynamic evaluation method with SGD and fully truncated backpropagation, which we refer to as traditional dynamic evaluation. The first modification reduces the update frequency, so that gradients are backpropagated over more timesteps. This change provides more accurate gradient information, and also improves the computational efficiency of dynamic evaluation, since the update rule is applied much less often. We use sequence segments of length 5 for word-level tasks and 20 for character-level tasks. ",
387
+ "bbox": [
388
+ 173,
389
+ 263,
390
+ 826,
391
+ 348
392
+ ],
393
+ "page_idx": 3
394
+ },
395
+ {
396
+ "type": "text",
397
+ "text": "Next, we add a global decay prior to bias the model towards the parameters $\\theta _ { g }$ learned during training. Our motivation for dynamic evaluation assumes that the local generating distribution $P _ { l } ( x )$ is constantly changing, so it is potentially desirable to weight recent sequence history higher in adaptation. Adding a global decay prior accomplishes this by causing previous adaptation updates to decay exponentially over time. The use of a decay prior for dynamic evaluation relates to the update rule used for fast weights in Ba et al. (2016), which decayed fast weights towards zero exponentially over time. For SGD with a global prior, learning rate $\\eta$ and decay rate $\\lambda$ ; we form the update rule ",
398
+ "bbox": [
399
+ 173,
400
+ 354,
401
+ 825,
402
+ 454
403
+ ],
404
+ "page_idx": 3
405
+ },
406
+ {
407
+ "type": "equation",
408
+ "img_path": "images/bec6fcbe31485ba2cfe55fb9088e663a20c90057d040c05c09121b3b9a54d394.jpg",
409
+ "text": "$$\n\\begin{array} { r } { \\theta _ { i } \\theta _ { i - 1 } - \\eta \\nabla \\mathcal { L } ( s _ { i } ) + \\lambda ( \\theta _ { g } - \\theta _ { l } ^ { i - 1 } ) . } \\end{array}\n$$",
410
+ "text_format": "latex",
411
+ "bbox": [
412
+ 367,
413
+ 459,
414
+ 630,
415
+ 479
416
+ ],
417
+ "page_idx": 3
418
+ },
419
+ {
420
+ "type": "text",
421
+ "text": "We then consider using an RMSprop (Tieleman & Hinton, 2012) derived update rule for the learning rule in place of SGD. RMSprop uses a moving average of recent squared gradients to scale learning rates for each weight. In dynamic evaluation, near the start of a test sequence, RMSprop has had very few gradients to average, and therefore may not be able to leverage its updates as effectively. For this reason, we collect mean squared gradients, $M S _ { g }$ , on the training data rather than on recent test data (which is what RMSprop would do). $M S _ { g }$ is given by ",
422
+ "bbox": [
423
+ 173,
424
+ 491,
425
+ 825,
426
+ 577
427
+ ],
428
+ "page_idx": 3
429
+ },
430
+ {
431
+ "type": "equation",
432
+ "img_path": "images/45c6e59feff8e8d0ea66864fb7fea15a34331b5c75892ee11edb590c29ce4086.jpg",
433
+ "text": "$$\nM S _ { g } = \\frac { 1 } { N _ { b } } \\sum _ { k = 1 } ^ { N _ { b } } ( \\nabla \\mathcal { L } _ { k } ) ^ { 2 } ,\n$$",
434
+ "text_format": "latex",
435
+ "bbox": [
436
+ 416,
437
+ 583,
438
+ 580,
439
+ 627
440
+ ],
441
+ "page_idx": 3
442
+ },
443
+ {
444
+ "type": "text",
445
+ "text": "where $N _ { b }$ is the number of training batches and $\\nabla \\mathcal L _ { k }$ is the gradient on the $k$ th training batch. The mini-batch size for this computation becomes a hyper-parameter, as larger mini-batches will result in smaller mean squared gradients. The update rule, which we call RMS with a global prior in our experiments, is then ",
446
+ "bbox": [
447
+ 173,
448
+ 632,
449
+ 825,
450
+ 689
451
+ ],
452
+ "page_idx": 3
453
+ },
454
+ {
455
+ "type": "equation",
456
+ "img_path": "images/c32470e176da2c9d0b23caf1f29ccb5ae22f2a54dcb14c85abacddfc32b40804.jpg",
457
+ "text": "$$\n\\theta _ { l } ^ { i } \\theta _ { l } ^ { i - 1 } - \\eta \\frac { \\nabla \\mathcal { L } ( s _ { i } ) } { \\sqrt { M S _ { g } } + \\epsilon } + \\lambda ( \\theta _ { g } - \\theta _ { l } ^ { i - 1 } ) ,\n$$",
458
+ "text_format": "latex",
459
+ "bbox": [
460
+ 354,
461
+ 686,
462
+ 643,
463
+ 723
464
+ ],
465
+ "page_idx": 3
466
+ },
467
+ {
468
+ "type": "text",
469
+ "text": "where $\\epsilon$ is a stabilization parameter. For the decay step of our update rule, we also consider scaling the decay rate for each parameter proportionally to $\\sqrt { M S _ { g } }$ . Parameters with a high RMS gradient affect the dynamics of the network more, so it makes sense to decay them faster. $R M S _ { \\mathrm { n o r m } }$ is $\\sqrt { M S _ { g } }$ divided by its mean, resulting in a normalized version of $\\sqrt { M S _ { g } }$ with a mean of 1: ",
470
+ "bbox": [
471
+ 173,
472
+ 726,
473
+ 825,
474
+ 790
475
+ ],
476
+ "page_idx": 3
477
+ },
478
+ {
479
+ "type": "equation",
480
+ "img_path": "images/67a6f84ebda92fe0b169934395ee46c143e4479057c1508edd02a271ae823e07.jpg",
481
+ "text": "$$\nR M S _ { \\mathrm { n o r m } } = \\frac { \\sqrt { M S _ { g } } } { \\mathrm { a v g } ( \\sqrt { M S _ { g } } ) } .\n$$",
482
+ "text_format": "latex",
483
+ "bbox": [
484
+ 406,
485
+ 797,
486
+ 593,
487
+ 837
488
+ ],
489
+ "page_idx": 3
490
+ },
491
+ {
492
+ "type": "text",
493
+ "text": "We clip the values of $R M S _ { \\mathrm { n o r m } }$ to be no greater than $^ 1 / \\lambda$ to be sure that the decay rate does not exceed 1 for any parameter. Combining the learning component and the regularization component results in the final update equation, which we refer to as RMS with an RMS global prior ",
494
+ "bbox": [
495
+ 174,
496
+ 843,
497
+ 825,
498
+ 886
499
+ ],
500
+ "page_idx": 3
501
+ },
502
+ {
503
+ "type": "equation",
504
+ "img_path": "images/5c0194cfeb32b504aa41fcd6860da1a42b7555838c239b61501ba3a825a6e397.jpg",
505
+ "text": "$$\n\\theta _ { l } ^ { i } \\theta _ { l } ^ { i - 1 } - \\eta \\frac { \\nabla \\mathcal { L } ( s _ { i } ) } { \\sqrt { M S _ { g } } + \\epsilon } + \\lambda ( \\theta _ { g } - \\theta _ { l } ^ { i - 1 } ) \\odot R M S _ { \\mathrm { n o r m } } .\n$$",
506
+ "text_format": "latex",
507
+ "bbox": [
508
+ 308,
509
+ 891,
510
+ 689,
511
+ 929
512
+ ],
513
+ "page_idx": 3
514
+ },
515
+ {
516
+ "type": "text",
517
+ "text": "6 SPARSE DYNAMIC EVALUATION ",
518
+ "text_level": 1,
519
+ "bbox": [
520
+ 176,
521
+ 102,
522
+ 465,
523
+ 117
524
+ ],
525
+ "page_idx": 4
526
+ },
527
+ {
528
+ "type": "text",
529
+ "text": "Mini-batching over sequences is desirable for some test-time sequence modelling applications because it allows faster processing of multiple sequences in parallel. Dynamic evaluation has a high memory cost for mini-batching because it is necessary to store a different set of parameters for each sequence in the mini-batch. Therefore, we consider a sparse dynamic evaluation variant that updates a smaller number of parameters. We introduce a new adaptation matrix $\\mathcal { M }$ which is initialized to zeros. $\\mathcal { M }$ multiplies hidden state vector $h _ { t }$ of an RNN at every time-step to get a new hidden state $h _ { t } ^ { \\prime }$ , via ",
530
+ "bbox": [
531
+ 174,
532
+ 132,
533
+ 825,
534
+ 215
535
+ ],
536
+ "page_idx": 4
537
+ },
538
+ {
539
+ "type": "equation",
540
+ "img_path": "images/33dd5afcea0eb8804fa38c5b7062b546d8d8f5ab6cf0d4d34b66090ae052a7bb.jpg",
541
+ "text": "$$\nh _ { t } ^ { \\prime } = h _ { t } + \\mathscr { M } h _ { t } .\n$$",
542
+ "text_format": "latex",
543
+ "bbox": [
544
+ 441,
545
+ 218,
546
+ 555,
547
+ 236
548
+ ],
549
+ "page_idx": 4
550
+ },
551
+ {
552
+ "type": "text",
553
+ "text": "$h _ { t } ^ { \\prime }$ then replaces $h _ { t }$ and is propagated throughout the network via both recurrent and feed-forward connections. In a stacked RNN, this formulation could be applied to every layer or just one layer. Applying dynamic evaluation to $\\mathcal { M }$ avoids the need to apply dynamic evaluation to the original parameters of the network, reduces the number of adaptation parameters, and makes mini-batching less memory intensive. We reduce the number of adaptation parameters further by only using $\\mathcal { M }$ to transform an arbitrary subset of $H$ hidden units. This results in $\\mathcal { M }$ being an $H \\times H$ matrix with $d = H ^ { 2 }$ adaptation parameters. If $H$ is chosen to be much less than the number of hidden units, this reduces the number of adaptation parameters dramatically. In Section 7.3 we experiment with sparse dynamic evaluation for character-level language models. ",
554
+ "bbox": [
555
+ 173,
556
+ 237,
557
+ 825,
558
+ 363
559
+ ],
560
+ "page_idx": 4
561
+ },
562
+ {
563
+ "type": "text",
564
+ "text": "7 EXPERIMENTS ",
565
+ "text_level": 1,
566
+ "bbox": [
567
+ 176,
568
+ 382,
569
+ 326,
570
+ 398
571
+ ],
572
+ "page_idx": 4
573
+ },
574
+ {
575
+ "type": "text",
576
+ "text": "We applied dynamic evaluation to word-level and character-level language modelling. In all tasks, we evaluate dynamic evaluation on top of a base model. After training the base model, we tune hyper-parameters for dynamic evaluation on the validation set, and evaluate both the static and dynamic versions of the model on the test set. We also consider follow up experiments that analyse the sequence lengths for which dynamic evaluation is useful. ",
577
+ "bbox": [
578
+ 174,
579
+ 412,
580
+ 825,
581
+ 483
582
+ ],
583
+ "page_idx": 4
584
+ },
585
+ {
586
+ "type": "text",
587
+ "text": "7.1 SMALL SCALE WORD-LEVEL LANGUAGE MODELLING ",
588
+ "text_level": 1,
589
+ "bbox": [
590
+ 174,
591
+ 500,
592
+ 586,
593
+ 513
594
+ ],
595
+ "page_idx": 4
596
+ },
597
+ {
598
+ "type": "text",
599
+ "text": "We train base models on the Penn Treebank (PTB, Marcus et al., 1993), WikiText-2 (Merity et al., 2017b) datasets, and compare the performance of static and dynamic evaluation. These experiments compare dynamic evaluation against past approaches such as the neural cache and measure dynamic evaluation’s general performance across different models and datasets. ",
600
+ "bbox": [
601
+ 174,
602
+ 525,
603
+ 825,
604
+ 580
605
+ ],
606
+ "page_idx": 4
607
+ },
608
+ {
609
+ "type": "text",
610
+ "text": "PTB is derived from articles of the Wall Street Journal. It contains 929k training tokens and a vocab size limited to 10k words. It is one of the most commonly used benchmarks in language modelling. We consider two baseline models on PTB, a standard LSTM implementation with recurrent dropout (Zaremba et al., 2014), and the recent state-of-the-art averaged SGD (ASGD) weight-dropped LSTM (AWD-LSTM, Merity et al., 2017a). ",
611
+ "bbox": [
612
+ 174,
613
+ 587,
614
+ 825,
615
+ 657
616
+ ],
617
+ "page_idx": 4
618
+ },
619
+ {
620
+ "type": "text",
621
+ "text": "Our standard LSTM was taken from the Chainer (Tokui et al., 2015) tutorial on language modelling1, and used two LSTM layers with 650 units each, trained with SGD and regularized with recurrent dropout. On our standard LSTM, we experiment with traditional dynamic evaluation as applied by Mikolov et al. (2010), as well as each modification we make building up to our final update rule as described in Section 5. As our final update rule $( { \\mathrm { R M S } } + { \\mathrm { R M S } }$ global prior) worked best, we use this for all other experiments and use “dynamic eval” by default to refer to this update rule in tables. ",
622
+ "bbox": [
623
+ 173,
624
+ 664,
625
+ 825,
626
+ 748
627
+ ],
628
+ "page_idx": 4
629
+ },
630
+ {
631
+ "type": "text",
632
+ "text": "We applied dynamic evaluation on an AWD-LSTM (Merity et al., 2017a). The AWD-LSTM is a vanilla LSTM that combines the use of drop-connect (Wan et al., 2013) on recurrent weights for regularization, and a variant of ASGD (Polyak & Juditsky, 1992) for optimisation. Our model, which used 3 layers and tied input and output embeddings (Press & Wolf, 2017; Inan et al., 2017), was intended to be a direct replication of AWD-LSTM, using code from their implementation2. Results are given in Table 1. ",
633
+ "bbox": [
634
+ 174,
635
+ 755,
636
+ 825,
637
+ 839
638
+ ],
639
+ "page_idx": 4
640
+ },
641
+ {
642
+ "type": "text",
643
+ "text": "Dynamic evaluation gives significant overall improvements to both models on this dataset. Dynamic evaluation also achieves better final results than the neural cache on both a standard LSTM and the AWD-LSTM reimplementation, and improves the state-of-the-art on PTB. ",
644
+ "bbox": [
645
+ 176,
646
+ 845,
647
+ 823,
648
+ 887
649
+ ],
650
+ "page_idx": 4
651
+ },
652
+ {
653
+ "type": "table",
654
+ "img_path": "images/8e65f6bf426223b9a7ec826f3b6c83610493a7a5ef316ecb8b3025380fc84b69.jpg",
655
+ "table_caption": [
656
+ "Table 1: Penn Treebank perplexities. bptt refers to sequence segment lengths. "
657
+ ],
658
+ "table_footnote": [],
659
+ "table_body": "<table><tr><td>model</td><td>parameters</td><td>valid</td><td>test</td></tr><tr><td>RNN+LDA+kN-5+cache (Mikolov &amp; Zweig,2012)</td><td></td><td></td><td>92.0</td></tr><tr><td>CharCNN (Kim et al., 2016)</td><td>19M</td><td></td><td>78.9</td></tr><tr><td>LSTM (Zaremba et al., 2014)</td><td>66M</td><td>82.2</td><td>78.4</td></tr><tr><td>Variational LSTM (Gal &amp; Ghahramani, 2016)</td><td>66M</td><td></td><td>73.4</td></tr><tr><td>Pointer sentinel-LSTM (Merity et al.,2017b)</td><td>21M</td><td>72.4</td><td>70.9</td></tr><tr><td>Variational LSTM + augmented loss (Inan et al., 2017)</td><td>51M</td><td>71.1</td><td>68.5</td></tr><tr><td>Variational RHN (Zilly et al.,2017)</td><td>23M</td><td>67.9</td><td>65.4</td></tr><tr><td>NAS cell (Zoph &amp; Le,2017)</td><td>54M</td><td></td><td>62.4</td></tr><tr><td>Variational LSTM + gradual learning (Aharoni et al., 2017)</td><td>105M</td><td></td><td>61.7</td></tr><tr><td>LSTM + BB tuning (Melis et al.,2017)</td><td>24M</td><td>60.9</td><td>58.3</td></tr><tr><td>LSTM (Grave et al., 2017)</td><td></td><td>86.9</td><td>82.3</td></tr><tr><td>LSTM + neural cache (Grave et al., 2017)</td><td></td><td>74.6</td><td>72.1</td></tr><tr><td>LSTM (ours)</td><td>20M</td><td>88.0</td><td>85.6</td></tr><tr><td>LSTM + traditional dynamic eval (sgd, bptt=1)</td><td>20M</td><td>78.6</td><td>76.2</td></tr><tr><td>LSTM + dynamic eval (sgd, bptt=5)</td><td>20M</td><td>78.0</td><td>75.6</td></tr><tr><td>LSTM + dynamic eval (sgd, bptt=5, global prior)</td><td>20M</td><td>77.4</td><td>74.8</td></tr><tr><td>LSTM + dynamic eval (RMS,bptt=5, global prior)</td><td>20M</td><td>74.3</td><td>72.2</td></tr><tr><td>LSTM + dynamic eval (RMS, bptt=5, RMS global prior)</td><td>20M</td><td>73.5</td><td>71.7</td></tr><tr><td>AWD-LSTM (Merity et al., 2017a)</td><td>24M</td><td>60.0</td><td>57.3</td></tr><tr><td>AWD-LSTM +neural cache (Merity et al., 2017a)</td><td>24M</td><td>53.9</td><td>52.8</td></tr><tr><td>AWD-LSTM (ours)</td><td>24M</td><td>59.8</td><td>57.7</td></tr><tr><td>AWD-LSTM + dynamic eval</td><td>24M</td><td>51.6</td><td>51.1</td></tr></table>",
660
+ "bbox": [
661
+ 197,
662
+ 102,
663
+ 803,
664
+ 449
665
+ ],
666
+ "page_idx": 5
667
+ },
668
+ {
669
+ "type": "table",
670
+ "img_path": "images/6ca4c54052ce511b573f4cb37a2ce359ffc563bdfdba7f1043c3cd6c194499a1.jpg",
671
+ "table_caption": [
672
+ "Table 2: WikiText-2 perplexities. "
673
+ ],
674
+ "table_footnote": [],
675
+ "table_body": "<table><tr><td>model</td><td>parameters</td><td>valid</td><td>test</td></tr><tr><td>Byte mLSTM (Krause et al., 2016)</td><td>46M</td><td>92.8</td><td>88.8</td></tr><tr><td>Variational LSTM (Inan et al., 2017)</td><td>28M</td><td>91.5</td><td>87.0</td></tr><tr><td>Pointer sentinel-LSTM (Merity et al., 2017b)</td><td></td><td>84.8</td><td>80.8</td></tr><tr><td>LSTM + BB tuning (Melis et al., 2017)</td><td>24M</td><td>69.1</td><td>65.9</td></tr><tr><td>LSTM (Grave et al., 2017)</td><td></td><td>104.2</td><td>99.3</td></tr><tr><td>LSTM + neural cache (Grave et al., 2017)</td><td></td><td>72.1</td><td>68.9</td></tr><tr><td>LSTM (ours)</td><td>50M</td><td>109.1</td><td>103.4</td></tr><tr><td>LSTM + dynamic eval</td><td>50M</td><td>63.7</td><td>59.8</td></tr><tr><td>AWD-LSTM (Merity et al., 2017a)</td><td>33M</td><td>68.6</td><td>65.8</td></tr><tr><td>AWD-LSTM + neural cache (Merity et al., 2017a)</td><td>33M</td><td>53.8</td><td>52.0</td></tr><tr><td>AWD-LSTM (ours)</td><td>33M</td><td>68.9</td><td>66.1</td></tr><tr><td>AWD-LSTM + dynamic eval</td><td>33M</td><td>46.4</td><td>44.3</td></tr></table>",
676
+ "bbox": [
677
+ 222,
678
+ 522,
679
+ 777,
680
+ 732
681
+ ],
682
+ "page_idx": 5
683
+ },
684
+ {
685
+ "type": "text",
686
+ "text": "WikiText-2 is roughly twice the size of PTB, with 2 million training tokens and a vocab size of 33k. It features articles in a non-shuffled order, with dependencies across articles that adaptive methods should be able to exploit. For this dataset, we use the same baseline LSTM implementation and AWD-LSTM re-implementation as on PTB. Results are given in Table 2. ",
687
+ "bbox": [
688
+ 174,
689
+ 818,
690
+ 825,
691
+ 875
692
+ ],
693
+ "page_idx": 5
694
+ },
695
+ {
696
+ "type": "text",
697
+ "text": "Dynamic evaluation improves the state-of-the-art perplexity on WikiText-2, and provides a significantly greater improvement than neural caching to both base models. This suggests that dynamic evaluation is effective at exploiting regularities that co-occur across non-shuffled documents. ",
698
+ "bbox": [
699
+ 176,
700
+ 882,
701
+ 825,
702
+ 924
703
+ ],
704
+ "page_idx": 5
705
+ },
706
+ {
707
+ "type": "table",
708
+ "img_path": "images/4b6ce09f726fcca46b1c568c7150d57c79edeb9fb661f002a21db6068c89fdaa.jpg",
709
+ "table_caption": [
710
+ "Table 3: text8 (word-level) perplexities "
711
+ ],
712
+ "table_footnote": [],
713
+ "table_body": "<table><tr><td>model</td><td>valid</td><td>test</td></tr><tr><td>LSTM (Grave et al., 2017)</td><td></td><td>121.8</td></tr><tr><td>LSTM + neural cache (Grave et al., 2017)</td><td></td><td>99.9</td></tr><tr><td>AWD-LSTM</td><td>80.0</td><td>87.5</td></tr><tr><td>AWD-LSTM + neural cache</td><td>67.5</td><td>75.1</td></tr><tr><td>AWD-LSTM + dynamic eval</td><td>63.3</td><td>70.3</td></tr></table>",
714
+ "bbox": [
715
+ 295,
716
+ 101,
717
+ 700,
718
+ 207
719
+ ],
720
+ "page_idx": 6
721
+ },
722
+ {
723
+ "type": "text",
724
+ "text": "7.2 MEDIUM SCALE WORD-LEVEL LANGUAGE MODELLING ",
725
+ "text_level": 1,
726
+ "bbox": [
727
+ 173,
728
+ 266,
729
+ 596,
730
+ 280
731
+ ],
732
+ "page_idx": 6
733
+ },
734
+ {
735
+ "type": "text",
736
+ "text": "We benchmark the performance of dynamic evaluation against static evaluation and the neural cache on the larger text8 dataset. Like WikiText-2, text8 is derived from Wikipedia text. Text8 was introduced for word level language modelling by Mikolov et al. (2014), which preprocessed the data by mapping rare words to an ‘<unk>’ token, resulting in a vocab of 44k and 17M training tokens. We use the same test set as in Mikolov et al. (2014), but also hold out the final $1 0 0 \\mathrm { k }$ training tokens as a validation set to allow for fair hyper-parameter tuning (the original task did not have a validation set). We trained an AWD-LSTM with 52M parameters using the implementation from Merity et al. (2017a). We then compare the performance of static evaluation, dynamic evaluation, and neural caching at test time. ",
737
+ "bbox": [
738
+ 173,
739
+ 291,
740
+ 825,
741
+ 416
742
+ ],
743
+ "page_idx": 6
744
+ },
745
+ {
746
+ "type": "text",
747
+ "text": "To ensure a fair comparison between dynamic evaluation and the neural cache, we used robust hyper-parameter tuning on the validation set for both methods. For dynamic evaluation, we used the hyper-parameter settings found on PTB, and only tuned the learning rate (to 2 significant figures). The neural cache uses 3 hyper-parameters: the cache length, a mixing parameter and a flatness parameter. Starting from a cache size of 3000, we used a series of grid searches to find optimal values for the mixing parameter and flatness parameter (to 2 significant figures). We then varied the cache size in the range of 2000-4000, and found that the affect of this was negligible, so we kept the cache size at 3000. Results are given in table 3, with the results from Grave et al. (2017) that used the same test set given for context. ",
748
+ "bbox": [
749
+ 174,
750
+ 424,
751
+ 825,
752
+ 549
753
+ ],
754
+ "page_idx": 6
755
+ },
756
+ {
757
+ "type": "text",
758
+ "text": "Dynamic evaluation soundly outperforms static evaluation and the neural cache method, demonstrating that the benefits of dynamic evaluation do not wash away when using a stronger model with more training data. ",
759
+ "bbox": [
760
+ 176,
761
+ 555,
762
+ 825,
763
+ 598
764
+ ],
765
+ "page_idx": 6
766
+ },
767
+ {
768
+ "type": "text",
769
+ "text": "7.3 CHARACTER-LEVEL LANGUAGE MODELLING ",
770
+ "text_level": 1,
771
+ "bbox": [
772
+ 178,
773
+ 616,
774
+ 524,
775
+ 630
776
+ ],
777
+ "page_idx": 6
778
+ },
779
+ {
780
+ "type": "text",
781
+ "text": "We consider dynamic evaluation on the character-level text8, and Hutter Prize (Hutter, 2006) datasets. The Hutter Prize dataset is comprised of Wikipedia text, and includes XML and characters from non-Latin languages. It is 100 million UTF-8 bytes long and contains 205 unique bytes. Similarly to other reported results, we use a 90-5-5 split for training, validation, and testing. The text8 dataset is derived the Hutter Prize dataset, but has all XML removed, and is lower cased to only have 26 characters of English text plus spaces. The character-level text8 task corresponds to the unprocessed version of the text8 data used for our medium-scale word level language modelling experiments. As with Hutter Prize, we use the standard 90-5-5 split for training, validation, and testing for text8. We used a multiplicative LSTM (mLSTM) (Krause et al., 2016)3 as our base model for both datasets. The mLSTMs for both tasks used 2800 hidden units, an embedding layer of 400 units, weight normalization (Salimans & Kingma, 2016), variational dropout (Gal & Ghahramani, 2016), and ADAM (Kingma & Ba, 2014) for training. ",
782
+ "bbox": [
783
+ 174,
784
+ 641,
785
+ 825,
786
+ 808
787
+ ],
788
+ "page_idx": 6
789
+ },
790
+ {
791
+ "type": "text",
792
+ "text": "We also consider sparse dynamic evaluation, as described in Section 6, on the Hutter Prize dataset. For sparse dynamic evaluation, we adapted a subset of 500 hidden units, resulting in a $5 0 0 \\times 5 0 0$ adaptation matrix and $2 5 0 \\mathrm { k }$ adaptation parameters. Our mLSTM only contained one recurrent layer, so only one adaptation matrix was used for sparse dynamic evaluation. All of our dynamic evaluation results in this section use the final update rule given in Section 5. Results for Hutter Prize are given in Table 4, and results for text8 are given in Table 5. ",
793
+ "bbox": [
794
+ 174,
795
+ 815,
796
+ 825,
797
+ 898
798
+ ],
799
+ "page_idx": 6
800
+ },
801
+ {
802
+ "type": "table",
803
+ "img_path": "images/1326a533b26c072573b525328e842d2dfda097ca0f10b3bbdd761c901031c7e3.jpg",
804
+ "table_caption": [
805
+ "Table 4: Hutter Prize test set error in bits/char. "
806
+ ],
807
+ "table_footnote": [],
808
+ "table_body": "<table><tr><td>model</td><td>parameters</td><td>test</td></tr><tr><td>Stacked LSTM (Graves,2013)</td><td>21M</td><td>1.67</td></tr><tr><td rowspan=\"4\">Stacked LSTM + traditional dynamic eval (Graves,2013) Multiplicative integration LSTM (Wu et al.,2016) HyperLSTM (Ha et al., 2017)</td><td>21M</td><td>1.33</td></tr><tr><td>17M</td><td>1.44</td></tr><tr><td>27M</td><td>1.34</td></tr><tr><td></td><td>1.32</td></tr><tr><td>Bytenet decoder (Kalchbrenner et al., 2016)</td><td></td><td>1.31</td></tr><tr><td>LSTM + BB tuning (Melis et al., 2017)</td><td>46M</td><td>1.30</td></tr><tr><td>Recurrent highway networks (Zilly et al.,2017) Fast-slow LSTM (Mujika et al.,2017)</td><td>46M</td><td>1.27</td></tr><tr><td></td><td>47M</td><td>1.25</td></tr><tr><td>mLSTM (Krause et al., 2016)</td><td>46M</td><td>1.24</td></tr><tr><td>mLSTM + sparse dynamic eval (d = 250k) mLSTM + dynamic eval</td><td>46M 46M</td><td>1.13 1.08</td></tr></table>",
809
+ "bbox": [
810
+ 232,
811
+ 101,
812
+ 767,
813
+ 303
814
+ ],
815
+ "page_idx": 7
816
+ },
817
+ {
818
+ "type": "table",
819
+ "img_path": "images/2bc3e900d88a8bbabcd07a7b56e555153e6b0c4040906577f37c02f3a87a67ba.jpg",
820
+ "table_caption": [
821
+ "Table 5: text8 (char-level) test set error in bits/char. "
822
+ ],
823
+ "table_footnote": [],
824
+ "table_body": "<table><tr><td>model</td><td>parameters</td><td>test</td></tr><tr><td>Multiplicative RNN (Mikolov et al., 2012)</td><td>5M</td><td>1.54</td></tr><tr><td>Multiplicative integration LSTM (Wu et al., 2016)</td><td>4M</td><td>1.44</td></tr><tr><td>LSTM (Cooijmans et al., 2017)</td><td></td><td>1.43</td></tr><tr><td>Batch normalised LSTM (Cooijmans et al., 2017)</td><td></td><td>1.36</td></tr><tr><td>Hierarchical multiscale LSTM (Chung et al., 2017)</td><td></td><td>1.29</td></tr><tr><td>Recurrent highway networks (Zilly et al., 2017)</td><td>45M</td><td>1.27</td></tr><tr><td>mLSTM (Krause et al., 2016)</td><td>45M</td><td>1.27</td></tr><tr><td>mLSTM + dynamic eval</td><td>45M</td><td>1.19</td></tr></table>",
825
+ "bbox": [
826
+ 250,
827
+ 352,
828
+ 748,
829
+ 500
830
+ ],
831
+ "page_idx": 7
832
+ },
833
+ {
834
+ "type": "text",
835
+ "text": "Dynamic evaluation achieves large improvements to our base models and state-of-the-art results on both datasets. Sparse dynamic evaluation also achieves significant improvements on Hutter Prize using only $0 . 5 \\%$ of the adaptation parameters of regular dynamic evaluation. ",
836
+ "bbox": [
837
+ 174,
838
+ 560,
839
+ 825,
840
+ 603
841
+ ],
842
+ "page_idx": 7
843
+ },
844
+ {
845
+ "type": "text",
846
+ "text": "7.4 TIME-SCALES OF DYNAMIC EVALUATION ",
847
+ "text_level": 1,
848
+ "bbox": [
849
+ 174,
850
+ 625,
851
+ 496,
852
+ 638
853
+ ],
854
+ "page_idx": 7
855
+ },
856
+ {
857
+ "type": "text",
858
+ "text": "We measure time-scales at which dynamic evaluation gains an advantage over static evaluation. Starting from the model trained on Hutter Prize, we plot the performance of static and dynamic evaluation against the number of characters processed on sequences from the Hutter Prize test set, and sequences in Spanish from the European Parliament dataset (Koehn, 2005). ",
859
+ "bbox": [
860
+ 174,
861
+ 651,
862
+ 825,
863
+ 707
864
+ ],
865
+ "page_idx": 7
866
+ },
867
+ {
868
+ "type": "text",
869
+ "text": "The Hutter Prize data experiments show the timescales at which dynamic evaluation gained the advantage observed in Table 4. We divided the Hutter Prize test set into 500 sequences of length 10000, and applied static and dynamic evaluation to these sequences using the same model and methodology used to obtain results in Table 4. Losses were averaged across these 500 sequences to obtain average losses at each time step. Plots of the average cross-entropy errors against the number of Hutter characters sequenced are given in Figure 2a. ",
870
+ "bbox": [
871
+ 174,
872
+ 714,
873
+ 825,
874
+ 797
875
+ ],
876
+ "page_idx": 7
877
+ },
878
+ {
879
+ "type": "text",
880
+ "text": "The Spanish experiments measure how dynamic evaluation handles large distribution shifts between training and test time, as Hutter Prize contains very little Spanish. We used the first 5 million characters of the Spanish European Parliament data in place of the Hutter Prize test set. The Spanish experiments used the same base model and dynamic evaluation settings as Hutter Prize. Plots of the average cross-entropy errors against the number of Spanish characters sequenced are given in Figure 2b. ",
881
+ "bbox": [
882
+ 174,
883
+ 805,
884
+ 825,
885
+ 888
886
+ ],
887
+ "page_idx": 7
888
+ },
889
+ {
890
+ "type": "text",
891
+ "text": "On both datasets, dynamic evaluation gave a very noticeable advantage after a few hundred characters. For Spanish this advantage continued to grow as more of the sequence was processed, whereas for Hutter, this advantage was maximized after viewing around $2 \\mathrm { - } 3 \\mathrm { k }$ characters. The advantage of dynamic evaluation was also much greater on Spanish sequences than Hutter sequences. ",
892
+ "bbox": [
893
+ 174,
894
+ 895,
895
+ 823,
896
+ 924
897
+ ],
898
+ "page_idx": 7
899
+ },
900
+ {
901
+ "type": "image",
902
+ "img_path": "images/73266d39851529ff033477c1b7cc5ebfcf82ccb745d2822af2bf1efb79932a2c.jpg",
903
+ "image_caption": [
904
+ "Figure 2: Average losses in bits/char of dynamic evaluation and static evaluation plotted against number of characters processed; on sequences from the Hutter Prize test set (left) and European Parliament dataset in Spanish (right), averaged over 500 trials for each. Losses at each data point are averaged over sequence segments of length 100, and are not cumulative. Note the different y-axis scales in the two plots. "
905
+ ],
906
+ "image_footnote": [],
907
+ "bbox": [
908
+ 240,
909
+ 107,
910
+ 746,
911
+ 285
912
+ ],
913
+ "page_idx": 8
914
+ },
915
+ {
916
+ "type": "text",
917
+ "text": "",
918
+ "bbox": [
919
+ 174,
920
+ 393,
921
+ 823,
922
+ 422
923
+ ],
924
+ "page_idx": 8
925
+ },
926
+ {
927
+ "type": "text",
928
+ "text": "We also drew 300 character conditional samples from the static and dynamic versions of our model after viewing 10k characters of Spanish. For the dynamic model, we continued to apply dynamic evaluation during sampling as well, by the process described in Section 3. The conditional samples are given in the appendix. The static samples quickly switched to English that resembled Hutter Prize data. The dynamic model generated data with some Spanish words and a number of made up words with characteristics of Spanish words for the entirety of the sample. This is an example of the kinds of features that dynamic evaluation was able to learn to model on the fly. ",
929
+ "bbox": [
930
+ 173,
931
+ 430,
932
+ 825,
933
+ 527
934
+ ],
935
+ "page_idx": 8
936
+ },
937
+ {
938
+ "type": "text",
939
+ "text": "8 CONCLUSION ",
940
+ "text_level": 1,
941
+ "bbox": [
942
+ 176,
943
+ 547,
944
+ 318,
945
+ 564
946
+ ],
947
+ "page_idx": 8
948
+ },
949
+ {
950
+ "type": "text",
951
+ "text": "This work explores and develops methodology for applying dynamic evaluation to sequence modelling tasks. Experiments show that the proposed dynamic evaluation methodology gives large test time improvements across character and word level language modelling. Our improvements to language modelling have applications to speech recognition and machine translation over longer contexts, including broadcast speech recognition and paragraph level machine translation. Overall, dynamic evaluation is shown to be an effective method for exploiting pattern re-occurrence in sequences. ",
952
+ "bbox": [
953
+ 174,
954
+ 579,
955
+ 825,
956
+ 664
957
+ ],
958
+ "page_idx": 8
959
+ },
960
+ {
961
+ "type": "text",
962
+ "text": "REFERENCES ",
963
+ "text_level": 1,
964
+ "bbox": [
965
+ 176,
966
+ 684,
967
+ 285,
968
+ 699
969
+ ],
970
+ "page_idx": 8
971
+ },
972
+ {
973
+ "type": "text",
974
+ "text": "Z. Aharoni, G. Rattner, and H. Permuter. Gradual learning of deep recurrent neural networks. arXiv preprint arXiv:1708.08863, 2017. \nJimmy Ba, Geoffrey E Hinton, Volodymyr Mnih, Joel Z Leibo, and Catalin Ionescu. Using fast weights to attend to the recent past. In Advances In Neural Information Processing Systems, pp. 4331–4339, 2016. \nJ. R. Bellegarda. Statistical language model adaptation: review and perspectives. Speech Communication, 42(1): 93–108, 2004. \nJ. Chung, S. Ahn, and Y. Bengio. Hierarchical multiscale recurrent neural networks. ICLR, 2017. \nT. Cooijmans, N. Ballas, C. Laurent, and A. Courville. Recurrent batch normalization. ICLR, 2017. \nM. Fortunato, C. Blundell, and O. Vinyals. Bayesian recurrent neural networks. arXiv preprint arXiv:1704.02798, 2017. \nY. Gal and Z. Ghahramani. A theoretically grounded application of dropout in recurrent neural networks. In Advances in neural information processing systems, pp. 1019–1027, 2016. \nE. Grave, A. Joulin, and N. Usunier. Improving neural language models with a continuous cache. ICLR, 2017. \nA. Graves. Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850, 2013. \nD. Ha, A. Dai, and Q. Lee. Hypernetworks. ICLR, 2017. \nS. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Computation, 9:1735–1780, 1997. \nM. Hutter. The human knowledge compression prize. URL http://prize.hutter1.net, 2006. \nH. Inan, K. Khosravi, and R. Socher. Tying word vectors and word classifiers: A loss framework for language modeling. ICLR, 2017. \nF. Jelinek, B. Merialdo, S. Roukos, and M. Strauss. A dynamic language model for speech recognition. In HLT, volume 91, pp. 293–295, 1991. \nN. Kalchbrenner, L. Espeholt, K. Simonyan, A. Oord, A. Graves, and K. Kavukcuoglu. Neural machine translation in linear time. arXiv preprint arXiv:1610.10099, 2016. \nY. Kim, Y. Jernite, D. Sontag, and A. M. Rush. Character-aware neural language models. In Thirtieth AAAI Conference on Artificial Intelligence, 2016. \nD. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. \nP. Koehn. Europarl: A parallel corpus for statistical machine translation. In MT Summit, volume 5, pp. 79–86, 2005. \nB. Krause, L. Lu, I. Murray, and S. Renals. Multiplicative LSTM for sequence modelling. arXiv preprint arXiv:1609.07959, 2016. \nB. Krause, I. Murray, S. Renals, and L. Lu. Multiplicative LSTM for sequence modelling. ICLR Workshop track, 2017. URL https://openreview.net/forum?id $=$ SJCS5rXFl. \nR. Kuhn. Speech recognition and the frequency of recently used words: A modified Markov model for natural language. In Proceedings of the 12th conference on Computational linguistics-Volume 1, pp. 348–350. Association for Computational Linguistics, 1988. \nM. P. Marcus, M. A. Marcinkiewicz, and B. Santorini. Building a large annotated corpus of English: The Penn Treebank. Computational linguistics, 19(2):313–330, 1993. \nG. Melis, C. Dyer, and P. Blunsom. On the state of the art of evaluation in neural language models. arXiv preprint arXiv:1707.05589, 2017. \nS. Merity, N. S. Keskar, and R. Socher. Regularizing and optimizing LSTM language models. arXiv preprint arXiv:1708.02182, 2017a. \nS. Merity, C. Xiong, J. Bradbury, and R. Socher. Pointer sentinel mixture models. ICLR, 2017b. \nT. Mikolov and G. Zweig. Context dependent recurrent neural network language model. SLT, 12:234–239, 2012. \nT. Mikolov, M. Karafiát, L. Burget, J. Cernocky, and S. Khudanpur. Recurrent neural network based language \\` model. In Interspeech, volume 2, pp. 3, 2010. \nT. Mikolov, I. Sutskever, A. Deoras, H. Le, S. Kombrink, and J. Cernocky. Subword language modeling with neural networks. preprint (http://www. fit. vutbr. cz/imikolov/rnnlm/char. pdf), 2012. \nTomas Mikolov, Armand Joulin, Sumit Chopra, Michael Mathieu, and Marc’Aurelio Ranzato. Learning longer memory in recurrent neural networks. arXiv preprint arXiv:1412.7753, 2014. \nA. Mujika, F. Meier, and A. Steger. Fast-slow recurrent neural networks. arXiv preprint arXiv:1705.08639, 2017. \nA. G. Ororbia II, T. Mikolov, and D. Reitter. Learning simpler language models with the differential state framework. Neural Computation, 2017. \nB. T. Polyak and A. B. Juditsky. Acceleration of stochastic approximation by averaging. SIAM Journal on Control and Optimization, 30(4):838–855, 1992. \nO. Press and L. Wolf. Using the output embedding to improve language models. EACL 2017, pp. 157, 2017. \nT. Salimans and D. P. Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. In Advances in Neural Information Processing Systems, pp. 901–909, 2016. \nJürgen Schmidhuber. Learning to control fast-weight memories: An alternative to dynamic recurrent networks. Neural Computation, 4(1):131–139, 1992. \nT. Tieleman and G. E. Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural Networks for Machine Learning, 4(2), 2012. \nSeiya Tokui, Kenta Oono, Shohei Hido, and Justin Clayton. Chainer: a next-generation open source framework for deep learning. In Proceedings of workshop on machine learning systems (LearningSys) in the twenty-ninth annual conference on neural information processing systems (NIPS), volume 5, 2015. \nL. Wan, M. Zeiler, S. Zhang, Yann L. Cun, and R. Fergus. Regularization of neural networks using dropconnect. In Proceedings of the 30th international conference on machine learning (ICML-13), pp. 1058–1066, 2013. \nP. J. Werbos. Backpropagation through time: what it does and how to do it. Proceedings of the IEEE, 78: 1550–1560, 1990. \nY. Wu, S. Zhang, Y. Zhang, Y. Bengio, and R. Salakhutdinov. On multiplicative integration with recurrent neural networks. In NIPS, 2016. \nW. Zaremba, I. Sutskever, and O. Vinyals. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, 2014. \nJ. G. Zilly, R. K. Srivastava, J. Koutník, and J. Schmidhuber. Recurrent highway networks. ICLR, 2017. \nB. Zoph and Quoc V Le. Neural architecture search with reinforcement learning. ICLR, 2017. ",
975
+ "bbox": [
976
+ 173,
977
+ 707,
978
+ 826,
979
+ 924
980
+ ],
981
+ "page_idx": 8
982
+ },
983
+ {
984
+ "type": "text",
985
+ "text": "",
986
+ "bbox": [
987
+ 171,
988
+ 89,
989
+ 828,
990
+ 920
991
+ ],
992
+ "page_idx": 9
993
+ },
994
+ {
995
+ "type": "text",
996
+ "text": "A APPENDIX ",
997
+ "text_level": 1,
998
+ "bbox": [
999
+ 176,
1000
+ 102,
1001
+ 297,
1002
+ 117
1003
+ ],
1004
+ "page_idx": 10
1005
+ },
1006
+ {
1007
+ "type": "text",
1008
+ "text": "A.1 DYNAMIC SAMPLES CONDITIONED ON SPANISH",
1009
+ "text_level": 1,
1010
+ "bbox": [
1011
+ 174,
1012
+ 133,
1013
+ 547,
1014
+ 147
1015
+ ],
1016
+ "page_idx": 10
1017
+ },
1018
+ {
1019
+ "type": "text",
1020
+ "text": "300 character samples generated from the dynamic version of the model trained on Hutter Prize, conditioned on 10k of Spanish characters. The final sentence fragment of the 10k conditioning characters is given to the reader, with the generated text given in bold: ",
1021
+ "bbox": [
1022
+ 174,
1023
+ 160,
1024
+ 825,
1025
+ 202
1026
+ ],
1027
+ "page_idx": 10
1028
+ },
1029
+ {
1030
+ "type": "text",
1031
+ "text": "Tiene importancia este compromiso en la medida en que la Comisión es un organismo que tiene el montembre tas procedíns la conscriptione se ha Tesalo del Pómienda que et hanemos que Pe la Siemina. ",
1032
+ "bbox": [
1033
+ 176,
1034
+ 228,
1035
+ 823,
1036
+ 270
1037
+ ],
1038
+ "page_idx": 10
1039
+ },
1040
+ {
1041
+ "type": "text",
1042
+ "text": "De la Pedrera Orden es Señora Presidente civil, Orden de siemin presente relevante frónmida que esculdad pludiore e formidad President de la Presidenta Antidorne Adamirmidad i ciemano de el 200’. Fo ",
1043
+ "bbox": [
1044
+ 176,
1045
+ 270,
1046
+ 825,
1047
+ 311
1048
+ ],
1049
+ "page_idx": 10
1050
+ },
1051
+ {
1052
+ "type": "text",
1053
+ "text": "A.2 STATIC SAMPLES CONDITIONED ON SPANISH",
1054
+ "text_level": 1,
1055
+ "bbox": [
1056
+ 178,
1057
+ 329,
1058
+ 526,
1059
+ 343
1060
+ ],
1061
+ "page_idx": 10
1062
+ },
1063
+ {
1064
+ "type": "text",
1065
+ "text": "300 character samples generated from the static version of the model trained on Hutter Prize, conditioned on 10k of Spanish characters. The final sentence fragment of the 10k conditioning characters is given to the reader, with the generated text given in bold: ",
1066
+ "bbox": [
1067
+ 176,
1068
+ 356,
1069
+ 825,
1070
+ 397
1071
+ ],
1072
+ "page_idx": 10
1073
+ },
1074
+ {
1075
+ "type": "text",
1076
+ "text": "Tiene importancia este compromiso en la medida en que la Comisión es un organismo que tiene el monde, ",
1077
+ "bbox": [
1078
+ 176,
1079
+ 424,
1080
+ 823,
1081
+ 452
1082
+ ],
1083
+ "page_idx": 10
1084
+ },
1085
+ {
1086
+ "type": "text",
1087
+ "text": "&lt;br&gt;There is a secret act in the world except Cape Town, seen in now flat comalo and ball market and has seen the closure of the eagle as imprints in a dallas within the country.&quot; Is a topic for an increasingly small contract saying Allan Roth acquired the government in [[1916]]. ",
1088
+ "bbox": [
1089
+ 176,
1090
+ 454,
1091
+ 823,
1092
+ 508
1093
+ ],
1094
+ "page_idx": 10
1095
+ }
1096
+ ]
parse/train/rkdU7tCaZ/rkdU7tCaZ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rkdU7tCaZ/rkdU7tCaZ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ryF7rTqgl/ryF7rTqgl.md ADDED
@@ -0,0 +1,270 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # UNDERSTANDING INTERMEDIATE LAYERS USING LINEAR CLASSIFIER PROBES
2
+
3
+ Guillaume Alain & Yoshua Bengio
4
+ Department of Computer Science and Operations Research
5
+ Universite de Montr´ eal´
6
+ Montreal, QC. H3C 3J7
7
+ guillaume.alain.umontreal@gmail.com
8
+
9
+ # ABSTRACT
10
+
11
+ Neural network models have a reputation for being black boxes. We propose a new method to better understand the roles and dynamics of the intermediate layers. This has direct consequences on the design of such models and it enables the expert to be able to justify certain heuristics (such as adding auxiliary losses in middle layers). Our method uses linear classifiers, referred to as “probes”, where a probe can only use the hidden units of a given intermediate layer as discriminating features. Moreover, these probes cannot affect the training phase of a model, and they are generally added after training. They allow the user to visualize the state of the model at multiple steps of training. We demonstrate how this can be used to develop a better intuition about models and to diagnose potential problems.
12
+
13
+ # 1 INTRODUCTION
14
+
15
+ The recent history of deep neural networks features an impressive number of new methods and technological improvements to allow the training of deeper and more powerful networks.
16
+
17
+ Despite this, models still have a reputation for being black boxes. Neural networks are criticized for their lack of interpretability, which is a tradeoff that we accept because of their amazing performance on many tasks. Efforts have been made to identify the role played by each layer, but it can be hard to find a meaning to individual layers.
18
+
19
+ There are good arguments to support the claim that the first layers of a convolution network for image recognition contain filters that are relatively “general”, in the sense that they would work great even if we switched to an entirely different dataset of images. The last layers are specific to the dataset being used, and have to be retrained when using a different dataset. In Yosinski et al. (2014) the authors try to pinpoint the layer at which this transition occurs, but they show that the exact transition is spread across multiple layers.
20
+
21
+ In this paper, we introduce the concept of linear classifier probe, referred to as a “probe” for short when the context is clear. We start from the concept of Shannon entropy, which is the classic way to describe the information contents of a random variable. We then seek to apply that concept to understand the roles of the intermediate layers of a neural network, to measure how much information is gained at every layer (answer : technically, none). We argue that it fails to apply, and so we propose an alternative framework to ask the same question again. This time around, we ask what would be the performance of an optimal linear classifier if it was trained on the inputs of a given layer from our model. We demonstrate how this powerful concept can be very useful to understand the dynamics involved in a deep neural network during training and after.
22
+
23
+ # 2 INFORMATION THEORY
24
+
25
+ It was a great discovery when Claude Shannon repurposed the notion of entropy to represent information contents in a formal way. It laid the foundations for the discipline of information theory. We would refer the reader to first chapters of MacKay (2003) for a good exposition on the matter.
26
+
27
+ Naturally, we would like to ask some questions about the information contents of the many layers of convolutional neural networks.
28
+
29
+ • What happens when we add more layers? • Where does information flow in a neural network with multiple branches? • Does having multiple auxiliary losses help? (e.g. Inception model)
30
+
31
+ Intuitively, for a training sample $x _ { i }$ with its associated label $y _ { i }$ , a deep model is getting closer to the correct answer in the higher layers. It starts with the difficult job of classifying $x _ { i }$ , which becomes easier as the higher layers distill $x _ { i }$ into a representation that is easier to classify. One might be tempted to say that this means that the higher layers have more information about the ground truth, but this would be incorrect.
32
+
33
+ Here there is a mismatch between two different concepts of information. The notion of entropy fails to capture the essence of those questions. This is illustrated in a formal way by the Data Processing Inequality. It states that, for a set of three random variables satisfying the dependency
34
+
35
+ $$
36
+ X Y Z
37
+ $$
38
+
39
+ then we have that
40
+
41
+ $$
42
+ I ( X ; Z ) \leq I ( X ; Y )
43
+ $$
44
+
45
+ where $I ( X , Y )$ is the mutual information.
46
+
47
+ Intuitively, this means that the deterministic transformations performed by the many layers of a deep neural network are not adding more information. In the best case, they preserve information and affect only the representation. But in almost all situations, they lose some information in the process.
48
+
49
+ If we distill this further, we can think of the serious mismatch between the two following ideas :
50
+
51
+ • Part of the genius of the notion of entropy is that is distills the essence of information to a quantity that does not depend on the particular representation. • A deep neural network is a series of simple deterministic transformations that affect the representation so that the final layer can be fed to a linear classifier.
52
+
53
+ The former ignores the representation of data, while the latter is an expert in finding good representations. A deaf painter is working on a visual masterpiece to offer to a blind musician who plays music for him.
54
+
55
+ We need a conceptual tool to analyze neural networks in a way that corresponds better to our intuitive notion of information. The role of data representation is important, but we would also argue that we have to think about this issue as it relates to computational complexity. A linear classifier is basically the simplest form of classifier that is neither trivial nor degenerate.
56
+
57
+ We define a new notion of information that depends on our ability to classify features of a given layer with an optimal linear classifier. Then we have a conceptual tool to ask new questions and to get potentially interesting answers.
58
+
59
+ We end this section with a conceptual example in Figure 1. If $X$ contains an image of the savannah, and $Y \in \{ 0 , 1 \}$ refers to whether it contains a lion or not, then none of the subsequent layers are truly more informative than $X$ itself. The raw bits from the picture file contain everything.
60
+
61
+ # 3 LINEAR CLASSIFIER PROBES
62
+
63
+ In section 3.1 we present the main concept of this paper. We illustrate the concept in section 3.3. We then present a basic experiment in section 3.4. In section 3.6 we modify a very deep network in two different ways and we show how probes allow us to visualize the consequences (sometimes disastrous) of our design choices.
64
+
65
+ ![](images/78baeb4650f7068a4bb370f8b79ef6aff22f2ee2233ad5cfa0a96e0c27beee1b.jpg)
66
+
67
+ (a) hex dump of picture of a lion
68
+
69
+ ![](images/750bb3ce2c908bfaf317f9e7fb8b1ba500189ea38e6e0a815ee9683f5263efff.jpg)
70
+ (b) same lion in human-readable format
71
+
72
+ Figure 1: The hex dump represented on the left has more information contents than the image on the right. Only one of them can be processed by the human brain in time to save their lives. Computational convenience matters. Not just entropy.
73
+
74
+ # 3.1 PROBES
75
+
76
+ As we discussed the previous section, there is indeed a good reason to use many deterministic layers, and it is because they perform useful transformations to the data with the goal of ultimately fitting a linear classifier at the very end. That is the purpose of the many layers. They are a tool to transform data into a form to be fed to a boring linear classifier.
77
+
78
+ With this in mind, it is natural to ask if that transformation is sudden or progressive, and whether the intermediate layers already have a representation that is immediately useful to a linear classifier. We refer the reader to Figure 2 for a diagram of probes being inserted in the usual deep neural network.
79
+
80
+ ![](images/7fe427e62a973b961b2b7a92e9fc20ca3f76db5858d600f6655652c21603a5fe.jpg)
81
+ Figure 2: Probes being added to every layer of a model. These additional probes are not supposed to change the training of the model, so we add a little diode symbol through the arrows to indicate that the gradients will not backpropagate through those connections.
82
+
83
+ The conceptual framework that we propose is one where the intuitive notion of information is equivalent with immediate suitability for a linear classifier (instead of being related to entropy).
84
+
85
+ Just to be absolutely clear about what we call a linear classifier, we mean a function
86
+
87
+ $$
88
+ \begin{array} { r } { f \colon H \to [ 0 , 1 ] ^ { D } \qquad } \\ { h \mapsto \operatorname { s o f t m a x } \left( W h + b \right) . } \end{array}
89
+ $$
90
+
91
+ where $h \in H$ are the features of some hidden layer, $[ 0 , 1 ] ^ { D }$ is the space of one-hot encodings of the $D$ target classes, and $( W , b )$ are the probe weights and biases to be learned so as to minimize the usual cross-entropy loss.
92
+
93
+ Over the course of training a model, the parameters of the model change. However, probes only make sense when we refer to a given training step. We can talk about the probes at iteration $n$ of training, when the model parameters are $\theta _ { n }$ . These parameters are not affected by the probes. We prevent backpropagation through the model either by stopping the gradient flow (done with tf.stop gradient in tensorflow), or simply by specifying that the only variables to be updated are the probe parameters, while we keep $\theta _ { n }$ frozen.
94
+
95
+ # 3.1.1 TRAINING THE PROBES
96
+
97
+ For the purposes of this paper, we train the probes up to convergence with fixed model parameters, and we report the prediction error on the training set.
98
+
99
+ It is absolutely possible to train the probes simulatenously while training the model itself. This is a good approach if we consider about how long it can take to train the model. However, this creates a potential problem if we optimize the loss of the model more quickly than the loss of the probes. This can present a skewed view of the actual situation that we would have if we trained the probes until convergence before updating the model parameters. If we accept this trade off, then we can train the probes at the same time as the model.
100
+
101
+ In some situations, the probes might overfit the training set, so we may want to do early stopping on the validation set and report the performance for the probes on the test set. This is what we do in section 3.4 with the simple MNIST convnet.
102
+
103
+ We are still unsure if one of those variations should be preferred in general, and right now they all seem acceptable so long as we interpret the probe measurements properly.
104
+
105
+ Note that training those probes represents a convex optimization problem. In practice, this does mean guarantee that they are easy to train. However, it is reassuring because it means that probes taken at time $\theta _ { n }$ can be used as initialization for probes at time $\theta _ { n + 1 }$ .
106
+
107
+ We use cross-entropy as probe loss because all models studied here used cross-entropy. Other alternative losses could be justified in other settings.
108
+
109
+ # 3.2 PROBES ON BIFURCATING TOY MODEL
110
+
111
+ Here we show a hypothetical example in which a model contains a bifurcation with two paths that later recombine. We are interested in knowing whether those two branches are useful, or whether one is potentially redundant or useless.
112
+
113
+ ![](images/28d8e18ee4159097fbcf3411da69627a35992457a870f3a7cd002a25607618bb.jpg)
114
+
115
+ For example, the two different branches might contain convolutional layers with different dimensions. They may have a different number of sublayers, or one might represent a skip connection. We assume that the branches are combined through concatenation of their features, so that nothing is lost.
116
+
117
+ For this hypothetical situation, we indicate the probe prediction errors on the graphical model. The upper path has a prediction error of 0.75, the lower path has 0.60, and their combination has 0.45. Small errors are preferred. Although the upper path has “less information” than the lower path, we can see here that it is not redundant information, because when we concatenate the features of the two branches we get a prediction error of $0 . 4 5 < 0 . 6 0$ .
118
+
119
+ If the concatenated layer had a prediction error of 0.60 instead of 0.45, then we could declare that the above branch did nothing useful. It may have nonzero weights, but it’s still useless.
120
+
121
+ Naturally, this kind of conclusion might be entirely wrong. It might be the case that the branch above contains very meaningful features, and they simply happen to be useless to a linear classifier applied right there. The idea of using linear classification probes to understand the roles of different branches is suggested as a heuristic instead of a hard rule. Moreover, if the probes are not optimized perfectly, the conclusions drawn can be misleading.
122
+
123
+ Note that we are reporting here the prediction errors, and it might be the case that the loss is indeed lower when we concatenate the two branches, but for some reason it could fail to apply to the prediction error.
124
+
125
+ ![](images/e700959f190618878009af74e4198fba1113ac0a2aea7427043b21425727966d.jpg)
126
+ Figure 3: Toy experiment described in section 3.3, with linearly separable data (two labels), an untrained MLP with 32 layers, and probes at every layer. We report the prediction error for every probe, where 0.50 would be the performence of a coin flip and 0.00 would be ideal. Note that the layer 0 here corresponds to the raw data, and the probes are indeed able to classify it perfectly. As expected, performance degrades when applying random transformations. If many more layers were present, it would be hard to imagine how the final layer (with the model loss) can get any useful signal to backpropagate.
127
+
128
+ # 3.3 PROBES ON UNTRAINED MODEL
129
+
130
+ We start with a toy example to illustrate what kind of plots we expect from probes. We use a 32- layer MLP with 128 hidden units. All the layers are fully-connected and we use LeakyReLU(0.5) as activation function.
131
+
132
+ We will run the same experiment 100 times, with a different toy dataset each time. The goal is to use a data distribution $( X , Y )$ where $X \in \mathbb { R } ^ { 1 2 8 }$ is drawn $\mathcal { N } ( 0 , I )$ and where $Y \in \{ - 1 , 1 \}$ in linearly separable (i.e. super easy to classify with a one-layer neural network). To do this, we just pick a $w \in \mathbb { R } ^ { 1 2 8 }$ for each experiment, and let the label $y _ { n }$ be the sign of $x _ { n } ^ { T } w$ .
133
+
134
+ We initialize this 32-layer MLP using glorot normal initialization, we do not perform any training on the model, and we add one probe at every layer. We optimize the probes with RMSProp and a sufficiently small learning rate.
135
+
136
+ In Figure 3, we show the prediction error rate for every probe, averaged over the 100 experiments. The graph includes a probe applied directly on the inputs $X$ , where we naturally have an error rate that is essentially zero (to be expected by the way we constructed our data), and which serves as a kind of sanity check. Given that we have only two possible labels, we also show a dotted horizontal line at 0.50, which is essentially the prediction error that we would get by flipping a coin. We can see that the prediction error rate climbs up towards 0.50 as we go deeper in the MLP (with untrained parameters).
137
+
138
+ This illustrates the idea that the input signal is getting mangled by the successive layers, so much that it becomes rather useless by the time we reach the final layer. We checked the mean activation norm of the hidden units at layer 32 to be sure that numerical underflow was not the cause for the degradation. Note that this situation could be avoided by using orthogonal weights.
139
+
140
+ One of the popular explanation for training difficulties in very deep models is that of the exploding/vanishing (Hochreiter, 1991; Bengio et al., 1993). Here we would like to offer another complementary explanation, based on the observations from Figure 3. That is, at the beginning of training, the usefulness of layers decays as we go deeper, reaching the point where the deeper layers are utterly useless. The values contained in the last layer are then used in the final softmax classifier, and the loss backpropagates the values of the derivatives. Since that derivative is based on garbage activations, the backpropagated quantities are also garbage, which means that the weights are all going to be updated based on garbage. The weights stay bad, and we fail to train the model. The authors like to refer to that phenomenon as garbage forwardprop, garbage backprop, in reference to the popular concept of garbage in, garbage out in computer science.
141
+
142
+ # 3.4 PROBES ON MNIST CONVNET
143
+
144
+ In this section we run the MNIST convolutional model provided by the tensorflow github repo (tensorflow/models/image/mnist/convolutional.py) We selected that model for reproducibility and to demonstrate how to easily peek into popular models by using probes.
145
+
146
+ We start by sketching the model in Figure 4. We report the results at the beginning and the end of training on Figure 5. One of the interesting dynamics to be observed there is how useful the first layers are, despite the fact that the model is completely untrained. Random projections can be useful to classify data, and this has been studied by others (Jarrett et al., 2009).
147
+
148
+ ![](images/f438d4f7a1cc7b5b3e6e74d2d823d02bd54755e30d757f7ce61cce6044b374ba.jpg)
149
+ Figure 4: This graphical model represents the neural network that we are going to use for MNIST. The model could be written in a more compact form, but we represent it this way to expose all the locations where we are going to insert probes. The model itself is simply two convolutional layers followed by two fully-connected layer (one being the final classifier). However, we insert probes on each side of each convolution, activation function, and pooling function. This is a bit overzealous, but the small size of the model makes this relatively easy to do.
150
+
151
+ ![](images/bc7dcf2a16cd443533b530cf7acf58c4ad9d7fbfbf82e479a8dcf90dba39a2e8.jpg)
152
+ Figure 5: We represent here the test prediction error for each probe, at the beginning and at the end of training. This measurement was obtained through early stopping based on a validation set of $1 0 ^ { 4 }$ elements. The probes are prevented from overfitting the training data. We can see that, at the beginning of training (on the left), the randomly-initialized layers were still providing useful transformations. The test prediction error goes from $8 \%$ to $2 \%$ simply using those random features. The biggest impact comes from the first ReLU. At the end of training (on the right), the test prediction error is improving at every layer (with the exception of a minor kink on fc1 preact).
153
+
154
+ ![](images/9c6aff93d37afc59de3370916abc4522757ced668563bc1f82e65d64b7f29028.jpg)
155
+ (b) After training for 10 epochs.
156
+
157
+ (a) After initialization, no training.
158
+
159
+ # 3.5 PROBES ON INCEPTION V3
160
+
161
+ We have performed an experiment using the Inception v3 model on the ImageNet dataset (Szegedy et al., 2015; Russakovsky et al., 2015). This is very similar to what is presented in section 3.4, but on a much larger scale. Due to the challenge presented by this experiment, we were not able to do everything that we had hoped. We have chosen to put those results in the appendix section A.2.
162
+
163
+ Certain layers of the Inception v3 model have approximately one million features. With 1000 classes, this means that some probes can take even more storage space than the whole model itself. In these cases, one of the creative solutions was to try to use only a random subset of the features. This is discussed in the appendix section A.1.
164
+
165
+ # 3.6 AUXILIARY LOSS BRANCHES AND SKIP CONNECTIONS
166
+
167
+ Here we investigate two ways to modify a deep model in order to facilitate training. Our goal is not to convince the reader that they should implement these suggestions in their own models. Rather, we want to demonstrate the usefulness of the linear classifier probes as a way to better understand what is happening in their deep networks.
168
+
169
+ In both cases we use a toy model with 128 fully-connected layers with 128 hidden units in each layer. We train on MNIST, and we use Glorot initialization along with leaky ReLUs.
170
+
171
+ We choose this model because we wanted a pathologically deep model without getting involved in architecture details. The model is pathological in the sense that smaller models can easily be designed to achieve better performance, but also in the sense that the model is so deep that it is very hard to train it with gradient descent methods. From our experiments, the maximal depth where things start to break down was depth 64, hence the choice here of using depth 128.
172
+
173
+ In the first scenario, we add one linear classifier at every 16 layers. These classifiers contribute to the loss minimization. They are not probes. This is very similar to what happens in the famous Inception model where “auxiliary heads” are used (Szegedy et al., 2015). This is illustrated in Figure 6a, and it works nicely. The untrainable model is now made trainable through a judicious use of auxiliary classifier losses. The results are shown in Figure 7.
174
+
175
+ In the second scenario, we look at adding a bridge (a skip connection) between layer 0 and layer 64. This means that the input features to layer 64 are obtained by concatenating the output of layer 63 with the features of layer 0. The idea here is that we might observe that the model would effectively train a submodel of depth 64, using the skip connection, and shift gears later to use the whole depth of 128 layers. This is illustrated in Figure 6b, and the results are shown in Figure 8. It does not work as expected, but the failure of this approach is visualized very nicely with probes and serves as a great example of their usefulness in diagnosing problems with models.
176
+
177
+ In both cases, there are two interesting observations that can be made with probes. We refer readers to https://youtu.be/x8j4ZHCR2FI for the full videos associated to Figures 5, 7 and 8.
178
+
179
+ Firstly, at the beginning of training, we can see how the raw data is directly useful to perform linear classification, and how this degrades as more layers are added. In the case of the skip connection in Figure 8, this has the effect of creating two bumps. This is because the layer 64 also has the input data as direct parent, so it can fit a probe to that signal.
180
+
181
+ Secondly, the prediction error goes down in all probes during training, but it does so in a way that starts with the parents before it spreads to their descendants. This is even more apparent on the full video (instead of the 3 frames provided here). This is a ripple effect, where the prediction error in Figure 6b is visually spreading like a wave from the left of the plot to the right.
182
+
183
+ (a) Model with 16 layers, one guide at every 4 layers.
184
+
185
+ ![](images/da998f98e898911a7968c3db79a7030cfb53c00e62f9c4f09039012ed33ef354.jpg)
186
+ (b) Model with 128 layers. A skip connection goes from the beginning straight to the middle of the graph.
187
+
188
+ ![](images/e3b1a2cbb938fc42bb9757e42574c2a8d194e5e426fd154e57becbfa030b4ec5.jpg)
189
+ Figure 6: Examples of deep neural network with one probe at every layer (drawn above the graph). We show here the addition of extra components to help training (under the graph, in orange).
190
+
191
+ # 4 DISCUSSION AND FUTURE WORK
192
+
193
+ We have presented more toy models or simple models instead of larger models such as Inception v3. In the appendix section A.2 we show an experiment on Inception v3, which proved to be more challenging than expected. Future work in this domain would involve performing better experiments on a larger scale than small MNIST convnets, but still within a manageable size so we can properly train all the probes. This would allow us to produce nice videos showing many training steps in sequence.
194
+
195
+ We have received many comments from people who thought about using multi-layer probes. This can be seen as a natural extension of the linear classifier probes. One downside to this idea is that we lose the convexity property of the probes. It might be worth pursuing in a particular setting, but as of now we feel that it is premature to start using multi-layer probes. This also leads to the convoluted idea of having a regular probe inside a multi-layer probe.
196
+
197
+ ![](images/1240396023f6cfd3a3400ed0cdd793e99041b168ebdcacf9a70ebaef6ab0bcbb.jpg)
198
+ Figure 7: A pathologically deep model with 128 layers gets an auxiliary loss added at every 16 layers (refer to simplified sketch in Figure 6a if needed). This loss is added to the usual model loss at the last layer. We fit a probe at every layer to see how well each layer would perform if its values were used as a linear classifier. We plot the train prediction error associated to all the probes, at three different steps. Before adding those auxiliary losses, the model could not successfully be trained through usual gradient descent methods, but with the addition of those intermediate losses, the model is “guided” to achieve certain partial objectives. This leads to a successful training of the complete model. The final prediction error is not impressive, but the model was not designed to achieve state-of-the-art performance.
199
+
200
+ ![](images/b0e8b1bc41f60a9d072968ed282f7b74e63f3ce9047d2f663342d1c3f6cacb98.jpg)
201
+ Figure 8: A pathologically deep model with 128 layers gets a skip connection from layer 0 to layer 64 (refer to sketch in Figure 6b if needed). We fit a probe at every layer to see how well each layer would perform if its values were used as a linear classifier. We plot the train prediction error associated to all the probes, at three different steps. We can see how the model completely ignores layers 1-63, even when we train it for a long time. The use of probes allows us to diagnose that problem through visual inspection.
202
+
203
+ # 5 CONCLUSION
204
+
205
+ In this paper we introduced the concept of the linear classifier probe as a conceptual tool to better understand the dynamics inside a neural network and the role played by the individual intermediate layers. We are now able to ask new questions and explore new areas. We have demonstrated how these probes can be used to identify certain problematic behaviors in models that might not be apparent when we traditionally have access to only the prediction loss and error.
206
+
207
+ We hope that the notions presented in this paper can contribute to the understanding of deep neural networks and guide the intuition of researchers that design them.
208
+
209
+ # ACKNOWLEDGMENTS
210
+
211
+ Yoshua Bengio is a senior CIFAR Fellow. The authors would like to acknowledge the support of the following agencies for research funding and computing support: NSERC, FQRNT, Calcul Quebec, ´ Compute Canada, the Canada Research Chairs and CIFAR.
212
+
213
+ # REFERENCES
214
+
215
+ Y Bengio, Paolo Frasconi, and P Simard. The problem of learning long-term dependencies in recurrent networks. In Neural Networks, 1993., IEEE International Conference on, pp. 1183– 1188. IEEE, 1993.
216
+
217
+ Sepp Hochreiter. Untersuchungen zu dynamischen neuronalen netzen. Diploma, Technische Universitat M¨ unchen ¨ , pp. 91, 1991.
218
+
219
+ Kevin Jarrett, Koray Kavukcuoglu, Yann Lecun, et al. What is the best multi-stage architecture for object recognition? In 2009 IEEE 12th International Conference on Computer Vision, pp. 2146–2153. IEEE, 2009.
220
+
221
+ David MacKay. Information Theory, Inference and Learning Algorithms. Cambridge University Press, 2003.
222
+
223
+ Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. doi: 10.1007/s11263-015-0816-y.
224
+
225
+ 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.
226
+
227
+ Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? In Advances in neural information processing systems, pp. 3320–3328, 2014.
228
+
229
+ # A APPENDIX
230
+
231
+ .1 PROPOSAL : TRAIN PROBES USING ONLY SUBSETS OF FEATURES
232
+
233
+ One of the challenges to train on the Inception v3 model is that many of the layers have more than 200, 000 features. This is even worse in the first convolution layers before the pooling operations, where we have around a million features. With 1000 output classes, a probe using 200, 000 features has a weight matrix taking almost 1GB of storage.
234
+
235
+ When using stochastic gradient descent, we require space to store the gradients, and if we use momentum this ends up taking three times the memory on the GPU. This is even worse for RMSProp. Normally this might be acceptable for a model of reasonable size, but this turns into almost 4GB overhead per probe.
236
+
237
+ We do not have to put a probe at every layer. We can also train probes independently. We can put probe parameters on the CPU instead of the GPU, if necessary. But when the act of training probes increases the complexity of the experiment beyond a certain point, the researcher might decide that they are not worth the trouble.
238
+
239
+ We propose the following solution $:$ for a given probe, use a fixed random subset of features instead of the whole set of features.
240
+
241
+ With certain assumptions about the independence of the features and their shared role in predicting the correct class, we can make certain claims about how few features are actually required to assess the prediction error of a probe. We thank Yaroslav Bulatov for suggesting this approach.
242
+
243
+ We ran an experiment in which we used data $X \sim \mathcal { N } ( 0 , I _ { D } )$ where $D = 1 0 0 , 0 0 0$ is the number of features. We used $K = 1 0 0 0$ classes and we generated the ground truth using a matrix $W$ of shape $( D , K )$ . To obtain the class of a given $x$ , we simply multiply $x ^ { T } W$ and take the argmax over the $K$ components of the result.
244
+
245
+ $$
246
+ \boldsymbol { x } \sim \mathcal { N } ( 0 , I _ { D } ) \qquad \quad \boldsymbol { y } = \underset { k = 1 \ldots K } { \arg \operatorname* { m a x } } \left( \boldsymbol { x } ^ { T } W [ : , k ] \right)
247
+ $$
248
+
249
+ We selected a matrix $W$ by drawing all its individual coefficients from a univariate gaussian.
250
+
251
+ Instead of using $D = 1 0 0 , 0 0 0$ features, we used instead only 1000 features picked at random. We trained a linear classifier on those features and, experimentally, it was relatively easy to achieve a $4 \%$ error rate on our first try. With all the features, we could achieve a $0 \%$ error rate, so $4 \%$ might not look great. We have to keep in mind that we have $K = 1 0 0 0$ classes so random guesses yield an error rate of $9 9 . 9 \%$ .
252
+
253
+ This can reduce the storage cost for a probe from 1GB down to 10MB. The former is hard to justify, and the latter is almost negligible.
254
+
255
+ # A.2 PROBES ON INCEPTION V3
256
+
257
+ We are interested in putting linear classifier probes in the popular Inception v3 model, training on the ImageNet dataset. We used the tensorflow implementation available online (tensorflow/models/inception/inception) and ran it on one GPU for 2 weeks.
258
+
259
+ ![](images/ac9d6cc65020b4249ed3608d9b9b777742591517ad3a2380677dd8d818c256fb.jpg)
260
+
261
+ As described in section A.1, one of the challenges is that the number of features can be prohibitively large, and we have to consider taking only a subset of the features. In this particular experiment, we have had the most success by taking 1000 random features for each probe. This gives certain layers an unfair advantage if they start with 4000 features and we kept 1000, whereas in other cases the probe insertion point has 426, 320 features and we keep 1000. There was no simple “fair” solution. That being said, 13 out of the 17 probes have more than 100, 000 features, and 11 of those probes have more than 200, 000 features, so things were relatively comparable.
262
+
263
+ We put linear classifier probes at certain strategic layers. We represent this using boxes in the following Figure 9. The prediction error of the probe given by the last layer of each box is illustrated by coloring the box. Red is bad (high prediction error) and green/blue is good (low prediction error).
264
+
265
+ We would have liked to have a video to show the evolution of this during training, but this experiment had to be scaled back due to the large computational demands. We show here the prediction errors at three moments of training. These correspond roughly to the beginning of training, then after a few days, and finally after a week.
266
+
267
+ # Inception v3
268
+
269
+ ![](images/be6f620a4776ffd6346efda0088099ba541bfd481b106cd797b8827d1c06e143.jpg)
270
+ Figure 9: Inserting a probe at multiple moments during training the Inception v3 model on the ImageNet dataset. We represent here the prediction error evaluated at a random subset of 1000 features. As expected, at first all the probes have a $100 \%$ prediction error, but as training progresses we see that the model is getting better. Note that there are 1000 classes, so a prediction error of $50 \%$ is much better than a random guess. The auxiliary head, shown under the model, was observed to have a prediction error that was slightly better than the main head. This is not necessarily a condition that will hold at the end of training, but merely an observation.
parse/train/ryF7rTqgl/ryF7rTqgl_content_list.json ADDED
@@ -0,0 +1,1454 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "UNDERSTANDING INTERMEDIATE LAYERS USING LINEAR CLASSIFIER PROBES ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 101,
9
+ 678,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Guillaume Alain & Yoshua Bengio \nDepartment of Computer Science and Operations Research \nUniversite de Montr´ eal´ \nMontreal, QC. H3C 3J7 \nguillaume.alain.umontreal@gmail.com ",
17
+ "bbox": [
18
+ 184,
19
+ 170,
20
+ 571,
21
+ 239
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 276,
32
+ 544,
33
+ 291
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Neural network models have a reputation for being black boxes. We propose a new method to better understand the roles and dynamics of the intermediate layers. This has direct consequences on the design of such models and it enables the expert to be able to justify certain heuristics (such as adding auxiliary losses in middle layers). Our method uses linear classifiers, referred to as “probes”, where a probe can only use the hidden units of a given intermediate layer as discriminating features. Moreover, these probes cannot affect the training phase of a model, and they are generally added after training. They allow the user to visualize the state of the model at multiple steps of training. We demonstrate how this can be used to develop a better intuition about models and to diagnose potential problems. ",
40
+ "bbox": [
41
+ 233,
42
+ 309,
43
+ 764,
44
+ 449
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 479,
55
+ 336,
56
+ 494
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "The recent history of deep neural networks features an impressive number of new methods and technological improvements to allow the training of deeper and more powerful networks. ",
63
+ "bbox": [
64
+ 176,
65
+ 512,
66
+ 823,
67
+ 540
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Despite this, models still have a reputation for being black boxes. Neural networks are criticized for their lack of interpretability, which is a tradeoff that we accept because of their amazing performance on many tasks. Efforts have been made to identify the role played by each layer, but it can be hard to find a meaning to individual layers. ",
74
+ "bbox": [
75
+ 174,
76
+ 547,
77
+ 825,
78
+ 603
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "There are good arguments to support the claim that the first layers of a convolution network for image recognition contain filters that are relatively “general”, in the sense that they would work great even if we switched to an entirely different dataset of images. The last layers are specific to the dataset being used, and have to be retrained when using a different dataset. In Yosinski et al. (2014) the authors try to pinpoint the layer at which this transition occurs, but they show that the exact transition is spread across multiple layers. ",
85
+ "bbox": [
86
+ 174,
87
+ 609,
88
+ 825,
89
+ 694
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "In this paper, we introduce the concept of linear classifier probe, referred to as a “probe” for short when the context is clear. We start from the concept of Shannon entropy, which is the classic way to describe the information contents of a random variable. We then seek to apply that concept to understand the roles of the intermediate layers of a neural network, to measure how much information is gained at every layer (answer : technically, none). We argue that it fails to apply, and so we propose an alternative framework to ask the same question again. This time around, we ask what would be the performance of an optimal linear classifier if it was trained on the inputs of a given layer from our model. We demonstrate how this powerful concept can be very useful to understand the dynamics involved in a deep neural network during training and after. ",
96
+ "bbox": [
97
+ 174,
98
+ 700,
99
+ 825,
100
+ 825
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "2 INFORMATION THEORY ",
107
+ "text_level": 1,
108
+ "bbox": [
109
+ 176,
110
+ 848,
111
+ 397,
112
+ 864
113
+ ],
114
+ "page_idx": 0
115
+ },
116
+ {
117
+ "type": "text",
118
+ "text": "It was a great discovery when Claude Shannon repurposed the notion of entropy to represent information contents in a formal way. It laid the foundations for the discipline of information theory. We would refer the reader to first chapters of MacKay (2003) for a good exposition on the matter. ",
119
+ "bbox": [
120
+ 176,
121
+ 882,
122
+ 823,
123
+ 922
124
+ ],
125
+ "page_idx": 0
126
+ },
127
+ {
128
+ "type": "text",
129
+ "text": "Naturally, we would like to ask some questions about the information contents of the many layers of convolutional neural networks. ",
130
+ "bbox": [
131
+ 169,
132
+ 103,
133
+ 823,
134
+ 132
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "• What happens when we add more layers? • Where does information flow in a neural network with multiple branches? • Does having multiple auxiliary losses help? (e.g. Inception model) ",
141
+ "bbox": [
142
+ 215,
143
+ 145,
144
+ 717,
145
+ 202
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "Intuitively, for a training sample $x _ { i }$ with its associated label $y _ { i }$ , a deep model is getting closer to the correct answer in the higher layers. It starts with the difficult job of classifying $x _ { i }$ , which becomes easier as the higher layers distill $x _ { i }$ into a representation that is easier to classify. One might be tempted to say that this means that the higher layers have more information about the ground truth, but this would be incorrect. ",
152
+ "bbox": [
153
+ 174,
154
+ 213,
155
+ 825,
156
+ 284
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "Here there is a mismatch between two different concepts of information. The notion of entropy fails to capture the essence of those questions. This is illustrated in a formal way by the Data Processing Inequality. It states that, for a set of three random variables satisfying the dependency ",
163
+ "bbox": [
164
+ 176,
165
+ 290,
166
+ 825,
167
+ 333
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "equation",
173
+ "img_path": "images/b0064659b88b5a2792be0ae29b5451a4d9752011e80d918b18b69f9c28d7484b.jpg",
174
+ "text": "$$\nX Y Z\n$$",
175
+ "text_format": "latex",
176
+ "bbox": [
177
+ 450,
178
+ 342,
179
+ 547,
180
+ 356
181
+ ],
182
+ "page_idx": 1
183
+ },
184
+ {
185
+ "type": "text",
186
+ "text": "then we have that ",
187
+ "bbox": [
188
+ 174,
189
+ 367,
190
+ 290,
191
+ 381
192
+ ],
193
+ "page_idx": 1
194
+ },
195
+ {
196
+ "type": "equation",
197
+ "img_path": "images/524af97b5da2306235f39a76d823058d3576e75e66909db6dd31fa583ba12f5e.jpg",
198
+ "text": "$$\nI ( X ; Z ) \\leq I ( X ; Y )\n$$",
199
+ "text_format": "latex",
200
+ "bbox": [
201
+ 429,
202
+ 382,
203
+ 568,
204
+ 400
205
+ ],
206
+ "page_idx": 1
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "where $I ( X , Y )$ is the mutual information. ",
211
+ "bbox": [
212
+ 176,
213
+ 405,
214
+ 447,
215
+ 421
216
+ ],
217
+ "page_idx": 1
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "Intuitively, this means that the deterministic transformations performed by the many layers of a deep neural network are not adding more information. In the best case, they preserve information and affect only the representation. But in almost all situations, they lose some information in the process. ",
222
+ "bbox": [
223
+ 174,
224
+ 426,
225
+ 825,
226
+ 483
227
+ ],
228
+ "page_idx": 1
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "If we distill this further, we can think of the serious mismatch between the two following ideas : ",
233
+ "bbox": [
234
+ 173,
235
+ 502,
236
+ 802,
237
+ 517
238
+ ],
239
+ "page_idx": 1
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "• Part of the genius of the notion of entropy is that is distills the essence of information to a quantity that does not depend on the particular representation. • A deep neural network is a series of simple deterministic transformations that affect the representation so that the final layer can be fed to a linear classifier. ",
244
+ "bbox": [
245
+ 215,
246
+ 531,
247
+ 825,
248
+ 594
249
+ ],
250
+ "page_idx": 1
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "The former ignores the representation of data, while the latter is an expert in finding good representations. A deaf painter is working on a visual masterpiece to offer to a blind musician who plays music for him. ",
255
+ "bbox": [
256
+ 176,
257
+ 609,
258
+ 823,
259
+ 651
260
+ ],
261
+ "page_idx": 1
262
+ },
263
+ {
264
+ "type": "text",
265
+ "text": "We need a conceptual tool to analyze neural networks in a way that corresponds better to our intuitive notion of information. The role of data representation is important, but we would also argue that we have to think about this issue as it relates to computational complexity. A linear classifier is basically the simplest form of classifier that is neither trivial nor degenerate. ",
266
+ "bbox": [
267
+ 174,
268
+ 657,
269
+ 825,
270
+ 714
271
+ ],
272
+ "page_idx": 1
273
+ },
274
+ {
275
+ "type": "text",
276
+ "text": "We define a new notion of information that depends on our ability to classify features of a given layer with an optimal linear classifier. Then we have a conceptual tool to ask new questions and to get potentially interesting answers. ",
277
+ "bbox": [
278
+ 174,
279
+ 720,
280
+ 825,
281
+ 763
282
+ ],
283
+ "page_idx": 1
284
+ },
285
+ {
286
+ "type": "text",
287
+ "text": "We end this section with a conceptual example in Figure 1. If $X$ contains an image of the savannah, and $Y \\in \\{ 0 , 1 \\}$ refers to whether it contains a lion or not, then none of the subsequent layers are truly more informative than $X$ itself. The raw bits from the picture file contain everything. ",
288
+ "bbox": [
289
+ 174,
290
+ 770,
291
+ 825,
292
+ 813
293
+ ],
294
+ "page_idx": 1
295
+ },
296
+ {
297
+ "type": "text",
298
+ "text": "3 LINEAR CLASSIFIER PROBES ",
299
+ "text_level": 1,
300
+ "bbox": [
301
+ 176,
302
+ 835,
303
+ 442,
304
+ 852
305
+ ],
306
+ "page_idx": 1
307
+ },
308
+ {
309
+ "type": "text",
310
+ "text": "In section 3.1 we present the main concept of this paper. We illustrate the concept in section 3.3. We then present a basic experiment in section 3.4. In section 3.6 we modify a very deep network in two different ways and we show how probes allow us to visualize the consequences (sometimes disastrous) of our design choices. ",
311
+ "bbox": [
312
+ 174,
313
+ 867,
314
+ 823,
315
+ 924
316
+ ],
317
+ "page_idx": 1
318
+ },
319
+ {
320
+ "type": "image",
321
+ "img_path": "images/78baeb4650f7068a4bb370f8b79ef6aff22f2ee2233ad5cfa0a96e0c27beee1b.jpg",
322
+ "image_caption": [],
323
+ "image_footnote": [],
324
+ "bbox": [
325
+ 173,
326
+ 107,
327
+ 465,
328
+ 234
329
+ ],
330
+ "page_idx": 2
331
+ },
332
+ {
333
+ "type": "text",
334
+ "text": "(a) hex dump of picture of a lion ",
335
+ "bbox": [
336
+ 225,
337
+ 239,
338
+ 418,
339
+ 252
340
+ ],
341
+ "page_idx": 2
342
+ },
343
+ {
344
+ "type": "image",
345
+ "img_path": "images/750bb3ce2c908bfaf317f9e7fb8b1ba500189ea38e6e0a815ee9683f5263efff.jpg",
346
+ "image_caption": [
347
+ "(b) same lion in human-readable format "
348
+ ],
349
+ "image_footnote": [],
350
+ "bbox": [
351
+ 531,
352
+ 102,
353
+ 821,
354
+ 241
355
+ ],
356
+ "page_idx": 2
357
+ },
358
+ {
359
+ "type": "text",
360
+ "text": "Figure 1: The hex dump represented on the left has more information contents than the image on the right. Only one of them can be processed by the human brain in time to save their lives. Computational convenience matters. Not just entropy. ",
361
+ "bbox": [
362
+ 173,
363
+ 271,
364
+ 825,
365
+ 314
366
+ ],
367
+ "page_idx": 2
368
+ },
369
+ {
370
+ "type": "text",
371
+ "text": "3.1 PROBES ",
372
+ "text_level": 1,
373
+ "bbox": [
374
+ 174,
375
+ 344,
376
+ 269,
377
+ 358
378
+ ],
379
+ "page_idx": 2
380
+ },
381
+ {
382
+ "type": "text",
383
+ "text": "As we discussed the previous section, there is indeed a good reason to use many deterministic layers, and it is because they perform useful transformations to the data with the goal of ultimately fitting a linear classifier at the very end. That is the purpose of the many layers. They are a tool to transform data into a form to be fed to a boring linear classifier. ",
384
+ "bbox": [
385
+ 174,
386
+ 372,
387
+ 825,
388
+ 429
389
+ ],
390
+ "page_idx": 2
391
+ },
392
+ {
393
+ "type": "text",
394
+ "text": "With this in mind, it is natural to ask if that transformation is sudden or progressive, and whether the intermediate layers already have a representation that is immediately useful to a linear classifier. We refer the reader to Figure 2 for a diagram of probes being inserted in the usual deep neural network. ",
395
+ "bbox": [
396
+ 174,
397
+ 435,
398
+ 825,
399
+ 478
400
+ ],
401
+ "page_idx": 2
402
+ },
403
+ {
404
+ "type": "image",
405
+ "img_path": "images/7fe427e62a973b961b2b7a92e9fc20ca3f76db5858d600f6655652c21603a5fe.jpg",
406
+ "image_caption": [
407
+ "Figure 2: Probes being added to every layer of a model. These additional probes are not supposed to change the training of the model, so we add a little diode symbol through the arrows to indicate that the gradients will not backpropagate through those connections. "
408
+ ],
409
+ "image_footnote": [],
410
+ "bbox": [
411
+ 299,
412
+ 491,
413
+ 825,
414
+ 602
415
+ ],
416
+ "page_idx": 2
417
+ },
418
+ {
419
+ "type": "text",
420
+ "text": "The conceptual framework that we propose is one where the intuitive notion of information is equivalent with immediate suitability for a linear classifier (instead of being related to entropy). ",
421
+ "bbox": [
422
+ 173,
423
+ 681,
424
+ 821,
425
+ 710
426
+ ],
427
+ "page_idx": 2
428
+ },
429
+ {
430
+ "type": "text",
431
+ "text": "Just to be absolutely clear about what we call a linear classifier, we mean a function ",
432
+ "bbox": [
433
+ 176,
434
+ 717,
435
+ 723,
436
+ 732
437
+ ],
438
+ "page_idx": 2
439
+ },
440
+ {
441
+ "type": "equation",
442
+ "img_path": "images/ef8b66a753e9a814a449c1f6a27683f8be9d97e032266edb82a35874b8108188.jpg",
443
+ "text": "$$\n\\begin{array} { r } { f \\colon H \\to [ 0 , 1 ] ^ { D } \\qquad } \\\\ { h \\mapsto \\operatorname { s o f t m a x } \\left( W h + b \\right) . } \\end{array}\n$$",
444
+ "text_format": "latex",
445
+ "bbox": [
446
+ 400,
447
+ 741,
448
+ 596,
449
+ 779
450
+ ],
451
+ "page_idx": 2
452
+ },
453
+ {
454
+ "type": "text",
455
+ "text": "where $h \\in H$ are the features of some hidden layer, $[ 0 , 1 ] ^ { D }$ is the space of one-hot encodings of the $D$ target classes, and $( W , b )$ are the probe weights and biases to be learned so as to minimize the usual cross-entropy loss. ",
456
+ "bbox": [
457
+ 174,
458
+ 790,
459
+ 825,
460
+ 833
461
+ ],
462
+ "page_idx": 2
463
+ },
464
+ {
465
+ "type": "text",
466
+ "text": "Over the course of training a model, the parameters of the model change. However, probes only make sense when we refer to a given training step. We can talk about the probes at iteration $n$ of training, when the model parameters are $\\theta _ { n }$ . These parameters are not affected by the probes. We prevent backpropagation through the model either by stopping the gradient flow (done with tf.stop gradient in tensorflow), or simply by specifying that the only variables to be updated are the probe parameters, while we keep $\\theta _ { n }$ frozen. ",
467
+ "bbox": [
468
+ 173,
469
+ 839,
470
+ 825,
471
+ 924
472
+ ],
473
+ "page_idx": 2
474
+ },
475
+ {
476
+ "type": "text",
477
+ "text": "3.1.1 TRAINING THE PROBES ",
478
+ "text_level": 1,
479
+ "bbox": [
480
+ 174,
481
+ 103,
482
+ 390,
483
+ 117
484
+ ],
485
+ "page_idx": 3
486
+ },
487
+ {
488
+ "type": "text",
489
+ "text": "For the purposes of this paper, we train the probes up to convergence with fixed model parameters, and we report the prediction error on the training set. ",
490
+ "bbox": [
491
+ 173,
492
+ 131,
493
+ 823,
494
+ 159
495
+ ],
496
+ "page_idx": 3
497
+ },
498
+ {
499
+ "type": "text",
500
+ "text": "It is absolutely possible to train the probes simulatenously while training the model itself. This is a good approach if we consider about how long it can take to train the model. However, this creates a potential problem if we optimize the loss of the model more quickly than the loss of the probes. This can present a skewed view of the actual situation that we would have if we trained the probes until convergence before updating the model parameters. If we accept this trade off, then we can train the probes at the same time as the model. ",
501
+ "bbox": [
502
+ 174,
503
+ 165,
504
+ 825,
505
+ 250
506
+ ],
507
+ "page_idx": 3
508
+ },
509
+ {
510
+ "type": "text",
511
+ "text": "In some situations, the probes might overfit the training set, so we may want to do early stopping on the validation set and report the performance for the probes on the test set. This is what we do in section 3.4 with the simple MNIST convnet. ",
512
+ "bbox": [
513
+ 176,
514
+ 257,
515
+ 825,
516
+ 299
517
+ ],
518
+ "page_idx": 3
519
+ },
520
+ {
521
+ "type": "text",
522
+ "text": "We are still unsure if one of those variations should be preferred in general, and right now they all seem acceptable so long as we interpret the probe measurements properly. ",
523
+ "bbox": [
524
+ 173,
525
+ 305,
526
+ 823,
527
+ 334
528
+ ],
529
+ "page_idx": 3
530
+ },
531
+ {
532
+ "type": "text",
533
+ "text": "Note that training those probes represents a convex optimization problem. In practice, this does mean guarantee that they are easy to train. However, it is reassuring because it means that probes taken at time $\\theta _ { n }$ can be used as initialization for probes at time $\\theta _ { n + 1 }$ . ",
534
+ "bbox": [
535
+ 176,
536
+ 340,
537
+ 821,
538
+ 383
539
+ ],
540
+ "page_idx": 3
541
+ },
542
+ {
543
+ "type": "text",
544
+ "text": "We use cross-entropy as probe loss because all models studied here used cross-entropy. Other alternative losses could be justified in other settings. ",
545
+ "bbox": [
546
+ 173,
547
+ 390,
548
+ 821,
549
+ 419
550
+ ],
551
+ "page_idx": 3
552
+ },
553
+ {
554
+ "type": "text",
555
+ "text": "3.2 PROBES ON BIFURCATING TOY MODEL ",
556
+ "text_level": 1,
557
+ "bbox": [
558
+ 176,
559
+ 443,
560
+ 480,
561
+ 457
562
+ ],
563
+ "page_idx": 3
564
+ },
565
+ {
566
+ "type": "text",
567
+ "text": "Here we show a hypothetical example in which a model contains a bifurcation with two paths that later recombine. We are interested in knowing whether those two branches are useful, or whether one is potentially redundant or useless. ",
568
+ "bbox": [
569
+ 174,
570
+ 470,
571
+ 825,
572
+ 513
573
+ ],
574
+ "page_idx": 3
575
+ },
576
+ {
577
+ "type": "image",
578
+ "img_path": "images/28d8e18ee4159097fbcf3411da69627a35992457a870f3a7cd002a25607618bb.jpg",
579
+ "image_caption": [],
580
+ "image_footnote": [],
581
+ "bbox": [
582
+ 297,
583
+ 523,
584
+ 692,
585
+ 616
586
+ ],
587
+ "page_idx": 3
588
+ },
589
+ {
590
+ "type": "text",
591
+ "text": "For example, the two different branches might contain convolutional layers with different dimensions. They may have a different number of sublayers, or one might represent a skip connection. We assume that the branches are combined through concatenation of their features, so that nothing is lost. ",
592
+ "bbox": [
593
+ 176,
594
+ 630,
595
+ 823,
596
+ 685
597
+ ],
598
+ "page_idx": 3
599
+ },
600
+ {
601
+ "type": "text",
602
+ "text": "For this hypothetical situation, we indicate the probe prediction errors on the graphical model. The upper path has a prediction error of 0.75, the lower path has 0.60, and their combination has 0.45. Small errors are preferred. Although the upper path has “less information” than the lower path, we can see here that it is not redundant information, because when we concatenate the features of the two branches we get a prediction error of $0 . 4 5 < 0 . 6 0$ . ",
603
+ "bbox": [
604
+ 174,
605
+ 693,
606
+ 825,
607
+ 762
608
+ ],
609
+ "page_idx": 3
610
+ },
611
+ {
612
+ "type": "text",
613
+ "text": "If the concatenated layer had a prediction error of 0.60 instead of 0.45, then we could declare that the above branch did nothing useful. It may have nonzero weights, but it’s still useless. ",
614
+ "bbox": [
615
+ 174,
616
+ 768,
617
+ 821,
618
+ 799
619
+ ],
620
+ "page_idx": 3
621
+ },
622
+ {
623
+ "type": "text",
624
+ "text": "Naturally, this kind of conclusion might be entirely wrong. It might be the case that the branch above contains very meaningful features, and they simply happen to be useless to a linear classifier applied right there. The idea of using linear classification probes to understand the roles of different branches is suggested as a heuristic instead of a hard rule. Moreover, if the probes are not optimized perfectly, the conclusions drawn can be misleading. ",
625
+ "bbox": [
626
+ 174,
627
+ 804,
628
+ 825,
629
+ 875
630
+ ],
631
+ "page_idx": 3
632
+ },
633
+ {
634
+ "type": "text",
635
+ "text": "Note that we are reporting here the prediction errors, and it might be the case that the loss is indeed lower when we concatenate the two branches, but for some reason it could fail to apply to the prediction error. ",
636
+ "bbox": [
637
+ 176,
638
+ 882,
639
+ 823,
640
+ 924
641
+ ],
642
+ "page_idx": 3
643
+ },
644
+ {
645
+ "type": "image",
646
+ "img_path": "images/e700959f190618878009af74e4198fba1113ac0a2aea7427043b21425727966d.jpg",
647
+ "image_caption": [
648
+ "Figure 3: Toy experiment described in section 3.3, with linearly separable data (two labels), an untrained MLP with 32 layers, and probes at every layer. We report the prediction error for every probe, where 0.50 would be the performence of a coin flip and 0.00 would be ideal. Note that the layer 0 here corresponds to the raw data, and the probes are indeed able to classify it perfectly. As expected, performance degrades when applying random transformations. If many more layers were present, it would be hard to imagine how the final layer (with the model loss) can get any useful signal to backpropagate. "
649
+ ],
650
+ "image_footnote": [],
651
+ "bbox": [
652
+ 181,
653
+ 118,
654
+ 462,
655
+ 286
656
+ ],
657
+ "page_idx": 4
658
+ },
659
+ {
660
+ "type": "text",
661
+ "text": "3.3 PROBES ON UNTRAINED MODEL ",
662
+ "text_level": 1,
663
+ "bbox": [
664
+ 176,
665
+ 327,
666
+ 434,
667
+ 339
668
+ ],
669
+ "page_idx": 4
670
+ },
671
+ {
672
+ "type": "text",
673
+ "text": "We start with a toy example to illustrate what kind of plots we expect from probes. We use a 32- layer MLP with 128 hidden units. All the layers are fully-connected and we use LeakyReLU(0.5) as activation function. ",
674
+ "bbox": [
675
+ 174,
676
+ 356,
677
+ 825,
678
+ 397
679
+ ],
680
+ "page_idx": 4
681
+ },
682
+ {
683
+ "type": "text",
684
+ "text": "We will run the same experiment 100 times, with a different toy dataset each time. The goal is to use a data distribution $( X , Y )$ where $X \\in \\mathbb { R } ^ { 1 2 8 }$ is drawn $\\mathcal { N } ( 0 , I )$ and where $Y \\in \\{ - 1 , 1 \\}$ in linearly separable (i.e. super easy to classify with a one-layer neural network). To do this, we just pick a $w \\in \\mathbb { R } ^ { 1 2 8 }$ for each experiment, and let the label $y _ { n }$ be the sign of $x _ { n } ^ { T } w$ . ",
685
+ "bbox": [
686
+ 174,
687
+ 405,
688
+ 825,
689
+ 462
690
+ ],
691
+ "page_idx": 4
692
+ },
693
+ {
694
+ "type": "text",
695
+ "text": "We initialize this 32-layer MLP using glorot normal initialization, we do not perform any training on the model, and we add one probe at every layer. We optimize the probes with RMSProp and a sufficiently small learning rate. ",
696
+ "bbox": [
697
+ 176,
698
+ 468,
699
+ 821,
700
+ 510
701
+ ],
702
+ "page_idx": 4
703
+ },
704
+ {
705
+ "type": "text",
706
+ "text": "In Figure 3, we show the prediction error rate for every probe, averaged over the 100 experiments. The graph includes a probe applied directly on the inputs $X$ , where we naturally have an error rate that is essentially zero (to be expected by the way we constructed our data), and which serves as a kind of sanity check. Given that we have only two possible labels, we also show a dotted horizontal line at 0.50, which is essentially the prediction error that we would get by flipping a coin. We can see that the prediction error rate climbs up towards 0.50 as we go deeper in the MLP (with untrained parameters). ",
707
+ "bbox": [
708
+ 174,
709
+ 517,
710
+ 825,
711
+ 614
712
+ ],
713
+ "page_idx": 4
714
+ },
715
+ {
716
+ "type": "text",
717
+ "text": "This illustrates the idea that the input signal is getting mangled by the successive layers, so much that it becomes rather useless by the time we reach the final layer. We checked the mean activation norm of the hidden units at layer 32 to be sure that numerical underflow was not the cause for the degradation. Note that this situation could be avoided by using orthogonal weights. ",
718
+ "bbox": [
719
+ 174,
720
+ 621,
721
+ 825,
722
+ 678
723
+ ],
724
+ "page_idx": 4
725
+ },
726
+ {
727
+ "type": "text",
728
+ "text": "One of the popular explanation for training difficulties in very deep models is that of the exploding/vanishing (Hochreiter, 1991; Bengio et al., 1993). Here we would like to offer another complementary explanation, based on the observations from Figure 3. That is, at the beginning of training, the usefulness of layers decays as we go deeper, reaching the point where the deeper layers are utterly useless. The values contained in the last layer are then used in the final softmax classifier, and the loss backpropagates the values of the derivatives. Since that derivative is based on garbage activations, the backpropagated quantities are also garbage, which means that the weights are all going to be updated based on garbage. The weights stay bad, and we fail to train the model. The authors like to refer to that phenomenon as garbage forwardprop, garbage backprop, in reference to the popular concept of garbage in, garbage out in computer science. ",
729
+ "bbox": [
730
+ 174,
731
+ 684,
732
+ 825,
733
+ 824
734
+ ],
735
+ "page_idx": 4
736
+ },
737
+ {
738
+ "type": "text",
739
+ "text": "3.4 PROBES ON MNIST CONVNET ",
740
+ "text_level": 1,
741
+ "bbox": [
742
+ 176,
743
+ 852,
744
+ 424,
745
+ 866
746
+ ],
747
+ "page_idx": 4
748
+ },
749
+ {
750
+ "type": "text",
751
+ "text": "In this section we run the MNIST convolutional model provided by the tensorflow github repo (tensorflow/models/image/mnist/convolutional.py) We selected that model for reproducibility and to demonstrate how to easily peek into popular models by using probes. ",
752
+ "bbox": [
753
+ 174,
754
+ 882,
755
+ 823,
756
+ 924
757
+ ],
758
+ "page_idx": 4
759
+ },
760
+ {
761
+ "type": "text",
762
+ "text": "We start by sketching the model in Figure 4. We report the results at the beginning and the end of training on Figure 5. One of the interesting dynamics to be observed there is how useful the first layers are, despite the fact that the model is completely untrained. Random projections can be useful to classify data, and this has been studied by others (Jarrett et al., 2009). ",
763
+ "bbox": [
764
+ 174,
765
+ 103,
766
+ 823,
767
+ 160
768
+ ],
769
+ "page_idx": 5
770
+ },
771
+ {
772
+ "type": "image",
773
+ "img_path": "images/f438d4f7a1cc7b5b3e6e74d2d823d02bd54755e30d757f7ce61cce6044b374ba.jpg",
774
+ "image_caption": [
775
+ "Figure 4: This graphical model represents the neural network that we are going to use for MNIST. The model could be written in a more compact form, but we represent it this way to expose all the locations where we are going to insert probes. The model itself is simply two convolutional layers followed by two fully-connected layer (one being the final classifier). However, we insert probes on each side of each convolution, activation function, and pooling function. This is a bit overzealous, but the small size of the model makes this relatively easy to do. "
776
+ ],
777
+ "image_footnote": [],
778
+ "bbox": [
779
+ 236,
780
+ 170,
781
+ 761,
782
+ 243
783
+ ],
784
+ "page_idx": 5
785
+ },
786
+ {
787
+ "type": "image",
788
+ "img_path": "images/bc7dcf2a16cd443533b530cf7acf58c4ad9d7fbfbf82e479a8dcf90dba39a2e8.jpg",
789
+ "image_caption": [
790
+ "Figure 5: We represent here the test prediction error for each probe, at the beginning and at the end of training. This measurement was obtained through early stopping based on a validation set of $1 0 ^ { 4 }$ elements. The probes are prevented from overfitting the training data. We can see that, at the beginning of training (on the left), the randomly-initialized layers were still providing useful transformations. The test prediction error goes from $8 \\%$ to $2 \\%$ simply using those random features. The biggest impact comes from the first ReLU. At the end of training (on the right), the test prediction error is improving at every layer (with the exception of a minor kink on fc1 preact). "
791
+ ],
792
+ "image_footnote": [],
793
+ "bbox": [
794
+ 179,
795
+ 361,
796
+ 464,
797
+ 521
798
+ ],
799
+ "page_idx": 5
800
+ },
801
+ {
802
+ "type": "image",
803
+ "img_path": "images/9c6aff93d37afc59de3370916abc4522757ced668563bc1f82e65d64b7f29028.jpg",
804
+ "image_caption": [
805
+ "(b) After training for 10 epochs. "
806
+ ],
807
+ "image_footnote": [],
808
+ "bbox": [
809
+ 534,
810
+ 362,
811
+ 818,
812
+ 521
813
+ ],
814
+ "page_idx": 5
815
+ },
816
+ {
817
+ "type": "text",
818
+ "text": "(a) After initialization, no training. ",
819
+ "bbox": [
820
+ 218,
821
+ 534,
822
+ 423,
823
+ 546
824
+ ],
825
+ "page_idx": 5
826
+ },
827
+ {
828
+ "type": "text",
829
+ "text": "3.5 PROBES ON INCEPTION V3 ",
830
+ "text_level": 1,
831
+ "bbox": [
832
+ 176,
833
+ 680,
834
+ 401,
835
+ 694
836
+ ],
837
+ "page_idx": 5
838
+ },
839
+ {
840
+ "type": "text",
841
+ "text": "We have performed an experiment using the Inception v3 model on the ImageNet dataset (Szegedy et al., 2015; Russakovsky et al., 2015). This is very similar to what is presented in section 3.4, but on a much larger scale. Due to the challenge presented by this experiment, we were not able to do everything that we had hoped. We have chosen to put those results in the appendix section A.2. ",
842
+ "bbox": [
843
+ 174,
844
+ 707,
845
+ 825,
846
+ 762
847
+ ],
848
+ "page_idx": 5
849
+ },
850
+ {
851
+ "type": "text",
852
+ "text": "Certain layers of the Inception v3 model have approximately one million features. With 1000 classes, this means that some probes can take even more storage space than the whole model itself. In these cases, one of the creative solutions was to try to use only a random subset of the features. This is discussed in the appendix section A.1. ",
853
+ "bbox": [
854
+ 174,
855
+ 768,
856
+ 825,
857
+ 825
858
+ ],
859
+ "page_idx": 5
860
+ },
861
+ {
862
+ "type": "text",
863
+ "text": "3.6 AUXILIARY LOSS BRANCHES AND SKIP CONNECTIONS ",
864
+ "text_level": 1,
865
+ "bbox": [
866
+ 176,
867
+ 843,
868
+ 588,
869
+ 856
870
+ ],
871
+ "page_idx": 5
872
+ },
873
+ {
874
+ "type": "text",
875
+ "text": "Here we investigate two ways to modify a deep model in order to facilitate training. Our goal is not to convince the reader that they should implement these suggestions in their own models. Rather, we want to demonstrate the usefulness of the linear classifier probes as a way to better understand what is happening in their deep networks. ",
876
+ "bbox": [
877
+ 174,
878
+ 867,
879
+ 823,
880
+ 924
881
+ ],
882
+ "page_idx": 5
883
+ },
884
+ {
885
+ "type": "text",
886
+ "text": "In both cases we use a toy model with 128 fully-connected layers with 128 hidden units in each layer. We train on MNIST, and we use Glorot initialization along with leaky ReLUs. ",
887
+ "bbox": [
888
+ 171,
889
+ 103,
890
+ 823,
891
+ 132
892
+ ],
893
+ "page_idx": 6
894
+ },
895
+ {
896
+ "type": "text",
897
+ "text": "We choose this model because we wanted a pathologically deep model without getting involved in architecture details. The model is pathological in the sense that smaller models can easily be designed to achieve better performance, but also in the sense that the model is so deep that it is very hard to train it with gradient descent methods. From our experiments, the maximal depth where things start to break down was depth 64, hence the choice here of using depth 128. ",
898
+ "bbox": [
899
+ 174,
900
+ 138,
901
+ 823,
902
+ 208
903
+ ],
904
+ "page_idx": 6
905
+ },
906
+ {
907
+ "type": "text",
908
+ "text": "In the first scenario, we add one linear classifier at every 16 layers. These classifiers contribute to the loss minimization. They are not probes. This is very similar to what happens in the famous Inception model where “auxiliary heads” are used (Szegedy et al., 2015). This is illustrated in Figure 6a, and it works nicely. The untrainable model is now made trainable through a judicious use of auxiliary classifier losses. The results are shown in Figure 7. ",
909
+ "bbox": [
910
+ 174,
911
+ 228,
912
+ 825,
913
+ 297
914
+ ],
915
+ "page_idx": 6
916
+ },
917
+ {
918
+ "type": "text",
919
+ "text": "In the second scenario, we look at adding a bridge (a skip connection) between layer 0 and layer 64. This means that the input features to layer 64 are obtained by concatenating the output of layer 63 with the features of layer 0. The idea here is that we might observe that the model would effectively train a submodel of depth 64, using the skip connection, and shift gears later to use the whole depth of 128 layers. This is illustrated in Figure 6b, and the results are shown in Figure 8. It does not work as expected, but the failure of this approach is visualized very nicely with probes and serves as a great example of their usefulness in diagnosing problems with models. ",
920
+ "bbox": [
921
+ 174,
922
+ 305,
923
+ 825,
924
+ 402
925
+ ],
926
+ "page_idx": 6
927
+ },
928
+ {
929
+ "type": "text",
930
+ "text": "In both cases, there are two interesting observations that can be made with probes. We refer readers to https://youtu.be/x8j4ZHCR2FI for the full videos associated to Figures 5, 7 and 8. ",
931
+ "bbox": [
932
+ 174,
933
+ 421,
934
+ 823,
935
+ 450
936
+ ],
937
+ "page_idx": 6
938
+ },
939
+ {
940
+ "type": "text",
941
+ "text": "Firstly, at the beginning of training, we can see how the raw data is directly useful to perform linear classification, and how this degrades as more layers are added. In the case of the skip connection in Figure 8, this has the effect of creating two bumps. This is because the layer 64 also has the input data as direct parent, so it can fit a probe to that signal. ",
942
+ "bbox": [
943
+ 174,
944
+ 457,
945
+ 825,
946
+ 513
947
+ ],
948
+ "page_idx": 6
949
+ },
950
+ {
951
+ "type": "text",
952
+ "text": "Secondly, the prediction error goes down in all probes during training, but it does so in a way that starts with the parents before it spreads to their descendants. This is even more apparent on the full video (instead of the 3 frames provided here). This is a ripple effect, where the prediction error in Figure 6b is visually spreading like a wave from the left of the plot to the right. ",
953
+ "bbox": [
954
+ 173,
955
+ 520,
956
+ 825,
957
+ 577
958
+ ],
959
+ "page_idx": 6
960
+ },
961
+ {
962
+ "type": "text",
963
+ "text": "(a) Model with 16 layers, one guide at every 4 layers. ",
964
+ "bbox": [
965
+ 205,
966
+ 656,
967
+ 517,
968
+ 670
969
+ ],
970
+ "page_idx": 6
971
+ },
972
+ {
973
+ "type": "image",
974
+ "img_path": "images/da998f98e898911a7968c3db79a7030cfb53c00e62f9c4f09039012ed33ef354.jpg",
975
+ "image_caption": [
976
+ "(b) Model with 128 layers. A skip connection goes from the beginning straight to the middle of the graph. "
977
+ ],
978
+ "image_footnote": [],
979
+ "bbox": [
980
+ 173,
981
+ 589,
982
+ 553,
983
+ 652
984
+ ],
985
+ "page_idx": 6
986
+ },
987
+ {
988
+ "type": "image",
989
+ "img_path": "images/e3b1a2cbb938fc42bb9757e42574c2a8d194e5e426fd154e57becbfa030b4ec5.jpg",
990
+ "image_caption": [
991
+ "Figure 6: Examples of deep neural network with one probe at every layer (drawn above the graph). We show here the addition of extra components to help training (under the graph, in orange). "
992
+ ],
993
+ "image_footnote": [],
994
+ "bbox": [
995
+ 560,
996
+ 588,
997
+ 825,
998
+ 643
999
+ ],
1000
+ "page_idx": 6
1001
+ },
1002
+ {
1003
+ "type": "text",
1004
+ "text": "4 DISCUSSION AND FUTURE WORK ",
1005
+ "text_level": 1,
1006
+ "bbox": [
1007
+ 176,
1008
+ 760,
1009
+ 478,
1010
+ 775
1011
+ ],
1012
+ "page_idx": 6
1013
+ },
1014
+ {
1015
+ "type": "text",
1016
+ "text": "We have presented more toy models or simple models instead of larger models such as Inception v3. In the appendix section A.2 we show an experiment on Inception v3, which proved to be more challenging than expected. Future work in this domain would involve performing better experiments on a larger scale than small MNIST convnets, but still within a manageable size so we can properly train all the probes. This would allow us to produce nice videos showing many training steps in sequence. ",
1017
+ "bbox": [
1018
+ 174,
1019
+ 790,
1020
+ 825,
1021
+ 875
1022
+ ],
1023
+ "page_idx": 6
1024
+ },
1025
+ {
1026
+ "type": "text",
1027
+ "text": "We have received many comments from people who thought about using multi-layer probes. This can be seen as a natural extension of the linear classifier probes. One downside to this idea is that we lose the convexity property of the probes. It might be worth pursuing in a particular setting, but as of now we feel that it is premature to start using multi-layer probes. This also leads to the convoluted idea of having a regular probe inside a multi-layer probe. ",
1028
+ "bbox": [
1029
+ 176,
1030
+ 882,
1031
+ 823,
1032
+ 924
1033
+ ],
1034
+ "page_idx": 6
1035
+ },
1036
+ {
1037
+ "type": "image",
1038
+ "img_path": "images/1240396023f6cfd3a3400ed0cdd793e99041b168ebdcacf9a70ebaef6ab0bcbb.jpg",
1039
+ "image_caption": [
1040
+ "Figure 7: A pathologically deep model with 128 layers gets an auxiliary loss added at every 16 layers (refer to simplified sketch in Figure 6a if needed). This loss is added to the usual model loss at the last layer. We fit a probe at every layer to see how well each layer would perform if its values were used as a linear classifier. We plot the train prediction error associated to all the probes, at three different steps. Before adding those auxiliary losses, the model could not successfully be trained through usual gradient descent methods, but with the addition of those intermediate losses, the model is “guided” to achieve certain partial objectives. This leads to a successful training of the complete model. The final prediction error is not impressive, but the model was not designed to achieve state-of-the-art performance. "
1041
+ ],
1042
+ "image_footnote": [],
1043
+ "bbox": [
1044
+ 192,
1045
+ 101,
1046
+ 818,
1047
+ 231
1048
+ ],
1049
+ "page_idx": 7
1050
+ },
1051
+ {
1052
+ "type": "image",
1053
+ "img_path": "images/b0e8b1bc41f60a9d072968ed282f7b74e63f3ce9047d2f663342d1c3f6cacb98.jpg",
1054
+ "image_caption": [
1055
+ "Figure 8: A pathologically deep model with 128 layers gets a skip connection from layer 0 to layer 64 (refer to sketch in Figure 6b if needed). We fit a probe at every layer to see how well each layer would perform if its values were used as a linear classifier. We plot the train prediction error associated to all the probes, at three different steps. We can see how the model completely ignores layers 1-63, even when we train it for a long time. The use of probes allows us to diagnose that problem through visual inspection. "
1056
+ ],
1057
+ "image_footnote": [],
1058
+ "bbox": [
1059
+ 192,
1060
+ 386,
1061
+ 818,
1062
+ 516
1063
+ ],
1064
+ "page_idx": 7
1065
+ },
1066
+ {
1067
+ "type": "text",
1068
+ "text": "",
1069
+ "bbox": [
1070
+ 173,
1071
+ 642,
1072
+ 823,
1073
+ 671
1074
+ ],
1075
+ "page_idx": 7
1076
+ },
1077
+ {
1078
+ "type": "text",
1079
+ "text": "5 CONCLUSION ",
1080
+ "text_level": 1,
1081
+ "bbox": [
1082
+ 176,
1083
+ 695,
1084
+ 318,
1085
+ 712
1086
+ ],
1087
+ "page_idx": 7
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "In this paper we introduced the concept of the linear classifier probe as a conceptual tool to better understand the dynamics inside a neural network and the role played by the individual intermediate layers. We are now able to ask new questions and explore new areas. We have demonstrated how these probes can be used to identify certain problematic behaviors in models that might not be apparent when we traditionally have access to only the prediction loss and error. ",
1092
+ "bbox": [
1093
+ 174,
1094
+ 729,
1095
+ 825,
1096
+ 800
1097
+ ],
1098
+ "page_idx": 7
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "We hope that the notions presented in this paper can contribute to the understanding of deep neural networks and guide the intuition of researchers that design them. ",
1103
+ "bbox": [
1104
+ 176,
1105
+ 806,
1106
+ 821,
1107
+ 835
1108
+ ],
1109
+ "page_idx": 7
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "ACKNOWLEDGMENTS ",
1114
+ "text_level": 1,
1115
+ "bbox": [
1116
+ 176,
1117
+ 856,
1118
+ 326,
1119
+ 869
1120
+ ],
1121
+ "page_idx": 7
1122
+ },
1123
+ {
1124
+ "type": "text",
1125
+ "text": "Yoshua Bengio is a senior CIFAR Fellow. The authors would like to acknowledge the support of the following agencies for research funding and computing support: NSERC, FQRNT, Calcul Quebec, ´ Compute Canada, the Canada Research Chairs and CIFAR. ",
1126
+ "bbox": [
1127
+ 176,
1128
+ 882,
1129
+ 823,
1130
+ 922
1131
+ ],
1132
+ "page_idx": 7
1133
+ },
1134
+ {
1135
+ "type": "text",
1136
+ "text": "REFERENCES ",
1137
+ "text_level": 1,
1138
+ "bbox": [
1139
+ 176,
1140
+ 102,
1141
+ 287,
1142
+ 117
1143
+ ],
1144
+ "page_idx": 8
1145
+ },
1146
+ {
1147
+ "type": "text",
1148
+ "text": "Y Bengio, Paolo Frasconi, and P Simard. The problem of learning long-term dependencies in recurrent networks. In Neural Networks, 1993., IEEE International Conference on, pp. 1183– 1188. IEEE, 1993. ",
1149
+ "bbox": [
1150
+ 176,
1151
+ 126,
1152
+ 823,
1153
+ 167
1154
+ ],
1155
+ "page_idx": 8
1156
+ },
1157
+ {
1158
+ "type": "text",
1159
+ "text": "Sepp Hochreiter. Untersuchungen zu dynamischen neuronalen netzen. Diploma, Technische Universitat M¨ unchen ¨ , pp. 91, 1991. ",
1160
+ "bbox": [
1161
+ 173,
1162
+ 176,
1163
+ 821,
1164
+ 205
1165
+ ],
1166
+ "page_idx": 8
1167
+ },
1168
+ {
1169
+ "type": "text",
1170
+ "text": "Kevin Jarrett, Koray Kavukcuoglu, Yann Lecun, et al. What is the best multi-stage architecture for object recognition? In 2009 IEEE 12th International Conference on Computer Vision, pp. 2146–2153. IEEE, 2009. ",
1171
+ "bbox": [
1172
+ 174,
1173
+ 213,
1174
+ 823,
1175
+ 256
1176
+ ],
1177
+ "page_idx": 8
1178
+ },
1179
+ {
1180
+ "type": "text",
1181
+ "text": "David MacKay. Information Theory, Inference and Learning Algorithms. Cambridge University Press, 2003. ",
1182
+ "bbox": [
1183
+ 171,
1184
+ 265,
1185
+ 823,
1186
+ 295
1187
+ ],
1188
+ "page_idx": 8
1189
+ },
1190
+ {
1191
+ "type": "text",
1192
+ "text": "Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. doi: 10.1007/s11263-015-0816-y. ",
1193
+ "bbox": [
1194
+ 178,
1195
+ 303,
1196
+ 821,
1197
+ 358
1198
+ ],
1199
+ "page_idx": 8
1200
+ },
1201
+ {
1202
+ "type": "text",
1203
+ "text": "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. ",
1204
+ "bbox": [
1205
+ 176,
1206
+ 367,
1207
+ 821,
1208
+ 410
1209
+ ],
1210
+ "page_idx": 8
1211
+ },
1212
+ {
1213
+ "type": "text",
1214
+ "text": "Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? In Advances in neural information processing systems, pp. 3320–3328, 2014. ",
1215
+ "bbox": [
1216
+ 171,
1217
+ 417,
1218
+ 823,
1219
+ 446
1220
+ ],
1221
+ "page_idx": 8
1222
+ },
1223
+ {
1224
+ "type": "text",
1225
+ "text": "A APPENDIX ",
1226
+ "text_level": 1,
1227
+ "bbox": [
1228
+ 176,
1229
+ 473,
1230
+ 297,
1231
+ 488
1232
+ ],
1233
+ "page_idx": 8
1234
+ },
1235
+ {
1236
+ "type": "text",
1237
+ "text": ".1 PROPOSAL : TRAIN PROBES USING ONLY SUBSETS OF FEATURES ",
1238
+ "bbox": [
1239
+ 184,
1240
+ 503,
1241
+ 658,
1242
+ 518
1243
+ ],
1244
+ "page_idx": 8
1245
+ },
1246
+ {
1247
+ "type": "text",
1248
+ "text": "One of the challenges to train on the Inception v3 model is that many of the layers have more than 200, 000 features. This is even worse in the first convolution layers before the pooling operations, where we have around a million features. With 1000 output classes, a probe using 200, 000 features has a weight matrix taking almost 1GB of storage. ",
1249
+ "bbox": [
1250
+ 174,
1251
+ 530,
1252
+ 825,
1253
+ 585
1254
+ ],
1255
+ "page_idx": 8
1256
+ },
1257
+ {
1258
+ "type": "text",
1259
+ "text": "When using stochastic gradient descent, we require space to store the gradients, and if we use momentum this ends up taking three times the memory on the GPU. This is even worse for RMSProp. Normally this might be acceptable for a model of reasonable size, but this turns into almost 4GB overhead per probe. ",
1260
+ "bbox": [
1261
+ 174,
1262
+ 593,
1263
+ 825,
1264
+ 648
1265
+ ],
1266
+ "page_idx": 8
1267
+ },
1268
+ {
1269
+ "type": "text",
1270
+ "text": "We do not have to put a probe at every layer. We can also train probes independently. We can put probe parameters on the CPU instead of the GPU, if necessary. But when the act of training probes increases the complexity of the experiment beyond a certain point, the researcher might decide that they are not worth the trouble. ",
1271
+ "bbox": [
1272
+ 174,
1273
+ 655,
1274
+ 825,
1275
+ 712
1276
+ ],
1277
+ "page_idx": 8
1278
+ },
1279
+ {
1280
+ "type": "text",
1281
+ "text": "We propose the following solution $:$ for a given probe, use a fixed random subset of features instead of the whole set of features. ",
1282
+ "bbox": [
1283
+ 173,
1284
+ 718,
1285
+ 823,
1286
+ 747
1287
+ ],
1288
+ "page_idx": 8
1289
+ },
1290
+ {
1291
+ "type": "text",
1292
+ "text": "With certain assumptions about the independence of the features and their shared role in predicting the correct class, we can make certain claims about how few features are actually required to assess the prediction error of a probe. We thank Yaroslav Bulatov for suggesting this approach. ",
1293
+ "bbox": [
1294
+ 174,
1295
+ 753,
1296
+ 823,
1297
+ 796
1298
+ ],
1299
+ "page_idx": 8
1300
+ },
1301
+ {
1302
+ "type": "text",
1303
+ "text": "We ran an experiment in which we used data $X \\sim \\mathcal { N } ( 0 , I _ { D } )$ where $D = 1 0 0 , 0 0 0$ is the number of features. We used $K = 1 0 0 0$ classes and we generated the ground truth using a matrix $W$ of shape $( D , K )$ . To obtain the class of a given $x$ , we simply multiply $x ^ { T } W$ and take the argmax over the $K$ components of the result. ",
1304
+ "bbox": [
1305
+ 173,
1306
+ 814,
1307
+ 825,
1308
+ 871
1309
+ ],
1310
+ "page_idx": 8
1311
+ },
1312
+ {
1313
+ "type": "equation",
1314
+ "img_path": "images/96dbdf9327d31c1e081cc08ba9733b737c55bdf7ee48c46434ff277eb880d327.jpg",
1315
+ "text": "$$\n\\boldsymbol { x } \\sim \\mathcal { N } ( 0 , I _ { D } ) \\qquad \\quad \\boldsymbol { y } = \\underset { k = 1 \\ldots K } { \\arg \\operatorname* { m a x } } \\left( \\boldsymbol { x } ^ { T } W [ : , k ] \\right)\n$$",
1316
+ "text_format": "latex",
1317
+ "bbox": [
1318
+ 341,
1319
+ 877,
1320
+ 655,
1321
+ 904
1322
+ ],
1323
+ "page_idx": 8
1324
+ },
1325
+ {
1326
+ "type": "text",
1327
+ "text": "We selected a matrix $W$ by drawing all its individual coefficients from a univariate gaussian. ",
1328
+ "bbox": [
1329
+ 173,
1330
+ 909,
1331
+ 776,
1332
+ 924
1333
+ ],
1334
+ "page_idx": 8
1335
+ },
1336
+ {
1337
+ "type": "text",
1338
+ "text": "Instead of using $D = 1 0 0 , 0 0 0$ features, we used instead only 1000 features picked at random. We trained a linear classifier on those features and, experimentally, it was relatively easy to achieve a $4 \\%$ error rate on our first try. With all the features, we could achieve a $0 \\%$ error rate, so $4 \\%$ might not look great. We have to keep in mind that we have $K = 1 0 0 0$ classes so random guesses yield an error rate of $9 9 . 9 \\%$ . ",
1339
+ "bbox": [
1340
+ 174,
1341
+ 103,
1342
+ 825,
1343
+ 172
1344
+ ],
1345
+ "page_idx": 9
1346
+ },
1347
+ {
1348
+ "type": "text",
1349
+ "text": "This can reduce the storage cost for a probe from 1GB down to 10MB. The former is hard to justify, and the latter is almost negligible. ",
1350
+ "bbox": [
1351
+ 173,
1352
+ 180,
1353
+ 823,
1354
+ 208
1355
+ ],
1356
+ "page_idx": 9
1357
+ },
1358
+ {
1359
+ "type": "text",
1360
+ "text": "A.2 PROBES ON INCEPTION V3 ",
1361
+ "text_level": 1,
1362
+ "bbox": [
1363
+ 176,
1364
+ 226,
1365
+ 405,
1366
+ 239
1367
+ ],
1368
+ "page_idx": 9
1369
+ },
1370
+ {
1371
+ "type": "text",
1372
+ "text": "We are interested in putting linear classifier probes in the popular Inception v3 model, training on the ImageNet dataset. We used the tensorflow implementation available online (tensorflow/models/inception/inception) and ran it on one GPU for 2 weeks. ",
1373
+ "bbox": [
1374
+ 173,
1375
+ 252,
1376
+ 826,
1377
+ 294
1378
+ ],
1379
+ "page_idx": 9
1380
+ },
1381
+ {
1382
+ "type": "image",
1383
+ "img_path": "images/ac9d6cc65020b4249ed3608d9b9b777742591517ad3a2380677dd8d818c256fb.jpg",
1384
+ "image_caption": [],
1385
+ "image_footnote": [],
1386
+ "bbox": [
1387
+ 232,
1388
+ 306,
1389
+ 758,
1390
+ 377
1391
+ ],
1392
+ "page_idx": 9
1393
+ },
1394
+ {
1395
+ "type": "text",
1396
+ "text": "As described in section A.1, one of the challenges is that the number of features can be prohibitively large, and we have to consider taking only a subset of the features. In this particular experiment, we have had the most success by taking 1000 random features for each probe. This gives certain layers an unfair advantage if they start with 4000 features and we kept 1000, whereas in other cases the probe insertion point has 426, 320 features and we keep 1000. There was no simple “fair” solution. That being said, 13 out of the 17 probes have more than 100, 000 features, and 11 of those probes have more than 200, 000 features, so things were relatively comparable. ",
1397
+ "bbox": [
1398
+ 174,
1399
+ 391,
1400
+ 825,
1401
+ 489
1402
+ ],
1403
+ "page_idx": 9
1404
+ },
1405
+ {
1406
+ "type": "text",
1407
+ "text": "We put linear classifier probes at certain strategic layers. We represent this using boxes in the following Figure 9. The prediction error of the probe given by the last layer of each box is illustrated by coloring the box. Red is bad (high prediction error) and green/blue is good (low prediction error). ",
1408
+ "bbox": [
1409
+ 174,
1410
+ 496,
1411
+ 825,
1412
+ 537
1413
+ ],
1414
+ "page_idx": 9
1415
+ },
1416
+ {
1417
+ "type": "text",
1418
+ "text": "We would have liked to have a video to show the evolution of this during training, but this experiment had to be scaled back due to the large computational demands. We show here the prediction errors at three moments of training. These correspond roughly to the beginning of training, then after a few days, and finally after a week. ",
1419
+ "bbox": [
1420
+ 174,
1421
+ 544,
1422
+ 825,
1423
+ 601
1424
+ ],
1425
+ "page_idx": 9
1426
+ },
1427
+ {
1428
+ "type": "text",
1429
+ "text": "Inception v3 ",
1430
+ "text_level": 1,
1431
+ "bbox": [
1432
+ 307,
1433
+ 212,
1434
+ 431,
1435
+ 231
1436
+ ],
1437
+ "page_idx": 10
1438
+ },
1439
+ {
1440
+ "type": "image",
1441
+ "img_path": "images/be6f620a4776ffd6346efda0088099ba541bfd481b106cd797b8827d1c06e143.jpg",
1442
+ "image_caption": [
1443
+ "Figure 9: Inserting a probe at multiple moments during training the Inception v3 model on the ImageNet dataset. We represent here the prediction error evaluated at a random subset of 1000 features. As expected, at first all the probes have a $100 \\%$ prediction error, but as training progresses we see that the model is getting better. Note that there are 1000 classes, so a prediction error of $50 \\%$ is much better than a random guess. The auxiliary head, shown under the model, was observed to have a prediction error that was slightly better than the main head. This is not necessarily a condition that will hold at the end of training, but merely an observation. "
1444
+ ],
1445
+ "image_footnote": [],
1446
+ "bbox": [
1447
+ 236,
1448
+ 241,
1449
+ 761,
1450
+ 700
1451
+ ],
1452
+ "page_idx": 10
1453
+ }
1454
+ ]
parse/train/ryF7rTqgl/ryF7rTqgl_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ryF7rTqgl/ryF7rTqgl_model.json ADDED
The diff for this file is too large to render. See raw diff