ZHANGYUXUAN-zR commited on
Commit
d7dbcbd
·
verified ·
1 Parent(s): 24f8a3c

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. parse/train/3Wp8HM2CNdR/3Wp8HM2CNdR.md +308 -0
  2. parse/train/3Wp8HM2CNdR/3Wp8HM2CNdR_content_list.json +1620 -0
  3. parse/train/3Wp8HM2CNdR/3Wp8HM2CNdR_middle.json +0 -0
  4. parse/train/3Wp8HM2CNdR/3Wp8HM2CNdR_model.json +0 -0
  5. parse/train/SJeqs6EFvB/SJeqs6EFvB.md +353 -0
  6. parse/train/SJeqs6EFvB/SJeqs6EFvB_content_list.json +1891 -0
  7. parse/train/SJeqs6EFvB/SJeqs6EFvB_middle.json +0 -0
  8. parse/train/SJeqs6EFvB/SJeqs6EFvB_model.json +0 -0
  9. parse/train/SygvTcYee/SygvTcYee.md +177 -0
  10. parse/train/SygvTcYee/SygvTcYee_content_list.json +792 -0
  11. parse/train/SygvTcYee/SygvTcYee_middle.json +0 -0
  12. parse/train/SygvTcYee/SygvTcYee_model.json +0 -0
  13. parse/train/r1drp-WCZ/r1drp-WCZ.md +366 -0
  14. parse/train/r1drp-WCZ/r1drp-WCZ_content_list.json +1760 -0
  15. parse/train/r1drp-WCZ/r1drp-WCZ_middle.json +0 -0
  16. parse/train/r1drp-WCZ/r1drp-WCZ_model.json +0 -0
  17. parse/train/txC1ObHJ0wB/txC1ObHJ0wB.md +279 -0
  18. parse/train/txC1ObHJ0wB/txC1ObHJ0wB_content_list.json +1536 -0
  19. parse/train/txC1ObHJ0wB/txC1ObHJ0wB_middle.json +0 -0
  20. parse/train/txC1ObHJ0wB/txC1ObHJ0wB_model.json +0 -0
  21. vlm/train/-bdp_8Itjwp/0.png +3 -0
  22. vlm/train/-bdp_8Itjwp/1.png +3 -0
  23. vlm/train/-bdp_8Itjwp/10.png +3 -0
  24. vlm/train/-bdp_8Itjwp/11.png +3 -0
  25. vlm/train/-bdp_8Itjwp/12.png +3 -0
  26. vlm/train/-bdp_8Itjwp/13.png +3 -0
  27. vlm/train/-bdp_8Itjwp/14.png +3 -0
  28. vlm/train/-bdp_8Itjwp/15.png +3 -0
  29. vlm/train/-bdp_8Itjwp/16.png +3 -0
  30. vlm/train/-bdp_8Itjwp/17.png +3 -0
  31. vlm/train/-bdp_8Itjwp/2.png +3 -0
  32. vlm/train/-bdp_8Itjwp/3.png +3 -0
  33. vlm/train/-bdp_8Itjwp/4.png +3 -0
  34. vlm/train/-bdp_8Itjwp/5.png +3 -0
  35. vlm/train/-bdp_8Itjwp/6.png +3 -0
  36. vlm/train/-bdp_8Itjwp/7.png +3 -0
  37. vlm/train/-bdp_8Itjwp/8.png +3 -0
  38. vlm/train/-bdp_8Itjwp/9.png +3 -0
  39. vlm/train/3k20LAiHYL2/0.png +3 -0
  40. vlm/train/3k20LAiHYL2/1.png +3 -0
  41. vlm/train/3k20LAiHYL2/10.png +3 -0
  42. vlm/train/3k20LAiHYL2/11.png +3 -0
  43. vlm/train/3k20LAiHYL2/12.png +3 -0
  44. vlm/train/3k20LAiHYL2/13.png +3 -0
  45. vlm/train/3k20LAiHYL2/14.png +3 -0
  46. vlm/train/3k20LAiHYL2/2.png +3 -0
  47. vlm/train/3k20LAiHYL2/3.png +3 -0
  48. vlm/train/3k20LAiHYL2/4.png +3 -0
  49. vlm/train/3k20LAiHYL2/5.png +3 -0
  50. vlm/train/3k20LAiHYL2/6.png +3 -0
parse/train/3Wp8HM2CNdR/3Wp8HM2CNdR.md ADDED
@@ -0,0 +1,308 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # WHITENING FOR SELF-SUPERVISED REPRESENTATION LEARNING
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Most of the self-supervised representation learning methods are based on the contrastive loss and the instance-discrimination task, where augmented versions of the same image instance (“positives”) are contrasted with instances extracted from other images (“negatives”). For the learning to be effective, a lot of negatives should be compared with a positive pair, which is computationally demanding. In this paper, we propose a different direction and a new loss function for selfsupervised representation learning which is based on the whitening of the latentspace features. The whitening operation has a “scattering” effect on the batch samples, which compensates the use of negatives, avoiding degenerate solutions where all the sample representations collapse to a single point. Our Whitening MSE (W-MSE) loss does not require special heuristics (e.g. additional networks) and it is conceptually simple. Since negatives are not needed, we can extract multiple positive pairs from the same image instance. We empirically show that WMSE is competitive with respect to popular, more complex self-supervised methods. The source code of the method and all the experiments is included in the Supplementary Material.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ One of the current main bottlenecks in deep network training is the dependence on large annotated training datasets, and this motivates the recent surge of interest in unsupervised methods. Specifically, in self-supervised representation learning, a network is (pre-)trained without any form of manual annotation, thus providing a means to extract information from unlabeled-data sources (e.g., text corpora, videos, images from the Internet, etc.). In self-supervision, label information is replaced by a prediction problem using some form of context or using a pretext task. Pioneering work in this direction was done in Natural Language Processing (NLP), in which the co-occurrence of words in a sentence is used to learn a language model (Mikolov et al., 2013a;b; Devlin et al., 2019). In Computer Vision, typical contexts or pretext tasks are based on: (1) the temporal consistency in videos (Wang & Gupta, 2015; Misra et al., 2016; Dwibedi et al., 2019), (2) the spatial order of patches in still images (Noroozi & Favaro, 2016; Misra & van der Maaten, 2019; Henaff et al., 2019) ´ or (3) simple image transformation techniques (Ji et al., 2019; He et al., 2019; Wu et al., 2018). The intuitive idea behind most of these methods is to collect pairs of positive and negative samples: two positive samples should share the same semantics, while negatives should be perceptually different. A triplet loss (Sohn, 2016; Schroff et al., 2015; Hermans et al., 2017; Wang & Gupta, 2015; Misra et al., 2016) can then be used to learn a metric space which should represent the human perceptual similarity. However, most of the recent studies use a contrastive loss (Hadsell et al., 2006) or one of its variants (Gutmann & Hyvarinen, 2010; van den Oord et al., 2018; Hjelm et al., 2019), while ¨ Tschannen et al. (2019) show the relation between the triplet loss and the contrastive loss.
12
+
13
+ It is worth noticing that the success of both kinds of losses is strongly affected by the number and the quality of the negative samples. For instance, in the case of the triplet loss, a common practice is to select hard/semi-hard negatives (Schroff et al., 2015; Hermans et al., 2017). On the other hand, Hjelm et al. (2019) have shown that the contrastive loss needs a large number of negatives to be competitive. This implies using batches with a large size, which is computationally demanding, especially with high-resolution images. In order to alleviate this problem, Wu et al. (2018) use a memory bank of negatives, which is composed of feature-vector representations of all the training samples. He et al. (2019) conjecture that the use of large and fixed-representation vocabularies is one of the keys to the success of self-supervision in NLP. The solution proposed by He et al. (2019) extends Wu et al. (2018) using a memory-efficient queue of the last visited negatives, together with a momentum encoder which preserves the intra-queue representation consistency. Chen et al. (2020) have performed large-scale experiments confirming that a large number of negatives (and therefore a large batch size) is required for the contrastive loss to be efficient. Concurrently with our work, Grill et al. (2020) have suggested that it is not necessary to rely on the contrastive scheme, introducing a high-performing alternative based on bootstrapping.
14
+
15
+ In this paper we propose a new self-supervised loss function which first scatters all the sample representations in a spherical distribution1 and then penalizes the positive pairs which are far from each other. In more detail, given a set of samples $V = \{ \mathbf { v } _ { i } \}$ , corresponding to the current minibatch of images $B = \{ x _ { i } \}$ , we first project the elements of $V$ onto a spherical distribution using a whitening transform (Siarohin et al., 2019). The whitened representations $\left\{ \mathbf { z } _ { i } \right\}$ , corresponding to $V$ , are normalized and then used to compute a Mean Squared Error (MSE) loss which accumulates the error taking into account only positive pairs $( \mathbf { z } _ { i } , \mathbf { z } _ { j } )$ . We do not need to contrast positives against negatives as in the contrastive loss or in the triplet loss because the optimization process leads to shrinking the distance between positive pairs and, indirectly, scatters the other samples to satisfy the overall spherical-distribution constraint.
16
+
17
+ In summary, our contributions are the following:
18
+
19
+ • We propose a new loss function, Whitening MSE (W-MSE), for self-supervised training. W-MSE constrains the batch samples to lie in a spherical distribution and it is an alternative to positive-negative instance contrasting methods.
20
+ Our loss does not rely on negatives, thus including more positive samples in the batch can be beneficial; we indeed demonstrate that multiple positive pairs extracted from one image improve the performance.
21
+ • We empirically show that our W-MSE loss outperforms the commonly adopted contrastive loss when measured using different standard classification protocols. We show that W-MSE is competitive with respect to state-of-the-art self-supervised methods.
22
+
23
+ # 2 BACKGROUND AND RELATED WORK
24
+
25
+ A typical self-supervised method is composed of two main components: a pretext task, which exploits some a-priori knowledge about the domain to automatically extract supervision from data, and a loss function. In this section we briefly review both aspects, and we additionally analyse the recent literature concerning feature whitening.
26
+
27
+ Pretext Tasks. The temporal consistency in a video provides an intuitive form of self-supervision: temporally-close frames usually contain a similar semantic content (Wang & Gupta, 2015; van den Oord et al., 2018). Misra et al. (2016) extended this idea using the relative temporal order of 3 frames, while Dwibedi et al. (2019) used a temporal cycle consistency for self-supervision, which is based on comparing two videos sharing the same semantics and computing inter-video frame-toframe nearest neighbour assignments.
28
+
29
+ When dealing with still images, the most common pretext task is instance discrimination (Wu et al. (2018)): from a training image $x$ , a composition of data-augmentation techniques are used to extract two different views of $x$ $\cdot \boldsymbol { x } _ { i }$ and $x _ { j }$ ). Commonly adopted transformations are: image cropping, rotation, color jittering, Sobel filtering, etc.. The learner is then required to discriminate $( x _ { i } , x _ { j } )$ from other views extracted from other samples (Wu et al., 2018; Ji et al., 2019; He et al., 2019; Chen et al., 2020).
30
+
31
+ Denoising auto-encoders (Vincent et al., 2008) add random noise to the input image and try to recover the original image. More sophisticated pretext tasks consist in predicting the spatial order of image patches (Noroozi & Favaro, 2016; Misra & van der Maaten, 2019) or in reconstructing large masked regions of the image (Pathak et al., 2016). Hjelm et al. (2019); Bachman et al. (2019) compare the holistic representation of an input image with a patch of the same image. Henaff et al. ´ (2019) use a similar idea, where the comparison depends on the patch order: the appearance of a given patch should be predicted given the appearance of the patches which lie above it in the image.
32
+
33
+ In this paper we use standard data augmentation techniques on still images to obtain positive pairs, which is a simple method to get self-supervision (Chen et al., 2020) and does not require a pretexttask specific network architecture (Hjelm et al., 2019; Bachman et al., 2019; Henaff et al., 2019). ´
34
+
35
+ Loss functions. Denoising auto-encoders use a reconstruction loss which compares the generated image with the input image before adding noise. Other generative methods use an adversarial loss in which a discriminator provides supervisory information to the generator (Donahue et al., 2017; Donahue & Simonyan, 2019).
36
+
37
+ Early self-supervised (deep) discriminative methods used a triplet loss (Wang & Gupta, 2015; Misra et al., 2016): given two positive images $x _ { i } , x _ { j }$ and a negative $x _ { k }$ (Sec. 1), together with their corresponding latent-space representations $\mathbf { z } _ { i } , \mathbf { z } _ { j } , \mathbf { z } _ { k }$ , this loss penalizes those cases in which $\mathbf { z } _ { i }$ and $\mathbf { z } _ { k }$ are closer to each other than $\mathbf { z } _ { i }$ and $\mathbf { z } _ { j }$ plus a margin $m$ :
38
+
39
+ $$
40
+ L _ { T r i p l e t } = - \operatorname* { m a x } ( \mathbf { z } _ { i } ^ { T } \mathbf { z } _ { k } - \mathbf { z } _ { i } ^ { T } \mathbf { z } _ { j } + m , 0 ) .
41
+ $$
42
+
43
+ Most of the recent self-supervised discriminative methods are based on some contrastive loss (Hadsell et al., 2006) variant, in which $\mathbf { z } _ { i }$ and $\mathbf { z } _ { j }$ are contrasted against a set of negative pairs. Following the common formulation proposed by van den Oord et al. (2018):
44
+
45
+ $$
46
+ L _ { C o n t r a s t i v e } = - \log \frac { \exp { ( \mathbf { z } _ { i } ^ { T } \mathbf { z } _ { j } / \tau ) } } { \sum _ { k = 1 , k \neq i } ^ { K } \exp { ( \mathbf { z } _ { i } ^ { T } \mathbf { z } _ { k } / \tau ) } } ,
47
+ $$
48
+
49
+ where $\tau$ is a temperature hyperparameter which should be manually set and the sum in the denominator is over a set of $K - 1$ negative samples. Usually $K$ is the size of the current batch, i.e., $K = 2 N$ , being $N$ the number of the positive pairs. However, as shown by Hjelm et al. (2019), the contrastive loss (2) requires a large number of negative samples to be competitive. Wu et al. (2018); He et al. (2019) use a set of negatives much larger than the current batch, by pre-computing latent-space representations of old samples. SimCLR (Chen et al. (2020)) uses a simpler, but computationally very demanding, solution based on large batches.
50
+
51
+ While recent works (van den Oord et al., 2018; Henaff et al., 2019; Hjelm et al., 2019; Bachman ´ et al., 2019; Ravanelli & Bengio, 2018) draw a relation between the contrastive loss and an estimate of the mutual information between the latent-space image representations, Tschannen et al. (2019) showed that the success of this loss is likely related to learning a metric space, similarly to what happens with a triplet loss. On the other hand, Wang & Isola (2020) showed that the $L _ { 2 }$ normalized contrastive loss asymptotically converges to the minimization of two desirable characteristics of the latent-space representations on the surface of the unit hypersphere: uniformity and semantic alignment. In the same paper, the authors propose two new losses ( ${ \mathcal L } _ { \mathrm { u n i f o r m } }$ and $\mathcal { L } _ { \mathrm { a l i g n } , }$ ) which explicitly deal with these characteristics.
52
+
53
+ Concurrently with our work, BYOL (Grill et al. (2020)) proposes a “bootstrapping” scheme which is alternative to the positive-negative contrastive learning. In BYOL, an “online” network is optimised to predict the output of a “target” network, whose parameters are a running average of the online network. The predictions of the two networks are compared using an additional prediction network and an MSE loss. However, very recently, Fetterman & Albrecht (2020) and Tian et al. (2020) have empirically shown that BYOL can avoid a collapsed solution through the use of the Batch Norm (BN) (Ioffe & Szegedy, 2015) which avoids constant representations. Our work can be seen as a generalization of this finding with a much simpler network architecture (more details in Sec. 3.1).
54
+
55
+ In this paper we propose a different loss which is competitive with respect to other alternatives. Our loss formulation is simpler because it does not require a proper setting of the $\tau$ hyperparameter in equation 2, $m$ in equation 1, or additional networks with a specific weight update schemes as in BYOL.
56
+
57
+ Feature Whitening. We adopt the efficient and stable Cholesky decomposition (Dereniowski & Marek, 2004) based whitening transform proposed by Siarohin et al. (2019) to project our latentspace vectors into a spherical distribution (more details in Sec. 3). Note that Huang et al. (2018);
58
+
59
+ ![](images/d1a34f8c28ebe7ade64be93a372c8c1761ea3e488a8ecaa0f60e91f994505bfc.jpg)
60
+ Figure 1: A schematic representation of the W-MSE based optimization process. Positive pairs are indicated with the same shapes and colors. (1) A representation of the feature batch $V$ when training starts. (2, 3) The distribution of the elements after whitening and $L _ { 2 }$ normalization. (4) The MSE computed over the normalized $\mathbf { z }$ features encourages the network to move the positive pair representations closer to each other. (5) The subsequent iterations move closer and closer the positive pairs, while the relative layout of the other samples is forced to lie in a spherical distribution.
61
+
62
+ Siarohin et al. (2019) use whitening transforms in the intermediate layers of the network for a completely different task: extending BN to a multivariate batch normalization.
63
+
64
+ # 3 THE WHITENING MSE LOSS
65
+
66
+ Given an image $x$ , we extract an embedding $\mathrm { ~ \bf ~ z ~ } = \mathrm { ~ \bf ~ \it ~ f ~ } ( x ; \theta )$ using an encoder network $f ( \cdot ; \theta )$ parametrized with $\theta$ (more details below). We require that: (1) the image embeddings are drawn from a non-degenerate distribution (the latter being a distribution where, e.g., all the representations collapse to a single point), and (2) positive image pairs $( x _ { i } , x _ { j } )$ , which share a similar semantics, should be clustered close to each other. We formulate this problem as follows:
67
+
68
+ $$
69
+ \begin{array} { c } { m i n _ { \theta } \operatorname { \mathbb { E } } d i s t ( \mathbf { z } _ { i } , \mathbf { z } _ { j } ) , } \\ { s . t . c o v ( \mathbf { z } _ { i } , \mathbf { z } _ { i } ) = c o v ( \mathbf { z } _ { j } , \mathbf { z } _ { j } ) = I , } \end{array}
70
+ $$
71
+
72
+ where $d i s t ( \cdot )$ is a distance between vectors, $I$ is the identity matrix and $( \mathbf { z } _ { i } , \mathbf { z } _ { j } )$ corresponds to a positive pair of images $( x _ { i } , x _ { j } )$ . With equation 4, we constrain the distribution of the $\mathbf { z }$ values to be non-degenerate, hence avoiding that all the probability mass is concentrated in a single point. Moreover, equation 4 makes all the components of $\mathbf { z }$ to be linearly independent from each other, which encourages the different dimensions of $\mathbf { z }$ to represent different semantic content. We define the distance with the cosine similarity, implemented with MSE between normalized vectors:
73
+
74
+ $$
75
+ d i s t ( \mathbf { z } _ { i } , \mathbf { z } _ { j } ) = \left\| { \frac { \mathbf { z } _ { i } } { \left\| \mathbf { z } _ { i } \right\| _ { 2 } } } - { \frac { \mathbf { z } _ { j } } { \left\| \mathbf { z } _ { j } \right\| _ { 2 } } } \right\| _ { 2 } ^ { 2 } = 2 - 2 { \frac { \langle \mathbf { z } _ { i } , \mathbf { z } _ { j } \rangle } { \left\| \mathbf { z } _ { i } \right\| _ { 2 } \cdot \left\| \mathbf { z } _ { j } \right\| _ { 2 } } }
76
+ $$
77
+
78
+ In Appendix C we also include other experiments in which the cosine similarity is replaced by the Euclidean distance. We provide below the details on how positive image samples are collected, how they are encoded and how the above optimization is implemented.
79
+
80
+ First, similarly to Chen et al. (2020), we obtain positive samples sharing the same semantics from a single image $x$ and using standard image transformation techniques. Specifically, we use a composition of image cropping, grayscaling and color jittering transformations $T ( \cdot ; \mathbf { p } )$ . The parameters $\mathbf { \tau } ( \mathbf { p } )$ are selected uniformly at random and independently for each positive sample extracted from the same image: $x _ { i } = T ( x ; { \mathbf p } _ { i } )$ . We concisely indicate with $p o s ( i , j )$ the fact that $x _ { i }$ and $x _ { j } ( x _ { i } , x _ { j } \in B$ , $B$ the current batch) have been extracted from the same image.
81
+
82
+ ![](images/30fed903347f9275f5f14cd0634d881a6b9fc03086e82bb722a8a53a8a41ffdd.jpg)
83
+ Figure 2: A scheme of our training procedure. First, $d$ $Q = 4$ in this case) positive samples are generated using augmentations. These images are transformed into vectors with the encoder $E ( \cdot )$ . Next, they are projected onto a lower dimensional space with a projection head $g ( \cdot )$ . Then, Whitening projects these vectors onto a spherical distribution, followed by an optional $L _ { 2 }$ normalization. Finally, the dashed curves show all the $d ( d - 1 ) / 2 = 6$ comparisons used in our W-MSE loss.
84
+
85
+ The number of positive samples per image $d$ may vary, trading off diversity in the batch and the amount of the training signal. Favoring more negatives, most of the methods use one positive pair $\left[ d = 2 \right.$ ). However, Ji et al. (2019) have demonstrated improved performance with 5 samples, while Caron et al. (2020) use 8 samples. In our MSE-based loss (see below), we use all the possible $d ( d - 1 ) / 2$ combinations of positive samples. We include experiments for $d = 2$ (1 positive pair) and $d = 4$ (6 positive pairs).
86
+
87
+ For representation learning, we use a backbone encoder network $E ( \cdot ) . E ( \cdot )$ , trained without human supervision, will be used in Sec. 4 for evaluation using standard protocols. We use a standard ResNet-18 (He et al., 2016) as the encoder, and $\mathbf { h } = E ( x )$ is the output of the average-pooling layer. This choice has the advantage to be simple and easily reproducible, in contrast to other methods which use encoder architectures specific for a given pretext task (see Sec. 2). Since $\mathbf { h } \in \mathbb { R } ^ { 5 1 2 }$ is a high-dimensional vector, following Chen et al. (2020) we use a nonlinear projection head $g ( \cdot )$ to project h in a lower dimensional space: $\mathbf { v } = g ( \mathbf { h } )$ , where $g ( \cdot )$ is implemented with a MLP with one hidden layer and a BN layer. The whole network $f ( \cdot )$ is given by the composition of $g ( \cdot )$ with $E ( \cdot )$ (see Fig. 2).
88
+
89
+ Given $N$ original images and a batch of samples $B = \{ x _ { 1 } , . . . x _ { K } \}$ , where $K \ : = \ : N d$ , let $V =$ $\left\{ \mathbf { v } _ { 1 } , \ldots \mathbf { v } _ { K } \right\}$ , be the corresponding batch of features obtained as described above. In the proposed W-MSE loss we compute the MSE over all $N d ( d { - } 1 ) / 2$ positive pairs, where constraint 4 is satisfied using the reparameterization of the $\mathbf { v }$ variables with the whitened variables $\mathbf { z }$ :
90
+
91
+ $$
92
+ L _ { W - M S E } ( V ) = \frac { 2 } { N d ( d - 1 ) } \sum _ { ( { \bf v } _ { i } , { \bf v } _ { j } ) \in V , p o s ( i , j ) } d i s t ( { \bf z } _ { i } , { \bf z } _ { j } ) ,
93
+ $$
94
+
95
+ where $\mathbf { z } = W h i t e n i n g ( \mathbf { v } )$ , and:
96
+
97
+ $$
98
+ W h i t e n i n g ( \mathbf { v } ) = W _ { V } ( \mathbf { v } - { \pmb \mu } _ { V } ) .
99
+ $$
100
+
101
+ In equation 7, $\pmb { \mu } _ { V }$ is the mean of the elements in $V$ : $\begin{array} { r } { \pmb { \mu } _ { V } = \frac { 1 } { K } \sum _ { k } \mathbf { v } _ { k } } \end{array}$ , while the matrix $W _ { V }$ is such that: $W _ { V } ^ { \top } W _ { V } = \Sigma _ { V } ^ { - 1 }$ , being $\Sigma _ { V }$ the covariance matrix of $V$ :
102
+
103
+ $$
104
+ \boldsymbol { \Sigma } _ { V } = \frac { 1 } { K - 1 } \sum _ { k } ( { \bf v } _ { k } - { \pmb \mu } _ { V } ) ( { \bf v } _ { k } - { \pmb \mu } _ { V } ) ^ { T } .
105
+ $$
106
+
107
+ For more details on how $W _ { V }$ is computed, we refer to Appendix B. Equation 7 performs the full whitening of each $\mathbf { v } _ { i } \in V$ and the resulting set of vectors $Z = \{ { \bf z } _ { 1 } , . . . , { \bf z } _ { K } \}$ lies in a zero-centered distribution with a covariance matrix equal to the identity matrix (Fig. 1).
108
+
109
+ ![](images/670f016219ae719cc7b4ed09e98be2e40ee9566bbaefc881897287654761deab.jpg)
110
+ Figure 3: Batch slicing. $V$ is first partitioned in $d$ parts $\left( d = 2 \right.$ in this example). We randomly permute the first part and we apply the same permutation to the other $d - 1$ parts. Then, we further split all the partitions and we create sub-batches $( V _ { i } )$ . Each $V _ { i }$ is independently used to compute the sub-batch specific whitening matrix $W _ { V } ^ { i }$ and centroid $\mu _ { V } ^ { i }$ .
111
+
112
+ The intuition behind the proposed loss is that equation 6 penalizes positives which are far apart from each other, thus leading $\overset { \cdot } { g } ( \bar { E } ( \cdot ) )$ to shrink the inter-positive distances. On the other hand, since $Z$ must lie in a spherical distribution, the other samples should be “moved” and rearranged in order to satisfy constraint 4 (see Fig. 1).
113
+
114
+ Batch Slicing. The estimation of the Mean Square Error in equation 6 depends on the whitening matrix $W _ { V }$ , which may have a high variance over consecutive iteration batches $V _ { t } , V _ { t + 1 } , \dots$ For this reason, inspired by the resampling methods (Efron, 1982), given a batch $V$ , we slice $V$ in different non-overlapping sub-batches and we compute a whitening matrix independently for each sub-batch. In more details, we first partition the batch in $d$ parts, being $d$ the number of positives extracted from one image. In this way, each partition contains elements extracted from different original images (i.e., no pair of positives is included in a single partition, see Fig. 3). Then, we randomly permute the elements of the each partition with the same permutation. Next, each partition is further split in sub-batches, using the heuristic that the size of each sub-batch $( V _ { i } )$ should be equal to the size of embedding (v) times 2 (this prevents instability issues when computing the covariance matrices). Next, for each $V _ { i }$ , we use only its elements to compute a corresponding whitening matrix $W _ { V } ^ { i }$ , which is used to whiten the elements of $V _ { i }$ only (Fig. 3). In the loss computation (equation 6), all the elements of all the sub-batches are used, thus implicitly alleviating the differences among the different whitening matrices. Finally, it is possible to repeat the whole operation several times and to average the result to get a more robust estimate of equation 6.
115
+
116
+ # 3.1 DISCUSSION
117
+
118
+ In a common instance-discrimination task (Sec. 2), e.g., solved using equation 2, the similarity of a positive pair $( \mathbf { z } _ { i } ^ { T } \mathbf { z } _ { j } )$ is contrasted with the similarity computed with respect to all the other samples $( { \bf z } _ { k } )$ in the batch $\mathbf { \langle z } _ { i } ^ { T } \mathbf { z } _ { k } , 1 \leq k \leq K , k \neq i )$ . However, $\mathbf { z } _ { k }$ and $\mathbf { z } _ { i }$ , extracted from different image instances, can occasionally share the same semantics (e.g., $x _ { i }$ and $x _ { k }$ are two different image instances of the unknown “cat” class). Conversely, the proposed W-MSE loss does not force all the instance samples to lie far from each other, but it only imposes a soft constraint (equation 4), which avoids degenerate distributions.
119
+
120
+ Note that previous work (He et al., 2019; Henaff et al., 2019; Chen et al., 2020) highlighted that ´ BN may be harmful for learning semantically meaningful representations because the network can “cheat” and exploit the batch statistics in order to find a trivial solution to equation 2. However, our whitening transform (equation 7) is applied only to the very last layer of the network $f ( \cdot )$ (see Fig. 2) and it is not used in the intermediate layers, which is instead the case of BN. Hence, our $f ( \cdot )$ cannot learn to exploit subtle inter-sample dependencies introduced by batch-statistics because of the lack of other learnable layers on top of the $\mathbf { z }$ features.
121
+
122
+ Similarly to equation 6, in BYOL (Grill et al., 2020) an MSE loss is used to compare the latent representations of two positives computed by slightly different networks without contrasting positives with negatives (Sec. 2). However, the MSE loss alone is inclined to collapse the representations of all the images to a constant value, which would make the MSE computation equal to zero. In BYOL, both the projection and the prediction sub-networks have BN layers, and, very recently, (Fetterman & Albrecht, 2020; Tian et al., 2020) have empirically shown that BYOL, without these BN layers, generates collapsed latent-space representations with a close-to-chance level classification accuracy. The reason of this behaviour seems to depend on the fact that the feature standardization in BN scatters the $\mathbf { z }$ values in a batch and avoids constant representations. Our W-MSE can be seen as a generalization of this implicit property of BYOL, in which the $\mathbf { z }$ values of the current batch are full-whitened, so preventing possible collapsing effects of the MSE loss. Importantly, we reach this result without the need of a target network or sophisticated training protocols.
123
+
124
+ Finally, note that using BN alone without whitening, as in W-MSE, and without additional networks, as in BYOL, is not sufficient. Indeed, if we just minimize an MSE after feature standardization, the network can easily find a solution where all the dimensions of the embedding represent the same feature. We have empirically verified this behaviour in preliminary experiments based on standardization, in which the network converges to a zero loss value after a few epochs but with a low classification accuracy.
125
+
126
+ # 4 EXPERIMENTS
127
+
128
+ We test our loss and its competitors on the following datasets.
129
+
130
+ • CIFAR-10 and CIFAR-100 (Krizhevsky & Hinton, 2009), two small-scale datasets composed of $3 2 \times 3 2$ images with 10 and 100 classes, respectively.
131
+ • Tiny ImageNet (Le & Yang, 2015), a reduced version of ImageNet, composed of 200 classes with images scaled down to $6 4 \times 6 4$ . The total number of images is: 100K (training) and 10K (testing). STL-10 (Coates et al., 2011), also derived from ImageNet, with $9 6 \times 9 6$ resolution images. While CIFAR-10, CIFAR-100 and Tiny ImageNet are fully-labeled, STL-10 is composed of 5K labeled training samples (500 per class) and 100K unlabeled training examples from a similar but broader distribution of images. There are additional 8K labeled testing images.
132
+ • ImageNet-100, a random 100-class subset of ImageNet (the list of the 100 classes is published in (Wang & Isola, 2020)), consisting of unaltered ImageNet images.
133
+
134
+ Setting. The goal of our experiments is to compare W-MSE with state-of-the-art losses, isolating the effects of other settings, such as the architectural choices. For this reason, we use the same encoder $E ( \cdot )$ ResNet-18 for all the experiments. We independently select the best hyperparameter values for every method and every dataset. Each method uses $L _ { 2 }$ feature normalization unless otherwise stated. Contrastive refers to our implementation of the contrastive loss (equation 2) following the details in (Chen et al., 2020), with temperature $\tau = 0 . 5$ . BYOL is our reproduction of (Grill et al., 2020), introduced concurrently with our work. For this method we use the exponential moving average with cosine increasing, starting from 0.99. W-MSE 2 and W-MSE 4 correspond to our method with $d = 2$ and $d = 4$ positives extracted per image, respectively. For CIFAR-10 and CIFAR-100, the slicing sub-batch size is 128, for Tiny ImageNet and STL-10, it is 256. For experiments W-MSE 2 for Tiny ImageNet and STL-10 we use 4 iterations of batch slicing, for all other experiments we use 1 iteration.
135
+
136
+ In all the experiments, we use the Adam optimizer (Kingma & Ba, 2014). For all the tested methods (including ours), we use the same number of epochs and the same learning rate schedule. Specifically, for CIFAR-10 and CIFAR-100, we use 1,000 epochs with learning rate $3 \times 1 0 ^ { - 3 }$ ; for Tiny ImageNet, 1,000 epochs with learning rate $2 \times 1 0 ^ { - 3 }$ ; for STL-10, 2,000 epochs with learning rate $2 \times \mathrm { 1 0 ^ { - 3 } }$ . We use learning rate warm-up for the first 500 iterations of the optimizer, and a 0.2 learning rate drop 50 and 25 epochs before the end. We use a mini-batch size of $K = 1 0 2 4$ samples. The dimension of the hidden layer of the projection head $g ( \cdot )$ is 1024. The weight decay is $1 \bar { 0 } ^ { - 6 }$ . Finally, we use an embedding size of 64 for CIFAR-10 and CIFAR-100, and an embedding of size of 128 for STL-10 and Tiny ImageNet. For ImageNet-100 we use a configuration similar to the Tiny ImageNet experiments, and 240 epochs of training.
137
+
138
+ As a common practice when using ResNet-like architectures for small-size image resolutions, in all the experiments, except ImageNet-100, we have a first convolutional layer with kernel size 3, stride 1 and padding 1. Additionally, in case of CIFAR-10 and CIFAR-100, we remove the first max pooling layer.
139
+
140
+ Table 1: Classification accuracy (top 1) of a linear classifier and a 5-nearest neighbors classifier for different loss functions and datasets with a ResNet-18 encoder.
141
+
142
+ <table><tr><td rowspan="2">Method</td><td colspan="2">CIFAR-10</td><td rowspan="2">CIFAR-100</td><td colspan="2">STL-10</td><td rowspan="2"></td><td colspan="2"> Tiny ImageNet</td></tr><tr><td>linear</td><td>5-nn</td><td>linear 5-nn</td><td>linear</td><td>5-nn linear</td><td>5-nn</td></tr><tr><td>Contrastive</td><td>91.80</td><td>88.42</td><td>66.83</td><td>56.56</td><td>90.51</td><td>85.68</td><td>48.84</td><td>32.86</td></tr><tr><td>BYOL</td><td>91.73</td><td>89.45</td><td>66.60</td><td>56.82</td><td>91.99</td><td>88.64</td><td>51.00</td><td>36.24</td></tr><tr><td>W-MSE 2</td><td>91.55</td><td>89.69</td><td>66.10</td><td>56.69</td><td>90.36</td><td>87.10</td><td>48.20</td><td>34.16</td></tr><tr><td>W-MSE 4</td><td>91.99</td><td>89.87</td><td>67.64</td><td>56.45</td><td>91.75</td><td>88.59</td><td>49.22</td><td>35.44</td></tr></table>
143
+
144
+ Table 2: Classification accuracy on ImageNet-100. W-MSE (2 and 4) are based on a ResNet-18 encoder. † indicates that the results are based on a ResNet-50 encoder and the values are reported from (Wang & Isola, 2020).
145
+
146
+ <table><tr><td>Method</td><td>linear (top 1)</td><td>linear (top 5)</td><td>5-nn</td></tr><tr><td>MoCot</td><td>72.80</td><td>91.64</td><td>1</td></tr><tr><td>Lalign and Luniform +</td><td>74.60</td><td>92.74</td><td>1</td></tr><tr><td>W-MSE 2</td><td>76.00</td><td>93.14</td><td>67.04</td></tr><tr><td>W-MSE 4</td><td>79.02</td><td>94.46</td><td>71.32</td></tr></table>
147
+
148
+ Image Transformation Details. We extract crops with a random size from 0.2 to 1.0 of the original area and a random aspect ratio from $3 / 4$ to $4 / 3$ of the original aspect ratio, which is a commonly used data-augmentation technique. We also apply horizontal mirroring with probability 0.5. Finally, we apply color jittering with configuration $( 0 . 4 , 0 . 4 , 0 . 4 , 0 . 1 )$ with probability 0.8 and grayscaling with probability 0.1. For ImageNet-100 we follow details in (Chen et al., 2020): crop size from 0.08 to 1.0, stronger jittering (0.8, 0.8, 0.8, 0.2), grayscaling probability 0.2, and Gaussian blurring with 0.5 probability.
149
+
150
+ Evaluation Protocol. The most common evaluation protocol for unsupervised feature learning is based on freezing the network encoder $( E ( \cdot )$ , in our case) after unsupervised pre-training, and then train a supervised linear classifier on top of it. Specifically, the linear classifier is a fully-connected layer followed by softmax, which is placed on top of $E ( \cdot )$ after removing the projection head $g ( \cdot )$ . In all the experiments we train the linear classifier for 500 epochs using the Adam optimizer and the labeled training set of each specific dataset, without data augmentation. The learning rate is exponentially decayed from $1 0 ^ { - 2 }$ to $1 0 ^ { - 6 }$ . The weight decay is $5 \times 1 0 ^ { - 6 }$ .
151
+
152
+ In our experiments, we also include the accuracy of a $\mathbf { k }$ -nearest neighbors classifier (k-nn, $k = 5$ ). The advantage of using this classifier is that it does not require additional parameters and training, and it is deterministic.
153
+
154
+ # 4.1 COMPARISON WITH THE STATE OF THE ART
155
+
156
+ Tab. 1 shows the results of the experiments on small and medium size datasets. For W-MSE, 4 samples are generally better than 2. The contrastive loss performs the worst in most cases. The W-MSE 4 accuracy is the best on CIFAR-10 and CIFAR-100, while BYOL leads on STL-10 and Tiny ImageNet, although the gap between the two methods is minor. In Appendix A, we plot the linear classification accuracy during training for the STL-10 dataset. The plot shows that W-MSE 4 and BYOL have a similar performance during most of the training. However, in the first 120 epochs, BYOL significantly underperforms W-MSE 4 (e.g., the accuracy after 20 epochs: W-MSE 4, $7 9 . 9 8 \%$ ; BYOL, $7 3 . 2 4 \%$ ), indicating that BYOL requires a “warmup” period. On the other hand, W-MSE performs well from the beginning. This property is useful in those domains which require a rapid adaptation of the encoder, e.g., due to the change of the data distribution in continual learning or in reinforcement learning.
157
+
158
+ Tab. 2 shows the results on a larger dataset (ImageNet-100). In that table, MoCo is the contrastiveloss based method proposed in (He et al., 2019), where a momentum encoder and a large queue of negatives are used to improve the contrast of the positive pairs with respect to the other samples (see Sec. 2). $\mathcal { L } _ { \mathrm { a l i g n } }$ and ${ \mathcal { L } } _ { \mathrm { u n i f o r m } }$ are the two losses proposed in (Wang & Isola, 2020) (Sec. 2). Note that, while W-MSE (2 and 4) in Tab. 2 refer to our method with a ResNet-18 encoder, the other results are reported from (Wang & Isola, 2020), where a much larger-capacity network (i.e., a ResNet-50) is used as the encoder. Despite this large difference in the encoder capacity, both versions of W-MSE significantly outperform the other two compared methods in this dataset.
159
+
160
+ # 4.2 TRAINING TIME COMPLEXITY
161
+
162
+ Following (Siarohin et al., 2019), the complexity of the whitening transform is $O ( k ^ { 3 } + M k ^ { 2 } )$ , where $k$ is the embedding dimension and $M$ is the size of the sub-batch used in the batch slicing process. Since $k < M$ (see Sec. 3), the whitening transform is $O ( M k ^ { 2 } )$ , which is basically equivalent to the forward pass of $M$ activations in a fully-connected layer connecting two layers of $k$ neurons each. In fact, the training time is dominated by other architectural choices which are usually more computationally demanding than the loss computation. For instance, BYOL (Grill et al., 2020) needs 4 forward passes through 2 networks for each pair of positives. Hence, to evaluate the wallclock time, we measure the time spent for one mini-batch iteration by all the methods compared in Tab. 1. We use the STL-10 dataset, a ResNet-18 encoder and a server with one Nvidia Titan $\mathrm { X p }$ GPU. Time of one iteration: Contrastive - 459ms, BYOL - 602ms, W-MSE 2 - 478ms, W-MSE 4 - $4 9 3 \mathrm { m s }$ . The $1 9 \mathrm { m s }$ difference between Contrastive and W-MSE 2 is due to the whitening transform. Since the factual time is mostly related to the sample forward and backward passes, the $d ( d - 1 )$ positive comparisons in equation 6 do not significantly increase the wall-clock time of W-MSE 4 with respect to W-MSE 2.
163
+
164
+ # 4.3 CONTRASTIVE LOSS WITH WHITENING
165
+
166
+ Table 3: Accuracy of the whitened contrastive loss on CIFAR-10 trained for 200 epochs.
167
+
168
+ <table><tr><td>Method</td><td>linear</td><td>5-nn</td></tr><tr><td>Contrastive</td><td>89.66</td><td>86.55</td></tr><tr><td>Contrastive with Whitening</td><td colspan="2">diverged</td></tr><tr><td>Contrastive,unnormalized features</td><td>79.48</td><td>76.60</td></tr><tr><td>Contrastive with Whitening,unnormalized features</td><td>77.39</td><td>74.14</td></tr></table>
169
+
170
+ In this section, we analyse the effect of the whitening transform in combination with the contrastive loss. Tab. 3 shows the results. The first row refers to the standard contrastive loss. Note that the difference with respect to Tab.1 is due to the use of only 200 training epochs. The second row refers to equation 2, where the features $\mathbf { \rho } ( \mathbf { z } )$ are computed using equation 7 and then $L _ { 2 }$ normalized, while in the last two rows, $\mathbf { z }$ is not normalized. If the features are whitened and then normalized, we observed an unstable training, with divergence after a few epochs. The unnormalized version with whitening converged, but its accuracy is worse than the standard contrastive loss (both normalized and unnormalized). This experiments show that whitening itself does not improve the performance, but it only allows to satisfy the constraint 4.
171
+
172
+ # 5 CONCLUSION
173
+
174
+ In this paper, we have proposed a new self-supervised representation learning loss, W-MSE, which is alternative to common loss functions used in the field. Differently from the triplet loss and the contrastive loss, both of which are based on comparing an instance-level similarity against other samples, W-MSE computes only the intra-positive distances, while using a whitening transform to avoid degenerate solutions. Despite W-MSE is very simple, its classification accuracy is comparable with state-of-the-art methods, achieving results significantly higher than MoCo, which requires an additional momentum encoder and a large queue of past samples. W-MSE is also comparable with BYOL, which needs an additional target network and a specific training protocol. We believe that the use of whitening to avoid collapsing effects can inspire other self-supervised methods.
175
+
176
+ # REFERENCES
177
+
178
+ Philip Bachman, R. Devon Hjelm, and William Buchwalter. Learning representations by maximizing mutual information across views. In NeurIPS, 2019.
179
+
180
+ Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by contrasting cluster assignments, 2020.
181
+
182
+ Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations, 2020.
183
+
184
+ Adam Coates, Andrew Y. Ng, and Honglak Lee. An analysis of single-layer networks in unsupervised feature learning. In AISTATS, 2011.
185
+
186
+ Dariusz Dereniowski and Kubale Marek. Cholesky factorization of matrices in parallel and ranking of graphs. In 5th Int. Conference on Parallel Processing and Applied Mathematics, 2004.
187
+
188
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In NAACL,, 2019.
189
+
190
+ Jeff Donahue and Karen Simonyan. Large scale adversarial representation learning. In NeurIPS, 2019.
191
+
192
+ Jeff Donahue, Philipp Krahenb ¨ uhl, and Trevor Darrell. Adversarial feature learning. In ¨ ICLR, 2017.
193
+
194
+ Debidatta Dwibedi, Yusuf Aytar, Jonathan Tompson, Pierre Sermanet, and Andrew Zisserman. Temporal cycle-consistency learning. In CVPR, 2019.
195
+
196
+ Bradley Efron. The jackknife, the bootstrap, and other resampling plans, volume 38. Siam, 1982.
197
+
198
+ Abe Fetterman and Josh Albrecht. Understanding self-supervised and contrastive learning with bootstrap your own latent (BYOL). https://untitled-ai.github.io/understanding-self-supervisedcontrastive-learning.html, 2020.
199
+
200
+ Jean-Bastien Grill, Florian Strub, Florent Altche, Corentin Tallec, Pierre H. Richemond, Elena ´ Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Daniel Guo, Mohammad Gheshlaghi Azar, Bilal Piot, Koray Kavukcuoglu, Remi Munos, and Michal Valko. Bootstrap your own ´ latent: A new approach to self-supervised learning, 2020.
201
+
202
+ Michael Gutmann and Aapo Hyvarinen. Noise-contrastive estimation: A new estimation principle ¨ for unnormalized statistical models. In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, 2010.
203
+
204
+ Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In CVPR, 2006.
205
+
206
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pp. 770–778, 2016.
207
+
208
+ Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. arXiv:1911.05722, 2019.
209
+
210
+ Olivier J. Henaff, Ali Razavi, Carl Doersch, S. M. Ali Eslami, and A ´ aron van den Oord. Data- ¨ efficient image recognition with contrastive predictive coding. arXiv:1905.09272, 2019.
211
+
212
+ Alexander Hermans, Lucas Beyer, and Bastian Leibe. In defense of the triplet loss for person reidentification. arXiv:1703.07737, 2017.
213
+
214
+ R. Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Philip Bachman, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. In ICLR, 2019.
215
+
216
+ Lei Huang, Dawei Yang, Bo Lang, and Jia Deng. Decorrelated batch normalization. In CVPR, 2018.
217
+
218
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015.
219
+
220
+ Xu Ji, Joao F. Henriques, and Andrea Vedaldi. Invariant information clustering for unsupervised ˜ image classification and segmentation. In ICCV, 2019.
221
+
222
+ Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization, 2014.
223
+
224
+ Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical Report, 2009.
225
+
226
+ Ya Le and Xuan Yang. Tiny imagenet visual recognition challenge. 2015.
227
+
228
+ Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. arXiv:1301.3781, 2013a.
229
+
230
+ Tomas Mikolov, Ilya Sutskever, Kai Chen, Gregory S. Corrado, and Jeffrey Dean. Distributed representations of words and phrases and their compositionality. In NIPS, 2013b.
231
+
232
+ Ishan Misra and Laurens van der Maaten. Self-supervised learning of pretext-invariant representations. arXiv:1912.01991, 2019.
233
+
234
+ Ishan Misra, C. Lawrence Zitnick, and Martial Hebert. Shuffle and learn: Unsupervised learning using temporal order verification. In ECCV, 2016.
235
+
236
+ Mehdi Noroozi and Paolo Favaro. Unsupervised learning of visual representations by solving jigsaw puzzles. In ECCV, 2016.
237
+
238
+ Deepak Pathak, Philipp Krahenb ¨ uhl, Jeff Donahue, Trevor Darrell, and Alexei A. Efros. Context ¨ encoders: Feature learning by inpainting. CVPR, 2016.
239
+
240
+ Mirco Ravanelli and Yoshua Bengio. Learning speaker representations with mutual information. arXiv:1812.00271, 2018.
241
+
242
+ Florian Schroff, Dmitry Kalenichenko, and James Philbin. FaceNet: A unified embedding for face recognition and clustering. In CVPR, 2015.
243
+
244
+ Aliaksandr Siarohin, Enver Sangineto, and Nicu Sebe. Whitening and coloring transform for GANs. In International Conference on Learning Representations, 2019.
245
+
246
+ Kihyuk Sohn. Improved deep metric learning with multi-class n-pair loss objective. In NIPS, 2016.
247
+
248
+ Yuandong Tian, Lantao Yu, Xinlei Chen, and Surya Ganguli. Understanding self-supervised learning with dual deep networks. arXiv:2010.00578, 2020.
249
+
250
+ Michael Tschannen, Josip Djolonga, Paul K. Rubenstein, Sylvain Gelly, and Mario Lucic. On mutual information maximization for representation learning. arXiv:1907.13625, 2019.
251
+
252
+ Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predic- ¨ tive coding. arXiv:1807.03748, 2018.
253
+
254
+ Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In ICML, 2008.
255
+
256
+ Tongzhou Wang and Phillip Isola. Understanding contrastive representation learning through alignment and uniformity on the hypersphere. In International Conference on Machine Learning, 2020.
257
+
258
+ Xiaolong Wang and Abhinav Gupta. Unsupervised learning of visual representations using videos. In ICCV, 2015.
259
+
260
+ Zhirong Wu, Yuanjun Xiong, Stella Yu, and Dahua Lin. Unsupervised feature learning via nonparametric instance-level discrimination. arXiv:1805.01978, 2018.
261
+
262
+ # A TRAINING DYNAMICS
263
+
264
+ Fig. 4 and 5 show the training dynamics for each of the considered losses. Charts are smoothed with a 0.3 moving average for readability (curves before smoothing are shown semi-transparent).
265
+
266
+ ![](images/4da7361dea4e214120a4f83ad835fe56daaf9d4478d45e9de5e947e5f9e43203.jpg)
267
+ Figure 4: Training dynamics on STL-10 dataset for linear classifier
268
+
269
+ ![](images/56fa92474a274079c986ab314b71342c7622615ad0b973ce49ef164a7fafb890.jpg)
270
+ Figure 5: Training dynamics on STL-10 dataset for 5-nn classifier
271
+
272
+ # B CHOLESKY WHITENING AND BACKPROGATION
273
+
274
+ We compute $W _ { V }$ (equation 8) following (Siarohin et al., 2019) and using the Cholesky decomposition. The Cholesky decomposition is based on the factorisation of the covariance symmetric matrix using two triangular matrices: $\Sigma _ { V } = L L ^ { \top }$ , where $L$ is a lower triangular matrix. Once we get $L$ , we compute the inverse of $L$ , and we get: $W _ { V } = L ^ { - 1 }$ . Note that Cholesky decomposition is fully diferentiable and it is implemented in all of the major frameworks, such as PyTorch and TensorFlow. However, for the sake of completeness, we provide below the gradient computation.
275
+
276
+ # B.1 GRADIENT COMPUTATION
277
+
278
+ We provide here the equations for whitening differentiation. Let $Z$ be the whitened version of the batch $V$ , i.e., $Z = W _ { V } ( V - \mu _ { V } )$ (equation 7). The gradient $\textstyle { \frac { \partial L } { \partial V } }$ can be computed by:
279
+
280
+ $$
281
+ \frac { \partial L } { \partial V } = \frac { 2 } { K - 1 } \frac { \partial L } { \partial \Sigma } V + W _ { V } ^ { T } \frac { \partial L } { \partial Z } .
282
+ $$
283
+
284
+ where the partial derivative $\frac { \partial L } { \partial Z }$ is backpropogated, while $\frac { \partial L } { \partial \Sigma }$ is computed as follows:
285
+
286
+ $$
287
+ \frac { \partial L } { \partial \Sigma } = - \frac { 1 } { 2 } W _ { V } ^ { T } \left( P \circ \frac { \partial L } { \partial W _ { V } } W _ { V } ^ { T } + \left( P \circ \frac { \partial L } { \partial W _ { V } } W _ { V } ^ { T } \right) ^ { T } \right) W _ { V }
288
+ $$
289
+
290
+ In equation $1 0 , \circ$ is Hadamard product, while $\frac { \partial L } { \partial W _ { V } }$ is:
291
+
292
+ $$
293
+ \frac { \partial \cal { L } } { \partial W _ { V } } = \frac { \partial \cal { L } } { \partial Z } V ^ { T } ,
294
+ $$
295
+
296
+ and $P$ is:
297
+
298
+ $$
299
+ P = \left( { \begin{array} { l l l l } { { \frac { 1 } { 2 } } } & { 0 } & { \cdots } & { 0 } \\ { 1 } & { { \frac { 1 } { 2 } } } & { \ddots } & { 0 } \\ { 1 } & { \ddots } & { \ddots } & { 0 } \\ { 1 } & { \cdots } & { 1 } & { { \frac { 1 } { 2 } } } \end{array} } \right) .
300
+ $$
301
+
302
+ # C EUCLIDEAN DISTANCE
303
+
304
+ Table 4: Classification accuracy (top 1) using the Euclidean distance (unnormalized embeddings) on STL-10.
305
+
306
+ <table><tr><td>Method</td><td> linear</td><td>5-nn</td></tr><tr><td>Contrastive</td><td>78.00</td><td>71.07</td></tr><tr><td>BYOL</td><td>80.83</td><td>74.94</td></tr><tr><td>W-MSE 2</td><td>89.91</td><td>85.56</td></tr><tr><td>W-MSE 4</td><td>90.40</td><td>87.09</td></tr></table>
307
+
308
+ The cosine similarity is a crucial component in most of the current self-supervised learning approaches. This is usually implemented with an $L _ { 2 }$ normalization of the latent representations, which corresponds to projecting the features on the surface of the unit hypersphere. However, in our WMSE, the whitening transform projects the representation onto a spherical distribution (intuitively, we can say on the whole unit hypersphere). Preserving the module of the features before the $L _ { 2 }$ normalization may be useful in some applications, e.g., clustering the features after the projection head using a Gaussian mixture model. Tab. 4 shows an experiment on the STL-10 dataset where we use unnormalized embeddings for all the methods (and $\tau = 1$ for the contrastive loss). Comparing Tab. 4 with Tab. 1, the accuracy decrease of W-MSE is significantly smaller than the other methods.
parse/train/3Wp8HM2CNdR/3Wp8HM2CNdR_content_list.json ADDED
@@ -0,0 +1,1620 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "WHITENING FOR SELF-SUPERVISED REPRESENTATION LEARNING ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 99,
9
+ 607,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 171,
20
+ 398,
21
+ 198
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 236,
32
+ 544,
33
+ 251
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Most of the self-supervised representation learning methods are based on the contrastive loss and the instance-discrimination task, where augmented versions of the same image instance (“positives”) are contrasted with instances extracted from other images (“negatives”). For the learning to be effective, a lot of negatives should be compared with a positive pair, which is computationally demanding. In this paper, we propose a different direction and a new loss function for selfsupervised representation learning which is based on the whitening of the latentspace features. The whitening operation has a “scattering” effect on the batch samples, which compensates the use of negatives, avoiding degenerate solutions where all the sample representations collapse to a single point. Our Whitening MSE (W-MSE) loss does not require special heuristics (e.g. additional networks) and it is conceptually simple. Since negatives are not needed, we can extract multiple positive pairs from the same image instance. We empirically show that WMSE is competitive with respect to popular, more complex self-supervised methods. The source code of the method and all the experiments is included in the Supplementary Material. ",
40
+ "bbox": [
41
+ 233,
42
+ 265,
43
+ 764,
44
+ 486
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 511,
55
+ 336,
56
+ 526
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "One of the current main bottlenecks in deep network training is the dependence on large annotated training datasets, and this motivates the recent surge of interest in unsupervised methods. Specifically, in self-supervised representation learning, a network is (pre-)trained without any form of manual annotation, thus providing a means to extract information from unlabeled-data sources (e.g., text corpora, videos, images from the Internet, etc.). In self-supervision, label information is replaced by a prediction problem using some form of context or using a pretext task. Pioneering work in this direction was done in Natural Language Processing (NLP), in which the co-occurrence of words in a sentence is used to learn a language model (Mikolov et al., 2013a;b; Devlin et al., 2019). In Computer Vision, typical contexts or pretext tasks are based on: (1) the temporal consistency in videos (Wang & Gupta, 2015; Misra et al., 2016; Dwibedi et al., 2019), (2) the spatial order of patches in still images (Noroozi & Favaro, 2016; Misra & van der Maaten, 2019; Henaff et al., 2019) ´ or (3) simple image transformation techniques (Ji et al., 2019; He et al., 2019; Wu et al., 2018). The intuitive idea behind most of these methods is to collect pairs of positive and negative samples: two positive samples should share the same semantics, while negatives should be perceptually different. A triplet loss (Sohn, 2016; Schroff et al., 2015; Hermans et al., 2017; Wang & Gupta, 2015; Misra et al., 2016) can then be used to learn a metric space which should represent the human perceptual similarity. However, most of the recent studies use a contrastive loss (Hadsell et al., 2006) or one of its variants (Gutmann & Hyvarinen, 2010; van den Oord et al., 2018; Hjelm et al., 2019), while ¨ Tschannen et al. (2019) show the relation between the triplet loss and the contrastive loss. ",
63
+ "bbox": [
64
+ 173,
65
+ 541,
66
+ 825,
67
+ 805
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "It is worth noticing that the success of both kinds of losses is strongly affected by the number and the quality of the negative samples. For instance, in the case of the triplet loss, a common practice is to select hard/semi-hard negatives (Schroff et al., 2015; Hermans et al., 2017). On the other hand, Hjelm et al. (2019) have shown that the contrastive loss needs a large number of negatives to be competitive. This implies using batches with a large size, which is computationally demanding, especially with high-resolution images. In order to alleviate this problem, Wu et al. (2018) use a memory bank of negatives, which is composed of feature-vector representations of all the training samples. He et al. (2019) conjecture that the use of large and fixed-representation vocabularies is one of the keys to the success of self-supervision in NLP. The solution proposed by He et al. (2019) extends Wu et al. (2018) using a memory-efficient queue of the last visited negatives, together with a momentum encoder which preserves the intra-queue representation consistency. Chen et al. (2020) have performed large-scale experiments confirming that a large number of negatives (and therefore a large batch size) is required for the contrastive loss to be efficient. Concurrently with our work, Grill et al. (2020) have suggested that it is not necessary to rely on the contrastive scheme, introducing a high-performing alternative based on bootstrapping. ",
74
+ "bbox": [
75
+ 174,
76
+ 811,
77
+ 823,
78
+ 924
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "",
85
+ "bbox": [
86
+ 174,
87
+ 103,
88
+ 825,
89
+ 202
90
+ ],
91
+ "page_idx": 1
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "In this paper we propose a new self-supervised loss function which first scatters all the sample representations in a spherical distribution1 and then penalizes the positive pairs which are far from each other. In more detail, given a set of samples $V = \\{ \\mathbf { v } _ { i } \\}$ , corresponding to the current minibatch of images $B = \\{ x _ { i } \\}$ , we first project the elements of $V$ onto a spherical distribution using a whitening transform (Siarohin et al., 2019). The whitened representations $\\left\\{ \\mathbf { z } _ { i } \\right\\}$ , corresponding to $V$ , are normalized and then used to compute a Mean Squared Error (MSE) loss which accumulates the error taking into account only positive pairs $( \\mathbf { z } _ { i } , \\mathbf { z } _ { j } )$ . We do not need to contrast positives against negatives as in the contrastive loss or in the triplet loss because the optimization process leads to shrinking the distance between positive pairs and, indirectly, scatters the other samples to satisfy the overall spherical-distribution constraint. ",
96
+ "bbox": [
97
+ 174,
98
+ 208,
99
+ 825,
100
+ 347
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "In summary, our contributions are the following: ",
107
+ "bbox": [
108
+ 173,
109
+ 354,
110
+ 491,
111
+ 368
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "• We propose a new loss function, Whitening MSE (W-MSE), for self-supervised training. W-MSE constrains the batch samples to lie in a spherical distribution and it is an alternative to positive-negative instance contrasting methods. \nOur loss does not rely on negatives, thus including more positive samples in the batch can be beneficial; we indeed demonstrate that multiple positive pairs extracted from one image improve the performance. \n• We empirically show that our W-MSE loss outperforms the commonly adopted contrastive loss when measured using different standard classification protocols. We show that W-MSE is competitive with respect to state-of-the-art self-supervised methods. ",
118
+ "bbox": [
119
+ 215,
120
+ 382,
121
+ 825,
122
+ 520
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "2 BACKGROUND AND RELATED WORK ",
129
+ "text_level": 1,
130
+ "bbox": [
131
+ 174,
132
+ 540,
133
+ 513,
134
+ 556
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "A typical self-supervised method is composed of two main components: a pretext task, which exploits some a-priori knowledge about the domain to automatically extract supervision from data, and a loss function. In this section we briefly review both aspects, and we additionally analyse the recent literature concerning feature whitening. ",
141
+ "bbox": [
142
+ 174,
143
+ 571,
144
+ 825,
145
+ 628
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "Pretext Tasks. The temporal consistency in a video provides an intuitive form of self-supervision: temporally-close frames usually contain a similar semantic content (Wang & Gupta, 2015; van den Oord et al., 2018). Misra et al. (2016) extended this idea using the relative temporal order of 3 frames, while Dwibedi et al. (2019) used a temporal cycle consistency for self-supervision, which is based on comparing two videos sharing the same semantics and computing inter-video frame-toframe nearest neighbour assignments. ",
152
+ "bbox": [
153
+ 174,
154
+ 635,
155
+ 825,
156
+ 718
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "When dealing with still images, the most common pretext task is instance discrimination (Wu et al. (2018)): from a training image $x$ , a composition of data-augmentation techniques are used to extract two different views of $x$ $\\cdot \\boldsymbol { x } _ { i }$ and $x _ { j }$ ). Commonly adopted transformations are: image cropping, rotation, color jittering, Sobel filtering, etc.. The learner is then required to discriminate $( x _ { i } , x _ { j } )$ from other views extracted from other samples (Wu et al., 2018; Ji et al., 2019; He et al., 2019; Chen et al., 2020). ",
163
+ "bbox": [
164
+ 173,
165
+ 726,
166
+ 825,
167
+ 809
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "Denoising auto-encoders (Vincent et al., 2008) add random noise to the input image and try to recover the original image. More sophisticated pretext tasks consist in predicting the spatial order of image patches (Noroozi & Favaro, 2016; Misra & van der Maaten, 2019) or in reconstructing large masked regions of the image (Pathak et al., 2016). Hjelm et al. (2019); Bachman et al. (2019) compare the holistic representation of an input image with a patch of the same image. Henaff et al. ´ (2019) use a similar idea, where the comparison depends on the patch order: the appearance of a given patch should be predicted given the appearance of the patches which lie above it in the image. ",
174
+ "bbox": [
175
+ 174,
176
+ 815,
177
+ 825,
178
+ 886
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "text",
184
+ "text": "",
185
+ "bbox": [
186
+ 171,
187
+ 103,
188
+ 823,
189
+ 132
190
+ ],
191
+ "page_idx": 2
192
+ },
193
+ {
194
+ "type": "text",
195
+ "text": "In this paper we use standard data augmentation techniques on still images to obtain positive pairs, which is a simple method to get self-supervision (Chen et al., 2020) and does not require a pretexttask specific network architecture (Hjelm et al., 2019; Bachman et al., 2019; Henaff et al., 2019). ´ ",
196
+ "bbox": [
197
+ 176,
198
+ 138,
199
+ 823,
200
+ 181
201
+ ],
202
+ "page_idx": 2
203
+ },
204
+ {
205
+ "type": "text",
206
+ "text": "Loss functions. Denoising auto-encoders use a reconstruction loss which compares the generated image with the input image before adding noise. Other generative methods use an adversarial loss in which a discriminator provides supervisory information to the generator (Donahue et al., 2017; Donahue & Simonyan, 2019). ",
207
+ "bbox": [
208
+ 174,
209
+ 188,
210
+ 825,
211
+ 244
212
+ ],
213
+ "page_idx": 2
214
+ },
215
+ {
216
+ "type": "text",
217
+ "text": "Early self-supervised (deep) discriminative methods used a triplet loss (Wang & Gupta, 2015; Misra et al., 2016): given two positive images $x _ { i } , x _ { j }$ and a negative $x _ { k }$ (Sec. 1), together with their corresponding latent-space representations $\\mathbf { z } _ { i } , \\mathbf { z } _ { j } , \\mathbf { z } _ { k }$ , this loss penalizes those cases in which $\\mathbf { z } _ { i }$ and $\\mathbf { z } _ { k }$ are closer to each other than $\\mathbf { z } _ { i }$ and $\\mathbf { z } _ { j }$ plus a margin $m$ : ",
218
+ "bbox": [
219
+ 173,
220
+ 251,
221
+ 823,
222
+ 308
223
+ ],
224
+ "page_idx": 2
225
+ },
226
+ {
227
+ "type": "equation",
228
+ "img_path": "images/44b2b560b0f14c65533db1f708379ccdefbeb3954729f1889df2a26a81d0c111.jpg",
229
+ "text": "$$\nL _ { T r i p l e t } = - \\operatorname* { m a x } ( \\mathbf { z } _ { i } ^ { T } \\mathbf { z } _ { k } - \\mathbf { z } _ { i } ^ { T } \\mathbf { z } _ { j } + m , 0 ) .\n$$",
230
+ "text_format": "latex",
231
+ "bbox": [
232
+ 357,
233
+ 324,
234
+ 640,
235
+ 344
236
+ ],
237
+ "page_idx": 2
238
+ },
239
+ {
240
+ "type": "text",
241
+ "text": "Most of the recent self-supervised discriminative methods are based on some contrastive loss (Hadsell et al., 2006) variant, in which $\\mathbf { z } _ { i }$ and $\\mathbf { z } _ { j }$ are contrasted against a set of negative pairs. Following the common formulation proposed by van den Oord et al. (2018): ",
242
+ "bbox": [
243
+ 174,
244
+ 354,
245
+ 825,
246
+ 397
247
+ ],
248
+ "page_idx": 2
249
+ },
250
+ {
251
+ "type": "equation",
252
+ "img_path": "images/eb22b78d299c708f33722ee37e28f18a059a44e82828af4f9962a697223db1e9.jpg",
253
+ "text": "$$\nL _ { C o n t r a s t i v e } = - \\log \\frac { \\exp { ( \\mathbf { z } _ { i } ^ { T } \\mathbf { z } _ { j } / \\tau ) } } { \\sum _ { k = 1 , k \\neq i } ^ { K } \\exp { ( \\mathbf { z } _ { i } ^ { T } \\mathbf { z } _ { k } / \\tau ) } } ,\n$$",
254
+ "text_format": "latex",
255
+ "bbox": [
256
+ 338,
257
+ 414,
258
+ 656,
259
+ 454
260
+ ],
261
+ "page_idx": 2
262
+ },
263
+ {
264
+ "type": "text",
265
+ "text": "where $\\tau$ is a temperature hyperparameter which should be manually set and the sum in the denominator is over a set of $K - 1$ negative samples. Usually $K$ is the size of the current batch, i.e., $K = 2 N$ , being $N$ the number of the positive pairs. However, as shown by Hjelm et al. (2019), the contrastive loss (2) requires a large number of negative samples to be competitive. Wu et al. (2018); He et al. (2019) use a set of negatives much larger than the current batch, by pre-computing latent-space representations of old samples. SimCLR (Chen et al. (2020)) uses a simpler, but computationally very demanding, solution based on large batches. ",
266
+ "bbox": [
267
+ 174,
268
+ 463,
269
+ 825,
270
+ 561
271
+ ],
272
+ "page_idx": 2
273
+ },
274
+ {
275
+ "type": "text",
276
+ "text": "While recent works (van den Oord et al., 2018; Henaff et al., 2019; Hjelm et al., 2019; Bachman ´ et al., 2019; Ravanelli & Bengio, 2018) draw a relation between the contrastive loss and an estimate of the mutual information between the latent-space image representations, Tschannen et al. (2019) showed that the success of this loss is likely related to learning a metric space, similarly to what happens with a triplet loss. On the other hand, Wang & Isola (2020) showed that the $L _ { 2 }$ normalized contrastive loss asymptotically converges to the minimization of two desirable characteristics of the latent-space representations on the surface of the unit hypersphere: uniformity and semantic alignment. In the same paper, the authors propose two new losses ( ${ \\mathcal L } _ { \\mathrm { u n i f o r m } }$ and $\\mathcal { L } _ { \\mathrm { a l i g n } , }$ ) which explicitly deal with these characteristics. ",
277
+ "bbox": [
278
+ 173,
279
+ 568,
280
+ 825,
281
+ 694
282
+ ],
283
+ "page_idx": 2
284
+ },
285
+ {
286
+ "type": "text",
287
+ "text": "Concurrently with our work, BYOL (Grill et al. (2020)) proposes a “bootstrapping” scheme which is alternative to the positive-negative contrastive learning. In BYOL, an “online” network is optimised to predict the output of a “target” network, whose parameters are a running average of the online network. The predictions of the two networks are compared using an additional prediction network and an MSE loss. However, very recently, Fetterman & Albrecht (2020) and Tian et al. (2020) have empirically shown that BYOL can avoid a collapsed solution through the use of the Batch Norm (BN) (Ioffe & Szegedy, 2015) which avoids constant representations. Our work can be seen as a generalization of this finding with a much simpler network architecture (more details in Sec. 3.1). ",
288
+ "bbox": [
289
+ 173,
290
+ 699,
291
+ 825,
292
+ 813
293
+ ],
294
+ "page_idx": 2
295
+ },
296
+ {
297
+ "type": "text",
298
+ "text": "In this paper we propose a different loss which is competitive with respect to other alternatives. Our loss formulation is simpler because it does not require a proper setting of the $\\tau$ hyperparameter in equation 2, $m$ in equation 1, or additional networks with a specific weight update schemes as in BYOL. ",
299
+ "bbox": [
300
+ 174,
301
+ 818,
302
+ 825,
303
+ 875
304
+ ],
305
+ "page_idx": 2
306
+ },
307
+ {
308
+ "type": "text",
309
+ "text": "Feature Whitening. We adopt the efficient and stable Cholesky decomposition (Dereniowski & Marek, 2004) based whitening transform proposed by Siarohin et al. (2019) to project our latentspace vectors into a spherical distribution (more details in Sec. 3). Note that Huang et al. (2018); ",
310
+ "bbox": [
311
+ 176,
312
+ 881,
313
+ 823,
314
+ 924
315
+ ],
316
+ "page_idx": 2
317
+ },
318
+ {
319
+ "type": "image",
320
+ "img_path": "images/d1a34f8c28ebe7ade64be93a372c8c1761ea3e488a8ecaa0f60e91f994505bfc.jpg",
321
+ "image_caption": [
322
+ "Figure 1: A schematic representation of the W-MSE based optimization process. Positive pairs are indicated with the same shapes and colors. (1) A representation of the feature batch $V$ when training starts. (2, 3) The distribution of the elements after whitening and $L _ { 2 }$ normalization. (4) The MSE computed over the normalized $\\mathbf { z }$ features encourages the network to move the positive pair representations closer to each other. (5) The subsequent iterations move closer and closer the positive pairs, while the relative layout of the other samples is forced to lie in a spherical distribution. "
323
+ ],
324
+ "image_footnote": [],
325
+ "bbox": [
326
+ 276,
327
+ 99,
328
+ 727,
329
+ 371
330
+ ],
331
+ "page_idx": 3
332
+ },
333
+ {
334
+ "type": "text",
335
+ "text": "Siarohin et al. (2019) use whitening transforms in the intermediate layers of the network for a completely different task: extending BN to a multivariate batch normalization. ",
336
+ "bbox": [
337
+ 173,
338
+ 486,
339
+ 823,
340
+ 513
341
+ ],
342
+ "page_idx": 3
343
+ },
344
+ {
345
+ "type": "text",
346
+ "text": "3 THE WHITENING MSE LOSS ",
347
+ "text_level": 1,
348
+ "bbox": [
349
+ 176,
350
+ 534,
351
+ 446,
352
+ 550
353
+ ],
354
+ "page_idx": 3
355
+ },
356
+ {
357
+ "type": "text",
358
+ "text": "Given an image $x$ , we extract an embedding $\\mathrm { ~ \\bf ~ z ~ } = \\mathrm { ~ \\bf ~ \\it ~ f ~ } ( x ; \\theta )$ using an encoder network $f ( \\cdot ; \\theta )$ parametrized with $\\theta$ (more details below). We require that: (1) the image embeddings are drawn from a non-degenerate distribution (the latter being a distribution where, e.g., all the representations collapse to a single point), and (2) positive image pairs $( x _ { i } , x _ { j } )$ , which share a similar semantics, should be clustered close to each other. We formulate this problem as follows: ",
359
+ "bbox": [
360
+ 173,
361
+ 564,
362
+ 825,
363
+ 635
364
+ ],
365
+ "page_idx": 3
366
+ },
367
+ {
368
+ "type": "equation",
369
+ "img_path": "images/30d72da0e98a5c371d2397190b73c3f5ebc19ca27011f812a7ab29fdc71e7c94.jpg",
370
+ "text": "$$\n\\begin{array} { c } { m i n _ { \\theta } \\operatorname { \\mathbb { E } } d i s t ( \\mathbf { z } _ { i } , \\mathbf { z } _ { j } ) , } \\\\ { s . t . c o v ( \\mathbf { z } _ { i } , \\mathbf { z } _ { i } ) = c o v ( \\mathbf { z } _ { j } , \\mathbf { z } _ { j } ) = I , } \\end{array}\n$$",
371
+ "text_format": "latex",
372
+ "bbox": [
373
+ 383,
374
+ 654,
375
+ 614,
376
+ 690
377
+ ],
378
+ "page_idx": 3
379
+ },
380
+ {
381
+ "type": "text",
382
+ "text": "where $d i s t ( \\cdot )$ is a distance between vectors, $I$ is the identity matrix and $( \\mathbf { z } _ { i } , \\mathbf { z } _ { j } )$ corresponds to a positive pair of images $( x _ { i } , x _ { j } )$ . With equation 4, we constrain the distribution of the $\\mathbf { z }$ values to be non-degenerate, hence avoiding that all the probability mass is concentrated in a single point. Moreover, equation 4 makes all the components of $\\mathbf { z }$ to be linearly independent from each other, which encourages the different dimensions of $\\mathbf { z }$ to represent different semantic content. We define the distance with the cosine similarity, implemented with MSE between normalized vectors: ",
383
+ "bbox": [
384
+ 174,
385
+ 695,
386
+ 825,
387
+ 780
388
+ ],
389
+ "page_idx": 3
390
+ },
391
+ {
392
+ "type": "equation",
393
+ "img_path": "images/64a3f2fce66c9fabe7cd11f9eeab3f4b08cf392f4b703cc4a4159a0d5227dfde.jpg",
394
+ "text": "$$\nd i s t ( \\mathbf { z } _ { i } , \\mathbf { z } _ { j } ) = \\left\\| { \\frac { \\mathbf { z } _ { i } } { \\left\\| \\mathbf { z } _ { i } \\right\\| _ { 2 } } } - { \\frac { \\mathbf { z } _ { j } } { \\left\\| \\mathbf { z } _ { j } \\right\\| _ { 2 } } } \\right\\| _ { 2 } ^ { 2 } = 2 - 2 { \\frac { \\langle \\mathbf { z } _ { i } , \\mathbf { z } _ { j } \\rangle } { \\left\\| \\mathbf { z } _ { i } \\right\\| _ { 2 } \\cdot \\left\\| \\mathbf { z } _ { j } \\right\\| _ { 2 } } }\n$$",
395
+ "text_format": "latex",
396
+ "bbox": [
397
+ 308,
398
+ 784,
399
+ 691,
400
+ 823
401
+ ],
402
+ "page_idx": 3
403
+ },
404
+ {
405
+ "type": "text",
406
+ "text": "In Appendix C we also include other experiments in which the cosine similarity is replaced by the Euclidean distance. We provide below the details on how positive image samples are collected, how they are encoded and how the above optimization is implemented. ",
407
+ "bbox": [
408
+ 174,
409
+ 832,
410
+ 825,
411
+ 875
412
+ ],
413
+ "page_idx": 3
414
+ },
415
+ {
416
+ "type": "text",
417
+ "text": "First, similarly to Chen et al. (2020), we obtain positive samples sharing the same semantics from a single image $x$ and using standard image transformation techniques. Specifically, we use a composition of image cropping, grayscaling and color jittering transformations $T ( \\cdot ; \\mathbf { p } )$ . The parameters $\\mathbf { \\tau } ( \\mathbf { p } )$ are selected uniformly at random and independently for each positive sample extracted from the same image: $x _ { i } = T ( x ; { \\mathbf p } _ { i } )$ . We concisely indicate with $p o s ( i , j )$ the fact that $x _ { i }$ and $x _ { j } ( x _ { i } , x _ { j } \\in B$ , $B$ the current batch) have been extracted from the same image. ",
418
+ "bbox": [
419
+ 174,
420
+ 881,
421
+ 823,
422
+ 924
423
+ ],
424
+ "page_idx": 3
425
+ },
426
+ {
427
+ "type": "image",
428
+ "img_path": "images/30fed903347f9275f5f14cd0634d881a6b9fc03086e82bb722a8a53a8a41ffdd.jpg",
429
+ "image_caption": [
430
+ "Figure 2: A scheme of our training procedure. First, $d$ $Q = 4$ in this case) positive samples are generated using augmentations. These images are transformed into vectors with the encoder $E ( \\cdot )$ . Next, they are projected onto a lower dimensional space with a projection head $g ( \\cdot )$ . Then, Whitening projects these vectors onto a spherical distribution, followed by an optional $L _ { 2 }$ normalization. Finally, the dashed curves show all the $d ( d - 1 ) / 2 = 6$ comparisons used in our W-MSE loss. "
431
+ ],
432
+ "image_footnote": [],
433
+ "bbox": [
434
+ 236,
435
+ 99,
436
+ 761,
437
+ 219
438
+ ],
439
+ "page_idx": 4
440
+ },
441
+ {
442
+ "type": "text",
443
+ "text": "",
444
+ "bbox": [
445
+ 174,
446
+ 321,
447
+ 825,
448
+ 364
449
+ ],
450
+ "page_idx": 4
451
+ },
452
+ {
453
+ "type": "text",
454
+ "text": "The number of positive samples per image $d$ may vary, trading off diversity in the batch and the amount of the training signal. Favoring more negatives, most of the methods use one positive pair $\\left[ d = 2 \\right.$ ). However, Ji et al. (2019) have demonstrated improved performance with 5 samples, while Caron et al. (2020) use 8 samples. In our MSE-based loss (see below), we use all the possible $d ( d - 1 ) / 2$ combinations of positive samples. We include experiments for $d = 2$ (1 positive pair) and $d = 4$ (6 positive pairs). ",
455
+ "bbox": [
456
+ 173,
457
+ 371,
458
+ 825,
459
+ 455
460
+ ],
461
+ "page_idx": 4
462
+ },
463
+ {
464
+ "type": "text",
465
+ "text": "For representation learning, we use a backbone encoder network $E ( \\cdot ) . E ( \\cdot )$ , trained without human supervision, will be used in Sec. 4 for evaluation using standard protocols. We use a standard ResNet-18 (He et al., 2016) as the encoder, and $\\mathbf { h } = E ( x )$ is the output of the average-pooling layer. This choice has the advantage to be simple and easily reproducible, in contrast to other methods which use encoder architectures specific for a given pretext task (see Sec. 2). Since $\\mathbf { h } \\in \\mathbb { R } ^ { 5 1 2 }$ is a high-dimensional vector, following Chen et al. (2020) we use a nonlinear projection head $g ( \\cdot )$ to project h in a lower dimensional space: $\\mathbf { v } = g ( \\mathbf { h } )$ , where $g ( \\cdot )$ is implemented with a MLP with one hidden layer and a BN layer. The whole network $f ( \\cdot )$ is given by the composition of $g ( \\cdot )$ with $E ( \\cdot )$ (see Fig. 2). ",
466
+ "bbox": [
467
+ 173,
468
+ 460,
469
+ 825,
470
+ 588
471
+ ],
472
+ "page_idx": 4
473
+ },
474
+ {
475
+ "type": "text",
476
+ "text": "Given $N$ original images and a batch of samples $B = \\{ x _ { 1 } , . . . x _ { K } \\}$ , where $K \\ : = \\ : N d$ , let $V =$ $\\left\\{ \\mathbf { v } _ { 1 } , \\ldots \\mathbf { v } _ { K } \\right\\}$ , be the corresponding batch of features obtained as described above. In the proposed W-MSE loss we compute the MSE over all $N d ( d { - } 1 ) / 2$ positive pairs, where constraint 4 is satisfied using the reparameterization of the $\\mathbf { v }$ variables with the whitened variables $\\mathbf { z }$ : ",
477
+ "bbox": [
478
+ 173,
479
+ 593,
480
+ 825,
481
+ 650
482
+ ],
483
+ "page_idx": 4
484
+ },
485
+ {
486
+ "type": "equation",
487
+ "img_path": "images/df8c5ace3f4e6908c1d2ecf424eaeca69c163617bcde0a6046166050c6b8b208.jpg",
488
+ "text": "$$\nL _ { W - M S E } ( V ) = \\frac { 2 } { N d ( d - 1 ) } \\sum _ { ( { \\bf v } _ { i } , { \\bf v } _ { j } ) \\in V , p o s ( i , j ) } d i s t ( { \\bf z } _ { i } , { \\bf z } _ { j } ) ,\n$$",
489
+ "text_format": "latex",
490
+ "bbox": [
491
+ 303,
492
+ 666,
493
+ 692,
494
+ 707
495
+ ],
496
+ "page_idx": 4
497
+ },
498
+ {
499
+ "type": "text",
500
+ "text": "where $\\mathbf { z } = W h i t e n i n g ( \\mathbf { v } )$ , and: ",
501
+ "bbox": [
502
+ 174,
503
+ 719,
504
+ 390,
505
+ 734
506
+ ],
507
+ "page_idx": 4
508
+ },
509
+ {
510
+ "type": "equation",
511
+ "img_path": "images/b4a3309d784ff6b3da37bca7dab87d2bd6b0664152c9e722b75ebad52d4b4981.jpg",
512
+ "text": "$$\nW h i t e n i n g ( \\mathbf { v } ) = W _ { V } ( \\mathbf { v } - { \\pmb \\mu } _ { V } ) .\n$$",
513
+ "text_format": "latex",
514
+ "bbox": [
515
+ 385,
516
+ 755,
517
+ 611,
518
+ 772
519
+ ],
520
+ "page_idx": 4
521
+ },
522
+ {
523
+ "type": "text",
524
+ "text": "In equation 7, $\\pmb { \\mu } _ { V }$ is the mean of the elements in $V$ : $\\begin{array} { r } { \\pmb { \\mu } _ { V } = \\frac { 1 } { K } \\sum _ { k } \\mathbf { v } _ { k } } \\end{array}$ , while the matrix $W _ { V }$ is such that: $W _ { V } ^ { \\top } W _ { V } = \\Sigma _ { V } ^ { - 1 }$ , being $\\Sigma _ { V }$ the covariance matrix of $V$ : ",
525
+ "bbox": [
526
+ 171,
527
+ 782,
528
+ 825,
529
+ 815
530
+ ],
531
+ "page_idx": 4
532
+ },
533
+ {
534
+ "type": "equation",
535
+ "img_path": "images/24f762961275719278600b5e97d497dbbd866c070b26a83fbc5616b98ad4927a.jpg",
536
+ "text": "$$\n\\boldsymbol { \\Sigma } _ { V } = \\frac { 1 } { K - 1 } \\sum _ { k } ( { \\bf v } _ { k } - { \\pmb \\mu } _ { V } ) ( { \\bf v } _ { k } - { \\pmb \\mu } _ { V } ) ^ { T } .\n$$",
537
+ "text_format": "latex",
538
+ "bbox": [
539
+ 356,
540
+ 832,
541
+ 642,
542
+ 869
543
+ ],
544
+ "page_idx": 4
545
+ },
546
+ {
547
+ "type": "text",
548
+ "text": "For more details on how $W _ { V }$ is computed, we refer to Appendix B. Equation 7 performs the full whitening of each $\\mathbf { v } _ { i } \\in V$ and the resulting set of vectors $Z = \\{ { \\bf z } _ { 1 } , . . . , { \\bf z } _ { K } \\}$ lies in a zero-centered distribution with a covariance matrix equal to the identity matrix (Fig. 1). ",
549
+ "bbox": [
550
+ 174,
551
+ 881,
552
+ 825,
553
+ 924
554
+ ],
555
+ "page_idx": 4
556
+ },
557
+ {
558
+ "type": "image",
559
+ "img_path": "images/670f016219ae719cc7b4ed09e98be2e40ee9566bbaefc881897287654761deab.jpg",
560
+ "image_caption": [
561
+ "Figure 3: Batch slicing. $V$ is first partitioned in $d$ parts $\\left( d = 2 \\right.$ in this example). We randomly permute the first part and we apply the same permutation to the other $d - 1$ parts. Then, we further split all the partitions and we create sub-batches $( V _ { i } )$ . Each $V _ { i }$ is independently used to compute the sub-batch specific whitening matrix $W _ { V } ^ { i }$ and centroid $\\mu _ { V } ^ { i }$ . "
562
+ ],
563
+ "image_footnote": [],
564
+ "bbox": [
565
+ 318,
566
+ 102,
567
+ 665,
568
+ 244
569
+ ],
570
+ "page_idx": 5
571
+ },
572
+ {
573
+ "type": "text",
574
+ "text": "The intuition behind the proposed loss is that equation 6 penalizes positives which are far apart from each other, thus leading $\\overset { \\cdot } { g } ( \\bar { E } ( \\cdot ) )$ to shrink the inter-positive distances. On the other hand, since $Z$ must lie in a spherical distribution, the other samples should be “moved” and rearranged in order to satisfy constraint 4 (see Fig. 1). ",
575
+ "bbox": [
576
+ 174,
577
+ 342,
578
+ 825,
579
+ 397
580
+ ],
581
+ "page_idx": 5
582
+ },
583
+ {
584
+ "type": "text",
585
+ "text": "Batch Slicing. The estimation of the Mean Square Error in equation 6 depends on the whitening matrix $W _ { V }$ , which may have a high variance over consecutive iteration batches $V _ { t } , V _ { t + 1 } , \\dots$ For this reason, inspired by the resampling methods (Efron, 1982), given a batch $V$ , we slice $V$ in different non-overlapping sub-batches and we compute a whitening matrix independently for each sub-batch. In more details, we first partition the batch in $d$ parts, being $d$ the number of positives extracted from one image. In this way, each partition contains elements extracted from different original images (i.e., no pair of positives is included in a single partition, see Fig. 3). Then, we randomly permute the elements of the each partition with the same permutation. Next, each partition is further split in sub-batches, using the heuristic that the size of each sub-batch $( V _ { i } )$ should be equal to the size of embedding (v) times 2 (this prevents instability issues when computing the covariance matrices). Next, for each $V _ { i }$ , we use only its elements to compute a corresponding whitening matrix $W _ { V } ^ { i }$ , which is used to whiten the elements of $V _ { i }$ only (Fig. 3). In the loss computation (equation 6), all the elements of all the sub-batches are used, thus implicitly alleviating the differences among the different whitening matrices. Finally, it is possible to repeat the whole operation several times and to average the result to get a more robust estimate of equation 6. ",
586
+ "bbox": [
587
+ 173,
588
+ 405,
589
+ 825,
590
+ 612
591
+ ],
592
+ "page_idx": 5
593
+ },
594
+ {
595
+ "type": "text",
596
+ "text": "3.1 DISCUSSION ",
597
+ "text_level": 1,
598
+ "bbox": [
599
+ 174,
600
+ 631,
601
+ 302,
602
+ 645
603
+ ],
604
+ "page_idx": 5
605
+ },
606
+ {
607
+ "type": "text",
608
+ "text": "In a common instance-discrimination task (Sec. 2), e.g., solved using equation 2, the similarity of a positive pair $( \\mathbf { z } _ { i } ^ { T } \\mathbf { z } _ { j } )$ is contrasted with the similarity computed with respect to all the other samples $( { \\bf z } _ { k } )$ in the batch $\\mathbf { \\langle z } _ { i } ^ { T } \\mathbf { z } _ { k } , 1 \\leq k \\leq K , k \\neq i )$ . However, $\\mathbf { z } _ { k }$ and $\\mathbf { z } _ { i }$ , extracted from different image instances, can occasionally share the same semantics (e.g., $x _ { i }$ and $x _ { k }$ are two different image instances of the unknown “cat” class). Conversely, the proposed W-MSE loss does not force all the instance samples to lie far from each other, but it only imposes a soft constraint (equation 4), which avoids degenerate distributions. ",
609
+ "bbox": [
610
+ 174,
611
+ 657,
612
+ 825,
613
+ 756
614
+ ],
615
+ "page_idx": 5
616
+ },
617
+ {
618
+ "type": "text",
619
+ "text": "Note that previous work (He et al., 2019; Henaff et al., 2019; Chen et al., 2020) highlighted that ´ BN may be harmful for learning semantically meaningful representations because the network can “cheat” and exploit the batch statistics in order to find a trivial solution to equation 2. However, our whitening transform (equation 7) is applied only to the very last layer of the network $f ( \\cdot )$ (see Fig. 2) and it is not used in the intermediate layers, which is instead the case of BN. Hence, our $f ( \\cdot )$ cannot learn to exploit subtle inter-sample dependencies introduced by batch-statistics because of the lack of other learnable layers on top of the $\\mathbf { z }$ features. ",
620
+ "bbox": [
621
+ 174,
622
+ 762,
623
+ 825,
624
+ 861
625
+ ],
626
+ "page_idx": 5
627
+ },
628
+ {
629
+ "type": "text",
630
+ "text": "Similarly to equation 6, in BYOL (Grill et al., 2020) an MSE loss is used to compare the latent representations of two positives computed by slightly different networks without contrasting positives with negatives (Sec. 2). However, the MSE loss alone is inclined to collapse the representations of all the images to a constant value, which would make the MSE computation equal to zero. In BYOL, both the projection and the prediction sub-networks have BN layers, and, very recently, (Fetterman & Albrecht, 2020; Tian et al., 2020) have empirically shown that BYOL, without these BN layers, generates collapsed latent-space representations with a close-to-chance level classification accuracy. The reason of this behaviour seems to depend on the fact that the feature standardization in BN scatters the $\\mathbf { z }$ values in a batch and avoids constant representations. Our W-MSE can be seen as a generalization of this implicit property of BYOL, in which the $\\mathbf { z }$ values of the current batch are full-whitened, so preventing possible collapsing effects of the MSE loss. Importantly, we reach this result without the need of a target network or sophisticated training protocols. ",
631
+ "bbox": [
632
+ 176,
633
+ 867,
634
+ 823,
635
+ 924
636
+ ],
637
+ "page_idx": 5
638
+ },
639
+ {
640
+ "type": "text",
641
+ "text": "",
642
+ "bbox": [
643
+ 174,
644
+ 103,
645
+ 825,
646
+ 215
647
+ ],
648
+ "page_idx": 6
649
+ },
650
+ {
651
+ "type": "text",
652
+ "text": "Finally, note that using BN alone without whitening, as in W-MSE, and without additional networks, as in BYOL, is not sufficient. Indeed, if we just minimize an MSE after feature standardization, the network can easily find a solution where all the dimensions of the embedding represent the same feature. We have empirically verified this behaviour in preliminary experiments based on standardization, in which the network converges to a zero loss value after a few epochs but with a low classification accuracy. ",
653
+ "bbox": [
654
+ 174,
655
+ 222,
656
+ 825,
657
+ 305
658
+ ],
659
+ "page_idx": 6
660
+ },
661
+ {
662
+ "type": "text",
663
+ "text": "4 EXPERIMENTS ",
664
+ "text_level": 1,
665
+ "bbox": [
666
+ 176,
667
+ 327,
668
+ 326,
669
+ 343
670
+ ],
671
+ "page_idx": 6
672
+ },
673
+ {
674
+ "type": "text",
675
+ "text": "We test our loss and its competitors on the following datasets. ",
676
+ "bbox": [
677
+ 174,
678
+ 359,
679
+ 581,
680
+ 375
681
+ ],
682
+ "page_idx": 6
683
+ },
684
+ {
685
+ "type": "text",
686
+ "text": "• CIFAR-10 and CIFAR-100 (Krizhevsky & Hinton, 2009), two small-scale datasets composed of $3 2 \\times 3 2$ images with 10 and 100 classes, respectively. \n• Tiny ImageNet (Le & Yang, 2015), a reduced version of ImageNet, composed of 200 classes with images scaled down to $6 4 \\times 6 4$ . The total number of images is: 100K (training) and 10K (testing). STL-10 (Coates et al., 2011), also derived from ImageNet, with $9 6 \\times 9 6$ resolution images. While CIFAR-10, CIFAR-100 and Tiny ImageNet are fully-labeled, STL-10 is composed of 5K labeled training samples (500 per class) and 100K unlabeled training examples from a similar but broader distribution of images. There are additional 8K labeled testing images. \n• ImageNet-100, a random 100-class subset of ImageNet (the list of the 100 classes is published in (Wang & Isola, 2020)), consisting of unaltered ImageNet images. ",
687
+ "bbox": [
688
+ 215,
689
+ 388,
690
+ 825,
691
+ 561
692
+ ],
693
+ "page_idx": 6
694
+ },
695
+ {
696
+ "type": "text",
697
+ "text": "Setting. The goal of our experiments is to compare W-MSE with state-of-the-art losses, isolating the effects of other settings, such as the architectural choices. For this reason, we use the same encoder $E ( \\cdot )$ ResNet-18 for all the experiments. We independently select the best hyperparameter values for every method and every dataset. Each method uses $L _ { 2 }$ feature normalization unless otherwise stated. Contrastive refers to our implementation of the contrastive loss (equation 2) following the details in (Chen et al., 2020), with temperature $\\tau = 0 . 5$ . BYOL is our reproduction of (Grill et al., 2020), introduced concurrently with our work. For this method we use the exponential moving average with cosine increasing, starting from 0.99. W-MSE 2 and W-MSE 4 correspond to our method with $d = 2$ and $d = 4$ positives extracted per image, respectively. For CIFAR-10 and CIFAR-100, the slicing sub-batch size is 128, for Tiny ImageNet and STL-10, it is 256. For experiments W-MSE 2 for Tiny ImageNet and STL-10 we use 4 iterations of batch slicing, for all other experiments we use 1 iteration. ",
698
+ "bbox": [
699
+ 173,
700
+ 575,
701
+ 825,
702
+ 742
703
+ ],
704
+ "page_idx": 6
705
+ },
706
+ {
707
+ "type": "text",
708
+ "text": "In all the experiments, we use the Adam optimizer (Kingma & Ba, 2014). For all the tested methods (including ours), we use the same number of epochs and the same learning rate schedule. Specifically, for CIFAR-10 and CIFAR-100, we use 1,000 epochs with learning rate $3 \\times 1 0 ^ { - 3 }$ ; for Tiny ImageNet, 1,000 epochs with learning rate $2 \\times 1 0 ^ { - 3 }$ ; for STL-10, 2,000 epochs with learning rate $2 \\times \\mathrm { 1 0 ^ { - 3 } }$ . We use learning rate warm-up for the first 500 iterations of the optimizer, and a 0.2 learning rate drop 50 and 25 epochs before the end. We use a mini-batch size of $K = 1 0 2 4$ samples. The dimension of the hidden layer of the projection head $g ( \\cdot )$ is 1024. The weight decay is $1 \\bar { 0 } ^ { - 6 }$ . Finally, we use an embedding size of 64 for CIFAR-10 and CIFAR-100, and an embedding of size of 128 for STL-10 and Tiny ImageNet. For ImageNet-100 we use a configuration similar to the Tiny ImageNet experiments, and 240 epochs of training. ",
709
+ "bbox": [
710
+ 174,
711
+ 750,
712
+ 825,
713
+ 888
714
+ ],
715
+ "page_idx": 6
716
+ },
717
+ {
718
+ "type": "text",
719
+ "text": "As a common practice when using ResNet-like architectures for small-size image resolutions, in all the experiments, except ImageNet-100, we have a first convolutional layer with kernel size 3, stride 1 and padding 1. Additionally, in case of CIFAR-10 and CIFAR-100, we remove the first max pooling layer. ",
720
+ "bbox": [
721
+ 173,
722
+ 895,
723
+ 823,
724
+ 924
725
+ ],
726
+ "page_idx": 6
727
+ },
728
+ {
729
+ "type": "table",
730
+ "img_path": "images/bb45fa6fa8652c6f2c393511f1f90725ffe31605855f3e3d19b82df58bd95096.jpg",
731
+ "table_caption": [
732
+ "Table 1: Classification accuracy (top 1) of a linear classifier and a 5-nearest neighbors classifier for different loss functions and datasets with a ResNet-18 encoder. "
733
+ ],
734
+ "table_footnote": [],
735
+ "table_body": "<table><tr><td rowspan=\"2\">Method</td><td colspan=\"2\">CIFAR-10</td><td rowspan=\"2\">CIFAR-100</td><td colspan=\"2\">STL-10</td><td rowspan=\"2\"></td><td colspan=\"2\"> Tiny ImageNet</td></tr><tr><td>linear</td><td>5-nn</td><td>linear 5-nn</td><td>linear</td><td>5-nn linear</td><td>5-nn</td></tr><tr><td>Contrastive</td><td>91.80</td><td>88.42</td><td>66.83</td><td>56.56</td><td>90.51</td><td>85.68</td><td>48.84</td><td>32.86</td></tr><tr><td>BYOL</td><td>91.73</td><td>89.45</td><td>66.60</td><td>56.82</td><td>91.99</td><td>88.64</td><td>51.00</td><td>36.24</td></tr><tr><td>W-MSE 2</td><td>91.55</td><td>89.69</td><td>66.10</td><td>56.69</td><td>90.36</td><td>87.10</td><td>48.20</td><td>34.16</td></tr><tr><td>W-MSE 4</td><td>91.99</td><td>89.87</td><td>67.64</td><td>56.45</td><td>91.75</td><td>88.59</td><td>49.22</td><td>35.44</td></tr></table>",
736
+ "bbox": [
737
+ 222,
738
+ 133,
739
+ 776,
740
+ 247
741
+ ],
742
+ "page_idx": 7
743
+ },
744
+ {
745
+ "type": "table",
746
+ "img_path": "images/3b212b9e82f350eb8213f1000f5d267fa44359e5362bc3fed3290b943b75fbc8.jpg",
747
+ "table_caption": [
748
+ "Table 2: Classification accuracy on ImageNet-100. W-MSE (2 and 4) are based on a ResNet-18 encoder. † indicates that the results are based on a ResNet-50 encoder and the values are reported from (Wang & Isola, 2020). "
749
+ ],
750
+ "table_footnote": [],
751
+ "table_body": "<table><tr><td>Method</td><td>linear (top 1)</td><td>linear (top 5)</td><td>5-nn</td></tr><tr><td>MoCot</td><td>72.80</td><td>91.64</td><td>1</td></tr><tr><td>Lalign and Luniform +</td><td>74.60</td><td>92.74</td><td>1</td></tr><tr><td>W-MSE 2</td><td>76.00</td><td>93.14</td><td>67.04</td></tr><tr><td>W-MSE 4</td><td>79.02</td><td>94.46</td><td>71.32</td></tr></table>",
752
+ "bbox": [
753
+ 289,
754
+ 314,
755
+ 707,
756
+ 410
757
+ ],
758
+ "page_idx": 7
759
+ },
760
+ {
761
+ "type": "text",
762
+ "text": "",
763
+ "bbox": [
764
+ 174,
765
+ 441,
766
+ 823,
767
+ 469
768
+ ],
769
+ "page_idx": 7
770
+ },
771
+ {
772
+ "type": "text",
773
+ "text": "Image Transformation Details. We extract crops with a random size from 0.2 to 1.0 of the original area and a random aspect ratio from $3 / 4$ to $4 / 3$ of the original aspect ratio, which is a commonly used data-augmentation technique. We also apply horizontal mirroring with probability 0.5. Finally, we apply color jittering with configuration $( 0 . 4 , 0 . 4 , 0 . 4 , 0 . 1 )$ with probability 0.8 and grayscaling with probability 0.1. For ImageNet-100 we follow details in (Chen et al., 2020): crop size from 0.08 to 1.0, stronger jittering (0.8, 0.8, 0.8, 0.2), grayscaling probability 0.2, and Gaussian blurring with 0.5 probability. ",
774
+ "bbox": [
775
+ 173,
776
+ 477,
777
+ 825,
778
+ 574
779
+ ],
780
+ "page_idx": 7
781
+ },
782
+ {
783
+ "type": "text",
784
+ "text": "Evaluation Protocol. The most common evaluation protocol for unsupervised feature learning is based on freezing the network encoder $( E ( \\cdot )$ , in our case) after unsupervised pre-training, and then train a supervised linear classifier on top of it. Specifically, the linear classifier is a fully-connected layer followed by softmax, which is placed on top of $E ( \\cdot )$ after removing the projection head $g ( \\cdot )$ . In all the experiments we train the linear classifier for 500 epochs using the Adam optimizer and the labeled training set of each specific dataset, without data augmentation. The learning rate is exponentially decayed from $1 0 ^ { - 2 }$ to $1 0 ^ { - 6 }$ . The weight decay is $5 \\times 1 0 ^ { - 6 }$ . ",
785
+ "bbox": [
786
+ 173,
787
+ 582,
788
+ 825,
789
+ 679
790
+ ],
791
+ "page_idx": 7
792
+ },
793
+ {
794
+ "type": "text",
795
+ "text": "In our experiments, we also include the accuracy of a $\\mathbf { k }$ -nearest neighbors classifier (k-nn, $k = 5$ ). The advantage of using this classifier is that it does not require additional parameters and training, and it is deterministic. ",
796
+ "bbox": [
797
+ 174,
798
+ 685,
799
+ 825,
800
+ 728
801
+ ],
802
+ "page_idx": 7
803
+ },
804
+ {
805
+ "type": "text",
806
+ "text": "4.1 COMPARISON WITH THE STATE OF THE ART ",
807
+ "text_level": 1,
808
+ "bbox": [
809
+ 174,
810
+ 744,
811
+ 516,
812
+ 758
813
+ ],
814
+ "page_idx": 7
815
+ },
816
+ {
817
+ "type": "text",
818
+ "text": "Tab. 1 shows the results of the experiments on small and medium size datasets. For W-MSE, 4 samples are generally better than 2. The contrastive loss performs the worst in most cases. The W-MSE 4 accuracy is the best on CIFAR-10 and CIFAR-100, while BYOL leads on STL-10 and Tiny ImageNet, although the gap between the two methods is minor. In Appendix A, we plot the linear classification accuracy during training for the STL-10 dataset. The plot shows that W-MSE 4 and BYOL have a similar performance during most of the training. However, in the first 120 epochs, BYOL significantly underperforms W-MSE 4 (e.g., the accuracy after 20 epochs: W-MSE 4, $7 9 . 9 8 \\%$ ; BYOL, $7 3 . 2 4 \\%$ ), indicating that BYOL requires a “warmup” period. On the other hand, W-MSE performs well from the beginning. This property is useful in those domains which require a rapid adaptation of the encoder, e.g., due to the change of the data distribution in continual learning or in reinforcement learning. ",
819
+ "bbox": [
820
+ 173,
821
+ 770,
822
+ 825,
823
+ 924
824
+ ],
825
+ "page_idx": 7
826
+ },
827
+ {
828
+ "type": "text",
829
+ "text": "Tab. 2 shows the results on a larger dataset (ImageNet-100). In that table, MoCo is the contrastiveloss based method proposed in (He et al., 2019), where a momentum encoder and a large queue of negatives are used to improve the contrast of the positive pairs with respect to the other samples (see Sec. 2). $\\mathcal { L } _ { \\mathrm { a l i g n } }$ and ${ \\mathcal { L } } _ { \\mathrm { u n i f o r m } }$ are the two losses proposed in (Wang & Isola, 2020) (Sec. 2). Note that, while W-MSE (2 and 4) in Tab. 2 refer to our method with a ResNet-18 encoder, the other results are reported from (Wang & Isola, 2020), where a much larger-capacity network (i.e., a ResNet-50) is used as the encoder. Despite this large difference in the encoder capacity, both versions of W-MSE significantly outperform the other two compared methods in this dataset. ",
830
+ "bbox": [
831
+ 173,
832
+ 103,
833
+ 825,
834
+ 215
835
+ ],
836
+ "page_idx": 8
837
+ },
838
+ {
839
+ "type": "text",
840
+ "text": "4.2 TRAINING TIME COMPLEXITY ",
841
+ "text_level": 1,
842
+ "bbox": [
843
+ 176,
844
+ 232,
845
+ 419,
846
+ 246
847
+ ],
848
+ "page_idx": 8
849
+ },
850
+ {
851
+ "type": "text",
852
+ "text": "Following (Siarohin et al., 2019), the complexity of the whitening transform is $O ( k ^ { 3 } + M k ^ { 2 } )$ , where $k$ is the embedding dimension and $M$ is the size of the sub-batch used in the batch slicing process. Since $k < M$ (see Sec. 3), the whitening transform is $O ( M k ^ { 2 } )$ , which is basically equivalent to the forward pass of $M$ activations in a fully-connected layer connecting two layers of $k$ neurons each. In fact, the training time is dominated by other architectural choices which are usually more computationally demanding than the loss computation. For instance, BYOL (Grill et al., 2020) needs 4 forward passes through 2 networks for each pair of positives. Hence, to evaluate the wallclock time, we measure the time spent for one mini-batch iteration by all the methods compared in Tab. 1. We use the STL-10 dataset, a ResNet-18 encoder and a server with one Nvidia Titan $\\mathrm { X p }$ GPU. Time of one iteration: Contrastive - 459ms, BYOL - 602ms, W-MSE 2 - 478ms, W-MSE 4 - $4 9 3 \\mathrm { m s }$ . The $1 9 \\mathrm { m s }$ difference between Contrastive and W-MSE 2 is due to the whitening transform. Since the factual time is mostly related to the sample forward and backward passes, the $d ( d - 1 )$ positive comparisons in equation 6 do not significantly increase the wall-clock time of W-MSE 4 with respect to W-MSE 2. ",
853
+ "bbox": [
854
+ 173,
855
+ 258,
856
+ 825,
857
+ 452
858
+ ],
859
+ "page_idx": 8
860
+ },
861
+ {
862
+ "type": "text",
863
+ "text": "4.3 CONTRASTIVE LOSS WITH WHITENING ",
864
+ "text_level": 1,
865
+ "bbox": [
866
+ 176,
867
+ 470,
868
+ 482,
869
+ 484
870
+ ],
871
+ "page_idx": 8
872
+ },
873
+ {
874
+ "type": "table",
875
+ "img_path": "images/24450ef1a580db46f30fd514a144d0633fe1025690c2dcc174a01f7f67b8453b.jpg",
876
+ "table_caption": [
877
+ "Table 3: Accuracy of the whitened contrastive loss on CIFAR-10 trained for 200 epochs. "
878
+ ],
879
+ "table_footnote": [],
880
+ "table_body": "<table><tr><td>Method</td><td>linear</td><td>5-nn</td></tr><tr><td>Contrastive</td><td>89.66</td><td>86.55</td></tr><tr><td>Contrastive with Whitening</td><td colspan=\"2\">diverged</td></tr><tr><td>Contrastive,unnormalized features</td><td>79.48</td><td>76.60</td></tr><tr><td>Contrastive with Whitening,unnormalized features</td><td>77.39</td><td>74.14</td></tr></table>",
881
+ "bbox": [
882
+ 263,
883
+ 518,
884
+ 735,
885
+ 598
886
+ ],
887
+ "page_idx": 8
888
+ },
889
+ {
890
+ "type": "text",
891
+ "text": "In this section, we analyse the effect of the whitening transform in combination with the contrastive loss. Tab. 3 shows the results. The first row refers to the standard contrastive loss. Note that the difference with respect to Tab.1 is due to the use of only 200 training epochs. The second row refers to equation 2, where the features $\\mathbf { \\rho } ( \\mathbf { z } )$ are computed using equation 7 and then $L _ { 2 }$ normalized, while in the last two rows, $\\mathbf { z }$ is not normalized. If the features are whitened and then normalized, we observed an unstable training, with divergence after a few epochs. The unnormalized version with whitening converged, but its accuracy is worse than the standard contrastive loss (both normalized and unnormalized). This experiments show that whitening itself does not improve the performance, but it only allows to satisfy the constraint 4. ",
892
+ "bbox": [
893
+ 173,
894
+ 621,
895
+ 825,
896
+ 746
897
+ ],
898
+ "page_idx": 8
899
+ },
900
+ {
901
+ "type": "text",
902
+ "text": "5 CONCLUSION ",
903
+ "text_level": 1,
904
+ "bbox": [
905
+ 176,
906
+ 767,
907
+ 318,
908
+ 782
909
+ ],
910
+ "page_idx": 8
911
+ },
912
+ {
913
+ "type": "text",
914
+ "text": "In this paper, we have proposed a new self-supervised representation learning loss, W-MSE, which is alternative to common loss functions used in the field. Differently from the triplet loss and the contrastive loss, both of which are based on comparing an instance-level similarity against other samples, W-MSE computes only the intra-positive distances, while using a whitening transform to avoid degenerate solutions. Despite W-MSE is very simple, its classification accuracy is comparable with state-of-the-art methods, achieving results significantly higher than MoCo, which requires an additional momentum encoder and a large queue of past samples. W-MSE is also comparable with BYOL, which needs an additional target network and a specific training protocol. We believe that the use of whitening to avoid collapsing effects can inspire other self-supervised methods. ",
915
+ "bbox": [
916
+ 174,
917
+ 797,
918
+ 825,
919
+ 924
920
+ ],
921
+ "page_idx": 8
922
+ },
923
+ {
924
+ "type": "text",
925
+ "text": "REFERENCES ",
926
+ "text_level": 1,
927
+ "bbox": [
928
+ 174,
929
+ 103,
930
+ 287,
931
+ 118
932
+ ],
933
+ "page_idx": 9
934
+ },
935
+ {
936
+ "type": "text",
937
+ "text": "Philip Bachman, R. Devon Hjelm, and William Buchwalter. Learning representations by maximizing mutual information across views. In NeurIPS, 2019. ",
938
+ "bbox": [
939
+ 176,
940
+ 126,
941
+ 821,
942
+ 155
943
+ ],
944
+ "page_idx": 9
945
+ },
946
+ {
947
+ "type": "text",
948
+ "text": "Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by contrasting cluster assignments, 2020. ",
949
+ "bbox": [
950
+ 176,
951
+ 161,
952
+ 821,
953
+ 191
954
+ ],
955
+ "page_idx": 9
956
+ },
957
+ {
958
+ "type": "text",
959
+ "text": "Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations, 2020. ",
960
+ "bbox": [
961
+ 174,
962
+ 199,
963
+ 821,
964
+ 228
965
+ ],
966
+ "page_idx": 9
967
+ },
968
+ {
969
+ "type": "text",
970
+ "text": "Adam Coates, Andrew Y. Ng, and Honglak Lee. An analysis of single-layer networks in unsupervised feature learning. In AISTATS, 2011. ",
971
+ "bbox": [
972
+ 174,
973
+ 236,
974
+ 821,
975
+ 266
976
+ ],
977
+ "page_idx": 9
978
+ },
979
+ {
980
+ "type": "text",
981
+ "text": "Dariusz Dereniowski and Kubale Marek. Cholesky factorization of matrices in parallel and ranking of graphs. In 5th Int. Conference on Parallel Processing and Applied Mathematics, 2004. ",
982
+ "bbox": [
983
+ 176,
984
+ 273,
985
+ 823,
986
+ 304
987
+ ],
988
+ "page_idx": 9
989
+ },
990
+ {
991
+ "type": "text",
992
+ "text": "Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In NAACL,, 2019. ",
993
+ "bbox": [
994
+ 176,
995
+ 310,
996
+ 823,
997
+ 340
998
+ ],
999
+ "page_idx": 9
1000
+ },
1001
+ {
1002
+ "type": "text",
1003
+ "text": "Jeff Donahue and Karen Simonyan. Large scale adversarial representation learning. In NeurIPS, 2019. ",
1004
+ "bbox": [
1005
+ 176,
1006
+ 347,
1007
+ 823,
1008
+ 377
1009
+ ],
1010
+ "page_idx": 9
1011
+ },
1012
+ {
1013
+ "type": "text",
1014
+ "text": "Jeff Donahue, Philipp Krahenb ¨ uhl, and Trevor Darrell. Adversarial feature learning. In ¨ ICLR, 2017. ",
1015
+ "bbox": [
1016
+ 173,
1017
+ 385,
1018
+ 821,
1019
+ 400
1020
+ ],
1021
+ "page_idx": 9
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "Debidatta Dwibedi, Yusuf Aytar, Jonathan Tompson, Pierre Sermanet, and Andrew Zisserman. Temporal cycle-consistency learning. In CVPR, 2019. ",
1026
+ "bbox": [
1027
+ 174,
1028
+ 409,
1029
+ 820,
1030
+ 438
1031
+ ],
1032
+ "page_idx": 9
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "Bradley Efron. The jackknife, the bootstrap, and other resampling plans, volume 38. Siam, 1982. ",
1037
+ "bbox": [
1038
+ 171,
1039
+ 445,
1040
+ 810,
1041
+ 462
1042
+ ],
1043
+ "page_idx": 9
1044
+ },
1045
+ {
1046
+ "type": "text",
1047
+ "text": "Abe Fetterman and Josh Albrecht. Understanding self-supervised and contrastive learning with bootstrap your own latent (BYOL). https://untitled-ai.github.io/understanding-self-supervisedcontrastive-learning.html, 2020. ",
1048
+ "bbox": [
1049
+ 176,
1050
+ 468,
1051
+ 820,
1052
+ 511
1053
+ ],
1054
+ "page_idx": 9
1055
+ },
1056
+ {
1057
+ "type": "text",
1058
+ "text": "Jean-Bastien Grill, Florian Strub, Florent Altche, Corentin Tallec, Pierre H. Richemond, Elena ´ Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Daniel Guo, Mohammad Gheshlaghi Azar, Bilal Piot, Koray Kavukcuoglu, Remi Munos, and Michal Valko. Bootstrap your own ´ latent: A new approach to self-supervised learning, 2020. ",
1059
+ "bbox": [
1060
+ 173,
1061
+ 518,
1062
+ 823,
1063
+ 577
1064
+ ],
1065
+ "page_idx": 9
1066
+ },
1067
+ {
1068
+ "type": "text",
1069
+ "text": "Michael Gutmann and Aapo Hyvarinen. Noise-contrastive estimation: A new estimation principle ¨ for unnormalized statistical models. In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, 2010. ",
1070
+ "bbox": [
1071
+ 174,
1072
+ 584,
1073
+ 823,
1074
+ 627
1075
+ ],
1076
+ "page_idx": 9
1077
+ },
1078
+ {
1079
+ "type": "text",
1080
+ "text": "Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In CVPR, 2006. ",
1081
+ "bbox": [
1082
+ 173,
1083
+ 635,
1084
+ 823,
1085
+ 665
1086
+ ],
1087
+ "page_idx": 9
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pp. 770–778, 2016. ",
1092
+ "bbox": [
1093
+ 173,
1094
+ 671,
1095
+ 821,
1096
+ 702
1097
+ ],
1098
+ "page_idx": 9
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. arXiv:1911.05722, 2019. ",
1103
+ "bbox": [
1104
+ 174,
1105
+ 709,
1106
+ 823,
1107
+ 738
1108
+ ],
1109
+ "page_idx": 9
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "Olivier J. Henaff, Ali Razavi, Carl Doersch, S. M. Ali Eslami, and A ´ aron van den Oord. Data- ¨ efficient image recognition with contrastive predictive coding. arXiv:1905.09272, 2019. ",
1114
+ "bbox": [
1115
+ 171,
1116
+ 746,
1117
+ 821,
1118
+ 776
1119
+ ],
1120
+ "page_idx": 9
1121
+ },
1122
+ {
1123
+ "type": "text",
1124
+ "text": "Alexander Hermans, Lucas Beyer, and Bastian Leibe. In defense of the triplet loss for person reidentification. arXiv:1703.07737, 2017. ",
1125
+ "bbox": [
1126
+ 173,
1127
+ 784,
1128
+ 820,
1129
+ 814
1130
+ ],
1131
+ "page_idx": 9
1132
+ },
1133
+ {
1134
+ "type": "text",
1135
+ "text": "R. Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Philip Bachman, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. In ICLR, 2019. ",
1136
+ "bbox": [
1137
+ 176,
1138
+ 820,
1139
+ 821,
1140
+ 864
1141
+ ],
1142
+ "page_idx": 9
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "Lei Huang, Dawei Yang, Bo Lang, and Jia Deng. Decorrelated batch normalization. In CVPR, 2018. ",
1147
+ "bbox": [
1148
+ 173,
1149
+ 872,
1150
+ 820,
1151
+ 887
1152
+ ],
1153
+ "page_idx": 9
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. ",
1158
+ "bbox": [
1159
+ 173,
1160
+ 895,
1161
+ 823,
1162
+ 924
1163
+ ],
1164
+ "page_idx": 9
1165
+ },
1166
+ {
1167
+ "type": "text",
1168
+ "text": "Xu Ji, Joao F. Henriques, and Andrea Vedaldi. Invariant information clustering for unsupervised ˜ image classification and segmentation. In ICCV, 2019. ",
1169
+ "bbox": [
1170
+ 171,
1171
+ 103,
1172
+ 825,
1173
+ 132
1174
+ ],
1175
+ "page_idx": 10
1176
+ },
1177
+ {
1178
+ "type": "text",
1179
+ "text": "Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization, 2014. ",
1180
+ "bbox": [
1181
+ 173,
1182
+ 140,
1183
+ 753,
1184
+ 156
1185
+ ],
1186
+ "page_idx": 10
1187
+ },
1188
+ {
1189
+ "type": "text",
1190
+ "text": "Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical Report, 2009. ",
1191
+ "bbox": [
1192
+ 173,
1193
+ 165,
1194
+ 823,
1195
+ 194
1196
+ ],
1197
+ "page_idx": 10
1198
+ },
1199
+ {
1200
+ "type": "text",
1201
+ "text": "Ya Le and Xuan Yang. Tiny imagenet visual recognition challenge. 2015. ",
1202
+ "bbox": [
1203
+ 174,
1204
+ 202,
1205
+ 658,
1206
+ 218
1207
+ ],
1208
+ "page_idx": 10
1209
+ },
1210
+ {
1211
+ "type": "text",
1212
+ "text": "Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. arXiv:1301.3781, 2013a. ",
1213
+ "bbox": [
1214
+ 173,
1215
+ 226,
1216
+ 823,
1217
+ 256
1218
+ ],
1219
+ "page_idx": 10
1220
+ },
1221
+ {
1222
+ "type": "text",
1223
+ "text": "Tomas Mikolov, Ilya Sutskever, Kai Chen, Gregory S. Corrado, and Jeffrey Dean. Distributed representations of words and phrases and their compositionality. In NIPS, 2013b. ",
1224
+ "bbox": [
1225
+ 171,
1226
+ 263,
1227
+ 825,
1228
+ 294
1229
+ ],
1230
+ "page_idx": 10
1231
+ },
1232
+ {
1233
+ "type": "text",
1234
+ "text": "Ishan Misra and Laurens van der Maaten. Self-supervised learning of pretext-invariant representations. arXiv:1912.01991, 2019. ",
1235
+ "bbox": [
1236
+ 171,
1237
+ 301,
1238
+ 823,
1239
+ 332
1240
+ ],
1241
+ "page_idx": 10
1242
+ },
1243
+ {
1244
+ "type": "text",
1245
+ "text": "Ishan Misra, C. Lawrence Zitnick, and Martial Hebert. Shuffle and learn: Unsupervised learning using temporal order verification. In ECCV, 2016. ",
1246
+ "bbox": [
1247
+ 171,
1248
+ 339,
1249
+ 823,
1250
+ 369
1251
+ ],
1252
+ "page_idx": 10
1253
+ },
1254
+ {
1255
+ "type": "text",
1256
+ "text": "Mehdi Noroozi and Paolo Favaro. Unsupervised learning of visual representations by solving jigsaw puzzles. In ECCV, 2016. ",
1257
+ "bbox": [
1258
+ 171,
1259
+ 377,
1260
+ 823,
1261
+ 406
1262
+ ],
1263
+ "page_idx": 10
1264
+ },
1265
+ {
1266
+ "type": "text",
1267
+ "text": "Deepak Pathak, Philipp Krahenb ¨ uhl, Jeff Donahue, Trevor Darrell, and Alexei A. Efros. Context ¨ encoders: Feature learning by inpainting. CVPR, 2016. ",
1268
+ "bbox": [
1269
+ 171,
1270
+ 415,
1271
+ 823,
1272
+ 445
1273
+ ],
1274
+ "page_idx": 10
1275
+ },
1276
+ {
1277
+ "type": "text",
1278
+ "text": "Mirco Ravanelli and Yoshua Bengio. Learning speaker representations with mutual information. arXiv:1812.00271, 2018. ",
1279
+ "bbox": [
1280
+ 171,
1281
+ 452,
1282
+ 823,
1283
+ 482
1284
+ ],
1285
+ "page_idx": 10
1286
+ },
1287
+ {
1288
+ "type": "text",
1289
+ "text": "Florian Schroff, Dmitry Kalenichenko, and James Philbin. FaceNet: A unified embedding for face recognition and clustering. In CVPR, 2015. ",
1290
+ "bbox": [
1291
+ 173,
1292
+ 489,
1293
+ 823,
1294
+ 520
1295
+ ],
1296
+ "page_idx": 10
1297
+ },
1298
+ {
1299
+ "type": "text",
1300
+ "text": "Aliaksandr Siarohin, Enver Sangineto, and Nicu Sebe. Whitening and coloring transform for GANs. In International Conference on Learning Representations, 2019. ",
1301
+ "bbox": [
1302
+ 171,
1303
+ 527,
1304
+ 823,
1305
+ 558
1306
+ ],
1307
+ "page_idx": 10
1308
+ },
1309
+ {
1310
+ "type": "text",
1311
+ "text": "Kihyuk Sohn. Improved deep metric learning with multi-class n-pair loss objective. In NIPS, 2016. ",
1312
+ "bbox": [
1313
+ 173,
1314
+ 565,
1315
+ 823,
1316
+ 582
1317
+ ],
1318
+ "page_idx": 10
1319
+ },
1320
+ {
1321
+ "type": "text",
1322
+ "text": "Yuandong Tian, Lantao Yu, Xinlei Chen, and Surya Ganguli. Understanding self-supervised learning with dual deep networks. arXiv:2010.00578, 2020. ",
1323
+ "bbox": [
1324
+ 173,
1325
+ 589,
1326
+ 823,
1327
+ 619
1328
+ ],
1329
+ "page_idx": 10
1330
+ },
1331
+ {
1332
+ "type": "text",
1333
+ "text": "Michael Tschannen, Josip Djolonga, Paul K. Rubenstein, Sylvain Gelly, and Mario Lucic. On mutual information maximization for representation learning. arXiv:1907.13625, 2019. ",
1334
+ "bbox": [
1335
+ 171,
1336
+ 627,
1337
+ 825,
1338
+ 657
1339
+ ],
1340
+ "page_idx": 10
1341
+ },
1342
+ {
1343
+ "type": "text",
1344
+ "text": "Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predic- ¨ tive coding. arXiv:1807.03748, 2018. ",
1345
+ "bbox": [
1346
+ 171,
1347
+ 665,
1348
+ 823,
1349
+ 695
1350
+ ],
1351
+ "page_idx": 10
1352
+ },
1353
+ {
1354
+ "type": "text",
1355
+ "text": "Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In ICML, 2008. ",
1356
+ "bbox": [
1357
+ 171,
1358
+ 703,
1359
+ 823,
1360
+ 733
1361
+ ],
1362
+ "page_idx": 10
1363
+ },
1364
+ {
1365
+ "type": "text",
1366
+ "text": "Tongzhou Wang and Phillip Isola. Understanding contrastive representation learning through alignment and uniformity on the hypersphere. In International Conference on Machine Learning, 2020. ",
1367
+ "bbox": [
1368
+ 176,
1369
+ 741,
1370
+ 823,
1371
+ 784
1372
+ ],
1373
+ "page_idx": 10
1374
+ },
1375
+ {
1376
+ "type": "text",
1377
+ "text": "Xiaolong Wang and Abhinav Gupta. Unsupervised learning of visual representations using videos. In ICCV, 2015. ",
1378
+ "bbox": [
1379
+ 173,
1380
+ 792,
1381
+ 821,
1382
+ 821
1383
+ ],
1384
+ "page_idx": 10
1385
+ },
1386
+ {
1387
+ "type": "text",
1388
+ "text": "Zhirong Wu, Yuanjun Xiong, Stella Yu, and Dahua Lin. Unsupervised feature learning via nonparametric instance-level discrimination. arXiv:1805.01978, 2018. ",
1389
+ "bbox": [
1390
+ 173,
1391
+ 830,
1392
+ 821,
1393
+ 859
1394
+ ],
1395
+ "page_idx": 10
1396
+ },
1397
+ {
1398
+ "type": "text",
1399
+ "text": "A TRAINING DYNAMICS ",
1400
+ "text_level": 1,
1401
+ "bbox": [
1402
+ 176,
1403
+ 102,
1404
+ 393,
1405
+ 118
1406
+ ],
1407
+ "page_idx": 11
1408
+ },
1409
+ {
1410
+ "type": "text",
1411
+ "text": "Fig. 4 and 5 show the training dynamics for each of the considered losses. Charts are smoothed with a 0.3 moving average for readability (curves before smoothing are shown semi-transparent). ",
1412
+ "bbox": [
1413
+ 173,
1414
+ 132,
1415
+ 823,
1416
+ 162
1417
+ ],
1418
+ "page_idx": 11
1419
+ },
1420
+ {
1421
+ "type": "image",
1422
+ "img_path": "images/4da7361dea4e214120a4f83ad835fe56daaf9d4478d45e9de5e947e5f9e43203.jpg",
1423
+ "image_caption": [
1424
+ "Figure 4: Training dynamics on STL-10 dataset for linear classifier "
1425
+ ],
1426
+ "image_footnote": [],
1427
+ "bbox": [
1428
+ 174,
1429
+ 172,
1430
+ 825,
1431
+ 443
1432
+ ],
1433
+ "page_idx": 11
1434
+ },
1435
+ {
1436
+ "type": "image",
1437
+ "img_path": "images/56fa92474a274079c986ab314b71342c7622615ad0b973ce49ef164a7fafb890.jpg",
1438
+ "image_caption": [
1439
+ "Figure 5: Training dynamics on STL-10 dataset for 5-nn classifier "
1440
+ ],
1441
+ "image_footnote": [],
1442
+ "bbox": [
1443
+ 171,
1444
+ 486,
1445
+ 825,
1446
+ 756
1447
+ ],
1448
+ "page_idx": 11
1449
+ },
1450
+ {
1451
+ "type": "text",
1452
+ "text": "B CHOLESKY WHITENING AND BACKPROGATION ",
1453
+ "text_level": 1,
1454
+ "bbox": [
1455
+ 173,
1456
+ 808,
1457
+ 602,
1458
+ 825
1459
+ ],
1460
+ "page_idx": 11
1461
+ },
1462
+ {
1463
+ "type": "text",
1464
+ "text": "We compute $W _ { V }$ (equation 8) following (Siarohin et al., 2019) and using the Cholesky decomposition. The Cholesky decomposition is based on the factorisation of the covariance symmetric matrix using two triangular matrices: $\\Sigma _ { V } = L L ^ { \\top }$ , where $L$ is a lower triangular matrix. Once we get $L$ , we compute the inverse of $L$ , and we get: $W _ { V } = L ^ { - 1 }$ . Note that Cholesky decomposition is fully diferentiable and it is implemented in all of the major frameworks, such as PyTorch and TensorFlow. However, for the sake of completeness, we provide below the gradient computation. ",
1465
+ "bbox": [
1466
+ 173,
1467
+ 839,
1468
+ 825,
1469
+ 924
1470
+ ],
1471
+ "page_idx": 11
1472
+ },
1473
+ {
1474
+ "type": "text",
1475
+ "text": "B.1 GRADIENT COMPUTATION ",
1476
+ "text_level": 1,
1477
+ "bbox": [
1478
+ 174,
1479
+ 103,
1480
+ 400,
1481
+ 118
1482
+ ],
1483
+ "page_idx": 12
1484
+ },
1485
+ {
1486
+ "type": "text",
1487
+ "text": "We provide here the equations for whitening differentiation. Let $Z$ be the whitened version of the batch $V$ , i.e., $Z = W _ { V } ( V - \\mu _ { V } )$ (equation 7). The gradient $\\textstyle { \\frac { \\partial L } { \\partial V } }$ can be computed by: ",
1488
+ "bbox": [
1489
+ 173,
1490
+ 128,
1491
+ 825,
1492
+ 160
1493
+ ],
1494
+ "page_idx": 12
1495
+ },
1496
+ {
1497
+ "type": "equation",
1498
+ "img_path": "images/5f8afbf803ce533b2085950e8fc825a17961bb95879b919e2858de7c02590e52.jpg",
1499
+ "text": "$$\n\\frac { \\partial L } { \\partial V } = \\frac { 2 } { K - 1 } \\frac { \\partial L } { \\partial \\Sigma } V + W _ { V } ^ { T } \\frac { \\partial L } { \\partial Z } .\n$$",
1500
+ "text_format": "latex",
1501
+ "bbox": [
1502
+ 390,
1503
+ 165,
1504
+ 606,
1505
+ 198
1506
+ ],
1507
+ "page_idx": 12
1508
+ },
1509
+ {
1510
+ "type": "text",
1511
+ "text": "where the partial derivative $\\frac { \\partial L } { \\partial Z }$ is backpropogated, while $\\frac { \\partial L } { \\partial \\Sigma }$ is computed as follows: ",
1512
+ "bbox": [
1513
+ 176,
1514
+ 204,
1515
+ 730,
1516
+ 223
1517
+ ],
1518
+ "page_idx": 12
1519
+ },
1520
+ {
1521
+ "type": "equation",
1522
+ "img_path": "images/396a3a4f79da4a846dbd53d39f2f92b43e589b26bf62cbd064a76c987d233181.jpg",
1523
+ "text": "$$\n\\frac { \\partial L } { \\partial \\Sigma } = - \\frac { 1 } { 2 } W _ { V } ^ { T } \\left( P \\circ \\frac { \\partial L } { \\partial W _ { V } } W _ { V } ^ { T } + \\left( P \\circ \\frac { \\partial L } { \\partial W _ { V } } W _ { V } ^ { T } \\right) ^ { T } \\right) W _ { V }\n$$",
1524
+ "text_format": "latex",
1525
+ "bbox": [
1526
+ 294,
1527
+ 228,
1528
+ 702,
1529
+ 271
1530
+ ],
1531
+ "page_idx": 12
1532
+ },
1533
+ {
1534
+ "type": "text",
1535
+ "text": "In equation $1 0 , \\circ$ is Hadamard product, while $\\frac { \\partial L } { \\partial W _ { V } }$ is: ",
1536
+ "bbox": [
1537
+ 171,
1538
+ 277,
1539
+ 529,
1540
+ 295
1541
+ ],
1542
+ "page_idx": 12
1543
+ },
1544
+ {
1545
+ "type": "equation",
1546
+ "img_path": "images/b2a29065731ec551647dad9f989db50e2a861620b48bdc48639cd097aaab9a52.jpg",
1547
+ "text": "$$\n\\frac { \\partial \\cal { L } } { \\partial W _ { V } } = \\frac { \\partial \\cal { L } } { \\partial Z } V ^ { T } ,\n$$",
1548
+ "text_format": "latex",
1549
+ "bbox": [
1550
+ 439,
1551
+ 303,
1552
+ 558,
1553
+ 335
1554
+ ],
1555
+ "page_idx": 12
1556
+ },
1557
+ {
1558
+ "type": "text",
1559
+ "text": "and $P$ is: ",
1560
+ "bbox": [
1561
+ 173,
1562
+ 348,
1563
+ 236,
1564
+ 363
1565
+ ],
1566
+ "page_idx": 12
1567
+ },
1568
+ {
1569
+ "type": "equation",
1570
+ "img_path": "images/c6627970627ab3dadeb9de587b6a9b5acb93e9d0da11acf7afb72420247c5833.jpg",
1571
+ "text": "$$\nP = \\left( { \\begin{array} { l l l l } { { \\frac { 1 } { 2 } } } & { 0 } & { \\cdots } & { 0 } \\\\ { 1 } & { { \\frac { 1 } { 2 } } } & { \\ddots } & { 0 } \\\\ { 1 } & { \\ddots } & { \\ddots } & { 0 } \\\\ { 1 } & { \\cdots } & { 1 } & { { \\frac { 1 } { 2 } } } \\end{array} } \\right) .\n$$",
1572
+ "text_format": "latex",
1573
+ "bbox": [
1574
+ 403,
1575
+ 358,
1576
+ 593,
1577
+ 440
1578
+ ],
1579
+ "page_idx": 12
1580
+ },
1581
+ {
1582
+ "type": "text",
1583
+ "text": "C EUCLIDEAN DISTANCE ",
1584
+ "text_level": 1,
1585
+ "bbox": [
1586
+ 174,
1587
+ 455,
1588
+ 398,
1589
+ 472
1590
+ ],
1591
+ "page_idx": 12
1592
+ },
1593
+ {
1594
+ "type": "table",
1595
+ "img_path": "images/f9df48ccc18f58650e27cceff16f26e86a16c5551f19c79b3da719364ec4566e.jpg",
1596
+ "table_caption": [
1597
+ "Table 4: Classification accuracy (top 1) using the Euclidean distance (unnormalized embeddings) on STL-10. "
1598
+ ],
1599
+ "table_footnote": [],
1600
+ "table_body": "<table><tr><td>Method</td><td> linear</td><td>5-nn</td></tr><tr><td>Contrastive</td><td>78.00</td><td>71.07</td></tr><tr><td>BYOL</td><td>80.83</td><td>74.94</td></tr><tr><td>W-MSE 2</td><td>89.91</td><td>85.56</td></tr><tr><td>W-MSE 4</td><td>90.40</td><td>87.09</td></tr></table>",
1601
+ "bbox": [
1602
+ 393,
1603
+ 523,
1604
+ 604,
1605
+ 619
1606
+ ],
1607
+ "page_idx": 12
1608
+ },
1609
+ {
1610
+ "type": "text",
1611
+ "text": "The cosine similarity is a crucial component in most of the current self-supervised learning approaches. This is usually implemented with an $L _ { 2 }$ normalization of the latent representations, which corresponds to projecting the features on the surface of the unit hypersphere. However, in our WMSE, the whitening transform projects the representation onto a spherical distribution (intuitively, we can say on the whole unit hypersphere). Preserving the module of the features before the $L _ { 2 }$ normalization may be useful in some applications, e.g., clustering the features after the projection head using a Gaussian mixture model. Tab. 4 shows an experiment on the STL-10 dataset where we use unnormalized embeddings for all the methods (and $\\tau = 1$ for the contrastive loss). Comparing Tab. 4 with Tab. 1, the accuracy decrease of W-MSE is significantly smaller than the other methods. ",
1612
+ "bbox": [
1613
+ 173,
1614
+ 642,
1615
+ 825,
1616
+ 768
1617
+ ],
1618
+ "page_idx": 12
1619
+ }
1620
+ ]
parse/train/3Wp8HM2CNdR/3Wp8HM2CNdR_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/3Wp8HM2CNdR/3Wp8HM2CNdR_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJeqs6EFvB/SJeqs6EFvB.md ADDED
@@ -0,0 +1,353 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # HOPPITY: LEARNING GRAPH TRANSFORMATIONS TO DETECT AND FIX BUGS IN PROGRAMS
2
+
3
+ Elizabeth Dinella∗ University of Pennsylvania
4
+
5
+ Hanjun Dai∗ Google Brain
6
+
7
+ Ziyang Li University of Pennsylvania
8
+
9
+ Mayur Naik University of Pennsylvania
10
+
11
+ Le Song Georgia Tech
12
+
13
+ Ke Wang Visa Research
14
+
15
+ # ABSTRACT
16
+
17
+ We present a learning-based approach to detect and fix a broad range of bugs in Javascript programs. We frame the problem in terms of learning a sequence of graph transformations: given a buggy program modeled by a graph structure, our model makes a sequence of predictions including the position of bug nodes and corresponding graph edits to produce a fix. Unlike previous works built upon deep neural networks, our approach targets bugs that are more diverse and complex in nature (i.e. bugs that require adding or deleting statements to fix). We have realized our approach in a tool called HOPPITY. By training on 290,715 Javascript code change commits on Github, HOPPITY correctly detects and fixes bugs in 9,490 out of 36,361 programs in an end-to-end fashion. Given the bug location and type of the fix, HOPPITY also outperforms the baseline approach by a wide margin.
18
+
19
+ # 1 INTRODUCTION
20
+
21
+ The sheer size and complexity of modern codebases makes it impossible for them to be bug-free. As a result, a more reasonable and effective strategy has emerged, which aims to prevent bugs in production by applying automated tools to detect and even fix them early in the development process.
22
+
23
+ This trend has gained increasing popularity in recent years. Examples include Google’s Tricorder (Sadowski et al., 2015), Facebook’s Getafix (Scott et al., 2019) and Zoncolan, and Microsoft’s Visual Studio IntelliCode. The techniques underlying these tools can be classified into broadly two categories: logical, rule-based techniques (Sadowski et al., 2015) and statistical, data-driven techniques (Allamanis et al., 2018; Pradel & Sen, 2018; Vasic et al., 2019). The former uses manually written rules capturing undesirable code patterns and scans the entire codebase for these classes of bugs. The latter learns to detect abnormal code from a large code corpus using deep neural networks. Despite great strides, however, both kinds of tools are limited in generality because they target error patterns in specific codebases or they target specific bug types. For instance, Zoncolan’s rules are designed to be specifically applicable to Facebook’s codebases, and deep learning models target specialized bugs in variable naming (Allamanis et al., 2018) or binary expressions (Pradel & Sen, 2018). Moreover, the patterns are relatively syntactic, allowing them to be specified by human experts using logical rules or learnt from a corpus of programs.
24
+
25
+ In this paper, we propose a novel learning-based approach for finding and fixing bugs in Javascript programs automatically. Javascript is a scripting language designed for web application development. It has been the most popular programming language on GitHub since 2014 (Github, 2019). Repairing Javascript code presents a unique challenge as bugs manifest in diverse forms due to unusual language features and the lack of tooling support. Therefore, the primary goal of our approach is generality since it must be effective against a board spectrum of programming errors, such as using wrong operators or identifiers, accessing undefined properties, mishandling variable scopes, triggering type incompatibilites, among many others. Another important novel aspect concerns our approach’s ability to deal with bugs that are more complex and semantic in nature, namely, bugs that require adding or removing statements from a program, which are not considered by prior works. Finally, compared to automated program repair techniques (Le Goues et al., 2019; Scott et al., 2019; Hua et al., 2018; Chen et al., 2018) which require knowledge of bug location, this paper presents an end-to-end approach including localizing bugs, predicting the types of fixes, and generating patches.
26
+
27
+ We design our model architecture in a similar vein as a Neural Turing Machine (NTM) (Graves et al., 2014). It consists of an external memory (a Graph Neural Network) for embedding a buggy program and a central controller (an LSTM) that makes a sequence of primitive actions (e.g., predicting type, generating patch, etc.) to perform a fix. The multi-step decision process is implemented by an autoregressive model. Crucially, our model differs from the standard NTM in how the memory is manipulated: apart from the common read and write operations, the controller can also expand or shrink the memory when adding or deleting nodes in the original graph.
28
+
29
+ We have realized our approach in a tool called HOPPITY. By training on 290,715 Javascript code change commits collected from Github, HOPPITY correctly detects and fixes bugs in 9,490 out of 36,361 programs using a beam size of three.
30
+
31
+ # 2 MOTIVATING EXAMPLES
32
+
33
+ Javascript is quite different compared to traditional object-oriented languages (e.g. $\mathrm { C } { + + }$ , Java, or $\mathbf { C } \#$ ). In addition to the weak, dynamic typing discipline of scripting languages, Javascript supports many peculiar features that do not exist in other languages. For example, it allows a property (i.e., a field) to be added to or removed from an object at runtime. As another example, Javascript did not support block-level scoping until recently, allowing a variable defined in a block structure such as a for loop to be exposed to the entire function in which the loop occurs. While the latest ES6 language standard incorporates block-level scoping, developers have been programming without it for decades, resulting in a large body of legacy code. Finally, Javascript’s eval function, which interprets and executes a string as a code fragment, is widely regarded as a major source of bugs and vulnerabilities. All of these aspects make programming in Javascript a frustrating and error-prone experience.
34
+
35
+ ![](images/5d5db4d59feaf5fb2d4045cba10080cbb7a131b8e8d7ef8e54625067bc4119e3.jpg)
36
+ (c) copy function should have also been included in (d) parseInt should have been removed because $= = = =$ the highlighted list. implies this.value is an integer.
37
+ Figure 1: Example programs that illustrate limitations of existing approaches inculding both rulebased static analyzers and neural-based bug predictors.
38
+
39
+ Static analyzers aim to detect common coding errors in Javascript programs by applying logical rulebased reasoning on source code. TAJS (Jensen et al., 2009) and ESLint (Zakas, 2013) are prominent examples. These tools face important challenges to be effective. We present several examples in Figure 1 to illustrate their limitations. Due to the complex nature of client-side web APIs, TAJS and ESLint choose to ignore analyzing built-in libraries for the sake of scalability. As depicted in Figure 1a, when developers mistakenly capitalize the first letter of innerHTML, a property of class Element in DOM (Document Object Model), both analyzers fail to catch the error. Javascript will then silently allow developers to set the previously non-existent property InnerHTML to the empty string. Later, when developers attempt to access the intended property, innerHTML, the program will crash and potentially cause a security vulnerability or incur a costly debugging experience. Additionally, static analyzers can never deal with functional bugs (i.e., errors that violate the program specification and yet conform to the coding rules). Figure 1b shows one such example. The goal is to split a string using regular expressions. However, the program incorrectly splits the input ' and ' into ['', and ''] instead of $[ { \bf \Phi } ^ { \prime \prime } , { \bf \Phi } ^ { \prime \prime } ]$ , which is what the developer intended. Since the error is simply a mismatch between the developer’s implicit specification and implementation, static analyzers are incapable of catching it.
40
+
41
+ ![](images/debfa503638c9e415a26e59edbafb8dbed10fbd181589d19251d769b600dfc54.jpg)
42
+ Figure 2: Code repair as graph transformation. Each step the source code graph is edited via one of the operator module until STOP is triggered by controller.
43
+
44
+ The bugs that static analyzers missed in both cases are in hindsight quite obvious to human programmers. The criteria they use is very simple: any code snippet that seems to deviate from common code patterns is likely to be buggy. This is precisely the observation that our approach seeks to mimic. In particular, if a model observes a property or an unusual way of splitting strings that never appeared in the training data, it is likely to recognize those abnormal code fragments as potential bugs. The main advantage of our approach over existing neural-based bug detectors (Allamanis et al., 2018; Pradel & Sen, 2018; Vasic et al., 2019) is its generality. Unlike prior works that target specific classes of bugs (e.g., variable naming issues or binary expression bugs), we train a single model to deal with a wide range of bug types, encompassing all previously proposed ones. Compared to past approaches that leverage a graph-based neural network model (Allamanis et al., 2018), our model is capable of more sophisticated transformations such as adding or removing nodes, as shown in Figure 1c and 1d. Finally, our model not only locates but also fixes bugs, whereas program repair (Le Goues et al., 2019; Scott et al., 2019; Hua et al., 2018; Chen et al., 2018) or bug localization (Ball et al., 2003; Jose & Majumdar, 2011; Wang et al., 2019) techniques only solve a single task.
45
+
46
+ # 3 MODEL
47
+
48
+ We model the problem of detecting and repairing bugs in programs as a structured prediction problem on a graph-based representation of programs. Given a graph $g _ { b u g }$ that represents a buggy program, we wish to predict a graph $g _ { f i x }$ that represents the fixed program. Our model aims to capture the structured prediction by a sequence of up to $T$ steps of graph transformations:
49
+
50
+ $$
51
+ p ( g _ { f i x } | g _ { b u g } ; \theta ) = p ( g _ { 1 } | g _ { b u g } ; \theta ) p ( g _ { 2 } | g _ { 1 } ; \theta ) \ldots p ( g _ { f i x } | g _ { T - 1 } ; \theta )
52
+ $$
53
+
54
+ The high-level overview of the graph sequence transformation is shown in Figure 2. Different programs may need a different number of steps $T ( g _ { b u g } )$ which is also determined by the model.
55
+
56
+ We first introduce our representation module for programs in Sec 3.1. We then elucidate each step of the above transformation in Sec 3.2. Finally, we summarize and present the full model in Sec 3.3.
57
+
58
+ # 3.1 PROGRAM REPRESENTATION
59
+
60
+ Programs written in a high-level language have rich structure. Researchers have proposed graph-based representations to capture this structure (Allamanis et al., 2018). We start with this approach of representing programs using graphs with certain modifications for our task.
61
+
62
+ As shown in the left part of Figure 2, we first parse the program’s source code into an abstract syntax tree (AST) form that captures the program’s syntactic structure. We then connect the leaf nodes with SuccToken edges. Unlike previous approaches, we additionally add value nodes that store the actual content of the leaf nodes, with special ValueLink edges connecting them together. The purpose of introducing this additional set of nodes is to provide a name-independent strategy for code representation and modification, which we elucidate in the next section. Hereafter, we use $g _ { f i x } , g _ { b u g }$ or $g$ in general to represent either the source code or the corresponding graph structure.
63
+
64
+ After representing the program as a graph, we use a Graph Neural Network (GNN) (Scarselli et al., 2008) to map the graph into a representation in a fixed dimensional vector space. Specifically, given a graph $g = ( V , E )$ with set of nodes $V$ and edges $E$ , we need a function $f ( \boldsymbol { g } ) \mapsto ( \mathbb { R } ^ { d } , \mathbb { R } ^ { | V | \times d } )$ to obtain the $d$ -dimensional representation of graph $g$ (denoted as $\vec { g } )$ , as well as representations of individual nodes $v \in V$ (denoted as $\vec { v }$ ). To parameterize $f ( \cdot )$ , we employ the form in GIN ( $\mathrm { X u }$ et al., 2018), with our adaptation to our multigraph for program representation in the following manner:
65
+
66
+ ![](images/a2cc2ae4322d124cf58d65e62b0b650dc2a5f95c8603f0cf15ae0a1c0490a56b.jpg)
67
+ Figure 3: Graph edit operators with low-level primitives.
68
+
69
+ $$
70
+ \begin{array} { r l } & { h _ { v } ^ { ( l + 1 ) , k } = \sigma ( \sum _ { u \in \mathcal { N } ^ { k } ( v ) } \mathbf { W } _ { 1 } ^ { l , k } h _ { u } ^ { ( l ) } ) , \forall k \in \{ 1 , 2 , \ldots , K \} } \\ & { h _ { v } ^ { ( l + 1 ) } = \sigma ( \mathbf { W } _ { 2 } ^ { l } [ h _ { v } ^ { ( l + 1 ) , 1 } , h _ { v } ^ { ( l + 1 ) , 2 } , \ldots , h _ { v } ^ { ( l + 1 ) , K } ] + h _ { v } ^ { ( l ) } ) } \end{array}
71
+ $$
72
+
73
+ where $\mathbf { W } _ { 1 } ^ { l , k } \in \mathbb { R } ^ { d \times d }$ , $\mathbf { W } _ { 2 } ^ { l } \in \mathbb { R } ^ { d K \times d }$ are model parameters and $\sigma ( \cdot )$ is tanh in this implementation. $K$ is the total number of edge types in this multi-graph representation. In the end, the node embedding is $\vec { v } = h _ { v } ^ { ( L ) }$ , where $L$ is the total number of propagations in the GNN. $\mathcal { N } ^ { k } ( v )$ is the set of neighbors of node $v$ that are connected by edge with type $k$ . Following GIN, the graph representation $\vec { g }$ is the aggregation of $h _ { v } ^ { l } , \forall l \in 0 , 1 , \therefore , \bar { L }$ . We use max pooling to aggregate $\mathsf { \bar { h } } _ { v } ^ { l }$ for each $l$ , and then take the average of these $L + 1$ vectors to obtain $\vec { g }$ .
74
+
75
+ Initially, we use the node type as one-hot features as a starting value for either obtained from the AST representation, or from the local value ta $h _ { v } ^ { ( 0 ) }$ , where the types areas shown in Figure 2. Note that we don’t use features like variable names or function names in this graph representation, as different programs may follow different naming conventions. Instead, we focus on the syntactic structure of the source code, so as to enable naming-agnostic representation across different programs.
76
+
77
+ # 3.2 ONE-STEP GRAPH EDIT
78
+
79
+ There are five types of operators to choose from for a single step graph edit, namely, adding a node (ADD), deleting a node (DEL), replacing a node value (REP_VAL), replacing a node type (REP_TYPE) and stop (NO_OP). When combined with multi-step edits, these operators suffice to capture a rich variety of code modifications. These operators share some common low-level primitives, such as finding the location, predicting value, etc. We first introduce the individual low-level primitives and then present how to assemble these for each type of graph edit operator.
80
+
81
+ # 3.2.1 LOW-LEVEL PRIMITIVES
82
+
83
+ Our low-level primitives contain location, type, and value prediction. These primitives can be combined for different operators later on. In this section, we assume the availability of a controller, represented as $\vec { c } \in \mathbb R ^ { d }$ . It keeps track of the global state, including the original source code, as well as the edits made so far. We will elaborate this when we assemble different primitives together.
84
+
85
+ Location The location primitive locates a specific position in the source code. While it corresponds to region selection in the original text representation, with the graph representation, we can easily treat it as a node selection step. As different programs have different numbers of nodes, we employ a pointer network (Vinyals et al., 2015) into the graph structure. Specifically, after obtaining the node embeddings $\{ \vec { v } \} _ { v \in V }$ , we select the node via $l o \bar { c } ( \bar { \vec { c } } , g ) = \arg \operatorname* { m a x } _ { v \in V } \vec { v } ^ { \top } \bar { \vec { c } }$ for simplicity.
86
+
87
+ Value The value primitive assigns a value for a leaf node in the AST. Instead of predicting the replacement value using a language generative model (Chen et al., 2018) or GNN score function (Allamanis et al., 2018), we adopt the attention mechanism to let the model to choose from either the values appearing in the current file (local value table), or a collection of global values that are common for the specific language. Let $D _ { v a l }$ be the global dictionary of commonly used leaf-node values in the language, where each item $i _ { v } \in D _ { v a l }$ is associated with a vector representation $\vec { i _ { v } } \in \mathbb R ^ { d }$ . The local value table is denoted as $V _ { v a l }$ which is a subset of the nodes in current graph. Then, the value is predicted via $\begin{array} { r } { v a l ( \vec { c } , g ) = \operatorname * { a r g m a x } _ { t \in D _ { v a l } \cup V _ { v a l } } \vec { t } ^ { \top } \vec { c } . } \end{array}$ . Again we use inner product simply for efficiency, while more expressive score functions can also be used.
88
+
89
+ Type The type primitive assigns the type for non-terminal nodes in an AST. As the total possible number of types is finite and fixed for a given language, the type prediction is simply a multiclass classification problem. However, we can utilize the AST grammar checker with contextual information to prune the output space. To predict the type of a given non-terminal node, we can obtain its parent node and current children. Then, by looping over the valid production rules at the current location, we can obtain a list of all valid types. The final type is only chosen from this set.
90
+
91
+ # 3.2.2 GRAPH EDIT OPERATORS
92
+
93
+ The $t$ -th round of edit starts with the current graph $g _ { t - 1 }$ , the corresponding graph embedding, and the ‘macro-context’ embedding $\overrightarrow { c _ { M } } _ { t - 1 }$ that captures the edit history so far. Every type of edit operation (excluding NO_OP), requires prediction of the buggy location. So, in each round, the location primitive is invoked to determine the node to target. Then the edit type $e$ that is feasible at this location $v$ is predicted out of the five operators. A ‘micro-context’ embedding $\overrightarrow { c _ { m _ { t } } }$ is obtained from the macro embedding updated by two LSTM calls with location node embedding $\vec { v }$ and operator embedding $\vec { e } .$ . To summarize:
94
+
95
+ $$
96
+ \overrightarrow { c _ { M _ { t } } } ^ { \prime } = \mathrm { L S T M } ( \overrightarrow { g _ { t - 1 } } | \overrightarrow { c _ { M _ { t - 1 } } } ) , \overrightarrow { c _ { m _ { t } } } = \mathrm { L S T M } ( \overrightarrow { e _ { t } } | \mathrm { L S T M } ( \overrightarrow { v _ { t } ^ { \prime } } | \overrightarrow { c _ { M _ { t } } } ) ) ,
97
+ $$
98
+
99
+ The micro-context embedding is used as the controller throughout the process of each operator. In the following content, we present these operators in detail.
100
+
101
+ ADD This operation adds a new node to the graph. Unlike in Li et al. (2018) where the node and corresponding edges are added in separate stages, which would introduce extra complexity, we introduce a simple mechanism that can uniquely add a node and corresponding edges. As is shown in Figure 3, this process invokes one location primitive, one value primitive, and one type primitive. The location primitive invoked before the edit (i.e., node $v$ ) determines the parent of the node to be added, while the location primitive called during the edit chooses the left sibling of the node. In a special case where the parent node does not have any children, then such left sibling node is set to the parent node itself. With this information, we can uniquely determine the position to insert into the AST. Finally, the corresponding edges—SuccToken, ValueLink, and AST edges—can automatically be inferred with the location of new node to be added.
102
+
103
+ As this process is autoregressive, the micro-context embedding is kept updated with all the primitive calls. For this specific operator, the context is updated in the order of: $\overrightarrow { c _ { m 1 } } = \mathrm { L S T M } ( \overrightarrow { v _ { s i b l i n g } } | c _ { m } ^ { } )$ , $c _ { m 2 } ^ { } = \mathrm { L S T M } ( \bar { v } a l ( c _ { m 1 } ^ { } , \bar { g } ) | c _ { m 1 } ^ { } )$ and $c _ { m 3 } ^ { } = \mathrm { L S T M } ( t y p e ( c _ { m 2 } ^ { } , g ) | c _ { m 2 } ^ { } )$ . In the end, $\vec { c } _ { A D D } = c _ { m 3 } ^ { }$ summarizes the process.
104
+
105
+ DEL This operator deletes a node and corresponding edges in the graph. If it is a non-terminal node in the AST, then the corresponding subtree is removed as well. The micro-context embedding is updated by the LSTM via the embedding of the node being deleted.
106
+
107
+ REP_VAL This operator replaces the value of a leaf (terminal) node in the AST. This procedure requires the prediction the value. The leaf node is linked to the new value node in the internal value table via a ValueLink edge. Also, the micro-context embedding is updated by the LSTM via the embedding of the corresponding node and value.
108
+
109
+ REP_TYPE This operator changes the type of a non-terminal node, which involves type primitive steps. The micro-context embedding is updated by the LSTM via the embedding of the corresponding node and type.
110
+
111
+ NO_OP This op does not change the graph. It simply denotes the end of the sequence of graph edits.
112
+
113
+ # 3.3 GRAPH TRANSFORMATION
114
+
115
+ Our end-to-end model for graph transformation inference is shown in Alg 1. We denote the buggy graph $g _ { b u g }$ as $g _ { 0 }$ for simplicity. Then, for the $t$ -th graph edit, the following steps are performed:
116
+
117
+ 1. Obtain the graph representation $\overrightarrow { g _ { t - 1 } }$ and node embeddings. Update the macro-context embedding using $\overrightarrow { g _ { t - 1 } }$ ; 2. Choose edit location $v _ { t }$ by performing location primitive and update the context embedding; 3. Pick the graph edit operator $e _ { t }$ that is compatible with $v _ { t }$ ; Use both $v _ { t }$ and $e _ { t }$ to obtain the micro-context embedding. 4. Perform the edit, obtain the corresponding micro-context summary $\overrightarrow { c _ { e _ { t } } }$ and update the macro-context embedding. 5. If the edit is not NO_OP, then go back to step 1; otherwise return the graph.
118
+
119
+ # Algorithm 1 Transformation inference of $\overline { { p ( g _ { f i x } | g _ { b u g } ) } }$
120
+
121
+ 1: Input $g _ { b u g } \sim \mathcal { D }$ and model parameters $\theta$ .
122
+ 2: Obtain $\vec { g _ { 0 } }$ , $\{ \vec { v } _ { v \in g _ { b u g } } \} = f _ { 0 } ( g _ { b u g } )$ , let $c _ { M _ { 0 } } ^ { }$ be null.
123
+ 3: for $t = 1$ to $T$ do
124
+ 4: Obtain $\overrightarrow { c _ { M _ { t } } ^ { \prime } } = \mathrm { L S T M } ( \overrightarrow { g _ { t - 1 } } | \overrightarrow { c _ { M _ { t - 1 } } } )$ .
125
+ 5: Choose location $v _ { t }$ , then edit type $e _ { t }$ ;
126
+ 6: if $e _ { t } = \tt N O \_ O P$ then
127
+ 7: set $g _ { T } = g _ { t - 1 }$ and exit the loop.
128
+ 8: end if
129
+ 9: Perform operator $e _ { t }$ with $\overrightarrow { c _ { m _ { t . } } }$ obtained by $\operatorname { E q } 3$ .
130
+ 10: Get new graph $g _ { t }$ , update $\xrightarrow [ { \boldsymbol { c } _ { M _ { t } } } ] { }$ with $\overrightarrow { c _ { e _ { t } } }$ .
131
+ 11: end for
132
+ 12: Return gT
133
+
134
+ This process repeats until it reaches the maximum steps $T$ or the NO_OP operator is selected. Note that our framework can capture the situation when the input program is bug-free. In this case, the NO_OP operator is supposed to be triggered at the first step. Also, each edit step is not limited to a single node level operation. It can be extended to modify a certain substructure (e.g., replace a tree node with one of its children). This in turn allows program repair to be performed in fewer edit steps.
135
+
136
+ # 4 LEARNING
137
+
138
+ Given the dataset $\mathcal { D } = \{ ( g _ { b u g } ^ { ( i ) } , g _ { f i x } ^ { ( i ) } ) \} _ { i = 1 } ^ { | \mathcal { D } | }$ which consists of pairs of buggy code and the fixed code, the learning objective maxθ $\bar { \mathbb { E } } _ { ( g _ { b u g } , g _ { f i x } ) \sim \mathcal { D } } p ( g _ { f i x } | g _ { b u g } ; \theta )$ maximizes the likelihood of fixes.
139
+
140
+ Since the probability is factorized according to $\operatorname { E q }$ where a sequence of transformations is performed, we parse the source code using the SHIFT AST format, and utilize a JSON diff toolbox to compile the code differences into a sequence of AST edits. This serves as the fine-grained supervision mechanism for our graph transformation formulation. Thus, the MLE objective above is realized with the sum of cross entropy loss at each step of graph edits. During training, we jointly optimize the graph representation module $\{ f _ { t } ( \cdot ) \} _ { t = 1 } ^ { T }$ , each of the operator module and the controller module which is parameterized by LSTM. We use the Adam optimizer with $\beta _ { 1 } = 0 . 9 , \beta _ { 2 } = 0 . 9 9$ and initial learning rate of $1 0 ^ { - 3 }$ . Due to the large size of each sample, we use a small batch size of 10 during training. Furthermore, to stabilize the training, we apply the gradient clip with the maximum norm of 5.
141
+
142
+ # 5 INFERENCE
143
+
144
+ The inference procedure involves searching for the maximum in the combinatorial space: arg $\operatorname* { m a x } _ { g _ { f i x } } p ( g _ { f i x } | g _ { b u g } ; \theta )$ . Since the search space is very large, however, we use beam-search to approximately find the fixes with highest probabilities.
145
+
146
+ Specifically, we maintain a pool of partially fixed programs $\{ \tilde { g } \}$ , which starts with simply the single buggy program $g _ { b u g }$ . The pool size is limited by the beam-search size $B$ . For each $\tilde { g }$ , we propose the top $B$ locations to be modified, top $B$ operators or top $B$ primitives (location, type, value), depending on the current stage of the edit $\tilde { g }$ . Then the total joint one-step graph transformation solutions are ranked together based on the joint log-likelihood, and the top $B$ solutions with the largest likelihood are kept in the pool for the next round of beam search.
147
+
148
+ Unlike beam search for language models where the vocabulary size is fixed, in our setting, the available choices or even the steps of inference may vary (e.g., the ADD operator has more steps of primitive calls than the DEL operator). Our implementation is based on PyTorch with customized GPU kernels to enable efficient inference on GPUs.
149
+
150
+ # 6 EXPERIMENTS
151
+
152
+ Dataset Our model is trained and evaluated on a corpus of nearly half a million data points. We have created a robust system to continuously collect small changes in Javascript programs from Github. Given a commit, we download the Javascript file before and after the change: $( s r c _ { b u g g y } , s r c _ { f i x e d } )$ . Commits can contain many types of changes such as feature additions, refactorings, bug fixes, etc. In an attempt to filter our dataset to only include bug fixes, we use a heuristic based on the number of changes to the AST. Our insight is that a commit with a smaller number of AST differences is more likely to be a bug fix than a commit containing large changes. Thus for the experiments, we use three different datasets: OneDiff with precisely one edit; ZeroOneDiff with zero and one edit and ZeroOneTwoDiff with zero, one or two edits. We additionally filter out data points with ASTs larger than 500 nodes as a parameter in our system. A detailed overview of our corpus crawler is available in Appendix B.
153
+
154
+ Table 1: Statistic of OneDiff dataset. See appendix for more information of other dataset.
155
+
156
+ <table><tr><td></td><td>ADD</td><td>REP_TYPE</td><td>REP_VAL</td><td>DEL</td><td>total</td></tr><tr><td>train</td><td>6,473</td><td>1,864</td><td>251,097</td><td>31,281</td><td>290,715</td></tr><tr><td>validate</td><td>790</td><td>245</td><td>31,357</td><td>3,957</td><td>36,349</td></tr><tr><td>test</td><td>796</td><td>233</td><td>31,387</td><td>3,945</td><td>36,361</td></tr></table>
157
+
158
+ <table><tr><td rowspan="3"></td><td colspan="2">Total</td><td colspan="2">Location</td><td>Operator</td><td colspan="2">Value</td><td colspan="2">Type</td></tr><tr><td>Top-3</td><td>Top-1</td><td>Top-3</td><td>Top-1</td><td>Top-1</td><td>Top-3</td><td>Top-1</td><td>Top-3</td><td>Top-1</td></tr><tr><td>TOTAL</td><td>26.1</td><td>14.2</td><td>35.5</td><td>20.4</td><td>34.4</td><td>52.3</td><td>29.1</td><td>76.1</td><td>66.7</td></tr><tr><td>ADD</td><td>52.9</td><td>39.2</td><td>69.6</td><td>51.4</td><td>70.6</td><td>65.7</td><td>55.1</td><td>76.8</td><td>68.5</td></tr><tr><td>REP_VAL</td><td>23.4</td><td>11.9</td><td>33.3</td><td>18.5</td><td>31.7</td><td>53.0</td><td>28.8</td><td>-</td><td>1</td></tr><tr><td>REP_TYPE</td><td>71.7</td><td>52.4</td><td>73.0</td><td>52.8</td><td>79.4</td><td>-</td><td>-</td><td>74.7</td><td>61.0</td></tr><tr><td>DEL</td><td>39.6</td><td>24.8</td><td>44.0</td><td>27.5</td><td>45.8</td><td>1</td><td>1</td><td>1</td><td>二</td></tr><tr><td>Random</td><td>.08</td><td>.07</td><td>2.28</td><td>1.4</td><td>27.7</td><td>.01</td><td>.01</td><td>.27</td><td>0</td></tr></table>
159
+
160
+ Table 2: Evaluation of model on the OneDiff dataset: accuracy $( \% )$
161
+
162
+ # 6.1 EVALUATION
163
+
164
+ We train the model for 3 epochs on the training set until the validation loss converges. We tried different configurations of our model with different number of layers and different graph embedding methods besides the generic one in Eq 2. We report on these ablation studies in Appendix C.
165
+
166
+ Table 2 shows the evaluation results of our model on a held out test set consisting of samples from our OneDiff dataset. Additional experiments on ZeroOneDiff and ZeroOneTwoDiff datasets are available in Appendix A. We also provide experimental results with respect to different configurations.
167
+
168
+ Accuracy is shown for each graph edit operation type. Accuracy is measured in a complete discrete graph edit operation step. For example consider Figure 1a, in which we edit an object property name with the REP_VAL operation. If the model incorrectly predicts the edit operation to be of type DEL, then it will not go on to predict a value. In this case, the model will be penalized twice in the operation accuracy as well as the value accuracy. A prediction is considered totally correct only if the entire sequence of graph edit primitives is correct. Note that top-1 greedy prediction is not always among top-3 when beam search is used. Additionally, operator prediction is only evaluated on the top prediction as the search space only includes four operators.
169
+
170
+ To demonstrate the magnitude of the search space, we compare HOPPITY to a model that selects uniformly at random, in each step of the graph edit process. The random model performs well at operation type selection since the search space only has four options (ADD, REP_VAL, REP_TYPE, DEL). However, after the operation type is predicted, the random model’s accuracy drops, as there are up to 500 nodes in the buggy AST. When it predicts value, the accuracy drops even further as our vocabulary contains 5,000 values. Lastly, type prediction has slightly better accuracy than value prediction because the number of the types of AST nodes in total is smaller than our vocabulary.
171
+
172
+ # 6.2 BASELINES
173
+
174
+ As existing approaches cannot be applied for comparison in Table 7, we adapt the baselines to some restricted settings in this section. We report the results on the OneDiff dataset as most of the baselines target repair of a single bug. Note that for all comparisons we provide equal amounts of information to HOPPITY and the baseline without retraining our model.
175
+
176
+ <table><tr><td>Type</td><td>GGNN-Rep</td><td>GGNN-Cls</td><td>HOPPITY</td></tr><tr><td>Top-1</td><td>53.2%</td><td>99.6%</td><td>90.0%</td></tr><tr><td>Top-3</td><td>85.8%</td><td>99.6%</td><td>94.8%</td></tr></table>
177
+
178
+ Table 5: Overall OneDiff accuracy with location.
179
+
180
+ <table><tr><td rowspan="2">HOPPITY</td><td>Top-1</td><td>Top-3</td></tr><tr><td>67.7%</td><td>73.3%</td></tr><tr><td>SequenceR</td><td>64.2%</td><td>68.6%</td></tr></table>
181
+
182
+ Table 3: REP_TYPE accuracies with location+op.
183
+ Table 6: Comparison with TAJS.
184
+
185
+ <table><tr><td>Bug Type</td><td>Amount</td><td>TAJS</td><td>HOPPITY</td></tr><tr><td>Undefined Property Functional Bug</td><td>7 11</td><td>0 0</td><td>1 3</td></tr><tr><td>Refactoring</td><td>12</td><td>0</td><td>1</td></tr><tr><td>Total</td><td>30</td><td>0</td><td>5</td></tr></table>
186
+
187
+ <table><tr><td>Value</td><td>GGNN-Rep</td><td>GGNN-RNN</td><td>HOPPITY</td></tr><tr><td>Top-1</td><td>63.8%</td><td>60.3%</td><td>69.1%</td></tr><tr><td>Top-3</td><td>67.6%</td><td>63.6%</td><td>73.4%</td></tr></table>
188
+
189
+ Table 4: REP_VAL accuracies with location+op.
190
+
191
+ GGNN: Allamanis et al. (2018), uses Gated Graph Neural Networks (GGNN) for two specific bug repair tasks: VARMISUSE, in which the model learns to select the correct variable that should be used at a given location, and VARNAMING, in which the model predicts a variable name based on its usage. We adapt these tasks to compare with HOPPITY on the REP_TYPE and REP_VAL tasks. Specifically, for REP_TYPE prediction we have
192
+
193
+ • GGNN-Rep: we adopt VARMISUSE to replace with candidate node type and modify the graph structure correspondingly; we use their proposed max-margin formulation for training. • GGNN-Cls: we perform multi-class classification using the target node and graph embedding.
194
+
195
+ For REP_VAL prediction, we also made two versions of adaptations:
196
+
197
+ • GGNN-Rep: similar to above, here the candidate set is from values in the current graphs plus the top-100 frequent values used for repair in the training set. • GGNN-RNN: we adopt VARNAMING approach to predict value directly. Due to the huge vocabulary size, we use char-level language model for predicting the replacement.
198
+
199
+ Table 3 and 4 show the comparison when buggy node is known. Regarding the type prediction, as the number of types is large, the likelihood formulation with classification objective outperforms the max-margin loss based one (i.e., GGNN-Rep). As in this limited case GGNN-Cls and HOPPITY are quite similar except for graph representation, the performance is expected to be comparable. As HOPPITY is not trained to predict type fix only, it performs slighly worse than GGNN-Cls. Also for the value prediction, our formulation of pointer on graph is more effective. We found when the space of decisions is large, it is hard to apply structured prediction method like GGNN-Rep in this setting. Since real-world programs are noisy, the sentences used in different programs vary greatly, making it difficult for language models to predict the exact accurate value. A possible extension is to combine the language model with the graph pointer, which we will explore in future work.
200
+
201
+ SequenceR: The model proposed by Chen et al. (2018) is a translation based model that predicts a fixed sequence of tokens when given a buggy line in the source code. We compare with our model by providing location information to both approaches.
202
+
203
+ Table 5 summarizes the total accuracy for fixing a single bug. In order to provide a fair comparison, we allow SequenceR to predict the same information as our model (i.e., predict op, value etc.in a sequential way), rather than an entire sequence of raw textual tokens. This experiment shows the benefit of formulating code repair with graphs over text tokens.
204
+
205
+ With the above two baselines, we can see that in the restricted case our model can still yield comparable or even better performances. Given that our model can go for more edits without location information, we believe this tool is more generic and effective for code repair.
206
+
207
+ TAJS: We also compare the bug detection ability of HOPPITY against TAJS (Jensen et al., 2009) which is a well-known static analysis tool for Javascript programs. Automating the comparison for our entire test set proved to be infeasible. For example, TAJS only accepts JavaScript ES5 programs, while the vast majority of current JavaScript projects use ES6 or other variants like React JSX. Another problem is that TAJS does not analyze code that is not invoked, e.g., a library function that is not called by client code. Moreover, determining the right command-line options of TAJS is non-trivial since it provides many options targeting different JavaScript runtime environments. Due to these issues, we forgo a large-scale comparison, and instead pick 30 random points in our test set to manually analyze using TAJS. Table 6 depicts the results (Appendix D provides further details).
208
+
209
+ We restrict the chosen test points to satisfy a necessary condition for undefined property bugs since TAJS claims to be proficient in detecting this class of bugs. In the process, we also pick some functional bugs, as well as cases of refactoring modifications. By resolving the numerous issues that prevented us from automating the comparison, we were able to run TAJS manually. TAJS failed to detect any real bugs in the 30 test points. While functional bugs and refactoring modifications are beyond TAJS, however, TAJS also raises many unrelated false alarms due to its failures in locating NodeJS libraries, importing JSON files, or recognizing built-in global variables. These warnings are detrimental because TAJS suspends the analysis as soon as it detects what it preceives to be a bug. To further aid TAJS, we omitted parts of each program that are unrelated to the bug, in the hope of driving TAJS’s analysis as deep as possible. After all these measures, TAJS managed to detect two of the undefined property bugs (Bug IDs 4 and 6 in Appendix D).
210
+
211
+ In contrast, HOPPITY is able to correctly detect 5 bug locations of the 30 testing points within our top 3 predictions. Moreover, HOPPITY also produces 4 patches that are identical to the developer’s fixes. Our comparison highlights HOPPITY’s two important strengths compared to TAJS. First, HOPPITY relieves developers from the enormous burden of manual configuration. Second, HOPPITY achieves far better performance in detecting as well as fixing the bugs in Javascript programs.
212
+
213
+ # 7 RELATED WORK
214
+
215
+ Static analysis for bug detection. Static analyzers such as FindBugs, Error-Prone, and Semmle use syntactic pattern-matching and dataflow analysis to find common bugs. Typically, detecting even a single class of bugs can require dozens or even hundreds of patterns. Coverity (Bessey et al., 2010), SonarQube, and Clang Static Analyzer check for semantic inconsistencies in code based on more sophisticated path analyses. Infer (Calcagno et al., 2015) is built upon sound principles and can prove the absence of certain classes of bugs. TAJS belongs to this category as well. Due to the undecidability of the problem, however, approximations are inevitable which voids the guarantees in practice. Compared to all static analysis tools, HOPPITY offers the following advantages: (1) it targets a board range of programming errors; (2) it not only localizes bugs but also fixes them; and (3) it has significantly higher signal-to-noise ratio (i.e., detects more bugs with less false alarms).
216
+
217
+ Learning-based bug detection. Allamanis et al. (2018) target variable-misuse errors and present a solution based on a gated graph neural network model to predict the correct variable name given a buggy location. Vasic et al. (2019) present a pointer network on top of a RNN which outperforms Allamanis et al. (2018) on the same task. DeepBugs (Pradel & Sen, 2018) proposes a name-based bug detection scheme. Their model is trained to predict three classes of bugs: swapped function arguments, wrong binary operator, and wrong operand in a binary operation. Compared to these models, our approach is capable of detecting and fixing a wide range of errors in Javascript. SequenceR (Chen et al., 2018) uses sequence-to-sequence model to translate a buggy code segment into correct one; Getafix (Scott et al., 2019) produces human-like bug fixes by learning from past fixes. It employs a hierarchical clustering algorithm that sorts fix patterns according to their generality. While these approaches are general against different types of bugs, they still need the bug location as input.
218
+
219
+ Graph learning and optimization. Our work is closely related to the literature in graph representation learning and optimization. Our model uses a variant of GNN that is inspired by many representative works (Li et al., 2015; Xu et al., 2018; Si et al., 2018), with the adaptation of local value table and pointer mechanism. Our work is also related to auto-regressive graph modeling Johnson (2016); Li et al. (2018); Brockschmidt et al. (2018); Dai et al. (2018), but with more generic operations such as subtree deletion and attribute modifications. Some other works model the graph modification in latent space (Jin et al., 2018; Yin et al., 2018), but such frameworks lack fine-grained control over the generative process, and thus are not very suitable for performing code repair.
220
+
221
+ # 8 CONCLUSION
222
+
223
+ We proposed an end-to-end learning-based approach to detect and fix bugs in Javascript programs. We realized the approach in a tool HOPPITY and demonstrated that it correctly predicts 9,490 out of 36,361 code changes in real programs on Github. In the future, we plan to expand the targeted bugs to include those that are caused by the interdependence among multiple files or that require multiple steps to fix. We will also deploy HOPPITY in an IDE to further evaluate its accuracy and utility. Finally, we plan to extend our learning framework to support other languages. Due to its language-independence, we believe HOPPITY will benefit developers beyond Javascript as well.
224
+
225
+ # ACKNOWLEDGMENTS
226
+
227
+ We thank the reviewers for their insightful comments. This research was supported in part by NSF awards #1836936 and #1836822, ONR award #N00014-18-1-2021, and Facebook research awards.
228
+
229
+ # REFERENCES
230
+
231
+ Miltiadis Allamanis, Marc Brockschmidt, and Mahmoud Khademi. Learning to represent programs with graphs. International Conference on Learning Representations, 2018.
232
+
233
+ Thomas Ball, Mayur Naik, and Sriram K. Rajamani. From symptom to cause: Localizing errors in counterexample traces. In Proceedings of the 30th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2003.
234
+
235
+ Al Bessey, Ken Block, Ben Chelf, Andy Chou, Bryan Fulton, Seth Hallem, Charles Henri-Gros, Asya Kamsky, Scott McPeak, and Dawson Engler. A few billion lines of code later: Using static analysis to find bugs in the real world. Communications of the ACM, 53(2), February 2010.
236
+
237
+ Marc Brockschmidt, Miltiadis Allamanis, Alexander L Gaunt, and Oleksandr Polozov. Generative code modeling with graphs. arXiv preprint arXiv:1805.08490, 2018.
238
+
239
+ Cristiano Calcagno, Dino Distefano, Jeremy Dubreil, Dominik Gabi, Pieter Hooimeijer, Martino Luca, Peter O’Hearn, Irene Papakonstantinou, Jim Purbrick, and Dulma Rodriguez. Moving fast with software verification. In NASA Formal Method Symposium, 2015.
240
+
241
+ Zimin Chen, Steve Kommrusch, Michele Tufano, Louis-Noël Pouchet, Denys Poshyvanyk, and Martin Monperrus. Sequencer: Sequence-to-sequence learning for end-to-end program repair. arXiv preprint arXiv:1901.01808, 2018.
242
+
243
+ Hanjun Dai, Hui Li, Tian Tian, Xin Huang, Lin Wang, Jun Zhu, and Le Song. Adversarial attack on graph structured data. arXiv preprint arXiv:1806.02371, 2018.
244
+
245
+ Github. State of the Octoverse. https://octoverse.github.com/#top-languages, 2019.
246
+
247
+ Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014.
248
+
249
+ Jinru Hua, Mengshi Zhang, Kaiyuan Wang, and Sarfraz Khurshid. Sketchfix: A tool for automated program repair approach using lazy candidate generation. In Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, 2018.
250
+
251
+ Simon Holm Jensen, Anders Møller, and Peter Thiemann. Type analysis for javascript. In Proceedings of the 16th International Symposium on Static Analysis, 2009.
252
+
253
+ Wengong Jin, Kevin Yang, Regina Barzilay, and Tommi Jaakkola. Learning multimodal graph-tograph translation for molecular optimization. arXiv preprint arXiv:1812.01070, 2018.
254
+
255
+ Daniel D Johnson. Learning graphical state transitions. 2016.
256
+
257
+ Manu Jose and Rupak Majumdar. Cause clue clauses: Error localization using maximum satisfiability. In Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation, 2011.
258
+
259
+ Claire Le Goues, Michael Pradel, and Abhik Roychoudhury. Automated program repair. Commun. ACM, 2019.
260
+
261
+ Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. Gated graph sequence neural networks. arXiv preprint arXiv:1511.05493, 2015.
262
+
263
+ Yujia Li, Oriol Vinyals, Chris Dyer, Razvan Pascanu, and Peter Battaglia. Learning deep generative models of graphs. arXiv preprint arXiv:1803.03324, 2018.
264
+
265
+ Michael Pradel and Koushik Sen. Deepbugs: A learning approach to name-based bug detection. Proc. ACM Program. Lang., 2(OOPSLA), 2018.
266
+
267
+ Caitlin Sadowski, Jeffrey van Gogh, Ciera Jaspan, Emma Söderberg, and Collin Winter. Tricorder: Building a program analysis ecosystem. In Proceedings of the 37th International Conference on Software Engineering, 2015.
268
+
269
+ Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 20(1):61–80, 2008.
270
+
271
+ Andrew Scott, Johannes Bader, and Satish Chandra. Getafix: Learning to fix bugs automatically. volume 2, 2019.
272
+
273
+ Xujie Si, Hanjun Dai, Mukund Raghothaman, Mayur Naik, and Le Song. Learning loop invariants for program verification. In Advances in Neural Information Processing Systems, pp. 7751–7762, 2018.
274
+
275
+ Marko Vasic, Aditya Kanade, Petros Maniatis, David Bieber, and Rishabh Singh. Neural program repair by jointly learning to localize and repair. International Conference on Learning Representations, 2019.
276
+
277
+ Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. Pointer networks. In Advances in Neural Information Processing Systems, pp. 2692–2700, 2015.
278
+
279
+ Yu Wang, Fengjuan Gao, Linzhang Wang, and Ke Wang. Learning a static bug finder from data. arXiv preprint arXiv:1907.05579, 2019.
280
+
281
+ Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? arXiv preprint arXiv:1810.00826, 2018.
282
+
283
+ Pengcheng Yin, Graham Neubig, Miltiadis Allamanis, Marc Brockschmidt, and Alexander L Gaunt. Learning to represent edits. arXiv preprint arXiv:1810.13337, 2018.
284
+
285
+ Nicholas C. Zakas. ESLint. https://eslint.org/, 2013.
286
+
287
+ A ADDITIONAL EXPERIMENTS
288
+
289
+ <table><tr><td rowspan="3"></td><td colspan="2">Total</td><td colspan="2">Location</td><td>Operator</td><td colspan="2">Value</td><td colspan="2">Type</td></tr><tr><td>Top-3</td><td>Top-1</td><td>Top-3</td><td>Top-1</td><td>Top-1</td><td>Top-3</td><td>Top-1</td><td>Top-3</td><td>Top-1</td></tr><tr><td>ZeroOneTwoDiff</td><td>40.8</td><td>29.7</td><td>18.9</td><td>3.9</td><td>30.3</td><td>35.0</td><td>6.5</td><td>38.6</td><td>3.4</td></tr><tr><td>ZeroOneDiff</td><td>51.6</td><td>34.5</td><td>27.1</td><td>5.5</td><td>35.6</td><td>45.4</td><td>10.4</td><td>73.9</td><td>58.9</td></tr><tr><td>OneDiff</td><td>26.1</td><td>14.2</td><td>35.5</td><td>20.4</td><td>34.4</td><td>52.3</td><td>29.1</td><td>76.1</td><td>66.7</td></tr><tr><td>Random</td><td>.08</td><td>.07</td><td>2.28</td><td>1.4</td><td>27.7</td><td>.01</td><td>.01</td><td>.27</td><td>0</td></tr></table>
290
+
291
+ Table 7: Evaluation of models on each dataset. The Random model is evaluated on the OneDiff dataset and is shown for comparison.
292
+
293
+ Full experiment results In addition to the evaluation of samples with one edit Table 7, we also evaluate HOPPITY on the following datasets:
294
+
295
+ • ZeroOneDiff - Includes samples with labels of zero or one edit • ZeroOneTwoDiff - Includes samples with labels of zero, one, or two edits.
296
+
297
+ We trained models on each dataset for roughly 12 hours on a single GTX 2080Ti GPU. Accuracy on the ZeroOneDiff is the highest as predicting that an AST is not buggy does not consist of any low level primitive predictions. This makes it a much easier prediction for the model than say, an ADD operation which the parent location, left sibling, value, and type must all be predicted correctly in order to be considered accurate.
298
+
299
+ Table 8: Results on true/false predictions.
300
+
301
+ <table><tr><td colspan="3">TRUELABEL</td></tr><tr><td colspan="3"></td></tr><tr><td rowspan="2">ALARM PREDICTED NO ALARM</td><td>BUGGY</td><td>NOTBUGGY</td></tr><tr><td>10,293 26,517</td><td>7,210 20,605</td></tr></table>
302
+
303
+ False positive/negative study An evaluation of false positives and false negatives is available in Table 8. In this setting, we treat the problem as a classification problem on our ZeroOneDiff dataset and our model attempts to predict if a given AST is BUGGY / NOT BUGGY. If the model predicts ADD, REP_VAL, REP_TYPE, or DEL, we consider this a prediction of "BUGGY." Accordingly, if the model predicts NO_OP, we consider this to be a prediction of "NOT BUGGY."
304
+
305
+ Accuracy v.s. size of graph To demonstrate the affect of AST size on HOPPITY’s prediction accuracy on the OneDiff dataset, we include Figure 4. As expected, AST size and accuracy are inversely related.
306
+
307
+ Table 9: Accuracy vs beam sizes.
308
+
309
+ <table><tr><td>Beam Size (k)</td><td>Top-k Accuracy (%)</td></tr><tr><td>1</td><td>14.37%</td></tr><tr><td>2</td><td>21.10%</td></tr><tr><td>3</td><td>26.14%</td></tr><tr><td>4</td><td>30.12%</td></tr><tr><td>5</td><td>33.58%</td></tr></table>
310
+
311
+ Accuracy v.s. beam search size In Table 9 we compare the performance with different beam sizes on the OneDiff dataset. As we can see, the top-3 accuracy with beam size 3 is significantly better than top-1 accuracy with just greedy prediction. This is expected, as in the decision process there are ’bottleneck’ stages with only a few predictions (e.g., the op prediction). Thus from beam-1 to beam-3 there’s huge improvement, but further beyond the performance maxed out.
312
+
313
+ ![](images/2d4d22c9e753089552f3570ecc2cf47b4f93588aa8e3ea9b1d474d5c45c331a9.jpg)
314
+ Figure 4: End-to-end code repair accuracy v.s. size of AST of source code.
315
+
316
+ # B DATA COLLECTION
317
+
318
+ We have built a robust system to automatically collect millions of bug-fixes in Javascript programs from Github. Our system continuously crawls Github for commits containing Javascript files and creates a label consisting of the change to the AST corresponding to each such file.
319
+
320
+ Our system consists of three entirely automated parallel steps:
321
+
322
+ 1. Collect Commits: Our system uses the GH Archive API to easily access Github event data for a specific hour in time. After obtaining all data for the hour, we filter this using the Github API to only include commits that consist of edits to Javascript files.
323
+
324
+ 2. Download Files: As we are obtaining a list of valid commits from step 1, we begin downloading the pair: $( s r c _ { b u g g y } , s r c _ { f i x e d } )$ where $s r c _ { b u g g y }$ is the file prior to the commit, and $s r c _ { f i x e d }$ is the file following the commit that contains the changes made.
325
+
326
+ 3. Create Label: For each Javascript file downloaded, we parse the source code into a JSON format of the AST. Our system uses the SHIFT AST 1. Abstract Syntax Tree representations are designed to naturally and intuitively represent the structure of the source code. Because of this design goal, small changes in the source code can often lead to very large changes in the AST. We chose the SHIFT AST representation with consideration to our goal of maximizing the number of commits with only one difference between the ASTs. This component produces a pair of ASTs: $( A S T _ { b u g g y } , A S T _ { f i x e d } )$ at which point a JSON differencing algorithm, fast-json-patch 2 is applied to create a label. The label includes the operation type and node edited for each difference between $A S T _ { b u g g y }$ and $A S T _ { f i x e d }$ .
327
+
328
+ Each step of this process is parallelized in order to grow our corpus as quickly as possible. Our dataset has the advantage that it is continuously growing without human input.
329
+
330
+ Our system is language independent and highly extensible and modular. For example, it can handle any language so long as it can be parsed into a JSON AST.
331
+
332
+ For each label, we must download two files $s r c _ { b u g g y }$ and $s r c _ { f i x e d }$ . Additionally, if source files cannot be parsed into a SHIFT AST, a label cannot be created. For our learning corpus, we limit the dataset to only include labels with one AST difference. Additionally, in an attempt to limit graph size, we only include data points in which the $A S T _ { b u g g y }$ and $A S T _ { f i x e d }$ have less than 500 nodes.
333
+
334
+ Table 10: Data collection statistics.
335
+
336
+ <table><tr><td rowspan=1 colspan=1>Total Files Downloaded:</td><td rowspan=1 colspan=1>52,719,402</td></tr><tr><td rowspan=1 colspan=1>Total Labelled Data Points:</td><td rowspan=1 colspan=1>15,225,347</td></tr><tr><td rowspan=1 colspan=1># AST differences:</td><td rowspan=1 colspan=1># data points:</td></tr><tr><td rowspan=1 colspan=1>012-1011-2021-5051-100101+</td><td rowspan=1 colspan=1>3,473,3911,863,1933,247,4372,117,9772,047,998858,981921,754</td></tr></table>
337
+
338
+ ![](images/b0883dab9f4a7fec3bda7f5feb2162d7d71eb6b3b303edf2c63e2002d7a13d51.jpg)
339
+ Figure 5: Distribution of number of edits in the entire crawled dataset.
340
+
341
+ Figure 5 plots the distribution of number of edits that are recorded in Table 10. We can see the distribution is long tail, with majority of edits as 1 or 2.
342
+
343
+ # C ABLATION STUDY
344
+
345
+ We tried different graph representations with corresponding graph embedding methods. The multi represents the multi-graph defined by different edge types, with the parameterization of message passing function mentioned in Eq 2; the code2inv is the parameterization used in Si et al. (2018); the single instead uses a single graph with edge types as one-hot edge features. We found that more layers does not lead to better generalization in our setting, and it becomes slower in terms of convergence. So we report the results with 4 layers in our main paper.
346
+
347
+ <table><tr><td>model</td><td>max_lv</td><td>Total</td><td>Operator</td><td>Location</td><td>Value</td><td>Type</td></tr><tr><td>multi</td><td>20</td><td>7.63</td><td>30.0</td><td>13.1</td><td>22.6</td><td>54.5</td></tr><tr><td>multi</td><td>14</td><td>11.05</td><td>48.0</td><td>17.9</td><td>38.6</td><td>61.6</td></tr><tr><td>multi</td><td>4</td><td>13.33</td><td>53.4</td><td>36.2</td><td>38.6</td><td>56.4</td></tr><tr><td>code2inv</td><td>20</td><td>10.3</td><td>18.1</td><td>25.7</td><td>38.8</td><td>57.7</td></tr><tr><td>code2inv</td><td>14</td><td>8.92</td><td>40.0</td><td>18.1</td><td>36.0</td><td>55.9</td></tr><tr><td>code2inv</td><td>4</td><td>13.29</td><td>30.8</td><td>18.9</td><td>28.2</td><td>68.21</td></tr><tr><td>single</td><td>20</td><td>5.00</td><td>20.2</td><td>10.3</td><td>14.2</td><td>44.8</td></tr><tr><td>single</td><td>14</td><td>10.69</td><td>67.7</td><td>18.6</td><td>49.6</td><td>38.7</td></tr><tr><td>single</td><td>4</td><td>12.88</td><td>55.8</td><td>20.8</td><td>43.2</td><td>55.8</td></tr></table>
348
+
349
+ Table 11: Ablation study with different graph embedding parameterizations and different number of layers. Full end-to-end repair accuracy as well as the accuracies for each primitives are reported. All the numbers are for top-1 prediction.
350
+
351
+ # D 30 RANDOM TESTING POINTS FOR TAJS BASELINE STUDY
352
+
353
+ <table><tr><td colspan="1" rowspan="1">868记2</td><td colspan="1" rowspan="1">记记记7亿</td><td colspan="1" rowspan="1">068u9</td><td colspan="1" rowspan="1">g1uuⅡ</td><td colspan="1" rowspan="1">668L9</td><td colspan="1" rowspan="1">S4ε乙</td><td colspan="1" rowspan="1">U</td></tr><tr><td colspan="1" rowspan="1"> org.civicrm.civicaseDiscordWithDatabasecryptiifo_restkootCaseDetailsFileTab.jshelp.jsROT13.jsindex.jsbefore_router_match.js</td><td colspan="1" rowspan="1"> pizza-totally-rocks geekTalks simple-crafting WTF-AdventurezulipForm.jsindex.jsgather.jsmana.js stream_muting.js</td><td colspan="1" rowspan="1"> matic.js graph-jsCraxi j5-ledsflom-reactgetETHFromFaucet.jspoint.jsdisplay.jsblink.jsquestion.js</td><td colspan="1" rowspan="1">iotdb-mongodbOrca pandora-validationAloChat react-native-with-redux-react-navigation-v2-boilerplatecount.js会index.jsContainer.jssplash.js</td><td colspan="1" rowspan="1">hackcincinnati/siteALFACharts musketeer-shop React-QuizComponent rn-mitrais-mbAdvisors.jscrosshairs.jsorder.jsQuizQuestion.jsListAlbums.js</td><td colspan="1" rowspan="1"> js-dom-and-events-acting-on-events-lab-v-000MEANLetsRollroma2hira js-ajax-hiting-apis-lab--000index.jsarticles.server.route.jsrouter.jsconvert.jsindex.js</td><td colspan="1" rowspan="1">Github Link to Diff</td></tr><tr><td colspan="1" rowspan="1">areAvailable()print()registerSetting()testRecipesoriginisAllowed()printSplit()addSetting() preferenceoriginTrue</td><td colspan="1" rowspan="1">getRecipecheckTalkOwnershipgetBehaviorthis._superadd_messagesgetRecipescheckCommentOwnershipgetMetathis.superadd_old_messages</td><td colspan="1" rowspan="1">ETHFaucetAddressdatagame.draw()blinkDataTypes.STRINGETHFAUCET_ADDRESSdataManagergame.run()strobeDataTypes.TEXT</td><td colspan="1" rowspan="1">thenerase()addAsyncSetup PropTypes.stringCOLOR.DARKmakeexplode()addSyncSetup PropTypes.objectCOLOR.PANTOME</td><td colspan="1" rowspan="1">color.primaryMath.floorDECIMAL(obj).instruction_textsinfo.typecolor.accentMath.roundINTEGER(obj).instruction_textinfo.album_type</td><td colspan="1" rowspan="1">(elem).InnerHTMLapp.paramsusername(elem).valuelogin(elem).innerHTMLapp.paramuserName(elem).innerHTMLname</td><td colspan="1" rowspan="1">Buggy CodeFixed Code</td></tr><tr><td colspan="1" rowspan="1">868□2</td><td colspan="1" rowspan="1">记记记记2</td><td colspan="1" rowspan="1">068u%</td><td colspan="1" rowspan="1">G切uu</td><td colspan="1" rowspan="1">068 9</td><td colspan="1" rowspan="1">C4c乙</td><td colspan="2" rowspan="1">U</td></tr><tr><td colspan="1" rowspan="1">refactoringrefactoringrefactoringrefactoringrefactoring</td><td colspan="1" rowspan="1">refactoringrefactoringrefactoringrefactoringrefactoring</td><td colspan="1" rowspan="1">refactoringrefactoringfunctional bugfunctional bugfunctional bug</td><td colspan="1" rowspan="1">functional bugfunctional bugfunctional bugfunctional bugfunctional bug</td><td colspan="1" rowspan="1">functional bugfunctional bugfunctional bugundefined propertyundefined property</td><td colspan="1" rowspan="1">undefined propertyundefined propertyundefined propertyundefined propertyundefined property</td><td colspan="2" rowspan="1">Bug Type</td></tr><tr><td colspan="1" rowspan="1">Failed importing library</td><td colspan="1" rowspan="1">Failed importing libraryFailed importing library</td><td colspan="1" rowspan="1"></td><td colspan="1" rowspan="1">Failed importing library event s</td><td colspan="1" rowspan="1">Undefined pr oces s</td><td colspan="1" rowspan="1">Failed doc.getElem () Undefined processFailed importing library ut ilFailed doc.getElem ()</td><td colspan="2" rowspan="1">False AlarmTAJS</td></tr><tr><td colspan="1" rowspan="1">exports.testRecipesI</td><td colspan="1" rowspan="1"></td><td colspan="1" rowspan="1">this.game.draw()led.strobe(750)</td><td colspan="1" rowspan="1">serviceProvider.addAsyncSetup(...)</td><td colspan="1" rowspan="1"></td><td colspan="1" rowspan="1">app.params('.</td><td colspan="1" rowspan="1">Prediction</td><td colspan="1" rowspan="4">HOPPITY</td></tr><tr><td colspan="1" rowspan="1"></td><td colspan="1" rowspan="1"></td><td colspan="1" rowspan="1">八</td><td colspan="1" rowspan="1"></td><td colspan="1" rowspan="1"></td><td colspan="1" rowspan="1"></td><td colspan="1" rowspan="1"></td></tr><tr><td colspan="1" rowspan="1">厂</td><td colspan="1" rowspan="1"></td><td colspan="1" rowspan="1"></td><td colspan="1" rowspan="1">厂</td><td colspan="1" rowspan="1"></td><td colspan="1" rowspan="1"></td><td colspan="1" rowspan="1"></td></tr><tr><td colspan="1" rowspan="1"></td><td colspan="1" rowspan="1"></td><td colspan="1" rowspan="1"></td><td colspan="1" rowspan="1"></td><td colspan="1" rowspan="1"></td><td colspan="1" rowspan="1">厂</td><td colspan="1" rowspan="1"></td></tr></table>
parse/train/SJeqs6EFvB/SJeqs6EFvB_content_list.json ADDED
@@ -0,0 +1,1891 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "HOPPITY: LEARNING GRAPH TRANSFORMATIONS TO DETECT AND FIX BUGS IN PROGRAMS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 823,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Elizabeth Dinella∗ University of Pennsylvania ",
17
+ "bbox": [
18
+ 184,
19
+ 170,
20
+ 362,
21
+ 199
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Hanjun Dai∗ Google Brain ",
28
+ "bbox": [
29
+ 452,
30
+ 170,
31
+ 544,
32
+ 198
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Ziyang Li University of Pennsylvania ",
39
+ "bbox": [
40
+ 635,
41
+ 170,
42
+ 813,
43
+ 199
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "Mayur Naik University of Pennsylvania ",
50
+ "bbox": [
51
+ 184,
52
+ 219,
53
+ 362,
54
+ 247
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "Le Song Georgia Tech ",
61
+ "bbox": [
62
+ 455,
63
+ 219,
64
+ 547,
65
+ 247
66
+ ],
67
+ "page_idx": 0
68
+ },
69
+ {
70
+ "type": "text",
71
+ "text": "Ke Wang Visa Research ",
72
+ "bbox": [
73
+ 640,
74
+ 219,
75
+ 735,
76
+ 247
77
+ ],
78
+ "page_idx": 0
79
+ },
80
+ {
81
+ "type": "text",
82
+ "text": "ABSTRACT ",
83
+ "text_level": 1,
84
+ "bbox": [
85
+ 454,
86
+ 285,
87
+ 544,
88
+ 299
89
+ ],
90
+ "page_idx": 0
91
+ },
92
+ {
93
+ "type": "text",
94
+ "text": "We present a learning-based approach to detect and fix a broad range of bugs in Javascript programs. We frame the problem in terms of learning a sequence of graph transformations: given a buggy program modeled by a graph structure, our model makes a sequence of predictions including the position of bug nodes and corresponding graph edits to produce a fix. Unlike previous works built upon deep neural networks, our approach targets bugs that are more diverse and complex in nature (i.e. bugs that require adding or deleting statements to fix). We have realized our approach in a tool called HOPPITY. By training on 290,715 Javascript code change commits on Github, HOPPITY correctly detects and fixes bugs in 9,490 out of 36,361 programs in an end-to-end fashion. Given the bug location and type of the fix, HOPPITY also outperforms the baseline approach by a wide margin. ",
95
+ "bbox": [
96
+ 233,
97
+ 315,
98
+ 766,
99
+ 468
100
+ ],
101
+ "page_idx": 0
102
+ },
103
+ {
104
+ "type": "text",
105
+ "text": "1 INTRODUCTION ",
106
+ "text_level": 1,
107
+ "bbox": [
108
+ 176,
109
+ 489,
110
+ 336,
111
+ 505
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "The sheer size and complexity of modern codebases makes it impossible for them to be bug-free. As a result, a more reasonable and effective strategy has emerged, which aims to prevent bugs in production by applying automated tools to detect and even fix them early in the development process. ",
118
+ "bbox": [
119
+ 174,
120
+ 512,
121
+ 825,
122
+ 554
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "This trend has gained increasing popularity in recent years. Examples include Google’s Tricorder (Sadowski et al., 2015), Facebook’s Getafix (Scott et al., 2019) and Zoncolan, and Microsoft’s Visual Studio IntelliCode. The techniques underlying these tools can be classified into broadly two categories: logical, rule-based techniques (Sadowski et al., 2015) and statistical, data-driven techniques (Allamanis et al., 2018; Pradel & Sen, 2018; Vasic et al., 2019). The former uses manually written rules capturing undesirable code patterns and scans the entire codebase for these classes of bugs. The latter learns to detect abnormal code from a large code corpus using deep neural networks. Despite great strides, however, both kinds of tools are limited in generality because they target error patterns in specific codebases or they target specific bug types. For instance, Zoncolan’s rules are designed to be specifically applicable to Facebook’s codebases, and deep learning models target specialized bugs in variable naming (Allamanis et al., 2018) or binary expressions (Pradel & Sen, 2018). Moreover, the patterns are relatively syntactic, allowing them to be specified by human experts using logical rules or learnt from a corpus of programs. ",
129
+ "bbox": [
130
+ 174,
131
+ 560,
132
+ 825,
133
+ 742
134
+ ],
135
+ "page_idx": 0
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "In this paper, we propose a novel learning-based approach for finding and fixing bugs in Javascript programs automatically. Javascript is a scripting language designed for web application development. It has been the most popular programming language on GitHub since 2014 (Github, 2019). Repairing Javascript code presents a unique challenge as bugs manifest in diverse forms due to unusual language features and the lack of tooling support. Therefore, the primary goal of our approach is generality since it must be effective against a board spectrum of programming errors, such as using wrong operators or identifiers, accessing undefined properties, mishandling variable scopes, triggering type incompatibilites, among many others. Another important novel aspect concerns our approach’s ability to deal with bugs that are more complex and semantic in nature, namely, bugs that require adding or removing statements from a program, which are not considered by prior works. Finally, compared to automated program repair techniques (Le Goues et al., 2019; Scott et al., 2019; Hua et al., 2018; Chen et al., 2018) which require knowledge of bug location, this paper presents an end-to-end approach including localizing bugs, predicting the types of fixes, and generating patches. ",
140
+ "bbox": [
141
+ 174,
142
+ 748,
143
+ 825,
144
+ 901
145
+ ],
146
+ "page_idx": 0
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "",
151
+ "bbox": [
152
+ 171,
153
+ 103,
154
+ 823,
155
+ 132
156
+ ],
157
+ "page_idx": 1
158
+ },
159
+ {
160
+ "type": "text",
161
+ "text": "We design our model architecture in a similar vein as a Neural Turing Machine (NTM) (Graves et al., 2014). It consists of an external memory (a Graph Neural Network) for embedding a buggy program and a central controller (an LSTM) that makes a sequence of primitive actions (e.g., predicting type, generating patch, etc.) to perform a fix. The multi-step decision process is implemented by an autoregressive model. Crucially, our model differs from the standard NTM in how the memory is manipulated: apart from the common read and write operations, the controller can also expand or shrink the memory when adding or deleting nodes in the original graph. ",
162
+ "bbox": [
163
+ 174,
164
+ 138,
165
+ 825,
166
+ 237
167
+ ],
168
+ "page_idx": 1
169
+ },
170
+ {
171
+ "type": "text",
172
+ "text": "We have realized our approach in a tool called HOPPITY. By training on 290,715 Javascript code change commits collected from Github, HOPPITY correctly detects and fixes bugs in 9,490 out of 36,361 programs using a beam size of three. ",
173
+ "bbox": [
174
+ 174,
175
+ 243,
176
+ 825,
177
+ 285
178
+ ],
179
+ "page_idx": 1
180
+ },
181
+ {
182
+ "type": "text",
183
+ "text": "2 MOTIVATING EXAMPLES ",
184
+ "text_level": 1,
185
+ "bbox": [
186
+ 176,
187
+ 294,
188
+ 411,
189
+ 310
190
+ ],
191
+ "page_idx": 1
192
+ },
193
+ {
194
+ "type": "text",
195
+ "text": "Javascript is quite different compared to traditional object-oriented languages (e.g. $\\mathrm { C } { + + }$ , Java, or $\\mathbf { C } \\#$ ). In addition to the weak, dynamic typing discipline of scripting languages, Javascript supports many peculiar features that do not exist in other languages. For example, it allows a property (i.e., a field) to be added to or removed from an object at runtime. As another example, Javascript did not support block-level scoping until recently, allowing a variable defined in a block structure such as a for loop to be exposed to the entire function in which the loop occurs. While the latest ES6 language standard incorporates block-level scoping, developers have been programming without it for decades, resulting in a large body of legacy code. Finally, Javascript’s eval function, which interprets and executes a string as a code fragment, is widely regarded as a major source of bugs and vulnerabilities. All of these aspects make programming in Javascript a frustrating and error-prone experience. ",
196
+ "bbox": [
197
+ 173,
198
+ 318,
199
+ 825,
200
+ 457
201
+ ],
202
+ "page_idx": 1
203
+ },
204
+ {
205
+ "type": "image",
206
+ "img_path": "images/5d5db4d59feaf5fb2d4045cba10080cbb7a131b8e8d7ef8e54625067bc4119e3.jpg",
207
+ "image_caption": [
208
+ "(c) copy function should have also been included in (d) parseInt should have been removed because $= = = =$ the highlighted list. implies this.value is an integer. ",
209
+ "Figure 1: Example programs that illustrate limitations of existing approaches inculding both rulebased static analyzers and neural-based bug predictors. "
210
+ ],
211
+ "image_footnote": [],
212
+ "bbox": [
213
+ 168,
214
+ 470,
215
+ 828,
216
+ 646
217
+ ],
218
+ "page_idx": 1
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "Static analyzers aim to detect common coding errors in Javascript programs by applying logical rulebased reasoning on source code. TAJS (Jensen et al., 2009) and ESLint (Zakas, 2013) are prominent examples. These tools face important challenges to be effective. We present several examples in Figure 1 to illustrate their limitations. Due to the complex nature of client-side web APIs, TAJS and ESLint choose to ignore analyzing built-in libraries for the sake of scalability. As depicted in Figure 1a, when developers mistakenly capitalize the first letter of innerHTML, a property of class Element in DOM (Document Object Model), both analyzers fail to catch the error. Javascript will then silently allow developers to set the previously non-existent property InnerHTML to the empty string. Later, when developers attempt to access the intended property, innerHTML, the program will crash and potentially cause a security vulnerability or incur a costly debugging experience. Additionally, static analyzers can never deal with functional bugs (i.e., errors that violate the program specification and yet conform to the coding rules). Figure 1b shows one such example. The goal is to split a string using regular expressions. However, the program incorrectly splits the input ' and ' into ['', and ''] instead of $[ { \\bf \\Phi } ^ { \\prime \\prime } , { \\bf \\Phi } ^ { \\prime \\prime } ]$ , which is what the developer intended. Since the error is simply a mismatch between the developer’s implicit specification and implementation, static analyzers are incapable of catching it. ",
223
+ "bbox": [
224
+ 174,
225
+ 729,
226
+ 825,
227
+ 924
228
+ ],
229
+ "page_idx": 1
230
+ },
231
+ {
232
+ "type": "image",
233
+ "img_path": "images/debfa503638c9e415a26e59edbafb8dbed10fbd181589d19251d769b600dfc54.jpg",
234
+ "image_caption": [
235
+ "Figure 2: Code repair as graph transformation. Each step the source code graph is edited via one of the operator module until STOP is triggered by controller. "
236
+ ],
237
+ "image_footnote": [],
238
+ "bbox": [
239
+ 174,
240
+ 88,
241
+ 813,
242
+ 258
243
+ ],
244
+ "page_idx": 2
245
+ },
246
+ {
247
+ "type": "text",
248
+ "text": "",
249
+ "bbox": [
250
+ 174,
251
+ 311,
252
+ 823,
253
+ 340
254
+ ],
255
+ "page_idx": 2
256
+ },
257
+ {
258
+ "type": "text",
259
+ "text": "The bugs that static analyzers missed in both cases are in hindsight quite obvious to human programmers. The criteria they use is very simple: any code snippet that seems to deviate from common code patterns is likely to be buggy. This is precisely the observation that our approach seeks to mimic. In particular, if a model observes a property or an unusual way of splitting strings that never appeared in the training data, it is likely to recognize those abnormal code fragments as potential bugs. The main advantage of our approach over existing neural-based bug detectors (Allamanis et al., 2018; Pradel & Sen, 2018; Vasic et al., 2019) is its generality. Unlike prior works that target specific classes of bugs (e.g., variable naming issues or binary expression bugs), we train a single model to deal with a wide range of bug types, encompassing all previously proposed ones. Compared to past approaches that leverage a graph-based neural network model (Allamanis et al., 2018), our model is capable of more sophisticated transformations such as adding or removing nodes, as shown in Figure 1c and 1d. Finally, our model not only locates but also fixes bugs, whereas program repair (Le Goues et al., 2019; Scott et al., 2019; Hua et al., 2018; Chen et al., 2018) or bug localization (Ball et al., 2003; Jose & Majumdar, 2011; Wang et al., 2019) techniques only solve a single task. ",
260
+ "bbox": [
261
+ 173,
262
+ 347,
263
+ 826,
264
+ 542
265
+ ],
266
+ "page_idx": 2
267
+ },
268
+ {
269
+ "type": "text",
270
+ "text": "3 MODEL ",
271
+ "text_level": 1,
272
+ "bbox": [
273
+ 174,
274
+ 550,
275
+ 269,
276
+ 566
277
+ ],
278
+ "page_idx": 2
279
+ },
280
+ {
281
+ "type": "text",
282
+ "text": "We model the problem of detecting and repairing bugs in programs as a structured prediction problem on a graph-based representation of programs. Given a graph $g _ { b u g }$ that represents a buggy program, we wish to predict a graph $g _ { f i x }$ that represents the fixed program. Our model aims to capture the structured prediction by a sequence of up to $T$ steps of graph transformations: ",
283
+ "bbox": [
284
+ 173,
285
+ 574,
286
+ 825,
287
+ 630
288
+ ],
289
+ "page_idx": 2
290
+ },
291
+ {
292
+ "type": "equation",
293
+ "img_path": "images/0103504e54b020eebcd2ba17427b2ea4faa5994e7bd64f0da7b5f5151b25031f.jpg",
294
+ "text": "$$\np ( g _ { f i x } | g _ { b u g } ; \\theta ) = p ( g _ { 1 } | g _ { b u g } ; \\theta ) p ( g _ { 2 } | g _ { 1 } ; \\theta ) \\ldots p ( g _ { f i x } | g _ { T - 1 } ; \\theta )\n$$",
295
+ "text_format": "latex",
296
+ "bbox": [
297
+ 279,
298
+ 633,
299
+ 686,
300
+ 651
301
+ ],
302
+ "page_idx": 2
303
+ },
304
+ {
305
+ "type": "text",
306
+ "text": "The high-level overview of the graph sequence transformation is shown in Figure 2. Different programs may need a different number of steps $T ( g _ { b u g } )$ which is also determined by the model. ",
307
+ "bbox": [
308
+ 176,
309
+ 654,
310
+ 820,
311
+ 683
312
+ ],
313
+ "page_idx": 2
314
+ },
315
+ {
316
+ "type": "text",
317
+ "text": "We first introduce our representation module for programs in Sec 3.1. We then elucidate each step of the above transformation in Sec 3.2. Finally, we summarize and present the full model in Sec 3.3. ",
318
+ "bbox": [
319
+ 174,
320
+ 689,
321
+ 823,
322
+ 717
323
+ ],
324
+ "page_idx": 2
325
+ },
326
+ {
327
+ "type": "text",
328
+ "text": "3.1 PROGRAM REPRESENTATION ",
329
+ "text_level": 1,
330
+ "bbox": [
331
+ 176,
332
+ 722,
333
+ 413,
334
+ 736
335
+ ],
336
+ "page_idx": 2
337
+ },
338
+ {
339
+ "type": "text",
340
+ "text": "Programs written in a high-level language have rich structure. Researchers have proposed graph-based representations to capture this structure (Allamanis et al., 2018). We start with this approach of representing programs using graphs with certain modifications for our task. ",
341
+ "bbox": [
342
+ 176,
343
+ 742,
344
+ 823,
345
+ 784
346
+ ],
347
+ "page_idx": 2
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "As shown in the left part of Figure 2, we first parse the program’s source code into an abstract syntax tree (AST) form that captures the program’s syntactic structure. We then connect the leaf nodes with SuccToken edges. Unlike previous approaches, we additionally add value nodes that store the actual content of the leaf nodes, with special ValueLink edges connecting them together. The purpose of introducing this additional set of nodes is to provide a name-independent strategy for code representation and modification, which we elucidate in the next section. Hereafter, we use $g _ { f i x } , g _ { b u g }$ or $g$ in general to represent either the source code or the corresponding graph structure. ",
352
+ "bbox": [
353
+ 174,
354
+ 790,
355
+ 825,
356
+ 888
357
+ ],
358
+ "page_idx": 2
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "After representing the program as a graph, we use a Graph Neural Network (GNN) (Scarselli et al., 2008) to map the graph into a representation in a fixed dimensional vector space. Specifically, given a graph $g = ( V , E )$ with set of nodes $V$ and edges $E$ , we need a function $f ( \\boldsymbol { g } ) \\mapsto ( \\mathbb { R } ^ { d } , \\mathbb { R } ^ { | V | \\times d } )$ to obtain the $d$ -dimensional representation of graph $g$ (denoted as $\\vec { g } )$ , as well as representations of individual nodes $v \\in V$ (denoted as $\\vec { v }$ ). To parameterize $f ( \\cdot )$ , we employ the form in GIN ( $\\mathrm { X u }$ et al., 2018), with our adaptation to our multigraph for program representation in the following manner: ",
363
+ "bbox": [
364
+ 174,
365
+ 895,
366
+ 825,
367
+ 924
368
+ ],
369
+ "page_idx": 2
370
+ },
371
+ {
372
+ "type": "image",
373
+ "img_path": "images/a2cc2ae4322d124cf58d65e62b0b650dc2a5f95c8603f0cf15ae0a1c0490a56b.jpg",
374
+ "image_caption": [
375
+ "Figure 3: Graph edit operators with low-level primitives. "
376
+ ],
377
+ "image_footnote": [],
378
+ "bbox": [
379
+ 171,
380
+ 84,
381
+ 826,
382
+ 308
383
+ ],
384
+ "page_idx": 3
385
+ },
386
+ {
387
+ "type": "text",
388
+ "text": "",
389
+ "bbox": [
390
+ 173,
391
+ 347,
392
+ 826,
393
+ 404
394
+ ],
395
+ "page_idx": 3
396
+ },
397
+ {
398
+ "type": "equation",
399
+ "img_path": "images/b7168a9bac585efec6eb75c06a41342cc380a2ca446564ae2a7dff6d7d219027.jpg",
400
+ "text": "$$\n\\begin{array} { r l } & { h _ { v } ^ { ( l + 1 ) , k } = \\sigma ( \\sum _ { u \\in \\mathcal { N } ^ { k } ( v ) } \\mathbf { W } _ { 1 } ^ { l , k } h _ { u } ^ { ( l ) } ) , \\forall k \\in \\{ 1 , 2 , \\ldots , K \\} } \\\\ & { h _ { v } ^ { ( l + 1 ) } = \\sigma ( \\mathbf { W } _ { 2 } ^ { l } [ h _ { v } ^ { ( l + 1 ) , 1 } , h _ { v } ^ { ( l + 1 ) , 2 } , \\ldots , h _ { v } ^ { ( l + 1 ) , K } ] + h _ { v } ^ { ( l ) } ) } \\end{array}\n$$",
401
+ "text_format": "latex",
402
+ "bbox": [
403
+ 295,
404
+ 406,
405
+ 669,
406
+ 452
407
+ ],
408
+ "page_idx": 3
409
+ },
410
+ {
411
+ "type": "text",
412
+ "text": "where $\\mathbf { W } _ { 1 } ^ { l , k } \\in \\mathbb { R } ^ { d \\times d }$ , $\\mathbf { W } _ { 2 } ^ { l } \\in \\mathbb { R } ^ { d K \\times d }$ are model parameters and $\\sigma ( \\cdot )$ is tanh in this implementation. $K$ is the total number of edge types in this multi-graph representation. In the end, the node embedding is $\\vec { v } = h _ { v } ^ { ( L ) }$ , where $L$ is the total number of propagations in the GNN. $\\mathcal { N } ^ { k } ( v )$ is the set of neighbors of node $v$ that are connected by edge with type $k$ . Following GIN, the graph representation $\\vec { g }$ is the aggregation of $h _ { v } ^ { l } , \\forall l \\in 0 , 1 , \\therefore , \\bar { L }$ . We use max pooling to aggregate $\\mathsf { \\bar { h } } _ { v } ^ { l }$ for each $l$ , and then take the average of these $L + 1$ vectors to obtain $\\vec { g }$ . ",
413
+ "bbox": [
414
+ 173,
415
+ 454,
416
+ 825,
417
+ 544
418
+ ],
419
+ "page_idx": 3
420
+ },
421
+ {
422
+ "type": "text",
423
+ "text": "Initially, we use the node type as one-hot features as a starting value for either obtained from the AST representation, or from the local value ta $h _ { v } ^ { ( 0 ) }$ , where the types areas shown in Figure 2. Note that we don’t use features like variable names or function names in this graph representation, as different programs may follow different naming conventions. Instead, we focus on the syntactic structure of the source code, so as to enable naming-agnostic representation across different programs. ",
424
+ "bbox": [
425
+ 173,
426
+ 550,
427
+ 826,
428
+ 623
429
+ ],
430
+ "page_idx": 3
431
+ },
432
+ {
433
+ "type": "text",
434
+ "text": "3.2 ONE-STEP GRAPH EDIT ",
435
+ "text_level": 1,
436
+ "bbox": [
437
+ 174,
438
+ 628,
439
+ 375,
440
+ 642
441
+ ],
442
+ "page_idx": 3
443
+ },
444
+ {
445
+ "type": "text",
446
+ "text": "There are five types of operators to choose from for a single step graph edit, namely, adding a node (ADD), deleting a node (DEL), replacing a node value (REP_VAL), replacing a node type (REP_TYPE) and stop (NO_OP). When combined with multi-step edits, these operators suffice to capture a rich variety of code modifications. These operators share some common low-level primitives, such as finding the location, predicting value, etc. We first introduce the individual low-level primitives and then present how to assemble these for each type of graph edit operator. ",
447
+ "bbox": [
448
+ 173,
449
+ 647,
450
+ 825,
451
+ 732
452
+ ],
453
+ "page_idx": 3
454
+ },
455
+ {
456
+ "type": "text",
457
+ "text": "3.2.1 LOW-LEVEL PRIMITIVES ",
458
+ "text_level": 1,
459
+ "bbox": [
460
+ 174,
461
+ 736,
462
+ 398,
463
+ 751
464
+ ],
465
+ "page_idx": 3
466
+ },
467
+ {
468
+ "type": "text",
469
+ "text": "Our low-level primitives contain location, type, and value prediction. These primitives can be combined for different operators later on. In this section, we assume the availability of a controller, represented as $\\vec { c } \\in \\mathbb R ^ { d }$ . It keeps track of the global state, including the original source code, as well as the edits made so far. We will elaborate this when we assemble different primitives together. ",
470
+ "bbox": [
471
+ 174,
472
+ 756,
473
+ 825,
474
+ 811
475
+ ],
476
+ "page_idx": 3
477
+ },
478
+ {
479
+ "type": "text",
480
+ "text": "Location The location primitive locates a specific position in the source code. While it corresponds to region selection in the original text representation, with the graph representation, we can easily treat it as a node selection step. As different programs have different numbers of nodes, we employ a pointer network (Vinyals et al., 2015) into the graph structure. Specifically, after obtaining the node embeddings $\\{ \\vec { v } \\} _ { v \\in V }$ , we select the node via $l o \\bar { c } ( \\bar { \\vec { c } } , g ) = \\arg \\operatorname* { m a x } _ { v \\in V } \\vec { v } ^ { \\top } \\bar { \\vec { c } }$ for simplicity. ",
481
+ "bbox": [
482
+ 173,
483
+ 818,
484
+ 825,
485
+ 890
486
+ ],
487
+ "page_idx": 3
488
+ },
489
+ {
490
+ "type": "text",
491
+ "text": "Value The value primitive assigns a value for a leaf node in the AST. Instead of predicting the replacement value using a language generative model (Chen et al., 2018) or GNN score function (Allamanis et al., 2018), we adopt the attention mechanism to let the model to choose from either the values appearing in the current file (local value table), or a collection of global values that are common for the specific language. Let $D _ { v a l }$ be the global dictionary of commonly used leaf-node values in the language, where each item $i _ { v } \\in D _ { v a l }$ is associated with a vector representation $\\vec { i _ { v } } \\in \\mathbb R ^ { d }$ . The local value table is denoted as $V _ { v a l }$ which is a subset of the nodes in current graph. Then, the value is predicted via $\\begin{array} { r } { v a l ( \\vec { c } , g ) = \\operatorname * { a r g m a x } _ { t \\in D _ { v a l } \\cup V _ { v a l } } \\vec { t } ^ { \\top } \\vec { c } . } \\end{array}$ . Again we use inner product simply for efficiency, while more expressive score functions can also be used. ",
492
+ "bbox": [
493
+ 173,
494
+ 895,
495
+ 825,
496
+ 924
497
+ ],
498
+ "page_idx": 3
499
+ },
500
+ {
501
+ "type": "text",
502
+ "text": "",
503
+ "bbox": [
504
+ 173,
505
+ 103,
506
+ 825,
507
+ 204
508
+ ],
509
+ "page_idx": 4
510
+ },
511
+ {
512
+ "type": "text",
513
+ "text": "Type The type primitive assigns the type for non-terminal nodes in an AST. As the total possible number of types is finite and fixed for a given language, the type prediction is simply a multiclass classification problem. However, we can utilize the AST grammar checker with contextual information to prune the output space. To predict the type of a given non-terminal node, we can obtain its parent node and current children. Then, by looping over the valid production rules at the current location, we can obtain a list of all valid types. The final type is only chosen from this set. ",
514
+ "bbox": [
515
+ 174,
516
+ 210,
517
+ 825,
518
+ 296
519
+ ],
520
+ "page_idx": 4
521
+ },
522
+ {
523
+ "type": "text",
524
+ "text": "3.2.2 GRAPH EDIT OPERATORS",
525
+ "text_level": 1,
526
+ "bbox": [
527
+ 174,
528
+ 301,
529
+ 401,
530
+ 315
531
+ ],
532
+ "page_idx": 4
533
+ },
534
+ {
535
+ "type": "text",
536
+ "text": "The $t$ -th round of edit starts with the current graph $g _ { t - 1 }$ , the corresponding graph embedding, and the ‘macro-context’ embedding $\\overrightarrow { c _ { M } } _ { t - 1 }$ that captures the edit history so far. Every type of edit operation (excluding NO_OP), requires prediction of the buggy location. So, in each round, the location primitive is invoked to determine the node to target. Then the edit type $e$ that is feasible at this location $v$ is predicted out of the five operators. A ‘micro-context’ embedding $\\overrightarrow { c _ { m _ { t } } }$ is obtained from the macro embedding updated by two LSTM calls with location node embedding $\\vec { v }$ and operator embedding $\\vec { e } .$ . To summarize: ",
537
+ "bbox": [
538
+ 173,
539
+ 320,
540
+ 825,
541
+ 419
542
+ ],
543
+ "page_idx": 4
544
+ },
545
+ {
546
+ "type": "equation",
547
+ "img_path": "images/157ffc9373a7c7bfa79aa1d9975e7345563fcd3e5975e20cc94cee2600908f11.jpg",
548
+ "text": "$$\n\\overrightarrow { c _ { M _ { t } } } ^ { \\prime } = \\mathrm { L S T M } ( \\overrightarrow { g _ { t - 1 } } | \\overrightarrow { c _ { M _ { t - 1 } } } ) , \\overrightarrow { c _ { m _ { t } } } = \\mathrm { L S T M } ( \\overrightarrow { e _ { t } } | \\mathrm { L S T M } ( \\overrightarrow { v _ { t } ^ { \\prime } } | \\overrightarrow { c _ { M _ { t } } } ) ) ,\n$$",
549
+ "text_format": "latex",
550
+ "bbox": [
551
+ 285,
552
+ 426,
553
+ 710,
554
+ 445
555
+ ],
556
+ "page_idx": 4
557
+ },
558
+ {
559
+ "type": "text",
560
+ "text": "The micro-context embedding is used as the controller throughout the process of each operator. In the following content, we present these operators in detail. ",
561
+ "bbox": [
562
+ 173,
563
+ 454,
564
+ 823,
565
+ 482
566
+ ],
567
+ "page_idx": 4
568
+ },
569
+ {
570
+ "type": "text",
571
+ "text": "ADD This operation adds a new node to the graph. Unlike in Li et al. (2018) where the node and corresponding edges are added in separate stages, which would introduce extra complexity, we introduce a simple mechanism that can uniquely add a node and corresponding edges. As is shown in Figure 3, this process invokes one location primitive, one value primitive, and one type primitive. The location primitive invoked before the edit (i.e., node $v$ ) determines the parent of the node to be added, while the location primitive called during the edit chooses the left sibling of the node. In a special case where the parent node does not have any children, then such left sibling node is set to the parent node itself. With this information, we can uniquely determine the position to insert into the AST. Finally, the corresponding edges—SuccToken, ValueLink, and AST edges—can automatically be inferred with the location of new node to be added. ",
572
+ "bbox": [
573
+ 173,
574
+ 488,
575
+ 825,
576
+ 627
577
+ ],
578
+ "page_idx": 4
579
+ },
580
+ {
581
+ "type": "text",
582
+ "text": "As this process is autoregressive, the micro-context embedding is kept updated with all the primitive calls. For this specific operator, the context is updated in the order of: $\\overrightarrow { c _ { m 1 } } = \\mathrm { L S T M } ( \\overrightarrow { v _ { s i b l i n g } } | c _ { m } ^ { } )$ , $c _ { m 2 } ^ { } = \\mathrm { L S T M } ( \\bar { v } a l ( c _ { m 1 } ^ { } , \\bar { g } ) | c _ { m 1 } ^ { } )$ and $c _ { m 3 } ^ { } = \\mathrm { L S T M } ( t y p e ( c _ { m 2 } ^ { } , g ) | c _ { m 2 } ^ { } )$ . In the end, $\\vec { c } _ { A D D } = c _ { m 3 } ^ { }$ summarizes the process. ",
583
+ "bbox": [
584
+ 174,
585
+ 635,
586
+ 825,
587
+ 690
588
+ ],
589
+ "page_idx": 4
590
+ },
591
+ {
592
+ "type": "text",
593
+ "text": "DEL This operator deletes a node and corresponding edges in the graph. If it is a non-terminal node in the AST, then the corresponding subtree is removed as well. The micro-context embedding is updated by the LSTM via the embedding of the node being deleted. ",
594
+ "bbox": [
595
+ 173,
596
+ 696,
597
+ 825,
598
+ 739
599
+ ],
600
+ "page_idx": 4
601
+ },
602
+ {
603
+ "type": "text",
604
+ "text": "REP_VAL This operator replaces the value of a leaf (terminal) node in the AST. This procedure requires the prediction the value. The leaf node is linked to the new value node in the internal value table via a ValueLink edge. Also, the micro-context embedding is updated by the LSTM via the embedding of the corresponding node and value. ",
605
+ "bbox": [
606
+ 173,
607
+ 746,
608
+ 825,
609
+ 803
610
+ ],
611
+ "page_idx": 4
612
+ },
613
+ {
614
+ "type": "text",
615
+ "text": "REP_TYPE This operator changes the type of a non-terminal node, which involves type primitive steps. The micro-context embedding is updated by the LSTM via the embedding of the corresponding node and type. ",
616
+ "bbox": [
617
+ 174,
618
+ 809,
619
+ 825,
620
+ 852
621
+ ],
622
+ "page_idx": 4
623
+ },
624
+ {
625
+ "type": "text",
626
+ "text": "NO_OP This op does not change the graph. It simply denotes the end of the sequence of graph edits. ",
627
+ "bbox": [
628
+ 173,
629
+ 858,
630
+ 823,
631
+ 873
632
+ ],
633
+ "page_idx": 4
634
+ },
635
+ {
636
+ "type": "text",
637
+ "text": "3.3 GRAPH TRANSFORMATION ",
638
+ "text_level": 1,
639
+ "bbox": [
640
+ 174,
641
+ 880,
642
+ 400,
643
+ 893
644
+ ],
645
+ "page_idx": 4
646
+ },
647
+ {
648
+ "type": "text",
649
+ "text": "Our end-to-end model for graph transformation inference is shown in Alg 1. We denote the buggy graph $g _ { b u g }$ as $g _ { 0 }$ for simplicity. Then, for the $t$ -th graph edit, the following steps are performed: ",
650
+ "bbox": [
651
+ 173,
652
+ 900,
653
+ 825,
654
+ 928
655
+ ],
656
+ "page_idx": 4
657
+ },
658
+ {
659
+ "type": "text",
660
+ "text": "1. Obtain the graph representation $\\overrightarrow { g _ { t - 1 } }$ and node embeddings. Update the macro-context embedding using $\\overrightarrow { g _ { t - 1 } }$ ; 2. Choose edit location $v _ { t }$ by performing location primitive and update the context embedding; 3. Pick the graph edit operator $e _ { t }$ that is compatible with $v _ { t }$ ; Use both $v _ { t }$ and $e _ { t }$ to obtain the micro-context embedding. 4. Perform the edit, obtain the corresponding micro-context summary $\\overrightarrow { c _ { e _ { t } } }$ and update the macro-context embedding. 5. If the edit is not NO_OP, then go back to step 1; otherwise return the graph. ",
661
+ "bbox": [
662
+ 173,
663
+ 125,
664
+ 452,
665
+ 319
666
+ ],
667
+ "page_idx": 5
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "Algorithm 1 Transformation inference of $\\overline { { p ( g _ { f i x } | g _ { b u g } ) } }$ ",
672
+ "text_level": 1,
673
+ "bbox": [
674
+ 465,
675
+ 123,
676
+ 823,
677
+ 138
678
+ ],
679
+ "page_idx": 5
680
+ },
681
+ {
682
+ "type": "text",
683
+ "text": "1: Input $g _ { b u g } \\sim \\mathcal { D }$ and model parameters $\\theta$ . \n2: Obtain $\\vec { g _ { 0 } }$ , $\\{ \\vec { v } _ { v \\in g _ { b u g } } \\} = f _ { 0 } ( g _ { b u g } )$ , let $c _ { M _ { 0 } } ^ { }$ be null. \n3: for $t = 1$ to $T$ do \n4: Obtain $\\overrightarrow { c _ { M _ { t } } ^ { \\prime } } = \\mathrm { L S T M } ( \\overrightarrow { g _ { t - 1 } } | \\overrightarrow { c _ { M _ { t - 1 } } } )$ . \n5: Choose location $v _ { t }$ , then edit type $e _ { t }$ ; \n6: if $e _ { t } = \\tt N O \\_ O P$ then \n7: set $g _ { T } = g _ { t - 1 }$ and exit the loop. \n8: end if \n9: Perform operator $e _ { t }$ with $\\overrightarrow { c _ { m _ { t . } } }$ obtained by $\\operatorname { E q } 3$ . \n10: Get new graph $g _ { t }$ , update $\\xrightarrow [ { \\boldsymbol { c } _ { M _ { t } } } ] { }$ with $\\overrightarrow { c _ { e _ { t } } }$ . \n11: end for \n12: Return gT ",
684
+ "bbox": [
685
+ 470,
686
+ 143,
687
+ 820,
688
+ 315
689
+ ],
690
+ "page_idx": 5
691
+ },
692
+ {
693
+ "type": "text",
694
+ "text": "This process repeats until it reaches the maximum steps $T$ or the NO_OP operator is selected. Note that our framework can capture the situation when the input program is bug-free. In this case, the NO_OP operator is supposed to be triggered at the first step. Also, each edit step is not limited to a single node level operation. It can be extended to modify a certain substructure (e.g., replace a tree node with one of its children). This in turn allows program repair to be performed in fewer edit steps. ",
695
+ "bbox": [
696
+ 173,
697
+ 327,
698
+ 825,
699
+ 396
700
+ ],
701
+ "page_idx": 5
702
+ },
703
+ {
704
+ "type": "text",
705
+ "text": "4 LEARNING ",
706
+ "text_level": 1,
707
+ "bbox": [
708
+ 174,
709
+ 405,
710
+ 295,
711
+ 421
712
+ ],
713
+ "page_idx": 5
714
+ },
715
+ {
716
+ "type": "text",
717
+ "text": "Given the dataset $\\mathcal { D } = \\{ ( g _ { b u g } ^ { ( i ) } , g _ { f i x } ^ { ( i ) } ) \\} _ { i = 1 } ^ { | \\mathcal { D } | }$ which consists of pairs of buggy code and the fixed code, the learning objective maxθ $\\bar { \\mathbb { E } } _ { ( g _ { b u g } , g _ { f i x } ) \\sim \\mathcal { D } } p ( g _ { f i x } | g _ { b u g } ; \\theta )$ maximizes the likelihood of fixes. ",
718
+ "bbox": [
719
+ 174,
720
+ 430,
721
+ 823,
722
+ 467
723
+ ],
724
+ "page_idx": 5
725
+ },
726
+ {
727
+ "type": "text",
728
+ "text": "Since the probability is factorized according to $\\operatorname { E q }$ where a sequence of transformations is performed, we parse the source code using the SHIFT AST format, and utilize a JSON diff toolbox to compile the code differences into a sequence of AST edits. This serves as the fine-grained supervision mechanism for our graph transformation formulation. Thus, the MLE objective above is realized with the sum of cross entropy loss at each step of graph edits. During training, we jointly optimize the graph representation module $\\{ f _ { t } ( \\cdot ) \\} _ { t = 1 } ^ { T }$ , each of the operator module and the controller module which is parameterized by LSTM. We use the Adam optimizer with $\\beta _ { 1 } = 0 . 9 , \\beta _ { 2 } = 0 . 9 9$ and initial learning rate of $1 0 ^ { - 3 }$ . Due to the large size of each sample, we use a small batch size of 10 during training. Furthermore, to stabilize the training, we apply the gradient clip with the maximum norm of 5. ",
729
+ "bbox": [
730
+ 173,
731
+ 472,
732
+ 825,
733
+ 597
734
+ ],
735
+ "page_idx": 5
736
+ },
737
+ {
738
+ "type": "text",
739
+ "text": "5 INFERENCE ",
740
+ "text_level": 1,
741
+ "bbox": [
742
+ 174,
743
+ 606,
744
+ 302,
745
+ 621
746
+ ],
747
+ "page_idx": 5
748
+ },
749
+ {
750
+ "type": "text",
751
+ "text": "The inference procedure involves searching for the maximum in the combinatorial space: arg $\\operatorname* { m a x } _ { g _ { f i x } } p ( g _ { f i x } | g _ { b u g } ; \\theta )$ . Since the search space is very large, however, we use beam-search to approximately find the fixes with highest probabilities. ",
752
+ "bbox": [
753
+ 176,
754
+ 628,
755
+ 823,
756
+ 671
757
+ ],
758
+ "page_idx": 5
759
+ },
760
+ {
761
+ "type": "text",
762
+ "text": "Specifically, we maintain a pool of partially fixed programs $\\{ \\tilde { g } \\}$ , which starts with simply the single buggy program $g _ { b u g }$ . The pool size is limited by the beam-search size $B$ . For each $\\tilde { g }$ , we propose the top $B$ locations to be modified, top $B$ operators or top $B$ primitives (location, type, value), depending on the current stage of the edit $\\tilde { g }$ . Then the total joint one-step graph transformation solutions are ranked together based on the joint log-likelihood, and the top $B$ solutions with the largest likelihood are kept in the pool for the next round of beam search. ",
763
+ "bbox": [
764
+ 174,
765
+ 678,
766
+ 825,
767
+ 762
768
+ ],
769
+ "page_idx": 5
770
+ },
771
+ {
772
+ "type": "text",
773
+ "text": "Unlike beam search for language models where the vocabulary size is fixed, in our setting, the available choices or even the steps of inference may vary (e.g., the ADD operator has more steps of primitive calls than the DEL operator). Our implementation is based on PyTorch with customized GPU kernels to enable efficient inference on GPUs. ",
774
+ "bbox": [
775
+ 174,
776
+ 768,
777
+ 825,
778
+ 824
779
+ ],
780
+ "page_idx": 5
781
+ },
782
+ {
783
+ "type": "text",
784
+ "text": "6 EXPERIMENTS ",
785
+ "text_level": 1,
786
+ "bbox": [
787
+ 176,
788
+ 834,
789
+ 328,
790
+ 849
791
+ ],
792
+ "page_idx": 5
793
+ },
794
+ {
795
+ "type": "text",
796
+ "text": "Dataset Our model is trained and evaluated on a corpus of nearly half a million data points. We have created a robust system to continuously collect small changes in Javascript programs from Github. Given a commit, we download the Javascript file before and after the change: $( s r c _ { b u g g y } , s r c _ { f i x e d } )$ . Commits can contain many types of changes such as feature additions, refactorings, bug fixes, etc. In an attempt to filter our dataset to only include bug fixes, we use a heuristic based on the number of changes to the AST. Our insight is that a commit with a smaller number of AST differences is more likely to be a bug fix than a commit containing large changes. Thus for the experiments, we use three different datasets: OneDiff with precisely one edit; ZeroOneDiff with zero and one edit and ZeroOneTwoDiff with zero, one or two edits. We additionally filter out data points with ASTs larger than 500 nodes as a parameter in our system. A detailed overview of our corpus crawler is available in Appendix B. ",
797
+ "bbox": [
798
+ 174,
799
+ 858,
800
+ 825,
801
+ 914
802
+ ],
803
+ "page_idx": 5
804
+ },
805
+ {
806
+ "type": "table",
807
+ "img_path": "images/260307005ec8034ecc489793ca6e552c2c8fa7cd80cc7fb9319ed20cd3a63470.jpg",
808
+ "table_caption": [
809
+ "Table 1: Statistic of OneDiff dataset. See appendix for more information of other dataset. "
810
+ ],
811
+ "table_footnote": [],
812
+ "table_body": "<table><tr><td></td><td>ADD</td><td>REP_TYPE</td><td>REP_VAL</td><td>DEL</td><td>total</td></tr><tr><td>train</td><td>6,473</td><td>1,864</td><td>251,097</td><td>31,281</td><td>290,715</td></tr><tr><td>validate</td><td>790</td><td>245</td><td>31,357</td><td>3,957</td><td>36,349</td></tr><tr><td>test</td><td>796</td><td>233</td><td>31,387</td><td>3,945</td><td>36,361</td></tr></table>",
813
+ "bbox": [
814
+ 272,
815
+ 102,
816
+ 725,
817
+ 171
818
+ ],
819
+ "page_idx": 6
820
+ },
821
+ {
822
+ "type": "table",
823
+ "img_path": "images/6804b2678b6e4d02976053503ce62f38875916e8f457aa9c4a2cc4643a24e5fa.jpg",
824
+ "table_caption": [],
825
+ "table_footnote": [
826
+ "Table 2: Evaluation of model on the OneDiff dataset: accuracy $( \\% )$ "
827
+ ],
828
+ "table_body": "<table><tr><td rowspan=\"3\"></td><td colspan=\"2\">Total</td><td colspan=\"2\">Location</td><td>Operator</td><td colspan=\"2\">Value</td><td colspan=\"2\">Type</td></tr><tr><td>Top-3</td><td>Top-1</td><td>Top-3</td><td>Top-1</td><td>Top-1</td><td>Top-3</td><td>Top-1</td><td>Top-3</td><td>Top-1</td></tr><tr><td>TOTAL</td><td>26.1</td><td>14.2</td><td>35.5</td><td>20.4</td><td>34.4</td><td>52.3</td><td>29.1</td><td>76.1</td><td>66.7</td></tr><tr><td>ADD</td><td>52.9</td><td>39.2</td><td>69.6</td><td>51.4</td><td>70.6</td><td>65.7</td><td>55.1</td><td>76.8</td><td>68.5</td></tr><tr><td>REP_VAL</td><td>23.4</td><td>11.9</td><td>33.3</td><td>18.5</td><td>31.7</td><td>53.0</td><td>28.8</td><td>-</td><td>1</td></tr><tr><td>REP_TYPE</td><td>71.7</td><td>52.4</td><td>73.0</td><td>52.8</td><td>79.4</td><td>-</td><td>-</td><td>74.7</td><td>61.0</td></tr><tr><td>DEL</td><td>39.6</td><td>24.8</td><td>44.0</td><td>27.5</td><td>45.8</td><td>1</td><td>1</td><td>1</td><td>二</td></tr><tr><td>Random</td><td>.08</td><td>.07</td><td>2.28</td><td>1.4</td><td>27.7</td><td>.01</td><td>.01</td><td>.27</td><td>0</td></tr></table>",
829
+ "bbox": [
830
+ 174,
831
+ 195,
832
+ 821,
833
+ 333
834
+ ],
835
+ "page_idx": 6
836
+ },
837
+ {
838
+ "type": "text",
839
+ "text": "",
840
+ "bbox": [
841
+ 174,
842
+ 377,
843
+ 825,
844
+ 476
845
+ ],
846
+ "page_idx": 6
847
+ },
848
+ {
849
+ "type": "text",
850
+ "text": "6.1 EVALUATION ",
851
+ "text_level": 1,
852
+ "bbox": [
853
+ 174,
854
+ 486,
855
+ 305,
856
+ 501
857
+ ],
858
+ "page_idx": 6
859
+ },
860
+ {
861
+ "type": "text",
862
+ "text": "We train the model for 3 epochs on the training set until the validation loss converges. We tried different configurations of our model with different number of layers and different graph embedding methods besides the generic one in Eq 2. We report on these ablation studies in Appendix C. ",
863
+ "bbox": [
864
+ 174,
865
+ 507,
866
+ 825,
867
+ 550
868
+ ],
869
+ "page_idx": 6
870
+ },
871
+ {
872
+ "type": "text",
873
+ "text": "Table 2 shows the evaluation results of our model on a held out test set consisting of samples from our OneDiff dataset. Additional experiments on ZeroOneDiff and ZeroOneTwoDiff datasets are available in Appendix A. We also provide experimental results with respect to different configurations. ",
874
+ "bbox": [
875
+ 174,
876
+ 556,
877
+ 825,
878
+ 612
879
+ ],
880
+ "page_idx": 6
881
+ },
882
+ {
883
+ "type": "text",
884
+ "text": "Accuracy is shown for each graph edit operation type. Accuracy is measured in a complete discrete graph edit operation step. For example consider Figure 1a, in which we edit an object property name with the REP_VAL operation. If the model incorrectly predicts the edit operation to be of type DEL, then it will not go on to predict a value. In this case, the model will be penalized twice in the operation accuracy as well as the value accuracy. A prediction is considered totally correct only if the entire sequence of graph edit primitives is correct. Note that top-1 greedy prediction is not always among top-3 when beam search is used. Additionally, operator prediction is only evaluated on the top prediction as the search space only includes four operators. ",
885
+ "bbox": [
886
+ 174,
887
+ 619,
888
+ 825,
889
+ 731
890
+ ],
891
+ "page_idx": 6
892
+ },
893
+ {
894
+ "type": "text",
895
+ "text": "To demonstrate the magnitude of the search space, we compare HOPPITY to a model that selects uniformly at random, in each step of the graph edit process. The random model performs well at operation type selection since the search space only has four options (ADD, REP_VAL, REP_TYPE, DEL). However, after the operation type is predicted, the random model’s accuracy drops, as there are up to 500 nodes in the buggy AST. When it predicts value, the accuracy drops even further as our vocabulary contains 5,000 values. Lastly, type prediction has slightly better accuracy than value prediction because the number of the types of AST nodes in total is smaller than our vocabulary. ",
896
+ "bbox": [
897
+ 174,
898
+ 738,
899
+ 825,
900
+ 835
901
+ ],
902
+ "page_idx": 6
903
+ },
904
+ {
905
+ "type": "text",
906
+ "text": "6.2 BASELINES",
907
+ "text_level": 1,
908
+ "bbox": [
909
+ 174,
910
+ 847,
911
+ 294,
912
+ 861
913
+ ],
914
+ "page_idx": 6
915
+ },
916
+ {
917
+ "type": "text",
918
+ "text": "As existing approaches cannot be applied for comparison in Table 7, we adapt the baselines to some restricted settings in this section. We report the results on the OneDiff dataset as most of the baselines target repair of a single bug. Note that for all comparisons we provide equal amounts of information to HOPPITY and the baseline without retraining our model. ",
919
+ "bbox": [
920
+ 176,
921
+ 867,
922
+ 823,
923
+ 924
924
+ ],
925
+ "page_idx": 6
926
+ },
927
+ {
928
+ "type": "table",
929
+ "img_path": "images/b3fc7aa85f3f186fed81d7adb9b29d0582b9304f81cfd01db28a4d2d705a0d14.jpg",
930
+ "table_caption": [],
931
+ "table_footnote": [],
932
+ "table_body": "<table><tr><td>Type</td><td>GGNN-Rep</td><td>GGNN-Cls</td><td>HOPPITY</td></tr><tr><td>Top-1</td><td>53.2%</td><td>99.6%</td><td>90.0%</td></tr><tr><td>Top-3</td><td>85.8%</td><td>99.6%</td><td>94.8%</td></tr></table>",
933
+ "bbox": [
934
+ 174,
935
+ 102,
936
+ 496,
937
+ 156
938
+ ],
939
+ "page_idx": 7
940
+ },
941
+ {
942
+ "type": "table",
943
+ "img_path": "images/f572866c7818a8cee4335dbcfda575145c5982e034fdacb29741d784145d9cf0.jpg",
944
+ "table_caption": [
945
+ "Table 5: Overall OneDiff accuracy with location. "
946
+ ],
947
+ "table_footnote": [],
948
+ "table_body": "<table><tr><td rowspan=\"2\">HOPPITY</td><td>Top-1</td><td>Top-3</td></tr><tr><td>67.7%</td><td>73.3%</td></tr><tr><td>SequenceR</td><td>64.2%</td><td>68.6%</td></tr></table>",
949
+ "bbox": [
950
+ 547,
951
+ 102,
952
+ 774,
953
+ 159
954
+ ],
955
+ "page_idx": 7
956
+ },
957
+ {
958
+ "type": "table",
959
+ "img_path": "images/bcc01911703e3743f6813e87717d7a45721e9f31c80f48457a455646fe7fd12f.jpg",
960
+ "table_caption": [
961
+ "Table 3: REP_TYPE accuracies with location+op. ",
962
+ "Table 6: Comparison with TAJS. "
963
+ ],
964
+ "table_footnote": [],
965
+ "table_body": "<table><tr><td>Bug Type</td><td>Amount</td><td>TAJS</td><td>HOPPITY</td></tr><tr><td>Undefined Property Functional Bug</td><td>7 11</td><td>0 0</td><td>1 3</td></tr><tr><td>Refactoring</td><td>12</td><td>0</td><td>1</td></tr><tr><td>Total</td><td>30</td><td>0</td><td>5</td></tr></table>",
966
+ "bbox": [
967
+ 504,
968
+ 179,
969
+ 820,
970
+ 247
971
+ ],
972
+ "page_idx": 7
973
+ },
974
+ {
975
+ "type": "table",
976
+ "img_path": "images/59fc82e0435aa6ffd6b6385e7bb4f022ecb72406e90f2e033eecc0769a1c7afa.jpg",
977
+ "table_caption": [],
978
+ "table_footnote": [
979
+ "Table 4: REP_VAL accuracies with location+op. "
980
+ ],
981
+ "table_body": "<table><tr><td>Value</td><td>GGNN-Rep</td><td>GGNN-RNN</td><td>HOPPITY</td></tr><tr><td>Top-1</td><td>63.8%</td><td>60.3%</td><td>69.1%</td></tr><tr><td>Top-3</td><td>67.6%</td><td>63.6%</td><td>73.4%</td></tr></table>",
982
+ "bbox": [
983
+ 173,
984
+ 195,
985
+ 496,
986
+ 250
987
+ ],
988
+ "page_idx": 7
989
+ },
990
+ {
991
+ "type": "text",
992
+ "text": "GGNN: Allamanis et al. (2018), uses Gated Graph Neural Networks (GGNN) for two specific bug repair tasks: VARMISUSE, in which the model learns to select the correct variable that should be used at a given location, and VARNAMING, in which the model predicts a variable name based on its usage. We adapt these tasks to compare with HOPPITY on the REP_TYPE and REP_VAL tasks. Specifically, for REP_TYPE prediction we have ",
993
+ "bbox": [
994
+ 174,
995
+ 281,
996
+ 825,
997
+ 352
998
+ ],
999
+ "page_idx": 7
1000
+ },
1001
+ {
1002
+ "type": "text",
1003
+ "text": "• GGNN-Rep: we adopt VARMISUSE to replace with candidate node type and modify the graph structure correspondingly; we use their proposed max-margin formulation for training. • GGNN-Cls: we perform multi-class classification using the target node and graph embedding. ",
1004
+ "bbox": [
1005
+ 171,
1006
+ 358,
1007
+ 825,
1008
+ 401
1009
+ ],
1010
+ "page_idx": 7
1011
+ },
1012
+ {
1013
+ "type": "text",
1014
+ "text": "For REP_VAL prediction, we also made two versions of adaptations: ",
1015
+ "bbox": [
1016
+ 173,
1017
+ 407,
1018
+ 624,
1019
+ 421
1020
+ ],
1021
+ "page_idx": 7
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "• GGNN-Rep: similar to above, here the candidate set is from values in the current graphs plus the top-100 frequent values used for repair in the training set. • GGNN-RNN: we adopt VARNAMING approach to predict value directly. Due to the huge vocabulary size, we use char-level language model for predicting the replacement. ",
1026
+ "bbox": [
1027
+ 174,
1028
+ 428,
1029
+ 825,
1030
+ 484
1031
+ ],
1032
+ "page_idx": 7
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "Table 3 and 4 show the comparison when buggy node is known. Regarding the type prediction, as the number of types is large, the likelihood formulation with classification objective outperforms the max-margin loss based one (i.e., GGNN-Rep). As in this limited case GGNN-Cls and HOPPITY are quite similar except for graph representation, the performance is expected to be comparable. As HOPPITY is not trained to predict type fix only, it performs slighly worse than GGNN-Cls. Also for the value prediction, our formulation of pointer on graph is more effective. We found when the space of decisions is large, it is hard to apply structured prediction method like GGNN-Rep in this setting. Since real-world programs are noisy, the sentences used in different programs vary greatly, making it difficult for language models to predict the exact accurate value. A possible extension is to combine the language model with the graph pointer, which we will explore in future work. ",
1037
+ "bbox": [
1038
+ 173,
1039
+ 492,
1040
+ 825,
1041
+ 631
1042
+ ],
1043
+ "page_idx": 7
1044
+ },
1045
+ {
1046
+ "type": "text",
1047
+ "text": "SequenceR: The model proposed by Chen et al. (2018) is a translation based model that predicts a fixed sequence of tokens when given a buggy line in the source code. We compare with our model by providing location information to both approaches. ",
1048
+ "bbox": [
1049
+ 174,
1050
+ 637,
1051
+ 825,
1052
+ 680
1053
+ ],
1054
+ "page_idx": 7
1055
+ },
1056
+ {
1057
+ "type": "text",
1058
+ "text": "Table 5 summarizes the total accuracy for fixing a single bug. In order to provide a fair comparison, we allow SequenceR to predict the same information as our model (i.e., predict op, value etc.in a sequential way), rather than an entire sequence of raw textual tokens. This experiment shows the benefit of formulating code repair with graphs over text tokens. ",
1059
+ "bbox": [
1060
+ 174,
1061
+ 686,
1062
+ 825,
1063
+ 742
1064
+ ],
1065
+ "page_idx": 7
1066
+ },
1067
+ {
1068
+ "type": "text",
1069
+ "text": "With the above two baselines, we can see that in the restricted case our model can still yield comparable or even better performances. Given that our model can go for more edits without location information, we believe this tool is more generic and effective for code repair. ",
1070
+ "bbox": [
1071
+ 174,
1072
+ 750,
1073
+ 825,
1074
+ 791
1075
+ ],
1076
+ "page_idx": 7
1077
+ },
1078
+ {
1079
+ "type": "text",
1080
+ "text": "TAJS: We also compare the bug detection ability of HOPPITY against TAJS (Jensen et al., 2009) which is a well-known static analysis tool for Javascript programs. Automating the comparison for our entire test set proved to be infeasible. For example, TAJS only accepts JavaScript ES5 programs, while the vast majority of current JavaScript projects use ES6 or other variants like React JSX. Another problem is that TAJS does not analyze code that is not invoked, e.g., a library function that is not called by client code. Moreover, determining the right command-line options of TAJS is non-trivial since it provides many options targeting different JavaScript runtime environments. Due to these issues, we forgo a large-scale comparison, and instead pick 30 random points in our test set to manually analyze using TAJS. Table 6 depicts the results (Appendix D provides further details). ",
1081
+ "bbox": [
1082
+ 173,
1083
+ 797,
1084
+ 825,
1085
+ 924
1086
+ ],
1087
+ "page_idx": 7
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "We restrict the chosen test points to satisfy a necessary condition for undefined property bugs since TAJS claims to be proficient in detecting this class of bugs. In the process, we also pick some functional bugs, as well as cases of refactoring modifications. By resolving the numerous issues that prevented us from automating the comparison, we were able to run TAJS manually. TAJS failed to detect any real bugs in the 30 test points. While functional bugs and refactoring modifications are beyond TAJS, however, TAJS also raises many unrelated false alarms due to its failures in locating NodeJS libraries, importing JSON files, or recognizing built-in global variables. These warnings are detrimental because TAJS suspends the analysis as soon as it detects what it preceives to be a bug. To further aid TAJS, we omitted parts of each program that are unrelated to the bug, in the hope of driving TAJS’s analysis as deep as possible. After all these measures, TAJS managed to detect two of the undefined property bugs (Bug IDs 4 and 6 in Appendix D). ",
1092
+ "bbox": [
1093
+ 173,
1094
+ 103,
1095
+ 825,
1096
+ 257
1097
+ ],
1098
+ "page_idx": 8
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "In contrast, HOPPITY is able to correctly detect 5 bug locations of the 30 testing points within our top 3 predictions. Moreover, HOPPITY also produces 4 patches that are identical to the developer’s fixes. Our comparison highlights HOPPITY’s two important strengths compared to TAJS. First, HOPPITY relieves developers from the enormous burden of manual configuration. Second, HOPPITY achieves far better performance in detecting as well as fixing the bugs in Javascript programs. ",
1103
+ "bbox": [
1104
+ 174,
1105
+ 263,
1106
+ 825,
1107
+ 333
1108
+ ],
1109
+ "page_idx": 8
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "7 RELATED WORK ",
1114
+ "text_level": 1,
1115
+ "bbox": [
1116
+ 176,
1117
+ 342,
1118
+ 344,
1119
+ 358
1120
+ ],
1121
+ "page_idx": 8
1122
+ },
1123
+ {
1124
+ "type": "text",
1125
+ "text": "Static analysis for bug detection. Static analyzers such as FindBugs, Error-Prone, and Semmle use syntactic pattern-matching and dataflow analysis to find common bugs. Typically, detecting even a single class of bugs can require dozens or even hundreds of patterns. Coverity (Bessey et al., 2010), SonarQube, and Clang Static Analyzer check for semantic inconsistencies in code based on more sophisticated path analyses. Infer (Calcagno et al., 2015) is built upon sound principles and can prove the absence of certain classes of bugs. TAJS belongs to this category as well. Due to the undecidability of the problem, however, approximations are inevitable which voids the guarantees in practice. Compared to all static analysis tools, HOPPITY offers the following advantages: (1) it targets a board range of programming errors; (2) it not only localizes bugs but also fixes them; and (3) it has significantly higher signal-to-noise ratio (i.e., detects more bugs with less false alarms). ",
1126
+ "bbox": [
1127
+ 174,
1128
+ 366,
1129
+ 825,
1130
+ 506
1131
+ ],
1132
+ "page_idx": 8
1133
+ },
1134
+ {
1135
+ "type": "text",
1136
+ "text": "Learning-based bug detection. Allamanis et al. (2018) target variable-misuse errors and present a solution based on a gated graph neural network model to predict the correct variable name given a buggy location. Vasic et al. (2019) present a pointer network on top of a RNN which outperforms Allamanis et al. (2018) on the same task. DeepBugs (Pradel & Sen, 2018) proposes a name-based bug detection scheme. Their model is trained to predict three classes of bugs: swapped function arguments, wrong binary operator, and wrong operand in a binary operation. Compared to these models, our approach is capable of detecting and fixing a wide range of errors in Javascript. SequenceR (Chen et al., 2018) uses sequence-to-sequence model to translate a buggy code segment into correct one; Getafix (Scott et al., 2019) produces human-like bug fixes by learning from past fixes. It employs a hierarchical clustering algorithm that sorts fix patterns according to their generality. While these approaches are general against different types of bugs, they still need the bug location as input. ",
1137
+ "bbox": [
1138
+ 173,
1139
+ 512,
1140
+ 825,
1141
+ 665
1142
+ ],
1143
+ "page_idx": 8
1144
+ },
1145
+ {
1146
+ "type": "text",
1147
+ "text": "Graph learning and optimization. Our work is closely related to the literature in graph representation learning and optimization. Our model uses a variant of GNN that is inspired by many representative works (Li et al., 2015; Xu et al., 2018; Si et al., 2018), with the adaptation of local value table and pointer mechanism. Our work is also related to auto-regressive graph modeling Johnson (2016); Li et al. (2018); Brockschmidt et al. (2018); Dai et al. (2018), but with more generic operations such as subtree deletion and attribute modifications. Some other works model the graph modification in latent space (Jin et al., 2018; Yin et al., 2018), but such frameworks lack fine-grained control over the generative process, and thus are not very suitable for performing code repair. ",
1148
+ "bbox": [
1149
+ 174,
1150
+ 672,
1151
+ 825,
1152
+ 784
1153
+ ],
1154
+ "page_idx": 8
1155
+ },
1156
+ {
1157
+ "type": "text",
1158
+ "text": "8 CONCLUSION ",
1159
+ "text_level": 1,
1160
+ "bbox": [
1161
+ 174,
1162
+ 792,
1163
+ 320,
1164
+ 809
1165
+ ],
1166
+ "page_idx": 8
1167
+ },
1168
+ {
1169
+ "type": "text",
1170
+ "text": "We proposed an end-to-end learning-based approach to detect and fix bugs in Javascript programs. We realized the approach in a tool HOPPITY and demonstrated that it correctly predicts 9,490 out of 36,361 code changes in real programs on Github. In the future, we plan to expand the targeted bugs to include those that are caused by the interdependence among multiple files or that require multiple steps to fix. We will also deploy HOPPITY in an IDE to further evaluate its accuracy and utility. Finally, we plan to extend our learning framework to support other languages. Due to its language-independence, we believe HOPPITY will benefit developers beyond Javascript as well. ",
1171
+ "bbox": [
1172
+ 174,
1173
+ 815,
1174
+ 825,
1175
+ 914
1176
+ ],
1177
+ "page_idx": 8
1178
+ },
1179
+ {
1180
+ "type": "text",
1181
+ "text": "ACKNOWLEDGMENTS ",
1182
+ "text_level": 1,
1183
+ "bbox": [
1184
+ 176,
1185
+ 103,
1186
+ 357,
1187
+ 118
1188
+ ],
1189
+ "page_idx": 9
1190
+ },
1191
+ {
1192
+ "type": "text",
1193
+ "text": "We thank the reviewers for their insightful comments. This research was supported in part by NSF awards #1836936 and #1836822, ONR award #N00014-18-1-2021, and Facebook research awards. ",
1194
+ "bbox": [
1195
+ 174,
1196
+ 125,
1197
+ 825,
1198
+ 154
1199
+ ],
1200
+ "page_idx": 9
1201
+ },
1202
+ {
1203
+ "type": "text",
1204
+ "text": "REFERENCES ",
1205
+ "text_level": 1,
1206
+ "bbox": [
1207
+ 174,
1208
+ 162,
1209
+ 287,
1210
+ 179
1211
+ ],
1212
+ "page_idx": 9
1213
+ },
1214
+ {
1215
+ "type": "text",
1216
+ "text": "Miltiadis Allamanis, Marc Brockschmidt, and Mahmoud Khademi. Learning to represent programs with graphs. International Conference on Learning Representations, 2018. ",
1217
+ "bbox": [
1218
+ 173,
1219
+ 185,
1220
+ 823,
1221
+ 214
1222
+ ],
1223
+ "page_idx": 9
1224
+ },
1225
+ {
1226
+ "type": "text",
1227
+ "text": "Thomas Ball, Mayur Naik, and Sriram K. Rajamani. From symptom to cause: Localizing errors in counterexample traces. In Proceedings of the 30th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2003. ",
1228
+ "bbox": [
1229
+ 174,
1230
+ 222,
1231
+ 825,
1232
+ 266
1233
+ ],
1234
+ "page_idx": 9
1235
+ },
1236
+ {
1237
+ "type": "text",
1238
+ "text": "Al Bessey, Ken Block, Ben Chelf, Andy Chou, Bryan Fulton, Seth Hallem, Charles Henri-Gros, Asya Kamsky, Scott McPeak, and Dawson Engler. A few billion lines of code later: Using static analysis to find bugs in the real world. Communications of the ACM, 53(2), February 2010. ",
1239
+ "bbox": [
1240
+ 174,
1241
+ 273,
1242
+ 825,
1243
+ 318
1244
+ ],
1245
+ "page_idx": 9
1246
+ },
1247
+ {
1248
+ "type": "text",
1249
+ "text": "Marc Brockschmidt, Miltiadis Allamanis, Alexander L Gaunt, and Oleksandr Polozov. Generative code modeling with graphs. arXiv preprint arXiv:1805.08490, 2018. ",
1250
+ "bbox": [
1251
+ 174,
1252
+ 325,
1253
+ 825,
1254
+ 356
1255
+ ],
1256
+ "page_idx": 9
1257
+ },
1258
+ {
1259
+ "type": "text",
1260
+ "text": "Cristiano Calcagno, Dino Distefano, Jeremy Dubreil, Dominik Gabi, Pieter Hooimeijer, Martino Luca, Peter O’Hearn, Irene Papakonstantinou, Jim Purbrick, and Dulma Rodriguez. Moving fast with software verification. In NASA Formal Method Symposium, 2015. ",
1261
+ "bbox": [
1262
+ 176,
1263
+ 363,
1264
+ 825,
1265
+ 406
1266
+ ],
1267
+ "page_idx": 9
1268
+ },
1269
+ {
1270
+ "type": "text",
1271
+ "text": "Zimin Chen, Steve Kommrusch, Michele Tufano, Louis-Noël Pouchet, Denys Poshyvanyk, and Martin Monperrus. Sequencer: Sequence-to-sequence learning for end-to-end program repair. arXiv preprint arXiv:1901.01808, 2018. ",
1272
+ "bbox": [
1273
+ 176,
1274
+ 415,
1275
+ 825,
1276
+ 458
1277
+ ],
1278
+ "page_idx": 9
1279
+ },
1280
+ {
1281
+ "type": "text",
1282
+ "text": "Hanjun Dai, Hui Li, Tian Tian, Xin Huang, Lin Wang, Jun Zhu, and Le Song. Adversarial attack on graph structured data. arXiv preprint arXiv:1806.02371, 2018. ",
1283
+ "bbox": [
1284
+ 171,
1285
+ 465,
1286
+ 823,
1287
+ 496
1288
+ ],
1289
+ "page_idx": 9
1290
+ },
1291
+ {
1292
+ "type": "text",
1293
+ "text": "Github. State of the Octoverse. https://octoverse.github.com/#top-languages, 2019. ",
1294
+ "bbox": [
1295
+ 174,
1296
+ 503,
1297
+ 748,
1298
+ 520
1299
+ ],
1300
+ "page_idx": 9
1301
+ },
1302
+ {
1303
+ "type": "text",
1304
+ "text": "Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014. ",
1305
+ "bbox": [
1306
+ 173,
1307
+ 527,
1308
+ 823,
1309
+ 558
1310
+ ],
1311
+ "page_idx": 9
1312
+ },
1313
+ {
1314
+ "type": "text",
1315
+ "text": "Jinru Hua, Mengshi Zhang, Kaiyuan Wang, and Sarfraz Khurshid. Sketchfix: A tool for automated program repair approach using lazy candidate generation. In Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, 2018. ",
1316
+ "bbox": [
1317
+ 173,
1318
+ 565,
1319
+ 825,
1320
+ 622
1321
+ ],
1322
+ "page_idx": 9
1323
+ },
1324
+ {
1325
+ "type": "text",
1326
+ "text": "Simon Holm Jensen, Anders Møller, and Peter Thiemann. Type analysis for javascript. In Proceedings of the 16th International Symposium on Static Analysis, 2009. ",
1327
+ "bbox": [
1328
+ 171,
1329
+ 631,
1330
+ 823,
1331
+ 660
1332
+ ],
1333
+ "page_idx": 9
1334
+ },
1335
+ {
1336
+ "type": "text",
1337
+ "text": "Wengong Jin, Kevin Yang, Regina Barzilay, and Tommi Jaakkola. Learning multimodal graph-tograph translation for molecular optimization. arXiv preprint arXiv:1812.01070, 2018. ",
1338
+ "bbox": [
1339
+ 174,
1340
+ 667,
1341
+ 825,
1342
+ 698
1343
+ ],
1344
+ "page_idx": 9
1345
+ },
1346
+ {
1347
+ "type": "text",
1348
+ "text": "Daniel D Johnson. Learning graphical state transitions. 2016. ",
1349
+ "bbox": [
1350
+ 173,
1351
+ 707,
1352
+ 578,
1353
+ 722
1354
+ ],
1355
+ "page_idx": 9
1356
+ },
1357
+ {
1358
+ "type": "text",
1359
+ "text": "Manu Jose and Rupak Majumdar. Cause clue clauses: Error localization using maximum satisfiability. In Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation, 2011. ",
1360
+ "bbox": [
1361
+ 173,
1362
+ 731,
1363
+ 826,
1364
+ 773
1365
+ ],
1366
+ "page_idx": 9
1367
+ },
1368
+ {
1369
+ "type": "text",
1370
+ "text": "Claire Le Goues, Michael Pradel, and Abhik Roychoudhury. Automated program repair. Commun. ACM, 2019. ",
1371
+ "bbox": [
1372
+ 173,
1373
+ 781,
1374
+ 823,
1375
+ 810
1376
+ ],
1377
+ "page_idx": 9
1378
+ },
1379
+ {
1380
+ "type": "text",
1381
+ "text": "Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. Gated graph sequence neural networks. arXiv preprint arXiv:1511.05493, 2015. ",
1382
+ "bbox": [
1383
+ 174,
1384
+ 819,
1385
+ 821,
1386
+ 849
1387
+ ],
1388
+ "page_idx": 9
1389
+ },
1390
+ {
1391
+ "type": "text",
1392
+ "text": "Yujia Li, Oriol Vinyals, Chris Dyer, Razvan Pascanu, and Peter Battaglia. Learning deep generative models of graphs. arXiv preprint arXiv:1803.03324, 2018. ",
1393
+ "bbox": [
1394
+ 174,
1395
+ 857,
1396
+ 823,
1397
+ 887
1398
+ ],
1399
+ "page_idx": 9
1400
+ },
1401
+ {
1402
+ "type": "text",
1403
+ "text": "Michael Pradel and Koushik Sen. Deepbugs: A learning approach to name-based bug detection. Proc. ACM Program. Lang., 2(OOPSLA), 2018. ",
1404
+ "bbox": [
1405
+ 174,
1406
+ 895,
1407
+ 823,
1408
+ 924
1409
+ ],
1410
+ "page_idx": 9
1411
+ },
1412
+ {
1413
+ "type": "text",
1414
+ "text": "Caitlin Sadowski, Jeffrey van Gogh, Ciera Jaspan, Emma Söderberg, and Collin Winter. Tricorder: Building a program analysis ecosystem. In Proceedings of the 37th International Conference on Software Engineering, 2015. ",
1415
+ "bbox": [
1416
+ 178,
1417
+ 103,
1418
+ 823,
1419
+ 146
1420
+ ],
1421
+ "page_idx": 10
1422
+ },
1423
+ {
1424
+ "type": "text",
1425
+ "text": "Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 20(1):61–80, 2008. ",
1426
+ "bbox": [
1427
+ 173,
1428
+ 155,
1429
+ 823,
1430
+ 184
1431
+ ],
1432
+ "page_idx": 10
1433
+ },
1434
+ {
1435
+ "type": "text",
1436
+ "text": "Andrew Scott, Johannes Bader, and Satish Chandra. Getafix: Learning to fix bugs automatically. volume 2, 2019. ",
1437
+ "bbox": [
1438
+ 173,
1439
+ 193,
1440
+ 823,
1441
+ 220
1442
+ ],
1443
+ "page_idx": 10
1444
+ },
1445
+ {
1446
+ "type": "text",
1447
+ "text": "Xujie Si, Hanjun Dai, Mukund Raghothaman, Mayur Naik, and Le Song. Learning loop invariants for program verification. In Advances in Neural Information Processing Systems, pp. 7751–7762, 2018. ",
1448
+ "bbox": [
1449
+ 174,
1450
+ 229,
1451
+ 825,
1452
+ 272
1453
+ ],
1454
+ "page_idx": 10
1455
+ },
1456
+ {
1457
+ "type": "text",
1458
+ "text": "Marko Vasic, Aditya Kanade, Petros Maniatis, David Bieber, and Rishabh Singh. Neural program repair by jointly learning to localize and repair. International Conference on Learning Representations, 2019. ",
1459
+ "bbox": [
1460
+ 173,
1461
+ 281,
1462
+ 826,
1463
+ 325
1464
+ ],
1465
+ "page_idx": 10
1466
+ },
1467
+ {
1468
+ "type": "text",
1469
+ "text": "Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. Pointer networks. In Advances in Neural Information Processing Systems, pp. 2692–2700, 2015. ",
1470
+ "bbox": [
1471
+ 174,
1472
+ 333,
1473
+ 823,
1474
+ 363
1475
+ ],
1476
+ "page_idx": 10
1477
+ },
1478
+ {
1479
+ "type": "text",
1480
+ "text": "Yu Wang, Fengjuan Gao, Linzhang Wang, and Ke Wang. Learning a static bug finder from data. arXiv preprint arXiv:1907.05579, 2019. ",
1481
+ "bbox": [
1482
+ 174,
1483
+ 371,
1484
+ 823,
1485
+ 400
1486
+ ],
1487
+ "page_idx": 10
1488
+ },
1489
+ {
1490
+ "type": "text",
1491
+ "text": "Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? arXiv preprint arXiv:1810.00826, 2018. ",
1492
+ "bbox": [
1493
+ 174,
1494
+ 409,
1495
+ 823,
1496
+ 438
1497
+ ],
1498
+ "page_idx": 10
1499
+ },
1500
+ {
1501
+ "type": "text",
1502
+ "text": "Pengcheng Yin, Graham Neubig, Miltiadis Allamanis, Marc Brockschmidt, and Alexander L Gaunt. Learning to represent edits. arXiv preprint arXiv:1810.13337, 2018. ",
1503
+ "bbox": [
1504
+ 174,
1505
+ 446,
1506
+ 825,
1507
+ 476
1508
+ ],
1509
+ "page_idx": 10
1510
+ },
1511
+ {
1512
+ "type": "text",
1513
+ "text": "Nicholas C. Zakas. ESLint. https://eslint.org/, 2013. ",
1514
+ "bbox": [
1515
+ 173,
1516
+ 484,
1517
+ 527,
1518
+ 500
1519
+ ],
1520
+ "page_idx": 10
1521
+ },
1522
+ {
1523
+ "type": "table",
1524
+ "img_path": "images/5cd3304835de83b9702c715caa6ec8b294f0c2583a723eda313e3854115c9a28.jpg",
1525
+ "table_caption": [
1526
+ "A ADDITIONAL EXPERIMENTS "
1527
+ ],
1528
+ "table_footnote": [],
1529
+ "table_body": "<table><tr><td rowspan=\"3\"></td><td colspan=\"2\">Total</td><td colspan=\"2\">Location</td><td>Operator</td><td colspan=\"2\">Value</td><td colspan=\"2\">Type</td></tr><tr><td>Top-3</td><td>Top-1</td><td>Top-3</td><td>Top-1</td><td>Top-1</td><td>Top-3</td><td>Top-1</td><td>Top-3</td><td>Top-1</td></tr><tr><td>ZeroOneTwoDiff</td><td>40.8</td><td>29.7</td><td>18.9</td><td>3.9</td><td>30.3</td><td>35.0</td><td>6.5</td><td>38.6</td><td>3.4</td></tr><tr><td>ZeroOneDiff</td><td>51.6</td><td>34.5</td><td>27.1</td><td>5.5</td><td>35.6</td><td>45.4</td><td>10.4</td><td>73.9</td><td>58.9</td></tr><tr><td>OneDiff</td><td>26.1</td><td>14.2</td><td>35.5</td><td>20.4</td><td>34.4</td><td>52.3</td><td>29.1</td><td>76.1</td><td>66.7</td></tr><tr><td>Random</td><td>.08</td><td>.07</td><td>2.28</td><td>1.4</td><td>27.7</td><td>.01</td><td>.01</td><td>.27</td><td>0</td></tr></table>",
1530
+ "bbox": [
1531
+ 173,
1532
+ 135,
1533
+ 821,
1534
+ 238
1535
+ ],
1536
+ "page_idx": 11
1537
+ },
1538
+ {
1539
+ "type": "text",
1540
+ "text": "Table 7: Evaluation of models on each dataset. The Random model is evaluated on the OneDiff dataset and is shown for comparison. ",
1541
+ "bbox": [
1542
+ 174,
1543
+ 247,
1544
+ 823,
1545
+ 276
1546
+ ],
1547
+ "page_idx": 11
1548
+ },
1549
+ {
1550
+ "type": "text",
1551
+ "text": "Full experiment results In addition to the evaluation of samples with one edit Table 7, we also evaluate HOPPITY on the following datasets: ",
1552
+ "bbox": [
1553
+ 174,
1554
+ 297,
1555
+ 825,
1556
+ 327
1557
+ ],
1558
+ "page_idx": 11
1559
+ },
1560
+ {
1561
+ "type": "text",
1562
+ "text": "• ZeroOneDiff - Includes samples with labels of zero or one edit • ZeroOneTwoDiff - Includes samples with labels of zero, one, or two edits. ",
1563
+ "bbox": [
1564
+ 217,
1565
+ 340,
1566
+ 745,
1567
+ 376
1568
+ ],
1569
+ "page_idx": 11
1570
+ },
1571
+ {
1572
+ "type": "text",
1573
+ "text": "We trained models on each dataset for roughly 12 hours on a single GTX 2080Ti GPU. Accuracy on the ZeroOneDiff is the highest as predicting that an AST is not buggy does not consist of any low level primitive predictions. This makes it a much easier prediction for the model than say, an ADD operation which the parent location, left sibling, value, and type must all be predicted correctly in order to be considered accurate. ",
1574
+ "bbox": [
1575
+ 174,
1576
+ 390,
1577
+ 825,
1578
+ 459
1579
+ ],
1580
+ "page_idx": 11
1581
+ },
1582
+ {
1583
+ "type": "table",
1584
+ "img_path": "images/ca19e165327d0ceb4a33243f97517cf22d73ad22180d79e2a58247c2c663095e.jpg",
1585
+ "table_caption": [
1586
+ "Table 8: Results on true/false predictions. "
1587
+ ],
1588
+ "table_footnote": [],
1589
+ "table_body": "<table><tr><td colspan=\"3\">TRUELABEL</td></tr><tr><td colspan=\"3\"></td></tr><tr><td rowspan=\"2\">ALARM PREDICTED NO ALARM</td><td>BUGGY</td><td>NOTBUGGY</td></tr><tr><td>10,293 26,517</td><td>7,210 20,605</td></tr></table>",
1590
+ "bbox": [
1591
+ 284,
1592
+ 477,
1593
+ 684,
1594
+ 537
1595
+ ],
1596
+ "page_idx": 11
1597
+ },
1598
+ {
1599
+ "type": "text",
1600
+ "text": "False positive/negative study An evaluation of false positives and false negatives is available in Table 8. In this setting, we treat the problem as a classification problem on our ZeroOneDiff dataset and our model attempts to predict if a given AST is BUGGY / NOT BUGGY. If the model predicts ADD, REP_VAL, REP_TYPE, or DEL, we consider this a prediction of \"BUGGY.\" Accordingly, if the model predicts NO_OP, we consider this to be a prediction of \"NOT BUGGY.\" ",
1601
+ "bbox": [
1602
+ 173,
1603
+ 579,
1604
+ 826,
1605
+ 650
1606
+ ],
1607
+ "page_idx": 11
1608
+ },
1609
+ {
1610
+ "type": "text",
1611
+ "text": "Accuracy v.s. size of graph To demonstrate the affect of AST size on HOPPITY’s prediction accuracy on the OneDiff dataset, we include Figure 4. As expected, AST size and accuracy are inversely related. ",
1612
+ "bbox": [
1613
+ 174,
1614
+ 662,
1615
+ 825,
1616
+ 705
1617
+ ],
1618
+ "page_idx": 11
1619
+ },
1620
+ {
1621
+ "type": "table",
1622
+ "img_path": "images/37c74477b88668f7fba40c34591379be12f674b42467f25c677f49c8341a89d9.jpg",
1623
+ "table_caption": [
1624
+ "Table 9: Accuracy vs beam sizes. "
1625
+ ],
1626
+ "table_footnote": [],
1627
+ "table_body": "<table><tr><td>Beam Size (k)</td><td>Top-k Accuracy (%)</td></tr><tr><td>1</td><td>14.37%</td></tr><tr><td>2</td><td>21.10%</td></tr><tr><td>3</td><td>26.14%</td></tr><tr><td>4</td><td>30.12%</td></tr><tr><td>5</td><td>33.58%</td></tr></table>",
1628
+ "bbox": [
1629
+ 362,
1630
+ 724,
1631
+ 630,
1632
+ 813
1633
+ ],
1634
+ "page_idx": 11
1635
+ },
1636
+ {
1637
+ "type": "text",
1638
+ "text": "Accuracy v.s. beam search size In Table 9 we compare the performance with different beam sizes on the OneDiff dataset. As we can see, the top-3 accuracy with beam size 3 is significantly better than top-1 accuracy with just greedy prediction. This is expected, as in the decision process there are ’bottleneck’ stages with only a few predictions (e.g., the op prediction). Thus from beam-1 to beam-3 there’s huge improvement, but further beyond the performance maxed out. ",
1639
+ "bbox": [
1640
+ 174,
1641
+ 853,
1642
+ 825,
1643
+ 924
1644
+ ],
1645
+ "page_idx": 11
1646
+ },
1647
+ {
1648
+ "type": "image",
1649
+ "img_path": "images/2d4d22c9e753089552f3570ecc2cf47b4f93588aa8e3ea9b1d474d5c45c331a9.jpg",
1650
+ "image_caption": [
1651
+ "Figure 4: End-to-end code repair accuracy v.s. size of AST of source code. "
1652
+ ],
1653
+ "image_footnote": [],
1654
+ "bbox": [
1655
+ 191,
1656
+ 109,
1657
+ 781,
1658
+ 385
1659
+ ],
1660
+ "page_idx": 12
1661
+ },
1662
+ {
1663
+ "type": "text",
1664
+ "text": "B DATA COLLECTION ",
1665
+ "text_level": 1,
1666
+ "bbox": [
1667
+ 176,
1668
+ 441,
1669
+ 370,
1670
+ 458
1671
+ ],
1672
+ "page_idx": 12
1673
+ },
1674
+ {
1675
+ "type": "text",
1676
+ "text": "We have built a robust system to automatically collect millions of bug-fixes in Javascript programs from Github. Our system continuously crawls Github for commits containing Javascript files and creates a label consisting of the change to the AST corresponding to each such file. ",
1677
+ "bbox": [
1678
+ 176,
1679
+ 465,
1680
+ 823,
1681
+ 507
1682
+ ],
1683
+ "page_idx": 12
1684
+ },
1685
+ {
1686
+ "type": "text",
1687
+ "text": "Our system consists of three entirely automated parallel steps: ",
1688
+ "bbox": [
1689
+ 173,
1690
+ 515,
1691
+ 580,
1692
+ 529
1693
+ ],
1694
+ "page_idx": 12
1695
+ },
1696
+ {
1697
+ "type": "text",
1698
+ "text": "1. Collect Commits: Our system uses the GH Archive API to easily access Github event data for a specific hour in time. After obtaining all data for the hour, we filter this using the Github API to only include commits that consist of edits to Javascript files. ",
1699
+ "bbox": [
1700
+ 174,
1701
+ 536,
1702
+ 825,
1703
+ 578
1704
+ ],
1705
+ "page_idx": 12
1706
+ },
1707
+ {
1708
+ "type": "text",
1709
+ "text": "2. Download Files: As we are obtaining a list of valid commits from step 1, we begin downloading the pair: $( s r c _ { b u g g y } , s r c _ { f i x e d } )$ where $s r c _ { b u g g y }$ is the file prior to the commit, and $s r c _ { f i x e d }$ is the file following the commit that contains the changes made. ",
1710
+ "bbox": [
1711
+ 174,
1712
+ 585,
1713
+ 825,
1714
+ 627
1715
+ ],
1716
+ "page_idx": 12
1717
+ },
1718
+ {
1719
+ "type": "text",
1720
+ "text": "3. Create Label: For each Javascript file downloaded, we parse the source code into a JSON format of the AST. Our system uses the SHIFT AST 1. Abstract Syntax Tree representations are designed to naturally and intuitively represent the structure of the source code. Because of this design goal, small changes in the source code can often lead to very large changes in the AST. We chose the SHIFT AST representation with consideration to our goal of maximizing the number of commits with only one difference between the ASTs. This component produces a pair of ASTs: $( A S T _ { b u g g y } , A S T _ { f i x e d } )$ at which point a JSON differencing algorithm, fast-json-patch 2 is applied to create a label. The label includes the operation type and node edited for each difference between $A S T _ { b u g g y }$ and $A S T _ { f i x e d }$ . ",
1721
+ "bbox": [
1722
+ 173,
1723
+ 633,
1724
+ 825,
1725
+ 747
1726
+ ],
1727
+ "page_idx": 12
1728
+ },
1729
+ {
1730
+ "type": "text",
1731
+ "text": "Each step of this process is parallelized in order to grow our corpus as quickly as possible. Our dataset has the advantage that it is continuously growing without human input. ",
1732
+ "bbox": [
1733
+ 171,
1734
+ 753,
1735
+ 821,
1736
+ 782
1737
+ ],
1738
+ "page_idx": 12
1739
+ },
1740
+ {
1741
+ "type": "text",
1742
+ "text": "Our system is language independent and highly extensible and modular. For example, it can handle any language so long as it can be parsed into a JSON AST. ",
1743
+ "bbox": [
1744
+ 171,
1745
+ 789,
1746
+ 823,
1747
+ 816
1748
+ ],
1749
+ "page_idx": 12
1750
+ },
1751
+ {
1752
+ "type": "text",
1753
+ "text": "For each label, we must download two files $s r c _ { b u g g y }$ and $s r c _ { f i x e d }$ . Additionally, if source files cannot be parsed into a SHIFT AST, a label cannot be created. For our learning corpus, we limit the dataset to only include labels with one AST difference. Additionally, in an attempt to limit graph size, we only include data points in which the $A S T _ { b u g g y }$ and $A S T _ { f i x e d }$ have less than 500 nodes. ",
1754
+ "bbox": [
1755
+ 174,
1756
+ 824,
1757
+ 825,
1758
+ 881
1759
+ ],
1760
+ "page_idx": 12
1761
+ },
1762
+ {
1763
+ "type": "table",
1764
+ "img_path": "images/b9f50c1270c82cbe10f2b785ce7ab64709376e4ed8db18553da7b06aa5df3b01.jpg",
1765
+ "table_caption": [
1766
+ "Table 10: Data collection statistics. "
1767
+ ],
1768
+ "table_footnote": [],
1769
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Total Files Downloaded:</td><td rowspan=1 colspan=1>52,719,402</td></tr><tr><td rowspan=1 colspan=1>Total Labelled Data Points:</td><td rowspan=1 colspan=1>15,225,347</td></tr><tr><td rowspan=1 colspan=1># AST differences:</td><td rowspan=1 colspan=1># data points:</td></tr><tr><td rowspan=1 colspan=1>012-1011-2021-5051-100101+</td><td rowspan=1 colspan=1>3,473,3911,863,1933,247,4372,117,9772,047,998858,981921,754</td></tr></table>",
1770
+ "bbox": [
1771
+ 344,
1772
+ 101,
1773
+ 653,
1774
+ 305
1775
+ ],
1776
+ "page_idx": 13
1777
+ },
1778
+ {
1779
+ "type": "image",
1780
+ "img_path": "images/b0883dab9f4a7fec3bda7f5feb2162d7d71eb6b3b303edf2c63e2002d7a13d51.jpg",
1781
+ "image_caption": [
1782
+ "Figure 5: Distribution of number of edits in the entire crawled dataset. "
1783
+ ],
1784
+ "image_footnote": [],
1785
+ "bbox": [
1786
+ 210,
1787
+ 371,
1788
+ 759,
1789
+ 616
1790
+ ],
1791
+ "page_idx": 13
1792
+ },
1793
+ {
1794
+ "type": "text",
1795
+ "text": "Figure 5 plots the distribution of number of edits that are recorded in Table 10. We can see the distribution is long tail, with majority of edits as 1 or 2. ",
1796
+ "bbox": [
1797
+ 169,
1798
+ 678,
1799
+ 825,
1800
+ 708
1801
+ ],
1802
+ "page_idx": 13
1803
+ },
1804
+ {
1805
+ "type": "text",
1806
+ "text": "C ABLATION STUDY ",
1807
+ "text_level": 1,
1808
+ "bbox": [
1809
+ 174,
1810
+ 102,
1811
+ 357,
1812
+ 117
1813
+ ],
1814
+ "page_idx": 14
1815
+ },
1816
+ {
1817
+ "type": "text",
1818
+ "text": "We tried different graph representations with corresponding graph embedding methods. The multi represents the multi-graph defined by different edge types, with the parameterization of message passing function mentioned in Eq 2; the code2inv is the parameterization used in Si et al. (2018); the single instead uses a single graph with edge types as one-hot edge features. We found that more layers does not lead to better generalization in our setting, and it becomes slower in terms of convergence. So we report the results with 4 layers in our main paper. ",
1819
+ "bbox": [
1820
+ 173,
1821
+ 125,
1822
+ 826,
1823
+ 209
1824
+ ],
1825
+ "page_idx": 14
1826
+ },
1827
+ {
1828
+ "type": "table",
1829
+ "img_path": "images/092ce9089d8364cab4344ee5dc59f50b12684ddda622374a532b067e550ff4e9.jpg",
1830
+ "table_caption": [],
1831
+ "table_footnote": [],
1832
+ "table_body": "<table><tr><td>model</td><td>max_lv</td><td>Total</td><td>Operator</td><td>Location</td><td>Value</td><td>Type</td></tr><tr><td>multi</td><td>20</td><td>7.63</td><td>30.0</td><td>13.1</td><td>22.6</td><td>54.5</td></tr><tr><td>multi</td><td>14</td><td>11.05</td><td>48.0</td><td>17.9</td><td>38.6</td><td>61.6</td></tr><tr><td>multi</td><td>4</td><td>13.33</td><td>53.4</td><td>36.2</td><td>38.6</td><td>56.4</td></tr><tr><td>code2inv</td><td>20</td><td>10.3</td><td>18.1</td><td>25.7</td><td>38.8</td><td>57.7</td></tr><tr><td>code2inv</td><td>14</td><td>8.92</td><td>40.0</td><td>18.1</td><td>36.0</td><td>55.9</td></tr><tr><td>code2inv</td><td>4</td><td>13.29</td><td>30.8</td><td>18.9</td><td>28.2</td><td>68.21</td></tr><tr><td>single</td><td>20</td><td>5.00</td><td>20.2</td><td>10.3</td><td>14.2</td><td>44.8</td></tr><tr><td>single</td><td>14</td><td>10.69</td><td>67.7</td><td>18.6</td><td>49.6</td><td>38.7</td></tr><tr><td>single</td><td>4</td><td>12.88</td><td>55.8</td><td>20.8</td><td>43.2</td><td>55.8</td></tr></table>",
1833
+ "bbox": [
1834
+ 259,
1835
+ 467,
1836
+ 738,
1837
+ 614
1838
+ ],
1839
+ "page_idx": 14
1840
+ },
1841
+ {
1842
+ "type": "text",
1843
+ "text": "Table 11: Ablation study with different graph embedding parameterizations and different number of layers. Full end-to-end repair accuracy as well as the accuracies for each primitives are reported. All the numbers are for top-1 prediction. ",
1844
+ "bbox": [
1845
+ 176,
1846
+ 626,
1847
+ 825,
1848
+ 667
1849
+ ],
1850
+ "page_idx": 14
1851
+ },
1852
+ {
1853
+ "type": "text",
1854
+ "text": "D 30 RANDOM TESTING POINTS FOR TAJS BASELINE STUDY ",
1855
+ "text_level": 1,
1856
+ "bbox": [
1857
+ 171,
1858
+ 101,
1859
+ 704,
1860
+ 119
1861
+ ],
1862
+ "page_idx": 15
1863
+ },
1864
+ {
1865
+ "type": "table",
1866
+ "img_path": "images/44ea087301871a9d9c66cff1744777b2cab5747d15e266494335d1742608ef17.jpg",
1867
+ "table_caption": [],
1868
+ "table_footnote": [],
1869
+ "table_body": "<table><tr><td colspan=\"1\" rowspan=\"1\">868记2</td><td colspan=\"1\" rowspan=\"1\">记记记7亿</td><td colspan=\"1\" rowspan=\"1\">068u9</td><td colspan=\"1\" rowspan=\"1\">g1uuⅡ</td><td colspan=\"1\" rowspan=\"1\">668L9</td><td colspan=\"1\" rowspan=\"1\">S4ε乙</td><td colspan=\"1\" rowspan=\"1\">U</td></tr><tr><td colspan=\"1\" rowspan=\"1\"> org.civicrm.civicaseDiscordWithDatabasecryptiifo_restkootCaseDetailsFileTab.jshelp.jsROT13.jsindex.jsbefore_router_match.js</td><td colspan=\"1\" rowspan=\"1\"> pizza-totally-rocks geekTalks simple-crafting WTF-AdventurezulipForm.jsindex.jsgather.jsmana.js stream_muting.js</td><td colspan=\"1\" rowspan=\"1\"> matic.js graph-jsCraxi j5-ledsflom-reactgetETHFromFaucet.jspoint.jsdisplay.jsblink.jsquestion.js</td><td colspan=\"1\" rowspan=\"1\">iotdb-mongodbOrca pandora-validationAloChat react-native-with-redux-react-navigation-v2-boilerplatecount.js会index.jsContainer.jssplash.js</td><td colspan=\"1\" rowspan=\"1\">hackcincinnati/siteALFACharts musketeer-shop React-QuizComponent rn-mitrais-mbAdvisors.jscrosshairs.jsorder.jsQuizQuestion.jsListAlbums.js</td><td colspan=\"1\" rowspan=\"1\"> js-dom-and-events-acting-on-events-lab-v-000MEANLetsRollroma2hira js-ajax-hiting-apis-lab--000index.jsarticles.server.route.jsrouter.jsconvert.jsindex.js</td><td colspan=\"1\" rowspan=\"1\">Github Link to Diff</td></tr><tr><td colspan=\"1\" rowspan=\"1\">areAvailable()print()registerSetting()testRecipesoriginisAllowed()printSplit()addSetting() preferenceoriginTrue</td><td colspan=\"1\" rowspan=\"1\">getRecipecheckTalkOwnershipgetBehaviorthis._superadd_messagesgetRecipescheckCommentOwnershipgetMetathis.superadd_old_messages</td><td colspan=\"1\" rowspan=\"1\">ETHFaucetAddressdatagame.draw()blinkDataTypes.STRINGETHFAUCET_ADDRESSdataManagergame.run()strobeDataTypes.TEXT</td><td colspan=\"1\" rowspan=\"1\">thenerase()addAsyncSetup PropTypes.stringCOLOR.DARKmakeexplode()addSyncSetup PropTypes.objectCOLOR.PANTOME</td><td colspan=\"1\" rowspan=\"1\">color.primaryMath.floorDECIMAL(obj).instruction_textsinfo.typecolor.accentMath.roundINTEGER(obj).instruction_textinfo.album_type</td><td colspan=\"1\" rowspan=\"1\">(elem).InnerHTMLapp.paramsusername(elem).valuelogin(elem).innerHTMLapp.paramuserName(elem).innerHTMLname</td><td colspan=\"1\" rowspan=\"1\">Buggy CodeFixed Code</td></tr><tr><td colspan=\"1\" rowspan=\"1\">868□2</td><td colspan=\"1\" rowspan=\"1\">记记记记2</td><td colspan=\"1\" rowspan=\"1\">068u%</td><td colspan=\"1\" rowspan=\"1\">G切uu</td><td colspan=\"1\" rowspan=\"1\">068 9</td><td colspan=\"1\" rowspan=\"1\">C4c乙</td><td colspan=\"2\" rowspan=\"1\">U</td></tr><tr><td colspan=\"1\" rowspan=\"1\">refactoringrefactoringrefactoringrefactoringrefactoring</td><td colspan=\"1\" rowspan=\"1\">refactoringrefactoringrefactoringrefactoringrefactoring</td><td colspan=\"1\" rowspan=\"1\">refactoringrefactoringfunctional bugfunctional bugfunctional bug</td><td colspan=\"1\" rowspan=\"1\">functional bugfunctional bugfunctional bugfunctional bugfunctional bug</td><td colspan=\"1\" rowspan=\"1\">functional bugfunctional bugfunctional bugundefined propertyundefined property</td><td colspan=\"1\" rowspan=\"1\">undefined propertyundefined propertyundefined propertyundefined propertyundefined property</td><td colspan=\"2\" rowspan=\"1\">Bug Type</td></tr><tr><td colspan=\"1\" rowspan=\"1\">Failed importing library</td><td colspan=\"1\" rowspan=\"1\">Failed importing libraryFailed importing library</td><td colspan=\"1\" rowspan=\"1\"></td><td colspan=\"1\" rowspan=\"1\">Failed importing library event s</td><td colspan=\"1\" rowspan=\"1\">Undefined pr oces s</td><td colspan=\"1\" rowspan=\"1\">Failed doc.getElem () Undefined processFailed importing library ut ilFailed doc.getElem ()</td><td colspan=\"2\" rowspan=\"1\">False AlarmTAJS</td></tr><tr><td colspan=\"1\" rowspan=\"1\">exports.testRecipesI</td><td colspan=\"1\" rowspan=\"1\"></td><td colspan=\"1\" rowspan=\"1\">this.game.draw()led.strobe(750)</td><td colspan=\"1\" rowspan=\"1\">serviceProvider.addAsyncSetup(...)</td><td colspan=\"1\" rowspan=\"1\"></td><td colspan=\"1\" rowspan=\"1\">app.params('.</td><td colspan=\"1\" rowspan=\"1\">Prediction</td><td colspan=\"1\" rowspan=\"4\">HOPPITY</td></tr><tr><td colspan=\"1\" rowspan=\"1\"></td><td colspan=\"1\" rowspan=\"1\"></td><td colspan=\"1\" rowspan=\"1\">八</td><td colspan=\"1\" rowspan=\"1\"></td><td colspan=\"1\" rowspan=\"1\"></td><td colspan=\"1\" rowspan=\"1\"></td><td colspan=\"1\" rowspan=\"1\"></td></tr><tr><td colspan=\"1\" rowspan=\"1\">厂</td><td colspan=\"1\" rowspan=\"1\"></td><td colspan=\"1\" rowspan=\"1\"></td><td colspan=\"1\" rowspan=\"1\">厂</td><td colspan=\"1\" rowspan=\"1\"></td><td colspan=\"1\" rowspan=\"1\"></td><td colspan=\"1\" rowspan=\"1\"></td></tr><tr><td colspan=\"1\" rowspan=\"1\"></td><td colspan=\"1\" rowspan=\"1\"></td><td colspan=\"1\" rowspan=\"1\"></td><td colspan=\"1\" rowspan=\"1\"></td><td colspan=\"1\" rowspan=\"1\"></td><td colspan=\"1\" rowspan=\"1\">厂</td><td colspan=\"1\" rowspan=\"1\"></td></tr></table>",
1870
+ "bbox": [
1871
+ 228,
1872
+ 122,
1873
+ 769,
1874
+ 888
1875
+ ],
1876
+ "page_idx": 15
1877
+ },
1878
+ {
1879
+ "type": "table",
1880
+ "img_path": "",
1881
+ "table_caption": [],
1882
+ "table_footnote": [],
1883
+ "bbox": [
1884
+ 227,
1885
+ 102,
1886
+ 771,
1887
+ 779
1888
+ ],
1889
+ "page_idx": 16
1890
+ }
1891
+ ]
parse/train/SJeqs6EFvB/SJeqs6EFvB_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJeqs6EFvB/SJeqs6EFvB_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SygvTcYee/SygvTcYee.md ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # PARMAC: DISTRIBUTED OPTIMISATION OF NESTED FUNCTIONS, WITH APPLICATION TO LEARNING BINARY AUTOENCODERS
2
+
3
+ Miguel A. Carreira-Perpi ´ n˜ an & Mehdi Alizadeh ´ EECS, University of California, Merced http://eecs.ucmerced.edu
4
+
5
+ # ABSTRACT
6
+
7
+ Many powerful machine learning models are based on the composition of multiple processing layers, such as deep nets, which gives rise to nonconvex objective functions. A general, recent approach to optimise such “nested” functions is the method of auxiliary coordinates (MAC). MAC introduces an auxiliary coordinate for each data point in order to decouple the nested model into independent submodels. This decomposes the optimisation into steps that alternate between training single layers and updating the coordinates. It has the advantage that it reuses existing single-layer algorithms, introduces parallelism, and does not need to use chain-rule gradients, so it works with nondifferentiable layers. We describe ParMAC, a distributed-computation model for MAC. This trains on a dataset distributed across machines while limiting the amount of communication so it does not obliterate the benefit of parallelism. ParMAC works on a cluster of machines with a circular topology and alternates two steps until convergence: one step trains the submodels in parallel using stochastic updates, and the other trains the coordinates in parallel. Only submodel parameters, no data or coordinates, are ever communicated between machines. ParMAC exhibits high parallelism, low communication overhead, and facilitates data shuffling, load balancing, fault tolerance and streaming data processing. We study the convergence of ParMAC and its parallel speedup, and implement ParMAC using MPI to learn binary autoencoders for fast image retrieval, achieving nearly perfect speedups in a 128-processor cluster with a training set of 100 million high-dimensional points.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Serial computing has reached a plateau and parallel, distributed architectures are becoming widely available, from machines with a few cores to cloud computing with 1000s of machines. The combination of powerful nested models with large datasets is a key ingredient to solve difficult problems in machine learning, computer vision and other areas, and it underlies recent successes in deep learning (Hinton et al., 2012; Le et al., 2012; Dean et al., 2012). Unfortunately, parallel computation is not easy, and many good serial algorithms do not parallelise well. The cost of communicating (through the memory hierarchy or a network) greatly exceeds the cost of computing, both in time and energy, and will continue to do so for the foreseeable future. Thus, good parallel algorithms must minimise communication and maximise computation per machine, while creating sufficiently many subproblems (ideally independent) to benefit from as many machines as possible. The load (in runtime) on each machine should be approximately equal. Faults become more frequent as the number of machines increases, particularly if they are inexpensive machines. Machines may be heterogeneous and differ in CPU and memory; this is the case with initiatives such as SETI $@$ home, which may become an important source of distributed computation in the future. Big data applications have additional restrictions. The size of the data means it cannot be stored on a single machine, so distributedmemory architectures are necessary. Sending data between machines is prohibitive because of the size of the data and the high communication costs. In some applications, more data is collected than can be stored, so data must be regularly discarded. In others, such as sensor networks, limited battery life and computational power imply that data must be processed locally.
12
+
13
+ In this paper, we focus on machine learning models of the form $\mathbf { y } = \mathbf { F } _ { K + 1 } ( \ldots \mathbf { F } _ { 2 } ( \mathbf { F } _ { 1 } ( \mathbf { x } ) ) \ldots )$ , i.e., consisting of a nested mapping from the input $\mathbf { x }$ to the output y. Such nested models involve multiple parameterised layers of processing and include deep neural nets, cascades for object recognition in computer vision or for phoneme classification in speech processing, wrapper approaches to classification or regression, and various combinations of feature extraction/learning and preprocessing prior to some learning task. Nested and hierarchical models are ubiquitous in machine learning because they provide a way to construct complex models by the composition of simple layers. However, training nested models is difficult even in the serial case because function composition produces inherently nonconvex functions, which makes gradient-based optimisation difficult and slow, and sometimes inapplicable (e.g. with nonsmooth or discrete layers).
14
+
15
+ Our starting point is a recently proposed technique to train nested models, the method of auxiliary coordinates (MAC) (Carreira-Perpi ˜n´an and Wang, 2012; 2014). This reformulates the optimisation into an iterative procedure that alternates training submodels independently with coordinating them. It introduces significant model and data parallelism, can often train the submodels using existing algorithms, and has convergence guarantees with differentiable functions to a local stationary point, while it also applies with nondifferentiable or even discrete layers. MAC has been applied to various nested models (Carreira-Perpi ˜n´an and Wang, 2014; Wang and Carreira-Perpi ˜n´an, 2014; Carreira-Perpi ˜n´an and Raziperchikolaei, 2015; Raziperchikolaei and Carreira-Perpi ˜n´an, 2016; Carreira-Perpi ˜n´an and Vladymyrov, 2015). However, the original papers proposing MAC (Carreira-Perpi ˜n´an and Wang, 2012; 2014) did not address how to run MAC on a distributed computing architecture, where communication between machines is far costlier than computation. This paper proposes ParMAC, a parallel, distributed framework to learn nested models using MAC, analyses its parallel speedup and convergence, implements it in MPI for the problem of learning binary autoencoders, and demonstrates its ability to train on large datasets and achieve large speedups on a distributed cluster.
16
+
17
+ Related work Distributed optimisation and large-scale machine learning have been steadily gaining interest in recent years, with the development of parallel computation abstractions tailored to machine learning, such as Spark (Zaharia et al., 2010), GraphLab (Low et al., 2012), Petuum (Xing et al., 2015) or TensorFlow (Abadi et al., 2015), which have the goal of making cloud computing easily available to train machine learning models. Most work has centred on convex optimisation, particularly when the objective function has the form of empirical risk minimisation (data fitting term plus regulariser) (Cevher et al., 2014). This includes many important models in machine learning, such as linear regression, LASSO, logistic regression or SVMs. Such work is typically based on stochastic gradient descent (SGD) (Bottou, 2010), coordinate descent (CD) (Wright, 2016) or the alternating direction method of multipliers (ADMM) (Boyd et al., 2011). This has resulted in several variations of parallel SGD (Bertsekas, 2011; Zinkevich et al., 2010; Niu et al., 2011), parallel CD (Bradley et al., 2011; Richt´arik and Tak´aˇc, 2013; Liu and Wright, 2015) and parallel ADMM (Boyd et al., 2011; Ouyang et al., 2013; Zhang and Kwok, 2014).
18
+
19
+ Little work has addressed nonconvex models. Most of it has focused on deep nets (Dean et al., 2012; Le et al., 2012). Google’s DistBelief (Dean et al., 2012) uses asynchronous parallel SGD (with gradients for the full model computed with backpropagation) to achieve data parallelism, and some form of model parallelism. The latter is achieved by carefully partitioning the neural net into pieces and allocating them to machines to compute gradients. This is difficult to do and requires a careful match of the neural net structure (number of layers and hidden units, connectivity, etc.) to the target hardware. Also, parallel SGD can diverge with nonconvex models, which requires heuristics to make sure we average replica models that are close in parameter space and thus associated with the same optimum. Although this has managed to train huge nets on huge datasets by using tens of thousands of CPU cores, the speedups achieved were very modest. Other work has used similar techniques but for GPUs (Coates et al., 2013; Seide et al., 2014).
20
+
21
+ Finally, there also exist specific approximation techniques for certain types of large-scale machine learning problems, such as spectral problems, using the Nystr ¨om formula or other landmarkbased methods (Williams and Seeger, 2001; Bengio et al., 2004; Drineas and Mahoney, 2005; Talwalkar et al., 2008; Vladymyrov and Carreira-Perpi ˜n´an, 2013; 2016).
22
+
23
+ ParMAC is specifically designed for nested models, which are typically nonconvex and include deep nets and many other models, some of which have nondifferentiable layers. As we describe below, ParMAC has the advantages of being simple and relatively independent of the target hardware, while achieving high speedups.
24
+
25
+ Many optimisation problems in machine learning involve mathematically “nested” functions of the form $\mathbf { F } ( \mathbf { x } ; \mathbf { W } ) = \bar { \mathbf { F } } _ { K + 1 } ( . . . \mathbf { F } _ { 2 } ( \mathbf { F } _ { 1 } ( \mathbf { x } ; \mathbf { W } _ { 1 } ) ; \mathbf { W } _ { 2 } ) . . . ; \mathbf { W } _ { K + 1 } )$ with parameters W, such as deep nets. Such problems are traditionally optimised using methods based on gradients computed using the chain rule. However, such gradients may sometimes be inconvenient to use, or may not exist (e.g. if some of the layers are nondifferentiable, as with binary autoencoders). Also, they are hard to parallelise, because of the inherent sequentiality in the chain rule. The method of auxiliary coordinates $( M A C )$ (Carreira-Perpi ˜n´an and Wang, 2012; 2014) is designed to optimise nested models without using chain-rule gradients while introducing parallelism. The idea is to break nested functional relationships judiciously by introducing new variables (the auxiliary coordinates) as equality constraints. These are then solved by optimising a penalised function using alternating optimisation over the original parameters (which we call the W step) and over the coordinates (which we call the $\mathbf { Z }$ step). The result is a coordination-minimisation (CM) algorithm: the minimisation (W) step updates the parameters by splitting the nested model into independent submodels and training them using existing algorithms, and the coordination $\mathbf { \rho } ( \mathbf { Z } )$ step ensures that corresponding inputs and outputs of submodels eventually match. MAC algorithms have been developed for several nested models so far: deep nets (Carreira-Perpi ˜n´an and Wang, 2014), low-dimensional SVMs (Wang and Carreira-Perpi ˜n´an, 2014), binary autoencoders (Carreira-Perpi ˜n´an and Raziperchikolaei, 2015), affinity-based loss functions for binary hashing (Raziperchikolaei and Carreira-Perpi ˜n´an, 2016) and parametric nonlinear embeddings (Carreira-Perpi ˜n´an and Vladymyrov, 2015). Although this paper proposes and analyses ParMAC in general, our MPI implementation is for the particular case of binary autoencoders. These define a nonconvex nondifferentiable problem, yet its MAC algorithm is simple and effective.
26
+
27
+ MAC algorithm for binary autoencoders A binary autoencoder $( B A )$ is a usual autoencoder but with a binary code layer. It consists of an encoder $\mathbf { h } ( \mathbf { x } )$ that maps a real vector $\textbf { x } \in \mathbb { R } ^ { D }$ onto a binary code vector with $L \ < \ D$ bits, $\mathbf { z } ~ \in ~ \{ 0 , 1 \} ^ { L }$ , and a linear decoder $\mathbf f ( \mathbf z )$ which maps $\mathbf { z }$ back to $\mathbb { R } ^ { D }$ in an effort to reconstruct $\mathbf { x }$ . We will call h a binary hash function (see later). Let us write $\mathbf { h } ( \mathbf { x } ) = \mathcal { \Gamma } ( \mathbf { A x } )$ (A includes a bias by having an extra dimension $x _ { 0 } = 1$ for each $\mathbf { x }$ ) where $\mathbf { A } \in \mathbb { R } ^ { L \times ( D + 1 ) }$ and $\boldsymbol { \mathscr { I } } ( t )$ is a step function applied elementwise, i.e., $\boldsymbol { \mathrm { \Sigma } } ( t ) = 1$ if $t \geq 0$ and $\boldsymbol { \mathrm { { J } } } ( t ) = 0$ otherwise. Given a dataset of $D$ -dimensional patterns $\mathbf { X } = \left( \mathbf { x } _ { 1 } , \ldots , \mathbf { x } _ { N } \right)$ , our objective function, which involves the nested model $\mathbf { y } _ { \mathrm { { o } } } = \mathbf { f } ( \mathbf { h } ( \mathbf { x } ) )$ , is the usual least-squares reconstruction error $\begin{array} { r } { E _ { \mathrm { B A } } ( \mathbf { h } , \mathbf { f } ) = \sum _ { n = 1 } ^ { N } \| \mathbf { x } _ { n } - \mathbf { f } ( \mathbf { h } ( \mathbf { x } _ { n } ) ) \| ^ { 2 } } \end{array}$ . Optimising this nonconvex, nonsmooth function is NP-complete. Where the gradients do exist wrt A they are zero, so optimisation of $\mathbf { h }$ using chainrule gradients does not apply. We introduce as auxiliary coordinates the outputs of $\mathbf { h }$ , i.e., the codes for each of the $N$ input patterns, and obtain the following equality-constrained problem:
28
+
29
+ $$
30
+ \operatorname* { m i n } _ { \mathbf { h } , \mathbf { f } , \mathbf { Z } } \sum _ { n = 1 } ^ { N } \left\| \mathbf { x } _ { n } - \mathbf { f } ( \mathbf { z } _ { n } ) \right\| ^ { 2 } \quad \mathrm { s . t . } \quad \mathbf { z } _ { n } = \mathbf { h } ( \mathbf { x } _ { n } ) , \mathbf { z } _ { n } \in \{ 0 , 1 \} ^ { L } , n = 1 , \ldots , N .
31
+ $$
32
+
33
+ Note the codes are binary. We now apply the quadratic-penalty method and minimise the following objective function while progressively increasing $\mu$ , so the constraints are eventually satisfied:
34
+
35
+ $$
36
+ E _ { { \cal Q } } ( { \bf h } , { \bf f } , { \bf Z } ; \mu ) = \sum _ { n = 1 } ^ { N } \left\| { \bf x } _ { n } - { \bf f } ( { \bf z } _ { n } ) \right\| ^ { 2 } + \mu \left\| { \bf z } _ { n } - { \bf h } ( { \bf x } _ { n } ) \right\| ^ { 2 } \mathrm { s . t . } { \bf z } _ { n } \in \{ 0 , 1 \} ^ { L } , n = 1 , \ldots , N .
37
+ $$
38
+
39
+ Finally, we apply alternating optimisation over $\mathbf { Z }$ and $\mathbf { W } = ( \mathbf { h } , \mathbf { f } )$ . This gives the following steps:
40
+
41
+ Over $\mathbf { Z }$ for fixed $( \mathbf { h } , \mathbf { f } )$ , this is a binary optimisation on $N L$ variables, but it separates into $N$ independent optimisations each on only $L$ variables, with the form of $\mathrm { ^ a }$ binary proximal operator (where we omit the index $n$ ): $\mathrm { m i n } _ { \mathbf { z } } \left\| \mathbf { x } - \mathbf { f } ( \mathbf { z } ) \right\| ^ { 2 } + \mu \| \mathbf { z } - \mathbf { h } ( \mathbf { x } ) \| ^ { 2 } \boldsymbol { \mathfrak { s } }$ s.t. $\mathbf { z } \in \{ 0 , 1 \} ^ { L }$ . This can be solved approximately by alternating optimisation over bits. Over $\mathbf { W } = \left( \mathbf { h } , \mathbf { f } \right)$ for fixed $\mathbf { Z }$ , we obtain $L + D$ independent problems: for each of the $L$ single-bit hash functions (which try to predict $\mathbf { Z }$ optimally from $\mathbf { X }$ ), each solvable by fitting a linear SVM; and for each of the $D$ linear decoders in f (which try to reconstruct $\mathbf { X }$ optimally from $\mathbf { Z }$ ), each a linear least-squares problem.
42
+
43
+ The user must choose a schedule for the penalty parameter $\mu$ (sequence of values $0 < \mu _ { 1 } < \cdots <$ $\mu _ { \infty } )$ ). This should increase slowly enough that the binary codes can change considerably and explore better solutions before the constraints are satisfied and the algorithm stops. With BAs, MAC stops for a finite value of $\mu$ , which occurs whenever $\mathbf { Z }$ does not change compared to the previous $\mathbf { Z }$ step. This gives a practical stopping criterion. Carreira-Perpi˜n´an and Raziperchikolaei (2015) give proofs of these statements and further details about the algorithm. Fig. 1 gives the MAC algorithm for BAs.
44
+
45
+ ![](images/28e2837e43709b2989c8ca8d4340a5e869997cd4e9c20d0643554b3b04d037df.jpg)
46
+ Figure 1: MAC algorithm for binary autoencoders. “parfor” indicates a for loop whose iterations are carried out in parallel. The steps over $\mathbf { h }$ and f can be run in parallel as well.
47
+
48
+ The BA was proposed as a way to learn good binary hash functions for fast, approximate information retrieval (Carreira-Perpi ˜n´an and Raziperchikolaei, 2015). Binary hashing (Grauman and Fergus, 2013) has emerged in recent years as an effective way to do fast, approximate nearest-neighbour searches in image databases. The real-valued, high-dimensional image vectors are mapped onto a binary space with $L$ bits and the search is performed there using Hamming distances at a vastly faster speed and smaller memory (e.g. $N = 1 0 ^ { 9 }$ points with $D = 5 0 0$ take $^ { 2 } \mathrm { T B }$ , but only 8 GB using $L = 6 4$ bits, which easily fits in RAM). As shown by Carreira-Perpi ˜n´an and Raziperchikolaei (2015), training BAs with MAC beats approximate optimisation approaches such as relaxing the codes or the step function in the encoder, and yields state-of-the-art binary hash functions h in unsupervised problems, improving over established approaches such as iterative quantisation (ITQ) (Gong et al., 2013). We focus mostly on linear hash functions because these are, by far, the most used type of hash functions in the literature of binary hashing, due to the fact that computing the binary codes for a test image must be fast at run time.
49
+
50
+ MAC in general With a nested function with $K$ layers, we can introduce auxiliary coordinates at each layer. For example, with a neural net, this decouples the weight vector of every hidden unit in the W step, which can be solved as a logistic regression (see Carreira-Perpi ˜n´an and Alizadeh, 2016). For a large net with a large dataset, this affords an enormous potential for parallel computation.
51
+
52
+ MAC and EM MAC is very similar to expectation-maximisation (EM) at a conceptual level. EM (McLachlan and Krishnan, 2008) applies generally to many probabilistic models. The resulting algorithm can be very different (e.g. EM for Gaussian mixtures vs EM for hidden Markov models), but it always alternates two steps that conceptually do the following. The E step updates in parallel the posterior probabilities. This separates over data points and is like the $\mathbf { Z }$ step in MAC, where the posterior probabilities are the auxiliary coordinates, and where the step may be in closed-form or require optimisation, depending on the model. The M step updates in parallel the “submodels”. For a mixture with $M$ components, these are the $M$ Gaussians (means, covariances, proportions). This separates over submodels and is like the W step in MAC. For BAs, the submodels are the $L$ encoders (linear SVMs) and the $D$ decoders (linear regressors); for a neural net, each weight vector of a hidden unit is a submodel (a logistic regressor). For Gaussian mixtures, the M step can be done exactly in one “epoch” because it is a simple average. For MAC, it usually requires optimisation, and so multiple epochs. In fact, ParMAC applies to EM by using $e = 1$ epoch: in the W step, the Gaussians visit each machine circularly and (their averages) are updated on its data; in the $\mathbf { Z }$ step, each machine updates its posterior probabilities.
53
+
54
+ In the rest of the paper, some readers may find this analogy useful and think of EM for Gaussian mixtures instead of MAC, replacing “submodels” and “auxiliary coordinates” in MAC with “Gaussians” and “posterior probabilities” in EM, respectively.
55
+
56
+ ![](images/0935259ff5ddbeac36f41db147d0b66d8970c89e9d73ac600a82da6a50558ab8.jpg)
57
+ Figure 2: ParMAC model with $P = 4$ machines, $M = 1 2$ submodels “ ${ \bf w } _ { h }$ ” and $N = 4 0$ data points. Submodels $h$ , $h + M$ , $h + 2 M$ and $h + 3 M$ are copies of submodel $h$ , but only one of them is the most currently updated. At the end of the W step all copies are identical.
58
+
59
+ # 3 PARMAC: A PARALLEL, DISTRIBUTED COMPUTATION MODEL FOR MAC
60
+
61
+ A specific MAC algorithm depends on the model and objective function and on how the auxiliary coordinates are introduced. We can achieve steps that are closed-form, convex, nonconvex, binary, or others. However, we will assume the following always hold: (1) Separability over data points. In the $\mathbf { Z }$ step, the $N$ subproblems for $\mathbf { z } _ { 1 } , \ldots , \mathbf { z } _ { N }$ are independent, one per data point. Each $\mathbf { z } _ { n }$ step depends on the current model. (2) Separability over submodels. In the W step, there are $M$ independent submodels, where $M$ depends on the problem. For example, $M$ is the number of hidden units in a deep net, or the number of hash functions and linear decoders in a BA. Each submodel depends on all the data and coordinates. We now show how to turn this into a distributed, low-communication $P a r M A C$ algorithm.
62
+
63
+ The basic idea in ParMAC is as follows. With large datasets in distributed systems, it is imperative to minimise data movement over the network because the communication time generally far exceeds the computation time in modern architectures. In MAC we have 3 types of data: the original training data $( \mathbf { X } , \mathbf { Y } )$ , the auxiliary coordinates $\mathbf { Z }$ , and the model parameters (the submodels). Usually, the latter type is far smaller. In ParMAC, we never communicate training or coordinate data; each machine keeps a disjoint portion of $( \mathbf { X } , \mathbf { Y } , \mathbf { Z } )$ corresponding to a subset of the points. Only model parameters are communicated, during the W step, following a circular topology, which implicitly implements a stochastic optimisation. The model parameters are the hash functions h and the decoder f for BAs, and the weight vector ${ \bf w } _ { h }$ of each hidden unit $h$ for deep nets. Let us see this in detail (refer to fig. 2).
64
+
65
+ Assume we have $P$ identical processing machines, each with its own memory and CPU, connected through a network in a circular unidirectional topology. Each machine stores a subset of the data points and corresponding coordinates $\left( \mathbf { x } _ { n } , \mathbf { y } _ { n } , \mathbf { z } _ { n } \right)$ such that the subsets are disjoint and their union is the entire data. Before the $\mathbf { Z }$ step starts, each machine contains all the (just updated) submodels. This means that in the $\mathbf { Z }$ step each machine processes its auxiliary coordinates $\left\{ { \bf z } _ { n } \right\}$ independently of all other machines, i.e., no communication occurs. The W step is more subtle. At the beginning of the W step, each machine will contain all the submodels and its portion of the data and (just updated) coordinates. Each submodel must have access to the entire data and coordinates in order to update itself and, since the data cannot leave its home machine, the submodel must go to the data. We achieve this in the circular topology with an asynchronous processing, as follows. Each machine keeps a queue of submodels to be processed, and repeatedly performs the following operations: extract a submodel from the queue, process it on its data and send it to the machine’s successor (which will insert it in its queue). If the queue is empty, the machine waits until it is nonempty. The queue of each machine is initialised with a portion $M / P$ of submodels associated with that machine (e.g. in fig. 2, machine 1’s queue contains submodels 1–3, machine 2 submodels 4–6, etc.). Each submodel carries a counter that is initially 1 and increases every time it visits a machine. When it reaches $P$ , the submodel has visited all machines in sequence and has completed an epoch. We repeat this for $e$ epochs and, to ensure all machines have all final submodels before starting the $\mathbf { Z }$ step, we run a communication-only epoch $e + 1$ (without computation), where submodels simply move from machine to machine.
66
+
67
+ Since each submodel is updated as soon as it visits a machine, rather than computing the exact gradient once it has visited all machines and then take a step, the W step is really carrying out stochastic steps for each submodel. For example, if the update is done by a gradient step, we are actually implementing stochastic gradient descent (SGD) where the minibatches are of size $N / P$ (or smaller, if we subdivide a machine’s data portion into minibatches, which should be typically the case in practice). From this point of view, we can regard the W step as doing SGD on each submodel in parallel by having each submodel visit the minibatches in each machine.
68
+
69
+ As described, and as implemented in our experiments, the entire model parameters are communicated $e + 1$ times in a MAC iteration if running e epochs in the W step. We can also run $e$ epochs with only 2 rounds of communication by having a submodel do e consecutive passes within each machine’s data. This reduces the amount of shuffling, but should not be a problem if the data are randomly distributed over machines.
70
+
71
+ Extensions of ParMAC Data shuffling, which improves the SGD convergence speed, can be achieved without data movement by accessing the local data in random order at each epoch (withinmachine), and by randomising the circular topology at each epoch (across-machine). Load balancing is simple because the work in both W and $\mathbf { Z }$ steps is proportional to the number of data points $N$ . Hence, if the processing power of machine $p$ is proportional to $\alpha _ { p } \ > \ 0$ , we allocate to it $N \alpha _ { p } / ( \alpha _ { 1 } + \cdot \cdot \cdot + \bar { \alpha _ { P } } )$ data points. Streaming, i.e., discarding old data and adding new data during training, can be done by adding/removing data within-machine, or by adding/removing machines and updating the circular topology. Fault tolerance is possible because we can still learn a good model even if we lose the data from a machine that fails, and because in the W step we can revert to older copies of the lost submodels residing in other machines. See further details in Carreira-Perpi ˜n´an and Alizadeh (2016).
72
+
73
+ A theoretical model of the parallel speedup We can estimate the runtime of the $\mathbf { W }$ and $\mathbf { Z }$ steps assuming there are $M$ independent submodels of the same size in the W step, using $e$ epochs, on a dataset with $N$ training points, distributed over $P$ identical machines (each with $N / P$ points). Let $t _ { r } ^ { \mathbf { W } }$ be the computation time per submodel and data point in the W step, $t _ { r } ^ { \mathbf { Z } }$ the computation time per data point in the step, and the communication time per submodel in the W step. Then the runtime of the W and $\mathbf { Z }$ steps is $\begin{array} { r } { \tilde { T } ^ { \mathbf { W } } ( P ) = \lceil M / P \rceil ( t _ { r } ^ { \mathbf { W } } \frac { N } { P } + \dot { t } _ { c } ^ { \mathbf { W } } ) P e + \lceil M / P \rceil t _ { c } ^ { \mathbf { W } } P } \end{array}$ and $T ^ { \mathbf { Z } } ( P ) =$ $\textstyle M { \frac { N } { P } } t _ { r } ^ { \mathbf { Z } }$ P , respectively. Hence the parallel speedup is (see details in Carreira-Perpi ˜n´an and Alizadeh,
74
+
75
+ $$
76
+ S ( P ) = { \frac { T ( 1 ) } { T ( P ) } } = { \frac { \rho { \frac { 1 } { [ M / P ] } } M P } { { \frac { 1 } { N } } P ^ { 2 } + \rho _ { 2 } P + \rho _ { 1 } { \frac { 1 } { [ M / P ] } } M } } \rho _ { 1 } = t _ { r } ^ { \mathbf { Z } } / ( e + 1 ) t _ { c } ^ { \mathbf { W } } , \rho _ { 2 } = e t _ { r } ^ { \mathbf { W } } / ( e + 1 ) t _ { c } ^ { \mathbf { W } }
77
+ $$
78
+
79
+ where $\rho , \rho _ { 1 }$ and $\rho _ { 2 }$ are ratios of computation vs communication, dependent on the optimisation algorithm in the W and $\mathbf { Z }$ steps, and on the performace of the distributed system and MPI library.
80
+
81
+ Hence, if $P \leq M$ and $M$ is divisible by $P$ we have $\begin{array} { r } { S ( P ) = P / ( 1 + \frac { P } { o N } ) } \end{array}$ and if $P > M$ we have $\begin{array} { r } { S ( P ) = \rho M / ( \rho _ { 2 } + \rho _ { 1 } \frac { M } { P } + \frac { P } { N } ) } \end{array}$ . In practice, typically we have $\rho \ll 1$ ρN (because communication dominates computation in current architectures) and $\rho _ { 2 } N \gg 1$ (large dataset). If we take $P \ll \rho _ { 2 } N$ , then $S ( P ) \approx \bar { P }$ if $P \leq M$ and $\begin{array} { r } { S ( P ) \approx \rho M / ( \rho _ { 2 } + \rho _ { 1 } \frac { M } { P } ) } \end{array}$ if $P > M$ . Hence, the speedup is nearly perfect if using fewer machines than submodels, and otherwise it peaks at $S _ { 1 } ^ { * } = \rho M / ( \rho _ { 2 } +$ $2 \sqrt { \rho _ { 1 } M / N } ) \stackrel { \cdot } { > } M$ for $P = P _ { 1 } ^ { * } = \sqrt { \rho _ { 1 } M N } > M$ and decreases thereafter. This affords very large speedups for large datasets and large models. This theoretical speedup matches well our measured ones (see the experiments section), and can be used to determine optimal values for the number of machines $P$ to use in practice (subject to additional constraints, e.g. cost of the machines).
82
+
83
+ Eq. (3) also shows that we can leave the speedup unchanged by trading off dataset size and computation/communication times, as long as one of these holds: $\dot { N } t _ { r } ^ { \mathbf { W } }$ and $N t _ { r } ^ { \mathbf { Z } }$ remain constant; or $\mathbf { \Pi } _ { N / t _ { c } ^ { \mathbf { W } } } ^ { \star }$ remains constant; or $t _ { r } ^ { \mathbf { W } } / t _ { c } ^ { \mathbf { W } }$ and $t _ { r } ^ { \mathbf { Z } } / t _ { c } ^ { \mathbf { W } }$ remain constant.
84
+
85
+ In the BA, we have submodels of different size: encoders of size $D$ and decoders of size $L < D$ . We can model this by “grouping” the $D$ decoders into $L$ groups of $D / L$ decoders each, resulting in $M = 2 L$ equal-size submodels (assuming the ratio of computation and communication times of decoder vs encoder is $L / D < 1 \rangle$ ).
86
+
87
+ Convergence of ParMAC The only approximation that ParMAC makes to the original MAC algorithm is using SGD in the W step. Since we can guarantee convergence of SGD under certain conditions (e.g. Robbins-Monro schedules), we can recover the original convergence guarantees for MAC to a local stationary point with differentiable layers (see details in Carreira-Perpi ˜n´an and Alizadeh, 2016). This convergence guarantee is independent of the number of layers, models and processors. With nondifferentiable layers, the convergence properties of MAC (and ParMAC) are not well known. In particular, for the binary autoencoder the encoding layer is discrete and the problem is NP-complete. While convergence guarantees are important theoretically, in practical applications with large datasets in a distributed setting one typically runs SGD for just a few epochs, even one or less than one (i.e., we stop SGD before passing through all the data). This typically reduces the objective function to a good enough value as fast as possible, since each pass over the data is very costly. In our experiments, 1–2 epochs in the W step make ParMAC very similar to MAC using an exact step.
88
+
89
+ Circular vs parameter-server topologies We also considered implementing ParMAC using a parameter-server (PS) topology rather than a circular one, but the latter is better. With a PS we do parallel SGD on each submodel independently, i.e., each worker runs SGD on its own submodel replica for a while, sends it to the PS, and this broadcasts an “average” submodel back to the workers, asynchronously. The circular topology does true SGD on each submodel independently from the others. We can show the runtime per iteration using a PS is equal to that of the circular topology only if the server can communicate with $P$ workers simultaneously (rather than sequentially), otherwise it is slower. The reason is the PS has more communication. The PS has some additional disadvantages: parallel SGD converges more slowly than true SGD and is difficult to apply if the W step is nonconvex; and it needs extra machine(s) to act as parameter server(s). The fundamental issue is that both topologies differ in how they employ the available parallelism: the circular topology updates different, independent submodels, while the PS updates replicas of the same submodels.
90
+
91
+ # 4 EXPERIMENTS
92
+
93
+ MPI implementation of ParMAC for BAs. We have used $\mathrm { C } / \mathrm { C } { + + }$ , the GSL and BLAS libraries for mathematical operations, and the Message Passing Interface (MPI) (Gropp et al., 1999) for interprocess communication. MPI is a widely used framework for high-performance parallel computing, available in multiple platforms. It is particularly suitable for ParMAC because of its support of the SPMD (single program, multiple data) model. In MPI, processes in different machines communicate through messages. To receive data, we use the synchronous blocking receive function MPI Recv; the process calling this blocks until the data arrives. To send data we use the buffered blocking send function MPI Bsend. We allocate enough memory and attach it to the system. The process calling MPI Bsend blocks until the buffer is copied to the MPI internal memory; after that, the MPI library takes care of sending the data. See a code snippet in Carreira-Perpi ˜n´an and Alizadeh (2016).
94
+
95
+ Distributed-memory cluster. We used General Computing Nodes from the UCSD Triton Shared Computing Cluster (TSCC), available to the public for a fee. Each node contains 2 8-core Intel Xeon E5-2670 processors (16 cores in total), 64GB RAM (4GB/processor) and a 500GB hard drive. The nodes are connected through a 10GbE network. We used up to $P \ = \ 1 2 8$ processors. Carreira-Perpi ˜n´an and Alizadeh (2016) give detailed specs as well as experiments in a sharedmemory machine.
96
+
97
+ Datasets. We have used 3 well-known colour image retrieval benchmarks. (1) CIFAR (Krizhevsky, 2009) contains $6 0 0 0 0$ images $N = 5 0 0 0 0$ training and 10 000 test), represented by $D = 3 2 0$ GIST features. (2) SIFT-1M (J´egou et al., 2011a) contains $N = 1 0 ^ { 6 }$ training and $1 0 ^ { 4 }$ test images, each represented by $D = 1 2 8$ SIFT features. (3) SIFT-1B (J´egou et al., 2011a) has three subsets: $1 0 ^ { 9 }$ base vectors where the search is performed, $N = 1 0 ^ { 8 }$ learning vectors used to train the model and $1 0 ^ { 4 }$ query vectors.
98
+
99
+ Performance measures. Regarding the quality of the BA and hash functions learnt, we report the retrieval precision $( \% )$ in the test set using as true neighbours the $K$ nearest images in Euclidean distance in the original space, and as retrieved neighbours in the binary space we use the $k$ nearest images in Hamming distance. We set $( K , k ) = \bar { ( } 1 0 0 0 , 1 0 0 )$ for CIFAR and $( 1 0 0 0 0 , 1 0 0 0 0 )$ for SIFT-1M. For SIFT-1B, as suggested by the dataset creators, we report the recall $_ { \ @ \mathrm { R } }$ : the average number of queries for which the nearest neighbour is ranked within the top $R$ positions (for varying values of $R$ ); in case of tied distances, we place the query as top rank. All these measures are computed offline once the BA is trained. Carreira-Perpi ˜n´an and Alizadeh (2016) give additional measures and experiments.
100
+
101
+ Models and their parameters. We use BAs with linear encoders (linear SVM) except with SIFT-1B, where we also use kernel SVMs. The decoder is always linear. We set $L = 1 6$ bits (hash functions) for CIFAR and SIFT-1M and $L = 6 4$ bits for SIFT-1B. We initialise the binary codes from truncated PCA ran on a subset of the training set (small enough that it fits in one processor). To train the encoder ( $L$ SVMs) and decoder $D$ linear mappings) with stochastic optimisation, we used the SGD code from (Bottou and Bousquet, 2008), using its default parameter settings. The SGD step size is tuned automatically in each iteration by examining the first $1 0 0 0$ datapoints. We use a multiplicative $\mu$ schedule $\mu _ { i } = { \dot { \mu } } _ { 0 } a ^ { i }$ where the initial value $\mu _ { 0 }$ and the factor $a > 1$ are tuned offline in a trial run using a small subset of the data. For CIFAR we use $\mu _ { 0 } = 0 . 0 0 5$ and $a = 1 . 2$ over 26 iterations $( i = 0 , \ldots , 2 5 )$ . For SIFT-1M and SIFT-1B we use $\mu _ { 0 } = 1 0 ^ { - 4 }$ and $a = 2$ over 10 iterations.
102
+
103
+ Effect of stochastic steps in the W step Fig. 3 shows the effect on the precision on CIFAR of varying the number of epochs within the W step and shuffling the data as a function of the number of processors $P$ . As the number of epochs increases, the W step is solved more exactly (8 epochs is practically exact in this data). Fewer epochs, even just one, cause only a small degradation. The reason is that, although these are relatively small datasets, they contain sufficient redundance that few epochs are sufficient to decrease the error considerably.
104
+
105
+ This is also helped by the accumulated effect of epochs over MAC iterations. Running more epochs increases the runtime and lowers the parallel speedup in this particular model, because we use few bits $L = 1 6 )$ and therefore few submodels $M = 2 L = 3 2$ ) compared to the number of machines (up to $P = 1 2 8 )$ ), so the W step has less parallelism. The positive effect of data shuffling in the W step is clear: shuffling generally increases the precision with no increase in runtime.
106
+
107
+ ![](images/7a5ec6e3fefe1bf4c4dd3f2095ac22c4753a543c8695ba37fd199b7a1cd3b944.jpg)
108
+ Figure 3: Precision in CIFAR dataset.
109
+
110
+ Speedup The fundamental advantage of ParMAC and distributed optimisation in general is the ability to train on datasets that do not fit in a single machine, and the reduction in runtime because of parallel processing. Fig. 4 shows the “strong scaling” speedups achieved, as a function of the number of machines $P$ for fixed problem size (dataset and model), in CIFAR and SIFT-1M ( $N =$ 50K and 1M training points, respectively). Even though these datasets and especially the number of independent submodels $M = 2 L = 3 2$ effective submodels of the same size, as discussed earlier) are relatively small, the speedups we achieve are nearly perfect for $P \leq M$ and hold very well for $P > M$ up to the maximum number of machines we used $P = 1 2 8$ in the distributed system). The speedups flatten as the number of W-step epochs (and consequently the amount of communication) increases, because for this experiment the bottleneck is the W step, whose parallelisation ability (i.e., the number of concurrent processes) is limited by $M = 2 L$ (the $\mathbf { Z }$ step has $N$ independent processes and is never a bottleneck, since $N$ is very large). However, as noted earlier, using 1 to 2 epochs gives a good enough result, very close to doing an exact W step. The runtime for SIFT-1M on $P = 1 2 8$ machines with 8 epochs was 12 minutes and its speedup $1 0 0 \times$ . This is particularly remarkable given that the original, nested model did not have model parallelism.
111
+
112
+ ![](images/32695e824cb9267e2ea8be1d4074f23439f2373aaed6318782695f84d6fc42d4.jpg)
113
+ Figure 4: Speedup $S ( P )$ as a function of the number of machines $P$ (top: experiment, bottom: theory). The dataset size and number of submodels $( N , M )$ is (50 000, 32) for CIFAR, $( 1 0 ^ { 6 } , 3 2 )$ for SIFT-1M and $( 1 0 ^ { 8 } , 1 2 8 )$ for SIFT-1B.
114
+
115
+ Fig. 4 also shows the speedups predicted by our theoretical model. We set the parameters $e$ and $N$ to their known values, and $M = 2 L = 3 2$ for CIFAR and SIFT-1M and $M = 2 L = 1 2 8$ for SIFT-1B. For the time parameters, we set $t _ { r } ^ { \mathbf { W } } = 1$ to fix the time units, and we set $t _ { c } ^ { \mathbf { W } }$ and $t _ { r } ^ { \mathbf { Z } }$ by trial and error to achieve a reasonably good fit to the experimental speedups: $t _ { c } ^ { \mathbf { W } } = 1 0 ^ { 4 }$ for both datasets, and $t _ { r } ^ { \mathbf { Z } } = 2 0 0$ for CIFAR and 40 for SIFT-1M. Although these are fudge factors, they are in rough agreement with the fact that communicating a weight vector over the network is orders of magnitude slower than updating it with a gradient step, and that the $\mathbf { Z }$ step is quite slower than the W step because of the binary optimisation it involves.
116
+
117
+ Large-scale experiment SIFT-1B is one of the largest datasets, if not the largest one, that are publicly available for comparing nearest-neighbour search algorithms with known ground-truth (i.e., precomputed exact Euclidean distances for each query to its $k$ nearest vectors in the base set). The training set contains $N = 1 0 0 \mathrm { { M } }$ vectors, each consisting of 128 SIFT features. We used $L = 6 4$ hash functions $M = 1 2 8$ submodels): linear SVMs as before, and kernel SVMs. These have fixed Gaussian radial basis functions (2 000 centres picked at random from the training set and bandwidth $\sigma = 1 6 0 ^ { \circ }$ ), so the only trainable parameters are the weights, and the MAC algorithm does not change except that it operates on a 2 000-dimensional input vector of kernel values, instead of the 128 SIFT features. We use $e = 2$ epochs with shuffling. All these decisions were based on trials on a subset of the training dataset. We initialised the binary codes from truncated PCA trained on a subset of size 1M (recall $\textcircled { a } \mathrm { R } { = } 1 0 0 ; 5 5 . 2 \%$ ), which gave results comparable to the baseline in (J´egou et al., 2011b).
118
+
119
+ We ran ParMAC on the whole training set in the distributed system with 128 processors for 6 iterations and achieved a recall $\scriptstyle { \mathcal { Q } } \mathrm { R } = 1 0 0$ of $6 1 . 5 \%$ in 29 hours (linear SVM) and $6 6 . 1 \%$ in 83 hours (kernel SVM). Using a scaled-down model and training set, we estimated that training in one machine (with enough RAM to hold the data and parameters) would take months. The theoretical speedup (fig. 4 right plot, using the same parameters as in SIFT-1M), is nearly perfect (note the plot goes up to $P = 1 0 2 4$ machines, even though our experiments are limited to $P = 1 2 8$ ). This is because $M$ is quite larger and $N$ is much larger than in the previous datasets.
120
+
121
+ # 5 DISCUSSION
122
+
123
+ Developing parallel, distributed optimisation algorithms for nonconvex problems in machine learning is challenging, as shown by recent efforts by large teams of researchers (Le et al., 2012; Dean et al., 2012). One important advantage of ParMAC is its simplicity. Data and model parallelism arise naturally thanks to the introduction of auxiliary coordinates. The corresponding optimisation subproblems can often be solved reusing existing code as a black box (as with the SGD training of SVMs and linear mappings in the BA). A circular topology is sufficient to achieve a low communication between machines. There is no close coupling between the model structure and the distributed system architecture. This makes ParMAC suitable for architectures as different as supercomputers and data centres.
124
+
125
+ Further improvements can be made in specific problems. For example, we may have more parallelisation or less dependencies (e.g. the weights of hidden units in layer $k$ of a neural net depend only on auxiliary coordinates in layers $k$ and $k + 1$ ). This may reduce the communication in the W step, by sending to a given machine only the model portion it needs, or by allocating cores within a multicore machine accordingly. The W and $\mathbf { Z }$ step optimisations can make use of further parallelisation by GPUs or by distributed convex optimisation algorithms. Many more refinements can be done, such as storing or communicating reduced-precision values with little effect of the accuracy. In this paper, we have tried to keep our implementation as simple as possible, because our goal was to understand the parallelisation speedups of ParMAC in a setting as general as possible, rather than trying to achieve the very best performance for a particular dataset, model or distributed system.
126
+
127
+ # 6 CONCLUSION
128
+
129
+ We have proposed ParMAC, a distributed model for the method of auxiliary coordinates for training nested, nonconvex models in general, analysed its parallel speedup and convergence, and demonstrated it with an MPI-based implementation for a particular case, to train binary autoencoders. MAC creates parallelism by introducing auxiliary coordinates for each data point to decouple nested terms in the objective function. ParMAC is able to translate the parallelism inherent in MAC into a distributed system by 1) using data parallelism, so that each machine keeps a portion of the original data and its corresponding auxiliary coordinates; and 2) using model parallelism, so that independent submodels visit every machine in a circular topology, effectively executing epochs of a stochastic optimisation, without the need for a parameter server and therefore no communication bottlenecks. The convergence properties of MAC (to a stationary point of the objective function) remain essentially unaltered in ParMAC. The parallel speedup can be theoretically predicted to be nearly perfect when the number of submodels is comparable or larger than the number of machines, and to eventually saturate as one continues to increase the number of machines, and indeed this was confirmed in our experiments. ParMAC also makes it easy to account for data shuffling, load balancing, streaming and fault tolerance. Hence, we expect that ParMAC could be a basic building block, in combination with other techniques, for the distributed optimisation of nested models in big data settings.
130
+
131
+ # ACKNOWLEDGMENTS
132
+
133
+ Work supported by a Google Faculty Research Award and by NSF award IIS–1423515. We thank Ramin Raziperchikolaei (UC Merced) for discussions about binary autoencoders, Dong Li (UC Merced) for discussions about MPI and performance evaluation on parallel systems, and Quoc Le (Google) for discussions about Google’s DistBelief system.
134
+
135
+ # REFERENCES
136
+
137
+ M. Abadi et al. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. White paper.
138
+ Y. Bengio, J.-F. Paiement, P. Vincent, O. Delalleau, N. Le Roux, and M. Ouimet. Out-of-sample extensions for LLE, Isomap, MDS, Eigenmaps, and spectral clustering. NIPS, 2004.
139
+ D. P. Bertsekas. Incremental gradient, subgradient, and proximal methods for convex optimization: A survey. In S. Sra, S. Nowozin, and S. J. Wright, editors, Optimization for Machine Learning. MIT Press, 2011.
140
+ L. Bottou. Large-scale machine learning with stochastic gradient descent. COMPSTAT, 2010.
141
+ L. Bottou and O. Bousquet. The tradeoffs of large scale learning. NIPS, 2008.
142
+ S. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eckstein. Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundations and Trends in Machine Learning, 3, 2011.
143
+ J. Bradley, A. Kyrola, D. Bickson, and C. Guestrin. Parallel coordinate descent for $L _ { 1 }$ -regularized loss minimization. ICML, 2011.
144
+ M. A. Carreira-Perpi ˜n´an and M. Alizadeh. ParMAC: Distribut ´ ed optimisation of nested functions, with application to learning binary autoencoders. arXiv:1605.09114 [cs.LG], May 30 2016.
145
+ M. A. Carreira-Perpi ˜n´an and M. Vladymyrov. A fast, universa ´ l algorithm to learn parametric nonlinear embeddings. NIPS, 2015.
146
+ M. A. Carreira-Perpi ˜n´an and W. Wang. Distributed optimizat ´ ion of deeply nested systems. arXiv:1212.5921 [cs.LG], Dec. 24 2012.
147
+ M. A. Carreira-Perpi ˜n´an and W. Wang. Distributed optimizat ´ ion of deeply nested systems. AISTATS, 2014.
148
+ V. Cevher, S. Becker, and M. Schmidt. Convex optimization for big data: Scalable, randomized, and parallel algorithms for big data analytics. IEEE Signal Processing Magazine, 31(5):32–43, Sept. 2014.
149
+ A. Coates, B. Huval, T. Wang, D. Wu, B. Catanzaro, and A. Ng. Deep learning with COTS HPC systems. ICML, 2013.
150
+ J. Dean, G. Corrado, R. Monga, K. Chen, M. Devin, Q. Le, M. Mao, M. Ranzato, A. Senior, P. Tucker, K. Yang, and A. Ng. Large scale distributed deep networks. NIPS, 2012.
151
+ P. Drineas and M. W. Mahoney. On the Nystr¨om method for approximating a Gram matrix for improved kernel-based learning. J. Machine Learning Research, 6:2153–2175, Dec. 2005.
152
+ Y. Gong, S. Lazebnik, A. Gordo, and F. Perronnin. Iterative quantization: A Procrustean approach to learning binary codes for large-scale image retrieval. IEEE PAMI, 2013.
153
+ K. Grauman and R. Fergus. Learning binary hash codes for large-scale image search. In R. Cipolla, S. Battiato, and G. Farinella, editors, Machine Learning for Computer Vision, pages 49–87. Springer-Verlag, 2013.
154
+ W. Gropp, E. Lusk, and A. Skjellum. Using MPI: Portable Parallel Programming with the Message-Passing Interface. MIT Press, second edition, 1999.
155
+ G. Hinton, L. Deng, D. Yu, G. Dahl, A. Mohamed, N. Jaitly, A. Senior, V. Vanhoucke, P. Nguyen, T. N. Sainath, and B. Kingsbury. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 29(6):82–97, Nov. 2012.
156
+ H. J´egou, M. Douze, and C. Schmid. Product quantization for nearest neighbor search. IEEE PAMI, 33, 2011a.
157
+ H. J´egou, R. Tavenard, M. Douze, and L. Amsaleg. Searching in one billion vectors: Re-rank with source coding. ICASSP, 2011b.
158
+ A. Krizhevsky. Learning multiple layers of features from tiny images. Master’s thesis, U. Toronto, 2009.
159
+ Q. Le, M. Ranzato, R. Monga, M. Devin, G. Corrado, K. Chen, J. Dean, and A. Ng. Building high-level features using large scale unsupervised learning. ICML, 2012.
160
+ J. Liu and S. J. Wright. Asynchronous stochastic coordinate descent: Parallelism and convergence properties. SIAM J. Optimization, 25(1):351–376, 2015.
161
+ Y. Low, D. Bickson, J. Gonzalez, C. Guestrin, A. Kyrola, and J. M. Hellerstein. Distributed GraphLab: A framework for machine learning and data mining in the cloud. Proc. VLDB Endowment, 5, 2012.
162
+ G. J. McLachlan and T. Krishnan. The EM Algorithm and Extensions. Wiley, second edition, 2008.
163
+ F. Niu, B. Recht, C. R´e, and S. J. Wright. HOGWILD!: A lock-free approach to parallelizing stochastic gradient descent. NIPS, 2011.
164
+ H. Ouyang, N. He, L. Tran, and A. Gray. Stochastic alternating direction method of multipliers. ICML, 2013.
165
+ R. Raziperchikolaei and M. A. Carreira-Perpi ˜n´an. Optimizing affinity-based binary ´ hashing using auxiliary coordinates. NIPS, 2016.
166
+ P. Richt´arik and M. Tak´aˇc. Distributed coordinate descent method for learning with big data. arXiv:1310.2059 [stat.ML], Oct. 8 2013.
167
+ F. Seide, H. Fu, J. Droppo, G. Li, and D. Yu. 1-bit stochastic gradient descent and its application to data-parallel distributed training of speech DNNs. Interspeech, 2014.
168
+ A. Talwalkar, S. Kumar, and H. Rowley. Large-scale manifold learning. CVPR, 2008.
169
+ M. Vladymyrov and M. A. Carreira-Perpi ˜n´an. Locally Linear Landmarks for larg ´ e-scale manifold learning. ECML, 2013.
170
+ M. Vladymyrov and M. A. Carreira-Perpi ˜n´an. The Variational Nystr¨om method f ´ or large-scale spectral problems. ICML, 2016.
171
+ W. Wang and M. A. Carreira-Perpi ˜n´an. The role of dimensionality reduct ´ ion in classification. AAAI, 2014.
172
+ C. K. I. Williams and M. Seeger. Using the Nystr¨om method to speed up kernel machines. NIPS, 2001.
173
+ S. J. Wright. Coordinate descent algorithms. Math. Prog., 151(1):3–34, June 2016.
174
+ E. P. Xing, Q. Ho, W. Dai, J. K. Kim, J. Wei, S. Lee, X. Zheng, P. Xie, A. Kumar, and Y. Yu. Petuum: A new platform for distributed machine learning on big data. IEEE Trans. Big Data, 1(2):49–67, Apr.–June 2015.
175
+ M. Zaharia, M. Chowdhury, M. J. Franklin, S. Shenker, and I. Stoica. Spark: Cluster computing with working sets. In Proc. 2nd USENIX Conf. Hot Topics in Cloud Computing (HotCloud 2010), 2010.
176
+ R. Zhang and J. Kwok. Asynchronous distributed ADMM algorithm for global variable consensus optimization. ICML, 2014.
177
+ M. Zinkevich, M. Weimer, A. Smola, and L. Li. Parallelized stochastic gradient descent. NIPS, 2010.
parse/train/SygvTcYee/SygvTcYee_content_list.json ADDED
@@ -0,0 +1,792 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "PARMAC: DISTRIBUTED OPTIMISATION OF NESTED FUNCTIONS, WITH APPLICATION TO LEARNING BINARY AUTOENCODERS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 823,
10
+ 171
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Miguel A. Carreira-Perpi ´ n˜ an & Mehdi Alizadeh ´ EECS, University of California, Merced http://eecs.ucmerced.edu ",
17
+ "bbox": [
18
+ 183,
19
+ 194,
20
+ 521,
21
+ 237
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 273,
32
+ 542,
33
+ 289
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Many powerful machine learning models are based on the composition of multiple processing layers, such as deep nets, which gives rise to nonconvex objective functions. A general, recent approach to optimise such “nested” functions is the method of auxiliary coordinates (MAC). MAC introduces an auxiliary coordinate for each data point in order to decouple the nested model into independent submodels. This decomposes the optimisation into steps that alternate between training single layers and updating the coordinates. It has the advantage that it reuses existing single-layer algorithms, introduces parallelism, and does not need to use chain-rule gradients, so it works with nondifferentiable layers. We describe ParMAC, a distributed-computation model for MAC. This trains on a dataset distributed across machines while limiting the amount of communication so it does not obliterate the benefit of parallelism. ParMAC works on a cluster of machines with a circular topology and alternates two steps until convergence: one step trains the submodels in parallel using stochastic updates, and the other trains the coordinates in parallel. Only submodel parameters, no data or coordinates, are ever communicated between machines. ParMAC exhibits high parallelism, low communication overhead, and facilitates data shuffling, load balancing, fault tolerance and streaming data processing. We study the convergence of ParMAC and its parallel speedup, and implement ParMAC using MPI to learn binary autoencoders for fast image retrieval, achieving nearly perfect speedups in a 128-processor cluster with a training set of 100 million high-dimensional points. ",
40
+ "bbox": [
41
+ 233,
42
+ 306,
43
+ 764,
44
+ 598
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 627,
55
+ 334,
56
+ 643
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Serial computing has reached a plateau and parallel, distributed architectures are becoming widely available, from machines with a few cores to cloud computing with 1000s of machines. The combination of powerful nested models with large datasets is a key ingredient to solve difficult problems in machine learning, computer vision and other areas, and it underlies recent successes in deep learning (Hinton et al., 2012; Le et al., 2012; Dean et al., 2012). Unfortunately, parallel computation is not easy, and many good serial algorithms do not parallelise well. The cost of communicating (through the memory hierarchy or a network) greatly exceeds the cost of computing, both in time and energy, and will continue to do so for the foreseeable future. Thus, good parallel algorithms must minimise communication and maximise computation per machine, while creating sufficiently many subproblems (ideally independent) to benefit from as many machines as possible. The load (in runtime) on each machine should be approximately equal. Faults become more frequent as the number of machines increases, particularly if they are inexpensive machines. Machines may be heterogeneous and differ in CPU and memory; this is the case with initiatives such as SETI $@$ home, which may become an important source of distributed computation in the future. Big data applications have additional restrictions. The size of the data means it cannot be stored on a single machine, so distributedmemory architectures are necessary. Sending data between machines is prohibitive because of the size of the data and the high communication costs. In some applications, more data is collected than can be stored, so data must be regularly discarded. In others, such as sensor networks, limited battery life and computational power imply that data must be processed locally. ",
63
+ "bbox": [
64
+ 174,
65
+ 660,
66
+ 825,
67
+ 924
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "In this paper, we focus on machine learning models of the form $\\mathbf { y } = \\mathbf { F } _ { K + 1 } ( \\ldots \\mathbf { F } _ { 2 } ( \\mathbf { F } _ { 1 } ( \\mathbf { x } ) ) \\ldots )$ , i.e., consisting of a nested mapping from the input $\\mathbf { x }$ to the output y. Such nested models involve multiple parameterised layers of processing and include deep neural nets, cascades for object recognition in computer vision or for phoneme classification in speech processing, wrapper approaches to classification or regression, and various combinations of feature extraction/learning and preprocessing prior to some learning task. Nested and hierarchical models are ubiquitous in machine learning because they provide a way to construct complex models by the composition of simple layers. However, training nested models is difficult even in the serial case because function composition produces inherently nonconvex functions, which makes gradient-based optimisation difficult and slow, and sometimes inapplicable (e.g. with nonsmooth or discrete layers). ",
74
+ "bbox": [
75
+ 173,
76
+ 103,
77
+ 825,
78
+ 242
79
+ ],
80
+ "page_idx": 1
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Our starting point is a recently proposed technique to train nested models, the method of auxiliary coordinates (MAC) (Carreira-Perpi ˜n´an and Wang, 2012; 2014). This reformulates the optimisation into an iterative procedure that alternates training submodels independently with coordinating them. It introduces significant model and data parallelism, can often train the submodels using existing algorithms, and has convergence guarantees with differentiable functions to a local stationary point, while it also applies with nondifferentiable or even discrete layers. MAC has been applied to various nested models (Carreira-Perpi ˜n´an and Wang, 2014; Wang and Carreira-Perpi ˜n´an, 2014; Carreira-Perpi ˜n´an and Raziperchikolaei, 2015; Raziperchikolaei and Carreira-Perpi ˜n´an, 2016; Carreira-Perpi ˜n´an and Vladymyrov, 2015). However, the original papers proposing MAC (Carreira-Perpi ˜n´an and Wang, 2012; 2014) did not address how to run MAC on a distributed computing architecture, where communication between machines is far costlier than computation. This paper proposes ParMAC, a parallel, distributed framework to learn nested models using MAC, analyses its parallel speedup and convergence, implements it in MPI for the problem of learning binary autoencoders, and demonstrates its ability to train on large datasets and achieve large speedups on a distributed cluster. ",
85
+ "bbox": [
86
+ 174,
87
+ 250,
88
+ 825,
89
+ 457
90
+ ],
91
+ "page_idx": 1
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Related work Distributed optimisation and large-scale machine learning have been steadily gaining interest in recent years, with the development of parallel computation abstractions tailored to machine learning, such as Spark (Zaharia et al., 2010), GraphLab (Low et al., 2012), Petuum (Xing et al., 2015) or TensorFlow (Abadi et al., 2015), which have the goal of making cloud computing easily available to train machine learning models. Most work has centred on convex optimisation, particularly when the objective function has the form of empirical risk minimisation (data fitting term plus regulariser) (Cevher et al., 2014). This includes many important models in machine learning, such as linear regression, LASSO, logistic regression or SVMs. Such work is typically based on stochastic gradient descent (SGD) (Bottou, 2010), coordinate descent (CD) (Wright, 2016) or the alternating direction method of multipliers (ADMM) (Boyd et al., 2011). This has resulted in several variations of parallel SGD (Bertsekas, 2011; Zinkevich et al., 2010; Niu et al., 2011), parallel CD (Bradley et al., 2011; Richt´arik and Tak´aˇc, 2013; Liu and Wright, 2015) and parallel ADMM (Boyd et al., 2011; Ouyang et al., 2013; Zhang and Kwok, 2014). ",
96
+ "bbox": [
97
+ 174,
98
+ 472,
99
+ 825,
100
+ 652
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Little work has addressed nonconvex models. Most of it has focused on deep nets (Dean et al., 2012; Le et al., 2012). Google’s DistBelief (Dean et al., 2012) uses asynchronous parallel SGD (with gradients for the full model computed with backpropagation) to achieve data parallelism, and some form of model parallelism. The latter is achieved by carefully partitioning the neural net into pieces and allocating them to machines to compute gradients. This is difficult to do and requires a careful match of the neural net structure (number of layers and hidden units, connectivity, etc.) to the target hardware. Also, parallel SGD can diverge with nonconvex models, which requires heuristics to make sure we average replica models that are close in parameter space and thus associated with the same optimum. Although this has managed to train huge nets on huge datasets by using tens of thousands of CPU cores, the speedups achieved were very modest. Other work has used similar techniques but for GPUs (Coates et al., 2013; Seide et al., 2014). ",
107
+ "bbox": [
108
+ 173,
109
+ 660,
110
+ 825,
111
+ 811
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "Finally, there also exist specific approximation techniques for certain types of large-scale machine learning problems, such as spectral problems, using the Nystr ¨om formula or other landmarkbased methods (Williams and Seeger, 2001; Bengio et al., 2004; Drineas and Mahoney, 2005; Talwalkar et al., 2008; Vladymyrov and Carreira-Perpi ˜n´an, 2013; 2016). ",
118
+ "bbox": [
119
+ 174,
120
+ 819,
121
+ 823,
122
+ 875
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "ParMAC is specifically designed for nested models, which are typically nonconvex and include deep nets and many other models, some of which have nondifferentiable layers. As we describe below, ParMAC has the advantages of being simple and relatively independent of the target hardware, while achieving high speedups. ",
129
+ "bbox": [
130
+ 174,
131
+ 882,
132
+ 823,
133
+ 938
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "Many optimisation problems in machine learning involve mathematically “nested” functions of the form $\\mathbf { F } ( \\mathbf { x } ; \\mathbf { W } ) = \\bar { \\mathbf { F } } _ { K + 1 } ( . . . \\mathbf { F } _ { 2 } ( \\mathbf { F } _ { 1 } ( \\mathbf { x } ; \\mathbf { W } _ { 1 } ) ; \\mathbf { W } _ { 2 } ) . . . ; \\mathbf { W } _ { K + 1 } )$ with parameters W, such as deep nets. Such problems are traditionally optimised using methods based on gradients computed using the chain rule. However, such gradients may sometimes be inconvenient to use, or may not exist (e.g. if some of the layers are nondifferentiable, as with binary autoencoders). Also, they are hard to parallelise, because of the inherent sequentiality in the chain rule. The method of auxiliary coordinates $( M A C )$ (Carreira-Perpi ˜n´an and Wang, 2012; 2014) is designed to optimise nested models without using chain-rule gradients while introducing parallelism. The idea is to break nested functional relationships judiciously by introducing new variables (the auxiliary coordinates) as equality constraints. These are then solved by optimising a penalised function using alternating optimisation over the original parameters (which we call the W step) and over the coordinates (which we call the $\\mathbf { Z }$ step). The result is a coordination-minimisation (CM) algorithm: the minimisation (W) step updates the parameters by splitting the nested model into independent submodels and training them using existing algorithms, and the coordination $\\mathbf { \\rho } ( \\mathbf { Z } )$ step ensures that corresponding inputs and outputs of submodels eventually match. MAC algorithms have been developed for several nested models so far: deep nets (Carreira-Perpi ˜n´an and Wang, 2014), low-dimensional SVMs (Wang and Carreira-Perpi ˜n´an, 2014), binary autoencoders (Carreira-Perpi ˜n´an and Raziperchikolaei, 2015), affinity-based loss functions for binary hashing (Raziperchikolaei and Carreira-Perpi ˜n´an, 2016) and parametric nonlinear embeddings (Carreira-Perpi ˜n´an and Vladymyrov, 2015). Although this paper proposes and analyses ParMAC in general, our MPI implementation is for the particular case of binary autoencoders. These define a nonconvex nondifferentiable problem, yet its MAC algorithm is simple and effective. ",
140
+ "bbox": [
141
+ 173,
142
+ 132,
143
+ 825,
144
+ 438
145
+ ],
146
+ "page_idx": 2
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "MAC algorithm for binary autoencoders A binary autoencoder $( B A )$ is a usual autoencoder but with a binary code layer. It consists of an encoder $\\mathbf { h } ( \\mathbf { x } )$ that maps a real vector $\\textbf { x } \\in \\mathbb { R } ^ { D }$ onto a binary code vector with $L \\ < \\ D$ bits, $\\mathbf { z } ~ \\in ~ \\{ 0 , 1 \\} ^ { L }$ , and a linear decoder $\\mathbf f ( \\mathbf z )$ which maps $\\mathbf { z }$ back to $\\mathbb { R } ^ { D }$ in an effort to reconstruct $\\mathbf { x }$ . We will call h a binary hash function (see later). Let us write $\\mathbf { h } ( \\mathbf { x } ) = \\mathcal { \\Gamma } ( \\mathbf { A x } )$ (A includes a bias by having an extra dimension $x _ { 0 } = 1$ for each $\\mathbf { x }$ ) where $\\mathbf { A } \\in \\mathbb { R } ^ { L \\times ( D + 1 ) }$ and $\\boldsymbol { \\mathscr { I } } ( t )$ is a step function applied elementwise, i.e., $\\boldsymbol { \\mathrm { \\Sigma } } ( t ) = 1$ if $t \\geq 0$ and $\\boldsymbol { \\mathrm { { J } } } ( t ) = 0$ otherwise. Given a dataset of $D$ -dimensional patterns $\\mathbf { X } = \\left( \\mathbf { x } _ { 1 } , \\ldots , \\mathbf { x } _ { N } \\right)$ , our objective function, which involves the nested model $\\mathbf { y } _ { \\mathrm { { o } } } = \\mathbf { f } ( \\mathbf { h } ( \\mathbf { x } ) )$ , is the usual least-squares reconstruction error $\\begin{array} { r } { E _ { \\mathrm { B A } } ( \\mathbf { h } , \\mathbf { f } ) = \\sum _ { n = 1 } ^ { N } \\| \\mathbf { x } _ { n } - \\mathbf { f } ( \\mathbf { h } ( \\mathbf { x } _ { n } ) ) \\| ^ { 2 } } \\end{array}$ . Optimising this nonconvex, nonsmooth function is NP-complete. Where the gradients do exist wrt A they are zero, so optimisation of $\\mathbf { h }$ using chainrule gradients does not apply. We introduce as auxiliary coordinates the outputs of $\\mathbf { h }$ , i.e., the codes for each of the $N$ input patterns, and obtain the following equality-constrained problem: ",
151
+ "bbox": [
152
+ 173,
153
+ 446,
154
+ 825,
155
+ 616
156
+ ],
157
+ "page_idx": 2
158
+ },
159
+ {
160
+ "type": "equation",
161
+ "img_path": "images/55661abc8a7c92840d07386c970d4a74287ea68f31df224f935840f943559d8b.jpg",
162
+ "text": "$$\n\\operatorname* { m i n } _ { \\mathbf { h } , \\mathbf { f } , \\mathbf { Z } } \\sum _ { n = 1 } ^ { N } \\left\\| \\mathbf { x } _ { n } - \\mathbf { f } ( \\mathbf { z } _ { n } ) \\right\\| ^ { 2 } \\quad \\mathrm { s . t . } \\quad \\mathbf { z } _ { n } = \\mathbf { h } ( \\mathbf { x } _ { n } ) , \\mathbf { z } _ { n } \\in \\{ 0 , 1 \\} ^ { L } , n = 1 , \\ldots , N .\n$$",
163
+ "text_format": "latex",
164
+ "bbox": [
165
+ 248,
166
+ 618,
167
+ 751,
168
+ 662
169
+ ],
170
+ "page_idx": 2
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": "Note the codes are binary. We now apply the quadratic-penalty method and minimise the following objective function while progressively increasing $\\mu$ , so the constraints are eventually satisfied: ",
175
+ "bbox": [
176
+ 176,
177
+ 665,
178
+ 825,
179
+ 694
180
+ ],
181
+ "page_idx": 2
182
+ },
183
+ {
184
+ "type": "equation",
185
+ "img_path": "images/3c7419974cc79f9df00088d9304b3b2b15bbde14cb93715ed88fbce2d2443561.jpg",
186
+ "text": "$$\nE _ { { \\cal Q } } ( { \\bf h } , { \\bf f } , { \\bf Z } ; \\mu ) = \\sum _ { n = 1 } ^ { N } \\left\\| { \\bf x } _ { n } - { \\bf f } ( { \\bf z } _ { n } ) \\right\\| ^ { 2 } + \\mu \\left\\| { \\bf z } _ { n } - { \\bf h } ( { \\bf x } _ { n } ) \\right\\| ^ { 2 } \\mathrm { s . t . } { \\bf z } _ { n } \\in \\{ 0 , 1 \\} ^ { L } , n = 1 , \\ldots , N .\n$$",
187
+ "text_format": "latex",
188
+ "bbox": [
189
+ 187,
190
+ 696,
191
+ 790,
192
+ 741
193
+ ],
194
+ "page_idx": 2
195
+ },
196
+ {
197
+ "type": "text",
198
+ "text": "Finally, we apply alternating optimisation over $\\mathbf { Z }$ and $\\mathbf { W } = ( \\mathbf { h } , \\mathbf { f } )$ . This gives the following steps: ",
199
+ "bbox": [
200
+ 173,
201
+ 743,
202
+ 815,
203
+ 760
204
+ ],
205
+ "page_idx": 2
206
+ },
207
+ {
208
+ "type": "text",
209
+ "text": "Over $\\mathbf { Z }$ for fixed $( \\mathbf { h } , \\mathbf { f } )$ , this is a binary optimisation on $N L$ variables, but it separates into $N$ independent optimisations each on only $L$ variables, with the form of $\\mathrm { ^ a }$ binary proximal operator (where we omit the index $n$ ): $\\mathrm { m i n } _ { \\mathbf { z } } \\left\\| \\mathbf { x } - \\mathbf { f } ( \\mathbf { z } ) \\right\\| ^ { 2 } + \\mu \\| \\mathbf { z } - \\mathbf { h } ( \\mathbf { x } ) \\| ^ { 2 } \\boldsymbol { \\mathfrak { s } }$ s.t. $\\mathbf { z } \\in \\{ 0 , 1 \\} ^ { L }$ . This can be solved approximately by alternating optimisation over bits. Over $\\mathbf { W } = \\left( \\mathbf { h } , \\mathbf { f } \\right)$ for fixed $\\mathbf { Z }$ , we obtain $L + D$ independent problems: for each of the $L$ single-bit hash functions (which try to predict $\\mathbf { Z }$ optimally from $\\mathbf { X }$ ), each solvable by fitting a linear SVM; and for each of the $D$ linear decoders in f (which try to reconstruct $\\mathbf { X }$ optimally from $\\mathbf { Z }$ ), each a linear least-squares problem. ",
210
+ "bbox": [
211
+ 215,
212
+ 768,
213
+ 825,
214
+ 886
215
+ ],
216
+ "page_idx": 2
217
+ },
218
+ {
219
+ "type": "text",
220
+ "text": "The user must choose a schedule for the penalty parameter $\\mu$ (sequence of values $0 < \\mu _ { 1 } < \\cdots <$ $\\mu _ { \\infty } )$ ). This should increase slowly enough that the binary codes can change considerably and explore better solutions before the constraints are satisfied and the algorithm stops. With BAs, MAC stops for a finite value of $\\mu$ , which occurs whenever $\\mathbf { Z }$ does not change compared to the previous $\\mathbf { Z }$ step. This gives a practical stopping criterion. Carreira-Perpi˜n´an and Raziperchikolaei (2015) give proofs of these statements and further details about the algorithm. Fig. 1 gives the MAC algorithm for BAs. ",
221
+ "bbox": [
222
+ 174,
223
+ 895,
224
+ 823,
225
+ 924
226
+ ],
227
+ "page_idx": 2
228
+ },
229
+ {
230
+ "type": "image",
231
+ "img_path": "images/28e2837e43709b2989c8ca8d4340a5e869997cd4e9c20d0643554b3b04d037df.jpg",
232
+ "image_caption": [
233
+ "Figure 1: MAC algorithm for binary autoencoders. “parfor” indicates a for loop whose iterations are carried out in parallel. The steps over $\\mathbf { h }$ and f can be run in parallel as well. "
234
+ ],
235
+ "image_footnote": [],
236
+ "bbox": [
237
+ 173,
238
+ 101,
239
+ 831,
240
+ 267
241
+ ],
242
+ "page_idx": 3
243
+ },
244
+ {
245
+ "type": "text",
246
+ "text": "",
247
+ "bbox": [
248
+ 174,
249
+ 333,
250
+ 825,
251
+ 388
252
+ ],
253
+ "page_idx": 3
254
+ },
255
+ {
256
+ "type": "text",
257
+ "text": "The BA was proposed as a way to learn good binary hash functions for fast, approximate information retrieval (Carreira-Perpi ˜n´an and Raziperchikolaei, 2015). Binary hashing (Grauman and Fergus, 2013) has emerged in recent years as an effective way to do fast, approximate nearest-neighbour searches in image databases. The real-valued, high-dimensional image vectors are mapped onto a binary space with $L$ bits and the search is performed there using Hamming distances at a vastly faster speed and smaller memory (e.g. $N = 1 0 ^ { 9 }$ points with $D = 5 0 0$ take $^ { 2 } \\mathrm { T B }$ , but only 8 GB using $L = 6 4$ bits, which easily fits in RAM). As shown by Carreira-Perpi ˜n´an and Raziperchikolaei (2015), training BAs with MAC beats approximate optimisation approaches such as relaxing the codes or the step function in the encoder, and yields state-of-the-art binary hash functions h in unsupervised problems, improving over established approaches such as iterative quantisation (ITQ) (Gong et al., 2013). We focus mostly on linear hash functions because these are, by far, the most used type of hash functions in the literature of binary hashing, due to the fact that computing the binary codes for a test image must be fast at run time. ",
258
+ "bbox": [
259
+ 174,
260
+ 396,
261
+ 825,
262
+ 577
263
+ ],
264
+ "page_idx": 3
265
+ },
266
+ {
267
+ "type": "text",
268
+ "text": "MAC in general With a nested function with $K$ layers, we can introduce auxiliary coordinates at each layer. For example, with a neural net, this decouples the weight vector of every hidden unit in the W step, which can be solved as a logistic regression (see Carreira-Perpi ˜n´an and Alizadeh, 2016). For a large net with a large dataset, this affords an enormous potential for parallel computation. ",
269
+ "bbox": [
270
+ 174,
271
+ 593,
272
+ 825,
273
+ 650
274
+ ],
275
+ "page_idx": 3
276
+ },
277
+ {
278
+ "type": "text",
279
+ "text": "MAC and EM MAC is very similar to expectation-maximisation (EM) at a conceptual level. EM (McLachlan and Krishnan, 2008) applies generally to many probabilistic models. The resulting algorithm can be very different (e.g. EM for Gaussian mixtures vs EM for hidden Markov models), but it always alternates two steps that conceptually do the following. The E step updates in parallel the posterior probabilities. This separates over data points and is like the $\\mathbf { Z }$ step in MAC, where the posterior probabilities are the auxiliary coordinates, and where the step may be in closed-form or require optimisation, depending on the model. The M step updates in parallel the “submodels”. For a mixture with $M$ components, these are the $M$ Gaussians (means, covariances, proportions). This separates over submodels and is like the W step in MAC. For BAs, the submodels are the $L$ encoders (linear SVMs) and the $D$ decoders (linear regressors); for a neural net, each weight vector of a hidden unit is a submodel (a logistic regressor). For Gaussian mixtures, the M step can be done exactly in one “epoch” because it is a simple average. For MAC, it usually requires optimisation, and so multiple epochs. In fact, ParMAC applies to EM by using $e = 1$ epoch: in the W step, the Gaussians visit each machine circularly and (their averages) are updated on its data; in the $\\mathbf { Z }$ step, each machine updates its posterior probabilities. ",
280
+ "bbox": [
281
+ 174,
282
+ 666,
283
+ 825,
284
+ 875
285
+ ],
286
+ "page_idx": 3
287
+ },
288
+ {
289
+ "type": "text",
290
+ "text": "In the rest of the paper, some readers may find this analogy useful and think of EM for Gaussian mixtures instead of MAC, replacing “submodels” and “auxiliary coordinates” in MAC with “Gaussians” and “posterior probabilities” in EM, respectively. ",
291
+ "bbox": [
292
+ 176,
293
+ 882,
294
+ 823,
295
+ 924
296
+ ],
297
+ "page_idx": 3
298
+ },
299
+ {
300
+ "type": "image",
301
+ "img_path": "images/0935259ff5ddbeac36f41db147d0b66d8970c89e9d73ac600a82da6a50558ab8.jpg",
302
+ "image_caption": [
303
+ "Figure 2: ParMAC model with $P = 4$ machines, $M = 1 2$ submodels “ ${ \\bf w } _ { h }$ ” and $N = 4 0$ data points. Submodels $h$ , $h + M$ , $h + 2 M$ and $h + 3 M$ are copies of submodel $h$ , but only one of them is the most currently updated. At the end of the W step all copies are identical. "
304
+ ],
305
+ "image_footnote": [],
306
+ "bbox": [
307
+ 178,
308
+ 103,
309
+ 816,
310
+ 362
311
+ ],
312
+ "page_idx": 4
313
+ },
314
+ {
315
+ "type": "text",
316
+ "text": "3 PARMAC: A PARALLEL, DISTRIBUTED COMPUTATION MODEL FOR MAC ",
317
+ "text_level": 1,
318
+ "bbox": [
319
+ 173,
320
+ 444,
321
+ 803,
322
+ 460
323
+ ],
324
+ "page_idx": 4
325
+ },
326
+ {
327
+ "type": "text",
328
+ "text": "A specific MAC algorithm depends on the model and objective function and on how the auxiliary coordinates are introduced. We can achieve steps that are closed-form, convex, nonconvex, binary, or others. However, we will assume the following always hold: (1) Separability over data points. In the $\\mathbf { Z }$ step, the $N$ subproblems for $\\mathbf { z } _ { 1 } , \\ldots , \\mathbf { z } _ { N }$ are independent, one per data point. Each $\\mathbf { z } _ { n }$ step depends on the current model. (2) Separability over submodels. In the W step, there are $M$ independent submodels, where $M$ depends on the problem. For example, $M$ is the number of hidden units in a deep net, or the number of hash functions and linear decoders in a BA. Each submodel depends on all the data and coordinates. We now show how to turn this into a distributed, low-communication $P a r M A C$ algorithm. ",
329
+ "bbox": [
330
+ 174,
331
+ 478,
332
+ 825,
333
+ 604
334
+ ],
335
+ "page_idx": 4
336
+ },
337
+ {
338
+ "type": "text",
339
+ "text": "The basic idea in ParMAC is as follows. With large datasets in distributed systems, it is imperative to minimise data movement over the network because the communication time generally far exceeds the computation time in modern architectures. In MAC we have 3 types of data: the original training data $( \\mathbf { X } , \\mathbf { Y } )$ , the auxiliary coordinates $\\mathbf { Z }$ , and the model parameters (the submodels). Usually, the latter type is far smaller. In ParMAC, we never communicate training or coordinate data; each machine keeps a disjoint portion of $( \\mathbf { X } , \\mathbf { Y } , \\mathbf { Z } )$ corresponding to a subset of the points. Only model parameters are communicated, during the W step, following a circular topology, which implicitly implements a stochastic optimisation. The model parameters are the hash functions h and the decoder f for BAs, and the weight vector ${ \\bf w } _ { h }$ of each hidden unit $h$ for deep nets. Let us see this in detail (refer to fig. 2). ",
340
+ "bbox": [
341
+ 174,
342
+ 611,
343
+ 825,
344
+ 751
345
+ ],
346
+ "page_idx": 4
347
+ },
348
+ {
349
+ "type": "text",
350
+ "text": "Assume we have $P$ identical processing machines, each with its own memory and CPU, connected through a network in a circular unidirectional topology. Each machine stores a subset of the data points and corresponding coordinates $\\left( \\mathbf { x } _ { n } , \\mathbf { y } _ { n } , \\mathbf { z } _ { n } \\right)$ such that the subsets are disjoint and their union is the entire data. Before the $\\mathbf { Z }$ step starts, each machine contains all the (just updated) submodels. This means that in the $\\mathbf { Z }$ step each machine processes its auxiliary coordinates $\\left\\{ { \\bf z } _ { n } \\right\\}$ independently of all other machines, i.e., no communication occurs. The W step is more subtle. At the beginning of the W step, each machine will contain all the submodels and its portion of the data and (just updated) coordinates. Each submodel must have access to the entire data and coordinates in order to update itself and, since the data cannot leave its home machine, the submodel must go to the data. We achieve this in the circular topology with an asynchronous processing, as follows. Each machine keeps a queue of submodels to be processed, and repeatedly performs the following operations: extract a submodel from the queue, process it on its data and send it to the machine’s successor (which will insert it in its queue). If the queue is empty, the machine waits until it is nonempty. The queue of each machine is initialised with a portion $M / P$ of submodels associated with that machine (e.g. in fig. 2, machine 1’s queue contains submodels 1–3, machine 2 submodels 4–6, etc.). Each submodel carries a counter that is initially 1 and increases every time it visits a machine. When it reaches $P$ , the submodel has visited all machines in sequence and has completed an epoch. We repeat this for $e$ epochs and, to ensure all machines have all final submodels before starting the $\\mathbf { Z }$ step, we run a communication-only epoch $e + 1$ (without computation), where submodels simply move from machine to machine. ",
351
+ "bbox": [
352
+ 174,
353
+ 757,
354
+ 825,
355
+ 924
356
+ ],
357
+ "page_idx": 4
358
+ },
359
+ {
360
+ "type": "text",
361
+ "text": "",
362
+ "bbox": [
363
+ 173,
364
+ 103,
365
+ 825,
366
+ 214
367
+ ],
368
+ "page_idx": 5
369
+ },
370
+ {
371
+ "type": "text",
372
+ "text": "Since each submodel is updated as soon as it visits a machine, rather than computing the exact gradient once it has visited all machines and then take a step, the W step is really carrying out stochastic steps for each submodel. For example, if the update is done by a gradient step, we are actually implementing stochastic gradient descent (SGD) where the minibatches are of size $N / P$ (or smaller, if we subdivide a machine’s data portion into minibatches, which should be typically the case in practice). From this point of view, we can regard the W step as doing SGD on each submodel in parallel by having each submodel visit the minibatches in each machine. ",
373
+ "bbox": [
374
+ 173,
375
+ 222,
376
+ 825,
377
+ 319
378
+ ],
379
+ "page_idx": 5
380
+ },
381
+ {
382
+ "type": "text",
383
+ "text": "As described, and as implemented in our experiments, the entire model parameters are communicated $e + 1$ times in a MAC iteration if running e epochs in the W step. We can also run $e$ epochs with only 2 rounds of communication by having a submodel do e consecutive passes within each machine’s data. This reduces the amount of shuffling, but should not be a problem if the data are randomly distributed over machines. ",
384
+ "bbox": [
385
+ 174,
386
+ 325,
387
+ 825,
388
+ 396
389
+ ],
390
+ "page_idx": 5
391
+ },
392
+ {
393
+ "type": "text",
394
+ "text": "Extensions of ParMAC Data shuffling, which improves the SGD convergence speed, can be achieved without data movement by accessing the local data in random order at each epoch (withinmachine), and by randomising the circular topology at each epoch (across-machine). Load balancing is simple because the work in both W and $\\mathbf { Z }$ steps is proportional to the number of data points $N$ . Hence, if the processing power of machine $p$ is proportional to $\\alpha _ { p } \\ > \\ 0$ , we allocate to it $N \\alpha _ { p } / ( \\alpha _ { 1 } + \\cdot \\cdot \\cdot + \\bar { \\alpha _ { P } } )$ data points. Streaming, i.e., discarding old data and adding new data during training, can be done by adding/removing data within-machine, or by adding/removing machines and updating the circular topology. Fault tolerance is possible because we can still learn a good model even if we lose the data from a machine that fails, and because in the W step we can revert to older copies of the lost submodels residing in other machines. See further details in Carreira-Perpi ˜n´an and Alizadeh (2016). ",
395
+ "bbox": [
396
+ 174,
397
+ 415,
398
+ 825,
399
+ 569
400
+ ],
401
+ "page_idx": 5
402
+ },
403
+ {
404
+ "type": "text",
405
+ "text": "A theoretical model of the parallel speedup We can estimate the runtime of the $\\mathbf { W }$ and $\\mathbf { Z }$ steps assuming there are $M$ independent submodels of the same size in the W step, using $e$ epochs, on a dataset with $N$ training points, distributed over $P$ identical machines (each with $N / P$ points). Let $t _ { r } ^ { \\mathbf { W } }$ be the computation time per submodel and data point in the W step, $t _ { r } ^ { \\mathbf { Z } }$ the computation time per data point in the step, and the communication time per submodel in the W step. Then the runtime of the W and $\\mathbf { Z }$ steps is $\\begin{array} { r } { \\tilde { T } ^ { \\mathbf { W } } ( P ) = \\lceil M / P \\rceil ( t _ { r } ^ { \\mathbf { W } } \\frac { N } { P } + \\dot { t } _ { c } ^ { \\mathbf { W } } ) P e + \\lceil M / P \\rceil t _ { c } ^ { \\mathbf { W } } P } \\end{array}$ and $T ^ { \\mathbf { Z } } ( P ) =$ $\\textstyle M { \\frac { N } { P } } t _ { r } ^ { \\mathbf { Z } }$ P , respectively. Hence the parallel speedup is (see details in Carreira-Perpi ˜n´an and Alizadeh, ",
406
+ "bbox": [
407
+ 173,
408
+ 588,
409
+ 825,
410
+ 700
411
+ ],
412
+ "page_idx": 5
413
+ },
414
+ {
415
+ "type": "equation",
416
+ "img_path": "images/c9329d623a08c97837dc752f8469563f75e215cec499bfec6a00e7c84780ae98.jpg",
417
+ "text": "$$\nS ( P ) = { \\frac { T ( 1 ) } { T ( P ) } } = { \\frac { \\rho { \\frac { 1 } { [ M / P ] } } M P } { { \\frac { 1 } { N } } P ^ { 2 } + \\rho _ { 2 } P + \\rho _ { 1 } { \\frac { 1 } { [ M / P ] } } M } } \\rho _ { 1 } = t _ { r } ^ { \\mathbf { Z } } / ( e + 1 ) t _ { c } ^ { \\mathbf { W } } , \\rho _ { 2 } = e t _ { r } ^ { \\mathbf { W } } / ( e + 1 ) t _ { c } ^ { \\mathbf { W } }\n$$",
418
+ "text_format": "latex",
419
+ "bbox": [
420
+ 171,
421
+ 710,
422
+ 797,
423
+ 753
424
+ ],
425
+ "page_idx": 5
426
+ },
427
+ {
428
+ "type": "text",
429
+ "text": "where $\\rho , \\rho _ { 1 }$ and $\\rho _ { 2 }$ are ratios of computation vs communication, dependent on the optimisation algorithm in the W and $\\mathbf { Z }$ steps, and on the performace of the distributed system and MPI library. ",
430
+ "bbox": [
431
+ 174,
432
+ 763,
433
+ 825,
434
+ 792
435
+ ],
436
+ "page_idx": 5
437
+ },
438
+ {
439
+ "type": "text",
440
+ "text": "Hence, if $P \\leq M$ and $M$ is divisible by $P$ we have $\\begin{array} { r } { S ( P ) = P / ( 1 + \\frac { P } { o N } ) } \\end{array}$ and if $P > M$ we have $\\begin{array} { r } { S ( P ) = \\rho M / ( \\rho _ { 2 } + \\rho _ { 1 } \\frac { M } { P } + \\frac { P } { N } ) } \\end{array}$ . In practice, typically we have $\\rho \\ll 1$ ρN (because communication dominates computation in current architectures) and $\\rho _ { 2 } N \\gg 1$ (large dataset). If we take $P \\ll \\rho _ { 2 } N$ , then $S ( P ) \\approx \\bar { P }$ if $P \\leq M$ and $\\begin{array} { r } { S ( P ) \\approx \\rho M / ( \\rho _ { 2 } + \\rho _ { 1 } \\frac { M } { P } ) } \\end{array}$ if $P > M$ . Hence, the speedup is nearly perfect if using fewer machines than submodels, and otherwise it peaks at $S _ { 1 } ^ { * } = \\rho M / ( \\rho _ { 2 } +$ $2 \\sqrt { \\rho _ { 1 } M / N } ) \\stackrel { \\cdot } { > } M$ for $P = P _ { 1 } ^ { * } = \\sqrt { \\rho _ { 1 } M N } > M$ and decreases thereafter. This affords very large speedups for large datasets and large models. This theoretical speedup matches well our measured ones (see the experiments section), and can be used to determine optimal values for the number of machines $P$ to use in practice (subject to additional constraints, e.g. cost of the machines). ",
441
+ "bbox": [
442
+ 173,
443
+ 796,
444
+ 825,
445
+ 924
446
+ ],
447
+ "page_idx": 5
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "Eq. (3) also shows that we can leave the speedup unchanged by trading off dataset size and computation/communication times, as long as one of these holds: $\\dot { N } t _ { r } ^ { \\mathbf { W } }$ and $N t _ { r } ^ { \\mathbf { Z } }$ remain constant; or $\\mathbf { \\Pi } _ { N / t _ { c } ^ { \\mathbf { W } } } ^ { \\star }$ remains constant; or $t _ { r } ^ { \\mathbf { W } } / t _ { c } ^ { \\mathbf { W } }$ and $t _ { r } ^ { \\mathbf { Z } } / t _ { c } ^ { \\mathbf { W } }$ remain constant. ",
452
+ "bbox": [
453
+ 174,
454
+ 103,
455
+ 821,
456
+ 146
457
+ ],
458
+ "page_idx": 6
459
+ },
460
+ {
461
+ "type": "text",
462
+ "text": "In the BA, we have submodels of different size: encoders of size $D$ and decoders of size $L < D$ . We can model this by “grouping” the $D$ decoders into $L$ groups of $D / L$ decoders each, resulting in $M = 2 L$ equal-size submodels (assuming the ratio of computation and communication times of decoder vs encoder is $L / D < 1 \\rangle$ ). ",
463
+ "bbox": [
464
+ 174,
465
+ 152,
466
+ 825,
467
+ 208
468
+ ],
469
+ "page_idx": 6
470
+ },
471
+ {
472
+ "type": "text",
473
+ "text": "Convergence of ParMAC The only approximation that ParMAC makes to the original MAC algorithm is using SGD in the W step. Since we can guarantee convergence of SGD under certain conditions (e.g. Robbins-Monro schedules), we can recover the original convergence guarantees for MAC to a local stationary point with differentiable layers (see details in Carreira-Perpi ˜n´an and Alizadeh, 2016). This convergence guarantee is independent of the number of layers, models and processors. With nondifferentiable layers, the convergence properties of MAC (and ParMAC) are not well known. In particular, for the binary autoencoder the encoding layer is discrete and the problem is NP-complete. While convergence guarantees are important theoretically, in practical applications with large datasets in a distributed setting one typically runs SGD for just a few epochs, even one or less than one (i.e., we stop SGD before passing through all the data). This typically reduces the objective function to a good enough value as fast as possible, since each pass over the data is very costly. In our experiments, 1–2 epochs in the W step make ParMAC very similar to MAC using an exact step. ",
474
+ "bbox": [
475
+ 173,
476
+ 226,
477
+ 825,
478
+ 406
479
+ ],
480
+ "page_idx": 6
481
+ },
482
+ {
483
+ "type": "text",
484
+ "text": "Circular vs parameter-server topologies We also considered implementing ParMAC using a parameter-server (PS) topology rather than a circular one, but the latter is better. With a PS we do parallel SGD on each submodel independently, i.e., each worker runs SGD on its own submodel replica for a while, sends it to the PS, and this broadcasts an “average” submodel back to the workers, asynchronously. The circular topology does true SGD on each submodel independently from the others. We can show the runtime per iteration using a PS is equal to that of the circular topology only if the server can communicate with $P$ workers simultaneously (rather than sequentially), otherwise it is slower. The reason is the PS has more communication. The PS has some additional disadvantages: parallel SGD converges more slowly than true SGD and is difficult to apply if the W step is nonconvex; and it needs extra machine(s) to act as parameter server(s). The fundamental issue is that both topologies differ in how they employ the available parallelism: the circular topology updates different, independent submodels, while the PS updates replicas of the same submodels. ",
485
+ "bbox": [
486
+ 173,
487
+ 424,
488
+ 825,
489
+ 590
490
+ ],
491
+ "page_idx": 6
492
+ },
493
+ {
494
+ "type": "text",
495
+ "text": "4 EXPERIMENTS ",
496
+ "text_level": 1,
497
+ "bbox": [
498
+ 176,
499
+ 613,
500
+ 325,
501
+ 628
502
+ ],
503
+ "page_idx": 6
504
+ },
505
+ {
506
+ "type": "text",
507
+ "text": "MPI implementation of ParMAC for BAs. We have used $\\mathrm { C } / \\mathrm { C } { + + }$ , the GSL and BLAS libraries for mathematical operations, and the Message Passing Interface (MPI) (Gropp et al., 1999) for interprocess communication. MPI is a widely used framework for high-performance parallel computing, available in multiple platforms. It is particularly suitable for ParMAC because of its support of the SPMD (single program, multiple data) model. In MPI, processes in different machines communicate through messages. To receive data, we use the synchronous blocking receive function MPI Recv; the process calling this blocks until the data arrives. To send data we use the buffered blocking send function MPI Bsend. We allocate enough memory and attach it to the system. The process calling MPI Bsend blocks until the buffer is copied to the MPI internal memory; after that, the MPI library takes care of sending the data. See a code snippet in Carreira-Perpi ˜n´an and Alizadeh (2016). ",
508
+ "bbox": [
509
+ 174,
510
+ 645,
511
+ 825,
512
+ 784
513
+ ],
514
+ "page_idx": 6
515
+ },
516
+ {
517
+ "type": "text",
518
+ "text": "Distributed-memory cluster. We used General Computing Nodes from the UCSD Triton Shared Computing Cluster (TSCC), available to the public for a fee. Each node contains 2 8-core Intel Xeon E5-2670 processors (16 cores in total), 64GB RAM (4GB/processor) and a 500GB hard drive. The nodes are connected through a 10GbE network. We used up to $P \\ = \\ 1 2 8$ processors. Carreira-Perpi ˜n´an and Alizadeh (2016) give detailed specs as well as experiments in a sharedmemory machine. ",
519
+ "bbox": [
520
+ 174,
521
+ 790,
522
+ 825,
523
+ 875
524
+ ],
525
+ "page_idx": 6
526
+ },
527
+ {
528
+ "type": "text",
529
+ "text": "Datasets. We have used 3 well-known colour image retrieval benchmarks. (1) CIFAR (Krizhevsky, 2009) contains $6 0 0 0 0$ images $N = 5 0 0 0 0$ training and 10 000 test), represented by $D = 3 2 0$ GIST features. (2) SIFT-1M (J´egou et al., 2011a) contains $N = 1 0 ^ { 6 }$ training and $1 0 ^ { 4 }$ test images, each represented by $D = 1 2 8$ SIFT features. (3) SIFT-1B (J´egou et al., 2011a) has three subsets: $1 0 ^ { 9 }$ base vectors where the search is performed, $N = 1 0 ^ { 8 }$ learning vectors used to train the model and $1 0 ^ { 4 }$ query vectors. ",
530
+ "bbox": [
531
+ 176,
532
+ 882,
533
+ 823,
534
+ 924
535
+ ],
536
+ "page_idx": 6
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "",
541
+ "bbox": [
542
+ 176,
543
+ 103,
544
+ 823,
545
+ 145
546
+ ],
547
+ "page_idx": 7
548
+ },
549
+ {
550
+ "type": "text",
551
+ "text": "Performance measures. Regarding the quality of the BA and hash functions learnt, we report the retrieval precision $( \\% )$ in the test set using as true neighbours the $K$ nearest images in Euclidean distance in the original space, and as retrieved neighbours in the binary space we use the $k$ nearest images in Hamming distance. We set $( K , k ) = \\bar { ( } 1 0 0 0 , 1 0 0 )$ for CIFAR and $( 1 0 0 0 0 , 1 0 0 0 0 )$ for SIFT-1M. For SIFT-1B, as suggested by the dataset creators, we report the recall $_ { \\ @ \\mathrm { R } }$ : the average number of queries for which the nearest neighbour is ranked within the top $R$ positions (for varying values of $R$ ); in case of tied distances, we place the query as top rank. All these measures are computed offline once the BA is trained. Carreira-Perpi ˜n´an and Alizadeh (2016) give additional measures and experiments. ",
552
+ "bbox": [
553
+ 174,
554
+ 152,
555
+ 825,
556
+ 279
557
+ ],
558
+ "page_idx": 7
559
+ },
560
+ {
561
+ "type": "text",
562
+ "text": "Models and their parameters. We use BAs with linear encoders (linear SVM) except with SIFT-1B, where we also use kernel SVMs. The decoder is always linear. We set $L = 1 6$ bits (hash functions) for CIFAR and SIFT-1M and $L = 6 4$ bits for SIFT-1B. We initialise the binary codes from truncated PCA ran on a subset of the training set (small enough that it fits in one processor). To train the encoder ( $L$ SVMs) and decoder $D$ linear mappings) with stochastic optimisation, we used the SGD code from (Bottou and Bousquet, 2008), using its default parameter settings. The SGD step size is tuned automatically in each iteration by examining the first $1 0 0 0$ datapoints. We use a multiplicative $\\mu$ schedule $\\mu _ { i } = { \\dot { \\mu } } _ { 0 } a ^ { i }$ where the initial value $\\mu _ { 0 }$ and the factor $a > 1$ are tuned offline in a trial run using a small subset of the data. For CIFAR we use $\\mu _ { 0 } = 0 . 0 0 5$ and $a = 1 . 2$ over 26 iterations $( i = 0 , \\ldots , 2 5 )$ . For SIFT-1M and SIFT-1B we use $\\mu _ { 0 } = 1 0 ^ { - 4 }$ and $a = 2$ over 10 iterations. ",
563
+ "bbox": [
564
+ 174,
565
+ 285,
566
+ 825,
567
+ 424
568
+ ],
569
+ "page_idx": 7
570
+ },
571
+ {
572
+ "type": "text",
573
+ "text": "Effect of stochastic steps in the W step Fig. 3 shows the effect on the precision on CIFAR of varying the number of epochs within the W step and shuffling the data as a function of the number of processors $P$ . As the number of epochs increases, the W step is solved more exactly (8 epochs is practically exact in this data). Fewer epochs, even just one, cause only a small degradation. The reason is that, although these are relatively small datasets, they contain sufficient redundance that few epochs are sufficient to decrease the error considerably. ",
574
+ "bbox": [
575
+ 173,
576
+ 452,
577
+ 825,
578
+ 535
579
+ ],
580
+ "page_idx": 7
581
+ },
582
+ {
583
+ "type": "text",
584
+ "text": "This is also helped by the accumulated effect of epochs over MAC iterations. Running more epochs increases the runtime and lowers the parallel speedup in this particular model, because we use few bits $L = 1 6 )$ and therefore few submodels $M = 2 L = 3 2$ ) compared to the number of machines (up to $P = 1 2 8 )$ ), so the W step has less parallelism. The positive effect of data shuffling in the W step is clear: shuffling generally increases the precision with no increase in runtime. ",
585
+ "bbox": [
586
+ 174,
587
+ 535,
588
+ 485,
589
+ 686
590
+ ],
591
+ "page_idx": 7
592
+ },
593
+ {
594
+ "type": "image",
595
+ "img_path": "images/7a5ec6e3fefe1bf4c4dd3f2095ac22c4753a543c8695ba37fd199b7a1cd3b944.jpg",
596
+ "image_caption": [
597
+ "Figure 3: Precision in CIFAR dataset. "
598
+ ],
599
+ "image_footnote": [],
600
+ "bbox": [
601
+ 496,
602
+ 540,
603
+ 823,
604
+ 666
605
+ ],
606
+ "page_idx": 7
607
+ },
608
+ {
609
+ "type": "text",
610
+ "text": "Speedup The fundamental advantage of ParMAC and distributed optimisation in general is the ability to train on datasets that do not fit in a single machine, and the reduction in runtime because of parallel processing. Fig. 4 shows the “strong scaling” speedups achieved, as a function of the number of machines $P$ for fixed problem size (dataset and model), in CIFAR and SIFT-1M ( $N =$ 50K and 1M training points, respectively). Even though these datasets and especially the number of independent submodels $M = 2 L = 3 2$ effective submodels of the same size, as discussed earlier) are relatively small, the speedups we achieve are nearly perfect for $P \\leq M$ and hold very well for $P > M$ up to the maximum number of machines we used $P = 1 2 8$ in the distributed system). The speedups flatten as the number of W-step epochs (and consequently the amount of communication) increases, because for this experiment the bottleneck is the W step, whose parallelisation ability (i.e., the number of concurrent processes) is limited by $M = 2 L$ (the $\\mathbf { Z }$ step has $N$ independent processes and is never a bottleneck, since $N$ is very large). However, as noted earlier, using 1 to 2 epochs gives a good enough result, very close to doing an exact W step. The runtime for SIFT-1M on $P = 1 2 8$ machines with 8 epochs was 12 minutes and its speedup $1 0 0 \\times$ . This is particularly remarkable given that the original, nested model did not have model parallelism. ",
611
+ "bbox": [
612
+ 173,
613
+ 715,
614
+ 825,
615
+ 924
616
+ ],
617
+ "page_idx": 7
618
+ },
619
+ {
620
+ "type": "image",
621
+ "img_path": "images/32695e824cb9267e2ea8be1d4074f23439f2373aaed6318782695f84d6fc42d4.jpg",
622
+ "image_caption": [
623
+ "Figure 4: Speedup $S ( P )$ as a function of the number of machines $P$ (top: experiment, bottom: theory). The dataset size and number of submodels $( N , M )$ is (50 000, 32) for CIFAR, $( 1 0 ^ { 6 } , 3 2 )$ for SIFT-1M and $( 1 0 ^ { 8 } , 1 2 8 )$ for SIFT-1B. "
624
+ ],
625
+ "image_footnote": [],
626
+ "bbox": [
627
+ 169,
628
+ 99,
629
+ 815,
630
+ 361
631
+ ],
632
+ "page_idx": 8
633
+ },
634
+ {
635
+ "type": "text",
636
+ "text": "Fig. 4 also shows the speedups predicted by our theoretical model. We set the parameters $e$ and $N$ to their known values, and $M = 2 L = 3 2$ for CIFAR and SIFT-1M and $M = 2 L = 1 2 8$ for SIFT-1B. For the time parameters, we set $t _ { r } ^ { \\mathbf { W } } = 1$ to fix the time units, and we set $t _ { c } ^ { \\mathbf { W } }$ and $t _ { r } ^ { \\mathbf { Z } }$ by trial and error to achieve a reasonably good fit to the experimental speedups: $t _ { c } ^ { \\mathbf { W } } = 1 0 ^ { 4 }$ for both datasets, and $t _ { r } ^ { \\mathbf { Z } } = 2 0 0$ for CIFAR and 40 for SIFT-1M. Although these are fudge factors, they are in rough agreement with the fact that communicating a weight vector over the network is orders of magnitude slower than updating it with a gradient step, and that the $\\mathbf { Z }$ step is quite slower than the W step because of the binary optimisation it involves. ",
637
+ "bbox": [
638
+ 173,
639
+ 441,
640
+ 825,
641
+ 554
642
+ ],
643
+ "page_idx": 8
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "Large-scale experiment SIFT-1B is one of the largest datasets, if not the largest one, that are publicly available for comparing nearest-neighbour search algorithms with known ground-truth (i.e., precomputed exact Euclidean distances for each query to its $k$ nearest vectors in the base set). The training set contains $N = 1 0 0 \\mathrm { { M } }$ vectors, each consisting of 128 SIFT features. We used $L = 6 4$ hash functions $M = 1 2 8$ submodels): linear SVMs as before, and kernel SVMs. These have fixed Gaussian radial basis functions (2 000 centres picked at random from the training set and bandwidth $\\sigma = 1 6 0 ^ { \\circ }$ ), so the only trainable parameters are the weights, and the MAC algorithm does not change except that it operates on a 2 000-dimensional input vector of kernel values, instead of the 128 SIFT features. We use $e = 2$ epochs with shuffling. All these decisions were based on trials on a subset of the training dataset. We initialised the binary codes from truncated PCA trained on a subset of size 1M (recall $\\textcircled { a } \\mathrm { R } { = } 1 0 0 ; 5 5 . 2 \\%$ ), which gave results comparable to the baseline in (J´egou et al., 2011b). ",
648
+ "bbox": [
649
+ 173,
650
+ 570,
651
+ 825,
652
+ 723
653
+ ],
654
+ "page_idx": 8
655
+ },
656
+ {
657
+ "type": "text",
658
+ "text": "We ran ParMAC on the whole training set in the distributed system with 128 processors for 6 iterations and achieved a recall $\\scriptstyle { \\mathcal { Q } } \\mathrm { R } = 1 0 0$ of $6 1 . 5 \\%$ in 29 hours (linear SVM) and $6 6 . 1 \\%$ in 83 hours (kernel SVM). Using a scaled-down model and training set, we estimated that training in one machine (with enough RAM to hold the data and parameters) would take months. The theoretical speedup (fig. 4 right plot, using the same parameters as in SIFT-1M), is nearly perfect (note the plot goes up to $P = 1 0 2 4$ machines, even though our experiments are limited to $P = 1 2 8$ ). This is because $M$ is quite larger and $N$ is much larger than in the previous datasets. ",
659
+ "bbox": [
660
+ 174,
661
+ 729,
662
+ 825,
663
+ 828
664
+ ],
665
+ "page_idx": 8
666
+ },
667
+ {
668
+ "type": "text",
669
+ "text": "5 DISCUSSION ",
670
+ "text_level": 1,
671
+ "bbox": [
672
+ 174,
673
+ 849,
674
+ 308,
675
+ 864
676
+ ],
677
+ "page_idx": 8
678
+ },
679
+ {
680
+ "type": "text",
681
+ "text": "Developing parallel, distributed optimisation algorithms for nonconvex problems in machine learning is challenging, as shown by recent efforts by large teams of researchers (Le et al., 2012; Dean et al., 2012). One important advantage of ParMAC is its simplicity. Data and model parallelism arise naturally thanks to the introduction of auxiliary coordinates. The corresponding optimisation subproblems can often be solved reusing existing code as a black box (as with the SGD training of SVMs and linear mappings in the BA). A circular topology is sufficient to achieve a low communication between machines. There is no close coupling between the model structure and the distributed system architecture. This makes ParMAC suitable for architectures as different as supercomputers and data centres. ",
682
+ "bbox": [
683
+ 176,
684
+ 882,
685
+ 823,
686
+ 924
687
+ ],
688
+ "page_idx": 8
689
+ },
690
+ {
691
+ "type": "text",
692
+ "text": "",
693
+ "bbox": [
694
+ 174,
695
+ 103,
696
+ 825,
697
+ 186
698
+ ],
699
+ "page_idx": 9
700
+ },
701
+ {
702
+ "type": "text",
703
+ "text": "Further improvements can be made in specific problems. For example, we may have more parallelisation or less dependencies (e.g. the weights of hidden units in layer $k$ of a neural net depend only on auxiliary coordinates in layers $k$ and $k + 1$ ). This may reduce the communication in the W step, by sending to a given machine only the model portion it needs, or by allocating cores within a multicore machine accordingly. The W and $\\mathbf { Z }$ step optimisations can make use of further parallelisation by GPUs or by distributed convex optimisation algorithms. Many more refinements can be done, such as storing or communicating reduced-precision values with little effect of the accuracy. In this paper, we have tried to keep our implementation as simple as possible, because our goal was to understand the parallelisation speedups of ParMAC in a setting as general as possible, rather than trying to achieve the very best performance for a particular dataset, model or distributed system. ",
704
+ "bbox": [
705
+ 174,
706
+ 194,
707
+ 825,
708
+ 333
709
+ ],
710
+ "page_idx": 9
711
+ },
712
+ {
713
+ "type": "text",
714
+ "text": "6 CONCLUSION ",
715
+ "text_level": 1,
716
+ "bbox": [
717
+ 176,
718
+ 353,
719
+ 318,
720
+ 369
721
+ ],
722
+ "page_idx": 9
723
+ },
724
+ {
725
+ "type": "text",
726
+ "text": "We have proposed ParMAC, a distributed model for the method of auxiliary coordinates for training nested, nonconvex models in general, analysed its parallel speedup and convergence, and demonstrated it with an MPI-based implementation for a particular case, to train binary autoencoders. MAC creates parallelism by introducing auxiliary coordinates for each data point to decouple nested terms in the objective function. ParMAC is able to translate the parallelism inherent in MAC into a distributed system by 1) using data parallelism, so that each machine keeps a portion of the original data and its corresponding auxiliary coordinates; and 2) using model parallelism, so that independent submodels visit every machine in a circular topology, effectively executing epochs of a stochastic optimisation, without the need for a parameter server and therefore no communication bottlenecks. The convergence properties of MAC (to a stationary point of the objective function) remain essentially unaltered in ParMAC. The parallel speedup can be theoretically predicted to be nearly perfect when the number of submodels is comparable or larger than the number of machines, and to eventually saturate as one continues to increase the number of machines, and indeed this was confirmed in our experiments. ParMAC also makes it easy to account for data shuffling, load balancing, streaming and fault tolerance. Hence, we expect that ParMAC could be a basic building block, in combination with other techniques, for the distributed optimisation of nested models in big data settings. ",
727
+ "bbox": [
728
+ 174,
729
+ 383,
730
+ 825,
731
+ 604
732
+ ],
733
+ "page_idx": 9
734
+ },
735
+ {
736
+ "type": "text",
737
+ "text": "ACKNOWLEDGMENTS ",
738
+ "text_level": 1,
739
+ "bbox": [
740
+ 176,
741
+ 622,
742
+ 326,
743
+ 633
744
+ ],
745
+ "page_idx": 9
746
+ },
747
+ {
748
+ "type": "text",
749
+ "text": "Work supported by a Google Faculty Research Award and by NSF award IIS–1423515. We thank Ramin Raziperchikolaei (UC Merced) for discussions about binary autoencoders, Dong Li (UC Merced) for discussions about MPI and performance evaluation on parallel systems, and Quoc Le (Google) for discussions about Google’s DistBelief system. ",
750
+ "bbox": [
751
+ 174,
752
+ 645,
753
+ 825,
754
+ 700
755
+ ],
756
+ "page_idx": 9
757
+ },
758
+ {
759
+ "type": "text",
760
+ "text": "REFERENCES ",
761
+ "text_level": 1,
762
+ "bbox": [
763
+ 174,
764
+ 719,
765
+ 284,
766
+ 734
767
+ ],
768
+ "page_idx": 9
769
+ },
770
+ {
771
+ "type": "text",
772
+ "text": "M. Abadi et al. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. White paper. \nY. Bengio, J.-F. Paiement, P. Vincent, O. Delalleau, N. Le Roux, and M. Ouimet. Out-of-sample extensions for LLE, Isomap, MDS, Eigenmaps, and spectral clustering. NIPS, 2004. \nD. P. Bertsekas. Incremental gradient, subgradient, and proximal methods for convex optimization: A survey. In S. Sra, S. Nowozin, and S. J. Wright, editors, Optimization for Machine Learning. MIT Press, 2011. \nL. Bottou. Large-scale machine learning with stochastic gradient descent. COMPSTAT, 2010. \nL. Bottou and O. Bousquet. The tradeoffs of large scale learning. NIPS, 2008. \nS. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eckstein. Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundations and Trends in Machine Learning, 3, 2011. \nJ. Bradley, A. Kyrola, D. Bickson, and C. Guestrin. Parallel coordinate descent for $L _ { 1 }$ -regularized loss minimization. ICML, 2011. \nM. A. Carreira-Perpi ˜n´an and M. Alizadeh. ParMAC: Distribut ´ ed optimisation of nested functions, with application to learning binary autoencoders. arXiv:1605.09114 [cs.LG], May 30 2016. \nM. A. Carreira-Perpi ˜n´an and M. Vladymyrov. A fast, universa ´ l algorithm to learn parametric nonlinear embeddings. NIPS, 2015. \nM. A. Carreira-Perpi ˜n´an and W. Wang. Distributed optimizat ´ ion of deeply nested systems. arXiv:1212.5921 [cs.LG], Dec. 24 2012. \nM. A. Carreira-Perpi ˜n´an and W. Wang. Distributed optimizat ´ ion of deeply nested systems. AISTATS, 2014. \nV. Cevher, S. Becker, and M. Schmidt. Convex optimization for big data: Scalable, randomized, and parallel algorithms for big data analytics. IEEE Signal Processing Magazine, 31(5):32–43, Sept. 2014. \nA. Coates, B. Huval, T. Wang, D. Wu, B. Catanzaro, and A. Ng. Deep learning with COTS HPC systems. ICML, 2013. \nJ. Dean, G. Corrado, R. Monga, K. Chen, M. Devin, Q. Le, M. Mao, M. Ranzato, A. Senior, P. Tucker, K. Yang, and A. Ng. Large scale distributed deep networks. NIPS, 2012. \nP. Drineas and M. W. Mahoney. On the Nystr¨om method for approximating a Gram matrix for improved kernel-based learning. J. Machine Learning Research, 6:2153–2175, Dec. 2005. \nY. Gong, S. Lazebnik, A. Gordo, and F. Perronnin. Iterative quantization: A Procrustean approach to learning binary codes for large-scale image retrieval. IEEE PAMI, 2013. \nK. Grauman and R. Fergus. Learning binary hash codes for large-scale image search. In R. Cipolla, S. Battiato, and G. Farinella, editors, Machine Learning for Computer Vision, pages 49–87. Springer-Verlag, 2013. \nW. Gropp, E. Lusk, and A. Skjellum. Using MPI: Portable Parallel Programming with the Message-Passing Interface. MIT Press, second edition, 1999. \nG. Hinton, L. Deng, D. Yu, G. Dahl, A. Mohamed, N. Jaitly, A. Senior, V. Vanhoucke, P. Nguyen, T. N. Sainath, and B. Kingsbury. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 29(6):82–97, Nov. 2012. \nH. J´egou, M. Douze, and C. Schmid. Product quantization for nearest neighbor search. IEEE PAMI, 33, 2011a. \nH. J´egou, R. Tavenard, M. Douze, and L. Amsaleg. Searching in one billion vectors: Re-rank with source coding. ICASSP, 2011b. \nA. Krizhevsky. Learning multiple layers of features from tiny images. Master’s thesis, U. Toronto, 2009. \nQ. Le, M. Ranzato, R. Monga, M. Devin, G. Corrado, K. Chen, J. Dean, and A. Ng. Building high-level features using large scale unsupervised learning. ICML, 2012. \nJ. Liu and S. J. Wright. Asynchronous stochastic coordinate descent: Parallelism and convergence properties. SIAM J. Optimization, 25(1):351–376, 2015. \nY. Low, D. Bickson, J. Gonzalez, C. Guestrin, A. Kyrola, and J. M. Hellerstein. Distributed GraphLab: A framework for machine learning and data mining in the cloud. Proc. VLDB Endowment, 5, 2012. \nG. J. McLachlan and T. Krishnan. The EM Algorithm and Extensions. Wiley, second edition, 2008. \nF. Niu, B. Recht, C. R´e, and S. J. Wright. HOGWILD!: A lock-free approach to parallelizing stochastic gradient descent. NIPS, 2011. \nH. Ouyang, N. He, L. Tran, and A. Gray. Stochastic alternating direction method of multipliers. ICML, 2013. \nR. Raziperchikolaei and M. A. Carreira-Perpi ˜n´an. Optimizing affinity-based binary ´ hashing using auxiliary coordinates. NIPS, 2016. \nP. Richt´arik and M. Tak´aˇc. Distributed coordinate descent method for learning with big data. arXiv:1310.2059 [stat.ML], Oct. 8 2013. \nF. Seide, H. Fu, J. Droppo, G. Li, and D. Yu. 1-bit stochastic gradient descent and its application to data-parallel distributed training of speech DNNs. Interspeech, 2014. \nA. Talwalkar, S. Kumar, and H. Rowley. Large-scale manifold learning. CVPR, 2008. \nM. Vladymyrov and M. A. Carreira-Perpi ˜n´an. Locally Linear Landmarks for larg ´ e-scale manifold learning. ECML, 2013. \nM. Vladymyrov and M. A. Carreira-Perpi ˜n´an. The Variational Nystr¨om method f ´ or large-scale spectral problems. ICML, 2016. \nW. Wang and M. A. Carreira-Perpi ˜n´an. The role of dimensionality reduct ´ ion in classification. AAAI, 2014. \nC. K. I. Williams and M. Seeger. Using the Nystr¨om method to speed up kernel machines. NIPS, 2001. \nS. J. Wright. Coordinate descent algorithms. Math. Prog., 151(1):3–34, June 2016. \nE. P. Xing, Q. Ho, W. Dai, J. K. Kim, J. Wei, S. Lee, X. Zheng, P. Xie, A. Kumar, and Y. Yu. Petuum: A new platform for distributed machine learning on big data. IEEE Trans. Big Data, 1(2):49–67, Apr.–June 2015. \nM. Zaharia, M. Chowdhury, M. J. Franklin, S. Shenker, and I. Stoica. Spark: Cluster computing with working sets. In Proc. 2nd USENIX Conf. Hot Topics in Cloud Computing (HotCloud 2010), 2010. \nR. Zhang and J. Kwok. Asynchronous distributed ADMM algorithm for global variable consensus optimization. ICML, 2014. \nM. Zinkevich, M. Weimer, A. Smola, and L. Li. Parallelized stochastic gradient descent. NIPS, 2010. ",
773
+ "bbox": [
774
+ 173,
775
+ 742,
776
+ 826,
777
+ 922
778
+ ],
779
+ "page_idx": 9
780
+ },
781
+ {
782
+ "type": "text",
783
+ "text": "",
784
+ "bbox": [
785
+ 171,
786
+ 126,
787
+ 826,
788
+ 925
789
+ ],
790
+ "page_idx": 10
791
+ }
792
+ ]
parse/train/SygvTcYee/SygvTcYee_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SygvTcYee/SygvTcYee_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/r1drp-WCZ/r1drp-WCZ.md ADDED
@@ -0,0 +1,366 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # STATE SPACE LSTM MODELS WITH PARTICLE MCMC INFERENCE
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Long Short-Term Memory (LSTM) is one of the most powerful sequence models. Despite the strong performance, however, it lacks the nice interpretability as in state space models. In this paper, we present a way to combine the best of both worlds by introducing State Space LSTM (SSL) models that generalizes the earlier work Zaheer et al. (2017) of combining topic models with LSTM. However, unlike Zaheer et al. (2017), we do not make any factorization assumptions in our inference algorithm. We present an efficient sampler based on sequential Monte Carlo (SMC) method that draws from the joint posterior directly. Experimental results confirms the superiority and stability of this SMC inference algorithm on a variety of domains.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ State space models (SSMs), such as hidden Markov models (HMM) and linear dynamical systems (LDS), have been the workhorse of sequence modeling in the past decades From a graphical model perspective, efficient message passing algorithms (Stratonovich, 1960; Kalman, 1960) are available in compact closed form thanks to their simple linear Markov structure. However, simplicity comes at a cost: real world sequences can have long-range dependencies that cannot be captured by Markov models; and the linearity of transition and emission restricts the flexibility of the model for complex sequences.
12
+
13
+ A popular alternative is the recurrent neural networks (RNN), for instance the Long Short-Term Memory (LSTM) (Hochreiter & Schmidhuber, 1997) which has become a standard for sequence modeling nowadays. Instead of associating the observations with stochastic latent variables, RNN directly defines the distribution of each observation conditioned on the past, parameterized by a neural network. The recurrent parameterization not only allows RNN to provide a rich function class, but also permits scalable stochastic optimization such as the backpropagation through time (BPTT) algorithm. However, flexibility does not come for free as well: due to the complex form of the transition function, the hidden states of RNN are often hard to interpret. Moreover, it can require large amount of parameters for seemingly simple sequence models (Zaheer et al., 2017).
14
+
15
+ In this paper, we propose a new class of models State Space LSTM (SSL) that combines the best of both worlds. We show that SSLs can handle nonlinear, non-Markovian dynamics like RNNs, while retaining the probabilistic interpretations of SSMs. The intuition, in short, is to separate the state space from the sample space. In particular, instead of directly estimating the dynamics from the observed sequence, we focus on modeling the sequence of latent states, which may represent the true underlying dynamics that generated the noisy observations. Unlike SSMs, where the same goal is pursued under linearity and Markov assumption, we alleviate the restriction by directly modeling the transition function between states parameterized by a neural network. On the other hand, we bridge the state space and the sample space using classical probabilistic relation, which not only brings additional interpretability, but also enables the LSTM to work with more structured representation rather than the noisy observations.
16
+
17
+ Indeed, parameter estimation of such models can be nontrivial. Since the LSTM is defined over a sequence of latent variables rather than observations, it is not straightforward to apply the usual BPTT algorithm without making variational approximations. In Zaheer et al. (2017), which is an instance of SSL, an EM-type approach was employed: the algorithm alternates between imputing the latent states and optimizing the LSTM over the imputed sequences. However, as we show below, the inference implicitly assumes the posterior is factorizable through time. This is a restrictive assumption since the benefit of rich state transition brought by the LSTM may be neutralized by breaking down the posterior over time.
18
+
19
+ We present a general parameter estimation scheme for the proposed class of models based on sequential Monte Carlo (SMC) (Doucet et al., 2001), in particular the Particle Gibbs (Andrieu et al., 2010). Instead of sampling each time point individually, we directly sample from the joint posterior without making limiting factorization assumptions. Through extensive experiments we verify that sampling from the full posterior leads to significant improvement in the performance.
20
+
21
+ Related works Enhancing state space models using neural networks is not a new idea. Traditional approaches can be traced back to nonlinear extensions of linear dynamical systems, such as extended or unscented Kalman filters (Julier & Uhlmann, 1997), where both state transition and emission are generalized to nonlinear functions. The idea of parameterizing them with neural networks can be found in Ghahramani & Roweis (1999), as well as many recent works (Krishnan et al., 2015; Archer et al., 2015; Johnson et al., 2016; Krishnan et al., 2017; Karl et al., 2017) thanks to the development of recognition networks (Kingma & Welling, 2014; Rezende et al., 2014). Enriching the output distribution of RNN has also regain popularity recently. Unlike conventionally used multinomial output or mixture density networks (Bishop, 1994), recent approaches seek for more flexible family of distributions such as restricted Boltzmann machines (RBM) (Boulanger-Lewandowski et al., 2012) or variational auto-encoders (VAE) (Gregor et al., 2015; Chung et al., 2015).
22
+
23
+ On the flip side, there have been studies in introducing stochasticity to recurrent neural networks. For instance, Pachitariu & Sahani (2012) and Bayer & Osendorfer (2014) incorporated independent latent variables at each time step; while in Fraccaro et al. (2016) the RNN is attached to both latent states and observations. We note that in our approach the transition and emission are decoupled, not only for interpretability but also for efficient inference without variational assumptions.
24
+
25
+ On a related note, sequential Monte Carlo methods have recently received attention in approximating the variational objective (Maddison et al., 2017; Le et al., 2017; Naesseth et al., 2017). Despite the similarity, we emphasize that the context is different: we take a stochastic EM approach, where the full expectation in E-step is replaced by the samples from SMC. In contrast, SMC in above works is aimed at providing a tighter lower bound for the variational objective.
26
+
27
+ # 2 BACKGROUND
28
+
29
+ In this section, we provide a brief review of some key ingredients of this paper. We first describe the SSMs and the RNNs for sequence modeling, and then outline the SMC methods for sampling from a series of distributions.
30
+
31
+ # 2.1 STATE SPACE MODELS
32
+
33
+ Consider a sequence of observations $\boldsymbol { x } _ { 1 : T } = ( x _ { 1 } , \dots , x _ { T } )$ and a corresponding sequence of latent states $z _ { 1 : T } = ( z _ { 1 } , \dots , z _ { T } )$ . The SSMs are a class of graphical models that defines probabilistic dependencies between latent states and the observations. A classical example of SSM is the (Gaussian) LDS, where real-valued states evolve linearly over time under the first-order Markov assumption. Let $\boldsymbol { x } _ { t } \in \mathbb { R } ^ { d }$ and $\boldsymbol { z } _ { t } \in \mathbb { R } ^ { k }$ , the LDS can be expressed by two equations:
34
+
35
+ $$
36
+ \begin{array} { r l r } { \mathrm { ( T r a n s i t i o n ) } } & { z _ { t } = A z _ { t - 1 } + \eta , \ } & { \eta \sim \mathcal { N } ( 0 , Q ) } \\ { \mathrm { ( E m i s s i o n ) } } & { x _ { t } = C z _ { t } + \epsilon , \ } & { \epsilon \sim \mathcal { N } ( 0 , R ) , } \end{array}
37
+ $$
38
+
39
+ where $A \in \mathbb { R } ^ { k \times k }$ , $C \in \mathbb { R } ^ { d \times k }$ , and $Q$ and $R$ are covariance matrices of corresponding sizes. They are widely applied in modeling the dynamics of moving objects, with $z _ { t }$ representing the true state of the system, such as location and velocity of the object, and $x _ { t }$ being the noisy observation under zero-mean Gaussian noise.
40
+
41
+ We mention two important inference tasks (Koller & Friedman, 2009) associated with SSMs. The first tasks is filtering: at any time $t$ , compute $p ( \boldsymbol { z } _ { t } | \boldsymbol { x } _ { 1 : t } )$ , i.e. the most up-to-date belief of the state $z _ { t }$ conditioned on all past and current observations $x _ { 1 : t }$ . The other task is smoothing, which computes $p ( \boldsymbol { z } _ { t } | \boldsymbol { x } _ { 1 : T } )$ , i.e. the update to the belief of a latent state by incorporating future observations. One of the beauties of SSMs is that these inference tasks are available in closed form, thanks
42
+
43
+ # Algorithm 1 Sequential Monte Carlo
44
+
45
+ 1. Let $z _ { 0 } ^ { p } = z _ { 0 }$ and weights $\alpha _ { 0 } ^ { p } = 1 / P$ for $p = 1 , \ldots , P$ .
46
+
47
+ 2. For $t = 1 , \dots , T$
48
+
49
+ (a) Sample ancestors $a _ { t - 1 } ^ { p } \sim \alpha _ { t - 1 }$ for $p = 1 , \ldots , P$ .
50
+ (c) Set (d) Co $z _ { t } ^ { p } \sim f ( z _ { t } | z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } )$ $p = 1 , \ldots , P$ $z _ { 1 : t } ^ { p } = ( z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } , z _ { t } ^ { p } )$ $p = 1 , \ldots , P$ $\begin{array} { r } { \alpha _ { t } ^ { p } \propto \frac { \pi _ { t } ( z _ { 1 : t } ^ { p } ) } { \pi _ { t - 1 } ( z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } ) f ( z _ { t } ^ { p } | z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } ) } } \end{array}$ $p = 1 , \ldots , P$
51
+
52
+ to the simple Markovian dynamics of the latent states. For instance, the forward-backward algorithm (Stratonovich, 1960), the Kalman filter (Kalman, 1960), and RTS smoother (Rauch et al., 1965) are widely appreciated in the literature of HMM and LDS.
53
+
54
+ Having obtained the closed form filtering and smoothing equations, one can make use of the EM algorithm to find the maximum likelihood estimate (MLE) of the parameters given observations. In the case of LDS, the E-step can be computed by RTS smoother and the M-step is simple subproblems such as least-squares regression. We refer to Ghahramani & Hinton (1996) for a full exposition on learning the parameters of LDS using EM iterations.
55
+
56
+ # 2.2 RECURRENT NEURAL NETWORKS
57
+
58
+ RNNs have received remarkable attention in recent years due to their strong benchmark performance as well as successful applications in real-world problems. Unlike SSMs, RNNs aim to directly learn the complex generative distribution of $p \big ( x _ { t } | x _ { 1 : t - 1 } \big )$ using a neural network, with the help of a deterministic internal state $s _ { t }$ :
59
+
60
+ $$
61
+ p ( x _ { t } | x _ { 1 : t - 1 } ) = p ( x _ { t } ; g ( s _ { t } ) ) , \quad s _ { t } = \mathsf { R N N } ( s _ { t - 1 } , x _ { t - 1 } ) ,
62
+ $$
63
+
64
+ where $\mathsf { R N N } ( \cdot , \cdot )$ is the transition function defined by a neural network, and $g ( \cdot )$ is an arbitrary differentiable function that maps the RNN state $s _ { t }$ to the parameter of the distribution of $x _ { t }$ . The flexibility of the transformation function allows the RNN to learn from complex nonlinear nonGaussian sequences. Moreover, since the state $s _ { t }$ is a deterministic function of the past observations $x _ { 1 : t - 1 }$ , RNNs can capture long-range dependencies, for instance matching brackets in programming languages (Karpathy et al., 2015).
65
+
66
+ The BPTT algorithm can be used to find the MLE of the parameters of $\mathsf { R N N } ( \cdot , \cdot )$ and $g ( \cdot )$ . However, although RNNs can, in principle, model long-range dependencies, directly applying BPTT can be difficult in practice since the repeated application of a squashing nonlinear activation function, such as tanh or logistic sigmoid, results in an exponential decay in the error signal through time. LSTMs (Hochreiter & Schmidhuber, 1997) are designed to cope with the such vanishing gradient problems, by introducing an extra memory cell that is constructed as a linear combination of the previous state and signal from the input. In this work, we also use LSTMs as building blocks, as in Zaheer et al. (2017).
67
+
68
+ # 2.3 SEQUENTIAL MONTE CARLO
69
+
70
+ Sequential Monte Carlo (SMC) (Doucet et al., 2001) is an algorithm that samples from a series of potentially unnormalized densities $\pi _ { 1 } ( z _ { 1 } ) , . . . , \pi _ { T } ( z _ { 1 : T } )$ . At each step $t$ , SMC approximates the target density $\pi _ { t }$ with $P$ weighted particles using importance distribution $f { \big ( } z _ { t } | z _ { 1 : t - 1 } { \big ) }$ :
71
+
72
+ $$
73
+ \pi _ { t } ( z _ { 1 : t } ) \approx \hat { \pi } _ { t } ( z _ { 1 : t } ) = \sum _ { p } \alpha _ { t } ^ { p } \delta _ { z _ { 1 : t } ^ { p } } ( z _ { 1 : t } ) ,
74
+ $$
75
+
76
+ where $\alpha _ { t } ^ { p }$ is the importance weight of the $p$ -th particle and $\delta _ { x }$ is the Dirac point mass at $x$ . Repeating this approximation for every $t$ leads to the SMC method, outlined in Algorithm 1.
77
+
78
+ The key to this method lies in the resampling, which is implemented by repeatedly drawing the ancestors of particles at each step. Intuitively, it encourages the particles with a higher likelihood to survive longer, since the weight reflects the likelihood of the particle path. The final Monte Carlo estimate (4) consists of only survived particle paths, and sampling from this point masses is equivalent to choosing a particle path according to the last weights $\alpha _ { T }$ . We refer to Doucet et al. (2001); Andrieu et al. (2010) for detailed proof of the method.
79
+
80
+ ![](images/442f673772ccac3d53e3d3bb5f66cbecf4789460d88a7c98e79285a39e72b1c0.jpg)
81
+ Figure 1: Generative process of SSL.
82
+
83
+ # 3 STATE SPACE LSTM MODELS
84
+
85
+ In this section, we present the class of State Space LSTM (SSL) models that combines interpretability of SSMs and flexibility of LSTMs.
86
+
87
+ The key intuition, motivated by SSMs, is to learn dynamics in the state space, rather than in the sample space. However, we do not assume transition in the state space is linear, Gaussian, or Markovian. Existing approaches such as the extended Kalman filter (EKF) attempted to work with a general nonlinear transition function. Unfortunately, additional flexibility also introduced extra difficulty in the parameter estimation: EKF relies heavily on linearizing the nonlinear functions. We propose to use LSTM to model the dynamics in the latent state space, as they can learn from complex sequences without making limiting assumptions. The BPTT algorithm is also well established so that no additional approximation is needed in training the latent dynamics.
88
+
89
+ Generative process Let $h ( \cdot )$ be the emission function that maps a latent state to a parameter of the sample distribution. As illustrated in Figure 1 (a), the generative process of SSL for a single sequence is:
90
+
91
+ • For $t = 1 , \dots , T$ : 1. Perform LSTM transition: $\boldsymbol { s } _ { t } = \mathsf { L S T M } \left( \boldsymbol { s } _ { t - 1 } , \boldsymbol { z } _ { t - 1 } \right)$ 2. Draw latent state: $z _ { t } \sim p ( z ; g ( s _ { t } ) )$ 3. Draw observation: $x _ { t } \sim p ( x ; h ( z _ { t } ) )$
92
+
93
+ The generative process specifies the following joint likelihood, with a similar factorization as SSMs except for the Markov transition:
94
+
95
+ $$
96
+ p ( x _ { 1 : T } , z _ { 1 : T } ) = \prod _ { t = 1 } ^ { T } p _ { \omega } ( z _ { t } | z _ { 1 : t - 1 } ) p _ { \phi } ( x _ { t } | z _ { t } ) ,
97
+ $$
98
+
99
+ where $p _ { \omega } ( z _ { t } | z _ { 1 : t - 1 } ) = p ( z _ { t } ; g ( s _ { t } ) )$ , $\omega$ is the set of parameters of $\mathsf { L S T M } ( \cdot , \cdot )$ and $g ( \cdot )$ , and $\phi$ is the parameters of $h ( \cdot )$ . The structure of the likelihood function is better illustrated in Figure 1 (b), where each latent state $z _ { t }$ is dependent to all previous states $z _ { 1 : t - 1 }$ after substituting $s _ { t }$ recursively. This allows the SSL to have non-Markovian state transition, with parsimonious parameterization thanks to the recurrent structure of LSTMs.
100
+
101
+ Parameter estimation We continue with a single sequence for the ease of notation. A variational lower bound to the marginal data likelihood is given by
102
+
103
+ $$
104
+ \log p ( x _ { 1 : T } ) \geq \mathbb { E } _ { q } \left[ \log \frac { p _ { \omega } ( z _ { 1 : T } ) p _ { \phi } ( x _ { 1 : T } | z _ { 1 : T } ) } { q ( z _ { 1 : T } ) } \right] ,
105
+ $$
106
+
107
+ where $q \big ( z _ { 1 : T } \big )$ is the variational distribution. Following the (stochastic) EM approach, iteratively maximizing the lower bound w.r.t. $q$ and the model parameters $( \omega , \phi )$ leads to the following updates:
108
+
109
+ • E-step: The optimal variational distribution is given by the posterior:
110
+
111
+ $$
112
+ \begin{array} { r } { q ^ { \star } ( z _ { 1 : T } ) \propto p _ { \omega } ( z _ { 1 : T } ) p _ { \phi } ( x _ { 1 : T } | z _ { 1 : T } ) . } \end{array}
113
+ $$
114
+
115
+ In the case of LDS or HMM, efficient smoothing algorithms such as the RTS smoother or the forward-backward algorithm are available for computing the posterior expectations of sufficient statistics. However, without Markovian state transition, although the forward messages can still be computed, the backward recursion can no longer evaluated or efficiently approximated.
116
+
117
+ • S-step: Due to the difficulties in taking expectations, we take an alternative approach to collect posterior samples instead:
118
+
119
+ $$
120
+ z _ { 1 : T } ^ { \star } \sim q ^ { \star } ( z _ { 1 : T } ) ,
121
+ $$
122
+
123
+ given only the filtering equations. We discuss the posterior sampling algorithm in detail in the next section.
124
+
125
+ • M-step: Given the posterior samples $z _ { 1 : T } ^ { \star }$ , which can be seen as Monte Carlo estimate of the expectations, the subproblem for $\omega$ and $\phi$ are
126
+
127
+ $$
128
+ \omega ^ { \star } = \underset { \omega } { \mathrm { a r g m a x } } ~ \log p _ { \omega } ( z _ { 1 : T } ^ { \star } ) , \quad \phi ^ { \star } = \underset { \phi } { \mathrm { a r g m a x } } ~ \sum _ { t } \log p _ { \phi } ( x _ { t } | z _ { t } ^ { \star } ) ,
129
+ $$
130
+
131
+ which is exactly the MLE of an LSTM, with $z _ { 1 : T } ^ { \star }$ serving as the input sequence, and the MLE of the given emission model.
132
+
133
+ Having seen the generative model and the estimation algorithm, we can now discuss some instances of the proposed class of models. In particular, we provide two examples of SSL, for continuous and discrete latent states respectively.
134
+
135
+ Example 1 (Gaussian SSL) Suppose $z _ { t }$ and $x _ { t }$ are real-valued vectors. A typical choice of the transition and emission is the Gaussian distribution:
136
+
137
+ $$
138
+ \begin{array} { r l } & { p ( z _ { t } ; g ( s _ { t } ) ) = \mathcal { N } ( z _ { t } ; g _ { \mu } ( s _ { t } ) , g _ { \sigma } ( s _ { t } ) ) } \\ & { p ( x _ { t } ; h ( z _ { t } ) ) = \mathcal { N } ( x _ { t } ; h _ { \mu } ( z _ { t } ) , h _ { \sigma } ( z _ { t } ) ) , } \end{array}
139
+ $$
140
+
141
+ where $g _ { \mu } ( \cdot )$ and $g _ { \sigma } ( \cdot )$ map to the mean and the covariance of the Gaussian respectively, and similarly $h _ { \mu } ( \cdot )$ and $h _ { \sigma } ( \cdot )$ . For closed form estimates for the emission parameters, one can further assume
142
+
143
+ $$
144
+ h _ { \mu } ( z _ { t } ) = C z _ { t } + b , \quad h _ { \sigma } ( z _ { t } ) = R ,
145
+ $$
146
+
147
+ where $C$ is a matrix that maps from state space to sample space, and $R$ is the covariance matrix with appropriate size. The MLE of $\phi = ( C , b , R )$ is then given by the least squares fit.
148
+
149
+ Example 2 (Topical SSL, (Zaheer et al., 2017)) Consider $x _ { 1 : T }$ as the sequence of websites a user has visited. One might be tempted to model the user behavior using an LSTM, however due to the enormous size of the Internet, it is almost impossible to even compute a softmax output to get a discrete distribution over the websites. There are approximation methods for large vocabulary problems in RNN, such as the hierarchical softmax (Morin & Bengio, 2005). However, another interesting approach is to operate on a sequence with a “compressed” vocabulary, while learning how to perform such compression at the same time.
150
+
151
+ Let $z _ { t }$ be the indicator of a “topic”, which is a distribution over the vocabulary as in Blei et al. (2003). Accordingly, define
152
+
153
+ $$
154
+ \begin{array} { r l } & { p ( z _ { t } ; g ( s _ { t } ) ) = \mathsf { M u l t i n o m i a l } ( z _ { t } ; \mathsf { s o f t m a x } ( W s _ { t } + b ) ) } \\ & { p ( x _ { t } ; h ( z _ { t } ) ) = \mathsf { M u l t i n o m i a l } ( x _ { t } ; \phi _ { z _ { t } } ) , } \end{array}
155
+ $$
156
+
157
+ where $W$ is a matrix that maps LSTM states to latent states, $b$ is a bias term, and $\phi _ { z _ { t } }$ is a point in the probability simplex. If $z _ { t }$ lies in a lower dimension than $x _ { t }$ , the LSTM is effectively trained over a sequence $z _ { 1 : T }$ with a reduced vocabulary. On the other hand, the probabilistic mapping between $z _ { t }$ and $x _ { t }$ is interpretable, as it learns to group similar $x _ { t }$ ’s together. The estimation of $\phi$ is typically performed under a Dirichlet prior, which then corresponds to the MAP estimate of the Dirichlet distribution (Zaheer et al., 2017).
158
+
159
+ # 4 INFERENCE WITH PARTICLE GIBBS
160
+
161
+ In this section, we discuss how to draw samples from the posterior (7), corresponding to the S-step of the stochastic EM algorithm:
162
+
163
+ $$
164
+ z _ { 1 : T } ^ { \star } \sim p ( z _ { 1 : T } | x _ { 1 : T } ) = \frac { \prod _ { t } p _ { \omega } ( z _ { t } | z _ { 1 : t - 1 } ) p _ { \phi } ( x _ { t } | z _ { t } ) } { \int \prod _ { t } p _ { \omega } ( z _ { t } | z _ { 1 : t - 1 } ) p _ { \phi } ( x _ { t } | z _ { t } ) \mathrm { d } z _ { 1 : T } } .
165
+ $$
166
+
167
+ Assuming the integration and normalization can be performed efficiently, the following quantities can be evaluated in the forward pass without Markov state transition:
168
+
169
+ $$
170
+ \begin{array} { r l } & { \alpha _ { t } \equiv p ( x _ { t } | z _ { 1 : t - 1 } ) \propto \displaystyle \int p _ { \omega } ( z _ { t } | z _ { 1 : t - 1 } ) p _ { \phi } ( x _ { t } | z _ { t } ) \mathrm { d } z _ { t } } \\ & { \gamma _ { t } \equiv p ( z _ { t } | z _ { 1 : t - 1 } , x _ { t } ) \propto p _ { \omega } ( z _ { t } | z _ { 1 : t - 1 } ) p _ { \phi } ( x _ { t } | z _ { t } ) . } \end{array}
171
+ $$
172
+
173
+ The task is to draw from the joint posterior of $z _ { 1 : T }$ only given access to these forward messages.
174
+
175
+ One way to circumvent the tight dependencies in $z _ { 1 : T }$ is to make a factorization assumption, as in Zaheer et al. (2017). More concretely, the joint distribution is decomposed as
176
+
177
+ (factorization assumption)
178
+
179
+ $$
180
+ p ( z _ { 1 : T } | x _ { 1 : T } ) \propto \prod _ { t } p _ { \omega } ( z _ { t } | z _ { 1 : t - 1 } ^ { \mathrm { p r e v } } ) p _ { \phi } ( x _ { t } | z _ { t } ) ,
181
+ $$
182
+
183
+ where $z _ { 1 : t - 1 } ^ { \mathrm { p r e v } }$ is the assignments from the previous inference step. However, as we confirm in the experiments, this assumption can be restrictive since the flexibility of LSTM state transitions is offset by considering each time step independently.
184
+
185
+ In this work, we propose to use a method based on SMC, which is a principled way of sampling from a sequence of distributions. More importantly, it does not require the model to be Markovian (Frigola et al., 2013; Lindsten et al., 2014). As described earlier, the idea is to approximate the posterior (15) with point masses, i.e., weighted particles. Let $f ( \boldsymbol { z } _ { t } | \boldsymbol { z } _ { 1 : t - 1 } , \boldsymbol { x } _ { t } )$ be the importance density, and $P$ be the number of particles. We then can run Algorithm 1 with $\pi _ { t } ( z _ { 1 : t } ) \stackrel { - } { = } p ( x _ { 1 : t } , z _ { 1 : t } )$ being the unnormalized target distribution at time $t$ , where the weight becomes
186
+
187
+ $$
188
+ \alpha _ { t } ^ { p } \propto \frac { p ( z _ { 1 : t } ^ { p } , x _ { 1 : t } ) } { p ( z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } , x _ { 1 : t - 1 } ) f ( z _ { t } ^ { p } | z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } , x _ { t } ) } = \frac { p _ { \omega } ( z _ { t } ^ { p } | z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } ) p _ { \phi } ( x _ { t } | z _ { t } ^ { p } ) } { f ( z _ { t } ^ { p } | z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } , x _ { t } ) } .
189
+ $$
190
+
191
+ As for the choice of the proposal distribution $f ( \cdot )$ , one could use the transition density $p _ { \omega } \big ( z _ { t } | z _ { 1 : t - 1 } \big )$ , in which case the algorithm is also referred to as the bootstrap particle filter. An alternative is the predictive distribution, a locally optimal proposal in terms of variance (Andrieu et al., 2010):
192
+
193
+ $$
194
+ f ^ { \star } ( z _ { t } | z _ { 1 : t - 1 } , x _ { t } ) = \frac { p _ { \omega } ( z _ { t } | z _ { 1 : t - 1 } ) p _ { \phi } ( x _ { t } | z _ { t } ) } { \int p _ { \omega } ( z _ { t } | z _ { 1 : t - 1 } ) p _ { \phi } ( x _ { t } | z _ { t } ) \mathrm { d } z _ { t } } ,
195
+ $$
196
+
197
+ which is precisely one of the available forward messages:
198
+
199
+ $$
200
+ \gamma _ { t } ^ { p } = f ^ { \star } ( z _ { t } | z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } , x _ { t } ) .
201
+ $$
202
+
203
+ Notice the similarity between terms in (19) and (20). Indeed, with the choice of predictive distribution as the proposal density, the importance weight simplifies to
204
+
205
+ $$
206
+ \alpha _ { t } ^ { p } \propto \tilde { \alpha } _ { t } ^ { p } = \int p _ { \omega } ( z _ { t } | z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } ) p _ { \phi } ( x _ { t } | z _ { t } ) \mathrm { d } z _ { t } , ,
207
+ $$
208
+
209
+ which is not a coincidence that the name collides with the message $\alpha _ { t }$ . Interestingly, this quantity no longer depends on the current particle $z _ { t } ^ { p }$ . Instead, it marginalizes over all possible particle assignments of the current time step. This is beneficial computationally since the intermediate terms from (20) can be reused in (22). Also note that the optimal proposal relies on the fact that the normalization in (20) can be performed efficiently, otherwise the bootstrap proposal should be used.
210
+
211
+ After a full pass over the sequence, the algorithm produces Monte Carlo approximation of the posterior and the marginal likelihood:
212
+
213
+ $$
214
+ \hat { p } ( z _ { 1 : T } | x _ { 1 : T } ) = \sum _ { p } \alpha _ { T } ^ { p } \delta _ { z _ { 1 : T } ^ { p } } \left( z _ { 1 : T } \right) , \quad \hat { p } ( x _ { 1 : T } ) = \prod _ { t } \frac { 1 } { P } \sum _ { p } \tilde { \alpha } _ { t } ^ { p } .
215
+ $$
216
+
217
+ # Algorithm 2 Inference with Particle Gibbs
218
+
219
+ 1. Let $z _ { 0 } ^ { p } = z _ { 0 }$ and $\alpha _ { 0 } ^ { p } = 1 / P$ for $p = 1 , \ldots , P$ .
220
+
221
+ 2. For $t = 1 , \dots , T$
222
+
223
+ (a) Fix reference path: set $a _ { t - 1 } ^ { 1 } = 1$ and $z _ { 1 : t } ^ { 1 } = z _ { 1 : t } ^ { \star }$ from previous iteration.
224
+ (b) Sample ancestors $a _ { t - 1 } ^ { p } \sim \alpha _ { t - 1 }$ for $p = 2 , \ldots , P$ .
225
+ (c) Sample particles $z _ { t } ^ { p } \sim \gamma _ { t } ^ { p }$ and set $z _ { 1 : t } ^ { p } = ( z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } , z _ { t } ^ { p } )$ for $p = 2 , \ldots , P$ .
226
+ (d) Compute normalized weights $\alpha _ { t } ^ { p }$ for $p = 1 , \ldots , P$ .
227
+
228
+ 3. Sample $r \sim \alpha _ { T }$ , return the particle path $z _ { 1 : T } ^ { a _ { T } ^ { r } }$
229
+
230
+ The inference is completed by a final draw from the approximate posterior,
231
+
232
+ $$
233
+ z _ { 1 : T } ^ { \star } \sim \hat { p } \big ( z _ { 1 : T } | x _ { 1 : T } \big ) ,
234
+ $$
235
+
236
+ which is essentially sampling a particle path indexed by the last particle. Specifically, the last particle $z _ { T } ^ { p }$ is chosen according to the final weights $\alpha _ { T }$ , and then earlier particles can be obtained by tracing backwards to the beginning of the sequence according to the ancestry indicators $a _ { t } ^ { p }$ at each position.
237
+
238
+ Since SMC produces a Monte Carlo estimate, as the number of particles $P \to \infty$ the approximate posterior (23) is guaranteed to converge to the true posterior for a fixed sequence. However, as the length of the sequence $T$ increases, the number of particles needed to provide a good approximation grows exponentially. This is the well-known depletion problem of SMC (Andrieu et al., 2010).
239
+
240
+ One elegant way to avoid simulating enormous number of particles is to marry the idea of MCMC with SMC (Andrieu et al., 2010). The idea of such Particle MCMC (PMCMC) methods is to treat the particle estimate $\hat { p } ( \cdot )$ as a proposal, and design a Markov kernel that leaves the target distribution invariant. Since the invariance is ensured by the MCMC, it does not demand SMC to provide an accurate approximation to the true distribution, but only to give samples that are approximately distributed according to the target. As a result, for any fixed $P > 0$ the PMCMC methods ensure the target distribution is invariant.
241
+
242
+ We choose the Gibbs kernel that requires minimal modification from the basic SMC. The resulting algorithm is Particle Gibbs (PG), which is a conditional SMC update in a sense that a reference path $z _ { 1 : T } ^ { \mathrm { r e f } }$ with its ancestral lineage is fixed throughout the particle propagation of SMC. It can be shown that this simple modification to SMC produces a transition kernel that is not only invariant, but also ergodic under mild assumptions. In practice, we use the assignments from previous step as the reference path. The final algorithm is summarized in Algorithm 2. Combined with the stochastic EM outer iteration, the final algorithm is an instance of the particle SAEM (Lindsten, 2013; Schon¨ et al., 2015), under non-Markovian state transition.
243
+
244
+ We conclude this section by deriving forward messages for the previous examples.
245
+
246
+ Example 1 (Gaussian SSL, continued) The integration and normalization preserves normality thanks to the Gaussian identify. The messages are given by
247
+
248
+ $$
249
+ \begin{array} { r l } & { \alpha _ { t } = \mathcal { N } \left( x _ { t } ; C g _ { \mu } ( s _ { t } ) + b , R + C [ g _ { \sigma } ( s _ { t } ) ] ^ { - 1 } C ^ { T } \right) } \\ & { \gamma _ { t } = \mathcal { N } \left( z _ { t } ; V \left( C ^ { T } R ^ { - 1 } ( x _ { t } - b ) + [ g _ { \sigma } ( s _ { t } ) ] ^ { - 1 } g _ { \mu } ( s _ { t } ) \right) , V \right) , } \end{array}
250
+ $$
251
+
252
+ where $V = \left( [ g _ { \sigma } ( s _ { t } ) ] ^ { - 1 } + C ^ { T } R ^ { - 1 } C \right) ^ { - 1 }$
253
+
254
+ Example 2 (Topical SSL, continued) Let $\theta _ { t } = \mathsf { s o f t m a x } ( W s _ { t } + b )$ . Since the distributions are discrete, we have
255
+
256
+ $$
257
+ \begin{array} { r } { \alpha _ { t } \propto \left. \theta _ { t } , \phi _ { x _ { t } } \right. , \quad \gamma _ { t } \propto \theta _ { t } \circ \phi _ { x _ { t } } , } \end{array}
258
+ $$
259
+
260
+ where $\circ$ denotes element-wise product. Note that the integration for $\alpha _ { t }$ corresponds to a summation in the state space. It is then normalized across $P$ particles to form a weight distribution. For $\gamma _ { t }$ the normalization is performed in the state space as well, hence the computation of the messages are manageable.
261
+
262
+ ![](images/c389f9d873dbf3528420ad348381281516867b0bc9855eecef7c4129be37985b.jpg)
263
+ Figure 2: Tracking a synthetic trajectory. Top row: true trajectory and noisy observations. Middle row: training/testing performance of LSTM. Bottom row: training/testing performance of SSL.
264
+
265
+ # 5 EXPERIMENTS
266
+
267
+ We now present empirical studies for our proposed model and inference (denoted as SMC) in order to establish that (1) SSL is flexible in capturing underlying nonlinear dynamics, (2) our inference is accurate yet easily applicable to complicated models, and (3) it opens new avenues for interpretable yet nonlinear and non-Markovian sequence models, previously unthinkable. To illustrate these claims, we evaluate on (1) synthetic sequence tracking of varying difficulties, (2) language modeling, and (3) user modeling utilizing complicated models for capturing the intricate dynamics. For SMC inference, we gradually increase the number of particles $P$ from 1 to $K$ during training.
268
+
269
+ Software & hardware All the algorithms are implemented on TensorFlow (Abadi et al., 2016). We run our experiments on a commodity machine with Intel
270
+
271
+ # 5.1 SYNTHETIC SEQUENCE TRACKING
272
+
273
+ To test the flexibility of SSL, we begin with inference using synthetic data. We consider four different dynamics in 2D space: (i) a straight line, (ii) a sine wave, (iii) a circle, and (iv) a swiss role. Note that we do not add additional states such as velocity, keeping the dynamics nonlinear except for the first case. Data points are generated by adding zero mean Gaussian noise to the true underlying dynamics. The true dynamics and the noisy observations are plotted in the top row of Figure 2. The first $60 \%$ of the sequence is used for training and the rest is left for testing.
274
+
275
+ The middle and bottom row of Figure 2 show the result of SSL and vanilla LSTM trained for same number of iterations until both are sufficiently converged. The red points refer to the prediction of $z _ { t }$ after observing $x _ { 1 : t }$ , and the green points are blind predictions without observing any data. We can observe that while both methods are capturing the dynamics well in general, the predictions of LSTM tend to be more sensitive to initial predictions. In contrast, even when the initial predictions are not incorrect, SSL can recover in the end by remaining on the latent dynamic.
276
+
277
+ # 5.2 LANGUAGE MODELING
278
+
279
+ For Topical SSL, we compare our SMC inference method with the factored old algorithm (Zaheer et al., 2017) on the publicly available Wikipedia dataset, where documents with less than 500 words are excluded and the most frequent $2 0 0 \mathrm { k }$ word types are retained. We train on the first $60 \%$ of the documents and test on the rest, using the same settings in Zaheer et al. (2017). Figure 3 shows the test perplexity (lower is better) and number of nonzeros in the learned word topic count matrix (lower is better). In all cases, the SMC inference method consistently outperforms the old factored method. For comparison, we also run LSTM with the same number of parameters, which gives the lowest test perplexity of 1942.26. However, we note that LSTM needs to perform expensive linear transformation for both embedding and softmax at every step, which depends linearly on the vocabulary size $V$ . In contrast, SSL only depends linearly on number of topics $K \ll V$ .
280
+
281
+ ![](images/0c177253ec0fa3f9b37445f369bed90a7cc1bf22a44e3659e7e2d49ed6e251a6.jpg)
282
+ Figure 3: Comparison of the new inference method based on SMC to the older one assuming factored model. The top row represents perplexity on the held out set and the lower row represents the non zero entries in the word-topic count matrix. Lower perplexity indicates a better fit to the data and lower NNZ results in a sparser model and usually having better generalization.
283
+
284
+ Ablation study We also want to explore the benefit of the newer inference as dataset size increases. We observe that in case of natural languages which are highly structured the gap between factored approximation and accurate SMC keeps reducing as dataset size increases. But as we will see in case of user modeling when the dataset is less structured, the factored as
285
+
286
+ ![](images/c781e093801aa6ca163e3cfd923825e549e0a8c317268fc40d76c6def88f5fb6.jpg)
287
+ Figure 4: Comparison between SMC and factored algorithm bysumption leads to poorer perforvarying number of topics and documentsmance. Also when the data size is fixed and the number of topics are varying, the SMC algorithm gives better perplexity compared to the old algorithm. Therefore we the SMC inference is consistently better in various settings.
288
+
289
+ Visualizing particle paths In Figure 5, we show the particle paths on a snippet of an article about a music album 1. As we can see from the top row, which plots the particle paths at the initial iteration, the model proposed a number of candidate topic sequences since it is uncertain about the latent semantics yet. However, after 100 epochs, as we can see from the bottom row, the model is much more confident about the underlying topical transition. Moreover, by inspecting the learned parameters $\phi$ of the probabilistic emission, we can see that the topics are highly concentrated on topics related to music and time. This confirms our claim about flexible sequence modeling while retaining interpretability.
290
+
291
+ ![](images/d05a137be6025677c0f4232c7cc46782d72893ccaae0dacc34808e142402d1ff.jpg)
292
+ Figure 5: Particle paths of a document about a music album. Top row: at epoch 1. Bottom row: at epoch 100. After epoch 100 the document has converged to a sparse set of relevant topics.
293
+
294
+ # 5.3 USER MODELING
295
+
296
+ We use an anonymized sample of user search click history to measure the accuracy of different models on predicting users future clicks. An accurate model would enable better user experience by presenting the user with relevant content. The dataset is anonymized by removing all items appearing less than a given threshold, this results in a dataset with 100K vocabulary and we vary the number of users from 500K to 1M.
297
+
298
+ We fix the number of topics at 500 for all user experiments. We used the same setup to the one used in the experiments over the Wikipedia dataset for parameters. The dataset is less structured than the language modeling task since users click patterns are less predictable than the sequence of words which follow definite syntactic rules. As shown in table 1, the benefit of new inference method is highlighted as it yields much lower perplexity than the factored model.
299
+
300
+ Table 1: Comparison on user data
301
+
302
+ <table><tr><td rowspan="2">Algorithm</td><td colspan="2">#Users</td></tr><tr><td>500k</td><td>1M</td></tr><tr><td>Factored</td><td>2430</td><td>2254</td></tr><tr><td>SMC</td><td>1464</td><td>1447</td></tr></table>
303
+
304
+ # 6 DISCUSSIONS & CONCLUSION
305
+
306
+ In this paper we revisited the problem of posterior inference in Latent LSTM models as introduced in Zaheer et al. (2017). We generalized their model to accommodate a wide variety of state space models and most importantly we provided a more principled Sequential Monte-Carlo (SMC) algorithm for posterior inference. Although the newly proposed inference method can be slower, we showed over a variety of dataset that the new SMC based algorithm is far superior and more stable. While computation of the new SMC algorithm scales linearly with the number of particles, this can be naively parallelized. In the future we plan to extend our work to incorporate a wider class of dynamically changing structured objects such as time-evolving graphs.
307
+
308
+ # REFERENCES
309
+
310
+ Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, and Others. TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems. arXiv preprint arXiv:1603.04467, 2016.
311
+
312
+ Christophe Andrieu, Arnaud Doucet, and Roman Holenstein. Particle Markov chain Monte Carlo methods. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 72(3):269– 342, 2010.
313
+
314
+ Evan Archer, Il Memming Park, Lars Buesing, John P. Cunningham, and Liam Paninski. Black box variational inference for state space models. arXiv preprint arXiv:1511.07367, 2015.
315
+
316
+ Justin Bayer and Christian Osendorfer. Learning Stochastic Recurrent Networks. arXiv preprint arXiv:1411.7610, 2014.
317
+
318
+ Christopher M. Bishop. Mixture Density Networks. Technical report, 1994.
319
+
320
+ David M. Blei, Andrew Y. $\mathrm { N g }$ , and Michael I. Jordan. Latent Dirichlet Allocation. Journal of Machine Learning Research, 3:993–1022, 2003. ISSN 15324435.
321
+
322
+ Nicolas Boulanger-Lewandowski, Yoshua Bengio, and Pascal Vincent. Modeling Temporal Dependencies in High-Dimensional Sequences: Application to Polyphonic Music Generation and Transcription. In ICML, 2012.
323
+
324
+ Junyoung Chung, Kyle Kastner, Laurent Dinh, Kratarth Goel, Aaron Courville, and Yoshua Bengio. A Recurrent Latent Variable Model for Sequential Data. In NIPS, 2015.
325
+
326
+ Arnaud Doucet, Nando de Freitas, and Neil Gordon. Sequential Monte Carlo Methods in Practice. Springer, 2001.
327
+
328
+ Marco Fraccaro, Søren Kaae Sønderby, Ulrich Paquet, and Ole Winther. Sequential Neural Models with Stochastic Layers. In NIPS, 2016.
329
+
330
+ Roger Frigola, Fredrik Lindsten, Thomas B. Schon, and Carl E. Rasmussen. Bayesian Inference and ¨ Learning in Gaussian Process State-Space Models with Particle MCMC. In NIPS, 2013.
331
+
332
+ Zoubin Ghahramani and Geoffrey E. Hinton. Parameter estimation for linear dynamical systems. Technical report, 1996.
333
+
334
+ Zoubin Ghahramani and Sam T. Roweis. Learning Nonlinear Dynamical Systems using an EM Algorithm. In NIPS, 1999.
335
+
336
+ Karol Gregor, Ivo Danihelka, Alex Graves, Danilo Jimenez Rezende, and Daan Wierstra. DRAW: A Recurrent Neural Network For Image Generation. In ICML, 2015.
337
+
338
+ Sepp Hochreiter and Jurgen Schmidhuber. Long Short-Term Memory. ¨ Neural Computation, 9(8): 1735–1780, 1997.
339
+
340
+ Matthew J. Johnson, David Duvenaud, Alexander B. Wiltschko, Sandeep R. Datta, and Ryan P. Adams. Composing graphical models with neural networks for structured representations and fast inference. In NIPS, 2016.
341
+
342
+ Simon J. Julier and Jeffrey K. Uhlmann. A new extension of the Kalman filter to nonlinear systems. In Int. symp. aerospace/defense sensing, simul. and controls1, 1997.
343
+
344
+ Rudolph Emil Kalman. A New Approach to Linear Filtering and Prediction Problems. Journal of Basic Engineering, 82(1):35–45, 1960. ISSN 00219223.
345
+
346
+ Maximilian Karl, Maximilian Soelch, Justin Bayer, and Patrick van der Smagt. Deep variational Bayes filters: Unsupervised learning of state space models from raw data. In ICLR, 2017.
347
+
348
+ Andrej Karpathy, Justin Johnson, and Li Fei-Fei. Visualizing and understanding recurrent networks. arXiv preprint arXiv:1506.02078, 2015.
349
+
350
+ Diederik P. Kingma and Max Welling. Auto-Encoding Variational Bayes. In ICLR, 2014.
351
+
352
+ Daphne Koller and Nir Friedman. Probabilistic Graphical Models: Principles and Techniques. MIT Press, 2009.
353
+ Rahul G. Krishnan, Uri Shalit, and David Sontag. Deep Kalman Filters. arXiv preprint arXiv:1511.05121, 2015.
354
+ Rahul G. Krishnan, Uri Shalit, and David Sontag. Structured Inference Networks for Nonlinear State Space Models. In AAAI, 2017.
355
+ Tuan Anh Le, Maximilian Igl, Tom Jin, Tom Rainforth, and Frank Wood. Auto-Encoding Sequential Monte Carlo. arXiv preprint arXiv:1705.10306, 2017.
356
+ Fredrik Lindsten. An efficient stochastic approximation EM algorithm using conditional particle filters. In ICASSP, 2013.
357
+ Fredrik Lindsten, Michael I. Jordan, and Thomas B. Schon. Particle Gibbs with Ancestor Sampling. ¨ Journal of Machine Learning Research, 15(1):2145–2184, 2014. ISSN 10495258.
358
+ Chris J. Maddison, Dieterich Lawson, George Tucker, Nicolas Heess, Mohammad Norouzi, Andriy Mnih, Arnaud Doucet, and Yee Whye Teh. Filtering Variational Objectives. In NIPS, 2017.
359
+ Frederic Morin and Yoshua Bengio. Hierarchical probabilistic neural network language model. In AISTATS, 2005.
360
+ Christian A. Naesseth, Scott W. Linderman, Rajesh Ranganath, and David M. Blei. Variational Sequential Monte Carlo. arXiv preprint arXiv:1705.11140, 2017.
361
+ Marius Pachitariu and Maneesh Sahani. Learning visual motion in recurrent neural networks. In NIPS, 2012.
362
+ Herbert E. Rauch, F. Tung, and Charlotte T. Striebel. Maximum likelihood estimates of linear dynamic systems. AIAA Journal, 3(8):1445–1450, 1965. ISSN 0001-1452.
363
+ Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic Backpropagation and Approximate Inference in Deep Generative Models. In ICML, 2014.
364
+ Thomas B. Schon, Fredrik Lindsten, Johan Dahlin, Johan W ¨ agberg, Christian A. Naesseth, Andreas ˚ Svensson, and Liang Dai. Sequential Monte Carlo Methods for System Identification. In IFAC Symposium on System Identification (SYSID), 2015.
365
+ Ruslan L. Stratonovich. Conditional markov processes. Theory of Probability and Its Applications, 5(2):156–178, 1960.
366
+ Manzil Zaheer, Amr Ahmed, and Alexander J. Smola. Latent LSTM Allocation: Joint Clustering and Non-Linear Dynamic Modeling of Sequence Data. In ICML, 2017.
parse/train/r1drp-WCZ/r1drp-WCZ_content_list.json ADDED
@@ -0,0 +1,1760 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "STATE SPACE LSTM MODELS WITH PARTICLE MCMC INFERENCE ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 99,
9
+ 534,
10
+ 137
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 162,
20
+ 398,
21
+ 189
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 227,
32
+ 544,
33
+ 241
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Long Short-Term Memory (LSTM) is one of the most powerful sequence models. Despite the strong performance, however, it lacks the nice interpretability as in state space models. In this paper, we present a way to combine the best of both worlds by introducing State Space LSTM (SSL) models that generalizes the earlier work Zaheer et al. (2017) of combining topic models with LSTM. However, unlike Zaheer et al. (2017), we do not make any factorization assumptions in our inference algorithm. We present an efficient sampler based on sequential Monte Carlo (SMC) method that draws from the joint posterior directly. Experimental results confirms the superiority and stability of this SMC inference algorithm on a variety of domains. ",
40
+ "bbox": [
41
+ 233,
42
+ 258,
43
+ 764,
44
+ 393
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 424,
55
+ 336,
56
+ 440
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "State space models (SSMs), such as hidden Markov models (HMM) and linear dynamical systems (LDS), have been the workhorse of sequence modeling in the past decades From a graphical model perspective, efficient message passing algorithms (Stratonovich, 1960; Kalman, 1960) are available in compact closed form thanks to their simple linear Markov structure. However, simplicity comes at a cost: real world sequences can have long-range dependencies that cannot be captured by Markov models; and the linearity of transition and emission restricts the flexibility of the model for complex sequences. ",
63
+ "bbox": [
64
+ 174,
65
+ 457,
66
+ 823,
67
+ 551
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "A popular alternative is the recurrent neural networks (RNN), for instance the Long Short-Term Memory (LSTM) (Hochreiter & Schmidhuber, 1997) which has become a standard for sequence modeling nowadays. Instead of associating the observations with stochastic latent variables, RNN directly defines the distribution of each observation conditioned on the past, parameterized by a neural network. The recurrent parameterization not only allows RNN to provide a rich function class, but also permits scalable stochastic optimization such as the backpropagation through time (BPTT) algorithm. However, flexibility does not come for free as well: due to the complex form of the transition function, the hidden states of RNN are often hard to interpret. Moreover, it can require large amount of parameters for seemingly simple sequence models (Zaheer et al., 2017). ",
74
+ "bbox": [
75
+ 174,
76
+ 559,
77
+ 825,
78
+ 680
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "In this paper, we propose a new class of models State Space LSTM (SSL) that combines the best of both worlds. We show that SSLs can handle nonlinear, non-Markovian dynamics like RNNs, while retaining the probabilistic interpretations of SSMs. The intuition, in short, is to separate the state space from the sample space. In particular, instead of directly estimating the dynamics from the observed sequence, we focus on modeling the sequence of latent states, which may represent the true underlying dynamics that generated the noisy observations. Unlike SSMs, where the same goal is pursued under linearity and Markov assumption, we alleviate the restriction by directly modeling the transition function between states parameterized by a neural network. On the other hand, we bridge the state space and the sample space using classical probabilistic relation, which not only brings additional interpretability, but also enables the LSTM to work with more structured representation rather than the noisy observations. ",
85
+ "bbox": [
86
+ 174,
87
+ 686,
88
+ 825,
89
+ 834
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Indeed, parameter estimation of such models can be nontrivial. Since the LSTM is defined over a sequence of latent variables rather than observations, it is not straightforward to apply the usual BPTT algorithm without making variational approximations. In Zaheer et al. (2017), which is an instance of SSL, an EM-type approach was employed: the algorithm alternates between imputing the latent states and optimizing the LSTM over the imputed sequences. However, as we show below, the inference implicitly assumes the posterior is factorizable through time. This is a restrictive assumption since the benefit of rich state transition brought by the LSTM may be neutralized by breaking down the posterior over time. ",
96
+ "bbox": [
97
+ 174,
98
+ 842,
99
+ 823,
100
+ 897
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "",
107
+ "bbox": [
108
+ 174,
109
+ 103,
110
+ 823,
111
+ 157
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "We present a general parameter estimation scheme for the proposed class of models based on sequential Monte Carlo (SMC) (Doucet et al., 2001), in particular the Particle Gibbs (Andrieu et al., 2010). Instead of sampling each time point individually, we directly sample from the joint posterior without making limiting factorization assumptions. Through extensive experiments we verify that sampling from the full posterior leads to significant improvement in the performance. ",
118
+ "bbox": [
119
+ 174,
120
+ 165,
121
+ 823,
122
+ 233
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "Related works Enhancing state space models using neural networks is not a new idea. Traditional approaches can be traced back to nonlinear extensions of linear dynamical systems, such as extended or unscented Kalman filters (Julier & Uhlmann, 1997), where both state transition and emission are generalized to nonlinear functions. The idea of parameterizing them with neural networks can be found in Ghahramani & Roweis (1999), as well as many recent works (Krishnan et al., 2015; Archer et al., 2015; Johnson et al., 2016; Krishnan et al., 2017; Karl et al., 2017) thanks to the development of recognition networks (Kingma & Welling, 2014; Rezende et al., 2014). Enriching the output distribution of RNN has also regain popularity recently. Unlike conventionally used multinomial output or mixture density networks (Bishop, 1994), recent approaches seek for more flexible family of distributions such as restricted Boltzmann machines (RBM) (Boulanger-Lewandowski et al., 2012) or variational auto-encoders (VAE) (Gregor et al., 2015; Chung et al., 2015). ",
129
+ "bbox": [
130
+ 174,
131
+ 247,
132
+ 825,
133
+ 396
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "On the flip side, there have been studies in introducing stochasticity to recurrent neural networks. For instance, Pachitariu & Sahani (2012) and Bayer & Osendorfer (2014) incorporated independent latent variables at each time step; while in Fraccaro et al. (2016) the RNN is attached to both latent states and observations. We note that in our approach the transition and emission are decoupled, not only for interpretability but also for efficient inference without variational assumptions. ",
140
+ "bbox": [
141
+ 174,
142
+ 402,
143
+ 825,
144
+ 470
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "On a related note, sequential Monte Carlo methods have recently received attention in approximating the variational objective (Maddison et al., 2017; Le et al., 2017; Naesseth et al., 2017). Despite the similarity, we emphasize that the context is different: we take a stochastic EM approach, where the full expectation in E-step is replaced by the samples from SMC. In contrast, SMC in above works is aimed at providing a tighter lower bound for the variational objective. ",
151
+ "bbox": [
152
+ 174,
153
+ 477,
154
+ 825,
155
+ 546
156
+ ],
157
+ "page_idx": 1
158
+ },
159
+ {
160
+ "type": "text",
161
+ "text": "2 BACKGROUND ",
162
+ "text_level": 1,
163
+ "bbox": [
164
+ 176,
165
+ 565,
166
+ 326,
167
+ 580
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "In this section, we provide a brief review of some key ingredients of this paper. We first describe the SSMs and the RNNs for sequence modeling, and then outline the SMC methods for sampling from a series of distributions. ",
174
+ "bbox": [
175
+ 174,
176
+ 595,
177
+ 825,
178
+ 637
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "text",
184
+ "text": "2.1 STATE SPACE MODELS ",
185
+ "text_level": 1,
186
+ "bbox": [
187
+ 176,
188
+ 654,
189
+ 367,
190
+ 667
191
+ ],
192
+ "page_idx": 1
193
+ },
194
+ {
195
+ "type": "text",
196
+ "text": "Consider a sequence of observations $\\boldsymbol { x } _ { 1 : T } = ( x _ { 1 } , \\dots , x _ { T } )$ and a corresponding sequence of latent states $z _ { 1 : T } = ( z _ { 1 } , \\dots , z _ { T } )$ . The SSMs are a class of graphical models that defines probabilistic dependencies between latent states and the observations. A classical example of SSM is the (Gaussian) LDS, where real-valued states evolve linearly over time under the first-order Markov assumption. Let $\\boldsymbol { x } _ { t } \\in \\mathbb { R } ^ { d }$ and $\\boldsymbol { z } _ { t } \\in \\mathbb { R } ^ { k }$ , the LDS can be expressed by two equations: ",
197
+ "bbox": [
198
+ 173,
199
+ 679,
200
+ 825,
201
+ 747
202
+ ],
203
+ "page_idx": 1
204
+ },
205
+ {
206
+ "type": "equation",
207
+ "img_path": "images/276a70eadd7403d62d01155bb49222a5ca1fdb89112bb6fd8bb38f52e7e9b235.jpg",
208
+ "text": "$$\n\\begin{array} { r l r } { \\mathrm { ( T r a n s i t i o n ) } } & { z _ { t } = A z _ { t - 1 } + \\eta , \\ } & { \\eta \\sim \\mathcal { N } ( 0 , Q ) } \\\\ { \\mathrm { ( E m i s s i o n ) } } & { x _ { t } = C z _ { t } + \\epsilon , \\ } & { \\epsilon \\sim \\mathcal { N } ( 0 , R ) , } \\end{array}\n$$",
209
+ "text_format": "latex",
210
+ "bbox": [
211
+ 339,
212
+ 751,
213
+ 655,
214
+ 789
215
+ ],
216
+ "page_idx": 1
217
+ },
218
+ {
219
+ "type": "text",
220
+ "text": "where $A \\in \\mathbb { R } ^ { k \\times k }$ , $C \\in \\mathbb { R } ^ { d \\times k }$ , and $Q$ and $R$ are covariance matrices of corresponding sizes. They are widely applied in modeling the dynamics of moving objects, with $z _ { t }$ representing the true state of the system, such as location and velocity of the object, and $x _ { t }$ being the noisy observation under zero-mean Gaussian noise. ",
221
+ "bbox": [
222
+ 174,
223
+ 794,
224
+ 823,
225
+ 848
226
+ ],
227
+ "page_idx": 1
228
+ },
229
+ {
230
+ "type": "text",
231
+ "text": "We mention two important inference tasks (Koller & Friedman, 2009) associated with SSMs. The first tasks is filtering: at any time $t$ , compute $p ( \\boldsymbol { z } _ { t } | \\boldsymbol { x } _ { 1 : t } )$ , i.e. the most up-to-date belief of the state $z _ { t }$ conditioned on all past and current observations $x _ { 1 : t }$ . The other task is smoothing, which computes $p ( \\boldsymbol { z } _ { t } | \\boldsymbol { x } _ { 1 : T } )$ , i.e. the update to the belief of a latent state by incorporating future observations. One of the beauties of SSMs is that these inference tasks are available in closed form, thanks ",
232
+ "bbox": [
233
+ 174,
234
+ 854,
235
+ 823,
236
+ 924
237
+ ],
238
+ "page_idx": 1
239
+ },
240
+ {
241
+ "type": "text",
242
+ "text": "Algorithm 1 Sequential Monte Carlo ",
243
+ "text_level": 1,
244
+ "bbox": [
245
+ 176,
246
+ 103,
247
+ 421,
248
+ 118
249
+ ],
250
+ "page_idx": 2
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "1. Let $z _ { 0 } ^ { p } = z _ { 0 }$ and weights $\\alpha _ { 0 } ^ { p } = 1 / P$ for $p = 1 , \\ldots , P$ . ",
255
+ "bbox": [
256
+ 212,
257
+ 122,
258
+ 588,
259
+ 140
260
+ ],
261
+ "page_idx": 2
262
+ },
263
+ {
264
+ "type": "text",
265
+ "text": "2. For $t = 1 , \\dots , T$ ",
266
+ "bbox": [
267
+ 212,
268
+ 142,
269
+ 349,
270
+ 156
271
+ ],
272
+ "page_idx": 2
273
+ },
274
+ {
275
+ "type": "text",
276
+ "text": "(a) Sample ancestors $a _ { t - 1 } ^ { p } \\sim \\alpha _ { t - 1 }$ for $p = 1 , \\ldots , P$ . \n(c) Set (d) Co $z _ { t } ^ { p } \\sim f ( z _ { t } | z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } )$ $p = 1 , \\ldots , P$ $z _ { 1 : t } ^ { p } = ( z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } , z _ { t } ^ { p } )$ $p = 1 , \\ldots , P$ $\\begin{array} { r } { \\alpha _ { t } ^ { p } \\propto \\frac { \\pi _ { t } ( z _ { 1 : t } ^ { p } ) } { \\pi _ { t - 1 } ( z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } ) f ( z _ { t } ^ { p } | z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } ) } } \\end{array}$ $p = 1 , \\ldots , P$ ",
277
+ "bbox": [
278
+ 236,
279
+ 160,
280
+ 794,
281
+ 257
282
+ ],
283
+ "page_idx": 2
284
+ },
285
+ {
286
+ "type": "text",
287
+ "text": "to the simple Markovian dynamics of the latent states. For instance, the forward-backward algorithm (Stratonovich, 1960), the Kalman filter (Kalman, 1960), and RTS smoother (Rauch et al., 1965) are widely appreciated in the literature of HMM and LDS. ",
288
+ "bbox": [
289
+ 176,
290
+ 290,
291
+ 823,
292
+ 332
293
+ ],
294
+ "page_idx": 2
295
+ },
296
+ {
297
+ "type": "text",
298
+ "text": "Having obtained the closed form filtering and smoothing equations, one can make use of the EM algorithm to find the maximum likelihood estimate (MLE) of the parameters given observations. In the case of LDS, the E-step can be computed by RTS smoother and the M-step is simple subproblems such as least-squares regression. We refer to Ghahramani & Hinton (1996) for a full exposition on learning the parameters of LDS using EM iterations. ",
299
+ "bbox": [
300
+ 173,
301
+ 338,
302
+ 825,
303
+ 407
304
+ ],
305
+ "page_idx": 2
306
+ },
307
+ {
308
+ "type": "text",
309
+ "text": "2.2 RECURRENT NEURAL NETWORKS",
310
+ "text_level": 1,
311
+ "bbox": [
312
+ 176,
313
+ 422,
314
+ 446,
315
+ 438
316
+ ],
317
+ "page_idx": 2
318
+ },
319
+ {
320
+ "type": "text",
321
+ "text": "RNNs have received remarkable attention in recent years due to their strong benchmark performance as well as successful applications in real-world problems. Unlike SSMs, RNNs aim to directly learn the complex generative distribution of $p \\big ( x _ { t } | x _ { 1 : t - 1 } \\big )$ using a neural network, with the help of a deterministic internal state $s _ { t }$ : ",
322
+ "bbox": [
323
+ 173,
324
+ 449,
325
+ 825,
326
+ 503
327
+ ],
328
+ "page_idx": 2
329
+ },
330
+ {
331
+ "type": "equation",
332
+ "img_path": "images/29c744f1211baef4e2ce37070b137c8b1fe538fff5227d13467f8ab468bee81a.jpg",
333
+ "text": "$$\np ( x _ { t } | x _ { 1 : t - 1 } ) = p ( x _ { t } ; g ( s _ { t } ) ) , \\quad s _ { t } = \\mathsf { R N N } ( s _ { t - 1 } , x _ { t - 1 } ) ,\n$$",
334
+ "text_format": "latex",
335
+ "bbox": [
336
+ 316,
337
+ 510,
338
+ 679,
339
+ 527
340
+ ],
341
+ "page_idx": 2
342
+ },
343
+ {
344
+ "type": "text",
345
+ "text": "where $\\mathsf { R N N } ( \\cdot , \\cdot )$ is the transition function defined by a neural network, and $g ( \\cdot )$ is an arbitrary differentiable function that maps the RNN state $s _ { t }$ to the parameter of the distribution of $x _ { t }$ . The flexibility of the transformation function allows the RNN to learn from complex nonlinear nonGaussian sequences. Moreover, since the state $s _ { t }$ is a deterministic function of the past observations $x _ { 1 : t - 1 }$ , RNNs can capture long-range dependencies, for instance matching brackets in programming languages (Karpathy et al., 2015). ",
346
+ "bbox": [
347
+ 173,
348
+ 534,
349
+ 825,
350
+ 616
351
+ ],
352
+ "page_idx": 2
353
+ },
354
+ {
355
+ "type": "text",
356
+ "text": "The BPTT algorithm can be used to find the MLE of the parameters of $\\mathsf { R N N } ( \\cdot , \\cdot )$ and $g ( \\cdot )$ . However, although RNNs can, in principle, model long-range dependencies, directly applying BPTT can be difficult in practice since the repeated application of a squashing nonlinear activation function, such as tanh or logistic sigmoid, results in an exponential decay in the error signal through time. LSTMs (Hochreiter & Schmidhuber, 1997) are designed to cope with the such vanishing gradient problems, by introducing an extra memory cell that is constructed as a linear combination of the previous state and signal from the input. In this work, we also use LSTMs as building blocks, as in Zaheer et al. (2017). ",
357
+ "bbox": [
358
+ 173,
359
+ 621,
360
+ 825,
361
+ 731
362
+ ],
363
+ "page_idx": 2
364
+ },
365
+ {
366
+ "type": "text",
367
+ "text": "2.3 SEQUENTIAL MONTE CARLO ",
368
+ "text_level": 1,
369
+ "bbox": [
370
+ 176,
371
+ 746,
372
+ 418,
373
+ 761
374
+ ],
375
+ "page_idx": 2
376
+ },
377
+ {
378
+ "type": "text",
379
+ "text": "Sequential Monte Carlo (SMC) (Doucet et al., 2001) is an algorithm that samples from a series of potentially unnormalized densities $\\pi _ { 1 } ( z _ { 1 } ) , . . . , \\pi _ { T } ( z _ { 1 : T } )$ . At each step $t$ , SMC approximates the target density $\\pi _ { t }$ with $P$ weighted particles using importance distribution $f { \\big ( } z _ { t } | z _ { 1 : t - 1 } { \\big ) }$ : ",
380
+ "bbox": [
381
+ 174,
382
+ 771,
383
+ 825,
384
+ 814
385
+ ],
386
+ "page_idx": 2
387
+ },
388
+ {
389
+ "type": "equation",
390
+ "img_path": "images/66adfbe4f1126ad4849ce614e95ff3f6bdc2563461c04279dbd7aedda2bd2a82.jpg",
391
+ "text": "$$\n\\pi _ { t } ( z _ { 1 : t } ) \\approx \\hat { \\pi } _ { t } ( z _ { 1 : t } ) = \\sum _ { p } \\alpha _ { t } ^ { p } \\delta _ { z _ { 1 : t } ^ { p } } ( z _ { 1 : t } ) ,\n$$",
392
+ "text_format": "latex",
393
+ "bbox": [
394
+ 367,
395
+ 820,
396
+ 629,
397
+ 854
398
+ ],
399
+ "page_idx": 2
400
+ },
401
+ {
402
+ "type": "text",
403
+ "text": "where $\\alpha _ { t } ^ { p }$ is the importance weight of the $p$ -th particle and $\\delta _ { x }$ is the Dirac point mass at $x$ . Repeating this approximation for every $t$ leads to the SMC method, outlined in Algorithm 1. ",
404
+ "bbox": [
405
+ 173,
406
+ 861,
407
+ 823,
408
+ 890
409
+ ],
410
+ "page_idx": 2
411
+ },
412
+ {
413
+ "type": "text",
414
+ "text": "The key to this method lies in the resampling, which is implemented by repeatedly drawing the ancestors of particles at each step. Intuitively, it encourages the particles with a higher likelihood to survive longer, since the weight reflects the likelihood of the particle path. The final Monte Carlo estimate (4) consists of only survived particle paths, and sampling from this point masses is equivalent to choosing a particle path according to the last weights $\\alpha _ { T }$ . We refer to Doucet et al. (2001); Andrieu et al. (2010) for detailed proof of the method. ",
415
+ "bbox": [
416
+ 173,
417
+ 895,
418
+ 821,
419
+ 924
420
+ ],
421
+ "page_idx": 2
422
+ },
423
+ {
424
+ "type": "image",
425
+ "img_path": "images/442f673772ccac3d53e3d3bb5f66cbecf4789460d88a7c98e79285a39e72b1c0.jpg",
426
+ "image_caption": [
427
+ "Figure 1: Generative process of SSL. "
428
+ ],
429
+ "image_footnote": [],
430
+ "bbox": [
431
+ 183,
432
+ 97,
433
+ 821,
434
+ 243
435
+ ],
436
+ "page_idx": 3
437
+ },
438
+ {
439
+ "type": "text",
440
+ "text": "",
441
+ "bbox": [
442
+ 174,
443
+ 301,
444
+ 825,
445
+ 357
446
+ ],
447
+ "page_idx": 3
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "3 STATE SPACE LSTM MODELS ",
452
+ "text_level": 1,
453
+ "bbox": [
454
+ 176,
455
+ 376,
456
+ 452,
457
+ 392
458
+ ],
459
+ "page_idx": 3
460
+ },
461
+ {
462
+ "type": "text",
463
+ "text": "In this section, we present the class of State Space LSTM (SSL) models that combines interpretability of SSMs and flexibility of LSTMs. ",
464
+ "bbox": [
465
+ 173,
466
+ 406,
467
+ 821,
468
+ 435
469
+ ],
470
+ "page_idx": 3
471
+ },
472
+ {
473
+ "type": "text",
474
+ "text": "The key intuition, motivated by SSMs, is to learn dynamics in the state space, rather than in the sample space. However, we do not assume transition in the state space is linear, Gaussian, or Markovian. Existing approaches such as the extended Kalman filter (EKF) attempted to work with a general nonlinear transition function. Unfortunately, additional flexibility also introduced extra difficulty in the parameter estimation: EKF relies heavily on linearizing the nonlinear functions. We propose to use LSTM to model the dynamics in the latent state space, as they can learn from complex sequences without making limiting assumptions. The BPTT algorithm is also well established so that no additional approximation is needed in training the latent dynamics. ",
475
+ "bbox": [
476
+ 173,
477
+ 441,
478
+ 825,
479
+ 551
480
+ ],
481
+ "page_idx": 3
482
+ },
483
+ {
484
+ "type": "text",
485
+ "text": "Generative process Let $h ( \\cdot )$ be the emission function that maps a latent state to a parameter of the sample distribution. As illustrated in Figure 1 (a), the generative process of SSL for a single sequence is: ",
486
+ "bbox": [
487
+ 176,
488
+ 564,
489
+ 823,
490
+ 606
491
+ ],
492
+ "page_idx": 3
493
+ },
494
+ {
495
+ "type": "text",
496
+ "text": "• For $t = 1 , \\dots , T$ : 1. Perform LSTM transition: $\\boldsymbol { s } _ { t } = \\mathsf { L S T M } \\left( \\boldsymbol { s } _ { t - 1 } , \\boldsymbol { z } _ { t - 1 } \\right)$ 2. Draw latent state: $z _ { t } \\sim p ( z ; g ( s _ { t } ) )$ 3. Draw observation: $x _ { t } \\sim p ( x ; h ( z _ { t } ) )$ ",
497
+ "bbox": [
498
+ 215,
499
+ 616,
500
+ 601,
501
+ 681
502
+ ],
503
+ "page_idx": 3
504
+ },
505
+ {
506
+ "type": "text",
507
+ "text": "The generative process specifies the following joint likelihood, with a similar factorization as SSMs except for the Markov transition: ",
508
+ "bbox": [
509
+ 174,
510
+ 690,
511
+ 823,
512
+ 719
513
+ ],
514
+ "page_idx": 3
515
+ },
516
+ {
517
+ "type": "equation",
518
+ "img_path": "images/92cbcd66796b6ba926f59c99978cb82e9d6b0dadd6e9dc7681805db8865fd9f3.jpg",
519
+ "text": "$$\np ( x _ { 1 : T } , z _ { 1 : T } ) = \\prod _ { t = 1 } ^ { T } p _ { \\omega } ( z _ { t } | z _ { 1 : t - 1 } ) p _ { \\phi } ( x _ { t } | z _ { t } ) ,\n$$",
520
+ "text_format": "latex",
521
+ "bbox": [
522
+ 352,
523
+ 723,
524
+ 643,
525
+ 767
526
+ ],
527
+ "page_idx": 3
528
+ },
529
+ {
530
+ "type": "text",
531
+ "text": "where $p _ { \\omega } ( z _ { t } | z _ { 1 : t - 1 } ) = p ( z _ { t } ; g ( s _ { t } ) )$ , $\\omega$ is the set of parameters of $\\mathsf { L S T M } ( \\cdot , \\cdot )$ and $g ( \\cdot )$ , and $\\phi$ is the parameters of $h ( \\cdot )$ . The structure of the likelihood function is better illustrated in Figure 1 (b), where each latent state $z _ { t }$ is dependent to all previous states $z _ { 1 : t - 1 }$ after substituting $s _ { t }$ recursively. This allows the SSL to have non-Markovian state transition, with parsimonious parameterization thanks to the recurrent structure of LSTMs. ",
532
+ "bbox": [
533
+ 174,
534
+ 771,
535
+ 825,
536
+ 840
537
+ ],
538
+ "page_idx": 3
539
+ },
540
+ {
541
+ "type": "text",
542
+ "text": "Parameter estimation We continue with a single sequence for the ease of notation. A variational lower bound to the marginal data likelihood is given by ",
543
+ "bbox": [
544
+ 173,
545
+ 854,
546
+ 821,
547
+ 883
548
+ ],
549
+ "page_idx": 3
550
+ },
551
+ {
552
+ "type": "equation",
553
+ "img_path": "images/c8e5aa49019bbf76195beb2a5e0d540d39bef3ecb5abc15a9207d8916d2ce69d.jpg",
554
+ "text": "$$\n\\log p ( x _ { 1 : T } ) \\geq \\mathbb { E } _ { q } \\left[ \\log \\frac { p _ { \\omega } ( z _ { 1 : T } ) p _ { \\phi } ( x _ { 1 : T } | z _ { 1 : T } ) } { q ( z _ { 1 : T } ) } \\right] ,\n$$",
555
+ "text_format": "latex",
556
+ "bbox": [
557
+ 336,
558
+ 887,
559
+ 658,
560
+ 922
561
+ ],
562
+ "page_idx": 3
563
+ },
564
+ {
565
+ "type": "text",
566
+ "text": "where $q \\big ( z _ { 1 : T } \\big )$ is the variational distribution. Following the (stochastic) EM approach, iteratively maximizing the lower bound w.r.t. $q$ and the model parameters $( \\omega , \\phi )$ leads to the following updates: ",
567
+ "bbox": [
568
+ 174,
569
+ 103,
570
+ 823,
571
+ 132
572
+ ],
573
+ "page_idx": 4
574
+ },
575
+ {
576
+ "type": "text",
577
+ "text": "• E-step: The optimal variational distribution is given by the posterior: ",
578
+ "bbox": [
579
+ 215,
580
+ 141,
581
+ 681,
582
+ 156
583
+ ],
584
+ "page_idx": 4
585
+ },
586
+ {
587
+ "type": "equation",
588
+ "img_path": "images/abfceaf8a281a4416c95a56320984e75d3898a232b53dad5352bb0a9b35a8a8c.jpg",
589
+ "text": "$$\n\\begin{array} { r } { q ^ { \\star } ( z _ { 1 : T } ) \\propto p _ { \\omega } ( z _ { 1 : T } ) p _ { \\phi } ( x _ { 1 : T } | z _ { 1 : T } ) . } \\end{array}\n$$",
590
+ "text_format": "latex",
591
+ "bbox": [
592
+ 410,
593
+ 160,
594
+ 647,
595
+ 178
596
+ ],
597
+ "page_idx": 4
598
+ },
599
+ {
600
+ "type": "text",
601
+ "text": "In the case of LDS or HMM, efficient smoothing algorithms such as the RTS smoother or the forward-backward algorithm are available for computing the posterior expectations of sufficient statistics. However, without Markovian state transition, although the forward messages can still be computed, the backward recursion can no longer evaluated or efficiently approximated. ",
602
+ "bbox": [
603
+ 225,
604
+ 180,
605
+ 825,
606
+ 250
607
+ ],
608
+ "page_idx": 4
609
+ },
610
+ {
611
+ "type": "text",
612
+ "text": "• S-step: Due to the difficulties in taking expectations, we take an alternative approach to collect posterior samples instead: ",
613
+ "bbox": [
614
+ 212,
615
+ 252,
616
+ 823,
617
+ 280
618
+ ],
619
+ "page_idx": 4
620
+ },
621
+ {
622
+ "type": "equation",
623
+ "img_path": "images/9113faf91405793be60e7526a2b019aa808d9e18a77df4ada6b4239874b34ab1.jpg",
624
+ "text": "$$\nz _ { 1 : T } ^ { \\star } \\sim q ^ { \\star } ( z _ { 1 : T } ) ,\n$$",
625
+ "text_format": "latex",
626
+ "bbox": [
627
+ 470,
628
+ 284,
629
+ 584,
630
+ 301
631
+ ],
632
+ "page_idx": 4
633
+ },
634
+ {
635
+ "type": "text",
636
+ "text": "given only the filtering equations. We discuss the posterior sampling algorithm in detail in the next section. ",
637
+ "bbox": [
638
+ 220,
639
+ 304,
640
+ 823,
641
+ 332
642
+ ],
643
+ "page_idx": 4
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "• M-step: Given the posterior samples $z _ { 1 : T } ^ { \\star }$ , which can be seen as Monte Carlo estimate of the expectations, the subproblem for $\\omega$ and $\\phi$ are ",
648
+ "bbox": [
649
+ 218,
650
+ 335,
651
+ 825,
652
+ 363
653
+ ],
654
+ "page_idx": 4
655
+ },
656
+ {
657
+ "type": "equation",
658
+ "img_path": "images/14af51b23d48cbcb5aa6a60318f83c38fe6e778be7f507c3d7f860969fd84e12.jpg",
659
+ "text": "$$\n\\omega ^ { \\star } = \\underset { \\omega } { \\mathrm { a r g m a x } } ~ \\log p _ { \\omega } ( z _ { 1 : T } ^ { \\star } ) , \\quad \\phi ^ { \\star } = \\underset { \\phi } { \\mathrm { a r g m a x } } ~ \\sum _ { t } \\log p _ { \\phi } ( x _ { t } | z _ { t } ^ { \\star } ) ,\n$$",
660
+ "text_format": "latex",
661
+ "bbox": [
662
+ 313,
663
+ 367,
664
+ 740,
665
+ 400
666
+ ],
667
+ "page_idx": 4
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "which is exactly the MLE of an LSTM, with $z _ { 1 : T } ^ { \\star }$ serving as the input sequence, and the MLE of the given emission model. ",
672
+ "bbox": [
673
+ 233,
674
+ 402,
675
+ 821,
676
+ 431
677
+ ],
678
+ "page_idx": 4
679
+ },
680
+ {
681
+ "type": "text",
682
+ "text": "Having seen the generative model and the estimation algorithm, we can now discuss some instances of the proposed class of models. In particular, we provide two examples of SSL, for continuous and discrete latent states respectively. ",
683
+ "bbox": [
684
+ 174,
685
+ 440,
686
+ 823,
687
+ 483
688
+ ],
689
+ "page_idx": 4
690
+ },
691
+ {
692
+ "type": "text",
693
+ "text": "Example 1 (Gaussian SSL) Suppose $z _ { t }$ and $x _ { t }$ are real-valued vectors. A typical choice of the transition and emission is the Gaussian distribution: ",
694
+ "bbox": [
695
+ 173,
696
+ 493,
697
+ 823,
698
+ 521
699
+ ],
700
+ "page_idx": 4
701
+ },
702
+ {
703
+ "type": "equation",
704
+ "img_path": "images/7e47a5aa93c9010e5f0d97c4a2b0dc683a0eadd155ccd74b8e103393ae9dcd66.jpg",
705
+ "text": "$$\n\\begin{array} { r l } & { p ( z _ { t } ; g ( s _ { t } ) ) = \\mathcal { N } ( z _ { t } ; g _ { \\mu } ( s _ { t } ) , g _ { \\sigma } ( s _ { t } ) ) } \\\\ & { p ( x _ { t } ; h ( z _ { t } ) ) = \\mathcal { N } ( x _ { t } ; h _ { \\mu } ( z _ { t } ) , h _ { \\sigma } ( z _ { t } ) ) , } \\end{array}\n$$",
706
+ "text_format": "latex",
707
+ "bbox": [
708
+ 370,
709
+ 523,
710
+ 625,
711
+ 564
712
+ ],
713
+ "page_idx": 4
714
+ },
715
+ {
716
+ "type": "text",
717
+ "text": "where $g _ { \\mu } ( \\cdot )$ and $g _ { \\sigma } ( \\cdot )$ map to the mean and the covariance of the Gaussian respectively, and similarly $h _ { \\mu } ( \\cdot )$ and $h _ { \\sigma } ( \\cdot )$ . For closed form estimates for the emission parameters, one can further assume ",
718
+ "bbox": [
719
+ 174,
720
+ 565,
721
+ 826,
722
+ 607
723
+ ],
724
+ "page_idx": 4
725
+ },
726
+ {
727
+ "type": "equation",
728
+ "img_path": "images/9272873492992c6de24fd97b0bde736e438574d93998e959e647bd774cf6e37b.jpg",
729
+ "text": "$$\nh _ { \\mu } ( z _ { t } ) = C z _ { t } + b , \\quad h _ { \\sigma } ( z _ { t } ) = R ,\n$$",
730
+ "text_format": "latex",
731
+ "bbox": [
732
+ 383,
733
+ 611,
734
+ 612,
735
+ 627
736
+ ],
737
+ "page_idx": 4
738
+ },
739
+ {
740
+ "type": "text",
741
+ "text": "where $C$ is a matrix that maps from state space to sample space, and $R$ is the covariance matrix with appropriate size. The MLE of $\\phi = ( C , b , R )$ is then given by the least squares fit. ",
742
+ "bbox": [
743
+ 171,
744
+ 631,
745
+ 823,
746
+ 660
747
+ ],
748
+ "page_idx": 4
749
+ },
750
+ {
751
+ "type": "text",
752
+ "text": "Example 2 (Topical SSL, (Zaheer et al., 2017)) Consider $x _ { 1 : T }$ as the sequence of websites a user has visited. One might be tempted to model the user behavior using an LSTM, however due to the enormous size of the Internet, it is almost impossible to even compute a softmax output to get a discrete distribution over the websites. There are approximation methods for large vocabulary problems in RNN, such as the hierarchical softmax (Morin & Bengio, 2005). However, another interesting approach is to operate on a sequence with a “compressed” vocabulary, while learning how to perform such compression at the same time. ",
753
+ "bbox": [
754
+ 173,
755
+ 670,
756
+ 825,
757
+ 766
758
+ ],
759
+ "page_idx": 4
760
+ },
761
+ {
762
+ "type": "text",
763
+ "text": "Let $z _ { t }$ be the indicator of a “topic”, which is a distribution over the vocabulary as in Blei et al. (2003). Accordingly, define ",
764
+ "bbox": [
765
+ 173,
766
+ 771,
767
+ 821,
768
+ 799
769
+ ],
770
+ "page_idx": 4
771
+ },
772
+ {
773
+ "type": "equation",
774
+ "img_path": "images/8542b7b0f24dedf084f33b09749abb34057eee0d1c20f6c06a04981f16e422bb.jpg",
775
+ "text": "$$\n\\begin{array} { r l } & { p ( z _ { t } ; g ( s _ { t } ) ) = \\mathsf { M u l t i n o m i a l } ( z _ { t } ; \\mathsf { s o f t m a x } ( W s _ { t } + b ) ) } \\\\ & { p ( x _ { t } ; h ( z _ { t } ) ) = \\mathsf { M u l t i n o m i a l } ( x _ { t } ; \\phi _ { z _ { t } } ) , } \\end{array}\n$$",
776
+ "text_format": "latex",
777
+ "bbox": [
778
+ 326,
779
+ 803,
780
+ 669,
781
+ 840
782
+ ],
783
+ "page_idx": 4
784
+ },
785
+ {
786
+ "type": "text",
787
+ "text": "where $W$ is a matrix that maps LSTM states to latent states, $b$ is a bias term, and $\\phi _ { z _ { t } }$ is a point in the probability simplex. If $z _ { t }$ lies in a lower dimension than $x _ { t }$ , the LSTM is effectively trained over a sequence $z _ { 1 : T }$ with a reduced vocabulary. On the other hand, the probabilistic mapping between $z _ { t }$ and $x _ { t }$ is interpretable, as it learns to group similar $x _ { t }$ ’s together. The estimation of $\\phi$ is typically performed under a Dirichlet prior, which then corresponds to the MAP estimate of the Dirichlet distribution (Zaheer et al., 2017). ",
788
+ "bbox": [
789
+ 173,
790
+ 842,
791
+ 825,
792
+ 924
793
+ ],
794
+ "page_idx": 4
795
+ },
796
+ {
797
+ "type": "text",
798
+ "text": "4 INFERENCE WITH PARTICLE GIBBS ",
799
+ "text_level": 1,
800
+ "bbox": [
801
+ 173,
802
+ 102,
803
+ 498,
804
+ 118
805
+ ],
806
+ "page_idx": 5
807
+ },
808
+ {
809
+ "type": "text",
810
+ "text": "In this section, we discuss how to draw samples from the posterior (7), corresponding to the S-step of the stochastic EM algorithm: ",
811
+ "bbox": [
812
+ 171,
813
+ 132,
814
+ 825,
815
+ 160
816
+ ],
817
+ "page_idx": 5
818
+ },
819
+ {
820
+ "type": "equation",
821
+ "img_path": "images/77f8fc030349c130bc43e7ec98ce88c5a4f2b26d99b6a3edff6d9db663400fe0.jpg",
822
+ "text": "$$\nz _ { 1 : T } ^ { \\star } \\sim p ( z _ { 1 : T } | x _ { 1 : T } ) = \\frac { \\prod _ { t } p _ { \\omega } ( z _ { t } | z _ { 1 : t - 1 } ) p _ { \\phi } ( x _ { t } | z _ { t } ) } { \\int \\prod _ { t } p _ { \\omega } ( z _ { t } | z _ { 1 : t - 1 } ) p _ { \\phi } ( x _ { t } | z _ { t } ) \\mathrm { d } z _ { 1 : T } } .\n$$",
823
+ "text_format": "latex",
824
+ "bbox": [
825
+ 300,
826
+ 164,
827
+ 696,
828
+ 200
829
+ ],
830
+ "page_idx": 5
831
+ },
832
+ {
833
+ "type": "text",
834
+ "text": "Assuming the integration and normalization can be performed efficiently, the following quantities can be evaluated in the forward pass without Markov state transition: ",
835
+ "bbox": [
836
+ 173,
837
+ 210,
838
+ 823,
839
+ 238
840
+ ],
841
+ "page_idx": 5
842
+ },
843
+ {
844
+ "type": "equation",
845
+ "img_path": "images/0d260e9f53befbfdfc5a5c72a4d470dbfecea9a7a5cad0a908bbe3bf8e42563c.jpg",
846
+ "text": "$$\n\\begin{array} { r l } & { \\alpha _ { t } \\equiv p ( x _ { t } | z _ { 1 : t - 1 } ) \\propto \\displaystyle \\int p _ { \\omega } ( z _ { t } | z _ { 1 : t - 1 } ) p _ { \\phi } ( x _ { t } | z _ { t } ) \\mathrm { d } z _ { t } } \\\\ & { \\gamma _ { t } \\equiv p ( z _ { t } | z _ { 1 : t - 1 } , x _ { t } ) \\propto p _ { \\omega } ( z _ { t } | z _ { 1 : t - 1 } ) p _ { \\phi } ( x _ { t } | z _ { t } ) . } \\end{array}\n$$",
847
+ "text_format": "latex",
848
+ "bbox": [
849
+ 328,
850
+ 242,
851
+ 669,
852
+ 295
853
+ ],
854
+ "page_idx": 5
855
+ },
856
+ {
857
+ "type": "text",
858
+ "text": "The task is to draw from the joint posterior of $z _ { 1 : T }$ only given access to these forward messages. ",
859
+ "bbox": [
860
+ 173,
861
+ 296,
862
+ 800,
863
+ 313
864
+ ],
865
+ "page_idx": 5
866
+ },
867
+ {
868
+ "type": "text",
869
+ "text": "One way to circumvent the tight dependencies in $z _ { 1 : T }$ is to make a factorization assumption, as in Zaheer et al. (2017). More concretely, the joint distribution is decomposed as ",
870
+ "bbox": [
871
+ 173,
872
+ 318,
873
+ 821,
874
+ 345
875
+ ],
876
+ "page_idx": 5
877
+ },
878
+ {
879
+ "type": "text",
880
+ "text": "(factorization assumption) ",
881
+ "bbox": [
882
+ 183,
883
+ 354,
884
+ 356,
885
+ 369
886
+ ],
887
+ "page_idx": 5
888
+ },
889
+ {
890
+ "type": "equation",
891
+ "img_path": "images/84ca33666937de6e49ca6a3bd2d9e708ea693f5a2988c30eae8c7e99dcca911a.jpg",
892
+ "text": "$$\np ( z _ { 1 : T } | x _ { 1 : T } ) \\propto \\prod _ { t } p _ { \\omega } ( z _ { t } | z _ { 1 : t - 1 } ^ { \\mathrm { p r e v } } ) p _ { \\phi } ( x _ { t } | z _ { t } ) ,\n$$",
893
+ "text_format": "latex",
894
+ "bbox": [
895
+ 387,
896
+ 349,
897
+ 673,
898
+ 382
899
+ ],
900
+ "page_idx": 5
901
+ },
902
+ {
903
+ "type": "text",
904
+ "text": "where $z _ { 1 : t - 1 } ^ { \\mathrm { p r e v } }$ is the assignments from the previous inference step. However, as we confirm in the experiments, this assumption can be restrictive since the flexibility of LSTM state transitions is offset by considering each time step independently. ",
905
+ "bbox": [
906
+ 174,
907
+ 387,
908
+ 825,
909
+ 429
910
+ ],
911
+ "page_idx": 5
912
+ },
913
+ {
914
+ "type": "text",
915
+ "text": "In this work, we propose to use a method based on SMC, which is a principled way of sampling from a sequence of distributions. More importantly, it does not require the model to be Markovian (Frigola et al., 2013; Lindsten et al., 2014). As described earlier, the idea is to approximate the posterior (15) with point masses, i.e., weighted particles. Let $f ( \\boldsymbol { z } _ { t } | \\boldsymbol { z } _ { 1 : t - 1 } , \\boldsymbol { x } _ { t } )$ be the importance density, and $P$ be the number of particles. We then can run Algorithm 1 with $\\pi _ { t } ( z _ { 1 : t } ) \\stackrel { - } { = } p ( x _ { 1 : t } , z _ { 1 : t } )$ being the unnormalized target distribution at time $t$ , where the weight becomes ",
916
+ "bbox": [
917
+ 173,
918
+ 435,
919
+ 826,
920
+ 517
921
+ ],
922
+ "page_idx": 5
923
+ },
924
+ {
925
+ "type": "equation",
926
+ "img_path": "images/6bea598060e41c1aa4d575e9184286661ee6b3dd4ba2a4c6509711bcf9871603.jpg",
927
+ "text": "$$\n\\alpha _ { t } ^ { p } \\propto \\frac { p ( z _ { 1 : t } ^ { p } , x _ { 1 : t } ) } { p ( z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } , x _ { 1 : t - 1 } ) f ( z _ { t } ^ { p } | z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } , x _ { t } ) } = \\frac { p _ { \\omega } ( z _ { t } ^ { p } | z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } ) p _ { \\phi } ( x _ { t } | z _ { t } ^ { p } ) } { f ( z _ { t } ^ { p } | z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } , x _ { t } ) } .\n$$",
928
+ "text_format": "latex",
929
+ "bbox": [
930
+ 274,
931
+ 521,
932
+ 723,
933
+ 569
934
+ ],
935
+ "page_idx": 5
936
+ },
937
+ {
938
+ "type": "text",
939
+ "text": "As for the choice of the proposal distribution $f ( \\cdot )$ , one could use the transition density $p _ { \\omega } \\big ( z _ { t } | z _ { 1 : t - 1 } \\big )$ , in which case the algorithm is also referred to as the bootstrap particle filter. An alternative is the predictive distribution, a locally optimal proposal in terms of variance (Andrieu et al., 2010): ",
940
+ "bbox": [
941
+ 176,
942
+ 579,
943
+ 825,
944
+ 622
945
+ ],
946
+ "page_idx": 5
947
+ },
948
+ {
949
+ "type": "equation",
950
+ "img_path": "images/460d37dcade0c5f40eae9da0542f11090619611a16cdb6cf825489a66d1617a6.jpg",
951
+ "text": "$$\nf ^ { \\star } ( z _ { t } | z _ { 1 : t - 1 } , x _ { t } ) = \\frac { p _ { \\omega } ( z _ { t } | z _ { 1 : t - 1 } ) p _ { \\phi } ( x _ { t } | z _ { t } ) } { \\int p _ { \\omega } ( z _ { t } | z _ { 1 : t - 1 } ) p _ { \\phi } ( x _ { t } | z _ { t } ) \\mathrm { d } z _ { t } } ,\n$$",
952
+ "text_format": "latex",
953
+ "bbox": [
954
+ 331,
955
+ 626,
956
+ 665,
957
+ 660
958
+ ],
959
+ "page_idx": 5
960
+ },
961
+ {
962
+ "type": "text",
963
+ "text": "which is precisely one of the available forward messages: ",
964
+ "bbox": [
965
+ 176,
966
+ 664,
967
+ 550,
968
+ 679
969
+ ],
970
+ "page_idx": 5
971
+ },
972
+ {
973
+ "type": "equation",
974
+ "img_path": "images/c78e9fe6ddfbaac66ade7130fe9934103548d7c618392a4614cd35f7967ea0c2.jpg",
975
+ "text": "$$\n\\gamma _ { t } ^ { p } = f ^ { \\star } ( z _ { t } | z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } , x _ { t } ) .\n$$",
976
+ "text_format": "latex",
977
+ "bbox": [
978
+ 421,
979
+ 683,
980
+ 576,
981
+ 705
982
+ ],
983
+ "page_idx": 5
984
+ },
985
+ {
986
+ "type": "text",
987
+ "text": "Notice the similarity between terms in (19) and (20). Indeed, with the choice of predictive distribution as the proposal density, the importance weight simplifies to ",
988
+ "bbox": [
989
+ 173,
990
+ 709,
991
+ 821,
992
+ 737
993
+ ],
994
+ "page_idx": 5
995
+ },
996
+ {
997
+ "type": "equation",
998
+ "img_path": "images/dc914b86391055d7af175766dc91586188f52b4113bbd45887e277708f54c6c3.jpg",
999
+ "text": "$$\n\\alpha _ { t } ^ { p } \\propto \\tilde { \\alpha } _ { t } ^ { p } = \\int p _ { \\omega } ( z _ { t } | z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } ) p _ { \\phi } ( x _ { t } | z _ { t } ) \\mathrm { d } z _ { t } , ,\n$$",
1000
+ "text_format": "latex",
1001
+ "bbox": [
1002
+ 354,
1003
+ 741,
1004
+ 642,
1005
+ 773
1006
+ ],
1007
+ "page_idx": 5
1008
+ },
1009
+ {
1010
+ "type": "text",
1011
+ "text": "which is not a coincidence that the name collides with the message $\\alpha _ { t }$ . Interestingly, this quantity no longer depends on the current particle $z _ { t } ^ { p }$ . Instead, it marginalizes over all possible particle assignments of the current time step. This is beneficial computationally since the intermediate terms from (20) can be reused in (22). Also note that the optimal proposal relies on the fact that the normalization in (20) can be performed efficiently, otherwise the bootstrap proposal should be used. ",
1012
+ "bbox": [
1013
+ 173,
1014
+ 776,
1015
+ 825,
1016
+ 845
1017
+ ],
1018
+ "page_idx": 5
1019
+ },
1020
+ {
1021
+ "type": "text",
1022
+ "text": "After a full pass over the sequence, the algorithm produces Monte Carlo approximation of the posterior and the marginal likelihood: ",
1023
+ "bbox": [
1024
+ 171,
1025
+ 851,
1026
+ 821,
1027
+ 880
1028
+ ],
1029
+ "page_idx": 5
1030
+ },
1031
+ {
1032
+ "type": "equation",
1033
+ "img_path": "images/7f32bb7fd5ce3fc9e150d0c6d02b9d81b978e77b42a9788426bd0164e2ee6ef4.jpg",
1034
+ "text": "$$\n\\hat { p } ( z _ { 1 : T } | x _ { 1 : T } ) = \\sum _ { p } \\alpha _ { T } ^ { p } \\delta _ { z _ { 1 : T } ^ { p } } \\left( z _ { 1 : T } \\right) , \\quad \\hat { p } ( x _ { 1 : T } ) = \\prod _ { t } \\frac { 1 } { P } \\sum _ { p } \\tilde { \\alpha } _ { t } ^ { p } .\n$$",
1035
+ "text_format": "latex",
1036
+ "bbox": [
1037
+ 287,
1038
+ 883,
1039
+ 710,
1040
+ 921
1041
+ ],
1042
+ "page_idx": 5
1043
+ },
1044
+ {
1045
+ "type": "text",
1046
+ "text": "Algorithm 2 Inference with Particle Gibbs ",
1047
+ "text_level": 1,
1048
+ "bbox": [
1049
+ 176,
1050
+ 103,
1051
+ 457,
1052
+ 117
1053
+ ],
1054
+ "page_idx": 6
1055
+ },
1056
+ {
1057
+ "type": "text",
1058
+ "text": "1. Let $z _ { 0 } ^ { p } = z _ { 0 }$ and $\\alpha _ { 0 } ^ { p } = 1 / P$ for $p = 1 , \\ldots , P$ . ",
1059
+ "bbox": [
1060
+ 215,
1061
+ 122,
1062
+ 532,
1063
+ 140
1064
+ ],
1065
+ "page_idx": 6
1066
+ },
1067
+ {
1068
+ "type": "text",
1069
+ "text": "2. For $t = 1 , \\dots , T$ ",
1070
+ "bbox": [
1071
+ 212,
1072
+ 142,
1073
+ 349,
1074
+ 156
1075
+ ],
1076
+ "page_idx": 6
1077
+ },
1078
+ {
1079
+ "type": "text",
1080
+ "text": "(a) Fix reference path: set $a _ { t - 1 } ^ { 1 } = 1$ and $z _ { 1 : t } ^ { 1 } = z _ { 1 : t } ^ { \\star }$ from previous iteration. \n(b) Sample ancestors $a _ { t - 1 } ^ { p } \\sim \\alpha _ { t - 1 }$ for $p = 2 , \\ldots , P$ . \n(c) Sample particles $z _ { t } ^ { p } \\sim \\gamma _ { t } ^ { p }$ and set $z _ { 1 : t } ^ { p } = ( z _ { 1 : t - 1 } ^ { a _ { t - 1 } ^ { p } } , z _ { t } ^ { p } )$ for $p = 2 , \\ldots , P$ . \n(d) Compute normalized weights $\\alpha _ { t } ^ { p }$ for $p = 1 , \\ldots , P$ . ",
1081
+ "bbox": [
1082
+ 236,
1083
+ 160,
1084
+ 735,
1085
+ 236
1086
+ ],
1087
+ "page_idx": 6
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "3. Sample $r \\sim \\alpha _ { T }$ , return the particle path $z _ { 1 : T } ^ { a _ { T } ^ { r } }$ ",
1092
+ "bbox": [
1093
+ 212,
1094
+ 241,
1095
+ 531,
1096
+ 258
1097
+ ],
1098
+ "page_idx": 6
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "The inference is completed by a final draw from the approximate posterior, ",
1103
+ "bbox": [
1104
+ 176,
1105
+ 292,
1106
+ 665,
1107
+ 309
1108
+ ],
1109
+ "page_idx": 6
1110
+ },
1111
+ {
1112
+ "type": "equation",
1113
+ "img_path": "images/faeb9461d98a8f189192f72e9a93a32b3fbf2c1a18f70f7e2201d89e72e1097c.jpg",
1114
+ "text": "$$\nz _ { 1 : T } ^ { \\star } \\sim \\hat { p } \\big ( z _ { 1 : T } | x _ { 1 : T } \\big ) ,\n$$",
1115
+ "text_format": "latex",
1116
+ "bbox": [
1117
+ 428,
1118
+ 315,
1119
+ 568,
1120
+ 333
1121
+ ],
1122
+ "page_idx": 6
1123
+ },
1124
+ {
1125
+ "type": "text",
1126
+ "text": "which is essentially sampling a particle path indexed by the last particle. Specifically, the last particle $z _ { T } ^ { p }$ is chosen according to the final weights $\\alpha _ { T }$ , and then earlier particles can be obtained by tracing backwards to the beginning of the sequence according to the ancestry indicators $a _ { t } ^ { p }$ at each position. ",
1127
+ "bbox": [
1128
+ 176,
1129
+ 339,
1130
+ 825,
1131
+ 382
1132
+ ],
1133
+ "page_idx": 6
1134
+ },
1135
+ {
1136
+ "type": "text",
1137
+ "text": "Since SMC produces a Monte Carlo estimate, as the number of particles $P \\to \\infty$ the approximate posterior (23) is guaranteed to converge to the true posterior for a fixed sequence. However, as the length of the sequence $T$ increases, the number of particles needed to provide a good approximation grows exponentially. This is the well-known depletion problem of SMC (Andrieu et al., 2010). ",
1138
+ "bbox": [
1139
+ 174,
1140
+ 388,
1141
+ 825,
1142
+ 443
1143
+ ],
1144
+ "page_idx": 6
1145
+ },
1146
+ {
1147
+ "type": "text",
1148
+ "text": "One elegant way to avoid simulating enormous number of particles is to marry the idea of MCMC with SMC (Andrieu et al., 2010). The idea of such Particle MCMC (PMCMC) methods is to treat the particle estimate $\\hat { p } ( \\cdot )$ as a proposal, and design a Markov kernel that leaves the target distribution invariant. Since the invariance is ensured by the MCMC, it does not demand SMC to provide an accurate approximation to the true distribution, but only to give samples that are approximately distributed according to the target. As a result, for any fixed $P > 0$ the PMCMC methods ensure the target distribution is invariant. ",
1149
+ "bbox": [
1150
+ 173,
1151
+ 449,
1152
+ 825,
1153
+ 545
1154
+ ],
1155
+ "page_idx": 6
1156
+ },
1157
+ {
1158
+ "type": "text",
1159
+ "text": "We choose the Gibbs kernel that requires minimal modification from the basic SMC. The resulting algorithm is Particle Gibbs (PG), which is a conditional SMC update in a sense that a reference path $z _ { 1 : T } ^ { \\mathrm { r e f } }$ with its ancestral lineage is fixed throughout the particle propagation of SMC. It can be shown that this simple modification to SMC produces a transition kernel that is not only invariant, but also ergodic under mild assumptions. In practice, we use the assignments from previous step as the reference path. The final algorithm is summarized in Algorithm 2. Combined with the stochastic EM outer iteration, the final algorithm is an instance of the particle SAEM (Lindsten, 2013; Schon¨ et al., 2015), under non-Markovian state transition. ",
1160
+ "bbox": [
1161
+ 173,
1162
+ 550,
1163
+ 825,
1164
+ 660
1165
+ ],
1166
+ "page_idx": 6
1167
+ },
1168
+ {
1169
+ "type": "text",
1170
+ "text": "We conclude this section by deriving forward messages for the previous examples. ",
1171
+ "bbox": [
1172
+ 174,
1173
+ 666,
1174
+ 714,
1175
+ 681
1176
+ ],
1177
+ "page_idx": 6
1178
+ },
1179
+ {
1180
+ "type": "text",
1181
+ "text": "Example 1 (Gaussian SSL, continued) The integration and normalization preserves normality thanks to the Gaussian identify. The messages are given by ",
1182
+ "bbox": [
1183
+ 173,
1184
+ 694,
1185
+ 821,
1186
+ 722
1187
+ ],
1188
+ "page_idx": 6
1189
+ },
1190
+ {
1191
+ "type": "equation",
1192
+ "img_path": "images/2425c2805018474cc0cc79d4d46a0da3fe5f5d819b18ad1985bfa03c4c01f1a2.jpg",
1193
+ "text": "$$\n\\begin{array} { r l } & { \\alpha _ { t } = \\mathcal { N } \\left( x _ { t } ; C g _ { \\mu } ( s _ { t } ) + b , R + C [ g _ { \\sigma } ( s _ { t } ) ] ^ { - 1 } C ^ { T } \\right) } \\\\ & { \\gamma _ { t } = \\mathcal { N } \\left( z _ { t } ; V \\left( C ^ { T } R ^ { - 1 } ( x _ { t } - b ) + [ g _ { \\sigma } ( s _ { t } ) ] ^ { - 1 } g _ { \\mu } ( s _ { t } ) \\right) , V \\right) , } \\end{array}\n$$",
1194
+ "text_format": "latex",
1195
+ "bbox": [
1196
+ 300,
1197
+ 728,
1198
+ 696,
1199
+ 771
1200
+ ],
1201
+ "page_idx": 6
1202
+ },
1203
+ {
1204
+ "type": "text",
1205
+ "text": "where $V = \\left( [ g _ { \\sigma } ( s _ { t } ) ] ^ { - 1 } + C ^ { T } R ^ { - 1 } C \\right) ^ { - 1 }$ ",
1206
+ "bbox": [
1207
+ 176,
1208
+ 777,
1209
+ 444,
1210
+ 796
1211
+ ],
1212
+ "page_idx": 6
1213
+ },
1214
+ {
1215
+ "type": "text",
1216
+ "text": "Example 2 (Topical SSL, continued) Let $\\theta _ { t } = \\mathsf { s o f t m a x } ( W s _ { t } + b )$ . Since the distributions are discrete, we have ",
1217
+ "bbox": [
1218
+ 174,
1219
+ 809,
1220
+ 821,
1221
+ 838
1222
+ ],
1223
+ "page_idx": 6
1224
+ },
1225
+ {
1226
+ "type": "equation",
1227
+ "img_path": "images/3233553145d341c11e0868588f66c902723cc3c6207b181a875f6c7bf4b3b7fb.jpg",
1228
+ "text": "$$\n\\begin{array} { r } { \\alpha _ { t } \\propto \\left. \\theta _ { t } , \\phi _ { x _ { t } } \\right. , \\quad \\gamma _ { t } \\propto \\theta _ { t } \\circ \\phi _ { x _ { t } } , } \\end{array}\n$$",
1229
+ "text_format": "latex",
1230
+ "bbox": [
1231
+ 390,
1232
+ 845,
1233
+ 606,
1234
+ 862
1235
+ ],
1236
+ "page_idx": 6
1237
+ },
1238
+ {
1239
+ "type": "text",
1240
+ "text": "where $\\circ$ denotes element-wise product. Note that the integration for $\\alpha _ { t }$ corresponds to a summation in the state space. It is then normalized across $P$ particles to form a weight distribution. For $\\gamma _ { t }$ the normalization is performed in the state space as well, hence the computation of the messages are manageable. ",
1241
+ "bbox": [
1242
+ 174,
1243
+ 869,
1244
+ 825,
1245
+ 924
1246
+ ],
1247
+ "page_idx": 6
1248
+ },
1249
+ {
1250
+ "type": "image",
1251
+ "img_path": "images/c389f9d873dbf3528420ad348381281516867b0bc9855eecef7c4129be37985b.jpg",
1252
+ "image_caption": [
1253
+ "Figure 2: Tracking a synthetic trajectory. Top row: true trajectory and noisy observations. Middle row: training/testing performance of LSTM. Bottom row: training/testing performance of SSL. "
1254
+ ],
1255
+ "image_footnote": [],
1256
+ "bbox": [
1257
+ 179,
1258
+ 106,
1259
+ 816,
1260
+ 378
1261
+ ],
1262
+ "page_idx": 7
1263
+ },
1264
+ {
1265
+ "type": "text",
1266
+ "text": "5 EXPERIMENTS ",
1267
+ "text_level": 1,
1268
+ "bbox": [
1269
+ 176,
1270
+ 452,
1271
+ 326,
1272
+ 468
1273
+ ],
1274
+ "page_idx": 7
1275
+ },
1276
+ {
1277
+ "type": "text",
1278
+ "text": "We now present empirical studies for our proposed model and inference (denoted as SMC) in order to establish that (1) SSL is flexible in capturing underlying nonlinear dynamics, (2) our inference is accurate yet easily applicable to complicated models, and (3) it opens new avenues for interpretable yet nonlinear and non-Markovian sequence models, previously unthinkable. To illustrate these claims, we evaluate on (1) synthetic sequence tracking of varying difficulties, (2) language modeling, and (3) user modeling utilizing complicated models for capturing the intricate dynamics. For SMC inference, we gradually increase the number of particles $P$ from 1 to $K$ during training. ",
1279
+ "bbox": [
1280
+ 174,
1281
+ 483,
1282
+ 825,
1283
+ 578
1284
+ ],
1285
+ "page_idx": 7
1286
+ },
1287
+ {
1288
+ "type": "text",
1289
+ "text": "Software & hardware All the algorithms are implemented on TensorFlow (Abadi et al., 2016). We run our experiments on a commodity machine with Intel\rR Xeon\rR CPU E5-2630 v4 CPU, 256GB RAM, and 4 NVidia\rR Titan X (Pascal) GPU. ",
1290
+ "bbox": [
1291
+ 176,
1292
+ 585,
1293
+ 825,
1294
+ 626
1295
+ ],
1296
+ "page_idx": 7
1297
+ },
1298
+ {
1299
+ "type": "text",
1300
+ "text": "5.1 SYNTHETIC SEQUENCE TRACKING ",
1301
+ "text_level": 1,
1302
+ "bbox": [
1303
+ 176,
1304
+ 643,
1305
+ 455,
1306
+ 657
1307
+ ],
1308
+ "page_idx": 7
1309
+ },
1310
+ {
1311
+ "type": "text",
1312
+ "text": "To test the flexibility of SSL, we begin with inference using synthetic data. We consider four different dynamics in 2D space: (i) a straight line, (ii) a sine wave, (iii) a circle, and (iv) a swiss role. Note that we do not add additional states such as velocity, keeping the dynamics nonlinear except for the first case. Data points are generated by adding zero mean Gaussian noise to the true underlying dynamics. The true dynamics and the noisy observations are plotted in the top row of Figure 2. The first $60 \\%$ of the sequence is used for training and the rest is left for testing. ",
1313
+ "bbox": [
1314
+ 174,
1315
+ 670,
1316
+ 825,
1317
+ 751
1318
+ ],
1319
+ "page_idx": 7
1320
+ },
1321
+ {
1322
+ "type": "text",
1323
+ "text": "The middle and bottom row of Figure 2 show the result of SSL and vanilla LSTM trained for same number of iterations until both are sufficiently converged. The red points refer to the prediction of $z _ { t }$ after observing $x _ { 1 : t }$ , and the green points are blind predictions without observing any data. We can observe that while both methods are capturing the dynamics well in general, the predictions of LSTM tend to be more sensitive to initial predictions. In contrast, even when the initial predictions are not incorrect, SSL can recover in the end by remaining on the latent dynamic. ",
1324
+ "bbox": [
1325
+ 174,
1326
+ 757,
1327
+ 825,
1328
+ 839
1329
+ ],
1330
+ "page_idx": 7
1331
+ },
1332
+ {
1333
+ "type": "text",
1334
+ "text": "5.2 LANGUAGE MODELING ",
1335
+ "text_level": 1,
1336
+ "bbox": [
1337
+ 176,
1338
+ 856,
1339
+ 377,
1340
+ 871
1341
+ ],
1342
+ "page_idx": 7
1343
+ },
1344
+ {
1345
+ "type": "text",
1346
+ "text": "For Topical SSL, we compare our SMC inference method with the factored old algorithm (Zaheer et al., 2017) on the publicly available Wikipedia dataset, where documents with less than 500 words are excluded and the most frequent $2 0 0 \\mathrm { k }$ word types are retained. We train on the first $60 \\%$ of the documents and test on the rest, using the same settings in Zaheer et al. (2017). Figure 3 shows the test perplexity (lower is better) and number of nonzeros in the learned word topic count matrix (lower is better). In all cases, the SMC inference method consistently outperforms the old factored method. For comparison, we also run LSTM with the same number of parameters, which gives the lowest test perplexity of 1942.26. However, we note that LSTM needs to perform expensive linear transformation for both embedding and softmax at every step, which depends linearly on the vocabulary size $V$ . In contrast, SSL only depends linearly on number of topics $K \\ll V$ . ",
1347
+ "bbox": [
1348
+ 176,
1349
+ 882,
1350
+ 823,
1351
+ 924
1352
+ ],
1353
+ "page_idx": 7
1354
+ },
1355
+ {
1356
+ "type": "image",
1357
+ "img_path": "images/0c177253ec0fa3f9b37445f369bed90a7cc1bf22a44e3659e7e2d49ed6e251a6.jpg",
1358
+ "image_caption": [
1359
+ "Figure 3: Comparison of the new inference method based on SMC to the older one assuming factored model. The top row represents perplexity on the held out set and the lower row represents the non zero entries in the word-topic count matrix. Lower perplexity indicates a better fit to the data and lower NNZ results in a sparser model and usually having better generalization. "
1360
+ ],
1361
+ "image_footnote": [],
1362
+ "bbox": [
1363
+ 184,
1364
+ 108,
1365
+ 815,
1366
+ 345
1367
+ ],
1368
+ "page_idx": 8
1369
+ },
1370
+ {
1371
+ "type": "text",
1372
+ "text": "",
1373
+ "bbox": [
1374
+ 173,
1375
+ 452,
1376
+ 825,
1377
+ 546
1378
+ ],
1379
+ "page_idx": 8
1380
+ },
1381
+ {
1382
+ "type": "text",
1383
+ "text": "Ablation study We also want to explore the benefit of the newer inference as dataset size increases. We observe that in case of natural languages which are highly structured the gap between factored approximation and accurate SMC keeps reducing as dataset size increases. But as we will see in case of user modeling when the dataset is less structured, the factored as",
1384
+ "bbox": [
1385
+ 174,
1386
+ 554,
1387
+ 387,
1388
+ 741
1389
+ ],
1390
+ "page_idx": 8
1391
+ },
1392
+ {
1393
+ "type": "image",
1394
+ "img_path": "images/c781e093801aa6ca163e3cfd923825e549e0a8c317268fc40d76c6def88f5fb6.jpg",
1395
+ "image_caption": [
1396
+ "Figure 4: Comparison between SMC and factored algorithm bysumption leads to poorer perforvarying number of topics and documentsmance. Also when the data size is fixed and the number of topics are varying, the SMC algorithm gives better perplexity compared to the old algorithm. Therefore we the SMC inference is consistently better in various settings. "
1397
+ ],
1398
+ "image_footnote": [],
1399
+ "bbox": [
1400
+ 401,
1401
+ 569,
1402
+ 821,
1403
+ 704
1404
+ ],
1405
+ "page_idx": 8
1406
+ },
1407
+ {
1408
+ "type": "text",
1409
+ "text": "Visualizing particle paths In Figure 5, we show the particle paths on a snippet of an article about a music album 1. As we can see from the top row, which plots the particle paths at the initial iteration, the model proposed a number of candidate topic sequences since it is uncertain about the latent semantics yet. However, after 100 epochs, as we can see from the bottom row, the model is much more confident about the underlying topical transition. Moreover, by inspecting the learned parameters $\\phi$ of the probabilistic emission, we can see that the topics are highly concentrated on topics related to music and time. This confirms our claim about flexible sequence modeling while retaining interpretability. ",
1410
+ "bbox": [
1411
+ 174,
1412
+ 786,
1413
+ 825,
1414
+ 895
1415
+ ],
1416
+ "page_idx": 8
1417
+ },
1418
+ {
1419
+ "type": "image",
1420
+ "img_path": "images/d05a137be6025677c0f4232c7cc46782d72893ccaae0dacc34808e142402d1ff.jpg",
1421
+ "image_caption": [
1422
+ "Figure 5: Particle paths of a document about a music album. Top row: at epoch 1. Bottom row: at epoch 100. After epoch 100 the document has converged to a sparse set of relevant topics. "
1423
+ ],
1424
+ "image_footnote": [],
1425
+ "bbox": [
1426
+ 183,
1427
+ 109,
1428
+ 808,
1429
+ 344
1430
+ ],
1431
+ "page_idx": 9
1432
+ },
1433
+ {
1434
+ "type": "text",
1435
+ "text": "5.3 USER MODELING ",
1436
+ "text_level": 1,
1437
+ "bbox": [
1438
+ 176,
1439
+ 421,
1440
+ 336,
1441
+ 435
1442
+ ],
1443
+ "page_idx": 9
1444
+ },
1445
+ {
1446
+ "type": "text",
1447
+ "text": "We use an anonymized sample of user search click history to measure the accuracy of different models on predicting users future clicks. An accurate model would enable better user experience by presenting the user with relevant content. The dataset is anonymized by removing all items appearing less than a given threshold, this results in a dataset with 100K vocabulary and we vary the number of users from 500K to 1M. ",
1448
+ "bbox": [
1449
+ 174,
1450
+ 448,
1451
+ 825,
1452
+ 515
1453
+ ],
1454
+ "page_idx": 9
1455
+ },
1456
+ {
1457
+ "type": "text",
1458
+ "text": "We fix the number of topics at 500 for all user experiments. We used the same setup to the one used in the experiments over the Wikipedia dataset for parameters. The dataset is less structured than the language modeling task since users click patterns are less predictable than the sequence of words which follow definite syntactic rules. As shown in table 1, the benefit of new inference method is highlighted as it yields much lower perplexity than the factored model. ",
1459
+ "bbox": [
1460
+ 174,
1461
+ 516,
1462
+ 552,
1463
+ 636
1464
+ ],
1465
+ "page_idx": 9
1466
+ },
1467
+ {
1468
+ "type": "table",
1469
+ "img_path": "images/5290a6648df06ab7817e3dc38a6c9a6263fd1c53e41722f8cd57266d7faa7619.jpg",
1470
+ "table_caption": [
1471
+ "Table 1: Comparison on user data "
1472
+ ],
1473
+ "table_footnote": [],
1474
+ "table_body": "<table><tr><td rowspan=\"2\">Algorithm</td><td colspan=\"2\">#Users</td></tr><tr><td>500k</td><td>1M</td></tr><tr><td>Factored</td><td>2430</td><td>2254</td></tr><tr><td>SMC</td><td>1464</td><td>1447</td></tr></table>",
1475
+ "bbox": [
1476
+ 593,
1477
+ 531,
1478
+ 790,
1479
+ 589
1480
+ ],
1481
+ "page_idx": 9
1482
+ },
1483
+ {
1484
+ "type": "text",
1485
+ "text": "6 DISCUSSIONS & CONCLUSION ",
1486
+ "text_level": 1,
1487
+ "bbox": [
1488
+ 176,
1489
+ 656,
1490
+ 459,
1491
+ 671
1492
+ ],
1493
+ "page_idx": 9
1494
+ },
1495
+ {
1496
+ "type": "text",
1497
+ "text": "In this paper we revisited the problem of posterior inference in Latent LSTM models as introduced in Zaheer et al. (2017). We generalized their model to accommodate a wide variety of state space models and most importantly we provided a more principled Sequential Monte-Carlo (SMC) algorithm for posterior inference. Although the newly proposed inference method can be slower, we showed over a variety of dataset that the new SMC based algorithm is far superior and more stable. While computation of the new SMC algorithm scales linearly with the number of particles, this can be naively parallelized. In the future we plan to extend our work to incorporate a wider class of dynamically changing structured objects such as time-evolving graphs. ",
1498
+ "bbox": [
1499
+ 173,
1500
+ 686,
1501
+ 825,
1502
+ 796
1503
+ ],
1504
+ "page_idx": 9
1505
+ },
1506
+ {
1507
+ "type": "text",
1508
+ "text": "REFERENCES ",
1509
+ "text_level": 1,
1510
+ "bbox": [
1511
+ 174,
1512
+ 103,
1513
+ 287,
1514
+ 117
1515
+ ],
1516
+ "page_idx": 10
1517
+ },
1518
+ {
1519
+ "type": "text",
1520
+ "text": "Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, and Others. TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems. arXiv preprint arXiv:1603.04467, 2016. ",
1521
+ "bbox": [
1522
+ 176,
1523
+ 125,
1524
+ 823,
1525
+ 167
1526
+ ],
1527
+ "page_idx": 10
1528
+ },
1529
+ {
1530
+ "type": "text",
1531
+ "text": "Christophe Andrieu, Arnaud Doucet, and Roman Holenstein. Particle Markov chain Monte Carlo methods. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 72(3):269– 342, 2010. ",
1532
+ "bbox": [
1533
+ 174,
1534
+ 176,
1535
+ 823,
1536
+ 217
1537
+ ],
1538
+ "page_idx": 10
1539
+ },
1540
+ {
1541
+ "type": "text",
1542
+ "text": "Evan Archer, Il Memming Park, Lars Buesing, John P. Cunningham, and Liam Paninski. Black box variational inference for state space models. arXiv preprint arXiv:1511.07367, 2015. ",
1543
+ "bbox": [
1544
+ 171,
1545
+ 226,
1546
+ 823,
1547
+ 256
1548
+ ],
1549
+ "page_idx": 10
1550
+ },
1551
+ {
1552
+ "type": "text",
1553
+ "text": "Justin Bayer and Christian Osendorfer. Learning Stochastic Recurrent Networks. arXiv preprint arXiv:1411.7610, 2014. ",
1554
+ "bbox": [
1555
+ 171,
1556
+ 263,
1557
+ 823,
1558
+ 292
1559
+ ],
1560
+ "page_idx": 10
1561
+ },
1562
+ {
1563
+ "type": "text",
1564
+ "text": "Christopher M. Bishop. Mixture Density Networks. Technical report, 1994. ",
1565
+ "bbox": [
1566
+ 174,
1567
+ 300,
1568
+ 673,
1569
+ 316
1570
+ ],
1571
+ "page_idx": 10
1572
+ },
1573
+ {
1574
+ "type": "text",
1575
+ "text": "David M. Blei, Andrew Y. $\\mathrm { N g }$ , and Michael I. Jordan. Latent Dirichlet Allocation. Journal of Machine Learning Research, 3:993–1022, 2003. ISSN 15324435. ",
1576
+ "bbox": [
1577
+ 174,
1578
+ 324,
1579
+ 825,
1580
+ 353
1581
+ ],
1582
+ "page_idx": 10
1583
+ },
1584
+ {
1585
+ "type": "text",
1586
+ "text": "Nicolas Boulanger-Lewandowski, Yoshua Bengio, and Pascal Vincent. Modeling Temporal Dependencies in High-Dimensional Sequences: Application to Polyphonic Music Generation and Transcription. In ICML, 2012. ",
1587
+ "bbox": [
1588
+ 174,
1589
+ 362,
1590
+ 823,
1591
+ 404
1592
+ ],
1593
+ "page_idx": 10
1594
+ },
1595
+ {
1596
+ "type": "text",
1597
+ "text": "Junyoung Chung, Kyle Kastner, Laurent Dinh, Kratarth Goel, Aaron Courville, and Yoshua Bengio. A Recurrent Latent Variable Model for Sequential Data. In NIPS, 2015. ",
1598
+ "bbox": [
1599
+ 174,
1600
+ 411,
1601
+ 823,
1602
+ 440
1603
+ ],
1604
+ "page_idx": 10
1605
+ },
1606
+ {
1607
+ "type": "text",
1608
+ "text": "Arnaud Doucet, Nando de Freitas, and Neil Gordon. Sequential Monte Carlo Methods in Practice. Springer, 2001. ",
1609
+ "bbox": [
1610
+ 174,
1611
+ 449,
1612
+ 821,
1613
+ 478
1614
+ ],
1615
+ "page_idx": 10
1616
+ },
1617
+ {
1618
+ "type": "text",
1619
+ "text": "Marco Fraccaro, Søren Kaae Sønderby, Ulrich Paquet, and Ole Winther. Sequential Neural Models with Stochastic Layers. In NIPS, 2016. ",
1620
+ "bbox": [
1621
+ 173,
1622
+ 486,
1623
+ 823,
1624
+ 515
1625
+ ],
1626
+ "page_idx": 10
1627
+ },
1628
+ {
1629
+ "type": "text",
1630
+ "text": "Roger Frigola, Fredrik Lindsten, Thomas B. Schon, and Carl E. Rasmussen. Bayesian Inference and ¨ Learning in Gaussian Process State-Space Models with Particle MCMC. In NIPS, 2013. ",
1631
+ "bbox": [
1632
+ 174,
1633
+ 523,
1634
+ 823,
1635
+ 553
1636
+ ],
1637
+ "page_idx": 10
1638
+ },
1639
+ {
1640
+ "type": "text",
1641
+ "text": "Zoubin Ghahramani and Geoffrey E. Hinton. Parameter estimation for linear dynamical systems. Technical report, 1996. ",
1642
+ "bbox": [
1643
+ 174,
1644
+ 560,
1645
+ 823,
1646
+ 589
1647
+ ],
1648
+ "page_idx": 10
1649
+ },
1650
+ {
1651
+ "type": "text",
1652
+ "text": "Zoubin Ghahramani and Sam T. Roweis. Learning Nonlinear Dynamical Systems using an EM Algorithm. In NIPS, 1999. ",
1653
+ "bbox": [
1654
+ 174,
1655
+ 598,
1656
+ 823,
1657
+ 627
1658
+ ],
1659
+ "page_idx": 10
1660
+ },
1661
+ {
1662
+ "type": "text",
1663
+ "text": "Karol Gregor, Ivo Danihelka, Alex Graves, Danilo Jimenez Rezende, and Daan Wierstra. DRAW: A Recurrent Neural Network For Image Generation. In ICML, 2015. ",
1664
+ "bbox": [
1665
+ 176,
1666
+ 635,
1667
+ 823,
1668
+ 664
1669
+ ],
1670
+ "page_idx": 10
1671
+ },
1672
+ {
1673
+ "type": "text",
1674
+ "text": "Sepp Hochreiter and Jurgen Schmidhuber. Long Short-Term Memory. ¨ Neural Computation, 9(8): 1735–1780, 1997. ",
1675
+ "bbox": [
1676
+ 174,
1677
+ 671,
1678
+ 823,
1679
+ 700
1680
+ ],
1681
+ "page_idx": 10
1682
+ },
1683
+ {
1684
+ "type": "text",
1685
+ "text": "Matthew J. Johnson, David Duvenaud, Alexander B. Wiltschko, Sandeep R. Datta, and Ryan P. Adams. Composing graphical models with neural networks for structured representations and fast inference. In NIPS, 2016. ",
1686
+ "bbox": [
1687
+ 174,
1688
+ 709,
1689
+ 823,
1690
+ 751
1691
+ ],
1692
+ "page_idx": 10
1693
+ },
1694
+ {
1695
+ "type": "text",
1696
+ "text": "Simon J. Julier and Jeffrey K. Uhlmann. A new extension of the Kalman filter to nonlinear systems. In Int. symp. aerospace/defense sensing, simul. and controls1, 1997. ",
1697
+ "bbox": [
1698
+ 171,
1699
+ 760,
1700
+ 823,
1701
+ 789
1702
+ ],
1703
+ "page_idx": 10
1704
+ },
1705
+ {
1706
+ "type": "text",
1707
+ "text": "Rudolph Emil Kalman. A New Approach to Linear Filtering and Prediction Problems. Journal of Basic Engineering, 82(1):35–45, 1960. ISSN 00219223. ",
1708
+ "bbox": [
1709
+ 173,
1710
+ 797,
1711
+ 823,
1712
+ 827
1713
+ ],
1714
+ "page_idx": 10
1715
+ },
1716
+ {
1717
+ "type": "text",
1718
+ "text": "Maximilian Karl, Maximilian Soelch, Justin Bayer, and Patrick van der Smagt. Deep variational Bayes filters: Unsupervised learning of state space models from raw data. In ICLR, 2017. ",
1719
+ "bbox": [
1720
+ 173,
1721
+ 834,
1722
+ 823,
1723
+ 863
1724
+ ],
1725
+ "page_idx": 10
1726
+ },
1727
+ {
1728
+ "type": "text",
1729
+ "text": "Andrej Karpathy, Justin Johnson, and Li Fei-Fei. Visualizing and understanding recurrent networks. arXiv preprint arXiv:1506.02078, 2015. ",
1730
+ "bbox": [
1731
+ 173,
1732
+ 871,
1733
+ 825,
1734
+ 900
1735
+ ],
1736
+ "page_idx": 10
1737
+ },
1738
+ {
1739
+ "type": "text",
1740
+ "text": "Diederik P. Kingma and Max Welling. Auto-Encoding Variational Bayes. In ICLR, 2014. ",
1741
+ "bbox": [
1742
+ 169,
1743
+ 909,
1744
+ 759,
1745
+ 924
1746
+ ],
1747
+ "page_idx": 10
1748
+ },
1749
+ {
1750
+ "type": "text",
1751
+ "text": "Daphne Koller and Nir Friedman. Probabilistic Graphical Models: Principles and Techniques. MIT Press, 2009. \nRahul G. Krishnan, Uri Shalit, and David Sontag. Deep Kalman Filters. arXiv preprint arXiv:1511.05121, 2015. \nRahul G. Krishnan, Uri Shalit, and David Sontag. Structured Inference Networks for Nonlinear State Space Models. In AAAI, 2017. \nTuan Anh Le, Maximilian Igl, Tom Jin, Tom Rainforth, and Frank Wood. Auto-Encoding Sequential Monte Carlo. arXiv preprint arXiv:1705.10306, 2017. \nFredrik Lindsten. An efficient stochastic approximation EM algorithm using conditional particle filters. In ICASSP, 2013. \nFredrik Lindsten, Michael I. Jordan, and Thomas B. Schon. Particle Gibbs with Ancestor Sampling. ¨ Journal of Machine Learning Research, 15(1):2145–2184, 2014. ISSN 10495258. \nChris J. Maddison, Dieterich Lawson, George Tucker, Nicolas Heess, Mohammad Norouzi, Andriy Mnih, Arnaud Doucet, and Yee Whye Teh. Filtering Variational Objectives. In NIPS, 2017. \nFrederic Morin and Yoshua Bengio. Hierarchical probabilistic neural network language model. In AISTATS, 2005. \nChristian A. Naesseth, Scott W. Linderman, Rajesh Ranganath, and David M. Blei. Variational Sequential Monte Carlo. arXiv preprint arXiv:1705.11140, 2017. \nMarius Pachitariu and Maneesh Sahani. Learning visual motion in recurrent neural networks. In NIPS, 2012. \nHerbert E. Rauch, F. Tung, and Charlotte T. Striebel. Maximum likelihood estimates of linear dynamic systems. AIAA Journal, 3(8):1445–1450, 1965. ISSN 0001-1452. \nDanilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic Backpropagation and Approximate Inference in Deep Generative Models. In ICML, 2014. \nThomas B. Schon, Fredrik Lindsten, Johan Dahlin, Johan W ¨ agberg, Christian A. Naesseth, Andreas ˚ Svensson, and Liang Dai. Sequential Monte Carlo Methods for System Identification. In IFAC Symposium on System Identification (SYSID), 2015. \nRuslan L. Stratonovich. Conditional markov processes. Theory of Probability and Its Applications, 5(2):156–178, 1960. \nManzil Zaheer, Amr Ahmed, and Alexander J. Smola. Latent LSTM Allocation: Joint Clustering and Non-Linear Dynamic Modeling of Sequence Data. In ICML, 2017. ",
1752
+ "bbox": [
1753
+ 171,
1754
+ 84,
1755
+ 826,
1756
+ 669
1757
+ ],
1758
+ "page_idx": 11
1759
+ }
1760
+ ]
parse/train/r1drp-WCZ/r1drp-WCZ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/r1drp-WCZ/r1drp-WCZ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/txC1ObHJ0wB/txC1ObHJ0wB.md ADDED
@@ -0,0 +1,279 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # HOW TO TRAIN YOUR SUPER-NET: AN ANALYSIS OF TRAINING HEURISTICS IN WEIGHT-SHARING NAS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Weight sharing promises to make neural architecture search (NAS) tractable even on commodity hardware. Existing methods in this space rely on a diverse set of heuristics to design and train the shared-weight backbone network, a.k.a. the supernet. Since heuristics substantially vary across different methods and have not been carefully studied, it is unclear to which extent they impact super-net training and hence the weight-sharing NAS algorithms. In this paper, we disentangle super-net training from the search algorithm, isolate 14 frequently-used training heuristics, and evaluate them over three benchmark search spaces. Our analysis uncovers that several commonly-used heuristics negatively impact the correlation between supernet and stand-alone performance, whereas simple, but often overlooked factors, such as proper hyper-parameter settings, are key to achieve strong performance. Equipped with this knowledge, we show that simple random search achieves competitive performance to complex state-of-the-art NAS algorithms when the super-net is properly trained.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Neural architecture search (NAS) has received growing attention in the past few years, yielding stateof-the-art performance on several machine learning tasks (Liu et al., 2019a; Wu et al., 2019; Chen et al., 2019b; Ryoo et al., 2020). One of the milestones that led to the popularity of NAS is weight sharing (Pham et al., 2018; Liu et al., 2019b), which, by allowing all possible network architectures to share the same parameters, has reduced the computational requirements from thousands of GPU hours to just a few. Figure 1 shows the two phases that are common to weight-sharing NAS (WS-NAS) algorithms: the search phase, including the design of the search space and the search algorithm; and the evaluation phase, which encompasses the final training protocol on the proxy task 1.
12
+
13
+ While most works focus on developing a good sampling algorithm (Cai et al., 2019; Xie et al., 2019) or improving existing ones (Zela et al., 2020a; Nayman et al., 2019; Li et al., 2020), they tend to overlook or gloss over important factors related to the design and training of the shared-weight backbone network, i.e. the super-net. For example, the literature encompasses significant variations of learning hyper-parameter settings, batch normalization and dropout usage, capacities for the initial layers of the network, and depth of the super-net. Furthermore, some of these heuristics are directly transferred from standalone network training to super-net training without carefully studying their impact in this drastically different scenario. For example, the fundamental assumption of batch normalization that the input data follows a slowly changing distribution whose statistics can be tracked during training is violated in WS-NAS, but nonetheless typically assumed to hold.
14
+
15
+ In this paper, we revisit and systematically evaluate commonly-used super-net design and training heuristics and uncover the strong influence of certain factors on the success of super-net training. To this end, we leverage three benchmark search spaces, NASBench-101 (Ying et al., 2019), NASBench201 (Dong & Yang, 2020), and DARTS-NDS (Radosavovic et al., 2019), for which the ground-truth stand-alone performance of a large number of architectures is available. We report the results of our experiments according to two sets of metrics: i) metrics that directly measure the quality of the super-net, such as the widely-adopted super-net accuracy 2 and a modified Kendall-Tau correlation between the searched architectures and their ground-truth performance, which we refer to as sparse
16
+
17
+ ![](images/8c9f1fb332802d0a69c31ec05ae6a3107427c64b71219d8cedb6fb6cc6b9ad2a.jpg)
18
+ Figure 1: WS-NAS benchmarking. Green blocks indicate which aspects of NAS are benchmarked in different works. A search algorithm usually consists of a search space that encompass many architectures, and a policy to select the best one. $P$ indicates a training protocol, and $f$ a mapping function from the search space to a neural network. (a) Early works fixed and compared the metrics on the proxy task, which doesn’t allow for a holistic comparison between algorithms. $\mathbf { ( b ) }$ The NASBench benchmark series partially alleviates the problem by sharing the stand-alone training protocol and search space across algorithms. However, the design of the weight-sharing search space and training protocol is still not controlled. (c) We fill this gap by benchmarking existing techniques to construct and train the shared-weight backbone. We provide a controlled evaluation across three benchmark spaces.
19
+
20
+ Kendall-Tau; ii) proxy metrics such as the ability to surpass random search and the stand-alone accuracy of the model found by the WS-NAS algorithm.
21
+
22
+ Via our extensive experiments (over 700 GPU days), we uncover that (i) the training behavior of a super-net drastically differs from that of a standalone network, e.g., in terms of feature statistics and loss landscape, thus allowing us to define training factor settings, e.g., for batch-normalization (BN) and learning rate, that are better suited for super-nets; (ii) while some neglected factors, such as the number of training epochs, have a strong impact on the final performance, others, believed to be important, such as path sampling, only have a marginal effect, and some commonly-used heuristics, such as the use of low-fidelity estimates, negatively impact it; (iii) the commonly-adopted super-net accuracy is unreliable to evaluate the super-net quality.
23
+
24
+ Altogether, our work is the first to systematically analyze the impact of the diverse factors of super-net design and training, and we uncover the factors that are crucial to design a super-net, as well as the non-important ones. Aggregating these findings allows us to boost the performance of simple weight-sharing random search to the point where it reaches that of complex state-of-the-art NAS algorithms across all tested search spaces. We will release our code and trained models so as to establish a solid baseline to facilitate further research.
25
+
26
+ # 2 PRELIMINARIES AND RELATED WORK
27
+
28
+ We first introduce the necessary concepts that will be used throughout the paper. As shown in Figure $1 ( a )$ , weight-sharing NAS algorithms consist of three key components: a search algorithm that samples an architecture from the search space in the form of an encoding, a mapping function $f _ { p r o x y }$ that maps the encoding into its corresponding neural network, and a training protocol for a proxy task $P _ { p r o x y }$ for which the network is optimized.
29
+
30
+ To train the search algorithm, one needs to additionally define the mapping function $f _ { w s }$ that generates the shared-weight network. Note that the mapping $f _ { p r o x y }$ frequently differs from $f _ { w s }$ , since in practice the final model contains many more layers and parameters so as to yield competitive results on the proxy task. After fixing $f _ { w s }$ , a training protocol $P _ { w s }$ is required to learn the super-net. In practice, $P _ { w s }$ often hides factors that are critical for the final performance of an approach, such as hyper-parameter settings or the use of data augmentation strategies to achieve state-of-the-art performance (Liu et al., 2019b; Chu et al., 2019; Zela et al., 2020a). Again, $P _ { w s }$ may differ from $P _ { p r o x y }$ , which is used to train the architecture that has been found by the search. For example, our experiments reveal that the learning rate and the total number of epochs frequently differ due to the different training behavior of the super-net and stand-alone architectures.
31
+
32
+ Many strategies have been proposed to implement the search algorithm, such as reinforcement learning (Zoph & Le, 2017; Zoph et al., 2018), evolutionary algorithms (Real et al., 2017; Miikkulainen et al., 2019; So et al., 2019; Liu et al., 2018; Lu et al., 2018), gradient-based optimization (Liu et al., 2019b; Xu et al., 2020; Li et al., 2020), Bayesian optimization (Kandasamy et al., 2018; Jin et al., 2019; Zhou et al., 2019; Wang et al., 2020), and separate performance predictors (Liu et al., 2018; Luo et al., 2018). Until very recently, the common trend to evaluate NAS consisted of reporting the searched architecture’s performance on the proxy task (Xie et al., 2019; Real et al., 2019; Ryoo et al., 2020). This, however, hardly provides real insights about the NAS algorithms themselves, because of the many components involved in them. Many factors that differ from one algorithm to another can influence the performance. In practice, the literature even commonly compares NAS methods that employ different protocols to train the final model.
33
+
34
+ Li & Talwalkar (2019) and Yu et al. (2020b) were the first to systematically compare different algorithms with the same settings for the proxy task and using several random initializations. Their surprising results revealed that many NAS algorithms produce architectures that do not significantly outperform a randomly-sampled architecture. Yang et al. (2020) highlighted the importance of the training protocol $P _ { p r o x y }$ . They showed that optimizing the training protocol can improve the final architecture performance on the proxy task by three percent on CIFAR-10. This non-trivial improvement can be achieved regardless of the chosen sampler, which provides clear evidence for the importance of unifying the protocol to build a solid foundation for comparing NAS algorithms.
35
+
36
+ In parallel to this line of research, the recent series of “NASBench” works (Ying et al., 2019; Zela et al., 2020b; Dong & Yang, 2020) proposed to benchmark NAS approaches by providing a complete, tabular characterization of a search space. This was achieved by training every realizable stand-alone architecture using a fixed protocol $P _ { p r o x y }$ . Similarly, other works proposed to provide a partial characterization by sampling and training a sufficient number of architectures in a given search space using a fixed protocol (Radosavovic et al., 2019; Zela et al., 2020a; Wang et al., 2020).
37
+
38
+ While recent advances for systematic evaluation are promising, no work has yet thoroughly studied the influence of the super-net training protocol $P _ { w s }$ and the mapping function $f _ { w s }$ . Previous works (Zela et al., 2020a; Li & Talwalkar, 2019) performed hyper-parameter tuning to evaluate their own algorithms, and focused only on a few parameters. We fill this gap by benchmarking different choices of $P _ { w s }$ and $f _ { w s }$ and by proposing novel variations to improve the super-net quality.
39
+
40
+ Recent works have shown that sub-nets of super-net training can surpass some human designed models without retraining (Yu et al., 2020a; Cai et al., 2020) and that reinforcement learning can surpass the performance of random search (Bender et al., 2020). However, these findings are still only shown on MobileNet-like search spaces where we only search for the size of convolution kernels and the channel ratio for each layer. This is an effective approach to discover a compact network, but it does not change the fact that on cell-based search space super-net quality remains low.
41
+
42
+ # 3 EVALUATION METHODOLOGY
43
+
44
+ We first isolate 14 factors that need to be considered during the design and training of a super-net, and then introduce the metrics to evaluate the quality of the trained super-net. Note that these factors are agnostic to the search policy that is used after training the super-net.
45
+
46
+ # 3.1 DISENTANGLING THE SUPER-NET FROM THE SEARCH ALGORITHM
47
+
48
+ Our goal is to evaluate the influence of the super-net mapping $f _ { w s }$ and weight-sharing training protocol $P _ { w s }$ . As shown in Figure 2, $f _ { w s }$ translates an architecture encoding, which typically consists of a discrete number of choices or parameters, into a neural network. Based on a well-defined mapping, the super-net is a network in which every sub-path has a one-to-one mapping with an architecture encoding (Pham et al., 2018). Recent works $\mathrm { { X u } }$ et al., 2020; Li et al., 2020; Ying et al.,
49
+
50
+ Table 1: Summary of factors
51
+
52
+ <table><tr><td colspan="2">WS Mapping fws</td><td colspan="2">WS Protocol Pws</td></tr><tr><td>implementation</td><td>low fidelity</td><td>hyperparam.</td><td>sampling</td></tr><tr><td>Dynamic Channeling OFA Conv WSBN Dropout</td><td>#layer train portion batch size # channels</td><td>batch-norm learning rate epochs weight decay</td><td>FairNAS Random-NAS Random-A</td></tr></table>
53
+
54
+ ![](images/463271dd9cea14da998c14fcf209e360895a954aa979a36fcfdd692e498d3c94.jpg)
55
+ Figure 2: Constructing a super-net
56
+
57
+ 2019) separate the encoding into cell parameters, which define the basic building blocks of a network, and macro parameters, which define how cells are assembled into a complete architecture.
58
+
59
+ Weight-sharing mapping $f _ { w s }$ . To make the search space manageable, all cell and macro parameters are fixed during the search, except for the topology of the cell and its possible operations. However, the exact choices for each of these fixed factors differ between algorithms and search spaces. We report the common factors in the left part of Table 1. They include various implementation choices, e.g., the use of convolutions with a dynamic number of channels (Dynamic Channeling), super-convolutional layers that support dynamic kernel sizes (OFA Kernel) (Cai et al., 2020), weight-sharing batchnormalization (WSBN) that tracks independent running statistics and affine parameters for different incoming edges (Luo et al., 2018), and path and global dropout (Pham et al., 2018; Luo et al., 2018; Liu et al., 2019b). They also include the use of low-fidelity estimates (Elsken et al., 2019) to reduce the complexity of super-net training, e.g., by reducing the number of layers (Liu et al., 2019b) and channels (Yang et al., 2020; Chen et al., 2019a), the portion of the training set used for super-net training (Liu et al., 2019b), or the batch size (Liu et al., 2019b; Pham et al., 2018; Yang et al., 2020).
60
+
61
+ Weight-sharing protocol $P _ { w s }$ . Given a mapping $f _ { w s }$ , different training protocols $P _ { w s }$ can be employed to train the super-net. Protocols can differ in the training hyper-parameters and the sampling strategies they rely on. We will evaluate the different hyper-parameter choices listed in the right part of Table 1. This includes the initial learning rate, the hyper-parameters of batch normalization, the total number of training epochs, and the amount of weight decay.
62
+
63
+ We randomly sample one path to train the super-net (Guo et al., 2019), which is also known as single-path one-shot (SPOS) or Random-NAS (Li & Talwalkar, 2019). The reason for this choice is that Random-NAS is equivalent to the initial state of many search algorithms (Liu et al., 2019b; Pham et al., 2018; Luo et al., 2018), some of which even freeze the sampler training so as to use random sampling to warm-up the super-net (Xu et al., 2020; Dong & Yang, 2019b). Note that we also evaluated two variants of Random-NAS, but found their improvement to be only marginal. Please see Appendix C.2 for more detail.
64
+
65
+ In our experiments, for the sake of reproducibility, we ensure that $P _ { w s }$ and $P _ { p r o x y }$ , as well as $f _ { w s }$ and $f _ { p r o x y }$ , are as close to each other as possible. For the hyper-parameters of $P _ { w s }$ , we cross-validate each factor following the order in Table 1, and after each validation, use the value that yields the best performance in $P _ { p r o x y }$ . For all other factors, we change one factor at a time.
66
+
67
+ Search spaces. We use three commonly-used search spaces, for which a large number of stand-alone architectures have been trained and evaluated on CIFAR-10 (Krizhevsky et al., 2009) to obtain their ground-truth performance. In particular, we use NASBench-101 (Ying et al., 2019), which consists of 423, 624 architectures and is compatible with weight-sharing NAS (Yu et al., 2020b; Zela et al., 2020b); NASBench-201 (Dong & Yang, 2020), which contains more operations than NASBench-101 but fewer nodes; and DARTS-NDS (Radosavovic et al., 2019) that contains over $1 0 ^ { 1 3 }$ architectures of which a subset of 5000 models was sampled and trained in a stand-alone fashion. See Appendix A.2 for a detailed discussion.
68
+
69
+ # 3.2 SPARSE KENDALL-TAU - A NOVEL SUPER-NET EVALUATION METRIC
70
+
71
+ We define a novel super-net metric, which we name sparse Kendall-Tau. It is inspired by the KendallTau metric used by Yu et al. (2020b) to measure the discrepancy between the ordering of stand-alone architectures and the ordering that is implied by the trained super-net. An ideal super-net should yield the same ordering of architectures as the stand-alone one and thus would lead to a high Kendall-Tau. However, Kendall-Tau is not robust to negligible performance differences between architectures (c.f. Figure 3). To robustify this metric, we share the rank between two architectures if their stand-alone
72
+
73
+ accuracies differ by less than a threshold $( 0 . 1 \%$ here). Since the resulting ranks are sparse, we call this metric sparse Kendall-Tau (s-KdT). Note that we also compare Kendall-Tau and Spearman correlation in Appendix A.3, and provide implementation details in Appendix A.4.
74
+
75
+ <table><tr><td></td><td>Kendall Tau</td></tr><tr><td>original</td><td>0.6444</td></tr><tr><td>sparse</td><td>0.8140</td></tr></table>
76
+
77
+ Although, sparse Kendall-Tau captures the super-net quality well, it may fail in extreme cases, such as when the top-performing architectures are ranked perfectly while poor ones are ordered randomly. To account for such rare situations and ensure the soundness of our analysis, we also report additional metrics. We define two groups of metrics to holistically evaluate different aspects of a trained super-net. The first
78
+
79
+ ![](images/833d29ee1aac1b8ac81197f787216600f0137c6ca77daf0ba561aada5ab69d2e.jpg)
80
+ Figure 3: Kendall-Tau vs sparse Kendall-Tau. Kendall-Tau is not robust when many architectures have similar performance. Minor performance differences can lead to large perturbations in the ranking. Our sparse Kendall-Tau alleviates this by dismissing minor differences in performance.
81
+
82
+ group of metrics directly evaluates the quality of the super-net, including sparse Kendall-Tau and the widely-adopted super-net accuracy. For the super-net accuracy, we report the average accuracy of 200 architectures on the validation set of the dataset of interest. We will refer to this metric simply as accuracy. It is frequently used (Guo et al., 2019; Chu et al., 2019) to assess the quality of the trained super-net, but we will show later that it is in fact a poor predictor of the final stand-alone performance. The metrics in the second group evaluate the search performance of a trained super-net. The first metric is the probability to surpass random search: Given the ground-truth rank $r$ of the best architecture found after $n$ runs and the maximum rank $r _ { m a x }$ , equal to the total number of architectures, the probability that the best architecture found is better than a randomly searched one is given by $p = 1 - \bar { ( 1 - ( r / r _ { m a x } ) ) ^ { n } }$ . Finally, where appropriate, we report the stand-alone accuracy of the model that was found by the complete WS-NAS algorithm. Concretely, we randomly sample 200 architectures, select the 3 best models based on the super-net accuracy and query the ground-truth performance. We then take the mean of these architectures as stand-alone accuracy. Note that the same architectures are used to compute the sparse Kendall-Tau.
83
+
84
+ # 4 ANALYSIS
85
+
86
+ We provide an analysis on the impact of the factors that are shown in Table 1 across three different search spaces. Note that, in this section, we present the factors that are the most important for performance; our analysis of the remaining factors is provided in Appendix C.
87
+
88
+ # 4.1 EVALUATION OF A SUPER-NET
89
+
90
+ The standalone performance of the architecture that is found by a NAS algorithm is clearly the most important metric to judge its merits. However, in practice, one cannot access this metric—we wouldn’t need NAS if standalone performance was easy to query (the cost of computing stand-alone performance is discussed in Appendix B.2). Furthermore, stand-alone performance inevitably depends the sampling policy, and does not directly evaluate the quality of the super-net (see Appendix B.3). Consequently, it is important to rely on metrics that are well correlated with the final performance but can be queried efficiently. To this end, we collect all our experiments and plot the pairwise correlation between final performance, sparse Kendall-Tau, and super-net accuracy. As shown in Figure 4, the super-net accuracy has a low
91
+
92
+ ![](images/9bbbf88b8ff46e3dc661ad3a1fb9b080e8445bd8a956a4fa0a17624818773028.jpg)
93
+ Figure 4: Super-net evaluation. We collect all experiments across 3 benchmark spaces. (Top) Pairwise plots of super-net accuracy, final performance, and the sparse Kendall-Tau. Each point corresponds to statistics computed over a trained super-net. (Bottom) Spearman correlation coefficients between the metrics.
94
+
95
+ correlation with the final performance on NASBench-101 and DARTS-NDS. Only on NASBench-201 does it reach a correlation of 0.52. The sparse Kendall-Tau yields a consistently higher correlation with the final performance. This is evidence that one should not focus too strongly on improving the super-net accuracy. While this metric remains computationally heavy, it serves as a middle ground that is feasible to evaluate in real-world applications.
96
+
97
+ In the following experiments, we thus mainly rely on sparse Kendall-Tau, and use final search performance as a reference only. We report the training details in Appendix B.1 and the complete results of all metrics in Appendix C.6.
98
+
99
+ # 4.2 BATCH NORMALIZATION IN THE SUPER-NET
100
+
101
+ Batch normalization (BN) is commonly used in standalone networks to allow for faster and more stable training. It is thus also employed in most CNN search spaces. However, BN behaves differently in the context of WS-NAS, and special care has to be taken when using it. In a standalone network (c.f. Figure 5 (Top)), a BN layer during training computes the batch statistics $\mu _ { B }$ and $\sigma _ { B }$ , normalizes the activations $f _ { A } ( x )$ as $( f _ { A } ( \boldsymbol { x } ) - \mu _ { B } ) / \sigma _ { B }$ , and finally updates the population statistics using a moving average. For instance, the mean statistics is updated as $\hat { \mu } \gamma \hat { \mu } + ( 1 - \gamma ) \mu _ { B }$ . At test time, the stored population statistics are used to normalize the feature map. In the standalone setting, both batch and population statistics are unbiased estimators of the population distribution $\mathcal { N } ( \mu , \sigma )$ .
102
+
103
+ ![](images/097b99a6ea8098381ddda49bd7da3b1612f5bd27425fd0a6d7d1e0d2d298b38e.jpg)
104
+ Figure 5: Batch normalization in standalone and super-net training.
105
+
106
+ By contrast, when training a super-net (Figure 5 (Bottom)) the population statistics that are computed based on the running average are not unbiased estimators of the population distribution, because the effective architecture before the BN layer varies in each epoch. More formally, let $f _ { A _ { i } }$ denote the $i$ -th architecture. During training, the batch statistics are computed as $\textstyle { \mu _ { B } ^ { i } = \sum _ { j } f _ { A _ { i } } ( \bar { x } _ { j } ) } / m$ , and the output feature follows the distribution $\mathcal { N } ( \mu _ { B } ^ { i } , \sigma _ { B } ^ { i } )$ , where the superscript $i$ indicates that the current batch statistics depends on $A _ { i }$ only. The population mean statistics is then updated as $\hat { \mu } \gamma \hat { \mu } + ( 1 - \gamma ) \mu _ { B } ^ { i }$ . However, during training, different architecture from the super-net are sampled. Therefore, the population mean statistics essentially becomes a weighted combination of means from different architectures, i.e., $\bar { \mu } \textstyle \sum { \alpha _ { i } \mu _ { B } ^ { i } } = \textstyle \sum { \alpha _ { i } f _ { A _ { i } } ( x ) }$ , where $\alpha _ { i }$ is the sampling frequency of the $i$ -th architecture. When evaluating a specific architecture $A _ { i }$ at test time, the estimated population statistics thus depend on the other architectures in the super-net. This leads to a train-test discrepancy. One solution to mitigate this problem is to re-calibrate the batch statistics by recomputing the statistics on the entire training set before the the final evaluation (Yu & Huang, 2019). While the cost of doing so is negligible for a standalone network, NAS algorithms typically sample $\sim 1 0 ^ { 5 }$ architectures for evaluation, which makes this approach intractable.
107
+
108
+ ![](images/88a8290dd3f707ce7e1e63af3e468cae9961027ebdce1bdfa8ae1bf61800e9af.jpg)
109
+ Figure 6: Validation of BN.
110
+
111
+ In contrast to Dong & Yang (2020) and Bender et al. (2020) who use the training mode also during testing, we formalize a simple, yet effective, approach to tackle the train-test discrepancy of BN in super-net training: we leave the normalization based on batch statistics during training unchanged, but use batch statistics also during testing. Since super-net evaluation is always conducted over a complete dataset, we are free to perform inference in mini-batches of the same size as the ones used during training. This allows us to compute the batch statistics on the fly in the exact same way as during training.
112
+
113
+ Figure 6 compares standard BN to our proposed modification. Using the tracked population statistics leads to many architectures with an accuracy around $10 \%$ , i.e., performing no better than random guessing. Our proposed modification allows us to significantly increase the fraction of high-performing architectures. Our results also show that the choice of fixing vs. learning an affine transformation in batch normalization should match the standalone protocol $P _ { p r o x y }$ .
114
+
115
+ ![](images/d0bae44d8ba4dbd9c53630d367aa2579be0af1410a58ec098d3341a04a3d50b4.jpg)
116
+ Figure 7: Loss landscapes.
117
+
118
+ ![](images/18c3e8683febe2570d105043c4ee42b1fe96a8ce5f9b895ab808dfe5ed097d7f.jpg)
119
+ Figure 8: Learning rate on NASBench-201.
120
+
121
+ # 4.3 SUPER-NET LOSS LANDSCAPES
122
+
123
+ The training loss of the super-net encompasses the task losses of all possible architectures. We suspect that the training difficulty increases with the number of architectures represented by the super-net. To better study this, we visualize the loss landscape (Li et al., 2018) of the standalone network and a super-net with $n = 3 0 0$ architectures. Concretely, the landscape is computed over the super-net training loss under the single-path one-shot sampling method,
124
+
125
+ $$
126
+ \mathcal { L } _ { s } ( x , \theta _ { s } ) = \sum _ { i } \mathcal { L } _ { s } ( x , \theta _ { i } ) , \quad \mathrm { w h e r e } \forall i , \cup _ { i } \theta _ { i } = \theta _ { s } .
127
+ $$
128
+
129
+ Figure 7 shows that the loss landscape of the super-net is less smooth than that of a standalone architecture, which confirms our intuition. A smoother landscape indicates that optimization will converge more easily to a good local optimum. With a smooth landscape, one can thus use a relatively large learning. By contrast, a less smooth landscape requires using a smaller one.
130
+
131
+ Our experiments further confirm this observation. In the standalone protocol $P _ { p r o x y }$ , the learning rate is set to 0.2 for NASBench-101, and to 0.1 for NASBench-201 and DARTS-NDS, respectively. All protocols use a cosine learning rate decay. Figure 8 shows that super-net training requires lower learning rates than standalone training. The same trend is shown for other search spaces in Appendix C.1. We set the learning rate to 0.025 to be consistent across the three search spaces.
132
+
133
+ # .4 LOWER FIDELITY ESTIMATES LOWER THE RANKING CORRELATION
134
+
135
+ Reducing memory foot-print and training time by proposing smaller super-nets has been an active research direction, and the resulting super-nets are referred to as lower fidelity estimates (Elsken et al., 2019). The impact of this approach on the super-net quality, however, has never been studied systematically over multiple search spaces . We compare four popular strategies in Table 2. We deliberately prolong the training epochs inversely proportionally to the computational budget that would be saved by the low-fidelity estimates, e.g. if the channel number is reduced by half, we train the model for two times more epoch. Note that this provides an upper bound to the performance of low-fidelity estimates.
136
+
137
+ A commonly-used approach to reduce memory requirements is to decrease the batch size (Yang
138
+
139
+ Table 2: Low fidelity estimates under same computational budget, reporting final search model accuracy (FSA) and sparse Kendall-Tau (S-KdT) on NASBench-201.
140
+
141
+ <table><tr><td>Metrics</td><td colspan="3">Settings</td></tr><tr><td>Repeated cells</td><td>3</td><td>2</td><td>1</td></tr><tr><td>S-KdT FSA</td><td>0.751± 0.09</td><td>0.692 ±0.18</td><td>0.502 ± 0.21</td></tr><tr><td></td><td>91.91 ± 0.09</td><td>91.95 ± 0.10</td><td>90.30 ± 0.71</td></tr><tr><td>Init Channel</td><td>16</td><td>8</td><td>4</td></tr><tr><td>S-KdT FSA</td><td>0.740 ± 0.07 92.92 ± 0.48</td><td>0.677 ± 0.10 92.32 ± 0.37</td><td>0.691 ± 0.15 92.79± 0.85</td></tr><tr><td>Batch-size</td><td></td><td></td><td></td></tr><tr><td>S-KdT</td><td>256</td><td>128</td><td>64</td></tr><tr><td>FSA</td><td>0.740±0.07 92.92 ± 0.48</td><td>0.728 ±0.16 92.37 ± 0.61</td><td>0.703 ± 0.16 92.35 ± 0.34</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>Train portion</td><td>0.75</td><td>0.5</td><td>0.25</td></tr><tr><td>S-KdT FSA</td><td>0.751 ± 0.11 92.13 ± 0.51</td><td>0.742 ± 0.12 92.74 ± 0.43</td><td>0.693 ± 0.13 91.47 ± 0.81</td></tr></table>
142
+
143
+ et al., 2020). Surprisingly, lowering the batch size from 256 to 64 has limited impact on the accuracy, but decreases sparse Kendall-Tau and the final searched model’s performance, the most important metric in practice.
144
+
145
+ Another approach is to decrease the number of channels in the first layer (Liu et al., 2019b). This reduces the total number of parameters proportionally, since the number of channels in consecutive layers depends on the first one. Table 2 shows that this decreases the sparse Kendall-Tau from 0.7 to 0.5. By contrast, reducing the number of repeated cells (Pham et al., 2018; Chu et al., 2019) by one has little impact. Hence, to train a good super-net, one should avoid changes between $f _ { w s }$ and $f _ { p r o x y }$ , but one can reduce the batch size by a factor $> 0 . 5$ and use only one repeated cell.
146
+
147
+ Table 3: Dynamic channels on NASBench-101.
148
+
149
+ <table><tr><td>Type</td><td>Accuracy</td><td>S-KdT</td><td>P&gt;R</td><td>Final searched model</td></tr><tr><td>Fixed</td><td>71.52 ± 6.94</td><td>0.22</td><td>0.546</td><td>91.79 ± 1.72</td></tr><tr><td>Shuffle</td><td>31.79 ± 10.90</td><td>0.17</td><td>0.391</td><td>90.58 ± 1.58</td></tr><tr><td>Interpolate</td><td>57.53 ± 10.05</td><td>0.37</td><td>0.865</td><td>93.35 ± 3.27</td></tr><tr><td>Baselinet</td><td>76.91 ± 10.05</td><td>0.22</td><td>0.865</td><td>89.43± 4.30</td></tr><tr><td>Baseline-v2</td><td>75.18± 9.28</td><td>0.33</td><td>0.891</td><td>91.27 ± 1.18</td></tr><tr><td>Ours</td><td>76.95 ± 8.29</td><td>0.46</td><td>0.949</td><td>93.65 ± 0.73</td></tr></table>
150
+
151
+ † See Appendix C.3 for more details.
152
+
153
+ ![](images/84a6e9175d351bc94c6c0098d840e687e17917e206c44657a299f25099c579c6.jpg)
154
+ Figure 9: NASBench-101 dynamic channel.
155
+
156
+ The last lower-fidelity factor is the portion of training data that is used (Liu et al., 2019b; Xu et al., 2020). Surprisingly, reducing the training portion only marginally decreases the sparse Kendall-Tau for all three search spaces. On NASBench-201, keeping only $2 5 \%$ of the CIFAR-10 dataset results in a 0.1 drop in sparse Kendall-Tau. This explains why DARTS-based methods typically use only $50 \%$ of the data to train the super-net but can still produce reasonable results.
157
+
158
+ # 4.5 DYNAMIC CHANNELING HURTS SUPER-NET QUALITY
159
+
160
+ Dynamic channeling is an implicit factor in many search spaces (Ying et al., 2019; Cai et al., 2019; Guo et al., 2019; Dong & Yang, 2019b). It refers to the fact that the number of channels of the intermediate layers depends on the number of incoming edges to the output node. This is depicted by Figure 9 (a): for a search cell with $n$ intermediate nodes, where $X$ and $Y$ are the input and output node with $C _ { i n }$ and $C _ { o u t }$ channels, respectively. When there are $n = 2$ edges (c.f. Figure 9 $( b )$ ), the associated channel numbers decrease so that their sum equals $C _ { o u t }$ . That is, the intermediate nodes have $\lfloor C _ { o u t } / 2 \rfloor$ channels. In the general case, shown in Figure 9 (c), the number of channels in intermediate nodes is thus $\lfloor C _ { o u t } / n \rfloor$ for $n$ incoming edges. A weight sharing approach has to cope with this architecture-dependent fluctuation of the number of channels during training.
161
+
162
+ Let $C$ denote the number of channels of a given architecture, and $C _ { m a x }$ the maximum number of channels for a node across the entire search space. All existing approaches allocate $C _ { m a x }$ channels and, during training, extract a subset of these channels. The existing methods then differ in how they extract the channels: Guo et al. (2019) use a fixed chunk of channels, e.g., $[ 0 : C ]$ ; Zhang et al. (2018) randomly shuffle the channels before extracting a fixed chunk; and Dong & Yang (2019a) linearly interpolate the $C _ { m a x }$ channels into $C$ channels using a moving average across neighboring channels.
163
+
164
+ Instead of sharing the channels between architectures, we propose to disable dynamic channelling completely. As the channel number only depends on the incoming edges, we separate the search space into a discrete number of sub-spaces, each with a fixed number of incoming edges. As shown in Table 3, disabling dynamic channeling improves the sparse Kendall-Tau and the final search performance by a large margin and yields a new state of the art on NASBench101.
165
+
166
+ We compose another baseline, where we enable dynamic channeling during super-net training. During validation, we compute the average sparse Kendall-Tau of each sub-space, where we sample 200 architectures that shares the same number of channels. We call this baseline-v2. In Table 3, we can see this surpasses the original baseline by a significant margin. It further evidence the importance of disabling dynamic channels. Nonetheless, the best is to disable dynamic channeling during both the training and the validation phase.
167
+
168
+ # 5 HOW SHOULD YOU TRAIN YOUR SUPER-NET?
169
+
170
+ Figure 10 summarizes the influence of all tested factors on the final performance. It stands out that properly tuned hyper-parameters lead to the biggest improvements by far. Surprisingly, most other factors and techniques either have a hardly measurable effect or in some cases even lead to worse performance. Based on these findings, here is how you should train your super-net:
171
+
172
+ ![](images/f7b2ac1cd701333de67963633d61df0ce4d2c5a55802cd105796072b2d413fdd.jpg)
173
+ Figure 10: Influence of factors on the final model. We plot the difference in percent between the searched model’s performance with and without applying the corresponding factor. For the hyper-parameters of $P _ { w s }$ , the baseline is Random NAS, as reported in Table 4. For the other factors, the baseline of each search space uses the best setting of the hyper-parameters. Each experiment was run at least 3 times.
174
+
175
+ 1. Do not use super-net accuracy to judge the quality of your super-net. The sparse Kendall-Tau has much higher correlation with the final search performance.
176
+ 2. When batch normalization is used, do not use the moving average statistics during evaluation. Instead, compute the statistics on the fly over a batch of the same size as used during training.
177
+ 3. The loss landscape of super-nets is less smooth than that of standalone networks. Start from a smaller learning rate than standalone training.
178
+ 4. Do not use other low-fidelity estimates than moderately reducing the training set size to decrease the search time.
179
+ 5. Do not use dynamic channeling in search spaces that have a varying number of channels in the intermediate nodes. Break the search space into multiple sub-spaces such that dynamic channeling is not required.
180
+
181
+ Comparison to the state of the art. Table 4 shows that carefully controlling the relevant factors and adopting the techniques proposed in Section 4 allow us to considerably improve the performance of Random-NAS. Thanks to our evaluation, we were able to show that simple Random-NAS together with an appropriate training protocol $P _ { w s }$ and mapping function $f _ { w s }$ yields results that are competitive to and sometimes even surpass state-of-the-art algorithms. Our results provide a strong baseline upon which future work can build.
182
+
183
+ Table 4: Final results. Results on NASBench101 and 201 are from Yu et al. (2020b), and Dong & Yang (2020). We report the mean over 3 runs. Note that NASBench-101 ${ \mathit { n } } = 7 $ ) in ( $\mathrm { T u }$ et al., 2020b) is identical to our setting. Our new strategy significantly surpasses the random search baseline.
184
+
185
+ <table><tr><td>Method</td><td>NASBench 101 (n=7)</td><td>NASBench 201</td><td>DARTS NDS</td><td>DARTS NDS*</td></tr><tr><td>ENAS</td><td>91.83 ±0.42</td><td>54.30±0.00</td><td>94.45 ± 0.09</td><td>97.11</td></tr><tr><td>DARTS-V2</td><td>92.21 ± 0.61</td><td>54.30 ±0.00</td><td>94.79 ± 0.11</td><td>97.37</td></tr><tr><td>NAO</td><td>92.59 ± 0.59</td><td></td><td></td><td>97.10</td></tr><tr><td>GDAS</td><td>=</td><td>93.51 ± 0.13</td><td></td><td>96.23</td></tr><tr><td>Random NAS</td><td>89.89 ± 3.89</td><td>87.66 ± 1.69</td><td>91.33 ±0.12</td><td>96.74†</td></tr><tr><td>Random NAS (Ours)</td><td>93.12 ±0.06</td><td>92.71 ± 0.15</td><td>94.26±0.05</td><td>97.08</td></tr></table>
186
+
187
+ †Results from Li & Talwalkar (2019) ?Trained according to Liu et al. (2019b) for 600 epochs. DARTS-V2 (Liu et al., 2019b), ENAS (Pham et al., 2018), NAO (Luo et al., 2018). Random-NAS (Li & Talwalkar, 2019), GDAS (Dong & Yang, 2019b) On NASBench-201, both random NAS and our approach samples 100 final architectures to follow Dong & Yang (2020)
188
+
189
+ # REFERENCES
190
+
191
+ Gabriel Bender, Hanxiao Liu, Bo Chen, Grace Chu, Shuyang Cheng, Pieter-Jan Kindermans, and Quoc V. Le. Can weight sharing outperform random architecture search? an investigation with tunas. In CVPR, 2020.
192
+
193
+ Han Cai, Ligeng Zhu, and Song Han. ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardware. In ICLR, 2019.
194
+
195
+ Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, and Song Han. Once for all: Train one network and specialize it for efficient deployment. In ICLR, 2020. URL https://openreview.net/ forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ HylxE1HKwS.
196
+
197
+ Xin Chen, Lingxi Xie, Jun Wu, and Qi Tian. Progressive differentiable architecture search: Bridging the depth gap between search and evaluation. In ICCV, 2019a.
198
+
199
+ Yukang Chen, Tong Yang, Xiangyu Zhang, Gaofeng Meng, Chunhong Pan, and Jian Sun. DetNAS: Neural Architecture Search on Object Detection. NeurIPS, 2019b.
200
+
201
+ Xiangxiang Chu, Bo Zhang, Ruijun Xu, and Jixiang Li. FairNAS: Rethinking Evaluation Fairness of Weight Sharing Neural Architecture Search. arXiv:, 2019.
202
+
203
+ Xuanyi Dong and Yi Yang. Network pruning via transformable architecture search. In Advances in Neural Information Processing Systems, pp. 760–771, 2019a.
204
+
205
+ Xuanyi Dong and Yi Yang. Searching for a robust neural architecture in four gpu hours. In CVPR, 2019b.
206
+
207
+ Xuanyi Dong and Yi Yang. NAS-Bench-201: Extending the scope of reproducible neural architecture search. In ICLR, 2020. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ HJxyZkBKDr.
208
+
209
+ Thomas Elsken, Jan Hendrik Metzen, and Frank Hutter. Neural architecture search: A survey. Journal of Machine Learning Research, 20(55):1–21, 2019.
210
+
211
+ Zichao Guo, Xiangyu Zhang, Haoyuan Mu, Wen Heng, Zechun Liu, Yichen Wei, and Jian Sun. Single Path One-Shot Neural Architecture Search with Uniform Sampling. ECCV, 2019.
212
+
213
+ Haifeng Jin, Qingquan Song, and Xia Hu. Auto-Keras: An efficient neural architecture search system. In International Conference on Knowledge Discovery & Data Mining, 2019.
214
+
215
+ Kirthevasan Kandasamy, Willie Neiswanger, Jeff Schneider, Barnabas Poczos, and Eric P Xing. Neural architecture search with bayesian optimisation and optimal transport. In NeurIPS, 2018.
216
+
217
+ Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. CIFAR-10 (canadian institute for advanced research). 2009.
218
+
219
+ Hao Li, Zheng Xu, Gavin Taylor, Christoph Studer, and Tom Goldstein. Visualizing the loss landscape of neural nets. In NeurIPS, 2018.
220
+
221
+ Liam Li and Ameet Talwalkar. Random search and reproducibility for neural architecture search. UAI, 2019.
222
+
223
+ Xiang Li, Chen Lin, Chuming Li, Ming Sun, Wei Wu, Junjie Yan, and Wanli Ouyang. Improving one-shot NAS by suppressing the posterior fading. CVPR, 2020.
224
+
225
+ Chenxi Liu, Barret Zoph, Maxim Neumann, Jonathon Shlens, Wei Hua, Li-Jia Li, Li Fei-Fei, Alan Yuille, Jonathan Huang, and Kevin Murphy. Progressive neural architecture search. In ECCV, 2018.
226
+
227
+ Chenxi Liu, Liang-Chieh Chen, Florian Schroff, Hartwig Adam, Wei Hua, Alan Yuille, and Li Fei-Fei. Auto-DeepLab: Hierarchical Neural Architecture Search for Semantic Image Segmentation. CVPR, 2019a.
228
+
229
+ Hanxiao Liu, Karen Simonyan, and Yiming Yang. DARTS: Differentiable architecture search. ICLR, 2019b.
230
+
231
+ Zhichao Lu, Ian Whalen, Vishnu Boddeti, Yashesh Dhebar, Kalyanmoy Deb, Erik Goodman, and Wolfgang Banzhaf. NSGA-NET: A multi-objective genetic algorithm for neural architecture search. arXiv:1810.03522, 2018.
232
+
233
+ Renqian Luo, Fei Tian, Tao Qin, En-Hong Chen, and Tie-Yan Liu. Neural architecture optimization. In NeurIPS, 2018.
234
+
235
+ Risto Miikkulainen, Jason Liang, Elliot Meyerson, Aditya Rawal, Daniel Fink, Olivier Francon, Bala Raju, Hormoz Shahrzad, Arshak Navruzyan, Nigel Duffy, et al. Evolving deep neural networks. In Artificial Intelligence in the Age of Neural Networks and Brain Computing, pp. 293–312. 2019.
236
+
237
+ Niv Nayman, Asaf Noy, Tal Ridnik, Itamar Friedman, Rong Jin, and Lihi Zelnik. Xnas: Neural architecture search with expert advice. In NeurIPS, 2019.
238
+
239
+ Hieu Pham, Melody Y Guan, Barret Zoph, Quoc V Le, and Jeff Dean. Efficient neural architecture search via parameter sharing. ICML, 2018.
240
+
241
+ Ilija Radosavovic, Justin Johnson, Saining Xie, Wan-Yen Lo, and Piotr Dollar. On Network Design ´ Spaces for Visual Recognition. In ICCV, 2019.
242
+
243
+ Esteban Real, Sherry Moore, Andrew Selle, Saurabh Saxena, Yutaka Leon Suematsu, Jie Tan, Quoc V. Le, and Alexey Kurakin. Large-scale evolution of image classifiers. ICML, 2017.
244
+
245
+ Esteban Real, Alok Aggarwal, Yanping Huang, and Quoc V Le. Regularized evolution for image classifier architecture search. AAAI, 2019.
246
+
247
+ Michael S. Ryoo, AJ Piergiovanni, Mingxing Tan, and Anelia Angelova. Assemblenet: Searching for multi-stream neural connectivity in video architectures. In ICLR, 2020. URL https:// openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ SJgMK64Ywr.
248
+
249
+ David R. So, Chen Liang, and Quoc V. Le. The evolved transformer. In ICML, 2019.
250
+
251
+ Linnan Wang, Saining Xie, Teng Li, Rodrigo Fonseca, and Yuandong Tian. Neural architecture search by learning action space for monte carlo tree search. AAAI, 2020. URL https://openreview. net/forum?id ${ . } = { }$ SklR6aEtwH.
252
+
253
+ Bichen Wu, Xiaoliang Dai, Peizhao Zhang, Yanghan Wang, Fei Sun, Yiming Wu, Yuandong Tian, Peter Vajda, Yangqing Jia, and Kurt Keutzer. FBNet: Hardware-Aware Efficient ConvNet Design via Differentiable Neural Architecture Search. CVPR, 2019.
254
+
255
+ Sirui Xie, Hehui Zheng, Chunxiao Liu, and Liang Lin. SNAS: Stochastic neural architecture search. ICLR, 2019.
256
+
257
+ Yuhui Xu, Lingxi Xie, Xiaopeng Zhang, Xin Chen, Guo-Jun Qi, Qi Tian, and Hongkai Xiong. PC-DARTS: Partial channel connections for memory-efficient architecture search. In ICLR, 2020. URL https://openreview.net/forum?id $=$ BJlS634tPr.
258
+
259
+ Antoine Yang, Pedro M. Esperanc¸a, and Fabio M. Carlucci. NAS evaluation is frustratingly hard. In ICLR, 2020. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ HygrdpVKvr.
260
+
261
+ Chris Ying, Aaron Klein, Esteban Real, Eric Christiansen, Kevin Murphy, and Frank Hutter. NASBench-101: Towards reproducible neural architecture search. ICLR, 2019.
262
+
263
+ Jiahui Yu and Thomas S. Huang. Network slimming by slimmable networks: Towards one-shot architecture search for channel numbers. ICLR, 2019.
264
+
265
+ Jiahui Yu, Pengchong Jin, Hanxiao Liu, Gabriel Bender, Pieter-Jan Kindermans, Mingxing Tan, Thomas Huang, Xiaodan Song, Ruoming Pang, and Quoc Le. BigNAS: Scaling Up Neural Architecture Search with Big Single-Stage Models. ECCV, 2020a.
266
+
267
+ Kaicheng Yu, Christian Sciuto, Martin Jaggi, Claudiu Musat, and Mathieu Salzmann. Evaluating the search phase of neural architecture search. In ICLR, 2020b. URL https://openreview. net/forum?id ${ . } = { }$ H1loF2NFwr.
268
+
269
+ Arber Zela, Thomas Elsken, Tonmoy Saikia, Yassine Marrakchi, Thomas Brox, and Frank Hutter. Understanding and robustifying differentiable architecture search. In ICLR, 2020a. URL https: //openreview.net/forum?id ${ . } =$ H1gDNyrKDS.
270
+
271
+ Arber Zela, Julien Siems, and Frank Hutter. NAS-Bench-1Shot1: Benchmarking and dissecting one-shot neural architecture search. In ICLR, 2020b. URL https://openreview.net/ forum?id $_ { \cdot } =$ SJx9ngStPH.
272
+
273
+ Xiangyu Zhang, Xinyu Zhou, Mengxiao Lin, and Jian Sun. Shufflenet: An extremely efficient convolutional neural network for mobile devices. In CVPR, 2018.
274
+
275
+ Hongpeng Zhou, Minghao Yang, Jun Wang, and Wei Pan. BayesNAS: A bayesian approach for neural architecture search. In ICML, 2019.
276
+
277
+ Barret Zoph and Quoc V. Le. Neural Architecture Search with Reinforcement Learning. ICLR, 2017.
278
+
279
+ Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In CVPR, 2018.
parse/train/txC1ObHJ0wB/txC1ObHJ0wB_content_list.json ADDED
@@ -0,0 +1,1536 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "HOW TO TRAIN YOUR SUPER-NET: AN ANALYSIS OF TRAINING HEURISTICS IN WEIGHT-SHARING NAS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 823,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 170,
20
+ 400,
21
+ 198
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 234,
32
+ 544,
33
+ 250
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Weight sharing promises to make neural architecture search (NAS) tractable even on commodity hardware. Existing methods in this space rely on a diverse set of heuristics to design and train the shared-weight backbone network, a.k.a. the supernet. Since heuristics substantially vary across different methods and have not been carefully studied, it is unclear to which extent they impact super-net training and hence the weight-sharing NAS algorithms. In this paper, we disentangle super-net training from the search algorithm, isolate 14 frequently-used training heuristics, and evaluate them over three benchmark search spaces. Our analysis uncovers that several commonly-used heuristics negatively impact the correlation between supernet and stand-alone performance, whereas simple, but often overlooked factors, such as proper hyper-parameter settings, are key to achieve strong performance. Equipped with this knowledge, we show that simple random search achieves competitive performance to complex state-of-the-art NAS algorithms when the super-net is properly trained. ",
40
+ "bbox": [
41
+ 233,
42
+ 265,
43
+ 766,
44
+ 457
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 483,
55
+ 336,
56
+ 500
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Neural architecture search (NAS) has received growing attention in the past few years, yielding stateof-the-art performance on several machine learning tasks (Liu et al., 2019a; Wu et al., 2019; Chen et al., 2019b; Ryoo et al., 2020). One of the milestones that led to the popularity of NAS is weight sharing (Pham et al., 2018; Liu et al., 2019b), which, by allowing all possible network architectures to share the same parameters, has reduced the computational requirements from thousands of GPU hours to just a few. Figure 1 shows the two phases that are common to weight-sharing NAS (WS-NAS) algorithms: the search phase, including the design of the search space and the search algorithm; and the evaluation phase, which encompasses the final training protocol on the proxy task 1. ",
63
+ "bbox": [
64
+ 174,
65
+ 513,
66
+ 825,
67
+ 625
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "While most works focus on developing a good sampling algorithm (Cai et al., 2019; Xie et al., 2019) or improving existing ones (Zela et al., 2020a; Nayman et al., 2019; Li et al., 2020), they tend to overlook or gloss over important factors related to the design and training of the shared-weight backbone network, i.e. the super-net. For example, the literature encompasses significant variations of learning hyper-parameter settings, batch normalization and dropout usage, capacities for the initial layers of the network, and depth of the super-net. Furthermore, some of these heuristics are directly transferred from standalone network training to super-net training without carefully studying their impact in this drastically different scenario. For example, the fundamental assumption of batch normalization that the input data follows a slowly changing distribution whose statistics can be tracked during training is violated in WS-NAS, but nonetheless typically assumed to hold. ",
74
+ "bbox": [
75
+ 174,
76
+ 632,
77
+ 825,
78
+ 768
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "In this paper, we revisit and systematically evaluate commonly-used super-net design and training heuristics and uncover the strong influence of certain factors on the success of super-net training. To this end, we leverage three benchmark search spaces, NASBench-101 (Ying et al., 2019), NASBench201 (Dong & Yang, 2020), and DARTS-NDS (Radosavovic et al., 2019), for which the ground-truth stand-alone performance of a large number of architectures is available. We report the results of our experiments according to two sets of metrics: i) metrics that directly measure the quality of the super-net, such as the widely-adopted super-net accuracy 2 and a modified Kendall-Tau correlation between the searched architectures and their ground-truth performance, which we refer to as sparse ",
85
+ "bbox": [
86
+ 174,
87
+ 776,
88
+ 825,
89
+ 887
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "image",
95
+ "img_path": "images/8c9f1fb332802d0a69c31ec05ae6a3107427c64b71219d8cedb6fb6cc6b9ad2a.jpg",
96
+ "image_caption": [
97
+ "Figure 1: WS-NAS benchmarking. Green blocks indicate which aspects of NAS are benchmarked in different works. A search algorithm usually consists of a search space that encompass many architectures, and a policy to select the best one. $P$ indicates a training protocol, and $f$ a mapping function from the search space to a neural network. (a) Early works fixed and compared the metrics on the proxy task, which doesn’t allow for a holistic comparison between algorithms. $\\mathbf { ( b ) }$ The NASBench benchmark series partially alleviates the problem by sharing the stand-alone training protocol and search space across algorithms. However, the design of the weight-sharing search space and training protocol is still not controlled. (c) We fill this gap by benchmarking existing techniques to construct and train the shared-weight backbone. We provide a controlled evaluation across three benchmark spaces. "
98
+ ],
99
+ "image_footnote": [],
100
+ "bbox": [
101
+ 256,
102
+ 66,
103
+ 741,
104
+ 332
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "Kendall-Tau; ii) proxy metrics such as the ability to surpass random search and the stand-alone accuracy of the model found by the WS-NAS algorithm. ",
111
+ "bbox": [
112
+ 176,
113
+ 491,
114
+ 821,
115
+ 518
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "Via our extensive experiments (over 700 GPU days), we uncover that (i) the training behavior of a super-net drastically differs from that of a standalone network, e.g., in terms of feature statistics and loss landscape, thus allowing us to define training factor settings, e.g., for batch-normalization (BN) and learning rate, that are better suited for super-nets; (ii) while some neglected factors, such as the number of training epochs, have a strong impact on the final performance, others, believed to be important, such as path sampling, only have a marginal effect, and some commonly-used heuristics, such as the use of low-fidelity estimates, negatively impact it; (iii) the commonly-adopted super-net accuracy is unreliable to evaluate the super-net quality. ",
122
+ "bbox": [
123
+ 174,
124
+ 525,
125
+ 825,
126
+ 636
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "Altogether, our work is the first to systematically analyze the impact of the diverse factors of super-net design and training, and we uncover the factors that are crucial to design a super-net, as well as the non-important ones. Aggregating these findings allows us to boost the performance of simple weight-sharing random search to the point where it reaches that of complex state-of-the-art NAS algorithms across all tested search spaces. We will release our code and trained models so as to establish a solid baseline to facilitate further research. ",
133
+ "bbox": [
134
+ 174,
135
+ 642,
136
+ 825,
137
+ 724
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "2 PRELIMINARIES AND RELATED WORK ",
144
+ "text_level": 1,
145
+ "bbox": [
146
+ 176,
147
+ 746,
148
+ 524,
149
+ 762
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "We first introduce the necessary concepts that will be used throughout the paper. As shown in Figure $1 ( a )$ , weight-sharing NAS algorithms consist of three key components: a search algorithm that samples an architecture from the search space in the form of an encoding, a mapping function $f _ { p r o x y }$ that maps the encoding into its corresponding neural network, and a training protocol for a proxy task $P _ { p r o x y }$ for which the network is optimized. ",
156
+ "bbox": [
157
+ 174,
158
+ 779,
159
+ 825,
160
+ 847
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "To train the search algorithm, one needs to additionally define the mapping function $f _ { w s }$ that generates the shared-weight network. Note that the mapping $f _ { p r o x y }$ frequently differs from $f _ { w s }$ , since in practice the final model contains many more layers and parameters so as to yield competitive results on the proxy task. After fixing $f _ { w s }$ , a training protocol $P _ { w s }$ is required to learn the super-net. In practice, $P _ { w s }$ often hides factors that are critical for the final performance of an approach, such as hyper-parameter settings or the use of data augmentation strategies to achieve state-of-the-art performance (Liu et al., 2019b; Chu et al., 2019; Zela et al., 2020a). Again, $P _ { w s }$ may differ from $P _ { p r o x y }$ , which is used to train the architecture that has been found by the search. For example, our experiments reveal that the learning rate and the total number of epochs frequently differ due to the different training behavior of the super-net and stand-alone architectures. ",
167
+ "bbox": [
168
+ 174,
169
+ 854,
170
+ 825,
171
+ 924
172
+ ],
173
+ "page_idx": 1
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "",
178
+ "bbox": [
179
+ 174,
180
+ 103,
181
+ 825,
182
+ 172
183
+ ],
184
+ "page_idx": 2
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "Many strategies have been proposed to implement the search algorithm, such as reinforcement learning (Zoph & Le, 2017; Zoph et al., 2018), evolutionary algorithms (Real et al., 2017; Miikkulainen et al., 2019; So et al., 2019; Liu et al., 2018; Lu et al., 2018), gradient-based optimization (Liu et al., 2019b; Xu et al., 2020; Li et al., 2020), Bayesian optimization (Kandasamy et al., 2018; Jin et al., 2019; Zhou et al., 2019; Wang et al., 2020), and separate performance predictors (Liu et al., 2018; Luo et al., 2018). Until very recently, the common trend to evaluate NAS consisted of reporting the searched architecture’s performance on the proxy task (Xie et al., 2019; Real et al., 2019; Ryoo et al., 2020). This, however, hardly provides real insights about the NAS algorithms themselves, because of the many components involved in them. Many factors that differ from one algorithm to another can influence the performance. In practice, the literature even commonly compares NAS methods that employ different protocols to train the final model. ",
189
+ "bbox": [
190
+ 174,
191
+ 179,
192
+ 825,
193
+ 330
194
+ ],
195
+ "page_idx": 2
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "Li & Talwalkar (2019) and Yu et al. (2020b) were the first to systematically compare different algorithms with the same settings for the proxy task and using several random initializations. Their surprising results revealed that many NAS algorithms produce architectures that do not significantly outperform a randomly-sampled architecture. Yang et al. (2020) highlighted the importance of the training protocol $P _ { p r o x y }$ . They showed that optimizing the training protocol can improve the final architecture performance on the proxy task by three percent on CIFAR-10. This non-trivial improvement can be achieved regardless of the chosen sampler, which provides clear evidence for the importance of unifying the protocol to build a solid foundation for comparing NAS algorithms. ",
200
+ "bbox": [
201
+ 174,
202
+ 337,
203
+ 825,
204
+ 448
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "In parallel to this line of research, the recent series of “NASBench” works (Ying et al., 2019; Zela et al., 2020b; Dong & Yang, 2020) proposed to benchmark NAS approaches by providing a complete, tabular characterization of a search space. This was achieved by training every realizable stand-alone architecture using a fixed protocol $P _ { p r o x y }$ . Similarly, other works proposed to provide a partial characterization by sampling and training a sufficient number of architectures in a given search space using a fixed protocol (Radosavovic et al., 2019; Zela et al., 2020a; Wang et al., 2020). ",
211
+ "bbox": [
212
+ 174,
213
+ 454,
214
+ 825,
215
+ 537
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "While recent advances for systematic evaluation are promising, no work has yet thoroughly studied the influence of the super-net training protocol $P _ { w s }$ and the mapping function $f _ { w s }$ . Previous works (Zela et al., 2020a; Li & Talwalkar, 2019) performed hyper-parameter tuning to evaluate their own algorithms, and focused only on a few parameters. We fill this gap by benchmarking different choices of $P _ { w s }$ and $f _ { w s }$ and by proposing novel variations to improve the super-net quality. ",
222
+ "bbox": [
223
+ 174,
224
+ 545,
225
+ 825,
226
+ 614
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "Recent works have shown that sub-nets of super-net training can surpass some human designed models without retraining (Yu et al., 2020a; Cai et al., 2020) and that reinforcement learning can surpass the performance of random search (Bender et al., 2020). However, these findings are still only shown on MobileNet-like search spaces where we only search for the size of convolution kernels and the channel ratio for each layer. This is an effective approach to discover a compact network, but it does not change the fact that on cell-based search space super-net quality remains low. ",
233
+ "bbox": [
234
+ 174,
235
+ 621,
236
+ 825,
237
+ 704
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "3 EVALUATION METHODOLOGY ",
244
+ "text_level": 1,
245
+ "bbox": [
246
+ 176,
247
+ 728,
248
+ 452,
249
+ 744
250
+ ],
251
+ "page_idx": 2
252
+ },
253
+ {
254
+ "type": "text",
255
+ "text": "We first isolate 14 factors that need to be considered during the design and training of a super-net, and then introduce the metrics to evaluate the quality of the trained super-net. Note that these factors are agnostic to the search policy that is used after training the super-net. ",
256
+ "bbox": [
257
+ 174,
258
+ 763,
259
+ 825,
260
+ 805
261
+ ],
262
+ "page_idx": 2
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "3.1 DISENTANGLING THE SUPER-NET FROM THE SEARCH ALGORITHM ",
267
+ "text_level": 1,
268
+ "bbox": [
269
+ 174,
270
+ 828,
271
+ 671,
272
+ 840
273
+ ],
274
+ "page_idx": 2
275
+ },
276
+ {
277
+ "type": "text",
278
+ "text": "Our goal is to evaluate the influence of the super-net mapping $f _ { w s }$ and weight-sharing training protocol $P _ { w s }$ . As shown in Figure 2, $f _ { w s }$ translates an architecture encoding, which typically consists of a discrete number of choices or parameters, into a neural network. Based on a well-defined mapping, the super-net is a network in which every sub-path has a one-to-one mapping with an architecture encoding (Pham et al., 2018). Recent works $\\mathrm { { X u } }$ et al., 2020; Li et al., 2020; Ying et al., ",
279
+ "bbox": [
280
+ 174,
281
+ 854,
282
+ 825,
283
+ 922
284
+ ],
285
+ "page_idx": 2
286
+ },
287
+ {
288
+ "type": "table",
289
+ "img_path": "images/51fabc8d7e550e124f2e594edf2fb9a728c1b7b5111cdab7dc06856d2c09ce65.jpg",
290
+ "table_caption": [
291
+ "Table 1: Summary of factors "
292
+ ],
293
+ "table_footnote": [],
294
+ "table_body": "<table><tr><td colspan=\"2\">WS Mapping fws</td><td colspan=\"2\">WS Protocol Pws</td></tr><tr><td>implementation</td><td>low fidelity</td><td>hyperparam.</td><td>sampling</td></tr><tr><td>Dynamic Channeling OFA Conv WSBN Dropout</td><td>#layer train portion batch size # channels</td><td>batch-norm learning rate epochs weight decay</td><td>FairNAS Random-NAS Random-A</td></tr></table>",
295
+ "bbox": [
296
+ 176,
297
+ 95,
298
+ 485,
299
+ 172
300
+ ],
301
+ "page_idx": 3
302
+ },
303
+ {
304
+ "type": "image",
305
+ "img_path": "images/463271dd9cea14da998c14fcf209e360895a954aa979a36fcfdd692e498d3c94.jpg",
306
+ "image_caption": [
307
+ "Figure 2: Constructing a super-net "
308
+ ],
309
+ "image_footnote": [],
310
+ "bbox": [
311
+ 508,
312
+ 93,
313
+ 818,
314
+ 194
315
+ ],
316
+ "page_idx": 3
317
+ },
318
+ {
319
+ "type": "text",
320
+ "text": "2019) separate the encoding into cell parameters, which define the basic building blocks of a network, and macro parameters, which define how cells are assembled into a complete architecture. ",
321
+ "bbox": [
322
+ 169,
323
+ 227,
324
+ 825,
325
+ 253
326
+ ],
327
+ "page_idx": 3
328
+ },
329
+ {
330
+ "type": "text",
331
+ "text": "Weight-sharing mapping $f _ { w s }$ . To make the search space manageable, all cell and macro parameters are fixed during the search, except for the topology of the cell and its possible operations. However, the exact choices for each of these fixed factors differ between algorithms and search spaces. We report the common factors in the left part of Table 1. They include various implementation choices, e.g., the use of convolutions with a dynamic number of channels (Dynamic Channeling), super-convolutional layers that support dynamic kernel sizes (OFA Kernel) (Cai et al., 2020), weight-sharing batchnormalization (WSBN) that tracks independent running statistics and affine parameters for different incoming edges (Luo et al., 2018), and path and global dropout (Pham et al., 2018; Luo et al., 2018; Liu et al., 2019b). They also include the use of low-fidelity estimates (Elsken et al., 2019) to reduce the complexity of super-net training, e.g., by reducing the number of layers (Liu et al., 2019b) and channels (Yang et al., 2020; Chen et al., 2019a), the portion of the training set used for super-net training (Liu et al., 2019b), or the batch size (Liu et al., 2019b; Pham et al., 2018; Yang et al., 2020). ",
332
+ "bbox": [
333
+ 174,
334
+ 265,
335
+ 825,
336
+ 429
337
+ ],
338
+ "page_idx": 3
339
+ },
340
+ {
341
+ "type": "text",
342
+ "text": "Weight-sharing protocol $P _ { w s }$ . Given a mapping $f _ { w s }$ , different training protocols $P _ { w s }$ can be employed to train the super-net. Protocols can differ in the training hyper-parameters and the sampling strategies they rely on. We will evaluate the different hyper-parameter choices listed in the right part of Table 1. This includes the initial learning rate, the hyper-parameters of batch normalization, the total number of training epochs, and the amount of weight decay. ",
343
+ "bbox": [
344
+ 174,
345
+ 440,
346
+ 825,
347
+ 510
348
+ ],
349
+ "page_idx": 3
350
+ },
351
+ {
352
+ "type": "text",
353
+ "text": "We randomly sample one path to train the super-net (Guo et al., 2019), which is also known as single-path one-shot (SPOS) or Random-NAS (Li & Talwalkar, 2019). The reason for this choice is that Random-NAS is equivalent to the initial state of many search algorithms (Liu et al., 2019b; Pham et al., 2018; Luo et al., 2018), some of which even freeze the sampler training so as to use random sampling to warm-up the super-net (Xu et al., 2020; Dong & Yang, 2019b). Note that we also evaluated two variants of Random-NAS, but found their improvement to be only marginal. Please see Appendix C.2 for more detail. ",
354
+ "bbox": [
355
+ 174,
356
+ 516,
357
+ 825,
358
+ 612
359
+ ],
360
+ "page_idx": 3
361
+ },
362
+ {
363
+ "type": "text",
364
+ "text": "In our experiments, for the sake of reproducibility, we ensure that $P _ { w s }$ and $P _ { p r o x y }$ , as well as $f _ { w s }$ and $f _ { p r o x y }$ , are as close to each other as possible. For the hyper-parameters of $P _ { w s }$ , we cross-validate each factor following the order in Table 1, and after each validation, use the value that yields the best performance in $P _ { p r o x y }$ . For all other factors, we change one factor at a time. ",
365
+ "bbox": [
366
+ 174,
367
+ 619,
368
+ 825,
369
+ 675
370
+ ],
371
+ "page_idx": 3
372
+ },
373
+ {
374
+ "type": "text",
375
+ "text": "Search spaces. We use three commonly-used search spaces, for which a large number of stand-alone architectures have been trained and evaluated on CIFAR-10 (Krizhevsky et al., 2009) to obtain their ground-truth performance. In particular, we use NASBench-101 (Ying et al., 2019), which consists of 423, 624 architectures and is compatible with weight-sharing NAS (Yu et al., 2020b; Zela et al., 2020b); NASBench-201 (Dong & Yang, 2020), which contains more operations than NASBench-101 but fewer nodes; and DARTS-NDS (Radosavovic et al., 2019) that contains over $1 0 ^ { 1 3 }$ architectures of which a subset of 5000 models was sampled and trained in a stand-alone fashion. See Appendix A.2 for a detailed discussion. ",
376
+ "bbox": [
377
+ 174,
378
+ 685,
379
+ 825,
380
+ 795
381
+ ],
382
+ "page_idx": 3
383
+ },
384
+ {
385
+ "type": "text",
386
+ "text": "3.2 SPARSE KENDALL-TAU - A NOVEL SUPER-NET EVALUATION METRIC ",
387
+ "text_level": 1,
388
+ "bbox": [
389
+ 176,
390
+ 818,
391
+ 687,
392
+ 832
393
+ ],
394
+ "page_idx": 3
395
+ },
396
+ {
397
+ "type": "text",
398
+ "text": "We define a novel super-net metric, which we name sparse Kendall-Tau. It is inspired by the KendallTau metric used by Yu et al. (2020b) to measure the discrepancy between the ordering of stand-alone architectures and the ordering that is implied by the trained super-net. An ideal super-net should yield the same ordering of architectures as the stand-alone one and thus would lead to a high Kendall-Tau. However, Kendall-Tau is not robust to negligible performance differences between architectures (c.f. Figure 3). To robustify this metric, we share the rank between two architectures if their stand-alone ",
399
+ "bbox": [
400
+ 174,
401
+ 845,
402
+ 826,
403
+ 928
404
+ ],
405
+ "page_idx": 3
406
+ },
407
+ {
408
+ "type": "text",
409
+ "text": "accuracies differ by less than a threshold $( 0 . 1 \\%$ here). Since the resulting ranks are sparse, we call this metric sparse Kendall-Tau (s-KdT). Note that we also compare Kendall-Tau and Spearman correlation in Appendix A.3, and provide implementation details in Appendix A.4. ",
410
+ "bbox": [
411
+ 174,
412
+ 125,
413
+ 485,
414
+ 208
415
+ ],
416
+ "page_idx": 4
417
+ },
418
+ {
419
+ "type": "table",
420
+ "img_path": "images/149043d346fa3ba4e64d9b60d0a73598d90d0dd4b86ffd5a08f10756c4196450.jpg",
421
+ "table_caption": [],
422
+ "table_footnote": [],
423
+ "table_body": "<table><tr><td></td><td>Kendall Tau</td></tr><tr><td>original</td><td>0.6444</td></tr><tr><td>sparse</td><td>0.8140</td></tr></table>",
424
+ "bbox": [
425
+ 727,
426
+ 137,
427
+ 820,
428
+ 183
429
+ ],
430
+ "page_idx": 4
431
+ },
432
+ {
433
+ "type": "text",
434
+ "text": "Although, sparse Kendall-Tau captures the super-net quality well, it may fail in extreme cases, such as when the top-performing architectures are ranked perfectly while poor ones are ordered randomly. To account for such rare situations and ensure the soundness of our analysis, we also report additional metrics. We define two groups of metrics to holistically evaluate different aspects of a trained super-net. The first ",
435
+ "bbox": [
436
+ 174,
437
+ 215,
438
+ 485,
439
+ 338
440
+ ],
441
+ "page_idx": 4
442
+ },
443
+ {
444
+ "type": "image",
445
+ "img_path": "images/833d29ee1aac1b8ac81197f787216600f0137c6ca77daf0ba561aada5ab69d2e.jpg",
446
+ "image_caption": [
447
+ "Figure 3: Kendall-Tau vs sparse Kendall-Tau. Kendall-Tau is not robust when many architectures have similar performance. Minor performance differences can lead to large perturbations in the ranking. Our sparse Kendall-Tau alleviates this by dismissing minor differences in performance. "
448
+ ],
449
+ "image_footnote": [],
450
+ "bbox": [
451
+ 503,
452
+ 126,
453
+ 712,
454
+ 227
455
+ ],
456
+ "page_idx": 4
457
+ },
458
+ {
459
+ "type": "text",
460
+ "text": "group of metrics directly evaluates the quality of the super-net, including sparse Kendall-Tau and the widely-adopted super-net accuracy. For the super-net accuracy, we report the average accuracy of 200 architectures on the validation set of the dataset of interest. We will refer to this metric simply as accuracy. It is frequently used (Guo et al., 2019; Chu et al., 2019) to assess the quality of the trained super-net, but we will show later that it is in fact a poor predictor of the final stand-alone performance. The metrics in the second group evaluate the search performance of a trained super-net. The first metric is the probability to surpass random search: Given the ground-truth rank $r$ of the best architecture found after $n$ runs and the maximum rank $r _ { m a x }$ , equal to the total number of architectures, the probability that the best architecture found is better than a randomly searched one is given by $p = 1 - \\bar { ( 1 - ( r / r _ { m a x } ) ) ^ { n } }$ . Finally, where appropriate, we report the stand-alone accuracy of the model that was found by the complete WS-NAS algorithm. Concretely, we randomly sample 200 architectures, select the 3 best models based on the super-net accuracy and query the ground-truth performance. We then take the mean of these architectures as stand-alone accuracy. Note that the same architectures are used to compute the sparse Kendall-Tau. ",
461
+ "bbox": [
462
+ 173,
463
+ 338,
464
+ 825,
465
+ 530
466
+ ],
467
+ "page_idx": 4
468
+ },
469
+ {
470
+ "type": "text",
471
+ "text": "4 ANALYSIS ",
472
+ "text_level": 1,
473
+ "bbox": [
474
+ 174,
475
+ 554,
476
+ 290,
477
+ 569
478
+ ],
479
+ "page_idx": 4
480
+ },
481
+ {
482
+ "type": "text",
483
+ "text": "We provide an analysis on the impact of the factors that are shown in Table 1 across three different search spaces. Note that, in this section, we present the factors that are the most important for performance; our analysis of the remaining factors is provided in Appendix C. ",
484
+ "bbox": [
485
+ 174,
486
+ 587,
487
+ 825,
488
+ 628
489
+ ],
490
+ "page_idx": 4
491
+ },
492
+ {
493
+ "type": "text",
494
+ "text": "4.1 EVALUATION OF A SUPER-NET ",
495
+ "text_level": 1,
496
+ "bbox": [
497
+ 176,
498
+ 650,
499
+ 423,
500
+ 662
501
+ ],
502
+ "page_idx": 4
503
+ },
504
+ {
505
+ "type": "text",
506
+ "text": "The standalone performance of the architecture that is found by a NAS algorithm is clearly the most important metric to judge its merits. However, in practice, one cannot access this metric—we wouldn’t need NAS if standalone performance was easy to query (the cost of computing stand-alone performance is discussed in Appendix B.2). Furthermore, stand-alone performance inevitably depends the sampling policy, and does not directly evaluate the quality of the super-net (see Appendix B.3). Consequently, it is important to rely on metrics that are well correlated with the final performance but can be queried efficiently. To this end, we collect all our experiments and plot the pairwise correlation between final performance, sparse Kendall-Tau, and super-net accuracy. As shown in Figure 4, the super-net accuracy has a low ",
507
+ "bbox": [
508
+ 174,
509
+ 678,
510
+ 485,
511
+ 924
512
+ ],
513
+ "page_idx": 4
514
+ },
515
+ {
516
+ "type": "image",
517
+ "img_path": "images/9bbbf88b8ff46e3dc661ad3a1fb9b080e8445bd8a956a4fa0a17624818773028.jpg",
518
+ "image_caption": [
519
+ "Figure 4: Super-net evaluation. We collect all experiments across 3 benchmark spaces. (Top) Pairwise plots of super-net accuracy, final performance, and the sparse Kendall-Tau. Each point corresponds to statistics computed over a trained super-net. (Bottom) Spearman correlation coefficients between the metrics. "
520
+ ],
521
+ "image_footnote": [],
522
+ "bbox": [
523
+ 488,
524
+ 678,
525
+ 815,
526
+ 814
527
+ ],
528
+ "page_idx": 4
529
+ },
530
+ {
531
+ "type": "text",
532
+ "text": "correlation with the final performance on NASBench-101 and DARTS-NDS. Only on NASBench-201 does it reach a correlation of 0.52. The sparse Kendall-Tau yields a consistently higher correlation with the final performance. This is evidence that one should not focus too strongly on improving the super-net accuracy. While this metric remains computationally heavy, it serves as a middle ground that is feasible to evaluate in real-world applications. ",
533
+ "bbox": [
534
+ 174,
535
+ 103,
536
+ 825,
537
+ 174
538
+ ],
539
+ "page_idx": 5
540
+ },
541
+ {
542
+ "type": "text",
543
+ "text": "In the following experiments, we thus mainly rely on sparse Kendall-Tau, and use final search performance as a reference only. We report the training details in Appendix B.1 and the complete results of all metrics in Appendix C.6. ",
544
+ "bbox": [
545
+ 176,
546
+ 179,
547
+ 823,
548
+ 222
549
+ ],
550
+ "page_idx": 5
551
+ },
552
+ {
553
+ "type": "text",
554
+ "text": "4.2 BATCH NORMALIZATION IN THE SUPER-NET ",
555
+ "text_level": 1,
556
+ "bbox": [
557
+ 174,
558
+ 244,
559
+ 519,
560
+ 258
561
+ ],
562
+ "page_idx": 5
563
+ },
564
+ {
565
+ "type": "text",
566
+ "text": "Batch normalization (BN) is commonly used in standalone networks to allow for faster and more stable training. It is thus also employed in most CNN search spaces. However, BN behaves differently in the context of WS-NAS, and special care has to be taken when using it. In a standalone network (c.f. Figure 5 (Top)), a BN layer during training computes the batch statistics $\\mu _ { B }$ and $\\sigma _ { B }$ , normalizes the activations $f _ { A } ( x )$ as $( f _ { A } ( \\boldsymbol { x } ) - \\mu _ { B } ) / \\sigma _ { B }$ , and finally updates the population statistics using a moving average. For instance, the mean statistics is updated as $\\hat { \\mu } \\gamma \\hat { \\mu } + ( 1 - \\gamma ) \\mu _ { B }$ . At test time, the stored population statistics are used to normalize the feature map. In the standalone setting, both batch and population statistics are unbiased estimators of the population distribution $\\mathcal { N } ( \\mu , \\sigma )$ . ",
567
+ "bbox": [
568
+ 173,
569
+ 272,
570
+ 823,
571
+ 329
572
+ ],
573
+ "page_idx": 5
574
+ },
575
+ {
576
+ "type": "text",
577
+ "text": "",
578
+ "bbox": [
579
+ 174,
580
+ 348,
581
+ 581,
582
+ 445
583
+ ],
584
+ "page_idx": 5
585
+ },
586
+ {
587
+ "type": "image",
588
+ "img_path": "images/097b99a6ea8098381ddda49bd7da3b1612f5bd27425fd0a6d7d1e0d2d298b38e.jpg",
589
+ "image_caption": [
590
+ "Figure 5: Batch normalization in standalone and super-net training. "
591
+ ],
592
+ "image_footnote": [],
593
+ "bbox": [
594
+ 598,
595
+ 357,
596
+ 825,
597
+ 488
598
+ ],
599
+ "page_idx": 5
600
+ },
601
+ {
602
+ "type": "text",
603
+ "text": "By contrast, when training a super-net (Figure 5 (Bottom)) the population statistics that are computed based on the running average are not unbiased estimators of the population distribution, because the effective architecture before the BN layer varies in each epoch. More formally, let $f _ { A _ { i } }$ denote the $i$ -th architecture. During training, the batch statistics are computed as $\\textstyle { \\mu _ { B } ^ { i } = \\sum _ { j } f _ { A _ { i } } ( \\bar { x } _ { j } ) } / m$ , and the output feature follows the distribution $\\mathcal { N } ( \\mu _ { B } ^ { i } , \\sigma _ { B } ^ { i } )$ , where the superscript $i$ indicates that the current batch statistics depends on $A _ { i }$ only. The population mean statistics is then updated as $\\hat { \\mu } \\gamma \\hat { \\mu } + ( 1 - \\gamma ) \\mu _ { B } ^ { i }$ . However, during training, different architecture from the super-net are sampled. Therefore, the population mean statistics essentially becomes a weighted combination of means from different architectures, i.e., $\\bar { \\mu } \\textstyle \\sum { \\alpha _ { i } \\mu _ { B } ^ { i } } = \\textstyle \\sum { \\alpha _ { i } f _ { A _ { i } } ( x ) }$ , where $\\alpha _ { i }$ is the sampling frequency of the $i$ -th architecture. When evaluating a specific architecture $A _ { i }$ at test time, the estimated population statistics thus depend on the other architectures in the super-net. This leads to a train-test discrepancy. One solution to mitigate this problem is to re-calibrate the batch statistics by recomputing the statistics on the entire training set before the the final evaluation (Yu & Huang, 2019). While the cost of doing so is negligible for a standalone network, NAS algorithms typically sample $\\sim 1 0 ^ { 5 }$ architectures for evaluation, which makes this approach intractable. ",
604
+ "bbox": [
605
+ 174,
606
+ 452,
607
+ 583,
608
+ 744
609
+ ],
610
+ "page_idx": 5
611
+ },
612
+ {
613
+ "type": "image",
614
+ "img_path": "images/88a8290dd3f707ce7e1e63af3e468cae9961027ebdce1bdfa8ae1bf61800e9af.jpg",
615
+ "image_caption": [
616
+ "Figure 6: Validation of BN. "
617
+ ],
618
+ "image_footnote": [],
619
+ "bbox": [
620
+ 599,
621
+ 541,
622
+ 815,
623
+ 707
624
+ ],
625
+ "page_idx": 5
626
+ },
627
+ {
628
+ "type": "text",
629
+ "text": "",
630
+ "bbox": [
631
+ 178,
632
+ 744,
633
+ 823,
634
+ 772
635
+ ],
636
+ "page_idx": 5
637
+ },
638
+ {
639
+ "type": "text",
640
+ "text": "In contrast to Dong & Yang (2020) and Bender et al. (2020) who use the training mode also during testing, we formalize a simple, yet effective, approach to tackle the train-test discrepancy of BN in super-net training: we leave the normalization based on batch statistics during training unchanged, but use batch statistics also during testing. Since super-net evaluation is always conducted over a complete dataset, we are free to perform inference in mini-batches of the same size as the ones used during training. This allows us to compute the batch statistics on the fly in the exact same way as during training. ",
641
+ "bbox": [
642
+ 174,
643
+ 779,
644
+ 825,
645
+ 876
646
+ ],
647
+ "page_idx": 5
648
+ },
649
+ {
650
+ "type": "text",
651
+ "text": "Figure 6 compares standard BN to our proposed modification. Using the tracked population statistics leads to many architectures with an accuracy around $10 \\%$ , i.e., performing no better than random guessing. Our proposed modification allows us to significantly increase the fraction of high-performing architectures. Our results also show that the choice of fixing vs. learning an affine transformation in batch normalization should match the standalone protocol $P _ { p r o x y }$ . ",
652
+ "bbox": [
653
+ 174,
654
+ 882,
655
+ 825,
656
+ 924
657
+ ],
658
+ "page_idx": 5
659
+ },
660
+ {
661
+ "type": "image",
662
+ "img_path": "images/d0bae44d8ba4dbd9c53630d367aa2579be0af1410a58ec098d3341a04a3d50b4.jpg",
663
+ "image_caption": [
664
+ "Figure 7: Loss landscapes. "
665
+ ],
666
+ "image_footnote": [],
667
+ "bbox": [
668
+ 176,
669
+ 90,
670
+ 485,
671
+ 202
672
+ ],
673
+ "page_idx": 6
674
+ },
675
+ {
676
+ "type": "image",
677
+ "img_path": "images/18c3e8683febe2570d105043c4ee42b1fe96a8ce5f9b895ab808dfe5ed097d7f.jpg",
678
+ "image_caption": [
679
+ "Figure 8: Learning rate on NASBench-201. "
680
+ ],
681
+ "image_footnote": [],
682
+ "bbox": [
683
+ 514,
684
+ 104,
685
+ 820,
686
+ 202
687
+ ],
688
+ "page_idx": 6
689
+ },
690
+ {
691
+ "type": "text",
692
+ "text": "",
693
+ "bbox": [
694
+ 168,
695
+ 231,
696
+ 823,
697
+ 260
698
+ ],
699
+ "page_idx": 6
700
+ },
701
+ {
702
+ "type": "text",
703
+ "text": "4.3 SUPER-NET LOSS LANDSCAPES ",
704
+ "text_level": 1,
705
+ "bbox": [
706
+ 176,
707
+ 276,
708
+ 429,
709
+ 290
710
+ ],
711
+ "page_idx": 6
712
+ },
713
+ {
714
+ "type": "text",
715
+ "text": "The training loss of the super-net encompasses the task losses of all possible architectures. We suspect that the training difficulty increases with the number of architectures represented by the super-net. To better study this, we visualize the loss landscape (Li et al., 2018) of the standalone network and a super-net with $n = 3 0 0$ architectures. Concretely, the landscape is computed over the super-net training loss under the single-path one-shot sampling method, ",
716
+ "bbox": [
717
+ 173,
718
+ 301,
719
+ 825,
720
+ 371
721
+ ],
722
+ "page_idx": 6
723
+ },
724
+ {
725
+ "type": "equation",
726
+ "img_path": "images/d56e1f0ba139e03078041a501a308dfff2b7571ca1d554a52e787e3f8b199aba.jpg",
727
+ "text": "$$\n\\mathcal { L } _ { s } ( x , \\theta _ { s } ) = \\sum _ { i } \\mathcal { L } _ { s } ( x , \\theta _ { i } ) , \\quad \\mathrm { w h e r e } \\forall i , \\cup _ { i } \\theta _ { i } = \\theta _ { s } .\n$$",
728
+ "text_format": "latex",
729
+ "bbox": [
730
+ 331,
731
+ 377,
732
+ 665,
733
+ 411
734
+ ],
735
+ "page_idx": 6
736
+ },
737
+ {
738
+ "type": "text",
739
+ "text": "Figure 7 shows that the loss landscape of the super-net is less smooth than that of a standalone architecture, which confirms our intuition. A smoother landscape indicates that optimization will converge more easily to a good local optimum. With a smooth landscape, one can thus use a relatively large learning. By contrast, a less smooth landscape requires using a smaller one. ",
740
+ "bbox": [
741
+ 173,
742
+ 417,
743
+ 825,
744
+ 474
745
+ ],
746
+ "page_idx": 6
747
+ },
748
+ {
749
+ "type": "text",
750
+ "text": "Our experiments further confirm this observation. In the standalone protocol $P _ { p r o x y }$ , the learning rate is set to 0.2 for NASBench-101, and to 0.1 for NASBench-201 and DARTS-NDS, respectively. All protocols use a cosine learning rate decay. Figure 8 shows that super-net training requires lower learning rates than standalone training. The same trend is shown for other search spaces in Appendix C.1. We set the learning rate to 0.025 to be consistent across the three search spaces. ",
751
+ "bbox": [
752
+ 174,
753
+ 481,
754
+ 825,
755
+ 549
756
+ ],
757
+ "page_idx": 6
758
+ },
759
+ {
760
+ "type": "text",
761
+ "text": ".4 LOWER FIDELITY ESTIMATES LOWER THE RANKING CORRELATION ",
762
+ "text_level": 1,
763
+ "bbox": [
764
+ 186,
765
+ 568,
766
+ 676,
767
+ 580
768
+ ],
769
+ "page_idx": 6
770
+ },
771
+ {
772
+ "type": "text",
773
+ "text": "Reducing memory foot-print and training time by proposing smaller super-nets has been an active research direction, and the resulting super-nets are referred to as lower fidelity estimates (Elsken et al., 2019). The impact of this approach on the super-net quality, however, has never been studied systematically over multiple search spaces . We compare four popular strategies in Table 2. We deliberately prolong the training epochs inversely proportionally to the computational budget that would be saved by the low-fidelity estimates, e.g. if the channel number is reduced by half, we train the model for two times more epoch. Note that this provides an upper bound to the performance of low-fidelity estimates. ",
774
+ "bbox": [
775
+ 174,
776
+ 593,
777
+ 483,
778
+ 813
779
+ ],
780
+ "page_idx": 6
781
+ },
782
+ {
783
+ "type": "text",
784
+ "text": "A commonly-used approach to reduce memory requirements is to decrease the batch size (Yang ",
785
+ "bbox": [
786
+ 174,
787
+ 820,
788
+ 483,
789
+ 847
790
+ ],
791
+ "page_idx": 6
792
+ },
793
+ {
794
+ "type": "table",
795
+ "img_path": "images/dc205529a1ad9fb2961cfe3b6d8e2ca764ce84ce8f191007d387241844c417ac.jpg",
796
+ "table_caption": [
797
+ "Table 2: Low fidelity estimates under same computational budget, reporting final search model accuracy (FSA) and sparse Kendall-Tau (S-KdT) on NASBench-201. "
798
+ ],
799
+ "table_footnote": [],
800
+ "table_body": "<table><tr><td>Metrics</td><td colspan=\"3\">Settings</td></tr><tr><td>Repeated cells</td><td>3</td><td>2</td><td>1</td></tr><tr><td>S-KdT FSA</td><td>0.751± 0.09</td><td>0.692 ±0.18</td><td>0.502 ± 0.21</td></tr><tr><td></td><td>91.91 ± 0.09</td><td>91.95 ± 0.10</td><td>90.30 ± 0.71</td></tr><tr><td>Init Channel</td><td>16</td><td>8</td><td>4</td></tr><tr><td>S-KdT FSA</td><td>0.740 ± 0.07 92.92 ± 0.48</td><td>0.677 ± 0.10 92.32 ± 0.37</td><td>0.691 ± 0.15 92.79± 0.85</td></tr><tr><td>Batch-size</td><td></td><td></td><td></td></tr><tr><td>S-KdT</td><td>256</td><td>128</td><td>64</td></tr><tr><td>FSA</td><td>0.740±0.07 92.92 ± 0.48</td><td>0.728 ±0.16 92.37 ± 0.61</td><td>0.703 ± 0.16 92.35 ± 0.34</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>Train portion</td><td>0.75</td><td>0.5</td><td>0.25</td></tr><tr><td>S-KdT FSA</td><td>0.751 ± 0.11 92.13 ± 0.51</td><td>0.742 ± 0.12 92.74 ± 0.43</td><td>0.693 ± 0.13 91.47 ± 0.81</td></tr></table>",
801
+ "bbox": [
802
+ 500,
803
+ 659,
804
+ 821,
805
+ 845
806
+ ],
807
+ "page_idx": 6
808
+ },
809
+ {
810
+ "type": "text",
811
+ "text": "et al., 2020). Surprisingly, lowering the batch size from 256 to 64 has limited impact on the accuracy, but decreases sparse Kendall-Tau and the final searched model’s performance, the most important metric in practice. ",
812
+ "bbox": [
813
+ 174,
814
+ 848,
815
+ 826,
816
+ 888
817
+ ],
818
+ "page_idx": 6
819
+ },
820
+ {
821
+ "type": "text",
822
+ "text": "Another approach is to decrease the number of channels in the first layer (Liu et al., 2019b). This reduces the total number of parameters proportionally, since the number of channels in consecutive layers depends on the first one. Table 2 shows that this decreases the sparse Kendall-Tau from 0.7 to 0.5. By contrast, reducing the number of repeated cells (Pham et al., 2018; Chu et al., 2019) by one has little impact. Hence, to train a good super-net, one should avoid changes between $f _ { w s }$ and $f _ { p r o x y }$ , but one can reduce the batch size by a factor $> 0 . 5$ and use only one repeated cell. ",
823
+ "bbox": [
824
+ 173,
825
+ 895,
826
+ 823,
827
+ 924
828
+ ],
829
+ "page_idx": 6
830
+ },
831
+ {
832
+ "type": "table",
833
+ "img_path": "images/31285ec242fcc9471e705d94021b62779ae73c786bf6695087b454cb45a0b937.jpg",
834
+ "table_caption": [
835
+ "Table 3: Dynamic channels on NASBench-101. "
836
+ ],
837
+ "table_footnote": [
838
+ "† See Appendix C.3 for more details. "
839
+ ],
840
+ "table_body": "<table><tr><td>Type</td><td>Accuracy</td><td>S-KdT</td><td>P&gt;R</td><td>Final searched model</td></tr><tr><td>Fixed</td><td>71.52 ± 6.94</td><td>0.22</td><td>0.546</td><td>91.79 ± 1.72</td></tr><tr><td>Shuffle</td><td>31.79 ± 10.90</td><td>0.17</td><td>0.391</td><td>90.58 ± 1.58</td></tr><tr><td>Interpolate</td><td>57.53 ± 10.05</td><td>0.37</td><td>0.865</td><td>93.35 ± 3.27</td></tr><tr><td>Baselinet</td><td>76.91 ± 10.05</td><td>0.22</td><td>0.865</td><td>89.43± 4.30</td></tr><tr><td>Baseline-v2</td><td>75.18± 9.28</td><td>0.33</td><td>0.891</td><td>91.27 ± 1.18</td></tr><tr><td>Ours</td><td>76.95 ± 8.29</td><td>0.46</td><td>0.949</td><td>93.65 ± 0.73</td></tr></table>",
841
+ "bbox": [
842
+ 176,
843
+ 121,
844
+ 485,
845
+ 194
846
+ ],
847
+ "page_idx": 7
848
+ },
849
+ {
850
+ "type": "image",
851
+ "img_path": "images/84a6e9175d351bc94c6c0098d840e687e17917e206c44657a299f25099c579c6.jpg",
852
+ "image_caption": [
853
+ "Figure 9: NASBench-101 dynamic channel. "
854
+ ],
855
+ "image_footnote": [],
856
+ "bbox": [
857
+ 511,
858
+ 97,
859
+ 823,
860
+ 202
861
+ ],
862
+ "page_idx": 7
863
+ },
864
+ {
865
+ "type": "text",
866
+ "text": "",
867
+ "bbox": [
868
+ 174,
869
+ 243,
870
+ 825,
871
+ 299
872
+ ],
873
+ "page_idx": 7
874
+ },
875
+ {
876
+ "type": "text",
877
+ "text": "The last lower-fidelity factor is the portion of training data that is used (Liu et al., 2019b; Xu et al., 2020). Surprisingly, reducing the training portion only marginally decreases the sparse Kendall-Tau for all three search spaces. On NASBench-201, keeping only $2 5 \\%$ of the CIFAR-10 dataset results in a 0.1 drop in sparse Kendall-Tau. This explains why DARTS-based methods typically use only $50 \\%$ of the data to train the super-net but can still produce reasonable results. ",
878
+ "bbox": [
879
+ 174,
880
+ 305,
881
+ 825,
882
+ 375
883
+ ],
884
+ "page_idx": 7
885
+ },
886
+ {
887
+ "type": "text",
888
+ "text": "4.5 DYNAMIC CHANNELING HURTS SUPER-NET QUALITY ",
889
+ "text_level": 1,
890
+ "bbox": [
891
+ 174,
892
+ 398,
893
+ 580,
894
+ 412
895
+ ],
896
+ "page_idx": 7
897
+ },
898
+ {
899
+ "type": "text",
900
+ "text": "Dynamic channeling is an implicit factor in many search spaces (Ying et al., 2019; Cai et al., 2019; Guo et al., 2019; Dong & Yang, 2019b). It refers to the fact that the number of channels of the intermediate layers depends on the number of incoming edges to the output node. This is depicted by Figure 9 (a): for a search cell with $n$ intermediate nodes, where $X$ and $Y$ are the input and output node with $C _ { i n }$ and $C _ { o u t }$ channels, respectively. When there are $n = 2$ edges (c.f. Figure 9 $( b )$ ), the associated channel numbers decrease so that their sum equals $C _ { o u t }$ . That is, the intermediate nodes have $\\lfloor C _ { o u t } / 2 \\rfloor$ channels. In the general case, shown in Figure 9 (c), the number of channels in intermediate nodes is thus $\\lfloor C _ { o u t } / n \\rfloor$ for $n$ incoming edges. A weight sharing approach has to cope with this architecture-dependent fluctuation of the number of channels during training. ",
901
+ "bbox": [
902
+ 174,
903
+ 426,
904
+ 825,
905
+ 551
906
+ ],
907
+ "page_idx": 7
908
+ },
909
+ {
910
+ "type": "text",
911
+ "text": "Let $C$ denote the number of channels of a given architecture, and $C _ { m a x }$ the maximum number of channels for a node across the entire search space. All existing approaches allocate $C _ { m a x }$ channels and, during training, extract a subset of these channels. The existing methods then differ in how they extract the channels: Guo et al. (2019) use a fixed chunk of channels, e.g., $[ 0 : C ]$ ; Zhang et al. (2018) randomly shuffle the channels before extracting a fixed chunk; and Dong & Yang (2019a) linearly interpolate the $C _ { m a x }$ channels into $C$ channels using a moving average across neighboring channels. ",
912
+ "bbox": [
913
+ 174,
914
+ 558,
915
+ 825,
916
+ 640
917
+ ],
918
+ "page_idx": 7
919
+ },
920
+ {
921
+ "type": "text",
922
+ "text": "Instead of sharing the channels between architectures, we propose to disable dynamic channelling completely. As the channel number only depends on the incoming edges, we separate the search space into a discrete number of sub-spaces, each with a fixed number of incoming edges. As shown in Table 3, disabling dynamic channeling improves the sparse Kendall-Tau and the final search performance by a large margin and yields a new state of the art on NASBench101. ",
923
+ "bbox": [
924
+ 174,
925
+ 647,
926
+ 825,
927
+ 715
928
+ ],
929
+ "page_idx": 7
930
+ },
931
+ {
932
+ "type": "text",
933
+ "text": "We compose another baseline, where we enable dynamic channeling during super-net training. During validation, we compute the average sparse Kendall-Tau of each sub-space, where we sample 200 architectures that shares the same number of channels. We call this baseline-v2. In Table 3, we can see this surpasses the original baseline by a significant margin. It further evidence the importance of disabling dynamic channels. Nonetheless, the best is to disable dynamic channeling during both the training and the validation phase. ",
934
+ "bbox": [
935
+ 174,
936
+ 723,
937
+ 825,
938
+ 806
939
+ ],
940
+ "page_idx": 7
941
+ },
942
+ {
943
+ "type": "text",
944
+ "text": "5 HOW SHOULD YOU TRAIN YOUR SUPER-NET? ",
945
+ "text_level": 1,
946
+ "bbox": [
947
+ 174,
948
+ 833,
949
+ 581,
950
+ 848
951
+ ],
952
+ "page_idx": 7
953
+ },
954
+ {
955
+ "type": "text",
956
+ "text": "Figure 10 summarizes the influence of all tested factors on the final performance. It stands out that properly tuned hyper-parameters lead to the biggest improvements by far. Surprisingly, most other factors and techniques either have a hardly measurable effect or in some cases even lead to worse performance. Based on these findings, here is how you should train your super-net: ",
957
+ "bbox": [
958
+ 174,
959
+ 868,
960
+ 823,
961
+ 924
962
+ ],
963
+ "page_idx": 7
964
+ },
965
+ {
966
+ "type": "image",
967
+ "img_path": "images/f7b2ac1cd701333de67963633d61df0ce4d2c5a55802cd105796072b2d413fdd.jpg",
968
+ "image_caption": [
969
+ "Figure 10: Influence of factors on the final model. We plot the difference in percent between the searched model’s performance with and without applying the corresponding factor. For the hyper-parameters of $P _ { w s }$ , the baseline is Random NAS, as reported in Table 4. For the other factors, the baseline of each search space uses the best setting of the hyper-parameters. Each experiment was run at least 3 times. "
970
+ ],
971
+ "image_footnote": [],
972
+ "bbox": [
973
+ 163,
974
+ 99,
975
+ 818,
976
+ 204
977
+ ],
978
+ "page_idx": 8
979
+ },
980
+ {
981
+ "type": "text",
982
+ "text": "1. Do not use super-net accuracy to judge the quality of your super-net. The sparse Kendall-Tau has much higher correlation with the final search performance. \n2. When batch normalization is used, do not use the moving average statistics during evaluation. Instead, compute the statistics on the fly over a batch of the same size as used during training. \n3. The loss landscape of super-nets is less smooth than that of standalone networks. Start from a smaller learning rate than standalone training. \n4. Do not use other low-fidelity estimates than moderately reducing the training set size to decrease the search time. \n5. Do not use dynamic channeling in search spaces that have a varying number of channels in the intermediate nodes. Break the search space into multiple sub-spaces such that dynamic channeling is not required. ",
983
+ "bbox": [
984
+ 173,
985
+ 290,
986
+ 826,
987
+ 440
988
+ ],
989
+ "page_idx": 8
990
+ },
991
+ {
992
+ "type": "text",
993
+ "text": "Comparison to the state of the art. Table 4 shows that carefully controlling the relevant factors and adopting the techniques proposed in Section 4 allow us to considerably improve the performance of Random-NAS. Thanks to our evaluation, we were able to show that simple Random-NAS together with an appropriate training protocol $P _ { w s }$ and mapping function $f _ { w s }$ yields results that are competitive to and sometimes even surpass state-of-the-art algorithms. Our results provide a strong baseline upon which future work can build. ",
994
+ "bbox": [
995
+ 174,
996
+ 453,
997
+ 485,
998
+ 616
999
+ ],
1000
+ "page_idx": 8
1001
+ },
1002
+ {
1003
+ "type": "text",
1004
+ "text": "Table 4: Final results. Results on NASBench101 and 201 are from Yu et al. (2020b), and Dong & Yang (2020). We report the mean over 3 runs. Note that NASBench-101 ${ \\mathit { n } } = 7 $ ) in ( $\\mathrm { T u }$ et al., 2020b) is identical to our setting. Our new strategy significantly surpasses the random search baseline. ",
1005
+ "bbox": [
1006
+ 498,
1007
+ 452,
1008
+ 825,
1009
+ 534
1010
+ ],
1011
+ "page_idx": 8
1012
+ },
1013
+ {
1014
+ "type": "table",
1015
+ "img_path": "images/8087fd2c3ebf063ea4ca715db29a52b27cd0c8f0ef774988a074025af964b69b.jpg",
1016
+ "table_caption": [],
1017
+ "table_footnote": [
1018
+ "†Results from Li & Talwalkar (2019) ?Trained according to Liu et al. (2019b) for 600 epochs. DARTS-V2 (Liu et al., 2019b), ENAS (Pham et al., 2018), NAO (Luo et al., 2018). Random-NAS (Li & Talwalkar, 2019), GDAS (Dong & Yang, 2019b) On NASBench-201, both random NAS and our approach samples 100 final architectures to follow Dong & Yang (2020) "
1019
+ ],
1020
+ "table_body": "<table><tr><td>Method</td><td>NASBench 101 (n=7)</td><td>NASBench 201</td><td>DARTS NDS</td><td>DARTS NDS*</td></tr><tr><td>ENAS</td><td>91.83 ±0.42</td><td>54.30±0.00</td><td>94.45 ± 0.09</td><td>97.11</td></tr><tr><td>DARTS-V2</td><td>92.21 ± 0.61</td><td>54.30 ±0.00</td><td>94.79 ± 0.11</td><td>97.37</td></tr><tr><td>NAO</td><td>92.59 ± 0.59</td><td></td><td></td><td>97.10</td></tr><tr><td>GDAS</td><td>=</td><td>93.51 ± 0.13</td><td></td><td>96.23</td></tr><tr><td>Random NAS</td><td>89.89 ± 3.89</td><td>87.66 ± 1.69</td><td>91.33 ±0.12</td><td>96.74†</td></tr><tr><td>Random NAS (Ours)</td><td>93.12 ±0.06</td><td>92.71 ± 0.15</td><td>94.26±0.05</td><td>97.08</td></tr></table>",
1021
+ "bbox": [
1022
+ 500,
1023
+ 546,
1024
+ 820,
1025
+ 621
1026
+ ],
1027
+ "page_idx": 8
1028
+ },
1029
+ {
1030
+ "type": "text",
1031
+ "text": "REFERENCES ",
1032
+ "text_level": 1,
1033
+ "bbox": [
1034
+ 176,
1035
+ 103,
1036
+ 287,
1037
+ 117
1038
+ ],
1039
+ "page_idx": 9
1040
+ },
1041
+ {
1042
+ "type": "text",
1043
+ "text": "Gabriel Bender, Hanxiao Liu, Bo Chen, Grace Chu, Shuyang Cheng, Pieter-Jan Kindermans, and Quoc V. Le. Can weight sharing outperform random architecture search? an investigation with tunas. In CVPR, 2020. ",
1044
+ "bbox": [
1045
+ 173,
1046
+ 126,
1047
+ 823,
1048
+ 167
1049
+ ],
1050
+ "page_idx": 9
1051
+ },
1052
+ {
1053
+ "type": "text",
1054
+ "text": "Han Cai, Ligeng Zhu, and Song Han. ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardware. In ICLR, 2019. ",
1055
+ "bbox": [
1056
+ 169,
1057
+ 176,
1058
+ 823,
1059
+ 205
1060
+ ],
1061
+ "page_idx": 9
1062
+ },
1063
+ {
1064
+ "type": "text",
1065
+ "text": "Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, and Song Han. Once for all: Train one network and specialize it for efficient deployment. In ICLR, 2020. URL https://openreview.net/ forum?id $\\underline { { \\underline { { \\mathbf { \\Pi } } } } } =$ HylxE1HKwS. ",
1066
+ "bbox": [
1067
+ 174,
1068
+ 214,
1069
+ 823,
1070
+ 256
1071
+ ],
1072
+ "page_idx": 9
1073
+ },
1074
+ {
1075
+ "type": "text",
1076
+ "text": "Xin Chen, Lingxi Xie, Jun Wu, and Qi Tian. Progressive differentiable architecture search: Bridging the depth gap between search and evaluation. In ICCV, 2019a. ",
1077
+ "bbox": [
1078
+ 173,
1079
+ 265,
1080
+ 825,
1081
+ 295
1082
+ ],
1083
+ "page_idx": 9
1084
+ },
1085
+ {
1086
+ "type": "text",
1087
+ "text": "Yukang Chen, Tong Yang, Xiangyu Zhang, Gaofeng Meng, Chunhong Pan, and Jian Sun. DetNAS: Neural Architecture Search on Object Detection. NeurIPS, 2019b. ",
1088
+ "bbox": [
1089
+ 174,
1090
+ 303,
1091
+ 825,
1092
+ 333
1093
+ ],
1094
+ "page_idx": 9
1095
+ },
1096
+ {
1097
+ "type": "text",
1098
+ "text": "Xiangxiang Chu, Bo Zhang, Ruijun Xu, and Jixiang Li. FairNAS: Rethinking Evaluation Fairness of Weight Sharing Neural Architecture Search. arXiv:, 2019. ",
1099
+ "bbox": [
1100
+ 173,
1101
+ 340,
1102
+ 823,
1103
+ 369
1104
+ ],
1105
+ "page_idx": 9
1106
+ },
1107
+ {
1108
+ "type": "text",
1109
+ "text": "Xuanyi Dong and Yi Yang. Network pruning via transformable architecture search. In Advances in Neural Information Processing Systems, pp. 760–771, 2019a. ",
1110
+ "bbox": [
1111
+ 173,
1112
+ 378,
1113
+ 823,
1114
+ 409
1115
+ ],
1116
+ "page_idx": 9
1117
+ },
1118
+ {
1119
+ "type": "text",
1120
+ "text": "Xuanyi Dong and Yi Yang. Searching for a robust neural architecture in four gpu hours. In CVPR, 2019b. ",
1121
+ "bbox": [
1122
+ 173,
1123
+ 416,
1124
+ 825,
1125
+ 445
1126
+ ],
1127
+ "page_idx": 9
1128
+ },
1129
+ {
1130
+ "type": "text",
1131
+ "text": "Xuanyi Dong and Yi Yang. NAS-Bench-201: Extending the scope of reproducible neural architecture search. In ICLR, 2020. URL https://openreview.net/forum?id $\\underline { { \\underline { { \\mathbf { \\Pi } } } } } =$ HJxyZkBKDr. ",
1132
+ "bbox": [
1133
+ 173,
1134
+ 454,
1135
+ 825,
1136
+ 483
1137
+ ],
1138
+ "page_idx": 9
1139
+ },
1140
+ {
1141
+ "type": "text",
1142
+ "text": "Thomas Elsken, Jan Hendrik Metzen, and Frank Hutter. Neural architecture search: A survey. Journal of Machine Learning Research, 20(55):1–21, 2019. ",
1143
+ "bbox": [
1144
+ 173,
1145
+ 491,
1146
+ 823,
1147
+ 521
1148
+ ],
1149
+ "page_idx": 9
1150
+ },
1151
+ {
1152
+ "type": "text",
1153
+ "text": "Zichao Guo, Xiangyu Zhang, Haoyuan Mu, Wen Heng, Zechun Liu, Yichen Wei, and Jian Sun. Single Path One-Shot Neural Architecture Search with Uniform Sampling. ECCV, 2019. ",
1154
+ "bbox": [
1155
+ 173,
1156
+ 529,
1157
+ 825,
1158
+ 559
1159
+ ],
1160
+ "page_idx": 9
1161
+ },
1162
+ {
1163
+ "type": "text",
1164
+ "text": "Haifeng Jin, Qingquan Song, and Xia Hu. Auto-Keras: An efficient neural architecture search system. In International Conference on Knowledge Discovery & Data Mining, 2019. ",
1165
+ "bbox": [
1166
+ 171,
1167
+ 566,
1168
+ 823,
1169
+ 597
1170
+ ],
1171
+ "page_idx": 9
1172
+ },
1173
+ {
1174
+ "type": "text",
1175
+ "text": "Kirthevasan Kandasamy, Willie Neiswanger, Jeff Schneider, Barnabas Poczos, and Eric P Xing. Neural architecture search with bayesian optimisation and optimal transport. In NeurIPS, 2018. ",
1176
+ "bbox": [
1177
+ 173,
1178
+ 604,
1179
+ 823,
1180
+ 633
1181
+ ],
1182
+ "page_idx": 9
1183
+ },
1184
+ {
1185
+ "type": "text",
1186
+ "text": "Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. CIFAR-10 (canadian institute for advanced research). 2009. ",
1187
+ "bbox": [
1188
+ 173,
1189
+ 641,
1190
+ 825,
1191
+ 670
1192
+ ],
1193
+ "page_idx": 9
1194
+ },
1195
+ {
1196
+ "type": "text",
1197
+ "text": "Hao Li, Zheng Xu, Gavin Taylor, Christoph Studer, and Tom Goldstein. Visualizing the loss landscape of neural nets. In NeurIPS, 2018. ",
1198
+ "bbox": [
1199
+ 171,
1200
+ 679,
1201
+ 825,
1202
+ 708
1203
+ ],
1204
+ "page_idx": 9
1205
+ },
1206
+ {
1207
+ "type": "text",
1208
+ "text": "Liam Li and Ameet Talwalkar. Random search and reproducibility for neural architecture search. UAI, 2019. ",
1209
+ "bbox": [
1210
+ 171,
1211
+ 717,
1212
+ 825,
1213
+ 746
1214
+ ],
1215
+ "page_idx": 9
1216
+ },
1217
+ {
1218
+ "type": "text",
1219
+ "text": "Xiang Li, Chen Lin, Chuming Li, Ming Sun, Wei Wu, Junjie Yan, and Wanli Ouyang. Improving one-shot NAS by suppressing the posterior fading. CVPR, 2020. ",
1220
+ "bbox": [
1221
+ 171,
1222
+ 755,
1223
+ 823,
1224
+ 784
1225
+ ],
1226
+ "page_idx": 9
1227
+ },
1228
+ {
1229
+ "type": "text",
1230
+ "text": "Chenxi Liu, Barret Zoph, Maxim Neumann, Jonathon Shlens, Wei Hua, Li-Jia Li, Li Fei-Fei, Alan Yuille, Jonathan Huang, and Kevin Murphy. Progressive neural architecture search. In ECCV, 2018. ",
1231
+ "bbox": [
1232
+ 174,
1233
+ 791,
1234
+ 823,
1235
+ 835
1236
+ ],
1237
+ "page_idx": 9
1238
+ },
1239
+ {
1240
+ "type": "text",
1241
+ "text": "Chenxi Liu, Liang-Chieh Chen, Florian Schroff, Hartwig Adam, Wei Hua, Alan Yuille, and Li Fei-Fei. Auto-DeepLab: Hierarchical Neural Architecture Search for Semantic Image Segmentation. CVPR, 2019a. ",
1242
+ "bbox": [
1243
+ 174,
1244
+ 843,
1245
+ 825,
1246
+ 886
1247
+ ],
1248
+ "page_idx": 9
1249
+ },
1250
+ {
1251
+ "type": "text",
1252
+ "text": "Hanxiao Liu, Karen Simonyan, and Yiming Yang. DARTS: Differentiable architecture search. ICLR, 2019b. ",
1253
+ "bbox": [
1254
+ 173,
1255
+ 895,
1256
+ 823,
1257
+ 922
1258
+ ],
1259
+ "page_idx": 9
1260
+ },
1261
+ {
1262
+ "type": "text",
1263
+ "text": "Zhichao Lu, Ian Whalen, Vishnu Boddeti, Yashesh Dhebar, Kalyanmoy Deb, Erik Goodman, and Wolfgang Banzhaf. NSGA-NET: A multi-objective genetic algorithm for neural architecture search. arXiv:1810.03522, 2018. ",
1264
+ "bbox": [
1265
+ 176,
1266
+ 103,
1267
+ 823,
1268
+ 145
1269
+ ],
1270
+ "page_idx": 10
1271
+ },
1272
+ {
1273
+ "type": "text",
1274
+ "text": "Renqian Luo, Fei Tian, Tao Qin, En-Hong Chen, and Tie-Yan Liu. Neural architecture optimization. In NeurIPS, 2018. ",
1275
+ "bbox": [
1276
+ 171,
1277
+ 155,
1278
+ 825,
1279
+ 184
1280
+ ],
1281
+ "page_idx": 10
1282
+ },
1283
+ {
1284
+ "type": "text",
1285
+ "text": "Risto Miikkulainen, Jason Liang, Elliot Meyerson, Aditya Rawal, Daniel Fink, Olivier Francon, Bala Raju, Hormoz Shahrzad, Arshak Navruzyan, Nigel Duffy, et al. Evolving deep neural networks. In Artificial Intelligence in the Age of Neural Networks and Brain Computing, pp. 293–312. 2019. ",
1286
+ "bbox": [
1287
+ 174,
1288
+ 194,
1289
+ 823,
1290
+ 237
1291
+ ],
1292
+ "page_idx": 10
1293
+ },
1294
+ {
1295
+ "type": "text",
1296
+ "text": "Niv Nayman, Asaf Noy, Tal Ridnik, Itamar Friedman, Rong Jin, and Lihi Zelnik. Xnas: Neural architecture search with expert advice. In NeurIPS, 2019. ",
1297
+ "bbox": [
1298
+ 173,
1299
+ 246,
1300
+ 823,
1301
+ 276
1302
+ ],
1303
+ "page_idx": 10
1304
+ },
1305
+ {
1306
+ "type": "text",
1307
+ "text": "Hieu Pham, Melody Y Guan, Barret Zoph, Quoc V Le, and Jeff Dean. Efficient neural architecture search via parameter sharing. ICML, 2018. ",
1308
+ "bbox": [
1309
+ 174,
1310
+ 285,
1311
+ 823,
1312
+ 314
1313
+ ],
1314
+ "page_idx": 10
1315
+ },
1316
+ {
1317
+ "type": "text",
1318
+ "text": "Ilija Radosavovic, Justin Johnson, Saining Xie, Wan-Yen Lo, and Piotr Dollar. On Network Design ´ Spaces for Visual Recognition. In ICCV, 2019. ",
1319
+ "bbox": [
1320
+ 174,
1321
+ 324,
1322
+ 823,
1323
+ 353
1324
+ ],
1325
+ "page_idx": 10
1326
+ },
1327
+ {
1328
+ "type": "text",
1329
+ "text": "Esteban Real, Sherry Moore, Andrew Selle, Saurabh Saxena, Yutaka Leon Suematsu, Jie Tan, Quoc V. Le, and Alexey Kurakin. Large-scale evolution of image classifiers. ICML, 2017. ",
1330
+ "bbox": [
1331
+ 174,
1332
+ 362,
1333
+ 825,
1334
+ 392
1335
+ ],
1336
+ "page_idx": 10
1337
+ },
1338
+ {
1339
+ "type": "text",
1340
+ "text": "Esteban Real, Alok Aggarwal, Yanping Huang, and Quoc V Le. Regularized evolution for image classifier architecture search. AAAI, 2019. ",
1341
+ "bbox": [
1342
+ 171,
1343
+ 401,
1344
+ 825,
1345
+ 430
1346
+ ],
1347
+ "page_idx": 10
1348
+ },
1349
+ {
1350
+ "type": "text",
1351
+ "text": "Michael S. Ryoo, AJ Piergiovanni, Mingxing Tan, and Anelia Angelova. Assemblenet: Searching for multi-stream neural connectivity in video architectures. In ICLR, 2020. URL https:// openreview.net/forum?id $\\underline { { \\underline { { \\mathbf { \\Pi } } } } } =$ SJgMK64Ywr. ",
1352
+ "bbox": [
1353
+ 173,
1354
+ 440,
1355
+ 823,
1356
+ 483
1357
+ ],
1358
+ "page_idx": 10
1359
+ },
1360
+ {
1361
+ "type": "text",
1362
+ "text": "David R. So, Chen Liang, and Quoc V. Le. The evolved transformer. In ICML, 2019. ",
1363
+ "bbox": [
1364
+ 174,
1365
+ 492,
1366
+ 730,
1367
+ 507
1368
+ ],
1369
+ "page_idx": 10
1370
+ },
1371
+ {
1372
+ "type": "text",
1373
+ "text": "Linnan Wang, Saining Xie, Teng Li, Rodrigo Fonseca, and Yuandong Tian. Neural architecture search by learning action space for monte carlo tree search. AAAI, 2020. URL https://openreview. net/forum?id ${ . } = { }$ SklR6aEtwH. ",
1374
+ "bbox": [
1375
+ 174,
1376
+ 517,
1377
+ 825,
1378
+ 559
1379
+ ],
1380
+ "page_idx": 10
1381
+ },
1382
+ {
1383
+ "type": "text",
1384
+ "text": "Bichen Wu, Xiaoliang Dai, Peizhao Zhang, Yanghan Wang, Fei Sun, Yiming Wu, Yuandong Tian, Peter Vajda, Yangqing Jia, and Kurt Keutzer. FBNet: Hardware-Aware Efficient ConvNet Design via Differentiable Neural Architecture Search. CVPR, 2019. ",
1385
+ "bbox": [
1386
+ 176,
1387
+ 569,
1388
+ 825,
1389
+ 612
1390
+ ],
1391
+ "page_idx": 10
1392
+ },
1393
+ {
1394
+ "type": "text",
1395
+ "text": "Sirui Xie, Hehui Zheng, Chunxiao Liu, and Liang Lin. SNAS: Stochastic neural architecture search. ICLR, 2019. ",
1396
+ "bbox": [
1397
+ 173,
1398
+ 621,
1399
+ 823,
1400
+ 651
1401
+ ],
1402
+ "page_idx": 10
1403
+ },
1404
+ {
1405
+ "type": "text",
1406
+ "text": "Yuhui Xu, Lingxi Xie, Xiaopeng Zhang, Xin Chen, Guo-Jun Qi, Qi Tian, and Hongkai Xiong. PC-DARTS: Partial channel connections for memory-efficient architecture search. In ICLR, 2020. URL https://openreview.net/forum?id $=$ BJlS634tPr. ",
1407
+ "bbox": [
1408
+ 176,
1409
+ 660,
1410
+ 826,
1411
+ 703
1412
+ ],
1413
+ "page_idx": 10
1414
+ },
1415
+ {
1416
+ "type": "text",
1417
+ "text": "Antoine Yang, Pedro M. Esperanc¸a, and Fabio M. Carlucci. NAS evaluation is frustratingly hard. In ICLR, 2020. URL https://openreview.net/forum?id $\\underline { { \\underline { { \\mathbf { \\Pi } } } } } =$ HygrdpVKvr. ",
1418
+ "bbox": [
1419
+ 174,
1420
+ 713,
1421
+ 825,
1422
+ 742
1423
+ ],
1424
+ "page_idx": 10
1425
+ },
1426
+ {
1427
+ "type": "text",
1428
+ "text": "Chris Ying, Aaron Klein, Esteban Real, Eric Christiansen, Kevin Murphy, and Frank Hutter. NASBench-101: Towards reproducible neural architecture search. ICLR, 2019. ",
1429
+ "bbox": [
1430
+ 171,
1431
+ 752,
1432
+ 823,
1433
+ 780
1434
+ ],
1435
+ "page_idx": 10
1436
+ },
1437
+ {
1438
+ "type": "text",
1439
+ "text": "Jiahui Yu and Thomas S. Huang. Network slimming by slimmable networks: Towards one-shot architecture search for channel numbers. ICLR, 2019. ",
1440
+ "bbox": [
1441
+ 169,
1442
+ 790,
1443
+ 823,
1444
+ 819
1445
+ ],
1446
+ "page_idx": 10
1447
+ },
1448
+ {
1449
+ "type": "text",
1450
+ "text": "Jiahui Yu, Pengchong Jin, Hanxiao Liu, Gabriel Bender, Pieter-Jan Kindermans, Mingxing Tan, Thomas Huang, Xiaodan Song, Ruoming Pang, and Quoc Le. BigNAS: Scaling Up Neural Architecture Search with Big Single-Stage Models. ECCV, 2020a. ",
1451
+ "bbox": [
1452
+ 178,
1453
+ 829,
1454
+ 825,
1455
+ 872
1456
+ ],
1457
+ "page_idx": 10
1458
+ },
1459
+ {
1460
+ "type": "text",
1461
+ "text": "Kaicheng Yu, Christian Sciuto, Martin Jaggi, Claudiu Musat, and Mathieu Salzmann. Evaluating the search phase of neural architecture search. In ICLR, 2020b. URL https://openreview. net/forum?id ${ . } = { }$ H1loF2NFwr. ",
1462
+ "bbox": [
1463
+ 176,
1464
+ 882,
1465
+ 825,
1466
+ 922
1467
+ ],
1468
+ "page_idx": 10
1469
+ },
1470
+ {
1471
+ "type": "text",
1472
+ "text": "Arber Zela, Thomas Elsken, Tonmoy Saikia, Yassine Marrakchi, Thomas Brox, and Frank Hutter. Understanding and robustifying differentiable architecture search. In ICLR, 2020a. URL https: //openreview.net/forum?id ${ . } =$ H1gDNyrKDS. ",
1473
+ "bbox": [
1474
+ 176,
1475
+ 103,
1476
+ 825,
1477
+ 146
1478
+ ],
1479
+ "page_idx": 11
1480
+ },
1481
+ {
1482
+ "type": "text",
1483
+ "text": "Arber Zela, Julien Siems, and Frank Hutter. NAS-Bench-1Shot1: Benchmarking and dissecting one-shot neural architecture search. In ICLR, 2020b. URL https://openreview.net/ forum?id $_ { \\cdot } =$ SJx9ngStPH. ",
1484
+ "bbox": [
1485
+ 176,
1486
+ 155,
1487
+ 823,
1488
+ 196
1489
+ ],
1490
+ "page_idx": 11
1491
+ },
1492
+ {
1493
+ "type": "text",
1494
+ "text": "Xiangyu Zhang, Xinyu Zhou, Mengxiao Lin, and Jian Sun. Shufflenet: An extremely efficient convolutional neural network for mobile devices. In CVPR, 2018. ",
1495
+ "bbox": [
1496
+ 173,
1497
+ 205,
1498
+ 823,
1499
+ 234
1500
+ ],
1501
+ "page_idx": 11
1502
+ },
1503
+ {
1504
+ "type": "text",
1505
+ "text": "Hongpeng Zhou, Minghao Yang, Jun Wang, and Wei Pan. BayesNAS: A bayesian approach for neural architecture search. In ICML, 2019. ",
1506
+ "bbox": [
1507
+ 173,
1508
+ 242,
1509
+ 823,
1510
+ 272
1511
+ ],
1512
+ "page_idx": 11
1513
+ },
1514
+ {
1515
+ "type": "text",
1516
+ "text": "Barret Zoph and Quoc V. Le. Neural Architecture Search with Reinforcement Learning. ICLR, 2017. ",
1517
+ "bbox": [
1518
+ 174,
1519
+ 280,
1520
+ 825,
1521
+ 296
1522
+ ],
1523
+ "page_idx": 11
1524
+ },
1525
+ {
1526
+ "type": "text",
1527
+ "text": "Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In CVPR, 2018. ",
1528
+ "bbox": [
1529
+ 173,
1530
+ 304,
1531
+ 823,
1532
+ 333
1533
+ ],
1534
+ "page_idx": 11
1535
+ }
1536
+ ]
parse/train/txC1ObHJ0wB/txC1ObHJ0wB_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/txC1ObHJ0wB/txC1ObHJ0wB_model.json ADDED
The diff for this file is too large to render. See raw diff
 
vlm/train/-bdp_8Itjwp/0.png ADDED

Git LFS Details

  • SHA256: e39f8917b95bd223b653e97a5d638bbe3c78b183d148cf2a262d3cd1227152da
  • Pointer size: 131 Bytes
  • Size of remote file: 530 kB
vlm/train/-bdp_8Itjwp/1.png ADDED

Git LFS Details

  • SHA256: 4ca245bca76abb259f11cf2af21f9e426e39c083c08ed6843a0fdff979428e2f
  • Pointer size: 131 Bytes
  • Size of remote file: 614 kB
vlm/train/-bdp_8Itjwp/10.png ADDED

Git LFS Details

  • SHA256: ce26feab4ef9e482a16afc1b09ecbc7eb4b1bab89798648329d33fd8916fba10
  • Pointer size: 131 Bytes
  • Size of remote file: 520 kB
vlm/train/-bdp_8Itjwp/11.png ADDED

Git LFS Details

  • SHA256: 1600407b5c7eac9e928666014bccc2b5989fe5016c0ba11c7bb18af505ff6c1b
  • Pointer size: 131 Bytes
  • Size of remote file: 527 kB
vlm/train/-bdp_8Itjwp/12.png ADDED

Git LFS Details

  • SHA256: 8efd5a924254ce04ae43870ccefc198cf95b868ed4a655b9489966ee4b98f128
  • Pointer size: 131 Bytes
  • Size of remote file: 432 kB
vlm/train/-bdp_8Itjwp/13.png ADDED

Git LFS Details

  • SHA256: c125d55617a0935f7bf68f2d551a3f4420552ba827faa8555892dc7a371c3192
  • Pointer size: 131 Bytes
  • Size of remote file: 400 kB
vlm/train/-bdp_8Itjwp/14.png ADDED

Git LFS Details

  • SHA256: 3629778e91ff6539678270b2a0d039da82d32f1e0dd52c2bb24f883545f11a5c
  • Pointer size: 131 Bytes
  • Size of remote file: 366 kB
vlm/train/-bdp_8Itjwp/15.png ADDED

Git LFS Details

  • SHA256: e9ab85f894dcc61c13738fb5194d2af615b770926750460a9c0cdd5ce0f30fc0
  • Pointer size: 131 Bytes
  • Size of remote file: 450 kB
vlm/train/-bdp_8Itjwp/16.png ADDED

Git LFS Details

  • SHA256: 2606830dd5bbbf659599805387f8a2684822cb02b6785932b2b329f3c721da14
  • Pointer size: 131 Bytes
  • Size of remote file: 592 kB
vlm/train/-bdp_8Itjwp/17.png ADDED

Git LFS Details

  • SHA256: 44147a396b1b20e3fa6a491af0d5a42f84a74c9d987e0d5c48917ce879ca9dd9
  • Pointer size: 131 Bytes
  • Size of remote file: 274 kB
vlm/train/-bdp_8Itjwp/2.png ADDED

Git LFS Details

  • SHA256: 6bd1f57472d75d34c5d89fc3aa9eb85d0243a5a7afbf5e4d8e18c7d8c5245687
  • Pointer size: 131 Bytes
  • Size of remote file: 630 kB
vlm/train/-bdp_8Itjwp/3.png ADDED

Git LFS Details

  • SHA256: 29978c483f4a09b3d886ca76eb925d2b5c6a45b2f69a8cc6b93e759e0235c170
  • Pointer size: 131 Bytes
  • Size of remote file: 662 kB
vlm/train/-bdp_8Itjwp/4.png ADDED

Git LFS Details

  • SHA256: 8fa6d3865a143bc2abe7bc59ad5bc07f1b6a9c84d83e9486b7d467028108cd43
  • Pointer size: 131 Bytes
  • Size of remote file: 611 kB
vlm/train/-bdp_8Itjwp/5.png ADDED

Git LFS Details

  • SHA256: 51a1bac797a65b092bec3f38b900b3dc3a5c18c2f6378bde795d77f8845a79bc
  • Pointer size: 131 Bytes
  • Size of remote file: 574 kB
vlm/train/-bdp_8Itjwp/6.png ADDED

Git LFS Details

  • SHA256: 73b87fcfde6919f68ecc213f86fdfb2cc8e003994efce1c8e299231e710ae67b
  • Pointer size: 131 Bytes
  • Size of remote file: 702 kB
vlm/train/-bdp_8Itjwp/7.png ADDED

Git LFS Details

  • SHA256: 53895826a6ef049e73a5890d9e31125499012370ed24cb20ed3f17335885a8b8
  • Pointer size: 131 Bytes
  • Size of remote file: 689 kB
vlm/train/-bdp_8Itjwp/8.png ADDED

Git LFS Details

  • SHA256: 80e234adc389ec7c74118e30379f9784251c3d58bcbd5a6be15631cee16acdb1
  • Pointer size: 131 Bytes
  • Size of remote file: 563 kB
vlm/train/-bdp_8Itjwp/9.png ADDED

Git LFS Details

  • SHA256: 7d2a61a679134e7d5473abe3dcf076f0e1ccb76af996b2273c69236460ea377a
  • Pointer size: 131 Bytes
  • Size of remote file: 559 kB
vlm/train/3k20LAiHYL2/0.png ADDED

Git LFS Details

  • SHA256: b48ee72688e69991444f6995b56424e26280a3dee53a7fd2c98df5b2dc5e0349
  • Pointer size: 131 Bytes
  • Size of remote file: 558 kB
vlm/train/3k20LAiHYL2/1.png ADDED

Git LFS Details

  • SHA256: 87e68a8ad7b8cdbbc61a77613b15b0745312058a3d9c7720482773e0efcfff13
  • Pointer size: 131 Bytes
  • Size of remote file: 605 kB
vlm/train/3k20LAiHYL2/10.png ADDED

Git LFS Details

  • SHA256: 9e53715c610124b18865a74a2cc0d84da42032e151b8368f7fcc487278ac8ad4
  • Pointer size: 131 Bytes
  • Size of remote file: 599 kB
vlm/train/3k20LAiHYL2/11.png ADDED

Git LFS Details

  • SHA256: 3b137dd92c33f5e9b8168c8c853e0c6e804dd539a46b975660fad65d95555098
  • Pointer size: 131 Bytes
  • Size of remote file: 622 kB
vlm/train/3k20LAiHYL2/12.png ADDED

Git LFS Details

  • SHA256: f825c61a09e96dd3637702e4e9ffb40577f44cc852321c8e85fd442c34ff1c2f
  • Pointer size: 130 Bytes
  • Size of remote file: 51.6 kB
vlm/train/3k20LAiHYL2/13.png ADDED

Git LFS Details

  • SHA256: 1bb9e3027ee0f651ab6814277cc8c71bec0d87d94069d5bc3208924656467ac0
  • Pointer size: 131 Bytes
  • Size of remote file: 428 kB
vlm/train/3k20LAiHYL2/14.png ADDED

Git LFS Details

  • SHA256: 6beb56aa9c1b84c09e31c0f787f2381c61335b7f44364d3e611b7c9da826c405
  • Pointer size: 131 Bytes
  • Size of remote file: 524 kB
vlm/train/3k20LAiHYL2/2.png ADDED

Git LFS Details

  • SHA256: 36e46091b1367855d82314ec06cfa3af046fcd63a1c3ec93546a4b637c6f758a
  • Pointer size: 131 Bytes
  • Size of remote file: 574 kB
vlm/train/3k20LAiHYL2/3.png ADDED

Git LFS Details

  • SHA256: cc61dad3580d58a7a08b0a549a4c7cb58c5b41527245d7edbf2cd3b8520585ac
  • Pointer size: 131 Bytes
  • Size of remote file: 610 kB
vlm/train/3k20LAiHYL2/4.png ADDED

Git LFS Details

  • SHA256: 81669ec9a49ec905da27f3f6b0993f4d2363e96829365bb0fa6bdf1f0a7b1122
  • Pointer size: 131 Bytes
  • Size of remote file: 542 kB
vlm/train/3k20LAiHYL2/5.png ADDED

Git LFS Details

  • SHA256: e0cfa51aa143f517ea116094497e12d69bf165bbeb893b13825f96fbb8ce0c90
  • Pointer size: 131 Bytes
  • Size of remote file: 659 kB
vlm/train/3k20LAiHYL2/6.png ADDED

Git LFS Details

  • SHA256: 68c588e9ab1a72493e922869ca7b4446409ba19831e8b9af009dee1ade713781
  • Pointer size: 131 Bytes
  • Size of remote file: 656 kB