ZHANGYUXUAN-zR commited on
Commit
a3d6ff2
·
verified ·
1 Parent(s): a03707a

Add files using upload-large-folder tool

Browse files
parse/train/BJJLHbb0-/BJJLHbb0-.md ADDED
@@ -0,0 +1,340 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DEEP AUTOENCODING GAUSSIAN MIXTURE MODEL FOR UNSUPERVISED ANOMALY DETECTION
2
+
3
+ Bo Zong†, Qi Song‡, Martin Renqiang $\mathbf { M } \mathbf { i n } ^ { \dagger }$ , Wei Cheng† Cristian Lumezanu†, Daeki Cho†, Haifeng Chen†
4
+
5
+ †NEC Laboratories America
6
+ ‡Washington State University, Pullman
7
+ {bzong, renqiang, weicheng, lume, dkcho, haifeng}@nec-labs.com
8
+ qsong@eecs.wsu.edu
9
+
10
+ # ABSTRACT
11
+
12
+ Unsupervised anomaly detection on multi- or high-dimensional data is of great importance in both fundamental machine learning research and industrial applications, for which density estimation lies at the core. Although previous approaches based on dimensionality reduction followed by density estimation have made fruitful progress, they mainly suffer from decoupled model learning with inconsistent optimization goals and incapability of preserving essential information in the low-dimensional space. In this paper, we present a Deep Autoencoding Gaussian Mixture Model (DAGMM) for unsupervised anomaly detection. Our model utilizes a deep autoencoder to generate a low-dimensional representation and reconstruction error for each input data point, which is further fed into a Gaussian Mixture Model (GMM). Instead of using decoupled two-stage training and the standard Expectation-Maximization (EM) algorithm, DAGMM jointly optimizes the parameters of the deep autoencoder and the mixture model simultaneously in an end-to-end fashion, leveraging a separate estimation network to facilitate the parameter learning of the mixture model. The joint optimization, which well balances autoencoding reconstruction, density estimation of latent representation, and regularization, helps the autoencoder escape from less attractive local optima and further reduce reconstruction errors, avoiding the need of pre-training. Experimental results on several public benchmark datasets show that, DAGMM significantly outperforms state-of-the-art anomaly detection techniques, and achieves up to $1 4 \%$ improvement based on the standard $F _ { 1 }$ score.
13
+
14
+ # 1 INTRODUCTION
15
+
16
+ Unsupervised anomaly detection is a fundamental problem in machine learning, with critical applications in many areas, such as cybersecurity (Tan et al. (2011)), complex system management (Liu et al. (2008)), medical care (Keller et al. (2012)), and so on. At the core of anomaly detection is density estimation: given a lot of input samples, anomalies are those ones residing in low probability density areas.
17
+
18
+ Although fruitful progress has been made in the last several years, conducting robust anomaly detection on multi- or high-dimensional data without human supervision remains a challenging task. Especially, when the dimensionality of input data becomes higher, it is more difficult to perform density estimation in the original feature space, as any input sample could be a rare event with low probability to observe (Chandola et al. (2009)). To address this issue caused by the curse of dimensionality, two-step approaches are widely adopted (Candes et al. (2011)), in which \` dimensionality reduction is first conducted, and then density estimation is performed in the latent low-dimensional space. However, these approaches could easily lead to suboptimal performance, because dimensionality reduction in the first step is unaware of the subsequent density estimation task, and the key information for anomaly detection could be removed in the first place. Therefore, it is desirable to combine the force of dimensionality reduction and density estimation, although a joint optimization accounting for these two components is usually computationally difficult. Several recent works (Zhai et al. (2016); Yang et al. (2017a); Xie et al. (2016)) explored this direction by utilizing the strong modeling capacity of deep networks, but the resulting performance is limited either by a reduced low-dimensional space that is unable to preserve essential information of input samples, an over-simplified density estimation model without enough capacity, or a training strategy that does not fit density estimation tasks.
19
+
20
+ ![](images/24602db1ad87746646f5e11c6479d1558e34fbaafcfbb9ca2ff92fa2b1e5f647.jpg)
21
+ Figure 1: Low-dimensional representations for samples from a private cybersecurity dataset: (1) each sample denotes a network flow that originally has 20 dimensions, (2) red/blue points are abnormal/normal samples, (3) the horizontal axis denotes the reduced 1-dimensional space learned by a deep autoencoder, and (4) the vertical axis denotes the reconstruction error induced by the 1-dimensional representation.
22
+
23
+ In this paper, we propose Deep Autoencoding Gaussian Mixture Model (DAGMM), a deep learning framework that addresses the aforementioned challenges in unsupervised anomaly detection from several aspects.
24
+
25
+ First, DAGMM preserves the key information of an input sample in a low-dimensional space that includes features from both the reduced dimensions discovered by dimensionality reduction and the induced reconstruction error. From the example shown in Figure 1, we can see that anomalies differ from normal samples in two aspects: (1) anomalies can be significantly deviated in the reduced dimensions where their features are correlated in a different way; and (2) anomalies are harder to reconstruct, compared with normal samples. Unlike existing methods that only involve one of the aspects (Zimek et al. (2012); Zhai et al. (2016)) with sub-optimal performance, DAGMM utilizes a sub-network called compression network to perform dimensionality reduction by an autoencoder, which prepares a low-dimensional representation for an input sample by concatenating reduced low-dimensional features from encoding and the reconstruction error from decoding.
26
+
27
+ Second, DAGMM leverages a Gaussian Mixture Model (GMM) over the learned low-dimensional space to deal with density estimation tasks for input data with complex structures, which are yet rather difficult for simple models used in existing works (Zhai et al. (2016)). While GMM has strong capability, it also introduces new challenges in model learning. As GMM is usually learned by alternating algorithms such as Expectation-Maximization (EM) (Huber (2011)), it is hard to perform joint optimization of dimensionality reduction and density estimation favoring GMM learning, which is often degenerated into a conventional two-step approach. To address this training challenge, DAGMM utilizes a sub-network called estimation network that takes the low-dimensional input from the compression network and outputs mixture membership prediction for each sample. With the predicted sample membership, we can directly estimate the parameters of GMM, facilitating the evaluation of the energy/likelihood of input samples. By simultaneously minimizing reconstruction error from compression network and sample energy from estimation network, we can jointly train a dimensionality reduction component that directly helps the targeted density estimation task.
28
+
29
+ Finally, DAGMM is friendly to end-to-end training. Usually, it is hard to learn deep autoencoders by end-to-end training, as they can be easily stuck in less attractive local optima, so pre-training is widely adopted (Vincent et al. (2010); Yang et al. (2017a); Xie et al. (2016)). However, pre-training limits the potential to adjust the dimensionality reduction behavior because it is hard to make any significant change to a well-trained autoencoder via fine-tuning. Our empirical study demonstrates that, DAGMM is well-learned by the end-to-end training, as the regularization introduced by the estimation network greatly helps the autoencoder in the compression network escape from less attractive local optima.
30
+
31
+ Experiments on several public benchmark datasets demonstrate that, DAGMM has superior performance over state-of-the-art techniques, with up to $1 4 \%$ improvement of F1 score for anomaly detection. Moreover, we observe that the reconstruction error from the autoencoder in DAGMM by the end-to-end training is as low as the one made by its pre-trained counterpart, while the reconstruction error from an autoencoder without the regularization from the estimation network stays high. In addition, the end-to-end trained DAGMM significantly outperforms all the baseline methods that rely on pre-trained autoencoders.
32
+
33
+ # 2 RELATED WORK
34
+
35
+ Tremendous effort has been devoted to unsupervised anomaly detection (Chandola et al. (2009)), and the existing methods can be grouped into three categories.
36
+
37
+ Reconstruction based methods assume that anomalies are incompressible and thus cannot be effectively reconstructed from low-dimensional projections. Conventional methods in this category include Principal Component Analysis (PCA) (Jolliffe (1986)) with explicit linear projections, kernel PCA with implicit non-linear projections induced by specific kernels (Gunter et al.), and Robust PCA ¨ (RPCA) (Huber (2011); Candes et al. (2011)) that makes PCA less sensitive to noise by enforcing \` sparse structures. In addition, multiple recent works propose to analyze the reconstruction error induced by deep autoencoders, and demonstrate promising results (Zhou & Paffenroth (2017); Zhai et al. (2016)). However, the performance of reconstruction based methods is limited by the fact that they only conduct anomaly analysis from a single aspect, that is, reconstruction error. Although the compression on anomalous samples could be different from the compression on normal samples and some of them do demonstrate unusually high reconstruction errors, a significant amount of anomalous samples could also lurk with a normal level of error, which usually happens when the underlying dimensionality reduction methods have high model complexity or the samples of interest are noisy with complex structures. Even in these cases, we still have the hope to detect such “lurking” anomalies, as they still reside in low-density areas in the reduced low-dimensional space. Unlike the existing reconstruction based methods, DAGMM considers the both aspects, and performs density estimation in a low-dimensional space derived from the reduced representation and the reconstruction error caused by the dimensionality reduction, for a comprehensive view.
38
+
39
+ Clustering analysis is another popular category of methods used for density estimation and anomaly detection, such as multivariate Gaussian Models, Gaussian Mixture Models, $k$ -means, and so on (Barnett & Lewis (1984); Zimek et al. (2012); Kim & Scott (2011); Xiong et al. (2011)). Because of the curse of dimensionality, it is difficult to directly apply such methods to multi- or high- dimensional data. Traditional techniques adopt a two-step approach (Chandola et al. (2009)), where dimensionality reduction is conducted first, then clustering analysis is performed, and the two steps are separately learned. One of the drawbacks in the two-step approach is that dimensionality reduction is trained without the guidance from the subsequent clustering analysis, thus the key information for clustering analysis could be lost during dimensionality reduction. To address this issue, recent works propose deep autoencoder based methods in order to jointly learn dimensionality reduction and clustering components. However, the performance of the state-of-the-art methods is limited by over-simplified clustering models that are unable to handle clustering or density estimation tasks for data of complex structures, or the pre-trained dimensionality reduction component (i.e., autoencoder) has little potential to accommodate further adjustment by the subsequent fine-tuning for anomaly detection. DAGMM explicitly addresses these issues by a sub-network called estimation network that evaluates sample density in the low-dimensional space produced by its compression network. By predicting sample mixture membership, we are able to estimate the parameters of GMM without EM-like alternating procedures. Moreover, DAGMM is friendly to end-to-end training so that we can unleash the full potential of adjusting dimensionality reduction components and jointly improve the quality of clustering analysis/density estimation.
40
+
41
+ In addition, one-class classification approaches are also widely used for anomaly detection. Under this framework, a discriminative boundary surrounding the normal instances is learned by algorithms, such as one-class SVM (Chen et al. (2001); Song et al. (2002); Williams et al. (2002)). When the number of dimensions grows higher, such techniques usually suffer from suboptimal performance due to the curse of dimensionality. Unlike these methods, DAGMM estimates data density in a jointly learned low-dimensional space for more robust anomaly detection.
42
+
43
+ There has been growing interest in joint learning of dimensionality reduction (feature selection) and Gaussian mixture modeling. Yang et al. (2014; 2017b) propose a method that jointly learns linear dimensionality reduction and GMM. Paulik (2013) studies how to perform better feature selection with a pre-trained GMM as a regularizer. Variani et al. (2015) and Zhang & Woodland (2017) propose joint learning frameworks, where the parameters of GMM are directly estimated through supervision information in speech recognition applications. Tuske et al. (2015a;b) investigate ¨ how to use log-linear mixture models to approximate GMM posterior under the conditions that a class/mixture prior distribution is given and a covariance matrix is globally shared. Unlike the existing works, we focus on unsupervised settings: DAGMM extracts useful features for anomaly detection through non-linear dimensionality reduction realized by a deep autoencoder, and jointly learns their density under the GMM framework by mixture membership estimation, for which DAGMM can be viewed as a more powerful deep unsupervised version of adaptive mixture of experts (Jacobs et al. (1991)) in combination with a deep autoencoder. More importantly, DAGMM combines induced reconstruction error and learned latent representation for unsupervised anomaly detection.
44
+
45
+ # 3 DEEP AUTOENCODING GAUSSIAN MIXTURE MODEL
46
+
47
+ # 3.1 OVERVIEW
48
+
49
+ ![](images/8f0d414422daa0d9e21d941997178e29a2a252c31f4275bf47e517796576cbd1.jpg)
50
+ Figure 2: An overview on Deep Autoencoding Gaussian Mixture Model
51
+
52
+ Deep Autoencoding Gaussian Mixture Model (DAGMM) consists of two major components: a compression network and an estimation network. As shown in Figure 2, DAGMM works as follows: (1) the compression network performs dimensionality reduction for input samples by a deep autoencoder, prepares their low-dimensional representations from both the reduced space and the reconstruction error features, and feeds the representations to the subsequent estimation network; (2) the estimation network takes the feed, and predicts their likelihood/energy in the framework of Gaussian Mixture Model (GMM).
53
+
54
+ # 3.2 COMPRESSION NETWORK
55
+
56
+ The low-dimensional representations provided by the compression network contains two sources of features: (1) the reduced low-dimensional representations learned by a deep autoencoder; and (2) the features derived from reconstruction error. Given a sample $\mathbf { x }$ , the compression network computes its low-dimensional representation $\mathbf { z }$ as follows.
57
+
58
+ $$
59
+ \begin{array} { r } { \mathbf { z } _ { c } = h ( \mathbf { x } ; \boldsymbol { \theta } _ { e } ) , } \end{array}
60
+ $$
61
+
62
+ $$
63
+ \begin{array} { r l } & { \mathbf { z } ^ { \prime } = g ( \mathbf { z } _ { c } ; \boldsymbol { \theta } _ { d } ) , } \\ & { \mathbf { z } _ { r } = f ( \mathbf { x } , \mathbf { x } ^ { \prime } ) , } \\ & { \mathbf { z } = [ \mathbf { z } _ { c } , \mathbf { z } _ { r } ] , } \end{array}
64
+ $$
65
+
66
+ where $\mathbf { z } _ { c }$ is the reduced low-dimensional representation learned by the deep autoencoder, ${ \bf z } _ { r }$ includes the features derived from the reconstruction error, $\theta _ { e }$ and $\theta _ { d }$ are the parameters of the deep autoencoder, $\mathbf { x } ^ { \prime }$ is the reconstructed counterpart of $\mathbf { x }$ , $h ( \cdot )$ denotes the encoding function, $g ( \cdot )$ denotes the decoding function, and $f ( \cdot )$ denotes the function of calculating reconstruction error features. In particular, $\mathbf { z } _ { r }$ can be multi-dimensional, considering multiple distance metrics such as absolute Euclidean distance, relative Euclidean distance, cosine similarity, and so on. In the end, the compression network feeds $\mathbf { z }$ to the subsequent estimation network.
67
+
68
+ # 3.3 ESTIMATION NETWORK
69
+
70
+ Given the low-dimensional representations for input samples, the estimation network performs density estimation under the framework of GMM.
71
+
72
+ In the training phase with unknown mixture-component distribution $\phi$ , mixture means $\mu$ , and mixture covariance $\pmb { \Sigma }$ , the estimation network estimates the parameters of GMM and evaluates the likelihood/energy for samples without alternating procedures such as EM (Zimek et al. (2012)). The estimation network achieves this by utilizing a multi-layer neural network to predict the mixture membership for each sample. Given the low-dimensional representations $\mathbf { z }$ and an integer $K$ as the number of mixture components, the estimation network makes membership prediction as follows.
73
+
74
+ $$
75
+ \mathbf { p } = M L N ( \mathbf { z } ; \theta _ { m } ) , \hat { \gamma } = \mathrm { s o f t m a x } ( \mathbf { p } ) ,
76
+ $$
77
+
78
+ where $\hat { \gamma }$ is a $K$ -dimensional vector for the soft mixture-component membership prediction, and $\mathbf { p }$ is the output of a multi-layer network parameterized by $\theta _ { m }$ . Given a batch of $N$ samples and their membership prediction, $\forall 1 \leq k \leq K$ , we can further estimate the parameters in GMM as follows.
79
+
80
+ $$
81
+ \hat { \phi } _ { k } = \sum _ { i = 1 } ^ { N } \frac { \hat { \gamma } _ { i k } } { N } , \qquad \hat { \mu } _ { k } = \frac { \sum _ { i = 1 } ^ { N } \hat { \gamma } _ { i k } { \bf z } _ { i } } { \sum _ { i = 1 } ^ { N } \hat { \gamma } _ { i k } } , \qquad \hat { \bf \mu } _ { k } = \frac { \sum _ { i = 1 } ^ { N } \hat { \gamma } _ { i k } \bigl ( { \bf z } _ { i } - \hat { \mu } _ { k } \bigr ) \bigl ( { \bf z } _ { i } - \hat { \mu } _ { k } \bigr ) ^ { T } } { \sum _ { i = 1 } ^ { N } \hat { \gamma } _ { i k } } .
82
+ $$
83
+
84
+ where $\hat { \gamma } _ { i }$ is the membership prediction for the low-dimensional representation $\mathbf { z } _ { i }$ , and $\hat { \phi } _ { k } , \hat { \mu } _ { k } , \hat { \Sigma } _ { k }$ are mixture probability, mean, covariance for component $k$ in GMM, respectively.
85
+
86
+ With the estimated parameters, sample energy can be further inferred by
87
+
88
+ $$
89
+ E ( \mathbf { z } ) = - \log \bigg ( \sum _ { k = 1 } ^ { K } \hat { \phi } _ { k } \frac { \exp \big ( - \frac { 1 } { 2 } ( \mathbf { z } - \hat { \mu } _ { k } ) ^ { T } \hat { \Sigma } _ { k } ^ { - 1 } ( \mathbf { z } - \hat { \mu } _ { k } ) \big ) } { \sqrt { | 2 \pi \hat { \Sigma } _ { k } | } } \bigg ) .
90
+ $$
91
+
92
+ where $| \cdot |$ denotes the determinant of a matrix.
93
+
94
+ In addition, during the testing phase with the learned GMM parameters, it is straightforward to estimate sample energy, and predict samples of high energy as anomalies by a pre-chosen threshold.
95
+
96
+ # 3.4 OBJECTIVE FUNCTION
97
+
98
+ Given a dataset of $N$ samples, the objective function that guides DAGMM training is constructed as follows.
99
+
100
+ $$
101
+ J ( \theta _ { e } , \theta _ { d } , \theta _ { m } ) = \frac { 1 } { N } \sum _ { i = 1 } ^ { N } L ( \mathbf { x } _ { i } , \mathbf { x } _ { i } ^ { \prime } ) + \frac { \lambda _ { 1 } } { N } \sum _ { i = 1 } ^ { N } E ( \mathbf { z } _ { i } ) + \lambda _ { 2 } P ( \hat { \mathbf { \mathbf { \ x } } } ) .
102
+ $$
103
+
104
+ This objective function includes three components.
105
+
106
+ • $L ( \mathbf { x } _ { i } , \mathbf { x } _ { i } ^ { \prime } )$ is the loss function that characterizes the reconstruction error caused by the deep autoencoder in the compression network. Intuitively, if the compression network could make the reconstruction error low, the low-dimensional representation could better preserve the key information of input samples. Therefore, a compression network of lower reconstruction error is always desired. In practice, $L _ { 2 }$ -norm usually gives desirable results, as $L ( \mathbf { x } _ { i } , \mathbf { x } _ { i } ^ { \prime } ) = \left. \mathbf { x } _ { i } - \mathbf { x } _ { i } ^ { \prime } \right. _ { 2 } ^ { 2 }$ . $E ( \mathbf { z } _ { i } )$ models the probabilities that we could observe the input samples. By minimizing the sample energy, we look for the best combination of compression and estimation networks that maximize the likelihood to observe input samples.
107
+
108
+ • DAGMM also has the singularity problem as in GMM: trivial solutions are triggered when the diagonal entries in covariance matrices degenerate to 0. To avoid this issue, we penalize $\begin{array} { r } { P ( \hat { \Sigma } ) \bar { = } \sum _ { k = 1 } ^ { K } \sum _ { j = 1 } ^ { d } \frac { 1 } { \hat { \Sigma } _ { k j j } } } \end{array}$ , where $d$ is the number of dimensions in the low-dimensional representations provided by the compression network. • $\lambda _ { 1 }$ and $\lambda _ { 2 }$ are the meta parameters in DAGMM. In practice, $\lambda _ { 1 } = 0 . 1$ and $\lambda _ { 2 } = 0 . 0 0 5$ usually render desirable results.
109
+
110
+ # 3.5 RELATION TO VARIATIONAL INFERENCE
111
+
112
+ In DAGMM, we leverage the estimation network to make membership prediction for each sample. From the view of probabilistic graphical models, the estimation network plays an analogous role of latent variable (i.e., sample membership) inference. Recently, neural variational inference (Mnih & Gregor (2014)) has been proposed to employ deep neural networks to tackle difficult latent variable inference problems, where exact model inference is intractable and conventional approximate methods cannot scale well. Theoretically, we can also adapt the membership prediction task of DAGMM into the framework of neural variational inference. For sample $\mathbf { x } _ { i }$ , the contribution of its compressed representation $\mathbf { z } _ { i }$ to the energy function can be upper-bounded as follows (Jordan et al. (1999)),
113
+
114
+ $$
115
+ \begin{array} { l } { { \displaystyle E ( { \bf z } _ { i } ) = - \log p ( { \bf z } _ { i } ) = - \log \sum _ { k } p ( { \bf z } _ { i } , k ) } \ ~ } \\ { { \displaystyle = - \log \sum _ { k } Q _ { \theta _ { m } } ( k \mid { \bf z } _ { i } ) \frac { p ( { \bf z } _ { i } , k ) } { Q _ { \theta _ { m } } ( k \mid { \bf z } _ { i } ) } } \ ~ } \\ { { \displaystyle \leq - \sum _ { k } Q _ { \theta _ { m } } ( k \mid { \bf z } _ { k } ) \log \frac { p ( { \bf z } _ { i } , k ) } { Q _ { \theta _ { m } } ( k \mid { \bf z } _ { i } ) } } \ ~ } \\ { { \displaystyle = - E Q _ { \theta _ { m } } \log p ( { \bf z } _ { i } , k ) - \log Q _ { \theta _ { m } } ( k \mid { \bf z } _ { i } ) ] \ ~ } } \\ { { \displaystyle = - E Q _ { \theta _ { m } } \log p ( { \bf z } _ { i } \mid k ) ] + \mathrm { K L } ( Q _ { \theta _ { m } } ( k \mid { \bf z } _ { i } ) \mid | p ( k ) ) } \ ~ } \\ { { \displaystyle = - \log p ( { \bf z } _ { i } ) + \mathrm { K L } ( Q _ { \theta _ { m } } ( k \mid { \bf z } _ { i } ) \mid p ( k \mid { \bf z } _ { i } ) ) } \ ~ } \\ { { \displaystyle = E ( { \bf z } _ { i } ) + \mathrm { K L } ( Q _ { \theta _ { m } } ( k \mid { \bf z } _ { i } ) \mid p ( k \mid { \bf z } _ { i } ) ) } \ ~ } \end{array}
116
+ $$
117
+
118
+ where $Q _ { \theta _ { m } } ( k \mid \mathbf { z } _ { i } )$ is the estimation network that predicts the membership of $\mathbf { z } _ { i }$ , $\mathrm { K L } ( \cdot | | \cdot )$ is the Kullback-Leibler divergence between two input distributions, $p ( k ) = \phi _ { k }$ is the mixing coefficient to be estimated, and $p ( k \mid \mathbf { z } _ { i } )$ is the posterior probability distribution of mixture component $k$ given $\mathbf { z } _ { i }$
119
+
120
+ By minimizing the negative evidence lower bound in Equation (8), we can make the estimation network approximate the true posterior and tighten the bound of energy function. In DAGMM, we use Equation (6) as a part of the objective function instead of its upper bound in Equation (10) simply because the energy function of DAGMM is tractable and efficient to evaluate. Unlike neural variational inference that uses the deep estimation network to define a variational posterior distribution as described above, DAGMM explicitly employs the deep estimation network to parametrize a sampledependent prior distribution. In the history of machine learning research, there were research efforts towards utilizing neural networks to calculate sample membership in mixture models, such as adaptive mixture of experts (Jacobs et al. (1991)). From this perspective, DAGMM can be viewed as a powerful deep unsupervised version of adaptive mixture of experts in combination with a deep autoencoder.
121
+
122
+ # 3.6 TRAINING STRATEGY
123
+
124
+ Unlike existing deep autoencoder based methods (Yang et al. (2017a); Xie et al. (2016)) that rely on pre-training, DAGMM employs end-to-end training. First, in our study, we find that pre-trained compression networks suffer from limited anomaly detection performance, as it is difficult to make significant changes in the well-trained deep autoencoder to favor the subsequent density estimation tasks. Second, we also find that the compression network and estimation network could mutually boost each others’ performance. On one hand, with the regularization introduced by the estimation network, the deep autoencoder in the compression network learned by end-to-end training can reduce reconstruction error as low as the error from its pre-trained counterpart, which meanwhile cannot be achieved by simply performing end-to-end training with the deep autoencoder alone. On the other hand, with the well-learned low-dimensional representations from the compression network, the estimation network is able to make meaningful density estimations.
125
+
126
+ In Section 4.5, we employ an example from a public benchmark dataset to discuss the choice between pre-training and end-to-end training in DAGMM.
127
+
128
+ # 4 EXPERIMENTAL RESULTS
129
+
130
+ In this section, we use public benchmark datasets to demonstrate the effectiveness of DAGMM in unsupervised anomaly detection.
131
+
132
+ # 4.1 DATASET
133
+
134
+ Table 1: Statistics of the public benchmark datasets
135
+
136
+ <table><tr><td></td><td># Dimensions</td><td># Instances</td><td>Anomaly ratio (p)</td></tr><tr><td>KDDCUP</td><td>120</td><td>494,021</td><td>0.2</td></tr><tr><td>Thyroid</td><td>6</td><td>3,772</td><td>0.025</td></tr><tr><td>Arrhythmia</td><td>274</td><td>452</td><td>0.15</td></tr><tr><td>KDDCUP-Rev</td><td>120</td><td>121,597</td><td>0.2</td></tr></table>
137
+
138
+ We employ four benchmark datasets: KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev.
139
+
140
+ • KDDCUP. The KDDCUP99 10 percent dataset from the UCI repository (Lichman (2013)) originally contains samples of 41 dimensions, where 34 of them are continuous and 7 are categorical. For categorical features, we further use one-hot representation to encode them, and eventually we obtain a dataset of 120 dimensions. As $2 0 \%$ of data samples are labeled as “normal” and the rest are labeled as “attack”, “normal” samples are in a minority group; therefore, “normal” ones are treated as anomalies in this task.
141
+
142
+ • Thyroid. The Thyroid (Lichman (2013)) dataset is obtained from the ODDS repository 1. There are 3 classes in the original dataset. In this task, the hyperfunction class is treated as anomaly class and the other two classes are treated as normal class, because hyperfunction is a clear minority class.
143
+
144
+ • Arrhythmia. The Arrhythmia (Lichman (2013)) dataset is also obtained from the ODDS repository. The smallest classes, including 3, 4, 5, 7, 8, 9, 14, and 15, are combined to form the anomaly class, and the rest of the classes are combined to form the normal class.
145
+
146
+ • KDDCUP-Rev. This dataset is derived from KDDCUP. We keep all the data samples labeled as “normal” and randomly draw samples labeled as “attack” so that the ratio between “normal” and “attack” is $4 : 1$ . In this way, we obtain a dataset with anomaly ratio 0.2, where “attack” samples are in a minority group and treated as anomalies. Note that “attack” samples are not fixed, and we randomly draw “attack” samples in every single run.
147
+
148
+ Detailed information about the datasets is shown in Table 1.
149
+
150
+ # 4.2 BASELINE METHODS
151
+
152
+ We consider both traditional and state-of-the-art deep learning methods as baselines.
153
+
154
+ • OC-SVM. One-class support vector machine (Chen et al. (2001)) is a popular kernel-based method used in anomaly detection. In the experiment, we employ the widely adopted radial basis function (RBF) kernel in all the tasks. DSEBM-e. Deep structured energy based model (DSEBM) (Zhai et al. (2016)) is a state-ofthe-art deep learning method for unsupervised anomaly detection. In DSEBM-e, sample energy is leveraged as the criterion to detect anomalies.
155
+ • DSEBM-r. DSEBM-e and DSEBM-r (Zhai et al. (2016)) share the same core technique, but reconstruction error is used as the criterion in DSEBM-r for anomaly detection.
156
+
157
+ • DCN. Deep clustering network (DCN) (Yang et al. (2017a)) is a state-of-the-art clustering algorithm that regulates autoencoder performance by $\mathbf { k }$ -means. We adapt this technique to anomaly detection tasks. In particular, the distance between a sample and its cluster center is taken as the criterion for anomaly detection: samples that are farther from their cluster centers are more likely to be anomalies.
158
+
159
+ Moreover, we include the following DAGMM variants as baselines to demonstrate the importance of individual components in DAGMM.
160
+
161
+ • GMM-EN. In this variant, we remove the reconstruction error component from the objective function of DAGMM. In other words, the estimation network in DAGMM performs membership estimation without the constraints from the compression network. With the learned membership estimation, we infer sample energy by Equation (5) and (6) under the GMM framework. Sample energy is used as the criterion for anomaly detection.
162
+ PAE. We obtain this variant by removing the energy function from the objective function of DAGMM, and this DAGMM variant is equivalent to a deep autoenoder. To ensure the compression network is well trained, we adopt the pre-training strategy (Vincent et al. (2010)). Sample reconstruction error is the criterion for anomaly detection.
163
+ E2E-AE. This variant shares the same setting with PAE, but the deep autoencoder is learned by end-to-end training. Sample reconstruction error is the criterion for anomaly detection PAE-GMM-EM. This variant adopts a two-step approach. At step one, we learn the compression network by pre-training deep autoencoder. At step two, we use the output from the compression network to train the GMM by a traditional EM algorithm. The training procedures in the two steps are separated. Sample energy is used as the criterion for anomaly detection.
164
+ PAE-GMM. This variant also adopts a two-step approach. At step one, we learn the compression network by pre-training deep autoencoder. At step two, we use the output from the compression network to train the estimation network. The training procedures in the two steps are separated. Sample energy is used as the criterion for anomaly detection.
165
+ DAGMM-p. This variant is a compromise between DAGMM and PAE-GMM: we first train the compression network by pre-training, and then fine-tune DAGMM by end-to-end training. Sample energy is the criterion for anomaly detection.
166
+ DAGMM-NVI. The only difference between this variant and DAGMM is that this variant adopts the framework of neural variational inference (Mnih & Gregor (2014)) and replaces Equation (6) with the upper bound in Equation (10) as a part of the objective function.
167
+
168
+ # 4.3 DAGMM CONFIGURATION
169
+
170
+ In all the experiment, we consider two reconstruction features from the compression network: relative Euclidean distance and cosine similarity. Given a sample $\mathbf { x }$ and its reconstructed counterpart $\mathbf { x } ^ { \prime }$ , their relative Euclidean distance is defined as $\frac { \left\| \mathbf { x } - \mathbf { x } ^ { \prime } \right\| _ { 2 } } { \| \mathbf { x } \| _ { 2 } }$ , and the cosine similarity is derived by $\frac { \mathbf { x } \cdot \mathbf { x } ^ { \prime } } { \| \mathbf { x } \| _ { 2 } \| \mathbf { x } ^ { \prime } \| _ { 2 } }$ . In Appendix D, for readers of interest, we discuss why reconstruction features are important to DAGMM and how to select reconstruction features in practice.
171
+
172
+ The network structures of DAGMM used on individual datasets are summarized as follows.
173
+
174
+ • KDDCUP. For this dataset, its compression network provides 3 dimensional input to the estimation network, where one is the reduced dimension and the other two are from the reconstruction error. The estimation network considers a GMM with 4 mixture components for the best performance. In particular, the compression network runs with FC(120, 60, tanh)-FC(60, 30, tanh)-FC(30, 10, tanh)-FC(10, 1, none)-FC(1, 10, tanh)-FC(10, 30, tanh)-FC(30, 60, tanh)-FC(60, 120, none), and the estimation network performs with FC(3, 10, tanh)-Drop(0.5)-FC(10, 4, softmax). Thyroid. The compression network for this dataset also provides 3 dimensional input to the estimation network, and the estimation network employs 2 mixture components for the best performance. In particular, the compression network runs with FC(6, 12, tanh)-FC(12, 4, tanh)-FC(4, 1, none)-FC(1, 4, tanh)-FC(4, 12, tanh)-FC(12, 6, none), and the estimation network performs with FC(3, 10, tanh)-Drop(0.5)-FC(10, 2, softmax).
175
+
176
+ • Arrhythmia. The compression network for this dataset provides 4 dimensional input, where two of them are the reduced dimensions, and the estimation network adopts a setting of 2 mixture components for the best performance. In particular, the compression network runs with FC(274, 10, tanh)-FC(10, 2, none)-FC(2, 10, tanh)-FC(10, 274, none), and the estimation network performs with FC(4, 10, tanh)-Drop(0.5)-FC(10, 2, softmax).
177
+
178
+ • KDDCUP-Rev. For this dataset, its compression network provides 3 dimensional input to the estimation network, where one is the reduced dimension and the other two are from the reconstruction error. The estimation network considers a GMM with 2 mixture components for the best performance. In particular, the compression network runs with FC(120, 60, tanh)-FC(60, 30, tanh)-FC(30, 10, tanh)-FC(10, 1, none)-FC(1, 10, tanh)-FC(10, 30, tanh)-FC(30, 60, tanh)-FC(60, 120, none), and the estimation network performs with FC(3, 10, tanh)-Drop(0.5)-FC(10, 2, softmax).
179
+
180
+ where $\mathrm { F C } ( a , b , f )$ means a fully-connected layer with $a$ input neurons and $b$ output neurons activated by function $f$ (none means no activation function is used), and Drop $( p )$ denotes a dropout layer with keep probability $p$ during training.
181
+
182
+ All the DAGMM instances are implemented by tensorflow (Abadi et al. (2016)) and trained by Adam (Kingma & Ba (2015)) algorithm with learning rate 0.0001. For KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, the number of training epochs are 200, 20000, 10000, and 400, respectively. For the sizes of mini-batches, they are set as 1024, 1024, 128, and 1024, respectively. Moreover, in all the DAGMM instances, we set $\lambda _ { 1 }$ as 0.1 and $\lambda _ { 2 }$ as 0.005. For readers of interest, we discuss how $\lambda _ { 1 }$ and $\lambda _ { 2 }$ impact DAGMM in Appendix F.
183
+
184
+ For the baseline methods, we conduct exhaustive search to find the optimal meta parameters for them in order to achieve the best performance. We detail their exact configuration in Appendix A.
185
+
186
+ # 4.4 ACCURACY
187
+
188
+ Metric. We consider average precision, recall, and $F _ { 1 }$ score as intuitive ways to compare anomaly detection performance. In particular, based on the anomaly ratio suggested in Table 1, we select the threshold to identify anomalous samples. For example, when DAGMM performs on KDDCUP, the top $2 0 \%$ samples of the highest energy will be marked as anomalies. We take anomaly class as positive, and define precision, recall, and $F _ { 1 }$ score accordingly.
189
+
190
+ In the first set of experiment, we follow the setting in (Zhai et al. (2016)) with completely clean training data: in each run, we take $5 0 \%$ of data by random sampling for training with the rest $5 0 \%$ reserved for testing, and only data samples from the normal class are used for training models.
191
+
192
+ Table 2 reports the average precision, recall, and $F _ { 1 }$ score after 20 runs for DAGMM and its baselines. In general, DAGMM demonstrates superior performance over the baseline methods in terms of $F _ { 1 }$ score on all the datasets. Especially on KDDCUP and KDDCUP-Rev, DAGMM achieves $1 4 \%$ and $1 0 \%$ improvement at $F _ { 1 }$ score, compared with the existing methods. For OC-SVM, the curse of dimensionality could be the main reason that limits its performance. For DSEBM, while it works reasonably well on multiple datasets, DAGMM outperforms as both latent representation and reconstruction error are jointly considered in energy modeling. For DCN, PAE-GMM, and DAGMM-p, their performance could be limited by the pre-trained deep autoencoders. When a deep autoencoder is well-trained, it is hard to make any significant change on the reduced dimensions and favor the subsequent density estimation tasks. For GMM-EN, without the reconstruction constraints, it seems difficult to perform reasonable density estimation. In terms of PAE, the single view of reconstruction error may not be sufficient for anomaly detection tasks. For E2E-AE, we observe that it is unable to reduce reconstruction error as low as PAE and DAGMM do on KDDCUP, KDDCUP-Rev, and Thyroid. As the key information of data could be lost during dimensionality reduction, E2E-AE suffers poor performance on KDDCUP and Thyroid. In addition, the performance of DAGMM and DAGMM-NVI is quite similar. As GMM is a fairly simple graphical model, we cannot spot significant improvement brought by neural variational inference in DAGMM. In Appendix B, for readers of interest, we show the cumulative distribution functions of the energy function learned by DAGMM for all the datasets under the setting of clean training data.
193
+
194
+ <table><tr><td rowspan="2">Method</td><td colspan="3">KDDCUP</td><td colspan="3">Thyroid</td></tr><tr><td>Precision</td><td>Recall</td><td>F1</td><td>Precision</td><td>Recall</td><td>F1</td></tr><tr><td>OC-SVM</td><td>0.7457</td><td>0.8523</td><td>0.7954</td><td>0.3639</td><td>0.4239</td><td>0.3887</td></tr><tr><td>DSEBM-r</td><td>0.1972</td><td>0.2001</td><td>0.1987</td><td>0.0404</td><td>0.0403</td><td>0.0403</td></tr><tr><td>DSEBM-e</td><td>0.7369</td><td>0.7477</td><td>0.7423</td><td>0.1319</td><td>0.1319</td><td>0.1319</td></tr><tr><td>DCN</td><td>0.7696</td><td>0.7829</td><td>0.7762</td><td>0.3319</td><td>0.3196</td><td>0.3251</td></tr><tr><td>GMM-EN</td><td>0.1932</td><td>0.1967</td><td>0.1949</td><td>0.0213</td><td>0.0227</td><td>0.0220</td></tr><tr><td>PAE</td><td>0.7276</td><td>0.7397</td><td>0.7336</td><td>0.1894</td><td>0.2062</td><td>0.1971</td></tr><tr><td>E2E-AE</td><td>0.0024</td><td>0.0025</td><td>0.0024</td><td>0.1064</td><td>0.1316</td><td>0.1176</td></tr><tr><td>PAE-GMM-EM</td><td>0.7183</td><td>0.7311</td><td>0.7246</td><td>0.4745</td><td>0.4538</td><td>0.4635</td></tr><tr><td>PAE-GMM</td><td>0.7251</td><td>0.7384</td><td>0.7317</td><td>0.4532</td><td>0.4881</td><td>0.4688</td></tr><tr><td>DAGMM-p</td><td>0.7579</td><td>0.7710</td><td>0.7644</td><td>0.4723</td><td>0.4725</td><td>0.4713</td></tr><tr><td>DAGMM-NVI</td><td>0.9290</td><td>0.9447</td><td>0.9368</td><td>0.4383</td><td>0.4587</td><td>0.4470</td></tr><tr><td>DAGMM</td><td>0.9297</td><td>0.9442</td><td>0.9369</td><td>0.4766</td><td>0.4834</td><td>0.4782</td></tr><tr><td rowspan="2">Method</td><td colspan="3">Arrhythmia</td><td colspan="3">KDDCUP-Rev</td></tr><tr><td>Precision</td><td>Recall</td><td>F1</td><td>Precision</td><td>Recall</td><td>F1</td></tr><tr><td>OC-SVM</td><td>0.5397</td><td>0.4082</td><td>0.4581</td><td>0.7148</td><td>0.9940</td><td>0.8316</td></tr><tr><td>DSEBM-r</td><td>0.1515</td><td>0.1513</td><td>0.1510</td><td>0.2036</td><td>0.2036</td><td>0.2036</td></tr><tr><td>DSEBM-e</td><td>0.4667</td><td>0.4565</td><td>0.4601</td><td>0.2212</td><td>0.2213</td><td>0.2213</td></tr><tr><td>DCN</td><td>0.3758</td><td>0.3907</td><td>0.3815</td><td>0.2875</td><td>0.2895</td><td>0.2885</td></tr><tr><td>GMM-EN</td><td>0.3000</td><td>0.2792</td><td>0.2886</td><td>0.1846</td><td>0.1746</td><td>0.1795</td></tr><tr><td>PAE</td><td>0.4393</td><td>0.4437</td><td>0.4403</td><td>0.7835</td><td>0.7817</td><td>0.7826</td></tr><tr><td>E2E-AE</td><td>0.4667</td><td>0.4538</td><td>0.4591</td><td>0.7434</td><td>0.7463</td><td>0.7448</td></tr><tr><td>PAE-GMM-EM</td><td>0.3970</td><td>0.4168</td><td>0.4056</td><td>0.2822</td><td>0.2847</td><td>0.2835</td></tr><tr><td>PAE-GMM</td><td>0.4575</td><td>0.4823</td><td>0.4684</td><td>0.6307</td><td>0.6278</td><td>0.6292</td></tr><tr><td>DAGMM-p</td><td>0.4909</td><td>0.4679</td><td>0.4787</td><td>0.2750</td><td>0.2810</td><td>0.2780</td></tr><tr><td>DAGMM-NVI</td><td>0.5091</td><td>0.4892</td><td>0.4981</td><td>0.9211</td><td>0.9211</td><td>0.9211</td></tr><tr><td>DAGMM</td><td>0.4909</td><td>0.5078</td><td>0.4983</td><td>0.9370</td><td>0.9390</td><td>0.9380</td></tr></table>
195
+
196
+ Table 2: Average precision, recall, and $F _ { 1 }$ from DAGMM and the baseline methods. For each metric, the best result is shown in bold.
197
+
198
+ In the second set of experiment, we investigate how DAGMM responds to contaminated training data. In each run, we reserve $5 0 \%$ of data by random sampling for testing. For the rest $5 0 \%$ , we take all samples from the normal class mixed with $c \%$ of samples from the anomaly class for model training.
199
+ Table 3: Anomaly detection results on contaminated training data from KDDCUP
200
+
201
+ <table><tr><td rowspan="2">Ratio c</td><td colspan="3">DAGMM</td><td colspan="3">DCN</td></tr><tr><td>Precision</td><td>Recall</td><td>F1</td><td>Precision</td><td>Recall</td><td>F1</td></tr><tr><td>1%</td><td>0.9201</td><td>0.9337</td><td>0.9268</td><td>0.7585</td><td>0.7611</td><td>0.7598</td></tr><tr><td>2%</td><td>0.9186</td><td>0.9340</td><td>0.9262</td><td>0.7380</td><td>0.7424</td><td>0.7402</td></tr><tr><td>3%</td><td>0.9132</td><td>0.9272</td><td>0.9201</td><td>0.7163</td><td>0.7293</td><td>0.7228</td></tr><tr><td>4%</td><td>0.8837</td><td>0.8989</td><td>0.8912</td><td>0.6971</td><td>0.7106</td><td>0.7037</td></tr><tr><td>5%</td><td>0.8504</td><td>0.8643</td><td>0.8573</td><td>0.6763</td><td>0.6893</td><td>0.6827</td></tr><tr><td rowspan="2">Ratio c</td><td colspan="3">DSEBM-e</td><td colspan="3">OC-SVM</td></tr><tr><td>Precision</td><td>Recall</td><td>F1</td><td>Precision</td><td>Recall</td><td>F1</td></tr><tr><td>1%</td><td>0.6995</td><td>0.7135</td><td>0.7065</td><td>0.7129</td><td>0.6785</td><td>0.6953</td></tr><tr><td>2%</td><td>0.6780</td><td>0.6876</td><td>0.6827</td><td>0.6668</td><td>0.5207</td><td>0.5847</td></tr><tr><td>3%</td><td>0.6213</td><td>0.6367</td><td>0.6289</td><td>0.6393</td><td>0.4470</td><td>0.5261</td></tr><tr><td>4%</td><td>0.5704</td><td>0.5813</td><td>0.5758</td><td>0.5991</td><td>0.3719</td><td>0.4589</td></tr><tr><td>5%</td><td>0.5345</td><td>0.5375</td><td>0.5360</td><td>0.1155</td><td>0.3369</td><td>0.1720</td></tr></table>
202
+
203
+ Table 3 reports the average precision, recall, and $F _ { 1 }$ score after 20 runs of DAGMM, DCN, DSEBMe, and OC-SVM on the KDDCUP dataset, respectively. As expected, contaminated training data negatively affect detection accuracy. When contamination ratio $c$ increases from $1 \%$ to $5 \%$ , average precision, recall, and $F _ { 1 }$ score decrease for all the methods. Meanwhile, we notice that DAGMM is able to maintain good detection accuracy with $5 \%$ contaminated data. For OC-SVM, we adopt the same parameter setting used in the experiment with clean training data, and observe that OC-SVM is more sensitive to contamination ratio. In order to receive better detection accuracy, it is important to train a model with high-quality data (i.e., clean or keeping contamination ratio as low as possible).
204
+
205
+ In sum, the DAGMM learned by end-to-end training achieves the state-of-the-art accuracy on the public benchmark datasets, and provides a promising alternative for unsupervised anomaly detection.
206
+
207
+ # 4.5 VISUALIZATION ON THE LEARNED LOW-DIMENSIONAL REPRESENTATION
208
+
209
+ In this section, we use an example to demonstrate the advantage of DAGMM learned by end-to-end training, compared with the baselines that rely on pre-trained deep autoencoders.
210
+
211
+ ![](images/22f8cf84bfc6bd6a16223afffff49372745940ca6eafb1555e754848beb779a1.jpg)
212
+ Figure 3: KDDCUP samples in the learned 3-dimensional space by DAGMM, PAE, DAGMM-p, and DCN, where red points are samples from anomaly class and blue ones are samples from normal class
213
+
214
+ Figure 3 shows the low-dimensional representation learned by DAGMM, PAE, DAGMM-p, and DCN, from one of the experiment runs on the KDDCUP dataset. First, we can see from Figure 3a that DAGMM can better separate anomalous samples from normal samples in the learned low-dimensional space, while anomalies overlap more with normal samples in the low-dimensional space learned by PAE, DAGMM-p, or DCN. Second, Even if DAGMM-p and DCN take effort to fine-tune the pre-trained deep autoencoder by its estimation network or $\mathbf { k }$ -means regularization, one could barely see significant change among Figure 3b, Figure 3c, and Figure 3d, where many anomalous samples are still mixed with normal samples. Indeed, when a deep autoencoder is pre-trained, it tends to be stuck in a good local optima for the purpose of reconstruction only, but it could be suboptimal for the subsequent density estimation tasks. In addition, in our study, we find that the reconstruction error in a trained DAGMM is as low as the error received from a pre-trained deep autoencoder (e.g., around 0.26 in terms of per-sample reconstruction error for KDDCUP). Meanwhile, we also observe that it is difficult to reduce the reconstruction error for a deep autoencoder of the identical structure by endto-end training (e.g., around 1.13 in terms of per-sample reconstruction error for KDDCUP). In other words, the compression network and estimation network mutually boost each others’ performance during end-to-end training: the regularization introduced by the estimation network helps the deep autoencoder escape from less attractive local optima for better compression, while the compression network feeds more meaningful low-dimensional representations to estimation network for robust density estimation. In Appendix C, for readers of interest, we show the visualization of the latent representation learned by DSEBM.
215
+
216
+ In summary, our experimental results show that DAGMM suggests a promising direction for density estimation and anomaly detection, where one can combine the forces of dimensionality reduction and density estimation by end-to-end training.
217
+
218
+ In Appendix E, we provide another case study to discuss which kind of samples benefit more from joint training in DAGMM for readers of interest.
219
+
220
+ # 5 CONCLUSION
221
+
222
+ In this paper, we propose the Deep Autoencoding Gaussian Mixture Model (DAGMM) for unsupervised anomaly detection. DAGMM consists of two major components: compression network and estimation network, where the compression network projects samples into a low-dimensional space that preserves the key information for anomaly detection, and the estimation network evaluates sample energy in the low-dimensional space under the framework of Gaussian Mixture Modeling. DAGMM is friendly to end-to-end training: (1) the estimation network predicts sample mixture membership so that the parameters in GMM can be estimated without alternating procedures; and (2) the regularization introduced by the estimation network helps the compression network escape from less attractive local optima and achieve low reconstruction error by end-to-end training. Compared with the pre-training strategy, the end-to-end training could be more beneficial for density estimation tasks, as we can have more freedom to adjust dimensionality reduction processes to favor the subsequent density estimation tasks. In the experimental study, DAGMM demonstrates superior performance over state-of-the-art techniques on public benchmark datasets with up to $1 4 \%$ improvement on the standard $F _ { 1 }$ score, and suggests a promising direction for unsupervised anomaly detection on multior high-dimensional data.
223
+
224
+ REFERENCES
225
+ Mart´ın Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, et al. Tensorflow: A system for large-scale machine learning. In OSDI, volume 16, pp. 265–283, 2016.
226
+ V. Barnett and T. Lewis. Outliers in statistical data. Wiley, 1984.
227
+ Emmanuel J. Candes, Xiaodong Li, Yi Ma, and John Wright. Robust principal component analysis? \` J. ACM, 58(3):11:1–11:37, 2011. ISSN 0004-5411.
228
+ Varun Chandola, Arindam Banerjee, and Vipin Kumar. Anomaly detection: A survey. ACM Comput. Surv, 41:15:1–15:58, 2009.
229
+ Yunqiang Chen, Xiang Sean Zhou, and Thomas S Huang. One-class svm for learning in image retrieval. In International Conference on Image Processing, volume 1, pp. 34–37, 2001.
230
+ Simon Gunter, Nicol N. Schraudolph, and S. V. N. Vishwanathan. Fast Iterative Kernel Principal ¨ Component Analysis. jmlr, 8:1893–1918.
231
+ Peter J Huber. Robust statistics. In International Encyclopedia of Statistical Science, pp. 1248–1251. Springer, 2011.
232
+ Robert A Jacobs, Michael I Jordan, Steven J Nowlan, and Geoffrey E Hinton. Adaptive mixtures of local experts. Neural computation, 3(1):79–87, 1991.
233
+ I. T. Jolliffe. Principal component analysis. In Principal Component Analysis. Springer Verlag, New York, 1986.
234
+ Michael I Jordan, Zoubin Ghahramani, Tommi S Jaakkola, and Lawrence K Saul. An introduction to variational methods for graphical models. Machine learning, 37(2):183–233, 1999.
235
+ Fabian Keller, Emmanuel Muller, and Klemens Bohm. Hics: High contrast subspaces for densitybased outlier ranking. In International Conference on Data Engineering, pp. 1037–1048. IEEE, 2012.
236
+ JooSeuk Kim and Clayton D. Scott. Robust kernel density estimation. CoRR, abs/1107.3133, 2011.
237
+ Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference for Learning Representations, 2015.
238
+ M. Lichman. UCI machine learning repository, 2013. URL http://archive.ics.uci.edu/ ml.
239
+ Fei Tony Liu, Kai Ming Ting, and Zhi-Hua Zhou. Isolation forest. In International Conference on Data Mining, pp. 413–422. IEEE, 2008.
240
+ Andriy Mnih and Karol Gregor. Neural variational inference and learning in belief networks. In ICML, pp. 1791–1799, 2014.
241
+ Matthias Paulik. Lattice-based training of bottleneck feature extraction neural networks. In Interspeech, pp. 89–93, 2013.
242
+ Q. Song, W. J. Hu, and W. F. Xie. Robust support vector machine with bullet hole image classification. IEEE Trans. Systems, Man and Cybernetics, 32:440–448, 2002.
243
+ Swee Chuan Tan, Kai Ming Ting, and Tony Fei Liu. Fast anomaly detection for streaming data. In IJCAI Proceedings-International Joint Conference on Artificial Intelligence, volume 22, pp. 1511, 2011.
244
+ Zoltan T ´ uske, Pavel Golik, Ralf Schl ¨ uter, and Hermann Ney. Speaker adaptive joint training of ¨ gaussian mixture models and bottleneck features. In IEEE Workshop on Automatic Speech Recognition and Understanding (ASRU), pp. 596–603, 2015a.
245
+ Zoltan T ´ uske, Muhammad Ali Tahir, Ralf Schl ¨ uter, and Hermann Ney. Integrating gaussian mixtures ¨ into deep neural networks: softmax layer with hidden variables. In ICASSP, pp. 4285–4289, 2015b.
246
+
247
+ Ehsan Variani, Erik McDermott, and Georg Heigold. A gaussian mixture model layer jointly optimized with discriminative features within a deep neural network architecture. In ICASSP, pp. 4270–4274, 2015.
248
+
249
+ Pascal Vincent, Hugo Larochelle, Isabelle Lajoie, Yoshua Bengio, and Pierre-Antoine Manzagol. Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion. Journal of Machine Learning Research, 11(Dec):3371–3408, 2010.
250
+
251
+ Graham Williams, Rohan Baxter, Hongxing He, and Simon Hawkins. A comparative study of RNN for outlier detection in data mining. In Proceedings of ICDM02, pp. 709–712, 2002.
252
+
253
+ Junyuan Xie, Ross Girshick, and Ali Farhadi. Unsupervised deep embedding for clustering analysis. In International Conference on Machine Learning, pp. 478–487, 2016.
254
+
255
+ Liang Xiong, Barnabas P ´ oczos, and Jeff G. Schneider. Group anomaly detection using flexible genre ´ models. In Advances in Neural Information Processing Systems, pp. 1071–1079, 2011.
256
+
257
+ Bo Yang, Xiao Fu, Nicholas D Sidiropoulos, and Mingyi Hong. Towards k-means-friendly spaces: Simultaneous deep learning and clustering. In International Conference on Machine Learning, 2017a.
258
+
259
+ Xi Yang, Kaizhu Huang, and Rui Zhang. Unsupervised dimensionality reduction for gaussian mixture model. In International conference on neural information processing, pp. 84–92. Springer, 2014.
260
+
261
+ Xi Yang, Kaizhu Huang, John Yannis Goulermas, and Rui Zhang. Joint learning of unsupervised dimensionality reduction and gaussian mixture model. Neural Processing Letters, 45(3):791–806, 2017b.
262
+
263
+ Shuangfei Zhai, Yu Cheng, Weining Lu, and Zhongfei Zhang. Deep structured energy based models for anomaly detection. In International Conference on Machine Learning, pp. 1100–1109, 2016.
264
+
265
+ C. Zhang and P. C. Woodland. Joint optimisation of tandem systems using gaussian mixture density neural network discriminative sequence training. In ICASSP, pp. 5015–5019, 2017.
266
+
267
+ Chong Zhou and Randy C. Paffenroth. Anomaly detection with robust deep autoencoders. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 665–674, 2017.
268
+
269
+ Arthur Zimek, Erich Schubert, and Hans-Peter Kriegel. A survey on unsupervised outlier detection in high-dimensional numerical data. Statistical Analysis and Data Mining, 5:363–387, 2012.
270
+
271
+ A BASELINE CONFIGURATION
272
+
273
+ OC-SVM. Unlike other baselines that only need decision thresholds in the testing phase, OC-SVM needs parameter $\nu$ be set in the training phase. Although $\nu$ intuitively means anomaly ratio in training data, it is non-trivial to set a reasonable $\nu$ in the case where training data are all normal samples and anomaly ratio in the testing phase could be arbitrary. In this study, we simply perform exhaustive search to find the optimal $\nu$ that renders the highest $F _ { 1 }$ score on individual datasets. In particular, $\nu$ is set to be 0.1, 0.02, 0.04, and 0.1 for KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, respectively.
274
+
275
+ DSEBM. We use the network structure for the encoding in DAGMM as guidelines to set up DSEBM instances. For KDDCUP and KDDCUP-Rev, it is configured as FC(120, 60, softplus)-FC(60, 30, softplus)-FC(30, 10, softplus)-FC(10, 1, softplus). For Thyroid, it is FC(6, 12, softplus)-FC(12, 4, softplus)-FC(4, 1, softplus). For Arrhythmia, it is FC(274, 10, softplus)-FC(10, 2, softplus). Moreover, for KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, the numbers of epochs are 200, 20000, 10000, and 400, respectively, and the sizes of mini-batches are 1024, 1024, 128, and 1024, respectively.
276
+
277
+ DCN. We use the network configuration for the autoencoder in DAGMM as guidelines to set up autoencoders in DCN. For KDDCUP and KDDCUP-Rev, the structure is FC(120, 60, tanh)-FC(60, 30, tanh)-FC(30, 10, tanh)-FC(10, 1, none)-FC(1, 10, tanh)-FC(10, 30, tanh)-FC(30, 60, tanh)- FC(60, 120, none). For Thyroid, it is FC(6, 12, tanh)-FC(12, 4, tanh)-FC(4, 1, none)-FC(1, 4, tanh)-FC(4, 12, tanh)-FC(12, 6, none). For Arrhythmia, it is FC(274, 10, tanh)-FC(10, 2, none)-FC(2, 10, tanh)-FC(10, 274, none). Moreover, for KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, the numbers of epochs for per-layer pre-training are 200, 20000, 10000, and 400, respectively, the numbers of epochs for fine tuning are 200, 20000, 10000, and 400, respectively, and the sizes of mini-batches in all the training phases are 1024, 1024, 128, and 1024, respectively.
278
+
279
+ GMM-EN. GMM-EN also borrows the wisdom from the network configurations in DAGMM. For KDDCUP, it is FC(120, 60, tanh)-FC(60, 30, tanh)-FC(30, 10, tanh)-FC(10, 1, none)-FC(1, 10, tanh)-Drop(0.5)-FC(10, 4, softmax). For Thyroid, it is FC(6, 12, tanh)-FC(12, 4, tanh)-FC(4, 1, none)-FC(1, 10, tanh)-Drop(0.5)-FC(10, 2, softmax). For Arrhythmia, it is FC(274, 10, tanh)- FC(10, 2, none)-FC(2, 10, tanh)-Drop(0.5)-FC(10, 2, softmax). For KDDCUP-Rev, it is FC(120, 60, tanh)-FC(60, 30, tanh)-FC(30, 10, tanh)-FC(10, 1, none)-FC(1, 10, tanh)-Drop(0.5)-FC(10, 2, softmax). For KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, the numbers of epochs for training are 200, 20000, 10000, and 400, respectively, and the sizes of mini-batches are 1024, 1024, 128, and 1024, respectively.
280
+
281
+ PAE. PAE shares identical network structures with the autoencoder in DAGMM. For KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, the numbers of epochs for per-layer pre-training are 200, 20000, 10000, and 400, respectively, the numbers of epochs for fine tuning are 200, 20000, 10000, and 400, respectively, and the sizes of mini-batches in all the training phases are 1024, 1024, 128, and 1024, respectively.
282
+
283
+ E2E-AE. E2E-AE shares identical network structures with the autoencoder in DAGMM. For KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, the numbers of epochs for end-to-end training are 200, 20000, 10000, and 400, respectively, and the sizes of mini-batches are 1024, 1024, 128, and 1024, respectively.
284
+
285
+ PAE-GMM-EM. PAE-GMM and DAGMM share identical network configurations. For KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, the numbers of epochs for per-layer pre-training are 200, 20000, 10000, and 400, respectively, the numbers of epochs for fine tuning are 200, 20000, 10000, and 400, respectively, and the sizes of mini-batches in all the training phases are 1024, 1024, 128, and 1024, respectively. For GMM learning, the EM algorithm stops when the maximum difference of the parameters between current iteration and its previous iteration is smaller than $1 0 ^ { - 6 }$ .
286
+
287
+ PAE-GMM. PAE-GMM and DAGMM share identical network configurations. For KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, the numbers of epochs for per-layer pre-training are 200, 20000, 10000, and 400, respectively, the numbers of epochs for fine tuning or GMM training are 200, 20000, 10000, and 400, respectively, and the sizes of mini-batches in all the training phases are 1024, 1024, 128, and 1024, respectively.
288
+
289
+ DAGMM-p. DAGMM- $\mathrm { \bf p }$ and DAGMM share identical network configurations, but they are only different in training strategies: DAGMM adopts the strategy of end-to-end training, while DAGMM-p relies on pre-training to compression network and then joint fine-tuning. For KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, the numbers of epochs for per-layer pre-training are 200, 20000, 10000, and 400, respectively, the numbers of epochs for fine tuning are 200, 20000, 10000, and 400, respectively, and the sizes of mini-batches in all the training phases are 1024, 1024, 128, and 1024, respectively.
290
+
291
+ DAGMM-NVI. DAGMM and DAGMM-NVI share identical network configurations and training strategies as discussed in Section 4.
292
+
293
+ # B CUMULATIVE DISTRIBUTION FUNCTION OF THE ENERGY FUNCTION LEARNED BY DAGMM
294
+
295
+ ![](images/f2ae569af0c77c073ceb2478d742fec9928a3302c6d134a81f5f79f2093db204.jpg)
296
+ Figure 4: The cumulative distribution functions of the energy function are learned by DAGMM on KDDCUP, Arrhythmia, Thyroid, and KDDCUP-Rev, respectively. The horizontal axis denotes the energy space, and the vertical axis denotes the percentage.
297
+
298
+ Figure 4 shows the cumulative distribution function (cdf) of the energy function learned by DAGMM on KDDCUP, Arrhythmia, Thyroid, and KDDCUP-Rev, respectively. In particular, on KDDCUP and KDDCUP-Rev, we observe rapid energy increase at around $8 0 \%$ , and most samples whose energy is beyond the 80th percentile are true anomalous samples.
299
+
300
+ ![](images/53e33eb6f1f337bda9595ea9a996a2ff0bf6ad37c8a124f619a170c5e6139145.jpg)
301
+ Figure 5: KDDCUP samples in the reduced 1-dimensional space by DSEBM, where red points are samples from the anomaly class and blue ones are samples from the normal class
302
+
303
+ Figure 5 demonstrates the reduced 1-dimensional representation for KDDCUP samples learned by DSEBM, where Figure 5a includes all the samples and Figure 5b includes the normal samples only. As shown above, normal and anomalous samples are mixed in the range of $[ - 8 , - 7 . 8 ]$ . For samples in this range, it is difficult to use the energy derived from the latent representation to separate them.
304
+
305
+ # D RECONSTRUCTION FEATURES IN DAGMM
306
+
307
+ In this section, we detail the discussion on reconstruction features.
308
+
309
+ Why reconstruction features are important? We realize the importance of reconstruction features from our investigation on a private network security dataset. In this dataset, normal samples are normal network flows, and anomalies are network flows with spoofing attack. As it is difficult to analyze the samples from their original space with 20 dimensions, we utilize deep autoencoders to perform dimension reduction. In this case, we are a little bit ambitious, and reduce dimensions from 20 to 1. In the reduced 1-dimensional space, for some of the anomalies, we are able to easily separate them from normal samples. However, for the rest, their latent representations are quite similar to the representations of the normal samples. Meanwhile, in the original space, they are actually quite different from the normal ones. Inspired by this observation, we investigate their $L _ { 2 }$ reconstruction error, and obtain the plot shown in Figure 1. In Figure 1, the red points in the top-right corner are the anomalies sharing similar representations with the normal samples in the reduced space. With the additional view from reconstruction error, it becomes easier to separate these anomalies from the normal samples. In our study, this concrete example motivates us to include reconstruction features into DAGMM.
310
+
311
+ What are the guidelines for reconstruction feature selection? In practice, one can select reconstruction features by the following rules. First, for an error metric used to derive a reconstruction feature, its analytical form should be continuous and differentiable. Second, the output of an error metric should be in a range of relatively small values for the ease of training the estimation network in DAGMM. In the experiment of this paper, we select cosine similarity and relative Euclidean distance based on these two rules. For cosine similarity, it is continuous and differentiable, and the range of its output is $[ - 1 , 1 ]$ . For relative Euclidean distance, it is also continuous and differentiable. Theoretically, the range of its output is $[ 0 , + \infty )$ . On the datasets considered in the experiment, we observe that its output is usually a small positive value; therefore, we include this metric as one of the reconstruction features.
312
+
313
+ In sum, as long as an error metric meets the above two rules, it could serve as a candidate metric to derive a reconstruction feature for DAGMM.
314
+
315
+ # E CASE STUDY: WHEN JOINT TRAINING OUTPERFORMS DECOUPLED TRAINING?
316
+
317
+ In this section, we perform a case study to investigate what kind of samples benefit more from the joint training applied in DAGMM over decoupled training. In the evaluation, we employ PAE-GMM as a representative for the methods that leverage decoupled training, and the following results are generated from one run on the KDDCUP dataset.
318
+
319
+ <table><tr><td></td><td>PAE-GMM detect</td><td>PAE-GMM miss</td></tr><tr><td>DAGMM detect</td><td>34,285</td><td>12.038</td></tr><tr><td>DAGMM miss</td><td>1,640</td><td>926</td></tr></table>
320
+
321
+ Table 4: The comparison of anomaly detection results between DAGMM and PAE-GMM
322
+
323
+ Table 4 presents the comparison between DAGMM and PAE-GMM in terms of their anomaly detection results. In the testing data of this run, there are 48, 889 anomalies in total, where 34, 285 of them are detected by both techniques, 926 anomalies can be detected by neither of them, 1, 640 can only be detected by PAE-GMM, and 12, 038 of them can only be detected by DAGMM. Next, we drill deeper and investigate the commonalities of these 12, 038 anomalies that can only be detected by DAGMM.
324
+
325
+ Figure 6 illustrates sample distribution in the low-dimensional spaces learned by DAGMM and PAE-GMM, where Figure 6a (6b) includes all the normal samples and anomalies, Figure 6c (6d) includes all the normal samples and the anomalies detected by both techniques, and Figure 6e (6f) includes all the normal samples and the anomalies detected by DAGMM only. From Figure 6c and 6d, we observe that the anomalies of low cosine similarity and high relative Euclidean distance could be the easy ones that are captured by both techniques. For the difficult ones shown in Figure 6e and 6f, we observe that they usually have medium level of relative Euclidean distance (in the range of [1.0, 1.2] for both cases) with larger than 0.6 cosine similarity. For such anomalous samples, the model learned by PAE-GMM has difficult time to separate them from the normal samples. In addition, we also observe that the model learned by DAGMM tends to assign lower cosine similarity to such anomalies than PAE-GMM does, which also makes it easier to differentiate the anomalies from the normal samples.
326
+
327
+ # F HOW THE HYPERPARAMETERS IN THE OBJECTIVE FUNCTION IMPACT DAGMM
328
+
329
+ As shown in Equation (7), the objective function of DAGMM includes three components: the loss function from deep autoencoder, the energy function from estimation network, and the penalty function for covariance matrices. The coefficient ratio among the three components can be characterized as $1 : \lambda _ { 1 } : \lambda _ { 2 }$ . In terms of $\lambda _ { 1 }$ , a large value could make the loss function of deep autoencoder play little role in optimization so that we are unable to obtain a good reduced representation for input samples, while a small value could lead to ineffective estimation network so that GMM is not well trained. For $\lambda _ { 2 }$ of a large value, DAGMM tends to find GMM with large covariance, which is less desirable as many samples will have high energy as rare events. For $\lambda _ { 2 }$ of a small value, the regularization may not be strong enough to counter the singularity effect.
330
+
331
+ In our exploration, we find the ratio $1 : 0 . 1 : 0 . 0 0 5$ consistently delivers expected results across all the datasets in the experiment. To investigate the sensitivity of this ratio, we vary its base and see how different bases affect anomaly detection accuracy. For example, when the base is set to 2, $\lambda _ { 1 }$ and $\lambda _ { 2 }$ are adjusted to 0.2 and 0.01, respectively.
332
+
333
+ Table 5 shows the average precision, recall, and $F _ { 1 }$ score after 20 runs of DAGMM on the KDDCUP dataset. As we vary the base from 1 to 9 with step 2, DAGMM performs in a consistent way, and $\lambda _ { 1 }$ $\lambda _ { 2 }$ are not sensitive to the changes on the base.
334
+
335
+ ![](images/e65557047a18c9460e3021ad775b4b67245c9a3f4276976ddf3c6a79da28c20d.jpg)
336
+ Figure 6: KDDCUP samples in the learned 3-dimensional space by DAGMM and PAE-GMM, where red points are samples from anomaly class and blue ones are samples from normal class
337
+
338
+ Table 5: Sensitivity of $\lambda _ { 1 }$ and $\lambda _ { 2 }$ with fixed ratio $1 : 0 . 1 : 0 . 0 0 5$ on KDDCUP
339
+
340
+ <table><tr><td>Base</td><td>Precision</td><td>Recall</td><td>F1</td></tr><tr><td>1</td><td>0.9298</td><td>0.9445</td><td>0.9371</td></tr><tr><td>3</td><td>0.9301</td><td>0.9442</td><td>0.9371</td></tr><tr><td>5</td><td>0.9296</td><td>0.9451</td><td>0.9373</td></tr><tr><td>7</td><td>0.9300</td><td>0.9453</td><td>0.9376</td></tr><tr><td>9</td><td>0.9300</td><td>0.9439</td><td>0.9369</td></tr></table>
parse/train/BJJLHbb0-/BJJLHbb0-_content_list.json ADDED
@@ -0,0 +1,1712 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "DEEP AUTOENCODING GAUSSIAN MIXTURE MODEL FOR UNSUPERVISED ANOMALY DETECTION ",
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": "Bo Zong†, Qi Song‡, Martin Renqiang $\\mathbf { M } \\mathbf { i n } ^ { \\dagger }$ , Wei Cheng† Cristian Lumezanu†, Daeki Cho†, Haifeng Chen† ",
17
+ "bbox": [
18
+ 183,
19
+ 169,
20
+ 580,
21
+ 199
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "†NEC Laboratories America \n‡Washington State University, Pullman \n{bzong, renqiang, weicheng, lume, dkcho, haifeng}@nec-labs.com \nqsong@eecs.wsu.edu ",
28
+ "bbox": [
29
+ 186,
30
+ 202,
31
+ 790,
32
+ 257
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "ABSTRACT ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 454,
42
+ 292,
43
+ 544,
44
+ 309
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Unsupervised anomaly detection on multi- or high-dimensional data is of great importance in both fundamental machine learning research and industrial applications, for which density estimation lies at the core. Although previous approaches based on dimensionality reduction followed by density estimation have made fruitful progress, they mainly suffer from decoupled model learning with inconsistent optimization goals and incapability of preserving essential information in the low-dimensional space. In this paper, we present a Deep Autoencoding Gaussian Mixture Model (DAGMM) for unsupervised anomaly detection. Our model utilizes a deep autoencoder to generate a low-dimensional representation and reconstruction error for each input data point, which is further fed into a Gaussian Mixture Model (GMM). Instead of using decoupled two-stage training and the standard Expectation-Maximization (EM) algorithm, DAGMM jointly optimizes the parameters of the deep autoencoder and the mixture model simultaneously in an end-to-end fashion, leveraging a separate estimation network to facilitate the parameter learning of the mixture model. The joint optimization, which well balances autoencoding reconstruction, density estimation of latent representation, and regularization, helps the autoencoder escape from less attractive local optima and further reduce reconstruction errors, avoiding the need of pre-training. Experimental results on several public benchmark datasets show that, DAGMM significantly outperforms state-of-the-art anomaly detection techniques, and achieves up to $1 4 \\%$ improvement based on the standard $F _ { 1 }$ score. ",
51
+ "bbox": [
52
+ 233,
53
+ 327,
54
+ 766,
55
+ 617
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 647,
66
+ 336,
67
+ 662
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Unsupervised anomaly detection is a fundamental problem in machine learning, with critical applications in many areas, such as cybersecurity (Tan et al. (2011)), complex system management (Liu et al. (2008)), medical care (Keller et al. (2012)), and so on. At the core of anomaly detection is density estimation: given a lot of input samples, anomalies are those ones residing in low probability density areas. ",
74
+ "bbox": [
75
+ 174,
76
+ 680,
77
+ 825,
78
+ 750
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Although fruitful progress has been made in the last several years, conducting robust anomaly detection on multi- or high-dimensional data without human supervision remains a challenging task. Especially, when the dimensionality of input data becomes higher, it is more difficult to perform density estimation in the original feature space, as any input sample could be a rare event with low probability to observe (Chandola et al. (2009)). To address this issue caused by the curse of dimensionality, two-step approaches are widely adopted (Candes et al. (2011)), in which \\` dimensionality reduction is first conducted, and then density estimation is performed in the latent low-dimensional space. However, these approaches could easily lead to suboptimal performance, because dimensionality reduction in the first step is unaware of the subsequent density estimation task, and the key information for anomaly detection could be removed in the first place. Therefore, it is desirable to combine the force of dimensionality reduction and density estimation, although a joint optimization accounting for these two components is usually computationally difficult. Several recent works (Zhai et al. (2016); Yang et al. (2017a); Xie et al. (2016)) explored this direction by utilizing the strong modeling capacity of deep networks, but the resulting performance is limited either by a reduced low-dimensional space that is unable to preserve essential information of input samples, an over-simplified density estimation model without enough capacity, or a training strategy that does not fit density estimation tasks. ",
85
+ "bbox": [
86
+ 174,
87
+ 757,
88
+ 825,
89
+ 922
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "",
96
+ "bbox": [
97
+ 174,
98
+ 103,
99
+ 825,
100
+ 172
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "image",
106
+ "img_path": "images/24602db1ad87746646f5e11c6479d1558e34fbaafcfbb9ca2ff92fa2b1e5f647.jpg",
107
+ "image_caption": [
108
+ "Figure 1: Low-dimensional representations for samples from a private cybersecurity dataset: (1) each sample denotes a network flow that originally has 20 dimensions, (2) red/blue points are abnormal/normal samples, (3) the horizontal axis denotes the reduced 1-dimensional space learned by a deep autoencoder, and (4) the vertical axis denotes the reconstruction error induced by the 1-dimensional representation. "
109
+ ],
110
+ "image_footnote": [],
111
+ "bbox": [
112
+ 331,
113
+ 196,
114
+ 645,
115
+ 388
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "In this paper, we propose Deep Autoencoding Gaussian Mixture Model (DAGMM), a deep learning framework that addresses the aforementioned challenges in unsupervised anomaly detection from several aspects. ",
122
+ "bbox": [
123
+ 174,
124
+ 484,
125
+ 825,
126
+ 527
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "First, DAGMM preserves the key information of an input sample in a low-dimensional space that includes features from both the reduced dimensions discovered by dimensionality reduction and the induced reconstruction error. From the example shown in Figure 1, we can see that anomalies differ from normal samples in two aspects: (1) anomalies can be significantly deviated in the reduced dimensions where their features are correlated in a different way; and (2) anomalies are harder to reconstruct, compared with normal samples. Unlike existing methods that only involve one of the aspects (Zimek et al. (2012); Zhai et al. (2016)) with sub-optimal performance, DAGMM utilizes a sub-network called compression network to perform dimensionality reduction by an autoencoder, which prepares a low-dimensional representation for an input sample by concatenating reduced low-dimensional features from encoding and the reconstruction error from decoding. ",
133
+ "bbox": [
134
+ 174,
135
+ 535,
136
+ 825,
137
+ 674
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "Second, DAGMM leverages a Gaussian Mixture Model (GMM) over the learned low-dimensional space to deal with density estimation tasks for input data with complex structures, which are yet rather difficult for simple models used in existing works (Zhai et al. (2016)). While GMM has strong capability, it also introduces new challenges in model learning. As GMM is usually learned by alternating algorithms such as Expectation-Maximization (EM) (Huber (2011)), it is hard to perform joint optimization of dimensionality reduction and density estimation favoring GMM learning, which is often degenerated into a conventional two-step approach. To address this training challenge, DAGMM utilizes a sub-network called estimation network that takes the low-dimensional input from the compression network and outputs mixture membership prediction for each sample. With the predicted sample membership, we can directly estimate the parameters of GMM, facilitating the evaluation of the energy/likelihood of input samples. By simultaneously minimizing reconstruction error from compression network and sample energy from estimation network, we can jointly train a dimensionality reduction component that directly helps the targeted density estimation task. ",
144
+ "bbox": [
145
+ 174,
146
+ 680,
147
+ 825,
148
+ 861
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "Finally, DAGMM is friendly to end-to-end training. Usually, it is hard to learn deep autoencoders by end-to-end training, as they can be easily stuck in less attractive local optima, so pre-training is widely adopted (Vincent et al. (2010); Yang et al. (2017a); Xie et al. (2016)). However, pre-training limits the potential to adjust the dimensionality reduction behavior because it is hard to make any significant change to a well-trained autoencoder via fine-tuning. Our empirical study demonstrates that, DAGMM is well-learned by the end-to-end training, as the regularization introduced by the estimation network greatly helps the autoencoder in the compression network escape from less attractive local optima. ",
155
+ "bbox": [
156
+ 174,
157
+ 867,
158
+ 823,
159
+ 924
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "",
166
+ "bbox": [
167
+ 174,
168
+ 103,
169
+ 823,
170
+ 159
171
+ ],
172
+ "page_idx": 2
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "Experiments on several public benchmark datasets demonstrate that, DAGMM has superior performance over state-of-the-art techniques, with up to $1 4 \\%$ improvement of F1 score for anomaly detection. Moreover, we observe that the reconstruction error from the autoencoder in DAGMM by the end-to-end training is as low as the one made by its pre-trained counterpart, while the reconstruction error from an autoencoder without the regularization from the estimation network stays high. In addition, the end-to-end trained DAGMM significantly outperforms all the baseline methods that rely on pre-trained autoencoders. ",
177
+ "bbox": [
178
+ 174,
179
+ 166,
180
+ 825,
181
+ 263
182
+ ],
183
+ "page_idx": 2
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "2 RELATED WORK ",
188
+ "text_level": 1,
189
+ "bbox": [
190
+ 176,
191
+ 286,
192
+ 344,
193
+ 303
194
+ ],
195
+ "page_idx": 2
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "Tremendous effort has been devoted to unsupervised anomaly detection (Chandola et al. (2009)), and the existing methods can be grouped into three categories. ",
200
+ "bbox": [
201
+ 176,
202
+ 319,
203
+ 823,
204
+ 347
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "Reconstruction based methods assume that anomalies are incompressible and thus cannot be effectively reconstructed from low-dimensional projections. Conventional methods in this category include Principal Component Analysis (PCA) (Jolliffe (1986)) with explicit linear projections, kernel PCA with implicit non-linear projections induced by specific kernels (Gunter et al.), and Robust PCA ¨ (RPCA) (Huber (2011); Candes et al. (2011)) that makes PCA less sensitive to noise by enforcing \\` sparse structures. In addition, multiple recent works propose to analyze the reconstruction error induced by deep autoencoders, and demonstrate promising results (Zhou & Paffenroth (2017); Zhai et al. (2016)). However, the performance of reconstruction based methods is limited by the fact that they only conduct anomaly analysis from a single aspect, that is, reconstruction error. Although the compression on anomalous samples could be different from the compression on normal samples and some of them do demonstrate unusually high reconstruction errors, a significant amount of anomalous samples could also lurk with a normal level of error, which usually happens when the underlying dimensionality reduction methods have high model complexity or the samples of interest are noisy with complex structures. Even in these cases, we still have the hope to detect such “lurking” anomalies, as they still reside in low-density areas in the reduced low-dimensional space. Unlike the existing reconstruction based methods, DAGMM considers the both aspects, and performs density estimation in a low-dimensional space derived from the reduced representation and the reconstruction error caused by the dimensionality reduction, for a comprehensive view. ",
211
+ "bbox": [
212
+ 174,
213
+ 356,
214
+ 825,
215
+ 603
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "Clustering analysis is another popular category of methods used for density estimation and anomaly detection, such as multivariate Gaussian Models, Gaussian Mixture Models, $k$ -means, and so on (Barnett & Lewis (1984); Zimek et al. (2012); Kim & Scott (2011); Xiong et al. (2011)). Because of the curse of dimensionality, it is difficult to directly apply such methods to multi- or high- dimensional data. Traditional techniques adopt a two-step approach (Chandola et al. (2009)), where dimensionality reduction is conducted first, then clustering analysis is performed, and the two steps are separately learned. One of the drawbacks in the two-step approach is that dimensionality reduction is trained without the guidance from the subsequent clustering analysis, thus the key information for clustering analysis could be lost during dimensionality reduction. To address this issue, recent works propose deep autoencoder based methods in order to jointly learn dimensionality reduction and clustering components. However, the performance of the state-of-the-art methods is limited by over-simplified clustering models that are unable to handle clustering or density estimation tasks for data of complex structures, or the pre-trained dimensionality reduction component (i.e., autoencoder) has little potential to accommodate further adjustment by the subsequent fine-tuning for anomaly detection. DAGMM explicitly addresses these issues by a sub-network called estimation network that evaluates sample density in the low-dimensional space produced by its compression network. By predicting sample mixture membership, we are able to estimate the parameters of GMM without EM-like alternating procedures. Moreover, DAGMM is friendly to end-to-end training so that we can unleash the full potential of adjusting dimensionality reduction components and jointly improve the quality of clustering analysis/density estimation. ",
222
+ "bbox": [
223
+ 174,
224
+ 611,
225
+ 825,
226
+ 888
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "In addition, one-class classification approaches are also widely used for anomaly detection. Under this framework, a discriminative boundary surrounding the normal instances is learned by algorithms, such as one-class SVM (Chen et al. (2001); Song et al. (2002); Williams et al. (2002)). When the number of dimensions grows higher, such techniques usually suffer from suboptimal performance due to the curse of dimensionality. Unlike these methods, DAGMM estimates data density in a jointly learned low-dimensional space for more robust anomaly detection. ",
233
+ "bbox": [
234
+ 174,
235
+ 895,
236
+ 821,
237
+ 924
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "",
244
+ "bbox": [
245
+ 174,
246
+ 103,
247
+ 823,
248
+ 159
249
+ ],
250
+ "page_idx": 3
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "There has been growing interest in joint learning of dimensionality reduction (feature selection) and Gaussian mixture modeling. Yang et al. (2014; 2017b) propose a method that jointly learns linear dimensionality reduction and GMM. Paulik (2013) studies how to perform better feature selection with a pre-trained GMM as a regularizer. Variani et al. (2015) and Zhang & Woodland (2017) propose joint learning frameworks, where the parameters of GMM are directly estimated through supervision information in speech recognition applications. Tuske et al. (2015a;b) investigate ¨ how to use log-linear mixture models to approximate GMM posterior under the conditions that a class/mixture prior distribution is given and a covariance matrix is globally shared. Unlike the existing works, we focus on unsupervised settings: DAGMM extracts useful features for anomaly detection through non-linear dimensionality reduction realized by a deep autoencoder, and jointly learns their density under the GMM framework by mixture membership estimation, for which DAGMM can be viewed as a more powerful deep unsupervised version of adaptive mixture of experts (Jacobs et al. (1991)) in combination with a deep autoencoder. More importantly, DAGMM combines induced reconstruction error and learned latent representation for unsupervised anomaly detection. ",
255
+ "bbox": [
256
+ 173,
257
+ 166,
258
+ 825,
259
+ 361
260
+ ],
261
+ "page_idx": 3
262
+ },
263
+ {
264
+ "type": "text",
265
+ "text": "3 DEEP AUTOENCODING GAUSSIAN MIXTURE MODEL ",
266
+ "text_level": 1,
267
+ "bbox": [
268
+ 176,
269
+ 381,
270
+ 643,
271
+ 397
272
+ ],
273
+ "page_idx": 3
274
+ },
275
+ {
276
+ "type": "text",
277
+ "text": "3.1 OVERVIEW ",
278
+ "text_level": 1,
279
+ "bbox": [
280
+ 174,
281
+ 411,
282
+ 290,
283
+ 426
284
+ ],
285
+ "page_idx": 3
286
+ },
287
+ {
288
+ "type": "image",
289
+ "img_path": "images/8f0d414422daa0d9e21d941997178e29a2a252c31f4275bf47e517796576cbd1.jpg",
290
+ "image_caption": [
291
+ "Figure 2: An overview on Deep Autoencoding Gaussian Mixture Model "
292
+ ],
293
+ "image_footnote": [],
294
+ "bbox": [
295
+ 261,
296
+ 440,
297
+ 736,
298
+ 622
299
+ ],
300
+ "page_idx": 3
301
+ },
302
+ {
303
+ "type": "text",
304
+ "text": "Deep Autoencoding Gaussian Mixture Model (DAGMM) consists of two major components: a compression network and an estimation network. As shown in Figure 2, DAGMM works as follows: (1) the compression network performs dimensionality reduction for input samples by a deep autoencoder, prepares their low-dimensional representations from both the reduced space and the reconstruction error features, and feeds the representations to the subsequent estimation network; (2) the estimation network takes the feed, and predicts their likelihood/energy in the framework of Gaussian Mixture Model (GMM). ",
305
+ "bbox": [
306
+ 174,
307
+ 665,
308
+ 826,
309
+ 763
310
+ ],
311
+ "page_idx": 3
312
+ },
313
+ {
314
+ "type": "text",
315
+ "text": "3.2 COMPRESSION NETWORK ",
316
+ "text_level": 1,
317
+ "bbox": [
318
+ 174,
319
+ 780,
320
+ 393,
321
+ 794
322
+ ],
323
+ "page_idx": 3
324
+ },
325
+ {
326
+ "type": "text",
327
+ "text": "The low-dimensional representations provided by the compression network contains two sources of features: (1) the reduced low-dimensional representations learned by a deep autoencoder; and (2) the features derived from reconstruction error. Given a sample $\\mathbf { x }$ , the compression network computes its low-dimensional representation $\\mathbf { z }$ as follows. ",
328
+ "bbox": [
329
+ 174,
330
+ 806,
331
+ 825,
332
+ 861
333
+ ],
334
+ "page_idx": 3
335
+ },
336
+ {
337
+ "type": "equation",
338
+ "img_path": "images/019a6125eb91a43fe564c91298ff6e8c2feb2998e909b36210c60432970b0c8f.jpg",
339
+ "text": "$$\n\\begin{array} { r } { \\mathbf { z } _ { c } = h ( \\mathbf { x } ; \\boldsymbol { \\theta } _ { e } ) , } \\end{array}\n$$",
340
+ "text_format": "latex",
341
+ "bbox": [
342
+ 261,
343
+ 867,
344
+ 359,
345
+ 883
346
+ ],
347
+ "page_idx": 3
348
+ },
349
+ {
350
+ "type": "equation",
351
+ "img_path": "images/52b1337e6de5c48ef16a0847a07f7fe2325af035c184aac61872ee4990f89633.jpg",
352
+ "text": "$$\n\\begin{array} { r l } & { \\mathbf { z } ^ { \\prime } = g ( \\mathbf { z } _ { c } ; \\boldsymbol { \\theta } _ { d } ) , } \\\\ & { \\mathbf { z } _ { r } = f ( \\mathbf { x } , \\mathbf { x } ^ { \\prime } ) , } \\\\ & { \\mathbf { z } = [ \\mathbf { z } _ { c } , \\mathbf { z } _ { r } ] , } \\end{array}\n$$",
353
+ "text_format": "latex",
354
+ "bbox": [
355
+ 446,
356
+ 864,
357
+ 740,
358
+ 924
359
+ ],
360
+ "page_idx": 3
361
+ },
362
+ {
363
+ "type": "text",
364
+ "text": "where $\\mathbf { z } _ { c }$ is the reduced low-dimensional representation learned by the deep autoencoder, ${ \\bf z } _ { r }$ includes the features derived from the reconstruction error, $\\theta _ { e }$ and $\\theta _ { d }$ are the parameters of the deep autoencoder, $\\mathbf { x } ^ { \\prime }$ is the reconstructed counterpart of $\\mathbf { x }$ , $h ( \\cdot )$ denotes the encoding function, $g ( \\cdot )$ denotes the decoding function, and $f ( \\cdot )$ denotes the function of calculating reconstruction error features. In particular, $\\mathbf { z } _ { r }$ can be multi-dimensional, considering multiple distance metrics such as absolute Euclidean distance, relative Euclidean distance, cosine similarity, and so on. In the end, the compression network feeds $\\mathbf { z }$ to the subsequent estimation network. ",
365
+ "bbox": [
366
+ 173,
367
+ 103,
368
+ 825,
369
+ 202
370
+ ],
371
+ "page_idx": 4
372
+ },
373
+ {
374
+ "type": "text",
375
+ "text": "3.3 ESTIMATION NETWORK ",
376
+ "text_level": 1,
377
+ "bbox": [
378
+ 176,
379
+ 218,
380
+ 380,
381
+ 232
382
+ ],
383
+ "page_idx": 4
384
+ },
385
+ {
386
+ "type": "text",
387
+ "text": "Given the low-dimensional representations for input samples, the estimation network performs density estimation under the framework of GMM. ",
388
+ "bbox": [
389
+ 173,
390
+ 243,
391
+ 823,
392
+ 272
393
+ ],
394
+ "page_idx": 4
395
+ },
396
+ {
397
+ "type": "text",
398
+ "text": "In the training phase with unknown mixture-component distribution $\\phi$ , mixture means $\\mu$ , and mixture covariance $\\pmb { \\Sigma }$ , the estimation network estimates the parameters of GMM and evaluates the likelihood/energy for samples without alternating procedures such as EM (Zimek et al. (2012)). The estimation network achieves this by utilizing a multi-layer neural network to predict the mixture membership for each sample. Given the low-dimensional representations $\\mathbf { z }$ and an integer $K$ as the number of mixture components, the estimation network makes membership prediction as follows. ",
399
+ "bbox": [
400
+ 173,
401
+ 279,
402
+ 825,
403
+ 363
404
+ ],
405
+ "page_idx": 4
406
+ },
407
+ {
408
+ "type": "equation",
409
+ "img_path": "images/c3786f721b8b530becaeaafbf175cd8bdf6a60622bdd18be81fd17a1095b42b4.jpg",
410
+ "text": "$$\n\\mathbf { p } = M L N ( \\mathbf { z } ; \\theta _ { m } ) , \\hat { \\gamma } = \\mathrm { s o f t m a x } ( \\mathbf { p } ) ,\n$$",
411
+ "text_format": "latex",
412
+ "bbox": [
413
+ 307,
414
+ 368,
415
+ 687,
416
+ 386
417
+ ],
418
+ "page_idx": 4
419
+ },
420
+ {
421
+ "type": "text",
422
+ "text": "where $\\hat { \\gamma }$ is a $K$ -dimensional vector for the soft mixture-component membership prediction, and $\\mathbf { p }$ is the output of a multi-layer network parameterized by $\\theta _ { m }$ . Given a batch of $N$ samples and their membership prediction, $\\forall 1 \\leq k \\leq K$ , we can further estimate the parameters in GMM as follows. ",
423
+ "bbox": [
424
+ 174,
425
+ 390,
426
+ 830,
427
+ 433
428
+ ],
429
+ "page_idx": 4
430
+ },
431
+ {
432
+ "type": "equation",
433
+ "img_path": "images/c6ea57f5c666816a0ba52ddea70b2a392baef9c580bb960f4208ab0723c2c832.jpg",
434
+ "text": "$$\n\\hat { \\phi } _ { k } = \\sum _ { i = 1 } ^ { N } \\frac { \\hat { \\gamma } _ { i k } } { N } , \\qquad \\hat { \\mu } _ { k } = \\frac { \\sum _ { i = 1 } ^ { N } \\hat { \\gamma } _ { i k } { \\bf z } _ { i } } { \\sum _ { i = 1 } ^ { N } \\hat { \\gamma } _ { i k } } , \\qquad \\hat { \\bf \\mu } _ { k } = \\frac { \\sum _ { i = 1 } ^ { N } \\hat { \\gamma } _ { i k } \\bigl ( { \\bf z } _ { i } - \\hat { \\mu } _ { k } \\bigr ) \\bigl ( { \\bf z } _ { i } - \\hat { \\mu } _ { k } \\bigr ) ^ { T } } { \\sum _ { i = 1 } ^ { N } \\hat { \\gamma } _ { i k } } .\n$$",
435
+ "text_format": "latex",
436
+ "bbox": [
437
+ 215,
438
+ 439,
439
+ 781,
440
+ 481
441
+ ],
442
+ "page_idx": 4
443
+ },
444
+ {
445
+ "type": "text",
446
+ "text": "where $\\hat { \\gamma } _ { i }$ is the membership prediction for the low-dimensional representation $\\mathbf { z } _ { i }$ , and $\\hat { \\phi } _ { k } , \\hat { \\mu } _ { k } , \\hat { \\Sigma } _ { k }$ are mixture probability, mean, covariance for component $k$ in GMM, respectively. ",
447
+ "bbox": [
448
+ 173,
449
+ 488,
450
+ 823,
451
+ 517
452
+ ],
453
+ "page_idx": 4
454
+ },
455
+ {
456
+ "type": "text",
457
+ "text": "With the estimated parameters, sample energy can be further inferred by ",
458
+ "bbox": [
459
+ 174,
460
+ 523,
461
+ 648,
462
+ 539
463
+ ],
464
+ "page_idx": 4
465
+ },
466
+ {
467
+ "type": "equation",
468
+ "img_path": "images/054fe8c2780ed7be0d24ccf7a3ddd4397c45d761aa64884e467777ab06daedad.jpg",
469
+ "text": "$$\nE ( \\mathbf { z } ) = - \\log \\bigg ( \\sum _ { k = 1 } ^ { K } \\hat { \\phi } _ { k } \\frac { \\exp \\big ( - \\frac { 1 } { 2 } ( \\mathbf { z } - \\hat { \\mu } _ { k } ) ^ { T } \\hat { \\Sigma } _ { k } ^ { - 1 } ( \\mathbf { z } - \\hat { \\mu } _ { k } ) \\big ) } { \\sqrt { | 2 \\pi \\hat { \\Sigma } _ { k } | } } \\bigg ) .\n$$",
470
+ "text_format": "latex",
471
+ "bbox": [
472
+ 294,
473
+ 544,
474
+ 704,
475
+ 593
476
+ ],
477
+ "page_idx": 4
478
+ },
479
+ {
480
+ "type": "text",
481
+ "text": "where $| \\cdot |$ denotes the determinant of a matrix. ",
482
+ "bbox": [
483
+ 174,
484
+ 597,
485
+ 478,
486
+ 612
487
+ ],
488
+ "page_idx": 4
489
+ },
490
+ {
491
+ "type": "text",
492
+ "text": "In addition, during the testing phase with the learned GMM parameters, it is straightforward to estimate sample energy, and predict samples of high energy as anomalies by a pre-chosen threshold. ",
493
+ "bbox": [
494
+ 173,
495
+ 618,
496
+ 825,
497
+ 648
498
+ ],
499
+ "page_idx": 4
500
+ },
501
+ {
502
+ "type": "text",
503
+ "text": "3.4 OBJECTIVE FUNCTION ",
504
+ "text_level": 1,
505
+ "bbox": [
506
+ 174,
507
+ 665,
508
+ 370,
509
+ 678
510
+ ],
511
+ "page_idx": 4
512
+ },
513
+ {
514
+ "type": "text",
515
+ "text": "Given a dataset of $N$ samples, the objective function that guides DAGMM training is constructed as follows. ",
516
+ "bbox": [
517
+ 174,
518
+ 689,
519
+ 823,
520
+ 717
521
+ ],
522
+ "page_idx": 4
523
+ },
524
+ {
525
+ "type": "equation",
526
+ "img_path": "images/aa416e889e7be576187a66646bc0d2fff197201b3e408dd7f04bdb44df553ddf.jpg",
527
+ "text": "$$\nJ ( \\theta _ { e } , \\theta _ { d } , \\theta _ { m } ) = \\frac { 1 } { N } \\sum _ { i = 1 } ^ { N } L ( \\mathbf { x } _ { i } , \\mathbf { x } _ { i } ^ { \\prime } ) + \\frac { \\lambda _ { 1 } } { N } \\sum _ { i = 1 } ^ { N } E ( \\mathbf { z } _ { i } ) + \\lambda _ { 2 } P ( \\hat { \\mathbf { \\mathbf { \\ x } } } ) .\n$$",
528
+ "text_format": "latex",
529
+ "bbox": [
530
+ 292,
531
+ 713,
532
+ 705,
533
+ 757
534
+ ],
535
+ "page_idx": 4
536
+ },
537
+ {
538
+ "type": "text",
539
+ "text": "This objective function includes three components. ",
540
+ "bbox": [
541
+ 174,
542
+ 766,
543
+ 508,
544
+ 781
545
+ ],
546
+ "page_idx": 4
547
+ },
548
+ {
549
+ "type": "text",
550
+ "text": "• $L ( \\mathbf { x } _ { i } , \\mathbf { x } _ { i } ^ { \\prime } )$ is the loss function that characterizes the reconstruction error caused by the deep autoencoder in the compression network. Intuitively, if the compression network could make the reconstruction error low, the low-dimensional representation could better preserve the key information of input samples. Therefore, a compression network of lower reconstruction error is always desired. In practice, $L _ { 2 }$ -norm usually gives desirable results, as $L ( \\mathbf { x } _ { i } , \\mathbf { x } _ { i } ^ { \\prime } ) = \\left. \\mathbf { x } _ { i } - \\mathbf { x } _ { i } ^ { \\prime } \\right. _ { 2 } ^ { 2 }$ . $E ( \\mathbf { z } _ { i } )$ models the probabilities that we could observe the input samples. By minimizing the sample energy, we look for the best combination of compression and estimation networks that maximize the likelihood to observe input samples. ",
551
+ "bbox": [
552
+ 214,
553
+ 791,
554
+ 825,
555
+ 924
556
+ ],
557
+ "page_idx": 4
558
+ },
559
+ {
560
+ "type": "text",
561
+ "text": "• DAGMM also has the singularity problem as in GMM: trivial solutions are triggered when the diagonal entries in covariance matrices degenerate to 0. To avoid this issue, we penalize $\\begin{array} { r } { P ( \\hat { \\Sigma } ) \\bar { = } \\sum _ { k = 1 } ^ { K } \\sum _ { j = 1 } ^ { d } \\frac { 1 } { \\hat { \\Sigma } _ { k j j } } } \\end{array}$ , where $d$ is the number of dimensions in the low-dimensional representations provided by the compression network. • $\\lambda _ { 1 }$ and $\\lambda _ { 2 }$ are the meta parameters in DAGMM. In practice, $\\lambda _ { 1 } = 0 . 1$ and $\\lambda _ { 2 } = 0 . 0 0 5$ usually render desirable results. ",
562
+ "bbox": [
563
+ 215,
564
+ 103,
565
+ 825,
566
+ 198
567
+ ],
568
+ "page_idx": 5
569
+ },
570
+ {
571
+ "type": "text",
572
+ "text": "3.5 RELATION TO VARIATIONAL INFERENCE ",
573
+ "text_level": 1,
574
+ "bbox": [
575
+ 176,
576
+ 214,
577
+ 495,
578
+ 228
579
+ ],
580
+ "page_idx": 5
581
+ },
582
+ {
583
+ "type": "text",
584
+ "text": "In DAGMM, we leverage the estimation network to make membership prediction for each sample. From the view of probabilistic graphical models, the estimation network plays an analogous role of latent variable (i.e., sample membership) inference. Recently, neural variational inference (Mnih & Gregor (2014)) has been proposed to employ deep neural networks to tackle difficult latent variable inference problems, where exact model inference is intractable and conventional approximate methods cannot scale well. Theoretically, we can also adapt the membership prediction task of DAGMM into the framework of neural variational inference. For sample $\\mathbf { x } _ { i }$ , the contribution of its compressed representation $\\mathbf { z } _ { i }$ to the energy function can be upper-bounded as follows (Jordan et al. (1999)), ",
585
+ "bbox": [
586
+ 173,
587
+ 239,
588
+ 826,
589
+ 352
590
+ ],
591
+ "page_idx": 5
592
+ },
593
+ {
594
+ "type": "equation",
595
+ "img_path": "images/00488ae9e10e591305ee3df5338686621163e4481b8afb5515b5d05d0dad1f97.jpg",
596
+ "text": "$$\n\\begin{array} { l } { { \\displaystyle E ( { \\bf z } _ { i } ) = - \\log p ( { \\bf z } _ { i } ) = - \\log \\sum _ { k } p ( { \\bf z } _ { i } , k ) } \\ ~ } \\\\ { { \\displaystyle = - \\log \\sum _ { k } Q _ { \\theta _ { m } } ( k \\mid { \\bf z } _ { i } ) \\frac { p ( { \\bf z } _ { i } , k ) } { Q _ { \\theta _ { m } } ( k \\mid { \\bf z } _ { i } ) } } \\ ~ } \\\\ { { \\displaystyle \\leq - \\sum _ { k } Q _ { \\theta _ { m } } ( k \\mid { \\bf z } _ { k } ) \\log \\frac { p ( { \\bf z } _ { i } , k ) } { Q _ { \\theta _ { m } } ( k \\mid { \\bf z } _ { i } ) } } \\ ~ } \\\\ { { \\displaystyle = - E Q _ { \\theta _ { m } } \\log p ( { \\bf z } _ { i } , k ) - \\log Q _ { \\theta _ { m } } ( k \\mid { \\bf z } _ { i } ) ] \\ ~ } } \\\\ { { \\displaystyle = - E Q _ { \\theta _ { m } } \\log p ( { \\bf z } _ { i } \\mid k ) ] + \\mathrm { K L } ( Q _ { \\theta _ { m } } ( k \\mid { \\bf z } _ { i } ) \\mid | p ( k ) ) } \\ ~ } \\\\ { { \\displaystyle = - \\log p ( { \\bf z } _ { i } ) + \\mathrm { K L } ( Q _ { \\theta _ { m } } ( k \\mid { \\bf z } _ { i } ) \\mid p ( k \\mid { \\bf z } _ { i } ) ) } \\ ~ } \\\\ { { \\displaystyle = E ( { \\bf z } _ { i } ) + \\mathrm { K L } ( Q _ { \\theta _ { m } } ( k \\mid { \\bf z } _ { i } ) \\mid p ( k \\mid { \\bf z } _ { i } ) ) } \\ ~ } \\end{array}\n$$",
597
+ "text_format": "latex",
598
+ "bbox": [
599
+ 259,
600
+ 354,
601
+ 736,
602
+ 541
603
+ ],
604
+ "page_idx": 5
605
+ },
606
+ {
607
+ "type": "text",
608
+ "text": "where $Q _ { \\theta _ { m } } ( k \\mid \\mathbf { z } _ { i } )$ is the estimation network that predicts the membership of $\\mathbf { z } _ { i }$ , $\\mathrm { K L } ( \\cdot | | \\cdot )$ is the Kullback-Leibler divergence between two input distributions, $p ( k ) = \\phi _ { k }$ is the mixing coefficient to be estimated, and $p ( k \\mid \\mathbf { z } _ { i } )$ is the posterior probability distribution of mixture component $k$ given $\\mathbf { z } _ { i }$ ",
609
+ "bbox": [
610
+ 176,
611
+ 541,
612
+ 825,
613
+ 583
614
+ ],
615
+ "page_idx": 5
616
+ },
617
+ {
618
+ "type": "text",
619
+ "text": "By minimizing the negative evidence lower bound in Equation (8), we can make the estimation network approximate the true posterior and tighten the bound of energy function. In DAGMM, we use Equation (6) as a part of the objective function instead of its upper bound in Equation (10) simply because the energy function of DAGMM is tractable and efficient to evaluate. Unlike neural variational inference that uses the deep estimation network to define a variational posterior distribution as described above, DAGMM explicitly employs the deep estimation network to parametrize a sampledependent prior distribution. In the history of machine learning research, there were research efforts towards utilizing neural networks to calculate sample membership in mixture models, such as adaptive mixture of experts (Jacobs et al. (1991)). From this perspective, DAGMM can be viewed as a powerful deep unsupervised version of adaptive mixture of experts in combination with a deep autoencoder. ",
620
+ "bbox": [
621
+ 173,
622
+ 589,
623
+ 825,
624
+ 729
625
+ ],
626
+ "page_idx": 5
627
+ },
628
+ {
629
+ "type": "text",
630
+ "text": "3.6 TRAINING STRATEGY ",
631
+ "text_level": 1,
632
+ "bbox": [
633
+ 176,
634
+ 744,
635
+ 364,
636
+ 758
637
+ ],
638
+ "page_idx": 5
639
+ },
640
+ {
641
+ "type": "text",
642
+ "text": "Unlike existing deep autoencoder based methods (Yang et al. (2017a); Xie et al. (2016)) that rely on pre-training, DAGMM employs end-to-end training. First, in our study, we find that pre-trained compression networks suffer from limited anomaly detection performance, as it is difficult to make significant changes in the well-trained deep autoencoder to favor the subsequent density estimation tasks. Second, we also find that the compression network and estimation network could mutually boost each others’ performance. On one hand, with the regularization introduced by the estimation network, the deep autoencoder in the compression network learned by end-to-end training can reduce reconstruction error as low as the error from its pre-trained counterpart, which meanwhile cannot be achieved by simply performing end-to-end training with the deep autoencoder alone. On the other hand, with the well-learned low-dimensional representations from the compression network, the estimation network is able to make meaningful density estimations. ",
643
+ "bbox": [
644
+ 174,
645
+ 770,
646
+ 825,
647
+ 924
648
+ ],
649
+ "page_idx": 5
650
+ },
651
+ {
652
+ "type": "text",
653
+ "text": "In Section 4.5, we employ an example from a public benchmark dataset to discuss the choice between pre-training and end-to-end training in DAGMM. ",
654
+ "bbox": [
655
+ 171,
656
+ 103,
657
+ 823,
658
+ 132
659
+ ],
660
+ "page_idx": 6
661
+ },
662
+ {
663
+ "type": "text",
664
+ "text": "4 EXPERIMENTAL RESULTS ",
665
+ "text_level": 1,
666
+ "bbox": [
667
+ 176,
668
+ 152,
669
+ 419,
670
+ 169
671
+ ],
672
+ "page_idx": 6
673
+ },
674
+ {
675
+ "type": "text",
676
+ "text": "In this section, we use public benchmark datasets to demonstrate the effectiveness of DAGMM in unsupervised anomaly detection. ",
677
+ "bbox": [
678
+ 173,
679
+ 184,
680
+ 823,
681
+ 212
682
+ ],
683
+ "page_idx": 6
684
+ },
685
+ {
686
+ "type": "text",
687
+ "text": "4.1 DATASET ",
688
+ "text_level": 1,
689
+ "bbox": [
690
+ 174,
691
+ 229,
692
+ 279,
693
+ 243
694
+ ],
695
+ "page_idx": 6
696
+ },
697
+ {
698
+ "type": "table",
699
+ "img_path": "images/c5fa5510c891fc3392030409a6e0ef7d4a5ecfe39b5bbbf70a649f002a32f109.jpg",
700
+ "table_caption": [
701
+ "Table 1: Statistics of the public benchmark datasets "
702
+ ],
703
+ "table_footnote": [],
704
+ "table_body": "<table><tr><td></td><td># Dimensions</td><td># Instances</td><td>Anomaly ratio (p)</td></tr><tr><td>KDDCUP</td><td>120</td><td>494,021</td><td>0.2</td></tr><tr><td>Thyroid</td><td>6</td><td>3,772</td><td>0.025</td></tr><tr><td>Arrhythmia</td><td>274</td><td>452</td><td>0.15</td></tr><tr><td>KDDCUP-Rev</td><td>120</td><td>121,597</td><td>0.2</td></tr></table>",
705
+ "bbox": [
706
+ 267,
707
+ 257,
708
+ 730,
709
+ 344
710
+ ],
711
+ "page_idx": 6
712
+ },
713
+ {
714
+ "type": "text",
715
+ "text": "We employ four benchmark datasets: KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev. ",
716
+ "bbox": [
717
+ 169,
718
+ 392,
719
+ 767,
720
+ 407
721
+ ],
722
+ "page_idx": 6
723
+ },
724
+ {
725
+ "type": "text",
726
+ "text": "• KDDCUP. The KDDCUP99 10 percent dataset from the UCI repository (Lichman (2013)) originally contains samples of 41 dimensions, where 34 of them are continuous and 7 are categorical. For categorical features, we further use one-hot representation to encode them, and eventually we obtain a dataset of 120 dimensions. As $2 0 \\%$ of data samples are labeled as “normal” and the rest are labeled as “attack”, “normal” samples are in a minority group; therefore, “normal” ones are treated as anomalies in this task. ",
727
+ "bbox": [
728
+ 217,
729
+ 419,
730
+ 825,
731
+ 502
732
+ ],
733
+ "page_idx": 6
734
+ },
735
+ {
736
+ "type": "text",
737
+ "text": "• Thyroid. The Thyroid (Lichman (2013)) dataset is obtained from the ODDS repository 1. There are 3 classes in the original dataset. In this task, the hyperfunction class is treated as anomaly class and the other two classes are treated as normal class, because hyperfunction is a clear minority class. ",
738
+ "bbox": [
739
+ 217,
740
+ 507,
741
+ 825,
742
+ 563
743
+ ],
744
+ "page_idx": 6
745
+ },
746
+ {
747
+ "type": "text",
748
+ "text": "• Arrhythmia. The Arrhythmia (Lichman (2013)) dataset is also obtained from the ODDS repository. The smallest classes, including 3, 4, 5, 7, 8, 9, 14, and 15, are combined to form the anomaly class, and the rest of the classes are combined to form the normal class. ",
749
+ "bbox": [
750
+ 217,
751
+ 568,
752
+ 825,
753
+ 609
754
+ ],
755
+ "page_idx": 6
756
+ },
757
+ {
758
+ "type": "text",
759
+ "text": "• KDDCUP-Rev. This dataset is derived from KDDCUP. We keep all the data samples labeled as “normal” and randomly draw samples labeled as “attack” so that the ratio between “normal” and “attack” is $4 : 1$ . In this way, we obtain a dataset with anomaly ratio 0.2, where “attack” samples are in a minority group and treated as anomalies. Note that “attack” samples are not fixed, and we randomly draw “attack” samples in every single run. ",
760
+ "bbox": [
761
+ 217,
762
+ 613,
763
+ 825,
764
+ 684
765
+ ],
766
+ "page_idx": 6
767
+ },
768
+ {
769
+ "type": "text",
770
+ "text": "Detailed information about the datasets is shown in Table 1. ",
771
+ "bbox": [
772
+ 174,
773
+ 695,
774
+ 563,
775
+ 709
776
+ ],
777
+ "page_idx": 6
778
+ },
779
+ {
780
+ "type": "text",
781
+ "text": "4.2 BASELINE METHODS",
782
+ "text_level": 1,
783
+ "bbox": [
784
+ 176,
785
+ 727,
786
+ 361,
787
+ 741
788
+ ],
789
+ "page_idx": 6
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "We consider both traditional and state-of-the-art deep learning methods as baselines. ",
794
+ "bbox": [
795
+ 173,
796
+ 752,
797
+ 725,
798
+ 767
799
+ ],
800
+ "page_idx": 6
801
+ },
802
+ {
803
+ "type": "text",
804
+ "text": "• OC-SVM. One-class support vector machine (Chen et al. (2001)) is a popular kernel-based method used in anomaly detection. In the experiment, we employ the widely adopted radial basis function (RBF) kernel in all the tasks. DSEBM-e. Deep structured energy based model (DSEBM) (Zhai et al. (2016)) is a state-ofthe-art deep learning method for unsupervised anomaly detection. In DSEBM-e, sample energy is leveraged as the criterion to detect anomalies. \n• DSEBM-r. DSEBM-e and DSEBM-r (Zhai et al. (2016)) share the same core technique, but reconstruction error is used as the criterion in DSEBM-r for anomaly detection. ",
805
+ "bbox": [
806
+ 214,
807
+ 779,
808
+ 825,
809
+ 900
810
+ ],
811
+ "page_idx": 6
812
+ },
813
+ {
814
+ "type": "text",
815
+ "text": "• DCN. Deep clustering network (DCN) (Yang et al. (2017a)) is a state-of-the-art clustering algorithm that regulates autoencoder performance by $\\mathbf { k }$ -means. We adapt this technique to anomaly detection tasks. In particular, the distance between a sample and its cluster center is taken as the criterion for anomaly detection: samples that are farther from their cluster centers are more likely to be anomalies. ",
816
+ "bbox": [
817
+ 217,
818
+ 103,
819
+ 825,
820
+ 172
821
+ ],
822
+ "page_idx": 7
823
+ },
824
+ {
825
+ "type": "text",
826
+ "text": "Moreover, we include the following DAGMM variants as baselines to demonstrate the importance of individual components in DAGMM. ",
827
+ "bbox": [
828
+ 174,
829
+ 185,
830
+ 823,
831
+ 214
832
+ ],
833
+ "page_idx": 7
834
+ },
835
+ {
836
+ "type": "text",
837
+ "text": "• GMM-EN. In this variant, we remove the reconstruction error component from the objective function of DAGMM. In other words, the estimation network in DAGMM performs membership estimation without the constraints from the compression network. With the learned membership estimation, we infer sample energy by Equation (5) and (6) under the GMM framework. Sample energy is used as the criterion for anomaly detection. \nPAE. We obtain this variant by removing the energy function from the objective function of DAGMM, and this DAGMM variant is equivalent to a deep autoenoder. To ensure the compression network is well trained, we adopt the pre-training strategy (Vincent et al. (2010)). Sample reconstruction error is the criterion for anomaly detection. \nE2E-AE. This variant shares the same setting with PAE, but the deep autoencoder is learned by end-to-end training. Sample reconstruction error is the criterion for anomaly detection PAE-GMM-EM. This variant adopts a two-step approach. At step one, we learn the compression network by pre-training deep autoencoder. At step two, we use the output from the compression network to train the GMM by a traditional EM algorithm. The training procedures in the two steps are separated. Sample energy is used as the criterion for anomaly detection. \nPAE-GMM. This variant also adopts a two-step approach. At step one, we learn the compression network by pre-training deep autoencoder. At step two, we use the output from the compression network to train the estimation network. The training procedures in the two steps are separated. Sample energy is used as the criterion for anomaly detection. \nDAGMM-p. This variant is a compromise between DAGMM and PAE-GMM: we first train the compression network by pre-training, and then fine-tune DAGMM by end-to-end training. Sample energy is the criterion for anomaly detection. \nDAGMM-NVI. The only difference between this variant and DAGMM is that this variant adopts the framework of neural variational inference (Mnih & Gregor (2014)) and replaces Equation (6) with the upper bound in Equation (10) as a part of the objective function. ",
838
+ "bbox": [
839
+ 215,
840
+ 227,
841
+ 826,
842
+ 621
843
+ ],
844
+ "page_idx": 7
845
+ },
846
+ {
847
+ "type": "text",
848
+ "text": "4.3 DAGMM CONFIGURATION ",
849
+ "text_level": 1,
850
+ "bbox": [
851
+ 176,
852
+ 638,
853
+ 403,
854
+ 654
855
+ ],
856
+ "page_idx": 7
857
+ },
858
+ {
859
+ "type": "text",
860
+ "text": "In all the experiment, we consider two reconstruction features from the compression network: relative Euclidean distance and cosine similarity. Given a sample $\\mathbf { x }$ and its reconstructed counterpart $\\mathbf { x } ^ { \\prime }$ , their relative Euclidean distance is defined as $\\frac { \\left\\| \\mathbf { x } - \\mathbf { x } ^ { \\prime } \\right\\| _ { 2 } } { \\| \\mathbf { x } \\| _ { 2 } }$ , and the cosine similarity is derived by $\\frac { \\mathbf { x } \\cdot \\mathbf { x } ^ { \\prime } } { \\| \\mathbf { x } \\| _ { 2 } \\| \\mathbf { x } ^ { \\prime } \\| _ { 2 } }$ . In Appendix D, for readers of interest, we discuss why reconstruction features are important to DAGMM and how to select reconstruction features in practice. ",
861
+ "bbox": [
862
+ 174,
863
+ 665,
864
+ 826,
865
+ 746
866
+ ],
867
+ "page_idx": 7
868
+ },
869
+ {
870
+ "type": "text",
871
+ "text": "The network structures of DAGMM used on individual datasets are summarized as follows. ",
872
+ "bbox": [
873
+ 169,
874
+ 752,
875
+ 771,
876
+ 767
877
+ ],
878
+ "page_idx": 7
879
+ },
880
+ {
881
+ "type": "text",
882
+ "text": "• KDDCUP. For this dataset, its compression network provides 3 dimensional input to the estimation network, where one is the reduced dimension and the other two are from the reconstruction error. The estimation network considers a GMM with 4 mixture components for the best performance. In particular, the compression network runs with FC(120, 60, tanh)-FC(60, 30, tanh)-FC(30, 10, tanh)-FC(10, 1, none)-FC(1, 10, tanh)-FC(10, 30, tanh)-FC(30, 60, tanh)-FC(60, 120, none), and the estimation network performs with FC(3, 10, tanh)-Drop(0.5)-FC(10, 4, softmax). Thyroid. The compression network for this dataset also provides 3 dimensional input to the estimation network, and the estimation network employs 2 mixture components for the best performance. In particular, the compression network runs with FC(6, 12, tanh)-FC(12, 4, tanh)-FC(4, 1, none)-FC(1, 4, tanh)-FC(4, 12, tanh)-FC(12, 6, none), and the estimation network performs with FC(3, 10, tanh)-Drop(0.5)-FC(10, 2, softmax). ",
883
+ "bbox": [
884
+ 215,
885
+ 779,
886
+ 826,
887
+ 924
888
+ ],
889
+ "page_idx": 7
890
+ },
891
+ {
892
+ "type": "text",
893
+ "text": "",
894
+ "bbox": [
895
+ 227,
896
+ 103,
897
+ 821,
898
+ 132
899
+ ],
900
+ "page_idx": 8
901
+ },
902
+ {
903
+ "type": "text",
904
+ "text": "• Arrhythmia. The compression network for this dataset provides 4 dimensional input, where two of them are the reduced dimensions, and the estimation network adopts a setting of 2 mixture components for the best performance. In particular, the compression network runs with FC(274, 10, tanh)-FC(10, 2, none)-FC(2, 10, tanh)-FC(10, 274, none), and the estimation network performs with FC(4, 10, tanh)-Drop(0.5)-FC(10, 2, softmax). ",
905
+ "bbox": [
906
+ 217,
907
+ 135,
908
+ 823,
909
+ 205
910
+ ],
911
+ "page_idx": 8
912
+ },
913
+ {
914
+ "type": "text",
915
+ "text": "• KDDCUP-Rev. For this dataset, its compression network provides 3 dimensional input to the estimation network, where one is the reduced dimension and the other two are from the reconstruction error. The estimation network considers a GMM with 2 mixture components for the best performance. In particular, the compression network runs with FC(120, 60, tanh)-FC(60, 30, tanh)-FC(30, 10, tanh)-FC(10, 1, none)-FC(1, 10, tanh)-FC(10, 30, tanh)-FC(30, 60, tanh)-FC(60, 120, none), and the estimation network performs with FC(3, 10, tanh)-Drop(0.5)-FC(10, 2, softmax). ",
916
+ "bbox": [
917
+ 217,
918
+ 208,
919
+ 825,
920
+ 306
921
+ ],
922
+ "page_idx": 8
923
+ },
924
+ {
925
+ "type": "text",
926
+ "text": "where $\\mathrm { F C } ( a , b , f )$ means a fully-connected layer with $a$ input neurons and $b$ output neurons activated by function $f$ (none means no activation function is used), and Drop $( p )$ denotes a dropout layer with keep probability $p$ during training. ",
927
+ "bbox": [
928
+ 178,
929
+ 315,
930
+ 823,
931
+ 358
932
+ ],
933
+ "page_idx": 8
934
+ },
935
+ {
936
+ "type": "text",
937
+ "text": "All the DAGMM instances are implemented by tensorflow (Abadi et al. (2016)) and trained by Adam (Kingma & Ba (2015)) algorithm with learning rate 0.0001. For KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, the number of training epochs are 200, 20000, 10000, and 400, respectively. For the sizes of mini-batches, they are set as 1024, 1024, 128, and 1024, respectively. Moreover, in all the DAGMM instances, we set $\\lambda _ { 1 }$ as 0.1 and $\\lambda _ { 2 }$ as 0.005. For readers of interest, we discuss how $\\lambda _ { 1 }$ and $\\lambda _ { 2 }$ impact DAGMM in Appendix F. ",
938
+ "bbox": [
939
+ 174,
940
+ 364,
941
+ 825,
942
+ 448
943
+ ],
944
+ "page_idx": 8
945
+ },
946
+ {
947
+ "type": "text",
948
+ "text": "For the baseline methods, we conduct exhaustive search to find the optimal meta parameters for them in order to achieve the best performance. We detail their exact configuration in Appendix A. ",
949
+ "bbox": [
950
+ 173,
951
+ 455,
952
+ 823,
953
+ 483
954
+ ],
955
+ "page_idx": 8
956
+ },
957
+ {
958
+ "type": "text",
959
+ "text": "4.4 ACCURACY ",
960
+ "text_level": 1,
961
+ "bbox": [
962
+ 174,
963
+ 500,
964
+ 294,
965
+ 513
966
+ ],
967
+ "page_idx": 8
968
+ },
969
+ {
970
+ "type": "text",
971
+ "text": "Metric. We consider average precision, recall, and $F _ { 1 }$ score as intuitive ways to compare anomaly detection performance. In particular, based on the anomaly ratio suggested in Table 1, we select the threshold to identify anomalous samples. For example, when DAGMM performs on KDDCUP, the top $2 0 \\%$ samples of the highest energy will be marked as anomalies. We take anomaly class as positive, and define precision, recall, and $F _ { 1 }$ score accordingly. ",
972
+ "bbox": [
973
+ 174,
974
+ 535,
975
+ 825,
976
+ 604
977
+ ],
978
+ "page_idx": 8
979
+ },
980
+ {
981
+ "type": "text",
982
+ "text": "In the first set of experiment, we follow the setting in (Zhai et al. (2016)) with completely clean training data: in each run, we take $5 0 \\%$ of data by random sampling for training with the rest $5 0 \\%$ reserved for testing, and only data samples from the normal class are used for training models. ",
983
+ "bbox": [
984
+ 176,
985
+ 611,
986
+ 825,
987
+ 652
988
+ ],
989
+ "page_idx": 8
990
+ },
991
+ {
992
+ "type": "text",
993
+ "text": "Table 2 reports the average precision, recall, and $F _ { 1 }$ score after 20 runs for DAGMM and its baselines. In general, DAGMM demonstrates superior performance over the baseline methods in terms of $F _ { 1 }$ score on all the datasets. Especially on KDDCUP and KDDCUP-Rev, DAGMM achieves $1 4 \\%$ and $1 0 \\%$ improvement at $F _ { 1 }$ score, compared with the existing methods. For OC-SVM, the curse of dimensionality could be the main reason that limits its performance. For DSEBM, while it works reasonably well on multiple datasets, DAGMM outperforms as both latent representation and reconstruction error are jointly considered in energy modeling. For DCN, PAE-GMM, and DAGMM-p, their performance could be limited by the pre-trained deep autoencoders. When a deep autoencoder is well-trained, it is hard to make any significant change on the reduced dimensions and favor the subsequent density estimation tasks. For GMM-EN, without the reconstruction constraints, it seems difficult to perform reasonable density estimation. In terms of PAE, the single view of reconstruction error may not be sufficient for anomaly detection tasks. For E2E-AE, we observe that it is unable to reduce reconstruction error as low as PAE and DAGMM do on KDDCUP, KDDCUP-Rev, and Thyroid. As the key information of data could be lost during dimensionality reduction, E2E-AE suffers poor performance on KDDCUP and Thyroid. In addition, the performance of DAGMM and DAGMM-NVI is quite similar. As GMM is a fairly simple graphical model, we cannot spot significant improvement brought by neural variational inference in DAGMM. In Appendix B, for readers of interest, we show the cumulative distribution functions of the energy function learned by DAGMM for all the datasets under the setting of clean training data. ",
994
+ "bbox": [
995
+ 174,
996
+ 659,
997
+ 825,
998
+ 924
999
+ ],
1000
+ "page_idx": 8
1001
+ },
1002
+ {
1003
+ "type": "table",
1004
+ "img_path": "images/01476dee6fb6173f47e652d610207f68da7a7ad4e9f50b777965753c5e392a46.jpg",
1005
+ "table_caption": [],
1006
+ "table_footnote": [],
1007
+ "table_body": "<table><tr><td rowspan=\"2\">Method</td><td colspan=\"3\">KDDCUP</td><td colspan=\"3\">Thyroid</td></tr><tr><td>Precision</td><td>Recall</td><td>F1</td><td>Precision</td><td>Recall</td><td>F1</td></tr><tr><td>OC-SVM</td><td>0.7457</td><td>0.8523</td><td>0.7954</td><td>0.3639</td><td>0.4239</td><td>0.3887</td></tr><tr><td>DSEBM-r</td><td>0.1972</td><td>0.2001</td><td>0.1987</td><td>0.0404</td><td>0.0403</td><td>0.0403</td></tr><tr><td>DSEBM-e</td><td>0.7369</td><td>0.7477</td><td>0.7423</td><td>0.1319</td><td>0.1319</td><td>0.1319</td></tr><tr><td>DCN</td><td>0.7696</td><td>0.7829</td><td>0.7762</td><td>0.3319</td><td>0.3196</td><td>0.3251</td></tr><tr><td>GMM-EN</td><td>0.1932</td><td>0.1967</td><td>0.1949</td><td>0.0213</td><td>0.0227</td><td>0.0220</td></tr><tr><td>PAE</td><td>0.7276</td><td>0.7397</td><td>0.7336</td><td>0.1894</td><td>0.2062</td><td>0.1971</td></tr><tr><td>E2E-AE</td><td>0.0024</td><td>0.0025</td><td>0.0024</td><td>0.1064</td><td>0.1316</td><td>0.1176</td></tr><tr><td>PAE-GMM-EM</td><td>0.7183</td><td>0.7311</td><td>0.7246</td><td>0.4745</td><td>0.4538</td><td>0.4635</td></tr><tr><td>PAE-GMM</td><td>0.7251</td><td>0.7384</td><td>0.7317</td><td>0.4532</td><td>0.4881</td><td>0.4688</td></tr><tr><td>DAGMM-p</td><td>0.7579</td><td>0.7710</td><td>0.7644</td><td>0.4723</td><td>0.4725</td><td>0.4713</td></tr><tr><td>DAGMM-NVI</td><td>0.9290</td><td>0.9447</td><td>0.9368</td><td>0.4383</td><td>0.4587</td><td>0.4470</td></tr><tr><td>DAGMM</td><td>0.9297</td><td>0.9442</td><td>0.9369</td><td>0.4766</td><td>0.4834</td><td>0.4782</td></tr><tr><td rowspan=\"2\">Method</td><td colspan=\"3\">Arrhythmia</td><td colspan=\"3\">KDDCUP-Rev</td></tr><tr><td>Precision</td><td>Recall</td><td>F1</td><td>Precision</td><td>Recall</td><td>F1</td></tr><tr><td>OC-SVM</td><td>0.5397</td><td>0.4082</td><td>0.4581</td><td>0.7148</td><td>0.9940</td><td>0.8316</td></tr><tr><td>DSEBM-r</td><td>0.1515</td><td>0.1513</td><td>0.1510</td><td>0.2036</td><td>0.2036</td><td>0.2036</td></tr><tr><td>DSEBM-e</td><td>0.4667</td><td>0.4565</td><td>0.4601</td><td>0.2212</td><td>0.2213</td><td>0.2213</td></tr><tr><td>DCN</td><td>0.3758</td><td>0.3907</td><td>0.3815</td><td>0.2875</td><td>0.2895</td><td>0.2885</td></tr><tr><td>GMM-EN</td><td>0.3000</td><td>0.2792</td><td>0.2886</td><td>0.1846</td><td>0.1746</td><td>0.1795</td></tr><tr><td>PAE</td><td>0.4393</td><td>0.4437</td><td>0.4403</td><td>0.7835</td><td>0.7817</td><td>0.7826</td></tr><tr><td>E2E-AE</td><td>0.4667</td><td>0.4538</td><td>0.4591</td><td>0.7434</td><td>0.7463</td><td>0.7448</td></tr><tr><td>PAE-GMM-EM</td><td>0.3970</td><td>0.4168</td><td>0.4056</td><td>0.2822</td><td>0.2847</td><td>0.2835</td></tr><tr><td>PAE-GMM</td><td>0.4575</td><td>0.4823</td><td>0.4684</td><td>0.6307</td><td>0.6278</td><td>0.6292</td></tr><tr><td>DAGMM-p</td><td>0.4909</td><td>0.4679</td><td>0.4787</td><td>0.2750</td><td>0.2810</td><td>0.2780</td></tr><tr><td>DAGMM-NVI</td><td>0.5091</td><td>0.4892</td><td>0.4981</td><td>0.9211</td><td>0.9211</td><td>0.9211</td></tr><tr><td>DAGMM</td><td>0.4909</td><td>0.5078</td><td>0.4983</td><td>0.9370</td><td>0.9390</td><td>0.9380</td></tr></table>",
1008
+ "bbox": [
1009
+ 264,
1010
+ 102,
1011
+ 732,
1012
+ 457
1013
+ ],
1014
+ "page_idx": 9
1015
+ },
1016
+ {
1017
+ "type": "text",
1018
+ "text": "Table 2: Average precision, recall, and $F _ { 1 }$ from DAGMM and the baseline methods. For each metric, the best result is shown in bold. ",
1019
+ "bbox": [
1020
+ 174,
1021
+ 473,
1022
+ 825,
1023
+ 502
1024
+ ],
1025
+ "page_idx": 9
1026
+ },
1027
+ {
1028
+ "type": "table",
1029
+ "img_path": "images/be8b2f11b2cdfe9b18c67497b1ab5676acf79fed9ddfef55e9623d3ef87dc691.jpg",
1030
+ "table_caption": [
1031
+ "In the second set of experiment, we investigate how DAGMM responds to contaminated training data. In each run, we reserve $5 0 \\%$ of data by random sampling for testing. For the rest $5 0 \\%$ , we take all samples from the normal class mixed with $c \\%$ of samples from the anomaly class for model training. ",
1032
+ "Table 3: Anomaly detection results on contaminated training data from KDDCUP "
1033
+ ],
1034
+ "table_footnote": [],
1035
+ "table_body": "<table><tr><td rowspan=\"2\">Ratio c</td><td colspan=\"3\">DAGMM</td><td colspan=\"3\">DCN</td></tr><tr><td>Precision</td><td>Recall</td><td>F1</td><td>Precision</td><td>Recall</td><td>F1</td></tr><tr><td>1%</td><td>0.9201</td><td>0.9337</td><td>0.9268</td><td>0.7585</td><td>0.7611</td><td>0.7598</td></tr><tr><td>2%</td><td>0.9186</td><td>0.9340</td><td>0.9262</td><td>0.7380</td><td>0.7424</td><td>0.7402</td></tr><tr><td>3%</td><td>0.9132</td><td>0.9272</td><td>0.9201</td><td>0.7163</td><td>0.7293</td><td>0.7228</td></tr><tr><td>4%</td><td>0.8837</td><td>0.8989</td><td>0.8912</td><td>0.6971</td><td>0.7106</td><td>0.7037</td></tr><tr><td>5%</td><td>0.8504</td><td>0.8643</td><td>0.8573</td><td>0.6763</td><td>0.6893</td><td>0.6827</td></tr><tr><td rowspan=\"2\">Ratio c</td><td colspan=\"3\">DSEBM-e</td><td colspan=\"3\">OC-SVM</td></tr><tr><td>Precision</td><td>Recall</td><td>F1</td><td>Precision</td><td>Recall</td><td>F1</td></tr><tr><td>1%</td><td>0.6995</td><td>0.7135</td><td>0.7065</td><td>0.7129</td><td>0.6785</td><td>0.6953</td></tr><tr><td>2%</td><td>0.6780</td><td>0.6876</td><td>0.6827</td><td>0.6668</td><td>0.5207</td><td>0.5847</td></tr><tr><td>3%</td><td>0.6213</td><td>0.6367</td><td>0.6289</td><td>0.6393</td><td>0.4470</td><td>0.5261</td></tr><tr><td>4%</td><td>0.5704</td><td>0.5813</td><td>0.5758</td><td>0.5991</td><td>0.3719</td><td>0.4589</td></tr><tr><td>5%</td><td>0.5345</td><td>0.5375</td><td>0.5360</td><td>0.1155</td><td>0.3369</td><td>0.1720</td></tr></table>",
1036
+ "bbox": [
1037
+ 294,
1038
+ 599,
1039
+ 704,
1040
+ 786
1041
+ ],
1042
+ "page_idx": 9
1043
+ },
1044
+ {
1045
+ "type": "text",
1046
+ "text": "Table 3 reports the average precision, recall, and $F _ { 1 }$ score after 20 runs of DAGMM, DCN, DSEBMe, and OC-SVM on the KDDCUP dataset, respectively. As expected, contaminated training data negatively affect detection accuracy. When contamination ratio $c$ increases from $1 \\%$ to $5 \\%$ , average precision, recall, and $F _ { 1 }$ score decrease for all the methods. Meanwhile, we notice that DAGMM is able to maintain good detection accuracy with $5 \\%$ contaminated data. For OC-SVM, we adopt the same parameter setting used in the experiment with clean training data, and observe that OC-SVM is more sensitive to contamination ratio. In order to receive better detection accuracy, it is important to train a model with high-quality data (i.e., clean or keeping contamination ratio as low as possible). ",
1047
+ "bbox": [
1048
+ 173,
1049
+ 839,
1050
+ 825,
1051
+ 924
1052
+ ],
1053
+ "page_idx": 9
1054
+ },
1055
+ {
1056
+ "type": "text",
1057
+ "text": "",
1058
+ "bbox": [
1059
+ 173,
1060
+ 103,
1061
+ 825,
1062
+ 132
1063
+ ],
1064
+ "page_idx": 10
1065
+ },
1066
+ {
1067
+ "type": "text",
1068
+ "text": "In sum, the DAGMM learned by end-to-end training achieves the state-of-the-art accuracy on the public benchmark datasets, and provides a promising alternative for unsupervised anomaly detection. ",
1069
+ "bbox": [
1070
+ 173,
1071
+ 138,
1072
+ 825,
1073
+ 167
1074
+ ],
1075
+ "page_idx": 10
1076
+ },
1077
+ {
1078
+ "type": "text",
1079
+ "text": "4.5 VISUALIZATION ON THE LEARNED LOW-DIMENSIONAL REPRESENTATION ",
1080
+ "text_level": 1,
1081
+ "bbox": [
1082
+ 174,
1083
+ 184,
1084
+ 728,
1085
+ 199
1086
+ ],
1087
+ "page_idx": 10
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "In this section, we use an example to demonstrate the advantage of DAGMM learned by end-to-end training, compared with the baselines that rely on pre-trained deep autoencoders. ",
1092
+ "bbox": [
1093
+ 174,
1094
+ 210,
1095
+ 825,
1096
+ 239
1097
+ ],
1098
+ "page_idx": 10
1099
+ },
1100
+ {
1101
+ "type": "image",
1102
+ "img_path": "images/22f8cf84bfc6bd6a16223afffff49372745940ca6eafb1555e754848beb779a1.jpg",
1103
+ "image_caption": [
1104
+ "Figure 3: KDDCUP samples in the learned 3-dimensional space by DAGMM, PAE, DAGMM-p, and DCN, where red points are samples from anomaly class and blue ones are samples from normal class "
1105
+ ],
1106
+ "image_footnote": [],
1107
+ "bbox": [
1108
+ 210,
1109
+ 262,
1110
+ 779,
1111
+ 617
1112
+ ],
1113
+ "page_idx": 10
1114
+ },
1115
+ {
1116
+ "type": "text",
1117
+ "text": "Figure 3 shows the low-dimensional representation learned by DAGMM, PAE, DAGMM-p, and DCN, from one of the experiment runs on the KDDCUP dataset. First, we can see from Figure 3a that DAGMM can better separate anomalous samples from normal samples in the learned low-dimensional space, while anomalies overlap more with normal samples in the low-dimensional space learned by PAE, DAGMM-p, or DCN. Second, Even if DAGMM-p and DCN take effort to fine-tune the pre-trained deep autoencoder by its estimation network or $\\mathbf { k }$ -means regularization, one could barely see significant change among Figure 3b, Figure 3c, and Figure 3d, where many anomalous samples are still mixed with normal samples. Indeed, when a deep autoencoder is pre-trained, it tends to be stuck in a good local optima for the purpose of reconstruction only, but it could be suboptimal for the subsequent density estimation tasks. In addition, in our study, we find that the reconstruction error in a trained DAGMM is as low as the error received from a pre-trained deep autoencoder (e.g., around 0.26 in terms of per-sample reconstruction error for KDDCUP). Meanwhile, we also observe that it is difficult to reduce the reconstruction error for a deep autoencoder of the identical structure by endto-end training (e.g., around 1.13 in terms of per-sample reconstruction error for KDDCUP). In other words, the compression network and estimation network mutually boost each others’ performance during end-to-end training: the regularization introduced by the estimation network helps the deep autoencoder escape from less attractive local optima for better compression, while the compression network feeds more meaningful low-dimensional representations to estimation network for robust density estimation. In Appendix C, for readers of interest, we show the visualization of the latent representation learned by DSEBM. ",
1118
+ "bbox": [
1119
+ 173,
1120
+ 674,
1121
+ 825,
1122
+ 924
1123
+ ],
1124
+ "page_idx": 10
1125
+ },
1126
+ {
1127
+ "type": "text",
1128
+ "text": "",
1129
+ "bbox": [
1130
+ 171,
1131
+ 103,
1132
+ 823,
1133
+ 131
1134
+ ],
1135
+ "page_idx": 11
1136
+ },
1137
+ {
1138
+ "type": "text",
1139
+ "text": "In summary, our experimental results show that DAGMM suggests a promising direction for density estimation and anomaly detection, where one can combine the forces of dimensionality reduction and density estimation by end-to-end training. ",
1140
+ "bbox": [
1141
+ 176,
1142
+ 138,
1143
+ 821,
1144
+ 181
1145
+ ],
1146
+ "page_idx": 11
1147
+ },
1148
+ {
1149
+ "type": "text",
1150
+ "text": "In Appendix E, we provide another case study to discuss which kind of samples benefit more from joint training in DAGMM for readers of interest. ",
1151
+ "bbox": [
1152
+ 173,
1153
+ 188,
1154
+ 823,
1155
+ 215
1156
+ ],
1157
+ "page_idx": 11
1158
+ },
1159
+ {
1160
+ "type": "text",
1161
+ "text": "5 CONCLUSION ",
1162
+ "text_level": 1,
1163
+ "bbox": [
1164
+ 176,
1165
+ 236,
1166
+ 318,
1167
+ 252
1168
+ ],
1169
+ "page_idx": 11
1170
+ },
1171
+ {
1172
+ "type": "text",
1173
+ "text": "In this paper, we propose the Deep Autoencoding Gaussian Mixture Model (DAGMM) for unsupervised anomaly detection. DAGMM consists of two major components: compression network and estimation network, where the compression network projects samples into a low-dimensional space that preserves the key information for anomaly detection, and the estimation network evaluates sample energy in the low-dimensional space under the framework of Gaussian Mixture Modeling. DAGMM is friendly to end-to-end training: (1) the estimation network predicts sample mixture membership so that the parameters in GMM can be estimated without alternating procedures; and (2) the regularization introduced by the estimation network helps the compression network escape from less attractive local optima and achieve low reconstruction error by end-to-end training. Compared with the pre-training strategy, the end-to-end training could be more beneficial for density estimation tasks, as we can have more freedom to adjust dimensionality reduction processes to favor the subsequent density estimation tasks. In the experimental study, DAGMM demonstrates superior performance over state-of-the-art techniques on public benchmark datasets with up to $1 4 \\%$ improvement on the standard $F _ { 1 }$ score, and suggests a promising direction for unsupervised anomaly detection on multior high-dimensional data. ",
1174
+ "bbox": [
1175
+ 174,
1176
+ 268,
1177
+ 826,
1178
+ 476
1179
+ ],
1180
+ "page_idx": 11
1181
+ },
1182
+ {
1183
+ "type": "text",
1184
+ "text": "REFERENCES \nMart´ın Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, et al. Tensorflow: A system for large-scale machine learning. In OSDI, volume 16, pp. 265–283, 2016. \nV. Barnett and T. Lewis. Outliers in statistical data. Wiley, 1984. \nEmmanuel J. Candes, Xiaodong Li, Yi Ma, and John Wright. Robust principal component analysis? \\` J. ACM, 58(3):11:1–11:37, 2011. ISSN 0004-5411. \nVarun Chandola, Arindam Banerjee, and Vipin Kumar. Anomaly detection: A survey. ACM Comput. Surv, 41:15:1–15:58, 2009. \nYunqiang Chen, Xiang Sean Zhou, and Thomas S Huang. One-class svm for learning in image retrieval. In International Conference on Image Processing, volume 1, pp. 34–37, 2001. \nSimon Gunter, Nicol N. Schraudolph, and S. V. N. Vishwanathan. Fast Iterative Kernel Principal ¨ Component Analysis. jmlr, 8:1893–1918. \nPeter J Huber. Robust statistics. In International Encyclopedia of Statistical Science, pp. 1248–1251. Springer, 2011. \nRobert A Jacobs, Michael I Jordan, Steven J Nowlan, and Geoffrey E Hinton. Adaptive mixtures of local experts. Neural computation, 3(1):79–87, 1991. \nI. T. Jolliffe. Principal component analysis. In Principal Component Analysis. Springer Verlag, New York, 1986. \nMichael I Jordan, Zoubin Ghahramani, Tommi S Jaakkola, and Lawrence K Saul. An introduction to variational methods for graphical models. Machine learning, 37(2):183–233, 1999. \nFabian Keller, Emmanuel Muller, and Klemens Bohm. Hics: High contrast subspaces for densitybased outlier ranking. In International Conference on Data Engineering, pp. 1037–1048. IEEE, 2012. \nJooSeuk Kim and Clayton D. Scott. Robust kernel density estimation. CoRR, abs/1107.3133, 2011. \nDiederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference for Learning Representations, 2015. \nM. Lichman. UCI machine learning repository, 2013. URL http://archive.ics.uci.edu/ ml. \nFei Tony Liu, Kai Ming Ting, and Zhi-Hua Zhou. Isolation forest. In International Conference on Data Mining, pp. 413–422. IEEE, 2008. \nAndriy Mnih and Karol Gregor. Neural variational inference and learning in belief networks. In ICML, pp. 1791–1799, 2014. \nMatthias Paulik. Lattice-based training of bottleneck feature extraction neural networks. In Interspeech, pp. 89–93, 2013. \nQ. Song, W. J. Hu, and W. F. Xie. Robust support vector machine with bullet hole image classification. IEEE Trans. Systems, Man and Cybernetics, 32:440–448, 2002. \nSwee Chuan Tan, Kai Ming Ting, and Tony Fei Liu. Fast anomaly detection for streaming data. In IJCAI Proceedings-International Joint Conference on Artificial Intelligence, volume 22, pp. 1511, 2011. \nZoltan T ´ uske, Pavel Golik, Ralf Schl ¨ uter, and Hermann Ney. Speaker adaptive joint training of ¨ gaussian mixture models and bottleneck features. In IEEE Workshop on Automatic Speech Recognition and Understanding (ASRU), pp. 596–603, 2015a. \nZoltan T ´ uske, Muhammad Ali Tahir, Ralf Schl ¨ uter, and Hermann Ney. Integrating gaussian mixtures ¨ into deep neural networks: softmax layer with hidden variables. In ICASSP, pp. 4285–4289, 2015b. ",
1185
+ "bbox": [
1186
+ 171,
1187
+ 60,
1188
+ 828,
1189
+ 924
1190
+ ],
1191
+ "page_idx": 12
1192
+ },
1193
+ {
1194
+ "type": "text",
1195
+ "text": "Ehsan Variani, Erik McDermott, and Georg Heigold. A gaussian mixture model layer jointly optimized with discriminative features within a deep neural network architecture. In ICASSP, pp. 4270–4274, 2015. ",
1196
+ "bbox": [
1197
+ 173,
1198
+ 103,
1199
+ 823,
1200
+ 145
1201
+ ],
1202
+ "page_idx": 13
1203
+ },
1204
+ {
1205
+ "type": "text",
1206
+ "text": "Pascal Vincent, Hugo Larochelle, Isabelle Lajoie, Yoshua Bengio, and Pierre-Antoine Manzagol. Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion. Journal of Machine Learning Research, 11(Dec):3371–3408, 2010. ",
1207
+ "bbox": [
1208
+ 174,
1209
+ 155,
1210
+ 823,
1211
+ 198
1212
+ ],
1213
+ "page_idx": 13
1214
+ },
1215
+ {
1216
+ "type": "text",
1217
+ "text": "Graham Williams, Rohan Baxter, Hongxing He, and Simon Hawkins. A comparative study of RNN for outlier detection in data mining. In Proceedings of ICDM02, pp. 709–712, 2002. ",
1218
+ "bbox": [
1219
+ 174,
1220
+ 205,
1221
+ 823,
1222
+ 236
1223
+ ],
1224
+ "page_idx": 13
1225
+ },
1226
+ {
1227
+ "type": "text",
1228
+ "text": "Junyuan Xie, Ross Girshick, and Ali Farhadi. Unsupervised deep embedding for clustering analysis. In International Conference on Machine Learning, pp. 478–487, 2016. ",
1229
+ "bbox": [
1230
+ 174,
1231
+ 243,
1232
+ 825,
1233
+ 273
1234
+ ],
1235
+ "page_idx": 13
1236
+ },
1237
+ {
1238
+ "type": "text",
1239
+ "text": "Liang Xiong, Barnabas P ´ oczos, and Jeff G. Schneider. Group anomaly detection using flexible genre ´ models. In Advances in Neural Information Processing Systems, pp. 1071–1079, 2011. ",
1240
+ "bbox": [
1241
+ 174,
1242
+ 281,
1243
+ 823,
1244
+ 310
1245
+ ],
1246
+ "page_idx": 13
1247
+ },
1248
+ {
1249
+ "type": "text",
1250
+ "text": "Bo Yang, Xiao Fu, Nicholas D Sidiropoulos, and Mingyi Hong. Towards k-means-friendly spaces: Simultaneous deep learning and clustering. In International Conference on Machine Learning, 2017a. ",
1251
+ "bbox": [
1252
+ 173,
1253
+ 319,
1254
+ 826,
1255
+ 362
1256
+ ],
1257
+ "page_idx": 13
1258
+ },
1259
+ {
1260
+ "type": "text",
1261
+ "text": "Xi Yang, Kaizhu Huang, and Rui Zhang. Unsupervised dimensionality reduction for gaussian mixture model. In International conference on neural information processing, pp. 84–92. Springer, 2014. ",
1262
+ "bbox": [
1263
+ 173,
1264
+ 371,
1265
+ 823,
1266
+ 400
1267
+ ],
1268
+ "page_idx": 13
1269
+ },
1270
+ {
1271
+ "type": "text",
1272
+ "text": "Xi Yang, Kaizhu Huang, John Yannis Goulermas, and Rui Zhang. Joint learning of unsupervised dimensionality reduction and gaussian mixture model. Neural Processing Letters, 45(3):791–806, 2017b. ",
1273
+ "bbox": [
1274
+ 174,
1275
+ 409,
1276
+ 825,
1277
+ 450
1278
+ ],
1279
+ "page_idx": 13
1280
+ },
1281
+ {
1282
+ "type": "text",
1283
+ "text": "Shuangfei Zhai, Yu Cheng, Weining Lu, and Zhongfei Zhang. Deep structured energy based models for anomaly detection. In International Conference on Machine Learning, pp. 1100–1109, 2016. ",
1284
+ "bbox": [
1285
+ 174,
1286
+ 460,
1287
+ 823,
1288
+ 489
1289
+ ],
1290
+ "page_idx": 13
1291
+ },
1292
+ {
1293
+ "type": "text",
1294
+ "text": "C. Zhang and P. C. Woodland. Joint optimisation of tandem systems using gaussian mixture density neural network discriminative sequence training. In ICASSP, pp. 5015–5019, 2017. ",
1295
+ "bbox": [
1296
+ 173,
1297
+ 498,
1298
+ 823,
1299
+ 527
1300
+ ],
1301
+ "page_idx": 13
1302
+ },
1303
+ {
1304
+ "type": "text",
1305
+ "text": "Chong Zhou and Randy C. Paffenroth. Anomaly detection with robust deep autoencoders. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 665–674, 2017. ",
1306
+ "bbox": [
1307
+ 174,
1308
+ 535,
1309
+ 825,
1310
+ 579
1311
+ ],
1312
+ "page_idx": 13
1313
+ },
1314
+ {
1315
+ "type": "text",
1316
+ "text": "Arthur Zimek, Erich Schubert, and Hans-Peter Kriegel. A survey on unsupervised outlier detection in high-dimensional numerical data. Statistical Analysis and Data Mining, 5:363–387, 2012. ",
1317
+ "bbox": [
1318
+ 173,
1319
+ 588,
1320
+ 823,
1321
+ 617
1322
+ ],
1323
+ "page_idx": 13
1324
+ },
1325
+ {
1326
+ "type": "text",
1327
+ "text": "A BASELINE CONFIGURATION ",
1328
+ "bbox": [
1329
+ 176,
1330
+ 102,
1331
+ 439,
1332
+ 117
1333
+ ],
1334
+ "page_idx": 14
1335
+ },
1336
+ {
1337
+ "type": "text",
1338
+ "text": "OC-SVM. Unlike other baselines that only need decision thresholds in the testing phase, OC-SVM needs parameter $\\nu$ be set in the training phase. Although $\\nu$ intuitively means anomaly ratio in training data, it is non-trivial to set a reasonable $\\nu$ in the case where training data are all normal samples and anomaly ratio in the testing phase could be arbitrary. In this study, we simply perform exhaustive search to find the optimal $\\nu$ that renders the highest $F _ { 1 }$ score on individual datasets. In particular, $\\nu$ is set to be 0.1, 0.02, 0.04, and 0.1 for KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, respectively. ",
1339
+ "bbox": [
1340
+ 173,
1341
+ 172,
1342
+ 826,
1343
+ 271
1344
+ ],
1345
+ "page_idx": 14
1346
+ },
1347
+ {
1348
+ "type": "text",
1349
+ "text": "DSEBM. We use the network structure for the encoding in DAGMM as guidelines to set up DSEBM instances. For KDDCUP and KDDCUP-Rev, it is configured as FC(120, 60, softplus)-FC(60, 30, softplus)-FC(30, 10, softplus)-FC(10, 1, softplus). For Thyroid, it is FC(6, 12, softplus)-FC(12, 4, softplus)-FC(4, 1, softplus). For Arrhythmia, it is FC(274, 10, softplus)-FC(10, 2, softplus). Moreover, for KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, the numbers of epochs are 200, 20000, 10000, and 400, respectively, and the sizes of mini-batches are 1024, 1024, 128, and 1024, respectively. ",
1350
+ "bbox": [
1351
+ 173,
1352
+ 286,
1353
+ 826,
1354
+ 383
1355
+ ],
1356
+ "page_idx": 14
1357
+ },
1358
+ {
1359
+ "type": "text",
1360
+ "text": "DCN. We use the network configuration for the autoencoder in DAGMM as guidelines to set up autoencoders in DCN. For KDDCUP and KDDCUP-Rev, the structure is FC(120, 60, tanh)-FC(60, 30, tanh)-FC(30, 10, tanh)-FC(10, 1, none)-FC(1, 10, tanh)-FC(10, 30, tanh)-FC(30, 60, tanh)- FC(60, 120, none). For Thyroid, it is FC(6, 12, tanh)-FC(12, 4, tanh)-FC(4, 1, none)-FC(1, 4, tanh)-FC(4, 12, tanh)-FC(12, 6, none). For Arrhythmia, it is FC(274, 10, tanh)-FC(10, 2, none)-FC(2, 10, tanh)-FC(10, 274, none). Moreover, for KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, the numbers of epochs for per-layer pre-training are 200, 20000, 10000, and 400, respectively, the numbers of epochs for fine tuning are 200, 20000, 10000, and 400, respectively, and the sizes of mini-batches in all the training phases are 1024, 1024, 128, and 1024, respectively. ",
1361
+ "bbox": [
1362
+ 173,
1363
+ 400,
1364
+ 826,
1365
+ 525
1366
+ ],
1367
+ "page_idx": 14
1368
+ },
1369
+ {
1370
+ "type": "text",
1371
+ "text": "GMM-EN. GMM-EN also borrows the wisdom from the network configurations in DAGMM. For KDDCUP, it is FC(120, 60, tanh)-FC(60, 30, tanh)-FC(30, 10, tanh)-FC(10, 1, none)-FC(1, 10, tanh)-Drop(0.5)-FC(10, 4, softmax). For Thyroid, it is FC(6, 12, tanh)-FC(12, 4, tanh)-FC(4, 1, none)-FC(1, 10, tanh)-Drop(0.5)-FC(10, 2, softmax). For Arrhythmia, it is FC(274, 10, tanh)- FC(10, 2, none)-FC(2, 10, tanh)-Drop(0.5)-FC(10, 2, softmax). For KDDCUP-Rev, it is FC(120, 60, tanh)-FC(60, 30, tanh)-FC(30, 10, tanh)-FC(10, 1, none)-FC(1, 10, tanh)-Drop(0.5)-FC(10, 2, softmax). For KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, the numbers of epochs for training are 200, 20000, 10000, and 400, respectively, and the sizes of mini-batches are 1024, 1024, 128, and 1024, respectively. ",
1372
+ "bbox": [
1373
+ 173,
1374
+ 541,
1375
+ 826,
1376
+ 666
1377
+ ],
1378
+ "page_idx": 14
1379
+ },
1380
+ {
1381
+ "type": "text",
1382
+ "text": "PAE. PAE shares identical network structures with the autoencoder in DAGMM. For KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, the numbers of epochs for per-layer pre-training are 200, 20000, 10000, and 400, respectively, the numbers of epochs for fine tuning are 200, 20000, 10000, and 400, respectively, and the sizes of mini-batches in all the training phases are 1024, 1024, 128, and 1024, respectively. ",
1383
+ "bbox": [
1384
+ 174,
1385
+ 683,
1386
+ 826,
1387
+ 752
1388
+ ],
1389
+ "page_idx": 14
1390
+ },
1391
+ {
1392
+ "type": "text",
1393
+ "text": "E2E-AE. E2E-AE shares identical network structures with the autoencoder in DAGMM. For KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, the numbers of epochs for end-to-end training are 200, 20000, 10000, and 400, respectively, and the sizes of mini-batches are 1024, 1024, 128, and 1024, respectively. ",
1394
+ "bbox": [
1395
+ 173,
1396
+ 768,
1397
+ 825,
1398
+ 824
1399
+ ],
1400
+ "page_idx": 14
1401
+ },
1402
+ {
1403
+ "type": "text",
1404
+ "text": "PAE-GMM-EM. PAE-GMM and DAGMM share identical network configurations. For KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, the numbers of epochs for per-layer pre-training are 200, 20000, 10000, and 400, respectively, the numbers of epochs for fine tuning are 200, 20000, 10000, and 400, respectively, and the sizes of mini-batches in all the training phases are 1024, 1024, 128, and 1024, respectively. For GMM learning, the EM algorithm stops when the maximum difference of the parameters between current iteration and its previous iteration is smaller than $1 0 ^ { - 6 }$ . ",
1405
+ "bbox": [
1406
+ 174,
1407
+ 839,
1408
+ 826,
1409
+ 922
1410
+ ],
1411
+ "page_idx": 14
1412
+ },
1413
+ {
1414
+ "type": "text",
1415
+ "text": "PAE-GMM. PAE-GMM and DAGMM share identical network configurations. For KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, the numbers of epochs for per-layer pre-training are 200, 20000, 10000, and 400, respectively, the numbers of epochs for fine tuning or GMM training are 200, 20000, 10000, and 400, respectively, and the sizes of mini-batches in all the training phases are 1024, 1024, 128, and 1024, respectively. ",
1416
+ "bbox": [
1417
+ 173,
1418
+ 103,
1419
+ 826,
1420
+ 174
1421
+ ],
1422
+ "page_idx": 15
1423
+ },
1424
+ {
1425
+ "type": "text",
1426
+ "text": "DAGMM-p. DAGMM- $\\mathrm { \\bf p }$ and DAGMM share identical network configurations, but they are only different in training strategies: DAGMM adopts the strategy of end-to-end training, while DAGMM-p relies on pre-training to compression network and then joint fine-tuning. For KDDCUP, Thyroid, Arrhythmia, and KDDCUP-Rev, the numbers of epochs for per-layer pre-training are 200, 20000, 10000, and 400, respectively, the numbers of epochs for fine tuning are 200, 20000, 10000, and 400, respectively, and the sizes of mini-batches in all the training phases are 1024, 1024, 128, and 1024, respectively. ",
1427
+ "bbox": [
1428
+ 174,
1429
+ 189,
1430
+ 825,
1431
+ 286
1432
+ ],
1433
+ "page_idx": 15
1434
+ },
1435
+ {
1436
+ "type": "text",
1437
+ "text": "DAGMM-NVI. DAGMM and DAGMM-NVI share identical network configurations and training strategies as discussed in Section 4. ",
1438
+ "bbox": [
1439
+ 171,
1440
+ 303,
1441
+ 825,
1442
+ 330
1443
+ ],
1444
+ "page_idx": 15
1445
+ },
1446
+ {
1447
+ "type": "text",
1448
+ "text": "B CUMULATIVE DISTRIBUTION FUNCTION OF THE ENERGY FUNCTION LEARNED BY DAGMM ",
1449
+ "text_level": 1,
1450
+ "bbox": [
1451
+ 176,
1452
+ 361,
1453
+ 772,
1454
+ 395
1455
+ ],
1456
+ "page_idx": 15
1457
+ },
1458
+ {
1459
+ "type": "image",
1460
+ "img_path": "images/f2ae569af0c77c073ceb2478d742fec9928a3302c6d134a81f5f79f2093db204.jpg",
1461
+ "image_caption": [
1462
+ "Figure 4: The cumulative distribution functions of the energy function are learned by DAGMM on KDDCUP, Arrhythmia, Thyroid, and KDDCUP-Rev, respectively. The horizontal axis denotes the energy space, and the vertical axis denotes the percentage. "
1463
+ ],
1464
+ "image_footnote": [],
1465
+ "bbox": [
1466
+ 214,
1467
+ 434,
1468
+ 769,
1469
+ 786
1470
+ ],
1471
+ "page_idx": 15
1472
+ },
1473
+ {
1474
+ "type": "text",
1475
+ "text": "Figure 4 shows the cumulative distribution function (cdf) of the energy function learned by DAGMM on KDDCUP, Arrhythmia, Thyroid, and KDDCUP-Rev, respectively. In particular, on KDDCUP and KDDCUP-Rev, we observe rapid energy increase at around $8 0 \\%$ , and most samples whose energy is beyond the 80th percentile are true anomalous samples. ",
1476
+ "bbox": [
1477
+ 174,
1478
+ 867,
1479
+ 823,
1480
+ 924
1481
+ ],
1482
+ "page_idx": 15
1483
+ },
1484
+ {
1485
+ "type": "image",
1486
+ "img_path": "images/53e33eb6f1f337bda9595ea9a996a2ff0bf6ad37c8a124f619a170c5e6139145.jpg",
1487
+ "image_caption": [
1488
+ "Figure 5: KDDCUP samples in the reduced 1-dimensional space by DSEBM, where red points are samples from the anomaly class and blue ones are samples from the normal class "
1489
+ ],
1490
+ "image_footnote": [],
1491
+ "bbox": [
1492
+ 215,
1493
+ 146,
1494
+ 781,
1495
+ 334
1496
+ ],
1497
+ "page_idx": 16
1498
+ },
1499
+ {
1500
+ "type": "text",
1501
+ "text": "Figure 5 demonstrates the reduced 1-dimensional representation for KDDCUP samples learned by DSEBM, where Figure 5a includes all the samples and Figure 5b includes the normal samples only. As shown above, normal and anomalous samples are mixed in the range of $[ - 8 , - 7 . 8 ]$ . For samples in this range, it is difficult to use the energy derived from the latent representation to separate them. ",
1502
+ "bbox": [
1503
+ 174,
1504
+ 395,
1505
+ 825,
1506
+ 452
1507
+ ],
1508
+ "page_idx": 16
1509
+ },
1510
+ {
1511
+ "type": "text",
1512
+ "text": "D RECONSTRUCTION FEATURES IN DAGMM ",
1513
+ "text_level": 1,
1514
+ "bbox": [
1515
+ 174,
1516
+ 474,
1517
+ 565,
1518
+ 491
1519
+ ],
1520
+ "page_idx": 16
1521
+ },
1522
+ {
1523
+ "type": "text",
1524
+ "text": "In this section, we detail the discussion on reconstruction features. ",
1525
+ "bbox": [
1526
+ 174,
1527
+ 508,
1528
+ 607,
1529
+ 523
1530
+ ],
1531
+ "page_idx": 16
1532
+ },
1533
+ {
1534
+ "type": "text",
1535
+ "text": "Why reconstruction features are important? We realize the importance of reconstruction features from our investigation on a private network security dataset. In this dataset, normal samples are normal network flows, and anomalies are network flows with spoofing attack. As it is difficult to analyze the samples from their original space with 20 dimensions, we utilize deep autoencoders to perform dimension reduction. In this case, we are a little bit ambitious, and reduce dimensions from 20 to 1. In the reduced 1-dimensional space, for some of the anomalies, we are able to easily separate them from normal samples. However, for the rest, their latent representations are quite similar to the representations of the normal samples. Meanwhile, in the original space, they are actually quite different from the normal ones. Inspired by this observation, we investigate their $L _ { 2 }$ reconstruction error, and obtain the plot shown in Figure 1. In Figure 1, the red points in the top-right corner are the anomalies sharing similar representations with the normal samples in the reduced space. With the additional view from reconstruction error, it becomes easier to separate these anomalies from the normal samples. In our study, this concrete example motivates us to include reconstruction features into DAGMM. ",
1536
+ "bbox": [
1537
+ 174,
1538
+ 539,
1539
+ 825,
1540
+ 732
1541
+ ],
1542
+ "page_idx": 16
1543
+ },
1544
+ {
1545
+ "type": "text",
1546
+ "text": "What are the guidelines for reconstruction feature selection? In practice, one can select reconstruction features by the following rules. First, for an error metric used to derive a reconstruction feature, its analytical form should be continuous and differentiable. Second, the output of an error metric should be in a range of relatively small values for the ease of training the estimation network in DAGMM. In the experiment of this paper, we select cosine similarity and relative Euclidean distance based on these two rules. For cosine similarity, it is continuous and differentiable, and the range of its output is $[ - 1 , 1 ]$ . For relative Euclidean distance, it is also continuous and differentiable. Theoretically, the range of its output is $[ 0 , + \\infty )$ . On the datasets considered in the experiment, we observe that its output is usually a small positive value; therefore, we include this metric as one of the reconstruction features. ",
1547
+ "bbox": [
1548
+ 174,
1549
+ 750,
1550
+ 825,
1551
+ 888
1552
+ ],
1553
+ "page_idx": 16
1554
+ },
1555
+ {
1556
+ "type": "text",
1557
+ "text": "In sum, as long as an error metric meets the above two rules, it could serve as a candidate metric to derive a reconstruction feature for DAGMM. ",
1558
+ "bbox": [
1559
+ 174,
1560
+ 895,
1561
+ 823,
1562
+ 922
1563
+ ],
1564
+ "page_idx": 16
1565
+ },
1566
+ {
1567
+ "type": "text",
1568
+ "text": "E CASE STUDY: WHEN JOINT TRAINING OUTPERFORMS DECOUPLED TRAINING? ",
1569
+ "text_level": 1,
1570
+ "bbox": [
1571
+ 173,
1572
+ 102,
1573
+ 756,
1574
+ 135
1575
+ ],
1576
+ "page_idx": 17
1577
+ },
1578
+ {
1579
+ "type": "text",
1580
+ "text": "In this section, we perform a case study to investigate what kind of samples benefit more from the joint training applied in DAGMM over decoupled training. In the evaluation, we employ PAE-GMM as a representative for the methods that leverage decoupled training, and the following results are generated from one run on the KDDCUP dataset. ",
1581
+ "bbox": [
1582
+ 174,
1583
+ 151,
1584
+ 825,
1585
+ 207
1586
+ ],
1587
+ "page_idx": 17
1588
+ },
1589
+ {
1590
+ "type": "table",
1591
+ "img_path": "images/7ef60cc47735019dc414f87a92aee0b77d6144586f1c319c2b7a3b3309163a1c.jpg",
1592
+ "table_caption": [],
1593
+ "table_footnote": [],
1594
+ "table_body": "<table><tr><td></td><td>PAE-GMM detect</td><td>PAE-GMM miss</td></tr><tr><td>DAGMM detect</td><td>34,285</td><td>12.038</td></tr><tr><td>DAGMM miss</td><td>1,640</td><td>926</td></tr></table>",
1595
+ "bbox": [
1596
+ 323,
1597
+ 220,
1598
+ 673,
1599
+ 272
1600
+ ],
1601
+ "page_idx": 17
1602
+ },
1603
+ {
1604
+ "type": "text",
1605
+ "text": "Table 4: The comparison of anomaly detection results between DAGMM and PAE-GMM ",
1606
+ "bbox": [
1607
+ 202,
1608
+ 287,
1609
+ 792,
1610
+ 303
1611
+ ],
1612
+ "page_idx": 17
1613
+ },
1614
+ {
1615
+ "type": "text",
1616
+ "text": "Table 4 presents the comparison between DAGMM and PAE-GMM in terms of their anomaly detection results. In the testing data of this run, there are 48, 889 anomalies in total, where 34, 285 of them are detected by both techniques, 926 anomalies can be detected by neither of them, 1, 640 can only be detected by PAE-GMM, and 12, 038 of them can only be detected by DAGMM. Next, we drill deeper and investigate the commonalities of these 12, 038 anomalies that can only be detected by DAGMM. ",
1617
+ "bbox": [
1618
+ 173,
1619
+ 318,
1620
+ 826,
1621
+ 401
1622
+ ],
1623
+ "page_idx": 17
1624
+ },
1625
+ {
1626
+ "type": "text",
1627
+ "text": "Figure 6 illustrates sample distribution in the low-dimensional spaces learned by DAGMM and PAE-GMM, where Figure 6a (6b) includes all the normal samples and anomalies, Figure 6c (6d) includes all the normal samples and the anomalies detected by both techniques, and Figure 6e (6f) includes all the normal samples and the anomalies detected by DAGMM only. From Figure 6c and 6d, we observe that the anomalies of low cosine similarity and high relative Euclidean distance could be the easy ones that are captured by both techniques. For the difficult ones shown in Figure 6e and 6f, we observe that they usually have medium level of relative Euclidean distance (in the range of [1.0, 1.2] for both cases) with larger than 0.6 cosine similarity. For such anomalous samples, the model learned by PAE-GMM has difficult time to separate them from the normal samples. In addition, we also observe that the model learned by DAGMM tends to assign lower cosine similarity to such anomalies than PAE-GMM does, which also makes it easier to differentiate the anomalies from the normal samples. ",
1628
+ "bbox": [
1629
+ 174,
1630
+ 409,
1631
+ 825,
1632
+ 575
1633
+ ],
1634
+ "page_idx": 17
1635
+ },
1636
+ {
1637
+ "type": "text",
1638
+ "text": "F HOW THE HYPERPARAMETERS IN THE OBJECTIVE FUNCTION IMPACT DAGMM ",
1639
+ "text_level": 1,
1640
+ "bbox": [
1641
+ 174,
1642
+ 597,
1643
+ 777,
1644
+ 628
1645
+ ],
1646
+ "page_idx": 17
1647
+ },
1648
+ {
1649
+ "type": "text",
1650
+ "text": "As shown in Equation (7), the objective function of DAGMM includes three components: the loss function from deep autoencoder, the energy function from estimation network, and the penalty function for covariance matrices. The coefficient ratio among the three components can be characterized as $1 : \\lambda _ { 1 } : \\lambda _ { 2 }$ . In terms of $\\lambda _ { 1 }$ , a large value could make the loss function of deep autoencoder play little role in optimization so that we are unable to obtain a good reduced representation for input samples, while a small value could lead to ineffective estimation network so that GMM is not well trained. For $\\lambda _ { 2 }$ of a large value, DAGMM tends to find GMM with large covariance, which is less desirable as many samples will have high energy as rare events. For $\\lambda _ { 2 }$ of a small value, the regularization may not be strong enough to counter the singularity effect. ",
1651
+ "bbox": [
1652
+ 173,
1653
+ 643,
1654
+ 825,
1655
+ 770
1656
+ ],
1657
+ "page_idx": 17
1658
+ },
1659
+ {
1660
+ "type": "text",
1661
+ "text": "In our exploration, we find the ratio $1 : 0 . 1 : 0 . 0 0 5$ consistently delivers expected results across all the datasets in the experiment. To investigate the sensitivity of this ratio, we vary its base and see how different bases affect anomaly detection accuracy. For example, when the base is set to 2, $\\lambda _ { 1 }$ and $\\lambda _ { 2 }$ are adjusted to 0.2 and 0.01, respectively. ",
1662
+ "bbox": [
1663
+ 174,
1664
+ 776,
1665
+ 823,
1666
+ 833
1667
+ ],
1668
+ "page_idx": 17
1669
+ },
1670
+ {
1671
+ "type": "text",
1672
+ "text": "Table 5 shows the average precision, recall, and $F _ { 1 }$ score after 20 runs of DAGMM on the KDDCUP dataset. As we vary the base from 1 to 9 with step 2, DAGMM performs in a consistent way, and $\\lambda _ { 1 }$ $\\lambda _ { 2 }$ are not sensitive to the changes on the base. ",
1673
+ "bbox": [
1674
+ 174,
1675
+ 839,
1676
+ 823,
1677
+ 882
1678
+ ],
1679
+ "page_idx": 17
1680
+ },
1681
+ {
1682
+ "type": "image",
1683
+ "img_path": "images/e65557047a18c9460e3021ad775b4b67245c9a3f4276976ddf3c6a79da28c20d.jpg",
1684
+ "image_caption": [
1685
+ "Figure 6: KDDCUP samples in the learned 3-dimensional space by DAGMM and PAE-GMM, where red points are samples from anomaly class and blue ones are samples from normal class "
1686
+ ],
1687
+ "image_footnote": [],
1688
+ "bbox": [
1689
+ 207,
1690
+ 132,
1691
+ 776,
1692
+ 670
1693
+ ],
1694
+ "page_idx": 18
1695
+ },
1696
+ {
1697
+ "type": "table",
1698
+ "img_path": "images/08697fe93b8e5f7b393d77f96dd6f6dcb211a8e98ad85b04ca22cc94b599ba7b.jpg",
1699
+ "table_caption": [
1700
+ "Table 5: Sensitivity of $\\lambda _ { 1 }$ and $\\lambda _ { 2 }$ with fixed ratio $1 : 0 . 1 : 0 . 0 0 5$ on KDDCUP "
1701
+ ],
1702
+ "table_footnote": [],
1703
+ "table_body": "<table><tr><td>Base</td><td>Precision</td><td>Recall</td><td>F1</td></tr><tr><td>1</td><td>0.9298</td><td>0.9445</td><td>0.9371</td></tr><tr><td>3</td><td>0.9301</td><td>0.9442</td><td>0.9371</td></tr><tr><td>5</td><td>0.9296</td><td>0.9451</td><td>0.9373</td></tr><tr><td>7</td><td>0.9300</td><td>0.9453</td><td>0.9376</td></tr><tr><td>9</td><td>0.9300</td><td>0.9439</td><td>0.9369</td></tr></table>",
1704
+ "bbox": [
1705
+ 382,
1706
+ 773,
1707
+ 614,
1708
+ 861
1709
+ ],
1710
+ "page_idx": 18
1711
+ }
1712
+ ]
parse/train/BJJLHbb0-/BJJLHbb0-_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJJLHbb0-/BJJLHbb0-_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkXmYfbAZ/BkXmYfbAZ.md ADDED
@@ -0,0 +1,293 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # BEYOND SHARED HIERARCHIES: DEEP MULTITASK LEARNING THROUGH SOFT LAYER ORDERING
2
+
3
+ Elliot Meyerson & Risto Miikkulainen
4
+ The University of Texas at Austin and Sentient Technologies, Inc. {ekm, risto} $@$ cs.utexas.edu
5
+
6
+ # ABSTRACT
7
+
8
+ Existing deep multitask learning (MTL) approaches align layers shared between tasks in a parallel ordering. Such an organization significantly constricts the types of shared structure that can be learned. The necessity of parallel ordering for deep MTL is first tested by comparing it with permuted ordering of shared layers. The results indicate that a flexible ordering can enable more effective sharing, thus motivating the development of a soft ordering approach, which learns how shared layers are applied in different ways for different tasks. Deep MTL with soft ordering outperforms parallel ordering methods across a series of domains. These results suggest that the power of deep MTL comes from learning highly general building blocks that can be assembled to meet the demands of each task.
9
+
10
+ # 1 INTRODUCTION
11
+
12
+ In multitask learning (MTL) (Caruana, 1998), auxiliary data sets are harnessed to improve overall performance by exploiting regularities present across tasks. As deep learning has yielded state-ofthe-art systems across a range of domains, there has been increased focus on developing deep MTL techniques. Such techniques have been applied across settings such as vision (Bilen and Vedaldi, 2016; 2017; Jou and Chang, 2016; Lu et al., 2017; Misra et al., 2016; Ranjan et al., 2016; Yang and Hospedales, 2017; Zhang et al., 2014), natural language (Collobert and Weston, 2008; Dong et al., 2015; Hashimoto et al., 2016; Liu et al., 2015a; Luong et al., 2016), speech (Huang et al., 2013; 2015; Seltzer and Droppo, 2013; Wu et al., 2015), and reinforcement learning (Devin et al., 2016; Fernando et al., 2017; Jaderberg et al., 2017; Rusu et al., 2016). Although they improve performance over single-task learning in these settings, these approaches have generally been constrained to joint training of relatively few and/or closely-related tasks.
13
+
14
+ On the other hand, from a perspective of Kolmogorov complexity, “transfer should always be useful”; any pair of distributions underlying a pair of tasks must have something in common (Mahmud, 2009; Mahmud and Ray, 2008). In principle, even tasks that are “superficially unrelated” such as those in vision and NLP can benefit from sharing (even without an adaptor task, such as image captioning). In other words, for a sufficiently expressive class of models, the inductive bias of requiring a model to fit multiple tasks simultaneously should encourage learning to converge to more realistic representations. The expressivity and success of deep models suggest they are ideal candidates for improvement via MTL. So, why have existing approaches to deep MTL been so restricted in scope?
15
+
16
+ MTL is based on the assumption that learned transformations can be shared across tasks. This paper identifies an additional implicit assumption underlying existing approaches to deep MTL: this sharing takes place through parallel ordering of layers. That is, sharing between tasks occurs only at aligned levels (layers) in the feature hierarchy implied by the model architecture. This constraint limits the kind of sharing that can occur between tasks. It requires subsequences of task feature hierarchies to match, which may be difficult to establish as tasks become plentiful and diverse.
17
+
18
+ This paper investigates whether parallel ordering of layers is necessary for deep MTL. As an alternative, it introduces methods that make deep MTL more flexible. First, existing approaches are reviewed in the context of their reliance on parallel ordering. Then, as a foil to parallel ordering, permuted ordering is introduced, in which shared layers are applied in different orders for different tasks. The increased ability of permuted ordering to support integration of information across tasks is analyzed, and the results are used to develop a soft ordering approach to deep MTL. In this approach, a joint model learns how to apply shared layers in different ways at different depths for different tasks as it simultaneously learns the parameters of the layers themselves. In a suite of experiments, soft ordering is shown to improve performance over single-task learning as well as over fixed order deep MTL methods.
19
+
20
+ ![](images/9b12ec1c0f5ad83779cd8c777dc2b416ea4556beb858d6c3e5488d3d10520472.jpg)
21
+ Figure 1: Classes of existing deep multitask learning architectures. (a) Classical approaches add a task-specific decoder to the output of the core single-task model for each task; (b) Columnbased approaches include a network column for each task, and define a mechanism for sharing between columns; (c) Supervision at custom depths adds output decoders at depths based on a task hierarchy; (d) Universal representations adapts each layer with a small number of task-specific scaling parameters. Underlying each of these approaches is the assumption of parallel ordering of shared layers (Section 2.2): each one requires aligned sequences of feature extractors across tasks.
22
+
23
+ Importantly, soft ordering is not simply a technical improvement, but a new way of thinking about deep MTL. Learning a different soft ordering of layers for each task amounts to discovering a set of generalizable modules that are assembled in different ways for different tasks. This perspective points to future approaches that train a collection of layers on a set of training tasks, which can then be assembled in novel ways for future unseen tasks. Some of the most striking structural regularities observed in the natural, technological and sociological worlds are those that are repeatedly observed across settings and scales; they are ubiquitous and universal. By forcing shared transformations to occur at matching depths in hierarchical feature extraction, deep MTL falls short of capturing this sort of functional regularity. Soft ordering is thus a step towards enabling deep MTL to realize the diverse array of structural regularities found across complex tasks drawn from the real world.
24
+
25
+ # 2 PARALLEL ORDERING OF LAYERS IN DEEP MTL
26
+
27
+ This section presents a high-level classification of existing deep MTL approaches (Sec. 2.1) that is sufficient to expose the reliance of these approaches on the parallel ordering assumption (Sec. 2.2).
28
+
29
+ # 2.1 A CLASSIFICATION OF EXISTING APPROACHES TO DEEP MULTITASK LEARNING
30
+
31
+ Designing a deep MTL system requires answering the key question: How should learned parameters be shared across tasks? The landscape of existing deep MTL approaches can be organized based on how they answer this question at the joint network architecture level (Figure 1).
32
+
33
+ Classical approaches. Neural network MTL was first introduced in the case of shallow networks (Caruana, 1998), before deep networks were prevalent. The key idea was to add output neurons to predict auxiliary labels for related tasks, which would act as regularizers for the hidden representation. Many deep learning extensions remain close in nature to this approach, learning a shared representation at a high-level layer, followed by task-specific (i.e., unshared) decoders that extract labels for each task (Devin et al., 2016; Dong et al., 2015; Huang et al., 2013; 2015; Jaderberg et al., 2017; Liu et al., 2015a; Ranjan et al., 2016; Wu et al., 2015; Zhang et al., 2014) (Figure 1a). This approach can be extended to task-specific input encoders (Devin et al., 2016; Luong et al., 2016), and the underlying single-task model may be adapted to ease task integration (Ranjan et al., 2016; Wu et al., 2015), but the core network is still shared in its entirety.
34
+
35
+ Column-based approaches. Column-based approaches (Jou and Chang, 2016; Misra et al., 2016; Rusu et al., 2016; Yang and Hospedales, 2017), assign each task its own layer of task-specific parameters at each shared depth (Figure 1b). They then define a mechanism for sharing parameters between tasks at each shared depth, e.g., by having a shared tensor factor across tasks (Yang and Hospedales, 2017), or allowing some form of communication between columns (Jou and Chang,
36
+
37
+ 2016; Misra et al., 2016; Rusu et al., 2016). Observations of negative effects of sharing in columnbased methods (Rusu et al., 2016) can be attributed to mismatches between the features required at the same depth between tasks that are too dissimilar.
38
+
39
+ Supervision at custom depths. There may be an intuitive hierarchy describing how a set of tasks are related. Several approaches integrate supervised feedback from each task at levels consistent with such a hierarchy (Hashimoto et al., 2016; Toshniwal et al., 2017; Zhang and Weiss, 2016) (Figure 1c). This method can be sensitive to the design of the hierarchy (Toshniwal et al., 2017), and to which tasks are included therein (Hashimoto et al., 2016). One approach learns a task-relationship hierarchy during training (Lu et al., 2017), though learned parameters are still only shared across matching depths. Supervision at custom depths has also been extended to include explicit recurrence that reintegrates information from earlier predictions (Bilen and Vedaldi, 2016; Zamir et al., 2016). Although these recurrent methods still rely on pre-defined hierarchical relationships between tasks, they provide evidence of the potential of learning transformations that have a different function for different tasks at different depths, i.e., in this case, at different depths unrolled in time.
40
+
41
+ Universal representations. One approach shares all core model parameters except batch normalization scaling factors (Bilen and Vedaldi, 2017) (Figure 1d). When the number of classes is equal across tasks, even output layers can be shared, and the small number of task-specific parameters enables strong performance to be maintained. This method was applied to a diverse array of vision tasks, demonstrating the power of a small number of scaling parameters in adapting layer functionality for different tasks. This observation helps to motivate the method developed in Section 3.
42
+
43
+ # 2.2 THE PARALLEL ORDERING ASSUMPTION
44
+
45
+ A common interpretation of deep learning is that layers extract progressively higher level features at later depths (Lecun et al., 2015). A natural assumption is then that the learned transformations that extract these features are also tied to the depth at which they are learned. The core assumption motivating MTL is that regularities across tasks will result in learned transformations that can be leveraged to improve generalization. However, the methods reviewed in Section 2.1 add the further assumption that subsequences of the feature hierarchy align across tasks and sharing between tasks occurs only at aligned depths (Figure 1); we call this the parallel ordering assumption.
46
+
47
+ Consider $T$ tasks $t _ { 1 } , \dots , t _ { T }$ to be learned jointly, with each $t _ { i }$ associated with a model $y _ { i } = \mathcal { F } _ { i } ( x _ { i } )$ . Suppose sharing across tasks occurs at $D$ consecutive depths. Let $\mathcal { E } _ { i }$ $( \mathcal { D } _ { i } )$ be $t _ { i }$ ’s task-specific encoder (decoder) to (from) the core sharable portion of the network from its inputs (to its outputs). Let $W _ { k } ^ { i }$ be the layer of learned weights (e.g., affine or convolutional) for task $i$ at shared depth $k$ , with $\phi _ { k }$ an optional nonlinearity. The parallel ordering assumption implies
48
+
49
+ $$
50
+ y _ { i } = \left( \mathcal { D } _ { i } \circ \phi _ { D } \circ W _ { D } ^ { i } \circ \phi _ { D - 1 } \circ W _ { D - 1 } ^ { i } \circ \hdots \circ \phi _ { 1 } \circ W _ { 1 } ^ { i } \circ \mathcal { E } _ { i } \right) ( x _ { i } ) , \mathrm { w i t h } W _ { k } ^ { i } \approx W _ { k } ^ { j } \forall ( i , j , k ) .
51
+ $$
52
+
53
+ The approximate equality $\ " \approx \ "$ means that at each shared depth the applied weight tensors for each task are similar and compatible for sharing. For example, learned parameters may be shared across all $W _ { k } ^ { i }$ for a given $k$ , but not between $W _ { k } ^ { i }$ and $W _ { l } ^ { j }$ for any $k \neq l$ . For closely-related tasks, this assumption may be a reasonable constraint. However, as more tasks are added to a joint model, it may be more difficult for each layer to represent features of its given depth for all tasks. Furthermore, for very distant tasks, it may be unreasonable to expect that task feature hierarchies match up at all, even if the tasks are related intuitively. The conjecture explored in this paper is that parallel ordering limits the potential of deep MTL by the strong constraint it enforces on the use of each layer.
54
+
55
+ # 3 DEEP MULTITASK LEARNING WITH SOFT ORDERING OF LAYERS
56
+
57
+ Now that parallel ordering has been identified as a constricting feature of deep MTL approaches, its necessity can be tested, and the resulting observations can be used to develop more flexible methods.
58
+
59
+ 3.1 A FOIL FOR THE PARALLEL ORDERING ASSUMPTION: PERMUTING SHARED LAYERS
60
+
61
+ Consider the most common deep MTL setting: hard-sharing of layers, where each layer in $\{ W _ { k } \} _ { k = 1 } ^ { D }$ is shared in its entirety across all tasks. The baseline deep MTL model for each task $t _ { i }$ is given by
62
+
63
+ $$
64
+ y _ { i } = ( { \mathcal { D } } _ { i } \circ \phi _ { D } \circ W _ { D } \circ \phi _ { D - 1 } \circ W _ { D - 1 } \circ \dots \circ \phi _ { 1 } \circ W _ { 1 } \circ { \mathcal { E } } _ { i } ) ( x _ { i } ) .
65
+ $$
66
+
67
+ ![](images/18d0d580e527b38db1746dbbc59e20f9b3e1651f75947f3541ac1a077477e868.jpg)
68
+ Figure 2: Fitting two random tasks. (a) The dotted lines show that permuted ordering fits $n$ samples as well as parallel fits $n / 2$ for linear networks; (b) For ReLU networks, permuted ordering enjoys a similar advantage. Thus, permuted ordering of shared layers eases integration of information across disparate tasks.
69
+
70
+ This setup satisfies the parallel ordering assumption. Consider now an alternative scheme, equivalent to the above, except with learned layers applied in different orders for different task. That is,
71
+
72
+ $$
73
+ y _ { i } = \big ( \mathscr { D } _ { i } \circ \phi _ { D } \circ W _ { \rho _ { i } ( D ) } \circ \phi _ { D - 1 } \circ W _ { \rho _ { i } ( D - 1 ) } \circ \dots \circ \phi _ { 1 } \circ W _ { \rho _ { i } ( 1 ) } \circ \mathcal { E } _ { i } \big ) \big ( x _ { i } \big ) ,
74
+ $$
75
+
76
+ where $\rho _ { i }$ is a task-specific permutation of size $D$ , and $\rho _ { i }$ is fixed before training. If there are sets of tasks for which joint training of the model defined by Eq. 3 achieves similar or improved performance over Eq. 2, then parallel ordering is not a necessary requirement for deep MTL. Of course, in this formulation, it is required that the $W _ { k }$ can be applied in any order. See Section 6 for examples of possible generalizations.
77
+
78
+ Note that this multitask permuted ordering differs from an approach of training layers in multiple orders for a single task. The single-task case results in a model with increased commutativity between layers, a behavior that has also been observed in residual networks (Veit et al., 2016), whereas here the result is a set of layers that are assembled in different ways for different tasks.
79
+
80
+ # 3.2 THE INCREASED EXPRESSIVITY OF PERMUTED ORDERING
81
+
82
+ Fitting tasks of random patterns. Permuted ordering is evaluated by comparing it to parallel ordering on a set of tasks. Randomly generated tasks (similar to (Kirkpatrick et al., 2017)) are the most disparate possible tasks, in that they share minimal information, and thus help build intuition for how permuting layers could help integrate information in broad settings. The following experiments investigate how accurately a model can jointly fit two tasks of $n$ samples. The data set for task $t _ { i }$ is $\{ ( x _ { i j } , y _ { i j } ) \} _ { j = 1 } ^ { n }$ , with each $x _ { i j }$ drawn uniformly from $[ 0 , 1 ] ^ { m }$ , and each $y _ { i j }$ drawn uniformly from $\{ 0 , 1 \}$ . There are two shared learned affine layers $W _ { k } : \mathbb { R } ^ { m } \mathbb { R } ^ { m }$ . The models with permuted ordering (Eq. 3) are given by
83
+
84
+ $$
85
+ y _ { 1 } = ( O \circ \phi \circ W _ { 2 } \circ \phi \circ W _ { 1 } ) ( x _ { 1 } ) { \mathrm { ~ a n d ~ } } y _ { 2 } = ( O \circ \phi \circ W _ { 1 } \circ \phi \circ W _ { 2 } ) ( x _ { 2 } ) ,
86
+ $$
87
+
88
+ where $O$ is a final shared classification layer. The reference parallel ordering models are defined identically, but with $W _ { k }$ in the same order for both tasks. Note that fitting the parallel model with $n$ samples is equivalent to a single-task model with $2 n$ . In the first experiment, $m \ : = \ : 1 2 8$ and $\phi = I$ . Although adding depth does not add expressivity in the single-task linear case, it is useful for examining the effects of permuted ordering, and deep linear networks are known to share properties with nonlinear networks (Saxe et al., 2013). In the second experiment, $m = 1 6$ and $\phi = \mathrm { R e L U }$ .
89
+
90
+ The results are shown in Figure 2. Remarkably, in the linear case, permuted ordering of shared layers does not lose accuracy compared to the single-task case. A similar gap in performance is seen in the nonlinear case, indicating that this behavior extends to more powerful models. Thus, the learned permuted layers are able to successfully adapt to their different orderings in different tasks.
91
+
92
+ Looking at conditions that make this result possible can shed further light on this behavior. For instance, consider $T$ tasks $t _ { 1 } , \dots , t _ { T }$ , with input and output size both $m$ , and optimal linear solutions $F _ { 1 } , \ldots , F _ { T }$ , respectively. Let $F _ { 1 } , \dots , F _ { T }$ be $m \times m$ matrices, and suppose there exist matrices
93
+
94
+ ![](images/37be84aa7f5a2e6f13e16f2ad46a4a5144deab0453ab219808c5e18d87231462.jpg)
95
+ Figure 3: Soft ordering of shared layers. Sample soft ordering network with three shared layers. Soft ordering (Eq. 7) generalizes Eqs. 2 and 3, by learning a tensor $S$ of task-specific scaling parameters. $S$ is learned jointly with the $F _ { j }$ , to allow flexible sharing across tasks and depths. The $F _ { j }$ in this figure each include a shared weight layer and any nonlinearity. This architecture enables the learning of layers that are used in different ways at different depths for different tasks.
96
+
97
+ $G _ { 1 } , \ldots , G _ { T }$ such that $F _ { i } = G _ { i } G _ { ( i + 1 \bmod T ) } \dots G _ { ( i - 1 \bmod T ) } \forall i$ . Then, because the matrix trace is invariant under cyclic permutations, the constraint arises that
98
+
99
+ $$
100
+ \operatorname { t r } ( F _ { 1 } ) = \operatorname { t r } ( F _ { 2 } ) = . . . = \operatorname { t r } ( F _ { T } ) .
101
+ $$
102
+
103
+ In the case of random matrices induced by the random tasks above, the traces of the $F _ { i }$ are all equal in expectation and concentrate well as their dimensionality increases. So, the restrictive effect of Eq. 5 on the expressivity of permuted ordering here is negligible.
104
+
105
+ Adding a small number of task-specific scaling parameters. Of course, real world tasks are generally much more structured than random ones, so such reliable expressivity of permuted ordering might not always be expected. However, adding a small number of task-specific scaling parameters can help adapt learned layers to particular tasks. This observation has been previously exploited in the parallel ordering setting, for learning task-specific batch normalization scaling parameters (Bilen and Vedaldi, 2017) and controlling communication between columns (Misra et al., 2016). Similarly, in the permuted ordering setting, the constraint induced by Eq. 5 can be reduced by adding task-specific scalars $\{ s _ { i } \} _ { i = 2 } ^ { T }$ such that $F _ { i } = s _ { i } G _ { i } G _ { ( i + 1 \bmod T ) } \dots G _ { ( i - 1 \bmod T ) }$ , and $s _ { 1 } = 1$ . The constraint given by Eq. 5 then reduces to
106
+
107
+ $$
108
+ \mathrm { t r } \big ( F _ { i } / { } s _ { i } \big ) = \mathrm { t r } \big ( F _ { i + 1 } / { } s _ { i + 1 } \big ) \forall 1 \leq i < T \implies s _ { i + 1 } = s _ { i } \big ( \mathrm { t r } ( F _ { i + 1 } ) \big / \mathrm { t r } ( F _ { i } ) \big ) ,
109
+ $$
110
+
111
+ which are defined when $\mathrm { t r } ( F _ { i } ) \ne 0 \forall i < T$ . Importantly, the number of task-specific parameters does not depend on $m$ , which is useful for scalability as well as encouraging maximal sharing between tasks. The idea of using a small number of task-specific scaling parameters is incorporated in the soft ordering approach introduced in the next section.
112
+
113
+ # 3.3 SOFT ORDERING OF SHARED LAYERS
114
+
115
+ Permuted ordering tests the parallel ordering assumption, but still fixes an a priori layer ordering for each task before training. Here, a more flexible soft ordering approach is introduced, which allows jointly trained models to learn how layers are applied while simultaneously learning the layers themselves. Consider again a core network of depth $D$ with layers $W _ { 1 } , \ldots , W _ { D }$ learned and shared across tasks. The soft ordering model for task $t _ { i }$ is defined as follows:
116
+
117
+ $$
118
+ y _ { i } ^ { k } = \sum _ { j = 1 } ^ { D } s _ { ( i , j , k ) } ( \phi _ { k } [ W _ { j } ( y _ { i } ^ { k - 1 } ) ] ) , \mathrm { ~ w i t h ~ } \sum _ { j = 1 } ^ { D } s _ { ( i , j , k ) } = 1 \forall ( i , k ) ,
119
+ $$
120
+
121
+ where $y _ { i } ^ { 0 } = \mathcal { E } _ { i } ( x _ { i } )$ , $y _ { i } = \mathcal { D } _ { i } ( y _ { i } ^ { D } )$ , and each $s _ { ( i , j , k ) }$ is drawn from $S$ : a tensor of learned scales for each task $t _ { i }$ for each layer $W _ { j }$ at each depth $k$ . Figure 3 shows an example of a resulting depth three model. Motivated by Section 3.2 and previous work (Misra et al., 2016), $S$ adds only $D ^ { 2 }$ scaling parameters per task, which is notably not a function of the size of any $W _ { j }$ . The constraint that all $s _ { ( i , j , k ) }$ sum to 1 for any $( i , k )$ is implemented via softmax, and emphasizes the idea that a soft ordering is what is being learned; in particular, this formulation subsumes any fixed layer ordering $\rho _ { i }$ by $s _ { ( i , \rho _ { i } ( k ) , k ) } = 1 \bar { \forall } ( i , k )$ . $S$ can be learned jointly with the other learnable parameters in the $W _ { k }$ , $\mathcal { E } _ { i }$ , and $\mathcal { D } _ { i }$ via backpropagation. In training, all $s _ { ( i , j , k ) }$ are initialized with equal values, to reduce initial bias of layer function across tasks. It is also helpful to apply dropout after each shared layer. Aside from its usual benefits (Srivastava et al., 2014), dropout has been shown to be useful in increasing the generalization capacity of shared representations (Devin et al., 2016). Since the trained layers in Eq. 7 are used for different tasks and in different locations, dropout makes them more robust to supporting different functionalities. These ideas are tested empirically on the MNIST, UCI, Omniglot, and CelebA data sets in the next section.
122
+
123
+ # 4 EMPIRICAL EVALUATION OF SOFT LAYER ORDERING
124
+
125
+ These experiments evaluate soft ordering against fixed ordering MTL and single-task learning. The first experiment applies them to intuitively related MNIST tasks, the second to “superficially unrelated” UCI tasks, the third to the real-world problem of Omniglot character recognition, and the fourth to large-scale facial attribute recognition. In each experiment, single task, parallel ordering (Eq. 2), permuted ordering (Eq. 3), and soft ordering (Eq. 7) train an equivalent set of core layers. In permuted ordering, the order of layers were randomly generated for each task each trial. See Appendix A for additional details, including additional details specific to each experiment.
126
+
127
+ 4.1 DISENTANGLING RELATED TASKS: MNIST DIGIT $^ 1$ -VS.-DIGIT $^ 2$ BINARY CLASSIFICATION
128
+
129
+ This experiment evaluates the ability of multitask methods to exploit tasks that are intuitively related, but have disparate input representations. Binary classification problems derived from the MNIST hand-written digit dataset are a common test bed for evaluating deep learning methods that require multiple tasks (Fernando et al., 2017; Kirkpatrick et al., 2017; Yang and Hospedales, 2017). Here, the goal of each task is to distinguish between two distinct randomly selected digits. To create initial dissimilarity across tasks that multitask models must disentangle, each $\mathcal { E } _ { i }$ is a random frozen fullyconnected ReLU layer with output size 64. There are four core layers, each a fully-connected ReLU layer with 64 units. Each $\mathcal { D } _ { i }$ is an unshared dense layer with a single sigmoid classification output.
130
+
131
+ ![](images/be1ea50055988d5088c4103bfcec74edb6832241175098b4dc3e6efbf807bb82.jpg)
132
+ Figure 4: MNIST results. (a) Relative performance of permuted and soft ordering compared to parallel ordering improves as the number of tasks increases, showing how flexibility of order can help in scaling to more tasks. Note that cost savings of multitask over single task models in terms of number of trainable parameters scales linearly with the number of tasks. For a representative two-task soft order experiment (b) the layer-wise distance between scalings of the tasks increases by iteration, and (c) the scalings move towards a hard ordering. (d) The final learned relative scale of each shared layer at each depth for each task is indicated by shading, with the strongest path drawn, showing that a distinct soft order is learned for each task (• marks the shared model boundary).
133
+
134
+ Results are shown in Figure 4. The relative performance of permuted ordering and soft ordering compared to parallel ordering increases with the number of tasks trained jointly (Figure 4a), showing how flexibility of order can help in scaling to more tasks. This result is consistent with the hypothesis that parallel ordering has increased negative effects as the number of tasks increases. Figure 4bd show what soft ordering actually learns: The scalings for tasks diverge as layers specialize to different functions for different tasks.
135
+
136
+ Figure 5: UCI data sets and results. (a) The ten UCI tasks used in joint training; the varying types of problems and dataset characteristics show the diversity of this set of tasks. (b) Mean test error over all ten tasks by iteration. Permuted and parallel order show no improvement after the first 1000 iterations, while soft order decisively outperforms the other methods.
137
+
138
+ <table><tr><td>Dataset</td><td>Input Features</td><td>Output classes</td><td>Samples</td></tr><tr><td>Australian credit</td><td>14</td><td>2</td><td>690</td></tr><tr><td>Breast cancer</td><td>30</td><td>2</td><td>569</td></tr><tr><td>Ecoli</td><td>7</td><td>8</td><td>336</td></tr><tr><td>German credit</td><td>24</td><td>2</td><td>1000</td></tr><tr><td>Heart disease</td><td>13</td><td>5</td><td>303</td></tr><tr><td>Hepatitis</td><td>19</td><td>2</td><td>155</td></tr><tr><td>Iris</td><td>4</td><td>3</td><td>150</td></tr><tr><td>Pima diabetes</td><td>8</td><td>2</td><td>768</td></tr><tr><td>Wine</td><td>13</td><td>3</td><td>178</td></tr><tr><td>Yeast</td><td>8</td><td>10</td><td>1484</td></tr></table>
139
+
140
+ ![](images/5500de8ff21b0ce07d1f224a6029810c53d475eb180bc037d711a660e64ecfba.jpg)
141
+
142
+ 4.2 SUPERIFICALLY UNRELATED TASKS: JOINT TRAINING OF TEN POPULAR UCI DATASETS
143
+
144
+ The next experiment evaluates the ability of soft ordering to integrate information across a diverse set of “superficially unrelated” tasks (Mahmud and Ray, 2008), i.e., tasks with no immediate intuition for how they may be related. Ten tasks are taken from some of most popular UCI classification data sets (Lichman, 2013). Descriptions of these tasks are given in Figure 5a. Inputs and outputs have no a priori shared meaning across tasks. Each $\mathcal { E } _ { i }$ is a learned fully-connected ReLU layer with output size 32. There are four core layers, each a fully-connected ReLU layer with 32 units. Each $\mathcal { D } _ { i }$ is an unshared dense softmax layer for the given number of classes. The results in Figure 5(b) show that, while parallel and permuted show no improvement in error after the first 1000 iterations, soft ordering significantly outperforms the other methods. With this flexible layer ordering, the model is eventually able to exploit significant regularities underlying these seemingly disparate domains.
145
+
146
+ # 4.3 EXTENSION TO CONVOLUTIONS: MULTI-ALPHABET CHARACTER RECOGNITION
147
+
148
+ The Omniglot dataset (Lake et al., 2015) consists of fifty alphabets, each of which induces a different character recognition task. Deep MTL approaches have recently shown promise on this dataset (Yang and Hospedales, 2017). It is a useful benchmark for MTL because the large number of tasks allows analysis of performance as a function of the number of tasks trained jointly, and there is clear intuition for how knowledge of some alphabets will increase the ability to learn others. Omniglot is also a good setting for evaluating the ability of soft ordering to learn how to compose layers in different ways for different tasks: it was developed as a problem with inherent composibility, e.g., similar kinds of strokes are applied in different ways to draw characters from different alphabets (Lake et al., 2015). Consequently, it has been used as a test bed for deep generative models (Rezende et al., 2016). To evaluate performance for a given number of tasks $T$ , a single random ordering of tasks was created, from which the first $T$ tasks are considered. Train/test splits are created in the same way as previous work (Yang and Hospedales, 2017), using $10 \%$ or $20 \%$ of data for testing.
149
+
150
+ This experiment is a scale-up of the previous experiments in that it evaluates soft ordering of convolutional layers. The models are made as close as possible in architecture to previous work (Yang and Hospedales, 2017), while allowing soft ordering to be applied. There are four core layers, each convolutional followed by max pooling. $\mathcal { E } _ { i } ( x _ { i } ) = x _ { i } \forall i$ , and each $\mathcal { D } _ { i }$ is a fully-connected softmax layer with output size equal to the number of classes. The results show that soft ordering is able to consistently outperform other deep MTL approaches (Figure 6). The improvements are robust to the number of tasks (Figure 6a) and the amount of training data (Figure 6c), suggesting that soft ordering, not task complexity or model complexity, is responsible for the improvement.
151
+
152
+ Permuted ordering performs significantly worse than parallel ordering in this domain. This is not surprising, as deep vision systems are known to induce a common feature hierarchy, especially within the first couple of layers (Lee et al., 2008; Lecun et al., 2015). Parallel ordering has this hierarchy built in; for permuted ordering it is more difficult to exploit. However, the existence of this feature hierarchy does not preclude the possibility that the functions (i.e., layers) used to produce the hierarchy may be useful in other contexts. Soft ordering allows the discovery of such uses. Figure 6b shows how each layer is used more or less at different depths. The soft ordering model learns a “soft hierarchy” of layers, in which each layer has a distribution of increased or decreased usage at each depth. In this case, the usage of each layer is correlated (or inversely correlated) with depth. For instance, the usage of Layer 3 decreases as the depth increases, suggesting that its primary purpose is low-level feature extraction, though it is still sees substantial use in deeper contexts. Section 5 describes an experiment that further investigates the behavior of a single layer in different contexts.
153
+
154
+ ![](images/bfd065f8c6423bb009328ca630d4ab1d8a26e919da9bc074084e1621dabdf36f.jpg)
155
+ Figure 6: Omniglot results. (a) Error by number of tasks trained jointly. Soft ordering significantly outperforms single task and both fixed ordering approaches for each number of tasks; (b) Distribution of learned layer usage by depth across all 50 tasks for a soft order run. The usage of each layer is correlated (or inversely correlated) with depth. This coincides with the understanding that there is some innate hierarchy in convolutional networks, which soft ordering is able to discover. For instance, the usage of Layer 3 decreases as the depth increases, suggesting that its primary purpose is low-level feature extraction, though it is still sees substantial use in deeper contexts; (c) Errors with all 50 tasks for different training set sizes. The first five methods are previous deep MTL results (Yang and Hospedales, 2017), which use multitask tensor factorization methods in a shared parallel ordering. Soft ordering significantly outperforms the other approaches, showing the approach scales to real-world tasks requiring specialized components such as convolutional layers.
156
+
157
+ 4.4 LARGE-SCALE APPLICATION: FACIAL ATTRIBUTE RECOGNITION
158
+
159
+ Although facial attributes are all high-level concepts, they do not intuitively exist at the same level of a shared hierarchy (even one that is learned; Lu et al., 2017). Rather, these concepts are related in multiple subtle and overlapping ways in semantic space. This experiment investigates how a soft ordering approach, as a component in a larger system, can exploit these relationships.
160
+
161
+ The CelebA dataset consists of ${ \approx } 2 0 0 \mathrm { K }$ $1 7 8 \times 2 1 8$ color images, each with binary labels for 40 facial attributes (Liu et al., 2015b). In this experiment, each label defines a task, and parallel and soft order models are based on a ResNet-50 vision model (He et al., 2016), which has also been used in recent state-of-the-art approaches to CelebA (Günther et al., 2017; He et al., 2017). Let $\mathcal { E } _ { i }$ be a ResNet-50 model truncated to the final average pooling layer, followed by a linear layer projecting the embedding to size 256. $\mathcal { E } _ { i }$ is shared across all tasks. There are four core layers, each a dense ReLU layer with 256 units. Each $\mathcal { D } _ { i }$ is an unshared dense sigmoid layer. Parallel ordering and soft ordering models were compared. To further test the robustness of learning, models were trained with and without the inclusion of an additional facial landmark detection regression task. Soft order models were also tested with and without the inclusion of a fixed identity layer at each depth. The identity layer can increase consistency of representation across contexts, which can ease learning of each layer, while also allowing soft ordering to tune how much total non-identity transformation to use for each individual task. This is especially relevant for the case of attributes, since different tasks can have different levels of complexity and abstraction.
162
+
163
+ The results are given in Figure 7c. Existing work that used a ResNet-50 vision model showed that using a parallel order multitask model improved test error over single-task learning from 10.37 to 9.58 (He et al., 2017). With our faster training strategy and the added core layers, our parallel ordering model achieves a test error of 10.21. The soft ordering model yielded a substantial improvement beyond this to 8.79, demonstrating that soft ordering can add value to a larger deep learning system. Including landmark detection yielded a marginal improvement to 8.75, while for parallel ordering it degraded performance slightly, indicating that soft ordering is more robust to joint training of diverse kinds of tasks. Including the identity layer improved performance to 8.64, though with both the landmark detection and the identity layer this improvement was slightly diminished. One explanation for this degredation is that the added flexibility provided by the identity layer offsets the regularization provided by landmark detection. Note that previous work has shown that adaptive weighting of task loss (He et al., 2017; Rudd et al., 2016), data augmentation and ensembling (Günther et al., 2017), and a larger underlying vision model (Lu et al., 2017) each can also yield significant improvements. Aside from soft ordering, none of these improvements alter the multitask topology, so their benefits are expected to be complementary to that of soft ordering demonstrated in this experiment. By coupling them with soft ordering, greater improvements should be possible.
164
+
165
+ ![](images/5a71757820af176e6415d72244b5e789480cc38d7c7799bc29e599a8f79fd31f.jpg)
166
+ Figure 7: CelebA results. Layer usage by depth (a) without and (b) with inclusion of the identity layer. In both cases, layers with lower usage at lower depths have higher usage at higher depths, and vice versa. The identity layer almost always sees increased usage; its application can increase consistency of representation across contexts. (c) Soft order models achieve a significant improvement over parallel ordering, and receive a boost from including the identity layer. The first two rows are previous work with ResNet-50 that show their baseline improvement from single task to multitask.
167
+
168
+ <table><tr><td>Deep MTL method</td><td>Test Error %</td></tr><tr><td>Single Task (He et al.,2017)</td><td>10.37</td></tr><tr><td>MTL Baseline (He et al.,2017)</td><td>9.58</td></tr><tr><td>Parallel Order</td><td>10.21</td></tr><tr><td>Parallel Order + Landmarks</td><td>10.29</td></tr><tr><td>Soft Order</td><td>8.79</td></tr><tr><td>Soft Order + Landmarks</td><td>8.75</td></tr><tr><td>Soft Order + Identity</td><td>8.64</td></tr><tr><td>Soft Order + Landmarks + Identity</td><td>8.68</td></tr></table>
169
+
170
+ Figures 7a-b characterize the usage of each layer learned by soft order models. Like in the case of Omniglot, layers that are used less at lower depths are used more at higher depths, and vice versa, giving further evidence that the models learn a “soft hierarchy” of layer usage. When the identity layer is included, its usage is almost always increased through training, as it allows the model to use smaller specialized proportions of nonlinear structure for each individual task.
171
+
172
+ # 5 VISUALIZING THE BEHAVIOR OF SOFT ORDERING LAYERS
173
+
174
+ The success of soft layer ordering suggests that layers learn functional primitives with similar effects in different contexts. To explore this idea qualitatively, the following experiment uses generative visual tasks. The goal of each task is to learn a function $( x , y ) \to v$ , where $( x , y )$ is a pixel coordinate and $v$ is a brightness value, all normalized to [0, 1]. Each task is defined by a single image of a “4” drawn from the MNIST dataset; all of its pixels are used as training data. Ten tasks are trained using soft ordering with four shared dense ReLU layers of 100 units each. $\mathcal { E } _ { i }$ is a linear encoder that is shared across tasks, and $\mathcal { D } _ { i }$ is a global average pooling decoder. Thus, task models are distinguished completely by their learned soft ordering scaling parameters $s _ { t }$ . To visualize the behavior of layer $l$ at depth $d$ for task $t$ , the predicted image for task $t$ is generated across varying magnitudes of $\mathbf { \sigma } ^ { s } ( t , l , d ) \cdot$ . The results for the first two tasks and the first layer are shown in Table 1. Similar function is observed in each of the six contexts, suggesting that the layers indeed learn functional primitives.
175
+
176
+ ![](images/850e349ffb192a29d5b3083a0953bce9d02e9cbf83bfa99d956e730ace5670ed.jpg)
177
+ Table 1: Example behavior of a soft order layer. For each task $t$ , and at each depth $d$ , the effect of increasing the activation of of this particular layer is to expand the left side of the $" 4 "$ in a manner appropriate to the functional context (e.g., the magnitude of the effect decreases with depth). Results for other layers are similar, suggesting that the layers implement functional primitives.
178
+
179
+ # 6 DISCUSSION AND FUTURE WORK
180
+
181
+ In the interest of clarity, the soft ordering approach in this paper was developed as a relatively small step away from the parallel ordering assumption. To develop more practical and specialized methods, inspiration can be taken from recurrent architectures, the approach can be extended to layers of more general structure, and applied to training and understanding general functional building blocks.
182
+
183
+ Connections to recurrent architectures. Eq. 7 is defined recursively with respect to the learned layers shared across tasks. Thus, the soft-ordering architecture can be viewed as a new type of recurrent architecture designed specifically for MTL. From this perspective, Figure 3 shows an unrolling of a soft layer module: different scaling parameters are applied at different depths when unrolled for different tasks. Since the type of recurrence induced by soft ordering does not require task input or output to be sequential, methods that use recurrence in such a setting are of particular interest (Liang and Hu, 2015; Liao and Poggio, 2016; Pinheiro and Collobert, 2014; Socher et al., 2011; Zamir et al., 2016). Recurrent methods can also be used to reduce the size of $S$ below $O ( T D ^ { 2 } )$ , e.g., via recurrent hypernetworks (Ha et al., 2016). Finally, Section 4 demonstrated soft ordering where shared learned layers were fully-connected or convolutional; it is also straightforward to extend soft ordering to shared layers with internal recurrence, such as LSTMs (Hochreiter and Schmidhuber, 1997). In this setting, soft ordering can be viewed as inducing a higher-level recurrence.
184
+
185
+ Generalizing the structure of shared layers. For clarity, in this paper all core layers in a given setup had the same shape. Of course, it would be useful to have a generalization of soft ordering that could subsume any modern deep architecture with many layers of varying structure. As given by Eq. 7, soft ordering requires the same shape inputs to the element-wise sum at each depth. Reshapes and/or resampling can be added as adapters between tensors of different shape; alternatively, a function other than a sum could be used. For example, instead of learning a weighting across layers at each depth, a probability of applying each module could be learned in a manner similar to adaptive dropout (Ba and Frey, 2013; Li et al., 2016) or a sparsely-gated mixture of experts (Shazeer et al., 2017). Furthermore, the idea of a soft ordering of layers can be extended to soft ordering over modules with more general structure, which may more succinctly capture recurring modularity.
186
+
187
+ Training generalizable building blocks. Because they are used in different ways at different locations for different tasks, the shared trained layers in permuted and soft ordering have learned more general functionality than layers trained in a fixed location or for a single task. A natural hypothesis is that they are then more likely to generalize to future unseen tasks, perhaps even without further training. This ability would be especially useful in the small data regime, where the number of trainable parameters should be limited. For example, given a collection of these layers trained on a previous set of tasks, a model for a new task could learn how to apply these building blocks, e.g., by learning a soft order, while keeping their internal parameters fixed. Learning an efficient set of such generalizable layers would then be akin to learning a set of functional primitives. Such functional modularity and repetition is evident in the natural, technological and sociological worlds, so such a set of functional primitives may align well with complex real-world models. This perspective is related to recent work in reusing modules in the parallel ordering setting (Fernando et al., 2017). The different ways in which different tasks learn to use the same set of modules can also help shed light on how tasks are related, especially those that seem superficially disparate (e.g., by extending the analysis performed for Figure 4d), thus assisting in the discovery of real-world regularities.
188
+
189
+ # 7 CONCLUSION
190
+
191
+ This paper has identified parallel ordering of shared layers as a common assumption underlying existing deep MTL approaches. This assumption restricts the kinds of shared structure that can be learned between tasks. Experiments demonstrate how direct approaches to removing this assumption can ease the integration of information across plentiful and diverse tasks. Soft ordering is introduced as a method for learning how to apply layers in different ways at different depths for different tasks, while simultaneously learning the layers themselves. Soft ordering is shown to outperform parallel ordering methods as well as single-task learning across a suite of domains. These results show that deep MTL can be improved while generating a compact set of multipurpose functional primitives, thus aligning more closely with our understanding of complex real-world processes.
192
+
193
+ # ACKNOWLEDGMENTS
194
+
195
+ We would like to thank Matt Feiszli for valuable discussions and all anonymous reviewers for their helpful feedback.
196
+
197
+ # REFERENCES
198
+
199
+ M. Abadi, A. Agarwal, P. Barham, E. Brevdo, Z. Chen, C. Citro, G. S. Corrado, A. Davis, J. Dean, M. Devin, S. Ghemawat, I. Goodfellow, A. Harp, G. Irving, M. Isard, Y. Jia, R. Jozefowicz, L. Kaiser, M. Kudlur, J. Levenberg, D. Mané, R. Monga, S. Moore, D. Murray, C. Olah, M. Schuster, J. Shlens, B. Steiner, I. Sutskever, K. Talwar, P. Tucker, V. Vanhoucke, V. Vasudevan, F. Viégas, O. Vinyals, P. Warden, M. Wattenberg, M. Wicke, Y. Yu, and X. Zheng. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. URL http://tensorflow.org/. Software available from tensorflow.org.
200
+ J. Ba and B. Frey. Adaptive dropout for training deep neural networks. In NIPS, pages 3084–3092. 2013.
201
+ H. Bilen and A. Vedaldi. Integrated perception with recurrent multi-task neural networks. In NIPS, pages 235–243. 2016.
202
+ H. Bilen and A. Vedaldi. Universal representations: The missing link between faces, text, planktons, and cat breeds. CoRR, abs/1701.07275, 2017.
203
+ R. Caruana. Multitask learning. In Learning to learn, pages 95–133. Springer US, 1998.
204
+ F. Chollet et al. Keras, 2015.
205
+ R. Collobert and J. Weston. A unified architecture for natural language processing: Deep neural networks with multitask learning. In ICML, pages 160–167, 2008.
206
+ C. Devin, A. Gupta, T. Darrell, P. Abbeel, and S. Levine. Learning modular neural network policies for multitask and multi-robot transfer. CoRR, abs/1609.07088, 2016.
207
+ D. Dong, H. Wu, W. He, D. Yu, and H. Wang. Multi-task learning for multiple language translation. In ACL, pages 1723–1732, 2015.
208
+ C. Fernando, D. Banarse, C. Blundell, Y. Zwols, D. Ha, A. A. Rusu, A. Pritzel, and D. Wierstra. Pathnet: Evolution channels gradient descent in super neural networks. CoRR, abs/1701.08734, 2017.
209
+ M. Günther, A. Rozsa, and T. E. Boult. AFFACT - alignment free facial attribute classification technique. CoRR, abs/1611.06158v2, 2017.
210
+ D. Ha, A. M. Dai, and Q. V. Le. Hypernetworks. CoRR, abs/1609.09106, 2016.
211
+ K. Hashimoto, C. Xiong, Y. Tsuruoka, and R. Socher. A joint many-task model: Growing a neural network for multiple NLP tasks. CoRR, abs/1611.01587, 2016.
212
+ K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, pages 770–778, 2016.
213
+ K. He, Z. Wang, Y. Fu, R. Feng, Y.-G. Jiang, and X. Xue. Adaptively weighted multi-task deep network for person attribute classification. 2017.
214
+ S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735–1780, 1997. ISSN 0899-7667.
215
+ J. T. Huang, J. Li, D. Yu, L. Deng, and Y. Gong. Cross-language knowledge transfer using multilingual deep neural network with shared hidden layers. In ICASSP, pages 7304–7308, 2013.
216
+ Z. Huang, J. Li, S. M. Siniscalchi, I.-F. Chen, J. Wu, and C.-H. Lee. Rapid adaptation for deep neural networks through multi-task learning. In INTERSPEECH, 2015.
217
+ M. Jaderberg, V. Mnih, W. M. Czarnecki, T. Schaul, J. Z. Leibo, D. Silver, and K. Kavukcuoglu. Reinforcement learning with unsupervised auxiliary tasks. In ICLR, 2017.
218
+ B. Jou and S.-F. Chang. Deep cross residual learning for multitask visual recognition. In MM, pages 998–1007, 2016.
219
+ D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014.
220
+ J. Kirkpatrick, R. Pascanu, N. Rabinowitz, J. Veness, et al. Overcoming catastrophic forgetting in neural networks. PNAS, 114(13):3521–3526, 2017.
221
+ B. M. Lake, R. Salakhutdinov, and J. B. Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, 2015.
222
+ Y. Lecun, Y. Bengio, and G. Hinton. Deep learning. Nature, 521(7553):436–444, 2015.
223
+ H. Lee, C. Ekanadham, and A. Y. Ng. Sparse deep belief net model for visual area v2. In NIPS, pages 873–880. 2008.
224
+ Z. Li, B. Gong, and T. Yang. Improved dropout for shallow and deep learning. In NIPS, pages 2523–2531. 2016.
225
+ M. Liang and X. Hu. Recurrent convolutional neural network for object recognition. In CVPR, 2015.
226
+ Q. Liao and T. A. Poggio. Bridging the gaps between residual learning, recurrent neural networks and visual cortex. CoRR, abs/1604.03640, 2016.
227
+ M. Lichman. UCI machine learning repository, 2013.
228
+ X. Liu, J. Gao, X. He, L. Deng, K. Duh, and Y. Y. Wang. Representation learning using multi-task deep neural networks for semantic classification and information retrieval. In NAACL, pages 912–921, 2015a.
229
+ Z. Liu, P. Luo, X. Wang, and X. Tang. Deep learning face attributes in the wild. In Proceedings of International Conference on Computer Vision (ICCV), 2015b.
230
+ Y. Lu, A. Kumar, S. Zhai, Y. Cheng, T. Javidi, and R. S. Feris. Fully-adaptive feature sharing in multi-task networks with applications in person attribute classification. CVPR, 2017.
231
+ M. Luong, Q. V. Le, I. Sutskever, O. Vinyals, and L. Kaiser. Multi-task sequence to sequence learning. In ICLR, 2016.
232
+ M. H. Mahmud. On universal transfer learning. Theoretical Computer Science, 410(19):1826 – 1846, 2009. ISSN 0304-3975.
233
+ M. M. Mahmud and S. Ray. Transfer learning using Kolmogorov complexity: Basic theory and empirical evaluations. In NIPS, pages 985–992. 2008.
234
+ I. Misra, A. Shrivastava, A. Gupta, and M. Hebert. Cross-stitch networks for multi-task learning. In CVPR, 2016.
235
+ P. Pinheiro and R. Collobert. Recurrent convolutional neural networks for scene labeling. In ICML, pages 82–90, 2014.
236
+ R. Ranjan, V. M. Patel, and R. Chellappa. Hyperface: A deep multi-task learning framework for face detection, landmark localization, pose estimation, and gender recognition. CoRR, abs/1603.01249, 2016.
237
+ D. Rezende, Shakir, I. Danihelka, K. Gregor, and D. Wierstra. One-shot generalization in deep generative models. In ICML, pages 1521–1529, 2016.
238
+ E. M. Rudd, M. Günther, and T. E. Boult. MOON: A mixed objective optimization network for the recognition of facial attributes. In ECCV, pages 19–35, 2016.
239
+ A. A. Rusu, N. C. Rabinowitz, G. Desjardins, H. Soyer, et al. Progressive neural networks. CoRR, abs/1606.04671, 2016.
240
+ A. M. Saxe, J. L. McClelland, and S. Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. CoRR, abs/1312.6120, 2013.
241
+ M. L. Seltzer and J. Droppo. Multi-task learning in deep neural networks for improved phoneme recognition. In ICASSP, pages 6965–6969, 2013.
242
+ N. Shazeer, A. Mirhoseini, K. Maziarz, A. Davis, Q. V. Le, G. E. Hinton, and J. Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. In ICLR, 2017.
243
+ R. Socher, C. C.-Y. Lin, A. Y. Ng, and C. D. Manning. Parsing natural scenes and natural language with recursive neural networks. In ICML, pages 129–136, 2011.
244
+ N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: A Simple Way to Prevent Neural Networks from Overfitting. JMLR, 15(1):1929–1958, 2014.
245
+ S. Toshniwal, H. Tang, L. Lu, and K. Livescu. Multitask Learning with Low-Level Auxiliary Tasks for EncoderDecoder Based Speech Recognition. CoRR, abs/1704.01631, 2017.
246
+ A. Veit, M. J. Wilber, and S. Belongie. Residual networks behave like ensembles of relatively shallow networks. In NIPS, pages 550–558. 2016.
247
+ Z. Wu, C. Valentini-Botinhao, O. Watts, and S. King. Deep neural networks employing multi-task learning and stacked bottleneck features for speech synthesis. In ICASSP, pages 4460–4464, 2015.
248
+ Y. Yang and T. Hospedales. Deep multi-task representation learning: A tensor factorisation approach. In ICLR, 2017.
249
+ A. R. Zamir, T. Wu, L. Sun, W. Shen, J. Malik, and S. Saverese. Feedback networks. CoRR, abs/1612.09508, 2016.
250
+ Y. Zhang and D. Weiss. Stack-propagation: Improved representation learning for syntax. CoRR, abs/1603.06598, 2016.
251
+ Z. Zhang, P. Luo, C. C. Loy, and X. Tang. Facial landmark detection by deep multi-task learning. In ECCV, pages 94–108, 2014.
252
+
253
+ # A EXPERIMENTAL DETAILS
254
+
255
+ All experiments were run with the Keras deep learning framework Chollet et al. (2015), using the Tensorflow backend (Abadi et al., 2015). All experiments used the Adam optimizer with default parameters (Kingma and Ba, 2014) unless otherwise specified.
256
+
257
+ In each iteration of multitask training, a random batch for each task is processed, and the results are combined across tasks into a single update. Compared to alternating batches between tasks (Luong et al., 2016), processing all tasks simultaneously simplified the training procedure, and led to faster and lower final convergence. When encoders are shared, the inputs of the samples in each batch are the same across tasks. Cross-entropy loss was used for all classification tasks. The overall validation loss is the sum over all per task validation losses.
258
+
259
+ In each experiment, single task, parallel ordering (Eq. 2), permuted ordering (Eq. 3), and soft ordering (Eq. 7) trained an equivalent set of core layers. In permuted ordering, the order of layers was randomly generated for each task each trial. Several trials were run for each setup to produce confidence bounds.
260
+
261
+ # A.1 MNIST EXPERIMENTS
262
+
263
+ Input pixel values were normalized to be between 0 and 1. The training and test sets for each task were the MNIST train and test sets restricted to the two selected digits. A dropout rate of 0.5 was applied at the output of each core layer. Each setup was trained for 20K iterations, with each batch consisting of 64 samples for each task.
264
+
265
+ When randomly selecting the pairs of digits that define a set of tasks, digits were selected without replacement within a task, and with replacement across tasks, so there were 45 possible tasks, and $4 5 ^ { k }$ possible sets of tasks of size $k$ .
266
+
267
+ # A.2 UCI EXPERIMENTS
268
+
269
+ For all tasks, each input feature was scaled to be between 0 and 1. For each task, training and validation data were created by a random 80-20 split. This split was fixed across trials. A dropout rate of 0.8 was applied at the output of each core layer.
270
+
271
+ # A.3 OMNIGLOT EXPERIMENTS
272
+
273
+ To enable soft ordering, the output of all shared layers must have the same shape. For comparability, the models were made as close as possible in architecture to previous work (Yang and Hospedales, 2017), in which models had four sharable layers, three of which were 2D convolutions followed by $2 \times 2$ max-pooling, of which two had $3 \times 3$ kernels. So, in this experiment, to evaluate soft ordering of convolutional layers, there were four core layers, each a 2D convolutional layer with ReLU activation and kernel size $3 \times 3$ . Each convolutional layer was followed by a $2 \times 2$ maxpooling layer. The number of filters for each convolutional layer was set at 53, which makes the number of total model parameters as close as possible to the reference model. A dropout rate of 0.5 was applied at the output of after each core layer.
274
+
275
+ The Omniglot dataset consists of $1 0 5 \times 1 0 5$ black-and-white images. There are fifty alphabets of characters and twenty images per character. To be compatible with the shapes of shared layers, the input was zero-padded along the third dimension so that its shape was $1 0 5 \times 1 0 5 \times 5 3$ , i.e., with the first $1 0 5 \times 1 0 5$ slice containing the image data and the remainder zeros. To evaluate approaches on $k$ tasks, a random ordering of the fifty tasks was created and fixed across all trials. In each trial, the first $k$ tasks in this ordering were trained jointly for 5000 iterations, with each training batch containing $k$ random samples, one from each task. The fixed ordering of tasks was as follows:
276
+
277
+ [Gujarati, Sylheti, Arcadian, Tibetan, Old Church Slavonic (Cyrillic), Angelic, Malay (Jawi-Arabic), Sanskrit, Cyrillic, Anglo-Saxon Futhorc, Syriac (Estrangelo), Ge’ez, Japanese (katakana), Keble, Manipuri, Alphabet of the Magi, Gurmukhi, Korean, Early Aramaic, Atemayar Qelisayer, Tagalog, Mkhedruli (Georgian), Inuktitut (Canadian Aboriginal Syllabics), Tengwar, Hebrew, N’Ko, Grantha, Latin, Syriac (Serto), Tifinagh, Balinese, Mongolian, ULOG, Futurama, Malayalam, Oriya, Ojibwe (Canadian Aboriginal Syllabics), Avesta, Kannada, Bengali, Japanese (hiragana), Armenian, AurekBesh, Glagolitic, Asomtavruli (Georgian), Greek, Braille, Burmese (Myanmar), Blackfoot (Canadian Aboriginal Syllabics), Atlantean].
278
+
279
+ # A.4 CELEBA EXPERIMENTS
280
+
281
+ The training, validation, and test splits provided by Liu et al. (2015b) were used. There are ${ \approx } 1 6 0 \mathrm { K }$ images for training, ${ \approx } 2 0 \mathrm { K }$ for validation, and ${ \approx } 2 0 \mathrm { K }$ for testing. The dataset contains 20 images of each of approximately ${ \approx } 1 0 \mathrm { K }$ celebrities. The images for a given celebrity occur in only one of the three dataset splits, so models must also generalize to new human identities.
282
+
283
+ The weights for ResNet-50 were initialized with the pre-trained imagenet weights provided in the Keras framework Chollet et al. (2015). Image preprocessing was done with the default Keras image preprocessing function, including resizing all images to $2 2 4 \times 2 2 4$ .
284
+
285
+ The output for the facial landmark detection task is a 10 dimensional vector indicating the $( x , y )$ locations of five landmarks, normalized between 0 and 1. Mean squared error was used as the training loss. When landmark detection is included, the target metric is still attribute classification error. This is because the aligned CelebA images are used, so accurate landmark detection is not a challenge, but including it as an additional task can still provide additional regularization to a multitask model.
286
+
287
+ A dropout rate of 0.5 was applied at the output of after each core layer. The experiments used a batch size of 32. After validation loss converges via Adam, models are trained with RMSProp with learning rate $1 e ^ { - 5 }$ , which is a similar approach to that used by Günther et al. (2017).
288
+
289
+ # A.5 EXPERIMENTS ON VISUALIZING LAYER BEHAVIOR
290
+
291
+ To produce the resulting image for a fixed model, the predictions at each pixel locations were generated, denormalized, and mapped back to the pixel coordinate space. The loss used for this experiment was mean squared error (MSE). Since all pixels for a task image are used for training, there is no sense of generalization to unseen data within a task. As a result, no dropout was used in this experiment.
292
+
293
+ Task models are distinguished completely by their learned soft ordering scaling parameters $s _ { t }$ , so the joint model can be viewed as a generative model which generates different 4’s for varying values of $s _ { t }$ . To visualize the behavior of layer $l$ at depth $d$ for task $t$ , the output of the model for task $t$ was visualized while sweeping $\mathbf { \Xi } ^ { S } ( t , l , d )$ across [0, 1]. To enable this sweeping while keeping the rest of the model behavior fixed, the softmax for each task at each depth was replaced with a sigmoid activation. Note that due to the global avgerage pooling decoder, altering the weight of a single layer has no observable effect at depth four.
parse/train/BkXmYfbAZ/BkXmYfbAZ_content_list.json ADDED
@@ -0,0 +1,1352 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "BEYOND SHARED HIERARCHIES: DEEP MULTITASK LEARNING THROUGH SOFT LAYER ORDERING ",
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": "Elliot Meyerson & Risto Miikkulainen \nThe University of Texas at Austin and Sentient Technologies, Inc. {ekm, risto} $@$ cs.utexas.edu ",
17
+ "bbox": [
18
+ 183,
19
+ 170,
20
+ 614,
21
+ 212
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 248,
32
+ 544,
33
+ 263
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Existing deep multitask learning (MTL) approaches align layers shared between tasks in a parallel ordering. Such an organization significantly constricts the types of shared structure that can be learned. The necessity of parallel ordering for deep MTL is first tested by comparing it with permuted ordering of shared layers. The results indicate that a flexible ordering can enable more effective sharing, thus motivating the development of a soft ordering approach, which learns how shared layers are applied in different ways for different tasks. Deep MTL with soft ordering outperforms parallel ordering methods across a series of domains. These results suggest that the power of deep MTL comes from learning highly general building blocks that can be assembled to meet the demands of each task. ",
40
+ "bbox": [
41
+ 233,
42
+ 277,
43
+ 764,
44
+ 416
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 440,
55
+ 336,
56
+ 457
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "In multitask learning (MTL) (Caruana, 1998), auxiliary data sets are harnessed to improve overall performance by exploiting regularities present across tasks. As deep learning has yielded state-ofthe-art systems across a range of domains, there has been increased focus on developing deep MTL techniques. Such techniques have been applied across settings such as vision (Bilen and Vedaldi, 2016; 2017; Jou and Chang, 2016; Lu et al., 2017; Misra et al., 2016; Ranjan et al., 2016; Yang and Hospedales, 2017; Zhang et al., 2014), natural language (Collobert and Weston, 2008; Dong et al., 2015; Hashimoto et al., 2016; Liu et al., 2015a; Luong et al., 2016), speech (Huang et al., 2013; 2015; Seltzer and Droppo, 2013; Wu et al., 2015), and reinforcement learning (Devin et al., 2016; Fernando et al., 2017; Jaderberg et al., 2017; Rusu et al., 2016). Although they improve performance over single-task learning in these settings, these approaches have generally been constrained to joint training of relatively few and/or closely-related tasks. ",
63
+ "bbox": [
64
+ 174,
65
+ 470,
66
+ 825,
67
+ 625
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "On the other hand, from a perspective of Kolmogorov complexity, “transfer should always be useful”; any pair of distributions underlying a pair of tasks must have something in common (Mahmud, 2009; Mahmud and Ray, 2008). In principle, even tasks that are “superficially unrelated” such as those in vision and NLP can benefit from sharing (even without an adaptor task, such as image captioning). In other words, for a sufficiently expressive class of models, the inductive bias of requiring a model to fit multiple tasks simultaneously should encourage learning to converge to more realistic representations. The expressivity and success of deep models suggest they are ideal candidates for improvement via MTL. So, why have existing approaches to deep MTL been so restricted in scope? ",
74
+ "bbox": [
75
+ 174,
76
+ 631,
77
+ 823,
78
+ 742
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "MTL is based on the assumption that learned transformations can be shared across tasks. This paper identifies an additional implicit assumption underlying existing approaches to deep MTL: this sharing takes place through parallel ordering of layers. That is, sharing between tasks occurs only at aligned levels (layers) in the feature hierarchy implied by the model architecture. This constraint limits the kind of sharing that can occur between tasks. It requires subsequences of task feature hierarchies to match, which may be difficult to establish as tasks become plentiful and diverse. ",
85
+ "bbox": [
86
+ 174,
87
+ 750,
88
+ 823,
89
+ 833
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "This paper investigates whether parallel ordering of layers is necessary for deep MTL. As an alternative, it introduces methods that make deep MTL more flexible. First, existing approaches are reviewed in the context of their reliance on parallel ordering. Then, as a foil to parallel ordering, permuted ordering is introduced, in which shared layers are applied in different orders for different tasks. The increased ability of permuted ordering to support integration of information across tasks is analyzed, and the results are used to develop a soft ordering approach to deep MTL. In this approach, a joint model learns how to apply shared layers in different ways at different depths for different tasks as it simultaneously learns the parameters of the layers themselves. In a suite of experiments, soft ordering is shown to improve performance over single-task learning as well as over fixed order deep MTL methods. ",
96
+ "bbox": [
97
+ 174,
98
+ 840,
99
+ 823,
100
+ 924
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "image",
106
+ "img_path": "images/9b12ec1c0f5ad83779cd8c777dc2b416ea4556beb858d6c3e5488d3d10520472.jpg",
107
+ "image_caption": [
108
+ "Figure 1: Classes of existing deep multitask learning architectures. (a) Classical approaches add a task-specific decoder to the output of the core single-task model for each task; (b) Columnbased approaches include a network column for each task, and define a mechanism for sharing between columns; (c) Supervision at custom depths adds output decoders at depths based on a task hierarchy; (d) Universal representations adapts each layer with a small number of task-specific scaling parameters. Underlying each of these approaches is the assumption of parallel ordering of shared layers (Section 2.2): each one requires aligned sequences of feature extractors across tasks. "
109
+ ],
110
+ "image_footnote": [],
111
+ "bbox": [
112
+ 191,
113
+ 98,
114
+ 808,
115
+ 194
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "",
122
+ "bbox": [
123
+ 174,
124
+ 330,
125
+ 825,
126
+ 387
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "Importantly, soft ordering is not simply a technical improvement, but a new way of thinking about deep MTL. Learning a different soft ordering of layers for each task amounts to discovering a set of generalizable modules that are assembled in different ways for different tasks. This perspective points to future approaches that train a collection of layers on a set of training tasks, which can then be assembled in novel ways for future unseen tasks. Some of the most striking structural regularities observed in the natural, technological and sociological worlds are those that are repeatedly observed across settings and scales; they are ubiquitous and universal. By forcing shared transformations to occur at matching depths in hierarchical feature extraction, deep MTL falls short of capturing this sort of functional regularity. Soft ordering is thus a step towards enabling deep MTL to realize the diverse array of structural regularities found across complex tasks drawn from the real world. ",
133
+ "bbox": [
134
+ 174,
135
+ 395,
136
+ 825,
137
+ 534
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "2 PARALLEL ORDERING OF LAYERS IN DEEP MTL ",
144
+ "text_level": 1,
145
+ "bbox": [
146
+ 174,
147
+ 554,
148
+ 611,
149
+ 570
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "This section presents a high-level classification of existing deep MTL approaches (Sec. 2.1) that is sufficient to expose the reliance of these approaches on the parallel ordering assumption (Sec. 2.2). ",
156
+ "bbox": [
157
+ 174,
158
+ 585,
159
+ 826,
160
+ 614
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "2.1 A CLASSIFICATION OF EXISTING APPROACHES TO DEEP MULTITASK LEARNING ",
167
+ "text_level": 1,
168
+ "bbox": [
169
+ 173,
170
+ 633,
171
+ 758,
172
+ 647
173
+ ],
174
+ "page_idx": 1
175
+ },
176
+ {
177
+ "type": "text",
178
+ "text": "Designing a deep MTL system requires answering the key question: How should learned parameters be shared across tasks? The landscape of existing deep MTL approaches can be organized based on how they answer this question at the joint network architecture level (Figure 1). ",
179
+ "bbox": [
180
+ 174,
181
+ 659,
182
+ 825,
183
+ 700
184
+ ],
185
+ "page_idx": 1
186
+ },
187
+ {
188
+ "type": "text",
189
+ "text": "Classical approaches. Neural network MTL was first introduced in the case of shallow networks (Caruana, 1998), before deep networks were prevalent. The key idea was to add output neurons to predict auxiliary labels for related tasks, which would act as regularizers for the hidden representation. Many deep learning extensions remain close in nature to this approach, learning a shared representation at a high-level layer, followed by task-specific (i.e., unshared) decoders that extract labels for each task (Devin et al., 2016; Dong et al., 2015; Huang et al., 2013; 2015; Jaderberg et al., 2017; Liu et al., 2015a; Ranjan et al., 2016; Wu et al., 2015; Zhang et al., 2014) (Figure 1a). This approach can be extended to task-specific input encoders (Devin et al., 2016; Luong et al., 2016), and the underlying single-task model may be adapted to ease task integration (Ranjan et al., 2016; Wu et al., 2015), but the core network is still shared in its entirety. ",
190
+ "bbox": [
191
+ 174,
192
+ 708,
193
+ 825,
194
+ 847
195
+ ],
196
+ "page_idx": 1
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "Column-based approaches. Column-based approaches (Jou and Chang, 2016; Misra et al., 2016; Rusu et al., 2016; Yang and Hospedales, 2017), assign each task its own layer of task-specific parameters at each shared depth (Figure 1b). They then define a mechanism for sharing parameters between tasks at each shared depth, e.g., by having a shared tensor factor across tasks (Yang and Hospedales, 2017), or allowing some form of communication between columns (Jou and Chang, ",
201
+ "bbox": [
202
+ 176,
203
+ 854,
204
+ 823,
205
+ 924
206
+ ],
207
+ "page_idx": 1
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "2016; Misra et al., 2016; Rusu et al., 2016). Observations of negative effects of sharing in columnbased methods (Rusu et al., 2016) can be attributed to mismatches between the features required at the same depth between tasks that are too dissimilar. ",
212
+ "bbox": [
213
+ 174,
214
+ 103,
215
+ 823,
216
+ 145
217
+ ],
218
+ "page_idx": 2
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "Supervision at custom depths. There may be an intuitive hierarchy describing how a set of tasks are related. Several approaches integrate supervised feedback from each task at levels consistent with such a hierarchy (Hashimoto et al., 2016; Toshniwal et al., 2017; Zhang and Weiss, 2016) (Figure 1c). This method can be sensitive to the design of the hierarchy (Toshniwal et al., 2017), and to which tasks are included therein (Hashimoto et al., 2016). One approach learns a task-relationship hierarchy during training (Lu et al., 2017), though learned parameters are still only shared across matching depths. Supervision at custom depths has also been extended to include explicit recurrence that reintegrates information from earlier predictions (Bilen and Vedaldi, 2016; Zamir et al., 2016). Although these recurrent methods still rely on pre-defined hierarchical relationships between tasks, they provide evidence of the potential of learning transformations that have a different function for different tasks at different depths, i.e., in this case, at different depths unrolled in time. ",
223
+ "bbox": [
224
+ 174,
225
+ 152,
226
+ 825,
227
+ 305
228
+ ],
229
+ "page_idx": 2
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "Universal representations. One approach shares all core model parameters except batch normalization scaling factors (Bilen and Vedaldi, 2017) (Figure 1d). When the number of classes is equal across tasks, even output layers can be shared, and the small number of task-specific parameters enables strong performance to be maintained. This method was applied to a diverse array of vision tasks, demonstrating the power of a small number of scaling parameters in adapting layer functionality for different tasks. This observation helps to motivate the method developed in Section 3. ",
234
+ "bbox": [
235
+ 174,
236
+ 313,
237
+ 825,
238
+ 396
239
+ ],
240
+ "page_idx": 2
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "2.2 THE PARALLEL ORDERING ASSUMPTION ",
245
+ "text_level": 1,
246
+ "bbox": [
247
+ 176,
248
+ 412,
249
+ 493,
250
+ 426
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "A common interpretation of deep learning is that layers extract progressively higher level features at later depths (Lecun et al., 2015). A natural assumption is then that the learned transformations that extract these features are also tied to the depth at which they are learned. The core assumption motivating MTL is that regularities across tasks will result in learned transformations that can be leveraged to improve generalization. However, the methods reviewed in Section 2.1 add the further assumption that subsequences of the feature hierarchy align across tasks and sharing between tasks occurs only at aligned depths (Figure 1); we call this the parallel ordering assumption. ",
257
+ "bbox": [
258
+ 174,
259
+ 438,
260
+ 825,
261
+ 536
262
+ ],
263
+ "page_idx": 2
264
+ },
265
+ {
266
+ "type": "text",
267
+ "text": "Consider $T$ tasks $t _ { 1 } , \\dots , t _ { T }$ to be learned jointly, with each $t _ { i }$ associated with a model $y _ { i } = \\mathcal { F } _ { i } ( x _ { i } )$ . Suppose sharing across tasks occurs at $D$ consecutive depths. Let $\\mathcal { E } _ { i }$ $( \\mathcal { D } _ { i } )$ be $t _ { i }$ ’s task-specific encoder (decoder) to (from) the core sharable portion of the network from its inputs (to its outputs). Let $W _ { k } ^ { i }$ be the layer of learned weights (e.g., affine or convolutional) for task $i$ at shared depth $k$ , with $\\phi _ { k }$ an optional nonlinearity. The parallel ordering assumption implies ",
268
+ "bbox": [
269
+ 174,
270
+ 542,
271
+ 825,
272
+ 613
273
+ ],
274
+ "page_idx": 2
275
+ },
276
+ {
277
+ "type": "equation",
278
+ "img_path": "images/a7d66cfdbadd41a5efb9572b41501711cad0a97cd95388c302c89c9ae5247552.jpg",
279
+ "text": "$$\ny _ { i } = \\left( \\mathcal { D } _ { i } \\circ \\phi _ { D } \\circ W _ { D } ^ { i } \\circ \\phi _ { D - 1 } \\circ W _ { D - 1 } ^ { i } \\circ \\hdots \\circ \\phi _ { 1 } \\circ W _ { 1 } ^ { i } \\circ \\mathcal { E } _ { i } \\right) ( x _ { i } ) , \\mathrm { w i t h } W _ { k } ^ { i } \\approx W _ { k } ^ { j } \\forall ( i , j , k ) .\n$$",
280
+ "text_format": "latex",
281
+ "bbox": [
282
+ 184,
283
+ 617,
284
+ 790,
285
+ 637
286
+ ],
287
+ "page_idx": 2
288
+ },
289
+ {
290
+ "type": "text",
291
+ "text": "The approximate equality $\\ \" \\approx \\ \"$ means that at each shared depth the applied weight tensors for each task are similar and compatible for sharing. For example, learned parameters may be shared across all $W _ { k } ^ { i }$ for a given $k$ , but not between $W _ { k } ^ { i }$ and $W _ { l } ^ { j }$ for any $k \\neq l$ . For closely-related tasks, this assumption may be a reasonable constraint. However, as more tasks are added to a joint model, it may be more difficult for each layer to represent features of its given depth for all tasks. Furthermore, for very distant tasks, it may be unreasonable to expect that task feature hierarchies match up at all, even if the tasks are related intuitively. The conjecture explored in this paper is that parallel ordering limits the potential of deep MTL by the strong constraint it enforces on the use of each layer. ",
292
+ "bbox": [
293
+ 174,
294
+ 640,
295
+ 825,
296
+ 753
297
+ ],
298
+ "page_idx": 2
299
+ },
300
+ {
301
+ "type": "text",
302
+ "text": "3 DEEP MULTITASK LEARNING WITH SOFT ORDERING OF LAYERS ",
303
+ "text_level": 1,
304
+ "bbox": [
305
+ 176,
306
+ 773,
307
+ 743,
308
+ 790
309
+ ],
310
+ "page_idx": 2
311
+ },
312
+ {
313
+ "type": "text",
314
+ "text": "Now that parallel ordering has been identified as a constricting feature of deep MTL approaches, its necessity can be tested, and the resulting observations can be used to develop more flexible methods. ",
315
+ "bbox": [
316
+ 171,
317
+ 804,
318
+ 825,
319
+ 833
320
+ ],
321
+ "page_idx": 2
322
+ },
323
+ {
324
+ "type": "text",
325
+ "text": "3.1 A FOIL FOR THE PARALLEL ORDERING ASSUMPTION: PERMUTING SHARED LAYERS ",
326
+ "bbox": [
327
+ 171,
328
+ 849,
329
+ 792,
330
+ 863
331
+ ],
332
+ "page_idx": 2
333
+ },
334
+ {
335
+ "type": "text",
336
+ "text": "Consider the most common deep MTL setting: hard-sharing of layers, where each layer in $\\{ W _ { k } \\} _ { k = 1 } ^ { D }$ is shared in its entirety across all tasks. The baseline deep MTL model for each task $t _ { i }$ is given by ",
337
+ "bbox": [
338
+ 173,
339
+ 875,
340
+ 823,
341
+ 904
342
+ ],
343
+ "page_idx": 2
344
+ },
345
+ {
346
+ "type": "equation",
347
+ "img_path": "images/dd34428803ba213274e09e0464523d042fa8e980ec3ab038c741699fddd74bb8.jpg",
348
+ "text": "$$\ny _ { i } = ( { \\mathcal { D } } _ { i } \\circ \\phi _ { D } \\circ W _ { D } \\circ \\phi _ { D - 1 } \\circ W _ { D - 1 } \\circ \\dots \\circ \\phi _ { 1 } \\circ W _ { 1 } \\circ { \\mathcal { E } } _ { i } ) ( x _ { i } ) .\n$$",
349
+ "text_format": "latex",
350
+ "bbox": [
351
+ 284,
352
+ 909,
353
+ 712,
354
+ 925
355
+ ],
356
+ "page_idx": 2
357
+ },
358
+ {
359
+ "type": "image",
360
+ "img_path": "images/18d0d580e527b38db1746dbbc59e20f9b3e1651f75947f3541ac1a077477e868.jpg",
361
+ "image_caption": [
362
+ "Figure 2: Fitting two random tasks. (a) The dotted lines show that permuted ordering fits $n$ samples as well as parallel fits $n / 2$ for linear networks; (b) For ReLU networks, permuted ordering enjoys a similar advantage. Thus, permuted ordering of shared layers eases integration of information across disparate tasks. "
363
+ ],
364
+ "image_footnote": [],
365
+ "bbox": [
366
+ 192,
367
+ 98,
368
+ 818,
369
+ 250
370
+ ],
371
+ "page_idx": 3
372
+ },
373
+ {
374
+ "type": "text",
375
+ "text": "This setup satisfies the parallel ordering assumption. Consider now an alternative scheme, equivalent to the above, except with learned layers applied in different orders for different task. That is, ",
376
+ "bbox": [
377
+ 173,
378
+ 344,
379
+ 825,
380
+ 373
381
+ ],
382
+ "page_idx": 3
383
+ },
384
+ {
385
+ "type": "equation",
386
+ "img_path": "images/21a767761b1cb6a7e7c0f9310dcc2b1c92637821cee670a78c23cb5e3ca06823.jpg",
387
+ "text": "$$\ny _ { i } = \\big ( \\mathscr { D } _ { i } \\circ \\phi _ { D } \\circ W _ { \\rho _ { i } ( D ) } \\circ \\phi _ { D - 1 } \\circ W _ { \\rho _ { i } ( D - 1 ) } \\circ \\dots \\circ \\phi _ { 1 } \\circ W _ { \\rho _ { i } ( 1 ) } \\circ \\mathcal { E } _ { i } \\big ) \\big ( x _ { i } \\big ) ,\n$$",
388
+ "text_format": "latex",
389
+ "bbox": [
390
+ 251,
391
+ 381,
392
+ 745,
393
+ 398
394
+ ],
395
+ "page_idx": 3
396
+ },
397
+ {
398
+ "type": "text",
399
+ "text": "where $\\rho _ { i }$ is a task-specific permutation of size $D$ , and $\\rho _ { i }$ is fixed before training. If there are sets of tasks for which joint training of the model defined by Eq. 3 achieves similar or improved performance over Eq. 2, then parallel ordering is not a necessary requirement for deep MTL. Of course, in this formulation, it is required that the $W _ { k }$ can be applied in any order. See Section 6 for examples of possible generalizations. ",
400
+ "bbox": [
401
+ 174,
402
+ 405,
403
+ 825,
404
+ 476
405
+ ],
406
+ "page_idx": 3
407
+ },
408
+ {
409
+ "type": "text",
410
+ "text": "Note that this multitask permuted ordering differs from an approach of training layers in multiple orders for a single task. The single-task case results in a model with increased commutativity between layers, a behavior that has also been observed in residual networks (Veit et al., 2016), whereas here the result is a set of layers that are assembled in different ways for different tasks. ",
411
+ "bbox": [
412
+ 174,
413
+ 482,
414
+ 825,
415
+ 539
416
+ ],
417
+ "page_idx": 3
418
+ },
419
+ {
420
+ "type": "text",
421
+ "text": "3.2 THE INCREASED EXPRESSIVITY OF PERMUTED ORDERING ",
422
+ "text_level": 1,
423
+ "bbox": [
424
+ 174,
425
+ 556,
426
+ 614,
427
+ 570
428
+ ],
429
+ "page_idx": 3
430
+ },
431
+ {
432
+ "type": "text",
433
+ "text": "Fitting tasks of random patterns. Permuted ordering is evaluated by comparing it to parallel ordering on a set of tasks. Randomly generated tasks (similar to (Kirkpatrick et al., 2017)) are the most disparate possible tasks, in that they share minimal information, and thus help build intuition for how permuting layers could help integrate information in broad settings. The following experiments investigate how accurately a model can jointly fit two tasks of $n$ samples. The data set for task $t _ { i }$ is $\\{ ( x _ { i j } , y _ { i j } ) \\} _ { j = 1 } ^ { n }$ , with each $x _ { i j }$ drawn uniformly from $[ 0 , 1 ] ^ { m }$ , and each $y _ { i j }$ drawn uniformly from $\\{ 0 , 1 \\}$ . There are two shared learned affine layers $W _ { k } : \\mathbb { R } ^ { m } \\mathbb { R } ^ { m }$ . The models with permuted ordering (Eq. 3) are given by ",
434
+ "bbox": [
435
+ 173,
436
+ 582,
437
+ 825,
438
+ 696
439
+ ],
440
+ "page_idx": 3
441
+ },
442
+ {
443
+ "type": "equation",
444
+ "img_path": "images/4d79f4b06728c6f5ab294567efef7b0bf31e337a65184a7903c8677b4f8bc217.jpg",
445
+ "text": "$$\ny _ { 1 } = ( O \\circ \\phi \\circ W _ { 2 } \\circ \\phi \\circ W _ { 1 } ) ( x _ { 1 } ) { \\mathrm { ~ a n d ~ } } y _ { 2 } = ( O \\circ \\phi \\circ W _ { 1 } \\circ \\phi \\circ W _ { 2 } ) ( x _ { 2 } ) ,\n$$",
446
+ "text_format": "latex",
447
+ "bbox": [
448
+ 259,
449
+ 703,
450
+ 736,
451
+ 720
452
+ ],
453
+ "page_idx": 3
454
+ },
455
+ {
456
+ "type": "text",
457
+ "text": "where $O$ is a final shared classification layer. The reference parallel ordering models are defined identically, but with $W _ { k }$ in the same order for both tasks. Note that fitting the parallel model with $n$ samples is equivalent to a single-task model with $2 n$ . In the first experiment, $m \\ : = \\ : 1 2 8$ and $\\phi = I$ . Although adding depth does not add expressivity in the single-task linear case, it is useful for examining the effects of permuted ordering, and deep linear networks are known to share properties with nonlinear networks (Saxe et al., 2013). In the second experiment, $m = 1 6$ and $\\phi = \\mathrm { R e L U }$ . ",
458
+ "bbox": [
459
+ 174,
460
+ 727,
461
+ 825,
462
+ 813
463
+ ],
464
+ "page_idx": 3
465
+ },
466
+ {
467
+ "type": "text",
468
+ "text": "The results are shown in Figure 2. Remarkably, in the linear case, permuted ordering of shared layers does not lose accuracy compared to the single-task case. A similar gap in performance is seen in the nonlinear case, indicating that this behavior extends to more powerful models. Thus, the learned permuted layers are able to successfully adapt to their different orderings in different tasks. ",
469
+ "bbox": [
470
+ 174,
471
+ 818,
472
+ 825,
473
+ 875
474
+ ],
475
+ "page_idx": 3
476
+ },
477
+ {
478
+ "type": "text",
479
+ "text": "Looking at conditions that make this result possible can shed further light on this behavior. For instance, consider $T$ tasks $t _ { 1 } , \\dots , t _ { T }$ , with input and output size both $m$ , and optimal linear solutions $F _ { 1 } , \\ldots , F _ { T }$ , respectively. Let $F _ { 1 } , \\dots , F _ { T }$ be $m \\times m$ matrices, and suppose there exist matrices ",
480
+ "bbox": [
481
+ 174,
482
+ 881,
483
+ 823,
484
+ 924
485
+ ],
486
+ "page_idx": 3
487
+ },
488
+ {
489
+ "type": "image",
490
+ "img_path": "images/37be84aa7f5a2e6f13e16f2ad46a4a5144deab0453ab219808c5e18d87231462.jpg",
491
+ "image_caption": [
492
+ "Figure 3: Soft ordering of shared layers. Sample soft ordering network with three shared layers. Soft ordering (Eq. 7) generalizes Eqs. 2 and 3, by learning a tensor $S$ of task-specific scaling parameters. $S$ is learned jointly with the $F _ { j }$ , to allow flexible sharing across tasks and depths. The $F _ { j }$ in this figure each include a shared weight layer and any nonlinearity. This architecture enables the learning of layers that are used in different ways at different depths for different tasks. "
493
+ ],
494
+ "image_footnote": [],
495
+ "bbox": [
496
+ 187,
497
+ 99,
498
+ 808,
499
+ 232
500
+ ],
501
+ "page_idx": 4
502
+ },
503
+ {
504
+ "type": "text",
505
+ "text": "$G _ { 1 } , \\ldots , G _ { T }$ such that $F _ { i } = G _ { i } G _ { ( i + 1 \\bmod T ) } \\dots G _ { ( i - 1 \\bmod T ) } \\forall i$ . Then, because the matrix trace is invariant under cyclic permutations, the constraint arises that ",
506
+ "bbox": [
507
+ 173,
508
+ 337,
509
+ 823,
510
+ 366
511
+ ],
512
+ "page_idx": 4
513
+ },
514
+ {
515
+ "type": "equation",
516
+ "img_path": "images/ca1cd671264823c426fca6d5ec48551748424ab17cb1c843af27c0cfcde350e2.jpg",
517
+ "text": "$$\n\\operatorname { t r } ( F _ { 1 } ) = \\operatorname { t r } ( F _ { 2 } ) = . . . = \\operatorname { t r } ( F _ { T } ) .\n$$",
518
+ "text_format": "latex",
519
+ "bbox": [
520
+ 385,
521
+ 372,
522
+ 611,
523
+ 388
524
+ ],
525
+ "page_idx": 4
526
+ },
527
+ {
528
+ "type": "text",
529
+ "text": "In the case of random matrices induced by the random tasks above, the traces of the $F _ { i }$ are all equal in expectation and concentrate well as their dimensionality increases. So, the restrictive effect of Eq. 5 on the expressivity of permuted ordering here is negligible. ",
530
+ "bbox": [
531
+ 174,
532
+ 395,
533
+ 825,
534
+ 438
535
+ ],
536
+ "page_idx": 4
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "Adding a small number of task-specific scaling parameters. Of course, real world tasks are generally much more structured than random ones, so such reliable expressivity of permuted ordering might not always be expected. However, adding a small number of task-specific scaling parameters can help adapt learned layers to particular tasks. This observation has been previously exploited in the parallel ordering setting, for learning task-specific batch normalization scaling parameters (Bilen and Vedaldi, 2017) and controlling communication between columns (Misra et al., 2016). Similarly, in the permuted ordering setting, the constraint induced by Eq. 5 can be reduced by adding task-specific scalars $\\{ s _ { i } \\} _ { i = 2 } ^ { T }$ such that $F _ { i } = s _ { i } G _ { i } G _ { ( i + 1 \\bmod T ) } \\dots G _ { ( i - 1 \\bmod T ) }$ , and $s _ { 1 } = 1$ . The constraint given by Eq. 5 then reduces to ",
541
+ "bbox": [
542
+ 173,
543
+ 444,
544
+ 825,
545
+ 570
546
+ ],
547
+ "page_idx": 4
548
+ },
549
+ {
550
+ "type": "equation",
551
+ "img_path": "images/6ba9d8cfcffdb4e2de4c3c575d034021fc80c2859d3f99c642cdfd43223526b2.jpg",
552
+ "text": "$$\n\\mathrm { t r } \\big ( F _ { i } / { } s _ { i } \\big ) = \\mathrm { t r } \\big ( F _ { i + 1 } / { } s _ { i + 1 } \\big ) \\forall 1 \\leq i < T \\implies s _ { i + 1 } = s _ { i } \\big ( \\mathrm { t r } ( F _ { i + 1 } ) \\big / \\mathrm { t r } ( F _ { i } ) \\big ) ,\n$$",
553
+ "text_format": "latex",
554
+ "bbox": [
555
+ 266,
556
+ 575,
557
+ 728,
558
+ 593
559
+ ],
560
+ "page_idx": 4
561
+ },
562
+ {
563
+ "type": "text",
564
+ "text": "which are defined when $\\mathrm { t r } ( F _ { i } ) \\ne 0 \\forall i < T$ . Importantly, the number of task-specific parameters does not depend on $m$ , which is useful for scalability as well as encouraging maximal sharing between tasks. The idea of using a small number of task-specific scaling parameters is incorporated in the soft ordering approach introduced in the next section. ",
565
+ "bbox": [
566
+ 173,
567
+ 598,
568
+ 825,
569
+ 655
570
+ ],
571
+ "page_idx": 4
572
+ },
573
+ {
574
+ "type": "text",
575
+ "text": "3.3 SOFT ORDERING OF SHARED LAYERS ",
576
+ "text_level": 1,
577
+ "bbox": [
578
+ 176,
579
+ 671,
580
+ 470,
581
+ 685
582
+ ],
583
+ "page_idx": 4
584
+ },
585
+ {
586
+ "type": "text",
587
+ "text": "Permuted ordering tests the parallel ordering assumption, but still fixes an a priori layer ordering for each task before training. Here, a more flexible soft ordering approach is introduced, which allows jointly trained models to learn how layers are applied while simultaneously learning the layers themselves. Consider again a core network of depth $D$ with layers $W _ { 1 } , \\ldots , W _ { D }$ learned and shared across tasks. The soft ordering model for task $t _ { i }$ is defined as follows: ",
588
+ "bbox": [
589
+ 174,
590
+ 696,
591
+ 825,
592
+ 767
593
+ ],
594
+ "page_idx": 4
595
+ },
596
+ {
597
+ "type": "equation",
598
+ "img_path": "images/915028c7df35ad0e86d2d1636dbc3d170d9c746becebdfe2975a8aa48dad0684.jpg",
599
+ "text": "$$\ny _ { i } ^ { k } = \\sum _ { j = 1 } ^ { D } s _ { ( i , j , k ) } ( \\phi _ { k } [ W _ { j } ( y _ { i } ^ { k - 1 } ) ] ) , \\mathrm { ~ w i t h ~ } \\sum _ { j = 1 } ^ { D } s _ { ( i , j , k ) } = 1 \\forall ( i , k ) ,\n$$",
600
+ "text_format": "latex",
601
+ "bbox": [
602
+ 287,
603
+ 772,
604
+ 709,
605
+ 818
606
+ ],
607
+ "page_idx": 4
608
+ },
609
+ {
610
+ "type": "text",
611
+ "text": "where $y _ { i } ^ { 0 } = \\mathcal { E } _ { i } ( x _ { i } )$ , $y _ { i } = \\mathcal { D } _ { i } ( y _ { i } ^ { D } )$ , and each $s _ { ( i , j , k ) }$ is drawn from $S$ : a tensor of learned scales for each task $t _ { i }$ for each layer $W _ { j }$ at each depth $k$ . Figure 3 shows an example of a resulting depth three model. Motivated by Section 3.2 and previous work (Misra et al., 2016), $S$ adds only $D ^ { 2 }$ scaling parameters per task, which is notably not a function of the size of any $W _ { j }$ . The constraint that all $s _ { ( i , j , k ) }$ sum to 1 for any $( i , k )$ is implemented via softmax, and emphasizes the idea that a soft ordering is what is being learned; in particular, this formulation subsumes any fixed layer ordering $\\rho _ { i }$ by $s _ { ( i , \\rho _ { i } ( k ) , k ) } = 1 \\bar { \\forall } ( i , k )$ . $S$ can be learned jointly with the other learnable parameters in the $W _ { k }$ , $\\mathcal { E } _ { i }$ , and $\\mathcal { D } _ { i }$ via backpropagation. In training, all $s _ { ( i , j , k ) }$ are initialized with equal values, to reduce initial bias of layer function across tasks. It is also helpful to apply dropout after each shared layer. Aside from its usual benefits (Srivastava et al., 2014), dropout has been shown to be useful in increasing the generalization capacity of shared representations (Devin et al., 2016). Since the trained layers in Eq. 7 are used for different tasks and in different locations, dropout makes them more robust to supporting different functionalities. These ideas are tested empirically on the MNIST, UCI, Omniglot, and CelebA data sets in the next section. ",
612
+ "bbox": [
613
+ 173,
614
+ 824,
615
+ 825,
616
+ 925
617
+ ],
618
+ "page_idx": 4
619
+ },
620
+ {
621
+ "type": "text",
622
+ "text": "",
623
+ "bbox": [
624
+ 174,
625
+ 103,
626
+ 825,
627
+ 200
628
+ ],
629
+ "page_idx": 5
630
+ },
631
+ {
632
+ "type": "text",
633
+ "text": "4 EMPIRICAL EVALUATION OF SOFT LAYER ORDERING ",
634
+ "text_level": 1,
635
+ "bbox": [
636
+ 176,
637
+ 229,
638
+ 650,
639
+ 246
640
+ ],
641
+ "page_idx": 5
642
+ },
643
+ {
644
+ "type": "text",
645
+ "text": "These experiments evaluate soft ordering against fixed ordering MTL and single-task learning. The first experiment applies them to intuitively related MNIST tasks, the second to “superficially unrelated” UCI tasks, the third to the real-world problem of Omniglot character recognition, and the fourth to large-scale facial attribute recognition. In each experiment, single task, parallel ordering (Eq. 2), permuted ordering (Eq. 3), and soft ordering (Eq. 7) train an equivalent set of core layers. In permuted ordering, the order of layers were randomly generated for each task each trial. See Appendix A for additional details, including additional details specific to each experiment. ",
646
+ "bbox": [
647
+ 174,
648
+ 265,
649
+ 825,
650
+ 363
651
+ ],
652
+ "page_idx": 5
653
+ },
654
+ {
655
+ "type": "text",
656
+ "text": "4.1 DISENTANGLING RELATED TASKS: MNIST DIGIT $^ 1$ -VS.-DIGIT $^ 2$ BINARY CLASSIFICATION ",
657
+ "bbox": [
658
+ 174,
659
+ 387,
660
+ 820,
661
+ 401
662
+ ],
663
+ "page_idx": 5
664
+ },
665
+ {
666
+ "type": "text",
667
+ "text": "This experiment evaluates the ability of multitask methods to exploit tasks that are intuitively related, but have disparate input representations. Binary classification problems derived from the MNIST hand-written digit dataset are a common test bed for evaluating deep learning methods that require multiple tasks (Fernando et al., 2017; Kirkpatrick et al., 2017; Yang and Hospedales, 2017). Here, the goal of each task is to distinguish between two distinct randomly selected digits. To create initial dissimilarity across tasks that multitask models must disentangle, each $\\mathcal { E } _ { i }$ is a random frozen fullyconnected ReLU layer with output size 64. There are four core layers, each a fully-connected ReLU layer with 64 units. Each $\\mathcal { D } _ { i }$ is an unshared dense layer with a single sigmoid classification output. ",
668
+ "bbox": [
669
+ 173,
670
+ 416,
671
+ 825,
672
+ 529
673
+ ],
674
+ "page_idx": 5
675
+ },
676
+ {
677
+ "type": "image",
678
+ "img_path": "images/be1ea50055988d5088c4103bfcec74edb6832241175098b4dc3e6efbf807bb82.jpg",
679
+ "image_caption": [
680
+ "Figure 4: MNIST results. (a) Relative performance of permuted and soft ordering compared to parallel ordering improves as the number of tasks increases, showing how flexibility of order can help in scaling to more tasks. Note that cost savings of multitask over single task models in terms of number of trainable parameters scales linearly with the number of tasks. For a representative two-task soft order experiment (b) the layer-wise distance between scalings of the tasks increases by iteration, and (c) the scalings move towards a hard ordering. (d) The final learned relative scale of each shared layer at each depth for each task is indicated by shading, with the strongest path drawn, showing that a distinct soft order is learned for each task (• marks the shared model boundary). "
681
+ ],
682
+ "image_footnote": [],
683
+ "bbox": [
684
+ 176,
685
+ 547,
686
+ 823,
687
+ 694
688
+ ],
689
+ "page_idx": 5
690
+ },
691
+ {
692
+ "type": "text",
693
+ "text": "Results are shown in Figure 4. The relative performance of permuted ordering and soft ordering compared to parallel ordering increases with the number of tasks trained jointly (Figure 4a), showing how flexibility of order can help in scaling to more tasks. This result is consistent with the hypothesis that parallel ordering has increased negative effects as the number of tasks increases. Figure 4bd show what soft ordering actually learns: The scalings for tasks diverge as layers specialize to different functions for different tasks. ",
694
+ "bbox": [
695
+ 174,
696
+ 840,
697
+ 825,
698
+ 922
699
+ ],
700
+ "page_idx": 5
701
+ },
702
+ {
703
+ "type": "table",
704
+ "img_path": "images/8a163597b5237975e574600ee9152314f2553070b68566499ba620bf43772a07.jpg",
705
+ "table_caption": [
706
+ "Figure 5: UCI data sets and results. (a) The ten UCI tasks used in joint training; the varying types of problems and dataset characteristics show the diversity of this set of tasks. (b) Mean test error over all ten tasks by iteration. Permuted and parallel order show no improvement after the first 1000 iterations, while soft order decisively outperforms the other methods. "
707
+ ],
708
+ "table_footnote": [],
709
+ "table_body": "<table><tr><td>Dataset</td><td>Input Features</td><td>Output classes</td><td>Samples</td></tr><tr><td>Australian credit</td><td>14</td><td>2</td><td>690</td></tr><tr><td>Breast cancer</td><td>30</td><td>2</td><td>569</td></tr><tr><td>Ecoli</td><td>7</td><td>8</td><td>336</td></tr><tr><td>German credit</td><td>24</td><td>2</td><td>1000</td></tr><tr><td>Heart disease</td><td>13</td><td>5</td><td>303</td></tr><tr><td>Hepatitis</td><td>19</td><td>2</td><td>155</td></tr><tr><td>Iris</td><td>4</td><td>3</td><td>150</td></tr><tr><td>Pima diabetes</td><td>8</td><td>2</td><td>768</td></tr><tr><td>Wine</td><td>13</td><td>3</td><td>178</td></tr><tr><td>Yeast</td><td>8</td><td>10</td><td>1484</td></tr></table>",
710
+ "bbox": [
711
+ 183,
712
+ 102,
713
+ 532,
714
+ 229
715
+ ],
716
+ "page_idx": 6
717
+ },
718
+ {
719
+ "type": "image",
720
+ "img_path": "images/5500de8ff21b0ce07d1f224a6029810c53d475eb180bc037d711a660e64ecfba.jpg",
721
+ "image_caption": [],
722
+ "image_footnote": [],
723
+ "bbox": [
724
+ 553,
725
+ 107,
726
+ 816,
727
+ 224
728
+ ],
729
+ "page_idx": 6
730
+ },
731
+ {
732
+ "type": "text",
733
+ "text": "4.2 SUPERIFICALLY UNRELATED TASKS: JOINT TRAINING OF TEN POPULAR UCI DATASETS ",
734
+ "bbox": [
735
+ 174,
736
+ 324,
737
+ 816,
738
+ 338
739
+ ],
740
+ "page_idx": 6
741
+ },
742
+ {
743
+ "type": "text",
744
+ "text": "The next experiment evaluates the ability of soft ordering to integrate information across a diverse set of “superficially unrelated” tasks (Mahmud and Ray, 2008), i.e., tasks with no immediate intuition for how they may be related. Ten tasks are taken from some of most popular UCI classification data sets (Lichman, 2013). Descriptions of these tasks are given in Figure 5a. Inputs and outputs have no a priori shared meaning across tasks. Each $\\mathcal { E } _ { i }$ is a learned fully-connected ReLU layer with output size 32. There are four core layers, each a fully-connected ReLU layer with 32 units. Each $\\mathcal { D } _ { i }$ is an unshared dense softmax layer for the given number of classes. The results in Figure 5(b) show that, while parallel and permuted show no improvement in error after the first 1000 iterations, soft ordering significantly outperforms the other methods. With this flexible layer ordering, the model is eventually able to exploit significant regularities underlying these seemingly disparate domains. ",
745
+ "bbox": [
746
+ 174,
747
+ 349,
748
+ 825,
749
+ 489
750
+ ],
751
+ "page_idx": 6
752
+ },
753
+ {
754
+ "type": "text",
755
+ "text": "4.3 EXTENSION TO CONVOLUTIONS: MULTI-ALPHABET CHARACTER RECOGNITION ",
756
+ "text_level": 1,
757
+ "bbox": [
758
+ 174,
759
+ 507,
760
+ 764,
761
+ 522
762
+ ],
763
+ "page_idx": 6
764
+ },
765
+ {
766
+ "type": "text",
767
+ "text": "The Omniglot dataset (Lake et al., 2015) consists of fifty alphabets, each of which induces a different character recognition task. Deep MTL approaches have recently shown promise on this dataset (Yang and Hospedales, 2017). It is a useful benchmark for MTL because the large number of tasks allows analysis of performance as a function of the number of tasks trained jointly, and there is clear intuition for how knowledge of some alphabets will increase the ability to learn others. Omniglot is also a good setting for evaluating the ability of soft ordering to learn how to compose layers in different ways for different tasks: it was developed as a problem with inherent composibility, e.g., similar kinds of strokes are applied in different ways to draw characters from different alphabets (Lake et al., 2015). Consequently, it has been used as a test bed for deep generative models (Rezende et al., 2016). To evaluate performance for a given number of tasks $T$ , a single random ordering of tasks was created, from which the first $T$ tasks are considered. Train/test splits are created in the same way as previous work (Yang and Hospedales, 2017), using $10 \\%$ or $20 \\%$ of data for testing. ",
768
+ "bbox": [
769
+ 174,
770
+ 535,
771
+ 825,
772
+ 702
773
+ ],
774
+ "page_idx": 6
775
+ },
776
+ {
777
+ "type": "text",
778
+ "text": "This experiment is a scale-up of the previous experiments in that it evaluates soft ordering of convolutional layers. The models are made as close as possible in architecture to previous work (Yang and Hospedales, 2017), while allowing soft ordering to be applied. There are four core layers, each convolutional followed by max pooling. $\\mathcal { E } _ { i } ( x _ { i } ) = x _ { i } \\forall i$ , and each $\\mathcal { D } _ { i }$ is a fully-connected softmax layer with output size equal to the number of classes. The results show that soft ordering is able to consistently outperform other deep MTL approaches (Figure 6). The improvements are robust to the number of tasks (Figure 6a) and the amount of training data (Figure 6c), suggesting that soft ordering, not task complexity or model complexity, is responsible for the improvement. ",
779
+ "bbox": [
780
+ 174,
781
+ 708,
782
+ 823,
783
+ 819
784
+ ],
785
+ "page_idx": 6
786
+ },
787
+ {
788
+ "type": "text",
789
+ "text": "Permuted ordering performs significantly worse than parallel ordering in this domain. This is not surprising, as deep vision systems are known to induce a common feature hierarchy, especially within the first couple of layers (Lee et al., 2008; Lecun et al., 2015). Parallel ordering has this hierarchy built in; for permuted ordering it is more difficult to exploit. However, the existence of this feature hierarchy does not preclude the possibility that the functions (i.e., layers) used to produce the hierarchy may be useful in other contexts. Soft ordering allows the discovery of such uses. Figure 6b shows how each layer is used more or less at different depths. The soft ordering model learns a “soft hierarchy” of layers, in which each layer has a distribution of increased or decreased usage at each depth. In this case, the usage of each layer is correlated (or inversely correlated) with depth. For instance, the usage of Layer 3 decreases as the depth increases, suggesting that its primary purpose is low-level feature extraction, though it is still sees substantial use in deeper contexts. Section 5 describes an experiment that further investigates the behavior of a single layer in different contexts. ",
790
+ "bbox": [
791
+ 174,
792
+ 827,
793
+ 823,
794
+ 924
795
+ ],
796
+ "page_idx": 6
797
+ },
798
+ {
799
+ "type": "image",
800
+ "img_path": "images/bfd065f8c6423bb009328ca630d4ab1d8a26e919da9bc074084e1621dabdf36f.jpg",
801
+ "image_caption": [
802
+ "Figure 6: Omniglot results. (a) Error by number of tasks trained jointly. Soft ordering significantly outperforms single task and both fixed ordering approaches for each number of tasks; (b) Distribution of learned layer usage by depth across all 50 tasks for a soft order run. The usage of each layer is correlated (or inversely correlated) with depth. This coincides with the understanding that there is some innate hierarchy in convolutional networks, which soft ordering is able to discover. For instance, the usage of Layer 3 decreases as the depth increases, suggesting that its primary purpose is low-level feature extraction, though it is still sees substantial use in deeper contexts; (c) Errors with all 50 tasks for different training set sizes. The first five methods are previous deep MTL results (Yang and Hospedales, 2017), which use multitask tensor factorization methods in a shared parallel ordering. Soft ordering significantly outperforms the other approaches, showing the approach scales to real-world tasks requiring specialized components such as convolutional layers. "
803
+ ],
804
+ "image_footnote": [],
805
+ "bbox": [
806
+ 187,
807
+ 99,
808
+ 821,
809
+ 237
810
+ ],
811
+ "page_idx": 7
812
+ },
813
+ {
814
+ "type": "text",
815
+ "text": "",
816
+ "bbox": [
817
+ 174,
818
+ 434,
819
+ 825,
820
+ 503
821
+ ],
822
+ "page_idx": 7
823
+ },
824
+ {
825
+ "type": "text",
826
+ "text": "4.4 LARGE-SCALE APPLICATION: FACIAL ATTRIBUTE RECOGNITION ",
827
+ "bbox": [
828
+ 176,
829
+ 521,
830
+ 665,
831
+ 536
832
+ ],
833
+ "page_idx": 7
834
+ },
835
+ {
836
+ "type": "text",
837
+ "text": "Although facial attributes are all high-level concepts, they do not intuitively exist at the same level of a shared hierarchy (even one that is learned; Lu et al., 2017). Rather, these concepts are related in multiple subtle and overlapping ways in semantic space. This experiment investigates how a soft ordering approach, as a component in a larger system, can exploit these relationships. ",
838
+ "bbox": [
839
+ 174,
840
+ 547,
841
+ 825,
842
+ 603
843
+ ],
844
+ "page_idx": 7
845
+ },
846
+ {
847
+ "type": "text",
848
+ "text": "The CelebA dataset consists of ${ \\approx } 2 0 0 \\mathrm { K }$ $1 7 8 \\times 2 1 8$ color images, each with binary labels for 40 facial attributes (Liu et al., 2015b). In this experiment, each label defines a task, and parallel and soft order models are based on a ResNet-50 vision model (He et al., 2016), which has also been used in recent state-of-the-art approaches to CelebA (Günther et al., 2017; He et al., 2017). Let $\\mathcal { E } _ { i }$ be a ResNet-50 model truncated to the final average pooling layer, followed by a linear layer projecting the embedding to size 256. $\\mathcal { E } _ { i }$ is shared across all tasks. There are four core layers, each a dense ReLU layer with 256 units. Each $\\mathcal { D } _ { i }$ is an unshared dense sigmoid layer. Parallel ordering and soft ordering models were compared. To further test the robustness of learning, models were trained with and without the inclusion of an additional facial landmark detection regression task. Soft order models were also tested with and without the inclusion of a fixed identity layer at each depth. The identity layer can increase consistency of representation across contexts, which can ease learning of each layer, while also allowing soft ordering to tune how much total non-identity transformation to use for each individual task. This is especially relevant for the case of attributes, since different tasks can have different levels of complexity and abstraction. ",
849
+ "bbox": [
850
+ 174,
851
+ 611,
852
+ 825,
853
+ 804
854
+ ],
855
+ "page_idx": 7
856
+ },
857
+ {
858
+ "type": "text",
859
+ "text": "The results are given in Figure 7c. Existing work that used a ResNet-50 vision model showed that using a parallel order multitask model improved test error over single-task learning from 10.37 to 9.58 (He et al., 2017). With our faster training strategy and the added core layers, our parallel ordering model achieves a test error of 10.21. The soft ordering model yielded a substantial improvement beyond this to 8.79, demonstrating that soft ordering can add value to a larger deep learning system. Including landmark detection yielded a marginal improvement to 8.75, while for parallel ordering it degraded performance slightly, indicating that soft ordering is more robust to joint training of diverse kinds of tasks. Including the identity layer improved performance to 8.64, though with both the landmark detection and the identity layer this improvement was slightly diminished. One explanation for this degredation is that the added flexibility provided by the identity layer offsets the regularization provided by landmark detection. Note that previous work has shown that adaptive weighting of task loss (He et al., 2017; Rudd et al., 2016), data augmentation and ensembling (Günther et al., 2017), and a larger underlying vision model (Lu et al., 2017) each can also yield significant improvements. Aside from soft ordering, none of these improvements alter the multitask topology, so their benefits are expected to be complementary to that of soft ordering demonstrated in this experiment. By coupling them with soft ordering, greater improvements should be possible. ",
860
+ "bbox": [
861
+ 174,
862
+ 811,
863
+ 823,
864
+ 924
865
+ ],
866
+ "page_idx": 7
867
+ },
868
+ {
869
+ "type": "image",
870
+ "img_path": "images/5a71757820af176e6415d72244b5e789480cc38d7c7799bc29e599a8f79fd31f.jpg",
871
+ "image_caption": [
872
+ "Figure 7: CelebA results. Layer usage by depth (a) without and (b) with inclusion of the identity layer. In both cases, layers with lower usage at lower depths have higher usage at higher depths, and vice versa. The identity layer almost always sees increased usage; its application can increase consistency of representation across contexts. (c) Soft order models achieve a significant improvement over parallel ordering, and receive a boost from including the identity layer. The first two rows are previous work with ResNet-50 that show their baseline improvement from single task to multitask. "
873
+ ],
874
+ "image_footnote": [],
875
+ "bbox": [
876
+ 189,
877
+ 99,
878
+ 516,
879
+ 237
880
+ ],
881
+ "page_idx": 8
882
+ },
883
+ {
884
+ "type": "table",
885
+ "img_path": "images/61df4c7774e78b99c89495913e5fc23e2051681fa23dac0b88517b400947ce34.jpg",
886
+ "table_caption": [],
887
+ "table_footnote": [],
888
+ "table_body": "<table><tr><td>Deep MTL method</td><td>Test Error %</td></tr><tr><td>Single Task (He et al.,2017)</td><td>10.37</td></tr><tr><td>MTL Baseline (He et al.,2017)</td><td>9.58</td></tr><tr><td>Parallel Order</td><td>10.21</td></tr><tr><td>Parallel Order + Landmarks</td><td>10.29</td></tr><tr><td>Soft Order</td><td>8.79</td></tr><tr><td>Soft Order + Landmarks</td><td>8.75</td></tr><tr><td>Soft Order + Identity</td><td>8.64</td></tr><tr><td>Soft Order + Landmarks + Identity</td><td>8.68</td></tr></table>",
889
+ "bbox": [
890
+ 545,
891
+ 107,
892
+ 808,
893
+ 222
894
+ ],
895
+ "page_idx": 8
896
+ },
897
+ {
898
+ "type": "text",
899
+ "text": "",
900
+ "bbox": [
901
+ 173,
902
+ 364,
903
+ 825,
904
+ 477
905
+ ],
906
+ "page_idx": 8
907
+ },
908
+ {
909
+ "type": "text",
910
+ "text": "Figures 7a-b characterize the usage of each layer learned by soft order models. Like in the case of Omniglot, layers that are used less at lower depths are used more at higher depths, and vice versa, giving further evidence that the models learn a “soft hierarchy” of layer usage. When the identity layer is included, its usage is almost always increased through training, as it allows the model to use smaller specialized proportions of nonlinear structure for each individual task. ",
911
+ "bbox": [
912
+ 174,
913
+ 483,
914
+ 825,
915
+ 553
916
+ ],
917
+ "page_idx": 8
918
+ },
919
+ {
920
+ "type": "text",
921
+ "text": "5 VISUALIZING THE BEHAVIOR OF SOFT ORDERING LAYERS ",
922
+ "text_level": 1,
923
+ "bbox": [
924
+ 176,
925
+ 573,
926
+ 694,
927
+ 589
928
+ ],
929
+ "page_idx": 8
930
+ },
931
+ {
932
+ "type": "text",
933
+ "text": "The success of soft layer ordering suggests that layers learn functional primitives with similar effects in different contexts. To explore this idea qualitatively, the following experiment uses generative visual tasks. The goal of each task is to learn a function $( x , y ) \\to v$ , where $( x , y )$ is a pixel coordinate and $v$ is a brightness value, all normalized to [0, 1]. Each task is defined by a single image of a “4” drawn from the MNIST dataset; all of its pixels are used as training data. Ten tasks are trained using soft ordering with four shared dense ReLU layers of 100 units each. $\\mathcal { E } _ { i }$ is a linear encoder that is shared across tasks, and $\\mathcal { D } _ { i }$ is a global average pooling decoder. Thus, task models are distinguished completely by their learned soft ordering scaling parameters $s _ { t }$ . To visualize the behavior of layer $l$ at depth $d$ for task $t$ , the predicted image for task $t$ is generated across varying magnitudes of $\\mathbf { \\sigma } ^ { s } ( t , l , d ) \\cdot$ . The results for the first two tasks and the first layer are shown in Table 1. Similar function is observed in each of the six contexts, suggesting that the layers indeed learn functional primitives. ",
934
+ "bbox": [
935
+ 173,
936
+ 604,
937
+ 825,
938
+ 758
939
+ ],
940
+ "page_idx": 8
941
+ },
942
+ {
943
+ "type": "image",
944
+ "img_path": "images/850e349ffb192a29d5b3083a0953bce9d02e9cbf83bfa99d956e730ace5670ed.jpg",
945
+ "image_caption": [
946
+ "Table 1: Example behavior of a soft order layer. For each task $t$ , and at each depth $d$ , the effect of increasing the activation of of this particular layer is to expand the left side of the $\" 4 \"$ in a manner appropriate to the functional context (e.g., the magnitude of the effect decreases with depth). Results for other layers are similar, suggesting that the layers implement functional primitives. "
947
+ ],
948
+ "image_footnote": [],
949
+ "bbox": [
950
+ 178,
951
+ 770,
952
+ 820,
953
+ 852
954
+ ],
955
+ "page_idx": 8
956
+ },
957
+ {
958
+ "type": "text",
959
+ "text": "6 DISCUSSION AND FUTURE WORK ",
960
+ "text_level": 1,
961
+ "bbox": [
962
+ 174,
963
+ 102,
964
+ 483,
965
+ 117
966
+ ],
967
+ "page_idx": 9
968
+ },
969
+ {
970
+ "type": "text",
971
+ "text": "In the interest of clarity, the soft ordering approach in this paper was developed as a relatively small step away from the parallel ordering assumption. To develop more practical and specialized methods, inspiration can be taken from recurrent architectures, the approach can be extended to layers of more general structure, and applied to training and understanding general functional building blocks. ",
972
+ "bbox": [
973
+ 174,
974
+ 138,
975
+ 825,
976
+ 195
977
+ ],
978
+ "page_idx": 9
979
+ },
980
+ {
981
+ "type": "text",
982
+ "text": "Connections to recurrent architectures. Eq. 7 is defined recursively with respect to the learned layers shared across tasks. Thus, the soft-ordering architecture can be viewed as a new type of recurrent architecture designed specifically for MTL. From this perspective, Figure 3 shows an unrolling of a soft layer module: different scaling parameters are applied at different depths when unrolled for different tasks. Since the type of recurrence induced by soft ordering does not require task input or output to be sequential, methods that use recurrence in such a setting are of particular interest (Liang and Hu, 2015; Liao and Poggio, 2016; Pinheiro and Collobert, 2014; Socher et al., 2011; Zamir et al., 2016). Recurrent methods can also be used to reduce the size of $S$ below $O ( T D ^ { 2 } )$ , e.g., via recurrent hypernetworks (Ha et al., 2016). Finally, Section 4 demonstrated soft ordering where shared learned layers were fully-connected or convolutional; it is also straightforward to extend soft ordering to shared layers with internal recurrence, such as LSTMs (Hochreiter and Schmidhuber, 1997). In this setting, soft ordering can be viewed as inducing a higher-level recurrence. ",
983
+ "bbox": [
984
+ 173,
985
+ 203,
986
+ 825,
987
+ 369
988
+ ],
989
+ "page_idx": 9
990
+ },
991
+ {
992
+ "type": "text",
993
+ "text": "Generalizing the structure of shared layers. For clarity, in this paper all core layers in a given setup had the same shape. Of course, it would be useful to have a generalization of soft ordering that could subsume any modern deep architecture with many layers of varying structure. As given by Eq. 7, soft ordering requires the same shape inputs to the element-wise sum at each depth. Reshapes and/or resampling can be added as adapters between tensors of different shape; alternatively, a function other than a sum could be used. For example, instead of learning a weighting across layers at each depth, a probability of applying each module could be learned in a manner similar to adaptive dropout (Ba and Frey, 2013; Li et al., 2016) or a sparsely-gated mixture of experts (Shazeer et al., 2017). Furthermore, the idea of a soft ordering of layers can be extended to soft ordering over modules with more general structure, which may more succinctly capture recurring modularity. ",
994
+ "bbox": [
995
+ 173,
996
+ 376,
997
+ 825,
998
+ 515
999
+ ],
1000
+ "page_idx": 9
1001
+ },
1002
+ {
1003
+ "type": "text",
1004
+ "text": "Training generalizable building blocks. Because they are used in different ways at different locations for different tasks, the shared trained layers in permuted and soft ordering have learned more general functionality than layers trained in a fixed location or for a single task. A natural hypothesis is that they are then more likely to generalize to future unseen tasks, perhaps even without further training. This ability would be especially useful in the small data regime, where the number of trainable parameters should be limited. For example, given a collection of these layers trained on a previous set of tasks, a model for a new task could learn how to apply these building blocks, e.g., by learning a soft order, while keeping their internal parameters fixed. Learning an efficient set of such generalizable layers would then be akin to learning a set of functional primitives. Such functional modularity and repetition is evident in the natural, technological and sociological worlds, so such a set of functional primitives may align well with complex real-world models. This perspective is related to recent work in reusing modules in the parallel ordering setting (Fernando et al., 2017). The different ways in which different tasks learn to use the same set of modules can also help shed light on how tasks are related, especially those that seem superficially disparate (e.g., by extending the analysis performed for Figure 4d), thus assisting in the discovery of real-world regularities. ",
1005
+ "bbox": [
1006
+ 174,
1007
+ 522,
1008
+ 825,
1009
+ 729
1010
+ ],
1011
+ "page_idx": 9
1012
+ },
1013
+ {
1014
+ "type": "text",
1015
+ "text": "7 CONCLUSION ",
1016
+ "text_level": 1,
1017
+ "bbox": [
1018
+ 176,
1019
+ 761,
1020
+ 318,
1021
+ 776
1022
+ ],
1023
+ "page_idx": 9
1024
+ },
1025
+ {
1026
+ "type": "text",
1027
+ "text": "This paper has identified parallel ordering of shared layers as a common assumption underlying existing deep MTL approaches. This assumption restricts the kinds of shared structure that can be learned between tasks. Experiments demonstrate how direct approaches to removing this assumption can ease the integration of information across plentiful and diverse tasks. Soft ordering is introduced as a method for learning how to apply layers in different ways at different depths for different tasks, while simultaneously learning the layers themselves. Soft ordering is shown to outperform parallel ordering methods as well as single-task learning across a suite of domains. These results show that deep MTL can be improved while generating a compact set of multipurpose functional primitives, thus aligning more closely with our understanding of complex real-world processes. ",
1028
+ "bbox": [
1029
+ 174,
1030
+ 797,
1031
+ 825,
1032
+ 924
1033
+ ],
1034
+ "page_idx": 9
1035
+ },
1036
+ {
1037
+ "type": "text",
1038
+ "text": "ACKNOWLEDGMENTS ",
1039
+ "text_level": 1,
1040
+ "bbox": [
1041
+ 176,
1042
+ 104,
1043
+ 328,
1044
+ 117
1045
+ ],
1046
+ "page_idx": 10
1047
+ },
1048
+ {
1049
+ "type": "text",
1050
+ "text": "We would like to thank Matt Feiszli for valuable discussions and all anonymous reviewers for their helpful feedback. ",
1051
+ "bbox": [
1052
+ 173,
1053
+ 127,
1054
+ 825,
1055
+ 157
1056
+ ],
1057
+ "page_idx": 10
1058
+ },
1059
+ {
1060
+ "type": "text",
1061
+ "text": "REFERENCES ",
1062
+ "text_level": 1,
1063
+ "bbox": [
1064
+ 174,
1065
+ 176,
1066
+ 287,
1067
+ 191
1068
+ ],
1069
+ "page_idx": 10
1070
+ },
1071
+ {
1072
+ "type": "text",
1073
+ "text": "M. Abadi, A. Agarwal, P. Barham, E. Brevdo, Z. Chen, C. Citro, G. S. Corrado, A. Davis, J. Dean, M. Devin, S. Ghemawat, I. Goodfellow, A. Harp, G. Irving, M. Isard, Y. Jia, R. Jozefowicz, L. Kaiser, M. Kudlur, J. Levenberg, D. Mané, R. Monga, S. Moore, D. Murray, C. Olah, M. Schuster, J. Shlens, B. Steiner, I. Sutskever, K. Talwar, P. Tucker, V. Vanhoucke, V. Vasudevan, F. Viégas, O. Vinyals, P. Warden, M. Wattenberg, M. Wicke, Y. Yu, and X. Zheng. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. URL http://tensorflow.org/. Software available from tensorflow.org. \nJ. Ba and B. Frey. Adaptive dropout for training deep neural networks. In NIPS, pages 3084–3092. 2013. \nH. Bilen and A. Vedaldi. Integrated perception with recurrent multi-task neural networks. In NIPS, pages 235–243. 2016. \nH. Bilen and A. Vedaldi. Universal representations: The missing link between faces, text, planktons, and cat breeds. CoRR, abs/1701.07275, 2017. \nR. Caruana. Multitask learning. In Learning to learn, pages 95–133. Springer US, 1998. \nF. Chollet et al. Keras, 2015. \nR. Collobert and J. Weston. A unified architecture for natural language processing: Deep neural networks with multitask learning. In ICML, pages 160–167, 2008. \nC. Devin, A. Gupta, T. Darrell, P. Abbeel, and S. Levine. Learning modular neural network policies for multitask and multi-robot transfer. CoRR, abs/1609.07088, 2016. \nD. Dong, H. Wu, W. He, D. Yu, and H. Wang. Multi-task learning for multiple language translation. In ACL, pages 1723–1732, 2015. \nC. Fernando, D. Banarse, C. Blundell, Y. Zwols, D. Ha, A. A. Rusu, A. Pritzel, and D. Wierstra. Pathnet: Evolution channels gradient descent in super neural networks. CoRR, abs/1701.08734, 2017. \nM. Günther, A. Rozsa, and T. E. Boult. AFFACT - alignment free facial attribute classification technique. CoRR, abs/1611.06158v2, 2017. \nD. Ha, A. M. Dai, and Q. V. Le. Hypernetworks. CoRR, abs/1609.09106, 2016. \nK. Hashimoto, C. Xiong, Y. Tsuruoka, and R. Socher. A joint many-task model: Growing a neural network for multiple NLP tasks. CoRR, abs/1611.01587, 2016. \nK. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, pages 770–778, 2016. \nK. He, Z. Wang, Y. Fu, R. Feng, Y.-G. Jiang, and X. Xue. Adaptively weighted multi-task deep network for person attribute classification. 2017. \nS. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735–1780, 1997. ISSN 0899-7667. \nJ. T. Huang, J. Li, D. Yu, L. Deng, and Y. Gong. Cross-language knowledge transfer using multilingual deep neural network with shared hidden layers. In ICASSP, pages 7304–7308, 2013. \nZ. Huang, J. Li, S. M. Siniscalchi, I.-F. Chen, J. Wu, and C.-H. Lee. Rapid adaptation for deep neural networks through multi-task learning. In INTERSPEECH, 2015. \nM. Jaderberg, V. Mnih, W. M. Czarnecki, T. Schaul, J. Z. Leibo, D. Silver, and K. Kavukcuoglu. Reinforcement learning with unsupervised auxiliary tasks. In ICLR, 2017. \nB. Jou and S.-F. Chang. Deep cross residual learning for multitask visual recognition. In MM, pages 998–1007, 2016. \nD. P. Kingma and J. Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. \nJ. Kirkpatrick, R. Pascanu, N. Rabinowitz, J. Veness, et al. Overcoming catastrophic forgetting in neural networks. PNAS, 114(13):3521–3526, 2017. \nB. M. Lake, R. Salakhutdinov, and J. B. Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, 2015. \nY. Lecun, Y. Bengio, and G. Hinton. Deep learning. Nature, 521(7553):436–444, 2015. \nH. Lee, C. Ekanadham, and A. Y. Ng. Sparse deep belief net model for visual area v2. In NIPS, pages 873–880. 2008. \nZ. Li, B. Gong, and T. Yang. Improved dropout for shallow and deep learning. In NIPS, pages 2523–2531. 2016. \nM. Liang and X. Hu. Recurrent convolutional neural network for object recognition. In CVPR, 2015. \nQ. Liao and T. A. Poggio. Bridging the gaps between residual learning, recurrent neural networks and visual cortex. CoRR, abs/1604.03640, 2016. \nM. Lichman. UCI machine learning repository, 2013. \nX. Liu, J. Gao, X. He, L. Deng, K. Duh, and Y. Y. Wang. Representation learning using multi-task deep neural networks for semantic classification and information retrieval. In NAACL, pages 912–921, 2015a. \nZ. Liu, P. Luo, X. Wang, and X. Tang. Deep learning face attributes in the wild. In Proceedings of International Conference on Computer Vision (ICCV), 2015b. \nY. Lu, A. Kumar, S. Zhai, Y. Cheng, T. Javidi, and R. S. Feris. Fully-adaptive feature sharing in multi-task networks with applications in person attribute classification. CVPR, 2017. \nM. Luong, Q. V. Le, I. Sutskever, O. Vinyals, and L. Kaiser. Multi-task sequence to sequence learning. In ICLR, 2016. \nM. H. Mahmud. On universal transfer learning. Theoretical Computer Science, 410(19):1826 – 1846, 2009. ISSN 0304-3975. \nM. M. Mahmud and S. Ray. Transfer learning using Kolmogorov complexity: Basic theory and empirical evaluations. In NIPS, pages 985–992. 2008. \nI. Misra, A. Shrivastava, A. Gupta, and M. Hebert. Cross-stitch networks for multi-task learning. In CVPR, 2016. \nP. Pinheiro and R. Collobert. Recurrent convolutional neural networks for scene labeling. In ICML, pages 82–90, 2014. \nR. Ranjan, V. M. Patel, and R. Chellappa. Hyperface: A deep multi-task learning framework for face detection, landmark localization, pose estimation, and gender recognition. CoRR, abs/1603.01249, 2016. \nD. Rezende, Shakir, I. Danihelka, K. Gregor, and D. Wierstra. One-shot generalization in deep generative models. In ICML, pages 1521–1529, 2016. \nE. M. Rudd, M. Günther, and T. E. Boult. MOON: A mixed objective optimization network for the recognition of facial attributes. In ECCV, pages 19–35, 2016. \nA. A. Rusu, N. C. Rabinowitz, G. Desjardins, H. Soyer, et al. Progressive neural networks. CoRR, abs/1606.04671, 2016. \nA. M. Saxe, J. L. McClelland, and S. Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. CoRR, abs/1312.6120, 2013. \nM. L. Seltzer and J. Droppo. Multi-task learning in deep neural networks for improved phoneme recognition. In ICASSP, pages 6965–6969, 2013. \nN. Shazeer, A. Mirhoseini, K. Maziarz, A. Davis, Q. V. Le, G. E. Hinton, and J. Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. In ICLR, 2017. \nR. Socher, C. C.-Y. Lin, A. Y. Ng, and C. D. Manning. Parsing natural scenes and natural language with recursive neural networks. In ICML, pages 129–136, 2011. \nN. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: A Simple Way to Prevent Neural Networks from Overfitting. JMLR, 15(1):1929–1958, 2014. \nS. Toshniwal, H. Tang, L. Lu, and K. Livescu. Multitask Learning with Low-Level Auxiliary Tasks for EncoderDecoder Based Speech Recognition. CoRR, abs/1704.01631, 2017. \nA. Veit, M. J. Wilber, and S. Belongie. Residual networks behave like ensembles of relatively shallow networks. In NIPS, pages 550–558. 2016. \nZ. Wu, C. Valentini-Botinhao, O. Watts, and S. King. Deep neural networks employing multi-task learning and stacked bottleneck features for speech synthesis. In ICASSP, pages 4460–4464, 2015. \nY. Yang and T. Hospedales. Deep multi-task representation learning: A tensor factorisation approach. In ICLR, 2017. \nA. R. Zamir, T. Wu, L. Sun, W. Shen, J. Malik, and S. Saverese. Feedback networks. CoRR, abs/1612.09508, 2016. \nY. Zhang and D. Weiss. Stack-propagation: Improved representation learning for syntax. CoRR, abs/1603.06598, 2016. \nZ. Zhang, P. Luo, C. C. Loy, and X. Tang. Facial landmark detection by deep multi-task learning. In ECCV, pages 94–108, 2014. ",
1074
+ "bbox": [
1075
+ 171,
1076
+ 198,
1077
+ 826,
1078
+ 926
1079
+ ],
1080
+ "page_idx": 10
1081
+ },
1082
+ {
1083
+ "type": "text",
1084
+ "text": "",
1085
+ "bbox": [
1086
+ 169,
1087
+ 82,
1088
+ 828,
1089
+ 926
1090
+ ],
1091
+ "page_idx": 11
1092
+ },
1093
+ {
1094
+ "type": "text",
1095
+ "text": "",
1096
+ "bbox": [
1097
+ 171,
1098
+ 103,
1099
+ 828,
1100
+ 340
1101
+ ],
1102
+ "page_idx": 12
1103
+ },
1104
+ {
1105
+ "type": "text",
1106
+ "text": "A EXPERIMENTAL DETAILS ",
1107
+ "text_level": 1,
1108
+ "bbox": [
1109
+ 178,
1110
+ 364,
1111
+ 421,
1112
+ 381
1113
+ ],
1114
+ "page_idx": 12
1115
+ },
1116
+ {
1117
+ "type": "text",
1118
+ "text": "All experiments were run with the Keras deep learning framework Chollet et al. (2015), using the Tensorflow backend (Abadi et al., 2015). All experiments used the Adam optimizer with default parameters (Kingma and Ba, 2014) unless otherwise specified. ",
1119
+ "bbox": [
1120
+ 176,
1121
+ 396,
1122
+ 825,
1123
+ 438
1124
+ ],
1125
+ "page_idx": 12
1126
+ },
1127
+ {
1128
+ "type": "text",
1129
+ "text": "In each iteration of multitask training, a random batch for each task is processed, and the results are combined across tasks into a single update. Compared to alternating batches between tasks (Luong et al., 2016), processing all tasks simultaneously simplified the training procedure, and led to faster and lower final convergence. When encoders are shared, the inputs of the samples in each batch are the same across tasks. Cross-entropy loss was used for all classification tasks. The overall validation loss is the sum over all per task validation losses. ",
1130
+ "bbox": [
1131
+ 174,
1132
+ 445,
1133
+ 825,
1134
+ 529
1135
+ ],
1136
+ "page_idx": 12
1137
+ },
1138
+ {
1139
+ "type": "text",
1140
+ "text": "In each experiment, single task, parallel ordering (Eq. 2), permuted ordering (Eq. 3), and soft ordering (Eq. 7) trained an equivalent set of core layers. In permuted ordering, the order of layers was randomly generated for each task each trial. Several trials were run for each setup to produce confidence bounds. ",
1141
+ "bbox": [
1142
+ 176,
1143
+ 536,
1144
+ 823,
1145
+ 592
1146
+ ],
1147
+ "page_idx": 12
1148
+ },
1149
+ {
1150
+ "type": "text",
1151
+ "text": "A.1 MNIST EXPERIMENTS ",
1152
+ "text_level": 1,
1153
+ "bbox": [
1154
+ 176,
1155
+ 608,
1156
+ 377,
1157
+ 623
1158
+ ],
1159
+ "page_idx": 12
1160
+ },
1161
+ {
1162
+ "type": "text",
1163
+ "text": "Input pixel values were normalized to be between 0 and 1. The training and test sets for each task were the MNIST train and test sets restricted to the two selected digits. A dropout rate of 0.5 was applied at the output of each core layer. Each setup was trained for 20K iterations, with each batch consisting of 64 samples for each task. ",
1164
+ "bbox": [
1165
+ 174,
1166
+ 635,
1167
+ 825,
1168
+ 690
1169
+ ],
1170
+ "page_idx": 12
1171
+ },
1172
+ {
1173
+ "type": "text",
1174
+ "text": "When randomly selecting the pairs of digits that define a set of tasks, digits were selected without replacement within a task, and with replacement across tasks, so there were 45 possible tasks, and $4 5 ^ { k }$ possible sets of tasks of size $k$ . ",
1175
+ "bbox": [
1176
+ 174,
1177
+ 696,
1178
+ 825,
1179
+ 739
1180
+ ],
1181
+ "page_idx": 12
1182
+ },
1183
+ {
1184
+ "type": "text",
1185
+ "text": "A.2 UCI EXPERIMENTS ",
1186
+ "text_level": 1,
1187
+ "bbox": [
1188
+ 176,
1189
+ 756,
1190
+ 351,
1191
+ 771
1192
+ ],
1193
+ "page_idx": 12
1194
+ },
1195
+ {
1196
+ "type": "text",
1197
+ "text": "For all tasks, each input feature was scaled to be between 0 and 1. For each task, training and validation data were created by a random 80-20 split. This split was fixed across trials. A dropout rate of 0.8 was applied at the output of each core layer. ",
1198
+ "bbox": [
1199
+ 174,
1200
+ 782,
1201
+ 825,
1202
+ 825
1203
+ ],
1204
+ "page_idx": 12
1205
+ },
1206
+ {
1207
+ "type": "text",
1208
+ "text": "A.3 OMNIGLOT EXPERIMENTS ",
1209
+ "text_level": 1,
1210
+ "bbox": [
1211
+ 176,
1212
+ 842,
1213
+ 398,
1214
+ 856
1215
+ ],
1216
+ "page_idx": 12
1217
+ },
1218
+ {
1219
+ "type": "text",
1220
+ "text": "To enable soft ordering, the output of all shared layers must have the same shape. For comparability, the models were made as close as possible in architecture to previous work (Yang and Hospedales, 2017), in which models had four sharable layers, three of which were 2D convolutions followed by $2 \\times 2$ max-pooling, of which two had $3 \\times 3$ kernels. So, in this experiment, to evaluate soft ordering of convolutional layers, there were four core layers, each a 2D convolutional layer with ReLU activation and kernel size $3 \\times 3$ . Each convolutional layer was followed by a $2 \\times 2$ maxpooling layer. The number of filters for each convolutional layer was set at 53, which makes the number of total model parameters as close as possible to the reference model. A dropout rate of 0.5 was applied at the output of after each core layer. ",
1221
+ "bbox": [
1222
+ 174,
1223
+ 867,
1224
+ 823,
1225
+ 924
1226
+ ],
1227
+ "page_idx": 12
1228
+ },
1229
+ {
1230
+ "type": "text",
1231
+ "text": "",
1232
+ "bbox": [
1233
+ 174,
1234
+ 103,
1235
+ 823,
1236
+ 174
1237
+ ],
1238
+ "page_idx": 13
1239
+ },
1240
+ {
1241
+ "type": "text",
1242
+ "text": "The Omniglot dataset consists of $1 0 5 \\times 1 0 5$ black-and-white images. There are fifty alphabets of characters and twenty images per character. To be compatible with the shapes of shared layers, the input was zero-padded along the third dimension so that its shape was $1 0 5 \\times 1 0 5 \\times 5 3$ , i.e., with the first $1 0 5 \\times 1 0 5$ slice containing the image data and the remainder zeros. To evaluate approaches on $k$ tasks, a random ordering of the fifty tasks was created and fixed across all trials. In each trial, the first $k$ tasks in this ordering were trained jointly for 5000 iterations, with each training batch containing $k$ random samples, one from each task. The fixed ordering of tasks was as follows: ",
1243
+ "bbox": [
1244
+ 173,
1245
+ 180,
1246
+ 825,
1247
+ 277
1248
+ ],
1249
+ "page_idx": 13
1250
+ },
1251
+ {
1252
+ "type": "text",
1253
+ "text": "[Gujarati, Sylheti, Arcadian, Tibetan, Old Church Slavonic (Cyrillic), Angelic, Malay (Jawi-Arabic), Sanskrit, Cyrillic, Anglo-Saxon Futhorc, Syriac (Estrangelo), Ge’ez, Japanese (katakana), Keble, Manipuri, Alphabet of the Magi, Gurmukhi, Korean, Early Aramaic, Atemayar Qelisayer, Tagalog, Mkhedruli (Georgian), Inuktitut (Canadian Aboriginal Syllabics), Tengwar, Hebrew, N’Ko, Grantha, Latin, Syriac (Serto), Tifinagh, Balinese, Mongolian, ULOG, Futurama, Malayalam, Oriya, Ojibwe (Canadian Aboriginal Syllabics), Avesta, Kannada, Bengali, Japanese (hiragana), Armenian, AurekBesh, Glagolitic, Asomtavruli (Georgian), Greek, Braille, Burmese (Myanmar), Blackfoot (Canadian Aboriginal Syllabics), Atlantean]. ",
1254
+ "bbox": [
1255
+ 174,
1256
+ 285,
1257
+ 825,
1258
+ 397
1259
+ ],
1260
+ "page_idx": 13
1261
+ },
1262
+ {
1263
+ "type": "text",
1264
+ "text": "A.4 CELEBA EXPERIMENTS ",
1265
+ "text_level": 1,
1266
+ "bbox": [
1267
+ 176,
1268
+ 412,
1269
+ 380,
1270
+ 428
1271
+ ],
1272
+ "page_idx": 13
1273
+ },
1274
+ {
1275
+ "type": "text",
1276
+ "text": "The training, validation, and test splits provided by Liu et al. (2015b) were used. There are ${ \\approx } 1 6 0 \\mathrm { K }$ images for training, ${ \\approx } 2 0 \\mathrm { K }$ for validation, and ${ \\approx } 2 0 \\mathrm { K }$ for testing. The dataset contains 20 images of each of approximately ${ \\approx } 1 0 \\mathrm { K }$ celebrities. The images for a given celebrity occur in only one of the three dataset splits, so models must also generalize to new human identities. ",
1277
+ "bbox": [
1278
+ 176,
1279
+ 439,
1280
+ 825,
1281
+ 494
1282
+ ],
1283
+ "page_idx": 13
1284
+ },
1285
+ {
1286
+ "type": "text",
1287
+ "text": "The weights for ResNet-50 were initialized with the pre-trained imagenet weights provided in the Keras framework Chollet et al. (2015). Image preprocessing was done with the default Keras image preprocessing function, including resizing all images to $2 2 4 \\times 2 2 4$ . ",
1288
+ "bbox": [
1289
+ 178,
1290
+ 502,
1291
+ 820,
1292
+ 544
1293
+ ],
1294
+ "page_idx": 13
1295
+ },
1296
+ {
1297
+ "type": "text",
1298
+ "text": "The output for the facial landmark detection task is a 10 dimensional vector indicating the $( x , y )$ locations of five landmarks, normalized between 0 and 1. Mean squared error was used as the training loss. When landmark detection is included, the target metric is still attribute classification error. This is because the aligned CelebA images are used, so accurate landmark detection is not a challenge, but including it as an additional task can still provide additional regularization to a multitask model. ",
1299
+ "bbox": [
1300
+ 174,
1301
+ 551,
1302
+ 825,
1303
+ 635
1304
+ ],
1305
+ "page_idx": 13
1306
+ },
1307
+ {
1308
+ "type": "text",
1309
+ "text": "A dropout rate of 0.5 was applied at the output of after each core layer. The experiments used a batch size of 32. After validation loss converges via Adam, models are trained with RMSProp with learning rate $1 e ^ { - 5 }$ , which is a similar approach to that used by Günther et al. (2017). ",
1310
+ "bbox": [
1311
+ 176,
1312
+ 641,
1313
+ 823,
1314
+ 684
1315
+ ],
1316
+ "page_idx": 13
1317
+ },
1318
+ {
1319
+ "type": "text",
1320
+ "text": "A.5 EXPERIMENTS ON VISUALIZING LAYER BEHAVIOR ",
1321
+ "text_level": 1,
1322
+ "bbox": [
1323
+ 174,
1324
+ 700,
1325
+ 571,
1326
+ 715
1327
+ ],
1328
+ "page_idx": 13
1329
+ },
1330
+ {
1331
+ "type": "text",
1332
+ "text": "To produce the resulting image for a fixed model, the predictions at each pixel locations were generated, denormalized, and mapped back to the pixel coordinate space. The loss used for this experiment was mean squared error (MSE). Since all pixels for a task image are used for training, there is no sense of generalization to unseen data within a task. As a result, no dropout was used in this experiment. ",
1333
+ "bbox": [
1334
+ 174,
1335
+ 727,
1336
+ 823,
1337
+ 796
1338
+ ],
1339
+ "page_idx": 13
1340
+ },
1341
+ {
1342
+ "type": "text",
1343
+ "text": "Task models are distinguished completely by their learned soft ordering scaling parameters $s _ { t }$ , so the joint model can be viewed as a generative model which generates different 4’s for varying values of $s _ { t }$ . To visualize the behavior of layer $l$ at depth $d$ for task $t$ , the output of the model for task $t$ was visualized while sweeping $\\mathbf { \\Xi } ^ { S } ( t , l , d )$ across [0, 1]. To enable this sweeping while keeping the rest of the model behavior fixed, the softmax for each task at each depth was replaced with a sigmoid activation. Note that due to the global avgerage pooling decoder, altering the weight of a single layer has no observable effect at depth four. ",
1344
+ "bbox": [
1345
+ 174,
1346
+ 803,
1347
+ 825,
1348
+ 901
1349
+ ],
1350
+ "page_idx": 13
1351
+ }
1352
+ ]
parse/train/BkXmYfbAZ/BkXmYfbAZ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BkXmYfbAZ/BkXmYfbAZ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SkyQWDcex/SkyQWDcex.md ADDED
@@ -0,0 +1,294 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # A CONTEXT-AWARE ATTENTION NETWORK FOR INTERACTIVE QUESTION ANSWERING
2
+
3
+ Huayu $\mathbf { L i } ^ { 1 : }$ ∗, Martin Renqiang $\mathbf { M } \mathbf { i n } ^ { 2 }$ , Yong $\mathbf { G e ^ { 3 } }$ , Asim Kadav2
4
+
5
+ Department of Computer Science, UNC Charlotte1 Machine Learning Group, NEC Laboratories America2 Management Information Systems, University of Arizona3 hli38@uncc.edu, renqiang@nec-labs.com, yongge@email.arizona.edu, asim@nec-labs.com
6
+
7
+ # ABSTRACT
8
+
9
+ We develop a new model for Interactive Question Answering (IQA), using GatedRecurrent-Unit recurrent networks (GRUs) as encoders for statements and questions, and another GRU as a decoder for outputs. Distinct from previous work, our approach employs context-dependent word-level attention for more accurate statement representations and question-guided sentence-level attention for better context modeling. Employing these mechanisms, our model accurately understands when it can output an answer or when it requires generating a supplementary question for additional input. When available, user’s feedback is encoded and directly applied to update sentence-level attention to infer the answer. Extensive experiments on QA and IQA datasets demonstrate quantitatively the effectiveness of our model with significant improvement over conventional QA models.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ The ultimate goal of Question Answering (QA) research is to build intelligent systems capable of naturally communicating with humans, which poses a major challenge for natural language processing and machine learning. Inspired by recent success of sequence-to-sequence models with an encoder-decoder framework (Sutskever et al., 2014; Cho et al., 2014), researchers have attempted to apply variants of such models with explicit memory and attention to QA tasks, aiming to move a step further from machine learning to machine reasoning (Sainbayar et al., 2015; Kumar et al., 2016; Xiong et al., 2016). Similarly, all these models employ encoders to map statements and questions to fixed-length feature vectors, and a decoder to generate outputs. Empowered by the adoption of memory and attention, they have achieved remarkable success on several challenging datasets, including the recently acclaimed Facebook bAbI dataset.
14
+
15
+ However, previous models suffer from the following important limitations. First, they fail to model context-dependent meaning of words. Different words may have different meanings in different contexts, which increases the difficulty of extracting the essential semantic logic flow of each sentence in different paragraphs. Second, many existing models only work in ideal QA settings and fail to address the uncertain situations under which models require additional user input to gather complete information to answer a given question. As shown in Table 1, the example on the left is an ideal QA problem. We can clearly understand what the question is and then locate the relevant sentences to generate the answer. However, it is hard to answer the question in the right example, because there are two types of bedrooms mentioned in the story and we do not know which bedroom the user refers to. These scenarios with incomplete information naturally appear in human conversations, and thus, effectively handling them is a key capability of intelligent QA models.
16
+
17
+ To address the challenges presented above, we propose a Context-aware Attention Network (CAN) to learn fine-grained representations for input sentences, and develop a mechanism to interact with the user for comprehensively understanding a given question. Specifically, we employ two-level attention applied at word level and sentence level to compute representations of all input sentences.
18
+
19
+ The office is north of the kitchen. The garden is south of the kitchen. Q: What is north of the kitchen? A: Office
20
+
21
+ The master bedroom is east of the garden. The guest bedroom is east of the office. Q: What is the bedroom east of? A: Unknown
22
+
23
+ Table 1: Two examples of QA problems. Left is an ideal QA example, where the question is very clear. Right is an example with incomplete information, where the question is ambiguous and it is difficult to provide an answer only using the input statements.
24
+
25
+ The context information extracted from the input story is allowed to influence the attention over each word, and governs the word semantic meaning contributing to a sentence representation. In addition, an interactive mechanism is activated to generate a supplementary question for the user when the model feels that it does not have complete information to answer a given question. User’s feedback is then encoded and exploited to attend over all input sentences to infer the answer. Our proposed model CAN can be viewed as an encoder-decoder approach augmented with two-level attention and an interactive mechanism, rendering our model self-adaptive, as illustrated in Figure 1.
26
+
27
+ Our contributions in this paper are as follows: (i) We develop a new encoder-decoder model called CAN for question answering with two-level attention. Due to the new attention mechanism, our model avoids the necessity of multiple-hop attention, required by previous QA models, and knows when it can readily output an answer and when it needs additional information. (ii) We augment the encoder-decoder framework for QA with an interactive mechanism for handling user’s feedback, which immediately changes sentence-level attention to infer the final answer without additional model training. (iii) We introduce a new dataset based on the bAbI dataset, namely ibAbI, for IQA tasks. $( i \nu )$ Extensive experiments show that our approach outperforms state-of-the-art models on both QA and IQA datasets. Specifically, our approach achieves $4 0 \%$ improvement over traditional QA models (e.g., MemN2N and $\mathrm { D M N + }$ ) on IQA datasets.
28
+
29
+ ![](images/6275a64c37ccaf482ebb09b70800a184a280d191381c227afb608db82191bef4.jpg)
30
+ Figure 1: An example of QA problem using CAN.
31
+
32
+ # 2 RELATED WORK
33
+
34
+ Recent work on QA has been heavily influenced by research on various models with attention and/or memory. Most of these models employ an encoder-decoder framework, and have been successfully applied to image classification (Seo et al., 2016), image captioning (Xu et al., 2015; Mnih et al., 2014), machine translation (Cho et al., 2014; Bahdanau et al., 2015; Luong et al., 2015), document classification (Yang et al., 2016), and textual/visual QA (Sainbayar et al., 2015; Yang et al., 2015; Lu et al., 2016; Kumar et al., 2016; Xiong et al., 2016). For textual QA in the form of statementsquestion-answer triplets, Sainbayar et al. (2015) utilizes an external memory module. It maps each input sentence to an input representation space regarded as a memory component. The output representation is calculated by summarizing over input representations with different attention weights. This single-layer memory can be extended to multi-layer memory by reasoning the content and the question multiple times. Instead of simply stacking the memory layers, Kumar et al. (2016) have introduced a dynamic memory network (DMN) to update the memory vectors through a modified GRU, in which the gate weight is trained in a supervised fashion. To improve DMN by training without supervision, Xiong et al. (2016) encode input sentences with a bidirectional GRU and then utilize an attention-based GRU to summarize these input sentences. Neural Turing Machine (NTM) (Graves et al., 2014), a model with content and location-based memory addressing mechanisms, has also been used for QA tasks recently. There is other recent work about QA using external resources (Wu et al., 2015; Fader et al., 2014; Savenkov & Emory, 2016; Hermann et al., 2015; Golub & He, 2016), and exploring dialog tasks (Weston, 2016; Bordes & Weston, 2016).
35
+
36
+ Our model in this paper also addresses textual QA in the form of statements-question-answer triplets, but it differs from prior work in two aspects. First, in our attention network, the word attention are context-dependent for generating accurate sentence representations and the sentence attention are question-guided for generating context representation. Second, this new attention mechanism helps our model understand when it can readily output an answer and when it can generate a supplementary question for activating the user interaction. Incorporating user’s feedback does not require additional model training and this property makes our model highly self-adaptive.
37
+
38
+ # 3 GATED RECURRENT UNIT NETWORKS
39
+
40
+ Gated Recurrent Unit (GRU) (Cho et al., 2014) is the basic building block of our model for IQA. GRU has been widely adopted for many NLP tasks, such as machine translation (Bahdanau et al., 2015) and language modeling (Zaremba et al., 2014). GRU improves Long Short-term Memory (LSTM) (Hochreiter & Schmidhuber, 1997) by removing the cell component and making each hidden state adaptively capture the dependencies over different time scales using reset and update gates. For each time step $t$ with input $\mathbf { x } ^ { t }$ and previous hidden state $\mathbf { h } ^ { t - 1 }$ , we compute the updated hidden state $\mathbf { h } ^ { t } = G R U ( \mathbf { \bar { h } } ^ { t - 1 } , \mathbf { x } ^ { t } )$ by,
41
+
42
+ $$
43
+ \begin{array} { r l r } { { \mathbf r } ^ { t } = \sigma ( { \mathbf U } _ { r } { \mathbf x } ^ { t } + { \mathbf W } _ { r } { \mathbf h } ^ { t - 1 } + { \mathbf b } _ { r } ) , } & { } & { { \mathbf z } ^ { t } = \sigma ( { \mathbf U } _ { z } { \mathbf x } ^ { t } + { \mathbf W } _ { z } { \mathbf h } ^ { t - 1 } + { \mathbf b } _ { z } ) , } \\ { \widetilde { { \mathbf h } } ^ { t } = t a n h ( { \mathbf U } _ { h } { \mathbf x } ^ { t } + { \mathbf W } _ { h } ( { \mathbf r } ^ { t } \odot { \mathbf h } ^ { t - 1 } ) + { \mathbf b } _ { h } ) , } & { } & { { \mathbf h } ^ { t } = { \mathbf z } ^ { t } \odot { \mathbf h } ^ { t - 1 } + ( { \mathbf 1 } - { \mathbf z } ^ { t } ) \odot \widetilde { { \mathbf h } } ^ { t } , } \end{array}
44
+ $$
45
+
46
+ where $\sigma$ is the sigmoid activation function, $\odot$ is an element-wise product, $\mathbf { U } _ { r } , \mathbf { U } _ { z } , \mathbf { U } _ { h } \in \mathbb { R } ^ { K \times D }$ , $\mathbf { W } _ { r } , \mathbf { W } _ { z } , \mathbf { W } _ { h } \in \mathbf { \bar { \mathbb { R } } } ^ { K \times K } , \mathbf { b } _ { r } , \mathbf { b } _ { z } , \mathbf { b } _ { h } \in \mathbb { R } ^ { K \times 1 } ,$ $K$ is the hidden size and $D$ is the input size.
47
+
48
+ # 4 CONTEXT-AWARE ATTENTION NETWORK
49
+
50
+ In this section, we first illustrate the proposed model CAN (§ 4.1), including the question module $( \ S ~ 4 . 2 )$ , the input module $( \ S \ 4 . 3 )$ and the answer module $( \ S \ 4 . 4 )$ . We then describe each of these modules in detail. Finally, we elaborate the training procedure of CAN $( \ S 4 . 5 )$ .
51
+
52
+ # 4.1 FRAMEWORK
53
+
54
+ Given a story represented by $N$ input sentences (or statements), i.e., $( l _ { 1 } , \cdots , l _ { N } )$ , and a question $q$ , our goal is to generate an answer $a$ . Each sentence $l _ { t }$ includes a sequence of $N _ { t }$ words, denoted as $( w _ { 1 } ^ { t } , \cdot \cdot \cdot , w _ { N _ { t } } ^ { t } )$ , and a question with $N _ { q }$ words is represented as $( w _ { 1 } ^ { \bar { q } } , \cdot \cdot \cdot , w _ { N _ { q } } ^ { q } )$ . Let $V$ denote the size of dictionary, including the words from each $l _ { t }$ , $q$ and $a$ , and end-of-sentence (EOS) symbols.
55
+
56
+ The whole framework of our model is shown in Figure 2, consisting of the following three key parts:
57
+
58
+ • Question Module: The question module encodes the target question into a vector representation. • Input Module: The input module encodes a set of input sentences into a vector representation. • Answer Module: The answer module generates an answer based on the outputs of question and input modules. Unlike traditional QA models, it has two choices, either to output an answer immediately or to interact with the user for further information. Hence, if the model lacks sufficient evidence for answer prediction based on the existing knowledge at current timestamp, an interactive mechanism is enabled. Specifically, the model generates a supplementary question, and the user needs to provide a feedback, which is utilized to estimate an answer.
59
+
60
+ ![](images/9f6f0cf956ecfb81ce23623065fdbe1e81f6922ac6b507e2fd60d3e235b3fc56.jpg)
61
+ Figure 2: The illustration of the proposed model, consisting of a question module, an input module and an answer module. The question module maps the question sentence into a sentence level space. The input module generates a context representation based on input sentences. The answer module has a binary choice, either to generate an answer immediately or to take an interactive mechanism.
62
+
63
+ # 4.2 QUESTION MODULE
64
+
65
+ Suppose a question is a sequence of $N _ { q }$ words, we encode each word $w _ { j }$ into a $K _ { w }$ -dimensional vector space $\mathbf { x } _ { j } ^ { q }$ using an embedding matrix $\mathbf { W } _ { w } ~ \in ~ \mathbb { R } ^ { K _ { w } \times V }$ , i.e., $\mathbf { x } _ { j } ^ { q } \ = \ \mathbf { W } _ { w } [ w _ { j } ]$ , where $[ w _ { j } ]$ is a one-hot vector associated with word $w _ { j }$ . The sequence order within a sentence significantly affects each word’s semantic meaning due to its dependence on the previous words. Thus, a GRU is employed by taking each word vector $\mathbf { x } _ { j } ^ { q }$ as input and updating the hidden state $\mathbf { g } _ { j } ^ { q } \in \mathbb { R } ^ { K _ { h } \times 1 }$ as:
66
+
67
+ $$
68
+ \mathbf { g } _ { j } ^ { q } = G R U _ { w } ( \mathbf { g } _ { j - 1 } ^ { q } , \mathbf { x } _ { j } ^ { q } ) ,
69
+ $$
70
+
71
+ where the subscript of GRU is used to distinguish other GRUs used in the following sections. The hidden state $\mathbf { g } _ { j } ^ { q }$ can be regarded as the annotation vector of word $w _ { j }$ by incorporating the word order information. We also explore a variety of encoding schema, such as LSTM and RNN. However, LSTM is prone to overfitting due to large number of parameters, and RNN has a poor performance because of exploding and vanishing gradients (Bengio et al., 1994).
72
+
73
+ In addition, each word contributes differently to the representation of a question. For example, in a question ‘Where is the football?’, ‘where’ and ‘football’ play a critical role in summarizing this sentence. Therefore, an attention mechanism is introduced to generate a question representation by focusing on the important words for their semantic meaning. A positive weight $\gamma _ { j }$ is placed on each word to indicate the relative importance of contribution to the representation of the question. Specifically, this weight is measured as the similarity of corresponding word annotation vector $\mathbf { g } _ { j }$ and a word level latent vector $\mathbf { v } \in \mathbb { R } ^ { K _ { h } \times 1 }$ for question which is jointly learned during the training process. The question representation $\mathbf { u } \in \mathbb { R } ^ { K _ { c } \times \mathbf { \bar { 1 } } }$ is then generated by a weighted summation of the word annotation vectors and corresponding important weights, where we also use one-layer MLP to transfer it from sentence-level space into context-level space,
74
+
75
+ $$
76
+ \begin{array} { r l r } & { \gamma _ { j } = { s o f t m a x } ( { { \bf { v } } ^ { T } } { \bf { g } } _ { j } ^ { q } ) , } & { { \bf { u } } = { { \bf { W } } _ { c h } } \displaystyle \sum _ { j = 1 } ^ { N _ { q } } \gamma _ { j } { \bf { g } } _ { j } ^ { q } + { \bf { b } } _ { c } ^ { ( q ) } , } \\ & { n a x ~ \mathrm { i s ~ d e f i n e d ~ a s ~ } s o f t m a x ( { x _ { i } } ) = \frac { { \exp ( { x _ { i } } ) } } { \sum _ { j ^ { \prime } } \exp ( { x _ { j ^ { \prime } } } ) } , { { \bf { W } } _ { c h } } \in { { \mathbb R } } ^ { K _ { c } \times K _ { h } } , \mathrm { a n d ~ } { \bf { b } } _ { c } ^ { ( q ) } \in \Omega } \end{array}
77
+ $$
78
+
79
+ where sof t $\mathbf { b } _ { c } ^ { ( q ) } \in \mathbb { R } ^ { K _ { c } \times 1 }$
80
+
81
+ # 4.3 INPUT MODULE
82
+
83
+ Input module aims at generating a representation for input sentences, including a sentence encoder and a context encoder. Sentence encoder computes a sentence representation, and context encoder calculates a representation of input sentences, both of which are introduced in the following sections.
84
+
85
+ # 4.3.1 SENTENCE ENCODER
86
+
87
+ For each input sentence $l _ { t }$ , containing a sequence of $N _ { t }$ words $( w _ { 1 } , \cdots , w _ { N _ { t } } )$ , similar to the question module, each word $w _ { i }$ is embedded into word space $\mathbf { x } _ { i } ^ { t } \in \mathbb { R } ^ { K _ { w } \times 1 }$ with the embedding matrix $\mathbf { W } _ { w }$ , and a recurrent neural network is used to capture the context information from the words which have already been generated in the same sentence. Let $\mathbf { h } _ { i } ^ { t } \in \mathbb { R } ^ { K _ { h } \times 1 }$ denote the hidden state which can be interpreted as the word annotation in the input space. A GRU retrieves each word annotation by taking word vector as input and relying on previous hidden state,
88
+
89
+ $$
90
+ \mathbf { h } _ { i } ^ { t } = G R U _ { w } ( \mathbf { h } _ { i - 1 } ^ { t } , \mathbf { x } _ { i } ^ { t } ) .
91
+ $$
92
+
93
+ In Eq.(4), each word annotation vector takes the sequence order into consideration to learn its semantic meaning based on previous information within a sentence through a recurrent neural network. A question answering system is usually given multiple input sentences which often form a story together. A single word has different meaning in the different stories. Learning a single sentence context at which a word is located is insufficient to understand the meaning of this word, in particular when the sentence is placed in a story context. In other words, only modeling a sequence of words prior to a word within a sentence may lose some important information which results in the failure of the generation of sentence representation. Hence, we take the whole context into account as well to appropriately characterize each word and well understand this sentence’s meaning. Suppose $\mathbf { s } _ { t - 1 } \in \overline { { \mathbb { R } } } ^ { K _ { c } \times 1 }$ is the annotation vector of previous sentence $l _ { t - 1 }$ , which will be introduced in the next section. To incorporate context information generated by previous sentences, we feed word annotation $\mathbf { h } _ { i } ^ { t }$ and previous sentence annotation $\mathbf { s } _ { t - 1 }$ through a two-layer MLP, where a context-aware word vector $\mathbf { e } _ { i } ^ { t } \in \mathbb { R } ^ { K _ { c } \times 1 }$ is obtained as follows:
94
+
95
+ $$
96
+ \mathbf { e } _ { i } ^ { t } = \sigma ( \mathbf { W } _ { e e } t a n h ( \mathbf { W } _ { e s } \mathbf { s } _ { t - 1 } + \mathbf { W } _ { e h } \mathbf { h } _ { i } ^ { t } + \mathbf { b } _ { e } ^ { ( 1 ) } ) + \mathbf { b } _ { e } ^ { ( 2 ) } ) ,
97
+ $$
98
+
99
+ where $\mathbf { W } _ { e e } , \mathbf { W } _ { e s } \in \mathbb { R } ^ { K _ { c } \times K _ { c } }$ and $\mathbf { W } _ { e h } \in \mathbb { R } ^ { K _ { c } \times K _ { h } }$ are weight matrices, and ${ \bf b } _ { e } ^ { ( 1 ) }$ , $\mathbf { b } _ { e } ^ { ( 2 ) } \in \mathbb { R } ^ { K _ { c } \times 1 }$ are the bias terms. It is worth noting that $\mathbf { s } _ { t - 1 }$ is dependent on its previous sentence. Recursively, this sentence relies on its previous one as well. Hence, our model is able to encode the previous context. In addition, the sentence representation will focus on those words which are able to address the question. Inspired by this intuition, another word level attention mechanism is introduced to attend informative words about the question for generating a sentence’s representation. As the question representation is utilized to guide the word attention, a positive weight $\alpha _ { i } ^ { t }$ associated with each word is computed as the similarity of the question vector $\mathbf { u }$ and the corresponding context-aware word vector $\mathbf { e } _ { i } ^ { t }$ . Then the sentence representation $\mathbf { y } _ { t } ~ \in ~ \mathbb { R } ^ { K _ { h } \times 1 }$ is generated by aggregating the word annotation vectors with different weights,
100
+
101
+ $$
102
+ \alpha _ { i } ^ { t } = s o f t m a x ( \mathbf { u } ^ { T } \mathbf { e } _ { i } ^ { t } ) , \mathbf { y } _ { t } = \sum _ { i = 1 } ^ { N _ { t } } \alpha _ { i } ^ { t } \mathbf { h } _ { i } ^ { t } .
103
+ $$
104
+
105
+ # 4.3.2 CONTEXT ENCODER
106
+
107
+ Suppose a story is comprised of a sequence of sentences, i.e., $( l _ { 1 } , \cdots , l _ { N } )$ , each of which is encoded as a $K _ { h }$ -dimensional vector $\mathbf { y } _ { t }$ through a sentence encoder. As input sentences have a sequence order, simply using their sentence vectors for context generation cannot effectively capture the entire context of the sequence of sentences. To address this issue, a sentence annotation vector is introduced to capture the previous context and this sentence’s own meaning using a GRU. Given the sentence vector $\mathbf { y } _ { t }$ and the state $\mathbf { s } _ { t - 1 }$ of previous sentence, we get annotation vector $\mathbf { s } _ { t } \in \mathbb { R } ^ { K _ { c } \times 1 }$ as:
108
+
109
+ $$
110
+ \begin{array} { r } { \mathbf { s } _ { t } = G R U _ { s } ( \mathbf { s } _ { t - 1 } , \mathbf { y } _ { t } ) . } \end{array}
111
+ $$
112
+
113
+ A GRU can learn a sentence’s meaning based on previous context information. However, just relying on GRU at sentence level using simple word embedding vectors makes it difficult to learn the precise semantic meaning for each word in the story. Hence, we introduce a context-aware attention mechanism shown in Eq.(5) to properly encode each word for the generation of sentence representation, which guarantees that each word is reasoned under the specific context.
114
+
115
+ Once the sentence annotation vectors $( { \bf s } _ { 1 } , \cdots , { \bf s } _ { N } )$ are obtained as described above, a sentence level attention mechanism is enabled to emphasize those sentences that are highly relevant to the question. We can estimate the attention weight $\beta _ { t }$ with the similarity of the question and the corresponding sentence. Hence, the context representation $\mathbf { m }$ is retrieved by summing over all sentence representations associated with corresponding attention weights, and given by:
116
+
117
+ $$
118
+ \beta _ { t } = s o f t m a x ( \mathbf { u } ^ { T } \mathbf { s } _ { t } ) ,
119
+ $$
120
+
121
+ $$
122
+ \mathbf { m } = \sum _ { t = 1 } ^ { N } \beta _ { t } \mathbf { s } _ { t } .
123
+ $$
124
+
125
+ Similar to bidirectional RNN, our model can be extended to use another sentence-level GRU that moves backward through time beginning from the end of the sequence.
126
+
127
+ # 4.4 ANSWER MODULE
128
+
129
+ The answer module utilizes a decoder to generate an answer, where it has two output cases according to the understanding ability of both the question and the context. One is to generate the answer immediately after receiving the context and question information. Another one is to generate a supplementary question and then use the user’s feedback to predict the answer. This process is taken by an interactive mechanism.
130
+
131
+ # 4.4.1 ANSWER GENERATION
132
+
133
+ Given the question representation $\mathbf { u }$ and the context representation $\mathbf { m }$ , another GRU is used as the decoder to generate a sentence as the answer. To fuse $\mathbf { u }$ and $\mathbf { m }$ together, we sum these vectors rather than concatenating them to reduce the total number of parameters. Suppose $\hat { \mathbf { x } } _ { k - 1 } \in \mathbb { R } ^ { K _ { w } \times 1 }$ is the predicted word vector in last step, GRU updates the hidden state $\mathbf { z } _ { k } \in \bar { \mathbb { R } ^ { K _ { o } \times 1 } }$ as follows,
134
+
135
+ $$
136
+ \hat { \mathbf { x } } _ { k } \overset { \mathbf { W } _ { w } } { = } s o f t m a x ( \mathbf { W } _ { o d } \mathbf { z } _ { k } + \mathbf { b } _ { o } ) , \qquad \mathbf { z } _ { k } = G R U _ { d } ( \mathbf { z } _ { k - 1 } , [ \mathbf { m } + \mathbf { u } ; \hat { \mathbf { x } } _ { k - 1 } ] )
137
+ $$
138
+
139
+ where $\mathbf { \underline { { \underline { { W } } } } } _ { w }$ denotes the predicted word vector through the embedding matrix $\mathbf { W } _ { w }$ . Note that we require that each sentence ends with a special EOS symbol, including question mask and period symbol, which enables the model to define a distribution over sentences of all possible lengths.
140
+
141
+ Output Choices. In practice, the system is not aways able to answer question immediately based on its current knowledge due to the lack of some crucial information bridging the gap between question and context knowledge, i.e., incomplete issue. Therefore, we allow the decoder to make a binary choice, either to generate an answer immediately, or to enable an interactive mechanism. Specifically, if the model has sufficiently strong evidence for a successful answer prediction based on the well-learned context representation and question representation, the decoder will directly output the answer. Otherwise, the system generates a supplementary question for user, where an example is shown in Table 2. At this time, this user needs to offer a feedback which is then encoded to update the sentence-level attentions for answer generation. This procedure is our interactive mechanism.
142
+
143
+ Table 2: An example of interactive mechanism. ��SQ” denotes supplementary question.
144
+
145
+ <table><tr><td>Problem</td><td>The master bedroom is east of the garden. The guest bedroom is east of the office. Target Question: What is the bedroom east of?</td></tr><tr><td>Interactive Mechanism</td><td>System:Which bedroom,master one or guest one? (SQ) User: Master bedroom(User&#x27;s Feedback) System: Garden(Predicted Answer)</td></tr></table>
146
+
147
+ The sentence generated by the decoder ends with a special symbol, either a question mask or a period symbol. Hence, this special symbol is utilized to make a decision. In other words, if EOS symbol is a question mask, the generated sentence is regarded as a supplementary question and an interactive mechanism is enabled; otherwise the generated sentence is the estimated answer and the prediction task is done. In the next section, we will introduce the details of interactive mechanism.
148
+
149
+ # 4.4.2 INTERACTIVE MECHANISM
150
+
151
+ The interactive process is summarized as follows: 1) The decoder generates a supplementary question; 2) The user provides a feedback; 3) The feedback is used for answer prediction for the target question. Suppose the feedback contains a sequence of words, denoted as $( w _ { 1 } ^ { f } , \cdot \cdot \cdot , w _ { N _ { f } } ^ { f } )$ . Similar to the input module, each word $\boldsymbol { w _ { d } ^ { f } }$ is embedded to a vector $ { \mathbf { x } } _ { d } ^ { f }$ through an embedding matrix $\mathbf { W } _ { w }$ . Then the corresponding annotation vector $\mathbf { g } _ { d } ^ { f } \in \mathbb { R } ^ { K _ { h } \times 1 }$ is retrieved via a GRU by taking the embedding vector as input, and shown as follows:
152
+
153
+ $$
154
+ \mathbf { g } _ { d } ^ { f } = G R U _ { w } ( \mathbf { g } _ { d - 1 } ^ { f } , \mathbf { x } _ { d } ^ { f } ) .
155
+ $$
156
+
157
+ Based on the annotation vectors, a representation $\mathbf { f } \in \mathbb { R } ^ { K _ { h } \times 1 }$ can be obtained by a simple attention mechanism where each word is considered to contribute equally, and given by:
158
+
159
+ $$
160
+ \mathbf { f } = \frac { 1 } { N _ { f } } \sum _ { d = 1 } ^ { N _ { f } } \mathbf { g } _ { d } ^ { f } .
161
+ $$
162
+
163
+ Our goal is to utilize the feedback representation $\mathbf { f }$ to generate an answer for the target question. The provided feedback improves the ability to answer the question by distinguishing the relevance of each input sentence to the question. In other words, the similarity of specific input sentences in the provided feedback make these sentences more likely to address the question. Hence, we refine the attention weight of each sentence shown in Eq.(9) after receiving the user’s feedback, given by,
164
+
165
+ $$
166
+ { \bf r } = t a n h ( { \bf W } _ { r f } { \bf f } + { \bf b } _ { r } ^ { ( f ) } ) , \qquad ( 1 3 ) \qquad \quad \beta _ { t } = s o f t m a x ( { \bf u } ^ { T } { \bf s } _ { t } + { \bf r } ^ { T } { \bf s } _ { t } )
167
+ $$
168
+
169
+ where $\mathbf { W } _ { r f } \in \mathbb { R } ^ { K _ { c } \times K _ { h } }$ and $\mathbf { b } _ { r } ^ { ( f ) } \in \mathbb { R } ^ { K _ { c } \times 1 }$ are the weight matrix and bias vector, respectively. Eq.(13) is an one-layer neural network to transfer feedback representation to context space. After obtaining the newly learned attention weights, we update the context representation using the softattention operation shown in Eq.(9). This updated context representation and question representation will be used as the input for decoder to generate an answer. Note that for simplifying the problem, we allow the decoder to only generate at most one supplementary question. In addition, one advantage of using the user’s feedback to update the attention weights of input sentences is that we do not need to re-train the encoder again once a feedback is entering the system.
170
+
171
+ # 4.5 TRAINING PROCEDURE
172
+
173
+ During training, all modules share an embedding matrix. There are three different GRUs employed for sentence encoding, context encoding and answer/supplementary question decoding. In other words, the same GRU is used to encode the question, input sentences and the user’s feedback. The second one is applied to generate context representation and the third one is used as decoder. Training can be treated as a supervised classification problem to minimize the cross-entropy error of the answer sequence and the supplementary question sequence.
174
+
175
+ # 5 EXPERIMENTS
176
+
177
+ In this section, we evaluate our approach with many baseline methods based on various datasets.
178
+
179
+ # 5.1 EXPERIMENTAL SETUP
180
+
181
+ Datasets. In this paper, we use two types of datasets to evaluate the performance of our approach. One is traditional QA dataset, where we use Facebook bAbI English 10k dataset (Weston et al., 2015). It contains 20 different types of tasks with emphasis on different forms of reasoning and induction. The second is the newly designed IQA dataset, where we extend bAbI to add interactive QA and denote it as ibAbI. Overall, we generate three ibAbI datasets based on task 1 (single supporting fact), task 4 (two argument relations), and task 7 (counting). Specifically, the former two datasets focus on solving ambiguous actors/objects problem, and the latter one is to ask further information that assists answer prediction. Table 3 shows three examples for our three ibAbI tasks.
182
+
183
+ In addition, we also mix IQA data and corresponding QA data together with different IQA ratios, where the IQA ratio is ranging from 0.3 to 1 (with step as 0.1) and denoted as $R _ { I Q A }$ . For example, in task 1, we randomly pick $R _ { I Q A } \times 1 0 0 $ percent data from ibAbI task 1, and then randomly select the remaining data from bAbI task 1. $R _ { I Q A } = 1$ indicates that the whole dataset only consists of IQA problems; otherwise (i.e., ranging from 0.3 to 0.9) it consists of both types of QA problems. Overall, we have three tasks for ibAbI dataset, and eight sub-datasets for each task. In the experiments, 10k examples are used as training and another 1k examples are used as testing.
184
+
185
+ Table 3: Examples of three different tasks on the generated ibAbI datasets. “Q” indicates the target question. “SQ” is the supplementary question. “FB” refers to user’s feedback. “A” is the answer.
186
+
187
+ <table><tr><td rowspan="3">IQA task 1: John journeyed to the garden. Daniel moved to the kitchen.</td><td>IQA task 4:</td><td>IQA task 7:</td></tr><tr><td>The master bedroom is east of the garden.</td><td>John grabbed the bread.</td></tr><tr><td>The guest bedroom is east of the office. The guest bedroom is west of the hallway.</td><td>John grabbed the milk.</td></tr><tr><td rowspan="4">Q:Where is he? SQ: Who is he?</td><td></td><td>John grabbed the apple.</td></tr><tr><td>The bathroom is east of the master bedroom.</td><td>Sandra went to the bedroom.</td></tr><tr><td>Q:What is the bedroom east of?</td><td>Q:How many special objects is John holding?</td></tr><tr><td>SQ:Which bedroom,master one or guest one?</td><td>SQ:What objects are you referring to?</td></tr><tr><td>FB:Daniel A: Kitchen</td><td>FB:Master bedroom A: Garden</td><td>FB: Milk,bread A: Two</td></tr></table>
188
+
189
+ Experiment Settings. We train our models using the Adam optimizer (Kingma & Ba, 2014). Xavier initialization is used for all parameters except for word embeddings, which utilize random uniform initialization ranging from $- { \sqrt { 3 } }$ to $\sqrt { 3 }$ . The learning rate is set as 0.001. The grid search method is utilized to find optimal parameters, such as batch size and hidden size.
190
+
191
+ # 5.2 BASELINE METHODS
192
+
193
+ To demonstrate the effectiveness of our approach CAN, we compare it with the following models:
194
+
195
+ • $\mathbf { D M N + }$ : Xiong et al. (2016) improve Dynamic Memory Networks (Kumar et al., 2016) by using stronger input and memory modules, where a bidirectional GRU is adopted to generate representations for statements and a neural network is used to update episodic memory multiple times. • MemN2N: This is an extension of Memory Network with weak supervision as proposed in Sainbayar et al. (2015). Here, an external memory module is used to encode the input statements and a recurrent attention mechanism is used to read the memory for answer prediction. • EncDec: We extend the encoder-decoder framework (Cho et al., 2014) to solve QA tasks as a baseline method. Specifically, EncDec uses a GRU to encode statements and questions, the end of hidden states is used as context representation, and another GRU to generate the output.
196
+
197
+ # 5.3 PERFORMANCE OF QUESTION ANSWERING
198
+
199
+ In this section, we evaluate model’s ability for answer prediction based on traditional QA dataset (i.e., bAbI-10k). For this task, our model (denoted as $\mathrm { C A N + Q A } ,$ ) does not use the interactive mechanism. As the output answers for this dataset only contain a single word, we adopt test error rate as evaluation metric. For $\mathrm { D M N } +$ and MemN2N methods, we select the best performance over bAbI dataset reported in (Xiong et al., 2016). The results of various models across 20 tasks are reported in Table 4. We summarize the main observations as follows:
200
+
201
+ • Our approach is better than all baseline methods in each individual task. For example, it reduces the error by $4 \%$ compared to $\mathrm { D M N } +$ in task 17, and compared to MemN2N, it reduces $1 8 . 4 \%$ and $4 . 8 \%$ error in task 17 and 18 respectively. We can achieve a better result primarily because our approach can model the semantic logic flow for statements. Table 5 shows two examples in task 17 and 18, where MemN2N predicts incorrectly while $\mathrm { C A N + Q A }$ can make correct predictions. In these two examples, the semantic logic determines the relationship between two objects mentioned in the question, such as chest and suitcase. In addition, Kumar et al. (2016) has shown that memory networks with multiple hops are better than the one with single hop. Our strong results illustrate that our approach has more accurate context modeling even without multiple hops. EncDec performs the worst amongst all models over all tasks. EncDec concatenates the statements and questions as a single input, resulting in the difficulty of training the GRU. For example, EncDec is not good on task 2 and 3 because these two tasks have longer inputs than other tasks. • The results of $\mathrm { D M N } +$ and MemN2N are much better than EncDec. It is not surprising that they can outperform EncDec, because they are specifically designed for question answering and do not suffer from the problem mentioned above by treating input sentences separately. • All models perform poorly on task 16. Xiong et al. (2016) points out that MemN2N with a simple update for memory could achieve a near perfect error rate of 0.4 while a more complex method will lead to a much worse result. This shows that a sophisticated modeling method makes it difficult to achieve a good performance in certain simple tasks with such limited data. This can be a possible reason for the poor performance of our model on this specific task as well.
202
+
203
+ In addition, different from MemN2N, we use a GRU to capture the semantic logic flow of input sentences, where the sentence-level attention can weaken the influence of unrelated sentences in a long story. Table 6 shows two examples of our results with long stories. From the attention weights, we can see our model can correctly search relevant sentences in a long story to address a question.
204
+
205
+ Table 4: Performance comparison of various models in terms of test error rate $( \% )$ in QA dataset.
206
+
207
+ <table><tr><td>Task</td><td>CAN+QA</td><td>DMN+</td><td>MemN2N</td><td>EncDec</td></tr><tr><td>1 - Single Supporting Fact</td><td>0.0</td><td>0.0</td><td>0.0</td><td>52.0</td></tr><tr><td>2 - Two Supporting Facts</td><td>0.1</td><td>0.3</td><td>0.3</td><td>66.1</td></tr><tr><td>3 - Three Supporting Facts</td><td>0.2</td><td>1.1</td><td>2.1</td><td>71.9</td></tr><tr><td>4 - Two Arg. Relations</td><td>0.0</td><td>0.0</td><td>0.0</td><td>29.2</td></tr><tr><td>5 - Three Arg.Relations</td><td>0.4</td><td>0.5</td><td>0.8</td><td>14.3</td></tr><tr><td>6 -Yes/No Questions</td><td>0.0</td><td>0.0</td><td>0.1</td><td>31.0</td></tr><tr><td>7 - Counting</td><td>0.3</td><td>2.4</td><td>2.0</td><td>23.6</td></tr><tr><td>8 - Lists/Sets</td><td>0.0</td><td>0.0</td><td>0.9</td><td>28.8</td></tr><tr><td>9 - Simple Negation</td><td>0.0</td><td>0.0</td><td>0.3</td><td>39.1</td></tr><tr><td>10 - Indefinite Knowledge</td><td>0.0</td><td>0.0</td><td>0.0</td><td>45.0</td></tr><tr><td>11-Basic Coreference</td><td>0.0</td><td>0.0</td><td>0.1</td><td>31.7</td></tr><tr><td>12 - Conjunction</td><td>0.0</td><td>0.0</td><td>0.0</td><td>35.0</td></tr><tr><td>13 - Compound Coref.</td><td>0.0</td><td>0.0</td><td>0.0</td><td>8.7</td></tr><tr><td>14- Time Reasoning</td><td>0.0</td><td>0.2</td><td>0.1</td><td>67.2</td></tr><tr><td>15 -Basic Deduction</td><td>0.0</td><td>0.0</td><td>0.0</td><td>62.2</td></tr><tr><td>16 -Basic Induction</td><td>43.0</td><td>45.3</td><td>51.8</td><td>54.0</td></tr><tr><td>17 -Positional Reasoning</td><td>0.2</td><td>4.2</td><td>18.6</td><td>43.1</td></tr><tr><td>18 - Size Reasoning</td><td>0.5</td><td>2.1</td><td>5.3</td><td>9.0</td></tr><tr><td>19 - Path Finding</td><td>0.0</td><td>0.0</td><td>2.3</td><td>89.6</td></tr><tr><td>20 - Agents Motivations</td><td>0.0</td><td>0.0</td><td>0.0</td><td>2.3</td></tr></table>
208
+
209
+ Table 5: Examples of bAbI task 17 (left) and 18 (right), where our model predicts correct answers while MemN2N makes wrong predictions.
210
+
211
+ <table><tr><td rowspan="4">The red square is below the triangle. The pink rectangle is to the left of the red square.</td><td>The boxis bigger than the suitcase.</td></tr><tr><td>The suitcase fits inside the container.</td></tr><tr><td>The box of chocolates fits inside the container.</td></tr><tr><td>The container fits inside the chest. The chocolate fits inside the suitcase.</td></tr><tr><td>Q: Is the triangle above the pink rectangle? A: yes</td><td>Q: Is the chest bigger than the suitcase? A: yes</td></tr></table>
212
+
213
+ <table><tr><td>Story</td><td>Support</td><td>Weight</td><td>Story</td><td>Support</td><td>Weight</td></tr><tr><td>Line1: Mary journeyed to the office. …</td><td></td><td>0.00</td><td>Line 1: John went back to the kitchen. Line 13 : Sandra grabbed the apple there.</td><td>yes</td><td>0.14</td></tr><tr><td>Line 48: Sandra grabbed the apple there. Line 49: Sandra dropped the apple. Line 50:·..</td><td>yes yes</td><td>0.13 0.85</td><td>Line 29: Sandra left the apple. Line 30:·..</td><td>yes</td><td>0.79</td></tr><tr><td colspan="4">What is Sandra carrying? Answer: nothing Prediction: nothing</td><td>What is Sandra carrying? Answer: nothing Prediction: nothing</td><td></td></tr></table>
214
+
215
+ Table 6: Examples of our model’s results on QA tasks. Supporting facts are shown in the datasets which our model does not use during training. “Weight” indicates the attention weight for sentence. Our model can locate correct supporting sentences for long stories.
216
+
217
+ # 5.4 PERFORMANCE OF INTERACTIVE QUESTION ANSWERING
218
+
219
+ In this section, we evaluate the performance of various models based on IQA dataset (as described in Section 5.1). For testing, we simulate the interactive procedure by taking the predefined feedback as user’s input for the generated supplementary question, and then generating an answer. All baseline methods do not have interactive part, so they take both statements and question as input and then estimate an answer. We compare our approach (CAN+IQA) with baseline methods in terms of test error rate shown in Table 7. From the results, we can achieve the following conclusions:
220
+
221
+ • Our method significantly outperforms all baseline methods. Specifically, we can achieve $0 \%$ test error rate in task 1 and task 4 with $R _ { I Q A } = 1 . 0$ ; while the best result of baseline methods can only get $4 0 . 5 \%$ test error rate. $\mathrm { C A N + I Q A }$ benefits from more accurate context modeling, which allows it to correctly understand when to output an answer or require additional information. For those QA problems with incomplete information, it is necessary to gather the additional information from users. Randomly guessing may harm model’s performance, which makes conventional QA models difficult to converge. But our approach uses an interactive procedure to obtain user’s feedback and allows the model to provide the correct answer.
222
+
223
+ • For the baseline methods, $\mathrm { D M N } +$ and MemN2N perform similarly and do better than EncDec. Their similar performance (which are worse than our approach) is due to the limitation that they could not learn the accurate meaning of statements and questions with limited resource and then have trouble training the models. But they are superior over EncDec as they treat each input sentence separately instead of modeling very long inputs.
224
+
225
+ In addition, we also quantitatively evaluate the quality of supplementary question generated by our approach where the details can be found in Appendix A.
226
+
227
+ <table><tr><td>Methods</td><td>RIQA = 1.0</td><td>RIQA =0.9</td><td>RIQA =0.8</td><td>RIQA =0.7</td><td>RIQA =0.6</td><td>RIQA =0.5</td><td>RIQA =0.4</td><td>RIQA = 0.3</td></tr><tr><td colspan="9">IQA Task 1</td></tr><tr><td>CAN+IQA</td><td>0.00</td><td>0.00</td><td>0.10</td><td>0.50</td><td>0.60</td><td>0.70</td><td>2.10</td><td>0.40</td></tr><tr><td>DMN+</td><td>42.2</td><td>42.1</td><td>33.0</td><td>28.9</td><td>25.0</td><td>19.9</td><td>17.3</td><td>11.6</td></tr><tr><td>MemN2N</td><td>40.5</td><td>38.9</td><td>34.4</td><td>30.0</td><td>23.9</td><td>18.4</td><td>16.9</td><td>13.9</td></tr><tr><td>EncDec</td><td>53.6</td><td>54.3</td><td>52.9</td><td>53.5</td><td>51.8</td><td>50.1</td><td>45.1</td><td>44.8</td></tr><tr><td colspan="9">IQA Task 4</td></tr><tr><td>CAN+IQA</td><td>0.00</td><td>1.30</td><td>0.10</td><td>0.60</td><td>0.60</td><td>1.10</td><td>1.40</td><td>1.20</td></tr><tr><td>DMN+</td><td>53.5</td><td>56.1</td><td>50.4</td><td>40.7</td><td>34.5</td><td>27.4</td><td>23.4</td><td>16.6</td></tr><tr><td>MemN2N</td><td>50.4</td><td>50.1</td><td>41.8</td><td>36.1</td><td>29.5</td><td>25.3</td><td>18.7</td><td>15.8</td></tr><tr><td>EncDec</td><td>55.9</td><td>54.9</td><td>52.5</td><td>49.2</td><td>45.9</td><td>38.9</td><td>30.4</td><td>24.2</td></tr><tr><td colspan="9">IQA Task7</td></tr><tr><td>CAN+IQA</td><td>0.30</td><td>2.10</td><td>2.50</td><td>1.80</td><td>2.00</td><td>0.70</td><td>0.20</td><td>0.30</td></tr><tr><td>DMN+</td><td>54.1</td><td>50.3</td><td>47.7</td><td>42.3</td><td>38.1</td><td>33.9</td><td>27.7</td><td>27.6</td></tr><tr><td>MemN2N</td><td>54.6</td><td>52.0</td><td>46.3</td><td>40.8</td><td>36.1</td><td>32.4</td><td>23.3</td><td>19.6</td></tr><tr><td>EncDec</td><td>55.5</td><td>50.9</td><td>48.6</td><td>44.7</td><td>39.1</td><td>32.3</td><td>31.9</td><td>26.6</td></tr></table>
228
+
229
+ Table 7: Performance comparison of various models in terms of test error rate $( \% )$ based on interactive question answering datasets with different IQA ratios.
230
+
231
+ # 5.5 QUALITATIVE ANALYSIS OF INTERACTIVE MECHANISM
232
+
233
+ In this section, we qualitatively show the attention weights over input sentences generated by our model on both QA and IQA data. We train our model $( \mathrm { C A N + I Q A } )$ on task 1 of ibAbI dataset with $Q _ { I Q A } = 0 . 9$ , and randomly select one IQA example from the testing data. Then we do the prediction on this IQA problem. In addition, we change this instance to a QA problem by replacing the question “Where is she?” with “Where is Sandra?”, and then do the prediction as well. The prediction results on both QA and IQA problems are shown in Table 8. From the results, we observe the following: 1) The attention that uses user’s feedback focuses on the key relevant sentence while the attention without feedback only focuses on an unrelated sentence. This happens because utilizing user’s feedback allows the model to understand a question better and locate the relevant input sentences. This illustrates the effectiveness of an interactive mechanism on addressing questions that require additional information. 2) The attention on both two problems can finally focus on the relevant sentences, showing the usefulness of our model for solving different types of QA problems.
234
+
235
+ # 6 CONCLUSION
236
+
237
+ In this paper, we present a self-adaptive model, CAN, which learns more accurate representations for statements and questions. More importantly, our model is aware what it knows and what it does not know within the context of the story, and takes an interactive mechanism to answer a question. Hence, our model takes an important step towards having a natural and intelligent conversation with humans. In the future, we plan to employ more powerful attention mechanisms with explicit unknown state modeling and multi-round feedback-guided fine-tuning to make the model fully selfaware, self-adaptive, and self-taught. We also plan to expand our results to harder co-reference and interactive visual QA tasks with uncertainty modeling.
238
+
239
+ Table 8: Examples of sentence attention weights obtained by our model in both QA and IQA data. “Before IM” indicates the sentence attention weights over input sentences before the user provides a feedback. “After IM” indicates the sentence attention weights updated by user’s feedback. The attention weights with value as 0.00 are very small. The results show that our approach can attend the key relevant sentences for both QA and IQA problems.
240
+
241
+ <table><tr><td rowspan=1 colspan=1>Input Sentences</td><td rowspan=1 colspan=1>Support</td><td rowspan=1 colspan=2>QA Data</td><td rowspan=1 colspan=1>Before IM</td><td rowspan=1 colspan=1>After IM</td></tr><tr><td rowspan=9 colspan=1>Mary journeyed to the kitchen.Sandra journeyed to the kitchen.Mary journeyed to the bedroom.Sandra moved to the bathroom.Sandra travelled to the office.Mary journeyed to the garden.Daniel travelled to the bathroom.Mary journeyed to the kitchen. John journeyed to the office.Mary moved to the bathroom.</td><td rowspan=4 colspan=1>yes</td><td rowspan=1 colspan=2>0.00</td><td rowspan=1 colspan=1>0.99</td><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=1 colspan=2>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=2 colspan=1>0.000.000.00</td></tr><tr><td rowspan=1 colspan=2>0.000.00</td><td rowspan=1 colspan=1>0.000.00</td></tr><tr><td rowspan=1 colspan=2>0.99</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.99</td></tr><tr><td rowspan=5 colspan=1></td><td rowspan=2 colspan=2>0.000.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=5 colspan=1>0.000.000.000.000.00</td></tr><tr><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=2 colspan=2>0.00</td><td rowspan=2 colspan=1>0.00</td></tr><tr><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=2>0.000.00</td><td rowspan=1 colspan=1>0.000.00</td></tr><tr><td rowspan=1 colspan=2></td><td rowspan=1 colspan=2>Q: Where is Sandra?A: Office</td><td rowspan=1 colspan=2>Q: Where is she? SQ: Who is she?FB: SandraA: Office</td></tr></table>
242
+
243
+ # REFERENCES
244
+
245
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In ICLR, 2015.
246
+
247
+ Satanjeev Banerjee and Alon Lavie. Meteor: An automatic metric for mt evaluation with improved correlation with human judgments. In ACL workshop, 2005.
248
+
249
+ Y. Bengio, P. Simard, and P. Frasconi. Learning long-term dependencies with gradient descent is difficult. Trans. Neur. Netw., 5(2):157–166, 1994. ISSN 1045-9227.
250
+
251
+ Antoine Bordes and Jason Weston. Learning end-to-end goal-oriented dialog. CoRR, abs/1605.07683, 2016.
252
+
253
+ Kyunghyun Cho, Bart van Merrienboer, C¸ aglar Gulc¸ehre, Dzmitry Bahdanau, Fethi Bougares, Hol- ¨ ger Schwenk, and Yoshua Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In EMNLP, pp. 1724–1734, 2014.
254
+
255
+ Anthony Fader, Luke Zettlemoyer, and Oren Etzioni. Open question answering over curated and extracted knowledge bases. In KDD, pp. 1156–1165, 2014.
256
+
257
+ David Golub and Xiaodong He. Character-level question answering with attention. CoRR, abs/1604.00727, 2016.
258
+
259
+ Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. CoRR, abs/1410.5401, 2014.
260
+
261
+ Karl Moritz Hermann, Tomas Kocisk ´ y, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa ´ Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. In NIPS, pp. 1693– 1701, 2015.
262
+
263
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 9(8): 1735–1780, 1997.
264
+
265
+ Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014.
266
+ Ankit Kumar, Ozan Irsoy, Peter Ondruska, Mohit Iyyer, James Bradbury, Ishaan Gulrajani, Victor Zhong, Romain Paulus, and Richard Socher. Ask me anything: Dynamic memory networks for natural language processing. In ICML, pp. 1378–1387, 2016.
267
+ Jiasen Lu, Jianwei Yang, Dhruv Batra, and Devi Parikh. Hierarchical question-image co-attention for visual question answering. CoRR, abs/1606.00061, 2016.
268
+ Minh-Thang Luong, Hieu Pham, and Christopher D. Manning. Effective approaches to attentionbased neural machine translation. CoRR, abs/1508.04025, 2015.
269
+ Volodymyr Mnih, Nicolas Heess, Alex Graves, and Koray Kavukcuoglu. Recurrent models of visual attention. In NIPS, pp. 2204–2212, 2014.
270
+ Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: A method for automatic evaluation of machine translation. In Association for Computational Linguistics, pp. 311–318, 2002.
271
+ Sukhbaatar Sainbayar, Szlam Arthur, Weston Jason, and Fergus Rob. End-to-end memory networks. In NIPS, pp. 2440–2448, 2015.
272
+ Denis Savenkov and Eugene Agichtein Emory. When a knowledge base is not enough: Question answering over knowledge bases with external text data. In SIGIR, pp. 235–244, 2016.
273
+ Paul Hongsuck Seo, Zhe Lin, Scott Cohen, Xiaohui Shen, and Bohyung Han. Hierarchical attention networks. CoRR, abs/1606.02393, 2016.
274
+ Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In NIPS, pp. 3104–3112. 2014.
275
+ Jason Weston. Dialog-based language learning. NIPS, 2016.
276
+ Jason Weston, Antoine Bordes, Sumit Chopra, and Tomas Mikolov. Towards ai-complete question answering: A set of prerequisite toy tasks. CoRR, abs/1502.05698, 2015.
277
+ Qi Wu, Peng Wang, Chunhua Shen, Anton van den Hengel, and Anthony R. Dick. Ask me anything: Free-form visual question answering based on knowledge from external sources. CoRR, abs/1511.06973, 2015.
278
+ Caiming Xiong, Stephen Merity, and Richard Socher. Dynamic memory networks for visual and textual question answering. In ICML, pp. 2397–2406, 2016.
279
+ Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron C. Courville, Ruslan Salakhutdinov, Richard S. Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. CoRR, abs/1502.03044, 2015.
280
+ Zichao Yang, Xiaodong He, Jianfeng Gao, Li Deng, and Alexander J. Smola. Stacked attention networks for image question answering. CoRR, abs/1511.02274, 2015.
281
+ Zichao Yang, Diyi Yang, Chris Dyer, Xiaodong He, Alexander J. Smola, and Eduard H. Hovy. Hierarchical attention networks for document classification. In HLT, pp. 1480–1489, 2016.
282
+ Wojciech Zaremba, Ilya Sutskever, and Oriol Vinyals. Recurrent neural network regularization. CoRR, abs/1409.2329, 2014.
283
+
284
+ # A SUPPLEMENTARY QUESTION ANALYSIS
285
+
286
+ We quantitatively evaluate the quality of supplementary question generated by our model based on IQA dataset. All baseline methods are designed to only predict an answer, none of them can generate a question. Thus we design another baseline method to generate supplementary question based on EncDec, and denote it as $E n c D e c ^ { * }$ . Specifically, in training procedure, $E n c D e c ^ { * }$ takes statements and questions as input. If the supplementary question is available, it is used as output; otherwise the corresponding answer is viewed as output. Similar to our approach, the EOS symbol is used to determine whether the generated sentence is question or not, where the question ends with question mark and the answer ends with period symbol.
287
+
288
+ To test model’s ability to generate supplementary question, we define some following metrics. Suppose the number of problems is $N$ , and the number of problems having supplementary question is $N _ { s }$ . Then $N _ { a } = N - N _ { s }$ is the number of remaining problems. Let $\begin{array} { r } { S Q u e A c c = { \frac { \hat { N } _ { s } } { N _ { s } } } } \end{array}$ Nˆs is the fraction of IQA problems which can be correctly estimated, and $\begin{array} { r } { A n s A c c = \frac { \hat { N } _ { a } } { N _ { a } } } \end{array}$ is the fraction of remaining problems which can be correctly estimated as QA problem. So $\begin{array} { r } { S Q u e A n s A c c = \frac { \hat { N } _ { s } + \hat { N } _ { a } } { N } } \end{array}$ = Nˆs+Nˆa is the overall accuracy. In addition, the widely used BLEU (Papineni et al., 2002) and METEROR (Banerjee & Lavie, 2005) are also adopted to evaluate the quality of generated supplementary question. The results of our method and baseline method are presented in Table 9.
289
+
290
+ From the results, we can observe that 1) Two models can almost correctly determine whether it is time to output a question or not; 2) Two models are able to generate the correct supplementary questions whose contents exactly match with the ground truth. There is no surprise that $E n c D e c ^ { * }$ also performs well in generating question, because it is specifically designed for only outputting questions. Thus, if given enough training data, $E n c D e c ^ { * }$ could predict good questions. However, the limitation is that it cannot predict a supplementary question and an answer at the same time. Different from $E n c D e c ^ { * }$ , our approach can accurately know when to output an answer or when to generate a supplementary question.
291
+
292
+ <table><tr><td>IQA Ratio</td><td>Method</td><td>SQueAcc</td><td>AnsAcc</td><td>SQueAnsAcc</td><td>BLEU-1</td><td>BLEU-4</td><td>METEOR</td></tr><tr><td colspan="8">IQA Task 1</td></tr><tr><td>0.8</td><td>CAN+IQA</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td></td><td>EncDec*</td><td>100%</td><td>99.5%</td><td>99.9%</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td colspan="8">IQA Task 4</td></tr><tr><td>0.8</td><td>CAN+IQA</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td></td><td>EncDec*</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td colspan="8">IQA Task 7</td></tr><tr><td>0.8</td><td>CAN+IQA</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td></td><td>EncDec*</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td></tr></table>
293
+
294
+ Table 9: Performance comparison of the generated supplementary question quality with $R _ { I Q A }$ as 0.8. Both two methods achieve $1 0 0 \%$ under all metrics in all tasks with other different $R _ { I Q A }$ values.
parse/train/SkyQWDcex/SkyQWDcex_content_list.json ADDED
@@ -0,0 +1,1460 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "A CONTEXT-AWARE ATTENTION NETWORK FOR INTERACTIVE QUESTION ANSWERING ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 99,
9
+ 751,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Huayu $\\mathbf { L i } ^ { 1 : }$ ∗, Martin Renqiang $\\mathbf { M } \\mathbf { i n } ^ { 2 }$ , Yong $\\mathbf { G e ^ { 3 } }$ , Asim Kadav2 ",
17
+ "bbox": [
18
+ 183,
19
+ 172,
20
+ 609,
21
+ 189
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Department of Computer Science, UNC Charlotte1 Machine Learning Group, NEC Laboratories America2 Management Information Systems, University of Arizona3 hli38@uncc.edu, renqiang@nec-labs.com, yongge@email.arizona.edu, asim@nec-labs.com ",
28
+ "bbox": [
29
+ 184,
30
+ 189,
31
+ 607,
32
+ 258
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "ABSTRACT ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 454,
42
+ 296,
43
+ 544,
44
+ 310
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "We develop a new model for Interactive Question Answering (IQA), using GatedRecurrent-Unit recurrent networks (GRUs) as encoders for statements and questions, and another GRU as a decoder for outputs. Distinct from previous work, our approach employs context-dependent word-level attention for more accurate statement representations and question-guided sentence-level attention for better context modeling. Employing these mechanisms, our model accurately understands when it can output an answer or when it requires generating a supplementary question for additional input. When available, user’s feedback is encoded and directly applied to update sentence-level attention to infer the answer. Extensive experiments on QA and IQA datasets demonstrate quantitatively the effectiveness of our model with significant improvement over conventional QA models. ",
51
+ "bbox": [
52
+ 233,
53
+ 327,
54
+ 764,
55
+ 479
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 178,
65
+ 507,
66
+ 336,
67
+ 523
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "The ultimate goal of Question Answering (QA) research is to build intelligent systems capable of naturally communicating with humans, which poses a major challenge for natural language processing and machine learning. Inspired by recent success of sequence-to-sequence models with an encoder-decoder framework (Sutskever et al., 2014; Cho et al., 2014), researchers have attempted to apply variants of such models with explicit memory and attention to QA tasks, aiming to move a step further from machine learning to machine reasoning (Sainbayar et al., 2015; Kumar et al., 2016; Xiong et al., 2016). Similarly, all these models employ encoders to map statements and questions to fixed-length feature vectors, and a decoder to generate outputs. Empowered by the adoption of memory and attention, they have achieved remarkable success on several challenging datasets, including the recently acclaimed Facebook bAbI dataset. ",
74
+ "bbox": [
75
+ 174,
76
+ 539,
77
+ 825,
78
+ 678
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "However, previous models suffer from the following important limitations. First, they fail to model context-dependent meaning of words. Different words may have different meanings in different contexts, which increases the difficulty of extracting the essential semantic logic flow of each sentence in different paragraphs. Second, many existing models only work in ideal QA settings and fail to address the uncertain situations under which models require additional user input to gather complete information to answer a given question. As shown in Table 1, the example on the left is an ideal QA problem. We can clearly understand what the question is and then locate the relevant sentences to generate the answer. However, it is hard to answer the question in the right example, because there are two types of bedrooms mentioned in the story and we do not know which bedroom the user refers to. These scenarios with incomplete information naturally appear in human conversations, and thus, effectively handling them is a key capability of intelligent QA models. ",
85
+ "bbox": [
86
+ 174,
87
+ 685,
88
+ 825,
89
+ 838
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "To address the challenges presented above, we propose a Context-aware Attention Network (CAN) to learn fine-grained representations for input sentences, and develop a mechanism to interact with the user for comprehensively understanding a given question. Specifically, we employ two-level attention applied at word level and sentence level to compute representations of all input sentences. ",
96
+ "bbox": [
97
+ 174,
98
+ 845,
99
+ 823,
100
+ 901
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "The office is north of the kitchen. The garden is south of the kitchen. Q: What is north of the kitchen? A: Office ",
107
+ "bbox": [
108
+ 222,
109
+ 102,
110
+ 450,
111
+ 154
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "The master bedroom is east of the garden. The guest bedroom is east of the office. Q: What is the bedroom east of? A: Unknown ",
118
+ "bbox": [
119
+ 496,
120
+ 101,
121
+ 772,
122
+ 156
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "Table 1: Two examples of QA problems. Left is an ideal QA example, where the question is very clear. Right is an example with incomplete information, where the question is ambiguous and it is difficult to provide an answer only using the input statements. ",
129
+ "bbox": [
130
+ 176,
131
+ 169,
132
+ 823,
133
+ 210
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "The context information extracted from the input story is allowed to influence the attention over each word, and governs the word semantic meaning contributing to a sentence representation. In addition, an interactive mechanism is activated to generate a supplementary question for the user when the model feels that it does not have complete information to answer a given question. User’s feedback is then encoded and exploited to attend over all input sentences to infer the answer. Our proposed model CAN can be viewed as an encoder-decoder approach augmented with two-level attention and an interactive mechanism, rendering our model self-adaptive, as illustrated in Figure 1. ",
140
+ "bbox": [
141
+ 174,
142
+ 227,
143
+ 825,
144
+ 324
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "Our contributions in this paper are as follows: (i) We develop a new encoder-decoder model called CAN for question answering with two-level attention. Due to the new attention mechanism, our model avoids the necessity of multiple-hop attention, required by previous QA models, and knows when it can readily output an answer and when it needs additional information. (ii) We augment the encoder-decoder framework for QA with an interactive mechanism for handling user’s feedback, which immediately changes sentence-level attention to infer the final answer without additional model training. (iii) We introduce a new dataset based on the bAbI dataset, namely ibAbI, for IQA tasks. $( i \\nu )$ Extensive experiments show that our approach outperforms state-of-the-art models on both QA and IQA datasets. Specifically, our approach achieves $4 0 \\%$ improvement over traditional QA models (e.g., MemN2N and $\\mathrm { D M N + }$ ) on IQA datasets. ",
151
+ "bbox": [
152
+ 173,
153
+ 332,
154
+ 825,
155
+ 470
156
+ ],
157
+ "page_idx": 1
158
+ },
159
+ {
160
+ "type": "image",
161
+ "img_path": "images/6275a64c37ccaf482ebb09b70800a184a280d191381c227afb608db82191bef4.jpg",
162
+ "image_caption": [
163
+ "Figure 1: An example of QA problem using CAN. "
164
+ ],
165
+ "image_footnote": [],
166
+ "bbox": [
167
+ 236,
168
+ 482,
169
+ 758,
170
+ 662
171
+ ],
172
+ "page_idx": 1
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "2 RELATED WORK ",
177
+ "text_level": 1,
178
+ "bbox": [
179
+ 176,
180
+ 710,
181
+ 344,
182
+ 727
183
+ ],
184
+ "page_idx": 1
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "Recent work on QA has been heavily influenced by research on various models with attention and/or memory. Most of these models employ an encoder-decoder framework, and have been successfully applied to image classification (Seo et al., 2016), image captioning (Xu et al., 2015; Mnih et al., 2014), machine translation (Cho et al., 2014; Bahdanau et al., 2015; Luong et al., 2015), document classification (Yang et al., 2016), and textual/visual QA (Sainbayar et al., 2015; Yang et al., 2015; Lu et al., 2016; Kumar et al., 2016; Xiong et al., 2016). For textual QA in the form of statementsquestion-answer triplets, Sainbayar et al. (2015) utilizes an external memory module. It maps each input sentence to an input representation space regarded as a memory component. The output representation is calculated by summarizing over input representations with different attention weights. This single-layer memory can be extended to multi-layer memory by reasoning the content and the question multiple times. Instead of simply stacking the memory layers, Kumar et al. (2016) have introduced a dynamic memory network (DMN) to update the memory vectors through a modified GRU, in which the gate weight is trained in a supervised fashion. To improve DMN by training without supervision, Xiong et al. (2016) encode input sentences with a bidirectional GRU and then utilize an attention-based GRU to summarize these input sentences. Neural Turing Machine (NTM) (Graves et al., 2014), a model with content and location-based memory addressing mechanisms, has also been used for QA tasks recently. There is other recent work about QA using external resources (Wu et al., 2015; Fader et al., 2014; Savenkov & Emory, 2016; Hermann et al., 2015; Golub & He, 2016), and exploring dialog tasks (Weston, 2016; Bordes & Weston, 2016). ",
189
+ "bbox": [
190
+ 173,
191
+ 743,
192
+ 825,
193
+ 924
194
+ ],
195
+ "page_idx": 1
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "",
200
+ "bbox": [
201
+ 174,
202
+ 103,
203
+ 825,
204
+ 188
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "Our model in this paper also addresses textual QA in the form of statements-question-answer triplets, but it differs from prior work in two aspects. First, in our attention network, the word attention are context-dependent for generating accurate sentence representations and the sentence attention are question-guided for generating context representation. Second, this new attention mechanism helps our model understand when it can readily output an answer and when it can generate a supplementary question for activating the user interaction. Incorporating user’s feedback does not require additional model training and this property makes our model highly self-adaptive. ",
211
+ "bbox": [
212
+ 174,
213
+ 194,
214
+ 825,
215
+ 292
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "3 GATED RECURRENT UNIT NETWORKS",
222
+ "text_level": 1,
223
+ "bbox": [
224
+ 174,
225
+ 316,
226
+ 526,
227
+ 333
228
+ ],
229
+ "page_idx": 2
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "Gated Recurrent Unit (GRU) (Cho et al., 2014) is the basic building block of our model for IQA. GRU has been widely adopted for many NLP tasks, such as machine translation (Bahdanau et al., 2015) and language modeling (Zaremba et al., 2014). GRU improves Long Short-term Memory (LSTM) (Hochreiter & Schmidhuber, 1997) by removing the cell component and making each hidden state adaptively capture the dependencies over different time scales using reset and update gates. For each time step $t$ with input $\\mathbf { x } ^ { t }$ and previous hidden state $\\mathbf { h } ^ { t - 1 }$ , we compute the updated hidden state $\\mathbf { h } ^ { t } = G R U ( \\mathbf { \\bar { h } } ^ { t - 1 } , \\mathbf { x } ^ { t } )$ by, ",
234
+ "bbox": [
235
+ 173,
236
+ 352,
237
+ 825,
238
+ 450
239
+ ],
240
+ "page_idx": 2
241
+ },
242
+ {
243
+ "type": "equation",
244
+ "img_path": "images/922424c60c0fe833417fcfbfbb071439d8dda400d17ad7f567682baa2ae62cc6.jpg",
245
+ "text": "$$\n\\begin{array} { r l r } { { \\mathbf r } ^ { t } = \\sigma ( { \\mathbf U } _ { r } { \\mathbf x } ^ { t } + { \\mathbf W } _ { r } { \\mathbf h } ^ { t - 1 } + { \\mathbf b } _ { r } ) , } & { } & { { \\mathbf z } ^ { t } = \\sigma ( { \\mathbf U } _ { z } { \\mathbf x } ^ { t } + { \\mathbf W } _ { z } { \\mathbf h } ^ { t - 1 } + { \\mathbf b } _ { z } ) , } \\\\ { \\widetilde { { \\mathbf h } } ^ { t } = t a n h ( { \\mathbf U } _ { h } { \\mathbf x } ^ { t } + { \\mathbf W } _ { h } ( { \\mathbf r } ^ { t } \\odot { \\mathbf h } ^ { t - 1 } ) + { \\mathbf b } _ { h } ) , } & { } & { { \\mathbf h } ^ { t } = { \\mathbf z } ^ { t } \\odot { \\mathbf h } ^ { t - 1 } + ( { \\mathbf 1 } - { \\mathbf z } ^ { t } ) \\odot \\widetilde { { \\mathbf h } } ^ { t } , } \\end{array}\n$$",
246
+ "text_format": "latex",
247
+ "bbox": [
248
+ 220,
249
+ 460,
250
+ 776,
251
+ 503
252
+ ],
253
+ "page_idx": 2
254
+ },
255
+ {
256
+ "type": "text",
257
+ "text": "where $\\sigma$ is the sigmoid activation function, $\\odot$ is an element-wise product, $\\mathbf { U } _ { r } , \\mathbf { U } _ { z } , \\mathbf { U } _ { h } \\in \\mathbb { R } ^ { K \\times D }$ , $\\mathbf { W } _ { r } , \\mathbf { W } _ { z } , \\mathbf { W } _ { h } \\in \\mathbf { \\bar { \\mathbb { R } } } ^ { K \\times K } , \\mathbf { b } _ { r } , \\mathbf { b } _ { z } , \\mathbf { b } _ { h } \\in \\mathbb { R } ^ { K \\times 1 } ,$ $K$ is the hidden size and $D$ is the input size. ",
258
+ "bbox": [
259
+ 171,
260
+ 515,
261
+ 823,
262
+ 544
263
+ ],
264
+ "page_idx": 2
265
+ },
266
+ {
267
+ "type": "text",
268
+ "text": "4 CONTEXT-AWARE ATTENTION NETWORK ",
269
+ "text_level": 1,
270
+ "bbox": [
271
+ 174,
272
+ 569,
273
+ 549,
274
+ 585
275
+ ],
276
+ "page_idx": 2
277
+ },
278
+ {
279
+ "type": "text",
280
+ "text": "In this section, we first illustrate the proposed model CAN (§ 4.1), including the question module $( \\ S ~ 4 . 2 )$ , the input module $( \\ S \\ 4 . 3 )$ and the answer module $( \\ S \\ 4 . 4 )$ . We then describe each of these modules in detail. Finally, we elaborate the training procedure of CAN $( \\ S 4 . 5 )$ . ",
281
+ "bbox": [
282
+ 174,
283
+ 603,
284
+ 823,
285
+ 646
286
+ ],
287
+ "page_idx": 2
288
+ },
289
+ {
290
+ "type": "text",
291
+ "text": "4.1 FRAMEWORK ",
292
+ "text_level": 1,
293
+ "bbox": [
294
+ 174,
295
+ 667,
296
+ 308,
297
+ 683
298
+ ],
299
+ "page_idx": 2
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "Given a story represented by $N$ input sentences (or statements), i.e., $( l _ { 1 } , \\cdots , l _ { N } )$ , and a question $q$ , our goal is to generate an answer $a$ . Each sentence $l _ { t }$ includes a sequence of $N _ { t }$ words, denoted as $( w _ { 1 } ^ { t } , \\cdot \\cdot \\cdot , w _ { N _ { t } } ^ { t } )$ , and a question with $N _ { q }$ words is represented as $( w _ { 1 } ^ { \\bar { q } } , \\cdot \\cdot \\cdot , w _ { N _ { q } } ^ { q } )$ . Let $V$ denote the size of dictionary, including the words from each $l _ { t }$ , $q$ and $a$ , and end-of-sentence (EOS) symbols. ",
304
+ "bbox": [
305
+ 173,
306
+ 695,
307
+ 825,
308
+ 756
309
+ ],
310
+ "page_idx": 2
311
+ },
312
+ {
313
+ "type": "text",
314
+ "text": "The whole framework of our model is shown in Figure 2, consisting of the following three key parts: ",
315
+ "bbox": [
316
+ 169,
317
+ 761,
318
+ 821,
319
+ 776
320
+ ],
321
+ "page_idx": 2
322
+ },
323
+ {
324
+ "type": "text",
325
+ "text": "• Question Module: The question module encodes the target question into a vector representation. • Input Module: The input module encodes a set of input sentences into a vector representation. • Answer Module: The answer module generates an answer based on the outputs of question and input modules. Unlike traditional QA models, it has two choices, either to output an answer immediately or to interact with the user for further information. Hence, if the model lacks sufficient evidence for answer prediction based on the existing knowledge at current timestamp, an interactive mechanism is enabled. Specifically, the model generates a supplementary question, and the user needs to provide a feedback, which is utilized to estimate an answer. ",
326
+ "bbox": [
327
+ 171,
328
+ 791,
329
+ 825,
330
+ 924
331
+ ],
332
+ "page_idx": 2
333
+ },
334
+ {
335
+ "type": "image",
336
+ "img_path": "images/9f6f0cf956ecfb81ce23623065fdbe1e81f6922ac6b507e2fd60d3e235b3fc56.jpg",
337
+ "image_caption": [
338
+ "Figure 2: The illustration of the proposed model, consisting of a question module, an input module and an answer module. The question module maps the question sentence into a sentence level space. The input module generates a context representation based on input sentences. The answer module has a binary choice, either to generate an answer immediately or to take an interactive mechanism. "
339
+ ],
340
+ "image_footnote": [],
341
+ "bbox": [
342
+ 171,
343
+ 101,
344
+ 826,
345
+ 335
346
+ ],
347
+ "page_idx": 3
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "4.2 QUESTION MODULE ",
352
+ "text_level": 1,
353
+ "bbox": [
354
+ 174,
355
+ 421,
356
+ 356,
357
+ 435
358
+ ],
359
+ "page_idx": 3
360
+ },
361
+ {
362
+ "type": "text",
363
+ "text": "Suppose a question is a sequence of $N _ { q }$ words, we encode each word $w _ { j }$ into a $K _ { w }$ -dimensional vector space $\\mathbf { x } _ { j } ^ { q }$ using an embedding matrix $\\mathbf { W } _ { w } ~ \\in ~ \\mathbb { R } ^ { K _ { w } \\times V }$ , i.e., $\\mathbf { x } _ { j } ^ { q } \\ = \\ \\mathbf { W } _ { w } [ w _ { j } ]$ , where $[ w _ { j } ]$ is a one-hot vector associated with word $w _ { j }$ . The sequence order within a sentence significantly affects each word’s semantic meaning due to its dependence on the previous words. Thus, a GRU is employed by taking each word vector $\\mathbf { x } _ { j } ^ { q }$ as input and updating the hidden state $\\mathbf { g } _ { j } ^ { q } \\in \\mathbb { R } ^ { K _ { h } \\times 1 }$ as: ",
364
+ "bbox": [
365
+ 173,
366
+ 446,
367
+ 825,
368
+ 520
369
+ ],
370
+ "page_idx": 3
371
+ },
372
+ {
373
+ "type": "equation",
374
+ "img_path": "images/9686604b9aed49808ce0071485952292d569bc37387b96bfc2d21296fba30651.jpg",
375
+ "text": "$$\n\\mathbf { g } _ { j } ^ { q } = G R U _ { w } ( \\mathbf { g } _ { j - 1 } ^ { q } , \\mathbf { x } _ { j } ^ { q } ) ,\n$$",
376
+ "text_format": "latex",
377
+ "bbox": [
378
+ 416,
379
+ 529,
380
+ 580,
381
+ 549
382
+ ],
383
+ "page_idx": 3
384
+ },
385
+ {
386
+ "type": "text",
387
+ "text": "where the subscript of GRU is used to distinguish other GRUs used in the following sections. The hidden state $\\mathbf { g } _ { j } ^ { q }$ can be regarded as the annotation vector of word $w _ { j }$ by incorporating the word order information. We also explore a variety of encoding schema, such as LSTM and RNN. However, LSTM is prone to overfitting due to large number of parameters, and RNN has a poor performance because of exploding and vanishing gradients (Bengio et al., 1994). ",
388
+ "bbox": [
389
+ 173,
390
+ 553,
391
+ 825,
392
+ 625
393
+ ],
394
+ "page_idx": 3
395
+ },
396
+ {
397
+ "type": "text",
398
+ "text": "In addition, each word contributes differently to the representation of a question. For example, in a question ‘Where is the football?’, ‘where’ and ‘football’ play a critical role in summarizing this sentence. Therefore, an attention mechanism is introduced to generate a question representation by focusing on the important words for their semantic meaning. A positive weight $\\gamma _ { j }$ is placed on each word to indicate the relative importance of contribution to the representation of the question. Specifically, this weight is measured as the similarity of corresponding word annotation vector $\\mathbf { g } _ { j }$ and a word level latent vector $\\mathbf { v } \\in \\mathbb { R } ^ { K _ { h } \\times 1 }$ for question which is jointly learned during the training process. The question representation $\\mathbf { u } \\in \\mathbb { R } ^ { K _ { c } \\times \\mathbf { \\bar { 1 } } }$ is then generated by a weighted summation of the word annotation vectors and corresponding important weights, where we also use one-layer MLP to transfer it from sentence-level space into context-level space, ",
399
+ "bbox": [
400
+ 173,
401
+ 630,
402
+ 825,
403
+ 771
404
+ ],
405
+ "page_idx": 3
406
+ },
407
+ {
408
+ "type": "equation",
409
+ "img_path": "images/8b14046121b47717b9b4018151123e141e1a6284fb44a0172e23952e24580e0f.jpg",
410
+ "text": "$$\n\\begin{array} { r l r } & { \\gamma _ { j } = { s o f t m a x } ( { { \\bf { v } } ^ { T } } { \\bf { g } } _ { j } ^ { q } ) , } & { { \\bf { u } } = { { \\bf { W } } _ { c h } } \\displaystyle \\sum _ { j = 1 } ^ { N _ { q } } \\gamma _ { j } { \\bf { g } } _ { j } ^ { q } + { \\bf { b } } _ { c } ^ { ( q ) } , } \\\\ & { n a x ~ \\mathrm { i s ~ d e f i n e d ~ a s ~ } s o f t m a x ( { x _ { i } } ) = \\frac { { \\exp ( { x _ { i } } ) } } { \\sum _ { j ^ { \\prime } } \\exp ( { x _ { j ^ { \\prime } } } ) } , { { \\bf { W } } _ { c h } } \\in { { \\mathbb R } } ^ { K _ { c } \\times K _ { h } } , \\mathrm { a n d ~ } { \\bf { b } } _ { c } ^ { ( q ) } \\in \\Omega } \\end{array}\n$$",
411
+ "text_format": "latex",
412
+ "bbox": [
413
+ 256,
414
+ 770,
415
+ 761,
416
+ 842
417
+ ],
418
+ "page_idx": 3
419
+ },
420
+ {
421
+ "type": "text",
422
+ "text": "where sof t $\\mathbf { b } _ { c } ^ { ( q ) } \\in \\mathbb { R } ^ { K _ { c } \\times 1 }$ ",
423
+ "bbox": [
424
+ 169,
425
+ 815,
426
+ 815,
427
+ 839
428
+ ],
429
+ "page_idx": 3
430
+ },
431
+ {
432
+ "type": "text",
433
+ "text": "4.3 INPUT MODULE ",
434
+ "text_level": 1,
435
+ "bbox": [
436
+ 174,
437
+ 854,
438
+ 326,
439
+ 869
440
+ ],
441
+ "page_idx": 3
442
+ },
443
+ {
444
+ "type": "text",
445
+ "text": "Input module aims at generating a representation for input sentences, including a sentence encoder and a context encoder. Sentence encoder computes a sentence representation, and context encoder calculates a representation of input sentences, both of which are introduced in the following sections. ",
446
+ "bbox": [
447
+ 174,
448
+ 881,
449
+ 825,
450
+ 924
451
+ ],
452
+ "page_idx": 3
453
+ },
454
+ {
455
+ "type": "text",
456
+ "text": "4.3.1 SENTENCE ENCODER ",
457
+ "text_level": 1,
458
+ "bbox": [
459
+ 174,
460
+ 103,
461
+ 377,
462
+ 117
463
+ ],
464
+ "page_idx": 4
465
+ },
466
+ {
467
+ "type": "text",
468
+ "text": "For each input sentence $l _ { t }$ , containing a sequence of $N _ { t }$ words $( w _ { 1 } , \\cdots , w _ { N _ { t } } )$ , similar to the question module, each word $w _ { i }$ is embedded into word space $\\mathbf { x } _ { i } ^ { t } \\in \\mathbb { R } ^ { K _ { w } \\times 1 }$ with the embedding matrix $\\mathbf { W } _ { w }$ , and a recurrent neural network is used to capture the context information from the words which have already been generated in the same sentence. Let $\\mathbf { h } _ { i } ^ { t } \\in \\mathbb { R } ^ { K _ { h } \\times 1 }$ denote the hidden state which can be interpreted as the word annotation in the input space. A GRU retrieves each word annotation by taking word vector as input and relying on previous hidden state, ",
469
+ "bbox": [
470
+ 173,
471
+ 127,
472
+ 825,
473
+ 212
474
+ ],
475
+ "page_idx": 4
476
+ },
477
+ {
478
+ "type": "equation",
479
+ "img_path": "images/f79f6de5ce49e340d423007b9263cab353bd87acab8e16df2db04716cf012cd5.jpg",
480
+ "text": "$$\n\\mathbf { h } _ { i } ^ { t } = G R U _ { w } ( \\mathbf { h } _ { i - 1 } ^ { t } , \\mathbf { x } _ { i } ^ { t } ) .\n$$",
481
+ "text_format": "latex",
482
+ "bbox": [
483
+ 418,
484
+ 218,
485
+ 580,
486
+ 237
487
+ ],
488
+ "page_idx": 4
489
+ },
490
+ {
491
+ "type": "text",
492
+ "text": "In Eq.(4), each word annotation vector takes the sequence order into consideration to learn its semantic meaning based on previous information within a sentence through a recurrent neural network. A question answering system is usually given multiple input sentences which often form a story together. A single word has different meaning in the different stories. Learning a single sentence context at which a word is located is insufficient to understand the meaning of this word, in particular when the sentence is placed in a story context. In other words, only modeling a sequence of words prior to a word within a sentence may lose some important information which results in the failure of the generation of sentence representation. Hence, we take the whole context into account as well to appropriately characterize each word and well understand this sentence’s meaning. Suppose $\\mathbf { s } _ { t - 1 } \\in \\overline { { \\mathbb { R } } } ^ { K _ { c } \\times 1 }$ is the annotation vector of previous sentence $l _ { t - 1 }$ , which will be introduced in the next section. To incorporate context information generated by previous sentences, we feed word annotation $\\mathbf { h } _ { i } ^ { t }$ and previous sentence annotation $\\mathbf { s } _ { t - 1 }$ through a two-layer MLP, where a context-aware word vector $\\mathbf { e } _ { i } ^ { t } \\in \\mathbb { R } ^ { K _ { c } \\times 1 }$ is obtained as follows: ",
493
+ "bbox": [
494
+ 173,
495
+ 242,
496
+ 825,
497
+ 424
498
+ ],
499
+ "page_idx": 4
500
+ },
501
+ {
502
+ "type": "equation",
503
+ "img_path": "images/0b16b7a8c7a2a95fd58d5af3cf1b353d4fdd57544f29bb2089675d4c4d36a5f7.jpg",
504
+ "text": "$$\n\\mathbf { e } _ { i } ^ { t } = \\sigma ( \\mathbf { W } _ { e e } t a n h ( \\mathbf { W } _ { e s } \\mathbf { s } _ { t - 1 } + \\mathbf { W } _ { e h } \\mathbf { h } _ { i } ^ { t } + \\mathbf { b } _ { e } ^ { ( 1 ) } ) + \\mathbf { b } _ { e } ^ { ( 2 ) } ) ,\n$$",
505
+ "text_format": "latex",
506
+ "bbox": [
507
+ 310,
508
+ 431,
509
+ 684,
510
+ 452
511
+ ],
512
+ "page_idx": 4
513
+ },
514
+ {
515
+ "type": "text",
516
+ "text": "where $\\mathbf { W } _ { e e } , \\mathbf { W } _ { e s } \\in \\mathbb { R } ^ { K _ { c } \\times K _ { c } }$ and $\\mathbf { W } _ { e h } \\in \\mathbb { R } ^ { K _ { c } \\times K _ { h } }$ are weight matrices, and ${ \\bf b } _ { e } ^ { ( 1 ) }$ , $\\mathbf { b } _ { e } ^ { ( 2 ) } \\in \\mathbb { R } ^ { K _ { c } \\times 1 }$ are the bias terms. It is worth noting that $\\mathbf { s } _ { t - 1 }$ is dependent on its previous sentence. Recursively, this sentence relies on its previous one as well. Hence, our model is able to encode the previous context. In addition, the sentence representation will focus on those words which are able to address the question. Inspired by this intuition, another word level attention mechanism is introduced to attend informative words about the question for generating a sentence’s representation. As the question representation is utilized to guide the word attention, a positive weight $\\alpha _ { i } ^ { t }$ associated with each word is computed as the similarity of the question vector $\\mathbf { u }$ and the corresponding context-aware word vector $\\mathbf { e } _ { i } ^ { t }$ . Then the sentence representation $\\mathbf { y } _ { t } ~ \\in ~ \\mathbb { R } ^ { K _ { h } \\times 1 }$ is generated by aggregating the word annotation vectors with different weights, ",
517
+ "bbox": [
518
+ 173,
519
+ 459,
520
+ 825,
521
+ 602
522
+ ],
523
+ "page_idx": 4
524
+ },
525
+ {
526
+ "type": "equation",
527
+ "img_path": "images/a0195b5f73bcc63786ad17f5e39faa709bf3440a0ba3e69fbe7e1e76631c3810.jpg",
528
+ "text": "$$\n\\alpha _ { i } ^ { t } = s o f t m a x ( \\mathbf { u } ^ { T } \\mathbf { e } _ { i } ^ { t } ) , \\mathbf { y } _ { t } = \\sum _ { i = 1 } ^ { N _ { t } } \\alpha _ { i } ^ { t } \\mathbf { h } _ { i } ^ { t } .\n$$",
529
+ "text_format": "latex",
530
+ "bbox": [
531
+ 343,
532
+ 608,
533
+ 655,
534
+ 652
535
+ ],
536
+ "page_idx": 4
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "4.3.2 CONTEXT ENCODER ",
541
+ "text_level": 1,
542
+ "bbox": [
543
+ 174,
544
+ 665,
545
+ 370,
546
+ 680
547
+ ],
548
+ "page_idx": 4
549
+ },
550
+ {
551
+ "type": "text",
552
+ "text": "Suppose a story is comprised of a sequence of sentences, i.e., $( l _ { 1 } , \\cdots , l _ { N } )$ , each of which is encoded as a $K _ { h }$ -dimensional vector $\\mathbf { y } _ { t }$ through a sentence encoder. As input sentences have a sequence order, simply using their sentence vectors for context generation cannot effectively capture the entire context of the sequence of sentences. To address this issue, a sentence annotation vector is introduced to capture the previous context and this sentence’s own meaning using a GRU. Given the sentence vector $\\mathbf { y } _ { t }$ and the state $\\mathbf { s } _ { t - 1 }$ of previous sentence, we get annotation vector $\\mathbf { s } _ { t } \\in \\mathbb { R } ^ { K _ { c } \\times 1 }$ as: ",
553
+ "bbox": [
554
+ 173,
555
+ 689,
556
+ 825,
557
+ 773
558
+ ],
559
+ "page_idx": 4
560
+ },
561
+ {
562
+ "type": "equation",
563
+ "img_path": "images/cfe138329014b3f7b463a3e582d1d8ef599e89f8412de5bf5a422be2d6512be2.jpg",
564
+ "text": "$$\n\\begin{array} { r } { \\mathbf { s } _ { t } = G R U _ { s } ( \\mathbf { s } _ { t - 1 } , \\mathbf { y } _ { t } ) . } \\end{array}\n$$",
565
+ "text_format": "latex",
566
+ "bbox": [
567
+ 421,
568
+ 781,
569
+ 575,
570
+ 797
571
+ ],
572
+ "page_idx": 4
573
+ },
574
+ {
575
+ "type": "text",
576
+ "text": "A GRU can learn a sentence’s meaning based on previous context information. However, just relying on GRU at sentence level using simple word embedding vectors makes it difficult to learn the precise semantic meaning for each word in the story. Hence, we introduce a context-aware attention mechanism shown in Eq.(5) to properly encode each word for the generation of sentence representation, which guarantees that each word is reasoned under the specific context. ",
577
+ "bbox": [
578
+ 174,
579
+ 804,
580
+ 825,
581
+ 875
582
+ ],
583
+ "page_idx": 4
584
+ },
585
+ {
586
+ "type": "text",
587
+ "text": "Once the sentence annotation vectors $( { \\bf s } _ { 1 } , \\cdots , { \\bf s } _ { N } )$ are obtained as described above, a sentence level attention mechanism is enabled to emphasize those sentences that are highly relevant to the question. We can estimate the attention weight $\\beta _ { t }$ with the similarity of the question and the corresponding sentence. Hence, the context representation $\\mathbf { m }$ is retrieved by summing over all sentence representations associated with corresponding attention weights, and given by: ",
588
+ "bbox": [
589
+ 174,
590
+ 881,
591
+ 823,
592
+ 924
593
+ ],
594
+ "page_idx": 4
595
+ },
596
+ {
597
+ "type": "text",
598
+ "text": "",
599
+ "bbox": [
600
+ 173,
601
+ 103,
602
+ 823,
603
+ 132
604
+ ],
605
+ "page_idx": 5
606
+ },
607
+ {
608
+ "type": "equation",
609
+ "img_path": "images/ffaeaf501eba6b9fd2998327d2b2287ed17682571e7b437813e1507343346bb5.jpg",
610
+ "text": "$$\n\\beta _ { t } = s o f t m a x ( \\mathbf { u } ^ { T } \\mathbf { s } _ { t } ) ,\n$$",
611
+ "text_format": "latex",
612
+ "bbox": [
613
+ 259,
614
+ 143,
615
+ 413,
616
+ 162
617
+ ],
618
+ "page_idx": 5
619
+ },
620
+ {
621
+ "type": "equation",
622
+ "img_path": "images/ee9293ea751649f654b58f07c93ff0bf2e388a7a07b62395b5755a135fa9ec7c.jpg",
623
+ "text": "$$\n\\mathbf { m } = \\sum _ { t = 1 } ^ { N } \\beta _ { t } \\mathbf { s } _ { t } .\n$$",
624
+ "text_format": "latex",
625
+ "bbox": [
626
+ 614,
627
+ 131,
628
+ 717,
629
+ 174
630
+ ],
631
+ "page_idx": 5
632
+ },
633
+ {
634
+ "type": "text",
635
+ "text": "Similar to bidirectional RNN, our model can be extended to use another sentence-level GRU that moves backward through time beginning from the end of the sequence. ",
636
+ "bbox": [
637
+ 174,
638
+ 171,
639
+ 828,
640
+ 200
641
+ ],
642
+ "page_idx": 5
643
+ },
644
+ {
645
+ "type": "text",
646
+ "text": "4.4 ANSWER MODULE ",
647
+ "text_level": 1,
648
+ "bbox": [
649
+ 174,
650
+ 215,
651
+ 344,
652
+ 231
653
+ ],
654
+ "page_idx": 5
655
+ },
656
+ {
657
+ "type": "text",
658
+ "text": "The answer module utilizes a decoder to generate an answer, where it has two output cases according to the understanding ability of both the question and the context. One is to generate the answer immediately after receiving the context and question information. Another one is to generate a supplementary question and then use the user’s feedback to predict the answer. This process is taken by an interactive mechanism. ",
659
+ "bbox": [
660
+ 173,
661
+ 242,
662
+ 825,
663
+ 311
664
+ ],
665
+ "page_idx": 5
666
+ },
667
+ {
668
+ "type": "text",
669
+ "text": "4.4.1 ANSWER GENERATION",
670
+ "text_level": 1,
671
+ "bbox": [
672
+ 174,
673
+ 327,
674
+ 388,
675
+ 340
676
+ ],
677
+ "page_idx": 5
678
+ },
679
+ {
680
+ "type": "text",
681
+ "text": "Given the question representation $\\mathbf { u }$ and the context representation $\\mathbf { m }$ , another GRU is used as the decoder to generate a sentence as the answer. To fuse $\\mathbf { u }$ and $\\mathbf { m }$ together, we sum these vectors rather than concatenating them to reduce the total number of parameters. Suppose $\\hat { \\mathbf { x } } _ { k - 1 } \\in \\mathbb { R } ^ { K _ { w } \\times 1 }$ is the predicted word vector in last step, GRU updates the hidden state $\\mathbf { z } _ { k } \\in \\bar { \\mathbb { R } ^ { K _ { o } \\times 1 } }$ as follows, ",
682
+ "bbox": [
683
+ 173,
684
+ 351,
685
+ 825,
686
+ 407
687
+ ],
688
+ "page_idx": 5
689
+ },
690
+ {
691
+ "type": "equation",
692
+ "img_path": "images/a44c27c70891d09259aaf0e5293d2e6e4a96214dff1a5db61bcf19d9179e566a.jpg",
693
+ "text": "$$\n\\hat { \\mathbf { x } } _ { k } \\overset { \\mathbf { W } _ { w } } { = } s o f t m a x ( \\mathbf { W } _ { o d } \\mathbf { z } _ { k } + \\mathbf { b } _ { o } ) , \\qquad \\mathbf { z } _ { k } = G R U _ { d } ( \\mathbf { z } _ { k - 1 } , [ \\mathbf { m } + \\mathbf { u } ; \\hat { \\mathbf { x } } _ { k - 1 } ] )\n$$",
694
+ "text_format": "latex",
695
+ "bbox": [
696
+ 253,
697
+ 410,
698
+ 741,
699
+ 431
700
+ ],
701
+ "page_idx": 5
702
+ },
703
+ {
704
+ "type": "text",
705
+ "text": "where $\\mathbf { \\underline { { \\underline { { W } } } } } _ { w }$ denotes the predicted word vector through the embedding matrix $\\mathbf { W } _ { w }$ . Note that we require that each sentence ends with a special EOS symbol, including question mask and period symbol, which enables the model to define a distribution over sentences of all possible lengths. ",
706
+ "bbox": [
707
+ 174,
708
+ 439,
709
+ 825,
710
+ 483
711
+ ],
712
+ "page_idx": 5
713
+ },
714
+ {
715
+ "type": "text",
716
+ "text": "Output Choices. In practice, the system is not aways able to answer question immediately based on its current knowledge due to the lack of some crucial information bridging the gap between question and context knowledge, i.e., incomplete issue. Therefore, we allow the decoder to make a binary choice, either to generate an answer immediately, or to enable an interactive mechanism. Specifically, if the model has sufficiently strong evidence for a successful answer prediction based on the well-learned context representation and question representation, the decoder will directly output the answer. Otherwise, the system generates a supplementary question for user, where an example is shown in Table 2. At this time, this user needs to offer a feedback which is then encoded to update the sentence-level attentions for answer generation. This procedure is our interactive mechanism. ",
717
+ "bbox": [
718
+ 173,
719
+ 489,
720
+ 826,
721
+ 616
722
+ ],
723
+ "page_idx": 5
724
+ },
725
+ {
726
+ "type": "table",
727
+ "img_path": "images/40bd473a6c4d23d5744dfd44e70bdc7ab128d466ec8f02a672a5568c37fa5b06.jpg",
728
+ "table_caption": [
729
+ "Table 2: An example of interactive mechanism. “SQ” denotes supplementary question. "
730
+ ],
731
+ "table_footnote": [],
732
+ "table_body": "<table><tr><td>Problem</td><td>The master bedroom is east of the garden. The guest bedroom is east of the office. Target Question: What is the bedroom east of?</td></tr><tr><td>Interactive Mechanism</td><td>System:Which bedroom,master one or guest one? (SQ) User: Master bedroom(User&#x27;s Feedback) System: Garden(Predicted Answer)</td></tr></table>",
733
+ "bbox": [
734
+ 209,
735
+ 626,
736
+ 789,
737
+ 714
738
+ ],
739
+ "page_idx": 5
740
+ },
741
+ {
742
+ "type": "text",
743
+ "text": "The sentence generated by the decoder ends with a special symbol, either a question mask or a period symbol. Hence, this special symbol is utilized to make a decision. In other words, if EOS symbol is a question mask, the generated sentence is regarded as a supplementary question and an interactive mechanism is enabled; otherwise the generated sentence is the estimated answer and the prediction task is done. In the next section, we will introduce the details of interactive mechanism. ",
744
+ "bbox": [
745
+ 173,
746
+ 751,
747
+ 825,
748
+ 820
749
+ ],
750
+ "page_idx": 5
751
+ },
752
+ {
753
+ "type": "text",
754
+ "text": "4.4.2 INTERACTIVE MECHANISM ",
755
+ "text_level": 1,
756
+ "bbox": [
757
+ 176,
758
+ 835,
759
+ 418,
760
+ 849
761
+ ],
762
+ "page_idx": 5
763
+ },
764
+ {
765
+ "type": "text",
766
+ "text": "The interactive process is summarized as follows: 1) The decoder generates a supplementary question; 2) The user provides a feedback; 3) The feedback is used for answer prediction for the target question. Suppose the feedback contains a sequence of words, denoted as $( w _ { 1 } ^ { f } , \\cdot \\cdot \\cdot , w _ { N _ { f } } ^ { f } )$ . Similar to the input module, each word $\\boldsymbol { w _ { d } ^ { f } }$ is embedded to a vector $ { \\mathbf { x } } _ { d } ^ { f }$ through an embedding matrix $\\mathbf { W } _ { w }$ . Then the corresponding annotation vector $\\mathbf { g } _ { d } ^ { f } \\in \\mathbb { R } ^ { K _ { h } \\times 1 }$ is retrieved via a GRU by taking the embedding vector as input, and shown as follows: ",
767
+ "bbox": [
768
+ 174,
769
+ 859,
770
+ 823,
771
+ 925
772
+ ],
773
+ "page_idx": 5
774
+ },
775
+ {
776
+ "type": "text",
777
+ "text": "",
778
+ "bbox": [
779
+ 171,
780
+ 102,
781
+ 825,
782
+ 132
783
+ ],
784
+ "page_idx": 6
785
+ },
786
+ {
787
+ "type": "equation",
788
+ "img_path": "images/3ce11218504d958980c5a0b5c0daaf818bc82911e322d6fa70acb4007d2144a2.jpg",
789
+ "text": "$$\n\\mathbf { g } _ { d } ^ { f } = G R U _ { w } ( \\mathbf { g } _ { d - 1 } ^ { f } , \\mathbf { x } _ { d } ^ { f } ) .\n$$",
790
+ "text_format": "latex",
791
+ "bbox": [
792
+ 415,
793
+ 138,
794
+ 583,
795
+ 161
796
+ ],
797
+ "page_idx": 6
798
+ },
799
+ {
800
+ "type": "text",
801
+ "text": "Based on the annotation vectors, a representation $\\mathbf { f } \\in \\mathbb { R } ^ { K _ { h } \\times 1 }$ can be obtained by a simple attention mechanism where each word is considered to contribute equally, and given by: ",
802
+ "bbox": [
803
+ 174,
804
+ 167,
805
+ 826,
806
+ 198
807
+ ],
808
+ "page_idx": 6
809
+ },
810
+ {
811
+ "type": "equation",
812
+ "img_path": "images/6ae166f7aefcbea5f5ffc410385ced0339c03d0846c74f328f054a446d0680cf.jpg",
813
+ "text": "$$\n\\mathbf { f } = \\frac { 1 } { N _ { f } } \\sum _ { d = 1 } ^ { N _ { f } } \\mathbf { g } _ { d } ^ { f } .\n$$",
814
+ "text_format": "latex",
815
+ "bbox": [
816
+ 442,
817
+ 205,
818
+ 555,
819
+ 251
820
+ ],
821
+ "page_idx": 6
822
+ },
823
+ {
824
+ "type": "text",
825
+ "text": "Our goal is to utilize the feedback representation $\\mathbf { f }$ to generate an answer for the target question. The provided feedback improves the ability to answer the question by distinguishing the relevance of each input sentence to the question. In other words, the similarity of specific input sentences in the provided feedback make these sentences more likely to address the question. Hence, we refine the attention weight of each sentence shown in Eq.(9) after receiving the user’s feedback, given by, ",
826
+ "bbox": [
827
+ 173,
828
+ 257,
829
+ 825,
830
+ 328
831
+ ],
832
+ "page_idx": 6
833
+ },
834
+ {
835
+ "type": "equation",
836
+ "img_path": "images/0cb815ffed145e77c26dbee2b825ecc27c2b0c736f46cc384ba19981d91dc427.jpg",
837
+ "text": "$$\n{ \\bf r } = t a n h ( { \\bf W } _ { r f } { \\bf f } + { \\bf b } _ { r } ^ { ( f ) } ) , \\qquad ( 1 3 ) \\qquad \\quad \\beta _ { t } = s o f t m a x ( { \\bf u } ^ { T } { \\bf s } _ { t } + { \\bf r } ^ { T } { \\bf s } _ { t } )\n$$",
838
+ "text_format": "latex",
839
+ "bbox": [
840
+ 245,
841
+ 327,
842
+ 767,
843
+ 348
844
+ ],
845
+ "page_idx": 6
846
+ },
847
+ {
848
+ "type": "text",
849
+ "text": "where $\\mathbf { W } _ { r f } \\in \\mathbb { R } ^ { K _ { c } \\times K _ { h } }$ and $\\mathbf { b } _ { r } ^ { ( f ) } \\in \\mathbb { R } ^ { K _ { c } \\times 1 }$ are the weight matrix and bias vector, respectively. Eq.(13) is an one-layer neural network to transfer feedback representation to context space. After obtaining the newly learned attention weights, we update the context representation using the softattention operation shown in Eq.(9). This updated context representation and question representation will be used as the input for decoder to generate an answer. Note that for simplifying the problem, we allow the decoder to only generate at most one supplementary question. In addition, one advantage of using the user’s feedback to update the attention weights of input sentences is that we do not need to re-train the encoder again once a feedback is entering the system. ",
850
+ "bbox": [
851
+ 173,
852
+ 353,
853
+ 825,
854
+ 468
855
+ ],
856
+ "page_idx": 6
857
+ },
858
+ {
859
+ "type": "text",
860
+ "text": "4.5 TRAINING PROCEDURE ",
861
+ "text_level": 1,
862
+ "bbox": [
863
+ 176,
864
+ 486,
865
+ 377,
866
+ 500
867
+ ],
868
+ "page_idx": 6
869
+ },
870
+ {
871
+ "type": "text",
872
+ "text": "During training, all modules share an embedding matrix. There are three different GRUs employed for sentence encoding, context encoding and answer/supplementary question decoding. In other words, the same GRU is used to encode the question, input sentences and the user’s feedback. The second one is applied to generate context representation and the third one is used as decoder. Training can be treated as a supervised classification problem to minimize the cross-entropy error of the answer sequence and the supplementary question sequence. ",
873
+ "bbox": [
874
+ 174,
875
+ 512,
876
+ 825,
877
+ 595
878
+ ],
879
+ "page_idx": 6
880
+ },
881
+ {
882
+ "type": "text",
883
+ "text": "5 EXPERIMENTS ",
884
+ "text_level": 1,
885
+ "bbox": [
886
+ 176,
887
+ 617,
888
+ 326,
889
+ 632
890
+ ],
891
+ "page_idx": 6
892
+ },
893
+ {
894
+ "type": "text",
895
+ "text": "In this section, we evaluate our approach with many baseline methods based on various datasets. ",
896
+ "bbox": [
897
+ 169,
898
+ 648,
899
+ 802,
900
+ 664
901
+ ],
902
+ "page_idx": 6
903
+ },
904
+ {
905
+ "type": "text",
906
+ "text": "5.1 EXPERIMENTAL SETUP ",
907
+ "text_level": 1,
908
+ "bbox": [
909
+ 176,
910
+ 681,
911
+ 375,
912
+ 695
913
+ ],
914
+ "page_idx": 6
915
+ },
916
+ {
917
+ "type": "text",
918
+ "text": "Datasets. In this paper, we use two types of datasets to evaluate the performance of our approach. One is traditional QA dataset, where we use Facebook bAbI English 10k dataset (Weston et al., 2015). It contains 20 different types of tasks with emphasis on different forms of reasoning and induction. The second is the newly designed IQA dataset, where we extend bAbI to add interactive QA and denote it as ibAbI. Overall, we generate three ibAbI datasets based on task 1 (single supporting fact), task 4 (two argument relations), and task 7 (counting). Specifically, the former two datasets focus on solving ambiguous actors/objects problem, and the latter one is to ask further information that assists answer prediction. Table 3 shows three examples for our three ibAbI tasks. ",
919
+ "bbox": [
920
+ 174,
921
+ 708,
922
+ 823,
923
+ 819
924
+ ],
925
+ "page_idx": 6
926
+ },
927
+ {
928
+ "type": "text",
929
+ "text": "In addition, we also mix IQA data and corresponding QA data together with different IQA ratios, where the IQA ratio is ranging from 0.3 to 1 (with step as 0.1) and denoted as $R _ { I Q A }$ . For example, in task 1, we randomly pick $R _ { I Q A } \\times 1 0 0 $ percent data from ibAbI task 1, and then randomly select the remaining data from bAbI task 1. $R _ { I Q A } = 1$ indicates that the whole dataset only consists of IQA problems; otherwise (i.e., ranging from 0.3 to 0.9) it consists of both types of QA problems. Overall, we have three tasks for ibAbI dataset, and eight sub-datasets for each task. In the experiments, 10k examples are used as training and another 1k examples are used as testing. ",
930
+ "bbox": [
931
+ 174,
932
+ 825,
933
+ 825,
934
+ 924
935
+ ],
936
+ "page_idx": 6
937
+ },
938
+ {
939
+ "type": "table",
940
+ "img_path": "images/64373a95a6b4ff1dc501307c9d860e01add56935983c5e41d26ff00e57549626.jpg",
941
+ "table_caption": [
942
+ "Table 3: Examples of three different tasks on the generated ibAbI datasets. “Q” indicates the target question. “SQ” is the supplementary question. “FB” refers to user’s feedback. “A” is the answer. "
943
+ ],
944
+ "table_footnote": [],
945
+ "table_body": "<table><tr><td rowspan=\"3\">IQA task 1: John journeyed to the garden. Daniel moved to the kitchen.</td><td>IQA task 4:</td><td>IQA task 7:</td></tr><tr><td>The master bedroom is east of the garden.</td><td>John grabbed the bread.</td></tr><tr><td>The guest bedroom is east of the office. The guest bedroom is west of the hallway.</td><td>John grabbed the milk.</td></tr><tr><td rowspan=\"4\">Q:Where is he? SQ: Who is he?</td><td></td><td>John grabbed the apple.</td></tr><tr><td>The bathroom is east of the master bedroom.</td><td>Sandra went to the bedroom.</td></tr><tr><td>Q:What is the bedroom east of?</td><td>Q:How many special objects is John holding?</td></tr><tr><td>SQ:Which bedroom,master one or guest one?</td><td>SQ:What objects are you referring to?</td></tr><tr><td>FB:Daniel A: Kitchen</td><td>FB:Master bedroom A: Garden</td><td>FB: Milk,bread A: Two</td></tr></table>",
946
+ "bbox": [
947
+ 183,
948
+ 101,
949
+ 815,
950
+ 195
951
+ ],
952
+ "page_idx": 7
953
+ },
954
+ {
955
+ "type": "text",
956
+ "text": "Experiment Settings. We train our models using the Adam optimizer (Kingma & Ba, 2014). Xavier initialization is used for all parameters except for word embeddings, which utilize random uniform initialization ranging from $- { \\sqrt { 3 } }$ to $\\sqrt { 3 }$ . The learning rate is set as 0.001. The grid search method is utilized to find optimal parameters, such as batch size and hidden size. ",
957
+ "bbox": [
958
+ 174,
959
+ 256,
960
+ 825,
961
+ 314
962
+ ],
963
+ "page_idx": 7
964
+ },
965
+ {
966
+ "type": "text",
967
+ "text": "5.2 BASELINE METHODS",
968
+ "text_level": 1,
969
+ "bbox": [
970
+ 174,
971
+ 330,
972
+ 361,
973
+ 344
974
+ ],
975
+ "page_idx": 7
976
+ },
977
+ {
978
+ "type": "text",
979
+ "text": "To demonstrate the effectiveness of our approach CAN, we compare it with the following models: ",
980
+ "bbox": [
981
+ 173,
982
+ 356,
983
+ 815,
984
+ 371
985
+ ],
986
+ "page_idx": 7
987
+ },
988
+ {
989
+ "type": "text",
990
+ "text": "• $\\mathbf { D M N + }$ : Xiong et al. (2016) improve Dynamic Memory Networks (Kumar et al., 2016) by using stronger input and memory modules, where a bidirectional GRU is adopted to generate representations for statements and a neural network is used to update episodic memory multiple times. • MemN2N: This is an extension of Memory Network with weak supervision as proposed in Sainbayar et al. (2015). Here, an external memory module is used to encode the input statements and a recurrent attention mechanism is used to read the memory for answer prediction. • EncDec: We extend the encoder-decoder framework (Cho et al., 2014) to solve QA tasks as a baseline method. Specifically, EncDec uses a GRU to encode statements and questions, the end of hidden states is used as context representation, and another GRU to generate the output. ",
991
+ "bbox": [
992
+ 173,
993
+ 385,
994
+ 826,
995
+ 520
996
+ ],
997
+ "page_idx": 7
998
+ },
999
+ {
1000
+ "type": "text",
1001
+ "text": "5.3 PERFORMANCE OF QUESTION ANSWERING ",
1002
+ "text_level": 1,
1003
+ "bbox": [
1004
+ 174,
1005
+ 536,
1006
+ 514,
1007
+ 551
1008
+ ],
1009
+ "page_idx": 7
1010
+ },
1011
+ {
1012
+ "type": "text",
1013
+ "text": "In this section, we evaluate model’s ability for answer prediction based on traditional QA dataset (i.e., bAbI-10k). For this task, our model (denoted as $\\mathrm { C A N + Q A } ,$ ) does not use the interactive mechanism. As the output answers for this dataset only contain a single word, we adopt test error rate as evaluation metric. For $\\mathrm { D M N } +$ and MemN2N methods, we select the best performance over bAbI dataset reported in (Xiong et al., 2016). The results of various models across 20 tasks are reported in Table 4. We summarize the main observations as follows: ",
1014
+ "bbox": [
1015
+ 173,
1016
+ 563,
1017
+ 825,
1018
+ 646
1019
+ ],
1020
+ "page_idx": 7
1021
+ },
1022
+ {
1023
+ "type": "text",
1024
+ "text": "• Our approach is better than all baseline methods in each individual task. For example, it reduces the error by $4 \\%$ compared to $\\mathrm { D M N } +$ in task 17, and compared to MemN2N, it reduces $1 8 . 4 \\%$ and $4 . 8 \\%$ error in task 17 and 18 respectively. We can achieve a better result primarily because our approach can model the semantic logic flow for statements. Table 5 shows two examples in task 17 and 18, where MemN2N predicts incorrectly while $\\mathrm { C A N + Q A }$ can make correct predictions. In these two examples, the semantic logic determines the relationship between two objects mentioned in the question, such as chest and suitcase. In addition, Kumar et al. (2016) has shown that memory networks with multiple hops are better than the one with single hop. Our strong results illustrate that our approach has more accurate context modeling even without multiple hops. EncDec performs the worst amongst all models over all tasks. EncDec concatenates the statements and questions as a single input, resulting in the difficulty of training the GRU. For example, EncDec is not good on task 2 and 3 because these two tasks have longer inputs than other tasks. • The results of $\\mathrm { D M N } +$ and MemN2N are much better than EncDec. It is not surprising that they can outperform EncDec, because they are specifically designed for question answering and do not suffer from the problem mentioned above by treating input sentences separately. • All models perform poorly on task 16. Xiong et al. (2016) points out that MemN2N with a simple update for memory could achieve a near perfect error rate of 0.4 while a more complex method will lead to a much worse result. This shows that a sophisticated modeling method makes it difficult to achieve a good performance in certain simple tasks with such limited data. This can be a possible reason for the poor performance of our model on this specific task as well. ",
1025
+ "bbox": [
1026
+ 173,
1027
+ 659,
1028
+ 825,
1029
+ 924
1030
+ ],
1031
+ "page_idx": 7
1032
+ },
1033
+ {
1034
+ "type": "text",
1035
+ "text": "",
1036
+ "bbox": [
1037
+ 184,
1038
+ 103,
1039
+ 823,
1040
+ 132
1041
+ ],
1042
+ "page_idx": 8
1043
+ },
1044
+ {
1045
+ "type": "text",
1046
+ "text": "In addition, different from MemN2N, we use a GRU to capture the semantic logic flow of input sentences, where the sentence-level attention can weaken the influence of unrelated sentences in a long story. Table 6 shows two examples of our results with long stories. From the attention weights, we can see our model can correctly search relevant sentences in a long story to address a question. ",
1047
+ "bbox": [
1048
+ 176,
1049
+ 145,
1050
+ 823,
1051
+ 202
1052
+ ],
1053
+ "page_idx": 8
1054
+ },
1055
+ {
1056
+ "type": "table",
1057
+ "img_path": "images/fe2b61c31ee572d9b5361039bd594ece6636a6b9d48463fdd741489f8e216306.jpg",
1058
+ "table_caption": [
1059
+ "Table 4: Performance comparison of various models in terms of test error rate $( \\% )$ in QA dataset. "
1060
+ ],
1061
+ "table_footnote": [],
1062
+ "table_body": "<table><tr><td>Task</td><td>CAN+QA</td><td>DMN+</td><td>MemN2N</td><td>EncDec</td></tr><tr><td>1 - Single Supporting Fact</td><td>0.0</td><td>0.0</td><td>0.0</td><td>52.0</td></tr><tr><td>2 - Two Supporting Facts</td><td>0.1</td><td>0.3</td><td>0.3</td><td>66.1</td></tr><tr><td>3 - Three Supporting Facts</td><td>0.2</td><td>1.1</td><td>2.1</td><td>71.9</td></tr><tr><td>4 - Two Arg. Relations</td><td>0.0</td><td>0.0</td><td>0.0</td><td>29.2</td></tr><tr><td>5 - Three Arg.Relations</td><td>0.4</td><td>0.5</td><td>0.8</td><td>14.3</td></tr><tr><td>6 -Yes/No Questions</td><td>0.0</td><td>0.0</td><td>0.1</td><td>31.0</td></tr><tr><td>7 - Counting</td><td>0.3</td><td>2.4</td><td>2.0</td><td>23.6</td></tr><tr><td>8 - Lists/Sets</td><td>0.0</td><td>0.0</td><td>0.9</td><td>28.8</td></tr><tr><td>9 - Simple Negation</td><td>0.0</td><td>0.0</td><td>0.3</td><td>39.1</td></tr><tr><td>10 - Indefinite Knowledge</td><td>0.0</td><td>0.0</td><td>0.0</td><td>45.0</td></tr><tr><td>11-Basic Coreference</td><td>0.0</td><td>0.0</td><td>0.1</td><td>31.7</td></tr><tr><td>12 - Conjunction</td><td>0.0</td><td>0.0</td><td>0.0</td><td>35.0</td></tr><tr><td>13 - Compound Coref.</td><td>0.0</td><td>0.0</td><td>0.0</td><td>8.7</td></tr><tr><td>14- Time Reasoning</td><td>0.0</td><td>0.2</td><td>0.1</td><td>67.2</td></tr><tr><td>15 -Basic Deduction</td><td>0.0</td><td>0.0</td><td>0.0</td><td>62.2</td></tr><tr><td>16 -Basic Induction</td><td>43.0</td><td>45.3</td><td>51.8</td><td>54.0</td></tr><tr><td>17 -Positional Reasoning</td><td>0.2</td><td>4.2</td><td>18.6</td><td>43.1</td></tr><tr><td>18 - Size Reasoning</td><td>0.5</td><td>2.1</td><td>5.3</td><td>9.0</td></tr><tr><td>19 - Path Finding</td><td>0.0</td><td>0.0</td><td>2.3</td><td>89.6</td></tr><tr><td>20 - Agents Motivations</td><td>0.0</td><td>0.0</td><td>0.0</td><td>2.3</td></tr></table>",
1063
+ "bbox": [
1064
+ 245,
1065
+ 215,
1066
+ 753,
1067
+ 484
1068
+ ],
1069
+ "page_idx": 8
1070
+ },
1071
+ {
1072
+ "type": "table",
1073
+ "img_path": "images/b4da7d441f7fa0fd9474851fc23f000187e261367b2030efcb5b76c398e507db.jpg",
1074
+ "table_caption": [
1075
+ "Table 5: Examples of bAbI task 17 (left) and 18 (right), where our model predicts correct answers while MemN2N makes wrong predictions. "
1076
+ ],
1077
+ "table_footnote": [],
1078
+ "table_body": "<table><tr><td rowspan=\"4\">The red square is below the triangle. The pink rectangle is to the left of the red square.</td><td>The boxis bigger than the suitcase.</td></tr><tr><td>The suitcase fits inside the container.</td></tr><tr><td>The box of chocolates fits inside the container.</td></tr><tr><td>The container fits inside the chest. The chocolate fits inside the suitcase.</td></tr><tr><td>Q: Is the triangle above the pink rectangle? A: yes</td><td>Q: Is the chest bigger than the suitcase? A: yes</td></tr></table>",
1079
+ "bbox": [
1080
+ 250,
1081
+ 526,
1082
+ 746,
1083
+ 599
1084
+ ],
1085
+ "page_idx": 8
1086
+ },
1087
+ {
1088
+ "type": "table",
1089
+ "img_path": "images/ad6ede4c560264dcb9171609f4a5221b67742d04de0f6a5dd1ad63eb3a74dadf.jpg",
1090
+ "table_caption": [],
1091
+ "table_footnote": [],
1092
+ "table_body": "<table><tr><td>Story</td><td>Support</td><td>Weight</td><td>Story</td><td>Support</td><td>Weight</td></tr><tr><td>Line1: Mary journeyed to the office. …</td><td></td><td>0.00</td><td>Line 1: John went back to the kitchen. Line 13 : Sandra grabbed the apple there.</td><td>yes</td><td>0.14</td></tr><tr><td>Line 48: Sandra grabbed the apple there. Line 49: Sandra dropped the apple. Line 50:·..</td><td>yes yes</td><td>0.13 0.85</td><td>Line 29: Sandra left the apple. Line 30:·..</td><td>yes</td><td>0.79</td></tr><tr><td colspan=\"4\">What is Sandra carrying? Answer: nothing Prediction: nothing</td><td>What is Sandra carrying? Answer: nothing Prediction: nothing</td><td></td></tr></table>",
1093
+ "bbox": [
1094
+ 183,
1095
+ 660,
1096
+ 813,
1097
+ 744
1098
+ ],
1099
+ "page_idx": 8
1100
+ },
1101
+ {
1102
+ "type": "text",
1103
+ "text": "Table 6: Examples of our model’s results on QA tasks. Supporting facts are shown in the datasets which our model does not use during training. “Weight” indicates the attention weight for sentence. Our model can locate correct supporting sentences for long stories. ",
1104
+ "bbox": [
1105
+ 176,
1106
+ 756,
1107
+ 823,
1108
+ 799
1109
+ ],
1110
+ "page_idx": 8
1111
+ },
1112
+ {
1113
+ "type": "text",
1114
+ "text": "5.4 PERFORMANCE OF INTERACTIVE QUESTION ANSWERING ",
1115
+ "text_level": 1,
1116
+ "bbox": [
1117
+ 174,
1118
+ 813,
1119
+ 612,
1120
+ 828
1121
+ ],
1122
+ "page_idx": 8
1123
+ },
1124
+ {
1125
+ "type": "text",
1126
+ "text": "In this section, we evaluate the performance of various models based on IQA dataset (as described in Section 5.1). For testing, we simulate the interactive procedure by taking the predefined feedback as user’s input for the generated supplementary question, and then generating an answer. All baseline methods do not have interactive part, so they take both statements and question as input and then estimate an answer. We compare our approach (CAN+IQA) with baseline methods in terms of test error rate shown in Table 7. From the results, we can achieve the following conclusions: ",
1127
+ "bbox": [
1128
+ 174,
1129
+ 839,
1130
+ 825,
1131
+ 924
1132
+ ],
1133
+ "page_idx": 8
1134
+ },
1135
+ {
1136
+ "type": "text",
1137
+ "text": "• Our method significantly outperforms all baseline methods. Specifically, we can achieve $0 \\%$ test error rate in task 1 and task 4 with $R _ { I Q A } = 1 . 0$ ; while the best result of baseline methods can only get $4 0 . 5 \\%$ test error rate. $\\mathrm { C A N + I Q A }$ benefits from more accurate context modeling, which allows it to correctly understand when to output an answer or require additional information. For those QA problems with incomplete information, it is necessary to gather the additional information from users. Randomly guessing may harm model’s performance, which makes conventional QA models difficult to converge. But our approach uses an interactive procedure to obtain user’s feedback and allows the model to provide the correct answer. ",
1138
+ "bbox": [
1139
+ 174,
1140
+ 103,
1141
+ 825,
1142
+ 214
1143
+ ],
1144
+ "page_idx": 9
1145
+ },
1146
+ {
1147
+ "type": "text",
1148
+ "text": "• For the baseline methods, $\\mathrm { D M N } +$ and MemN2N perform similarly and do better than EncDec. Their similar performance (which are worse than our approach) is due to the limitation that they could not learn the accurate meaning of statements and questions with limited resource and then have trouble training the models. But they are superior over EncDec as they treat each input sentence separately instead of modeling very long inputs. ",
1149
+ "bbox": [
1150
+ 174,
1151
+ 219,
1152
+ 825,
1153
+ 290
1154
+ ],
1155
+ "page_idx": 9
1156
+ },
1157
+ {
1158
+ "type": "table",
1159
+ "img_path": "images/358c8e02d093a79a09b23609572923688357f99af6e65cc671b0e93aaafa535a.jpg",
1160
+ "table_caption": [
1161
+ "In addition, we also quantitatively evaluate the quality of supplementary question generated by our approach where the details can be found in Appendix A. "
1162
+ ],
1163
+ "table_footnote": [],
1164
+ "table_body": "<table><tr><td>Methods</td><td>RIQA = 1.0</td><td>RIQA =0.9</td><td>RIQA =0.8</td><td>RIQA =0.7</td><td>RIQA =0.6</td><td>RIQA =0.5</td><td>RIQA =0.4</td><td>RIQA = 0.3</td></tr><tr><td colspan=\"9\">IQA Task 1</td></tr><tr><td>CAN+IQA</td><td>0.00</td><td>0.00</td><td>0.10</td><td>0.50</td><td>0.60</td><td>0.70</td><td>2.10</td><td>0.40</td></tr><tr><td>DMN+</td><td>42.2</td><td>42.1</td><td>33.0</td><td>28.9</td><td>25.0</td><td>19.9</td><td>17.3</td><td>11.6</td></tr><tr><td>MemN2N</td><td>40.5</td><td>38.9</td><td>34.4</td><td>30.0</td><td>23.9</td><td>18.4</td><td>16.9</td><td>13.9</td></tr><tr><td>EncDec</td><td>53.6</td><td>54.3</td><td>52.9</td><td>53.5</td><td>51.8</td><td>50.1</td><td>45.1</td><td>44.8</td></tr><tr><td colspan=\"9\">IQA Task 4</td></tr><tr><td>CAN+IQA</td><td>0.00</td><td>1.30</td><td>0.10</td><td>0.60</td><td>0.60</td><td>1.10</td><td>1.40</td><td>1.20</td></tr><tr><td>DMN+</td><td>53.5</td><td>56.1</td><td>50.4</td><td>40.7</td><td>34.5</td><td>27.4</td><td>23.4</td><td>16.6</td></tr><tr><td>MemN2N</td><td>50.4</td><td>50.1</td><td>41.8</td><td>36.1</td><td>29.5</td><td>25.3</td><td>18.7</td><td>15.8</td></tr><tr><td>EncDec</td><td>55.9</td><td>54.9</td><td>52.5</td><td>49.2</td><td>45.9</td><td>38.9</td><td>30.4</td><td>24.2</td></tr><tr><td colspan=\"9\">IQA Task7</td></tr><tr><td>CAN+IQA</td><td>0.30</td><td>2.10</td><td>2.50</td><td>1.80</td><td>2.00</td><td>0.70</td><td>0.20</td><td>0.30</td></tr><tr><td>DMN+</td><td>54.1</td><td>50.3</td><td>47.7</td><td>42.3</td><td>38.1</td><td>33.9</td><td>27.7</td><td>27.6</td></tr><tr><td>MemN2N</td><td>54.6</td><td>52.0</td><td>46.3</td><td>40.8</td><td>36.1</td><td>32.4</td><td>23.3</td><td>19.6</td></tr><tr><td>EncDec</td><td>55.5</td><td>50.9</td><td>48.6</td><td>44.7</td><td>39.1</td><td>32.3</td><td>31.9</td><td>26.6</td></tr></table>",
1165
+ "bbox": [
1166
+ 228,
1167
+ 340,
1168
+ 769,
1169
+ 563
1170
+ ],
1171
+ "page_idx": 9
1172
+ },
1173
+ {
1174
+ "type": "text",
1175
+ "text": "Table 7: Performance comparison of various models in terms of test error rate $( \\% )$ based on interactive question answering datasets with different IQA ratios. ",
1176
+ "bbox": [
1177
+ 174,
1178
+ 571,
1179
+ 823,
1180
+ 601
1181
+ ],
1182
+ "page_idx": 9
1183
+ },
1184
+ {
1185
+ "type": "text",
1186
+ "text": "5.5 QUALITATIVE ANALYSIS OF INTERACTIVE MECHANISM ",
1187
+ "text_level": 1,
1188
+ "bbox": [
1189
+ 174,
1190
+ 623,
1191
+ 602,
1192
+ 638
1193
+ ],
1194
+ "page_idx": 9
1195
+ },
1196
+ {
1197
+ "type": "text",
1198
+ "text": "In this section, we qualitatively show the attention weights over input sentences generated by our model on both QA and IQA data. We train our model $( \\mathrm { C A N + I Q A } )$ on task 1 of ibAbI dataset with $Q _ { I Q A } = 0 . 9$ , and randomly select one IQA example from the testing data. Then we do the prediction on this IQA problem. In addition, we change this instance to a QA problem by replacing the question “Where is she?” with “Where is Sandra?”, and then do the prediction as well. The prediction results on both QA and IQA problems are shown in Table 8. From the results, we observe the following: 1) The attention that uses user’s feedback focuses on the key relevant sentence while the attention without feedback only focuses on an unrelated sentence. This happens because utilizing user’s feedback allows the model to understand a question better and locate the relevant input sentences. This illustrates the effectiveness of an interactive mechanism on addressing questions that require additional information. 2) The attention on both two problems can finally focus on the relevant sentences, showing the usefulness of our model for solving different types of QA problems. ",
1199
+ "bbox": [
1200
+ 174,
1201
+ 648,
1202
+ 825,
1203
+ 815
1204
+ ],
1205
+ "page_idx": 9
1206
+ },
1207
+ {
1208
+ "type": "text",
1209
+ "text": "6 CONCLUSION ",
1210
+ "text_level": 1,
1211
+ "bbox": [
1212
+ 174,
1213
+ 837,
1214
+ 318,
1215
+ 852
1216
+ ],
1217
+ "page_idx": 9
1218
+ },
1219
+ {
1220
+ "type": "text",
1221
+ "text": "In this paper, we present a self-adaptive model, CAN, which learns more accurate representations for statements and questions. More importantly, our model is aware what it knows and what it does not know within the context of the story, and takes an interactive mechanism to answer a question. Hence, our model takes an important step towards having a natural and intelligent conversation with humans. In the future, we plan to employ more powerful attention mechanisms with explicit unknown state modeling and multi-round feedback-guided fine-tuning to make the model fully selfaware, self-adaptive, and self-taught. We also plan to expand our results to harder co-reference and interactive visual QA tasks with uncertainty modeling. ",
1222
+ "bbox": [
1223
+ 176,
1224
+ 867,
1225
+ 823,
1226
+ 924
1227
+ ],
1228
+ "page_idx": 9
1229
+ },
1230
+ {
1231
+ "type": "table",
1232
+ "img_path": "images/443e7540b0b549b92448eb235d0ec63fdb4aa2fd3b36ebd0089310bedce1b17b.jpg",
1233
+ "table_caption": [
1234
+ "Table 8: Examples of sentence attention weights obtained by our model in both QA and IQA data. “Before IM” indicates the sentence attention weights over input sentences before the user provides a feedback. “After IM” indicates the sentence attention weights updated by user’s feedback. The attention weights with value as 0.00 are very small. The results show that our approach can attend the key relevant sentences for both QA and IQA problems. "
1235
+ ],
1236
+ "table_footnote": [],
1237
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Input Sentences</td><td rowspan=1 colspan=1>Support</td><td rowspan=1 colspan=2>QA Data</td><td rowspan=1 colspan=1>Before IM</td><td rowspan=1 colspan=1>After IM</td></tr><tr><td rowspan=9 colspan=1>Mary journeyed to the kitchen.Sandra journeyed to the kitchen.Mary journeyed to the bedroom.Sandra moved to the bathroom.Sandra travelled to the office.Mary journeyed to the garden.Daniel travelled to the bathroom.Mary journeyed to the kitchen. John journeyed to the office.Mary moved to the bathroom.</td><td rowspan=4 colspan=1>yes</td><td rowspan=1 colspan=2>0.00</td><td rowspan=1 colspan=1>0.99</td><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=1 colspan=2>0.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=2 colspan=1>0.000.000.00</td></tr><tr><td rowspan=1 colspan=2>0.000.00</td><td rowspan=1 colspan=1>0.000.00</td></tr><tr><td rowspan=1 colspan=2>0.99</td><td rowspan=1 colspan=1>0.00</td><td rowspan=1 colspan=1>0.99</td></tr><tr><td rowspan=5 colspan=1></td><td rowspan=2 colspan=2>0.000.00</td><td rowspan=1 colspan=1>0.00</td><td rowspan=5 colspan=1>0.000.000.000.000.00</td></tr><tr><td rowspan=1 colspan=1>0.00</td></tr><tr><td rowspan=2 colspan=2>0.00</td><td rowspan=2 colspan=1>0.00</td></tr><tr><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=2>0.000.00</td><td rowspan=1 colspan=1>0.000.00</td></tr><tr><td rowspan=1 colspan=2></td><td rowspan=1 colspan=2>Q: Where is Sandra?A: Office</td><td rowspan=1 colspan=2>Q: Where is she? SQ: Who is she?FB: SandraA: Office</td></tr></table>",
1238
+ "bbox": [
1239
+ 197,
1240
+ 101,
1241
+ 800,
1242
+ 306
1243
+ ],
1244
+ "page_idx": 10
1245
+ },
1246
+ {
1247
+ "type": "text",
1248
+ "text": "",
1249
+ "bbox": [
1250
+ 174,
1251
+ 405,
1252
+ 825,
1253
+ 462
1254
+ ],
1255
+ "page_idx": 10
1256
+ },
1257
+ {
1258
+ "type": "text",
1259
+ "text": "REFERENCES ",
1260
+ "text_level": 1,
1261
+ "bbox": [
1262
+ 176,
1263
+ 484,
1264
+ 285,
1265
+ 500
1266
+ ],
1267
+ "page_idx": 10
1268
+ },
1269
+ {
1270
+ "type": "text",
1271
+ "text": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In ICLR, 2015. ",
1272
+ "bbox": [
1273
+ 174,
1274
+ 508,
1275
+ 821,
1276
+ 536
1277
+ ],
1278
+ "page_idx": 10
1279
+ },
1280
+ {
1281
+ "type": "text",
1282
+ "text": "Satanjeev Banerjee and Alon Lavie. Meteor: An automatic metric for mt evaluation with improved correlation with human judgments. In ACL workshop, 2005. ",
1283
+ "bbox": [
1284
+ 174,
1285
+ 547,
1286
+ 823,
1287
+ 577
1288
+ ],
1289
+ "page_idx": 10
1290
+ },
1291
+ {
1292
+ "type": "text",
1293
+ "text": "Y. Bengio, P. Simard, and P. Frasconi. Learning long-term dependencies with gradient descent is difficult. Trans. Neur. Netw., 5(2):157–166, 1994. ISSN 1045-9227. ",
1294
+ "bbox": [
1295
+ 174,
1296
+ 588,
1297
+ 823,
1298
+ 616
1299
+ ],
1300
+ "page_idx": 10
1301
+ },
1302
+ {
1303
+ "type": "text",
1304
+ "text": "Antoine Bordes and Jason Weston. Learning end-to-end goal-oriented dialog. CoRR, abs/1605.07683, 2016. ",
1305
+ "bbox": [
1306
+ 171,
1307
+ 627,
1308
+ 823,
1309
+ 656
1310
+ ],
1311
+ "page_idx": 10
1312
+ },
1313
+ {
1314
+ "type": "text",
1315
+ "text": "Kyunghyun Cho, Bart van Merrienboer, C¸ aglar Gulc¸ehre, Dzmitry Bahdanau, Fethi Bougares, Hol- ¨ ger Schwenk, and Yoshua Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In EMNLP, pp. 1724–1734, 2014. ",
1316
+ "bbox": [
1317
+ 174,
1318
+ 667,
1319
+ 823,
1320
+ 710
1321
+ ],
1322
+ "page_idx": 10
1323
+ },
1324
+ {
1325
+ "type": "text",
1326
+ "text": "Anthony Fader, Luke Zettlemoyer, and Oren Etzioni. Open question answering over curated and extracted knowledge bases. In KDD, pp. 1156–1165, 2014. ",
1327
+ "bbox": [
1328
+ 171,
1329
+ 720,
1330
+ 823,
1331
+ 751
1332
+ ],
1333
+ "page_idx": 10
1334
+ },
1335
+ {
1336
+ "type": "text",
1337
+ "text": "David Golub and Xiaodong He. Character-level question answering with attention. CoRR, abs/1604.00727, 2016. ",
1338
+ "bbox": [
1339
+ 173,
1340
+ 761,
1341
+ 823,
1342
+ 790
1343
+ ],
1344
+ "page_idx": 10
1345
+ },
1346
+ {
1347
+ "type": "text",
1348
+ "text": "Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. CoRR, abs/1410.5401, 2014. ",
1349
+ "bbox": [
1350
+ 171,
1351
+ 801,
1352
+ 825,
1353
+ 830
1354
+ ],
1355
+ "page_idx": 10
1356
+ },
1357
+ {
1358
+ "type": "text",
1359
+ "text": "Karl Moritz Hermann, Tomas Kocisk ´ y, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa ´ Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. In NIPS, pp. 1693– 1701, 2015. ",
1360
+ "bbox": [
1361
+ 173,
1362
+ 840,
1363
+ 823,
1364
+ 883
1365
+ ],
1366
+ "page_idx": 10
1367
+ },
1368
+ {
1369
+ "type": "text",
1370
+ "text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 9(8): 1735–1780, 1997. ",
1371
+ "bbox": [
1372
+ 173,
1373
+ 895,
1374
+ 821,
1375
+ 922
1376
+ ],
1377
+ "page_idx": 10
1378
+ },
1379
+ {
1380
+ "type": "text",
1381
+ "text": "Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. \nAnkit Kumar, Ozan Irsoy, Peter Ondruska, Mohit Iyyer, James Bradbury, Ishaan Gulrajani, Victor Zhong, Romain Paulus, and Richard Socher. Ask me anything: Dynamic memory networks for natural language processing. In ICML, pp. 1378–1387, 2016. \nJiasen Lu, Jianwei Yang, Dhruv Batra, and Devi Parikh. Hierarchical question-image co-attention for visual question answering. CoRR, abs/1606.00061, 2016. \nMinh-Thang Luong, Hieu Pham, and Christopher D. Manning. Effective approaches to attentionbased neural machine translation. CoRR, abs/1508.04025, 2015. \nVolodymyr Mnih, Nicolas Heess, Alex Graves, and Koray Kavukcuoglu. Recurrent models of visual attention. In NIPS, pp. 2204–2212, 2014. \nKishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: A method for automatic evaluation of machine translation. In Association for Computational Linguistics, pp. 311–318, 2002. \nSukhbaatar Sainbayar, Szlam Arthur, Weston Jason, and Fergus Rob. End-to-end memory networks. In NIPS, pp. 2440–2448, 2015. \nDenis Savenkov and Eugene Agichtein Emory. When a knowledge base is not enough: Question answering over knowledge bases with external text data. In SIGIR, pp. 235–244, 2016. \nPaul Hongsuck Seo, Zhe Lin, Scott Cohen, Xiaohui Shen, and Bohyung Han. Hierarchical attention networks. CoRR, abs/1606.02393, 2016. \nIlya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In NIPS, pp. 3104–3112. 2014. \nJason Weston. Dialog-based language learning. NIPS, 2016. \nJason Weston, Antoine Bordes, Sumit Chopra, and Tomas Mikolov. Towards ai-complete question answering: A set of prerequisite toy tasks. CoRR, abs/1502.05698, 2015. \nQi Wu, Peng Wang, Chunhua Shen, Anton van den Hengel, and Anthony R. Dick. Ask me anything: Free-form visual question answering based on knowledge from external sources. CoRR, abs/1511.06973, 2015. \nCaiming Xiong, Stephen Merity, and Richard Socher. Dynamic memory networks for visual and textual question answering. In ICML, pp. 2397–2406, 2016. \nKelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron C. Courville, Ruslan Salakhutdinov, Richard S. Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. CoRR, abs/1502.03044, 2015. \nZichao Yang, Xiaodong He, Jianfeng Gao, Li Deng, and Alexander J. Smola. Stacked attention networks for image question answering. CoRR, abs/1511.02274, 2015. \nZichao Yang, Diyi Yang, Chris Dyer, Xiaodong He, Alexander J. Smola, and Eduard H. Hovy. Hierarchical attention networks for document classification. In HLT, pp. 1480–1489, 2016. \nWojciech Zaremba, Ilya Sutskever, and Oriol Vinyals. Recurrent neural network regularization. CoRR, abs/1409.2329, 2014. ",
1382
+ "bbox": [
1383
+ 171,
1384
+ 87,
1385
+ 828,
1386
+ 819
1387
+ ],
1388
+ "page_idx": 11
1389
+ },
1390
+ {
1391
+ "type": "text",
1392
+ "text": "A SUPPLEMENTARY QUESTION ANALYSIS ",
1393
+ "text_level": 1,
1394
+ "bbox": [
1395
+ 176,
1396
+ 102,
1397
+ 540,
1398
+ 118
1399
+ ],
1400
+ "page_idx": 12
1401
+ },
1402
+ {
1403
+ "type": "text",
1404
+ "text": "We quantitatively evaluate the quality of supplementary question generated by our model based on IQA dataset. All baseline methods are designed to only predict an answer, none of them can generate a question. Thus we design another baseline method to generate supplementary question based on EncDec, and denote it as $E n c D e c ^ { * }$ . Specifically, in training procedure, $E n c D e c ^ { * }$ takes statements and questions as input. If the supplementary question is available, it is used as output; otherwise the corresponding answer is viewed as output. Similar to our approach, the EOS symbol is used to determine whether the generated sentence is question or not, where the question ends with question mark and the answer ends with period symbol. ",
1405
+ "bbox": [
1406
+ 174,
1407
+ 133,
1408
+ 825,
1409
+ 246
1410
+ ],
1411
+ "page_idx": 12
1412
+ },
1413
+ {
1414
+ "type": "text",
1415
+ "text": "To test model’s ability to generate supplementary question, we define some following metrics. Suppose the number of problems is $N$ , and the number of problems having supplementary question is $N _ { s }$ . Then $N _ { a } = N - N _ { s }$ is the number of remaining problems. Let $\\begin{array} { r } { S Q u e A c c = { \\frac { \\hat { N } _ { s } } { N _ { s } } } } \\end{array}$ Nˆs is the fraction of IQA problems which can be correctly estimated, and $\\begin{array} { r } { A n s A c c = \\frac { \\hat { N } _ { a } } { N _ { a } } } \\end{array}$ is the fraction of remaining problems which can be correctly estimated as QA problem. So $\\begin{array} { r } { S Q u e A n s A c c = \\frac { \\hat { N } _ { s } + \\hat { N } _ { a } } { N } } \\end{array}$ = Nˆs+Nˆa is the overall accuracy. In addition, the widely used BLEU (Papineni et al., 2002) and METEROR (Banerjee & Lavie, 2005) are also adopted to evaluate the quality of generated supplementary question. The results of our method and baseline method are presented in Table 9. ",
1416
+ "bbox": [
1417
+ 173,
1418
+ 251,
1419
+ 825,
1420
+ 380
1421
+ ],
1422
+ "page_idx": 12
1423
+ },
1424
+ {
1425
+ "type": "text",
1426
+ "text": "From the results, we can observe that 1) Two models can almost correctly determine whether it is time to output a question or not; 2) Two models are able to generate the correct supplementary questions whose contents exactly match with the ground truth. There is no surprise that $E n c D e c ^ { * }$ also performs well in generating question, because it is specifically designed for only outputting questions. Thus, if given enough training data, $E n c D e c ^ { * }$ could predict good questions. However, the limitation is that it cannot predict a supplementary question and an answer at the same time. Different from $E n c D e c ^ { * }$ , our approach can accurately know when to output an answer or when to generate a supplementary question. ",
1427
+ "bbox": [
1428
+ 173,
1429
+ 386,
1430
+ 825,
1431
+ 498
1432
+ ],
1433
+ "page_idx": 12
1434
+ },
1435
+ {
1436
+ "type": "table",
1437
+ "img_path": "images/a327e6af70ecaa851b2ee8dd017a463fa688552a7375b4f522de51f178b11d0e.jpg",
1438
+ "table_caption": [],
1439
+ "table_footnote": [],
1440
+ "table_body": "<table><tr><td>IQA Ratio</td><td>Method</td><td>SQueAcc</td><td>AnsAcc</td><td>SQueAnsAcc</td><td>BLEU-1</td><td>BLEU-4</td><td>METEOR</td></tr><tr><td colspan=\"8\">IQA Task 1</td></tr><tr><td>0.8</td><td>CAN+IQA</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td></td><td>EncDec*</td><td>100%</td><td>99.5%</td><td>99.9%</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td colspan=\"8\">IQA Task 4</td></tr><tr><td>0.8</td><td>CAN+IQA</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td></td><td>EncDec*</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td colspan=\"8\">IQA Task 7</td></tr><tr><td>0.8</td><td>CAN+IQA</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td></tr><tr><td></td><td>EncDec*</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td></tr></table>",
1441
+ "bbox": [
1442
+ 232,
1443
+ 511,
1444
+ 764,
1445
+ 619
1446
+ ],
1447
+ "page_idx": 12
1448
+ },
1449
+ {
1450
+ "type": "text",
1451
+ "text": "Table 9: Performance comparison of the generated supplementary question quality with $R _ { I Q A }$ as 0.8. Both two methods achieve $1 0 0 \\%$ under all metrics in all tasks with other different $R _ { I Q A }$ values. ",
1452
+ "bbox": [
1453
+ 169,
1454
+ 628,
1455
+ 825,
1456
+ 657
1457
+ ],
1458
+ "page_idx": 12
1459
+ }
1460
+ ]
parse/train/SkyQWDcex/SkyQWDcex_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SkyQWDcex/SkyQWDcex_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SyxKrySYPr/SyxKrySYPr.md ADDED
@@ -0,0 +1,394 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # STABILIZING TRANSFORMERS FOR REINFORCEMENT LEARNING
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Owing to their ability to both effectively integrate information over long time horizons and scale to massive amounts of data, self-attention architectures have recently shown breakthrough success in natural language processing (NLP), achieving state-of-the-art results in domains such as language modeling and machine translation. Harnessing the transformer’s ability to process long time horizons of information could provide a similar performance boost in partially observable reinforcement learning (RL) domains, but the large-scale transformers used in NLP have yet to be successfully applied to the RL setting. In this work we demonstrate that the standard transformer architecture is difficult to optimize, which was previously observed in the supervised learning setting but becomes especially pronounced with RL objectives. We propose architectural modifications that substantially improve the stability and learning speed of the original Transformer and XL variant. The proposed architecture, the Gated Transformer-XL (GTrXL), surpasses LSTMs on challenging memory environments and achieves state-of-the-art results on the multi-task DMLab-30 benchmark suite, exceeding the performance of an external memory architecture. We show that the GTrXL, trained using the same losses, has stability and performance that consistently matches or exceeds a competitive LSTM baseline, including on more reactive tasks where memory is less critical. GTrXL offers an easy-to-train, simple-to-implement but substantially more expressive architectural alternative to the standard multi-layer LSTM ubiquitously used for RL agents in partially observable environments.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ It has been argued that self-attention architectures (Vaswani et al., 2017) deal better with longer temporal horizons than recurrent neural networks (RNNs): by construction, they avoid compressing the whole past into a fixed-size hidden state and they do not suffer from vanishing or exploding gradients in the same way as RNNs. Recent work has empirically validated these claims, demonstrating that self-attention architectures can provide significant gains in performance over the more traditional recurrent architectures such as the LSTM (Dai et al., 2019; Radford et al., 2019; Devlin et al., 2019; Yang et al., 2019). In particular, the Transformer architecture (Vaswani et al., 2017) has had breakthrough success in a wide variety of domains: language modeling (Dai et al., 2019; Radford et al., 2019; Yang et al., 2019), machine translation (Vaswani et al., 2017; Edunov et al., 2018), summarization (Liu & Lapata), question answering (Dehghani et al., 2018; Yang et al., 2019), multi-task representation learning for NLP (Devlin et al., 2019; Radford et al., 2019; Yang et al., 2019), and algorithmic tasks (Dehghani et al., 2018).
12
+
13
+ The repeated success of the transformer architecture in domains where sequential information processing is critical to performance makes it an ideal candidate for partially observable RL problems, where episodes can extend to thousands of steps and the critical observations for any decision often span the entire episode. Yet, the RL literature is dominated by the use of LSTMs as the main mechanism for providing memory to the agent (Espeholt et al., 2018; Kapturowski et al., 2019; Mnih et al., 2016). Despite progress at designing more expressive memory architectures (Graves et al., 2016; Wayne et al., 2018; Santoro et al., 2018) that perform better than LSTMs in memory-based tasks and partially-observable environments, they have not seen widespread adoption in RL agents perhaps due to their complex implementation, with the LSTM being seen as the go-to solution for environments where memory is required. In contrast to these other memory architectures, the transformer is well-tested in many challenging domains and has seen several open-source implementations in a variety of deep learning frameworks 1.
14
+
15
+ Motivated by the transformer’s superior performance over LSTMs and the widespread availability of implementations, in this work we investigate the transformer architecture in the RL setting. In particular, we find that the canonical transformer is significantly difficult to optimize, often resulting in performance comparable to a random policy. This difficulty in training transformers exists in the supervised case as well. Typically a complex learning rate schedule is required (e.g., linear warmup or cosine decay) in order to train (Vaswani et al., 2017; Dai et al., 2019), or specialized weight initialization schemes are used to improve performance (Radford et al., 2019). These measures do not seem to be sufficient for RL. In Mishra et al. (2018), for example, transformers could not solve even simple bandit tasks and tabular Markov Decision Processes (MDPs), leading the authors to hypothesize that the transformer architecture was not suitable for processing sequential information.
16
+
17
+ However in this work we succeed in stabilizing training with a reordering of the layer normalization coupled with the addition of a new gating mechanism to key points in the submodules of the transformer. Our novel gated architecture, the Gated Transformer-XL (GTrXL) (shown in Figure 1, Right), is able to learn much faster and more reliably and exhibit significantly better final performance than the canonical transformer. We further demonstrate that the GTrXL achieves state-ofthe-art results when compared to the external memory architecture MERLIN (Wayne et al., 2018) on the multitask DMLab-30 suite (Beattie et al., 2016). Additionally, we surpass LSTMs significantly on memory-based DMLab-30 levels while matching performance on the reactive set, as well as significantly outperforming LSTMs on memory-based continuous control and navigation environments. We perform extensive ablations on the GTrXL in challenging environments with both continuous actions and high-dimensional observations, testing the final performance of the various components as well as the GTrXL’s robustness to seed and hyperparameter sensitivity compared to LSTMs and the canonical transformer. We demonstrate a consistent superior performance while matching the stability of LSTMs, providing evidence that the GTrXL architecture can function as a drop-in replacement to the LSTM networks ubiquitously used in RL.
18
+
19
+ # 2 TRANSFORMER ARCHITECTURE AND VARIANTS
20
+
21
+ The transformer network consists of several stacked blocks that repeatedly apply self-attention to the input sequence. The transformer layer block itself has remained relatively constant since its original introduction (Vaswani et al., 2017; Liu et al., 2018; Radford et al., 2019). Each layer consists of two submodules: an attention operation followed by a position-wise multi-layer network (see Figure 1 (left)). The input to the transformer block is an embedding from the previous layer $E ^ { ( l - 1 ) } \in \bar { \mathbb { R } } ^ { T \times D }$ , where $T$ is the number of time steps, $D$ is the hidden dimension, and $l \in [ 0 , L ]$ is the layer index with $L$ being the total number of layers. We assume $E ^ { ( 0 ) }$ is an arbitrarily-obtained input embedding of dimension $[ T , D ]$ , e.g. a word embedding in the case of language modeling or an embedding of the per-timestep observations in an RL environment.
22
+
23
+ Multi-Head Attention: The Multi-Head Attention (MHA) submodule computes in parallel $H$ softattention operations for every time step. A residual connection (He et al., 2016a) and layer normalization (Ba et al., 2016) are then applied to the output (see Appendix C for more details):
24
+
25
+ $$
26
+ \begin{array} { r } { \overline { { Y } } ^ { ( l ) } = \mathbf { M } \mathbf { u } \mathbf { l } \mathrm { t i } \mathbf { H } \mathrm { e a d } \mathbf { A } \mathrm { t t e n t i o n } ( E ^ { ( l - 1 ) } ) , \quad \hat { Y } ^ { ( l ) } = E ^ { ( l - 1 ) } + \overline { { Y } } ^ { ( l ) } , \quad Y ^ { ( l ) } = \mathbf { L } \mathbf { a } \mathbf { y } \mathrm { e r N o r m } ( \hat { Y } ^ { ( l ) } ) , } \end{array}
27
+ $$
28
+
29
+ Multi-Layer Perceptron: The Multi-Layer Perceptron (MLP) submodule applies a $1 \times 1$ temporal convolutional network $f ^ { ( l ) }$ (i.e., kernel size 1, stride 1) over every step in the sequence, producing a new embedding tensor $E ^ { ( l ) } \in \mathbb { R } ^ { T \times D }$ . As in Dai et al. (2019), the network output does not include an activation function. After the MLP, there is a residual update followed by layer normalization:
30
+
31
+ $$
32
+ \begin{array} { r } { \overline { { E } } ^ { ( l ) } = f ^ { ( l ) } ( Y ^ { ( l ) } ) , \qquad \hat { E } ^ { ( l ) } = Y ^ { ( l ) } + \overline { { E } } ^ { ( l ) } , \qquad E ^ { ( l ) } = \mathrm { L a y e r N o r m } ( \hat { E } ^ { ( l ) } ) . } \end{array}
33
+ $$
34
+
35
+ Relative Position Encodings: The basic MHA operation does not take sequence order into account explicitly because it is permutation invariant. Positional encodings are a widely used solution in domains like language where order is an important semantic cue, appearing in the original transformer architecture (Vaswani et al., 2017). To enable a much larger contextual horizon than would otherwise be possible, we use the relative position encodings and memory scheme used in Dai et al. (2019). In this setting, there is an additional $\tau$ -step memory tensor $M ^ { ( l ) } \in \mathbb { R } ^ { T \times D }$ , which is treated as constant during weight updates. The MHA submodule then becomes:
36
+
37
+ ![](images/24f71f9da14fbd76fea3e26b5fccfb29c5dcc22f079d1fa3b7883d58778768f3.jpg)
38
+ Figure 1: Transformer variants, showing just a single layer block (there are $L$ layers total). Left: Canonical Transformer(-XL) block with multi-head attention and position-wise MLP submodules and the standard layer normalization (Ba et al., 2016) placement with respect to the residual connection (He et al., 2016a). Center: TrXL-I moves the layer normalization to the input stream of the submodules. Coupled with the residual connections, there is a gradient path that flows from output to input without any transformations. Right: The GTrXL block, which additionally adds a gating layer in place of the residual connection of the TrXL-I.
39
+
40
+ $$
41
+ \begin{array} { r l } & { \overline { { Y } } ^ { ( l ) } = \mathrm { R e l a t i v e M u l t i H e a d A t t e n t i o n } ( \mathrm { S t o p G r a d } ( M ^ { ( l - 1 ) } ) , E ^ { ( l - 1 ) } ) } \\ & { \hat { Y } ^ { ( l ) } = E ^ { ( l - 1 ) } + \overline { { Y } } ^ { ( l ) } , \qquad Y ^ { ( l ) } = \mathrm { L a y e r N o r m } ( \hat { Y } ^ { ( l ) } ) } \end{array}
42
+ $$
43
+
44
+ where StopGrad is a stop-gradient function that prevents gradients flowing backwards during backpropagation. We refer to Appendix $\textrm { C }$ for a more detailed description.
45
+
46
+ # 3 GATED TRANSFORMER ARCHITECTURES
47
+
48
+ While the transformer architecture has achieved breakthrough results in modeling sequences for supervised learning tasks (Vaswani et al., 2017; Liu et al., 2018; Dai et al., 2019), a demonstration of the transformer as a useful RL memory has been notably absent. Previous work has highlighted training difficulties and poor performance (Mishra et al., 2018). When transformers have not been used for temporal memory but instead as a mechanism for attention over the input space, they have had success—notably in the challenging multi-agent Starcraft 2 environment (Vinyals et al., 2019). Here, the transformer was applied solely across Starcraft units and not over time.
49
+
50
+ Multiplicative interactions have been successful at stabilizing learning across a wide variety of architectures (Hochreiter & Schmidhuber, 1997; Srivastava et al., 2015; Cho et al., 2014). Motivated by this, we propose the introduction of powerful gating mechanisms in place of the residual connections within the transformer block, coupled with changes to the order of layer normalization in the submodules. As will be empirically demonstrated, the “Identity Map Reordering” and gating mechanisms are critical for stabilizing learning and improving performance.
51
+
52
+ # 3.1 IDENTITY MAP REORDERING
53
+
54
+ Our first change is to place the layer normalization on only the input stream of the submodules, a modification described in several previous works (He et al., 2016b; Radford et al., 2019; Baevski & Auli, 2019). The model using this Identity Map Reordering is termed TrXL-I in the following, and is depicted visually in Figure 1 (center). A key benefit to this reordering is that it now enables an identity map from the input of the transformer at the first layer to the output of the transformer after the last layer. This is in contrast to the canonical transformer, where there are a series of layer normalization operations that non-linearly transform the state encoding. Because the layer norm reordering causes a path where two linear layers are applied in sequence, we apply a ReLU activation to each sub-module output before the residual connection (see Appendix C for equations).
55
+
56
+ The TrXL-I already exhibits a large improvement in stability and performance over TrXL (see Section 4.3.1). One hypothesis as to why the Identity Map Reordering improves results is as follows: assuming that the submodules at initialization produce values that are in expectation near zero, the state encoding is passed un-transformed to the policy and value heads, enabling the agent to learn a Markovian policy at the start of training (i.e., the network is initialized such that $\bar { \pi ( } \cdot | s _ { t } , \dots , s _ { 1 } ) \approx \pi ( \cdot | s _ { t } )$ and $V ^ { \bar { \pi } } ( s _ { t } | s _ { t - 1 } , \ldots , s _ { 1 } ) \approx \bar { V ^ { \pi } } ( s _ { t } | s _ { t - 1 } ) )$ . In many environments, reactive behaviours need to be learned before memory-based ones can be effectively utilized, i.e., an agent needs to learn how to walk before it can learn how to remember where it has walked.
57
+
58
+ # 3.2 GATING LAYERS
59
+
60
+ We further improve performance and optimization stability by replacing the residual connections in Equations 4 and 2 with gating layers. We call the gated architecture with the identity map reordering the Gated Transformer(-XL) (GTrXL). The final GTrXL layer block is written below:
61
+
62
+ $$
63
+ \begin{array} { r l } & { \overline { { Y } } ^ { ( l ) } = \mathrm { R e l a t i v e M u l t i H e a d A t t e n t i o n } ( \mathrm { L a y e r N o r m } ( \left[ \mathrm { S t o p G r a d } ( M ^ { ( l - 1 ) } ) , E ^ { ( l - 1 ) } \right] ) ) } \\ & { { Y } ^ { ( l ) } = g _ { \mathrm { M H A } } ^ { ( l ) } ( E ^ { ( l - 1 ) } , \mathrm { R e L U } ( \overline { { Y } } ^ { ( l ) } ) ) } \\ & { \overline { { E } } ^ { ( l ) } = f ^ { ( l ) } ( \mathrm { L a y e r N o r m } ( Y ^ { ( l ) } ) ) } \\ & { E ^ { ( l ) } = g _ { \mathrm { M L P } } ^ { ( l ) } ( Y ^ { ( l ) } , \mathrm { R e L U } ( \overline { { E } } ^ { ( l ) } ) ) } \end{array}
64
+ $$
65
+
66
+ where $g$ is a gating layer function. A visualization of our final architecture is shown in Figure 1 (right), with the modifications from the canonical transformer highlighted in red. In our experiments we ablate a variety of gating layers with increasing expressivity:
67
+
68
+ Input: The gated input connection has a sigmoid modulation on the input stream, similar to the short-cut-only gating from He et al. (2016b):
69
+
70
+ $$
71
+ g ^ { ( l ) } ( x , y ) = \sigma ( W _ { g } ^ { ( l ) } x ) \odot x + y
72
+ $$
73
+
74
+ Output: The gated output connection has a sigmoid modulation on the output stream:
75
+
76
+ $$
77
+ g ^ { ( l ) } ( x , y ) = x + \sigma ( W _ { g } ^ { ( l ) } x - b _ { g } ^ { ( l ) } ) \odot y
78
+ $$
79
+
80
+ Highway: The highway connection (Srivastava et al., 2015) modulates both streams with a sigmoid:
81
+
82
+ $$
83
+ g ^ { ( l ) } ( x , y ) = \sigma ( W _ { g } ^ { ( l ) } x + b _ { g } ^ { ( l ) } ) \odot x + ( 1 - \sigma ( W _ { g } ^ { ( l ) } x + b _ { g } ^ { ( l ) } ) ) \odot y
84
+ $$
85
+
86
+ Sigmoid-Tanh: The sigmoid-tanh (SigTanh) gate (Van den Oord et al., 2016) is similar to the Output gate but with an additional tanh activation on the output stream:
87
+
88
+ $$
89
+ g ^ { ( l ) } ( x , y ) = x + \sigma ( W _ { g } ^ { ( l ) } y - b ) \odot \operatorname { t a n h } ( U _ { g } ^ { ( l ) } y )
90
+ $$
91
+
92
+ Gated-Recurrent-Unit-type gating: The Gated Recurrent Unit (GRU) (Chung et al., 2014) is a recurrent network that performs similarly to an LSTM (Hochreiter & Schmidhuber, 1997) but has fewer parameters. We adapt its powerful gating mechanism as an untied activation function in depth:
93
+
94
+ $$
95
+ \begin{array} { r l } { r = \sigma ( W _ { r } ^ { ( l ) } y + U _ { r } ^ { ( l ) } x ) , \quad } & { z = \sigma ( W _ { z } ^ { ( l ) } y + U _ { z } ^ { ( l ) } x - b _ { g } ^ { ( l ) } ) , \quad \quad \hat { h } = \mathrm { t a n h } ( W _ { g } ^ { ( l ) } y + U _ { g } ^ { ( l ) } ( r \odot x ) ) , } \\ & { \quad \quad g ^ { ( l ) } ( x , y ) = ( 1 - z ) \odot x + z \odot \hat { h } . } \end{array}
96
+ $$
97
+
98
+ Gated Identity Initialization: We have claimed that the Identity Map Reordering aids policy optimization because it initializes the agent close to a Markovian policy $/$ value function. If this is indeed the cause of improved stability, we can explicitly initialize the various gating mechanisms to be close to the identity map. This is the purpose of the bias $b _ { g } ^ { ( l ) }$ in the applicable gating layers. We later demonstrate in an ablation that initially setting $b _ { g } ^ { ( l ) } > 0$ can greatly improve learning speed.
99
+
100
+ ![](images/c93c85aa1a2d28aacbb978e8fad8f56834ad11844271e51907d7f9c71ed31a7e.jpg)
101
+ Figure 2: Average return on DMLab-30, re-scaled such that a human has mean 100 score on each level and a random policy has 0. Left: Results averaged over the full DMLab-30 suite. Right: DMLab-30 partitioned into a “Memory” and “Reactive” split (described in Appendix D). The GTrXL has a substantial gain over LSTM in memory-based environments, while even slightly surpassing performance on the reactive set. We plot 6-8 hyperparameter settings per architecture (see Appendix B). MERLIN scores obtained from personal communication with the authors.
102
+
103
+ # 4 EXPERIMENTS
104
+
105
+ In this section, we provide experiments on a variety of challenging single and multi-task RL domains: DMLab-30 (Beattie et al., 2016), Numpad and Memory Maze (see Fig. 8). Crucially we demonstrate that the proposed Gated Transformer-XL (GTrXL) not only shows substantial improvements over LSTMs on memory-based environments, but suffers no degradation of performance on reactive environments. The GTrXL also exceeds MERLIN (Wayne et al., 2018), an external memory architecture which used a Differentiable Neural Computer (Graves et al., 2016) coupled with auxiliary losses, surpassing its performance on both memory and reactive tasks.
106
+
107
+ For all transformer architectures except when otherwise stated, we train relatively deep 12-layer networks with embedding size 256 and memory size 512. These networks are comparable to the state-of-the-art networks in use for small language modeling datasets (see enwik8 results in (Dai et al., 2019)). We chose to train deep networks in order to demonstrate that our results do not necessarily sacrifice complexity for stability, i.e. we are not making transformers stable for RL simply by making them shallow. Our networks have receptive fields that can potentially span any episode in the environments tested, with an upper bound on the receptive field of 6144 (12 layers $\times$ 512 memory (Dai et al., 2019)). Future work will look at scaling transformers in RL even further, e.g. towards the 52-layer network in Radford et al. (2019). See App. B for experimental details.
108
+
109
+ For all experiments, we used V-MPO (Anonymous Authors, 2019), an on-policy adaptation of Maximum a Posteriori Policy Optimization (MPO) (Abdolmaleki et al., 2018a;b) that performs approximate policy iteration based on a learned state-value function $V ( s )$ instead of the state-action value function used in MPO. Rather than directly updating the parameters in the direction of the policy gradient, V-MPO uses the estimated advantages to first construct a target distribution for the policy update subject to a sample-based KL constraint, then calculates the gradient that partially moves the parameters toward that target, again subject to a KL constraint. V-MPO was shown to achieve state-of-the-art results for LSTM-based agents on the multi-task DMLab-30 benchmark suite.
110
+
111
+ # 4.1 TRANSFORMER AS EFFECTIVE RL MEMORY ARCHITECTURE
112
+
113
+ We first present results of the best performing GTrXL variant, the GRU-type gating, against a competitive LSTM baseline, demonstrating a substantial improvement on the multi-task DMLab-30 do
114
+
115
+ <table><tr><td>Model</td><td>Mean Human Norm.</td><td>Mean Human Norm., 1OO-capped</td></tr><tr><td>LSTM TrXL</td><td>99.3 ± 1.0 5.0 ± 0.2</td><td>84.0± 0.4 5.0± 0.2</td></tr><tr><td>TrXL-I MERLIN@100B</td><td>107.0 ± 1.2</td><td>87.4 ± 0.3 89.4</td></tr><tr><td>GTrXL (GRU)</td><td>115.2 117.6 ± 0.3</td><td>89.1±0.2</td></tr><tr><td>GTrXL (Input)</td><td>51.2 ± 13.2</td><td>47.6 ± 12.1</td></tr><tr><td>GTrXL (Output)</td><td>112.8 ± 0.8</td><td>87.8 ± 0.3</td></tr><tr><td>GTrXL (Highway)</td><td>90.9 ± 12.9</td><td>75.2 ± 10.4</td></tr><tr><td>GTrXL (SigTanh)</td><td>101.0 ± 1.3</td><td>83.9 ± 0.7</td></tr></table>
116
+
117
+ Table 1: Final human-normalized return averaged across all 30 DMLab levels for baselines and GTrXL variants. We also include the 100-capped score where the per-level mean score is clipped at 100, providing a metric that is proportional to the percentage of levels that the agent is superhuman. We see that the GTrXL (GRU) surpasses LSTM by a significant gap and exceeds the performance of MERLIN (Wayne et al., 2018) trained for 100 billion environment steps. The GTrXL (Output) and the proposed reordered TrXL-I also surpass LSTM but perform slightly worse than MERLIN and are not as robust as GTrXL (GRU) (see Sec. 4.3.2). We sample 6-8 hyperparameters per model. We include standard error over runs.
118
+
119
+ ![](images/e42a5ac1dffa8ac199cbbe8c0b9dfb0eb55aad66f866f9f219f03630310d0f30.jpg)
120
+ Figure 3: Numpad results demonstrating that the GTrXL has much better memory scaling properties than LSTM. Left: As the Numpad environment’s memory requirement increases (because of larger pad size), the GTrXL suffers much less than LSTM. However, because of the combinatorial nature of Numpad, the GTrXL eventually also starts dropping in performance at $4 \mathbf { x } 4$ . We plot mean and standard error of the last 200 episodes after training each model for 0.15B, 1.0B and 2.0B environment steps for Numpad size 2, 3 and 4, respectively. Center, Right: Learning curves for the GTrXL on $2 \times 2$ and $4 \times 4$ Numpad. Even when the LSTM is trained for twice as long, the GTrXL still has a substantial improvement over it. We plot 5 hyperparameter settings per model for learning curves.
121
+
122
+ main (Beattie et al., 2016). DMLab-30 is a large-scale, multitask benchmark comprising 30 firstperson 3D environments with image observations and has been widely used as a benchmark for architectural and algorithmic improvements (Wayne et al., 2018; Espeholt et al., 2018; Kapturowski et al., 2019; Hessel et al., 2018). The levels test a wide agent competencies such as language comprehension, navigation, handling of partial observability, memory, planning, and other forms of long horizon reasoning, with episodes lasting over 4000 environment steps. Figure 2 shows mean return over all levels as training progresses, where the return is human normalized as done in previous work (meaning a human has a per-level mean score of 100 and a random policy has a score of 0), while Table 1 has the final performance at 10 billion environment steps. The GTrXL has a significant gap over a 3-layer LSTM baseline trained using the same V-MPO algorithm. Furthermore, we included the final results of a previously-published external memory architecture, MERLIN (Wayne et al., 2018). Because MERLIN was trained for 100 billion environment steps with a different algorithm, IMPALA (Espeholt et al., 2018), and also involved an auxiliary loss critical for the memory component to function, the learning curves are not directly comparable and we only report the final performance of the architecture as a dotted line. Despite the differences, our results demonstrate that the GTrXL can match the previous state-of-the-art on DMLab-30. An informative split between a set of memory-based levels and more reactive ones (listed in Appendix D) reveals that our model specifically has large improvements in environments where memory plays a critical role. Meanwhile, GTrXL also shows improvement over LSTMs on the set of reactive levels, as memory can still be effectively utilized in some of these levels.
123
+
124
+ ![](images/6ebc3b88c22a70f561ea1d8adaca940b8b2170d0b3b861cbd61be06aca2ef38d.jpg)
125
+ Figure 4: Learning curves for the gating mechanisms, along with MERLIN score at 100 billion frames as a reference point. We can see that the GRU performs as well as any other gating mechanism on the reactive set of tasks. On the memory environments, the GRU gating has a significant gain in learning speed and attains the highest final performance at the fastest rate. We plot both mean (bold) and the individual 6-8 hyperparameter samples per model (light).
126
+
127
+ ![](images/819f06577ec44d9a36e159282cc7e8c37c22a71d587b02b727e7152b962f1b12.jpg)
128
+ Figure 5: Sensitivity analysis of GTrXL variants versus $\mathrm { T r X L }$ and LSTM baselines. We sample 25 different hyperparameter sets and seeds and plot the ranked average return at 3 points during training (0.5B, 1.0B and 2.0B environment steps). Higher and flatter lines indicate more robust architectures. The same hyperparameter sampling distributions were used across models (see Appendix B). We plot human performance as a dotted line.
129
+
130
+ # 4.2 SCALING WITH MEMORY HORIZON
131
+
132
+ We next demonstrate that the GTrXL scales better compared to an LSTM when an environment’s temporal horizon is increased, using the “Numpad” continuous control task of Humplik et al. (2019) which allows an easy combinatorial increase in the temporal horizon. In Numpad, a robotic agent is situated on a platform resembling the $3 { \tt X } 3$ number pad of a telephone (generalizable to $N \times N$ pads). The agent can interact with the pads by colliding with them, causing them to be activated (visualized in the environment state as the number pad glowing). The goal of the agent is to activate a specific sequence of up to $N ^ { 2 }$ numbers, but without knowing this sequence a priori. The only feedback the agent gets is by activating numbers: if the pad is the next one in the sequence, the agent gains a reward of $+ 1$ , otherwise all activated pads are cleared and the agent must restart the sequence. Each correct number in the sequence only provides reward once, i.e. each subsequent activation of that number will no longer provide rewards. Therefore the agent must explicitly develop a search strategy to determine the correct pad sequence. Once the agent completes the full sequence, all pads are reset and the agent gets a chance to repeat the sequence again for more reward. This means higher reward directly translates into how well the pad sequence has been memorized. An image of the scenario is provided in Figure 3. There is the restriction that contiguous pads in the sequence must be contiguous in space, i.e. the next pad in the sequence can only be in the Moore neighborhood of the previous pad. Furthermore, no pad can be pressed twice in the sequence.
133
+
134
+ We present two results in this environment in Figure 3. The first measures the final performance of the trained models as a function of the pad size. We can see that LSTM performs badly on all 3 pad sizes, and performs worse as the pad size increases from 2 to 4. The GTrXL performs much better, and almost instantly solves the environment with its much more expressive memory. On the center and right images, we provide learning curves for the $2 \times 2$ and $4 \times 4$ Numpad environments, and show that even when the LSTM is trained twice as long it does not reach GTrXL’s performance.
135
+
136
+ ![](images/934c3aca65aec5eaa9ec356178a2503b51f8b5f614064a42547fdfb9398233d6.jpg)
137
+ Figure 6: Learning curves comparing a thinner GTrXL (GRU) with half the embedding dimension of the other presented gated variants and TrXL baselines. The Thin GTrXL (GRU) has fewer parameters than any other model presented but still matches the performance of the best performing counterpart, the GTrXL (Output), which has over 10 million more parameters. We plot both mean (bold) and 6-8 hyperparameter settings (light) per model.
138
+
139
+ Table 2: Parameter-controlled ablation. We report standard error of the means of 6-8 runs per model.
140
+
141
+ <table><tr><td>Model</td><td>Mean Human Norm. Score</td><td>#Param. Millions</td></tr><tr><td>LSTM</td><td>99.3 ±1.0</td><td>9.25M</td></tr><tr><td>Large LSTM</td><td>103.5 ± 0.9</td><td>51.3M</td></tr><tr><td>TrXL</td><td>5.0± 0.2</td><td>28.6M</td></tr><tr><td>TrXL-I</td><td>107.0 ± 1.2</td><td>28.6M</td></tr><tr><td>Thin GTrXL (GRU)</td><td>111.5 ± 0.6</td><td>22.4M</td></tr><tr><td>GTrXL (GRU)</td><td>117.6 ± 0.3</td><td>66.4M</td></tr><tr><td>GTrXL (Input)</td><td>51.2 ±13.2</td><td>34.9M</td></tr><tr><td>GTrXL (Output)</td><td>112.8 ± 0.8</td><td>34.9M</td></tr><tr><td>GTrXL (Highway)</td><td>90.9 ± 12.9</td><td>34.9M</td></tr><tr><td>GTrXL (SigTanh)</td><td>101.0 ± 1.3</td><td>41.2M</td></tr></table>
142
+
143
+ Table 3: Percentage of the 25 parameter settings where the training loss diverged within 2 billion env. steps. We do not report numbers for GTrXL gating types that were unstable in DMLab-30. For diverged runs we plot the returns in Figure 5 as 0 afterwards.
144
+
145
+ <table><tr><td>Model</td><td>% Diverged</td></tr><tr><td>LSTM</td><td>0%</td></tr><tr><td>TrXL</td><td>0%</td></tr><tr><td>TrXL-I</td><td>16%</td></tr><tr><td>GTrXL(GRU)</td><td>0%</td></tr><tr><td>GTrXL (Output)</td><td>12%</td></tr></table>
146
+
147
+ # 4.3 GATING VARIANTS $^ +$ IDENTITY MAP REORDERING
148
+
149
+ We demonstrated that the GRU-type-gated GTrXL can achieve state-of-the-art results on DMLab30, surpassing both a deep LSTM and an external memory architecture, and also that the GTrXL has a memory which scales better with the memory horizon of the environment. However, the question remains whether the expressive gating mechanisms of the GRU could be replaced by simpler alternatives. In this section, we perform extensive ablations on the gating variants described in Section 3.2, and show that the GTrXL (GRU) has improvements in learning speed, final performance and optimization stability over all other models, even when controlling for the number of parameters.
150
+
151
+ # 4.3.1 PERFORMANCE ABLATION
152
+
153
+ We first report the performance of the gating variants in DMLab-30. Table 1 and Figure 4 show the final performance and training curves of the various gating types in both the memory / reactive split, respectively. The canonical TrXL completely fails to learn, while the TrXL-I improves over the LSTM. Of the gating varieties, the GTrXL (Output) can recover a large amount of the performance of the GTrXL (GRU), especially in the reactive set, but as shown in Sec. 4.3.2 is generally far less stable. The GTrXL (Input) performs worse than even the TrXL-I, reinforcing the identity map path hypothesis. Finally, the GTrXL (Highway) and GTrXL (SigTanh) are more sensitive to the hyperparameter settings compared to the alternatives, with some settings doing worse than TrXL-I.
154
+
155
+ ![](images/b6a1d40e5ab5dc98b878ecf82e90f7ec422bb0cd8ed05d3071675f8d8c4912bb.jpg)
156
+ Figure 7: Ablation of the gated identity initialization on Memory Maze by comparing 10 runs of a model run with the bias initialization and 10 runs of a model without. Every run has independently sampled hyperparameters from a distribution. We plot the ranked mean return of the 10 runs of each model at 1, 2, and 4 billion environment steps. Each mean return is the average of the past 200 episodes at the point of the model snapshot. We plot human performance as a dotted line.
157
+
158
+ # 4.3.2 HYPERPARAMETER AND SEED SENSITIVITY
159
+
160
+ Beyond improved performance, we next demonstrate a significant reduction in hyperparameter and seed sensitivity for the GTrXL (GRU) compared to baselines and other GTrXL variants. We use the “Memory Maze” environment, a memory-based navigation task in which the agent must discover the location of an apple randomly placed in a maze of blocks. The agent receives a positive reward for collecting the apple and is then teleported to a random location in the maze, with the apple’s position held fixed. The agent can make use of landmarks situated around the room to return as quickly as possible to the apple for subsequent rewards. Therefore, an effective mapping of the environment results in more frequent returns to the apple and higher reward.
161
+
162
+ We chose to perform the sensitivity ablation on Memory Maze because (1) it requires the use of longrange memory to be effective and (2) it includes both continuous and discrete action sets (details in Appendix A) which makes optimization more difficult. In Figure 5, we sample 25 independent V-MPO hyperparameter settings from a wide range of values and train the networks to 2 billion environment steps (see Appendix B). Then, at various points in training (0.5B, 1.0B and 2.0B), we rank all runs by their mean return and plot this ranking. Models with curves which are both higher and flatter are thus more robust to hyperparameters and random seeds. Our results demonstrate that (1) the GTrXL (GRU) can learn this challenging memory environment in much fewer environment steps than LSTM, and (2) that GTrXL (GRU) beats the other gating variants in stability by a large margin, thereby offering a substantial reduction in necessary hyperparameter tuning. The values in Table 3 list what percentage of the 25 runs per model had losses that diverged to infinity. We can see that the only model reaching human performance in 2 billion environment steps is the GTrXL (GRU), with 10 runs having a mean score 8 and above.
163
+
164
+ # 4.3.3 PARAMETER COUNT-CONTROLLED COMPARISONS
165
+
166
+ For the final gating ablation, we compare transformer variants while tracking their total parameter count to control for the increase in capacity caused by the introduction of additional parameters in the gating mechanisms. To demonstrate that the advantages of the GTrXL (GRU) are not solely due to an increase in parameter count, we halve the number of attention heads (which also effectively halves the embedding dimension due to the convention that the embedding size is the number of heads multiplied by the attention head dimension). The effect is a substantial reduction in parameter count, resulting in less parameters than even the canonical TrXL. Fig. 6 and Tab. 2 compare the different models to the “Thin” GTrXL (GRU), with Tab. 2 listing the parameter counts. We include a parameter-matched LSTM model with 12 layers and 512 hidden size. The Thin GTrXL (GRU) surpasses every other model (within variance) except the GTrXL (GRU), even surpassing the next best-performing model, the GTrXL (Output), with over 10 million less parameters.
167
+
168
+ # 4.3.4 GATED IDENTITY INITIALIZATION ABLATION
169
+
170
+ All applicable gating variants in the previous sections were trained with the gated identity initialization. We observed in initial Memory Maze results that the gated identity initialization significantly improved optimization stability and learning speed. Figure 7 compares an otherwise identical 4- layer GTrXL (GRU) trained with and without the gated identity initialization. Similarly to the previous sensitivity plots, we plot the ranked mean return of 10 runs at various times during training. As can be seen from Fig. 7, there is a significant gap caused by the bias initialization, suggesting that preconditioning the transformer to be close to Markovian results in large learning speed gains.
171
+
172
+ # 5 RELATED WORK
173
+
174
+ Gating has been shown to be effective to address the vanishing gradient problem and thus improve the learnability of recurrent models. LSTM networks (Hochreiter & Schmidhuber, 1997; Graves, 2013) rely on an input, forget and output gate that protect the update of the cell. GRU (Chung et al., 2014; Cho et al., 2014) is another popular gated recurrent architecture that simplifies the LSTM cell, reducing the number of gates to two. Finding an optimal gating mechanism remains an active area of research, with other existing proposals (Krause et al., 2016; Kalchbrenner et al., 2015; Wu et al., 2016), as well as works trying to discover optimal gating by neural architecture search (Zoph & Le, 2017) More generally, gating and multiplicative interactions have a long history (Rumelhart et al., 1986). Gating has been investigated previously for improving the representational power of feedforward and recurrent models (Van den Oord et al., 2016; Dauphin et al., 2017), as well as learnability (Srivastava et al., 2015; Zilly et al., 2017). Initialization has also played a crucial role in making deep models trainable (LeCun et al., 1998; Glorot & Bengio, 2010; Sutskever et al., 2013).
175
+
176
+ There has been a wide variety of work looking at improving memory in reinforcement learning agents. External memory approaches typically have a regular feedforward or recurrent policy interact with a memory database through read and write operations. Priors are induced through the design of the specific read/write operations, such as those resembling a digital computer (Wayne et al., 2018; Graves et al., 2016) or an environment map (Parisotto & Salakhutdinov, 2018; Gupta et al., 2017). An alternative non-parametric perspective to memory stores an entire replay buffer of the agent’s past observations, which is made available for the agent to itself reason over either through fixed rules (Blundell et al., 2016) or an attention operation (Pritzel et al., 2017). Others have looked at improving performance of LSTM agents by extending the architecture with stacked hierarchical connections / multiple temporal scales and auxiliary losses (Jaderberg et al., 2019; Stooke et al., 2019) or allowing an inner-loop update to the RNN weights (Miconi et al., 2018). Other work has examined self-attention in the context of exploiting relational structure within the inputspace (Zambaldi et al., 2019) or within recurrent memories (Santoro et al., 2018).
177
+
178
+ # 6 CONCLUSION
179
+
180
+ In this paper we provided evidence that confirms previous observations in the literature that standard transformer models are unstable to train in the RL setting and often fail to learn completely (Mishra et al., 2018). We presented a new architectural variant of the transformer model, the GTrXL, which has increased performance, more stable optimization, and greater robustness to initial seed and hyperparameters than the canonical architecture. The key contributions of the GTrXL are reordered layer normalization modules and a gating layer instead of the standard residual connection. We performed extensive ablation experiments testing the robustness, ease of optimization and final performance of the gating layer variations, as well as the effect of the reordered layer normalization. These results empirically demonstrate that the GRU-type gating performs best across all metrics, exhibiting comparable robustness to hyperparameters and random seeds as an LSTM while still maintaining a performance improvement. Furthermore, the GTrXL (GRU) learns faster, more stably and achieves a higher final performance (even when controlled for parameters) than the other gating variants on the challenging multitask DMLab-30 benchmark suite.
181
+
182
+ Having demonstrated substantial and consistent improvement in DMLab-30, Numpad and Memory Maze over the ubiquitous LSTM architectures currently in use, the GTrXL makes the case for wider adoption of transformers in RL. A core benefit of the transformer architecture is its ability to scale to very large and deep models, and to effectively utilize this additional capacity in larger datasets. In future work, we hope to test the limits of the GTrXL’s ability to scale in the RL setting by providing it with a large and varied set of training environments.
183
+
184
+ REFERENCES
185
+ Abbas Abdolmaleki, Jost Tobias Springenberg, Jonas Degrave, Steven Bohez, Yuval Tassa, Dan Belov, Nicolas Heess, and Martin Riedmiller. Relative Entropy Regularized Policy Iteration. arXiv preprint, 2018a. URL https://arxiv.org/pdf/1812.02256.pdf.
186
+ Abbas Abdolmaleki, Jost Tobias Springenberg, Yuval Tassa, Remi Munos, Nicolas Heess, and Martin Riedmiller. Maximum a Posteriori Policy Optimisation. Int. Conf. Learn. Represent., 2018b. URL https://arxiv.org/pdf/1806.06920.pdf.
187
+ Anonymous Authors. V-MPO: On-Policy Maximum a Posteriori Policy Optimization for Discrete and Continuous Control. Under review, Int. Conf. Learn. Represent., 2019.
188
+ Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.
189
+ Alexei Baevski and Michael Auli. Adaptive input representations for neural language modeling. Int. Conf. Learn. Represent., 2019.
190
+ Charles Beattie, Joel Z Leibo, Denis Teplyashin, Tom Ward, Marcus Wainwright, Heinrich Kuttler, ¨ Andrew Lefrancq, Simon Green, V´ıctor Valdes, Amir Sadik, et al. Deepmind lab. ´ arXiv preprint arXiv:1612.03801, 2016.
191
+ Charles Blundell, Benigno Uria, Alexander Pritzel, Yazhe Li, Avraham Ruderman, Joel Z Leibo, Jack Rae, Daan Wierstra, and Demis Hassabis. Model-free episodic control. arXiv preprint arXiv:1606.04460, 2016.
192
+ Peter Buchlovsky, David Budden, Dominik Grewe, Chris Jones, John Aslanides, Frederic Besse, Andy Brock, Aidan Clark, Sergio Gomez Colmenarejo, Aedan Pope, Fabio Viola, and Dan Belov. TF-Replicator: Distributed Machine Learning for Researchers. arXiv preprint, 2019. URL http://arxiv.org/abs/1902.00465.
193
+ Kyunghyun Cho, Bart Van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Hol- ¨ ger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014.
194
+ Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014.
195
+ Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc Le, and Ruslan Salakhutdinov. Transformer-XL: Attentive language models beyond a fixed-length context. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 2978–2988, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/v1/P19-1285. URL https://www.aclweb.org/anthology/P19-1285.
196
+ Yann N Dauphin, Angela Fan, Michael Auli, and David Grangier. Language modeling with gated convolutional networks. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 933–941. JMLR. org, 2017.
197
+ Mostafa Dehghani, Stephan Gouws, Oriol Vinyals, Jakob Uszkoreit, and Łukasz Kaiser. Universal transformers. Int. Conf. Learn. Represent., 2018.
198
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 4171–4186, 2019.
199
+ Sergey Edunov, Myle Ott, Michael Auli, and David Grangier. Understanding back-translation at scale. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 489–500, 2018.
200
+ Lasse Espeholt, Hubert Soyer, Remi Munos, Karen Simonyan, Volodymyr Mnih, Tom Ward, Yotam Doron, Vlad Firoiu, Tim Harley, Iain Dunning, Shane Legg, and Koray Kavukcuoglu. Impala: Scalable distributed deep-rl with importance weighted actor-learner architectures. In International Conference on Machine Learning, pp. 1406–1415, 2018.
201
+
202
+ Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In In Proceedings of the International Conference on Artificial Intelligence and Statistics (AISTATS10). Society for Artificial Intelligence and Statistics, 2010.
203
+
204
+ Google. Cloud TPU, 2018. URL https://cloud.google.com/tpu/.
205
+
206
+ Alex Graves. Generating sequences with recurrent neural networks, 2013.
207
+
208
+ Alex Graves, Greg Wayne, Malcolm Reynolds, Tim Harley, Ivo Danihelka, Agnieszka GrabskaBarwinska, Sergio G ´ omez Colmenarejo, Edward Grefenstette, Tiago Ramalho, John Agapiou, ´ et al. Hybrid computing using a neural network with dynamic external memory. Nature, 538 (7626):471, 2016.
209
+
210
+ Saurabh Gupta, James Davidson, Sergey Levine, Rahul Sukthankar, and Jitendra Malik. Cognitive mapping and planning for visual navigation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2616–2625, 2017.
211
+
212
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016a.
213
+
214
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European conference on computer vision, pp. 630–645. Springer, 2016b.
215
+
216
+ Matteo Hessel, Hubert Soyer, Lasse Espeholt, Wojciech Czarnecki, Simon Schmitt, and Hado van Hasselt. Multi-task Deep Reinforcement Learning with PopArt. arXiv preprint, 2018. URL https://arxiv.org/pdf/1809.04474.pdf.
217
+
218
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
219
+
220
+ Jan Humplik, Alexandre Galashov, Leonard Hasenclever, Pedro A. Ortega, Yee Whye Teh, and Nicolas Heess. Meta reinforcement learning as task inference. arXiv preprint, 2019. URL http://arxiv.org/abs/1905.06424.
221
+
222
+ Max Jaderberg, Wojciech M Czarnecki, Iain Dunning, Luke Marris, Guy Lever, Antonio Garcia Castaneda, Charles Beattie, Neil C Rabinowitz, Ari S Morcos, Avraham Ruderman, et al. Humanlevel performance in 3d multiplayer games with population-based reinforcement learning. Science, 364(6443):859–865, 2019.
223
+
224
+ Nal Kalchbrenner, Ivo Danihelka, and Alex Graves. Grid long short-term memory. 07 2015.
225
+
226
+ Steven Kapturowski, Georg Ostrovski, John Quan, Remi Munos, and Will Dabney. Recurrent experience replay in distributed reinforcement learning. Int. Conf. Learn. Represent., 2019.
227
+
228
+ Ben Krause, Liang Lu, Iain Murray, and Steve Renals. Multiplicative lstm for sequence modelling, 2016.
229
+
230
+ Yann LeCun, Leon Bottou, Genevieve B. Orr, and Klaus-Robert M ´ uller. Efficient backprop. In ¨ Neural Networks: Tricks of the Trade, This Book is an Outgrowth of a 1996 NIPS Workshop, pp. 9–50, London, UK, UK, 1998. Springer-Verlag. ISBN 3-540-65311-2. URL http://dl. acm.org/citation.cfm?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ 645754.668382.
231
+
232
+ Peter J Liu, Mohammad Saleh, Etienne Pot, Ben Goodrich, Ryan Sepassi, Lukasz Kaiser, and Noam Shazeer. Generating wikipedia by summarizing long sequences. Int. Conf. Learn. Represent., 2018.
233
+
234
+ Yang Liu and Mirella Lapata. Text summarization with pretrained encoders. Conference on Empirical Methods in Natural Language Processing.
235
+
236
+ Thomas Miconi, Kenneth Stanley, and Jeff Clune. Differentiable plasticity: training plastic neural networks with backpropagation. In International Conference on Machine Learning, pp. 3556– 3565, 2018.
237
+
238
+ Nikhil Mishra, Mostafa Rohaninejad, Xi Chen, and Pieter Abbeel. A Simple Neural Attentive MetaLearner. Int. Conf. Learn. Represent., 2018. URL https://openreview.net/pdf?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ B1DmUzWAW.
239
+
240
+ 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 International conference on machine learning, pp. 1928–1937, 2016.
241
+
242
+ Michael Neunert, Abbas Abdolmaleki, Markus Wulfmeier, Thomas Lampe, Nicolas Heess, Roland Hafner, and Martin Riedmiller. Continuous-Discrete Deep Reinforcement Learning for Hybrid Control in Robotics. To appear in Conf. on Robot Learn. (CoRL), 2019.
243
+
244
+ Emilio Parisotto and Ruslan Salakhutdinov. Neural map: Structured memory for deep reinforcement learning. Int. Conf. Learn. Represent., 2018.
245
+
246
+ Alexander Pritzel, Benigno Uria, Sriram Srinivasan, Adria Puigdom \` enech Badia, Oriol Vinyals, \` Demis Hassabis, Daan Wierstra, and Charles Blundell. Neural episodic control. In International Conference on Machine Learning, pp. 2827–2836, 2017.
247
+
248
+ Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. 2019.
249
+
250
+ D. E. Rumelhart, G. E. Hinton, and J. L. McClelland. Parallel distributed processing: Explorations in the microstructure of cognition, vol. 1. chapter 2: A General Framework for Parallel Distributed Processing, pp. 45–76. MIT Press, Cambridge, MA, USA, 1986. ISBN 0-262-68053-X. URL http://dl.acm.org/citation.cfm?id=104279.104286.
251
+
252
+ Adam Santoro, Ryan Faulkner, David Raposo, Jack Rae, Mike Chrzanowski, Theophane Weber, Daan Wierstra, Oriol Vinyals, Razvan Pascanu, and Timothy Lillicrap. Relational recurrent neural networks. In Advances in Neural Information Processing Systems, pp. 7299–7310, 2018.
253
+
254
+ Rupesh Kumar Srivastava, Klaus Greff, and Jurgen Schmidhuber. Highway networks. ¨ arXiv preprint arXiv:1505.00387, 2015.
255
+
256
+ Adam Stooke, Valentin Dalibard, Siddhant M Jayakumar, Wojciech M Czarnecki, and Max Jaderberg. Perception-prediction-reaction agents for deep reinforcement learning. SPIRL Workshop, 2019.
257
+
258
+ Ilya Sutskever, James Martens, George Dahl, and Geoffrey Hinton. On the importance of initialization and momentum in deep learning. In Sanjoy Dasgupta and David McAllester (eds.), Proceedings of the 30th International Conference on Machine Learning, volume 28 of Proceedings of Machine Learning Research, pp. 1139–1147, Atlanta, Georgia, USA, 17–19 Jun 2013. PMLR. URL http://proceedings.mlr.press/v28/sutskever13.html.
259
+
260
+ Aaron Van den Oord, Nal Kalchbrenner, Lasse Espeholt, Oriol Vinyals, Alex Graves, and Koray Kavukcuoglu. Conditional image generation with pixelcnn decoders. In Advances in neural information processing systems, pp. 4790–4798, 2016.
261
+
262
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in Neural Information Processing Systems, pp. 5998–6008, 2017. URL https://papers.nips.cc/paper/ 7181-attention-is-all-you-need.pdf.
263
+
264
+ Oriol Vinyals, Igor Babuschkin, Junyoung Chung, Michael Mathieu, Max Jaderberg, Wojtek Czarnecki, Andrew Dudzik, Aja Huang, Petko Georgiev, Richard Powell, Timo Ewalds, Dan Horgan, Manuel Kroiss, Ivo Danihelka, John Agapiou, Junhyuk Oh, Valentin Dalibard, David Choi, Laurent Sifre, Yury Sulsky, Sasha Vezhnevets, James Molloy, Trevor Cai, David Budden, Tom Paine, Caglar Gulcehre, Ziyu Wang, Tobias Pfaff, Toby Pohlen, Dani Yogatama, Julia Cohen, Katrina McKinney, Oliver Smith, Tom Schaul, Timothy Lillicrap, Chris Apps, Koray Kavukcuoglu, Demis Hassabis, and David Silver. AlphaStar: Mastering the Real-Time Strategy Game StarCraft II. https://deepmind.com/blog/ alphastar-mastering-real-time-strategy-game-starcraft-ii/, 2019.
265
+
266
+ Greg Wayne, Chia-Chun Hung, David Amos, Mehdi Mirza, Arun Ahuja, Agnieszka GrabskaBarwinska, Jack Rae, Piotr Mirowski, Joel Z. Leibo, Adam Santoro, Mevlana Gemici, Malcolm Reynolds, Tim Harley, Josh Abramson, Shakir Mohamed, Danilo Rezende, David Saxton, Adam Cain, Chloe Hillier, David Silver, Koray Kavukcuoglu, Matt Botvinick, Demis Hassabis, and Timothy Lillicrap. Unsupervised predictive memory in a goal-directed agent. arXiv preprint arXiv:1803.10760, 2018.
267
+ Yuhuai Wu, Saizheng Zhang, Ying Zhang, Yoshua Bengio, and Ruslan R Salakhutdinov. On multiplicative integration with recurrent neural networks. In Advances in neural information processing systems, pp. 2856–2864, 2016.
268
+ Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, and Quoc V Le. Xlnet: Generalized autoregressive pretraining for language understanding. Advances in Neural Information Processing Systems, 2019.
269
+ Vinicius Zambaldi, David Raposo, Adam Santoro, Victor Bapst, Yujia Li, Igor Babuschkin, Karl Tuyls, David Reichert, Timothy Lillicrap, Edward Lockhart, Murray Shanahan, Victoria Langston, Razvan Pascanu, Matthew Botvinick, Oriol Vinyals, and Peter Battaglia. Deep reinforcement learning with relational inductive biases. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ HkxaFoC9KQ.
270
+ Julian Georg Zilly, Rupesh Kumar Srivastava, Jan Koutn´ık, and Jurgen Schmidhuber. Recurrent ¨ highway networks. In Proceedings of the 34th International Conference on Machine LearningVolume 70, pp. 4189–4198. JMLR. org, 2017.
271
+ Barret Zoph and Quoc V. Le. Neural architecture search with reinforcement learning. In ICLR, 2017. URL https://arxiv.org/abs/1611.01578.
272
+
273
+ ![](images/9df923d4f1de7271328f896274725ee57f3708b0653257e8762105b373b0603a.jpg)
274
+ Figure 8: Left: The Numpad environment, showing the controllable “sphere” robot and a full $3 { \bf x } 3$ pad. Pads are activated when the robot collides with their center. The robot can move on the plane as well as jump to avoid pressing numbers. Right: Top down view of “Memory Maze”: (1) Central chamber, (2) blocks among which the apple is placed, (3) landmarks the agent can use to locate the apple, (4) one of the possible location of the apple.
275
+ Table 4: Native action space for DMLab. See https://github.com/deepmind/lab/ blob/master/docs/users/actions.md for more details.
276
+
277
+ # APPENDIX
278
+
279
+ # A ENVIRONMENT DETAILS
280
+
281
+ Numpad: Numpad has three actions, two of which move the sphere towards some direction in the x,y plane and the third allows the agent to jump in order to get over a pad faster. The observation consists of a variety of proprioceptive information (e.g. position, velocity, acceleration) as well as which pads in the sequence have been correctly activated (these will shut off if an incorrect pad is later hit), and the previous action and reward. Episodes last a fixed 500 steps and the agent can repeat the correct sequence any number of times to receive reward. Observations were processed using a simple 2-layer MLP with tanh activations to produce the transformer’s input embedding.
282
+
283
+ DMLab-30: Ignoring the “jump” and “crouch” actions which we do not use, an action in the native DMLab action space consists of 5 integers whose meaning and allowed values are given in Table 4. Following previous work on DMLab (Hessel et al., 2018), we used the reduced action set given in Table 5 with an action repeat of 4. Observations are $7 2 \times 9 6$ RGB images. Some levels require a language input, and for that all models use an additional 64-dimension LSTM to process the sentence.
284
+
285
+ In Wayne et al. (2018), the DMLab Arbitrary Visuomotor Mapping task was specifically used to highlight the MERLIN architecture’s ability to utilize memory. In Figure 9 we show that, given a similarly reduced action set as used in Wayne et al. (2018), see Table 6, the GTrXL architecture can also reliably attain human-level performance on this task.
286
+
287
+ <table><tr><td>ACTION NAME</td><td>RANGE</td></tr><tr><td>LOOKLEFT_RIGHT_PIXELS_PER_FRAME</td><td>[-512, 512]</td></tr><tr><td>LOOK_DOWN_UP_PIXELS_PER_FRAME</td><td>[-512, 512]</td></tr><tr><td>STRAFE_LEFT_RIGHT</td><td>[-1, 1]</td></tr><tr><td>MOVE_BACK_FORWARD</td><td>[-1, 1]</td></tr><tr><td>FIRE</td><td>[0,1]</td></tr></table>
288
+
289
+ Memory Maze: An action in the native Memory Maze action space consists of 8 continuous actions and a single discrete action whose meaning and allowed values are given in Table 7. Unlike for DMLab, we used a hybrid continuous-discrete distribution (Neunert et al., 2019) to directly output policies in the game’s native action space. Observations are $7 2 \times 9 6$ RGB images.
290
+
291
+ ![](images/58c2c94be3a7144c067b1a7b1e712b7fee093fda897725fadd0a13dd16ac8b66.jpg)
292
+
293
+ Figure 9: Learning curves for the DMLab Arbitrary Visuomotor Mapping task using a reduced action set.
294
+
295
+ <table><tr><td>ACTION</td><td>NATIVE DMLAB ACTION</td></tr><tr><td>Forward (FW)</td><td>0, 0, 0,</td></tr><tr><td>Backward (BW)</td><td>1, [ 0, 0, 0, -1,</td></tr><tr><td>Strafe left</td><td>0, 0, -1, 0,</td></tr><tr><td>Strafe right</td><td>0, 0, 1,</td></tr><tr><td>Small look left (LL)</td><td>[-10, 0, 0,</td></tr><tr><td>Small look right (LR)</td><td>[10, 0,</td></tr><tr><td>Large look left (LL)</td><td>0, [-60, 0, 0,</td></tr><tr><td>Large look right (LR)</td><td>[60, 0, 0,</td></tr><tr><td>Look down</td><td>0, 10,</td></tr><tr><td>Look up</td><td>0, -10,</td></tr><tr><td>FW + small LL</td><td>0,</td></tr><tr><td>FW+ small LR</td><td>[-10, [10,</td></tr><tr><td>FW + large LL</td><td>0, [-60,</td></tr><tr><td>FW + large LR</td><td>0, [60, 0,</td></tr><tr><td></td><td>0, 0,</td></tr><tr><td>Fire</td><td>[0, 0,</td></tr></table>
296
+
297
+ Table 5: Simplified action set for DMLab from Hessel et al. (2018).
298
+ Table 6: Simplified action set for DMLab Arbitrary Visuomotor Mapping (AVM). This action set is the same as the one used for AVM in Wayne et al. (2018) but with an additional no-op, which may also be replaced with the Fire action.
299
+
300
+ <table><tr><td>ACTION</td><td colspan="4">NATIVE DMLAB ACTION</td></tr><tr><td>Small look left (LL)</td><td>[-10,</td><td>0,</td><td>0,</td><td>0、0]</td></tr><tr><td>Small look right (LR) </td><td>[10,</td><td>0,</td><td>0,</td><td>0、0]</td></tr><tr><td>Look down</td><td>[0,</td><td>10,</td><td>0,</td><td>0, 01</td></tr><tr><td>Look up</td><td></td><td>[0,-10,</td><td>0,</td><td>0、0j</td></tr><tr><td>No-op</td><td>[ 0,</td><td>0,</td><td>0,</td><td>0、 01</td></tr></table>
301
+
302
+ Image Encoder: For DMLab-30 and Memory Maze, we used the same image encoder as in (Anonymous Authors, 2019) for multitask DMLab-30. The ResNet was adapted from Hessel et al. (2018) and each of its layer blocks consists of a $( 3 \times 3$ , stride 1) convolution, followed by $3 \times 3$ , stride 2) max-pooling, followed by $2 3 \times 3$ residual blocks with ReLU non-linearities.
303
+
304
+ <table><tr><td>ACTION NAME</td><td>RANGE</td></tr><tr><td>LOOKLEFT_RIGHT</td><td>[-1.0, 1.0]</td></tr><tr><td>LOOK_DOWN_UP</td><td>[-1.0, 1.0]</td></tr><tr><td>STRAFE_LEFT_RIGHT</td><td>[-1.0, 1.0]</td></tr><tr><td>MOVE_BACK_FORWARD</td><td>[-1.0, 1.0]</td></tr><tr><td>HAND_ROTATE_AROUND_RIGHT</td><td>[-1.0, 1.0]</td></tr><tr><td>HAND_ROTATE_AROUND_UP</td><td>[-1.0, 1.0]</td></tr><tr><td>HAND_ROTATE_AROUND_FORWARD</td><td>[-1.0, 1.0]</td></tr><tr><td>HAND_PUSH_PULL</td><td>[-10.0,10.0]</td></tr><tr><td>HAND-GRIP</td><td>{0,1}</td></tr></table>
305
+
306
+ Table 7: Hybrid action set for Memory Maze, consisting of 8 continuous actions and a single discrete action.
307
+
308
+ Agent Output: As in (Anonymous Authors, 2019), in all cases we use a 256-unit MLP with a linear output to get the policy logits (for discrete actions), Gaussian distribution parameters (for continuous actions) or value function estimates.
309
+
310
+ # B EXPERIMENTAL DETAILS
311
+
312
+ For all experiments, beyond sampling independent random seeds, each run also has V-MPO hyperparameters sampled from a distribution (see Table 8). The sampled hyperparameters are kept fixed across all models for a specific experiment, meaning that if one of the $\epsilon _ { \alpha }$ sampled is 0.002, then all models will have 1 run with $\epsilon _ { \alpha } = 0 . 0 0 2$ and so on for the rest of the samples. The exception is for the DMLab-30 LSTM, where a more constrained range was found to perform better in preliminary experiments. Each model had 8 seeds started, but not all runs ran to completion due to compute issues. These hyperparameter settings were dropped randomly and not due to poor environment performance. We report how many seeds ran to completion for all models. At least 6 seeds finished for every model tested. We list architecture details by section below. All LSTM models have residual skip connections in depth.
313
+
314
+ Table 8: V-MPO hyperparameters per environment.
315
+
316
+ <table><tr><td rowspan="2">Hyperparameter</td><td colspan="3">Environment</td></tr><tr><td>DMLab-30</td><td>Numpad</td><td>Memory Maze</td></tr><tr><td>Batch Size</td><td>128</td><td>128</td><td>128</td></tr><tr><td>Unroll Length</td><td>95</td><td>95</td><td>95</td></tr><tr><td>Discount</td><td>0.99</td><td>0.99</td><td>0.99</td></tr><tr><td>Action Repeat</td><td>4</td><td>1</td><td>4</td></tr><tr><td>Pixel Control Cost</td><td>2 ×10-3</td><td>1</td><td>1</td></tr><tr><td>Target Update Period</td><td>10</td><td>10</td><td>10</td></tr><tr><td>Initial n</td><td>1.0</td><td>10.0</td><td>1.0</td></tr><tr><td>Initial α</td><td>5.0</td><td></td><td>5.0</td></tr><tr><td>Initial αμ</td><td>-</td><td>1.0</td><td>1.0</td></tr><tr><td>Initial αΣ</td><td>=</td><td>1.0</td><td>1.0</td></tr><tr><td>En</td><td>0.1</td><td>0.1</td><td>0.1</td></tr><tr><td rowspan="2">Eα (log-uniform)</td><td>LSTM [0.001, 0.025)</td><td>-</td><td>[0.001, 0.1)</td></tr><tr><td>TrXL Variants [0.001, 0.1)</td><td></td><td></td></tr><tr><td>Eαμ (log-uniform) Eα (log-uniform)</td><td></td><td>[0.005,0.01) [5 × 10-6,4 × 10-4)</td><td>[0.005,0.01) [5 × 10-6,4 × 10-5)</td></tr></table>
317
+
318
+ # B.1 TRAINING SETUP
319
+
320
+ All experiments in this work were carried out in an actor-learner framework (Espeholt et al., 2018) that utilizes TF-Replicator (Buchlovsky et al., 2019) for distributed training on TPUs in the 16-core
321
+
322
+ Table 9: DMLab-30 Ablation Architecture Details. We report the number of runs per model that ran to completion (i.e. 10 billion environment steps). We follow the standard convention that the hidden/embedding dimension of transformers is equal to the head dimension multiplied by the number of heads. (Sec. 4.1 & Sec. 4.3).
323
+
324
+ <table><tr><td>Model</td><td>#Layers</td><td>Head Dim.</td><td>#Heads</td><td>Hidden Dim.</td><td>Memory Size</td><td>Runs Completed</td></tr><tr><td>LSTM</td><td>3</td><td>-</td><td>■</td><td>256</td><td></td><td>8</td></tr><tr><td>Large LSTM</td><td>12</td><td>1</td><td>1</td><td>512</td><td>1</td><td>6</td></tr><tr><td>TrXL</td><td>12</td><td>64</td><td>8</td><td>512</td><td>512</td><td>6</td></tr><tr><td>TrXL-I</td><td>12</td><td>64</td><td>8</td><td>512</td><td>512</td><td>6</td></tr><tr><td>GTrXL (GRU)</td><td>12</td><td>64</td><td>8</td><td>512</td><td>512</td><td>8</td></tr><tr><td>GTrXL (Input)</td><td>12</td><td>64</td><td>8</td><td>512</td><td>512</td><td>6</td></tr><tr><td>GTrXL (Output)</td><td>12</td><td>64</td><td>8</td><td>512</td><td>512</td><td>7</td></tr><tr><td>GTrXL (Highway)</td><td>12</td><td>64</td><td>8</td><td>512</td><td>512</td><td>7</td></tr><tr><td>GTrXL (SigTanh)</td><td>12</td><td>64</td><td>8</td><td>512</td><td>512</td><td>6</td></tr><tr><td>Thin GTrXL (GRU)</td><td>12</td><td>64</td><td>4</td><td>256</td><td>512</td><td>8</td></tr></table>
325
+
326
+ Table 10: Numpad Architecture Details. (Sec. 4.2).
327
+
328
+ <table><tr><td>Model</td><td>#Layers</td><td>Head Dim.</td><td>#Heads</td><td>Hidden Dim.</td><td>Memory Size</td><td>Runs Completed</td></tr><tr><td>LSTM</td><td>3</td><td>1</td><td>1</td><td>256</td><td>1</td><td>5</td></tr><tr><td>GTrXL (GRU)</td><td>12</td><td>64</td><td>8</td><td>256</td><td>512</td><td>5</td></tr></table>
329
+
330
+ Table 11: Sensitivity ablation architecture details (Sec. 4.3.2).
331
+
332
+ <table><tr><td>Model</td><td># Layers</td><td>Head Dim.</td><td>#Heads</td><td>Hidden Dim.</td><td>Memory Size</td></tr><tr><td>LSTM</td><td>3</td><td>-</td><td>1</td><td>256</td><td>-</td></tr><tr><td>TrXL</td><td>12</td><td>64</td><td>8</td><td>256</td><td>512</td></tr><tr><td>TrXL-I</td><td>12</td><td>64</td><td>8</td><td>256</td><td>512</td></tr><tr><td>GTrXL(GRU)</td><td>12</td><td>64</td><td>8</td><td>256</td><td>512</td></tr><tr><td>GTrXL (Output)</td><td>12</td><td>64</td><td>8</td><td>256</td><td>512</td></tr></table>
333
+
334
+ Table 12: Gated identity initialization ablation architecture details (Sec. 4.3.4).
335
+
336
+ <table><tr><td>Model</td><td>#Layers</td><td>Head Dim.</td><td>#Heads</td><td>Hidden Dim.</td><td>Memory Size</td><td>Runs Completed</td></tr><tr><td>GTrXL (GRU)</td><td>4</td><td>64</td><td>4</td><td>256</td><td>512</td><td>8</td></tr></table>
337
+
338
+ configuration (Google, 2018). “Actors” running on CPUs performed network inference and interactions with the environment, and transmitted the resulting trajectories to the centralised “learner“.
339
+
340
+ # C MULTI-HEAD ATTENTION DETAILS
341
+
342
+ # C.1 MULTI-HEAD ATTENTION
343
+
344
+ The Multi-Head Attention (MHA) submodule computes in parallel $H$ soft-attention operations for every time step, producing an output tensor $Y ^ { ( l ) } ~ \in ~ \mathbb { R } ^ { T \times D }$ . MHA operates by first calculating the query $Q ^ { ( l ) } \bar { \in } \bar { \mathbb { R } } ^ { H \times T \times d }$ , keys $\bar { K ^ { ( l ) } } \in \mathbb { R } ^ { H \times T \times d }$ , and values $V ^ { ( l ) } \in \bar { \mathbb { R } ^ { H \times T \times d } }$ (where through trainable linear projections W (l)Q , W (l)K , and W (l)V , respectively, and then using the combined resulting embedding $E ^ { ( l ) }$ is then applied and finally layer normalization (Ba et al., 2016).
345
+
346
+ ![](images/c42ffbb16e924e0468e36e9b9f56b2e06f84606fb5a818aab0d9f7fa939a244f.jpg)
347
+ Figure 10: The 25 hyperparameter settings sampled for the sensitivity ablation (Sec. 4.3.2). X-axis is in log scale and values are sampled from the corresponding ranges given in Table 8.
348
+
349
+ # MultiHeadAttention $( E ^ { ( l - 1 ) } )$ :
350
+
351
+ $$
352
+ \begin{array} { r l } & { Q ^ { ( l ) } , K ^ { ( l ) } , V ^ { ( l ) } = W _ { Q } ^ { ( l ) } E ^ { ( l - 1 ) } , W _ { K } ^ { ( l ) } E ^ { ( l - 1 ) } , W _ { V } ^ { ( l ) } E ^ { ( l - 1 ) } } \\ & { \qquad \alpha _ { h t m } ^ { ( l ) } = Q _ { h t d } K _ { h m d } } \\ & { W _ { h t m } ^ { ( l ) } = \mathbf { M a s k e d S o f t m a x } ( \alpha ^ { ( l ) } , \mathrm { a x i s } = m ) } \\ & { \qquad \overline { { Y } } _ { h t d } ^ { ( l ) } = W _ { h t m } ^ { ( l ) } V _ { h m d } ^ { ( l ) } } \\ & { \qquad \hat { Y } ^ { ( l ) } = E ^ { ( l - 1 ) } + \mathrm { L i n e a r } ( \overline { { Y } } ^ { ( l ) } ) } \\ & { \qquad Y ^ { ( l ) } = \mathrm { L a y e r N o r m } ( \hat { Y } ^ { ( l ) } ) } \end{array}
353
+ $$
354
+
355
+ where we used Einstein summation notation to denote the tensor multiplications, MaskedSoftmax is a causally-masked softmax to prevent addressing future information, Linear is a linear layer applied per time-step and we omit reshaping operations for simplicity.
356
+
357
+ # C.2 RELATIVE MULTI-HEAD ATTENTION
358
+
359
+ The basic MHA operation does not take sequence order into account explicitly because it is permutation invariant, so positional encodings are a widely used solution in domains like language where order is an important semantic cue, appearing in the original transformer architecture (Vaswani et al., 2017). To enable a much larger contextual horizon than would otherwise be possible, we use the relative position encodings and memory scheme described in Dai et al. (2019). In this setting, there is an additional $\tau$ -step memory tensor $M ^ { ( l ) } \in \mathbb { R } ^ { T \times D }$ , which is treated as constant during weight updates.
360
+
361
+ # RelativeMultiHeadAttention $( M ^ { ( l - 1 ) } , E ^ { ( l - 1 ) } )$ :
362
+
363
+ $$
364
+ \begin{array} { r l } & { \tilde { E } ^ { ( l - 1 ) } = [ M ^ { ( l - 1 ) } , E ^ { ( l - 1 ) } ] } \\ & { Q ^ { ( l ) } , K ^ { ( l ) } , V ^ { ( l ) } = W _ { Q } ^ { ( l ) } E ^ { ( l - 1 ) } , W _ { K } ^ { ( l ) } \tilde { E } ^ { ( l - 1 ) } , W _ { V } ^ { ( l ) } \tilde { E } ^ { ( l - 1 ) } } \\ & { \quad \quad \quad \quad \quad R = W _ { R } ^ { ( l ) } \Phi } \\ & { \quad \quad \quad \quad \quad \quad \alpha _ { h t m } ^ { ( l ) } = Q _ { h t d } K _ { h m d } + Q _ { h t d } R _ { h m d } + u _ { h + d } K _ { h t m } + v _ { h + d } R _ { h m d } } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \frac { V _ { h t m } ^ { ( l ) } } { Y _ { h t d } ^ { ( l ) } } = \mathbf { M a s k e d S o f } \mathrm { t m a x } ( \boldsymbol { \alpha } ^ { ( l ) } , \mathrm { a x i s s m } ) } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \dot { Y } ^ { ( l ) } = E ^ { ( l - 1 ) } + \mathrm { L i n e a r } ( \overline { { Y ^ { ( l ) } } } ) } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \end{array}
365
+ $$
366
+
367
+ where $\Phi$ is the standard sinusoid encoding matrix, $u ^ { ( l ) } , v ^ { ( l ) } \in \mathbb { R } ^ { H \times d }$ are trainable parameters, the $^ *$ represents the broadcast operation, and $W _ { R }$ is a linear projection used to produce the relative location-based keys (see Dai et al. (2019) for a detailed derivation).
368
+
369
+ # C.3 IDENTITY MAP REORDERING
370
+
371
+ The Identity Map Reordering modifies the standard transformer formulation as follows: the layer norm operations are applied only to the input of the sub-module and a non-linear ReLU activation is applied to the output stream.
372
+
373
+ $$
374
+ \begin{array} { r l } & { \overline { { Y } } ^ { ( l ) } = \mathrm { R e l a t i v e M u l t i H e a d A t t e n t i o n } ( \mathrm { L a y e r N o r m } ( \left[ \mathrm { S t o p G r a d } ( M ^ { ( l - 1 ) } ) , E ^ { ( l - 1 ) } \right] ) ) } \\ & { { Y } ^ { ( l ) } = E ^ { ( l - 1 ) } + \mathrm { R e L U } ( \overline { { Y } } ^ { ( l ) } ) } \\ & { \overline { { E } } ^ { ( l ) } = f ^ { ( l ) } ( \mathrm { L a y e r N o r m } ( Y ^ { ( l ) } ) ) } \\ & { E ^ { ( l ) } = Y ^ { ( l ) } + \mathrm { R e L U } ( \overline { { E } } ^ { ( l ) } ) } \end{array}
375
+ $$
376
+
377
+ See Figure 1 (Center) for a visual depiction of the TrXL-I.
378
+
379
+ D DMLAB-30 MEMORY/REACTIVE PARTITION
380
+ Table 13: Partition of DMLab-30 levels into a memory-based and reactive split of levels.
381
+
382
+ <table><tr><td>Memory</td><td>Reactive</td></tr><tr><td>rooms_select_nonmatching-object rooms_watermaze explore_obstructed_goals_small explore_goal_locations_small explore_object_rewards_few explore_obstructed_goals_large</td><td>rooms_collect_good_objects_train rooms_exploit_deferred_effects_train rooms_keys_doors-puzzle language_select_described_object language_select_located_object language_execute_random_task</td></tr></table>
383
+
384
+ <table><tr><td>Model</td><td>Median Human Normalized Score</td></tr><tr><td>LSTM</td><td>136.6 ± 3.4</td></tr><tr><td>GTrXL</td><td>137.1 ± 5.0</td></tr></table>
385
+
386
+ ![](images/257daa8069812d87b63c712291f85bf13d78624606c701e2c37f2f55acee7055.jpg)
387
+ Table 14: Final human-normalized median return across all 57 Atari levels for LSTM and GTrXL at 11.4 billion environment steps (equivalent to 200 million per individual game). Both models are 256 dimensions in width. We include standard error over runs.
388
+ Figure 11: Median human-normalized returns as training progresses for both GTrXL and LSTM models. We run 8 hyperparameter settings per model.
389
+
390
+ # E ATARI-57 RESULTS
391
+
392
+ In this section, we run the GTrXL on the multitask Atari-57 benchmark. Although Atari-57 was not designed specifically to test an agent’s memory capabilities, we include these results here to demonstrate that we suffer no performance regression on a popular environment suite, providing further evidence that GTrXL can be used as an architectural replacement to the LSTM.
393
+
394
+ The LSTM and GTrXL are matched in width at 256 dimensions. The GTrXL is 12 layers deep to show our model’s learning stability even at large capacity. The LSTM architecture matches the one reported in Anonymous Authors (2019). We train for 11.4 billion environment steps, equivalent to 200 million per environment. We run 8 hyperparameter settings per model.
parse/train/SyxKrySYPr/SyxKrySYPr_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SyxKrySYPr/SyxKrySYPr_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SyxKrySYPr/SyxKrySYPr_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rygeHgSFDH/rygeHgSFDH.md ADDED
@@ -0,0 +1,493 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DISENTANGLEMENT BY NONLINEAR ICA WITHGENERAL INCOMPRESSIBLE-FLOW NETWORKS (GIN)
2
+
3
+ Peter Sorrenson, Carsten Rother, Ullrich Kothe ¨
4
+ Visual Learning Lab
5
+ Heidelberg University
6
+
7
+ # ABSTRACT
8
+
9
+ A central question of representation learning asks under which conditions it is possible to reconstruct the true latent variables of an arbitrarily complex generative process. Recent breakthrough work by Khemakhem et al. (2019) on nonlinear ICA has answered this question for a broad class of conditional generative processes. We extend this important result in a direction relevant for application to real-world data. First, we generalize the theory to the case of unknown intrinsic problem dimension and prove that in some special (but not very restrictive) cases, informative latent variables will be automatically separated from noise by an estimating model. Furthermore, the recovered informative latent variables will be in one-to-one correspondence with the true latent variables of the generating process, up to a trivial component-wise transformation. Second, we introduce a modification of the RealNVP invertible neural network architecture (Dinh et al., 2016) which is particularly suitable for this type of problem: the General Incompressibleflow Network (GIN). Experiments on artificial data and EMNIST demonstrate that theoretical predictions are indeed verified in practice. In particular, we provide a detailed set of exactly 22 informative latent variables extracted from EMNIST.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ Deep latent-variable models promise to unlock the key factors of variation within a dataset, opening a window to interpretation and granting the power to manipulate data in an intuitive fashion. The theory of identifiability in linear independent component analysis (ICA) (Comon, 1994) tells us when this is possible, if we restrict the model to a linear transformation, but until recently there was no corresponding theory for the highly nonlinear models needed to manipulate complex data. This changed with the recent breakthrough work by Khemakhem et al. (2019), which showed that under relatively mild conditions, it is possible to recover the joint data and latent space distribution, up to a simple transformation in the latent space. The key requirement is that the generating process is conditioned on a variable which is observed along with the data. This condition could be a class label, time index of a time series, or any other piece of information additional to the data. They interpret their theory as a nonlinear version of ICA.
14
+
15
+ This work extends this theory in a direction relevant for application to real-world data. The existing theory assumes knowledge of the intrinsic problem dimension, but this is unrealistic for anything but artificially generated datasets. Here, we show that in the special case of Gaussian latent space distributions, the intrinsic problem dimension can be discovered. The important latent variables are organically separated from noise variables by the estimating model. Furthermore, the variables discovered correspond to the true generating latent variables, up to a trivial component-wise translation and scaling. Very similar results exist for other members of the exponential family with two parameters, such as the beta and gamma distributions.
16
+
17
+ We introduce a variant of the RealNVP (Dinh et al., 2016) invertible neural network: the General Incompressible-flow Network (GIN). The flow is called incompressible in reference to fluid dynamics, since it preserves volumes: the Jacobian determinant is simply unity. We emphasise its generality and increased expressive power in comparison to previous volume-preserving flows, such as NICE (Dinh et al., 2014). As already noted in Khemakhem et al. (2019), flow-based generative models are a natural fit for the theory of nonlinear ICA, as are the variational autoencoders (VAEs) (Kingma &
18
+
19
+ Welling, 2013) used in that work. For us, major advantages of invertible architectures over VAEs are the ability to specify volume preservation and directly optimize the likelihood, and freedom from the requirement to specify the dimension of the model’s latent space. An INN always has a latent space of the same dimension as the data. In addition, the forward and backward models share parameters, saving the effort of learning separate models for each direction.
20
+
21
+ In summary, our work makes the following contributions:
22
+
23
+ • We extend the theory of nonlinear ICA to allow for unknown intrinsic problem dimension. Doing so, we find that this dimension can be discovered and a one-to-one correspondence between generating and estimated latent variables established. We propose as an implementation an invertible neural network obtained by modifying the RealNVP architecture. We call our new architecture GIN: the General Incompressible-flow Network.
24
+ • We demonstrate the viability of the model on artificial data and the EMNIST dataset. We extract 22 meaningful variables from EMNIST, encoding both global and local features.
25
+
26
+ # 2 RELATED WORK
27
+
28
+ The basic goals of nonlinear ICA stem from the original work on linear ICA. An influential formulation, as well as the first identifiability results, were given in Comon (1994). These stated the conditions which allow the generating latent variables to be discovered, when the mixing function is a linear transformation. However, it was shown in Hyvarinen & Pajunen (1999) that this approach ¨ to identifiability does not extend to general nonlinear functions.
29
+
30
+ The first identifiability results in nonlinear ICA came in Hyvarinen & Morioka (2016) and Hyv ¨ arinen ¨ & Morioka (2017), applied to time series, and implemented via a discriminative model and semisupervised learning. A more general formulation, valid for other forms of data, was given in Hyvarinen et al. (2018) and the theory was extended to generative models in Khemakhem et al. ¨ (2019), where experiments were implemented by a VAE.
31
+
32
+ Many authors have addressed the general problem of disentanglement, and proposed models to learn disentangled features. Prominent among these is $\beta$ -VAE (Higgins et al., 2017) and its variations (e.g. Chen et al., 2018) which augment the standard ELBO loss with tunable hyperparameters to encourage disentanglement. There are also attempts to modify the GAN framework (Goodfellow et al., 2014) such as InfoGAN (Chen et al., 2016), which tries to maximize the mutual information between some dimensions of the latent space and the observed data. Many of these approaches are unsupervised. However, as pointed out and empirically demonstrated in Locatello et al. (2018), unsupervised models without conditioning in the latent space are in general unidentifiable.
33
+
34
+ Several unsupervised VAE models implement conditioning in the latent space by means of Gaussian mixtures (Johnson et al., 2016; Dilokthanakul et al., 2016; Zhao et al., 2019). Our work differs mainly by (i) only considering supervised tasks, therefore being safely covered by the theory of Khemakhem et al. (2019), and (ii) enforcing volume-preservation, not possible in a VAE.
35
+
36
+ The invertible neural networks in this work build upon the NICE framework (Dinh et al., 2014) and its extension in RealNVP (Dinh et al., 2016). A similar network design to ours is Ardizzone et al. (2019). This is a conditioned INN based on RealNVP, however the conditioning information is applied as a parameter of the network. The authors find in experiments with MNIST that meaningful variables are present in their latent space, but are rotated such that they are not aligned with the axes of the space. In this work, the conditioning is only present as a parameter of the latent space distributions. As a result, it is covered by the theory of Khemakhem et al. (2019) and its extension here, which results in non-rotated, meaningful latent variables.
37
+
38
+ # 3 THEORY
39
+
40
+ # 3.1 EXISTING THEORY OF NONLINEAR ICA
41
+
42
+ This section adapts theoretical results from Khemakhem et al. (2019) to the context of invertible neural networks. Suppose the existence of the following three random variables: a latent generating
43
+
44
+ ![](images/5788390e5eec6a322fe0450ba75daf121c3f0a0a8ce5bfcc22b1d14f2f31a334.jpg)
45
+ Figure 1: Relationship between the variables and functions defined in Sec. 3.1, as well as indication of the training scheme.
46
+
47
+ variable $z \in \mathbb { R } ^ { n }$ , a condition $\mathbf { u } \in \mathbb { R } ^ { m }$ and a data point $\mathbf { x } \in \mathbb { R } ^ { d }$ , where $n \leq d$ . If $n < d$ , also suppose the existence of a noise variable $\varepsilon \in \mathbb { R } ^ { d - n }$ . The variables z and $\varepsilon$ make up the generating latent space, and are not necessarily known, whereas u and $\mathbf { X }$ are observable and therefore always known.
48
+
49
+ The distribution of $\mathbf { Z }$ is a factorial member of the exponential family with $k$ sufficient statistics, conditioned on u. In its most general form the distribution can be written as
50
+
51
+ $$
52
+ p _ { \mathbf { z } } ( \mathbf { z } | \mathbf { u } ) = \prod _ { i = 1 } ^ { n } \frac { Q _ { i } ( z _ { i } ) } { Z _ { i } ( \mathbf { u } ) } \exp \left[ \sum _ { j = 1 } ^ { k } T _ { i , j } ( z _ { i } ) \lambda _ { i , j } ( \mathbf { u } ) \right]
53
+ $$
54
+
55
+ where the $T _ { i , j }$ are the sufficient statistics, the $\lambda _ { i , j }$ their coefficients and $Z _ { i }$ the normalizing constant.
56
+ $Q _ { i }$ is called the base measure, which in many cases is simply 1.
57
+
58
+ The distribution of $\varepsilon$ must not depend on u and its probability density function must be always finite.
59
+
60
+ The variable $\mathbf { X }$ is the result of an arbitrarily complex, invertible, deterministic transformation from the generating latent space to the data space: $\mathbf { x } = f ( \mathbf { z } , \varepsilon )$ . This can alternatively be formulated as an injective, non-deterministic transformation from the lower-dimensional $\mathbf { Z }$ -space to the higherdimensional $\mathbf { X }$ -space: ${ \bf x } = f _ { \varepsilon } ( { \bf z } )$ .
61
+
62
+ In general, an observed dataset $\mathcal { D }$ will consist only of instances of $\mathbf { X }$ and u. The task of nonlinear ICA is to disentangle the data to recover the generating latent variables $\mathbf { Z }$ , as well as the form of the function $f$ and its inverse. We can try to achieve this with a sufficiently general, invertible function approximator $g$ , which maps from a latent variable w $\in \mathbb { R } ^ { d }$ to the data space: $\mathbf { x } = g ( \mathbf { w } ; \theta )$ . Here $\theta$ denotes the parameters of $g$ . Note that the dimensions of the latent space and data space are the same due to the invertibility of $g$ . We assume that w follows a conditionally independent exponential probability distribution, conditioned on the same condition u as $\mathbf { Z }$ :
63
+
64
+ $$
65
+ p _ { \mathrm { w } } ( \mathrm { w } | \mathrm { u } ) = \prod _ { i = 1 } ^ { d } \frac { Q _ { i } ^ { \prime } ( w _ { i } ) } { Z _ { i } ^ { \prime } ( \mathrm { u } ) } \exp \left[ \sum _ { j = 1 } ^ { k } T _ { i , j } ^ { \prime } ( w _ { i } ) \lambda _ { i , j } ^ { \prime } ( \mathrm { u } ) \right] .
66
+ $$
67
+
68
+ The coefficients of the sufficient statistics $\lambda _ { i , j } ^ { \prime } ( \mathbf { u } )$ are not restricted, which means that a given variable $i$ of the estimated latent space is allowed to lose its dependence on u. If this occurs, we will consider this variable to encode noise, playing a role equivalent to $\varepsilon$ in the generating latent space.
69
+
70
+ In addition to this specification of the generative and estimating models, some conditions are necessary to ensure the latent variables can be recovered. The most important of these concerns the variability of $\lambda _ { i , j } ( \mathbf { u } )$ under u. However, as long as the $\lambda _ { i , j }$ are randomly and independently generated, and there are at least $n k + 1$ distinct conditions $\mathbf { u }$ , this condition is almost surely fulfilled. See Appendix A.1 for further details.
71
+
72
+ In the limit of infinite data and perfect convergence, the estimating model will give the same conditional likelihood to all data points as the true generating model:
73
+
74
+ $$
75
+ p _ { \mathbf { T } , \lambda , f , \varepsilon } ( \mathbf { x } | \mathbf { u } ) = p _ { \mathbf { T } ^ { \prime } , \lambda ^ { \prime } , g } ( \mathbf { x } | \mathbf { u } ) .
76
+ $$
77
+
78
+ If this is the case, the vector of sufficient statistics $\mathbf { T }$ from the generating latent space will be related to that of the estimated latent space by an affine transformation:
79
+
80
+ $$
81
+ \mathbf { T } ( \mathbf { z } ) = A \mathbf { T } ^ { \prime } ( \mathbf { w } ) + \pmb { c } ,
82
+ $$
83
+
84
+ where $\pmb { A }$ is some constant, full-rank, $n k \times d k$ matrix and $\mathbf { c } \in \mathbb { R } ^ { n k }$ some constant vector. The relationship holds for all values of $\mathbf { Z }$ and w. The proof of this result can be found in Appendix A.
85
+
86
+ This relationship is a generalization of that derived in Khemakhem et al. (2019). In that version, they assume knowledge of $n$ , the dimension of the generating latent space, and give their estimating model a latent space of the same dimension. In this context the matrix $\pmb { A }$ defines a relationship between latent spaces of the same dimension, making it square and invertible.
87
+
88
+ # 3.2 NONLINEAR ICA WITH A GAUSSIAN LATENT SPACE
89
+
90
+ Given the relationship in equation (4), we can ask whether any stronger results hold for particular special cases. We hope in particular to induce sparsity in the matrix $\pmb { A }$ , so that the estimated latent space is related to the true one by as simple a transformation as possible. We show (proof in Appendix B) that when both the generating and estimated latent spaces follow a Gaussian distribution, the generating latent space variables are recovered up to a trivial translation and scaling. Furthermore, the dimension of the generating latent space is recovered.
91
+
92
+ More precisely, each generating latent variable $z _ { i }$ is related to exactly one estimated latent variable $w _ { j }$ , for some $j$ , as $z _ { i } = a _ { i } w _ { j } + b _ { i }$ , for some constant $a _ { i }$ and $b _ { i }$ . Furthermore, each estimated latent variable $w _ { j }$ is related to at most one $z _ { i }$ . If the estimating latent space has higher dimension than the dimension of the generating latent space, some estimating latent variables are not related to any generating latent variables and so must encode only noise. This is the dimension discovery mechanism, since the estimated latent space organically splits into informative and non-informative parts, with the dimension of the informative part equal to the unknown intrinsic dimension of the generating latent space. Very similar results can be derived for all common continuous two-parameter members of the exponential family, including the gamma and beta distributions. See Appendix C.
93
+
94
+ # 3.3 VOLUME PRESERVATION VIA INCOMPRESSIBLE FLOW
95
+
96
+ In a multivariate Gaussian distribution with diagonal covariance, the standard deviations are directly proportional to the principal axes of the ellipsoid defining a surface of constant probability. In classical PCA, this property is used to assign importance to each principal component based on its standard deviation. In PCA we can think of the rotation of the data into the basis defined by the principal components as the latent space. In a deep latent variable model the transformation between the latent space and the data is significantly more complex, but if this transformation preserves volumes like the rotation in PCA, it will retain the desirable correspondence between the standard deviation of a latent space variable and its importance in explaining the data. Because invertible neural networks (normalizing flows) have a tractable Jacobian determinant, they open the possibility to constrain it to unity. This is equivalent to volume preservation and is the rationale behind the General Incompressible-flow Network.
97
+
98
+ # 4 EXPERIMENTS
99
+
100
+ Experiments on artificial datasets confirm the theory for a normally distributed latent space, as well as identifying potential causes of failure. Experiments on the EMNIST dataset (Cohen et al., 2017) demonstrate the ability of GIN to estimate independent and interpretable latent variables from realworld data.
101
+
102
+ # 4.1 MODEL DESCRIPTION
103
+
104
+ The GIN model is similar in form to RealNVP (Dinh et al., 2016) and shares its flexibility, but retains the volume-preserving properties of the NICE framework (Dinh et al., 2014).
105
+
106
+ RealNVP coupling layers split $D$ -dimensional input $x$ into two parts, $x _ { 1 : d }$ and $x _ { d + 1 : D }$ where $d < D$ The output of the layer is the concatentation of $y _ { 1 : d }$ and $y _ { d + 1 : D }$ with
107
+
108
+ $$
109
+ \begin{array} { r } { y _ { 1 : d } = x _ { 1 : d } \qquad } \\ { y _ { d + 1 : D } = x _ { d + 1 : D } \odot \exp ( s ( x _ { 1 : d } ) ) + t ( x _ { 1 : d } ) } \end{array}
110
+ $$
111
+
112
+ ![](images/810439ba15e783f176985da25adab05b44701671430f6886188d94264a088270.jpg)
113
+ Figure 2: Successful reconstruction by GIN of the two informative latent variables out of ten in total. The other eight are correctly identified as noise. The observed data is ten-dimensional (projection into two dimensions shown here). The spectrum shows the standard deviation of each variable of the reconstruction (in black, log scale) which quantifies its importance. Ground truth is in gray. There is a clear distinction between the two informative dimensions and the noise dimensions, showing that GIN has correctly detected a two-dimensional manifold in the ten-dimensional data presented to it.
114
+
115
+ where addition, multiplication and exponentiation are applied component-wise. The logarithm of the Jacobian determinant of a coupling layer is simply the sum of the scaling function $s ( x _ { 1 : d } )$ . Volume preservation is achieved by setting the final component $s ( x _ { d } )$ to the negative sum of the previous components, so the total sum of $s ( x _ { 1 : d } )$ is zero (in contrast, NICE sets $s ( x _ { 1 : d } ) ~ \equiv ~ 0 )$ . Hence the Jacobian determinant is unity and volume is preserved. The network is free to allow the volume contribution of some dimensions of the output of any coupling layer to grow, but only by shrinking the other dimensions of the output in direct proportion. As well as enforcing a strong correspondence between the importance of a latent variable and its standard deviation, we believe volume-preservation has a regularizing effect, since it is a very strong constraint, comparable to orthonormality in linear transformations.
116
+
117
+ # 4.2 OPTIMIZATION
118
+
119
+ The experiments in this section deal with labeled data, where each data point belongs to one of $M$ different classes. This class label is used as the condition u associated with each data point x. In the estimated latent space, all data instances with the same label should belong to the same Gaussian distribution. Hence we are learning a Gaussian mixture in the estimated latent space, with $M$ mixture components. Since the distribution for each class in the estimated latent space is required to be factorial, the variance of each mixture component is diagonal, and we can write $\sigma _ { i } ^ { 2 } ( \mathbf { u } )$ for the variance in the $i$ -th dimension.
120
+
121
+ Given a set of data, condition pairs $\mathcal { D } = \{ ( \mathbf { x } ^ { ( 1 ) } , \mathbf { u } ^ { ( 1 ) } ) , \dots , ( \mathbf { x } ^ { ( N ) } , \mathbf { u } ^ { ( N ) } ) \}$ and model $g$ , parameterized by $\pmb \theta$ (where $g$ maps from the latent space to the data space) we can construct a loss from the log-likelihood. Using the change of variables formula, we have $\log p ( \mathbf { x } | \mathbf { u } ) = \log p ( \mathbf { w } | \mathbf { u } )$ , with no Jacobian term since the transformation $\mathbf { w } = g ^ { - 1 } ( \mathbf { x } ; \pmb \theta )$ is volume-preserving. To maximize the likelihood of $\mathcal { D }$ , we minimize the negative log-likelihood of w in the estimated latent space:
122
+
123
+ $$
124
+ \mathcal { L } ( \pmb { \theta } ) = \mathbb { E } _ { ( \mathbf { x } , \mathbf { u } ) \in \mathcal { D } } \left[ \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \left( \frac { ( g _ { i } ^ { - 1 } ( \mathbf { x } ; \pmb { \theta } ) - \mu _ { i } ( \mathbf { u } ; \pmb { \theta } ) ) ^ { 2 } } { 2 \sigma _ { i } ^ { 2 } ( \mathbf { u } ; \pmb { \theta } ) } + \log ( \sigma _ { i } ( \mathbf { u } ; \pmb { \theta } ) ) \right) \right] .
125
+ $$
126
+
127
+ # 4.3 ARTIFICIAL DATA
128
+
129
+ # 4.3.1 EXPERIMENT 1: CONDITIONS OF THEORY FULFILLED
130
+
131
+ Samples are generated in two dimensions, conditioned on five different cluster labels, see Fig. 2. The means of the clusters are chosen independently from a uniform distribution on $[ - 5 , 5 ]$ and variances from a uniform distribution on [.5, 3].1 This data is then concatenated with independent Gaussian noise in eight dimensions to make a ten-dimensional generating latent space, where only the first two variables are informative. The noise is scaled by 0.01 to be small in comparison to the informative dimensions. The latent space samples are then passed through a RealNVP network with 8 fully connected coupling blocks with randomly initialized weights to produce the observed data. This acts as a highly nonlinear mixing which can only be successfully treated with nonlinear methods.
132
+
133
+ GIN is used as the estimating model, with 8 fully connected coupling blocks (full details in Appendix D). Training converges quickly and stably using the Adam optimizer (Kingma & Ba, 2014) with initial learning rate $\bar { 1 0 } ^ { - 2 }$ and other values set to the usual recommendations. Batch size is 1,000 and the data is augmented with Gaussian noise $\sigma = 0 . 0 1 )$ at each iteration. After convergence of the loss, the learning rate is reduced by a factor of 10 and trained again until convergence.
134
+
135
+ Over a number of experiments we made the following observations:
136
+
137
+ • The model converges stably and gives importance (quantified by standard deviation) to only two variables in the estimated latent space, provided there is sufficient overlap between the mixture components in the generating latent space. Where there is not enough overlap in the generating latent space, the model cannot recognize common variables across all the different classes, and tends to split one genuine dimension of variation into two or more in its estimated latent space. This appears to be a problem of finite data. We have observed that when this behaviour occurs, and if the gap between mixture components is not too large, it can be prevented by increasing the number of samples so that the space between the mixture components is better filled (see Fig. 6 and 7 in Appendix E). This is consistent with the theory, where equation (4) is true asymptotically. Since the latent space distributions are members of the exponential family, they have support across the entire domain of the latent space, hence gaps can never remain in the limit of infinite samples.
138
+ • Choice of learning rate is important. If the initial learning rate is too low, training gets stuck in bad local optima, where single true variables are split into several latent dimensions.
139
+
140
+ # 4.3.2 EXPERIMENT 2: CONDITIONS OF THEORY NOT FULFILLED
141
+
142
+ Samples are generated as in Experiment 1, but with only three mixture components. Since there are two sufficient statistics per dimension, and two dimensions of variation, according to the theory we need at least $n k + 1 = 5$ distinct conditions u for equation (4) to hold (see section 3.1). Therefore, we might not expect successful experiments. Nonetheless, we observe essentially the same results as for the previous experiments (see Fig. 8 in Appendix E), with the same caveats regarding gaps between the mixture components in the generating latent space. This suggests that the conditions derived in Khemakhem et al. (2019), although sufficient for disentanglement, are not necessary.
143
+
144
+ # 4.4 EMNIST
145
+
146
+ # 4.4.1 EXPERIMENT
147
+
148
+ ![](images/5d11f7e16c1935c8c48ed32f4d2eebdb728fd36d0fbaf8569da0d838bfb1fda3.jpg)
149
+ Figure 3: Spectrum of sorted standard deviations derived from training GIN on EMNIST. On the right is the equivalent spectrum from PCA, a linear method, on MNIST. The nonlinear spectrum exhibits a sharp knee not obtained by linear methods. In the nonlinear spectrum, the first 22 latent variables encode information about the shape of a digit, while the rest of the latent variables encode noise. This distinction is marked with a dotted line in the left and center figures (see Sec. 4.4.2 for explanation of the choice of this cut-off). Within the first 22 variables, the first eight encode global information, such as slant and width, whereas the following 14 encode more local information. This distinction is marked in the center figure only.
150
+
151
+ The data comes from the EMNIST Digits training set of 240,000 images of handwritten digits with labels (Cohen et al., 2017). EMNIST is a larger version of the well-known MNIST dataset, and also includes handwritten letters. Here we use only the digits. The digit label is used as the condition u, hence we construct a Gaussian mixture in the estimated latent space with 10 mixture components. According to the theory (see 3.1), these are only enough conditions to guarantee identifiability if there are only four informative latent variables in the generating latent space. We expect that the true number of informative variables is somewhat higher, so as in Experiment 2 above, we are operating outside of the guarantees of the theory. In addition, the true generative process of human handwriting may not exactly fulfill our method’s assumptions, and we might still lack data on rare or subtle variations, despite the large size of the dataset in comparison to MNIST.
152
+
153
+ The estimating model is a GIN which uses convolutional coupling blocks and fully connected coupling blocks to transform the data to the latent space (full details in Appendix D). Optimization is with the Adam optimizer, with initial learning rate 3e-4. Batch size is 240 and the data is augmented with Gaussian noise $\mathit { \Pi } _ { \sigma } = 0 . 0 1 $ ) at each iteration. The model is trained for 45 epochs, then for a further 50 epochs with the learning rate reduced by a factor of 10.
154
+
155
+ # 4.4.2 RESULTS
156
+
157
+ ![](images/5c2ef98ccecb74ed5a98234b677f8585c202da4a0cdf8391a573ac03a8f0a53a.jpg)
158
+ (a) Variable 1: upper width (b) Variable 8: lower width (c) Variable 3: height (d) Variable 4: bend
159
+
160
+ Figure 4: Selection of global latent variables found by GIN. Each row is conditioned on a different digit label. The variable runs from -2 to $+ 2$ standard deviations across the columns, with all other variables held constant at their mean value. The rightmost column shows a heatmap of the image areas most affected by the variable, computed as the absolute pixel difference between -1 and $+ 1$ standard deviations. Variable 1 controls the width of the top half of a digit, whereas variable 8 controls the width of the bottom half. Width in both cases is somewhat entangled with slant. Variable 3 controls the height and variable 4 controls how bent the digit is. Full set of variables for all digits in Appendix F.
161
+
162
+ ![](images/30b9d6cc307ab0d2e6358fe02ab461d744fc5e2291c31f24d38b5c985a082469.jpg)
163
+ Figure 5: Selection of local latent variables found by GIN. Refer to Figure 4 above for explanation of the layout. Variable 11 controls the shape of curved lines in the middle right. Digits without such lines are not affected. Variable 12 controls extension towards the upper right. Variable 13 modifies the top left of 2, 3 and 7 only (7 not shown here) and variable 16 modifies only the lower right stroke of a 2. Full set of variables for all digits in Appendix F.
164
+
165
+ The model encodes information into 22 broadly interpretable latent space variables. The eight variables with the highest standard deviation encode global information, such as slant, line thickness and width which affect all digits more or less equally. The remaining 14 meaningful variables encode more local information, which does not affect all digits equally. We interpret all other variables as encoding noise. This is motivated mainly by our observation of an abrupt end to any observable change in the reconstructed digits when any variable after the first 22 is changed. This can be seen clearly in Fig. 15 in Appendix F. Some variables, particularly the global ones, are not entirely disentangled from another. Nevertheless, the results are compelling and suggest that the assumptions required by the theory are approximately met.
166
+
167
+ We observed some global features which are not usually seen in disentanglement experiments on MNIST (e.g. Chen et al., 2016; Dupont, 2018). These experiments usually obtain digit slant, width and line thickness as the major global independent variables. We too observe slant and line thickness as independent variables (variables 2 and 5), but find width to be split into two variables, one governing the width of the upper half of a digit (variable 1) and the other the lower half (variable 8). This makes sense, since these can in fact vary independently. We also observe the height of a digit (variable 3) (see Fig. 4). This does not usually appear in disentanglement experiments, possibly because it is too subtle a variation for those experiments, but possibly because it is not present or not discoverable in the smaller MNIST dataset but is in EMNIST.
168
+
169
+ Local features are also usually not observed in such experiments, so the variables which control these are particularly interesting. These variables modify only a region of the digit, leaving the rest of the digit untouched. In addition, digits which do not have the feature which is being modified in that region are left alone. Examples include variable 13, which changes the orientation of the top-left stroke in 2, 3 and 7, and variable 16, which modifies only the lower-right stroke of a 2 (see Fig. 5). The full set of local and global variables can be seen in Fig. 10 to Fig. 15 in Appendix F.
170
+
171
+ # 4.4.3 NOTE ON THE CHOICE OF CONDITIONING VARIABLE
172
+
173
+ The concept of a “true generative process” rests on the assumption that conditioning variables u act as causes for the latent variables z, such that the elements of the latter become independent given the former. In the case of handwritten digits, u represents a person’s decision to write a particular digit, and z determines the hand motions to produce this digit. Modelling u in terms of digit labels is a plausible proxy for the unknown causal variables in the human brain, and the success of the resulting model suggests that the assumptions are approximately fulfilled. Identifying promising conditioning variables u in less obvious situations is an important open problem for future work.
174
+
175
+ # 4.4.4 POTENTIAL IMPROVEMENTS
176
+
177
+ Increasing the number of conditioning variables would bring this work closer in line with the existing theory. At the current value of ten, the theory only applies if there are at most four informative generating latent variables, which is almost certainly too low a number. One option to increase the number of conditions is to relax the labels from hard to soft, i.e. compute posterior probabilities of class membership given a data example. This could be achieved by information distillation as in Hinton et al. (2015). Another possibility is to split existing labels into sub-labels, for example making a distinction between sevens with and without crossbars. This may also aid the generation of more realistic samples, since we observed no sevens with crossbars in our generated samples, even though they make up approximately $5 \%$ of the sevens in the dataset.
178
+
179
+ # 5 CONCLUSION AND OUTLOOK
180
+
181
+ We have expanded the theory of nonlinear ICA to cover problems with unknown intrinsic dimension and demonstrated an implementation with GIN, a new volume-preserving modification of the RealNVP invertible network architecture. The variables discovered by GIN in EMNIST are interpretable and detailed enough to suggest that the assumptions made about the generating process are approximately true. Furthermore, our experiments with EMNIST demonstrate the viability of applying models inspired by the new theory of nonlinear ICA to real-world data, even when not all of the conditions of the theory are met.
182
+
183
+ It is not clear if the methods from this work will scale to larger problems. However, given the recent advances of similar flow-based generative models in density estimation on larger datasets such as CelebA and ImageNet (e.g. Kingma & Dhariwal, 2018; Ho et al., 2019), it is a plausible prospect. In addition, it is not clear whether the method can successfully be extended to the context of semisupervised learning, or ultimately, unsupervised learning.
184
+
185
+ # REFERENCES
186
+
187
+ Lynton Ardizzone, Carsten Luth, Jakob Kruse, Carsten Rother, and Ullrich K ¨ othe. Guided image ¨ generation with conditional invertible neural networks. arXiv:1907.02392, 2019.
188
+
189
+ Tian Qi Chen, Xuechen Li, Roger B Grosse, and David K Duvenaud. Isolating sources of disentanglement in variational autoencoders. In Advances in Neural Information Processing Systems, pp. 2610–2620, 2018.
190
+
191
+ Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. In Advances in neural information processing systems, pp. 2172–2180, 2016.
192
+
193
+ Gregory Cohen, Saeed Afshar, Jonathan Tapson, and Andre van Schaik. EMNIST: an extension of ´ MNIST to handwritten letters. arXiv:1702.05373, 2017.
194
+
195
+ Pierre Comon. Independent component analysis, a new concept? Signal processing, 36(3):287–314, 1994.
196
+
197
+ Nat Dilokthanakul, Pedro AM Mediano, Marta Garnelo, Matthew CH Lee, Hugh Salimbeni, Kai Arulkumaran, and Murray Shanahan. Deep unsupervised clustering with gaussian mixture variational autoencoders. arXiv preprint arXiv:1611.02648, 2016.
198
+
199
+ Laurent Dinh, David Krueger, and Yoshua Bengio. Nice: Non-linear independent components estimation. arXiv:1410.8516, 2014.
200
+
201
+ Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using Real NVP. arXiv:1605.08803, 2016.
202
+
203
+ Emilien Dupont. Learning disentangled joint continuous and discrete representations. In Advances in Neural Information Processing Systems, pp. 710–720, 2018.
204
+
205
+ 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.
206
+
207
+ Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. $\beta$ -VAE: Learning basic visual concepts with a constrained variational framework. ICLR, 2(5):6, 2017.
208
+
209
+ Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv:1503.02531, 2015.
210
+
211
+ Jonathan Ho, Xi Chen, Aravind Srinivas, Yan Duan, and Pieter Abbeel. Flow $^ { + + }$ : Improving flow-based generative models with variational dequantization and architecture design. arXiv:1902.00275, 2019.
212
+
213
+ 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.
214
+
215
+ Aapo Hyvarinen and Hiroshi Morioka. Nonlinear ICA of temporally dependent stationary sources. ¨ In Proceedings of Machine Learning Research, 2017.
216
+
217
+ Aapo Hyvarinen and Petteri Pajunen. Nonlinear independent component analysis: Existence and ¨ uniqueness results. Neural Networks, 12(3):429–439, 1999.
218
+
219
+ Aapo Hyvarinen, Hiroaki Sasaki, and Richard E Turner. Nonlinear ICA using auxiliary variables ¨ and generalized contrastive learning. arXiv:1805.08651, 2018.
220
+
221
+ Jorn-Henrik Jacobsen, Arnold Smeulders, and Edouard Oyallon. i-RevNet: Deep invertible net-¨ works. arXiv:1802.07088, 2018.
222
+
223
+ Matthew J Johnson, David K Duvenaud, Alex Wiltschko, Ryan P Adams, and Sandeep R Datta. Composing graphical models with neural networks for structured representations and fast inference. In Advances in neural information processing systems, pp. 2946–2954, 2016.
224
+
225
+ Ilyes Khemakhem, Diederik P Kingma, and Aapo Hyvarinen. Variational autoencoders and nonlin- ¨ ear ICA: A unifying framework. arXiv:1907.04809, 2019.
226
+
227
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv:1412.6980, 2014.
228
+
229
+ Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv:1312.6114, 2013.
230
+
231
+ Durk P Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible 1x1 convolutions. In Advances in Neural Information Processing Systems, pp. 10215–10224, 2018.
232
+
233
+ Francesco Locatello, Stefan Bauer, Mario Lucic, Sylvain Gelly, Bernhard Scholkopf, and Olivier ¨ Bachem. Challenging common assumptions in the unsupervised learning of disentangled representations. arXiv:1811.12359, 2018.
234
+
235
+ Qingyu Zhao, Nicolas Honnorat, Ehsan Adeli, Adolf Pfefferbaum, Edith V Sullivan, and Kilian M Pohl. Variational autoencoder with truncated mixture of gaussians for functional connectivity analysis. In International Conference on Information Processing in Medical Imaging, pp. 867– 879. Springer, 2019.
236
+
237
+ SUPPLEMENTARY MATERIAL
238
+
239
+ # A PROOF OF IDENTIFIABILITY
240
+
241
+ This section reproduces a proof from Khemakhem et al. (2019) with some modifications to adapt it to the context of invertible neural networks (normalizing flows).
242
+
243
+ Define the domain of $f _ { \varepsilon }$ as $\mathcal { Z } = \mathcal { Z } _ { 1 } \times \cdots \times \mathcal { Z } _ { n }$ . Define the vector of sufficient statistics $\mathbf { T } ( \mathbf { z } ) =$ $( T _ { 1 , 1 } ( z _ { 1 } ) , \dots , T _ { n , k } ( z _ { n } ) )$ and the vector of their coefficients $\lambda ( \mathbf { u } ) = ( \lambda _ { 1 , 1 } ( \mathbf { u } ) , \ldots , \lambda _ { n , k } ( \mathbf { u } ) )$ .
244
+
245
+ Theorem 1 Assume we observe data distributed according to the generative model defined in Sec. 3.1. Further suppose the following:
246
+
247
+ (i) The sufficient statistics $T _ { i , j } ( z )$ are differentiable almost everywhere and their derivatives $\mathrm { d } T _ { i , j } ( z ) / \mathrm { d } z$ are nonzero almost surely for all $z \in \mathcal { Z } _ { i }$ and all $1 \leq i \leq n$ and $1 \le j \le k$ .
248
+
249
+ (ii) There exist $n k + 1$ distinct conditions $\mathbf { u } _ { 0 } , \ldots , \mathbf { u } _ { n k }$ such that the matrix
250
+
251
+ $$
252
+ { \cal L } = ( \lambda ( { \mathbf { u } } _ { 1 } ) - \lambda ( { \mathbf { u } } _ { 0 } ) , \ldots , \lambda ( { \mathbf { u } } _ { n k } ) - \lambda ( { \mathbf { u } } _ { 0 } ) )
253
+ $$
254
+
255
+ of size $n k \times n k$ is invertible.
256
+
257
+ Then the sufficient statistics of the generating latent space are related to those of the estimated latent space by the following relationship:
258
+
259
+ $$
260
+ \mathbf { T } ( \mathbf { z } ) = A \mathbf { T } ^ { \prime } ( \mathbf { w } ) + c
261
+ $$
262
+
263
+ where $\pmb { A }$ is a constant, full-rank $n k \times d k$ matrix and $\mathbf { c } \in \mathbb { R } ^ { n k }$ a constant vector.
264
+
265
+ Proof: The conditional probabilities $p _ { \mathbf { T } , \lambda , f , \varepsilon } ( \mathbf { x } | \mathbf { u } )$ and $p _ { \mathbf { T } ^ { \prime } , \lambda ^ { \prime } , g } ( \mathbf { x } | \mathbf { u } )$ are assumed to be the same in the limit of infinite data. By expanding these expressions via the change of variables formula and taking the logarithm we find
266
+
267
+ $$
268
+ \log p _ { \mathbf { T } , \lambda } ( z | \mathbf { u } ) + \log p ( \boldsymbol { \varepsilon } ) + \log \left| \operatorname* { d e t } J _ { f ^ { - 1 } } ( \mathbf { x } ) \right| = \log p _ { \mathbf { T } ^ { \prime } , \lambda ^ { \prime } } ( \mathbf { w } | \mathbf { u } ) + \log \left| \operatorname* { d e t } J _ { g ^ { - 1 } } ( \mathbf { x } ) \right|
269
+ $$
270
+
271
+ where $J$ is the Jacobian matrix. Let $\mathbf { u } _ { 0 } , \ldots , \mathbf { u } _ { n k }$ be the conditions from (ii) above. We can subtract this expression for $\mathbf { u } _ { 0 }$ from the expression for some condition ${ \mathbf { u } } _ { l }$ . The Jacobian terms and the term involving $\varepsilon$ will vanish, since they do not depend on u:
272
+
273
+ $$
274
+ \begin{array} { r } { \log p _ { \mathbf { z } } ( \mathbf { z } | \mathbf { u } _ { l } ) - \log p _ { \mathbf { z } } ( \mathbf { z } | \mathbf { u } _ { 0 } ) = \log p _ { \mathbf { w } } ( \mathbf { w } | \mathbf { u } _ { l } ) - \log p _ { \mathbf { w } } ( \mathbf { w } | \mathbf { u } _ { 0 } ) . } \end{array}
275
+ $$
276
+
277
+ Since the conditional probabilities of $\mathbf { Z }$ and w are exponential family members, we can write this expression as
278
+
279
+ $$
280
+ \begin{array} { r l } & { \displaystyle \sum _ { i = 1 } ^ { n } \left[ \log \frac { Z _ { i } ( \mathbf { u _ { 0 } } ) } { Z _ { i } ( \mathbf { u } _ { l } ) } + \sum _ { j = 1 } ^ { k } T _ { i , j } ( \mathbf { z } ) \big ( \lambda _ { i , j } ( \mathbf { u } _ { l } ) - \lambda _ { i , j } ( \mathbf { u _ { 0 } } ) \big ) \right] } \\ & { \quad \quad \quad \quad \quad = \displaystyle \sum _ { i = 1 } ^ { d } \left[ \log \frac { Z _ { i } ^ { \prime } ( \mathbf { u _ { 0 } } ) } { Z _ { i } ^ { \prime } ( \mathbf { u } _ { l } ) } + \sum _ { j = 1 } ^ { k } T _ { i , j } ^ { \prime } ( \mathbf { w } ) \big ( \lambda _ { i , j } ^ { \prime } ( \mathbf { u } _ { l } ) - \lambda _ { i , j } ^ { \prime } ( \mathbf { u _ { 0 } } ) \big ) \right] } \end{array}
281
+ $$
282
+
283
+ where the base measures $Q _ { i }$ have cancelled out, since they do not depend on u. Defining $\bar { \lambda } ( { \mathfrak { u } } ) =$ $\lambda ( \mathbf { u } ) - \lambda ( \mathbf { u } _ { 0 } )$ and writing the above in terms of inner products, we find
284
+
285
+ $$
286
+ \langle \mathbf { T } ( \mathbf { z } ) , { \bar { \mathbf { \Xi } } } \rangle + \sum _ { i } \log \frac { Z _ { i } ( \mathbf { u } _ { 0 } ) } { Z _ { i } ( \mathbf { u } _ { l } ) } = \langle \mathbf { T } ^ { \prime } ( \mathbf { w } ) , { \bar { \mathbf { \Xi } } } { } \rangle + \sum _ { i } \log \frac { Z _ { i } ^ { \prime } ( \mathbf { u } _ { 0 } ) } { Z _ { i } ^ { \prime } ( \mathbf { u } _ { l } ) }
287
+ $$
288
+
289
+ for $1 \leq l \leq n k$ . Combining the $n k$ expressions into a single matrix equation we can write this in terms of $\pmb { L }$ from condition (ii) above and an analogously defined $L ^ { \prime } \in \dot { \mathbb { R } } ^ { d k \times n k }$ :
290
+
291
+ $$
292
+ L ^ { T } \mathbf { T } ( \mathbf { \boldsymbol { z } } ) = L ^ { \prime T } \mathbf { T } ^ { \prime } ( \mathbf { \boldsymbol { w } } ) + b
293
+ $$
294
+
295
+ where bl = Pi log Z i(u0)Zi(ul)Zi(u0)Z0(ul) . Since $L ^ { T }$ is invertible, we can multiply this expression by its inverse from the left to get
296
+
297
+ $$
298
+ \mathbf { T } ( \mathbf { z } ) = A \mathbf { T } ^ { \prime } ( \mathbf { w } ) + c
299
+ $$
300
+
301
+ where ${ \pmb A } = { \pmb L } ^ { - T } { \pmb L } ^ { \prime T }$ and $\pmb { c } = \pmb { L } ^ { - T } \pmb { b } .$ . It now remains to show that $\pmb { A }$ has full rank.
302
+
303
+ According to a lemma from Khemakhem et al. (2019), there exist $k$ distinct values $z _ { i } ^ { 1 }$ to $z _ { i } ^ { k }$ such that $\begin{array} { r } { \left( \frac { \mathrm { d } T _ { i } } { \mathrm { d } z _ { i } } ( z _ { i } ^ { 1 } ) , \dots , \frac { \mathrm { d } T _ { i } } { \mathrm { d } z _ { i } } ( z _ { i } ^ { k } ) \right) } \end{array}$ are linearly independent in $\mathbb { R } ^ { k }$ , for all $1 \leq i \leq n$ . Define $k$ vectors $\mathbf { z } ^ { l } = ( z _ { 1 } ^ { l } , \dots , z _ { n } ^ { l } )$ from the points given by this lemma. Take the derivative of equation (15) evaluated at each of these $k$ vectors and concatentate the resulting Jacobians as $Q = [ \mathcal { \bar { I } } _ { \mathbf { T } } ( \mathbf { z } ^ { 1 } ) , \dots , \mathcal { I } _ { \mathbf { T } } ( \mathbf { z } ^ { k } ) ]$ . Each Jacobian has size $n k \times n$ , hence $Q$ has size $n k \times n k$ and is invertible by the lemma and the fact that each component of $\mathbf { T }$ is univariate. We can construct a corresponding matrix $Q ^ { \prime }$ made up of the Jacobians of $\mathbf { T } ^ { \prime } ( g ^ { - 1 } \circ f _ { \varepsilon } ( \mathbf { z } ) )$ evaluated at the same points and write
304
+
305
+ $$
306
+ Q = A Q ^ { \prime } .
307
+ $$
308
+
309
+ Since $Q$ is full rank, both $\pmb { A }$ and $\pmb { Q } ^ { \prime }$ must also be full rank.
310
+
311
+ # A.1 REMARK REGARDING CONDITION (II)
312
+
313
+ If the coefficients of the sufficient statistics $\boldsymbol { \lambda }$ are generated randomly and independently, then condition (ii) is almost surely fulfilled. In this case, we can ignore the dependence on u to consider the $\pmb { \lambda } ( \mathbf { u } _ { l } )$ as independent random variables. Then condition (ii) states that instances of these random variables are in general position in $\mathbb { R } ^ { n k }$ , which is true almost surely.
314
+
315
+ # A.2 REMARK REGARDING NOISE VARIABLES IN THE ESTIMATED LATENT SPACE
316
+
317
+ Any variables in the estimated latent space whose distribution does not depend on the conditioning variable u is considered as encoding only noise. Such variables will be cancelled out in equation (12) and the corresponding column of ${ \pmb { L } } ^ { \bar { \prime } T }$ will contain only zeros. This means the corresponding column of $\pmb { A }$ will also contain only zeros, so any variation in such a noise variable has no effect on z. The reverse is also true: if a column of $\pmb { A }$ contains only zeros, the corresponding variable in the estimated latent space does not depend on u and must encode only noise.
318
+
319
+ # B SPARSITY IN UNMIXING MATRIX: GAUSSIAN DISTRIBUTION
320
+
321
+ Suppose samples z from the generating latent space follow a conditional Gaussian distribution. Suppose the estimating model $g$ faithfully reproduces the observed conditional density $p ( \mathbf { x } | \mathbf { u } )$ and samples w from its latent space also follow a conditional Gaussian distribution. Then we can apply equation (4) to relate the generating and estimating latent spaces.
322
+
323
+ The sufficient statistics of a normal distribution with free mean and variance are $z$ and $z ^ { 2 }$ . Hence the relationship between the latent spaces becomes
324
+
325
+ $$
326
+ { \binom { \mathbf { z } } { \mathbf { z } ^ { 2 } } } = A \left( { \begin{array} { l } { \mathbf { w } } \\ { \mathbf { w } ^ { 2 } } \end{array} } \right) + c
327
+ $$
328
+
329
+ where the squaring is applied element-wise. We can write $\pmb { A }$ in block matrix form as
330
+
331
+ $$
332
+ \pmb { A } = \left( \begin{array} { c c } { \pmb { A } ^ { ( 1 ) } } & { \pmb { A } ^ { ( 2 ) } } \\ { \pmb { A } ^ { ( 3 ) } } & { \pmb { A } ^ { ( 4 ) } } \end{array} \right)
333
+ $$
334
+
335
+ and $^ c$ as
336
+
337
+ $$
338
+ \pmb { c } = \binom { \pmb { c } ^ { ( 1 ) } } { \pmb { c } ^ { ( 2 ) } }
339
+ $$
340
+
341
+ Then:
342
+
343
+ $$
344
+ \begin{array} { r } { \mathbf { z } = \pmb { A } ^ { ( 1 ) } \mathbf { w } + \pmb { A } ^ { ( 2 ) } \mathbf { w } ^ { 2 } + \pmb { c } ^ { ( 1 ) } } \\ { \mathbf { z } ^ { 2 } = \pmb { A } ^ { ( 3 ) } \mathbf { w } + \pmb { A } ^ { ( 4 ) } \mathbf { w } ^ { 2 } + \pmb { c } ^ { ( 2 ) } } \end{array}
345
+ $$
346
+
347
+ so we can write for each dimension $i$ of $\mathbf { Z }$
348
+
349
+ $$
350
+ \begin{array} { l } { { z _ { i } = \displaystyle \sum _ { j } A _ { i j } ^ { ( 1 ) } w _ { j } + \sum _ { j } A _ { i j } ^ { ( 2 ) } w _ { j } ^ { 2 } + c _ { i } ^ { ( 1 ) } } } \\ { { z _ { i } ^ { 2 } = \displaystyle \sum _ { j } A _ { i j } ^ { ( 3 ) } w _ { j } + \sum _ { j } A _ { i j } ^ { ( 4 ) } w _ { j } ^ { 2 } + c _ { i } ^ { ( 2 ) } } } \end{array}
351
+ $$
352
+
353
+ In order to compare the equations, we need to square (22). To do so, we will have to square the second term on the right hand side, involving $w _ { j } ^ { 2 }$ . There is no matching term in (23), so we have to set all entries of $A ^ { ( 2 ) }$ to zero. In more detail:
354
+
355
+ $$
356
+ \begin{array} { r l } { { ( \sum _ { j } A _ { i j } ^ { ( 2 ) } w _ { j } ^ { 2 } ) ^ { 2 } = \sum _ { j } \sum _ { j ^ { \prime } } A _ { i j } ^ { ( 2 ) } A _ { i j ^ { \prime } } ^ { ( 2 ) } w _ { j } ^ { 2 } w _ { j ^ { \prime } } ^ { 2 } } } \\ & { = \sum _ { j } ( A _ { i j } ^ { ( 2 ) } ) ^ { 2 } w _ { j } ^ { 4 } + \sum _ { j \ne j ^ { \prime } } A _ { i j } ^ { ( 2 ) } A _ { i j ^ { \prime } } ^ { ( 2 ) } w _ { j } ^ { 2 } w _ { j ^ { \prime } } ^ { 2 } } \end{array}
357
+ $$
358
+
359
+ The first term with $\boldsymbol { w _ { j } ^ { 4 } }$ matches no term in (23), so we have to set $A _ { i j } ^ { ( 2 ) } = 0$ for all $i$ and $j$ . This simplifies the earlier equation:
360
+
361
+ $$
362
+ z _ { i } = \sum _ { j } A _ { i j } ^ { ( 1 ) } w _ { j } + c _ { i } ^ { ( 1 ) }
363
+ $$
364
+
365
+ The square of the first term on the right hand side involves terms with $w _ { j } w _ { j ^ { \prime } }$ cross terms:
366
+
367
+ $$
368
+ \left( \sum _ { j } A _ { i j } ^ { ( 1 ) } w _ { j } \right) ^ { 2 } = \sum _ { j } A _ { i j } ^ { ( 1 ) } w _ { j } ^ { 2 } + \sum _ { j \neq j ^ { \prime } } A _ { i j } ^ { ( 1 ) } A _ { i j ^ { \prime } } ^ { ( 1 ) } w _ { j } w _ { j ^ { \prime } }
369
+ $$
370
+
371
+ so we have to set $A _ { i j } ^ { ( 1 ) } A _ { i j ^ { \prime } } ^ { ( 1 ) } = 0$ for all $j \neq j ^ { \prime }$ . This means that the $i$ -th row of $A ^ { ( 1 ) }$ can have at most one nonzero entry. It must also have at least one nonzero entry, since if the row were all zero, a row of $\pmb { A }$ would be all zero (since $\begin{array} { r } { \pmb { A } ^ { ( 2 ) } = 0 } \end{array}$ ), but $\pmb { A }$ has full rank. Since there are as many or fewer rows than columns $( n \leq d )$ , each row of $\pmb { A }$ is linearly independent, so it is not possible for one to be zero. Hence each row of $A ^ { ( 1 ) }$ has exactly one nonzero entry. Moreover, no two rows of $A ^ { ( 1 ) }$ have their nonzero entries in the same column. If they did, the two rows would not be linearly independent, but they must be since $\pmb { A }$ has full rank. Therefore we can write
372
+
373
+ $$
374
+ z _ { i } = a _ { i } w _ { j } + b _ { i }
375
+ $$
376
+
377
+ where $a _ { i } = A _ { i j _ { \alpha } } ^ { ( 1 ) }$ and $b _ { i } = c _ { i } ^ { ( 1 ) }$ c(1)i . That is, the generating latent variable zi is linearly related to some latent variable of the estimating model $w _ { j }$ . This estimated latent variable is uniquely associated with $z _ { i }$ and any estimated latent variables not associated with a generating latent variable $z _ { i }$ (in the case $d > n$ ) encode no information about the generating latent space. So the model has decoded the original latent variables $\mathbf { Z }$ up to an affine transformation and permutation as a subset of variables in its estimated latent space and has encoded no information (only noise) into the remaining latent variables.
378
+
379
+ # C SPARSITY IN UNMIXING MATRIX: TWO-PARAMETER EXPONENTIAL FAMILY MEMBERS
380
+
381
+ The results of Appendix B can be extended to other members of the exponential family with 2 parameters. In the general case, writing $T _ { i , 1 } = T _ { 1 }$ and $T _ { i , 2 } = T _ { 2 }$ for all $i$ , equations (22) and (23) become
382
+
383
+ $$
384
+ \begin{array} { l } { { T _ { 1 } ( z _ { i } ) = \displaystyle \sum _ { j } A _ { i j } ^ { ( 1 ) } T _ { 1 } ( w _ { j } ) + \displaystyle \sum _ { j } A _ { i j } ^ { ( 2 ) } T _ { 2 } ( w _ { j } ) + c _ { i } ^ { ( 1 ) } } } \\ { { T _ { 2 } ( z _ { i } ) = \displaystyle \sum _ { j } A _ { i j } ^ { ( 3 ) } T _ { 1 } ( w _ { j } ) + \displaystyle \sum _ { j } A _ { i j } ^ { ( 4 ) } T _ { 2 } ( w _ { j } ) + c _ { i } ^ { ( 2 ) } } } \end{array}
385
+ $$
386
+
387
+ which, with the definition $t = T _ { 2 } \circ T _ { 1 } ^ { - 1 }$ becomes
388
+
389
+ $$
390
+ \begin{array} { c } { { T _ { 1 } ( z _ { i } ) = \displaystyle \sum _ { j } A _ { i j } ^ { ( 1 ) } T _ { 1 } ( w _ { j } ) + \displaystyle \sum _ { j } A _ { i j } ^ { ( 2 ) } t ( T _ { 1 } ( w _ { j } ) ) + c _ { i } ^ { ( 1 ) } } } \\ { { t ( T _ { 1 } ( w _ { j } ) ) = \displaystyle \sum _ { j } A _ { i j } ^ { ( 3 ) } T _ { 1 } ( w _ { j } ) + \displaystyle \sum _ { j } A _ { i j } ^ { ( 4 ) } t ( T _ { 1 } ( w _ { j } ) ) + c _ { i } ^ { ( 2 ) } . } } \end{array}
391
+ $$
392
+
393
+ We can combine these equations to get
394
+
395
+ $$
396
+ \left( \sum _ { j } A _ { i j } ^ { ( 1 ) } T _ { 1 } ( w _ { j } ) + \sum _ { j } A _ { i j } ^ { ( 2 ) } t ( T _ { 1 } ( w _ { j } ) ) + c _ { i } ^ { ( 1 ) } \right) = \sum _ { j } A _ { i j } ^ { ( 3 ) } T _ { 1 } ( w _ { j } ) + \sum _ { j } A _ { i j } ^ { ( 4 ) } t ( T _ { 1 } ( w _ { j } ) ) + c _ { i } ^ { ( 2 ) } .
397
+ $$
398
+
399
+ This equation has many summed terms on the right. Suppose that $t$ has a convergent Taylor expansion in some region of its domain. We can take this expansion of the term on the left and compare coefficients. Since $t$ cannot be linear, there will be terms in the expansion of order two or higher. As in the Gaussian case, these polynomial terms create cross terms which are impossible to reconcile with those on the right hand side of the equation. The only consistent solutions can be found by setting all coefficients except those of functions of $w _ { j }$ (for some $j$ ) to zero:
400
+
401
+ $$
402
+ t \left( A _ { i j } ^ { ( 1 ) } T _ { 1 } ( w _ { j } ) + A _ { i j } ^ { ( 2 ) } t ( T _ { 1 } ( w _ { j } ) ) + c _ { i } ^ { ( 1 ) } \right) = A _ { i j } ^ { ( 3 ) } T _ { 1 } ( w _ { j } ) + A _ { i j } ^ { ( 4 ) } t ( T _ { 1 } ( w _ { j } ) ) + c _ { i } ^ { ( 2 ) }
403
+ $$
404
+
405
+ We can further simplify this equation by examining higher-order terms, but need to know the form of $t$ to do so. In any case, we can now write equation (29) as
406
+
407
+ $$
408
+ T _ { 1 } ( z _ { i } ) = A _ { i j } ^ { ( 1 ) } T _ { 1 } ( w _ { j } ) + A _ { i j } ^ { ( 2 ) } t ( T _ { 1 } ( w _ { j } ) ) + c _ { i } ^ { ( 1 ) }
409
+ $$
410
+
411
+ showing that each generating latent variable $z _ { i }$ is related to exactly one estimated latent variable $w _ { j }$ . As in the Gaussian case, we can use the full rank property of $\pmb { A }$ to see that each estimated latent variable is associated with at most one generating latent variable, and any estimated latent variables not associated with any generating latent variables must encode only noise. The task now is to check the form of $t$ for each two-parameter member of the exponential family, to see what further constraints we can derive from equation (34). The results are stated in Table 1.
412
+
413
+ Table 1: Two-parameter exponential family members and selected properties.
414
+
415
+ <table><tr><td>Distribution</td><td>Suffcient Statistics</td><td>t(x)</td><td>Latent Space Relationship</td></tr><tr><td>Normal</td><td>(z,22)</td><td>x2</td><td>zi = awj +c</td></tr><tr><td>Lognormal</td><td>(log z, (log z)2)</td><td>x²</td><td>log zi = alog wj + c</td></tr><tr><td>Inverse Gaussian</td><td>(2,1/2)</td><td>1/x</td><td> Zi = awj or zi = a/wj</td></tr><tr><td>Gamma</td><td>(log z, z)</td><td>exp(x)</td><td>zi =awj</td></tr><tr><td>Inverse Gamma</td><td>(log z,1/z)</td><td>exp(-x)</td><td>zi=awj</td></tr><tr><td>Beta</td><td>(log z,log(1 - z))</td><td>log(1- exp(x))</td><td>log zi = log wj or log zi = log(1- wj)</td></tr></table>
416
+
417
+ # D NETWORK ARCHITECTURE
418
+
419
+ The estimating model $g$ is built in the reverse direction for practical purposes, so the models described here are $g ^ { - 1 }$ which maps from the data space to the latent space. The type and number of coupling blocks for the different experiments are shown below. The affine coupling function is the concatentation of the scale function $s$ and the translation function $t$ , computed together for efficiency, as in Kingma & Dhariwal (2018). It is implemented as either a fully connected network (MLP) or convolutional network, with the specified layer widths and a ReLU activation after all but the final layers. For the convolutional coupling blocks, the splits are along the channel dimension. The scale function $s$ is passed through a clamping function $2 \operatorname { t a n h } ( s )$ , which limits the output to the range (-2, 2), as in Ardizzone et al. (2019). Two affine coupling functions are applied per block, as described in Dinh et al. (2016). Downsampling increases the number of channels by a factor of 4 and decreases the image width and height by a factor of 2, done in a checkerboard-like manner, as described in Jacobsen et al. (2018). The dimensions are permuted in a random but fixed way before application of each fully connected coupling block and likewise the channels for the convolutional coupling blocks. The network for the artificial data experiments has 4,480 learnable parameters and the network for the EMNIST experiments has 2,620,192 learnable parameters.
420
+
421
+ Table 2: Network architecture for artificial data experiments
422
+
423
+ <table><tr><td rowspan=1 colspan=1>Type of block</td><td rowspan=1 colspan=1>Number</td><td rowspan=1 colspan=1>Input shape</td><td rowspan=1 colspan=1> Number|Input shape|Affine coupling function layer widths</td></tr><tr><td rowspan=1 colspan=1>Fully Connected Coupling</td><td rowspan=1 colspan=1>8</td><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>5→10→10→10</td></tr></table>
424
+
425
+ Table 3: Network architecture for EMNIST experiments
426
+
427
+ <table><tr><td>Type of block</td><td>Number</td><td>Input shape</td><td>Affine coupling function layer widths</td></tr><tr><td>Downsampling</td><td>1</td><td>(1,28,28)</td><td></td></tr><tr><td>Convolutional Coupling</td><td>4</td><td>(4,14, 14)</td><td>2→16→16→4</td></tr><tr><td>Downsampling</td><td>1</td><td>(4, 14, 14)</td><td></td></tr><tr><td>Convolutional Coupling</td><td>4</td><td>(16,7,7)</td><td>8→32→32→16</td></tr><tr><td>Flattening</td><td>1</td><td>(16,7,7)</td><td></td></tr><tr><td>Fully Connected Coupling</td><td>2</td><td>784</td><td>392→392→→392→784</td></tr></table>
428
+
429
+ # D.1 NOTE ON OPTIMIZATION METHOD
430
+
431
+ In the experiments described in this paper, the mean and variance of a mixture component was updated at each iteration as the mean and variance of the transformations to latent space of all data points belonging to that mixture component in a minibatch of data $\mathcal { D }$ :
432
+
433
+ $$
434
+ \begin{array} { r l } & { \mu _ { i } ( \boldsymbol { \mathsf { u } } ^ { \prime } ; \boldsymbol { \theta } ) \mathbb { E } _ { \mathcal { D } : \boldsymbol { \mathsf { u } } = \boldsymbol { \mathsf { u } } ^ { \prime } } ( g _ { i } ^ { - 1 } ( \boldsymbol { \mathsf { x } } ; \boldsymbol { \theta } ) ) } \\ & { \sigma _ { i } ^ { 2 } ( \boldsymbol { \mathsf { u } } ^ { \prime } ; \boldsymbol { \theta } ) \operatorname { V a r } _ { \mathcal { D } : \boldsymbol { \mathsf { u } } = \boldsymbol { \mathsf { u } } ^ { \prime } } ( g _ { i } ^ { - 1 } ( \boldsymbol { \mathsf { x } } ; \boldsymbol { \theta } ) ) . } \end{array}
435
+ $$
436
+
437
+ Hence the parameters of the mixture components would change in each batch, according to the data present. The notation $\mu _ { i } ( \mathbf { u } ; \pmb \theta )$ does not indicate that $\mu$ is directly parameterized by $\pmb \theta$ and learned, instead it indicates that $\mu$ is a function of $g ^ { - 1 }$ which is parameterized by $\pmb \theta$ . A change in $\pmb { \theta }$ will also change the output of $\mu$ , given the same mini-batch of data $\mathcal { D }$ . The same holds for $\sigma _ { i } ( \mathfrak { u } ; \pmb \theta )$ .
438
+
439
+ We expect that specifying the means and variances as learnable parameters updated in tandem with the model weights would have worked equally well.
440
+
441
+ ![](images/1b3b34f82c0e12568863ab8047d704de0454df1fcb4f95161fc125019ef66612.jpg)
442
+ Figure 6: Experiment 1: Five mixture components and 100,000 data points. GIN successfully reconstructs the generating latent space and gives importance to only two of its ten latent variables, reflecting the two-dimensional nature of the generating latent space.
443
+
444
+ ![](images/6c6475f52de8d079aa5d60435d14fd6c856ab91fa9c2ac9777906b4361b695da.jpg)
445
+ Figure 7: Same experiment as in Figure 6 with the number of data points reduced to 10,000. GIN fails to successfully estimate the ground truth latent variables, due to limited data: The first variable ( $x$ -axis) is well approximated in the reconstruction, but the second variable $y$ -axis) is split into two in the reconstruction, one capturing mainly information about the lower two clusters (shown here) and another information about the other mixture components (not shown). We also observe a less clear spectrum, where three variables are given more importance than the rest, not faithfully reflecting the two-dimensional nature of the generating latent space.
446
+
447
+ ![](images/5bb79ae7e6e76fa0a40cb194f806f4dc632c698b4aa9323e9b0a57e773e259b7.jpg)
448
+ Figure 8: Experiment 2: Only three mixture components (not sufficient for identifiability according to the theory). Nevertheless, GIN successfully reconstructs the ground truth latent variables. This suggests that the current theory of nonlinear ICA relies on sufficient, but not necessary, conditions for identifiability.
449
+
450
+ # F EMNIST FIGURES
451
+
452
+ ![](images/ef2220de76173c538c6872d1dd8ef4213ef9e1b9c7e7af17502a05fd438c8c92.jpg)
453
+ Figure 9: Full and reduced temperature samples from the model trained on EMNIST. Reduced temperature samples are made by sampling from a Gaussian distribution where the standard deviation is reduced by the temperature factor. The 22 most significant variables are sampled, with the others kept to their mean value. This eliminates noise from the images but preserves the full variability of digit shapes. Each row has the same latent code (whitened value) but is conditioned on a different class in each column, hence the style of the digits is consistent across rows.
454
+
455
+ ![](images/8525b23d0cfd21ed79bf021c6c5874436bdef10c3682142666fc99804ebb660e.jpg)
456
+ Figure 10: Most significant latent variables 1 to 4. Each row is conditioned on a different digit label. The variable runs from -2 to $+ 2$ standard deviations across the columns, with all other variables held constant at their mean value. The rightmost column shows a heatmap of the image areas most affected by the variable, computed as the absolute pixel difference between $^ { - 1 }$ and $+ 1$ standard deviations.
457
+
458
+ ![](images/a72c7099256731351e339b3198b52582a87acffc940acfbb9eab6bf15c77877c.jpg)
459
+ Figure 11: Most significant latent variables 5 to 8. Each row is conditioned on a different digit label. The variable runs from -2 to $+ 2$ standard deviations across the columns, with all other variables held constant at their mean value. The rightmost column shows a heatmap of the image areas most affected by the variable, computed as the absolute pixel difference between -1 and $+ 1$ standard deviations.
460
+
461
+ ![](images/7bb49e5c5191d19a972b97df447824406a105767c46c4333c88ad13bb883be64.jpg)
462
+ (a) Variable 9: extension of center left feature towards the left
463
+
464
+ ![](images/7138fef8ebc7f8a4dd915b1411baaad9be3499f7e2eb1ba57bcbc30b82891668.jpg)
465
+ (b) Variable 10: openness of lower loop
466
+
467
+ ![](images/a09187cf2a23fa418eec8054278e4c49b2fa5c076c92780168a46026e7d11f0f.jpg)
468
+ Figure 12: Most significant latent variables 9 to 12. Each row is conditioned on a different digit label. The variable runs from -2 to $+ 2$ standard deviations across the columns, with all other variables held constant at their mean value. The rightmost column shows a heatmap of the image areas most affected by the variable, computed as the absolute pixel difference between -1 and $+ 1$ standard deviations.
469
+
470
+ ![](images/b26ed75bd83dd631622d9bb24da7267a86f1a1a1fa526d15b8eaf0e724a8b990.jpg)
471
+ (d) Variable 12: top right corner
472
+
473
+ (c) Variable 11: shape of center right feature
474
+
475
+ ![](images/2a0060de14a884c380094b312fdd8d0282a24a9575efff9a6ef5bbb3fba7f33a.jpg)
476
+ (a) Variable 13: orientation of stroke in top left corner for 2, 3 and 7
477
+
478
+ ![](images/08a23af0aa91e36b9530e8e754e35342ea717c63742d33852564748746fc98df.jpg)
479
+ (b) Variable 14: shape of top part of bottom loop
480
+
481
+ ![](images/cc362557d3293b0173e5f188953749a2cd4fbb9269e52876ba764e4ecfbe4a42.jpg)
482
+ (d) Variable 16: bottom right stroke of 2
483
+
484
+ ![](images/e48b2f43552953adee83e87b42c8753c87a6c18b6018bb861bac720f6a13f78e.jpg)
485
+ Figure 13: Most significant latent variables 13 to 16. Each row is conditioned on a different digit label. The variable runs from -2 to $+ 2$ standard deviations across the columns, with all other variables held constant at their mean value. The rightmost column shows a heatmap of the image areas most affected by the variable, computed as the absolute pixel difference between $^ { - 1 }$ and $+ 1$ standard deviations.
486
+
487
+ (c) Variable 15: angle of centrally located horizontal features
488
+
489
+ ![](images/0c2f53f89a24f1b96d86d6eb2a963f85c0fc5cba08bd9b7712fd0ded79c611e9.jpg)
490
+ Figure 14: Most significant latent variables 17 to 20. Each row is conditioned on a different digit label. The variable runs from -2 to $+ 2$ standard deviations across the columns, with all other variables held constant at their mean value. The rightmost column shows a heatmap of the image areas most affected by the variable, computed as the absolute pixel difference between -1 and $+ 1$ standard deviations.
491
+
492
+ ![](images/0fbd7e4feaa6d11cc8234fc810961884b9a40edc1b9e8d6129554527fccdd34f.jpg)
493
+ Figure 15: Most significant latent variables 21 to 24. Each row is conditioned on a different digit label. The variable runs from -2 to $+ 2$ standard deviations across the columns, with all other variables held constant at their mean value. The rightmost column shows a heatmap of the image areas most affected by the variable, computed as the absolute pixel difference between -1 and $+ 1$ standard deviations.
parse/train/rygeHgSFDH/rygeHgSFDH_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rygeHgSFDH/rygeHgSFDH_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rygeHgSFDH/rygeHgSFDH_model.json ADDED
The diff for this file is too large to render. See raw diff