ZHANGYUXUAN-zR commited on
Commit
19ecef5
·
verified ·
1 Parent(s): d22a524

Add files using upload-large-folder tool

Browse files
Files changed (50) hide show
  1. parse/train/4Nt1F3qf9Gn/4Nt1F3qf9Gn.md +223 -0
  2. parse/train/4Nt1F3qf9Gn/4Nt1F3qf9Gn_middle.json +0 -0
  3. parse/train/B1GOWV5eg/B1GOWV5eg.md +431 -0
  4. parse/train/B1GOWV5eg/B1GOWV5eg_content_list.json +0 -0
  5. parse/train/B1GOWV5eg/B1GOWV5eg_middle.json +0 -0
  6. parse/train/B1GOWV5eg/B1GOWV5eg_model.json +0 -0
  7. parse/train/B1xY-hRctX/B1xY-hRctX.md +585 -0
  8. parse/train/B1xY-hRctX/B1xY-hRctX_content_list.json +0 -0
  9. parse/train/B1xY-hRctX/B1xY-hRctX_middle.json +0 -0
  10. parse/train/B1xY-hRctX/B1xY-hRctX_model.json +0 -0
  11. parse/train/FZ1oTwcXchK/FZ1oTwcXchK.md +348 -0
  12. parse/train/FZ1oTwcXchK/FZ1oTwcXchK_content_list.json +1707 -0
  13. parse/train/FZ1oTwcXchK/FZ1oTwcXchK_middle.json +0 -0
  14. parse/train/FZ1oTwcXchK/FZ1oTwcXchK_model.json +0 -0
  15. parse/train/HkejNgBtPB/HkejNgBtPB.md +376 -0
  16. parse/train/HkejNgBtPB/HkejNgBtPB_content_list.json +1887 -0
  17. parse/train/HkejNgBtPB/HkejNgBtPB_middle.json +0 -0
  18. parse/train/HkejNgBtPB/HkejNgBtPB_model.json +0 -0
  19. parse/train/Mos9F9kDwkz/Mos9F9kDwkz.md +299 -0
  20. parse/train/Mos9F9kDwkz/Mos9F9kDwkz_content_list.json +1588 -0
  21. parse/train/Mos9F9kDwkz/Mos9F9kDwkz_middle.json +0 -0
  22. parse/train/Mos9F9kDwkz/Mos9F9kDwkz_model.json +0 -0
  23. parse/train/MxaY4FzOTa/MxaY4FzOTa.md +437 -0
  24. parse/train/MxaY4FzOTa/MxaY4FzOTa_content_list.json +0 -0
  25. parse/train/MxaY4FzOTa/MxaY4FzOTa_middle.json +0 -0
  26. parse/train/MxaY4FzOTa/MxaY4FzOTa_model.json +0 -0
  27. parse/train/NR4KjDE0w9RXD/NR4KjDE0w9RXD.md +182 -0
  28. parse/train/NR4KjDE0w9RXD/NR4KjDE0w9RXD_content_list.json +928 -0
  29. parse/train/NR4KjDE0w9RXD/NR4KjDE0w9RXD_middle.json +0 -0
  30. parse/train/NR4KjDE0w9RXD/NR4KjDE0w9RXD_model.json +0 -0
  31. parse/train/Skvgqgqxe/Skvgqgqxe.md +221 -0
  32. parse/train/Skvgqgqxe/Skvgqgqxe_content_list.json +1199 -0
  33. parse/train/Skvgqgqxe/Skvgqgqxe_middle.json +0 -0
  34. parse/train/Skvgqgqxe/Skvgqgqxe_model.json +0 -0
  35. parse/train/SyehMhC9Y7/SyehMhC9Y7.md +211 -0
  36. parse/train/SyehMhC9Y7/SyehMhC9Y7_content_list.json +1170 -0
  37. parse/train/SyehMhC9Y7/SyehMhC9Y7_middle.json +0 -0
  38. parse/train/SyehMhC9Y7/SyehMhC9Y7_model.json +0 -0
  39. parse/train/qVyeW-grC2k/qVyeW-grC2k.md +393 -0
  40. parse/train/qVyeW-grC2k/qVyeW-grC2k_content_list.json +0 -0
  41. parse/train/qVyeW-grC2k/qVyeW-grC2k_middle.json +0 -0
  42. parse/train/qVyeW-grC2k/qVyeW-grC2k_model.json +0 -0
  43. parse/train/r1GB5jA5tm/r1GB5jA5tm.md +406 -0
  44. parse/train/r1GB5jA5tm/r1GB5jA5tm_content_list.json +0 -0
  45. parse/train/r1GB5jA5tm/r1GB5jA5tm_middle.json +0 -0
  46. parse/train/r1GB5jA5tm/r1GB5jA5tm_model.json +0 -0
  47. parse/train/vqHak8NLk25/vqHak8NLk25.md +357 -0
  48. parse/train/vqHak8NLk25/vqHak8NLk25_content_list.json +0 -0
  49. parse/train/vqHak8NLk25/vqHak8NLk25_middle.json +0 -0
  50. parse/train/vqHak8NLk25/vqHak8NLk25_model.json +0 -0
parse/train/4Nt1F3qf9Gn/4Nt1F3qf9Gn.md ADDED
@@ -0,0 +1,223 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CLOCS: CONTRASTIVE LEARNING OF CARDIAC SIGNALS ACROSS SPACE, TIME, AND PATIENTS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ The healthcare industry generates troves of unlabelled physiological data. This data can be exploited via contrastive learning, a self-supervised pre-training method that encourages representations of instances to be similar to one another. We propose a family of contrastive learning methods, CLOCS, that encourages representations across space, time, and patients to be similar to one another. We show that CLOCS consistently outperforms the state-of-the-art methods, BYOL and SimCLR, when performing a linear evaluation of, and fine-tuning on, downstream tasks. We also show that CLOCS achieves strong generalization performance with only $2 5 \%$ o f labelled training data. Furthermore, our training procedure naturally generates patient-specific representations that can be used to quantify patient-similarity.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ At present, the healthcare system is unable to sufficiently leverage the large, unlabelled datasets that it generates on a daily basis. This is partially due to the dependence of deep learning algorithms on high quality labels for good generalization performance. However, arriving at such high quality labels in a clinical setting where physicians are squeezed for time and attention is increasingly difficult. To overcome such an obstacle, self-supervised techniques have emerged as promising methods. These methods exploit the unlabelled dataset to formulate pretext tasks such as predicting the rotation of images (Gidaris et al., 2018), their corresponding colourmap (Larsson et al., 2017), and the arrow of time (Wei et al., 2018). More recently, contrastive learning was introduced as a way to learn representations of instances that share some context. By capturing this high-level shared context (e.g., medical diagnosis), representations become invariant to the differences (e.g., input modalities) between the instances.
12
+
13
+ Contrastive learning can be characterized by three main components: 1) a positive and negative set of examples, 2) a set of transformation operators, and 3) a variant of the noise contrastive estimation loss. Most research in this domain has focused on curating a positive set of examples by exploiting data temporality (Oord et al., 2018), data augmentations (Chen et al., 2020), and multiple views of the same data instance (Tian et al., 2019). These methods are predominantly catered to the image-domain and central to their implementation is the notion that shared context arises from the same instance. We believe this precludes their applicability to the medical domain where physiological time-series are plentiful. Moreover, their interpretation of shared context is limited to data from a common source where that source is the individual data instance. In medicine, however, shared context can occur at a higher level, the patient level. This idea is central to our contributions and will encourage the development of representations that are patient-specific. Such representations have the potential to be used in tasks that exploit patient similarity such as disease subgroup clustering and discovery. As a result of the process, medical practitioners may receive more interpretable outputs from networks.
14
+
15
+ In this work, we leverage electrocardiogram (ECG) signals to learn patient-specific representations in a self-supervised manner via contrastive learning. To do so, we exploit the fact that ECG signals summarize both temporal and spatial information. The latter can be understood in terms of projections of the same electrical signal onto multiple axes, also known as leads.
16
+
17
+ Contributions. Our contributions are the following:
18
+
19
+ 1. We propose a family of patient-specific contrastive learning methods, entitled CLOCS, that exploit both temporal and spatial information present within ECG signals.
20
+
21
+ 2. We show that CLOCS outperforms state-of-the-art methods, BYOL and SimCLR, when performing a linear evaluation of, and fine-tuning on, downstream tasks involving cardiac arrhythmia classification.
22
+
23
+ # 2 RELATED WORK
24
+
25
+ Contrastive Learning. In contrastive predictive coding, Oord et al. (2018) use representations of current segments to predict those of future segments. More recently, Tian et al. (2019) propose contrastive multi-view coding where multiple views of the same image are treated as ‘shared context’. He et al. (2019); Chen et al. (2020); Grill et al. (2020) exploit the idea of instance discrimination (Wu et al., 2018) and interpret multiple views as stochastically augmented forms of the same instance. They explore the benefit of sequential data augmentations and show that cropping and colour distortions are the most important. These augmentations, however, do not trivially extend to the time-series domain. Shen et al. (2020) propose to create mixtures of images to smoothen the output distribution and thus prevent the model from being overly confident. Time Contrastive Learning (Hyvarinen & Morioka, 2016) performs contrastive learning over temporal segments in a signal and illustrate the relationship between their approach and ICA. In contrast to our work, they formulate their task as prediction of the segment index within a signal and perform limited experiments that do not exploit the noise contrastive estimation (NCE) loss. Bachman et al. (2019) Time Contrastive Networks (Sermanet et al., 2017) attempt to learn commonalities across views and differences across time. In contrast, our work focuses on identifying commonalities across both spatial and temporal components of data.
26
+
27
+ Self-Supervision for Medical Time-Series. Miotto et al. (2016) propose DeepPatient, a 3-layer stacked denoising autoencoder that attempts to learn a patient representation using electronic health record (EHR) data. Although performed on a large proprietary dataset, their approach is focused on EHRs and does not explore contrastive learning for physiological signals. Sarkar & Etemad (2020) apply existing self-supervised methods on ECG recordings in the context of affective computing. The methods implemented include defining pretext classification tasks such as temporal inversion, negation, time-warping, etc. Their work is limited to affective computing, does not explore contrastive learning, and does not exploit multi-lead data as we do. Lyu et al. (2018) explore a sequence to sequence model to learn representations from EHR data in the eICU dataset. In the process, they minimize the reconstruction error of the input time-series. Li et al. (2020) leverage the aforementioned unsupervised learning technique on a large clinical dataset, CPRD, to obtain uncertainty estimates for predictions.
28
+
29
+ # 3 BACKGROUND
30
+
31
+ # 3.1 CONTRASTIVE LEARNING
32
+
33
+ Assume the presence of a learner $f _ { \theta } : x \in \mathbb { R } ^ { D } \to h \in \mathbb { R } ^ { E }$ , parameterized by $\theta$ , which maps a $D$ -dimensional input, $x$ , to an $E$ -dimensional representation, $h$ . Further assume the presence of an unlabelled dataset, $X \in \mathbb { R } ^ { N \times D }$ , where $N$ is the total number of instances.
34
+
35
+ Each unlabelled instance, $x ^ { i } \in X$ , is exposed to a set of transformations, $T _ { A }$ and $T _ { B }$ , such that $x _ { A } ^ { i } = T _ { A } ( x ^ { i } )$ and $x _ { B } ^ { i } = T _ { B } ( x ^ { i } )$ . Such transformations can consist of two different data augmentation procedures such as random cropping and flipping. These transformed instances now belong to an augmented dataset, $X ^ { \prime } \in \mathbb { R } ^ { N \times D \times V }$ , where $V$ is equal to the number of applied transformations. In contrastive learning, representations, $h _ { A } ^ { i } = f _ { \theta } ( \hat { x _ { A } ^ { i } } )$ and $h _ { B } ^ { i } = f _ { \theta } ( x _ { B } ^ { i } )$ , are said to share context. As a result of this shared context, these representations constitute a positive pair because (a) they are derived from the same original instance, $x ^ { i }$ , and (b) the transformations applied to the original instance were class-preserving. Representations within a positive pair are encouraged to be similar to one another and dissimilar to representations of all other instances, $h _ { A } ^ { j } , h _ { B } ^ { j } \ \forall j \neq i$ . The similarity of these representations, $s ( h _ { A } ^ { i } , h _ { B } ^ { i } )$ , is quantified via a metric, $s$ , such as cosine similarity. By encouraging high similarity between representations in the positive pair, the goal is to learn representations that are invariant to different transformations of the same instance.
36
+
37
+ # 4 METHODS
38
+
39
+ # 4.1 POSITIVE AND NEGATIVE PAIRS OF REPRESENTATIONS
40
+
41
+ Representations that are derived from the same instance are typically assumed to share context. This approach, however, fails to capture commonalities present across instances. In the medical domain, for example, multiple physiological recordings from the same patient may share context. It is important to note that if the multitude of physiological recordings associated with a patient were collected over large time-scales (e.g., on the order of years) and in drastically different scenarios (e.g., at rest vs. during a stress test), then the shared context across these recordings is likely to diminish. This could be due to changing patient demographics and disease profiles. With the previous caveat in mind, we propose to leverage commonalities present in multiple physiological recordings by redefining a positive pair to refer to representations of transformed instances that belong to the same patient. We outline how to arrive at these transformed instances next.
42
+
43
+ # 4.2 TRANSFORMATION OPERATORS
44
+
45
+ When choosing the transformation operators, $T$ , that are applied to each instance, the principal desideratum is that they capture invariances in the ECG recording. Motivated by the observation that ECG recordings reflect both temporal and spatial information, we propose to exploit both temporal and spatial invariance. We provide an intuition for such invariances in Fig. 1.
46
+
47
+ ![](images/23db671ae9e543f1a4ec0acfd2e66f3aaf73131dee3483ec6d1cadf695873937.jpg)
48
+ Figure 1: ECG recordings reflect both temporal and spatial information. This is because they measure the electrical activity of the heart using different leads (views) over time. Temporal Invariance. Abrupt changes to the ECG recording are unlikely to occur on the order of seconds, and therefore adjacent segments of shorter duration will continue to share context. Spatial Invariance. Recordings from different leads (at the same time) will reflect the same cardiac function, and thus share context.
49
+
50
+ As is pertains to temporal invariance (Fig. 1 left), we assume that upon splitting an ECG recording, associated with Class 1, into several segments, each of them remain associated with Class 1. We justify this assumption based on human physiology where abrupt changes in cardiac function (on the order of seconds) are unlikely to occur. If these segments were collected years apart, for example, our assumption may no longer hold. As for spatial invariance (Fig. 1 right), we leverage the hexiaxial diagram which illustrates the location of the leads relative to the heart. We assume that temporallyaligned ECG recordings from different leads (views) are associated with the same class. This is based on the idea that multiple leads (collected at the same time) will reflect the same underlying cardiac function. Occasionally, this assumption may not hold, if, for example, a cardiac condition afflicts a specific part of the heart, making it detectable by only a few leads. We now describe how to exploit these invariances for contrastive learning.
51
+
52
+ Contrastive Multi-segment Coding (CMSC). Given an ECG recording, $x ^ { i }$ , with duration $S$ seconds, we can extract $V$ non-overlapping temporal segments, each with duration $S / V$ seconds. If $V = 2$ , for example, $x _ { t 1 } ^ { i } = T _ { t 1 } ( \stackrel { . } { x ^ { i } } )$ and $x _ { t 2 } ^ { i ^ { \star } } = T _ { t 2 } \overline { { ( x ^ { i } ) } }$ where $t$ indicates the timestamp of the temporal segment (see Fig. 1 left). We exploit temporal invariances in the ECG by defining representations of these adjacent and non-overlapping temporal segments as positive pairs.
53
+
54
+ Contrastive Multi-lead Coding (CMLC). Different projections of the same electrical signal emanating from the heart are characterized by different leads, $L$ . For example, with two leads, $L 1$ and $L 2$ , then $x _ { L 1 } ^ { i } = T _ { L 1 } ( x ^ { i } )$ and $x _ { L 2 } ^ { i } = T _ { L 2 } \mathbf { \bar { ( } } x ^ { i } )$ (see Fig. 1 right). We exploit spatial invariances in the ECG by defining temporally-aligned representations of these different projections as positive pairs.
55
+
56
+ Contrastive Multi-segment Multi-lead Coding (CMSMLC). We simultaneously exploit both temporal and spatial invariances in the ECG by defining representations of non-overlapping temporal segments and different projections as positive pairs. For example, in the presence of two temporal segments with timestamps, $t 1$ and $t 2$ , that belong to two leads, $L 1$ and $L 2$ , then $x _ { t 1 , L 1 } ^ { i } = T _ { t 1 , L 1 } \overset { \cdot } { ( x ^ { i } ) }$ and xit2,L2 $x _ { t 2 , L 2 } ^ { i } = T _ { t 2 , L 2 } ( x ^ { i } )$ .
57
+
58
+ # 4.3 PATIENT-SPECIFIC NOISE CONTRASTIVE ESTIMATION LOSS
59
+
60
+ Given our patient-centric definition of positive pairs, we propose to optimize a patient-specific noise contrastive estimation loss. More formally, Given a mini-batch of $K$ instances, we apply a pair of transformation operators and generate $2 K$ transformed instances (a subset of which is shown in Fig. 2. We encourage a pair of representations, $h _ { A } ^ { i }$ and $h _ { B } ^ { k }$ , $i , k \in P$ , from the same patient, $P$ , to be similar to one another and dissimilar to representations from other patients. We quantify this similarity using the cosine similarity, $s$ , with a temperature scaling parameter, $\tau$ , (see Eq. 4) as is performed in (Tian et al., 2019; Chen et al., 2020). We extend this to all representations in the mini-batch to form a similarity matrix of dimension $K \times K$ . In this matrix, we identify positive pairs by associating each instance with its patient ID. By design, this includes the diagonal elements and results in the loss shown in Eq. 2. If the same patient reappears within the mini-batch, then we also consider off-diagonal elements, resulting in the loss shown in Eq. 3. The frequency of these off-diagonals is inconsistent due to the random shuffling of data. We optimize the objective function in Eq. 1 for all pairwise combinations of transformation operators, $T _ { A }$ and $T _ { B }$ , where we include Eq. 2 and Eq. 3 twice to consider negative pairs in both views.
61
+
62
+ $$
63
+ \mathcal { L } = \mathbb { E } _ { T _ { A } , T _ { B } } \left[ \mathcal { L } _ { d i a g } ^ { h _ { A } , h _ { B } } + \mathcal { L } _ { d i a g } ^ { h _ { B } , h _ { A } } + \mathcal { L } _ { o f f - d i a g } ^ { h _ { A } , h _ { B } } + \mathcal { L } _ { o f f - d i a g } ^ { h _ { B } , h _ { A } } \right]
64
+ $$
65
+
66
+ $$
67
+ \mathcal { L } _ { d i a g } ^ { h _ { A } , h _ { B } } = - \mathbb { E } _ { i \in P } \left[ \log \frac { e ^ { s ( h _ { A } ^ { i } , h _ { B } ^ { i } ) } } { \sum _ { j } e ^ { s ( h _ { A } ^ { i } , h _ { B } ^ { j } ) } } \right]
68
+ $$
69
+
70
+ $$
71
+ \mathcal { L } _ { o f f - d i a g } ^ { h _ { A } , h _ { B } } = - \mathbb { E } _ { i , k \in P } \left[ \log \frac { e ^ { s ( h _ { A } ^ { i } , h _ { B } ^ { k } ) } } { \sum _ { j } e ^ { s ( h _ { A } ^ { i } , h _ { B } ^ { j } ) } } \right] \quad ( 3 ) \quad s ( h _ { A } ^ { i } , h _ { B } ^ { i } ) = \frac { f _ { \theta } ( x _ { A } ^ { i } ) \cdot f _ { \theta } ( x _ { B } ^ { i } ) } { \| f _ { \theta } ( x _ { A } ^ { i } ) \| \| f _ { \theta } ( x _ { B } ^ { i } ) \| } \frac { 1 } { \tau }
72
+ $$
73
+
74
+ ![](images/25e8fe6694e4c84e806efce960e8a1c8467f191d3350e7d20bfc469c274da38b.jpg)
75
+ Figure 2: Similarity matrix for a mini-batch of $K$ instances in (Left) Contrastive Multi-segment Coding, (Centre) Contrastive Multi-lead Coding, and (Right) Contrastive Multi-segment Multilead Coding. Additional matrices would be generated based on all pairs of applied transformation operators, $T _ { A }$ and $T _ { B }$ . Exemplar transformed ECG instances are illustrated along the edges. To identify positive pairs, we associate each instance with its patient ID. By design, diagonal elements (green) correspond to the same patient, contributing to Eq. 2. Similarly, instances 1 and 50 (yellow) belong to the same patient, contributing to Eq. 3. The blue area corresponds to negative examples as they pertain to instances from different patients.
76
+
77
+ # 5 EXPERIMENTAL DESIGN
78
+
79
+ # 5.1 DATASETS
80
+
81
+ We conduct our experiments using PyTorch (Paszke et al., 2019) on four ECG datasets that include cardiac arrhythmia labels. PhysioNet 2020 (Perez Alday et al., 2020) consists of 12-lead ECG recordings from 6,877 patients alongside 9 different classes of cardiac arrhythmia. Each recording can be associated with multiple labels. Chapman (Zheng et al., 2020) consists of 12-lead ECG recordings from 10,646 patients alongside 11 different classes of cardiac arrhythmia. As is suggested by Zheng et al. (2020), we group these labels into 4 major classes. PhysioNet 2017 (Clifford et al., 2017) consists of 8,528 single-lead ECG recordings alongside 4 different classes. Cardiology (Hannun et al., 2019) consists of single-lead ECG recordings from 328 patients alongside 12 different classes of cardiac arrhythmia. An in-depth description of these datasets can be found in Appendix A.1.
82
+
83
+ All datasets were split into training, validation, and test sets according to patient ID using a 60, 20, 20 configuration. In other words, patients appeared in only one of the sets. The exact number of instances used during self-supervised pre-training and supervised training can be found in Appendix A.2.
84
+
85
+ # 5.2 PRE-TRAINING IMPLEMENTATION
86
+
87
+ We conduct our pre-training experiments on the training set of two of the four datasets: PhysioNet 2020 and Chapman. We chose these datasets as they contain multi-lead data. In CMSC, we extract a pair of non-overlapping temporal segments of $S = 2 5 0 0$ samples. This is equivalent to either 10 or 5 seconds worth of ECG data from the Chapman and PhysioNet 2020 datasets, respectively. Therefore, our model is presented with a mini-batch of dimension $K \times S \times 2$ where $K$ is the batchsize, and $S$ is the number of samples. In CMLC, we explore two scenarios with a different number of leads corresponding to the same instance. Our mini-batch dimension is $K \times S \times L$ , where $L$ is the number of leads. Lastly, in CMSMLC, we incorporate an additional temporal segment in each mini-batch. Therefore, our mini-batch dimension is $K \times 2 S \times L$ . To ensure a fair comparison between all methods, we expose them to an equal number of patients and instances during training. In CMLC or CMSMLC, we either pre-train using 4 leads (II, V2, aVL, aVR) or all 12 leads. We chose these 4 leads as they cover a large range of axes.
88
+
89
+ # 5.3 EVALUATION ON DOWNSTREAM TASK
90
+
91
+ We evaluate our pre-trained methods in two scenarios. In Linear Evaluation of Representations, we are interested in evaluating the utility of the fixed feature extractor in learning representations. Therefore, the pre-trained parameters are frozen and multinomial logistic regression is performed on the downstream supervised task. In Transfer Capabilities of Representations, we are interested in evaluating the inductive bias introduced by pre-training. Therefore, the pre-trained parameters are used as an initialization for training on the downstream supervised task.
92
+
93
+ # 5.4 BASELINES
94
+
95
+ We compare our pre-training methods to networks that are initialized randomly (Random Init.), via supervised pre-training (Supervised), or via a multi-task pre-training mechanism introduced specifically for ECG signals (MT-SSL) (Sarkar & Etemad, 2020). We also compare to BYOL (Grill et al., 2020) and SimCLR (Chen et al., 2020), which encourage representations of instances and their perturbed counterparts to be similar to one another, with the aim of learning transformation-invariant representations that transfer well. As SimCLR has been shown to be highly dependent on the choice of perturbations, we explore the following time-series perturbations (see Appendix B for visualizations):
96
+
97
+ • Gaussian - we add $\epsilon \sim \mathcal { N } ( 0 , \sigma )$ to the time-series signal where we chose $\sigma$ based on the amplitude of the signal. This was motivated by the work of Han et al. (2020) who recently showed the effect of additive noise on ECG signals.
98
+ • Flip - we flip the time-series signal temporally $( \mathbf { F l i p } _ { Y } )$ ), reversing the arrow of time, or we invert the time-series signal along the $\mathbf { X }$ -axis $( \mathbf { F l i p } _ { X } )$ ).
99
+ • SpecAugment (Park et al., 2019) - we take the short-time Fourier transform of the time-series signal, generating a spectrogram. We then mask either temporal $( \mathbf { S } \mathbf { A } _ { t } )$ or spectral $( \mathbf { S } \mathbf { A } _ { f } )$ ) bins
100
+
101
+ of varying widths before converting the spectrogram to the time domain. We also explore the application of sequential perturbations to the time-series signal.
102
+
103
+ # 5.5 HYPERPARAMETERS
104
+
105
+ During self-supervised pre-training, we chose the temperature parameter, $\tau = 0 . 1$ , as per Chen et al. (2020). For BYOL, we chose the decay rate, $\tau _ { d } = 0 . 9 0$ , after experimenting with various alternatives (see Appendix F). We use the same network architecture for all experiments. Further implementation details can be found in Appendix C.
106
+
107
+ # 6 EXPERIMENTAL RESULTS
108
+
109
+ # 6.1 LINEAR EVALUATION OF REPRESENTATIONS
110
+
111
+ In this section, we evaluate the utility of the self-supervised representations learned using four leads on a downstream linear classification task. In Table 1, we show the test AUC on Chapman and PhysioNet 2020 using $50 \%$ of the labelled data $F = 0 . 5$ ) after having learned representations, with dimension $E = 1 2 8$ , using the same two datasets.
112
+
113
+ We show that CMSC outperforms BYOL and SimCLR on both datasets. On the Chapman dataset, CMSC and SimCLR achieve an $\mathrm { A U C = }$ 0.896 and 0.738, respectively, illustrating a $1 5 . 8 \%$ improvement. Such a finding implies that the representations learned by CMSC are richer and thus allow for improved generalization. We hypothesize that this is due to the setup of CMSC whereby the shared context is across segments (temporally) and patients. Moreover, we show that CLOCS (all 3 proposed methods) outperforms SimCLR in $100 \%$ of all conducted experiments, even when pre-training and evaluating with all 12 leads (see Appendix D).
114
+
115
+ Table 1: Test AUC of the linear evaluation of the representations at $\ F \ = \ 0 . 5$ , after having pre-trained on Chapman or PhysioNet 2020 with $E = 1 2 8$ . Pre-training and evaluating multi-lead datasets\* using 4 leads (II, V2, aVL, aVR). Mean and standard deviation are shown across 5 seeds.
116
+
117
+ <table><tr><td>Dataset</td><td>Chapman*</td><td>PhysioNet 2020*</td></tr><tr><td>MT-SSL</td><td>0.677 ± 0.024</td><td>0.665 ± 0.015</td></tr><tr><td>BYOL</td><td>0.643 ± 0.043</td><td>0.595 ± 0.018</td></tr><tr><td>SimCLR</td><td>0.738 ±0.034</td><td>0.615 ± 0.014</td></tr><tr><td>CMSC</td><td>0.896 ±0.005</td><td>0.715 ± 0.033</td></tr><tr><td>CMLC</td><td>0.870 ± 0.022</td><td>0.596 ±0.008</td></tr><tr><td>CMSMLC</td><td>0.847 ± 0.024</td><td>0.680 ±0.008</td></tr></table>
118
+
119
+ # 6.2 EFFECT OF PERTURBATIONS ON PERFORMANCE
120
+
121
+ So far, we have presented CLOCS without having incorporated any perturbations during pre-training. However, contrastive learning methods, and in particular SimCLR, are notorious for their overdependence on the choice of perturbations. To explore this dependence, we apply a diverse set of stochastic perturbations, $P$ , (see Appendix B) during pre-training and observe its effect on generalization performance. We follow the setup introduced by Chen et al. (2020) and apply either a single perturbation to each instance, $x ^ { i }$ , whereby $x _ { 1 } ^ { i } = { \dot { P } } _ { 1 } ( x ^ { i } )$ , or sequential perturbations whereby $\mathsf { \bar { x } } _ { 1 , 2 } ^ { i } = P _ { 2 } ( P _ { 1 } ( x ^ { i } ) )$ .
122
+
123
+ We apply such perturbations while pre-training with SimCLR or CMSC on PhysioNet 2020 using 4 leads and, in Fig. 3, illustrate the test AUC in the linear evaluation scenario. We show that, regardless of the type and number of perturbations, CMSC continues to outperform SimCLR. For example, the worst-performing CMSC implementation $( { \mathrm { F l i p } } _ { Y } )$ ) results in an $\mathrm { A U C } = 0 . 6 6 1$ which is still greater than the best-performing SimCLR implementation (Gaussian $ \mathbf { S } \mathbf { A } _ { t } .$ ) with an $\mathrm { A U C } = 0 . 6 3 6$ . In fact, we find that pre-training with CMSC without applying any perturbations (see Table 1) still outperforms the best-performing SimCLR implementation. Such a finding suggests that CMSC’s already strong performance is more likely to stem from its redefinition of the ‘shared context’ to include both time and patients than from the choice of perturbations.
124
+
125
+ # 6.3 TRANSFER CAPABILITIES OF REPRESENTATIONS
126
+
127
+ In this section, we evaluate the utility of initializing a network for a downstream task with parameters learned via self-supervision using four leads. In Table 2, we show the test AUC on downstream datasets at $F = 0 . 5$ for the various self-supervised methods with $E = 1 2 8$ .
128
+
129
+ ![](images/23ac1a44ab13d03d8080477c4f63e52104ef12a9697d889d334115d34e964c2c.jpg)
130
+ Figure 3: Effect of single (blue) and sequential (green) perturbations applied to the (top) SimCLR and (bottom) CMSC implementations on linear evaluation. Sequential perturbations involve a Gaussian perturbation followed by one of the remaining four types. Pre-training and evaluation was performed on PhysioNet 2020 using 4 leads. Evaluation was performed at $F = 0 . 5$ and results are averaged across 5 seeds. We show that CMSC outperforms SimCLR regardless of the applied perturbation.
131
+
132
+ We show that, with a few exceptions, self-supervision is advantageous relative to a Random Initialization. This can be seen by the higher AUC achieved by the former relative to the latter. We also show that, depending on the downstream dataset, either CMSC or CMSMLC outperform BYOL and SimCLR. For example, when pre-training on Chapman and fine-tuning on Cardiology, CMSMLC achieves an $\mathrm { A U C } = 0 . 7 1 7$ , a $4 . 1 \%$ improvement compared to SimCLR. This implies that by encouraging representations across space, time, and patients to be similar to one another, networks are nudged into a favourable parameter space. In Appendix E.1, we extend these findings and illustrate that CLOCS outperforms SimCLR in at least $7 5 \%$ of all experiments conducted, on average. When pre-training, fine-tuning, and evaluating using all 12 leads, we show that CMSC outperforms all other methods in at least $9 0 \%$ of all experiments conducted (see Appendix E.2).
133
+
134
+ Table 2: Test AUC in the fine-tuning scenario at $F = 0 . 5$ , after having pre-trained on Chapman or PhysioNet 2020 with $E = 1 2 8$ . Pre-training, fine-tuning, and evaluating multi-lead datasets\* using 4 leads. Mean and standard deviation are shown across 5 seeds.
135
+
136
+ <table><tr><td>Pretraining Dataset</td><td colspan="3">Chapman*</td><td colspan="3">PhysioNet 2020*</td></tr><tr><td>Downstream Dataset</td><td>Cardiology</td><td>PhysioNet 2017</td><td>PhysioNet 2020*</td><td>Cardiology</td><td>PhysioNet 2017</td><td>Chapman*</td></tr><tr><td>Random Init.</td><td>0.678 ± 0.011</td><td>0.763 ±0.005</td><td>0.803 ± 0.008</td><td>0.678 ± 0.011</td><td>0.763 ± 0.005</td><td>0.907 ± 0.006</td></tr><tr><td>Supervised</td><td>0.684 ± 0.015</td><td>0.799 ± 0.008</td><td>0.827 ± 0.001</td><td>0.730 ± 0.002</td><td>0.810 ± 0.009</td><td>0.954 ± 0.003</td></tr><tr><td colspan="7">Self-supervised Pre-training</td></tr><tr><td>MT-SSL</td><td>0.650 ± 0.009</td><td>0.741 ± 0.012</td><td>0.774 ± 0.010</td><td>0.661± 0.011</td><td>0.746 ± 0.016</td><td>0.923 ± 0.007</td></tr><tr><td>BYOL</td><td>0.678 ± 0.021</td><td>0.748 ± 0.014</td><td>0.802 ± 0.013</td><td>0.674 ± 0.022</td><td>0.757 ± 0.010</td><td>0.916 ± 0.009</td></tr><tr><td>SimCLR</td><td>0.676 ± 0.011</td><td>0.772 ± 0.010</td><td>0.823 ± 0.011</td><td>0.658 ± 0.027</td><td>0.762 ± 0.009</td><td>0.923 ± 0.010</td></tr><tr><td>CMSC</td><td>0.695 ± 0.024</td><td>0.773 ± 0.013</td><td>0.830 ± 0.002</td><td>0.714 ± 0.014</td><td>0.760 ± 0.013</td><td>0.932 ± 0.008</td></tr><tr><td>CMLC</td><td>0.665 ± 0.016</td><td>0.767 ± 0.013</td><td>0.810 ± 0.011</td><td>0.675 ± 0.013</td><td>0.762 ± 0.007</td><td>0.910 ± 0.012</td></tr><tr><td>CMSMLC</td><td>0.717 ± 0.006</td><td>0.774 ± 0.004</td><td>0.814 ± 0.009</td><td>0.698 ± 0.011</td><td>0.774 ± 0.012</td><td>0.930 ± 0.012</td></tr></table>
137
+
138
+ # 6.4 DOING MORE WITH LESS LABELLED DATA
139
+
140
+ Having established that self-supervision can nudge networks to a favourable parameter space, we set out to investigate whether such a space can lead to strong generalization with less labelled data in the downstream task. In Fig. 4, we illustrate the validation AUC of networks initialized randomly or via CMSC and fine-tuned on two different datasets.
141
+
142
+ We find that fine-tuning a network based on a CMSC initialization drastically improves data-efficiency. In Fig. 4a, we show that a network initialized with CMSC and exposed to only $2 5 \%$ of the labelled data outperforms one that is initialized randomly and exposed to $1 \bar { 0 } 0 \%$ of the labelled data. This can be seen by the consistently higher AUC during, and at the end of, training. A similar outcome can be seen in Fig. 4b. This suggests that self-supervised pre-training exploits data efficiently such that it can do more with less on downstream classification tasks.
143
+
144
+ ![](images/c40993e9a38d113486aeaa80c831ae11f7230092461f77d670834d26942b0f8b.jpg)
145
+ Figure 4: Validation AUC of a network initialized randomly or via CMSC and which is exposed to different amounts of labelled training data, $F$ . Results are averaged across 5 seeds. Shaded area represents one standard deviation.
146
+
147
+ # 6.5 EFFECT OF EMBEDDING DIMENSION, $E$ , AND AVAILABILITY OF LABELLED DATA, $F$
148
+
149
+ The dimension of the representation learned during self-supervision and the availability of labelled training data can both have an effect on model performance. In this section, we investigate these claims. In Figs. 5a and 5b, we illustrate the test AUC for all pre-training methods as a function of $E = ( 3 2 , 6 4 , 1 2 8 , 2 5 6 )$ and $F = ( 0 . 2 5 , 0 . 5 0 , 0 . 7 5 , 1 )$ .
150
+
151
+ ![](images/d442e9b8b443a586097eafed793b22ac3940bbcfcaff80371c34fcd3d497cb63.jpg)
152
+ Figure 5: Effect of (a) embedding dimension, $E$ , and (b) labelled fraction, $F$ , on the test AUC when pre-training on Chapman and fine-tuning on Cardiology. Results are averaged across 5 seeds. Error bars represent one standard deviation.
153
+
154
+ In Fig. 5a, we show that networks initialized randomly or via SimCLR are not significantly affected by the embedding dimension. This can be seen by the $\mathrm { A U C } \approx 0 . 6 3$ and $\approx 0 . 6 5$ , for these two methods across all values of $E$ . In contrast, the embedding dimension has a greater effect on CMSC where $\mathrm { A U C } \approx 0 . 6 6 0 . 6 9$ as $E = 3 2 1 2 8$ . This implies that CMSC is still capable of achieving strong generalization performance despite the presence of few labelled data $F = 0 . 2 5 )$ . We hypothesize that the strong performance of CMSC, particularly at $E = 1 2 8$ , is driven by its learning of patient-specific representations (see Appendix G) that cluster tightly around one another, a positive characteristic especially when such representations map to the same downstream class.
155
+
156
+ In Fig. 5b, we show that increasing the amount of labelled training data benefits the generalization performance of all methods. This can be seen by the increasing AUC values as $F = 0 . 2 5 1$ . We also show that at all fraction values, CMSMLC outperforms its counterparts. For example, at $F = 1$ , CMSMLC achieves an $\mathrm { A U C } = 0 . 7 3 2$ whereas SimCLR achieves an $\mathrm { A U C } = 0 . 7 1 8$ . Such superiority still holds at $F = 0 . 2 5$ where the two methods achieve an $\mathrm { A U C } = 0 . 6 7 5$ and 0.652, respectively. This outcome emphasizes the robustness of CMSMLC to scarce labelled training data.
157
+
158
+ # 6.6 CLOCS LEARNS PATIENT-SPECIFIC REPRESENTATIONS
159
+
160
+ We redefined ‘shared context’ to refer to representations from the same patient, which in turn should produce patient-specific representations. To validate this hypothesis, we calculate the pairwise Euclidean distance between representations of the same patient (Intra-Patient) and those of different patients (Inter-Patient). On average, the former should be smaller than the latter. In Fig. 6, we illustrate the two distributions associated with the intra and inter-patient distances at $E = 1 2 8$ . We also find that increasing the embedding dimension shifts these distributions to higher values (see Fig 9).
161
+
162
+ We show that these two distributions have large mean values and overlap significantly when implementing SimCLR, as seen in Fig. 6a. This is expected as SimCLR is blind to the notion of a patient. In contrast, when implementing CMSC, the intra-patient distances are lower than those found in SimCLR, as seen in Fig. 6b. Moreover, the intra and inter-patient distributions are more separable. This implies that pre-training with CMSC leads to patient-specific representations. We note that this phenomenon takes place while concomitantly learning better representations, as observed in previous sections.
163
+
164
+ ![](images/ea760c7068b8a39676463bee8067c3681faf17061fa7a89cf848f8ef4546cabe.jpg)
165
+ Figure 6: Distribution of pairwise Euclidean distance between representations $E = 1 2 8$ ) belonging to the same patient (Intra-Patient) and those belonging to different patients (Inter-Patient). Selfsupervision was performed on PhysioNet 2020. Notice the lower average intra-patient distance and improved separability between the two distributions with CMSC than with SimCLR.
166
+
167
+ # 7 DISCUSSION AND FUTURE WORK
168
+
169
+ In this paper, we proposed a family of self-supervised pre-training mechanisms, entitled CLOCS, based on contrastive learning for physiological signals. In the process, we encourage representations across segments (temporally) and leads (spatially) that correspond to instances from the same patient to be similar to one another. We show that our methods outperform the state-of-the-art methods, BYOL and SimCLR, when performing a linear evaluation of, and fine-tuning on, downstream tasks. This conclusion also holds when applying a range of perturbations and when pre-training and evaluating with a different number of leads. We now elucidate several avenues worth exploring.
170
+
171
+ Quantifying patient similarity. We have managed to learn patient-specific representations. These representations can be used to quantify patient-similarity in order to assist with diagnosis or gain a better understanding of a diseased condition. Validation of these representations can be performed by comparing known similar patients.
172
+
173
+ Multi-modal transfer. We transferred parameters from one task to another that shared the same input modality, the ECG. Such data may not always be available for self-supervision. An interesting path would be to explore whether contrastive self-supervision on one modality can transfer well to another modality.
174
+
175
+ # REFERENCES
176
+
177
+ Philip Bachman, R Devon Hjelm, and William Buchwalter. Learning representations by maximizing mutual information across views. In Advances in Neural Information Processing Systems, pp. 15509–15519, 2019.
178
+
179
+ Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. arXiv preprint arXiv:2002.05709, 2020.
180
+
181
+ Gari D Clifford, Chengyu Liu, Benjamin Moody, H Lehman Li-wei, Ikaro Silva, Qiao Li, AE Johnson, and Roger G Mark. Af classification from a short single lead ECG recording: the physionet/computing in cardiology challenge 2017. In 2017 Computing in Cardiology, pp. 1–4, 2017.
182
+
183
+ Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. arXiv preprint arXiv:1803.07728, 2018.
184
+
185
+ Jean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec, Pierre H Richemond, Elena Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Daniel Guo, Mohammad Gheshlaghi Azar, et al. Bootstrap your own latent: A new approach to self-supervised learning. arXiv preprint arXiv:2006.07733, 2020.
186
+
187
+ Xintian Han, Yuxuan Hu, Luca Foschini, Larry Chinitz, Lior Jankelson, and Rajesh Ranganath. Deep learning models for electrocardiograms are susceptible to adversarial attack. Nature Medicine, pp. 1–4, 2020.
188
+
189
+ Awni Y Hannun, Pranav Rajpurkar, Masoumeh Haghpanahi, Geoffrey H Tison, Codie Bourn, Mintu P Turakhia, and Andrew Y Ng. Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network. Nature Medicine, 25(1):65, 2019.
190
+
191
+ Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. arXiv preprint arXiv:1911.05722, 2019.
192
+
193
+ Aapo Hyvarinen and Hiroshi Morioka. Unsupervised feature extraction by time-contrastive learning and nonlinear ica. In Advances in Neural Information Processing Systems, pp. 3765–3773, 2016.
194
+
195
+ Gustav Larsson, Michael Maire, and Gregory Shakhnarovich. Colorization as a proxy task for visual understanding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 6874–6883, 2017.
196
+
197
+ Yikuan Li, Shishir Rao, Abdelaali Hassaine, Rema Ramakrishnan, Yajie Zhu, Dexter Canoy, Gholamreza Salimi-Khorshidi, Thomas Lukasiewicz, and Kazem Rahimi. Deep bayesian gaussian processes for uncertainty estimation in electronic health records. arXiv preprint arXiv:2003.10170, 2020.
198
+
199
+ Xinrui Lyu, Matthias Hueser, Stephanie L Hyland, George Zerveas, and Gunnar Rätsch. Improving clinical predictions through unsupervised time series representation learning. arXiv preprint arXiv:1812.00490, 2018.
200
+
201
+ Riccardo Miotto, Li Li, Brian A Kidd, and Joel T Dudley. Deep patient: an unsupervised representation to predict the future of patients from the electronic health records. Scientific Reports, 6(1): 1–10, 2016.
202
+
203
+ Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018.
204
+
205
+ Daniel S Park, William Chan, Yu Zhang, Chung-Cheng Chiu, Barret Zoph, Ekin D Cubuk, and Quoc V Le. Specaugment: A simple data augmentation method for automatic speech recognition. arXiv preprint arXiv:1904.08779, 2019.
206
+
207
+ Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems, pp. 8024–8035, 2019.
208
+
209
+ E. A. Perez Alday, A. Gu, A. Shah, C. Liu, A. Sharma, S. Seyedi, A. Bahrami Rad, M. Reyna, and G. Clifford. Classification of 12-lead ECGs: the PhysioNet - computing in cardiology challenge 2020 (version 1.0.1). PhysioNet, 2020.
210
+
211
+ Pritam Sarkar and Ali Etemad. Self-supervised ecg representation learning for emotion recognition. arXiv preprint arXiv:2002.03898, 2020.
212
+
213
+ Pierre Sermanet, Corey Lynch, Jasmine Hsu, and Sergey Levine. Time-contrastive networks: Selfsupervised learning from multi-view observation. In 2017 IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), pp. 486–487. IEEE, 2017.
214
+
215
+ Zhiqiang Shen, Zechun Liu, Zhuang Liu, Marios Savvides, and Trevor Darrell. Rethinking image mixture for unsupervised visual representation learning. arXiv preprint arXiv:2003.05438, 2020.
216
+
217
+ Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. arXiv preprint arXiv:1906.05849, 2019.
218
+
219
+ Donglai Wei, Joseph J Lim, Andrew Zisserman, and William T Freeman. Learning and using the arrow of time. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 8052–8060, 2018.
220
+
221
+ Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via nonparametric instance discrimination. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3733–3742, 2018.
222
+
223
+ Jianwei Zheng, Jianming Zhang, Sidy Danioko, Hai Yao, Hangyuan Guo, and Cyril Rakovski. A 12-lead electrocardiogram database for arrhythmia research covering more than 10,000 patients. Scientific Data, 7(1):1–8, 2020.
parse/train/4Nt1F3qf9Gn/4Nt1F3qf9Gn_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1GOWV5eg/B1GOWV5eg.md ADDED
@@ -0,0 +1,431 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LEARNING TO REPEAT: FINE GRAINED ACTION REPETITION FOR DEEP REINFORCEMENT LEARNING
2
+
3
+ Sahil Sharma, Aravind S. Lakshminarayanan, Balaraman Ravindran
4
+
5
+ Indian Institute of Technology, Madras Chennai, 600036, India {sahil, ravi}@cse.iitm.ac.in aravindsrinivas@gmail.com
6
+
7
+ # ABSTRACT
8
+
9
+ Reinforcement Learning algorithms can learn complex behavioral patterns for sequential decision making tasks wherein an agent interacts with an environment and acquires feedback in the form of rewards sampled from it. Traditionally, such algorithms make decisions, i.e., select actions to execute, at every single time step of the agent-environment interactions. In this paper, we propose a novel framework, Fine Grained Action Repetition (FiGAR), which enables the agent to decide the action as well as the time scale of repeating it. FiGAR can be used for improving any Deep Reinforcement Learning algorithm which maintains an explicit policy estimate by enabling temporal abstractions in the action space. We empirically demonstrate the efficacy of our framework by showing performance improvements on top of three policy search algorithms in different domains: Asynchronous Advantage Actor Critic in the Atari 2600 domain, Trust Region Policy Optimization in Mujoco domain and Deep Deterministic Policy Gradients in the TORCS car racing domain.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ Reinforcement learning (RL) is used to solve goal-directed sequential decision making problems wherein explicit supervision in the form of correct decisions is not provided to the agent, but only evaluative feedback in the form of the rewards sampled from the environment. RL algorithms model goal-directed sequential decision making problems as Markov Decision Processes (MDP) [Sutton & Barto (1998)]. However, for problems with an exponential or continuous state space, tabular RL algorithms that maintain value or policy estimates for every state become infeasible. Therefore, there is a need to be able to generalize decision making to unseen states. Recent advances in representation learning through deep neural networks provide an efficient mechanism for such generalization [LeCun et al. (2015)]. Such a combination of representation learning through deep neural networks with reinforcement learning objectives has shown promising results in many sequential decision making domains such as the Atari 2600 domain [Bellemare et al. (2013); Mnih et al. (2015); Schaul et al. (2015); Mnih et al. (2016)], Mujoco simulated physics tasks domain [Todorov et al. (2012); Lillicrap et al. (2015)], the Robosoccer domain [Hausknecht et al. (2016)] and the TORCS domain [Wymann et al. (2000); Mnih et al. (2016)]. Often, MDP settings consist of an agent interacting with the environment at discrete time steps. A common feature shared by all the Deep Reinforcement Learning (DRL) algorithms above is that they repeatedly execute a chosen action for a fixed number of time steps $k$ . If $a _ { t }$ represents the action taken at time step $t$ , then for the said algorithms, $a _ { 1 } = a _ { 2 } = \cdot \cdot \cdot = a _ { k }$ , $a _ { k + 1 } = a _ { k + 2 } = \cdot \cdot \cdot = a _ { 2 k }$ and in general $a _ { i k + 1 } = a _ { i k + 2 } = \cdot \cdot \cdot = a _ { ( i + 1 ) k }$ , $i \geq 0$ . Action repetition allows these algorithms to compute the action once every $k$ time steps and hence operate at higher speeds, thus achieving real-time performance. This also offers other advantages such as smooth action policies. More importantly, as shown in Lakshminarayanan et al. (2017) and Durugkar et al. (2016), macro-actions constituting the same action repeated $k$ times could be interpreted as introducing temporal abstractions in the induced policies thereby enabling transitions between temporally distant advantageous states.
14
+
15
+ ![](images/354657db934dc968a49c5a24c41fc45749192c9793dcd5ec82080911bda6b630.jpg)
16
+ Figure 1: FiGAR induces temporal abstractions in learnt policies. The arrows indicate the action executed between the frames and the numbers depict the number of time steps for which the action was repeated. The thunder bolt corresponds to the firing action. An arrow alongside a thunderbolt corresponds to the action (arrow+fire). In the figure (a), the agent learns to execute down operation (which is equivalent to a no-op in this particular state, in this game) until a traveling car passes by and then executes temporally elongated actions to complete the task, skillfully avoiding the red car in the $7 ^ { t h }$ frame. In figure (b) the agent catches a glimpse of a pink opponent towards bottom right in the $2 ^ { n d }$ frame and executes temporally elongated actions to intercept and kill it (in the $6 ^ { t h }$ frame).
17
+
18
+ The time scale for action repetition has largely been static in DRL algorithms until now [Mnih et al. (2015; 2016); Schaul et al. (2015)]. Lakshminarayanan et al. (2017) are the first to explore dynamic time scales for action repetition in the DRL setting and show that it leads to significant improvement in performance on a few Atari 2600 games. However, they choose only two time scales and the experiments are limited to a few representative games. Moreover the method is limited to tasks with a discrete action space.
19
+
20
+ We propose FiGAR, a framework that enables any DRL algorithm regardless of whether its action space is continuous or discrete, to learn temporal abstractions in the form of temporally extended macro-actions. FiGAR uses a structured and factored representation of the policy whereby the policy for choosing the action is decoupled from that for the action repetition selection. Note that deciding actions and the action repetitions independently enables us to find temporal abstractions without blowing up the action space, unlike Vezhnevets et al. (2016) and Lakshminarayanan et al. (2017). The contribution of this work is twofold. First, we propose a generic extension to DRL algorithms by coming up with a factored policy representation for temporal abstractions (see figure 1 for sequences of macro actions learnt in 2 Atari 2600 games). Second, we empirically demonstrate FiGAR’s efficiency in improving policy gradient DRL algorithms with improvements in performance over several domains: 31 Atari 2600 games with Asynchronous Advantage Actor Critic [Mnih et al. (2016)], 5 tasks in MuJoCo Simulated physics tasks domain with Trust Region Policy Optimization [Schulman et al. (2015)] and the TORCS domain with Deep Deterministic Policy Gradients [Lillicrap et al. (2015)].
21
+
22
+ # 2 RELATED WORK
23
+
24
+ Our framework is centered on a very general idea of only deciding when necessary. There have been similar ideas outside the RL domains. For instance, Gu et al. (2016) and Satija & Pineau (2016) explore Real Time Neural Machine Translation where the action at every time step is to decide whether to output a new token in the target language or not based on current context.
25
+
26
+ Transition Point Dynamic Programming (TPDP) [Buckland & Lawrence (1994)] algorithm is a modification to the tabular dynamic programming paradigm that can reduce the learning time and memory required for control of continuous stochastic dynamic systems. This is done by determining a set of transition points in the underlying MDP. The policy changes only at these transition point states. The algorithm learns an optimal set of transition point states by using a variant of Q-Learning to evaluate whether or not to add/delete a particular state from the set of transition points. FiGAR learns the transition points in the underlying MDP on the fly with generalization across the state space unlike TPDP which is tabular and infeasible for large problems.
27
+
28
+ The Dynamic Frameskip Deep Q-network [Lakshminarayanan et al. (2017)] proposes to use multiple time scales of action repetition by augmenting the Deep Q Network (DQN) [Mnih et al. (2015)] with separate streams of the same primitive actions corresponding to each time scale. This way, the time scale of action repetition is dynamically learned. Although this framework leads to a significant improvement in the performance on a few Atari 2600 games, it suffers from not being able to support multiple time scales due to potential explosion of the action space and is restricted to discrete action spaces. Durugkar et al. (2016) also explore learning macro-actions composed using the same action repeated for different time scales. However, their framework is limited to discrete action spaces and performance improvements are not significant.
29
+
30
+ Learning temporally extended actions and abstractions have been of interest in RL for a long time. Vezhnevets et al. (2016) propose Strategic Attentive Writer (STRAW) for learning macro-actions and building dynamic action-plans directly from reinforcement learning signals. Instead of outputting a single action after each observation, STRAW maintains a multi-step action plan. The agent periodically updates the plan based on observations and commits to the plan between the replanning steps. Although the STRAW framework represents a more general temporal abstraction than FiGAR, FiGAR should be seen as a framework that can compliment STRAW whereby the decision to repeat could now be hierarchical at plan and base action levels.
31
+
32
+ FiGAR is a framework that has a structured policy representation where the time scale of execution could be thought as parameterizing the chosen action. The only other work that explores parameterized policies in DRL is Hausknecht & Stone (2016) where discrete actions are parameterized by continuous values. In our case, discrete/continuous actions are parameterized by discrete values. The state spaces in Atari are also more sophisticated than the kind explored in Hausknecht et al. (2016).
33
+
34
+ FiGAR is also very naturally connected to the Semi-MDPs (SMDPs) framework. SMDPs are MDPs with durative actions. The assumption in SMDPs is that actions take some holding time to complete [Duff (1995); Mahadevan et al. (1997); Dietterich (2000)]. Typically, they are modeled with two distributions, one corresponding to the next state transition and the other corresponding to the holding time which denotes the number of time steps between the current action from the policy until the next action from the policy. The rewards over the entire holding time of an action is the credit assigned for picking the action. In our framework, we naturally have durative actions due to the policy structure where the decision consists of both the choice of the action and the time scale of its execution. Therefore, we convert the original MDP to an SMDP trivially. In fact, we give more structure to the SMDP because we are clear that we repeat the chosen action during the holding time, while what happens during the holding time is not specified in the SMDP framework. One can think of the part of the policy that outputs the probability distribution over the time scales as a holding time distribution. Therefore, our framework naturally fits into the SMDP definition with the action repetition rate characterizing the holding time. We also sum up the rewards over the holding time with an an appropriate discounting factor as in an SMDP framework.
35
+
36
+ # 3 BACKGROUND
37
+
38
+ # 3.1 ASYNCHRONOUS ADVANTAGE ACTOR CRITIC
39
+
40
+ Actor critic algorithms execute policy gradient updates by maintaining parametric estimates for the policy $\pi _ { \theta _ { a } } ( a | s )$ and the value function $V _ { \theta _ { c } } ( s )$ [Sutton & Barto (1998)]. The value function estimates are used to reduce the variance in the policy gradient updates.
41
+
42
+ Asynchronous Advantage Actor Critic (A3C) [Mnih et al. (2016)] learns policies based on an asynchronous $n$ -step returns. The $k$ learner threads execute $k$ copies of the policy asynchronously and the parameter updates are sent to a central parameter server at regular intervals. This ensures that temporal correlations are broken between subsequent updates since the different threads possibly explore different parts of the state space in parallel. The objective function for policy improvement in A3C is:
43
+
44
+ $$
45
+ L ( \theta _ { a } ) = \log \pi _ { \theta _ { a } } ( a _ { t } | s _ { t } ) \left( G _ { t } - V ( s _ { t } ) \right)
46
+ $$
47
+
48
+ where $G _ { t }$ is an estimate for the return at time step $t$ . The A3C algorithm uses $n$ -step returns for estimating $G _ { t }$ which is a biased estimate for $Q ( s _ { t } , a _ { t } )$ . Hence one can think of $G _ { t } - V ( s _ { t } )$ as an estimate for $A ( s _ { t } , a _ { t } )$ which represents the advantage of taking action $a _ { t }$ in state $s _ { t }$ . The value function $V _ { \theta _ { c } } ( s _ { t } )$ is updated by using $n$ -step TD error as: $L ( \theta _ { c } ) = \Big ( \hat { V } ( s _ { t } ) - V _ { \theta _ { c } } ( s _ { t } ) \Big ) ^ { 2 }$ where $\hat { V } ( s _ { t } )$ is an estimate of the $n$ -step return from the current state. In A3C $j$ -step returns are used where $j \leq n$ and $n$ is a fixed hyper-parameter. For simplicity assume that $t \leq n$ . Then the definition for $\hat { V } ( s _ { t } )$ is:
49
+
50
+ $$
51
+ \hat { V } ( s _ { t } ) = \sum _ { j = t } ^ { n - 1 } \gamma ^ { t - j } r _ { j } + \gamma ^ { n - t } V ( s _ { n } )
52
+ $$
53
+
54
+ The policy and value functions are parameterized by Deep Neural Networks.
55
+
56
+ # 3.2 TRUST REGION POLICY OPTIMIZATION
57
+
58
+ TRPO [Schulman et al. (2015)] is a policy optimization algorithm. Constrained optimization of a surrogate loss function is proposed, with theoretical guarantees for monotonic policy improvement. The TRPO surrogate loss function $L$ for potential next policies $( \tilde { \pi } )$ is:
59
+
60
+ $$
61
+ L _ { \theta _ { o l d } } ( \widetilde \theta ) = \eta ( \pi ) + \sum _ { s } \rho ^ { \pi } ( s ) \sum _ { a } \widetilde \pi ( a | s ) { \cal A } _ { \pi } ( s , a )
62
+ $$
63
+
64
+ where $\theta _ { o l d }$ are the parameters of policy $\pi$ and $\tilde { \theta }$ are parameters of $\tilde { \pi }$ . This surrogate loss function is optimized subject to the constraint:
65
+
66
+ $$
67
+ D _ { K L } ^ { \mathrm { m a x } } ( \pi , \tilde { \pi } ) \leq \delta
68
+ $$
69
+
70
+ which ensures that the policy improvement can be done in non-trivial step sizes and at the same time the new policy does not deviate much from the current policy due to the KL-divergence constraint.
71
+
72
+ # 3.3 DEEP DETERMINISTIC POLICY GRADIENTS
73
+
74
+ According to the Deterministic Policy Gradient (DPG) Theorem [Lever (2014)], the gradient of the performance objective $( J )$ of the deterministic policy $( \mu )$ in continuous action spaces with respect to the policy parameters $\mathbf { \eta } ^ { ( \theta ) }$ is given by:
75
+
76
+ $$
77
+ \begin{array} { c } { { \nabla _ { \theta } J ( \mu _ { \theta } ) = \displaystyle \int _ { \mathbb { S } } \rho ^ { \mu } ( s ) \nabla _ { \theta } \mu _ { \theta } ( s ) \nabla _ { a } Q ^ { \mu } ( s , a ) | _ { a = \mu _ { \theta } ( s ) } d s } } \\ { { = \mathbb { E } _ { s \sim \rho ^ { \mu } } [ \nabla _ { \theta } \mu _ { \theta } ( s ) \nabla _ { a } Q ^ { \mu } ( s , a ) | _ { a = \mu _ { \theta } ( s ) } ] } } \end{array}
78
+ $$
79
+
80
+ for an appropriately defined performance objective $J$ . The DPG model built according to this theorem consists of an actor which outputs an action vector in the continuous action space and a critic model $Q ( s , a )$ which evaluates the action chosen at a state. The DDPG algorithm [Lillicrap et al. (2015)] extends the DPG algorithm by introducing non-linear neural network based function approximators for the actor and critic.
81
+
82
+ # 4 FIGAR: FINE GRAINED ACTION REPETITION
83
+
84
+ FiGAR provides a DRL algorithm with the ability to model temporal abstractions by augmenting it with the ability to predict the number of time steps for which an action chosen for execution is to be repeated. This prediction is conditioned on the current state in the environment.
85
+
86
+ The FiGAR framework can be used to extend any DRL algorithm (say $Z$ ) which maintains an explicit policy. Let $Z ^ { \prime }$ denote the extension of $Z$ under FiGAR. $Z ^ { \prime }$ has two independent decoupled
87
+
88
+ # Algorithm 1 Create $F i G A R - Z$
89
+
90
+ <table><tr><td colspan="2">1: function MAKEFIGAR(DRLAlgorithm Z,ActionRepetitionSet W)</td></tr><tr><td>2:</td><td>St ← state at time t</td></tr><tr><td>3:</td><td>αt ←action taken in St at time t</td></tr><tr><td>4:</td><td>Ta ← action policy of Z</td></tr><tr><td>5:</td><td>fq(st) ← action network for realizing action policy Ta</td></tr><tr><td>6:</td><td>L(πa,St,at) ← A&#x27;s objective function for improving πa</td></tr><tr><td>7:</td><td>Tx ← construct action repetition policy for FiGAR-Z.</td></tr><tr><td>8:</td><td>fe(st) ← repetition network with output of size |W| for action repetition policy Tx.</td></tr><tr><td>9:</td><td>L(πx,St,at) ←L evaluated at πx</td></tr><tr><td>10:</td><td>T(st,at)←L(π𝑥,St,at) *L(πa,St,at)//TotalLoss</td></tr><tr><td>11:</td><td>return T, fe, fθx</td></tr></table>
91
+
92
+ policy components. The policy $\pi _ { \theta _ { a } }$ for choosing actions and the policy $\pi _ { \theta _ { x } }$ for choosing action repetitions. Algorithm 1 describes the generic framework for deriving DRL algorithm $Z ^ { \prime }$ from algorithm $Z$ . Let $W$ stand for the set of all action repetitions that $Z ^ { \prime }$ would be able to perform. In tradition DRL algorithms, $W = \{ c \}$ , where $c$ is a constant. This implies that the action repetition is static and fixed. In FiGAR, The set of action repetitions from which $Z ^ { \prime }$ can choose is $W =$ $\{ w _ { 1 } , w _ { 2 } , \cdot \cdot \cdot , w _ { | W | } \}$ . The central idea behind FiGAR is that the objective function used to update the parameters $\dot { \theta } _ { a }$ of $\pi _ { \theta _ { a } }$ maintained by $Z$ will be used to update the parameters $\theta _ { x }$ of the action repetition policy $\pi _ { \theta _ { x } }$ of $\sum ^ { \prime }$ as well (illustrated by the sharing of $L$ in Algorithm 1). In the first subsection, we desribe how $Z ^ { \prime }$ operates. In the next two sub-sections, we describe the instantiations of FiGAR extensions for 3 policy gradient DRL algorithms: A3C, TRPO and DDPG.
93
+
94
+ # 4.1 HOW FIGAR OPERATES
95
+
96
+ The following procedure describes how FiGAR variant $Z ^ { \prime }$ navigates the MDP that it is solving:
97
+
98
+ 1. In the very first state $s _ { 0 }$ seen by $Z ^ { \prime }$ , it predicts a tuple $( a _ { 0 } , x _ { 0 } )$ of action to execute and number of time steps for which to execute it. $a _ { 0 }$ is decided based on $\pi _ { \boldsymbol { \theta } _ { a } } ( s _ { 0 } )$ whereas $x _ { 0 }$ is decided based on $\pi _ { \theta _ { x } } ( s _ { 0 } )$ . Each such tuple is known as an action decision.
99
+
100
+ 2. We denote by $s _ { j }$ the state of the agent after $j$ such action decisions have been made. Similarly $x _ { j }$ and $a _ { j }$ denote the action repetition and the action chosen after $j$ such action decisions. Note that $x _ { j } \in \{ w _ { 1 } , w _ { 2 } , \cdot \cdot \cdot , w _ { | W | } \}$ , the set of all allowed action repetitions.
101
+
102
+ 3. From time step 0 until $x _ { 0 }$ , $Z ^ { \prime }$ executes $a _ { 0 }$
103
+
104
+ 4. At time step $x _ { 0 }$ , $Z ^ { \prime }$ again decides, based on current state $s _ { 1 }$ and policy components $( \pi _ { \theta _ { a } } ( s _ { 1 } ) , \pi _ { \theta _ { x } } ( s _ { 1 } ) )$ , the tuple of action to execute and the number of times for which to execute it, $( a _ { 1 } , x _ { 1 } )$ .
105
+
106
+ 5. It can seen that in general if $Z ^ { \prime }$ executes action $a _ { k }$ for $x _ { k }$ successive time steps, the next action is decided at time step $t = \sum _ { i = 0 } ^ { k } x _ { i }$ on the basis of $( \pi _ { \boldsymbol { \theta } _ { a } } ( s _ { k + 1 } ) , \pi _ { \boldsymbol { \theta } _ { x } } ( s _ { k + 1 } ) )$ , where $s _ { k + 1 }$ is the state seen at time step $t$ .
107
+
108
+ # 4.2 FIGAR-A3C
109
+
110
+ A3C uses $f _ { \theta _ { a } } ( s _ { j } )$ and $f _ { \theta _ { c } } ( s _ { j } )$ which represent the policy $\pi ( a | s _ { j } )$ and the value function $V ( s _ { j } )$ respectively. $\pi ( a | s _ { j } )$ is a vector of size equal to the action space of the underlying MDP while $V ( \bar { s } _ { j } )$ is a scalar. FiGAR extends the A3C algorithm as follows:
111
+
112
+ 1. With $s _ { j }$ defined as in the previous sub-section, in addition to $f _ { \theta _ { a } } ( s _ { j } )$ and $f _ { \theta _ { c } } ( s _ { j } )$ , FiGARA3C defines a neural network $f _ { \theta _ { x } } ( s _ { j } )$ . This neural network outputs a $| W |$ -dimensional vector representing the probability distribution over the elements of the set $W$ . The sampled time scale from this multinomial distribution decides how long the action decided with $f _ { \theta _ { a } } ( s _ { j } )$ is repeated. The actor is now composed of both $f _ { \theta _ { a } } ( s _ { j } )$ (action network) and $f _ { \theta _ { x } } ( s _ { j } )$ (repetition network).
113
+
114
+ 2. The objective function for the actor is modified to be:
115
+
116
+ $$
117
+ L ( \theta _ { a } , \theta _ { x } ) = \left( \log f _ { \theta _ { a } } ( a | s _ { j } ) + \log f _ { \theta _ { x } } ( x | s _ { j } ) \right) A ( s _ { j } , a , x )
118
+ $$
119
+
120
+ where $A ( s _ { j } , a , x )$ represents the advantage of executing action $a$ for $x$ time steps at state $s _ { j }$ . This implies that for FiGAR-A3C the combination operator $^ *$ defined in Algorithm 1 is in fact scalar addition.
121
+
122
+ 3. The objective function for the critic is the same except that estimated value function used in the target for the critic is changed as:
123
+
124
+ $$
125
+ \hat { V } ( s _ { j } ) = \sum _ { k = j } ^ { n - 1 } \gamma ^ { y _ { k - j } } r _ { k } + \gamma ^ { y _ { n - j } } V ( s _ { n } )
126
+ $$
127
+
128
+ where we define $y _ { 0 } = 0 , y _ { k } = y _ { k - 1 } + x _ { k } , k \ge 1$ and action $a _ { k }$ was repeated $x _ { k }$ times when state $s _ { k }$ was encountered. Note that the return used in target is based on $n$ decision steps, steps at which a potential change in actions executed takes place. It is not based on $n$ time steps.
129
+
130
+ Note that point 2 above implies that the action space has been extended by $| W |$ and has a dimension of $| A | + | W |$ . It is only because of this factored representation of the FiGAR policy that the number of parameters do not blow up. If one were to extend the action space in a naive way by coupling the actions and the action repetitions, one would end up suffering the kind of action-space blowup as seen in [Lakshminarayanan et al. (2017); Vezhnevets et al. (2016)] wherein for being able to control with respect to $| W |$ different action repetition levels (or $| W |$ -length policy plans in the case of STRAW) , one would need to model $| A | \times | W |$ actions or action-values which would blow up the final layer size $| W |$ times.
131
+
132
+ # 4.3 FIGAR-TRPO
133
+
134
+ Although $f _ { \theta _ { a } } ( s _ { j } )$ in A3C is generic enough to output continuous or discrete actions, we consider A3C only for discrete action spaces. Preserving the notation from the previous subsection, we describe FiGAR-TRPO where we consider the case of the output generated by the network $f _ { \theta _ { a } } ( s _ { j } )$ to be $A$ dimensional with each dimension being independent and describing a continuous valued action. The stochastic policy is hence modeled as a multi-variate Gaussian with diagonal co-variance matrix. The parameters of the mean as well as the co-variance matrix are together represented by $\theta _ { a }$ and the concatenated mean-covariance vector is represented by the function $f _ { \theta _ { a } } ( s _ { j } )$ . FiGAR-TRPO is constructed as follows:
135
+
136
+ 1. In TRPO,the objective function $L _ { \theta _ { o l d } } ( { \tilde { \theta } } )$ is constructed based on trajectories drawn according to the current policy. Hence, for FiGAR-TRPO the objective function is modified to be:
137
+
138
+ $$
139
+ L _ { \theta _ { a , o l d } , \theta _ { x , o l d } } ( \tilde { \theta _ { a } } ) \times \left( L _ { \theta _ { a , o l d } , \theta _ { x , o l d } } ( \tilde { \theta _ { x } } ) \right) ^ { \beta _ { a r } }
140
+ $$
141
+
142
+ where $\theta _ { x }$ are the parameters of sub-network $f _ { \theta _ { x } }$ which computes the action repetition distribution. This implies that for FiGAR-TRPO the combination operator $^ *$ defined in Algorithm 1 is in some sense the scalar multiplication. $\beta _ { a r }$ controls the relative learning rate of the core-policy parameters and the action repetition parameters.
143
+
144
+ 2. The constraint in TRPO corresponding to the KL divergence between old and new policies is modified to be:
145
+
146
+ $$
147
+ D _ { K L } ^ { \operatorname* { m a x } } ( \pi _ { a } , \tilde { \pi _ { a } } ) + \beta _ { K L } D _ { K L } ^ { \operatorname* { m a x } } ( \pi _ { x } , \tilde { \pi _ { x } } ) \leq \delta
148
+ $$
149
+
150
+ where $\pi _ { a }$ denotes the Gaussian distribution for the action to be executed and $\pi _ { x }$ denotes the multinomial softmax-based action repetition probability distribution. $\beta _ { K L }$ controls the relative divergence of $\pi _ { x }$ and $\pi _ { a }$ from the new corresponding policies. See Appendix $C$ for an explanation of the loss function used.
151
+
152
+ # 4.4 FIGAR-DDPG
153
+
154
+ In this subsection, we present an extension of DDPG under the FiGAR framework. DDPG consists of $f _ { \theta _ { a } } ( s _ { j } )$ which denotes a deterministic policy $\mu ( s )$ and is a vector of size equal to the action space of the underlying MDP; and $f _ { \theta _ { c } } ( s _ { j } , a _ { j } )$ which denotes the critic network whose output is a single number, the estimated state-action value function $Q ( s _ { j } , a _ { j } )$ . FiGAR framework extends the DDPG algorithm as follows:
155
+
156
+ 1. $f _ { \theta _ { x } }$ is introduced, similar to FiGAR-A3C. This implies that the complete policy for FiGARDDPG $( \pi _ { \theta _ { a } } , \pi _ { \theta _ { x } } )$ is computed by the tuple of neural networks: $( f _ { \theta _ { a } } , f _ { \theta _ { x } } )$ . Similar to DDPG [Lillicrap et al. (2015)], FiGAR-DDPG has no loss function for the actor. The actor receives gradients from the critic. This is because the actors proposed policy is directly fed to the critic and the critic provides the actor with gradients which the proposed policy follows for improvement. In FiGAR-DDPG the total policy $\pi$ is a concatenation of vectors $\pi _ { a }$ and $\pi _ { x }$ . Hence the gradients for the total policy are also simply the concatenation of the gradients for the policies $\pi _ { a }$ and $\pi _ { x }$ .
157
+
158
+ 2. To ensure sufficient exploration, the exploration policy for action repetition is an $\epsilon$ -greedy version of the behavioral action repetition policy. The action part of the policy, $( f _ { \theta _ { a } } ( s _ { j } ) )$ , continues to use temporally correlated noise for exploration, generated by an Ornstein-Uhlenbeck process (see Lillicrap et al. (2015) for details).
159
+
160
+ 3. The critic is modeled by the equation
161
+
162
+ $$
163
+ f ( s _ { j } , a _ { j } , x _ { j } ) = f _ { \theta _ { c } } ( s _ { j } , f _ { \theta _ { a } } ( s _ { j } ) , f _ { \theta _ { x } } ( s _ { j } ) )
164
+ $$
165
+
166
+ As stated above, $f _ { \theta _ { x } }$ is learnt by back-propagating the gradients produced by the critic with respect to $f _ { \theta _ { x } }$ , in exactly the same way that $f _ { \theta _ { a } }$ is learnt.
167
+
168
+ # 5 EXPERIMENTAL SETUP AND RESULTS
169
+
170
+ The experiments are designed to understand the answers to the following questions:
171
+
172
+ 1. For different DRL algorithms, can FiGAR extensions learn to use the dynamic action repetition?
173
+ 2. How does FiGAR impact the performance of the different algorithms on various tasks?
174
+ 3. Is FiGAR able to learn control on several different kinds of Action Repetition sets W ?
175
+
176
+ ![](images/98e2c7008dc5383cdc7d01e52064ff6edb3ed4501fca98488e61be948be4aad6.jpg)
177
+ Figure 2: Percentage Improvement of FiGAR-A3C over A3C for Atari 2600
178
+
179
+ In the next three sub-sections, we experiment with the simplest possible action repetition set $W = \{ 1 , 2 , \cdots , | W | \}$ . In the fourth sub-section, we understand the effects that changing the action repetition set $W$ has on the policies learnt.
180
+
181
+ # 5.1 FIGAR-A3C ON ATARI 2600
182
+
183
+ This set of experiments was performed with FiGAR-A3C on the Atari 2600 domain. The hyperparameters were tuned on a subset of games (Beamrider, Breakout, Pong, Seaquest and Space Invaders) and kept constant across all games.
184
+
185
+ $W$ is perhaps the most important hyper-parameter and depicts our confidence in the ability of a DRL agent to predict the future. Such a choice has to depend on the domain in which the DRL agent is operating. We only wanted to demonstrate the ability of FiGAR to learn temporal abstractions and hence instead of tuning for an optimal $| W |$ , it was chosen to be 30, arbitrarily. The specific set of time scales we choose is $1 , 2 , 3 , \cdots , 3 0$ . FiGAR-A3C as well as A3C were trained for 100 million decision steps. They were evaluated in terms of the final policy learnt. Treating the score obtained by the A3C algorithm as baseline (b), we calculated the percentage improvement (i) offered by FiGARA3C (f) as: $\begin{array} { r } { i \ = \ \frac { f - b } { b } } \end{array}$ . Figure 2 plots this metric versus the game names. The improvement for Enduro and Atlantis is staggering and more than $9 0 0 \times$ and $3 5 \times$ respectively. Figure 2’s y-axis has been clipped at $1 0 0 0 \%$ to make it more presentable. Appendix $A$ contains the experimental details, the raw scores obtained by both the methods. Appendix $B$ contains experiments on validating our setup.
186
+
187
+ ![](images/abdda7cec5230d66a60557933777110c3f0290b23e2538eb9ecf25514493a614.jpg)
188
+ Distribution of Action Repetition for Various Games
189
+ Figure 3: Evaluation of Action Repetition Control for Atari 2600. See Appendix $B$ (Table 7) for an expanded version of figure.
190
+
191
+ To answer the first question we posed, experiments were conducted to record the percentage of times that a particular action repetition was chosen. Figure 3 presents the action repetition distribution across a selection of games, chosen arbitrarily. The values have been rounded to 2 decimal places and hence do not sum to 1 in each game. Each game was played for 10 episodes using the same policy used to calculate average scores in Figure 2.
192
+
193
+ The two tables together show that FiGAR-A3C generally prefers lower action repetition but does come up with temporal abstractions in policy space (specially in games like Pong and Crazy Climber). Some such abstractions have been demonstrated in Figure 1. Such temporal abstractions do not always help general gameplay (Demon Attack). However, as can be seen from Figure 2, FiGAR-A3C outperforms A3C in 26 out of 33 games.
194
+
195
+ One could potentially think of FiGAR as a deep exploration framework by using the learnt policy $\pi _ { \theta _ { a } }$ for predicting actions at every time step and completely discarding the action-repetition policy $\pi _ { \theta _ { x } }$ , at evaluation time. Appendix $F$ contains an empirical argument against such a usage of FiGAR and demonstrates that the temporal abstractions encoded by $\pi _ { \theta _ { x } }$ are indeed important for game play performance.
196
+
197
+ # 5.2 FIGAR-TRPO ON MUJOCO TASKS
198
+
199
+ In this sub-section we demonstrate that FiGAR-TRPO can learn to solve the Mujoco simulated physics tasks reasonably successfully. Similar to FiGAR-A3C, $| W |$ is chosen to be 30 arbitrarily.
200
+
201
+ Table 1: Evaluation of FiGAR on Mujoco
202
+
203
+ <table><tr><td>Domain</td><td>FiGAR-TRPO</td><td>TRPO</td></tr><tr><td>Ant Hopper Inverted Pendulum Inverted Double Pendulum</td><td>947.06 (28.35) 3038.63 (1.00) 1000.00 (1.00) 8712.46 (1.01) 337.48 (10.51)</td><td>-161.93 (1.00) 3397.58 (1.00) 971.66 (1.00) 8327.75 (1.00) 364.55 (1.00)</td></tr></table>
204
+
205
+ The full policy $( f _ { \theta _ { a } } , f _ { \theta _ { x } } )$ is trained jointly. The policies learnt after each TRPO optimization step (details in Appendix $C$ ) are compared to current best known policy to arrive at the overall best policy. The results in this sub-section are for this best policy. Table 1 compares the performance of TRPO and FiGAR-TRPO. The number in the brackets is the average action repetition chosen. As can be seen from the table, FiGAR learns either policies which are much faster to execute albeit at cost of slight loss in optimality or it learns policies similar to non-repetition case, performance being competitive with the baseline algorithm. This best policy was then evaluated on 100 episodes to arrive at average scores which are contained in Table 1. TRPO is a difficult baseline on the MuJoCo tasks domain. On the whole, FiGAR outperforms TRPO in 3 out of 5 domains, although the gains are marginal in most tasks. Appendix $C$ contains experimental details. A video showing FiGAR-TRPO’s learned behavior policies can be found at http://youtu.be/JiaO2tBtH-k.
206
+
207
+ # 5.3 FIGAR-DDPG ON TORCS
208
+
209
+ FiGAR-DDPG was trained and tested on the TORCS domain. $| W |$ was chosen to be 15 arbitrarily. FIGAR-DDPG manages to complete the race task flawlessly and manages to finish 20 laps of the circuit, after which the simulator stops. The total reward obtained by FiGAR-DDPG was 557929.68 as against 59519.70 obtained by DDPG. We also observed that FiGAR-DDPG learnt policies which were smoother than those learnt by DDPG. A video showing the learned driving behavior of the FiGAR-DDPG agent can be found at https://youtu.be/dX8J-sF-WX4. See Appendix $D$ for experimental and architectural details.
210
+
211
+ # 5.4 EFFECT OF ACTION REPETITION SET ON FIGAR
212
+
213
+ This sub-section answers the third question raised at the beginning of this section in affirmative. We demonstrate that there is nothing sacrosanct about the set of action repetitions $W = \{ 1 , 2 , \cdots , 3 0 \}$ on which FiGAR-A3C performed well, and that the good performance carries over to other action repetition sets.
214
+
215
+ To demonstrate the generality of FiGAR with respect to $W$ , we chose a wide variety of action repetition sets $W$ , trained and evaluated FiGAR-A3C variants which learn to repeat with respect to their respective Action Repetition sets. Table 3 describes the various FiGAR-variants considered for these experiments in terms of their action repetition set $W$ .
216
+
217
+ Note that the hyper-parameters of the various variants of FiGAR-A3C were not tuned but rather the same ones obtained by tuning for FiGAR-30 were used. Table 2 contains a comparison of the raw scores obtained by the various FiGAR-A3C variants in comparison to the A3C baseline. It is clear that FiGAR is able to learn over any action repetition set $W$ and the performance does not fall by a lot even when hyper-parameters tuned for FiGAR-30 are used for other variants. Appendix $E$ contains additional graphs showing the evolution of average game scores against number of training steps as well as a bar graph visualization of Table 2.
218
+
219
+ Table 2: Comparison of FiGAR-A3C variants to the A3C baseline for 3 games: Sea Quest, Space Invaders and Asterix. See Appendix E (Figure 7) for a bar graph visualization of this table.
220
+
221
+ <table><tr><td>Variant</td><td>Seaquest</td><td>Space Invaders</td><td>Asterix</td></tr><tr><td>FiGAR-50 FiGAR-30-50 FiGAR-P FiGAR-30</td><td colspan="3">22904.50 1929.50 17103.60 1828.90 20005.40 2047.40</td></tr></table>
222
+
223
+ Table 3: Description of FiGAR-A3C variants in terms of action repetition set $W$ .
224
+
225
+ <table><tr><td>Name</td><td>Description in terms of W</td><td></td></tr><tr><td></td><td></td><td></td></tr><tr><td>FiGAR-20</td><td></td><td>W={1,2,.·,19,20}</td></tr><tr><td>FiGAR-30</td><td></td><td>W ={1,2,.. ,29,30}</td></tr><tr><td>FiGAR-50</td><td>W={1,2,.. ,49,50}</td><td></td></tr><tr><td>FiGAR-30-50</td><td></td><td>W ={30 numbers drawn randomly from W = {1, 2,.·,5O} w/o replacement}</td></tr><tr><td>FiGAR-20-30</td><td></td><td>W = {20 numbers drawn randomly from W = {1,2,.. ,30} w/o replacement}</td></tr><tr><td>FiGAR-P</td><td></td><td>W={𝑝丨p&lt;50,p ∈P (Set of all Primes)}</td></tr></table>
226
+
227
+ # 6 CONCLUSION, SHORTCOMINGS AND FUTURE WORK
228
+
229
+ We propose a light-weight framework (FiGAR) for improving current Deep Reinforcement Learning algorithms for policy optimization whereby temporal abstractions are learned in the policy space. The framework is generic and applicable to DRL algorithms concerned with policy gradients for continuous as well as discrete action spaces such as A3C, TRPO and DDPG. FiGAR maintains a structured policy wherein the action probability distribution is augmented with a probability distribution for choosing the time scale of repeating the chosen action. Our results demonstrate that FiGAR can be used to significantly improve the current policy gradient and Actor-Critic algorithms thereby learning better control policies across several domains by discovering optimal sequences of temporally elongated macro-actions.
230
+
231
+ Atari, TORCS and MuJoCo represent environments which are largely deterministic with a minimal degree of stochasticity in environment dynamics. In such highly deterministic environments we would expect FiGAR agents to build a latent model of the environment dynamics and hence be able to execute large action repetitions without dying. This is exactly what we see in a highly deterministic environment like the game Freeway. Figure 1 (a) demonstrates that the chicken is able to judge the speed of the approaching cars appropriately and cross the road in a manner which takes it to the goal without colliding with the cars and at the same time avoiding them narrowly.
232
+
233
+ Having said that, certainly the ability to stop an action repetition (or a macro-action) in general would be very important, especially in stochastic environments. In our setup, we do not consider the ability to stop executing a macro-action that the agent has committed to. However, this is a necessary skill in the event of unexpected changes in the environment while executing a chosen macro-action. Thus, stop and start actions for stopping and committing to macro-actions can be added to the basic dynamic time scale setup for more robust policies. We believe the modification could work for more general stochastic worlds like Minecraft and leave it for future work.
234
+
235
+ # ACKNOWLEDGMENTS
236
+
237
+ We used the open source implementation of A3C at https://github.com/miyosuda/ async_deep_reinforce. We thank Volodymr Mnih for giving valuable hyper-parameter information. We thank Aravind Rajeswaran (University of Washington) for very helpful discussions regarding and feedback on the MuJoCo domain tasks. The TRPO implementation was a modification of https://github.com/aravindr93/robustRL. The DDPG implementation was a modification of https://github.com/yanpanlau/DDPG-Keras-Torcs. We thank ILDS (http://web.iitm.ac.in/ilds/) for the compute resources we used for running A3C experiments.
238
+
239
+ # REFERENCES
240
+
241
+ Marc G. Bellemare, Yavar Naddaf, Joel Veness, and Michael Bowling. The arcade learning environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research, pp. 253–279, June 2013.
242
+
243
+ Kenneth M Buckland and Peter D Lawrence. Transition point dynamic programming. Advances in neural information processing systems, pp. 639–639, 1994.
244
+
245
+ Thomas G Dietterich. Hierarchical reinforcement learning with the maxq value function decomposition. 2000.
246
+
247
+ Steven J Duff. Reinforcement learning methods for continuous-time markov decision problems. 1995.
248
+
249
+ Ishan P Durugkar, Clemens Rosenbaum, Stefan Dernbach, and Sridhar Mahadevan. Deep reinforcement learning with macro-actions. arXiv preprint arXiv:1606.04615, 2016.
250
+
251
+ Jiatao Gu, Graham Neubig, Kyunghyun Cho, and Victor OK Li. Learning to translate in real-time with neural machine translation. arXiv preprint arXiv:1610.00388, 2016.
252
+
253
+ Matthew Hausknecht and Peter Stone. Deep reinforcement learning in parametrized action space. 4th International Conference on Learning Representations, 2016.
254
+
255
+ Matthew Hausknecht, Prannoy Mupparaju, Sandeep Subramanian, Shivaram Kalyanakrishnan, and Peter Stone. Half field offense: An environment for multiagent learning and ad hoc teamwork. In AAMAS Adaptive Learning Agents (ALA) Workshop, May 2016.
256
+
257
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1026–1034, 2015.
258
+
259
+ Aravind S. Lakshminarayanan, Sahil Sharma, and Balaraman Ravindran. Dynamic action repetition for deep reinforcement learning. AAAI, 2017.
260
+
261
+ Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015.
262
+
263
+ Guy Lever. Deterministic policy gradient algorithms. 2014.
264
+
265
+ Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015.
266
+
267
+ Sridhar Mahadevan, Nicholas Marchalleck, Tapas K Das, and Abhijit Gosavi. Self-improving factory simulation using continuous-time average-reward reinforcement learning. 1997.
268
+
269
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin Riedmiller, Andreas K. Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, February 2015.
270
+
271
+ Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy P Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International Conference on Machine Learning, 2016.
272
+
273
+ Harsh Satija and Joelle Pineau. Simultaneous machine translation using deep reinforcement learning. ICML 2016 Workshop on Abstraction in Reinforcement Learning, 2016.
274
+
275
+ Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. Prioritized experience replay. 4th International Conference on Learning Representations, 2015.
276
+
277
+ John Schulman, Sergey Levine, Philipp Moritz, Michael I Jordan, and Pieter Abbeel. Trust region policy optimization. CoRR, abs/1502.05477, 2015.
278
+
279
+ Richard S. Sutton and Andrew G. Barto. Introduction to reinforcement learning. MIT Press, 1998.
280
+
281
+ Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 5026–5033. IEEE, 2012.
282
+
283
+ Alexander Vezhnevets, Volodymyr Mnih, Simon Osindero, Alex Graves, Oriol Vinyals, John Agapiou, et al. Strategic attentive writer for learning macro-actions. In Advances in Neural Information Processing Systems, pp. 3486–3494, 2016.
284
+
285
+ Bernhard Wymann, E Espie, C Guionneau, C Dimitrakakis, R Coulom, and A Sumner. Torcs, the ´ open racing car simulator. Software available at http://torcs. sourceforge. net, 2000.
286
+
287
+ # APPENDIX A: EXPERIMENTAL DETAILS FOR FIGAR-A3C
288
+
289
+ EXPERIMENTAL DETAILS AND RESULTS
290
+
291
+ We used the LSTM-variant of A3C [Mnih et al. (2016)] algorithm for FiGAR-A3C experiments. The async-rmsprop algorithm [Mnih et al. (2016)] was used for updating parameters with the same hyper-parameters as in Mnih et al. (2016). The initial learning rate used was $1 0 ^ { - 3 }$ and it was linearly annealed to 0 over 100 million steps. The $n$ used in $n$ -step returns was 20. Entropy regularization was used to encourage exploration, similar to Mnih et al. (2016). The $\beta$ for entropy regularization was found to be 0.02 after hyper-parameter tuning, both for the action-policy $f _ { \theta _ { a } }$ and the action repetition policy $f _ { \theta _ { x } }$ .
292
+
293
+ Table 4: Game Playing Experiments on Atari 2600
294
+
295
+ <table><tr><td>Name</td><td>FiGAR-A3C</td><td>A3C</td></tr><tr><td></td><td></td><td></td></tr><tr><td>Alien</td><td>3138.50 (2864.91, 3412.08)</td><td>2709.20 (2499.41, 2918.98)</td></tr><tr><td>Amidar</td><td>1465.70 (1406.18, 1525.21)</td><td>1028.34 (1003.11, 1053.56)</td></tr><tr><td>Assault</td><td>1936.37 (1855.85, 2016.88)</td><td>1857.61 (1787.19, 1928.02)</td></tr><tr><td>Asterix</td><td>11949.00 (11095.62, 12802.37)</td><td>2364.00 (2188.12,2539.87)</td></tr><tr><td>Atlantis</td><td>6330600.00 (6330600.00, 6330600.00)</td><td>163660.00 (-46665.38, 373985.38)</td></tr><tr><td>Bank Heist</td><td>3364.60 (3342.10, 3387.09)</td><td>1731.40 (1727.94, 1734.85)</td></tr><tr><td>Beam Rider</td><td>2348.78 (2152.19,2545.36)</td><td>2189.96 (2062.89,2317.02)</td></tr><tr><td>Bowling</td><td>30.09 (29.74, 30.43)</td><td>16.88 (15.23, 18.52)</td></tr><tr><td>Breakout</td><td>814.50 (789.97, 839.02)</td><td>555.05 (474.89, 635.20)</td></tr><tr><td>Centipede</td><td>3340.35 (3071.70, 3608.99)</td><td>3293.33 (2973.14,3613.51)</td></tr><tr><td>Chopper command</td><td>3147.00 (2851.02,3442.97)</td><td>4969.00 (4513.12, 5424.87)</td></tr><tr><td>Crazy Climber</td><td>154177.00 (148042.35, 160311.64)</td><td>166875.00 (161560.18, 172189.81)</td></tr><tr><td>Demon Attack</td><td>7499.30 (7127.85, 7870.74)</td><td>26742.75 (22665.02, 30820.47)</td></tr><tr><td>Enduro</td><td>707.80 (599.16, 816.43)</td><td>0.77 (0.45, 1.09)</td></tr><tr><td>Freeway</td><td>33.14 (33.01, 33.26)</td><td>17.68 (17.41, 17.94)</td></tr><tr><td>Frostbite</td><td>309.60 (308.81, 310.38)</td><td>306.80 (304.67, 308.92)</td></tr><tr><td>Gopher</td><td>12845.40 (11641.88, 14048.91)</td><td>9360.60 (8683.72,10037.47)</td></tr><tr><td>James Bond</td><td>478.0 (448.78, 507.21)</td><td>285.5 (268.62, 302.37)</td></tr><tr><td>Kangaroo</td><td>48.00 (29.51, 66.48)</td><td>26.00 (12.81, 39.18)</td></tr><tr><td>Koolaid</td><td>1669.00 (1583.58, 1754.42)</td><td>1136.0 (1065.36,1206.64)</td></tr><tr><td>Krull</td><td>1316.10 (1223.23,1408.96)</td><td>1025.00 (970.77,1079.22)</td></tr><tr><td>Kung Fu Master</td><td>40284.00 ( 38207.21, 42360.78)</td><td>35717.00 (34288.21, 37145.78)</td></tr><tr><td>Name this game</td><td>1752.60 (1635.77,1869.42)</td><td>12100.80 (11682.64,12518.95)</td></tr><tr><td>Phoenix</td><td>5106.10 (5056.43, 5155.76)</td><td>5384.10 (5178.12, 5590.07)</td></tr><tr><td>Pong</td><td>20.32 (20.17, 20.46)</td><td></td></tr><tr><td>Q-bert</td><td>18922.50 (17302.94,20542.05)</td><td>19.46 (19.32, 19.59)</td></tr><tr><td>Road Runner</td><td>22907.00(22283.32,23530.67)</td><td>25840.25 (25528.49,26152.00)</td></tr><tr><td></td><td></td><td>59540.00 (58835.01, 60244.98)</td></tr><tr><td> Sea quest</td><td>18076.90 (16964.16, 19189.63)</td><td>2799.60 (2790.22,2808.97)</td></tr><tr><td>Space Invaders</td><td>2251.95 (2147.13, 2356.76)</td><td>1268.75 (1179.25, 1358.24)</td></tr><tr><td>Star Gunner</td><td>51269.00 (48629.42, 53908.57)</td><td>39835.00 (36365.24,43304.75)</td></tr><tr><td>Time Pilot Tutankhamun</td><td>11865.00 (11435.25, 12294.74)</td><td>8969.00 (8595.57, 9342.42)</td></tr><tr><td>WizardofWor</td><td>276.95 (274.22,279.67) 6688.00 (5783.48, 7592.51)</td><td>252.82(241.38, 264.25) 3230.00 (2355.75, 4104.24)</td></tr><tr><td></td><td></td><td></td></tr></table>
296
+
297
+ Since the Atari 2600 games tend to be quite complex, jointly learning a factored policy from random weight initializations proved to be less optimal as compared to a more stage-wise approach. The approach we followed for training FiGAR-A3C was to first train the networks using the regular A3C-objective function. This stage trains the action part of the policy $f _ { \theta _ { a } }$ and value function $f _ { \theta _ { c } }$ for a small number of iterations with a fixed action repetition rate (in this stage, gradients are not back-propagated for $f _ { \theta _ { x } }$ and all action repetition predictions made are discarded). The next stage was to then train the entire architecture $\bar { ( f _ { \theta _ { a } } , f _ { \theta _ { x } } , f _ { \theta _ { c } } ) }$ jointly. This kind of a non-stationary training objective ensures that we have a good value function estimator $f _ { \theta _ { c } }$ and a good action policy estimator $f _ { \theta _ { a } }$ before we start training the full policy $( f _ { \theta _ { a } } , f _ { \theta _ { x } } )$ jointly. Every time FiGAR decides to execute action $a _ { t }$ for $x _ { t }$ time steps, we say one step of action selection has been made. Since the number of time steps for which an action is repeated is variable, training time is measured in terms of action selections carried out. The first stage of the training was executed for 20 million (a hyper-parameter we found by doing grid search) action selections (called steps here onwards) and the next stage was executed for 80 million steps. In comparison the baseline ran for 100 million steps (action selections).
298
+
299
+ Since a large entropy regularization was required to explore both components $f _ { a }$ and $f _ { x , }$ ) of the policy-space, this also ends up meaning that the policies learnt are more diffused than one would like them to be. Evaluation was done after every 1 million steps and followed a strategy similar to $\epsilon$ -greedy. With $\epsilon = 0 . 1$ probability, the action and action repetition was drawn from the output distribution ( $f _ { \theta _ { a } }$ and $f _ { \theta _ { x } }$ respectively) and with probability $1 - \epsilon$ the action (and independently the action selection) with maximum probability was selected. This evaluation was done for 100 episodes or 100000 steps whichever was smaller, to arrive at an average score.
300
+
301
+ Table 4 contains the raw scores obtained by the final FiGAR-A3C and A3C policies on 33 Atari 2600 games. The numbers inside the brackets depict the confidence interval at a confidence threshold of 0.95, calculated by averaging scores over 100 episodes. Table 5 contains scores for a competing method, STRAW [Vezhnevets et al. (2016)], which learns temporal abstractions by maintaining action plans, for the subset of games on which both FiGAR and STRAW were trained and tested. Note that the scores obtained by STRAW agents are averages over top 5 performing replicas. We can infer from Tables 4 and 5 that FiGAR and STRAW and competitive with each other, with FiGAR clearly out-performing STRAW in Breakout and STRAW clearing outperforming FiGAR in Frostbite.
302
+
303
+ Table 5: Game Playing Experiments on Atari 2600 by STRAW [Vezhnevets et al. (2016)]
304
+
305
+ <table><tr><td>Name</td><td>STRAW</td><td>STRAW-e</td></tr><tr><td></td><td></td><td></td></tr><tr><td>Alien</td><td>2626</td><td>3230</td></tr><tr><td>Amidar</td><td>2223</td><td>2022</td></tr><tr><td>Breakout</td><td>344</td><td>386</td></tr><tr><td>Crazy Climber</td><td>143803</td><td>153327</td></tr><tr><td>Frostbite</td><td>4394</td><td>8108</td></tr><tr><td>Q-bert</td><td>20933</td><td>23892</td></tr></table>
306
+
307
+ Figure 4 demonstrates the evolution of the performance of FiGAR-A3C versus training progress. It also contains corresponding metrics for A3C to facilitate comparisons. In the 100 episode long evaluation phase we also keep track of the best episodic score. We also plot the best episode’s score versus time to get an idea of how bad the learnt policy is compared to the best it could have been.
308
+
309
+ # ARCHITECTURE DETAILS
310
+
311
+ We used the same low level architecture as Mnih et al. (2016) which in turn uses the same low level architecture as Mnih et al. (2015), except that the pre-LSTM hidden layer had size 256 instead of 512 as in Mnih et al. (2016). Similar to Mnih et al. (2016) the Actor and Critic share all but one layer. Hence all but the final layer of $f _ { \theta _ { a } } , f _ { \theta _ { x } }$ and $f _ { \theta _ { c } }$ are the same. Each of the 3 networks has a different final layer with $f _ { \theta _ { a } }$ and $f _ { \theta _ { x } }$ having a softmax-non linearity as output non-linearity, to model the multinomial distribution and the $f _ { \theta _ { c } }$ (critic)’s output being linear.
312
+
313
+ ![](images/c1bded2ba59d59c5b087fd5271954c1f2ca96a0966712adf234ebd6063c60c4d.jpg)
314
+ Figure 4: Training progress plotted versus time for Atari 2600
315
+
316
+ # APPENDIX B: ADDITIONAL EXPERIMENTS FOR ATARI 2600
317
+
318
+ These additional experiments are geared at understanding the repercussions of the evaluation strategy chosen by us.
319
+
320
+ # THE CHOICE OF WHETHER TO BE GREEDY OR STOCHASTIC
321
+
322
+ Note that in Appendix $A$ , we state that for evaluating the policy learnt by the agent, we simply chose to sample from the output probability distributions with probability 0.1 and chose the optimal action/action repetition with probability 0.9. This choice of 0.1 might seem rather arbitrary. Hence we conducted experiments to understand how well the agent performs as we shift more and more from choosing the maximal action(0.1-greedy policy) towards sampling from output distributions (stochastic policy).
323
+
324
+ Figure 5 demonstrates that the performance of FiGAR-A3C does not deteriorate significantly, in comparison to A3C, even if we always sample from policy distributions, for most of the games. In the cases that there is a significant deterioration, we believe it is due to the diffused nature of the policy distributions (action and action repetition) learnt. Hence, although our choice of evaluation scheme might seem arbitrary, it is in fact reasonable.
325
+
326
+ ![](images/ff8599220113bc9d44197ac87b4756d67c084ded95d338ee99e000cb3bb9cf86.jpg)
327
+ Figure 5: Average performance plotted against the probability with which we sample from final policy distribution for Atari 2600. Points toward the left side of a sub-graph depict average performance for a greedy version of a policy and those towards the right side depict performance for the stochastic version of the policy.
328
+
329
+ # PERFORMANCE VERSUS SPEED TRADEOFF
330
+
331
+ The previous discussion leads to a novel way to trade-off game-play performance versus speed. Figure 3 demonstrated that although FiGAR-A3C learns to use temporally elongated macro-actions, it does favor shorter actions for many games. Since the action repetition distribution $\pi _ { \theta _ { x } }$ is diffused (as will be shown by Table 6), sampling from the distribution should help FiGAR choose larger action repetition rates probably at the cost of optimality of game play.
332
+
333
+ Table 6 demonstrates that this is exactly what FiGAR does. It was generated by playing 10 episodes, or 100000 steps, whichever is lesser and recording the fraction of times each action repetition was chosen. The policy used in populating table 6 was the stochastic policy (described in previous subsection). Contrast Table 6 to Table 7 which is an expanded version of Figure 3.
334
+
335
+ Table 6: Distribution of Action Repetitions chosen when the policy (both $\pi _ { \theta _ { a } }$ and $\pi _ { \theta _ { x } }$ ) is completely stochastic
336
+
337
+ <table><tr><td rowspan=2 colspan=11>Name 1-3 4-6 7-9 10-12 13-15 16-18 19-21 22-24 25-27 28-30</td></tr><tr><td rowspan=2 colspan=1>Alien</td></tr><tr><td rowspan=1 colspan=1>0.33</td><td rowspan=1 colspan=1>0.15</td><td rowspan=1 colspan=1>0.13</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.13</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.014</td><td rowspan=1 colspan=1>0.01</td></tr><tr><td rowspan=1 colspan=1>Amidar</td><td rowspan=1 colspan=1>0.19</td><td rowspan=1 colspan=1>0.14</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.09</td><td rowspan=2 colspan=1>0.120.01</td></tr><tr><td rowspan=1 colspan=1>Assault</td><td rowspan=1 colspan=1>0.29</td><td rowspan=1 colspan=1>0.26</td><td rowspan=1 colspan=1>0.21</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td></tr><tr><td rowspan=1 colspan=1>Asterix</td><td rowspan=1 colspan=1>0.40</td><td rowspan=1 colspan=1>0.25</td><td rowspan=1 colspan=1>0.15</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td></tr><tr><td rowspan=1 colspan=1>Atlantis</td><td rowspan=1 colspan=1>0.25</td><td rowspan=1 colspan=1>0.16</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.08</td></tr><tr><td rowspan=1 colspan=1>Bank Heist</td><td rowspan=1 colspan=1>0.950</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=1 colspan=1>Beam Rider</td><td rowspan=1 colspan=1>0.17</td><td rowspan=1 colspan=1>0.16</td><td rowspan=1 colspan=1>0.14</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.09</td></tr><tr><td rowspan=1 colspan=1>Bowling</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=2 colspan=1>0.910.07</td></tr><tr><td rowspan=1 colspan=1>Breakout</td><td rowspan=1 colspan=1>0.28</td><td rowspan=1 colspan=1>0.20</td><td rowspan=1 colspan=1>0.13</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.04</td></tr><tr><td rowspan=1 colspan=1>Centipede</td><td rowspan=1 colspan=1>0.19</td><td rowspan=1 colspan=1>0.27</td><td rowspan=1 colspan=1>0.34</td><td rowspan=1 colspan=1>0.17</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=1 colspan=1>Chpr Cmd</td><td rowspan=1 colspan=1>0.12</td><td rowspan=1 colspan=1>0.14</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.12</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.06</td></tr><tr><td rowspan=1 colspan=1>Crzy Clmbr</td><td rowspan=1 colspan=1>0.34</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.51</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=2 colspan=1>0.010.02</td></tr><tr><td rowspan=1 colspan=1>Dmn Attk</td><td rowspan=1 colspan=1>0.18</td><td rowspan=1 colspan=1>0.21</td><td rowspan=1 colspan=1>0.16</td><td rowspan=1 colspan=1>0.13</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.03</td></tr><tr><td rowspan=1 colspan=1>Enduro</td><td rowspan=1 colspan=1>0.66</td><td rowspan=1 colspan=1>0.34</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=1 colspan=1>Pong</td><td rowspan=1 colspan=1>0.16</td><td rowspan=1 colspan=1>0.15</td><td rowspan=1 colspan=1>0.13</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.07</td></tr><tr><td rowspan=1 colspan=1>Freeway</td><td rowspan=1 colspan=1>0.14</td><td rowspan=1 colspan=1>0.12</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.12</td></tr><tr><td rowspan=1 colspan=1>Frostbite</td><td rowspan=1 colspan=1>0.33</td><td rowspan=1 colspan=1>0.16</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.14</td></tr><tr><td rowspan=1 colspan=1>Gopher</td><td rowspan=1 colspan=1>0.41</td><td rowspan=1 colspan=1>0.15</td><td rowspan=1 colspan=1>0.23</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.01</td><td rowspan=3 colspan=1>0.010.100.09</td></tr><tr><td rowspan=1 colspan=1>James Bond</td><td rowspan=1 colspan=1>0.12</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.09</td></tr><tr><td rowspan=1 colspan=1>Kangaroo</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.09</td></tr><tr><td rowspan=1 colspan=1>Koolaid</td><td rowspan=1 colspan=1>0.14</td><td rowspan=1 colspan=1>0.14</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.07</td></tr><tr><td rowspan=1 colspan=1>Krull</td><td rowspan=1 colspan=1>0.92</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=1 colspan=1>Kung Fu</td><td rowspan=1 colspan=1>0.32</td><td rowspan=1 colspan=1>0.15</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.04</td></tr><tr><td rowspan=1 colspan=1>NTG</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.12</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.09</td></tr><tr><td rowspan=1 colspan=1>Phoenix</td><td rowspan=1 colspan=1>0.32</td><td rowspan=1 colspan=1>0.15</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.05</td></tr><tr><td rowspan=1 colspan=1>Pong</td><td rowspan=1 colspan=1>0.15</td><td rowspan=1 colspan=1>0.15</td><td rowspan=1 colspan=1>0.14</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.07</td><td rowspan=2 colspan=1>0.080.14</td></tr><tr><td rowspan=1 colspan=1>Q-bert</td><td rowspan=1 colspan=1>0.40</td><td rowspan=1 colspan=1>0.30</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td></tr><tr><td rowspan=1 colspan=1>Road Runner</td><td rowspan=1 colspan=1>0.99</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=1 colspan=1>Sea Quest</td><td rowspan=1 colspan=1>0.40</td><td rowspan=1 colspan=1>0.26</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.02</td><td rowspan=2 colspan=1>0.010.09</td></tr><tr><td rowspan=1 colspan=1>Spc Invdr</td><td rowspan=1 colspan=1>0.33</td><td rowspan=1 colspan=1>0.16</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.06</td></tr><tr><td rowspan=1 colspan=1>Star Gunner</td><td rowspan=1 colspan=1>0.42</td><td rowspan=1 colspan=1>0.31</td><td rowspan=1 colspan=1>0.14</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=4 colspan=1>0.000.080.040.07</td></tr><tr><td rowspan=1 colspan=1>Time Pilot</td><td rowspan=1 colspan=1>0.14</td><td rowspan=1 colspan=1>0.16</td><td rowspan=1 colspan=1>0.15</td><td rowspan=1 colspan=1>0.12</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.06</td></tr><tr><td rowspan=2 colspan=1>TutankhamWzd of Wor</td><td rowspan=1 colspan=1>0.34</td><td rowspan=1 colspan=1>0.18</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.05</td></tr><tr><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.12</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.08</td></tr></table>
338
+
339
+ Both Figure 3 and Table 7 were created using the 0.1-greedy policy described in previous subsection. The reason that we compare the stochastic policy with the 0.1-greedy version instead of the fully-greedy version (wherein the optimal action and action repetition is always chosen) is that such a policy would end up being deterministic would not be good for evaluations.
340
+
341
+ It can hence be seen that FiGAR learns to trade-off optimality of game-play for speed by choosing whether to sample from policy probability distributions $( \pi _ { \theta _ { a } }$ and $\pi _ { \theta _ { x } }$ ) with probability 1 and thus behave stochastically, or behave 0.1-greedily, and sample from the distributions with only a small probability. Table 6 can be compared to Figure 3 to understand how stochasticity in final policy affects action repetition chosen. A clear trend can be seen in all games wherein the stochastic variant of final policy learns to use longer and longer actions, albeit at a small cost of some loss in the optimality of game-play (as shown by Figure 5).
342
+
343
+ An expanded version of Figure 3 is presented as Table 7 for comparison with Table 6. As explained in Appendix $A$ , the policy used for populating Table 7 is such that it picks a greedy action (or action repetition) with probability 0.9 and stochastically samples from output probability distributions with probability 0.1.
344
+
345
+ Table 7: Distribution of Action Repetitions chosen when the policy (both $\pi _ { \theta _ { a } }$ and $\pi _ { \theta _ { x } }$ ) is 0.1-greedy
346
+
347
+ <table><tr><td rowspan=2 colspan=11>Name 1-3 4-6 7-9 10-12 13-15 16-18 19-21 22-24 25-27 28-30</td></tr><tr><td rowspan=2 colspan=1>Alien</td></tr><tr><td rowspan=1 colspan=1>0.50</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.12</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td></tr><tr><td rowspan=1 colspan=1>Amidar</td><td rowspan=1 colspan=1>0.49</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.11</td></tr><tr><td rowspan=1 colspan=1>Assault</td><td rowspan=1 colspan=1>0.45</td><td rowspan=1 colspan=1>0.26</td><td rowspan=1 colspan=1>0.15</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td></tr><tr><td rowspan=1 colspan=1>Asterix</td><td rowspan=1 colspan=1>0.50</td><td rowspan=1 colspan=1>0.33</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=1 colspan=1>Atlantis</td><td rowspan=1 colspan=1>0.51</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.18</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.07</td></tr><tr><td rowspan=1 colspan=1>Bank Heist</td><td rowspan=1 colspan=1>0.96</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=1 colspan=1>Beam Rider</td><td rowspan=1 colspan=1>0.34</td><td rowspan=1 colspan=1>0.31</td><td rowspan=1 colspan=1>0.13</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.06</td></tr><tr><td rowspan=1 colspan=1>Bowling</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.91</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td></tr><tr><td rowspan=1 colspan=1>Breakout</td><td rowspan=1 colspan=1>0.29</td><td rowspan=1 colspan=1>0.23</td><td rowspan=1 colspan=1>0.12</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.11</td></tr><tr><td rowspan=1 colspan=1>Centipede</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.94</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=1 colspan=1>Chpr Cmd</td><td rowspan=1 colspan=1>0.29</td><td rowspan=1 colspan=1>0.23</td><td rowspan=1 colspan=1>0.12</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.03</td></tr><tr><td rowspan=1 colspan=1>Crzy Clmbr</td><td rowspan=1 colspan=1>0.55</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.38</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=1 colspan=1>Dmn Attk</td><td rowspan=1 colspan=1>0.16</td><td rowspan=1 colspan=1>0.35</td><td rowspan=1 colspan=1>0.14</td><td rowspan=1 colspan=1>0.12</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.02</td></tr><tr><td rowspan=1 colspan=1>Enduro</td><td rowspan=1 colspan=1>0.91</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=1 colspan=1>Freeway</td><td rowspan=1 colspan=1>0.15</td><td rowspan=1 colspan=1>0.18</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.18</td></tr><tr><td rowspan=1 colspan=1>Frostbite</td><td rowspan=1 colspan=1>0.47</td><td rowspan=1 colspan=1>0.20</td><td rowspan=1 colspan=1>0.13</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.11</td></tr><tr><td rowspan=1 colspan=1>Gopher</td><td rowspan=1 colspan=1>0.47</td><td rowspan=1 colspan=1>0.19</td><td rowspan=1 colspan=1>0.21</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=1 colspan=1>James Bond</td><td rowspan=1 colspan=1>0.28</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.22</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.06</td></tr><tr><td rowspan=1 colspan=1>Kangaroo</td><td rowspan=1 colspan=1>0.20</td><td rowspan=1 colspan=1>0.39</td><td rowspan=1 colspan=1>0.27</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.04</td></tr><tr><td rowspan=1 colspan=1>Koolaid</td><td rowspan=1 colspan=1>0.36</td><td rowspan=1 colspan=1>0.15</td><td rowspan=1 colspan=1>0.19</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.04</td></tr><tr><td rowspan=1 colspan=1>Krull</td><td rowspan=1 colspan=1>0.92</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=1 colspan=1>Kung Fu</td><td rowspan=1 colspan=1>0.46</td><td rowspan=1 colspan=1>0.10</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.05</td></tr><tr><td rowspan=1 colspan=1>NTG</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.91</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td></tr><tr><td rowspan=1 colspan=1>Phoenix</td><td rowspan=1 colspan=1>0.44</td><td rowspan=1 colspan=1>0.44</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.01</td></tr><tr><td rowspan=1 colspan=1>Pong</td><td rowspan=1 colspan=1>0.19</td><td rowspan=1 colspan=1>0.16</td><td rowspan=1 colspan=1>0.13</td><td rowspan=1 colspan=1>0.13</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.09</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.07</td><td rowspan=1 colspan=1>0.10</td></tr><tr><td rowspan=1 colspan=1>Q-bert</td><td rowspan=1 colspan=1>0.51</td><td rowspan=1 colspan=1>0.27</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.13</td></tr><tr><td rowspan=2 colspan=1>Road RunnerSea Quest</td><td rowspan=1 colspan=1>1.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=3 colspan=1>0.000.000.10</td></tr><tr><td rowspan=1 colspan=1>0.59</td><td rowspan=1 colspan=1>0.19</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.01</td></tr><tr><td rowspan=1 colspan=1>Spc Invdrs</td><td rowspan=1 colspan=1>0.42</td><td rowspan=1 colspan=1>0.18</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.03</td></tr><tr><td rowspan=1 colspan=1>Star Gunner</td><td rowspan=1 colspan=1>0.59</td><td rowspan=1 colspan=1>0.31</td><td rowspan=1 colspan=1>0.06</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=1 colspan=1>Time Pilot</td><td rowspan=1 colspan=1>0.580</td><td rowspan=1 colspan=1>0.14</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.05</td><td rowspan=1 colspan=1>0.03</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.04</td></tr><tr><td rowspan=2 colspan=1>TutankhamWzd of Wor</td><td rowspan=1 colspan=1>0.16</td><td rowspan=1 colspan=1>0.74</td><td rowspan=1 colspan=1>0.02</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td><td rowspan=1 colspan=1>0.01</td></tr><tr><td rowspan=1 colspan=1>0.28</td><td rowspan=1 colspan=1>0.12</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.19</td><td rowspan=1 colspan=1>0.11</td><td rowspan=1 colspan=1>0.08</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.04</td><td rowspan=1 colspan=1>0.02</td></tr></table>
348
+
349
+ Table 8 contains the average action repetition chosen in each of the games for the two FiGARvariants. The same episodes used to populate Table 6 and 7 were used to fill Table 8. It can be seen that in most games, the Stochastic variant of policy learns to play at a higher speed, although this might result in some loss in optimality of game play, as demonstrated in Figure 5.
350
+
351
+ Table 8: Average Action Repetition comparison between stochastic and greedy policies
352
+
353
+ <table><tr><td>Name</td><td>Stochastic</td><td>0.1-Greedy</td></tr><tr><td></td><td></td><td></td></tr><tr><td>Alien</td><td>8.43</td><td>6.87</td></tr><tr><td>Amidar</td><td>13.77</td><td>9.61</td></tr><tr><td>Assault</td><td>7.14</td><td>5.86</td></tr><tr><td>Asterix</td><td>6.53</td><td>4.22</td></tr><tr><td>Atlantis</td><td>11.68</td><td>7.20</td></tr><tr><td>Bank Heist</td><td>1.65</td><td>1.62</td></tr><tr><td>BeamRider</td><td>12.47</td><td>7.68</td></tr><tr><td>Bowling</td><td>28.64</td><td>5.13</td></tr><tr><td>Breakout</td><td>10.14</td><td>9.93</td></tr><tr><td>Centipede</td><td>6.84</td><td>7.88</td></tr><tr><td>Chopper Command</td><td>13.76</td><td>9.58</td></tr><tr><td>Crazy Climber</td><td>8.00</td><td>5.74</td></tr><tr><td>Enduro</td><td>2.91</td><td>2.69</td></tr><tr><td>Demon Attack</td><td>10.23</td><td>8.59</td></tr><tr><td>Freeway</td><td>14.62</td><td>14.25</td></tr><tr><td>Frostbite</td><td>11.33</td><td>7.69</td></tr><tr><td>Gopher</td><td>6.68</td><td>5.33</td></tr><tr><td>James Bond</td><td>14.98</td><td>10.37</td></tr><tr><td>Kangaroo</td><td>15.07</td><td>7.84</td></tr><tr><td>Koolaid</td><td>13.66</td><td>8.48</td></tr><tr><td>Krull</td><td>3.83</td><td>3.12</td></tr><tr><td>Kung Fu Master</td><td>10.00</td><td>8.53</td></tr><tr><td>Name this Game</td><td>14.98</td><td>9.55</td></tr><tr><td>Phoenix</td><td>10.31</td><td>4.64</td></tr><tr><td>Pong</td><td>12.99</td><td>12.28</td></tr><tr><td>Q-bert</td><td>2.02</td><td>1.76</td></tr><tr><td>Road Runner</td><td>1.63</td><td>1.26</td></tr><tr><td>Sea Quest</td><td>6.98</td><td>5.33</td></tr><tr><td>Space Invaders</td><td>10.48</td><td>8.55</td></tr><tr><td>Star Gunner</td><td>5.21</td><td>3.69</td></tr><tr><td>Time Pilot</td><td>12.72</td><td>5.39</td></tr><tr><td>Tutankhamun</td><td>9.75</td><td>5.73</td></tr><tr><td></td><td></td><td></td></tr><tr><td>WizardofWor</td><td>14.27</td><td>9.87</td></tr></table>
354
+
355
+ APPENDIX C: EXPERIMENTAL SETUP FOR FIGAR-TRPO
356
+
357
+ EXPERIMENTAL DETAILS
358
+
359
+ FiGAR-TRPO and the corresponding baseline algorithm operate on low dimensional feature vector observations. The TRPO (and hence FiGAR-TRPO) algorithm operates in two phases. In the first phase $( P 1 )$ , $K$ trajectories are sampled according to current behavioral policy $\pi$ to create the surrogate loss function. In the second phase $( P 2 )$ a policy improvement step is performed by carrying out an optimization step on the surrogate loss function, subject to the KL-divergence constraint on the new policy. In our experiments, 500 such policy improvement steps were performed. $K$ varies with the learning progress and the schedule on what value $K$ would take in next iteration of $P 1$ is defined linearly in terms of the return in the last iteration of $P 1$ . Hence if the return was large in previous iteration of $P 1$ , a small number of episodes are are used to construct the surrogate loss function in current iteration. The best policy was found by keeping track of the average returns seen during the training phase $P 1$ . This policy was then evaluated on 100 episodes to obtain the average score of the TRPO policy learnt. The most important hyper-parameters for FiGAR-TRPO are $\beta _ { a r }$ and $\beta _ { K L }$ . By using a grid search on the set $\{ 0 . \bar { 0 } 1 , 0 . 0 2 , \bar { 0 . } 0 4 , \bar { 0 } . 0 8 , 0 . 1 6 , 0 . 3 2 , 0 . 6 4 , 1 . 2 8 \}$ we found the optimal hyper-parameters $\beta _ { a r } = 1 . 2 8$ and $\beta _ { K L } = 0 . 6 4$ . These were tuned on all the 5 tasks.
360
+
361
+ # LOSS FUNCTION AND ARCHITECTURE
362
+
363
+ The tanh non-linearity is used throughout. The mean vector is realized using a 2-Hidden Layer neural network (mean network) with hidden layer sizes (128, 64). The standard deviation is realized using a Parameter layer (std-dev layer) which parameterizes the standard deviation but does not depend on the input. Hence the concatenation of the output of mean network and the std-dev layer forms the action policy $f _ { \theta _ { a } }$ as described in Section 4. The Action Repetition function $f _ { \theta _ { x } }$ is realized using a 2-Hidden Layer neural (act-rep network) network similar to the mean network albeit with smaller hidden layer sizes: (128, 64). However, its output non-linearity is a softmax layer of size 30 as dictated by the value of $W$ . The action repetition network was kept small to ensure that FiGAR-TRPO does not have significantly more parameters than TRPO. The mean network, std-dev layer and act-rep network do not share any parameters or layers (See appendix $G$ for experiments on FiGAR-TRPO with shared layers).
364
+
365
+ The surrogate loss function in TRPO when the Single Path method of construction is followed reduces to [Schulman et al. (2015)]:
366
+
367
+ $$
368
+ L _ { \theta _ { o l d } } ( \widetilde { \theta } ) = \mathbb { E } _ { s \sim \rho _ { o l d } ^ { \theta } , a \sim \pi _ { \theta _ { o l d } } } \left[ \frac { \pi _ { \widetilde { \theta } } ( a | s ) } { \pi _ { \theta _ { o l d } } ( a | s ) } Q _ { \theta _ { o l d } } ( s , a ) \right]
369
+ $$
370
+
371
+ where $q$ , the sampling distribution is just the old behavioral policy $\pi _ { \theta _ { o l d } }$ (defining characteristic of Single-Path method) and $\rho$ is the improper discounted state visitation distribution.
372
+
373
+ The surrogate loss function for a factored policy such as that of FiGAR-TRPO is:
374
+
375
+ $$
376
+ L _ { \theta _ { a , o l d } , \theta _ { x , o l d } } ( \theta _ { a } , \theta _ { x } ) = \mathbb { E } _ { s , a , x } \left[ \frac { \pi _ { \theta _ { a } } ( a | s ) } { \pi _ { \theta _ { a , o l d } } ( a | s ) } \frac { \pi _ { \theta _ { x } } ( x | s ) } { \pi _ { \theta _ { x , o l d } } ( x | s ) } Q _ { \theta _ { a , o l d } , \theta _ { x , o l d } } ( s , a , x ) \right]
377
+ $$
378
+
379
+ where s ∼ ρθa,θold $\begin{array} { l } { s \sim \rho _ { o l d } ^ { \theta _ { a } , \theta _ { x } } , a \sim \pi _ { \theta _ { a , o l d } } , x \sim \pi _ { \theta _ { x , o l d } } } \\ { = f _ { \theta _ { x , o l d } } } \end{array}$ and $\pi _ { \theta _ { a } } = f _ { \theta _ { a } }$ , $\pi _ { \theta _ { a , o l d } } = f _ { \theta _ { a , o l d } }$ , $\pi _ { \theta _ { x } } = f _ { \theta _ { x } }$ and $\pi _ { \theta _ { x , o l d } } = f _ { \theta _ { x , o l d } }$
380
+
381
+ This kind of a splitting of probability distributions happens because the action-policy $f _ { \theta _ { a } }$ and the action-repetition policy $f _ { \theta _ { x } }$ are independent probability distributions. The theoretically sound way to realize FiGAR-TRPO is to minimize the loss $L _ { \theta _ { a , o l d } , \theta _ { x , o l d } } ( \theta _ { a } , \theta _ { x } )$ . However, we found that in practice, optimizing a relaxed version of the objective function, that is,
382
+
383
+ $$
384
+ L _ { \theta _ { a , o l d } , \theta _ { x , o l d } } ( \tilde { \theta _ { a } } ) \times L _ { \theta _ { a , o l d } , \theta _ { x , o l d } } ( \tilde { \theta _ { x } } ) ^ { \beta _ { a r } }
385
+ $$
386
+
387
+ works better. This leads to the FiGAR-TRPO objective defined in Section 4.3.
388
+
389
+ # APPENDIX D: EXPERIMENTAL DETAILS FOR FIGAR-DDPG
390
+
391
+ EXPERIMENTAL DETAILS
392
+
393
+ The DDPG algorithm also operates on the low-dimensional (29 dimensional) feature-vector observations. The domain consists of 3 continuous actions, acceleration, break and steering. The $W$ hyper-parameter used in main experiments was chosen to be 15 arbitrarily. Unlike Lillicrap et al. (2015), we did not find it useful to use batch normalization and hence it was not used. However, a replay memory was used of size 10000. Target networks were also used with soft updates being applied with $\tau = 0 . 0 0 1$ . Sine DDPG is an off-policy actor-critic method, we need to ensure that sufficient exploration takes place. Use of an Ornstein-Uhlenbeck process (refer to Lillicrap et al. (2015) for details) ensured that exporation was carried out in action-policy space. To ensure exploration in the action-repetition policy space, we adopted two strategies. First, an $\epsilon$ -greedy version of the policy was used during train time. The $\epsilon$ was annealed from 0.2 to 0 over 50000 training steps. The algorithm was run for 40000 training steps for baselines as well as FiGAR-DDPG. Second, with probability $1 - \epsilon$ , instead of picking the greedy action-repetition , we sampled from the output distribution $f _ { \theta _ { x } } ( s )$ .
394
+
395
+ # ARCHITECTURAL DETAILS
396
+
397
+ Through the architecture, the hidden layer non-linearity used was ReLU. All hidden layer weights were initialized using the He initialization [He et al. (2015)]
398
+
399
+ The actor network consisted of a 2-hidden layer neural network with hidden sizes (300, 600) (call the second hidden layer representation $h _ { 2 }$ . We learn two different output layers on top of this common hidden representation. $f _ { \theta _ { a } }$ was realized by transforming $h _ { 2 }$ with an output layer of size 3. The output neuron corresponding to the action steering used tanh non linearity where as those corresponding to acceleration and break used the sigmoid non-linearity. The $f _ { \theta _ { x } }$ network was realized by transforming $h _ { 2 }$ using a softmax output layer of size $| W |$ . The output of the Actor network is a $3 ^ { \cdot } + | W | = 1 8$ dimensional vector.
400
+
401
+ The critic network takes as input the state vector (29-dimensional) and the action vector (18- dimensional). The critic is a 3 hidden layer network of size (300, 600, 600). Similar to Lillicrap et al. (2015), actions were not included until the $2 ^ { n d }$ hidden layer of $f _ { \theta _ { c } }$ . The final output is linear and is trained using the TD-error objective function, similar to Lillicrap et al. (2015)
402
+
403
+ ![](images/3e633e89a790a1a797622acab83d16d932ad8155aac59bd01d40bec05143c5ad.jpg)
404
+ Figure 6: Comparison of FiGAR-A3C variants to the A3C baseline for 2 games: Sea Quest and Asterix
405
+
406
+ It is clear from Figure 6 that even though FiGAR A3C needs to explore in 2 separate action-spaces (those of primitive actions and the action repetitions), the training progress is not slowed down as a result of this exploration, for any FiGAR variant.
407
+
408
+ ![](images/234549fce021f4217cd74fa4a47ad76d130ec5cec7f93445128d25905857db87.jpg)
409
+ Figure 7: Comparison of FiGAR-A3C variants to the A3C baseline for 3 games: Sea Quest, Space Invaders and Asterix. Game scores have been scaled down by 1000 and rounded to 1 decimal place.
410
+
411
+ Table 2 contains final evaluation scores attained by various FiGAR variants. Figure 7 contains a bargraph visualization of the same table to demonstrate the advantage of all FiGAR variants relative to the baselines.
412
+
413
+ # APPENDIX F: IMPORTANCE OF $\pi _ { \theta _ { x } }$
414
+
415
+ One could potentially use FiGAR at evaluation stage (after training has been completed) at an actionrepetition rate of 1 by picking every action according to $\pi _ { \theta _ { a } }$ and completely discarding the learnt repetition policy $\pi _ { \theta _ { x } }$ . Such a FiGAR variant is denoted as FiGAR-wo- $\pi _ { \theta _ { x } }$ . We demonstrate that FiGAR-wo- $\pi _ { \theta _ { x } }$ is worse than FiGAR on most games and hence the temporal abstractions learnt by and encoded in $\pi _ { \theta _ { x } }$ are indeed non-trivial and important for gameplay performance. Table 9 contains the comparison between standard FiGAR agent and FiGAR-wo- $\pi _ { \theta _ { x } }$ . Evaluation scheme is the same as Appendix A.
416
+
417
+ Table 9: Gameplay performance of FiGAR compared with FiGAR-wo- $\pi _ { \theta _ { x } }$
418
+
419
+ <table><tr><td>Name</td><td>FiGAR</td><td>FiGAR-WO-T0x</td></tr><tr><td>Alien</td><td>3138.50</td><td>582.17</td></tr><tr><td>Amidar Assault</td><td>1465.70 1936.37</td><td>497.90 1551.40</td></tr><tr><td>Asterix</td><td>11949.00 6330600.00</td><td>780.00 680890.00</td></tr><tr><td>Atlantis</td><td>3364.60</td><td>223.00</td></tr><tr><td>Bank Heist</td><td></td><td></td></tr><tr><td>BeamRider</td><td>2348.78</td><td>3732.00</td></tr><tr><td>Bowling</td><td>30.09</td><td>0.90</td></tr><tr><td>Breakout</td><td>814.50</td><td>321.90</td></tr><tr><td>Centipede</td><td>3340.35</td><td>3934.90</td></tr><tr><td>Chopper Command</td><td>3147.00</td><td>2730.00</td></tr><tr><td></td><td></td><td></td></tr><tr><td>Crazy Climber</td><td>154177.00</td><td>210.00</td></tr><tr><td>Enduro</td><td>707.80</td><td>941.10</td></tr><tr><td>Demon Attack</td><td>7499.30</td><td>6661.00</td></tr><tr><td>Freeway</td><td>33.14</td><td>30.60</td></tr><tr><td>Frostbite</td><td>309.60</td><td>308.00</td></tr><tr><td>Gopher</td><td>12845.40</td><td>10738.00</td></tr><tr><td>James Bond</td><td>478.0</td><td>320.00</td></tr><tr><td>Kangaroo</td><td>48.00</td><td>40.00</td></tr><tr><td>Koolaid</td><td>1669.00</td><td>2110.00</td></tr><tr><td>Krull</td><td>1316.10</td><td>2076.00</td></tr><tr><td>Kung Fu Master</td><td>40284.00</td><td>29770.00</td></tr><tr><td>Name this Game</td><td>1752.60</td><td>1692.00</td></tr><tr><td>Phoenix</td><td>5106.10</td><td>5266.00</td></tr><tr><td>Pong</td><td>20.32</td><td>-21.00</td></tr><tr><td>Road Runner</td><td>22907.00</td><td>23560.00</td></tr><tr><td>Sea Quest</td><td>18076.90</td><td>18324.00</td></tr><tr><td></td><td>2251.95</td><td>1721.00</td></tr><tr><td>Space Invaders</td><td></td><td></td></tr><tr><td>Star Gunner</td><td>51269.00</td><td>55150.00</td></tr><tr><td>Time Pilot</td><td>11865.00</td><td>11810.00</td></tr><tr><td>Tutankhamun</td><td>276.95</td><td>182.20</td></tr><tr><td>Wizard of Wor</td><td>6688.00</td><td>6160.00</td></tr></table>
420
+
421
+ We observe that in 24 out of 33 games, $\pi _ { \theta _ { x } }$ helps the agent learn temporal abstractions which result in a significant boost in performance compared to the FiGAR-wo- $\pi _ { \theta _ { x } }$ agents.
422
+
423
+ # APPENDIX G: SHARED REPRESENTATION EXPERIMENTS FOR FIGAR-TRPO
424
+
425
+ Section 5.2 contains results of experiments on FiGAR-TRPO. Appendix $C$ contains the experimental setup for the same. Throughout these experiments on FiGAR-TRPO the policy components $f _ { \theta _ { a } }$ and $f _ { \theta _ { x } }$ do not share any representations. This appendix contains experimental results in the setting wherein ( $f _ { \theta _ { a } }$ and $f _ { \theta _ { x } }$ ) share all layers except the final one. This agent/network is denoted with the name FiGAR-shared-TRPO. All the hyper-parameters are the same as those in Appendix $C$ except $\beta _ { a r }$ and $\beta _ { K L }$ which were obtained through a grid-search similar to appendix $C$ . These were tuned on all the 5 tasks. The values for these hyper-parameters that we found to be optimal are $\beta _ { a r } = 1 . 2 8$ and $\beta _ { K L } = 0 . 1 6$ . The same training and evaluation regime as appendix $C$ was used. The performance of the best policy learnt is tabulated in Table 10
426
+
427
+ Table 10: Evaluation of FiGAR with shared representations for $f _ { \theta _ { a } }$ and $f _ { \theta _ { x } }$ on Mujoco
428
+
429
+ <table><tr><td>Domain</td><td>FiGAR-TRPO</td><td>FiGAR-shared-TRPO</td><td>TRPO</td></tr><tr><td>Ant</td><td colspan="3"></td></tr><tr><td>Hopper</td><td>947.06 (28.35) 3038.63 (1.00)</td><td>1779.72 (7.99) 2649.09 (2.07)</td><td>-161.93 (1.00) 3397.58 (1.00)</td></tr><tr><td>Inverted Pendulum Inverted Double Pendulum</td><td>1000.00 (1.00) 8712.46 (1.01)</td><td>986.35 (1.00) 9138.85 (1.00)</td><td>971.66 (1.00) 8327.75 (1.00) 364.55 (1.00)</td></tr></table>
430
+
431
+ FiGAR-shared-TRPO on the whole does not perform much better than FiGAR-TRPO. In these TRPO experiments, the neural networks we used were rather shallow at only two hidden layers deep. Hence, we believe that sharing of layers thus leads to only small gains in terms of optimality of policy learnt.
parse/train/B1GOWV5eg/B1GOWV5eg_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1GOWV5eg/B1GOWV5eg_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1GOWV5eg/B1GOWV5eg_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1xY-hRctX/B1xY-hRctX.md ADDED
@@ -0,0 +1,585 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NEURAL LOGIC MACHINES
2
+
3
+ Honghua Dong∗1, Jiayuan Mao∗1, Tian $\mathbf { L i n ^ { 2 } }$ , Chong Wang3, Lihong $\mathbf { L i } ^ { 2 }$ , and Denny Zhou2
4
+
5
+ 1 ITCS, IIIS, Tsinghua University {dhh14, mjy14}@mails.tsinghua.edu.cn
6
+ 2 Google Inc. {tianlin,lihong,dennyzhou}@google.com
7
+ 3 ByteDance Inc. chong.wang@bytedance.com
8
+
9
+ # ABSTRACT
10
+
11
+ We propose the Neural Logic Machine (NLM), a neural-symbolic architecture for both inductive learning and logic reasoning. NLMs exploit the power of both neural networks—as function approximators, and logic programming—as a symbolic processor for objects with properties, relations, logic connectives, and quantifiers. After being trained on small-scale tasks (such as sorting short arrays), NLMs can recover lifted rules, and generalize to large-scale tasks (such as sorting longer arrays). In our experiments, NLMs achieve perfect generalization in a number of tasks, from relational reasoning tasks on the family tree and general graphs, to decision making tasks including sorting arrays, finding shortest paths, and playing the blocks world. Most of these tasks are hard to accomplish for neural networks or inductive logic programming alone. 1
12
+
13
+ # 1 INTRODUCTION
14
+
15
+ Deep learning has achieved great success in various applications such as speech recognition (Hinton et al., 2012), image classification (Krizhevsky et al., 2012; He et al., 2016), machine translation (Sutskever et al., 2014; Bahdanau et al., 2015; Wu et al., 2016; Vaswani et al., 2017), and game playing (Mnih et al., 2015; Silver et al., 2017). Starting from Fodor & Pylyshyn (1988), however, there has been a debate over the problem of systematicity (such as understanding recursive systems) in connectionist models (Fodor & McLaughlin, 1990; Hadley, 1994; Jansen & Watter, 2012).
16
+
17
+ Logic systems can naturally process symbolic rules in language understanding and reasoning. Inductive logic programming (ILP) (Muggleton, 1991; 1996; Friedman et al., 1999) has been developed for learning logic rules from examples. Roughly speaking, given a collection of positive and negative examples, ILP systems learn a set of rules (with uncertainty) that entails all of the positive examples but none of the negative examples. Combining both symbols and probabilities, many problems arose from high-level cognitive abilities, such as systematicity, can be naturally resolved. However, due to an exponentially large searching space of the compositional rules, it is difficult for ILP to scale beyond small-sized rule sets (Dantsin et al., 2001; Lin et al., 2014; Evans & Grefenstette, 2018).
18
+
19
+ To make the discussion concrete, let us consider the classic blocks world problem (Nilsson, 1982; Gupta & Nau, 1992). As shown in Figure 1, we are given a set of blocks on the ground. We can move a block $x$ and place it on the top of another block $y$ or the ground, as long as $x$ is moveable and $y$ is placeable. We call this operation $\mathsf { M o v e } ( x , y )$ . A block is said to be moveable or placeable if there are no other blocks on it. The ground is always placeable, implying that we can place all blocks on the ground. Given an initial configuration of blocks world, our goal is to transform it into a target configuration by taking a sequence of Move operations.
20
+
21
+ Although the blocks world problem may appear simple at first glance, four major challenges exist in building a learning system to automatically accomplish this task:
22
+
23
+ 1. The learning system should recover a set of lifted rules (i.e., rules that apply to objects uniformly instead of being tied with specific ones) and generalize to blocks worlds which contain more blocks than those encountered during training. To get an intuition on this, we refer the readers who are not familiar with the blocks world domain to the task of learning to sort arrays (e.g.,
24
+
25
+ ![](images/af1493769eb70bdff5e8781c536ff989fc78469032938d7771af2ce465ca34da.jpg)
26
+ Figure 1: (Left) A graphical illustration of the blocks world. Given an initial and a target worlds, the agent is required to move blocks to transform the initial configuration to the target one. (Right) A set of sentences used throughout the paper to define the blocks world.
27
+
28
+ Vinyals et al., 2015), where recurrent neural networks fail to generalize to arrays which are even just slightly longer than those for training.
29
+ 2. The learning system should deal with high-order relational data and quantifiers, which goes beyond the scope of typical graph-structured neural networks (Kipf & Welling, 2017). For example, to apply the transitivity rule of a relation $r$ , i.e. $r ( a , c ) \gets \exists b \ r ( a , b ) \land r ( b , c )$ , we need to jointly inspect three objects $( a , b , c )$ .
30
+ 3. The learning system should scale up w.r.t. the complexity of the rules.2 Existing logic-driven approaches such as traditional ILP methods suffer an exponential computational complexity w.r.t. the number of logic rules to be learned (Dantsin et al., 2001; Lin et al., 2014; Evans & Grefenstette, 2018).
31
+ 4. The learning system should recover rules based on a minimal set of learning priors. In contrast, traditional ILP methods usually require hand-coded and task-specific rule templates to restrict the size of searching spaces (Evans & Grefenstette, 2018).
32
+
33
+ In this paper, we propose Neural Logic Machines (NLMs) to address the aforementioned challenges. In a nutshell, NLMs offer a neural-symbolic architecture which realizes Horn clauses (Horn, 1951) in first-order logic (FOL). The key intuition behind NLMs is that logic operations such as logical ANDs and ORs can be efficiently approximated by neural networks, and the wiring among neural modules can realize the logic quantifiers.
34
+
35
+ The rest of the paper is organized as follows. We first revisit some useful definitions in symbolic logic systems and define our neural implementation of a rule induction system in Section 2. As a supplementary, we refer interested readers to Appendix A for implementation details. In Section 3 we evaluate the effectiveness of NLM on a broad set of tasks ranging from relational reasoning to decision making. We discuss related works in Section 4, and conclude the paper in Section 5.
36
+
37
+ # 2 NEURAL LOGIC MACHINES (NLM)
38
+
39
+ The NLM is a neural realization of logic machines (under the Closed-World Assumption3). Given a set of base predicates, grounded on a set of objects (the premises), NLMs sequentially apply first-order rules to draw conclusions, such as a property about an object. For example, in the blocks world, based on premises IsGround $( u )$ and $\mathtt { C l e a r } ( u )$ of object $u$ , NLMs can infer whether $u$ is moveable.
40
+
41
+ Internally, NLMs use tensors to represent logic predicates. This is done by grounding the predicate as True or False over a fixed set of objects. Based on the tensor representation, rules are implemented as neural operators that can be applied over the premise tensors and generate conclusion tensors. Such neural operators are probabilistic, lifted, and able to handle relational data with various orders (i.e., operating on predicates with different arities).
42
+
43
+ # 2.1 LOGIC PREDICATES AS TENSORS
44
+
45
+ We adopt a probabilistic tensor representation for logic predicates. Suppose we have a set of objects $\mathcal { \bar { U } } = \{ u _ { 1 } , u _ { 2 } , . . . , u _ { m } \}$ . A predicate $p ( x _ { 1 } , x _ { 2 } , \ldots , x _ { r } )$ , of arity $r$ , can be grounded on the object set $\mathcal { U }$ (informally, we call it $\mathcal { U }$ -grounding), resulting in a tensor $p ^ { \mathcal { U } }$ of shape $[ m ^ { \underline { { { r } } } } ] \ \triangleq$ $[ m , m - 1 , m - 2 , \ldots , m - r + 1 ]$ , where the value of each entry $p ^ { \mathcal { U } } ( u _ { i _ { 1 } } , u _ { i _ { 2 } } , \cdot \cdot \cdot , u _ { i _ { r } } )$ of the tensor represents whether $p$ is True under the grounding that $x _ { 1 } = u _ { i _ { 1 } } , x _ { 2 } = u _ { i _ { 2 } } , \cdot \cdot \cdot , x _ { r } = u _ { i _ { r } } .$ . Here, we restrict that the grounded objects of all $x _ { i }$ ’s are mutually exclusive, i.e., $i _ { j } \neq i _ { k }$ for all pairs of indices $j$ and $k$ . This restriction does not limit the generality of the representation, as the “missing” entries can be represented by the $\mathcal { U } .$ -grounding of other predicates with a smaller arity. For example, for a binary predicate $p$ , the grounded values of the $p ^ { \mathcal { U } } ( \bar { x } , x )$ can be represented by the $\mathcal { U }$ -grounding of a unary predicate $p ^ { \prime } ( x ) \triangleq p ( x , x )$ .
46
+
47
+ ![](images/f14e8b7ec10a4ff80655306b6805f6723ff3ac0d365f3f584336bbd9d8900d41.jpg)
48
+ Figure 2: An illustration of Neural Logic Machines (NLM). During forward propagation, NLM takes object properties and relations as input, performs sequential logic deduction, and outputs conclusive properties or relations of the objects. Implementation details can be found in Section 2.3.
49
+
50
+ We extend this representation to a collection of predicates of the same arity. Let $C ^ { ( r ) }$ be the number of predicates of arity $r$ . We stack the $\mathcal { U }$ -grounding tensors of all predicates as a tensor of shape $\left[ m ^ { \underline { { r } } } , C ^ { ( r ) } \right] \triangleq \left[ m , m - 1 , m - 2 , \dots , m - r + 1 , C ^ { ( r ) } \right]$ , where the last dimension corresponds to the predicates. Intuitively, a group of $C ^ { ( 1 ) }$ unary predicates grounded on $m$ objects can be represented by a tensor of shape $[ m , C ^ { ( \bar { 1 } ) } ]$ , describing a group of “properties of objects”, while a $\left[ m , \bar { m } - 1 , C ^ { ( 2 ) } \right]$ - shaped tensor for $C ^ { ( 2 ) }$ binary predicates describes a group of “pairwise relations between objects”. In practice, we set a maximum arity $B$ for the predicates of interest, called the breadth of the NLM.
51
+
52
+ In addition, NLMs take a probabilistic view of predicates. Each entry in $\mathcal { U }$ -grounding tensors takes value from $[ 0 , 1 ]$ , which can be interpreted as the probability being True. All premises, conclusions, and intermediate results in NLMs are represented by such probabilistic tensors. As a side note, we impose the restriction that all arguments in the predicates can only be variables or objects (i.e., constants) but not function symbols, which follows the setting of Datalog (Maier & Warren, 1988).
53
+
54
+ # 2.2 LOGIC RULES AS NEURAL OPERATORS
55
+
56
+ Our goal is to build a neural architecture to learn rules that are both lifted and able to handle relational data with multiple arities. We present different modules of our neural operators by making analogies to a set of essential meta-rules in symbolic logic systems. Specifically, we discuss our neural implementation of (1) boolean logic rules, as lifted rules containing boolean operations (AND, OR, NOT) over a set of predicates; and (2) quantifications, which bridge predicates with different arities by logic quantifiers $\forall$ and ∃).
57
+
58
+ Next, we combine these neural units to compose NLMs. Figure 2 illustrates the overall multi-layer, multi-group architecture of an NLM. An NLM has layers of depth $D$ (horizontally), and each layer has $B + 1$ computation units (vertically). These units operate on the tensor representations of predicates whose arities range from $[ 0 , B ]$ , respectively. NLMs take input tensors of predicates (premises), perform layer-by-layer computations, and output tensors as conclusions.
59
+
60
+ As the number of layers increases, higher levels of abstraction can be formed. For example, the output of the first layer may represent $\mathtt { C l e a r } ( x )$ , while a deeper layer may output more complicated predicate like Moveable $( x )$ . Thus, forward propagation in NLMs can be interpreted as a sequence of rule applications. We further show that NLMs can efficiently realize a partial set of Horn clauses.
61
+
62
+ We start from the neural boolean logic rules and the neural quantifiers.
63
+
64
+ Boolean logic. We use the following symbolic meta-rule for boolean logic:
65
+
66
+ $$
67
+ \widehat { p } ( x _ { 1 } , x _ { 2 } , \cdots , x _ { r } ) \gets \mathrm { e x p r e s s i o n } ( x _ { 1 } , x _ { 2 } , \cdots , x _ { r } ) ,
68
+ $$
69
+
70
+ where expression can be any boolean expressions consisting of predicates over all variables $( x _ { 1 } , \ldots , x _ { r } )$ and $\hat { p } ( \cdot )$ is the conclusive predicate. For example, the rule Moveabl $\triangleq ( x ) \ $ $\neg \mathrm { I s G r o u n d } ( x ) \land \mathrm { C l e a r } ( x )$ can be instantiated from this meta-rule.
71
+
72
+ Denote $\mathcal { P } = \{ p _ { 1 } , \ldots , p _ { k } \}$ as the set of $| \mathcal { P } |$ predicates appeared in expression. By definition, all $p _ { i }$ ’s have the same arity $r$ and can be stacked as a tensor of shape $[ m ^ { \underline { { r } } } , | \mathcal { P } | ]$ . In Eq. 1, for a specific grounding of the conclusive predicate $\hat { p } ( x _ { 1 } \cdots x _ { r } )$ , it is conditioned $r ! \times | \mathcal { R } |$ grounding values with the same subset of objects, of arbitrary permutation as the arguments to all input predicates $\mathcal { P }$ . For example, consider a specific ternary predicate $\hat { p } ( x _ { 1 } , x _ { 2 } , x _ { 3 } )$ . For three different objects $a , b , c \in { \mathcal { U } }$ , the grounding $\hat { p } ( a , b , c )$ is conditioned on $p _ { j } ( a , b , c ) , p _ { j } ( a , c , b ) , p _ { j } ( b , a , c )$ , $p _ { j } ( b , c , a ) , p _ { j } ( c , a , b ) , p _ { j } ( c , b , a )$ (all permutations of the parameters) for all $j$ (all input predicates).
73
+
74
+ Our neural implementation of boolean logic rules is a lifted neural module that uniformly applies to any grounding entries $( x _ { 1 } \cdots x _ { r } )$ in the output tensor $\hat { p } ^ { \mathcal { U } }$ . It has a Permute $( \cdot )$ operation transforming the tensor representation of $\mathcal { P }$ , followed by a multi-layer perceptron (MLP). Given the tensor of by $\mathcal { P }$ , for each rmuting a $p _ { i } ^ { \mathcal { U } } ( x _ { 1 } , x _ { 2 } , . . . , \dot { x } _ { r } )$ , the Permutejects, with all $( \cdot )$ operation creates ssible permutation $r$ ! new tensors as. We stack all to $p _ { i , 1 } ^ { \mathcal { U } } , \ldots , p _ { i , r ! } ^ { \mathcal { U } }$ form a $[ m ^ { \underline { { r } } } , r ! \times | \mathcal { P } | ]$ -shaped tensor. An MLP uniformly applies to all $m ^ { \underline { { r } } }$ object indices:
75
+
76
+ $$
77
+ \begin{array} { r } { \widehat { p } ( u _ { i _ { 1 } } , \cdots , u _ { i _ { r } } ) = \sigma \left( \mathrm { M L P } \left( p _ { 1 , 1 } ( u _ { i _ { 1 } } , \ldots , u _ { i _ { r } } ) , \cdots , p _ { k , r ! } ( u _ { i _ { 1 } } , \ldots , u _ { i _ { r } } ) \right) ; \theta \right) , } \end{array}
78
+ $$
79
+
80
+ where $\sigma$ is the sigmoid nonlinearity, $\theta$ is the trainable network parameters. For all sets of mutually exclusive indexes $i _ { 1 } , \ldots , i _ { r } \in \{ 1 , 2 , \ldots , m \}$ , the same MLP is applied. Thus, the size of $\theta$ is independent of the number of objects $m$ . This property is analogous to the implicit unification property of Horn clauses: the rule $\hat { p } ( x ) p _ { 1 } ( x ) \land p _ { 2 } ( x )$ implicitly means, $\forall x \hat { p } ( x ) p _ { 1 } ( x ) \land p _ { 2 } ( x )$
81
+
82
+ Quantification. We introduce two types of meta-rules for quantification, namely expansion and reduction. Let $p$ be a predicate, and we have
83
+
84
+ # (Expansion)
85
+
86
+ $$
87
+ \forall x _ { r + 1 } q ( x _ { 1 } , x _ { 2 } , \cdot \cdot \cdot , x _ { r } , x _ { r + 1 } ) p ( x _ { 1 } , x _ { 2 } , \cdot \cdot \cdot , x _ { r } ) ,
88
+ $$
89
+
90
+ where $x _ { r + 1 } \notin \{ x _ { i } \} _ { i = 1 } ^ { r }$ . The expansion operation constructs a new predicate $q$ from $p$ , by introducing a new variable $x _ { r + 1 }$ . For example, consider the following rule
91
+
92
+ $$
93
+ \mathsf { V a l i d M o v e } ( x , y ) \gets \mathsf { M o v e a b l e } ( x ) \wedge \mathsf { P l a c e a b l e } ( y ) .
94
+ $$
95
+
96
+ This rule does not fit the meta-rule in Eq. 1 as some predicates on the RHS only take a subset of variables as inputs. However, it can be described by using the expansion and the boolean logic meta-rules jointly.
97
+
98
+ <table><tr><td>1.∀z MoveableX(x,z) ← Moveable(x);</td><td>(from Eq. 3)</td></tr><tr><td>2.∀z PlaceableY(y,z)← Placeable(y);</td><td>(from Eq. 3)</td></tr><tr><td>3.ValidMove(x,y) ← MoveableX(𝑥,y) ^ PlaceableY(y,x).</td><td>(from Eq. 1)</td></tr></table>
99
+
100
+ The expansion meta-rule (Eq. 3) for a set of $C$ $r$ -ary predicates, represented by a $[ m ^ { \underline { { r } } } , C ]$ -shaped tensor, introduces a new and distinct variable $x _ { r + 1 }$ . Our neural implementation Expand(·) repeats each predicate (their tensor representation) for $( m - r )$ times, and stacks in a new dimension. Thus the output shape is $[ m { \underline { { \boldsymbol { r } } } } { + } 1 , C ]$ .
101
+
102
+ The other meta-rule is for reduction:
103
+
104
+ # (Reduction)
105
+
106
+ $$
107
+ q ( x _ { 1 } , x _ { 2 } , \cdot \cdot \cdot , x _ { r } ) \gets \forall x _ { r + 1 } p ( x _ { 1 } , x _ { 2 } , \cdot \cdot \cdot , x _ { r } , x _ { r + 1 } ) ,
108
+ $$
109
+
110
+ where the $\forall$ quantifier can also be replaced by ∃. The reduction operation reduces a variable in a predicate via the quantifier. As an example, the rule to deduce the moveability of objects,
111
+
112
+ $$
113
+ \mathtt { M o v e a b l e } ( x ) \gets \neg \mathtt { I s G r o u n d } ( x ) \wedge \neg \left( \exists y \ \mathrm { O n } ( y , x ) \right) ,
114
+ $$
115
+
116
+ can be expressed using meta-rules as follows:
117
+
118
+ <table><tr><td>1.Clear(x)←∀y-On(y,x); (from Eq. 4) 2. Moveable(𝑥) ← -IsGround(𝑥) ^Clear(x). (from Eq. 1)</td></tr></table>
119
+
120
+ The reduction meta-rule (Eq. 4) for a set of $C$ $( r + 1 )$ -ary predicates, represented by a $[ m { \underline { { { r + 1 } } } } , C ]$ - shaped tensor, eliminates the variable $x _ { r + 1 }$ via quantifiers. For $\exists ( \mathrm { o r } \forall )$ , our neural implementation Reduce(·) takes the maximum (or minimum) element along the dimension of $x _ { r + 1 }$ , and stacks the two resulting tensors. Therefore, the output shape becomes $[ m ^ { \underline { { r } } } , 2 C ]$ .
121
+
122
+ ![](images/37f9d32c4e76c374558383cce9d42e38d244ae55cb7bd4de4f72894d090cce2a.jpg)
123
+ Figure 3: An illustration of the computational blocdenotes the number of output predicates of group inside Nat layer M for binary predicates at layer . [·] denotes the shape of the ten $i$ . o $C _ { i } ^ { ( j ) }$ $j$ $i$
124
+
125
+ # 2.3 NEURAL LOGIC MACHINES
126
+
127
+ NLMs realize symbolic logic rules in a multi-layer multi-group architecture, illustrated in Figure 2. An NLM has $D$ layers, and each layer has $B + 1$ computation units as groups. Between layers, we use intra-group computation ( Eq. 1). The predicates at each layer are grouped by their arities, and inside each group, we use inter-group computation (Eq. 3 and 4).
128
+
129
+ We define $\mathcal { O } _ { i } = \left\{ O _ { i } ^ { ( 0 ) } , O _ { i } ^ { ( 1 ) } , \cdots , O _ { i } ^ { ( B ) } \right\}$ as the outputs of layer $i$ , where $O _ { i } ^ { ( r ) }$ is the output corresponding to the $r$ -ary unit at layer $i$ . For convenience, we denote ${ \mathcal O } _ { 0 } = \left\{ { O } _ { 0 } ^ { ( 0 ) } , { O } _ { 0 } ^ { ( 1 ) } , \cdots , { O } _ { 0 } ^ { ( B ) } \right\}$ as the $\mathcal { U }$ -grounding tensors for NLM’s base predicates (the premises), and $\mathcal { O } _ { D }$ at the last layer as the conclusions. The overall computation is performed layer-by-layer, from layer 1 to layer $D$ . All computation units at layer $i$ work simultaneously, taking $\mathcal { O } _ { i - 1 }$ as inputs and generating $\mathcal { O } _ { i }$ .
130
+
131
+ Let us consider a specific group $r$ at layer $i$ , and we show how to calculate $O _ { i } ^ { ( r ) }$
132
+
133
+ Inter-group computation. As shown in Figures 2 and 3, we connect tensors from the previous layer $i - 1$ in vertically neighboring groups (i.e. $r - 1$ , $r$ and $r + 1 )$ ), and aligns their shapes by expansion (Eq. 3) or reduction (Eq. 4) to form an intermediate tensor $I _ { i } ^ { ( r ) }$ :
134
+
135
+ $$
136
+ I _ { i } ^ { ( r ) } = \mathrm { C o n c a t } \left( \mathrm { E x p a n d } \left( O _ { i - 1 } ^ { ( r - 1 ) } \right) , O _ { i - 1 } ^ { ( r ) } , \mathrm { R e d u c e } \left( O _ { i - 1 } ^ { ( r + 1 ) } \right) \right) .
137
+ $$
138
+
139
+ Nonexistent terms are ignored (e.g. when $r + 1 > B$ or $r - 1 < 0 .$ ). Note that from the previous layer, $O _ { i - 1 } ^ { ( r - 1 ) } , O _ { i - 1 } ^ { ( r ) } , O _ { i - 1 } ^ { ( { \bar { r } } + 1 ) }$ have shapes $[ m \underline { { { r - 1 } } } , C _ { i - 1 } ^ { ( r - 1 ) } ]$ , $[ m ^ { \underline { { r } } } , C _ { i - 1 } ^ { ( r ) } ]$ , $[ m \underline { { { r + 1 } } } , C _ { i - 1 } ^ { ( r + 1 ) } ]$ , respectively. predicates is After the concatenation, the resulting tensor $\widetilde { C } _ { i } ^ { ( r ) } \triangleq C _ { i - 1 } ^ { ( r - 1 ) } + C _ { i - 1 } ^ { ( r ) } + 2 C _ { i - 1 } ^ { ( r + 1 ) }$ $I _ { i } ^ { ( r ) }$ ei, and the 2 comes from the two quantifiers is of shape $[ m ^ { \underline { { r } } } , \widetilde { C } _ { i } ^ { ( r ) } ]$ , where the number of new $\forall$ and ∃). The inter-group computation essentially aligns predicates of neighboring arities. Relational representations of different orders get combined together through the neural quantification.
140
+
141
+ Intra-group computation. The intra-group computation is implemented as the neural boolean logic in Eq. 1. It take the intermediate tensor $I _ { i } ^ { ( r ) }$ as input, permutes and generates the output tensor $O _ { i } ^ { ( { \bar { r } } ) }$ :
142
+
143
+ $$
144
+ O _ { i } ^ { ( r ) } = \sigma \left( \mathrm { M L P } \left( \mathrm { P e r m u t e } \left( I _ { i } ^ { ( r ) } \right) ; \theta _ { i } ^ { ( r ) } \right) \right) ,
145
+ $$
146
+
147
+ where $\sigma$ is the sigmoid nonlinearity and $\theta _ { i } ^ { ( r ) }$ denotes trainable parameters. We apply Permute function to ${ \widetilde { C } } _ { i } ^ { ( r ) }$ tensors in $I _ { i } ^ { ( r ) }$ individually, and get $r ! \widetilde { C } _ { i } ^ { ( r ) }$ tensors. We set the number of output neurons to be $C _ { i } ^ { ( r ) }$ , thus the shape of output tensor $O _ { i } ^ { ( r ) }$ is $[ m ^ { \underline { { r } } } , C _ { i } ^ { ( r ) } ]$ .
148
+
149
+ Example. For concreteness, in Figure 3, consider group 2 (binary predicates) at layer $i$ . The module begins with the inter-group computation. It first collects the output of vertically consecutive groups (unary, binary and ternary) from the previous layer $i - 1$ , where their shapes are shown in the figure. pansion/reduction to compose thpredicates. For each object pair mediate ten, the output r I (2) - containing nding tens $\widetilde { C } _ { i } ^ { ( 2 ) } \triangleq C _ { i - 1 } ^ { ( 1 ) } +$ $C _ { i - 1 } ^ { ( 2 ) } + 2 C _ { i - 1 } ^ { ( 3 ) }$ $( x , y )$ $\mathcal { U }$
150
+ is computed by intra-group computation $O _ { i } ^ { ( 2 ) } ( x , y ) = \mathrm { M L P } ( \mathrm { C o n c a t } ( I _ { i } ^ { ( 2 ) } ( x , y ) , I _ { i } ^ { ( 2 ) } ( y , x ) ) ; \theta _ { i } ^ { ( 2 ) } )$ , and the output shape is $[ m , m - 1 , C _ { i } ^ { ( 2 ) } ]$ . The $\mathrm { C o n c a t } ( \cdot , \cdot )$ corresponds to the Permute operation, while the MLP is shared among all pairs of objects $( x , y )$ .
151
+
152
+ Remark. It can be verified that NLMs can realize the forward chaining of a partial set of Horn clauses. In NLMs, we consider only finite cases. Thus, there should not exist cyclic references of predicates among rules. The extension to support cyclic references is left as a future work. See the proof in Appendix D. Thus, given the training dataset containing pairs of (premises, conclusions), NLMs can induce lifted rules that entail the conclusions and generalize w.r.t. the number of objects during testing.
153
+
154
+ # 2.4 EXPRESSIVENESS AND COMPUTATIONAL COMPLEXITY
155
+
156
+ The expressive power of NLM depends on multiple factors:
157
+
158
+ 1. The depth $D$ of NLM (i.e., number of layers) restricts the maximum number of deduction steps.
159
+ 2. The breadth $B$ of NLM (i.e., the maximum number of variables in all predicates considered) limits the arity of relations among objects. Practically, most (intermediate) predicates are binary or ternary and we set $B$ depending on the task (typically 2 or 3, see Table 3 in Appendix B.)
160
+ 3. The number of output predicates used at each layer ${ \bf \cdot } { \bf \vec { \mathbf { \mathit { C } } } } _ { i } ^ { ( r ) }$ in Figure 3). Let $C = \mathrm { m a x } _ { i , r } C _ { i } ^ { ( r ) }$ , and this number is often small in our experiments (e.g., 8 or 16).
161
+ 4. In Eq. 2, the expressive power of MLP (number of hidden layers and number of hidden neurons) restricts the complexity of the boolean logic to be represented. In our experiments, we usually prefer shallow networks (e.g., 0 or 1 hidden layer) with a small number of neurons (e.g., 8 or 16). This can be viewed as a low-dimension regularization on the logic complexity and encourages the learned rule to be simple.
162
+
163
+ The computational complexity of NLM’s forward or backward propagation is $O ( m ^ { B } D C ^ { 2 } )$ where $m$ is the number of objects. The network has $O ( D C ^ { 2 } )$ parameters. Assuming $B$ is a small constant, the computational complexity of NLM is quadratic in the number of allowed predicates.
164
+
165
+ # 3 EXPERIMENTS
166
+
167
+ In this section, we show that NLM can solve a broad set of tasks, ranging from relational reasoning to decision making. Furthermore, we show that NLM trained using small-sized instances can generalize to large-sized instances. In the experiments, Softmax-Cross-Entropy loss is used for supervised learning tasks, and REINFORCE (Williams, 1992) is used for reinforcement learning tasks.
168
+
169
+ Due to space limitation, interested readers are referred to Appendix A for details of training (including curriculum learning) in the decision making tasks, and Appendix B for more implementation details (such as residual connections (He et al., 2016)), hyper-parameters, and model selection criterion.
170
+
171
+ # 3.1 BASELINES
172
+
173
+ We consider two baselines as representatives of the connectionist and symbolicist: Memory Networks (MemNN) (Sukhbaatar et al., 2015) and Differentiable Inductive Logic Programming (∂ILP) (Evans & Grefenstette, 2018), a state-of-the-art ILP framework. We also make comparisons with other models such as Differentiable Neural Computer (DNC) (Graves et al., 2016) and graph neural networks (Li et al., 2016) whenever eligible.
174
+
175
+ For MemNN, in order to handle an arbitrary number of inputs (properties, relations), we adopt the method from Graves et al. (2016). Specifically, each object is assigned with a unique identifier (a binary integer ranging from 0 to 255), as its “name”. The memory of MemNN is now a set of “pre-conditions”. For unary predicates, the memory slot contains a tuple $( { \mathrm { i d } } ( x ) , 0 , { \mathrm { p r o p e r t i e s } } ( x ) )$ for each x, and for binary predicates $p ( x , y )$ , the memory slot contains a tuple ( $\operatorname { i d } ( x )$ , $\operatorname { i d } ( y )$ , relations $( x , y ) )$ , for each pair of $( x , y )$ . Both properties $( x )$ and relations $( x , y )$ are length- $k$ vectors $v$ , where $k$ is the number of input predicates. We number each input predicate with an integer $i = 1 , 2 , \cdots , k$ . If object $x$ has a property $p _ { i } ( x )$ , then $v [ i ] = 1$ ; otherwise, $\bar { \boldsymbol { v } } [ i ] = 0$ . If a pair of objects $( x , y )$ have relation $p _ { i } ( x , y )$ , then $v [ i ] = 1$ ; otherwise, $v [ i ] = 0$ . We extract the key and value for MemNN’s to lookup on the given pre-conditions with 2-layer multi-layer perceptrons (MLP). MemNN relies on iterative queries to the memory to perform relational reasoning. Note that MemNN takes a sequential representation of the multi-relational data.
176
+
177
+ For ∂ILP, the grounding of all base predicates is used as the input to the system.
178
+
179
+ # 3.2 FAMILY TREE REASONING
180
+
181
+ The family tree is a benchmark for inductive logic programming, where the machine is given a family tree containing $m$ members. The family tree is represented by the following relations (predicates):
182
+
183
+ Table 1: Comparison among MemNN, ∂ILP and the proposed NLM in family tree and graph reasoning, where $m$ is the size of the testing family trees or graphs. Both ∂ILP and NLM outperform the neural baseline and achieve perfect accuracy $( 1 0 0 \% )$ on test set. Note N/A mark means that ∂ILP cannot scale up in 2-OutDegree.
184
+
185
+ <table><tr><td rowspan="2">Family Tree</td><td colspan="2">MemNN</td><td colspan="2">3ILP</td><td colspan="2">NLM(Ours)</td></tr><tr><td>m=20</td><td>m=100</td><td>m=20</td><td>m=100</td><td>m=20</td><td>m=100</td></tr><tr><td>HasFather</td><td>99.9% / 99.9%</td><td>59.8% / 65.2%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td>HasSister</td><td>86.3% / 85.5%</td><td>59.8% / 66.4%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td>IsGrandparent</td><td>96.5% / 84.7%</td><td>97.7% / 63.7%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td>IsUncle</td><td>96.3% / 85.8%</td><td>96.0% / 64.0%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td>IsMGUncle</td><td>99.7% / 98.4%</td><td>98.4% /81.7%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td rowspan="2">Graph</td><td colspan="2">MemNN</td><td colspan="2">8ILP</td><td colspan="2">NLM (Ours)</td></tr><tr><td>m=10</td><td>m = 50</td><td>m=10</td><td>m=50</td><td>m=10</td><td>m=50</td></tr><tr><td>AdjacentToRed</td><td>95.2% /94.6%</td><td>93.1% /91.9%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td>4-Connectivity</td><td>92.3% /90.5%</td><td>81.3% / 88.0%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td>6-Connectivity</td><td>67.6% / 58.8%</td><td>43.9% / 67.9%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td>1-OutDegree</td><td>99.8% /99.7%</td><td>78.6% / 81.2%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td>2-OutDegree</td><td>81.4% / 61.8%</td><td>96.7% / 87.7%</td><td>N/A</td><td>N/A</td><td>100%</td><td>100%</td></tr></table>
186
+
187
+ IsSon, IsDaughter, IsFather and IsMother. The goal of the task is to reason out other properties of family members or relations between them. Our results are summarized in Table 1.
188
+
189
+ For MemNN, we treat the problem of relation prediction as a question answering task. For example, to determine whether member $x$ has a father in the family tree, we input $\operatorname { i d } ( x )$ to MemNN as the question. MemNN then performs multiple queries to the memory and updates its hidden state. The finishing hidden state is used to classify whether HasFathe $\cdot ( x )$ . For relations (binary predicates), the corresponding MemNN takes the concatenated embedding of $\operatorname { i d } ( x )$ and $\operatorname { i d } ( y )$ as the question.
190
+
191
+ For ∂ILP, we take the grounded probability of the “target” predicate as the output; for an NLM with $D$ layers, we take the corresponding group of output predicates at the last layer (for property prediction, we use tensor ${ O } _ { D } ^ { ( 1 ) }$ to represent unary predicates, while for relation prediction we use tensor $O _ { D } ^ { ( 2 ) }$ to represent binary predicates) and classify the property or relation with a linear layer.
192
+
193
+ All models are trained on instances of size 20 and tested on instances of size 20 and 100 (size is defined as the number of family members). The models are trained with fully supervised learning (labels are available for all objects or pairs of objects). During the testing phase, the accuracy is evaluated (and averaged) on all objects (for properties such as HasFather) or pairs of objects (for relations such as IsUncle). MGUncle is defined as one’s maternal great uncle, which is also used by Differentiable Neural Computer (DNC) (Graves et al., 2016). We report the performance of MemNN in the format of Micro / Macro accuracy. We also try our best to replicate the setting used by Graves et al. (2016), and as a comparison, in the task of “finding” the MGUncle instead of “classifying”, DNC reaches the accuracy of $8 1 . 8 \%$ .
194
+
195
+ # 3.3 GENERAL GRAPH REASONING
196
+
197
+ We further extend the Family tree to general graphs and report the reasoning performance in Table 1.
198
+
199
+ We treat each node in the graph as an object (symbol). The (undirected) graph is fed into the model in the form of a “HasEdge” relation between nodes (which is an adjacent matrix). Besides, an extra property color represented by one-hot vectors is defined for every node. A node has the property of AdjacentToRed if it is adjacent to a red node by an outgoing edge. $k$ -Connectivity is a relation between two nodes in the graph, which is true if two nodes are connected by a path with length at most $k$ . A node has property $k$ -OutDegree if its out-degree is exactly $k$ . The $\mathbb { N } / \mathbb { A }$ result of $\partial \mathrm { I L P }$ i n the 2-OutDegree task comes from its memory restriction (Evans & Grefenstette, 2018), where 3-ary intentional predicate is required. As an example, a human-written logic rule for 2-OutDegree can be $\begin{array} { r } { - \mathtt { O u t } \mathtt { D e g r e e } ( a ) \exists _ { b } \exists _ { c } \forall _ { d } \mathtt { H a s E d g e } ( a , b ) \land \mathtt { H a s E d g e } ( a , c ) \land \neg \mathtt { H a s E d g e } ( a , d ) } \end{array}$ where $a , b , c$ and $d$ are distinct nodes in the graph.
200
+
201
+ All models are trained on instances of size 10 and tested on instances of size 10 and 50 (size is defined as the number of nodes in the graph).
202
+
203
+ Table 2: Comparison between MemNN and the proposed NLM in the blocks world, sorting integers, and finding shortest paths, where $m$ is the number of blocks in the blocks world environment or the size of the arrays/graphs in sorting/path environment. Both models are trained on instance size $m \leq 1 2$ and tested on $m = 1 0$ or 50. The performance is evaluated by two metrics and separated by $^ { * * } / { } ^ { * }$ : the probability of completing the task during the test, and the average Moves used by the agents when they complete the task. There is no result for ∂ILP since it fails to scale up. MemNN fails to complete the blocks world within the maximum $m \times 4$ Moves.
204
+
205
+ <table><tr><td rowspan="2">Task</td><td colspan="2">MemNN</td><td colspan="2">NLM (Ours)</td></tr><tr><td>m= 10</td><td>m = 50</td><td>m=10</td><td>m= 50</td></tr><tr><td>BlocksWorld</td><td>0% / N/A</td><td>0% / N/A</td><td>100% / 12</td><td>100% / 84</td></tr><tr><td>Sorting</td><td>100% / 22</td><td>90% /986.6</td><td>100% /8</td><td>100% /45</td></tr><tr><td>Path</td><td>45% / 13.3</td><td>12% /42.7</td><td>100% / 4</td><td>100% / 4</td></tr></table>
206
+
207
+ # 3.4 BLOCKS WORLD
208
+
209
+ We also test NLM’s capability of decision making in the classic blocks world domain (Nilsson, 1982; Gupta & Nau, 1992) by slightly extending the model to fit the formulation of Markov Decision Process (MDP) in reinforcement learning.
210
+
211
+ Shown in Figure 1, an instance of the blocks world environment contains two worlds: the initial world and the target world, each containing the ground and $m$ blocks. The task is to take actions in the operating world and make its configuration the same as the target world. The agent receives positive rewards only when it accomplishes the task and the sparse reward setting brings significant hardness. Each object (blocks or ground) can be represented by four properties: world_id, object_id, coordinate_x, coordinate_y. The ground has a fixed coordinate $( 0 , 0 )$ . The input is the result of the numeral comparison among all pairs of objects (may come from different worlds). For example, in $x$ -coordinate, the comparison produces three relations for each object pair $( i , j ) , i \neq j$ : Left $( i , j )$ (whether $i$ is to the left of $j$ , or $\mathbf { 1 } [ x _ { i } < x _ { j } ] )$ , $\mathtt { S a m e X } ( i , j )$ and Right $( i , j )$ .
212
+
213
+ The only operation is $\mathsf { M o v e } ( i , j )$ , which moves object $i$ onto the object $j$ in the operating world if $i$ is movable and $j$ is placeable. If the operation is invalid, it will have no effect; otherwise, the action takes effect and the state represented as coordinates will change accordingly. In our setting, an object $i$ is movable iff it is not the ground and there are no blocks on it, i.e. $\forall j \neg ( \mathtt { U p } ( i , j ) \wedge \mathtt { S a m e X } ( i , \bar { j } ) )$ . Object $i$ is placeable iff it is the ground or there are no blocks on it.
214
+
215
+ To avoid the ambiguity of the $x$ -coordinates while putting blocks onto the ground, we set the $x$ coordinate of block $i$ to be $i$ when it is placed onto the ground. The action space is $( m + 1 ) \times m$ where $m$ is the number of blocks in the world and $+ 1$ comes from the “ground”. For both MemNN and NLM, we apply a shared MLP on the output relational predicates of each pair of objects $O _ { D } ^ { ( 2 ) } ( x , y )$ and compute an action score $s ( x , y )$ . The probability for $\mathsf { M o v e } ( x , y )$ is $\propto \exp s ( x , y )$ (by taking a Softmax). The results are summarized in Table 2. For more discussion on the confidence bounds of the experiments, please refer to Appendix B.6.
216
+
217
+ # 3.5 GENERAL ALGORITHMS
218
+
219
+ We further show NLM’s ability to excel at algorithmic tasks, such as Sorting and Path. We view an algorithm as a sequence of primitive actions and cast as a reinforcement learning problem.
220
+
221
+ Sorting. We first consider the problem of sorting integers. Given a length- $m$ array $a$ of integers, the algorithm needs to iterative swap elements to sort the array in ascending order. We treat each slot in the array as an object, and input their index relations (whether $i < j$ ) and numeral relations (whether $a [ i ] < { \dot { a } } [ j ] ,$ to NLM or MemNN. The action space is $m \times ( m - 1 )$ indicating the pair of integers to be swapped. Table 2 summarizes the learning performance.
222
+
223
+ As the comparisons between all pairs of elements in the array are given to the agent, sorting the array within the maximum number of swaps is an easy task. A trivial solution is to randomly swap an inversion4 in the array at each step.
224
+
225
+ Beyond being able to generalize to arrays of arbitrary length, with different hyper-parameters and random seeds, the learned algorithms can be interpreted as Selection-Sort, Bubble-Sort, etc. We include videos demonstrating some learned algorithms in our website.5
226
+
227
+ Path finding. We also test the performance of finding a path (single-source single-target path) in a given graph as a sequential decision-making problem in reinforcement learning environment. Given an undirected graph represented by its adjacency matrix as relations, the algorithm needs to find a path from a start node $s$ (with property $\bar { \mathtt { I s S t a r t } } ( s ) = \mathtt { T r u e } )$ to the target node $t$ (with property IsTarget $( t ) = \mathtt { T r u e } )$ . To restrict the number of deduction steps, we set the maximum distance between $s$ and $t$ to be 5 during the training and set the distance between $s$ and $t$ to be 4 during the testing, which replicates the setting of Graves et al. (2016). Table 2 summarizes the result.
228
+
229
+ Path task here can be seen as an extension of bAbI task 19 (path finding) (Weston et al., 2015) with symbolic representation. As a comparison with graph neural networks, Li et al. (2016) achieved $9 9 \%$ accuracy on the bAbI task 19. Contrastively, we formulate the shortest path task as a more challenging reinforcement learning (decision-making) task rather than a supervised learning (prediction) task as in Graves et al. (2016). Specifically, the agent iteratively chooses the next node next along the path. At the next step, the starting node will become next (at each step, the agent will move to next). As a comparison, in Graves et al. (2016), Differentiable Neural Computer (DNC) finds the shortest path with probability $5 5 . 3 \%$ in a similar setting.
230
+
231
+ # 4 RELATED WORKS AND DISCUSSIONS
232
+
233
+ ILP and relational reasoning. Inductive logic programming (ILP) (Muggleton, 1991; 1996; Friedman et al., 1999) is a paradigm for learning logic rules derived from a limited set of rule templates from examples. Being a powerful way of reasoning over discrete symbols, it is successfully applied to various language-related problems, and has been integrated into modern learning frameworks (Kersting et al., 2000; Richardson & Domingos, 2006; Kimmig et al., 2012). Recently, Evans & Grefenstette (2018) introduces a differentiable implementation of ILP which works with connectionist models such as CNNs. Sharing a similar spirit, Rocktäschel & Riedel (2017) introduces an end-to-end differentiable logic proving system for knowledge base (KB) reasoning. A major challenge of these approaches is to scale up to a large number of complex rules. Searching a rule as complex as our ShouldMove example in Appendix E from scratch is beyond the scope of most systems that use weighted symbolic rules generated from templates.
234
+
235
+ As shown in Section 2.4, both computational complexity and parameter size of the NLM grow polynomially w.r.t. the number of allowed predicates (in contrast to the exponential dependence in ∂ILP (Evans & Grefenstette, 2018)), but factorially w.r.t. the breadth (max arity, same as ∂ILP). Therefore, our method can deal with more complex tasks such as the blocks world which requires using a large number of intermediate predicates, while ∂ILP fails to search in such a large space.
236
+
237
+ Our paper also differs from existing approaches on using neural networks to augment symbolic rule induction (Lippi & Frasconi, 2009; Manhaeve et al., 2018). Specifically, we have no rule designed by humans as the input or the knowledge base for the model. NLMs are general neural architectures for learning lifted rules from only input-output pairs.
238
+
239
+ Our work is also related to symbolic relational reasoning, which has a wide application in processing discrete data structures such as knowledge graphs and social graphs (Zhu et al., 2014; Kipf & Welling, 2017; Zeng et al., 2017; Yang et al., 2017). Most symbolic relational reasoning approaches (e.g., Yang et al., 2017; Rocktäschel & Riedel, 2017) are developed for KB reasoning, in which the predicates on both sides of a rule is known in the KB. Otherwise, the complexity grows exponentially in the number of used rules for a conclusion, which is the case in the blocks world. Moreover, Yang et al. (2017) considers rues of the form query $( \mathtt { Y } , \mathtt { X } ) \longleftarrow \mathtt { R } _ { \mathtt { n } } ( \mathtt { Y } , \mathtt { Z } _ { \mathtt { n } } ) \wedge \dots \wedge \mathtt { R } _ { 1 } ( \mathtt { Z } _ { 1 } , \mathtt { X } )$ , which is not for general reasoning. The key of Rocktäschel & Riedel (2017) and Campero et al. (2018) is to learn subsymbolic embeddings of entities and predicates for efficient KB completion, which differs from our focus. While NLMs can scale up to complex rules, the number of objects/entities or relations should be bounded as a small value $( e . g . , < 1 0 0 0 )$ ), since all predicates are represented as tensors. This is, to some extent, in contrast with the systems developed for knowledge base reasoning. We leave the scalability of NLMs to large entity sets as future works.
240
+
241
+ Besides, modular networks (Andreas et al., 2016; 2017; Mascharka et al., 2018) are proposed for the reasoning over subsymbolic data such as images and natural language question answering. Santoro et al. (2017) implements a visual reasoning system based on “virtual” objects brought by receptive fields in CNNs. Wu et al. (2017) tackles the problem of deriving structured representation from raw pixel-level inputs. Dai et al. (2018) combines structured visual representation and theorem proving.
242
+
243
+ Graph neural networks and relational inductive bias. Graph convolution networks (GCNs) (Bruna et al., 2014; Li et al., 2016; Defferrard et al., 2016; Kipf & Welling, 2017) is a family of neural architectures working on graphs. As a representative, Gilmer et al. (2017) proposes a message passing modeling for unifying various graph neural networks and graph convolution networks. GCNs achieved great success in tasks with intrinsic relational structures. However, most of the GCNs operate on pre-defined graphs with only nodes and binary connections. This restricts the expressive power of models in general-purpose reasoning tasks (Li et al., 2016).
244
+
245
+ In contrast, this work removes such restrictions and introduces a neural architecture to capture lifted rules defined on any set of objects. Quantitative results support the effectiveness of the proposed model in a broad set of tasks ranging from relational reasoning to modeling general algorithms (as decision-making process). Moreover, being fully differentiable, NLMs can be plugged into existing convolutional or recurrent neural architectures for logic reasoning.
246
+
247
+ Relational decision making. Logic-driven decision making is also related to Relational RL (Van Otterlo, 2009), which models the environment as a collection of objects and their relations. State transition and policies are both defined over objects and their interactions. Examples include OOMDP (Diuk et al., 2008; Kansky et al., 2017), symbolic models for learning in interactive domains (Pasula et al., 2007), structured task definition by object-oriented instructions (Denil et al., 2017), and structured policy learning (Garnelo et al., 2016). General planning methods solve these tasks via planning based on rules (Hu & De Giacomo, 2011; Srivastava et al., 2011; Jiménez et al., 2019). The goal of our paper is to introduce a neural architecture which learns lifted rules and handle relational data with multiple orders. We leave its application in other RL and planning tasks as future work.
248
+
249
+ Neural abstraction machines and program induction. Neural Turing Machine (NTM) (Graves et al., 2014; 2016) enables general-purpose neural problem solving such as sorting by introducing an external memory that mimics the execution of Turing Machine. Neural program induction and synthesis (Neelakantan et al., 2016; Reed & De Freitas, 2016; Kaiser & Sutskever, 2016; Parisotto et al., 2017; Devlin et al., 2017; Bunel et al., 2018; Sun et al., 2018) are recently introduced to solve problems by synthesizing computer programs with neural augmentations. Some works tackle the issue of the systematical generalization by introducing extra supervision (Cai et al., 2017). In Chen et al. (2018), more complex programs such as language parsing are studied. However, the neural programming and program induction approaches are usually hard to optimize in an end-to-end manner, and often require strong supervisions (such as ground-truth programs).
250
+
251
+ # 5 CONCLUSIONS AND DISCUSSIONS
252
+
253
+ In this paper, we propose a novel neural-symbolic architecture called Neural Logic Machines (NLMs) which can conduct first-order logic deduction. Our model is fully differentiable, and can be trained in an end-to-end fashion. Empirical evaluations show that our method is able to learn the underlying logical rules from small-scale tasks, and generalize to large-scale tasks.
254
+
255
+ The promising results open the door for several research directions. First, the maximum depth of the NLMs is a hyperparameter to be specified for individual problems. Future works may investigate how to extend the model, so that it can adaptively select the right depth for the problem at hand. Second, it is interesting to extend NLMs to handle vector inputs with real-valued components. Currently, NLM requires symbolic input that may not be easily available in applications like health care where many inputs (e.g., blood pressure) are real numbers. Third, training NLMs remains nontrivial, and techniques like curriculum learning have to be used. It is important to find an effective yet simpler alternative to optimize NLMs. Last but not least, unlike ILP methods that learn a set of rules in an explainable format, the learned rules of NLMs are implicitly encoded as weights of the neural networks. Extracting human-readable rules from NLMs would be a meaningful future direction.
256
+
257
+ # ACKNOWLEDGEMENTS
258
+
259
+ We thank Rishabh Singh, Thomas Walsh, the area chair, and anonymous reviewers for their insightful comments.
260
+
261
+ REFERENCES
262
+ Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. Neural module networks. In CVPR, 2016.
263
+ Jacob Andreas, Dan Klein, and Sergey Levine. Modular multitask reinforcement learning with policy sketches. In ICML, 2017.
264
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In ICLR, 2015.
265
+ Yoshua Bengio, Jérôme Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In ICML, 2009.
266
+ Joan Bruna, Wojciech Zaremba, Arthur Szlam, and Yann LeCun. Spectral networks and locally connected networks on graphs. In ICLR, 2014.
267
+ Rudy R Bunel, Matthew Hausknecht, Jacob Devlin, Rishabh Singh, and Pushmeet Kohli. Leveraging grammar and reinforcement learning for neural program synthesis. In ICLR, 2018.
268
+ Jonathon Cai, Richard Shin, and Dawn Song. Making neural programming architectures generalize via recursion. In ICLR, 2017.
269
+ Andres Campero, Aldo Pareja, Tim Klinger, Josh Tenenbaum, and Sebastian Riedel. Logical rule induction and theory learning using neural theorem proving. arXiv:1809.02193, 2018.
270
+ Xinyun Chen, Chang Liu, and Dawn Song. Towards synthesizing complex programs from inputoutput examples. In ICLR, 2018.
271
+ Wang-Zhou Dai, Qiu-Ling Xu, Yang Yu, and Zhi-Hua Zhou. Tunneling neural perception and logic reasoning through abductive learning. arXiv:1802.01173, 2018.
272
+ Evgeny Dantsin, Thomas Eiter, Georg Gottlob, and Andrei Voronkov. Complexity and expressive power of logic programming. ACM CSUR, 33:374–425, 2001.
273
+ Michaël Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on graphs with fast localized spectral filtering. In NIPS, 2016.
274
+ Misha Denil, Sergio Gómez Colmenarejo, Serkan Cabi, David Saxton, and Nando de Freitas. Programmable agents. arXiv:1706.06383, 2017.
275
+ Jacob Devlin, Jonathan Uesato, Surya Bhupatiraju, Rishabh Singh, Abdel-rahman Mohamed, and Pushmeet Kohli. Robustfill: Neural program learning under noisy i/o. In ICML, 2017.
276
+ Carlos Diuk, Andre Cohen, and Michael L Littman. An object-oriented representation for efficient reinforcement learning. In ICML, 2008.
277
+ Richard Evans and Edward Grefenstette. Learning explanatory rules from noisy data. JAIR, 61:1–64, 2018.
278
+ Jerry Fodor and Brian P McLaughlin. Connectionism and the problem of systematicity: Why smolensky’s solution doesn’t work. Cognition, 35(2):183–204, 1990.
279
+ Jerry A Fodor and Zenon W Pylyshyn. Connectionism and cognitive architecture: A critical analysis. Cognition, 28(1-2):3–71, 1988.
280
+ Nir Friedman, Lise Getoor, Daphne Koller, and Avi Pfeffer. Learning probabilistic relational models. In IJCAI, 1999.
281
+ Marta Garnelo, Kai Arulkumaran, and Murray Shanahan. Towards deep symbolic reinforcement learning. arXiv:1609.05518, 2016.
282
+ Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. In ICML, 2017.
283
+ Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv:1410.5401, 2014.
284
+
285
+ Alex Graves, Greg Wayne, Malcolm Reynolds, Tim Harley, Ivo Danihelka, Agnieszka GrabskaBarwinska, Sergio Gómez Colmenarejo, Edward Grefenstette, Tiago Ramalho, John Agapiou, et al. ´ Hybrid computing using a neural network with dynamic external memory. Nature, 538(7626):471, 2016.
286
+
287
+ Naresh Gupta and Dana S Nau. On the complexity of blocks-world planning. Artif. Intell., 56(2-3): 223–254, 1992.
288
+
289
+ Robert F Hadley. Systematicity in connectionist language learning. Mind Lang., 9(3):273–287, 1994.
290
+
291
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
292
+
293
+ Geoffrey Hinton, Li Deng, Dong Yu, George E Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara N Sainath, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. Signal Process., 29(6):82–97, 2012.
294
+
295
+ Alfred Horn. On sentences which are true of direct unions of algebras. J. Symbolic Logic, 16(1): 14–21, 1951.
296
+
297
+ Yuxiao Hu and Giuseppe De Giacomo. Generalized planning: Synthesizing plans that work for multiple environments. In IJCAI, 2011.
298
+
299
+ Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In CVPR, 2017.
300
+
301
+ Peter A Jansen and Scott Watter. Strong systematicity through sensorimotor conceptual grounding: an unsupervised, developmental approach to connectionist sentence processing. Connect. Sci., 24 (1):25–55, 2012.
302
+
303
+ Sergio Jiménez, Javier Segovia-Aguas, and Anders Jonsson. A review of generalized planning. The Knowledge Engineering Review, 34, 2019.
304
+
305
+ Łukasz Kaiser and Ilya Sutskever. Neural gpus learn algorithms. In ICLR, 2016.
306
+
307
+ Ken Kansky, Tom Silver, David A Mély, Mohamed Eldawy, Miguel Lázaro-Gredilla, Xinghua Lou, Nimrod Dorfman, Szymon Sidor, Scott Phoenix, and Dileep George. Schema networks: Zero-shot transfer with a generative causal model of intuitive physics. In ICML, 2017.
308
+
309
+ Kristian Kersting, Luc De Raedt, and Stefan Kramer. Interpreting bayesian logic programs. In AAAI-2000 Workshop on Learning Statistical Models from Relational Data, 2000.
310
+
311
+ Angelika Kimmig, Stephen Bach, Matthias Broecheler, Bert Huang, and Lise Getoor. A short introduction to probabilistic soft logic. In NIPS Workshop on Probabilistic Programming: Foundations and Applications, 2012.
312
+
313
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015.
314
+
315
+ Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017.
316
+
317
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012.
318
+
319
+ Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proc. IEEE, 86(11):2278–2324, 1998.
320
+
321
+ Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. Gated graph sequence neural networks. In ICLR, 2016.
322
+
323
+ Dianhuan Lin, Eyal Dechter, Kevin Ellis, Joshua B Tenenbaum, and Stephen H Muggleton. Bias reformulation for one-shot function induction. In ECAI, 2014.
324
+
325
+ Marco Lippi and Paolo Frasconi. Prediction of protein $\beta$ -residue contacts by markov logic networks with grounding-specific weights. Bioinformatics, 25(18):2326–2333, 2009.
326
+
327
+ David Maier and David S. Warren. Computing with Logic: Logic Programming with Prolog. Benjamin-Cummings Publishing Co., Inc., Redwood City, CA, USA, 1988.
328
+
329
+ Robin Manhaeve, Sebastijan Dumancic, Angelika Kimmig, Thomas Demeester, and Luc De Raedt. Deepproblog: Neural probabilistic logic programming. In NeurIPS, 2018.
330
+
331
+ David Mascharka, Philip Tran, Ryan Soklaski, and Arjun Majumdar. Transparency by design: Closing the gap between performance and interpretability in visual reasoning. In CVPR, 2018.
332
+
333
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin Riedmiller, Andreas K. Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 02 2015.
334
+
335
+ Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In ICML, 2016.
336
+
337
+ Stephen Muggleton. Inductive logic programming. New Gener. Comput., 8(4):295–318, 1991.
338
+
339
+ Stephen Muggleton. Stochastic logic programs. Advances in Inductive Logic Programming, 32: 254–264, 1996.
340
+
341
+ Arvind Neelakantan, Quoc V Le, and Ilya Sutskever. Neural programmer: Inducing latent programs with gradient descent. In ICLR, 2016.
342
+
343
+ Nils J Nilsson. Principles of Artificial Intelligence. Springer Science & Business Media, 1982.
344
+
345
+ Emilio Parisotto, Abdel-rahman Mohamed, Rishabh Singh, Lihong Li, Dengyong Zhou, and Pushmeet Kohli. Neuro-symbolic program synthesis. In ICLR, 2017.
346
+
347
+ Hanna M Pasula, Luke S Zettlemoyer, and Leslie Pack Kaelbling. Learning symbolic models of stochastic domains. JAIR, 29:309–352, 2007.
348
+
349
+ Scott Reed and Nando De Freitas. Neural programmer-interpreters. In ICLR, 2016.
350
+
351
+ Matthew Richardson and Pedro Domingos. Markov logic networks. Mach. Learn., 62(1-2):107–136, 2006.
352
+
353
+ Tim Rocktäschel and Sebastian Riedel. End-to-end differentiable proving. In NIPS, 2017.
354
+
355
+ Adam Santoro, David Raposo, David G Barrett, Mateusz Malinowski, Razvan Pascanu, Peter Battaglia, and Tim Lillicrap. A simple neural network module for relational reasoning. In NIPS, 2017.
356
+
357
+ David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton, et al. Mastering the game of go without human knowledge. Nature, 550(7676):354, 2017.
358
+
359
+ Siddharth Srivastava, Neil Immerman, and Shlomo Zilberstein. A new representation and associated algorithms for generalized planning. Artif. Intell., 175(2):615–647, 2011.
360
+
361
+ Sainbayar Sukhbaatar, arthur szlam, Jason Weston, and Rob Fergus. End-to-end memory networks. In NIPS, 2015.
362
+
363
+ Shao-Hua Sun, Hyeonwoo Noh, Sriram Somasundaram, and Joseph Lim. Neural program synthesis from diverse demonstration videos. In ICML, 2018.
364
+
365
+ Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In NIPS, 2014.
366
+
367
+ Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction, volume 1. MIT press Cambridge, 1998.
368
+
369
+ Martijn Van Otterlo. The Logic of Adaptive Behavior. IOS Press, 2009.
370
+
371
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NIPS, 2017.
372
+
373
+ Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. Pointer networks. In NIPS, 2015.
374
+
375
+ Jason Weston, Antoine Bordes, Sumit Chopra, Alexander M Rush, Bart van Merriënboer, Armand Joulin, and Tomas Mikolov. Towards ai-complete question answering: A set of prerequisite toy tasks. arXiv:1502.05698, 2015.
376
+
377
+ Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8:229–256, 1992.
378
+
379
+ Ronald J Williams and Jing Peng. Function optimization using connectionist reinforcement learning algorithms. Connect. Sci., 3(3):241–268, 1991.
380
+
381
+ Jiajun Wu, Joshua B Tenenbaum, and Pushmeet Kohli. Neural scene de-rendering. In CVPR, 2017.
382
+
383
+ Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv:1609.08144, 2016.
384
+
385
+ Fan Yang, Zhilin Yang, and William W Cohen. Differentiable learning of logical rules for knowledge base reasoning. In NIPS, 2017.
386
+
387
+ Wenyuan Zeng, Yankai Lin, Zhiyuan Liu, and Maosong Sun. Incorporating relation paths in neural relation extraction. In EMNLP, 2017.
388
+
389
+ Yuke Zhu, Alireza Fathi, and Li Fei-Fei. Reasoning about Object Affordances in a Knowledge Base Representation. In ECCV, 2014.
390
+
391
+ # SUPPLEMENTARY MATERIAL
392
+
393
+ This supplementary material is organized as follows. First, we provide more details for our training method and introduce the curriculum learning used for reinforcement learning tasks in Appendix A. Second, in Appendix B, we provide more implementation details and hyper-parameters of each task in Section 3. Next, we provide deferred discussion of NLM extensions in Appendix C. Besides, we give a proof of how NLMs could realize the the forward chaining of a set of logic rules defined in Horn cluases. See Appendix D for details. In Appendix E, We also provide a list of sample rules for the blocks world problem in order to exhibit the complexity of describing a strategies or policies. Finally, we also provide a minimal implementation of NLM in TensorFlow for reference at the end of the supplementary material (Appendix F).
394
+
395
+ # A TRAINING METHOD AND CURRICULUM LEARNING
396
+
397
+ In this section, we provide hyper-parameter details of our training method and introduce the examguided curriculum learning used for reinforcement learning tasks. We also provide details of the data generation method.
398
+
399
+ # A.1 TRAINING METHOD
400
+
401
+ We optimize both NLM and MemNN with Adam (Kingma & Ba (2015)) and use a learning rate of $\alpha = 0 . 0 0 5$ .
402
+
403
+ For all supervised learning tasks (i.e. family tree and general graph tasks), we use Softmax-CrossEntropy as loss function and a training batch size of 4.
404
+
405
+ For reinforcement learning tasks (i.e. the blocks world, sorting and shortest path tasks), we use REINFORCE algorithm (Sutton $\&$ Barto (1998)) for optimization. Each training batch is composed of a single episode of play. Similar to A3C (Mnih et al. (2016)), we add policy entropy term in the objective function (proposed by Williams & Peng (1991)) to help exploration. The update function for parameters $\theta$ of policy $\pi$ is
406
+
407
+ $$
408
+ \Delta \theta = \alpha [ v _ { t } \nabla _ { \theta } \log \pi ( a _ { t } | s _ { t } ; \theta ) + \beta \nabla _ { \theta } H ( \pi ( s _ { t } ; \theta ) ) ] ,
409
+ $$
410
+
411
+ where $H$ is the entropy function, $s _ { t }$ and $a _ { t }$ are the state and action at time $t$ , $v _ { t }$ is the discounted reward starting from time $t$ . The hyper-parameter $\beta$ is set according to different environments and learning stages depending on the demand of exploration.
412
+
413
+ In all environments, the agent receives a reward of value 1.0 when it completes the task within a limited number of steps (which is related to the number of objects). To encourage the agent to use as few moves as possible, we give a reward of $- 0 . 0 1$ for each move. The reward discount factor $\gamma$ is 0.99 for all tasks.
414
+
415
+ Table 3: Hyper-parameters for reinforcement learning tasks. The meaning of the hyper-parameters could be found in Section A.1 and Section A.2. For the Path environment, the step limit is set to the actual distance between the starting point and the targeting point, to encourage the agents to find the shortest path.
416
+
417
+ <table><tr><td>Task</td><td>Range</td><td>Step Limit</td><td>βinit</td><td>Ω</td><td>Epochs</td><td>Train Epoch Episodes</td><td>Evaluation Episodes</td></tr><tr><td>Sorting</td><td>m ∈[4,10]</td><td>2m</td><td>0.01</td><td>0.5</td><td>5</td><td>200</td><td>200</td></tr><tr><td>Path</td><td>m ∈[3,12]</td><td>opt</td><td>0.1</td><td>0.5</td><td>40</td><td>600</td><td>3000</td></tr><tr><td>Blocks World</td><td>m ∈[2,12]</td><td>4m</td><td>0.2</td><td>0.6</td><td>50</td><td>1000</td><td>3000</td></tr></table>
418
+
419
+ # A.2 CURRICULUM LEARNING GUIDED BY EXAMS AND FAILS
420
+
421
+ Inspired by the education system of humans, we employ an exam-guided curriculum learning (Bengio et al., 2009) approach for training Neural Logic Machines. We heuristically label each training
422
+
423
+ # Algorithm 1: Curriculum learning guided by exams and fails
424
+
425
+ Function train(model M, lessons $\mathcal { L }$ ): for $\ell \in { \mathcal { L } }$ do for $i = 0 , 1 , \cdots \ell$ .max_epochs do accuracy, pos, $n e g $ evaluate $( M , \ell )$ ; // Take the exam and collect samples. if accuracy $> \ell$ .threshold then break; // Enter the next lesson if pass the exam. for $j = 0 , 1 , \cdots K$ do data $\sim$ balanced sampling from pos and neg; Optimize $M$ with data;
426
+
427
+ instances with its complexity. Training instances are grouped by their complexity (as lessons). For example, in the game of BlocksWorld, we consider the number of blocks in a game instance as its complexity. During the training, we present the training instances to the model from lessons with increasing difficulty. We periodically test models’ performance (as exams) on novel instances of the same complexity as the ones in its current lesson. The well-performed model (whose accuracy reaches a certain threshold) will pass the exam and advance to a harder lesson (of more complex training instances). The exam-guided curriculum learning exploits the previously gained knowledge to ease the learning of more complex instances. Moreover, the performance on the final exam reaches above a threshold indicates the graduation of models.
428
+
429
+ In our experiments, each lesson contains training instances of the same number of objects. For example, the first lesson in the blocks world contains all possible instances consisting of 2 blocks (in each world). The instances of the second lesson contain 3 blocks in each world. And in the last lesson (totally 11 lessons) there are 12 blocks in each world. We report the range of the curriculum in Table 3 for three RL tasks.
430
+
431
+ Another essential ingredient for the efficient training of NLMs is to record models’ failure cases. Specifically, we keep track of two sets of training instances: positive and negative (meaning the agent achieves the task or not). For each presented instance of the exam, it is recollected into positive or negative sets depending on whether the agent achieves the task or not. All training samples are sampled from the positive set with probability $\Omega$ and from the negative set with probability $1 - \Omega$ . This balanced sampling strategy prevents models from getting stuck at sub-optimal solutions. Algorithm 1 illustrates the pseudo-code of the curriculum learning guided by exams and fails.
432
+
433
+ The evaluation process (“exam”) randomly samples examples from 3 recent lessons. The agent goes through these examples and gets the success rate (the ratio of achieving the task) as its performance, which is used to decide whether the agent passes the exam by comparing to a lesson-depend threshold. As we want a perfect model, the threshold for passing the last lesson (the “final exam”) is $100 \%$ . We linearly decrease the threshold by $0 . 5 \%$ for each former lessons, to prevent over-fitting(e.g., the threshold of the first lesson in the blocks world is $9 5 \%$ ). After the “exam”, the examples are collected into positive and negative pools according to the outcome (success or not). During the training, we use balanced sampling for choosing training instances from positive and negative pools with probability $\Omega$ from positive. The hyper-parameters $\Omega$ , the number of epochs, the number of episodes in each training epoch and the number of episodes in one evaluation are shown in Table 3 for three RL tasks.
434
+
435
+ # B IMPLEMENTATION DETAILS AND HYPER-PARAMETERS
436
+
437
+ This section provides more implementation details for the model and experiments, and summarizes the hyper-parameters used in experiments for our NLM and the baseline algorithm MemNN.
438
+
439
+ # B.1 RESIDUAL CONNECTION.
440
+
441
+ Analog to the residual link in (He et al., 2016; Huang et al., 2017), we add residual connections to our model. Specifically, for each layer illustrated in Figure 2, the base predicates (inputs) are
442
+
443
+ concatenated to the conclusive predicates (outputs) group-wisely. That is, input unary predicates are concatenated to the deduced unary predicates while input binary predicates are concatenated to the conclusive binary predicates.
444
+
445
+ # B.2 HYPER-PARAMETERS FOR NLM
446
+
447
+ Table 4 shows hyper-parameters used by NLM for different tasks. For all MLPs inside NLMs, we use no hidden layer, and the hidden dimension (i.e., the number of intermediate predicates) of each layer is set to 8 across all our experiments. In supervised learning tasks, a model is called “graduated” if its training loss is below a threshold depending on the task (usually 1e-6). In reinforcement learning tasks, an agent is called “graduated” if it can pass the final exam, i.e., get $100 \%$ success rate on the evaluation process of the last lesson.
448
+
449
+ We note that in the randomly generated cases, the number of maternal great uncle (IsMGUncle) relation is relatively small. This makes the learning of this relation hard and results in a graduation ratio of only $20 \%$ . If we increase the maximum number of people in training examples to 30, the graduation ratio will grow to $50 \%$ .
450
+
451
+ Table 4: Hyper-parameters for Neural Logic Machines. The definition of depth and breadth are illustrated in Figure 2. “Res.” refers to the use of residual links. “Grad.” refers to the ratio of successful graduation in 10 runs with different random seeds, which partially indicates the difficulty of the task. “Num. Examples/Episodes” means the maximum number of examples/episodes used to train the model in supervised learning and reinforcement learning cases.
452
+
453
+ <table><tr><td colspan="2">Tasks</td><td>Depth</td><td>Breath</td><td>Res.</td><td>Grad.</td><td>Num. Examples/Episodes</td></tr><tr><td rowspan="5">Family Tree</td><td>HasFather</td><td>4</td><td>3</td><td>×</td><td>100%</td><td>50,000 examples</td></tr><tr><td>HasSister</td><td>4</td><td>3</td><td>×</td><td>100%</td><td>50,000 examples</td></tr><tr><td>IsGrandparent</td><td>4</td><td>3</td><td>×</td><td>100%</td><td>100,000 examples</td></tr><tr><td>IsUncle</td><td>4</td><td>3</td><td>×</td><td>90%</td><td>100,000 examples</td></tr><tr><td>IsMGUncle</td><td>4</td><td>3</td><td>×</td><td>20%</td><td>200,000 examples</td></tr><tr><td rowspan="5">General Graph</td><td>AdajacentToRed</td><td>4</td><td>3</td><td>×</td><td>90%</td><td>100,000 examples</td></tr><tr><td>4-Connectivity</td><td>4</td><td>3</td><td>×</td><td>100%</td><td>50,000 examples</td></tr><tr><td>6-Connectivity</td><td>8</td><td>3</td><td>√</td><td>60%</td><td>50,000 examples</td></tr><tr><td>1-OutDegree</td><td>4</td><td>3</td><td>×</td><td>100%</td><td>50,000 examples</td></tr><tr><td>2-OutDegree</td><td>5</td><td>4</td><td>√</td><td>100%</td><td>100,000 examples</td></tr><tr><td rowspan="2">General Algorithm</td><td>Sorting</td><td>3</td><td>2</td><td>√</td><td>100%</td><td>1,000 episodes</td></tr><tr><td>Path</td><td>5</td><td>3</td><td>√</td><td>60%</td><td>24,000 episodes</td></tr><tr><td colspan="2">BlocksWorld</td><td>7</td><td>2</td><td>√</td><td>40%</td><td>50,000 episodes</td></tr></table>
454
+
455
+ # B.3 HYPER-PARAMETERS FOR MEMNN
456
+
457
+ We set the number of iters/episodes used for baseline algorithms to be same as NLM. For the memory networks, each pre-condition in the memory is embedded into a key space and a value space. The dimensions of the spaces are 16 and 32 respectively. The hidden size of the LSTM in MemNN is 64. The number of queries is set to be 4 across all tasks (except that the Sorting task uses 1 query only). Empirically, we search for the optimal hyper-parameters but find that they have little effect on the performance.
458
+
459
+ # B.4 DATA GENERATION
460
+
461
+ We use random generation to generate training and testing data. more details and specific parameters used to generate the data could be found in our open source code.
462
+
463
+ In family tree tasks, we mimic the process of families growing using a timeline. For each newly created person, we randomly sample the gender and parents (could be none, indicating not included in the family tree) of the person. We also maintain lists of singles of each gender, and randomly pick two from each list to be married (each time when a person was created). We randomly permute the order of people.
464
+
465
+ In general graph tasks (include Path), We adopt the generation method from Graves et al. (2016), which samples $m$ nodes on a unit square, and the out-degree $k _ { i }$ of each node is sampled. Then each node connects to $k _ { i }$ nearest nodes on the unit square. In undirected graph cases, all generated edges are regarded as undirected edges.
466
+
467
+ In Sorting, we randomly generate permutations to be sorted in ascending order.
468
+
469
+ In Blocks World, We maintain a list of placeable objects (the ground included). Each newly created block places on one randomly selected placeable object. Then we randomly shuffle the $i d$ of the blocks.
470
+
471
+ # B.5 BLOCKS WORLD
472
+
473
+ In the blocks world environment, to better aid the reinforcement learning process, we train the agent on an auxiliary task, which is to predict the validity or effect of the actions. This task is trained by supervised learning using cross-entropy loss. The overall loss is a summation of cross-entropy loss (with a weight of 0.1) and the REINFORCE loss.
474
+
475
+ We did not choose the Move to be taken directly based on the relational predicates at the last layer of NLM. Instead, we manually concatenate the object representation from the current and the target configuration, which share the same object ID. Then for each pair of objects, their relational representation is constructed by the concatenation of their own object representation. An extra fully-connected layer is applied to the relational representation, followed by a Softmax layer over all pairs of objects. We choose an action based on the Softmax score.
476
+
477
+ # B.6 ACCURACY DISCUSSION
478
+
479
+ We cannot directly prove the accuracy of NLM by looking at the induced rules as in traditional ILP systems. Alternatively, we take an empirical way to estimate its accuracy by sampling testing examples. Throughout the experiments section, all accuracy statistics are reported in 1000 random generated data.
480
+
481
+ To show the confidence of this result, we test a specific trained model of Blocks World task with 100,000 samples. We get no fail cases in the testing. According to the multiplicative form of Chernoff Bound 6, We are $9 9 . 7 \%$ confident that the accuracy is at least $9 9 . 9 8 \%$ .
482
+
483
+ # C NEURAL LOGIC MACHINES (NLM) EXTENSIONS
484
+
485
+ Reasoning over noisy input: integration with neural perception. Recall that NLM is fully differentiable. Besides taking logic pre-conditions (binary values) as input, the input properties or relations can be derived from other neural architectures (e.g., CNNs). As a preliminary example, we replace the input properties of nodes with images from the MNIST dataset. A convolutional neural network (CNN) is applied to the input extracting multiple features for future reasoning. CNN and NLM can be optimized jointly. This enables reasoning over noisy input.
486
+
487
+ We modify the AdjacentToRed task in general graph reasoning to AdjacentToNumber0. In detail, each node has a visual input from the MNIST dataset indicating its number. We say AdjacentToNumber $0 ( x )$ if and only if a node $x$ is adjacent to another node with number 0. We use LeNet LeCun et al. (1998) to extract visual features for recognizing the number of each node. The output of LeNet for each node is a vector of length 10, with sigmoid activation.
488
+
489
+ We follow the train-test split from the original MNIST dataset. The joint model is trained on 100,000 training examples $m = 1 0$ ) and gets $9 9 . 4 \%$ accuracy on 1000 testing examples $m = 5 0$ ). Note that the LeNet modules are optimized jointly with the reasoning about AdjacentToNumber0.
490
+
491
+ # D REALIZATION OF HORN CLAUSE
492
+
493
+ In this section, we show that NLM can realize a partial set of Horn clauses (Horn, 1951) in first-order logic $( F O L )$ , up to the limit of the NLM’s depth and breadth. In NLMs, we consider only finite cases. Thus, there should not exist cyclic references of predicates among rules. The extension to support cyclic references is left as a future work. Throughout the proof, we always assume the depth, breadth and number of predicates of NLM are flexible and large enough to realize the demanding rules.
494
+
495
+ Here, we only prove the realization of a definite clause, i.e., a Horn clause with exactly one positive literal and a non-zero number of negative literals in FOL 7. It can be written in the implication form is $\hat { p } p _ { 1 } \land p _ { 2 } \land \cdot \cdot \cdot \land p _ { k }$ (variables as arguments are implicitly universally quantified), where $\hat { p }$ is called the head predicate and $p _ { 1 } , \ldots , p _ { k }$ are called body predicates. We group the variables appearing in the rule into three subsets: (1) variables that only appear in the head predicate, (2) variables that appear in the body predicates, and (3) variables that appear in both head and body predicates.
496
+
497
+ Consider as an example a chain-like rule: $\forall x _ { 1 } \forall x _ { 2 } \forall x _ { 3 } \forall x _ { 4 } \ \hat { p } ( x _ { 1 } , x _ { 3 } , x _ { 4 } ) p _ { 1 } ( x _ { 1 } , x _ { 2 } ) \land p _ { 2 } ( x _ { 2 } , x _ { 3 } ) .$ We rewrite the rule by classifying the variables:
498
+
499
+ $$
500
+ \forall x _ { 4 } \Big ( \forall x _ { 1 } \forall x _ { 3 } ( \widehat { p } ( x _ { 1 } , x _ { 3 } , x _ { 4 } ) \exists x _ { 2 } p _ { 1 } ( x _ { 1 } , x _ { 2 } ) \land p _ { 2 } ( x _ { 2 } , x _ { 3 } ) ) \Big ) .
501
+ $$
502
+
503
+ That is, we move all variables that ony appear in body predicates to the right-hand side, and extract out all variables that only appear in the head predicate. We show how we can compositionally combines the computation units in NLMs to realize this rule, in the following 4 steps:
504
+
505
+ 1. We first align the arity of the body predicates to include all variables that appear in at least one of the body predicates (including variables of set 2 and set 3). This could be done by a sequence of Expand operations (Eq. 3). In this example, we will create helper predicates to make the right-hand side of the rule as
506
+
507
+ $$
508
+ \exists x _ { 2 } p _ { 1 } ^ { \prime } ( x _ { 1 } , x _ { 2 } , x _ { 3 } ) \land p _ { 2 } ^ { \prime } ( x _ { 2 } , x _ { 3 } , x _ { 1 } ) ,
509
+ $$
510
+
511
+ where $p _ { 1 } ^ { \prime } ( x _ { 1 } , x _ { 2 } , x _ { 3 } ) \triangleq p _ { 1 } ( x _ { 1 } , x _ { 2 } )$ and $\begin{array} { r } { p _ { 2 } ^ { \prime } ( x _ { 2 } , x _ { 3 } , x _ { 1 } ) \triangleq p _ { 2 } ( x _ { 2 } , x _ { 3 } ) . } \end{array}$ .
512
+
513
+ 2. We use neural boolean logic (Eq. 1) to realize the boolean formula inside all quantification symbols. Moreover, we use the Permute operation to transpose the tensor representation so that all variables being quantified on the right-hand side appear as the last several variables in the derived predicate $p ^ { \prime }$ . Overall, we will derive another helper predicates,
514
+
515
+ $$
516
+ p ^ { \prime } ( x _ { 1 } , x _ { 3 } , x _ { 2 } ) \triangleq p _ { 1 } ^ { \prime } ( x _ { 1 } , x _ { 2 } , x _ { 3 } ) \wedge p _ { 2 } ^ { \prime } ( x _ { 2 } , x _ { 3 } , x _ { 1 } ) ,
517
+ $$
518
+
519
+ 3. We use the Reduce operation to add quantifiers to the right-hand side (i.e., to the $p ^ { \prime }$ predicate). We will get:
520
+
521
+ $$
522
+ p ^ { \prime \prime } ( x _ { 1 } , x _ { 3 } ) \triangleq \exists x _ { 2 } p ^ { \prime } ( x _ { 1 } , x _ { 3 } , x _ { 2 } ) = \exists x _ { 2 } p _ { 1 } ^ { \prime } ( x _ { 1 } , x _ { 2 } , x _ { 3 } ) \land p _ { 2 } ^ { \prime } ( x _ { 2 } , x _ { 3 } , x _ { 1 } ) ,
523
+ $$
524
+
525
+ 4. Finally, we use the Expand operation (Eq. 3] to add variables that only appear in the head predicate to the derived predicate:
526
+
527
+ $$
528
+ \hat { p } ( x _ { 1 } , x _ { 3 } , x _ { 4 } ) \triangleq p ^ { \prime \prime } ( x _ { 1 } , x _ { 3 } ) .
529
+ $$
530
+
531
+ Note that, all variables appeared in the head predicate are implicitly universally quantified.
532
+ This is consistent with our setting, since all rules in NLMs are lifted.
533
+
534
+ Overall, a symbolic rule written as a Horn clause can be realized by NLMs as a computation flow which starts from multiple expansions followed by a neural boolean rule and multiple reductions, and ends with a set of expansions.
535
+
536
+ Next, we show that the forward propagation of NLMs realizes the forward chaining of a set of Horn clauses. Following the notation in Evans & Grefenstette (2018), the forward chaining starts from a set of initial facts, which are essentially the grounding of base predicates. The forward chaining process sequentially applies rules over the fact set, and concludes new facts. In NLM, we represent facts as the $\mathcal { U }$ -grounding of predicates.
537
+
538
+ If we consider a set of rules that does not have recursive references, all rules can be sorted in an topological order $\mathcal { R } = ( r _ { 1 } , r _ { 2 } , \ldots , r _ { k } )$ . We only allow references of $r _ { i }$ from $r _ { j }$ , where $i < j$ . Without loss of generality, we assume that the grounding of $r _ { k }$ is of interest. Given the topologically resolved set of rules $\mathcal { R }$ , we build a set of NLMs where each NLM realizes a specific rule $r _ { i }$ . By stacking the NLMs sequentially, we can conclude $r _ { k }$ . As a side note, for multiple rules referring to the same head predicate $\hat { p }$ , they implicitly indicate the logical disjunction $( \vee )$ of the rules. We can rename these head predicates as $\hat { p } _ { 1 } , \hat { p } _ { 2 } , \cdots$ , and use an extra NLM to implement the logical disjunction of all $\hat { p } _ { i }$ ’s.
539
+
540
+ # E SAMPLE BLOCKS WORLD RULES
541
+
542
+ This example shows a complex reasoning in the seemingly simple Blocks World domain, which can be solved by our NLMs but requires great efforts of create manual rules by human experts in contrast.
543
+
544
+ Suppose we are interested in knowing whether a block should be moved in order to reach the target configuration. Here, a block should be moved if (1) it is moveable; and (2) there is at least one block below it that does not match the target configuration. Call the desired predicate “ShouldMove $( \mathbf { x } ) ^ { \mathbf { \vec { \mu } } }$ .
545
+
546
+ Input Relations. (Specified in the last paragraph of Section 3.4) SameWorldID, SmallerWorldID, LargerWorldID; SameID, SmallerID, LargerID; Left, SameX, Right, Below, SameY, Above. The relations are given on all pairs of objects across both worlds.
547
+
548
+ Here is one way to produce the desired predicate by defining several helper predicates, designed by “human experts”:
549
+
550
+ 1. IsGround $( \mathbf { x } ) \forall$ y Above(y, x)
551
+ 2. SameXAbove $( \mathbf { x } , \mathbf { y } ) $ SameWorldID(x, y) ∧ SameX(x, y) ∧ Above(x, y)
552
+ 3. $\mathrm { C l e a r } ( \mathrm { x } ) \gets \forall \ \mathrm { y } \to \mathrm { S a m e X A b o v e } ( \mathrm { y } , \mathrm { x } )$
553
+ 4. Moveabl $: ( \mathrm { x ) C l e a r ( \mathrm { x ) \land \lnot I s G r o u n d ( \mathrm { x ) } } }$
554
+ 5. Initia $\mathrm { { 1 W o r l d ( x ) } \left. \forall \ y \right. S m a l l e r W o r l d I D ( y , x ) }$
555
+ 6. Match $( \mathbf { x } , \mathbf { y } ) \gets \neg$ SameWorldID(x, y) ∧ SameID(x, y) ∧ SameX(x, y) ∧ SameY(x, y)
556
+ 7. Matched $( \mathbf { x } ) \exists$ y Match(x, y)
557
+ 8. HaveUnmatchedBelow $( \mathbf { x } ) \exists$ y SameXAbove(x, y) ∧ ¬ Matched(y)
558
+ 9. ShouldMove $\mathbf { \boldsymbol { x } } ) \gets$ InitialWorld(x) $\wedge$ Moveable $\left( \mathbf { x } \right) \wedge$ HaveUnmatchedBelow(x)
559
+
560
+ We can also write the logic forms in one line: ShouldMove $\mathbf { \Phi } ( \mathbf { x } ) \gets ( \forall \mathbf { y } \to \mathbf { : }$ SmallerWorldID(y, x)) ∧ (∀ y $\neg$ (SameWorldID(y, x) $\wedge$ SameX(y, x) ∧ Above(y, x))) ∧ ¬ (∀ y Above(y, x)) $\wedge$ ((∃ y SameWorldID(x, $\mathrm { y ) } \wedge \mathrm { S a m e X ( x , y ) } \wedge \mathrm { A b o v e ( x , y ) } ) \wedge \neg ( \exists z \neg \mathrm { S a m }$ meWorldID(y, z) $\wedge$ SameID(y, z) $\wedge$ SameX(y, z) ∧ SameY(y, z)) ).
561
+
562
+ Note that this is only a part of logic rules needed to complete the Blocks World challenge. The learner also needs to figure out where should the block be moved onto. The proposed NLM can learn policies that solve the Blocks World from the sparse reward signal indicating only whether the agent has finished the game. More importantly, the learned policy generalizes well to larger instances (consisting more blocks).
563
+
564
+ # F IMPLEMENT NLM IN TENSORFLOW
565
+
566
+ The following python code contains a minimal implementation for one Neural Logic Machines layer with breadth equals 3 in TensorFlow. The neural_logic_layer_breath3 is the main function. The syntax is highlighted and is best viewed in color.
567
+
568
+ from itertools import permutations 2 import tensorflow as tf 3 from tensorflow.layers import dense 4 5 def expand(input, M): 6 """Expands input at its second last dimension (e.g., [B, ..., $\hookrightarrow$ Ni, Nj] to [B, ..., Ni, M, Nj]) by replicating tensors.""" ndims $=$ input.get_shape().ndims + 1 8 multiples $=$ [M if i $= =$ ndims - 2 else 1 for i in range(ndims)] 9 return tf.tile(tf.expand_dims(input, -2), multiples) 10 11 def reduce(input, M): 12 """Reduces max and min at the second last dimension, except for $\hookrightarrow$ diagonal elements.""" 13 mask $=$ _reduce_mask(input, M)[tf.newaxis, ..., tf.newaxis] 14 return tf.concat([ 15 tf.reduce_max(input $\star$ mask, -2), 16 tf.reduce_min(input $\star$ mask $^ +$ (1 - mask), -2) 17 ], -1) 18 19 def neural_logic(input, hidden_dim): 20 """An MLP layer applied on permutations of the input.""" 21 return dense(_input_permutations(input), hidden_dim, $\hookrightarrow$ activation ${ \bf \Phi } . = { \bf \Phi }$ tf.sigmoid) 22 23 def neural_logic_layer_breath3(input0, input1, input2, input3, M, hidden_dim, residual): 24 """A neural logic layer with breath 3. 25 Args: 26 input0: float Tensor of shape [B, hidden_dim], nullary $\hookrightarrow$ predicates. 27 input1: float Tensor of shape [B, M, hidden_dim], unary $\hookrightarrow$ predicates. 28 input2: float Tensor of shape [B, M, M, hidden_dim], binary $\hookrightarrow$ predicates. 29 input3: float Tensor of shape [B, M, M, M, hidden_dim], $\hookrightarrow$ tenary predicates. 30 M: int, number of objects. 31 hidden_dim: int, hidden dimension. 32 residual: boolean, use the residual link or not. 33 Returns: 34 4 float Tensors, output nullary, unary, binary tenary $\hookrightarrow$ predicates respectively. 35 """ 36 agg0 $=$ tf.concat([input0, reduce(input1, M)], -1) 37 agg1 $=$ tf.concat([input1, expand(input0, M), reduce(input2, ,→ M)], -1) 38 agg2 $=$ tf.concat([input2, expand(input1, M), reduce(input3, ,→ M)], -1) 39 agg3 $=$ tf.concat([input3, expand(input2, M)], -1) 40 outputs $=$ [neural_logic(x, hidden_dim) for x in [agg0, agg1, $\hookrightarrow$ agg2, agg3]] 41 if residual: 42 outputs $=$ [tf.concat([x, y], -1) for x, y in zip(outputs, $\hookrightarrow$ [input0, input1, input2, input3])] 43 return outputs 44 45 def _reduce_mask(input, M):
569
+
570
+ 46 dimension $=$ input.get_shape().ndims - 2
571
+ 47 base $=$ 1.0 - tf.eye(M)
572
+ 48 if dimension $< ~ 2$ : return tf.constant(1.0) # Identity.
573
+ 49 elif dimension $= = ~ 2$ : return base # Diagonal excluded.
574
+ 50 elif dimension $\ c = 3$ : return tf.expand_dims(base, 2) $\star$
575
+ $\hookrightarrow$ tf.expand_dims(base, 1) $\star$ tf.expand_dims(base, 0) # Mask
576
+ $\hookrightarrow$ out all tuples (x, y, z) that $\scriptstyle x \ = = \ y$ or $y \ = = \ z$ or $z \ \mathbf { \Sigma } = = \mathbf { \Sigma } \times \mathbf { \Sigma }$ .
577
+ 51 else: raise NotImplementedError()
578
+ 52
579
+ 53 def _input_permutations(input):
580
+ 54 dimension $=$ input.get_shape().ndims - 2
581
+ 55 if dimension $< ~ 2$ : return input
582
+ 56 else: return tf.concat([
583
+ 57 tf.transpose(input, [0] $^ +$ list(perm) $^ +$ [1 + dimension])
584
+ 58 for perm in permutations(range(1, 1 $^ +$ dimension))
585
+ 59 ], -1)
parse/train/B1xY-hRctX/B1xY-hRctX_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1xY-hRctX/B1xY-hRctX_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1xY-hRctX/B1xY-hRctX_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/FZ1oTwcXchK/FZ1oTwcXchK.md ADDED
@@ -0,0 +1,348 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # OPTIMAL CONVERSION OF CONVENTIONAL ARTIFICIAL NEURAL NETWORKS TO SPIKING NEURAL NETWORKS
2
+
3
+ Shikuang Deng1 & Shi $\mathbf { G } \mathbf { u } ^ { \mathrm { 1 } \boxtimes }$
4
+
5
+ School of Computer Science and Engineering University of Electronic Science and Technology of China dengsk119@std.uestc.edu.cn, gus@uestc.edu.cn
6
+
7
+ # ABSTRACT
8
+
9
+ Spiking neural networks (SNNs) are biology-inspired artificial neural networks (ANNs) that comprise of spiking neurons to process asynchronous discrete signals. While more efficient in power consumption and inference speed on the neuromorphic hardware, SNNs are usually difficult to train directly from scratch with spikes due to the discreteness. As an alternative, many efforts have been devoted to converting conventional ANNs into SNNs by copying the weights from ANNs and adjusting the spiking threshold potential of neurons in SNNs. Researchers have designed new SNN architectures and conversion algorithms to diminish the conversion error. However, an effective conversion should address the difference between the SNN and ANN architectures with an efficient approximation of the loss function, which is missing in the field. In this work, we analyze the conversion error by recursive reduction to layer-wise summation and propose a novel strategic pipeline that transfers the weights to the target SNN by combining threshold balance and soft-reset mechanisms. This pipeline enables almost no accuracy loss between the converted SNNs and conventional ANNs with only $\sim 1 / 1 0$ of the typical SNN simulation time. Our method is promising to get implanted onto embedded platforms with better support of SNNs with limited energy and memory. Codes are available at https://github.com/Jackn0/snn optimal conversion pipeline.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ Spiking neural networks (SNNs) are proposed to imitate the biological neural networks (Hodgkin & Huxley, 1952a; McCulloch & Pitts, 1943) with artificial neural models that simulate biological neuron activity, such as Hodgkin-Huxley (Hodgkin & Huxley, 1952b), Izhikevich (Izhikevich, 2003), and Resonate-and-Fire (Izhikevich, 2001) models. The most widely used neuron model for SNN is the Integrate-and-Fire (IF) model (Barbi et al., 2003; Liu & Wang, 2001), where a neuron in the network emits a spike only when the accumulated input exceeds the threshold voltage. This setting makes SNNs more similar to biological neural networks.
14
+
15
+ The past two decades have witnessed the success of conventional artificial neural networks (named as ANNs for the ease of comparison with SNNs), especially with the development of convolutional neural networks including AlexNet (Krizhevsky et al., 2012), VGG (Simonyan & Zisserman, 2014) and ResNet (He et al., 2016). However, this success highly depends on the digital transmission of information in high precision and requires a large amount of energy and memory. So the traditional ANNs are infeasible to deploy onto embedded platforms with limited energy and memory.Distinct from conventional ANNs, SNNs are event-driven with spiking signals, thus more efficient in the energy and memory consumption on embedded platforms (Roy et al., 2019). By far, SNNs have been implemented for image (Acciarito et al., 2017; Diehl & Cook, 2014; Yousefzadeh et al., 2017) and voice (Pei et al., 2019) recognition.
16
+
17
+ Although potentially more efficient, current SNNs have their own intrinsic disadvantages in training due to the discontinuity of spikes. Two promising methods of supervised learning are backpropagation with surrogate gradient and weight conversion from ANNs. The first routine implants ANNs onto SNN platforms by realizing the surrogate gradient with the customized activation function (Wu et al., 2018). This method can train SNNs with close or even better performance than the conventional ANNs on some small and moderate datasets (Shrestha & Orchard, 2018; Wu et al., 2019; Zhang & Li, 2020; Thiele et al., 2019). However, the training procedure requires a lot of time and memory and suffers from the difficulty in convergence for large networks such as VGG and ResNet. The second routine is to convert ANNs to SNNs by co-training a source ANN for the target SNN that adopts the IF model and soft-reset mechanism (Rueckauer et al., 2016; Han et al., 2020). When a neuron spikes, its membrane potential will decrease by the amount of threshold voltage instead of turning into the resting potential of a fixed value. A limitation of this mechanism is that it discretizes the numerical input information equally for the neurons on the same layer ignorant of the variation in activation frequencies for different neurons. As a consequence, some neurons are difficult to transmit information with short simulation sequences. Thus the converted SNNs usually require huge simulation length to achieve high accuracy (Deng et al., 2020) due to the trade-off between simulation length and accuracy (Rueckauer et al., 2017). This dilemma can be partially relieved by applying the threshold balance on the channel level Kim et al. (2019) and adjusting threshold values according to the input and output frequencies (Han et al., 2020; Han & Roy, 2020). However, as far as we know, it remains unclear how the gap between ANN and SNN formulates and how the simulation length and voltage threshold affect the conversion loss from layers to the whole network. In addition, the accuracy of converted SNN is not satisfactory when the simulation length is as short as tens.
18
+
19
+ Compared to the previous methods that focus on either optimizing the conversion process or modifying the SNN structures, we theoretically analyze the conversion error from the perspective of activation values and propose a conversion strategy that directly modifies the ReLU activation function in the source ANN to approximate the spiking frequency in the target SNN based on the constructed error form. Our main contributions are summarized as follows:
20
+
21
+ • We theoretically analyze the conversion procedure and derive the conversion loss that can be optimized layer-wisely.
22
+ • We propose a conversion algorithm that effectively controls the difference of activation values between the source ANN and the target SNN with a much shorter simulation length than existing works.
23
+ • We both theoretically and experimentally demonstrate the effectiveness of the proposed algorithm and discuss its potential extension to other problems.
24
+
25
+ # 2 PRELIMINARIES
26
+
27
+ Our conversion pipeline exploits the threshold balancing mechanism (Diehl et al., 2015; Sengupta et al., 2018) between ANN and SNN with modified ReLU function on the source ANN to reduce the consequential conversion error (Fig.1 A). The modification on regular ReLU function consists of thresholding the maximum activation and shifting the turning point. The thresholding operation suppresses the excessive activation values so that all neurons could be activated within a shorter simulation time. The shift operation compensates the deficit of the output frequency caused by the floor rounding when converting activation values to output frequencies.
28
+
29
+ We here introduce common notations used in the current paper. Since the infrastructures of the source ANN and target SNN are the same, we use the same notation when it is unambiguous. For the $l$ -th layer, we denote $W _ { l }$ as the weight matrix. The threshold on activation value added to the ReLU function in the source ANN is $y _ { t h }$ and the threshold voltage of the spiking function in the target SNN is $V _ { t h }$ . The SNN is simulated in $T$ time points, where ${ \pmb v } ^ { l } ( t ) = \{ v _ { i } ^ { l } ( \overline { { t } } ) \}$ is the vector collecting membrane potentials of neurons at time $t$ , and $\pmb { \theta } ^ { l } = \{ \theta _ { i } ^ { l } ( t ) \}$ records the output to the next layer, i.e the post synaptic potential (PSP) released by $l$ -th layer to the $( l + 1 )$ -th layer. Suppose that within the whole simulation time $T$ , the $l$ -th layer receives an average input $\mathbf { \alpha } _ { \mathbf { \alpha } } \mathbf { \alpha } _ { \mathbf { \beta } } \mathbf { \alpha } _ { \mathbf { \alpha } } \mathbf { \alpha } _ { \mathbf { \beta } } \mathbf { \alpha } _ { \mathbf { \alpha } } \mathbf { \alpha } _ { \mathbf { \beta } } \mathrm { ~ \textem ~ } \mathbf { \alpha } _ { \mathbf { \beta } } \mathrm { ~ \textem ~ } \mathbf { \alpha } _ { \mathbf { \beta } }$ and an average PSP $\pmb { a } _ { l } ^ { \prime }$ from the $( l - 1 )$ -th layer corresponding to the source ANN and target SNN, the forward process
30
+
31
+ can be described by
32
+
33
+ $$
34
+ \begin{array} { l } { { \pmb { a } _ { l + 1 } = h ( { \cal W } _ { l } \cdot { \pmb { a } _ { l } } ) , } } \\ { { \pmb { a } _ { l + 1 } ^ { \prime } = h ^ { \prime } ( { \cal W } _ { l } \cdot { \pmb { a } _ { l } ^ { \prime } } ) , } } \end{array}
35
+ $$
36
+
37
+ where $h _ { l } ( \cdot )$ and $h _ { l } ^ { \prime } ( \cdot )$ denote the activation function for the source ANN and target SNN on the average sense respectively. For the source ANN, the activation function $h ( \cdot )$ is identical to the activation function for the single input, which is the threshold ReLU function in this work, i.e.
38
+
39
+ $$
40
+ h ( x ) = { \left\{ \begin{array} { l l } { 0 , } & { { \mathrm { i f ~ } } x \leq 0 ; } \\ { x , } & { { \mathrm { i f ~ } } 0 < x < y _ { t h } ; } \\ { y _ { t h } , } & { { \mathrm { i f ~ } } x \geq y _ { t h } , } \end{array} \right. }
41
+ $$
42
+
43
+ where $y _ { t h }$ is the threshold value added to the regular ReLU function. For the target SNN, the activation function $h ^ { \prime } ( \cdot )$ will be derived in the following section.
44
+
45
+ ![](images/253e7e16f8097b10861bb57e466be1f8f4e85bed1e5d2899a856a86e07a74b82.jpg)
46
+ Figure 1: Schematics on the conversion pipeline. (A) The SNN propagates spiking frequencies with the activation sequence $\pmb { x } _ { l } ^ { \prime } = \{ \pmb { x } _ { l } ^ { \prime } ( 1 ) , . . . , \pmb { x } _ { l } ^ { \prime } ( T ) \}$ and averaged output $\pmb { a } _ { l } ^ { \prime }$ for $l = 1 , . . . , L$ through $L$ layers. (B) Activation functions of regular and threshold ReLUs for ANNs, and the step function for SNNs. (C) The error between ReLU and step function with $V _ { t h } / 2 T$ shift. See Section 5 for the detailed discussion.
47
+
48
+ In the following sections, we first derive the equations for weight transform from the source ANN to target SNN. Next, we prove that the overall conversion error can be decomposed to the summation of error between source activation value and target output frequency on each layer. Finally, we estimate an optimal shift value for each layer based on the threshold balancing mechanism (Diehl et al., 2015; Sengupta et al., 2018) and formulate the overall conversion error. Putting these three parts together, we demonstrate both that our approach almost achieves the optimal solution when converting ReLU-based ANNs to spike-based SNNs.
49
+
50
+ # 3 CONVERSION EQUATION FROM ANN TO SNN
51
+
52
+ Following the threshold balancing mechanism (Diehl et al., 2015; Sengupta et al., 2018) that copies the weight from the source ANN to the target SNN, we here derive the forward propagation of PSP through layers in the target SNN. For the $l$ -th layer in the SNN, suppose it receives its $( t + 1 )$ -th input $\pmb { x } _ { l } ^ { \prime } ( t + 1 )$ at time point $t + 1$ . Then there will be an additional membrane potential $W _ { l } \cdot { \pmb x } _ { l } ^ { \prime } ( t + 1 ) + { \pmb b } _ { l } ^ { \prime }$ added to its membrane potential ${ \mathbf { } } v ^ { l } ( t )$ at time point $t$ , resulting in a temporal potential
53
+
54
+ $$
55
+ \begin{array} { r } { { \pmb v } _ { t e m p } ^ { l } ( t + 1 ) = { \pmb v } ^ { l } ( t ) + W _ { l } \cdot { \pmb x } _ { l } ^ { \prime } ( t + 1 ) . } \end{array}
56
+ $$
57
+
58
+ If any element in $\pmb { v } _ { t e m p } ^ { l } ( t + 1 )$ exceeds $V _ { t h }$ , it would release a spike with potential $V _ { t h }$ , decrease its membrane potential by $V _ { t h }$ and update the membrane potential to ${ \pmb v } ^ { l } ( t + 1 )$ at time point $t + 1$ . Thus we can write the membrane potential update rule as:
59
+
60
+ $$
61
+ \pmb { v } ^ { l } ( t + 1 ) = \pmb { v } ^ { l } ( t ) + W _ { l } \cdot \pmb { x } _ { l } ^ { \prime } ( t + 1 ) - \pmb { \theta } ^ { l } ( t + 1 ) ,
62
+ $$
63
+
64
+ where $\pmb { \theta } ^ { l } ( t + 1 )$ equals $V _ { t h }$ to release PSP to the next layer if $v _ { t e m p } ^ { l } ( t + 1 ) \geq V _ { t h }$ and remain as 0 if $v _ { t e m p } ^ { l } ( t + 1 ) < V _ { t h }$ . We accumulate the Eqn.4 from time 1 to $T$ , divide both sides of the equation by $T$ , and have
65
+
66
+ $$
67
+ \frac { \boldsymbol { v } ^ { l } ( T ) } { T } = \frac { \boldsymbol { v } ^ { l } ( 0 ) } { T } + \boldsymbol { W } _ { l } \cdot \sum _ { t = 1 } ^ { T } \frac { \boldsymbol { x } _ { l } ^ { \prime } ( t ) } { T } - \sum _ { t = 1 } ^ { T } \frac { \boldsymbol { \theta } ^ { l } ( t ) } { T } .
68
+ $$
69
+
70
+ We use $\begin{array} { r } { \mathbf { a } _ { l } ^ { \prime } = \sum _ { t = 1 } ^ { T } \mathbf { x } _ { l } ^ { \prime } ( t ) / T } \end{array}$ to denote the averaged input to the $l$ -th layer. Then Eqn5 gives that the input to the $( l + 1 )$ -th layer equals the expected PSP of the $l$ -th layer, i.e. $\begin{array} { r } { \pmb { a } ^ { \prime } _ { l + 1 } = \sum _ { t = 1 } ^ { T } \pmb { \theta } ^ { l } ( t ) / T } \end{array}$ . If we set the initial membrane potential ${ \pmb v } ^ { l } ( 0 )$ as zero, we can reformulate the Eqn.5 as:
71
+
72
+ $$
73
+ \mathbf { } \pmb { a } _ { l + 1 } ^ { \prime } = W _ { l } \cdot \pmb { a } _ { l } ^ { \prime } - \frac { \pmb { v } ^ { l } ( T ) } { T } .
74
+ $$
75
+
76
+ When the threshold potential $V _ { t h }$ is set greater than the maximum of the source ANN’s activation values, the remained potential ${ \pmb v } ^ { l } ( T )$ would be less than $V _ { t h }$ thus would not be output finally. With the clip-operation, the output then can be expressed as
77
+
78
+ $$
79
+ a _ { l + 1 } ^ { \prime } : = h ^ { \prime } ( W _ { l } \cdot a _ { l } ^ { \prime } ) = \frac { V _ { t h } } { T } \cdot \mathrm { c l i p } \left( \left\lfloor \frac { W _ { l } \cdot a _ { l } ^ { \prime } } { V _ { t h } / T } \right\rfloor , 0 , T \right) ,
80
+ $$
81
+
82
+ where $\mathrm { c l i p } ( x , 0 , T ) = 0$ when $x \leq 0$ ; $\mathrm { c l i p } ( x , 0 , T ) = x$ when $0 < x < T$ ; and $\mathrm { c l i p } ( x , 0 , T ) = T$ when $x \ge T$ . So the output function of SNN is actually a step function (see the blue curve in Fig.1 B). The clipping by Eqn.7 is accurate in most cases but can be slightly different from Eqn.6 when the summation of membrane potential cancel between the positive and negative parts while the positive parts get spiked along the sequence. The forward equation for ANN is shown as the green line in Fig.1 B. Since the SNN output is discrete and in the form of floor rounding while the ANN output is continuous, there actually would be an intrinsic difference in $\pmb { a } _ { l + 1 } ^ { \prime }$ and $\mathbf { \pmb { a } } _ { l + 1 }$ as shown in Fig.1 B,C even if we equalize $\pmb { a } _ { l } ^ { \prime }$ and $\mathbf { \alpha } _ { \mathbf { \alpha } } \mathbf { \alpha } _ { \mathbf { \beta } } \mathbf { \alpha } _ { \mathbf { \alpha } } \mathbf { \alpha } _ { \mathbf { \beta } } \mathbf { \alpha } _ { \mathbf { \beta } } \mathbf { \alpha } _ { \mathbf { \beta } } \mathrm { ~ \textem ~ } \mathbf { \alpha } _ { \mathbf { \beta } } \mathrm { ~ \textem ~ } \mathbf { \alpha } _ { \mathbf { \beta } } \mathrm { ~ \textem ~ } \mathbf { \alpha } _ { \mathbf { \beta } }$ . We will analyze how to minimize this difference later.
83
+
84
+ # 4 DECOMPOSITION OF CONVERSION ERROR
85
+
86
+ The performance of the converted SNN is determined by the source ANN performance and the conversion error. While the former one is isolated from the conversion, we discuss how to optimize the latter one here. The loss function $\mathcal { L }$ can also be viewed as a function of the last layer output thus the conversion error can be formulated as
87
+
88
+ $$
89
+ \Delta \mathcal { L } : = \mathbb { E } [ \mathcal { L } ( \mathbf { \boldsymbol { a } } _ { L } ^ { \prime } ) ] - \mathbb { E } [ \mathcal { L } ( \mathbf { \boldsymbol { a } } _ { L } ) ] ,
90
+ $$
91
+
92
+ where the expectation is taken over the sample space. For the $l$ -th layer in the SNN, we can reversely approximate its output with the source ANN’s activation function $h ( \cdot )$ and get
93
+
94
+ $$
95
+ \begin{array} { r } { \pmb { a } _ { l } ^ { \prime } = h _ { l } ^ { \prime } ( W _ { l } \cdot \pmb { a } _ { l - 1 } ^ { \prime } ) = h _ { l } ( W _ { l } \cdot \pmb { a } _ { l - 1 } ^ { \prime } ) + \Delta \pmb { a } _ { l } ^ { \prime } , } \end{array}
96
+ $$
97
+
98
+ where $\Delta { { a } _ { l } } ^ { \prime }$ is the error caused by the difference between the activation functions of the ANN and SNN. The total output error $\Delta a _ { l }$ between the source ANN and target SNN on the $l$ -th layer, i.e. the difference between the activation $\mathbf { \alpha } _ { \pmb { a } _ { l } }$ and $\pmb { a } _ { l } ^ { \prime }$ can be approximated as
99
+
100
+ $$
101
+ \Delta \boldsymbol { a } _ { l } : = \boldsymbol { a } _ { l } ^ { \prime } - \boldsymbol { a } _ { l } = \Delta \boldsymbol { a } _ { l } ^ { \prime } + \left[ h _ { l } ( \boldsymbol { W } _ { l } \cdot \boldsymbol { a } _ { l - 1 } ^ { \prime } ) - h _ { l } ( \boldsymbol { W } _ { l } \cdot \boldsymbol { a } _ { l - 1 } ) \right] \approx \Delta \boldsymbol { a } _ { l } ^ { \prime } + \boldsymbol { B } _ { l } \cdot \boldsymbol { W } _ { l } \cdot \Delta \boldsymbol { a } _ { l - 1 } ,
102
+ $$
103
+
104
+ where the last approximation is given by the first order Taylor’s expansion, and $B _ { l }$ is the matrix with the first derivatives of $h _ { l }$ on the diagonal. Expand the loss function in Eqn.8 around $a _ { L }$ , we get
105
+
106
+ $$
107
+ \Delta \mathcal { L } \approx \mathbb { E } \left[ \nabla _ { a _ { L } } \mathcal { L } \cdot \Delta { \boldsymbol { a } } _ { L } \right] + \frac { 1 } { 2 } \mathbb { E } \left[ { \Delta \boldsymbol { a } } _ { L } { } ^ { T } H _ { a _ { L } } { \Delta \boldsymbol { a } } _ { L } \right] ,
108
+ $$
109
+
110
+ where the last approximation is given by the 2-order Taylor’s expansion, and $H _ { a _ { L } }$ is the Hessian of $\mathcal { L }$ w.r.t $a _ { L }$ . As $\mathcal { L }$ is optimized on the source ANN, we can ignore the first term here. Thus it suffices to find $\Delta a _ { L }$ to minimize the second term. By substituting Eqn. 10 into Eqn11, we further have
111
+
112
+ $$
113
+ \begin{array} { r l } & { \mathbb { E } [ { \Delta a _ { L } } ^ { T } H _ { a _ { L } } { \Delta a _ { L } } ] = \mathbb { E } [ { \Delta a _ { L } } ^ { \prime T } H _ { a _ { L } } { \Delta a _ { L } ^ { \prime } } ] + \mathbb { E } [ { \Delta a _ { L - 1 } } ^ { T } B _ { L } W _ { L } ^ { T } H _ { a _ { L } } W _ { L } B _ { L } { \Delta a _ { L - 1 } } ] } \\ & { \qquad + 2 \mathbb { E } [ { \Delta a _ { L - 1 } } ^ { T } B _ { L } W _ { L } ^ { T } H _ { a _ { L } } { \Delta a _ { L } ^ { \prime } } ] , } \end{array}
114
+ $$
115
+
116
+ where the interaction term can either be ignored by decoupling assumption as in (Nagel et al., 2020) or dominated by the sum of the other two terms by Cauchy’s inequality. Applying similar derivation as in (Botev et al., 2017), we have $H _ { { \pmb a } _ { l - 1 } } = B _ { l } \dot { W _ { l } ^ { T } } H _ { { \pmb a } _ { l } } \dot { W _ { l } } B _ { l }$ . Then Eqn.12 can reduce to
117
+
118
+ $$
119
+ \begin{array} { r l } & { \mathbb { E } [ { \Delta a _ { L } } ^ { T } H _ { a _ { L } } { \Delta a _ { L } } ] \approx \mathbb { E } [ { \Delta a _ { L } } ^ { \prime T } H _ { a _ { L } } { \Delta a _ { L } ^ { \prime } } ] + \mathbb { E } [ { \Delta a _ { L - 1 } } ^ { T } H _ { a _ { L - 1 } } { \Delta a _ { L - 1 } } ] } \\ & { \qquad = \displaystyle \sum _ { l } \mathbb { E } [ { \Delta a _ { l } } ^ { \prime T } H _ { a _ { l } } { \Delta a _ { l } ^ { \prime } } ] . } \end{array}
120
+ $$
121
+
122
+ Here the term $H _ { a _ { l } }$ can either be approximated with the Fisher Information Matrix (Liang et al., 2019) or similarly assumed as a constant as in (Nagel et al., 2020). For simplicity, we take it as a constant and problem of minimizing the conversion error then reduce to the problem of minimizing the difference of activation values for each layer.
123
+
124
+ # 5 LAYER-WISE AND TOTAL CONVERSION ERROR
125
+
126
+ In the previous section, we analyze that minimizing the conversion error is equivalent to minimizing output errors caused by different activation functions of the ANN and SNN on each layer. Here we further analyze how to modify the activation function so that the layer-wise error can be minimized.
127
+
128
+ First, we consider two extreme cases where (1) the threshold $V _ { t h }$ is so large that the simulation time $T$ is not long enough for the neurons to fire a spike or (2) the threshold $V _ { t h }$ is so small that the neuron spikes every time and accumulates very large membrane potential after simulation (upper bound of Eqn.7). For these two cases, the remaining potential contains most of the information from ANN and it is almost impossible to convert from the source ANN to the target SNN. To eliminate these two cases, we apply the threshold ReLU instead of the regular ReLU and set the threshold voltage $V _ { t h }$ in the SNN as the threshold $y _ { t h }$ for ReLU in the ANN.
129
+
130
+ Next, we further consider how to minimize the layer-wise squared difference $\begin{array} { r l } { \mathbb { E } | | \Delta \pmb { a } _ { l } ^ { \prime } | | ^ { 2 } } & { { } = } \end{array}$ $\mathbb { E } | | h _ { l } ^ { \prime } ( W \mathbf { a } _ { l - 1 } ^ { \prime } ) - h _ { l } ( W \mathbf { a } _ { l - 1 } ^ { \prime } ) | | ^ { 2 }$ . For the case of using threshold ReLU for $h _ { l }$ , the curve of $h _ { l }$ and $h _ { l } ^ { \prime }$ are shown in Fig.1 B with their difference in Fig.1 C. We can see that when the input is equal, $h _ { l }$ and $h _ { l } ^ { \prime }$ actually have a systematic bias that can be further optimized by either shifting $h _ { l }$ or $h _ { l } ^ { \prime }$ . Suppose that we fix $h _ { l } ^ { \prime }$ and shift $h _ { l }$ by $\delta$ , the expected squared difference would be
131
+
132
+ $$
133
+ \mathbb { E } _ { z } [ h _ { l } ^ { \prime } ( z - \delta ) - h _ { l } ( z ) ] ^ { 2 } .
134
+ $$
135
+
136
+ If we assume that $\pmb { z } = W \pmb { a } _ { l - 1 } ^ { \prime }$ is uniformly distributed within intervals $[ ( t - 1 ) V _ { t h } / T , t V _ { t h } / T ]$ for $t = 1 , . . . , T$ , optimization of the loss in Eqn.14 can then approximately be reduced to
137
+
138
+ $$
139
+ \arg \operatorname* { m i n } _ { \delta } \frac { T } { 2 } \cdot \left[ \left( \frac { V _ { t h } } { T } - \delta \right) ^ { 2 } + \delta ^ { 2 } \right] \Rightarrow \delta = \frac { V _ { t h } } { 2 T } .
140
+ $$
141
+
142
+ Thus the total conversion error can be approximately estimated as
143
+
144
+ $$
145
+ \Delta \mathcal { L } _ { \operatorname* { m i n } } \approx \frac { L V _ { t h } ^ { 2 } } { 4 T } ,
146
+ $$
147
+
148
+ which explicitly indicates how the low threshold value and long simulation time decrease the conversion error. In practice, the optimal shift may be different from $V _ { t h } / 2 T$ . As we illustrate above, the effect of shift is to minimize the difference between the output of the source ANN and the target SNN rather than optimizing the accuracy of SNN directly. Thus the optimal shift is affected by both the distribution of activation values and the level of overfitting in the source ANN and target SNN.
149
+
150
+ The conversion pipeline is summarized in Algorithm 1 where the source ANN is pre-trained with threshold ReLU. The threshold voltage $V _ { t h }$ can also be calculated along the training procedure.
151
+
152
+ # 6 RELATED WORK
153
+
154
+ Cao et al. (2015) first propose to convert ANNs with the ReLU activation function to SNNs. This work achieves good results on simple datasets but can not scale to large networks on complex data sets. Following Cao et al. (2015), the weight-normalization method is proposed to convert a
155
+
156
+ Algorithm 1 Conversion from the Source ANN to the Target SNN with Shared Weights
157
+ Require: Pre-trained source ANN, training set, target SNN’s simulation length $T$ .
158
+ Ensure: The converted SNN approximates the performance of source ANN with an ignorable error. 1: Initial $V _ { t h } ^ { l } = 0$ , for $l = 1 , \cdots , L$ to save the threshold value for each SNN layer.
159
+ 2: for $s = 1$ to $\#$ of samples do
160
+ 3: $\mathbf { a } _ { l } \gets$ layer-wise activation value
161
+ 4: 5: for $l = 1$ $L$
162
+ $V _ { t h } ^ { l } = \operatorname* { m a x } [ V _ { t h } ^ { l } , \operatorname* { m a x } ( { \bf a } _ { l } ) ]$
163
+ 6: end for
164
+ 7: end for
165
+ 8: for 9: $l = 1$ to lay $L$ d[l].
166
+ $. V _ { t h } V _ { t h } ^ { l }$
167
+ 10: SNN.layer $[ l ]$ .weight $\gets$ ANN.layer[l].weight
168
+ 11: SNN.layer[l].bias ANN.layer[l].bias $+ \overline { { V } } _ { t h } ^ { l } / 2 T$
169
+ 12: end for
170
+
171
+ three-layer CNN structure without bias to SNN (Diehl et al., 2015; 2016). The spike subtraction mechanism (Rueckauer et al., 2016), also called soft-reset (Han et al., 2020), is proposed to eliminate the information loss caused by potential resetting. More recently, Sengupta et al. (2018) use SPiKE-NORM to obtain deep SNNs like VGG-16 and ResNet-20, and Kim et al. (2019) utilize SNN for object recognition.
172
+
173
+ The most commonly used conversion method is threshold balancing (Sengupta et al., 2018), which is equivalent to weight normalization (Diehl et al., 2015; Rueckauer et al., 2016). The neurons in the source ANN are directly converted into those in the target SNN without changing their weights and biases. The threshold voltage of each layer in the target SNN is the maximum output of the corresponding layers in the source ANN. The soft reset mechanism (Rueckauer et al., 2017; Han et al., 2020) is effective in reducing the information loss by replacing the reset potential $V _ { r e s t }$ in the hard reset mechanism with the difference between membrane potential $V$ and threshold voltage $V _ { t h }$ so that the remaining potential is still informative of the activation values. Another big issue for the direct conversion is the varied range of activation for different neurons, which results in a very long simulation time to activate those neurons with high activation threshold values. Rueckauer et al. (2017) suggests using the $p$ -th largest outputs instead of the largest one as the weights normalization scale to shrink the ranges. Kim et al. (2019) applies threshold-balance on the channel level rather than the layer level for better adaption. Rathi et al. (2019) initializes the converted SNNs with roughly trained ANNs to shorten simulation length by further fine-training the SNN with STDP and backpropagation. Han et al. (2020), Han & Roy (2020) adjust the threshold and weight scaling factor adapted to the input and output spike frequencies.
174
+
175
+ # 7 EXPERIMENTS
176
+
177
+ In this section, we validate our derivation above and compare our methods with existing approaches via converting CIFAR-Net, VGG-16, and ResNet-20 on CIFAR-10, CIFAR-100, and ImageNet. See Appendix A.1 for the details of the network infrastructure and training parameters.
178
+
179
+ # 7.1 ANN PERFORMANCE WITH THRESHOLD RELU
180
+
181
+ We first evaluate the impact of modifying ReLU on the source ANN from the perspective of maximum activation value distribution and classification accuracy. A smaller range of activation values will benefit the conversion and but may potentially result in lower representativity for the ANN.
182
+
183
+ We set the threshold value $y _ { t h } = 1$ on CIFAR-10, $y _ { t h } = 2$ on CIFAR-100 and examine the impact of threshold on the distribution of activation values. From Fig.2A, we can see that the threshold operation significantly reduces the variation of maximum activation values across layers and the shift-operation won’t cause any additional impact significantly. This suggests that with the modified ReLU, the threshold voltage $V _ { t h }$ of spiking could be more effective to activate different layers. We next look into the classification accuracy when modifying the ReLU with threshold and shift. Comparisons on CIFAR-10 and CIFAR-100 are shown in Fig.2B. On the CIFAR-10, the performance of networks with modified ReLU actually get enhanced for all three infrastructures $( + 0 . 1 8 \%$ on CIFAR-Net, $+ 0 . 2 6 \%$ on VGG-16 and $+ 1 . 2 8 \%$ on ResNet-20). On the CIFAR-100 dataset, the method of adding threshold results in a slight decrease in accuracy on VGG-16 $( - 0 . 1 6 \% )$ , but a huge increase on ResNet-20 $( + 2 . 7 8 \% )$ . These results support that the threshold ReLU can serve as a reasonable source for the ANN to SNN conversion.
184
+
185
+ ![](images/a8ec047c1a6979c6d019104a772440d6149b2d69c96d2468771fdd5638a804f4.jpg)
186
+ Figure 2: Impact of threshold on ANN. (A)Maximum activations of VGG-16’s layers on CIFAR-10. (B) The accuracy of ANN with regular or threshold ReLU on different networks. Average over 5 repeats on CIFAR-10 and 3 repeats on CIFAR-100.
187
+
188
+ # 7.2 IMPACT OF SIMULATION LENGTH AND SHIFT ON CLASSIFICATION ACCURACY
189
+
190
+ In this part, we further explore whether adding threshold and shift to the activation function will affect the simulation length $( T )$ required for the converted SNN to match the source ANN in classification accuracy and how shift operation affects differently in different periods of simulation.
191
+
192
+ ![](images/6129205793d282b9a402036496edc07b6edc983f5bbf13576f5d7f17ed02497f.jpg)
193
+ Figure 3: Impact of threshold and shift on convergence for converting ResNet-20 on CIFAR-100. (A) SNN’s accuracy losses w.r.t different simulation lengths. (B-D) Optimal shifts w.r.t different activation functions and simulation lengths.
194
+
195
+ From Fig.3A, we can see that no matter applied separately or together, the threshold and shift operations always significantly shorten the simulation length to less than 100 when the accuracy loss is much smaller than using regular ReLU with $T \approx 2 0 0$ . When $T < 5 0$ , the combination of threshold and shift achieves the fastest convergence and the adoption of threshold is more efficient than shift. However, the difference is minor when simulating with $T > 1 0 0$ . This inspires us to further explore the impact of shift at different simulation length. From the green and blue lines in Fig.2A and accuracy changes w.r.t the variation of shift scales in Fig.2B, we can conclude that the shift by $V _ { t h } / 2 T$ is almost always optimal even when $T = 2 0 0$ for the source ANN with regular ReLU. However, the shift works differently when the ReLU is with threshold. When the simulation length is very short like $T = 1 6$ , the conversion can benefit hugely $( > 0 . 3 0$ accuracy improvement) from the derived optimal shift (see Fig.2C). When the simulation length is long enough, the shift mechanism no longer works and may slightly damage the accuracy (Fig.2D) while adding threshold alone will almost eliminate the conversion error that consistently remains above zero in the original threshold balancing approach (Diehl et al., 2015; Sengupta et al., 2018) as shown in Appendix Fig.4.
196
+
197
+ # 7.3 COMPARISON WITH RELATED WORK
198
+
199
+ In order to validate the effectiveness of the whole proposed pipeline, here we compare our method with SPIKE-NORM (Sengupta et al., 2018), Hybrid Training (Rathi et al., 2019), RMP (Han et al., 2020), TSC(Han & Roy, 2020) and direct training method including STBP (Wu et al., 2019) and TSSL-BP (Zhang & Li, 2020) through classification tasks on CIFAR-10, CIFAR-100 and ImageNet (Table.1). For the network with relatively light infrastructure like CIFAR-Net, our model can converge to $> 9 0 \%$ accuracy within 16 simulation steps. Direct training methods like STBP and TSSLBP are feasible to achieve a high accuracy with short simulation length. However, their training cost is high due to RNN-like manner in the training procedure and cannot extend to complex network infrastructures like VGG-16 and ResNet-20. RMP and TSC achieve the highest accuracy for SNN with VGG-16, probably a result from more accurate pre-trained source ANNs. For ResNet-20, our model outperforms the compared models not only in accuracy but also in the simulation length.
200
+
201
+ Table 1: Comparison between our work and other conversion methods. The conversion loss is reported as the accuracy difference $( a c c _ { A N N } - a c c _ { S N N } )$ between the source ANN with regular ReLU and threshold ReLU (in brackets) and the converted SNN. Ourwork-X-TS denotes the SNN converted from the source ANN with both threshold (T) ReLU and shift (S).
202
+
203
+ <table><tr><td rowspan="2">Method</td><td colspan="3">CIFAR-10+CIFAR-Net</td><td rowspan="2"></td><td colspan="2" rowspan="2">CIFAR-10 +VGG-16</td><td rowspan="2"></td><td colspan="2">CIFAR-10 +ResNet-20</td></tr><tr><td>Accuracy</td><td>Conversion Loss</td><td>Length Accuracy</td><td>Conversion Loss Length Accuracy</td><td>Conversion Loss</td><td>Length</td></tr><tr><td>STBP(w/o NeuNorm)</td><td>89.83%</td><td>0.66%</td><td>8</td><td></td><td>NA</td><td></td><td></td><td>NA</td><td></td></tr><tr><td>STBP(w/NeuNorm)</td><td>90.53%</td><td>-0.04%</td><td>8</td><td></td><td>NA</td><td></td><td></td><td>NA</td><td></td></tr><tr><td>TSSL-BP</td><td>91.41%</td><td>-0.92%</td><td>5</td><td></td><td>NA</td><td></td><td></td><td>NA</td><td></td></tr><tr><td>SPIKE-NORM</td><td></td><td>NA</td><td></td><td>91.55%</td><td>0.15%</td><td>2500</td><td>87.46%</td><td>1.64%</td><td>2500</td></tr><tr><td>RMP</td><td></td><td>NA</td><td></td><td>93.63%</td><td>0.01%</td><td>1536</td><td>91.36%</td><td>0.11%</td><td>2048</td></tr><tr><td>Hybrid Training</td><td></td><td>NA</td><td></td><td>91.13%</td><td>1.68%</td><td>100</td><td>92.22%</td><td>0.93%</td><td>250</td></tr><tr><td>TSC</td><td></td><td>NA</td><td></td><td>93.63%</td><td>0.00%</td><td>2048</td><td>91.42%</td><td>0.05%</td><td>1536</td></tr><tr><td>Our Work-1-TS</td><td>90.22%</td><td>0.06%(0.41%)</td><td>16</td><td>92.29%</td><td>-0.2%(0.05%)</td><td>16</td><td>92.41%</td><td>-0.09%(1.20%)</td><td>16</td></tr><tr><td>Our Work-2-TS</td><td>90.46%</td><td>-0.18%(0.17%)</td><td>32</td><td>92.29%</td><td>-0.2%(0.05%)</td><td>32</td><td>93.30%</td><td>-0.98%(0.31%)</td><td>32</td></tr><tr><td>Our Work-3-TS</td><td>90.58%</td><td>-0.20%(0.05%)</td><td>64</td><td>92.22%</td><td>-0.13%(0.12%)</td><td>64</td><td>93.55%</td><td>-1.23%(0.06%)</td><td>64</td></tr><tr><td>Our Work-4-TS</td><td>90.58%</td><td>-0.20%(0.05%)</td><td>128</td><td>92.24%</td><td>-0.15%(0.10%)</td><td>128</td><td>93.56%</td><td>-1.25%(0.05%)</td><td>128</td></tr><tr><td>Our Work-5-T</td><td>90.61%</td><td>-0.23%(0.02%)</td><td>400-600</td><td>92.26%</td><td>-0.17%(0.08%)</td><td>400-600</td><td>93.58%</td><td>-1.26%(0.03%)</td><td>400-600</td></tr><tr><td>Our Work-6-S</td><td>90.13%</td><td>0.05%</td><td>512</td><td>92.03%</td><td>0.06%</td><td>512</td><td>92.14%</td><td>0.18%</td><td>512</td></tr><tr><td></td><td></td><td>CIFAR-100+VGG-16</td><td></td><td></td><td>CIFAR-100+ResNet20</td><td></td><td></td><td>ImageNet+ VGG-16</td><td></td></tr><tr><td>Method</td><td>Accuracy</td><td>Conversion Loss</td><td>Length</td><td>Accuracy</td><td>Conversion Loss</td><td>Length</td><td>Accuracy</td><td>Conversion Loss</td><td>Length</td></tr><tr><td>SPIKE-NORM</td><td>70.77%</td><td>0.45%</td><td>2500</td><td>64.09%</td><td>4.63%</td><td>2500</td><td>69.96%</td><td>0.56%</td><td>2500</td></tr><tr><td>RMP</td><td>70.93%</td><td>0.29%</td><td>2048</td><td>67.82%</td><td>0.9%</td><td>2048</td><td>73.09%</td><td>0.4%</td><td>4096</td></tr><tr><td>Hybrid Training</td><td></td><td>NA</td><td></td><td></td><td>NA</td><td></td><td>65.19%</td><td>4.16%</td><td>250</td></tr><tr><td>TSC</td><td>70.97%</td><td>0.25%</td><td>1024</td><td>68.18%</td><td>0.54%</td><td>2048</td><td>73.46%</td><td>0.03%</td><td>2560</td></tr><tr><td>Our Work-1-TS</td><td>65.94%</td><td>4.68%(4.55%)</td><td>16</td><td>63.73%</td><td>3.35%(6.07%)</td><td>16</td><td>55.80%</td><td>16.6%(16.38%)</td><td>16</td></tr><tr><td>Our Work-2-TS</td><td>69.80%</td><td>0.82%(0.69%)</td><td>32</td><td>68.40%</td><td>-1.32%(1.40%)</td><td>32</td><td>67.73%</td><td>4.67%(4.45%)</td><td>32</td></tr><tr><td>Our Work-3-TS</td><td>70.35%</td><td>0.27%(0.14%)</td><td>64</td><td>69.27%</td><td>-2.19%(0.53%)</td><td>64</td><td>70.97%</td><td>1.43%(1.21%)</td><td>64</td></tr><tr><td>Our Work-4-TS</td><td>70.47%</td><td>0.15%(0.02%)</td><td>128</td><td>69.49%</td><td>-2.41%(0.31%)</td><td>128</td><td>71.89%</td><td>0.51%(0.29%)</td><td>128</td></tr><tr><td>Our Work-5-T</td><td>70.55%</td><td>0.07%(-0.06%)</td><td>400-600</td><td>69.82%</td><td>-2.74%(-0.02%)</td><td>400-600</td><td>72.17%</td><td>0.23%(0.01%)</td><td>400-600</td></tr><tr><td>Our Work-6-S</td><td>70.28%</td><td>0.31%</td><td>512</td><td>66.63%</td><td>0.45%</td><td>512</td><td>72.34%</td><td>0.06%</td><td>512</td></tr></table>
204
+
205
+ We next pay attention to the accuracy loss during the conversion. For VGG-16, our proposed model averaged on length 400-600 achieves a similar loss with RMP on CIFAR-10 $( \approx 0 . 0 1 \% )$ . On CIFAR100 and ImageNet, our model maintains the lowest loss compared to both the ANN trained with regular ReLU and threshold ReLU. For ResNet-20, there appears an interesting phenomenon that the conversion to SNN actually improves rather than damage the accuracy. Compared with the source ANN trained with regular ReLU, the accuracy of our converted SNN has a dramatic increase with $1 . 2 6 \%$ on CIFAR-10 and $2 . 7 4 \%$ on CIFAR-100. This may be a result from the fact that the source ANN for conversion is not compatible with the batch normalization and max pooling thus bears a deficit by overfitting that can be reduced by the threshold and discretization of converting to SNN.
206
+
207
+ In addition to the excellence in accuracy, our model is even more advantageous in the simulation length. When we combine the threshold ReLU with shift operation through the layer-wise approximation, our model can achieve a comparable performance with RMP for VGG-16 with 16 simulation steps on CIFAR-10 and 32 simulation steps on CIFAR-100, much shorter than that of RMP (1536 on CIFAR-10, 2048 on CIFAR-100). Similar comparisons are observed on ResNet-20 with better performance than RMP, TSC, SPIKE-NORM and Hybrid Training. On ImageNet, although we do not achieve the highest accuracy due to the constraint of accurate source ANN and short simulation length, we can still observe that the 400-600 simulation steps can return a conversion error smaller than that of RMP, TSC and SPIKE-NORM with 4096 and 2500 steps correspondingly. When the simulation length is 512, the conversion with only shift operation works accurately enough as well.
208
+
209
+ See Appendix A.2 for the repeated tests averaged with simulation length 400 to 600 and Appendix A.3 for the comparison with RMP and TSC when the simulation length is aligned on a short level.
210
+
211
+ The proposed algorithm can potentially work for the conversion of recurrent neural network (RNN) as well. See Appendix A.4 for an illustrative example that demonstrates the superiority of the current work over directly-training approach when the source architecture is an RNN.
212
+
213
+ # 8 DISCUSSION
214
+
215
+ Since Cao et al. (2015) first proposed conversion from ANN with ReLU to SNN, there have been many follow-up works (Diehl et al., 2016; Rueckauer et al., 2016; Sengupta et al., 2018; Han et al., 2020) to optimize the conversion procedure. But they fail to theoretically analyze the conversion error for the whole network and neglect to ask what types of ANNs are easier to transform. We fill this gap and performed a series of experiments to prove their effectiveness.
216
+
217
+ Our theoretical decomposition of conversion error actually allows a new perspective of viewing the conversion problem from ANNs to SNNs. Indeed, the way we decompose the error on activation values works for the problem of network quantization (Nagel et al., 2020) as well. This is because the perturbation in edge weight, activation function and values would all affect the following layers through the output values of the current layer. However, one limitation to point out here is that the interaction term in Eqn.12 may not be small enough to ignore when different layers are strongly coupled in the infrastructure. In this case, the layer-wise recursion is suboptimal and blockwise approaches may help for further optimization. The trade-off between representativity and generalizability applies for the adoption of threshold ReLU in the training of ANN and provides an intuitive interpretation on why our converted SNN outperforms the source ResNet-20 in the conversion.
218
+
219
+ We also show that shift operation is necessary for the conversion considering the difference between ReLU and step function. This difference has also been noticed in direct training approach as well. Wu et al. (2018; 2019) use a modified sign function to model the surrogate gradient. This choice makes the surrogate curve coincide with the red line in Fig.2B. Yet, we need to point out that the shift operation cannot ensure the improvement when the simulation length is long enough. We can understand the shift operation as an approach to pull the target SNN to the source ANN. At the same time, pulling the SNN to ANN also causes it to reduce the generalizability out of discretization. As we describe above, the target SNN is possible to outperform the source ANN by benefiting more generalizability than losing the representativity. In this case, it makes no sense to pull the target SNN model back to the source ANN anymore. This is potentially the reason why the optimal shift is no longer $V _ { t h } / 2 T$ when the simulation length is long enough to make the target SNN hardly gain more representativity than lose generalizability by getting closer to the source ANN.
220
+
221
+ Compared to the direct training approach of SNNs, one big limitation of converting SNNs from ANNs is the simulation length. Although SNNs can reduce the energy cost in the forward process (Deng et al., 2020), the huge simulation length will limit this advantage. Our method greatly reduces the simulation length required by the converted SNNs, especially for large networks and can be combined with other optimization methods in Spiking-YOLO, SPIKE-NORM and RMP. Further, as we point above about the duality between input $\mathbf { x }$ and edge weight w, future optimization could potentially reduce the simulation length to about $2 ^ { 4 } = 1 6$ that is equivalent to 4 bits in network quantization with very tiny accuracy loss.
222
+
223
+ In the future, it makes the framework more practical if we can extend it to converting source ANN trained with batch normalization and activation functions taking both positive and negative values.
224
+
225
+ # 9 ACKNOWLEDGMENT
226
+
227
+ This project is primarily supported by NSFC 61876032.
228
+
229
+ # REFERENCES
230
+
231
+ Simone Acciarito, Gian Carlo Cardarilli, Alessandro Cristini, Luca Di Nunzio, Rocco Fazzolari, Gaurav Mani Khanal, Marco Re, and Gianluca Susi. Hardware design of lif with latency neuron model with memristive stdp synapses. Integration, 59:81 – 89, 2017.
232
+
233
+ Michele Barbi, Santi Chillemi, Angelo Di Garbo, and Lara Reale. Stochastic resonance in a sinusoidally forced lif model with noisy threshold. Biosystems, 71(1-2):23–28, 2003.
234
+
235
+ Aleksandar Botev, Hippolyt Ritter, and David Barber. Practical gauss-newton optimisation for deep learning. arXiv preprint arXiv:1706.03662, 2017.
236
+
237
+ Yongqiang Cao, Yang Chen, and Deepak Khosla. Spiking deep convolutional neural networks for energy-efficient object recognition. International Journal of Computer Vision, 113(1):54−−66, 2015.
238
+
239
+ Lei Deng, Yujie Wu, Xing Hu, Ling Liang, Yufei Ding, Guoqi Li, Guangshe Zhao, Peng Li, and Yuan Xie. Rethinking the performance comparison between snns and anns. Neural Networks, 121:294 – 307, 2020.
240
+
241
+ Peter U Diehl and Matthew Cook. Efficient implementation of stdp rules on spinnaker neuromorphic hardware. In 2014 International Joint Conference on Neural Networks (IJCNN), pp. 4288–4295. IEEE, 2014.
242
+
243
+ Peter U. Diehl, Daniel Neil, Jonathan Binas, Matthew Cook, Shih-Chii Liu, and Michael Pfeiffer. Fast-classifying, high-accuracy spiking deep networks through weight and threshold balancing. 2015 International Joint Conference on Neural Networks (IJCNN), pp. 1–8, 2015.
244
+
245
+ Peter U Diehl, Guido Zarrella, Andrew Cassidy, Bruno U Pedroni, and Emre Neftci. Conversion of artificial recurrent neural networks to spiking neural networks for low-power neuromorphic hardware. In 2016 IEEE International Conference on Rebooting Computing (ICRC), pp. 1–8. IEEE, 2016.
246
+
247
+ Bing Han and Kaushik Roy. Deep spiking neural network: Energy efficiency through time based coding. In European Conference on Computer Vision, 2020.
248
+
249
+ Bing Han, Gopalakrishnan Srinivasan, and Kaushik Roy. Rmp-snn: Residual membrane potential neuron for enabling deeper high-accuracy and low-latency spiking neural network. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13558–13567, 2020.
250
+
251
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Sun Jian. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, 2016.
252
+
253
+ Alan L Hodgkin and Andrew F Huxley. A quantitative description of membrane current and its application to conduction and excitation in nerve. The Journal of physiology, 117(4):500–544, 1952a.
254
+
255
+ Allan L Hodgkin and Andrew F Huxley. Currents carried by sodium and potassium ions through the membrane of the giant axon of loligo. The Journal of physiology, 116(4):449–472, 1952b.
256
+
257
+ Eugene M Izhikevich. Resonate-and-fire neurons. Neural networks, 14(6-7):883–894, 2001.
258
+
259
+ Eugene M Izhikevich. Simple model of spiking neurons. IEEE Transactions on neural networks, 14(6):1569–1572, 2003.
260
+
261
+ Seijoon Kim, Seongsik Park, Byunggook Na, and Sungroh Yoon. Spiking-yolo: Spiking neural network for energy-efficient object detection. arXiv preprint arXiv:1903.06530, 2019.
262
+
263
+ Alex Krizhevsky, I. Sutskever, and G. Hinton. Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems, 25(2), 2012.
264
+
265
+ Tengyuan Liang, Tomaso Poggio, Alexander Rakhlin, and James Stokes. Fisher-rao metric, geometry, and complexity of neural networks. In The 22nd International Conference on Artificial Intelligence and Statistics, pp. 888–896, 2019.
266
+
267
+ Ying-Hui Liu and Xiao-Jing Wang. Spike-frequency adaptation of a generalized leaky integrateand-fire model neuron. Journal of computational neuroscience, 10(1):25–45, 2001.
268
+
269
+ Warren S McCulloch and Walter Pitts. A logical calculus of the ideas immanent in nervous activity. The bulletin of mathematical biophysics, 5(4):115–133, 1943.
270
+
271
+ Markus Nagel, Rana Ali Amjad, Mart van Baalen, Christos Louizos, and Tijmen Blankevoort. Up or down? adaptive rounding for post-training quantization. arXiv preprint arXiv:2004.10568, 2020.
272
+
273
+ Jing Pei, Lei Deng, Sen Song, Mingguo Zhao, Youhui Zhang, Shuang Wu, Guanrui Wang, Zhe Zou, Zhenzhi Wu, Wei He, et al. Towards artificial general intelligence with hybrid tianjic chip architecture. Nature, 572(7767):106–111, 2019.
274
+
275
+ Nitin Rathi, Gopalakrishnan Srinivasan, Priyadarshini Panda, and Kaushik Roy. Enabling deep spiking neural networks with hybrid conversion and spike timing dependent backpropagation. In International Conference on Learning Representations, 2019.
276
+
277
+ Deboleena Roy, Indranil Chakraborty, and Kaushik Roy. Scaling deep spiking neural networks with binary stochastic activations. In 2019 IEEE International Conference on Cognitive Computing (ICCC), pp. 50–58. IEEE, 2019.
278
+
279
+ Bodo Rueckauer, Iulia-Alexandra Lungu, Yuhuang Hu, and Michael Pfeiffer. Theory and tools for the conversion of analog to spiking convolutional neural networks. arXiv: Statistics/Machine Learning, (1612.04052):0–0, 2016.
280
+
281
+ Bodo Rueckauer, Iulia-Alexandra Lungu, Yuhuang Hu, Michael Pfeiffer, and Shih-Chii Liu. Conversion of continuous-valued deep networks to efficient event-driven networks for image classification. Frontiers in neuroscience, 11:682, 2017.
282
+
283
+ Abhronil Sengupta, Yuting Ye, Robert Wang, Chiao Liu, and Kaushik Roy. Going deeper in spiking neural networks: $\mathrm { V g g }$ and residual architectures. Frontiers in Neuroence, 13, 2018.
284
+
285
+ Sumit Bam Shrestha and Garrick Orchard. Slayer: Spike layer error reassignment in time. In Advances in Neural Information Processing Systems, pp. 1412–1421, 2018.
286
+
287
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
288
+
289
+ Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew $\mathrm { ~ Y ~ N ~ g ~ } _ { }$ , and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pp. 1631–1642, 2013.
290
+
291
+ Johannes C Thiele, Olivier Bichler, and Antoine Dupret. Spikegrad: An ann-equivalent computation model for implementing backpropagation with spikes. In International Conference on Learning Representations, 2019.
292
+
293
+ Yujie Wu, Lei Deng, Guoqi Li, Jun Zhu, and Luping Shi. Spatio-temporal backpropagation for training high-performance spiking neural networks. Frontiers in neuroscience, 12:331, 2018.
294
+
295
+ Yujie Wu, Lei Deng, Guoqi Li, Jun Zhu, Yuan Xie, and Luping Shi. Direct training for spiking neural networks: Faster, larger, better. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pp. 1311–1318, 2019.
296
+
297
+ Amirreza Yousefzadeh, Timothee Masquelier, Teresa Serrano-Gotarredona, and Bernab ´ e Linares- ´ Barranco. Hardware implementation of convolutional stdp for on-line visual feature learning. In 2017 IEEE International Symposium on Circuits and Systems (ISCAS), pp. 1–4. IEEE, 2017.
298
+
299
+ Wenrui Zhang and Peng Li. Temporal spike sequence learning via backpropagation for deep spiking neural networks. arXiv preprint arXiv:2002.10085, 2020.
300
+
301
+ # A APPENDIX
302
+
303
+ # A.1 NETWORK STRUCTURE AND OPTIMIZATION SETUP
304
+
305
+ We adopt three network structures, CIFARNet (Wu et al., 2019), VGG-16 and ResNet-20 (Sengupta et al., 2018). All the pooling layers use average pooling to adapt to SNN. CIFARNet is a 8 layer structure like: 128C3 (Encoding)-256C3-AP2-512C3-AP2-1024C3-512C3-1024FC-512FC-Voting, where C means convolutional layer, AP means average pooling and FC means fully connected layer. We use the VGG-16 and ResNet-20 model provided by Rathi et al. (2019) on the CIFAR dataset and standard VGG-16 on ImageNet. ResNet-20 is ResNet-18 adding two convolutional layers for preprocessing in front, and an activation function is added after the basic blocks (Sengupta et al., 2018). Following (Sengupta et al., 2018), before training, we initialize convolution layers (kernel size k, and n output channels) weight a normal distribution and standard deviation $\sqrt { 2 / ( k ^ { 2 } n ) }$ for non-residual convolutional layer, ${ \sqrt { 2 } } / ( k ^ { 2 } n )$ for residual convolutional layer. And then we add dropout layer that $p = 0 . 2$ between convolutional layers and $p = 0 . 5$ between fully connected layers.
306
+
307
+ Our work is based on Pytorch platform. For CIFAR-10 and CIFAR-100, the initial learning rate of each network is 0.01, batch size is 128, total epochs is 300. We use cross entropy loss function and SGD optimizer with momentum 0.9 and weight decay $5 e - 4$ . And learning rate decay by a factor of 0.1 at epochs of 180, 240 and 270. For the sake of better conversion, in the first 20 epochs, we use regular ReLU for training, and then add the threshold to ReLU. On CIFAR-100, our network is initialized with the network parameters on CIFAR-10 except the output layer (Pei et al., 2019). The training on CIFAR-100 adopts the pre-trained weight without threshold for initialization in the first few epochs as a compensation of the lack of batch-normalization (Han et al., 2020; Rathi et al., 2019) to enable the convergence in early steps.
308
+
309
+ # A.2 SNN PERFORMANCE WITH SIMULATION LENGTH 400-600
310
+
311
+ We provide the average accuracy and variance of the converted SNN over the simulation length of 400-600 on CIFAR-10 (Table2) and CIFAR-100 datasets (Table3), the shift operation is shifting constant $V _ { t h } / 1 6 0 0$ , except for the output layer. The results include (1) regular ReLU without our method, (2) threshold ReLU and (3) both threshold and shift operation. Since simulation length of 400-600 is long enough for conversion from the source ANN with threshold ReLU to SNN, shift operation may reduce the converted SNN accuracy.
312
+
313
+ Table 2: Performance of the converted SNN on CIFAR-10 (averaged on simulation length 400-600).
314
+
315
+ <table><tr><td>Structure</td><td>ReLU</td><td>ReLU+threshold</td><td>ReLU+threshold+shift</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>CIFAR-Net</td><td>90.16 ± 0.03</td><td>90.61 ± 0.01</td><td>90.37 ± 0.02</td></tr><tr><td>VGG-16</td><td>91.82 ± 0.09</td><td>92.26 ± 0.01</td><td>92.26 ± 0.01</td></tr><tr><td>ResNet-20</td><td>92.14 ± 0.03</td><td>93.58 ± 0.01</td><td>93.59 ± 0.01</td></tr></table>
316
+
317
+ Table 3: Performance of the converted SNN on CIFAR-100 (averaged on simulation length 400- 600).
318
+
319
+ <table><tr><td> Structure</td><td>ReLU</td><td>ReLU+threshold</td><td>ReLU+threshold+shift</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>VGG-16</td><td>70.10±0.05</td><td>70.55 ± 0.03</td><td>70.43 ± 0.03</td></tr><tr><td>ResNet-20</td><td>66.74 ± 0.04</td><td>69.82 ± 0.03</td><td>69.81 ± 0.02</td></tr></table>
320
+
321
+ # A.3 SNN PERFORMANCE WITH SHORT SIMULATION LENGTH
322
+
323
+ Here we compare the performance of our method versus RMP and TSC when the simulation length is short. The conversion loss is reported as the accuracy difference $( a c c _ { A N N } - a c c _ { S N N } )$ between the converted SNN and the source ANN with regular ReLU and threshold ReLU (in brackets). Our work-T/S denotes the SNN converted from the source ANN with both threshold (T) ReLU and shift (S). The performance of using shift operation and regular ReLU is similar to TSC on CIFAR10 (Table4), but is better than TSC and RMP on CIFAR-100 dataset (Table5). For VGG-16 on ImageNet, our model can achieve nearly zero conversion loss with simulation length 256 (Table 6). Using both threshold and shift at the same time reduces the conversion error the fastest when simulation length is short. And only using threshold achieves the minimum conversion error on a relatively long simulation time.
324
+
325
+ Table 4: Compare the conversion loss with short simulation length for VGG-16 and ResNet-20 on CIFAR-10.
326
+
327
+ <table><tr><td>Method</td><td>32</td><td>64</td><td>128</td><td>256</td><td>512</td></tr><tr><td colspan="6">VGG-16 on CIFAR-10</td></tr><tr><td>RMP</td><td>33.33%</td><td>3.28%</td><td>1.22%</td><td>0.59%</td><td>0.24%</td></tr><tr><td>TSC</td><td>NA</td><td>0.84%</td><td>0.36%</td><td>0.18%</td><td>0.06%</td></tr><tr><td>Our Work-S</td><td>29.71%</td><td>3.10%</td><td>0.99%</td><td>0.60%</td><td>0.06%</td></tr><tr><td>Our Work-T</td><td>0.06%(0.31%)</td><td>-0.21%(0.04%)</td><td>-0.18%(0.07%)</td><td>-0.18%(0.07%)</td><td>-0.16%(0.09%)</td></tr><tr><td>Our Work-TS</td><td>-0.2%(0.05%)</td><td>-0.13%(0.12%)</td><td>-0.15%(0.10%)</td><td>-0.19%(0.06%)</td><td>-0.16%(0.09%)</td></tr><tr><td colspan="6">ResNet-20 on CIFAR-10</td></tr><tr><td>RMP</td><td>16.78%</td><td>NA</td><td>3.87%</td><td>2.1%</td><td>0.84%</td></tr><tr><td>TSC</td><td>NA</td><td>22.09%</td><td>2.9%</td><td>1.37%</td><td>0.38%</td></tr><tr><td>Our Work-S</td><td>4.24%</td><td>1.13%</td><td>0.39%</td><td>0.21%</td><td>0.18%</td></tr><tr><td>Our Work-T</td><td>19.72%(21.01%)</td><td>-0.98%(0.31%)</td><td>-1.14%(0.15%)</td><td>-1.27%(0.02%)</td><td>-1.28%(0.01%)</td></tr><tr><td>Our Work-TS</td><td>-0.98%(0.31%)</td><td>-1.23%(0.06%)</td><td>-1.25%(0.05%)</td><td>-1.25%(0.05%)</td><td>-1.28%(0.01%)</td></tr></table>
328
+
329
+ Table 5: Compare the conversion loss with short simulation length for VGG-16 and ResNet-20 on CIFAR-100.
330
+
331
+ <table><tr><td>Method</td><td>32</td><td>64</td><td>128</td><td>256</td><td>512</td></tr><tr><td colspan="6">VGG-16 on CIFAR-100</td></tr><tr><td>RMP</td><td>NA</td><td>NA</td><td>7.46%</td><td>2.88%</td><td>1.82%</td></tr><tr><td>TSC</td><td>NA</td><td>NA</td><td>1.36%</td><td>0.57%</td><td>0.35%</td></tr><tr><td>Our Work-S</td><td>NA</td><td>NA</td><td>1.13%</td><td>0.55%</td><td>0.31%</td></tr><tr><td>Our Work-T</td><td>NA</td><td>NA</td><td>0.21%(0.08%)</td><td>0.12%(-0.01%)</td><td>0.07%(-0.06%)</td></tr><tr><td>Our Work-TS</td><td>NA</td><td>NA</td><td>0.15%(0.02%)</td><td>0.08%(-0.05%)</td><td>0.14%(0.01%)</td></tr><tr><td colspan="6">ResNet-20 on CIFAR-100</td></tr><tr><td>RMP</td><td>41.08%</td><td>21.81%</td><td>11.03%</td><td>4.66%</td><td>2.56%</td></tr><tr><td>TSC</td><td>NA</td><td>NA</td><td>10.03%</td><td>3.45%</td><td>1.55%</td></tr><tr><td>Our Work-S</td><td>6.15%</td><td>1.61%</td><td>0.70%</td><td>0.52%</td><td>0.45%</td></tr><tr><td>Our Work-T</td><td>-0.14%(2.58%)</td><td>-2.18%(0.53%)</td><td>-2.62%(0.10%)</td><td>-2.78%(-0.06%)</td><td>-2.76%(-0.04%)</td></tr><tr><td>Our Work-TS</td><td>-1.32%(1.4%)</td><td>-2.19%(0.53%)</td><td>-2.41%(0.31%)</td><td>-2.41%(0.31%)</td><td>-2.54%(0.18%)</td></tr></table>
332
+
333
+ Table 6: Compare the conversion loss with short simulation length on VGG-16 and ImageNet.
334
+
335
+ <table><tr><td>Method</td><td>256</td><td>512</td></tr><tr><td>RMP</td><td>24.56%</td><td>3.95%</td></tr><tr><td>TSC</td><td>3.75%</td><td>0.87%</td></tr><tr><td>Our Work-S</td><td>0.41%</td><td>0.06%</td></tr><tr><td>Our Work-T</td><td>0.35%(0.15%)</td><td>0.22%(0.02%)</td></tr><tr><td>Our Work-TS</td><td>0.26%(0.06%)</td><td>0.25%(0.05%)</td></tr></table>
336
+
337
+ # A.4 PERFORMANCE OF SNN CONVERTED FROM RNN
338
+
339
+ Here we provide an illustrative example of how the proposed conversion pipeline can be extended to the case of converting RNN on the dataset for Sentiment Analysis on Movie Reviews (Socher et al., 2013). The rules are slightly different from conversion in the main text considering the implicit definition of RNN’s hidden states. For the fairness of comparison, we set the same input and simulation length for the RNN and SNN and adjust the structure as follows. (1) The source RNN adopts the threshold-ReLU as its activation function with the remaining value as the hidden state value. The hidden value will be added to the pre-activation value at the next time point. (2) We add a non-negative attenuation $\tau$ to the hidden state values in order to enhance the nonlinearity. (3) The converted SNN keeps the same infrastructure, weight parameters, attenuation value $\tau$ as the source RNN. (4) On the output layer, we use the threshold balancing method and loop its input multiple times to fire enough spikes to obtain a good approximation to the fully-connected layer for the final prediction.
340
+
341
+ We compare the performance of the source RNN, converted SNN and directly-trained SNN. On the validation set, the converted SNN achieves an accuracy of 0.5430 that is close to the source RNN $( \mathrm { a c c } = 0 . 5 4 2 8 )$ ), while the directly-trained SNN with surrogate gradient only gets an 0.5106 accuracy. We also find that using the regular ReLU instead of threshold-ReLU on the source RNN produces a big accuracy drop for the converted SNN $( \mathrm { a c c } = 0 . 5 1 0 0 )$ ). Since the surrogate gradient error of the directly-trained method will accumulate over the whole simulation process while complex infrastructures and tasks usually require a long simulation to achieve an effective spiking frequency distribution, the typical directly-training approaches for SNNs are often not optimal in complex network structures and tasks. Our results illustrate the potential efficiency of converting SNN from RNN. In future works, it would be promising to investigate how to design a better conversion strategy that can simultaneously combine the strength of RNN and SNN.
342
+
343
+ # A.5 COMPARE THE PERFORMANCE ON LONG SIMULATION
344
+
345
+ As a supplement to Fig.3 A, here we compare the conversion accuracy loss of the SNNs converted from the source ANNs with regular and threshold ReLU functions along an extended simulation length. Although the conversion loss in both cases decays fairly fast, the SNN converted from the ANN with regular ReLU function converges to a plateau that suffers about $0 . 7 5 \%$ accuracy loss while the SNN converted from the ANN with threshold ReLU is almost loss-free. This result indicates that the improvement by adding threshold is not only on the converging efficiency but also on the final performance, which cannot be easily compensated through extending the simulation time in the original threshold balancing approach.
346
+
347
+ ![](images/dc8b3a972364ae98189bae140e3d3908f30648a1935a6b6e7f04b8ef12b78055.jpg)
348
+ Figure 4: The accuracy gap between the source ANN and target SNN along an extended simulation length.
parse/train/FZ1oTwcXchK/FZ1oTwcXchK_content_list.json ADDED
@@ -0,0 +1,1707 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "OPTIMAL CONVERSION OF CONVENTIONAL ARTIFICIAL NEURAL NETWORKS TO SPIKING NEURAL NETWORKS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 821,
10
+ 171
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Shikuang Deng1 & Shi $\\mathbf { G } \\mathbf { u } ^ { \\mathrm { 1 } \\boxtimes }$ ",
17
+ "bbox": [
18
+ 184,
19
+ 193,
20
+ 390,
21
+ 209
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "School of Computer Science and Engineering University of Electronic Science and Technology of China dengsk119@std.uestc.edu.cn, gus@uestc.edu.cn ",
28
+ "bbox": [
29
+ 184,
30
+ 210,
31
+ 616,
32
+ 251
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "ABSTRACT ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 454,
42
+ 287,
43
+ 544,
44
+ 304
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Spiking neural networks (SNNs) are biology-inspired artificial neural networks (ANNs) that comprise of spiking neurons to process asynchronous discrete signals. While more efficient in power consumption and inference speed on the neuromorphic hardware, SNNs are usually difficult to train directly from scratch with spikes due to the discreteness. As an alternative, many efforts have been devoted to converting conventional ANNs into SNNs by copying the weights from ANNs and adjusting the spiking threshold potential of neurons in SNNs. Researchers have designed new SNN architectures and conversion algorithms to diminish the conversion error. However, an effective conversion should address the difference between the SNN and ANN architectures with an efficient approximation of the loss function, which is missing in the field. In this work, we analyze the conversion error by recursive reduction to layer-wise summation and propose a novel strategic pipeline that transfers the weights to the target SNN by combining threshold balance and soft-reset mechanisms. This pipeline enables almost no accuracy loss between the converted SNNs and conventional ANNs with only $\\sim 1 / 1 0$ of the typical SNN simulation time. Our method is promising to get implanted onto embedded platforms with better support of SNNs with limited energy and memory. Codes are available at https://github.com/Jackn0/snn optimal conversion pipeline. ",
51
+ "bbox": [
52
+ 233,
53
+ 321,
54
+ 764,
55
+ 585
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 617,
66
+ 334,
67
+ 633
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Spiking neural networks (SNNs) are proposed to imitate the biological neural networks (Hodgkin & Huxley, 1952a; McCulloch & Pitts, 1943) with artificial neural models that simulate biological neuron activity, such as Hodgkin-Huxley (Hodgkin & Huxley, 1952b), Izhikevich (Izhikevich, 2003), and Resonate-and-Fire (Izhikevich, 2001) models. The most widely used neuron model for SNN is the Integrate-and-Fire (IF) model (Barbi et al., 2003; Liu & Wang, 2001), where a neuron in the network emits a spike only when the accumulated input exceeds the threshold voltage. This setting makes SNNs more similar to biological neural networks. ",
74
+ "bbox": [
75
+ 174,
76
+ 651,
77
+ 825,
78
+ 748
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "The past two decades have witnessed the success of conventional artificial neural networks (named as ANNs for the ease of comparison with SNNs), especially with the development of convolutional neural networks including AlexNet (Krizhevsky et al., 2012), VGG (Simonyan & Zisserman, 2014) and ResNet (He et al., 2016). However, this success highly depends on the digital transmission of information in high precision and requires a large amount of energy and memory. So the traditional ANNs are infeasible to deploy onto embedded platforms with limited energy and memory.Distinct from conventional ANNs, SNNs are event-driven with spiking signals, thus more efficient in the energy and memory consumption on embedded platforms (Roy et al., 2019). By far, SNNs have been implemented for image (Acciarito et al., 2017; Diehl & Cook, 2014; Yousefzadeh et al., 2017) and voice (Pei et al., 2019) recognition. ",
85
+ "bbox": [
86
+ 174,
87
+ 756,
88
+ 825,
89
+ 895
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Although potentially more efficient, current SNNs have their own intrinsic disadvantages in training due to the discontinuity of spikes. Two promising methods of supervised learning are backpropagation with surrogate gradient and weight conversion from ANNs. The first routine implants ANNs onto SNN platforms by realizing the surrogate gradient with the customized activation function (Wu et al., 2018). This method can train SNNs with close or even better performance than the conventional ANNs on some small and moderate datasets (Shrestha & Orchard, 2018; Wu et al., 2019; Zhang & Li, 2020; Thiele et al., 2019). However, the training procedure requires a lot of time and memory and suffers from the difficulty in convergence for large networks such as VGG and ResNet. The second routine is to convert ANNs to SNNs by co-training a source ANN for the target SNN that adopts the IF model and soft-reset mechanism (Rueckauer et al., 2016; Han et al., 2020). When a neuron spikes, its membrane potential will decrease by the amount of threshold voltage instead of turning into the resting potential of a fixed value. A limitation of this mechanism is that it discretizes the numerical input information equally for the neurons on the same layer ignorant of the variation in activation frequencies for different neurons. As a consequence, some neurons are difficult to transmit information with short simulation sequences. Thus the converted SNNs usually require huge simulation length to achieve high accuracy (Deng et al., 2020) due to the trade-off between simulation length and accuracy (Rueckauer et al., 2017). This dilemma can be partially relieved by applying the threshold balance on the channel level Kim et al. (2019) and adjusting threshold values according to the input and output frequencies (Han et al., 2020; Han & Roy, 2020). However, as far as we know, it remains unclear how the gap between ANN and SNN formulates and how the simulation length and voltage threshold affect the conversion loss from layers to the whole network. In addition, the accuracy of converted SNN is not satisfactory when the simulation length is as short as tens. ",
96
+ "bbox": [
97
+ 174,
98
+ 103,
99
+ 825,
100
+ 421
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Compared to the previous methods that focus on either optimizing the conversion process or modifying the SNN structures, we theoretically analyze the conversion error from the perspective of activation values and propose a conversion strategy that directly modifies the ReLU activation function in the source ANN to approximate the spiking frequency in the target SNN based on the constructed error form. Our main contributions are summarized as follows: ",
107
+ "bbox": [
108
+ 176,
109
+ 429,
110
+ 825,
111
+ 500
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "• We theoretically analyze the conversion procedure and derive the conversion loss that can be optimized layer-wisely. \n• We propose a conversion algorithm that effectively controls the difference of activation values between the source ANN and the target SNN with a much shorter simulation length than existing works. \n• We both theoretically and experimentally demonstrate the effectiveness of the proposed algorithm and discuss its potential extension to other problems. ",
118
+ "bbox": [
119
+ 215,
120
+ 513,
121
+ 825,
122
+ 632
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "2 PRELIMINARIES ",
129
+ "text_level": 1,
130
+ "bbox": [
131
+ 176,
132
+ 657,
133
+ 339,
134
+ 674
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "Our conversion pipeline exploits the threshold balancing mechanism (Diehl et al., 2015; Sengupta et al., 2018) between ANN and SNN with modified ReLU function on the source ANN to reduce the consequential conversion error (Fig.1 A). The modification on regular ReLU function consists of thresholding the maximum activation and shifting the turning point. The thresholding operation suppresses the excessive activation values so that all neurons could be activated within a shorter simulation time. The shift operation compensates the deficit of the output frequency caused by the floor rounding when converting activation values to output frequencies. ",
141
+ "bbox": [
142
+ 174,
143
+ 693,
144
+ 825,
145
+ 790
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "We here introduce common notations used in the current paper. Since the infrastructures of the source ANN and target SNN are the same, we use the same notation when it is unambiguous. For the $l$ -th layer, we denote $W _ { l }$ as the weight matrix. The threshold on activation value added to the ReLU function in the source ANN is $y _ { t h }$ and the threshold voltage of the spiking function in the target SNN is $V _ { t h }$ . The SNN is simulated in $T$ time points, where ${ \\pmb v } ^ { l } ( t ) = \\{ v _ { i } ^ { l } ( \\overline { { t } } ) \\}$ is the vector collecting membrane potentials of neurons at time $t$ , and $\\pmb { \\theta } ^ { l } = \\{ \\theta _ { i } ^ { l } ( t ) \\}$ records the output to the next layer, i.e the post synaptic potential (PSP) released by $l$ -th layer to the $( l + 1 )$ -th layer. Suppose that within the whole simulation time $T$ , the $l$ -th layer receives an average input $\\mathbf { \\alpha } _ { \\mathbf { \\alpha } } \\mathbf { \\alpha } _ { \\mathbf { \\beta } } \\mathbf { \\alpha } _ { \\mathbf { \\alpha } } \\mathbf { \\alpha } _ { \\mathbf { \\beta } } \\mathbf { \\alpha } _ { \\mathbf { \\alpha } } \\mathbf { \\alpha } _ { \\mathbf { \\beta } } \\mathrm { ~ \\textem ~ } \\mathbf { \\alpha } _ { \\mathbf { \\beta } } \\mathrm { ~ \\textem ~ } \\mathbf { \\alpha } _ { \\mathbf { \\beta } }$ and an average PSP $\\pmb { a } _ { l } ^ { \\prime }$ from the $( l - 1 )$ -th layer corresponding to the source ANN and target SNN, the forward process ",
152
+ "bbox": [
153
+ 173,
154
+ 797,
155
+ 825,
156
+ 924
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "can be described by ",
163
+ "bbox": [
164
+ 173,
165
+ 103,
166
+ 305,
167
+ 118
168
+ ],
169
+ "page_idx": 2
170
+ },
171
+ {
172
+ "type": "equation",
173
+ "img_path": "images/18ce012df473d830bd1e77eb3dfb49babc6fdb93addb431413e0edc7a6fcd5d8.jpg",
174
+ "text": "$$\n\\begin{array} { l } { { \\pmb { a } _ { l + 1 } = h ( { \\cal W } _ { l } \\cdot { \\pmb { a } _ { l } } ) , } } \\\\ { { \\pmb { a } _ { l + 1 } ^ { \\prime } = h ^ { \\prime } ( { \\cal W } _ { l } \\cdot { \\pmb { a } _ { l } ^ { \\prime } } ) , } } \\end{array}\n$$",
175
+ "text_format": "latex",
176
+ "bbox": [
177
+ 429,
178
+ 126,
179
+ 565,
180
+ 166
181
+ ],
182
+ "page_idx": 2
183
+ },
184
+ {
185
+ "type": "text",
186
+ "text": "where $h _ { l } ( \\cdot )$ and $h _ { l } ^ { \\prime } ( \\cdot )$ denote the activation function for the source ANN and target SNN on the average sense respectively. For the source ANN, the activation function $h ( \\cdot )$ is identical to the activation function for the single input, which is the threshold ReLU function in this work, i.e. ",
187
+ "bbox": [
188
+ 174,
189
+ 172,
190
+ 825,
191
+ 215
192
+ ],
193
+ "page_idx": 2
194
+ },
195
+ {
196
+ "type": "equation",
197
+ "img_path": "images/287a5b6bff05099433b85c6584650ec91dd75160711acb1e210ccbf436f9e198.jpg",
198
+ "text": "$$\nh ( x ) = { \\left\\{ \\begin{array} { l l } { 0 , } & { { \\mathrm { i f ~ } } x \\leq 0 ; } \\\\ { x , } & { { \\mathrm { i f ~ } } 0 < x < y _ { t h } ; } \\\\ { y _ { t h } , } & { { \\mathrm { i f ~ } } x \\geq y _ { t h } , } \\end{array} \\right. }\n$$",
199
+ "text_format": "latex",
200
+ "bbox": [
201
+ 390,
202
+ 224,
203
+ 604,
204
+ 276
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "where $y _ { t h }$ is the threshold value added to the regular ReLU function. For the target SNN, the activation function $h ^ { \\prime } ( \\cdot )$ will be derived in the following section. ",
211
+ "bbox": [
212
+ 173,
213
+ 285,
214
+ 826,
215
+ 314
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "image",
221
+ "img_path": "images/253e7e16f8097b10861bb57e466be1f8f4e85bed1e5d2899a856a86e07a74b82.jpg",
222
+ "image_caption": [
223
+ "Figure 1: Schematics on the conversion pipeline. (A) The SNN propagates spiking frequencies with the activation sequence $\\pmb { x } _ { l } ^ { \\prime } = \\{ \\pmb { x } _ { l } ^ { \\prime } ( 1 ) , . . . , \\pmb { x } _ { l } ^ { \\prime } ( T ) \\}$ and averaged output $\\pmb { a } _ { l } ^ { \\prime }$ for $l = 1 , . . . , L$ through $L$ layers. (B) Activation functions of regular and threshold ReLUs for ANNs, and the step function for SNNs. (C) The error between ReLU and step function with $V _ { t h } / 2 T$ shift. See Section 5 for the detailed discussion. "
224
+ ],
225
+ "image_footnote": [],
226
+ "bbox": [
227
+ 174,
228
+ 329,
229
+ 825,
230
+ 491
231
+ ],
232
+ "page_idx": 2
233
+ },
234
+ {
235
+ "type": "text",
236
+ "text": "In the following sections, we first derive the equations for weight transform from the source ANN to target SNN. Next, we prove that the overall conversion error can be decomposed to the summation of error between source activation value and target output frequency on each layer. Finally, we estimate an optimal shift value for each layer based on the threshold balancing mechanism (Diehl et al., 2015; Sengupta et al., 2018) and formulate the overall conversion error. Putting these three parts together, we demonstrate both that our approach almost achieves the optimal solution when converting ReLU-based ANNs to spike-based SNNs. ",
237
+ "bbox": [
238
+ 173,
239
+ 588,
240
+ 825,
241
+ 688
242
+ ],
243
+ "page_idx": 2
244
+ },
245
+ {
246
+ "type": "text",
247
+ "text": "3 CONVERSION EQUATION FROM ANN TO SNN ",
248
+ "text_level": 1,
249
+ "bbox": [
250
+ 174,
251
+ 708,
252
+ 589,
253
+ 726
254
+ ],
255
+ "page_idx": 2
256
+ },
257
+ {
258
+ "type": "text",
259
+ "text": "Following the threshold balancing mechanism (Diehl et al., 2015; Sengupta et al., 2018) that copies the weight from the source ANN to the target SNN, we here derive the forward propagation of PSP through layers in the target SNN. For the $l$ -th layer in the SNN, suppose it receives its $( t + 1 )$ -th input $\\pmb { x } _ { l } ^ { \\prime } ( t + 1 )$ at time point $t + 1$ . Then there will be an additional membrane potential $W _ { l } \\cdot { \\pmb x } _ { l } ^ { \\prime } ( t + 1 ) + { \\pmb b } _ { l } ^ { \\prime }$ added to its membrane potential ${ \\mathbf { } } v ^ { l } ( t )$ at time point $t$ , resulting in a temporal potential ",
260
+ "bbox": [
261
+ 173,
262
+ 741,
263
+ 825,
264
+ 814
265
+ ],
266
+ "page_idx": 2
267
+ },
268
+ {
269
+ "type": "equation",
270
+ "img_path": "images/5aec689ec119f2e16e8ef31c8b5218c48608fd3071bd9f59e7fdac659d2ad692.jpg",
271
+ "text": "$$\n\\begin{array} { r } { { \\pmb v } _ { t e m p } ^ { l } ( t + 1 ) = { \\pmb v } ^ { l } ( t ) + W _ { l } \\cdot { \\pmb x } _ { l } ^ { \\prime } ( t + 1 ) . } \\end{array}\n$$",
272
+ "text_format": "latex",
273
+ "bbox": [
274
+ 366,
275
+ 821,
276
+ 632,
277
+ 842
278
+ ],
279
+ "page_idx": 2
280
+ },
281
+ {
282
+ "type": "text",
283
+ "text": "If any element in $\\pmb { v } _ { t e m p } ^ { l } ( t + 1 )$ exceeds $V _ { t h }$ , it would release a spike with potential $V _ { t h }$ , decrease its membrane potential by $V _ { t h }$ and update the membrane potential to ${ \\pmb v } ^ { l } ( t + 1 )$ at time point $t + 1$ . Thus we can write the membrane potential update rule as: ",
284
+ "bbox": [
285
+ 173,
286
+ 852,
287
+ 825,
288
+ 898
289
+ ],
290
+ "page_idx": 2
291
+ },
292
+ {
293
+ "type": "equation",
294
+ "img_path": "images/ae98d210a15dc0bf34da688ac9c7a6cd32d218ad5e7a6987c2f43bcd3529611f.jpg",
295
+ "text": "$$\n\\pmb { v } ^ { l } ( t + 1 ) = \\pmb { v } ^ { l } ( t ) + W _ { l } \\cdot \\pmb { x } _ { l } ^ { \\prime } ( t + 1 ) - \\pmb { \\theta } ^ { l } ( t + 1 ) ,\n$$",
296
+ "text_format": "latex",
297
+ "bbox": [
298
+ 338,
299
+ 906,
300
+ 658,
301
+ 925
302
+ ],
303
+ "page_idx": 2
304
+ },
305
+ {
306
+ "type": "text",
307
+ "text": "where $\\pmb { \\theta } ^ { l } ( t + 1 )$ equals $V _ { t h }$ to release PSP to the next layer if $v _ { t e m p } ^ { l } ( t + 1 ) \\geq V _ { t h }$ and remain as 0 if $v _ { t e m p } ^ { l } ( t + 1 ) < V _ { t h }$ . We accumulate the Eqn.4 from time 1 to $T$ , divide both sides of the equation by $T$ , and have ",
308
+ "bbox": [
309
+ 173,
310
+ 102,
311
+ 826,
312
+ 148
313
+ ],
314
+ "page_idx": 3
315
+ },
316
+ {
317
+ "type": "equation",
318
+ "img_path": "images/04c99797fe1d9920b6e2f1bb3c12d2eab1ab148d4bc5ff7f1e0f4b2732a9206e.jpg",
319
+ "text": "$$\n\\frac { \\boldsymbol { v } ^ { l } ( T ) } { T } = \\frac { \\boldsymbol { v } ^ { l } ( 0 ) } { T } + \\boldsymbol { W } _ { l } \\cdot \\sum _ { t = 1 } ^ { T } \\frac { \\boldsymbol { x } _ { l } ^ { \\prime } ( t ) } { T } - \\sum _ { t = 1 } ^ { T } \\frac { \\boldsymbol { \\theta } ^ { l } ( t ) } { T } .\n$$",
320
+ "text_format": "latex",
321
+ "bbox": [
322
+ 343,
323
+ 146,
324
+ 655,
325
+ 190
326
+ ],
327
+ "page_idx": 3
328
+ },
329
+ {
330
+ "type": "text",
331
+ "text": "We use $\\begin{array} { r } { \\mathbf { a } _ { l } ^ { \\prime } = \\sum _ { t = 1 } ^ { T } \\mathbf { x } _ { l } ^ { \\prime } ( t ) / T } \\end{array}$ to denote the averaged input to the $l$ -th layer. Then Eqn5 gives that the input to the $( l + 1 )$ -th layer equals the expected PSP of the $l$ -th layer, i.e. $\\begin{array} { r } { \\pmb { a } ^ { \\prime } _ { l + 1 } = \\sum _ { t = 1 } ^ { T } \\pmb { \\theta } ^ { l } ( t ) / T } \\end{array}$ . If we set the initial membrane potential ${ \\pmb v } ^ { l } ( 0 )$ as zero, we can reformulate the Eqn.5 as: ",
332
+ "bbox": [
333
+ 174,
334
+ 194,
335
+ 825,
336
+ 243
337
+ ],
338
+ "page_idx": 3
339
+ },
340
+ {
341
+ "type": "equation",
342
+ "img_path": "images/60f8509a790bb6a002bc92a91d75da8d3992d6b53bf39deb3574a94661943e33.jpg",
343
+ "text": "$$\n\\mathbf { } \\pmb { a } _ { l + 1 } ^ { \\prime } = W _ { l } \\cdot \\pmb { a } _ { l } ^ { \\prime } - \\frac { \\pmb { v } ^ { l } ( T ) } { T } .\n$$",
344
+ "text_format": "latex",
345
+ "bbox": [
346
+ 413,
347
+ 250,
348
+ 586,
349
+ 282
350
+ ],
351
+ "page_idx": 3
352
+ },
353
+ {
354
+ "type": "text",
355
+ "text": "When the threshold potential $V _ { t h }$ is set greater than the maximum of the source ANN’s activation values, the remained potential ${ \\pmb v } ^ { l } ( T )$ would be less than $V _ { t h }$ thus would not be output finally. With the clip-operation, the output then can be expressed as ",
356
+ "bbox": [
357
+ 173,
358
+ 286,
359
+ 825,
360
+ 329
361
+ ],
362
+ "page_idx": 3
363
+ },
364
+ {
365
+ "type": "equation",
366
+ "img_path": "images/f89f11774a13aae060283544a6679ffea833a974b50f55edb2759d0d522b7bab.jpg",
367
+ "text": "$$\na _ { l + 1 } ^ { \\prime } : = h ^ { \\prime } ( W _ { l } \\cdot a _ { l } ^ { \\prime } ) = \\frac { V _ { t h } } { T } \\cdot \\mathrm { c l i p } \\left( \\left\\lfloor \\frac { W _ { l } \\cdot a _ { l } ^ { \\prime } } { V _ { t h } / T } \\right\\rfloor , 0 , T \\right) ,\n$$",
368
+ "text_format": "latex",
369
+ "bbox": [
370
+ 316,
371
+ 335,
372
+ 679,
373
+ 371
374
+ ],
375
+ "page_idx": 3
376
+ },
377
+ {
378
+ "type": "text",
379
+ "text": "where $\\mathrm { c l i p } ( x , 0 , T ) = 0$ when $x \\leq 0$ ; $\\mathrm { c l i p } ( x , 0 , T ) = x$ when $0 < x < T$ ; and $\\mathrm { c l i p } ( x , 0 , T ) = T$ when $x \\ge T$ . So the output function of SNN is actually a step function (see the blue curve in Fig.1 B). The clipping by Eqn.7 is accurate in most cases but can be slightly different from Eqn.6 when the summation of membrane potential cancel between the positive and negative parts while the positive parts get spiked along the sequence. The forward equation for ANN is shown as the green line in Fig.1 B. Since the SNN output is discrete and in the form of floor rounding while the ANN output is continuous, there actually would be an intrinsic difference in $\\pmb { a } _ { l + 1 } ^ { \\prime }$ and $\\mathbf { \\pmb { a } } _ { l + 1 }$ as shown in Fig.1 B,C even if we equalize $\\pmb { a } _ { l } ^ { \\prime }$ and $\\mathbf { \\alpha } _ { \\mathbf { \\alpha } } \\mathbf { \\alpha } _ { \\mathbf { \\beta } } \\mathbf { \\alpha } _ { \\mathbf { \\alpha } } \\mathbf { \\alpha } _ { \\mathbf { \\beta } } \\mathbf { \\alpha } _ { \\mathbf { \\beta } } \\mathbf { \\alpha } _ { \\mathbf { \\beta } } \\mathrm { ~ \\textem ~ } \\mathbf { \\alpha } _ { \\mathbf { \\beta } } \\mathrm { ~ \\textem ~ } \\mathbf { \\alpha } _ { \\mathbf { \\beta } } \\mathrm { ~ \\textem ~ } \\mathbf { \\alpha } _ { \\mathbf { \\beta } }$ . We will analyze how to minimize this difference later. ",
380
+ "bbox": [
381
+ 173,
382
+ 375,
383
+ 826,
384
+ 489
385
+ ],
386
+ "page_idx": 3
387
+ },
388
+ {
389
+ "type": "text",
390
+ "text": "4 DECOMPOSITION OF CONVERSION ERROR ",
391
+ "text_level": 1,
392
+ "bbox": [
393
+ 174,
394
+ 508,
395
+ 558,
396
+ 526
397
+ ],
398
+ "page_idx": 3
399
+ },
400
+ {
401
+ "type": "text",
402
+ "text": "The performance of the converted SNN is determined by the source ANN performance and the conversion error. While the former one is isolated from the conversion, we discuss how to optimize the latter one here. The loss function $\\mathcal { L }$ can also be viewed as a function of the last layer output thus the conversion error can be formulated as ",
403
+ "bbox": [
404
+ 173,
405
+ 540,
406
+ 825,
407
+ 597
408
+ ],
409
+ "page_idx": 3
410
+ },
411
+ {
412
+ "type": "equation",
413
+ "img_path": "images/055b1f1a991746c2dd6a62d6b9b05e0ae8a9e0b9af41aa7bdae751d2975e9fe1.jpg",
414
+ "text": "$$\n\\Delta \\mathcal { L } : = \\mathbb { E } [ \\mathcal { L } ( \\mathbf { \\boldsymbol { a } } _ { L } ^ { \\prime } ) ] - \\mathbb { E } [ \\mathcal { L } ( \\mathbf { \\boldsymbol { a } } _ { L } ) ] ,\n$$",
415
+ "text_format": "latex",
416
+ "bbox": [
417
+ 395,
418
+ 602,
419
+ 602,
420
+ 621
421
+ ],
422
+ "page_idx": 3
423
+ },
424
+ {
425
+ "type": "text",
426
+ "text": "where the expectation is taken over the sample space. For the $l$ -th layer in the SNN, we can reversely approximate its output with the source ANN’s activation function $h ( \\cdot )$ and get ",
427
+ "bbox": [
428
+ 171,
429
+ 626,
430
+ 821,
431
+ 655
432
+ ],
433
+ "page_idx": 3
434
+ },
435
+ {
436
+ "type": "equation",
437
+ "img_path": "images/9323c0c2ba28318493fceaf9b9c2c8f7800ad6cd274897897e1ba7f0b9600c03.jpg",
438
+ "text": "$$\n\\begin{array} { r } { \\pmb { a } _ { l } ^ { \\prime } = h _ { l } ^ { \\prime } ( W _ { l } \\cdot \\pmb { a } _ { l - 1 } ^ { \\prime } ) = h _ { l } ( W _ { l } \\cdot \\pmb { a } _ { l - 1 } ^ { \\prime } ) + \\Delta \\pmb { a } _ { l } ^ { \\prime } , } \\end{array}\n$$",
439
+ "text_format": "latex",
440
+ "bbox": [
441
+ 344,
442
+ 660,
443
+ 651,
444
+ 679
445
+ ],
446
+ "page_idx": 3
447
+ },
448
+ {
449
+ "type": "text",
450
+ "text": "where $\\Delta { { a } _ { l } } ^ { \\prime }$ is the error caused by the difference between the activation functions of the ANN and SNN. The total output error $\\Delta a _ { l }$ between the source ANN and target SNN on the $l$ -th layer, i.e. the difference between the activation $\\mathbf { \\alpha } _ { \\pmb { a } _ { l } }$ and $\\pmb { a } _ { l } ^ { \\prime }$ can be approximated as ",
451
+ "bbox": [
452
+ 174,
453
+ 684,
454
+ 825,
455
+ 727
456
+ ],
457
+ "page_idx": 3
458
+ },
459
+ {
460
+ "type": "equation",
461
+ "img_path": "images/93a0e1ddaf13649bfa9d35512c121b770b1e729d9b67f0c88212d910a0163173.jpg",
462
+ "text": "$$\n\\Delta \\boldsymbol { a } _ { l } : = \\boldsymbol { a } _ { l } ^ { \\prime } - \\boldsymbol { a } _ { l } = \\Delta \\boldsymbol { a } _ { l } ^ { \\prime } + \\left[ h _ { l } ( \\boldsymbol { W } _ { l } \\cdot \\boldsymbol { a } _ { l - 1 } ^ { \\prime } ) - h _ { l } ( \\boldsymbol { W } _ { l } \\cdot \\boldsymbol { a } _ { l - 1 } ) \\right] \\approx \\Delta \\boldsymbol { a } _ { l } ^ { \\prime } + \\boldsymbol { B } _ { l } \\cdot \\boldsymbol { W } _ { l } \\cdot \\Delta \\boldsymbol { a } _ { l - 1 } ,\n$$",
463
+ "text_format": "latex",
464
+ "bbox": [
465
+ 191,
466
+ 732,
467
+ 779,
468
+ 751
469
+ ],
470
+ "page_idx": 3
471
+ },
472
+ {
473
+ "type": "text",
474
+ "text": "where the last approximation is given by the first order Taylor’s expansion, and $B _ { l }$ is the matrix with the first derivatives of $h _ { l }$ on the diagonal. Expand the loss function in Eqn.8 around $a _ { L }$ , we get ",
475
+ "bbox": [
476
+ 176,
477
+ 756,
478
+ 826,
479
+ 785
480
+ ],
481
+ "page_idx": 3
482
+ },
483
+ {
484
+ "type": "equation",
485
+ "img_path": "images/b68fe7f7c562feb949340844fcf89bb5c916e667905bd29fdfd94cdda0154297.jpg",
486
+ "text": "$$\n\\Delta \\mathcal { L } \\approx \\mathbb { E } \\left[ \\nabla _ { a _ { L } } \\mathcal { L } \\cdot \\Delta { \\boldsymbol { a } } _ { L } \\right] + \\frac { 1 } { 2 } \\mathbb { E } \\left[ { \\Delta \\boldsymbol { a } } _ { L } { } ^ { T } H _ { a _ { L } } { \\Delta \\boldsymbol { a } } _ { L } \\right] ,\n$$",
487
+ "text_format": "latex",
488
+ "bbox": [
489
+ 331,
490
+ 800,
491
+ 665,
492
+ 830
493
+ ],
494
+ "page_idx": 3
495
+ },
496
+ {
497
+ "type": "text",
498
+ "text": "where the last approximation is given by the 2-order Taylor’s expansion, and $H _ { a _ { L } }$ is the Hessian of $\\mathcal { L }$ w.r.t $a _ { L }$ . As $\\mathcal { L }$ is optimized on the source ANN, we can ignore the first term here. Thus it suffices to find $\\Delta a _ { L }$ to minimize the second term. By substituting Eqn. 10 into Eqn11, we further have ",
499
+ "bbox": [
500
+ 176,
501
+ 839,
502
+ 826,
503
+ 882
504
+ ],
505
+ "page_idx": 3
506
+ },
507
+ {
508
+ "type": "equation",
509
+ "img_path": "images/ea505a306e1fb80e93ebad2c6f613b3d7fac9cfa6d32732f82b23daa2ea2ff23.jpg",
510
+ "text": "$$\n\\begin{array} { r l } & { \\mathbb { E } [ { \\Delta a _ { L } } ^ { T } H _ { a _ { L } } { \\Delta a _ { L } } ] = \\mathbb { E } [ { \\Delta a _ { L } } ^ { \\prime T } H _ { a _ { L } } { \\Delta a _ { L } ^ { \\prime } } ] + \\mathbb { E } [ { \\Delta a _ { L - 1 } } ^ { T } B _ { L } W _ { L } ^ { T } H _ { a _ { L } } W _ { L } B _ { L } { \\Delta a _ { L - 1 } } ] } \\\\ & { \\qquad + 2 \\mathbb { E } [ { \\Delta a _ { L - 1 } } ^ { T } B _ { L } W _ { L } ^ { T } H _ { a _ { L } } { \\Delta a _ { L } ^ { \\prime } } ] , } \\end{array}\n$$",
511
+ "text_format": "latex",
512
+ "bbox": [
513
+ 205,
514
+ 887,
515
+ 766,
516
+ 931
517
+ ],
518
+ "page_idx": 3
519
+ },
520
+ {
521
+ "type": "text",
522
+ "text": "where the interaction term can either be ignored by decoupling assumption as in (Nagel et al., 2020) or dominated by the sum of the other two terms by Cauchy’s inequality. Applying similar derivation as in (Botev et al., 2017), we have $H _ { { \\pmb a } _ { l - 1 } } = B _ { l } \\dot { W _ { l } ^ { T } } H _ { { \\pmb a } _ { l } } \\dot { W _ { l } } B _ { l }$ . Then Eqn.12 can reduce to ",
523
+ "bbox": [
524
+ 174,
525
+ 103,
526
+ 825,
527
+ 147
528
+ ],
529
+ "page_idx": 4
530
+ },
531
+ {
532
+ "type": "equation",
533
+ "img_path": "images/1633b24659be163534a3132ff18a7ea4b2fcf19a5f1a5474b84b9e06ef5fed37.jpg",
534
+ "text": "$$\n\\begin{array} { r l } & { \\mathbb { E } [ { \\Delta a _ { L } } ^ { T } H _ { a _ { L } } { \\Delta a _ { L } } ] \\approx \\mathbb { E } [ { \\Delta a _ { L } } ^ { \\prime T } H _ { a _ { L } } { \\Delta a _ { L } ^ { \\prime } } ] + \\mathbb { E } [ { \\Delta a _ { L - 1 } } ^ { T } H _ { a _ { L - 1 } } { \\Delta a _ { L - 1 } } ] } \\\\ & { \\qquad = \\displaystyle \\sum _ { l } \\mathbb { E } [ { \\Delta a _ { l } } ^ { \\prime T } H _ { a _ { l } } { \\Delta a _ { l } ^ { \\prime } } ] . } \\end{array}\n$$",
535
+ "text_format": "latex",
536
+ "bbox": [
537
+ 258,
538
+ 152,
539
+ 738,
540
+ 209
541
+ ],
542
+ "page_idx": 4
543
+ },
544
+ {
545
+ "type": "text",
546
+ "text": "Here the term $H _ { a _ { l } }$ can either be approximated with the Fisher Information Matrix (Liang et al., 2019) or similarly assumed as a constant as in (Nagel et al., 2020). For simplicity, we take it as a constant and problem of minimizing the conversion error then reduce to the problem of minimizing the difference of activation values for each layer. ",
547
+ "bbox": [
548
+ 173,
549
+ 214,
550
+ 826,
551
+ 271
552
+ ],
553
+ "page_idx": 4
554
+ },
555
+ {
556
+ "type": "text",
557
+ "text": "5 LAYER-WISE AND TOTAL CONVERSION ERROR ",
558
+ "text_level": 1,
559
+ "bbox": [
560
+ 174,
561
+ 291,
562
+ 598,
563
+ 308
564
+ ],
565
+ "page_idx": 4
566
+ },
567
+ {
568
+ "type": "text",
569
+ "text": "In the previous section, we analyze that minimizing the conversion error is equivalent to minimizing output errors caused by different activation functions of the ANN and SNN on each layer. Here we further analyze how to modify the activation function so that the layer-wise error can be minimized. ",
570
+ "bbox": [
571
+ 174,
572
+ 321,
573
+ 825,
574
+ 366
575
+ ],
576
+ "page_idx": 4
577
+ },
578
+ {
579
+ "type": "text",
580
+ "text": "First, we consider two extreme cases where (1) the threshold $V _ { t h }$ is so large that the simulation time $T$ is not long enough for the neurons to fire a spike or (2) the threshold $V _ { t h }$ is so small that the neuron spikes every time and accumulates very large membrane potential after simulation (upper bound of Eqn.7). For these two cases, the remaining potential contains most of the information from ANN and it is almost impossible to convert from the source ANN to the target SNN. To eliminate these two cases, we apply the threshold ReLU instead of the regular ReLU and set the threshold voltage $V _ { t h }$ in the SNN as the threshold $y _ { t h }$ for ReLU in the ANN. ",
581
+ "bbox": [
582
+ 173,
583
+ 371,
584
+ 825,
585
+ 470
586
+ ],
587
+ "page_idx": 4
588
+ },
589
+ {
590
+ "type": "text",
591
+ "text": "Next, we further consider how to minimize the layer-wise squared difference $\\begin{array} { r l } { \\mathbb { E } | | \\Delta \\pmb { a } _ { l } ^ { \\prime } | | ^ { 2 } } & { { } = } \\end{array}$ $\\mathbb { E } | | h _ { l } ^ { \\prime } ( W \\mathbf { a } _ { l - 1 } ^ { \\prime } ) - h _ { l } ( W \\mathbf { a } _ { l - 1 } ^ { \\prime } ) | | ^ { 2 }$ . For the case of using threshold ReLU for $h _ { l }$ , the curve of $h _ { l }$ and $h _ { l } ^ { \\prime }$ are shown in Fig.1 B with their difference in Fig.1 C. We can see that when the input is equal, $h _ { l }$ and $h _ { l } ^ { \\prime }$ actually have a systematic bias that can be further optimized by either shifting $h _ { l }$ or $h _ { l } ^ { \\prime }$ . Suppose that we fix $h _ { l } ^ { \\prime }$ and shift $h _ { l }$ by $\\delta$ , the expected squared difference would be ",
592
+ "bbox": [
593
+ 173,
594
+ 476,
595
+ 825,
596
+ 549
597
+ ],
598
+ "page_idx": 4
599
+ },
600
+ {
601
+ "type": "equation",
602
+ "img_path": "images/ac568fcefb80c39ca38850a97d49b698d6a7cf5ee346ce5f8048987d075c76ec.jpg",
603
+ "text": "$$\n\\mathbb { E } _ { z } [ h _ { l } ^ { \\prime } ( z - \\delta ) - h _ { l } ( z ) ] ^ { 2 } .\n$$",
604
+ "text_format": "latex",
605
+ "bbox": [
606
+ 413,
607
+ 555,
608
+ 584,
609
+ 574
610
+ ],
611
+ "page_idx": 4
612
+ },
613
+ {
614
+ "type": "text",
615
+ "text": "If we assume that $\\pmb { z } = W \\pmb { a } _ { l - 1 } ^ { \\prime }$ is uniformly distributed within intervals $[ ( t - 1 ) V _ { t h } / T , t V _ { t h } / T ]$ for $t = 1 , . . . , T$ , optimization of the loss in Eqn.14 can then approximately be reduced to ",
616
+ "bbox": [
617
+ 174,
618
+ 580,
619
+ 825,
620
+ 609
621
+ ],
622
+ "page_idx": 4
623
+ },
624
+ {
625
+ "type": "equation",
626
+ "img_path": "images/93675c0bd38f88b0a7abe870ecd2ec5704d6f76e272631129261ef73238ba79b.jpg",
627
+ "text": "$$\n\\arg \\operatorname* { m i n } _ { \\delta } \\frac { T } { 2 } \\cdot \\left[ \\left( \\frac { V _ { t h } } { T } - \\delta \\right) ^ { 2 } + \\delta ^ { 2 } \\right] \\Rightarrow \\delta = \\frac { V _ { t h } } { 2 T } .\n$$",
628
+ "text_format": "latex",
629
+ "bbox": [
630
+ 343,
631
+ 616,
632
+ 656,
633
+ 659
634
+ ],
635
+ "page_idx": 4
636
+ },
637
+ {
638
+ "type": "text",
639
+ "text": "Thus the total conversion error can be approximately estimated as ",
640
+ "bbox": [
641
+ 174,
642
+ 665,
643
+ 606,
644
+ 680
645
+ ],
646
+ "page_idx": 4
647
+ },
648
+ {
649
+ "type": "equation",
650
+ "img_path": "images/16fae541516e8206ebf90c28f99bd87d634a62470be50c450f543cc55003d11a.jpg",
651
+ "text": "$$\n\\Delta \\mathcal { L } _ { \\operatorname* { m i n } } \\approx \\frac { L V _ { t h } ^ { 2 } } { 4 T } ,\n$$",
652
+ "text_format": "latex",
653
+ "bbox": [
654
+ 441,
655
+ 685,
656
+ 555,
657
+ 718
658
+ ],
659
+ "page_idx": 4
660
+ },
661
+ {
662
+ "type": "text",
663
+ "text": "which explicitly indicates how the low threshold value and long simulation time decrease the conversion error. In practice, the optimal shift may be different from $V _ { t h } / 2 T$ . As we illustrate above, the effect of shift is to minimize the difference between the output of the source ANN and the target SNN rather than optimizing the accuracy of SNN directly. Thus the optimal shift is affected by both the distribution of activation values and the level of overfitting in the source ANN and target SNN. ",
664
+ "bbox": [
665
+ 174,
666
+ 723,
667
+ 825,
668
+ 795
669
+ ],
670
+ "page_idx": 4
671
+ },
672
+ {
673
+ "type": "text",
674
+ "text": "The conversion pipeline is summarized in Algorithm 1 where the source ANN is pre-trained with threshold ReLU. The threshold voltage $V _ { t h }$ can also be calculated along the training procedure. ",
675
+ "bbox": [
676
+ 174,
677
+ 800,
678
+ 823,
679
+ 829
680
+ ],
681
+ "page_idx": 4
682
+ },
683
+ {
684
+ "type": "text",
685
+ "text": "6 RELATED WORK ",
686
+ "text_level": 1,
687
+ "bbox": [
688
+ 176,
689
+ 849,
690
+ 344,
691
+ 866
692
+ ],
693
+ "page_idx": 4
694
+ },
695
+ {
696
+ "type": "text",
697
+ "text": "Cao et al. (2015) first propose to convert ANNs with the ReLU activation function to SNNs. This work achieves good results on simple datasets but can not scale to large networks on complex data sets. Following Cao et al. (2015), the weight-normalization method is proposed to convert a ",
698
+ "bbox": [
699
+ 174,
700
+ 881,
701
+ 825,
702
+ 924
703
+ ],
704
+ "page_idx": 4
705
+ },
706
+ {
707
+ "type": "text",
708
+ "text": "Algorithm 1 Conversion from the Source ANN to the Target SNN with Shared Weights \nRequire: Pre-trained source ANN, training set, target SNN’s simulation length $T$ . \nEnsure: The converted SNN approximates the performance of source ANN with an ignorable error. 1: Initial $V _ { t h } ^ { l } = 0$ , for $l = 1 , \\cdots , L$ to save the threshold value for each SNN layer. \n2: for $s = 1$ to $\\#$ of samples do \n3: $\\mathbf { a } _ { l } \\gets$ layer-wise activation value \n4: 5: for $l = 1$ $L$ \n$V _ { t h } ^ { l } = \\operatorname* { m a x } [ V _ { t h } ^ { l } , \\operatorname* { m a x } ( { \\bf a } _ { l } ) ]$ \n6: end for \n7: end for \n8: for 9: $l = 1$ to lay $L$ d[l]. \n$. V _ { t h } V _ { t h } ^ { l }$ \n10: SNN.layer $[ l ]$ .weight $\\gets$ ANN.layer[l].weight \n11: SNN.layer[l].bias ANN.layer[l].bias $+ \\overline { { V } } _ { t h } ^ { l } / 2 T$ \n12: end for ",
709
+ "bbox": [
710
+ 176,
711
+ 99,
712
+ 823,
713
+ 316
714
+ ],
715
+ "page_idx": 5
716
+ },
717
+ {
718
+ "type": "text",
719
+ "text": "three-layer CNN structure without bias to SNN (Diehl et al., 2015; 2016). The spike subtraction mechanism (Rueckauer et al., 2016), also called soft-reset (Han et al., 2020), is proposed to eliminate the information loss caused by potential resetting. More recently, Sengupta et al. (2018) use SPiKE-NORM to obtain deep SNNs like VGG-16 and ResNet-20, and Kim et al. (2019) utilize SNN for object recognition. ",
720
+ "bbox": [
721
+ 174,
722
+ 342,
723
+ 825,
724
+ 411
725
+ ],
726
+ "page_idx": 5
727
+ },
728
+ {
729
+ "type": "text",
730
+ "text": "The most commonly used conversion method is threshold balancing (Sengupta et al., 2018), which is equivalent to weight normalization (Diehl et al., 2015; Rueckauer et al., 2016). The neurons in the source ANN are directly converted into those in the target SNN without changing their weights and biases. The threshold voltage of each layer in the target SNN is the maximum output of the corresponding layers in the source ANN. The soft reset mechanism (Rueckauer et al., 2017; Han et al., 2020) is effective in reducing the information loss by replacing the reset potential $V _ { r e s t }$ in the hard reset mechanism with the difference between membrane potential $V$ and threshold voltage $V _ { t h }$ so that the remaining potential is still informative of the activation values. Another big issue for the direct conversion is the varied range of activation for different neurons, which results in a very long simulation time to activate those neurons with high activation threshold values. Rueckauer et al. (2017) suggests using the $p$ -th largest outputs instead of the largest one as the weights normalization scale to shrink the ranges. Kim et al. (2019) applies threshold-balance on the channel level rather than the layer level for better adaption. Rathi et al. (2019) initializes the converted SNNs with roughly trained ANNs to shorten simulation length by further fine-training the SNN with STDP and backpropagation. Han et al. (2020), Han & Roy (2020) adjust the threshold and weight scaling factor adapted to the input and output spike frequencies. ",
731
+ "bbox": [
732
+ 174,
733
+ 419,
734
+ 825,
735
+ 641
736
+ ],
737
+ "page_idx": 5
738
+ },
739
+ {
740
+ "type": "text",
741
+ "text": "7 EXPERIMENTS ",
742
+ "text_level": 1,
743
+ "bbox": [
744
+ 176,
745
+ 661,
746
+ 326,
747
+ 676
748
+ ],
749
+ "page_idx": 5
750
+ },
751
+ {
752
+ "type": "text",
753
+ "text": "In this section, we validate our derivation above and compare our methods with existing approaches via converting CIFAR-Net, VGG-16, and ResNet-20 on CIFAR-10, CIFAR-100, and ImageNet. See Appendix A.1 for the details of the network infrastructure and training parameters. ",
754
+ "bbox": [
755
+ 176,
756
+ 693,
757
+ 823,
758
+ 734
759
+ ],
760
+ "page_idx": 5
761
+ },
762
+ {
763
+ "type": "text",
764
+ "text": "7.1 ANN PERFORMANCE WITH THRESHOLD RELU ",
765
+ "text_level": 1,
766
+ "bbox": [
767
+ 174,
768
+ 751,
769
+ 539,
770
+ 765
771
+ ],
772
+ "page_idx": 5
773
+ },
774
+ {
775
+ "type": "text",
776
+ "text": "We first evaluate the impact of modifying ReLU on the source ANN from the perspective of maximum activation value distribution and classification accuracy. A smaller range of activation values will benefit the conversion and but may potentially result in lower representativity for the ANN. ",
777
+ "bbox": [
778
+ 176,
779
+ 776,
780
+ 821,
781
+ 819
782
+ ],
783
+ "page_idx": 5
784
+ },
785
+ {
786
+ "type": "text",
787
+ "text": "We set the threshold value $y _ { t h } = 1$ on CIFAR-10, $y _ { t h } = 2$ on CIFAR-100 and examine the impact of threshold on the distribution of activation values. From Fig.2A, we can see that the threshold operation significantly reduces the variation of maximum activation values across layers and the shift-operation won’t cause any additional impact significantly. This suggests that with the modified ReLU, the threshold voltage $V _ { t h }$ of spiking could be more effective to activate different layers. We next look into the classification accuracy when modifying the ReLU with threshold and shift. Comparisons on CIFAR-10 and CIFAR-100 are shown in Fig.2B. On the CIFAR-10, the performance of networks with modified ReLU actually get enhanced for all three infrastructures $( + 0 . 1 8 \\%$ on CIFAR-Net, $+ 0 . 2 6 \\%$ on VGG-16 and $+ 1 . 2 8 \\%$ on ResNet-20). On the CIFAR-100 dataset, the method of adding threshold results in a slight decrease in accuracy on VGG-16 $( - 0 . 1 6 \\% )$ , but a huge increase on ResNet-20 $( + 2 . 7 8 \\% )$ . These results support that the threshold ReLU can serve as a reasonable source for the ANN to SNN conversion. ",
788
+ "bbox": [
789
+ 174,
790
+ 825,
791
+ 823,
792
+ 924
793
+ ],
794
+ "page_idx": 5
795
+ },
796
+ {
797
+ "type": "image",
798
+ "img_path": "images/a8ec047c1a6979c6d019104a772440d6149b2d69c96d2468771fdd5638a804f4.jpg",
799
+ "image_caption": [
800
+ "Figure 2: Impact of threshold on ANN. (A)Maximum activations of VGG-16’s layers on CIFAR-10. (B) The accuracy of ANN with regular or threshold ReLU on different networks. Average over 5 repeats on CIFAR-10 and 3 repeats on CIFAR-100. "
801
+ ],
802
+ "image_footnote": [],
803
+ "bbox": [
804
+ 220,
805
+ 101,
806
+ 781,
807
+ 248
808
+ ],
809
+ "page_idx": 6
810
+ },
811
+ {
812
+ "type": "text",
813
+ "text": "",
814
+ "bbox": [
815
+ 174,
816
+ 342,
817
+ 825,
818
+ 411
819
+ ],
820
+ "page_idx": 6
821
+ },
822
+ {
823
+ "type": "text",
824
+ "text": "7.2 IMPACT OF SIMULATION LENGTH AND SHIFT ON CLASSIFICATION ACCURACY ",
825
+ "text_level": 1,
826
+ "bbox": [
827
+ 173,
828
+ 444,
829
+ 746,
830
+ 457
831
+ ],
832
+ "page_idx": 6
833
+ },
834
+ {
835
+ "type": "text",
836
+ "text": "In this part, we further explore whether adding threshold and shift to the activation function will affect the simulation length $( T )$ required for the converted SNN to match the source ANN in classification accuracy and how shift operation affects differently in different periods of simulation. ",
837
+ "bbox": [
838
+ 173,
839
+ 473,
840
+ 826,
841
+ 516
842
+ ],
843
+ "page_idx": 6
844
+ },
845
+ {
846
+ "type": "image",
847
+ "img_path": "images/6129205793d282b9a402036496edc07b6edc983f5bbf13576f5d7f17ed02497f.jpg",
848
+ "image_caption": [
849
+ "Figure 3: Impact of threshold and shift on convergence for converting ResNet-20 on CIFAR-100. (A) SNN’s accuracy losses w.r.t different simulation lengths. (B-D) Optimal shifts w.r.t different activation functions and simulation lengths. "
850
+ ],
851
+ "image_footnote": [],
852
+ "bbox": [
853
+ 189,
854
+ 540,
855
+ 812,
856
+ 647
857
+ ],
858
+ "page_idx": 6
859
+ },
860
+ {
861
+ "type": "text",
862
+ "text": "From Fig.3A, we can see that no matter applied separately or together, the threshold and shift operations always significantly shorten the simulation length to less than 100 when the accuracy loss is much smaller than using regular ReLU with $T \\approx 2 0 0$ . When $T < 5 0$ , the combination of threshold and shift achieves the fastest convergence and the adoption of threshold is more efficient than shift. However, the difference is minor when simulating with $T > 1 0 0$ . This inspires us to further explore the impact of shift at different simulation length. From the green and blue lines in Fig.2A and accuracy changes w.r.t the variation of shift scales in Fig.2B, we can conclude that the shift by $V _ { t h } / 2 T$ is almost always optimal even when $T = 2 0 0$ for the source ANN with regular ReLU. However, the shift works differently when the ReLU is with threshold. When the simulation length is very short like $T = 1 6$ , the conversion can benefit hugely $( > 0 . 3 0$ accuracy improvement) from the derived optimal shift (see Fig.2C). When the simulation length is long enough, the shift mechanism no longer works and may slightly damage the accuracy (Fig.2D) while adding threshold alone will almost eliminate the conversion error that consistently remains above zero in the original threshold balancing approach (Diehl et al., 2015; Sengupta et al., 2018) as shown in Appendix Fig.4. ",
863
+ "bbox": [
864
+ 173,
865
+ 729,
866
+ 825,
867
+ 924
868
+ ],
869
+ "page_idx": 6
870
+ },
871
+ {
872
+ "type": "text",
873
+ "text": "7.3 COMPARISON WITH RELATED WORK ",
874
+ "text_level": 1,
875
+ "bbox": [
876
+ 178,
877
+ 104,
878
+ 464,
879
+ 117
880
+ ],
881
+ "page_idx": 7
882
+ },
883
+ {
884
+ "type": "text",
885
+ "text": "In order to validate the effectiveness of the whole proposed pipeline, here we compare our method with SPIKE-NORM (Sengupta et al., 2018), Hybrid Training (Rathi et al., 2019), RMP (Han et al., 2020), TSC(Han & Roy, 2020) and direct training method including STBP (Wu et al., 2019) and TSSL-BP (Zhang & Li, 2020) through classification tasks on CIFAR-10, CIFAR-100 and ImageNet (Table.1). For the network with relatively light infrastructure like CIFAR-Net, our model can converge to $> 9 0 \\%$ accuracy within 16 simulation steps. Direct training methods like STBP and TSSLBP are feasible to achieve a high accuracy with short simulation length. However, their training cost is high due to RNN-like manner in the training procedure and cannot extend to complex network infrastructures like VGG-16 and ResNet-20. RMP and TSC achieve the highest accuracy for SNN with VGG-16, probably a result from more accurate pre-trained source ANNs. For ResNet-20, our model outperforms the compared models not only in accuracy but also in the simulation length. ",
886
+ "bbox": [
887
+ 174,
888
+ 131,
889
+ 825,
890
+ 284
891
+ ],
892
+ "page_idx": 7
893
+ },
894
+ {
895
+ "type": "table",
896
+ "img_path": "images/e68b5680eac9a8c9cadc38b156accb986be92fe0e29ad913b6481c7246c566b8.jpg",
897
+ "table_caption": [
898
+ "Table 1: Comparison between our work and other conversion methods. The conversion loss is reported as the accuracy difference $( a c c _ { A N N } - a c c _ { S N N } )$ between the source ANN with regular ReLU and threshold ReLU (in brackets) and the converted SNN. Ourwork-X-TS denotes the SNN converted from the source ANN with both threshold (T) ReLU and shift (S). "
899
+ ],
900
+ "table_footnote": [],
901
+ "table_body": "<table><tr><td rowspan=\"2\">Method</td><td colspan=\"3\">CIFAR-10+CIFAR-Net</td><td rowspan=\"2\"></td><td colspan=\"2\" rowspan=\"2\">CIFAR-10 +VGG-16</td><td rowspan=\"2\"></td><td colspan=\"2\">CIFAR-10 +ResNet-20</td></tr><tr><td>Accuracy</td><td>Conversion Loss</td><td>Length Accuracy</td><td>Conversion Loss Length Accuracy</td><td>Conversion Loss</td><td>Length</td></tr><tr><td>STBP(w/o NeuNorm)</td><td>89.83%</td><td>0.66%</td><td>8</td><td></td><td>NA</td><td></td><td></td><td>NA</td><td></td></tr><tr><td>STBP(w/NeuNorm)</td><td>90.53%</td><td>-0.04%</td><td>8</td><td></td><td>NA</td><td></td><td></td><td>NA</td><td></td></tr><tr><td>TSSL-BP</td><td>91.41%</td><td>-0.92%</td><td>5</td><td></td><td>NA</td><td></td><td></td><td>NA</td><td></td></tr><tr><td>SPIKE-NORM</td><td></td><td>NA</td><td></td><td>91.55%</td><td>0.15%</td><td>2500</td><td>87.46%</td><td>1.64%</td><td>2500</td></tr><tr><td>RMP</td><td></td><td>NA</td><td></td><td>93.63%</td><td>0.01%</td><td>1536</td><td>91.36%</td><td>0.11%</td><td>2048</td></tr><tr><td>Hybrid Training</td><td></td><td>NA</td><td></td><td>91.13%</td><td>1.68%</td><td>100</td><td>92.22%</td><td>0.93%</td><td>250</td></tr><tr><td>TSC</td><td></td><td>NA</td><td></td><td>93.63%</td><td>0.00%</td><td>2048</td><td>91.42%</td><td>0.05%</td><td>1536</td></tr><tr><td>Our Work-1-TS</td><td>90.22%</td><td>0.06%(0.41%)</td><td>16</td><td>92.29%</td><td>-0.2%(0.05%)</td><td>16</td><td>92.41%</td><td>-0.09%(1.20%)</td><td>16</td></tr><tr><td>Our Work-2-TS</td><td>90.46%</td><td>-0.18%(0.17%)</td><td>32</td><td>92.29%</td><td>-0.2%(0.05%)</td><td>32</td><td>93.30%</td><td>-0.98%(0.31%)</td><td>32</td></tr><tr><td>Our Work-3-TS</td><td>90.58%</td><td>-0.20%(0.05%)</td><td>64</td><td>92.22%</td><td>-0.13%(0.12%)</td><td>64</td><td>93.55%</td><td>-1.23%(0.06%)</td><td>64</td></tr><tr><td>Our Work-4-TS</td><td>90.58%</td><td>-0.20%(0.05%)</td><td>128</td><td>92.24%</td><td>-0.15%(0.10%)</td><td>128</td><td>93.56%</td><td>-1.25%(0.05%)</td><td>128</td></tr><tr><td>Our Work-5-T</td><td>90.61%</td><td>-0.23%(0.02%)</td><td>400-600</td><td>92.26%</td><td>-0.17%(0.08%)</td><td>400-600</td><td>93.58%</td><td>-1.26%(0.03%)</td><td>400-600</td></tr><tr><td>Our Work-6-S</td><td>90.13%</td><td>0.05%</td><td>512</td><td>92.03%</td><td>0.06%</td><td>512</td><td>92.14%</td><td>0.18%</td><td>512</td></tr><tr><td></td><td></td><td>CIFAR-100+VGG-16</td><td></td><td></td><td>CIFAR-100+ResNet20</td><td></td><td></td><td>ImageNet+ VGG-16</td><td></td></tr><tr><td>Method</td><td>Accuracy</td><td>Conversion Loss</td><td>Length</td><td>Accuracy</td><td>Conversion Loss</td><td>Length</td><td>Accuracy</td><td>Conversion Loss</td><td>Length</td></tr><tr><td>SPIKE-NORM</td><td>70.77%</td><td>0.45%</td><td>2500</td><td>64.09%</td><td>4.63%</td><td>2500</td><td>69.96%</td><td>0.56%</td><td>2500</td></tr><tr><td>RMP</td><td>70.93%</td><td>0.29%</td><td>2048</td><td>67.82%</td><td>0.9%</td><td>2048</td><td>73.09%</td><td>0.4%</td><td>4096</td></tr><tr><td>Hybrid Training</td><td></td><td>NA</td><td></td><td></td><td>NA</td><td></td><td>65.19%</td><td>4.16%</td><td>250</td></tr><tr><td>TSC</td><td>70.97%</td><td>0.25%</td><td>1024</td><td>68.18%</td><td>0.54%</td><td>2048</td><td>73.46%</td><td>0.03%</td><td>2560</td></tr><tr><td>Our Work-1-TS</td><td>65.94%</td><td>4.68%(4.55%)</td><td>16</td><td>63.73%</td><td>3.35%(6.07%)</td><td>16</td><td>55.80%</td><td>16.6%(16.38%)</td><td>16</td></tr><tr><td>Our Work-2-TS</td><td>69.80%</td><td>0.82%(0.69%)</td><td>32</td><td>68.40%</td><td>-1.32%(1.40%)</td><td>32</td><td>67.73%</td><td>4.67%(4.45%)</td><td>32</td></tr><tr><td>Our Work-3-TS</td><td>70.35%</td><td>0.27%(0.14%)</td><td>64</td><td>69.27%</td><td>-2.19%(0.53%)</td><td>64</td><td>70.97%</td><td>1.43%(1.21%)</td><td>64</td></tr><tr><td>Our Work-4-TS</td><td>70.47%</td><td>0.15%(0.02%)</td><td>128</td><td>69.49%</td><td>-2.41%(0.31%)</td><td>128</td><td>71.89%</td><td>0.51%(0.29%)</td><td>128</td></tr><tr><td>Our Work-5-T</td><td>70.55%</td><td>0.07%(-0.06%)</td><td>400-600</td><td>69.82%</td><td>-2.74%(-0.02%)</td><td>400-600</td><td>72.17%</td><td>0.23%(0.01%)</td><td>400-600</td></tr><tr><td>Our Work-6-S</td><td>70.28%</td><td>0.31%</td><td>512</td><td>66.63%</td><td>0.45%</td><td>512</td><td>72.34%</td><td>0.06%</td><td>512</td></tr></table>",
902
+ "bbox": [
903
+ 174,
904
+ 383,
905
+ 825,
906
+ 617
907
+ ],
908
+ "page_idx": 7
909
+ },
910
+ {
911
+ "type": "text",
912
+ "text": "We next pay attention to the accuracy loss during the conversion. For VGG-16, our proposed model averaged on length 400-600 achieves a similar loss with RMP on CIFAR-10 $( \\approx 0 . 0 1 \\% )$ . On CIFAR100 and ImageNet, our model maintains the lowest loss compared to both the ANN trained with regular ReLU and threshold ReLU. For ResNet-20, there appears an interesting phenomenon that the conversion to SNN actually improves rather than damage the accuracy. Compared with the source ANN trained with regular ReLU, the accuracy of our converted SNN has a dramatic increase with $1 . 2 6 \\%$ on CIFAR-10 and $2 . 7 4 \\%$ on CIFAR-100. This may be a result from the fact that the source ANN for conversion is not compatible with the batch normalization and max pooling thus bears a deficit by overfitting that can be reduced by the threshold and discretization of converting to SNN. ",
913
+ "bbox": [
914
+ 174,
915
+ 638,
916
+ 825,
917
+ 776
918
+ ],
919
+ "page_idx": 7
920
+ },
921
+ {
922
+ "type": "text",
923
+ "text": "In addition to the excellence in accuracy, our model is even more advantageous in the simulation length. When we combine the threshold ReLU with shift operation through the layer-wise approximation, our model can achieve a comparable performance with RMP for VGG-16 with 16 simulation steps on CIFAR-10 and 32 simulation steps on CIFAR-100, much shorter than that of RMP (1536 on CIFAR-10, 2048 on CIFAR-100). Similar comparisons are observed on ResNet-20 with better performance than RMP, TSC, SPIKE-NORM and Hybrid Training. On ImageNet, although we do not achieve the highest accuracy due to the constraint of accurate source ANN and short simulation length, we can still observe that the 400-600 simulation steps can return a conversion error smaller than that of RMP, TSC and SPIKE-NORM with 4096 and 2500 steps correspondingly. When the simulation length is 512, the conversion with only shift operation works accurately enough as well. ",
924
+ "bbox": [
925
+ 173,
926
+ 785,
927
+ 825,
928
+ 924
929
+ ],
930
+ "page_idx": 7
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "See Appendix A.2 for the repeated tests averaged with simulation length 400 to 600 and Appendix A.3 for the comparison with RMP and TSC when the simulation length is aligned on a short level. ",
935
+ "bbox": [
936
+ 171,
937
+ 103,
938
+ 823,
939
+ 132
940
+ ],
941
+ "page_idx": 8
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "The proposed algorithm can potentially work for the conversion of recurrent neural network (RNN) as well. See Appendix A.4 for an illustrative example that demonstrates the superiority of the current work over directly-training approach when the source architecture is an RNN. ",
946
+ "bbox": [
947
+ 176,
948
+ 138,
949
+ 823,
950
+ 181
951
+ ],
952
+ "page_idx": 8
953
+ },
954
+ {
955
+ "type": "text",
956
+ "text": "8 DISCUSSION ",
957
+ "text_level": 1,
958
+ "bbox": [
959
+ 176,
960
+ 202,
961
+ 310,
962
+ 218
963
+ ],
964
+ "page_idx": 8
965
+ },
966
+ {
967
+ "type": "text",
968
+ "text": "Since Cao et al. (2015) first proposed conversion from ANN with ReLU to SNN, there have been many follow-up works (Diehl et al., 2016; Rueckauer et al., 2016; Sengupta et al., 2018; Han et al., 2020) to optimize the conversion procedure. But they fail to theoretically analyze the conversion error for the whole network and neglect to ask what types of ANNs are easier to transform. We fill this gap and performed a series of experiments to prove their effectiveness. ",
969
+ "bbox": [
970
+ 174,
971
+ 232,
972
+ 825,
973
+ 303
974
+ ],
975
+ "page_idx": 8
976
+ },
977
+ {
978
+ "type": "text",
979
+ "text": "Our theoretical decomposition of conversion error actually allows a new perspective of viewing the conversion problem from ANNs to SNNs. Indeed, the way we decompose the error on activation values works for the problem of network quantization (Nagel et al., 2020) as well. This is because the perturbation in edge weight, activation function and values would all affect the following layers through the output values of the current layer. However, one limitation to point out here is that the interaction term in Eqn.12 may not be small enough to ignore when different layers are strongly coupled in the infrastructure. In this case, the layer-wise recursion is suboptimal and blockwise approaches may help for further optimization. The trade-off between representativity and generalizability applies for the adoption of threshold ReLU in the training of ANN and provides an intuitive interpretation on why our converted SNN outperforms the source ResNet-20 in the conversion. ",
980
+ "bbox": [
981
+ 174,
982
+ 309,
983
+ 825,
984
+ 449
985
+ ],
986
+ "page_idx": 8
987
+ },
988
+ {
989
+ "type": "text",
990
+ "text": "We also show that shift operation is necessary for the conversion considering the difference between ReLU and step function. This difference has also been noticed in direct training approach as well. Wu et al. (2018; 2019) use a modified sign function to model the surrogate gradient. This choice makes the surrogate curve coincide with the red line in Fig.2B. Yet, we need to point out that the shift operation cannot ensure the improvement when the simulation length is long enough. We can understand the shift operation as an approach to pull the target SNN to the source ANN. At the same time, pulling the SNN to ANN also causes it to reduce the generalizability out of discretization. As we describe above, the target SNN is possible to outperform the source ANN by benefiting more generalizability than losing the representativity. In this case, it makes no sense to pull the target SNN model back to the source ANN anymore. This is potentially the reason why the optimal shift is no longer $V _ { t h } / 2 T$ when the simulation length is long enough to make the target SNN hardly gain more representativity than lose generalizability by getting closer to the source ANN. ",
991
+ "bbox": [
992
+ 174,
993
+ 455,
994
+ 825,
995
+ 622
996
+ ],
997
+ "page_idx": 8
998
+ },
999
+ {
1000
+ "type": "text",
1001
+ "text": "Compared to the direct training approach of SNNs, one big limitation of converting SNNs from ANNs is the simulation length. Although SNNs can reduce the energy cost in the forward process (Deng et al., 2020), the huge simulation length will limit this advantage. Our method greatly reduces the simulation length required by the converted SNNs, especially for large networks and can be combined with other optimization methods in Spiking-YOLO, SPIKE-NORM and RMP. Further, as we point above about the duality between input $\\mathbf { x }$ and edge weight w, future optimization could potentially reduce the simulation length to about $2 ^ { 4 } = 1 6$ that is equivalent to 4 bits in network quantization with very tiny accuracy loss. ",
1002
+ "bbox": [
1003
+ 174,
1004
+ 628,
1005
+ 825,
1006
+ 741
1007
+ ],
1008
+ "page_idx": 8
1009
+ },
1010
+ {
1011
+ "type": "text",
1012
+ "text": "In the future, it makes the framework more practical if we can extend it to converting source ANN trained with batch normalization and activation functions taking both positive and negative values. ",
1013
+ "bbox": [
1014
+ 174,
1015
+ 747,
1016
+ 825,
1017
+ 775
1018
+ ],
1019
+ "page_idx": 8
1020
+ },
1021
+ {
1022
+ "type": "text",
1023
+ "text": "9 ACKNOWLEDGMENT ",
1024
+ "text_level": 1,
1025
+ "bbox": [
1026
+ 176,
1027
+ 796,
1028
+ 377,
1029
+ 811
1030
+ ],
1031
+ "page_idx": 8
1032
+ },
1033
+ {
1034
+ "type": "text",
1035
+ "text": "This project is primarily supported by NSFC 61876032. ",
1036
+ "bbox": [
1037
+ 174,
1038
+ 827,
1039
+ 540,
1040
+ 843
1041
+ ],
1042
+ "page_idx": 8
1043
+ },
1044
+ {
1045
+ "type": "text",
1046
+ "text": "REFERENCES ",
1047
+ "text_level": 1,
1048
+ "bbox": [
1049
+ 176,
1050
+ 102,
1051
+ 287,
1052
+ 117
1053
+ ],
1054
+ "page_idx": 9
1055
+ },
1056
+ {
1057
+ "type": "text",
1058
+ "text": "Simone Acciarito, Gian Carlo Cardarilli, Alessandro Cristini, Luca Di Nunzio, Rocco Fazzolari, Gaurav Mani Khanal, Marco Re, and Gianluca Susi. Hardware design of lif with latency neuron model with memristive stdp synapses. Integration, 59:81 – 89, 2017. ",
1059
+ "bbox": [
1060
+ 174,
1061
+ 126,
1062
+ 825,
1063
+ 167
1064
+ ],
1065
+ "page_idx": 9
1066
+ },
1067
+ {
1068
+ "type": "text",
1069
+ "text": "Michele Barbi, Santi Chillemi, Angelo Di Garbo, and Lara Reale. Stochastic resonance in a sinusoidally forced lif model with noisy threshold. Biosystems, 71(1-2):23–28, 2003. ",
1070
+ "bbox": [
1071
+ 171,
1072
+ 176,
1073
+ 821,
1074
+ 205
1075
+ ],
1076
+ "page_idx": 9
1077
+ },
1078
+ {
1079
+ "type": "text",
1080
+ "text": "Aleksandar Botev, Hippolyt Ritter, and David Barber. Practical gauss-newton optimisation for deep learning. arXiv preprint arXiv:1706.03662, 2017. ",
1081
+ "bbox": [
1082
+ 173,
1083
+ 213,
1084
+ 823,
1085
+ 242
1086
+ ],
1087
+ "page_idx": 9
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "Yongqiang Cao, Yang Chen, and Deepak Khosla. Spiking deep convolutional neural networks for energy-efficient object recognition. International Journal of Computer Vision, 113(1):54−−66, 2015. ",
1092
+ "bbox": [
1093
+ 176,
1094
+ 250,
1095
+ 823,
1096
+ 292
1097
+ ],
1098
+ "page_idx": 9
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "Lei Deng, Yujie Wu, Xing Hu, Ling Liang, Yufei Ding, Guoqi Li, Guangshe Zhao, Peng Li, and Yuan Xie. Rethinking the performance comparison between snns and anns. Neural Networks, 121:294 – 307, 2020. ",
1103
+ "bbox": [
1104
+ 174,
1105
+ 301,
1106
+ 823,
1107
+ 344
1108
+ ],
1109
+ "page_idx": 9
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "Peter U Diehl and Matthew Cook. Efficient implementation of stdp rules on spinnaker neuromorphic hardware. In 2014 International Joint Conference on Neural Networks (IJCNN), pp. 4288–4295. IEEE, 2014. ",
1114
+ "bbox": [
1115
+ 174,
1116
+ 352,
1117
+ 823,
1118
+ 395
1119
+ ],
1120
+ "page_idx": 9
1121
+ },
1122
+ {
1123
+ "type": "text",
1124
+ "text": "Peter U. Diehl, Daniel Neil, Jonathan Binas, Matthew Cook, Shih-Chii Liu, and Michael Pfeiffer. Fast-classifying, high-accuracy spiking deep networks through weight and threshold balancing. 2015 International Joint Conference on Neural Networks (IJCNN), pp. 1–8, 2015. ",
1125
+ "bbox": [
1126
+ 173,
1127
+ 404,
1128
+ 821,
1129
+ 446
1130
+ ],
1131
+ "page_idx": 9
1132
+ },
1133
+ {
1134
+ "type": "text",
1135
+ "text": "Peter U Diehl, Guido Zarrella, Andrew Cassidy, Bruno U Pedroni, and Emre Neftci. Conversion of artificial recurrent neural networks to spiking neural networks for low-power neuromorphic hardware. In 2016 IEEE International Conference on Rebooting Computing (ICRC), pp. 1–8. IEEE, 2016. ",
1136
+ "bbox": [
1137
+ 173,
1138
+ 454,
1139
+ 825,
1140
+ 511
1141
+ ],
1142
+ "page_idx": 9
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "Bing Han and Kaushik Roy. Deep spiking neural network: Energy efficiency through time based coding. In European Conference on Computer Vision, 2020. ",
1147
+ "bbox": [
1148
+ 174,
1149
+ 518,
1150
+ 823,
1151
+ 549
1152
+ ],
1153
+ "page_idx": 9
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "Bing Han, Gopalakrishnan Srinivasan, and Kaushik Roy. Rmp-snn: Residual membrane potential neuron for enabling deeper high-accuracy and low-latency spiking neural network. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13558–13567, 2020. ",
1158
+ "bbox": [
1159
+ 174,
1160
+ 556,
1161
+ 825,
1162
+ 612
1163
+ ],
1164
+ "page_idx": 9
1165
+ },
1166
+ {
1167
+ "type": "text",
1168
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Sun Jian. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, 2016. ",
1169
+ "bbox": [
1170
+ 173,
1171
+ 621,
1172
+ 823,
1173
+ 650
1174
+ ],
1175
+ "page_idx": 9
1176
+ },
1177
+ {
1178
+ "type": "text",
1179
+ "text": "Alan L Hodgkin and Andrew F Huxley. A quantitative description of membrane current and its application to conduction and excitation in nerve. The Journal of physiology, 117(4):500–544, 1952a. ",
1180
+ "bbox": [
1181
+ 174,
1182
+ 659,
1183
+ 825,
1184
+ 700
1185
+ ],
1186
+ "page_idx": 9
1187
+ },
1188
+ {
1189
+ "type": "text",
1190
+ "text": "Allan L Hodgkin and Andrew F Huxley. Currents carried by sodium and potassium ions through the membrane of the giant axon of loligo. The Journal of physiology, 116(4):449–472, 1952b. ",
1191
+ "bbox": [
1192
+ 173,
1193
+ 708,
1194
+ 823,
1195
+ 738
1196
+ ],
1197
+ "page_idx": 9
1198
+ },
1199
+ {
1200
+ "type": "text",
1201
+ "text": "Eugene M Izhikevich. Resonate-and-fire neurons. Neural networks, 14(6-7):883–894, 2001. ",
1202
+ "bbox": [
1203
+ 173,
1204
+ 746,
1205
+ 779,
1206
+ 762
1207
+ ],
1208
+ "page_idx": 9
1209
+ },
1210
+ {
1211
+ "type": "text",
1212
+ "text": "Eugene M Izhikevich. Simple model of spiking neurons. IEEE Transactions on neural networks, 14(6):1569–1572, 2003. ",
1213
+ "bbox": [
1214
+ 173,
1215
+ 768,
1216
+ 823,
1217
+ 799
1218
+ ],
1219
+ "page_idx": 9
1220
+ },
1221
+ {
1222
+ "type": "text",
1223
+ "text": "Seijoon Kim, Seongsik Park, Byunggook Na, and Sungroh Yoon. Spiking-yolo: Spiking neural network for energy-efficient object detection. arXiv preprint arXiv:1903.06530, 2019. ",
1224
+ "bbox": [
1225
+ 173,
1226
+ 806,
1227
+ 823,
1228
+ 837
1229
+ ],
1230
+ "page_idx": 9
1231
+ },
1232
+ {
1233
+ "type": "text",
1234
+ "text": "Alex Krizhevsky, I. Sutskever, and G. Hinton. Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems, 25(2), 2012. ",
1235
+ "bbox": [
1236
+ 174,
1237
+ 844,
1238
+ 823,
1239
+ 873
1240
+ ],
1241
+ "page_idx": 9
1242
+ },
1243
+ {
1244
+ "type": "text",
1245
+ "text": "Tengyuan Liang, Tomaso Poggio, Alexander Rakhlin, and James Stokes. Fisher-rao metric, geometry, and complexity of neural networks. In The 22nd International Conference on Artificial Intelligence and Statistics, pp. 888–896, 2019. ",
1246
+ "bbox": [
1247
+ 176,
1248
+ 881,
1249
+ 825,
1250
+ 924
1251
+ ],
1252
+ "page_idx": 9
1253
+ },
1254
+ {
1255
+ "type": "text",
1256
+ "text": "Ying-Hui Liu and Xiao-Jing Wang. Spike-frequency adaptation of a generalized leaky integrateand-fire model neuron. Journal of computational neuroscience, 10(1):25–45, 2001. ",
1257
+ "bbox": [
1258
+ 171,
1259
+ 103,
1260
+ 823,
1261
+ 132
1262
+ ],
1263
+ "page_idx": 10
1264
+ },
1265
+ {
1266
+ "type": "text",
1267
+ "text": "Warren S McCulloch and Walter Pitts. A logical calculus of the ideas immanent in nervous activity. The bulletin of mathematical biophysics, 5(4):115–133, 1943. ",
1268
+ "bbox": [
1269
+ 174,
1270
+ 141,
1271
+ 821,
1272
+ 170
1273
+ ],
1274
+ "page_idx": 10
1275
+ },
1276
+ {
1277
+ "type": "text",
1278
+ "text": "Markus Nagel, Rana Ali Amjad, Mart van Baalen, Christos Louizos, and Tijmen Blankevoort. Up or down? adaptive rounding for post-training quantization. arXiv preprint arXiv:2004.10568, 2020. ",
1279
+ "bbox": [
1280
+ 171,
1281
+ 178,
1282
+ 823,
1283
+ 208
1284
+ ],
1285
+ "page_idx": 10
1286
+ },
1287
+ {
1288
+ "type": "text",
1289
+ "text": "Jing Pei, Lei Deng, Sen Song, Mingguo Zhao, Youhui Zhang, Shuang Wu, Guanrui Wang, Zhe Zou, Zhenzhi Wu, Wei He, et al. Towards artificial general intelligence with hybrid tianjic chip architecture. Nature, 572(7767):106–111, 2019. ",
1290
+ "bbox": [
1291
+ 173,
1292
+ 215,
1293
+ 823,
1294
+ 260
1295
+ ],
1296
+ "page_idx": 10
1297
+ },
1298
+ {
1299
+ "type": "text",
1300
+ "text": "Nitin Rathi, Gopalakrishnan Srinivasan, Priyadarshini Panda, and Kaushik Roy. Enabling deep spiking neural networks with hybrid conversion and spike timing dependent backpropagation. In International Conference on Learning Representations, 2019. ",
1301
+ "bbox": [
1302
+ 173,
1303
+ 267,
1304
+ 821,
1305
+ 310
1306
+ ],
1307
+ "page_idx": 10
1308
+ },
1309
+ {
1310
+ "type": "text",
1311
+ "text": "Deboleena Roy, Indranil Chakraborty, and Kaushik Roy. Scaling deep spiking neural networks with binary stochastic activations. In 2019 IEEE International Conference on Cognitive Computing (ICCC), pp. 50–58. IEEE, 2019. ",
1312
+ "bbox": [
1313
+ 173,
1314
+ 319,
1315
+ 823,
1316
+ 363
1317
+ ],
1318
+ "page_idx": 10
1319
+ },
1320
+ {
1321
+ "type": "text",
1322
+ "text": "Bodo Rueckauer, Iulia-Alexandra Lungu, Yuhuang Hu, and Michael Pfeiffer. Theory and tools for the conversion of analog to spiking convolutional neural networks. arXiv: Statistics/Machine Learning, (1612.04052):0–0, 2016. ",
1323
+ "bbox": [
1324
+ 171,
1325
+ 371,
1326
+ 823,
1327
+ 414
1328
+ ],
1329
+ "page_idx": 10
1330
+ },
1331
+ {
1332
+ "type": "text",
1333
+ "text": "Bodo Rueckauer, Iulia-Alexandra Lungu, Yuhuang Hu, Michael Pfeiffer, and Shih-Chii Liu. Conversion of continuous-valued deep networks to efficient event-driven networks for image classification. Frontiers in neuroscience, 11:682, 2017. ",
1334
+ "bbox": [
1335
+ 171,
1336
+ 422,
1337
+ 823,
1338
+ 465
1339
+ ],
1340
+ "page_idx": 10
1341
+ },
1342
+ {
1343
+ "type": "text",
1344
+ "text": "Abhronil Sengupta, Yuting Ye, Robert Wang, Chiao Liu, and Kaushik Roy. Going deeper in spiking neural networks: $\\mathrm { V g g }$ and residual architectures. Frontiers in Neuroence, 13, 2018. ",
1345
+ "bbox": [
1346
+ 171,
1347
+ 473,
1348
+ 823,
1349
+ 503
1350
+ ],
1351
+ "page_idx": 10
1352
+ },
1353
+ {
1354
+ "type": "text",
1355
+ "text": "Sumit Bam Shrestha and Garrick Orchard. Slayer: Spike layer error reassignment in time. In Advances in Neural Information Processing Systems, pp. 1412–1421, 2018. ",
1356
+ "bbox": [
1357
+ 173,
1358
+ 511,
1359
+ 823,
1360
+ 541
1361
+ ],
1362
+ "page_idx": 10
1363
+ },
1364
+ {
1365
+ "type": "text",
1366
+ "text": "Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. ",
1367
+ "bbox": [
1368
+ 173,
1369
+ 549,
1370
+ 821,
1371
+ 579
1372
+ ],
1373
+ "page_idx": 10
1374
+ },
1375
+ {
1376
+ "type": "text",
1377
+ "text": "Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew $\\mathrm { ~ Y ~ N ~ g ~ } _ { }$ , and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pp. 1631–1642, 2013. ",
1378
+ "bbox": [
1379
+ 173,
1380
+ 587,
1381
+ 825,
1382
+ 643
1383
+ ],
1384
+ "page_idx": 10
1385
+ },
1386
+ {
1387
+ "type": "text",
1388
+ "text": "Johannes C Thiele, Olivier Bichler, and Antoine Dupret. Spikegrad: An ann-equivalent computation model for implementing backpropagation with spikes. In International Conference on Learning Representations, 2019. ",
1389
+ "bbox": [
1390
+ 173,
1391
+ 652,
1392
+ 823,
1393
+ 695
1394
+ ],
1395
+ "page_idx": 10
1396
+ },
1397
+ {
1398
+ "type": "text",
1399
+ "text": "Yujie Wu, Lei Deng, Guoqi Li, Jun Zhu, and Luping Shi. Spatio-temporal backpropagation for training high-performance spiking neural networks. Frontiers in neuroscience, 12:331, 2018. ",
1400
+ "bbox": [
1401
+ 171,
1402
+ 704,
1403
+ 823,
1404
+ 734
1405
+ ],
1406
+ "page_idx": 10
1407
+ },
1408
+ {
1409
+ "type": "text",
1410
+ "text": "Yujie Wu, Lei Deng, Guoqi Li, Jun Zhu, Yuan Xie, and Luping Shi. Direct training for spiking neural networks: Faster, larger, better. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pp. 1311–1318, 2019. ",
1411
+ "bbox": [
1412
+ 176,
1413
+ 742,
1414
+ 823,
1415
+ 785
1416
+ ],
1417
+ "page_idx": 10
1418
+ },
1419
+ {
1420
+ "type": "text",
1421
+ "text": "Amirreza Yousefzadeh, Timothee Masquelier, Teresa Serrano-Gotarredona, and Bernab ´ e Linares- ´ Barranco. Hardware implementation of convolutional stdp for on-line visual feature learning. In 2017 IEEE International Symposium on Circuits and Systems (ISCAS), pp. 1–4. IEEE, 2017. ",
1422
+ "bbox": [
1423
+ 174,
1424
+ 794,
1425
+ 821,
1426
+ 837
1427
+ ],
1428
+ "page_idx": 10
1429
+ },
1430
+ {
1431
+ "type": "text",
1432
+ "text": "Wenrui Zhang and Peng Li. Temporal spike sequence learning via backpropagation for deep spiking neural networks. arXiv preprint arXiv:2002.10085, 2020. ",
1433
+ "bbox": [
1434
+ 174,
1435
+ 845,
1436
+ 821,
1437
+ 875
1438
+ ],
1439
+ "page_idx": 10
1440
+ },
1441
+ {
1442
+ "type": "text",
1443
+ "text": "A APPENDIX ",
1444
+ "text_level": 1,
1445
+ "bbox": [
1446
+ 176,
1447
+ 102,
1448
+ 297,
1449
+ 117
1450
+ ],
1451
+ "page_idx": 11
1452
+ },
1453
+ {
1454
+ "type": "text",
1455
+ "text": "A.1 NETWORK STRUCTURE AND OPTIMIZATION SETUP ",
1456
+ "text_level": 1,
1457
+ "bbox": [
1458
+ 174,
1459
+ 133,
1460
+ 571,
1461
+ 147
1462
+ ],
1463
+ "page_idx": 11
1464
+ },
1465
+ {
1466
+ "type": "text",
1467
+ "text": "We adopt three network structures, CIFARNet (Wu et al., 2019), VGG-16 and ResNet-20 (Sengupta et al., 2018). All the pooling layers use average pooling to adapt to SNN. CIFARNet is a 8 layer structure like: 128C3 (Encoding)-256C3-AP2-512C3-AP2-1024C3-512C3-1024FC-512FC-Voting, where C means convolutional layer, AP means average pooling and FC means fully connected layer. We use the VGG-16 and ResNet-20 model provided by Rathi et al. (2019) on the CIFAR dataset and standard VGG-16 on ImageNet. ResNet-20 is ResNet-18 adding two convolutional layers for preprocessing in front, and an activation function is added after the basic blocks (Sengupta et al., 2018). Following (Sengupta et al., 2018), before training, we initialize convolution layers (kernel size k, and n output channels) weight a normal distribution and standard deviation $\\sqrt { 2 / ( k ^ { 2 } n ) }$ for non-residual convolutional layer, ${ \\sqrt { 2 } } / ( k ^ { 2 } n )$ for residual convolutional layer. And then we add dropout layer that $p = 0 . 2$ between convolutional layers and $p = 0 . 5$ between fully connected layers. ",
1468
+ "bbox": [
1469
+ 174,
1470
+ 160,
1471
+ 825,
1472
+ 316
1473
+ ],
1474
+ "page_idx": 11
1475
+ },
1476
+ {
1477
+ "type": "text",
1478
+ "text": "Our work is based on Pytorch platform. For CIFAR-10 and CIFAR-100, the initial learning rate of each network is 0.01, batch size is 128, total epochs is 300. We use cross entropy loss function and SGD optimizer with momentum 0.9 and weight decay $5 e - 4$ . And learning rate decay by a factor of 0.1 at epochs of 180, 240 and 270. For the sake of better conversion, in the first 20 epochs, we use regular ReLU for training, and then add the threshold to ReLU. On CIFAR-100, our network is initialized with the network parameters on CIFAR-10 except the output layer (Pei et al., 2019). The training on CIFAR-100 adopts the pre-trained weight without threshold for initialization in the first few epochs as a compensation of the lack of batch-normalization (Han et al., 2020; Rathi et al., 2019) to enable the convergence in early steps. ",
1479
+ "bbox": [
1480
+ 174,
1481
+ 324,
1482
+ 825,
1483
+ 449
1484
+ ],
1485
+ "page_idx": 11
1486
+ },
1487
+ {
1488
+ "type": "text",
1489
+ "text": "A.2 SNN PERFORMANCE WITH SIMULATION LENGTH 400-600 ",
1490
+ "text_level": 1,
1491
+ "bbox": [
1492
+ 183,
1493
+ 467,
1494
+ 620,
1495
+ 481
1496
+ ],
1497
+ "page_idx": 11
1498
+ },
1499
+ {
1500
+ "type": "text",
1501
+ "text": "We provide the average accuracy and variance of the converted SNN over the simulation length of 400-600 on CIFAR-10 (Table2) and CIFAR-100 datasets (Table3), the shift operation is shifting constant $V _ { t h } / 1 6 0 0$ , except for the output layer. The results include (1) regular ReLU without our method, (2) threshold ReLU and (3) both threshold and shift operation. Since simulation length of 400-600 is long enough for conversion from the source ANN with threshold ReLU to SNN, shift operation may reduce the converted SNN accuracy. ",
1502
+ "bbox": [
1503
+ 174,
1504
+ 493,
1505
+ 825,
1506
+ 577
1507
+ ],
1508
+ "page_idx": 11
1509
+ },
1510
+ {
1511
+ "type": "table",
1512
+ "img_path": "images/c48e14bb17404f346b03a7768b1da8b15571e30e9940c1e1e4d14f279f4bd34b.jpg",
1513
+ "table_caption": [
1514
+ "Table 2: Performance of the converted SNN on CIFAR-10 (averaged on simulation length 400-600). "
1515
+ ],
1516
+ "table_footnote": [],
1517
+ "table_body": "<table><tr><td>Structure</td><td>ReLU</td><td>ReLU+threshold</td><td>ReLU+threshold+shift</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>CIFAR-Net</td><td>90.16 ± 0.03</td><td>90.61 ± 0.01</td><td>90.37 ± 0.02</td></tr><tr><td>VGG-16</td><td>91.82 ± 0.09</td><td>92.26 ± 0.01</td><td>92.26 ± 0.01</td></tr><tr><td>ResNet-20</td><td>92.14 ± 0.03</td><td>93.58 ± 0.01</td><td>93.59 ± 0.01</td></tr></table>",
1518
+ "bbox": [
1519
+ 240,
1520
+ 619,
1521
+ 754,
1522
+ 695
1523
+ ],
1524
+ "page_idx": 11
1525
+ },
1526
+ {
1527
+ "type": "table",
1528
+ "img_path": "images/a16ceed2169c9de908fbabff17dd4cba048cc7458951f79ee0600c2d7dc9ee30.jpg",
1529
+ "table_caption": [
1530
+ "Table 3: Performance of the converted SNN on CIFAR-100 (averaged on simulation length 400- 600). "
1531
+ ],
1532
+ "table_footnote": [],
1533
+ "table_body": "<table><tr><td> Structure</td><td>ReLU</td><td>ReLU+threshold</td><td>ReLU+threshold+shift</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>VGG-16</td><td>70.10±0.05</td><td>70.55 ± 0.03</td><td>70.43 ± 0.03</td></tr><tr><td>ResNet-20</td><td>66.74 ± 0.04</td><td>69.82 ± 0.03</td><td>69.81 ± 0.02</td></tr></table>",
1534
+ "bbox": [
1535
+ 241,
1536
+ 765,
1537
+ 750,
1538
+ 825
1539
+ ],
1540
+ "page_idx": 11
1541
+ },
1542
+ {
1543
+ "type": "text",
1544
+ "text": "A.3 SNN PERFORMANCE WITH SHORT SIMULATION LENGTH ",
1545
+ "text_level": 1,
1546
+ "bbox": [
1547
+ 173,
1548
+ 856,
1549
+ 607,
1550
+ 869
1551
+ ],
1552
+ "page_idx": 11
1553
+ },
1554
+ {
1555
+ "type": "text",
1556
+ "text": "Here we compare the performance of our method versus RMP and TSC when the simulation length is short. The conversion loss is reported as the accuracy difference $( a c c _ { A N N } - a c c _ { S N N } )$ between the converted SNN and the source ANN with regular ReLU and threshold ReLU (in brackets). Our work-T/S denotes the SNN converted from the source ANN with both threshold (T) ReLU and shift (S). The performance of using shift operation and regular ReLU is similar to TSC on CIFAR10 (Table4), but is better than TSC and RMP on CIFAR-100 dataset (Table5). For VGG-16 on ImageNet, our model can achieve nearly zero conversion loss with simulation length 256 (Table 6). Using both threshold and shift at the same time reduces the conversion error the fastest when simulation length is short. And only using threshold achieves the minimum conversion error on a relatively long simulation time. ",
1557
+ "bbox": [
1558
+ 174,
1559
+ 882,
1560
+ 825,
1561
+ 924
1562
+ ],
1563
+ "page_idx": 11
1564
+ },
1565
+ {
1566
+ "type": "text",
1567
+ "text": "",
1568
+ "bbox": [
1569
+ 174,
1570
+ 103,
1571
+ 825,
1572
+ 202
1573
+ ],
1574
+ "page_idx": 12
1575
+ },
1576
+ {
1577
+ "type": "table",
1578
+ "img_path": "images/4198e6c5bcfe0c1412f9109cbde0b207f97bc2cacc48c047fc62c98bc5b5bf2a.jpg",
1579
+ "table_caption": [
1580
+ "Table 4: Compare the conversion loss with short simulation length for VGG-16 and ResNet-20 on CIFAR-10. "
1581
+ ],
1582
+ "table_footnote": [],
1583
+ "table_body": "<table><tr><td>Method</td><td>32</td><td>64</td><td>128</td><td>256</td><td>512</td></tr><tr><td colspan=\"6\">VGG-16 on CIFAR-10</td></tr><tr><td>RMP</td><td>33.33%</td><td>3.28%</td><td>1.22%</td><td>0.59%</td><td>0.24%</td></tr><tr><td>TSC</td><td>NA</td><td>0.84%</td><td>0.36%</td><td>0.18%</td><td>0.06%</td></tr><tr><td>Our Work-S</td><td>29.71%</td><td>3.10%</td><td>0.99%</td><td>0.60%</td><td>0.06%</td></tr><tr><td>Our Work-T</td><td>0.06%(0.31%)</td><td>-0.21%(0.04%)</td><td>-0.18%(0.07%)</td><td>-0.18%(0.07%)</td><td>-0.16%(0.09%)</td></tr><tr><td>Our Work-TS</td><td>-0.2%(0.05%)</td><td>-0.13%(0.12%)</td><td>-0.15%(0.10%)</td><td>-0.19%(0.06%)</td><td>-0.16%(0.09%)</td></tr><tr><td colspan=\"6\">ResNet-20 on CIFAR-10</td></tr><tr><td>RMP</td><td>16.78%</td><td>NA</td><td>3.87%</td><td>2.1%</td><td>0.84%</td></tr><tr><td>TSC</td><td>NA</td><td>22.09%</td><td>2.9%</td><td>1.37%</td><td>0.38%</td></tr><tr><td>Our Work-S</td><td>4.24%</td><td>1.13%</td><td>0.39%</td><td>0.21%</td><td>0.18%</td></tr><tr><td>Our Work-T</td><td>19.72%(21.01%)</td><td>-0.98%(0.31%)</td><td>-1.14%(0.15%)</td><td>-1.27%(0.02%)</td><td>-1.28%(0.01%)</td></tr><tr><td>Our Work-TS</td><td>-0.98%(0.31%)</td><td>-1.23%(0.06%)</td><td>-1.25%(0.05%)</td><td>-1.25%(0.05%)</td><td>-1.28%(0.01%)</td></tr></table>",
1584
+ "bbox": [
1585
+ 176,
1586
+ 268,
1587
+ 825,
1588
+ 429
1589
+ ],
1590
+ "page_idx": 12
1591
+ },
1592
+ {
1593
+ "type": "table",
1594
+ "img_path": "images/c00d4d7c6018c889be1aa34fe4425d7ffd3fd5c9fda0f7e272eb7838a829b3ed.jpg",
1595
+ "table_caption": [
1596
+ "Table 5: Compare the conversion loss with short simulation length for VGG-16 and ResNet-20 on CIFAR-100. "
1597
+ ],
1598
+ "table_footnote": [],
1599
+ "table_body": "<table><tr><td>Method</td><td>32</td><td>64</td><td>128</td><td>256</td><td>512</td></tr><tr><td colspan=\"6\">VGG-16 on CIFAR-100</td></tr><tr><td>RMP</td><td>NA</td><td>NA</td><td>7.46%</td><td>2.88%</td><td>1.82%</td></tr><tr><td>TSC</td><td>NA</td><td>NA</td><td>1.36%</td><td>0.57%</td><td>0.35%</td></tr><tr><td>Our Work-S</td><td>NA</td><td>NA</td><td>1.13%</td><td>0.55%</td><td>0.31%</td></tr><tr><td>Our Work-T</td><td>NA</td><td>NA</td><td>0.21%(0.08%)</td><td>0.12%(-0.01%)</td><td>0.07%(-0.06%)</td></tr><tr><td>Our Work-TS</td><td>NA</td><td>NA</td><td>0.15%(0.02%)</td><td>0.08%(-0.05%)</td><td>0.14%(0.01%)</td></tr><tr><td colspan=\"6\">ResNet-20 on CIFAR-100</td></tr><tr><td>RMP</td><td>41.08%</td><td>21.81%</td><td>11.03%</td><td>4.66%</td><td>2.56%</td></tr><tr><td>TSC</td><td>NA</td><td>NA</td><td>10.03%</td><td>3.45%</td><td>1.55%</td></tr><tr><td>Our Work-S</td><td>6.15%</td><td>1.61%</td><td>0.70%</td><td>0.52%</td><td>0.45%</td></tr><tr><td>Our Work-T</td><td>-0.14%(2.58%)</td><td>-2.18%(0.53%)</td><td>-2.62%(0.10%)</td><td>-2.78%(-0.06%)</td><td>-2.76%(-0.04%)</td></tr><tr><td>Our Work-TS</td><td>-1.32%(1.4%)</td><td>-2.19%(0.53%)</td><td>-2.41%(0.31%)</td><td>-2.41%(0.31%)</td><td>-2.54%(0.18%)</td></tr></table>",
1600
+ "bbox": [
1601
+ 176,
1602
+ 510,
1603
+ 825,
1604
+ 665
1605
+ ],
1606
+ "page_idx": 12
1607
+ },
1608
+ {
1609
+ "type": "table",
1610
+ "img_path": "images/9cf601c73e69e7e3c14e166988e453cd50dedea8d25eedf4ccc13024966e474a.jpg",
1611
+ "table_caption": [
1612
+ "Table 6: Compare the conversion loss with short simulation length on VGG-16 and ImageNet. "
1613
+ ],
1614
+ "table_footnote": [],
1615
+ "table_body": "<table><tr><td>Method</td><td>256</td><td>512</td></tr><tr><td>RMP</td><td>24.56%</td><td>3.95%</td></tr><tr><td>TSC</td><td>3.75%</td><td>0.87%</td></tr><tr><td>Our Work-S</td><td>0.41%</td><td>0.06%</td></tr><tr><td>Our Work-T</td><td>0.35%(0.15%)</td><td>0.22%(0.02%)</td></tr><tr><td>Our Work-TS</td><td>0.26%(0.06%)</td><td>0.25%(0.05%)</td></tr></table>",
1616
+ "bbox": [
1617
+ 325,
1618
+ 720,
1619
+ 669,
1620
+ 824
1621
+ ],
1622
+ "page_idx": 12
1623
+ },
1624
+ {
1625
+ "type": "text",
1626
+ "text": "A.4 PERFORMANCE OF SNN CONVERTED FROM RNN ",
1627
+ "text_level": 1,
1628
+ "bbox": [
1629
+ 174,
1630
+ 854,
1631
+ 562,
1632
+ 869
1633
+ ],
1634
+ "page_idx": 12
1635
+ },
1636
+ {
1637
+ "type": "text",
1638
+ "text": "Here we provide an illustrative example of how the proposed conversion pipeline can be extended to the case of converting RNN on the dataset for Sentiment Analysis on Movie Reviews (Socher et al., 2013). The rules are slightly different from conversion in the main text considering the implicit definition of RNN’s hidden states. For the fairness of comparison, we set the same input and simulation length for the RNN and SNN and adjust the structure as follows. (1) The source RNN adopts the threshold-ReLU as its activation function with the remaining value as the hidden state value. The hidden value will be added to the pre-activation value at the next time point. (2) We add a non-negative attenuation $\\tau$ to the hidden state values in order to enhance the nonlinearity. (3) The converted SNN keeps the same infrastructure, weight parameters, attenuation value $\\tau$ as the source RNN. (4) On the output layer, we use the threshold balancing method and loop its input multiple times to fire enough spikes to obtain a good approximation to the fully-connected layer for the final prediction. ",
1639
+ "bbox": [
1640
+ 174,
1641
+ 882,
1642
+ 825,
1643
+ 924
1644
+ ],
1645
+ "page_idx": 12
1646
+ },
1647
+ {
1648
+ "type": "text",
1649
+ "text": "",
1650
+ "bbox": [
1651
+ 174,
1652
+ 103,
1653
+ 825,
1654
+ 229
1655
+ ],
1656
+ "page_idx": 13
1657
+ },
1658
+ {
1659
+ "type": "text",
1660
+ "text": "We compare the performance of the source RNN, converted SNN and directly-trained SNN. On the validation set, the converted SNN achieves an accuracy of 0.5430 that is close to the source RNN $( \\mathrm { a c c } = 0 . 5 4 2 8 )$ ), while the directly-trained SNN with surrogate gradient only gets an 0.5106 accuracy. We also find that using the regular ReLU instead of threshold-ReLU on the source RNN produces a big accuracy drop for the converted SNN $( \\mathrm { a c c } = 0 . 5 1 0 0 )$ ). Since the surrogate gradient error of the directly-trained method will accumulate over the whole simulation process while complex infrastructures and tasks usually require a long simulation to achieve an effective spiking frequency distribution, the typical directly-training approaches for SNNs are often not optimal in complex network structures and tasks. Our results illustrate the potential efficiency of converting SNN from RNN. In future works, it would be promising to investigate how to design a better conversion strategy that can simultaneously combine the strength of RNN and SNN. ",
1661
+ "bbox": [
1662
+ 173,
1663
+ 250,
1664
+ 825,
1665
+ 401
1666
+ ],
1667
+ "page_idx": 13
1668
+ },
1669
+ {
1670
+ "type": "text",
1671
+ "text": "A.5 COMPARE THE PERFORMANCE ON LONG SIMULATION",
1672
+ "text_level": 1,
1673
+ "bbox": [
1674
+ 174,
1675
+ 420,
1676
+ 589,
1677
+ 434
1678
+ ],
1679
+ "page_idx": 13
1680
+ },
1681
+ {
1682
+ "type": "text",
1683
+ "text": "As a supplement to Fig.3 A, here we compare the conversion accuracy loss of the SNNs converted from the source ANNs with regular and threshold ReLU functions along an extended simulation length. Although the conversion loss in both cases decays fairly fast, the SNN converted from the ANN with regular ReLU function converges to a plateau that suffers about $0 . 7 5 \\%$ accuracy loss while the SNN converted from the ANN with threshold ReLU is almost loss-free. This result indicates that the improvement by adding threshold is not only on the converging efficiency but also on the final performance, which cannot be easily compensated through extending the simulation time in the original threshold balancing approach. ",
1684
+ "bbox": [
1685
+ 173,
1686
+ 445,
1687
+ 825,
1688
+ 556
1689
+ ],
1690
+ "page_idx": 13
1691
+ },
1692
+ {
1693
+ "type": "image",
1694
+ "img_path": "images/dc8b3a972364ae98189bae140e3d3908f30648a1935a6b6e7f04b8ef12b78055.jpg",
1695
+ "image_caption": [
1696
+ "Figure 4: The accuracy gap between the source ANN and target SNN along an extended simulation length. "
1697
+ ],
1698
+ "image_footnote": [],
1699
+ "bbox": [
1700
+ 289,
1701
+ 570,
1702
+ 687,
1703
+ 828
1704
+ ],
1705
+ "page_idx": 13
1706
+ }
1707
+ ]
parse/train/FZ1oTwcXchK/FZ1oTwcXchK_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/FZ1oTwcXchK/FZ1oTwcXchK_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HkejNgBtPB/HkejNgBtPB.md ADDED
@@ -0,0 +1,376 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # VARIATIONAL TEMPLATE MACHINE FOR DATA-TOTEXT GENERATION
2
+
3
+ Rong $\mathbf { Y } \mathbf { e } ^ { \dagger * } ;$ , Wenxian Shi, Hao Zhou, Zhongyu Wei†, Lei Li
4
+
5
+ †Fudan University
6
+ $\{ \mathrm { r y e 1 8 , z y w e i } \} ($ @fudan.edu.cn
7
+ ByteDance AI Lab
8
+ {shiwenxian,zhouhao.nlp,lileilab}@.bytedance.com
9
+
10
+ # ABSTRACT
11
+
12
+ How to generate descriptions from structured data organized in tables? Existing approaches using neural encoder-decoder models often suffer from lacking diversity. We claim that an open set of templates is crucial for enriching the phrase constructions and realizing varied generations. Learning such templates is prohibitive since it often requires a large paired <table,description> corpus, which is seldom available. This paper explores the problem of automatically learning reusable “templates” from paired and non-paired data. We propose the variational template machine (VTM), a novel method to generate text descriptions from data tables. Our contributions include: a) we carefully devise a specific model architecture and losses to explicitly disentangle text template and semantic content information in the latent spaces, and $^ b$ ) we utilize both small parallel data and large raw text without aligned tables to enrich the template learning. Experiments on datasets from a variety of different domains show that VTM is able to generate more diversely while keeping a good fluency and quality.
13
+
14
+ # 1 INTRODUCTION
15
+
16
+ Generating text descriptions from structured data (data-to-text) is an important task with many practical applications. Data-to-text has been used to generate different kinds of texts, such as weather reports (Angeli et al., 2010), sports news (Mei et al., 2016; Wiseman et al., 2017) and biographies (Lebret et al., 2016; Wang et al., 2018b; Chisholm et al., 2017). Figure 1 gives an example of data-to-text task, which takes an infobox 1 as the input and outputs a brief description of the information in the table. There are several recent methods utilizing neural encoder-decoder frameworks to generate text description from data tables (Lebret et al., 2016; Bao et al., 2018; Chisholm et al., 2017; Liu et al., 2018).
17
+
18
+ Although current table-to-text models could generate high quality sentences, the diversity of these output sentences are not satisfactory. We find that templates are crucial in increasing the variations of sentence structure. For example, Table 1 gives three descriptions with their templates for the given table input. Different templates control the sentence arrangement, thus vary the generation. Some related work (Wiseman et al., 2018; Dou et al., 2018) employs hidden semi-Markov hidden model to extract templates from table-text pairs.
19
+
20
+ We argue that templates can be better considered for generating more diverse outputs. First, it is non-trivial to sample different templates for obtaining different output utterances. Directly adopting variational auto-encoders (VAEs, Kingma & Welling (2014)) in table-to-text only enables to sample in the latent space. However, VAEs always generate irrelevant outputs, which may change the table content instead of sampling templates. This may harm the quality of output sentences. To address the above problem, if we can directly sample in the template space, we may get more diverse outputs while keeping the good quality of output sentences.
21
+
22
+ Table 1: An example: generating sentences based on different templates.
23
+
24
+ <table><tr><td>Table:</td><td>name[nameVariable],eatType[pub], food[Japanese],priceRange[average],customerRating[low], area[riverside]</td></tr><tr><td>Template1:</td><td>[name] is a [food] restaurant, it is a [eatType] and it has an [priceRange] cost and [customerRating] rating. it is in [area].</td></tr><tr><td>Sentence1:</td><td>nameVariable is a Japanese restaurant,it is a pub and it has an average cost and low rating.it is in riverside.</td></tr><tr><td>Template2:</td><td>[name] has an [priceRange] price range with a [customerRating] rating,and [name] is an [food] [eat- Type] in [area].</td></tr><tr><td>Sentence2:</td><td>nameVariable has an average price range with a low rating,and nameVariable is an Japanse pub in riverside.</td></tr><tr><td>Template3:</td><td>[name] is a [eatType] with a[customerRating]rating and [priceRange] cost,it is a [food] restaurant and [name] is in [area].</td></tr><tr><td>Sentence3:</td><td>nameVariable is a pub with a low rating and average cost, it is a Japanese restaurant and nameVariable is in riverside.</td></tr></table>
25
+
26
+ Second, we can hardly obtain promising sentences by sampling in the template space, if the template space is less informative. Namely, either encoder-decoder models or VAE-based models requires abundant parallel table-text pairs during the training. In such case, constructing high-quality parallel dataset is often labor-intensive. With limited table-sentence pairs, a VAE model cannot construct an informative template space. How to fully utilize raw sentences (without aligned table) to enrich the latent template space is under study.
27
+
28
+ In this paper, to address the above two problems, we propose the variational template machine (VTM) for data-to-text generation, which enables to generate sentences with diverse templates while preserving the high quality. Particularly, we introduce two latent variables, representing template and content, to control the generation. The two latent variables are disentangled, and thus we can generate diverse outputs by directly sampling in the latent space for template. Moreover, we propose a novel approach for semi-supervised learning in the VAE framework, which could fully exploit the raw sentences for enriching the template space. Inspired by back-translation (Sennrich et al., 2016; Burlot & Yvon, 2018; Artetxe et al., 2018), we design a variational back-translation process. Instead of training a sentence-to-table backward generation model directly, we take the variational posterior of the content latent variable as the backward model to help to train the forward generative model. Auxiliary losses are introduced to ensure the learning of meaningful and disentangled latent variables.
29
+
30
+ Experimental results on Wikipedia biography dataset (Lebret et al., 2016) and sentence planning NLG dataset (Reed et al., 2018) show that our model can generate texts with more diversity while keeping a good fluency. Training together with a large amount of raw text, VTM can further improve the generation performance. Besides, VTM is more predominant in the case where sentence-to-table backward model is hard to train. Ablation studies also demonstrate the effects of the auxiliary losses on the disentanglement of template and content spaces.
31
+
32
+ # 2 PROBLEM FORMULATION AND NOTATIONS
33
+
34
+ As a data-to-text task, we have table-text pairs $\mathcal { D } _ { p } = \{ ( \boldsymbol { { x } } _ { i } , \boldsymbol { { y } } _ { i } ) \} _ { i = 1 } ^ { N }$ , where $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ is the table, and $\mathbf { \nabla } _ { \mathbf { \psi } _ { 3 } } \psi _ { i }$ is the output sentence.
35
+
36
+ Following the description scheme of Lebrrecords of field-position-value triples, i.e., le , $_ { \textbf { \em x } }$ caere be viewed as a sis the field and of is $K$ $\pmb { x } = \{ ( f , p , v ) _ { i } \} _ { i = 1 } ^ { K }$ $f$ $p$ index of value $v$ in the field $f$ . For example, an item “Name: John Lennon” is denoted as two corresponding records: (Name, $I$ , John) and (Name, 2, Lennon). For each triple, we first embed field, position and value as $d$ -dim vectors $e _ { p } , e _ { f } , e _ { v } \in \mathbb { R } ^ { d }$ . Then, the $d _ { t }$ -dim representation of the record is obtained by $h _ { i } = { \bf t a n h } ( W [ e _ { f } , e _ { p } , e _ { v } ] ^ { T } + b ) , \quad i = 1 . . . K ,$ where $W \in \mathbb { R } ^ { d _ { t } \times 3 d }$ and $b \in \mathbb { R } ^ { d _ { t } }$ are parameters. The final representation of the table, denoted as $f _ { e n c } ( x )$ , is obtained by max-pooling over all field-position-value triple records,
37
+
38
+ $$
39
+ f _ { \mathrm { e n c } } ( x ) = h = \mathbf { M a x P o o l } _ { i } \{ h _ { i } ; i = 1 . . . K \} .
40
+ $$
41
+
42
+ In addition to the table-text pairs, we also have raw texts without table input, denoted as $\mathcal { D } _ { r } =$ $\{ \pmb { y } _ { i } \} _ { i = 1 } ^ { M }$ . It usually has $M \gg N$ .
43
+
44
+ ![](images/97941bbec79533ff5ed26a32f9f1f3b1ae26028b2be52918306fbbab2e3a2fb9.jpg)
45
+ Figure 2: The graphical model of VTM: $_ z$ is the latent variable from template space, and $^ c$ is the content variable. $_ { \textbf { \em x } }$ is the corresponding table for the tabletext pairs. $\textbf { { y } }$ is the observed sentence. The solid lines depict the generative model and the dashed lines form the inference model.
46
+
47
+ ![](images/675c3e5de3702652ddb4090cc30dcd33761915be2bee28d60d24a4d46aa762ca.jpg)
48
+
49
+ # 3 VARIATIONAL TEMPLATE MACHINE
50
+
51
+ As shown in the graphical model in Figure 2, our VTM modifies the vanilla VAE model by introducing two independent latent variables $_ z$ and $^ c$ , representing template latent variable and content latent variable respectively. $^ c$ models the content information in the table, while $_ { z }$ models the sentence template information. Target sentence $y$ is generated by both content and template variables. The two latent variables are disentangled, which makes it possible to generate diverse and relevant sentences by sampling template variable and retraining the content variable. Considering pairwise and raw data presented in Figure 1, their generation process for the content latent variable $^ c$ is different.
52
+
53
+ • For a given table-text pair $( x , y ) \in \mathcal { D } _ { p }$ , the content is observable from table $x$ . As a result, $^ c$ is assumed to be deterministic given table $x$ , whose prior is defined as a delta distribution $p ( c | x ) = \delta ( c = f _ { \mathrm { e n c } } ( x ) )$ . The marginal log-likelihood is:
54
+
55
+ $$
56
+ \begin{array} { l } { \displaystyle \log p _ { \theta } ( y | x ) = \log \int _ { z } \int _ { c } p _ { \theta } ( y | x , z , c ) p ( z ) p ( c | x ) \mathrm { d } \mathbf { c } \mathrm { d } \mathbf { z } } \\ { \displaystyle \qquad = \log \int _ { z } p _ { \theta } ( y | x , z , c = f _ { \mathrm { e n c } } ( x ) ) p ( z ) \mathrm { d } \mathbf { z } , ( x , y ) \in \mathcal { D } _ { p } . } \end{array}
57
+ $$
58
+
59
+ • For raw text $y \in { \mathcal { D } } _ { n }$ , the content is unobservable with the absence of table $x$ . As a result, the content latent variable $c$ should be sampled from prior of Gaussian distribution $\mathcal { N } ( 0 , I )$ . The marginal log-likelihood is:
60
+
61
+ $$
62
+ \log p _ { \theta } ( y ) = \log \int _ { z } \int _ { c } p _ { \theta } ( y | z , c ) p ( z ) p ( c ) \mathrm { d } \mathbf { c } \mathrm { d } \mathbf { z } , y \in \mathcal { D } _ { r } .
63
+ $$
64
+
65
+ In order to make full use of both table-text pair data and raw text data, the above marginal loglikelihood should be optimized jointly:
66
+
67
+ $$
68
+ \begin{array} { r } { \mathcal { L } ( \theta ) = \mathbb { E } _ { ( x , y ) \sim \mathcal { D } _ { p } } [ \log p _ { \theta } ( y | x ) ] + \mathbb { E } _ { y \sim \mathcal { D } _ { r } } [ \log p _ { \theta } ( y ) ] . } \end{array}
69
+ $$
70
+
71
+ Directly optimizing Equation 3 is intractable. Following the idea of variational inference (Kingma & Welling, 2014), a variational posterior $q _ { \phi } ( \cdot )$ is constructed as an inference model (dashed lines in Figure 2) to approximate the true posterior. Instead of optimizing the marginal log-likelihood in Equation 3, we maximize the evidence lower bound (ELBO). In Section 3.1 and 3.2, the ELBO of table-text pairwise data and raw text data are discussed, respectively.
72
+
73
+ # 3.1 LEARNING FROM TABLE-TEXT PAIR DATA
74
+
75
+ In this section, we will show the learning loss of table-text pair data. According to the aforementioned assumption, the content variable $^ c$ is observable and follows a delta distribution centred in the hidden representation of the table $x$ .
76
+
77
+ ELBO objective. Assuming that the template variable $_ z$ only relies on the template of target sentence, we introduce $q _ { \phi } ( z | y )$ as an approximation of the true posterior $p ( z | y , c , x )$ ,
78
+
79
+ The ELBO loss of Equation 1 is written as
80
+
81
+ $$
82
+ \mathcal { L } _ { \mathrm { E L B O } _ { p } } ( x , y ) = - \mathbb { E } _ { q _ { \phi _ { z } } ( z | y ) } \log p _ { \theta } ( y | z , c = f _ { \mathrm { e n c } } ( x ) , x ) + D _ { \mathrm { K L } } ( q _ { \phi _ { z } } ( z | y ) \| p ( z ) ) , \quad ( x , y ) \in \mathcal { D } _ { p } .
83
+ $$
84
+
85
+ The variational posterior $q _ { \phi _ { z } } ( z | y )$ is assumed as a multivariate Gaussian distribution $\mathcal { N } ( \mu _ { \phi _ { z } } ( y ) , \Sigma _ { \phi _ { z } } ( y ) )$ , while the prior $p ( z )$ is taken as a normal distribution $\mathcal { N } ( 0 , I )$ .
86
+
87
+ Preserving-Template Loss. Without any supervision, the ELBO loss alone does not guarantee to learn a good template representation space. Inspired by the work in style-transfer $\mathrm { H u }$ et al., 2017b; Shen et al., 2017; Bao et al., 2019; John et al., 2018), an auxiliary loss is introduced to embed the template information of sentences into template variable $_ z$ .
88
+
89
+ With table, we are able to roughly align the tokens in sentence with the records in the table. By replacing these tokens with a special token $< e n t >$ , we can remove the content information from sentences and get the sketchy sentence template, denote as $\tilde { y }$ . We introduce the preserving-template loss ${ \mathcal { L } } _ { \mathrm { p t } }$ to ensure that the latent variable $z$ only contains the information of the template.
90
+
91
+ $$
92
+ \mathcal { L } _ { \mathrm { p t } } ( x , y , \tilde { y } ) = - \mathbb { E } _ { q _ { \phi _ { z } } ( z | y ) } \log p _ { \eta } ( \tilde { y } | z ) = - \mathbb { E } _ { q _ { \phi _ { z } } ( z | y ) } \sum _ { t = 1 } ^ { m } \log p _ { \eta } ( \tilde { y } _ { t } | z , \tilde { y } _ { < t } )
93
+ $$
94
+
95
+ where $m$ is the length of the $\tilde { y }$ , and $\eta$ denotes the parameters of the extra template generator. ${ \mathcal { L } } _ { \mathrm { p t } }$ is trained via parallel data. In practice, due to the insufficient amount of parallel data, template generator $p _ { \eta }$ may not be well-learned. However, experimental results show that this loss is sufficient to provide a guidance for learning a template space.
96
+
97
+ # 3.2 LEARNING FROM RAW TEXT DATA
98
+
99
+ Our model is able to make use of a large number of raw data without table since the content information of table could be obtained by the content latent variable.
100
+
101
+ ELBO objective. According to the definition of generative model in Equation 2, the ELBO of raw text data is
102
+
103
+ $$
104
+ \log p _ { \theta } ( y ) = \mathbb { E } _ { q _ { \phi } ( z , c | y ) } \log \frac { p _ { \theta } ( y , z , c ) } { q _ { \phi } ( z , c | y ) } , \quad y \in \mathcal { D } _ { r } .
105
+ $$
106
+
107
+ With the mean field approximation (Xing et al., 2003), $q _ { \phi } ( z , c | x )$ can be factorized as: $q _ { \phi } ( z , c | y ) =$ $q _ { \phi _ { z } } ( z | y ) q _ { \phi _ { c } } ( c | y )$ . We have:
108
+
109
+ $$
110
+ \begin{array} { r l } & { \mathcal { L } _ { \mathrm { E L B O } _ { r } } ( y ) = - \mathbb { E } _ { q _ { \phi _ { z } } ( z | y ) q _ { \phi _ { c } } ( c | y ) } \log p _ { \theta } ( y | z , c ) } \\ & { \quad \quad \quad \quad \quad \quad + D _ { \mathrm { K L } } ( q _ { \phi _ { z } } ( z | y ) | | p ( z ) ) + D _ { \mathrm { K L } } ( q _ { \phi _ { c } } ( c | y ) | | p ( c ) ) , \quad y \in \mathcal { D } _ { r } . } \end{array}
111
+ $$
112
+
113
+ In order to make use of template information contained in raw text data effectively, the parameters of generation network $p _ { \theta } ( y \vert z , c )$ and posterior network $q _ { \phi _ { z } } ( z | y )$ are shared for pairwise and raw data. In decoding process, for raw text data, we use content variable $c$ as the table embedding for the missing of table $x$ . Variational posterior for $c$ is deployed as another multivariate Guassian $q _ { \phi _ { c } } ( c | y ) = \bar { \mathcal { N } } ( \mu _ { \phi _ { c } } ( y ) , \Sigma _ { \phi _ { c } } ( y ) )$ . Both $p ( z )$ and $p ( c )$ are taken as normal distribution $\mathcal { N } ( 0 , I )$ .
114
+
115
+ Preserving-Content Loss. In order to make the posterior $q _ { \phi _ { c } } ( c | y )$ correctly infers the content information, the table-text pairs are used as the supervision to train the recognition network of $q _ { \phi _ { c } } ( c | y )$ . To this end, we add a preserving-content loss
116
+
117
+ $$
118
+ \begin{array} { r } { \mathcal { L } _ { \mathtt { p c } } ( x , y ) = - \mathbb { E } _ { q _ { \phi _ { c } } ( c | y ) } \| c - h \| ^ { 2 } + D _ { \mathrm { K L } } \big ( q _ { \phi _ { c } } ( c | y ) | | p ( c ) \big ) , \quad ( x , y ) \in \mathcal { D } _ { p } , } \end{array}
119
+ $$
120
+
121
+ where $h = f _ { \mathrm { e n c } } ( x )$ is the embedding of table obtained by the table encoder. Minimizing ${ \mathcal L } _ { \mathrm { p c } }$ is also helpful to bridge the gap of $c$ between pairwise (taking $c = h$ ) and raw training data (sampling from $q _ { \phi } ( c | y ) )$ . Moreover, we find that the first term of ${ \mathcal { L } } _ { \mathrm { p c } }$ is equivalent to (1) make the mean of $q _ { \phi } ( c | y )$ closer to $h$ ; (2) minimize the trace of co-variance of $q _ { \phi } ( c | y )$ . The second term serves as a regularization. Detailed explanations and proof are referred in supplementary materials.
122
+
123
+ # Algorithm 1 Training procedure
124
+
125
+ Input: Model parameters $\phi _ { z } , \phi _ { c } , \theta , \eta$ Table-text pair data $\mathcal { D } _ { p } = \{ ( { \pmb x } , { \pmb y } ) _ { i } \} _ { i = 1 } ^ { N }$ ; raw text data $\mathcal { D } _ { r } = \{ \pmb { y } _ { j } \} _ { j = 1 } ^ { M }$ ; $M \gg N$
126
+
127
+ # Procedure TRAIN $( \mathcal { D } _ { p } , \mathcal { D } _ { r } )$
128
+
129
+ 1: Update $\phi _ { z } , \phi _ { c } , \theta , \eta$ by gradient descent on $\mathcal { L } _ { \mathrm { E L B O } _ { p } } + \mathcal { L } _ { \mathrm { M I } } + \mathcal { L } _ { \mathrm { p t } } + \mathcal { L } _ { \mathrm { p c } }$
130
+ 2: Update $\phi _ { z } , \phi _ { c } , \theta$ by gradient descent on $\mathcal { L } _ { \mathrm { E L B O } _ { r } } + \mathcal { L } _ { \mathrm { M I } }$
131
+ 3: Update $\phi _ { z } , \phi _ { c } , \theta , \eta$ by gradient descent on $\mathcal { L } _ { t o t }$
132
+
133
+ # 3.3 MUTUAL INFORMATION LOSS
134
+
135
+ As introduced by previous works (Chen et al., 2016; Zhao et al., 2017; 2018), adding mutual information term to ELBO could alleviate KL collapse effectively and improve the quality of variational posterior. Adding mutual information terms directly imposes the association of content and template latent variables with target sentences. Besides, theoretical proof2 and experimental results show that introducing mutual information bias is necessary in the presence of preserving-template loss $\mathcal { L } _ { \mathrm { p t } } ( \pmb { x } ^ { p } , \pmb { y } ^ { p } )$ .
136
+
137
+ As a result, in our work, the following mutual information term is added to objective
138
+
139
+ $$
140
+ \mathcal { L } _ { \mathrm { M I } } ( y ) = - I ( z , y ) - I ( c , y ) .
141
+ $$
142
+
143
+ # 3.4 TRAINING PROCESS
144
+
145
+ The final loss of VTM is made up of the ELBO losses and extra losses:
146
+
147
+ $$
148
+ \begin{array} { r l } & { \mathcal { L } _ { t o t } ( x ^ { p } , y ^ { p } , y ^ { r } ) = \mathcal { L } _ { \mathrm { E L B O } _ { p } } ( x ^ { p } , y ^ { p } ) + \mathcal { L } _ { \mathrm { E L B O } _ { r } } ( y ^ { r } ) + \lambda _ { \mathrm { M I } } ( \mathcal { L } _ { \mathrm { M I } } ( y ^ { p } ) + \mathcal { L } _ { \mathrm { M I } } ( y ^ { r } ) ) } \\ & { \qquad + \lambda _ { \mathrm { p t } } \mathcal { L } _ { \mathrm { p t } } ( x ^ { p } , y ^ { p } ) + \lambda _ { \mathrm { p c } } \mathcal { L } _ { \mathrm { p c } } ( x ^ { p } , y ^ { p } ) , \qquad ( x ^ { p } , y ^ { p } ) \in \mathcal { D } _ { p } , y ^ { r } \in \mathcal { D } _ { r } . } \end{array}
149
+ $$
150
+
151
+ $\lambda _ { \mathrm { M I } } , \lambda _ { \mathrm { p t } }$ and $\lambda _ { \mathrm { p c } }$ are hyperparameters with respect to auxiliary losses.
152
+
153
+ The training procedure is shown in Algorithm 1. The parameters of generation network $\theta$ and posterior network $\phi _ { z , c }$ could be trained jointly by both table-text pair data and raw text data. In this way, a large number of raw text data can be used to enrich the generation diversity.
154
+
155
+ # 4 EXPERIMENT
156
+
157
+ # 4.1 DATASETS AND BASELINE MODELS
158
+
159
+ Dataset. We perform the experiment on SPNLG (Reed et al., 2018)3 and WIKI (Lebret et al., 2016; Wang et al., 2018b). Two datasets come from two different domains. The former is a collection of restaurant descriptions, which expands the E2E dataset4 into a total of 204, 955 utterances with more varied sentence structures and instances. The latter contains 728, 321 sentences of biographies from Wikipedia. To simulate the environment that a large number of raw texts provided, we just use part of the table-text pairs from two datasets, leaving most of the instances as raw texts. Concretely, for two datasets, we initially keep the ratio of table-text pairs to raw texts as 1:10. For WIKI dataset, in addition to the data from WikiBio (Lebret et al., 2016), the raw text data is further extended by the biographical descriptions of people5 from external Wikipedia Person and Animal Dataset (Wang et al., 2018a). The statistics for the number of table-text pairs and raw texts in the training, validation and test sets are shown in Table 2.
160
+
161
+ Evaluation Metrics. For WIKI dataset, we evaluate the generation quality based on BLEU-4, NIST, ROUGE-L (F-score). For SPNLG, we use BLEU-4, NIST, METEOR, ROUGE-L (F-score), and CIDEr. We use the same automatic evaluation script from E2E NLG Challenge6. The diversity of generation is evaluated by self-BLEU (Zhu et al., 2018). The lower self-BLEU, the more diversely the model generates.
162
+
163
+ Table 2: Dataset statistics in our experiments.
164
+
165
+ <table><tr><td></td><td colspan="2">Train</td><td colspan="2">Valid</td><td>Test</td></tr><tr><td>Dataset</td><td>#table-text pair</td><td>#raw text</td><td>#table-text pair</td><td>#rawtext</td><td>#table-text pair</td></tr><tr><td>SPNLG</td><td>14,906</td><td>149,058</td><td>20,495</td><td>/</td><td>20,496</td></tr><tr><td>WIKI</td><td>84,150</td><td>841,507</td><td>72,831</td><td>42,874</td><td>72,831</td></tr></table>
166
+
167
+ Baseline models. We implement the following models as baselines:
168
+
169
+ • Table2seq: Table2seq model first encodes the table into hidden representations then generates the sentence in a sequence-to-sequence architecture (Sutskever et al., 2014). For a fair comparison, we apply the same table-encoder architecture as in Section 2 and the same LSTM decoder with attention mechanism as our model. The model is only trained on pair-wise data. During the testing, we generate five sentences with beam size ranging from one to five to increase some variations. We denote the model as Table2seq-beam. We also implement the decoding with forward sampling strategy (namely Table2seq-sample). Moreover, to incorporate raw data, we first pretrain the decoder using raw text as a language model, then train Table2seq on the table-text pairs, which is noted as Table2seq-pretrain. Table2seq-pretrain has the same decoding strategy as Table2seq-beam. • Temp-KN: Template-KN model (Lebret et al., 2016) first generates a template according to the interpolated 5-gram Kneser-Ney (KN) language modeled over sentence templates, then replaces the special token for the field with the corresponding words from the table.
170
+
171
+ The hype-parameters of the VTM are chosen based on the lowest $\mathcal { L } _ { \mathrm { E L B O } _ { p } }$ on the validation set of SPNLG and $\mathcal { L } _ { \mathrm { E L B O } _ { p } } + \mathcal { L } _ { \mathrm { E L B O } _ { r } }$ on the validation set of WIKI. Word embeddings are randomly initialized with 300-dimension. During training, we use Adam optimizer (Kingma & Ba, 2015) with the initial learning rate as 0.001. Details on hyperparameters are listed in Appendix D.
172
+
173
+ # 4.2 EXPERIMENTAL RESULTS ON SPNLG DATASET
174
+
175
+ Quantitative analysis. According to the results in Table 3, we find that our variational template machine (VTM) can generally produce sentences with more diversity under a promising performance in terms of BLEU metrics. Table2seq with beam search algorithm (Table2seq-beam), which is only trained on parallel data, generates the most fluent sentences, but its diversity is rather poor. Although the sampling decoder (Table2seq-sample) gets the lowest self-BLEU, it sacrifices the fluency at the cost. Table2seq performs even worse when the decoder is pre-trained by raw data as a language model. Because there is still a gap between the language model and data-to-text task, the decoder fails to learn how to use raw text in the generation of data-to-text stage. On the contrary, VTM can make full use of the raw data with the help of content variables. As a template-based model, Temp-KN receives the lowest self-BLEU score, but it fails to generate fluent sentences.
176
+
177
+ Ablation study. To study the effectiveness of the auxiliary loses and the augmented raw texts, we progressively remove the auxiliary losses and raw data in the ablation study. We reach the conclusions as follows.
178
+
179
+ • Without the preserving-content loss ${ \mathcal L } _ { \mathrm { p c } }$ , the model has a relative decline in generation quality. This implies that, by training the same inference model of content variable in pairwise data, preserving-content loss provides an effective instruction for learning the content space. • VTM-noraw is the model trained without using raw data, where only the loss functions in Section 3.1 are optimized. Comparing with VTM-noraw, VTM gets a substantial improvement in generation quality. More importantly, without extra raw text data, there is also a decline in diversity (self-BLEU). Experimental results show that raw data plays a valuable role in improving both generation quality and diversity, which is often neglected by previous studies. • We further remove the mutual information loss and preserving-template loss from VTM-noraw model. Both generation quality and diversity continuously decline, which verifies the effectiveness of the two losses. Moreover, the automatic evaluation results of VTM-noraw- $\mathcal { L } _ { \mathrm { M I } ^ { - } } \mathcal { L } _ { \mathrm { p t } }$ empirically show that preserving-template loss may be a hinder if we only add it during the training, as illustrated in Section 3.3.
180
+
181
+ <table><tr><td>Methods</td><td>BLEU</td><td>NIST</td><td>METEOR</td><td>ROUGE</td><td>CIDEr</td><td>Self-BLEU</td></tr><tr><td>Table2seq-beam</td><td>40.61</td><td>6.31</td><td>38.67</td><td>56.95</td><td>3.74</td><td>97.14</td></tr><tr><td>Table2seq-sample</td><td>34.97</td><td>5.68</td><td>35.46</td><td>52.74</td><td>3.00</td><td>65.69</td></tr><tr><td>Table2seq-pretrain</td><td>40.56</td><td>6.33</td><td>38.51</td><td>56.32</td><td>3.75</td><td>100.00</td></tr><tr><td>Temp-KN</td><td>6.45</td><td>0.45</td><td>12.53</td><td>27.60</td><td>0.23</td><td>37.85</td></tr><tr><td>VTM</td><td>40.04</td><td>6.25</td><td>38.31</td><td>56.48</td><td>3.64</td><td>88.77</td></tr><tr><td>-Lpc</td><td>39.58</td><td>6.24</td><td>38.30</td><td>56.24</td><td>3.69</td><td>87.20</td></tr><tr><td>VTM-noraw</td><td>39.94</td><td>6.22</td><td>38.42</td><td>56.72</td><td>3.66</td><td>88.92</td></tr><tr><td>-LMI</td><td>38.33</td><td>6.02</td><td>37.77</td><td>55.92</td><td>3.51</td><td>96.55</td></tr><tr><td>-LM1-Lpt</td><td>39.63</td><td>6.24</td><td>38.35</td><td>56.36</td><td>3.70</td><td>92.54</td></tr></table>
182
+
183
+ Table 3: Result for SPNLG data set. Under the 0.05 significance level, VTM gets significantly higher results in all the fluency metrics than all the baselines except Table2seq-beam.
184
+
185
+ ![](images/4aecf456246c864b3447dc443908515b64c01bb97ab50e3e6bda3196315534db.jpg)
186
+ Figure 3: Quality-diversity trade-off curve on SPNLG dataset.
187
+
188
+ ![](images/f07f5c7f05211c98eb905f700bf7c38c122aa5db1bdb3b882135e14edfc53e69.jpg)
189
+ Figure 4: Self-BLEU and the proportion of raw texts to table-sentence pairs.
190
+
191
+ Experiment on quality and diversity trade-off. The quality and diversity trade-off is further analyzed to illustrate the superiority of VTM. In order to evaluate the quality and diversity under different sampling methods, we conduct experiment on sampling from the softmax with different temperatures. Sampling from the softmax with temperature is commonly applied to shape the distribution (Ficler & Goldberg, 2017; Holtzman et al., 2019). Given the logits $u _ { 1 : | V | }$ and temperature $\tau$ , we sample from the distribution:
192
+
193
+ $$
194
+ p ( y _ { t } = V _ { l } | y _ { < t } , x , z , \tau ) = \frac { \exp \left( u _ { l } / \tau \right) } { \sum _ { l ^ { \prime } } \exp \left( u _ { l ^ { \prime } } / \tau \right) }
195
+ $$
196
+
197
+ When $\tau \ \ 0$ , it approaches greedy decoding. When $\tau { \it \Delta \phi } = 1 . 0$ , it is the same as forward sampling. In the experiment, we gradually adjust temperature from 0 to 1, taking $\tau =$ $0 . 1 , 0 . 2 , 0 . 3 , 0 . 5 , 0 . 6 , 0 . 9 , 1 . 0$ . BLEU and self-BLEU under different temperatures are evaluated for both Table2seq and VTM. The self-BLEU in different temperatures and BLEU and self-BLEU curves are plotted in Figure 3. It empirically demonstrates the trade-off between the generation quality and diversity. By sampling from different temperatures, we can plot the portfolios of (Self-BLEU,BLEU) pairs of Table2seq and VTM. The closer the curve is to the upper left, the better the performance of the model. VTM generally gets lower self-BLEU with more diverse outputs under the comparable level of BLEU score.
198
+
199
+ Human evaluation In addition to the quantitative experiments, human evaluation is conducted as well. We randomly select 120 generated samples (each has five sentences) and ask three annotators to rate them on a 1-5 Likert scale in terms of the following features:
200
+
201
+ • Accuracy: whether the generated sentences are consistent with the content in the table.
202
+ • Coherence: whether the generated sentences are coherent.
203
+ • Diversity: whether the sentences have as many patterns/structures as possible.
204
+
205
+ Based on the qualitative results in Table 4, VTM generates the best sentences with the highest accuracy and coherence. Besides, VTM is able to obtain the comparable diversity with Table2seqsample and Temp-KN. Compared with the model without using raw data (VTM-no raw), there is a significant improvement in diversity, which indicates that raw data essentially enriches the latent template space. Although obtaining the highest scores in diversity for Table2seq-sample and TempKN, their generation qualities are much inferior to the VTM, and comparable generation quality is the prerequisite when comparing the diversity.
206
+
207
+ Table 4: Human evaluation results on different models. The bold numbers are significantly higher then others under 0.01 significance level.
208
+
209
+ <table><tr><td>Methods</td><td>Accuracy</td><td>Coherence</td><td>Diversity</td></tr><tr><td>Table2seq-sample</td><td>3.44</td><td>4.54</td><td>4.87</td></tr><tr><td>Temp-KN</td><td>2.90</td><td>2.78</td><td>4.85</td></tr><tr><td>VTM</td><td>4.44</td><td>4.84</td><td>4.33</td></tr><tr><td>VTM-noraw</td><td>4.33</td><td>4.62</td><td>3.44</td></tr></table>
210
+
211
+ Table 5: Results for WIKI dataset. All the metrics are significant under 0.05 significance level.
212
+
213
+ <table><tr><td>Methods</td><td>BLEU</td><td>NIST</td><td>ROUGE</td><td>Self-BLEU</td></tr><tr><td>Table2seq-beam</td><td>26.74</td><td>5.97</td><td>48.20</td><td>92.00</td></tr><tr><td>Table2seq-sample</td><td>21.75</td><td>5.32</td><td>42.09</td><td>36.07</td></tr><tr><td>Table2seq-pretrain</td><td>25.43</td><td>5.44</td><td>45.86</td><td>99.88</td></tr><tr><td>Temp-KN</td><td>11.68</td><td>2.04</td><td>40.54</td><td>73.14</td></tr><tr><td>VTM</td><td>25.22</td><td>5.96</td><td>45.36</td><td>74.86</td></tr><tr><td>-Lpc</td><td>22.16</td><td>4.28</td><td>40.91</td><td>80.39</td></tr><tr><td>VTM-noraw</td><td>21.59</td><td>5.02</td><td>39.07</td><td>78.19</td></tr><tr><td>-LMI</td><td>21.30</td><td>4.73</td><td>40.99</td><td>79.45</td></tr><tr><td>-CMI-Lp</td><td>16.20</td><td>3.81</td><td>38.04</td><td>84.45</td></tr></table>
214
+
215
+ ![](images/1a75279e7a0e7f9218e42d9b5ce6a0985e0f9ec9effe59cd199867f1be972a07.jpg)
216
+ Figure 5: Quality-diversity trade-off curve compared with NER $^ +$ Table2seq.
217
+
218
+ Experiment on the diversity under different proportions of raw. In order to show how much raw data may contribute to the VTM model, we train the model under different proportions of raw data to pairwise data in training. Specifically, we control the ratio of raw sentences to the table-text pairs under 0.5:1, 1:1, 2:1, 3:1, 5:1, 7:1 and 10:1. As shown in Figure 4, the self-BLEU rapidly decreases even adding a small number of raw data, and continuously decreases until the ratio equals 5:1. The improvement is marginal after adding more than 5 times of raw data.
219
+
220
+ Case study. According to Table 8 (in Appendix E), despite template-like structures vary much in a forward sampling model, the information in sentences may be wrong. For example, Sentence 3 says that the restaurant is a Japanese place. Notably, VTM produces correct texts with more diversity of templates. VTM is able to generate different number of sentences and conjunctions. For example, “[name] is a [food] place in [area] with a price range of [priceRange]. It is a [eatType].” (Sentence 1, two sentences, “with” aggregation), “[name] is a [eatType] with a price range of [priceRange]. It is in [area]. It is a [food] place.” (Sentence 2, three sentences, “with” aggregation), “[name] is a [food] restaurant in [area] and it is a [food].” (Sentence 4, one sentence, “and” aggregation).
221
+
222
+ # 4.3 EXPERIMENTAL RESULTS ON WIKI DATASET
223
+
224
+ Table 5 shows the results for WIKI dataset, the same conclusions can be drawn as in the results in SPNLG dataset for both the quantitative analysis and ablation study. VTM is able to generate sentences with the comparable quality as Table2seq-beam but more diversity.
225
+
226
+ Comparison with the pseudo-table-based method. Another way to incorporate raw data is to construct pseudo-table from the given sentence by applying a sentence-to-table backward model via name entity recognition (NER). However, when the type of entities is complicated, such as in product introduction, or the raw data comes from the different domains as pairwise data, the commonlyused model for NER cannot provide accurate pseudo-tables. In this experiment, we replace 841,507 biography raw sentences with 101,807 sentences that describe the animals (Wang et al., 2018b) to test the generalization of our model in raw data of different domains. NER $^ +$ Table2seq is the twostep model that first constructs the pseudo-table by a Bi-LSTM-CRF (Huang et al., 2015) model trained from the table-text pairs, then trains Table2seq from both table-text pairs and pseudo-tabletext pairs. We control the temperature in decoding method as previous, and results are plotted in Figure 5. We find that compared with NER+Table2seq, the curve of VTM is closer to the upper left, which implies that VTM can generate more diverse (lower Self-BLEU) under the commensurate BLEU.
227
+
228
+ Table 6: Computational cost for each model.
229
+
230
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Table2seq</td><td rowspan=1 colspan=1>VTM-noraw</td><td rowspan=1 colspan=1>VTM</td></tr><tr><td rowspan=1 colspan=1>Train</td><td rowspan=1 colspan=1>~30min/6 epochs</td><td rowspan=1 colspan=1>~30min/6 epochs</td><td rowspan=1 colspan=1>~160min/15 epochs</td></tr><tr><td rowspan=1 colspan=1>Test</td><td rowspan=1 colspan=1>~80min</td><td rowspan=1 colspan=1>~80min</td><td rowspan=1 colspan=1>~80min</td></tr></table>
231
+
232
+ Table 7: An example of the generated text by our model and the baselines on WIKI dataset.
233
+
234
+ <table><tr><td>Table</td><td>name[Jack Ryder],country[Australia],fullname[John Ryder],nickname[the king of Colingwood], birth_date[8 August1889],birth_place[Collingwood,Victoria,Australia],death_date[4 April1977], death_place[Fitzroy,Victoria,Australia],club[Victoria],testdebutyear[192O england],aritcle_title[Jack Ryder (cricketer)]</td></tr><tr><td>Reference</td><td>John“Jack”Ryder,mbe(8 August 1889-3 April1977)wasacricketer who played for Victoria and Australia.</td></tr><tr><td>Table2seq-sample</td><td>1: johnRyder(8 August1889-3 April1977) was an Australian cricketer. 2: john Ryder Ryder(8 August 1889-3 April 1977) was an Australian cricketer . 3: johnRyderRyder(8 August1889-3April 1977) was an Australian cricketer who played for glouces- tershire cricket club in 1912 4: john Ryder(8 August 1889-3 April 1977) was an Australian cricketer . 5: john Ryder oliveira(8August1889-3 April1977)wasan Australian test cricketer who played against great Britain with international cricket club</td></tr><tr><td>Temp-KN</td><td>1: jackRyder(born August 8,1889) isa former professional cricketer). 2:‘jack&quot;Ryder(born August 8,1889) is a former professonal cricketer)who played in the national football league. 3: jack Ryder(born 8 August 1889 in Collingwood, Victoria,) is a former professional cricketer). 4:Jack Ryder(bornAugust8,1889,inColingwood,Victoria,Australia)isaformerprofessionalfootball player who is currently a member of the united states.</td></tr><tr><td>VTM-noraw</td><td>5: jack Ryder(born August 8,1889) isa former professional cricketer). 1:JohnRyder(8August1889-4April1977) wasan Australiancricketer. 2:Jack Ryder (born August 21,1951 in Melbourne,Victoria) was an Australian cricketer. 3:John Ryder(21 August1889-4 April1977) wasan Australian cricketer. 4:Jack Ryder(8 March 1889-3 April1977) was an Australian cricketer. 5:John Ryder (August 1889-April 1977) was an Australian cricketer.</td></tr><tr><td>VTM</td><td>1:John Ryder (8 August 1889-4April1977)wasan Australian cricketer. 2:John Ryder (born 8 August 1889)was an Australian cricketer. 3:Jack Ryder (born August9,1889 in Victoria,Australia) was an Australian cricketer. 4:JohnRyder(August8,1889-April4,1977)was an Australian rules footballer who played for Victoria in the Victorian football league (VFL). 5:John Ryder,also known as the king of Collingwood(8 August1889-4 April1977) was an Australian cricketer.</td></tr></table>
235
+
236
+ Computational cost. We further compare the computational cost of VTM with other models, for both training and testing phases. We train and test the models on a single Tesla V100 GPU. The time spent to reach the lowest ELBO in the validation set is listed in Table 6. VTM is trained about five times longer than the baseline Table2seq model (160 minutes, 15 epochs in total) because of the training of an extra large number of raw data (84k pairwise data and 841k raw texts). In the testing phase, VTM enjoys the same speed as other competitor models, approximately 80 minutes to generate 72k wiki sentences in the test set.
237
+
238
+ Case study. Table 7 shows an example of sentences generated by different models. Although forward sampling enables the Table2seq model to generate diversely, it is more likely to generate incorrect and irrelevant content. For example, it generates the wrong club name in Sentence 3. By sampling from template space, VTM-noraw can generate texts with multiple templates, like different expressions for birth date and death date, while preserving readability. Furthermore, with extra raw data, VTM is able to generate more diverse expressions, which other models cannot produce, such as “[fullname], also known as [nickname] ([birth date] – [daeth date]) was a [country] [article name 4].” (Sentence 5). It implies that raw sentences not in the pairwise dataset could additionally enrich the information in template space.
239
+
240
+ # 5 RELATED WORK
241
+
242
+ Data-to-text Generation. Data-to-text generation aims to produce summary for the factual structured data, such as numerical table. Neural language models have made distinguished progress by generating sentences from the table in an end-to-end style. Jain et al. (2018) proposed a mixed hierarchical attention model to generate weather report from the standard table. Gong et al. (2019) proposed a hierarchical table-encoder and a decoder with dual attention. Although encoder-decoder models can generate fluent sentences, they are criticized for deficiency in sentence diversity. Other works focused on controllable and interpretable generation by introducing templates as latent variables. Wiseman et al. (2018) designed a Semi-HMM decoder to learn discrete templates representation, and Dou et al. (2018) created a platform, Data2TextStudio, equipped with a Semi-HMMs model, to extract template and generate from table input in an interactive way.
243
+
244
+ Semi-supervised Learning From Raw Data. It is easier to acquire raw text than to get structured data, and most neural generators cannot make the best use of raw text, universally. Ma et al. (2019) proposed that encoder-decoder framework may fail when not enough parallel corpus is provided. In the area of machine translation, back-translation have been proved to be an effective method to utilize monolingual data (Sennrich et al., 2016; Burlot & Yvon, 2018).
245
+
246
+ Latent Variable Generative Model. Deep generative models, especially variational autoencoders (VAE) (Kingma & Welling, 2014) have shown a promising performance in generation. Bowman et al. (2016) showed that a RNN-based VAE model can produce diverse and well-formed sentences by sampling from the prior of continuous latent variable. Recent works explored methods to learn disentangled latent variables (Hu et al., 2017a; Zhou & Neubig, 2017; Bao et al., 2019). For instance, Bao et al. (2019) devised multi-task losses adversarial losses to disentangle the latent space into syntactic space and semantic space. Motivated by the idea of back-translation and variational autoencoders, VTM model proposed in this work can not only fully utilize the non-parallel text corpus, but also learn a disentangled representation for template and content.
247
+
248
+ # 6 CONCLUSION
249
+
250
+ In this paper, we propose the Variational Template Machine (VTM) based on a semi-supervised learning approach in the VAE framework. Our method not only builds independent latent spaces for template and content for diverse generation, but also exploits raw texts without tables to further expand the template diversity. Experimental results on two datasets show that VTM outperforms the model without using raw data in terms of both generation quality and diversity, and it can achieve a comparable quality in generation with Table2seq, as well as promote the diversity by a large margin.
251
+
252
+ # ACKNOWLEDGMENTS
253
+
254
+ We thank the anonymous reviewers for their insightful comments. Hao Zhou and Zhongyu Wei are the corresponding authors of this paper.
255
+
256
+ # REFERENCES
257
+
258
+ Gabor Angeli, Percy Liang, and Dan Klein. A simple domain-independent probabilistic approach to generation. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, 2010.
259
+
260
+ Mikel Artetxe, Gorka Labaka, Eneko Agirre, and Kyunghyun Cho. Unsupervised neural machine translation. In Proceedings of the International Conference on Learning Representations, 2018.
261
+
262
+ Junwei Bao, Duyu Tang, Nan Duan, Zhao Yan, Yuanhua Lv, Ming Zhou, and Tiejun Zhao. Tableto-text: Describing table region with natural language. In Proceedings of the AAAI Conference on Artificial Intelligence, 2018.
263
+
264
+ Yu Bao, Hao Zhou, Shujian Huang, Lei Li, Lili Mou, Olga Vechtomova, Xinyu Dai, and Jiajun Chen. Generating sentences from disentangled syntactic and semantic spaces. In Proceedings of the Conference of the Association for Computational Linguistics, 2019.
265
+
266
+ Samuel Bowman, Luke Vilnis, Oriol Vinyals, Andrew M Dai, Rafal Jozefowicz, and Samy Bengio. Generating sentences from a continuous space. In Proceedings of the Conference on Computational Natural Language Learning., 2016.
267
+
268
+ Franck Burlot and Franc¸ois Yvon. Using monolingual data in neural machine translation: a systematic study. In Proceedings of the Conference on Machine Translation: Research Papers, 2018.
269
+
270
+ Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. Proceedings of the Advances in Neural Information Processing Systems, 2016.
271
+
272
+ Andrew Chisholm, Will Radford, and Ben Hachey. Learning to generate one-sentence biographies from wikidata. In Proceedings of the Conference of the European Chapter of the Association for Computational Linguistics, 2017.
273
+
274
+ Longxu Dou, Guanghui Qin, Jinpeng Wang, Jin-Ge Yao, and Chin-Yew Lin. Data2text studio: Automated text generation from structured data. In Proceedings of the Conference on Empirical Methods in Natural Language Processing: System Demonstrations, 2018.
275
+
276
+ Jessica Ficler and Yoav Goldberg. Controlling linguistic style aspects in neural language generation. In Proceedings of the Workshop on Stylistic Variation, 2017.
277
+
278
+ Heng Gong, Xiaocheng Feng, Bing Qin, and Ting Liu. Table-to-text generation with effective hierarchical encoder on three dimensions (row, column and time). In Proceedings of the Conference on Empirical Methods in Natural Language Processing and the International Joint Conference on Natural Language Processing, 2019.
279
+
280
+ Ari Holtzman, Jan Buys, Maxwell Forbes, and Yejin Choi. The curious case of neural text degeneration. arXiv preprint arXiv:1904.09751, 2019.
281
+
282
+ Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P Xing. Toward controlled generation of text. In Proceedings of the International Conference on Machine Learning, 2017a.
283
+
284
+ Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P Xing. Toward controlled generation of text. In Proceedings of the International Conference on Machine Learning, 2017b.
285
+
286
+ Zhiheng Huang, Wei Xu, and Kai Yu. Bidirectional lstm-crf models for sequence tagging. arXiv preprint arXiv:1508.01991, 2015.
287
+
288
+ Parag Jain, Anirban Laha, Karthik Sankaranarayanan, Preksha Nema, Mitesh M Khapra, and Shreyas Shetty. A mixed hierarchical attention based encoder-decoder approach for standard table summarization. In Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics, 2018.
289
+
290
+ Vineet John, Lili Mou, Hareesh Bahuleyan, and Olga Vechtomova. Disentangled representation learning for non-parallel text style transfer. In Proceedings of the Conference of the Association for Computational Linguistics, 2018.
291
+
292
+ Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceedings of the International Conference on Learning Representations, 2015.
293
+
294
+ Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. In Proceedings of the International Conference on Learning Representations, 2014.
295
+
296
+ Remi Lebret, David Grangier, and Michael Auli. Neural text generation from structured data with ´ application to the biography domain. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, 2016.
297
+
298
+ Tianyu Liu, Kexiang Wang, Lei Sha, Baobao Chang, and Zhifang Sui. Table-to-text generation by structure-aware seq2seq learning. In Proceedings of the AAAI Conference on Artificial Intelligence, 2018.
299
+
300
+ Shuming Ma, Pengcheng Yang, Tianyu Liu, Peng Li, Jie Zhou, and Xu Sun. Key fact as pivot: A two-stage model for low resource table-to-text generation. In Proceedings of the Annual Meeting of the Association for Computational Linguistics, 2019.
301
+
302
+ Hongyuan Mei, Mohit Bansal, and Matthew R Walter. What to talk about and how? selective generation using lstms with coarse-to-fine alignment. In Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, 2016.
303
+
304
+ Lena Reed, Shereen Oraby, and Marilyn Walker. Can neural generators for dialogue learn sentence planning and discourse structuring? In Proceedings of the International Conference on Natural Language Generation, 2018.
305
+
306
+ Rico Sennrich, Barry Haddow, and Alexandra Birch. Improving neural machine translation models with monolingual data. In Proceedings of the Annual Meeting of the Association for Computational Linguistics, 2016.
307
+
308
+ Tianxiao Shen, Tao Lei, Regina Barzilay, and Tommi Jaakkola. Style transfer from non-parallel text by cross-alignment. In Proceedings of the Advances in Neural Information Processing Systems, 2017.
309
+
310
+ Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Proceedings of the Advances in Neural Information Processing Systems, 2014.
311
+
312
+ Qingyun Wang, Xiaoman Pan, Lifu Huang, Boliang Zhang, Zhiying Jiang, Heng Ji, and Kevin Knight. Describing a knowledge base. In Proceedings of the International Conference on Natural Language Generation, 2018a.
313
+
314
+ Qingyun Wang, Xiaoman Pan, Lifu Huang, Boliang Zhang, Zhiying Jiang, Heng Ji, and Kevin Knight. Describing a knowledge base. In Proceedings of the International Conference on Natural Language Generation, 2018b.
315
+
316
+ Sam Wiseman, Stuart Shieber, and Alexander Rush. Challenges in data-to-document generation. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, 2017.
317
+
318
+ Sam Wiseman, Stuart Shieber, and Alexander Rush. Learning neural templates for text generation. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, 2018.
319
+
320
+ Eric P Xing, Michael I Jordan, and Stuart Russell. A generalized mean field algorithm for variational inference in exponential families. In Proceedings of the Conference on Uncertainty in Artificial Intelligence, 2003.
321
+
322
+ Shengjia Zhao, Jiaming Song, and Stefano Ermon. Infovae: Information maximizing variational autoencoders. arXiv preprint arXiv:1706.02262, 2017.
323
+
324
+ Tiancheng Zhao, Kyusong Lee, and Maxine Eskenazi. Unsupervised discrete sentence representation learning for interpretable neural dialog generation. In Proceedings of the Annual Meeting of the Association for Computational Linguistics, 2018.
325
+
326
+ Chunting Zhou and Graham Neubig. Multi-space variational encoder-decoders for semi-supervised labeled sequence transduction. Proceedings of the Annual Meeting of the Association for Computational Linguistics, 2017.
327
+
328
+ Yaoming Zhu, Sidi Lu, Lei Zheng, Jiaxian Guo, Weinan Zhang, Jun Wang, and Yong Yu. Texygen: A benchmarking platform for text generation models. In Proceedings of the International ACM SIGIR Conference on Research & Development in Information Retrieval, 2018.
329
+
330
+ # A EXPLANATION FOR PRESERVING-CONTENT LOSS
331
+
332
+ The first term of $- \mathcal { L } _ { \mathrm { p c } } ( x , y )$ is equivalent to:
333
+
334
+ $$
335
+ \begin{array} { r l } { \mathbb { E } _ { q , ( c | s + 1 ) } \| \boldsymbol { E } - \hbar \| ^ { 2 } } & { = \mathbf { R } _ { q , ( c | s ) } \displaystyle \sum _ { i = 1 } ^ { N } ( c _ { i } - \hbar _ { i } ) ^ { 2 } } \\ & { = \displaystyle \sum _ { i = 1 } ^ { N } \mathbb { E } _ { q , ( c | s ) } ( c _ { i } - \hbar _ { i } ) ^ { 2 } } \\ & { = \displaystyle \sum _ { i = 1 } ^ { N } ( \| ( c _ { i } - \hbar _ { i } ) ) ^ { 2 } + \mathrm { v a r } ( c _ { i } ) \| } \\ & { = \displaystyle \sum _ { i = 1 } ^ { N } ( \| ( c _ { i } - \hbar _ { i } ) ) ^ { 2 } + \mathrm { v a r } ( c _ { i } ) \| } \\ & { = \displaystyle \sum _ { i = 1 } ^ { N } ( \| ( c _ { i } ( c _ { i } ) - \hbar _ { i } ) ) ^ { 2 } + \mathrm { v a r } ( c _ { i } ) \| } \\ & { = \displaystyle \sum _ { i = 1 } ^ { N } ( \| ( c _ { i } - \hbar _ { i } ) ) ^ { 2 } + \mathrm { v a r } ( c _ { i } ) \| } \\ & { = \displaystyle \sum _ { i = 1 } ^ { N } ( \| ( \boldsymbol { \mu } _ { i } - \hbar _ { i } ) ^ { 2 } + \boldsymbol { \chi } _ { i } ) } \\ & { = \| \boldsymbol { u } - \hbar _ { i } \| ^ { 2 } + \boldsymbol { b r } ( \boldsymbol { \Sigma } ) , } \end{array}
336
+ $$
337
+
338
+ When we minimize it, we jointly minimize the distance between mean of approximated posterior distribution, and the trace of the co-variance matrix.
339
+
340
+ # B PROOF FOR ANTI-INFORMATION PROPERTY OF ELBO
341
+
342
+ Consider the $\mathrm { K L }$ divergence over the whole dataset (or a mini-batch of data), we have
343
+
344
+ $$
345
+ \begin{array} { r l } { \mathbb { E } _ { x \sim p ( x ) } [ D _ { \mathrm { K L } } ( q ( \boldsymbol { z } | \boldsymbol { x } ) \| p ( \boldsymbol { x } ) ) ] = } & { \mathbb { E } _ { q ( \boldsymbol { z } | \boldsymbol { x } ) p ( \boldsymbol { x } ) } [ \log q ( \boldsymbol { z } | \boldsymbol { x } ) - \log p ( \boldsymbol { z } ) ] } \\ & { = - \ H ( \boldsymbol { z } | \boldsymbol { x } ) - \mathbb { E } _ { q ( \boldsymbol { z } ) } \log p ( \boldsymbol { z } ) } \\ & { = - \ H ( \boldsymbol { z } | \boldsymbol { x } ) + H ( \boldsymbol { z } ) + D _ { \mathrm { K L } } ( q ( \boldsymbol { z } ) \| p ( \boldsymbol { z } ) ) } \\ & { = I ( \boldsymbol { z } , \boldsymbol { x } ) + D _ { \mathrm { K L } } ( q ( \boldsymbol { z } ) \| p ( \boldsymbol { z } ) ) } \end{array}
346
+ $$
347
+
348
+ where $q ( \boldsymbol { z } ) = \mathbb { E } _ { \boldsymbol { x } \sim \mathcal { D } } ( q ( \boldsymbol { z } | \boldsymbol { x } ) )$ and $I ( z , x ) = H ( z ) - H ( z | x )$ . Since $\mathrm { K L }$ divergence can be viewed as a regularization term in ELBO loss, When ELBO is maximized, the KL term is minimized, and mutual information between $x$ and latent $z$ , $I ( z , x )$ is minimized. This implies that $z$ and $x$ eventually become more independent.
349
+
350
+ # C PROOF FOR THE PRESERVING-TEMPLATE LOSS WHEN POSTERIOR COLLAPSE HAPPENS
351
+
352
+ When posterior collapse happens, $D _ { \mathrm { K L } } ( q ( \boldsymbol { z } | \boldsymbol { y } ) | | \boldsymbol { p } ( \boldsymbol { z } ) ) \approx 0 ,$ ,
353
+
354
+ $$
355
+ \begin{array} { r l } { \mathcal { L } _ { p t } ( Y , \tilde { Y } ) = \mathbb { E } _ { \tilde { y } \sim p ( \tilde { y } ) , y \sim p ( y ) } \mathbb { E } _ { z \sim q ( z | y ) } \log p _ { \eta } ( \tilde { y } | z ) } & { } \\ { = \mathbb { E } _ { \tilde { y } \sim p ( \tilde { y } ) } \mathbb { E } _ { z \sim p ( z ) } \log p _ { \eta } ( \tilde { y } | z ) } & { } \\ { = \displaystyle \int _ { \tilde { y } } p ( \tilde { y } ) \int _ { z } p ( z ) \log p _ { \eta } ( \tilde { y } | z ) \mathrm { d } z \mathrm { d } \tilde { y } } & { } \\ { = \displaystyle \int _ { z } p ( z ) \int _ { \tilde { y } } p ( \tilde { y } ) \log p _ { \eta } ( \tilde { y } | z ) \mathrm { d } z \mathrm { d } \tilde { y } } & { } \\ { = \mathbb { E } _ { z } \mathbb { E } _ { \tilde { y } } [ \log p _ { \eta } ( y ) | z ] = \mathbb { E } _ { \tilde { y } } \log p _ { \eta } ( y ) } & { } \end{array}
356
+ $$
357
+
358
+ During the back-propagation,
359
+
360
+ $$
361
+ | | \triangledown _ { z } \mathcal { L } _ { p t } ( Y , \tilde { Y } ) | | = 0
362
+ $$
363
+
364
+ thus, $\phi _ { z }$ is not updated.
365
+
366
+ # D IMPLEMENTATION DETAILS
367
+
368
+ For the model trained on WIKI dataset, the the dimension of latent template variable is set as 100, and the dimension of latent content variable is set as 200. The dimension of the hidden for table is 300. For the hyperparameters of total loss $\mathcal { L } _ { t o t }$ , we set $\lambda _ { \mathrm { M I } } = 0 . 5$ , $\lambda _ { \mathrm { p t } } = 1 . 0$ and $\lambda _ { \mathrm { p c } } = 0 . 5$ .
369
+
370
+ For the model trained on SPNLG dataset, the dimension of latent template variable is set as 64, and the dimension of latent content variable is set as 100. The dimension of the hidden for table is also 300. For the hyperparameters of total loss $\mathcal { L } _ { t o t }$ , we set $\lambda _ { \mathrm { M I } } = \lambda _ { \mathrm { p t } } = \lambda _ { \mathrm { p c } } = 1 . 0$ .
371
+
372
+ # E CASE STUDY ON SPNLG EXPERIMENT
373
+
374
+ Table 8: An example of the generated text by our model and the baselines on SPNLG dataset.
375
+
376
+ <table><tr><td>Table</td><td>name[nameVariable],eatType[pub],food[French],priceRange[2O-25],area[riverside]</td></tr><tr><td>Reference</td><td>nameVariable isa French place witha price range of 2O-25.It is in riverside.It isa pub. 1: nameVariable isa pub with a price range of 2O-25.It is a French restaurant in riverside.</td></tr><tr><td>Table2seq-sample</td><td>2: nameVariable is a French restaurant in riverside with a price range of 2O-25.nameVariable is a pub. 3: nameVariable is a pub with a price range of 2O-25 and nameVariable is aFrench restaurant in riverside. 4: nameVariable is a pub with a price range of 2O-25,also it is in riverside.it is a Japanese place. 5:nameVariable isa pub with a average rating and it isaFrench place in riverside.</td></tr><tr><td>Temp-KN</td><td>1:nameVariableisin riverside,also itisinriverside. 2:nameVariable isaFrench restaurant. 3:nameVariable is the best restaurant. 4:nameVariable is in riverside,and nameVariable is in [location]. 5:nameVariable is in.ItsaFrench restaurant and itis in[location] with foodand,even if nameVariable is [food_qual],it is the best place. 1: nameVariable is apub with a price range of 2O-25.It is aFrench place in riverside.</td></tr><tr><td>VTM-noraw</td><td>2:nameVariable is a pub with a price range of 2O-25.it is a pub.It is in riverside. 3: nameVariable is a French place in riverside with a price range of 2O-25.It is a pub. 4:nameVariable is a French place in riverside with a price range of 2O-25.It is a pub. 5:nameVariable is a French place in riverside with a price range of 2O-25.It is a pub. 1:nameVariable is a French place in riversidewith a price range of 2O-25.It isa pub.</td></tr><tr><td>VTM</td><td>2: nameVariable is a pub with a price range of 2O-25.It is in riverside.It is a French place. 3:nameVariable is a French pub in riverside with a price range of 2O-25,and it is a pub. 4:nameVariable is a French restaurant in riverside and it is a pub. 5:nameVariable is a French place in riverside with a price range of 2O-25.It is a pub.</td></tr></table>
parse/train/HkejNgBtPB/HkejNgBtPB_content_list.json ADDED
@@ -0,0 +1,1887 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "VARIATIONAL TEMPLATE MACHINE FOR DATA-TOTEXT GENERATION ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 820,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Rong $\\mathbf { Y } \\mathbf { e } ^ { \\dagger * } ;$ , Wenxian Shi, Hao Zhou, Zhongyu Wei†, Lei Li ",
17
+ "bbox": [
18
+ 183,
19
+ 169,
20
+ 589,
21
+ 184
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "†Fudan University \n$\\{ \\mathrm { r y e 1 8 , z y w e i } \\} ($ @fudan.edu.cn \nByteDance AI Lab \n{shiwenxian,zhouhao.nlp,lileilab}@.bytedance.com ",
28
+ "bbox": [
29
+ 184,
30
+ 186,
31
+ 653,
32
+ 241
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "ABSTRACT ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 454,
42
+ 277,
43
+ 544,
44
+ 292
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "How to generate descriptions from structured data organized in tables? Existing approaches using neural encoder-decoder models often suffer from lacking diversity. We claim that an open set of templates is crucial for enriching the phrase constructions and realizing varied generations. Learning such templates is prohibitive since it often requires a large paired <table,description> corpus, which is seldom available. This paper explores the problem of automatically learning reusable “templates” from paired and non-paired data. We propose the variational template machine (VTM), a novel method to generate text descriptions from data tables. Our contributions include: a) we carefully devise a specific model architecture and losses to explicitly disentangle text template and semantic content information in the latent spaces, and $^ b$ ) we utilize both small parallel data and large raw text without aligned tables to enrich the template learning. Experiments on datasets from a variety of different domains show that VTM is able to generate more diversely while keeping a good fluency and quality. ",
51
+ "bbox": [
52
+ 233,
53
+ 310,
54
+ 764,
55
+ 503
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 534,
66
+ 336,
67
+ 549
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Generating text descriptions from structured data (data-to-text) is an important task with many practical applications. Data-to-text has been used to generate different kinds of texts, such as weather reports (Angeli et al., 2010), sports news (Mei et al., 2016; Wiseman et al., 2017) and biographies (Lebret et al., 2016; Wang et al., 2018b; Chisholm et al., 2017). Figure 1 gives an example of data-to-text task, which takes an infobox 1 as the input and outputs a brief description of the information in the table. There are several recent methods utilizing neural encoder-decoder frameworks to generate text description from data tables (Lebret et al., 2016; Bao et al., 2018; Chisholm et al., 2017; Liu et al., 2018). ",
74
+ "bbox": [
75
+ 173,
76
+ 565,
77
+ 825,
78
+ 676
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Although current table-to-text models could generate high quality sentences, the diversity of these output sentences are not satisfactory. We find that templates are crucial in increasing the variations of sentence structure. For example, Table 1 gives three descriptions with their templates for the given table input. Different templates control the sentence arrangement, thus vary the generation. Some related work (Wiseman et al., 2018; Dou et al., 2018) employs hidden semi-Markov hidden model to extract templates from table-text pairs. ",
85
+ "bbox": [
86
+ 174,
87
+ 684,
88
+ 825,
89
+ 767
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "We argue that templates can be better considered for generating more diverse outputs. First, it is non-trivial to sample different templates for obtaining different output utterances. Directly adopting variational auto-encoders (VAEs, Kingma & Welling (2014)) in table-to-text only enables to sample in the latent space. However, VAEs always generate irrelevant outputs, which may change the table content instead of sampling templates. This may harm the quality of output sentences. To address the above problem, if we can directly sample in the template space, we may get more diverse outputs while keeping the good quality of output sentences. ",
96
+ "bbox": [
97
+ 173,
98
+ 775,
99
+ 825,
100
+ 872
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "table",
106
+ "img_path": "images/8f61d06447102f242ff0013cf9dd1b1b343431d4051c520b80b7c0742dc57980.jpg",
107
+ "table_caption": [
108
+ "Table 1: An example: generating sentences based on different templates. "
109
+ ],
110
+ "table_footnote": [],
111
+ "table_body": "<table><tr><td>Table:</td><td>name[nameVariable],eatType[pub], food[Japanese],priceRange[average],customerRating[low], area[riverside]</td></tr><tr><td>Template1:</td><td>[name] is a [food] restaurant, it is a [eatType] and it has an [priceRange] cost and [customerRating] rating. it is in [area].</td></tr><tr><td>Sentence1:</td><td>nameVariable is a Japanese restaurant,it is a pub and it has an average cost and low rating.it is in riverside.</td></tr><tr><td>Template2:</td><td>[name] has an [priceRange] price range with a [customerRating] rating,and [name] is an [food] [eat- Type] in [area].</td></tr><tr><td>Sentence2:</td><td>nameVariable has an average price range with a low rating,and nameVariable is an Japanse pub in riverside.</td></tr><tr><td>Template3:</td><td>[name] is a [eatType] with a[customerRating]rating and [priceRange] cost,it is a [food] restaurant and [name] is in [area].</td></tr><tr><td>Sentence3:</td><td>nameVariable is a pub with a low rating and average cost, it is a Japanese restaurant and nameVariable is in riverside.</td></tr></table>",
112
+ "bbox": [
113
+ 176,
114
+ 102,
115
+ 823,
116
+ 272
117
+ ],
118
+ "page_idx": 1
119
+ },
120
+ {
121
+ "type": "text",
122
+ "text": "Second, we can hardly obtain promising sentences by sampling in the template space, if the template space is less informative. Namely, either encoder-decoder models or VAE-based models requires abundant parallel table-text pairs during the training. In such case, constructing high-quality parallel dataset is often labor-intensive. With limited table-sentence pairs, a VAE model cannot construct an informative template space. How to fully utilize raw sentences (without aligned table) to enrich the latent template space is under study. ",
123
+ "bbox": [
124
+ 174,
125
+ 314,
126
+ 825,
127
+ 398
128
+ ],
129
+ "page_idx": 1
130
+ },
131
+ {
132
+ "type": "text",
133
+ "text": "In this paper, to address the above two problems, we propose the variational template machine (VTM) for data-to-text generation, which enables to generate sentences with diverse templates while preserving the high quality. Particularly, we introduce two latent variables, representing template and content, to control the generation. The two latent variables are disentangled, and thus we can generate diverse outputs by directly sampling in the latent space for template. Moreover, we propose a novel approach for semi-supervised learning in the VAE framework, which could fully exploit the raw sentences for enriching the template space. Inspired by back-translation (Sennrich et al., 2016; Burlot & Yvon, 2018; Artetxe et al., 2018), we design a variational back-translation process. Instead of training a sentence-to-table backward generation model directly, we take the variational posterior of the content latent variable as the backward model to help to train the forward generative model. Auxiliary losses are introduced to ensure the learning of meaningful and disentangled latent variables. ",
134
+ "bbox": [
135
+ 174,
136
+ 405,
137
+ 825,
138
+ 571
139
+ ],
140
+ "page_idx": 1
141
+ },
142
+ {
143
+ "type": "text",
144
+ "text": "Experimental results on Wikipedia biography dataset (Lebret et al., 2016) and sentence planning NLG dataset (Reed et al., 2018) show that our model can generate texts with more diversity while keeping a good fluency. Training together with a large amount of raw text, VTM can further improve the generation performance. Besides, VTM is more predominant in the case where sentence-to-table backward model is hard to train. Ablation studies also demonstrate the effects of the auxiliary losses on the disentanglement of template and content spaces. ",
145
+ "bbox": [
146
+ 174,
147
+ 578,
148
+ 825,
149
+ 662
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "2 PROBLEM FORMULATION AND NOTATIONS ",
156
+ "text_level": 1,
157
+ "bbox": [
158
+ 174,
159
+ 683,
160
+ 562,
161
+ 699
162
+ ],
163
+ "page_idx": 1
164
+ },
165
+ {
166
+ "type": "text",
167
+ "text": "As a data-to-text task, we have table-text pairs $\\mathcal { D } _ { p } = \\{ ( \\boldsymbol { { x } } _ { i } , \\boldsymbol { { y } } _ { i } ) \\} _ { i = 1 } ^ { N }$ , where $\\mathbf { \\Delta } _ { \\mathbf { \\mathcal { X } } _ { i } }$ is the table, and $\\mathbf { \\nabla } _ { \\mathbf { \\psi } _ { 3 } } \\psi _ { i }$ is the output sentence. ",
168
+ "bbox": [
169
+ 176,
170
+ 712,
171
+ 821,
172
+ 742
173
+ ],
174
+ "page_idx": 1
175
+ },
176
+ {
177
+ "type": "text",
178
+ "text": "Following the description scheme of Lebrrecords of field-position-value triples, i.e., le , $_ { \\textbf { \\em x } }$ caere be viewed as a sis the field and of is $K$ $\\pmb { x } = \\{ ( f , p , v ) _ { i } \\} _ { i = 1 } ^ { K }$ $f$ $p$ index of value $v$ in the field $f$ . For example, an item “Name: John Lennon” is denoted as two corresponding records: (Name, $I$ , John) and (Name, 2, Lennon). For each triple, we first embed field, position and value as $d$ -dim vectors $e _ { p } , e _ { f } , e _ { v } \\in \\mathbb { R } ^ { d }$ . Then, the $d _ { t }$ -dim representation of the record is obtained by $h _ { i } = { \\bf t a n h } ( W [ e _ { f } , e _ { p } , e _ { v } ] ^ { T } + b ) , \\quad i = 1 . . . K ,$ where $W \\in \\mathbb { R } ^ { d _ { t } \\times 3 d }$ and $b \\in \\mathbb { R } ^ { d _ { t } }$ are parameters. The final representation of the table, denoted as $f _ { e n c } ( x )$ , is obtained by max-pooling over all field-position-value triple records, ",
179
+ "bbox": [
180
+ 173,
181
+ 748,
182
+ 825,
183
+ 862
184
+ ],
185
+ "page_idx": 1
186
+ },
187
+ {
188
+ "type": "equation",
189
+ "img_path": "images/b813815801b8d3831da5ae114cc777295d2156058198ca49951eb1a6d6bbd106.jpg",
190
+ "text": "$$\nf _ { \\mathrm { e n c } } ( x ) = h = \\mathbf { M a x P o o l } _ { i } \\{ h _ { i } ; i = 1 . . . K \\} .\n$$",
191
+ "text_format": "latex",
192
+ "bbox": [
193
+ 359,
194
+ 866,
195
+ 637,
196
+ 883
197
+ ],
198
+ "page_idx": 1
199
+ },
200
+ {
201
+ "type": "text",
202
+ "text": "In addition to the table-text pairs, we also have raw texts without table input, denoted as $\\mathcal { D } _ { r } =$ $\\{ \\pmb { y } _ { i } \\} _ { i = 1 } ^ { M }$ . It usually has $M \\gg N$ . ",
203
+ "bbox": [
204
+ 173,
205
+ 895,
206
+ 821,
207
+ 924
208
+ ],
209
+ "page_idx": 1
210
+ },
211
+ {
212
+ "type": "image",
213
+ "img_path": "images/97941bbec79533ff5ed26a32f9f1f3b1ae26028b2be52918306fbbab2e3a2fb9.jpg",
214
+ "image_caption": [
215
+ "Figure 2: The graphical model of VTM: $_ z$ is the latent variable from template space, and $^ c$ is the content variable. $_ { \\textbf { \\em x } }$ is the corresponding table for the tabletext pairs. $\\textbf { { y } }$ is the observed sentence. The solid lines depict the generative model and the dashed lines form the inference model. "
216
+ ],
217
+ "image_footnote": [],
218
+ "bbox": [
219
+ 179,
220
+ 106,
221
+ 524,
222
+ 281
223
+ ],
224
+ "page_idx": 2
225
+ },
226
+ {
227
+ "type": "image",
228
+ "img_path": "images/675c3e5de3702652ddb4090cc30dcd33761915be2bee28d60d24a4d46aa762ca.jpg",
229
+ "image_caption": [],
230
+ "image_footnote": [],
231
+ "bbox": [
232
+ 588,
233
+ 123,
234
+ 803,
235
+ 227
236
+ ],
237
+ "page_idx": 2
238
+ },
239
+ {
240
+ "type": "text",
241
+ "text": "3 VARIATIONAL TEMPLATE MACHINE ",
242
+ "text_level": 1,
243
+ "bbox": [
244
+ 174,
245
+ 383,
246
+ 504,
247
+ 401
248
+ ],
249
+ "page_idx": 2
250
+ },
251
+ {
252
+ "type": "text",
253
+ "text": "As shown in the graphical model in Figure 2, our VTM modifies the vanilla VAE model by introducing two independent latent variables $_ z$ and $^ c$ , representing template latent variable and content latent variable respectively. $^ c$ models the content information in the table, while $_ { z }$ models the sentence template information. Target sentence $y$ is generated by both content and template variables. The two latent variables are disentangled, which makes it possible to generate diverse and relevant sentences by sampling template variable and retraining the content variable. Considering pairwise and raw data presented in Figure 1, their generation process for the content latent variable $^ c$ is different. ",
254
+ "bbox": [
255
+ 173,
256
+ 417,
257
+ 825,
258
+ 530
259
+ ],
260
+ "page_idx": 2
261
+ },
262
+ {
263
+ "type": "text",
264
+ "text": "• For a given table-text pair $( x , y ) \\in \\mathcal { D } _ { p }$ , the content is observable from table $x$ . As a result, $^ c$ is assumed to be deterministic given table $x$ , whose prior is defined as a delta distribution $p ( c | x ) = \\delta ( c = f _ { \\mathrm { e n c } } ( x ) )$ . The marginal log-likelihood is: ",
265
+ "bbox": [
266
+ 187,
267
+ 539,
268
+ 823,
269
+ 583
270
+ ],
271
+ "page_idx": 2
272
+ },
273
+ {
274
+ "type": "equation",
275
+ "img_path": "images/5c05d0696a22503b60c5bfffd8354aa9b50efa069931421ab1dee7412c124c50.jpg",
276
+ "text": "$$\n\\begin{array} { l } { \\displaystyle \\log p _ { \\theta } ( y | x ) = \\log \\int _ { z } \\int _ { c } p _ { \\theta } ( y | x , z , c ) p ( z ) p ( c | x ) \\mathrm { d } \\mathbf { c } \\mathrm { d } \\mathbf { z } } \\\\ { \\displaystyle \\qquad = \\log \\int _ { z } p _ { \\theta } ( y | x , z , c = f _ { \\mathrm { e n c } } ( x ) ) p ( z ) \\mathrm { d } \\mathbf { z } , ( x , y ) \\in \\mathcal { D } _ { p } . } \\end{array}\n$$",
277
+ "text_format": "latex",
278
+ "bbox": [
279
+ 300,
280
+ 593,
281
+ 728,
282
+ 661
283
+ ],
284
+ "page_idx": 2
285
+ },
286
+ {
287
+ "type": "text",
288
+ "text": "• For raw text $y \\in { \\mathcal { D } } _ { n }$ , the content is unobservable with the absence of table $x$ . As a result, the content latent variable $c$ should be sampled from prior of Gaussian distribution $\\mathcal { N } ( 0 , I )$ . The marginal log-likelihood is: ",
289
+ "bbox": [
290
+ 192,
291
+ 675,
292
+ 821,
293
+ 718
294
+ ],
295
+ "page_idx": 2
296
+ },
297
+ {
298
+ "type": "equation",
299
+ "img_path": "images/44b54095be5b448d7087842f641a761e202294dbc2ecbcae092eaa3a5246375a.jpg",
300
+ "text": "$$\n\\log p _ { \\theta } ( y ) = \\log \\int _ { z } \\int _ { c } p _ { \\theta } ( y | z , c ) p ( z ) p ( c ) \\mathrm { d } \\mathbf { c } \\mathrm { d } \\mathbf { z } , y \\in \\mathcal { D } _ { r } .\n$$",
301
+ "text_format": "latex",
302
+ "bbox": [
303
+ 334,
304
+ 728,
305
+ 694,
306
+ 763
307
+ ],
308
+ "page_idx": 2
309
+ },
310
+ {
311
+ "type": "text",
312
+ "text": "In order to make full use of both table-text pair data and raw text data, the above marginal loglikelihood should be optimized jointly: ",
313
+ "bbox": [
314
+ 173,
315
+ 777,
316
+ 821,
317
+ 806
318
+ ],
319
+ "page_idx": 2
320
+ },
321
+ {
322
+ "type": "equation",
323
+ "img_path": "images/608d578afd0462a1850db13ced8db440cc2608d729fc69b72425c51522b073fb.jpg",
324
+ "text": "$$\n\\begin{array} { r } { \\mathcal { L } ( \\theta ) = \\mathbb { E } _ { ( x , y ) \\sim \\mathcal { D } _ { p } } [ \\log p _ { \\theta } ( y | x ) ] + \\mathbb { E } _ { y \\sim \\mathcal { D } _ { r } } [ \\log p _ { \\theta } ( y ) ] . } \\end{array}\n$$",
325
+ "text_format": "latex",
326
+ "bbox": [
327
+ 325,
328
+ 818,
329
+ 673,
330
+ 837
331
+ ],
332
+ "page_idx": 2
333
+ },
334
+ {
335
+ "type": "text",
336
+ "text": "Directly optimizing Equation 3 is intractable. Following the idea of variational inference (Kingma & Welling, 2014), a variational posterior $q _ { \\phi } ( \\cdot )$ is constructed as an inference model (dashed lines in Figure 2) to approximate the true posterior. Instead of optimizing the marginal log-likelihood in Equation 3, we maximize the evidence lower bound (ELBO). In Section 3.1 and 3.2, the ELBO of table-text pairwise data and raw text data are discussed, respectively. ",
337
+ "bbox": [
338
+ 173,
339
+ 853,
340
+ 825,
341
+ 924
342
+ ],
343
+ "page_idx": 2
344
+ },
345
+ {
346
+ "type": "text",
347
+ "text": "3.1 LEARNING FROM TABLE-TEXT PAIR DATA ",
348
+ "text_level": 1,
349
+ "bbox": [
350
+ 176,
351
+ 103,
352
+ 506,
353
+ 118
354
+ ],
355
+ "page_idx": 3
356
+ },
357
+ {
358
+ "type": "text",
359
+ "text": "In this section, we will show the learning loss of table-text pair data. According to the aforementioned assumption, the content variable $^ c$ is observable and follows a delta distribution centred in the hidden representation of the table $x$ . ",
360
+ "bbox": [
361
+ 174,
362
+ 128,
363
+ 823,
364
+ 171
365
+ ],
366
+ "page_idx": 3
367
+ },
368
+ {
369
+ "type": "text",
370
+ "text": "ELBO objective. Assuming that the template variable $_ z$ only relies on the template of target sentence, we introduce $q _ { \\phi } ( z | y )$ as an approximation of the true posterior $p ( z | y , c , x )$ , ",
371
+ "bbox": [
372
+ 169,
373
+ 178,
374
+ 823,
375
+ 208
376
+ ],
377
+ "page_idx": 3
378
+ },
379
+ {
380
+ "type": "text",
381
+ "text": "The ELBO loss of Equation 1 is written as ",
382
+ "bbox": [
383
+ 176,
384
+ 213,
385
+ 457,
386
+ 228
387
+ ],
388
+ "page_idx": 3
389
+ },
390
+ {
391
+ "type": "equation",
392
+ "img_path": "images/1fc3f44814e7485da3b9bf8889b3a4161291768dfc68ff4fa7932a059ec2af24.jpg",
393
+ "text": "$$\n\\mathcal { L } _ { \\mathrm { E L B O } _ { p } } ( x , y ) = - \\mathbb { E } _ { q _ { \\phi _ { z } } ( z | y ) } \\log p _ { \\theta } ( y | z , c = f _ { \\mathrm { e n c } } ( x ) , x ) + D _ { \\mathrm { K L } } ( q _ { \\phi _ { z } } ( z | y ) \\| p ( z ) ) , \\quad ( x , y ) \\in \\mathcal { D } _ { p } .\n$$",
394
+ "text_format": "latex",
395
+ "bbox": [
396
+ 186,
397
+ 231,
398
+ 808,
399
+ 250
400
+ ],
401
+ "page_idx": 3
402
+ },
403
+ {
404
+ "type": "text",
405
+ "text": "The variational posterior $q _ { \\phi _ { z } } ( z | y )$ is assumed as a multivariate Gaussian distribution $\\mathcal { N } ( \\mu _ { \\phi _ { z } } ( y ) , \\Sigma _ { \\phi _ { z } } ( y ) )$ , while the prior $p ( z )$ is taken as a normal distribution $\\mathcal { N } ( 0 , I )$ . ",
406
+ "bbox": [
407
+ 173,
408
+ 251,
409
+ 823,
410
+ 280
411
+ ],
412
+ "page_idx": 3
413
+ },
414
+ {
415
+ "type": "text",
416
+ "text": "Preserving-Template Loss. Without any supervision, the ELBO loss alone does not guarantee to learn a good template representation space. Inspired by the work in style-transfer $\\mathrm { H u }$ et al., 2017b; Shen et al., 2017; Bao et al., 2019; John et al., 2018), an auxiliary loss is introduced to embed the template information of sentences into template variable $_ z$ . ",
417
+ "bbox": [
418
+ 174,
419
+ 285,
420
+ 825,
421
+ 342
422
+ ],
423
+ "page_idx": 3
424
+ },
425
+ {
426
+ "type": "text",
427
+ "text": "With table, we are able to roughly align the tokens in sentence with the records in the table. By replacing these tokens with a special token $< e n t >$ , we can remove the content information from sentences and get the sketchy sentence template, denote as $\\tilde { y }$ . We introduce the preserving-template loss ${ \\mathcal { L } } _ { \\mathrm { p t } }$ to ensure that the latent variable $z$ only contains the information of the template. ",
428
+ "bbox": [
429
+ 173,
430
+ 348,
431
+ 825,
432
+ 406
433
+ ],
434
+ "page_idx": 3
435
+ },
436
+ {
437
+ "type": "equation",
438
+ "img_path": "images/0f392a65c169602007ab7587cf9d2ead580427c7f56298211cb57d41eb9ea5d8.jpg",
439
+ "text": "$$\n\\mathcal { L } _ { \\mathrm { p t } } ( x , y , \\tilde { y } ) = - \\mathbb { E } _ { q _ { \\phi _ { z } } ( z | y ) } \\log p _ { \\eta } ( \\tilde { y } | z ) = - \\mathbb { E } _ { q _ { \\phi _ { z } } ( z | y ) } \\sum _ { t = 1 } ^ { m } \\log p _ { \\eta } ( \\tilde { y } _ { t } | z , \\tilde { y } _ { < t } )\n$$",
440
+ "text_format": "latex",
441
+ "bbox": [
442
+ 256,
443
+ 407,
444
+ 740,
445
+ 449
446
+ ],
447
+ "page_idx": 3
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "where $m$ is the length of the $\\tilde { y }$ , and $\\eta$ denotes the parameters of the extra template generator. ${ \\mathcal { L } } _ { \\mathrm { p t } }$ is trained via parallel data. In practice, due to the insufficient amount of parallel data, template generator $p _ { \\eta }$ may not be well-learned. However, experimental results show that this loss is sufficient to provide a guidance for learning a template space. ",
452
+ "bbox": [
453
+ 173,
454
+ 450,
455
+ 825,
456
+ 507
457
+ ],
458
+ "page_idx": 3
459
+ },
460
+ {
461
+ "type": "text",
462
+ "text": "3.2 LEARNING FROM RAW TEXT DATA ",
463
+ "text_level": 1,
464
+ "bbox": [
465
+ 176,
466
+ 522,
467
+ 457,
468
+ 536
469
+ ],
470
+ "page_idx": 3
471
+ },
472
+ {
473
+ "type": "text",
474
+ "text": "Our model is able to make use of a large number of raw data without table since the content information of table could be obtained by the content latent variable. ",
475
+ "bbox": [
476
+ 176,
477
+ 547,
478
+ 821,
479
+ 577
480
+ ],
481
+ "page_idx": 3
482
+ },
483
+ {
484
+ "type": "text",
485
+ "text": "ELBO objective. According to the definition of generative model in Equation 2, the ELBO of raw text data is ",
486
+ "bbox": [
487
+ 173,
488
+ 582,
489
+ 821,
490
+ 609
491
+ ],
492
+ "page_idx": 3
493
+ },
494
+ {
495
+ "type": "equation",
496
+ "img_path": "images/04f239fe9b8a7b48d4d38b7d14e18e1fa97afc1b3cbc8d8f71b1cec28ce0731a.jpg",
497
+ "text": "$$\n\\log p _ { \\theta } ( y ) = \\mathbb { E } _ { q _ { \\phi } ( z , c | y ) } \\log \\frac { p _ { \\theta } ( y , z , c ) } { q _ { \\phi } ( z , c | y ) } , \\quad y \\in \\mathcal { D } _ { r } .\n$$",
498
+ "text_format": "latex",
499
+ "bbox": [
500
+ 336,
501
+ 607,
502
+ 658,
503
+ 642
504
+ ],
505
+ "page_idx": 3
506
+ },
507
+ {
508
+ "type": "text",
509
+ "text": "With the mean field approximation (Xing et al., 2003), $q _ { \\phi } ( z , c | x )$ can be factorized as: $q _ { \\phi } ( z , c | y ) =$ $q _ { \\phi _ { z } } ( z | y ) q _ { \\phi _ { c } } ( c | y )$ . We have: ",
510
+ "bbox": [
511
+ 176,
512
+ 642,
513
+ 823,
514
+ 670
515
+ ],
516
+ "page_idx": 3
517
+ },
518
+ {
519
+ "type": "equation",
520
+ "img_path": "images/1a993ddd601342b5e3e14ee27a1c37e64fbfdf2471aa7664164b0172774636a6.jpg",
521
+ "text": "$$\n\\begin{array} { r l } & { \\mathcal { L } _ { \\mathrm { E L B O } _ { r } } ( y ) = - \\mathbb { E } _ { q _ { \\phi _ { z } } ( z | y ) q _ { \\phi _ { c } } ( c | y ) } \\log p _ { \\theta } ( y | z , c ) } \\\\ & { \\quad \\quad \\quad \\quad \\quad \\quad + D _ { \\mathrm { K L } } ( q _ { \\phi _ { z } } ( z | y ) | | p ( z ) ) + D _ { \\mathrm { K L } } ( q _ { \\phi _ { c } } ( c | y ) | | p ( c ) ) , \\quad y \\in \\mathcal { D } _ { r } . } \\end{array}\n$$",
522
+ "text_format": "latex",
523
+ "bbox": [
524
+ 256,
525
+ 671,
526
+ 740,
527
+ 710
528
+ ],
529
+ "page_idx": 3
530
+ },
531
+ {
532
+ "type": "text",
533
+ "text": "In order to make use of template information contained in raw text data effectively, the parameters of generation network $p _ { \\theta } ( y \\vert z , c )$ and posterior network $q _ { \\phi _ { z } } ( z | y )$ are shared for pairwise and raw data. In decoding process, for raw text data, we use content variable $c$ as the table embedding for the missing of table $x$ . Variational posterior for $c$ is deployed as another multivariate Guassian $q _ { \\phi _ { c } } ( c | y ) = \\bar { \\mathcal { N } } ( \\mu _ { \\phi _ { c } } ( y ) , \\Sigma _ { \\phi _ { c } } ( y ) )$ . Both $p ( z )$ and $p ( c )$ are taken as normal distribution $\\mathcal { N } ( 0 , I )$ . ",
534
+ "bbox": [
535
+ 173,
536
+ 710,
537
+ 825,
538
+ 782
539
+ ],
540
+ "page_idx": 3
541
+ },
542
+ {
543
+ "type": "text",
544
+ "text": "Preserving-Content Loss. In order to make the posterior $q _ { \\phi _ { c } } ( c | y )$ correctly infers the content information, the table-text pairs are used as the supervision to train the recognition network of $q _ { \\phi _ { c } } ( c | y )$ . To this end, we add a preserving-content loss ",
545
+ "bbox": [
546
+ 173,
547
+ 787,
548
+ 825,
549
+ 829
550
+ ],
551
+ "page_idx": 3
552
+ },
553
+ {
554
+ "type": "equation",
555
+ "img_path": "images/8b20dabd4996b6c16fc6fc65f77934b2dc00882593bbf065d3c68d98409c1798.jpg",
556
+ "text": "$$\n\\begin{array} { r } { \\mathcal { L } _ { \\mathtt { p c } } ( x , y ) = - \\mathbb { E } _ { q _ { \\phi _ { c } } ( c | y ) } \\| c - h \\| ^ { 2 } + D _ { \\mathrm { K L } } \\big ( q _ { \\phi _ { c } } ( c | y ) | | p ( c ) \\big ) , \\quad ( x , y ) \\in \\mathcal { D } _ { p } , } \\end{array}\n$$",
557
+ "text_format": "latex",
558
+ "bbox": [
559
+ 258,
560
+ 832,
561
+ 738,
562
+ 852
563
+ ],
564
+ "page_idx": 3
565
+ },
566
+ {
567
+ "type": "text",
568
+ "text": "where $h = f _ { \\mathrm { e n c } } ( x )$ is the embedding of table obtained by the table encoder. Minimizing ${ \\mathcal L } _ { \\mathrm { p c } }$ is also helpful to bridge the gap of $c$ between pairwise (taking $c = h$ ) and raw training data (sampling from $q _ { \\phi } ( c | y ) )$ . Moreover, we find that the first term of ${ \\mathcal { L } } _ { \\mathrm { p c } }$ is equivalent to (1) make the mean of $q _ { \\phi } ( c | y )$ closer to $h$ ; (2) minimize the trace of co-variance of $q _ { \\phi } ( c | y )$ . The second term serves as a regularization. Detailed explanations and proof are referred in supplementary materials. ",
569
+ "bbox": [
570
+ 173,
571
+ 853,
572
+ 825,
573
+ 924
574
+ ],
575
+ "page_idx": 3
576
+ },
577
+ {
578
+ "type": "text",
579
+ "text": "Algorithm 1 Training procedure ",
580
+ "text_level": 1,
581
+ "bbox": [
582
+ 174,
583
+ 103,
584
+ 390,
585
+ 118
586
+ ],
587
+ "page_idx": 4
588
+ },
589
+ {
590
+ "type": "text",
591
+ "text": "Input: Model parameters $\\phi _ { z } , \\phi _ { c } , \\theta , \\eta$ Table-text pair data $\\mathcal { D } _ { p } = \\{ ( { \\pmb x } , { \\pmb y } ) _ { i } \\} _ { i = 1 } ^ { N }$ ; raw text data $\\mathcal { D } _ { r } = \\{ \\pmb { y } _ { j } \\} _ { j = 1 } ^ { M }$ ; $M \\gg N$ ",
592
+ "bbox": [
593
+ 176,
594
+ 122,
595
+ 714,
596
+ 147
597
+ ],
598
+ "page_idx": 4
599
+ },
600
+ {
601
+ "type": "text",
602
+ "text": "Procedure TRAIN $( \\mathcal { D } _ { p } , \\mathcal { D } _ { r } )$ ",
603
+ "text_level": 1,
604
+ "bbox": [
605
+ 179,
606
+ 147,
607
+ 352,
608
+ 159
609
+ ],
610
+ "page_idx": 4
611
+ },
612
+ {
613
+ "type": "text",
614
+ "text": "1: Update $\\phi _ { z } , \\phi _ { c } , \\theta , \\eta$ by gradient descent on $\\mathcal { L } _ { \\mathrm { E L B O } _ { p } } + \\mathcal { L } _ { \\mathrm { M I } } + \\mathcal { L } _ { \\mathrm { p t } } + \\mathcal { L } _ { \\mathrm { p c } }$ \n2: Update $\\phi _ { z } , \\phi _ { c } , \\theta$ by gradient descent on $\\mathcal { L } _ { \\mathrm { E L B O } _ { r } } + \\mathcal { L } _ { \\mathrm { M I } }$ \n3: Update $\\phi _ { z } , \\phi _ { c } , \\theta , \\eta$ by gradient descent on $\\mathcal { L } _ { t o t }$ ",
615
+ "bbox": [
616
+ 179,
617
+ 161,
618
+ 629,
619
+ 200
620
+ ],
621
+ "page_idx": 4
622
+ },
623
+ {
624
+ "type": "text",
625
+ "text": "3.3 MUTUAL INFORMATION LOSS ",
626
+ "text_level": 1,
627
+ "bbox": [
628
+ 176,
629
+ 227,
630
+ 423,
631
+ 241
632
+ ],
633
+ "page_idx": 4
634
+ },
635
+ {
636
+ "type": "text",
637
+ "text": "As introduced by previous works (Chen et al., 2016; Zhao et al., 2017; 2018), adding mutual information term to ELBO could alleviate KL collapse effectively and improve the quality of variational posterior. Adding mutual information terms directly imposes the association of content and template latent variables with target sentences. Besides, theoretical proof2 and experimental results show that introducing mutual information bias is necessary in the presence of preserving-template loss $\\mathcal { L } _ { \\mathrm { p t } } ( \\pmb { x } ^ { p } , \\pmb { y } ^ { p } )$ . ",
638
+ "bbox": [
639
+ 173,
640
+ 252,
641
+ 825,
642
+ 338
643
+ ],
644
+ "page_idx": 4
645
+ },
646
+ {
647
+ "type": "text",
648
+ "text": "As a result, in our work, the following mutual information term is added to objective ",
649
+ "bbox": [
650
+ 176,
651
+ 343,
652
+ 727,
653
+ 358
654
+ ],
655
+ "page_idx": 4
656
+ },
657
+ {
658
+ "type": "equation",
659
+ "img_path": "images/7db185fd92c783973441bb9b26276f0dee0ec7e6806516cf774104e236d22cb4.jpg",
660
+ "text": "$$\n\\mathcal { L } _ { \\mathrm { M I } } ( y ) = - I ( z , y ) - I ( c , y ) .\n$$",
661
+ "text_format": "latex",
662
+ "bbox": [
663
+ 398,
664
+ 361,
665
+ 596,
666
+ 378
667
+ ],
668
+ "page_idx": 4
669
+ },
670
+ {
671
+ "type": "text",
672
+ "text": "3.4 TRAINING PROCESS ",
673
+ "text_level": 1,
674
+ "bbox": [
675
+ 174,
676
+ 393,
677
+ 354,
678
+ 407
679
+ ],
680
+ "page_idx": 4
681
+ },
682
+ {
683
+ "type": "text",
684
+ "text": "The final loss of VTM is made up of the ELBO losses and extra losses: ",
685
+ "bbox": [
686
+ 174,
687
+ 419,
688
+ 642,
689
+ 434
690
+ ],
691
+ "page_idx": 4
692
+ },
693
+ {
694
+ "type": "equation",
695
+ "img_path": "images/4e68075935838a932e5dbae0ae0bc4df3f4d65e92d3d08684fd0186c18bf7951.jpg",
696
+ "text": "$$\n\\begin{array} { r l } & { \\mathcal { L } _ { t o t } ( x ^ { p } , y ^ { p } , y ^ { r } ) = \\mathcal { L } _ { \\mathrm { E L B O } _ { p } } ( x ^ { p } , y ^ { p } ) + \\mathcal { L } _ { \\mathrm { E L B O } _ { r } } ( y ^ { r } ) + \\lambda _ { \\mathrm { M I } } ( \\mathcal { L } _ { \\mathrm { M I } } ( y ^ { p } ) + \\mathcal { L } _ { \\mathrm { M I } } ( y ^ { r } ) ) } \\\\ & { \\qquad + \\lambda _ { \\mathrm { p t } } \\mathcal { L } _ { \\mathrm { p t } } ( x ^ { p } , y ^ { p } ) + \\lambda _ { \\mathrm { p c } } \\mathcal { L } _ { \\mathrm { p c } } ( x ^ { p } , y ^ { p } ) , \\qquad ( x ^ { p } , y ^ { p } ) \\in \\mathcal { D } _ { p } , y ^ { r } \\in \\mathcal { D } _ { r } . } \\end{array}\n$$",
697
+ "text_format": "latex",
698
+ "bbox": [
699
+ 230,
700
+ 436,
701
+ 767,
702
+ 476
703
+ ],
704
+ "page_idx": 4
705
+ },
706
+ {
707
+ "type": "text",
708
+ "text": "$\\lambda _ { \\mathrm { M I } } , \\lambda _ { \\mathrm { p t } }$ and $\\lambda _ { \\mathrm { p c } }$ are hyperparameters with respect to auxiliary losses. ",
709
+ "bbox": [
710
+ 173,
711
+ 477,
712
+ 625,
713
+ 492
714
+ ],
715
+ "page_idx": 4
716
+ },
717
+ {
718
+ "type": "text",
719
+ "text": "The training procedure is shown in Algorithm 1. The parameters of generation network $\\theta$ and posterior network $\\phi _ { z , c }$ could be trained jointly by both table-text pair data and raw text data. In this way, a large number of raw text data can be used to enrich the generation diversity. ",
720
+ "bbox": [
721
+ 174,
722
+ 498,
723
+ 823,
724
+ 540
725
+ ],
726
+ "page_idx": 4
727
+ },
728
+ {
729
+ "type": "text",
730
+ "text": "4 EXPERIMENT ",
731
+ "text_level": 1,
732
+ "bbox": [
733
+ 174,
734
+ 559,
735
+ 316,
736
+ 575
737
+ ],
738
+ "page_idx": 4
739
+ },
740
+ {
741
+ "type": "text",
742
+ "text": "4.1 DATASETS AND BASELINE MODELS",
743
+ "text_level": 1,
744
+ "bbox": [
745
+ 176,
746
+ 590,
747
+ 460,
748
+ 604
749
+ ],
750
+ "page_idx": 4
751
+ },
752
+ {
753
+ "type": "text",
754
+ "text": "Dataset. We perform the experiment on SPNLG (Reed et al., 2018)3 and WIKI (Lebret et al., 2016; Wang et al., 2018b). Two datasets come from two different domains. The former is a collection of restaurant descriptions, which expands the E2E dataset4 into a total of 204, 955 utterances with more varied sentence structures and instances. The latter contains 728, 321 sentences of biographies from Wikipedia. To simulate the environment that a large number of raw texts provided, we just use part of the table-text pairs from two datasets, leaving most of the instances as raw texts. Concretely, for two datasets, we initially keep the ratio of table-text pairs to raw texts as 1:10. For WIKI dataset, in addition to the data from WikiBio (Lebret et al., 2016), the raw text data is further extended by the biographical descriptions of people5 from external Wikipedia Person and Animal Dataset (Wang et al., 2018a). The statistics for the number of table-text pairs and raw texts in the training, validation and test sets are shown in Table 2. ",
755
+ "bbox": [
756
+ 173,
757
+ 616,
758
+ 825,
759
+ 770
760
+ ],
761
+ "page_idx": 4
762
+ },
763
+ {
764
+ "type": "text",
765
+ "text": "Evaluation Metrics. For WIKI dataset, we evaluate the generation quality based on BLEU-4, NIST, ROUGE-L (F-score). For SPNLG, we use BLEU-4, NIST, METEOR, ROUGE-L (F-score), and CIDEr. We use the same automatic evaluation script from E2E NLG Challenge6. The diversity of generation is evaluated by self-BLEU (Zhu et al., 2018). The lower self-BLEU, the more diversely the model generates. ",
766
+ "bbox": [
767
+ 173,
768
+ 776,
769
+ 825,
770
+ 845
771
+ ],
772
+ "page_idx": 4
773
+ },
774
+ {
775
+ "type": "table",
776
+ "img_path": "images/e7f6a26fdfc7a567382c56284884bb7d51a27202cd67e6aa2a8fdebf0f4cf34e.jpg",
777
+ "table_caption": [
778
+ "Table 2: Dataset statistics in our experiments. "
779
+ ],
780
+ "table_footnote": [],
781
+ "table_body": "<table><tr><td></td><td colspan=\"2\">Train</td><td colspan=\"2\">Valid</td><td>Test</td></tr><tr><td>Dataset</td><td>#table-text pair</td><td>#raw text</td><td>#table-text pair</td><td>#rawtext</td><td>#table-text pair</td></tr><tr><td>SPNLG</td><td>14,906</td><td>149,058</td><td>20,495</td><td>/</td><td>20,496</td></tr><tr><td>WIKI</td><td>84,150</td><td>841,507</td><td>72,831</td><td>42,874</td><td>72,831</td></tr></table>",
782
+ "bbox": [
783
+ 225,
784
+ 101,
785
+ 767,
786
+ 155
787
+ ],
788
+ "page_idx": 5
789
+ },
790
+ {
791
+ "type": "text",
792
+ "text": "Baseline models. We implement the following models as baselines: ",
793
+ "bbox": [
794
+ 174,
795
+ 200,
796
+ 629,
797
+ 214
798
+ ],
799
+ "page_idx": 5
800
+ },
801
+ {
802
+ "type": "text",
803
+ "text": "• Table2seq: Table2seq model first encodes the table into hidden representations then generates the sentence in a sequence-to-sequence architecture (Sutskever et al., 2014). For a fair comparison, we apply the same table-encoder architecture as in Section 2 and the same LSTM decoder with attention mechanism as our model. The model is only trained on pair-wise data. During the testing, we generate five sentences with beam size ranging from one to five to increase some variations. We denote the model as Table2seq-beam. We also implement the decoding with forward sampling strategy (namely Table2seq-sample). Moreover, to incorporate raw data, we first pretrain the decoder using raw text as a language model, then train Table2seq on the table-text pairs, which is noted as Table2seq-pretrain. Table2seq-pretrain has the same decoding strategy as Table2seq-beam. • Temp-KN: Template-KN model (Lebret et al., 2016) first generates a template according to the interpolated 5-gram Kneser-Ney (KN) language modeled over sentence templates, then replaces the special token for the field with the corresponding words from the table. ",
804
+ "bbox": [
805
+ 173,
806
+ 229,
807
+ 826,
808
+ 416
809
+ ],
810
+ "page_idx": 5
811
+ },
812
+ {
813
+ "type": "text",
814
+ "text": "The hype-parameters of the VTM are chosen based on the lowest $\\mathcal { L } _ { \\mathrm { E L B O } _ { p } }$ on the validation set of SPNLG and $\\mathcal { L } _ { \\mathrm { E L B O } _ { p } } + \\mathcal { L } _ { \\mathrm { E L B O } _ { r } }$ on the validation set of WIKI. Word embeddings are randomly initialized with 300-dimension. During training, we use Adam optimizer (Kingma & Ba, 2015) with the initial learning rate as 0.001. Details on hyperparameters are listed in Appendix D. ",
815
+ "bbox": [
816
+ 174,
817
+ 429,
818
+ 825,
819
+ 486
820
+ ],
821
+ "page_idx": 5
822
+ },
823
+ {
824
+ "type": "text",
825
+ "text": "4.2 EXPERIMENTAL RESULTS ON SPNLG DATASET ",
826
+ "text_level": 1,
827
+ "bbox": [
828
+ 174,
829
+ 506,
830
+ 539,
831
+ 520
832
+ ],
833
+ "page_idx": 5
834
+ },
835
+ {
836
+ "type": "text",
837
+ "text": "Quantitative analysis. According to the results in Table 3, we find that our variational template machine (VTM) can generally produce sentences with more diversity under a promising performance in terms of BLEU metrics. Table2seq with beam search algorithm (Table2seq-beam), which is only trained on parallel data, generates the most fluent sentences, but its diversity is rather poor. Although the sampling decoder (Table2seq-sample) gets the lowest self-BLEU, it sacrifices the fluency at the cost. Table2seq performs even worse when the decoder is pre-trained by raw data as a language model. Because there is still a gap between the language model and data-to-text task, the decoder fails to learn how to use raw text in the generation of data-to-text stage. On the contrary, VTM can make full use of the raw data with the help of content variables. As a template-based model, Temp-KN receives the lowest self-BLEU score, but it fails to generate fluent sentences. ",
838
+ "bbox": [
839
+ 173,
840
+ 532,
841
+ 825,
842
+ 671
843
+ ],
844
+ "page_idx": 5
845
+ },
846
+ {
847
+ "type": "text",
848
+ "text": "Ablation study. To study the effectiveness of the auxiliary loses and the augmented raw texts, we progressively remove the auxiliary losses and raw data in the ablation study. We reach the conclusions as follows. ",
849
+ "bbox": [
850
+ 174,
851
+ 679,
852
+ 820,
853
+ 720
854
+ ],
855
+ "page_idx": 5
856
+ },
857
+ {
858
+ "type": "text",
859
+ "text": "• Without the preserving-content loss ${ \\mathcal L } _ { \\mathrm { p c } }$ , the model has a relative decline in generation quality. This implies that, by training the same inference model of content variable in pairwise data, preserving-content loss provides an effective instruction for learning the content space. • VTM-noraw is the model trained without using raw data, where only the loss functions in Section 3.1 are optimized. Comparing with VTM-noraw, VTM gets a substantial improvement in generation quality. More importantly, without extra raw text data, there is also a decline in diversity (self-BLEU). Experimental results show that raw data plays a valuable role in improving both generation quality and diversity, which is often neglected by previous studies. • We further remove the mutual information loss and preserving-template loss from VTM-noraw model. Both generation quality and diversity continuously decline, which verifies the effectiveness of the two losses. Moreover, the automatic evaluation results of VTM-noraw- $\\mathcal { L } _ { \\mathrm { M I } ^ { - } } \\mathcal { L } _ { \\mathrm { p t } }$ empirically show that preserving-template loss may be a hinder if we only add it during the training, as illustrated in Section 3.3. ",
860
+ "bbox": [
861
+ 174,
862
+ 728,
863
+ 825,
864
+ 924
865
+ ],
866
+ "page_idx": 5
867
+ },
868
+ {
869
+ "type": "table",
870
+ "img_path": "images/8f099d80dca366731ee1e0e591865991ebbcdec6d77a8a36395706fc5bc8425e.jpg",
871
+ "table_caption": [],
872
+ "table_footnote": [
873
+ "Table 3: Result for SPNLG data set. Under the 0.05 significance level, VTM gets significantly higher results in all the fluency metrics than all the baselines except Table2seq-beam. "
874
+ ],
875
+ "table_body": "<table><tr><td>Methods</td><td>BLEU</td><td>NIST</td><td>METEOR</td><td>ROUGE</td><td>CIDEr</td><td>Self-BLEU</td></tr><tr><td>Table2seq-beam</td><td>40.61</td><td>6.31</td><td>38.67</td><td>56.95</td><td>3.74</td><td>97.14</td></tr><tr><td>Table2seq-sample</td><td>34.97</td><td>5.68</td><td>35.46</td><td>52.74</td><td>3.00</td><td>65.69</td></tr><tr><td>Table2seq-pretrain</td><td>40.56</td><td>6.33</td><td>38.51</td><td>56.32</td><td>3.75</td><td>100.00</td></tr><tr><td>Temp-KN</td><td>6.45</td><td>0.45</td><td>12.53</td><td>27.60</td><td>0.23</td><td>37.85</td></tr><tr><td>VTM</td><td>40.04</td><td>6.25</td><td>38.31</td><td>56.48</td><td>3.64</td><td>88.77</td></tr><tr><td>-Lpc</td><td>39.58</td><td>6.24</td><td>38.30</td><td>56.24</td><td>3.69</td><td>87.20</td></tr><tr><td>VTM-noraw</td><td>39.94</td><td>6.22</td><td>38.42</td><td>56.72</td><td>3.66</td><td>88.92</td></tr><tr><td>-LMI</td><td>38.33</td><td>6.02</td><td>37.77</td><td>55.92</td><td>3.51</td><td>96.55</td></tr><tr><td>-LM1-Lpt</td><td>39.63</td><td>6.24</td><td>38.35</td><td>56.36</td><td>3.70</td><td>92.54</td></tr></table>",
876
+ "bbox": [
877
+ 218,
878
+ 102,
879
+ 774,
880
+ 238
881
+ ],
882
+ "page_idx": 6
883
+ },
884
+ {
885
+ "type": "image",
886
+ "img_path": "images/4aecf456246c864b3447dc443908515b64c01bb97ab50e3e6bda3196315534db.jpg",
887
+ "image_caption": [
888
+ "Figure 3: Quality-diversity trade-off curve on SPNLG dataset. "
889
+ ],
890
+ "image_footnote": [],
891
+ "bbox": [
892
+ 189,
893
+ 285,
894
+ 449,
895
+ 425
896
+ ],
897
+ "page_idx": 6
898
+ },
899
+ {
900
+ "type": "image",
901
+ "img_path": "images/f07f5c7f05211c98eb905f700bf7c38c122aa5db1bdb3b882135e14edfc53e69.jpg",
902
+ "image_caption": [
903
+ "Figure 4: Self-BLEU and the proportion of raw texts to table-sentence pairs. "
904
+ ],
905
+ "image_footnote": [],
906
+ "bbox": [
907
+ 545,
908
+ 290,
909
+ 802,
910
+ 420
911
+ ],
912
+ "page_idx": 6
913
+ },
914
+ {
915
+ "type": "text",
916
+ "text": "Experiment on quality and diversity trade-off. The quality and diversity trade-off is further analyzed to illustrate the superiority of VTM. In order to evaluate the quality and diversity under different sampling methods, we conduct experiment on sampling from the softmax with different temperatures. Sampling from the softmax with temperature is commonly applied to shape the distribution (Ficler & Goldberg, 2017; Holtzman et al., 2019). Given the logits $u _ { 1 : | V | }$ and temperature $\\tau$ , we sample from the distribution: ",
917
+ "bbox": [
918
+ 173,
919
+ 489,
920
+ 825,
921
+ 574
922
+ ],
923
+ "page_idx": 6
924
+ },
925
+ {
926
+ "type": "equation",
927
+ "img_path": "images/3d9779d1b30dca6ba403f21a2211b69359e888d3bc6b78643660a3f087feb12f.jpg",
928
+ "text": "$$\np ( y _ { t } = V _ { l } | y _ { < t } , x , z , \\tau ) = \\frac { \\exp \\left( u _ { l } / \\tau \\right) } { \\sum _ { l ^ { \\prime } } \\exp \\left( u _ { l ^ { \\prime } } / \\tau \\right) }\n$$",
929
+ "text_format": "latex",
930
+ "bbox": [
931
+ 357,
932
+ 579,
933
+ 640,
934
+ 614
935
+ ],
936
+ "page_idx": 6
937
+ },
938
+ {
939
+ "type": "text",
940
+ "text": "When $\\tau \\ \\ 0$ , it approaches greedy decoding. When $\\tau { \\it \\Delta \\phi } = 1 . 0$ , it is the same as forward sampling. In the experiment, we gradually adjust temperature from 0 to 1, taking $\\tau =$ $0 . 1 , 0 . 2 , 0 . 3 , 0 . 5 , 0 . 6 , 0 . 9 , 1 . 0$ . BLEU and self-BLEU under different temperatures are evaluated for both Table2seq and VTM. The self-BLEU in different temperatures and BLEU and self-BLEU curves are plotted in Figure 3. It empirically demonstrates the trade-off between the generation quality and diversity. By sampling from different temperatures, we can plot the portfolios of (Self-BLEU,BLEU) pairs of Table2seq and VTM. The closer the curve is to the upper left, the better the performance of the model. VTM generally gets lower self-BLEU with more diverse outputs under the comparable level of BLEU score. ",
941
+ "bbox": [
942
+ 173,
943
+ 627,
944
+ 825,
945
+ 753
946
+ ],
947
+ "page_idx": 6
948
+ },
949
+ {
950
+ "type": "text",
951
+ "text": "Human evaluation In addition to the quantitative experiments, human evaluation is conducted as well. We randomly select 120 generated samples (each has five sentences) and ask three annotators to rate them on a 1-5 Likert scale in terms of the following features: ",
952
+ "bbox": [
953
+ 176,
954
+ 760,
955
+ 823,
956
+ 801
957
+ ],
958
+ "page_idx": 6
959
+ },
960
+ {
961
+ "type": "text",
962
+ "text": "• Accuracy: whether the generated sentences are consistent with the content in the table. \n• Coherence: whether the generated sentences are coherent. \n• Diversity: whether the sentences have as many patterns/structures as possible. ",
963
+ "bbox": [
964
+ 187,
965
+ 808,
966
+ 779,
967
+ 861
968
+ ],
969
+ "page_idx": 6
970
+ },
971
+ {
972
+ "type": "text",
973
+ "text": "Based on the qualitative results in Table 4, VTM generates the best sentences with the highest accuracy and coherence. Besides, VTM is able to obtain the comparable diversity with Table2seqsample and Temp-KN. Compared with the model without using raw data (VTM-no raw), there is a significant improvement in diversity, which indicates that raw data essentially enriches the latent template space. Although obtaining the highest scores in diversity for Table2seq-sample and TempKN, their generation qualities are much inferior to the VTM, and comparable generation quality is the prerequisite when comparing the diversity. ",
974
+ "bbox": [
975
+ 174,
976
+ 867,
977
+ 825,
978
+ 924
979
+ ],
980
+ "page_idx": 6
981
+ },
982
+ {
983
+ "type": "table",
984
+ "img_path": "images/c9504ca1066f5fbbc3c3bc1ef3650f6d236495f81b008520469b9d560c6578d7.jpg",
985
+ "table_caption": [
986
+ "Table 4: Human evaluation results on different models. The bold numbers are significantly higher then others under 0.01 significance level. "
987
+ ],
988
+ "table_footnote": [],
989
+ "table_body": "<table><tr><td>Methods</td><td>Accuracy</td><td>Coherence</td><td>Diversity</td></tr><tr><td>Table2seq-sample</td><td>3.44</td><td>4.54</td><td>4.87</td></tr><tr><td>Temp-KN</td><td>2.90</td><td>2.78</td><td>4.85</td></tr><tr><td>VTM</td><td>4.44</td><td>4.84</td><td>4.33</td></tr><tr><td>VTM-noraw</td><td>4.33</td><td>4.62</td><td>3.44</td></tr></table>",
990
+ "bbox": [
991
+ 302,
992
+ 99,
993
+ 691,
994
+ 172
995
+ ],
996
+ "page_idx": 7
997
+ },
998
+ {
999
+ "type": "table",
1000
+ "img_path": "images/2f95420a7d19ab54583bb0ce229a06889f5414af42d71990b0ae3618996c99ac.jpg",
1001
+ "table_caption": [
1002
+ "Table 5: Results for WIKI dataset. All the metrics are significant under 0.05 significance level. "
1003
+ ],
1004
+ "table_footnote": [],
1005
+ "table_body": "<table><tr><td>Methods</td><td>BLEU</td><td>NIST</td><td>ROUGE</td><td>Self-BLEU</td></tr><tr><td>Table2seq-beam</td><td>26.74</td><td>5.97</td><td>48.20</td><td>92.00</td></tr><tr><td>Table2seq-sample</td><td>21.75</td><td>5.32</td><td>42.09</td><td>36.07</td></tr><tr><td>Table2seq-pretrain</td><td>25.43</td><td>5.44</td><td>45.86</td><td>99.88</td></tr><tr><td>Temp-KN</td><td>11.68</td><td>2.04</td><td>40.54</td><td>73.14</td></tr><tr><td>VTM</td><td>25.22</td><td>5.96</td><td>45.36</td><td>74.86</td></tr><tr><td>-Lpc</td><td>22.16</td><td>4.28</td><td>40.91</td><td>80.39</td></tr><tr><td>VTM-noraw</td><td>21.59</td><td>5.02</td><td>39.07</td><td>78.19</td></tr><tr><td>-LMI</td><td>21.30</td><td>4.73</td><td>40.99</td><td>79.45</td></tr><tr><td>-CMI-Lp</td><td>16.20</td><td>3.81</td><td>38.04</td><td>84.45</td></tr></table>",
1006
+ "bbox": [
1007
+ 176,
1008
+ 231,
1009
+ 517,
1010
+ 345
1011
+ ],
1012
+ "page_idx": 7
1013
+ },
1014
+ {
1015
+ "type": "image",
1016
+ "img_path": "images/1a75279e7a0e7f9218e42d9b5ce6a0985e0f9ec9effe59cd199867f1be972a07.jpg",
1017
+ "image_caption": [
1018
+ "Figure 5: Quality-diversity trade-off curve compared with NER $^ +$ Table2seq. "
1019
+ ],
1020
+ "image_footnote": [],
1021
+ "bbox": [
1022
+ 568,
1023
+ 234,
1024
+ 789,
1025
+ 353
1026
+ ],
1027
+ "page_idx": 7
1028
+ },
1029
+ {
1030
+ "type": "text",
1031
+ "text": "",
1032
+ "bbox": [
1033
+ 174,
1034
+ 420,
1035
+ 823,
1036
+ 462
1037
+ ],
1038
+ "page_idx": 7
1039
+ },
1040
+ {
1041
+ "type": "text",
1042
+ "text": "Experiment on the diversity under different proportions of raw. In order to show how much raw data may contribute to the VTM model, we train the model under different proportions of raw data to pairwise data in training. Specifically, we control the ratio of raw sentences to the table-text pairs under 0.5:1, 1:1, 2:1, 3:1, 5:1, 7:1 and 10:1. As shown in Figure 4, the self-BLEU rapidly decreases even adding a small number of raw data, and continuously decreases until the ratio equals 5:1. The improvement is marginal after adding more than 5 times of raw data. ",
1043
+ "bbox": [
1044
+ 174,
1045
+ 469,
1046
+ 823,
1047
+ 553
1048
+ ],
1049
+ "page_idx": 7
1050
+ },
1051
+ {
1052
+ "type": "text",
1053
+ "text": "Case study. According to Table 8 (in Appendix E), despite template-like structures vary much in a forward sampling model, the information in sentences may be wrong. For example, Sentence 3 says that the restaurant is a Japanese place. Notably, VTM produces correct texts with more diversity of templates. VTM is able to generate different number of sentences and conjunctions. For example, “[name] is a [food] place in [area] with a price range of [priceRange]. It is a [eatType].” (Sentence 1, two sentences, “with” aggregation), “[name] is a [eatType] with a price range of [priceRange]. It is in [area]. It is a [food] place.” (Sentence 2, three sentences, “with” aggregation), “[name] is a [food] restaurant in [area] and it is a [food].” (Sentence 4, one sentence, “and” aggregation). ",
1054
+ "bbox": [
1055
+ 173,
1056
+ 559,
1057
+ 825,
1058
+ 671
1059
+ ],
1060
+ "page_idx": 7
1061
+ },
1062
+ {
1063
+ "type": "text",
1064
+ "text": "4.3 EXPERIMENTAL RESULTS ON WIKI DATASET ",
1065
+ "text_level": 1,
1066
+ "bbox": [
1067
+ 174,
1068
+ 694,
1069
+ 521,
1070
+ 708
1071
+ ],
1072
+ "page_idx": 7
1073
+ },
1074
+ {
1075
+ "type": "text",
1076
+ "text": "Table 5 shows the results for WIKI dataset, the same conclusions can be drawn as in the results in SPNLG dataset for both the quantitative analysis and ablation study. VTM is able to generate sentences with the comparable quality as Table2seq-beam but more diversity. ",
1077
+ "bbox": [
1078
+ 176,
1079
+ 722,
1080
+ 825,
1081
+ 763
1082
+ ],
1083
+ "page_idx": 7
1084
+ },
1085
+ {
1086
+ "type": "text",
1087
+ "text": "Comparison with the pseudo-table-based method. Another way to incorporate raw data is to construct pseudo-table from the given sentence by applying a sentence-to-table backward model via name entity recognition (NER). However, when the type of entities is complicated, such as in product introduction, or the raw data comes from the different domains as pairwise data, the commonlyused model for NER cannot provide accurate pseudo-tables. In this experiment, we replace 841,507 biography raw sentences with 101,807 sentences that describe the animals (Wang et al., 2018b) to test the generalization of our model in raw data of different domains. NER $^ +$ Table2seq is the twostep model that first constructs the pseudo-table by a Bi-LSTM-CRF (Huang et al., 2015) model trained from the table-text pairs, then trains Table2seq from both table-text pairs and pseudo-tabletext pairs. We control the temperature in decoding method as previous, and results are plotted in Figure 5. We find that compared with NER+Table2seq, the curve of VTM is closer to the upper left, which implies that VTM can generate more diverse (lower Self-BLEU) under the commensurate BLEU. ",
1088
+ "bbox": [
1089
+ 174,
1090
+ 771,
1091
+ 825,
1092
+ 924
1093
+ ],
1094
+ "page_idx": 7
1095
+ },
1096
+ {
1097
+ "type": "table",
1098
+ "img_path": "images/ecc20d9b73a53cf793734c3051602151a446a761596b84e53edee2603e587f15.jpg",
1099
+ "table_caption": [
1100
+ "Table 6: Computational cost for each model. "
1101
+ ],
1102
+ "table_footnote": [],
1103
+ "table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Table2seq</td><td rowspan=1 colspan=1>VTM-noraw</td><td rowspan=1 colspan=1>VTM</td></tr><tr><td rowspan=1 colspan=1>Train</td><td rowspan=1 colspan=1>~30min/6 epochs</td><td rowspan=1 colspan=1>~30min/6 epochs</td><td rowspan=1 colspan=1>~160min/15 epochs</td></tr><tr><td rowspan=1 colspan=1>Test</td><td rowspan=1 colspan=1>~80min</td><td rowspan=1 colspan=1>~80min</td><td rowspan=1 colspan=1>~80min</td></tr></table>",
1104
+ "bbox": [
1105
+ 243,
1106
+ 102,
1107
+ 751,
1108
+ 154
1109
+ ],
1110
+ "page_idx": 8
1111
+ },
1112
+ {
1113
+ "type": "table",
1114
+ "img_path": "images/a2577159254644e7e9639d2021a4f8aa667f942cfc535eaed39e38286ff36bd9.jpg",
1115
+ "table_caption": [
1116
+ "Table 7: An example of the generated text by our model and the baselines on WIKI dataset. "
1117
+ ],
1118
+ "table_footnote": [],
1119
+ "table_body": "<table><tr><td>Table</td><td>name[Jack Ryder],country[Australia],fullname[John Ryder],nickname[the king of Colingwood], birth_date[8 August1889],birth_place[Collingwood,Victoria,Australia],death_date[4 April1977], death_place[Fitzroy,Victoria,Australia],club[Victoria],testdebutyear[192O england],aritcle_title[Jack Ryder (cricketer)]</td></tr><tr><td>Reference</td><td>John“Jack”Ryder,mbe(8 August 1889-3 April1977)wasacricketer who played for Victoria and Australia.</td></tr><tr><td>Table2seq-sample</td><td>1: johnRyder(8 August1889-3 April1977) was an Australian cricketer. 2: john Ryder Ryder(8 August 1889-3 April 1977) was an Australian cricketer . 3: johnRyderRyder(8 August1889-3April 1977) was an Australian cricketer who played for glouces- tershire cricket club in 1912 4: john Ryder(8 August 1889-3 April 1977) was an Australian cricketer . 5: john Ryder oliveira(8August1889-3 April1977)wasan Australian test cricketer who played against great Britain with international cricket club</td></tr><tr><td>Temp-KN</td><td>1: jackRyder(born August 8,1889) isa former professional cricketer). 2:‘jack&quot;Ryder(born August 8,1889) is a former professonal cricketer)who played in the national football league. 3: jack Ryder(born 8 August 1889 in Collingwood, Victoria,) is a former professional cricketer). 4:Jack Ryder(bornAugust8,1889,inColingwood,Victoria,Australia)isaformerprofessionalfootball player who is currently a member of the united states.</td></tr><tr><td>VTM-noraw</td><td>5: jack Ryder(born August 8,1889) isa former professional cricketer). 1:JohnRyder(8August1889-4April1977) wasan Australiancricketer. 2:Jack Ryder (born August 21,1951 in Melbourne,Victoria) was an Australian cricketer. 3:John Ryder(21 August1889-4 April1977) wasan Australian cricketer. 4:Jack Ryder(8 March 1889-3 April1977) was an Australian cricketer. 5:John Ryder (August 1889-April 1977) was an Australian cricketer.</td></tr><tr><td>VTM</td><td>1:John Ryder (8 August 1889-4April1977)wasan Australian cricketer. 2:John Ryder (born 8 August 1889)was an Australian cricketer. 3:Jack Ryder (born August9,1889 in Victoria,Australia) was an Australian cricketer. 4:JohnRyder(August8,1889-April4,1977)was an Australian rules footballer who played for Victoria in the Victorian football league (VFL). 5:John Ryder,also known as the king of Collingwood(8 August1889-4 April1977) was an Australian cricketer.</td></tr></table>",
1120
+ "bbox": [
1121
+ 176,
1122
+ 228,
1123
+ 825,
1124
+ 574
1125
+ ],
1126
+ "page_idx": 8
1127
+ },
1128
+ {
1129
+ "type": "text",
1130
+ "text": "",
1131
+ "bbox": [
1132
+ 176,
1133
+ 659,
1134
+ 823,
1135
+ 686
1136
+ ],
1137
+ "page_idx": 8
1138
+ },
1139
+ {
1140
+ "type": "text",
1141
+ "text": "Computational cost. We further compare the computational cost of VTM with other models, for both training and testing phases. We train and test the models on a single Tesla V100 GPU. The time spent to reach the lowest ELBO in the validation set is listed in Table 6. VTM is trained about five times longer than the baseline Table2seq model (160 minutes, 15 epochs in total) because of the training of an extra large number of raw data (84k pairwise data and 841k raw texts). In the testing phase, VTM enjoys the same speed as other competitor models, approximately 80 minutes to generate 72k wiki sentences in the test set. ",
1142
+ "bbox": [
1143
+ 174,
1144
+ 694,
1145
+ 825,
1146
+ 791
1147
+ ],
1148
+ "page_idx": 8
1149
+ },
1150
+ {
1151
+ "type": "text",
1152
+ "text": "Case study. Table 7 shows an example of sentences generated by different models. Although forward sampling enables the Table2seq model to generate diversely, it is more likely to generate incorrect and irrelevant content. For example, it generates the wrong club name in Sentence 3. By sampling from template space, VTM-noraw can generate texts with multiple templates, like different expressions for birth date and death date, while preserving readability. Furthermore, with extra raw data, VTM is able to generate more diverse expressions, which other models cannot produce, such as “[fullname], also known as [nickname] ([birth date] – [daeth date]) was a [country] [article name 4].” (Sentence 5). It implies that raw sentences not in the pairwise dataset could additionally enrich the information in template space. ",
1153
+ "bbox": [
1154
+ 173,
1155
+ 799,
1156
+ 825,
1157
+ 924
1158
+ ],
1159
+ "page_idx": 8
1160
+ },
1161
+ {
1162
+ "type": "text",
1163
+ "text": "5 RELATED WORK ",
1164
+ "text_level": 1,
1165
+ "bbox": [
1166
+ 176,
1167
+ 102,
1168
+ 344,
1169
+ 117
1170
+ ],
1171
+ "page_idx": 9
1172
+ },
1173
+ {
1174
+ "type": "text",
1175
+ "text": "Data-to-text Generation. Data-to-text generation aims to produce summary for the factual structured data, such as numerical table. Neural language models have made distinguished progress by generating sentences from the table in an end-to-end style. Jain et al. (2018) proposed a mixed hierarchical attention model to generate weather report from the standard table. Gong et al. (2019) proposed a hierarchical table-encoder and a decoder with dual attention. Although encoder-decoder models can generate fluent sentences, they are criticized for deficiency in sentence diversity. Other works focused on controllable and interpretable generation by introducing templates as latent variables. Wiseman et al. (2018) designed a Semi-HMM decoder to learn discrete templates representation, and Dou et al. (2018) created a platform, Data2TextStudio, equipped with a Semi-HMMs model, to extract template and generate from table input in an interactive way. ",
1176
+ "bbox": [
1177
+ 174,
1178
+ 133,
1179
+ 825,
1180
+ 273
1181
+ ],
1182
+ "page_idx": 9
1183
+ },
1184
+ {
1185
+ "type": "text",
1186
+ "text": "Semi-supervised Learning From Raw Data. It is easier to acquire raw text than to get structured data, and most neural generators cannot make the best use of raw text, universally. Ma et al. (2019) proposed that encoder-decoder framework may fail when not enough parallel corpus is provided. In the area of machine translation, back-translation have been proved to be an effective method to utilize monolingual data (Sennrich et al., 2016; Burlot & Yvon, 2018). ",
1187
+ "bbox": [
1188
+ 174,
1189
+ 280,
1190
+ 825,
1191
+ 349
1192
+ ],
1193
+ "page_idx": 9
1194
+ },
1195
+ {
1196
+ "type": "text",
1197
+ "text": "Latent Variable Generative Model. Deep generative models, especially variational autoencoders (VAE) (Kingma & Welling, 2014) have shown a promising performance in generation. Bowman et al. (2016) showed that a RNN-based VAE model can produce diverse and well-formed sentences by sampling from the prior of continuous latent variable. Recent works explored methods to learn disentangled latent variables (Hu et al., 2017a; Zhou & Neubig, 2017; Bao et al., 2019). For instance, Bao et al. (2019) devised multi-task losses adversarial losses to disentangle the latent space into syntactic space and semantic space. Motivated by the idea of back-translation and variational autoencoders, VTM model proposed in this work can not only fully utilize the non-parallel text corpus, but also learn a disentangled representation for template and content. ",
1198
+ "bbox": [
1199
+ 174,
1200
+ 356,
1201
+ 825,
1202
+ 482
1203
+ ],
1204
+ "page_idx": 9
1205
+ },
1206
+ {
1207
+ "type": "text",
1208
+ "text": "6 CONCLUSION ",
1209
+ "text_level": 1,
1210
+ "bbox": [
1211
+ 176,
1212
+ 502,
1213
+ 318,
1214
+ 518
1215
+ ],
1216
+ "page_idx": 9
1217
+ },
1218
+ {
1219
+ "type": "text",
1220
+ "text": "In this paper, we propose the Variational Template Machine (VTM) based on a semi-supervised learning approach in the VAE framework. Our method not only builds independent latent spaces for template and content for diverse generation, but also exploits raw texts without tables to further expand the template diversity. Experimental results on two datasets show that VTM outperforms the model without using raw data in terms of both generation quality and diversity, and it can achieve a comparable quality in generation with Table2seq, as well as promote the diversity by a large margin. ",
1221
+ "bbox": [
1222
+ 174,
1223
+ 535,
1224
+ 825,
1225
+ 619
1226
+ ],
1227
+ "page_idx": 9
1228
+ },
1229
+ {
1230
+ "type": "text",
1231
+ "text": "ACKNOWLEDGMENTS ",
1232
+ "text_level": 1,
1233
+ "bbox": [
1234
+ 176,
1235
+ 637,
1236
+ 326,
1237
+ 650
1238
+ ],
1239
+ "page_idx": 9
1240
+ },
1241
+ {
1242
+ "type": "text",
1243
+ "text": "We thank the anonymous reviewers for their insightful comments. Hao Zhou and Zhongyu Wei are the corresponding authors of this paper. ",
1244
+ "bbox": [
1245
+ 174,
1246
+ 660,
1247
+ 823,
1248
+ 689
1249
+ ],
1250
+ "page_idx": 9
1251
+ },
1252
+ {
1253
+ "type": "text",
1254
+ "text": "REFERENCES ",
1255
+ "text_level": 1,
1256
+ "bbox": [
1257
+ 174,
1258
+ 710,
1259
+ 285,
1260
+ 726
1261
+ ],
1262
+ "page_idx": 9
1263
+ },
1264
+ {
1265
+ "type": "text",
1266
+ "text": "Gabor Angeli, Percy Liang, and Dan Klein. A simple domain-independent probabilistic approach to generation. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, 2010. ",
1267
+ "bbox": [
1268
+ 173,
1269
+ 734,
1270
+ 826,
1271
+ 776
1272
+ ],
1273
+ "page_idx": 9
1274
+ },
1275
+ {
1276
+ "type": "text",
1277
+ "text": "Mikel Artetxe, Gorka Labaka, Eneko Agirre, and Kyunghyun Cho. Unsupervised neural machine translation. In Proceedings of the International Conference on Learning Representations, 2018. ",
1278
+ "bbox": [
1279
+ 171,
1280
+ 787,
1281
+ 823,
1282
+ 818
1283
+ ],
1284
+ "page_idx": 9
1285
+ },
1286
+ {
1287
+ "type": "text",
1288
+ "text": "Junwei Bao, Duyu Tang, Nan Duan, Zhao Yan, Yuanhua Lv, Ming Zhou, and Tiejun Zhao. Tableto-text: Describing table region with natural language. In Proceedings of the AAAI Conference on Artificial Intelligence, 2018. ",
1289
+ "bbox": [
1290
+ 176,
1291
+ 827,
1292
+ 821,
1293
+ 871
1294
+ ],
1295
+ "page_idx": 9
1296
+ },
1297
+ {
1298
+ "type": "text",
1299
+ "text": "Yu Bao, Hao Zhou, Shujian Huang, Lei Li, Lili Mou, Olga Vechtomova, Xinyu Dai, and Jiajun Chen. Generating sentences from disentangled syntactic and semantic spaces. In Proceedings of the Conference of the Association for Computational Linguistics, 2019. ",
1300
+ "bbox": [
1301
+ 174,
1302
+ 881,
1303
+ 825,
1304
+ 924
1305
+ ],
1306
+ "page_idx": 9
1307
+ },
1308
+ {
1309
+ "type": "text",
1310
+ "text": "Samuel Bowman, Luke Vilnis, Oriol Vinyals, Andrew M Dai, Rafal Jozefowicz, and Samy Bengio. Generating sentences from a continuous space. In Proceedings of the Conference on Computational Natural Language Learning., 2016. ",
1311
+ "bbox": [
1312
+ 178,
1313
+ 103,
1314
+ 821,
1315
+ 146
1316
+ ],
1317
+ "page_idx": 10
1318
+ },
1319
+ {
1320
+ "type": "text",
1321
+ "text": "Franck Burlot and Franc¸ois Yvon. Using monolingual data in neural machine translation: a systematic study. In Proceedings of the Conference on Machine Translation: Research Papers, 2018. ",
1322
+ "bbox": [
1323
+ 173,
1324
+ 154,
1325
+ 821,
1326
+ 183
1327
+ ],
1328
+ "page_idx": 10
1329
+ },
1330
+ {
1331
+ "type": "text",
1332
+ "text": "Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. Proceedings of the Advances in Neural Information Processing Systems, 2016. ",
1333
+ "bbox": [
1334
+ 176,
1335
+ 190,
1336
+ 821,
1337
+ 233
1338
+ ],
1339
+ "page_idx": 10
1340
+ },
1341
+ {
1342
+ "type": "text",
1343
+ "text": "Andrew Chisholm, Will Radford, and Ben Hachey. Learning to generate one-sentence biographies from wikidata. In Proceedings of the Conference of the European Chapter of the Association for Computational Linguistics, 2017. ",
1344
+ "bbox": [
1345
+ 174,
1346
+ 241,
1347
+ 823,
1348
+ 284
1349
+ ],
1350
+ "page_idx": 10
1351
+ },
1352
+ {
1353
+ "type": "text",
1354
+ "text": "Longxu Dou, Guanghui Qin, Jinpeng Wang, Jin-Ge Yao, and Chin-Yew Lin. Data2text studio: Automated text generation from structured data. In Proceedings of the Conference on Empirical Methods in Natural Language Processing: System Demonstrations, 2018. ",
1355
+ "bbox": [
1356
+ 176,
1357
+ 291,
1358
+ 823,
1359
+ 335
1360
+ ],
1361
+ "page_idx": 10
1362
+ },
1363
+ {
1364
+ "type": "text",
1365
+ "text": "Jessica Ficler and Yoav Goldberg. Controlling linguistic style aspects in neural language generation. In Proceedings of the Workshop on Stylistic Variation, 2017. ",
1366
+ "bbox": [
1367
+ 169,
1368
+ 342,
1369
+ 823,
1370
+ 372
1371
+ ],
1372
+ "page_idx": 10
1373
+ },
1374
+ {
1375
+ "type": "text",
1376
+ "text": "Heng Gong, Xiaocheng Feng, Bing Qin, and Ting Liu. Table-to-text generation with effective hierarchical encoder on three dimensions (row, column and time). In Proceedings of the Conference on Empirical Methods in Natural Language Processing and the International Joint Conference on Natural Language Processing, 2019. ",
1377
+ "bbox": [
1378
+ 173,
1379
+ 378,
1380
+ 825,
1381
+ 436
1382
+ ],
1383
+ "page_idx": 10
1384
+ },
1385
+ {
1386
+ "type": "text",
1387
+ "text": "Ari Holtzman, Jan Buys, Maxwell Forbes, and Yejin Choi. The curious case of neural text degeneration. arXiv preprint arXiv:1904.09751, 2019. ",
1388
+ "bbox": [
1389
+ 173,
1390
+ 444,
1391
+ 820,
1392
+ 473
1393
+ ],
1394
+ "page_idx": 10
1395
+ },
1396
+ {
1397
+ "type": "text",
1398
+ "text": "Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P Xing. Toward controlled generation of text. In Proceedings of the International Conference on Machine Learning, 2017a. ",
1399
+ "bbox": [
1400
+ 173,
1401
+ 481,
1402
+ 823,
1403
+ 510
1404
+ ],
1405
+ "page_idx": 10
1406
+ },
1407
+ {
1408
+ "type": "text",
1409
+ "text": "Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, and Eric P Xing. Toward controlled generation of text. In Proceedings of the International Conference on Machine Learning, 2017b. ",
1410
+ "bbox": [
1411
+ 171,
1412
+ 517,
1413
+ 823,
1414
+ 546
1415
+ ],
1416
+ "page_idx": 10
1417
+ },
1418
+ {
1419
+ "type": "text",
1420
+ "text": "Zhiheng Huang, Wei Xu, and Kai Yu. Bidirectional lstm-crf models for sequence tagging. arXiv preprint arXiv:1508.01991, 2015. ",
1421
+ "bbox": [
1422
+ 173,
1423
+ 554,
1424
+ 823,
1425
+ 583
1426
+ ],
1427
+ "page_idx": 10
1428
+ },
1429
+ {
1430
+ "type": "text",
1431
+ "text": "Parag Jain, Anirban Laha, Karthik Sankaranarayanan, Preksha Nema, Mitesh M Khapra, and Shreyas Shetty. A mixed hierarchical attention based encoder-decoder approach for standard table summarization. In Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics, 2018. ",
1432
+ "bbox": [
1433
+ 173,
1434
+ 590,
1435
+ 825,
1436
+ 648
1437
+ ],
1438
+ "page_idx": 10
1439
+ },
1440
+ {
1441
+ "type": "text",
1442
+ "text": "Vineet John, Lili Mou, Hareesh Bahuleyan, and Olga Vechtomova. Disentangled representation learning for non-parallel text style transfer. In Proceedings of the Conference of the Association for Computational Linguistics, 2018. ",
1443
+ "bbox": [
1444
+ 174,
1445
+ 655,
1446
+ 823,
1447
+ 699
1448
+ ],
1449
+ "page_idx": 10
1450
+ },
1451
+ {
1452
+ "type": "text",
1453
+ "text": "Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceedings of the International Conference on Learning Representations, 2015. ",
1454
+ "bbox": [
1455
+ 174,
1456
+ 705,
1457
+ 823,
1458
+ 736
1459
+ ],
1460
+ "page_idx": 10
1461
+ },
1462
+ {
1463
+ "type": "text",
1464
+ "text": "Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. In Proceedings of the International Conference on Learning Representations, 2014. ",
1465
+ "bbox": [
1466
+ 173,
1467
+ 742,
1468
+ 823,
1469
+ 772
1470
+ ],
1471
+ "page_idx": 10
1472
+ },
1473
+ {
1474
+ "type": "text",
1475
+ "text": "Remi Lebret, David Grangier, and Michael Auli. Neural text generation from structured data with ´ application to the biography domain. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, 2016. ",
1476
+ "bbox": [
1477
+ 176,
1478
+ 780,
1479
+ 823,
1480
+ 823
1481
+ ],
1482
+ "page_idx": 10
1483
+ },
1484
+ {
1485
+ "type": "text",
1486
+ "text": "Tianyu Liu, Kexiang Wang, Lei Sha, Baobao Chang, and Zhifang Sui. Table-to-text generation by structure-aware seq2seq learning. In Proceedings of the AAAI Conference on Artificial Intelligence, 2018. ",
1487
+ "bbox": [
1488
+ 174,
1489
+ 830,
1490
+ 823,
1491
+ 873
1492
+ ],
1493
+ "page_idx": 10
1494
+ },
1495
+ {
1496
+ "type": "text",
1497
+ "text": "Shuming Ma, Pengcheng Yang, Tianyu Liu, Peng Li, Jie Zhou, and Xu Sun. Key fact as pivot: A two-stage model for low resource table-to-text generation. In Proceedings of the Annual Meeting of the Association for Computational Linguistics, 2019. ",
1498
+ "bbox": [
1499
+ 176,
1500
+ 881,
1501
+ 825,
1502
+ 924
1503
+ ],
1504
+ "page_idx": 10
1505
+ },
1506
+ {
1507
+ "type": "text",
1508
+ "text": "Hongyuan Mei, Mohit Bansal, and Matthew R Walter. What to talk about and how? selective generation using lstms with coarse-to-fine alignment. In Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, 2016. ",
1509
+ "bbox": [
1510
+ 174,
1511
+ 103,
1512
+ 825,
1513
+ 160
1514
+ ],
1515
+ "page_idx": 11
1516
+ },
1517
+ {
1518
+ "type": "text",
1519
+ "text": "Lena Reed, Shereen Oraby, and Marilyn Walker. Can neural generators for dialogue learn sentence planning and discourse structuring? In Proceedings of the International Conference on Natural Language Generation, 2018. ",
1520
+ "bbox": [
1521
+ 174,
1522
+ 169,
1523
+ 823,
1524
+ 210
1525
+ ],
1526
+ "page_idx": 11
1527
+ },
1528
+ {
1529
+ "type": "text",
1530
+ "text": "Rico Sennrich, Barry Haddow, and Alexandra Birch. Improving neural machine translation models with monolingual data. In Proceedings of the Annual Meeting of the Association for Computational Linguistics, 2016. ",
1531
+ "bbox": [
1532
+ 173,
1533
+ 219,
1534
+ 826,
1535
+ 262
1536
+ ],
1537
+ "page_idx": 11
1538
+ },
1539
+ {
1540
+ "type": "text",
1541
+ "text": "Tianxiao Shen, Tao Lei, Regina Barzilay, and Tommi Jaakkola. Style transfer from non-parallel text by cross-alignment. In Proceedings of the Advances in Neural Information Processing Systems, 2017. ",
1542
+ "bbox": [
1543
+ 174,
1544
+ 272,
1545
+ 825,
1546
+ 314
1547
+ ],
1548
+ "page_idx": 11
1549
+ },
1550
+ {
1551
+ "type": "text",
1552
+ "text": "Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Proceedings of the Advances in Neural Information Processing Systems, 2014. ",
1553
+ "bbox": [
1554
+ 173,
1555
+ 323,
1556
+ 821,
1557
+ 353
1558
+ ],
1559
+ "page_idx": 11
1560
+ },
1561
+ {
1562
+ "type": "text",
1563
+ "text": "Qingyun Wang, Xiaoman Pan, Lifu Huang, Boliang Zhang, Zhiying Jiang, Heng Ji, and Kevin Knight. Describing a knowledge base. In Proceedings of the International Conference on Natural Language Generation, 2018a. ",
1564
+ "bbox": [
1565
+ 174,
1566
+ 361,
1567
+ 825,
1568
+ 404
1569
+ ],
1570
+ "page_idx": 11
1571
+ },
1572
+ {
1573
+ "type": "text",
1574
+ "text": "Qingyun Wang, Xiaoman Pan, Lifu Huang, Boliang Zhang, Zhiying Jiang, Heng Ji, and Kevin Knight. Describing a knowledge base. In Proceedings of the International Conference on Natural Language Generation, 2018b. ",
1575
+ "bbox": [
1576
+ 173,
1577
+ 411,
1578
+ 826,
1579
+ 455
1580
+ ],
1581
+ "page_idx": 11
1582
+ },
1583
+ {
1584
+ "type": "text",
1585
+ "text": "Sam Wiseman, Stuart Shieber, and Alexander Rush. Challenges in data-to-document generation. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, 2017. ",
1586
+ "bbox": [
1587
+ 171,
1588
+ 463,
1589
+ 823,
1590
+ 494
1591
+ ],
1592
+ "page_idx": 11
1593
+ },
1594
+ {
1595
+ "type": "text",
1596
+ "text": "Sam Wiseman, Stuart Shieber, and Alexander Rush. Learning neural templates for text generation. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, 2018. ",
1597
+ "bbox": [
1598
+ 171,
1599
+ 501,
1600
+ 821,
1601
+ 531
1602
+ ],
1603
+ "page_idx": 11
1604
+ },
1605
+ {
1606
+ "type": "text",
1607
+ "text": "Eric P Xing, Michael I Jordan, and Stuart Russell. A generalized mean field algorithm for variational inference in exponential families. In Proceedings of the Conference on Uncertainty in Artificial Intelligence, 2003. ",
1608
+ "bbox": [
1609
+ 173,
1610
+ 539,
1611
+ 823,
1612
+ 582
1613
+ ],
1614
+ "page_idx": 11
1615
+ },
1616
+ {
1617
+ "type": "text",
1618
+ "text": "Shengjia Zhao, Jiaming Song, and Stefano Ermon. Infovae: Information maximizing variational autoencoders. arXiv preprint arXiv:1706.02262, 2017. ",
1619
+ "bbox": [
1620
+ 171,
1621
+ 590,
1622
+ 825,
1623
+ 621
1624
+ ],
1625
+ "page_idx": 11
1626
+ },
1627
+ {
1628
+ "type": "text",
1629
+ "text": "Tiancheng Zhao, Kyusong Lee, and Maxine Eskenazi. Unsupervised discrete sentence representation learning for interpretable neural dialog generation. In Proceedings of the Annual Meeting of the Association for Computational Linguistics, 2018. ",
1630
+ "bbox": [
1631
+ 176,
1632
+ 628,
1633
+ 823,
1634
+ 672
1635
+ ],
1636
+ "page_idx": 11
1637
+ },
1638
+ {
1639
+ "type": "text",
1640
+ "text": "Chunting Zhou and Graham Neubig. Multi-space variational encoder-decoders for semi-supervised labeled sequence transduction. Proceedings of the Annual Meeting of the Association for Computational Linguistics, 2017. ",
1641
+ "bbox": [
1642
+ 174,
1643
+ 680,
1644
+ 823,
1645
+ 723
1646
+ ],
1647
+ "page_idx": 11
1648
+ },
1649
+ {
1650
+ "type": "text",
1651
+ "text": "Yaoming Zhu, Sidi Lu, Lei Zheng, Jiaxian Guo, Weinan Zhang, Jun Wang, and Yong Yu. Texygen: A benchmarking platform for text generation models. In Proceedings of the International ACM SIGIR Conference on Research & Development in Information Retrieval, 2018. ",
1652
+ "bbox": [
1653
+ 176,
1654
+ 732,
1655
+ 825,
1656
+ 775
1657
+ ],
1658
+ "page_idx": 11
1659
+ },
1660
+ {
1661
+ "type": "text",
1662
+ "text": "A EXPLANATION FOR PRESERVING-CONTENT LOSS ",
1663
+ "text_level": 1,
1664
+ "bbox": [
1665
+ 173,
1666
+ 102,
1667
+ 619,
1668
+ 119
1669
+ ],
1670
+ "page_idx": 12
1671
+ },
1672
+ {
1673
+ "type": "text",
1674
+ "text": "The first term of $- \\mathcal { L } _ { \\mathrm { p c } } ( x , y )$ is equivalent to: ",
1675
+ "bbox": [
1676
+ 174,
1677
+ 133,
1678
+ 468,
1679
+ 150
1680
+ ],
1681
+ "page_idx": 12
1682
+ },
1683
+ {
1684
+ "type": "equation",
1685
+ "img_path": "images/959e93e0dd1372ad7e1e38fffa1b196180d390f9527c1e140c8af5e073b1bce8.jpg",
1686
+ "text": "$$\n\\begin{array} { r l } { \\mathbb { E } _ { q , ( c | s + 1 ) } \\| \\boldsymbol { E } - \\hbar \\| ^ { 2 } } & { = \\mathbf { R } _ { q , ( c | s ) } \\displaystyle \\sum _ { i = 1 } ^ { N } ( c _ { i } - \\hbar _ { i } ) ^ { 2 } } \\\\ & { = \\displaystyle \\sum _ { i = 1 } ^ { N } \\mathbb { E } _ { q , ( c | s ) } ( c _ { i } - \\hbar _ { i } ) ^ { 2 } } \\\\ & { = \\displaystyle \\sum _ { i = 1 } ^ { N } ( \\| ( c _ { i } - \\hbar _ { i } ) ) ^ { 2 } + \\mathrm { v a r } ( c _ { i } ) \\| } \\\\ & { = \\displaystyle \\sum _ { i = 1 } ^ { N } ( \\| ( c _ { i } - \\hbar _ { i } ) ) ^ { 2 } + \\mathrm { v a r } ( c _ { i } ) \\| } \\\\ & { = \\displaystyle \\sum _ { i = 1 } ^ { N } ( \\| ( c _ { i } ( c _ { i } ) - \\hbar _ { i } ) ) ^ { 2 } + \\mathrm { v a r } ( c _ { i } ) \\| } \\\\ & { = \\displaystyle \\sum _ { i = 1 } ^ { N } ( \\| ( c _ { i } - \\hbar _ { i } ) ) ^ { 2 } + \\mathrm { v a r } ( c _ { i } ) \\| } \\\\ & { = \\displaystyle \\sum _ { i = 1 } ^ { N } ( \\| ( \\boldsymbol { \\mu } _ { i } - \\hbar _ { i } ) ^ { 2 } + \\boldsymbol { \\chi } _ { i } ) } \\\\ & { = \\| \\boldsymbol { u } - \\hbar _ { i } \\| ^ { 2 } + \\boldsymbol { b r } ( \\boldsymbol { \\Sigma } ) , } \\end{array}\n$$",
1687
+ "text_format": "latex",
1688
+ "bbox": [
1689
+ 333,
1690
+ 157,
1691
+ 665,
1692
+ 398
1693
+ ],
1694
+ "page_idx": 12
1695
+ },
1696
+ {
1697
+ "type": "text",
1698
+ "text": "When we minimize it, we jointly minimize the distance between mean of approximated posterior distribution, and the trace of the co-variance matrix. ",
1699
+ "bbox": [
1700
+ 171,
1701
+ 404,
1702
+ 825,
1703
+ 433
1704
+ ],
1705
+ "page_idx": 12
1706
+ },
1707
+ {
1708
+ "type": "text",
1709
+ "text": "B PROOF FOR ANTI-INFORMATION PROPERTY OF ELBO",
1710
+ "text_level": 1,
1711
+ "bbox": [
1712
+ 173,
1713
+ 453,
1714
+ 655,
1715
+ 469
1716
+ ],
1717
+ "page_idx": 12
1718
+ },
1719
+ {
1720
+ "type": "text",
1721
+ "text": "Consider the $\\mathrm { K L }$ divergence over the whole dataset (or a mini-batch of data), we have ",
1722
+ "bbox": [
1723
+ 176,
1724
+ 484,
1725
+ 735,
1726
+ 500
1727
+ ],
1728
+ "page_idx": 12
1729
+ },
1730
+ {
1731
+ "type": "equation",
1732
+ "img_path": "images/cb6d37b7a1cec8fb37ee8d86a3bc5ab2ca59c247ea51508bc536442819494af8.jpg",
1733
+ "text": "$$\n\\begin{array} { r l } { \\mathbb { E } _ { x \\sim p ( x ) } [ D _ { \\mathrm { K L } } ( q ( \\boldsymbol { z } | \\boldsymbol { x } ) \\| p ( \\boldsymbol { x } ) ) ] = } & { \\mathbb { E } _ { q ( \\boldsymbol { z } | \\boldsymbol { x } ) p ( \\boldsymbol { x } ) } [ \\log q ( \\boldsymbol { z } | \\boldsymbol { x } ) - \\log p ( \\boldsymbol { z } ) ] } \\\\ & { = - \\ H ( \\boldsymbol { z } | \\boldsymbol { x } ) - \\mathbb { E } _ { q ( \\boldsymbol { z } ) } \\log p ( \\boldsymbol { z } ) } \\\\ & { = - \\ H ( \\boldsymbol { z } | \\boldsymbol { x } ) + H ( \\boldsymbol { z } ) + D _ { \\mathrm { K L } } ( q ( \\boldsymbol { z } ) \\| p ( \\boldsymbol { z } ) ) } \\\\ & { = I ( \\boldsymbol { z } , \\boldsymbol { x } ) + D _ { \\mathrm { K L } } ( q ( \\boldsymbol { z } ) \\| p ( \\boldsymbol { z } ) ) } \\end{array}\n$$",
1734
+ "text_format": "latex",
1735
+ "bbox": [
1736
+ 264,
1737
+ 506,
1738
+ 735,
1739
+ 583
1740
+ ],
1741
+ "page_idx": 12
1742
+ },
1743
+ {
1744
+ "type": "text",
1745
+ "text": "where $q ( \\boldsymbol { z } ) = \\mathbb { E } _ { \\boldsymbol { x } \\sim \\mathcal { D } } ( q ( \\boldsymbol { z } | \\boldsymbol { x } ) )$ and $I ( z , x ) = H ( z ) - H ( z | x )$ . Since $\\mathrm { K L }$ divergence can be viewed as a regularization term in ELBO loss, When ELBO is maximized, the KL term is minimized, and mutual information between $x$ and latent $z$ , $I ( z , x )$ is minimized. This implies that $z$ and $x$ eventually become more independent. ",
1746
+ "bbox": [
1747
+ 178,
1748
+ 587,
1749
+ 821,
1750
+ 645
1751
+ ],
1752
+ "page_idx": 12
1753
+ },
1754
+ {
1755
+ "type": "text",
1756
+ "text": "C PROOF FOR THE PRESERVING-TEMPLATE LOSS WHEN POSTERIOR COLLAPSE HAPPENS ",
1757
+ "text_level": 1,
1758
+ "bbox": [
1759
+ 176,
1760
+ 665,
1761
+ 748,
1762
+ 699
1763
+ ],
1764
+ "page_idx": 12
1765
+ },
1766
+ {
1767
+ "type": "text",
1768
+ "text": "When posterior collapse happens, $D _ { \\mathrm { K L } } ( q ( \\boldsymbol { z } | \\boldsymbol { y } ) | | \\boldsymbol { p } ( \\boldsymbol { z } ) ) \\approx 0 ,$ , ",
1769
+ "bbox": [
1770
+ 173,
1771
+ 713,
1772
+ 560,
1773
+ 731
1774
+ ],
1775
+ "page_idx": 12
1776
+ },
1777
+ {
1778
+ "type": "equation",
1779
+ "img_path": "images/8701ef7e02e17e7d48f8e52e274a831558ad84b25801dd427edfdf1c42db39b1.jpg",
1780
+ "text": "$$\n\\begin{array} { r l } { \\mathcal { L } _ { p t } ( Y , \\tilde { Y } ) = \\mathbb { E } _ { \\tilde { y } \\sim p ( \\tilde { y } ) , y \\sim p ( y ) } \\mathbb { E } _ { z \\sim q ( z | y ) } \\log p _ { \\eta } ( \\tilde { y } | z ) } & { } \\\\ { = \\mathbb { E } _ { \\tilde { y } \\sim p ( \\tilde { y } ) } \\mathbb { E } _ { z \\sim p ( z ) } \\log p _ { \\eta } ( \\tilde { y } | z ) } & { } \\\\ { = \\displaystyle \\int _ { \\tilde { y } } p ( \\tilde { y } ) \\int _ { z } p ( z ) \\log p _ { \\eta } ( \\tilde { y } | z ) \\mathrm { d } z \\mathrm { d } \\tilde { y } } & { } \\\\ { = \\displaystyle \\int _ { z } p ( z ) \\int _ { \\tilde { y } } p ( \\tilde { y } ) \\log p _ { \\eta } ( \\tilde { y } | z ) \\mathrm { d } z \\mathrm { d } \\tilde { y } } & { } \\\\ { = \\mathbb { E } _ { z } \\mathbb { E } _ { \\tilde { y } } [ \\log p _ { \\eta } ( y ) | z ] = \\mathbb { E } _ { \\tilde { y } } \\log p _ { \\eta } ( y ) } & { } \\end{array}\n$$",
1781
+ "text_format": "latex",
1782
+ "bbox": [
1783
+ 334,
1784
+ 737,
1785
+ 658,
1786
+ 868
1787
+ ],
1788
+ "page_idx": 12
1789
+ },
1790
+ {
1791
+ "type": "text",
1792
+ "text": "During the back-propagation, ",
1793
+ "bbox": [
1794
+ 174,
1795
+ 872,
1796
+ 369,
1797
+ 887
1798
+ ],
1799
+ "page_idx": 12
1800
+ },
1801
+ {
1802
+ "type": "equation",
1803
+ "img_path": "images/fc7af909f4cd9b91159392a7d6b62d236097fb9bcb0729db92e61526e774e9d6.jpg",
1804
+ "text": "$$\n| | \\triangledown _ { z } \\mathcal { L } _ { p t } ( Y , \\tilde { Y } ) | | = 0\n$$",
1805
+ "text_format": "latex",
1806
+ "bbox": [
1807
+ 426,
1808
+ 886,
1809
+ 571,
1810
+ 906
1811
+ ],
1812
+ "page_idx": 12
1813
+ },
1814
+ {
1815
+ "type": "text",
1816
+ "text": "thus, $\\phi _ { z }$ is not updated. ",
1817
+ "bbox": [
1818
+ 173,
1819
+ 909,
1820
+ 328,
1821
+ 924
1822
+ ],
1823
+ "page_idx": 12
1824
+ },
1825
+ {
1826
+ "type": "text",
1827
+ "text": "D IMPLEMENTATION DETAILS ",
1828
+ "text_level": 1,
1829
+ "bbox": [
1830
+ 176,
1831
+ 102,
1832
+ 441,
1833
+ 118
1834
+ ],
1835
+ "page_idx": 13
1836
+ },
1837
+ {
1838
+ "type": "text",
1839
+ "text": "For the model trained on WIKI dataset, the the dimension of latent template variable is set as 100, and the dimension of latent content variable is set as 200. The dimension of the hidden for table is 300. For the hyperparameters of total loss $\\mathcal { L } _ { t o t }$ , we set $\\lambda _ { \\mathrm { M I } } = 0 . 5$ , $\\lambda _ { \\mathrm { p t } } = 1 . 0$ and $\\lambda _ { \\mathrm { p c } } = 0 . 5$ . ",
1840
+ "bbox": [
1841
+ 174,
1842
+ 133,
1843
+ 825,
1844
+ 176
1845
+ ],
1846
+ "page_idx": 13
1847
+ },
1848
+ {
1849
+ "type": "text",
1850
+ "text": "For the model trained on SPNLG dataset, the dimension of latent template variable is set as 64, and the dimension of latent content variable is set as 100. The dimension of the hidden for table is also 300. For the hyperparameters of total loss $\\mathcal { L } _ { t o t }$ , we set $\\lambda _ { \\mathrm { M I } } = \\lambda _ { \\mathrm { p t } } = \\lambda _ { \\mathrm { p c } } = 1 . 0$ . ",
1851
+ "bbox": [
1852
+ 174,
1853
+ 183,
1854
+ 825,
1855
+ 226
1856
+ ],
1857
+ "page_idx": 13
1858
+ },
1859
+ {
1860
+ "type": "text",
1861
+ "text": "E CASE STUDY ON SPNLG EXPERIMENT ",
1862
+ "text_level": 1,
1863
+ "bbox": [
1864
+ 174,
1865
+ 246,
1866
+ 522,
1867
+ 262
1868
+ ],
1869
+ "page_idx": 13
1870
+ },
1871
+ {
1872
+ "type": "table",
1873
+ "img_path": "images/dec3a3676b448d1fa89fc4bd56f7977e9ac3fb208bcb0097bb1855e91896cf3d.jpg",
1874
+ "table_caption": [
1875
+ "Table 8: An example of the generated text by our model and the baselines on SPNLG dataset. "
1876
+ ],
1877
+ "table_footnote": [],
1878
+ "table_body": "<table><tr><td>Table</td><td>name[nameVariable],eatType[pub],food[French],priceRange[2O-25],area[riverside]</td></tr><tr><td>Reference</td><td>nameVariable isa French place witha price range of 2O-25.It is in riverside.It isa pub. 1: nameVariable isa pub with a price range of 2O-25.It is a French restaurant in riverside.</td></tr><tr><td>Table2seq-sample</td><td>2: nameVariable is a French restaurant in riverside with a price range of 2O-25.nameVariable is a pub. 3: nameVariable is a pub with a price range of 2O-25 and nameVariable is aFrench restaurant in riverside. 4: nameVariable is a pub with a price range of 2O-25,also it is in riverside.it is a Japanese place. 5:nameVariable isa pub with a average rating and it isaFrench place in riverside.</td></tr><tr><td>Temp-KN</td><td>1:nameVariableisin riverside,also itisinriverside. 2:nameVariable isaFrench restaurant. 3:nameVariable is the best restaurant. 4:nameVariable is in riverside,and nameVariable is in [location]. 5:nameVariable is in.ItsaFrench restaurant and itis in[location] with foodand,even if nameVariable is [food_qual],it is the best place. 1: nameVariable is apub with a price range of 2O-25.It is aFrench place in riverside.</td></tr><tr><td>VTM-noraw</td><td>2:nameVariable is a pub with a price range of 2O-25.it is a pub.It is in riverside. 3: nameVariable is a French place in riverside with a price range of 2O-25.It is a pub. 4:nameVariable is a French place in riverside with a price range of 2O-25.It is a pub. 5:nameVariable is a French place in riverside with a price range of 2O-25.It is a pub. 1:nameVariable is a French place in riversidewith a price range of 2O-25.It isa pub.</td></tr><tr><td>VTM</td><td>2: nameVariable is a pub with a price range of 2O-25.It is in riverside.It is a French place. 3:nameVariable is a French pub in riverside with a price range of 2O-25,and it is a pub. 4:nameVariable is a French restaurant in riverside and it is a pub. 5:nameVariable is a French place in riverside with a price range of 2O-25.It is a pub.</td></tr></table>",
1879
+ "bbox": [
1880
+ 176,
1881
+ 281,
1882
+ 825,
1883
+ 535
1884
+ ],
1885
+ "page_idx": 13
1886
+ }
1887
+ ]
parse/train/HkejNgBtPB/HkejNgBtPB_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HkejNgBtPB/HkejNgBtPB_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Mos9F9kDwkz/Mos9F9kDwkz.md ADDED
@@ -0,0 +1,299 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # COMPLEX QUERY ANSWERING WITH NEURAL LINK PREDICTORS
2
+
3
+ Erik Arakelyan1†, Daniel Daza2,3,4†, Pasquale Minervini1†, & Michael Cochez2,4
4
+
5
+ 1UCL Centre for Artificial Intelligence, University College London, United Kingdom
6
+ 2Vrije Universiteit Amsterdam, The Netherlands
7
+ 3University of Amsterdam, The Netherlands
8
+ 4Discovery Lab, Elsevier, The Netherlands
9
+ {erik.arakelyan.18,p.minervini}@ucl.ac.uk
10
+ {d.dazacruz,m.cochez}@vu.nl
11
+
12
+ # ABSTRACT
13
+
14
+ Neural link predictors are immensely useful for identifying missing edges in large scale Knowledge Graphs. However, it is still not clear how to use these models for answering more complex queries that arise in a number of domains, such as queries using logical conjunctions $( \wedge )$ , disjunctions (∨) and existential quantifiers (∃), while accounting for missing edges. In this work, we propose a framework for efficiently answering complex queries on incomplete Knowledge Graphs. We translate each query into an end-to-end differentiable objective, where the truth value of each atom is computed by a pre-trained neural link predictor. We then analyse two solutions to the optimisation problem, including gradient-based and combinatorial search. In our experiments, the proposed approach produces more accurate results than state-of-the-art methods — black-box neural models trained on millions of generated queries — without the need of training on a large and diverse set of complex queries. Using orders of magnitude less training data, we obtain relative improvements ranging from $8 \%$ up to $40 \%$ in Hits $@ 3$ across different knowledge graphs containing factual information. Finally, we demonstrate that it is possible to explain the outcome of our model in terms of the intermediate solutions identified for each of the complex query atoms. All our source code and datasets are available online 1.
15
+
16
+ # 1 INTRODUCTION
17
+
18
+ Knowledge Graphs (KGs) are graph-structured knowledge bases, where knowledge about the world is stored in the form of relationship between entities. KGs are an extremely flexible and versatile knowledge representation formalism – examples include general purpose knowledge bases such as DBpedia (Auer et al., 2007) and YAGO (Suchanek et al., 2007), domain-specific ones such as Bio2RDF (Dumontier et al., 2014) and Hetionet (Himmelstein et al., 2017) for life sciences and WordNet (Miller, 1992) for linguistics, and application-driven graphs such as the Google Knowledge Graph, Microsoft’s Bing Knowledge Graph, and Facebook’s Social Graph (Noy et al., 2019).
19
+
20
+ Neural link predictors (Nickel et al., 2016) tackle the problem of identifying missing edges in large KGs. However, in many complex domains, an open challenge is developing techniques for answering complex queries involving multiple and potentially unobserved edges, entities, and variables, rather than just single edges.
21
+
22
+ We focus on First-Order Logical Queries that use conjunctions $( \wedge )$ , disjunctions (∨), and existential quantifiers $\textcircled{1}$ . A multitude of queries can be expressed by using such operators – for instance, the query “Which drugs $D$ interact with proteins associated with diseases $t _ { 1 }$ or $t _ { 2 }$ ?” can be rewritten as $? D : \exists P$ .interacts $( D , P ) \wedge$ [assoc $( P , t _ { 1 } )$ ∨ assoc $( P , t _ { 2 } ) ]$ , which can be answered via sub-graph matching.
23
+
24
+ ![](images/795c275c3407cdd0665d316e2384d9f84a6ee7a97787617c1948f8626e1959ef.jpg)
25
+ ?D : ∃P . interacts(D, P) ∧ [assoc(P, t 1) ∨ assoc(P, t 2)]
26
+
27
+ ![](images/15e604dae0c587f4e1b7429f994c841404358d7fd5e6bdd56091b046c9f81051.jpg)
28
+ ?D : ∃A . directs(D, A) ∧ [prize(A, Oscar) ∨ prize(A, Emmy)]
29
+ Figure 1: Examples of First-Order Logical Queries using existential quantification $\textcircled{1}$ , conjunction $( \wedge )$ , and disjunction $( \vee )$ operators — their dependency graphs are $\bar { D ^ { + } } \gets P \gets \{ t _ { 1 } , t _ { 2 } \}$ , and $D \gets$ $A \gets \{ \mathrm { O s c a r } , \mathrm { E m m t y } \}$ , respectively.
30
+
31
+ However, plain sub-graph matching cannot capture semantic similarities between entities and relations, and cannot deal with missing facts in the KG. One possible solution consists in computing all missing entries via KG completion methods (Getoor & Taskar, 2007; De Raedt, 2008; Nickel et al., 2016), but that would materialise a significantly denser KG and would have intractable space and time complexity requirements (Krompaß et al., 2014).
32
+
33
+ In this work, we propose a framework for answering First-Order Logic Queries, where the query is compiled in an end-to-end differentiable function, modelling the interactions between its atoms. The truth value of each atom is computed by a neural link predictor (Nickel et al., 2016) – a differentiable model that, given an atomic query, returns the likelihood that the fact it represents holds true. We then propose two approaches for identifying the most likely values for the variable nodes in a query – either by continuous or by combinatorial optimisation.
34
+
35
+ Recent work on embedding logical queries on KGs (Hamilton et al., 2018; Daza & Cochez, 2020; Ren et al., 2020) has suggested that in order to go beyond link prediction, more elaborate architectures, and a large and diverse dataset with millions of queries is required. In this work, we show that this is not the case, and demonstrate that it is possible to use an efficient neural link predictor trained for 1-hop query answering, to generalise to up to 8 complex query structures. By doing so, we produce more accurate results than state-of-the-art models, while using orders of magnitude less training data.
36
+
37
+ Summarising, in comparison with other approaches in the literature such as Query2Box (Ren et al., 2020), we find that the proposed framework i) achieves significantly better or equivalent predictive accuracy on a wide range of complex queries, ii) is capable of out-of-distribution generalisation, since it is trained on simple queries only and evaluated on complex queries, and iii) is more explainable, since the intermediate results for its sub-queries and variable assignments can be used to explain any given answer.
38
+
39
+ # 2 EXISTENTIAL POSITIVE FIRST-ORDER LOGICAL QUERIES
40
+
41
+ A Knowledge Graph ${ \mathcal { G } } \subseteq { \mathcal { E } } \times { \mathcal { R } } \times { \mathcal { E } }$ can be defined as a set of subject-predicate-object $\langle s , p , o \rangle$ triples, where each triple encodes a relationship of type $p \in \mathcal R$ between the subject $s \in \mathcal { E }$ and the object $o \in { \mathcal { E } }$ of the triple, where $\mathcal { E }$ and $\mathcal { R }$ denote the set of all entities and relation types, respectively. One can think of a Knowledge Graph as a labelled multi-graph, where entities $\mathcal { E }$ represent nodes, and edges are labelled with relation types $\mathcal { R }$ . Without loss of generality, a Knowledge Graph can be represented as a First-Order Logic Knowledge Base, where each triple $\langle s , p , o \rangle$ denotes an atomic formula $p ( s , o )$ , with $p \in \mathcal R$ a binary predicate and $s , o \in { \mathcal { E } }$ its arguments.
42
+
43
+ Conjunctive queries are a sub-class of First-Order Logical queries that use existential quantification $\textcircled{1}$ and conjunction $( \wedge )$ operations. We consider conjunctive queries $\mathcal { Q }$ in the following form:
44
+
45
+ $$
46
+ \begin{array} { r l } { \mathcal { Q } [ A ] \triangleq ? A : } & { \exists V _ { 1 } , \dotsc , V _ { m } . e _ { 1 } \land . . . \land e _ { n } } \\ { \mathrm { ~ w h e r e ~ } } & { e _ { i } = p ( c , V ) , \mathrm { ~ w i t h ~ } V \in \{ A , V _ { 1 } , . . . , V _ { m } \} , c \in \mathcal { E } , p \in \mathcal { R } } \\ { \mathrm { o r ~ } } & { e _ { i } = p ( V , V ^ { \prime } ) , \mathrm { ~ w i t h ~ } V , V ^ { \prime } \in \{ A , V _ { 1 } , . . . , V _ { m } \} , V \neq V ^ { \prime } , p \in \mathcal { R } } \end{array}
47
+ $$
48
+
49
+ In Eq. (1), the variable $A$ is the target of the query, $V _ { 1 } , \ldots , V _ { m }$ denote the bound variable nodes, while $c \in \mathcal { E }$ represent the input anchor nodes. Each $e _ { i }$ denotes a logical atom, with either one $( p ( c , V ) )$ or two variables $( p ( V , V ^ { \prime } ) )$ , and $e _ { 1 } \wedge \ldots \wedge e _ { n }$ denotes a conjunction between $n$ atoms.
50
+
51
+ The goal of answering the logical query $\mathcal { Q }$ consists in finding a set of entities $\mathbb { I } \mathcal { Q } \mathbb { I } \subseteq \mathcal { E }$ such that $a \in [ [ \mathcal { Q } ] ]$ iff ${ \mathcal { Q } } [ a ]$ holds true, where $[ [ \mathcal { Q } ] ]$ is the answer set of the query $\mathcal { Q }$ .
52
+
53
+ As illustrated in Fig. 1, the dependency graph of a conjunctive query $\mathcal { Q }$ is a graph representation of $\mathcal { Q }$ where nodes correspond to variable or non-variable atom arguments in $\mathcal { Q }$ and edges correspond to atom predicates. We follow Hamilton et al. (2018) and focus on valid conjunctive queries – i.e. the dependency graph needs to be a directed acyclic graph, where anchor entities correspond to source nodes, and the query target $A$ is the unique sink node.
54
+
55
+ Example 2.1 (Conjunctive Query). Consider the query “Which drugs interact with proteins associated with the disease $t ? ^ { \prime \prime }$ . This query can be formalised as a conjunctive query $\mathcal { Q }$ such as $? D : \exists P . i n t e r a c t s ( D , P ) \land a s s o c ( P , t )$ , where $t$ is an input anchor node, the variable $D$ is the target of the query, $P$ is $a$ bound variable node, and the dependency graph is $D \gets P \gets t .$ . The answer set $[ [ \mathcal { Q } ] ]$ of $\mathcal { Q }$ corresponds to the set of all drugs in $\mathcal { E }$ interacting with proteins associated with $t .$ . 
56
+
57
+ Handling Disjunctions So far we focused on conjunctive queries defined using the existential quantification $\left( \exists \right)$ and conjunction $( \wedge )$ logical operators. Our aim is answering a wider class of logical queries, namely Existential Positive First-Order (EPFO) queries (Dalvi & Suciu, 2004) that in addition to existential quantification and conjunction, also involve disjunction $( \vee )$ . We follow Ren et al. (2020) and, without loss of generality, we transform a given EPFO query into Disjunctive Normal Form (DNF, Davey & Priestley, 2002), i.e. a disjunction of conjunctive queries.
58
+
59
+ Example 2.2 (Disjunctive Normal Form). Consider the following variant of query in $E x$ - ample 2.1: “Which drugs interact with proteins associated with the diseases $t _ { 1 }$ or $t _ { 2 } ? { } ^ { \prime }$ . This query can be formalised as a EPFO query $\mathcal { Q }$ such as ?D : ∃P.interacts $( D , P )$ $\wedge$ $[ a s s o c ( P , t _ { 1 } ) \lor a s s o c ( P , t _ { 2 } ) ]$ . We can transform $\mathcal { Q }$ in the following, equivalent DNF query: $? D$ : $\bar { \exists } P .$ [interact $\cdot ( D , P ) \land a s s o c ( P , t _ { 1 } ) ] \lor$ [interacts $( D , P ) \land a s s o c ( P , t _ { 2 } ) ]$ . 
60
+
61
+ In our framework, given a DNF query $\mathcal { Q }$ , for each of its conjunctive sub-queries we produce a score for all the entities representing the likelihood that they answer that sub-query. Finally, such scores are aggregated using a t-conorm — a continuous relaxation of the logical disjunction.
62
+
63
+ # 3 COMPLEX QUERY ANSWERING VIA OPTIMISATION
64
+
65
+ We propose a framework for answering EPFO logical queries in the presence of missing edges. Given a query $\mathcal { Q }$ , we define the score of a target node $a \in { \mathcal { E } }$ as a candidate answer for a query as a function of the score of all atomic queries in $\mathcal { Q }$ , given a variable-to-entity substitution for all variables in $\mathcal { Q }$ .
66
+
67
+ Each variable is mapped to an embedding vector, that can either correspond to an entity $c \in { \mathcal { E } }$ or to a virtual entity. The score of each of the query atoms is determined individually using a neural link predictor (Nickel et al., 2016). Then, the score of the query with respect to a given candidate answer ${ \mathcal { Q } } [ a ]$ is computed by aggregating all atom scores using t-norms and t-conorms – continuous relaxations of the logical conjunction and disjunction operators.
68
+
69
+ Neural Link Prediction A neural link predictor is a differentiable model where atom arguments are first mapped into a $k$ -dimensional embedding space, and then used for producing a score for the atom. More formally, given a query atom $p ( s , o )$ , where $p \in \mathcal R$ and $s , o \in { \mathcal { E } }$ , the score for $p ( s , o )$ is computed as $\phi _ { p } ( \mathbf { e } _ { s } , \mathbf { e } _ { o } )$ , where $\mathbf { e } _ { s } , \mathbf { e } _ { o } \in \mathbb { R } ^ { k }$ are the embedding vectors of $s$ and $o$ , and $\phi _ { p } : \mathbb { R } ^ { k } \times \mathbb { R } ^ { k } \mapsto [ 0 , 1 ]$ is a scoring function computing the likelihood that entities $s$ and $o$ are related by the relationship $p$ .
70
+
71
+ In our experiments, as neural link predictor, we use ComplEx (Trouillon et al., 2016) regularised using a variational approximation of the tensor nuclear $p$ -norm proposed by Lacroix et al. (2018).
72
+
73
+ T-Norms A t-norm $\top : [ 0 , 1 ] \times [ 0 , 1 ] \mapsto [ 0 , 1 ]$ is a generalisation of conjunction in logic (Klement et al., 2000; 2004). Some examples include the Godel¨ $t$ -norm $\top _ { \mathrm { m i n } } ( x , y ) \stackrel { - } { = } \operatorname* { m i n } \{ x , y \}$ , the product $t \cdot$ - norm ${ \top } _ { \mathrm { p r o d } } ( x , y ) = x \cdot y$ , and the Łukasiewicz $t$ -norm $\top _ { \mathrm { L u k } } ( x , y ) = \operatorname* { m a x } \{ 0 , x + y - 1 \}$ . Analogously, $t$ -conorms are dual to t-norms for disjunctions – given a t-norm $\top$ , the complementary t-conorm is defined by $\perp ( x , y ) = 1 - \top ( 1 - x , \bar { 1 } - y )$ .
74
+
75
+ # Continuous Reformulation of Complex Queries Let $\mathcal { Q }$ denote the following DNF query:
76
+
77
+ $$
78
+ \begin{array} { r l } { \mathcal { Q } [ A ] \triangleq ? A : } & { \exists V _ { 1 } , \dotsc , V _ { m } . \left( e _ { 1 } ^ { 1 } \wedge \dotsc \wedge e _ { n _ { 1 } } ^ { 1 } \right) \vee \dotsc \vee \left( e _ { 1 } ^ { d } \wedge \dotsc \wedge e _ { n _ { d } } ^ { d } \right) } \\ { \mathrm { w h e r e } } & { e _ { i } ^ { j } = p ( c , V ) , \mathrm { w i t h } V \in \{ A , V _ { 1 } , \dotsc , V _ { m } \} , c \in \mathcal { E } , p \in \mathcal { R } } \\ { \mathrm { o r } } & { e _ { i } ^ { j } = p ( V , V ^ { \prime } ) , \mathrm { w i t h } V , V ^ { \prime } \in \{ A , V _ { 1 } , \dotsc , V _ { m } \} , V \neq V ^ { \prime } , p \in \mathcal { R } } \end{array}
79
+ $$
80
+
81
+ We want to know the variable assignments that render $\mathcal { Q }$ true. To achieve this. we can cast this as an optimisation problem, where the aim is finding a mapping from variables to entities that maximises the score of $\mathcal { Q }$ :
82
+
83
+ $$
84
+ \begin{array} { r l } & { \underset { A , V _ { 1 } , \ldots , V _ { m } \in \mathcal { E } } { \arg \operatorname* { m a x } } \left( e _ { 1 } ^ { 1 } \top \ldots \top e _ { n _ { 1 } } ^ { 1 } \right) \ : \perp \ldots \ : \perp \ : \left( e _ { 1 } ^ { d } \top \ldots \top e _ { n _ { d } } ^ { d } \right) } \\ & { \quad \quad \quad \mathrm { w h e r e } \quad e _ { i } ^ { j } = \phi _ { p } ( \mathbf { e } _ { c } , \mathbf { e } _ { V } ) , \ : \mathrm { w i t h } \ : V \in \{ A , V _ { 1 } , \ldots , V _ { m } \} , c \in \mathcal { E } , p \in \mathcal { R } } \\ & { \quad \quad \quad \mathrm { o r } \quad e _ { i } ^ { j } = \phi _ { p } ( \mathbf { e } _ { V } , \mathbf { e } _ { V ^ { \prime } } ) , \ : \mathrm { w i t h } \ : V , V ^ { \prime } \in \{ A , V _ { 1 } , \ldots , V _ { m } \} , V \neq V ^ { \prime } , p } \end{array}
85
+ $$
86
+
87
+ where $\top$ and $\perp$ denote a t-norm and a t-conorm – a continuous generalisation of the logical conjunction and disjunction, respectively – and $\phi _ { p } ( \mathbf { e } _ { s } , \mathbf { e } _ { o } ) \in [ 0 , 1 ]$ denotes the neural link prediction score for the atom $p ( s , o )$ . We write t-norms and t-conorms as infix operators since they are both associative.
88
+
89
+ Note that, in Eq. (3), the bound variable nodes $V _ { 1 } , \ldots , V _ { m }$ are only used through their embedding vector: to compute $\phi _ { p } ( \mathbf { e } _ { c } , \mathbf { e } _ { V } )$ we only use the embedding representation $\mathbf { e } _ { V } \in \mathbb { R } ^ { k }$ of $V$ , and do not need to know which entity the variable $V$ corresponds to. This means that we have two possible strategies for finding the optimal variable embeddings $\mathbf { e } _ { V } \in \mathbb { R } ^ { k }$ with $V \in \{ A , V _ { 1 } , \ldots , V _ { m } \}$ for maximising the objective in Eq. (3), namely continuous optimisation, where we optimise $\mathbf { e } _ { V }$ using gradient-based optimisation, and combinatorial optimisation, where we search for the optimal variable-to-entity assignment.
90
+
91
+ # 3.1 COMPLEX QUERY ANSWERING VIA CONTINUOUS OPTIMISATION
92
+
93
+ One way we can solve the optimisation problem in Eq. (3) is by finding the variable embeddings that maximise the score of a complex query. This can be formalised as the following continuous optimisation problem:
94
+
95
+ $$
96
+ \begin{array} { r l } { \underset { \mathbf { e } _ { A } , \mathbf { e } _ { V _ { 1 } } , \dots , \mathbf { e } _ { V _ { m } } \in \mathbb { R } ^ { k } } { \arg \operatorname* { m a x } } } & { \big ( e _ { 1 } ^ { 1 } \top \ \dots \ \top \ e _ { n _ { 1 } } ^ { 1 } \big ) \ \perp \dots \perp \ \big ( e _ { 1 } ^ { d } \top \ \dots \ \top e _ { n _ { d } } ^ { d } \big ) } \\ { \mathrm { w h e r e } } & { e _ { i } ^ { j } = \phi _ { p } ( \mathbf { e } _ { c } , \mathbf { e } _ { V } ) , \ \mathrm { w i t h } \ V \in \{ A , V _ { 1 } , \dots , V _ { m } \} , c \in \mathcal { E } , p \in \mathcal { R } } \\ { \mathrm { o r } } & { e _ { i } ^ { j } = \phi _ { p } ( \mathbf { e } _ { V } , \mathbf { e } _ { V ^ { \prime } } ) , \ \mathrm { w i t h } \ V , V ^ { \prime } \in \{ A , V _ { 1 } , \dots , V _ { m } \} , V \neq V ^ { \prime } , p \in \mathcal { R } } \end{array}
97
+ $$
98
+
99
+ In Eq. (4) we directly optimise the embedding representations $\mathbf { e } _ { A } , \mathbf { e } _ { V _ { 1 } } , \hdots , \mathbf { e } _ { V _ { m } } \in \mathbb { R } ^ { k }$ of variables $A , V _ { 1 } , \ldots , V _ { m }$ , rather than exploring the combinatorial space of variable-to-entity mappings. In this way, we can tackle the maximisation problem in Eq. (4) using gradient-based optimisation methods, such as Adam (Kingma & Ba, 2015). Then, after we identified the optimal representation for variables $A , V _ { 1 } , \ldots , V _ { m }$ , we replace the query target embedding $\mathbf { e } _ { A }$ with the embedding representations $\mathbf { e } _ { c } \in \mathbb { R } ^ { k }$ of all entities $c \in { \mathcal { E } }$ , and use the resulting complex query score to compute the likelihood that such entities answer the query.
100
+
101
+ # 3.2 COMPLEX QUERY ANSWERING VIA COMBINATORIAL OPTIMISATION
102
+
103
+ Another way we tackle the optimisation problem in Eq. (3) is by greedily searching for a set of variable substitutions $S = \{ \bar { A } a , V _ { 1 } v _ { 1 } , . . . , \bar { V _ { m } } v _ { m } \}$ , with $a , v _ { 1 } , \ldots , v _ { m } \in \mathcal { E }$ , that maximises the complex query score, in a procedure akin to beam search. We do so by traversing the dependency graph of a query $\mathcal { Q }$ and, whenever we find an atom in the form $p ( c , V )$ , where $p \in \mathcal R$ , $c$ is either an entity or a variable for which we already have a substitution, and $V$ is a variable for which we do not have a substitution yet, we replace $V$ with all entities in $\mathcal { E }$ and retain the top- $k$ entities $t \in { \mathcal { E } }$ that maximise $\phi _ { p } ( \mathbf { e } _ { c } , \mathbf { e } _ { t } )$ – i.e. the most likely entities to appear as a substitution of $V$ according to the neural link predictor.
104
+
105
+ Our procedure is akin to beam search: as we traverse the dependency graph of a query, we keep a beam with the most promising variable-to-entity substitutions identified so far.
106
+
107
+ Example 3.1 (Combinatorial Optimisation). Consider the query “Which drugs $D$ interact with proteins associated with disease $t ? ^ { \prime \prime }$ can be rewritten as: $? D : \exists P .$ interact ${ \mathrm { \Omega } } _ { \mathrm { { : } } } ( D , P ) \land a s s o c ( P , t )$ . In order to answer this query via combinatorial optimisation, we first find the top- $k$ proteins $p$ that are most likely to substitute the variable $P$ in assoc $( P , t )$ . Then, we search for the top- $k$ drugs d that are most likely to substitute $D$ in interacts $( D , P )$ , ending up with at most $k ^ { 2 }$ candidate drugs. Finally, we rank the candidate drugs $d$ by using the query score produced by the t-norm. 
108
+
109
+ Note that scoring all possible entities can be done efficiently and in a single step on a GPU by replacing $V$ with the entity embedding matrix. In our experiments we did not notice any computational bottlenecks due to the branching factors of longer queries. However, that could be handled by using alternate graph exploration strategies.
110
+
111
+ # 4 RELATED WORK
112
+
113
+ This work is closely related to approaches for learning to traverse Knowledge Graphs (Guu et al., 2015; Das et al., 2017; 2018), and more recent works on answering conjunctive queries via blackbox neural models trained on generated queries (Hamilton et al., 2018; Daza & Cochez, 2020; Kotnis et al., 2020). The main difference is that we propose a tractable framework for handling a substantially larger subset of First-Order Logic queries.
114
+
115
+ More recently, Ren et al. (2020) proposed Query2Box, a neural model for Existential Positive FirstOrder logical queries, where queries are represented via box embeddings (Li et al., 2019). Such approaches for query answering require a dataset with millions of generated queries to generalise well – for instance, on the FB15k-237 dataset, approx. $\mathrm { 1 5 \times 1 0 ^ { 4 } }$ training queries for each query type are used, resulting in approx. $1 . 2 \times 1 0 ^ { 6 }$ training queries. Our framework, on the other hand, only uses a simple, state-of-the-art neural link predictor (Lacroix et al., 2018) trained on a set of 1-hop queries that is orders of magnitude smaller.
116
+
117
+ There is a large body of work on neural link predictors, that learn embeddings of entities and relations in KGs via a simple link prediction training objective (Bordes et al., 2013; Yang et al., 2015; Trouillon et al., 2016; Lacroix et al., 2018). Due to their design, they are often evaluated for answering 1-hop queries only, as their application to more complex queries does not derive directly from their formulation.
118
+
119
+ Previous work has considered using such embeddings for complex query answering, by partitioning the query graph and using an ad-hoc aggregation function to score candidate answers (Wang et al., 2018), or by using a probabilistic mixture model similar to DistMult (Friedman & den Broeck, 2020). In contrast, our proposed method answers a query by using a single pass where aggregation steps are implemented with t-norms and t-conorms, which are continuous relaxations of conjunctions and disjunctions. Such t-norms have been proposed as differentiable formulations of logical operators suitable for gradient-based learning (Serafini & d’Avila Garcez, 2016; Guo et al., 2016; Minervini et al., 2017; van Krieken et al., 2020).
120
+
121
+ Further alternatives for using embeddings from neural link predictors, such as combinatorial optimisation, have been ruled out as unfeasible (Hamilton et al., 2018; Daza & Cochez, 2020). We show that this approach can scale well by reducing the set of possible intermediate answers, while outperforming the state-of-the-art in query answering.
122
+
123
+ The framework proposed in this paper is related to neural theorem provers (Rocktaschel & Riedel, ¨ 2017; Weber et al., 2019; Minervini et al., 2020a;b), a differentiable relaxation of the backwardchaining reasoning algorithm where comparison between symbols is replaced by a differentiable similarity function between their embedding vectors. During the reasoning process, neural theorem provers check which rules can be used for proving a given atomic query. Then it is checked whether the premise of such rules is satisfied, where the premise is a conjunctive query. The procedure they use for answering conjunctions is akin to the combinatorial optimisation procedure we propose in Section 3.2. The main source of difference is how atomic queries are answered – we use the ComplEx neural link predictor (Trouillon et al., 2016), while neural theorem provers use the maximum similarity value between a given atomic query and all facts in the Knowledge Graph, which has linear complexity in the number of triples in the graph.
124
+
125
+ ![](images/7b7480337d38396113af14682552c046b2f84598cd9bc7673d17f247dd6df24e.jpg)
126
+ Figure 2: Query structures considered in our experiments, as proposed by Ren et al. (2020) – the naming of each query structure corresponds to projection $\mathbf { \eta } ( \mathbf { p } )$ , intersection (i), and union (u), and reflects how they were implemented in the Query2Box model (Ren et al., 2020). An example of a pi query is $? T : \exists V . p ( a , V ) , q ( V , T ) , r ( b , T )$ , where $a$ and $b$ are anchor nodes, $V$ is a variable node, and $T$ is the query target node.
127
+
128
+ Table 1: Number of queries in the datasets used for evaluation of query answering performance. Others indicates the number of queries for each of the remaining types.
129
+
130
+ <table><tr><td></td><td colspan="2">Training</td><td colspan="2">Validation</td><td colspan="2">Test</td></tr><tr><td>Dataset</td><td>1p</td><td>Others</td><td>1p</td><td>Others</td><td>1p</td><td>Others</td></tr><tr><td>FB15k</td><td>273,710</td><td>273,710</td><td>59,097</td><td>8,000</td><td>67,016</td><td>8,000</td></tr><tr><td>FB15k-237</td><td>149,689</td><td>149,689</td><td>20,101</td><td>5,000</td><td>22,812</td><td>5,000</td></tr><tr><td>NELL995</td><td>107,982</td><td>107,982</td><td>16,927</td><td>4,000</td><td>17,034</td><td>4,000</td></tr></table>
131
+
132
+ # 5 EXPERIMENTS
133
+
134
+ We described a method to answer a query by decomposing it into a continuous formulation, which we refer to as Continuous Query Decomposition (CQD). In this section we demonstrate the effectiveness of CQD on the task of answering complex queries that cannot be answered using the incomplete KG, and report experimental results for continuous optimisation (CQD-CO, Section 3.1) and beam search (CQD-Beam, Section 3.2). We also provide a qualitative analysis of how our method can be used to obtain explanations for a given complex query answer. For the sake of comparison, we use the same datasets and evaluation metrics as Ren et al. (2020).
135
+
136
+ # 5.1 DATASETS
137
+
138
+ Following Ren et al. (2020), we evaluate our approach on FB15k (Bordes et al., 2013) and FB15k-237 (Toutanova & Chen, 2015) – two subset of the Freebase knowledge graph – and NELL995 (Xiong et al., 2017), a KG generated by the NELL system (Mitchell et al., 2015). In order to compare with previous work on query answering, we use the queries generated by Ren et al. (2020) from these datasets. Dataset statistics are detailed in Table 1. We consider a total of 9 query types, including atomic queries, and 2 query types that contain disjunctions – the different query types are shown in Fig. 2. Note that in our framework, the neural link predictor is only trained on atomic queries, while the evaluation is carried out on the complete set of query types in Fig. 2.
139
+
140
+ Note that each query in Table 1 can have multiple answers, therefore the total number of training instances can be higher. For atomic queries (of type 1p), this number is equal to the number of edges in the training graph. Other methods like GQE (Hamilton et al., 2018) and Q2B (Ren et al., 2020) require a dataset with more query types. As an example, the FB15k dataset contains approximately $9 6 0 \mathrm { k }$ instances for 1p queries. When adding 2p, 3p, 2i, and 3i queries employed by GQE and Q2B during training, this number increases to 65 million instances.
141
+
142
+ # 5.2 MODEL DETAILS
143
+
144
+ To obtain embeddings for the query answering task, we use ComplEx (Trouillon et al., 2016) a variational approximation of the nuclear tensor $p$ -norm for regularisation (Lacroix et al., 2018). We fix a learning rate of 0.1 and use the Adagrad optimiser. We then tune the hyperparameters of ComplEx on the validation set for each dataset, via grid search. We consider ranks (size of the embedding) in $\{ 1 0 0 , 2 0 0 , 5 0 0 , 1 0 0 0 \}$ , batch size in $\{ 1 0 0 , 5 0 0 , 1 0 0 0 \}$ , and regularisation coefficients in the interval $\left[ 1 0 ^ { - 4 } , 0 . 5 \right]$ .
145
+
146
+ Table 2: Complex query answering results $( \mathrm { H } @ 3 )$ across all query types; results for Graph Query Embedding (GQE, Hamilton et al., 2018) and Query2Box (Ren et al., 2020) are from Ren et al. (2020).
147
+
148
+ <table><tr><td>Method</td><td>Avg</td><td>1p</td><td>2p</td><td>3p</td><td>2i</td><td>3i</td><td>ip</td><td>pi</td><td>2u</td><td>up</td></tr><tr><td colspan="10">FB15k</td></tr><tr><td>GQE</td><td>0.384</td><td>0.630</td><td>0.346</td><td>0.250</td><td>0.515</td><td>0.611</td><td>0.153</td><td>0.320</td><td>0.362</td><td>0.271</td></tr><tr><td>Query2BoX</td><td>0.484</td><td>0.786</td><td>0.413</td><td>0.303</td><td>0.593</td><td>0.712</td><td>0.211</td><td>0.397</td><td>0.608</td><td>0.330</td></tr><tr><td>CQD-CO</td><td>0.576</td><td>0.918</td><td>0.454</td><td>0.191</td><td>0.796</td><td>0.837</td><td>0.336</td><td>0.513</td><td>0.816</td><td>0.319</td></tr><tr><td>CQD-Beam</td><td>0.680</td><td>0.918</td><td>0.779</td><td>0.577</td><td>0.796</td><td>0.837</td><td>0.375</td><td>0.658</td><td>0.839</td><td>0.345</td></tr><tr><td colspan="10">FB15k-237</td></tr><tr><td>GQE</td><td>0.230</td><td>0.405</td><td>0.213</td><td>0.153</td><td>0.298</td><td>0.411</td><td>0.085</td><td>0.182</td><td>0.167</td><td>0.160</td></tr><tr><td>Query2Box</td><td>0.268</td><td>0.467</td><td>0.240</td><td>0.186</td><td>0.324</td><td>0.453</td><td>0.108</td><td>0.205</td><td>0.239</td><td>0.193</td></tr><tr><td>CQD-C0</td><td>0.272</td><td>0.512</td><td>0.213</td><td>0.131</td><td>0.352</td><td>0.457</td><td>0.146</td><td>0.222</td><td>0.281</td><td>0.132</td></tr><tr><td>CQD-Beam</td><td>0.290</td><td>0.512</td><td>0.288</td><td>0.221</td><td>0.352</td><td>0.457</td><td>0.129</td><td>0.249</td><td>0.284</td><td>0.121</td></tr><tr><td colspan="10">NELL995</td></tr><tr><td>GQE</td><td>0.248</td><td>0.417</td><td>0.231</td><td>0.203</td><td>0.318</td><td>0.454</td><td>0.081</td><td>0.188</td><td>0.200</td><td>0.139</td></tr><tr><td>Query2BoX</td><td>0.306</td><td>0.555</td><td>0.266</td><td>0.233</td><td>0.343</td><td>0.480</td><td>0.132</td><td>0.212</td><td>0.369</td><td>0.163</td></tr><tr><td>CQD-CO</td><td>0.368</td><td>0.667</td><td>0.265</td><td>0.220</td><td>0.410</td><td>0.529</td><td>0.196</td><td>0.302</td><td>0.531</td><td>0.194</td></tr><tr><td>CQD-Beam</td><td>0.375</td><td>0.667</td><td>0.350</td><td>0.288</td><td>0.410</td><td>0.529</td><td>0.171</td><td>0.277</td><td>0.531</td><td>0.156</td></tr></table>
149
+
150
+ For query answering we experimented with the Godel and product t-norms – we select the best ¨ t-norm for each query type according to the best validation accuracy. For CQD-CO, we optimise variable and target embeddings with Adam, using the same initialisation scheme as Lacroix et al. (2018), with an initial learning rate of 0.1 and a maximum of 1,000 iterations. In practice, we observed that the procedure usually converges in less than 300 iterations. For CQD-Beam, the beam size $k \in \{ 2 ^ { 2 } , 2 ^ { 3 } , \ldots , 2 ^ { 8 } \}$ is found on an held-out validation set.
151
+
152
+ # 5.3 EVALUATION
153
+
154
+ As in Ren et al. (2020), for each test query, we assign a score to every entity in the graph, and use such score for ranking such entities. We then compute the Hits at 3 $( \mathrm { H } @ 3 )$ metric, which measures the frequency with which the correct answer is contained in the top three answers in the ranking. Since a query can have multiple answers, we use the filtered setting (Bordes et al., 2013), where we filter out other correct answers from the ranking before calculating the $\mathrm { H @ 3 }$ .
155
+
156
+ As baselines we use two recent state-of-the-art models for complex query answering, namely Graph Query Embedding (GQE, Hamilton et al., 2018) and Query2Box (Q2B, Ren et al., 2020).
157
+
158
+ # 5.4 RESULTS
159
+
160
+ We detail the results of $\mathrm { H @ 3 }$ for all different query types in Table 2. We observe that, on average, CQD produces more accurate results than GQE and Q2B, while using orders of magnitude less training data. In particular, combinatorial optimisation in CQD-Beam consistently outperforms the baselines across all datasets.
161
+
162
+ The results for chained queries $2 p$ and $3 p$ ) show that CQD-Beam is effective, even when increasing the length of the chain. The most difficult case corresponds to $3 \mathrm { p }$ queries, where the number of candidate variable substitutions increases due to the branching factor of the search procedure.
163
+
164
+ We also note that having more variables does not always translate into worse performance for CQDCO: it yields the best ranking scores for ip queries on FB15k-237, and for $i p$ and $p i$ queries for NELL995, and both such query types contain two variables.
165
+
166
+ ![](images/d9eef854286cb3b625e0514687471db3e84d80db55da31807ad440401a387cea.jpg)
167
+ Figure 3: Intermediate variable assignments and ranks for two example queries, obtained with CQDBeam. Correctness indicates whether the answer belongs to the ground-truth set of answers.
168
+
169
+ <table><tr><td colspan="4">Query:?G :EM.perform(ML,M) ^ genre(M,G)</td></tr><tr><td>M</td><td>G</td><td>Rank</td><td>Correctness</td></tr><tr><td rowspan="3">Do the Right Thing</td><td>Drama</td><td>1</td><td>&lt;&lt;√</td></tr><tr><td>Comedy</td><td>4</td><td></td></tr><tr><td>Crime Fiction</td><td>7</td><td></td></tr><tr><td rowspan="3">National Security</td><td>Action</td><td>2</td><td>关</td></tr><tr><td>Thriller</td><td>3</td><td></td></tr><tr><td>Crime Fiction</td><td>5</td><td>√</td></tr><tr><td rowspan="3">The Nutty Professor</td><td>Comedy</td><td>6</td><td>√</td></tr><tr><td>Romantic Com.</td><td>8</td><td>X</td></tr><tr><td>Romance Film</td><td>9</td><td>X</td></tr><tr><td colspan="4">Query:?O :C.nationality(TA,C) ^ memberOf(C,O)</td></tr><tr><td>C</td><td>0</td><td>Rank</td><td>Correctness</td></tr><tr><td rowspan="3">United States</td><td>NATO</td><td>1</td><td></td></tr><tr><td>OECD</td><td>2</td><td></td></tr><tr><td>EU</td><td>9</td><td>√</td></tr><tr><td rowspan="3">United Kingdom</td><td>NATO</td><td>3</td><td></td></tr><tr><td>OECD</td><td>4</td><td>·</td></tr><tr><td>EU</td><td>5</td><td>√</td></tr><tr><td rowspan="3">Germany</td><td>OECD</td><td>6</td><td>√</td></tr><tr><td>EU</td><td>7</td><td>√</td></tr><tr><td>WTO</td><td>8</td><td>√</td></tr></table>
170
+
171
+ The results presented in Table 2 were obtained with a rank of 1,000, as they produced the best performance in the validation set. We present results for other values of the rank in Appendix A, where we observe that even with a rank of 100, CQD still outperforms baselines with a larger embedding size. Furthermore, in Appendix B, we report the number of seconds required to answer each query type, showing that CQD-Beam requires less than $5 0 \mathrm { m s }$ for all considered queries.
172
+
173
+ We also experimented with a variant of CQD-Beam that uses DistMult (Yang et al., 2015) as the link predictor – results are reported in Appendix C. As expected, results when using DistMult are slightly less accurate than when using ComplEx, while still being more accurate than those produced by GQE and Q2B.
174
+
175
+ # 5.5 EXPLAINING ANSWERS TO COMPLEX QUERIES
176
+
177
+ A useful property of our framework is its transparency when computing scores for distinct atoms in a query. Unlike GQE and Q2B – two neural models that encode a query into a vector via a set of non-linear transformations – our framework is able to produce an explanation for a given answer in terms of intermediate variable assignments.
178
+
179
+ Consider the following test query from the FB15k-237 knowledge graph: “In what genres of movies did Martin Lawrence appear?” This query can be formalised as $? G : \exists M$ .perform $( \mathbf { M } \mathbf { L } , M ) \wedge$ genre $( M , G )$ , where ML is an anchor node representing Martin Lawrence. The ground truth answers to this query are 7 genres, including Drama, Comedy, and Crime Fiction. In Fig. 3 we show the intermediate assignments obtained when using CQD-Beam, to the variable $M$ in the query, and the rank for each combination of movie $M$ and genre $G$ . We note that the assignments to the variable $M$ are correct, as these are movies where Martin Lawrence appeared. Furthermore, these intermediate assignments lead to correct answers in the first seven positions of the ranking, which correctly belong to the ground-truth set of answers.
180
+
181
+ In a second example, consider the following query: “What international organisations contain the country of nationality of Thomas Aquinas?” Its conjunctive form is $? O : \exists C$ .nationality $( \mathrm { T A } , C ) \wedge$ memberOf $( C , O )$ , where TA is an anchor node representing Thomas Aquinas. The ground-truth answers to this query are the Organisation for Economic Co-operation and Development (OECD), the European Union (EU), the North Atlantic Treaty Organisation (NATO), and the World Trade Organisation (WTO). As shown in Fig. 3, CQD-Beam yields the correct answers in the first four positions in the rank. However, by inspecting the intermediate assignments, we note that such correct answers are produced by an incorrect (although related) intermediate assignment, since the country of nationality of Thomas Aquinas is Italy. By inspecting these decisions we can thus identify failure modes of our framework, even when it produces seemingly correct answers. This is in contrast with other neural black-box models for complex query answering outlined in Section 4, where such an analysis is not possible.
182
+
183
+ # 6 CONCLUSIONS
184
+
185
+ We proposed a framework — Complex Query Decomposition (CQD) — for answering Existential Positive First-Order logical queries by reasoning over sets of entities in embedding space. In our framework, answering a complex query is reduced to answering each of its sub-queries, and aggregating the resulting scores via t-norms. The benefit of the method is that we only need to train a neural link prediction model on atomic queries to use our framework for answering a given complex query, without the need of training on millions of generated complex queries. This comes with the added value that we are able to explain each step of the query answering process regardless of query complexity, instead of using a black-box neural query embedding model.
186
+
187
+ The proposed method is agnostic to the type of query, and is able to generalise without explicitly training on a specific variety of queries. Experimental results show that CQD produces significantly more accurate results than current state-of-the-art complex query answering methods on incomplete Knowledge Graphs.
188
+
189
+ # ACKNOWLEDGEMENTS
190
+
191
+ This research was supported by the European Union’s Horizon 2020 research and innovation programme under grant agreement no. 875160. This project was partially funded by Elsevier’s Discovery Lab. Finally, we thank NVIDIA for GPU donations.
192
+
193
+ # REFERENCES
194
+
195
+ Soren Auer, Christian Bizer, Georgi Kobilarov, Jens Lehmann, Richard Cyganiak, and Zachary G.¨ Ives. DBpedia: A nucleus for a web of open data. In ISWC/ASWC, volume 4825 of Lecture Notes in Computer Science, pp. 722–735. Springer, 2007.
196
+
197
+ Antoine Bordes, Nicolas Usunier, Alberto Garc´ıa-Duran, Jason Weston, and Oksana Yakhnenko. ´ Translating embeddings for modeling multi-relational data. In NIPS, pp. 2787–2795, 2013.
198
+
199
+ Nilesh N. Dalvi and Dan Suciu. Efficient query evaluation on probabilistic databases. In VLDB, pp. 864–875. Morgan Kaufmann, 2004.
200
+
201
+ Rajarshi Das, Arvind Neelakantan, David Belanger, and Andrew McCallum. Chains of reasoning over entities, relations, and text using recurrent neural networks. In EACL (1), pp. 132–141. Association for Computational Linguistics, 2017.
202
+
203
+ Rajarshi Das, Shehzaad Dhuliawala, Manzil Zaheer, Luke Vilnis, Ishan Durugkar, Akshay Krishnamurthy, Alex Smola, and Andrew McCallum. Go for a walk and arrive at the answer: Reasoning over paths in knowledge bases using reinforcement learning. In ICLR (Poster). OpenReview.net, 2018.
204
+
205
+ Brian A. Davey and Hilary A. Priestley. Introduction to Lattices and Order, Second Edition. Cambridge University Press, 2002.
206
+
207
+ Daniel Daza and Michael Cochez. Message passing query embedding. In ICML Workshop - Graph Representation Learning and Beyond, 2020. URL https://arxiv.org/abs/ 2002.02406.
208
+
209
+ Luc De Raedt. Logical and relational learning. Cognitive Technologies. Springer, 2008.
210
+
211
+ Michel Dumontier, Alison Callahan, Jose Cruz-Toledo, Peter Ansell, Vincent Emonet, Franc¸ois Belleau, and Arnaud Droit. Bio2RDF release 3: A larger, more connected network of linked data for the life sciences. In International Semantic Web Conference (Posters & Demos), volume 1272 of CEUR Workshop Proceedings, pp. 401–404. CEUR-WS.org, 2014.
212
+
213
+ Tal Friedman and Guy Van den Broeck. Symbolic querying of vector spaces: Probabilistic databases meets relational embeddings. In UAI, volume 124 of Proceedings of Machine Learning Research, pp. 1268–1277. AUAI Press, 2020.
214
+
215
+ Lise Getoor and Ben Taskar. Introduction to statistical relational learning. The MIT Press, 2007.
216
+
217
+ Shu Guo, Quan Wang, Lihong Wang, Bin Wang, and Li Guo. Jointly embedding knowledge graphs and logical rules. In EMNLP, pp. 192–202. The Association for Computational Linguistics, 2016.
218
+
219
+ Kelvin Guu, John Miller, and Percy Liang. Traversing knowledge graphs in vector space. In EMNLP, pp. 318–327. The Association for Computational Linguistics, 2015.
220
+
221
+ William L. Hamilton, Payal Bajaj, Marinka Zitnik, Dan Jurafsky, and Jure Leskovec. Embedding logical queries on knowledge graphs. In NeurIPS, pp. 2030–2041, 2018.
222
+
223
+ Daniel S. Himmelstein, Antoine Lizee, Christine Hessler, Leo Brueggeman, Sabrina L. Chen, Dexter Hadley, Ari Green, Pouya Khankhanian, and Sergio E. Baranzini. Systematic integration of biomedical knowledge prioritizes drugs for repurposing. bioRxiv, 2017. doi: 10.1101/087619. URL https://www.biorxiv.org/content/early/2017/08/31/087619.
224
+
225
+ Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR (Poster), 2015.
226
+
227
+ Erich-Peter Klement, Radko Mesiar, and Endre Pap. Triangular Norms, volume 8 of Trends in Logic. Springer, 2000.
228
+
229
+ Erich-Peter Klement, Radko Mesiar, and Endre Pap. Triangular norms. position paper I: basic analytical and algebraic properties. Fuzzy Sets Syst., 143(1):5–26, 2004.
230
+
231
+ Bhushan Kotnis, Carolin Lawrence, and Mathias Niepert. Answering complex queries in knowledge graphs with bidirectional sequence encoders. CoRR, abs/2004.02596, 2020.
232
+
233
+ Denis Krompaß, Maximilian Nickel, and Volker Tresp. Querying factorized probabilistic triple databases. In International Semantic Web Conference (2), volume 8797 of Lecture Notes in Computer Science, pp. 114–129. Springer, 2014.
234
+
235
+ Timothee Lacroix, Nicolas Usunier, and Guillaume Obozinski. Canonical tensor decomposition for ´ knowledge base completion. In ICML, volume 80 of Proceedings of Machine Learning Research, pp. 2869–2878. PMLR, 2018.
236
+
237
+ Xiang Li, Luke Vilnis, Dongxu Zhang, Michael Boratko, and Andrew McCallum. Smoothing the geometry of probabilistic box embeddings. In ICLR. OpenReview.net, 2019.
238
+
239
+ George A. Miller. WORDNET: a lexical database for english. In HLT. Morgan Kaufmann, 1992.
240
+
241
+ Pasquale Minervini, Thomas Demeester, Tim Rocktaschel, and Sebastian Riedel. Adversarial sets ¨ for regularising neural link predictors. In UAI. AUAI Press, 2017.
242
+
243
+ Pasquale Minervini, Matko Bosnjak, Tim Rocktaschel, Sebastian Riedel, and Edward Grefenstette. ¨ Differentiable reasoning on large knowledge bases and natural language. In AAAI, pp. 5182–5190. AAAI Press, 2020a.
244
+
245
+ Pasquale Minervini, Sebastian Riedel, Pontus Stenetorp, Edward Grefenstette, and Tim Rocktaschel. ¨ Learning reasoning strategies in end-to-end differentiable proving. In ICML, Proceedings of Machine Learning Research. PMLR, 2020b.
246
+
247
+ Tom M. Mitchell, William W. Cohen, Estevam R. Hruschka Jr., Partha Pratim Talukdar, Justin Betteridge, Andrew Carlson, Bhavana Dalvi Mishra, Matthew Gardner, Bryan Kisiel, Jayant Krishnamurthy, Ni Lao, Kathryn Mazaitis, Thahir Mohamed, Ndapandula Nakashole, Emmanouil A. Platanios, Alan Ritter, Mehdi Samadi, Burr Settles, Richard C. Wang, Derry Wijaya, Abhinav Gupta, Xinlei Chen, Abulhair Saparov, Malcolm Greaves, and Joel Welling. Never-ending learning. In AAAI, pp. 2302–2310. AAAI Press, 2015.
248
+
249
+ Maximilian Nickel, Kevin Murphy, Volker Tresp, and Evgeniy Gabrilovich. A review of relational machine learning for knowledge graphs. Proceedings of the IEEE, 104(1):11–33, 2016.
250
+
251
+ Natalya Fridman Noy, Yuqing Gao, Anshu Jain, Anant Narayanan, Alan Patterson, and Jamie Taylor. Industry-scale knowledge graphs: lessons and challenges. Commun. ACM, 62(8):36–43, 2019.
252
+
253
+ Hongyu Ren, Weihua Hu, and Jure Leskovec. Query2box: Reasoning over knowledge graphs in vector space using box embeddings. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ BJgr4kSFDS.
254
+
255
+ Tim Rocktaschel and Sebastian Riedel. End-to-end differentiable proving. In ¨ NIPS, pp. 3788–3800, 2017.
256
+
257
+ Luciano Serafini and Artur S. d’Avila Garcez. Logic tensor networks: Deep learning and logical reasoning from data and knowledge. CoRR, abs/1606.04422, 2016. URL http://arxiv. org/abs/1606.04422.
258
+
259
+ Fabian M. Suchanek, Gjergji Kasneci, and Gerhard Weikum. Yago: a core of semantic knowledge. In WWW, pp. 697–706. ACM, 2007.
260
+
261
+ Kristina Toutanova and Danqi Chen. Observed versus latent features for knowledge base and text inference. In Proceedings of the 3rd Workshop on Continuous Vector Space Models and their Compositionality, pp. 57–66, Beijing, China, July 2015. Association for Computational Linguistics. doi: 10.18653/v1/W15-4007. URL https://www.aclweb.org/anthology/ W15-4007.
262
+
263
+ Theo Trouillon, Johannes Welbl, Sebastian Riedel, ´ Eric Gaussier, and Guillaume Bouchard. Com- ´ plex embeddings for simple link prediction. In ICML, volume 48 of JMLR Workshop and Conference Proceedings, pp. 2071–2080. JMLR.org, 2016.
264
+
265
+ Emile van Krieken, Erman Acar, and Frank van Harmelen. Analyzing Differentiable Fuzzy Implications. In Proceedings of the 17th International Conference on Principles of Knowledge Representation and Reasoning, pp. 893–903, 9 2020. doi: 10.24963/kr.2020/92. URL https://doi.org/10.24963/kr.2020/92.
266
+
267
+ Meng Wang, Ruijie Wang, Jun Liu, Yihe Chen, Lei Zhang, and Guilin Qi. Towards empty answers in SPARQL: approximating querying with RDF embedding. In International Semantic Web Conference (1), volume 11136 of Lecture Notes in Computer Science, pp. 513–529. Springer, 2018.
268
+
269
+ Leon Weber, Pasquale Minervini, Jannes Munchmeyer, Ulf Leser, and Tim Rockt ¨ aschel. Nlprolog: ¨ Reasoning with weak unification for question answering in natural language. In ACL (1), pp. 6151–6161. Association for Computational Linguistics, 2019.
270
+
271
+ Wenhan Xiong, Thien Hoang, and William Yang Wang. Deeppath: A reinforcement learning method for knowledge graph reasoning. In EMNLP, pp. 564–573. Association for Computational Linguistics, 2017.
272
+
273
+ Bishan Yang, Wen-tau Yih, Xiaodong He, Jianfeng Gao, and Li Deng. Embedding entities and relations for learning and inference in knowledge bases. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015.
274
+
275
+ # A INFLUENCE OF THE EMBEDDING SIZE ON THE RESULTS
276
+
277
+ Table 3: Complex query answering results $( \mathrm { H @ 3 } )$ across all query types, for different rank (embedding size) values – results for Graph Query Embedding (GQE, Hamilton et al., 2018) and Query2Box (Ren et al., 2020) are from Ren et al. (2020).
278
+
279
+ <table><tr><td>Method</td><td>Rank</td><td>1p</td><td>2p</td><td>3p</td><td>2i</td><td>3i</td><td>ip</td><td>pi</td><td>2u</td><td>up</td></tr><tr><td colspan="9">FB15k</td><td></td></tr><tr><td>GQE</td><td>800</td><td>0.630</td><td>0.346</td><td>0.250</td><td>0.515</td><td>0.611</td><td>0.153</td><td>0.320</td><td>0.362</td><td>0.271</td></tr><tr><td>Query2Box</td><td>400</td><td>0.786</td><td>0.413</td><td>0.303</td><td>0.593</td><td>0.712</td><td>0.211</td><td>0.397</td><td>0.608</td><td>0.330</td></tr><tr><td rowspan="4">CQD-CO</td><td>100</td><td>0.893 0.906</td><td>0.162 0.257</td><td>0.076 0.092</td><td>0.773 0.785</td><td>0.818 0.828</td><td>0.118 0.210</td><td>0.344 0.426</td><td>0.493 0.753</td><td>0.073 0.110</td></tr><tr><td>200 500</td><td>0.912</td><td>0.345</td><td>0.123</td><td>0.772</td><td>0.817</td><td>0.257</td><td>0.454</td><td>0.795</td><td>0.206</td></tr><tr><td>1000</td><td>0.918</td><td>0.454</td><td></td><td>0.796</td><td>0.837</td><td>0.336</td><td>0.513</td><td>0.816</td><td>0.319</td></tr><tr><td>100</td><td></td><td></td><td>0.191</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan="4">CQD-Beam</td><td></td><td>0.893</td><td>0.746</td><td>0.557</td><td>0.773</td><td>0.818</td><td>0.357</td><td>0.669</td><td>0.689</td><td>0.313</td></tr><tr><td>200</td><td>0.906</td><td>0.770</td><td>0.585</td><td>0.785</td><td>0.828</td><td>0.373</td><td>0.679</td><td>0.815</td><td>0.357</td></tr><tr><td>500</td><td>0.912</td><td>0.759</td><td>0.580</td><td>0.772</td><td>0.817</td><td>0.372</td><td>0.650</td><td>0.831</td><td>0.351</td></tr><tr><td>1000</td><td>0.918</td><td>0.779</td><td>0.584</td><td>0.796</td><td>0.837</td><td>0.377</td><td>0.658</td><td>0.839</td><td>0.355</td></tr><tr><td colspan="10">FB15k-237</td></tr><tr><td>GQE</td><td>800</td><td>0.405</td><td>0.213</td><td>0.153</td><td>0.298</td><td>0.411</td><td>0.085</td><td>0.182</td><td>0.167</td><td>0.160</td></tr><tr><td>Query2Box</td><td>400</td><td>0.467</td><td>0.240</td><td>0.186</td><td>0.324</td><td>0.453</td><td>0.108</td><td>0.205</td><td>0.239</td><td>0.193</td></tr><tr><td rowspan="4">CQD-CO</td><td>100</td><td>0.493</td><td>0.162</td><td>0.076</td><td>0.311</td><td>0.415</td><td>0.118</td><td>0.199</td><td>0.238</td><td>0.073</td></tr><tr><td>200</td><td>0.500</td><td>0.187</td><td>0.092</td><td>0.329</td><td>0.439</td><td>0.128</td><td>0.204</td><td>0.254</td><td>0.103</td></tr><tr><td>500</td><td>0.508</td><td>0.210</td><td>0.123</td><td>0.346</td><td>0.454</td><td>0.142</td><td>0.216</td><td>0.273</td><td>0.119</td></tr><tr><td>1000</td><td>0.512</td><td>0.213</td><td>0.131</td><td>0.352</td><td>0.457</td><td>0.146</td><td>0.222</td><td>0.281</td><td>0.132</td></tr><tr><td rowspan="4">CQD-Beam</td><td>100</td><td>0.493</td><td>0.256</td><td>0.207</td><td>0.311</td><td>0.415</td><td>0.119</td><td>0.234</td><td>0.254</td><td>0.121</td></tr><tr><td>200</td><td>0.500</td><td>0.272</td><td>0.216</td><td>0.329</td><td>0.439</td><td>0.122</td><td>0.244</td><td>0.264</td><td>0.127</td></tr><tr><td>500</td><td>0.508</td><td>0.280</td><td>0.216</td><td>0.346</td><td>0.454</td><td>0.127</td><td>0.257</td><td>0.280</td><td>0.128</td></tr><tr><td>1000</td><td>0.512</td><td>0.279</td><td>0.219</td><td>0.352</td><td>0.457</td><td>0.129</td><td>0.249</td><td>0.284</td><td>0.128</td></tr><tr><td colspan="10">NELL995</td></tr><tr><td>GQE</td><td>800</td><td>0.417</td><td>0.231</td><td>0.203</td><td>0.318</td><td>0.454</td><td>0.081</td><td>0.188</td><td>0.200</td><td>0.139</td></tr><tr><td>Query2Box</td><td>400</td><td>0.555</td><td>0.266</td><td>0.233</td><td>0.343</td><td>0.480</td><td>0.132</td><td>0.212</td><td>0.369</td><td>0.163</td></tr><tr><td rowspan="4">CQD-CO</td><td>100</td><td>0.647</td><td>0.234</td><td>0.145</td><td>0.389</td><td>0.508</td><td>0.165</td><td>0.283</td><td>0.465</td><td>0.126</td></tr><tr><td>200</td><td>0.658</td><td>0.238</td><td>0.164</td><td>0.401</td><td>0.524</td><td>0.172</td><td>0.282</td><td>0.502</td><td>0.148</td></tr><tr><td>500</td><td>0.665</td><td>0.261</td><td>0.208</td><td>0.406</td><td>0.525</td><td>0.187</td><td>0.293</td><td>0.523</td><td>0.171</td></tr><tr><td>1000</td><td>0.667</td><td>0.265</td><td>0.220</td><td>0.410</td><td>0.529</td><td>0.196</td><td>0.302</td><td>0.531</td><td>0.194</td></tr><tr><td rowspan="4">CQD-Beam</td><td>100</td><td>0.647</td><td>0.333</td><td>0.296</td><td>0.389</td><td>0.508</td><td>0.160</td><td>0.293</td><td>0.469</td><td>0.150</td></tr><tr><td>200</td><td>0.658</td><td>0.335</td><td>0.292</td><td>0.401</td><td>0.524</td><td>0.162</td><td>0.290</td><td>0.508</td><td>0.146</td></tr><tr><td>500</td><td>0.665</td><td>0.348</td><td>0.296</td><td>0.406</td><td>0.525</td><td>0.166</td><td>0.291</td><td>0.527</td><td>0.149</td></tr><tr><td>1000</td><td>0.667</td><td>0.343</td><td>0.297</td><td>0.410</td><td>0.529</td><td>0.168</td><td>0.283</td><td>0.536</td><td>0.157</td></tr></table>
280
+
281
+ In Table 3 we report results for CQD-CO (Section 3.1) and CQD-Beam (Section 3.2) for different rank (embedding size) values. We can see that the model produces very accurate results even with significantly fewer parameters.
282
+
283
+ # B TIMING EXPERIMENTS
284
+
285
+ ![](images/e6b8b0bba96b616a1fb5c3d4575f95d38610d8bf18d6717c4c39888251fe8c22.jpg)
286
+ Figure 4: Number of seconds required by Q2B (Ren et al., 2020) and CQD-Beam (Section 3.2 for answering each query type in FB15k.
287
+
288
+ ![](images/d79fe0d5e915bb032ba8c9913d76e2130aaf432f369d2338fc84782e3ce3bb6e.jpg)
289
+ Figure 5: Number of seconds required by Q2B (Ren et al., 2020) and CQD-Beam (Section 3.2 for answering each query type in FB15k-237.
290
+
291
+ In Fig. 4 and Fig. 5 we report the time (seconds) required by Q2B (Ren et al., 2020) and CQD-Beam (Section 3.2 for answering each query type, aggregated over FB15k, FB15k-237, and NELL. We can see that, in CQD-Beam, the main computation bottleneck are multi-hop queries, since the model is required to invoke the neural link prediction model for each step of the chain to obtain the top- $k$ candidates for the next step in the chain.
292
+
293
+ # C DISTMULT EXPERIMENTS
294
+
295
+ Table 4: Complex query answering results $( \mathrm { H @ 3 } )$ across all query types, for two different neural link prediction models, namely ComplEx (Trouillon et al., 2016) and DistMult (Yang et al., 2015).
296
+
297
+ <table><tr><td>Method</td><td>Model</td><td>1p</td><td>2p</td><td>3p</td><td>2i</td><td>3i</td><td>ip</td><td>pi</td><td>2u</td><td>up</td></tr><tr><td colspan="10">FB15k</td></tr><tr><td>CQD-Beam</td><td>ComplEx DistMult</td><td>0.918 0.869</td><td>0.779</td><td>0.584</td><td>0.796</td><td>0.837 0.824</td><td>0.377 0.369</td><td>0.658 0.608</td><td>0.839 0.822</td><td>0.355 0.355</td></tr><tr><td colspan="10">0.761 0.581 0.778</td></tr><tr><td colspan="10">FB15k-237</td></tr><tr><td>CQD-Beam</td><td>ComplEx</td><td>0.512</td><td>0.279</td><td>0.219</td><td>0.352</td><td>0.457</td><td>0.129</td><td>0.249</td><td>0.284</td><td>0.128</td></tr><tr><td>DistMult</td><td></td><td>0.485</td><td>0.277</td><td>0.210</td><td>0.332</td><td>0.443</td><td>0.117</td><td>0.224</td><td>0.281</td><td>0.123</td></tr><tr><td colspan="10">NELL995</td></tr><tr><td>CQD-Beam</td><td>ComplEx</td><td>0.667</td><td>0.343</td><td>0.297</td><td>0.410</td><td>0.529</td><td>0.168</td><td>0.283</td><td>0.536</td><td>0.157</td></tr><tr><td></td><td>DistMult</td><td>0.642</td><td>0.348</td><td>0.297</td><td>0.392</td><td>0.517</td><td>0.160</td><td>0.260</td><td>0.502</td><td>0.169</td></tr></table>
298
+
299
+ In Table 4 we report the results for CQD-Beam with two different neural link prediction models, namely ComplEx (Trouillon et al., 2016) and DistMult (Yang et al., 2015). Both models were trained using the loss and regulariser proposed by Lacroix et al. (2018), and their hyperparameters were tuned according to their performance in the validation set; in both cases, the embedding size is set to 1,000. As expected, CQD-Beam with DistMult produces slightly less accurate results than with ComplEx, while still yielding more accurate results than the Q2B and GQE baselines.
parse/train/Mos9F9kDwkz/Mos9F9kDwkz_content_list.json ADDED
@@ -0,0 +1,1588 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "COMPLEX QUERY ANSWERING WITH NEURAL LINK PREDICTORS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 99,
9
+ 581,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Erik Arakelyan1†, Daniel Daza2,3,4†, Pasquale Minervini1†, & Michael Cochez2,4 ",
17
+ "bbox": [
18
+ 184,
19
+ 169,
20
+ 738,
21
+ 185
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "1UCL Centre for Artificial Intelligence, University College London, United Kingdom \n2Vrije Universiteit Amsterdam, The Netherlands \n3University of Amsterdam, The Netherlands \n4Discovery Lab, Elsevier, The Netherlands \n{erik.arakelyan.18,p.minervini}@ucl.ac.uk \n{d.dazacruz,m.cochez}@vu.nl ",
28
+ "bbox": [
29
+ 184,
30
+ 185,
31
+ 743,
32
+ 271
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "ABSTRACT ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 454,
42
+ 308,
43
+ 544,
44
+ 323
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Neural link predictors are immensely useful for identifying missing edges in large scale Knowledge Graphs. However, it is still not clear how to use these models for answering more complex queries that arise in a number of domains, such as queries using logical conjunctions $( \\wedge )$ , disjunctions (∨) and existential quantifiers (∃), while accounting for missing edges. In this work, we propose a framework for efficiently answering complex queries on incomplete Knowledge Graphs. We translate each query into an end-to-end differentiable objective, where the truth value of each atom is computed by a pre-trained neural link predictor. We then analyse two solutions to the optimisation problem, including gradient-based and combinatorial search. In our experiments, the proposed approach produces more accurate results than state-of-the-art methods — black-box neural models trained on millions of generated queries — without the need of training on a large and diverse set of complex queries. Using orders of magnitude less training data, we obtain relative improvements ranging from $8 \\%$ up to $40 \\%$ in Hits $@ 3$ across different knowledge graphs containing factual information. Finally, we demonstrate that it is possible to explain the outcome of our model in terms of the intermediate solutions identified for each of the complex query atoms. All our source code and datasets are available online 1. ",
51
+ "bbox": [
52
+ 233,
53
+ 338,
54
+ 764,
55
+ 589
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 616,
66
+ 336,
67
+ 632
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Knowledge Graphs (KGs) are graph-structured knowledge bases, where knowledge about the world is stored in the form of relationship between entities. KGs are an extremely flexible and versatile knowledge representation formalism – examples include general purpose knowledge bases such as DBpedia (Auer et al., 2007) and YAGO (Suchanek et al., 2007), domain-specific ones such as Bio2RDF (Dumontier et al., 2014) and Hetionet (Himmelstein et al., 2017) for life sciences and WordNet (Miller, 1992) for linguistics, and application-driven graphs such as the Google Knowledge Graph, Microsoft’s Bing Knowledge Graph, and Facebook’s Social Graph (Noy et al., 2019). ",
74
+ "bbox": [
75
+ 174,
76
+ 647,
77
+ 825,
78
+ 746
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Neural link predictors (Nickel et al., 2016) tackle the problem of identifying missing edges in large KGs. However, in many complex domains, an open challenge is developing techniques for answering complex queries involving multiple and potentially unobserved edges, entities, and variables, rather than just single edges. ",
85
+ "bbox": [
86
+ 174,
87
+ 752,
88
+ 823,
89
+ 809
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "We focus on First-Order Logical Queries that use conjunctions $( \\wedge )$ , disjunctions (∨), and existential quantifiers $\\textcircled{1}$ . A multitude of queries can be expressed by using such operators – for instance, the query “Which drugs $D$ interact with proteins associated with diseases $t _ { 1 }$ or $t _ { 2 }$ ?” can be rewritten as $? D : \\exists P$ .interacts $( D , P ) \\wedge$ [assoc $( P , t _ { 1 } )$ ∨ assoc $( P , t _ { 2 } ) ]$ , which can be answered via sub-graph matching. ",
96
+ "bbox": [
97
+ 174,
98
+ 815,
99
+ 823,
100
+ 886
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "image",
106
+ "img_path": "images/795c275c3407cdd0665d316e2384d9f84a6ee7a97787617c1948f8626e1959ef.jpg",
107
+ "image_caption": [
108
+ "?D : ∃P . interacts(D, P) ∧ [assoc(P, t 1) ∨ assoc(P, t 2)] "
109
+ ],
110
+ "image_footnote": [],
111
+ "bbox": [
112
+ 189,
113
+ 150,
114
+ 452,
115
+ 196
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "image",
121
+ "img_path": "images/15e604dae0c587f4e1b7429f994c841404358d7fd5e6bdd56091b046c9f81051.jpg",
122
+ "image_caption": [
123
+ "?D : ∃A . directs(D, A) ∧ [prize(A, Oscar) ∨ prize(A, Emmy)] ",
124
+ "Figure 1: Examples of First-Order Logical Queries using existential quantification $\\textcircled{1}$ , conjunction $( \\wedge )$ , and disjunction $( \\vee )$ operators — their dependency graphs are $\\bar { D ^ { + } } \\gets P \\gets \\{ t _ { 1 } , t _ { 2 } \\}$ , and $D \\gets$ $A \\gets \\{ \\mathrm { O s c a r } , \\mathrm { E m m t y } \\}$ , respectively. "
125
+ ],
126
+ "image_footnote": [],
127
+ "bbox": [
128
+ 516,
129
+ 151,
130
+ 779,
131
+ 199
132
+ ],
133
+ "page_idx": 1
134
+ },
135
+ {
136
+ "type": "text",
137
+ "text": "However, plain sub-graph matching cannot capture semantic similarities between entities and relations, and cannot deal with missing facts in the KG. One possible solution consists in computing all missing entries via KG completion methods (Getoor & Taskar, 2007; De Raedt, 2008; Nickel et al., 2016), but that would materialise a significantly denser KG and would have intractable space and time complexity requirements (Krompaß et al., 2014). ",
138
+ "bbox": [
139
+ 173,
140
+ 273,
141
+ 825,
142
+ 344
143
+ ],
144
+ "page_idx": 1
145
+ },
146
+ {
147
+ "type": "text",
148
+ "text": "In this work, we propose a framework for answering First-Order Logic Queries, where the query is compiled in an end-to-end differentiable function, modelling the interactions between its atoms. The truth value of each atom is computed by a neural link predictor (Nickel et al., 2016) – a differentiable model that, given an atomic query, returns the likelihood that the fact it represents holds true. We then propose two approaches for identifying the most likely values for the variable nodes in a query – either by continuous or by combinatorial optimisation. ",
149
+ "bbox": [
150
+ 174,
151
+ 351,
152
+ 825,
153
+ 434
154
+ ],
155
+ "page_idx": 1
156
+ },
157
+ {
158
+ "type": "text",
159
+ "text": "Recent work on embedding logical queries on KGs (Hamilton et al., 2018; Daza & Cochez, 2020; Ren et al., 2020) has suggested that in order to go beyond link prediction, more elaborate architectures, and a large and diverse dataset with millions of queries is required. In this work, we show that this is not the case, and demonstrate that it is possible to use an efficient neural link predictor trained for 1-hop query answering, to generalise to up to 8 complex query structures. By doing so, we produce more accurate results than state-of-the-art models, while using orders of magnitude less training data. ",
160
+ "bbox": [
161
+ 173,
162
+ 440,
163
+ 825,
164
+ 539
165
+ ],
166
+ "page_idx": 1
167
+ },
168
+ {
169
+ "type": "text",
170
+ "text": "Summarising, in comparison with other approaches in the literature such as Query2Box (Ren et al., 2020), we find that the proposed framework i) achieves significantly better or equivalent predictive accuracy on a wide range of complex queries, ii) is capable of out-of-distribution generalisation, since it is trained on simple queries only and evaluated on complex queries, and iii) is more explainable, since the intermediate results for its sub-queries and variable assignments can be used to explain any given answer. ",
171
+ "bbox": [
172
+ 173,
173
+ 545,
174
+ 825,
175
+ 630
176
+ ],
177
+ "page_idx": 1
178
+ },
179
+ {
180
+ "type": "text",
181
+ "text": "2 EXISTENTIAL POSITIVE FIRST-ORDER LOGICAL QUERIES ",
182
+ "text_level": 1,
183
+ "bbox": [
184
+ 176,
185
+ 648,
186
+ 687,
187
+ 665
188
+ ],
189
+ "page_idx": 1
190
+ },
191
+ {
192
+ "type": "text",
193
+ "text": "A Knowledge Graph ${ \\mathcal { G } } \\subseteq { \\mathcal { E } } \\times { \\mathcal { R } } \\times { \\mathcal { E } }$ can be defined as a set of subject-predicate-object $\\langle s , p , o \\rangle$ triples, where each triple encodes a relationship of type $p \\in \\mathcal R$ between the subject $s \\in \\mathcal { E }$ and the object $o \\in { \\mathcal { E } }$ of the triple, where $\\mathcal { E }$ and $\\mathcal { R }$ denote the set of all entities and relation types, respectively. One can think of a Knowledge Graph as a labelled multi-graph, where entities $\\mathcal { E }$ represent nodes, and edges are labelled with relation types $\\mathcal { R }$ . Without loss of generality, a Knowledge Graph can be represented as a First-Order Logic Knowledge Base, where each triple $\\langle s , p , o \\rangle$ denotes an atomic formula $p ( s , o )$ , with $p \\in \\mathcal R$ a binary predicate and $s , o \\in { \\mathcal { E } }$ its arguments. ",
194
+ "bbox": [
195
+ 173,
196
+ 679,
197
+ 825,
198
+ 777
199
+ ],
200
+ "page_idx": 1
201
+ },
202
+ {
203
+ "type": "text",
204
+ "text": "Conjunctive queries are a sub-class of First-Order Logical queries that use existential quantification $\\textcircled{1}$ and conjunction $( \\wedge )$ operations. We consider conjunctive queries $\\mathcal { Q }$ in the following form: ",
205
+ "bbox": [
206
+ 171,
207
+ 784,
208
+ 825,
209
+ 813
210
+ ],
211
+ "page_idx": 1
212
+ },
213
+ {
214
+ "type": "equation",
215
+ "img_path": "images/26e220f69da806b0e0f9dc60885f3e76aa5f26897f1e2ae68036d42795a9ffd0.jpg",
216
+ "text": "$$\n\\begin{array} { r l } { \\mathcal { Q } [ A ] \\triangleq ? A : } & { \\exists V _ { 1 } , \\dotsc , V _ { m } . e _ { 1 } \\land . . . \\land e _ { n } } \\\\ { \\mathrm { ~ w h e r e ~ } } & { e _ { i } = p ( c , V ) , \\mathrm { ~ w i t h ~ } V \\in \\{ A , V _ { 1 } , . . . , V _ { m } \\} , c \\in \\mathcal { E } , p \\in \\mathcal { R } } \\\\ { \\mathrm { o r ~ } } & { e _ { i } = p ( V , V ^ { \\prime } ) , \\mathrm { ~ w i t h ~ } V , V ^ { \\prime } \\in \\{ A , V _ { 1 } , . . . , V _ { m } \\} , V \\neq V ^ { \\prime } , p \\in \\mathcal { R } } \\end{array}\n$$",
217
+ "text_format": "latex",
218
+ "bbox": [
219
+ 240,
220
+ 815,
221
+ 738,
222
+ 873
223
+ ],
224
+ "page_idx": 1
225
+ },
226
+ {
227
+ "type": "text",
228
+ "text": "In Eq. (1), the variable $A$ is the target of the query, $V _ { 1 } , \\ldots , V _ { m }$ denote the bound variable nodes, while $c \\in \\mathcal { E }$ represent the input anchor nodes. Each $e _ { i }$ denotes a logical atom, with either one $( p ( c , V ) )$ or two variables $( p ( V , V ^ { \\prime } ) )$ , and $e _ { 1 } \\wedge \\ldots \\wedge e _ { n }$ denotes a conjunction between $n$ atoms. ",
229
+ "bbox": [
230
+ 176,
231
+ 881,
232
+ 820,
233
+ 924
234
+ ],
235
+ "page_idx": 1
236
+ },
237
+ {
238
+ "type": "text",
239
+ "text": "The goal of answering the logical query $\\mathcal { Q }$ consists in finding a set of entities $\\mathbb { I } \\mathcal { Q } \\mathbb { I } \\subseteq \\mathcal { E }$ such that $a \\in [ [ \\mathcal { Q } ] ]$ iff ${ \\mathcal { Q } } [ a ]$ holds true, where $[ [ \\mathcal { Q } ] ]$ is the answer set of the query $\\mathcal { Q }$ . ",
240
+ "bbox": [
241
+ 171,
242
+ 103,
243
+ 823,
244
+ 132
245
+ ],
246
+ "page_idx": 2
247
+ },
248
+ {
249
+ "type": "text",
250
+ "text": "As illustrated in Fig. 1, the dependency graph of a conjunctive query $\\mathcal { Q }$ is a graph representation of $\\mathcal { Q }$ where nodes correspond to variable or non-variable atom arguments in $\\mathcal { Q }$ and edges correspond to atom predicates. We follow Hamilton et al. (2018) and focus on valid conjunctive queries – i.e. the dependency graph needs to be a directed acyclic graph, where anchor entities correspond to source nodes, and the query target $A$ is the unique sink node. ",
251
+ "bbox": [
252
+ 174,
253
+ 138,
254
+ 825,
255
+ 208
256
+ ],
257
+ "page_idx": 2
258
+ },
259
+ {
260
+ "type": "text",
261
+ "text": "Example 2.1 (Conjunctive Query). Consider the query “Which drugs interact with proteins associated with the disease $t ? ^ { \\prime \\prime }$ . This query can be formalised as a conjunctive query $\\mathcal { Q }$ such as $? D : \\exists P . i n t e r a c t s ( D , P ) \\land a s s o c ( P , t )$ , where $t$ is an input anchor node, the variable $D$ is the target of the query, $P$ is $a$ bound variable node, and the dependency graph is $D \\gets P \\gets t .$ . The answer set $[ [ \\mathcal { Q } ] ]$ of $\\mathcal { Q }$ corresponds to the set of all drugs in $\\mathcal { E }$ interacting with proteins associated with $t .$ . \u0004 ",
262
+ "bbox": [
263
+ 173,
264
+ 213,
265
+ 825,
266
+ 284
267
+ ],
268
+ "page_idx": 2
269
+ },
270
+ {
271
+ "type": "text",
272
+ "text": "Handling Disjunctions So far we focused on conjunctive queries defined using the existential quantification $\\left( \\exists \\right)$ and conjunction $( \\wedge )$ logical operators. Our aim is answering a wider class of logical queries, namely Existential Positive First-Order (EPFO) queries (Dalvi & Suciu, 2004) that in addition to existential quantification and conjunction, also involve disjunction $( \\vee )$ . We follow Ren et al. (2020) and, without loss of generality, we transform a given EPFO query into Disjunctive Normal Form (DNF, Davey & Priestley, 2002), i.e. a disjunction of conjunctive queries. ",
273
+ "bbox": [
274
+ 173,
275
+ 299,
276
+ 825,
277
+ 385
278
+ ],
279
+ "page_idx": 2
280
+ },
281
+ {
282
+ "type": "text",
283
+ "text": "Example 2.2 (Disjunctive Normal Form). Consider the following variant of query in $E x$ - ample 2.1: “Which drugs interact with proteins associated with the diseases $t _ { 1 }$ or $t _ { 2 } ? { } ^ { \\prime }$ . This query can be formalised as a EPFO query $\\mathcal { Q }$ such as ?D : ∃P.interacts $( D , P )$ $\\wedge$ $[ a s s o c ( P , t _ { 1 } ) \\lor a s s o c ( P , t _ { 2 } ) ]$ . We can transform $\\mathcal { Q }$ in the following, equivalent DNF query: $? D$ : $\\bar { \\exists } P .$ [interact $\\cdot ( D , P ) \\land a s s o c ( P , t _ { 1 } ) ] \\lor$ [interacts $( D , P ) \\land a s s o c ( P , t _ { 2 } ) ]$ . \u0004 ",
284
+ "bbox": [
285
+ 174,
286
+ 388,
287
+ 825,
288
+ 459
289
+ ],
290
+ "page_idx": 2
291
+ },
292
+ {
293
+ "type": "text",
294
+ "text": "In our framework, given a DNF query $\\mathcal { Q }$ , for each of its conjunctive sub-queries we produce a score for all the entities representing the likelihood that they answer that sub-query. Finally, such scores are aggregated using a t-conorm — a continuous relaxation of the logical disjunction. ",
295
+ "bbox": [
296
+ 174,
297
+ 470,
298
+ 825,
299
+ 513
300
+ ],
301
+ "page_idx": 2
302
+ },
303
+ {
304
+ "type": "text",
305
+ "text": "3 COMPLEX QUERY ANSWERING VIA OPTIMISATION ",
306
+ "text_level": 1,
307
+ "bbox": [
308
+ 174,
309
+ 535,
310
+ 629,
311
+ 551
312
+ ],
313
+ "page_idx": 2
314
+ },
315
+ {
316
+ "type": "text",
317
+ "text": "We propose a framework for answering EPFO logical queries in the presence of missing edges. Given a query $\\mathcal { Q }$ , we define the score of a target node $a \\in { \\mathcal { E } }$ as a candidate answer for a query as a function of the score of all atomic queries in $\\mathcal { Q }$ , given a variable-to-entity substitution for all variables in $\\mathcal { Q }$ . ",
318
+ "bbox": [
319
+ 174,
320
+ 566,
321
+ 825,
322
+ 623
323
+ ],
324
+ "page_idx": 2
325
+ },
326
+ {
327
+ "type": "text",
328
+ "text": "Each variable is mapped to an embedding vector, that can either correspond to an entity $c \\in { \\mathcal { E } }$ or to a virtual entity. The score of each of the query atoms is determined individually using a neural link predictor (Nickel et al., 2016). Then, the score of the query with respect to a given candidate answer ${ \\mathcal { Q } } [ a ]$ is computed by aggregating all atom scores using t-norms and t-conorms – continuous relaxations of the logical conjunction and disjunction operators. ",
329
+ "bbox": [
330
+ 173,
331
+ 630,
332
+ 825,
333
+ 700
334
+ ],
335
+ "page_idx": 2
336
+ },
337
+ {
338
+ "type": "text",
339
+ "text": "Neural Link Prediction A neural link predictor is a differentiable model where atom arguments are first mapped into a $k$ -dimensional embedding space, and then used for producing a score for the atom. More formally, given a query atom $p ( s , o )$ , where $p \\in \\mathcal R$ and $s , o \\in { \\mathcal { E } }$ , the score for $p ( s , o )$ is computed as $\\phi _ { p } ( \\mathbf { e } _ { s } , \\mathbf { e } _ { o } )$ , where $\\mathbf { e } _ { s } , \\mathbf { e } _ { o } \\in \\mathbb { R } ^ { k }$ are the embedding vectors of $s$ and $o$ , and $\\phi _ { p } : \\mathbb { R } ^ { k } \\times \\mathbb { R } ^ { k } \\mapsto [ 0 , 1 ]$ is a scoring function computing the likelihood that entities $s$ and $o$ are related by the relationship $p$ . ",
340
+ "bbox": [
341
+ 173,
342
+ 717,
343
+ 825,
344
+ 803
345
+ ],
346
+ "page_idx": 2
347
+ },
348
+ {
349
+ "type": "text",
350
+ "text": "In our experiments, as neural link predictor, we use ComplEx (Trouillon et al., 2016) regularised using a variational approximation of the tensor nuclear $p$ -norm proposed by Lacroix et al. (2018). ",
351
+ "bbox": [
352
+ 174,
353
+ 809,
354
+ 821,
355
+ 838
356
+ ],
357
+ "page_idx": 2
358
+ },
359
+ {
360
+ "type": "text",
361
+ "text": "T-Norms A t-norm $\\top : [ 0 , 1 ] \\times [ 0 , 1 ] \\mapsto [ 0 , 1 ]$ is a generalisation of conjunction in logic (Klement et al., 2000; 2004). Some examples include the Godel¨ $t$ -norm $\\top _ { \\mathrm { m i n } } ( x , y ) \\stackrel { - } { = } \\operatorname* { m i n } \\{ x , y \\}$ , the product $t \\cdot$ - norm ${ \\top } _ { \\mathrm { p r o d } } ( x , y ) = x \\cdot y$ , and the Łukasiewicz $t$ -norm $\\top _ { \\mathrm { L u k } } ( x , y ) = \\operatorname* { m a x } \\{ 0 , x + y - 1 \\}$ . Analogously, $t$ -conorms are dual to t-norms for disjunctions – given a t-norm $\\top$ , the complementary t-conorm is defined by $\\perp ( x , y ) = 1 - \\top ( 1 - x , \\bar { 1 } - y )$ . ",
362
+ "bbox": [
363
+ 174,
364
+ 853,
365
+ 823,
366
+ 924
367
+ ],
368
+ "page_idx": 2
369
+ },
370
+ {
371
+ "type": "text",
372
+ "text": "Continuous Reformulation of Complex Queries Let $\\mathcal { Q }$ denote the following DNF query: ",
373
+ "text_level": 1,
374
+ "bbox": [
375
+ 169,
376
+ 102,
377
+ 782,
378
+ 119
379
+ ],
380
+ "page_idx": 3
381
+ },
382
+ {
383
+ "type": "equation",
384
+ "img_path": "images/00cf1134d9512f500900c412176ca376160c762a5904de05c3a75b323a483277.jpg",
385
+ "text": "$$\n\\begin{array} { r l } { \\mathcal { Q } [ A ] \\triangleq ? A : } & { \\exists V _ { 1 } , \\dotsc , V _ { m } . \\left( e _ { 1 } ^ { 1 } \\wedge \\dotsc \\wedge e _ { n _ { 1 } } ^ { 1 } \\right) \\vee \\dotsc \\vee \\left( e _ { 1 } ^ { d } \\wedge \\dotsc \\wedge e _ { n _ { d } } ^ { d } \\right) } \\\\ { \\mathrm { w h e r e } } & { e _ { i } ^ { j } = p ( c , V ) , \\mathrm { w i t h } V \\in \\{ A , V _ { 1 } , \\dotsc , V _ { m } \\} , c \\in \\mathcal { E } , p \\in \\mathcal { R } } \\\\ { \\mathrm { o r } } & { e _ { i } ^ { j } = p ( V , V ^ { \\prime } ) , \\mathrm { w i t h } V , V ^ { \\prime } \\in \\{ A , V _ { 1 } , \\dotsc , V _ { m } \\} , V \\neq V ^ { \\prime } , p \\in \\mathcal { R } } \\end{array}\n$$",
386
+ "text_format": "latex",
387
+ "bbox": [
388
+ 238,
389
+ 122,
390
+ 751,
391
+ 186
392
+ ],
393
+ "page_idx": 3
394
+ },
395
+ {
396
+ "type": "text",
397
+ "text": "We want to know the variable assignments that render $\\mathcal { Q }$ true. To achieve this. we can cast this as an optimisation problem, where the aim is finding a mapping from variables to entities that maximises the score of $\\mathcal { Q }$ : ",
398
+ "bbox": [
399
+ 174,
400
+ 188,
401
+ 825,
402
+ 231
403
+ ],
404
+ "page_idx": 3
405
+ },
406
+ {
407
+ "type": "equation",
408
+ "img_path": "images/b3817034e531df0e6d4b4af773c607ab36e815e00a8ddf9750863a3f8ef74cdc.jpg",
409
+ "text": "$$\n\\begin{array} { r l } & { \\underset { A , V _ { 1 } , \\ldots , V _ { m } \\in \\mathcal { E } } { \\arg \\operatorname* { m a x } } \\left( e _ { 1 } ^ { 1 } \\top \\ldots \\top e _ { n _ { 1 } } ^ { 1 } \\right) \\ : \\perp \\ldots \\ : \\perp \\ : \\left( e _ { 1 } ^ { d } \\top \\ldots \\top e _ { n _ { d } } ^ { d } \\right) } \\\\ & { \\quad \\quad \\quad \\mathrm { w h e r e } \\quad e _ { i } ^ { j } = \\phi _ { p } ( \\mathbf { e } _ { c } , \\mathbf { e } _ { V } ) , \\ : \\mathrm { w i t h } \\ : V \\in \\{ A , V _ { 1 } , \\ldots , V _ { m } \\} , c \\in \\mathcal { E } , p \\in \\mathcal { R } } \\\\ & { \\quad \\quad \\quad \\mathrm { o r } \\quad e _ { i } ^ { j } = \\phi _ { p } ( \\mathbf { e } _ { V } , \\mathbf { e } _ { V ^ { \\prime } } ) , \\ : \\mathrm { w i t h } \\ : V , V ^ { \\prime } \\in \\{ A , V _ { 1 } , \\ldots , V _ { m } \\} , V \\neq V ^ { \\prime } , p } \\end{array}\n$$",
410
+ "text_format": "latex",
411
+ "bbox": [
412
+ 233,
413
+ 232,
414
+ 727,
415
+ 305
416
+ ],
417
+ "page_idx": 3
418
+ },
419
+ {
420
+ "type": "text",
421
+ "text": "where $\\top$ and $\\perp$ denote a t-norm and a t-conorm – a continuous generalisation of the logical conjunction and disjunction, respectively – and $\\phi _ { p } ( \\mathbf { e } _ { s } , \\mathbf { e } _ { o } ) \\in [ 0 , 1 ]$ denotes the neural link prediction score for the atom $p ( s , o )$ . We write t-norms and t-conorms as infix operators since they are both associative. ",
422
+ "bbox": [
423
+ 178,
424
+ 309,
425
+ 821,
426
+ 364
427
+ ],
428
+ "page_idx": 3
429
+ },
430
+ {
431
+ "type": "text",
432
+ "text": "Note that, in Eq. (3), the bound variable nodes $V _ { 1 } , \\ldots , V _ { m }$ are only used through their embedding vector: to compute $\\phi _ { p } ( \\mathbf { e } _ { c } , \\mathbf { e } _ { V } )$ we only use the embedding representation $\\mathbf { e } _ { V } \\in \\mathbb { R } ^ { k }$ of $V$ , and do not need to know which entity the variable $V$ corresponds to. This means that we have two possible strategies for finding the optimal variable embeddings $\\mathbf { e } _ { V } \\in \\mathbb { R } ^ { k }$ with $V \\in \\{ A , V _ { 1 } , \\ldots , V _ { m } \\}$ for maximising the objective in Eq. (3), namely continuous optimisation, where we optimise $\\mathbf { e } _ { V }$ using gradient-based optimisation, and combinatorial optimisation, where we search for the optimal variable-to-entity assignment. ",
433
+ "bbox": [
434
+ 173,
435
+ 371,
436
+ 825,
437
+ 469
438
+ ],
439
+ "page_idx": 3
440
+ },
441
+ {
442
+ "type": "text",
443
+ "text": "3.1 COMPLEX QUERY ANSWERING VIA CONTINUOUS OPTIMISATION ",
444
+ "text_level": 1,
445
+ "bbox": [
446
+ 174,
447
+ 484,
448
+ 666,
449
+ 500
450
+ ],
451
+ "page_idx": 3
452
+ },
453
+ {
454
+ "type": "text",
455
+ "text": "One way we can solve the optimisation problem in Eq. (3) is by finding the variable embeddings that maximise the score of a complex query. This can be formalised as the following continuous optimisation problem: ",
456
+ "bbox": [
457
+ 176,
458
+ 511,
459
+ 825,
460
+ 554
461
+ ],
462
+ "page_idx": 3
463
+ },
464
+ {
465
+ "type": "equation",
466
+ "img_path": "images/5d218399c6628a82b237ae9230b4fd0ea8973ce7c60f73458fe9dacb85ee29c0.jpg",
467
+ "text": "$$\n\\begin{array} { r l } { \\underset { \\mathbf { e } _ { A } , \\mathbf { e } _ { V _ { 1 } } , \\dots , \\mathbf { e } _ { V _ { m } } \\in \\mathbb { R } ^ { k } } { \\arg \\operatorname* { m a x } } } & { \\big ( e _ { 1 } ^ { 1 } \\top \\ \\dots \\ \\top \\ e _ { n _ { 1 } } ^ { 1 } \\big ) \\ \\perp \\dots \\perp \\ \\big ( e _ { 1 } ^ { d } \\top \\ \\dots \\ \\top e _ { n _ { d } } ^ { d } \\big ) } \\\\ { \\mathrm { w h e r e } } & { e _ { i } ^ { j } = \\phi _ { p } ( \\mathbf { e } _ { c } , \\mathbf { e } _ { V } ) , \\ \\mathrm { w i t h } \\ V \\in \\{ A , V _ { 1 } , \\dots , V _ { m } \\} , c \\in \\mathcal { E } , p \\in \\mathcal { R } } \\\\ { \\mathrm { o r } } & { e _ { i } ^ { j } = \\phi _ { p } ( \\mathbf { e } _ { V } , \\mathbf { e } _ { V ^ { \\prime } } ) , \\ \\mathrm { w i t h } \\ V , V ^ { \\prime } \\in \\{ A , V _ { 1 } , \\dots , V _ { m } \\} , V \\neq V ^ { \\prime } , p \\in \\mathcal { R } } \\end{array}\n$$",
468
+ "text_format": "latex",
469
+ "bbox": [
470
+ 220,
471
+ 556,
472
+ 767,
473
+ 632
474
+ ],
475
+ "page_idx": 3
476
+ },
477
+ {
478
+ "type": "text",
479
+ "text": "In Eq. (4) we directly optimise the embedding representations $\\mathbf { e } _ { A } , \\mathbf { e } _ { V _ { 1 } } , \\hdots , \\mathbf { e } _ { V _ { m } } \\in \\mathbb { R } ^ { k }$ of variables $A , V _ { 1 } , \\ldots , V _ { m }$ , rather than exploring the combinatorial space of variable-to-entity mappings. In this way, we can tackle the maximisation problem in Eq. (4) using gradient-based optimisation methods, such as Adam (Kingma & Ba, 2015). Then, after we identified the optimal representation for variables $A , V _ { 1 } , \\ldots , V _ { m }$ , we replace the query target embedding $\\mathbf { e } _ { A }$ with the embedding representations $\\mathbf { e } _ { c } \\in \\mathbb { R } ^ { k }$ of all entities $c \\in { \\mathcal { E } }$ , and use the resulting complex query score to compute the likelihood that such entities answer the query. ",
480
+ "bbox": [
481
+ 173,
482
+ 637,
483
+ 825,
484
+ 736
485
+ ],
486
+ "page_idx": 3
487
+ },
488
+ {
489
+ "type": "text",
490
+ "text": "3.2 COMPLEX QUERY ANSWERING VIA COMBINATORIAL OPTIMISATION ",
491
+ "text_level": 1,
492
+ "bbox": [
493
+ 176,
494
+ 751,
495
+ 692,
496
+ 766
497
+ ],
498
+ "page_idx": 3
499
+ },
500
+ {
501
+ "type": "text",
502
+ "text": "Another way we tackle the optimisation problem in Eq. (3) is by greedily searching for a set of variable substitutions $S = \\{ \\bar { A } a , V _ { 1 } v _ { 1 } , . . . , \\bar { V _ { m } } v _ { m } \\}$ , with $a , v _ { 1 } , \\ldots , v _ { m } \\in \\mathcal { E }$ , that maximises the complex query score, in a procedure akin to beam search. We do so by traversing the dependency graph of a query $\\mathcal { Q }$ and, whenever we find an atom in the form $p ( c , V )$ , where $p \\in \\mathcal R$ , $c$ is either an entity or a variable for which we already have a substitution, and $V$ is a variable for which we do not have a substitution yet, we replace $V$ with all entities in $\\mathcal { E }$ and retain the top- $k$ entities $t \\in { \\mathcal { E } }$ that maximise $\\phi _ { p } ( \\mathbf { e } _ { c } , \\mathbf { e } _ { t } )$ – i.e. the most likely entities to appear as a substitution of $V$ according to the neural link predictor. ",
503
+ "bbox": [
504
+ 174,
505
+ 776,
506
+ 825,
507
+ 888
508
+ ],
509
+ "page_idx": 3
510
+ },
511
+ {
512
+ "type": "text",
513
+ "text": "Our procedure is akin to beam search: as we traverse the dependency graph of a query, we keep a beam with the most promising variable-to-entity substitutions identified so far. ",
514
+ "bbox": [
515
+ 174,
516
+ 895,
517
+ 823,
518
+ 924
519
+ ],
520
+ "page_idx": 3
521
+ },
522
+ {
523
+ "type": "text",
524
+ "text": "Example 3.1 (Combinatorial Optimisation). Consider the query “Which drugs $D$ interact with proteins associated with disease $t ? ^ { \\prime \\prime }$ can be rewritten as: $? D : \\exists P .$ interact ${ \\mathrm { \\Omega } } _ { \\mathrm { { : } } } ( D , P ) \\land a s s o c ( P , t )$ . In order to answer this query via combinatorial optimisation, we first find the top- $k$ proteins $p$ that are most likely to substitute the variable $P$ in assoc $( P , t )$ . Then, we search for the top- $k$ drugs d that are most likely to substitute $D$ in interacts $( D , P )$ , ending up with at most $k ^ { 2 }$ candidate drugs. Finally, we rank the candidate drugs $d$ by using the query score produced by the t-norm. \u0004 ",
525
+ "bbox": [
526
+ 173,
527
+ 103,
528
+ 825,
529
+ 188
530
+ ],
531
+ "page_idx": 4
532
+ },
533
+ {
534
+ "type": "text",
535
+ "text": "Note that scoring all possible entities can be done efficiently and in a single step on a GPU by replacing $V$ with the entity embedding matrix. In our experiments we did not notice any computational bottlenecks due to the branching factors of longer queries. However, that could be handled by using alternate graph exploration strategies. ",
536
+ "bbox": [
537
+ 174,
538
+ 204,
539
+ 825,
540
+ 261
541
+ ],
542
+ "page_idx": 4
543
+ },
544
+ {
545
+ "type": "text",
546
+ "text": "4 RELATED WORK ",
547
+ "text_level": 1,
548
+ "bbox": [
549
+ 176,
550
+ 292,
551
+ 344,
552
+ 309
553
+ ],
554
+ "page_idx": 4
555
+ },
556
+ {
557
+ "type": "text",
558
+ "text": "This work is closely related to approaches for learning to traverse Knowledge Graphs (Guu et al., 2015; Das et al., 2017; 2018), and more recent works on answering conjunctive queries via blackbox neural models trained on generated queries (Hamilton et al., 2018; Daza & Cochez, 2020; Kotnis et al., 2020). The main difference is that we propose a tractable framework for handling a substantially larger subset of First-Order Logic queries. ",
559
+ "bbox": [
560
+ 174,
561
+ 332,
562
+ 823,
563
+ 401
564
+ ],
565
+ "page_idx": 4
566
+ },
567
+ {
568
+ "type": "text",
569
+ "text": "More recently, Ren et al. (2020) proposed Query2Box, a neural model for Existential Positive FirstOrder logical queries, where queries are represented via box embeddings (Li et al., 2019). Such approaches for query answering require a dataset with millions of generated queries to generalise well – for instance, on the FB15k-237 dataset, approx. $\\mathrm { 1 5 \\times 1 0 ^ { 4 } }$ training queries for each query type are used, resulting in approx. $1 . 2 \\times 1 0 ^ { 6 }$ training queries. Our framework, on the other hand, only uses a simple, state-of-the-art neural link predictor (Lacroix et al., 2018) trained on a set of 1-hop queries that is orders of magnitude smaller. ",
570
+ "bbox": [
571
+ 174,
572
+ 409,
573
+ 825,
574
+ 506
575
+ ],
576
+ "page_idx": 4
577
+ },
578
+ {
579
+ "type": "text",
580
+ "text": "There is a large body of work on neural link predictors, that learn embeddings of entities and relations in KGs via a simple link prediction training objective (Bordes et al., 2013; Yang et al., 2015; Trouillon et al., 2016; Lacroix et al., 2018). Due to their design, they are often evaluated for answering 1-hop queries only, as their application to more complex queries does not derive directly from their formulation. ",
581
+ "bbox": [
582
+ 174,
583
+ 513,
584
+ 823,
585
+ 582
586
+ ],
587
+ "page_idx": 4
588
+ },
589
+ {
590
+ "type": "text",
591
+ "text": "Previous work has considered using such embeddings for complex query answering, by partitioning the query graph and using an ad-hoc aggregation function to score candidate answers (Wang et al., 2018), or by using a probabilistic mixture model similar to DistMult (Friedman & den Broeck, 2020). In contrast, our proposed method answers a query by using a single pass where aggregation steps are implemented with t-norms and t-conorms, which are continuous relaxations of conjunctions and disjunctions. Such t-norms have been proposed as differentiable formulations of logical operators suitable for gradient-based learning (Serafini & d’Avila Garcez, 2016; Guo et al., 2016; Minervini et al., 2017; van Krieken et al., 2020). ",
592
+ "bbox": [
593
+ 174,
594
+ 589,
595
+ 825,
596
+ 702
597
+ ],
598
+ "page_idx": 4
599
+ },
600
+ {
601
+ "type": "text",
602
+ "text": "Further alternatives for using embeddings from neural link predictors, such as combinatorial optimisation, have been ruled out as unfeasible (Hamilton et al., 2018; Daza & Cochez, 2020). We show that this approach can scale well by reducing the set of possible intermediate answers, while outperforming the state-of-the-art in query answering. ",
603
+ "bbox": [
604
+ 174,
605
+ 708,
606
+ 825,
607
+ 763
608
+ ],
609
+ "page_idx": 4
610
+ },
611
+ {
612
+ "type": "text",
613
+ "text": "The framework proposed in this paper is related to neural theorem provers (Rocktaschel & Riedel, ¨ 2017; Weber et al., 2019; Minervini et al., 2020a;b), a differentiable relaxation of the backwardchaining reasoning algorithm where comparison between symbols is replaced by a differentiable similarity function between their embedding vectors. During the reasoning process, neural theorem provers check which rules can be used for proving a given atomic query. Then it is checked whether the premise of such rules is satisfied, where the premise is a conjunctive query. The procedure they use for answering conjunctions is akin to the combinatorial optimisation procedure we propose in Section 3.2. The main source of difference is how atomic queries are answered – we use the ComplEx neural link predictor (Trouillon et al., 2016), while neural theorem provers use the maximum similarity value between a given atomic query and all facts in the Knowledge Graph, which has linear complexity in the number of triples in the graph. ",
614
+ "bbox": [
615
+ 174,
616
+ 770,
617
+ 825,
618
+ 924
619
+ ],
620
+ "page_idx": 4
621
+ },
622
+ {
623
+ "type": "image",
624
+ "img_path": "images/7b7480337d38396113af14682552c046b2f84598cd9bc7673d17f247dd6df24e.jpg",
625
+ "image_caption": [
626
+ "Figure 2: Query structures considered in our experiments, as proposed by Ren et al. (2020) – the naming of each query structure corresponds to projection $\\mathbf { \\eta } ( \\mathbf { p } )$ , intersection (i), and union (u), and reflects how they were implemented in the Query2Box model (Ren et al., 2020). An example of a pi query is $? T : \\exists V . p ( a , V ) , q ( V , T ) , r ( b , T )$ , where $a$ and $b$ are anchor nodes, $V$ is a variable node, and $T$ is the query target node. "
627
+ ],
628
+ "image_footnote": [],
629
+ "bbox": [
630
+ 192,
631
+ 94,
632
+ 789,
633
+ 184
634
+ ],
635
+ "page_idx": 5
636
+ },
637
+ {
638
+ "type": "table",
639
+ "img_path": "images/18786752ab2b473727914e09e371b142712b177b9a77a5209e1cf7be2cd5366b.jpg",
640
+ "table_caption": [
641
+ "Table 1: Number of queries in the datasets used for evaluation of query answering performance. Others indicates the number of queries for each of the remaining types. "
642
+ ],
643
+ "table_footnote": [],
644
+ "table_body": "<table><tr><td></td><td colspan=\"2\">Training</td><td colspan=\"2\">Validation</td><td colspan=\"2\">Test</td></tr><tr><td>Dataset</td><td>1p</td><td>Others</td><td>1p</td><td>Others</td><td>1p</td><td>Others</td></tr><tr><td>FB15k</td><td>273,710</td><td>273,710</td><td>59,097</td><td>8,000</td><td>67,016</td><td>8,000</td></tr><tr><td>FB15k-237</td><td>149,689</td><td>149,689</td><td>20,101</td><td>5,000</td><td>22,812</td><td>5,000</td></tr><tr><td>NELL995</td><td>107,982</td><td>107,982</td><td>16,927</td><td>4,000</td><td>17,034</td><td>4,000</td></tr></table>",
645
+ "bbox": [
646
+ 245,
647
+ 333,
648
+ 753,
649
+ 420
650
+ ],
651
+ "page_idx": 5
652
+ },
653
+ {
654
+ "type": "text",
655
+ "text": "5 EXPERIMENTS ",
656
+ "text_level": 1,
657
+ "bbox": [
658
+ 174,
659
+ 444,
660
+ 326,
661
+ 460
662
+ ],
663
+ "page_idx": 5
664
+ },
665
+ {
666
+ "type": "text",
667
+ "text": "We described a method to answer a query by decomposing it into a continuous formulation, which we refer to as Continuous Query Decomposition (CQD). In this section we demonstrate the effectiveness of CQD on the task of answering complex queries that cannot be answered using the incomplete KG, and report experimental results for continuous optimisation (CQD-CO, Section 3.1) and beam search (CQD-Beam, Section 3.2). We also provide a qualitative analysis of how our method can be used to obtain explanations for a given complex query answer. For the sake of comparison, we use the same datasets and evaluation metrics as Ren et al. (2020). ",
668
+ "bbox": [
669
+ 173,
670
+ 477,
671
+ 825,
672
+ 574
673
+ ],
674
+ "page_idx": 5
675
+ },
676
+ {
677
+ "type": "text",
678
+ "text": "5.1 DATASETS ",
679
+ "text_level": 1,
680
+ "bbox": [
681
+ 174,
682
+ 593,
683
+ 287,
684
+ 608
685
+ ],
686
+ "page_idx": 5
687
+ },
688
+ {
689
+ "type": "text",
690
+ "text": "Following Ren et al. (2020), we evaluate our approach on FB15k (Bordes et al., 2013) and FB15k-237 (Toutanova & Chen, 2015) – two subset of the Freebase knowledge graph – and NELL995 (Xiong et al., 2017), a KG generated by the NELL system (Mitchell et al., 2015). In order to compare with previous work on query answering, we use the queries generated by Ren et al. (2020) from these datasets. Dataset statistics are detailed in Table 1. We consider a total of 9 query types, including atomic queries, and 2 query types that contain disjunctions – the different query types are shown in Fig. 2. Note that in our framework, the neural link predictor is only trained on atomic queries, while the evaluation is carried out on the complete set of query types in Fig. 2. ",
691
+ "bbox": [
692
+ 173,
693
+ 619,
694
+ 825,
695
+ 732
696
+ ],
697
+ "page_idx": 5
698
+ },
699
+ {
700
+ "type": "text",
701
+ "text": "Note that each query in Table 1 can have multiple answers, therefore the total number of training instances can be higher. For atomic queries (of type 1p), this number is equal to the number of edges in the training graph. Other methods like GQE (Hamilton et al., 2018) and Q2B (Ren et al., 2020) require a dataset with more query types. As an example, the FB15k dataset contains approximately $9 6 0 \\mathrm { k }$ instances for 1p queries. When adding 2p, 3p, 2i, and 3i queries employed by GQE and Q2B during training, this number increases to 65 million instances. ",
702
+ "bbox": [
703
+ 174,
704
+ 738,
705
+ 825,
706
+ 821
707
+ ],
708
+ "page_idx": 5
709
+ },
710
+ {
711
+ "type": "text",
712
+ "text": "5.2 MODEL DETAILS ",
713
+ "text_level": 1,
714
+ "bbox": [
715
+ 176,
716
+ 840,
717
+ 330,
718
+ 854
719
+ ],
720
+ "page_idx": 5
721
+ },
722
+ {
723
+ "type": "text",
724
+ "text": "To obtain embeddings for the query answering task, we use ComplEx (Trouillon et al., 2016) a variational approximation of the nuclear tensor $p$ -norm for regularisation (Lacroix et al., 2018). We fix a learning rate of 0.1 and use the Adagrad optimiser. We then tune the hyperparameters of ComplEx on the validation set for each dataset, via grid search. We consider ranks (size of the embedding) in $\\{ 1 0 0 , 2 0 0 , 5 0 0 , 1 0 0 0 \\}$ , batch size in $\\{ 1 0 0 , 5 0 0 , 1 0 0 0 \\}$ , and regularisation coefficients in the interval $\\left[ 1 0 ^ { - 4 } , 0 . 5 \\right]$ . ",
725
+ "bbox": [
726
+ 174,
727
+ 867,
728
+ 825,
729
+ 924
730
+ ],
731
+ "page_idx": 5
732
+ },
733
+ {
734
+ "type": "table",
735
+ "img_path": "images/bc8450647c46dc48957ab4f623f0de2a669b82a076a7b8999c26294a239701b5.jpg",
736
+ "table_caption": [
737
+ "Table 2: Complex query answering results $( \\mathrm { H } @ 3 )$ across all query types; results for Graph Query Embedding (GQE, Hamilton et al., 2018) and Query2Box (Ren et al., 2020) are from Ren et al. (2020). "
738
+ ],
739
+ "table_footnote": [],
740
+ "table_body": "<table><tr><td>Method</td><td>Avg</td><td>1p</td><td>2p</td><td>3p</td><td>2i</td><td>3i</td><td>ip</td><td>pi</td><td>2u</td><td>up</td></tr><tr><td colspan=\"10\">FB15k</td></tr><tr><td>GQE</td><td>0.384</td><td>0.630</td><td>0.346</td><td>0.250</td><td>0.515</td><td>0.611</td><td>0.153</td><td>0.320</td><td>0.362</td><td>0.271</td></tr><tr><td>Query2BoX</td><td>0.484</td><td>0.786</td><td>0.413</td><td>0.303</td><td>0.593</td><td>0.712</td><td>0.211</td><td>0.397</td><td>0.608</td><td>0.330</td></tr><tr><td>CQD-CO</td><td>0.576</td><td>0.918</td><td>0.454</td><td>0.191</td><td>0.796</td><td>0.837</td><td>0.336</td><td>0.513</td><td>0.816</td><td>0.319</td></tr><tr><td>CQD-Beam</td><td>0.680</td><td>0.918</td><td>0.779</td><td>0.577</td><td>0.796</td><td>0.837</td><td>0.375</td><td>0.658</td><td>0.839</td><td>0.345</td></tr><tr><td colspan=\"10\">FB15k-237</td></tr><tr><td>GQE</td><td>0.230</td><td>0.405</td><td>0.213</td><td>0.153</td><td>0.298</td><td>0.411</td><td>0.085</td><td>0.182</td><td>0.167</td><td>0.160</td></tr><tr><td>Query2Box</td><td>0.268</td><td>0.467</td><td>0.240</td><td>0.186</td><td>0.324</td><td>0.453</td><td>0.108</td><td>0.205</td><td>0.239</td><td>0.193</td></tr><tr><td>CQD-C0</td><td>0.272</td><td>0.512</td><td>0.213</td><td>0.131</td><td>0.352</td><td>0.457</td><td>0.146</td><td>0.222</td><td>0.281</td><td>0.132</td></tr><tr><td>CQD-Beam</td><td>0.290</td><td>0.512</td><td>0.288</td><td>0.221</td><td>0.352</td><td>0.457</td><td>0.129</td><td>0.249</td><td>0.284</td><td>0.121</td></tr><tr><td colspan=\"10\">NELL995</td></tr><tr><td>GQE</td><td>0.248</td><td>0.417</td><td>0.231</td><td>0.203</td><td>0.318</td><td>0.454</td><td>0.081</td><td>0.188</td><td>0.200</td><td>0.139</td></tr><tr><td>Query2BoX</td><td>0.306</td><td>0.555</td><td>0.266</td><td>0.233</td><td>0.343</td><td>0.480</td><td>0.132</td><td>0.212</td><td>0.369</td><td>0.163</td></tr><tr><td>CQD-CO</td><td>0.368</td><td>0.667</td><td>0.265</td><td>0.220</td><td>0.410</td><td>0.529</td><td>0.196</td><td>0.302</td><td>0.531</td><td>0.194</td></tr><tr><td>CQD-Beam</td><td>0.375</td><td>0.667</td><td>0.350</td><td>0.288</td><td>0.410</td><td>0.529</td><td>0.171</td><td>0.277</td><td>0.531</td><td>0.156</td></tr></table>",
741
+ "bbox": [
742
+ 176,
743
+ 155,
744
+ 826,
745
+ 419
746
+ ],
747
+ "page_idx": 6
748
+ },
749
+ {
750
+ "type": "text",
751
+ "text": "",
752
+ "bbox": [
753
+ 176,
754
+ 446,
755
+ 823,
756
+ 478
757
+ ],
758
+ "page_idx": 6
759
+ },
760
+ {
761
+ "type": "text",
762
+ "text": "For query answering we experimented with the Godel and product t-norms – we select the best ¨ t-norm for each query type according to the best validation accuracy. For CQD-CO, we optimise variable and target embeddings with Adam, using the same initialisation scheme as Lacroix et al. (2018), with an initial learning rate of 0.1 and a maximum of 1,000 iterations. In practice, we observed that the procedure usually converges in less than 300 iterations. For CQD-Beam, the beam size $k \\in \\{ 2 ^ { 2 } , 2 ^ { 3 } , \\ldots , 2 ^ { 8 } \\}$ is found on an held-out validation set. ",
763
+ "bbox": [
764
+ 174,
765
+ 483,
766
+ 825,
767
+ 568
768
+ ],
769
+ "page_idx": 6
770
+ },
771
+ {
772
+ "type": "text",
773
+ "text": "5.3 EVALUATION ",
774
+ "text_level": 1,
775
+ "bbox": [
776
+ 176,
777
+ 588,
778
+ 305,
779
+ 602
780
+ ],
781
+ "page_idx": 6
782
+ },
783
+ {
784
+ "type": "text",
785
+ "text": "As in Ren et al. (2020), for each test query, we assign a score to every entity in the graph, and use such score for ranking such entities. We then compute the Hits at 3 $( \\mathrm { H } @ 3 )$ metric, which measures the frequency with which the correct answer is contained in the top three answers in the ranking. Since a query can have multiple answers, we use the filtered setting (Bordes et al., 2013), where we filter out other correct answers from the ranking before calculating the $\\mathrm { H @ 3 }$ . ",
786
+ "bbox": [
787
+ 174,
788
+ 616,
789
+ 825,
790
+ 685
791
+ ],
792
+ "page_idx": 6
793
+ },
794
+ {
795
+ "type": "text",
796
+ "text": "As baselines we use two recent state-of-the-art models for complex query answering, namely Graph Query Embedding (GQE, Hamilton et al., 2018) and Query2Box (Q2B, Ren et al., 2020). ",
797
+ "bbox": [
798
+ 173,
799
+ 693,
800
+ 823,
801
+ 720
802
+ ],
803
+ "page_idx": 6
804
+ },
805
+ {
806
+ "type": "text",
807
+ "text": "5.4 RESULTS ",
808
+ "text_level": 1,
809
+ "bbox": [
810
+ 174,
811
+ 742,
812
+ 277,
813
+ 756
814
+ ],
815
+ "page_idx": 6
816
+ },
817
+ {
818
+ "type": "text",
819
+ "text": "We detail the results of $\\mathrm { H @ 3 }$ for all different query types in Table 2. We observe that, on average, CQD produces more accurate results than GQE and Q2B, while using orders of magnitude less training data. In particular, combinatorial optimisation in CQD-Beam consistently outperforms the baselines across all datasets. ",
820
+ "bbox": [
821
+ 174,
822
+ 768,
823
+ 825,
824
+ 825
825
+ ],
826
+ "page_idx": 6
827
+ },
828
+ {
829
+ "type": "text",
830
+ "text": "The results for chained queries $2 p$ and $3 p$ ) show that CQD-Beam is effective, even when increasing the length of the chain. The most difficult case corresponds to $3 \\mathrm { p }$ queries, where the number of candidate variable substitutions increases due to the branching factor of the search procedure. ",
831
+ "bbox": [
832
+ 174,
833
+ 832,
834
+ 825,
835
+ 875
836
+ ],
837
+ "page_idx": 6
838
+ },
839
+ {
840
+ "type": "text",
841
+ "text": "We also note that having more variables does not always translate into worse performance for CQDCO: it yields the best ranking scores for ip queries on FB15k-237, and for $i p$ and $p i$ queries for NELL995, and both such query types contain two variables. ",
842
+ "bbox": [
843
+ 176,
844
+ 882,
845
+ 823,
846
+ 924
847
+ ],
848
+ "page_idx": 6
849
+ },
850
+ {
851
+ "type": "image",
852
+ "img_path": "images/d9eef854286cb3b625e0514687471db3e84d80db55da31807ad440401a387cea.jpg",
853
+ "image_caption": [
854
+ "Figure 3: Intermediate variable assignments and ranks for two example queries, obtained with CQDBeam. Correctness indicates whether the answer belongs to the ground-truth set of answers. "
855
+ ],
856
+ "image_footnote": [],
857
+ "bbox": [
858
+ 194,
859
+ 106,
860
+ 478,
861
+ 364
862
+ ],
863
+ "page_idx": 7
864
+ },
865
+ {
866
+ "type": "table",
867
+ "img_path": "images/a73872f0ca1364b272564a06512301a86f357c267da9eda43c2eea9719fc21e4.jpg",
868
+ "table_caption": [],
869
+ "table_footnote": [],
870
+ "table_body": "<table><tr><td colspan=\"4\">Query:?G :EM.perform(ML,M) ^ genre(M,G)</td></tr><tr><td>M</td><td>G</td><td>Rank</td><td>Correctness</td></tr><tr><td rowspan=\"3\">Do the Right Thing</td><td>Drama</td><td>1</td><td>&lt;&lt;√</td></tr><tr><td>Comedy</td><td>4</td><td></td></tr><tr><td>Crime Fiction</td><td>7</td><td></td></tr><tr><td rowspan=\"3\">National Security</td><td>Action</td><td>2</td><td>关</td></tr><tr><td>Thriller</td><td>3</td><td></td></tr><tr><td>Crime Fiction</td><td>5</td><td>√</td></tr><tr><td rowspan=\"3\">The Nutty Professor</td><td>Comedy</td><td>6</td><td>√</td></tr><tr><td>Romantic Com.</td><td>8</td><td>X</td></tr><tr><td>Romance Film</td><td>9</td><td>X</td></tr><tr><td colspan=\"4\">Query:?O :C.nationality(TA,C) ^ memberOf(C,O)</td></tr><tr><td>C</td><td>0</td><td>Rank</td><td>Correctness</td></tr><tr><td rowspan=\"3\">United States</td><td>NATO</td><td>1</td><td></td></tr><tr><td>OECD</td><td>2</td><td></td></tr><tr><td>EU</td><td>9</td><td>√</td></tr><tr><td rowspan=\"3\">United Kingdom</td><td>NATO</td><td>3</td><td></td></tr><tr><td>OECD</td><td>4</td><td>·</td></tr><tr><td>EU</td><td>5</td><td>√</td></tr><tr><td rowspan=\"3\">Germany</td><td>OECD</td><td>6</td><td>√</td></tr><tr><td>EU</td><td>7</td><td>√</td></tr><tr><td>WTO</td><td>8</td><td>√</td></tr></table>",
871
+ "bbox": [
872
+ 501,
873
+ 102,
874
+ 820,
875
+ 371
876
+ ],
877
+ "page_idx": 7
878
+ },
879
+ {
880
+ "type": "text",
881
+ "text": "The results presented in Table 2 were obtained with a rank of 1,000, as they produced the best performance in the validation set. We present results for other values of the rank in Appendix A, where we observe that even with a rank of 100, CQD still outperforms baselines with a larger embedding size. Furthermore, in Appendix B, we report the number of seconds required to answer each query type, showing that CQD-Beam requires less than $5 0 \\mathrm { m s }$ for all considered queries. ",
882
+ "bbox": [
883
+ 174,
884
+ 438,
885
+ 823,
886
+ 508
887
+ ],
888
+ "page_idx": 7
889
+ },
890
+ {
891
+ "type": "text",
892
+ "text": "We also experimented with a variant of CQD-Beam that uses DistMult (Yang et al., 2015) as the link predictor – results are reported in Appendix C. As expected, results when using DistMult are slightly less accurate than when using ComplEx, while still being more accurate than those produced by GQE and Q2B. ",
893
+ "bbox": [
894
+ 174,
895
+ 515,
896
+ 825,
897
+ 571
898
+ ],
899
+ "page_idx": 7
900
+ },
901
+ {
902
+ "type": "text",
903
+ "text": "5.5 EXPLAINING ANSWERS TO COMPLEX QUERIES",
904
+ "text_level": 1,
905
+ "bbox": [
906
+ 174,
907
+ 590,
908
+ 542,
909
+ 604
910
+ ],
911
+ "page_idx": 7
912
+ },
913
+ {
914
+ "type": "text",
915
+ "text": "A useful property of our framework is its transparency when computing scores for distinct atoms in a query. Unlike GQE and Q2B – two neural models that encode a query into a vector via a set of non-linear transformations – our framework is able to produce an explanation for a given answer in terms of intermediate variable assignments. ",
916
+ "bbox": [
917
+ 174,
918
+ 617,
919
+ 825,
920
+ 672
921
+ ],
922
+ "page_idx": 7
923
+ },
924
+ {
925
+ "type": "text",
926
+ "text": "Consider the following test query from the FB15k-237 knowledge graph: “In what genres of movies did Martin Lawrence appear?” This query can be formalised as $? G : \\exists M$ .perform $( \\mathbf { M } \\mathbf { L } , M ) \\wedge$ genre $( M , G )$ , where ML is an anchor node representing Martin Lawrence. The ground truth answers to this query are 7 genres, including Drama, Comedy, and Crime Fiction. In Fig. 3 we show the intermediate assignments obtained when using CQD-Beam, to the variable $M$ in the query, and the rank for each combination of movie $M$ and genre $G$ . We note that the assignments to the variable $M$ are correct, as these are movies where Martin Lawrence appeared. Furthermore, these intermediate assignments lead to correct answers in the first seven positions of the ranking, which correctly belong to the ground-truth set of answers. ",
927
+ "bbox": [
928
+ 174,
929
+ 680,
930
+ 825,
931
+ 805
932
+ ],
933
+ "page_idx": 7
934
+ },
935
+ {
936
+ "type": "text",
937
+ "text": "In a second example, consider the following query: “What international organisations contain the country of nationality of Thomas Aquinas?” Its conjunctive form is $? O : \\exists C$ .nationality $( \\mathrm { T A } , C ) \\wedge$ memberOf $( C , O )$ , where TA is an anchor node representing Thomas Aquinas. The ground-truth answers to this query are the Organisation for Economic Co-operation and Development (OECD), the European Union (EU), the North Atlantic Treaty Organisation (NATO), and the World Trade Organisation (WTO). As shown in Fig. 3, CQD-Beam yields the correct answers in the first four positions in the rank. However, by inspecting the intermediate assignments, we note that such correct answers are produced by an incorrect (although related) intermediate assignment, since the country of nationality of Thomas Aquinas is Italy. By inspecting these decisions we can thus identify failure modes of our framework, even when it produces seemingly correct answers. This is in contrast with other neural black-box models for complex query answering outlined in Section 4, where such an analysis is not possible. ",
938
+ "bbox": [
939
+ 174,
940
+ 811,
941
+ 825,
942
+ 924
943
+ ],
944
+ "page_idx": 7
945
+ },
946
+ {
947
+ "type": "text",
948
+ "text": "",
949
+ "bbox": [
950
+ 174,
951
+ 103,
952
+ 823,
953
+ 159
954
+ ],
955
+ "page_idx": 8
956
+ },
957
+ {
958
+ "type": "text",
959
+ "text": "6 CONCLUSIONS ",
960
+ "text_level": 1,
961
+ "bbox": [
962
+ 176,
963
+ 180,
964
+ 328,
965
+ 195
966
+ ],
967
+ "page_idx": 8
968
+ },
969
+ {
970
+ "type": "text",
971
+ "text": "We proposed a framework — Complex Query Decomposition (CQD) — for answering Existential Positive First-Order logical queries by reasoning over sets of entities in embedding space. In our framework, answering a complex query is reduced to answering each of its sub-queries, and aggregating the resulting scores via t-norms. The benefit of the method is that we only need to train a neural link prediction model on atomic queries to use our framework for answering a given complex query, without the need of training on millions of generated complex queries. This comes with the added value that we are able to explain each step of the query answering process regardless of query complexity, instead of using a black-box neural query embedding model. ",
972
+ "bbox": [
973
+ 174,
974
+ 210,
975
+ 825,
976
+ 323
977
+ ],
978
+ "page_idx": 8
979
+ },
980
+ {
981
+ "type": "text",
982
+ "text": "The proposed method is agnostic to the type of query, and is able to generalise without explicitly training on a specific variety of queries. Experimental results show that CQD produces significantly more accurate results than current state-of-the-art complex query answering methods on incomplete Knowledge Graphs. ",
983
+ "bbox": [
984
+ 176,
985
+ 329,
986
+ 823,
987
+ 386
988
+ ],
989
+ "page_idx": 8
990
+ },
991
+ {
992
+ "type": "text",
993
+ "text": "ACKNOWLEDGEMENTS ",
994
+ "text_level": 1,
995
+ "bbox": [
996
+ 176,
997
+ 402,
998
+ 334,
999
+ 415
1000
+ ],
1001
+ "page_idx": 8
1002
+ },
1003
+ {
1004
+ "type": "text",
1005
+ "text": "This research was supported by the European Union’s Horizon 2020 research and innovation programme under grant agreement no. 875160. This project was partially funded by Elsevier’s Discovery Lab. Finally, we thank NVIDIA for GPU donations. ",
1006
+ "bbox": [
1007
+ 176,
1008
+ 425,
1009
+ 825,
1010
+ 467
1011
+ ],
1012
+ "page_idx": 8
1013
+ },
1014
+ {
1015
+ "type": "text",
1016
+ "text": "REFERENCES ",
1017
+ "text_level": 1,
1018
+ "bbox": [
1019
+ 174,
1020
+ 488,
1021
+ 285,
1022
+ 503
1023
+ ],
1024
+ "page_idx": 8
1025
+ },
1026
+ {
1027
+ "type": "text",
1028
+ "text": "Soren Auer, Christian Bizer, Georgi Kobilarov, Jens Lehmann, Richard Cyganiak, and Zachary G.¨ Ives. DBpedia: A nucleus for a web of open data. In ISWC/ASWC, volume 4825 of Lecture Notes in Computer Science, pp. 722–735. Springer, 2007. ",
1029
+ "bbox": [
1030
+ 174,
1031
+ 511,
1032
+ 825,
1033
+ 554
1034
+ ],
1035
+ "page_idx": 8
1036
+ },
1037
+ {
1038
+ "type": "text",
1039
+ "text": "Antoine Bordes, Nicolas Usunier, Alberto Garc´ıa-Duran, Jason Weston, and Oksana Yakhnenko. ´ Translating embeddings for modeling multi-relational data. In NIPS, pp. 2787–2795, 2013. ",
1040
+ "bbox": [
1041
+ 173,
1042
+ 563,
1043
+ 821,
1044
+ 592
1045
+ ],
1046
+ "page_idx": 8
1047
+ },
1048
+ {
1049
+ "type": "text",
1050
+ "text": "Nilesh N. Dalvi and Dan Suciu. Efficient query evaluation on probabilistic databases. In VLDB, pp. 864–875. Morgan Kaufmann, 2004. ",
1051
+ "bbox": [
1052
+ 173,
1053
+ 599,
1054
+ 821,
1055
+ 628
1056
+ ],
1057
+ "page_idx": 8
1058
+ },
1059
+ {
1060
+ "type": "text",
1061
+ "text": "Rajarshi Das, Arvind Neelakantan, David Belanger, and Andrew McCallum. Chains of reasoning over entities, relations, and text using recurrent neural networks. In EACL (1), pp. 132–141. Association for Computational Linguistics, 2017. ",
1062
+ "bbox": [
1063
+ 173,
1064
+ 637,
1065
+ 823,
1066
+ 680
1067
+ ],
1068
+ "page_idx": 8
1069
+ },
1070
+ {
1071
+ "type": "text",
1072
+ "text": "Rajarshi Das, Shehzaad Dhuliawala, Manzil Zaheer, Luke Vilnis, Ishan Durugkar, Akshay Krishnamurthy, Alex Smola, and Andrew McCallum. Go for a walk and arrive at the answer: Reasoning over paths in knowledge bases using reinforcement learning. In ICLR (Poster). OpenReview.net, 2018. ",
1073
+ "bbox": [
1074
+ 174,
1075
+ 689,
1076
+ 825,
1077
+ 744
1078
+ ],
1079
+ "page_idx": 8
1080
+ },
1081
+ {
1082
+ "type": "text",
1083
+ "text": "Brian A. Davey and Hilary A. Priestley. Introduction to Lattices and Order, Second Edition. Cambridge University Press, 2002. ",
1084
+ "bbox": [
1085
+ 168,
1086
+ 755,
1087
+ 823,
1088
+ 784
1089
+ ],
1090
+ "page_idx": 8
1091
+ },
1092
+ {
1093
+ "type": "text",
1094
+ "text": "Daniel Daza and Michael Cochez. Message passing query embedding. In ICML Workshop - Graph Representation Learning and Beyond, 2020. URL https://arxiv.org/abs/ 2002.02406. ",
1095
+ "bbox": [
1096
+ 173,
1097
+ 792,
1098
+ 823,
1099
+ 834
1100
+ ],
1101
+ "page_idx": 8
1102
+ },
1103
+ {
1104
+ "type": "text",
1105
+ "text": "Luc De Raedt. Logical and relational learning. Cognitive Technologies. Springer, 2008. ",
1106
+ "bbox": [
1107
+ 168,
1108
+ 843,
1109
+ 754,
1110
+ 859
1111
+ ],
1112
+ "page_idx": 8
1113
+ },
1114
+ {
1115
+ "type": "text",
1116
+ "text": "Michel Dumontier, Alison Callahan, Jose Cruz-Toledo, Peter Ansell, Vincent Emonet, Franc¸ois Belleau, and Arnaud Droit. Bio2RDF release 3: A larger, more connected network of linked data for the life sciences. In International Semantic Web Conference (Posters & Demos), volume 1272 of CEUR Workshop Proceedings, pp. 401–404. CEUR-WS.org, 2014. ",
1117
+ "bbox": [
1118
+ 174,
1119
+ 867,
1120
+ 825,
1121
+ 924
1122
+ ],
1123
+ "page_idx": 8
1124
+ },
1125
+ {
1126
+ "type": "text",
1127
+ "text": "Tal Friedman and Guy Van den Broeck. Symbolic querying of vector spaces: Probabilistic databases meets relational embeddings. In UAI, volume 124 of Proceedings of Machine Learning Research, pp. 1268–1277. AUAI Press, 2020. ",
1128
+ "bbox": [
1129
+ 176,
1130
+ 103,
1131
+ 821,
1132
+ 146
1133
+ ],
1134
+ "page_idx": 9
1135
+ },
1136
+ {
1137
+ "type": "text",
1138
+ "text": "Lise Getoor and Ben Taskar. Introduction to statistical relational learning. The MIT Press, 2007. ",
1139
+ "bbox": [
1140
+ 171,
1141
+ 154,
1142
+ 813,
1143
+ 170
1144
+ ],
1145
+ "page_idx": 9
1146
+ },
1147
+ {
1148
+ "type": "text",
1149
+ "text": "Shu Guo, Quan Wang, Lihong Wang, Bin Wang, and Li Guo. Jointly embedding knowledge graphs and logical rules. In EMNLP, pp. 192–202. The Association for Computational Linguistics, 2016. ",
1150
+ "bbox": [
1151
+ 171,
1152
+ 178,
1153
+ 821,
1154
+ 207
1155
+ ],
1156
+ "page_idx": 9
1157
+ },
1158
+ {
1159
+ "type": "text",
1160
+ "text": "Kelvin Guu, John Miller, and Percy Liang. Traversing knowledge graphs in vector space. In EMNLP, pp. 318–327. The Association for Computational Linguistics, 2015. ",
1161
+ "bbox": [
1162
+ 171,
1163
+ 214,
1164
+ 823,
1165
+ 243
1166
+ ],
1167
+ "page_idx": 9
1168
+ },
1169
+ {
1170
+ "type": "text",
1171
+ "text": "William L. Hamilton, Payal Bajaj, Marinka Zitnik, Dan Jurafsky, and Jure Leskovec. Embedding logical queries on knowledge graphs. In NeurIPS, pp. 2030–2041, 2018. ",
1172
+ "bbox": [
1173
+ 171,
1174
+ 251,
1175
+ 825,
1176
+ 281
1177
+ ],
1178
+ "page_idx": 9
1179
+ },
1180
+ {
1181
+ "type": "text",
1182
+ "text": "Daniel S. Himmelstein, Antoine Lizee, Christine Hessler, Leo Brueggeman, Sabrina L. Chen, Dexter Hadley, Ari Green, Pouya Khankhanian, and Sergio E. Baranzini. Systematic integration of biomedical knowledge prioritizes drugs for repurposing. bioRxiv, 2017. doi: 10.1101/087619. URL https://www.biorxiv.org/content/early/2017/08/31/087619. ",
1183
+ "bbox": [
1184
+ 173,
1185
+ 287,
1186
+ 825,
1187
+ 344
1188
+ ],
1189
+ "page_idx": 9
1190
+ },
1191
+ {
1192
+ "type": "text",
1193
+ "text": "Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR (Poster), 2015. ",
1194
+ "bbox": [
1195
+ 169,
1196
+ 353,
1197
+ 823,
1198
+ 382
1199
+ ],
1200
+ "page_idx": 9
1201
+ },
1202
+ {
1203
+ "type": "text",
1204
+ "text": "Erich-Peter Klement, Radko Mesiar, and Endre Pap. Triangular Norms, volume 8 of Trends in Logic. Springer, 2000. ",
1205
+ "bbox": [
1206
+ 173,
1207
+ 390,
1208
+ 823,
1209
+ 420
1210
+ ],
1211
+ "page_idx": 9
1212
+ },
1213
+ {
1214
+ "type": "text",
1215
+ "text": "Erich-Peter Klement, Radko Mesiar, and Endre Pap. Triangular norms. position paper I: basic analytical and algebraic properties. Fuzzy Sets Syst., 143(1):5–26, 2004. ",
1216
+ "bbox": [
1217
+ 171,
1218
+ 426,
1219
+ 823,
1220
+ 457
1221
+ ],
1222
+ "page_idx": 9
1223
+ },
1224
+ {
1225
+ "type": "text",
1226
+ "text": "Bhushan Kotnis, Carolin Lawrence, and Mathias Niepert. Answering complex queries in knowledge graphs with bidirectional sequence encoders. CoRR, abs/2004.02596, 2020. ",
1227
+ "bbox": [
1228
+ 171,
1229
+ 464,
1230
+ 823,
1231
+ 493
1232
+ ],
1233
+ "page_idx": 9
1234
+ },
1235
+ {
1236
+ "type": "text",
1237
+ "text": "Denis Krompaß, Maximilian Nickel, and Volker Tresp. Querying factorized probabilistic triple databases. In International Semantic Web Conference (2), volume 8797 of Lecture Notes in Computer Science, pp. 114–129. Springer, 2014. ",
1238
+ "bbox": [
1239
+ 178,
1240
+ 501,
1241
+ 821,
1242
+ 545
1243
+ ],
1244
+ "page_idx": 9
1245
+ },
1246
+ {
1247
+ "type": "text",
1248
+ "text": "Timothee Lacroix, Nicolas Usunier, and Guillaume Obozinski. Canonical tensor decomposition for ´ knowledge base completion. In ICML, volume 80 of Proceedings of Machine Learning Research, pp. 2869–2878. PMLR, 2018. ",
1249
+ "bbox": [
1250
+ 176,
1251
+ 551,
1252
+ 823,
1253
+ 594
1254
+ ],
1255
+ "page_idx": 9
1256
+ },
1257
+ {
1258
+ "type": "text",
1259
+ "text": "Xiang Li, Luke Vilnis, Dongxu Zhang, Michael Boratko, and Andrew McCallum. Smoothing the geometry of probabilistic box embeddings. In ICLR. OpenReview.net, 2019. ",
1260
+ "bbox": [
1261
+ 171,
1262
+ 603,
1263
+ 821,
1264
+ 632
1265
+ ],
1266
+ "page_idx": 9
1267
+ },
1268
+ {
1269
+ "type": "text",
1270
+ "text": "George A. Miller. WORDNET: a lexical database for english. In HLT. Morgan Kaufmann, 1992. ",
1271
+ "bbox": [
1272
+ 173,
1273
+ 640,
1274
+ 812,
1275
+ 656
1276
+ ],
1277
+ "page_idx": 9
1278
+ },
1279
+ {
1280
+ "type": "text",
1281
+ "text": "Pasquale Minervini, Thomas Demeester, Tim Rocktaschel, and Sebastian Riedel. Adversarial sets ¨ for regularising neural link predictors. In UAI. AUAI Press, 2017. ",
1282
+ "bbox": [
1283
+ 169,
1284
+ 664,
1285
+ 821,
1286
+ 693
1287
+ ],
1288
+ "page_idx": 9
1289
+ },
1290
+ {
1291
+ "type": "text",
1292
+ "text": "Pasquale Minervini, Matko Bosnjak, Tim Rocktaschel, Sebastian Riedel, and Edward Grefenstette. ¨ Differentiable reasoning on large knowledge bases and natural language. In AAAI, pp. 5182–5190. AAAI Press, 2020a. ",
1293
+ "bbox": [
1294
+ 173,
1295
+ 700,
1296
+ 823,
1297
+ 743
1298
+ ],
1299
+ "page_idx": 9
1300
+ },
1301
+ {
1302
+ "type": "text",
1303
+ "text": "Pasquale Minervini, Sebastian Riedel, Pontus Stenetorp, Edward Grefenstette, and Tim Rocktaschel. ¨ Learning reasoning strategies in end-to-end differentiable proving. In ICML, Proceedings of Machine Learning Research. PMLR, 2020b. ",
1304
+ "bbox": [
1305
+ 174,
1306
+ 752,
1307
+ 823,
1308
+ 795
1309
+ ],
1310
+ "page_idx": 9
1311
+ },
1312
+ {
1313
+ "type": "text",
1314
+ "text": "Tom M. Mitchell, William W. Cohen, Estevam R. Hruschka Jr., Partha Pratim Talukdar, Justin Betteridge, Andrew Carlson, Bhavana Dalvi Mishra, Matthew Gardner, Bryan Kisiel, Jayant Krishnamurthy, Ni Lao, Kathryn Mazaitis, Thahir Mohamed, Ndapandula Nakashole, Emmanouil A. Platanios, Alan Ritter, Mehdi Samadi, Burr Settles, Richard C. Wang, Derry Wijaya, Abhinav Gupta, Xinlei Chen, Abulhair Saparov, Malcolm Greaves, and Joel Welling. Never-ending learning. In AAAI, pp. 2302–2310. AAAI Press, 2015. ",
1315
+ "bbox": [
1316
+ 174,
1317
+ 803,
1318
+ 825,
1319
+ 887
1320
+ ],
1321
+ "page_idx": 9
1322
+ },
1323
+ {
1324
+ "type": "text",
1325
+ "text": "Maximilian Nickel, Kevin Murphy, Volker Tresp, and Evgeniy Gabrilovich. A review of relational machine learning for knowledge graphs. Proceedings of the IEEE, 104(1):11–33, 2016. ",
1326
+ "bbox": [
1327
+ 173,
1328
+ 895,
1329
+ 821,
1330
+ 924
1331
+ ],
1332
+ "page_idx": 9
1333
+ },
1334
+ {
1335
+ "type": "text",
1336
+ "text": "Natalya Fridman Noy, Yuqing Gao, Anshu Jain, Anant Narayanan, Alan Patterson, and Jamie Taylor. Industry-scale knowledge graphs: lessons and challenges. Commun. ACM, 62(8):36–43, 2019. ",
1337
+ "bbox": [
1338
+ 171,
1339
+ 103,
1340
+ 821,
1341
+ 132
1342
+ ],
1343
+ "page_idx": 10
1344
+ },
1345
+ {
1346
+ "type": "text",
1347
+ "text": "Hongyu Ren, Weihua Hu, and Jure Leskovec. Query2box: Reasoning over knowledge graphs in vector space using box embeddings. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020. URL https://openreview.net/forum?id $\\underline { { \\underline { { \\mathbf { \\Pi } } } } } =$ BJgr4kSFDS. ",
1348
+ "bbox": [
1349
+ 174,
1350
+ 140,
1351
+ 825,
1352
+ 196
1353
+ ],
1354
+ "page_idx": 10
1355
+ },
1356
+ {
1357
+ "type": "text",
1358
+ "text": "Tim Rocktaschel and Sebastian Riedel. End-to-end differentiable proving. In ¨ NIPS, pp. 3788–3800, 2017. ",
1359
+ "bbox": [
1360
+ 174,
1361
+ 205,
1362
+ 821,
1363
+ 234
1364
+ ],
1365
+ "page_idx": 10
1366
+ },
1367
+ {
1368
+ "type": "text",
1369
+ "text": "Luciano Serafini and Artur S. d’Avila Garcez. Logic tensor networks: Deep learning and logical reasoning from data and knowledge. CoRR, abs/1606.04422, 2016. URL http://arxiv. org/abs/1606.04422. ",
1370
+ "bbox": [
1371
+ 173,
1372
+ 243,
1373
+ 825,
1374
+ 286
1375
+ ],
1376
+ "page_idx": 10
1377
+ },
1378
+ {
1379
+ "type": "text",
1380
+ "text": "Fabian M. Suchanek, Gjergji Kasneci, and Gerhard Weikum. Yago: a core of semantic knowledge. In WWW, pp. 697–706. ACM, 2007. ",
1381
+ "bbox": [
1382
+ 173,
1383
+ 295,
1384
+ 820,
1385
+ 324
1386
+ ],
1387
+ "page_idx": 10
1388
+ },
1389
+ {
1390
+ "type": "text",
1391
+ "text": "Kristina Toutanova and Danqi Chen. Observed versus latent features for knowledge base and text inference. In Proceedings of the 3rd Workshop on Continuous Vector Space Models and their Compositionality, pp. 57–66, Beijing, China, July 2015. Association for Computational Linguistics. doi: 10.18653/v1/W15-4007. URL https://www.aclweb.org/anthology/ W15-4007. ",
1392
+ "bbox": [
1393
+ 174,
1394
+ 333,
1395
+ 825,
1396
+ 404
1397
+ ],
1398
+ "page_idx": 10
1399
+ },
1400
+ {
1401
+ "type": "text",
1402
+ "text": "Theo Trouillon, Johannes Welbl, Sebastian Riedel, ´ Eric Gaussier, and Guillaume Bouchard. Com- ´ plex embeddings for simple link prediction. In ICML, volume 48 of JMLR Workshop and Conference Proceedings, pp. 2071–2080. JMLR.org, 2016. ",
1403
+ "bbox": [
1404
+ 174,
1405
+ 412,
1406
+ 825,
1407
+ 457
1408
+ ],
1409
+ "page_idx": 10
1410
+ },
1411
+ {
1412
+ "type": "text",
1413
+ "text": "Emile van Krieken, Erman Acar, and Frank van Harmelen. Analyzing Differentiable Fuzzy Implications. In Proceedings of the 17th International Conference on Principles of Knowledge Representation and Reasoning, pp. 893–903, 9 2020. doi: 10.24963/kr.2020/92. URL https://doi.org/10.24963/kr.2020/92. ",
1414
+ "bbox": [
1415
+ 173,
1416
+ 464,
1417
+ 825,
1418
+ 521
1419
+ ],
1420
+ "page_idx": 10
1421
+ },
1422
+ {
1423
+ "type": "text",
1424
+ "text": "Meng Wang, Ruijie Wang, Jun Liu, Yihe Chen, Lei Zhang, and Guilin Qi. Towards empty answers in SPARQL: approximating querying with RDF embedding. In International Semantic Web Conference (1), volume 11136 of Lecture Notes in Computer Science, pp. 513–529. Springer, 2018. ",
1425
+ "bbox": [
1426
+ 174,
1427
+ 529,
1428
+ 823,
1429
+ 573
1430
+ ],
1431
+ "page_idx": 10
1432
+ },
1433
+ {
1434
+ "type": "text",
1435
+ "text": "Leon Weber, Pasquale Minervini, Jannes Munchmeyer, Ulf Leser, and Tim Rockt ¨ aschel. Nlprolog: ¨ Reasoning with weak unification for question answering in natural language. In ACL (1), pp. 6151–6161. Association for Computational Linguistics, 2019. ",
1436
+ "bbox": [
1437
+ 173,
1438
+ 580,
1439
+ 825,
1440
+ 625
1441
+ ],
1442
+ "page_idx": 10
1443
+ },
1444
+ {
1445
+ "type": "text",
1446
+ "text": "Wenhan Xiong, Thien Hoang, and William Yang Wang. Deeppath: A reinforcement learning method for knowledge graph reasoning. In EMNLP, pp. 564–573. Association for Computational Linguistics, 2017. ",
1447
+ "bbox": [
1448
+ 174,
1449
+ 632,
1450
+ 825,
1451
+ 676
1452
+ ],
1453
+ "page_idx": 10
1454
+ },
1455
+ {
1456
+ "type": "text",
1457
+ "text": "Bishan Yang, Wen-tau Yih, Xiaodong He, Jianfeng Gao, and Li Deng. Embedding entities and relations for learning and inference in knowledge bases. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015. ",
1458
+ "bbox": [
1459
+ 174,
1460
+ 684,
1461
+ 825,
1462
+ 741
1463
+ ],
1464
+ "page_idx": 10
1465
+ },
1466
+ {
1467
+ "type": "text",
1468
+ "text": "A INFLUENCE OF THE EMBEDDING SIZE ON THE RESULTS ",
1469
+ "text_level": 1,
1470
+ "bbox": [
1471
+ 174,
1472
+ 102,
1473
+ 673,
1474
+ 118
1475
+ ],
1476
+ "page_idx": 11
1477
+ },
1478
+ {
1479
+ "type": "table",
1480
+ "img_path": "images/9fdfde18386551be9bcea7ac4352a9d9da33bc9afc49f4aa0ff65d9b29c9f29e.jpg",
1481
+ "table_caption": [
1482
+ "Table 3: Complex query answering results $( \\mathrm { H @ 3 } )$ across all query types, for different rank (embedding size) values – results for Graph Query Embedding (GQE, Hamilton et al., 2018) and Query2Box (Ren et al., 2020) are from Ren et al. (2020). "
1483
+ ],
1484
+ "table_footnote": [
1485
+ "In Table 3 we report results for CQD-CO (Section 3.1) and CQD-Beam (Section 3.2) for different rank (embedding size) values. We can see that the model produces very accurate results even with significantly fewer parameters. "
1486
+ ],
1487
+ "table_body": "<table><tr><td>Method</td><td>Rank</td><td>1p</td><td>2p</td><td>3p</td><td>2i</td><td>3i</td><td>ip</td><td>pi</td><td>2u</td><td>up</td></tr><tr><td colspan=\"9\">FB15k</td><td></td></tr><tr><td>GQE</td><td>800</td><td>0.630</td><td>0.346</td><td>0.250</td><td>0.515</td><td>0.611</td><td>0.153</td><td>0.320</td><td>0.362</td><td>0.271</td></tr><tr><td>Query2Box</td><td>400</td><td>0.786</td><td>0.413</td><td>0.303</td><td>0.593</td><td>0.712</td><td>0.211</td><td>0.397</td><td>0.608</td><td>0.330</td></tr><tr><td rowspan=\"4\">CQD-CO</td><td>100</td><td>0.893 0.906</td><td>0.162 0.257</td><td>0.076 0.092</td><td>0.773 0.785</td><td>0.818 0.828</td><td>0.118 0.210</td><td>0.344 0.426</td><td>0.493 0.753</td><td>0.073 0.110</td></tr><tr><td>200 500</td><td>0.912</td><td>0.345</td><td>0.123</td><td>0.772</td><td>0.817</td><td>0.257</td><td>0.454</td><td>0.795</td><td>0.206</td></tr><tr><td>1000</td><td>0.918</td><td>0.454</td><td></td><td>0.796</td><td>0.837</td><td>0.336</td><td>0.513</td><td>0.816</td><td>0.319</td></tr><tr><td>100</td><td></td><td></td><td>0.191</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan=\"4\">CQD-Beam</td><td></td><td>0.893</td><td>0.746</td><td>0.557</td><td>0.773</td><td>0.818</td><td>0.357</td><td>0.669</td><td>0.689</td><td>0.313</td></tr><tr><td>200</td><td>0.906</td><td>0.770</td><td>0.585</td><td>0.785</td><td>0.828</td><td>0.373</td><td>0.679</td><td>0.815</td><td>0.357</td></tr><tr><td>500</td><td>0.912</td><td>0.759</td><td>0.580</td><td>0.772</td><td>0.817</td><td>0.372</td><td>0.650</td><td>0.831</td><td>0.351</td></tr><tr><td>1000</td><td>0.918</td><td>0.779</td><td>0.584</td><td>0.796</td><td>0.837</td><td>0.377</td><td>0.658</td><td>0.839</td><td>0.355</td></tr><tr><td colspan=\"10\">FB15k-237</td></tr><tr><td>GQE</td><td>800</td><td>0.405</td><td>0.213</td><td>0.153</td><td>0.298</td><td>0.411</td><td>0.085</td><td>0.182</td><td>0.167</td><td>0.160</td></tr><tr><td>Query2Box</td><td>400</td><td>0.467</td><td>0.240</td><td>0.186</td><td>0.324</td><td>0.453</td><td>0.108</td><td>0.205</td><td>0.239</td><td>0.193</td></tr><tr><td rowspan=\"4\">CQD-CO</td><td>100</td><td>0.493</td><td>0.162</td><td>0.076</td><td>0.311</td><td>0.415</td><td>0.118</td><td>0.199</td><td>0.238</td><td>0.073</td></tr><tr><td>200</td><td>0.500</td><td>0.187</td><td>0.092</td><td>0.329</td><td>0.439</td><td>0.128</td><td>0.204</td><td>0.254</td><td>0.103</td></tr><tr><td>500</td><td>0.508</td><td>0.210</td><td>0.123</td><td>0.346</td><td>0.454</td><td>0.142</td><td>0.216</td><td>0.273</td><td>0.119</td></tr><tr><td>1000</td><td>0.512</td><td>0.213</td><td>0.131</td><td>0.352</td><td>0.457</td><td>0.146</td><td>0.222</td><td>0.281</td><td>0.132</td></tr><tr><td rowspan=\"4\">CQD-Beam</td><td>100</td><td>0.493</td><td>0.256</td><td>0.207</td><td>0.311</td><td>0.415</td><td>0.119</td><td>0.234</td><td>0.254</td><td>0.121</td></tr><tr><td>200</td><td>0.500</td><td>0.272</td><td>0.216</td><td>0.329</td><td>0.439</td><td>0.122</td><td>0.244</td><td>0.264</td><td>0.127</td></tr><tr><td>500</td><td>0.508</td><td>0.280</td><td>0.216</td><td>0.346</td><td>0.454</td><td>0.127</td><td>0.257</td><td>0.280</td><td>0.128</td></tr><tr><td>1000</td><td>0.512</td><td>0.279</td><td>0.219</td><td>0.352</td><td>0.457</td><td>0.129</td><td>0.249</td><td>0.284</td><td>0.128</td></tr><tr><td colspan=\"10\">NELL995</td></tr><tr><td>GQE</td><td>800</td><td>0.417</td><td>0.231</td><td>0.203</td><td>0.318</td><td>0.454</td><td>0.081</td><td>0.188</td><td>0.200</td><td>0.139</td></tr><tr><td>Query2Box</td><td>400</td><td>0.555</td><td>0.266</td><td>0.233</td><td>0.343</td><td>0.480</td><td>0.132</td><td>0.212</td><td>0.369</td><td>0.163</td></tr><tr><td rowspan=\"4\">CQD-CO</td><td>100</td><td>0.647</td><td>0.234</td><td>0.145</td><td>0.389</td><td>0.508</td><td>0.165</td><td>0.283</td><td>0.465</td><td>0.126</td></tr><tr><td>200</td><td>0.658</td><td>0.238</td><td>0.164</td><td>0.401</td><td>0.524</td><td>0.172</td><td>0.282</td><td>0.502</td><td>0.148</td></tr><tr><td>500</td><td>0.665</td><td>0.261</td><td>0.208</td><td>0.406</td><td>0.525</td><td>0.187</td><td>0.293</td><td>0.523</td><td>0.171</td></tr><tr><td>1000</td><td>0.667</td><td>0.265</td><td>0.220</td><td>0.410</td><td>0.529</td><td>0.196</td><td>0.302</td><td>0.531</td><td>0.194</td></tr><tr><td rowspan=\"4\">CQD-Beam</td><td>100</td><td>0.647</td><td>0.333</td><td>0.296</td><td>0.389</td><td>0.508</td><td>0.160</td><td>0.293</td><td>0.469</td><td>0.150</td></tr><tr><td>200</td><td>0.658</td><td>0.335</td><td>0.292</td><td>0.401</td><td>0.524</td><td>0.162</td><td>0.290</td><td>0.508</td><td>0.146</td></tr><tr><td>500</td><td>0.665</td><td>0.348</td><td>0.296</td><td>0.406</td><td>0.525</td><td>0.166</td><td>0.291</td><td>0.527</td><td>0.149</td></tr><tr><td>1000</td><td>0.667</td><td>0.343</td><td>0.297</td><td>0.410</td><td>0.529</td><td>0.168</td><td>0.283</td><td>0.536</td><td>0.157</td></tr></table>",
1488
+ "bbox": [
1489
+ 176,
1490
+ 189,
1491
+ 825,
1492
+ 736
1493
+ ],
1494
+ "page_idx": 11
1495
+ },
1496
+ {
1497
+ "type": "text",
1498
+ "text": "B TIMING EXPERIMENTS ",
1499
+ "text_level": 1,
1500
+ "bbox": [
1501
+ 174,
1502
+ 102,
1503
+ 400,
1504
+ 118
1505
+ ],
1506
+ "page_idx": 12
1507
+ },
1508
+ {
1509
+ "type": "image",
1510
+ "img_path": "images/e6b8b0bba96b616a1fb5c3d4575f95d38610d8bf18d6717c4c39888251fe8c22.jpg",
1511
+ "image_caption": [
1512
+ "Figure 4: Number of seconds required by Q2B (Ren et al., 2020) and CQD-Beam (Section 3.2 for answering each query type in FB15k. "
1513
+ ],
1514
+ "image_footnote": [],
1515
+ "bbox": [
1516
+ 176,
1517
+ 136,
1518
+ 821,
1519
+ 303
1520
+ ],
1521
+ "page_idx": 12
1522
+ },
1523
+ {
1524
+ "type": "image",
1525
+ "img_path": "images/d79fe0d5e915bb032ba8c9913d76e2130aaf432f369d2338fc84782e3ce3bb6e.jpg",
1526
+ "image_caption": [
1527
+ "Figure 5: Number of seconds required by Q2B (Ren et al., 2020) and CQD-Beam (Section 3.2 for answering each query type in FB15k-237. "
1528
+ ],
1529
+ "image_footnote": [],
1530
+ "bbox": [
1531
+ 173,
1532
+ 359,
1533
+ 825,
1534
+ 526
1535
+ ],
1536
+ "page_idx": 12
1537
+ },
1538
+ {
1539
+ "type": "text",
1540
+ "text": "In Fig. 4 and Fig. 5 we report the time (seconds) required by Q2B (Ren et al., 2020) and CQD-Beam (Section 3.2 for answering each query type, aggregated over FB15k, FB15k-237, and NELL. We can see that, in CQD-Beam, the main computation bottleneck are multi-hop queries, since the model is required to invoke the neural link prediction model for each step of the chain to obtain the top- $k$ candidates for the next step in the chain. ",
1541
+ "bbox": [
1542
+ 173,
1543
+ 582,
1544
+ 825,
1545
+ 654
1546
+ ],
1547
+ "page_idx": 12
1548
+ },
1549
+ {
1550
+ "type": "text",
1551
+ "text": "C DISTMULT EXPERIMENTS ",
1552
+ "text_level": 1,
1553
+ "bbox": [
1554
+ 176,
1555
+ 102,
1556
+ 426,
1557
+ 118
1558
+ ],
1559
+ "page_idx": 13
1560
+ },
1561
+ {
1562
+ "type": "table",
1563
+ "img_path": "images/3de3bad49f579102caf97e47586ae8779d0c48a56d82e1c8e410b03cf5173a72.jpg",
1564
+ "table_caption": [
1565
+ "Table 4: Complex query answering results $( \\mathrm { H @ 3 } )$ across all query types, for two different neural link prediction models, namely ComplEx (Trouillon et al., 2016) and DistMult (Yang et al., 2015). "
1566
+ ],
1567
+ "table_footnote": [],
1568
+ "table_body": "<table><tr><td>Method</td><td>Model</td><td>1p</td><td>2p</td><td>3p</td><td>2i</td><td>3i</td><td>ip</td><td>pi</td><td>2u</td><td>up</td></tr><tr><td colspan=\"10\">FB15k</td></tr><tr><td>CQD-Beam</td><td>ComplEx DistMult</td><td>0.918 0.869</td><td>0.779</td><td>0.584</td><td>0.796</td><td>0.837 0.824</td><td>0.377 0.369</td><td>0.658 0.608</td><td>0.839 0.822</td><td>0.355 0.355</td></tr><tr><td colspan=\"10\">0.761 0.581 0.778</td></tr><tr><td colspan=\"10\">FB15k-237</td></tr><tr><td>CQD-Beam</td><td>ComplEx</td><td>0.512</td><td>0.279</td><td>0.219</td><td>0.352</td><td>0.457</td><td>0.129</td><td>0.249</td><td>0.284</td><td>0.128</td></tr><tr><td>DistMult</td><td></td><td>0.485</td><td>0.277</td><td>0.210</td><td>0.332</td><td>0.443</td><td>0.117</td><td>0.224</td><td>0.281</td><td>0.123</td></tr><tr><td colspan=\"10\">NELL995</td></tr><tr><td>CQD-Beam</td><td>ComplEx</td><td>0.667</td><td>0.343</td><td>0.297</td><td>0.410</td><td>0.529</td><td>0.168</td><td>0.283</td><td>0.536</td><td>0.157</td></tr><tr><td></td><td>DistMult</td><td>0.642</td><td>0.348</td><td>0.297</td><td>0.392</td><td>0.517</td><td>0.160</td><td>0.260</td><td>0.502</td><td>0.169</td></tr></table>",
1569
+ "bbox": [
1570
+ 176,
1571
+ 178,
1572
+ 825,
1573
+ 353
1574
+ ],
1575
+ "page_idx": 13
1576
+ },
1577
+ {
1578
+ "type": "text",
1579
+ "text": "In Table 4 we report the results for CQD-Beam with two different neural link prediction models, namely ComplEx (Trouillon et al., 2016) and DistMult (Yang et al., 2015). Both models were trained using the loss and regulariser proposed by Lacroix et al. (2018), and their hyperparameters were tuned according to their performance in the validation set; in both cases, the embedding size is set to 1,000. As expected, CQD-Beam with DistMult produces slightly less accurate results than with ComplEx, while still yielding more accurate results than the Q2B and GQE baselines. ",
1580
+ "bbox": [
1581
+ 173,
1582
+ 368,
1583
+ 825,
1584
+ 454
1585
+ ],
1586
+ "page_idx": 13
1587
+ }
1588
+ ]
parse/train/Mos9F9kDwkz/Mos9F9kDwkz_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Mos9F9kDwkz/Mos9F9kDwkz_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/MxaY4FzOTa/MxaY4FzOTa.md ADDED
@@ -0,0 +1,437 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # HIGH-CAPACITY EXPERT BINARY NETWORKS
2
+
3
+ Adrian Bulat Samsung AI Cambridge adrian@adrianbulat.com
4
+
5
+ Brais Martinez Samsung AI Cambridge brais.a@samsung.com
6
+
7
+ Georgios Tzimiropoulos Samsung AI Cambridge Queen Mary University of London, UK g.tzimiropoulos@qmul.ac.uk
8
+
9
+ # ABSTRACT
10
+
11
+ Network binarization is a promising hardware-aware direction for creating efficient deep models. Despite its memory and computational advantages, reducing the accuracy gap between binary models and their real-valued counterparts remains an unsolved challenging research problem. To this end, we make the following 3 contributions: (a) To increase model capacity, we propose Expert Binary Convolution, which, for the first time, tailors conditional computing to binary networks by learning to select one data-specific expert binary filter at a time conditioned on input features. (b) To increase representation capacity, we propose to address the inherent information bottleneck in binary networks by introducing an efficient width expansion mechanism which keeps the binary operations within the same budget. (c) To improve network design, we propose a principled binary network search mechanism that unveils a set of network topologies of favorable properties. Overall, our method improves upon prior work, with no increase in computational cost, by $\sim 6 \%$ , reaching a groundbreaking $\sim 7 1 \%$ on ImageNet classification. Code will be made available here.
12
+
13
+ # 1 INTRODUCTION
14
+
15
+ A promising, hardware-aware, direction for designing efficient deep learning models case is that of network binarization, in which filter and activation values are restricted to two states only: $\pm 1$ (Rastegari et al., 2016; Courbariaux et al., 2016). This comes with two important advantages: (a) it compresses the weights by a factor of $3 2 \times$ via bit-packing, and (b) it replaces the computationally expensive multiply-add with bit-wise xnor and popcount operations, offering, in practice, a speed-up of $\sim 5 8 \times$ on a CPU (Rastegari et al., 2016). Despite this, how to reduce the accuracy gap between a binary model and its real-valued counterpart remains an open problem and it is currently the major impediment for their wide-scale adoption.
16
+
17
+ In this work, we propose to approach this challenging problem from 3 key perspectives:
18
+
19
+ 1. Model capacity: To increase model capacity, we firstly introduce the first application of Conditional Computing (Bengio et al., 2013; 2015; Yang et al., 2019) to the case of a binary networks, which we call Expert Binary Convolution. For each convolutional layer, rather than learning a weight tensor that is expected to generalize well across the entire input space, we learn a set of $N$ experts each of which is tuned to specialize to portions of it. During inference, a very light-weight gating function dynamically selects a single expert for each input sample and uses it to process the input features. Learning to select a single, tuned to the input data, expert is a key property of our method which renders it suitable for the case of binary networks, and contrasts our approach to previous works in conditional computing (Yang et al., 2019).
20
+
21
+ 2. Representation capacity: There is an inherent information bottleneck in binary networks as only 2 states are used to characterize each feature, which hinders the learning of highly accurate models. To this end, for the first time, we highlight the question of depth vs width in binary networks and propose a surprisingly unexplored efficient mechanism for increasing the effective width of the network by preserving the original computational budget. We show that our approach leads to noticeable gains in accuracy without increasing computation.
22
+
23
+ 3. Network design: Finally, and inspired by similar work in real-valued networks (Tan & Le, 2019), we propose a principled approach to search for optimal directions for scaling-up binary networks.
24
+
25
+ Main results: Without increasing the computational budget of previous works, our method improves upon the state-of-the-art (Martinez et al., 2020) by $\sim 6 \%$ , reaching a groundbreaking $\sim 7 1 \%$ on ImageNet classification.
26
+
27
+ # 2 RELATED WORK
28
+
29
+ # 2.1 NETWORK BINARIZATION
30
+
31
+ Since the seminal works of Courbariaux et al. (2015; 2016) which showed that training fully binary models (both weights and activations) is possible, and Rastegari et al. (2016) which reported the very first binary model of high accuracy, there has been a great research effort to develop binary models that are competitive in terms of accuracy when compared to their real-valued counterparts, see for example (Lin et al., 2017; Liu et al., 2018; Alizadeh et al., 2018; Bulat et al., 2019; Bulat & Tzimiropoulos, 2019; Ding et al., 2019; Wang et al., 2019; Zhuang et al., 2019; Zhu et al., 2019; Kim et al., 2020; Bulat et al., 2020; Martinez et al., 2020). Notably, many of these improvements including real-valued down-sampling layers (Liu et al., 2018), double skip connections (Liu et al., 2018), learning the scale factors (Bulat & Tzimiropoulos, 2019), PReLUs (Bulat et al., 2019) and two-stage optimization (Bulat et al., 2019) have been put together to build a strong baseline in Martinez et al. (2020) which, further boosted by a sophisticated distillation and data-driven channel rescaling mechanism, yielded an accuracy of $\sim 6 5 \%$ on ImageNet. This method, along with the recent binary NAS of Bulat et al. (2020) reporting accuracy of $\sim 6 6 \%$ , are to our knowledge, the state-of-the-art in binary networks.
32
+
33
+ Our method further improves upon these works achieving an accuracy of $\sim 7 1 \%$ on ImageNet, crucially without increasing the computational complexity. To achieve this, to our knowledge, we propose for the first time to explore ideas from Conditional Computing (Bengio et al., 2013; 2015) and learn data-specific binary expert weights which are dynamically selected during inference conditioned on the input data. Secondly, we are the first to identify width as an important factor for increasing the representation capacity of binary networks, and introduce a surprisingly simple yet effective mechanism to enhance it without increasing complexity. Finally, although binary architecture design via NAS (Liu et al., 2018; Real et al., 2019) has been recently explored in (Kim et al., 2020; Bulat et al., 2020), we propose to approach it from a different perspective that is more related to Tan & Le (2019), which was developed for real-valued networks.
34
+
35
+ # 2.2 CONDITIONAL COMPUTATION
36
+
37
+ Conditional computation is a very general data processing framework which refers to using different models or different parts of a model conditioned on the input data. Wang et al. (2018) and Wu et al. (2018) propose to completely bypass certain parts of the network during inference using skip connections by training a policy network via reinforcement learning. Gross et al. (2017) proposes to train large models by using a mixture of experts trained independently on different partitions of the data. While speeding-up training, this approach is not end-to-end trainable nor tuned towards improving the model accuracy. Shazeer et al. (2017) trains thousands of experts that are combined using a noisy top- $\mathbf { \nabla } \cdot \mathbf { k }$ expert selection while Teja Mullapudi et al. (2018) introduces the HydraNet in which a routing function selects and combines a subset of different operations. The later is more closely related to online network search. Chen et al. (2019) uses a separate network to dynamically select a variable set of filters while Dai et al. (2017) learns a dynamically computed offset.
38
+
39
+ More closely related to the proposed EBConv is Conditional Convolution, where Yang et al. (2019) propose to learn a Mixture of Experts, i.e. a set of filters that are linearly combined using a routing function. In contrast, our approach learns to select a single expert at a time. This is critical for binary networks for two reasons: (1) The linear combination of a binary set of weights is nonbinary and, hence, a second binarization is required giving rise to training instability and increased memory consumption. In Section 5, we compare with such a model and show that our approach works significantly better. (2) The additional computation to multiply and sum the weights, while negligible for real-valued networks, can lead to a noticeable computational increase for binary ones.
40
+
41
+ Finally, we note that our single expert selection mechanism is akin to the Gumbel-max trick (Gumbel, 1948) and the Gumbel-Softmax Estimator (Jang et al., 2016; Maddison et al., 2016) previously used in various forms for NAS (Chang et al., 2019), multi-task learning (Guo et al., 2020) and variational auto-encoders (Jang et al., 2016). To our knowledge, the proposed EBConv is the very first adaptation for conditional computing within binary neural networks.
42
+
43
+ # 3 BACKGROUND ON BINARY NETWORKS
44
+
45
+ Following Rastegari et al. (2016); Bulat & Tzimiropoulos (2019), a binary convolution is defined as:
46
+
47
+ $$
48
+ \operatorname { B C o n v } ( \mathbf x , \pmb \theta ) = ( \mathbb { s } \operatorname { i } \operatorname { g n } ( \mathbf x ) \circledast \operatorname { s i g n } ( \pmb \theta ) ) \odot \alpha ,
49
+ $$
50
+
51
+ where $\mathbf { x }$ is the input, $\pmb { \theta }$ the weights, $\circledast$ denotes the binary convolutional operation, $\odot$ the Hadamard product, and $\alpha \in \mathbb { R } ^ { C }$ is learned via back-propagation, as in Bulat & Tzimiropoulos (2019).
52
+
53
+ The binarization is performed in two stages Bulat et al. (2019); Martinez et al. (2020). During Stage I, we train a network with binary activations and real-valued weights. Note that the accuracy of Stage I models are very representative to that of the final fully binary model (see Table 4). During Stage II, we initialize from Stage I to train a network with both weights and activations binary. When reporting results, if no stage is specified, the model (weights and activations) is fully binary.
54
+
55
+ We set as baseline the Strong Baseline model (denoted as SBaseline) from Martinez et al. (2020) on top of which we implemented the proposed method. We denote as Real-to-bin their full model.
56
+
57
+ ![](images/90f27ccd26c1e8f0a17975485180fe8f5e615748a18c71d7a7a955b848ae000a.jpg)
58
+
59
+ ![](images/3fd16f7cf3d41d405bb1c8193da4d84f598b154dd03e8b941717d8e2d0a10e79.jpg)
60
+ (b) 2D t-SNE embeddings of ImageNet validation set for a model with 4 experts and Top-1 acc. of $6 3 . 8 \%$ .
61
+
62
+ (a) The proposed Expert Binary Convolution (EBConv). Note that only a single expert is active at a time.
63
+
64
+ Figure 1: (a) Schematic representation of the proposed EBConv layer, and (b) t-SNE embedding visualisation of the features before the classifier along with the corresponding expert that was activated for each sample. Points located closer to each other are more semantically and visually similar. Each data point is coloured according to the expert selected by the last EBConv from our network. As multiple clusters emerge in the figure, it can be deduced that the experts learned a preference for certain classes, or groups of classes from ImageNet. This suggests that the EBConv layer learned semantically meaningful representations of the data. Best viewed in color.
65
+
66
+ # 4 METHOD
67
+
68
+ # 4.1 EXPERT BINARY CONVOLUTION
69
+
70
+ Assume a binary convolutional layer with input $\textbf { x } ~ \in ~ \mathbb { R } ^ { C _ { i n } \times W \times H }$ and weight tensor ${ \pmb \theta } ^ { \mathrm { ~ \tiny ~ \in ~ } }$ $\mathbb { R } ^ { C _ { i n } \times C _ { o u t } \times k _ { H } \times \bar { k } _ { W } }$ . In contrast to a normal convolution that applies the same weights to all input features, we propose to learn a set of expert weights (or simply experts) $\big \{ \pmb { \theta } _ { 0 } , \pmb { \theta } _ { 1 } , . . . , \pmb { \theta } _ { N - 1 } \big \}$ , $\mathbf { \chi } ^ { \bullet } \mathbf { \lambda } \in \mathbb { R } ^ { C _ { i n } \times C _ { o u t } \times k _ { H } \times k _ { W } }$ alongside a selector gating function which, given input $\mathbf { x }$ , selects only $a$ single expert to be applied to it. The proposed EBConv layer is depicted in Fig. 1a. To learn the experts, let us first stack them in matrix $\bar { \Theta } \in \mathbb { R } ^ { N \times C _ { i n } C _ { o u t } k _ { H } k _ { W } }$ . We propose to learn the following
71
+
72
+ function:
73
+
74
+ $$
75
+ \operatorname { E B C o n v } ( \mathbf { x } , \pmb { \theta } ) = \operatorname { B C o n v } ( \mathbf { x } , \left( \varphi ( \psi ( \mathbf { x } ) ) ^ { T } \pmb { \Theta } \right) _ { r } ) ,
76
+ $$
77
+
78
+ where $\varphi ( . )$ is a gating function (returning an $N$ −dimensional vector as explained below) that implements the expert selection mechanism using as input $\psi ( \mathbf { x } )$ which is an aggregation function of the input tensor $\mathbf { x }$ , and $( . ) _ { r }$ simply reshapes its argument to a tensor of appropriate dimensions.
79
+
80
+ Gating function $\varphi$ : A crucial component of the proposed approach is the gating function that implements the expert selection mechanism. An obvious solution would be to use a Winners-TakeAll (WTA) function, however this is not differentiable. A candidate that comes in mind to solve this problem is the softargmax with temperature $\tau$ : as $\tau 0$ , the entry corresponding to the max will tend to 1 while the rest to 0. However, as $\tau 0$ , the derivative of the softargmax converges to the Dirac function $\delta$ which provides poor gradients and hence hinders the training process. This could be mitigated if a high $\tau$ is used, however this would require hard thresholding at test time which, for the case of binary networks, and given that the models are trained using Eq. 2, leads to large errors.
81
+
82
+ To mitigate the above, and distancing from reinforcement learning techniques often deployed when discrete decisions need to be made, we propose, for the forward pass, to use a WTA function for defining $\varphi ( . )$ , as follows:
83
+
84
+ $$
85
+ \varphi ( z ) = { \left\{ \begin{array} { l l } { 1 , } & { { \mathrm { i f ~ } } i = { \mathrm { a r g m a x } } ( z ) } \\ { 0 , } & { { \mathrm { o t h e r w i s e } } } \end{array} \right. } .
86
+ $$
87
+
88
+ Note that we define $\varphi$ as $\varphi : \mathbb { R } ^ { C } \to \mathbb { R } ^ { N }$ i.e. as a function that returns an $N -$ dimensional vector which is used to multiply (element-wise) $\Theta$ in Eq. 2. This is crucial as, during training, we wish to back-propagate gradients for the non-selected experts. To this end, we propose, for the backward pass, to use the Softmax function for approximating the gradients $\varphi ( . )$ :
89
+
90
+ $$
91
+ \frac { \partial \phi } { \partial z } : = \frac { \partial } { \partial z } \mathrm { S o f t m a x } ( z ) .
92
+ $$
93
+
94
+ Overall, our proposal, WTA for forward and Softmax for backward, effectively addresses the mismatch during inference between training and testing while, at the same time, it allows meaningful gradients to flow to all experts during training. In Section A.3.3 of the appendix, we also explore the impact of adding a temperature to the softmax showing how its value affects the training process. Note that backpropagating gradients for the non-selected experts applies to the gating function, only; the binary activations and weights continue to use the STE introduced in (Courbariaux et al., 2016; Rastegari et al., 2016).
95
+
96
+ Aggregation function $\psi$ : The purpose of this function is to give a summary of the input feature tensor which will be used to select the expert. To avoid overfitting and to keep the computational cost low, we opt for a simple and fast linear function:
97
+
98
+ $$
99
+ \begin{array} { r } { \psi ( { \bf x } ) = \left[ \bar { \bf x } ^ { [ 0 ] } \bar { \bf x } ^ { [ 1 ] } \cdot \cdot \cdot \bar { \bf x } ^ { [ C - 1 ] } \right] \omega , } \end{array}
100
+ $$
101
+
102
+ where $\begin{array} { r } { \bar { \mathbf { x } } ^ { [ i ] } = \frac { 1 } { H W } \mathbf { x } ^ { [ i ] } } \end{array}$ is the spatial average of the $i -$ th channel and $\boldsymbol { \omega } \in \mathbb { R } ^ { C \times N }$ a learnable projection matrix. Note that no other non-linearity was used as the WTA function is already a non-linear function.
103
+
104
+ Data-specific experts: One expected property of EBConv implied by the proposed design is that the experts should specialize on portions of data. This is because, for each data sample, a single expert is chosen per convolutional layer. Fig. 1b confirms this experimentally by t-SNE embedding visualisation of the features before the classifier along with the corresponding expert that was activated for each sample of the ImageNet validation set.
105
+
106
+ Optimization policy: As in Bulat et al. (2019), we adopt a two-stage training policy where firstly the input features are binarized while learning real-valued weights, and then both input and weights are binarized.
107
+
108
+ Table 1: Comparison on ImageNet for different number of experts. All models have the same number of BOPs, including Martinez et al. (2020).
109
+
110
+ <table><tr><td rowspan="2">#experts</td><td colspan="2">Accuracy (%)</td></tr><tr><td>Top-1</td><td>Top-5</td></tr><tr><td>1 (SBaseline) (Martinez et al., 2020)</td><td>60.9</td><td>83.0</td></tr><tr><td>4</td><td>63.8</td><td>85.1</td></tr><tr><td>8</td><td>64.0</td><td>85.3</td></tr></table>
111
+
112
+ Note that the aggregation function $\psi$ is kept real across all steps since its computational cost is insignificant. Furthermore, due to the discrete decision making process early on, the training can be unstable. Therefore, to stabilize the training we firstly train one expert, and then use this to initialize the training of all $N$ experts. This ensures that early on in the process any decision made by the gating function is a good decision. Overall, our optimization policy can be summarized as follows:
113
+
114
+ 1. Train one expert, parametrized by $\pmb { \theta } _ { 0 }$ , using real weights and binary activations.
115
+ 2. Replicate $\pmb { \theta } _ { 0 }$ to all $\theta _ { i } , i = \{ 1 , N - 1 \}$ to initialize matrix $\Theta$ .
116
+ 3. Train the model initialized in step 2 using real weights and binary activations.
117
+ 4. Train the model obtained from step 3 using binary weights and activations.
118
+
119
+ # 4.2 ENHANCING BINARY INFORMATION FLOW
120
+
121
+ While the previous section addressed the issue of model capacity, in this section, we address the problem of the representation capacity of the binary activations. This issue arises due to the fact that only 2 states are used to characterize each feature, resulting in an information bottleneck which hinders the learning of highly accurate binary networks. To our knowledge, there is little prior work which explicitly tries to solve this problem (Liu et al., 2018).
122
+
123
+ Our solution is surprisingly simple yet effective: the only parameters one can adjust in order to increase the representational power of binary features are the resolution and the width (i.e. number of channels). The former is largely conditioned on the resolution of the data, being as such problem dependent. Hence, we propose the latter, which is to increase the network width. For example a width expansion of $k = 2$ can increase the number of unique configurations for a $3 2 \times 7 \times 7$ binary feature tensor from $2 ^ { 3 2 \times 7 \times 7 } = 2 ^ { 1 5 6 8 }$ to $2 ^ { 2 1 \bar { 3 } 6 }$ . However, increasing the network width directly causes a quadratic increase in complexity with respect to $k$ . Hence, in order to keep the number of binary operations (BOPs) constant, we propose to use Grouped Convolutions with group size $G$ pro
124
+
125
+ Table 2: Comparison on ImageNet for different number of experts and expansion rates. All models have the same number of BOPs, including Martinez et al. (2020).
126
+
127
+ <table><tr><td rowspan="2">Expansion</td><td rowspan="2"># experts</td><td colspan="2">Accuracy (%)</td></tr><tr><td>Top-1</td><td>Top-5</td></tr><tr><td>1 (SBaseline) (Martinez et al.,2020)</td><td>1</td><td>60.9</td><td>83.0</td></tr><tr><td>2</td><td>1</td><td>64.6</td><td>85.6</td></tr><tr><td>4</td><td>1</td><td>65.1</td><td>86.0</td></tr><tr><td>1</td><td>4</td><td>63.8</td><td>85.1</td></tr><tr><td>1</td><td>8</td><td>64.0</td><td>85.3</td></tr><tr><td>2</td><td>4</td><td>66.0</td><td>86.4</td></tr><tr><td>2</td><td>8</td><td>66.3</td><td>86.6</td></tr></table>
128
+
129
+ portional to the width expansion, i.e. $G = k ^ { 2 }$ . Note that we do not simply propose using grouped convolutions within binary networks as in (Phan et al., 2020; Bulat et al., 2020). We propose width expansion to address the inherent information bottleneck within binary networks and use grouped convolutions as a mechanism for increasing the capacity while preserving the computational budget fixed. Moreover, we note that since we are using grouped convolutions, features across groups need to be somehow combined throughout the network. This can be achieved at no extra cost through the $1 \times 1$ convolutions used for downsampling at the end of each stage where change of spatial resolution occurs. In Section 4.3, we further propose a more effective way to achieve this, based on binary $1 \times 1$ convolutions, which however add some extra complexity. Moreover, in Section 4.3, we will further propose to search for the optimal group size depending on the layer location.
130
+
131
+ As Table 2 clearly shows, models trained with a width multiplier higher than 1 offer consistent accuracy gains, notably without increasing complexity. Importantly, these gains also add up with the ones obtained by using the proposed EBConv. This is not surprising as width expansion improves representation capacity while the expert increases model capacity.
132
+
133
+ # 4.3 DESIGNING BINARY NETWORKS
134
+
135
+ In general, there is little work in network design for binary networks. Recently, a few binary NAS techniques have been proposed (Kim et al., 2020; Shen et al., 2019; Bulat et al., 2020). Despite reporting good performance, these methods have the same limitations typical of NAS methods, for example, having to search for an optimal cell using a predefined network architecture, or having to hand pick the search space. Herein, and inspired by Tan & Le (2019), we propose a mixed semi-automated approach that draws from the advantages of both automatic and manual network designing techniques. Specifically, setting the standard ResNet-18 (He et al., 2016) network as a starting point, we focus on searching for optimal binary network structures, gradually exploring a set of different directions (width, depth, groups, layer arrangement).
136
+
137
+ Effect of block arrangement: Starting from a ResNet-based topology in mind, we denote a network with $N _ { i } , i = \{ 1 , 2 , 3 , 4 \}$ blocks at each resolution as $N _ { 0 } N _ { 1 } N _ { 2 } N _ { 3 }$ , with each block having two convolutional layers. We first investigate if re-arranging the blocks, mainly by using a network which is heavier at later stages, can have an impact on accuracy. Note that since the number of features is doubled among stages, this re-arrangement preserves the same complexity. Table 3 shows the results. As it can be observed the accuracy remains largely unchanged while the layers are re-distributed.
138
+
139
+ Depth vs width: In Section 4.2, we proposed an efficient width expansion mechanism which is found to increase the accuracy of binary networks without increasing complexity. Herein, we evaluate the effect of increasing depth by adding more blocks. Fig. 2a shows the results of depth expansion. Each constellation represents a different architecture out of which we vary only the number of blocks, i.e. the depth. As we may clearly see, the returns of increasing depth are diminished as complexity also rapidly increases, resulting in very heavy models. Note that previous work for the case of real-valued networks (Zagoruyko & Komodakis, 2016) has shown that wide models can perform as well as deep ones. Our results show that, for a fixed computation budget, the proposed wide binary models with grouped convolutions actually outperform the deep ones by a large margin.
140
+
141
+ Table 3: Comparison on ImageNet between stage I models with different block arrangements.
142
+
143
+ <table><tr><td rowspan="2">NoN1N2N3</td><td colspan="2">Accuracy (%)</td></tr><tr><td>Top-1</td><td>Top-5</td></tr><tr><td>1133</td><td>63.8</td><td>86.5</td></tr><tr><td>1142</td><td>63.8</td><td>86.8</td></tr><tr><td>1124</td><td>63.7</td><td>87.4</td></tr><tr><td>2222</td><td>63.9</td><td>87.4</td></tr></table>
144
+
145
+ Effect of aggregation over groups: Our efficient width expansion mechanism of Section 4.2 uses a very weak way of aggregating the information across different groups. A better way is to explicitly use a $1 \times 1$ binary convolutional layer (with no groups) after each block. The effect of adding that layer is shown in Fig. 3. Clearly, aggregation across groups via $1 \times 1$ convolutions offers significant accuracy gains, adding at the same time a reasonable amount of complexity.
146
+
147
+ Effect of groups: In Section 4.2, we proposed grouped convolutions as a mechanism for keeping the computations under control as we increase the network width. Herein, we go one step further and explore the effect of different group sizes and their placement across the network. This, in turn, allows, with a high degree of granularity, to vary the computational budget at various points in the network while preserving the width and as such the information flow. To describe the space of network structures explored, we use the following naming convention: we denote a network with $N _ { i } , i = \{ 1 , 2 , 3 , 4 \}$ blocks at each resolution, a corresponding width expansion $E$ (the same $E$ was used for all blocks) and group size $G _ { i }$ for each convolution in these blocks as: $N _ { 0 } N _ { 1 } N _ { 2 } N _ { 3 } – E – G _ { 0 }$ : $G _ { 1 } : G _ { 2 } : G _ { 3 }$ .
148
+
149
+ As the results from Fig. 2b and Table 4 show, increasing the number of groups (especially for the last 2 stages) results in significantly more efficient models which maintain the high accuracy (with only small decrease) compared to much larger models having the same network structure but fewer groups. Our results suggest that group sizes of 16 or 32 for the last 2 stages provide the best trade-off.
150
+
151
+ Network search strategy: In summary, the network search space used in this work consists of the following degrees of freedom: a) rearranging the blocks, b) defining the depth of the model, c) defining the width at each stage, and finally d) selecting the optimal number of groups per each stage. In order to search for the optimal configuration, we gradually search in each direction separately while keeping all the others fixed. Then, we identify a set of promising search directions which we then combine to train new candidates. We repeat this step one more time and, then, from the final population of candidates we select the best models shown in Table 4. This procedure results in models that outperform recently proposed binary NAS methods (Bulat et al., 2020; Kim et al., 2020) by more than $5 \%$ while also being more computationally efficient.
152
+
153
+ (a) Effect of depth on accuracy. Each constellation represents a different network from which we vary only the number of blocks (shown by the annotated text), i.e. the depth. Increasing depth has diminishing returns. The specific networks for each constellation are described in Table 6 of Section A.1.
154
+
155
+ ![](images/a6f1129f9bc5c6469de046fb6ae559fd87f277ee34851f77e03117a3d3de53cf.jpg)
156
+ (b) Effect of number of groups and their placement on accuracy. Networks with the same structure are connected with the same type of line. Increasing group size drastically reduces BOPs with little impact on accuracy. The specific networks for each constellation are described in Table 6 of Section A.1.
157
+
158
+ Figure 2: Effect of (a) depth and (b) groups on accuracy as a function of BOPs on Imagenet. All results are reported for Stage I models. Best viewed in color.
159
+
160
+ ![](images/c1bcf685da685460bfa211aa19e015a32d36fae7d590281eb234c3e16c30080d.jpg)
161
+ Figure 3: Effect of adding the $1 \times 1$ binary conv. layer after the grouped conv. layers. The dashed line connects same models with and without the $1 \times 1$ conv. layer.
162
+
163
+ Table 4: Comparison on ImageNet between a few structures explored. All methods have approximately the same number of FLOPS: $1 . 1 \times 1 0 ^ { 8 }$ . $N _ { i }$ : number of blocks in stage $i$ , $E$ : width expansion ratio, $G _ { i }$ : group size of convs at stage $i$ . \* - denotes model trained using $\mathrm { A T + K D }$ (Martinez et al., 2020).
164
+
165
+ <table><tr><td rowspan="2">Architecture N0NiN2N3-E-G0:G1:G2:G3</td><td colspan="2">Acc. (%) Stage II</td><td colspan="2">Acc. (%) Stage I</td><td rowspan="2">BOPS ×109</td></tr><tr><td>Top-1</td><td>Top-5</td><td>Top-1</td><td>Top-5</td></tr><tr><td>1242-2-4:4:16:32</td><td>66.3</td><td>86.5</td><td>68.4</td><td>87.7</td><td>1.3</td></tr><tr><td>1262-2-4:4:16:32</td><td>66.8</td><td>86.8</td><td>69.0</td><td>88.1</td><td>1.5</td></tr><tr><td>1282-2-4:4:16:32</td><td>67.7</td><td>87.4</td><td>69.7</td><td>88.8</td><td>1.7</td></tr><tr><td>1242-2-4:4:8:16</td><td>67.0</td><td>87.1</td><td>68.9</td><td>88.0</td><td>1.6</td></tr><tr><td>1262-2-4:4:8:16</td><td>67.6</td><td>87.3</td><td>69.7</td><td>88.6</td><td>1.9</td></tr><tr><td>1282-2-4:4:8:16</td><td>67.8</td><td>87.5</td><td>69.7</td><td>88.7</td><td>2.2</td></tr><tr><td>1262-2-4:8:8:16</td><td>67.5</td><td>87.5</td><td>69.5</td><td>88.6</td><td>1.7</td></tr><tr><td>1262-2-4:8:8:16*</td><td>70.0</td><td>89.2</td><td>71.6</td><td>90.1</td><td>1.7</td></tr></table>
166
+
167
+ # 5 COMPARISON WITH STATE-OF-THE-ART
168
+
169
+ We compared our method against the current state-of-the-art in binary networks on the ImageNet dataset (Deng et al., 2009). Additional comparisons, including on CIFAR-100 (Krizhevsky et al., 2009), can be found in the supplementary material in Section A.2.
170
+
171
+ Training: The training procedure largely follows that of Martinez et al. (2020). In particular, we trained our networks using Adam optimizer (Kingma & Ba, 2014) for 75 epochs using a learning rate of $1 0 ^ { - 3 }$ that is decreased by 10 at epoch 40, 55 and 65. During Stage I, we set the weight decay to $1 0 ^ { - 5 }$ and to 0 during Stage II. Furthermore, following Martinez et al. (2020), during the first 10 epochs, we apply a learning rate warm-up Goyal et al. (2017). The images are augmented following the common strategy used in prior-work (He et al., 2016) by randomly scaling and cropping the images to a resolution of $2 2 4 \times 2 2 4 \mathrm { p x }$ . In addition to this, to avoid overfitting of the given expert filters, we used Mixup (Zhang et al., 2017) with $\alpha = 0 . 2$ . For testing, we followed the standard procedure of scaling the images to a resolution of $2 5 6 \mathrm { p x }$ first and then center cropping them. All models were trained on 4 V100 GPUs and implemented using PyTorch (Paszke et al., 2019).
172
+
173
+ Comparison against state-of-the-art: Table 5 shows our results ImageNet. When compared against methods with similar capacity (Rastegari et al., 2016; Courbariaux et al., 2015; 2016; Bulat & Tzimiropoulos, 2019; Martinez et al., 2020) (bottom section of the table), our method improves on top of the currently best performing method of Martinez et al. (2020) by almost $6 \%$ in terms of top-1 accuracy. Furthermore, our approach surpasses the accuracy of significantly larger and slower networks (upper section) by a wide margin.
174
+
175
+ Finally, we compared our method against two very recent works that use NAS to search for binary networks. As the results from Table 5 (middle section) show, our method outperforms them, again by a large margin, while being significantly more efficient.
176
+
177
+ In terms of computational requirements, our method maintains the same overall budget, having an equal or slightly lower number of FLOPs and BOPs (see Table. 5). Although our method does increase the model size, by $2 \mathbf { x }$ for a model that uses 4 experts, the run-time memory largely remains the same. For additional details see Section A.5 in the supplementary material.
178
+
179
+ Table 5: Comparison with state-of-the-art binary models on ImageNet. The upper section includes models that increase the network size/capacity (last column shows the capacity scaling), while the middle one binary NAS methods. \* - denotes models trained using $\mathrm { A T + K D }$ (Martinez et al., 2020). $^ \ddag$ - denotes ours with an improved training scheme, see Section A.6 in supplementary material for details.
180
+
181
+ <table><tr><td rowspan="2">Architecture</td><td colspan="2">Accuracy (%)</td><td colspan="2">Operations</td><td rowspan="2">#bits (W/A)</td></tr><tr><td>Top-1</td><td>Top-5</td><td>BOPS ×109</td><td>FLOPS ×108</td></tr><tr><td>ABC-Net (M,N = 5) (Lin et al.,2017)</td><td>65.0</td><td>85.9</td><td>42.5</td><td>1.3</td><td>(1/1)×5²</td></tr><tr><td>Struct. Approx. (Zhuang et al., 2019)</td><td>66.3</td><td>86.6</td><td>1</td><td>1</td><td>(1/1)x4</td></tr><tr><td>CBCN (Liu et al., 2019)</td><td>61.4</td><td>82.8</td><td>-</td><td>1</td><td>(1/1)×4</td></tr><tr><td>Ensemble (Zhu et al.,2019)</td><td>61.0</td><td>1</td><td>10.6</td><td>7.8</td><td>(1/1)×6</td></tr><tr><td>BATS (Bulat et al.,2020)</td><td>66.1</td><td>87.0</td><td>2.1</td><td>1.2</td><td>(1/1)</td></tr><tr><td>BNAS-F (Kim et al., 2020)</td><td>58.9</td><td>80.9</td><td>1.7</td><td>1.5</td><td>(1/1)</td></tr><tr><td>BNAS-G (Kim et al., 2020)</td><td>62.2</td><td>83.9</td><td>3.6</td><td>1.5</td><td>(1/1)</td></tr><tr><td>BNN (Courbariaux et al.,2016)</td><td>42.2</td><td>69.2</td><td>1.7</td><td>1.3</td><td>1/1</td></tr><tr><td>XNOR-Net (Rastegari et al.,2016)</td><td>51.2</td><td>73.2</td><td>1.7</td><td>1.3</td><td>1/1</td></tr><tr><td>CCNN(Xu &amp; Cheung,2019)</td><td>54.2</td><td>77.9</td><td>1.7</td><td>1.3</td><td>1/1</td></tr><tr><td>Bi-Real Net (Liu et al.,2018)</td><td>56.4</td><td>79.5</td><td>1.7</td><td>1.5</td><td>1/1</td></tr><tr><td>Rethink.BNN (Helwegen et al., 2019)</td><td>56.6</td><td>79.4</td><td>1.7</td><td>1.3</td><td>1/1</td></tr><tr><td>XNOR-Net++ (Bulat &amp; Tzimiropoulos,2019)</td><td>57.1</td><td>79.9</td><td>1.7</td><td>1.4</td><td>1/1</td></tr><tr><td>IR-Net (Qin et al., 2020)</td><td>58.1</td><td>80.0</td><td>1.7</td><td>1.3</td><td>1/1</td></tr><tr><td>CI-Net (Wang et al., 2019)</td><td>59.9</td><td>84.2</td><td>-</td><td>1</td><td>1/1</td></tr><tr><td>Real-to-Bin* (Martinez et al.,2020)</td><td>65.4</td><td>86.2</td><td>1.7</td><td>1.5</td><td>1/1</td></tr><tr><td>Ours</td><td>67.5</td><td>87.5</td><td>1.7</td><td>1.1</td><td>1/1</td></tr><tr><td>Ours*</td><td>70.0</td><td>89.2</td><td>1.7</td><td>1.1</td><td>1/1</td></tr><tr><td>Ourst</td><td>71.2</td><td>90.1</td><td>1.7</td><td>1.1</td><td>1/1</td></tr></table>
182
+
183
+ Comparison against CondConv: As mentioned in Section 4.1, a direct application of CondConv Yang et al. (2019) for the case of binary networks is problematic due to the so-called “double binarization problem”, i.e. binarization of the weights and then of their linear combination is required. Herein, we verify this experimentally: when training a fully binarized network using CondConv, we noticed a high degree of instability, especially during the initial phases of the training. For example, at the end of epoch 1, the accuracy of the binarized CondConv model is $1 \%$ vs $20 \%$ of the one using EBConv. The final accuracy of a binarized CondConv on Imagenet was $6 1 . 2 \%$ vs $6 3 . 8 \%$ compared to EBConv.
184
+
185
+ Additionally, as mentioned earlier, our proposed EBConv method uses less FLOPs (no multiplications required to combine the experts) and noticeably less memory at run-time (see Section A.5 in the appendix).
186
+
187
+ # 6 CONCLUSION
188
+
189
+ We proposed a three-fold approach for improving the accuracy of binary networks. Firstly, we improved model capacity at negligible cost. To this end, we proposed EBConv, the very first binary conditional computing layer which consists of data-specific expert binary filters and a very lightweight mechanism for selecting a single expert at a time. Secondly, we increased representation capacity by addressing the inherent information bottleneck in binary networks. For this purpose, we introduced an efficient width expansion mechanism which keeps the overall number of binary operations within the same budget. Thirdly, we improved network design, by proposing a principled binary network growth mechanism that unveils a set of network topologies of favorable properties. Overall, our method improves upon prior work, with no increase in computational cost by $\sim 6 \%$ , reaching a groundbreaking $\sim 7 1 \%$ on ImageNet classification.
190
+
191
+ # REFERENCES
192
+
193
+ Milad Alizadeh, Javier Fernandez-Marqu ´ es, Nicholas D Lane, and Yarin Gal. An empirical study of ´ binary neural networks’ optimisation. In International Conference on Learning Representations, 2018.
194
+
195
+ Emmanuel Bengio, Pierre-Luc Bacon, Joelle Pineau, and Doina Precup. Conditional computation in neural networks for faster models. arXiv preprint arXiv:1511.06297, 2015.
196
+
197
+ Yoshua Bengio, Nicholas Leonard, and Aaron Courville. Estimating or propagating gradients ´ through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432, 2013.
198
+
199
+ Adrian Bulat and Georgios Tzimiropoulos. XNOR-Net $^ { + + }$ : Improved binary neural networks. In British Machine Vision Conference, 2019.
200
+
201
+ Adrian Bulat, Georgios Tzimiropoulos, Jean Kossaifi, and Maja Pantic. Improved training of binary networks for human pose estimation and image recognition. arXiv preprint arXiv:1904.05868, 2019.
202
+
203
+ Adrian Bulat, Brais Martinez, and Georgios Tzimiropoulos. BATS: Binary ArchitecTure search. European Conference on Computer Vision, 2020.
204
+
205
+ Zhaowei Cai, Xiaodong He, Jian Sun, and Nuno Vasconcelos. Deep learning with low precision by half-wave gaussian quantization. In IEEE Conference on Computer Vision and Pattern Recognition, 2017.
206
+
207
+ Jianlong Chang, Xinbang Zhang, Yiwen Guo, Gaofeng Meng, Shiming Xiang, and Chunhong Pan. Differentiable architecture search with ensemble Gumbel-Softmax. arXiv preprint arXiv:1905.01786, 2019.
208
+
209
+ Zhourong Chen, Yang Li, Samy Bengio, and Si Si. You look twice: GaterNet for dynamic filter selection in CNNs. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 9172– 9180, 2019.
210
+
211
+ Matthieu Courbariaux, Yoshua Bengio, and Jean-Pierre David. BinaryConnect: Training deep neural networks with binary weights during propagations. In Advances on Neural Information Processing Systems, pp. 3123–3131, 2015.
212
+
213
+ Matthieu Courbariaux, Itay Hubara, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Binarized neural networks: Training deep neural networks with weights and activations constrained to $+ 1$ or -1. arXiv preprint arXiv:1602.02830, 2016.
214
+
215
+ Jifeng Dai, Haozhi Qi, Yuwen Xiong, Yi Li, Guodong Zhang, Han Hu, and Yichen Wei. Deformable convolutional networks. In IEEE International Conference on Computer Vision, pp. 764–773, 2017.
216
+
217
+ Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. ImageNet: A large-scale hierarchical image database. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 248–255, 2009.
218
+
219
+ Ruizhou Ding, Ting-Wu Chin, Zeye Liu, and Diana Marculescu. Regularizing activation distribution for training binarized deep networks. In IEEE Conference on Computer Vision and Pattern Recognition, 2019.
220
+
221
+ Julian Faraone, Nicholas Fraser, Michaela Blott, and Philip HW Leong. SYQ: Learning symmetric quantization for efficient deep neural networks. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 4300–4309, 2018.
222
+
223
+ Ruihao Gong, Xianglong Liu, Shenghu Jiang, Tianxiang Li, Peng Hu, Jiazhen Lin, Fengwei Yu, and Junjie Yan. Differentiable soft quantization: Bridging full-precision and low-bit neural networks. In IEEE International Conference on Computer Vision, pp. 4852–4861, 2019.
224
+
225
+ Priya Goyal, Piotr Dollar, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, An-´ drew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch SGD: Training ImageNet in 1 hour. arXiv preprint arXiv:1706.02677, 2017.
226
+
227
+ Sam Gross, Marc’Aurelio Ranzato, and Arthur Szlam. Hard mixtures of experts for large scale weakly supervised vision. In IEEE Conference on Computer Vision and Pattern Recognition, 2017.
228
+
229
+ Emil Julius Gumbel. Statistical theory of extreme values and some practical applications: a series of lectures, volume 33. US Government Printing Office, 1948.
230
+
231
+ Pengsheng Guo, Chen-Yu Lee, and Daniel Ulbricht. Learning to branch for multi-task learning. arXiv preprint arXiv:2006.01895, 2020.
232
+
233
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on ImageNet classification. In IEEE International Conference on Computer Vision, pp. 1026–1034, 2015.
234
+
235
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 770–778, 2016.
236
+
237
+ Koen Helwegen, James Widdicombe, Lukas Geiger, Zechun Liu, Kwang-Ting Cheng, and Roeland Nusselder. Latent weights do not exist: Rethinking binarized neural network optimization. Advances on Neural Information Processing Systems, 2019.
238
+
239
+ Paras Jain, Ajay Jain, Aniruddha Nrusimha, Amir Gholami, Pieter Abbeel, Kurt Keutzer, Ion Stoica, and Joseph E Gonzalez. Checkmate: Breaking the memory wall with optimal tensor rematerialization. arXiv preprint arXiv:1910.02653, 2019.
240
+
241
+ Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with Gumbel-Softmax. arXiv preprint arXiv:1611.01144, 2016.
242
+
243
+ Sangil Jung, Changyong Son, Seohyung Lee, Jinwoo Son, Jae-Joon Han, Youngjun Kwak, Sung Ju Hwang, and Changkyu Choi. Learning to quantize deep networks by optimizing quantization intervals with task loss. In IEEE Conference on Computer Vision and Pattern Recognition, 2019.
244
+
245
+ Dahyun Kim, Kunal Pratap Singh, and Jonghyun Choi. Learning architectures for binary networks. In European Conference on Computer Vision, 2020.
246
+
247
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
248
+
249
+ Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
250
+
251
+ Xiaofan Lin, Cong Zhao, and Wei Pan. Towards accurate binary convolutional neural network. In Advances on Neural Information Processing Systems, pp. 345–353, 2017.
252
+
253
+ Chunlei Liu, Wenrui Ding, Xin Xia, Baochang Zhang, Jiaxin Gu, Jianzhuang Liu, Rongrong Ji, and David Doermann. Circulant binary convolutional networks: Enhancing the performance of 1-bit DCNNs with circulant back propagation. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 2691–2699, 2019.
254
+
255
+ Hanxiao Liu, Karen Simonyan, and Yiming Yang. DARTS: Differentiable architecture search. arXiv preprint arXiv:1806.09055, 2018.
256
+
257
+ Zechun Liu, Baoyuan Wu, Wenhan Luo, Xin Yang, Wei Liu, and Kwang-Ting Cheng. Bi-Real Net: Enhancing the performance of 1-bit CNNs with improved representational capability and advanced training algorithm. In European Conference on Computer Vision, pp. 747–763, 2018.
258
+
259
+ Chris J Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. arXiv preprint arXiv:1611.00712, 2016.
260
+
261
+ Brais Martinez, Jing Yang, Adrian Bulat, and Georgios Tzimiropoulos. Training binary neural networks with real-to-binary convolutions. International Conference on Learning Representations, 2020.
262
+
263
+ Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. PyTorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems. 2019.
264
+
265
+ Hai Phan, Yihui He, Marios Savvides, Zhiqiang Shen, et al. Mobinet: A mobile binary network for image classification. In IEEE Winter Conference on Applications of Computer Vision, pp. 3453–3462, 2020.
266
+
267
+ Haotong Qin, Ruihao Gong, Xianglong Liu, Mingzhu Shen, Ziran Wei, Fengwei Yu, and Jingkuan Song. Forward and backward information retention for accurate binary neural networks. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 2250–2259, 2020.
268
+
269
+ Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. XNOR-Net: ImageNet classification using binary convolutional neural networks. In European Conference on Computer Vision, 2016.
270
+
271
+ Esteban Real, Alok Aggarwal, Yanping Huang, and Quoc V Le. Regularized evolution for image classifier architecture search. In AAAI Conference on Artificial Intelligence, 2019.
272
+
273
+ Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. arXiv preprint arXiv:1701.06538, 2017.
274
+
275
+ Mingzhu Shen, Kai Han, Chunjing Xu, and Yunhe Wang. Searching for accurate binary neural architectures. In IEEE International Conference on Computer Vision Workshops, 2019.
276
+
277
+ Mingxing Tan and Quoc V Le. EfficientNet: Rethinking model scaling for convolutional neural networks. International Conference on Machine Learning, 2019.
278
+
279
+ Ravi Teja Mullapudi, William R Mark, Noam Shazeer, and Kayvon Fatahalian. HydraNets: Specialized dynamic architectures for efficient inference. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 8080–8089, 2018.
280
+
281
+ Xin Wang, Fisher Yu, Zi-Yi Dou, Trevor Darrell, and Joseph E Gonzalez. SkipNet: Learning dynamic routing in convolutional networks. In European Conference on Computer Vision, 2018.
282
+
283
+ Ziwei Wang, Jiwen Lu, Chenxin Tao, Jie Zhou, and Qi Tian. Learning channel-wise interactions for binary convolutional neural networks. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 568–577, 2019.
284
+
285
+ Zuxuan Wu, Tushar Nagarajan, Abhishek Kumar, Steven Rennie, Larry S Davis, Kristen Grauman, and Rogerio Feris. Blockdrop: Dynamic inference paths in residual networks. In IEEE Conference on Computer Vision and Pattern Recognition, 2018.
286
+
287
+ Zhe Xu and Ray CC Cheung. Accurate and compact convolutional neural networks with trained binarization. British Machine Vision Conference, 2019.
288
+
289
+ Brandon Yang, Gabriel Bender, Quoc V Le, and Jiquan Ngiam. CondConv: Conditionally parameterized convolutions for efficient inference. In Advances on Neural Information Processing Systems, pp. 1305–1316, 2019.
290
+
291
+ Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. British Machine Vision Conference, 2016.
292
+
293
+ Dongqing Zhang, Jiaolong Yang, Dongqiangzi Ye, and Gang Hua. Lq-nets: Learned quantization for highly accurate and compact deep neural networks. In European Conference on Computer Vision, pp. 365–382, 2018.
294
+
295
+ Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017.
296
+
297
+ Shuchang Zhou, Yuxin Wu, Zekun Ni, Xinyu Zhou, He Wen, and Yuheng Zou. DoReFa-Net: Training low bitwidth convolutional neural networks with low bitwidth gradients. arXiv, 2016.
298
+
299
+ Chenzhuo Zhu, Song Han, Huizi Mao, and William J Dally. Trained ternary quantization. International Conference on Learning Representations, 2017.
300
+
301
+ Shilin Zhu, Xin Dong, and Hao Su. Binary ensemble neural network: More bits per network or more networks per bit? In IEEE Conference on Computer Vision and Pattern Recognition, pp. 4923–4932, 2019.
302
+
303
+ Bohan Zhuang, Chunhua Shen, Mingkui Tan, Lingqiao Liu, and Ian Reid. Structured binary neural networks for accurate image classification and semantic segmentation. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 413–422, 2019.
304
+
305
+ # A APPENDIX
306
+
307
+ # A.1 DETAILED NETWORK DEFINITIONS FOR FIG. 2
308
+
309
+ Table 6: Detailed network definitions for each of the constellations presented in Fig. 2. The location in each architecture is numbered from left to right (models with more BOPs are located towards the right).
310
+
311
+ (a) Network definitions for Fig. 2a
312
+
313
+ <table><tr><td>Constell. #</td><td>Location</td><td>Configuration</td></tr><tr><td rowspan="6">1</td><td>1</td><td>2222-1-1:1:1:1</td></tr><tr><td>2</td><td>1182-1-1:1:1:1</td></tr><tr><td>3</td><td>1282-1-1:1:1:1</td></tr><tr><td>4</td><td>1184-1-1:1:1:1</td></tr><tr><td>5</td><td>1188-1-1:1:1:1</td></tr><tr><td>6</td><td>1288-1-1:1:1:1</td></tr><tr><td rowspan="6">2</td><td>1</td><td>1132-2-4:4:4:4</td></tr><tr><td>2</td><td>1133-2-4:4:4:4</td></tr><tr><td>3</td><td>1233-2-4:4:4:4</td></tr><tr><td></td><td>2233-2-4:4:4:4</td></tr><tr><td>4</td><td>2282-2-4:4:4:4</td></tr><tr><td>5 6</td><td>1188-2-4:4:4:4</td></tr><tr><td rowspan="5">3</td><td>1</td><td>1242-2-4:4:8:16</td></tr><tr><td>2</td><td>1262-2-4:4:8:16</td></tr><tr><td>3</td><td>1282-2-4:4:8:16</td></tr><tr><td></td><td></td></tr><tr><td>4</td><td>1284-2-4:4:8:16</td></tr></table>
314
+
315
+ (b) Network definitions for Fig. 2b
316
+
317
+ <table><tr><td>Constell. #</td><td>Location</td><td>Configuration</td></tr><tr><td rowspan="4">1</td><td>1</td><td>1142-2-4:8:16:32</td></tr><tr><td>2</td><td>1142-2-4:4:16:16</td></tr><tr><td>3</td><td>1142-2-4:8:8:16</td></tr><tr><td>4</td><td>1142-2-4:4:8:16</td></tr><tr><td rowspan="4">2</td><td>1</td><td>1242-2-4:8:16:32</td></tr><tr><td>2</td><td>1242-2-4:4:16:16</td></tr><tr><td>3</td><td>1242-2-4:8:8:16</td></tr><tr><td>4</td><td>1242-2-4:4:8:16</td></tr><tr><td rowspan="4">3</td><td>1</td><td>1162-2-4:8:16:32</td></tr><tr><td>2</td><td>1162-2-4:4:16:16</td></tr><tr><td>3</td><td>1162-2-4:8:8:16</td></tr><tr><td>4</td><td>1162-2-4:4:8:16</td></tr><tr><td rowspan="3">4</td><td>2</td><td>1162-2-4:4:16:16</td></tr><tr><td>3</td><td>1162-2-4:8:8:16</td></tr><tr><td>4</td><td>1162-2-4:4:8:16</td></tr></table>
318
+
319
+ # A.2 ADDITIONAL COMPARISONS
320
+
321
+ Herein we present an extended comparison with both binary and low-bit quantization methods on ImageNet. As the results from Table 7 show, our method significantly surpasses both the binary and the more computationally expensive low-bit quantization networks. Similar results can be observed on the CIFAR-100 (Krizhevsky et al., 2009) dataset where our approach sets a new state-of-the-art result.
322
+
323
+ # A.3 ABLATION STUDIES
324
+
325
+ # A.3.1 REAL-VALUED DOWNSAMPLING DECOMPOSITION
326
+
327
+ TableThe efficient width expansion mechanism of Section 4.2 preserves the amount of BOPs constant for binary convolutions. However, width expansion also affects the real-valued downsampling (linear) layers. To preserve the number of FLOPs constant, as width expands, for such a layer too, we propose to decompose it into two smaller ones so that the connection between them is reduced by a factor $r = k ^ { 2 }$ , i.e. instead of using $[ \mathrm { C o n v } ( C _ { i n } , C _ { o u t } ) ]$ , we propose to use , Cin → Conv( Cin , Cout)]. Herein, we explore a few variants by adding non-linearities between them. Our results, reported in Table 9, show that the non-linear versions are more expressive and bridge the gap caused by the decrease in the layer’s size. The proposed adaption and the original one are depicted in Fig. 4.
328
+
329
+ 9: Comparison on ImageNet between various types of downsampling layers (Stage I models). All decompositions reduce the complexity by $4 \mathbf { x }$ .
330
+
331
+ <table><tr><td rowspan="2">Decomposition</td><td colspan="2">Accuracy (%)</td></tr><tr><td>Top-1</td><td>Top-5</td></tr><tr><td>None</td><td>67.4</td><td>87.2</td></tr><tr><td>Linear</td><td>66.5</td><td>86.6</td></tr><tr><td>Non-linear (ReLU)</td><td>67.2</td><td>87.2</td></tr><tr><td>Non-linear (PreLU)</td><td>67.5</td><td>87.3</td></tr></table>
332
+
333
+ Table 7: Comparison with state-of-the-art binary models on ImageNet, including against methods that use low-bit quantization (upper section) and ones that increase the network size/capacity (second section). The third section compares against binary NAS methods. Last column shows the capacity scaling used, while \* - denotes models trained using $\mathrm { A T + K D }$ (Martinez et al., 2020). $^ \ddag$ - denotes ours with an improved training scheme, see Section A.6.
334
+
335
+ <table><tr><td rowspan="2">Architecture</td><td colspan="2">Accuracy (%)</td><td colspan="2">Operations</td><td rowspan="2">#bits (W/A)</td></tr><tr><td>Top-1</td><td>Top-5</td><td>BOPS ×109</td><td>FLOPS ×108</td></tr><tr><td>BWN (Courbariaux et al.,2016)</td><td>60.8</td><td>83.0</td><td></td><td></td><td>1/32</td></tr><tr><td>DSQ (Gong et al., 2019)</td><td>63.7</td><td>-</td><td></td><td></td><td>1/32</td></tr><tr><td>TTQ (Zhu et al., 2017)</td><td>66.6</td><td>87.2</td><td></td><td></td><td>2/32</td></tr><tr><td>QIL (Jung et al., 2019)</td><td>65.7</td><td>=</td><td></td><td></td><td>2/2</td></tr><tr><td>HWGQ (Cai et al., 2017)</td><td>59.6</td><td>82.2</td><td></td><td></td><td>1/2</td></tr><tr><td>LQ-Net (Zhang et al.,2018)</td><td>59.6</td><td>82.2</td><td></td><td></td><td>1/2</td></tr><tr><td>SYQ (Faraone et al., 2018)</td><td>55.4</td><td>78.6</td><td></td><td></td><td>1/2</td></tr><tr><td>DOREFA-Net (Zhou et al.,2016)</td><td>62.6</td><td>84.4</td><td>=</td><td></td><td>1/2</td></tr><tr><td>ABC-Net (M, N = 1) (Lin et al.,2017)</td><td>42.2</td><td>67.6</td><td>1/1</td><td></td><td></td></tr><tr><td>ABC-Net (M,N = 5) (Lin et al.,2017)</td><td>65.0</td><td>85.9</td><td>42.5</td><td>1.3</td><td>(1/1)×5²</td></tr><tr><td>Struct. Approx. (Zhuang et al., 2019)</td><td>66.3</td><td>86.6</td><td>1</td><td>1</td><td>(1/1)×4</td></tr><tr><td>CBCN (Liu et al., 2019)</td><td>61.4</td><td>82.8</td><td>1</td><td>-</td><td>(1/1)×4</td></tr><tr><td>Ensemble (Zhu et al., 2019)</td><td>61.0</td><td>-</td><td>10.6</td><td>7.8</td><td>(1/1)×6</td></tr><tr><td>BATS (Bulat et al.,2020)</td><td>66.1</td><td>87.0</td><td>2.1</td><td>1.2</td><td>(1/1)</td></tr><tr><td>BNAS-F (Kim et al., 2020)</td><td>58.9</td><td>80.9</td><td>1.7</td><td>1.5</td><td>(1/1)</td></tr><tr><td>BNAS-G (Kim et al., 2020)</td><td>62.2</td><td>83.9</td><td>3.6</td><td>1.5</td><td>(1/1)</td></tr><tr><td>BNN (Courbariaux et al.,2016)</td><td>42.2</td><td>69.2</td><td>1.7</td><td>1.3</td><td>1/1</td></tr><tr><td>XNOR-Net (Rastegari et al.,2016)</td><td>51.2</td><td>73.2</td><td>1.7</td><td>1.3</td><td>1/1</td></tr><tr><td>CCNN Xu&amp; Cheung (2019)</td><td>54.2</td><td>77.9</td><td>1.7</td><td>1.3</td><td>1/1</td></tr><tr><td>Bi-Real Net (Liu et al.,2018)</td><td>56.4</td><td>79.5</td><td>1.7</td><td>1.5</td><td>1/1</td></tr><tr><td>Rethink. BNN (Helwegen et al.,2019)</td><td>56.6</td><td>79.4</td><td>1.7</td><td>1.3</td><td>1/1</td></tr><tr><td>XNOR-Net++ (Bulat &amp; Tzimiropoulos,2019)</td><td>57.1</td><td>79.9</td><td>1.7</td><td>1.4</td><td>1/1</td></tr><tr><td>IR-Net (Qin et al., 2020)</td><td>58.1</td><td>80.0</td><td>1.7</td><td>1.3</td><td>1/1</td></tr><tr><td>CI-Net (Wang et al.,2019)</td><td>59.9</td><td>84.2</td><td>-</td><td>1</td><td>1/1</td></tr><tr><td>Real-to-Bin* (Martinez et al.,2020)</td><td>65.4</td><td>86.2</td><td>1.7</td><td>1.5</td><td>1/1</td></tr><tr><td>Ours</td><td>67.5</td><td>87.5</td><td>1.7</td><td>1.1</td><td>1/1</td></tr><tr><td>Ours*</td><td>70.0</td><td>89.2</td><td>1.7</td><td>1.1</td><td>1/1</td></tr><tr><td>Ourst</td><td>71.2</td><td>90.1</td><td>1.7</td><td>1.1</td><td>1/1</td></tr></table>
336
+
337
+ Table 8: Comparison with state-of-the-art binary models on CIFAR100. Last column shows the capacity scaling used, while \* - denotes models trained using $\mathrm { A T + K D }$ (Martinez et al., 2020).
338
+
339
+ <table><tr><td>Architecture</td><td>Accuracy (%)</td><td># bits (W/A)</td></tr><tr><td>XNOR-Net (ResNet18) (Rastegari et al., 2016)</td><td>66.1</td><td>1/1</td></tr><tr><td>XNOR-Net (WRN40) (Rastegari et al., 2016)</td><td>73.2</td><td>1/1</td></tr><tr><td>CBCN (Liu et al., 2019)</td><td>74.8</td><td>(1/1)×4</td></tr><tr><td>Real-to-Bin* (Martinez et al., 2020)</td><td>76.2</td><td>1/1</td></tr><tr><td>Ours</td><td>76.5</td><td>1/1</td></tr><tr><td>Ours*</td><td>77.8</td><td>1/1</td></tr></table>
340
+
341
+ # A.3.2 DATA AUGMENTATION
342
+
343
+ Network binarization is considered to be an extreme case of regularization Courbariaux et al. (2015). However, recent work suggests that data augmentation remains an important, necessary aspect for successfully training accurate binary networks Martinez et al. (2020). Due to their lower representational power, Martinez et al. (2020) argues that, for the binarization stage, a weaker augmentation, compared to real-valued networks, should be used on large datasets such as ImageNet.
344
+
345
+ Table 10: Impact of temperature $\tau$ on accuracy (Stage I models) on ImageNet.
346
+
347
+ <table><tr><td>T</td><td>0.02</td><td>1</td><td>5</td><td>25</td></tr><tr><td>Top-1 acc.</td><td>65.4</td><td>65.5</td><td>65.4</td><td>64.6</td></tr></table>
348
+
349
+ (a) The vanilla downsampling block.
350
+
351
+ ![](images/e90dd59b9b5c57790ca02328cc3dbb30f00e247351ff3352cd6ceb979b4f2ef4.jpg)
352
+ (b) The proposed non-linear decomposition: We use 2 layers, with a non-linearity in-between, that maps $C _ { i n }$ to $C _ { i n } / n$ (here $n = 4$ ) and then back to $C _ { o u t }$ .
353
+
354
+ Figure 4: The (a) vanilla and (b) proposed downsampling block. This module is used in 3 places inside the network where the number of channels changes between macro-modules.
355
+
356
+ As opposed to this, we found that more aggressive augmentation, similar to the one used for realvalued networks in He et al. (2016) or mixup Zhang et al. (2017), leads to consistently better results. For example, using mixup on top of random scaling and cropping improves the results by $0 . 4 \%$ . In comparison, when we trained Real-to-Bin Martinez et al. (2020) with mixup, the accuracy dropped by $0 . 2 5 \%$ for Stage I, and $0 . 8 \%$ for Stage II. This suggests that, thanks to the proposed methods, we are getting closer than ever to the capacity of a real-valued model (which is amenable to stronger augmentations).
357
+
358
+ # A.3.3 EFFECT OF TEMPERATURE
359
+
360
+ One important component that influences the training efficiency of the gating mechanism is the softmax temperature $\tau$ . As mentioned earlier, lower temperatures will produce spikier gradients while lower ones will induce the opposite. We explore the effect of various temperatures in Table 10. It can be seen that our results are stable over a wide range $\tau = [ 0 . 0 2 , 5 ]$ . Moreover, to validate the importance of using Eq. 4 for computing the gradients for back-propagation, we did an experiment where we replaced it with that of a sigmoid. Unsurprisingly, Stage I accuracy drops from $6 5 . 5 \%$ to $6 2 . 7 \%$ . This further highlights that the proposed form of the gating function is a key enabler for training higher performing models using EBConv.
361
+
362
+ # A.4 NETWORK ARCHITECTURE NAMING CONVENTION
363
+
364
+ This section clarifies the naming convention used in our paper: We define a network using the following notation $N _ { 0 } N _ { 1 } N _ { 2 } N _ { 3 } - E - G _ { 0 } : G _ { 1 } : G _ { 2 } : G _ { 3 }$ . Here $E$ is the expansion rate, defined as a multiplier with respect to a vanilla ResNet. For example a network with the first block having 128 output channels will have an expansion rate of 2. $N _ { i }$ and $G _ { i } , i = \{ 0 , 1 , 2 , 3 \}$ represent the number of convolutional blocks, and respectively, the number of groups used by all convolutions at each stage. Note that a ResNet has 4 stages. We graphically show the correspondence between this notation and the network structure in Fig. 5.
365
+
366
+ # A.5 MEMORY USAGE ANALYSIS
367
+
368
+ Model storage size: Current network binarization methods preserve the first and the last layer real-valued (Rastegari et al., 2016; Liu et al., 2018; Bulat & Tzimiropoulos, 2019). As such, for a ResNet-18 binary model trained on Imagenet, predicting 1000 classes, more than 2MB of the total space is taken by these parameters. As a result, our 4 expert model takes only $2 \mathbf { x }$ more space on a device. This is still noticeably less than binary models that attempt to increase their accuracy by increasing their model size (Lin et al., 2017) or by using an ensemble of binary networks (Zhu et al., 2019). Full results are shown in Table 11.
369
+
370
+ Run-time memory: In a typical deep network, the memory consumed by activations far outweigh that of the parameters (Jain et al., 2019). As such even a $\approx 4 \times$ fold increase in the number of binary parameters (for the case of 4 experts) results in a small difference due to the above effect.
371
+
372
+ ![](images/848a4b39bf54626a2362c2303a51a1d6bfdc4e1c6953376ee3ec6ad8543326a1.jpg)
373
+ Figure 5: The overall network architecture of our final model defined as 1262-2-4:8:8:16. Inline with the current practice (Rastegari et al., 2016) the first (dark-red) and last layer (light-blue) are kept real. The yellow and dark-blue rectangles represent the binary residual blocks described in Sections 4.2 and 4.3 of the main paper with the text indicating the number of output channels and the number of groups. All blocks inside a macro-module, represented by a rectangle with dashed lines, operate at the same resolution, with the downsampling operation taking place at the first layer via strided convolution (dark-blue).
374
+
375
+ Table 11: Comparison with state-of-the-art binary models on ImageNet, including against methods that use low-bit quantization (upper section) and ones that increase the network size/capacity (second section). The third section compares against binary NAS methods. Last column shows the capacity scaling used, while \* - denotes our model trained using $\mathrm { A T + K D }$ (Martinez et al., 2020). $\ddagger$ - denotes ours with an improved training scheme, see Section A.6.
376
+
377
+ <table><tr><td rowspan="2">Architecture</td><td colspan="2">Accuracy (%)</td><td colspan="2">Operations</td><td rowspan="2">Model size (MB)</td><td rowspan="2">#bits (W/A)</td></tr><tr><td>Top-1</td><td>Top-5</td><td>BOPS ×109</td><td>FLOPS ×108</td></tr><tr><td>ABC-Net (M,N = 5) (Lin et al.,2017)</td><td>65.0</td><td>85.9</td><td>42.5</td><td>1.3</td><td>37.1</td><td>(1/1)×5²</td></tr><tr><td>Struct. Approx. (Zhuang et al.,2019)</td><td>66.3</td><td>86.6</td><td>-</td><td>-</td><td>7.7</td><td>(1/1)x4</td></tr><tr><td>Ensemble (Zhu et al.,2019)</td><td>61.0</td><td>1</td><td>10.6</td><td>7.8</td><td>21</td><td>(1/1)x6</td></tr><tr><td>BNN (Courbariaux et al., 2016)</td><td>42.2</td><td>69.2</td><td>1.7</td><td>1.3</td><td>3.5</td><td>1/1</td></tr><tr><td>XNOR-Net (Rastegari et al., 2016)</td><td>51.2</td><td>73.2</td><td>1.7</td><td>1.3</td><td>3.5</td><td>1/1</td></tr><tr><td>Real-to-Bin (Martinez et al., 2020)</td><td>65.4</td><td>86.2</td><td>1.7</td><td>1.5</td><td>4.0</td><td>1/1</td></tr><tr><td>Ours (num. experts = 4)</td><td>67.5</td><td>87.5</td><td>1.7</td><td>1.1</td><td>7.8</td><td>1/1</td></tr><tr><td>Ours* (num. experts = 4)</td><td>70.0</td><td>89.2</td><td>1.7</td><td>1.1</td><td>7.8</td><td>1/1</td></tr><tr><td>Ourst (num. experts = 4)</td><td>71.2</td><td>90.1</td><td>1.7</td><td>1.1</td><td>7.8</td><td>1/1</td></tr></table>
378
+
379
+ Furthermore, since only a single expert is active for a given input this effect is further reduced. This is confirmed by our measurements reported below. As a simple test bed for the later we leverage the built-in memory profiler from PyTorch: we measure and report the memory consumption for a convolutional layer with 512 input and output channels and a kernel size of $3 \times 3$ . We set the input tensor to be of size $1 \times 5 1 2 \times 1 6 \times 1 6$ . As it can be seen, since a single expert is active for a given image, our EBConv layer has a minimal impact on the memory usage. Bellow we show the profiler output with the operations sorted in descending order, based on memory. For brevity, we show only the top 10 contributors.
380
+
381
+ Memory profiling output for a normal convolutional layer, in descending order, based on memory:
382
+
383
+ <table><tr><td>Name</td><td>CPU Mem</td><td>Self CPU Mem</td></tr><tr><td>conv2d</td><td>512.00 Kb</td><td>0b</td></tr><tr><td>convolution</td><td>512.00 Kb</td><td>0b</td></tr><tr><td>_convolution</td><td>512.00 Kb</td><td>ob</td></tr></table>
384
+
385
+ Memory profiling output for EBConv (ours), in descending order, based on memory:
386
+
387
+ <table><tr><td>mkldnn_convolution</td><td>512.00 Kb 0b</td></tr><tr><td>empty</td><td>512.00 Kb 512.00 Kb</td></tr><tr><td>size 0b</td><td>0b</td></tr><tr><td>contiguous</td><td>0 b 0b</td></tr><tr><td>as_strided_ 0</td><td>b 0 b</td></tr></table>
388
+
389
+ <table><tr><td>Name</td><td>CPU Mem</td><td>Self CPU Mem</td></tr><tr><td>empty</td><td>514.02 Kb</td><td>514.02 Kb</td></tr><tr><td>conv2d</td><td>512.00 Kb</td><td>0 b</td></tr><tr><td>convolution</td><td>512.00 Kb</td><td>0 b</td></tr><tr><td>_convolution</td><td>512.00 Kb</td><td>0 b</td></tr><tr><td>mkldnn_convolution</td><td>512.00 Kb</td><td>0 b</td></tr><tr><td>adaptive_avg_pool2d</td><td>2.00 Kb</td><td>0 b</td></tr><tr><td>mean</td><td>2.00 Kb</td><td>0 b</td></tr><tr><td>sum_out</td><td>2.00 Kb</td><td>0 b</td></tr><tr><td>addmm</td><td>16b</td><td>16b</td></tr><tr><td>softmax</td><td>16 b</td><td>0b</td></tr><tr><td>_softmax</td><td>16 b</td><td>0b</td></tr></table>
390
+
391
+ Memory profiling output for CondConv (Yang et al., 2019), in descending order, based on memory:
392
+
393
+ <table><tr><td>Name</td><td>CPU Mem</td><td>Self CPU Mem</td></tr><tr><td>matmul</td><td>9.00 Mb</td><td>0b</td></tr><tr><td>mm</td><td>9.00 Mb</td><td>0b</td></tr><tr><td>resize_</td><td>9.00 Mb</td><td>9.00 Mb</td></tr><tr><td>empty</td><td>514.02 Kb</td><td>514.02 Kb</td></tr><tr><td>conv2d</td><td>512.00 Kb</td><td>0b</td></tr><tr><td>convolution</td><td>512.00 Kb</td><td>0 b</td></tr><tr><td>_convolution</td><td>512.00 Kb</td><td>0 b</td></tr><tr><td>mkldnn_convolution</td><td>512.00 Kb</td><td>0 b</td></tr><tr><td>adaptive_avg_pool2d</td><td>2.00 )Kb</td><td>0 b</td></tr><tr><td>mean</td><td>2.00 Kb</td><td>0 b</td></tr></table>
394
+
395
+ Furthermore, as the profiler outputs show, for the case of CondConv (Yang et al., 2019), the additional multiplication operations required to combine the experts together significantly increase the run-time memory consumption, dominating it, in fact, for low batch sizes – a typical scenario for models deployed on mobile devices. This further showcases the efficiency of the proposed method. We note that the numbers of BOPs and FLOPs of our binary model will remain constant as the batch size increases because the number of operations itself does not change (with the exception of the linear increase induced by the number of samples within the batch). Additionally, for batch sizes larger than 1, there will be a small cost incurred for the actual reading (fetching) of the weights from the memory. However, this cost is insignificant. Finally, we note that, in most cases, when binary networks are deployed on edge devices, a batch size of 1 is expected.
396
+
397
+ # A.6 IMPROVED TRAINING SCHEME WITH STRONGER TEACHER
398
+
399
+ A key improvement proposed by Martinez et al. (2020) is the real-to-binary attention transfer and knowledge distillation mechanism. Therein, the authors suggest that using a stronger teacher does not improve the accuracy further, hence they use a real-valued ResNet-18 model as a teacher. Here, we speculate that the increase in representational capacity offered by the proposed model could benefit in fact from a stronger teacher. To validate this hypothesis, we train two real-valued teacher models of different capacity (controlled by depth): one scoring $7 2 . 5 \%$ Top-1 accuracy on ImageNet and a larger one scoring $7 6 . 0 \%$ . As the results from Table 12 show, our model can exploit the knowledge contained in a stronger teacher network, improving the overall performance by $1 . 2 \%$ . Throughout the paper, we mark the results obtained using the stronger teacher with $\ddagger$ .
400
+
401
+ We note that for training we largely preserve the gradual distillation approach described in (Martinez et al., 2020): In particular, at Step I, we train a full precision model with a structure that matches that of our binary network. At Step II, we use the previous model as a teacher and train a student with binary activations and real-valued weights. At the end of this step, we also perform our weight expansion strategy, propagating the trained weights across all experts following the optimization procedure described in Section 4.1. Finally, we use the model produced at the previous step as a teacher, training a fully binary network.
402
+
403
+ Table 12: Impact of the teacher used on the final accuracy of the model on ImageNet.
404
+
405
+ <table><tr><td>FP32 Teacher</td><td>Binary Student</td></tr><tr><td>72.5%</td><td>70.0%</td></tr><tr><td>76.0%</td><td>71.2%</td></tr></table>
406
+
407
+ # B SUMMARY OF PRIOR WORK COMPONENTS USED
408
+
409
+ Herein we detail some of the methodological improvements proposed in prior works and also adopted for our strong baseline. We note, that most of these improvements are put together to create the strong baseline introduced in (Martinez et al., 2020) which is also the starting point of our work.
410
+
411
+ # B.1 PER-CHANNEL SCALING FACTORS
412
+
413
+ In order to minimize the reconstruction error between the full precision and binary convolution, in Rastegari et al. (2016), channel-wise real-valued scaling factors are used to modulate the output of the binary convolutions. In Rastegari et al. (2016), the authors proposed to calculate their values using an analytical solution that attempts to minimize the quantization error. The subsequent work of Bulat & Tzimiropoulos (2019) advocates for scaling factors learned via back-propagation by minimizing the task loss. In this work, we adopted the latter, learning one scaling factor per channel via back-propagation.
414
+
415
+ # B.2 DOUBLE-SKIP CONNECTIONS
416
+
417
+ Originally proposed by Liu et al. (2018), the double-skip connection mechanism adds a skip (i.e. an identity) connection around each binary convolutional layer. This is in contrast with a typical ResNet block (He et al., 2016) where the skip connection is applied at a block level. The main idea behind it is to preserve a real-valued signal alongside the binary one, improving overall the network’s capacity. We also note that a network with skip connections around all binary layers will also preserve a full precision data path that can improve both the gradients and the information flow.
418
+
419
+ # B.3 PRELU ACTIVATIONS
420
+
421
+ Rastegari et al. (2016) showed that, despite the non-linear nature of binary networks, ReLU nonlinearities added after the binary convolutions can further improve the model’s accuracy. However, a ReLU completely eliminates negative values which in Bulat et al. (2019) is found to cause training instabilities. To alleviate this, Bulat et al. (2019) proposes to use a PReLU (He et al., 2015) activation instead. Thanks to its negative slope, it can better preserve the full spectrum of values produced by a binary convolution.
422
+
423
+ # B.4 2-STAGE BNN TRAINING
424
+
425
+ Binary neural networks are notably harder to optimize in comparison with their full precision counterparts (Rastegari et al., 2016; Courbariaux et al., 2015; 2016). Since most of the performance degradation comes from binarizing the signal itself (i.e. activations), (Bulat et al., 2019) proposes a two-staged optimization strategy where the network is gradually binarized. During Stage I, a network with full precision weights and binary activations is trained. Then, in Stage II, a fully binary network is trained by initializing the model from the previous stage. As detailed in Section 5, the training scheduler in both stages is identical, with the exception of the weight decay, which for Stage II, is set to 0 Martinez et al. (2020).
426
+
427
+ # B.5 REAL-TO-BINARY KNOWLEDGE DISTILLATION
428
+
429
+ A reasonable objective for training highly accurate binary networks is that the features learned by a binary network should closely match those of a full precision one up to an approximation error induced by the quantization process (Rastegari et al., 2016; Martinez et al., 2020). In order to explicitly enforce this, Martinez et al. (2020) proposes to add after each block an $\ell _ { 2 }$ loss between attention maps calculated from the binary and full precision activations. The full precision guiding signal typically comes from an identically structured pretrained real-valued model. To further enhance the efficacy of this process, Martinez et al. (2020) introduces a trainable data-driven scaling factor for modulating the output of the binary convolution. We note that this process is used only on top of our best models, and is marked in the tables using an ”\*”.
430
+
431
+ Finally, we note that the gap between the real-valued and binary models is $\sim 3 . 5 - 4 \%$ (depending on the configuration). In comparison, the next best method, Martinez et al. (2020) has a gap of $\sim 5 \%$ . This shows that while the proposed structure is tuned for binary networks, it will also perform well for the case of full precision networks. This is perhaps not too surprising since a model easy to binarize should be also easy to train in full precision, the opposite however is not always true.
432
+
433
+ # C OVERALL BINARY NETWORKS STRUCTURE
434
+
435
+ Herein, we would like to add a few general notes about how a Binary Network is typically constructed. Following (Rastegari et al., 2016) and Courbariaux et al. (2016) most works binarize all convolutional layers except for the first and last ones (i.e. the classifier) alongside the batch normalization layers and the per-channel scaling factors (Rastegari et al., 2016; Lin et al., 2017; Liu et al., 2018; Liu et al., 2019; Zhu et al., 2019; Bulat & Tzimiropoulos, 2019; Qin et al., 2020; Wang et al., 2019; Martinez et al., 2020). Rastegari et al. (2016) notes that the first layer is not binarized because of the low number of channels (i.e. 3), the speed-up offered by binarization is not high. Furthermore, because the input to the network is typically real-valued, it is more natural to process it initially using real-valued operations. Similarly, the last layer sees smaller speedups in practice when binarized (Rastegari et al., 2016; Courbariaux et al., 2016) and often, depending on the task requires outputting continuous values instead of discrete ones. Finally, the batch normalization layers are kept real too since they significantly improve the training stability, and also implicitly adjust the quantization point.
436
+
437
+ We note that, as shown in Table 5, the vast majority of the operations are binary, with only a small proportion of them remaining real valued.
parse/train/MxaY4FzOTa/MxaY4FzOTa_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/MxaY4FzOTa/MxaY4FzOTa_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/MxaY4FzOTa/MxaY4FzOTa_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/NR4KjDE0w9RXD/NR4KjDE0w9RXD.md ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Improving Deep Neural Networks with Probabilistic Maxout Units
2
+
3
+ Jost Tobias Springenberg and Martin Riedmiller Department of Computer Science University of Freiburg 79110, Freiburg im Breisgau, Germany {springj,riedmiller}@cs.uni-freiburg.de
4
+
5
+ # Abstract
6
+
7
+ We present a probabilistic variant of the recently introduced maxout unit. The success of deep neural networks utilizing maxout can partly be attributed to favorable performance under dropout, when compared to rectified linear units. It however also depends on the fact that each maxout unit performs a pooling operation over a group of linear transformations and is thus partially invariant to changes in its input. Starting from this observation we ask the question: Can the desirable properties of maxout units be preserved while improving their invariance properties ? We argue that our probabilistic maxout (probout) units successfully achieve this balance. We quantitatively verify this claim and report classification performance matching or exceeding the current state of the art on three challenging image classification benchmarks (CIFAR-10, CIFAR-100 and SVHN).
8
+
9
+ # 1 Introduction
10
+
11
+ Regularization of large neural networks through stochastic model averaging was recently shown to be an effective tool against overfitting in supervised classification tasks. Dropout [1] was the first of these stochastic methods which led to improved performance on several benchmarks ranging from small to large scale classification problems [2, 1]. The idea behind dropout is to randomly drop the activation of each unit within the network with a probability of $5 0 \%$ . This can be seen as an extreme form of bagging in which parameters are shared among models, and the number of trained models is exponential in the number of these model parameters. During testing an approximation is used to average over this large number of models without instantiating each of them. When combined with efficient parallel implementations this procedure opened the possibility to train large neural networks with millions of parameters via back-propagation [2, 3] .
12
+
13
+ Inspired by this success a number of other stochastic regularization techniques were recently developed. This includes the work on dropconnect[4], a generalization of dropout, in which connections between units rather than their activation are dropped at random. Adaptive dropout [5] is a recently introduced variant of dropout in which the stochastic regularization is performed through a binary belief network that is learned alongside the neural network to decrease the information content of its hidden units. Stochastic pooling [6] is a technique applicable to convolutional networks in which the pooling operation is replaced with a sampling procedure.
14
+
15
+ Instead of changing the regularizer the authors in [7] searched for an activation function for which dropout performs well. As a result they introduced the maxout unit, which can be seen as a generalization of rectified linear units (ReLUs) [8, 9], that is especially suited for the model averaging performed by dropout. The success of maxout can partly be attributed to the fact that maxout aids the optimization procedure by partially preventing units from becoming inactive; an artifact caused by the thresholding performed by the rectified linear unit. Additionally, similar to ReLUs, they are piecewise linear and – in contrast to e.g. sigmoid units – typically do not saturate, which makes networks containing maxout units easier to optimize.
16
+
17
+ We argue that an equally important property of the maxout unit however is that its activation function can be seen as performing a pooling operation over a subspace of $k$ linear feature mappings (in the following referred to as subspace pooling). As a result of this subspace pooling operation each maxout unit is partially invariant to changes within its input. A natural question arising from this observation is thus whether it could be beneficial to replace the maximum operation used in maxout units with other pooling operations, such as L2 pooling. The utility of different subspace pooling operations has already been explored in the context of unsupervised learning where e.g. L2-pooling is known give rise to interesting invariances [10, 11, 12]. While work on generalizing maxout by replacing the max-operation with general $L p$ -pooling exists [13], a deviation from the standard maximum operation comes at the price of discarding some of the desirable properties of the maxout unit. For example abandoning piecewise linearity, restricting units to positive values and the introduction of saturation regimes, which potentially worsen the accuracy of the approximate model averaging performed by dropout.
18
+
19
+ Based on these observations we propose a stochastic generalization of the maxout unit that preserves its desirable properties while improving the subspace pooling operation of each unit. As an additional benefit when training a neural network using our proposed probabilistic maxout units the gradient of the training error is more evenly distributed among the linear feature mappings of each unit. In contrast, a maxout network helps gradient flow through each of the maxout units but not through their k linear feature mappings. Compared to maxout our probabilistic units thus learn to better utilize their full $\mathbf { k }$ -dimensional subspace. We evaluate the classification performance of a model consisting of these units and show that it matches the state of the art performance on three challenging classification benchmarks.
20
+
21
+ # 2 Model Description
22
+
23
+ Before defining the probabilistic maxout unit we briefly review the notation used in the following for defining deep neural network models. We adopt the standard feed-forward neural network formulation in which given an input $\mathbf { x }$ and desired output $y$ (a class label) the network realizes a function computing a $C$ -dimensional vector $\mathbf { o }$ – where $C$ is the number of classes – predicting the desired output. The prediction is computed by first sequentially mapping the input to a hierarchy of $N$ hidden layers $\mathbf { h } ^ { ( 1 ) } , \ldots , \mathbf { h } ^ { ( N ) }$ . Each unit $h _ { i } ^ { ( l ) }$ within hidden layer $l \in [ 1 , N ]$ in the hierarchy realizes a function $h _ { i } ^ { ( l ) } ( \mathbf { v } ; \mathbf { w } _ { i } ^ { ( l ) } , b _ { i } ^ { ( l ) } )$ mapping its inputs $\mathbf { v }$ (given either as the input $\mathbf { x }$ or the output of the previous layer $\boldsymbol { h } ^ { ( l - 1 ) }$ ) to an activation using weight bias parameters $\mathbf { w } _ { i } ^ { ( l ) }$ and $b _ { i } ^ { ( l ) }$ . Finally the prediction is computed based on the last layer output $\mathbf { h } ^ { N }$ . This prediction is realized using a softmax layer $\mathbf { o } = s o f t m a x ( \mathbf { W } ^ { N + 1 } \mathbf { h } ^ { ( N ) } + \mathbf { b } ^ { N + 1 } )$ with weights $\mathbf { W } ^ { N + 1 }$ and bias $\mathbf { b } ^ { N + 1 }$ . All parameters $\theta = \{ W ^ { ( 1 ) } , b ^ { ( 1 ) } , \dots , W ^ { ( N + 1 ) } , b ^ { ( N + 1 ) } \}$ are then learned by minimizing the cross entropy loss between output probabilities $\mathbf { o }$ and label $\begin{array} { r } { y : \mathcal { L } ( o , y ; \mathbf { x } ) = - \sum _ { i = 1 } ^ { C } y _ { i } \log ( o _ { i } ) + ( 1 - y _ { i } ) l o g ( 1 - o _ { i } ) } \end{array}$ .
24
+
25
+ # 2.1 Probabilistic Maxout Units
26
+
27
+ The maxout unit was recently introduced in [7] and can be formalized as follows: Given the units input $\mathbf { v } \in \mathbb { R } ^ { d }$ (either the activation from the previous layer or the input vector) the activation of a maxout unit is computed by first computing $\mathbf { k }$ linear feature mappings $\mathbf { z } \in \mathbb { R } ^ { k }$ where
28
+
29
+ $$
30
+ z _ { i } = \mathbf { w } _ { i } \mathbf { v } + b _ { i } ,
31
+ $$
32
+
33
+ and $\mathbf { k }$ is the number of linear sub-units combined by one maxout unit. Afterwards the output $h _ { m a x o u t }$ of the maxout hidden unit is given as the maximum over the $\mathbf { k }$ feature mappings:
34
+
35
+ $$
36
+ h _ { m a x o u t } ( \mathbf { v } ) = \operatorname* { m a x } [ z _ { 1 } , \dots , z _ { k } ] .
37
+ $$
38
+
39
+ When formalized like this it becomes clear that (in contrast to conventional activation functions) the maxout unit can be interpreted as performing a pooling operation over a $\mathbf { k }$ -dimensional subspace of linear units $[ z _ { 1 } , \ldots , z _ { k } ]$ each representing one transformation of the input v. This is similar to spatial max-pooling which is commonly employed in convolutional neural networks. However, unlike in spatial pooling the maxout unit pools over a subspace of $\mathbf { k }$ different linear transformations applied to the same input v. In contrast to this, spatial max-pooling of linear feature maps would compute a pooling over one linear transformation applied to k different inputs. A schematic of the difference between several pooling operations is given in Fig. 1 .
40
+
41
+ ![](images/addad00f4a007379222e2ad43fec15d06265e9cab4b05a029e0a99a75f1c5bed.jpg)
42
+ Figure 1: Schematic of different pooling operations. a) An exemplary input image taken from the ImageNet dataset together with the depiction of a spatial pooling region (cyan) as well as the input to one maxout / probout unit (marked in magenta). b) Spatial max-pooling proceeds by computing the maximum of one filter response at the four different positions from a). c) Maxout computes a pooled response of two linear filter mappings applied to one input patch. d) The activation of a probout unit is computed by sampling one of the linear responses according to their probability.
43
+
44
+ As such maxout is thus more similar to the subspace pooling operations used for example in topographic ICA [10] which is known to result in partial invariance to changes within its input. On the basis of this observation we propose a stochastic generalization of the maxout unit that preserves its desirable properties while improving gradient propagation among the $k$ linear feature mappings as well as the invariance properties of each unit. In the following we call these generalized units probout units since they are a direct probabilistic generalization of maxout.
45
+
46
+ We derive the probout unit activation function from the maxout formulation by replacing the maximum operation in Eq. (2) with a probabilistic sampling procedure. More specifically we assume a Boltzmann distribution over the $k$ linear feature mappings and sample the activation $h ( \mathbf { v } )$ from the activation of the corresponding subspace units. To this end we first define a probability for each of the $\mathrm { k }$ linear units in the subspace as:
47
+
48
+ $$
49
+ p _ { i } = \frac { e ^ { \lambda z _ { i } } } { \sum _ { j = 1 } ^ { k } e ^ { \lambda z _ { j } } } ,
50
+ $$
51
+
52
+ where $\lambda$ is a hyperparameter (referred to as an inverse temperature parameter) controlling the variance of the distribution. The activation $h _ { p r o b o u t } ( \mathbf { x } )$ is then sampled as
53
+
54
+ $$
55
+ h _ { p r o b o u t } ( \mathbf { v } ) = z _ { i } , { \mathrm { ~ w h e r e ~ } } i \sim M u l t i n o m i a l \{ p _ { 1 } , \dots , p _ { k } \} .
56
+ $$
57
+
58
+ Comparing Eq. (4) to Eq. (2) we see that both, are not bounded from above or below and their activation is always given as one of the linear feature mappings within their subspace. The probout unit hence preserves most of the properties of the maxout unit, only replacing the sub-unit selection mechanism.
59
+
60
+ We can further see that Eq. (4) reduces to the maxout activation for $\lambda \infty$ . For other values of $\lambda$ the probout unit will behave similarly to maxout when the activation of one linear unit in the subspace dominates. However, if the activation of multiple linear units differs only slightly they will be selected with almost equal probability. Futhermore, each active linear unit will have a chance to be selected. The sampling approach therefore ensures that gradient flows through each of the $k$ linear subspace units of a given probout unit for some examples (given that $\lambda$ is sufficiently small). We hence argue that probout units can learn to better utilize their full $\mathrm { k }$ -dimensional subspace.
61
+
62
+ In practice we want to combine the probout units described by Eq. (4) with dropout for regularizing the learned model. To achieve this we directly include dropout in the probabilistic sampling step by
63
+
64
+ re-defining the probabilities as:
65
+
66
+ $$
67
+ \begin{array} { l } { \displaystyle \hat { p } _ { 0 } = 0 . 5 } \\ { \displaystyle \hat { p } _ { i } = \frac { e ^ { \lambda z _ { i } } } { 2 \cdot \sum _ { j = 1 } ^ { k } e ^ { \lambda z _ { j } } } . } \end{array}
68
+ $$
69
+
70
+ Consequently, we sample the probout activation function including dropout $\hat { h } _ { p r o b o u t } ( \mathbf { v } )$ as
71
+
72
+ $$
73
+ \hat { h } _ { p r o b o u t } ( \mathbf { v } ) = \left\{ \begin{array} { l l } { 0 \mathrm { ~ i f ~ } i = 0 } \\ { z _ { i } \mathrm { ~ e l s e } } \end{array} \right. \mathrm { ~ , ~ w h e r e ~ } i \sim M u l t i n o m i a l \{ \hat { p } _ { 0 } , \hat { p } _ { 1 } , \dots , \hat { p } _ { k } \} .
74
+ $$
75
+
76
+ # 2.2 Relation to other pooling operations
77
+
78
+ The idea of using a stochastic pooling operation has been explored in the context of spatial pooling within the machine learning literature before. Among this work the approach most similar to ours is [14]. There the authors introduced a probabilistic pooling approach in order to derive a convolutional deep believe network (DBN). They also use a Boltzmann distribution based on unit activations to calculate a sampling probability. The main difference between their work and ours is that they calculate the probability of sampling one unit at different spatial locations whereas we calculate the probability of sampling a unit among $\mathrm { k }$ units forming a subspace at one spatial location. Another difference is that we forward propagate the sampled activation $z _ { i }$ whereas they use the calculated probability to activate a binary stochastic unit.
79
+
80
+ Another approach closely related to our work is the stochastic pooling presented in [6]. Their stochastic pooling operation samples the activation of a pooling unit $p _ { i }$ proportionally to the activation $a$ of a rectified linear unit [8] computed at different spatial positions. This is similar to Eq. (4) in the sense that the activation is sampled from a set of different activations. Similar to [14] it however differs in that the sampling is performed over spatial locations rather than activations of different units.
81
+
82
+ It should be noted that our work also bears some resemblance to recent work on training stochastic units, embedded in an autoencoder network, via back-propagation [15, 16]. In contrast to their work, which aims at using stochastic neurons to train a generative model, we embrace stochasticity in the subspace pooling operation as an effective means to regularize a discriminative model.
83
+
84
+ # 2.3 Inference
85
+
86
+ At test time we need to account for the stochastic nature of a neural network containing probout units. During a forward pass through the network the value of each probout unit is sampled from one of $k$ values according to their probability. The output of such a forward pass thus always represents only one of $k ^ { M }$ different instantiations of the trained probout network; where $M$ is the number of probout units in the network. When combined with dropout the number of possible instantiations increases to $\left( k + 1 \right) ^ { M }$ . Evaluating all possible models at test time is therefore clearly infeasible. The Dropout formulation from [1] deals with this large amount of possible models by removing dropout at test time and halving the weights of each unit. If the network consists of only one softmax layer then this modified network performs exact model averaging [1]. For general models this computation is merely an approximation of the true model average which, however, performs well in practice for both deep ReLU networks [2] and the maxout model [7].
87
+
88
+ We adopt the same procedure of halving the weights for removing the influence of dropout at testtime and rescale the probabilities such that $\textstyle \sum _ { i = 1 } ^ { k } { \hat { p } } _ { i } \ = \ 1$ and $\hat { p } _ { 0 } = 0$ , effectively replacing the sampling from Eq .(7) with Eq. (4). We further observe that from the $k ^ { M }$ models remaining after removing dropout only few models will be instantiated with high probability. We therefore resort to sampling a small number of outputs $\mathbf { o }$ from the networks softmax layer and average their values. An evaluation of the exact effect of this model averaging can be found in Section 3.1.1 .
89
+
90
+ # 3 Evaluation
91
+
92
+ We evaluate our method on three different image classification datasets (CIFAR-10, CIFAR-100 and SVHN) comparing it against the basic maxout model as well as the current state of the art on all datasets. All experiments were performed using an implementation based on Theano and the pylearn2 library [17] using the fast convoltion code of [2]. We use mini-batch stochastic gradient descent with a batch size of 100. For each of the datasets we start with the same network used in [7] – retaining all of their hyperparameter choices – to ensure comparability between results. We replace the maxout units in the network with probout units and choose one $\lambda ^ { ( l ) }$ via crossvalidation for each layer $l$ in a preliminary experiment on CIFAR-10.
93
+
94
+ ![](images/d8121e66e480fe125b42fe50f7d2378ca87198448320e76a89c8dffd9b3ec18f.jpg)
95
+ Figure 2: Visualization of pairs of first layer linear filters learned by the maxout model (left) as well as the probout model (right). In contrast to the maxout filters the filter pairs learned by the probout model appear to mostly be transformed versions of each other.
96
+
97
+ # 3.1 Experiments on CIFAR-10
98
+
99
+ We begin our experiments with the CIFAR-10 [18] dataset. It consists of 50, 000 training images and 10, 000 test images that are grouped into 10 categories. Each of these images is of size $3 2 \times 3 2$ pixels and contains 3 color channels. Maxout is known to yield good performance on this dataset, making it an ideal starting point for evaluating the difference between maxout and probout units.
100
+
101
+ # 3.1.1 Effect of replacing maxout with probout units
102
+
103
+ We conducted a preliminary experiment to evaluate the effect of the probout parameters $\lambda ^ { ( l ) }$ on the performance and compare it to the standard maxout model. For this purpose we use a five layer model consisting of three convolutional layers with 48, 128 and 128 probout units respectively which pool over 2 linear units each. The penultimate layer then consists of 240 probout units pooling over a subspace of 5 linear units. The final layer is a standard softmax layer mapping from the 240 units in the penultimate layer to the 10 classes of CIFAR-10. The receptive fields of units in the convolutional layers are 8, 8 and 5 respectively. Additionally, spatial max-pooling is performed after each convolutional layer with pooling size of $4 \times 4 , 4 \times 4$ and $2 \times 2$ using a stride of 2 in all layers. We split the CIFAR-10 training data retaining the first 40000 samples for training and using the last 10000 samples as a validation set.
104
+
105
+ We start our evaluation by using probout units everywhere in the network and cross-validate the choice of the inverse-temperature parameters $\lambda ^ { ( l ) } \in \dot { \left\{ 0 . 1 , 0 . 5 , 1 , 2 , 3 , 4 \right\} }$ keeping all other hyperparameters fixed. We find that annealing the $\lambda ^ { ( l ) }$ parameter during training to a lower value improved performance for all $\lambda ^ { ( l ) } > 0 . 5$ and hence linearly decrease $\lambda ^ { ( l ) }$ to a value that is 0.9 lower than the initial $\lambda$ in these cases. As shown in Fig. 3a the best classification performance is achieved when $\lambda$ is set to allow higher variance sampling for the first two layers, specifically when $\lambda ^ { ( 1 ) } = 1$ and $\lambda ^ { ( 2 ) } = 2$ . For the third as well as the fully connected layer we observe a performance increase when $\lambda ^ { ( 3 ) }$ is chosen as $\lambda ^ { ( 3 ) } = 3$ and $\lambda ^ { ( 4 ) } = 4$ , meaning that the sampling procedure selects the maximum value with high probability. This indicates that the probabilistic sampling is most effective in lower layers. We verified this by replacing the probout units in the last two layers with maxout units which did not significantly decrease classification accuracy.
106
+
107
+ We hypothesize that increasing the probability of sampling a non maximal linear unit in the subspace pulls the units in the subspace closer together and forces the network to become “more invariant” to changes within this subspace. This is a property that is desired in lower layers but might turn to be detrimental in higher layers where the model averaging effect of maxout is more important than achieving invariance. Here sampling units with non-maximal activation could result in unwanted correlation between the “submodels”. To qualitatively verify this claim we plot the first layer linear filters learned using probout units alongside the filters learned by a model consisting only of maxout units in Fig. 2. When inspecting the filters we can see that many of the filters belonging to one subspace formed by a probout unit seem to be transformed versions of each other, with some of then resembling “quadrature pairs” of filters. Among the linear filters learned by the maxout model some also appear to encode invariance to local transformations. Most of the filters contained in a subspace however are seemingly unrelated. To support this observation empirically we probed for changes in the feature vectors of different layers (extracted from both maxout and probout models) when they are applied to translated and rotated images from the validation set. Similar to [19, 3] we calculate the normalized Euclidean distance between feature vectors extracted from an unchanged image and a transformed version. We then plot these distances for several exemplary images as well as the mean over 100 randomly sampled images. The result of this experiment is given in Fig. 4, showing that introducing probout units into the network has a moderate positive effect on both invariance to translation and rotations.
108
+
109
+ ![](images/82f13075d398a6bf98b4ac025d3985458525d54cba7137f78c72bb3c645ac40e.jpg)
110
+ Figure 3: (a) Validation of the $\lambda ^ { ( l ) }$ parameter for layers $l \in [ 1 , 2 ]$ on CIFAR-10. We plot the error on the validation set after training (using 50 model evaluations). When evaluating the choice of $\lambda ^ { ( 1 ) }$ (red curve) the second parameter fixed $\bar { \lambda } ^ { ( 2 ) } = 2$ . Likewise, for the experiments regarding $\lambda ^ { ( 2 ) }$ (blue curve) $\lambda ^ { ( 1 ) } = 1$ . (b) Evolution of the classification error and standard deviation on the CIFAR10 dataset for a changing number $E$ of model evaluations. We average the activation $\mathbf { o } \in \mathbb { R } ^ { C }$ of the softmax layer over all $E$ evaluations and compute the predicted class label $\hat { y }$ as the maximum $\hat { y } = \arg \operatorname* { m a x } _ { i \in \{ 1 , \ldots , C \} } o _ { i }$ . The standard deviation is computed over 10 runs of $E$ model evaluations.
111
+
112
+ Finally, we evaluate the computational cost of the model averaging procedure described in Section 2.3 at test time. As depicted in Fig. 3b the classification error for the probout model decreases with more model evaluations saturating when a moderate amount of 50 evaluations is reached. Conversely, using sampling at test time in conjunction with the standard maxout model significantly decreases performance. This indicates that the maxout model is highly optimized for the maximum responses and cannot deal with the noise introduced through the sampling procedure. We additionally also tried to replace the model averaging mechanism with cheaper approximations. Replacing the sampling in the probout units with a maximum operation at test time resulted in a decrease in performance, reaching $1 4 . 1 3 \%$ . We also tried to use probability weighting during testing [6] which however performed even worse, achieving $1 5 . 2 1 \%$ .
113
+
114
+ # 3.1.2 Evaluation of Classification Performance
115
+
116
+ As the next step, we evaluate the performance of our model on the full CIFAR-10 benchmark. We follow the same protocol as in [7] to train the probout model. That is, we first preprocess all images by applying contrast normalization followed by ZCA whitening. We then train our model using the first 40000 examples from the training set using the last 10000 examples as a validation set. Training then proceeds until the validation error stops decreasing. We then retrain the model on the complete training set for the same amount of epochs it took to reach the best validation error.
117
+
118
+ To comply with the experiments in [7] we used a larger version of the model from Section 3.1.1 in all experiments. Compared to the preliminary experiment the size of the convolutional layers was increased to 96, 192 and 192 units respectively. The size of the fully connected layer was increased to 500 probout units pooling over a 5 dimensional subspace.
119
+
120
+ Table 1: Classification error of different models on the CIFAR-10 dataset.
121
+
122
+ <table><tr><td rowspan=1 colspan=1>METHOD</td><td rowspan=1 colspan=1>ERROR</td></tr><tr><td rowspan=1 colspan=1>CONV.NET+SPEARMINT[20]CONV.NET+MAXOUT[7]CONV.NET+PROBOUT</td><td rowspan=1 colspan=1>14.98%11.69 %11.35 %</td></tr><tr><td rowspan=1 colspan=1>12 × CONV.NET+DROPCONNECT[4]CONV.NET+MAXOUT[7]CONV.NET+PROBOUT</td><td rowspan=1 colspan=1>9.32 %9.38%9.39%</td></tr></table>
123
+
124
+ The top half of Table 1 shows the result of training this model as well as other recent results. We achieve an error of $1 1 . 3 5 \%$ , slightly better than – but statistically tied to – the previous state of the art given by the maxout model. We also evaluated the performance of this model when the training data is augmented with additional transformed training examples. For this purpose we train our model using the original training images as well as add randomly translated and horizontally flipped versions of the images. The bottom half of Table 1 shows a comparison of different results for training on CIFAR-10 with additional data augmentation. Using this augmentation process we achieve a classification error of $9 . 3 9 \%$ , matching, but not outperforming the maxout result.
125
+
126
+ # 3.2 CIFAR-100
127
+
128
+ The images contained in the CIFAR-100 dataset [18] are – just as the CIFAR-10 images – taken from a subset of the 10-million images database. The dataset contains 50, 000 training and 10, 000 test examples of size $3 2 \times 3 2$ pixels each. The dataset is hence similar to CIFAR-10 in both size and image content. It, however, differs from CIFAR-10 in its label distribution. Concretely, CIFAR-100 contains images of 100 classes grouped into 20 “super-classes”. The training data therefore contains 500 training images per class $^ { - 1 0 }$ times less examples per class than in CIFAR-10 – which are accompanied by 100 examples in the test-set.
129
+
130
+ We do not make use of the 20 super-classes and train a model using a similar setup to the experiments we carried out on CIFAR-10. Specifically, we use the same preprocessing and training procedure (determining the amount of epochs using a validation set and then retraining the model on the complete data). The same network as in Section 3.1.1 was used for this experiment (adapted to classify 100 classes). Again, this is the same architecture used in [7] thus ensuring comparability between results. During testing we use 50 model evaluations to average over the sampled probout units.
131
+
132
+ The result of this experiment is given in Table 2. In agreement with the CIFAR-10 results our model performs marginally better than the maxout model (by $0 . 4 5 \% ^ { 1 }$ ). As also shown in the table the current best method on CIFAR-100 achieves a classification error of $3 6 . 8 5 \%$ [21], using a larger convolutional neural network together with a tree-based prior on the classes formed by utilizing the super-classes. A similar performance increase could potentially be achieved by combining their tree-based prior with our model.
133
+
134
+ # 3.3 SVHN
135
+
136
+ The street view house numbers dataset [22] is a collection of images depicting digits which were obtained from google street view images. The dataset comes in two variants of which we restrict ourselves to the one containing cropped $3 2 \times 3 2$ pixel images. Similar to the well known MNIST dataset [23] the task for this dataset is to classify each image as one of 10 digits in the range from 0 to 9. The task is considerably more difficult than MNIST since the images are cropped out of natural image data. The images thus contain color information and show significant contrast variation. Furthermore, although centered on one digit, several images contain multiple visible digits, complicating the classification task.
137
+
138
+ Table 2: Classification error of different models on the CIFAR-100 dataset.
139
+
140
+ <table><tr><td>METHOD</td><td>ERROR</td></tr><tr><td>RECEPTIVE FIELD LEARNING [24] LEARNED POOLING [25] CONV. NET + STOCHASTIC POOLING [6]</td><td>45.17 % 43.71% 42.51%</td></tr><tr><td>CONV.NET + DROPOUT + TREE [21]</td><td>36.85 %</td></tr><tr><td>CONV.NET+MAXOUT[7] CONV.NET+PROBOUT</td><td>38.57% 38.14%</td></tr></table>
141
+
142
+ The training and test set contain 73, 257 and 20, 032 labeled examples respectively. In addition to this data there is an “extra” set of 531, 131 labeled digits which are somewhat less difficult to differentiate and can be used as additional training data. As in [7] we build a validation set by selecting 400 examples per class from the training and 200 examples per class from the extra dataset. We conflate all remaining training images to a large set of 598, 388 images which we use for training.
143
+
144
+ The model trained for this task consists of three convolutional layers containing 64, 128 and 128 units respectively, pooling over a 2 dimensional subspace. These are followed by a fully connected and a softmax layer of which the fully connected layer contains 400 units pooling over a 5 dimensional subspace. This yields a classification error of $2 . 3 9 \%$ (using 50 model evaluations at testtime), matching the current state of the art for a model trained on SVHN without data augmentation achieved by the maxout model $( 2 . 4 7 \% )$ . A comparison to other results can be found in Table 3 . This includes the current best result with data augmentation which was obtained using a generalization of dropout in conjunction with a large network containing rectified linear units [4].
145
+
146
+ Table 3: Classification error of different models on the SVHN dataset. The top half shows a comparison of our result with the current state of the art achieved without data augmentation. The bottom half gives the best performance achieved with data augmentation as additional reference.
147
+
148
+ <table><tr><td rowspan=1 colspan=1>METHOD</td><td rowspan=1 colspan=1>ERROR</td></tr><tr><td rowspan=1 colspan=1>CONV.NET+ STOCHASTIC POOLING [6]CONV.NET+DROPOUT[26]CONV.NET+ MAXOUT[7]CONV.NET+PROBOUT</td><td rowspan=1 colspan=1>2.80%2.78%2.47%2.39%</td></tr><tr><td rowspan=1 colspan=1>CONV.NET+DROPOUT[26]5 × CONV. NET + DROPCONNECT [4]</td><td rowspan=1 colspan=1>2.68%1.93 %</td></tr></table>
149
+
150
+ # 4 Conclusion
151
+
152
+ We presented a probabilistic version of the recently introduced maxout unit. A model built using these units was shown to yield competitive performance on three challenging datasets (CIFAR-10, CIFAR-100, SVHN). As it stands, replacing maxout units with probout units is computationally expensive at test time. This problem could be diminished by developing an approximate inference scheme similar to [2, 3] which we see as an interesting possibility for future work.
153
+
154
+ We see our approach as part of a larger body of work on exploring the utility of learning “complex cell like” units which can give rise to interesting invariances in neural networks. While this paradigm has extensively been studied in unsupervised learning it is less explored in the supervised scenario. We believe that work towards building activation functions incorporating such invariance properties, while at the same time designed for use with efficient model averaging techniques such as dropout, is a worthwhile endeavor for advancing the field.
155
+
156
+ # Acknowledgments
157
+
158
+ The authors want to thank Alexey Dosovistkiy for helpful discussions and comments, as well as Thomas Brox for generously providing additional computing resources.
159
+
160
+ # References
161
+
162
+ [1] mprov ing neural networks by preventing co-adaptation of feature detectors. arxiv:cs/1207.0580v3. [2] Alex Krizhevsky, Ilya Sutskever, and Geoff Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems 25. 2012. [3] Matthew Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. arxiv:cs/1311.2901v3. [4] Li Wan, Matthew D. Zeiler, Sixin Zhang, Yann LeCun, and Rob Fergus. Regularization of neural networks using dropconnect. In International Conference on Machine Learning (ICML), 2013. [5] Jimmy Ba and Brendan Frey. Adaptive dropout for training deep neural networks. In Advances in Neural Information Processing Systems 26. 2013. [6] Matthew D. Zeiler and Rob Fergus. Stochastic pooling for regularization of deep convolutional neural networks. In International Conference on Learning Representations (ICLR): Workshop track, 2013. [7] Ian J. Goodfellow, David Warde-Farley, Mehdi Mirza, Aaron Courville, and Yoshua Bengio. Maxout networks. In International Conference on Machine Learning (ICML), 2013. [8] Vinod Nair and Geoffrey E. Hinton. Rectified linear units improve restricted boltzmann machines. In International Conference on Machine Learning (ICML), 2010. [9] Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Deep sparse rectifier neural networks. In AISTATS 2011, April 2011.
163
+ [10] Jarmo Hurri Aapo Hyvrinen and Patrik O. Hoyer. Natural Image Statistics.
164
+ [11] Yoshua Bengio and James S. Bergstra. Slow, decorrelated features for pretraining complex cell-like networks. In Advances in Neural Information Processing Systems 22. 2009.
165
+ [12] Will Y. Zou, Shenghuo Zhu, Andrew Y. Ng, and Kai Yu. Deep learning of invariant features via simulated fixations in video. In Neural Information Processing Systems (NIPS 2012), 2012.
166
+ [13] Razvan Pascanu Yoshua Bengio Caglar Gulcehre, Kyunghyun Cho. Learned-norm pooling for deep neural networks. arxiv:stat/1311.1780v3.
167
+ [14] Honglak Lee, Roger Grosse, Rajesh Ranganath, and Andrew Y Ng. Convolutional deep belief networks for scalable unsupervised learning of hierarchical representations. pages 1–8, 2009.
168
+ [15] Yoshua Bengio. Estimating or propagating gradients through stochastic neurons.
169
+ [16] Jason Yosinski Yoshua Bengio, ric Thibodeau-Laufer. Deep generative stochastic networks trainable by backprop.
170
+ [17] Pascal Lamblin Vincent Dumoulin Mehdi Mirza Razvan Pascanu James Bergstra Frdric Bastien Yoshua Bengio Ian J. Goodfellow, David Warde-Farley. Pylearn2: a machine learning research library. arxiv:stat/1308.4214.
171
+ [18] A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images. 2009.
172
+ [19] Koray Kavukcuoglu, Marc’Aurelio Ranzato, Rob Fergus, and Yann LeCun. Learning invariant features through topographic filter maps. In Proc. International Conference on Computer Vision and Pattern Recognition (CVPR), 2009.
173
+ [20] Jasper Snoek, Hugo Larochelle, and Ryan Prescott Adams. Practical bayesian optimization of machine learning algorithms. In Advances in Neural Information Processing Systems 25, 12/2012 2012.
174
+ [21] Nitish Srivastava and Ruslan Salakhutdinov. Discriminative transfer learning with tree-based priors. In Advances in Neural Information Processing Systems 26, pages 2094–2102. 2013.
175
+ [22] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y. Ng. Reading digits in natural images with unsupervised feature learning. In NIPS Workshop on Deep Learning and Unsupervised Feature Learning 2011, 2011.
176
+ [23] Yann LeCun, Lon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. In Proceedings of the IEEE, number 11, 1998.
177
+ [24] Yangqing Jia, Chang Huang, and Trevor Darrell. Beyond spatial pyramids: Receptive field learning for pooled image features. In CVPR, 2012.
178
+ [25] Mateusz Malinowski and Mario Fritz. Learnable pooling regions for image classification. In International Conference on Learning Representations (ICLR): Workshop track, 2013.
179
+ [26] Nitish Srivastava. Improving neural networks with dropout. In Master’s thesis, University of Toronto, 2013.
180
+
181
+ ![](images/fc59f6998792f8e36ef1e6813280a9f77091a639b7b43482fa2ab35926c0b783.jpg)
182
+ Figure 4: Analysis of the impact of vertical translation and rotation on features extracted from a maxout and probout network. We plot the distance between normalized feature vectors extracted on transformed images and the original, unchanged, image. The distances for the probout model are plotted using thick lines. The distances for the maxout model are depicted using dashed lines. (a,b) 4 exemplary images undergoing different vertical translations and rotations respectively. (c,d) Euclidean distance between feature vectors from the original 4 images depicted in (a,b) and transformed images for Layer 1 (convolutional) and Layer 4 (fully connected) respectively. (e,f) Euclidean distance between feature vectors from the original 4 images and transformed versions for Layer 2 (convolutional) and Layer 4 (fully connected) respectively. (g,h) Mean Euclidean distance between feature vectors extracted from 100 randomly selected images and their transformed versions for different layers in the network.
parse/train/NR4KjDE0w9RXD/NR4KjDE0w9RXD_content_list.json ADDED
@@ -0,0 +1,928 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Improving Deep Neural Networks with Probabilistic Maxout Units ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 183,
8
+ 133,
9
+ 816,
10
+ 184
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Jost Tobias Springenberg and Martin Riedmiller Department of Computer Science University of Freiburg 79110, Freiburg im Breisgau, Germany {springj,riedmiller}@cs.uni-freiburg.de ",
17
+ "bbox": [
18
+ 308,
19
+ 234,
20
+ 689,
21
+ 305
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 462,
31
+ 339,
32
+ 535,
33
+ 356
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "We present a probabilistic variant of the recently introduced maxout unit. The success of deep neural networks utilizing maxout can partly be attributed to favorable performance under dropout, when compared to rectified linear units. It however also depends on the fact that each maxout unit performs a pooling operation over a group of linear transformations and is thus partially invariant to changes in its input. Starting from this observation we ask the question: Can the desirable properties of maxout units be preserved while improving their invariance properties ? We argue that our probabilistic maxout (probout) units successfully achieve this balance. We quantitatively verify this claim and report classification performance matching or exceeding the current state of the art on three challenging image classification benchmarks (CIFAR-10, CIFAR-100 and SVHN). ",
40
+ "bbox": [
41
+ 232,
42
+ 373,
43
+ 766,
44
+ 526
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 174,
54
+ 556,
55
+ 312,
56
+ 574
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Regularization of large neural networks through stochastic model averaging was recently shown to be an effective tool against overfitting in supervised classification tasks. Dropout [1] was the first of these stochastic methods which led to improved performance on several benchmarks ranging from small to large scale classification problems [2, 1]. The idea behind dropout is to randomly drop the activation of each unit within the network with a probability of $5 0 \\%$ . This can be seen as an extreme form of bagging in which parameters are shared among models, and the number of trained models is exponential in the number of these model parameters. During testing an approximation is used to average over this large number of models without instantiating each of them. When combined with efficient parallel implementations this procedure opened the possibility to train large neural networks with millions of parameters via back-propagation [2, 3] . ",
63
+ "bbox": [
64
+ 174,
65
+ 589,
66
+ 825,
67
+ 728
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Inspired by this success a number of other stochastic regularization techniques were recently developed. This includes the work on dropconnect[4], a generalization of dropout, in which connections between units rather than their activation are dropped at random. Adaptive dropout [5] is a recently introduced variant of dropout in which the stochastic regularization is performed through a binary belief network that is learned alongside the neural network to decrease the information content of its hidden units. Stochastic pooling [6] is a technique applicable to convolutional networks in which the pooling operation is replaced with a sampling procedure. ",
74
+ "bbox": [
75
+ 174,
76
+ 736,
77
+ 825,
78
+ 833
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Instead of changing the regularizer the authors in [7] searched for an activation function for which dropout performs well. As a result they introduced the maxout unit, which can be seen as a generalization of rectified linear units (ReLUs) [8, 9], that is especially suited for the model averaging performed by dropout. The success of maxout can partly be attributed to the fact that maxout aids the optimization procedure by partially preventing units from becoming inactive; an artifact caused by the thresholding performed by the rectified linear unit. Additionally, similar to ReLUs, they are piecewise linear and – in contrast to e.g. sigmoid units – typically do not saturate, which makes networks containing maxout units easier to optimize. ",
85
+ "bbox": [
86
+ 174,
87
+ 840,
88
+ 823,
89
+ 924
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "",
96
+ "bbox": [
97
+ 171,
98
+ 103,
99
+ 823,
100
+ 132
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "We argue that an equally important property of the maxout unit however is that its activation function can be seen as performing a pooling operation over a subspace of $k$ linear feature mappings (in the following referred to as subspace pooling). As a result of this subspace pooling operation each maxout unit is partially invariant to changes within its input. A natural question arising from this observation is thus whether it could be beneficial to replace the maximum operation used in maxout units with other pooling operations, such as L2 pooling. The utility of different subspace pooling operations has already been explored in the context of unsupervised learning where e.g. L2-pooling is known give rise to interesting invariances [10, 11, 12]. While work on generalizing maxout by replacing the max-operation with general $L p$ -pooling exists [13], a deviation from the standard maximum operation comes at the price of discarding some of the desirable properties of the maxout unit. For example abandoning piecewise linearity, restricting units to positive values and the introduction of saturation regimes, which potentially worsen the accuracy of the approximate model averaging performed by dropout. ",
107
+ "bbox": [
108
+ 173,
109
+ 138,
110
+ 825,
111
+ 319
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "Based on these observations we propose a stochastic generalization of the maxout unit that preserves its desirable properties while improving the subspace pooling operation of each unit. As an additional benefit when training a neural network using our proposed probabilistic maxout units the gradient of the training error is more evenly distributed among the linear feature mappings of each unit. In contrast, a maxout network helps gradient flow through each of the maxout units but not through their k linear feature mappings. Compared to maxout our probabilistic units thus learn to better utilize their full $\\mathbf { k }$ -dimensional subspace. We evaluate the classification performance of a model consisting of these units and show that it matches the state of the art performance on three challenging classification benchmarks. ",
118
+ "bbox": [
119
+ 173,
120
+ 325,
121
+ 825,
122
+ 452
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "2 Model Description ",
129
+ "text_level": 1,
130
+ "bbox": [
131
+ 174,
132
+ 472,
133
+ 359,
134
+ 489
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "Before defining the probabilistic maxout unit we briefly review the notation used in the following for defining deep neural network models. We adopt the standard feed-forward neural network formulation in which given an input $\\mathbf { x }$ and desired output $y$ (a class label) the network realizes a function computing a $C$ -dimensional vector $\\mathbf { o }$ – where $C$ is the number of classes – predicting the desired output. The prediction is computed by first sequentially mapping the input to a hierarchy of $N$ hidden layers $\\mathbf { h } ^ { ( 1 ) } , \\ldots , \\mathbf { h } ^ { ( N ) }$ . Each unit $h _ { i } ^ { ( l ) }$ within hidden layer $l \\in [ 1 , N ]$ in the hierarchy realizes a function $h _ { i } ^ { ( l ) } ( \\mathbf { v } ; \\mathbf { w } _ { i } ^ { ( l ) } , b _ { i } ^ { ( l ) } )$ mapping its inputs $\\mathbf { v }$ (given either as the input $\\mathbf { x }$ or the output of the previous layer $\\boldsymbol { h } ^ { ( l - 1 ) }$ ) to an activation using weight bias parameters $\\mathbf { w } _ { i } ^ { ( l ) }$ and $b _ { i } ^ { ( l ) }$ . Finally the prediction is computed based on the last layer output $\\mathbf { h } ^ { N }$ . This prediction is realized using a softmax layer $\\mathbf { o } = s o f t m a x ( \\mathbf { W } ^ { N + 1 } \\mathbf { h } ^ { ( N ) } + \\mathbf { b } ^ { N + 1 } )$ with weights $\\mathbf { W } ^ { N + 1 }$ and bias $\\mathbf { b } ^ { N + 1 }$ . All parameters $\\theta = \\{ W ^ { ( 1 ) } , b ^ { ( 1 ) } , \\dots , W ^ { ( N + 1 ) } , b ^ { ( N + 1 ) } \\}$ are then learned by minimizing the cross entropy loss between output probabilities $\\mathbf { o }$ and label $\\begin{array} { r } { y : \\mathcal { L } ( o , y ; \\mathbf { x } ) = - \\sum _ { i = 1 } ^ { C } y _ { i } \\log ( o _ { i } ) + ( 1 - y _ { i } ) l o g ( 1 - o _ { i } ) } \\end{array}$ . ",
141
+ "bbox": [
142
+ 173,
143
+ 503,
144
+ 825,
145
+ 691
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "2.1 Probabilistic Maxout Units ",
152
+ "text_level": 1,
153
+ "bbox": [
154
+ 174,
155
+ 707,
156
+ 401,
157
+ 722
158
+ ],
159
+ "page_idx": 1
160
+ },
161
+ {
162
+ "type": "text",
163
+ "text": "The maxout unit was recently introduced in [7] and can be formalized as follows: Given the units input $\\mathbf { v } \\in \\mathbb { R } ^ { d }$ (either the activation from the previous layer or the input vector) the activation of a maxout unit is computed by first computing $\\mathbf { k }$ linear feature mappings $\\mathbf { z } \\in \\mathbb { R } ^ { k }$ where ",
164
+ "bbox": [
165
+ 174,
166
+ 733,
167
+ 825,
168
+ 776
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "equation",
174
+ "img_path": "images/2cc64f84ac394435397160e241d181230c29eb4b3e6f0f37e854b09a939222e4.jpg",
175
+ "text": "$$\nz _ { i } = \\mathbf { w } _ { i } \\mathbf { v } + b _ { i } ,\n$$",
176
+ "text_format": "latex",
177
+ "bbox": [
178
+ 446,
179
+ 784,
180
+ 550,
181
+ 800
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "and $\\mathbf { k }$ is the number of linear sub-units combined by one maxout unit. Afterwards the output $h _ { m a x o u t }$ of the maxout hidden unit is given as the maximum over the $\\mathbf { k }$ feature mappings: ",
188
+ "bbox": [
189
+ 173,
190
+ 808,
191
+ 821,
192
+ 837
193
+ ],
194
+ "page_idx": 1
195
+ },
196
+ {
197
+ "type": "equation",
198
+ "img_path": "images/a0cfb3dc40ce34c45d413374b9afbf8a39c472961cca704b0e77b1cec735e373.jpg",
199
+ "text": "$$\nh _ { m a x o u t } ( \\mathbf { v } ) = \\operatorname* { m a x } [ z _ { 1 } , \\dots , z _ { k } ] .\n$$",
200
+ "text_format": "latex",
201
+ "bbox": [
202
+ 392,
203
+ 843,
204
+ 606,
205
+ 861
206
+ ],
207
+ "page_idx": 1
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "When formalized like this it becomes clear that (in contrast to conventional activation functions) the maxout unit can be interpreted as performing a pooling operation over a $\\mathbf { k }$ -dimensional subspace of linear units $[ z _ { 1 } , \\ldots , z _ { k } ]$ each representing one transformation of the input v. This is similar to spatial max-pooling which is commonly employed in convolutional neural networks. However, unlike in spatial pooling the maxout unit pools over a subspace of $\\mathbf { k }$ different linear transformations applied to the same input v. In contrast to this, spatial max-pooling of linear feature maps would compute a pooling over one linear transformation applied to k different inputs. A schematic of the difference between several pooling operations is given in Fig. 1 . ",
212
+ "bbox": [
213
+ 174,
214
+ 867,
215
+ 825,
216
+ 924
217
+ ],
218
+ "page_idx": 1
219
+ },
220
+ {
221
+ "type": "image",
222
+ "img_path": "images/addad00f4a007379222e2ad43fec15d06265e9cab4b05a029e0a99a75f1c5bed.jpg",
223
+ "image_caption": [
224
+ "Figure 1: Schematic of different pooling operations. a) An exemplary input image taken from the ImageNet dataset together with the depiction of a spatial pooling region (cyan) as well as the input to one maxout / probout unit (marked in magenta). b) Spatial max-pooling proceeds by computing the maximum of one filter response at the four different positions from a). c) Maxout computes a pooled response of two linear filter mappings applied to one input patch. d) The activation of a probout unit is computed by sampling one of the linear responses according to their probability. "
225
+ ],
226
+ "image_footnote": [],
227
+ "bbox": [
228
+ 174,
229
+ 101,
230
+ 825,
231
+ 251
232
+ ],
233
+ "page_idx": 2
234
+ },
235
+ {
236
+ "type": "text",
237
+ "text": "",
238
+ "bbox": [
239
+ 173,
240
+ 376,
241
+ 825,
242
+ 433
243
+ ],
244
+ "page_idx": 2
245
+ },
246
+ {
247
+ "type": "text",
248
+ "text": "As such maxout is thus more similar to the subspace pooling operations used for example in topographic ICA [10] which is known to result in partial invariance to changes within its input. On the basis of this observation we propose a stochastic generalization of the maxout unit that preserves its desirable properties while improving gradient propagation among the $k$ linear feature mappings as well as the invariance properties of each unit. In the following we call these generalized units probout units since they are a direct probabilistic generalization of maxout. ",
249
+ "bbox": [
250
+ 173,
251
+ 439,
252
+ 825,
253
+ 523
254
+ ],
255
+ "page_idx": 2
256
+ },
257
+ {
258
+ "type": "text",
259
+ "text": "We derive the probout unit activation function from the maxout formulation by replacing the maximum operation in Eq. (2) with a probabilistic sampling procedure. More specifically we assume a Boltzmann distribution over the $k$ linear feature mappings and sample the activation $h ( \\mathbf { v } )$ from the activation of the corresponding subspace units. To this end we first define a probability for each of the $\\mathrm { k }$ linear units in the subspace as: ",
260
+ "bbox": [
261
+ 174,
262
+ 530,
263
+ 825,
264
+ 599
265
+ ],
266
+ "page_idx": 2
267
+ },
268
+ {
269
+ "type": "equation",
270
+ "img_path": "images/156efb063fa4a8172c76c4e9146d36a4f286d17f2420347650756b773204f007.jpg",
271
+ "text": "$$\np _ { i } = \\frac { e ^ { \\lambda z _ { i } } } { \\sum _ { j = 1 } ^ { k } e ^ { \\lambda z _ { j } } } ,\n$$",
272
+ "text_format": "latex",
273
+ "bbox": [
274
+ 437,
275
+ 609,
276
+ 558,
277
+ 651
278
+ ],
279
+ "page_idx": 2
280
+ },
281
+ {
282
+ "type": "text",
283
+ "text": "where $\\lambda$ is a hyperparameter (referred to as an inverse temperature parameter) controlling the variance of the distribution. The activation $h _ { p r o b o u t } ( \\mathbf { x } )$ is then sampled as ",
284
+ "bbox": [
285
+ 173,
286
+ 661,
287
+ 823,
288
+ 690
289
+ ],
290
+ "page_idx": 2
291
+ },
292
+ {
293
+ "type": "equation",
294
+ "img_path": "images/4332a7f2c9b841cb5dae2d6bb864e05a59ca0955f9e8666a905b1b49231ab261.jpg",
295
+ "text": "$$\nh _ { p r o b o u t } ( \\mathbf { v } ) = z _ { i } , { \\mathrm { ~ w h e r e ~ } } i \\sim M u l t i n o m i a l \\{ p _ { 1 } , \\dots , p _ { k } \\} .\n$$",
296
+ "text_format": "latex",
297
+ "bbox": [
298
+ 307,
299
+ 699,
300
+ 691,
301
+ 718
302
+ ],
303
+ "page_idx": 2
304
+ },
305
+ {
306
+ "type": "text",
307
+ "text": "Comparing Eq. (4) to Eq. (2) we see that both, are not bounded from above or below and their activation is always given as one of the linear feature mappings within their subspace. The probout unit hence preserves most of the properties of the maxout unit, only replacing the sub-unit selection mechanism. ",
308
+ "bbox": [
309
+ 174,
310
+ 728,
311
+ 825,
312
+ 784
313
+ ],
314
+ "page_idx": 2
315
+ },
316
+ {
317
+ "type": "text",
318
+ "text": "We can further see that Eq. (4) reduces to the maxout activation for $\\lambda \\infty$ . For other values of $\\lambda$ the probout unit will behave similarly to maxout when the activation of one linear unit in the subspace dominates. However, if the activation of multiple linear units differs only slightly they will be selected with almost equal probability. Futhermore, each active linear unit will have a chance to be selected. The sampling approach therefore ensures that gradient flows through each of the $k$ linear subspace units of a given probout unit for some examples (given that $\\lambda$ is sufficiently small). We hence argue that probout units can learn to better utilize their full $\\mathrm { k }$ -dimensional subspace. ",
319
+ "bbox": [
320
+ 173,
321
+ 790,
322
+ 825,
323
+ 888
324
+ ],
325
+ "page_idx": 2
326
+ },
327
+ {
328
+ "type": "text",
329
+ "text": "In practice we want to combine the probout units described by Eq. (4) with dropout for regularizing the learned model. To achieve this we directly include dropout in the probabilistic sampling step by ",
330
+ "bbox": [
331
+ 173,
332
+ 895,
333
+ 823,
334
+ 924
335
+ ],
336
+ "page_idx": 2
337
+ },
338
+ {
339
+ "type": "text",
340
+ "text": "re-defining the probabilities as: ",
341
+ "bbox": [
342
+ 173,
343
+ 103,
344
+ 380,
345
+ 118
346
+ ],
347
+ "page_idx": 3
348
+ },
349
+ {
350
+ "type": "equation",
351
+ "img_path": "images/4c8c4eea602805b190758011c0ef33f8cc815fc803ce1989cb3172a53a9d8abc.jpg",
352
+ "text": "$$\n\\begin{array} { l } { \\displaystyle \\hat { p } _ { 0 } = 0 . 5 } \\\\ { \\displaystyle \\hat { p } _ { i } = \\frac { e ^ { \\lambda z _ { i } } } { 2 \\cdot \\sum _ { j = 1 } ^ { k } e ^ { \\lambda z _ { j } } } . } \\end{array}\n$$",
353
+ "text_format": "latex",
354
+ "bbox": [
355
+ 428,
356
+ 119,
357
+ 570,
358
+ 179
359
+ ],
360
+ "page_idx": 3
361
+ },
362
+ {
363
+ "type": "text",
364
+ "text": "Consequently, we sample the probout activation function including dropout $\\hat { h } _ { p r o b o u t } ( \\mathbf { v } )$ as ",
365
+ "bbox": [
366
+ 171,
367
+ 181,
368
+ 767,
369
+ 196
370
+ ],
371
+ "page_idx": 3
372
+ },
373
+ {
374
+ "type": "equation",
375
+ "img_path": "images/faae03857cbb031c6cada75c8a63e46b1fd9e13da4fc1b700808280ad8b6ba3b.jpg",
376
+ "text": "$$\n\\hat { h } _ { p r o b o u t } ( \\mathbf { v } ) = \\left\\{ \\begin{array} { l l } { 0 \\mathrm { ~ i f ~ } i = 0 } \\\\ { z _ { i } \\mathrm { ~ e l s e } } \\end{array} \\right. \\mathrm { ~ , ~ w h e r e ~ } i \\sim M u l t i n o m i a l \\{ \\hat { p } _ { 0 } , \\hat { p } _ { 1 } , \\dots , \\hat { p } _ { k } \\} .\n$$",
377
+ "text_format": "latex",
378
+ "bbox": [
379
+ 254,
380
+ 199,
381
+ 741,
382
+ 234
383
+ ],
384
+ "page_idx": 3
385
+ },
386
+ {
387
+ "type": "text",
388
+ "text": "2.2 Relation to other pooling operations ",
389
+ "text_level": 1,
390
+ "bbox": [
391
+ 176,
392
+ 248,
393
+ 464,
394
+ 263
395
+ ],
396
+ "page_idx": 3
397
+ },
398
+ {
399
+ "type": "text",
400
+ "text": "The idea of using a stochastic pooling operation has been explored in the context of spatial pooling within the machine learning literature before. Among this work the approach most similar to ours is [14]. There the authors introduced a probabilistic pooling approach in order to derive a convolutional deep believe network (DBN). They also use a Boltzmann distribution based on unit activations to calculate a sampling probability. The main difference between their work and ours is that they calculate the probability of sampling one unit at different spatial locations whereas we calculate the probability of sampling a unit among $\\mathrm { k }$ units forming a subspace at one spatial location. Another difference is that we forward propagate the sampled activation $z _ { i }$ whereas they use the calculated probability to activate a binary stochastic unit. ",
401
+ "bbox": [
402
+ 173,
403
+ 275,
404
+ 825,
405
+ 400
406
+ ],
407
+ "page_idx": 3
408
+ },
409
+ {
410
+ "type": "text",
411
+ "text": "Another approach closely related to our work is the stochastic pooling presented in [6]. Their stochastic pooling operation samples the activation of a pooling unit $p _ { i }$ proportionally to the activation $a$ of a rectified linear unit [8] computed at different spatial positions. This is similar to Eq. (4) in the sense that the activation is sampled from a set of different activations. Similar to [14] it however differs in that the sampling is performed over spatial locations rather than activations of different units. ",
412
+ "bbox": [
413
+ 174,
414
+ 406,
415
+ 825,
416
+ 489
417
+ ],
418
+ "page_idx": 3
419
+ },
420
+ {
421
+ "type": "text",
422
+ "text": "It should be noted that our work also bears some resemblance to recent work on training stochastic units, embedded in an autoencoder network, via back-propagation [15, 16]. In contrast to their work, which aims at using stochastic neurons to train a generative model, we embrace stochasticity in the subspace pooling operation as an effective means to regularize a discriminative model. ",
423
+ "bbox": [
424
+ 174,
425
+ 497,
426
+ 825,
427
+ 554
428
+ ],
429
+ "page_idx": 3
430
+ },
431
+ {
432
+ "type": "text",
433
+ "text": "2.3 Inference ",
434
+ "text_level": 1,
435
+ "bbox": [
436
+ 174,
437
+ 569,
438
+ 279,
439
+ 583
440
+ ],
441
+ "page_idx": 3
442
+ },
443
+ {
444
+ "type": "text",
445
+ "text": "At test time we need to account for the stochastic nature of a neural network containing probout units. During a forward pass through the network the value of each probout unit is sampled from one of $k$ values according to their probability. The output of such a forward pass thus always represents only one of $k ^ { M }$ different instantiations of the trained probout network; where $M$ is the number of probout units in the network. When combined with dropout the number of possible instantiations increases to $\\left( k + 1 \\right) ^ { M }$ . Evaluating all possible models at test time is therefore clearly infeasible. The Dropout formulation from [1] deals with this large amount of possible models by removing dropout at test time and halving the weights of each unit. If the network consists of only one softmax layer then this modified network performs exact model averaging [1]. For general models this computation is merely an approximation of the true model average which, however, performs well in practice for both deep ReLU networks [2] and the maxout model [7]. ",
446
+ "bbox": [
447
+ 174,
448
+ 594,
449
+ 825,
450
+ 751
451
+ ],
452
+ "page_idx": 3
453
+ },
454
+ {
455
+ "type": "text",
456
+ "text": "We adopt the same procedure of halving the weights for removing the influence of dropout at testtime and rescale the probabilities such that $\\textstyle \\sum _ { i = 1 } ^ { k } { \\hat { p } } _ { i } \\ = \\ 1$ and $\\hat { p } _ { 0 } = 0$ , effectively replacing the sampling from Eq .(7) with Eq. (4). We further observe that from the $k ^ { M }$ models remaining after removing dropout only few models will be instantiated with high probability. We therefore resort to sampling a small number of outputs $\\mathbf { o }$ from the networks softmax layer and average their values. An evaluation of the exact effect of this model averaging can be found in Section 3.1.1 . ",
457
+ "bbox": [
458
+ 174,
459
+ 757,
460
+ 825,
461
+ 847
462
+ ],
463
+ "page_idx": 3
464
+ },
465
+ {
466
+ "type": "text",
467
+ "text": "3 Evaluation ",
468
+ "text_level": 1,
469
+ "bbox": [
470
+ 174,
471
+ 864,
472
+ 295,
473
+ 881
474
+ ],
475
+ "page_idx": 3
476
+ },
477
+ {
478
+ "type": "text",
479
+ "text": "We evaluate our method on three different image classification datasets (CIFAR-10, CIFAR-100 and SVHN) comparing it against the basic maxout model as well as the current state of the art on all datasets. All experiments were performed using an implementation based on Theano and the pylearn2 library [17] using the fast convoltion code of [2]. We use mini-batch stochastic gradient descent with a batch size of 100. For each of the datasets we start with the same network used in [7] – retaining all of their hyperparameter choices – to ensure comparability between results. We replace the maxout units in the network with probout units and choose one $\\lambda ^ { ( l ) }$ via crossvalidation for each layer $l$ in a preliminary experiment on CIFAR-10. ",
480
+ "bbox": [
481
+ 174,
482
+ 895,
483
+ 823,
484
+ 924
485
+ ],
486
+ "page_idx": 3
487
+ },
488
+ {
489
+ "type": "image",
490
+ "img_path": "images/d8121e66e480fe125b42fe50f7d2378ca87198448320e76a89c8dffd9b3ec18f.jpg",
491
+ "image_caption": [
492
+ "Figure 2: Visualization of pairs of first layer linear filters learned by the maxout model (left) as well as the probout model (right). In contrast to the maxout filters the filter pairs learned by the probout model appear to mostly be transformed versions of each other. "
493
+ ],
494
+ "image_footnote": [],
495
+ "bbox": [
496
+ 256,
497
+ 101,
498
+ 741,
499
+ 198
500
+ ],
501
+ "page_idx": 4
502
+ },
503
+ {
504
+ "type": "text",
505
+ "text": "",
506
+ "bbox": [
507
+ 174,
508
+ 280,
509
+ 825,
510
+ 366
511
+ ],
512
+ "page_idx": 4
513
+ },
514
+ {
515
+ "type": "text",
516
+ "text": "3.1 Experiments on CIFAR-10 ",
517
+ "text_level": 1,
518
+ "bbox": [
519
+ 174,
520
+ 385,
521
+ 398,
522
+ 400
523
+ ],
524
+ "page_idx": 4
525
+ },
526
+ {
527
+ "type": "text",
528
+ "text": "We begin our experiments with the CIFAR-10 [18] dataset. It consists of 50, 000 training images and 10, 000 test images that are grouped into 10 categories. Each of these images is of size $3 2 \\times 3 2$ pixels and contains 3 color channels. Maxout is known to yield good performance on this dataset, making it an ideal starting point for evaluating the difference between maxout and probout units. ",
529
+ "bbox": [
530
+ 174,
531
+ 412,
532
+ 825,
533
+ 468
534
+ ],
535
+ "page_idx": 4
536
+ },
537
+ {
538
+ "type": "text",
539
+ "text": "3.1.1 Effect of replacing maxout with probout units ",
540
+ "text_level": 1,
541
+ "bbox": [
542
+ 174,
543
+ 486,
544
+ 544,
545
+ 501
546
+ ],
547
+ "page_idx": 4
548
+ },
549
+ {
550
+ "type": "text",
551
+ "text": "We conducted a preliminary experiment to evaluate the effect of the probout parameters $\\lambda ^ { ( l ) }$ on the performance and compare it to the standard maxout model. For this purpose we use a five layer model consisting of three convolutional layers with 48, 128 and 128 probout units respectively which pool over 2 linear units each. The penultimate layer then consists of 240 probout units pooling over a subspace of 5 linear units. The final layer is a standard softmax layer mapping from the 240 units in the penultimate layer to the 10 classes of CIFAR-10. The receptive fields of units in the convolutional layers are 8, 8 and 5 respectively. Additionally, spatial max-pooling is performed after each convolutional layer with pooling size of $4 \\times 4 , 4 \\times 4$ and $2 \\times 2$ using a stride of 2 in all layers. We split the CIFAR-10 training data retaining the first 40000 samples for training and using the last 10000 samples as a validation set. ",
552
+ "bbox": [
553
+ 174,
554
+ 512,
555
+ 825,
556
+ 651
557
+ ],
558
+ "page_idx": 4
559
+ },
560
+ {
561
+ "type": "text",
562
+ "text": "We start our evaluation by using probout units everywhere in the network and cross-validate the choice of the inverse-temperature parameters $\\lambda ^ { ( l ) } \\in \\dot { \\left\\{ 0 . 1 , 0 . 5 , 1 , 2 , 3 , 4 \\right\\} }$ keeping all other hyperparameters fixed. We find that annealing the $\\lambda ^ { ( l ) }$ parameter during training to a lower value improved performance for all $\\lambda ^ { ( l ) } > 0 . 5$ and hence linearly decrease $\\lambda ^ { ( l ) }$ to a value that is 0.9 lower than the initial $\\lambda$ in these cases. As shown in Fig. 3a the best classification performance is achieved when $\\lambda$ is set to allow higher variance sampling for the first two layers, specifically when $\\lambda ^ { ( 1 ) } = 1$ and $\\lambda ^ { ( 2 ) } = 2$ . For the third as well as the fully connected layer we observe a performance increase when $\\lambda ^ { ( 3 ) }$ is chosen as $\\lambda ^ { ( 3 ) } = 3$ and $\\lambda ^ { ( 4 ) } = 4$ , meaning that the sampling procedure selects the maximum value with high probability. This indicates that the probabilistic sampling is most effective in lower layers. We verified this by replacing the probout units in the last two layers with maxout units which did not significantly decrease classification accuracy. ",
563
+ "bbox": [
564
+ 174,
565
+ 659,
566
+ 825,
567
+ 819
568
+ ],
569
+ "page_idx": 4
570
+ },
571
+ {
572
+ "type": "text",
573
+ "text": "We hypothesize that increasing the probability of sampling a non maximal linear unit in the subspace pulls the units in the subspace closer together and forces the network to become “more invariant” to changes within this subspace. This is a property that is desired in lower layers but might turn to be detrimental in higher layers where the model averaging effect of maxout is more important than achieving invariance. Here sampling units with non-maximal activation could result in unwanted correlation between the “submodels”. To qualitatively verify this claim we plot the first layer linear filters learned using probout units alongside the filters learned by a model consisting only of maxout units in Fig. 2. When inspecting the filters we can see that many of the filters belonging to one subspace formed by a probout unit seem to be transformed versions of each other, with some of then resembling “quadrature pairs” of filters. Among the linear filters learned by the maxout model some also appear to encode invariance to local transformations. Most of the filters contained in a subspace however are seemingly unrelated. To support this observation empirically we probed for changes in the feature vectors of different layers (extracted from both maxout and probout models) when they are applied to translated and rotated images from the validation set. Similar to [19, 3] we calculate the normalized Euclidean distance between feature vectors extracted from an unchanged image and a transformed version. We then plot these distances for several exemplary images as well as the mean over 100 randomly sampled images. The result of this experiment is given in Fig. 4, showing that introducing probout units into the network has a moderate positive effect on both invariance to translation and rotations. ",
574
+ "bbox": [
575
+ 174,
576
+ 825,
577
+ 825,
578
+ 924
579
+ ],
580
+ "page_idx": 4
581
+ },
582
+ {
583
+ "type": "image",
584
+ "img_path": "images/82f13075d398a6bf98b4ac025d3985458525d54cba7137f78c72bb3c645ac40e.jpg",
585
+ "image_caption": [
586
+ "Figure 3: (a) Validation of the $\\lambda ^ { ( l ) }$ parameter for layers $l \\in [ 1 , 2 ]$ on CIFAR-10. We plot the error on the validation set after training (using 50 model evaluations). When evaluating the choice of $\\lambda ^ { ( 1 ) }$ (red curve) the second parameter fixed $\\bar { \\lambda } ^ { ( 2 ) } = 2$ . Likewise, for the experiments regarding $\\lambda ^ { ( 2 ) }$ (blue curve) $\\lambda ^ { ( 1 ) } = 1$ . (b) Evolution of the classification error and standard deviation on the CIFAR10 dataset for a changing number $E$ of model evaluations. We average the activation $\\mathbf { o } \\in \\mathbb { R } ^ { C }$ of the softmax layer over all $E$ evaluations and compute the predicted class label $\\hat { y }$ as the maximum $\\hat { y } = \\arg \\operatorname* { m a x } _ { i \\in \\{ 1 , \\ldots , C \\} } o _ { i }$ . The standard deviation is computed over 10 runs of $E$ model evaluations. "
587
+ ],
588
+ "image_footnote": [],
589
+ "bbox": [
590
+ 179,
591
+ 99,
592
+ 815,
593
+ 297
594
+ ],
595
+ "page_idx": 5
596
+ },
597
+ {
598
+ "type": "text",
599
+ "text": "",
600
+ "bbox": [
601
+ 174,
602
+ 445,
603
+ 825,
604
+ 612
605
+ ],
606
+ "page_idx": 5
607
+ },
608
+ {
609
+ "type": "text",
610
+ "text": "Finally, we evaluate the computational cost of the model averaging procedure described in Section 2.3 at test time. As depicted in Fig. 3b the classification error for the probout model decreases with more model evaluations saturating when a moderate amount of 50 evaluations is reached. Conversely, using sampling at test time in conjunction with the standard maxout model significantly decreases performance. This indicates that the maxout model is highly optimized for the maximum responses and cannot deal with the noise introduced through the sampling procedure. We additionally also tried to replace the model averaging mechanism with cheaper approximations. Replacing the sampling in the probout units with a maximum operation at test time resulted in a decrease in performance, reaching $1 4 . 1 3 \\%$ . We also tried to use probability weighting during testing [6] which however performed even worse, achieving $1 5 . 2 1 \\%$ . ",
611
+ "bbox": [
612
+ 174,
613
+ 619,
614
+ 825,
615
+ 758
616
+ ],
617
+ "page_idx": 5
618
+ },
619
+ {
620
+ "type": "text",
621
+ "text": "3.1.2 Evaluation of Classification Performance ",
622
+ "text_level": 1,
623
+ "bbox": [
624
+ 176,
625
+ 779,
626
+ 509,
627
+ 792
628
+ ],
629
+ "page_idx": 5
630
+ },
631
+ {
632
+ "type": "text",
633
+ "text": "As the next step, we evaluate the performance of our model on the full CIFAR-10 benchmark. We follow the same protocol as in [7] to train the probout model. That is, we first preprocess all images by applying contrast normalization followed by ZCA whitening. We then train our model using the first 40000 examples from the training set using the last 10000 examples as a validation set. Training then proceeds until the validation error stops decreasing. We then retrain the model on the complete training set for the same amount of epochs it took to reach the best validation error. ",
634
+ "bbox": [
635
+ 174,
636
+ 804,
637
+ 823,
638
+ 888
639
+ ],
640
+ "page_idx": 5
641
+ },
642
+ {
643
+ "type": "text",
644
+ "text": "To comply with the experiments in [7] we used a larger version of the model from Section 3.1.1 in all experiments. Compared to the preliminary experiment the size of the convolutional layers was increased to 96, 192 and 192 units respectively. The size of the fully connected layer was increased to 500 probout units pooling over a 5 dimensional subspace. ",
645
+ "bbox": [
646
+ 174,
647
+ 895,
648
+ 821,
649
+ 924
650
+ ],
651
+ "page_idx": 5
652
+ },
653
+ {
654
+ "type": "table",
655
+ "img_path": "images/a1a14cf742ee22014be622b274ccd1b97cd5c444127282b482dab8eae6020009.jpg",
656
+ "table_caption": [
657
+ "Table 1: Classification error of different models on the CIFAR-10 dataset. "
658
+ ],
659
+ "table_footnote": [],
660
+ "table_body": "<table><tr><td rowspan=1 colspan=1>METHOD</td><td rowspan=1 colspan=1>ERROR</td></tr><tr><td rowspan=1 colspan=1>CONV.NET+SPEARMINT[20]CONV.NET+MAXOUT[7]CONV.NET+PROBOUT</td><td rowspan=1 colspan=1>14.98%11.69 %11.35 %</td></tr><tr><td rowspan=1 colspan=1>12 × CONV.NET+DROPCONNECT[4]CONV.NET+MAXOUT[7]CONV.NET+PROBOUT</td><td rowspan=1 colspan=1>9.32 %9.38%9.39%</td></tr></table>",
661
+ "bbox": [
662
+ 326,
663
+ 145,
664
+ 665,
665
+ 239
666
+ ],
667
+ "page_idx": 6
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "",
672
+ "bbox": [
673
+ 174,
674
+ 262,
675
+ 823,
676
+ 291
677
+ ],
678
+ "page_idx": 6
679
+ },
680
+ {
681
+ "type": "text",
682
+ "text": "The top half of Table 1 shows the result of training this model as well as other recent results. We achieve an error of $1 1 . 3 5 \\%$ , slightly better than – but statistically tied to – the previous state of the art given by the maxout model. We also evaluated the performance of this model when the training data is augmented with additional transformed training examples. For this purpose we train our model using the original training images as well as add randomly translated and horizontally flipped versions of the images. The bottom half of Table 1 shows a comparison of different results for training on CIFAR-10 with additional data augmentation. Using this augmentation process we achieve a classification error of $9 . 3 9 \\%$ , matching, but not outperforming the maxout result. ",
683
+ "bbox": [
684
+ 173,
685
+ 297,
686
+ 825,
687
+ 410
688
+ ],
689
+ "page_idx": 6
690
+ },
691
+ {
692
+ "type": "text",
693
+ "text": "3.2 CIFAR-100 ",
694
+ "text_level": 1,
695
+ "bbox": [
696
+ 174,
697
+ 426,
698
+ 294,
699
+ 441
700
+ ],
701
+ "page_idx": 6
702
+ },
703
+ {
704
+ "type": "text",
705
+ "text": "The images contained in the CIFAR-100 dataset [18] are – just as the CIFAR-10 images – taken from a subset of the 10-million images database. The dataset contains 50, 000 training and 10, 000 test examples of size $3 2 \\times 3 2$ pixels each. The dataset is hence similar to CIFAR-10 in both size and image content. It, however, differs from CIFAR-10 in its label distribution. Concretely, CIFAR-100 contains images of 100 classes grouped into 20 “super-classes”. The training data therefore contains 500 training images per class $^ { - 1 0 }$ times less examples per class than in CIFAR-10 – which are accompanied by 100 examples in the test-set. ",
706
+ "bbox": [
707
+ 174,
708
+ 453,
709
+ 825,
710
+ 551
711
+ ],
712
+ "page_idx": 6
713
+ },
714
+ {
715
+ "type": "text",
716
+ "text": "We do not make use of the 20 super-classes and train a model using a similar setup to the experiments we carried out on CIFAR-10. Specifically, we use the same preprocessing and training procedure (determining the amount of epochs using a validation set and then retraining the model on the complete data). The same network as in Section 3.1.1 was used for this experiment (adapted to classify 100 classes). Again, this is the same architecture used in [7] thus ensuring comparability between results. During testing we use 50 model evaluations to average over the sampled probout units. ",
717
+ "bbox": [
718
+ 174,
719
+ 558,
720
+ 825,
721
+ 642
722
+ ],
723
+ "page_idx": 6
724
+ },
725
+ {
726
+ "type": "text",
727
+ "text": "The result of this experiment is given in Table 2. In agreement with the CIFAR-10 results our model performs marginally better than the maxout model (by $0 . 4 5 \\% ^ { 1 }$ ). As also shown in the table the current best method on CIFAR-100 achieves a classification error of $3 6 . 8 5 \\%$ [21], using a larger convolutional neural network together with a tree-based prior on the classes formed by utilizing the super-classes. A similar performance increase could potentially be achieved by combining their tree-based prior with our model. ",
728
+ "bbox": [
729
+ 174,
730
+ 648,
731
+ 825,
732
+ 732
733
+ ],
734
+ "page_idx": 6
735
+ },
736
+ {
737
+ "type": "text",
738
+ "text": "3.3 SVHN ",
739
+ "text_level": 1,
740
+ "bbox": [
741
+ 174,
742
+ 750,
743
+ 258,
744
+ 765
745
+ ],
746
+ "page_idx": 6
747
+ },
748
+ {
749
+ "type": "text",
750
+ "text": "The street view house numbers dataset [22] is a collection of images depicting digits which were obtained from google street view images. The dataset comes in two variants of which we restrict ourselves to the one containing cropped $3 2 \\times 3 2$ pixel images. Similar to the well known MNIST dataset [23] the task for this dataset is to classify each image as one of 10 digits in the range from 0 to 9. The task is considerably more difficult than MNIST since the images are cropped out of natural image data. The images thus contain color information and show significant contrast variation. Furthermore, although centered on one digit, several images contain multiple visible digits, complicating the classification task. ",
751
+ "bbox": [
752
+ 173,
753
+ 776,
754
+ 825,
755
+ 861
756
+ ],
757
+ "page_idx": 6
758
+ },
759
+ {
760
+ "type": "table",
761
+ "img_path": "images/245d94622aa31aec3fd46eba02463a36ff0d70cac0093ed1dddcf077683a4a6d.jpg",
762
+ "table_caption": [
763
+ "Table 2: Classification error of different models on the CIFAR-100 dataset. "
764
+ ],
765
+ "table_footnote": [],
766
+ "table_body": "<table><tr><td>METHOD</td><td>ERROR</td></tr><tr><td>RECEPTIVE FIELD LEARNING [24] LEARNED POOLING [25] CONV. NET + STOCHASTIC POOLING [6]</td><td>45.17 % 43.71% 42.51%</td></tr><tr><td>CONV.NET + DROPOUT + TREE [21]</td><td>36.85 %</td></tr><tr><td>CONV.NET+MAXOUT[7] CONV.NET+PROBOUT</td><td>38.57% 38.14%</td></tr></table>",
767
+ "bbox": [
768
+ 320,
769
+ 145,
770
+ 673,
771
+ 239
772
+ ],
773
+ "page_idx": 7
774
+ },
775
+ {
776
+ "type": "text",
777
+ "text": "",
778
+ "bbox": [
779
+ 176,
780
+ 258,
781
+ 821,
782
+ 286
783
+ ],
784
+ "page_idx": 7
785
+ },
786
+ {
787
+ "type": "text",
788
+ "text": "The training and test set contain 73, 257 and 20, 032 labeled examples respectively. In addition to this data there is an “extra” set of 531, 131 labeled digits which are somewhat less difficult to differentiate and can be used as additional training data. As in [7] we build a validation set by selecting 400 examples per class from the training and 200 examples per class from the extra dataset. We conflate all remaining training images to a large set of 598, 388 images which we use for training. ",
789
+ "bbox": [
790
+ 174,
791
+ 294,
792
+ 825,
793
+ 364
794
+ ],
795
+ "page_idx": 7
796
+ },
797
+ {
798
+ "type": "text",
799
+ "text": "The model trained for this task consists of three convolutional layers containing 64, 128 and 128 units respectively, pooling over a 2 dimensional subspace. These are followed by a fully connected and a softmax layer of which the fully connected layer contains 400 units pooling over a 5 dimensional subspace. This yields a classification error of $2 . 3 9 \\%$ (using 50 model evaluations at testtime), matching the current state of the art for a model trained on SVHN without data augmentation achieved by the maxout model $( 2 . 4 7 \\% )$ . A comparison to other results can be found in Table 3 . This includes the current best result with data augmentation which was obtained using a generalization of dropout in conjunction with a large network containing rectified linear units [4]. ",
800
+ "bbox": [
801
+ 174,
802
+ 369,
803
+ 825,
804
+ 482
805
+ ],
806
+ "page_idx": 7
807
+ },
808
+ {
809
+ "type": "text",
810
+ "text": "Table 3: Classification error of different models on the SVHN dataset. The top half shows a comparison of our result with the current state of the art achieved without data augmentation. The bottom half gives the best performance achieved with data augmentation as additional reference. ",
811
+ "bbox": [
812
+ 173,
813
+ 489,
814
+ 823,
815
+ 532
816
+ ],
817
+ "page_idx": 7
818
+ },
819
+ {
820
+ "type": "table",
821
+ "img_path": "images/20fa6c19b41c30719d65051c81e4d6530b7133e16bff12f3e5b3c59c4956b65d.jpg",
822
+ "table_caption": [],
823
+ "table_footnote": [],
824
+ "table_body": "<table><tr><td rowspan=1 colspan=1>METHOD</td><td rowspan=1 colspan=1>ERROR</td></tr><tr><td rowspan=1 colspan=1>CONV.NET+ STOCHASTIC POOLING [6]CONV.NET+DROPOUT[26]CONV.NET+ MAXOUT[7]CONV.NET+PROBOUT</td><td rowspan=1 colspan=1>2.80%2.78%2.47%2.39%</td></tr><tr><td rowspan=1 colspan=1>CONV.NET+DROPOUT[26]5 × CONV. NET + DROPCONNECT [4]</td><td rowspan=1 colspan=1>2.68%1.93 %</td></tr></table>",
825
+ "bbox": [
826
+ 325,
827
+ 549,
828
+ 668,
829
+ 642
830
+ ],
831
+ "page_idx": 7
832
+ },
833
+ {
834
+ "type": "text",
835
+ "text": "4 Conclusion ",
836
+ "text_level": 1,
837
+ "bbox": [
838
+ 174,
839
+ 665,
840
+ 299,
841
+ 681
842
+ ],
843
+ "page_idx": 7
844
+ },
845
+ {
846
+ "type": "text",
847
+ "text": "We presented a probabilistic version of the recently introduced maxout unit. A model built using these units was shown to yield competitive performance on three challenging datasets (CIFAR-10, CIFAR-100, SVHN). As it stands, replacing maxout units with probout units is computationally expensive at test time. This problem could be diminished by developing an approximate inference scheme similar to [2, 3] which we see as an interesting possibility for future work. ",
848
+ "bbox": [
849
+ 174,
850
+ 695,
851
+ 825,
852
+ 766
853
+ ],
854
+ "page_idx": 7
855
+ },
856
+ {
857
+ "type": "text",
858
+ "text": "We see our approach as part of a larger body of work on exploring the utility of learning “complex cell like” units which can give rise to interesting invariances in neural networks. While this paradigm has extensively been studied in unsupervised learning it is less explored in the supervised scenario. We believe that work towards building activation functions incorporating such invariance properties, while at the same time designed for use with efficient model averaging techniques such as dropout, is a worthwhile endeavor for advancing the field. ",
859
+ "bbox": [
860
+ 174,
861
+ 772,
862
+ 825,
863
+ 857
864
+ ],
865
+ "page_idx": 7
866
+ },
867
+ {
868
+ "type": "text",
869
+ "text": "Acknowledgments ",
870
+ "text_level": 1,
871
+ "bbox": [
872
+ 174,
873
+ 871,
874
+ 303,
875
+ 886
876
+ ],
877
+ "page_idx": 7
878
+ },
879
+ {
880
+ "type": "text",
881
+ "text": "The authors want to thank Alexey Dosovistkiy for helpful discussions and comments, as well as Thomas Brox for generously providing additional computing resources. ",
882
+ "bbox": [
883
+ 174,
884
+ 895,
885
+ 823,
886
+ 924
887
+ ],
888
+ "page_idx": 7
889
+ },
890
+ {
891
+ "type": "text",
892
+ "text": "References ",
893
+ "text_level": 1,
894
+ "bbox": [
895
+ 174,
896
+ 102,
897
+ 266,
898
+ 118
899
+ ],
900
+ "page_idx": 8
901
+ },
902
+ {
903
+ "type": "text",
904
+ "text": "[1] mprov ing neural networks by preventing co-adaptation of feature detectors. arxiv:cs/1207.0580v3. [2] Alex Krizhevsky, Ilya Sutskever, and Geoff Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems 25. 2012. [3] Matthew Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. arxiv:cs/1311.2901v3. [4] Li Wan, Matthew D. Zeiler, Sixin Zhang, Yann LeCun, and Rob Fergus. Regularization of neural networks using dropconnect. In International Conference on Machine Learning (ICML), 2013. [5] Jimmy Ba and Brendan Frey. Adaptive dropout for training deep neural networks. In Advances in Neural Information Processing Systems 26. 2013. [6] Matthew D. Zeiler and Rob Fergus. Stochastic pooling for regularization of deep convolutional neural networks. In International Conference on Learning Representations (ICLR): Workshop track, 2013. [7] Ian J. Goodfellow, David Warde-Farley, Mehdi Mirza, Aaron Courville, and Yoshua Bengio. Maxout networks. In International Conference on Machine Learning (ICML), 2013. [8] Vinod Nair and Geoffrey E. Hinton. Rectified linear units improve restricted boltzmann machines. In International Conference on Machine Learning (ICML), 2010. [9] Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Deep sparse rectifier neural networks. In AISTATS 2011, April 2011. \n[10] Jarmo Hurri Aapo Hyvrinen and Patrik O. Hoyer. Natural Image Statistics. \n[11] Yoshua Bengio and James S. Bergstra. Slow, decorrelated features for pretraining complex cell-like networks. In Advances in Neural Information Processing Systems 22. 2009. \n[12] Will Y. Zou, Shenghuo Zhu, Andrew Y. Ng, and Kai Yu. Deep learning of invariant features via simulated fixations in video. In Neural Information Processing Systems (NIPS 2012), 2012. \n[13] Razvan Pascanu Yoshua Bengio Caglar Gulcehre, Kyunghyun Cho. Learned-norm pooling for deep neural networks. arxiv:stat/1311.1780v3. \n[14] Honglak Lee, Roger Grosse, Rajesh Ranganath, and Andrew Y Ng. Convolutional deep belief networks for scalable unsupervised learning of hierarchical representations. pages 1–8, 2009. \n[15] Yoshua Bengio. Estimating or propagating gradients through stochastic neurons. \n[16] Jason Yosinski Yoshua Bengio, ric Thibodeau-Laufer. Deep generative stochastic networks trainable by backprop. \n[17] Pascal Lamblin Vincent Dumoulin Mehdi Mirza Razvan Pascanu James Bergstra Frdric Bastien Yoshua Bengio Ian J. Goodfellow, David Warde-Farley. Pylearn2: a machine learning research library. arxiv:stat/1308.4214. \n[18] A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images. 2009. \n[19] Koray Kavukcuoglu, Marc’Aurelio Ranzato, Rob Fergus, and Yann LeCun. Learning invariant features through topographic filter maps. In Proc. International Conference on Computer Vision and Pattern Recognition (CVPR), 2009. \n[20] Jasper Snoek, Hugo Larochelle, and Ryan Prescott Adams. Practical bayesian optimization of machine learning algorithms. In Advances in Neural Information Processing Systems 25, 12/2012 2012. \n[21] Nitish Srivastava and Ruslan Salakhutdinov. Discriminative transfer learning with tree-based priors. In Advances in Neural Information Processing Systems 26, pages 2094–2102. 2013. \n[22] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y. Ng. Reading digits in natural images with unsupervised feature learning. In NIPS Workshop on Deep Learning and Unsupervised Feature Learning 2011, 2011. \n[23] Yann LeCun, Lon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. In Proceedings of the IEEE, number 11, 1998. \n[24] Yangqing Jia, Chang Huang, and Trevor Darrell. Beyond spatial pyramids: Receptive field learning for pooled image features. In CVPR, 2012. \n[25] Mateusz Malinowski and Mario Fritz. Learnable pooling regions for image classification. In International Conference on Learning Representations (ICLR): Workshop track, 2013. \n[26] Nitish Srivastava. Improving neural networks with dropout. In Master’s thesis, University of Toronto, 2013. ",
905
+ "bbox": [
906
+ 171,
907
+ 136,
908
+ 828,
909
+ 912
910
+ ],
911
+ "page_idx": 8
912
+ },
913
+ {
914
+ "type": "image",
915
+ "img_path": "images/fc59f6998792f8e36ef1e6813280a9f77091a639b7b43482fa2ab35926c0b783.jpg",
916
+ "image_caption": [
917
+ "Figure 4: Analysis of the impact of vertical translation and rotation on features extracted from a maxout and probout network. We plot the distance between normalized feature vectors extracted on transformed images and the original, unchanged, image. The distances for the probout model are plotted using thick lines. The distances for the maxout model are depicted using dashed lines. (a,b) 4 exemplary images undergoing different vertical translations and rotations respectively. (c,d) Euclidean distance between feature vectors from the original 4 images depicted in (a,b) and transformed images for Layer 1 (convolutional) and Layer 4 (fully connected) respectively. (e,f) Euclidean distance between feature vectors from the original 4 images and transformed versions for Layer 2 (convolutional) and Layer 4 (fully connected) respectively. (g,h) Mean Euclidean distance between feature vectors extracted from 100 randomly selected images and their transformed versions for different layers in the network. "
918
+ ],
919
+ "image_footnote": [],
920
+ "bbox": [
921
+ 186,
922
+ 17,
923
+ 812,
924
+ 796
925
+ ],
926
+ "page_idx": 9
927
+ }
928
+ ]
parse/train/NR4KjDE0w9RXD/NR4KjDE0w9RXD_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/NR4KjDE0w9RXD/NR4KjDE0w9RXD_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Skvgqgqxe/Skvgqgqxe.md ADDED
@@ -0,0 +1,221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LEARNING TO COMPOSE WORDS INTO SENTENCES WITH REINFORCEMENT LEARNING
2
+
3
+ Dani Yogatama1, Phil Blunsom1,2, Chris Dyer1, Edward Grefenstette1, and Wang Ling1 1DeepMind and 2University of Oxford {dyogatama,pblunsom,cdyer,etg,lingwang}@google.com
4
+
5
+ # ABSTRACT
6
+
7
+ We use reinforcement learning to learn tree-structured neural networks for computing representations of natural language sentences. In contrast with prior work on tree-structured models, in which the trees are either provided as input or predicted using supervision from explicit treebank annotations, the tree structures in this work are optimized to improve performance on a downstream task. Experiments demonstrate the benefit of learning task-specific composition orders, outperforming both sequential encoders and recursive encoders based on treebank annotations. We analyze the induced trees and show that while they discover some linguistically intuitive structures (e.g., noun phrases, simple verb phrases), they are different than conventional English syntactic structures.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Languages encode meaning in terms of hierarchical, nested structures on sequences of words (Chomsky, 1957). However, the degree to which neural network architectures that compute representations of the meaning of sentences for practical applications should explicitly reflect such structures is a matter for debate. In this work, we use reinforcement learning to learn to construct trees for computing sentence representations, guided by feedback from downstream tasks that depend on these representations. The space of structures that are considered by the learner includes both fully sequential structures (corresponding to traditional recurrent neural network “encoders”), as well as all projective binary trees. Thus, although we take seriously the notion that good compositional architectures might be tree-structured, we specify neither the form of the tree nor whether a tree is necessary at all, and instead leave those decisions up to the learner (and the data).
12
+
13
+ To place this work in context, there are three predominant approaches for constructing vector representations of sentences from a sequence of words. The first composes words sequentially using a recurrent neural network, treating the RNN’s final hidden state as the representation of the sentence (Cho et al., 2014; Sutskever et al., 2014; Kiros et al., 2015). In such models, there is no explicit hierarchical organization imposed on the words, and the RNN’s dynamics must learn to simulate it. The second approach uses tree-structured networks to recursively compose representations of words and phrases to form representations of larger phrases and, finally, the complete sentence. In contrast to sequential models, these models’ architectures are organized according to each sentence’s syntactic structure, that is, the hierarchical organization of words into nested phrases that characterizes human intuitions about how words combine to form grammatical sentences. Prior work on tree-structured models has assumed that trees are either provided together with the input sentences (Clark et al., 2008; Grefenstette & Sadrzadeh, 2011; Socher et al., 2012; 2013; Tai et al., 2015) or that they are predicted based on explicit treebank annotations jointly with the downstream task (Bowman et al., 2016; Dyer et al., 2016). The last approach for constructing sentence representations uses convolutional neural networks to produce the representation in a bottom up manner, either with syntactic information (Ma et al., 2015) or without (Kim, 2014; Kalchbrenner et al., 2014).
14
+
15
+ Our work can be understood as a compromise between the first two approaches. Rather than using explicit supervision of tree structure, we use reinforcement learning to learn tree structures (and thus, sentence-specific compositional architectures), taking performance on a downstream task that uses the computed sentence representation as the reward signal. In contrast to sequential RNNs, which ignore tree structure, our model still generates a latent tree for each sentence and uses it to structure the composition. Our hypothesis is that encouraging the model to learn tree-structured compositions will bias the model toward better generalizations about how words compose to form sentence meanings, leading to better performance on downstream tasks.
16
+
17
+ This work is related to unsupervised grammar induction (Klein & Manning, 2004; Blunsom & Cohn, 2010; Spitkovsky et al., 2011, inter alia), which seeks to infer a generative grammar of an infinite language from a finite sample of strings from the language—but without any semantic feedback. Previous work on unsupervised grammar induction that incorporates semantic supervision involves designing complex models for Combinatory Categorial Grammars (Zettlemoyer & Collins, 2005) or marginalizing over latent syntactic structures (Naradowsky et al., 2012). Since semantic feedback has been proposed as crucial for the acquisition of syntax (Pinker, 1984), our model offers a simpler alternative.1 However, our primary focus is on improving performance on the downstream model, so the learner may settle on a different solution than conventional English syntax. We thus also explore what kind of syntactic structures are derivable from shallow semantics.
18
+
19
+ Experiments on various tasks (i.e., sentiment analysis, semantic relatedness, natural language inference, and sentence generation) show that reinforcement learning is a promising direction to discover hierarchical structures of sentences. Notably, representations learned this way outperformed both conventional left-to-right models and tree-structured models based on linguistic syntax in downstream applications. This is in line with prior work showing the value of learning tree structures in statistical machine translation models (Chiang, 2007). Although the induced tree structures manifested a number of linguistically intuitive structures (e.g., noun phrases, simple verb phrases), there are a number of marked differences to conventional analyses of English sentences (e.g., an overall left-branching structure).
20
+
21
+ # 2 MODEL
22
+
23
+ Our model consists of two components: a sentence representation model and a reinforcement learning algorithm to learn the tree structure that is used by the sentence representation model.
24
+
25
+ # 2.1 TREE LSTM
26
+
27
+ Our sentence representation model follows the Stack-augmented Parser-Interpreter Neural Network (SPINN; Bowman et al., 2016), SPINN is a shift-reduce parser that uses Long Short-Term Memory (LSTM; Hochreiter and Schmidhuber, 1997) as its composition function. Given an input sentence of $N$ words $\mathbf { x } = \{ x _ { 1 } , x _ { 2 } , \ldots , x _ { N } \}$ , we represent each word by its embedding vector $\mathbf { x } _ { i } \in \mathbb { R } ^ { D }$ . The parser maintains an index pointer $p$ starting from the leftmost word $( p = 1 )$ ) and a stack. To parse the sentence, it performs a sequence of operations $\mathbf { a } = \{ a _ { 1 } , a _ { 2 } , \ldots , a _ { 2 N - 1 } \}$ , where $a _ { t } \in$ $\left\{ { \mathrm { S H I F T } } , { \mathrm { R E D U C E } } \right\}$ . A SHIFT operation pushes $\mathbf { x } _ { p }$ to the stack and moves the pointer to the next word $( p _ { + + } )$ ; while a REDUCE operation pops two elements from the stack, composes them to a single element, and pushes it back to the stack. SPINN uses Tree LSTM (Tai et al., 2015; Zhu et al., 2015) as the REDUCE composition function, which we follow. In Tree LSTM, each element of the stack is represented by two vectors, a hidden state representation $\mathbf { h }$ and a memory representation c. Two elements of the stack $\left( \mathbf { h } _ { i } , \mathbf { c } _ { i } \right)$ and $( \mathbf { h } _ { j } , \mathbf { c } _ { j } )$ are composed as:
28
+
29
+ $$
30
+ \begin{array} { r l } & { \mathbf i = \sigma ( \mathbf W _ { I } [ \mathbf h _ { i } , \mathbf h _ { j } ] + \mathbf b _ { I } ) \qquad \mathbf o = \sigma ( \mathbf W _ { O } [ \mathbf h _ { i } , \mathbf h _ { j } ] + \mathbf b _ { I } ) } \\ & { \mathbf f _ { L } = \sigma ( \mathbf W _ { F _ { L } } [ \mathbf h _ { i } , \mathbf h _ { j } ] + \mathbf b _ { F _ { L } } ) \qquad \mathbf f _ { R } = \sigma ( \mathbf W _ { F _ { R } } [ \mathbf h _ { i } , \mathbf h _ { j } ] + \mathbf b _ { F _ { R } } ) } \\ & { \mathbf g = \operatorname { t a n h } ( \mathbf W _ { G } [ \mathbf h _ { i } , \mathbf h _ { j } ] + \mathbf b _ { G } ) \qquad \mathbf c = \mathbf f _ { L } \odot \mathbf c _ { i } + \mathbf f _ { R } \odot \mathbf c _ { j } + \mathbf i \odot \mathbf g } \\ & { \mathbf h = \mathbf o \odot \mathbf c } \end{array}
31
+ $$
32
+
33
+ where $[ \mathbf { h } _ { i } , \mathbf { h } _ { j } ]$ denotes concatenation of $\mathbf { h } _ { i }$ and $\mathbf { h } _ { j }$ , and $\sigma$ is the sigmoid activation function.
34
+
35
+ A unique sequence of $\left\{ { \mathrm { S H I F T } } , { \mathrm { R E D U C E } } \right\}$ operations corresponds to a unique binary parse tree of the sentence. A SHIFT operation introduces a new leaf node in the parse tree, while a REDUCE operation combines two nodes by merging them into a constituent. See Figure 1 for an example. We note that for a sentence of length $N$ , there are exactly $N$ SHIFT operations and $N - 1$ REDUCE operations that are needed to produce a binary parse tree of the sentence. The final sentence representation produced by the Tree LSTM is the hidden state of the final element of the stack ${ \mathbf { h } } _ { N - 1 }$ (i.e., the topmost node of the tree).
36
+
37
+ ![](images/da67fea0241f5215c5a41cd1283516eb598ca23f1e307524506f193f92c7d6f2.jpg)
38
+ Figure 1: Four examples of trees and their corresponding SHIFT (S) and REDUCE (R) sequences. In each of the examples, there are 4 input words (4 leaf nodes), so 7 operations $( 4 \mathrm { ~ S } , 3 \mathrm { ~ R } )$ are needed to construct a valid tree. The nodes are labeled with the timesteps in which they are introduced to the trees $t \in \{ 1 , \ldots , 7 \}$ . A SHIFT operation introduces a leaf node, whereas a REDUCE operation introduces a non-leaf node by combining two previously introduced nodes. We can see that different S-R sequences lead to different tree structures.
39
+
40
+ Tracking LSTM. SPINN optionally augments Tree LSTM with another LSTM that incorporates contextual information in sequential order called tracking LSTM, which has been shown to improve performance for textual entailment. It is a standard recurrent LSTM network that takes as input the hidden states of the top two elements of the stack and the embedding vector of the word indexed by the pointer at timestep $t$ . Every time a REDUCE operation is performed, the output of the tracking LSTM $\mathbf { e }$ is included as an additional input in Eq. 1 (i.e., the input to the REDUCE composition function is $[ \mathbf { h } _ { i } , \mathbf { h } _ { j } , \mathbf { e } ]$ instead of $[ \mathbf { h } _ { i } , \mathbf { h } _ { j } ] )$ .
41
+
42
+ # 2.2 REINFORCEMENT LEARNING
43
+
44
+ In previous work (Tai et al., 2015; Bowman et al., 2016), the tree structures that guided composition orders of Tree LSTM models are given directly as input (i.e., a is observed and provided as an input). Formally, each training data is a triplet $\{ \mathbf { x } , \mathbf { a } , \mathbf { y } \}$ . Tai et al. (2015) consider models where a is also given at test time, whereas Bowman et al. (2016) explore models where a can be either observed or not at test time. When it is only observed during training, a policy is trained to predict a at test time. Note that in this case the policy is trained to match explicit human annotations (i.e., Penn TreeBank annotations), so the model learns to optimize representations according to structures that follows human intuitions. They found that models that observe a at both training and test time are better than models that only observe a during training.
45
+
46
+ Our main idea is to use reinforcement learning (policy gradient methods) to discover the best tree structures for the task that we are interested in. We do not place any kind of restrictions when learning these structures other than that they have to be valid binary parse trees, so it may result in tree structures that match human linguistic intuition, heavily right or left branching, or other solutions if they improve performance on the downstream task.
47
+
48
+ We parameterize each action $a \in \left\{ { \mathrm { S H I F T } } , { \mathrm { R E D U C E } } \right\}$ by a policy network $\pi ( a \mid \mathbf { s } ; \mathbf { W } _ { R } )$ , where s is a representation of the current state and $\mathbf { W } _ { R }$ is the parameter of the network. Specifically, we use a two-layer feedforward network that takes the hidden states of the top two elements of the stack $\mathbf { h } _ { i }$ and $\mathbf { h } _ { j }$ and the embedding vector of the word indexed by the pointer $\mathbf { x } _ { p }$ as its input:
49
+
50
+ $$
51
+ \mathbf { s } = \mathrm { R e L U } ( \mathbf { W } _ { R } ^ { 1 } [ \mathbf { h } _ { \mathbf { i } } , \mathbf { h } _ { \mathbf { j } } , \mathbf { x } _ { \mathbf { p } } ] + \mathbf { b } _ { R } ^ { 1 } ) \quad \mathrm { s u c h t h a t } \quad \pi ( a \mid \mathbf { s } ; \mathbf { W } _ { R } ) \propto \exp ( \mathbf { w } _ { R } ^ { 2 \top } \mathbf { s } + b _ { R } ^ { 2 } )
52
+ $$
53
+
54
+ where $[ \mathbf { h } _ { i } , \mathbf { h } _ { j } , \mathbf { x } _ { p } ]$ denotes concatenation of vectors inside the brackets.
55
+
56
+ If a is given as part of the training data, the policy network can be trained—in a supervised training regime—to predict actions that result in trees that match human intuitions. Our training data, on the other hand, is a tuple $\{ \mathbf { x } , \mathbf { y } \}$ . We use REINFORCE (Williams, 1992), which is an instance of a broader class of algorithms called policy gradient methods, to learn $\mathbf { W } _ { R }$ such that the sequence of actions $\mathbf { a } = \{ a _ { 1 } , \ldots , a _ { T } \}$ maximizes:
57
+
58
+ $$
59
+ \mathcal { R } ( \mathbf { W } ) = \mathbb { E } _ { \pi ( \mathbf { a } , \mathbf { s } ; \mathbf { W } _ { R } ) } \left[ \sum _ { t = 1 } ^ { T } r _ { t } a _ { t } \right] ,
60
+ $$
61
+
62
+ where $r _ { t }$ is the reward at timestep $t$ . We use performance on a downstream task as the reward function. For example, if we are interested in using the learned sentence representations in a classification task, our reward function is the probability of predicting the correct label using a sentence representation composed in the order given by the sequence of actions sampled from the policy network, so $\mathcal { R } ( \mathbf { W } ) = \log p ( y \mid \mathrm { T - L S T M } ( \mathbf { x } ) ; \mathbf { W } )$ , where we use W to denote all model parameters (Tree LSTM, policy network, and classifier parameters), $y$ is the correct label for input sentence $\mathbf { x }$ , and $\mathbf { x }$ is represented by the Tree LSTM structure in $\ S 2 . 1$ . For a natural language generation task where the goal is to predict the next sentence given the current sentence, we can use the probability of predicting words in the next sentence as the reward function, so $\mathcal { R } ( \mathbf { W } ) = \log p ( \mathbf { x } _ { s + 1 } \mid$ $\Gamma \mathrm { - L S T M } ( \mathbf { x } _ { s } ) ; \mathbf { W } )$ .
63
+
64
+ Note that in our setup, we do not immediately receive a reward after performing an action at timestep $t$ . The reward is only observed at the end after we finish creating a representation for the current sentence with Tree LSTM and use the resulting representation for the downstream task. At each timestep $t$ , we sample a valid action according to $\pi \big ( \boldsymbol { a } ~ | ~ \mathbf { s } ; \mathbf { W } _ { R } \big )$ . We add two simple constraints to make the sequence of actions result in a valid tree: REDUCE is forbidden if there are fewer than two elements on the stack, and SHIFT is forbidden if there are no more words to read from the sentence. After reaching timestep $2 N - 1$ , we construct the final representation and receive a reward that is used to update our model parameters.
65
+
66
+ We experiment with two learning methods: unsupervised structures and semi-supervised structures. Suppose that we are interested in a classification task. In the unsupervised case, the objective function that we maximize is $\log p ( y \mid \mathbf { T } \mathbf { - } \mathbf { L S T M } ( \mathbf { x } ) ; \mathbf { W } )$ . In the semi-supervised case, the objective function for the first $E$ epochs also includes a reward term for predicting the correct SHIFT or REDUCE actions obtained from an external parser—in addition to performance on the downstream task, so we maximize $\log p ( y \mid \mathrm { T } \mathrm { L S T M } ( \mathbf { x } ) ; \mathbf { \bar { W } } ) + \log \pi ( \mathbf { a } \mid \mathbf { s } ; \mathbf { W } _ { R } ) .$ . The motivation behind this model is to first guide the model to discover tree structures that match human intuitions, before letting it explore other structures close to these ones. After epoch $E$ , we remove the second term from our objective function and continue maximizing the first term. Note that unsupervised and semi-supervised here refer to the tree structures, not the nature of the downstream task.
67
+
68
+ # 3 EXPERIMENTS
69
+
70
+ # 3.1 BASELINES
71
+
72
+ The goal of our experiments is to evaluate our hypothesis that we can discover useful task-specific tree structures (composition orders) with reinforcement learning. We compare the following composition methods (the last two are unique to our work):
73
+
74
+ • Right to left: words are composed from right to left.2
75
+ • Left to right: words are composed from left to right. This is the standard recurrent neural network composition order. Bidirectional: A bidirectional right to left and left to right models, where the final sentence embedding is an average of sentence embeddings produced by each of these models.
76
+ Balanced binary tree: words are composed according to a balanced binary parse tree of the sentence.
77
+ • Supervised syntax: words are composed according to a predefined parse tree of the sentence. When parse tree information is not included in the dataset, we use Stanford parser (Klein & Manning, 2003) to parse the corpus. Semi-supervised syntax: a variant of our reinforcement learning method, where for the first $E$ epochs we include rewards for predicting predefined parse trees given in the supervised model, before letting the model explore other kind of tree structures at later epochs (i.e., semi-supervised structures in $\ S 2 . 2 )$ .
78
+ • Latent syntax: another variant of our reinforcement learning method where there is no predefined structures given to the model at all (i.e., unsupervised structures in $\ S 2 . 2 )$ .
79
+
80
+ For learning, we use stochastic gradient descent with minibatches of size 1 and $\ell _ { 2 }$ regularization constant tune on development data from $\{ 1 0 ^ { - 4 } , 1 0 ^ { - 5 } , 1 0 ^ { - 6 } , 0 \}$ . We use performance on development data to choose the best model and decide when to stop training.
81
+
82
+ # 3.2 TASKS
83
+
84
+ We evaluate our method on four sentence representation tasks: sentiment classification, semantic relatedness, natural language inference (entailment), and sentence generation. We show statistics of the datasets in Table 1 and describe each task in detail in this subsection.
85
+
86
+ Table 1: Descriptive statistics of datasets used in our experiments.
87
+
88
+ <table><tr><td>Dataset</td><td>#of train</td><td># of dev</td><td>#of test</td><td>Vocab size</td></tr><tr><td>SICK</td><td>4,500</td><td>500</td><td>4,927</td><td>2,172</td></tr><tr><td>SNLI</td><td>550,152</td><td>10,000</td><td>10,000</td><td>18,461</td></tr><tr><td>SST</td><td>98,794</td><td>872</td><td>1,821</td><td>8,201</td></tr><tr><td>IMDB</td><td>441,617</td><td>223,235</td><td>223,236</td><td>29,209</td></tr></table>
89
+
90
+ Stanford Sentiment Treebank. We evaluate our model on a sentiment classification task from the Stanford Sentiment Treebank (Socher et al., 2013). We use the binary classification task where the goal is to predict whether a sentence is a positive or a negative movie review.
91
+
92
+ We set the word embedding size to 100 and initialize them with Glove vectors (Pennington et al., $2 0 1 4 ) ^ { 3 }$ . For each sentence, we create a 100-dimensional sentence representation s $\in \ \mathbb { R } ^ { 1 0 0 }$ with Tree LSTM, project it to a 200-dimensional vector and apply ReLU: $\begin{array} { r } { \mathbf q = \operatorname { R e L U } ( \mathbf W _ { p } \mathbf s + \mathbf b _ { p } ) } \end{array}$ , and compute $p ( \boldsymbol { \hat { y } } = \boldsymbol { \bar { c } } \mid \mathbf { q } ; \mathbf { w } _ { q } ) \propto \exp ( \mathbf { w } _ { q , c } \mathbf { q } + b _ { q } )$ .
93
+
94
+ We run each model 3 times (corresponding to 3 different initialization points) and use the development data to pick the best model. We show the results in Table 2. Our results agree with prior work that have shown the benefits of using syntactic parse tree information on this dataset (i.e., supervised recursive model is generally better than sequential models). The best model is the latent syntax model, which is also competitive with results from other work on this dataset. Both the latent and semi-supervised syntax models outperform models with predefined structures, demonstrating the benefit of learning task-specific composition orders.
95
+
96
+ Table 2: Classification accuracy on Stanford Sentiment Treebank dataset. The number of parameters includes word embedding parameters and is our approximation when not reported in previous work.
97
+
98
+ <table><tr><td>Model</td><td>Acc.</td><td># params.</td></tr><tr><td>100D-Right to left</td><td>83.9</td><td>1.2m</td></tr><tr><td>100D-Left to right</td><td>84.7</td><td>1.2m</td></tr><tr><td>100D-Bidirectional</td><td>84.7</td><td>1.5m</td></tr><tr><td>100D-Balanced binary tree</td><td>85.1</td><td>1.2m</td></tr><tr><td>100D-Supervised syntax</td><td>85.3</td><td>1.2m</td></tr><tr><td>100D-Semi-supervised syntax 100D-Latent syntax</td><td>86.1 86.5</td><td>1.2m 1.2m</td></tr><tr><td>RNTN (Socher et al.,2013)</td><td>85.4</td><td>-</td></tr><tr><td>DCNN (Kalchbrenner et al., 2014)</td><td>86.8</td><td></td></tr><tr><td>CNN-random(Kim, 2014)</td><td>82.7</td><td></td></tr><tr><td></td><td></td><td></td></tr><tr><td>CNN-word2vec (Kim,2014)</td><td>87.2</td><td></td></tr><tr><td>CNN-multichannel (Kim,2014)</td><td>88.1</td><td>=</td></tr><tr><td>NSE (Munkhdalai &amp; Yu,2016a)</td><td>89.7</td><td>5.4m</td></tr><tr><td>NTI-SLSTM(Munkhdalai&amp; Yu,2016b)</td><td>87.8</td><td>4.4m</td></tr><tr><td>NTI-SLSTM-LSTM(Munkhdalai &amp; Yu,2016b)</td><td>89.3</td><td>4.8m</td></tr><tr><td>Left to Right LSTM(Tai et al., 2015)</td><td>84.9</td><td>2.8m</td></tr><tr><td>Bidirectional LSTM(Tai et al.,2015)</td><td>87.5</td><td>2.8m</td></tr><tr><td>Constituency Tree-LSTM-random (Tai et al.,2015)</td><td>82.0</td><td>2.8m</td></tr><tr><td>Constituency Tree-LSTM-GloVe (Tai et al., 2015)</td><td>88.0</td><td>2.8m</td></tr><tr><td>Dependency Tree-LSTM(Tai et al., 2015)</td><td>85.7</td><td>2.8m</td></tr></table>
99
+
100
+ Semantic relatedness. The second task is to predict the degree of relatedness of two sentences from the Sentences Involving Compositional Knowledge corpus (SICK; Marelli et al., 2014) . In this dataset, each pair of sentences are given a relatedness score on a 5-point rating scale. For each sentence, we use Tree LSTM to create its representations. We denote the final representations by $\{ \mathbf { s } _ { 1 } , \mathbf { s } _ { 2 } \} \in \mathbb { R } ^ { 1 0 0 }$ . We construct our prediction by computing: $\mathbf { u } \ = \ ( \mathbf { s } _ { 2 } - \mathbf { s } _ { 1 } ) ^ { 2 }$ , $\textbf { v } = { \bf s } _ { 1 } \odot { \bf s } _ { 2 }$ $\dot { \mathbf { q } } = \dot { \mathrm { R e L U } } ( \mathbf { W } _ { p } [ \mathbf { u } , \mathbf { v } ] + \mathbf { b } _ { p } )$ , and $\hat { y } \overset { \bullet } { = } \mathbf { w } _ { q } ^ { \top } \mathbf { q } + \bar { b } _ { q }$ , where $\bar { \mathbf { W } } _ { p } \in \mathbb { R } ^ { 2 0 0 \times 2 0 0 } ,$ $ { \mathbf { b } } _ { p } \in \mathbb { R } ^ { 2 0 0 }$ , ${ \bf w } _ { q } \in \mathbf { \Sigma }$ $\mathbb { R } ^ { 2 0 0 } , b _ { q } \in \mathbb { R } ^ { 1 }$ are model parameters, and $[ \mathbf { u } , \mathbf { v } ]$ denotes concatenation of vectors inside the brackets. We learn the model to minimize mean squared error.
101
+
102
+ We run each model 5 times and use the development data to pick the best model. Our results are shown in Table 3. Similarly to the previous task, they clearly demonstrate that learning the tree structures yields better performance.
103
+
104
+ We also provide results from other work on this dataset for comparisons. Some of these models (Lai & Hockenmaier, 2014; Jimenez et al., 2014; Bjerva et al., 2014) rely on feature engineering and are designed specifically for this task. Our Tree LSTM implementation performs competitively with most models in terms of mean squared error. Our best model—semi-supervised syntax—is better than most models except LSTM models of Tai et al. (2015) which were trained with a different objective function.4 Nonetheless, we observe the same trends with their results that show the benefit of using syntactic information on this dataset.
105
+
106
+ Table 3: Mean squared error on SICK dataset.
107
+
108
+ <table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=3>MSE</td><td rowspan=1 colspan=1># params.</td></tr><tr><td rowspan=3 colspan=1>100D-Right to left100D-Left to right100D-Bidirectional100D-Balanced binary tree100D-Supervised syntax100D-Semi-supervised syntax100D-Latent syntax</td><td rowspan=1 colspan=3>0.461</td><td rowspan=1 colspan=1>1.0m</td></tr><tr><td rowspan=1 colspan=3>0.3940.3730.455</td><td rowspan=2 colspan=1>1.0m1.3m1.0m1.0m1.0m1.0m</td></tr><tr><td rowspan=1 colspan=3>0.4550.3810.3200.359</td><td rowspan=1 colspan=1>0.455</td></tr><tr><td rowspan=4 colspan=1>Illinois-LH (Lai &amp; Hockenmaier,2014)UNAL-NLP(Jimenez et al.,2014)Meaning Factory (Bjerva et al., 2014)DT-RNN (Socher et al.,2014)Mean Vectors (Tai et al.,2015)Left to Right LSTM (Tai et al., 2015)Bidirectional LSTM(Tai etal.,2015)Constituency Tree-LSTM(Tai et al., 2015)Dependency Tree-LSTM(Tai et al.,2015)</td><td rowspan=1 colspan=3>0.3690.3560.3220.3820.4560.283</td><td rowspan=1 colspan=1>-===650k1.0m</td></tr><tr><td rowspan=1 colspan=3>0.274</td><td rowspan=1 colspan=1>1.0m</td></tr><tr><td rowspan=1 colspan=3>0.273</td><td rowspan=1 colspan=1>1.0m</td></tr><tr><td rowspan=1 colspan=3>0.253</td><td rowspan=1 colspan=1>1.0m</td></tr></table>
109
+
110
+ Stanford Natural Language Inference. We next evaluate our model for natural language inference (i.e., recognizing textual entailment) using the Stanford Natural Language Inference corpus (SNLI; Bowman et al., 2015) . Natural language inference aims to predict whether two sentences are entailment, contradiction, or neutral, which can be formulated as a three-way classification problem. Given a pair of sentences, similar to the previous task, we use Tree LSTM to create sentence representations $\{ \mathbf { s } _ { 1 } , \mathbf { s } _ { 2 } \} \in \mathbb { R } ^ { 1 0 0 }$ for each of the sentences. Following Bowman et al. (2016), we construct our prediction by computing: $\mathbf { u } = ( \mathbf { s } _ { 2 } - \mathbf { s } _ { 1 } ) ^ { 2 }$ , $\mathbf { v } = \mathbf { s } _ { 1 } \odot \mathbf { s } _ { 2 }$ , $\begin{array} { r } { \mathbf q = \mathrm { R e L U } ( \mathbf W _ { p } [ \mathbf u , \mathbf v , \mathbf s _ { 1 } , \mathbf s _ { 2 } ] + \mathbf b _ { p } ) } \end{array}$ , and $p ( \hat { y } = c \mid \mathbf { q } ; \mathbf { w } _ { q } ) \propto \exp ( \mathbf { w } _ { q , c } \mathbf { q } + b _ { q } )$ , where $\mathbf { W } _ { p } \in \mathbb { R } ^ { 2 0 0 \times 4 0 0 }$ , $\mathbf { b } _ { p } \in \mathbb { R } ^ { 2 0 0 }$ , $\mathbf { \bar { w } } _ { q } \in \mathbb { R } ^ { 2 0 0 } , b _ { q } \in \bar { \mathbb { R } } ^ { 1 }$ are model parameters. The objective function that we maximize is the log likelihood of the correct label under the models.
111
+
112
+ We show the results in Table 4. The latent syntax method performs the best. Interestingly, the sequential left to right model is better than the supervised recursive model in our experiments, which contradicts results from Bowman et al. (2016) that show 300D-LSTM is worse than 300D-SPINN. A possible explanation is that our left to right model has identical number of parameters with the supervised model due to the inclusion of the tracking LSTM even in the left to right model (the only difference is in the composition order), whereas the models in Bowman et al. (2016) have different number of parameters. Due to the poor performance of the supervised model relative to the unsupervised model, semi-supervised training can only mitigate the loss in accuracy, rather than improve over unsupervised learning. Our models underperform state-of-the-art models on this dataset that have almost four times the number of parameters. We only experiment with smaller models since tree-based models with dynamic structures (e.g., our semi-supervised and latent syntax models) take longer to train. See $\ S 4$ for details and discussions about training time.
113
+
114
+ Table 4: Classification accuracy on SNLI dataset.
115
+
116
+ <table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>Acc.</td><td rowspan=1 colspan=1># params.</td></tr><tr><td rowspan=2 colspan=1>100D-Right to left100D-Left to right100D-Bidirectional100D-Balanced binary tree100D-Supervised syntax100D-Semi-supervised syntax100D-Latent syntax</td><td rowspan=1 colspan=1>79.1</td><td rowspan=2 colspan=1>2.3m2.3m2.6m2.3m2.3m2.3m2.3m</td></tr><tr><td rowspan=1 colspan=1>80.280.277.478.580.280.5</td></tr><tr><td rowspan=3 colspan=1>100D-LSTM (Bowman et al., 2015)300D-LSTM (Bowman et al., 2016)300D-SPINN (Bowman et al., 2016)1024D-GRU (Vendrov et al.,2016)300D-CNN (Mou et al., 2016)300D-NTI(Munkhdalai&amp; Yu,2016b)300D-NSE (Munkhdalai&amp; Yu,2016a)</td><td rowspan=1 colspan=1>77.680.683.281.482.1</td><td rowspan=1 colspan=1>5.7m8.5m9.2m15.0m9m</td></tr><tr><td rowspan=1 colspan=1>83.4</td><td rowspan=1 colspan=1>9.5m</td></tr><tr><td rowspan=1 colspan=1>84.6</td><td rowspan=1 colspan=1>8.5m</td></tr></table>
117
+
118
+ Sentence generation. The last task that we consider is natural language generation. Given a sentence, the goal is to maximize the probability of generating words in the following sentence. This is a similar setup to the Skip Thought objective (Kiros et al., 2015), except that we do not generate the previous sentence as well. Given a sentence, we encode it with Tree LSTM to obtain $\mathbf { s } \in \mathbb { R } ^ { 1 0 0 }$ . We use a bag-of-words model as our decoder, so $p ( w _ { i } \mid \mathbf { s } ; \mathbf { V } ) \propto \exp ( \mathbf { v } _ { i } ^ { \top } \mathbf { s } )$ , where $\mathbf { V } \in \mathbb { R } ^ { 1 0 0 \times 2 9 , 2 0 9 }$ and $\mathbf { v } _ { i } \in \mathbb { R } ^ { 1 0 0 }$ is the $i$ -th column of $\mathbf { V }$ . Using a bag-of-words decoder as opposed to a recurrent neural network decoder increases the importance of producing a better representation of the current sentence, since the model cannot rely on a sophisticated decoder with a language model component to predict better. This also greatly speeds up our training time.
119
+
120
+ We use IMDB movie review corpus (Diao et al., 2014) for this experiment, The corpus consists of 280,593, 33,793, and 34,029 reviews in training, development, and test sets respectively. We construct our data using the development and test sets of this corpus. For training, we process 33,793 reviews from the original development set to get 441,617 pairs of sentences. For testing, we use 34,029 reviews in the test set (446,471 pairs of sentences). Half of these pairs is used as our development set to tune hyperparamaters, and the remaining half is used as our final test set. Our results in Table 5 further demonstrate that methods that learn tree structures perform better than methods that have fixed structures.
121
+
122
+ Table 5: Word perplexity on the sentence generation task. We also show perplexity of the model that does not condition on the previous sentence (unconditional) when generating bags of words for comparison.
123
+
124
+ <table><tr><td>Model</td><td>Perplexity</td><td>#params.</td></tr><tr><td>100D-Unconditional 100D-Right to left</td><td>105.6 101.4</td><td>30k 6m</td></tr><tr><td>100D-Left to right</td><td>101.1</td><td>6m</td></tr><tr><td>100D-Bidirectional</td><td>100.2</td><td>6.2m</td></tr><tr><td>100D-Balanced binary tree</td><td>103.3</td><td>6.2m</td></tr><tr><td>100D-Supervised syntax</td><td>100.8</td><td>6m</td></tr><tr><td>100D-Semi-supervised syntax</td><td>98.4</td><td>6m</td></tr><tr><td>100D-Latent syntax</td><td>99.0</td><td>6m</td></tr></table>
125
+
126
+ ![](images/b363c285fa9c6eb6404592bee91545093bd992f0374c2ea5513c82342a82c746.jpg)
127
+
128
+ Figure 2: Examples of tree structures learned by our model which show that the model discovers simple concepts such as noun phrases and verb phrases.
129
+
130
+ ![](images/1bd3e8d71a8700ebdee024560b348a029ca70a6e49387567d0771a4f38e5f631.jpg)
131
+ Figure 3: Examples of unconventional tree structures.
132
+
133
+ # 4 DISCUSSION
134
+
135
+ Learned Structures. Our results in $\ S 3$ show that our proposed method outperforms competing methods with predefined composition order on all tasks. The right to left model tends to perform worse than the left to right model. This suggests that the left to right composition order, similar to how human reads in practice, is better for neural network models. Our latent syntax method is able to discover tree structures that work reasonably well on all tasks, regardless of whether the task is better suited for a left to right or supervised syntax composition order.
136
+
137
+ We inspect what kind of structures the latent syntax model learned and how closely they match human intuitions. We first compute unlabeled bracketing $F _ { 1 }$ scores5 for the learned structures and parses given by Stanford parser on SNLI and Stanford Sentiment Treebank. In the SNLI dataset, there are 10,000 pairs of test sentences (20,000 sentences in total), while the Stanford Sentiment Treebank test set contains 1,821 test sentences. The $F _ { 1 }$ scores for the two datasets are 41.73 and 40.51 respectively. For comparisons, $F _ { 1 }$ scores of a right (left) branching tree are 19.94 (41.37) for SNLI and 12.96 (38.56) for SST.
138
+
139
+ We also manually inspect the learned structures. We observe that in SNLI, the trees exhibit overall left-branching structure, which explains why the $F _ { 1 }$ scores are closer to a left branching tree structure. Note that in our experiments on this corpus, the supervised syntax model does not perform as well as the left-to-right model, which suggests why the latent syntax model tends to converge towards the left-to-right model. We handpicked two examples of trees learned by our model and show them in Figure 2. We can see that in some cases the model is able to discover concepts such as noun phrases (e.g., a boy, his sleds) and simple verb phrases (e.g., wearing sunglasses, is frowning). Of course, the model sometimes settles on structures that make little sense to humans. We show two such examples in Figure 3, where the model chooses to compose playing frisbee in and outside a as phrases.
140
+
141
+ Training Time. A major limitation of our proposed model is that it takes much longer to train compared to models with predefined structures. We observe that our models only outperforms models with fixed structures after several training epochs; and on some datasets such as SNLI or IMDB, an epoch could take a 5-7 hours (we use batch size 1 since the computation graph needs to be reconstructed for every example at every iteration depending on the samples from the policy network). This is also the main reason that we could only use smaller 100-dimensional Tree LSTM models in all our experiments. While for smaller datasets such as SICK the overall training time is approximately 6 hours, for SNLI or IMDB it takes 3-4 days for the model to reach convergence. In general, the latent syntax model and semi-supervised syntax models take about two or three times longer to converge compared to models with predefined structures.
142
+
143
+ # 5 CONCLUSION
144
+
145
+ We presented a reinforcement learning method to learn hierarchical structures of natural language sentences. We demonstrated the benefit of learning task-specific composition order on four tasks: sentiment analysis, semantic relatedness, natural language inference, and sentence generation. We qualitatively and quantitatively analyzed the induced trees and showed that they both incorporate some linguistically intuitive structures (e.g., noun phrases, simple verb phrases) and are different than conventional English syntactic structures.
146
+
147
+ # REFERENCES
148
+
149
+ Johannes Bjerva, Johan Bos, Rob van der Goot, and Malvina Nissim. The meaning factory: Formal semantics for recognizing textual entailment and determining semantic similarity. In Proc. of SemEval, 2014.
150
+
151
+ Phil Blunsom and Trevor Cohn. Unsupervised induction of tree substitution grammars for dependency parsing. In Proc. of EMNLP, 2010.
152
+
153
+ Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. A large anno tated corpus for learning natural language inference. In Proc. of EMNLP, 2015.
154
+
155
+ Samuel R. Bowman, Jon Gauthier, Abhinav Rastogi, Raghav Gupta, Christopher D. Manning, and Christopher Potts. A fast unified model for parsing and sentence understanding. In Proc. of ACL, 2016.
156
+
157
+ David Chiang. Hierarchical phrase-based translation. Computational Linguistics, 33(2):201–228, 2007.
158
+
159
+ Kyunghyun Cho, Bart van Merrienboer, C¸ aglar G ¨ ulc¸ehre, Dzmitry Bahdanau, Fethi Bougares, Hol- ¨ ger Schwenk, and Yoshua Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. arXiv preprint, 2014.
160
+
161
+ Noam Chomsky. Syntactic Structures. Mouton, 1957.
162
+
163
+ Stephen Clark, Bob Coecke, and Mehrnoosh Sadrzadeh. A compositional distributional model of meaning. In Proc. of the Second Symposium on Quantum Interaction, 2008.
164
+
165
+ Qiming Diao, Minghui Qiu, Chao-Yuan Wu, Alexander J. Smola, Jing Jiang, and Chong Wang. Jointly modeling aspects, ratings and sentiments for movie recommendation (JMARS). In Proc. of KDD, 2014.
166
+
167
+ Chris Dyer, Adhiguna Kuncoro, Miguel Ballesteros, and Noah A. Smith. Recurrent neural network grammars. In Proc. of NAACL, 2016.
168
+
169
+ Edward Grefenstette and Mehrnoosh Sadrzadeh. Experimental support for a categorical compositional distributional model of meaning. In Proc. of EMNLP, 2011.
170
+
171
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. Neural Computation, 9(8): 1735–1780, 1997.
172
+
173
+ Sergio Jimenez, George Duenas, Julia Baquero, Alexander Gelbukh, Av Juan Dios Batiz, and Av Mendizabal. UNAL-NLP: Combining soft cardinality features for semantic textual similarity, relatedness and entailment. In Proc. of SemEval, 2014.
174
+
175
+ Nal Kalchbrenner, Edward Grefenstette, and Phil Blunsom. A convolutional neural network for modelling sentences. In Prof. of ACL, 2014.
176
+
177
+ Yoon Kim. Convolutional neural networks for sentence classification. In Proc. EMNLP, 2014.
178
+
179
+ Ryan Kiros, Yukun Zhu, Ruslan Salakhutdinov, Richard S. Zemel, Antonio Torralba, Raquel Urtasun, and Sanja Fidler. Skip-thought vectors. In Proc. of NIPS, 2015.
180
+
181
+ Dan Klein and Christopher D. Manning. Accurate unlexicalized parsing. In Proc. of ACL, 2003.
182
+
183
+ Dan Klein and Christopher D. Manning. Corpus-based induction of syntactic structure: Models of dependency and constituency. In Proc. of ACL, 2004.
184
+
185
+ Alice Lai and Julia Hockenmaier. Illinois-lh: A denotational and distributional approach to semantics. In Proc. of SemEval, 2014.
186
+
187
+ Mingbo Ma, Liang Huang, Bing Xiang, and Bowen Zhou. Dependency-based convolutional neural networks for sentence embedding. In Proc. ACL, 2015.
188
+
189
+ Marco Marelli, Luisa Bentivogli, Marco Baroni, Raffaella Bernardi, Stefano Menini, and Roberto Zamparelli. Evaluation of compositional distributional semantic models on full sentences through semantic relatedness and textual entailment. In Proc. of SemEval, 2014.
190
+
191
+ Lili Mou, Rui Men, Ge Li, Yan Xu, Lu Zhang, Rui Yan, and Zhi Jin. Natural language inference by tree-based convolution and heuristic matching. In Proc. of ACL, 2016.
192
+
193
+ Tsendsuren Munkhdalai and Hong Yu. Neural semantic encoders. arXiv preprint, 2016a.
194
+
195
+ Tsendsuren Munkhdalai and Hong Yu. Neural tree indexers for text understanding. arXiv preprint, 2016b.
196
+
197
+ Jason Naradowsky, Sebastian Riedel, and David A. Smith. Improving nlp through marginalization of hidden syntactic structure. In Proc. of EMNLP, 2012.
198
+
199
+ Jeffrey Pennington, Richard Socher, and Christopher D. Manning. Glove: Global vectors for word representation. In Proc. of EMNLP, 2014.
200
+
201
+ Steven Pinker. Language Learnability and Language Development. Harvard, 1984.
202
+
203
+ Richard Socher, Brody Huval, Christopher D. Manning, and Andrew Y. Ng. Semantic compositionality through recursive matrix-vector spaces. In Proc. of EMNLP, 2012.
204
+
205
+ Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher Manning, Andrew $\mathrm { N g }$ , and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proc. of EMNLP, 2013.
206
+
207
+ Richard Socher, Andrej Karpathy, Quoc V Le, Christopher D Manning, and Andrew $\textsf { Y } \mathrm { N g }$ Grounded compositional semantics for finding and describing images with sentences. Transactions of the Association for Computational Linguistics, 2:207–208, 2014.
208
+
209
+ Valentin I. Spitkovsky, Hiyan Alshawi, Angel X. Chang, and Daniel Jurafsky. Unsupervised dependency parsing without gold part-of-speech tags. In Proc. of EMNLP, 2011.
210
+
211
+ Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. Sequence to sequence learning with neural networks. In Proc. NIPS, 2014.
212
+
213
+ Kai Sheng Tai, Richard Socher, and Christopher D. Manning. Improved semantic representations from tree-structured long short-term memory networks. In Proc. of ACL, 2015.
214
+
215
+ Ivan Vendrov, Ryan Kiros, Sanja Fidler, and Raquel Urtasun. Order-embeddings of images and language. In Proc. of ICLR, 2016.
216
+
217
+ Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8:229–256, 1992.
218
+
219
+ Luke S. Zettlemoyer and Michael Collins. Learning to map sentences to logical form: Structured classification with probabilistic categorial grammars. In Proc. of UAI, 2005.
220
+
221
+ Xiaodan Zhu, Parinaz Sobhani, and Hongyu Guo. Long short-term memory over recursive structures. In Proc. of ICML, 2015.
parse/train/Skvgqgqxe/Skvgqgqxe_content_list.json ADDED
@@ -0,0 +1,1199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "LEARNING TO COMPOSE WORDS INTO SENTENCES WITH REINFORCEMENT LEARNING ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 821,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Dani Yogatama1, Phil Blunsom1,2, Chris Dyer1, Edward Grefenstette1, and Wang Ling1 1DeepMind and 2University of Oxford {dyogatama,pblunsom,cdyer,etg,lingwang}@google.com ",
17
+ "bbox": [
18
+ 183,
19
+ 169,
20
+ 795,
21
+ 213
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 250,
32
+ 544,
33
+ 265
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "We use reinforcement learning to learn tree-structured neural networks for computing representations of natural language sentences. In contrast with prior work on tree-structured models, in which the trees are either provided as input or predicted using supervision from explicit treebank annotations, the tree structures in this work are optimized to improve performance on a downstream task. Experiments demonstrate the benefit of learning task-specific composition orders, outperforming both sequential encoders and recursive encoders based on treebank annotations. We analyze the induced trees and show that while they discover some linguistically intuitive structures (e.g., noun phrases, simple verb phrases), they are different than conventional English syntactic structures. ",
40
+ "bbox": [
41
+ 233,
42
+ 281,
43
+ 764,
44
+ 420
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 446,
55
+ 336,
56
+ 463
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Languages encode meaning in terms of hierarchical, nested structures on sequences of words (Chomsky, 1957). However, the degree to which neural network architectures that compute representations of the meaning of sentences for practical applications should explicitly reflect such structures is a matter for debate. In this work, we use reinforcement learning to learn to construct trees for computing sentence representations, guided by feedback from downstream tasks that depend on these representations. The space of structures that are considered by the learner includes both fully sequential structures (corresponding to traditional recurrent neural network “encoders”), as well as all projective binary trees. Thus, although we take seriously the notion that good compositional architectures might be tree-structured, we specify neither the form of the tree nor whether a tree is necessary at all, and instead leave those decisions up to the learner (and the data). ",
63
+ "bbox": [
64
+ 174,
65
+ 479,
66
+ 825,
67
+ 617
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "To place this work in context, there are three predominant approaches for constructing vector representations of sentences from a sequence of words. The first composes words sequentially using a recurrent neural network, treating the RNN’s final hidden state as the representation of the sentence (Cho et al., 2014; Sutskever et al., 2014; Kiros et al., 2015). In such models, there is no explicit hierarchical organization imposed on the words, and the RNN’s dynamics must learn to simulate it. The second approach uses tree-structured networks to recursively compose representations of words and phrases to form representations of larger phrases and, finally, the complete sentence. In contrast to sequential models, these models’ architectures are organized according to each sentence’s syntactic structure, that is, the hierarchical organization of words into nested phrases that characterizes human intuitions about how words combine to form grammatical sentences. Prior work on tree-structured models has assumed that trees are either provided together with the input sentences (Clark et al., 2008; Grefenstette & Sadrzadeh, 2011; Socher et al., 2012; 2013; Tai et al., 2015) or that they are predicted based on explicit treebank annotations jointly with the downstream task (Bowman et al., 2016; Dyer et al., 2016). The last approach for constructing sentence representations uses convolutional neural networks to produce the representation in a bottom up manner, either with syntactic information (Ma et al., 2015) or without (Kim, 2014; Kalchbrenner et al., 2014). ",
74
+ "bbox": [
75
+ 174,
76
+ 626,
77
+ 825,
78
+ 847
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Our work can be understood as a compromise between the first two approaches. Rather than using explicit supervision of tree structure, we use reinforcement learning to learn tree structures (and thus, sentence-specific compositional architectures), taking performance on a downstream task that uses the computed sentence representation as the reward signal. In contrast to sequential RNNs, which ignore tree structure, our model still generates a latent tree for each sentence and uses it to structure the composition. Our hypothesis is that encouraging the model to learn tree-structured compositions will bias the model toward better generalizations about how words compose to form sentence meanings, leading to better performance on downstream tasks. ",
85
+ "bbox": [
86
+ 176,
87
+ 854,
88
+ 823,
89
+ 924
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "",
96
+ "bbox": [
97
+ 176,
98
+ 103,
99
+ 823,
100
+ 145
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "This work is related to unsupervised grammar induction (Klein & Manning, 2004; Blunsom & Cohn, 2010; Spitkovsky et al., 2011, inter alia), which seeks to infer a generative grammar of an infinite language from a finite sample of strings from the language—but without any semantic feedback. Previous work on unsupervised grammar induction that incorporates semantic supervision involves designing complex models for Combinatory Categorial Grammars (Zettlemoyer & Collins, 2005) or marginalizing over latent syntactic structures (Naradowsky et al., 2012). Since semantic feedback has been proposed as crucial for the acquisition of syntax (Pinker, 1984), our model offers a simpler alternative.1 However, our primary focus is on improving performance on the downstream model, so the learner may settle on a different solution than conventional English syntax. We thus also explore what kind of syntactic structures are derivable from shallow semantics. ",
107
+ "bbox": [
108
+ 173,
109
+ 152,
110
+ 825,
111
+ 291
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "Experiments on various tasks (i.e., sentiment analysis, semantic relatedness, natural language inference, and sentence generation) show that reinforcement learning is a promising direction to discover hierarchical structures of sentences. Notably, representations learned this way outperformed both conventional left-to-right models and tree-structured models based on linguistic syntax in downstream applications. This is in line with prior work showing the value of learning tree structures in statistical machine translation models (Chiang, 2007). Although the induced tree structures manifested a number of linguistically intuitive structures (e.g., noun phrases, simple verb phrases), there are a number of marked differences to conventional analyses of English sentences (e.g., an overall left-branching structure). ",
118
+ "bbox": [
119
+ 173,
120
+ 297,
121
+ 825,
122
+ 424
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "2 MODEL ",
129
+ "text_level": 1,
130
+ "bbox": [
131
+ 176,
132
+ 445,
133
+ 267,
134
+ 462
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "Our model consists of two components: a sentence representation model and a reinforcement learning algorithm to learn the tree structure that is used by the sentence representation model. ",
141
+ "bbox": [
142
+ 173,
143
+ 478,
144
+ 821,
145
+ 506
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "2.1 TREE LSTM ",
152
+ "text_level": 1,
153
+ "bbox": [
154
+ 174,
155
+ 525,
156
+ 303,
157
+ 539
158
+ ],
159
+ "page_idx": 1
160
+ },
161
+ {
162
+ "type": "text",
163
+ "text": "Our sentence representation model follows the Stack-augmented Parser-Interpreter Neural Network (SPINN; Bowman et al., 2016), SPINN is a shift-reduce parser that uses Long Short-Term Memory (LSTM; Hochreiter and Schmidhuber, 1997) as its composition function. Given an input sentence of $N$ words $\\mathbf { x } = \\{ x _ { 1 } , x _ { 2 } , \\ldots , x _ { N } \\}$ , we represent each word by its embedding vector $\\mathbf { x } _ { i } \\in \\mathbb { R } ^ { D }$ . The parser maintains an index pointer $p$ starting from the leftmost word $( p = 1 )$ ) and a stack. To parse the sentence, it performs a sequence of operations $\\mathbf { a } = \\{ a _ { 1 } , a _ { 2 } , \\ldots , a _ { 2 N - 1 } \\}$ , where $a _ { t } \\in$ $\\left\\{ { \\mathrm { S H I F T } } , { \\mathrm { R E D U C E } } \\right\\}$ . A SHIFT operation pushes $\\mathbf { x } _ { p }$ to the stack and moves the pointer to the next word $( p _ { + + } )$ ; while a REDUCE operation pops two elements from the stack, composes them to a single element, and pushes it back to the stack. SPINN uses Tree LSTM (Tai et al., 2015; Zhu et al., 2015) as the REDUCE composition function, which we follow. In Tree LSTM, each element of the stack is represented by two vectors, a hidden state representation $\\mathbf { h }$ and a memory representation c. Two elements of the stack $\\left( \\mathbf { h } _ { i } , \\mathbf { c } _ { i } \\right)$ and $( \\mathbf { h } _ { j } , \\mathbf { c } _ { j } )$ are composed as: ",
164
+ "bbox": [
165
+ 173,
166
+ 551,
167
+ 825,
168
+ 718
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "equation",
174
+ "img_path": "images/ee2451737427d276a966c1fcaee1a6480bcc45ddc2d04279173ebc418e54ed32.jpg",
175
+ "text": "$$\n\\begin{array} { r l } & { \\mathbf i = \\sigma ( \\mathbf W _ { I } [ \\mathbf h _ { i } , \\mathbf h _ { j } ] + \\mathbf b _ { I } ) \\qquad \\mathbf o = \\sigma ( \\mathbf W _ { O } [ \\mathbf h _ { i } , \\mathbf h _ { j } ] + \\mathbf b _ { I } ) } \\\\ & { \\mathbf f _ { L } = \\sigma ( \\mathbf W _ { F _ { L } } [ \\mathbf h _ { i } , \\mathbf h _ { j } ] + \\mathbf b _ { F _ { L } } ) \\qquad \\mathbf f _ { R } = \\sigma ( \\mathbf W _ { F _ { R } } [ \\mathbf h _ { i } , \\mathbf h _ { j } ] + \\mathbf b _ { F _ { R } } ) } \\\\ & { \\mathbf g = \\operatorname { t a n h } ( \\mathbf W _ { G } [ \\mathbf h _ { i } , \\mathbf h _ { j } ] + \\mathbf b _ { G } ) \\qquad \\mathbf c = \\mathbf f _ { L } \\odot \\mathbf c _ { i } + \\mathbf f _ { R } \\odot \\mathbf c _ { j } + \\mathbf i \\odot \\mathbf g } \\\\ & { \\mathbf h = \\mathbf o \\odot \\mathbf c } \\end{array}\n$$",
176
+ "text_format": "latex",
177
+ "bbox": [
178
+ 274,
179
+ 726,
180
+ 727,
181
+ 797
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "where $[ \\mathbf { h } _ { i } , \\mathbf { h } _ { j } ]$ denotes concatenation of $\\mathbf { h } _ { i }$ and $\\mathbf { h } _ { j }$ , and $\\sigma$ is the sigmoid activation function. ",
188
+ "bbox": [
189
+ 173,
190
+ 805,
191
+ 776,
192
+ 821
193
+ ],
194
+ "page_idx": 1
195
+ },
196
+ {
197
+ "type": "text",
198
+ "text": "A unique sequence of $\\left\\{ { \\mathrm { S H I F T } } , { \\mathrm { R E D U C E } } \\right\\}$ operations corresponds to a unique binary parse tree of the sentence. A SHIFT operation introduces a new leaf node in the parse tree, while a REDUCE operation combines two nodes by merging them into a constituent. See Figure 1 for an example. We note that for a sentence of length $N$ , there are exactly $N$ SHIFT operations and $N - 1$ REDUCE operations that are needed to produce a binary parse tree of the sentence. The final sentence representation produced by the Tree LSTM is the hidden state of the final element of the stack ${ \\mathbf { h } } _ { N - 1 }$ (i.e., the topmost node of the tree). ",
199
+ "bbox": [
200
+ 174,
201
+ 827,
202
+ 825,
203
+ 897
204
+ ],
205
+ "page_idx": 1
206
+ },
207
+ {
208
+ "type": "image",
209
+ "img_path": "images/da67fea0241f5215c5a41cd1283516eb598ca23f1e307524506f193f92c7d6f2.jpg",
210
+ "image_caption": [
211
+ "Figure 1: Four examples of trees and their corresponding SHIFT (S) and REDUCE (R) sequences. In each of the examples, there are 4 input words (4 leaf nodes), so 7 operations $( 4 \\mathrm { ~ S } , 3 \\mathrm { ~ R } )$ are needed to construct a valid tree. The nodes are labeled with the timesteps in which they are introduced to the trees $t \\in \\{ 1 , \\ldots , 7 \\}$ . A SHIFT operation introduces a leaf node, whereas a REDUCE operation introduces a non-leaf node by combining two previously introduced nodes. We can see that different S-R sequences lead to different tree structures. "
212
+ ],
213
+ "image_footnote": [],
214
+ "bbox": [
215
+ 173,
216
+ 80,
217
+ 815,
218
+ 188
219
+ ],
220
+ "page_idx": 2
221
+ },
222
+ {
223
+ "type": "text",
224
+ "text": "",
225
+ "bbox": [
226
+ 173,
227
+ 308,
228
+ 821,
229
+ 337
230
+ ],
231
+ "page_idx": 2
232
+ },
233
+ {
234
+ "type": "text",
235
+ "text": "Tracking LSTM. SPINN optionally augments Tree LSTM with another LSTM that incorporates contextual information in sequential order called tracking LSTM, which has been shown to improve performance for textual entailment. It is a standard recurrent LSTM network that takes as input the hidden states of the top two elements of the stack and the embedding vector of the word indexed by the pointer at timestep $t$ . Every time a REDUCE operation is performed, the output of the tracking LSTM $\\mathbf { e }$ is included as an additional input in Eq. 1 (i.e., the input to the REDUCE composition function is $[ \\mathbf { h } _ { i } , \\mathbf { h } _ { j } , \\mathbf { e } ]$ instead of $[ \\mathbf { h } _ { i } , \\mathbf { h } _ { j } ] )$ . ",
236
+ "bbox": [
237
+ 173,
238
+ 351,
239
+ 825,
240
+ 450
241
+ ],
242
+ "page_idx": 2
243
+ },
244
+ {
245
+ "type": "text",
246
+ "text": "2.2 REINFORCEMENT LEARNING ",
247
+ "text_level": 1,
248
+ "bbox": [
249
+ 176,
250
+ 465,
251
+ 416,
252
+ 479
253
+ ],
254
+ "page_idx": 2
255
+ },
256
+ {
257
+ "type": "text",
258
+ "text": "In previous work (Tai et al., 2015; Bowman et al., 2016), the tree structures that guided composition orders of Tree LSTM models are given directly as input (i.e., a is observed and provided as an input). Formally, each training data is a triplet $\\{ \\mathbf { x } , \\mathbf { a } , \\mathbf { y } \\}$ . Tai et al. (2015) consider models where a is also given at test time, whereas Bowman et al. (2016) explore models where a can be either observed or not at test time. When it is only observed during training, a policy is trained to predict a at test time. Note that in this case the policy is trained to match explicit human annotations (i.e., Penn TreeBank annotations), so the model learns to optimize representations according to structures that follows human intuitions. They found that models that observe a at both training and test time are better than models that only observe a during training. ",
259
+ "bbox": [
260
+ 173,
261
+ 491,
262
+ 825,
263
+ 617
264
+ ],
265
+ "page_idx": 2
266
+ },
267
+ {
268
+ "type": "text",
269
+ "text": "Our main idea is to use reinforcement learning (policy gradient methods) to discover the best tree structures for the task that we are interested in. We do not place any kind of restrictions when learning these structures other than that they have to be valid binary parse trees, so it may result in tree structures that match human linguistic intuition, heavily right or left branching, or other solutions if they improve performance on the downstream task. ",
270
+ "bbox": [
271
+ 173,
272
+ 623,
273
+ 825,
274
+ 694
275
+ ],
276
+ "page_idx": 2
277
+ },
278
+ {
279
+ "type": "text",
280
+ "text": "We parameterize each action $a \\in \\left\\{ { \\mathrm { S H I F T } } , { \\mathrm { R E D U C E } } \\right\\}$ by a policy network $\\pi ( a \\mid \\mathbf { s } ; \\mathbf { W } _ { R } )$ , where s is a representation of the current state and $\\mathbf { W } _ { R }$ is the parameter of the network. Specifically, we use a two-layer feedforward network that takes the hidden states of the top two elements of the stack $\\mathbf { h } _ { i }$ and $\\mathbf { h } _ { j }$ and the embedding vector of the word indexed by the pointer $\\mathbf { x } _ { p }$ as its input: ",
281
+ "bbox": [
282
+ 173,
283
+ 700,
284
+ 825,
285
+ 757
286
+ ],
287
+ "page_idx": 2
288
+ },
289
+ {
290
+ "type": "equation",
291
+ "img_path": "images/9d0913978b5a5e47da27f91ba94ba190483874d1a35bd7087880f5dbb60d0cf2.jpg",
292
+ "text": "$$\n\\mathbf { s } = \\mathrm { R e L U } ( \\mathbf { W } _ { R } ^ { 1 } [ \\mathbf { h } _ { \\mathbf { i } } , \\mathbf { h } _ { \\mathbf { j } } , \\mathbf { x } _ { \\mathbf { p } } ] + \\mathbf { b } _ { R } ^ { 1 } ) \\quad \\mathrm { s u c h t h a t } \\quad \\pi ( a \\mid \\mathbf { s } ; \\mathbf { W } _ { R } ) \\propto \\exp ( \\mathbf { w } _ { R } ^ { 2 \\top } \\mathbf { s } + b _ { R } ^ { 2 } )\n$$",
293
+ "text_format": "latex",
294
+ "bbox": [
295
+ 223,
296
+ 761,
297
+ 772,
298
+ 780
299
+ ],
300
+ "page_idx": 2
301
+ },
302
+ {
303
+ "type": "text",
304
+ "text": "where $[ \\mathbf { h } _ { i } , \\mathbf { h } _ { j } , \\mathbf { x } _ { p } ]$ denotes concatenation of vectors inside the brackets. ",
305
+ "bbox": [
306
+ 176,
307
+ 784,
308
+ 640,
309
+ 797
310
+ ],
311
+ "page_idx": 2
312
+ },
313
+ {
314
+ "type": "text",
315
+ "text": "If a is given as part of the training data, the policy network can be trained—in a supervised training regime—to predict actions that result in trees that match human intuitions. Our training data, on the other hand, is a tuple $\\{ \\mathbf { x } , \\mathbf { y } \\}$ . We use REINFORCE (Williams, 1992), which is an instance of a broader class of algorithms called policy gradient methods, to learn $\\mathbf { W } _ { R }$ such that the sequence of actions $\\mathbf { a } = \\{ a _ { 1 } , \\ldots , a _ { T } \\}$ maximizes: ",
316
+ "bbox": [
317
+ 173,
318
+ 804,
319
+ 825,
320
+ 876
321
+ ],
322
+ "page_idx": 2
323
+ },
324
+ {
325
+ "type": "equation",
326
+ "img_path": "images/b5c13293254241bd368ee9ce7816beaa2507fcdd33f3182e6a7e0f5cc39d81d7.jpg",
327
+ "text": "$$\n\\mathcal { R } ( \\mathbf { W } ) = \\mathbb { E } _ { \\pi ( \\mathbf { a } , \\mathbf { s } ; \\mathbf { W } _ { R } ) } \\left[ \\sum _ { t = 1 } ^ { T } r _ { t } a _ { t } \\right] ,\n$$",
328
+ "text_format": "latex",
329
+ "bbox": [
330
+ 385,
331
+ 878,
332
+ 611,
333
+ 922
334
+ ],
335
+ "page_idx": 2
336
+ },
337
+ {
338
+ "type": "text",
339
+ "text": "where $r _ { t }$ is the reward at timestep $t$ . We use performance on a downstream task as the reward function. For example, if we are interested in using the learned sentence representations in a classification task, our reward function is the probability of predicting the correct label using a sentence representation composed in the order given by the sequence of actions sampled from the policy network, so $\\mathcal { R } ( \\mathbf { W } ) = \\log p ( y \\mid \\mathrm { T - L S T M } ( \\mathbf { x } ) ; \\mathbf { W } )$ , where we use W to denote all model parameters (Tree LSTM, policy network, and classifier parameters), $y$ is the correct label for input sentence $\\mathbf { x }$ , and $\\mathbf { x }$ is represented by the Tree LSTM structure in $\\ S 2 . 1$ . For a natural language generation task where the goal is to predict the next sentence given the current sentence, we can use the probability of predicting words in the next sentence as the reward function, so $\\mathcal { R } ( \\mathbf { W } ) = \\log p ( \\mathbf { x } _ { s + 1 } \\mid$ $\\Gamma \\mathrm { - L S T M } ( \\mathbf { x } _ { s } ) ; \\mathbf { W } )$ . ",
340
+ "bbox": [
341
+ 173,
342
+ 103,
343
+ 825,
344
+ 229
345
+ ],
346
+ "page_idx": 3
347
+ },
348
+ {
349
+ "type": "text",
350
+ "text": "Note that in our setup, we do not immediately receive a reward after performing an action at timestep $t$ . The reward is only observed at the end after we finish creating a representation for the current sentence with Tree LSTM and use the resulting representation for the downstream task. At each timestep $t$ , we sample a valid action according to $\\pi \\big ( \\boldsymbol { a } ~ | ~ \\mathbf { s } ; \\mathbf { W } _ { R } \\big )$ . We add two simple constraints to make the sequence of actions result in a valid tree: REDUCE is forbidden if there are fewer than two elements on the stack, and SHIFT is forbidden if there are no more words to read from the sentence. After reaching timestep $2 N - 1$ , we construct the final representation and receive a reward that is used to update our model parameters. ",
351
+ "bbox": [
352
+ 173,
353
+ 236,
354
+ 825,
355
+ 347
356
+ ],
357
+ "page_idx": 3
358
+ },
359
+ {
360
+ "type": "text",
361
+ "text": "We experiment with two learning methods: unsupervised structures and semi-supervised structures. Suppose that we are interested in a classification task. In the unsupervised case, the objective function that we maximize is $\\log p ( y \\mid \\mathbf { T } \\mathbf { - } \\mathbf { L S T M } ( \\mathbf { x } ) ; \\mathbf { W } )$ . In the semi-supervised case, the objective function for the first $E$ epochs also includes a reward term for predicting the correct SHIFT or REDUCE actions obtained from an external parser—in addition to performance on the downstream task, so we maximize $\\log p ( y \\mid \\mathrm { T } \\mathrm { L S T M } ( \\mathbf { x } ) ; \\mathbf { \\bar { W } } ) + \\log \\pi ( \\mathbf { a } \\mid \\mathbf { s } ; \\mathbf { W } _ { R } ) .$ . The motivation behind this model is to first guide the model to discover tree structures that match human intuitions, before letting it explore other structures close to these ones. After epoch $E$ , we remove the second term from our objective function and continue maximizing the first term. Note that unsupervised and semi-supervised here refer to the tree structures, not the nature of the downstream task. ",
362
+ "bbox": [
363
+ 173,
364
+ 354,
365
+ 825,
366
+ 492
367
+ ],
368
+ "page_idx": 3
369
+ },
370
+ {
371
+ "type": "text",
372
+ "text": "3 EXPERIMENTS ",
373
+ "text_level": 1,
374
+ "bbox": [
375
+ 176,
376
+ 513,
377
+ 326,
378
+ 529
379
+ ],
380
+ "page_idx": 3
381
+ },
382
+ {
383
+ "type": "text",
384
+ "text": "3.1 BASELINES",
385
+ "text_level": 1,
386
+ "bbox": [
387
+ 176,
388
+ 544,
389
+ 294,
390
+ 559
391
+ ],
392
+ "page_idx": 3
393
+ },
394
+ {
395
+ "type": "text",
396
+ "text": "The goal of our experiments is to evaluate our hypothesis that we can discover useful task-specific tree structures (composition orders) with reinforcement learning. We compare the following composition methods (the last two are unique to our work): ",
397
+ "bbox": [
398
+ 176,
399
+ 570,
400
+ 825,
401
+ 612
402
+ ],
403
+ "page_idx": 3
404
+ },
405
+ {
406
+ "type": "text",
407
+ "text": "• Right to left: words are composed from right to left.2 \n• Left to right: words are composed from left to right. This is the standard recurrent neural network composition order. Bidirectional: A bidirectional right to left and left to right models, where the final sentence embedding is an average of sentence embeddings produced by each of these models. \nBalanced binary tree: words are composed according to a balanced binary parse tree of the sentence. \n• Supervised syntax: words are composed according to a predefined parse tree of the sentence. When parse tree information is not included in the dataset, we use Stanford parser (Klein & Manning, 2003) to parse the corpus. Semi-supervised syntax: a variant of our reinforcement learning method, where for the first $E$ epochs we include rewards for predicting predefined parse trees given in the supervised model, before letting the model explore other kind of tree structures at later epochs (i.e., semi-supervised structures in $\\ S 2 . 2 )$ . \n• Latent syntax: another variant of our reinforcement learning method where there is no predefined structures given to the model at all (i.e., unsupervised structures in $\\ S 2 . 2 )$ . ",
408
+ "bbox": [
409
+ 215,
410
+ 623,
411
+ 825,
412
+ 876
413
+ ],
414
+ "page_idx": 3
415
+ },
416
+ {
417
+ "type": "text",
418
+ "text": "For learning, we use stochastic gradient descent with minibatches of size 1 and $\\ell _ { 2 }$ regularization constant tune on development data from $\\{ 1 0 ^ { - 4 } , 1 0 ^ { - 5 } , 1 0 ^ { - 6 } , 0 \\}$ . We use performance on development data to choose the best model and decide when to stop training. ",
419
+ "bbox": [
420
+ 174,
421
+ 103,
422
+ 823,
423
+ 146
424
+ ],
425
+ "page_idx": 4
426
+ },
427
+ {
428
+ "type": "text",
429
+ "text": "3.2 TASKS ",
430
+ "text_level": 1,
431
+ "bbox": [
432
+ 174,
433
+ 166,
434
+ 261,
435
+ 180
436
+ ],
437
+ "page_idx": 4
438
+ },
439
+ {
440
+ "type": "text",
441
+ "text": "We evaluate our method on four sentence representation tasks: sentiment classification, semantic relatedness, natural language inference (entailment), and sentence generation. We show statistics of the datasets in Table 1 and describe each task in detail in this subsection. ",
442
+ "bbox": [
443
+ 174,
444
+ 194,
445
+ 825,
446
+ 234
447
+ ],
448
+ "page_idx": 4
449
+ },
450
+ {
451
+ "type": "table",
452
+ "img_path": "images/73fb6fa338047231cfc83d95163953171083ce79b2849f4576942099ac79708b.jpg",
453
+ "table_caption": [
454
+ "Table 1: Descriptive statistics of datasets used in our experiments. "
455
+ ],
456
+ "table_footnote": [],
457
+ "table_body": "<table><tr><td>Dataset</td><td>#of train</td><td># of dev</td><td>#of test</td><td>Vocab size</td></tr><tr><td>SICK</td><td>4,500</td><td>500</td><td>4,927</td><td>2,172</td></tr><tr><td>SNLI</td><td>550,152</td><td>10,000</td><td>10,000</td><td>18,461</td></tr><tr><td>SST</td><td>98,794</td><td>872</td><td>1,821</td><td>8,201</td></tr><tr><td>IMDB</td><td>441,617</td><td>223,235</td><td>223,236</td><td>29,209</td></tr></table>",
458
+ "bbox": [
459
+ 305,
460
+ 257,
461
+ 691,
462
+ 332
463
+ ],
464
+ "page_idx": 4
465
+ },
466
+ {
467
+ "type": "text",
468
+ "text": "Stanford Sentiment Treebank. We evaluate our model on a sentiment classification task from the Stanford Sentiment Treebank (Socher et al., 2013). We use the binary classification task where the goal is to predict whether a sentence is a positive or a negative movie review. ",
469
+ "bbox": [
470
+ 176,
471
+ 363,
472
+ 823,
473
+ 405
474
+ ],
475
+ "page_idx": 4
476
+ },
477
+ {
478
+ "type": "text",
479
+ "text": "We set the word embedding size to 100 and initialize them with Glove vectors (Pennington et al., $2 0 1 4 ) ^ { 3 }$ . For each sentence, we create a 100-dimensional sentence representation s $\\in \\ \\mathbb { R } ^ { 1 0 0 }$ with Tree LSTM, project it to a 200-dimensional vector and apply ReLU: $\\begin{array} { r } { \\mathbf q = \\operatorname { R e L U } ( \\mathbf W _ { p } \\mathbf s + \\mathbf b _ { p } ) } \\end{array}$ , and compute $p ( \\boldsymbol { \\hat { y } } = \\boldsymbol { \\bar { c } } \\mid \\mathbf { q } ; \\mathbf { w } _ { q } ) \\propto \\exp ( \\mathbf { w } _ { q , c } \\mathbf { q } + b _ { q } )$ . ",
480
+ "bbox": [
481
+ 174,
482
+ 411,
483
+ 825,
484
+ 469
485
+ ],
486
+ "page_idx": 4
487
+ },
488
+ {
489
+ "type": "text",
490
+ "text": "We run each model 3 times (corresponding to 3 different initialization points) and use the development data to pick the best model. We show the results in Table 2. Our results agree with prior work that have shown the benefits of using syntactic parse tree information on this dataset (i.e., supervised recursive model is generally better than sequential models). The best model is the latent syntax model, which is also competitive with results from other work on this dataset. Both the latent and semi-supervised syntax models outperform models with predefined structures, demonstrating the benefit of learning task-specific composition orders. ",
491
+ "bbox": [
492
+ 173,
493
+ 474,
494
+ 825,
495
+ 573
496
+ ],
497
+ "page_idx": 4
498
+ },
499
+ {
500
+ "type": "table",
501
+ "img_path": "images/5ec70b095a2cb49dc51649afb695b338a8fbfdc9c7e36a1b028a36353a1a5dc6.jpg",
502
+ "table_caption": [
503
+ "Table 2: Classification accuracy on Stanford Sentiment Treebank dataset. The number of parameters includes word embedding parameters and is our approximation when not reported in previous work. "
504
+ ],
505
+ "table_footnote": [],
506
+ "table_body": "<table><tr><td>Model</td><td>Acc.</td><td># params.</td></tr><tr><td>100D-Right to left</td><td>83.9</td><td>1.2m</td></tr><tr><td>100D-Left to right</td><td>84.7</td><td>1.2m</td></tr><tr><td>100D-Bidirectional</td><td>84.7</td><td>1.5m</td></tr><tr><td>100D-Balanced binary tree</td><td>85.1</td><td>1.2m</td></tr><tr><td>100D-Supervised syntax</td><td>85.3</td><td>1.2m</td></tr><tr><td>100D-Semi-supervised syntax 100D-Latent syntax</td><td>86.1 86.5</td><td>1.2m 1.2m</td></tr><tr><td>RNTN (Socher et al.,2013)</td><td>85.4</td><td>-</td></tr><tr><td>DCNN (Kalchbrenner et al., 2014)</td><td>86.8</td><td></td></tr><tr><td>CNN-random(Kim, 2014)</td><td>82.7</td><td></td></tr><tr><td></td><td></td><td></td></tr><tr><td>CNN-word2vec (Kim,2014)</td><td>87.2</td><td></td></tr><tr><td>CNN-multichannel (Kim,2014)</td><td>88.1</td><td>=</td></tr><tr><td>NSE (Munkhdalai &amp; Yu,2016a)</td><td>89.7</td><td>5.4m</td></tr><tr><td>NTI-SLSTM(Munkhdalai&amp; Yu,2016b)</td><td>87.8</td><td>4.4m</td></tr><tr><td>NTI-SLSTM-LSTM(Munkhdalai &amp; Yu,2016b)</td><td>89.3</td><td>4.8m</td></tr><tr><td>Left to Right LSTM(Tai et al., 2015)</td><td>84.9</td><td>2.8m</td></tr><tr><td>Bidirectional LSTM(Tai et al.,2015)</td><td>87.5</td><td>2.8m</td></tr><tr><td>Constituency Tree-LSTM-random (Tai et al.,2015)</td><td>82.0</td><td>2.8m</td></tr><tr><td>Constituency Tree-LSTM-GloVe (Tai et al., 2015)</td><td>88.0</td><td>2.8m</td></tr><tr><td>Dependency Tree-LSTM(Tai et al., 2015)</td><td>85.7</td><td>2.8m</td></tr></table>",
507
+ "bbox": [
508
+ 271,
509
+ 621,
510
+ 723,
511
+ 893
512
+ ],
513
+ "page_idx": 4
514
+ },
515
+ {
516
+ "type": "text",
517
+ "text": "Semantic relatedness. The second task is to predict the degree of relatedness of two sentences from the Sentences Involving Compositional Knowledge corpus (SICK; Marelli et al., 2014) . In this dataset, each pair of sentences are given a relatedness score on a 5-point rating scale. For each sentence, we use Tree LSTM to create its representations. We denote the final representations by $\\{ \\mathbf { s } _ { 1 } , \\mathbf { s } _ { 2 } \\} \\in \\mathbb { R } ^ { 1 0 0 }$ . We construct our prediction by computing: $\\mathbf { u } \\ = \\ ( \\mathbf { s } _ { 2 } - \\mathbf { s } _ { 1 } ) ^ { 2 }$ , $\\textbf { v } = { \\bf s } _ { 1 } \\odot { \\bf s } _ { 2 }$ $\\dot { \\mathbf { q } } = \\dot { \\mathrm { R e L U } } ( \\mathbf { W } _ { p } [ \\mathbf { u } , \\mathbf { v } ] + \\mathbf { b } _ { p } )$ , and $\\hat { y } \\overset { \\bullet } { = } \\mathbf { w } _ { q } ^ { \\top } \\mathbf { q } + \\bar { b } _ { q }$ , where $\\bar { \\mathbf { W } } _ { p } \\in \\mathbb { R } ^ { 2 0 0 \\times 2 0 0 } ,$ $ { \\mathbf { b } } _ { p } \\in \\mathbb { R } ^ { 2 0 0 }$ , ${ \\bf w } _ { q } \\in \\mathbf { \\Sigma }$ $\\mathbb { R } ^ { 2 0 0 } , b _ { q } \\in \\mathbb { R } ^ { 1 }$ are model parameters, and $[ \\mathbf { u } , \\mathbf { v } ]$ denotes concatenation of vectors inside the brackets. We learn the model to minimize mean squared error. ",
518
+ "bbox": [
519
+ 173,
520
+ 103,
521
+ 825,
522
+ 218
523
+ ],
524
+ "page_idx": 5
525
+ },
526
+ {
527
+ "type": "text",
528
+ "text": "We run each model 5 times and use the development data to pick the best model. Our results are shown in Table 3. Similarly to the previous task, they clearly demonstrate that learning the tree structures yields better performance. ",
529
+ "bbox": [
530
+ 174,
531
+ 224,
532
+ 825,
533
+ 266
534
+ ],
535
+ "page_idx": 5
536
+ },
537
+ {
538
+ "type": "text",
539
+ "text": "We also provide results from other work on this dataset for comparisons. Some of these models (Lai & Hockenmaier, 2014; Jimenez et al., 2014; Bjerva et al., 2014) rely on feature engineering and are designed specifically for this task. Our Tree LSTM implementation performs competitively with most models in terms of mean squared error. Our best model—semi-supervised syntax—is better than most models except LSTM models of Tai et al. (2015) which were trained with a different objective function.4 Nonetheless, we observe the same trends with their results that show the benefit of using syntactic information on this dataset. ",
540
+ "bbox": [
541
+ 173,
542
+ 273,
543
+ 825,
544
+ 371
545
+ ],
546
+ "page_idx": 5
547
+ },
548
+ {
549
+ "type": "table",
550
+ "img_path": "images/06f1ff2235091f050101b458a30306a4a58681bccf78eb804b7282343e6f7406.jpg",
551
+ "table_caption": [
552
+ "Table 3: Mean squared error on SICK dataset. "
553
+ ],
554
+ "table_footnote": [],
555
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=3>MSE</td><td rowspan=1 colspan=1># params.</td></tr><tr><td rowspan=3 colspan=1>100D-Right to left100D-Left to right100D-Bidirectional100D-Balanced binary tree100D-Supervised syntax100D-Semi-supervised syntax100D-Latent syntax</td><td rowspan=1 colspan=3>0.461</td><td rowspan=1 colspan=1>1.0m</td></tr><tr><td rowspan=1 colspan=3>0.3940.3730.455</td><td rowspan=2 colspan=1>1.0m1.3m1.0m1.0m1.0m1.0m</td></tr><tr><td rowspan=1 colspan=3>0.4550.3810.3200.359</td><td rowspan=1 colspan=1>0.455</td></tr><tr><td rowspan=4 colspan=1>Illinois-LH (Lai &amp; Hockenmaier,2014)UNAL-NLP(Jimenez et al.,2014)Meaning Factory (Bjerva et al., 2014)DT-RNN (Socher et al.,2014)Mean Vectors (Tai et al.,2015)Left to Right LSTM (Tai et al., 2015)Bidirectional LSTM(Tai etal.,2015)Constituency Tree-LSTM(Tai et al., 2015)Dependency Tree-LSTM(Tai et al.,2015)</td><td rowspan=1 colspan=3>0.3690.3560.3220.3820.4560.283</td><td rowspan=1 colspan=1>-===650k1.0m</td></tr><tr><td rowspan=1 colspan=3>0.274</td><td rowspan=1 colspan=1>1.0m</td></tr><tr><td rowspan=1 colspan=3>0.273</td><td rowspan=1 colspan=1>1.0m</td></tr><tr><td rowspan=1 colspan=3>0.253</td><td rowspan=1 colspan=1>1.0m</td></tr></table>",
556
+ "bbox": [
557
+ 297,
558
+ 410,
559
+ 700,
560
+ 632
561
+ ],
562
+ "page_idx": 5
563
+ },
564
+ {
565
+ "type": "text",
566
+ "text": "Stanford Natural Language Inference. We next evaluate our model for natural language inference (i.e., recognizing textual entailment) using the Stanford Natural Language Inference corpus (SNLI; Bowman et al., 2015) . Natural language inference aims to predict whether two sentences are entailment, contradiction, or neutral, which can be formulated as a three-way classification problem. Given a pair of sentences, similar to the previous task, we use Tree LSTM to create sentence representations $\\{ \\mathbf { s } _ { 1 } , \\mathbf { s } _ { 2 } \\} \\in \\mathbb { R } ^ { 1 0 0 }$ for each of the sentences. Following Bowman et al. (2016), we construct our prediction by computing: $\\mathbf { u } = ( \\mathbf { s } _ { 2 } - \\mathbf { s } _ { 1 } ) ^ { 2 }$ , $\\mathbf { v } = \\mathbf { s } _ { 1 } \\odot \\mathbf { s } _ { 2 }$ , $\\begin{array} { r } { \\mathbf q = \\mathrm { R e L U } ( \\mathbf W _ { p } [ \\mathbf u , \\mathbf v , \\mathbf s _ { 1 } , \\mathbf s _ { 2 } ] + \\mathbf b _ { p } ) } \\end{array}$ , and $p ( \\hat { y } = c \\mid \\mathbf { q } ; \\mathbf { w } _ { q } ) \\propto \\exp ( \\mathbf { w } _ { q , c } \\mathbf { q } + b _ { q } )$ , where $\\mathbf { W } _ { p } \\in \\mathbb { R } ^ { 2 0 0 \\times 4 0 0 }$ , $\\mathbf { b } _ { p } \\in \\mathbb { R } ^ { 2 0 0 }$ , $\\mathbf { \\bar { w } } _ { q } \\in \\mathbb { R } ^ { 2 0 0 } , b _ { q } \\in \\bar { \\mathbb { R } } ^ { 1 }$ are model parameters. The objective function that we maximize is the log likelihood of the correct label under the models. ",
567
+ "bbox": [
568
+ 173,
569
+ 655,
570
+ 825,
571
+ 796
572
+ ],
573
+ "page_idx": 5
574
+ },
575
+ {
576
+ "type": "text",
577
+ "text": "We show the results in Table 4. The latent syntax method performs the best. Interestingly, the sequential left to right model is better than the supervised recursive model in our experiments, which contradicts results from Bowman et al. (2016) that show 300D-LSTM is worse than 300D-SPINN. A possible explanation is that our left to right model has identical number of parameters with the supervised model due to the inclusion of the tracking LSTM even in the left to right model (the only difference is in the composition order), whereas the models in Bowman et al. (2016) have different number of parameters. Due to the poor performance of the supervised model relative to the unsupervised model, semi-supervised training can only mitigate the loss in accuracy, rather than improve over unsupervised learning. Our models underperform state-of-the-art models on this dataset that have almost four times the number of parameters. We only experiment with smaller models since tree-based models with dynamic structures (e.g., our semi-supervised and latent syntax models) take longer to train. See $\\ S 4$ for details and discussions about training time. ",
578
+ "bbox": [
579
+ 174,
580
+ 803,
581
+ 825,
582
+ 887
583
+ ],
584
+ "page_idx": 5
585
+ },
586
+ {
587
+ "type": "text",
588
+ "text": "",
589
+ "bbox": [
590
+ 174,
591
+ 103,
592
+ 825,
593
+ 188
594
+ ],
595
+ "page_idx": 6
596
+ },
597
+ {
598
+ "type": "table",
599
+ "img_path": "images/994898f99eb1fef29252b23c22b716683fe1303851f95f178bfa0dcffa529634.jpg",
600
+ "table_caption": [
601
+ "Table 4: Classification accuracy on SNLI dataset. "
602
+ ],
603
+ "table_footnote": [],
604
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>Acc.</td><td rowspan=1 colspan=1># params.</td></tr><tr><td rowspan=2 colspan=1>100D-Right to left100D-Left to right100D-Bidirectional100D-Balanced binary tree100D-Supervised syntax100D-Semi-supervised syntax100D-Latent syntax</td><td rowspan=1 colspan=1>79.1</td><td rowspan=2 colspan=1>2.3m2.3m2.6m2.3m2.3m2.3m2.3m</td></tr><tr><td rowspan=1 colspan=1>80.280.277.478.580.280.5</td></tr><tr><td rowspan=3 colspan=1>100D-LSTM (Bowman et al., 2015)300D-LSTM (Bowman et al., 2016)300D-SPINN (Bowman et al., 2016)1024D-GRU (Vendrov et al.,2016)300D-CNN (Mou et al., 2016)300D-NTI(Munkhdalai&amp; Yu,2016b)300D-NSE (Munkhdalai&amp; Yu,2016a)</td><td rowspan=1 colspan=1>77.680.683.281.482.1</td><td rowspan=1 colspan=1>5.7m8.5m9.2m15.0m9m</td></tr><tr><td rowspan=1 colspan=1>83.4</td><td rowspan=1 colspan=1>9.5m</td></tr><tr><td rowspan=1 colspan=1>84.6</td><td rowspan=1 colspan=1>8.5m</td></tr></table>",
605
+ "bbox": [
606
+ 312,
607
+ 234,
608
+ 686,
609
+ 431
610
+ ],
611
+ "page_idx": 6
612
+ },
613
+ {
614
+ "type": "text",
615
+ "text": "Sentence generation. The last task that we consider is natural language generation. Given a sentence, the goal is to maximize the probability of generating words in the following sentence. This is a similar setup to the Skip Thought objective (Kiros et al., 2015), except that we do not generate the previous sentence as well. Given a sentence, we encode it with Tree LSTM to obtain $\\mathbf { s } \\in \\mathbb { R } ^ { 1 0 0 }$ . We use a bag-of-words model as our decoder, so $p ( w _ { i } \\mid \\mathbf { s } ; \\mathbf { V } ) \\propto \\exp ( \\mathbf { v } _ { i } ^ { \\top } \\mathbf { s } )$ , where $\\mathbf { V } \\in \\mathbb { R } ^ { 1 0 0 \\times 2 9 , 2 0 9 }$ and $\\mathbf { v } _ { i } \\in \\mathbb { R } ^ { 1 0 0 }$ is the $i$ -th column of $\\mathbf { V }$ . Using a bag-of-words decoder as opposed to a recurrent neural network decoder increases the importance of producing a better representation of the current sentence, since the model cannot rely on a sophisticated decoder with a language model component to predict better. This also greatly speeds up our training time. ",
616
+ "bbox": [
617
+ 173,
618
+ 470,
619
+ 825,
620
+ 597
621
+ ],
622
+ "page_idx": 6
623
+ },
624
+ {
625
+ "type": "text",
626
+ "text": "We use IMDB movie review corpus (Diao et al., 2014) for this experiment, The corpus consists of 280,593, 33,793, and 34,029 reviews in training, development, and test sets respectively. We construct our data using the development and test sets of this corpus. For training, we process 33,793 reviews from the original development set to get 441,617 pairs of sentences. For testing, we use 34,029 reviews in the test set (446,471 pairs of sentences). Half of these pairs is used as our development set to tune hyperparamaters, and the remaining half is used as our final test set. Our results in Table 5 further demonstrate that methods that learn tree structures perform better than methods that have fixed structures. ",
627
+ "bbox": [
628
+ 173,
629
+ 603,
630
+ 825,
631
+ 715
632
+ ],
633
+ "page_idx": 6
634
+ },
635
+ {
636
+ "type": "table",
637
+ "img_path": "images/9ba02a6d3a90da59d2e29653e9411b477469f2583c9b15d45da661b2f8a371a0.jpg",
638
+ "table_caption": [
639
+ "Table 5: Word perplexity on the sentence generation task. We also show perplexity of the model that does not condition on the previous sentence (unconditional) when generating bags of words for comparison. "
640
+ ],
641
+ "table_footnote": [],
642
+ "table_body": "<table><tr><td>Model</td><td>Perplexity</td><td>#params.</td></tr><tr><td>100D-Unconditional 100D-Right to left</td><td>105.6 101.4</td><td>30k 6m</td></tr><tr><td>100D-Left to right</td><td>101.1</td><td>6m</td></tr><tr><td>100D-Bidirectional</td><td>100.2</td><td>6.2m</td></tr><tr><td>100D-Balanced binary tree</td><td>103.3</td><td>6.2m</td></tr><tr><td>100D-Supervised syntax</td><td>100.8</td><td>6m</td></tr><tr><td>100D-Semi-supervised syntax</td><td>98.4</td><td>6m</td></tr><tr><td>100D-Latent syntax</td><td>99.0</td><td>6m</td></tr></table>",
643
+ "bbox": [
644
+ 321,
645
+ 786,
646
+ 676,
647
+ 906
648
+ ],
649
+ "page_idx": 6
650
+ },
651
+ {
652
+ "type": "image",
653
+ "img_path": "images/b363c285fa9c6eb6404592bee91545093bd992f0374c2ea5513c82342a82c746.jpg",
654
+ "image_caption": [],
655
+ "image_footnote": [],
656
+ "bbox": [
657
+ 241,
658
+ 98,
659
+ 756,
660
+ 215
661
+ ],
662
+ "page_idx": 7
663
+ },
664
+ {
665
+ "type": "text",
666
+ "text": "Figure 2: Examples of tree structures learned by our model which show that the model discovers simple concepts such as noun phrases and verb phrases. ",
667
+ "bbox": [
668
+ 171,
669
+ 228,
670
+ 823,
671
+ 256
672
+ ],
673
+ "page_idx": 7
674
+ },
675
+ {
676
+ "type": "image",
677
+ "img_path": "images/1bd3e8d71a8700ebdee024560b348a029ca70a6e49387567d0771a4f38e5f631.jpg",
678
+ "image_caption": [
679
+ "Figure 3: Examples of unconventional tree structures. "
680
+ ],
681
+ "image_footnote": [],
682
+ "bbox": [
683
+ 241,
684
+ 267,
685
+ 758,
686
+ 385
687
+ ],
688
+ "page_idx": 7
689
+ },
690
+ {
691
+ "type": "text",
692
+ "text": "4 DISCUSSION ",
693
+ "text_level": 1,
694
+ "bbox": [
695
+ 174,
696
+ 435,
697
+ 310,
698
+ 452
699
+ ],
700
+ "page_idx": 7
701
+ },
702
+ {
703
+ "type": "text",
704
+ "text": "Learned Structures. Our results in $\\ S 3$ show that our proposed method outperforms competing methods with predefined composition order on all tasks. The right to left model tends to perform worse than the left to right model. This suggests that the left to right composition order, similar to how human reads in practice, is better for neural network models. Our latent syntax method is able to discover tree structures that work reasonably well on all tasks, regardless of whether the task is better suited for a left to right or supervised syntax composition order. ",
705
+ "bbox": [
706
+ 173,
707
+ 467,
708
+ 825,
709
+ 550
710
+ ],
711
+ "page_idx": 7
712
+ },
713
+ {
714
+ "type": "text",
715
+ "text": "We inspect what kind of structures the latent syntax model learned and how closely they match human intuitions. We first compute unlabeled bracketing $F _ { 1 }$ scores5 for the learned structures and parses given by Stanford parser on SNLI and Stanford Sentiment Treebank. In the SNLI dataset, there are 10,000 pairs of test sentences (20,000 sentences in total), while the Stanford Sentiment Treebank test set contains 1,821 test sentences. The $F _ { 1 }$ scores for the two datasets are 41.73 and 40.51 respectively. For comparisons, $F _ { 1 }$ scores of a right (left) branching tree are 19.94 (41.37) for SNLI and 12.96 (38.56) for SST. ",
716
+ "bbox": [
717
+ 174,
718
+ 558,
719
+ 825,
720
+ 655
721
+ ],
722
+ "page_idx": 7
723
+ },
724
+ {
725
+ "type": "text",
726
+ "text": "We also manually inspect the learned structures. We observe that in SNLI, the trees exhibit overall left-branching structure, which explains why the $F _ { 1 }$ scores are closer to a left branching tree structure. Note that in our experiments on this corpus, the supervised syntax model does not perform as well as the left-to-right model, which suggests why the latent syntax model tends to converge towards the left-to-right model. We handpicked two examples of trees learned by our model and show them in Figure 2. We can see that in some cases the model is able to discover concepts such as noun phrases (e.g., a boy, his sleds) and simple verb phrases (e.g., wearing sunglasses, is frowning). Of course, the model sometimes settles on structures that make little sense to humans. We show two such examples in Figure 3, where the model chooses to compose playing frisbee in and outside a as phrases. ",
727
+ "bbox": [
728
+ 173,
729
+ 661,
730
+ 825,
731
+ 800
732
+ ],
733
+ "page_idx": 7
734
+ },
735
+ {
736
+ "type": "text",
737
+ "text": "Training Time. A major limitation of our proposed model is that it takes much longer to train compared to models with predefined structures. We observe that our models only outperforms models with fixed structures after several training epochs; and on some datasets such as SNLI or IMDB, an epoch could take a 5-7 hours (we use batch size 1 since the computation graph needs to be reconstructed for every example at every iteration depending on the samples from the policy network). This is also the main reason that we could only use smaller 100-dimensional Tree LSTM models in all our experiments. While for smaller datasets such as SICK the overall training time is approximately 6 hours, for SNLI or IMDB it takes 3-4 days for the model to reach convergence. In general, the latent syntax model and semi-supervised syntax models take about two or three times longer to converge compared to models with predefined structures. ",
738
+ "bbox": [
739
+ 174,
740
+ 816,
741
+ 825,
742
+ 900
743
+ ],
744
+ "page_idx": 7
745
+ },
746
+ {
747
+ "type": "text",
748
+ "text": "",
749
+ "bbox": [
750
+ 174,
751
+ 103,
752
+ 823,
753
+ 159
754
+ ],
755
+ "page_idx": 8
756
+ },
757
+ {
758
+ "type": "text",
759
+ "text": "5 CONCLUSION ",
760
+ "text_level": 1,
761
+ "bbox": [
762
+ 176,
763
+ 180,
764
+ 318,
765
+ 196
766
+ ],
767
+ "page_idx": 8
768
+ },
769
+ {
770
+ "type": "text",
771
+ "text": "We presented a reinforcement learning method to learn hierarchical structures of natural language sentences. We demonstrated the benefit of learning task-specific composition order on four tasks: sentiment analysis, semantic relatedness, natural language inference, and sentence generation. We qualitatively and quantitatively analyzed the induced trees and showed that they both incorporate some linguistically intuitive structures (e.g., noun phrases, simple verb phrases) and are different than conventional English syntactic structures. ",
772
+ "bbox": [
773
+ 174,
774
+ 212,
775
+ 825,
776
+ 295
777
+ ],
778
+ "page_idx": 8
779
+ },
780
+ {
781
+ "type": "text",
782
+ "text": "REFERENCES ",
783
+ "text_level": 1,
784
+ "bbox": [
785
+ 174,
786
+ 318,
787
+ 285,
788
+ 332
789
+ ],
790
+ "page_idx": 8
791
+ },
792
+ {
793
+ "type": "text",
794
+ "text": "Johannes Bjerva, Johan Bos, Rob van der Goot, and Malvina Nissim. The meaning factory: Formal semantics for recognizing textual entailment and determining semantic similarity. In Proc. of SemEval, 2014. ",
795
+ "bbox": [
796
+ 173,
797
+ 340,
798
+ 823,
799
+ 382
800
+ ],
801
+ "page_idx": 8
802
+ },
803
+ {
804
+ "type": "text",
805
+ "text": "Phil Blunsom and Trevor Cohn. Unsupervised induction of tree substitution grammars for dependency parsing. In Proc. of EMNLP, 2010. ",
806
+ "bbox": [
807
+ 171,
808
+ 392,
809
+ 823,
810
+ 421
811
+ ],
812
+ "page_idx": 8
813
+ },
814
+ {
815
+ "type": "text",
816
+ "text": "Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. A large anno tated corpus for learning natural language inference. In Proc. of EMNLP, 2015. ",
817
+ "bbox": [
818
+ 173,
819
+ 430,
820
+ 818,
821
+ 460
822
+ ],
823
+ "page_idx": 8
824
+ },
825
+ {
826
+ "type": "text",
827
+ "text": "Samuel R. Bowman, Jon Gauthier, Abhinav Rastogi, Raghav Gupta, Christopher D. Manning, and Christopher Potts. A fast unified model for parsing and sentence understanding. In Proc. of ACL, 2016. ",
828
+ "bbox": [
829
+ 174,
830
+ 469,
831
+ 823,
832
+ 511
833
+ ],
834
+ "page_idx": 8
835
+ },
836
+ {
837
+ "type": "text",
838
+ "text": "David Chiang. Hierarchical phrase-based translation. Computational Linguistics, 33(2):201–228, 2007. ",
839
+ "bbox": [
840
+ 173,
841
+ 522,
842
+ 823,
843
+ 550
844
+ ],
845
+ "page_idx": 8
846
+ },
847
+ {
848
+ "type": "text",
849
+ "text": "Kyunghyun Cho, Bart van Merrienboer, C¸ aglar G ¨ ulc¸ehre, Dzmitry Bahdanau, Fethi Bougares, Hol- ¨ ger Schwenk, and Yoshua Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. arXiv preprint, 2014. ",
850
+ "bbox": [
851
+ 173,
852
+ 559,
853
+ 825,
854
+ 603
855
+ ],
856
+ "page_idx": 8
857
+ },
858
+ {
859
+ "type": "text",
860
+ "text": "Noam Chomsky. Syntactic Structures. Mouton, 1957. ",
861
+ "bbox": [
862
+ 173,
863
+ 612,
864
+ 527,
865
+ 627
866
+ ],
867
+ "page_idx": 8
868
+ },
869
+ {
870
+ "type": "text",
871
+ "text": "Stephen Clark, Bob Coecke, and Mehrnoosh Sadrzadeh. A compositional distributional model of meaning. In Proc. of the Second Symposium on Quantum Interaction, 2008. ",
872
+ "bbox": [
873
+ 173,
874
+ 636,
875
+ 823,
876
+ 666
877
+ ],
878
+ "page_idx": 8
879
+ },
880
+ {
881
+ "type": "text",
882
+ "text": "Qiming Diao, Minghui Qiu, Chao-Yuan Wu, Alexander J. Smola, Jing Jiang, and Chong Wang. Jointly modeling aspects, ratings and sentiments for movie recommendation (JMARS). In Proc. of KDD, 2014. ",
883
+ "bbox": [
884
+ 174,
885
+ 675,
886
+ 821,
887
+ 717
888
+ ],
889
+ "page_idx": 8
890
+ },
891
+ {
892
+ "type": "text",
893
+ "text": "Chris Dyer, Adhiguna Kuncoro, Miguel Ballesteros, and Noah A. Smith. Recurrent neural network grammars. In Proc. of NAACL, 2016. ",
894
+ "bbox": [
895
+ 173,
896
+ 727,
897
+ 825,
898
+ 757
899
+ ],
900
+ "page_idx": 8
901
+ },
902
+ {
903
+ "type": "text",
904
+ "text": "Edward Grefenstette and Mehrnoosh Sadrzadeh. Experimental support for a categorical compositional distributional model of meaning. In Proc. of EMNLP, 2011. ",
905
+ "bbox": [
906
+ 171,
907
+ 766,
908
+ 821,
909
+ 795
910
+ ],
911
+ "page_idx": 8
912
+ },
913
+ {
914
+ "type": "text",
915
+ "text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. Neural Computation, 9(8): 1735–1780, 1997. ",
916
+ "bbox": [
917
+ 169,
918
+ 804,
919
+ 823,
920
+ 833
921
+ ],
922
+ "page_idx": 8
923
+ },
924
+ {
925
+ "type": "text",
926
+ "text": "Sergio Jimenez, George Duenas, Julia Baquero, Alexander Gelbukh, Av Juan Dios Batiz, and Av Mendizabal. UNAL-NLP: Combining soft cardinality features for semantic textual similarity, relatedness and entailment. In Proc. of SemEval, 2014. ",
927
+ "bbox": [
928
+ 176,
929
+ 843,
930
+ 821,
931
+ 886
932
+ ],
933
+ "page_idx": 8
934
+ },
935
+ {
936
+ "type": "text",
937
+ "text": "Nal Kalchbrenner, Edward Grefenstette, and Phil Blunsom. A convolutional neural network for modelling sentences. In Prof. of ACL, 2014. ",
938
+ "bbox": [
939
+ 174,
940
+ 895,
941
+ 820,
942
+ 924
943
+ ],
944
+ "page_idx": 8
945
+ },
946
+ {
947
+ "type": "text",
948
+ "text": "Yoon Kim. Convolutional neural networks for sentence classification. In Proc. EMNLP, 2014. ",
949
+ "bbox": [
950
+ 171,
951
+ 103,
952
+ 792,
953
+ 119
954
+ ],
955
+ "page_idx": 9
956
+ },
957
+ {
958
+ "type": "text",
959
+ "text": "Ryan Kiros, Yukun Zhu, Ruslan Salakhutdinov, Richard S. Zemel, Antonio Torralba, Raquel Urtasun, and Sanja Fidler. Skip-thought vectors. In Proc. of NIPS, 2015. ",
960
+ "bbox": [
961
+ 173,
962
+ 126,
963
+ 821,
964
+ 155
965
+ ],
966
+ "page_idx": 9
967
+ },
968
+ {
969
+ "type": "text",
970
+ "text": "Dan Klein and Christopher D. Manning. Accurate unlexicalized parsing. In Proc. of ACL, 2003. ",
971
+ "bbox": [
972
+ 178,
973
+ 161,
974
+ 803,
975
+ 178
976
+ ],
977
+ "page_idx": 9
978
+ },
979
+ {
980
+ "type": "text",
981
+ "text": "Dan Klein and Christopher D. Manning. Corpus-based induction of syntactic structure: Models of dependency and constituency. In Proc. of ACL, 2004. ",
982
+ "bbox": [
983
+ 176,
984
+ 184,
985
+ 820,
986
+ 215
987
+ ],
988
+ "page_idx": 9
989
+ },
990
+ {
991
+ "type": "text",
992
+ "text": "Alice Lai and Julia Hockenmaier. Illinois-lh: A denotational and distributional approach to semantics. In Proc. of SemEval, 2014. ",
993
+ "bbox": [
994
+ 173,
995
+ 220,
996
+ 821,
997
+ 251
998
+ ],
999
+ "page_idx": 9
1000
+ },
1001
+ {
1002
+ "type": "text",
1003
+ "text": "Mingbo Ma, Liang Huang, Bing Xiang, and Bowen Zhou. Dependency-based convolutional neural networks for sentence embedding. In Proc. ACL, 2015. ",
1004
+ "bbox": [
1005
+ 173,
1006
+ 257,
1007
+ 821,
1008
+ 287
1009
+ ],
1010
+ "page_idx": 9
1011
+ },
1012
+ {
1013
+ "type": "text",
1014
+ "text": "Marco Marelli, Luisa Bentivogli, Marco Baroni, Raffaella Bernardi, Stefano Menini, and Roberto Zamparelli. Evaluation of compositional distributional semantic models on full sentences through semantic relatedness and textual entailment. In Proc. of SemEval, 2014. ",
1015
+ "bbox": [
1016
+ 174,
1017
+ 294,
1018
+ 823,
1019
+ 338
1020
+ ],
1021
+ "page_idx": 9
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "Lili Mou, Rui Men, Ge Li, Yan Xu, Lu Zhang, Rui Yan, and Zhi Jin. Natural language inference by tree-based convolution and heuristic matching. In Proc. of ACL, 2016. ",
1026
+ "bbox": [
1027
+ 173,
1028
+ 344,
1029
+ 823,
1030
+ 375
1031
+ ],
1032
+ "page_idx": 9
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "Tsendsuren Munkhdalai and Hong Yu. Neural semantic encoders. arXiv preprint, 2016a. ",
1037
+ "bbox": [
1038
+ 171,
1039
+ 381,
1040
+ 759,
1041
+ 397
1042
+ ],
1043
+ "page_idx": 9
1044
+ },
1045
+ {
1046
+ "type": "text",
1047
+ "text": "Tsendsuren Munkhdalai and Hong Yu. Neural tree indexers for text understanding. arXiv preprint, 2016b. ",
1048
+ "bbox": [
1049
+ 173,
1050
+ 404,
1051
+ 823,
1052
+ 434
1053
+ ],
1054
+ "page_idx": 9
1055
+ },
1056
+ {
1057
+ "type": "text",
1058
+ "text": "Jason Naradowsky, Sebastian Riedel, and David A. Smith. Improving nlp through marginalization of hidden syntactic structure. In Proc. of EMNLP, 2012. ",
1059
+ "bbox": [
1060
+ 171,
1061
+ 440,
1062
+ 823,
1063
+ 470
1064
+ ],
1065
+ "page_idx": 9
1066
+ },
1067
+ {
1068
+ "type": "text",
1069
+ "text": "Jeffrey Pennington, Richard Socher, and Christopher D. Manning. Glove: Global vectors for word representation. In Proc. of EMNLP, 2014. ",
1070
+ "bbox": [
1071
+ 171,
1072
+ 477,
1073
+ 823,
1074
+ 507
1075
+ ],
1076
+ "page_idx": 9
1077
+ },
1078
+ {
1079
+ "type": "text",
1080
+ "text": "Steven Pinker. Language Learnability and Language Development. Harvard, 1984. ",
1081
+ "bbox": [
1082
+ 171,
1083
+ 513,
1084
+ 723,
1085
+ 530
1086
+ ],
1087
+ "page_idx": 9
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "Richard Socher, Brody Huval, Christopher D. Manning, and Andrew Y. Ng. Semantic compositionality through recursive matrix-vector spaces. In Proc. of EMNLP, 2012. ",
1092
+ "bbox": [
1093
+ 171,
1094
+ 536,
1095
+ 823,
1096
+ 565
1097
+ ],
1098
+ "page_idx": 9
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher Manning, Andrew $\\mathrm { N g }$ , and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proc. of EMNLP, 2013. ",
1103
+ "bbox": [
1104
+ 176,
1105
+ 571,
1106
+ 820,
1107
+ 616
1108
+ ],
1109
+ "page_idx": 9
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "Richard Socher, Andrej Karpathy, Quoc V Le, Christopher D Manning, and Andrew $\\textsf { Y } \\mathrm { N g }$ Grounded compositional semantics for finding and describing images with sentences. Transactions of the Association for Computational Linguistics, 2:207–208, 2014. ",
1114
+ "bbox": [
1115
+ 174,
1116
+ 622,
1117
+ 821,
1118
+ 666
1119
+ ],
1120
+ "page_idx": 9
1121
+ },
1122
+ {
1123
+ "type": "text",
1124
+ "text": "Valentin I. Spitkovsky, Hiyan Alshawi, Angel X. Chang, and Daniel Jurafsky. Unsupervised dependency parsing without gold part-of-speech tags. In Proc. of EMNLP, 2011. ",
1125
+ "bbox": [
1126
+ 174,
1127
+ 672,
1128
+ 821,
1129
+ 703
1130
+ ],
1131
+ "page_idx": 9
1132
+ },
1133
+ {
1134
+ "type": "text",
1135
+ "text": "Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. Sequence to sequence learning with neural networks. In Proc. NIPS, 2014. ",
1136
+ "bbox": [
1137
+ 174,
1138
+ 709,
1139
+ 823,
1140
+ 739
1141
+ ],
1142
+ "page_idx": 9
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "Kai Sheng Tai, Richard Socher, and Christopher D. Manning. Improved semantic representations from tree-structured long short-term memory networks. In Proc. of ACL, 2015. ",
1147
+ "bbox": [
1148
+ 173,
1149
+ 746,
1150
+ 821,
1151
+ 775
1152
+ ],
1153
+ "page_idx": 9
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "Ivan Vendrov, Ryan Kiros, Sanja Fidler, and Raquel Urtasun. Order-embeddings of images and language. In Proc. of ICLR, 2016. ",
1158
+ "bbox": [
1159
+ 171,
1160
+ 782,
1161
+ 821,
1162
+ 813
1163
+ ],
1164
+ "page_idx": 9
1165
+ },
1166
+ {
1167
+ "type": "text",
1168
+ "text": "Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8:229–256, 1992. ",
1169
+ "bbox": [
1170
+ 173,
1171
+ 819,
1172
+ 821,
1173
+ 849
1174
+ ],
1175
+ "page_idx": 9
1176
+ },
1177
+ {
1178
+ "type": "text",
1179
+ "text": "Luke S. Zettlemoyer and Michael Collins. Learning to map sentences to logical form: Structured classification with probabilistic categorial grammars. In Proc. of UAI, 2005. ",
1180
+ "bbox": [
1181
+ 169,
1182
+ 856,
1183
+ 823,
1184
+ 886
1185
+ ],
1186
+ "page_idx": 9
1187
+ },
1188
+ {
1189
+ "type": "text",
1190
+ "text": "Xiaodan Zhu, Parinaz Sobhani, and Hongyu Guo. Long short-term memory over recursive structures. In Proc. of ICML, 2015. ",
1191
+ "bbox": [
1192
+ 171,
1193
+ 892,
1194
+ 823,
1195
+ 921
1196
+ ],
1197
+ "page_idx": 9
1198
+ }
1199
+ ]
parse/train/Skvgqgqxe/Skvgqgqxe_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Skvgqgqxe/Skvgqgqxe_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SyehMhC9Y7/SyehMhC9Y7.md ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DEEP IMITATIVE MODELS FOR FLEXIBLE INFERENCE, PLANNING, AND CONTROL
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Imitation learning provides an appealing framework for autonomous control: in many tasks, demonstrations of preferred behavior can be readily obtained from human experts, removing the need for costly and potentially dangerous online data collection in the real world. However, policies learned with imitation learning have limited flexibility to accommodate varied goals at test time. Model-based reinforcement learning (MBRL) offers considerably more flexibility, since a predictive model learned from data can be used to achieve various goals at test time. However, MBRL suffers from two shortcomings. First, the model does not help to choose desired or safe outcomes – its dynamics estimate only what is possible, not what is preferred. Second, MBRL typically requires additional online data collection to ensure that the model is accurate in those situations that are actually encountered when attempting to achieve test time goals. Collecting this data with a partially trained model can be dangerous and time-consuming. In this paper, we aim to combine the benefits of imitation learning and MBRL, and propose imitative models: probabilistic predictive models able to plan expert-like trajectories to achieve arbitrary goals. We find this method substantially outperforms both direct imitation and MBRL in a simulated autonomous driving task, and can be learned efficiently from a fixed set of expert demonstrations without additional online data collection. We also show our model can flexibly incorporate user-supplied costs at test-time, can plan to sequences of goals, and can even perform well with imprecise goals, including goals on the wrong side of the road.
8
+
9
+ # 1 Introduction
10
+
11
+ Reinforcement learning (RL) algorithms offer the promise of automatically learning behaviors from raw sensory inputs with minimal engineering. However, RL generally requires online learning: the agent must collect more data with its latest strategy, use this data to update a model, and repeat. While this is natural in some settings, deploying a partially-trained policy on a real-world autonomous system, such as a car or robot, can be dangerous. In these settings the behavior must be learned offline, usually with expert demonstrations. How can we incorporate such demonstrations into a flexible robotic system, like an autonomous car? One option is imitation learning (IL), which can learn policies that stay near the expert’s distribution. Another option is model-based RL (MBRL) (Kuvayev & Sutton, 1996; Deisenroth & Rasmussen, 2011), which can use the data to fit a dynamics model, and can in principle be used with planning algorithms to achieve any user-specified goal at test time. However, in practice, model-based and model-free RL algorithms are vulnerable to distributional drift (Thrun, 1995; Ross & Bagnell, 2010): when acting according to the learned model or policy, the agent visits states different from those seen during training, and in those it is unlikely to determine an effective course of action. This is especially problematic when the data intentionally excludes adverse events, such as crashes. A model ignorant to the possibility of a crash cannot know how to prevent it. Therefore, MBRL algorithms usually require online collection and training (Englert et al., 2013; Liang et al., 2018). Imitation learning algorithms use expert demonstration data and, despite similar drift shortcomings (Ross et al., 2011), can sometimes learn effective policies without additional online data collection (Zhang et al., 2018). However, standard IL offers little task flexibility since it only predicts low-level behavior. While several works augmented IL with goal conditioning (Dosovitskiy & Koltun, 2016; Codevilla et al., 2018), these goals must be specified in advance during training, and are typically simple (e.g., turning left or right).
12
+
13
+ ![](images/1b67b71ca0dd6f9510bf98be045b58880707e1025819ee205e76f986f1810308.jpg)
14
+ Figure 1: We apply our approach to navigation in CARLA (Dosovitskiy et al., 2017). Columns 1,2: Images depicting the current scene. The overhead image depicts a $\mathrm { 5 0 m ^ { 2 } }$ area. Column 3: LIDAR input and goals are provided to our deep imitative trajectory model, and plans to the goals are computed under the model’s likelihood objective, and colored according to their ranking under the objective, with red indicating the best plan. The red square indicates the chosen high-level goal, and the yellow cross indicates a point along our plan used as a setpoint for a PID controller. The LIDAR map is $\mathrm { 1 0 0 m ^ { 2 } }$ , and each goal is $\geq 2 0 \mathrm { m }$ away from the vehicle. Column 4: Our model can incorporate arbitrary test-time costs, and use them to adjust its planning objective and plan ranking.
15
+
16
+ The goal in our work is to devise a new algorithm that combines the advantages of IL and MBRL, affording both the flexibility to achieve new user-specified goals at test time and the ability to learn entirely from offline data. By learning a deep probabilistic predictive model from expert-provided data, we capture the distribution of expert behaviors without using manually designed reward functions. To plan to a goal, our method infers the most probable expert state trajectory, conditioned on the current position and reaching the goal. By incorporating a model-based representation, our method can easily plan to previously unseen user-specified goals while respecting rules of the road, and can be flexibly repurposed to perform a wide range of test-time tasks without any additional training. Inference with this model resembles trajectory optimization in model-based reinforcement learning, and learning this model resembles imitation learning.
17
+
18
+ Our method’s relationship to other work is illustrated in Fig. 2. We demonstrate our method on a simulated autonomous driving task (see
19
+
20
+ ![](images/66aadb7317710be4782276f77e4c272051331bb7f28a01894765c828a450b41a.jpg)
21
+ Figure 2: A brief taxonomy of learning-based control methods. In our scenario, we avoid online data collection, specifically from the policy we seek to imitate. We structure our imitation learner with a model to make it flexible to new tasks at test time. We compare against other offline approaches (front face).
22
+
23
+ Fig. 1). A high-level route planner provides navigational goals, which our model uses to automatically generate plans that obey the rules of the road, inferred entirely from data. In contrast to IL, our method produces an interpretable distribution over trajectories and can follow a variety of goals without additional training. In contrast to MBRL, our method generates human-like behaviors without additional data collection or learning. In our experiments, our approach substantially outperforms both MBRL and IL: it can efficiently learn near-perfect driving through the static-world CARLA simulator from just 7,000 trajectories obtained from 19 hours of driving. We also show that our model can flexibly incorporate and achieve goals not seen during training, and is robust to errors in the high-level navigation system, even when the high-level goals are on the wrong side of the road. Videos of our results are available.1
24
+
25
+ # 2 Deep Imitative Models
26
+
27
+ To learn robot dynamics that are not only possible, but preferred, we construct a model of expert behavior. We fit a probabilistic model of trajectories, $q$ , to samples of expert trajectories drawn from an unknown distribution $p$ . A probabilistic model is necessary because expert behavior is often stochastic and multimodal: e.g., choosing to turn either left or right at an intersection are both common decisions. Because an expert’s behavior depends on their perception, we condition our model, $q$ , on observations $\phi$ . In our application, $\phi$ includes LIDAR features $\chi \in \mathbb { R } ^ { H \times W \times C }$ and a small window of previous positions $s _ { - \tau : 0 } = \{ s _ { - \tau } , \ldots , s _ { 0 } \}$ , such that $\phi = \{ \chi , s _ { - \tau : 0 } \}$ .
28
+
29
+ By training $q { \bigl ( } s _ { 1 : T } | \phi { \bigr ) }$ to forecast expert trajectories with high likelihood, we model the sceneconditioned expert dynamics, which can score trajectories by how likely they are to come from the expert. At test time, $q { \bigl ( } s _ { 1 : T } | \phi { \bigr ) }$ serves as a learned prior over the set of undirected expert trajectories. To execute samples from this distribution is to imitate an expert driver in an undirected fashion. We first describe how we use the generic form of this model to plan, and then discuss our particular implementation in Section 2.2.
30
+
31
+ # 2.1 Imitative Planning to Goals
32
+
33
+ Besides simply imitating the expert demonstrations, we wish to direct our agent to desired goals at test time, and have the agent reason automatically about the mid-level details necessary to achieve these goals. In general, we can define a driving task by a set of goal variables $\mathcal { G }$ . We will instantiate examples of $\mathcal { G }$ concretely after the generic goal planning derivation. The probability of a plan conditioned on the goal $\mathcal { G }$ is given as posterior distribution $\overline { { p } } ( s _ { 1 : T } | \mathcal { G } , \phi )$ . Planning a trajectory under this posterior corresponds to MAP inference with prior $q ( s _ { 1 : T } | \phi )$ and likelihood $p ( \mathcal { G } | s _ { 1 : T } , \phi )$ . We briefly derive the MAP inference result starting from the posterior maximization objective, which uses the learned Imitative Model to generate plans that achieve abstract goals:
34
+
35
+ $$
36
+ \begin{array} { r l } & { \underset { s _ { 1 : T } } { \operatorname* { m a x } } \mathcal { L } ( s _ { 1 : T } , \mathcal { G } , \phi ) = \underset { s _ { 1 : T } } { \operatorname* { m a x } } \log p ( s _ { 1 : T } | \mathcal { G } , \phi ) } \\ & { \quad \quad \quad \quad = \underset { s _ { 1 : T } } { \operatorname* { m a x } } \log q ( s _ { 1 : T } | \phi ) + \log p ( \mathcal { G } | s _ { 1 : T } , \phi ) - \log p ( \mathcal { G } | \phi ) } \\ & { \quad \quad \quad = \underset { s _ { 1 : T } } { \operatorname* { m a x } } \log \underset { \mathrm { i m i t a t i o n ~ p r i o r } } { \underbrace { q ( s _ { 1 : T } | \phi ) } } + \log \underset { \mathrm { g o a l ~ i k e l i h o o d } } { \underbrace { p ( \mathcal { G } | s _ { 1 : T } , \phi ) } } . } \end{array}
37
+ $$
38
+
39
+ Waypoint planning: One example of a concrete inference task is to plan towards a specific goal location, or waypoint. We can achieve this task by using a tightly-distributed goal likelihood function centered at the user’s desired final state. This effectively treats a desired goal location, $g _ { T }$ , as if it were a noisy observation of a future state, with likelihood $p ( \mathcal { G } | s _ { 1 : T } , \phi ) \ = \ \mathcal { N } ( g _ { T } | s _ { T } , \epsilon I )$ . The resulting inference corresponds to planning the trajectory $s _ { 1 : T }$ to a likely point under the distribution $\mathcal { N } ( g _ { T } | \boldsymbol { s } _ { T } , \epsilon I )$ . We can also plan to successive states with $\mathcal { G } = ( g _ { T - K } , \dots , g _ { T } )$ with goal likelihood $\begin{array} { r } { p ( \ddot { \mathcal { G } } | s _ { 1 : T } , \phi ) = \prod _ { k = T - K } ^ { T } \dot { \mathcal { N } } ( g _ { k } | s _ { k } , \epsilon I ) } \end{array}$ if the user (or program) wishes to specify the desired end velocity or acceleration when reached the final goal $g _ { T }$ location (Fig. 3). Alternatively, a route planner may propose a set of waypoints with the intention that the robot should reach any one of them. This is possible using a Gaussian mixture likelihood and can be useful if some of those waypoints along a route are inadvertently located at obstacles or potholes (Fig. 4).
40
+
41
+ Waypoint planning leverages the advantage of conditional imitation learning: a user or program can communicate where they desire the agent to go without knowing the best and safest actions. The planning-as-inference procedure produces paths similar to how an expert would acted to reach the given goal. In contrast to black-box, model-free conditional imitation learning that regresses controls, our method produces an explicit plan, accompanied by an explicit score of the plan’s quality. This provides both interpretability and an estimate of the feasibility of the plan.
42
+
43
+ Costed planning: If the user desires more control over the plan, our model has the additional flexibility to accept arbitrary user-specified costs $c$ at test time. For example, we may have updated knowledge of new hazards at test time, such as a given map of potholes (Fig. 4) or a predicted cost map. Given costs $c ( s _ { i } | \phi )$ , this can be treated by including an optimality variable $\mathcal { C }$ in $\mathcal { G }$ , where $\begin{array} { r } { p ( \mathcal { C } = 1 | \boldsymbol { s } _ { 1 : T } , \phi ) \propto \prod _ { t = 1 } ^ { T } \exp { - c ( s _ { t } | \phi ) } } \end{array}$ (Todorov, 2007; Levine, 2018). The goal log-likelihood is $\begin{array} { r } { \log p ( \{ g _ { T } , \mathcal { C } = 1 \} | s _ { 1 : T } , \phi ) = \log \mathcal { N } ( g _ { T } | s _ { T } , \epsilon I ) + \sum _ { t = 1 } ^ { N } - c ( s _ { t } | \phi ) . } \end{array}$ .
44
+
45
+ ![](images/8942264762506d5cfa7b072d1091a912640b78602ddb5e82f803e1b440c62261.jpg)
46
+ Figure 3: Planning to a sequence of goals (here, 10) allows for more control over the inferred paths.
47
+
48
+ ![](images/acec72bdeaa64fea7abc6084c6870ebb5693e62b51ed5f3690ea115d1e88e8c0.jpg)
49
+ Figure 4: Imitative planning to goals subject to a cost at test time. The cost bumps corresponds to simulated “potholes,” which the imitative planner is tasked with avoiding. The imitative planner generates and prefers routes that curve around the potholes, stay on the road, and respect intersections. Demonstrations of this behavior were never observed by our model.
50
+
51
+ # 2.2 Model Implementation
52
+
53
+ The primary structural requirement of an Imitative Model is the ability to compute $q { \bigl ( } s _ { 1 : T } | \phi { \bigr ) }$ . The ability to also compute gradients $\nabla _ { s _ { 1 : T } } q \left( s _ { 1 : T } | \phi \right)$ enables gradient-based optimization for planning. Finally, the quality and efficiency of learning are important. One deep generative model for Imitation Learning is the Reparameterized Pushforward Policy (R2P2) (Rhinehart et al., 2018). R2P2’s use of pushforward distributions (McCann et al., 1995), employed in other invertible generative models (Rezende & Mohamed, 2015; Dinh et al., 2016) allows it to efficiently minimize both false positives and false negatives (type I and type II errors) (Neyman & Pearson, 1933). Optimization of $K L ( p , q )$ , which penalizes mode loss (false negatives), is straightforward with R2P2, as it can evaluate $q ( s _ { 1 : T } | \phi )$ . Here, $p$ is the sampleable, but unknown, distribution of expert behavior. Reducing false positives corresponds to minimizing $K L ( q , p )$ , which penalizes $q$ heavily for generating bad
54
+
55
+ # Algorithm 1 IMITATIVEPLAN(qθ, G, φ)
56
+
57
+ <table><tr><td>1: Define MAP objective L with qe according to Eq. 1 2:Initialize S1:T</td><td>&gt; Incorporate the Imitative Model</td></tr><tr><td></td><td>&gt;Approx.MAP inference</td></tr><tr><td>3: while not converged do 4: S1:T ← S1:T +Vs1:TL(S1:T,9,Φ)</td><td></td></tr><tr><td></td><td></td></tr><tr><td>5: end while</td><td></td></tr><tr><td>6: return S1:T</td><td></td></tr></table>
58
+
59
+ samples under $p$ . As $p$ is unknown, R2P2 first uses a spatial cost model $\tilde { p }$ to approximate $p$ , which we can also use as $c$ in our planner. The learning objective is $K L ( p , q ) + \beta K L ( q , \tilde { p } )$ .
60
+
61
+ In R2P2, $q { \bigl ( } s _ { 1 : T } | \phi { \bigr ) }$ is induced by an invertible, differentiable function: $\overset { \cdot } { f } ( z ; \phi ) : \mathbb { R } ^ { 2 T } \overset { \cdot } { \mapsto } \mathbb { R } ^ { 2 T }$ , which warps latent samples from a base distribution $z \sim q _ { 0 } =$ $\mathcal { N } ( 0 , I _ { 2 T \times 2 T } )$ to the output space over $s _ { 1 : T }$ . $f$ embeds the evolution of learned discrete-time stochastic dynamics; each state is given by:
62
+
63
+ $$
64
+ \begin{array} { r } { s _ { t } = \underbrace { s _ { t - 1 } + \left( s _ { t - 1 } - s _ { t - 2 } \right) + m _ { t } \left( s _ { 1 : t - 1 } , \phi \right) } _ { \mu _ { t } \left( s _ { 1 : t - 1 } , \phi \right) } + \sigma _ { t } \left( s _ { 1 : t - 1 } , \phi \right) z _ { t } . } \end{array}
65
+ $$
66
+
67
+ ![](images/080e03c77e310e5a0c044087f1910448a4ce59fa3d7b201e5a5e863c18e6fac5.jpg)
68
+ Figure 5: Architecture of $m _ { t }$ and $\sigma _ { t }$ , modified from (Rhinehart et al., 2018) with permission.
69
+
70
+ The $m _ { t } ~ \in ~ \mathbb { R } ^ { 2 }$ and $\sigma _ { t } ~ \in ~ \mathbb { R } ^ { 2 \times 2 }$ are computed by expressive, nonlinear neural networks that observe previous states and LIDAR input. The resulting trajectory distribution is complex and multimodal. We modified the RNN method described by Rhinehart et al. (2018) and used LIDAR features $\chi = \mathbb { R } ^ { 2 0 0 \times 2 0 0 \times 2 }$ , with $\chi _ { i j }$ representing a 2-bin histogram of points below and above the ground in $0 . 5 \mathrm { m } ^ { 2 }$ cells (Fig 5). We used $T = 4 0$ trajectories at $\mathrm { 5 H z }$ (8 seconds of prediction or planning), $\tau = 1 9$ .
71
+
72
+ # 2.3 Imitative Driving
73
+
74
+ At test time, we use three layers of spatial abstractions to plan to a faraway destination, common to model-based (not end-to-end) autonomous vehicle setups: coarse route planning over a road map, path planning within the observable space, and feedback control to follow the planned path (Paden et al., 2016; Schwarting et al., 2018). For instance, a route planner based on a conventional GPSbased navigation system might output waypoints at a resolution of 20 meters – roughly indicating the direction of travel, but not accounting for the rules of the road or obstacles. The waypoints are treated as goals and passed to the Imitative Planner (Algorithm 1), which then generates a path chosen according to the optimization in Eq. 1. These plans are fed to a low-level controller (we use a PID-controller) that follows the plan. In Fig. 6 we illustrate how we use our model in our application.
75
+
76
+ ![](images/8769304abad4282e6bfcbea15c8040cc3910da793abff6892029e8ee7f1ea724.jpg)
77
+ Figure 6: Illustration of our method applied to autonomous driving. Our method trains an Imitative Model from a dataset of expert examples. After training, the model is repurposed as an Imitative Planner. At test time, a route planner provides waypoints to the Imitative Planner, which computes expert-like paths to each goal. The best plan chosen according to the planning objective, and provided to a low-level PID-controller in order to produce steering and throttle actions.
78
+
79
+ # 3 Related Work
80
+
81
+ Previous work has explored conditional IL for autonomous driving. Two model-free approaches were proposed by Codevilla et al. (2018), to map images to actions. The first uses three network “heads”, each head only trained on an expert’s left/straight/right turn maneuvers. The robot is directed by a route planner that chooses the desired head. Their second method input the goal location into the network, however, this did not perform as well. While model-free conditional IL can be effective given a discrete set of user directives, our model-based conditional IL has several advantages. Our model has flexibility to handle more complex directives post training, e.g. avoiding hazardous potholes (Fig. 4) or other costs, the ability to rank plans and goals by its objective, and interpretability: it can generate entire planned and unplanned (undirected) trajectories.
82
+
83
+ Work by Liang et al. (2018) also uses multi-headed model-free conditional imitation learning to “warm start” a DDPG driving algorithm (Lillicrap et al., 2015). While warm starting hastens DDPG training, any subsequent DDPG post fine-tuning is inherently trial-and-error based, without guarantees of safety, and may crash during this learning phase. By contrast, our method never executes unlikely transitions w.r.t. expert behavior at training time nor at test time. Our method can also stop the car if no plan reaches a minimum threshold, indicating none are likely safe to execute.
84
+
85
+ While our target setting is offline data collection, online imitation learning is an active area of research in the case of hybrid IL-RL (Ross & Bagnell, 2014; Sun et al., 2018) and “safe” IL (Sun et al., 2017; Menda et al., 2017; Zhang & Cho, 2017). Although our work does not consider multiagent environments, several methods predict the behavior of other vehicles or pedestrians. Typically this involves recurrent neural networks combined with Gaussian density layers or generative models based on some context inputs such as LIDAR, images, or known positions of external agents (Lee et al., 2017; Schmerling et al., 2018; Zyner et al., 2018; Gupta et al., 2018; Ma et al., 2017). However, none of these methods can evaluate the likelihood of trajectories or repurpose their model to perform other inference tasks. Other methods include inverse reinforcement learning to fit a probabilistic reward model to human demonstrations using the principle of maximum entropy (Ziebart et al., 2008; Sadigh et al., 2016; Rhinehart & Kitani, 2017).
86
+
87
+ # 4 Experiments
88
+
89
+ We evaluate our method using the CARLA urban driving simulator (Dosovitskiy et al., 2017). Each test episode begins with the vehicle randomly positioned on a road in the Town01 or Town02 maps. The task is to drive to a goal location, chosen to be the furthest road location from the vehicle’s initial position. As shown in Fig. 6, we use three layers of spatial abstractions to plan to the goal location, common to model-based (not end-to-end) autonomous vehicle setups: coarse route planning over a road map, path planning within the observable space, and feedback control to follow the planned path (Paden et al., 2016; Schwarting et al., 2018). First, we compute a route to the goal location using $\mathbf { A } ^ { * }$ given knowledge of the road graph. Second, we set waypoints along the route no closer than $2 0 \mathrm { m }$ of the vehicle at any time to direct the vehicle. Finally, we use a PID-controller to compute the vehicle steering value. The PID-controller was tuned to steer the vehicle towards a setpoint (target) 5 meters away along the planned path.
90
+
91
+ We consider four metrics for this task: 1) Success rate in driving to the goal location without any collisions. 2) Proportion of time spent driving in the correct lane. 3) Frequency of crashes into obstacles. 4) Passenger comfort, by comparing the distribution of accelerations (and higher-order terms) between each method. To contrast the benefits of our method against existing approaches, we compare against several baselines that all receive the same inputs and training data as our method. Since our approach bridges model-free IL and MBRL, we include an IL baseline algorithm, and a MBRL baseline algorithm.
92
+
93
+ PID control: The PID baseline uses the PID-controller to follow the high-level waypoints along the route. This corresponds to removing the middle layer of autonomous vehicle decision abstraction, which serves as a baseline for the other methods. The PID controller is effective when the setpoint is several meters away, but fails when the setpoint is further away (i.e. at $2 0 \mathrm { m }$ ), causing the vehicle to cut corners at intersections.
94
+
95
+ Conditional Imitation Learning: We designed an $\mathrm { I L }$ baseline to control the vehicle. A common straightforward approach to IL is behavior-cloning: learning to predict the actions taken by a demonstrator (Pomerleau, 1989; Bojarski et al., 2016; Mahler & Goldberg, 2017; Codevilla et al., 2018). Our setting is that of goal-conditioned IL: in order to achieve different behaviors, the imitator is tasked with generating controls after observing a target high-level waypoint and $\phi$ . We designed two baselines: one with the branched architecture of Codevilla et al. (2018), where actions are predicted based on left/straight/right “commands” derived from the waypoints, and other that predicts the setpoint for the PID-controller. Each receives the same $\phi$ and is trained with the same set of trajectories as our main method. We found the latter method very effective for stable control on straightaways. When the model encounters corners, however, prediction is more difficult, as in order to successfully avoid the curbs, the model must implicitly plan a safe path. In the latter method, we used a network architecture nearly identical to our approach’s..
96
+
97
+ Model-based RL: To compare against a purely model-based reinforcement learning algorithm, we propose a model-predictive control baseline. This baseline first learns a forwards dynamics model $f : \left( s _ { t - 3 } , s _ { t - 2 } , s _ { t - 1 } , s _ { t } , a _ { t } \right) \to s _ { t + 1 }$ given observed expert data $\cdot { a } _ { t }$ are recorded vehicle actions). We use an MLP with two hidden layers, each 100 units. Note that our forwards dynamics model does not imitate the expert preferred actions, but only models what is physically possible. Together with the same LIDAR map $\chi$ our method uses to locate obstacles, this baseline uses its dynamics model to plan a reachability tree (LaValle, 2006) through the free-space to the waypoint while avoiding obstacles. We plan forwards over 20 time steps using a breadth-first search search over CARLA steering angle $\{ - 0 . 3 , - 0 . 1 , 0 . , 0 . 1 , 0 . 3 \}$ , noting valid steering angles are normalized to $[ - 1 , 1 ]$ , with constant throttle at 0.5, noting the valid throttle range is [0, 1]. Our search expands each state node by the available actions and retains the 50 closest nodes to the waypoint. The planned trajectory efficiently reaches the waypoint, and can successfully plan around perceived obstacles to avoid getting stuck. To convert the LIDAR images into obstacle maps, we expanded all obstacles by the approximate radius of the car, 1.5 meters.
98
+
99
+ Performance results that compare our methods against baselines according to multiple metrics are includes in Table 1. With the exception of the success rate metric, lower numbers are better. We define success rate as the proportion of episodes where the vehicles navigated across the road map to a goal location on the other side without any collisions. In our experiments we do not include any other drivers or pedestrians, so a collision is w.r.t. a stationary obstacle. Collision impulse (in $\mathrm { { N \cdot s } ) }$ is the average cumulative collision intensities over episodes. “Wrong lane” and “Off road” percentage of the vehicle invading other lanes or offroad (averaged over time and episodes). While safety metrics are arguably the most important metric, passenger comfort is also relevant. Passenger comfort can be ambiguous to define, so we simply record the second to sixth derivatives of the position vector with respect to time, respectively termed acceleration, jerk, snap, crackle, and pop. In Table 1 we note the 99th percentile of each statistic given all data collected per path planning method. Generally speaking, lower numbers correspond to a smoother driving experience.
100
+
101
+ Table 1: We evaluate different path planning methods based on two CARLA environments: Town01, which each method was trained on; and Town02: a test environment.
102
+
103
+ <table><tr><td>Town01</td><td>Successes</td><td>Collision Impulse</td><td>Wrong lane</td><td>Off road</td><td>Accel</td><td>Jerk</td><td>Snap</td><td>Crackle</td><td>Pop</td></tr><tr><td>PID Controller</td><td>0/10</td><td>8.92</td><td>18.6%</td><td>12.1%</td><td>0.153</td><td>0.925</td><td>9.19</td><td>85.8</td><td>785</td></tr><tr><td>Cond. IL,PID Controller</td><td>5/10</td><td>1.28</td><td>0.2%</td><td>0.32%</td><td>0.060</td><td>0.313</td><td>2.52</td><td>17.4</td><td>169</td></tr><tr><td>Cond.IL,Learned Actions (Codevilla et al.,2018)</td><td>7/10</td><td>0.96</td><td>9.8%</td><td>1.64%</td><td>0.203</td><td>0.674</td><td>5.52</td><td>46.9</td><td>438</td></tr><tr><td>Model-Based RL (LaValle,2006)</td><td>10/10</td><td>0.00</td><td>9.3%</td><td>0.82%</td><td>0.062</td><td>0.353</td><td>2.69</td><td>26.1</td><td>261</td></tr><tr><td>Ourmethod</td><td>10/10</td><td>0.00</td><td>0.0%</td><td>0.00%</td><td>0.054</td><td>0.256</td><td>1.50</td><td>13.8</td><td>136</td></tr><tr><td>Town02</td><td>Successes</td><td>Collision Impulse</td><td>Wrong lane</td><td>Off road</td><td>Accel</td><td>Jerk</td><td>Snap</td><td>Crackle</td><td>Pop</td></tr><tr><td>PID Controller</td><td>2/10</td><td>12.5</td><td>5.0%</td><td>4.99%</td><td>0.204</td><td>1.040</td><td>6.77</td><td>59.1</td><td>611</td></tr><tr><td>Cond. IL, PID Controller</td><td>2/10</td><td>8.87</td><td>2.2%</td><td>1.03%</td><td>0.319</td><td>0.798</td><td>3.66</td><td>33.3</td><td>319</td></tr><tr><td>Cond. IL,Learned Actions (Codevilla et al.,2018)</td><td>3/10</td><td>1.23</td><td>21.6%</td><td>3.06%</td><td>0.368</td><td>1.234</td><td>8.13</td><td>91.1</td><td>845</td></tr><tr><td>Model-Based RL (LaValle,2006)</td><td>7/10</td><td>2.56</td><td>12.0%</td><td>3.53%</td><td>0.134</td><td>0.967</td><td>6.06</td><td>63.1</td><td>575</td></tr><tr><td>Our method</td><td>8/10</td><td>0.41</td><td>0.4%</td><td>0.27%</td><td>0.054</td><td>0.613</td><td>2.64</td><td>21.4</td><td>289</td></tr></table>
104
+
105
+ The poor performance of the PID baseline indicates that the high-level waypoints do not communicate sufficient information about the correct driving direction. Imitation learning achieves better levels of comfort than MBRL, but exhibits substantially worse generalization from the training data, since it does not reason about the sequential structure in the task. Model-based RL succeeds on most of the trials in the training environment, but exhibits worse generalization. Notably, it also scores much worse than IL in terms of staying in the right lane and maintaining comfort, which is consistent with our hypothesis: it is able to achieve the desired goals, but does not capture the behaviors in the data. Our method performs the best under all metrics, far exceeding the success and comfort metrics of imitation learning, and far exceeding the lane-obeyance and comfort metrics of MBRL.
106
+
107
+ Table 2: Incorporating a pothole cost enables our method to avoid potholes
108
+
109
+ <table><tr><td>Approach</td><td>Successes</td><td>Pothole hits</td><td>Wrong lane</td><td>Off road</td></tr><tr><td>Our method without pothole cost, Town 0 1</td><td>9/10</td><td>177/230</td><td>0.06%</td><td>0.00%</td></tr><tr><td>Our method with pothole cost, Town 0 1</td><td>9/10</td><td>10/230</td><td>1.53%</td><td>0.06%</td></tr><tr><td>Our method without pothole cost, Town 0 2</td><td>8/10</td><td>82/154</td><td>1.03%</td><td>0.30%</td></tr><tr><td>Our method with pothole cost, Town 0 2</td><td>7/10</td><td>35/154</td><td>1.53%</td><td>0.11%</td></tr></table>
110
+
111
+ # 4.1 Avoiding novel obstacles at test-time
112
+
113
+ ![](images/b18915d7c92f4926c9334d0a4523021130004bbba687a64eb928ee2eae27714f.jpg)
114
+ Figure 7: Test-time pothole planning. The preferred plans steer left around the simulated potholes.
115
+
116
+ To further illustrate the capability of our method to incorporate test-time costs, we designed a pothole collision experiment. We simulated $2 \mathrm { m }$ -wide potholes in the environment by randomly inserting them in the cost map offset from each waypoint, distributed $\mathcal { N } ( \mu = [ - 1 5 \mathrm { m } , 2 \mathrm { m } ] , \Sigma \ \bar { = }$ $\mathrm { d i a g ( [ 1 , 0 . 0 1 ] ) } ,$ ), (i.e. the mean is centered on the right side of the lane $1 5 \mathrm { m }$ before each waypoint). We ran our method that incorporates a test-time cost map of the simulated potholes, and compared to our method that did not incorporate the cost map (and thus had no incentive to avoid potholes). In addition to the other metrics, we recorded the number of collisions with potholes. In Table 2, we see that our method with cost incorporated achieved nearly perfect pothole avoidance, while still avoiding collisions with the environment. To do so, it drove closer to the centerline, and occasionally dipped into the opposite lane. Our model internalized obstacle avoidance by staying on the road, and demonstrated its flexibility to obstacles not observed during training. Fig. 7 shows an example of this behavior.
117
+
118
+ # 4.2 Robustness to poor-quality waypoints
119
+
120
+ As another test of our model’s capability to stay in the distribution of demonstrated behavior, we designed a “decoy waypoints” experiment, in which half of the waypoints are highly perturbed versions of the other half, serving as distractions for our planner. The planner is tasked with planning to all of the waypoints under the Gaussian mixture likelihood. The perturbation distribution is $\mathcal { N } ( 0 , \sigma = 8 m )$ : each waypoint is perturbed with a standard deviation of 8 meters. We observed the imitative model to be surprisingly robust to decoy waypoints. Examples of this robustness are shown in Fig. 8. One failure mode of this approach is when decoy waypoints lie on a valid off-route path at intersections, which temporarily confuses the planner about the best route. In Table 3, we report the success rate and the mean number of planning rounds for successful and failed episodes. These numbers indicate our method can execute dozens to hundreds of planning rounds without decoy waypoints derailing it.
121
+
122
+ We also designed an experiment to test our method under systemic bias in the route planner. Our method is provided waypoints on the wrong side of the road. We model this by increasing the goal likelihood observation noise $\epsilon$ . After tuning the noise, we found our method to still be very effective at navigating, and report results in Table 3. This further illustrates our method’s tendency to stay near the distribution of expert behavior, as our expert never drove on the wrong side of the road.
123
+
124
+ Table 3: Our method is able to ignore decoy waypoints in most planning rounds: it can execute dozens to hundreds of planning rounds without decoy waypoints derailing it. Our method is also robust to waypoints on the wrong side of the road.
125
+
126
+ <table><tr><td>Approach</td><td>Successes</td><td>Avg. #plans until success</td><td>Avg. #plans until failure</td></tr><tr><td>Our method with 1/2 waypoints noisy, Town 01</td><td>4/10</td><td>157.6</td><td>37.9</td></tr><tr><td>Our method with 1/2 waypoints noisy,Town 02</td><td>5/10</td><td>78.0</td><td>32.1</td></tr><tr><td>Approach</td><td>Successes</td><td>Wrong lane</td><td>Off road</td></tr><tr><td>Our method with waypoints on wrong side,Town O1</td><td>10/10</td><td>0.338%</td><td>0.002%</td></tr><tr><td>Our method with waypoints on wrong side,Town 0 2</td><td>7/10</td><td>3.159%</td><td>0.044%</td></tr></table>
127
+
128
+ # 5 Discussion
129
+
130
+ We proposed a method that combines elements of imitation learning and model-based reinforcement learning (MBRL). Our method first learns what preferred behavior is by fitting a probabilistic model to the distribution of expert demonstrations at training time, and then plans paths to achieve userspecified goals at test time while maintaining high probability under this distribution. We demonstrated several advantages and applications of our algorithm in autonomous driving scenarios. In the context of MBRL, our method mitigates the distributional drift issue by explicitly preferring plans that stay close to the expert demonstration data. This implicitly allows our method to enforce basic safety properties: in contrast to MBRL, which requires negative examples to understand the potential for adverse outcomes (e.g., crashes), our method automatically avoids such outcomes specifically because they do not occur (or rarely occur) in the training data. In the context of imitation learning, our method provides a flexible, safe way to generalize to new goals by planning, compared to prior work on black-box, model-free conditional imitation learning. Our algorithm produces an explicit plan within the distribution of preferred behavior accompanied with a score: the former offers interpretability, and the latter provides an estimate of the feasibility of the plan. We believe our method is broadly applicable in settings where expert demonstrations are available, flexibility to new situations is demanded, and safety is critical.
131
+
132
+ ![](images/2edfc681ceeea6d8c52c822cdd18f914fcfeac2a96b43a0d59fa9975086f0c8c.jpg)
133
+ Figure 8: Tolerating bad waypoints. The planner prefers waypoints in the distribution of expert behavior: on the road at a reasonable distance. Columns 1,2: Planning with $^ 1 / 2$ decoy waypoints. Columns 3,4: Planning with all waypoints on the wrong side of the road.
134
+
135
+ # References
136
+
137
+ Mariusz Bojarski, Davide Del Testa, Daniel Dworakowski, Bernhard Firner, Beat Flepp, Prasoon Goyal, Lawrence D Jackel, Mathew Monfort, Urs Muller, Jiakai Zhang, et al. End to end learning for self-driving cars. arXiv preprint arXiv:1604.07316, 2016.
138
+
139
+ Felipe Codevilla, Matthias Miiller, Antonio Lopez, Vladlen Koltun, and Alexey Dosovitskiy. End- ´ to-end driving via conditional imitation learning. In International Conference on Robotics and Automation (ICRA), pp. 1–9. IEEE, 2018.
140
+
141
+ Marc Deisenroth and Carl E Rasmussen. PILCO: A model-based and data-efficient approach to policy search. In International Conference on Machine Learning (ICML), pp. 465–472, 2011.
142
+
143
+ Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using Real NVP. arXiv preprint arXiv:1605.08803, 2016.
144
+
145
+ Alexey Dosovitskiy and Vladlen Koltun. Learning to act by predicting the future. arXiv preprint arXiv:1611.01779, 2016.
146
+
147
+ Alexey Dosovitskiy, German Ros, Felipe Codevilla, Antonio Lopez, and Vladlen Koltun. CARLA: An open urban driving simulator. In Conference on Robot Learning (CoRL), pp. 1–16, 2017.
148
+
149
+ Peter Englert, Alexandros Paraschos, Marc Peter Deisenroth, and Jan Peters. Probabilistic modelbased imitation learning. Adaptive Behavior, 21(5):388–403, 2013.
150
+
151
+ Agrim Gupta, Justin Johnson, Li Fei-Fei, Silvio Savarese, and Alexandre Alahi. Social GAN: Socially acceptable trajectories with generative adversarial networks. In Computer Vision and Pattern Recognition (CVPR), number CONF, 2018.
152
+
153
+ Leonid Kuvayev and Richard S. Sutton. Model-based reinforcement learning with an approximate, learned model. In Yale Workshop on Adaptive and Learning Systems, pp. 101–105, 1996.
154
+
155
+ Steven M LaValle. Planning algorithms. chapter 14, pp. 802–805. Cambridge University Press, 2006.
156
+
157
+ Namhoon Lee, Wongun Choi, Paul Vernaza, Christopher B Choy, Philip HS Torr, and Manmohan Chandraker. DESIRE: Distant future prediction in dynamic scenes with interacting agents. In Computer Vision and Pattern Recognition (CVPR), pp. 336–345, 2017.
158
+
159
+ Sergey Levine. Reinforcement learning and control as probabilistic inference: Tutorial and review. arXiv preprint arXiv:1805.00909, 2018.
160
+
161
+ Xiaodan Liang, Tairui Wang, Luona Yang, and Eric Xing. CIRL: Controllable imitative reinforcement learning for vision-based self-driving. arXiv preprint arXiv:1807.03776, 2018.
162
+
163
+ Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015.
164
+
165
+ Wei-Chiu Ma, De-An Huang, Namhoon Lee, and Kris M Kitani. Forecasting interactive dynamics of pedestrians with fictitious play. In Computer Vision and Pattern Recognition (CVPR), pp. 4636–4644. IEEE, 2017.
166
+
167
+ Jeffrey Mahler and Ken Goldberg. Learning deep policies for robot bin picking by simulating robust grasping sequences. In Conference on Robot Learning (CoRL), pp. 515–524, 2017.
168
+
169
+ Robert J McCann et al. Existence and uniqueness of monotone measure-preserving maps. 1995.
170
+
171
+ Kunal Menda, Katherine Driggs-Campbell, and Mykel J Kochenderfer. DropoutDAgger: A bayesian approach to safe imitation learning. arXiv preprint arXiv:1709.06166, 2017.
172
+
173
+ Jerzy Neyman and Egon Pearson. On the problem of the most efficient tests of statistical hypotheses. Philosophical Transactions of the Royal Society of London, A 231:289–337, 1933.
174
+
175
+ Brian Paden, Michal Cˇ ap, Sze Zheng Yong, Dmitry Yershov, and Emilio Frazzoli. A survey of mo-´ tion planning and control techniques for self-driving urban vehicles. Transactions on Intelligent Vehicles, 1(1):33–55, 2016.
176
+
177
+ Dean A Pomerleau. Alvinn: An autonomous land vehicle in a neural network. In Advances in Neural Information Processing Systems (NIPS), pp. 305–313, 1989.
178
+
179
+ Danilo Jimenez Rezende and Shakir Mohamed. Variational inference with normalizing flows. arXiv preprint arXiv:1505.05770, 2015.
180
+
181
+ Nicholas Rhinehart and Kris M. Kitani. First-person activity forecasting with online inverse reinforcement learning. In International Conference on Computer Vision (ICCV), Oct 2017.
182
+
183
+ Nicholas Rhinehart, Kris M. Kitani, and Paul Vernaza. R2P2: A reparameterized pushforward policy for diverse, precise generative path forecasting. In European Conference on Computer Vision (ECCV), September 2018.
184
+
185
+ Stephane Ross and Drew Bagnell. Efficient reductions for imitation learning. In ´ International Conference on Artificial Intelligence and Statistics, pp. 661–668, 2010.
186
+
187
+ Stephane Ross and J Andrew Bagnell. Reinforcement and imitation learning via interactive no-regret learning. arXiv preprint arXiv:1406.5979, 2014.
188
+
189
+ Stephane Ross, Geoffrey Gordon, and Drew Bagnell. A reduction of imitation learning and struc- ´ tured prediction to no-regret online learning. In International Conference on Artificial Intelligence and Statistics, pp. 627–635, 2011.
190
+
191
+ Dorsa Sadigh, Shankar Sastry, Sanjit A Seshia, and Anca D Dragan. Planning for autonomous cars that leverage effects on human actions. In Robotics: Science and Systems (RSS), 2016.
192
+
193
+ Edward Schmerling, Karen Leung, Wolf Vollprecht, and Marco Pavone. Multimodal probabilistic model-based planning for human-robot interaction. In International Conference on Robotics and Automation (ICRA), pp. 1–9. IEEE, 2018.
194
+
195
+ Wilko Schwarting, Javier Alonso-Mora, and Daniela Rus. Planning and decision-making for autonomous vehicles. Annual Review of Control, Robotics, and Autonomous Systems, 1:187–210, 2018.
196
+
197
+ Liting Sun, Cheng Peng, Wei Zhan, and Masayoshi Tomizuka. A fast integrated planning and control framework for autonomous driving via imitation learning. arXiv preprint arXiv:1707.02515, 2017.
198
+
199
+ Wen Sun, James Andrew Bagnell, and Byron Boots. Truncated horizon policy search: Combining reinforcement learning and imitation learning. In International Conference on Learning Representations (ICLR), 2018.
200
+
201
+ Sebastian Thrun. Learning to play the game of chess. In Advances in Neural Information Processing Systems (NIPS), pp. 1069–1076, 1995.
202
+
203
+ Emanuel Todorov. Linearly-solvable Markov decision problems. In Advances in neural information processing systems, pp. 1369–1376, 2007.
204
+
205
+ Jiakai Zhang and Kyunghyun Cho. Query-efficient imitation learning for end-to-end simulated driving. In AAAI, pp. 2891–2897, 2017.
206
+
207
+ Tianhao Zhang, Zoe McCarthy, Owen Jowl, Dennis Lee, Xi Chen, Ken Goldberg, and Pieter Abbeel. Deep imitation learning for complex manipulation tasks from virtual reality teleoperation. In International Conference on Robotics and Automation (ICRA), pp. 1–8. IEEE, 2018.
208
+
209
+ Brian D Ziebart, Andrew L Maas, J Andrew Bagnell, and Anind K Dey. Maximum entropy inverse reinforcement learning. In AAAI, volume 8, pp. 1433–1438. Chicago, IL, USA, 2008.
210
+
211
+ Alex Zyner, Stewart Worrall, and Eduardo Nebot. Naturalistic driver intention and path prediction using recurrent neural networks. arXiv preprint arXiv:1807.09995, 2018.
parse/train/SyehMhC9Y7/SyehMhC9Y7_content_list.json ADDED
@@ -0,0 +1,1170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "DEEP IMITATIVE MODELS FOR FLEXIBLE INFERENCE, PLANNING, AND CONTROL ",
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
+ 172,
20
+ 398,
21
+ 200
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 219,
32
+ 544,
33
+ 234
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Imitation learning provides an appealing framework for autonomous control: in many tasks, demonstrations of preferred behavior can be readily obtained from human experts, removing the need for costly and potentially dangerous online data collection in the real world. However, policies learned with imitation learning have limited flexibility to accommodate varied goals at test time. Model-based reinforcement learning (MBRL) offers considerably more flexibility, since a predictive model learned from data can be used to achieve various goals at test time. However, MBRL suffers from two shortcomings. First, the model does not help to choose desired or safe outcomes – its dynamics estimate only what is possible, not what is preferred. Second, MBRL typically requires additional online data collection to ensure that the model is accurate in those situations that are actually encountered when attempting to achieve test time goals. Collecting this data with a partially trained model can be dangerous and time-consuming. In this paper, we aim to combine the benefits of imitation learning and MBRL, and propose imitative models: probabilistic predictive models able to plan expert-like trajectories to achieve arbitrary goals. We find this method substantially outperforms both direct imitation and MBRL in a simulated autonomous driving task, and can be learned efficiently from a fixed set of expert demonstrations without additional online data collection. We also show our model can flexibly incorporate user-supplied costs at test-time, can plan to sequences of goals, and can even perform well with imprecise goals, including goals on the wrong side of the road. ",
40
+ "bbox": [
41
+ 233,
42
+ 258,
43
+ 764,
44
+ 551
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 174,
54
+ 583,
55
+ 310,
56
+ 599
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Reinforcement learning (RL) algorithms offer the promise of automatically learning behaviors from raw sensory inputs with minimal engineering. However, RL generally requires online learning: the agent must collect more data with its latest strategy, use this data to update a model, and repeat. While this is natural in some settings, deploying a partially-trained policy on a real-world autonomous system, such as a car or robot, can be dangerous. In these settings the behavior must be learned offline, usually with expert demonstrations. How can we incorporate such demonstrations into a flexible robotic system, like an autonomous car? One option is imitation learning (IL), which can learn policies that stay near the expert’s distribution. Another option is model-based RL (MBRL) (Kuvayev & Sutton, 1996; Deisenroth & Rasmussen, 2011), which can use the data to fit a dynamics model, and can in principle be used with planning algorithms to achieve any user-specified goal at test time. However, in practice, model-based and model-free RL algorithms are vulnerable to distributional drift (Thrun, 1995; Ross & Bagnell, 2010): when acting according to the learned model or policy, the agent visits states different from those seen during training, and in those it is unlikely to determine an effective course of action. This is especially problematic when the data intentionally excludes adverse events, such as crashes. A model ignorant to the possibility of a crash cannot know how to prevent it. Therefore, MBRL algorithms usually require online collection and training (Englert et al., 2013; Liang et al., 2018). Imitation learning algorithms use expert demonstration data and, despite similar drift shortcomings (Ross et al., 2011), can sometimes learn effective policies without additional online data collection (Zhang et al., 2018). However, standard IL offers little task flexibility since it only predicts low-level behavior. While several works augmented IL with goal conditioning (Dosovitskiy & Koltun, 2016; Codevilla et al., 2018), these goals must be specified in advance during training, and are typically simple (e.g., turning left or right). ",
63
+ "bbox": [
64
+ 174,
65
+ 616,
66
+ 825,
67
+ 921
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "image",
73
+ "img_path": "images/1b67b71ca0dd6f9510bf98be045b58880707e1025819ee205e76f986f1810308.jpg",
74
+ "image_caption": [
75
+ "Figure 1: We apply our approach to navigation in CARLA (Dosovitskiy et al., 2017). Columns 1,2: Images depicting the current scene. The overhead image depicts a $\\mathrm { 5 0 m ^ { 2 } }$ area. Column 3: LIDAR input and goals are provided to our deep imitative trajectory model, and plans to the goals are computed under the model’s likelihood objective, and colored according to their ranking under the objective, with red indicating the best plan. The red square indicates the chosen high-level goal, and the yellow cross indicates a point along our plan used as a setpoint for a PID controller. The LIDAR map is $\\mathrm { 1 0 0 m ^ { 2 } }$ , and each goal is $\\geq 2 0 \\mathrm { m }$ away from the vehicle. Column 4: Our model can incorporate arbitrary test-time costs, and use them to adjust its planning objective and plan ranking. "
76
+ ],
77
+ "image_footnote": [],
78
+ "bbox": [
79
+ 174,
80
+ 101,
81
+ 823,
82
+ 223
83
+ ],
84
+ "page_idx": 1
85
+ },
86
+ {
87
+ "type": "text",
88
+ "text": "The goal in our work is to devise a new algorithm that combines the advantages of IL and MBRL, affording both the flexibility to achieve new user-specified goals at test time and the ability to learn entirely from offline data. By learning a deep probabilistic predictive model from expert-provided data, we capture the distribution of expert behaviors without using manually designed reward functions. To plan to a goal, our method infers the most probable expert state trajectory, conditioned on the current position and reaching the goal. By incorporating a model-based representation, our method can easily plan to previously unseen user-specified goals while respecting rules of the road, and can be flexibly repurposed to perform a wide range of test-time tasks without any additional training. Inference with this model resembles trajectory optimization in model-based reinforcement learning, and learning this model resembles imitation learning. ",
89
+ "bbox": [
90
+ 174,
91
+ 388,
92
+ 483,
93
+ 680
94
+ ],
95
+ "page_idx": 1
96
+ },
97
+ {
98
+ "type": "text",
99
+ "text": "Our method’s relationship to other work is illustrated in Fig. 2. We demonstrate our method on a simulated autonomous driving task (see ",
100
+ "bbox": [
101
+ 174,
102
+ 688,
103
+ 483,
104
+ 729
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "image",
110
+ "img_path": "images/66aadb7317710be4782276f77e4c272051331bb7f28a01894765c828a450b41a.jpg",
111
+ "image_caption": [
112
+ "Figure 2: A brief taxonomy of learning-based control methods. In our scenario, we avoid online data collection, specifically from the policy we seek to imitate. We structure our imitation learner with a model to make it flexible to new tasks at test time. We compare against other offline approaches (front face). "
113
+ ],
114
+ "image_footnote": [],
115
+ "bbox": [
116
+ 504,
117
+ 392,
118
+ 820,
119
+ 592
120
+ ],
121
+ "page_idx": 1
122
+ },
123
+ {
124
+ "type": "text",
125
+ "text": "Fig. 1). A high-level route planner provides navigational goals, which our model uses to automatically generate plans that obey the rules of the road, inferred entirely from data. In contrast to IL, our method produces an interpretable distribution over trajectories and can follow a variety of goals without additional training. In contrast to MBRL, our method generates human-like behaviors without additional data collection or learning. In our experiments, our approach substantially outperforms both MBRL and IL: it can efficiently learn near-perfect driving through the static-world CARLA simulator from just 7,000 trajectories obtained from 19 hours of driving. We also show that our model can flexibly incorporate and achieve goals not seen during training, and is robust to errors in the high-level navigation system, even when the high-level goals are on the wrong side of the road. Videos of our results are available.1 ",
126
+ "bbox": [
127
+ 173,
128
+ 729,
129
+ 825,
130
+ 867
131
+ ],
132
+ "page_idx": 1
133
+ },
134
+ {
135
+ "type": "text",
136
+ "text": "2 Deep Imitative Models ",
137
+ "text_level": 1,
138
+ "bbox": [
139
+ 174,
140
+ 101,
141
+ 395,
142
+ 118
143
+ ],
144
+ "page_idx": 2
145
+ },
146
+ {
147
+ "type": "text",
148
+ "text": "To learn robot dynamics that are not only possible, but preferred, we construct a model of expert behavior. We fit a probabilistic model of trajectories, $q$ , to samples of expert trajectories drawn from an unknown distribution $p$ . A probabilistic model is necessary because expert behavior is often stochastic and multimodal: e.g., choosing to turn either left or right at an intersection are both common decisions. Because an expert’s behavior depends on their perception, we condition our model, $q$ , on observations $\\phi$ . In our application, $\\phi$ includes LIDAR features $\\chi \\in \\mathbb { R } ^ { H \\times W \\times C }$ and a small window of previous positions $s _ { - \\tau : 0 } = \\{ s _ { - \\tau } , \\ldots , s _ { 0 } \\}$ , such that $\\phi = \\{ \\chi , s _ { - \\tau : 0 } \\}$ . ",
149
+ "bbox": [
150
+ 173,
151
+ 132,
152
+ 825,
153
+ 231
154
+ ],
155
+ "page_idx": 2
156
+ },
157
+ {
158
+ "type": "text",
159
+ "text": "By training $q { \\bigl ( } s _ { 1 : T } | \\phi { \\bigr ) }$ to forecast expert trajectories with high likelihood, we model the sceneconditioned expert dynamics, which can score trajectories by how likely they are to come from the expert. At test time, $q { \\bigl ( } s _ { 1 : T } | \\phi { \\bigr ) }$ serves as a learned prior over the set of undirected expert trajectories. To execute samples from this distribution is to imitate an expert driver in an undirected fashion. We first describe how we use the generic form of this model to plan, and then discuss our particular implementation in Section 2.2. ",
160
+ "bbox": [
161
+ 174,
162
+ 236,
163
+ 825,
164
+ 320
165
+ ],
166
+ "page_idx": 2
167
+ },
168
+ {
169
+ "type": "text",
170
+ "text": "2.1 Imitative Planning to Goals ",
171
+ "text_level": 1,
172
+ "bbox": [
173
+ 174,
174
+ 333,
175
+ 403,
176
+ 349
177
+ ],
178
+ "page_idx": 2
179
+ },
180
+ {
181
+ "type": "text",
182
+ "text": "Besides simply imitating the expert demonstrations, we wish to direct our agent to desired goals at test time, and have the agent reason automatically about the mid-level details necessary to achieve these goals. In general, we can define a driving task by a set of goal variables $\\mathcal { G }$ . We will instantiate examples of $\\mathcal { G }$ concretely after the generic goal planning derivation. The probability of a plan conditioned on the goal $\\mathcal { G }$ is given as posterior distribution $\\overline { { p } } ( s _ { 1 : T } | \\mathcal { G } , \\phi )$ . Planning a trajectory under this posterior corresponds to MAP inference with prior $q ( s _ { 1 : T } | \\phi )$ and likelihood $p ( \\mathcal { G } | s _ { 1 : T } , \\phi )$ . We briefly derive the MAP inference result starting from the posterior maximization objective, which uses the learned Imitative Model to generate plans that achieve abstract goals: ",
183
+ "bbox": [
184
+ 174,
185
+ 361,
186
+ 825,
187
+ 473
188
+ ],
189
+ "page_idx": 2
190
+ },
191
+ {
192
+ "type": "equation",
193
+ "img_path": "images/38f2d7d4140794a21f67c6d975107817a30ff4c24ea36eb5ec30000c9de1b126.jpg",
194
+ "text": "$$\n\\begin{array} { r l } & { \\underset { s _ { 1 : T } } { \\operatorname* { m a x } } \\mathcal { L } ( s _ { 1 : T } , \\mathcal { G } , \\phi ) = \\underset { s _ { 1 : T } } { \\operatorname* { m a x } } \\log p ( s _ { 1 : T } | \\mathcal { G } , \\phi ) } \\\\ & { \\quad \\quad \\quad \\quad = \\underset { s _ { 1 : T } } { \\operatorname* { m a x } } \\log q ( s _ { 1 : T } | \\phi ) + \\log p ( \\mathcal { G } | s _ { 1 : T } , \\phi ) - \\log p ( \\mathcal { G } | \\phi ) } \\\\ & { \\quad \\quad \\quad = \\underset { s _ { 1 : T } } { \\operatorname* { m a x } } \\log \\underset { \\mathrm { i m i t a t i o n ~ p r i o r } } { \\underbrace { q ( s _ { 1 : T } | \\phi ) } } + \\log \\underset { \\mathrm { g o a l ~ i k e l i h o o d } } { \\underbrace { p ( \\mathcal { G } | s _ { 1 : T } , \\phi ) } } . } \\end{array}\n$$",
195
+ "text_format": "latex",
196
+ "bbox": [
197
+ 258,
198
+ 481,
199
+ 740,
200
+ 570
201
+ ],
202
+ "page_idx": 2
203
+ },
204
+ {
205
+ "type": "text",
206
+ "text": "Waypoint planning: One example of a concrete inference task is to plan towards a specific goal location, or waypoint. We can achieve this task by using a tightly-distributed goal likelihood function centered at the user’s desired final state. This effectively treats a desired goal location, $g _ { T }$ , as if it were a noisy observation of a future state, with likelihood $p ( \\mathcal { G } | s _ { 1 : T } , \\phi ) \\ = \\ \\mathcal { N } ( g _ { T } | s _ { T } , \\epsilon I )$ . The resulting inference corresponds to planning the trajectory $s _ { 1 : T }$ to a likely point under the distribution $\\mathcal { N } ( g _ { T } | \\boldsymbol { s } _ { T } , \\epsilon I )$ . We can also plan to successive states with $\\mathcal { G } = ( g _ { T - K } , \\dots , g _ { T } )$ with goal likelihood $\\begin{array} { r } { p ( \\ddot { \\mathcal { G } } | s _ { 1 : T } , \\phi ) = \\prod _ { k = T - K } ^ { T } \\dot { \\mathcal { N } } ( g _ { k } | s _ { k } , \\epsilon I ) } \\end{array}$ if the user (or program) wishes to specify the desired end velocity or acceleration when reached the final goal $g _ { T }$ location (Fig. 3). Alternatively, a route planner may propose a set of waypoints with the intention that the robot should reach any one of them. This is possible using a Gaussian mixture likelihood and can be useful if some of those waypoints along a route are inadvertently located at obstacles or potholes (Fig. 4). ",
207
+ "bbox": [
208
+ 173,
209
+ 583,
210
+ 825,
211
+ 737
212
+ ],
213
+ "page_idx": 2
214
+ },
215
+ {
216
+ "type": "text",
217
+ "text": "Waypoint planning leverages the advantage of conditional imitation learning: a user or program can communicate where they desire the agent to go without knowing the best and safest actions. The planning-as-inference procedure produces paths similar to how an expert would acted to reach the given goal. In contrast to black-box, model-free conditional imitation learning that regresses controls, our method produces an explicit plan, accompanied by an explicit score of the plan’s quality. This provides both interpretability and an estimate of the feasibility of the plan. ",
218
+ "bbox": [
219
+ 174,
220
+ 743,
221
+ 825,
222
+ 827
223
+ ],
224
+ "page_idx": 2
225
+ },
226
+ {
227
+ "type": "text",
228
+ "text": "Costed planning: If the user desires more control over the plan, our model has the additional flexibility to accept arbitrary user-specified costs $c$ at test time. For example, we may have updated knowledge of new hazards at test time, such as a given map of potholes (Fig. 4) or a predicted cost map. Given costs $c ( s _ { i } | \\phi )$ , this can be treated by including an optimality variable $\\mathcal { C }$ in $\\mathcal { G }$ , where $\\begin{array} { r } { p ( \\mathcal { C } = 1 | \\boldsymbol { s } _ { 1 : T } , \\phi ) \\propto \\prod _ { t = 1 } ^ { T } \\exp { - c ( s _ { t } | \\phi ) } } \\end{array}$ (Todorov, 2007; Levine, 2018). The goal log-likelihood is $\\begin{array} { r } { \\log p ( \\{ g _ { T } , \\mathcal { C } = 1 \\} | s _ { 1 : T } , \\phi ) = \\log \\mathcal { N } ( g _ { T } | s _ { T } , \\epsilon I ) + \\sum _ { t = 1 } ^ { N } - c ( s _ { t } | \\phi ) . } \\end{array}$ . ",
229
+ "bbox": [
230
+ 173,
231
+ 833,
232
+ 825,
233
+ 926
234
+ ],
235
+ "page_idx": 2
236
+ },
237
+ {
238
+ "type": "image",
239
+ "img_path": "images/8942264762506d5cfa7b072d1091a912640b78602ddb5e82f803e1b440c62261.jpg",
240
+ "image_caption": [
241
+ "Figure 3: Planning to a sequence of goals (here, 10) allows for more control over the inferred paths. "
242
+ ],
243
+ "image_footnote": [],
244
+ "bbox": [
245
+ 174,
246
+ 99,
247
+ 823,
248
+ 223
249
+ ],
250
+ "page_idx": 3
251
+ },
252
+ {
253
+ "type": "image",
254
+ "img_path": "images/acec72bdeaa64fea7abc6084c6870ebb5693e62b51ed5f3690ea115d1e88e8c0.jpg",
255
+ "image_caption": [
256
+ "Figure 4: Imitative planning to goals subject to a cost at test time. The cost bumps corresponds to simulated “potholes,” which the imitative planner is tasked with avoiding. The imitative planner generates and prefers routes that curve around the potholes, stay on the road, and respect intersections. Demonstrations of this behavior were never observed by our model. "
257
+ ],
258
+ "image_footnote": [],
259
+ "bbox": [
260
+ 174,
261
+ 267,
262
+ 825,
263
+ 516
264
+ ],
265
+ "page_idx": 3
266
+ },
267
+ {
268
+ "type": "text",
269
+ "text": "2.2 Model Implementation ",
270
+ "text_level": 1,
271
+ "bbox": [
272
+ 174,
273
+ 614,
274
+ 372,
275
+ 630
276
+ ],
277
+ "page_idx": 3
278
+ },
279
+ {
280
+ "type": "text",
281
+ "text": "The primary structural requirement of an Imitative Model is the ability to compute $q { \\bigl ( } s _ { 1 : T } | \\phi { \\bigr ) }$ . The ability to also compute gradients $\\nabla _ { s _ { 1 : T } } q \\left( s _ { 1 : T } | \\phi \\right)$ enables gradient-based optimization for planning. Finally, the quality and efficiency of learning are important. One deep generative model for Imitation Learning is the Reparameterized Pushforward Policy (R2P2) (Rhinehart et al., 2018). R2P2’s use of pushforward distributions (McCann et al., 1995), employed in other invertible generative models (Rezende & Mohamed, 2015; Dinh et al., 2016) allows it to efficiently minimize both false positives and false negatives (type I and type II errors) (Neyman & Pearson, 1933). Optimization of $K L ( p , q )$ , which penalizes mode loss (false negatives), is straightforward with R2P2, as it can evaluate $q ( s _ { 1 : T } | \\phi )$ . Here, $p$ is the sampleable, but unknown, distribution of expert behavior. Reducing false positives corresponds to minimizing $K L ( q , p )$ , which penalizes $q$ heavily for generating bad ",
282
+ "bbox": [
283
+ 173,
284
+ 642,
285
+ 825,
286
+ 784
287
+ ],
288
+ "page_idx": 3
289
+ },
290
+ {
291
+ "type": "text",
292
+ "text": "Algorithm 1 IMITATIVEPLAN(qθ, G, φ) ",
293
+ "text_level": 1,
294
+ "bbox": [
295
+ 176,
296
+ 813,
297
+ 444,
298
+ 829
299
+ ],
300
+ "page_idx": 3
301
+ },
302
+ {
303
+ "type": "table",
304
+ "img_path": "images/30df4fa5086891436832226a300379b8cca35f8ee7e4318daa5aaabe7cc5c69a.jpg",
305
+ "table_caption": [],
306
+ "table_footnote": [],
307
+ "table_body": "<table><tr><td>1: Define MAP objective L with qe according to Eq. 1 2:Initialize S1:T</td><td>&gt; Incorporate the Imitative Model</td></tr><tr><td></td><td>&gt;Approx.MAP inference</td></tr><tr><td>3: while not converged do 4: S1:T ← S1:T +Vs1:TL(S1:T,9,Φ)</td><td></td></tr><tr><td></td><td></td></tr><tr><td>5: end while</td><td></td></tr><tr><td>6: return S1:T</td><td></td></tr></table>",
308
+ "bbox": [
309
+ 179,
310
+ 832,
311
+ 825,
312
+ 920
313
+ ],
314
+ "page_idx": 3
315
+ },
316
+ {
317
+ "type": "text",
318
+ "text": "samples under $p$ . As $p$ is unknown, R2P2 first uses a spatial cost model $\\tilde { p }$ to approximate $p$ , which we can also use as $c$ in our planner. The learning objective is $K L ( p , q ) + \\beta K L ( q , \\tilde { p } )$ . ",
319
+ "bbox": [
320
+ 171,
321
+ 103,
322
+ 825,
323
+ 133
324
+ ],
325
+ "page_idx": 4
326
+ },
327
+ {
328
+ "type": "text",
329
+ "text": "In R2P2, $q { \\bigl ( } s _ { 1 : T } | \\phi { \\bigr ) }$ is induced by an invertible, differentiable function: $\\overset { \\cdot } { f } ( z ; \\phi ) : \\mathbb { R } ^ { 2 T } \\overset { \\cdot } { \\mapsto } \\mathbb { R } ^ { 2 T }$ , which warps latent samples from a base distribution $z \\sim q _ { 0 } =$ $\\mathcal { N } ( 0 , I _ { 2 T \\times 2 T } )$ to the output space over $s _ { 1 : T }$ . $f$ embeds the evolution of learned discrete-time stochastic dynamics; each state is given by: ",
330
+ "bbox": [
331
+ 173,
332
+ 138,
333
+ 549,
334
+ 223
335
+ ],
336
+ "page_idx": 4
337
+ },
338
+ {
339
+ "type": "equation",
340
+ "img_path": "images/a2f6678d9ea94087d9f439cb804b08907d70145d2ba0babee9fb1896c8b88a28.jpg",
341
+ "text": "$$\n\\begin{array} { r } { s _ { t } = \\underbrace { s _ { t - 1 } + \\left( s _ { t - 1 } - s _ { t - 2 } \\right) + m _ { t } \\left( s _ { 1 : t - 1 } , \\phi \\right) } _ { \\mu _ { t } \\left( s _ { 1 : t - 1 } , \\phi \\right) } + \\sigma _ { t } \\left( s _ { 1 : t - 1 } , \\phi \\right) z _ { t } . } \\end{array}\n$$",
342
+ "text_format": "latex",
343
+ "bbox": [
344
+ 204,
345
+ 229,
346
+ 517,
347
+ 262
348
+ ],
349
+ "page_idx": 4
350
+ },
351
+ {
352
+ "type": "image",
353
+ "img_path": "images/080e03c77e310e5a0c044087f1910448a4ce59fa3d7b201e5a5e863c18e6fac5.jpg",
354
+ "image_caption": [
355
+ "Figure 5: Architecture of $m _ { t }$ and $\\sigma _ { t }$ , modified from (Rhinehart et al., 2018) with permission. "
356
+ ],
357
+ "image_footnote": [],
358
+ "bbox": [
359
+ 562,
360
+ 154,
361
+ 823,
362
+ 238
363
+ ],
364
+ "page_idx": 4
365
+ },
366
+ {
367
+ "type": "text",
368
+ "text": "The $m _ { t } ~ \\in ~ \\mathbb { R } ^ { 2 }$ and $\\sigma _ { t } ~ \\in ~ \\mathbb { R } ^ { 2 \\times 2 }$ are computed by expressive, nonlinear neural networks that observe previous states and LIDAR input. The resulting trajectory distribution is complex and multimodal. We modified the RNN method described by Rhinehart et al. (2018) and used LIDAR features $\\chi = \\mathbb { R } ^ { 2 0 0 \\times 2 0 0 \\times 2 }$ , with $\\chi _ { i j }$ representing a 2-bin histogram of points below and above the ground in $0 . 5 \\mathrm { m } ^ { 2 }$ cells (Fig 5). We used $T = 4 0$ trajectories at $\\mathrm { 5 H z }$ (8 seconds of prediction or planning), $\\tau = 1 9$ . ",
369
+ "bbox": [
370
+ 173,
371
+ 267,
372
+ 549,
373
+ 310
374
+ ],
375
+ "page_idx": 4
376
+ },
377
+ {
378
+ "type": "text",
379
+ "text": "",
380
+ "bbox": [
381
+ 173,
382
+ 310,
383
+ 825,
384
+ 367
385
+ ],
386
+ "page_idx": 4
387
+ },
388
+ {
389
+ "type": "text",
390
+ "text": "2.3 Imitative Driving ",
391
+ "text_level": 1,
392
+ "bbox": [
393
+ 174,
394
+ 378,
395
+ 333,
396
+ 393
397
+ ],
398
+ "page_idx": 4
399
+ },
400
+ {
401
+ "type": "text",
402
+ "text": "At test time, we use three layers of spatial abstractions to plan to a faraway destination, common to model-based (not end-to-end) autonomous vehicle setups: coarse route planning over a road map, path planning within the observable space, and feedback control to follow the planned path (Paden et al., 2016; Schwarting et al., 2018). For instance, a route planner based on a conventional GPSbased navigation system might output waypoints at a resolution of 20 meters – roughly indicating the direction of travel, but not accounting for the rules of the road or obstacles. The waypoints are treated as goals and passed to the Imitative Planner (Algorithm 1), which then generates a path chosen according to the optimization in Eq. 1. These plans are fed to a low-level controller (we use a PID-controller) that follows the plan. In Fig. 6 we illustrate how we use our model in our application. ",
403
+ "bbox": [
404
+ 173,
405
+ 406,
406
+ 825,
407
+ 545
408
+ ],
409
+ "page_idx": 4
410
+ },
411
+ {
412
+ "type": "image",
413
+ "img_path": "images/8769304abad4282e6bfcbea15c8040cc3910da793abff6892029e8ee7f1ea724.jpg",
414
+ "image_caption": [
415
+ "Figure 6: Illustration of our method applied to autonomous driving. Our method trains an Imitative Model from a dataset of expert examples. After training, the model is repurposed as an Imitative Planner. At test time, a route planner provides waypoints to the Imitative Planner, which computes expert-like paths to each goal. The best plan chosen according to the planning objective, and provided to a low-level PID-controller in order to produce steering and throttle actions. "
416
+ ],
417
+ "image_footnote": [],
418
+ "bbox": [
419
+ 228,
420
+ 568,
421
+ 774,
422
+ 837
423
+ ],
424
+ "page_idx": 4
425
+ },
426
+ {
427
+ "type": "text",
428
+ "text": "3 Related Work ",
429
+ "text_level": 1,
430
+ "bbox": [
431
+ 174,
432
+ 101,
433
+ 321,
434
+ 118
435
+ ],
436
+ "page_idx": 5
437
+ },
438
+ {
439
+ "type": "text",
440
+ "text": "Previous work has explored conditional IL for autonomous driving. Two model-free approaches were proposed by Codevilla et al. (2018), to map images to actions. The first uses three network “heads”, each head only trained on an expert’s left/straight/right turn maneuvers. The robot is directed by a route planner that chooses the desired head. Their second method input the goal location into the network, however, this did not perform as well. While model-free conditional IL can be effective given a discrete set of user directives, our model-based conditional IL has several advantages. Our model has flexibility to handle more complex directives post training, e.g. avoiding hazardous potholes (Fig. 4) or other costs, the ability to rank plans and goals by its objective, and interpretability: it can generate entire planned and unplanned (undirected) trajectories. ",
441
+ "bbox": [
442
+ 174,
443
+ 132,
444
+ 825,
445
+ 258
446
+ ],
447
+ "page_idx": 5
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "Work by Liang et al. (2018) also uses multi-headed model-free conditional imitation learning to “warm start” a DDPG driving algorithm (Lillicrap et al., 2015). While warm starting hastens DDPG training, any subsequent DDPG post fine-tuning is inherently trial-and-error based, without guarantees of safety, and may crash during this learning phase. By contrast, our method never executes unlikely transitions w.r.t. expert behavior at training time nor at test time. Our method can also stop the car if no plan reaches a minimum threshold, indicating none are likely safe to execute. ",
452
+ "bbox": [
453
+ 174,
454
+ 265,
455
+ 825,
456
+ 348
457
+ ],
458
+ "page_idx": 5
459
+ },
460
+ {
461
+ "type": "text",
462
+ "text": "While our target setting is offline data collection, online imitation learning is an active area of research in the case of hybrid IL-RL (Ross & Bagnell, 2014; Sun et al., 2018) and “safe” IL (Sun et al., 2017; Menda et al., 2017; Zhang & Cho, 2017). Although our work does not consider multiagent environments, several methods predict the behavior of other vehicles or pedestrians. Typically this involves recurrent neural networks combined with Gaussian density layers or generative models based on some context inputs such as LIDAR, images, or known positions of external agents (Lee et al., 2017; Schmerling et al., 2018; Zyner et al., 2018; Gupta et al., 2018; Ma et al., 2017). However, none of these methods can evaluate the likelihood of trajectories or repurpose their model to perform other inference tasks. Other methods include inverse reinforcement learning to fit a probabilistic reward model to human demonstrations using the principle of maximum entropy (Ziebart et al., 2008; Sadigh et al., 2016; Rhinehart & Kitani, 2017). ",
463
+ "bbox": [
464
+ 174,
465
+ 354,
466
+ 825,
467
+ 507
468
+ ],
469
+ "page_idx": 5
470
+ },
471
+ {
472
+ "type": "text",
473
+ "text": "4 Experiments ",
474
+ "text_level": 1,
475
+ "bbox": [
476
+ 174,
477
+ 523,
478
+ 312,
479
+ 541
480
+ ],
481
+ "page_idx": 5
482
+ },
483
+ {
484
+ "type": "text",
485
+ "text": "We evaluate our method using the CARLA urban driving simulator (Dosovitskiy et al., 2017). Each test episode begins with the vehicle randomly positioned on a road in the Town01 or Town02 maps. The task is to drive to a goal location, chosen to be the furthest road location from the vehicle’s initial position. As shown in Fig. 6, we use three layers of spatial abstractions to plan to the goal location, common to model-based (not end-to-end) autonomous vehicle setups: coarse route planning over a road map, path planning within the observable space, and feedback control to follow the planned path (Paden et al., 2016; Schwarting et al., 2018). First, we compute a route to the goal location using $\\mathbf { A } ^ { * }$ given knowledge of the road graph. Second, we set waypoints along the route no closer than $2 0 \\mathrm { m }$ of the vehicle at any time to direct the vehicle. Finally, we use a PID-controller to compute the vehicle steering value. The PID-controller was tuned to steer the vehicle towards a setpoint (target) 5 meters away along the planned path. ",
486
+ "bbox": [
487
+ 174,
488
+ 554,
489
+ 825,
490
+ 707
491
+ ],
492
+ "page_idx": 5
493
+ },
494
+ {
495
+ "type": "text",
496
+ "text": "We consider four metrics for this task: 1) Success rate in driving to the goal location without any collisions. 2) Proportion of time spent driving in the correct lane. 3) Frequency of crashes into obstacles. 4) Passenger comfort, by comparing the distribution of accelerations (and higher-order terms) between each method. To contrast the benefits of our method against existing approaches, we compare against several baselines that all receive the same inputs and training data as our method. Since our approach bridges model-free IL and MBRL, we include an IL baseline algorithm, and a MBRL baseline algorithm. ",
497
+ "bbox": [
498
+ 174,
499
+ 714,
500
+ 825,
501
+ 811
502
+ ],
503
+ "page_idx": 5
504
+ },
505
+ {
506
+ "type": "text",
507
+ "text": "PID control: The PID baseline uses the PID-controller to follow the high-level waypoints along the route. This corresponds to removing the middle layer of autonomous vehicle decision abstraction, which serves as a baseline for the other methods. The PID controller is effective when the setpoint is several meters away, but fails when the setpoint is further away (i.e. at $2 0 \\mathrm { m }$ ), causing the vehicle to cut corners at intersections. ",
508
+ "bbox": [
509
+ 174,
510
+ 818,
511
+ 825,
512
+ 888
513
+ ],
514
+ "page_idx": 5
515
+ },
516
+ {
517
+ "type": "text",
518
+ "text": "Conditional Imitation Learning: We designed an $\\mathrm { I L }$ baseline to control the vehicle. A common straightforward approach to IL is behavior-cloning: learning to predict the actions taken by a demonstrator (Pomerleau, 1989; Bojarski et al., 2016; Mahler & Goldberg, 2017; Codevilla et al., 2018). Our setting is that of goal-conditioned IL: in order to achieve different behaviors, the imitator is tasked with generating controls after observing a target high-level waypoint and $\\phi$ . We designed two baselines: one with the branched architecture of Codevilla et al. (2018), where actions are predicted based on left/straight/right “commands” derived from the waypoints, and other that predicts the setpoint for the PID-controller. Each receives the same $\\phi$ and is trained with the same set of trajectories as our main method. We found the latter method very effective for stable control on straightaways. When the model encounters corners, however, prediction is more difficult, as in order to successfully avoid the curbs, the model must implicitly plan a safe path. In the latter method, we used a network architecture nearly identical to our approach’s.. ",
519
+ "bbox": [
520
+ 174,
521
+ 895,
522
+ 823,
523
+ 924
524
+ ],
525
+ "page_idx": 5
526
+ },
527
+ {
528
+ "type": "text",
529
+ "text": "",
530
+ "bbox": [
531
+ 173,
532
+ 103,
533
+ 825,
534
+ 242
535
+ ],
536
+ "page_idx": 6
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "Model-based RL: To compare against a purely model-based reinforcement learning algorithm, we propose a model-predictive control baseline. This baseline first learns a forwards dynamics model $f : \\left( s _ { t - 3 } , s _ { t - 2 } , s _ { t - 1 } , s _ { t } , a _ { t } \\right) \\to s _ { t + 1 }$ given observed expert data $\\cdot { a } _ { t }$ are recorded vehicle actions). We use an MLP with two hidden layers, each 100 units. Note that our forwards dynamics model does not imitate the expert preferred actions, but only models what is physically possible. Together with the same LIDAR map $\\chi$ our method uses to locate obstacles, this baseline uses its dynamics model to plan a reachability tree (LaValle, 2006) through the free-space to the waypoint while avoiding obstacles. We plan forwards over 20 time steps using a breadth-first search search over CARLA steering angle $\\{ - 0 . 3 , - 0 . 1 , 0 . , 0 . 1 , 0 . 3 \\}$ , noting valid steering angles are normalized to $[ - 1 , 1 ]$ , with constant throttle at 0.5, noting the valid throttle range is [0, 1]. Our search expands each state node by the available actions and retains the 50 closest nodes to the waypoint. The planned trajectory efficiently reaches the waypoint, and can successfully plan around perceived obstacles to avoid getting stuck. To convert the LIDAR images into obstacle maps, we expanded all obstacles by the approximate radius of the car, 1.5 meters. ",
541
+ "bbox": [
542
+ 173,
543
+ 250,
544
+ 825,
545
+ 444
546
+ ],
547
+ "page_idx": 6
548
+ },
549
+ {
550
+ "type": "text",
551
+ "text": "Performance results that compare our methods against baselines according to multiple metrics are includes in Table 1. With the exception of the success rate metric, lower numbers are better. We define success rate as the proportion of episodes where the vehicles navigated across the road map to a goal location on the other side without any collisions. In our experiments we do not include any other drivers or pedestrians, so a collision is w.r.t. a stationary obstacle. Collision impulse (in $\\mathrm { { N \\cdot s } ) }$ is the average cumulative collision intensities over episodes. “Wrong lane” and “Off road” percentage of the vehicle invading other lanes or offroad (averaged over time and episodes). While safety metrics are arguably the most important metric, passenger comfort is also relevant. Passenger comfort can be ambiguous to define, so we simply record the second to sixth derivatives of the position vector with respect to time, respectively termed acceleration, jerk, snap, crackle, and pop. In Table 1 we note the 99th percentile of each statistic given all data collected per path planning method. Generally speaking, lower numbers correspond to a smoother driving experience. ",
552
+ "bbox": [
553
+ 173,
554
+ 450,
555
+ 825,
556
+ 617
557
+ ],
558
+ "page_idx": 6
559
+ },
560
+ {
561
+ "type": "table",
562
+ "img_path": "images/f26ed22d007591c4a869b4f207d4ae3c9fae96aed3cc7e2ff8219fbc88884fc6.jpg",
563
+ "table_caption": [
564
+ "Table 1: We evaluate different path planning methods based on two CARLA environments: Town01, which each method was trained on; and Town02: a test environment. "
565
+ ],
566
+ "table_footnote": [],
567
+ "table_body": "<table><tr><td>Town01</td><td>Successes</td><td>Collision Impulse</td><td>Wrong lane</td><td>Off road</td><td>Accel</td><td>Jerk</td><td>Snap</td><td>Crackle</td><td>Pop</td></tr><tr><td>PID Controller</td><td>0/10</td><td>8.92</td><td>18.6%</td><td>12.1%</td><td>0.153</td><td>0.925</td><td>9.19</td><td>85.8</td><td>785</td></tr><tr><td>Cond. IL,PID Controller</td><td>5/10</td><td>1.28</td><td>0.2%</td><td>0.32%</td><td>0.060</td><td>0.313</td><td>2.52</td><td>17.4</td><td>169</td></tr><tr><td>Cond.IL,Learned Actions (Codevilla et al.,2018)</td><td>7/10</td><td>0.96</td><td>9.8%</td><td>1.64%</td><td>0.203</td><td>0.674</td><td>5.52</td><td>46.9</td><td>438</td></tr><tr><td>Model-Based RL (LaValle,2006)</td><td>10/10</td><td>0.00</td><td>9.3%</td><td>0.82%</td><td>0.062</td><td>0.353</td><td>2.69</td><td>26.1</td><td>261</td></tr><tr><td>Ourmethod</td><td>10/10</td><td>0.00</td><td>0.0%</td><td>0.00%</td><td>0.054</td><td>0.256</td><td>1.50</td><td>13.8</td><td>136</td></tr><tr><td>Town02</td><td>Successes</td><td>Collision Impulse</td><td>Wrong lane</td><td>Off road</td><td>Accel</td><td>Jerk</td><td>Snap</td><td>Crackle</td><td>Pop</td></tr><tr><td>PID Controller</td><td>2/10</td><td>12.5</td><td>5.0%</td><td>4.99%</td><td>0.204</td><td>1.040</td><td>6.77</td><td>59.1</td><td>611</td></tr><tr><td>Cond. IL, PID Controller</td><td>2/10</td><td>8.87</td><td>2.2%</td><td>1.03%</td><td>0.319</td><td>0.798</td><td>3.66</td><td>33.3</td><td>319</td></tr><tr><td>Cond. IL,Learned Actions (Codevilla et al.,2018)</td><td>3/10</td><td>1.23</td><td>21.6%</td><td>3.06%</td><td>0.368</td><td>1.234</td><td>8.13</td><td>91.1</td><td>845</td></tr><tr><td>Model-Based RL (LaValle,2006)</td><td>7/10</td><td>2.56</td><td>12.0%</td><td>3.53%</td><td>0.134</td><td>0.967</td><td>6.06</td><td>63.1</td><td>575</td></tr><tr><td>Our method</td><td>8/10</td><td>0.41</td><td>0.4%</td><td>0.27%</td><td>0.054</td><td>0.613</td><td>2.64</td><td>21.4</td><td>289</td></tr></table>",
568
+ "bbox": [
569
+ 176,
570
+ 679,
571
+ 823,
572
+ 803
573
+ ],
574
+ "page_idx": 6
575
+ },
576
+ {
577
+ "type": "text",
578
+ "text": "The poor performance of the PID baseline indicates that the high-level waypoints do not communicate sufficient information about the correct driving direction. Imitation learning achieves better levels of comfort than MBRL, but exhibits substantially worse generalization from the training data, since it does not reason about the sequential structure in the task. Model-based RL succeeds on most of the trials in the training environment, but exhibits worse generalization. Notably, it also scores much worse than IL in terms of staying in the right lane and maintaining comfort, which is consistent with our hypothesis: it is able to achieve the desired goals, but does not capture the behaviors in the data. Our method performs the best under all metrics, far exceeding the success and comfort metrics of imitation learning, and far exceeding the lane-obeyance and comfort metrics of MBRL. ",
579
+ "bbox": [
580
+ 173,
581
+ 825,
582
+ 823,
583
+ 924
584
+ ],
585
+ "page_idx": 6
586
+ },
587
+ {
588
+ "type": "table",
589
+ "img_path": "images/a6850d6c299b3899451b1ffcf4faf51585af6e7b8714580060311b7a4784d1c6.jpg",
590
+ "table_caption": [
591
+ "Table 2: Incorporating a pothole cost enables our method to avoid potholes "
592
+ ],
593
+ "table_footnote": [],
594
+ "table_body": "<table><tr><td>Approach</td><td>Successes</td><td>Pothole hits</td><td>Wrong lane</td><td>Off road</td></tr><tr><td>Our method without pothole cost, Town 0 1</td><td>9/10</td><td>177/230</td><td>0.06%</td><td>0.00%</td></tr><tr><td>Our method with pothole cost, Town 0 1</td><td>9/10</td><td>10/230</td><td>1.53%</td><td>0.06%</td></tr><tr><td>Our method without pothole cost, Town 0 2</td><td>8/10</td><td>82/154</td><td>1.03%</td><td>0.30%</td></tr><tr><td>Our method with pothole cost, Town 0 2</td><td>7/10</td><td>35/154</td><td>1.53%</td><td>0.11%</td></tr></table>",
595
+ "bbox": [
596
+ 176,
597
+ 127,
598
+ 820,
599
+ 217
600
+ ],
601
+ "page_idx": 7
602
+ },
603
+ {
604
+ "type": "text",
605
+ "text": "",
606
+ "bbox": [
607
+ 174,
608
+ 247,
609
+ 823,
610
+ 275
611
+ ],
612
+ "page_idx": 7
613
+ },
614
+ {
615
+ "type": "text",
616
+ "text": "4.1 Avoiding novel obstacles at test-time ",
617
+ "text_level": 1,
618
+ "bbox": [
619
+ 174,
620
+ 290,
621
+ 464,
622
+ 304
623
+ ],
624
+ "page_idx": 7
625
+ },
626
+ {
627
+ "type": "image",
628
+ "img_path": "images/b18915d7c92f4926c9334d0a4523021130004bbba687a64eb928ee2eae27714f.jpg",
629
+ "image_caption": [
630
+ "Figure 7: Test-time pothole planning. The preferred plans steer left around the simulated potholes. "
631
+ ],
632
+ "image_footnote": [],
633
+ "bbox": [
634
+ 207,
635
+ 329,
636
+ 794,
637
+ 441
638
+ ],
639
+ "page_idx": 7
640
+ },
641
+ {
642
+ "type": "text",
643
+ "text": "To further illustrate the capability of our method to incorporate test-time costs, we designed a pothole collision experiment. We simulated $2 \\mathrm { m }$ -wide potholes in the environment by randomly inserting them in the cost map offset from each waypoint, distributed $\\mathcal { N } ( \\mu = [ - 1 5 \\mathrm { m } , 2 \\mathrm { m } ] , \\Sigma \\ \\bar { = }$ $\\mathrm { d i a g ( [ 1 , 0 . 0 1 ] ) } ,$ ), (i.e. the mean is centered on the right side of the lane $1 5 \\mathrm { m }$ before each waypoint). We ran our method that incorporates a test-time cost map of the simulated potholes, and compared to our method that did not incorporate the cost map (and thus had no incentive to avoid potholes). In addition to the other metrics, we recorded the number of collisions with potholes. In Table 2, we see that our method with cost incorporated achieved nearly perfect pothole avoidance, while still avoiding collisions with the environment. To do so, it drove closer to the centerline, and occasionally dipped into the opposite lane. Our model internalized obstacle avoidance by staying on the road, and demonstrated its flexibility to obstacles not observed during training. Fig. 7 shows an example of this behavior. ",
644
+ "bbox": [
645
+ 174,
646
+ 484,
647
+ 825,
648
+ 651
649
+ ],
650
+ "page_idx": 7
651
+ },
652
+ {
653
+ "type": "text",
654
+ "text": "4.2 Robustness to poor-quality waypoints ",
655
+ "text_level": 1,
656
+ "bbox": [
657
+ 176,
658
+ 666,
659
+ 473,
660
+ 681
661
+ ],
662
+ "page_idx": 7
663
+ },
664
+ {
665
+ "type": "text",
666
+ "text": "As another test of our model’s capability to stay in the distribution of demonstrated behavior, we designed a “decoy waypoints” experiment, in which half of the waypoints are highly perturbed versions of the other half, serving as distractions for our planner. The planner is tasked with planning to all of the waypoints under the Gaussian mixture likelihood. The perturbation distribution is $\\mathcal { N } ( 0 , \\sigma = 8 m )$ : each waypoint is perturbed with a standard deviation of 8 meters. We observed the imitative model to be surprisingly robust to decoy waypoints. Examples of this robustness are shown in Fig. 8. One failure mode of this approach is when decoy waypoints lie on a valid off-route path at intersections, which temporarily confuses the planner about the best route. In Table 3, we report the success rate and the mean number of planning rounds for successful and failed episodes. These numbers indicate our method can execute dozens to hundreds of planning rounds without decoy waypoints derailing it. ",
667
+ "bbox": [
668
+ 173,
669
+ 694,
670
+ 825,
671
+ 848
672
+ ],
673
+ "page_idx": 7
674
+ },
675
+ {
676
+ "type": "text",
677
+ "text": "We also designed an experiment to test our method under systemic bias in the route planner. Our method is provided waypoints on the wrong side of the road. We model this by increasing the goal likelihood observation noise $\\epsilon$ . After tuning the noise, we found our method to still be very effective at navigating, and report results in Table 3. This further illustrates our method’s tendency to stay near the distribution of expert behavior, as our expert never drove on the wrong side of the road. ",
678
+ "bbox": [
679
+ 174,
680
+ 854,
681
+ 823,
682
+ 924
683
+ ],
684
+ "page_idx": 7
685
+ },
686
+ {
687
+ "type": "table",
688
+ "img_path": "images/dd72abf6298798aedba785a386843b65819a02b75863a506db9051c84f27215b.jpg",
689
+ "table_caption": [
690
+ "Table 3: Our method is able to ignore decoy waypoints in most planning rounds: it can execute dozens to hundreds of planning rounds without decoy waypoints derailing it. Our method is also robust to waypoints on the wrong side of the road. "
691
+ ],
692
+ "table_footnote": [],
693
+ "table_body": "<table><tr><td>Approach</td><td>Successes</td><td>Avg. #plans until success</td><td>Avg. #plans until failure</td></tr><tr><td>Our method with 1/2 waypoints noisy, Town 01</td><td>4/10</td><td>157.6</td><td>37.9</td></tr><tr><td>Our method with 1/2 waypoints noisy,Town 02</td><td>5/10</td><td>78.0</td><td>32.1</td></tr><tr><td>Approach</td><td>Successes</td><td>Wrong lane</td><td>Off road</td></tr><tr><td>Our method with waypoints on wrong side,Town O1</td><td>10/10</td><td>0.338%</td><td>0.002%</td></tr><tr><td>Our method with waypoints on wrong side,Town 0 2</td><td>7/10</td><td>3.159%</td><td>0.044%</td></tr></table>",
694
+ "bbox": [
695
+ 174,
696
+ 154,
697
+ 821,
698
+ 246
699
+ ],
700
+ "page_idx": 8
701
+ },
702
+ {
703
+ "type": "text",
704
+ "text": "5 Discussion ",
705
+ "text_level": 1,
706
+ "bbox": [
707
+ 173,
708
+ 270,
709
+ 294,
710
+ 287
711
+ ],
712
+ "page_idx": 8
713
+ },
714
+ {
715
+ "type": "text",
716
+ "text": "We proposed a method that combines elements of imitation learning and model-based reinforcement learning (MBRL). Our method first learns what preferred behavior is by fitting a probabilistic model to the distribution of expert demonstrations at training time, and then plans paths to achieve userspecified goals at test time while maintaining high probability under this distribution. We demonstrated several advantages and applications of our algorithm in autonomous driving scenarios. In the context of MBRL, our method mitigates the distributional drift issue by explicitly preferring plans that stay close to the expert demonstration data. This implicitly allows our method to enforce basic safety properties: in contrast to MBRL, which requires negative examples to understand the potential for adverse outcomes (e.g., crashes), our method automatically avoids such outcomes specifically because they do not occur (or rarely occur) in the training data. In the context of imitation learning, our method provides a flexible, safe way to generalize to new goals by planning, compared to prior work on black-box, model-free conditional imitation learning. Our algorithm produces an explicit plan within the distribution of preferred behavior accompanied with a score: the former offers interpretability, and the latter provides an estimate of the feasibility of the plan. We believe our method is broadly applicable in settings where expert demonstrations are available, flexibility to new situations is demanded, and safety is critical. ",
717
+ "bbox": [
718
+ 173,
719
+ 301,
720
+ 825,
721
+ 522
722
+ ],
723
+ "page_idx": 8
724
+ },
725
+ {
726
+ "type": "image",
727
+ "img_path": "images/2edfc681ceeea6d8c52c822cdd18f914fcfeac2a96b43a0d59fa9975086f0c8c.jpg",
728
+ "image_caption": [
729
+ "Figure 8: Tolerating bad waypoints. The planner prefers waypoints in the distribution of expert behavior: on the road at a reasonable distance. Columns 1,2: Planning with $^ 1 / 2$ decoy waypoints. Columns 3,4: Planning with all waypoints on the wrong side of the road. "
730
+ ],
731
+ "image_footnote": [],
732
+ "bbox": [
733
+ 205,
734
+ 536,
735
+ 795,
736
+ 758
737
+ ],
738
+ "page_idx": 8
739
+ },
740
+ {
741
+ "type": "text",
742
+ "text": "References ",
743
+ "text_level": 1,
744
+ "bbox": [
745
+ 174,
746
+ 102,
747
+ 266,
748
+ 118
749
+ ],
750
+ "page_idx": 9
751
+ },
752
+ {
753
+ "type": "text",
754
+ "text": "Mariusz Bojarski, Davide Del Testa, Daniel Dworakowski, Bernhard Firner, Beat Flepp, Prasoon Goyal, Lawrence D Jackel, Mathew Monfort, Urs Muller, Jiakai Zhang, et al. End to end learning for self-driving cars. arXiv preprint arXiv:1604.07316, 2016. ",
755
+ "bbox": [
756
+ 176,
757
+ 131,
758
+ 823,
759
+ 174
760
+ ],
761
+ "page_idx": 9
762
+ },
763
+ {
764
+ "type": "text",
765
+ "text": "Felipe Codevilla, Matthias Miiller, Antonio Lopez, Vladlen Koltun, and Alexey Dosovitskiy. End- ´ to-end driving via conditional imitation learning. In International Conference on Robotics and Automation (ICRA), pp. 1–9. IEEE, 2018. ",
766
+ "bbox": [
767
+ 174,
768
+ 183,
769
+ 821,
770
+ 227
771
+ ],
772
+ "page_idx": 9
773
+ },
774
+ {
775
+ "type": "text",
776
+ "text": "Marc Deisenroth and Carl E Rasmussen. PILCO: A model-based and data-efficient approach to policy search. In International Conference on Machine Learning (ICML), pp. 465–472, 2011. ",
777
+ "bbox": [
778
+ 173,
779
+ 236,
780
+ 823,
781
+ 265
782
+ ],
783
+ "page_idx": 9
784
+ },
785
+ {
786
+ "type": "text",
787
+ "text": "Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using Real NVP. arXiv preprint arXiv:1605.08803, 2016. ",
788
+ "bbox": [
789
+ 174,
790
+ 275,
791
+ 823,
792
+ 304
793
+ ],
794
+ "page_idx": 9
795
+ },
796
+ {
797
+ "type": "text",
798
+ "text": "Alexey Dosovitskiy and Vladlen Koltun. Learning to act by predicting the future. arXiv preprint arXiv:1611.01779, 2016. ",
799
+ "bbox": [
800
+ 173,
801
+ 313,
802
+ 825,
803
+ 342
804
+ ],
805
+ "page_idx": 9
806
+ },
807
+ {
808
+ "type": "text",
809
+ "text": "Alexey Dosovitskiy, German Ros, Felipe Codevilla, Antonio Lopez, and Vladlen Koltun. CARLA: An open urban driving simulator. In Conference on Robot Learning (CoRL), pp. 1–16, 2017. ",
810
+ "bbox": [
811
+ 171,
812
+ 352,
813
+ 823,
814
+ 382
815
+ ],
816
+ "page_idx": 9
817
+ },
818
+ {
819
+ "type": "text",
820
+ "text": "Peter Englert, Alexandros Paraschos, Marc Peter Deisenroth, and Jan Peters. Probabilistic modelbased imitation learning. Adaptive Behavior, 21(5):388–403, 2013. ",
821
+ "bbox": [
822
+ 171,
823
+ 390,
824
+ 823,
825
+ 420
826
+ ],
827
+ "page_idx": 9
828
+ },
829
+ {
830
+ "type": "text",
831
+ "text": "Agrim Gupta, Justin Johnson, Li Fei-Fei, Silvio Savarese, and Alexandre Alahi. Social GAN: Socially acceptable trajectories with generative adversarial networks. In Computer Vision and Pattern Recognition (CVPR), number CONF, 2018. ",
832
+ "bbox": [
833
+ 176,
834
+ 429,
835
+ 823,
836
+ 472
837
+ ],
838
+ "page_idx": 9
839
+ },
840
+ {
841
+ "type": "text",
842
+ "text": "Leonid Kuvayev and Richard S. Sutton. Model-based reinforcement learning with an approximate, learned model. In Yale Workshop on Adaptive and Learning Systems, pp. 101–105, 1996. ",
843
+ "bbox": [
844
+ 174,
845
+ 481,
846
+ 821,
847
+ 511
848
+ ],
849
+ "page_idx": 9
850
+ },
851
+ {
852
+ "type": "text",
853
+ "text": "Steven M LaValle. Planning algorithms. chapter 14, pp. 802–805. Cambridge University Press, 2006. ",
854
+ "bbox": [
855
+ 174,
856
+ 520,
857
+ 821,
858
+ 549
859
+ ],
860
+ "page_idx": 9
861
+ },
862
+ {
863
+ "type": "text",
864
+ "text": "Namhoon Lee, Wongun Choi, Paul Vernaza, Christopher B Choy, Philip HS Torr, and Manmohan Chandraker. DESIRE: Distant future prediction in dynamic scenes with interacting agents. In Computer Vision and Pattern Recognition (CVPR), pp. 336–345, 2017. ",
865
+ "bbox": [
866
+ 173,
867
+ 558,
868
+ 825,
869
+ 602
870
+ ],
871
+ "page_idx": 9
872
+ },
873
+ {
874
+ "type": "text",
875
+ "text": "Sergey Levine. Reinforcement learning and control as probabilistic inference: Tutorial and review. arXiv preprint arXiv:1805.00909, 2018. ",
876
+ "bbox": [
877
+ 176,
878
+ 611,
879
+ 821,
880
+ 640
881
+ ],
882
+ "page_idx": 9
883
+ },
884
+ {
885
+ "type": "text",
886
+ "text": "Xiaodan Liang, Tairui Wang, Luona Yang, and Eric Xing. CIRL: Controllable imitative reinforcement learning for vision-based self-driving. arXiv preprint arXiv:1807.03776, 2018. ",
887
+ "bbox": [
888
+ 171,
889
+ 648,
890
+ 823,
891
+ 679
892
+ ],
893
+ "page_idx": 9
894
+ },
895
+ {
896
+ "type": "text",
897
+ "text": "Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015. ",
898
+ "bbox": [
899
+ 174,
900
+ 688,
901
+ 823,
902
+ 731
903
+ ],
904
+ "page_idx": 9
905
+ },
906
+ {
907
+ "type": "text",
908
+ "text": "Wei-Chiu Ma, De-An Huang, Namhoon Lee, and Kris M Kitani. Forecasting interactive dynamics of pedestrians with fictitious play. In Computer Vision and Pattern Recognition (CVPR), pp. 4636–4644. IEEE, 2017. ",
909
+ "bbox": [
910
+ 173,
911
+ 739,
912
+ 825,
913
+ 784
914
+ ],
915
+ "page_idx": 9
916
+ },
917
+ {
918
+ "type": "text",
919
+ "text": "Jeffrey Mahler and Ken Goldberg. Learning deep policies for robot bin picking by simulating robust grasping sequences. In Conference on Robot Learning (CoRL), pp. 515–524, 2017. ",
920
+ "bbox": [
921
+ 169,
922
+ 792,
923
+ 823,
924
+ 821
925
+ ],
926
+ "page_idx": 9
927
+ },
928
+ {
929
+ "type": "text",
930
+ "text": "Robert J McCann et al. Existence and uniqueness of monotone measure-preserving maps. 1995. ",
931
+ "bbox": [
932
+ 173,
933
+ 832,
934
+ 805,
935
+ 847
936
+ ],
937
+ "page_idx": 9
938
+ },
939
+ {
940
+ "type": "text",
941
+ "text": "Kunal Menda, Katherine Driggs-Campbell, and Mykel J Kochenderfer. DropoutDAgger: A bayesian approach to safe imitation learning. arXiv preprint arXiv:1709.06166, 2017. ",
942
+ "bbox": [
943
+ 174,
944
+ 856,
945
+ 820,
946
+ 886
947
+ ],
948
+ "page_idx": 9
949
+ },
950
+ {
951
+ "type": "text",
952
+ "text": "Jerzy Neyman and Egon Pearson. On the problem of the most efficient tests of statistical hypotheses. Philosophical Transactions of the Royal Society of London, A 231:289–337, 1933. ",
953
+ "bbox": [
954
+ 174,
955
+ 895,
956
+ 821,
957
+ 924
958
+ ],
959
+ "page_idx": 9
960
+ },
961
+ {
962
+ "type": "text",
963
+ "text": "Brian Paden, Michal Cˇ ap, Sze Zheng Yong, Dmitry Yershov, and Emilio Frazzoli. A survey of mo-´ tion planning and control techniques for self-driving urban vehicles. Transactions on Intelligent Vehicles, 1(1):33–55, 2016. ",
964
+ "bbox": [
965
+ 174,
966
+ 103,
967
+ 823,
968
+ 146
969
+ ],
970
+ "page_idx": 10
971
+ },
972
+ {
973
+ "type": "text",
974
+ "text": "Dean A Pomerleau. Alvinn: An autonomous land vehicle in a neural network. In Advances in Neural Information Processing Systems (NIPS), pp. 305–313, 1989. ",
975
+ "bbox": [
976
+ 171,
977
+ 155,
978
+ 823,
979
+ 184
980
+ ],
981
+ "page_idx": 10
982
+ },
983
+ {
984
+ "type": "text",
985
+ "text": "Danilo Jimenez Rezende and Shakir Mohamed. Variational inference with normalizing flows. arXiv preprint arXiv:1505.05770, 2015. ",
986
+ "bbox": [
987
+ 173,
988
+ 193,
989
+ 823,
990
+ 222
991
+ ],
992
+ "page_idx": 10
993
+ },
994
+ {
995
+ "type": "text",
996
+ "text": "Nicholas Rhinehart and Kris M. Kitani. First-person activity forecasting with online inverse reinforcement learning. In International Conference on Computer Vision (ICCV), Oct 2017. ",
997
+ "bbox": [
998
+ 173,
999
+ 229,
1000
+ 823,
1001
+ 260
1002
+ ],
1003
+ "page_idx": 10
1004
+ },
1005
+ {
1006
+ "type": "text",
1007
+ "text": "Nicholas Rhinehart, Kris M. Kitani, and Paul Vernaza. R2P2: A reparameterized pushforward policy for diverse, precise generative path forecasting. In European Conference on Computer Vision (ECCV), September 2018. ",
1008
+ "bbox": [
1009
+ 174,
1010
+ 267,
1011
+ 825,
1012
+ 310
1013
+ ],
1014
+ "page_idx": 10
1015
+ },
1016
+ {
1017
+ "type": "text",
1018
+ "text": "Stephane Ross and Drew Bagnell. Efficient reductions for imitation learning. In ´ International Conference on Artificial Intelligence and Statistics, pp. 661–668, 2010. ",
1019
+ "bbox": [
1020
+ 173,
1021
+ 319,
1022
+ 823,
1023
+ 349
1024
+ ],
1025
+ "page_idx": 10
1026
+ },
1027
+ {
1028
+ "type": "text",
1029
+ "text": "Stephane Ross and J Andrew Bagnell. Reinforcement and imitation learning via interactive no-regret learning. arXiv preprint arXiv:1406.5979, 2014. ",
1030
+ "bbox": [
1031
+ 173,
1032
+ 357,
1033
+ 821,
1034
+ 387
1035
+ ],
1036
+ "page_idx": 10
1037
+ },
1038
+ {
1039
+ "type": "text",
1040
+ "text": "Stephane Ross, Geoffrey Gordon, and Drew Bagnell. A reduction of imitation learning and struc- ´ tured prediction to no-regret online learning. In International Conference on Artificial Intelligence and Statistics, pp. 627–635, 2011. ",
1041
+ "bbox": [
1042
+ 174,
1043
+ 395,
1044
+ 823,
1045
+ 438
1046
+ ],
1047
+ "page_idx": 10
1048
+ },
1049
+ {
1050
+ "type": "text",
1051
+ "text": "Dorsa Sadigh, Shankar Sastry, Sanjit A Seshia, and Anca D Dragan. Planning for autonomous cars that leverage effects on human actions. In Robotics: Science and Systems (RSS), 2016. ",
1052
+ "bbox": [
1053
+ 173,
1054
+ 446,
1055
+ 823,
1056
+ 476
1057
+ ],
1058
+ "page_idx": 10
1059
+ },
1060
+ {
1061
+ "type": "text",
1062
+ "text": "Edward Schmerling, Karen Leung, Wolf Vollprecht, and Marco Pavone. Multimodal probabilistic model-based planning for human-robot interaction. In International Conference on Robotics and Automation (ICRA), pp. 1–9. IEEE, 2018. ",
1063
+ "bbox": [
1064
+ 174,
1065
+ 484,
1066
+ 823,
1067
+ 527
1068
+ ],
1069
+ "page_idx": 10
1070
+ },
1071
+ {
1072
+ "type": "text",
1073
+ "text": "Wilko Schwarting, Javier Alonso-Mora, and Daniela Rus. Planning and decision-making for autonomous vehicles. Annual Review of Control, Robotics, and Autonomous Systems, 1:187–210, 2018. ",
1074
+ "bbox": [
1075
+ 173,
1076
+ 535,
1077
+ 825,
1078
+ 579
1079
+ ],
1080
+ "page_idx": 10
1081
+ },
1082
+ {
1083
+ "type": "text",
1084
+ "text": "Liting Sun, Cheng Peng, Wei Zhan, and Masayoshi Tomizuka. A fast integrated planning and control framework for autonomous driving via imitation learning. arXiv preprint arXiv:1707.02515, 2017. ",
1085
+ "bbox": [
1086
+ 173,
1087
+ 587,
1088
+ 823,
1089
+ 630
1090
+ ],
1091
+ "page_idx": 10
1092
+ },
1093
+ {
1094
+ "type": "text",
1095
+ "text": "Wen Sun, James Andrew Bagnell, and Byron Boots. Truncated horizon policy search: Combining reinforcement learning and imitation learning. In International Conference on Learning Representations (ICLR), 2018. ",
1096
+ "bbox": [
1097
+ 173,
1098
+ 638,
1099
+ 823,
1100
+ 681
1101
+ ],
1102
+ "page_idx": 10
1103
+ },
1104
+ {
1105
+ "type": "text",
1106
+ "text": "Sebastian Thrun. Learning to play the game of chess. In Advances in Neural Information Processing Systems (NIPS), pp. 1069–1076, 1995. ",
1107
+ "bbox": [
1108
+ 171,
1109
+ 690,
1110
+ 823,
1111
+ 719
1112
+ ],
1113
+ "page_idx": 10
1114
+ },
1115
+ {
1116
+ "type": "text",
1117
+ "text": "Emanuel Todorov. Linearly-solvable Markov decision problems. In Advances in neural information processing systems, pp. 1369–1376, 2007. ",
1118
+ "bbox": [
1119
+ 171,
1120
+ 728,
1121
+ 825,
1122
+ 757
1123
+ ],
1124
+ "page_idx": 10
1125
+ },
1126
+ {
1127
+ "type": "text",
1128
+ "text": "Jiakai Zhang and Kyunghyun Cho. Query-efficient imitation learning for end-to-end simulated driving. In AAAI, pp. 2891–2897, 2017. ",
1129
+ "bbox": [
1130
+ 169,
1131
+ 765,
1132
+ 825,
1133
+ 795
1134
+ ],
1135
+ "page_idx": 10
1136
+ },
1137
+ {
1138
+ "type": "text",
1139
+ "text": "Tianhao Zhang, Zoe McCarthy, Owen Jowl, Dennis Lee, Xi Chen, Ken Goldberg, and Pieter Abbeel. Deep imitation learning for complex manipulation tasks from virtual reality teleoperation. In International Conference on Robotics and Automation (ICRA), pp. 1–8. IEEE, 2018. ",
1140
+ "bbox": [
1141
+ 176,
1142
+ 804,
1143
+ 825,
1144
+ 847
1145
+ ],
1146
+ "page_idx": 10
1147
+ },
1148
+ {
1149
+ "type": "text",
1150
+ "text": "Brian D Ziebart, Andrew L Maas, J Andrew Bagnell, and Anind K Dey. Maximum entropy inverse reinforcement learning. In AAAI, volume 8, pp. 1433–1438. Chicago, IL, USA, 2008. ",
1151
+ "bbox": [
1152
+ 171,
1153
+ 856,
1154
+ 823,
1155
+ 885
1156
+ ],
1157
+ "page_idx": 10
1158
+ },
1159
+ {
1160
+ "type": "text",
1161
+ "text": "Alex Zyner, Stewart Worrall, and Eduardo Nebot. Naturalistic driver intention and path prediction using recurrent neural networks. arXiv preprint arXiv:1807.09995, 2018. ",
1162
+ "bbox": [
1163
+ 171,
1164
+ 893,
1165
+ 823,
1166
+ 922
1167
+ ],
1168
+ "page_idx": 10
1169
+ }
1170
+ ]
parse/train/SyehMhC9Y7/SyehMhC9Y7_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SyehMhC9Y7/SyehMhC9Y7_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/qVyeW-grC2k/qVyeW-grC2k.md ADDED
@@ -0,0 +1,393 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LONG RANGE ARENA: A BENCHMARK FOR EFFICIENT TRANSFORMERS
2
+
3
+ Yi Tay1∗, Mostafa Dehghani1∗, Samira Abnar1, Yikang Shen1, Dara Bahri1, Philip Pham1
4
+ Jinfeng Rao1, Liu Yang1, Sebastian Ruder2, Donald Metzler1
5
+
6
+ 1Google Research
7
+ 2Google DeepMind
8
+ {yitay, dehghani}@google.com
9
+
10
+ # ABSTRACT
11
+
12
+ Transformers do not scale very well to long sequence lengths largely because of quadratic self-attention complexity. In the recent months, a wide spectrum of efficient, fast Transformers have been proposed to tackle this problem, more often than not claiming superior or comparable model quality to vanilla Transformer models. To this date, there is no well-established consensus on how to evaluate this class of models. Moreover, inconsistent benchmarking on a wide spectrum of tasks and datasets makes it difficult to assess relative model quality amongst many models. This paper proposes a systematic and unified benchmark, Long-Range Arena, specifically focused on evaluating model quality under long-context scenarios. Our benchmark is a suite of tasks consisting of sequences ranging from $1 K$ to $1 6 K$ tokens, encompassing a wide range of data types and modalities such as text, natural, synthetic images, and mathematical expressions requiring similarity, structural, and visual-spatial reasoning. We systematically evaluate ten well-established long-range Transformer models (Reformers, Linformers, Linear Transformers, Sinkhorn Transformers, Performers, Synthesizers, Sparse Transformers, and Longformers) on our newly proposed benchmark suite. Long-Range Arena paves the way towards better understanding this class of efficient Transformer models, facilitates more research in this direction, and presents new challenging tasks to tackle.
13
+
14
+ # 1 INTRODUCTION
15
+
16
+ Transformers (Vaswani et al., 2017) are ubiquitously state-of-the-art across many modalities, from language (Devlin et al., 2018; Raffel et al., 2019; Child et al., 2019) to images (Tan & Bansal, 2019; Lu et al., 2019) to protein sequences (Rives et al., 2019). A common weakness of Transformers is their quadratic memory complexity within the self-attention mechanism that restricts their potential application to domains requiring longer sequence lengths. To date, a dizzying number of efficient Transformer models (‘xformers’) have been proposed to tackle this problem (Liu et al., 2018; Kitaev et al., 2020; Wang et al., 2020; Tay et al., 2020b; Katharopoulos et al., 2020). Many of these models demonstrate comparable performance to the vanilla Transformer model while successfully reducing the memory complexity of the self-attention mechanism. An overview of this research area can be found in (Tay et al., 2020c).
17
+
18
+ Comparing the evaluation and experimental setup of many of these papers, we can make the following observations. Firstly, there is no unifying consensus on what makes an acceptable test bed for benchmarking efficient Transformers. There is also a large diversity in the types of tasks adopted— every single model is evaluated on a different set of tasks and datasets, which makes comparison of different models as well as an assessment of their relative strengths and weaknesses difficult. Secondly, the benchmarks used for evaluation are often arbitrarily chosen, without much consideration to whether the task is suitable for evaluating long-range modeling. Thirdly, many papers tend to conflate the effectiveness of the inductive bias with the benefits of pretraining (Ainslie et al., 2020; Zaheer et al., 2020; Wang et al., 2020), which tends to obfuscate the true value of the architecture.
19
+
20
+ Pretraining itself is a computationally expensive endeavour and de-coupling inductive bias research from pretraining would make xformer research more accessible.
21
+
22
+ In this paper, we propose a new benchmark, Long-Range Arena (LRA), for the purpose of benchmarking sequence models under the long-context scenario. We design a benchmark suite comprised of both synthetic probing tasks and real-world tasks and provide relative comparisons for ten recently proposed efficient Transformer models including Sparse Transformers (Child et al., 2019), Reformer (Kitaev et al., 2020), Linformer (Wang et al., 2020), Longformer (Beltagy et al., 2020), Sinkhorn Transformers (Tay et al., 2020b), Performers (Choromanski et al., 2020), Synthesizers (Tay et al., 2020a), Linear Transformers (Katharopoulos et al., 2020), and BigBird (Zaheer et al., 2020). This is the most comprehensive and extensive side-by-side evaluation of this class of models.
23
+
24
+ While the focus of this benchmark is the ability of these architectures to reason in long-context scenarios, we are also fundamentally interested in understanding the capabilities and properties of these xformer architectures when exposed to different types of data and conditions. Hence, our benchmark is purposefully designed to be capability probing, i.e, we select datasets and tasks with certain innate structure. For example, can these architectures model long sequences that are intrinsically hierarchical or that contain some form of spatial structure? In general, we are especially interested in the relative performance of these xformer models across diverse circumstances. We hope that understanding these better will inspire research on more efficient architectures in the future. While the focus of this paper is on efficient Transformer models, our benchmark is also model agnostic and can also serve as a benchmark for long-range sequence modeling.
25
+
26
+ Aside from comparing the quality of these models, we also conduct extensive efficiency and memory usage analysis of these models. We believe such a side-by-side performance benchmark will be valuable to the community, providing deeper insight on the practical efficiency of these methods.
27
+
28
+ Overall, we propose a unified framework for enabling easy side-by-side comparisons of efficient Transformer models and broadly speaking, long-range sequence models in general. Our framework, which we plan to open source, is written in JAX/FLAX1.
29
+
30
+ # 2 LONG-RANGE ARENA (LRA)
31
+
32
+ This section introduces the Long-Range Arena (LRA) benchmark (pronounced el-ra). We implement our benchmark (which includes the task, evaluators, and models) in Python 3 and Jax/Flax and plan to open-source our code—making it easy to extend and to build on top of our work.
33
+
34
+ # 2.1 DESIDERATA
35
+
36
+ For creating the Long-Range Arena benchmark, we established a set of desiderata:
37
+
38
+ 1. Generality: All efficient Transformers models should be applicable to our tasks. For instance, given that not all xformer models are able to perform autoregressive decoding (Wang et al., 2020), we include tasks that only require encoding.
39
+
40
+ 2. Simplicity: The tasks should have a simple setup. All factors that make comparisons difficult should be removed. This encourages simple models instead of cumbersome pipelined approaches. For instance, we avoid including any particular data augmentation and consider pretraining to be out of scope of this benchmark.
41
+
42
+ 3. Challenging: The tasks should be difficult enough for current models to ensure there is room for improvement to encourage future research in this direction.
43
+
44
+ 4. Long inputs: The input sequence lengths should be reasonably long since assessing how different models capture long-range dependencies is a core focus of LRA.
45
+
46
+ 5. Probing diverse aspects: The set of tasks should assess different capabilities of models like their ability to model relations and hierarchical/spatial structures, generalization capability, etc.
47
+
48
+ 6. Non-resource intensive and accessible: The benchmarks should be deliberately designed to be lightweight so as to be accessible to researchers without industry-grade computing resources.
49
+
50
+ # 2.2 TASKS
51
+
52
+ This section describes the tasks in the LRA benchmark. Note that these tasks are specifically designed for the purpose of assessing different aspects of efficient Transformer models. Further details about each task can be found in the appendix.
53
+
54
+ # 2.2.1 LONG LISTOPS
55
+
56
+ In this task, we are interested in the capability of modeling hierarchically structured data in a longcontext scenario. This benchmark task is a longer variation of the standard ListOps task proposed in (Nangia & Bowman, 2018), which was designed to investigate the parsing ability of neural models.
57
+
58
+ The dataset is comprised of sequences with a hierarchical structure and operators MAX, MEAN, MEDIAN and SUM MOD that are enclosed by delimiters (brackets). An example (much shorter) sequence is as follows:
59
+
60
+ OUTPUT: 5
61
+
62
+ In our task we use a version of ListOps of sequence lengths of up to $2 K$ to test the ability to reason hierarchically while handling long contexts. Naturally, in the above example the model needs to access all tokens and model the logical structure of the inputs in order to make a prediction. The task is a ten-way classification task and is considerably challenging.
63
+
64
+ # 2.2.2 BYTE-LEVEL TEXT CLASSIFICATION
65
+
66
+ This task using real-world data represents a common use case of efficient Transformers, which are often needed to process long documents. Text classification in particular is associated with many real-world applications such as spam, fraud, and bot detection and commercial document classification, among others (Howard & Ruder, 2018).
67
+
68
+ This task also benchmarks the ability of the models to deal with compositionality as it is required to compose characters into words into higher-level phrases. Compared to ListOps, boundaries are less well defined and need to be learned from the data, which is a challenging problem in its own right (Kawakami et al., 2019).
69
+
70
+ We consider the byte/character-level setup of this task in order to simulate a longer input sequence, which also makes the task considerably more challenging.2 Note that this setup differs significantly from character-level language modeling (char LM). In char LM, it would suffice to read nearby context to determine the next character, e.g., a model is very likely to predict $\cdot _ { e } ,$ after having seen the prefix ‘appl’. For byte-level text classification, the model needs to reason with compositional, unsegmented data in order to solve a meaningful real-world task. We use the IMDb reviews (Maas et al., 2011) dataset, which is a commonly used dataset to benchmark document classification. We use a fixed max length of $4 K$ for this task, which is truncated or padded when necessary. This is a binary classification task with accuracy as the metric.
71
+
72
+ # 2.2.3 BYTE-LEVEL DOCUMENT RETRIEVAL
73
+
74
+ We further evaluate a model’s ability to encode and store compressed representations that are useful for matching and retrieval. Learning the similarity score between two vectors is a common problem in machine learning and is useful for a wide array of applications (Guo et al., 2016). Hence, this task is mainly about modeling a similarity score between two documents in a ‘two tower setup’ in which compressed representations are concatenated and passed into a linear classifier. Note that we deliberately prevent models from using cross attention. This task thus serves as a test of how well models are able to compress long sequences into representations suitable for similarity-based matching.
75
+
76
+ We use the ACL Anthology Network (AAN; Radev et al., 2013) dataset, which identifies if two papers have a citation link, a common setup used in long-form document matching (Jiang et al.,
77
+
78
+ 2019; Yang et al., 2020). Similar to the text classification setup, we use a byte/character level setup, which challenges the model to compose and aggregate information over longer contexts. We use a sequence length of $4 K$ for each document, which makes the total text length $8 K$ for this task. This is a binary classification task with accuracy as the metric.
79
+
80
+ # 2.2.4 IMAGE CLASSIFICATION ON SEQUENCES OF PIXELS
81
+
82
+ This task is an image classification task, where the inputs are sequences of pixels. In other words, an $N \times N$ image is flattened to a sequence of length $\bar { N } ^ { 2 }$ pixels. Similar to how the previous tasks require capturing the hierarchical structure in the data, this task requires the model to learn the 2D spatial relations between input pixels, while presented as a 1D sequence of symbols. We focus on assessing Transformer models that are designed to process a sequence of discrete symbols, so we do not allow extra modules such as a CNN stem that embeds pixel-level inputs. To simplify the setup, we map the input images to a single gray-scale channel where each pixel is represented with an 8-bit pixel intensity (vocabulary size of 256). In LRA, we use the CIFAR-10 dataset (Krizhevsky, 2009) for the image classification task.
83
+
84
+ # 2.2.5 PATHFINDER (LONG-RANGE SPATIAL DEPENDENCY)
85
+
86
+ The Pathfinder challenge (Linsley et al., 2018; $\mathrm { K i m ^ { * } }$ et al., 2020) was first introduced for learning long-range spatial dependencies. It is a synthetic visual task motivated by cognitive psychology (Houtkamp & Roelfsema, 2010). The task requires a model to make a binary decision whether two points represented as circles are connected by a path consisting of dashes. We show a positive example of two connected points and a negative example of two unconnected points in Figure 1.
87
+
88
+ The dataset also contains distractor paths, which makes this setup challenging. We model this task by treating images as sequences of pixels. In this task, images are of dimensions $( 3 2 \times 3 2 )$ , which make up a sequence length of 1024.
89
+
90
+ # 2.2.6 PATHFINDER-X (LONG-RANGE SPATIAL DEPENDENCIES WITH EXTREME LENGTHS)
91
+
92
+ Finally, we consider an extreme version of Pathfinder (PathfinderX) where examples consist of $1 6 K$ pixels (i.e., images of $1 2 8 \ \times$ 128). The key goal here is to observe if a model would fail to solve the $1 6 K$ extreme version even if it can successfully learn the standard version of 1024 tokens. This is an interesting litmus test to see if the same algorithmic challenges bear a different extent of difficulty when sequence lengths are much longer. We include this in our benchmark as Path-X.
93
+
94
+ ![](images/ea075e89f3a73feaf2428908b6839d2b7ea93935f1a3e163c35268d0f814ec32.jpg)
95
+ (b) A negative example.
96
+
97
+ # 2.3 REQUIRED ATTENTION SPAN OF LRA TASKS
98
+
99
+ One of the main goals of the LRA benchmark is assessing the ability of different efficient Transformer models to capture long-range dependencies. The tasks and setups are designed with this goal in mind. In order to have a quantitative estimate of the spatial extent needed to be considered by an attention mechanism to encode the inputs, we define required attention span.
100
+
101
+ Given a trained attention-based model and a sequence of tokens as inputs, the required attention span of an attention module is computed as the mean distance between the query token and the attended tokens, scaled by attention weights. Here, we compute the mean required atten
102
+
103
+ ![](images/7702d2d231ffe3f33cbfd1d59ba31e391a51904e58c10839813c6aa6a1553af3.jpg)
104
+ Figure 1: Samples of the Pathfinder task.
105
+ Figure 2: Required attention span on different tasks.
106
+
107
+ <table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=2>ListOps Text Retrieval Image Pathfinder Path-X Avg</td></tr><tr><td rowspan=1 colspan=1>Chance</td><td rowspan=1 colspan=1>10.00 50.00 50.00 10.00 50.00 50.00</td><td rowspan=1 colspan=1>44.00</td></tr><tr><td rowspan=1 colspan=1>Transformer</td><td rowspan=1 colspan=1>36.37 64.27 57.46 42.44 71.40 FAIL</td><td rowspan=1 colspan=1>54.39</td></tr><tr><td rowspan=2 colspan=1>Local AttentionSparse Trans.</td><td rowspan=1 colspan=1>15.82 52.98 53.39 41.46 66.63 FAIL</td><td rowspan=1 colspan=1>46.06</td></tr><tr><td rowspan=1 colspan=1>17.07 63.58 59.59 44.24 71.71 FAIL</td><td rowspan=1 colspan=1>51.24</td></tr><tr><td rowspan=2 colspan=1>LongformerLinformer</td><td rowspan=1 colspan=1>35.63 62.85 56.89 42.22 69.71 FAIL</td><td rowspan=1 colspan=1>53.46</td></tr><tr><td rowspan=1 colspan=1>35.70 53.94 52.27 38.56 76.34 FAIL</td><td rowspan=1 colspan=1>51.36</td></tr><tr><td rowspan=1 colspan=1>Reformer</td><td rowspan=1 colspan=1>37.27 56.10 53.40 38.07 68.50 FAIL</td><td rowspan=1 colspan=1>50.67</td></tr><tr><td rowspan=1 colspan=1>Sinkhorn Trans.</td><td rowspan=1 colspan=1>33.67 61.20 53.83 41.23 67.45 FAIL</td><td rowspan=1 colspan=1>51.39</td></tr><tr><td rowspan=2 colspan=1>SynthesizerBigBird</td><td rowspan=1 colspan=1>36.99 61.68 54.67 41.61 69.45 FAIL</td><td rowspan=1 colspan=1>52.88</td></tr><tr><td rowspan=1 colspan=1>36.05 64.02 59.29 40.83 74.87 FAIL</td><td rowspan=1 colspan=1>55.01</td></tr><tr><td rowspan=1 colspan=1>Linear Trans.</td><td rowspan=1 colspan=1>16.13 65.90 53.09 42.34 75.30 FAIL</td><td rowspan=1 colspan=1>50.55</td></tr><tr><td rowspan=1 colspan=1>Performer</td><td rowspan=1 colspan=1>18.01 65.40 53.82 42.77 77.05 FAIL</td><td rowspan=1 colspan=1>51.41</td></tr><tr><td rowspan=1 colspan=1>Task Avg (Std)</td><td rowspan=1 colspan=1>29 (9.7) 61 (4.6) 55 (2.6) 41 (1.8) 72 (3.7) FAIL</td><td rowspan=1 colspan=1>52 (2.4)</td></tr></table>
108
+
109
+ Table 1: Experimental results on Long-Range Arena benchmark. Best model is in boldface and second best is underlined. All models do not learn anything on Path-X task, contrary to the Pathfinder task and this is denoted by FAIL. This shows that increasing the sequence length can cause seriously difficulties for model training. We leave Path-X on this benchmark for future challengers but do not include it on the Average score as it has no impact on relative performance. Important: These results always represent the results at the time of ICLR submission and are not modified for archival purposes. Please see appendix in arxiv version of this paper for updated snapshots or new runs of this leaderboard with new settings and use that for paper comparisons.
110
+
111
+ tion span over all attention modules in our best vanilla Transformer model for each task, averaged over 1K random samples from the validation set. Figure 2 summarizes the required attention span for each task in LRA. For all the tasks in LRA the required attention span is rather high. This shows, a Transformer model needs to go beyond combining only local information, while in many other tasks and datasets, attention mechanism mostly need to combine information from neighboring positions. Given the purpose of LRA, we found required attention span serves as a good proxy for how difficult a task is for Transformer-based models.3
112
+
113
+ # 3 EXPERIMENTAL RESULTS
114
+
115
+ # 3.1 MODELS
116
+
117
+ This section describes the models we evaluate on our LRA benchmark. We base our evaluation on ten recently proposed efficient Transformer models. Aside from the standard vanilla Transformer (Vaswani et al., 2017) and a simple local attention baseline, we compare Sparse Transformers (Child et al., 2019), Longformers (Beltagy et al., 2020), Linformers (Wang et al., 2020), Reformers (Kitaev et al., 2020), Sinkhorn Transformers (Tay et al., 2020b), Synthesizers (Tay et al., 2020a), BigBird (Zaheer et al., 2020), Linear Transformers (Katharopoulos et al., 2020), and Performers (Choromanski et al., 2020). We believe these ten models to represent a diverse cross-section of recent efficient Transformer models.
118
+
119
+ # 3.2 PHILOSOPHY BEHIND THE BENCHMARK
120
+
121
+ We note that it is non-trivial and almost impossible to conduct a perfectly fair evaluation of all models. The large search space motivates us to follow a set of fixed hyperparameters (number of layers, heads, embedding dimensions, etc.) for all models. The best performance and relative order of the models may change if we aggressively tune hyperparameters for all models. Hence, the results provided in this paper are not meant to be a final authoritative document on which xformer is the best. Instead, we provide a starting point for future research and strive to be as fair as possible. In order to do so, we plan to release the code with all the hyperparameters and implementation details. Additionally, we intend for our paper to be a living document and encourage researchers (authors and the broader community) to contribute and continue updating this paper (with rules and limitations described in the appendix). We also implemented all models to the best of our abilities. We often consulted with the original developers of the included models. For simplicity, the main text of the paper will always contain the initial set of results that we submitted to ICLR. Important: All future updates will, for consistency, be in the appendix of the paper with marked version identifiers so other researchers can always reference them in other papers. If you obtain a better result on any of the following models we tried, please send an email and we can discuss making an update to the leaderboard.
122
+
123
+ # 3.3 QUANTITATIVE RESULTS
124
+
125
+ Based on our results, we observe that (1) all proposed tasks in LRA are considerably challenging and (2) there are meaningful differences in model performance across different xformer models.
126
+
127
+ Results on ListOps The ListOps task (10-way classification) has proven to be reasonably difficult with the best models obtaining only $3 7 \%$ . The considerable gap to random chance shows that models are indeed learning the task. We notice that the inductive bias of the xformer models plays a substantial role on this task in which approximately half the xformer models are able to get $> 3 0 \%$ performance while the remainder of the models only get slightly above random chance. This may imply that certain efficiency-inspired inductive biases may be better at handling hierarchical data than others. For instance, the results from our experiments seem to suggest that kernel-based models (e.g., Performer, Linear Transformers) are possibly not as effective on hierarchically structured data. We feel that ListOps may be useful in probing a model’s capability in handling hierarchically structured data.
128
+
129
+ Results on Text Classification Byte-level classification is shown to be difficult and challenging especially when no pretraining or contextual embeddings are used. The best model only obtains 65.90 accuracy. The Linear Transformer performs well on this task, along with the Performer model. Contrary to the ListOps task, it seems like fast kernel-based models do well on this task.
130
+
131
+ Results on Retrieval The scores of different models on this task are also rather low (average of $5 5 \%$ ), indicating the difficulty of the task. The vanilla Transformer model only achieves $5 7 . 4 6 \%$ accuracy with some xformer variants scoring very close to random chance. The best performing model is the Sparse Transformer and the second best is BigBird. We find that models that follow fixed sparse patterns to do well on this task. Models that are based on low-rank factorization and kernels perform relatively worse.
132
+
133
+ Results on Image Classification On the image classification task, most models perform quite similarly (low variance amongst model performance). The best model on this task is the Sparse Transformer, followed by the Performer. Linformer and Reformers do not do well on this task. On a related note, we also observed most of models struggle generalizing to the test even though they manage to overfit the training set. While we extensively tried different regularization techniques on every single model, there is a rather large gap between their performance on train and test set (More details in Appendix).
134
+
135
+ Results on Pathfinder / Path-X Results show that all models achieve reasonable performance on the Pathfinder task. The average performance is 72 and the best model Performer obtains $7 7 . 0 5 \%$ accuracy. The Local Attention model performs the worse out of all models. It seems that the best models on this spatial reasoning task are the kernel models (Performer and Linear Transformer).
136
+
137
+ All models failed to solve the Path-X task, achieving at best $5 0 \%$ . We find this intriguing because this is essentially an identical task to the standard Pathfinder, albeit with much longer sequence lengths. Hence, we observe that the extreme length of the task can significantly obstruct a model from leaning anything meaningful. We leave Path-X in our benchmark suite, hoping to spur future progress in modeling sequences at extreme lengths.
138
+
139
+ <table><tr><td colspan="5">Train Speed (Steps per second)</td><td colspan="4">Peak Memory Usage (GB)</td></tr><tr><td>Model</td><td>1K</td><td>2K</td><td>3K</td><td>4K</td><td>1K</td><td>2K</td><td>3K</td><td>4K</td></tr><tr><td>Transformer</td><td>8.1</td><td>4.9</td><td>2.3</td><td>1.4</td><td>0.85</td><td>2.65</td><td>5.51</td><td>9.48</td></tr><tr><td>Local Attention</td><td>9.2 (1.1x)</td><td>8.4 (1.7x)</td><td>7.4 (3.2x)</td><td>7.4 (5.3x)</td><td>0.42</td><td>0.76</td><td>1.06</td><td>1.37</td></tr><tr><td>Linformer</td><td>9.3 (1.2x)</td><td>9.1 (1.9x)</td><td>8.5 (3.7x)</td><td>7.7 (5.5x)</td><td>0.37</td><td>0.55</td><td>0.99</td><td>0.99</td></tr><tr><td>Reformer</td><td>4.4 (0.5x)</td><td>2.2 (0.4x)</td><td>1.5 (0.7x)</td><td>1.1 (0.8x)</td><td>0.48</td><td>0.99</td><td>1.53</td><td>2.28</td></tr><tr><td>Sinkhorn Trans</td><td>9.1 (1.1x)</td><td>7.9 (1.6x)</td><td>6.6 (2.9x)</td><td>5.3 (3.8x)</td><td>0.47</td><td>0.83</td><td>1.13</td><td>1.48</td></tr><tr><td>Synthesizer</td><td>8.7 (1.1x)</td><td>5.7 (1.2x)</td><td>6.6 (2.9x)</td><td>1.9 (1.4x)</td><td>0.65</td><td>1.98</td><td>4.09</td><td>6.99</td></tr><tr><td>BigBird</td><td>7.4 (0.9x)</td><td>3.9 (0.8x)</td><td>2.7 (1.2x)</td><td>1.5 (1.1x)</td><td>0.77</td><td>1.49</td><td>2.18</td><td>2.88</td></tr><tr><td>Linear Trans.</td><td>9.1 (1.1x)</td><td>9.3 (1.9x)</td><td>8.6 (3.7x)</td><td>7.8 (5.6x)</td><td>0.37</td><td>0.57</td><td>0.80</td><td>1.03</td></tr><tr><td>Performer</td><td>9.5 (1.2x)</td><td>9.4 (1.9x)</td><td>8.7 (3.8x)</td><td>8.0 (5.7x)</td><td>0.37</td><td>0.59</td><td>0.82</td><td>1.06</td></tr></table>
140
+
141
+ Table 2: Benchmark results of all Xformer models with a consistent batch size of 32 across all models. We report relative speed increase/decrease in comparison with the vanilla Transformer in brackets besides the steps per second. Memory usage refers to per device memory usage across each TPU device. Benchmarks are run on $4 \mathbf { x } 4$ TPU V3 Chips. We report inference speeds in the supplementary material.
142
+
143
+ # 3.4 EFFICIENCY BENCHMARKS
144
+
145
+ In this section, we report efficiency metrics of our runs. For simplicity, we use the byte-level text classification benchmark and report run times and memory consumption of the sequence lengths $\{ 1 K , 2 K , 3 K , 4 K \}$ . We use a batch size of 32 (1 example per core) for all runs and conduct experiments on 4x4 TPU V3 Chips. We emphasize that these runs are again largely conditioned on hardware and implementation details. For speed (steps per second), this is based on realistic training speed (i.e., including overheads such as io, batching, pipeline etc.) More details can be found in the appendix. Do note that the main point of these efficiency numbers is to provide a relative comparison. For follow-up work, it would be ideal to always rerun these numbers on a comparable hardware/setup. We report inference speeds in the supplementary material.
146
+
147
+ Results on Train Speed Table 2 reports our efficiency benchmarks on the xformer models. We note that low-rank and kernel-based models are generally the fastest. The overall fastest model is the Performer model (Choromanski et al., 2020), which is $5 . 7 \times$ faster than Transformers on the $4 k$ sequence length. Linformer (Wang et al., 2020) and Linear Transformers (Katharopoulos et al., 2020) come in a close second and are almost as fast as Performers (at $5 . 5 \times$ to $5 . 6 \times$ faster). Local Attention is also considerably fast. Based on our implementation, the slowest model is the Reformer model (Kitaev et al., 2020) that is about $8 0 \%$ the speed of vanilla Transformer at $4 K$ sequence lengths and half the speed at $1 K$ sequence length.
148
+
149
+ Results on Memory Consumption The model with the smallest memory footprint in our benchmarks is the Linformer model, coming in at 0.99GB per TPU device as compared to 9.48GB per TPU device for the vanilla Transformers at $N = 4 K$ . That is about a $1 0 \mathbf { x }$ reduction in memory footprint. Similar to speed, Performers and Linear Transformers are also relatively compact and are almost as compact as Linformers. Other models (Local Attention, Reformers, BigBird, Synthesizers) are still less memory hungry compared to vanilla Transformers but are relatively less efficient (memory consumption wise) compared to Linformers, Performers, and Linear Transformers. We also notice that the memory consumption of models such as Linformer and Performer scales very well, with the memory usgae at $3 K$ and $4 K$ being approximately equal.
150
+
151
+ # 3.5 OVERALL RESULTS: NO ONE-SIZE-FITS-ALL
152
+
153
+ Based on our analysis, the best qualitative performance in terms of LRA score, i.e. integrated across all five tasks, is the BigBird model. While BigBird does not do extremely well on any individual task compared to other models, it has consistently good performance across all tasks. Performers and Linear Transformers have strong performance on some tasks but their average is lowered by the ListOps task.
154
+
155
+ Figure 3 shows the trade-off between qualitative performance (y-axis), model speed $\mathbf { \bar { X } }$ -axis), and memory footprint (size of the circles). While BigBird performs well, its speed is almost similar to the vanilla Transformer. In fact, based on our efficiency benchmarks in Table 2, it is slightly slower at shorter sequences (i.e., 1K-2K). On the other hand, a model like Local Attention is fast at the cost of lower quantitative performance. Among these models, the kernel-based variants, i.e., Performer, Linformer, and linear Transformer seem to be able to make a better trade-off in terms of speed and performance, while having reasonable memory usage. Overall, the models that lie on the pareto-optimal curve is BigBird and Performers.
156
+
157
+ ![](images/a428a7531556495795f45a82760c05fc67b0d83305b1c1d31477429bfdd8d6a3.jpg)
158
+ Figure 3: Trade-off between performance $y$ axis) and resources $x$ axis). On the left, circle size corresponds to memory footprint. On the right, it corresponds to examples per second.
159
+
160
+ # 4 RELATED WORK
161
+
162
+ # 4.1 EFFICIENT TRANSFORMERS
163
+
164
+ The pervasiveness of Transformer models, along with its well-known trait of being memory intensive, has spurred on a large number of innovations on this front. Early work in this area has typically considered a fixed pattern (local window) approach (Liu et al., 2018; Parmar et al., 2018). More advanced models have been proposed recently. Early work in this area has typically considered combinations of fixed patterns (Child et al., 2019; Ho et al., 2019; Beltagy et al., 2020; Zaheer et al., 2020) that learn sparse attention by considering combinations of fixed strides or local windows. There has been also interesting work in striving to learn these patterns patterns (Kitaev et al., 2020; Roy et al., 2020) using LSH hashing, clustering (Roy et al., 2020) and/or sorting (Tay et al., 2020b). The latest models are largely based on kernels (Katharopoulos et al., 2020; Choromanski et al., 2020) or low-rank approximations (Wang et al., 2020) which either treat the attention matrix as low-rank (using low-rank projections Wang et al. (2020)) or rewriting of the self-attention equation (Katharopoulos et al., 2020). For the sake of brevity, we refer interested readers to (Tay et al., 2020c) for a detailed survey of this line of research.
165
+
166
+ # 4.2 EXISTING BENCHMARKS
167
+
168
+ Generative Modeling / Language Modeling This generative modeling task requires predicting the next character, word, or pixel and is a staple in xformer evaluations (Roy et al., 2020; Kitaev et al., 2020). However, it has been debated how much long-range signal such tasks actually encode (Rae & Razavi, 2020). LSTM language models augmented with attention have been shown to rarely attend beyond seven preceding words of context (Daniluk et al., 2017) and samples from LSTM language models are known to quickly devolve into generic text. On the other hand, recent models such as the Transformer-XL (Dai et al., 2019) have been observed to be sensitive to a context of around 900 tokens and samples from large-scale models (Radford et al., 2019) maintain a consistent theme over much longer sequences. Even such recent models, however, can be improved by limiting the range of attention (Rae & Razavi, 2020). In sum, while standard language modelling datasets contain some long-range signal, which is required to perform long-range coreference resolution, reasoning with events, discourse understanding, etc. (Ruder et al., 2019) it seems to be overshadowed by the much stronger signal of short-term word co-occurrences and is thus difficult to evaluate.4
169
+
170
+ Question Answering Another commonly used evaluation task is question answering (QA; Zaheer et al., 2020). Open-domain QA in particular typically requires the model to answer questions based on long contexts such as entire Wikipedia documents (Joshi et al., 2017; Kwiatkowski et al., 2019) or even books (Kocisk ˇ y et al., 2018). Other datasets are explicitly designed to require multiple ´ ‘hops’ of reasoning (Welbl et al., 2018; Yang et al., 2018). Successful approaches are often highly engineered, computationally expensive systems that require pre-training and a separate retrieval model (Lee et al., 2019; Guu et al., 2020).
171
+
172
+ Natural Language Understanding / GLUE tasks Evaluation on natural language understanding (NLU) tasks is also common (Wang et al., 2020). Examples in most of these datasets such as MultiNLI (Williams et al., 2018) and SST (Socher et al., 2013) consist of single sentences and less than 100 tokens on average.
173
+
174
+ # 5 CONCLUSION
175
+
176
+ We proposed Long Range Arena (LRA), a new benchmark for evaluating progress on efficient Transformer research. Our new benchmark is challenging and probes at model capabilities in dealing with diverse data types and structures such as text, mathematics, and visual data. Our benchmark comprises of tasks ranging from $1 K$ to $1 6 K$ tokens. For the first time, we conduct an extensive side-by-side comparison of ten recently proposed efficient Transformer models. The experimental results show that these tasks are very challenging even for long-range Transformer models. The overall results show that there is no one-size-fits-all solution and trade-offs have to be made in terms of model quality and speed/memory. We plan to open source our code and benchmarks to facilitate future benchmarking, research and model development.
177
+
178
+ # REFERENCES
179
+
180
+ Samira Abnar and Willem Zuidema. Quantifying attention flow in transformers. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, 2020.
181
+
182
+ Joshua Ainslie, Santiago Ontanon, Chris Alberti, Philip Pham, Anirudh Ravula, and Sumit Sanghai. Etc: Encoding long and structured data in transformers. arXiv preprint arXiv:2004.08483, 2020.
183
+
184
+ Iz Beltagy, Matthew E Peters, and Arman Cohan. Longformer: The long-document transformer. arXiv preprint arXiv:2004.05150, 2020.
185
+
186
+ Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers. arXiv preprint arXiv:1904.10509, 2019.
187
+
188
+ Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Jared Davis, Tamas Sarlos, David Belanger, Lucy Colwell, and Adrian Weller. Masked language modeling for proteins via linearly scalable long-context transformers. arXiv preprint arXiv:2006.03555, 2020.
189
+
190
+ Zihang Dai, Zhilin Yang, Yiming Yang, William W. Cohen, Jaime Carbonell, Quoc V. Le, and Ruslan Salakhutdinov. Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context. In Proceedings of ACL 2019, 2019.
191
+
192
+ Michał Daniluk, Tim Rockt, Johannes Welbl, and Sebastian Riedel. Frustratingly Short Attention Spans in Neural Language Modeling. In Proceedings of ICLR 2017, 2017.
193
+
194
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
195
+
196
+ Jiafeng Guo, Yixing Fan, Qingyao Ai, and W Bruce Croft. A deep relevance matching model for ad-hoc retrieval. In Proceedings of the 25th ACM International on Conference on Information and Knowledge Management, pp. 55–64, 2016.
197
+
198
+ Kelvin Guu, Kenton Lee, Zora Tung, and Panupong Pasupat. REALM: Retrieval-Augmented Language Model Pre-Training. In Proceedings of ICML 2020, 2020.
199
+
200
+ Jonathan Ho, Nal Kalchbrenner, Dirk Weissenborn, and Tim Salimans. Axial attention in multidimensional transformers. arXiv preprint arXiv:1912.12180, 2019.
201
+
202
+ Sara Hooker. The hardware lottery. arXiv preprint arXiv:2009.06489, 2020.
203
+
204
+ R. Houtkamp and P. R. Roelfsema. Parallel and serial grouping of image elements in visual perception. J Exp Psychol Hum Percept Perform,, 2010.
205
+
206
+ Jeremy Howard and Sebastian Ruder. Universal Language Model Fine-tuning for Text Classification. In Proceedings of ACL 2018, 2018.
207
+
208
+ Jyun-Yu Jiang, Mingyang Zhang, Cheng Li, Michael Bendersky, Nadav Golbandi, and Marc Najork. Semantic text matching for long-form documents. In The World Wide Web Conference, pp. 795– 806, 2019.
209
+
210
+ Mandar Joshi, Eunsol Choi, Daniel S Weld, Luke Zettlemoyer, and Paul G Allen. TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehension. In Proceedings of ACL 2017, 2017.
211
+
212
+ Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and Franc¸ois Fleuret. Transformers are rnns: Fast autoregressive transformers with linear attention. arXiv preprint arXiv:2006.16236, 2020.
213
+
214
+ Kazuya Kawakami, Chris Dyer, and Phil Blunsom. Learning to discover, ground and use words with segmental neural language models. In Proceedings of ACL 2019, pp. 6429–6441, 2019.
215
+
216
+ Junkyung $\mathrm { K i m ^ { * } }$ , Drew Linsley\*, Kalpit Thakkar, and Thomas Serre. Disentangling neural mechanisms for perceptual grouping. In International Conference on Learning Representations, 2020.
217
+
218
+ Nikita Kitaev, Lukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer. In International Conference on Learning Representations, 2020. URL https://openreview. net/forum?id ${ . } = { }$ rkgNKkHtvB.
219
+
220
+ Toma´s Ko ˇ cisk ˇ y, Jonathan Schwarz, Phil Blunsom, Chris Dyer, Karl Moritz Hermann, G ´ abor Melis, ´ and Edward Grefenstette. The NarrativeQA Reading Comprehension Challenge. Transactions of the Association for Computational Linguistics, 2018.
221
+
222
+ Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, 2009.
223
+
224
+ Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin Kenton Lee, Kristina Toutanova, Llion Jones Matthew Kelcey, Ming-Wei Chang, Andrew M Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. Natural Questions: a Benchmark for Question Answering Research. In Transactions of the ACL, 2019.
225
+
226
+ Kenton Lee, Ming-Wei Chang, and Kristina Toutanova. Latent Retrieval for Weakly Supervised Open Domain Question Answering. In Proceedings of ACL 2019, 2019.
227
+
228
+ Drew Linsley, Junkyung Kim, Vijay Veerabadran, Charles Windolf, and Thomas Serre. Learning long-range spatial dependencies with horizontal gated recurrent units. In Advances in neural information processing systems, pp. 152–164, 2018.
229
+
230
+ Peter J Liu, Mohammad Saleh, Etienne Pot, Ben Goodrich, Ryan Sepassi, Lukasz Kaiser, and Noam Shazeer. Generating wikipedia by summarizing long sequences. arXiv preprint arXiv:1801.10198, 2018.
231
+
232
+ Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. Vilbert: Pretraining task-agnostic visiolinguistic representations for vision-and-language tasks. In Advances in Neural Information Processing Systems, pp. 13–23, 2019.
233
+
234
+ Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng, and Christopher Potts. Learning word vectors for sentiment analysis. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, pp. 142–150, Portland, Oregon, USA, June 2011. Association for Computational Linguistics. URL http: //www.aclweb.org/anthology/P11-1015.
235
+
236
+ Nikita Nangia and Samuel R Bowman. Listops: A diagnostic dataset for latent tree learning. arXiv preprint arXiv:1804.06028, 2018.
237
+
238
+ Denis Paperno, Angeliki Lazaridou, Quan Ngoc Pham, Raffaella Bernardi, Sandro Pezzelle, Marco Baroni, Gemma Boleda, and Raquel Fern. The LAMBADA dataset: Word prediction requiring a broad discourse context. In Proceedings of ACL 2016, 2016.
239
+
240
+ Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Łukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. arXiv preprint arXiv:1802.05751, 2018.
241
+
242
+ Dragomir R Radev, Pradeep Muthukrishnan, Vahed Qazvinian, and Amjad Abu-Jbara. The acl anthology network corpus. Language Resources and Evaluation, 47(4):919–944, 2013.
243
+
244
+ Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language Models are Unsupervised Multitask Learners. 2019.
245
+
246
+ Jack W Rae and Ali Razavi. Do Transformers Need Deep Long-Range Memory? In Proceedings of ACL 2020, pp. 7524–7529, 2020.
247
+
248
+ Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. arXiv preprint arXiv:1910.10683, 2019.
249
+
250
+ Alexander Rives, Siddharth Goyal, Joshua Meier, Demi Guo, Myle Ott, C Lawrence Zitnick, Jerry Ma, and Rob Fergus. Biological structure and function emerge from scaling unsupervised learning to 250 million protein sequences. bioRxiv, pp. 622803, 2019.
251
+
252
+ Aurko Roy, Mohammad Saffar, Ashish Vaswani, and David Grangier. Efficient content-based sparse attention with routing transformers. arXiv preprint arXiv:2003.05997, 2020.
253
+
254
+ Sebastian Ruder, Matthew E Peters, Swabha Swayamdipta, and Thomas Wolf. Transfer learning in natural language processing. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Tutorials, pp. 15–18, 2019.
255
+
256
+ Richard Socher, Alex Perelygin, Jean Y Wu, Jason Chuang, Christopher D Manning, Andrew $\mathrm { \Upsilon { Y g } }$ , and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of EMNLP 2013, pp. 1631–1642. Citeseer, 2013.
257
+
258
+ Hao Tan and Mohit Bansal. LXMERT: Learning Cross-Modality Encoder Representations from Transformers. In Proceedings of EMNLP 2019, 2019.
259
+
260
+ Yi Tay, Dara Bahri, Donald Metzler, Da-Cheng Juan, Zhe Zhao, and Che Zheng. Synthesizer: Rethinking self-attention in transformer models. arXiv preprint arXiv:2005.00743, 2020a.
261
+
262
+ Yi Tay, Dara Bahri, Liu Yang, Donald Metzler, and Da-Cheng Juan. Sparse sinkhorn attention. arXiv preprint arXiv:2002.11296, 2020b.
263
+
264
+ Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Metzler. Efficient transformers: A survey. arXiv preprint arXiv:2009.06732, 2020c.
265
+
266
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017.
267
+
268
+ Sinong Wang, Belinda Li, Madian Khabsa, Han Fang, and Hao Ma. Linformer: Self-attention with linear complexity. arXiv preprint arXiv:2006.04768, 2020.
269
+ Johannes Welbl, Pontus Stenetorp, and Sebastian Riedel. Constructing Datasets for Multi-hop Reading Comprehension Across Documents. In Transactions of the Association for Computational Linguistics, 2018.
270
+ Adina Williams, Nikita Nangia, and Samuel R. Bowman. A Broad-Coverage Challenge Corpus for Sentence Understanding through Inference. In Proceedings of NAACL-HLT 2018, 2018. URL http://arxiv.org/abs/1704.05426.
271
+ Liu Yang, Mingyang Zhang, Cheng Li, Michael Bendersky, and Marc Najork. Beyond 512 tokens: Siamese multi-depth transformer-based hierarchical encoder for document matching. CoRR, abs/2004.12297, 2020. URL https://arxiv.org/abs/2004.12297.
272
+ Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William W. Cohen, Ruslan Salakhutdinov, and Christopher D. Manning. HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answering. In Proceedings of EMNLP 2018, 2018.
273
+ Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, et al. Big bird: Transformers for longer sequences. arXiv preprint arXiv:2007.14062, 2020.
274
+
275
+ # A APPENDIX
276
+
277
+ # A.1 LRA TASKS
278
+
279
+ This section describes the details and hyperparameters of each task. We also plan to release the configuration files along with the implementation of the models and benchmarks, that can be used to reproduce the results reported in the paper.
280
+
281
+ # A.1.1 LISTOPS
282
+
283
+ Following the generation steps in (Nangia & Bowman, 2018), we generate our own long version of this task. We use a sequence length of $2 k$ for this task. All our xformer models have an embedding dimension of 512, 8 heads, 6 layers and a feed-forward dimensions of 2048. We train all models for $5 K$ steps. The [CLS] token is used and mapped into a 10 class Softmax layer for classification.
284
+
285
+ # A.1.2 BYTE-LEVEL DOCUMENT CLASSIFICATION
286
+
287
+ We use the IMDb reviews dataset (Maas et al., 2011) and a sequence length of $\{ 1 K , 2 K , 3 K , 4 K \}$ tokens for all models. We pick the best results across these four sequence lengths. We use a [cls] token for prediction. All the [cls] tokens from xformer encoders are passed into a two layered MLP with ReLU activations. The MLP emits a 2-class logits for binary classification. We optimize the softmax cross entropy loss function. All xformer models are parameterized by the same number of layers, heads and hidden dimensions, namely 8 heads, 512 hidden dimensions and $d = 2 0 4 8$ for positional FFN layers. We use 6 layers for all xformers. The learning rate is 0.05 with weight decay of 0.1. We use Adam with warmup. All models are trained for $2 0 K$ steps and a batch size of 32.
288
+
289
+ # A.1.3 BYTE-LEVEL DOCUMENT MATCHING
290
+
291
+ We use the ACL anthology network for a related article matching task. We use a sequence length of $4 K$ per document $8 K$ tokens in total for two sequences). The two encoders share parameters. Similar to document classification, we use the [cls] token from xformer encoders. Let $X _ { 1 }$ be the [cls] token embedding from document 1 and $X _ { 2 }$ be the [cls] token embedding from document 2, the final score is computed via:
292
+
293
+ $$
294
+ Y = \mathbf { M L P } ( [ X _ { 1 } , X _ { 2 } , X _ { 1 } * X _ { 2 } , X _ { 1 } - X _ { 2 } ] )
295
+ $$
296
+
297
+ where MLP(.) is a two layered MLP with relu activation functions. In lieu of the much longer sequence length, we use a batch size of 32, embedding dimension of 128, 4 heads, a FFN dimension of 512 and 4 layers. Model is trained with Adam for $5 K$ steps with a learning rate of 0.5.
298
+
299
+ # A.2 IMAGE CLASSIFICATION
300
+
301
+ We use the gray-scaled (single channel) CIFAR10 as the image classification dataset, with 10 classes. The resolution of input images is $3 2 \times 3 2$ and after flattening the input images, we feed our xformer encoders with a sequence of 1024 pixels. Similar to our other classification tasks, there is a classifier head on top of the xformer encoder, consisting of a two-layer MLP with ReLU activation. Softmax cross-entropy has been used for optimizing the parameters of the models. We trained our models for 200 epochs and have done extensive sweeps over different hyper-parameters and found the following values leading to the best average performance across all xformers: 3 layers, 4 heads, 128 as the hidden dimensions of FFN blocks, 64 as the query/key/value hidden dimensions, and finally the learning rate of 0.01.
302
+
303
+ # A.2.1 GENERALIZATION GAP
304
+
305
+ For the image classification benchmark, in Section 3, we mentioned that most of the models struggle generalizing to the test set. Table 3 presents the train and test accuracy for different models and for almost all these models, the gap between the two scores is considerably high.
306
+
307
+ While this task can be simple to solve for convectional models (e.g., accuracy of wide-resnet on gray-scale CIFAR10 with no data augmentation is 89.21) it is rather difficult for Transformer-based models with this setup. Naturally, one can find ways to improve the performance with a different setup. For instance, in our setup, models are not informed about the oridinality of pixel intensities and consume them as independent symbols. We observed that learning embedding that reflects this property is rather hard for most of these models (Figure ). If we simply replace the embedding layer with a CNN stem, we see imitate boost in the performance (e.g. replacing the embedding layer of a vanilla Transformer with a convectional stem, with $3 \times 3$ kernel, we get accuracy of 75.32).
308
+
309
+ Table 3: Test and train accuracy of different models on Image Classification task.
310
+
311
+ <table><tr><td>Model</td><td> test accuracy</td><td>train accuracy</td></tr><tr><td>Transformer</td><td>42.44</td><td>69.45</td></tr><tr><td>Local Attention</td><td>41.46</td><td>63.19</td></tr><tr><td>Sparse Trans.</td><td>44.24</td><td>66.74</td></tr><tr><td>Longformer</td><td>42.22</td><td>71.65</td></tr><tr><td>Linformer</td><td>38.56</td><td>97.23</td></tr><tr><td>Reformer</td><td>38.07</td><td>68.45</td></tr><tr><td>Sinkhorn Trans.</td><td>41.23</td><td>69.21</td></tr><tr><td>Synthesizer</td><td>41.61</td><td>97.31</td></tr><tr><td>BigBird</td><td>40.83</td><td>71.49</td></tr><tr><td>Linear Trans.</td><td>42.34</td><td>65.61</td></tr><tr><td>Performer</td><td>42.77</td><td>73.90</td></tr></table>
312
+
313
+ Another modification that can lead to better performance is to incorporate spatial representation that are translation invariant in Transformer models (e.g., adding 2D relative positional embedding to a vanilla transformer, we get accuracy of 61.72). However, adding these sorts of changes make the setup digress from the original point of this task in our benchmark.
314
+
315
+ # A.2.2 VISUALIZATIONS OF LEANED EMBEDDING BY A VANILLA TRANSFORMER
316
+
317
+ ![](images/539b16f973ccabd499075e7b3bd846338c27571947c166964299caf459e6454e.jpg)
318
+ Figure 4 presents visualizations for the pixel intensity and positional embedding that a vanilla transformer model learns for the image classification task, on the gray-scaled CIFAR10 detest.
319
+ Figure 4: Left: The cosine similarity between the embedding learned for each pixel intensity. Right: Each tile shows the cosine similarity between the position embedding of the pixel with the indicated row and column and the position embeddings of all other pixels.
320
+
321
+ On the left, we can see the pairwise similarity of learned embeddings for pixel intensities. Although there is a higher similarity for close pixel values, the patterns from these learned embeddings do not perfectly reflect the ordinality of the pixel intensities. On the right, we can see the pairwise similarity of positional embeddings for different input positions. We can see that the lower the distance between two pixels is, the more similar are their learned positional embeddings. However, the spatial closeness in $y$ axis is more preserved in the learned embedding than the distances in the $x$ axis.
322
+
323
+ # A.3 PATHFINDER
324
+
325
+ Pathfinder task probes the ability of models to detect long range spatial dependencies between input features. To solve the task, a model requires to identify the target contour and trace it from one end to the other. Although Pathfinder is visually a simple task, it has been show that the clutter and variations in path shape makes the task difficult for CNN models (Linsley et al., 2018; $\mathrm { K i m ^ { * } }$ et al., 2020).
326
+
327
+ The Pathfinder task is a binary classification task and the resolution of input images is $3 2 \times 3 2$ . Similar to image classification task, we feed our xformer encoders with a sequence of 1024 pixels after flattening the input images. The classifier head on top of the xformer encoder is also a twolayer MLP with ReLU activation and we use Softmax cross-entropy loss for the optimization. We trained our models for 200 epochs. The hyper-parameters used for the xformer model are as follow: 4 layers, 8 heads, 128 as the hidden dimensions of FFN blocks, 128 as the query/key/value hidden dimensions, and the learning rate of 0.01.
328
+
329
+ # A.3.1 VISUALIZATION OF THE ATTENTION MAPS FROM A VANILLA TRANSFORMER
330
+
331
+ Given that transformers have many units with global receptive field, they have better potential for solving the task, compared to models with local receptive fields. Figure 5 shows the attention distributions for a set of examples given on token (CLS token) as the query. We can see that the attention module collects information from different positions in input to be able to trace the target path.
332
+
333
+ ![](images/13740f676db95f3906d6ae2022c5082f779676324a028124c801f337a6795e3f.jpg)
334
+ Figure 5: Attention map for different examples from the Pathfinder task. Each map presents the attention distribution, given the CLS token at the final layer as the query, averaged across all heads in a vanilla Transformer model. Note that for visualization, we use attention-rollout (Abnar & Zuidema, 2020) for more precise input attribution.
335
+
336
+ We have also included a Pathfinder-X in LRA, which is similar to Pathfinder, but inputs are in higher resolutions, i.e. longer input sequences. On Pathfinder-X, we have tried two setups for training our models, first training models from scratch, second evaluating models that are trained on Pathfinder. In both cases, we found out none of the models are able to deal with/generalize to 16K input length.
337
+
338
+ # B MODELS AND IMPLEMENTATION
339
+
340
+ This section describes the details of our implementation. The code is primarily written in JAX and FLAX. In this section, we note specific details about certain implementations of models. We plan to release hyperparameters in a form of readme or script later.
341
+
342
+ # B.1 SPECIAL CASES OF OUR IMPLEMENTATION
343
+
344
+ This section describes several special cases in our implementation details. The diverse suite of Transformers come with a plethora of hardware constraints and implementation details. To succeed, a Transformer model needs to also ‘win’ the hardware lottery (Hooker, 2020), i.e., having readily supported ops, kernels or accelerator support to take advantage of its technical design. This section discusses some of the trade-offs and edge cases that make comparison of several models challenging. In the end, we argue that simplicity is a virtue and not requiring any special support is a positive thing for an efficient Transformer model.
345
+
346
+ On CUDA kernels CUDA kernels are cumbersome and are specific to GPU hardware, making it difficult to implement or use on TPU pods. Generally, these are considered to be undesirable and inconvenient in practical applications. Hence, Sparse Transformer and Longformer are implemented with equivalent implementations to emulate for performance. This is by applying an equivalent mask. For this reason, we do not benchmark Sparse Transformer and Longformer for speed.
347
+
348
+ Reformer’s Implementation Having optimized ops to support many of Reformer’s functionality is crucial. Hence, Reformer is implemented slightly differently from other Transformer models. Instead of computing tensors with batch size dimensions $B$ and head dimensions $H$ , (i.e., $B \times H \times$ $N \times d )$ , we compute the attention function for tensors of $N \times d$ dimensions. After which, we parallelize this function via VMAP over the batch and head dimensions.
349
+
350
+ # C INFERENCE SPEED BENCHMARKING
351
+
352
+ In section 3.4, we presented the comparison between the speed of different models at the training time. This section provides the results of a similar comparison, but at the evaluation/inference time.
353
+ Table 4: Speed (Steps per second) on running inference. Benchmarked on $4 \mathbf { x } 4$ TPU V3 chips with a batch size of 32 (1 example per core). Results are computed on Xformers with 4 layers, 8 heads, 128 hidden size. Similar to training, we include realistic evaluation time which includes pipeline ops, and batching into the overall time.
354
+
355
+ <table><tr><td>Model</td><td>1K</td><td>2K</td><td>3K</td><td>4K</td></tr><tr><td>Transformers</td><td>114</td><td>64</td><td>28</td><td>16</td></tr><tr><td>Local Attention</td><td>108 (0.47x)</td><td>110 (1.71x)</td><td>108 (3.86x)</td><td>111 (6.93x)</td></tr><tr><td>Reformer</td><td>54 (0.47x)</td><td>27 (0.42x)</td><td>18 (0.64x)</td><td>13 (0.81x)</td></tr><tr><td>Synthesizer</td><td>111 (0.97x)</td><td>106 (1.65x)</td><td>55 (1.96x)</td><td>31 (1.94x)</td></tr><tr><td>Sinkhorn Transformer</td><td>111 (0.97x)</td><td>108 (1.69x)</td><td>110 (3.92x)</td><td>100 (6.25x)</td></tr><tr><td>Linformer</td><td>112 (0.98x)</td><td>111 (1.73x)</td><td>109 (3.89x)</td><td>110 (6.88x)</td></tr><tr><td>BigBird</td><td>70 (0.61x)</td><td>34 (0.53x)</td><td>23 (0.82x)</td><td>17 (1.06x)</td></tr><tr><td>Linear Transformers</td><td>108 (0.95x)</td><td>111 (1.73x)</td><td>109 (3.89x)</td><td>111 (6.94x)</td></tr><tr><td>Performer</td><td>116 (1.02x)</td><td>110 (1.72x)</td><td>116 (4.14x)</td><td>110 (6.89x)</td></tr></table>
356
+
357
+ Inference results Overall, the relative results and trends on inference is not too different from training (shown in Table 2 of the main paper). Similarly, Performer, Linear Transformers, Linformer and Local Attention remains to be very strong in terms of inference speed. It is worth to also note that all xformer variants are slower than the vanilla Transformer at $1 K$ length. This is unlike training, where most xformers are performing at $\approx 1 . 1 \mathrm { x }$ speed of vanilla Transformers.
358
+
359
+ # D CONVERGENCE ANALYSIS
360
+
361
+ We analyze the convergence quality of these xformer models. We report the steps to $N \%$ accuracy on the Image benchmark. Given that the final val accuracy is about ${ \bar { 3 } } 8 \%$ to $4 0 \%$ for most models, we report the time for models take to reach $3 0 \%$ and $3 5 \%$ as an estimate of how fast these models converge5.
362
+
363
+ Table 5: Number of training steps to reach $N \%$ validation accuracy where $N = \{ 3 0 , 3 5 \}$
364
+
365
+ <table><tr><td>Model</td><td>N = 30%</td><td>N = 35%</td></tr><tr><td>Transformer</td><td>2048</td><td>3920</td></tr><tr><td>Local Attention</td><td>1425</td><td>3512</td></tr><tr><td>Sparse Transformer</td><td>1050</td><td>3325</td></tr><tr><td>Reformer</td><td>1720</td><td>6650</td></tr><tr><td>Linformer</td><td>452</td><td>875</td></tr><tr><td>Longformer</td><td>713</td><td>1575</td></tr><tr><td>Sinkhorn Transformer</td><td>875</td><td>1575</td></tr><tr><td>Synthesizer</td><td>2975</td><td>3325</td></tr><tr><td>Linear Transformer</td><td>2186</td><td>3500</td></tr><tr><td>BigBird</td><td>1225</td><td>2462</td></tr><tr><td>Performer</td><td>1400</td><td>2625</td></tr></table>
366
+
367
+ Results The Linformer model converges the fastest, followed by Longformer, Sinkhorn Transformers and then BigBird. The vanilla Transformer is a little on the slow side of convergence but is still faster than Reformer, the slowest model to converge. Notably, the convergence speed is not a signal of how well it would finally perform as noted in the results in Table 1.
368
+
369
+ # E ARCHIVAL SNAPSHOTS OF THE RUNS
370
+
371
+ This section reports the archival snapshots and change log of the leaderboard and comparisons of the different model. As we tune hyperparameters and fix certain issues, we will update the snapshot of the model comparison here. Future versions may also include other models that we benchmark and compare. For easy comparisons in future papers, please quote the version number of the leaderboard. We will continiously update this section in the appendix if there are any futhur updates on the existing models.
372
+
373
+ # E.1 VERSION 1: ICLR CAMERA READY.
374
+
375
+ Version 1 is active as of March 2021. The main changes is that we reran all models for the ListOps task. We train models for longer this time round for up to 10K steps.
376
+
377
+ <table><tr><td>Model</td><td>ListOps</td><td>Text</td><td>Retrieval</td><td>Image</td><td>Pathfinder</td><td>Path-X</td><td>Avg</td></tr><tr><td>Chance Transformer</td><td>10.00</td><td>50.00</td><td>50.00</td><td>10.00</td><td>50.00</td><td>50.00</td><td>44.00</td></tr><tr><td>Local Attention</td><td>36.38</td><td>64.27</td><td>57.46</td><td>42.44</td><td>71.40</td><td>FAIL</td><td>54.39</td></tr><tr><td>Sparse Trans.</td><td>15.95 35.78</td><td>52.98</td><td>53.39</td><td>41.46</td><td>66.63</td><td>FAIL</td><td>46.08</td></tr><tr><td></td><td></td><td>63.58</td><td>59.59</td><td>44.24</td><td>71.71</td><td>FAIL</td><td>54.98</td></tr><tr><td>Longformer</td><td>36.03</td><td>62.85</td><td>56.89</td><td>42.22</td><td>69.71</td><td>FAIL</td><td>53.54</td></tr><tr><td>Linformer</td><td>35.49</td><td>53.94</td><td>52.27</td><td>38.56</td><td>76.34</td><td>FAIL</td><td>51.32</td></tr><tr><td>Reformer</td><td>36.30</td><td>56.10</td><td>53.40</td><td>38.07</td><td>68.50</td><td>FAIL</td><td>50.47</td></tr><tr><td>Sinkhorn Trans.</td><td>34.20</td><td>61.20</td><td>53.83</td><td>41.23</td><td>67.45</td><td>FAIL</td><td>52.78</td></tr><tr><td>Synthesizer</td><td>36.50</td><td>61.68</td><td>54.67</td><td>41.61</td><td>69.45</td><td>FAIL</td><td>52.78</td></tr><tr><td>BigBird</td><td>37.08</td><td>64.02</td><td>59.29</td><td>40.83</td><td>74.87</td><td>FAIL</td><td>55.22</td></tr><tr><td>Linear Trans.</td><td>17.15</td><td>65.90</td><td>53.09</td><td>42.34</td><td>75.30</td><td>FAIL</td><td>50.76</td></tr><tr><td>Performer</td><td>36.00</td><td>65.40</td><td>53.82</td><td>42.77</td><td>77.05</td><td>FAIL</td><td>55.01</td></tr><tr><td>Task Avg (Std)</td><td>32 (7.9)</td><td>61 (4.6)</td><td>55 (2.6)</td><td>41 (1.8)</td><td>72 (3.7)</td><td>FAIL</td><td>52 (2.4)</td></tr></table>
378
+
379
+ Table 6: Experimental results on Long-Range Arena benchmark. Best model is in boldface and second best is underlined. All models do not learn anything on Path-X task, contrary to the Pathfinder task and this is denoted by FAIL. This shows that increasing the sequence length can cause seriously difficulties for model training. We leave Path-X on this benchmark for future challengers but do not include it on the Average score as it has no impact on relative performance.
380
+
381
+ # E.1.1 NOTABLE CHANGES
382
+
383
+ The main outcome on the new leaderboard is as such:
384
+
385
+ • The relative results on Listops largely remain unchanged for most models. However, models such as Performer and Linformer managed to get comparable results to the other models with more training steps. • Performer is now the 2nd best model. BigBird is still the leading model.
386
+
387
+ # E.2 VERSION 0: ORIGINAL RESULTS TO ICLR
388
+
389
+ Version 0 ran from September 2020 to March 15th 2021.
390
+
391
+ Table 7: Experimental results on Long-Range Arena benchmark. Best model is in boldface and second best is underlined. All models do not learn anything on Path-X task, contrary to the Pathfinder task and this is denoted by FAIL. This shows that increasing the sequence length can cause seriously difficulties for model training. We leave Path-X on this benchmark for future challengers but do not include it on the Average score as it has no impact on relative performance.
392
+
393
+ <table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>ListOps Text Retrieval Image Pathfinder Path-X</td><td rowspan=1 colspan=1>Avg</td></tr><tr><td rowspan=1 colspan=1>Chance</td><td rowspan=1 colspan=1>10.00 50.00 50.00 10.00 50.00 50.00</td><td rowspan=1 colspan=1>44.00</td></tr><tr><td rowspan=1 colspan=1>Transformer</td><td rowspan=1 colspan=1>36.37 64.27 57.46 42.44 71.40 FAIL</td><td rowspan=1 colspan=1>54.39</td></tr><tr><td rowspan=1 colspan=1>Local Attention</td><td rowspan=1 colspan=1>15.82 52.98 53.39 41.46 66.63 FAIL</td><td rowspan=1 colspan=1>46.06</td></tr><tr><td rowspan=1 colspan=1>Sparse Trans.</td><td rowspan=1 colspan=1>17.07 63.58 59.59 44.24 71.71 FAIL</td><td rowspan=1 colspan=1>51.24</td></tr><tr><td rowspan=2 colspan=1>LongformerLinformer</td><td rowspan=1 colspan=1>35.63 62.85 56.89 42.22 69.71 FAIL</td><td rowspan=1 colspan=1>53.46</td></tr><tr><td rowspan=1 colspan=1>35.70 53.94 52.27 38.56 76.34 FAIL</td><td rowspan=1 colspan=1>51.36</td></tr><tr><td rowspan=1 colspan=1>Reformer</td><td rowspan=1 colspan=1>37.27 56.10 53.40 38.07 68.50 FAIL</td><td rowspan=1 colspan=1>50.67</td></tr><tr><td rowspan=1 colspan=1>Sinkhorn Trans.</td><td rowspan=1 colspan=1>33.67 61.20 53.83 41.23 67.45 FAIL</td><td rowspan=1 colspan=1>51.39</td></tr><tr><td rowspan=2 colspan=1>SynthesizerBigBird</td><td rowspan=1 colspan=1>36.99 61.68 54.67 41.61 69.45 FAIL</td><td rowspan=1 colspan=1>52.88</td></tr><tr><td rowspan=1 colspan=1>36.05 64.02 59.29 40.83 74.87 FAIL</td><td rowspan=1 colspan=1>55.01</td></tr><tr><td rowspan=1 colspan=1>Linear Trans.</td><td rowspan=1 colspan=1>16.13 65.90 53.09 42.34 75.30 FAIL</td><td rowspan=1 colspan=1>50.55</td></tr><tr><td rowspan=1 colspan=1>Performer</td><td rowspan=1 colspan=1>18.01 65.40 53.82 42.77 77.05 FAIL</td><td rowspan=1 colspan=1>51.41</td></tr><tr><td rowspan=1 colspan=1>Task Avg (Std)</td><td rowspan=1 colspan=1>29 (9.7) 61 (4.6) 55 (2.6) 41 (1.8) 72 (3.7) FAIL</td><td rowspan=1 colspan=1>52 (2.4)</td></tr></table>
parse/train/qVyeW-grC2k/qVyeW-grC2k_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/qVyeW-grC2k/qVyeW-grC2k_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/qVyeW-grC2k/qVyeW-grC2k_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/r1GB5jA5tm/r1GB5jA5tm.md ADDED
@@ -0,0 +1,406 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ADVERSARIAL SAMPLING FOR ACTIVE LEARNING
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ This paper proposes ASAL, a new pool based active learning method that generates high entropy samples. Instead of directly annotating the synthetic samples, ASAL searches similar samples from the pool and includes them for training. Hence, the quality of new samples is high and annotations are reliable. ASAL is particularly suitable for large data sets because it achieves a better run-time complexity (sub-linear) for sample selection than traditional uncertainty sampling (linear). We present a comprehensive set of experiments on two data sets and show that ASAL outperforms similar methods and clearly exceeds the established baseline (random sampling). In the discussion section we analyze in which situations ASAL performs best and why it is sometimes hard to outperform random sample selection. To the best of our knowledge this is the first adversarial active learning technique that is applied for multiple class problems using deep convolutional classifiers and demonstrates superior performance than random sample selection1.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ The goal of active learning (AL) algorithms is to train a model most efficiently, i.e. achieving the best performance with as few labelled samples as possible. Typical AL algorithms operate in an iterative fashion, where in each AL-cycle a query strategy selects samples that the oracle should annotate. These samples are expected to improve the model most effectively when added to the training set. This procedure continues until a predefined stopping criteria is met.
12
+
13
+ In this paper we will mainly focus on pool based active learning, because a pool of unlabelled samples is often available beforehand or can easily be build. Furthermore, annotating all pool samples serves as an ideal evaluation environment for active learning algorithms. It enables to train a fullysupervised model that establishes a performance upper bound on this data set. Similarly, randomly selecting instead of actively choosing samples establishes a lower bound. Then, the goal of an active learning algorithm is to approximate the performance of the fully supervised model with as few labelled samples as possible, while exceeding the performance of random sampling.
14
+
15
+ Uncertainty sampling is an effective query strategy that identifies samples that are more informative than random ones. The heuristic is, that samples for which the model is most uncertain contain new information and improve the model. However, to identify such samples an exhaustive search over the full pool is required and the uncertainty score needs to be recomputed as soon as the model is updated (each AL cycle). Thus, uncertainty sampling has a linear run-time complexity such that scanning very large unlabelled data sets is impractical even for inexpensive score functions.
16
+
17
+ Our contributions are as follows:
18
+
19
+ • We propose Adversarial Sampling for Active Learning (ASAL) that allows to approximate the performance of uncertainty sampling with a sub-linear run-time complexity. • We conduct an extensive set of experiments using four different benchmarks (two and ten classes) and discuss the limitations of ASAL and how to overcome them. We demonstrate ASAL with different CNN based classifiers and three different feature sets to compare samples: raw pixel values, compressed representations of an auto-encoder and the features used to discriminate between real and fake samples in GANs.
20
+
21
+ # 2 RELATED WORK
22
+
23
+ We review related work on active learning especially on pool based uncertainty sampling and methods attempting to improve the run-time complexity of these active learning methods.
24
+
25
+ Pool-based active learning methods select new training samples from a predefined unlabelled data set (Hospedales et al. (2013); Nguyen & Smeulders (2004); Yang et al. (2015)). A common query strategy to identify new samples is uncertainty sampling( Joshi et al. (2009); Yang & Loog (2016)). Tong & Koller (2001) and Campbell et al. (2000) use minimum-distance sampling to train Support Vector Machines (SVMs). Minimum distance sampling is a well known uncertainty sampling strategy, it assumes that the classifier is uncertain about samples in the vicinity of the separating hyper-plane. This strategy is mainly used for two class but can be extended to multiple class problems by using the SVM in one vs. one or one vs. all settings (Jain et al. (2010)). Joshi et al. (2009) use information entropy to measure the uncertainty of the classifier for a particular sample. Computing uncertainty with information entropy is equally suitable for two or multiple classes.
26
+
27
+ Jain et al. (2010) propose two hashing based method to accelerate minimum distance sampling by selecting new samples in sub-linear time. These methods are designed to select the closest point (approximately) to a hyper-plane in a $k$ -dimensional feature space, where the positions of the data points are fixed but the hyper-plane is allowed to move. Thus, these methods are limited to SVMs with fixed feature maps, because, if the feature map changes, the position of the samples become obsolete and need to be recomputed. Hence, the run time complexity is sub-linear for constant feature maps and linear otherwise. Unfortunately, CNN based methods update their feature maps during training. Thus, their methods are as efficient as exhaustive uncertainty sampling if CNNs are involved.
28
+
29
+ Zhu & Bento (2017) propose Generative Adversarial Active Learning (GAAL) that uses a Generative Adversarial Network (GAN), that is trained on the pool samples, to generate synthetic samples in each AL cycle. Generating instead of selecting uncertain samples leads to a constant run-time complexity because producing a new sample is independent of the pool size. Zhu & Bento (2017) use the traditional minimal distance optimization problem (see Eq. 1) but replace the variable $x$ (denoting a pool sample) with the trained generator. Then, they use gradient descent to minimize the objective. The latent variable minimizing the objective results in a synthetic image close to the separating hyper-plane. They annotate the synthetic sample and use it for training. Zhu & Bento (2017) demonstrate GAAL on subsets of MNIST and CIFAR-10 (two classes) using linear SVMs and DCGANs (Radford et al. (2015); Goodfellow et al. (2014)). However, GAAL performs worse than random sampling on both data sets, because it suffers from sampling bias and annotating is arbitrarily hard caused by sometimes poor quality of the synthetic uncertain samples. Note, that the GAAL requires visually distinct classes (horse & automobile) to enable manual annotations at all.
30
+
31
+ We propose ASAL that reuses the sample generation idea of Zhu & Bento (2017) but we use information entropy as uncertainty score and directly extend it to multiple classes. Additionally, ASAL uses CNN based classifiers instead of linear SVMs. For the generator we train Wasserstein GANs beforehand (Arjovsky et al. (2017)). We avoid annotating synthetic images by selecting the most similar ones from the pool with a newly developed sample matching method. We propose three different feature maps that we compute for each pool sample to fit a fast nearest neighbour model beforehand. During active learning, we compute the feature map of the synthetic sample and retrieve the most similar one from the pool in sub-linear time.
32
+
33
+ # 3 BACKGROUND
34
+
35
+ In this section we introduce the two uncertainty query strategies: minimum distance and maximum entropy sampling. We use the following notation: The set describing the pool is denoted by $\mathcal { P }$ , the classifier at each AL cycle $k$ is denoted by $\theta ^ { k }$ .
36
+
37
+ # 3.1 UNCERTAINTY SAMPLING
38
+
39
+ For uncertainty sampling where the model consists of a SVM the query strategy is based on the assumption that the model is least certain for samples that are in the vicinity of the separating hyper
40
+
41
+ ![](images/f6e9f305c76ab142ef0449b203dbe614990696d4a791264e0f51fcce20ba119c.jpg)
42
+ Figure 1: Block diagram of ASAL, where $( X ^ { k } , Y ^ { k } )$ with $( x , y )$ is the training set at cycle $k , \theta$ is the classifier, $z$ the latent variable, $G$ the generator, $\tilde { x }$ the synthetic samples, $F$ the feature extractor, $f$ the features, $\mathcal { P }$ the pool and NN the nearest neighbour method.
43
+
44
+ plane. Thus, newly selected samples are close to the decision boundary, are ideally support vectors that improve the decision boundary. Minimal distance sampling using SVM reads as
45
+
46
+ $$
47
+ \begin{array} { r l } & { \mathrm { m i n i m i z e ~ } \quad \| ( \mathbf { w } ^ { k } ) ^ { \top } \phi ( x ) + b ^ { k } \| _ { 2 } } \\ & { \mathrm { s u b j e c t ~ t o ~ } x \in \mathcal { P } . } \end{array}
48
+ $$
49
+
50
+ where w and $b$ define the separating hyper-plane and $\phi ( \cdot )$ is a feature map, e.g. induced by a SVM kernel or a neural network. Instead of considering the distance to the separating hyper-plane, information entropy computes the information content in each sample for the current classifier. Thus, the classifier is uncertain for samples with a high entropy and these samples have a high information content for the task of improving the classifier. Maximum entropy sampling read as follows:
51
+
52
+ $$
53
+ \begin{array} { r l } { \mathrm { m a x i m i z e } } & { { } H _ { \theta ^ { k } } ( x ) } \\ { \mathrm { s u b j e c t t o } } & { { } x \in \mathcal { P } , } \end{array}
54
+ $$
55
+
56
+ where $\begin{array} { r } { H _ { \theta ^ { k } } ( x ) : = \sum _ { i = 1 } ^ { m } P ( c = i | x ; \theta ^ { k } ) \log [ P ( c = i | x ; \theta ^ { k } ) ] } \end{array}$ and $m$ is the number of categories.
57
+
58
+ Solving the optimization problems requires an exhaustive search over the whole pool $\mathcal { P }$ that requires computing the uncertainty score for each sample. Furthermore, we need to recompute the uncertainty score in each AL cycle because updating the classifier invalidates the previous score. Thus, classical uncertainty sampling has a linear run time complexity $\mathcal { O } ( | \mathcal { P } | )$ with respect to the pool size $| \mathcal { P } |$ .
59
+
60
+ # 4 PROPOSED ADVERSARIAL SAMPLING FOR ACTIVE LEARNING
61
+
62
+ ASAL adapts the sample generation idea of Zhu & Bento (2017) to pool based active learning using multiple classes and information entropy to measure uncertainty. Fig. 1 shows the main components of the proposed ASAL. We use a labelled data set $( X ^ { k } , Y ^ { k } )$ to train the classifier $\theta ^ { k }$ . Then, we use the trained classifier $\theta ^ { k }$ and the generator $G$ to produce uncertain samples $\tilde { x }$ . The feature extractor $F$ computes features that the nearest neighbour model uses to retrieve the most similar real samples from the pool. Finally, an oracle annotates the new samples and adds them to the training set. Then, a new AL cycle starts.
63
+
64
+ In the remainder of this section, we introduce the adversarial sample generation and the sample matching method.
65
+
66
+ # 4.1 ADVERSARIAL SAMPLE GENERATION USING GANS
67
+
68
+ Instead of selecting uncertain samples from the pool, we follow Zhu & Bento (2017) and generate such samples using GANs, that we train on the pool beforehand. GANs enable to approximate the underlying data distribution of the pool where the discriminator $D$ ensures that the samples drawn from the generator $G$ are indistinguishable from real samples. At convergence, the generator produces the function $G : { \mathcal { R } } ^ { n } \to { \mathcal { X } }$ that maps the latent space variable $z \stackrel { \cdot } { \sim } \mathcal { N } ( \mathbf { 0 } _ { n } , \bar { \mathbf { I } _ { n } } )$ to the image domain $\mathcal { X }$ . Including the generator $G ( \cdot )$ in Eq. equation 2 leads to the following optimization problem with respect to $x$
69
+
70
+ ![](images/3de509b04af3626dbce68764a94ec923cc06ba1f89c25618df1aee89b3ba2629.jpg)
71
+ Figure 2: The rows show either generated or matched samples using different feature sets for MNIST - ten classes. The brackets denote (label id / sample id).
72
+
73
+ $$
74
+ \begin{array} { l l } { \mathrm { m i n i m i z e ~ } } & { \left( - H _ { \theta ^ { k } } \circ G \right) ( z ) } \\ { \mathrm { s u b j e c t ~ t o ~ } } & { x = G ( z ) . } \end{array}
75
+ $$
76
+
77
+ Removing the constraint $x \in \mathcal { P }$ by including the generator simplifies the problem but changes its solution. New samples are no longer selected from the pool but are visually indistinguishable from these samples. We solve the optimization problem in two steps: (i) we use the chain rule and gradient descent to minimize the objective with respect to $z$ and (ii) we use $G$ to recover a synthetic sample $x$ from $z$ . Thus, solving problem equation 3 has a constant run-time complexity $\mathcal { O } ( 1 )$ because it is independent of the pool size.
78
+
79
+ # 4.2 SAMPLE MATCHING
80
+
81
+ The goal of the sample matching method is retrieving the most similar sample from the pool for a given synthetic sample. Thus, we need (i) representative features for comparison, (ii) a distance measure and (iii) a fast nearest neighbour method.
82
+
83
+ The ideal features would group the samples with similar entropy in features space close together. This guarantees that the nearest real neighbour of a synthetic sample with high entropy has a high entropy as well. However, updating the model, changes the entropy of each sample in the pool and destroys the previous structure in feature space. Thus, keeping a similar grouping in feature space, requires updating the features and recomputing the position of each sample. This leads to a linear run-time complexity. Hence, for a more efficient method we require fixed features for sample matching. To design such features, we use the fact that they are not required to structure the samples according to their entropy. Indeed it is sufficient that the features identify one sample in the pool that is very similar to the synthetic sample. Then, the two samples will not only share properties the classifier is comfortable with, but also the features that lead to high entropy. Thus, the features should be representative for the data set, be diverse and allow to discriminate the main properties of different samples.
84
+
85
+ The raw pixel values are a simple representation that allows to differentiate between different samples but is close for images with similar scene. Auto-encoders extract more representative features for a specific data set than the raw pixel values and lead to a compressed set of core features representing the images. Additionally, we study the features extracted from the discriminator that was used in the training of the GAN. We expect that the features used to differentiate between real and synthetic samples allow to compute representative sample properties.
86
+
87
+ We use the Euclidean distance measure to compute the similarity between two samples in feature space. Furthermore, we use a multidimensional binary search tree (k-d tree) (Bentley (1975)) for efficient nearest neighbour selection. The run-time complexity to search a nearest neighbour is sub-linear $\mathcal { O } ( \log ( | \mathcal { P } | )$ with respect to the pool size $| \mathcal { P } |$ . Additionally, we use Principal Component Analysis (PCA) to reduce the number of dimensions of the feature space to achieve a small absolute run-time and to ensure similar run-times when using different features set with different number of dimensions.
88
+
89
+ # 5 EXPERIMENTS
90
+
91
+ # 5.1 DATASETS
92
+
93
+ For the experiments we use two different dataset: MNIST (LeCun et al. (1998)) and CIFAR10 (Krizhevsky (2009)). The MNIST data set contains ten different digits 0 to 9 unevenly distributed. Each image has a resolution of $2 8 \times 2 8$ gray-scale pixels. The data set consists of 50k training, $1 0 \mathrm { k }$ validation and $1 0 \mathrm { k }$ testing samples. The CIFAR-10 consists of $5 0 \mathrm { k }$ training and $1 0 \mathrm { k }$ validation $3 2 \times 3 2$ color images with uniformly distributed label categories. We use the validation set for testing. For close comparison we follow Zhu & Bento (2017) and construct two class data sets, consisting of the MNIST digits 5 & 7 and the CIFAR-10 classes automobile & horse.
94
+
95
+ # 5.2 EXPERIMENTAL SETTINGS
96
+
97
+ First, we produce different references to assess the performance of ASAL. The classification accuracy for the fully supervised model establishes a performance upper bound that any active learning strategy attempt to approximate with as few training samples as possible. Furthermore, random sampling establishes the baseline that we want to exceed or at least perform equally. Additionally, we report the performance of traditional pool-based maximum entropy sampling that ASAL tries to approximate with sub-linear run-time complexity.
98
+
99
+ We examine three different versions of ASAL using the previously introduced set of features: ASALGray/RGB, ASAL-Autoencoder, and ASAL-Discriminator. We reduce the dimension of the feature space to 50 using PCA. We experimentally verified that larger dimensions only increase the runtime but do not lead to better classification accuracy. To synthesize new samples we use the Adam optimizer and apply 100 gradient steps to minimize the negative entropy with respect to the latent space variable (see Eq. equation 3). Note, that we directly optimize for multiple latent space variables at the same time, embedding them in one batch with random initialization. We always draw samples from the pool without replacement. We do not use data augmentation for any experiment and train all models from scratch in each AL cycle. We run all experiments for five different runs with different random seeds except the computationally demanding experiments on CIFAR-10 with ten classes that we run for three random seeds. We report the training iterations for the GANs on each data sets in Tab. 3 in the appendix. We use the default values for all other parameters given by Gulrajani et al. (2017) and Wei et al. (2018a) in the papers and code (Gulrajani (2018); Wei et al. (2018b)). We describe the different architectures and training settings of the auto-encoders in Sec. B in the appendix. Additionally, we report further insights such as label distribution, entropy of newly added samples and additional experiments using other GANs or uncertainty scores in the appendix.
100
+
101
+ # 5.3 CLASSIFICATION RESULTS ON MNIST - TWO CLASSES
102
+
103
+ For binary digit classification we train a linear model with cross entropy loss. We train the model for 10 epochs using the Adam optimizer (Kingma & Ba (2015)) with a batch size of 10 and learning rate of 0.001. We train the Wasserstein GAN (Gulrajani et al. (2017)) with gradient penalty to synthesize only the digits 5 & 7. Fig. 3a shows that for a budget of 500 samples only the aggressive active learner reaches the performance of the fully supervised model. However, ASAL performs clearly superior to random sampling and converges faster to the accuracy of the fully supervised model. We want to emphasize, that all ASAL strategies outperform random sampling. Furthermore, Fig. 3b verifies that the entropy of newly added samples to the training set is higher for ASAL than for random sampling. On average, all versions of ASAL select samples with $63 \%$ higher entropy than randomly selected samples.
104
+
105
+ ![](images/799bec87690c5ec9061c7a019bfbd3f97576f697af1112ef311d9df91a7eb2c3.jpg)
106
+ Figure 3: Test accuracy and entropy for different methods on MNIST - two classes.
107
+
108
+ # 5.3.1 PERFORMANCE COMPARISON BETWEEN THE PROPOSED ASAL AND GAAL
109
+
110
+ Zhu & Bento (2017) report worse performance than random sampling when training and testing on MNIST - two classes. For comparison we re-implement their GAAL with DCGAN. For a fairer comparison, we use an improved version of GAAL using the same Wasserstein GAN as ASAL and additionally test ASAL with the DCGAN. Fig. 3c shows that our implementation of GAAL performs similarly as random sampling and suffers less from sampling bias than reported by Zhu & Bento (2017). Possible reasons are the different human annotators or slightly different design choices. Furthermore, we observe that both methods outperform random sampling when using Wasserstein GANs and perform worse when using DCGAN. However, ASAL exceeds the performance of GAAL especially when using the Wasserstein GAN. Furthermore, using Wasserstein GAN leads to less stable performance of GAAL than ASAL(higher variance between 250 and 300 training samples for GAAL, note the red spikes in negative direction). Fig. 3c shows only the results for ASAL-Gray, for additional results, see Fig. 10 in the appendix.
111
+
112
+ # 5.4 CLASSIFICATION RESULTS ON CIFAR-10 - TWO CLASSES
113
+
114
+ For binary classification on CIFAR-10, we reuse the experimental setup presented in Sec. 5.3 but change the batch size to 50. We run the active learning strategies until the budget of 1000 samples is reached. Again we use a Wasserstein GAN (Gulrajani et al. (2017)) with gradient penalty that synthesizes only two classes (automobile & horse). Fig. 4b shows that especially ASAL-Autoencoder exceeds the performance of random sampling and achieves similar or slightly better results than exhaustive uncertainty sampling, for a training set containing more than 500 samples.
115
+
116
+ # 5.5 CLASSIFICATION RESULTS ON MNIST - TEN CLASSES
117
+
118
+ For ten digit classification we use LeNet (LeCun et al. (1998)) with cross entropy. We train the model for 10 epochs using the Adam optimizer with a batch size of 50 and learning rate of 0.001. For active learning, we start with an initial data set containing 10 samples for each class and add 50 samples each AL cycle. We run our experiments until the training set contains $1 0 \mathrm { k }$ samples. We synthesize samples for all ten classes using a Wasserstein GAN with gradient penalty Gulrajani et al. (2017). Fig. 4a shows that the proposed ASAL strategies also tackle multiple class problems and exceed the quality of random sampling.
119
+
120
+ # 5.6 CLASSIFICATION RESULTS ON CIFAR-10 - TEN CLASSES
121
+
122
+ Using all classes of CIFAR-10 complicates the classification task and we require a deep model to achieve close to state-of-the-art results. Therefore, we use the All-CNN model proposed by Springenberg et al. (2014) with a reported classification error of $9 . 0 8 \%$ . We use the proposed architectures and training strategies and use stochastic gradient descent with constant momentum of 0.9 and a learning rate of 0.01 that we decay by a factor of 10 at the 130th and the 140th epoch. We train the model for 150 epochs with a batch size of 128 without data augmentation and report a classification error of $1 1 . 8 \%$ . The All-CNN contains ${ \sim } 1 . 4$ million different parameters. Hence, we require larger initial training sets than for the previous models. Thus we include 100 randomly selected images per class. We add 1000 samples to the data set every AL cycle until the budget of $3 0 \mathrm { k }$ samples is reached. We generate ten times a batch containing 100 samples because optimizing for all samples at the same time is unfeasible. In contrast to the previous experiments we use a residual Wasserstein GAN (Wei et al. (2018a)) with gradient penalty and soft consistency term. We observed an Inception score of 7.8 without and 8.3 with adding the soft consistency term. We use the publicly available TensorFlow implementation of Wei et al. (2018b).
123
+
124
+ ![](images/219ab3915c845447e292baf5c95c02c349439da1704721a337c9763ee08ab248.jpg)
125
+ Figure 4: Test accuracy of ASAL on MNIST and CIFAR-10.
126
+
127
+ ![](images/f9ddb302001f5d95e7c13b7c39ac733ee2f2ccb7939c28484c3e6d552da78dfa.jpg)
128
+ Figure 5: The rows show either generated or matched samples using different feature sets for CIFAR10 - ten classes. The brackets denote (label id / sample id).
129
+
130
+ Fig. 4c shows the results for different ASALs using the promising residual GAN, that achieves the highest Inception score. Unfortunately, Fig. 4c shows that the performance of ASAL follows random sampling or is slightly worse, whereas maximum entropy sampling converges to the quality of the fully supervised model but uses $60 \%$ of all pool samples. Figs. 26 and 27 in the appendix show the label distribution for each AL cycle. It reveals that maximum entropy sampling selects most frequently cat exactly one of the classes that are least frequent in most of the training set of ASAL. Furthermore, Fig. 24 in the appendix reports the same experiments using different GANs but none of them leads to superior performance than random sampling.
131
+
132
+ # 5.7 DISCUSSION
133
+
134
+ Our experiments and results show that ASAL clearly outperforms random sampling and approximates exhaustive uncertainty sampling on three out of four benchmarks. Compared to GAAL, ASAL outperforms random sampling, enables annotating real samples, handles multiple class problems and uses CNN based classifiers. ASAL allows to update the feature maps of a classifier in each AL cycle and still achieves sub-linear run-time complexity whereas the hashing based methods of Jain et al. (2010) has a linear run-time complexity if the feature maps are updated. Updating the classifier and keeping the features for matching fixed, leads to sub-linear run-times but without guaranteeing that newly added samples have the highest entropy of all samples available in the pool.
135
+
136
+ To achieve a sub-linear run-time complexity, ASAL requires to train a GAN and potentially an autoencoder beforehand. Nonetheless, this initial cost pays off for extremely large data sets. Although, it might be impractical to consider each sample during training of the GAN, it can generate representative samples and ASAL allows to select samples from the pool that were not used to train the GAN. Thus, ASAL favours large data sets with similar samples, where it is only possible to train the GAN for a fixed number of iterations but contains a close match for any synthetic sample. Conversely, small data sets with diverse samples allow to train the GANs for many epochs such that it is align to the data distribution. However, real samples are sparsely distributed in feature space such that even the closest matches of a synthetic sample are significantly different.
137
+
138
+ We observed in Fig. 4c that ASAL performs similar as random sampling. Although ASAL enables to generate uncertain samples, it fails to select similar samples from the pool that have high entropy. One explanation is the aforementioned situation, where the images are diverse but the data set is comparatively small. Note, that CIFAR-10 is clearly more diverse than MNIST but has the same amount of samples. Furthermore, the top row in Fig. 5 shows that synthetic images still look unrealistic and identifying a similar real sample is a challenging problem. Another reason for poor performance is using low level features to compare different samples. To achieve state-of-the-art results on CIFAR-10, we had to use a much deeper network than for all other experiments but kept the architectures of the feature extractors almost identical. This can lead to a mismatch where the entropy of a sample mainly depends on high-level features but the matching method uses only low-level features to compare samples. Fig. 26 in the appendix shows for example that exhaustive uncertainty sampling selects most frequently images with the category cat exactly a class that ASAL selects least frequently. This is a sign that ASAL considers low-level features to find similar samples instead of more complex properties that characterize class information. Fig. 5 provides again such an indication. The last column shows a synthetic image with a white horse on a gray background and ASAL proposes matches with white object on a gray background but contain either a ship or an airplane. This means, that the classifier requires samples of a specific class it is uncertain about, ASAL generates these samples but fails to retrieve matches showing theses categories.
139
+
140
+ On CIFAR-10 - two classes we reported for ASAL-Autoencoder similar or slightly higher accuracy than for exhaustive uncertainty sampling. Although we consider uncertainty sampling as a performance reference that we try to approximate, it is always possible to exceed its performance. Note, entropy is one particular property that can identify informative samples. Nonetheless, it is possible that samples with lower entropy are more effective for training the classifier.
141
+
142
+ # 6 CONCLUSION
143
+
144
+ We proposed and evaluated a new pool-based active learning method that uses sample generation and matching. However, the sub-linear run-time complexity requires relaxing the guarantee, that selected samples have the highest entropy of all pool samples. We showed, that the success of ASAL depends on different factors: the structure of the data set, the quality of the trained GAN and the relevance of the feature used to compare samples. A poor GAN can generate high entropy samples but poor quality samples are impractical to match. Small data sets that contain very different samples complicate both, training GANs and finding similar matches. Less representative features might not contain the properties needed to find similar samples, where both have a high entropy. Nonetheless, we demonstrated that ASAL outperforms random sample selection and approximates exhaustive uncertainty sampling in three out of four cases. Furthermore, the sub-linear run-time complexity makes ASAL suitable for large data set. We pointed out that ASAL uses low-level feature but there are signs that high-level features might be more suitable to match samples. Thus, one particular direction of future research includes identifying such high-level features. Possible candidates are VGG (Simonyan & Zisserman (2015)) or AlexNet (Krizhevsky et al. (2012)) features. Training the model on the unlabelled pool and the small initial data set might lead to features covering the needed properties. In addition, sample generation allows adding other scores beside information entropy. Thus, an interesting direction of future research is designing other scores that will be used during sample generation i.e. measuring sample diversity (Zhu et al. (2003); Xu et al. (2007).
145
+
146
+ # REFERENCES
147
+
148
+ Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein gan. ´ arXiv preprint arXiv:1701.07875, 2017.
149
+
150
+ Jon Louis Bentley. Multidimensional binary search trees used for associative searching. Communications of the ACM, 18(9):509–517, 1975.
151
+
152
+ Colin Campbell, Nello Cristianini, Alex Smola, et al. Query learning with large margin classifiers. In ICML, pp. 111–118, 2000.
153
+
154
+ Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014.
155
+
156
+ Ishaan Gulrajani. improved wgan training. \https://github.com/igul222/improved_ wgan_training, 2018.
157
+
158
+ Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron C Courville. Improved training of wasserstein gans. In Advances in Neural Information Processing Systems, pp. 5767–5777, 2017.
159
+
160
+ Timothy M Hospedales, Shaogang Gong, and Tao Xiang. Finding rare classes: Active learning with generative and discriminative models. IEEE transactions on knowledge and data engineering, 25 (2):374–386, 2013.
161
+
162
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015.
163
+
164
+ Prateek Jain, Sudheendra Vijayanarasimhan, and Kristen Grauman. Hashing hyperplane queries to near points with applications to large-scale active learning. In Advances in Neural Information Processing Systems, pp. 928–936, 2010.
165
+
166
+ Ajay J Joshi, Fatih Porikli, and Nikolaos Papanikolopoulos. Multi-class active learning for image classification. 2009.
167
+
168
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceedings of the International Conference on Learning Representations, 2015.
169
+
170
+ Alex Krizhevsky. Learning multiple layers of features from tiny images. 2009.
171
+
172
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet Classification with Deep Convolutional Neural Networks. In F. Pereira, C. J. C. Burges, L. Bottou, and K. Q. Weinberger (eds.), Advances in Neural Information Processing Systems 25, pp. 1097–1105. Curran Associates, Inc., 2012.
173
+
174
+ Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to ´ document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
175
+
176
+ Hieu T Nguyen and Arnold Smeulders. Active learning using pre-clustering. In Proceedings of the twenty-first international conference on Machine learning, pp. 79. ACM, 2004.
177
+
178
+ Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In Proceedings of the International Conference on Learning Representations, 2015.
179
+
180
+ Karen Simonyan and Andrew Zisserman. Very Deep Convolutional Networks for Large-Scale Image Recognition. In International Conference on Learning Representations (ICRL), pp. 1–14, 2015.
181
+
182
+ Jost Tobias Springenberg, Alexey Dosovitskiy, Thomas Brox, and Martin Riedmiller. Striving for simplicity: The all convolutional net. In Proceedings of the International Conference on Learning Representations Workshops, 2014.
183
+
184
+ Simon Tong and Daphne Koller. Support vector machine active learning with applications to text classification. Journal of machine learning research, 2(Nov):45–66, 2001.
185
+
186
+ Xiang Wei, Boqing Gong, Zixia Liu, Wei Lu, and Liqiang Wang. Improving the improved training of wasserstein gans: A consistency term and its dual effect. In Proceedings of the International Conference on Learning Representations, 2018a.
187
+
188
+ Xiang Wei, Boqing Gong, Zixia Liu, Wei Lu, and Liqiang Wang. CT-GAN. https://github. com/biuyq/CT-GAN, 2018b.
189
+
190
+ Zuobing Xu, Ram Akella, and Yi Zhang. Incorporating diversity and density in active learning for relevance feedback. In European Conference on Information Retrieval, pp. 246–257. Springer, 2007.
191
+
192
+ Yazhou Yang and Marco Loog. Active learning using uncertainty information. In Pattern Recognition (ICPR), 2016 23rd International Conference on, pp. 2646–2651. IEEE, 2016.
193
+
194
+ Yi Yang, Zhigang Ma, Feiping Nie, Xiaojun Chang, and Alexander G Hauptmann. Multi-class active learning by uncertainty sampling with diversity maximization. International Journal of Computer Vision, 113(2):113–127, 2015.
195
+
196
+ Jia-Jie Zhu and Jose Bento. Generative adversarial active learning. In Advances in Neural Information Processing Systems Workshops, 2017.
197
+
198
+ Xiaojin Zhu, John Lafferty, and Zoubin Ghahramani. Combining active learning and semisupervised learning using gaussian fields and harmonic functions. In ICML 2003 workshop on the continuum from labeled to unlabeled data in machine learning and data mining, volume 3, 2003.
199
+
200
+ # A ADDITIONAL EXPERIMENTS ON CELEBA
201
+
202
+ To further strengthen the experiments presented in the main paper we create three benchmarks using CelebA and report the performance of ASAL in terms of test accuracy and run-time.
203
+
204
+ ![](images/839e838dc5a73391062d1026cf94c34082f71bba2c32e57e61eb2d432b0afc87.jpg)
205
+ Figure 6: Test accuracy of three different classification benchmarks constructed from CelebA. The data set is separated in images where the attribute is present or absent.
206
+
207
+ # A.1 DATA SET
208
+
209
+ CelebA consists of roughly $1 6 0 \mathrm { k }$ training, 20k validation and $2 0 \mathrm { k }$ testing images. Thus, it is more than $3 \times$ larger than MNIST or CIFAR-10. We use the provided 40 face attributes to construct three different classification benchmarks. Each benchmark contains all $2 0 0 \mathrm { k }$ images labelled according to the presence or absence of the corresponding face attribute (Wearing Hat, Bangs and Blond Hair). We keep the suggested splitting into training, validation and testing for each benchmark.
210
+
211
+ # A.2 EXPERIMENTAL SETUP
212
+
213
+ We train a Wasserstein GAN with gradient penalty and an auto-encoder for ASAL beforehand (see Tabs. 1 and 2 for the architectures). We use a Nvidia GeForce GTX TITAN X GPU to train the models. The $1 0 0 \mathrm { k }$ training iterations for the GAN take roughly $^ { 2 5 \mathrm { ~ h ~ } }$ and the $5 0 \mathrm { k }$ iterations of the auto encoder $1 . 6 \mathrm { h }$ . We use for both the Adam optimizer with a learning rate of 0.0001 and batch size 64. The number of compressed features of the auto-encoder is 128. For sample matching we decrease the number of features to 50 using PCA.
214
+
215
+ For classification we use the CNN presented in Tab. 1. We use the Adam optimizer with a learning rate of 0.001 and a batch size of 50 and train for 30 epochs. We start active learning with 100 labelled samples, where the number of samples per class corresponds to the data distribution. We select and label ten new samples in each active learning cycle until we exhaust the budget of 2000 samples. We run all experiments for three different random seeds. For sample generation we apply 100 gradient descent steps using the Adam optimizer with a step size of 0.01. We optimize for all ten samples at the same time.
216
+
217
+ # A.3 RESULTS AND TIMINGS
218
+
219
+ Fig. 6 shows the test accuracy of random sampling, maximum entropy sampling and ASAL for three different benchmarks on CelebA. We conclude, that ASAL clearly outperforms random sampling and approaches the accuracy of maximum entropy sampling but requires less time for sample selection, see Fig. 7. Thus, the proposed idea of sample generation and matching is simple but effective.
220
+
221
+ Fig. 7 reports the time required to select ten new samples in each active learning cycle with respect to different data set sizes. We randomly augmented the data set containing 160k samples to report the timings of maximal entropy sampling and ASAL (only nearest-neighbor search depends on data set size) for data sets with up to 16M samples. Whereas it it possible to keep all images in memory for 160k (1.98GB) this is hardly possible for 16M images (198GB). Nonetheless, we did not add additional I/O-time for reading the images from disk to the maximum entropy timings in each AL cycle. The sample matching proposed in ASAL reduces the memory consumption because it requires to keep only 50 features per images (32MB for $1 6 0 \mathrm { k }$ and 3.2GB for 16M images). This saving allows to keep the features in memory and to build the nearest neighbor model even for huge data sets. We use a Nvidia GeForce GTX TITAN X GPU to report all timings.
222
+
223
+ ASAL has a sub-linear run-time complexity to select new samples. However, it requires several pre-processing steps such as training the GAN $\mathrm { ( \sim 2 5 h ) }$ , training the auto-encode $( \sim 1 . 6 \mathrm { h } )$ , extracting the features ( $\mathrm { \sim 3 2 s }$ per $1 6 0 \mathrm { k }$ samples) and fitting the nearest-neighbor model $\sim 5 \mathrm { { m i n } }$ for 16M samples). Note, that the number of iterations depends mainly on the difficulty of the data set than on its size. As sample selection for ASAL is almost negligible ( 44s for 16M samples per AL cycle) compared to the pre-processing time, the transition point is approximately then, when uncertainty sampling takes more time than preparing ASAL. Thus, maximal uncertainty sampling is more efficient when using small data sets or running active learning only for a few samples. Nonetheless, for all settings and data set sizes there exists a transition point, see Fig. 8. For example, ASAL is already more efficient after only 30 cycles (300 added samples) than maximum entropy sampling for a data set containing 16 million samples for the given setup.
224
+
225
+ ![](images/82a0a92c0599e861f3ce29be5900337adda9cce341627cfb6bcbbf0bb2182cce.jpg)
226
+ Figure 7: Run-time of maximal entropy sampling and ASAL to select 10 new samples in one AL cycle with respect to the data set size. The numbers are established using the setup described for CelebA running on a Nvidia GeForce GTX TITAN X GPU.
227
+
228
+ ![](images/d34970eea66cb1fe44d024fe52157ff00f4dd3e2b7d9ed2adcc64c5c9360da12.jpg)
229
+ Figure 8: ASAL is more efficient for selecting new samples than maximal entropy sampling. However, it requires pre-processing time. These diagrams show the transition point (number of AL cycles when ASAL gets more efficient than maximum entropy sampling) with respect to the data set size.
230
+
231
+ Table 1: Model architectures for ASAL on CelebA.
232
+
233
+ <table><tr><td>Classifier</td><td>Generator</td><td>Discriminator</td></tr><tr><td>Input: 64 × 64 × 3</td><td>Input: z ~ N(0,1): 128</td><td>Input: 64 × 64 × 3</td></tr><tr><td>3 × 3 conv: 16</td><td>linear: 128 × 4096</td><td>5 × 5 conv: 128,stride=2</td></tr><tr><td>ReLU, Maxpool 2 × 2</td><td>Batch norm,ReLU</td><td>leakyReLU</td></tr><tr><td>3 × 3 conv: 32</td><td>5 × 5 deconv: 256</td><td>5 × 5 conv: 256, stride=2</td></tr><tr><td>ReLU,Maxpool 2 × 2</td><td>Batch norm, ReLU</td><td>leakyReLU</td></tr><tr><td>3 × 3 conv: 64</td><td>5 × 5 deconv: 128</td><td>5 × 5 conv: 512, stride=2</td></tr><tr><td>ReLU,Maxpool 2 × 2</td><td>Batch norm, ReLU</td><td>leakyReLU</td></tr><tr><td>linear: 4096 ×1024</td><td>5 × 5 deconv: 64</td><td>5 × 5 conv: 512, stride=2</td></tr><tr><td>ReLU, Dropout 0.5</td><td>Batch norm,ReLU</td><td>leakyReLU</td></tr><tr><td>linear: 1024 ×1</td><td>5 × 5 deconv: 3 Tanh</td><td>linear: 8192 ×1</td></tr></table>
234
+
235
+ Table 2: Auto-encoder architecture for ASAL on CelebA.
236
+
237
+ <table><tr><td>Encoder</td><td>Decoder</td></tr><tr><td>Input: 64 × 64 × 3</td><td>Input: 4 × 4 × 16</td></tr><tr><td>5 × 5 conv: 128,stride=2 Batch norm, ReLU</td><td>5 × 5 deconv: 32 Batch norm,ReLU</td></tr><tr><td>5 × 5 conv: 64, stride=2 Batch norm, ReLU</td><td>5 × 5 deconv: 64 Batch norm, ReLU</td></tr><tr><td>5 × 5 conv: 32, stride=2 Batch Norm,ReLU</td><td>5 × 5 deconv:128 Batch norm, ReLU</td></tr><tr><td>5 × 5 conv:16, stride=2</td><td>5 × 5 deconv: 3 Tanh</td></tr></table>
238
+
239
+ # B ARCHITECTURES AND TRAINING OF AUTO-ENCODERS FOR ASAL
240
+
241
+ For MNIST - two classes we use the following auto-encoder settings: the encoder consists of three convolution layers with a stride of two, each followed by an activation leading to 64 compressed features. The decoder uses three deconvolution layers each with an activation. We train the autoencoder for 40 epochs with a batch size of 100 using the Adam optimizer with a learning rate of 0.001. For MNIST - ten classes we reuse the same settings but with three times more channels resulting in 192 compressed features.
242
+
243
+ The Encoder for CIFAR-10 consists of three layers, each with a convolution followed by batch normalization (Ioffe & Szegedy (2015)), activation and max pooling (stride of two and window size $2 \times 2 ,$ ). The number of compressed features is 256. The decoder uses first a layer consisting of a convolution, batch normalization and activation followed by three deconvolution layers each with batch normalization and activation. We train the auto-encoder for 100 epochs with a batch size of 128 using the Adam optimizer with a learning rate of 0.001. We use the same settings for CIFAR-10 - two classes and CIFAR-10 - ten classes.
244
+
245
+ # C ADDITIONAL RESULTS: MNIST - TWO CLASSES
246
+
247
+ ![](images/f494dcce5a165a1a3c41e5a55a4041cfbbe35101ab03455f6bade96741379875.jpg)
248
+ (a) Random sampling with Hinge loss.
249
+
250
+ ![](images/8e0b1288ec03949e9185ab8bade6fa4c4b8739cbd5b69f9598cb6ad5661e8c07.jpg)
251
+ (b) Random sampling with crossentropy loss.
252
+
253
+ ![](images/efcc3ce7944fc354bf00cbda10baa77f0598bd4195d61ae70f47e304c7e8146e.jpg)
254
+ (c) Minimum distance sampling with Hinge loss.
255
+
256
+ ![](images/3b1d136519c030c0c9f98620fc1932d305eef9a9af9ea4daf054b7d5e6d8aaa9.jpg)
257
+ (d) Maximum entropy sampling with cross-entropy loss.
258
+
259
+ Figure 9: Label distribution for uncertainty sampling using maximum entropy and random sampling for MNIST - two classes using different uncertainty measures and loss functions. The tick on the right show the true label distribution in the pool. The label distribution of the training set, assembled with random sampling (top), converges to the true label distribution of the pool. Conversely, uncertainty sampling leads to a training set that contains more frequently the label 5 than 7 compared to the pool that contains 7 more frequently. Apparently, images with the digit 5 lead to higher uncertainty of the used classifier.
260
+
261
+ ![](images/928ce4ceb8050b98abf4593922385184f1380552cdf8529519b944a8387d3f07.jpg)
262
+ (a) Minimum distance with Hinge loss and DCGAN.
263
+
264
+ ![](images/d81395e105345fcf69b6dead1ed2cf2b7e49898d9f7758689af936e5c76eb74c.jpg)
265
+ (b) Maximum entropy with cross-entropy loss and DCGAN.
266
+
267
+ (c) Minimum distance with Hinge loss and WGAN-GP.
268
+
269
+ ![](images/b71630de9db4f7df9f5e1349d26e4a046e780954d7c99fc10622300af1160e9f.jpg)
270
+ (d) Maximum entropy with cross-entropy loss and WGAN-GP.
271
+
272
+ ![](images/be70b300b499b11e1495590ea74ae25f9ad5526b3eac1479c7ba56c87738d29a.jpg)
273
+ Figure 10: Test accuracy on MNIST - two classes of a fully supervised model, for random sampling, uncertainty sampling and different ASALs using different GANs, uncertainty measures and loss functions. ASAL with WGAN-GP (bottom) clearly exceed the performance of ASAL using DCGAN (top). Maximum entropy sampling and using the cross entropy loss lead to the setup (10d) that approaches the fully-supervised model with the fewest samples and reaches the smallest gap for all ASAL using 500 labelled samples.
274
+
275
+ ![](images/88d4a2a68a436cf36821714e6425a0b253b2c1ef92bb7af97b9f20fd677a254a.jpg)
276
+ Figure 11: Label distribution for active learning using different matching strategies, uncertainty measures and GANs for MNIST - two classes. The ticks on the right show the true label distribution in the pool. ASAL using WGAN-GP (third and fourth row) reaches a label distribution of the training data that is similar to the true label distribution in the pool. Conversely, ASAL using DCGAN (first and second row) leads to a training set that contains almost three times as many images with the digit 7 than digit 5. Most likely, the DCGAN is responsible for this behaviour because we already observed that it produces the digit 7 more frequently than the digit 5, see Fig. 32a.
277
+
278
+ ![](images/d47011676457dd1c8d949a91b061bd429bdb6ae214e94835cbb28606deaa382e.jpg)
279
+ (a) Minimum distance with Hinge loss and DCGAN.
280
+
281
+ ![](images/515781458b753e86c56e2e98e9e993d1c7d81e69d187c82bffb086a65089d734.jpg)
282
+ (b) Maximum entropy with cross-entropy loss and DCGAN.
283
+
284
+ ![](images/548416ddfaf74b93312c2bca2df282f80667cd796aa52de082d76e227dfb441c.jpg)
285
+ (d) Maximum entropy with cross-entropy loss and WGAN-GP.
286
+
287
+ ![](images/03e9a6dcf834efbdcd0203706da6ca5a473cd4a7cae67bc5f2107405acc4e487.jpg)
288
+ Figure 12: Average entropy of images that are selected and added to the training set for MNIST - two classes using different GANs, uncertainty measures and loss functions. All figures show that ASAL selects samples from the pool that have a higher entropy than randomly sampled images. However, maximum entropy sampling and WGAN-GP (12d) lead to the largest entropy gap between selected and randomly sampled images. Maximum entropy sampling (right column) results in smaller average entropy of the classifier than minimum distance sampling (left column) because we use the cross-entropy loss that directly optimizes for small entropy, opposed to the hinge loss that minimizes the distance to the separating hyper-plane.
289
+
290
+ (c) Minimum distance with Hinge loss and WGAN-GP.
291
+
292
+ # C.1 AGREEMENT OF MANUAL ANNOTATIONS AND MATCHED LABELS
293
+
294
+ Instead of manually annotating images we propose to select similar images from the pool and ask for labels of these images. Similar images might show an object of the same class, have similar surrounding, colors, size or share other features. Thus, we compare the agreement of the manual class annotations of the generated images with the matched images, using the three different strategies. We use 1300 generated samples for each GAN, annotate the images manually and retrieve the closest match with the corresponding label from the pool. We assume that the final model will be measured on an almost evenly distributed test set similar to MNIST and USPS. However, the test set for this experiment contains the generated samples with manual annotations and the GAN may generate samples with unevenly distributed label frequency. Thus, we compute the accuracy for each class independently and average these values subsequently to obtain the final score.
295
+
296
+ Fig. 13 shows that the agreement is higher for ASAL strategies using WGAN-GP than DCGAN.
297
+ Furthermore, we observe that the matching based on gray values achieves the highest agreement.
298
+ Similarly, Figs. 10a and 10b show best performance for ASAL-Gray.
299
+
300
+ ![](images/2f4c4f98ef56e432b4a4686443a18174caab72805d726b5267f4d4fb80e7cbe3.jpg)
301
+ Figure 13: Comparison of the agreement accuracy between manual annotations and matched labels. The matching strategies employed in ASAL allow to select similar images from the pool and compare these labels to the manual annotations. For MNIST - two classes the agreement for WGAN-GP is higher than for DCGAN.
302
+
303
+ Table 3: Number of training iterations for the different GANs and data sets.
304
+
305
+ <table><tr><td rowspan="2">GAN</td><td colspan="2">MNIST</td><td colspan="2">CIFAR-10</td></tr><tr><td>two</td><td>ten</td><td>two</td><td>ten</td></tr><tr><td>DCGAN</td><td>40k</td><td>100k</td><td>100k²</td><td>200k</td></tr><tr><td>WGAN-GP</td><td>40k</td><td>100k</td><td>200k</td><td>200k</td></tr><tr><td>Residual WGAN-GP</td><td></td><td></td><td>100k</td><td>100k</td></tr><tr><td>Residual WGAN-CT</td><td>一</td><td>一</td><td>100k</td><td>100k</td></tr></table>
306
+
307
+ ![](images/2b91e2d322028b311ff519f45cca97ecbd77e83237c07fb5ce989fd856cc6cad.jpg)
308
+ Figure 14: Test accuracy on MNIST - ten classes of a fully supervised model, for random sampling, uncertainty sampling and different ASALs using two different GANs. Selecting new images using random samples exceeds the performance of the proposed strategy when using the DCGAN. However, replacing the DCGAN with the WGAN-GP enables outperforming random sampling. ASAL-Discriminator achieves the best quality.
309
+
310
+ ![](images/44b98b0c146279222b67b68e3bc00c99ffe7ca2b418d6feb632b47f19f9d8e1d.jpg)
311
+ Figure 15: Average entropy of images that are selected and added to the training set for MNIST - ten classes using different GANs. Both figures show that at the beginning ASAL selects images with higher entropy than random sampling. In average WGAN-GP leads to a larger gap than DCGAN. However, this gap rapidly shrinks when increasing the training set.
312
+
313
+ ![](images/1ccbfdcb659c816a4607ee61df41caa2e6e862c471762911c04abbf3f0d4015e.jpg)
314
+ Figure 16: Label distribution for uncertainty sampling using maximum entropy, random sampling and active learning using different matching strategies and GANs for MNIST - ten classes. The tick on the right show the true label distribution in the pool. Note the different scaling of the yaxis. Random sampling converges to the true label distribution in the pool and maximum entropy sampling leads to a training set with a higher ration of certain digits (7,8,9) or lower (0,1,4,6) than the pool. Similarly, ASAL using WGAN-GP (bottom row) selects certain digits more frequently than others. Conversely, ASAL using DCGAN (top row) leads to a training set that contains $30 \%$ images with the digit 1. Most likely, the DCGAN is responsible for this behaviour because we already observed that it produces the digit 1 more frequently than any other digit, see Fig. 33a.
315
+
316
+ # E TRAINING ON MNIST AND TESTING ON USPS
317
+
318
+ Zhu et al. Zhu & Bento (2017) report the accuracy of GAAL when trained on MNIST and tested on USPS for two classes. They report best performance on USPS and outperform the fully supervised model. However, it is unclear how they up-sample the $1 6 \times 1 6$ USPS images to test on the $2 8 \times 2 8$ model trained on MNIST. We redo the experiments using ASAL and up-sample the USPS images as follows: (1) padding the images with three pixels at each side, (2) up-sampling the images to 30 and (3) cropping the images to $2 8 \times 2 8$ to remove boundary artifacts. Following this strategy, we report an average test accuracy of 0.91 for the fully supervised model compared to 0.70 reported by Zhu et al. Zhu & Bento (2017). Fig. 17 shows that ASAL outperforms aggressive uncertainty and random sampling.
319
+
320
+ We repeat the experiment for MNIST - ten classes using DCGAN and WGAN-GP. This time, uncertainty sampling clearly outperforms all other strategies and the fully supervised model. Nonetheless, ASAL-Auto and ASAL-Disc lead to a better training performance than passive learning for WGANGP.
321
+
322
+ ![](images/e68d8f02155ccf5e6637ddcc27798b897ea205172321547fb1e1b97a36b3b05c.jpg)
323
+ (a) Minimum distance with Hinge loss and DCGAN.
324
+
325
+ ![](images/f0ed465de90770e3284732bdf1776c6327c1610aae1772fb073a60967c084964.jpg)
326
+ (b) Maximum entropy with cross-entropy loss and DCGAN.
327
+
328
+ ![](images/a8407b6acfef86bba27cc9e97e571a2cccbe636ce24fa8f2be982656aba94b74.jpg)
329
+ (d) Maximum entropy with cross-entropy loss and WGAN-GP.
330
+
331
+ (c) Minimum distance with Hinge loss and WGAN-GP.
332
+
333
+ ![](images/8140f6d29d9442f6b4aecae1ec34f1fc28f2fb8580ebad2f1001f09eb1392610.jpg)
334
+ Figure 17: Test accuracy on USPS - two classes but trained on MNIST - two classes of a fully supervised model, for random sampling, uncertainty sampling and different ASALs using different GANs, uncertainty measures and loss functions. Uncertainty sampling performs worse than any other strategy because it aggressively trains the classifier for the samples present in the pool and generalizes less. Random sampling and ASAL tend to generalize better by respecting the true data distribution either through random sampling or using a pretrained GAN on the data set to find new samples.
335
+
336
+ ![](images/7901892b7997b0ec3fe532f9e72702242baa997f963521be9033ad9c02f220bc.jpg)
337
+ Figure 18: Test accuracy on USPS - ten classes but trained on MNIST - ten classes of a fully supervised model, for random sampling, uncertainty sampling and different ASALs using two different GANs. Maximum entropy sampling for ten classes exceeds the quality of any other method compared to binary classification where it performed worst, see Fig. 17. The more elaborate LeNet and using more classes and samples to train lead to a classifier that generalizes well. The active learning strategies using WGAN-GP exceed the quality of random sampling. ASAL-Disc. even outperforms the fully supervised mode. ASAL using DCGAN performs comparable to random sampling.
338
+
339
+ # F ADDITIONAL RESULTS: CIFAR - TWO CLASSES
340
+
341
+ For CIFAR-10, we do not indicate the true label distribution by a tick because the validation set contains the same number of samples for each class.
342
+
343
+ ![](images/f8c156e6ace946556f1ea6fc534c039d3bcc8f5749fc9ca0e9bda1fce1898b29.jpg)
344
+ (a) Random sampling with(b) Random sampling with(c) Minimum distance sam-(d) Maximum entropy samHinge loss. cross-entropy loss. pling with Hinge loss. pling with cross-entropy loss.
345
+
346
+ Figure 19: Label distribution for uncertainty sampling using maximum entropy and random sampling for CIFAR-10 - two classes using different uncertainty measures and loss functions.The label distribution of the training set of all strategies converges to the true label distribution of the pool. However, in average over all active learning iterations the training set of the uncertainty sampling strategies most frequently contained the images with the label horse.
347
+
348
+ ![](images/58680572604ef91055e6def00a081004bec6124afcf972d325da0e4e29290fda.jpg)
349
+ Figure 20: Label distribution for active learning with minimum distance sample generation and the Hinge loss, using different matching strategies and GANs for CIFAR-10 - two classes. All setups assemble training sets containing the more image with the label horse than automobile.
350
+
351
+ ![](images/597224439241a1d2063954da890c4bb13390d11c5989b9ee690e8b520788f03b.jpg)
352
+ Figure 21: Label distribution for active learning with maximum entropy sample generation and the cross-entropy loss, using different matching strategies and GANs for CIFAR-10 - two classes.
353
+
354
+ ![](images/3ff8e7f7d9fb8e270560c6f4f9c88afee398ff42e4ee2253a89d9984a2bc3297.jpg)
355
+ Figure 22: Validation accuracy on CIFAR-10 - two classes of a fully supervised model, for random sampling, uncertainty sampling and different ASALs using different GANs. ASAL-Autoencoder leads to the best performance. ASAL-Disc. using Resnet-WGAN-CT performs worse that any other strategy because the sample matching using is unable to retrieve high entropy samples from the pool, see Fig. 23.
356
+
357
+ ![](images/a0a012b852a0ce2a5e53360ac9f4cf948319338d80cc122faade494796c73eec.jpg)
358
+ Figure 23: Average entropy of images that are selected and added to the training set for CIFAR-10 - two classes using different GANs. The mean entropy of the random sampling and the proposed method show hardly any difference. However, for maximum entropy sampling at least at the beginning ASAL selects images with higher entropy than random sampling.
359
+
360
+ # G ADDITIONAL RESULTS: CIFAR - TEN CLASSES
361
+
362
+ For CIFAR-10, we do not indicate the true label distribution by a tick because the validation set contains the same number of samples for each class.
363
+
364
+ ![](images/5d6c817eb322ee4d720a07d154ce4bad67bf327a29e0007fdddb81676510c7ce.jpg)
365
+ Figure 24: Validation accuracy on CIFAR-10 - ten classes of a fully supervised model, for random sampling, uncertainty sampling and different ASALs using different GANs. The proposed method performs slightly worse than random sampling independent of the sample matching of GAN.
366
+
367
+ ![](images/5c73176336eacf317b4ee92f761634a7112269a17beacb1e70efdf1a8318fe58.jpg)
368
+ Figure 25: Average entropy of images that are selected and added to the training set for CIFAR-10 - ten classes using different GANs. There is hardly any difference for random sampling and ASAL in the entropy of newly added samples. Only at the beginning, random sampling retrieves samples with slightly higher entropy.
369
+
370
+ ![](images/01947e5f086037f824bff74615e8bfd6275a9ae7a1d94010968a9c9791e4d8e7.jpg)
371
+ Figure 26: Label distribution for uncertainty sampling using maximum entropy and random sampling for CIFAR-10 - ten classes. Random sampling converges to the true label distribution in the pool. Maximum entropy sampling selects most frequently cat, dog, bird, deer and least frequently automobile, ship, truck to exceed the classification quality of random sampling.
372
+
373
+ ![](images/83fe5b3fc2988e17ce7f63ccb9db2bb13f32c680ecee1a257778e7a1b8ac9d7e.jpg)
374
+ Figure 27: Label distribution for active learning using different matching strategies, uncertainty measures and GANs for CIFAR-10 - ten classes. Exactly the classes cat, dog that are most common in the training set of uncertainty sampling are less common in the data sets of most setups. Conversely, frog is for many setups the most common class but is not particularly frequent in the uncertainty sampling data set.
375
+
376
+ # H MATCHING STRATEGY VISUALIZATION
377
+
378
+ Figs. 28, 29, 30, 31 show examples of generated images of the same active learning cycle and the corresponding matches. All images are generated using WGAN-GP and the maximum entropy score. The generated images are not manually annotated. The moderate quality of the generated CIFAR-10 images prevents confidently annotating the images. Instead, n.a. indicates that the manual annotation is missing.
379
+
380
+ ![](images/04fd455fe9adaa6cc0fa2adb8a57cf2ad71880f32cb9d20a01ea461f0dbdb7e7.jpg)
381
+ Figure 28: The first row shows synthetic digits and the other the closest samples from the pool using different features for comparison. The numbers above the image denote the label and image id.
382
+
383
+ ![](images/6c9f356dab108df1ad2b4a33b3ca839c1ad20e6a8da0e06489c48ee56cfe449c.jpg)
384
+ Figure 29: The rows show generated and matched images for MNIST - ten classes using WGAN-GP.
385
+
386
+ ![](images/fd806873d4eaf6fbd114e7da02bff4f7f950ea0cf2196b2f08bc356921315089.jpg)
387
+ Figure 30: The rows show generated and matched images for CIFAR-10 - two classes using WGANGP. The images have a reasonable quality and all matching strategies retrieve images that are visually close or show the same class.
388
+
389
+ ![](images/be219f22cf60a86060ef117d28e9b8e345786814d28fc22e366716dc6486c3df.jpg)
390
+ Figure 31: The rows show generated and matched images for CIFAR-10 - ten classes using WGANGP. Most of the generated images achieve only a moderate quality and even the closest samples from the pool have a high perceptual visual distance or assign images that show non matching classes, see last column where the images have a similar appearance but an appropriate label for the generated images would be horse but the selected samples show airplane and ship.
391
+
392
+ # I GENERATED UNCERTAIN SAMPLES
393
+
394
+ To produce the images displayed in Figs. 32, 33, 34 and 35 we trained the classifier using the initial training set. Then we used maximum entropy sample generation to produce samples with a high entropy.
395
+
396
+ ![](images/cd80e8895b910e1036e601e298256e277b8ad6d52da2e6b88ff2962e0b709c78.jpg)
397
+ Figure 32: Comparison of random and uncertain MNIST - two classes. The samples are generated using different GANs. The random samples are visually more appealing and identifying the label is easier than for the uncertain samples. WGAN-GP generate images for both digits equally likely, whereas DCGAN most frequently generates images showing the digit 7.
398
+
399
+ ![](images/a27e67e51b49a34bd5e799854aa120c92cd05d05832ebe2622b849cb8c9763f9.jpg)
400
+ Figure 33: Comparison of random and uncertain MNIST - ten classes samples. The samples are generated using different GANs. The random samples are visually more appealing and identifying the label is easier than for the uncertain samples. WGAN-GP uniformly generates images for all digits, whereas DCGAN mainly generates images showing the digit 1.
401
+
402
+ ![](images/66426811acd111a780a29d33cb25b7ebae4e21486bb161551d08d9b0b85330b4.jpg)
403
+ Figure 34: Comparison of random and uncertain samples for CIFAR-10 - two classes using maximum entropy. The samples are generated using different GANs. The residual GANs (bottom row) produce more visually appealing samples than the other GANs. For most of these images it would be possible to identify whether the image shows a horse or automobile.
404
+
405
+ ![](images/b5fb019a87ea13113e6cb7522910de0a6fe0bc9d59de21b7578ed9cd6feb8585.jpg)
406
+ Figure 35: Comparison of random and uncertain samples for CIFAR-10 - ten classes using maximum entropy. The samples are generated using different GANs. The residual GANs (bottom row) produce more visually appealing samples than the other GANs. Although, the quality of the random images is higher than of the uncertain images, annotating with high confidence is still very difficult.
parse/train/r1GB5jA5tm/r1GB5jA5tm_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/r1GB5jA5tm/r1GB5jA5tm_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/r1GB5jA5tm/r1GB5jA5tm_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/vqHak8NLk25/vqHak8NLk25.md ADDED
@@ -0,0 +1,357 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Parameter Prediction for Unseen Deep Architectures
2
+
3
+ Boris Knyazev1,2∗ Michal Drozdzal4,†
4
+
5
+ 1 University of Guelph
6
+ 3 Canada CIFAR AI Chair
7
+
8
+ Graham W. Taylor1,2,3,†
9
+
10
+ Adriana Romero-Soriano4,5,†
11
+
12
+ 2 Vector Institute for Artificial Intelligence 4 Facebook AI Research 5 McGill University †equal advising
13
+
14
+ https://github.com/facebookresearch/ppuda
15
+
16
+ # Abstract
17
+
18
+ Deep learning has been successful in automating the design of features in machine learning pipelines. However, the algorithms optimizing neural network parameters remain largely hand-designed and computationally inefficient. We study if we can use deep learning to directly predict these parameters by exploiting the past knowledge of training other networks. We introduce a large-scale dataset of diverse computational graphs of neural architectures – DEEPNETS-1M– and use it to explore parameter prediction on CIFAR-10 and ImageNet. By leveraging advances in graph neural networks, we propose a hypernetwork that can predict performant parameters in a single forward pass taking a fraction of a second, even on a CPU. The proposed model achieves surprisingly good performance on unseen and diverse networks. For example, it is able to predict all 24 million parameters of a ResNet-50 achieving a $60 \%$ accuracy on CIFAR-10. On ImageNet, top-5 accuracy of some of our networks approaches $50 \%$ . Our task along with the model and results can potentially lead to a new, more computationally efficient paradigm of training networks. Our model also learns a strong representation of neural architectures enabling their analysis.
19
+
20
+ # 1 Introduction
21
+
22
+ Consider the problem of training deep neural networks on large annotated datasets, such as ImageNet [1]. This problem can be formalized as finding optimal parameters for a given neural network $a$ , parameterized by w, w.r.t. a loss function $\mathcal { L }$ on the dataset $\mathcal { D } = \{ ( \mathbf { x } _ { i } , y _ { i } ) \} _ { i = 1 } ^ { \tilde { N } }$ of inputs $\mathbf { x } _ { i }$ and targets $y _ { i }$ :
23
+
24
+ $$
25
+ \underset { \mathbf { w } } { \arg \operatorname* { m i n } } \sum _ { i = 1 } ^ { N } \mathcal { L } ( f ( \mathbf { x } _ { i } ; a , \mathbf { w } ) , y _ { i } ) ,
26
+ $$
27
+
28
+ where $f ( \mathbf { x } _ { i } ; a , \mathbf { w } )$ represents a forward pass. Equation 1 is usually minimized by iterative optimization algorithms – e.g. SGD [2] and Adam [3] – that converge to performant parameters $\mathbf { w } _ { p }$ of the architecture $a$ . Despite the progress in improving the training speed and convergence [4–7], obtaining $\mathbf { w } _ { p }$ remains a bottleneck in large-scale machine learning pipelines. For example, training a ResNet-50 [8] on ImageNet can take many GPU hours [9]. With the ever growing size of networks [10] and necessity of training the networks repeatedly (e.g. for hyperparameter or architecture search), the classical process of obtaining $\mathbf { w } _ { p }$ is becoming computationally unsustainable [11–13].
29
+
30
+ A new parameter prediction task. When optimizing the parameters for a new architecture $a$ typical optimizers disregard past experience gained by optimizing other nets. However, leveraging this past experience can be the key to reduce the reliance on iterative optimization and, hence the high computational demands. To progress in that direction, we propose a new task where iterative optimization is replaced with a single forward pass of a hypernetwork [14] $H _ { \mathcal { D } }$ . To tackle the task,
31
+
32
+ $H _ { \mathcal { D } }$ is expected to leverage the knowledge of how to optimize other networks $\mathcal { F }$ . Formally, the task is to predict the parameters of an unseen architecture $a \not \in { \mathcal { F } }$ using $H _ { \mathcal { D } }$ , parameterized by $\theta _ { p }$ : $\hat { \mathbf { w } } _ { p } = H _ { \mathcal { D } } ( a ; \theta _ { p } )$ . The task is constrained to a dataset $\mathcal { D }$ , so $\hat { \mathbf { w } } _ { p }$ are the predicted parameters for which the test set performance of $f ( \mathbf { x } ; a , \hat { \mathbf { w } } _ { p } )$ is similar to the one of $f ( \mathbf { x } ; a , \mathbf { w } _ { p } )$ . For example, we consider CIFAR-10 [15] and ImageNet image classification datasets $\mathcal { D }$ , where the test set performance is classification accuracy on test images.
33
+
34
+ Approaching our task. A straightforward approach to expose $H _ { \mathcal { D } }$ to the knowledge of how to optimize other networks is to train it on a large training set of $\{ ( a _ { i } , { \bf w } _ { p , i } ) \}$ pairs, however, that is prohibitive2. Instead, we follow the bi-level optimization paradigm common in meta-learning [16–18], but rather than iterating over $M$ tasks, we iterate over $M$ training architectures $\mathcal { F } = \{ a _ { i } \} _ { i = 1 } ^ { \tilde { M } }$ :
35
+
36
+ $$
37
+ \underset { \theta } { \arg \operatorname* { m i n } } \sum _ { j = 1 } ^ { N } \sum _ { i = 1 } ^ { M } \mathcal { L } \Big ( f \Big ( \mathbf { x } _ { j } ; a _ { i } , H _ { \mathcal { D } } ( a _ { i } ; \theta ) \Big ) , y _ { j } \Big ) .
38
+ $$
39
+
40
+ By optimizing Equation 2, the hypernetwork $H _ { \mathcal { D } }$ gradually gains knowledge of how to predict performant parameters for training architectures. It can then leverage this knowledge at test time – when predicting parameters for unseen architectures. To approach the problem in Equation 2, we need to design the network space $\mathcal { F }$ and $H _ { \mathcal { D } }$ . For $\mathcal { F }$ , we rely on the previous design spaces for neural architectures [19] that we extend in two ways: the ability to sample distinct architectures and an expanded design space that includes diverse architectures, such as ResNets and Visual Transformers [20]. Such architectures can be fully described in the form of computational graphs (Fig. 1). So, to design the hypernetwork $H _ { \mathcal { D } }$ , we rely on recent advances in machine learning on graph-structured data [21–24]. In particular, we build on the Graph HyperNetworks method (GHNs) [24] that also optimizes Equation 2. However, GHNs do not aim to predict large-scale performant parameters as we do in this work, which motivates us to improve on their approach.
41
+
42
+ By designing our diverse space $\mathcal { F }$ and improving on GHNs, we boost the accuracy achieved by the predicted parameters on unseen architectures to $7 7 \%$ (top-1) and $48 \%$ (top-5) on CIFAR-10 [15] and ImageNet [1], respectively. Surprisingly, our GHN shows good out-of-distribution generalization and predicts good parameters for architectures that are much larger and deeper compared to the ones seen in training. For example, we can predict all 24 million parameters of ResNet-50 in less than a second either on a GPU or CPU achieving ${ \sim } 6 0 \%$ on CIFAR-10 without any gradient updates (Fig 1, (b)).
43
+
44
+ Overall, our framework and results pave the road toward a new and significantly more efficient paradigm for training networks. Our contributions are as follows: (a) we introduce the novel task of predicting performant parameters for diverse feedforward neural networks with a single hypernetwork forward pass; (b) we introduce DEEPNETS-1M – a standardized benchmark with in-distribution and out-of-distribution architectures to track progress on the task $( \ S 3 )$ ; (c) we define several baselines and propose a GHN model $( \ S 4 )$ that performs surprisingly well on CIFAR-10 and ImageNet $( \ S 5 . 1 )$ ; (d) we show that our model learns a strong representation of neural network architectures $( \ S 5 . 2 )$ , and our model is useful for initializing neural networks $( \ S 5 . 3 )$ . Our DEEPNETS-1M dataset, trained GHNs and code is available at https://github.com/facebookresearch/ppuda.
45
+
46
+ ![](images/791016d11d096c99981d60bae5535d7ba0e87b8ff561e80a60ad1aaf9166628d.jpg)
47
+ Figure 1: (a) Overview of our GHN model $( \ S 4 )$ trained by backpropagation through the predicted parameters $( \hat { \mathbf { w } } _ { p } )$ on a given image dataset and our DEEPNETS-1M dataset of architectures. Colored captions show our key improvements to vanilla GHNs $( \ S ~ 2 . 2 )$ . The red one is used only during training GHNs, while the blue ones are used both at training and testing time. The computational graph of $a _ { 1 }$ is visualized as described in Table 1. (b) Comparing classification accuracies when all the parameters of a ResNet-50 are predicted by GHNs versus when its parameters are trained with SGD (see full results in $\ S 5$ ).
48
+
49
+ # 2 Background
50
+
51
+ We start by providing a brief background about the network design spaces leveraged in the creation of our DEEPNETS-1M dataset of neural architectures described in $\ S \ O 3$ . We then cover elements of graph hypernetworks that we leverage when designing our specific GHN $H _ { \mathcal { D } }$ in $\ S 4$ .
52
+
53
+ # 2.1 Network Design Space of DARTS
54
+
55
+ DARTS [19] is a differentiable NAS framework. For image classification tasks such as those considered in this work, its networks are defined by four types of building blocks: stems, normal cells, reduction cells, and classification heads. Stems are fixed blocks of convolutional operations that process input images. The normal and reduction cells are the main blocks of architectures and are composed of: $3 \times 3$ and $5 { \times } 5$ separable convolutions, $3 \times 3$ and $5 { \times } 5$ dilated separable convolutions, $3 \times 3$ max pooling, $3 \times 3$ average pooling, identity and zero (to indicate the absence of connectivity between two operations). Finally, the classification head defines the network output and is built with a global pooling followed by a single fully connected layer.
56
+
57
+ Typically, DARTS networks have one stem block, 14-20 cells, and one classification head, altogether forming a deep computational graph. The reduction cells, placed only at 1/3 and 2/3 of the total depth, decrease the spatial resolution and increase the channel dimensionality by a factor of 2. Summation and concatenation are used to aggregate outputs from multiple operations within each cell. To make the channel dimensionalities match, $1 \times 1$ convolutions are used as needed. All convolutional operations use the ReLU-Conv-Batch Norm (BN) [7] order. Overall, DARTS enables defining strong architectures that combine many principles of manual [25, 8, 26, 27] and automatic [24, 28–33] design of neural architectures. While DARTS learns the optimal task-specific cells, the framework can be modified to permit sampling randomly-structured cells. We leverage this possibility for the DEEPNETS-1M construction in $\ S \ O 3$ . Please see $\ S \operatorname { A . 1 }$ for further details on DARTS.
58
+
59
+ # 2.2 Graph HyperNetwork: GHN-1
60
+
61
+ Representation ofneural architecture are operations (e.g. $a$ rchitectures. . Specifically, convolutions, f $a$ GHNs [24] directly operate on the computationis a directed acyclic graph (DAG), where nodes lly-connected layers, summations, etc.) and thei $V = \bar { \{ } v _ { i } \} _ { i = 1 } ^ { | V | }$ is described by a binary adjacency matrix $\mathbf { A } \in \{ \bar { 0 } , 1 \} ^ { | V | \times | V | }$ . Nodes are further characterized by a matrix of initial node features $\mathbf { H } ^ { 0 } = [ \mathbf { h } _ { 1 } ^ { 0 } , \mathbf { h } _ { 2 } ^ { 0 } , . . . , \mathbf { h } _ { | V | } ^ { 0 } ]$ , where each ${ \bf h } _ { v } ^ { 0 }$ is a one-hot vector representing the operation performed by the node. We also use such a one-hot representation for $\mathbf { H } ^ { 0 }$ , but in addition encode the shape of parameters associated with nodes as described in detail in $\ S \mathrm { ~ B . 1 ~ }$
62
+
63
+ Design of the graph hypernetwork. In [24], the graph hypernetwork $H _ { \mathcal { D } }$ consists of three key modules. The first module takes the input node features $\bar { \mathbf { H } } ^ { 0 }$ and transforms them into $d$ -dimensional node features $\mathbf { H } ^ { 1 } \in \mathbb { R } ^ { | V | \times d }$ through an embedding layer. The second module takes $\mathbf { H } ^ { 1 }$ together with A and feeds them into a specific variant of the gated graph neural network (GatedGNN) [34]. In particular, their GatedGNN mimics the canonical order $\pi$ of node execution in the forward (fw) and backward (bw) passes through a computational graph. To do so, it sequentially traverses the graph and performs iterative message passing operations and node feature updates as follows:
64
+
65
+ $$
66
+ \forall t \in [ 1 , . . . , T ] : \Big [ \forall \pi \in [ \mathbf { f v } , \mathbf { b w } ] : \Big ( \forall v \in \pi : \mathbf { m } _ { v } ^ { t } = \sum _ { u \in N _ { v } ^ { \pi } } \mathbf { M L P } ( \mathbf { h } _ { u } ^ { t } ) , ~ \mathbf { h } _ { v } ^ { t } = \mathbf { G R U } ( \mathbf { h } _ { v } ^ { t } , \mathbf { m } _ { v } ^ { t } ) \Big ) \Big ] ,
67
+ $$
68
+
69
+ where $T$ denotes the total number of forward-backward passes; $\mathbf { h } _ { v } ^ { t }$ corresponds to the features of node $v$ in the $t { \cdot }$ -th graph traversal; $\mathrm { \mathbf { M L P } ( \cdot ) }$ is a multi-layer perceptron; and $\mathrm { G R U } ( \cdot )$ is the update function of the Gated Recurrent Unit [35]. In the forward propagation $\mathit { \Pi } _ { \pi } = \operatorname { f w } .$ ), $\mathcal { N } _ { v } ^ { \pi }$ corresponds to the incoming neighbors of the node defined by A, then in the backward propagation $\mathbf { \bar { \rho } } _ { \pi } = \mathbf { b } \mathbf { w } ,$ ) it similarly corresponds to the outgoing neighbors of the node. The last module uses the GatedGNN output hidden states $\mathbf { h } _ { v } ^ { T }$ to condition a decoder that produces the parameters $\hat { \mathbf { w } } _ { p } ^ { v }$ (e.g. convolutional weights) associated with each node. In practice, to handle different parameter dimensionalities per operation type, the output of the hypernetwork is reshaped and sliced according to the shape of parameters in each node. We refer to the model described above as GHN-1 (Fig. 1). Further subtleties of implementing this model in the context of our task are discussed in $\ S \mathrm { ~ B . 1 }$ .
70
+
71
+ Table 1: Examples of computational graphs (visualized using NetworkX [44]) in each split and their key statistics, to which we add the average degree and average shortest path length often used to measure local and global graph properties respectively [45, 46]. In the visualized graphs, a node is one of the 15 primitives coded with markers shown at the bottom, where they are sorted by the frequency in the training set. For visualization purposes, a blue triangle marker differentiates a $1 \times 1$ convolution (equivalent to a fully-connected layer over channels) from other convolutions, but its primitive type is still just convolution. \*Computed based on CIFAR-10.
72
+
73
+ <table><tr><td></td><td colspan="3">IN-DISTRIBUTION</td><td colspan="2">心</td><td colspan="2">osss</td><td colspan="2">OUT-OF-DISTRIBUTION</td><td colspan="2"></td><td colspan="3"></td><td colspan="2"></td></tr><tr><td></td><td colspan="3">TRAINVAL/TEST</td><td colspan="3">e</td><td colspan="2"></td><td colspan="2">福</td><td colspan="2"></td><td colspan="3"></td><td colspan="2"></td></tr><tr><td>#graphs</td><td>106</td><td colspan="2">500/500</td><td colspan="3">WIDE</td><td colspan="2">DEEP</td><td colspan="2">DENSE</td><td colspan="2"></td><td colspan="2">BN-FREE</td><td colspan="3">RESNET/VIT</td></tr><tr><td>#cells</td><td colspan="3">4-18</td><td colspan="3">100</td><td colspan="2">100</td><td colspan="2"></td><td colspan="2">100</td><td colspan="3">100 4-18</td><td colspan="2">1/1</td></tr><tr><td>#channels</td><td colspan="3">16-128</td><td colspan="3">4-18 128-1216</td><td colspan="2">10-36 32-208</td><td colspan="2">4-18 32-240</td><td colspan="2"></td><td colspan="3">32-336</td><td colspan="2">16/12 64/128</td></tr><tr><td>#nodes (|Vl)</td><td colspan="3">21-827</td><td colspan="3">33-579</td><td colspan="2">74-1017</td><td colspan="2">57-993</td><td colspan="2"></td><td colspan="3">33-503</td><td colspan="2">161/114</td></tr><tr><td>%w/o BN</td><td colspan="3">3.5%</td><td colspan="3">4.1%</td><td colspan="2">2.0%</td><td colspan="3">5.0%</td><td colspan="2">100%</td><td colspan="3">0%/100%</td></tr><tr><td>#params(M)*</td><td colspan="3">0.01-3.1 2.5-35</td><td colspan="3">39-101</td><td colspan="2">2.5-15.3</td><td colspan="3">2.5-8.8</td><td colspan="2">2.5-7.7</td><td colspan="3">23.5/1.0</td></tr><tr><td>avg degree</td><td colspan="3">2.3±0.1 2.3±0.1</td><td colspan="3">2.3±0.1 14.7±4.9</td><td colspan="2">2.3±0.1 26.2±9.3</td><td colspan="3">2.4±0.1 15.1±4.1</td><td colspan="2">2.4±0.1</td><td colspan="3">2.2/2.3 11.2/10.7</td></tr><tr><td>avg path</td><td colspan="3">14.5±4.8 14.5±4.9</td><td colspan="3"></td><td colspan="2"></td><td colspan="3"></td><td colspan="2"></td><td colspan="3">10.0±2.8</td></tr><tr><td>marker</td><td>:</td><td>■</td><td></td><td>·</td><td></td><td>. group</td><td></td><td></td><td>■ LN</td><td>:</td><td>.</td><td></td><td>·</td><td></td><td>:</td><td>■</td></tr><tr><td rowspan="2">primitive</td><td></td><td colspan="2">conv BN</td><td>sum</td><td colspan="2">bias</td><td>concat dilated</td><td>gr. conv</td><td></td><td></td><td>max</td><td>avg</td><td>MSA SE</td><td>input</td><td>glob</td><td>pos</td></tr><tr><td>fraction in TRAIN(%)36.3</td><td>25.5</td><td></td><td>11.1</td><td>6.5</td><td>conv 5.1</td><td>3.8</td><td>2.5</td><td>2.5</td><td>pool 1.8</td><td>pool 1.7</td><td>1.2</td><td>1.0</td><td></td><td>avg</td><td>enc</td></tr><tr><td colspan="2"></td><td colspan="2"></td><td></td><td colspan="2"></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>0.5</td><td>0.5</td><td>0.2</td></tr></table>
74
+
75
+ # 3 DEEPNETS-1M
76
+
77
+ The network design space of DARTS is limited by the number of unique operations that compose cells, and the low variety of stems and classification heads. Thus, many architectures are not realizable within this design space, including: VGG [25], ResNets [8], MobileNet [33] or more recent ones such as Visual Transformer (ViT) [20] and Normalization-free networks [36, 37]. Furthermore, DARTS does not define a procedure to sample random architectures. By addressing these two limitations we aim to expose our hypernetwork to diverse training architectures and permit its evaluation on common architectures, such as ResNet-50. We hypothesize that increased training diversity can improve hypernetworks’ generalization to unseen architectures making it more competitive to iterative optimizers.
78
+
79
+ Extending the network design space. We extend the set of possible operations with non-separable 2D convolutions3, Squeeze&Excite4 (SE) [40] and Transformer-based operations [41, 20]: multihead self-attention (MSA), positional encoding and layer norm (LN) [42]. Each node (operation) in our graphs has two attributes: primitive type (e.g. convolution) and shape (e.g. $3 { \times } 3 { \times } 5 1 2 { \times } 5 1 2$ ). Overall, our extended set consists of 15 primitive types (Table 1). We also extend the diversity of the generated architectures by introducing VGG-style classification heads and ViT stems. Finally, to further increase architectural diversity, we allow the operations to not include batch norm (BN) [7] and permit networks without channel width expansion (e.g. as in [20]).
80
+
81
+ Architecture generation process. We generate different subsets of architectures (see the description of each subset in the next two paragraphs and in Table 1). For each subset depending on its purpose, we predefine a range of possible model depths (number of cells), widths and number of nodes per cell. Then, we sample a stem, a normal and reduction cell and a classification head. The internal structure of the normal and reduction cells is defined by uniformly sampling from all available operations. Due to a diverse design space it is extremely unlikely to sample the same architecture multiple times, but we ran a sanity check using the Hungarian algorithm [43] to confirm that (see Figure 6 in $\ S \ A . 2$ for details).
82
+
83
+ In-distribution (ID) architectures. We generate a training set of $| \mathcal { F } | = 1 0 ^ { 6 }$ architectures and validation/test sets of 500/500 architectures that follow the same generation rules and are considered to be ID samples. However, training on large architectures can be prohibitive, e.g. in terms of GPU memory. Thus, in the training set we allow the number of channels and, hence the total number of parameters, to be stochastically defined given computational resources. For example, to train our models we upper bound the number of parameters in the training architectures to around 3M by sampling fewer channels if necessary. In the evaluation sets, the number of channels is fixed. Therefore, this pre-processing step prior to training results in some distribution shift between the training and the validation/test sets. However, the shift is not imposed by our dataset.
84
+
85
+ Out-of-distribution (OOD) architectures. We generate five OOD test sets that follow different generation rules. In particular, we define WIDE and DEEP sets that are of interest due the stronger downstream performance of such nets in large-scale tasks [47, 48, 10]. These nets are often more challenging to train for fundamental [49, 50] or computational [51] reasons, so predicting their parameters might ease their subsequent optimization. We also define the DENSE set, since networks with many operations per cell and complex connectivity are underexplored in the literature despite their potential [27]. Next, we define the BN-FREE set that is of interest due to BN’s potential negative side-effects [52, 53] and the difficulty or unnecessity of using it in some cases [54–56, 36, 37]. We finally add the RESNET/VIT set with two predefined image classification architectures: commonlyused ResNet-50 [8] and a smaller 12-layer version of the Visual Transformer (ViT) [20] that has recently received a lot of attention in the vision community. Please see $\ S \operatorname { A . 1 }$ and $\ S \ A . 2$ for further details and statistics of our DEEPNETS-1M dataset.
86
+
87
+ # 4 Improved Graph HyperNetworks: GHN-2
88
+
89
+ In this section, we introduce our three key improvements to the baseline GHN-1 described in $\ S 2 . 2$ (Fig. 1). These components are essential to predict stronger parameters on our task. For the empirical validation of the effectiveness of these components see ablation studies in $\ S 5 . 1$ and $\ S \mathrm { { C . 2 . 1 } }$ .
90
+
91
+ # 4.1 Differentiable Normalization of Predicted Parameters
92
+
93
+ Table 2: Parameter normalizations.
94
+
95
+ <table><tr><td>Type of node u</td><td>Normalization</td></tr><tr><td>Conv./fully-conn.</td><td>WVB/CinHW)</td></tr><tr><td>Norm.weights</td><td>2 × sigmoid(wp/T)</td></tr><tr><td>Biases</td><td>tanh(w/T)</td></tr></table>
96
+
97
+ When training the parameters of a given network from scratch using iterative optimization methods, the initialization of parameters is crucial. A common approach is to use He [57] or Glorot [58] initialization to stabilize the variance of activations across layers of the network. Chang et al. [59] showed that when the parameters of the network are instead predicted by a hypernetwork, the activations in the network tend to explode or vanish. To address the issue of unstable network activations especially for the case of predicting parameters of diverse architectures, we apply operation-dependent normalizations (Table 2). We normalize convolutional and fully-connected weights by following the fan-in scheme of [57] (see the comparison to fan-out in $\ S \mathrm { { C . 2 . 1 } ) }$ : $\hat { \mathbf { w } } _ { p } ^ { v } \sqrt { \beta / ( C _ { i n } \mathcal { H } \mathcal { W } ) }$ , where $C _ { i n } , \mathcal { H } , \mathcal { W }$ are the number of input channels and spatial dimensions of weights $\hat { \mathbf { w } } _ { p } ^ { v }$ , respectively; and $\beta$ is a nonlinearity specific constant following the analysis in [57]. The parameters of normalization layers such as BN and LN, as well as biases typically initialized with constants, are normalized by applying a squashing function with temperature $T$ to imitate the empirical distributions of models trained with SGD (see Table 2). These are differentiable normalizations, so that they are applied at training (and testing) time. Further analysis of our normalization and its stabilizing effect on activations is presented in $\ S \ B . 2 . 2$ .
98
+
99
+ # 4.2 Enhancing Long-range Message Propagation
100
+
101
+ Computational graphs often take the form of long chains (Table 1) with only a few incoming/outcoming edges per node. This structure might hinder long-range propagation of information between nodes [60]. Different approaches to alleviate the long-range propagation problem exist [61–63], including stacking GHNs in [24]. Instead we adopt simple graph-based heuristics in line with recent works [64, 65]. In particular, we add virtual edges between two nodes $v$ and $u$ and weight them based on the shortest path $s _ { v u }$ between them (Fig. 2). To avoid interference with the real edges in the computational graph, we introduce a separate $\mathbf { M L P _ { s p } }$ to transform the features of the nodes connected through these virtual edges, and redefine the message passing of Equation 3 as:
102
+
103
+ ![](images/bcb5abac984f3f5124329de95b2d2f3d350d3e99942284c0b96073b5312eef73.jpg)
104
+ Figure 2: Virtual edges (in green) allow for better capture of global context.
105
+
106
+ $$
107
+ \mathbf { m } _ { v } ^ { t } = \sum _ { u \in \mathcal { N } _ { v } ^ { \pi } } \mathbf { M L P } ( \mathbf { h } _ { u } ^ { t } ) + \sum _ { u \in \mathcal { N } _ { v } ^ { ( \mathrm { s p } ) } } \frac { 1 } { s _ { v u } } \mathbf { M L P } _ { \mathrm { s p } } ( \mathbf { h } _ { u } ^ { t } ) ,
108
+ $$
109
+
110
+ where $\mathcal { N } _ { v } ^ { ( s p ) }$ are neighbors satisfying $1 < s _ { v u } \le s ^ { ( \mathrm { m a x } ) }$ , and $s ^ { ( \mathrm { m a x } ) }$ is a hyperparameter. To maintain the same number of trainable parameters as in GHN-1, we decrease MLPs’ sizes appropriately. Despite its simplicity, this approach is effective (see the comparison to stacking GHNs in $\ S \mathrm { { C . 2 . 1 } }$ .
111
+
112
+ # 4.3 Meta-batching Architectures During Training
113
+
114
+ GHN-1 updates its parameters $\theta$ based on a single architecture sampled for each batch of images (Equation 2). In vanilla SGD training, larger batches of images often speed up convergence by reducing gradient noise and improve model’s performance [66]. Therefore, we define a meta-batch $b _ { m }$ as the number of architectures sampled per batch of images. Both the parameter prediction and the forward/backward passes taverage the gradients across $b _ { m }$ gh the architectures in ato update the parameters $\theta$ metof $\begin{array} { r } { H _ { \mathcal { D } } \colon \nabla _ { \boldsymbol { \theta } } \mathcal { L } = 1 / b _ { m } \sum _ { i = 1 } ^ { b _ { m } } \nabla _ { \boldsymbol { \theta } } \mathcal { L } _ { i } } \end{array}$ . $\ S \mathrm { ~ B . 2 . 3 }$
115
+
116
+ # 5 Experiments
117
+
118
+ We focus the evaluation of GHN-2 on our parameter prediction task $( \ S 5 . 1 )$ . In addition, we show beneficial side-effects of i) learning a stronger neural architecture representation using GHN-2 in analyzing networks $( \ S 5 . 2 )$ and ii) predicting parameters for fine-tuning $( \ S 5 . 3 )$ . We provide further experimental and implementation details, as well as more results supporting our arguments in $\ S \mathrm { C }$ .
119
+
120
+ Datasets. We use the DEEPNETS-1M dataset of architectures $\left( \ S 3 \right)$ as well as two image classification datasets $\mathcal { D } _ { 1 }$ (CIFAR-10 [15]) and $\mathcal { D } _ { 2 }$ (ImageNet [1]). CIFAR-10 consists of $5 0 \mathrm { k }$ training and 10k test images of size $3 2 \times 3 2 \times 3$ and 10 object categories. ImageNet is a larger scale dataset with 1.28M training and 50k test images of variable size and 1000 fine-grained object categories. We resize ImageNet images to $2 2 4 \times 2 2 4 \times 3$ following [19, 24]. We use $5 \mathrm { k } / 5 0 \mathrm { k }$ training images as a validation set in CIFAR-10/ImageNet and 500 validation architectures of DEEPNETS-1M for hyperparameter tuning.
121
+
122
+ Baselines. Our baselines include GHN-1 and a simple MLP that only has access to operations, but not to the connections between them. This MLP baseline is obtained by replacing the GatedGNN with an MLP in our GHN-2. Since GHNs were originally introduced for small architectures of $\sim 5 0$ nodes and only trained on CIFAR-10, we reimplement5 them and scale them up by introducing minor modifications to their decoder that enable their training on ImageNet and on larger architectures of up to 1000 nodes (see $\ S \mathrm { ~ B . 1 ~ }$ for details). We use the same hyperparameters to train the baselines and GHN-2.
123
+
124
+ Iterative optimizers. In the parameter prediction experiments, we also compare our model to standard optimization methods: SGD and Adam [3]. We use off-the-shelf hyperparameters common in the literature [24, 19, 32, 67–69]. On CIFAR-10, we train evaluation architectures with SGD/Adam, initial learning rate $\eta = 0 . 0 2 5 / \eta = 0 . 0 0 1$ , batch size $b = 9 6$ and up to 50 epochs. With Adam, we train only 300 evaluation architectures as a rough estimation of an average performance. On ImageNet, we train them with SGD, $\eta = 0 . 1$ and $b = 1 2 8$ , and, for computational reasons (given 1402 evaluation architectures in total), we limit training with SGD to 1 epoch. We have also considered meta-optimizers, such as [17, 18]. However, we were unable to scale them to diverse and large architectures of our DEEPNETS-1M, since their LSTM requires a separate hidden state for every trainable parameter in the architecture. The scalable variants exist [70, 71], but are hard to reproduce without open source code.
125
+
126
+ Additional experimental details. We follow [24] and train GHNs with Adam, $\eta = 0 . 0 0 1$ and batch size of 64 images for CIFAR-10 and 256 for ImageNet. We train for up to 300 epochs, except for one experiment in the ablation studies, where we train one GHN with $b _ { m } = 1$ eight times longer, i.e. for 2400 epochs. All GHNs in our experiments use $T = 1$ propagation (Equation 3), as we found the original $T = 5$ of [24] to be inefficient and it did not improve the accuracies in our task. GHN-2 uses $s ^ { ( \mathrm { m a x } ) } = 5 0$ and $b _ { m } = 8$ and additionally uses LN that slightly further improves results (see these ablations in $\ S \mathrm { { C . 2 . 1 } ) }$ . Model selection is performed on the validation sets, but the results in our paper are reported on the test sets to enable their direct comparison.
127
+
128
+ # 5.1 Parameter Prediction
129
+
130
+ Experimental setup. We trained our GHN-2 and baselines on the training architectures and training images, i.e. a separate model is trained for CIFAR-10 and ImageNet. According to our DEEPNETS-1M benchmark, we assess whether these models can generalize to unseen in-distribution (ID) and out-of-distribution (OOD) test architectures from our DEEPNETS-1M. We measure this generalization by predicting parameters for the test architectures and computing their classification accuracies on the test images of CIFAR-10 (Table 3) and ImageNet (Table 4). The evaluation architectures with batch norm (BN) have running statistics, which are not learned by gradient descent [7], and hence are not predicted by our GHNs. To alleviate that, we follow [24] and evaluate the networks with BN by computing per batch statistics with batch size of 64 images. This is further discussed in $\ S \mathrm { { C . 1 } }$
131
+
132
+ Results. Despite GHN-2 never observed the test architectures, GHN-2 predicts good parameters for them making the test networks perform surprisingly well on both image datasets (Tables 3 and 4). Our results are especially strong on CIFAR-10, where some architectures with predicted parameters achieve up to $7 7 . 1 \%$ , while the best accuracy of training with SGD for 50 epochs is around $15 \%$ more. We even show good results on ImageNet, where for some architectures we achieve a top-5 accuracy of up to $4 8 . 3 \%$ . While these results are low for direct downstream applications, they are remarkable for three main reasons. First, to train GHNs by optimizing Equation 2, we do not rely on the prohibitively expensive procedure of training the architectures $\mathcal { F }$ by SGD. Second, GHNs rely on a single forward pass to predict all parameters. Third, these results are obtained for unseen architectures, including the OOD ones. Even in the case of severe distribution shifts (e.g. ResNet- $5 0 ^ { 6 }$ ) and underrepresented networks (e.g. $\mathrm { V i T } ^ { 7 } .$ ), our model still predicts parameters that perform better than random ones. On CIFAR-10, generalization of GHN-2 is particularly strong with a $5 8 . 6 \%$ accuracy on ResNet-50.
133
+
134
+ On both image datasets, our GHN-2 significantly outperforms GHN-1 on all test subsets of DEEPNETS-1M with more than a $20 \%$ absolute gain in certain cases, e.g. $3 6 . 8 \%$ vs $1 3 . 7 \%$ on the BN-FREE networks (Table 3). Exploiting the structure of computational graphs is a critical property of GHNs with the accuracy dropping from $6 6 . 9 \%$ to $4 2 . 2 \%$ on ID (and even more on OOD) architectures when we replace the GatedGNN of GHN-2 with an MLP. Compared to iterative optimization methods, GHN-2 predicts parameters achieving an accuracy similar to $\sim 2 5 0 0$ and ${ \sim } 5 0 0 0$ iterations of SGD on CIFAR-10 and ImageNet respectively. In contrast, GHN-1 performs similarly to only ${ \sim } 5 0 0$ and ${ \sim } 2 0 0 0$ (not shown in Table 4) iterations respectively. Comparing SGD to Adam, the latter performs worse in general except for the ViT architectures similar to [72, 20].
135
+
136
+ To report speeds on ImageNet in Table 4, we use a dedicated machine with a single NVIDIA V100-32GB and Intel Xeon CPU E5- $1 6 2 0 \ \mathrm { v } 4 @$ 3.50GHz. So for SGD these numbers can be reduced by using faster computing infrastructure and more optimal hyperparameters [73]. Using our setup,
137
+
138
+ Table 3: CIFAR-10 results of predicted parameters for unseen ID and OOD architectures of DEEPNETS-1M. Mean ( $\perp$ standard error of the mean) accuracies are reported (random chance $\approx 1 0 \%$ ). †The number of parameter updates.
139
+
140
+ <table><tr><td rowspan="2">METHOD</td><td rowspan="2">#upd+</td><td colspan="2">ID-TEST</td><td colspan="5">OOD-TEST</td></tr><tr><td>avg</td><td>max</td><td>WIDE</td><td>DEEP</td><td>DENSE</td><td>BN-FREE</td><td>RESNET/VIT</td></tr><tr><td>MLP</td><td>1</td><td>42.2±0.6</td><td>60.2</td><td>22.3±0.9</td><td>37.9±1.2</td><td>44.8±1.1</td><td>23.9±0.7</td><td>17.7/10.0</td></tr><tr><td>GHN-1</td><td>1</td><td>51.4±0.4</td><td>59.9</td><td>43.1±1.7</td><td>48.3±0.8</td><td>51.8±0.9</td><td>13.7±0.3</td><td>19.2/18.2</td></tr><tr><td>GHN-2</td><td>1</td><td>66.9±0.3</td><td>77.1</td><td>64.0±1.1</td><td>60.5±1.2</td><td>65.8±0.7</td><td>36.8±1.5</td><td>58.6/11.4</td></tr><tr><td colspan="9">Iterative optimizers (all architectures are ID in this case)</td></tr><tr><td>SGD (1 epoch)</td><td>0.5×103</td><td>46.1±0.4</td><td>66.5</td><td>47.2±1.1</td><td>34.2±1.1</td><td>45.3±0.7</td><td>18.0±1.1</td><td>61.8/34.5</td></tr><tr><td>SGD (5 epochs)</td><td>2.5×103</td><td>69.2±0.4</td><td>82.4</td><td>71.2±0.3</td><td>56.7±1.6</td><td>67.8±0.9</td><td>29.0±2.0</td><td>78.2/52.5</td></tr><tr><td>SGD (50 epochs)</td><td>25×103</td><td>88.5±0.3</td><td>93.1</td><td>88.9±1.2</td><td>84.5±1.2</td><td>87.3±0.8</td><td>45.6±3.6</td><td>93.5/75.7</td></tr><tr><td>Adam (50 epochs)</td><td>25×103</td><td>84.0±0.8</td><td>89.5</td><td>82.0±1.6</td><td>76.2±2.6</td><td>84.8±0.4</td><td>38.8±4.8</td><td>91.5/79.4</td></tr></table>
141
+
142
+ Table 4: ImageNet results on DEEPNETS-1M. Mean $\pm$ standard error of the mean) top-5 accuracies are reported (random chance ${ \approx } 0 . 5 \%$ ). ∗Estimated on ResNet-50 with batch size 128.
143
+
144
+ <table><tr><td>METHOD</td><td>#upd GPU sec. </td><td></td><td>. CPU sec.</td><td>ID-TEST max</td><td></td><td>OOD-TEST</td><td></td><td></td></tr><tr><td>GHN-1</td><td>1</td><td>avg 0.3</td><td>avg 0.5</td><td>avg 17.2±0.4 32.1</td><td>WIDE 15.8±0.9</td><td>DEEP 15.9±0.8</td><td>DENSE 315.1±0.7 0.5±0.0</td><td>BN-FREE RESNET/VIT 6.9/0.9</td></tr><tr><td>GHN-2</td><td>1</td><td>0.3</td><td>0.7</td><td>27.2±0.6 48.3</td><td></td><td></td><td>19.4±1.4 24.7±1.4 26.4±1.2 7.2±0.6</td><td>5.3/4.4</td></tr><tr><td>Iterative optimizers (allarchitectures are ID in this case)</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>1</td><td>0.4</td><td>6.0</td><td>0.5±0.0 0.7</td><td>0.5±0.0</td><td>0.5±0.0</td><td>0.5±0.0 0.5±0.0</td><td>0.5/0.5</td></tr><tr><td>SGD (1 step) SGD (5000 steps)</td><td>5k</td><td>2×10³</td><td>3×104</td><td>25.6±0.3 50.7</td><td>26.2±1.4</td><td>13.2±1.1</td><td></td><td>34.8/24.3</td></tr><tr><td>SGD (10000 steps) 10k</td><td></td><td>4×103</td><td>6×104</td><td>37.7±0.6 62.0</td><td>38.7±1.6 22.1±1.4 36.3±1.2 8.0±1.2</td><td></td><td>125.4±1.1 4.8±0.8</td><td>49.0/33.4</td></tr><tr><td>SGD (100 epochs)</td><td></td><td>1000k 6×105*</td><td>6×107*</td><td>1</td><td>一</td><td></td><td>一</td><td>92.9/72.2</td></tr></table>
145
+
146
+ 6Large architectures with bottleneck layers such as ResNet-50 do not appear during training. 7Architectures such as ViT do not include BN and, except for the first layer, convolutions – the two most frequent operations in the training set.
147
+
148
+ SGD requires on average $1 0 ^ { 4 } \times$ more time on a GPU $1 0 ^ { 5 } \times$ on a CPU) to obtain parameters that yield performance similar to GHN-2. As a concrete example, AlexNet [74] requires around 50 GPU hours (on our setup) to achieve a $8 1 . 8 \%$ top-5 accuracy, while on some architectures we achieve $2 4 8 . 0 \%$ in just 0.3 GPU seconds.
149
+
150
+ Table 5: Ablating GHN-2 on CIFAR-10. An average rank of the model is computed across all ID and OOD test architectures.
151
+
152
+ <table><tr><td>MODEL</td><td>ID-TEST</td><td>OOD-TEST</td><td>AVG.RANK</td></tr><tr><td>GHN-2</td><td>66.9±0.3</td><td>56.8±0.8</td><td>1.9</td></tr><tr><td>1000 training architectures</td><td>65.1±0.5</td><td>52.5±1.0</td><td>2.6</td></tr><tr><td>No normalization (§ 4.1)</td><td>62.6±0.6</td><td>47.1±1.2</td><td>3.9</td></tr><tr><td>No virtual edges (§ 4.2)</td><td>61.5±0.4</td><td>53.9±0.6</td><td>4.1</td></tr><tr><td>No meta-batch (bm = 1,$4.3)</td><td>54.3±0.3</td><td>47.5±0.6</td><td>5.5</td></tr><tr><td>bm =1,train 8× longer</td><td>62.4±0.5</td><td>51.9±1.0</td><td>3.7</td></tr><tr><td>No GatedGNN (MLP)</td><td>42.2±0.6</td><td>32.2±0.7</td><td>7.4</td></tr><tr><td>GHN-1</td><td>51.4±0.4</td><td>39.2±0.9</td><td>6.8</td></tr></table>
153
+
154
+ ![](images/3c1cdf25783b7b620a9c5a8eb64d23c66ee235cba6afe2a30b656fbfb8d359fa.jpg)
155
+ Figure 3: GHN-2 with meta batch $b _ { m } =$ 8 versus $b _ { m } ~ = ~ 1$ for different numbers of training architectures on CIFAR-10.
156
+
157
+ Ablations (Table 5) show that all three components proposed in $\ S 4$ are important. Normalization is particularly important for OOD generalization with the largest drops on the WIDE and BN-FREE networks (see $\ S \operatorname { C } . 2 . 1 $ ). Using meta-batching ( $b _ { m } = 8$ ) is also essential and helps stabilize training and accelerate convergence (see $\ S \ B . 2 )$ . We also confirm that the performance gap between $b _ { m } = 1$ and $b _ { m } = 8$ is not primarily due to the observation of more architectures, since the ablated GHN-2 with $b _ { m } = 1$ trained eight times longer is still inferior. The gap between $b _ { m } = 8$ and $b _ { m } = 1$ becomes pronounced with at least 1k training architectures (Fig. 3). When training with fewer architectures (e.g. 100), the GHN with meta-batching starts to overfit to the training architectures. Given our challenging setup with unseen evaluation architectures, it is surprising that using 1k training architectures already gives strong results. However, OOD generalization degrades in this case compared to using all 1M architectures, especially on the BN-FREE networks (see $\ S \ \mathbf { B } . 2 \ O _ { \cdot }$ ). When training GHNs on just a few architectures, the training accuracy soars to the level of training them with SGD. With more architectures, it generally decreases indicating classic overfitting and underfitting cases.
158
+
159
+ # 5.2 Property Prediction
160
+
161
+ Representing computational graphs of neural architectures is a challenging problem [75–79]. We verify if GHNs are capable of doing that out-of-the-box in the property prediction experiments. We also experiment with architecture comparison in $\ S \mathrm { { C . 2 . 4 } }$ . Our hypothesis is that by better solving our parameter prediction task, GHNs should also better solve graph representation tasks.
162
+
163
+ Experimental setup. We predict the properties of architectures given their graph embeddings obtained by averaging node features8. We consider four such properties (see $\ S \mathrm { { C . 2 . 3 } }$ for details):
164
+
165
+ • Accuracy on the “clean” (original) validation set of images;
166
+ • Accuracy on a corrupted set (obtained by adding the Gaussian noise to images following [53]);
167
+ • Inference speed (latency or GPU seconds per a batch of images);
168
+ • Convergence speed (the number of SGD iterations to achieve a certain training accuracy).
169
+
170
+ Estimating these properties accurately can have direct practical benefits. Clean and corrupted accuracies can be used to search for the best performing architectures (e.g. for the NAS task); inference speed can be used to choose the fastest network, so by estimating these properties we can trade-off accurate, robust and fast networks [12]. Convergence speed can be used to find networks that are easier to optimize. These properties correlate poorly with each other and between CIFAR-10 and ImageNet $( \ S \ C . 2 . 3 )$ , so they require the model to capture different regularities of graphs. While specialized methods to estimate some of these properties exist, often as a NAS task [80–82, 30, 75], our GHNs provide a generic representation that can be easily used for many such properties. For each property, we train a simple regression model using graph embeddings and ground truth property values. We use 500 validation architectures of DEEPNETS-1M for training the regression model and tuning its hyperparameters (see $\ S \mathrm { C } . 2 . 3$ for details). We then use 500 testing architectures of DEEPNETS-1M to measure Kendall’s Tau rank correlation between the predicted and ground truth property values similar to [80].
171
+
172
+ Additional baseline. We compare to the Neural Predictor (NeuPred) [80]. NeuPred is based on directed graph convolution and is developed for accuracy prediction achieving strong NAS results. We train a separate such NeuPred for each property from scratch following their hyperparameters.
173
+
174
+ Results. GHN-2 consistently outperforms the GHN-1 and MLP baselines as well as NeuPred (Fig. 4). In $\ S \mathrm { ~ C . 2 . 3 ~ }$ , we also provide results verifying if higher correlations translate to downstream gains. For example, on CIFAR-10 by choosing the most accurate architecture according to the regression model and training it from scratch following [19, 24], we obtained a $9 7 . 2 6 \% ( \pm 0 . 0 9 )$ accuracy, which is competitive with leading NAS approaches, e.g. [19, 24, 32, 67–69]. In contrast, the
175
+
176
+ ![](images/55a5386a7c9fc1e9082fefac8ed024485a2c5357ef7fead6481a5a116b175eb6.jpg)
177
+ Figure 4: Property prediction of neural networks in terms of correlation (higher is better). Error bars denote the standard deviation across 5 runs.
178
+
179
+ network chosen by the regression model trained on the GHN-1 embeddings achieves $9 5 . 9 0 \% ( \pm 0 . 0 8 )$ .
180
+
181
+ # 5.3 Fine-tuning Predicted Parameters
182
+
183
+ Neural networks trained on ImageNet and other large datasets have proven useful in diverse visual tasks in the transfer learning setup [83–87, 20]. Therefore, we explore how predicting parameters on ImageNet with GHNs compares to pretraining them on ImageNet with SGD in such a setup. We consider low-data tasks as they often benefit more from transfer learning [86, 87].
184
+
185
+ Experimental setup. We perform two transfer-learning experiments. The first experiment is finetuning the predicted parameters on 1,000 training samples (100 labels per class) of CIFAR-10. We fine-tune ResNet-50, Visual Transformer (ViT) and a 14-cell architecture based on the DARTS best cell [19]. The hyperparameters of fine-tuning (initial learning rate and weight decay) are tuned on 200 validation samples held-out of the 1,000 training samples. The number of epochs is fixed to 50 as in $\ S 5 . 1$ for simplicity. In the second experiment, we fine-tune the predicted parameters on the object detection task. We closely follow the experimental protocol and hyperparameters from [88] and train the networks on the Penn-Fudan dataset [89]. The dataset contains only 170 images and the task is to detect pedestrians. Therefore this task is also well suited for transfer learning. Following [88], we replace the backbone of a Faster R-CNN with one of the three architectures. To perform transfer learning with GHNs, in both experiments we predict the parameters of a given architecture using GHNs trained on ImageNet. We then replace the ImageNet classification layer with the target task-specific layers and fine-tune the entire network on the target task. We compare the results of GHNs to He’s initialization [57] and the initialization based on pretraining the parameters on ImageNet with SGD.
186
+
187
+ Table 6: CIFAR-10 test set accuracies and Penn-Fudan object detection average precision (at $\mathrm { I o U } { = } 0 . 5 0 $ ) after fine-tuning the networks using SGD initialized with different methods. Average results and standard deviations for 3 runs with different random seeds are shown. For each architecture, similar GHN-2-based and ImageNet-based results are bolded.\*Estimated on ResNet-50.
188
+
189
+ <table><tr><td rowspan="2">INITIALIZATION METHOD</td><td rowspan="2">GPU sec. to init.</td><td colspan="3">100-SHOT CIFAR-10</td><td colspan="3">PENN-FUDANOBJECTDETECTION</td></tr><tr><td>RESNET-50</td><td>VIT</td><td>DARTS</td><td>RESNET-50</td><td>VIT</td><td>DARTS</td></tr><tr><td>He&#x27;s [57]</td><td>0.003</td><td>41.0±0.4</td><td>33.2±0.3</td><td>45.4±0.4</td><td>0.197±0.042</td><td>0.144±0.010</td><td>0.486±0.035</td></tr><tr><td>GHN-1 (trained on ImageNet)</td><td>0.6</td><td>46.6±0.0</td><td>23.3±0.1</td><td>49.2±0.1</td><td>0.433±0.013</td><td>0.0±0.0</td><td>0.468±0.024</td></tr><tr><td>GHN-2 (trained on ImageNet)</td><td>0.7</td><td>56.4±0.1</td><td>41.4±0.6</td><td>60.7±0.3</td><td>0.560±0.019</td><td>0.436±0.032</td><td>0.785±0.032</td></tr><tr><td>ImageNet (lk pretraining steps)</td><td>6×10²</td><td>45.4±0.3</td><td>44.3±0.1</td><td>62.4±0.3</td><td>0.302±0.022</td><td>0.182±0.046</td><td>0.814±0.033</td></tr><tr><td>ImageNet (2.5k pretraining steps)</td><td>1.5×103</td><td>55.4±0.2</td><td>50.4±0.3</td><td>70.4±0.2</td><td>0.571±0.056</td><td>0.322±0.073</td><td>0.823±0.022</td></tr><tr><td>ImageNet (5 pretraining epochs)</td><td>3×104</td><td>84.6±0.2</td><td>70.2±0.5</td><td>83.9±0.1</td><td>0.723±0.045</td><td>0.391±0.024</td><td>0.827±0.053</td></tr><tr><td>ImageNet (final epoch)</td><td>6×105</td><td>89.2±0.2</td><td>74.5±0.2</td><td>85.6±0.2</td><td>0.876±0.011</td><td>0.468±0.023</td><td>0.881±0.023</td></tr></table>
190
+
191
+ Results. The CIFAR-10 image classification results of fine-tuning the parameters predicted by our GHN-2 are ${ \geq } 1 0$ percentage points better (in absolute terms) than fine-tuning the parameters predicted by GHN-1 or training the parameters initialized using He’s method (Table 6). Similarly, the object detection results of GHN-2-based initialization are consistently better than both GHN-1 and He’s initializations. The GHN-2 results are a factor of 1.5-3 improvement over He’s for all the three architectures. Overall, the two experiments clearly demonstrate the practical value of predicting parameters using our GHN-2. Using GHN-1 for initialization provides relatively small gains or hurts convergence (for ViT). Compared to pretraining on ImageNet with SGD, initialization using GHN-2 leads to performance similar to $1 \mathrm { k } { - } 2 . 5 \mathrm { k }$ steps of pretraining on ImageNet depending on the architecture in the case of CIFAR-10. In the case of Penn-Fudan, GHN-2’s performance is similar to $\geq 1 { \mathrm { k } }$ steps of pretraining with SGD. In both experiments, pretraining on ImageNet for just 5 epochs provides strong transfer learning performance and the final ImageNet checkpoints are only slightly better, which aligns with previous works [85]. Therefore, further improvements in the parameter prediction models appear promising.
192
+
193
+ # 6 Related Work
194
+
195
+ Our proposed parameter prediction task, objective in Equation 2 and improved GHN are related to a wide range of machine learning frameworks, in particular meta-learning and neural architecture search (NAS). Meta-learning is a general framework [16, 90] that includes meta-optimizers and meta-models, among others. Related NAS works include differentiable [19] and one-shot methods [12]. See additional related work in $\ S \ D$ .
196
+
197
+ Meta-optimizers. Meta-optimizers [17, 18, 71, 91, 92] define a problem similar to our task, but where $H _ { \mathcal { D } }$ is an RNN-based model predicting the gradients $\nabla \mathbf { w }$ , mimicking the behavior of iterative optimizers. Therefore, the objective of meta-optimizers may be phrased as learning to optimize as opposed to our learning to predict parameters. Such meta-optimizers can have their own hyperparameters that need to be tuned for a given architecture $a$ and need to be run expensively (on the GPU) for many iterations following Equation 1.
198
+
199
+ Meta-models. Meta-models include methods based on MAML [93], ProtoNets [94] and auxiliary nets predicting task-specific parameters [95–98]. These methods are tied to a particular architecture and need to be trained from scratch if it is changed. Several recent methods attempt to relax the choice of architecture in meta-learning. T-NAS [99] combines MAML with DARTS [19] to learn both the optimal architecture and its parameters for a given task. However, the best network, $a$ , needs to be trained using MAML from scratch. Meta-NAS [100] takes a step further and only requires fine-tuning of $a$ on a given task. However, the $a$ is obtained from a single meta-architecture and so its choice is limited, preventing parameter prediction for arbitrary $a$ . CATCH [101] follows a similar idea, but uses reinforcement learning to quickly search for the best $a$ on the specific task. Overall meta-learning mainly aims at generalization across tasks, often motivated by the few-shot learning problem. In contrast, our parameter prediction problem assumes a single task (here an image dataset), but aims at generalization across architectures $a$ with the ability to predict parameters in a single forward pass.
200
+
201
+ One-shot NAS. One-shot NAS aims to learn a single “supernet” [102, 12, 103] that can be used to estimate the performance of smaller nets (subnets) obtained by some kind of pruning the supernet, followed by training the best chosen $a$ from scratch with SGD. Recent models, in particular BigNAS [12] and OnceForAll (OFA) [102], eliminate the need to train subnets. However, the fundamental limitation of one-shot NAS is poor scaling with the number of possible computational operations [24]. This limits the diversity of architectures for which parameters can be obtained. For example, all subnets in OFA are based on MobileNet-v3 [33], which does not allow to solve our more general parameter prediction task. To mitigate this, SMASH [104] proposed to predict some of the parameters using hypernetworks [14] by encoding architectures as a 3D tensor. Graph HyperNetworks (GHNs) [24] further generalized this approach to “arbitrary” computational graphs (DAGs), which allowed them to improve NAS results. GHNs focused on obtaining reliable subnetwork rankings for NAS and did not aim to predict large-scale performant parameters. We show that the vanilla GHNs perform poorly on our parameter prediction task mainly due to the inappropriate scale of predicted parameters, lack of long-range interactions in the graphs, gradient noise and slow convergence when optimizing Equation 2. Conventionally to NAS, GHNs were also trained in a quite constrained architecture space [105]. We expand the architecture space adopting GHNs for a more general problem.
202
+
203
+ # 7 Conclusion
204
+
205
+ We propose a novel framework and benchmark to learn and evaluate neural parameter prediction models. Our model (GHN-2) is able to predict parameters for very diverse and large-scale architectures in a single forward pass in a fraction of a second. The networks with predicted parameters yield surprisingly high image classification accuracy given the extremely challenging nature of our parameter prediction task. However, the accuracy is still far from networks trained with handcrafted optimization methods. Bridging the gap is a promising future direction. As a beneficial side-effect, GHN-2 learns a strong representation of neural architectures as evidenced by our property prediction evaluation. Finally, parameters predicted using GHN-2 trained on ImageNet benefit transfer learning in the low-data regime. This motivates further research towards solving our task.
206
+
207
+ # Acknowledgments
208
+
209
+ BK is thankful to Facebook AI Research for funding the initial phase of this research during his internship and to NSERC and the Ontario Graduate Scholarship used to fund the other phases of this research. GWT and BK also acknowledge support from CIFAR and the Canada Foundation for Innovation. Resources used in preparing this research were provided, in part, by the Province of Ontario, the Government of Canada through CIFAR, and companies sponsoring the Vector Institute: http://www.vectorinstitute.ai/#partners. We are thankful to Magdalena Sobol for editorial help. We are thankful to the Vector AI Engineering team (Gerald Shen, Maria Koshkina and Deval Pandya) for code review. We are also thankful to the reviewers for their constructive feedback.
210
+
211
+ # References
212
+
213
+ [1] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International journal of computer vision, 115(3):211–252, 2015.
214
+ [2] Sebastian Ruder. An overview of gradient descent optimization algorithms. arXiv preprint arXiv:1609.04747, 2016.
215
+ [3] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
216
+ [4] Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q Weinberger. Deep networks with stochastic depth. In European conference on computer vision, pages 646–661. Springer, 2016.
217
+ [5] Andrew Brock, Theodore Lim, James M Ritchie, and Nick Weston. Freezeout: Accelerate training by progressively freezing layers. arXiv preprint arXiv:1706.04983, 2017.
218
+ [6] Dami Choi, Alexandre Passos, Christopher J Shallue, and George E Dahl. Faster neural network training with data echoing. arXiv preprint arXiv:1907.05550, 2019.
219
+ [7] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015.
220
+ [8] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778, 2016.
221
+ [9] NVIDIA. Nvidia data center deep learning product performance. URL https://developer.nvidia. com/deep-learning-performance-training-inference.
222
+ [10] Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020.
223
+ [11] Emma Strubell, Ananya Ganesh, and Andrew McCallum. Energy and policy considerations for deep learning in nlp. arXiv preprint arXiv:1906.02243, 2019.
224
+ [12] Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, and Song Han. Once-for-all: Train one network and specialize it for efficient deployment, 2019.
225
+ [13] Neil C Thompson, Kristjan Greenewald, Keeheon Lee, and Gabriel F Manso. The computational limits of deep learning. arXiv preprint arXiv:2007.05558, 2020.
226
+ [14] David Ha, Andrew Dai, and Quoc V Le. Hypernetworks. arXiv preprint arXiv:1609.09106, 2016.
227
+ [15] Alex Krizhevsky et al. Learning multiple layers of features from tiny images. 2009.
228
+ [16] Timothy Hospedales, Antreas Antoniou, Paul Micaelli, and Amos Storkey. Meta-learning in neural networks: A survey. arXiv preprint arXiv:2004.05439, 2020.
229
+ [17] Marcin Andrychowicz, Misha Denil, Sergio Gomez, Matthew W Hoffman, David Pfau, Tom Schaul, Brendan Shillingford, and Nando De Freitas. Learning to learn by gradient descent by gradient descent. In Advances in neural information processing systems, pages 3981–3989, 2016.
230
+ [18] Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. 2016.
231
+ [19] Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. arXiv preprint arXiv:1806.09055, 2018.
232
+ [20] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020.
233
+ [21] Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net, 2017. URL https://openreview.net/forum?id= SJU4ayYgl.
234
+ [22] Petar Velickovi ˇ c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua Bengio. ´ Graph attention networks. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum?id $= \pm$ JXMpikCZ.
235
+ [23] Vijay Prakash Dwivedi, Chaitanya K Joshi, Thomas Laurent, Yoshua Bengio, and Xavier Bresson. Benchmarking graph neural networks. arXiv preprint arXiv:2003.00982, 2020.
236
+ [24] Chris Zhang, Mengye Ren, and Raquel Urtasun. Graph hypernetworks for neural architecture search. arXiv preprint arXiv:1810.05749, 2018.
237
+ [25] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
238
+ [26] Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1492–1500, 2017.
239
+ [27] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4700–4708, 2017.
240
+ [28] Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016.
241
+ [29] Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 8697–8710, 2018.
242
+ [30] 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 Proceedings of the European conference on computer vision (ECCV), pages 19–34, 2018.
243
+ [31] Esteban Real, Alok Aggarwal, Yanping Huang, and Quoc V Le. Regularized evolution for image classifier architecture search. In Proceedings of the aaai conference on artificial intelligence, volume 33, pages 4780–4789, 2019.
244
+ [32] Xin Chen, Lingxi Xie, Jun Wu, and Qi Tian. Progressive darts: Bridging the optimization gap for nas in the wild. arXiv preprint arXiv:1912.10952, 2019.
245
+ [33] Andrew Howard, Mark Sandler, Grace Chu, Liang-Chieh Chen, Bo Chen, Mingxing Tan, Weijun Wang, Yukun Zhu, Ruoming Pang, Vijay Vasudevan, et al. Searching for mobilenetv3. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 1314–1324, 2019.
246
+ [34] Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. Gated graph sequence neural networks. arXiv preprint arXiv:1511.05493, 2015.
247
+ [35] Kyunghyun Cho, Bart Van Merriënboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014.
248
+ [36] Andrew Brock, Soham De, and Samuel L Smith. Characterizing signal propagation to close the performance gap in unnormalized resnets. arXiv preprint arXiv:2101.08692, 2021.
249
+ [37] Andrew Brock, Soham De, Samuel L Smith, and Karen Simonyan. High-performance large-scale image recognition without normalization. arXiv preprint arXiv:2102.06171, 2021.
250
+ [38] Laurent Sifre and Stéphane Mallat. Rigid-motion scattering for texture classification. arXiv preprint arXiv:1403.1687, 2014.
251
+ [39] Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017.
252
+ [40] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7132–7141, 2018.
253
+ [41] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017.
254
+ [42] Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.
255
+ [43] Harold W Kuhn. The hungarian method for the assignment problem. Naval research logistics quarterly, 2(1-2):83–97, 1955.
256
+ [44] Aric Hagberg, Pieter Swart, and Daniel S Chult. Exploring network structure, dynamics, and function using networkx. Technical report, Los Alamos National Lab.(LANL), Los Alamos, NM (United States), 2008.
257
+ [45] Alain Barrat, Marc Barthelemy, Romualdo Pastor-Satorras, and Alessandro Vespignani. The architecture of complex weighted networks. Proceedings of the national academy of sciences, 101(11):3747–3752, 2004.
258
+ [46] Jiaxuan You, Jure Leskovec, Kaiming He, and Saining Xie. Graph structure of neural networks, 2020.
259
+ [47] Anna Golubeva, Behnam Neyshabur, and Guy Gur-Ari. Are wider nets better given the same number of parameters? arXiv preprint arXiv:2010.14495, 2020.
260
+ [48] Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016.
261
+ [49] Quynh Nguyen and Matthias Hein. The loss surface of deep and wide neural networks. In International conference on machine learning, pages 2603–2612. PMLR, 2017.
262
+ [50] Rupesh Kumar Srivastava, Klaus Greff, and Jürgen Schmidhuber. Training very deep networks. arXiv preprint arXiv:1507.06228, 2015.
263
+ [51] Sara Hooker. The hardware lottery, 2020.
264
+ [52] Angus Galloway, Anna Golubeva, Thomas Tanay, Medhat Moussa, and Graham W Taylor. Batch normalization is a cause of adversarial vulnerability. arXiv preprint arXiv:1905.02161, 2019.
265
+ [53] Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. arXiv preprint arXiv:1903.12261, 2019.
266
+ [54] Yuxin Wu and Kaiming He. Group normalization. In Proceedings of the European conference on computer vision (ECCV), pages 3–19, 2018.
267
+ [55] Siyuan Qiao, Huiyu Wang, Chenxi Liu, Wei Shen, and Alan Yuille. Micro-batch training with batchchannel normalization and weight standardization. arXiv preprint arXiv:1903.10520, 2019.
268
+ [56] Hongyi Zhang, Yann N Dauphin, and Tengyu Ma. Fixup initialization: Residual learning without normalization. arXiv preprint arXiv:1901.09321, 2019.
269
+ [57] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the IEEE international conference on computer vision, pages 1026–1034, 2015.
270
+ [58] Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the thirteenth international conference on artificial intelligence and statistics, pages 249–256, 2010.
271
+ [59] Oscar Chang, Lampros Flokas, and Hod Lipson. Principled weight initialization for hypernetworks. In International Conference on Learning Representations, 2019.
272
+ [60] Uri Alon and Eran Yahav. On the bottleneck of graph neural networks and its practical implications. arXiv preprint arXiv:2006.05205, 2020.
273
+ [61] Salah El Hihi and Yoshua Bengio. Hierarchical recurrent neural networks for long-term dependencies. In Advances in neural information processing systems, pages 493–499, 1996.
274
+ [62] Meng Liu, Zhengyang Wang, and Shuiwang Ji. Non-local graph neural networks. arXiv preprint arXiv:2005.14612, 2020.
275
+ [63] Hongbin Pei, Bingzhe Wei, Kevin Chen-Chuan Chang, Yu Lei, and Bo Yang. Geom-gcn: Geometric graph convolutional networks. arXiv preprint arXiv:2002.05287, 2020.
276
+ [64] Jiaxuan You, Rex Ying, and Jure Leskovec. Position-aware graph neural networks. In International Conference on Machine Learning, pages 7134–7143. PMLR, 2019.
277
+ [65] Yiding Yang, Xinchao Wang, Mingli Song, Junsong Yuan, and Dacheng Tao. Spagan: Shortest path graph attention network. arXiv preprint arXiv:2101.03464, 2021.
278
+ [66] Pavlo M Radiuk. Impact of training set batch size on the performance of convolutional neural networks for diverse datasets. Information Technology and Management Science, 20(1):20–24, 2017.
279
+ [67] Zhaohui Yang, Yunhe Wang, Xinghao Chen, Boxin Shi, Chao Xu, Chunjing Xu, Qi Tian, and Chang Xu. Cars: Continuous evolution for efficient neural architecture search. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1829–1838, 2020.
280
+ [68] Chaoyang He, Haishan Ye, Li Shen, and Tong Zhang. Milenas: Efficient neural architecture search via mixed-level reformulation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11993–12002, 2020.
281
+ [69] Guohao Li, Guocheng Qian, Itzel C Delgadillo, Matthias Muller, Ali Thabet, and Bernard Ghanem. Sgas: Sequential greedy architecture search. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1620–1630, 2020.
282
+ [70] Olga Wichrowska, Niru Maheswaranathan, Matthew W Hoffman, Sergio Gomez Colmenarejo, Misha Denil, Nando Freitas, and Jascha Sohl-Dickstein. Learned optimizers that scale and generalize. In International Conference on Machine Learning, pages 3751–3760. PMLR, 2017.
283
+ [71] Luke Metz, Niru Maheswaranathan, C Daniel Freeman, Ben Poole, and Jascha Sohl-Dickstein. Tasks, stability, architecture, and compute: Training more effective learned optimizers, and using them to train themselves. arXiv preprint arXiv:2009.11243, 2020.
284
+ [72] Jingzhao Zhang, Sai Praneeth Karimireddy, Andreas Veit, Seungyeon Kim, Sashank J Reddi, Sanjiv Kumar, and Suvrit Sra. Why adam beats sgd for attention models. arXiv e-prints, pages arXiv–1912, 2019.
285
+ [73] Priya Goyal, Piotr Dollár, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch sgd: Training imagenet in 1 hour. arXiv preprint arXiv:1706.02677, 2017.
286
+ [74] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012.
287
+ [75] Wei Li, Shaogang Gong, and Xiatian Zhu. Neural graph embedding for neural architecture search. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 4707–4714, 2020.
288
+ [76] Wei Wen, Hanxiao Liu, Hai Li, Yiran Chen, Gabriel Bender, and Pieter-Jan Kindermans. Neural predictor for neural architecture search. arXiv preprint arXiv:1912.00848, 2019.
289
+ [77] Haifeng Jin, Qingquan Song, and Xia Hu. Auto-keras: An efficient neural architecture search system. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 1946–1956, 2019.
290
+ [78] Nils M Kriege, Fredrik D Johansson, and Christopher Morris. A survey on graph kernels. Applied Network Science, 5(1):1–42, 2020.
291
+ [79] Ilya Makarov, Dmitrii Kiselev, Nikita Nikitinsky, and Lovro Subelj. Survey on graph embeddings and their applications to machine learning problems on graphs. PeerJ Computer Science, 7, 2021.
292
+ [80] Wei Wen, Hanxiao Liu, Yiran Chen, Hai Li, Gabriel Bender, and Pieter-Jan Kindermans. Neural predictor for neural architecture search. In European Conference on Computer Vision, pages 660–676. Springer, 2020.
293
+ [81] Jovita Lukasik, David Friede, Heiner Stuckenschmidt, and Margret Keuper. Neural architecture performance prediction using graph neural networks. arXiv preprint arXiv:2010.10024, 2020.
294
+
295
+ [82] Bowen Baker, Otkrist Gupta, Ramesh Raskar, and Nikhil Naik. Accelerating neural architecture search using performance prediction. arXiv preprint arXiv:1705.10823, 2017.
296
+
297
+ [83] Simon Kornblith, Jonathon Shlens, and Quoc V Le. Do better imagenet models transfer better? In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2661–2671, 2019.
298
+
299
+ [84] Minyoung Huh, Pulkit Agrawal, and Alexei A Efros. What makes imagenet good for transfer learning? arXiv preprint arXiv:1608.08614, 2016.
300
+
301
+ [85] Behnam Neyshabur, Hanie Sedghi, and Chiyuan Zhang. What is being transferred in transfer learning? arXiv preprint arXiv:2008.11687, 2020.
302
+
303
+ [86] Maithra Raghu, Chiyuan Zhang, Jon Kleinberg, and Samy Bengio. Transfusion: Understanding transfer learning for medical imaging. arXiv preprint arXiv:1902.07208, 2019.
304
+
305
+ [87] Xiaohua Zhai, Joan Puigcerver, Alexander Kolesnikov, Pierre Ruyssen, Carlos Riquelme, Mario Lucic, Josip Djolonga, Andre Susano Pinto, Maxim Neumann, Alexey Dosovitskiy, et al. A large-scale study of representation learning with the visual task adaptation benchmark. arXiv preprint arXiv:1910.04867, 2019.
306
+
307
+ [88] PyTorch. Pytorch object detection finetuning tutorial. URL https://pytorch.org/tutorials/ intermediate/torchvision_tutorial.html.
308
+
309
+ [89] Liming Wang, Jianbo Shi, Gang Song, and I-fan Shen. Object detection combining recognition and segmentation. In Asian conference on computer vision, pages 189–199. Springer, 2007.
310
+
311
+ [90] Jürgen Schmidhuber and AI Blog. Metalearning machines learn to learn (1987-).
312
+
313
+ [91] Louis Kirsch and Jürgen Schmidhuber. Meta learning backpropagation and improving it. arXiv preprint arXiv:2012.14905, 2020.
314
+
315
+ [92] Hugo Siqueira Gomes, Benjamin Léger, and Christian Gagné. Meta learning black-box population-based optimizers. arXiv preprint arXiv:2103.03526, 2021.
316
+
317
+ [93] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 1126–1135. JMLR. org, 2017.
318
+
319
+ [94] Jake Snell, Kevin Swersky, and Richard S Zemel. Prototypical networks for few-shot learning. arXiv preprint arXiv:1703.05175, 2017.
320
+
321
+ [95] Adriana Romero, Pierre Luc Carrier, Akram Erraqabi, Tristan Sylvain, Alex Auvolat, Etienne Dejoie, Marc-André Legault, Marie-Pierre Dubé, Julie G Hussin, and Yoshua Bengio. Diet networks: thin parameters for fat genomics. arXiv preprint arXiv:1611.09340, 2016.
322
+
323
+ [96] James Requeima, Jonathan Gordon, John Bronskill, Sebastian Nowozin, and Richard E Turner. Fast and flexible multi-task classification using conditional neural adaptive processes. arXiv preprint arXiv:1906.07697, 2019.
324
+
325
+ [97] Huaiyu Li, Weiming Dong, Xing Mei, Chongyang Ma, Feiyue Huang, and Bao-Gang Hu. Lgm-net: Learning to generate matching networks for few-shot learning. In International conference on machine learning, pages 3825–3834. PMLR, 2019.
326
+
327
+ [98] Luca Bertinetto, João F Henriques, Jack Valmadre, Philip HS Torr, and Andrea Vedaldi. Learning feed-forward one-shot learners. arXiv preprint arXiv:1606.05233, 2016.
328
+
329
+ [99] Dongze Lian, Yin Zheng, Yintao Xu, Yanxiong Lu, Leyu Lin, Peilin Zhao, Junzhou Huang, and Shenghua Gao. Towards fast adaptation of neural architectures with meta learning. In ICLR. JMLR. org, 2020.
330
+
331
+ [100] Thomas Elsken, Benedikt Staffler, Jan Hendrik Metzen, and Frank Hutter. Meta-learning of neural architectures for few-shot learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12365–12375, 2020.
332
+
333
+ [101] Xin Chen, Yawen Duan, Zewei Chen, Hang Xu, Zihao Chen, Xiaodan Liang, Tong Zhang, and Zhenguo Li. Catch: Context-based meta reinforcement learning for transferrable architecture search. In European Conference on Computer Vision, pages 185–202. Springer, 2020.
334
+
335
+ [102] 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. arXiv preprint arXiv:2003.11142, 2020.
336
+
337
+ [103] Xin He, Kaiyong Zhao, and Xiaowen Chu. Automl: A survey of the state-of-the-art. Knowledge-Based Systems, 212:106622, 2021.
338
+ [104] Andrew Brock, Theodore Lim, James M Ritchie, and Nick Weston. Smash: one-shot model architecture search through hypernetworks. arXiv preprint arXiv:1708.05344, 2017.
339
+ [105] Gabriel Bender, Pieter-Jan Kindermans, Barret Zoph, Vijay Vasudevan, and Quoc Le. Understanding and simplifying one-shot architecture search. In International Conference on Machine Learning, pages 550–559, 2018.
340
+ [106] Guixiang Ma, Nesreen K Ahmed, Theodore L Willke, and S Yu Philip. Deep graph similarity learning: A survey. Data Mining and Knowledge Discovery, pages 1–38, 2021.
341
+ [107] Yunsheng Bai, Hao Ding, Song Bian, Ting Chen, Yizhou Sun, and Wei Wang. Simgnn: A neural network approach to fast graph similarity computation. In Proceedings of the Twelfth ACM International Conference on Web Search and Data Mining, pages 384–392, 2019.
342
+ [108] DC Dowson and BV Landau. The fréchet distance between multivariate normal distributions. Journal of multivariate analysis, 12(3):450–455, 1982.
343
+ [109] Chia-Cheng Liu, Harris Chan, Kevin Luk, and AI Borealis. Auto-regressive graph generation modeling with improved evaluation methods. In 33rd Conference on Neural Information Processing Systems. Vancouver, Canada, 2019.
344
+ [110] Julian Zilly, Hannes Zilly, Oliver Richter, Roger Wattenhofer, Andrea Censi, and Emilio Frazzoli. The frechet distance of training and test distribution predicts the generalization gap. 2019.
345
+ [111] Rylee Thompson, Elahe Ghalebi, Terrance DeVries, and Graham W Taylor. Building lego using deep generative models of graphs. arXiv preprint arXiv:2012.11543, 2020.
346
+ [112] Pinar Yanardag and SVN Vishwanathan. Deep graph kernels. In Proceedings of the 21th ACM SIGKDD international conference on knowledge discovery and data mining, pages 1365–1374, 2015.
347
+ [113] Misha Denil, Babak Shakibi, Laurent Dinh, Marc’Aurelio Ranzato, and Nando de Freitas. Predicting parameters in deep learning. In C J C Burges, L Bottou, M Welling, Z Ghahramani, and K Q Weinberger, editors, Advances in Neural Information Processing Systems 26, pages 2148–2156. Curran Associates, Inc., 2013.
348
+ [114] Neale Ratzlaff and Li Fuxin. Hypergan: A generative model for diverse, performant neural networks. In International Conference on Machine Learning, pages 5361–5369. PMLR, 2019.
349
+ [115] Iou-Jen Liu, Jian Peng, and Alexander G Schwing. Knowledge flow: Improve upon your teachers. arXiv preprint arXiv:1904.05878, 2019.
350
+ [116] Yu Cheng, Duo Wang, Pan Zhou, and Tao Zhang. A survey of model compression and acceleration for deep neural networks. arXiv preprint arXiv:1710.09282, 2017.
351
+ [117] Yann Dauphin and Samuel S Schoenholz. Metainit: Initializing learning by learning to initialize. 2019.
352
+ [118] Chen Zhu, Renkun Ni, Zheng Xu, Kezhi Kong, W Ronny Huang, and Tom Goldstein. Gradinit: Learning to initialize neural networks for stable and efficient training. arXiv preprint arXiv:2102.08098, 2021.
353
+ [119] Debasmit Das, Yash Bhalgat, and Fatih Porikli. Data-driven weight initialization with sylvester solvers. arXiv preprint arXiv:2105.10335, 2021.
354
+ [120] Yue Yu, Jie Chen, Tian Gao, and Mo Yu. Dag-gnn: Dag structure learning with graph neural networks. In International Conference on Machine Learning, pages 7154–7163. PMLR, 2019.
355
+ [121] Xiaojie Guo and Liang Zhao. A systematic survey on deep generative models for graph generation. arXiv preprint arXiv:2007.06686, 2020.
356
+ [122] Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, and Piotr Dollár. Designing network design spaces. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10428–10436, 2020.
357
+ [123] Jiaxuan You, Zhitao Ying, and Jure Leskovec. Design space for graph neural networks. Advances in Neural Information Processing Systems, 33, 2020.
parse/train/vqHak8NLk25/vqHak8NLk25_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/vqHak8NLk25/vqHak8NLk25_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/vqHak8NLk25/vqHak8NLk25_model.json ADDED
The diff for this file is too large to render. See raw diff