ZHANGYUXUAN-zR commited on
Commit
117a52c
·
verified ·
1 Parent(s): 4d74fbf

Add files using upload-large-folder tool

Browse files
parse/train/4c0J6lwQ4_/4c0J6lwQ4_.md ADDED
@@ -0,0 +1,317 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MULTI-TIME ATTENTION NETWORKS FOR IRREGULARLY SAMPLED TIME SERIES
2
+
3
+ Satya Narayan Shukla & Benjamin M. Marlin
4
+
5
+ College of Information and Computer Sciences University of Massachusetts Amherst Amherst, MA 01003, USA {snshukla,marlin}@cs.umass.edu
6
+
7
+ # ABSTRACT
8
+
9
+ Irregular sampling occurs in many time series modeling applications where it presents a significant challenge to standard deep learning models. This work is motivated by the analysis of physiological time series data in electronic health records, which are sparse, irregularly sampled, and multivariate. In this paper, we propose a new deep learning framework for this setting that we call MultiTime Attention Networks. Multi-Time Attention Networks learn an embedding of continuous time values and use an attention mechanism to produce a fixed-length representation of a time series containing a variable number of observations. We investigate the performance of this framework on interpolation and classification tasks using multiple datasets. Our results show that the proposed approach performs as well or better than a range of baseline and recently proposed models while offering significantly faster training times than current state-of-the-art methods.1
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ Irregularly sampled time series occur in application domains including healthcare, climate science, ecology, astronomy, biology and others. It is well understood that irregular sampling poses a significant challenge to machine learning models, which typically assume fully-observed, fixed-size feature representations (Marlin et al., 2012; Yadav et al., 2018). While recurrent neural networks (RNNs) have been widely used to model such data because of their ability to handle variable length sequences, basic RNNs assume regular spacing between observation times as well as alignment of the time points where observations occur for different variables (i.e., fully-observed vectors). In practice, both of these assumptions can fail to hold for real-world sparse and irregularly observed time series. To respond to these challenges, there has been significant progress over the last decade on building and adapting machine learning models that can better capture the structure of irregularly sampled multivariate time series (Li & Marlin, 2015; 2016; Lipton et al., 2016; Futoma et al., 2017; Che et al., 2018; Shukla & Marlin, 2019; Rubanova et al., 2019).
14
+
15
+ In this work, we introduce a new model for multivariate, sparse and irregularly sampled time series that we refer to as Multi-Time Attention networks or mTANs. mTANs are fundamentally continuous-time, interpolation-based models. Their primary innovations are the inclusion of a learned continuous-time embedding mechanism coupled with a time attention mechanism that replaces the use of a fixed similarity kernel when forming representation from continuous time inputs. This gives mTANs more representational flexibility than previous interpolation-based models (Shukla & Marlin, 2019).
16
+
17
+ Our approach re-represents an irregularly sampled time series at a fixed set of reference points. The proposed time attention mechanism uses reference time points as queries and the observed time points as keys. We propose an encoder-decoder framework for end-to-end learning using an mTAN module to interface with given multivariate, sparse and irregularly sampled time series inputs. The encoder takes the irregularly sampled time series as input and produces a fixed-length latent representation over a set of reference points, while the decoder uses the latent representations to produce reconstructions conditioned on the set of observed time points. Learning uses established methods for variational autoencoders (Rezende et al., 2014; Kingma & Welling, 2014).
18
+
19
+ The main contributions of the mTAN model framework are: (1) It provides a flexible approach to modeling multivariate, sparse and irregularly sampled time series data (including irregularly sampled time series of partially observed vectors) by leveraging a time attention mechanism to learn temporal similarity from data instead of using fixed kernels. (2) It uses a temporally distributed latent representation to better capture local structure in time series data. (3) It provides interpolation and classification performance that is as good as current state-of-the-art methods or better, while providing significantly reduced training times.
20
+
21
+ # 2 RELATED WORK
22
+
23
+ An irregularly sampled time series is a time series with irregular time intervals between observations. In the multivariate setting, there can also be a lack of alignment across different variables within the same multivariate time series. Finally, when gaps between observation times are large, the time series is also considered to be sparse. Such data occur in electronic health records (Marlin et al., 2012; Yadav et al., 2018), climate science (Schulz & Stattegger, 1997), ecology (Clark & Bjørnstad, 2004), biology (Ruf, 1999), and astronomy (Scargle, 1982). It is well understood that such data cause significant issues for standard supervised machine learning models that typically assume fully observed, fixed-size feature representations (Marlin et al., 2012).
24
+
25
+ A basic approach to dealing with irregular sampling is fixed temporal discretization. For example, Marlin et al. (2012) and Lipton et al. (2016) discretize continuous-time observations into hour-long bins. This has the advantage of simplicity, but requires ad-hoc handling of bins with more than one observation and results in missing data when bins are empty.
26
+
27
+ The alternative to temporal discretization is to construct models with the ability to directly use an irregularly sampled time series as input. Che et al. (2018) present several methods based on gated recurrent unit networks (GRUs, Chung et al. (2014)), including an approach that takes as input a sequence consisting of observed values, missing data indicators, and time intervals since the last observation. Pham et al. (2017) proposed to capture time irregularity by modifying the forget gate of an LSTM (Hochreiter & Schmidhuber, 1997), while Neil et al. (2016) introduced a new time gate that regulates access to the hidden and cell state of the LSTM. While these approaches allow the network to handle event-based sequences with irregularly spaced vector-valued observations, they do not support learning directly from vectors that are partially observed, which commonly occurs in the multivariate setting because of lack of alignment of observation times across different variables.
28
+
29
+ Another line of work has looked at using observations from the future as well as from the past for interpolation. Yoon et al. (2019) and Yoon et al. (2018) presented an approach based on the multi-directional RNN (M-RNN) that can leverage observations from the relative past and future of a given time point. Shukla & Marlin (2019) proposed the interpolation-prediction network framework, consisting of several semi-parametric RBF interpolation layers that interpolate multivariate, sparse, and irregularly sampled input time series against a set of reference time points while taking into account all observed data in a time series. Horn et al. (2020) proposed a set function-based approach for classifying time-series with irregularly sampled and unaligned observation.
30
+
31
+ Chen et al. (2018) proposed a variational auto-encoder model (Kingma & Welling, 2014; Rezende et al., 2014) for continuous time data based on the use of a neural network decoder combined with a latent ordinary differential equation (ODE) model. They model time series data via a latent continuous-time function that is defined via a neural network representation of its gradient field. Building on this, Rubanova et al. (2019) proposed a latent ODE model that uses an ODE-RNN model as the encoder. ODE-RNNs use neural ODEs to model the hidden state dynamics and an RNN to update the hidden state in the presence of a new observation. De Brouwer et al. (2019) proposed GRU-ODE-Bayes, a continuous-time version of the Gated Recurrent Unit (Chung et al., 2014). Instead of the encoder-decoder architecture where the ODE is decoupled from the input processing, GRU-ODE-Bayes provides a tighter integration by interleaving the ODE and the input processing steps.
32
+
33
+ Several recent approaches have also used attention mechanisms to model irregularly sampled time series (Song et al., 2018; Tan et al., 2020; Zhang et al., 2019) as well as medical concepts (Peng et al., 2019; Cai et al., 2018). Most of these approaches are similar to Vaswani et al. (2017) where they replace the positional encoding with an encoding of time and model sequences using self-attention.
34
+
35
+ However, instead of adding the time encoding to the input representation as in Vaswani et al. (2017), they concatenate it with the input representation. These methods use a fixed time encoding similar to the positional encoding of Vaswani et al. (2017). Xu et al. (2019) learn a functional time representation and concatenate it with the input event embedding to model time-event interactions.
36
+
37
+ Like Xu et al. (2019) and Kazemi et al. (2019), our proposed method learns a time representation. However, instead of concatenating it with the input embedding, our model learns to attend to observations at different time points by computing a similarity weighting using only the time embedding. Our proposed model uses the time embedding as both the queries and keys in the attention formulation. It learns an interpolation over the query time points by attending to the observed values at key time points. Our proposed method is thus similar to kernel-based interpolation, but learning the time attention based similarity kernel gives our model more flexibility compared to methods like that of Shukla & Marlin (2019) that use similarity kernels with fixed functional forms. Another important difference relative to many of these previous methods is that our proposed approach attends only to the observed data dimensions at each time point and hence does not require a separate imputation step to handle vector valued observations with an arbitrary collection of dimensions missing at any given time point.
38
+
39
+ # 3 THE MULTI-TIME ATTENTION MODULE
40
+
41
+ In this section, we present the proposed Multi-Time Attention Module (mTAN). The role of this module is to re-represent a sparse and irregularly sampled time series in a fixed-dimensional space. This module uses multiple continuous-time embeddings and attention-based interpolation. We begin by presenting notation followed by the time embedding and attention components.
42
+
43
+ Notation: In the case of a supervised learning task, we let $\mathcal { D } = \{ ( \mathbf { s } _ { n } , y _ { n } ) | n = 1 , . . . , N \}$ represent a data set containing $N$ data cases. An individual data case consists of a single target value $y _ { n }$ (discrete for classification), as well as a $D$ -dimensional, sparse and irregularly sampled multivariate time series ${ \bf s } _ { n }$ . Different dimensions $d$ of the multivariate time series can have observations at different times, as well as different total numbers of observations $L _ { d n }$ . Thus, we represent time series $d$ for data case $n$ as a tuple $\mathbf { s } _ { d n } = ( \mathbf { t } _ { d n } , \mathbf { x } _ { d n } )$ where $\mathbf t _ { d n } = [ t _ { 1 d n } , . . . , t _ { L _ { d n } d n } ]$ is the list of time points at which observations are defined and $\mathbf { x } _ { d n } = [ x _ { 1 d n } , . . . , x _ { L _ { d n } d n } ]$ is the corresponding list of observed values. In the case of an unsupervised task such as interpolation, each data case consists of a multivariate time series ${ \bf s } _ { n }$ only. We drop the data case index $n$ for brevity when the context is clear.
44
+
45
+ Time Embedding: Time attention module is based on embedding continuous time points into a vector space. We generalize the notion of a positional encoding used in transformer-based models to continuous time. Time attention networks simultaneously leverage $H$ embedding functions $\phi _ { h } ( t )$ , each outputting a representation of size $d _ { r }$ . Dimension $i$ of embedding $h$ is defined as follows:
46
+
47
+ $$
48
+ \phi _ { h } ( t ) [ i ] = \left\{ \begin{array} { l l } { \omega _ { 0 h } \cdot t + \alpha _ { 0 h } , } & { \qquad \mathrm { i f } \quad i = 0 } \\ { \sin ( \omega _ { i h } \cdot t + \alpha _ { i h } ) , } & { \qquad \mathrm { i f } \quad 0 < i < d _ { r } } \end{array} \right.
49
+ $$
50
+
51
+ where the $\omega _ { i h }$ ’s and $\alpha _ { i h }$ ’s are learnable parameters. The periodic terms can capture periodicity in time series data. In this case, $\omega _ { i h }$ and $\alpha _ { i h }$ represent the frequency and phase of the sine function. The linear term, on the other hand, can capture non-periodic patterns dependent on the progression of time. For a given difference $\Delta$ , $\phi _ { h } ( t + \Delta )$ can be represented as a linear function of $\phi _ { h } ( t )$ .
52
+
53
+ Learning the periodic time embedding functions is equivalent to using a one-layer fully connected network with a sine function non-linearity to map the time values into a higher dimensional space. By contrast, the positional encoding used in transformer models is defined only for discrete positions. We note that our time embedding functions subsume positional encodings when evaluated at discrete positions.
54
+
55
+ Multi-Time Attention: The time embedding component described above takes a continuous time point and embeds it into $H$ different $d _ { r }$ -dimensional spaces. In this section, we describe how we leverage time embeddings to produce a continuous-time embedding module for sparse and irregularly sampled time series. This multi-time attention embedding module $\operatorname { m T A N } ( t , \mathbf { s } )$ takes as input a query time point $t$ and a set of keys and values in the form of a $D$ -dimensional multivariate sparse and irregularly sampled time series s (as defined in the notation section above), and returns a $J$ - dimensional embedding at time $t$ . This process leverages a continuous-time attention mechanism applied to the $H$ time embeddings. The complete computation is described below.
56
+
57
+ ![](images/a87c991484beceef168bab4459c1596129ee6ddf4ce2bc560c45e15308a9c604.jpg)
58
+ Figure 1: Architecture of the mTAND module. It takes irregularly sampled time points and corresponding values as keys and values and produces a fixed dimensional representation at the query time points. The attention blocks (ATT) perform a scaled dot product attention over the observed values using the time embedding of the query and key time points. Equation 3 and 4 defines this operation. Note that the output at all query points can be computed in parallel.
59
+
60
+ $$
61
+ \begin{array} { r l } & { \mathrm { m T A N } ( t , \mathbf { s } ) [ j ] = \displaystyle \sum _ { h = 1 } ^ { H } \sum _ { d = 1 } ^ { D } \hat { x } _ { h d } ( t , \mathbf { s } ) \cdot U _ { h d j } } \\ & { \quad \quad \quad \hat { x } _ { h d } ( t , \mathbf { s } ) = \displaystyle \sum _ { i = 1 } ^ { L _ { d } } \kappa _ { h } ( t , t _ { i d } ) x _ { i d } } \\ & { \quad \quad \quad \kappa _ { h } ( t , t _ { i d } ) = \displaystyle \frac { \exp \big ( \phi _ { h } ( t ) \mathbf { w v } ^ { T } \phi _ { h } ( t _ { i d } ) ^ { T } / \sqrt { d _ { k } } \big ) } { \sum _ { i ^ { \prime } = 1 } ^ { L _ { d } } \exp \big ( \phi _ { h } ( t ) \mathbf { w v } ^ { T } \phi _ { h } ( t _ { i ^ { \prime } d } ) ^ { T } / \sqrt { d _ { k } } \big ) } } \end{array}
62
+ $$
63
+
64
+ As shown in Equation 2, dimension $j$ of the mTAN embedding $\mathrm { m T A N } ( t , \mathbf { s } ) [ j ]$ is given by a linear combination of intermediate univariate continuous-time functions ${ \hat { x } } _ { h d } ( t , \mathbf { s } )$ . There is one such function defined for each input data dimension $d$ and each time embedding $h$ . The parameters $U _ { h d j }$ are learnable linear combination weights.
65
+
66
+ As shown in Equation 3, the structure of the intermediate continuous-time function ${ \hat { x } } _ { h d } ( t , \mathbf { s } )$ is essentially a kernel smoother applied to the $d ^ { t h }$ dimension of the time series. However, the interpolation weights $\kappa _ { h } ( t , t _ { i d } )$ are defined based on a time attention mechanism that leverages time embeddings, as shown in Equation 4. As we can see, the same time embedding function $\phi _ { h } ( t )$ is applied for all data dimensions. The form of the attention mechanism is a softmax function over the observed time points $t _ { i d }$ for dimension $d$ . The activation within the softmax is a scaled inner product between the time embedding $\phi _ { h } ( t )$ of the query time point $t$ and the time embedding $\phi _ { h } ( t _ { i d } )$ of the observed time point, the key. The parameters $\mathbf { w }$ and $\mathbf { v }$ are each $d _ { r } \times d _ { k }$ matrices where $d _ { k } \leq d _ { r }$ . We use a scaling factor $\frac { 1 } { \sqrt { d _ { k } } }$ to normalize the dot product to counteract the growth in the dot product magnitude with increase in the dimension $d _ { k }$ .
67
+
68
+ Learning the time embeddings provides our model with flexibility to learn complex temporal kernel functions $\kappa _ { h } ( t , t ^ { \prime } )$ . The use of multiple simultaneous time embeddings $\phi _ { h } ( t )$ and a final linear combination across time embedding dimensions and data dimensions means that the final output representation function $\operatorname { m T A N } ( t , \mathbf { s } )$ is extremely flexible. Different input dimensions can leverage different time embeddings via learned sparsity patterns in the parameter tensor $U$ . Information from different data dimensions can also be mixed together to create compact reduced dimensional representations. We note that all of the required computations can be parallelized using masking variables to deal with unobserved dimensions, allowing for efficient implementation on a GPU.
69
+
70
+ Discretization: Since the mTAN module defines a continuous function of $t$ given s, it can not be directly incorporated into neural network architectures that expect inputs in the form of fixeddimensional vectors or discrete sequences. However, the mTAN module can easily be adapted to produce such an output representation by materializing its output at a set of reference time points $\mathbf { \bar { r } } = [ r _ { 1 } , . . . , r _ { K } ]$ . In some cases, we may have a fixed set of such points. In other cases, the set of reference time points may need to depend on s itself. In particular, we define the auxiliary function $\rho ( \mathbf { s } )$ to return the set of time points at which there is an observation on any dimension of s.
71
+
72
+ ![](images/836a038430dc881ef5ca17b0bb71a235eeebf044b03173b30b0b9a56b13ed006.jpg)
73
+ Figure 2: Architecture of the proposed encoder-decoder framework mTAND-Full. The classifier is required only for performing classification tasks. The mTAND module is shown in Figure 1.
74
+
75
+ Given a collection of reference time points $\mathbf { r }$ , we define the discretized mTAN module $\mathrm { m T A N D } ( \mathbf { r } , \mathbf { s } )$ as $\mathrm { m T A N D } ( \mathbf { r } , \mathbf { s } ) [ i ] = \mathrm { m T A N } ( r _ { i } , \mathbf { s } )$ . This module takes as input the set of reference time points $\mathbf { r }$ and the time series s and outputs a sequence of mTAN embeddings of length $| \mathbf { r } |$ , each of dimension $J$ . The architecture of the mTAND module is shown in Figure 1. The mTAND module can be used to interface sparse and irregularly sampled multivariate time series data with any deep neural network layer type including fully-connected, recurrent, and convolutional layers. In the next section, we describe the construction of a temporal encoder-decoder architecture leveraging the mTAND module, which can be applied to both classification and interpolation tasks.
76
+
77
+ # 4 ENCODER-DECODER FRAMEWORK
78
+
79
+ As described in the last section, we leverage the discretized mTAN module in an encoder-decoder framework as the primary model in this paper, which we refer to as an mTAN network. We develop the encoder-decoder framework within the variational autoencoder (VAE) framework in this section. The architecture for the model framework is shown in Figure 2.
80
+
81
+ Model Architecture: As we are modeling time series data, we begin by defining a sequence of latent states $\mathbf { z } _ { i }$ . Each of these latent states are IID-distributed according to a standard multivariate normal distribution $p ( \mathbf { z } _ { i } )$ . We define the set of latent states ${ \bf z } = [ { \bf z } _ { 1 } , . . . , { \bf z } _ { K } ]$ at $K$ reference time points.
82
+
83
+ We define a three-stage decoder. First, the latent states are processed through an RNN decoder $\mathbf { h } _ { R N N } ^ { d e c } = [ \mathbf { h } _ { 1 , R N N } ^ { d e c } , . . . , \mathbf { h } _ { K , R N N } ^ { d e c } ]$ ndencies resulting in a first set of deterministic latent v. Second, the output of the RNN decoder stage and the $K$ ablestime points $\mathbf { h } _ { R N N } ^ { d e c }$ are provided to the mTAND module along with a set of $T$ query time points t. The mTAND module outputs a sequence of embeddings $\mathbf { h } _ { T A N } ^ { d e c } = [ \mathbf { h } _ { 1 , T A N } ^ { d e c } , . . . , \mathbf { h } _ { T , T A N } ^ { d e c } ]$ of length |t|. Third, the mTAN embeddings are independently decoded using a fully connected decoder $f ^ { d e c } ( )$ and the result is used to parameterize an output distribution. In this work, we use a diagonal covariance Gaussian distribution with mean given by the final decoded representation and a fixed variance $\sigma ^ { 2 }$ . The final generated time series is given by $\hat { \bf s } = ( { \bf t } , { \bf x } )$ with all data dimensions observed. The full generative process is shown below. We let $p _ { \theta } ( \mathbf { x } | \mathbf { z } , \mathbf { t } )$ define the probability distribution over the values of the time series $\mathbf { x }$ given the time points $\mathbf { t }$ and the latent variables z. $\theta$ represents the parameters of all components of the decoder.
84
+
85
+ $$
86
+ \begin{array} { r l } & { \quad \mathbf { z } _ { k } \sim p ( \mathbf { z } _ { k } ) } \\ & { \quad \mathbf { h } _ { R N N } ^ { d e c } = \mathrm { R N N } ^ { d e c } ( \mathbf { z } ) } \\ & { \quad \mathbf { h } _ { T A N } ^ { d e c } = \mathrm { m T A N D } ^ { d e c } ( \mathbf { t } , \mathbf { h } _ { R N N } ^ { d e c } ) } \\ & { \quad \quad \quad x _ { i d } \sim \mathcal { N } ( x _ { i d } ; f ^ { d e c } ( \mathbf { h } _ { i , T A N } ^ { d e c } ) [ d ] , \sigma ^ { 2 } I ) } \end{array}
87
+ $$
88
+
89
+ For an encoder, we simply invert the structure of the generative process. We begin by mapping the input time series s through the mTAND module along with a collection of $K$ reference time points $\mathbf { r }$ . We apply an RNN encoder to the mTAND model that outputs $\mathbf { h } _ { T A N } ^ { e n c }$ to encode longer-range temporal structure. Finally, we construct a distribution over latent variables at each reference time point using the RNN outputs to be the distribu a diagonal Gaussian distribution with mean and variance output by fully connected layers applied to $\mathbf { h } _ { R N N } ^ { e n c }$ . The complete encoder architecture is described below. We define er the latent variables induced by the input time series s and the $q _ { \gamma } ( \mathbf { z } | \mathbf { r } , \mathbf { s } )$ time points $\mathbf { r }$ . $\gamma$ represents all of the parameters in all of the encoder components.
90
+
91
+ $$
92
+ \begin{array} { c } { { { \bf h } _ { T A N } ^ { e n c } = { \bf m } \mathrm { T A N D } ^ { e n c } ( { \bf r } , { \bf s } ) } } \\ { { { \bf h } _ { R N N } ^ { e n c } = { \bf R } { \bf N } \mathrm { N } ^ { e n c } ( { \bf h } _ { T A N } ^ { e n c } ) } } \\ { { { \bf z } _ { k } \sim q _ { \gamma } ( { \bf z } _ { k } | { \pmb { \mu } } _ { k } , \sigma _ { k } ^ { 2 } ) , ~ { \pmb { \mu } } _ { k } = f _ { \mu } ^ { e n c } ( { \bf h } _ { k , R N N } ^ { e n c } ) , ~ \sigma _ { k } ^ { 2 } = \exp ( f _ { \sigma } ^ { e n c } ( { \bf h } _ { k , R N N } ^ { e n c } ) ) } } \end{array}
93
+ $$
94
+
95
+ Unsupervised Learning: To learn the parameters of our encoder-decoder model given a data set of sparse and irregularly sampled time series, we follow a slightly modified VAE training approach and maximize a normalized variational lower bound on the log marginal likelihood based on the evidence lower bound or ELBO. The learning objective is defined below where $p _ { \theta } ( x _ { j d n } | \mathbf { z } , \mathbf { t } _ { n } )$ and $q _ { \gamma } ( \mathbf { z } | \mathbf { r } , \mathbf { s } _ { n } )$ are defined in the previous section.
96
+
97
+ $$
98
+ \begin{array} { l } { \displaystyle \mathcal { L } _ { \mathrm { N V A E } } ( \theta , \gamma ) = \sum _ { n = 1 } ^ { N } \frac { 1 } { \sum _ { d } L _ { d n } } \Big ( \mathbb { E } _ { q _ { \gamma } ( \mathbf { z } | \mathbf { r } , \mathbf { s } _ { n } ) } [ \log p _ { \theta } ( \mathbf { x } _ { n } | \mathbf { z } , \mathbf { t } _ { n } ) ] - D _ { \mathrm { K L } } ( q _ { \gamma } ( \mathbf { z } | \mathbf { r } , \mathbf { s } _ { n } ) | | p ( \mathbf { z } ) ) \Big ) } \\ { \displaystyle D _ { \mathrm { K L } } ( q _ { \gamma } ( \mathbf { z } | \mathbf { r } , \mathbf { s } _ { n } ) | | p ( \mathbf { z } ) ) = \sum _ { i = 1 } ^ { K } D _ { \mathrm { K L } } ( q _ { \gamma } ( \mathbf { z } _ { i } | \mathbf { r } , \mathbf { s } _ { n } ) | | p ( \mathbf { z } _ { i } ) ) } \\ { \displaystyle \log p _ { \theta } ( \mathbf { x } _ { n } | \mathbf { z } , \mathbf { t } _ { n } ) = \sum _ { d = 1 } ^ { D } \sum _ { j = 1 } ^ { L _ { d n } } \log p _ { \theta } ( x _ { j d n } | \mathbf { z } , t _ { j d n } ) } \end{array}
99
+ $$
100
+
101
+ Since irregularly sampled time series can have different numbers of observations across different dimensions as well as across different data cases, it can be helpful to normalize the terms in the standard ELBO objective to avoid the model focusing more on sequences that are longer at the expense of sequences that are shorter. The objective above normalizes the contribution of each data case by the total number of observations it contains. The fact that all data dimensions are not observed at all time points is accounted for in Equation 14. In practice, we use $k$ samples from the variational distribution $q _ { \gamma } ( \mathbf { z } | \mathbf { r } , \mathbf { s } _ { n } )$ to compute the learning objective.
102
+
103
+ Supervised Learning: We can also augment the encoder-decoder model with a supervised learning component that leverages the latent states as a feature extractor. We define this component to be of the form $p _ { \delta } ( y _ { n } | \mathbf { z } )$ where $\delta$ are the model parameters. This leads to an augmented learning objective as shown in Equation 15 where the $\lambda$ term trades off the supervised and unsupervised terms.
104
+
105
+ $$
106
+ \mathcal { L } _ { \mathrm { s u p e r v i s e d } } ( \theta , \gamma , \delta ) = \mathcal { L } _ { \mathrm { N V A E } } ( \theta , \gamma ) + \lambda \mathbb { E } _ { q _ { \gamma } ( \mathbf { z } | \mathbf { r } , \mathbf { s } _ { n } ) } \log p _ { \delta } ( y _ { n } | \mathbf { z } )
107
+ $$
108
+
109
+ In this work, we focus on classification as an illustrative supervised learning problem. For the classification model $p _ { \delta } ( y _ { n } | \mathbf { z } )$ , we use a GRU followed by a 2-layer fully connected network. We use a small number of samples to approximate the required intractable expectations during both learning and prediction. Predictions are computed by marginalizing over the latent variable as shown below.
110
+
111
+ $$
112
+ y ^ { * } = \underset { y \in \mathcal { V } } { \arg \operatorname* { m a x } } ~ \mathbb { E } _ { q _ { \gamma } ( \mathbf { z } | \mathbf { r } , \mathbf { s } ) } [ \log p _ { \delta } ( y | \mathbf { z } ) ]
113
+ $$
114
+
115
+ # 5 EXPERIMENTS
116
+
117
+ In this section, we present interpolation and classification experiments using a range of models and three real-world data sets (Physionet Challenge 2012, MIMIC-III, and a Human Activity dataset). Additional illustrative results on synthetic data can be found in Appendix A.2.
118
+
119
+ Datasets: The PhysioNet Challenge 2012 dataset (Silva et al., 2012) consists of multivariate time series data with 37 variables extracted from intensive care unit (ICU) records. Each record contains sparse and irregularly spaced measurements from the first 48 hours after admission to ICU. We follow the procedures of Rubanova et al. (2019) and round the observation times to the nearest minute. This leads to 2880 possible measurement times per time series. The data set includes 4000 labeled instances and 4000 unlabeled instances. We use all 8000 instances for interpolation experiments and the 4000 labeled instances for classification experiments. We focus on predicting in-hospital mortality. $1 3 . 8 \%$ of examples are in the positive class.
120
+
121
+ The MIMIC-III data set (Johnson et al., 2016) is a multivariate time series dataset consisting of sparse and irregularly sampled physiological signals collected at Beth Israel Deaconess Medical Center from 2001 to 2012. Following the procedures of Shukla & Marlin (2019), we extract 53, 211 records each containing 12 physiological variables. We focus on predicting in-hospital mortality using the first 48 hours of data. $\dot { 8 } . 1 \%$ of the instances have positive labels.
122
+
123
+ The human activity dataset consists of 3D positions of the waist, chest and ankles collected from five individuals performing various activities including walking, sitting, lying, standing, etc. We follow the data preprocessing steps of Rubanova et al. (2019) and construct a dataset of 6, 554 sequences with 12 channels and 50 time points. We focus on classifying each time point in the sequence into one of eleven types of activities.
124
+
125
+ Experimental Protocols: We conduct interpolation experiments using the 8000 data cases in the PhysioNet data set. We randomly divide the data set into a training set containing $80 \%$ of the instances, and a test set containing the remaining $20 \%$ of instances. We use $20 \%$ of the training data for validation. In the interpolation task, we condition on a subset of available points and predict values for rest of the time points. We perform interpolation experiments with a varying percentage of observed points ranging from $5 0 \%$ to $\bar { 9 } 0 \%$ of the available points. At test time, the values of observed points are conditioned on and each model is used to infer the values at rest of the available time points in the test instance. We repeat each experiment five times using different random seeds to initialize the model parameters. We assess performance using mean squared error (MSE).
126
+
127
+ We use the labeled data in all three data sets to conduct classification experiments. The PhysioNet and MIMIC III problems are whole time series classification problems. Note that for the human activity dataset, we classify each time point in the time series. We treat this as a smoothing problem and condition on all available observations when producing the classification at each time-point (similar to labeling in a CRF). We use bidirectional RNNs as the RNN-based baselines for the human activity dataset. We randomly divide each data set into a training set containing $80 \%$ of the time series, and a test set containing the remaining $20 \%$ of instances. We use $20 \%$ of the training set for validation. We repeat each experiment five times using different random seeds to initialize the model parameters. Due to class imbalance in the Physionet and MIMIC-III data sets, we assess classification performance using area under the ROC curve (the AUC score). For the Human Activity dataset, we evaluate models using accuracy.
128
+
129
+ For both interpolation and prediction, we select hyper-parameters on the held-out validation set using grid search, and then apply the best trained model to the test set. The hyper-parameter ranges searched for each model/dataset/task are fully described in Appendix A.4.
130
+
131
+ Models: The model we focus on is the encoder-decoder architecture based on the discretized multitime attention module (mTAND-Full). In the classification experiments, the hidden state at the last observed point is passed to a two-layer binary classification module for all models. For each data set, the structure of this classifier is the same for all models. For the proposed model, the sequence of latent states is first passed through a GRU and then the final hidden state is passed through the same classification module. For the classification task only, we consider an ablation of the full model that uses the proposed mTAND encoder, which consists of our mTAND module followed by a GRU to extract a final hidden state, which is then passed to the classification module (mTAND-Enc). We compare to several deep learning models that expand on recurrent networks to accommodate irregular sampling. We also compare to several encoder-decoder approaches. The full list of model variants is briefly described below. We use a Gated Recurrent Unit (GRU) (Chung et al., 2014) module as the recurrent network throughout. Architecture details can be found in Appendix A.3.
132
+
133
+ Table 1: Interpolation performance versus percent observed time points on PhysioNet
134
+
135
+ <table><tr><td>Model</td><td colspan="5">Mean Squared Error(×10-³)</td></tr><tr><td>RNN-VAE</td><td>13.418 ± 0.008</td><td>12.594± 0.004</td><td>11.887 ± 0.005</td><td>11.133 ± 0.007</td><td>11.470 ± 0.006</td></tr><tr><td>L-ODE-RNN</td><td>8.132 ±0.020</td><td>8.140 ± 0.018</td><td>8.171 ±0.030</td><td>8.143 ±0.025</td><td>8.402 ±0.022</td></tr><tr><td>L-ODE-ODE</td><td>6.721 ±0.109</td><td>6.816± 0.045</td><td>6.798 ±0.143</td><td>6.850 ± 0.066</td><td>7.142 ± 0.066</td></tr><tr><td>mTAND-Full</td><td>4.139 ± 0.029</td><td>4.018 ± 0.048</td><td>4.157 ± 0.053</td><td>4.410 ± 0.149</td><td>4.798 ± 0.036</td></tr><tr><td>Observed %</td><td>50%</td><td>60%</td><td>70%</td><td>80%</td><td>90%</td></tr></table>
136
+
137
+ • RNN-Impute: Missing observations replaced with weighted average of last observed measurement within that time series and global mean of the variable across training examples (Che et al., 2018).
138
+ • RNN- $\Delta _ { t }$ : Input is concatenated with masking variable and time interval $\Delta _ { t }$ indicating how long the particular variable is missing.
139
+ • RNN-Decay: RNN with exponential decay on hidden states (Mozer et al., 2017; Che et al., 2018).
140
+ • GRU-D: combining hidden state decay with input decay (Che et al., 2018).
141
+ • Phased-LSTM: Captures time irregularity by a time gate that regulates access to the hidden and cell state of the LSTM (Neil et al., 2016) with forward filling to handle partially observed vectors.
142
+ • IP-Nets: Interpolation prediction networks, which use several semi-parametric RBF interpolation layers, followed by a GRU (Shukla & Marlin, 2019).
143
+ • SeFT: Uses a set function based approach where all the observations are modeled individually before pooling them together using an attention based approach (Horn et al., 2020).
144
+ • RNN-VAE: A VAE-based model where the encoder and decoder are standard RNN models.
145
+ • ODE-RNN: Uses neural ODEs to model hidden state dynamics and an RNN to update the hidden state in presence of a new observation (Rubanova et al., 2019).
146
+ • L-ODE-RNN: Latent ODE where the encoder is an RNN and decoder is a neural ODE (Chen et al., 2018).
147
+ • L-ODE-ODE: Latent ODE where the encoder is an ODE-RNN and decoder is a neural ODE (Rubanova et al., 2019).
148
+
149
+ Physionet Experiments: Table 1 compares the performance of all methods on the interpolation task where we observe $5 0 \% - 9 0 \%$ of the values in the test instances. As we can see, the proposed method (mTAND-Full) consistently and substantially outperforms all of the previous approaches across all of the settings of observed time points. We note that in this experiment, different columns correspond to different setting (for example, in the case of $7 0 \%$ , we condition on $7 0 \%$ of data and predict the rest of the data; i.e., $3 0 \%$ ) and, hence the results across columns are not comparable.
150
+
151
+ Table 2 compares predictive performance on the PhysioNet mortality prediction task. The full Multi-Time Attention network model (mTAND-Full) and the classifier based only on the Multi-Time Attention network encoder (mTAND-Enc) achieve significantly improved performance relative to the current state-of-the-art methods (ODE-RNN and L-ODE-ODE) and other baseline methods.
152
+
153
+ We also report the time per epoch in minutes for all the methods. We note that the ODE-based models require substantially more run time than other methods due to the required use of an ODE solver (Chen et al., 2018; Rubanova et al., 2019). These methods also require taking the union of all observation time points in a batch, which further slows down the training process. As we can see, the proposed full Multi-Time Attention network (mTAND-Full) is over 85 times faster than ODE-RNN and over 100 times faster than L-ODE-ODE, the best-performing ODE-based models.
154
+
155
+ MIMIC-III Experiments: Table 2 compares the predictive performance of the models on the mortality prediction task on MIMIC-III. The Multi-Time Attention network-based encoder-decoder framework (mTAND-Full) achieves better performance than the recent IP-Net and SeFT model as well as all of the RNN baseline models. While ODE-RNN and L-ODE-ODE both have slightly better mean AUC than mTAND-Full, the differences are not statistically significant. Further, as shown on the PhysioNet classification problem, mTAND-Full is more than an order of magnitude faster than the ODE-based methods.
156
+
157
+ Table 2: Classification Performance on PhysioNet, MIMIC-III and Human Activity dataset
158
+
159
+ <table><tr><td rowspan="2">Model</td><td colspan="2">AUC Score</td><td>Accuracy</td><td rowspan="2">time per epoch</td></tr><tr><td>PhysioNet</td><td>MIMIC-III</td><td>Human Activity</td></tr><tr><td>RNN-Impute</td><td>0.764± 0.016</td><td>0.8249 ± 0.0010</td><td>0.859 ± 0.004</td><td>0.5</td></tr><tr><td>RNN-△t</td><td>0.787 ± 0.014</td><td>0.8364 ± 0.0011</td><td>0.857 ± 0.002</td><td>0.5</td></tr><tr><td>RNN-Decay</td><td>0.807 ± 0.003</td><td>0.8392 ± 0.0012</td><td>0.860 ± 0.005</td><td>0.7</td></tr><tr><td>RNN GRU-D</td><td>0.818 ± 0.008</td><td>0.8270± 0.0010</td><td>0.862 ± 0.005</td><td>0.7</td></tr><tr><td>Phased-LSTM</td><td>0.836 ± 0.003</td><td>0.8429 ± 0.0035</td><td>0.855 ± 0.005</td><td>0.3</td></tr><tr><td>IP-Nets</td><td>0.819 ± 0.006</td><td>0.8390 ± 0.0011</td><td>0.869 ± 0.007</td><td>1.3</td></tr><tr><td>SeFT</td><td>0.795 ± 0.015</td><td>0.8485 ± 0.0022</td><td>0.815 ± 0.002</td><td>0.5</td></tr><tr><td>RNN-VAE</td><td>0.515 ± 0.040</td><td>0.5175 ± 0.0312</td><td>0.343 ± 0.040</td><td>2.0</td></tr><tr><td>ODE-RNN</td><td>0.833 ± 0.009</td><td>0.8561 ± 0.0051</td><td>0.885 ± 0.008</td><td>16.5</td></tr><tr><td>L-ODE-RNN</td><td>0.781±0.018</td><td>0.7734± 0.0030</td><td>0.838 ± 0.004</td><td>6.7</td></tr><tr><td>L-ODE-ODE</td><td>0.829 ± 0.004</td><td>0.8559 ± 0.0041</td><td>0.870 ± 0.028</td><td>22.0</td></tr><tr><td>mTAND-Enc</td><td>0.854± 0.001</td><td>0.8419 ± 0.0017</td><td>0.907 ± 0.002</td><td>0.1</td></tr><tr><td>mTAND-Full</td><td>0.858 ± 0.004</td><td>0.8544 ± 0.0024</td><td>0.910 ± 0.002</td><td>0.2</td></tr></table>
160
+
161
+ Human Activity Experiments: Table 2 shows that the mTAND-based classifiers achieve significantly better performance than the baseline models on this prediction task, followed by ODE-based models and IP-Nets.
162
+
163
+ Additional Experiments: In Appendix A.2, we demonstrate the effectiveness of learning temporally distributed latent representations with mTANs on a synthetic dataset. We show that mTANs are able to capture local structure in the time series better than latent ODE-based methods that encode to a single time point. This property of mTANs helps to improve the interpolation performance in terms of mean squared error.
164
+
165
+ We also perform ablation experiments to show the performance gain achieved by learning similarity kernels and time embeddings in Appendix A.1. In particular, we show that learning the time embedding improves classification performance compared to using fixed positional encodings. We also demonstrate the effectiveness of learning the similarity kernel by comparing to an approach that uses fixed RBF kernels. Appendix A.1 shows that learning the similarity kernel using the mTAND module performs as well as or better than using a fixed RBF kernel.
166
+
167
+ # 6 DISCUSSION AND CONCLUSIONS
168
+
169
+ In this paper, we have presented the Multi-Time Attention (mTAN) module for learning from sparse and irregularly sampled data along with a VAE-based encoder-decoder model leveraging this module. Our results show that the resulting model performs as well or better than a range of baseline and state-of-the-art models on both the interpolation and classification tasks, while offering training times that are one to two orders of magnitude faster than previous state of the art methods. While in this work we have focused on a VAE-based encoder-decoder architecture, the proposed mTAN module can be used to provide an interface between sparse and irregularly sampled time series and many different types of deep neural network architectures including GAN-based models. Composing the mTAN module with convolutional networks instead of recurrent architectures may also provide further computational enhancements due to improved parallelism.
170
+
171
+ # ACKNOWLEDGEMENTS
172
+
173
+ Research reported in this paper was partially supported by the National Institutes of Health under award numbers 5U01CA229445 and 1P41EB028242.
174
+
175
+ # REFERENCES
176
+
177
+ Xiangrui Cai, Jinyang Gao, Kee Yuan Ngiam, Beng Chin Ooi, Ying Zhang, and Xiaojie Yuan. Medical concept embedding with time-aware attention. In IJCAI, 2018.
178
+
179
+ Zhengping Che, Sanjay Purushotham, Kyunghyun Cho, David Sontag, and Yan Liu. Recurrent neural networks for multivariate time series with missing values. Scientific Reports, 8(1):6085, 2018.
180
+
181
+ Tian Qi Chen, Yulia Rubanova, Jesse Bettencourt, and David K Duvenaud. Neural ordinary differential equations. In Advances in Neural Information Processing Systems 31, pp. 6571–6583. 2018.
182
+
183
+ Junyoung Chung, C¸ aglar G ˘ ul¨ c¸ehre, Kyunghyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv e-prints, abs/1412.3555, 2014. URL https://arxiv.org/abs/1412.3555. Presented at the Deep Learning workshop at NIPS2014.
184
+
185
+ J.S. Clark and O.N. Bjørnstad. Population time series: process variability, observation errors, missing values, lags, and hidden states. Ecology, 85(11):3140–3150, 2004.
186
+
187
+ Edward De Brouwer, Jaak Simm, Adam Arany, and Yves Moreau. Gru-ode-bayes: Continuous modeling of sporadically-observed time series. In Advances in Neural Information Processing Systems 32, pp. 7379–7390. Curran Associates, Inc., 2019.
188
+
189
+ Joseph Futoma, Sanjay Hariharan, and Katherine A. Heller. Learning to detect sepsis with a multitask gaussian process RNN classifier. In Proceedings of the 34th International Conference on Machine Learning, pp. 1174–1182, 2017.
190
+
191
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
192
+
193
+ Max Horn, Michael Moor, Christian Bock, Bastian Rieck, and Karsten Borgwardt. Set functions for time series. In Proceedings of the 25th International Conference on Machine Learning, 2020.
194
+
195
+ Alistair EW Johnson, Tom J Pollard, Lu Shen, H Lehman Li-wei, Mengling Feng, Mohammad Ghassemi, Benjamin Moody, Peter Szolovits, Leo Anthony Celi, and Roger G Mark. Mimic-iii, a freely accessible critical care database. Scientific Data, 3:160035, 2016.
196
+
197
+ S. Kazemi, R. Goel, Sepehr Eghbali, Janahan Ramanan, Jaspreet Sahota, Sanjay Thakur, S. Wu, C. Smyth, P. Poupart, and Marcus A. Brubaker. Time2vec: Learning a vector representation of time. ArXiv, abs/1907.05321, 2019.
198
+
199
+ Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. In 2nd International Conference on Learning Representations, 2014.
200
+
201
+ Steven Cheng-Xian Li and Benjamin M Marlin. A scalable end-to-end gaussian process adapter for irregularly sampled time series classification. In Advances In Neural Information Processing Systems, pp. 1804–1812, 2016.
202
+
203
+ Steven Cheng-Xian Li and Benjmain M. Marlin. Classification of sparse and irregularly sampled time series with mixtures of expected Gaussian kernels and random features. In 31st Conference on Uncertainty in Artificial Intelligence, 2015.
204
+
205
+ Zachary C Lipton, David Kale, and Randall Wetzel. Directly modeling missing data in sequences with rnns: Improved classification of clinical time series. In Machine Learning for Healthcare Conference, pp. 253–270, 2016.
206
+
207
+ Benjamin M. Marlin, David C. Kale, Robinder G. Khemani, and Randall C. Wetzel. Unsupervised pattern discovery in electronic health care data using probabilistic clustering models. In Proceedings of the 2nd ACM SIGHIT International Health Informatics Symposium, pp. 389–398, 2012.
208
+
209
+ Michael C. Mozer, Denis Kazakov, and Robert V. Lindsey. Discrete event, continuous time rnns. CoRR, abs/1710.04110, 2017. URL http://arxiv.org/abs/1710.04110.
210
+
211
+ Daniel Neil, Michael Pfeiffer, and Shih-Chii Liu. Phased lstm: Accelerating recurrent network training for long or event-based sequences. In Advances in Neural Information Processing Systems, pp. 3882–3890. 2016.
212
+
213
+ Xueping Peng, Guodong Long, Tao Shen, Sen Wang, J. Jiang, and Michael Blumenstein. Temporal self-attention network for medical concept embedding. 2019 IEEE International Conference on Data Mining (ICDM), pp. 498–507, 2019.
214
+
215
+ Trang Pham, Truyen Tran, Dinh Phung, and Svetha Venkatesh. Predicting healthcare trajectories from medical records: A deep learning approach. Journal of Biomedical Informatics, 69, 04 2017. doi: 10.1016/j.jbi.2017.04.001.
216
+
217
+ Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In Proceedings of the 31st International Conference on Machine Learning, pp. 1278–1286, 2014.
218
+
219
+ Yulia Rubanova, Ricky T. Q. Chen, and David K Duvenaud. Latent ordinary differential equations for irregularly-sampled time series. In Advances in Neural Information Processing Systems 32, pp. 5320–5330. Curran Associates, Inc., 2019.
220
+
221
+ T. Ruf. The lomb-scargle periodogram in biological rhythm research: analysis of incomplete and unequally spaced time-series. Biological Rhythm Research, 30(2):178–201, 1999.
222
+
223
+ Jeffrey D Scargle. Studies in astronomical time series analysis. ii-statistical aspects of spectral analysis of unevenly spaced data. The Astrophysical Journal, 263:835–853, 1982.
224
+
225
+ M. Schulz and K. Stattegger. Spectrum: Spectral analysis of unevenly spaced paleoclimatic time series. Computers & Geosciences, 23(9):929–945, 1997.
226
+
227
+ Satya Narayan Shukla and Benjamin M Marlin. Interpolation Prediction Networks for Irregularly Sampled Time Series. ICLR, 2019.
228
+
229
+ Ikaro Silva, George Moody, Daniel Scott, Leo Celi, and Roger Mark. Predicting in-hospital mortality of icu patients: The physionet/computing in cardiology challenge 2012. Computing in cardiology, 39:245–248, 2012.
230
+
231
+ Huan Song, Deepta Rajan, Jayaraman J. Thiagarajan, and Andreas Spanias. Attend and diagnose: Clinical time series analysis using attention models. In 32nd AAAI Conference on Artificial Intelligence, AAAI 2018, pp. 4091–4098. AAAI press, January 2018.
232
+
233
+ Qingxiong Tan, Mang Ye, Baoyao Yang, Siqi Liu, Andy Jinhua Ma, Terry Cheuk-Fung Yip, Grace Lai-Hung Wong, and Pongchi Yuen. Data-gru: Dual-attention time-aware gated recurrent unit for irregular multivariate time series. In AAAI, 2020.
234
+
235
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, undefinedukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Proceedings of the 31st International Conference on Neural Information Processing Systems, pp. 6000–6010, 2017.
236
+
237
+ Da Xu, Chuanwei Ruan, Evren Korpeoglu, Sushant Kumar, and Kannan Achan. Self-attention with functional time representation learning. In Advances in Neural Information Processing Systems 32, pp. 15915–15925. 2019.
238
+
239
+ Pranjul Yadav, Michael Steinbach, Vipin Kumar, and Gyorgy Simon. Mining electronic health records (ehrs): A survey. ACM Computing Surveys (CSUR), 50(6):85, 2018.
240
+
241
+ J. Yoon, W. R. Zame, and M. van der Schaar. Estimating missing data in temporal data streams using multi-directional recurrent neural networks. IEEE Transactions on Biomedical Engineering, 66(5): 1477–1490, 2019. doi: 10.1109/TBME.2018.2874712.
242
+
243
+ Jinsung Yoon, William R Zame, and Mihaela Van Der Schaar. Deep sensing: Active sensing using multi-directional recurrent neural networks. ICLR, 2018.
244
+
245
+ Yuan Zhang, Xi Yang, Julie Ivy, and Min Chi. Attain: Attention-based time-aware lstm networks for disease progression modeling. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, pp. 4369–4375, 2019.
246
+
247
+ # A APPENDIX
248
+
249
+ # A.1 ABLATION STUDY
250
+
251
+ In this section, we perform ablation experiments to show the performance gain achieved by learning similarity kernel and time embedding. Table 3 shows the ablation results by substituting fixed positional encoding (Vaswani et al., 2017) in place of learnable time embedding defined in Equation 1 in mTAND-Full model on PhysioNet and MIMIC-III dataset for classification task. We report the average AUC score over 5 runs. As we can see from Table 3, learning the time embedding improves AUC score by $1 \%$ as compared to using fixed positional encodings.
252
+
253
+ Table 3: Ablation with time embedding
254
+
255
+ <table><tr><td>Dataset</td><td>Time Embedding</td><td>AUC Score</td></tr><tr><td>PhysioNet</td><td>Positional Encoding Learned Time Embedding</td><td>0.845 ± 0.004 0.858 ± 0.004</td></tr><tr><td>MIMIC-III</td><td>Positional Encoding Learned Time Embedding</td><td>0.843 ± 0.001 0.854 ± 0.002</td></tr></table>
256
+
257
+ Since mTANs are fundamentally continuous-time interpolation-based models, we perform an ablation study by comparing mTANs with the IP-nets (Shukla & Marlin, 2019). IP-Nets use several semiparametric RBF interpolation layers, followed by a GRU to model irregularly sampled time series. In this framework, we replace the RBK kernel with a learnable similarity kernel using mTAND module, the corresponding model is mTAND-Enc. Table 4 compares the performance of the two methods on classification task on PhysioNet, MIMIC-III and Human Activity dataset. We report the average AUC score over 5 runs. Table 4 shows that learning the similarity kernel using mTAND module performs as well or better than using a fixed RBF kernel.
258
+
259
+ Table 4: Comparing interpolation kernels
260
+
261
+ <table><tr><td>Dataset</td><td>Model</td><td>AUC Score</td></tr><tr><td rowspan="2">PhysioNet</td><td>IP-Nets</td><td>0.819 ± 0.006</td></tr><tr><td>mTAND-Enc</td><td>0.854 ± 0.001</td></tr><tr><td rowspan="2">MIMIC-III</td><td>IP-Nets</td><td>0.839 ± 0.001</td></tr><tr><td>mTAND-Enc</td><td>0.842 ± 0.001</td></tr><tr><td rowspan="2">Human Activity</td><td>IP-Nets</td><td>0.869 ± 0.007</td></tr><tr><td>mTAND-Enc</td><td>0.907 ± 0.002</td></tr></table>
262
+
263
+ # A.2 SYNTHETIC INTERPOLATION EXPERIMENTS
264
+
265
+ To demonstrate the capabilities of our model on the interpolation task, we generate a synthetic dataset consisting of 1000 trajectories each of 100 time points sampled over $t \in [ 0 , 1 ]$ . We fix 10 reference points and use RBF kernel with a fixed bandwidth of 100 for constructing local interpolations at 100 time points over [0, 1]. The values at the reference points are drawn from a standard normal distribution.
266
+
267
+ We randomly sample 20 observations from each trajectory to simulate a sparse and irregularly sampled multivariate time series. We use $8 0 \%$ of the data for training and $2 0 \%$ for testing. At test time, encoder conditions on 20 irregularly sampled time points and the decoder generates interpolations on all 100 time points. Figure 3 illustrates the interpolation results on the test set for the Multi-Time Attention Network and Latent ODE model with ODE encoder (Rubanova et al., 2019). For both the models, we draw 100 samples from the approximate posterior distribution. As we can see from Figure 3, the ODE interpolations are much smoother and haven’t been able to capture the local structure as well as mTANS.
268
+
269
+ ![](images/31c7c1c2266224373e681c544bb02aebc63d193c3d9ba85adbc7ae4c69fd8e5e.jpg)
270
+ Figure 3: Interpolations on the synthetic interpolation dataset. The columns represent 3 different examples. First row: Ground truth trajectories with observed points, second row: reconstructions on the complete range $t \in [ 0 , 1 ]$ using the proposed model mTAN, third row: reconstructions on the complete range $t \in [ 0 , 1 ]$ using the Latent ODE model with ODE encoder.
271
+
272
+ Table 5: Synthetic Data: Mean Squared Error
273
+
274
+ <table><tr><td>Latent Dimension</td><td>Model</td><td>Reconstruction</td><td>Interpolation</td></tr><tr><td>10</td><td>L-ODE-ODE</td><td>0.0209</td><td>0.0571</td></tr><tr><td rowspan="2"></td><td>mTAND-Full</td><td>0.0088</td><td>0.0409</td></tr><tr><td>L-ODE-ODE</td><td>0.0191</td><td>0.0541</td></tr><tr><td>20</td><td>mTAND-Full</td><td>0.0028</td><td>0.0335</td></tr></table>
275
+
276
+ Table 5 compares the proposed model with best performing baseline Latent-ODE with ODE encoder (L-ODE-ODE) on reconstruction and interpolation task. For both the tasks, we condition on the 20 irregularly sampled time points and reconstruct the input points (reconstruction) and the whole set of 100 time points (interpolation). We report the mean squared error on test set.
277
+
278
+ # A.3 ARCHITECTURE DETAILS
279
+
280
+ Multi-Time Attention Network (mTAND-Full): In our proposed encoder-decoder framework (Figure 2), we use bi-directional GRU as the recurrent model in both encoder and decoder. In encoder, we use a 2 layer fully connected network with 50 hidden units and ReLU activations to map the RNN hidden state at each reference point to mean and variance. Similarly in decoder, mTAN embeddings are independently decoded using a 2 layer fully connected network with 50 hidden units and ReLU activations, and the result is used to parameterize the output distribution. For classification tasks, we use a separate GRU layer on top of the latent states followed by a 2-layer fully connected layer with 300 units and ReLU activations to output the class probabilities.
281
+
282
+ Multi-Time Attention Encoder (mTAND-Enc): As we show in the experiments, the proposed mTAN module can standalone be used for classification tasks. The mTAND-Enc consists of MultiTime attention module followed by GRU to extract the final hidden state which is then passed to a 2-layer fully connected layer to output the class probabilities.
283
+
284
+ Loss Function: For computing the evidence lower bound (ELBO) during training, we use negative log-likelihood with fixed variance as the reconstruction loss. For all the datasets, we use a fixed variance of 0.01. For computing ELBO, we use 5 samples for interpolation task and 1 sample for classification tasks. We use cross entropy loss for classification. For the classification tasks, we tune the $\lambda$ parameter in the supervised learning loss function (Equation 15). We achieved best performance using $\lambda$ as 100 and 5 for Physionet, MIMIC-III respectively. For human activity dataset, we achieved best results without using the regulaizer or ELBO component. We found that KL annealing with coeff 0.99 improved the performance of interpolation and classification tasks on Physionet.
285
+
286
+ # A.4 HYPERPARAMETERS
287
+
288
+ Baselines: For Physionet and Human Activity dataset, we use the reported hyperparameters for RNN baselines as well as ODE models from Rubanova et al. (2019). For MIMIC-III dataset, we independently tune the hyperparameters of the baseline models on the validation set. We search for GRU hidden units, latent dimension, number of hidden units in fully connected network for ODE function in recognition and generative model over the range $\{ 2 0 , 3 2 , 6 4 , 1 2 8 , 2 5 6 \}$ . For ODEs, we also searched the number of layers in fully connected network in the range $\{ 1 , 2 , 3 \}$ .
289
+
290
+ mTAN: We learn time embeddings of size 128. The number of embeddings $H \in \{ 1 , 2 , 4 \}$ . The linear projection matrices used for projecting time embedding $W$ are each $d _ { k } * d _ { k } / h$ where $d _ { k }$ is the embedding size. We search the latent dimension and GRU encoder hidden size over the range $\{ 3 2 , 6 4 , 1 \bar { 2 } 8 \}$ . We keep GRU decoder hidden size at 50. For the classification tasks, we use 128 reference points. For interpolation task, we search number of reference points over the range $\{ 8 , 1 6 , 3 2 , 6 4 , 1 2 8 \}$ . We use Adam Optimizer for training the models. For classification, experiments are run for 300 iteration with learning rate 0.0001, while for interpolation task experiments are run for 500 iterations with learning rate 0.001. Best hyperparameters are reported in the code.
291
+
292
+ # A.5 VISUALIZING ATTENTION WEIGHTS
293
+
294
+ ![](images/3868a23c0494522b98c316c3fadb77785cfcb80420c17decac018b804f66b27e.jpg)
295
+ Figure 4: Visualization of attention weights. mTAN learns an interpolation over the query time points by attending to the observed values at key time points. The brighter edges correspond to higher attention weights.
296
+
297
+ In this section, we visualize the attention weights learned by our proposed model. We experiment using synthetic dataset (described in A.2) which consists of univariate time series. Figure 4 shows the attention weights learned by the encoder mTAND module. The input shown in the figure is the irregularly sampled time points and the edges show how the output at reference points attends to the values on the input time points. The final output can be computed by substituting the attention weights in Equation 3.
298
+
299
+ # A.6 TRAINING DETAILS
300
+
301
+ # A.6.1 DATA GENERATION AND PREPROCESSING
302
+
303
+ All the datasets used in the experiments are publicly available and can be downloaded using the following links:
304
+
305
+ PhysioNet: https://physionet.org/content/challenge-2012/ MIMIC-III: https://mimic.physionet.org/
306
+
307
+ Human Activity: https://archive.ics.uci.edu/ml/datasets/Localization+ Data+for+Person+Activity.
308
+
309
+ We rescale each feature to be between 0 and 1 for Physionet and MIMIC-III dataset. We also rescale the time to be in $[ 0 , 1 ]$ for all datasets. In case of MIMIC-III dataset, for the time series missing entirely, we follow the preprocessing steps of Shukla & Marlin (2019) and assign the starting point (time $\scriptstyle \mathrm { t = } 0$ ) value of the time series to the global mean for that variable.
310
+
311
+ # A.6.2 SOURCE CODE
312
+
313
+ The code for reproducing the results in this paper is available at https://github.com/ reml-lab/mTAN.
314
+
315
+ # A.6.3 COMPUTING INFRASTRUCTURE
316
+
317
+ All experiments were run on a Nvidia Titan X GPU.
parse/train/4c0J6lwQ4_/4c0J6lwQ4__content_list.json ADDED
@@ -0,0 +1,1672 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "MULTI-TIME ATTENTION NETWORKS FOR IRREGULARLY SAMPLED TIME SERIES ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 696,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Satya Narayan Shukla & Benjamin M. Marlin ",
17
+ "bbox": [
18
+ 184,
19
+ 170,
20
+ 509,
21
+ 184
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "College of Information and Computer Sciences University of Massachusetts Amherst Amherst, MA 01003, USA {snshukla,marlin}@cs.umass.edu ",
28
+ "bbox": [
29
+ 184,
30
+ 185,
31
+ 491,
32
+ 239
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "ABSTRACT ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 454,
42
+ 276,
43
+ 544,
44
+ 291
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Irregular sampling occurs in many time series modeling applications where it presents a significant challenge to standard deep learning models. This work is motivated by the analysis of physiological time series data in electronic health records, which are sparse, irregularly sampled, and multivariate. In this paper, we propose a new deep learning framework for this setting that we call MultiTime Attention Networks. Multi-Time Attention Networks learn an embedding of continuous time values and use an attention mechanism to produce a fixed-length representation of a time series containing a variable number of observations. We investigate the performance of this framework on interpolation and classification tasks using multiple datasets. Our results show that the proposed approach performs as well or better than a range of baseline and recently proposed models while offering significantly faster training times than current state-of-the-art methods.1 ",
51
+ "bbox": [
52
+ 233,
53
+ 306,
54
+ 766,
55
+ 472
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 496,
66
+ 336,
67
+ 511
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Irregularly sampled time series occur in application domains including healthcare, climate science, ecology, astronomy, biology and others. It is well understood that irregular sampling poses a significant challenge to machine learning models, which typically assume fully-observed, fixed-size feature representations (Marlin et al., 2012; Yadav et al., 2018). While recurrent neural networks (RNNs) have been widely used to model such data because of their ability to handle variable length sequences, basic RNNs assume regular spacing between observation times as well as alignment of the time points where observations occur for different variables (i.e., fully-observed vectors). In practice, both of these assumptions can fail to hold for real-world sparse and irregularly observed time series. To respond to these challenges, there has been significant progress over the last decade on building and adapting machine learning models that can better capture the structure of irregularly sampled multivariate time series (Li & Marlin, 2015; 2016; Lipton et al., 2016; Futoma et al., 2017; Che et al., 2018; Shukla & Marlin, 2019; Rubanova et al., 2019). ",
74
+ "bbox": [
75
+ 174,
76
+ 526,
77
+ 825,
78
+ 693
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "In this work, we introduce a new model for multivariate, sparse and irregularly sampled time series that we refer to as Multi-Time Attention networks or mTANs. mTANs are fundamentally continuous-time, interpolation-based models. Their primary innovations are the inclusion of a learned continuous-time embedding mechanism coupled with a time attention mechanism that replaces the use of a fixed similarity kernel when forming representation from continuous time inputs. This gives mTANs more representational flexibility than previous interpolation-based models (Shukla & Marlin, 2019). ",
85
+ "bbox": [
86
+ 174,
87
+ 700,
88
+ 825,
89
+ 784
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Our approach re-represents an irregularly sampled time series at a fixed set of reference points. The proposed time attention mechanism uses reference time points as queries and the observed time points as keys. We propose an encoder-decoder framework for end-to-end learning using an mTAN module to interface with given multivariate, sparse and irregularly sampled time series inputs. The encoder takes the irregularly sampled time series as input and produces a fixed-length latent representation over a set of reference points, while the decoder uses the latent representations to produce reconstructions conditioned on the set of observed time points. Learning uses established methods for variational autoencoders (Rezende et al., 2014; Kingma & Welling, 2014). ",
96
+ "bbox": [
97
+ 174,
98
+ 790,
99
+ 825,
100
+ 901
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "The main contributions of the mTAN model framework are: (1) It provides a flexible approach to modeling multivariate, sparse and irregularly sampled time series data (including irregularly sampled time series of partially observed vectors) by leveraging a time attention mechanism to learn temporal similarity from data instead of using fixed kernels. (2) It uses a temporally distributed latent representation to better capture local structure in time series data. (3) It provides interpolation and classification performance that is as good as current state-of-the-art methods or better, while providing significantly reduced training times. ",
107
+ "bbox": [
108
+ 174,
109
+ 103,
110
+ 825,
111
+ 202
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "2 RELATED WORK ",
118
+ "text_level": 1,
119
+ "bbox": [
120
+ 176,
121
+ 227,
122
+ 344,
123
+ 243
124
+ ],
125
+ "page_idx": 1
126
+ },
127
+ {
128
+ "type": "text",
129
+ "text": "An irregularly sampled time series is a time series with irregular time intervals between observations. In the multivariate setting, there can also be a lack of alignment across different variables within the same multivariate time series. Finally, when gaps between observation times are large, the time series is also considered to be sparse. Such data occur in electronic health records (Marlin et al., 2012; Yadav et al., 2018), climate science (Schulz & Stattegger, 1997), ecology (Clark & Bjørnstad, 2004), biology (Ruf, 1999), and astronomy (Scargle, 1982). It is well understood that such data cause significant issues for standard supervised machine learning models that typically assume fully observed, fixed-size feature representations (Marlin et al., 2012). ",
130
+ "bbox": [
131
+ 174,
132
+ 262,
133
+ 825,
134
+ 375
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "A basic approach to dealing with irregular sampling is fixed temporal discretization. For example, Marlin et al. (2012) and Lipton et al. (2016) discretize continuous-time observations into hour-long bins. This has the advantage of simplicity, but requires ad-hoc handling of bins with more than one observation and results in missing data when bins are empty. ",
141
+ "bbox": [
142
+ 176,
143
+ 381,
144
+ 825,
145
+ 436
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "The alternative to temporal discretization is to construct models with the ability to directly use an irregularly sampled time series as input. Che et al. (2018) present several methods based on gated recurrent unit networks (GRUs, Chung et al. (2014)), including an approach that takes as input a sequence consisting of observed values, missing data indicators, and time intervals since the last observation. Pham et al. (2017) proposed to capture time irregularity by modifying the forget gate of an LSTM (Hochreiter & Schmidhuber, 1997), while Neil et al. (2016) introduced a new time gate that regulates access to the hidden and cell state of the LSTM. While these approaches allow the network to handle event-based sequences with irregularly spaced vector-valued observations, they do not support learning directly from vectors that are partially observed, which commonly occurs in the multivariate setting because of lack of alignment of observation times across different variables. ",
152
+ "bbox": [
153
+ 174,
154
+ 443,
155
+ 825,
156
+ 582
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "Another line of work has looked at using observations from the future as well as from the past for interpolation. Yoon et al. (2019) and Yoon et al. (2018) presented an approach based on the multi-directional RNN (M-RNN) that can leverage observations from the relative past and future of a given time point. Shukla & Marlin (2019) proposed the interpolation-prediction network framework, consisting of several semi-parametric RBF interpolation layers that interpolate multivariate, sparse, and irregularly sampled input time series against a set of reference time points while taking into account all observed data in a time series. Horn et al. (2020) proposed a set function-based approach for classifying time-series with irregularly sampled and unaligned observation. ",
163
+ "bbox": [
164
+ 174,
165
+ 589,
166
+ 825,
167
+ 702
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "Chen et al. (2018) proposed a variational auto-encoder model (Kingma & Welling, 2014; Rezende et al., 2014) for continuous time data based on the use of a neural network decoder combined with a latent ordinary differential equation (ODE) model. They model time series data via a latent continuous-time function that is defined via a neural network representation of its gradient field. Building on this, Rubanova et al. (2019) proposed a latent ODE model that uses an ODE-RNN model as the encoder. ODE-RNNs use neural ODEs to model the hidden state dynamics and an RNN to update the hidden state in the presence of a new observation. De Brouwer et al. (2019) proposed GRU-ODE-Bayes, a continuous-time version of the Gated Recurrent Unit (Chung et al., 2014). Instead of the encoder-decoder architecture where the ODE is decoupled from the input processing, GRU-ODE-Bayes provides a tighter integration by interleaving the ODE and the input processing steps. ",
174
+ "bbox": [
175
+ 174,
176
+ 708,
177
+ 825,
178
+ 861
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "text",
184
+ "text": "Several recent approaches have also used attention mechanisms to model irregularly sampled time series (Song et al., 2018; Tan et al., 2020; Zhang et al., 2019) as well as medical concepts (Peng et al., 2019; Cai et al., 2018). Most of these approaches are similar to Vaswani et al. (2017) where they replace the positional encoding with an encoding of time and model sequences using self-attention. ",
185
+ "bbox": [
186
+ 176,
187
+ 867,
188
+ 825,
189
+ 924
190
+ ],
191
+ "page_idx": 1
192
+ },
193
+ {
194
+ "type": "text",
195
+ "text": "However, instead of adding the time encoding to the input representation as in Vaswani et al. (2017), they concatenate it with the input representation. These methods use a fixed time encoding similar to the positional encoding of Vaswani et al. (2017). Xu et al. (2019) learn a functional time representation and concatenate it with the input event embedding to model time-event interactions. ",
196
+ "bbox": [
197
+ 174,
198
+ 103,
199
+ 825,
200
+ 159
201
+ ],
202
+ "page_idx": 2
203
+ },
204
+ {
205
+ "type": "text",
206
+ "text": "Like Xu et al. (2019) and Kazemi et al. (2019), our proposed method learns a time representation. However, instead of concatenating it with the input embedding, our model learns to attend to observations at different time points by computing a similarity weighting using only the time embedding. Our proposed model uses the time embedding as both the queries and keys in the attention formulation. It learns an interpolation over the query time points by attending to the observed values at key time points. Our proposed method is thus similar to kernel-based interpolation, but learning the time attention based similarity kernel gives our model more flexibility compared to methods like that of Shukla & Marlin (2019) that use similarity kernels with fixed functional forms. Another important difference relative to many of these previous methods is that our proposed approach attends only to the observed data dimensions at each time point and hence does not require a separate imputation step to handle vector valued observations with an arbitrary collection of dimensions missing at any given time point. ",
207
+ "bbox": [
208
+ 173,
209
+ 166,
210
+ 826,
211
+ 333
212
+ ],
213
+ "page_idx": 2
214
+ },
215
+ {
216
+ "type": "text",
217
+ "text": "3 THE MULTI-TIME ATTENTION MODULE ",
218
+ "text_level": 1,
219
+ "bbox": [
220
+ 174,
221
+ 354,
222
+ 539,
223
+ 372
224
+ ],
225
+ "page_idx": 2
226
+ },
227
+ {
228
+ "type": "text",
229
+ "text": "In this section, we present the proposed Multi-Time Attention Module (mTAN). The role of this module is to re-represent a sparse and irregularly sampled time series in a fixed-dimensional space. This module uses multiple continuous-time embeddings and attention-based interpolation. We begin by presenting notation followed by the time embedding and attention components. ",
230
+ "bbox": [
231
+ 174,
232
+ 387,
233
+ 825,
234
+ 444
235
+ ],
236
+ "page_idx": 2
237
+ },
238
+ {
239
+ "type": "text",
240
+ "text": "Notation: In the case of a supervised learning task, we let $\\mathcal { D } = \\{ ( \\mathbf { s } _ { n } , y _ { n } ) | n = 1 , . . . , N \\}$ represent a data set containing $N$ data cases. An individual data case consists of a single target value $y _ { n }$ (discrete for classification), as well as a $D$ -dimensional, sparse and irregularly sampled multivariate time series ${ \\bf s } _ { n }$ . Different dimensions $d$ of the multivariate time series can have observations at different times, as well as different total numbers of observations $L _ { d n }$ . Thus, we represent time series $d$ for data case $n$ as a tuple $\\mathbf { s } _ { d n } = ( \\mathbf { t } _ { d n } , \\mathbf { x } _ { d n } )$ where $\\mathbf t _ { d n } = [ t _ { 1 d n } , . . . , t _ { L _ { d n } d n } ]$ is the list of time points at which observations are defined and $\\mathbf { x } _ { d n } = [ x _ { 1 d n } , . . . , x _ { L _ { d n } d n } ]$ is the corresponding list of observed values. In the case of an unsupervised task such as interpolation, each data case consists of a multivariate time series ${ \\bf s } _ { n }$ only. We drop the data case index $n$ for brevity when the context is clear. ",
241
+ "bbox": [
242
+ 173,
243
+ 450,
244
+ 825,
245
+ 577
246
+ ],
247
+ "page_idx": 2
248
+ },
249
+ {
250
+ "type": "text",
251
+ "text": "Time Embedding: Time attention module is based on embedding continuous time points into a vector space. We generalize the notion of a positional encoding used in transformer-based models to continuous time. Time attention networks simultaneously leverage $H$ embedding functions $\\phi _ { h } ( t )$ , each outputting a representation of size $d _ { r }$ . Dimension $i$ of embedding $h$ is defined as follows: ",
252
+ "bbox": [
253
+ 174,
254
+ 583,
255
+ 825,
256
+ 638
257
+ ],
258
+ "page_idx": 2
259
+ },
260
+ {
261
+ "type": "equation",
262
+ "img_path": "images/a89644ca12db2bab18e1fb47fc10be79d20597df5d49d1d5d806ba012f5a6437.jpg",
263
+ "text": "$$\n\\phi _ { h } ( t ) [ i ] = \\left\\{ \\begin{array} { l l } { \\omega _ { 0 h } \\cdot t + \\alpha _ { 0 h } , } & { \\qquad \\mathrm { i f } \\quad i = 0 } \\\\ { \\sin ( \\omega _ { i h } \\cdot t + \\alpha _ { i h } ) , } & { \\qquad \\mathrm { i f } \\quad 0 < i < d _ { r } } \\end{array} \\right.\n$$",
264
+ "text_format": "latex",
265
+ "bbox": [
266
+ 308,
267
+ 659,
268
+ 673,
269
+ 694
270
+ ],
271
+ "page_idx": 2
272
+ },
273
+ {
274
+ "type": "text",
275
+ "text": "where the $\\omega _ { i h }$ ’s and $\\alpha _ { i h }$ ’s are learnable parameters. The periodic terms can capture periodicity in time series data. In this case, $\\omega _ { i h }$ and $\\alpha _ { i h }$ represent the frequency and phase of the sine function. The linear term, on the other hand, can capture non-periodic patterns dependent on the progression of time. For a given difference $\\Delta$ , $\\phi _ { h } ( t + \\Delta )$ can be represented as a linear function of $\\phi _ { h } ( t )$ . ",
276
+ "bbox": [
277
+ 174,
278
+ 700,
279
+ 825,
280
+ 757
281
+ ],
282
+ "page_idx": 2
283
+ },
284
+ {
285
+ "type": "text",
286
+ "text": "Learning the periodic time embedding functions is equivalent to using a one-layer fully connected network with a sine function non-linearity to map the time values into a higher dimensional space. By contrast, the positional encoding used in transformer models is defined only for discrete positions. We note that our time embedding functions subsume positional encodings when evaluated at discrete positions. ",
287
+ "bbox": [
288
+ 173,
289
+ 762,
290
+ 825,
291
+ 833
292
+ ],
293
+ "page_idx": 2
294
+ },
295
+ {
296
+ "type": "text",
297
+ "text": "Multi-Time Attention: The time embedding component described above takes a continuous time point and embeds it into $H$ different $d _ { r }$ -dimensional spaces. In this section, we describe how we leverage time embeddings to produce a continuous-time embedding module for sparse and irregularly sampled time series. This multi-time attention embedding module $\\operatorname { m T A N } ( t , \\mathbf { s } )$ takes as input a query time point $t$ and a set of keys and values in the form of a $D$ -dimensional multivariate sparse and irregularly sampled time series s (as defined in the notation section above), and returns a $J$ - dimensional embedding at time $t$ . This process leverages a continuous-time attention mechanism applied to the $H$ time embeddings. The complete computation is described below. ",
298
+ "bbox": [
299
+ 174,
300
+ 839,
301
+ 825,
302
+ 924
303
+ ],
304
+ "page_idx": 2
305
+ },
306
+ {
307
+ "type": "image",
308
+ "img_path": "images/a87c991484beceef168bab4459c1596129ee6ddf4ce2bc560c45e15308a9c604.jpg",
309
+ "image_caption": [
310
+ "Figure 1: Architecture of the mTAND module. It takes irregularly sampled time points and corresponding values as keys and values and produces a fixed dimensional representation at the query time points. The attention blocks (ATT) perform a scaled dot product attention over the observed values using the time embedding of the query and key time points. Equation 3 and 4 defines this operation. Note that the output at all query points can be computed in parallel. "
311
+ ],
312
+ "image_footnote": [],
313
+ "bbox": [
314
+ 267,
315
+ 106,
316
+ 696,
317
+ 268
318
+ ],
319
+ "page_idx": 3
320
+ },
321
+ {
322
+ "type": "text",
323
+ "text": "",
324
+ "bbox": [
325
+ 171,
326
+ 377,
327
+ 823,
328
+ 406
329
+ ],
330
+ "page_idx": 3
331
+ },
332
+ {
333
+ "type": "equation",
334
+ "img_path": "images/6836f19b1faa27014336a48cbfe1de20efb7399f72239feba0a3ea9bbda65b69.jpg",
335
+ "text": "$$\n\\begin{array} { r l } & { \\mathrm { m T A N } ( t , \\mathbf { s } ) [ j ] = \\displaystyle \\sum _ { h = 1 } ^ { H } \\sum _ { d = 1 } ^ { D } \\hat { x } _ { h d } ( t , \\mathbf { s } ) \\cdot U _ { h d j } } \\\\ & { \\quad \\quad \\quad \\hat { x } _ { h d } ( t , \\mathbf { s } ) = \\displaystyle \\sum _ { i = 1 } ^ { L _ { d } } \\kappa _ { h } ( t , t _ { i d } ) x _ { i d } } \\\\ & { \\quad \\quad \\quad \\kappa _ { h } ( t , t _ { i d } ) = \\displaystyle \\frac { \\exp \\big ( \\phi _ { h } ( t ) \\mathbf { w v } ^ { T } \\phi _ { h } ( t _ { i d } ) ^ { T } / \\sqrt { d _ { k } } \\big ) } { \\sum _ { i ^ { \\prime } = 1 } ^ { L _ { d } } \\exp \\big ( \\phi _ { h } ( t ) \\mathbf { w v } ^ { T } \\phi _ { h } ( t _ { i ^ { \\prime } d } ) ^ { T } / \\sqrt { d _ { k } } \\big ) } } \\end{array}\n$$",
336
+ "text_format": "latex",
337
+ "bbox": [
338
+ 305,
339
+ 410,
340
+ 691,
341
+ 541
342
+ ],
343
+ "page_idx": 3
344
+ },
345
+ {
346
+ "type": "text",
347
+ "text": "As shown in Equation 2, dimension $j$ of the mTAN embedding $\\mathrm { m T A N } ( t , \\mathbf { s } ) [ j ]$ is given by a linear combination of intermediate univariate continuous-time functions ${ \\hat { x } } _ { h d } ( t , \\mathbf { s } )$ . There is one such function defined for each input data dimension $d$ and each time embedding $h$ . The parameters $U _ { h d j }$ are learnable linear combination weights. ",
348
+ "bbox": [
349
+ 174,
350
+ 551,
351
+ 825,
352
+ 608
353
+ ],
354
+ "page_idx": 3
355
+ },
356
+ {
357
+ "type": "text",
358
+ "text": "As shown in Equation 3, the structure of the intermediate continuous-time function ${ \\hat { x } } _ { h d } ( t , \\mathbf { s } )$ is essentially a kernel smoother applied to the $d ^ { t h }$ dimension of the time series. However, the interpolation weights $\\kappa _ { h } ( t , t _ { i d } )$ are defined based on a time attention mechanism that leverages time embeddings, as shown in Equation 4. As we can see, the same time embedding function $\\phi _ { h } ( t )$ is applied for all data dimensions. The form of the attention mechanism is a softmax function over the observed time points $t _ { i d }$ for dimension $d$ . The activation within the softmax is a scaled inner product between the time embedding $\\phi _ { h } ( t )$ of the query time point $t$ and the time embedding $\\phi _ { h } ( t _ { i d } )$ of the observed time point, the key. The parameters $\\mathbf { w }$ and $\\mathbf { v }$ are each $d _ { r } \\times d _ { k }$ matrices where $d _ { k } \\leq d _ { r }$ . We use a scaling factor $\\frac { 1 } { \\sqrt { d _ { k } } }$ to normalize the dot product to counteract the growth in the dot product magnitude with increase in the dimension $d _ { k }$ . ",
359
+ "bbox": [
360
+ 174,
361
+ 614,
362
+ 825,
363
+ 756
364
+ ],
365
+ "page_idx": 3
366
+ },
367
+ {
368
+ "type": "text",
369
+ "text": "Learning the time embeddings provides our model with flexibility to learn complex temporal kernel functions $\\kappa _ { h } ( t , t ^ { \\prime } )$ . The use of multiple simultaneous time embeddings $\\phi _ { h } ( t )$ and a final linear combination across time embedding dimensions and data dimensions means that the final output representation function $\\operatorname { m T A N } ( t , \\mathbf { s } )$ is extremely flexible. Different input dimensions can leverage different time embeddings via learned sparsity patterns in the parameter tensor $U$ . Information from different data dimensions can also be mixed together to create compact reduced dimensional representations. We note that all of the required computations can be parallelized using masking variables to deal with unobserved dimensions, allowing for efficient implementation on a GPU. ",
370
+ "bbox": [
371
+ 174,
372
+ 762,
373
+ 825,
374
+ 875
375
+ ],
376
+ "page_idx": 3
377
+ },
378
+ {
379
+ "type": "text",
380
+ "text": "Discretization: Since the mTAN module defines a continuous function of $t$ given s, it can not be directly incorporated into neural network architectures that expect inputs in the form of fixeddimensional vectors or discrete sequences. However, the mTAN module can easily be adapted to produce such an output representation by materializing its output at a set of reference time points $\\mathbf { \\bar { r } } = [ r _ { 1 } , . . . , r _ { K } ]$ . In some cases, we may have a fixed set of such points. In other cases, the set of reference time points may need to depend on s itself. In particular, we define the auxiliary function $\\rho ( \\mathbf { s } )$ to return the set of time points at which there is an observation on any dimension of s. ",
381
+ "bbox": [
382
+ 176,
383
+ 882,
384
+ 825,
385
+ 924
386
+ ],
387
+ "page_idx": 3
388
+ },
389
+ {
390
+ "type": "image",
391
+ "img_path": "images/836a038430dc881ef5ca17b0bb71a235eeebf044b03173b30b0b9a56b13ed006.jpg",
392
+ "image_caption": [
393
+ "Figure 2: Architecture of the proposed encoder-decoder framework mTAND-Full. The classifier is required only for performing classification tasks. The mTAND module is shown in Figure 1. "
394
+ ],
395
+ "image_footnote": [],
396
+ "bbox": [
397
+ 215,
398
+ 99,
399
+ 789,
400
+ 358
401
+ ],
402
+ "page_idx": 4
403
+ },
404
+ {
405
+ "type": "text",
406
+ "text": "",
407
+ "bbox": [
408
+ 174,
409
+ 430,
410
+ 825,
411
+ 486
412
+ ],
413
+ "page_idx": 4
414
+ },
415
+ {
416
+ "type": "text",
417
+ "text": "Given a collection of reference time points $\\mathbf { r }$ , we define the discretized mTAN module $\\mathrm { m T A N D } ( \\mathbf { r } , \\mathbf { s } )$ as $\\mathrm { m T A N D } ( \\mathbf { r } , \\mathbf { s } ) [ i ] = \\mathrm { m T A N } ( r _ { i } , \\mathbf { s } )$ . This module takes as input the set of reference time points $\\mathbf { r }$ and the time series s and outputs a sequence of mTAN embeddings of length $| \\mathbf { r } |$ , each of dimension $J$ . The architecture of the mTAND module is shown in Figure 1. The mTAND module can be used to interface sparse and irregularly sampled multivariate time series data with any deep neural network layer type including fully-connected, recurrent, and convolutional layers. In the next section, we describe the construction of a temporal encoder-decoder architecture leveraging the mTAND module, which can be applied to both classification and interpolation tasks. ",
418
+ "bbox": [
419
+ 174,
420
+ 492,
421
+ 825,
422
+ 604
423
+ ],
424
+ "page_idx": 4
425
+ },
426
+ {
427
+ "type": "text",
428
+ "text": "4 ENCODER-DECODER FRAMEWORK ",
429
+ "text_level": 1,
430
+ "bbox": [
431
+ 174,
432
+ 630,
433
+ 496,
434
+ 646
435
+ ],
436
+ "page_idx": 4
437
+ },
438
+ {
439
+ "type": "text",
440
+ "text": "As described in the last section, we leverage the discretized mTAN module in an encoder-decoder framework as the primary model in this paper, which we refer to as an mTAN network. We develop the encoder-decoder framework within the variational autoencoder (VAE) framework in this section. The architecture for the model framework is shown in Figure 2. ",
441
+ "bbox": [
442
+ 174,
443
+ 664,
444
+ 825,
445
+ 720
446
+ ],
447
+ "page_idx": 4
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "Model Architecture: As we are modeling time series data, we begin by defining a sequence of latent states $\\mathbf { z } _ { i }$ . Each of these latent states are IID-distributed according to a standard multivariate normal distribution $p ( \\mathbf { z } _ { i } )$ . We define the set of latent states ${ \\bf z } = [ { \\bf z } _ { 1 } , . . . , { \\bf z } _ { K } ]$ at $K$ reference time points. ",
452
+ "bbox": [
453
+ 174,
454
+ 728,
455
+ 821,
456
+ 771
457
+ ],
458
+ "page_idx": 4
459
+ },
460
+ {
461
+ "type": "text",
462
+ "text": "We define a three-stage decoder. First, the latent states are processed through an RNN decoder $\\mathbf { h } _ { R N N } ^ { d e c } = [ \\mathbf { h } _ { 1 , R N N } ^ { d e c } , . . . , \\mathbf { h } _ { K , R N N } ^ { d e c } ]$ ndencies resulting in a first set of deterministic latent v. Second, the output of the RNN decoder stage and the $K$ ablestime points $\\mathbf { h } _ { R N N } ^ { d e c }$ are provided to the mTAND module along with a set of $T$ query time points t. The mTAND module outputs a sequence of embeddings $\\mathbf { h } _ { T A N } ^ { d e c } = [ \\mathbf { h } _ { 1 , T A N } ^ { d e c } , . . . , \\mathbf { h } _ { T , T A N } ^ { d e c } ]$ of length |t|. Third, the mTAN embeddings are independently decoded using a fully connected decoder $f ^ { d e c } ( )$ and the result is used to parameterize an output distribution. In this work, we use a diagonal covariance Gaussian distribution with mean given by the final decoded representation and a fixed variance $\\sigma ^ { 2 }$ . The final generated time series is given by $\\hat { \\bf s } = ( { \\bf t } , { \\bf x } )$ with all data dimensions observed. The full generative process is shown below. We let $p _ { \\theta } ( \\mathbf { x } | \\mathbf { z } , \\mathbf { t } )$ define the probability distribution over the values of the time series $\\mathbf { x }$ given the time points $\\mathbf { t }$ and the latent variables z. $\\theta$ represents the parameters of all components of the decoder. ",
463
+ "bbox": [
464
+ 173,
465
+ 776,
466
+ 825,
467
+ 924
468
+ ],
469
+ "page_idx": 4
470
+ },
471
+ {
472
+ "type": "text",
473
+ "text": "",
474
+ "bbox": [
475
+ 171,
476
+ 103,
477
+ 823,
478
+ 132
479
+ ],
480
+ "page_idx": 5
481
+ },
482
+ {
483
+ "type": "equation",
484
+ "img_path": "images/0c1ead94ca09ba12cabeeaa9d82472cb7acd8ba389e2d5de2612ee55a988ca3e.jpg",
485
+ "text": "$$\n\\begin{array} { r l } & { \\quad \\mathbf { z } _ { k } \\sim p ( \\mathbf { z } _ { k } ) } \\\\ & { \\quad \\mathbf { h } _ { R N N } ^ { d e c } = \\mathrm { R N N } ^ { d e c } ( \\mathbf { z } ) } \\\\ & { \\quad \\mathbf { h } _ { T A N } ^ { d e c } = \\mathrm { m T A N D } ^ { d e c } ( \\mathbf { t } , \\mathbf { h } _ { R N N } ^ { d e c } ) } \\\\ & { \\quad \\quad \\quad x _ { i d } \\sim \\mathcal { N } ( x _ { i d } ; f ^ { d e c } ( \\mathbf { h } _ { i , T A N } ^ { d e c } ) [ d ] , \\sigma ^ { 2 } I ) } \\end{array}\n$$",
486
+ "text_format": "latex",
487
+ "bbox": [
488
+ 361,
489
+ 157,
490
+ 635,
491
+ 242
492
+ ],
493
+ "page_idx": 5
494
+ },
495
+ {
496
+ "type": "text",
497
+ "text": "For an encoder, we simply invert the structure of the generative process. We begin by mapping the input time series s through the mTAND module along with a collection of $K$ reference time points $\\mathbf { r }$ . We apply an RNN encoder to the mTAND model that outputs $\\mathbf { h } _ { T A N } ^ { e n c }$ to encode longer-range temporal structure. Finally, we construct a distribution over latent variables at each reference time point using the RNN outputs to be the distribu a diagonal Gaussian distribution with mean and variance output by fully connected layers applied to $\\mathbf { h } _ { R N N } ^ { e n c }$ . The complete encoder architecture is described below. We define er the latent variables induced by the input time series s and the $q _ { \\gamma } ( \\mathbf { z } | \\mathbf { r } , \\mathbf { s } )$ time points $\\mathbf { r }$ . $\\gamma$ represents all of the parameters in all of the encoder components. ",
498
+ "bbox": [
499
+ 173,
500
+ 244,
501
+ 826,
502
+ 358
503
+ ],
504
+ "page_idx": 5
505
+ },
506
+ {
507
+ "type": "equation",
508
+ "img_path": "images/daae8826de68051cf1f587536485460aba9eab4e14c8c53cbb3d5ee344c87ae2.jpg",
509
+ "text": "$$\n\\begin{array} { c } { { { \\bf h } _ { T A N } ^ { e n c } = { \\bf m } \\mathrm { T A N D } ^ { e n c } ( { \\bf r } , { \\bf s } ) } } \\\\ { { { \\bf h } _ { R N N } ^ { e n c } = { \\bf R } { \\bf N } \\mathrm { N } ^ { e n c } ( { \\bf h } _ { T A N } ^ { e n c } ) } } \\\\ { { { \\bf z } _ { k } \\sim q _ { \\gamma } ( { \\bf z } _ { k } | { \\pmb { \\mu } } _ { k } , \\sigma _ { k } ^ { 2 } ) , ~ { \\pmb { \\mu } } _ { k } = f _ { \\mu } ^ { e n c } ( { \\bf h } _ { k , R N N } ^ { e n c } ) , ~ \\sigma _ { k } ^ { 2 } = \\exp ( f _ { \\sigma } ^ { e n c } ( { \\bf h } _ { k , R N N } ^ { e n c } ) ) } } \\end{array}\n$$",
510
+ "text_format": "latex",
511
+ "bbox": [
512
+ 254,
513
+ 363,
514
+ 741,
515
+ 422
516
+ ],
517
+ "page_idx": 5
518
+ },
519
+ {
520
+ "type": "text",
521
+ "text": "Unsupervised Learning: To learn the parameters of our encoder-decoder model given a data set of sparse and irregularly sampled time series, we follow a slightly modified VAE training approach and maximize a normalized variational lower bound on the log marginal likelihood based on the evidence lower bound or ELBO. The learning objective is defined below where $p _ { \\theta } ( x _ { j d n } | \\mathbf { z } , \\mathbf { t } _ { n } )$ and $q _ { \\gamma } ( \\mathbf { z } | \\mathbf { r } , \\mathbf { s } _ { n } )$ are defined in the previous section. ",
522
+ "bbox": [
523
+ 176,
524
+ 433,
525
+ 825,
526
+ 503
527
+ ],
528
+ "page_idx": 5
529
+ },
530
+ {
531
+ "type": "equation",
532
+ "img_path": "images/1e988f63ad8f3c1a2429df5f861a87e2f58c4b12f2bb481217fbd10a48a09d67.jpg",
533
+ "text": "$$\n\\begin{array} { l } { \\displaystyle \\mathcal { L } _ { \\mathrm { N V A E } } ( \\theta , \\gamma ) = \\sum _ { n = 1 } ^ { N } \\frac { 1 } { \\sum _ { d } L _ { d n } } \\Big ( \\mathbb { E } _ { q _ { \\gamma } ( \\mathbf { z } | \\mathbf { r } , \\mathbf { s } _ { n } ) } [ \\log p _ { \\theta } ( \\mathbf { x } _ { n } | \\mathbf { z } , \\mathbf { t } _ { n } ) ] - D _ { \\mathrm { K L } } ( q _ { \\gamma } ( \\mathbf { z } | \\mathbf { r } , \\mathbf { s } _ { n } ) | | p ( \\mathbf { z } ) ) \\Big ) } \\\\ { \\displaystyle D _ { \\mathrm { K L } } ( q _ { \\gamma } ( \\mathbf { z } | \\mathbf { r } , \\mathbf { s } _ { n } ) | | p ( \\mathbf { z } ) ) = \\sum _ { i = 1 } ^ { K } D _ { \\mathrm { K L } } ( q _ { \\gamma } ( \\mathbf { z } _ { i } | \\mathbf { r } , \\mathbf { s } _ { n } ) | | p ( \\mathbf { z } _ { i } ) ) } \\\\ { \\displaystyle \\log p _ { \\theta } ( \\mathbf { x } _ { n } | \\mathbf { z } , \\mathbf { t } _ { n } ) = \\sum _ { d = 1 } ^ { D } \\sum _ { j = 1 } ^ { L _ { d n } } \\log p _ { \\theta } ( x _ { j d n } | \\mathbf { z } , t _ { j d n } ) } \\end{array}\n$$",
534
+ "text_format": "latex",
535
+ "bbox": [
536
+ 196,
537
+ 508,
538
+ 772,
539
+ 645
540
+ ],
541
+ "page_idx": 5
542
+ },
543
+ {
544
+ "type": "text",
545
+ "text": "Since irregularly sampled time series can have different numbers of observations across different dimensions as well as across different data cases, it can be helpful to normalize the terms in the standard ELBO objective to avoid the model focusing more on sequences that are longer at the expense of sequences that are shorter. The objective above normalizes the contribution of each data case by the total number of observations it contains. The fact that all data dimensions are not observed at all time points is accounted for in Equation 14. In practice, we use $k$ samples from the variational distribution $q _ { \\gamma } ( \\mathbf { z } | \\mathbf { r } , \\mathbf { s } _ { n } )$ to compute the learning objective. ",
546
+ "bbox": [
547
+ 173,
548
+ 655,
549
+ 825,
550
+ 755
551
+ ],
552
+ "page_idx": 5
553
+ },
554
+ {
555
+ "type": "text",
556
+ "text": "Supervised Learning: We can also augment the encoder-decoder model with a supervised learning component that leverages the latent states as a feature extractor. We define this component to be of the form $p _ { \\delta } ( y _ { n } | \\mathbf { z } )$ where $\\delta$ are the model parameters. This leads to an augmented learning objective as shown in Equation 15 where the $\\lambda$ term trades off the supervised and unsupervised terms. ",
557
+ "bbox": [
558
+ 173,
559
+ 761,
560
+ 825,
561
+ 816
562
+ ],
563
+ "page_idx": 5
564
+ },
565
+ {
566
+ "type": "equation",
567
+ "img_path": "images/867e6cf8dfee2da742bb8d37d0ce75f732d90924f4a65cb76e993e3cbf374fe5.jpg",
568
+ "text": "$$\n\\mathcal { L } _ { \\mathrm { s u p e r v i s e d } } ( \\theta , \\gamma , \\delta ) = \\mathcal { L } _ { \\mathrm { N V A E } } ( \\theta , \\gamma ) + \\lambda \\mathbb { E } _ { q _ { \\gamma } ( \\mathbf { z } | \\mathbf { r } , \\mathbf { s } _ { n } ) } \\log p _ { \\delta } ( y _ { n } | \\mathbf { z } )\n$$",
569
+ "text_format": "latex",
570
+ "bbox": [
571
+ 297,
572
+ 824,
573
+ 699,
574
+ 843
575
+ ],
576
+ "page_idx": 5
577
+ },
578
+ {
579
+ "type": "text",
580
+ "text": "In this work, we focus on classification as an illustrative supervised learning problem. For the classification model $p _ { \\delta } ( y _ { n } | \\mathbf { z } )$ , we use a GRU followed by a 2-layer fully connected network. We use a small number of samples to approximate the required intractable expectations during both learning and prediction. Predictions are computed by marginalizing over the latent variable as shown below. ",
581
+ "bbox": [
582
+ 173,
583
+ 848,
584
+ 825,
585
+ 904
586
+ ],
587
+ "page_idx": 5
588
+ },
589
+ {
590
+ "type": "equation",
591
+ "img_path": "images/2e7f2e94a2172f4505b435b60b66d9ec3b9101781823c30b3d88bbf129e5bdb4.jpg",
592
+ "text": "$$\ny ^ { * } = \\underset { y \\in \\mathcal { V } } { \\arg \\operatorname* { m a x } } ~ \\mathbb { E } _ { q _ { \\gamma } ( \\mathbf { z } | \\mathbf { r } , \\mathbf { s } ) } [ \\log p _ { \\delta } ( y | \\mathbf { z } ) ]\n$$",
593
+ "text_format": "latex",
594
+ "bbox": [
595
+ 374,
596
+ 910,
597
+ 622,
598
+ 936
599
+ ],
600
+ "page_idx": 5
601
+ },
602
+ {
603
+ "type": "text",
604
+ "text": "5 EXPERIMENTS ",
605
+ "text_level": 1,
606
+ "bbox": [
607
+ 174,
608
+ 102,
609
+ 326,
610
+ 117
611
+ ],
612
+ "page_idx": 6
613
+ },
614
+ {
615
+ "type": "text",
616
+ "text": "In this section, we present interpolation and classification experiments using a range of models and three real-world data sets (Physionet Challenge 2012, MIMIC-III, and a Human Activity dataset). Additional illustrative results on synthetic data can be found in Appendix A.2. ",
617
+ "bbox": [
618
+ 174,
619
+ 137,
620
+ 825,
621
+ 179
622
+ ],
623
+ "page_idx": 6
624
+ },
625
+ {
626
+ "type": "text",
627
+ "text": "Datasets: The PhysioNet Challenge 2012 dataset (Silva et al., 2012) consists of multivariate time series data with 37 variables extracted from intensive care unit (ICU) records. Each record contains sparse and irregularly spaced measurements from the first 48 hours after admission to ICU. We follow the procedures of Rubanova et al. (2019) and round the observation times to the nearest minute. This leads to 2880 possible measurement times per time series. The data set includes 4000 labeled instances and 4000 unlabeled instances. We use all 8000 instances for interpolation experiments and the 4000 labeled instances for classification experiments. We focus on predicting in-hospital mortality. $1 3 . 8 \\%$ of examples are in the positive class. ",
628
+ "bbox": [
629
+ 174,
630
+ 185,
631
+ 825,
632
+ 297
633
+ ],
634
+ "page_idx": 6
635
+ },
636
+ {
637
+ "type": "text",
638
+ "text": "The MIMIC-III data set (Johnson et al., 2016) is a multivariate time series dataset consisting of sparse and irregularly sampled physiological signals collected at Beth Israel Deaconess Medical Center from 2001 to 2012. Following the procedures of Shukla & Marlin (2019), we extract 53, 211 records each containing 12 physiological variables. We focus on predicting in-hospital mortality using the first 48 hours of data. $\\dot { 8 } . 1 \\%$ of the instances have positive labels. ",
639
+ "bbox": [
640
+ 174,
641
+ 304,
642
+ 825,
643
+ 375
644
+ ],
645
+ "page_idx": 6
646
+ },
647
+ {
648
+ "type": "text",
649
+ "text": "The human activity dataset consists of 3D positions of the waist, chest and ankles collected from five individuals performing various activities including walking, sitting, lying, standing, etc. We follow the data preprocessing steps of Rubanova et al. (2019) and construct a dataset of 6, 554 sequences with 12 channels and 50 time points. We focus on classifying each time point in the sequence into one of eleven types of activities. ",
650
+ "bbox": [
651
+ 174,
652
+ 381,
653
+ 823,
654
+ 450
655
+ ],
656
+ "page_idx": 6
657
+ },
658
+ {
659
+ "type": "text",
660
+ "text": "Experimental Protocols: We conduct interpolation experiments using the 8000 data cases in the PhysioNet data set. We randomly divide the data set into a training set containing $80 \\%$ of the instances, and a test set containing the remaining $20 \\%$ of instances. We use $20 \\%$ of the training data for validation. In the interpolation task, we condition on a subset of available points and predict values for rest of the time points. We perform interpolation experiments with a varying percentage of observed points ranging from $5 0 \\%$ to $\\bar { 9 } 0 \\%$ of the available points. At test time, the values of observed points are conditioned on and each model is used to infer the values at rest of the available time points in the test instance. We repeat each experiment five times using different random seeds to initialize the model parameters. We assess performance using mean squared error (MSE). ",
661
+ "bbox": [
662
+ 174,
663
+ 457,
664
+ 825,
665
+ 583
666
+ ],
667
+ "page_idx": 6
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "We use the labeled data in all three data sets to conduct classification experiments. The PhysioNet and MIMIC III problems are whole time series classification problems. Note that for the human activity dataset, we classify each time point in the time series. We treat this as a smoothing problem and condition on all available observations when producing the classification at each time-point (similar to labeling in a CRF). We use bidirectional RNNs as the RNN-based baselines for the human activity dataset. We randomly divide each data set into a training set containing $80 \\%$ of the time series, and a test set containing the remaining $20 \\%$ of instances. We use $20 \\%$ of the training set for validation. We repeat each experiment five times using different random seeds to initialize the model parameters. Due to class imbalance in the Physionet and MIMIC-III data sets, we assess classification performance using area under the ROC curve (the AUC score). For the Human Activity dataset, we evaluate models using accuracy. ",
672
+ "bbox": [
673
+ 174,
674
+ 589,
675
+ 825,
676
+ 742
677
+ ],
678
+ "page_idx": 6
679
+ },
680
+ {
681
+ "type": "text",
682
+ "text": "For both interpolation and prediction, we select hyper-parameters on the held-out validation set using grid search, and then apply the best trained model to the test set. The hyper-parameter ranges searched for each model/dataset/task are fully described in Appendix A.4. ",
683
+ "bbox": [
684
+ 174,
685
+ 750,
686
+ 825,
687
+ 791
688
+ ],
689
+ "page_idx": 6
690
+ },
691
+ {
692
+ "type": "text",
693
+ "text": "Models: The model we focus on is the encoder-decoder architecture based on the discretized multitime attention module (mTAND-Full). In the classification experiments, the hidden state at the last observed point is passed to a two-layer binary classification module for all models. For each data set, the structure of this classifier is the same for all models. For the proposed model, the sequence of latent states is first passed through a GRU and then the final hidden state is passed through the same classification module. For the classification task only, we consider an ablation of the full model that uses the proposed mTAND encoder, which consists of our mTAND module followed by a GRU to extract a final hidden state, which is then passed to the classification module (mTAND-Enc). We compare to several deep learning models that expand on recurrent networks to accommodate irregular sampling. We also compare to several encoder-decoder approaches. The full list of model variants is briefly described below. We use a Gated Recurrent Unit (GRU) (Chung et al., 2014) module as the recurrent network throughout. Architecture details can be found in Appendix A.3. ",
694
+ "bbox": [
695
+ 173,
696
+ 797,
697
+ 825,
698
+ 924
699
+ ],
700
+ "page_idx": 6
701
+ },
702
+ {
703
+ "type": "table",
704
+ "img_path": "images/775545ad1a32ec32f7f979e152787279b779f1bcae806884d64caeaf86a985ac.jpg",
705
+ "table_caption": [
706
+ "Table 1: Interpolation performance versus percent observed time points on PhysioNet "
707
+ ],
708
+ "table_footnote": [],
709
+ "table_body": "<table><tr><td>Model</td><td colspan=\"5\">Mean Squared Error(×10-³)</td></tr><tr><td>RNN-VAE</td><td>13.418 ± 0.008</td><td>12.594± 0.004</td><td>11.887 ± 0.005</td><td>11.133 ± 0.007</td><td>11.470 ± 0.006</td></tr><tr><td>L-ODE-RNN</td><td>8.132 ±0.020</td><td>8.140 ± 0.018</td><td>8.171 ±0.030</td><td>8.143 ±0.025</td><td>8.402 ±0.022</td></tr><tr><td>L-ODE-ODE</td><td>6.721 ±0.109</td><td>6.816± 0.045</td><td>6.798 ±0.143</td><td>6.850 ± 0.066</td><td>7.142 ± 0.066</td></tr><tr><td>mTAND-Full</td><td>4.139 ± 0.029</td><td>4.018 ± 0.048</td><td>4.157 ± 0.053</td><td>4.410 ± 0.149</td><td>4.798 ± 0.036</td></tr><tr><td>Observed %</td><td>50%</td><td>60%</td><td>70%</td><td>80%</td><td>90%</td></tr></table>",
710
+ "bbox": [
711
+ 199,
712
+ 127,
713
+ 797,
714
+ 212
715
+ ],
716
+ "page_idx": 7
717
+ },
718
+ {
719
+ "type": "text",
720
+ "text": "",
721
+ "bbox": [
722
+ 174,
723
+ 237,
724
+ 825,
725
+ 280
726
+ ],
727
+ "page_idx": 7
728
+ },
729
+ {
730
+ "type": "text",
731
+ "text": "• RNN-Impute: Missing observations replaced with weighted average of last observed measurement within that time series and global mean of the variable across training examples (Che et al., 2018). \n• RNN- $\\Delta _ { t }$ : Input is concatenated with masking variable and time interval $\\Delta _ { t }$ indicating how long the particular variable is missing. \n• RNN-Decay: RNN with exponential decay on hidden states (Mozer et al., 2017; Che et al., 2018). \n• GRU-D: combining hidden state decay with input decay (Che et al., 2018). \n• Phased-LSTM: Captures time irregularity by a time gate that regulates access to the hidden and cell state of the LSTM (Neil et al., 2016) with forward filling to handle partially observed vectors. \n• IP-Nets: Interpolation prediction networks, which use several semi-parametric RBF interpolation layers, followed by a GRU (Shukla & Marlin, 2019). \n• SeFT: Uses a set function based approach where all the observations are modeled individually before pooling them together using an attention based approach (Horn et al., 2020). \n• RNN-VAE: A VAE-based model where the encoder and decoder are standard RNN models. \n• ODE-RNN: Uses neural ODEs to model hidden state dynamics and an RNN to update the hidden state in presence of a new observation (Rubanova et al., 2019). \n• L-ODE-RNN: Latent ODE where the encoder is an RNN and decoder is a neural ODE (Chen et al., 2018). \n• L-ODE-ODE: Latent ODE where the encoder is an ODE-RNN and decoder is a neural ODE (Rubanova et al., 2019). ",
732
+ "bbox": [
733
+ 171,
734
+ 291,
735
+ 828,
736
+ 612
737
+ ],
738
+ "page_idx": 7
739
+ },
740
+ {
741
+ "type": "text",
742
+ "text": "Physionet Experiments: Table 1 compares the performance of all methods on the interpolation task where we observe $5 0 \\% - 9 0 \\%$ of the values in the test instances. As we can see, the proposed method (mTAND-Full) consistently and substantially outperforms all of the previous approaches across all of the settings of observed time points. We note that in this experiment, different columns correspond to different setting (for example, in the case of $7 0 \\%$ , we condition on $7 0 \\%$ of data and predict the rest of the data; i.e., $3 0 \\%$ ) and, hence the results across columns are not comparable. ",
743
+ "bbox": [
744
+ 173,
745
+ 623,
746
+ 825,
747
+ 708
748
+ ],
749
+ "page_idx": 7
750
+ },
751
+ {
752
+ "type": "text",
753
+ "text": "Table 2 compares predictive performance on the PhysioNet mortality prediction task. The full Multi-Time Attention network model (mTAND-Full) and the classifier based only on the Multi-Time Attention network encoder (mTAND-Enc) achieve significantly improved performance relative to the current state-of-the-art methods (ODE-RNN and L-ODE-ODE) and other baseline methods. ",
754
+ "bbox": [
755
+ 174,
756
+ 714,
757
+ 825,
758
+ 770
759
+ ],
760
+ "page_idx": 7
761
+ },
762
+ {
763
+ "type": "text",
764
+ "text": "We also report the time per epoch in minutes for all the methods. We note that the ODE-based models require substantially more run time than other methods due to the required use of an ODE solver (Chen et al., 2018; Rubanova et al., 2019). These methods also require taking the union of all observation time points in a batch, which further slows down the training process. As we can see, the proposed full Multi-Time Attention network (mTAND-Full) is over 85 times faster than ODE-RNN and over 100 times faster than L-ODE-ODE, the best-performing ODE-based models. ",
765
+ "bbox": [
766
+ 174,
767
+ 776,
768
+ 825,
769
+ 861
770
+ ],
771
+ "page_idx": 7
772
+ },
773
+ {
774
+ "type": "text",
775
+ "text": "MIMIC-III Experiments: Table 2 compares the predictive performance of the models on the mortality prediction task on MIMIC-III. The Multi-Time Attention network-based encoder-decoder framework (mTAND-Full) achieves better performance than the recent IP-Net and SeFT model as well as all of the RNN baseline models. While ODE-RNN and L-ODE-ODE both have slightly better mean AUC than mTAND-Full, the differences are not statistically significant. Further, as shown on the PhysioNet classification problem, mTAND-Full is more than an order of magnitude faster than the ODE-based methods. ",
776
+ "bbox": [
777
+ 174,
778
+ 867,
779
+ 823,
780
+ 922
781
+ ],
782
+ "page_idx": 7
783
+ },
784
+ {
785
+ "type": "table",
786
+ "img_path": "images/e12b631bd87494d10d901828c5cb5e4b024ab8c379cc4ce73cc457744a889a00.jpg",
787
+ "table_caption": [
788
+ "Table 2: Classification Performance on PhysioNet, MIMIC-III and Human Activity dataset "
789
+ ],
790
+ "table_footnote": [],
791
+ "table_body": "<table><tr><td rowspan=\"2\">Model</td><td colspan=\"2\">AUC Score</td><td>Accuracy</td><td rowspan=\"2\">time per epoch</td></tr><tr><td>PhysioNet</td><td>MIMIC-III</td><td>Human Activity</td></tr><tr><td>RNN-Impute</td><td>0.764± 0.016</td><td>0.8249 ± 0.0010</td><td>0.859 ± 0.004</td><td>0.5</td></tr><tr><td>RNN-△t</td><td>0.787 ± 0.014</td><td>0.8364 ± 0.0011</td><td>0.857 ± 0.002</td><td>0.5</td></tr><tr><td>RNN-Decay</td><td>0.807 ± 0.003</td><td>0.8392 ± 0.0012</td><td>0.860 ± 0.005</td><td>0.7</td></tr><tr><td>RNN GRU-D</td><td>0.818 ± 0.008</td><td>0.8270± 0.0010</td><td>0.862 ± 0.005</td><td>0.7</td></tr><tr><td>Phased-LSTM</td><td>0.836 ± 0.003</td><td>0.8429 ± 0.0035</td><td>0.855 ± 0.005</td><td>0.3</td></tr><tr><td>IP-Nets</td><td>0.819 ± 0.006</td><td>0.8390 ± 0.0011</td><td>0.869 ± 0.007</td><td>1.3</td></tr><tr><td>SeFT</td><td>0.795 ± 0.015</td><td>0.8485 ± 0.0022</td><td>0.815 ± 0.002</td><td>0.5</td></tr><tr><td>RNN-VAE</td><td>0.515 ± 0.040</td><td>0.5175 ± 0.0312</td><td>0.343 ± 0.040</td><td>2.0</td></tr><tr><td>ODE-RNN</td><td>0.833 ± 0.009</td><td>0.8561 ± 0.0051</td><td>0.885 ± 0.008</td><td>16.5</td></tr><tr><td>L-ODE-RNN</td><td>0.781±0.018</td><td>0.7734± 0.0030</td><td>0.838 ± 0.004</td><td>6.7</td></tr><tr><td>L-ODE-ODE</td><td>0.829 ± 0.004</td><td>0.8559 ± 0.0041</td><td>0.870 ± 0.028</td><td>22.0</td></tr><tr><td>mTAND-Enc</td><td>0.854± 0.001</td><td>0.8419 ± 0.0017</td><td>0.907 ± 0.002</td><td>0.1</td></tr><tr><td>mTAND-Full</td><td>0.858 ± 0.004</td><td>0.8544 ± 0.0024</td><td>0.910 ± 0.002</td><td>0.2</td></tr></table>",
792
+ "bbox": [
793
+ 218,
794
+ 127,
795
+ 781,
796
+ 344
797
+ ],
798
+ "page_idx": 8
799
+ },
800
+ {
801
+ "type": "text",
802
+ "text": "",
803
+ "bbox": [
804
+ 176,
805
+ 376,
806
+ 825,
807
+ 417
808
+ ],
809
+ "page_idx": 8
810
+ },
811
+ {
812
+ "type": "text",
813
+ "text": "Human Activity Experiments: Table 2 shows that the mTAND-based classifiers achieve significantly better performance than the baseline models on this prediction task, followed by ODE-based models and IP-Nets. ",
814
+ "bbox": [
815
+ 174,
816
+ 424,
817
+ 825,
818
+ 465
819
+ ],
820
+ "page_idx": 8
821
+ },
822
+ {
823
+ "type": "text",
824
+ "text": "Additional Experiments: In Appendix A.2, we demonstrate the effectiveness of learning temporally distributed latent representations with mTANs on a synthetic dataset. We show that mTANs are able to capture local structure in the time series better than latent ODE-based methods that encode to a single time point. This property of mTANs helps to improve the interpolation performance in terms of mean squared error. ",
825
+ "bbox": [
826
+ 174,
827
+ 473,
828
+ 825,
829
+ 542
830
+ ],
831
+ "page_idx": 8
832
+ },
833
+ {
834
+ "type": "text",
835
+ "text": "We also perform ablation experiments to show the performance gain achieved by learning similarity kernels and time embeddings in Appendix A.1. In particular, we show that learning the time embedding improves classification performance compared to using fixed positional encodings. We also demonstrate the effectiveness of learning the similarity kernel by comparing to an approach that uses fixed RBF kernels. Appendix A.1 shows that learning the similarity kernel using the mTAND module performs as well as or better than using a fixed RBF kernel. ",
836
+ "bbox": [
837
+ 174,
838
+ 550,
839
+ 825,
840
+ 633
841
+ ],
842
+ "page_idx": 8
843
+ },
844
+ {
845
+ "type": "text",
846
+ "text": "6 DISCUSSION AND CONCLUSIONS ",
847
+ "text_level": 1,
848
+ "bbox": [
849
+ 176,
850
+ 660,
851
+ 478,
852
+ 676
853
+ ],
854
+ "page_idx": 8
855
+ },
856
+ {
857
+ "type": "text",
858
+ "text": "In this paper, we have presented the Multi-Time Attention (mTAN) module for learning from sparse and irregularly sampled data along with a VAE-based encoder-decoder model leveraging this module. Our results show that the resulting model performs as well or better than a range of baseline and state-of-the-art models on both the interpolation and classification tasks, while offering training times that are one to two orders of magnitude faster than previous state of the art methods. While in this work we have focused on a VAE-based encoder-decoder architecture, the proposed mTAN module can be used to provide an interface between sparse and irregularly sampled time series and many different types of deep neural network architectures including GAN-based models. Composing the mTAN module with convolutional networks instead of recurrent architectures may also provide further computational enhancements due to improved parallelism. ",
859
+ "bbox": [
860
+ 174,
861
+ 694,
862
+ 825,
863
+ 833
864
+ ],
865
+ "page_idx": 8
866
+ },
867
+ {
868
+ "type": "text",
869
+ "text": "ACKNOWLEDGEMENTS ",
870
+ "text_level": 1,
871
+ "bbox": [
872
+ 176,
873
+ 862,
874
+ 366,
875
+ 876
876
+ ],
877
+ "page_idx": 8
878
+ },
879
+ {
880
+ "type": "text",
881
+ "text": "Research reported in this paper was partially supported by the National Institutes of Health under award numbers 5U01CA229445 and 1P41EB028242. ",
882
+ "bbox": [
883
+ 174,
884
+ 895,
885
+ 823,
886
+ 922
887
+ ],
888
+ "page_idx": 8
889
+ },
890
+ {
891
+ "type": "text",
892
+ "text": "REFERENCES ",
893
+ "text_level": 1,
894
+ "bbox": [
895
+ 176,
896
+ 102,
897
+ 287,
898
+ 117
899
+ ],
900
+ "page_idx": 9
901
+ },
902
+ {
903
+ "type": "text",
904
+ "text": "Xiangrui Cai, Jinyang Gao, Kee Yuan Ngiam, Beng Chin Ooi, Ying Zhang, and Xiaojie Yuan. Medical concept embedding with time-aware attention. In IJCAI, 2018. ",
905
+ "bbox": [
906
+ 173,
907
+ 126,
908
+ 825,
909
+ 155
910
+ ],
911
+ "page_idx": 9
912
+ },
913
+ {
914
+ "type": "text",
915
+ "text": "Zhengping Che, Sanjay Purushotham, Kyunghyun Cho, David Sontag, and Yan Liu. Recurrent neural networks for multivariate time series with missing values. Scientific Reports, 8(1):6085, 2018. ",
916
+ "bbox": [
917
+ 171,
918
+ 164,
919
+ 823,
920
+ 194
921
+ ],
922
+ "page_idx": 9
923
+ },
924
+ {
925
+ "type": "text",
926
+ "text": "Tian Qi Chen, Yulia Rubanova, Jesse Bettencourt, and David K Duvenaud. Neural ordinary differential equations. In Advances in Neural Information Processing Systems 31, pp. 6571–6583. 2018. ",
927
+ "bbox": [
928
+ 174,
929
+ 202,
930
+ 825,
931
+ 246
932
+ ],
933
+ "page_idx": 9
934
+ },
935
+ {
936
+ "type": "text",
937
+ "text": "Junyoung Chung, C¸ aglar G ˘ ul¨ c¸ehre, Kyunghyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv e-prints, abs/1412.3555, 2014. URL https://arxiv.org/abs/1412.3555. Presented at the Deep Learning workshop at NIPS2014. ",
938
+ "bbox": [
939
+ 173,
940
+ 255,
941
+ 826,
942
+ 311
943
+ ],
944
+ "page_idx": 9
945
+ },
946
+ {
947
+ "type": "text",
948
+ "text": "J.S. Clark and O.N. Bjørnstad. Population time series: process variability, observation errors, missing values, lags, and hidden states. Ecology, 85(11):3140–3150, 2004. ",
949
+ "bbox": [
950
+ 171,
951
+ 320,
952
+ 823,
953
+ 352
954
+ ],
955
+ "page_idx": 9
956
+ },
957
+ {
958
+ "type": "text",
959
+ "text": "Edward De Brouwer, Jaak Simm, Adam Arany, and Yves Moreau. Gru-ode-bayes: Continuous modeling of sporadically-observed time series. In Advances in Neural Information Processing Systems 32, pp. 7379–7390. Curran Associates, Inc., 2019. ",
960
+ "bbox": [
961
+ 173,
962
+ 359,
963
+ 825,
964
+ 404
965
+ ],
966
+ "page_idx": 9
967
+ },
968
+ {
969
+ "type": "text",
970
+ "text": "Joseph Futoma, Sanjay Hariharan, and Katherine A. Heller. Learning to detect sepsis with a multitask gaussian process RNN classifier. In Proceedings of the 34th International Conference on Machine Learning, pp. 1174–1182, 2017. ",
971
+ "bbox": [
972
+ 173,
973
+ 412,
974
+ 825,
975
+ 455
976
+ ],
977
+ "page_idx": 9
978
+ },
979
+ {
980
+ "type": "text",
981
+ "text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997. ",
982
+ "bbox": [
983
+ 171,
984
+ 464,
985
+ 825,
986
+ 494
987
+ ],
988
+ "page_idx": 9
989
+ },
990
+ {
991
+ "type": "text",
992
+ "text": "Max Horn, Michael Moor, Christian Bock, Bastian Rieck, and Karsten Borgwardt. Set functions for time series. In Proceedings of the 25th International Conference on Machine Learning, 2020. ",
993
+ "bbox": [
994
+ 171,
995
+ 503,
996
+ 823,
997
+ 534
998
+ ],
999
+ "page_idx": 9
1000
+ },
1001
+ {
1002
+ "type": "text",
1003
+ "text": "Alistair EW Johnson, Tom J Pollard, Lu Shen, H Lehman Li-wei, Mengling Feng, Mohammad Ghassemi, Benjamin Moody, Peter Szolovits, Leo Anthony Celi, and Roger G Mark. Mimic-iii, a freely accessible critical care database. Scientific Data, 3:160035, 2016. ",
1004
+ "bbox": [
1005
+ 174,
1006
+ 541,
1007
+ 825,
1008
+ 585
1009
+ ],
1010
+ "page_idx": 9
1011
+ },
1012
+ {
1013
+ "type": "text",
1014
+ "text": "S. Kazemi, R. Goel, Sepehr Eghbali, Janahan Ramanan, Jaspreet Sahota, Sanjay Thakur, S. Wu, C. Smyth, P. Poupart, and Marcus A. Brubaker. Time2vec: Learning a vector representation of time. ArXiv, abs/1907.05321, 2019. ",
1015
+ "bbox": [
1016
+ 173,
1017
+ 594,
1018
+ 826,
1019
+ 637
1020
+ ],
1021
+ "page_idx": 9
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. In 2nd International Conference on Learning Representations, 2014. ",
1026
+ "bbox": [
1027
+ 173,
1028
+ 646,
1029
+ 823,
1030
+ 676
1031
+ ],
1032
+ "page_idx": 9
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "Steven Cheng-Xian Li and Benjamin M Marlin. A scalable end-to-end gaussian process adapter for irregularly sampled time series classification. In Advances In Neural Information Processing Systems, pp. 1804–1812, 2016. ",
1037
+ "bbox": [
1038
+ 173,
1039
+ 685,
1040
+ 826,
1041
+ 729
1042
+ ],
1043
+ "page_idx": 9
1044
+ },
1045
+ {
1046
+ "type": "text",
1047
+ "text": "Steven Cheng-Xian Li and Benjmain M. Marlin. Classification of sparse and irregularly sampled time series with mixtures of expected Gaussian kernels and random features. In 31st Conference on Uncertainty in Artificial Intelligence, 2015. ",
1048
+ "bbox": [
1049
+ 173,
1050
+ 737,
1051
+ 825,
1052
+ 781
1053
+ ],
1054
+ "page_idx": 9
1055
+ },
1056
+ {
1057
+ "type": "text",
1058
+ "text": "Zachary C Lipton, David Kale, and Randall Wetzel. Directly modeling missing data in sequences with rnns: Improved classification of clinical time series. In Machine Learning for Healthcare Conference, pp. 253–270, 2016. ",
1059
+ "bbox": [
1060
+ 174,
1061
+ 790,
1062
+ 825,
1063
+ 833
1064
+ ],
1065
+ "page_idx": 9
1066
+ },
1067
+ {
1068
+ "type": "text",
1069
+ "text": "Benjamin M. Marlin, David C. Kale, Robinder G. Khemani, and Randall C. Wetzel. Unsupervised pattern discovery in electronic health care data using probabilistic clustering models. In Proceedings of the 2nd ACM SIGHIT International Health Informatics Symposium, pp. 389–398, 2012. ",
1070
+ "bbox": [
1071
+ 173,
1072
+ 842,
1073
+ 823,
1074
+ 886
1075
+ ],
1076
+ "page_idx": 9
1077
+ },
1078
+ {
1079
+ "type": "text",
1080
+ "text": "Michael C. Mozer, Denis Kazakov, and Robert V. Lindsey. Discrete event, continuous time rnns. CoRR, abs/1710.04110, 2017. URL http://arxiv.org/abs/1710.04110. ",
1081
+ "bbox": [
1082
+ 176,
1083
+ 895,
1084
+ 823,
1085
+ 924
1086
+ ],
1087
+ "page_idx": 9
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "Daniel Neil, Michael Pfeiffer, and Shih-Chii Liu. Phased lstm: Accelerating recurrent network training for long or event-based sequences. In Advances in Neural Information Processing Systems, pp. 3882–3890. 2016. ",
1092
+ "bbox": [
1093
+ 174,
1094
+ 103,
1095
+ 823,
1096
+ 145
1097
+ ],
1098
+ "page_idx": 10
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "Xueping Peng, Guodong Long, Tao Shen, Sen Wang, J. Jiang, and Michael Blumenstein. Temporal self-attention network for medical concept embedding. 2019 IEEE International Conference on Data Mining (ICDM), pp. 498–507, 2019. ",
1103
+ "bbox": [
1104
+ 176,
1105
+ 154,
1106
+ 821,
1107
+ 196
1108
+ ],
1109
+ "page_idx": 10
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "Trang Pham, Truyen Tran, Dinh Phung, and Svetha Venkatesh. Predicting healthcare trajectories from medical records: A deep learning approach. Journal of Biomedical Informatics, 69, 04 2017. doi: 10.1016/j.jbi.2017.04.001. ",
1114
+ "bbox": [
1115
+ 174,
1116
+ 204,
1117
+ 825,
1118
+ 247
1119
+ ],
1120
+ "page_idx": 10
1121
+ },
1122
+ {
1123
+ "type": "text",
1124
+ "text": "Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In Proceedings of the 31st International Conference on Machine Learning, pp. 1278–1286, 2014. ",
1125
+ "bbox": [
1126
+ 176,
1127
+ 255,
1128
+ 823,
1129
+ 297
1130
+ ],
1131
+ "page_idx": 10
1132
+ },
1133
+ {
1134
+ "type": "text",
1135
+ "text": "Yulia Rubanova, Ricky T. Q. Chen, and David K Duvenaud. Latent ordinary differential equations for irregularly-sampled time series. In Advances in Neural Information Processing Systems 32, pp. 5320–5330. Curran Associates, Inc., 2019. ",
1136
+ "bbox": [
1137
+ 176,
1138
+ 305,
1139
+ 823,
1140
+ 349
1141
+ ],
1142
+ "page_idx": 10
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "T. Ruf. The lomb-scargle periodogram in biological rhythm research: analysis of incomplete and unequally spaced time-series. Biological Rhythm Research, 30(2):178–201, 1999. ",
1147
+ "bbox": [
1148
+ 174,
1149
+ 356,
1150
+ 821,
1151
+ 386
1152
+ ],
1153
+ "page_idx": 10
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "Jeffrey D Scargle. Studies in astronomical time series analysis. ii-statistical aspects of spectral analysis of unevenly spaced data. The Astrophysical Journal, 263:835–853, 1982. ",
1158
+ "bbox": [
1159
+ 171,
1160
+ 392,
1161
+ 821,
1162
+ 422
1163
+ ],
1164
+ "page_idx": 10
1165
+ },
1166
+ {
1167
+ "type": "text",
1168
+ "text": "M. Schulz and K. Stattegger. Spectrum: Spectral analysis of unevenly spaced paleoclimatic time series. Computers & Geosciences, 23(9):929–945, 1997. ",
1169
+ "bbox": [
1170
+ 171,
1171
+ 430,
1172
+ 823,
1173
+ 459
1174
+ ],
1175
+ "page_idx": 10
1176
+ },
1177
+ {
1178
+ "type": "text",
1179
+ "text": "Satya Narayan Shukla and Benjamin M Marlin. Interpolation Prediction Networks for Irregularly Sampled Time Series. ICLR, 2019. ",
1180
+ "bbox": [
1181
+ 173,
1182
+ 467,
1183
+ 823,
1184
+ 496
1185
+ ],
1186
+ "page_idx": 10
1187
+ },
1188
+ {
1189
+ "type": "text",
1190
+ "text": "Ikaro Silva, George Moody, Daniel Scott, Leo Celi, and Roger Mark. Predicting in-hospital mortality of icu patients: The physionet/computing in cardiology challenge 2012. Computing in cardiology, 39:245–248, 2012. ",
1191
+ "bbox": [
1192
+ 173,
1193
+ 503,
1194
+ 823,
1195
+ 546
1196
+ ],
1197
+ "page_idx": 10
1198
+ },
1199
+ {
1200
+ "type": "text",
1201
+ "text": "Huan Song, Deepta Rajan, Jayaraman J. Thiagarajan, and Andreas Spanias. Attend and diagnose: Clinical time series analysis using attention models. In 32nd AAAI Conference on Artificial Intelligence, AAAI 2018, pp. 4091–4098. AAAI press, January 2018. ",
1202
+ "bbox": [
1203
+ 176,
1204
+ 554,
1205
+ 823,
1206
+ 598
1207
+ ],
1208
+ "page_idx": 10
1209
+ },
1210
+ {
1211
+ "type": "text",
1212
+ "text": "Qingxiong Tan, Mang Ye, Baoyao Yang, Siqi Liu, Andy Jinhua Ma, Terry Cheuk-Fung Yip, Grace Lai-Hung Wong, and Pongchi Yuen. Data-gru: Dual-attention time-aware gated recurrent unit for irregular multivariate time series. In AAAI, 2020. ",
1213
+ "bbox": [
1214
+ 176,
1215
+ 604,
1216
+ 823,
1217
+ 648
1218
+ ],
1219
+ "page_idx": 10
1220
+ },
1221
+ {
1222
+ "type": "text",
1223
+ "text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, undefinedukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Proceedings of the 31st International Conference on Neural Information Processing Systems, pp. 6000–6010, 2017. ",
1224
+ "bbox": [
1225
+ 174,
1226
+ 655,
1227
+ 823,
1228
+ 699
1229
+ ],
1230
+ "page_idx": 10
1231
+ },
1232
+ {
1233
+ "type": "text",
1234
+ "text": "Da Xu, Chuanwei Ruan, Evren Korpeoglu, Sushant Kumar, and Kannan Achan. Self-attention with functional time representation learning. In Advances in Neural Information Processing Systems 32, pp. 15915–15925. 2019. ",
1235
+ "bbox": [
1236
+ 173,
1237
+ 705,
1238
+ 823,
1239
+ 750
1240
+ ],
1241
+ "page_idx": 10
1242
+ },
1243
+ {
1244
+ "type": "text",
1245
+ "text": "Pranjul Yadav, Michael Steinbach, Vipin Kumar, and Gyorgy Simon. Mining electronic health records (ehrs): A survey. ACM Computing Surveys (CSUR), 50(6):85, 2018. ",
1246
+ "bbox": [
1247
+ 173,
1248
+ 756,
1249
+ 823,
1250
+ 786
1251
+ ],
1252
+ "page_idx": 10
1253
+ },
1254
+ {
1255
+ "type": "text",
1256
+ "text": "J. Yoon, W. R. Zame, and M. van der Schaar. Estimating missing data in temporal data streams using multi-directional recurrent neural networks. IEEE Transactions on Biomedical Engineering, 66(5): 1477–1490, 2019. doi: 10.1109/TBME.2018.2874712. ",
1257
+ "bbox": [
1258
+ 174,
1259
+ 794,
1260
+ 823,
1261
+ 837
1262
+ ],
1263
+ "page_idx": 10
1264
+ },
1265
+ {
1266
+ "type": "text",
1267
+ "text": "Jinsung Yoon, William R Zame, and Mihaela Van Der Schaar. Deep sensing: Active sensing using multi-directional recurrent neural networks. ICLR, 2018. ",
1268
+ "bbox": [
1269
+ 169,
1270
+ 844,
1271
+ 823,
1272
+ 873
1273
+ ],
1274
+ "page_idx": 10
1275
+ },
1276
+ {
1277
+ "type": "text",
1278
+ "text": "Yuan Zhang, Xi Yang, Julie Ivy, and Min Chi. Attain: Attention-based time-aware lstm networks for disease progression modeling. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, pp. 4369–4375, 2019. ",
1279
+ "bbox": [
1280
+ 176,
1281
+ 882,
1282
+ 825,
1283
+ 924
1284
+ ],
1285
+ "page_idx": 10
1286
+ },
1287
+ {
1288
+ "type": "text",
1289
+ "text": "A APPENDIX ",
1290
+ "text_level": 1,
1291
+ "bbox": [
1292
+ 176,
1293
+ 102,
1294
+ 297,
1295
+ 117
1296
+ ],
1297
+ "page_idx": 11
1298
+ },
1299
+ {
1300
+ "type": "text",
1301
+ "text": "A.1 ABLATION STUDY ",
1302
+ "text_level": 1,
1303
+ "bbox": [
1304
+ 176,
1305
+ 135,
1306
+ 344,
1307
+ 150
1308
+ ],
1309
+ "page_idx": 11
1310
+ },
1311
+ {
1312
+ "type": "text",
1313
+ "text": "In this section, we perform ablation experiments to show the performance gain achieved by learning similarity kernel and time embedding. Table 3 shows the ablation results by substituting fixed positional encoding (Vaswani et al., 2017) in place of learnable time embedding defined in Equation 1 in mTAND-Full model on PhysioNet and MIMIC-III dataset for classification task. We report the average AUC score over 5 runs. As we can see from Table 3, learning the time embedding improves AUC score by $1 \\%$ as compared to using fixed positional encodings. ",
1314
+ "bbox": [
1315
+ 173,
1316
+ 162,
1317
+ 825,
1318
+ 246
1319
+ ],
1320
+ "page_idx": 11
1321
+ },
1322
+ {
1323
+ "type": "table",
1324
+ "img_path": "images/08e965a8bec0dffa187c8e7f00c650ec27a30af10095bd43af4fe24bcb4096c1.jpg",
1325
+ "table_caption": [
1326
+ "Table 3: Ablation with time embedding "
1327
+ ],
1328
+ "table_footnote": [],
1329
+ "table_body": "<table><tr><td>Dataset</td><td>Time Embedding</td><td>AUC Score</td></tr><tr><td>PhysioNet</td><td>Positional Encoding Learned Time Embedding</td><td>0.845 ± 0.004 0.858 ± 0.004</td></tr><tr><td>MIMIC-III</td><td>Positional Encoding Learned Time Embedding</td><td>0.843 ± 0.001 0.854 ± 0.002</td></tr></table>",
1330
+ "bbox": [
1331
+ 294,
1332
+ 287,
1333
+ 705,
1334
+ 381
1335
+ ],
1336
+ "page_idx": 11
1337
+ },
1338
+ {
1339
+ "type": "text",
1340
+ "text": "Since mTANs are fundamentally continuous-time interpolation-based models, we perform an ablation study by comparing mTANs with the IP-nets (Shukla & Marlin, 2019). IP-Nets use several semiparametric RBF interpolation layers, followed by a GRU to model irregularly sampled time series. In this framework, we replace the RBK kernel with a learnable similarity kernel using mTAND module, the corresponding model is mTAND-Enc. Table 4 compares the performance of the two methods on classification task on PhysioNet, MIMIC-III and Human Activity dataset. We report the average AUC score over 5 runs. Table 4 shows that learning the similarity kernel using mTAND module performs as well or better than using a fixed RBF kernel. ",
1341
+ "bbox": [
1342
+ 173,
1343
+ 397,
1344
+ 826,
1345
+ 510
1346
+ ],
1347
+ "page_idx": 11
1348
+ },
1349
+ {
1350
+ "type": "table",
1351
+ "img_path": "images/fdb9cbef6bbe644cd4e2a40e8a173d01822d4fa784d3ae196fc7d82533b0d2a0.jpg",
1352
+ "table_caption": [
1353
+ "Table 4: Comparing interpolation kernels "
1354
+ ],
1355
+ "table_footnote": [],
1356
+ "table_body": "<table><tr><td>Dataset</td><td>Model</td><td>AUC Score</td></tr><tr><td rowspan=\"2\">PhysioNet</td><td>IP-Nets</td><td>0.819 ± 0.006</td></tr><tr><td>mTAND-Enc</td><td>0.854 ± 0.001</td></tr><tr><td rowspan=\"2\">MIMIC-III</td><td>IP-Nets</td><td>0.839 ± 0.001</td></tr><tr><td>mTAND-Enc</td><td>0.842 ± 0.001</td></tr><tr><td rowspan=\"2\">Human Activity</td><td>IP-Nets</td><td>0.869 ± 0.007</td></tr><tr><td>mTAND-Enc</td><td>0.907 ± 0.002</td></tr></table>",
1357
+ "bbox": [
1358
+ 318,
1359
+ 551,
1360
+ 678,
1361
+ 678
1362
+ ],
1363
+ "page_idx": 11
1364
+ },
1365
+ {
1366
+ "type": "text",
1367
+ "text": "A.2 SYNTHETIC INTERPOLATION EXPERIMENTS ",
1368
+ "text_level": 1,
1369
+ "bbox": [
1370
+ 174,
1371
+ 708,
1372
+ 522,
1373
+ 723
1374
+ ],
1375
+ "page_idx": 11
1376
+ },
1377
+ {
1378
+ "type": "text",
1379
+ "text": "To demonstrate the capabilities of our model on the interpolation task, we generate a synthetic dataset consisting of 1000 trajectories each of 100 time points sampled over $t \\in [ 0 , 1 ]$ . We fix 10 reference points and use RBF kernel with a fixed bandwidth of 100 for constructing local interpolations at 100 time points over [0, 1]. The values at the reference points are drawn from a standard normal distribution. ",
1380
+ "bbox": [
1381
+ 173,
1382
+ 734,
1383
+ 825,
1384
+ 805
1385
+ ],
1386
+ "page_idx": 11
1387
+ },
1388
+ {
1389
+ "type": "text",
1390
+ "text": "We randomly sample 20 observations from each trajectory to simulate a sparse and irregularly sampled multivariate time series. We use $8 0 \\%$ of the data for training and $2 0 \\%$ for testing. At test time, encoder conditions on 20 irregularly sampled time points and the decoder generates interpolations on all 100 time points. Figure 3 illustrates the interpolation results on the test set for the Multi-Time Attention Network and Latent ODE model with ODE encoder (Rubanova et al., 2019). For both the models, we draw 100 samples from the approximate posterior distribution. As we can see from Figure 3, the ODE interpolations are much smoother and haven’t been able to capture the local structure as well as mTANS. ",
1391
+ "bbox": [
1392
+ 173,
1393
+ 811,
1394
+ 825,
1395
+ 924
1396
+ ],
1397
+ "page_idx": 11
1398
+ },
1399
+ {
1400
+ "type": "image",
1401
+ "img_path": "images/31c7c1c2266224373e681c544bb02aebc63d193c3d9ba85adbc7ae4c69fd8e5e.jpg",
1402
+ "image_caption": [
1403
+ "Figure 3: Interpolations on the synthetic interpolation dataset. The columns represent 3 different examples. First row: Ground truth trajectories with observed points, second row: reconstructions on the complete range $t \\in [ 0 , 1 ]$ using the proposed model mTAN, third row: reconstructions on the complete range $t \\in [ 0 , 1 ]$ using the Latent ODE model with ODE encoder. "
1404
+ ],
1405
+ "image_footnote": [],
1406
+ "bbox": [
1407
+ 181,
1408
+ 104,
1409
+ 820,
1410
+ 395
1411
+ ],
1412
+ "page_idx": 12
1413
+ },
1414
+ {
1415
+ "type": "table",
1416
+ "img_path": "images/e26f22d90c937ae0d9bd21cbd52991615e1ba8eddacf2b5e0273be0c0cbebe79.jpg",
1417
+ "table_caption": [
1418
+ "Table 5: Synthetic Data: Mean Squared Error "
1419
+ ],
1420
+ "table_footnote": [],
1421
+ "table_body": "<table><tr><td>Latent Dimension</td><td>Model</td><td>Reconstruction</td><td>Interpolation</td></tr><tr><td>10</td><td>L-ODE-ODE</td><td>0.0209</td><td>0.0571</td></tr><tr><td rowspan=\"2\"></td><td>mTAND-Full</td><td>0.0088</td><td>0.0409</td></tr><tr><td>L-ODE-ODE</td><td>0.0191</td><td>0.0541</td></tr><tr><td>20</td><td>mTAND-Full</td><td>0.0028</td><td>0.0335</td></tr></table>",
1422
+ "bbox": [
1423
+ 250,
1424
+ 515,
1425
+ 746,
1426
+ 608
1427
+ ],
1428
+ "page_idx": 12
1429
+ },
1430
+ {
1431
+ "type": "text",
1432
+ "text": "Table 5 compares the proposed model with best performing baseline Latent-ODE with ODE encoder (L-ODE-ODE) on reconstruction and interpolation task. For both the tasks, we condition on the 20 irregularly sampled time points and reconstruct the input points (reconstruction) and the whole set of 100 time points (interpolation). We report the mean squared error on test set. ",
1433
+ "bbox": [
1434
+ 173,
1435
+ 640,
1436
+ 825,
1437
+ 695
1438
+ ],
1439
+ "page_idx": 12
1440
+ },
1441
+ {
1442
+ "type": "text",
1443
+ "text": "A.3 ARCHITECTURE DETAILS ",
1444
+ "text_level": 1,
1445
+ "bbox": [
1446
+ 176,
1447
+ 720,
1448
+ 395,
1449
+ 734
1450
+ ],
1451
+ "page_idx": 12
1452
+ },
1453
+ {
1454
+ "type": "text",
1455
+ "text": "Multi-Time Attention Network (mTAND-Full): In our proposed encoder-decoder framework (Figure 2), we use bi-directional GRU as the recurrent model in both encoder and decoder. In encoder, we use a 2 layer fully connected network with 50 hidden units and ReLU activations to map the RNN hidden state at each reference point to mean and variance. Similarly in decoder, mTAN embeddings are independently decoded using a 2 layer fully connected network with 50 hidden units and ReLU activations, and the result is used to parameterize the output distribution. For classification tasks, we use a separate GRU layer on top of the latent states followed by a 2-layer fully connected layer with 300 units and ReLU activations to output the class probabilities. ",
1456
+ "bbox": [
1457
+ 173,
1458
+ 748,
1459
+ 825,
1460
+ 861
1461
+ ],
1462
+ "page_idx": 12
1463
+ },
1464
+ {
1465
+ "type": "text",
1466
+ "text": "Multi-Time Attention Encoder (mTAND-Enc): As we show in the experiments, the proposed mTAN module can standalone be used for classification tasks. The mTAND-Enc consists of MultiTime attention module followed by GRU to extract the final hidden state which is then passed to a 2-layer fully connected layer to output the class probabilities. ",
1467
+ "bbox": [
1468
+ 174,
1469
+ 867,
1470
+ 825,
1471
+ 924
1472
+ ],
1473
+ "page_idx": 12
1474
+ },
1475
+ {
1476
+ "type": "text",
1477
+ "text": "Loss Function: For computing the evidence lower bound (ELBO) during training, we use negative log-likelihood with fixed variance as the reconstruction loss. For all the datasets, we use a fixed variance of 0.01. For computing ELBO, we use 5 samples for interpolation task and 1 sample for classification tasks. We use cross entropy loss for classification. For the classification tasks, we tune the $\\lambda$ parameter in the supervised learning loss function (Equation 15). We achieved best performance using $\\lambda$ as 100 and 5 for Physionet, MIMIC-III respectively. For human activity dataset, we achieved best results without using the regulaizer or ELBO component. We found that KL annealing with coeff 0.99 improved the performance of interpolation and classification tasks on Physionet. ",
1478
+ "bbox": [
1479
+ 173,
1480
+ 103,
1481
+ 825,
1482
+ 215
1483
+ ],
1484
+ "page_idx": 13
1485
+ },
1486
+ {
1487
+ "type": "text",
1488
+ "text": "A.4 HYPERPARAMETERS ",
1489
+ "text_level": 1,
1490
+ "bbox": [
1491
+ 176,
1492
+ 232,
1493
+ 359,
1494
+ 246
1495
+ ],
1496
+ "page_idx": 13
1497
+ },
1498
+ {
1499
+ "type": "text",
1500
+ "text": "Baselines: For Physionet and Human Activity dataset, we use the reported hyperparameters for RNN baselines as well as ODE models from Rubanova et al. (2019). For MIMIC-III dataset, we independently tune the hyperparameters of the baseline models on the validation set. We search for GRU hidden units, latent dimension, number of hidden units in fully connected network for ODE function in recognition and generative model over the range $\\{ 2 0 , 3 2 , 6 4 , 1 2 8 , 2 5 6 \\}$ . For ODEs, we also searched the number of layers in fully connected network in the range $\\{ 1 , 2 , 3 \\}$ . ",
1501
+ "bbox": [
1502
+ 174,
1503
+ 257,
1504
+ 825,
1505
+ 342
1506
+ ],
1507
+ "page_idx": 13
1508
+ },
1509
+ {
1510
+ "type": "text",
1511
+ "text": "mTAN: We learn time embeddings of size 128. The number of embeddings $H \\in \\{ 1 , 2 , 4 \\}$ . The linear projection matrices used for projecting time embedding $W$ are each $d _ { k } * d _ { k } / h$ where $d _ { k }$ is the embedding size. We search the latent dimension and GRU encoder hidden size over the range $\\{ 3 2 , 6 4 , 1 \\bar { 2 } 8 \\}$ . We keep GRU decoder hidden size at 50. For the classification tasks, we use 128 reference points. For interpolation task, we search number of reference points over the range $\\{ 8 , 1 6 , 3 2 , 6 4 , 1 2 8 \\}$ . We use Adam Optimizer for training the models. For classification, experiments are run for 300 iteration with learning rate 0.0001, while for interpolation task experiments are run for 500 iterations with learning rate 0.001. Best hyperparameters are reported in the code. ",
1512
+ "bbox": [
1513
+ 173,
1514
+ 348,
1515
+ 825,
1516
+ 460
1517
+ ],
1518
+ "page_idx": 13
1519
+ },
1520
+ {
1521
+ "type": "text",
1522
+ "text": "A.5 VISUALIZING ATTENTION WEIGHTS ",
1523
+ "text_level": 1,
1524
+ "bbox": [
1525
+ 176,
1526
+ 477,
1527
+ 468,
1528
+ 492
1529
+ ],
1530
+ "page_idx": 13
1531
+ },
1532
+ {
1533
+ "type": "image",
1534
+ "img_path": "images/3868a23c0494522b98c316c3fadb77785cfcb80420c17decac018b804f66b27e.jpg",
1535
+ "image_caption": [
1536
+ "Figure 4: Visualization of attention weights. mTAN learns an interpolation over the query time points by attending to the observed values at key time points. The brighter edges correspond to higher attention weights. "
1537
+ ],
1538
+ "image_footnote": [],
1539
+ "bbox": [
1540
+ 173,
1541
+ 507,
1542
+ 825,
1543
+ 643
1544
+ ],
1545
+ "page_idx": 13
1546
+ },
1547
+ {
1548
+ "type": "text",
1549
+ "text": "In this section, we visualize the attention weights learned by our proposed model. We experiment using synthetic dataset (described in A.2) which consists of univariate time series. Figure 4 shows the attention weights learned by the encoder mTAND module. The input shown in the figure is the irregularly sampled time points and the edges show how the output at reference points attends to the values on the input time points. The final output can be computed by substituting the attention weights in Equation 3. ",
1550
+ "bbox": [
1551
+ 174,
1552
+ 715,
1553
+ 825,
1554
+ 799
1555
+ ],
1556
+ "page_idx": 13
1557
+ },
1558
+ {
1559
+ "type": "text",
1560
+ "text": "A.6 TRAINING DETAILS ",
1561
+ "text_level": 1,
1562
+ "bbox": [
1563
+ 176,
1564
+ 816,
1565
+ 354,
1566
+ 832
1567
+ ],
1568
+ "page_idx": 13
1569
+ },
1570
+ {
1571
+ "type": "text",
1572
+ "text": "A.6.1 DATA GENERATION AND PREPROCESSING ",
1573
+ "text_level": 1,
1574
+ "bbox": [
1575
+ 176,
1576
+ 844,
1577
+ 517,
1578
+ 858
1579
+ ],
1580
+ "page_idx": 13
1581
+ },
1582
+ {
1583
+ "type": "text",
1584
+ "text": "All the datasets used in the experiments are publicly available and can be downloaded using the following links: ",
1585
+ "bbox": [
1586
+ 178,
1587
+ 867,
1588
+ 823,
1589
+ 896
1590
+ ],
1591
+ "page_idx": 13
1592
+ },
1593
+ {
1594
+ "type": "text",
1595
+ "text": "PhysioNet: https://physionet.org/content/challenge-2012/ MIMIC-III: https://mimic.physionet.org/ ",
1596
+ "bbox": [
1597
+ 173,
1598
+ 897,
1599
+ 692,
1600
+ 924
1601
+ ],
1602
+ "page_idx": 13
1603
+ },
1604
+ {
1605
+ "type": "text",
1606
+ "text": "Human Activity: https://archive.ics.uci.edu/ml/datasets/Localization+ Data+for+Person+Activity. ",
1607
+ "bbox": [
1608
+ 173,
1609
+ 104,
1610
+ 825,
1611
+ 132
1612
+ ],
1613
+ "page_idx": 14
1614
+ },
1615
+ {
1616
+ "type": "text",
1617
+ "text": "We rescale each feature to be between 0 and 1 for Physionet and MIMIC-III dataset. We also rescale the time to be in $[ 0 , 1 ]$ for all datasets. In case of MIMIC-III dataset, for the time series missing entirely, we follow the preprocessing steps of Shukla & Marlin (2019) and assign the starting point (time $\\scriptstyle \\mathrm { t = } 0$ ) value of the time series to the global mean for that variable. ",
1618
+ "bbox": [
1619
+ 174,
1620
+ 138,
1621
+ 825,
1622
+ 195
1623
+ ],
1624
+ "page_idx": 14
1625
+ },
1626
+ {
1627
+ "type": "text",
1628
+ "text": "A.6.2 SOURCE CODE ",
1629
+ "text_level": 1,
1630
+ "bbox": [
1631
+ 176,
1632
+ 210,
1633
+ 336,
1634
+ 224
1635
+ ],
1636
+ "page_idx": 14
1637
+ },
1638
+ {
1639
+ "type": "text",
1640
+ "text": "The code for reproducing the results in this paper is available at https://github.com/ reml-lab/mTAN. ",
1641
+ "bbox": [
1642
+ 176,
1643
+ 234,
1644
+ 825,
1645
+ 262
1646
+ ],
1647
+ "page_idx": 14
1648
+ },
1649
+ {
1650
+ "type": "text",
1651
+ "text": "A.6.3 COMPUTING INFRASTRUCTURE ",
1652
+ "text_level": 1,
1653
+ "bbox": [
1654
+ 176,
1655
+ 277,
1656
+ 450,
1657
+ 292
1658
+ ],
1659
+ "page_idx": 14
1660
+ },
1661
+ {
1662
+ "type": "text",
1663
+ "text": "All experiments were run on a Nvidia Titan X GPU. ",
1664
+ "bbox": [
1665
+ 174,
1666
+ 301,
1667
+ 516,
1668
+ 316
1669
+ ],
1670
+ "page_idx": 14
1671
+ }
1672
+ ]
parse/train/4c0J6lwQ4_/4c0J6lwQ4__middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/4c0J6lwQ4_/4c0J6lwQ4__model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1Igu2ogg/B1Igu2ogg.md ADDED
@@ -0,0 +1,303 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # EFFICIENT VECTOR REPRESENTATION FOR DOCU-MENTS THROUGH CORRUPTION
2
+
3
+ Minmin Chen
4
+ Criteo Research
5
+ Palo Alto, CA 94301, USA m.chen@criteo.com
6
+
7
+ # ABSTRACT
8
+
9
+ We present an efficient document representation learning framework, Document Vector through Corruption (Doc2VecC). Doc2VecC represents each document as a simple average of word embeddings. It ensures a representation generated as such captures the semantic meanings of the document during learning. A corruption model is included, which introduces a data-dependent regularization that favors informative or rare words while forcing the embeddings of common and non-discriminative ones to be close to zero. Doc2VecC produces significantly better word embeddings than Word2Vec. We compare Doc2VecC with several state-of-the-art document representation learning algorithms. The simple model architecture introduced by Doc2VecC matches or out-performs the state-of-the-art in generating high-quality document representations for sentiment analysis, document classification as well as semantic relatedness tasks. The simplicity of the model enables training on billions of words per hour on a single machine. At the same time, the model is very efficient in generating representations of unseen documents at test time.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ Text understanding starts with the challenge of finding machine-understandable representation that captures the semantics of texts. Bag-of-words (BoW) and its N-gram extensions are arguably the most commonly used document representations. Despite its simplicity, BoW works surprisingly well for many tasks (Wang & Manning, 2012). However, by treating words and phrases as unique and discrete symbols, BoW often fails to capture the similarity between words or phrases and also suffers from sparsity and high dimensionality.
14
+
15
+ Recent works on using neural networks to learn distributed vector representations of words have gained great popularity. The well celebrated Word2Vec (Mikolov et al., 2013a), by learning to predict the target word using its neighboring words, maps words of similar meanings to nearby points in the continuous vector space. The surprisingly simple model has succeeded in generating high-quality word embeddings for tasks such as language modeling, text understanding and machine translation. Word2Vec naturally scales to large datasets thanks to its simple model architecture. It can be trained on billions of words per hour on a single machine.
16
+
17
+ Paragraph Vectors (Le & Mikolov, 2014) generalize the idea to learn vector representation for documents. A target word is predicted by the word embeddings of its neighbors in together with a unique document vector learned for each document. It outperforms established document representations, such as BoW and Latent Dirichlet Allocation (Blei et al., 2003), on various text understanding tasks (Dai et al., 2015). However, two caveats come with this approach: 1) the number of parameters grows with the size of the training corpus, which can easily go to billions; and 2) it is expensive to generate vector representations for unseen documents at test time.
18
+
19
+ We propose an efficient model architecture, referred to as Document Vector through Corruption (Doc2VecC), to learn vector representations for documents. It is motivated by the observation that linear operations on the word embeddings learned by Word2Vec can sustain substantial amount of syntactic and semantic meanings of a phrase or a sentence (Mikolov et al., 2013b). For example, vec(“Russia”) $^ +$ vec(“river”) is close to vec(“Volga River”) (Mikolov & Dean, 2013), and vec(“king”) - vec(“man”) $^ +$ vec(“women”) is close to vec(“queen”) (Mikolov et al., 2013b). In Doc2VecC, we represent each document as a simple average of the word embeddings of all the words in the document. In contrast to existing approaches which post-process learned word embeddings to form document representation (Socher et al., 2013; Mesnil et al., 2014), Doc2VecC enforces a meaningful document representation can be formed by averaging the word embeddings during learning. Furthermore, we include a corruption model that randomly remove words from a document during learning, a mechanism that is critical to the performance and learning speed of our algorithm.
20
+
21
+ Doc2VecC has several desirable properties: 1. The model complexity of Doc2VecC is decoupled from the size of the training corpus, depending only on the size of the vocabulary; 2. The model architecture of Doc2VecC resembles that of Word2Vec, and can be trained very efficiently; 3. The new framework implicitly introduces a data-dependent regularization, which favors rare or informative words and suppresses words that are common but not discriminative; 4. Vector representation of a document can be generated by simply averaging the learned word embeddings of all the words in the document, which significantly boost test efficiency; 5. The vector representation generated by Doc2VecC matches or beats the state-of-the-art for sentiment analysis, document classification as well as semantic relatedness tasks.
22
+
23
+ # 2 RELATED WORKS AND NOTATIONS
24
+
25
+ Text representation learning has been extensively studied. Popular representations range from the simplest BoW and its term-frequency based variants (Salton & Buckley, 1988), language model based methods (Croft & Lafferty, 2013; Mikolov et al., 2010; Kim et al., 2015), topic models (Deerwester et al., 1990; Blei et al., 2003), Denoising Autoencoders and its variants (Vincent et al., 2008; Chen et al., 2012), and distributed vector representations (Mesnil et al., 2014; Le & Mikolov, 2014; Kiros et al., 2015). Another prominent line of work includes learning task-specific document representation with deep neural networks, such as CNN (Zhang & LeCun, 2015) or LSTM based approaches (Tai et al., 2015; Dai & Le, 2015).
26
+
27
+ In this section, we briefly introduce Word2Vec and Paragraph Vectors, the two approaches that are most similar to ours. There are two well-know model architectures used for both methods, referred to as Continuous Bag-of-Words (CBoW) and Skipgram models (Mikolov et al., 2013a). In this work, we focus on CBoW. Extending to Skipgram is straightforward. Here are the notations we are going to use throughout the paper:
28
+
29
+ $\mathcal { D } = \{ D _ { 1 } , \cdots , D _ { n } \}$ : a training corpus of size $n$ , in which each document $D _ { i }$ contains a variablelength sequence of words $w _ { i } ^ { 1 } , \cdots , w _ { i } ^ { T _ { i } }$ ;
30
+ $V$ : the vocabulary used in the training corpus, of sizes $v$ ;
31
+ $\mathbf { x } \in \mathcal { R } ^ { v \times 1 }$ : BoW of a document, where $x _ { j } = 1$ iff word $j$ does appear in the document. $\mathbf { c } ^ { t } \in \mathcal { R } ^ { v \times 1 }$ : BoW of the local context $w ^ { t - k } , \cdot \cdot \cdot , w ^ { t - 1 } , w ^ { t + 1 } , \cdot \cdot \cdot , w ^ { t + k }$ at the target position $t$ . $c _ { j } ^ { t } = 1$ iff word $j$ appears within the sliding window of the target;
32
+ $\mathbf { U } \in \mathcal { R } ^ { h \times v }$ : the projection matrix from the input space to a hidden space of size $h$ . We use $\mathbf { u } _ { w }$ to denote the column in $\mathbf { U }$ for word $w$ , i.e., the “input“ vector of word $w$ ;
33
+ $\mathbf { V } ^ { \top } \in \mathcal { R } ^ { v \times h }$ : the projection matrix from the hidden space to output. Similarly, we use ${ \bf v } _ { w }$ to denote the column in $\mathbf { V }$ for word $w$ , i.e., the “output“ vector of word $w$ .
34
+
35
+ Word2Vec. Word2Vec proposed a neural network architecture of an input layer, a projection layer parameterized by the matrix $\mathbf { U }$ and an output layer by $\mathbf { V } ^ { \top }$ . It defines the probability of observing the target word $\mathrm { \Sigma } _ { w } \mathrm { \Sigma } _ { t }$ in a document $D$ given its local context $\mathbf { c } ^ { t }$ as
36
+
37
+ $$
38
+ P ( w ^ { t } | \mathbf { c } ^ { t } ) = \frac { \exp ( \mathbf { v } _ { w ^ { t } } ^ { \top } \mathbf { U } \mathbf { c } ^ { t } ) } { \sum _ { w ^ { \prime } \in V } \exp ( \mathbf { v } _ { w ^ { \prime } } ^ { \top } \mathbf { U } \mathbf { c } ^ { t } ) }
39
+ $$
40
+
41
+ The word vectors are then learned to maximize the log likelihood of observing the target word at each position of the document. Various techniques (Mitchell & Lapata, 2010; Zanzotto et al., 2010; Yessenalina & Cardie, 2011; Grefenstette et al., 2013; Socher et al., 2013; Kusner et al., 2015)
42
+
43
+ have been studied to generate vector representations of documents from word embeddings, among which the simplest approach is to use weighted average of word embeddings. Similarly, our method forms document representation by averaging word embeddings of all the words in the document. Differently, as our model encodes the compositionality of words in the learned word embeddings, heuristic weighting at test time is not required.
44
+
45
+ Paragraph Vectors. Paragraph Vectors, on the other hands, explicitly learns a document vector with the word embeddings. It introduces another projection matrix $\mathbf { D } \in \mathcal { R } ^ { h \times n }$ . Each column of $\mathbf { D }$ acts as a memory of the global topic of the corresponding document. It then defines the probability of observing the target word $w ^ { t }$ in a document $D$ given its local context $\mathbf { c } ^ { t }$ as
46
+
47
+ $$
48
+ P ( w ^ { t } | \mathbf { c } ^ { t } , \mathbf { d } ) = \frac { \exp ( \mathbf { v } _ { w ^ { t } } ^ { \top } ( \mathbf { U } \mathbf { c } ^ { t } + \mathbf { d } ) ) } { \sum _ { w ^ { \prime } \in V } \exp ( \mathbf { v } _ { w ^ { \prime } } ^ { \top } ( \mathbf { U } \mathbf { c } ^ { t } + \mathbf { d } ) ) }
49
+ $$
50
+
51
+ where $\mathbf { d } \in \mathbf { D }$ is the vector representation of the document. As we can see from this formula, the complexity of Paragraph Vectors grows with not only the size of the vocabulary, but also the size of the training corpus. While we can reasonably limit the size of a vocabulary to be within a million for most datasets, the size of a training corpus can easily go to billions. What is more concerning is that, in order to come up with the vector representations of unseen documents, we need to perform an expensive inference by appending more columns to $\mathbf { D }$ and gradient descent on $\mathbf { D }$ while fixing other parameters of the learned model.
52
+
53
+ # 3 METHOD
54
+
55
+ Several works (Mikolov & Dean, 2013; Mikolov et al., 2013b) showcased that syntactic and semantic regularities of phrases and sentences are reasonably well preserved by adding or subtracting word embeddings learned through Word2Vec. It prompts us to explore the option of simply representing a document as an average of word embeddings. Figure 1 illustrates the new model architecture.
56
+
57
+ ![](images/e8eb072e18940e89d6103a71c01bea2e73c21b99edcf56136c785fec5e0070e0.jpg)
58
+ Figure 1: A new framework for learning document vectors.
59
+
60
+ Similar to Word2Vec or Paragraph Vectors, Doc2VecC consists of an input layer, a projection layer as well as an output layer to predict the target word, “ceremony” in this example. The embeddings of neighboring words (“opening”, “for”, “the”) provide local context while the vector representation of the entire document (shown in grey) serves as the global context. In contrast to Paragraph Vectors, which directly learns a unique vector for each document, Doc2VecC represents each document as an average of the embeddings of words randomly sampled from the document (“performance” at position $p$ , “praised” at position $q$ , and “brazil” at position $r$ ).
61
+
62
+ Huang et al. (2012) also proposed the idea of using average of word embeddings to represent the global context of a document. Different from their work, we choose to corrupt the original document by randomly removing significant portion of words, and represent the document using only the embeddings of the words remained. This corruption mechanism offers us great speedup during training as it significantly reduces the number of parameters to update in back propagation. At the same time, as we are going to detail in the next section, it introduces a special form of regularization, which brings great performance improvement.
63
+
64
+ Here we describe the stochastic process we used to generate a global context at each update. The global context, which we denote as $\tilde { \mathbf { x } }$ , is generated through a unbiased mask-out/drop-out corruption, in which we randomly overwrites each dimension of the original document x with probability $q$ . To make the corruption unbiased, we set the uncorrupted dimensions to $1 / ( 1 - q )$ times its original value. Formally,
65
+
66
+ $$
67
+ \tilde { x } _ { d } = \left\{ \begin{array} { l l } { 0 , } & { \mathrm { w i t h ~ p r o b a b i l i t y ~ } q } \\ { \frac { x _ { d } } { 1 - q } , } & { \mathrm { o t h e r w i s e } } \end{array} \right.
68
+ $$
69
+
70
+ Doc2VecC then defines the probability of observing a target word $w ^ { t }$ given its local context $\mathbf { c } ^ { t }$ as well as the global context $\tilde { \bf x }$ as
71
+
72
+ $$
73
+ P ( w ^ { t } | \mathbf { c } ^ { t } , \tilde { \mathbf { x } } ) = \frac { \exp ( \mathbf { v } _ { w ^ { t } } ^ { \top } ( \widehat { \textbf { U c } ^ { t } } + \widehat { \frac { 1 } { T } } \mathbf { U } \tilde { \mathbf { x } } ) ) } { \sum _ { w ^ { \prime } \in V } \exp ( \mathbf { v } _ { w ^ { \prime } } ^ { \top } \left( \mathbf { U } \mathbf { c } ^ { t } + \frac { 1 } { T } \mathbf { U } \tilde { \mathbf { x } } \right) ) }
74
+ $$
75
+
76
+ Here $T$ is the length of the document. Exactly computing the probability is impractical, instead we approximate it with negative sampling (Mikolov et al., 2013a).
77
+
78
+ $$
79
+ \begin{array} { r c l } { f ( w , { \bf c } , \tilde { \bf x } ) } & { \equiv } & { \log P ( w ^ { t } | { \bf c } ^ { t } , \tilde { \bf x } ) } \\ & { \approx } & { \log \sigma \left( { \bf v } _ { w } ^ { \top } ( { \bf U } { \bf c } + \frac { 1 } { T } { \bf U } \tilde { \bf x } ) \right) + \displaystyle \sum _ { w ^ { \prime } \sim P _ { v } } \log \sigma \left( - { \bf v } _ { w ^ { \prime } } ^ { \top } ( { \bf U } { \bf c } + \frac { 1 } { T } { \bf U } \tilde { \bf x } ) \right) } \end{array}
80
+ $$
81
+
82
+ here $P _ { v }$ stands for a uniform distribution over the terms in the vocabulary. The two projection matrices $\mathbf { U }$ and $\mathbf { V }$ are then learned to minimize the loss:
83
+
84
+ $$
85
+ \ell = - \sum _ { i = 1 } ^ { n } \sum _ { t = 1 } ^ { T _ { i } } f ( w _ { i } ^ { t } , \mathbf { c } _ { i } ^ { t } , \tilde { \mathbf { x } } _ { i } ^ { t } )
86
+ $$
87
+
88
+ Given the learned projection matrix $\mathbf { U }$ , we then represent each document simply as an average of the embeddings of the words in the document,
89
+
90
+ $$
91
+ \mathbf { d } = \frac { 1 } { T } \sum _ { w \in D } \mathbf { u } _ { w } .
92
+ $$
93
+
94
+ We are going to elaborate next why we choose to corrupt the original document with the corruption model in eq.(1) during learning, and how it enables us to simply use the average word embeddings as the vector representation for documents at test time.
95
+
96
+ # 3.1 CORRUPTION AS DATA-DEPENDENT REGULARIZATION
97
+
98
+ We approximate the log likelihood for each instance $f ( w , { \bf c } , \tilde { { \bf x } } )$ in eq.(4) with its Taylor expansion with respect to $\tilde { \mathbf { x } }$ up to the second-order (Van Der Maaten et al., 2013; Wager et al., 2013; Chen et al., 2014). Concretely, we choose to expand at the mean of the corruption $\mu _ { \mathbf { x } } = \mathbb { E } _ { p ( \tilde { \mathbf { x } } | \mathbf { x } ) } [ \tilde { \mathbf { x } } ]$ :
99
+
100
+ $$
101
+ f ( w , \mathbf { c } , \tilde { \mathbf { x } } ) \approx f ( w , \mathbf { c } , \mu _ { \mathbf { x } } ) + ( \tilde { \mathbf { x } } - \boldsymbol { \mu } _ { \mathbf { x } } ) ^ { \top } \nabla _ { \tilde { \mathbf { x } } } f + \frac { 1 } { 2 } ( \tilde { \mathbf { x } } - \boldsymbol { \mu } _ { \mathbf { x } } ) ^ { \top } \nabla _ { \tilde { \mathbf { x } } } ^ { 2 } f ( \tilde { \mathbf { x } } - \boldsymbol { \mu } _ { \mathbf { x } } )
102
+ $$
103
+
104
+ where $\nabla _ { \tilde { \mathbf { x } } } f$ and $\nabla _ { \tilde { \mathbf { x } } } ^ { 2 } f$ are the first-order (i.e., gradient) and second-order (i.e., Hessian) of the log likelihood with respect to $\tilde { \mathbf { x } }$ . Expansion at the mean $\mu _ { \mathbf { x } }$ is crucial as shown in the following steps. Let us assume that for each instance, we are going to sample the global context $\tilde { \mathbf { x } }$ infinitely many times, and thus compute the expected log likelihood with respect to the corrupted $\tilde { \mathbf { x } }$ .
105
+
106
+ $$
107
+ \mathbb { E } _ { p ( \tilde { \mathbf { x } } | \mathbf { x } ) } [ f ( w , \mathbf { c } , \tilde { \mathbf { x } } ) ] \approx f ( w , \mathbf { c } , \mu _ { \mathbf { x } } ) + \frac { 1 } { 2 } \mathrm { t r } \left( \mathbb { E } [ ( \tilde { \mathbf { x } } - \mathbf { x } ) ( \tilde { \mathbf { x } } - \mathbf { x } ) ^ { \top } ] \nabla _ { \tilde { \mathbf { x } } } ^ { 2 } f \right)
108
+ $$
109
+
110
+ The linear term disappears as $\mathbb { E } _ { p ( \tilde { \mathbf { x } } | \mathbf { x } ) } [ \tilde { \mathbf { x } } - \mu _ { \mathbf { x } } ] = 0$ . We substitute in $\mathbf { x }$ for the mean $\mu _ { \mathbf { x } }$ of the corrupting distribution (unbiased corruption) and the matrix $\begin{array} { r } { \Sigma _ { \mathbf { x } } = \mathbb { E } [ ( \tilde { \mathbf { x } } - \mu _ { \mathbf { x } } ) ( \tilde { \mathbf { x } } - \mu _ { \mathbf { x } } ) ^ { \top } ] } \end{array}$ for the variance, and obtain
111
+
112
+ $$
113
+ \mathbb { E } _ { p ( \tilde { \mathbf { x } } | \mathbf { x } ) } [ f ( w , \mathbf { c } , \tilde { \mathbf { x } } ) ] \approx f ( w , \mathbf { c } , \mathbf { x } ) + \frac { 1 } { 2 } \mathrm { t r } \left( \Sigma _ { \mathbf { x } } \nabla _ { \tilde { \mathbf { x } } } ^ { 2 } f \right)
114
+ $$
115
+
116
+ As each word in a document is corrupted independently of others, the variance matrix $\Sigma _ { \mathbf { x } }$ is simplified to a diagonal matrix with $j ^ { t h }$ element equals $\frac { q } { 1 - q } \dot { x } _ { j } ^ { 2 }$ . As a result, we only need to compute the diagonal terms of the Hessian matrix $\nabla _ { \tilde { \mathbf { x } } } ^ { 2 } f$ .
117
+
118
+ The $j ^ { t h }$ dimension of the Hessian’s diagonal evaluated at the mean $\mathbf { x }$ is given by
119
+
120
+ $$
121
+ \frac { \partial ^ { 2 } f } { \partial x _ { j } ^ { 2 } } = - \sigma _ { w , \mathbf { c } , \mathbf { x } } ( 1 - \sigma _ { w , \mathbf { c } , \mathbf { x } } ) ( \frac { 1 } { T } \mathbf { v } _ { w } ^ { \top } \mathbf { u } _ { j } ) ^ { 2 } - \sum _ { w ^ { \prime } \sim P _ { v } } \sigma _ { w ^ { \prime } , \mathbf { c } , \mathbf { x } } ( 1 - \sigma _ { w ^ { \prime } , \mathbf { c } , \mathbf { x } } ) ( \frac { 1 } { T } \mathbf { v } _ { w ^ { \prime } } ^ { \top } \mathbf { u } _ { j } ) ^ { 2 }
122
+ $$
123
+
124
+ Plug the Hessian matrix and the variance matrix back into eq.(6), and then back to the loss defined in eq.(4), we can see that Doc2VecC intrinsically minimizes
125
+
126
+ $$
127
+ \ell = - \sum _ { i = 1 } ^ { n } \sum _ { t = 1 } ^ { T _ { i } } f ( w _ { i } ^ { t } , \mathbf { c } _ { i } ^ { t } , \mathbf { x } _ { i } ) + \frac { q } { 1 - q } \sum _ { j = 1 } ^ { v } R ( \mathbf { u } _ { j } )
128
+ $$
129
+
130
+ Each $f ( w _ { i } ^ { t } , \mathbf { c } _ { i } ^ { t } , \mathbf { x } _ { i } )$ in the first term measures the log likelihood of observing the target word $\boldsymbol { w } _ { i } ^ { t }$ given its local context $\mathbf { c } _ { i } ^ { t }$ and the document vector $\begin{array} { r } { \mathbf { d } _ { i } = \frac { 1 } { T } \mathbf { U } \mathbf { x } _ { i } } \end{array}$ . As such, Doc2VecC enforces that $a$ document vector generated by averaging word embeddings can capture the global semantics of the document, and fill in information missed in the local context.
131
+
132
+ The second term here is a data-dependent regularization. The regularization on the embedding $\mathbf { u } _ { j }$ of each word $j$ takes the following form,
133
+
134
+ $$
135
+ \mathfrak { l } ( \mathbf { u } _ { j } ) \propto \sum _ { i = 1 } ^ { n } \sum _ { t = 1 } ^ { T _ { i } } x _ { i j } ^ { 2 } \left[ \sigma _ { w _ { i } ^ { t } , \mathbf { c } _ { i } ^ { t } , \mathbf { x } _ { i } } ( 1 - \sigma _ { w _ { i } ^ { t } , \mathbf { c } _ { i } ^ { t } , \mathbf { x } _ { i } } ) ( \frac { 1 } { T } \mathbf { v } _ { w _ { i } ^ { t } } ^ { \top } \mathbf { u } _ { j } ) ^ { 2 } + \sum _ { w ^ { \prime } \sim P _ { v } } \sigma _ { w ^ { \prime } , \mathbf { c } _ { i } ^ { t } , \mathbf { x } _ { i } } ( 1 - \sigma _ { w ^ { \prime } , \mathbf { c } _ { i } ^ { t } , \mathbf { x } _ { i } } ) ( \frac { 1 } { T } \mathbf { v } _ { w ^ { \prime } } ^ { \top } \mathbf { u } _ { j } ) ^ { 2 } \right] ,
136
+ $$
137
+
138
+ where $\begin{array} { r } { \sigma _ { w , \mathbf { c } , \mathbf { x } } = \sigma ( \mathbf { v } _ { w } ^ { \top } ( \mathbf { U } \mathbf { c } + \frac { 1 } { T } \mathbf { U } \mathbf { x } ) ) } \end{array}$ prescribes the confidence of predicting the target word $w$ given its neighboring context c as well as the document vector $\begin{array} { r } { \mathbf { d } = \frac { 1 } { T } \mathbf { U } \mathbf { x } } \end{array}$ .
139
+
140
+ Closely examining $R ( \mathbf { u } _ { j } )$ leads to several interesting findings: 1. the regularizer penalizes more on the embeddings of common words. A word $j$ that frequently appears across the training corpus, i.e, $x _ { i j } = 1$ often, will have a bigger regularization than a rare word; 2. on the other hand, the regularization is modulated by $\sigma _ { w , \mathbf { c } , \mathbf { x } } ( 1 - \sigma _ { w , \mathbf { c } , \mathbf { x } } )$ , which is small if $\sigma _ { w , \mathbf { c } , \mathbf { x } } 1$ or 0. In other words, if $\mathbf { u } _ { j }$ is critical to a confident prediction $\sigma _ { w , \mathbf { c } , \mathbf { x } }$ when it is active, then the regularization is diminished. Similar effect was observed for dropout training for logistic regression model (Wager et al., 2013) and denoising autoencoders (Chen et al., 2014).
141
+
142
+ # 4 EXPERIMENTS
143
+
144
+ We evaluate Doc2VecC on a sentiment analysis task, a document classification task and a semantic relatedness task, along with several document representation learning algorithms. All experiments can be reproduced using the code available at https://github.com/mchen24/iclr2017
145
+
146
+ # 4.1 BASELINES
147
+
148
+ We compare against the following document representation baselines: bag-of-words (BoW); Denoising Autoencoders (DEA) (Vincent et al., 2008), a representation learned from reconstructing original document x using corrupted one x˜. SDAs have been shown to be the state-of-the-art for sentiment analysis tasks (Glorot et al., 2011). We used Kullback-Liebler divergence as the reconstruction error and an affine encoder. To scale up the algorithm to large vocabulary, we only take into account the non-zero elements of $\mathbf { x }$ in the reconstruction error and employed negative sampling for the remainings; Word2Vec (Mikolov et al., 2013a) $\mathbf { \tau } _ { \mathbf { \left| + I D F \right.} }$ , a representation generated through weighted average of word vectors learned using Word2Vec; Doc2Vec (Le & Mikolov, 2014); Skip-thought Vectors(Kiros et al., 2015), a generic, distributed sentence encoder that extends the Word2Vec skipgram model to sentence level. It has been shown to produce highly generic sentence representations that apply to various natural language processing tasks. We also include RNNLM (Mikolov et al., 2010), a recurrent neural network based language model in the comparison. In the semantic relatedness task, we further compare to LSTM-based methods (Tai et al., 2015) that have been reported on this dataset.
149
+
150
+ Table 1: Classification error of a linear classifier trained on various document representations on the Imdb dataset.
151
+
152
+ <table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>Error rate % (include test)</td><td rowspan=1 colspan=1>Error rate % (exclude test)</td></tr><tr><td rowspan=1 colspan=1>Bag-of-Words (BOW)</td><td rowspan=1 colspan=1>12.53</td><td rowspan=1 colspan=1>12.59</td></tr><tr><td rowspan=1 colspan=1>RNN-LM</td><td rowspan=1 colspan=1>13.59</td><td rowspan=1 colspan=1>13.59</td></tr><tr><td rowspan=1 colspan=1>Denoising Autoencoders (DEA)</td><td rowspan=1 colspan=1>11.58</td><td rowspan=1 colspan=1>12.54</td></tr><tr><td rowspan=1 colspan=1>Word2Vec+AVGWord2Vec +IDF</td><td rowspan=1 colspan=1>12.1111.28</td><td rowspan=1 colspan=1>12.6911.92</td></tr><tr><td rowspan=1 colspan=1>Paragraph Vectors</td><td rowspan=1 colspan=1>10.81</td><td rowspan=1 colspan=1>12.10</td></tr><tr><td rowspan=1 colspan=1>Skip-thought Vectors</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>17.42</td></tr><tr><td rowspan=1 colspan=1>Doc2VecC</td><td rowspan=1 colspan=1>10.48</td><td rowspan=1 colspan=1>11.70</td></tr></table>
153
+
154
+ # 4.2 SENTIMENT ANALYSIS
155
+
156
+ For sentiment analysis, we use the IMDB movie review dataset. It contains 100,000 movies reviews categorized as either positive or negative. It comes with predefined train/test split (Maas et al., 2011): 25,000 reviews are used for training, 25,000 for testing, and the rest as unlabeled data. The two classes are balanced in the training and testing sets. We remove words that appear less than 10 times in the training set, resulting in a vocabulary of 43,375 distinct words and symbols.
157
+
158
+ Setup. We test the various representation learning algorithms under two settings: one follows the same protocol proposed in (Mesnil et al., 2014), where representation is learned using all the available data, including the test set; another one where the representation is learned using training and unlabeled set only. For both settings, a linear support vector machine (SVM) (Fan et al., 2008) is trained afterwards on the learned representation for classification. For Skip-thought Vectors, we used the generic model1 trained on a much bigger book corpus to encode the documents. A vector of 4800 dimensions, first 2400 from the uni-skip model, and the last 2400 from the bi-skip model, are generated for each document. In comparison, all the other algorithms produce a vector representation of size 100. The supervised RNN-LM is learned on the training set only. The hyper-parameters are tuned on a validation set subsampled from the training set.
159
+
160
+ Accuracy. Comparing the two columns in Table 1, we can see that all the representation learning algorithms benefits from including the testing data during the representation learning phrase. Doc2VecC achieved similar or even better performance than Paragraph Vectors. Both methods outperforms the other baselines, beating the BOW representation by $15 \%$ . In comparison with Word2Vec $+ \mathrm { I D F }$ , which applies post-processing on learned word embeddings to form document representation, Doc2VecC naturally enforces document semantics to be captured by averaged word embeddings during training. This leads to better performance. Doc2VecC reduces to Denoising Autoencoders (DEA) if the local context words are removed from the paradigm shown in Figure 1. By including the context words, Doc2VecC allows the document vector to focus more on capturing the global context. Skip-thought vectors perform surprisingly poor on this dataset comparing to other methods. We hypothesized that it is due to the length of paragraphs in this dataset. The average length of paragraphs in the IMDB movie review dataset is 296.5, much longer than the ones used for training and testing in the original paper, which is in the order of 10. As noted in (Tai et al., 2015), the performance of LSTM based method (similarly, the gated RNN used in Skip-thought vectors) drops significantly with increasing paragraph length, as it is hard to preserve state over long sequences of words.
161
+
162
+ Time. Table 2 summarizes the time required by these algorithms to learn and generate the document representation. Word2Vec is the fastest one to train. Denoising Autoencoders and Doc2VecC second that. The number of parameters that needs to be back-propagated in each update was increased by the number of surviving words in x˜. We found that both models are not sensitive to the corruption rate $q$ in the noise model. Since the learning time decreases with higher corruption rate, we used $q ~ = ~ 0 . 9$ throughout the experiments. Paragraph Vectors takes longer time to train as there are more parameters (linear to the number of document in the learning set) to learn. At test time, Word2Vec $+ \mathrm { I D F }$ , DEA and Doc2VecC all use (weighted) averaging of word embeddings as document representation. Paragraph Vectors, on the other hand, requires another round of inference to produce the vector representation of unseen test documents. It takes Paragraph Vectors 4 minutes and 17 seconds to infer the vector representations for the 25,000 test documents, in comparison to 7 seconds for the other methods. As we did not re-train the Skip-thought vector models on this dataset, the training time2 reported in the table is the time it takes to generate the embeddings for the 25,000 training documents. Due to repeated high-dimensional matrix operations required for encoding long paragraphs, it takes fairly long time to generate the representations for these documents. Similarly for testing. The experiments were conducted on a desktop with Intel i7 2.2Ghz cpu.
163
+
164
+ Table 2: Learning time and representation generation time required by different representation learning algorithms.
165
+
166
+ <table><tr><td>Model</td><td>Learning time</td><td>Generation time</td></tr><tr><td>DenoisingAutoencoders</td><td>3m23s</td><td>7s</td></tr><tr><td>Word2Vec+IDF</td><td>2m 33s</td><td>7s</td></tr><tr><td>Paragraph Vectors</td><td>4m 54s</td><td>4m 17s</td></tr><tr><td>Skip-thought</td><td>2h</td><td>2h</td></tr><tr><td>Doc2VecC</td><td>4m 30s</td><td>7s</td></tr></table>
167
+
168
+ Table 3: Words with embeddings closest to 0 learned by different algorithms.
169
+
170
+ <table><tr><td>Word2Vec</td><td>harp(118)distasteful(115)switzerland(101)shabby(103)fireworks(101)heav- ens(100) thornton(108) endeavor(100) dense(108) circumstance(119) debacle(103)</td></tr><tr><td>ParaVectors</td><td>harp(118) dense(108) reels(115) fireworks(101) its&#x27;(103) unnoticed(112) pony(102) fulfilled(107) heavens(100)bliss(110)canned(114) shabby(103) debacle(103)</td></tr><tr><td>Doc2VecC</td><td>,(1099319) .(1306691) the(1340408) of(581667) and(651119) up(49871) to(537570) that(275240) time(48205) endeavor(100) here(21118) way(31302) own(13456)</td></tr></table>
171
+
172
+ Data dependent regularization. As explained in Section 3.1, the corruption introduced in Doc2VecC acts as a data-dependent regularization that suppresses the embeddings of frequent but uninformative words. Here we conduct an experiment to exam the effect. We used a cutoff of 100 in this experiment. Table 3 lists the words having the smallest $l _ { 2 }$ norm of embeddings found by different algorithms. The number inside the parenthesis after each word is the number of times this word appears in the learning set. In word2Vec or Paragraph Vectors, the least frequent words have embeddings that are close to zero, despite some of them being indicative of sentiment such as debacle, bliss and shabby. In contrast, Doc2VecC manages to clamp down the representation of words frequently appear in the training set, but are uninformative, such as symbols and stop words.
173
+
174
+ Subsampling frequent words. Note that for all the numbers reported, we applied the trick of subsampling of frequent words introduced in (Mikolov & Dean, 2013) to counter the imbalance between frequent and rare words. It is critical to the performance of simple Wor $\mathrm { d } 2 \mathrm { V e c } { + } \mathrm { A V G }$ as the sole remedy to diminish the contribution of common words in the final document representation. If we were to remove this step, the error rate of Word2Vec+AVG will increases from $1 \bar { 2 } . 1 \%$ to $1 3 . 2 \%$ . Doc2VecC on the other hand naturally exerts a stronger regularization toward embeddings of words that are frequent but uninformative, therefore does not rely on this trick.
175
+
176
+ # 4.3 WORD ANALOGY
177
+
178
+ In table 3, we demonstrated that the corruption model introduced in Doc2VecC dampens the embeddings of words which are common and non-discriminative (stop words). In this experiment, we are going to quantatively compare the word embeddings generated by Doc2VecC to the ones generated by Word2Vec, or Paragraph Vectors on the word analogy task introduced by Mikolov et al. (2013a). The dataset contains five types of semantic questions, and nine types of syntactic questions, with a total of 8,869 semantic and 10,675 syntactic questions. The questions are answered through simple linear algebraic operations on the word embeddings generated by different methods. Please refer to the original paper for more details on the evaluation protocol.
179
+
180
+ ![](images/123c3ea484cbd8abf5e1a10a911eec42a0805126b428524bdc0f32dac75a4efc.jpg)
181
+ Figure 2: Accuracy on subset of the Semantic-Syntactic Word Relationship test set. Only questions containing words from the most frequent $3 0 \mathrm { k }$ words are included in the test.
182
+
183
+ Table 4: Top 1 accuracy on the 5 type of semantics and 9 types of syntactic questions.
184
+
185
+ <table><tr><td>Semantic questions</td><td>Word2Vec</td><td>Doc2VecC</td><td>Syntactic questions</td><td>Word2Vec</td><td>Doc2VecC</td></tr><tr><td>capital-common-countries capital-world currency city-in-state family</td><td>73.59 67.94 17.14 34.49 68.71</td><td>81.82 77.96 12.86 42.86 64.62</td><td>gram1-adjective-to-adverb gram2-opposite gram3-comparative gram4-superlative gram5-present-participle gram6-nationality-adjective gram7-past-tense</td><td>19.25 14.07 60.21 52.87 56.34 88.71 47.05</td><td>20.32 25.54 74.47 55.40 65.81 91.03</td></tr></table>
186
+
187
+ We trained the word embeddings of different methods using the English news dataset released under the ACL workshop on statistical machine translation. The training set includes close to 15M paragraphs with 355M tokens. We compare the performance of word embeddings trained by different methods with increasing embedding dimensionality as well as increasing training data.
188
+
189
+ We observe similar trends as in Mikolov et al. (2013a). Increasing embedding dimensionality as well as training data size improves performance of the word embeddings on this task. However, the improvement is diminishing. Doc2VecC produces word embeddings which performs significantly better than the ones generated by Word2Vec. We observe close to $2 0 \%$ uplift when we train on the full training corpus. Paragraph vectors on the other hand performs surprisingly bad on this dataset. Our hypothesis is that due to the large capacity of the model architecture, Paragraph Vectors relies mostly on the unique document vectors to capture the information in a text document instead of learning the word semantic or syntactic similarities. This also explains why the PV-DBOW Le & Mikolov (2014) model architecture proposed in the original work, which completely removes word embedding layers, performs comparable to the distributed memory version.
190
+
191
+ In table 5, we list a detailed comparison of the performance of word embeddings generated by Word2Vec and Doc2VecC on the 14 subtasks, when trained on the full dataset with embedding of size 100. We can see that Doc2VecC significantly outperforms the word embeddings produced by Word2Vec across almost all the subtasks.
192
+
193
+ # 4.4 DOCUMENT CLASSIFICATION
194
+
195
+ For the document classification task, we use a subset of the wikipedia dump, which contains over 300,000 wikipedia pages in 100 categories. The 100 categories includes categories under sports, entertainment, literature, and politics etc. Examples of categories include American drama films, Directorial debut films, Major League Baseball pitchers and Sydney Swans players. Body texts (the second paragraph) were extracted for each page as a document. For each category, we select 1,000 documents with unique category label, and 100 documents were used for training and 900 documents for testing. The remaining documents are used as unlabeled data. The 100 classes are balanced in the training and testing sets. For this data set, we learn the word embedding and document representation for all the algorithms using all the available data. We apply a cutoff of 10, resulting in a vocabulary of size 107, 691.
196
+
197
+ Table 5: Classification error $( \% )$ of a linear classifier trained on various document representations on the Wikipedia dataset.
198
+
199
+ <table><tr><td>Model</td><td>BOW</td><td>DEA</td><td>Word2Vec + AVG</td><td>Word2Vec + IDF</td><td>ParagraphVectors</td><td>Doc2VecC</td></tr><tr><td>h=100</td><td>36.03</td><td>32.30</td><td>33.2</td><td>33.16</td><td>35.78</td><td>31.92</td></tr><tr><td>h = 200</td><td>36.03</td><td>31.36</td><td>32.46</td><td>32.48</td><td>34.92</td><td>30.84</td></tr><tr><td>h= 500</td><td>36.03</td><td>31.10</td><td>32.02</td><td>32.13</td><td>33.93</td><td>30.43</td></tr><tr><td>h = 1000</td><td>36.03</td><td>31.13</td><td>31.78</td><td>32.06</td><td>33.02</td><td>30.24</td></tr></table>
200
+
201
+ ![](images/57cdff4ce4268ee2f6e0c28461e1d49dc624708cd10f4f6a480dad4dbe856201.jpg)
202
+ Figure 3: Visualization of document vectors on Wikipedia dataset using t-SNE.
203
+
204
+ Table 5 summarizes the classification error of a linear SVM trained on representations of different sizes. We can see that most of the algorithms are not sensitive to the size of the vector representation. Doc2Vec benefits most from increasing representation size. Across all sizes of representations, Doc2VecC outperform the existing algorithms by a significant margin. In fact, Doc2VecC can achieve same or better performance with a much smaller representation vector.
205
+
206
+ Figure 3 visualizes the document representations learned by Doc2Vec (left) and Doc2VecC (right) using t-SNE (Maaten & Hinton, 2008). We can see that documents from the same category are nicely clustered using the representation generated by Doc2VecC. Doc2Vec, on the other hand, does not produce a clear separation between different categories, which explains its worse performance reported in Table 5.
207
+
208
+ Figure 4 visualizes the vector representation generated by Doc2VecC w.r.t. coarser categorization. we manually grouped the 100 categories into 7 coarse categories, television, albums, writers, musicians, athletes, species and actors. Categories that do no belong to any of these 7 groups are not included in the figure.
209
+
210
+ ![](images/78510e9905f3d54e2320241b5adef0e658aa23410911cf81329952d7a1337fac.jpg)
211
+ Figure 4: Visualization of Wikipedia Doc2VecC vectors using t-SNE.
212
+
213
+ We can see that documents belonging to a coarser category are grouped together. This subset includes is a wide range of sports descriptions, ranging from football, crickets, baseball, and cycling etc., which explains why the athletes category are less concentrated. In the projection, we can see documents belonging to the musician category are closer to those belonging to albums category than those of athletes or species.
214
+
215
+ # 4.5 SEMANTIC RELATEDNESS
216
+
217
+ We test Doc2VecC on the SemEval 2014 Task 1: semantic relatedness SICK dataset (Marelli et al., 2014). Given two sentences, the task is to determine how closely they are semantically related. The set contains 9,927 pairs of sentences with human annotated relatedness score, ranging from 1 to 5. A score of 1 indicates that the two sentences are not related, while 5 indicates high relatedness. The set is splitted into a training set of 4,500 instances, a validation set of 500, and a test set of 4,927.
218
+
219
+ We compare $\mathrm { D o c } 2 \mathrm { V e c C }$ with several winning solutions of the competition as well as several more recent techniques reported on this dataset, including bi-directional LSTM and Tree-LSTM3 trained from scratch on this dataset, Skip-thought vectors learned a large book corpus 4 (Zhu et al., 2015) and produced sentence embeddings of 4,800 dimensions on this dataset. We follow the same protocol as in skip-thought vectors, and train Doc2VecC on the larger book corpus dataset. Contrary to the vocabulary expansion technique used in (Kiros et al., 2015) to handle out-of-vocabulary words, we extend the vocabulary of the learned model directly on the target dataset in the following way: we use the pre-trained word embedding as an initialization, and fine-tune the word and sentence representation on the SICK dataset. Notice that the fine-tuning is done for sentence representation learning only, and we did not use the relatedness score in the learning. This step brings small improvement to the performance of our algorithm. Given the sentence embeddings, we used the exact same training and testing protocol as in (Kiros et al., 2015) to score each pair of sentences: with two sentence embedding $\mathbf { u } _ { 1 }$ and $\mathbf { u } _ { 2 }$ , we concatenate their component-wise product, $\mathbf { u } _ { 1 } \cdot \mathbf { u } _ { 2 }$ and their absolute difference, $\lvert \mathbf { u } _ { 1 } - \mathbf { u } _ { 2 } \rvert$ as the feature representation.
220
+
221
+ Table 6 summarizes the performance of various algorithms on this dataset. Despite its simplicity, Doc2VecC significantly out-performs the winning solutions of the competition, which are heavily feature engineered toward this dataset and several baseline methods, noticeably the dependency-tree RNNs introduced in (Socher et al., 2014), which relies on expensive dependency parsers to compose sentence vectors from word embeddings. The performance of $\mathrm { D o c } 2 \mathrm { V e c C }$ is slightly worse than the LSTM based methods or skip-thought vectors on this dataset, while it significantly outperforms skip-thought vectors on the IMDB movie review dataset $( 1 1 . 7 0 \%$ error rate vs $1 7 . 4 2 \%$ ). As we hypothesized in previous section, while $\mathrm { D o c } 2 \mathrm { V e c C }$ is better at handling longer paragraphs, LSTMbased methods are superior for relatively short sentences (of length in the order of 10s). We would like to point out that Doc2VecC is much faster to train and test comparing to skip-thought vectors. It takes less than 2 hours to learn the embeddings on the large book corpus for Doc2VecC on a desktop with Intel i7 2.2Ghz cpu, in comparison to the 2 weeks on GPU required by skip-thought vectors.
222
+
223
+ # 5 CONCLUSION
224
+
225
+ We introduce a new model architecture Doc2VecC for document representation learning. It is very efficient to train and test thanks to its simple model architecture. Doc2VecC intrinsically makes sure document representation generated by averaging word embeddings capture semantics of document during learning. It also introduces a data-dependent regularization which favors informative or rare words while dampening the embeddings of common and non-discriminative words. As such, each document can be efficiently represented as a simple average of the learned word embeddings. In comparison to several existing document representation learning algorithms, Doc2VecC outperforms not only in testing efficiency, but also in the expressiveness of the generated representations.
226
+
227
+ Table 6: Test set results on the SICK semantic relatedness task. The first group of results are from the submission to the 2014 SemEval competition; the second group includes several baseline methods reported in (Tai et al., 2015); the third group are methods based on LSTM reported in (Tai et al., 2015) as well as the skip-thought vectors (Kiros et al., 2015).
228
+
229
+ <table><tr><td rowspan=1 colspan=1>Method</td><td rowspan=1 colspan=1>Pearson&#x27;sγ</td><td rowspan=1 colspan=1>Spearman&#x27;s p</td><td rowspan=1 colspan=1>MSE</td></tr><tr><td rowspan=2 colspan=1>Illinois-LHUNAL-NLPMeaning FactoryECNU</td><td rowspan=2 colspan=1>0.79930.80700.82680.8279</td><td rowspan=1 colspan=1>0.7538</td><td rowspan=1 colspan=1>0.3692</td></tr><tr><td rowspan=1 colspan=1>0.74890.77210.7689</td><td rowspan=1 colspan=1>0.35500.32240.3250</td></tr><tr><td rowspan=1 colspan=1>Mean vectors (Word2Vec + avg)DT-RNN (Socher et al., 2014)SDT-RNN (Socher et al., 2014)</td><td rowspan=1 colspan=1>0.75770.79230.7900</td><td rowspan=1 colspan=1>0.67380.73190.7304</td><td rowspan=1 colspan=1>0.45570.38220.3848</td></tr><tr><td rowspan=1 colspan=1>LSTM (Tai et al., 2015)Bidirectional LSTM (Tai et al., 2015)Dependency Tree-LSTM (Tai et al.,2015)combine-skip (Kiros et al., 2015)</td><td rowspan=1 colspan=1>0.85280.85670.86760.8584</td><td rowspan=1 colspan=1>0.79110.79660.80830.7916</td><td rowspan=1 colspan=1>0.28310.27360.25320.2687</td></tr><tr><td rowspan=1 colspan=1>Doc2VecC</td><td rowspan=1 colspan=1>0.8381</td><td rowspan=1 colspan=1>0.7621</td><td rowspan=1 colspan=1>0.3053</td></tr></table>
230
+
231
+ # REFERENCES
232
+
233
+ David M Blei, Andrew $\mathrm { ~ Y ~ N ~ g ~ }$ , and Michael I Jordan. Latent dirichlet allocation. Journal of machine Learning research, 3(Jan):993–1022, 2003.
234
+
235
+ Minmin Chen, Zhixiang Xu, Kilian Weinberger, and Fei Sha. Marginalized denoising autoencoders for domain adaptation. arXiv preprint arXiv:1206.4683, 2012.
236
+
237
+ Minmin Chen, Kilian Q Weinberger, Fei Sha, and Yoshua Bengio. Marginalized denoising autoencoders for nonlinear representations. In ICML, pp. 1476–1484, 2014.
238
+
239
+ Bruce Croft and John Lafferty. Language modeling for information retrieval, volume 13. Springer Science & Business Media, 2013.
240
+
241
+ Andrew M Dai and Quoc V Le. Semi-supervised sequence learning. In Advances in Neural Information Processing Systems, pp. 3079–3087, 2015.
242
+
243
+ Andrew M Dai, Christopher Olah, and Quoc V Le. Document embedding with paragraph vectors. arXiv preprint arXiv:1507.07998, 2015.
244
+
245
+ Scott Deerwester, Susan T Dumais, George W Furnas, Thomas K Landauer, and Richard Harshman. Indexing by latent semantic analysis. Journal of the American society for information science, 41 (6):391, 1990.
246
+
247
+ Rong-En Fan, Kai-Wei Chang, Cho-Jui Hsieh, Xiang-Rui Wang, and Chih-Jen Lin. Liblinear: A library for large linear classification. JMLR, 9(Aug):1871–1874, 2008.
248
+
249
+ Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Domain adaptation for large-scale sentiment classification: A deep learning approach. In ICML, pp. 513–520, 2011.
250
+
251
+ Edward Grefenstette, Georgiana Dinu, Yao-Zhong Zhang, Mehrnoosh Sadrzadeh, and Marco Baroni. Multi-step regression learning for compositional distributional semantics. arXiv preprint arXiv:1301.6939, 2013.
252
+
253
+ Eric H Huang, Richard Socher, Christopher D Manning, and Andrew Y Ng. Improving word representations via global context and multiple word prototypes. In ACL, pp. 873–882, 2012.
254
+
255
+ Yoon Kim, Yacine Jernite, David Sontag, and Alexander M Rush. Character-aware neural language models. arXiv preprint arXiv:1508.06615, 2015.
256
+
257
+ Ryan Kiros, Yukun Zhu, Ruslan R Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Skip-thought vectors. In Advances in neural information processing systems, pp. 3294–3302, 2015.
258
+
259
+ Matt J Kusner, Yu Sun, Nicholas I Kolkin, and Kilian Q Weinberger. From word embeddings to document distances. In Proceedings of the 32nd International Conference on Machine Learning (ICML 2015), pp. 957–966, 2015.
260
+
261
+ Quoc V Le and Tomas Mikolov. Distributed representations of sentences and documents. In ICML, volume 14, pp. 1188–1196, 2014.
262
+
263
+ Andrew L Maas, Raymond E Daly, Peter T Pham, Dan Huang, Andrew $\mathrm { ~ Y ~ N ~ g ~ } _ { }$ , and Christopher Potts. Learning word vectors for sentiment analysis. In ACL, pp. 142–150, 2011.
264
+
265
+ Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(Nov):2579–2605, 2008.
266
+
267
+ Marco Marelli, Luisa Bentivogli, Marco Baroni, Raffaella Bernardi, Stefano Menini, and Roberto Zamparelli. Semeval-2014 task 1: Evaluation of compositional distributional semantic models on full sentences through semantic relatedness and textual entailment. SemEval-2014, 2014.
268
+
269
+ Gregoire Mesnil, Tomas Mikolov, Marc’Aurelio Ranzato, and Yoshua Bengio. Ensemble of gen- ´ erative and discriminative techniques for sentiment analysis of movie reviews. arXiv preprint arXiv:1412.5335, 2014.
270
+
271
+ T Mikolov and J Dean. Distributed representations of words and phrases and their compositionality. Advances in neural information processing systems, 2013.
272
+
273
+ Tomas Mikolov, Martin Karafiat, Lukas Burget, Jan Cernock ´ y, and Sanjeev Khudanpur. Recurrent \` neural network based language model. In Interspeech, volume 2, pp. 3, 2010.
274
+
275
+ Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781, 2013a.
276
+
277
+ Tomas Mikolov, Wen-tau Yih, and Geoffrey Zweig. Linguistic regularities in continuous space word representations. In HLT-NAACL, volume 13, pp. 746–751, 2013b.
278
+
279
+ Jeff Mitchell and Mirella Lapata. Composition in distributional models of semantics. Cognitive science, 34(8):1388–1429, 2010.
280
+
281
+ Gerard Salton and Christopher Buckley. Term-weighting approaches in automatic text retrieval. Information processing & management, 24(5):513–523, 1988.
282
+
283
+ Richard Socher, Alex Perelygin, Jean Y Wu, Jason Chuang, Christopher D Manning, Andrew $\mathrm { \Upsilon { Y g } }$ , and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In EMNLP, volume 1631, pp. 1642, 2013.
284
+
285
+ Richard Socher, Andrej Karpathy, Quoc V Le, Christopher D Manning, and Andrew Y Ng. Grounded compositional semantics for finding and describing images with sentences. Transactions of the Association for Computational Linguistics, 2:207–218, 2014.
286
+
287
+ Kai Sheng Tai, Richard Socher, and Christopher D Manning. Improved semantic representations from tree-structured long short-term memory networks. arXiv preprint arXiv:1503.00075, 2015.
288
+
289
+ Laurens Van Der Maaten, Minmin Chen, Stephen Tyree, and Kilian Q Weinberger. Learning with marginalized corrupted features. In ICML (1), pp. 410–418, 2013.
290
+
291
+ Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In Proceedings of the 25th international conference on Machine learning, pp. 1096–1103. ACM, 2008.
292
+
293
+ Stefan Wager, Sida Wang, and Percy S Liang. Dropout training as adaptive regularization. In Advances in neural information processing systems, pp. 351–359, 2013.
294
+
295
+ Sida Wang and Christopher D Manning. Baselines and bigrams: Simple, good sentiment and topic classification. In Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics: Short Papers-Volume 2, pp. 90–94. Association for Computational Linguistics, 2012.
296
+
297
+ Ainur Yessenalina and Claire Cardie. Compositional matrix-space models for sentiment analysis. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, pp. 172–182. Association for Computational Linguistics, 2011.
298
+
299
+ Fabio Massimo Zanzotto, Ioannis Korkontzelos, Francesca Fallucchi, and Suresh Manandhar. Estimating linear models for compositional distributional semantics. In Proceedings of the 23rd International Conference on Computational Linguistics, pp. 1263–1271, 2010.
300
+
301
+ Xiang Zhang and Yann LeCun. Text understanding from scratch. arXiv preprint arXiv:1502.01710, 2015.
302
+
303
+ Yukun Zhu, Ryan Kiros, Richard Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In arXiv preprint arXiv:1506.06724, 2015.
parse/train/B1Igu2ogg/B1Igu2ogg_content_list.json ADDED
@@ -0,0 +1,1529 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "EFFICIENT VECTOR REPRESENTATION FOR DOCU-MENTS THROUGH CORRUPTION",
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": "Minmin Chen \nCriteo Research \nPalo Alto, CA 94301, USA m.chen@criteo.com ",
17
+ "bbox": [
18
+ 183,
19
+ 170,
20
+ 364,
21
+ 226
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 262,
32
+ 544,
33
+ 277
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "We present an efficient document representation learning framework, Document Vector through Corruption (Doc2VecC). Doc2VecC represents each document as a simple average of word embeddings. It ensures a representation generated as such captures the semantic meanings of the document during learning. A corruption model is included, which introduces a data-dependent regularization that favors informative or rare words while forcing the embeddings of common and non-discriminative ones to be close to zero. Doc2VecC produces significantly better word embeddings than Word2Vec. We compare Doc2VecC with several state-of-the-art document representation learning algorithms. The simple model architecture introduced by Doc2VecC matches or out-performs the state-of-the-art in generating high-quality document representations for sentiment analysis, document classification as well as semantic relatedness tasks. The simplicity of the model enables training on billions of words per hour on a single machine. At the same time, the model is very efficient in generating representations of unseen documents at test time. ",
40
+ "bbox": [
41
+ 233,
42
+ 291,
43
+ 764,
44
+ 500
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 523,
55
+ 336,
56
+ 540
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Text understanding starts with the challenge of finding machine-understandable representation that captures the semantics of texts. Bag-of-words (BoW) and its N-gram extensions are arguably the most commonly used document representations. Despite its simplicity, BoW works surprisingly well for many tasks (Wang & Manning, 2012). However, by treating words and phrases as unique and discrete symbols, BoW often fails to capture the similarity between words or phrases and also suffers from sparsity and high dimensionality. ",
63
+ "bbox": [
64
+ 174,
65
+ 554,
66
+ 823,
67
+ 638
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Recent works on using neural networks to learn distributed vector representations of words have gained great popularity. The well celebrated Word2Vec (Mikolov et al., 2013a), by learning to predict the target word using its neighboring words, maps words of similar meanings to nearby points in the continuous vector space. The surprisingly simple model has succeeded in generating high-quality word embeddings for tasks such as language modeling, text understanding and machine translation. Word2Vec naturally scales to large datasets thanks to its simple model architecture. It can be trained on billions of words per hour on a single machine. ",
74
+ "bbox": [
75
+ 174,
76
+ 645,
77
+ 825,
78
+ 742
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Paragraph Vectors (Le & Mikolov, 2014) generalize the idea to learn vector representation for documents. A target word is predicted by the word embeddings of its neighbors in together with a unique document vector learned for each document. It outperforms established document representations, such as BoW and Latent Dirichlet Allocation (Blei et al., 2003), on various text understanding tasks (Dai et al., 2015). However, two caveats come with this approach: 1) the number of parameters grows with the size of the training corpus, which can easily go to billions; and 2) it is expensive to generate vector representations for unseen documents at test time. ",
85
+ "bbox": [
86
+ 174,
87
+ 750,
88
+ 825,
89
+ 847
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "We propose an efficient model architecture, referred to as Document Vector through Corruption (Doc2VecC), to learn vector representations for documents. It is motivated by the observation that linear operations on the word embeddings learned by Word2Vec can sustain substantial amount of syntactic and semantic meanings of a phrase or a sentence (Mikolov et al., 2013b). For example, vec(“Russia”) $^ +$ vec(“river”) is close to vec(“Volga River”) (Mikolov & Dean, 2013), and vec(“king”) - vec(“man”) $^ +$ vec(“women”) is close to vec(“queen”) (Mikolov et al., 2013b). In Doc2VecC, we represent each document as a simple average of the word embeddings of all the words in the document. In contrast to existing approaches which post-process learned word embeddings to form document representation (Socher et al., 2013; Mesnil et al., 2014), Doc2VecC enforces a meaningful document representation can be formed by averaging the word embeddings during learning. Furthermore, we include a corruption model that randomly remove words from a document during learning, a mechanism that is critical to the performance and learning speed of our algorithm. ",
96
+ "bbox": [
97
+ 174,
98
+ 854,
99
+ 823,
100
+ 924
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "",
107
+ "bbox": [
108
+ 173,
109
+ 103,
110
+ 825,
111
+ 214
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "Doc2VecC has several desirable properties: 1. The model complexity of Doc2VecC is decoupled from the size of the training corpus, depending only on the size of the vocabulary; 2. The model architecture of Doc2VecC resembles that of Word2Vec, and can be trained very efficiently; 3. The new framework implicitly introduces a data-dependent regularization, which favors rare or informative words and suppresses words that are common but not discriminative; 4. Vector representation of a document can be generated by simply averaging the learned word embeddings of all the words in the document, which significantly boost test efficiency; 5. The vector representation generated by Doc2VecC matches or beats the state-of-the-art for sentiment analysis, document classification as well as semantic relatedness tasks. ",
118
+ "bbox": [
119
+ 173,
120
+ 222,
121
+ 825,
122
+ 347
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "2 RELATED WORKS AND NOTATIONS ",
129
+ "text_level": 1,
130
+ "bbox": [
131
+ 174,
132
+ 367,
133
+ 500,
134
+ 383
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "Text representation learning has been extensively studied. Popular representations range from the simplest BoW and its term-frequency based variants (Salton & Buckley, 1988), language model based methods (Croft & Lafferty, 2013; Mikolov et al., 2010; Kim et al., 2015), topic models (Deerwester et al., 1990; Blei et al., 2003), Denoising Autoencoders and its variants (Vincent et al., 2008; Chen et al., 2012), and distributed vector representations (Mesnil et al., 2014; Le & Mikolov, 2014; Kiros et al., 2015). Another prominent line of work includes learning task-specific document representation with deep neural networks, such as CNN (Zhang & LeCun, 2015) or LSTM based approaches (Tai et al., 2015; Dai & Le, 2015). ",
141
+ "bbox": [
142
+ 174,
143
+ 398,
144
+ 825,
145
+ 511
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "In this section, we briefly introduce Word2Vec and Paragraph Vectors, the two approaches that are most similar to ours. There are two well-know model architectures used for both methods, referred to as Continuous Bag-of-Words (CBoW) and Skipgram models (Mikolov et al., 2013a). In this work, we focus on CBoW. Extending to Skipgram is straightforward. Here are the notations we are going to use throughout the paper: ",
152
+ "bbox": [
153
+ 174,
154
+ 517,
155
+ 825,
156
+ 588
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "$\\mathcal { D } = \\{ D _ { 1 } , \\cdots , D _ { n } \\}$ : a training corpus of size $n$ , in which each document $D _ { i }$ contains a variablelength sequence of words $w _ { i } ^ { 1 } , \\cdots , w _ { i } ^ { T _ { i } }$ ; \n$V$ : the vocabulary used in the training corpus, of sizes $v$ ; \n$\\mathbf { x } \\in \\mathcal { R } ^ { v \\times 1 }$ : BoW of a document, where $x _ { j } = 1$ iff word $j$ does appear in the document. $\\mathbf { c } ^ { t } \\in \\mathcal { R } ^ { v \\times 1 }$ : BoW of the local context $w ^ { t - k } , \\cdot \\cdot \\cdot , w ^ { t - 1 } , w ^ { t + 1 } , \\cdot \\cdot \\cdot , w ^ { t + k }$ at the target position $t$ . $c _ { j } ^ { t } = 1$ iff word $j$ appears within the sliding window of the target; \n$\\mathbf { U } \\in \\mathcal { R } ^ { h \\times v }$ : the projection matrix from the input space to a hidden space of size $h$ . We use $\\mathbf { u } _ { w }$ to denote the column in $\\mathbf { U }$ for word $w$ , i.e., the “input“ vector of word $w$ ; \n$\\mathbf { V } ^ { \\top } \\in \\mathcal { R } ^ { v \\times h }$ : the projection matrix from the hidden space to output. Similarly, we use ${ \\bf v } _ { w }$ to denote the column in $\\mathbf { V }$ for word $w$ , i.e., the “output“ vector of word $w$ . ",
163
+ "bbox": [
164
+ 186,
165
+ 598,
166
+ 826,
167
+ 773
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "Word2Vec. Word2Vec proposed a neural network architecture of an input layer, a projection layer parameterized by the matrix $\\mathbf { U }$ and an output layer by $\\mathbf { V } ^ { \\top }$ . It defines the probability of observing the target word $\\mathrm { \\Sigma } _ { w } \\mathrm { \\Sigma } _ { t }$ in a document $D$ given its local context $\\mathbf { c } ^ { t }$ as ",
174
+ "bbox": [
175
+ 176,
176
+ 787,
177
+ 825,
178
+ 830
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "equation",
184
+ "img_path": "images/5a7cc272c284b9b7e996f7e733705b8e47b6c28ae57e7526c34e850f2837fccb.jpg",
185
+ "text": "$$\nP ( w ^ { t } | \\mathbf { c } ^ { t } ) = \\frac { \\exp ( \\mathbf { v } _ { w ^ { t } } ^ { \\top } \\mathbf { U } \\mathbf { c } ^ { t } ) } { \\sum _ { w ^ { \\prime } \\in V } \\exp ( \\mathbf { v } _ { w ^ { \\prime } } ^ { \\top } \\mathbf { U } \\mathbf { c } ^ { t } ) }\n$$",
186
+ "text_format": "latex",
187
+ "bbox": [
188
+ 380,
189
+ 838,
190
+ 617,
191
+ 876
192
+ ],
193
+ "page_idx": 1
194
+ },
195
+ {
196
+ "type": "text",
197
+ "text": "The word vectors are then learned to maximize the log likelihood of observing the target word at each position of the document. Various techniques (Mitchell & Lapata, 2010; Zanzotto et al., 2010; Yessenalina & Cardie, 2011; Grefenstette et al., 2013; Socher et al., 2013; Kusner et al., 2015) ",
198
+ "bbox": [
199
+ 174,
200
+ 882,
201
+ 825,
202
+ 924
203
+ ],
204
+ "page_idx": 1
205
+ },
206
+ {
207
+ "type": "text",
208
+ "text": "have been studied to generate vector representations of documents from word embeddings, among which the simplest approach is to use weighted average of word embeddings. Similarly, our method forms document representation by averaging word embeddings of all the words in the document. Differently, as our model encodes the compositionality of words in the learned word embeddings, heuristic weighting at test time is not required. ",
209
+ "bbox": [
210
+ 173,
211
+ 103,
212
+ 825,
213
+ 174
214
+ ],
215
+ "page_idx": 2
216
+ },
217
+ {
218
+ "type": "text",
219
+ "text": "Paragraph Vectors. Paragraph Vectors, on the other hands, explicitly learns a document vector with the word embeddings. It introduces another projection matrix $\\mathbf { D } \\in \\mathcal { R } ^ { h \\times n }$ . Each column of $\\mathbf { D }$ acts as a memory of the global topic of the corresponding document. It then defines the probability of observing the target word $w ^ { t }$ in a document $D$ given its local context $\\mathbf { c } ^ { t }$ as ",
220
+ "bbox": [
221
+ 173,
222
+ 190,
223
+ 825,
224
+ 247
225
+ ],
226
+ "page_idx": 2
227
+ },
228
+ {
229
+ "type": "equation",
230
+ "img_path": "images/012e16453fd970126fd7dba3a5e1d00cb72694a56042970b4b8d9721cbd4a6e5.jpg",
231
+ "text": "$$\nP ( w ^ { t } | \\mathbf { c } ^ { t } , \\mathbf { d } ) = \\frac { \\exp ( \\mathbf { v } _ { w ^ { t } } ^ { \\top } ( \\mathbf { U } \\mathbf { c } ^ { t } + \\mathbf { d } ) ) } { \\sum _ { w ^ { \\prime } \\in V } \\exp ( \\mathbf { v } _ { w ^ { \\prime } } ^ { \\top } ( \\mathbf { U } \\mathbf { c } ^ { t } + \\mathbf { d } ) ) }\n$$",
232
+ "text_format": "latex",
233
+ "bbox": [
234
+ 349,
235
+ 256,
236
+ 647,
237
+ 292
238
+ ],
239
+ "page_idx": 2
240
+ },
241
+ {
242
+ "type": "text",
243
+ "text": "where $\\mathbf { d } \\in \\mathbf { D }$ is the vector representation of the document. As we can see from this formula, the complexity of Paragraph Vectors grows with not only the size of the vocabulary, but also the size of the training corpus. While we can reasonably limit the size of a vocabulary to be within a million for most datasets, the size of a training corpus can easily go to billions. What is more concerning is that, in order to come up with the vector representations of unseen documents, we need to perform an expensive inference by appending more columns to $\\mathbf { D }$ and gradient descent on $\\mathbf { D }$ while fixing other parameters of the learned model. ",
244
+ "bbox": [
245
+ 173,
246
+ 300,
247
+ 825,
248
+ 398
249
+ ],
250
+ "page_idx": 2
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "3 METHOD ",
255
+ "text_level": 1,
256
+ "bbox": [
257
+ 176,
258
+ 421,
259
+ 282,
260
+ 436
261
+ ],
262
+ "page_idx": 2
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "Several works (Mikolov & Dean, 2013; Mikolov et al., 2013b) showcased that syntactic and semantic regularities of phrases and sentences are reasonably well preserved by adding or subtracting word embeddings learned through Word2Vec. It prompts us to explore the option of simply representing a document as an average of word embeddings. Figure 1 illustrates the new model architecture. ",
267
+ "bbox": [
268
+ 174,
269
+ 454,
270
+ 825,
271
+ 510
272
+ ],
273
+ "page_idx": 2
274
+ },
275
+ {
276
+ "type": "image",
277
+ "img_path": "images/e8eb072e18940e89d6103a71c01bea2e73c21b99edcf56136c785fec5e0070e0.jpg",
278
+ "image_caption": [
279
+ "Figure 1: A new framework for learning document vectors. "
280
+ ],
281
+ "image_footnote": [],
282
+ "bbox": [
283
+ 299,
284
+ 520,
285
+ 678,
286
+ 678
287
+ ],
288
+ "page_idx": 2
289
+ },
290
+ {
291
+ "type": "text",
292
+ "text": "Similar to Word2Vec or Paragraph Vectors, Doc2VecC consists of an input layer, a projection layer as well as an output layer to predict the target word, “ceremony” in this example. The embeddings of neighboring words (“opening”, “for”, “the”) provide local context while the vector representation of the entire document (shown in grey) serves as the global context. In contrast to Paragraph Vectors, which directly learns a unique vector for each document, Doc2VecC represents each document as an average of the embeddings of words randomly sampled from the document (“performance” at position $p$ , “praised” at position $q$ , and “brazil” at position $r$ ). ",
293
+ "bbox": [
294
+ 173,
295
+ 720,
296
+ 825,
297
+ 820
298
+ ],
299
+ "page_idx": 2
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "Huang et al. (2012) also proposed the idea of using average of word embeddings to represent the global context of a document. Different from their work, we choose to corrupt the original document by randomly removing significant portion of words, and represent the document using only the embeddings of the words remained. This corruption mechanism offers us great speedup during training as it significantly reduces the number of parameters to update in back propagation. At the same time, as we are going to detail in the next section, it introduces a special form of regularization, which brings great performance improvement. ",
304
+ "bbox": [
305
+ 173,
306
+ 825,
307
+ 825,
308
+ 924
309
+ ],
310
+ "page_idx": 2
311
+ },
312
+ {
313
+ "type": "text",
314
+ "text": "Here we describe the stochastic process we used to generate a global context at each update. The global context, which we denote as $\\tilde { \\mathbf { x } }$ , is generated through a unbiased mask-out/drop-out corruption, in which we randomly overwrites each dimension of the original document x with probability $q$ . To make the corruption unbiased, we set the uncorrupted dimensions to $1 / ( 1 - q )$ times its original value. Formally, ",
315
+ "bbox": [
316
+ 173,
317
+ 103,
318
+ 826,
319
+ 172
320
+ ],
321
+ "page_idx": 3
322
+ },
323
+ {
324
+ "type": "equation",
325
+ "img_path": "images/d7ca476cd2374de68fcd04432bd0331d10e47cd0bb5ba88a78f12c806fab32d4.jpg",
326
+ "text": "$$\n\\tilde { x } _ { d } = \\left\\{ \\begin{array} { l l } { 0 , } & { \\mathrm { w i t h ~ p r o b a b i l i t y ~ } q } \\\\ { \\frac { x _ { d } } { 1 - q } , } & { \\mathrm { o t h e r w i s e } } \\end{array} \\right.\n$$",
327
+ "text_format": "latex",
328
+ "bbox": [
329
+ 387,
330
+ 171,
331
+ 607,
332
+ 214
333
+ ],
334
+ "page_idx": 3
335
+ },
336
+ {
337
+ "type": "text",
338
+ "text": "Doc2VecC then defines the probability of observing a target word $w ^ { t }$ given its local context $\\mathbf { c } ^ { t }$ as well as the global context $\\tilde { \\bf x }$ as ",
339
+ "bbox": [
340
+ 174,
341
+ 215,
342
+ 823,
343
+ 244
344
+ ],
345
+ "page_idx": 3
346
+ },
347
+ {
348
+ "type": "equation",
349
+ "img_path": "images/d21a58454c9702bcfb50955efed211bb945aa43a2cf9cb77727ca3cb520e1b9e.jpg",
350
+ "text": "$$\nP ( w ^ { t } | \\mathbf { c } ^ { t } , \\tilde { \\mathbf { x } } ) = \\frac { \\exp ( \\mathbf { v } _ { w ^ { t } } ^ { \\top } ( \\widehat { \\textbf { U c } ^ { t } } + \\widehat { \\frac { 1 } { T } } \\mathbf { U } \\tilde { \\mathbf { x } } ) ) } { \\sum _ { w ^ { \\prime } \\in V } \\exp ( \\mathbf { v } _ { w ^ { \\prime } } ^ { \\top } \\left( \\mathbf { U } \\mathbf { c } ^ { t } + \\frac { 1 } { T } \\mathbf { U } \\tilde { \\mathbf { x } } \\right) ) }\n$$",
351
+ "text_format": "latex",
352
+ "bbox": [
353
+ 318,
354
+ 268,
355
+ 679,
356
+ 320
357
+ ],
358
+ "page_idx": 3
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "Here $T$ is the length of the document. Exactly computing the probability is impractical, instead we approximate it with negative sampling (Mikolov et al., 2013a). ",
363
+ "bbox": [
364
+ 174,
365
+ 324,
366
+ 826,
367
+ 353
368
+ ],
369
+ "page_idx": 3
370
+ },
371
+ {
372
+ "type": "equation",
373
+ "img_path": "images/d4aa825221f291a6f49e61d35db32c5f38c364e1d1698e046b806f13af387947.jpg",
374
+ "text": "$$\n\\begin{array} { r c l } { f ( w , { \\bf c } , \\tilde { \\bf x } ) } & { \\equiv } & { \\log P ( w ^ { t } | { \\bf c } ^ { t } , \\tilde { \\bf x } ) } \\\\ & { \\approx } & { \\log \\sigma \\left( { \\bf v } _ { w } ^ { \\top } ( { \\bf U } { \\bf c } + \\frac { 1 } { T } { \\bf U } \\tilde { \\bf x } ) \\right) + \\displaystyle \\sum _ { w ^ { \\prime } \\sim P _ { v } } \\log \\sigma \\left( - { \\bf v } _ { w ^ { \\prime } } ^ { \\top } ( { \\bf U } { \\bf c } + \\frac { 1 } { T } { \\bf U } \\tilde { \\bf x } ) \\right) } \\end{array}\n$$",
375
+ "text_format": "latex",
376
+ "bbox": [
377
+ 223,
378
+ 356,
379
+ 772,
380
+ 416
381
+ ],
382
+ "page_idx": 3
383
+ },
384
+ {
385
+ "type": "text",
386
+ "text": "here $P _ { v }$ stands for a uniform distribution over the terms in the vocabulary. The two projection matrices $\\mathbf { U }$ and $\\mathbf { V }$ are then learned to minimize the loss: ",
387
+ "bbox": [
388
+ 173,
389
+ 420,
390
+ 825,
391
+ 449
392
+ ],
393
+ "page_idx": 3
394
+ },
395
+ {
396
+ "type": "equation",
397
+ "img_path": "images/8d15c395391f083ff38d280e85154978913ccad44324e7e0c1acac9af4094187.jpg",
398
+ "text": "$$\n\\ell = - \\sum _ { i = 1 } ^ { n } \\sum _ { t = 1 } ^ { T _ { i } } f ( w _ { i } ^ { t } , \\mathbf { c } _ { i } ^ { t } , \\tilde { \\mathbf { x } } _ { i } ^ { t } )\n$$",
399
+ "text_format": "latex",
400
+ "bbox": [
401
+ 403,
402
+ 452,
403
+ 589,
404
+ 496
405
+ ],
406
+ "page_idx": 3
407
+ },
408
+ {
409
+ "type": "text",
410
+ "text": "Given the learned projection matrix $\\mathbf { U }$ , we then represent each document simply as an average of the embeddings of the words in the document, ",
411
+ "bbox": [
412
+ 174,
413
+ 507,
414
+ 823,
415
+ 536
416
+ ],
417
+ "page_idx": 3
418
+ },
419
+ {
420
+ "type": "equation",
421
+ "img_path": "images/415d917d5ddc8f19971a4153840d6e51d5fe62c7bf215e7b6cbcee115d0546f7.jpg",
422
+ "text": "$$\n\\mathbf { d } = \\frac { 1 } { T } \\sum _ { w \\in D } \\mathbf { u } _ { w } .\n$$",
423
+ "text_format": "latex",
424
+ "bbox": [
425
+ 442,
426
+ 540,
427
+ 555,
428
+ 579
429
+ ],
430
+ "page_idx": 3
431
+ },
432
+ {
433
+ "type": "text",
434
+ "text": "We are going to elaborate next why we choose to corrupt the original document with the corruption model in eq.(1) during learning, and how it enables us to simply use the average word embeddings as the vector representation for documents at test time. ",
435
+ "bbox": [
436
+ 173,
437
+ 583,
438
+ 825,
439
+ 626
440
+ ],
441
+ "page_idx": 3
442
+ },
443
+ {
444
+ "type": "text",
445
+ "text": "3.1 CORRUPTION AS DATA-DEPENDENT REGULARIZATION",
446
+ "text_level": 1,
447
+ "bbox": [
448
+ 173,
449
+ 643,
450
+ 589,
451
+ 657
452
+ ],
453
+ "page_idx": 3
454
+ },
455
+ {
456
+ "type": "text",
457
+ "text": "We approximate the log likelihood for each instance $f ( w , { \\bf c } , \\tilde { { \\bf x } } )$ in eq.(4) with its Taylor expansion with respect to $\\tilde { \\mathbf { x } }$ up to the second-order (Van Der Maaten et al., 2013; Wager et al., 2013; Chen et al., 2014). Concretely, we choose to expand at the mean of the corruption $\\mu _ { \\mathbf { x } } = \\mathbb { E } _ { p ( \\tilde { \\mathbf { x } } | \\mathbf { x } ) } [ \\tilde { \\mathbf { x } } ]$ : ",
458
+ "bbox": [
459
+ 173,
460
+ 667,
461
+ 825,
462
+ 712
463
+ ],
464
+ "page_idx": 3
465
+ },
466
+ {
467
+ "type": "equation",
468
+ "img_path": "images/64382fea33c8f3a86ef84188d87dc461ce887da884a9e8854e38f83724a89bd7.jpg",
469
+ "text": "$$\nf ( w , \\mathbf { c } , \\tilde { \\mathbf { x } } ) \\approx f ( w , \\mathbf { c } , \\mu _ { \\mathbf { x } } ) + ( \\tilde { \\mathbf { x } } - \\boldsymbol { \\mu } _ { \\mathbf { x } } ) ^ { \\top } \\nabla _ { \\tilde { \\mathbf { x } } } f + \\frac { 1 } { 2 } ( \\tilde { \\mathbf { x } } - \\boldsymbol { \\mu } _ { \\mathbf { x } } ) ^ { \\top } \\nabla _ { \\tilde { \\mathbf { x } } } ^ { 2 } f ( \\tilde { \\mathbf { x } } - \\boldsymbol { \\mu } _ { \\mathbf { x } } )\n$$",
470
+ "text_format": "latex",
471
+ "bbox": [
472
+ 253,
473
+ 717,
474
+ 743,
475
+ 747
476
+ ],
477
+ "page_idx": 3
478
+ },
479
+ {
480
+ "type": "text",
481
+ "text": "where $\\nabla _ { \\tilde { \\mathbf { x } } } f$ and $\\nabla _ { \\tilde { \\mathbf { x } } } ^ { 2 } f$ are the first-order (i.e., gradient) and second-order (i.e., Hessian) of the log likelihood with respect to $\\tilde { \\mathbf { x } }$ . Expansion at the mean $\\mu _ { \\mathbf { x } }$ is crucial as shown in the following steps. Let us assume that for each instance, we are going to sample the global context $\\tilde { \\mathbf { x } }$ infinitely many times, and thus compute the expected log likelihood with respect to the corrupted $\\tilde { \\mathbf { x } }$ . ",
482
+ "bbox": [
483
+ 173,
484
+ 752,
485
+ 825,
486
+ 810
487
+ ],
488
+ "page_idx": 3
489
+ },
490
+ {
491
+ "type": "equation",
492
+ "img_path": "images/b26c89d6d82dda8af00ade79688a308fe3bf5d3315c07cb35c3052f9d0c9b381.jpg",
493
+ "text": "$$\n\\mathbb { E } _ { p ( \\tilde { \\mathbf { x } } | \\mathbf { x } ) } [ f ( w , \\mathbf { c } , \\tilde { \\mathbf { x } } ) ] \\approx f ( w , \\mathbf { c } , \\mu _ { \\mathbf { x } } ) + \\frac { 1 } { 2 } \\mathrm { t r } \\left( \\mathbb { E } [ ( \\tilde { \\mathbf { x } } - \\mathbf { x } ) ( \\tilde { \\mathbf { x } } - \\mathbf { x } ) ^ { \\top } ] \\nabla _ { \\tilde { \\mathbf { x } } } ^ { 2 } f \\right)\n$$",
494
+ "text_format": "latex",
495
+ "bbox": [
496
+ 271,
497
+ 814,
498
+ 725,
499
+ 844
500
+ ],
501
+ "page_idx": 3
502
+ },
503
+ {
504
+ "type": "text",
505
+ "text": "The linear term disappears as $\\mathbb { E } _ { p ( \\tilde { \\mathbf { x } } | \\mathbf { x } ) } [ \\tilde { \\mathbf { x } } - \\mu _ { \\mathbf { x } } ] = 0$ . We substitute in $\\mathbf { x }$ for the mean $\\mu _ { \\mathbf { x } }$ of the corrupting distribution (unbiased corruption) and the matrix $\\begin{array} { r } { \\Sigma _ { \\mathbf { x } } = \\mathbb { E } [ ( \\tilde { \\mathbf { x } } - \\mu _ { \\mathbf { x } } ) ( \\tilde { \\mathbf { x } } - \\mu _ { \\mathbf { x } } ) ^ { \\top } ] } \\end{array}$ for the variance, and obtain ",
506
+ "bbox": [
507
+ 173,
508
+ 849,
509
+ 826,
510
+ 895
511
+ ],
512
+ "page_idx": 3
513
+ },
514
+ {
515
+ "type": "equation",
516
+ "img_path": "images/93d52b43483069bc13fa38a2829c4e5cbcb65f94c6c53944a71e8bd9a6e41b21.jpg",
517
+ "text": "$$\n\\mathbb { E } _ { p ( \\tilde { \\mathbf { x } } | \\mathbf { x } ) } [ f ( w , \\mathbf { c } , \\tilde { \\mathbf { x } } ) ] \\approx f ( w , \\mathbf { c } , \\mathbf { x } ) + \\frac { 1 } { 2 } \\mathrm { t r } \\left( \\Sigma _ { \\mathbf { x } } \\nabla _ { \\tilde { \\mathbf { x } } } ^ { 2 } f \\right)\n$$",
518
+ "text_format": "latex",
519
+ "bbox": [
520
+ 330,
521
+ 898,
522
+ 658,
523
+ 929
524
+ ],
525
+ "page_idx": 3
526
+ },
527
+ {
528
+ "type": "text",
529
+ "text": "As each word in a document is corrupted independently of others, the variance matrix $\\Sigma _ { \\mathbf { x } }$ is simplified to a diagonal matrix with $j ^ { t h }$ element equals $\\frac { q } { 1 - q } \\dot { x } _ { j } ^ { 2 }$ . As a result, we only need to compute the diagonal terms of the Hessian matrix $\\nabla _ { \\tilde { \\mathbf { x } } } ^ { 2 } f$ . ",
530
+ "bbox": [
531
+ 174,
532
+ 103,
533
+ 825,
534
+ 151
535
+ ],
536
+ "page_idx": 4
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "The $j ^ { t h }$ dimension of the Hessian’s diagonal evaluated at the mean $\\mathbf { x }$ is given by ",
541
+ "bbox": [
542
+ 173,
543
+ 157,
544
+ 702,
545
+ 172
546
+ ],
547
+ "page_idx": 4
548
+ },
549
+ {
550
+ "type": "equation",
551
+ "img_path": "images/700e6642a0b0828bf8d017845d5dc493a83e28a89f177cb6960849ae1851d674.jpg",
552
+ "text": "$$\n\\frac { \\partial ^ { 2 } f } { \\partial x _ { j } ^ { 2 } } = - \\sigma _ { w , \\mathbf { c } , \\mathbf { x } } ( 1 - \\sigma _ { w , \\mathbf { c } , \\mathbf { x } } ) ( \\frac { 1 } { T } \\mathbf { v } _ { w } ^ { \\top } \\mathbf { u } _ { j } ) ^ { 2 } - \\sum _ { w ^ { \\prime } \\sim P _ { v } } \\sigma _ { w ^ { \\prime } , \\mathbf { c } , \\mathbf { x } } ( 1 - \\sigma _ { w ^ { \\prime } , \\mathbf { c } , \\mathbf { x } } ) ( \\frac { 1 } { T } \\mathbf { v } _ { w ^ { \\prime } } ^ { \\top } \\mathbf { u } _ { j } ) ^ { 2 }\n$$",
553
+ "text_format": "latex",
554
+ "bbox": [
555
+ 228,
556
+ 178,
557
+ 767,
558
+ 218
559
+ ],
560
+ "page_idx": 4
561
+ },
562
+ {
563
+ "type": "text",
564
+ "text": "Plug the Hessian matrix and the variance matrix back into eq.(6), and then back to the loss defined in eq.(4), we can see that Doc2VecC intrinsically minimizes ",
565
+ "bbox": [
566
+ 171,
567
+ 223,
568
+ 826,
569
+ 252
570
+ ],
571
+ "page_idx": 4
572
+ },
573
+ {
574
+ "type": "equation",
575
+ "img_path": "images/d672976658f5afa97de266f987b9a65232ed29933213983149cab9a6a7573cbc.jpg",
576
+ "text": "$$\n\\ell = - \\sum _ { i = 1 } ^ { n } \\sum _ { t = 1 } ^ { T _ { i } } f ( w _ { i } ^ { t } , \\mathbf { c } _ { i } ^ { t } , \\mathbf { x } _ { i } ) + \\frac { q } { 1 - q } \\sum _ { j = 1 } ^ { v } R ( \\mathbf { u } _ { j } )\n$$",
577
+ "text_format": "latex",
578
+ "bbox": [
579
+ 339,
580
+ 257,
581
+ 656,
582
+ 301
583
+ ],
584
+ "page_idx": 4
585
+ },
586
+ {
587
+ "type": "text",
588
+ "text": "Each $f ( w _ { i } ^ { t } , \\mathbf { c } _ { i } ^ { t } , \\mathbf { x } _ { i } )$ in the first term measures the log likelihood of observing the target word $\\boldsymbol { w } _ { i } ^ { t }$ given its local context $\\mathbf { c } _ { i } ^ { t }$ and the document vector $\\begin{array} { r } { \\mathbf { d } _ { i } = \\frac { 1 } { T } \\mathbf { U } \\mathbf { x } _ { i } } \\end{array}$ . As such, Doc2VecC enforces that $a$ document vector generated by averaging word embeddings can capture the global semantics of the document, and fill in information missed in the local context. ",
589
+ "bbox": [
590
+ 174,
591
+ 308,
592
+ 825,
593
+ 366
594
+ ],
595
+ "page_idx": 4
596
+ },
597
+ {
598
+ "type": "text",
599
+ "text": "The second term here is a data-dependent regularization. The regularization on the embedding $\\mathbf { u } _ { j }$ of each word $j$ takes the following form, ",
600
+ "bbox": [
601
+ 173,
602
+ 372,
603
+ 825,
604
+ 401
605
+ ],
606
+ "page_idx": 4
607
+ },
608
+ {
609
+ "type": "equation",
610
+ "img_path": "images/db9505ca07f37c8924960550fbcb9f096fe22f6713cc26051bbb466ba3f3c66f.jpg",
611
+ "text": "$$\n\\mathfrak { l } ( \\mathbf { u } _ { j } ) \\propto \\sum _ { i = 1 } ^ { n } \\sum _ { t = 1 } ^ { T _ { i } } x _ { i j } ^ { 2 } \\left[ \\sigma _ { w _ { i } ^ { t } , \\mathbf { c } _ { i } ^ { t } , \\mathbf { x } _ { i } } ( 1 - \\sigma _ { w _ { i } ^ { t } , \\mathbf { c } _ { i } ^ { t } , \\mathbf { x } _ { i } } ) ( \\frac { 1 } { T } \\mathbf { v } _ { w _ { i } ^ { t } } ^ { \\top } \\mathbf { u } _ { j } ) ^ { 2 } + \\sum _ { w ^ { \\prime } \\sim P _ { v } } \\sigma _ { w ^ { \\prime } , \\mathbf { c } _ { i } ^ { t } , \\mathbf { x } _ { i } } ( 1 - \\sigma _ { w ^ { \\prime } , \\mathbf { c } _ { i } ^ { t } , \\mathbf { x } _ { i } } ) ( \\frac { 1 } { T } \\mathbf { v } _ { w ^ { \\prime } } ^ { \\top } \\mathbf { u } _ { j } ) ^ { 2 } \\right] ,\n$$",
612
+ "text_format": "latex",
613
+ "bbox": [
614
+ 181,
615
+ 405,
616
+ 839,
617
+ 450
618
+ ],
619
+ "page_idx": 4
620
+ },
621
+ {
622
+ "type": "text",
623
+ "text": "where $\\begin{array} { r } { \\sigma _ { w , \\mathbf { c } , \\mathbf { x } } = \\sigma ( \\mathbf { v } _ { w } ^ { \\top } ( \\mathbf { U } \\mathbf { c } + \\frac { 1 } { T } \\mathbf { U } \\mathbf { x } ) ) } \\end{array}$ prescribes the confidence of predicting the target word $w$ given its neighboring context c as well as the document vector $\\begin{array} { r } { \\mathbf { d } = \\frac { 1 } { T } \\mathbf { U } \\mathbf { x } } \\end{array}$ . ",
624
+ "bbox": [
625
+ 174,
626
+ 457,
627
+ 825,
628
+ 489
629
+ ],
630
+ "page_idx": 4
631
+ },
632
+ {
633
+ "type": "text",
634
+ "text": "Closely examining $R ( \\mathbf { u } _ { j } )$ leads to several interesting findings: 1. the regularizer penalizes more on the embeddings of common words. A word $j$ that frequently appears across the training corpus, i.e, $x _ { i j } = 1$ often, will have a bigger regularization than a rare word; 2. on the other hand, the regularization is modulated by $\\sigma _ { w , \\mathbf { c } , \\mathbf { x } } ( 1 - \\sigma _ { w , \\mathbf { c } , \\mathbf { x } } )$ , which is small if $\\sigma _ { w , \\mathbf { c } , \\mathbf { x } } 1$ or 0. In other words, if $\\mathbf { u } _ { j }$ is critical to a confident prediction $\\sigma _ { w , \\mathbf { c } , \\mathbf { x } }$ when it is active, then the regularization is diminished. Similar effect was observed for dropout training for logistic regression model (Wager et al., 2013) and denoising autoencoders (Chen et al., 2014). ",
635
+ "bbox": [
636
+ 173,
637
+ 494,
638
+ 826,
639
+ 593
640
+ ],
641
+ "page_idx": 4
642
+ },
643
+ {
644
+ "type": "text",
645
+ "text": "4 EXPERIMENTS ",
646
+ "text_level": 1,
647
+ "bbox": [
648
+ 176,
649
+ 613,
650
+ 326,
651
+ 628
652
+ ],
653
+ "page_idx": 4
654
+ },
655
+ {
656
+ "type": "text",
657
+ "text": "We evaluate Doc2VecC on a sentiment analysis task, a document classification task and a semantic relatedness task, along with several document representation learning algorithms. All experiments can be reproduced using the code available at https://github.com/mchen24/iclr2017 ",
658
+ "bbox": [
659
+ 174,
660
+ 645,
661
+ 825,
662
+ 686
663
+ ],
664
+ "page_idx": 4
665
+ },
666
+ {
667
+ "type": "text",
668
+ "text": "4.1 BASELINES",
669
+ "text_level": 1,
670
+ "bbox": [
671
+ 174,
672
+ 703,
673
+ 294,
674
+ 718
675
+ ],
676
+ "page_idx": 4
677
+ },
678
+ {
679
+ "type": "text",
680
+ "text": "We compare against the following document representation baselines: bag-of-words (BoW); Denoising Autoencoders (DEA) (Vincent et al., 2008), a representation learned from reconstructing original document x using corrupted one x˜. SDAs have been shown to be the state-of-the-art for sentiment analysis tasks (Glorot et al., 2011). We used Kullback-Liebler divergence as the reconstruction error and an affine encoder. To scale up the algorithm to large vocabulary, we only take into account the non-zero elements of $\\mathbf { x }$ in the reconstruction error and employed negative sampling for the remainings; Word2Vec (Mikolov et al., 2013a) $\\mathbf { \\tau } _ { \\mathbf { \\left| + I D F \\right.} }$ , a representation generated through weighted average of word vectors learned using Word2Vec; Doc2Vec (Le & Mikolov, 2014); Skip-thought Vectors(Kiros et al., 2015), a generic, distributed sentence encoder that extends the Word2Vec skipgram model to sentence level. It has been shown to produce highly generic sentence representations that apply to various natural language processing tasks. We also include RNNLM (Mikolov et al., 2010), a recurrent neural network based language model in the comparison. In the semantic relatedness task, we further compare to LSTM-based methods (Tai et al., 2015) that have been reported on this dataset. ",
681
+ "bbox": [
682
+ 173,
683
+ 729,
684
+ 826,
685
+ 924
686
+ ],
687
+ "page_idx": 4
688
+ },
689
+ {
690
+ "type": "table",
691
+ "img_path": "images/7b51ff1899a8553d473351df0e86003f803a77754fe58401d6b1583cc91534e2.jpg",
692
+ "table_caption": [
693
+ "Table 1: Classification error of a linear classifier trained on various document representations on the Imdb dataset. "
694
+ ],
695
+ "table_footnote": [],
696
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>Error rate % (include test)</td><td rowspan=1 colspan=1>Error rate % (exclude test)</td></tr><tr><td rowspan=1 colspan=1>Bag-of-Words (BOW)</td><td rowspan=1 colspan=1>12.53</td><td rowspan=1 colspan=1>12.59</td></tr><tr><td rowspan=1 colspan=1>RNN-LM</td><td rowspan=1 colspan=1>13.59</td><td rowspan=1 colspan=1>13.59</td></tr><tr><td rowspan=1 colspan=1>Denoising Autoencoders (DEA)</td><td rowspan=1 colspan=1>11.58</td><td rowspan=1 colspan=1>12.54</td></tr><tr><td rowspan=1 colspan=1>Word2Vec+AVGWord2Vec +IDF</td><td rowspan=1 colspan=1>12.1111.28</td><td rowspan=1 colspan=1>12.6911.92</td></tr><tr><td rowspan=1 colspan=1>Paragraph Vectors</td><td rowspan=1 colspan=1>10.81</td><td rowspan=1 colspan=1>12.10</td></tr><tr><td rowspan=1 colspan=1>Skip-thought Vectors</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>17.42</td></tr><tr><td rowspan=1 colspan=1>Doc2VecC</td><td rowspan=1 colspan=1>10.48</td><td rowspan=1 colspan=1>11.70</td></tr></table>",
697
+ "bbox": [
698
+ 189,
699
+ 140,
700
+ 808,
701
+ 275
702
+ ],
703
+ "page_idx": 5
704
+ },
705
+ {
706
+ "type": "text",
707
+ "text": "4.2 SENTIMENT ANALYSIS ",
708
+ "text_level": 1,
709
+ "bbox": [
710
+ 174,
711
+ 304,
712
+ 370,
713
+ 318
714
+ ],
715
+ "page_idx": 5
716
+ },
717
+ {
718
+ "type": "text",
719
+ "text": "For sentiment analysis, we use the IMDB movie review dataset. It contains 100,000 movies reviews categorized as either positive or negative. It comes with predefined train/test split (Maas et al., 2011): 25,000 reviews are used for training, 25,000 for testing, and the rest as unlabeled data. The two classes are balanced in the training and testing sets. We remove words that appear less than 10 times in the training set, resulting in a vocabulary of 43,375 distinct words and symbols. ",
720
+ "bbox": [
721
+ 174,
722
+ 330,
723
+ 825,
724
+ 400
725
+ ],
726
+ "page_idx": 5
727
+ },
728
+ {
729
+ "type": "text",
730
+ "text": "Setup. We test the various representation learning algorithms under two settings: one follows the same protocol proposed in (Mesnil et al., 2014), where representation is learned using all the available data, including the test set; another one where the representation is learned using training and unlabeled set only. For both settings, a linear support vector machine (SVM) (Fan et al., 2008) is trained afterwards on the learned representation for classification. For Skip-thought Vectors, we used the generic model1 trained on a much bigger book corpus to encode the documents. A vector of 4800 dimensions, first 2400 from the uni-skip model, and the last 2400 from the bi-skip model, are generated for each document. In comparison, all the other algorithms produce a vector representation of size 100. The supervised RNN-LM is learned on the training set only. The hyper-parameters are tuned on a validation set subsampled from the training set. ",
731
+ "bbox": [
732
+ 174,
733
+ 407,
734
+ 825,
735
+ 546
736
+ ],
737
+ "page_idx": 5
738
+ },
739
+ {
740
+ "type": "text",
741
+ "text": "Accuracy. Comparing the two columns in Table 1, we can see that all the representation learning algorithms benefits from including the testing data during the representation learning phrase. Doc2VecC achieved similar or even better performance than Paragraph Vectors. Both methods outperforms the other baselines, beating the BOW representation by $15 \\%$ . In comparison with Word2Vec $+ \\mathrm { I D F }$ , which applies post-processing on learned word embeddings to form document representation, Doc2VecC naturally enforces document semantics to be captured by averaged word embeddings during training. This leads to better performance. Doc2VecC reduces to Denoising Autoencoders (DEA) if the local context words are removed from the paradigm shown in Figure 1. By including the context words, Doc2VecC allows the document vector to focus more on capturing the global context. Skip-thought vectors perform surprisingly poor on this dataset comparing to other methods. We hypothesized that it is due to the length of paragraphs in this dataset. The average length of paragraphs in the IMDB movie review dataset is 296.5, much longer than the ones used for training and testing in the original paper, which is in the order of 10. As noted in (Tai et al., 2015), the performance of LSTM based method (similarly, the gated RNN used in Skip-thought vectors) drops significantly with increasing paragraph length, as it is hard to preserve state over long sequences of words. ",
742
+ "bbox": [
743
+ 174,
744
+ 554,
745
+ 825,
746
+ 775
747
+ ],
748
+ "page_idx": 5
749
+ },
750
+ {
751
+ "type": "text",
752
+ "text": "Time. Table 2 summarizes the time required by these algorithms to learn and generate the document representation. Word2Vec is the fastest one to train. Denoising Autoencoders and Doc2VecC second that. The number of parameters that needs to be back-propagated in each update was increased by the number of surviving words in x˜. We found that both models are not sensitive to the corruption rate $q$ in the noise model. Since the learning time decreases with higher corruption rate, we used $q ~ = ~ 0 . 9$ throughout the experiments. Paragraph Vectors takes longer time to train as there are more parameters (linear to the number of document in the learning set) to learn. At test time, Word2Vec $+ \\mathrm { I D F }$ , DEA and Doc2VecC all use (weighted) averaging of word embeddings as document representation. Paragraph Vectors, on the other hand, requires another round of inference to produce the vector representation of unseen test documents. It takes Paragraph Vectors 4 minutes and 17 seconds to infer the vector representations for the 25,000 test documents, in comparison to 7 seconds for the other methods. As we did not re-train the Skip-thought vector models on this dataset, the training time2 reported in the table is the time it takes to generate the embeddings for the 25,000 training documents. Due to repeated high-dimensional matrix operations required for encoding long paragraphs, it takes fairly long time to generate the representations for these documents. Similarly for testing. The experiments were conducted on a desktop with Intel i7 2.2Ghz cpu. ",
753
+ "bbox": [
754
+ 174,
755
+ 782,
756
+ 823,
757
+ 893
758
+ ],
759
+ "page_idx": 5
760
+ },
761
+ {
762
+ "type": "table",
763
+ "img_path": "images/802800cd18494b21b7d173999f710cf50a594dd011bdfd86d4a73c9d2afcef9c.jpg",
764
+ "table_caption": [
765
+ "Table 2: Learning time and representation generation time required by different representation learning algorithms. "
766
+ ],
767
+ "table_footnote": [],
768
+ "table_body": "<table><tr><td>Model</td><td>Learning time</td><td>Generation time</td></tr><tr><td>DenoisingAutoencoders</td><td>3m23s</td><td>7s</td></tr><tr><td>Word2Vec+IDF</td><td>2m 33s</td><td>7s</td></tr><tr><td>Paragraph Vectors</td><td>4m 54s</td><td>4m 17s</td></tr><tr><td>Skip-thought</td><td>2h</td><td>2h</td></tr><tr><td>Doc2VecC</td><td>4m 30s</td><td>7s</td></tr></table>",
769
+ "bbox": [
770
+ 284,
771
+ 141,
772
+ 709,
773
+ 231
774
+ ],
775
+ "page_idx": 6
776
+ },
777
+ {
778
+ "type": "table",
779
+ "img_path": "images/abdab907751e78d5301f60bbffb7fccc788daccf6bb89a8e43c76b348ecb62bb.jpg",
780
+ "table_caption": [
781
+ "Table 3: Words with embeddings closest to 0 learned by different algorithms. "
782
+ ],
783
+ "table_footnote": [],
784
+ "table_body": "<table><tr><td>Word2Vec</td><td>harp(118)distasteful(115)switzerland(101)shabby(103)fireworks(101)heav- ens(100) thornton(108) endeavor(100) dense(108) circumstance(119) debacle(103)</td></tr><tr><td>ParaVectors</td><td>harp(118) dense(108) reels(115) fireworks(101) its&#x27;(103) unnoticed(112) pony(102) fulfilled(107) heavens(100)bliss(110)canned(114) shabby(103) debacle(103)</td></tr><tr><td>Doc2VecC</td><td>,(1099319) .(1306691) the(1340408) of(581667) and(651119) up(49871) to(537570) that(275240) time(48205) endeavor(100) here(21118) way(31302) own(13456)</td></tr></table>",
785
+ "bbox": [
786
+ 173,
787
+ 271,
788
+ 852,
789
+ 358
790
+ ],
791
+ "page_idx": 6
792
+ },
793
+ {
794
+ "type": "text",
795
+ "text": "",
796
+ "bbox": [
797
+ 174,
798
+ 383,
799
+ 825,
800
+ 496
801
+ ],
802
+ "page_idx": 6
803
+ },
804
+ {
805
+ "type": "text",
806
+ "text": "Data dependent regularization. As explained in Section 3.1, the corruption introduced in Doc2VecC acts as a data-dependent regularization that suppresses the embeddings of frequent but uninformative words. Here we conduct an experiment to exam the effect. We used a cutoff of 100 in this experiment. Table 3 lists the words having the smallest $l _ { 2 }$ norm of embeddings found by different algorithms. The number inside the parenthesis after each word is the number of times this word appears in the learning set. In word2Vec or Paragraph Vectors, the least frequent words have embeddings that are close to zero, despite some of them being indicative of sentiment such as debacle, bliss and shabby. In contrast, Doc2VecC manages to clamp down the representation of words frequently appear in the training set, but are uninformative, such as symbols and stop words. ",
807
+ "bbox": [
808
+ 174,
809
+ 502,
810
+ 825,
811
+ 627
812
+ ],
813
+ "page_idx": 6
814
+ },
815
+ {
816
+ "type": "text",
817
+ "text": "Subsampling frequent words. Note that for all the numbers reported, we applied the trick of subsampling of frequent words introduced in (Mikolov & Dean, 2013) to counter the imbalance between frequent and rare words. It is critical to the performance of simple Wor $\\mathrm { d } 2 \\mathrm { V e c } { + } \\mathrm { A V G }$ as the sole remedy to diminish the contribution of common words in the final document representation. If we were to remove this step, the error rate of Word2Vec+AVG will increases from $1 \\bar { 2 } . 1 \\%$ to $1 3 . 2 \\%$ . Doc2VecC on the other hand naturally exerts a stronger regularization toward embeddings of words that are frequent but uninformative, therefore does not rely on this trick. ",
818
+ "bbox": [
819
+ 174,
820
+ 635,
821
+ 825,
822
+ 732
823
+ ],
824
+ "page_idx": 6
825
+ },
826
+ {
827
+ "type": "text",
828
+ "text": "4.3 WORD ANALOGY ",
829
+ "text_level": 1,
830
+ "bbox": [
831
+ 176,
832
+ 750,
833
+ 333,
834
+ 763
835
+ ],
836
+ "page_idx": 6
837
+ },
838
+ {
839
+ "type": "text",
840
+ "text": "In table 3, we demonstrated that the corruption model introduced in Doc2VecC dampens the embeddings of words which are common and non-discriminative (stop words). In this experiment, we are going to quantatively compare the word embeddings generated by Doc2VecC to the ones generated by Word2Vec, or Paragraph Vectors on the word analogy task introduced by Mikolov et al. (2013a). The dataset contains five types of semantic questions, and nine types of syntactic questions, with a total of 8,869 semantic and 10,675 syntactic questions. The questions are answered through simple linear algebraic operations on the word embeddings generated by different methods. Please refer to the original paper for more details on the evaluation protocol. ",
841
+ "bbox": [
842
+ 174,
843
+ 775,
844
+ 825,
845
+ 887
846
+ ],
847
+ "page_idx": 6
848
+ },
849
+ {
850
+ "type": "image",
851
+ "img_path": "images/123c3ea484cbd8abf5e1a10a911eec42a0805126b428524bdc0f32dac75a4efc.jpg",
852
+ "image_caption": [
853
+ "Figure 2: Accuracy on subset of the Semantic-Syntactic Word Relationship test set. Only questions containing words from the most frequent $3 0 \\mathrm { k }$ words are included in the test. "
854
+ ],
855
+ "image_footnote": [],
856
+ "bbox": [
857
+ 179,
858
+ 112,
859
+ 779,
860
+ 337
861
+ ],
862
+ "page_idx": 7
863
+ },
864
+ {
865
+ "type": "table",
866
+ "img_path": "images/9e8448a31b1941676b8af9fa1df875c37b88e4cb95f5eacc439e7fcc95329b1b.jpg",
867
+ "table_caption": [
868
+ "Table 4: Top 1 accuracy on the 5 type of semantics and 9 types of syntactic questions. "
869
+ ],
870
+ "table_footnote": [],
871
+ "table_body": "<table><tr><td>Semantic questions</td><td>Word2Vec</td><td>Doc2VecC</td><td>Syntactic questions</td><td>Word2Vec</td><td>Doc2VecC</td></tr><tr><td>capital-common-countries capital-world currency city-in-state family</td><td>73.59 67.94 17.14 34.49 68.71</td><td>81.82 77.96 12.86 42.86 64.62</td><td>gram1-adjective-to-adverb gram2-opposite gram3-comparative gram4-superlative gram5-present-participle gram6-nationality-adjective gram7-past-tense</td><td>19.25 14.07 60.21 52.87 56.34 88.71 47.05</td><td>20.32 25.54 74.47 55.40 65.81 91.03</td></tr></table>",
872
+ "bbox": [
873
+ 174,
874
+ 393,
875
+ 862,
876
+ 527
877
+ ],
878
+ "page_idx": 7
879
+ },
880
+ {
881
+ "type": "text",
882
+ "text": "We trained the word embeddings of different methods using the English news dataset released under the ACL workshop on statistical machine translation. The training set includes close to 15M paragraphs with 355M tokens. We compare the performance of word embeddings trained by different methods with increasing embedding dimensionality as well as increasing training data. ",
883
+ "bbox": [
884
+ 174,
885
+ 582,
886
+ 823,
887
+ 637
888
+ ],
889
+ "page_idx": 7
890
+ },
891
+ {
892
+ "type": "text",
893
+ "text": "We observe similar trends as in Mikolov et al. (2013a). Increasing embedding dimensionality as well as training data size improves performance of the word embeddings on this task. However, the improvement is diminishing. Doc2VecC produces word embeddings which performs significantly better than the ones generated by Word2Vec. We observe close to $2 0 \\%$ uplift when we train on the full training corpus. Paragraph vectors on the other hand performs surprisingly bad on this dataset. Our hypothesis is that due to the large capacity of the model architecture, Paragraph Vectors relies mostly on the unique document vectors to capture the information in a text document instead of learning the word semantic or syntactic similarities. This also explains why the PV-DBOW Le & Mikolov (2014) model architecture proposed in the original work, which completely removes word embedding layers, performs comparable to the distributed memory version. ",
894
+ "bbox": [
895
+ 174,
896
+ 645,
897
+ 825,
898
+ 784
899
+ ],
900
+ "page_idx": 7
901
+ },
902
+ {
903
+ "type": "text",
904
+ "text": "In table 5, we list a detailed comparison of the performance of word embeddings generated by Word2Vec and Doc2VecC on the 14 subtasks, when trained on the full dataset with embedding of size 100. We can see that Doc2VecC significantly outperforms the word embeddings produced by Word2Vec across almost all the subtasks. ",
905
+ "bbox": [
906
+ 174,
907
+ 791,
908
+ 825,
909
+ 847
910
+ ],
911
+ "page_idx": 7
912
+ },
913
+ {
914
+ "type": "text",
915
+ "text": "4.4 DOCUMENT CLASSIFICATION ",
916
+ "text_level": 1,
917
+ "bbox": [
918
+ 176,
919
+ 868,
920
+ 418,
921
+ 882
922
+ ],
923
+ "page_idx": 7
924
+ },
925
+ {
926
+ "type": "text",
927
+ "text": "For the document classification task, we use a subset of the wikipedia dump, which contains over 300,000 wikipedia pages in 100 categories. The 100 categories includes categories under sports, entertainment, literature, and politics etc. Examples of categories include American drama films, Directorial debut films, Major League Baseball pitchers and Sydney Swans players. Body texts (the second paragraph) were extracted for each page as a document. For each category, we select 1,000 documents with unique category label, and 100 documents were used for training and 900 documents for testing. The remaining documents are used as unlabeled data. The 100 classes are balanced in the training and testing sets. For this data set, we learn the word embedding and document representation for all the algorithms using all the available data. We apply a cutoff of 10, resulting in a vocabulary of size 107, 691. ",
928
+ "bbox": [
929
+ 173,
930
+ 895,
931
+ 823,
932
+ 924
933
+ ],
934
+ "page_idx": 7
935
+ },
936
+ {
937
+ "type": "table",
938
+ "img_path": "images/858eaf44001ae664489611d3f8b8c4b5d0c3ec4cc47dc85b1c415913231bc5b7.jpg",
939
+ "table_caption": [
940
+ "Table 5: Classification error $( \\% )$ of a linear classifier trained on various document representations on the Wikipedia dataset. "
941
+ ],
942
+ "table_footnote": [],
943
+ "table_body": "<table><tr><td>Model</td><td>BOW</td><td>DEA</td><td>Word2Vec + AVG</td><td>Word2Vec + IDF</td><td>ParagraphVectors</td><td>Doc2VecC</td></tr><tr><td>h=100</td><td>36.03</td><td>32.30</td><td>33.2</td><td>33.16</td><td>35.78</td><td>31.92</td></tr><tr><td>h = 200</td><td>36.03</td><td>31.36</td><td>32.46</td><td>32.48</td><td>34.92</td><td>30.84</td></tr><tr><td>h= 500</td><td>36.03</td><td>31.10</td><td>32.02</td><td>32.13</td><td>33.93</td><td>30.43</td></tr><tr><td>h = 1000</td><td>36.03</td><td>31.13</td><td>31.78</td><td>32.06</td><td>33.02</td><td>30.24</td></tr></table>",
944
+ "bbox": [
945
+ 174,
946
+ 140,
947
+ 870,
948
+ 217
949
+ ],
950
+ "page_idx": 8
951
+ },
952
+ {
953
+ "type": "image",
954
+ "img_path": "images/57cdff4ce4268ee2f6e0c28461e1d49dc624708cd10f4f6a480dad4dbe856201.jpg",
955
+ "image_caption": [
956
+ "Figure 3: Visualization of document vectors on Wikipedia dataset using t-SNE. "
957
+ ],
958
+ "image_footnote": [],
959
+ "bbox": [
960
+ 199,
961
+ 258,
962
+ 790,
963
+ 444
964
+ ],
965
+ "page_idx": 8
966
+ },
967
+ {
968
+ "type": "text",
969
+ "text": "",
970
+ "bbox": [
971
+ 173,
972
+ 498,
973
+ 825,
974
+ 611
975
+ ],
976
+ "page_idx": 8
977
+ },
978
+ {
979
+ "type": "text",
980
+ "text": "Table 5 summarizes the classification error of a linear SVM trained on representations of different sizes. We can see that most of the algorithms are not sensitive to the size of the vector representation. Doc2Vec benefits most from increasing representation size. Across all sizes of representations, Doc2VecC outperform the existing algorithms by a significant margin. In fact, Doc2VecC can achieve same or better performance with a much smaller representation vector. ",
981
+ "bbox": [
982
+ 173,
983
+ 617,
984
+ 825,
985
+ 686
986
+ ],
987
+ "page_idx": 8
988
+ },
989
+ {
990
+ "type": "text",
991
+ "text": "Figure 3 visualizes the document representations learned by Doc2Vec (left) and Doc2VecC (right) using t-SNE (Maaten & Hinton, 2008). We can see that documents from the same category are nicely clustered using the representation generated by Doc2VecC. Doc2Vec, on the other hand, does not produce a clear separation between different categories, which explains its worse performance reported in Table 5. ",
992
+ "bbox": [
993
+ 174,
994
+ 694,
995
+ 483,
996
+ 819
997
+ ],
998
+ "page_idx": 8
999
+ },
1000
+ {
1001
+ "type": "text",
1002
+ "text": "Figure 4 visualizes the vector representation generated by Doc2VecC w.r.t. coarser categorization. we manually grouped the 100 categories into 7 coarse categories, television, albums, writers, musicians, athletes, species and actors. Categories that do no belong to any of these 7 groups are not included in the figure. ",
1003
+ "bbox": [
1004
+ 174,
1005
+ 827,
1006
+ 483,
1007
+ 924
1008
+ ],
1009
+ "page_idx": 8
1010
+ },
1011
+ {
1012
+ "type": "image",
1013
+ "img_path": "images/78510e9905f3d54e2320241b5adef0e658aa23410911cf81329952d7a1337fac.jpg",
1014
+ "image_caption": [
1015
+ "Figure 4: Visualization of Wikipedia Doc2VecC vectors using t-SNE. "
1016
+ ],
1017
+ "image_footnote": [],
1018
+ "bbox": [
1019
+ 522,
1020
+ 702,
1021
+ 803,
1022
+ 869
1023
+ ],
1024
+ "page_idx": 8
1025
+ },
1026
+ {
1027
+ "type": "text",
1028
+ "text": "We can see that documents belonging to a coarser category are grouped together. This subset includes is a wide range of sports descriptions, ranging from football, crickets, baseball, and cycling etc., which explains why the athletes category are less concentrated. In the projection, we can see documents belonging to the musician category are closer to those belonging to albums category than those of athletes or species. ",
1029
+ "bbox": [
1030
+ 174,
1031
+ 103,
1032
+ 825,
1033
+ 174
1034
+ ],
1035
+ "page_idx": 9
1036
+ },
1037
+ {
1038
+ "type": "text",
1039
+ "text": "4.5 SEMANTIC RELATEDNESS ",
1040
+ "text_level": 1,
1041
+ "bbox": [
1042
+ 176,
1043
+ 200,
1044
+ 392,
1045
+ 214
1046
+ ],
1047
+ "page_idx": 9
1048
+ },
1049
+ {
1050
+ "type": "text",
1051
+ "text": "We test Doc2VecC on the SemEval 2014 Task 1: semantic relatedness SICK dataset (Marelli et al., 2014). Given two sentences, the task is to determine how closely they are semantically related. The set contains 9,927 pairs of sentences with human annotated relatedness score, ranging from 1 to 5. A score of 1 indicates that the two sentences are not related, while 5 indicates high relatedness. The set is splitted into a training set of 4,500 instances, a validation set of 500, and a test set of 4,927. ",
1052
+ "bbox": [
1053
+ 174,
1054
+ 231,
1055
+ 825,
1056
+ 300
1057
+ ],
1058
+ "page_idx": 9
1059
+ },
1060
+ {
1061
+ "type": "text",
1062
+ "text": "We compare $\\mathrm { D o c } 2 \\mathrm { V e c C }$ with several winning solutions of the competition as well as several more recent techniques reported on this dataset, including bi-directional LSTM and Tree-LSTM3 trained from scratch on this dataset, Skip-thought vectors learned a large book corpus 4 (Zhu et al., 2015) and produced sentence embeddings of 4,800 dimensions on this dataset. We follow the same protocol as in skip-thought vectors, and train Doc2VecC on the larger book corpus dataset. Contrary to the vocabulary expansion technique used in (Kiros et al., 2015) to handle out-of-vocabulary words, we extend the vocabulary of the learned model directly on the target dataset in the following way: we use the pre-trained word embedding as an initialization, and fine-tune the word and sentence representation on the SICK dataset. Notice that the fine-tuning is done for sentence representation learning only, and we did not use the relatedness score in the learning. This step brings small improvement to the performance of our algorithm. Given the sentence embeddings, we used the exact same training and testing protocol as in (Kiros et al., 2015) to score each pair of sentences: with two sentence embedding $\\mathbf { u } _ { 1 }$ and $\\mathbf { u } _ { 2 }$ , we concatenate their component-wise product, $\\mathbf { u } _ { 1 } \\cdot \\mathbf { u } _ { 2 }$ and their absolute difference, $\\lvert \\mathbf { u } _ { 1 } - \\mathbf { u } _ { 2 } \\rvert$ as the feature representation. ",
1063
+ "bbox": [
1064
+ 174,
1065
+ 308,
1066
+ 825,
1067
+ 501
1068
+ ],
1069
+ "page_idx": 9
1070
+ },
1071
+ {
1072
+ "type": "text",
1073
+ "text": "Table 6 summarizes the performance of various algorithms on this dataset. Despite its simplicity, Doc2VecC significantly out-performs the winning solutions of the competition, which are heavily feature engineered toward this dataset and several baseline methods, noticeably the dependency-tree RNNs introduced in (Socher et al., 2014), which relies on expensive dependency parsers to compose sentence vectors from word embeddings. The performance of $\\mathrm { D o c } 2 \\mathrm { V e c C }$ is slightly worse than the LSTM based methods or skip-thought vectors on this dataset, while it significantly outperforms skip-thought vectors on the IMDB movie review dataset $( 1 1 . 7 0 \\%$ error rate vs $1 7 . 4 2 \\%$ ). As we hypothesized in previous section, while $\\mathrm { D o c } 2 \\mathrm { V e c C }$ is better at handling longer paragraphs, LSTMbased methods are superior for relatively short sentences (of length in the order of 10s). We would like to point out that Doc2VecC is much faster to train and test comparing to skip-thought vectors. It takes less than 2 hours to learn the embeddings on the large book corpus for Doc2VecC on a desktop with Intel i7 2.2Ghz cpu, in comparison to the 2 weeks on GPU required by skip-thought vectors. ",
1074
+ "bbox": [
1075
+ 174,
1076
+ 508,
1077
+ 825,
1078
+ 675
1079
+ ],
1080
+ "page_idx": 9
1081
+ },
1082
+ {
1083
+ "type": "text",
1084
+ "text": "5 CONCLUSION ",
1085
+ "text_level": 1,
1086
+ "bbox": [
1087
+ 176,
1088
+ 705,
1089
+ 318,
1090
+ 722
1091
+ ],
1092
+ "page_idx": 9
1093
+ },
1094
+ {
1095
+ "type": "text",
1096
+ "text": "We introduce a new model architecture Doc2VecC for document representation learning. It is very efficient to train and test thanks to its simple model architecture. Doc2VecC intrinsically makes sure document representation generated by averaging word embeddings capture semantics of document during learning. It also introduces a data-dependent regularization which favors informative or rare words while dampening the embeddings of common and non-discriminative words. As such, each document can be efficiently represented as a simple average of the learned word embeddings. In comparison to several existing document representation learning algorithms, Doc2VecC outperforms not only in testing efficiency, but also in the expressiveness of the generated representations. ",
1097
+ "bbox": [
1098
+ 174,
1099
+ 743,
1100
+ 825,
1101
+ 856
1102
+ ],
1103
+ "page_idx": 9
1104
+ },
1105
+ {
1106
+ "type": "table",
1107
+ "img_path": "images/906542cccea3889e7792c96b492f9ad04f67dff33809503989122bada97df15e.jpg",
1108
+ "table_caption": [
1109
+ "Table 6: Test set results on the SICK semantic relatedness task. The first group of results are from the submission to the 2014 SemEval competition; the second group includes several baseline methods reported in (Tai et al., 2015); the third group are methods based on LSTM reported in (Tai et al., 2015) as well as the skip-thought vectors (Kiros et al., 2015). "
1110
+ ],
1111
+ "table_footnote": [],
1112
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Method</td><td rowspan=1 colspan=1>Pearson&#x27;sγ</td><td rowspan=1 colspan=1>Spearman&#x27;s p</td><td rowspan=1 colspan=1>MSE</td></tr><tr><td rowspan=2 colspan=1>Illinois-LHUNAL-NLPMeaning FactoryECNU</td><td rowspan=2 colspan=1>0.79930.80700.82680.8279</td><td rowspan=1 colspan=1>0.7538</td><td rowspan=1 colspan=1>0.3692</td></tr><tr><td rowspan=1 colspan=1>0.74890.77210.7689</td><td rowspan=1 colspan=1>0.35500.32240.3250</td></tr><tr><td rowspan=1 colspan=1>Mean vectors (Word2Vec + avg)DT-RNN (Socher et al., 2014)SDT-RNN (Socher et al., 2014)</td><td rowspan=1 colspan=1>0.75770.79230.7900</td><td rowspan=1 colspan=1>0.67380.73190.7304</td><td rowspan=1 colspan=1>0.45570.38220.3848</td></tr><tr><td rowspan=1 colspan=1>LSTM (Tai et al., 2015)Bidirectional LSTM (Tai et al., 2015)Dependency Tree-LSTM (Tai et al.,2015)combine-skip (Kiros et al., 2015)</td><td rowspan=1 colspan=1>0.85280.85670.86760.8584</td><td rowspan=1 colspan=1>0.79110.79660.80830.7916</td><td rowspan=1 colspan=1>0.28310.27360.25320.2687</td></tr><tr><td rowspan=1 colspan=1>Doc2VecC</td><td rowspan=1 colspan=1>0.8381</td><td rowspan=1 colspan=1>0.7621</td><td rowspan=1 colspan=1>0.3053</td></tr></table>",
1113
+ "bbox": [
1114
+ 214,
1115
+ 167,
1116
+ 784,
1117
+ 356
1118
+ ],
1119
+ "page_idx": 10
1120
+ },
1121
+ {
1122
+ "type": "text",
1123
+ "text": "REFERENCES ",
1124
+ "text_level": 1,
1125
+ "bbox": [
1126
+ 174,
1127
+ 381,
1128
+ 287,
1129
+ 396
1130
+ ],
1131
+ "page_idx": 10
1132
+ },
1133
+ {
1134
+ "type": "text",
1135
+ "text": "David M Blei, Andrew $\\mathrm { ~ Y ~ N ~ g ~ }$ , and Michael I Jordan. Latent dirichlet allocation. Journal of machine Learning research, 3(Jan):993–1022, 2003. ",
1136
+ "bbox": [
1137
+ 178,
1138
+ 404,
1139
+ 823,
1140
+ 433
1141
+ ],
1142
+ "page_idx": 10
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "Minmin Chen, Zhixiang Xu, Kilian Weinberger, and Fei Sha. Marginalized denoising autoencoders for domain adaptation. arXiv preprint arXiv:1206.4683, 2012. ",
1147
+ "bbox": [
1148
+ 174,
1149
+ 440,
1150
+ 823,
1151
+ 470
1152
+ ],
1153
+ "page_idx": 10
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "Minmin Chen, Kilian Q Weinberger, Fei Sha, and Yoshua Bengio. Marginalized denoising autoencoders for nonlinear representations. In ICML, pp. 1476–1484, 2014. ",
1158
+ "bbox": [
1159
+ 173,
1160
+ 478,
1161
+ 821,
1162
+ 508
1163
+ ],
1164
+ "page_idx": 10
1165
+ },
1166
+ {
1167
+ "type": "text",
1168
+ "text": "Bruce Croft and John Lafferty. Language modeling for information retrieval, volume 13. Springer Science & Business Media, 2013. ",
1169
+ "bbox": [
1170
+ 173,
1171
+ 515,
1172
+ 823,
1173
+ 545
1174
+ ],
1175
+ "page_idx": 10
1176
+ },
1177
+ {
1178
+ "type": "text",
1179
+ "text": "Andrew M Dai and Quoc V Le. Semi-supervised sequence learning. In Advances in Neural Information Processing Systems, pp. 3079–3087, 2015. ",
1180
+ "bbox": [
1181
+ 169,
1182
+ 554,
1183
+ 823,
1184
+ 583
1185
+ ],
1186
+ "page_idx": 10
1187
+ },
1188
+ {
1189
+ "type": "text",
1190
+ "text": "Andrew M Dai, Christopher Olah, and Quoc V Le. Document embedding with paragraph vectors. arXiv preprint arXiv:1507.07998, 2015. ",
1191
+ "bbox": [
1192
+ 171,
1193
+ 590,
1194
+ 823,
1195
+ 621
1196
+ ],
1197
+ "page_idx": 10
1198
+ },
1199
+ {
1200
+ "type": "text",
1201
+ "text": "Scott Deerwester, Susan T Dumais, George W Furnas, Thomas K Landauer, and Richard Harshman. Indexing by latent semantic analysis. Journal of the American society for information science, 41 (6):391, 1990. ",
1202
+ "bbox": [
1203
+ 174,
1204
+ 628,
1205
+ 823,
1206
+ 671
1207
+ ],
1208
+ "page_idx": 10
1209
+ },
1210
+ {
1211
+ "type": "text",
1212
+ "text": "Rong-En Fan, Kai-Wei Chang, Cho-Jui Hsieh, Xiang-Rui Wang, and Chih-Jen Lin. Liblinear: A library for large linear classification. JMLR, 9(Aug):1871–1874, 2008. ",
1213
+ "bbox": [
1214
+ 171,
1215
+ 679,
1216
+ 823,
1217
+ 709
1218
+ ],
1219
+ "page_idx": 10
1220
+ },
1221
+ {
1222
+ "type": "text",
1223
+ "text": "Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Domain adaptation for large-scale sentiment classification: A deep learning approach. In ICML, pp. 513–520, 2011. ",
1224
+ "bbox": [
1225
+ 171,
1226
+ 717,
1227
+ 823,
1228
+ 747
1229
+ ],
1230
+ "page_idx": 10
1231
+ },
1232
+ {
1233
+ "type": "text",
1234
+ "text": "Edward Grefenstette, Georgiana Dinu, Yao-Zhong Zhang, Mehrnoosh Sadrzadeh, and Marco Baroni. Multi-step regression learning for compositional distributional semantics. arXiv preprint arXiv:1301.6939, 2013. ",
1235
+ "bbox": [
1236
+ 173,
1237
+ 755,
1238
+ 823,
1239
+ 797
1240
+ ],
1241
+ "page_idx": 10
1242
+ },
1243
+ {
1244
+ "type": "text",
1245
+ "text": "Eric H Huang, Richard Socher, Christopher D Manning, and Andrew Y Ng. Improving word representations via global context and multiple word prototypes. In ACL, pp. 873–882, 2012. ",
1246
+ "bbox": [
1247
+ 173,
1248
+ 806,
1249
+ 821,
1250
+ 835
1251
+ ],
1252
+ "page_idx": 10
1253
+ },
1254
+ {
1255
+ "type": "text",
1256
+ "text": "Yoon Kim, Yacine Jernite, David Sontag, and Alexander M Rush. Character-aware neural language models. arXiv preprint arXiv:1508.06615, 2015. ",
1257
+ "bbox": [
1258
+ 171,
1259
+ 843,
1260
+ 823,
1261
+ 872
1262
+ ],
1263
+ "page_idx": 10
1264
+ },
1265
+ {
1266
+ "type": "text",
1267
+ "text": "Ryan Kiros, Yukun Zhu, Ruslan R Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Skip-thought vectors. In Advances in neural information processing systems, pp. 3294–3302, 2015. ",
1268
+ "bbox": [
1269
+ 176,
1270
+ 881,
1271
+ 823,
1272
+ 924
1273
+ ],
1274
+ "page_idx": 10
1275
+ },
1276
+ {
1277
+ "type": "text",
1278
+ "text": "Matt J Kusner, Yu Sun, Nicholas I Kolkin, and Kilian Q Weinberger. From word embeddings to document distances. In Proceedings of the 32nd International Conference on Machine Learning (ICML 2015), pp. 957–966, 2015. ",
1279
+ "bbox": [
1280
+ 173,
1281
+ 103,
1282
+ 823,
1283
+ 146
1284
+ ],
1285
+ "page_idx": 11
1286
+ },
1287
+ {
1288
+ "type": "text",
1289
+ "text": "Quoc V Le and Tomas Mikolov. Distributed representations of sentences and documents. In ICML, volume 14, pp. 1188–1196, 2014. ",
1290
+ "bbox": [
1291
+ 173,
1292
+ 155,
1293
+ 823,
1294
+ 184
1295
+ ],
1296
+ "page_idx": 11
1297
+ },
1298
+ {
1299
+ "type": "text",
1300
+ "text": "Andrew L Maas, Raymond E Daly, Peter T Pham, Dan Huang, Andrew $\\mathrm { ~ Y ~ N ~ g ~ } _ { }$ , and Christopher Potts. Learning word vectors for sentiment analysis. In ACL, pp. 142–150, 2011. ",
1301
+ "bbox": [
1302
+ 174,
1303
+ 194,
1304
+ 820,
1305
+ 223
1306
+ ],
1307
+ "page_idx": 11
1308
+ },
1309
+ {
1310
+ "type": "text",
1311
+ "text": "Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(Nov):2579–2605, 2008. ",
1312
+ "bbox": [
1313
+ 173,
1314
+ 232,
1315
+ 821,
1316
+ 262
1317
+ ],
1318
+ "page_idx": 11
1319
+ },
1320
+ {
1321
+ "type": "text",
1322
+ "text": "Marco Marelli, Luisa Bentivogli, Marco Baroni, Raffaella Bernardi, Stefano Menini, and Roberto Zamparelli. Semeval-2014 task 1: Evaluation of compositional distributional semantic models on full sentences through semantic relatedness and textual entailment. SemEval-2014, 2014. ",
1323
+ "bbox": [
1324
+ 174,
1325
+ 271,
1326
+ 825,
1327
+ 314
1328
+ ],
1329
+ "page_idx": 11
1330
+ },
1331
+ {
1332
+ "type": "text",
1333
+ "text": "Gregoire Mesnil, Tomas Mikolov, Marc’Aurelio Ranzato, and Yoshua Bengio. Ensemble of gen- ´ erative and discriminative techniques for sentiment analysis of movie reviews. arXiv preprint arXiv:1412.5335, 2014. ",
1334
+ "bbox": [
1335
+ 173,
1336
+ 324,
1337
+ 821,
1338
+ 366
1339
+ ],
1340
+ "page_idx": 11
1341
+ },
1342
+ {
1343
+ "type": "text",
1344
+ "text": "T Mikolov and J Dean. Distributed representations of words and phrases and their compositionality. Advances in neural information processing systems, 2013. ",
1345
+ "bbox": [
1346
+ 171,
1347
+ 376,
1348
+ 823,
1349
+ 406
1350
+ ],
1351
+ "page_idx": 11
1352
+ },
1353
+ {
1354
+ "type": "text",
1355
+ "text": "Tomas Mikolov, Martin Karafiat, Lukas Burget, Jan Cernock ´ y, and Sanjeev Khudanpur. Recurrent \\` neural network based language model. In Interspeech, volume 2, pp. 3, 2010. ",
1356
+ "bbox": [
1357
+ 173,
1358
+ 415,
1359
+ 823,
1360
+ 444
1361
+ ],
1362
+ "page_idx": 11
1363
+ },
1364
+ {
1365
+ "type": "text",
1366
+ "text": "Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781, 2013a. ",
1367
+ "bbox": [
1368
+ 173,
1369
+ 453,
1370
+ 821,
1371
+ 483
1372
+ ],
1373
+ "page_idx": 11
1374
+ },
1375
+ {
1376
+ "type": "text",
1377
+ "text": "Tomas Mikolov, Wen-tau Yih, and Geoffrey Zweig. Linguistic regularities in continuous space word representations. In HLT-NAACL, volume 13, pp. 746–751, 2013b. ",
1378
+ "bbox": [
1379
+ 171,
1380
+ 492,
1381
+ 823,
1382
+ 522
1383
+ ],
1384
+ "page_idx": 11
1385
+ },
1386
+ {
1387
+ "type": "text",
1388
+ "text": "Jeff Mitchell and Mirella Lapata. Composition in distributional models of semantics. Cognitive science, 34(8):1388–1429, 2010. ",
1389
+ "bbox": [
1390
+ 173,
1391
+ 531,
1392
+ 823,
1393
+ 559
1394
+ ],
1395
+ "page_idx": 11
1396
+ },
1397
+ {
1398
+ "type": "text",
1399
+ "text": "Gerard Salton and Christopher Buckley. Term-weighting approaches in automatic text retrieval. Information processing & management, 24(5):513–523, 1988. ",
1400
+ "bbox": [
1401
+ 173,
1402
+ 569,
1403
+ 823,
1404
+ 598
1405
+ ],
1406
+ "page_idx": 11
1407
+ },
1408
+ {
1409
+ "type": "text",
1410
+ "text": "Richard Socher, Alex Perelygin, Jean Y Wu, Jason Chuang, Christopher D Manning, Andrew $\\mathrm { \\Upsilon { Y g } }$ , and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In EMNLP, volume 1631, pp. 1642, 2013. ",
1411
+ "bbox": [
1412
+ 174,
1413
+ 608,
1414
+ 823,
1415
+ 651
1416
+ ],
1417
+ "page_idx": 11
1418
+ },
1419
+ {
1420
+ "type": "text",
1421
+ "text": "Richard Socher, Andrej Karpathy, Quoc V Le, Christopher D Manning, and Andrew Y Ng. Grounded compositional semantics for finding and describing images with sentences. Transactions of the Association for Computational Linguistics, 2:207–218, 2014. ",
1422
+ "bbox": [
1423
+ 176,
1424
+ 660,
1425
+ 823,
1426
+ 704
1427
+ ],
1428
+ "page_idx": 11
1429
+ },
1430
+ {
1431
+ "type": "text",
1432
+ "text": "Kai Sheng Tai, Richard Socher, and Christopher D Manning. Improved semantic representations from tree-structured long short-term memory networks. arXiv preprint arXiv:1503.00075, 2015. ",
1433
+ "bbox": [
1434
+ 173,
1435
+ 712,
1436
+ 825,
1437
+ 742
1438
+ ],
1439
+ "page_idx": 11
1440
+ },
1441
+ {
1442
+ "type": "text",
1443
+ "text": "Laurens Van Der Maaten, Minmin Chen, Stephen Tyree, and Kilian Q Weinberger. Learning with marginalized corrupted features. In ICML (1), pp. 410–418, 2013. ",
1444
+ "bbox": [
1445
+ 169,
1446
+ 751,
1447
+ 823,
1448
+ 781
1449
+ ],
1450
+ "page_idx": 11
1451
+ },
1452
+ {
1453
+ "type": "text",
1454
+ "text": "Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In Proceedings of the 25th international conference on Machine learning, pp. 1096–1103. ACM, 2008. ",
1455
+ "bbox": [
1456
+ 176,
1457
+ 790,
1458
+ 823,
1459
+ 833
1460
+ ],
1461
+ "page_idx": 11
1462
+ },
1463
+ {
1464
+ "type": "text",
1465
+ "text": "Stefan Wager, Sida Wang, and Percy S Liang. Dropout training as adaptive regularization. In Advances in neural information processing systems, pp. 351–359, 2013. ",
1466
+ "bbox": [
1467
+ 171,
1468
+ 842,
1469
+ 825,
1470
+ 872
1471
+ ],
1472
+ "page_idx": 11
1473
+ },
1474
+ {
1475
+ "type": "text",
1476
+ "text": "Sida Wang and Christopher D Manning. Baselines and bigrams: Simple, good sentiment and topic classification. In Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics: Short Papers-Volume 2, pp. 90–94. Association for Computational Linguistics, 2012. ",
1477
+ "bbox": [
1478
+ 176,
1479
+ 882,
1480
+ 825,
1481
+ 924
1482
+ ],
1483
+ "page_idx": 11
1484
+ },
1485
+ {
1486
+ "type": "text",
1487
+ "text": "Ainur Yessenalina and Claire Cardie. Compositional matrix-space models for sentiment analysis. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, pp. 172–182. Association for Computational Linguistics, 2011. ",
1488
+ "bbox": [
1489
+ 178,
1490
+ 103,
1491
+ 823,
1492
+ 146
1493
+ ],
1494
+ "page_idx": 12
1495
+ },
1496
+ {
1497
+ "type": "text",
1498
+ "text": "Fabio Massimo Zanzotto, Ioannis Korkontzelos, Francesca Fallucchi, and Suresh Manandhar. Estimating linear models for compositional distributional semantics. In Proceedings of the 23rd International Conference on Computational Linguistics, pp. 1263–1271, 2010. ",
1499
+ "bbox": [
1500
+ 176,
1501
+ 155,
1502
+ 820,
1503
+ 196
1504
+ ],
1505
+ "page_idx": 12
1506
+ },
1507
+ {
1508
+ "type": "text",
1509
+ "text": "Xiang Zhang and Yann LeCun. Text understanding from scratch. arXiv preprint arXiv:1502.01710, 2015. ",
1510
+ "bbox": [
1511
+ 171,
1512
+ 207,
1513
+ 823,
1514
+ 234
1515
+ ],
1516
+ "page_idx": 12
1517
+ },
1518
+ {
1519
+ "type": "text",
1520
+ "text": "Yukun Zhu, Ryan Kiros, Richard Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In arXiv preprint arXiv:1506.06724, 2015. ",
1521
+ "bbox": [
1522
+ 176,
1523
+ 244,
1524
+ 825,
1525
+ 286
1526
+ ],
1527
+ "page_idx": 12
1528
+ }
1529
+ ]
parse/train/B1Igu2ogg/B1Igu2ogg_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1Igu2ogg/B1Igu2ogg_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJgQ4lSFPH/BJgQ4lSFPH.md ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # STRUCTBERT: INCORPORATING LANGUAGE STRUCTURES INTO PRETRAINING FOR DEEP LANGUAGE UNDERSTANDING
2
+
3
+ Wei Wang, Bin Bi, Ming Yan, Chen Wu, Jiangnan Xia, Zuyi Bao, Liwei Peng and Luo Si Alibaba Group Inc.
4
+ {hebian.ww, b.bi, ym119608, wuchen.wc, jiangnan.xjn, zuyi.bzy, liwei.peng, luo.si}@alibaba-inc.com
5
+
6
+ # ABSTRACT
7
+
8
+ Recently, the pre-trained language model, BERT (and its robustly optimized version RoBERTa), has attracted a lot of attention in natural language understanding (NLU), and achieved state-of-the-art accuracy in various NLU tasks, such as sentiment classification, natural language inference, semantic textual similarity and question answering. Inspired by the linearization exploration work of Elman (Elman, 1990), we extend BERT to a new model, StructBERT, by incorporating language structures into pre-training. Specifically, we pre-train StructBERT with two auxiliary tasks to make the most of the sequential order of words and sentences, which leverage language structures at the word and sentence levels, respectively. As a result, the new model is adapted to different levels of language understanding required by downstream tasks.
9
+
10
+ The StructBERT with structural pre-training gives surprisingly good empirical results on a variety of downstream tasks, including pushing the state-of-the-art on the GLUE benchmark to 89.0 (outperforming all published models at the time of model submission), the F1 score on SQuAD v1.1 question answering to 93.0, the accuracy on SNLI to 91.7.
11
+
12
+ # 1 INTRODUCTION
13
+
14
+ A pre-trained language model (LM) is a key component in many natural language understanding (NLU) tasks such as semantic textual similarity (Cer et al., 2017), question answering (Rajpurkar et al., 2016) and sentiment classification (Socher et al., 2013). In order to obtain reliable language representations, neural language models are designed to define the joint probability function of sequences of words in text with self-supervised learning. Different from traditional word-specific embedding in which each token is assigned a global representation, recent work, such as Cove (McCann et al., 2017), ELMo (Peters et al., 2018), GPT (Radford et al., 2018) and BERT (Devlin et al., 2018), derives contextualized word vectors from a language model trained on a large text corpus. These models have been shown effective for many downstream NLU tasks.
15
+
16
+ Among the context-sensitive language models, BERT (and its robustly optimized version RoBERTa (Liu et al., 2019b)) has taken the NLP world by storm. It is designed to pre-train bidirectional representations by jointly conditioning on both left and right context in all layers and model the representations by predicting masked words only through the contexts. However, it does not make the most of underlying language structures.
17
+
18
+ According to Elman (Elman, 1990)’s study, the recurrent neural networks was shown to be sensitive to regularities in word order in simple sentences. Since language fluency is determined by the ordering of words and sentences, finding the best permutation of a set of words and sentences is an essential problem in many NLP tasks, such as machine translation and NLU (Hasler et al., 2017). Recently, word ordering was treated as LM-based linearization solely based on language models (Schmaltz et al., 2016). Schmaltz showed that recurrent neural network language models (Mikolov et al., 2010) with long short-term memory (Hochreiter & Schmidhuber, 1997) cells work effectively for word ordering even without any explicit syntactic information.
19
+
20
+ In this paper, we introduce a new type of contextual representation, StructBERT, which incorporates language structures into BERT pre-training by proposing two novel linearization strategies. Specifically, in addition to the existing masking strategy, StructBERT extends BERT by leveraging the structural information: word-level ordering and sentence-level ordering. We augment model pre-training with two new structural objectives on the inner-sentence and inter-sentence structures, respectively. In this way, the linguistic aspects (Elman, 1990) are explicitly captured during the pre-training procedure. With structural pre-training, StructBERT encodes dependency between words as well as sentences in the contextualized representation, which provides the model with better generalizability and adaptability.
21
+
22
+ StructBERT significantly advances the state-of-the-art results on a variety of NLU tasks, including the GLUE benchmark (Wang et al., 2018), the SNLI dataset (Bowman et al., 2015) and the SQuAD v1.1 question answering task (Rajpurkar et al., 2016). All of these experimental results clearly demonstrate StructBERT’s exceptional effectiveness and generalization capability in language understanding.
23
+
24
+ We make the following major contributions:
25
+
26
+ • We propose novel structural pre-training that extends BERT by incorporating the word structural objective and the sentence structural objective to leverage language structures in contextualized representation. This enables the StructBERT to explicitly model language structures by forcing it to reconstruct the right order of words and sentences for correct prediction. • StructBERT significantly outperforms all published state-of-the-art models on a wide range of NLU tasks at the time of model submission. This model extends the superiority of BERT, and boosts the performance in many language understanding applications such as semantic textual similarity, sentiment analysis, textual entailment, and question answering.
27
+
28
+ # 2 STRUCTBERT MODEL PRE-TRAINING
29
+
30
+ StructBERT builds upon the BERT architecture, which uses a multi-layer bidirectional Transformer network (Vaswani et al., 2017). Given a single text sentence or a pair of text sentences, BERT packs them in one token sequence and learns a contextualized vector representation for each token. Every input token is represented based on the word, the position, and the text segment it belongs to. Next, the input vectors are fed into a stack of multi-layer bidirectional Transformer blocks, which uses self-attention to compute the text representations by considering the entire input sequence.
31
+
32
+ The original BERT introduces two unsupervised prediction tasks to pre-train the model: i.e., a masked LM task and a next sentence prediction task. Different from original BERT, our StructBERT amplifies the ability of the masked LM task by shuffling certain number of tokens after word masking and predicting the right order. Moreover, to better understand the relationship between sentences, StructBERT randomly swaps the sentence order and predicts the next sentence and the previous sentence as a new sentence prediction task. In this way, the new model not only explicitly captures the fine-grained word structure in every sentence, but also properly models the inter-sentence structure in a bidirectional manner. Once the StructBERT language model is pre-trained with these two auxiliary tasks, we can fine-tune it on task-specific data for a wide range of downstream tasks.
33
+
34
+ # 2.1 INPUT REPRESENTATION
35
+
36
+ Every input $x$ is a sequence of word tokens, which can be either a single sentence or a pair of sentences packed together. The input representation follows that used in BERT (Devlin et al., 2018). For each input token $t _ { i }$ , its vector representation $\mathbf { x } _ { i }$ is computed by summing the corresponding token embedding, positional embedding, and segment embedding. We always add a special classification embedding ([CLS]) as the first token of every sequence, and a special end-of-sequence ([SEP]) token to the end of each segment. Texts are tokenized to subword units by WordPiece (Wu et al., 2016) and absolute positional embeddings are learned with supported sequence lengths up to 512 tokens. In addition, the segment embeddings are used to differentiate a pair of sentences as in BERT.
37
+
38
+ ![](images/b0a5ea64036f18c97e36507e18d95db48b04bbdf4d32c05c77808b98a8c77571.jpg)
39
+ Figure 1: Illustrations of the two new pre-training objectives
40
+
41
+ # 2.2 TRANSFORMER ENCODER
42
+
43
+ We use a multi-layer bidirectional Transformer encoder (Vaswani et al., 2017) to encode contextual information for input representation. Given the input vectors $\mathbf { X } = \{ \mathbf { x } _ { i } \} _ { i = 1 } ^ { N }$ , an $L$ -layer Transformer is used to encode the input as:
44
+
45
+ $$
46
+ { \mathbf H } ^ { l } = T r a n s f o r m e r _ { l } ( { \mathbf H } ^ { l - 1 } )
47
+ $$
48
+
49
+ where $l \in [ 1 , L ] , \mathbf { H } ^ { 0 } = \mathbf { X }$ and $\mathbf { H } ^ { L } = [ \mathbf { h } _ { 1 } ^ { L } , \cdots , \mathbf { h } _ { N } ^ { L } ]$ . We use the hidden vector $\mathbf { h } _ { i } ^ { L }$ as the contextualized representation of the input token $t _ { i }$ .
50
+
51
+ # 2.3 PRE-TRAINING OBJECTIVES
52
+
53
+ To make full use of the rich inner-sentence and inter-sentence structures in language, we extend the pre-training objectives of original BERT in two ways: $\textcircled{1}$ word structural objective (mainly for the single-sentence task), and $\textcircled{2}$ sentence structural objective (mainly for the sentence-pair task). We pre-train these two auxiliary objectives together with the original masked LM objective in a unified model to exploit inherent language structures.
54
+
55
+ # 2.3.1 WORD STRUCTURAL OBJECTIVE
56
+
57
+ Despite its success in various NLU tasks, original BERT is unable to explicitly model the sequential order and high-order dependency of words in natural language. Given a set of words in random order from a sentence, ideally a good language model should be able to recover this sentence by reconstructing the correct order of these words. To implement this idea in StructBERT, we supplement BERT’s training objectives with a new word structural objective which endows the model with the ability to reconstruct the right order of certain number of intentionally shuffled word tokens. This new word objective is jointly trained together with the original masked LM objective from BERT.
58
+
59
+ Figure 1a illustrates the procedure of jointly training the new word objective and the masked LM objective. In every input sequence, we first mask $15 \%$ of all tokens at random, as done in BERT (Devlin et al., 2018). The corresponding output vectors $\mathbf { h } _ { i } ^ { L }$ of the masked tokens computed by the bidirectional Transformer encoder are fed into a softmax classifier to predict the original tokens.
60
+
61
+ Next, the new word objective comes into play to take word order into consideration. Given the randomicity of token shuffling, the word objective is equivalent to maximizing the likelihood of placing every shuffled token in its correct position. More formally, this objective can be formulated as:
62
+
63
+ $$
64
+ \arg \operatorname* { m a x } _ { \theta } \sum \log P ( \boldsymbol { \mathrm { p o s } } _ { 1 } = t _ { 1 } , \boldsymbol { \mathrm { p o s } } _ { 2 } = t _ { 2 } , \dots , \boldsymbol { \mathrm { p o s } } _ { K } = t _ { K } | t _ { 1 } , t _ { 2 } , \dots , t _ { K } , \theta ) ,
65
+ $$
66
+
67
+ where $\theta$ represents the set of trainable parameters of StructBERT, and $K$ indicates the length of every shuffled subsequence. Technically, a larger $K$ would force the model to be able to reconstruct longer sequences while injecting more disturbed input. On the contrary, when $K$ is smaller, the model gets more undisturbed sequences while less capable of recovering long sequences. We decide to use trigrams (i.e., $K = 3$ ) for subsequence shuffling to balance language reconstructability and robustness of the model.
68
+
69
+ Specifically, as shown in Figure 1a, we randomly choose some percentage of trigrams from unmasked tokens, and shuffle the three words (e.g., $t _ { 2 } , t _ { 3 }$ , and $t _ { 4 }$ in the figure) within each of the trigrams. The output vectors of the shuffled tokens computed by the bidirectional Transformer encoder are then fed into a softmax classifier to predict the original tokens. The new word objective is jointly learned together with the masked LM objective in a unified pre-trained model with equal weights.
70
+
71
+ # 2.3.2 SENTENCE STRUCTURAL OBJECTIVE
72
+
73
+ The next sentence prediction task is considered easy for the original BERT model (the prediction accuracy of BERT can easily achieve $9 7 \% - 9 8 \%$ in this task (Devlin et al., 2018)). We, therefore, extend the sentence prediction task by predicting both the next sentence and the previous sentence, to make the pre-trained language model aware of the sequential order of the sentences in a bidirectional manner.
74
+
75
+ As illustrated in Figure 1b, given a pair of sentences $( S _ { 1 } , S _ { 2 } )$ as input, we predict whether $S _ { 2 }$ is the next sentence that follows $S _ { 1 }$ , or the previous sentence that precedes $S _ { 1 }$ , or a random sentence from a different document. Specifically, for the sentence $S _ { 1 }$ , $\frac { 1 } { 3 }$ of the time we choose the text span that follows $S _ { 1 }$ as the second sentence $S _ { 2 }$ , $\textstyle { \frac { 1 } { 3 } }$ of the time the previous sentence ahead of $S _ { 1 }$ is selected, and $\frac 1 3$ of the time a sentence randomly sampled from the other documents is used as $S _ { 2 }$ . The two sentences are concatenated together into an input sequence with the separator token [SEP] in between, as done in BERT. We pool the model output by taking the hidden state corresponding to the first token [CLS], and feed the encoding vector of [CLS] into a softmax classifier to make a three-class prediction.
76
+
77
+ # 2.4 PRE-TRAINING SETUP
78
+
79
+ The training objective function is a linear combination of the word structural objective and the sentence structural objective. For the masked LM objective, we followed the same masking rate and settings as in BERT (Devlin et al., 2018). $5 \%$ of trigrams are selected for random shuffling.
80
+
81
+ We used documents from English Wikipedia (2,500M words) and BookCorpus (Zhu et al., 2015) as pre-training data, following the preprocessing and the WordPiece tokenization from (Devlin et al., 2018). The maximum length of input sequence was set to 512.
82
+
83
+ We ran Adam with learning rate of 1e-4, $\beta _ { 1 } = 0 . 9$ , $\beta _ { 2 } = 0 . 9 9 9$ , L2 weight decay of 0.01, learning rate warm-up over the first $10 \%$ of the total steps, and linear decay of the learning rate. We set a dropout probability of 0.1 for every layer. The gelu activation (Hendrycks & Gimpel, 2016) was used as done in GPT (Radford et al., 2018).
84
+
85
+ We denote the number of Transformer block layers as $L$ , the size of hidden vectors as $H$ , and the number of self-attention heads as $A$ . Following the practice of BERT, We primarily report experimental results on the two model sizes:
86
+
87
+ StructBERTBase: $L = 1 2$ , $H = 7 6 8$ , $A = 1 2$ , Number of parameters $\mathbf { \Lambda } _ { : = 1 1 0 \mathbf { M } }$
88
+
89
+ StructBERTLarge: $L = 2 4$ , $H = 1 0 2 4$ , $A = 1 6$ , Number of parameters $\mathrm { \Omega = 3 4 0 M }$
90
+
91
+ Pre-training of StructBERT was performed on a distributed computing cluster consisting of 64 Telsa V100 GPU cards. For the StructBERTBase, we ran the pre-training procedure for 40 epochs, which took about 38 hours, and the training of StructBERTLarge took about 7 days to complete.
92
+
93
+ # 3 EXPERIMENTS
94
+
95
+ In this section, we report results of StructBERT on a variety of downstream tasks including General Language Understanding Evaluation (GLUE benchmark), Standford Natural Language inference (SNLI corpus) and extractive question answering (SQuAD v1.1).
96
+
97
+ Following BERT’s practice, during fine-tuning on downstream tasks, we performed a grid search or an exhaustive search (depending on the data size) on the following sets of parameters and chose the model that performed the best on the dev set. All the other parameters remain the same as those in pre-training:
98
+
99
+ Batch size: 16, 24, 32; Learning rate: 2e-5, 3e-5, 5e-5; Number of epochs: 2, 3; Dropout rate: 0.05, 0.1
100
+
101
+ <table><tr><td>System</td><td>CoLA 8.5k</td><td>SST-2 67k</td><td>MRPC 3.5k</td><td>STS-B 5.7k</td><td>QQP 363k</td><td>MNLI 392k</td><td>QNLI 108k</td><td>RTE 2.5k</td><td>WNLI 634</td><td>AX</td><td>Avg.</td></tr><tr><td>Human Baseline</td><td>66.4</td><td>97.8</td><td>86.3/80.8</td><td>92.7/92.6</td><td>59.5/80.4</td><td>92.0/92.8</td><td>91.2</td><td>93.6</td><td>95.9</td><td>1</td><td></td></tr><tr><td>BERTLarge1</td><td>60.5</td><td>94.9</td><td>89.3/85.4</td><td>87.6/86.5</td><td>72.1/89.3</td><td>86.7/85.9</td><td>92.7</td><td>70.1</td><td>65.1</td><td>39.6</td><td>80.5</td></tr><tr><td>BERT on STILTs 2</td><td>62.1</td><td>94.3</td><td>90.2/86.6</td><td>88.7/88.3</td><td>71.9/89.4</td><td>86.4/85.6</td><td>92.7</td><td>80.1</td><td>65.1</td><td>28.3</td><td>82.0</td></tr><tr><td>SpanBERT3</td><td>64.3</td><td>94.8</td><td>90.9/87.9</td><td>89.9/89.1</td><td>71.9/89.5</td><td>88.1/87.7</td><td>94.3</td><td>79.0</td><td>65.1</td><td>45.1</td><td>82.8</td></tr><tr><td>Snorkel MeTaL 4</td><td>63.8</td><td>96.2</td><td>91.5/88.5</td><td>90.1/89.7</td><td>73.1/89.9</td><td>87.6/87.2</td><td>93.9</td><td>80.9</td><td>65.1</td><td>39.9</td><td>83.2</td></tr><tr><td>MT-DNN++ 5</td><td>65.4</td><td>95.6</td><td>91.1/88.2</td><td>89.6/89.0</td><td>72.7/89.6</td><td>87.9/87.4</td><td>95.8</td><td>85.1</td><td>65.1</td><td>41.9</td><td>83.8</td></tr><tr><td>MT-DNN*5</td><td>65.4</td><td>96.5</td><td>92.2/89.5</td><td>89.6/89.0</td><td>73.7/89.9</td><td>87.9/87.4</td><td>96.0</td><td>85.7</td><td>65.1</td><td>42.8</td><td>84.2</td></tr><tr><td>StructBERTBase</td><td>57.2</td><td>94.7</td><td>89.9/86.1</td><td>88.5/87.6</td><td>72.0/89.6</td><td>85.5/84.6</td><td>92.6</td><td>76.9</td><td>65.1</td><td>39.0</td><td>80.9</td></tr><tr><td>StructBERTLarge</td><td>65.3</td><td>95.2</td><td>92.0/89.3</td><td>90.3/89.4</td><td>74.1/90.5</td><td>88.0/87.7</td><td>95.7</td><td>83.1</td><td>65.1</td><td>43.6</td><td>83.9</td></tr><tr><td>StructBERTLarge*</td><td>68.6</td><td>95.2</td><td>92.5/90.1</td><td>91.1/90.6</td><td>74.4/90.7</td><td>88.2/87.9</td><td>95.7</td><td>83.1</td><td>65.1</td><td>43.9</td><td>84.5</td></tr><tr><td>XLNet*6</td><td>67.8</td><td>96.8</td><td>93.0/90.7</td><td>91.6/91.1</td><td>74.2/90.3</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>RoBERTa*7</td><td>67.8</td><td>96.7</td><td>92.3/89.8</td><td></td><td></td><td>90.2/89.8</td><td>98.6</td><td>86.3</td><td>90.4</td><td>47.5</td><td>88.4</td></tr><tr><td>Adv-RoBERTa*</td><td>68.0</td><td>96.8</td><td>93.1/90.8</td><td>92.2/91.9 92.4/92.2</td><td>74.3/90.2 74.8/90.3</td><td>90.8/90.2</td><td>98.9</td><td>88.2</td><td>89.0</td><td>48.7</td><td>88.5</td></tr><tr><td></td><td></td><td></td><td>93.6/91.5</td><td></td><td></td><td>91.1/90.7</td><td>98.8</td><td>88.7</td><td>89.0</td><td>50.1</td><td>88.8</td></tr><tr><td>StructBERTRoBERTa*</td><td>69.2</td><td>97.1</td><td></td><td>92.8/92.4</td><td>74.4/90.7</td><td>90.7/90.3</td><td>99.2</td><td>87.3</td><td>89.7</td><td>47.8</td><td>89.0</td></tr></table>
102
+
103
+ Table 1: Results of published models on the GLUE test set, which are scored by the GLUE evaluation server. The number below each task denotes the number of training examples. The state-of-theart results are in bold. All the results are obtained from https://gluebenchmark.com/ leaderboard (StructBERT submitted under a different model name ALICE). \* indicates the ensemble model. Model references: 1: (Devlin et al., 2018); 2: (Phang et al., 2018); 3: (Joshi et al., 2019); 4: (Ratner et al., 2017); 5: (Liu et al., 2019a); 6: (Yang et al., 2019b); 7: (Liu et al., 2019b).
104
+
105
+ # 3.1 GENERAL LANGUAGE UNDERSTANDING
106
+
107
+ # 3.1.1 GLUE BENCHMARK
108
+
109
+ The General Language Understanding Evaluation (GLUE) benchmark (Wang et al., 2018) is a collection of nine NLU tasks, covering textual entailment (RTE (Bentivogli et al., 2009) and MNLI (Williams et al., 2017)), question-answer entailment (QNLI (Wang et al., 2018)), paraphrase (MRPC (Dolan & Brockett, 2005)), question paraphrase (QQP), textual similarity (STS-B (Cer et al., 2017)), sentiment (SST-2 (Socher et al., 2013)), linguistic acceptability (CoLA), and Winograd Schema (WNLI (Levesque et al., 2012)).
110
+
111
+ On the GLUE benchmark, given the similarity of MRPC/RTE/STS-B to MNLI, we fine-tuned StructBERT on MNLI before training on MRPC/RTE/STS-B data for the respective tasks. This follows the two-stage transfer learning STILTs introduced in (Phang et al., 2018). For all the other tasks (i.e., RTE, QNLI, QQP, SST-2, CoLA and MNLI), we fine-tuned StructBERT for each single task only on its in-domain data.
112
+
113
+ Table 1 presents the results of published models on the GLUE test set obtained from the official benchmark evaluation server. Our StructBERTLarge ensemble suppressed all published models (excluding RoBERTa ensemble and XLNet ensemble) on the average score, and performed the best among these models in six of the nine tasks. In the most popular MNLI task, our StructBERTLarge single model improved the best result by $0 . 3 \% / 0 . 5 \%$ , since we fine-tuned MNLI only on its in-domain data, this improvement is entirely attributed to our new training objectives. The most significant improvement over BERT was observed on CoLA $( 4 . 8 \% )$ , which may be due to the strong correlation between the word order task and the grammatical error correction task. In the SST-2 task, our model improved over BERT while performed worse than MT-DNN did, which indicates that sentiment analysis based on single sentences benefits less from the word structural objective and sentence structural objective.
114
+
115
+ Table 2: Accuracy $( \% )$ on the SNLI dataset.
116
+
117
+ <table><tr><td>Model</td><td>GPT</td><td>BERT</td><td>MT-DNN</td><td>SJRC</td><td>StructBERTLarge</td></tr><tr><td>Dev</td><td>1</td><td>90.1</td><td>91.4</td><td>1</td><td>92.2</td></tr><tr><td>Test</td><td>89.9</td><td>90.8</td><td>91.1</td><td>91.3</td><td>91.7</td></tr></table>
118
+
119
+ Table 3: SQuAD results. The StructBERTLarge ensemble is $1 0 \mathrm { x }$ systems which use different pretraining checkpoints and fine-tuning seeds.
120
+
121
+ <table><tr><td rowspan="2">System</td><td colspan="2">Dev set</td><td colspan="2">Test set</td></tr><tr><td>EM</td><td>F1</td><td>EM</td><td>F1</td></tr><tr><td>Human</td><td>1</td><td>1</td><td>82.3</td><td>91.2</td></tr><tr><td>XLNet(single+DA) (Yang et al., 2019b)</td><td>88.9</td><td>94.5</td><td>89.9</td><td>95.0</td></tr><tr><td>BERT(ensemble+DA) (Devlin et al., 2018)</td><td>86.2</td><td>92.2</td><td>87.4</td><td>93.2</td></tr><tr><td>KT-NET(single) (Yang et al.,2019a)</td><td>85.1</td><td>91.7</td><td>85.9</td><td>92.4</td></tr><tr><td>BERT(single+DA) (Devlin et al., 2018)</td><td>84.2</td><td>91.1</td><td>85.1</td><td>91.8</td></tr><tr><td>QANet(ensemble+DA) (Yu et al., 2018)</td><td>1</td><td>-</td><td>84.5</td><td>90.5</td></tr><tr><td>StructBERTLarge (single)</td><td>85.2</td><td>92.0</td><td>-</td><td></td></tr><tr><td>StructBERTLarge (ensemble)</td><td>87.0</td><td>93.0</td><td>=</td><td>=</td></tr></table>
122
+
123
+ With pre-training on large corpus, XLNet ensemble and RoBERTa ensemble outperformed all published models including our StructBERTLarge ensemble. To take advantage of the large data which RoBERTa is trained on, we continued pre-training with our two new objectives from the released RoBERTa model, named StructBERTRoBERTa. At the time of model submission, our StructBERTRoBERTa ensemble, which was submitted under a different name ALICE, achieved the best performance among all published models including RoBERTa and XLNet on the leaderboard, creating a new state-of-the-art result of $8 9 . 0 \%$ on the average GLUE score. It demonstrates that the proposed objectives are able to improve language models in addition to BERT.
124
+
125
+ # 3.1.2 SNLI
126
+
127
+ Natural Language Inference (NLI) is one of the important tasks in natural language understanding. The goal of this task is to test the ability of the model to reason the semantic relationship between two sentences. In order to perform well on an NLI task, a model needs to capture the semantics of sentences, and thus to infer the relationship between a pair of sentences: entailment, contradiction or neutral.
128
+
129
+ We evaluated our model on the most widely used NLI dataset: The Stanford Natural Language Inference (SNLI) Corpus (Bowman et al., 2015), which consists of 549,367/9,842/9,824 premisehypothesis pairs in train/dev/test sets and target labels indicating their relations. We performed a grid search on the sets of parameters, and chose the model that performed best on the dev set.
130
+
131
+ Table 2 shows the results on the SNLI dataset of our model with other published models. StructBERT outperformed all existing systems on SNLI, creating new state-of-the-art results $9 1 . 7 \%$ , which amounts to $0 . 4 \%$ absolute improvement over the previous state-of-the-art model SJRC and $0 . 9 \%$ absolute improvement over BERT. Since the network architecture of our model is identical to that of BERT, this improvement is entirely attributed to the new pre-training objectives, which justifies the effectiveness of the proposed tasks of word prediction and sentence prediction.
132
+
133
+ # 3.2 EXTRACTIVE QUESTION ANSWERING
134
+
135
+ SQuAD v1.1 is a popular machine reading comprehension dataset consisting of $1 0 0 { , } 0 0 0 { + }$ questions created by crowd workers on 536 Wikipedia articles (Rajpurkar et al., 2016). The goal of the task is to extract the right answer span from the corresponding paragraph given a question.
136
+
137
+ We fine-tuned our StructBERT language model on the SQuAD dataset for 3 epochs, and compared the result against the state-of-the-art methods on the official leaderboard 1, as shown in Table 3. We can see that even without any additional data augmentation (DA) techniques, the proposed StructBERT model was superior to all published models except XLNet+DA on the dev set. 2. With data augmentation and large corpus used during pre-training, XLNet+DA outperformed our StructBERT which did not use data augmentation or large pre-training corpus. It demonstrates the effectiveness of the proposed pre-trained StructBERT in modeling the question-paragraph relationship for extractive question answering. Incorporating the word and sentence structures significantly improves the understanding ability in this fine-grained answer extraction task.
138
+
139
+ Table 4: Ablation over the pre-training objectives using StructBERTBase architecture. Every result is the average score of 8 runs with different random seeds (the MNLI accuracy is the average score of the matched and mis-matched settings).
140
+
141
+ <table><tr><td>Task</td><td>CoLA (Acc)</td><td>SST-2 (Acc)</td><td>MNLI (Acc)</td><td>SNLI (Acc)</td><td>QQP (Acc)</td><td>SQuAD (F1)</td></tr><tr><td>StructBERTBase -word structure -sentence structure</td><td>85.8 81.7 84.9 80.9</td><td>92.9 92.7 92.9</td><td>85.4 85.2 84.1</td><td>91.5 91.6 91.1</td><td>91.1 90.7 90.5</td><td>90.6 90.3 89.1</td></tr></table>
142
+
143
+ # 3.3 EFFECT OF DIFFERENT STRUCTURAL OBJECTIVES
144
+
145
+ We have demonstrated the strong empirical results of the proposed model on a variety of downstream tasks. In the StructBERT pre-training, the two new structural prediction tasks are the most important components. Therefore, we conducted an ablation study by removing one structural objective from pre-training at a time to examine how the two structural objectives influence the performance on various downstream tasks.
146
+
147
+ Results are presented in Table 4. From the table, we can see that: (1) the two structural objectives were both critical to most of the downstream tasks, except for the word structural objective in the SNLI task. Removing any word or sentence objective from pre-training always led to degraded performance in the downstream tasks. The StructBERT model with structural pre-training consistently outperformed the original BERT model, which shows the effectiveness of the proposed structural objectives. (2) For the sentence-pair tasks such as MNLI, SNLI, QQP and SQuAD, incorporating the sentence structural objective significantly improved the performance. It demonstrates the effect of inter-sentence structures learned by pre-training in understanding the relationship between sentences for downstream tasks. (3) For the single-sentence tasks such as CoLA and SST-2, the word structural objective played the most important role. Especially in the CoLA task, which is related to the grammatical error correction, the improvement was over $5 \%$ . The ability of reconstructing the order of words in pre-training helped the model better judge the acceptability of a single sentence.
148
+
149
+ We also studied the effect of both structural objectives during self-supervised pre-training. Figure 2 illustrates the loss and accuracy of word and sentence prediction over the number of pre-training steps for StructBERTBase and BERTBase. From the two sub-figures on top, it is observed that compared with BERT, the augmented shuffled token prediction in StructBERT’s word structural objective had little effect on the loss and accuracy of masked token prediction. On the other hand, the integration of the simpler task of shuffled token prediction (lower loss and higher accuracy) provides StructBERT with the capability of word reordering. In contrast, the new sentence structural objective in StructBERT leads to a more challenging prediction task than that in BERT, as shown in the two figures at the bottom. This new pre-training objective enables StructBERT to exploit inter-sentence structures, which benefits sentence-pair downstream tasks.
150
+
151
+ ![](images/57ee8e8d074254f12224b9076a0d33a627d6198d303cf1719d0e06dd63a775ed.jpg)
152
+ Figure 2: Loss and accuracy of word and sentence prediction over the number of pre-training steps
153
+
154
+ # 4 RELATED WORK
155
+
156
+ # 4.1 CONTEXTUALIZED LANGUAGE REPRESENTATION
157
+
158
+ A word can have different semantics depending on the its context. Contextualized word representation is considered to be an important part of modern NLP research, with various pre-trained language models (McCann et al., 2017; Peters et al., 2018; Radford et al., 2018; Devlin et al., 2018) emerging recently. ELMo (Peters et al., 2018) learns two unidirectional LMs based on long short-term memory networks (LSTMs). A forward LM reads the text from left to right, and a backward LM encodes the text from right to left. Following the similar idea of ELMo, OpenAI GPT (Radford et al., 2018) expands the unsupervised language model to a much larger scale by training on a giant collection of free text corpora. Different from ELMo, it builds upon a multi-layer Transformer (Vaswani et al., 2017) decoder, and uses a left-to-right Transformer to predict a text sequence word-by-word.
159
+
160
+ In contrast, BERT (Devlin et al., 2018) (as well as its robustly optimized version RoBERTa (Liu et al., 2019b)) employs a bidirectional Transformer encoder to fuse both the left and the right context, and introduces two novel pre-training tasks for better language understanding. We base our LM on the architecture of BERT, and further extend it by introducing word and sentence structures into pre-training tasks for deep language understanding.
161
+
162
+ # 4.2 WORD & SENTENCE ORDERING
163
+
164
+ The task of linearization aims to recover the original order of a shuffled sentence (Schmaltz et al., 2016). Part of larger discussion as to whether LSTMs are capturing syntactic phenomena linearization, is standardized in a recent line of research as a method useful for isolating the performance of text-totext generation (Zhang & Clark, 2015) models. Recently, Transformers have emerged as a powerful architecture for learning the latent structure of language. For example, Bidirectional Transformers (BERT) has reduced the perplexity for language modeling task. We revisit Elman’s question by applying BERT to the word-ordering task, without any explicit syntactic approaches, and find that pre-trained language models are effective for various downstream tasks with linearization.
165
+
166
+ Many important downstream tasks such as STS and NLI (Wang et al., 2018) are based on understanding the relationship between two text sentences, which is not directly captured by language modeling. While BERT (Devlin et al., 2018) pre-trains a binarized next sentence prediction task to understand sentence relationships, we take one step further and treat it as a sentence ordering task. The goal of sentence ordering is to arrange a set of sentences into a coherent text in a clear and consistent manner, which can be viewed as a ranking problem (Chen et al., 2016). The task is general and yet challenging, and once is especially important for natural language generation (Reiter & Dale, 1997). Text should be organized according to the following properties: rhetorical coherence, topical relevancy, chronological sequence, and cause-effect. In this work, we focus on what is arguably the most basic characteristics of a sequence: their order. Most of prior work on sentence ordering was part of the study of downstream tasks, such as multi-document summarization (Bollegala et al., 2010). We revisit this problem in the context of language modeling as a new sentence prediction task.
167
+
168
+ # 5 CONCLUSION
169
+
170
+ In this paper, we propose novel structural pre-training which incorporates word and sentence structures into BERT pre-training. A word structural objective and a sentence structural objective are introduced as two new pre-training tasks for deep understanding of natural language in different granularities. Experimental results demonstrate that the new StructBERT model can obtain new state-of-the-art results in a variety of downstream tasks, including the popular GLUE benchmark, the SNLI Corpus and the SQuAD v1.1 question answering.
171
+
172
+ # REFERENCES
173
+
174
+ Luisa Bentivogli, Peter Clark, Ido Dagan, and Danilo Giampiccolo. The fifth pascal recognizing textual entailment challenge. In TAC, 2009.
175
+
176
+ Danushka Bollegala, Naoaki Okazaki, and Mitsuru Ishizuka. A bottom-up approach to sentence ordering for multi-document summarization. Information processing & management, 46(1): 89–109, 2010.
177
+
178
+ Samuel R Bowman, Gabor Angeli, Christopher Potts, and Christopher D Manning. A large annotated corpus for learning natural language inference. arXiv preprint arXiv:1508.05326, 2015.
179
+
180
+ Daniel Cer, Mona Diab, Eneko Agirre, Inigo Lopez-Gazpio, and Lucia Specia. Semeval-2017 task 1: Semantic textual similarity-multilingual and cross-lingual focused evaluation. arXiv preprint arXiv:1708.00055, 2017.
181
+
182
+ Xinchi Chen, Xipeng Qiu, and Xuanjing Huang. Neural sentence ordering. arXiv preprint arXiv:1607.06952, 2016.
183
+
184
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
185
+
186
+ William B Dolan and Chris Brockett. Automatically constructing a corpus of sentential paraphrases. In Proceedings of the Third International Workshop on Paraphrasing (IWP2005), 2005.
187
+
188
+ Jeffrey L Elman. Finding structure in time. Cognitive science, 14(2):179–211, 1990.
189
+
190
+ Eva Hasler, Felix Stahlberg, Marcus Tomalin, Adri de Gispert, and Bill Byrne. A comparison of neural models for word ordering. arXiv preprint arXiv:1708.01809, 2017.
191
+
192
+ Dan Hendrycks and Kevin Gimpel. Gaussian error linear units (gelus). arXiv preprint arXiv:1606.08415, 2016.
193
+
194
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
195
+
196
+ Mandar Joshi, Danqi Chen, Yinhan Liu, Daniel S Weld, Luke Zettlemoyer, and Omer Levy. Spanbert: Improving pre-training by representing and predicting spans. arXiv preprint arXiv:1907.10529, 2019.
197
+
198
+ Hector Levesque, Ernest Davis, and Leora Morgenstern. The winograd schema challenge. In Thirteenth International Conference on the Principles of Knowledge Representation and Reasoning, 2012.
199
+
200
+ Xiaodong Liu, Pengcheng He, Weizhu Chen, and Jianfeng Gao. Multi-task deep neural networks for natural language understanding. arXiv preprint arXiv:1901.11504, 2019a.
201
+
202
+ Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. RoBERTa: A robustly optimized BERT pretraining approach. arXiv preprint arXiv:1907.11692, 2019b.
203
+
204
+ Bryan McCann, James Bradbury, Caiming Xiong, and Richard Socher. Learned in translation: Contextualized word vectors. In Advances in Neural Information Processing Systems, pp. 6294– 6305, 2017.
205
+
206
+ Toma´s Mikolov, Martin Karafi ˇ at, Luk ´ a´s Burget, Jan ˇ Cernock ˇ y, and Sanjeev Khudanpur. Recurrent \` neural network based language model. In Eleventh annual conference of the international speech communication association, 2010.
207
+
208
+ Matthew E Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. Deep contextualized word representations. arXiv preprint arXiv:1802.05365, 2018.
209
+
210
+ Jason Phang, Thibault Fevry, and Samuel R Bowman. Sentence encoders on stilts: Supplementary ´ training on intermediate labeled-data tasks. arXiv preprint arXiv:1811.01088, 2018.
211
+
212
+ Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. Improving language understanding by generative pre-training. URL https://s3-us-west-2. amazonaws. com/openaiassets/research-covers/languageunsupervised/language understanding paper. pdf, 2018.
213
+
214
+ Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: $^ { 1 0 0 , 0 0 0 + }$ questions for machine comprehension of text. arXiv preprint arXiv:1606.05250, 2016.
215
+
216
+ Alexander Ratner, Stephen H Bach, Henry Ehrenberg, Jason Fries, Sen Wu, and Christopher Re.´ Snorkel: Rapid training data creation with weak supervision. Proceedings of the VLDB Endowment, 11(3):269–282, 2017.
217
+
218
+ Ehud Reiter and Robert Dale. Building applied natural language generation systems. Natural Language Engineering, 3(1):57–87, 1997.
219
+
220
+ Allen Schmaltz, Alexander M Rush, and Stuart M Shieber. Word ordering without syntax. arXiv preprint arXiv:1604.08633, 2016.
221
+
222
+ Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew $\mathrm { N g }$ , and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pp. 1631–1642, 2013.
223
+
224
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017.
225
+
226
+ Alex Wang, Amapreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman. Glue: A multi-task benchmark and analysis platform for natural language understanding. arXiv preprint arXiv:1804.07461, 2018.
227
+
228
+ Adina Williams, Nikita Nangia, and Samuel R Bowman. A broad-coverage challenge corpus for sentence understanding through inference. arXiv preprint arXiv:1704.05426, 2017.
229
+
230
+ Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016.
231
+
232
+ An Yang, Quan Wang, Jing Liu, Kai Liu, Yajuan Lyu, Hua Wu, Qiaoqiao She, and Sujian Li. Enhancing pre-trained language representations with rich knowledge for machine reading comprehension. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 2346–2357, 2019a.
233
+
234
+ Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, and Quoc V Le. Xlnet: Generalized autoregressive pretraining for language understanding. arXiv preprint arXiv:1906.08237, 2019b.
235
+
236
+ Adams Wei Yu, David Dohan, Minh-Thang Luong, Rui Zhao, Kai Chen, Mohammad Norouzi, and Quoc V Le. Qanet: Combining local convolution with global self-attention for reading comprehension. arXiv preprint arXiv:1804.09541, 2018.
237
+
238
+ Yue Zhang and Stephen Clark. Discriminative syntax-based word ordering for text generation. Computational linguistics, 41(3):503–538, 2015.
239
+
240
+ Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In Proceedings of the IEEE international conference on computer vision, pp. 19–27, 2015.
parse/train/BJgQ4lSFPH/BJgQ4lSFPH_content_list.json ADDED
@@ -0,0 +1,1340 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "STRUCTBERT: INCORPORATING LANGUAGE STRUCTURES INTO PRETRAINING FOR DEEP LANGUAGE UNDERSTANDING ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 828,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Wei Wang, Bin Bi, Ming Yan, Chen Wu, Jiangnan Xia, Zuyi Bao, Liwei Peng and Luo Si Alibaba Group Inc. \n{hebian.ww, b.bi, ym119608, wuchen.wc, jiangnan.xjn, zuyi.bzy, liwei.peng, luo.si}@alibaba-inc.com ",
17
+ "bbox": [
18
+ 184,
19
+ 194,
20
+ 795,
21
+ 251
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 287,
32
+ 544,
33
+ 304
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Recently, the pre-trained language model, BERT (and its robustly optimized version RoBERTa), has attracted a lot of attention in natural language understanding (NLU), and achieved state-of-the-art accuracy in various NLU tasks, such as sentiment classification, natural language inference, semantic textual similarity and question answering. Inspired by the linearization exploration work of Elman (Elman, 1990), we extend BERT to a new model, StructBERT, by incorporating language structures into pre-training. Specifically, we pre-train StructBERT with two auxiliary tasks to make the most of the sequential order of words and sentences, which leverage language structures at the word and sentence levels, respectively. As a result, the new model is adapted to different levels of language understanding required by downstream tasks. ",
40
+ "bbox": [
41
+ 233,
42
+ 319,
43
+ 766,
44
+ 472
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "The StructBERT with structural pre-training gives surprisingly good empirical results on a variety of downstream tasks, including pushing the state-of-the-art on the GLUE benchmark to 89.0 (outperforming all published models at the time of model submission), the F1 score on SQuAD v1.1 question answering to 93.0, the accuracy on SNLI to 91.7. ",
51
+ "bbox": [
52
+ 233,
53
+ 474,
54
+ 764,
55
+ 544
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 571,
66
+ 336,
67
+ 588
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "A pre-trained language model (LM) is a key component in many natural language understanding (NLU) tasks such as semantic textual similarity (Cer et al., 2017), question answering (Rajpurkar et al., 2016) and sentiment classification (Socher et al., 2013). In order to obtain reliable language representations, neural language models are designed to define the joint probability function of sequences of words in text with self-supervised learning. Different from traditional word-specific embedding in which each token is assigned a global representation, recent work, such as Cove (McCann et al., 2017), ELMo (Peters et al., 2018), GPT (Radford et al., 2018) and BERT (Devlin et al., 2018), derives contextualized word vectors from a language model trained on a large text corpus. These models have been shown effective for many downstream NLU tasks. ",
74
+ "bbox": [
75
+ 174,
76
+ 603,
77
+ 825,
78
+ 728
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Among the context-sensitive language models, BERT (and its robustly optimized version RoBERTa (Liu et al., 2019b)) has taken the NLP world by storm. It is designed to pre-train bidirectional representations by jointly conditioning on both left and right context in all layers and model the representations by predicting masked words only through the contexts. However, it does not make the most of underlying language structures. ",
85
+ "bbox": [
86
+ 174,
87
+ 736,
88
+ 823,
89
+ 805
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "According to Elman (Elman, 1990)’s study, the recurrent neural networks was shown to be sensitive to regularities in word order in simple sentences. Since language fluency is determined by the ordering of words and sentences, finding the best permutation of a set of words and sentences is an essential problem in many NLP tasks, such as machine translation and NLU (Hasler et al., 2017). Recently, word ordering was treated as LM-based linearization solely based on language models (Schmaltz et al., 2016). Schmaltz showed that recurrent neural network language models (Mikolov et al., 2010) with long short-term memory (Hochreiter & Schmidhuber, 1997) cells work effectively for word ordering even without any explicit syntactic information. ",
96
+ "bbox": [
97
+ 174,
98
+ 813,
99
+ 825,
100
+ 924
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "In this paper, we introduce a new type of contextual representation, StructBERT, which incorporates language structures into BERT pre-training by proposing two novel linearization strategies. Specifically, in addition to the existing masking strategy, StructBERT extends BERT by leveraging the structural information: word-level ordering and sentence-level ordering. We augment model pre-training with two new structural objectives on the inner-sentence and inter-sentence structures, respectively. In this way, the linguistic aspects (Elman, 1990) are explicitly captured during the pre-training procedure. With structural pre-training, StructBERT encodes dependency between words as well as sentences in the contextualized representation, which provides the model with better generalizability and adaptability. ",
107
+ "bbox": [
108
+ 174,
109
+ 103,
110
+ 825,
111
+ 229
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "StructBERT significantly advances the state-of-the-art results on a variety of NLU tasks, including the GLUE benchmark (Wang et al., 2018), the SNLI dataset (Bowman et al., 2015) and the SQuAD v1.1 question answering task (Rajpurkar et al., 2016). All of these experimental results clearly demonstrate StructBERT’s exceptional effectiveness and generalization capability in language understanding. ",
118
+ "bbox": [
119
+ 176,
120
+ 236,
121
+ 825,
122
+ 291
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "We make the following major contributions: ",
129
+ "bbox": [
130
+ 176,
131
+ 299,
132
+ 462,
133
+ 313
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "• We propose novel structural pre-training that extends BERT by incorporating the word structural objective and the sentence structural objective to leverage language structures in contextualized representation. This enables the StructBERT to explicitly model language structures by forcing it to reconstruct the right order of words and sentences for correct prediction. • StructBERT significantly outperforms all published state-of-the-art models on a wide range of NLU tasks at the time of model submission. This model extends the superiority of BERT, and boosts the performance in many language understanding applications such as semantic textual similarity, sentiment analysis, textual entailment, and question answering. ",
140
+ "bbox": [
141
+ 215,
142
+ 330,
143
+ 826,
144
+ 469
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "2 STRUCTBERT MODEL PRE-TRAINING ",
151
+ "text_level": 1,
152
+ "bbox": [
153
+ 174,
154
+ 501,
155
+ 524,
156
+ 517
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "StructBERT builds upon the BERT architecture, which uses a multi-layer bidirectional Transformer network (Vaswani et al., 2017). Given a single text sentence or a pair of text sentences, BERT packs them in one token sequence and learns a contextualized vector representation for each token. Every input token is represented based on the word, the position, and the text segment it belongs to. Next, the input vectors are fed into a stack of multi-layer bidirectional Transformer blocks, which uses self-attention to compute the text representations by considering the entire input sequence. ",
163
+ "bbox": [
164
+ 174,
165
+ 537,
166
+ 825,
167
+ 622
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "The original BERT introduces two unsupervised prediction tasks to pre-train the model: i.e., a masked LM task and a next sentence prediction task. Different from original BERT, our StructBERT amplifies the ability of the masked LM task by shuffling certain number of tokens after word masking and predicting the right order. Moreover, to better understand the relationship between sentences, StructBERT randomly swaps the sentence order and predicts the next sentence and the previous sentence as a new sentence prediction task. In this way, the new model not only explicitly captures the fine-grained word structure in every sentence, but also properly models the inter-sentence structure in a bidirectional manner. Once the StructBERT language model is pre-trained with these two auxiliary tasks, we can fine-tune it on task-specific data for a wide range of downstream tasks. ",
174
+ "bbox": [
175
+ 174,
176
+ 628,
177
+ 825,
178
+ 755
179
+ ],
180
+ "page_idx": 1
181
+ },
182
+ {
183
+ "type": "text",
184
+ "text": "2.1 INPUT REPRESENTATION ",
185
+ "text_level": 1,
186
+ "bbox": [
187
+ 174,
188
+ 782,
189
+ 387,
190
+ 796
191
+ ],
192
+ "page_idx": 1
193
+ },
194
+ {
195
+ "type": "text",
196
+ "text": "Every input $x$ is a sequence of word tokens, which can be either a single sentence or a pair of sentences packed together. The input representation follows that used in BERT (Devlin et al., 2018). For each input token $t _ { i }$ , its vector representation $\\mathbf { x } _ { i }$ is computed by summing the corresponding token embedding, positional embedding, and segment embedding. We always add a special classification embedding ([CLS]) as the first token of every sequence, and a special end-of-sequence ([SEP]) token to the end of each segment. Texts are tokenized to subword units by WordPiece (Wu et al., 2016) and absolute positional embeddings are learned with supported sequence lengths up to 512 tokens. In addition, the segment embeddings are used to differentiate a pair of sentences as in BERT. ",
197
+ "bbox": [
198
+ 174,
199
+ 811,
200
+ 825,
201
+ 924
202
+ ],
203
+ "page_idx": 1
204
+ },
205
+ {
206
+ "type": "image",
207
+ "img_path": "images/b0a5ea64036f18c97e36507e18d95db48b04bbdf4d32c05c77808b98a8c77571.jpg",
208
+ "image_caption": [
209
+ "Figure 1: Illustrations of the two new pre-training objectives "
210
+ ],
211
+ "image_footnote": [],
212
+ "bbox": [
213
+ 178,
214
+ 97,
215
+ 821,
216
+ 261
217
+ ],
218
+ "page_idx": 2
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "2.2 TRANSFORMER ENCODER ",
223
+ "text_level": 1,
224
+ "bbox": [
225
+ 174,
226
+ 313,
227
+ 395,
228
+ 327
229
+ ],
230
+ "page_idx": 2
231
+ },
232
+ {
233
+ "type": "text",
234
+ "text": "We use a multi-layer bidirectional Transformer encoder (Vaswani et al., 2017) to encode contextual information for input representation. Given the input vectors $\\mathbf { X } = \\{ \\mathbf { x } _ { i } \\} _ { i = 1 } ^ { N }$ , an $L$ -layer Transformer is used to encode the input as: ",
235
+ "bbox": [
236
+ 174,
237
+ 338,
238
+ 825,
239
+ 381
240
+ ],
241
+ "page_idx": 2
242
+ },
243
+ {
244
+ "type": "equation",
245
+ "img_path": "images/7538c42a615514dbf35c2a3d19bbb89df8fcbc0842f8182a8a3af2f2e4003604.jpg",
246
+ "text": "$$\n{ \\mathbf H } ^ { l } = T r a n s f o r m e r _ { l } ( { \\mathbf H } ^ { l - 1 } )\n$$",
247
+ "text_format": "latex",
248
+ "bbox": [
249
+ 400,
250
+ 386,
251
+ 598,
252
+ 405
253
+ ],
254
+ "page_idx": 2
255
+ },
256
+ {
257
+ "type": "text",
258
+ "text": "where $l \\in [ 1 , L ] , \\mathbf { H } ^ { 0 } = \\mathbf { X }$ and $\\mathbf { H } ^ { L } = [ \\mathbf { h } _ { 1 } ^ { L } , \\cdots , \\mathbf { h } _ { N } ^ { L } ]$ . We use the hidden vector $\\mathbf { h } _ { i } ^ { L }$ as the contextualized representation of the input token $t _ { i }$ . ",
259
+ "bbox": [
260
+ 174,
261
+ 410,
262
+ 826,
263
+ 440
264
+ ],
265
+ "page_idx": 2
266
+ },
267
+ {
268
+ "type": "text",
269
+ "text": "2.3 PRE-TRAINING OBJECTIVES ",
270
+ "text_level": 1,
271
+ "bbox": [
272
+ 176,
273
+ 457,
274
+ 410,
275
+ 472
276
+ ],
277
+ "page_idx": 2
278
+ },
279
+ {
280
+ "type": "text",
281
+ "text": "To make full use of the rich inner-sentence and inter-sentence structures in language, we extend the pre-training objectives of original BERT in two ways: $\\textcircled{1}$ word structural objective (mainly for the single-sentence task), and $\\textcircled{2}$ sentence structural objective (mainly for the sentence-pair task). We pre-train these two auxiliary objectives together with the original masked LM objective in a unified model to exploit inherent language structures. ",
282
+ "bbox": [
283
+ 174,
284
+ 483,
285
+ 825,
286
+ 554
287
+ ],
288
+ "page_idx": 2
289
+ },
290
+ {
291
+ "type": "text",
292
+ "text": "2.3.1 WORD STRUCTURAL OBJECTIVE ",
293
+ "text_level": 1,
294
+ "bbox": [
295
+ 176,
296
+ 568,
297
+ 457,
298
+ 582
299
+ ],
300
+ "page_idx": 2
301
+ },
302
+ {
303
+ "type": "text",
304
+ "text": "Despite its success in various NLU tasks, original BERT is unable to explicitly model the sequential order and high-order dependency of words in natural language. Given a set of words in random order from a sentence, ideally a good language model should be able to recover this sentence by reconstructing the correct order of these words. To implement this idea in StructBERT, we supplement BERT’s training objectives with a new word structural objective which endows the model with the ability to reconstruct the right order of certain number of intentionally shuffled word tokens. This new word objective is jointly trained together with the original masked LM objective from BERT. ",
305
+ "bbox": [
306
+ 173,
307
+ 592,
308
+ 825,
309
+ 690
310
+ ],
311
+ "page_idx": 2
312
+ },
313
+ {
314
+ "type": "text",
315
+ "text": "Figure 1a illustrates the procedure of jointly training the new word objective and the masked LM objective. In every input sequence, we first mask $15 \\%$ of all tokens at random, as done in BERT (Devlin et al., 2018). The corresponding output vectors $\\mathbf { h } _ { i } ^ { L }$ of the masked tokens computed by the bidirectional Transformer encoder are fed into a softmax classifier to predict the original tokens. ",
316
+ "bbox": [
317
+ 173,
318
+ 696,
319
+ 825,
320
+ 753
321
+ ],
322
+ "page_idx": 2
323
+ },
324
+ {
325
+ "type": "text",
326
+ "text": "Next, the new word objective comes into play to take word order into consideration. Given the randomicity of token shuffling, the word objective is equivalent to maximizing the likelihood of placing every shuffled token in its correct position. More formally, this objective can be formulated as: ",
327
+ "bbox": [
328
+ 173,
329
+ 761,
330
+ 825,
331
+ 814
332
+ ],
333
+ "page_idx": 2
334
+ },
335
+ {
336
+ "type": "equation",
337
+ "img_path": "images/fc24810c9600643637d812de832110d8772e9fa15d6140945ca1d7e822ee6ab7.jpg",
338
+ "text": "$$\n\\arg \\operatorname* { m a x } _ { \\theta } \\sum \\log P ( \\boldsymbol { \\mathrm { p o s } } _ { 1 } = t _ { 1 } , \\boldsymbol { \\mathrm { p o s } } _ { 2 } = t _ { 2 } , \\dots , \\boldsymbol { \\mathrm { p o s } } _ { K } = t _ { K } | t _ { 1 } , t _ { 2 } , \\dots , t _ { K } , \\theta ) ,\n$$",
339
+ "text_format": "latex",
340
+ "bbox": [
341
+ 250,
342
+ 811,
343
+ 748,
344
+ 838
345
+ ],
346
+ "page_idx": 2
347
+ },
348
+ {
349
+ "type": "text",
350
+ "text": "where $\\theta$ represents the set of trainable parameters of StructBERT, and $K$ indicates the length of every shuffled subsequence. Technically, a larger $K$ would force the model to be able to reconstruct longer sequences while injecting more disturbed input. On the contrary, when $K$ is smaller, the model gets more undisturbed sequences while less capable of recovering long sequences. We decide to use trigrams (i.e., $K = 3$ ) for subsequence shuffling to balance language reconstructability and robustness of the model. ",
351
+ "bbox": [
352
+ 173,
353
+ 840,
354
+ 825,
355
+ 924
356
+ ],
357
+ "page_idx": 2
358
+ },
359
+ {
360
+ "type": "text",
361
+ "text": "Specifically, as shown in Figure 1a, we randomly choose some percentage of trigrams from unmasked tokens, and shuffle the three words (e.g., $t _ { 2 } , t _ { 3 }$ , and $t _ { 4 }$ in the figure) within each of the trigrams. The output vectors of the shuffled tokens computed by the bidirectional Transformer encoder are then fed into a softmax classifier to predict the original tokens. The new word objective is jointly learned together with the masked LM objective in a unified pre-trained model with equal weights. ",
362
+ "bbox": [
363
+ 174,
364
+ 103,
365
+ 825,
366
+ 174
367
+ ],
368
+ "page_idx": 3
369
+ },
370
+ {
371
+ "type": "text",
372
+ "text": "2.3.2 SENTENCE STRUCTURAL OBJECTIVE ",
373
+ "text_level": 1,
374
+ "bbox": [
375
+ 176,
376
+ 190,
377
+ 485,
378
+ 205
379
+ ],
380
+ "page_idx": 3
381
+ },
382
+ {
383
+ "type": "text",
384
+ "text": "The next sentence prediction task is considered easy for the original BERT model (the prediction accuracy of BERT can easily achieve $9 7 \\% - 9 8 \\%$ in this task (Devlin et al., 2018)). We, therefore, extend the sentence prediction task by predicting both the next sentence and the previous sentence, to make the pre-trained language model aware of the sequential order of the sentences in a bidirectional manner. ",
385
+ "bbox": [
386
+ 174,
387
+ 215,
388
+ 825,
389
+ 285
390
+ ],
391
+ "page_idx": 3
392
+ },
393
+ {
394
+ "type": "text",
395
+ "text": "As illustrated in Figure 1b, given a pair of sentences $( S _ { 1 } , S _ { 2 } )$ as input, we predict whether $S _ { 2 }$ is the next sentence that follows $S _ { 1 }$ , or the previous sentence that precedes $S _ { 1 }$ , or a random sentence from a different document. Specifically, for the sentence $S _ { 1 }$ , $\\frac { 1 } { 3 }$ of the time we choose the text span that follows $S _ { 1 }$ as the second sentence $S _ { 2 }$ , $\\textstyle { \\frac { 1 } { 3 } }$ of the time the previous sentence ahead of $S _ { 1 }$ is selected, and $\\frac 1 3$ of the time a sentence randomly sampled from the other documents is used as $S _ { 2 }$ . The two sentences are concatenated together into an input sequence with the separator token [SEP] in between, as done in BERT. We pool the model output by taking the hidden state corresponding to the first token [CLS], and feed the encoding vector of [CLS] into a softmax classifier to make a three-class prediction. ",
396
+ "bbox": [
397
+ 173,
398
+ 291,
399
+ 826,
400
+ 422
401
+ ],
402
+ "page_idx": 3
403
+ },
404
+ {
405
+ "type": "text",
406
+ "text": "2.4 PRE-TRAINING SETUP ",
407
+ "text_level": 1,
408
+ "bbox": [
409
+ 176,
410
+ 441,
411
+ 369,
412
+ 455
413
+ ],
414
+ "page_idx": 3
415
+ },
416
+ {
417
+ "type": "text",
418
+ "text": "The training objective function is a linear combination of the word structural objective and the sentence structural objective. For the masked LM objective, we followed the same masking rate and settings as in BERT (Devlin et al., 2018). $5 \\%$ of trigrams are selected for random shuffling. ",
419
+ "bbox": [
420
+ 174,
421
+ 468,
422
+ 825,
423
+ 511
424
+ ],
425
+ "page_idx": 3
426
+ },
427
+ {
428
+ "type": "text",
429
+ "text": "We used documents from English Wikipedia (2,500M words) and BookCorpus (Zhu et al., 2015) as pre-training data, following the preprocessing and the WordPiece tokenization from (Devlin et al., 2018). The maximum length of input sequence was set to 512. ",
430
+ "bbox": [
431
+ 176,
432
+ 517,
433
+ 823,
434
+ 560
435
+ ],
436
+ "page_idx": 3
437
+ },
438
+ {
439
+ "type": "text",
440
+ "text": "We ran Adam with learning rate of 1e-4, $\\beta _ { 1 } = 0 . 9$ , $\\beta _ { 2 } = 0 . 9 9 9$ , L2 weight decay of 0.01, learning rate warm-up over the first $10 \\%$ of the total steps, and linear decay of the learning rate. We set a dropout probability of 0.1 for every layer. The gelu activation (Hendrycks & Gimpel, 2016) was used as done in GPT (Radford et al., 2018). ",
441
+ "bbox": [
442
+ 174,
443
+ 566,
444
+ 825,
445
+ 622
446
+ ],
447
+ "page_idx": 3
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "We denote the number of Transformer block layers as $L$ , the size of hidden vectors as $H$ , and the number of self-attention heads as $A$ . Following the practice of BERT, We primarily report experimental results on the two model sizes: ",
452
+ "bbox": [
453
+ 176,
454
+ 628,
455
+ 823,
456
+ 671
457
+ ],
458
+ "page_idx": 3
459
+ },
460
+ {
461
+ "type": "text",
462
+ "text": "StructBERTBase: $L = 1 2$ , $H = 7 6 8$ , $A = 1 2$ , Number of parameters $\\mathbf { \\Lambda } _ { : = 1 1 0 \\mathbf { M } }$ ",
463
+ "bbox": [
464
+ 173,
465
+ 678,
466
+ 691,
467
+ 693
468
+ ],
469
+ "page_idx": 3
470
+ },
471
+ {
472
+ "type": "text",
473
+ "text": "StructBERTLarge: $L = 2 4$ , $H = 1 0 2 4$ , $A = 1 6$ , Number of parameters $\\mathrm { \\Omega = 3 4 0 M }$ ",
474
+ "bbox": [
475
+ 173,
476
+ 699,
477
+ 704,
478
+ 714
479
+ ],
480
+ "page_idx": 3
481
+ },
482
+ {
483
+ "type": "text",
484
+ "text": "Pre-training of StructBERT was performed on a distributed computing cluster consisting of 64 Telsa V100 GPU cards. For the StructBERTBase, we ran the pre-training procedure for 40 epochs, which took about 38 hours, and the training of StructBERTLarge took about 7 days to complete. ",
485
+ "bbox": [
486
+ 174,
487
+ 722,
488
+ 825,
489
+ 763
490
+ ],
491
+ "page_idx": 3
492
+ },
493
+ {
494
+ "type": "text",
495
+ "text": "3 EXPERIMENTS ",
496
+ "text_level": 1,
497
+ "bbox": [
498
+ 176,
499
+ 785,
500
+ 326,
501
+ 801
502
+ ],
503
+ "page_idx": 3
504
+ },
505
+ {
506
+ "type": "text",
507
+ "text": "In this section, we report results of StructBERT on a variety of downstream tasks including General Language Understanding Evaluation (GLUE benchmark), Standford Natural Language inference (SNLI corpus) and extractive question answering (SQuAD v1.1). ",
508
+ "bbox": [
509
+ 174,
510
+ 818,
511
+ 825,
512
+ 861
513
+ ],
514
+ "page_idx": 3
515
+ },
516
+ {
517
+ "type": "text",
518
+ "text": "Following BERT’s practice, during fine-tuning on downstream tasks, we performed a grid search or an exhaustive search (depending on the data size) on the following sets of parameters and chose the model that performed the best on the dev set. All the other parameters remain the same as those in pre-training: ",
519
+ "bbox": [
520
+ 174,
521
+ 867,
522
+ 823,
523
+ 924
524
+ ],
525
+ "page_idx": 3
526
+ },
527
+ {
528
+ "type": "text",
529
+ "text": "Batch size: 16, 24, 32; Learning rate: 2e-5, 3e-5, 5e-5; Number of epochs: 2, 3; Dropout rate: 0.05, 0.1 ",
530
+ "bbox": [
531
+ 174,
532
+ 104,
533
+ 781,
534
+ 118
535
+ ],
536
+ "page_idx": 4
537
+ },
538
+ {
539
+ "type": "table",
540
+ "img_path": "images/d96b904dabd1b1a8c857d65bc2b4dc03bb41c71829294f0325a7dd4da5d1da74.jpg",
541
+ "table_caption": [],
542
+ "table_footnote": [],
543
+ "table_body": "<table><tr><td>System</td><td>CoLA 8.5k</td><td>SST-2 67k</td><td>MRPC 3.5k</td><td>STS-B 5.7k</td><td>QQP 363k</td><td>MNLI 392k</td><td>QNLI 108k</td><td>RTE 2.5k</td><td>WNLI 634</td><td>AX</td><td>Avg.</td></tr><tr><td>Human Baseline</td><td>66.4</td><td>97.8</td><td>86.3/80.8</td><td>92.7/92.6</td><td>59.5/80.4</td><td>92.0/92.8</td><td>91.2</td><td>93.6</td><td>95.9</td><td>1</td><td></td></tr><tr><td>BERTLarge1</td><td>60.5</td><td>94.9</td><td>89.3/85.4</td><td>87.6/86.5</td><td>72.1/89.3</td><td>86.7/85.9</td><td>92.7</td><td>70.1</td><td>65.1</td><td>39.6</td><td>80.5</td></tr><tr><td>BERT on STILTs 2</td><td>62.1</td><td>94.3</td><td>90.2/86.6</td><td>88.7/88.3</td><td>71.9/89.4</td><td>86.4/85.6</td><td>92.7</td><td>80.1</td><td>65.1</td><td>28.3</td><td>82.0</td></tr><tr><td>SpanBERT3</td><td>64.3</td><td>94.8</td><td>90.9/87.9</td><td>89.9/89.1</td><td>71.9/89.5</td><td>88.1/87.7</td><td>94.3</td><td>79.0</td><td>65.1</td><td>45.1</td><td>82.8</td></tr><tr><td>Snorkel MeTaL 4</td><td>63.8</td><td>96.2</td><td>91.5/88.5</td><td>90.1/89.7</td><td>73.1/89.9</td><td>87.6/87.2</td><td>93.9</td><td>80.9</td><td>65.1</td><td>39.9</td><td>83.2</td></tr><tr><td>MT-DNN++ 5</td><td>65.4</td><td>95.6</td><td>91.1/88.2</td><td>89.6/89.0</td><td>72.7/89.6</td><td>87.9/87.4</td><td>95.8</td><td>85.1</td><td>65.1</td><td>41.9</td><td>83.8</td></tr><tr><td>MT-DNN*5</td><td>65.4</td><td>96.5</td><td>92.2/89.5</td><td>89.6/89.0</td><td>73.7/89.9</td><td>87.9/87.4</td><td>96.0</td><td>85.7</td><td>65.1</td><td>42.8</td><td>84.2</td></tr><tr><td>StructBERTBase</td><td>57.2</td><td>94.7</td><td>89.9/86.1</td><td>88.5/87.6</td><td>72.0/89.6</td><td>85.5/84.6</td><td>92.6</td><td>76.9</td><td>65.1</td><td>39.0</td><td>80.9</td></tr><tr><td>StructBERTLarge</td><td>65.3</td><td>95.2</td><td>92.0/89.3</td><td>90.3/89.4</td><td>74.1/90.5</td><td>88.0/87.7</td><td>95.7</td><td>83.1</td><td>65.1</td><td>43.6</td><td>83.9</td></tr><tr><td>StructBERTLarge*</td><td>68.6</td><td>95.2</td><td>92.5/90.1</td><td>91.1/90.6</td><td>74.4/90.7</td><td>88.2/87.9</td><td>95.7</td><td>83.1</td><td>65.1</td><td>43.9</td><td>84.5</td></tr><tr><td>XLNet*6</td><td>67.8</td><td>96.8</td><td>93.0/90.7</td><td>91.6/91.1</td><td>74.2/90.3</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>RoBERTa*7</td><td>67.8</td><td>96.7</td><td>92.3/89.8</td><td></td><td></td><td>90.2/89.8</td><td>98.6</td><td>86.3</td><td>90.4</td><td>47.5</td><td>88.4</td></tr><tr><td>Adv-RoBERTa*</td><td>68.0</td><td>96.8</td><td>93.1/90.8</td><td>92.2/91.9 92.4/92.2</td><td>74.3/90.2 74.8/90.3</td><td>90.8/90.2</td><td>98.9</td><td>88.2</td><td>89.0</td><td>48.7</td><td>88.5</td></tr><tr><td></td><td></td><td></td><td>93.6/91.5</td><td></td><td></td><td>91.1/90.7</td><td>98.8</td><td>88.7</td><td>89.0</td><td>50.1</td><td>88.8</td></tr><tr><td>StructBERTRoBERTa*</td><td>69.2</td><td>97.1</td><td></td><td>92.8/92.4</td><td>74.4/90.7</td><td>90.7/90.3</td><td>99.2</td><td>87.3</td><td>89.7</td><td>47.8</td><td>89.0</td></tr></table>",
544
+ "bbox": [
545
+ 173,
546
+ 137,
547
+ 826,
548
+ 310
549
+ ],
550
+ "page_idx": 4
551
+ },
552
+ {
553
+ "type": "text",
554
+ "text": "Table 1: Results of published models on the GLUE test set, which are scored by the GLUE evaluation server. The number below each task denotes the number of training examples. The state-of-theart results are in bold. All the results are obtained from https://gluebenchmark.com/ leaderboard (StructBERT submitted under a different model name ALICE). \\* indicates the ensemble model. Model references: 1: (Devlin et al., 2018); 2: (Phang et al., 2018); 3: (Joshi et al., 2019); 4: (Ratner et al., 2017); 5: (Liu et al., 2019a); 6: (Yang et al., 2019b); 7: (Liu et al., 2019b). ",
555
+ "bbox": [
556
+ 173,
557
+ 319,
558
+ 826,
559
+ 405
560
+ ],
561
+ "page_idx": 4
562
+ },
563
+ {
564
+ "type": "text",
565
+ "text": "3.1 GENERAL LANGUAGE UNDERSTANDING ",
566
+ "text_level": 1,
567
+ "bbox": [
568
+ 176,
569
+ 440,
570
+ 493,
571
+ 454
572
+ ],
573
+ "page_idx": 4
574
+ },
575
+ {
576
+ "type": "text",
577
+ "text": "3.1.1 GLUE BENCHMARK ",
578
+ "text_level": 1,
579
+ "bbox": [
580
+ 176,
581
+ 468,
582
+ 369,
583
+ 483
584
+ ],
585
+ "page_idx": 4
586
+ },
587
+ {
588
+ "type": "text",
589
+ "text": "The General Language Understanding Evaluation (GLUE) benchmark (Wang et al., 2018) is a collection of nine NLU tasks, covering textual entailment (RTE (Bentivogli et al., 2009) and MNLI (Williams et al., 2017)), question-answer entailment (QNLI (Wang et al., 2018)), paraphrase (MRPC (Dolan & Brockett, 2005)), question paraphrase (QQP), textual similarity (STS-B (Cer et al., 2017)), sentiment (SST-2 (Socher et al., 2013)), linguistic acceptability (CoLA), and Winograd Schema (WNLI (Levesque et al., 2012)). ",
590
+ "bbox": [
591
+ 173,
592
+ 494,
593
+ 826,
594
+ 579
595
+ ],
596
+ "page_idx": 4
597
+ },
598
+ {
599
+ "type": "text",
600
+ "text": "On the GLUE benchmark, given the similarity of MRPC/RTE/STS-B to MNLI, we fine-tuned StructBERT on MNLI before training on MRPC/RTE/STS-B data for the respective tasks. This follows the two-stage transfer learning STILTs introduced in (Phang et al., 2018). For all the other tasks (i.e., RTE, QNLI, QQP, SST-2, CoLA and MNLI), we fine-tuned StructBERT for each single task only on its in-domain data. ",
601
+ "bbox": [
602
+ 174,
603
+ 585,
604
+ 825,
605
+ 655
606
+ ],
607
+ "page_idx": 4
608
+ },
609
+ {
610
+ "type": "text",
611
+ "text": "Table 1 presents the results of published models on the GLUE test set obtained from the official benchmark evaluation server. Our StructBERTLarge ensemble suppressed all published models (excluding RoBERTa ensemble and XLNet ensemble) on the average score, and performed the best among these models in six of the nine tasks. In the most popular MNLI task, our StructBERTLarge single model improved the best result by $0 . 3 \\% / 0 . 5 \\%$ , since we fine-tuned MNLI only on its in-domain data, this improvement is entirely attributed to our new training objectives. The most significant improvement over BERT was observed on CoLA $( 4 . 8 \\% )$ , which may be due to the strong correlation between the word order task and the grammatical error correction task. In the SST-2 task, our model improved over BERT while performed worse than MT-DNN did, which indicates that sentiment analysis based on single sentences benefits less from the word structural objective and sentence structural objective. ",
612
+ "bbox": [
613
+ 173,
614
+ 661,
615
+ 825,
616
+ 815
617
+ ],
618
+ "page_idx": 4
619
+ },
620
+ {
621
+ "type": "table",
622
+ "img_path": "images/5ed0a8d30d43bc93edd20c858d3267978101244bdbe8f2d855db3eae76eea010.jpg",
623
+ "table_caption": [
624
+ "Table 2: Accuracy $( \\% )$ on the SNLI dataset. "
625
+ ],
626
+ "table_footnote": [],
627
+ "table_body": "<table><tr><td>Model</td><td>GPT</td><td>BERT</td><td>MT-DNN</td><td>SJRC</td><td>StructBERTLarge</td></tr><tr><td>Dev</td><td>1</td><td>90.1</td><td>91.4</td><td>1</td><td>92.2</td></tr><tr><td>Test</td><td>89.9</td><td>90.8</td><td>91.1</td><td>91.3</td><td>91.7</td></tr></table>",
628
+ "bbox": [
629
+ 259,
630
+ 843,
631
+ 732,
632
+ 888
633
+ ],
634
+ "page_idx": 4
635
+ },
636
+ {
637
+ "type": "table",
638
+ "img_path": "images/0f0d2ce697058c4f17a4093a8b2093c5912aa7b76682fcd44c3cd2ffd9f5a13d.jpg",
639
+ "table_caption": [
640
+ "Table 3: SQuAD results. The StructBERTLarge ensemble is $1 0 \\mathrm { x }$ systems which use different pretraining checkpoints and fine-tuning seeds. "
641
+ ],
642
+ "table_footnote": [],
643
+ "table_body": "<table><tr><td rowspan=\"2\">System</td><td colspan=\"2\">Dev set</td><td colspan=\"2\">Test set</td></tr><tr><td>EM</td><td>F1</td><td>EM</td><td>F1</td></tr><tr><td>Human</td><td>1</td><td>1</td><td>82.3</td><td>91.2</td></tr><tr><td>XLNet(single+DA) (Yang et al., 2019b)</td><td>88.9</td><td>94.5</td><td>89.9</td><td>95.0</td></tr><tr><td>BERT(ensemble+DA) (Devlin et al., 2018)</td><td>86.2</td><td>92.2</td><td>87.4</td><td>93.2</td></tr><tr><td>KT-NET(single) (Yang et al.,2019a)</td><td>85.1</td><td>91.7</td><td>85.9</td><td>92.4</td></tr><tr><td>BERT(single+DA) (Devlin et al., 2018)</td><td>84.2</td><td>91.1</td><td>85.1</td><td>91.8</td></tr><tr><td>QANet(ensemble+DA) (Yu et al., 2018)</td><td>1</td><td>-</td><td>84.5</td><td>90.5</td></tr><tr><td>StructBERTLarge (single)</td><td>85.2</td><td>92.0</td><td>-</td><td></td></tr><tr><td>StructBERTLarge (ensemble)</td><td>87.0</td><td>93.0</td><td>=</td><td>=</td></tr></table>",
644
+ "bbox": [
645
+ 248,
646
+ 99,
647
+ 750,
648
+ 244
649
+ ],
650
+ "page_idx": 5
651
+ },
652
+ {
653
+ "type": "text",
654
+ "text": "With pre-training on large corpus, XLNet ensemble and RoBERTa ensemble outperformed all published models including our StructBERTLarge ensemble. To take advantage of the large data which RoBERTa is trained on, we continued pre-training with our two new objectives from the released RoBERTa model, named StructBERTRoBERTa. At the time of model submission, our StructBERTRoBERTa ensemble, which was submitted under a different name ALICE, achieved the best performance among all published models including RoBERTa and XLNet on the leaderboard, creating a new state-of-the-art result of $8 9 . 0 \\%$ on the average GLUE score. It demonstrates that the proposed objectives are able to improve language models in addition to BERT. ",
655
+ "bbox": [
656
+ 174,
657
+ 316,
658
+ 825,
659
+ 429
660
+ ],
661
+ "page_idx": 5
662
+ },
663
+ {
664
+ "type": "text",
665
+ "text": "3.1.2 SNLI ",
666
+ "text_level": 1,
667
+ "bbox": [
668
+ 174,
669
+ 445,
670
+ 267,
671
+ 459
672
+ ],
673
+ "page_idx": 5
674
+ },
675
+ {
676
+ "type": "text",
677
+ "text": "Natural Language Inference (NLI) is one of the important tasks in natural language understanding. The goal of this task is to test the ability of the model to reason the semantic relationship between two sentences. In order to perform well on an NLI task, a model needs to capture the semantics of sentences, and thus to infer the relationship between a pair of sentences: entailment, contradiction or neutral. ",
678
+ "bbox": [
679
+ 174,
680
+ 470,
681
+ 825,
682
+ 540
683
+ ],
684
+ "page_idx": 5
685
+ },
686
+ {
687
+ "type": "text",
688
+ "text": "We evaluated our model on the most widely used NLI dataset: The Stanford Natural Language Inference (SNLI) Corpus (Bowman et al., 2015), which consists of 549,367/9,842/9,824 premisehypothesis pairs in train/dev/test sets and target labels indicating their relations. We performed a grid search on the sets of parameters, and chose the model that performed best on the dev set. ",
689
+ "bbox": [
690
+ 174,
691
+ 546,
692
+ 825,
693
+ 603
694
+ ],
695
+ "page_idx": 5
696
+ },
697
+ {
698
+ "type": "text",
699
+ "text": "Table 2 shows the results on the SNLI dataset of our model with other published models. StructBERT outperformed all existing systems on SNLI, creating new state-of-the-art results $9 1 . 7 \\%$ , which amounts to $0 . 4 \\%$ absolute improvement over the previous state-of-the-art model SJRC and $0 . 9 \\%$ absolute improvement over BERT. Since the network architecture of our model is identical to that of BERT, this improvement is entirely attributed to the new pre-training objectives, which justifies the effectiveness of the proposed tasks of word prediction and sentence prediction. ",
700
+ "bbox": [
701
+ 174,
702
+ 609,
703
+ 825,
704
+ 694
705
+ ],
706
+ "page_idx": 5
707
+ },
708
+ {
709
+ "type": "text",
710
+ "text": "3.2 EXTRACTIVE QUESTION ANSWERING ",
711
+ "text_level": 1,
712
+ "bbox": [
713
+ 176,
714
+ 712,
715
+ 475,
716
+ 727
717
+ ],
718
+ "page_idx": 5
719
+ },
720
+ {
721
+ "type": "text",
722
+ "text": "SQuAD v1.1 is a popular machine reading comprehension dataset consisting of $1 0 0 { , } 0 0 0 { + }$ questions created by crowd workers on 536 Wikipedia articles (Rajpurkar et al., 2016). The goal of the task is to extract the right answer span from the corresponding paragraph given a question. ",
723
+ "bbox": [
724
+ 176,
725
+ 739,
726
+ 823,
727
+ 781
728
+ ],
729
+ "page_idx": 5
730
+ },
731
+ {
732
+ "type": "text",
733
+ "text": "We fine-tuned our StructBERT language model on the SQuAD dataset for 3 epochs, and compared the result against the state-of-the-art methods on the official leaderboard 1, as shown in Table 3. We can see that even without any additional data augmentation (DA) techniques, the proposed StructBERT model was superior to all published models except XLNet+DA on the dev set. 2. With data augmentation and large corpus used during pre-training, XLNet+DA outperformed our StructBERT which did not use data augmentation or large pre-training corpus. It demonstrates the effectiveness of the proposed pre-trained StructBERT in modeling the question-paragraph relationship for extractive question answering. Incorporating the word and sentence structures significantly improves the understanding ability in this fine-grained answer extraction task. ",
734
+ "bbox": [
735
+ 174,
736
+ 787,
737
+ 823,
738
+ 858
739
+ ],
740
+ "page_idx": 5
741
+ },
742
+ {
743
+ "type": "table",
744
+ "img_path": "images/fd42c0577bc8125a8320d0db0aff2f9f1377c5bd97c3cfbb9352b125a9bd91a3.jpg",
745
+ "table_caption": [
746
+ "Table 4: Ablation over the pre-training objectives using StructBERTBase architecture. Every result is the average score of 8 runs with different random seeds (the MNLI accuracy is the average score of the matched and mis-matched settings). "
747
+ ],
748
+ "table_footnote": [],
749
+ "table_body": "<table><tr><td>Task</td><td>CoLA (Acc)</td><td>SST-2 (Acc)</td><td>MNLI (Acc)</td><td>SNLI (Acc)</td><td>QQP (Acc)</td><td>SQuAD (F1)</td></tr><tr><td>StructBERTBase -word structure -sentence structure</td><td>85.8 81.7 84.9 80.9</td><td>92.9 92.7 92.9</td><td>85.4 85.2 84.1</td><td>91.5 91.6 91.1</td><td>91.1 90.7 90.5</td><td>90.6 90.3 89.1</td></tr></table>",
750
+ "bbox": [
751
+ 236,
752
+ 101,
753
+ 761,
754
+ 188
755
+ ],
756
+ "page_idx": 6
757
+ },
758
+ {
759
+ "type": "text",
760
+ "text": "",
761
+ "bbox": [
762
+ 174,
763
+ 267,
764
+ 825,
765
+ 324
766
+ ],
767
+ "page_idx": 6
768
+ },
769
+ {
770
+ "type": "text",
771
+ "text": "3.3 EFFECT OF DIFFERENT STRUCTURAL OBJECTIVES ",
772
+ "text_level": 1,
773
+ "bbox": [
774
+ 176,
775
+ 340,
776
+ 558,
777
+ 356
778
+ ],
779
+ "page_idx": 6
780
+ },
781
+ {
782
+ "type": "text",
783
+ "text": "We have demonstrated the strong empirical results of the proposed model on a variety of downstream tasks. In the StructBERT pre-training, the two new structural prediction tasks are the most important components. Therefore, we conducted an ablation study by removing one structural objective from pre-training at a time to examine how the two structural objectives influence the performance on various downstream tasks. ",
784
+ "bbox": [
785
+ 174,
786
+ 367,
787
+ 825,
788
+ 436
789
+ ],
790
+ "page_idx": 6
791
+ },
792
+ {
793
+ "type": "text",
794
+ "text": "Results are presented in Table 4. From the table, we can see that: (1) the two structural objectives were both critical to most of the downstream tasks, except for the word structural objective in the SNLI task. Removing any word or sentence objective from pre-training always led to degraded performance in the downstream tasks. The StructBERT model with structural pre-training consistently outperformed the original BERT model, which shows the effectiveness of the proposed structural objectives. (2) For the sentence-pair tasks such as MNLI, SNLI, QQP and SQuAD, incorporating the sentence structural objective significantly improved the performance. It demonstrates the effect of inter-sentence structures learned by pre-training in understanding the relationship between sentences for downstream tasks. (3) For the single-sentence tasks such as CoLA and SST-2, the word structural objective played the most important role. Especially in the CoLA task, which is related to the grammatical error correction, the improvement was over $5 \\%$ . The ability of reconstructing the order of words in pre-training helped the model better judge the acceptability of a single sentence. ",
795
+ "bbox": [
796
+ 174,
797
+ 444,
798
+ 825,
799
+ 611
800
+ ],
801
+ "page_idx": 6
802
+ },
803
+ {
804
+ "type": "text",
805
+ "text": "We also studied the effect of both structural objectives during self-supervised pre-training. Figure 2 illustrates the loss and accuracy of word and sentence prediction over the number of pre-training steps for StructBERTBase and BERTBase. From the two sub-figures on top, it is observed that compared with BERT, the augmented shuffled token prediction in StructBERT’s word structural objective had little effect on the loss and accuracy of masked token prediction. On the other hand, the integration of the simpler task of shuffled token prediction (lower loss and higher accuracy) provides StructBERT with the capability of word reordering. In contrast, the new sentence structural objective in StructBERT leads to a more challenging prediction task than that in BERT, as shown in the two figures at the bottom. This new pre-training objective enables StructBERT to exploit inter-sentence structures, which benefits sentence-pair downstream tasks. ",
806
+ "bbox": [
807
+ 174,
808
+ 617,
809
+ 825,
810
+ 660
811
+ ],
812
+ "page_idx": 6
813
+ },
814
+ {
815
+ "type": "image",
816
+ "img_path": "images/57ee8e8d074254f12224b9076a0d33a627d6198d303cf1719d0e06dd63a775ed.jpg",
817
+ "image_caption": [
818
+ "Figure 2: Loss and accuracy of word and sentence prediction over the number of pre-training steps "
819
+ ],
820
+ "image_footnote": [],
821
+ "bbox": [
822
+ 289,
823
+ 684,
824
+ 709,
825
+ 893
826
+ ],
827
+ "page_idx": 6
828
+ },
829
+ {
830
+ "type": "text",
831
+ "text": "",
832
+ "bbox": [
833
+ 174,
834
+ 103,
835
+ 825,
836
+ 200
837
+ ],
838
+ "page_idx": 7
839
+ },
840
+ {
841
+ "type": "text",
842
+ "text": "4 RELATED WORK ",
843
+ "text_level": 1,
844
+ "bbox": [
845
+ 176,
846
+ 222,
847
+ 343,
848
+ 238
849
+ ],
850
+ "page_idx": 7
851
+ },
852
+ {
853
+ "type": "text",
854
+ "text": "4.1 CONTEXTUALIZED LANGUAGE REPRESENTATION ",
855
+ "text_level": 1,
856
+ "bbox": [
857
+ 174,
858
+ 255,
859
+ 557,
860
+ 270
861
+ ],
862
+ "page_idx": 7
863
+ },
864
+ {
865
+ "type": "text",
866
+ "text": "A word can have different semantics depending on the its context. Contextualized word representation is considered to be an important part of modern NLP research, with various pre-trained language models (McCann et al., 2017; Peters et al., 2018; Radford et al., 2018; Devlin et al., 2018) emerging recently. ELMo (Peters et al., 2018) learns two unidirectional LMs based on long short-term memory networks (LSTMs). A forward LM reads the text from left to right, and a backward LM encodes the text from right to left. Following the similar idea of ELMo, OpenAI GPT (Radford et al., 2018) expands the unsupervised language model to a much larger scale by training on a giant collection of free text corpora. Different from ELMo, it builds upon a multi-layer Transformer (Vaswani et al., 2017) decoder, and uses a left-to-right Transformer to predict a text sequence word-by-word. ",
867
+ "bbox": [
868
+ 174,
869
+ 281,
870
+ 825,
871
+ 406
872
+ ],
873
+ "page_idx": 7
874
+ },
875
+ {
876
+ "type": "text",
877
+ "text": "In contrast, BERT (Devlin et al., 2018) (as well as its robustly optimized version RoBERTa (Liu et al., 2019b)) employs a bidirectional Transformer encoder to fuse both the left and the right context, and introduces two novel pre-training tasks for better language understanding. We base our LM on the architecture of BERT, and further extend it by introducing word and sentence structures into pre-training tasks for deep language understanding. ",
878
+ "bbox": [
879
+ 174,
880
+ 414,
881
+ 825,
882
+ 483
883
+ ],
884
+ "page_idx": 7
885
+ },
886
+ {
887
+ "type": "text",
888
+ "text": "4.2 WORD & SENTENCE ORDERING ",
889
+ "text_level": 1,
890
+ "bbox": [
891
+ 178,
892
+ 502,
893
+ 436,
894
+ 516
895
+ ],
896
+ "page_idx": 7
897
+ },
898
+ {
899
+ "type": "text",
900
+ "text": "The task of linearization aims to recover the original order of a shuffled sentence (Schmaltz et al., 2016). Part of larger discussion as to whether LSTMs are capturing syntactic phenomena linearization, is standardized in a recent line of research as a method useful for isolating the performance of text-totext generation (Zhang & Clark, 2015) models. Recently, Transformers have emerged as a powerful architecture for learning the latent structure of language. For example, Bidirectional Transformers (BERT) has reduced the perplexity for language modeling task. We revisit Elman’s question by applying BERT to the word-ordering task, without any explicit syntactic approaches, and find that pre-trained language models are effective for various downstream tasks with linearization. ",
901
+ "bbox": [
902
+ 174,
903
+ 529,
904
+ 825,
905
+ 640
906
+ ],
907
+ "page_idx": 7
908
+ },
909
+ {
910
+ "type": "text",
911
+ "text": "Many important downstream tasks such as STS and NLI (Wang et al., 2018) are based on understanding the relationship between two text sentences, which is not directly captured by language modeling. While BERT (Devlin et al., 2018) pre-trains a binarized next sentence prediction task to understand sentence relationships, we take one step further and treat it as a sentence ordering task. The goal of sentence ordering is to arrange a set of sentences into a coherent text in a clear and consistent manner, which can be viewed as a ranking problem (Chen et al., 2016). The task is general and yet challenging, and once is especially important for natural language generation (Reiter & Dale, 1997). Text should be organized according to the following properties: rhetorical coherence, topical relevancy, chronological sequence, and cause-effect. In this work, we focus on what is arguably the most basic characteristics of a sequence: their order. Most of prior work on sentence ordering was part of the study of downstream tasks, such as multi-document summarization (Bollegala et al., 2010). We revisit this problem in the context of language modeling as a new sentence prediction task. ",
912
+ "bbox": [
913
+ 174,
914
+ 646,
915
+ 825,
916
+ 814
917
+ ],
918
+ "page_idx": 7
919
+ },
920
+ {
921
+ "type": "text",
922
+ "text": "5 CONCLUSION ",
923
+ "text_level": 1,
924
+ "bbox": [
925
+ 176,
926
+ 835,
927
+ 318,
928
+ 851
929
+ ],
930
+ "page_idx": 7
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "In this paper, we propose novel structural pre-training which incorporates word and sentence structures into BERT pre-training. A word structural objective and a sentence structural objective are introduced as two new pre-training tasks for deep understanding of natural language in different granularities. Experimental results demonstrate that the new StructBERT model can obtain new state-of-the-art results in a variety of downstream tasks, including the popular GLUE benchmark, the SNLI Corpus and the SQuAD v1.1 question answering. ",
935
+ "bbox": [
936
+ 176,
937
+ 867,
938
+ 825,
939
+ 922
940
+ ],
941
+ "page_idx": 7
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "",
946
+ "bbox": [
947
+ 173,
948
+ 103,
949
+ 823,
950
+ 132
951
+ ],
952
+ "page_idx": 8
953
+ },
954
+ {
955
+ "type": "text",
956
+ "text": "REFERENCES ",
957
+ "text_level": 1,
958
+ "bbox": [
959
+ 174,
960
+ 154,
961
+ 287,
962
+ 170
963
+ ],
964
+ "page_idx": 8
965
+ },
966
+ {
967
+ "type": "text",
968
+ "text": "Luisa Bentivogli, Peter Clark, Ido Dagan, and Danilo Giampiccolo. The fifth pascal recognizing textual entailment challenge. In TAC, 2009. ",
969
+ "bbox": [
970
+ 174,
971
+ 178,
972
+ 823,
973
+ 207
974
+ ],
975
+ "page_idx": 8
976
+ },
977
+ {
978
+ "type": "text",
979
+ "text": "Danushka Bollegala, Naoaki Okazaki, and Mitsuru Ishizuka. A bottom-up approach to sentence ordering for multi-document summarization. Information processing & management, 46(1): 89–109, 2010. ",
980
+ "bbox": [
981
+ 173,
982
+ 217,
983
+ 825,
984
+ 260
985
+ ],
986
+ "page_idx": 8
987
+ },
988
+ {
989
+ "type": "text",
990
+ "text": "Samuel R Bowman, Gabor Angeli, Christopher Potts, and Christopher D Manning. A large annotated corpus for learning natural language inference. arXiv preprint arXiv:1508.05326, 2015. ",
991
+ "bbox": [
992
+ 173,
993
+ 270,
994
+ 823,
995
+ 300
996
+ ],
997
+ "page_idx": 8
998
+ },
999
+ {
1000
+ "type": "text",
1001
+ "text": "Daniel Cer, Mona Diab, Eneko Agirre, Inigo Lopez-Gazpio, and Lucia Specia. Semeval-2017 task 1: Semantic textual similarity-multilingual and cross-lingual focused evaluation. arXiv preprint arXiv:1708.00055, 2017. ",
1002
+ "bbox": [
1003
+ 173,
1004
+ 310,
1005
+ 826,
1006
+ 353
1007
+ ],
1008
+ "page_idx": 8
1009
+ },
1010
+ {
1011
+ "type": "text",
1012
+ "text": "Xinchi Chen, Xipeng Qiu, and Xuanjing Huang. Neural sentence ordering. arXiv preprint arXiv:1607.06952, 2016. ",
1013
+ "bbox": [
1014
+ 171,
1015
+ 363,
1016
+ 825,
1017
+ 392
1018
+ ],
1019
+ "page_idx": 8
1020
+ },
1021
+ {
1022
+ "type": "text",
1023
+ "text": "Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018. ",
1024
+ "bbox": [
1025
+ 171,
1026
+ 404,
1027
+ 823,
1028
+ 433
1029
+ ],
1030
+ "page_idx": 8
1031
+ },
1032
+ {
1033
+ "type": "text",
1034
+ "text": "William B Dolan and Chris Brockett. Automatically constructing a corpus of sentential paraphrases. In Proceedings of the Third International Workshop on Paraphrasing (IWP2005), 2005. ",
1035
+ "bbox": [
1036
+ 173,
1037
+ 443,
1038
+ 823,
1039
+ 472
1040
+ ],
1041
+ "page_idx": 8
1042
+ },
1043
+ {
1044
+ "type": "text",
1045
+ "text": "Jeffrey L Elman. Finding structure in time. Cognitive science, 14(2):179–211, 1990. ",
1046
+ "bbox": [
1047
+ 174,
1048
+ 482,
1049
+ 728,
1050
+ 498
1051
+ ],
1052
+ "page_idx": 8
1053
+ },
1054
+ {
1055
+ "type": "text",
1056
+ "text": "Eva Hasler, Felix Stahlberg, Marcus Tomalin, Adri de Gispert, and Bill Byrne. A comparison of neural models for word ordering. arXiv preprint arXiv:1708.01809, 2017. ",
1057
+ "bbox": [
1058
+ 173,
1059
+ 508,
1060
+ 820,
1061
+ 537
1062
+ ],
1063
+ "page_idx": 8
1064
+ },
1065
+ {
1066
+ "type": "text",
1067
+ "text": "Dan Hendrycks and Kevin Gimpel. Gaussian error linear units (gelus). arXiv preprint arXiv:1606.08415, 2016. ",
1068
+ "bbox": [
1069
+ 173,
1070
+ 547,
1071
+ 825,
1072
+ 577
1073
+ ],
1074
+ "page_idx": 8
1075
+ },
1076
+ {
1077
+ "type": "text",
1078
+ "text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997. ",
1079
+ "bbox": [
1080
+ 173,
1081
+ 588,
1082
+ 825,
1083
+ 617
1084
+ ],
1085
+ "page_idx": 8
1086
+ },
1087
+ {
1088
+ "type": "text",
1089
+ "text": "Mandar Joshi, Danqi Chen, Yinhan Liu, Daniel S Weld, Luke Zettlemoyer, and Omer Levy. Spanbert: Improving pre-training by representing and predicting spans. arXiv preprint arXiv:1907.10529, 2019. ",
1090
+ "bbox": [
1091
+ 174,
1092
+ 627,
1093
+ 825,
1094
+ 670
1095
+ ],
1096
+ "page_idx": 8
1097
+ },
1098
+ {
1099
+ "type": "text",
1100
+ "text": "Hector Levesque, Ernest Davis, and Leora Morgenstern. The winograd schema challenge. In Thirteenth International Conference on the Principles of Knowledge Representation and Reasoning, 2012. ",
1101
+ "bbox": [
1102
+ 174,
1103
+ 680,
1104
+ 826,
1105
+ 723
1106
+ ],
1107
+ "page_idx": 8
1108
+ },
1109
+ {
1110
+ "type": "text",
1111
+ "text": "Xiaodong Liu, Pengcheng He, Weizhu Chen, and Jianfeng Gao. Multi-task deep neural networks for natural language understanding. arXiv preprint arXiv:1901.11504, 2019a. ",
1112
+ "bbox": [
1113
+ 174,
1114
+ 734,
1115
+ 825,
1116
+ 763
1117
+ ],
1118
+ "page_idx": 8
1119
+ },
1120
+ {
1121
+ "type": "text",
1122
+ "text": "Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. RoBERTa: A robustly optimized BERT pretraining approach. arXiv preprint arXiv:1907.11692, 2019b. ",
1123
+ "bbox": [
1124
+ 174,
1125
+ 773,
1126
+ 826,
1127
+ 816
1128
+ ],
1129
+ "page_idx": 8
1130
+ },
1131
+ {
1132
+ "type": "text",
1133
+ "text": "Bryan McCann, James Bradbury, Caiming Xiong, and Richard Socher. Learned in translation: Contextualized word vectors. In Advances in Neural Information Processing Systems, pp. 6294– 6305, 2017. ",
1134
+ "bbox": [
1135
+ 174,
1136
+ 827,
1137
+ 825,
1138
+ 871
1139
+ ],
1140
+ "page_idx": 8
1141
+ },
1142
+ {
1143
+ "type": "text",
1144
+ "text": "Toma´s Mikolov, Martin Karafi ˇ at, Luk ´ a´s Burget, Jan ˇ Cernock ˇ y, and Sanjeev Khudanpur. Recurrent \\` neural network based language model. In Eleventh annual conference of the international speech communication association, 2010. ",
1145
+ "bbox": [
1146
+ 176,
1147
+ 881,
1148
+ 825,
1149
+ 924
1150
+ ],
1151
+ "page_idx": 8
1152
+ },
1153
+ {
1154
+ "type": "text",
1155
+ "text": "Matthew E Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. Deep contextualized word representations. arXiv preprint arXiv:1802.05365, 2018. ",
1156
+ "bbox": [
1157
+ 174,
1158
+ 103,
1159
+ 823,
1160
+ 146
1161
+ ],
1162
+ "page_idx": 9
1163
+ },
1164
+ {
1165
+ "type": "text",
1166
+ "text": "Jason Phang, Thibault Fevry, and Samuel R Bowman. Sentence encoders on stilts: Supplementary ´ training on intermediate labeled-data tasks. arXiv preprint arXiv:1811.01088, 2018. ",
1167
+ "bbox": [
1168
+ 171,
1169
+ 154,
1170
+ 823,
1171
+ 183
1172
+ ],
1173
+ "page_idx": 9
1174
+ },
1175
+ {
1176
+ "type": "text",
1177
+ "text": "Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. Improving language understanding by generative pre-training. URL https://s3-us-west-2. amazonaws. com/openaiassets/research-covers/languageunsupervised/language understanding paper. pdf, 2018. ",
1178
+ "bbox": [
1179
+ 174,
1180
+ 189,
1181
+ 825,
1182
+ 233
1183
+ ],
1184
+ "page_idx": 9
1185
+ },
1186
+ {
1187
+ "type": "text",
1188
+ "text": "Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: $^ { 1 0 0 , 0 0 0 + }$ questions for machine comprehension of text. arXiv preprint arXiv:1606.05250, 2016. ",
1189
+ "bbox": [
1190
+ 171,
1191
+ 241,
1192
+ 825,
1193
+ 270
1194
+ ],
1195
+ "page_idx": 9
1196
+ },
1197
+ {
1198
+ "type": "text",
1199
+ "text": "Alexander Ratner, Stephen H Bach, Henry Ehrenberg, Jason Fries, Sen Wu, and Christopher Re.´ Snorkel: Rapid training data creation with weak supervision. Proceedings of the VLDB Endowment, 11(3):269–282, 2017. ",
1200
+ "bbox": [
1201
+ 174,
1202
+ 276,
1203
+ 825,
1204
+ 319
1205
+ ],
1206
+ "page_idx": 9
1207
+ },
1208
+ {
1209
+ "type": "text",
1210
+ "text": "Ehud Reiter and Robert Dale. Building applied natural language generation systems. Natural Language Engineering, 3(1):57–87, 1997. ",
1211
+ "bbox": [
1212
+ 169,
1213
+ 327,
1214
+ 825,
1215
+ 356
1216
+ ],
1217
+ "page_idx": 9
1218
+ },
1219
+ {
1220
+ "type": "text",
1221
+ "text": "Allen Schmaltz, Alexander M Rush, and Stuart M Shieber. Word ordering without syntax. arXiv preprint arXiv:1604.08633, 2016. ",
1222
+ "bbox": [
1223
+ 169,
1224
+ 363,
1225
+ 825,
1226
+ 393
1227
+ ],
1228
+ "page_idx": 9
1229
+ },
1230
+ {
1231
+ "type": "text",
1232
+ "text": "Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew $\\mathrm { N g }$ , and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pp. 1631–1642, 2013. ",
1233
+ "bbox": [
1234
+ 173,
1235
+ 400,
1236
+ 826,
1237
+ 457
1238
+ ],
1239
+ "page_idx": 9
1240
+ },
1241
+ {
1242
+ "type": "text",
1243
+ "text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017. ",
1244
+ "bbox": [
1245
+ 173,
1246
+ 464,
1247
+ 825,
1248
+ 507
1249
+ ],
1250
+ "page_idx": 9
1251
+ },
1252
+ {
1253
+ "type": "text",
1254
+ "text": "Alex Wang, Amapreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman. Glue: A multi-task benchmark and analysis platform for natural language understanding. arXiv preprint arXiv:1804.07461, 2018. ",
1255
+ "bbox": [
1256
+ 173,
1257
+ 515,
1258
+ 823,
1259
+ 558
1260
+ ],
1261
+ "page_idx": 9
1262
+ },
1263
+ {
1264
+ "type": "text",
1265
+ "text": "Adina Williams, Nikita Nangia, and Samuel R Bowman. A broad-coverage challenge corpus for sentence understanding through inference. arXiv preprint arXiv:1704.05426, 2017. ",
1266
+ "bbox": [
1267
+ 169,
1268
+ 564,
1269
+ 823,
1270
+ 594
1271
+ ],
1272
+ "page_idx": 9
1273
+ },
1274
+ {
1275
+ "type": "text",
1276
+ "text": "Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016. ",
1277
+ "bbox": [
1278
+ 174,
1279
+ 602,
1280
+ 826,
1281
+ 657
1282
+ ],
1283
+ "page_idx": 9
1284
+ },
1285
+ {
1286
+ "type": "text",
1287
+ "text": "An Yang, Quan Wang, Jing Liu, Kai Liu, Yajuan Lyu, Hua Wu, Qiaoqiao She, and Sujian Li. Enhancing pre-trained language representations with rich knowledge for machine reading comprehension. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 2346–2357, 2019a. ",
1288
+ "bbox": [
1289
+ 173,
1290
+ 665,
1291
+ 826,
1292
+ 722
1293
+ ],
1294
+ "page_idx": 9
1295
+ },
1296
+ {
1297
+ "type": "text",
1298
+ "text": "Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, and Quoc V Le. Xlnet: Generalized autoregressive pretraining for language understanding. arXiv preprint arXiv:1906.08237, 2019b. ",
1299
+ "bbox": [
1300
+ 174,
1301
+ 729,
1302
+ 825,
1303
+ 772
1304
+ ],
1305
+ "page_idx": 9
1306
+ },
1307
+ {
1308
+ "type": "text",
1309
+ "text": "Adams Wei Yu, David Dohan, Minh-Thang Luong, Rui Zhao, Kai Chen, Mohammad Norouzi, and Quoc V Le. Qanet: Combining local convolution with global self-attention for reading comprehension. arXiv preprint arXiv:1804.09541, 2018. ",
1310
+ "bbox": [
1311
+ 173,
1312
+ 780,
1313
+ 825,
1314
+ 824
1315
+ ],
1316
+ "page_idx": 9
1317
+ },
1318
+ {
1319
+ "type": "text",
1320
+ "text": "Yue Zhang and Stephen Clark. Discriminative syntax-based word ordering for text generation. Computational linguistics, 41(3):503–538, 2015. ",
1321
+ "bbox": [
1322
+ 171,
1323
+ 830,
1324
+ 825,
1325
+ 859
1326
+ ],
1327
+ "page_idx": 9
1328
+ },
1329
+ {
1330
+ "type": "text",
1331
+ "text": "Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In Proceedings of the IEEE international conference on computer vision, pp. 19–27, 2015. ",
1332
+ "bbox": [
1333
+ 176,
1334
+ 867,
1335
+ 825,
1336
+ 924
1337
+ ],
1338
+ "page_idx": 9
1339
+ }
1340
+ ]
parse/train/BJgQ4lSFPH/BJgQ4lSFPH_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJgQ4lSFPH/BJgQ4lSFPH_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HkLXCE9lx/HkLXCE9lx.md ADDED
@@ -0,0 +1,391 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # RL2: FAST REINFORCEMENT LEARNING VIA SLOW REINFORCEMENT LEARNING
2
+
3
+ Yan Duan†‡, John Schulman†‡, Xi Chen†‡, Peter L. Bartlett†, Ilya Sutskever‡, Pieter Abbeel†‡
4
+
5
+ † UC Berkeley, Department of Electrical Engineering and Computer Science
6
+ ‡ OpenAI
7
+ {rocky,joschu,peter}@openai.com, peter@berkeley.edu, {ilyasu,pieter}@openai.com
8
+
9
+ # ABSTRACT
10
+
11
+ Deep reinforcement learning (deep RL) has been successful in learning sophisticated behaviors automatically; however, the learning process requires a huge number of trials. In contrast, animals can learn new tasks in just a few trials, benefiting from their prior knowledge about the world. This paper seeks to bridge this gap. Rather than designing a “fast” reinforcement learning algorithm, we propose to represent it as a recurrent neural network (RNN) and learn it from data. In our proposed method, $\mathtt { R L } ^ { 2 }$ , the algorithm is encoded in the weights of the RNN, which are learned slowly through a general-purpose (“slow”) RL algorithm. The RNN receives all information a typical RL algorithm would receive, including observations, actions, rewards, and termination flags; and it retains its state across episodes in a given Markov Decision Process (MDP). The activations of the RNN store the state of the “fast” RL algorithm on the current (previously unseen) MDP. We evaluate $\mathtt { R L } ^ { 2 }$ experimentally on both small-scale and large-scale problems. On the small-scale side, we train it to solve randomly generated multi-armed bandit problems and finite MDPs. After $\mathtt { R L } ^ { 2 }$ is trained, its performance on new MDPs is close to human-designed algorithms with optimality guarantees. On the largescale side, we test $\mathtt { R L } ^ { \tilde { 2 } }$ on a vision-based navigation task and show that it scales up to high-dimensional problems.
12
+
13
+ # 1 INTRODUCTION
14
+
15
+ In recent years, deep reinforcement learning has achieved many impressive results, including playing Atari games from raw pixels (Guo et al., 2014; Mnih et al., 2015; Schulman et al., 2015), and acquiring advanced manipulation and locomotion skills (Levine et al., 2016; Lillicrap et al., 2015; Watter et al., 2015; Heess et al., 2015b; Schulman et al., 2015; 2016). However, many of the successes come at the expense of high sample complexity. For example, the state-of-the-art Atari results require tens of thousands of episodes of experience (Mnih et al., 2015) per game. To master a game, one would need to spend nearly 40 days playing it with no rest. In contrast, humans and animals are capable of learning a new task in a very small number of trials. Continuing the previous example, the human player in Mnih et al. (2015) only needed 2 hours of experience before mastering a game. We argue that the reason for this sharp contrast is largely due to the lack of a good prior, which results in these deep RL agents needing to rebuild their knowledge about the world from scratch.
16
+
17
+ Although Bayesian reinforcement learning provides a solid framework for incorporating prior knowledge into the learning process (Strens, 2000; Ghavamzadeh et al., 2015; Kolter & Ng, 2009), exact computation of the Bayesian update is intractable in all but the simplest cases. Thus, practical reinforcement learning algorithms often incorporate a mixture of Bayesian and domain-specific ideas to bring down sample complexity and computational burden. Notable examples include guided policy search with unknown dynamics (Levine & Abbeel, 2014) and PILCO (Deisenroth & Rasmussen, 2011). These methods can learn a task using a few minutes to a few hours of real experience, compared to days or even weeks required by previous methods (Schulman et al., 2015; 2016; Lillicrap et al., 2015). However, these methods tend to make assumptions about the environment (e.g., instrumentation for access to the state at learning time), or become computationally intractable in high-dimensional settings (Wahlstrom et al., 2015). ¨
18
+
19
+ Rather than hand-designing domain-specific reinforcement learning algorithms, we take a different approach in this paper: we view the learning process of the agent itself as an objective, which can be optimized using standard reinforcement learning algorithms. The objective is averaged across all possible MDPs according to a specific distribution, which reflects the prior that we would like to distill into the agent. We structure the agent as a recurrent neural network, which receives past rewards, actions, and termination flags as inputs in addition to the normally received observations. Furthermore, its internal state is preserved across episodes, so that it has the capacity to perform learning in its own hidden activations. The learned agent thus also acts as the learning algorithm, and can adapt to the task at hand when deployed.
20
+
21
+ We evaluate this approach on two sets of classical problems, multi-armed bandits and tabular MDPs. These problems have been extensively studied, and there exist algorithms that achieve asymptotically optimal performance. We demonstrate that our method, named $\mathtt { R L } ^ { 2 }$ , can achieve performance comparable with these theoretically justified algorithms. Next, we evaluate $\mathrm { { R L ^ { 2 } } }$ on a vision-based navigation task implemented using the ViZDoom environment (Kempka et al., 2016), showing that $\mathrm { { R L ^ { 2 } } }$ can also scale to high-dimensional problems.
22
+
23
+ # 2 METHOD
24
+
25
+ # 2.1 PRELIMINARIES
26
+
27
+ We define a discrete-time finite-horizon discounted Markov decision process (MDP) by a tuple $M =$
28
+ $( \mathcal { S } , \mathcal { A } , \mathcal { P } , r , \rho _ { 0 } , \gamma , T )$ , in which $s$ is a state set, $\mathcal { A }$ an action set, $\mathcal { P } : \mathcal { S } \times \mathcal { A } \times \mathcal { S } \mathbb { R } _ { + }$ a transition
29
+ probability distribution, $r : \mathcal { S } \times \mathcal { A } [ - R _ { \mathrm { { m a x } } } , R _ { \mathrm { { m a x } } } ]$ a bounded reward function, $\rho _ { 0 } : { \mathcal { S } } \to \mathbb { R } _ { + }$ an
30
+ initial state distribution, $\gamma \in [ 0 , 1 ]$ a discount factor, and $T$ the horizon. In policy search methods,
31
+ we typically optimize a stocto maximize its expected dis $\pi _ { \theta } : \mathcal { S } \times \mathcal { A } \to \mathbb { R } _ { + }$ $\theta$ $\begin{array} { r } { \eta ( \pi _ { \theta } ) = \mathbb { E } _ { \tau } [ \sum _ { t = 0 } ^ { T } \gamma ^ { t } r ( s _ { t } , a _ { t } ) ] } \end{array}$ ${ \boldsymbol \tau } = ( s _ { 0 } , a _ { 0 } , \ldots )$ $s _ { 0 } \sim \rho _ { 0 } ( s _ { 0 } )$ $a _ { t } \sim \pi _ { \theta } ( a _ { t } | s _ { t } )$ $s _ { t + 1 } \sim \mathcal { P } ( s _ { t + 1 } | s _ { t } , a _ { t } )$
32
+
33
+ # 2.2 FORMULATION
34
+
35
+ We now describe our formulation, which casts learning an RL algorithm as a reinforcement learning problem, and hence the name $\mathrm { { R L ^ { 2 } } }$ .
36
+
37
+ We assume knowledge of a set of MDPs, denoted by $\mathcal { M }$ , and a distribution over them: $\rho _ { \mathcal { M } } : \mathcal { M } \to$ $\mathbb { R } _ { + }$ . We only need to sample from this distribution. We use $n$ to denote the total number of episodes allowed to spend with a specific MDP. We define a trial to be such a series of episodes of interaction with a fixed MDP.
38
+
39
+ ![](images/0ebc9fad3131588828f31d9d5537d098b3da11efbfcea50ec2981d4dc44de61d.jpg)
40
+ Figure 1: Procedure of agent-environment interaction
41
+
42
+ This process of interaction between an agent and the environment is illustrated in Figure 1. Here, each trial happens to consist of two episodes, hence $n = 2$ . For each trial, a separate MDP is drawn from $\rho _ { \mathcal { M } }$ , and for each episode, a fresh $s _ { 0 }$ is drawn from the initial state distribution specific to the corresponding MDP. Upon receiving an action $a _ { t }$ produced by the agent, the environment computes reward $r _ { t }$ , steps forward, and computes the next state $s _ { t + 1 }$ . If the episode has terminated, it sets termination flag $d _ { t }$ to 1, which otherwise defaults to 0. Together, the next state $s _ { t + 1 }$ , action $a _ { t }$ , reward $r _ { t }$ , and termination flag $d _ { t }$ , are concatenated to form the input to the policy1, which, conditioned on the hidden state $h _ { t + 1 }$ , generates the next hidden state $h _ { t + 2 }$ and action $a _ { t + 1 }$ . At the end of an episode, the hidden state of the policy is preserved to the next episode, but not preserved between trials.
43
+
44
+ The objective under this formulation is to maximize the expected total discounted reward accumulated during a single trial rather than a single episode. Maximizing this objective is equivalent to minimizing the cumulative pseudo-regret (Bubeck & Cesa-Bianchi, 2012). Since the underlying MDP changes across trials, as long as different strategies are required for different MDPs, the agent must act differently according to its belief over which MDP it is currently in. Hence, the agent is forced to integrate all the information it has received, including past actions, rewards, and termination flags, and adapt its strategy continually. Hence, we have set up an end-to-end optimization process, where the agent is encouraged to learn a “fast” reinforcement learning algorithm.
45
+
46
+ For clarity of exposition, we have defined the “inner” problem (of which the agent sees $n$ each trials) to be an MDP rather than a POMDP. However, the method can also be applied in the partiallyobserved setting without any conceptual changes. In the partially observed setting, the agent is faced with a sequence of POMDPs, and it receives an observation $o _ { t }$ instead of state $s _ { t }$ at time $t$ . The visual navigation experiment in Section 3.3, is actually an instance of the this POMDP setting.
47
+
48
+ # 2.3 POLICY REPRESENTATION
49
+
50
+ We represent the policy as a general recurrent neural network. Each timestep, it receives the tuple $( s , a , r , d )$ as input, which is embedded using a function $\phi ( s , a , r , d )$ and provided as input to an RNN. To alleviate the difficulty of training RNNs due to vanishing and exploding gradients (Bengio et al., 1994), we use Gated Recurrent Units (GRUs) (Cho et al., 2014) which have been demonstrated to have good empirical performance (Chung et al., 2014; Jozefowicz et al., 2015). The output of the ´ GRU is fed to a fully connected layer followed by a softmax function, which forms the distribution over actions.
51
+
52
+ We have also experimented with alternative architectures which explicitly reset part of the hidden state each episode of the sampled MDP, but we did not find any improvement over the simple architecture described above.
53
+
54
+ # 2.4 POLICY OPTIMIZATION
55
+
56
+ After formulating the task as a reinforcement learning problem, we can readily use standard off-theshelf RL algorithms to optimize the policy. We use a first-order implementation of Trust Region Policy Optimization (TRPO) (Schulman et al., 2015), because of its excellent empirical performance, and because it does not require excessive hyperparameter tuning. For more details, we refer the reader to the original paper. To reduce variance in the stochastic gradient estimation, we use a baseline which is also represented as an RNN using GRUs as building blocks. We optionally apply Generalized Advantage Estimation (GAE) (Schulman et al., 2016) to further reduce the variance.
57
+
58
+ # 3 EVALUATION
59
+
60
+ We designed experiments to answer the following questions:
61
+
62
+ • Can $\mathtt { R L } ^ { 2 }$ learn algorithms that achieve good performance on MDP classes with special structure, relative to existing algorithms tailored to this structure that have been proposed in the literature?
63
+ • Can RL2 scale to high-dimensional tasks?
64
+
65
+ For the first question, we evaluate $\mathtt { R L } ^ { 2 }$ on two sets of tasks, multi-armed bandits (MAB) and tabular MDPs. These problems have been studied extensively in the reinforcement learning literature, and this body of work includes algorithms with guarantees of asymptotic optimality. We demonstrate that our approach achieves comparable performance to these theoretically justified algorithms.
66
+
67
+ For the second question, we evaluate $\mathrm { { R L ^ { 2 } } }$ on a vision-based navigation task. Our experiments show that the learned policy makes effective use of the learned visual information and also short-term information acquired from previous episodes.
68
+
69
+ # 3.1 MULTI-ARMED BANDITS
70
+
71
+ Multi-armed bandit problems are a subset of MDPs where the agent’s environment is stateless. Specifically, there are $k$ arms (actions), and at every time step, the agent pulls one of the arms, say $i$ , and receives a reward drawn from an unknown distribution: our experiments take each arm to be a Bernoulli distribution with parameter $p _ { i }$ . The goal is to maximize the total reward obtained over a fixed number of time steps. The key challenge is balancing exploration and exploitation— “exploring” each arm enough times to estimate its distribution $( p _ { i } )$ , but eventually switching over to “exploitation” of the best arm. Despite the simplicity of multi-arm bandit problems, their study has led to a rich theory and a collection of algorithms with optimality guarantees.
72
+
73
+ Using $\mathtt { R L } ^ { 2 }$ , we can train an RNN policy to solve bandit problems by training it on a given distribution $\rho _ { \mathcal { M } }$ . If the learning is successful, the resulting policy should be able to perform competitively with the theoretically optimal algorithms. We randomly generated bandit problems by sampling each parameter $p _ { i }$ from the uniform distribution on $[ 0 , \dot { 1 } ]$ . After training the RNN policy with $\mathtt { R L } ^ { 2 }$ , we compared it against the following strategies:
74
+
75
+ • Random: this is a baseline strategy, where the agent pulls a random arm each time.
76
+ • Gittins index (Gittins, 1979): this method gives the Bayes optimal solution in the discounted infinite-horizon case, by computing an index separately for each arm, and taking the arm with the largest index. While this work shows it is sufficient to independently compute an index for each arm (hence avoiding combinatorial explosion with the number of arms), it doesn’t show how to tractably compute these individual indices exactly. We follow the practical approximations described in Gittins et al. (2011), Chakravorty & Mahajan (2013), and Whittle (1982), and choose the best-performing approximation for each setup. UCB1 (Auer, 2002): this method estimates an upper-confidence bound, and pulls the arm with the largest value of ucbi(t) = ˆµi(t − 1) + cq , where $\hat { \mu } _ { i } ( t - 1 )$ is the estimated mean parameter for the ith arm, $T _ { i } ( t - 1 )$ is the number of times the ith arm has been pulled, and $c$ is a tunable hyperparameter (Audibert $\&$ Munos, 2011). We initialize the statistics with exactly one success and one failure, which corresponds to a $\mathrm { B e t a } ( 1 , 1 )$ prior. Thompson sampling (TS) (Thompson, 1933): this is a simple method which, at each time step, samples a list of arm means from the posterior distribution, and choose the best arm according to this sample. It has been demonstrated to compare favorably to UCB1 empirically (Chapelle & Li, 2011). We also experiment with an optimistic variant (OTS) (May et al., 2012), which samples $N$ times from the posterior, and takes the one with the highest probability.
77
+ • $\epsilon$ -Greedy: in this strategy, the agent chooses the arm with the best empirical mean with probability $1 - \epsilon$ , and chooses a random arm with probability $\epsilon$ . We use the same initialization as UCB1.
78
+ • Greedy: this is a special case of $\epsilon$ -Greedy with $\epsilon = 0$ .
79
+
80
+ The Bayesian methods, Gittins index and Thompson sampling, take advantage of the distribution $\rho _ { \mathcal { M } }$ ; and we provide these methods with the true distribution. For each method with hyperparameters, we maximize the score with a separate grid search for each of the experimental settings. The hyperparameters used for TRPO are shown in the appendix.
81
+
82
+ The results are summarized in Table 1. Learning curves for various settings are shown in Figure 2. We observe that our approach achieves performance that is almost as good as the the reference methods, which were (human) designed specifically to perform well on multi-armed bandit problems. It is worth noting that the published algorithms are mostly designed to minimize asymptotic regret (rather than finite horizon regret), hence there tends to be a little bit of room to outperform them in the finite horizon settings.
83
+
84
+ Table 1: MAB Results. Each grid cell records the total reward averaged over 1000 different instances of the bandit problem. We consider $k \in \{ 5 , 1 0 , 5 0 \}$ bandits and $\bar { n } \in \{ 1 0 , 1 0 0 , 5 0 0 \}$ episodes of interaction. We highlight the best-performing algorithms in each setup according to the computed mean, and we also highlight the other algorithms in that row whose performance is not significantly different from the best one (determined by a one-sided $t$ -test with $p = 0 . 0 5 )$ .
85
+
86
+ <table><tr><td>Setup</td><td></td><td>Random</td><td>Gittins</td><td>TS</td><td>OTS</td><td>UCB1</td><td>e-Greedy</td><td>Greedy</td><td>RL²</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>n = 10,k = 5</td><td>5.0</td><td>6.6</td><td>5.7</td><td>6.5</td><td>6.7</td><td>6.6</td><td>6.6</td><td>6.7</td></tr><tr><td></td><td>n= 10,k=10</td><td>5.0</td><td>6.6</td><td>5.5</td><td>6.2</td><td>6.7</td><td>6.6</td><td>6.6</td><td>6.7</td></tr><tr><td></td><td>n = 10,k = 50</td><td>5.1</td><td>6.5</td><td>5.2</td><td>5.5</td><td>6.6</td><td>6.5</td><td>6.5</td><td>6.8</td></tr><tr><td></td><td>n = 100,k = 5</td><td>49.9</td><td>78.3</td><td>74.7</td><td>77.9</td><td>78.0</td><td>75.4</td><td>74.8</td><td>78.7</td></tr><tr><td></td><td>n = 100,k = 10</td><td>49.9</td><td>82.8</td><td>76.7</td><td>81.4</td><td>82.4</td><td>77.4</td><td>77.1</td><td>83.5</td></tr><tr><td></td><td>n = 100,k = 50</td><td>49.8</td><td>85.2</td><td>64.5</td><td>67.7</td><td>84.3</td><td>78.3</td><td>78.0</td><td>84.9</td></tr><tr><td></td><td>n = 500,k = 5</td><td>249.8</td><td>405.8</td><td>402.0</td><td>406.7</td><td>405.8</td><td>388.2</td><td>380.6</td><td>401.6</td></tr><tr><td></td><td>n = 500,k = 10</td><td>249.0</td><td>437.8</td><td>429.5</td><td>438.9</td><td>437.1</td><td>408.0</td><td>395.0</td><td>432.5</td></tr><tr><td></td><td>n = 500,k= 50</td><td>249.6</td><td>463.7</td><td>427.2</td><td>437.6</td><td>457.6</td><td>413.6</td><td>402.8</td><td>438.9</td></tr></table>
87
+
88
+ ![](images/dd66ca74946448efadbc36ac8b3f44cabf11836f5a62891a48b00305185f7457.jpg)
89
+ Figure $2 \colon \mathbf { R L } ^ { 2 }$ learning curves for multi-armed bandits. Performance is normalized such that Gittins index scores 1, and random policy scores 0.
90
+
91
+ We observe that there is a noticeable gap between Gittins index and $\mathrm { { R L ^ { 2 } } }$ in the most challenging scenario, with 50 arms and 500 episodes. This raises the question whether better architectures or better (slow) RL algorithms should be explored. To determine the bottleneck, we trained the same policy architecture using supervised learning, using the trajectories generated by the Gittins index approach as training data. We found that the learned policy, when executed in test domains, achieved the same level of performance as the Gittins index approach, suggesting that there is room for improvement by using better RL algorithms.
92
+
93
+ # 3.2 TABULAR MDPS
94
+
95
+ The bandit problem provides a natural and simple setting to investigate whether the policy learns to trade off between exploration and exploitation. However, the problem itself involves no sequential decision making, and does not fully characterize the challenges in solving MDPs. Hence, we perform further experiments using randomly generated tabular MDPs, where there is a finite number of possible states and actions—small enough that the transition probability distribution can be explicitly given as a table. We compare our approach with the following methods:
96
+
97
+ • Random: the agent chooses an action uniformly at random for each time step;
98
+ • PSRL (Strens, 2000; Osband et al., 2013): this is a direct generalization of Thompson sampling to MDPs, where at the beginning of each episode, we sample an MDP from the posterior distribution, and take actions according to the optimal policy for the entire episode. Similarly, we include an optimistic variant (OPSRL), which has also been explored in Osband & Van Roy (2016).
99
+ • BEB (Kolter & Ng, 2009): this is a model-based optimistic algorithm that adds an exploration bonus to (thus far) infrequently visited states and actions.
100
+
101
+ • UCRL2 (Jaksch et al., 2010): this algorithm computes, at each iteration, the optimal policy against an optimistic MDP under the current belief, using an extended value iteration procedure.
102
+
103
+ • $\epsilon$ -Greedy: this algorithm takes actions optimal against the MAP estimate according to the current posterior, which is updated once per episode.
104
+
105
+ • Greedy: a special case of $\epsilon$ -Greedy with $\epsilon = 0$ .
106
+
107
+ Table 2: Random MDP Results
108
+
109
+ <table><tr><td>Setup</td><td>Random</td><td>PSRL</td><td></td><td>OPSRL</td><td>UCRL2</td><td>BEB</td><td>e-Greedy</td><td>Greedy</td><td>RL²</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>n=10</td><td></td><td>100.1</td><td>138.1</td><td>144.1</td><td>146.6</td><td>150.2</td><td>132.8</td><td>134.8</td><td>156.2</td></tr><tr><td>n= 25</td><td>250.2</td><td></td><td>408.8</td><td>425.2</td><td>424.1</td><td>427.8</td><td>377.3</td><td>368.8</td><td>445.7</td></tr><tr><td>n= 50</td><td></td><td>499.7</td><td>904.4</td><td>930.7</td><td>918.9</td><td>917.8</td><td>823.3</td><td>769.3</td><td>936.1</td></tr><tr><td>n= 75</td><td></td><td>749.9</td><td>1417.1</td><td>1449.2</td><td>1427.6</td><td>1422.6</td><td>1293.9</td><td>1172.9</td><td>1428.8</td></tr><tr><td>n = 100</td><td></td><td>999.4</td><td>1939.5</td><td>1973.9</td><td>1942.1</td><td>1935.1</td><td>1778.2</td><td>1578.5</td><td>1913.7</td></tr></table>
110
+
111
+ The distribution over MDPs is constructed with $| S | = 1 0$ , $| { \mathcal { A } } | = 5$ . The rewards follow a Gaussian distribution with unit variance, and the mean parameters are sampled independently from $\mathrm { { N o r m a l } } ( 1 , 1 )$ . The transitions are sampled from a flat Dirichlet distribution. This construction matches the commonly used prior in Bayesian RL methods. We set the horizon for each episode to be $T = 1 0$ , and an episode always starts on the first state.
112
+
113
+ ![](images/28702c80eebd54cf572af3daf525840b3a9d6ac120593f47c806f33ef8038675.jpg)
114
+ Figure 3: $\mathtt { R L } ^ { 2 }$ learning curves for tabular MDPs. Performance is normalized such that OPSRL scores 1, and random policy scores 0.
115
+
116
+ The results are summarized in Table 2, and the learning curves are shown in Figure 3. We follow the same evaluation procedure as in the bandit case. We experiment with $n \in \{ 1 \bar { 0 } , 2 5 , 5 0 , 7 5 , 1 0 0 \}$ . For fewer episodes, our approach surprisingly outperforms existing methods by a large margin. The advantage is reversed as $n$ increases, suggesting that the reinforcement learning problem in the outer loop becomes more challenging to solve. We think that the advantage for small $n$ comes from the need for more aggressive exploitation: since there are 140 degrees of freedom to estimate in order to characterize the MDP, and by the 10th episode, we will not have enough samples to form a good estimate of the entire dynamics. By directly optimizing the RNN in this setting, our approach should be able to cope with this shortage of samples, and decides to exploit sooner compared to the reference algorithms.
117
+
118
+ # 3.3 VISUAL NAVIGATION
119
+
120
+ The previous two tasks both only involve very low-dimensional state spaces. To evaluate the feasibility of scaling up $\mathtt { R L } ^ { 2 }$ , we further experiment with a challenging vision-based task, where the agent is asked to navigate a randomly generated maze to find a randomly placed target2. The agent receives a $+ 1$ reward when it reaches the target, $- 0 . 0 0 1$ when it hits the wall, and $- 0 . 0 4$ per time step to encourage it to reach targets faster. It can interact with the maze for multiple episodes, during which the maze structure and target position are held fixed. The optimal strategy is to explore the maze efficiently during the first episode, and after locating the target, act optimally against the current maze and target based on the collected information. An illustration of the task is given in Figure 4.
121
+
122
+ ![](images/94ffa6f83df8766c0561f5a5381776631f968bef0f7adf5e74ffdbbbba39ce33.jpg)
123
+ Figure 4: Visual navigation. The target block is shown in red, and occupies an entire grid in the maze layout.
124
+
125
+ Visual navigation alone is a challenging task for reinforcement learning. The agent only receives very sparse rewards during training, and does not have the primitives for efficient exploration at the beginning of training. It also needs to make efficient use of memory to decide how it should explore the space, without forgetting about where it has already explored. Previously, Oh et al. (2016) have studied similar vision-based navigation tasks in Minecraft. However, they use higher-level actions for efficient navigation. Similar high-level actions in our task would each require around 5 low-level actions combined in the right way. In contrast, our $\mathtt { R L } ^ { 2 }$ agent needs to learn these higher-level actions from scratch.
126
+
127
+ We use a simple training setup, where we use small mazes of size $5 \times 5$ , with 2 episodes of interaction, each with horizon up to 250. Here the size of the maze is measured by the number of grid cells along each wall in a discrete representation of the maze. During each trial, we sample 1 out of 1000 randomly generated configurations of map layout and target positions. During testing, we evaluate on 1000 separately generated configurations. In addition, we also study its extrapolation behavior along two axes, by (1) testing on large mazes of size $9 \times 9$ (see Figure $_ { 4 \mathrm { c } }$ ) and (2) running the agent for up to 5 episodes in both small and large mazes. For the large maze, we also increase the horizon per episode by $4 \mathbf { x }$ due to the increased size of the maze.
128
+
129
+ Table 3: Results for visual navigation. These metrics are computed using the best run among all runs shown in Figure 5. In 3c, we measure the proportion of mazes where the trajectory length in the second episode does not exceed the trajectory length in the first episode.
130
+
131
+ <table><tr><td colspan="3">(a) Average length of successful trajectories</td><td colspan="3">(b) %Success</td><td colspan="2">(c) %Improved</td></tr><tr><td>Episode</td><td> Small</td><td>Large</td><td>Episode</td><td>Small</td><td>Large</td><td> Small</td><td>Large</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td>91.7%</td><td>71.4%</td></tr><tr><td>1</td><td>52.4 ± 1.3</td><td>180.1 ± 6.0</td><td>1</td><td>99.3%</td><td>97.1%</td><td></td><td></td></tr><tr><td>2</td><td>39.1 ± 0.9</td><td>151.8 ± 5.9</td><td>2</td><td>99.6%</td><td>96.7%</td><td></td><td></td></tr><tr><td>3</td><td>42.6 ± 1.0</td><td>169.3 ± 6.3</td><td>3</td><td>99.7%</td><td>95.8%</td><td></td><td></td></tr><tr><td>4</td><td>43.5 ± 1.1</td><td>162.3 ± 6.4</td><td>4</td><td>99.4%</td><td>95.6%</td><td></td><td></td></tr><tr><td>5</td><td>43.9 ± 1.1</td><td>169.3 ± 6.5</td><td>5</td><td>99.6%</td><td>96.1%</td><td></td><td></td></tr></table>
132
+
133
+ ![](images/3d37b1007f0139a7e685bb1cef2ea19f0a8c5f7a49f0ed153d5612c4014a1e3a.jpg)
134
+ Figure $5 \colon \mathrm { { R L } ^ { 2 } }$ learning curves for visual navigation. Each curve shows a different random initialization of the RNN weights (by using a different random seed). Performance varies greatly across different initializations.
135
+
136
+ The results are summarized in Table 3, and the learning curves are shown in Figure 5. We observe that there is a significant reduction in trajectory lengths between the first two episodes in both the smaller and larger mazes, suggesting that the agent has learned how to use information from past episodes. It also achieves reasonable extrapolation behavior in further episodes by maintaining its performance, although there is a small drop in the rate of success in the larger mazes. We also observe that on larger mazes, the ratio of improved trajectories is lower, likely because the agent has not learned how to act optimally in the larger mazes.
137
+
138
+ Still, even on the small mazes, the agent does not learn to perfectly reuse prior information. An illustration of the agent’s behavior is shown in Figure 6. The intended behavior, which occurs most frequently, as shown in 6a and 6b, is that the agent should remember the target’s location, and utilize it to act optimally in the second episode. However, occasionally the agent forgets about where the target was, and continues to explore in the second episode, as shown in 6c and 6d. We believe that better reinforcement learning techniques used as the outer-loop algorithm will improve these results in the future.
139
+
140
+ ![](images/b5073a3738b96019be38a33dab7edfe9e97aee1941aa5b044fa9917c1b856b7d.jpg)
141
+ Figure 6: Visualization of the agent’s behavior. In each scenario, the agent starts at the center of the blue block, and the goal is to reach anywhere in the red block.
142
+
143
+ # 4 RELATED WORK
144
+
145
+ The concept of using prior experience to speed up reinforcement learning algorithms has been explored in the past in various forms. Earlier studies have investigated automatic tuning of hyperparameters, such as learning rate and temperature (Ishii et al., 2002; Schweighofer & Doya, 2003), as a form of meta-learning. Wilson et al. (2007) use hierarchical Bayesian methods to maintain a posterior over possible models of dynamics, and apply optimistic Thompson sampling according to the posterior. Many works in hierarchical reinforcement learning propose to extract reusable skills from previous tasks to speed up exploration in new tasks (Singh, 1992; Perkins et al., 1999). We refer the reader to Taylor & Stone (2009) for a more thorough survey on the multi-task and transfer learning aspects.
146
+
147
+ The formulation of searching for a best-performing algorithm, whose performance is averaged over a given distribution over MDPs, have been investigated in the past in more limited forms (Maes et al., 2011; Castronovo et al., 2012). There, they propose to learn an algorithm to solve multiarmed bandits using program search, where the search space consists of simple formulas composed from hand-specified primitives, which needs to be tuned for each specific distribution over MDPs. In comparison, our approach allows for entirely end-to-end training without requiring such domain knowledge.
148
+
149
+ More recently, Fu et al. (2015) propose a model-based approach on top of iLQG with unknown dynamics (Levine & Abbeel, 2014), which uses samples collected from previous tasks to build a neural network prior for the dynamics, and can perform one-shot learning on new, but related tasks thanks to reduced sample complexity. There has been a growing interest in using deep neural networks for multi-task learning and transfer learning (Parisotto et al., 2015; Rusu et al., 2015; 2016a; Devin et al., 2016; Rusu et al., 2016b).
150
+
151
+ In the broader context of machine learning, there has been a lot of interest in one-shot learning for object classification (Vilalta & Drissi, 2002; Fei-Fei et al., 2006; Larochelle et al., 2008; Lake et al., 2011; Koch, 2015). Our work draws inspiration from a particular line of work (Younger et al., 2001; Santoro et al., 2016; Vinyals et al., 2016), which formulates meta-learning as an optimization problem, and can thus be optimized end-to-end via gradient descent. While these work applies to the supervised learning setting, our work applies in the more general reinforcement learning setting. Although the reinforcement learning setting is more challenging, the resulting behavior is far richer: our agent must not only learn to exploit existing information, but also learn to explore, a problem that is usually not a factor in supervised learning. Another line of work (Hochreiter et al., 2001; Younger et al., 2001; Andrychowicz et al., 2016; Li & Malik, 2016) studies meta-learning over the optimization process. There, the meta-learner makes explicit updates to a parametrized model. In comparison, we do not use a directly parametrized policy; instead, the recurrent neural network agent acts as the meta-learner and the resulting policy simultaneously.
152
+
153
+ Our formulation essentially constructs a partially observable MDP (POMDP) which is solved in the outer loop, where the underlying MDP is unobserved by the agent. This reduction of an unknown MDP to a POMDP can be traced back to dual control theory (Feldbaum, 1960), where “dual” refers to the fact that one is controlling both the state and the state estimate. Feldbaum pointed out that the solution can in principle be computed with dynamic programming, but doing so is usually impractical. POMDPs with such structure have also been studied under the name “mixed observability MDPs” (Ong et al., 2010). However, the method proposed there suffers from the usual challenges of solving POMDPs in high dimensions.
154
+
155
+ Apart from the various multiple-episode tasks we investigate in this work, previous literature on training RNN policies have used similar tasks that require memory to test if long-term dependency can be learned. Recent examples include the Labyrinth experiment in the A3C paper (Mnih et al., 2016), and the water maze experiment in the Recurrent DDPG paper (Heess et al., 2015a). Although these tasks can be reformulated under the $\mathrm { { R L ^ { 2 } } }$ framework, the key difference is that they focus on the memory aspect instead of the fast RL aspect.
156
+
157
+ # 5 DISCUSSION
158
+
159
+ This paper suggests a different approach for designing better reinforcement learning algorithms: instead of acting as the designers ourselves, learn the algorithm end-to-end using standard reinforcement learning techniques. That is, the “fast” RL algorithm is a computation whose state is stored in the RNN activations, and the RNN’s weights are learned by a general-purpose “slow” reinforcement learning algorithm. Our method, $\mathrm { { R L ^ { 2 } } }$ , has demonstrated competence comparable with theoretically optimal algorithms in small-scale settings. We have further shown its potential to scale to high-dimensional tasks.
160
+
161
+ In the experiments, we have identified opportunities to improve upon $\mathtt { R L } ^ { 2 }$ : the outer-loop reinforcement learning algorithm was shown to be an immediate bottleneck, and we believe that for settings with extremely long horizons, better architecture may also be required for the policy. Although we have used generic methods and architectures for the outer-loop algorithm and the policy, doing this also ignores the underlying episodic structure. We expect algorithms and policy architectures that exploit the problem structure to significantly boost the performance.
162
+
163
+ # ACKNOWLEDGMENTS
164
+
165
+ We would like to thank our colleagues at Berkeley and OpenAI for insightful discussions. This research was funded in part by ONR through a PECASE award. Yan Duan was also supported by a Berkeley AI Research lab Fellowship and a Huawei Fellowship. Xi Chen was also supported by a Berkeley AI Research lab Fellowship. We gratefully acknowledge the support of the NSF through grant IIS-1619362 and of the ARC through a Laureate Fellowship (FL110100281) and through the ARC Centre of Excellence for Mathematical and Statistical Frontiers.
166
+
167
+ # REFERENCES
168
+
169
+ Marcin Andrychowicz, Misha Denil, Sergio Gomez, Matthew W Hoffman, David Pfau, Tom Schaul, and Nando de Freitas. Learning to learn by gradient descent by gradient descent. arXiv preprint arXiv:1606.04474, 2016.
170
+
171
+ Jean-Yves Audibert and Remi Munos. Introduction to bandits: Algorithms and theory. ´ ICML Tutorial on bandits, 2011.
172
+
173
+ Peter Auer. Using confidence bounds for exploitation-exploration trade-offs. Journal of Machine Learning Research, 3(Nov):397–422, 2002.
174
+
175
+ Yoshua Bengio, Patrice Simard, and Paolo Frasconi. Learning long-term dependencies with gradient descent is difficult. IEEE transactions on neural networks, 5(2):157–166, 1994.
176
+
177
+ Sebastien Bubeck and Nicolo Cesa-Bianchi. Regret analysis of stochastic and nonstochastic multi- ´ armed bandit problems. arXiv preprint arXiv:1204.5721, 2012.
178
+
179
+ Michael Castronovo, Francis Maes, Raphael Fonteneau, and Damien Ernst. Learning exploration/exploitation strategies for single trajectory reinforcement learning. In EWRL, pp. 1–10, 2012.
180
+
181
+ Jhelum Chakravorty and Aditya Mahajan. Multi-armed bandits, gittins index, and its calculation. Methods and Applications of Statistics in Clinical Trials: Planning, Analysis, and Inferential Methods, 2:416–435, 2013.
182
+
183
+ Olivier Chapelle and Lihong Li. An empirical evaluation of thompson sampling. In Advances in neural information processing systems, pp. 2249–2257, 2011.
184
+
185
+ Kyunghyun Cho, Bart Van Merrienboer, Dzmitry Bahdanau, and Yoshua Bengio. On the properties ¨ of neural machine translation: Encoder-decoder approaches. arXiv preprint arXiv:1409.1259, 2014.
186
+
187
+ 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.
188
+
189
+ Marc Deisenroth and Carl E Rasmussen. Pilco: A model-based and data-efficient approach to policy search. In Proceedings of the 28th International Conference on machine learning (ICML-11), pp. 465–472, 2011.
190
+
191
+ Coline Devin, Abhishek Gupta, Trevor Darrell, Pieter Abbeel, and Sergey Levine. Learning modular neural network policies for multi-task and multi-robot transfer. arXiv preprint arXiv:1609.07088, 2016.
192
+
193
+ Li Fei-Fei, Rob Fergus, and Pietro Perona. One-shot learning of object categories. IEEE transactions on pattern analysis and machine intelligence, 28(4):594–611, 2006.
194
+
195
+ AA Feldbaum. Dual control theory. i. Avtomatika i Telemekhanika, 21(9):1240–1249, 1960.
196
+
197
+ Justin Fu, Sergey Levine, and Pieter Abbeel. One-shot learning of manipulation skills with online dynamics adaptation and neural network priors. arXiv preprint arXiv:1509.06841, 2015.
198
+
199
+ Mohammad Ghavamzadeh, Shie Mannor, Joelle Pineau, Aviv Tamar, et al. Bayesian reinforcement learning: a survey. World Scientific, 2015.
200
+
201
+ John Gittins, Kevin Glazebrook, and Richard Weber. Multi-armed bandit allocation indices. John Wiley & Sons, 2011.
202
+
203
+ John C Gittins. Bandit processes and dynamic allocation indices. Journal of the Royal Statistical Society. Series B (Methodological), pp. 148–177, 1979.
204
+
205
+ Xiaoxiao Guo, Satinder Singh, Honglak Lee, Richard L Lewis, and Xiaoshi Wang. Deep learning for real-time atari game play using offline monte-carlo tree search planning. In Advances in neural information processing systems, pp. 3338–3346, 2014.
206
+
207
+ Nicolas Heess, Jonathan J Hunt, Timothy P Lillicrap, and David Silver. Memory-based control with recurrent neural networks. arXiv preprint arXiv:1512.04455, 2015a.
208
+
209
+ Nicolas Heess, Gregory Wayne, David Silver, Tim Lillicrap, Tom Erez, and Yuval Tassa. Learning continuous control policies by stochastic value gradients. In Advances in Neural Information Processing Systems, pp. 2944–2952, 2015b.
210
+
211
+ Sepp Hochreiter, A Steven Younger, and Peter R Conwell. Learning to learn using gradient descent. In International Conference on Artificial Neural Networks, pp. 87–94. Springer, 2001.
212
+
213
+ Shin Ishii, Wako Yoshida, and Junichiro Yoshimoto. Control of exploitation–exploration metaparameter in reinforcement learning. Neural networks, 15(4):665–687, 2002.
214
+
215
+ Thomas Jaksch, Ronald Ortner, and Peter Auer. Near-optimal regret bounds for reinforcement learning. Journal of Machine Learning Research, 11(Apr):1563–1600, 2010.
216
+
217
+ Rafal Jozefowicz, Wojciech Zaremba, and Ilya Sutskever. An empirical exploration of recur- ´ rent network architectures. In Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, Lille, France, 6-11 July 2015, pp. 2342–2350, 2015. URL http: //jmlr.org/proceedings/papers/v37/jozefowicz15.html.
218
+
219
+ Michał Kempka, Marek Wydmuch, Grzegorz Runc, Jakub Toczek, and Wojciech Jaskowski. Viz- ´ doom: A doom-based ai research platform for visual reinforcement learning. arXiv preprint arXiv:1605.02097, 2016.
220
+
221
+ Gregory Koch. Siamese neural networks for one-shot image recognition. PhD thesis, University of Toronto, 2015.
222
+
223
+ J Zico Kolter and Andrew Y Ng. Near-bayesian exploration in polynomial time. In Proceedings of the 26th Annual International Conference on Machine Learning, pp. 513–520. ACM, 2009.
224
+
225
+ Brenden M Lake, Ruslan Salakhutdinov, Jason Gross, and Joshua B Tenenbaum. One shot learning of simple visual concepts. In Proceedings of the 33rd Annual Conference of the Cognitive Science Society, volume 172, pp. 2, 2011.
226
+
227
+ Hugo Larochelle, Dumitru Erhan, and Yoshua Bengio. Zero-data learning of new tasks. In AAAI, volume 1, pp. 3, 2008.
228
+
229
+ Sergey Levine and Pieter Abbeel. Learning neural network policies with guided policy search under unknown dynamics. In Advances in Neural Information Processing Systems, pp. 1071–1079, 2014.
230
+
231
+ Sergey Levine, Chelsea Finn, Trevor Darrell, and Pieter Abbeel. End-to-end training of deep visuomotor policies. Journal of Machine Learning Research, 17(39):1–40, 2016.
232
+
233
+ Ke Li and Jitendra Malik. Learning to optimize. arXiv preprint arXiv:1606.01885, 2016.
234
+
235
+ Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015.
236
+
237
+ Francis Maes, Louis Wehenkel, and Damien Ernst. Automatic discovery of ranking formulas for playing with multi-armed bandits. In European Workshop on Reinforcement Learning, pp. 5–17. Springer, 2011.
238
+
239
+ Benedict C May, Nathan Korda, Anthony Lee, and David S Leslie. Optimistic bayesian sampling in contextual-bandit problems. Journal of Machine Learning Research, 13(Jun):2069–2106, 2012.
240
+
241
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015.
242
+
243
+ Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy P Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. arXiv preprint arXiv:1602.01783, 2016.
244
+
245
+ Junhyuk Oh, Valliappa Chockalingam, Satinder Singh, and Honglak Lee. Control of memory, active perception, and action in minecraft. arXiv preprint arXiv:1605.09128, 2016.
246
+
247
+ Sylvie CW Ong, Shao Wei Png, David Hsu, and Wee Sun Lee. Planning under uncertainty for robotic tasks with mixed observability. The International Journal of Robotics Research, 29(8): 1053–1068, 2010.
248
+
249
+ Ian Osband and Benjamin Van Roy. Why is posterior sampling better than optimism for reinforcement learning. arXiv preprint arXiv:1607.00215, 2016.
250
+
251
+ Ian Osband, Dan Russo, and Benjamin Van Roy. (more) efficient reinforcement learning via posterior sampling. In Advances in Neural Information Processing Systems, pp. 3003–3011, 2013.
252
+
253
+ Emilio Parisotto, Jimmy Lei Ba, and Ruslan Salakhutdinov. Actor-mimic: Deep multitask and transfer reinforcement learning. arXiv preprint arXiv:1511.06342, 2015.
254
+
255
+ Theodore J Perkins, Doina Precup, et al. Using options for knowledge transfer in reinforcement learning. University of Massachusetts, Amherst, MA, USA, Tech. Rep, 1999.
256
+
257
+ Andrei A Rusu, Sergio Gomez Colmenarejo, Caglar Gulcehre, Guillaume Desjardins, James Kirkpatrick, Razvan Pascanu, Volodymyr Mnih, Koray Kavukcuoglu, and Raia Hadsell. Policy distillation. arXiv preprint arXiv:1511.06295, 2015.
258
+
259
+ Andrei A Rusu, Neil C Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. arXiv preprint arXiv:1606.04671, 2016a.
260
+
261
+ Andrei A Rusu, Matej Vecerik, Thomas Rothorl, Nicolas Heess, Razvan Pascanu, and Raia Hadsell.¨ Sim-to-real robot learning from pixels with progressive nets. arXiv preprint arXiv:1610.04286, 2016b.
262
+
263
+ Adam Santoro, Sergey Bartunov, Matthew Botvinick, Daan Wierstra, and Timothy Lillicrap. Oneshot learning with memory-augmented neural networks. arXiv preprint arXiv:1605.06065, 2016.
264
+
265
+ John Schulman, Sergey Levine, Philipp Moritz, Michael I Jordan, and Pieter Abbeel. Trust region policy optimization. CoRR, abs/1502.05477, 2015.
266
+
267
+ John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. Highdimensional continuous control using generalized advantage estimation. In International Conference on Learning Representations (ICLR2016), 2016.
268
+
269
+ Nicolas Schweighofer and Kenji Doya. Meta-learning in reinforcement learning. Neural Networks, 16(1):5–9, 2003.
270
+
271
+ Satinder Pal Singh. Transfer of learning by composing solutions of elemental sequential tasks. Machine Learning, 8(3-4):323–339, 1992.
272
+
273
+ Malcolm Strens. A bayesian framework for reinforcement learning. In ICML, pp. 943–950, 2000.
274
+ Matthew E Taylor and Peter Stone. Transfer learning for reinforcement learning domains: A survey. Journal of Machine Learning Research, 10(Jul):1633–1685, 2009.
275
+ William R Thompson. On the likelihood that one unknown probability exceeds another in view of the evidence of two samples. Biometrika, 25(3/4):285–294, 1933.
276
+ Ricardo Vilalta and Youssef Drissi. A perspective view and survey of meta-learning. Artificial Intelligence Review, 18(2):77–95, 2002.
277
+ Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Koray Kavukcuoglu, and Daan Wierstra. Matching networks for one shot learning. arXiv preprint arXiv:1606.04080, 2016.
278
+ Niklas Wahlstrom, Thomas B Sch ¨ on, and Marc Peter Deisenroth. From pixels to torques: Policy ¨ learning with deep dynamical models. arXiv preprint arXiv:1502.02251, 2015.
279
+ Manuel Watter, Jost Springenberg, Joschka Boedecker, and Martin Riedmiller. Embed to control: A locally linear latent dynamics model for control from raw images. In Advances in Neural Information Processing Systems, pp. 2746–2754, 2015.
280
+ Peter Whittle. Optimization over time. John Wiley & Sons, Inc., 1982.
281
+ Aaron Wilson, Alan Fern, Soumya Ray, and Prasad Tadepalli. Multi-task reinforcement learning: a hierarchical bayesian approach. In Proceedings of the 24th international conference on Machine learning, pp. 1015–1022. ACM, 2007.
282
+ A Steven Younger, Sepp Hochreiter, and Peter R Conwell. Meta-learning with backpropagation. In Neural Networks, 2001. Proceedings. IJCNN’01. International Joint Conference on, volume 3. IEEE, 2001.
283
+
284
+ # APPENDIX
285
+
286
+ # A DETAILED EXPERIMENT SETUP
287
+
288
+ Common to all experiments: as mentioned in Section 2.2, we use placeholder values when necessary. For example, at $t = 0$ there is no previous action, reward, or termination flag. Since all of our experiments use discrete actions, we use the embedding of the action 0 as a placeholder for actions, and 0 for both the rewards and termination flags. To form the input to the GRU, we use the values for the rewards and termination flags as-is, and embed the states and actions as described separately below for each experiments. These values are then concatenated together to form the joint embedding.
289
+
290
+ For the neural network architecture, We use rectified linear units throughout the experiments as the hidden activation, and we apply weight normalization without data-dependent initialization (Salimans & Kingma, 2016) to all weight matrices. The hidden-to-hidden weight matrix uses an orthogonal initialization (Saxe et al., 2013), and all other weight matrices use Xavier initialization (Glorot & Bengio, 2010). We initialize all bias vectors to 0. Unless otherwise mentioned, the policy and the baseline uses separate neural networks with the same architecture until the final layer, where the number of outputs differ.
291
+
292
+ All experiments are implemented using TensorFlow (Abadi et al., 2016) and rllab (Duan et al., 2016). We use the implementations of classic algorithms provided by the TabulaRL package (Osband, 2016).
293
+
294
+ # A.1 MULTI-ARMED BANDITS
295
+
296
+ The parameters for TRPO are shown in Table 1. Since the environment is stateless, we use a constant embedding 0 as a placeholder in place of the states, and a one-hot embedding for the actions.
297
+
298
+ Table 1: Hyperparameters for TRPO: multi-armed bandits
299
+
300
+ <table><tr><td>Discount</td><td>0.99</td></tr><tr><td>GAE入</td><td>0.3</td></tr><tr><td>Policy Iters</td><td>Up to 1000</td></tr><tr><td>#GRUUnits Mean KL</td><td>256</td></tr><tr><td>Batch size</td><td>0.01</td></tr><tr><td></td><td>250000</td></tr></table>
301
+
302
+ # A.2 TABULAR MDPS
303
+
304
+ The parameters for TRPO are shown in Table 2. We use a one-hot embedding for the states and actions separately, which are then concatenated together.
305
+
306
+ Table 2: Hyperparameters for TRPO: tabular MDPs
307
+
308
+ <table><tr><td>Discount GAE入</td><td>0.99 0.3</td></tr><tr><td>Policy Iters</td><td>Up to 10000</td></tr><tr><td>#GRU Units</td><td>256</td></tr><tr><td>Mean KL</td><td>0.01</td></tr><tr><td>Batch size</td><td>250000</td></tr></table>
309
+
310
+ # A.3 VISUAL NAVIGATION
311
+
312
+ The parameters for TRPO are shown in Table 3. For this task, we use a neural network to form the joint embedding. We rescale the images to have width 40 and height 30 with RGB channels preserved, and we recenter the RGB values to lie within range $[ - 1 , 1 ]$ . Then, this preprocessed image is passed through 2 convolution layers, each with 16 filters of size $5 \times 5$ and stride 2. The action is first embedded into a 256-dimensional vector where the embedding is learned, and then concatenated with the flattened output of the final convolution layer. The joint vector is then fed to a fully connected layer with 256 hidden units.
313
+
314
+ Unlike previous experiments, we let the policy and the baseline share the same neural network. We found this to improve the stability of training baselines and also the end performance of the policy, possibly due to regularization effects and better learned features imposed by weight sharing. Similar weight-sharing techniques have also been explored in Mnih et al. (2016).
315
+
316
+ Table 3: Hyperparameters for TRPO: visual navigation
317
+
318
+ <table><tr><td>Discount</td><td>0.99</td></tr><tr><td>GAE 入</td><td>0.99</td></tr><tr><td>Policy Iters</td><td>Up to 5000</td></tr><tr><td>#GRU Units</td><td>256</td></tr><tr><td>Mean KL Batch size</td><td>0.01</td></tr><tr><td></td><td>50000</td></tr></table>
319
+
320
+ # B HYPERPARAMETERS FOR BASELINE ALGORITHMS
321
+
322
+ # B.1 MULTI-ARMED BANDITS
323
+
324
+ There are 3 algorithms with hyperparameters: UCB1, Optimistic Thompson Sampling (OTS), and $\epsilon$ -Greedy. We perform a coarse grid search to find the best hyperparameter for each of them. More specifically:
325
+
326
+ • UCB1: We test $c \in \{ 0 . , 0 . 1 , 0 . 2 , 0 . 3 , 0 . 4 , 0 . 5 , 0 . 6 , 0 . 7 , 0 . 8 , 0 . 9 , 1 . 0 \}$ . The best found parameter for each setting is given in Table 4.
327
+
328
+ Table 4: Best hyperparameter for UCB1
329
+
330
+ <table><tr><td rowspan=1 colspan=1>Setting</td><td rowspan=1 colspan=1>Best c</td></tr><tr><td rowspan=1 colspan=1>n=10,k=5</td><td rowspan=2 colspan=1>0.10.1</td></tr><tr><td rowspan=1 colspan=1>n =10,k=10</td></tr><tr><td rowspan=1 colspan=1>n = 10,k = 50</td><td rowspan=1 colspan=1>0.1</td></tr><tr><td rowspan=1 colspan=1>n = 100,k = 5</td><td rowspan=1 colspan=1>0.2</td></tr><tr><td rowspan=1 colspan=1>n = 100,k = 10</td><td rowspan=1 colspan=1>0.2</td></tr><tr><td rowspan=1 colspan=1>n=100,k= 50</td><td rowspan=1 colspan=1>0.2</td></tr><tr><td rowspan=1 colspan=1>n = 500,k = 5</td><td rowspan=1 colspan=1>0.2</td></tr><tr><td rowspan=1 colspan=1>n = 500,k = 10</td><td rowspan=1 colspan=1>0.2</td></tr><tr><td rowspan=1 colspan=1>n = 500,k = 50</td><td rowspan=1 colspan=1>0.2</td></tr></table>
331
+
332
+ • Optimistic Thompson Sampling (OTS): The hyperparameter is the number of posterior samples. We use up to 20 samples. The best found parameter for each setting is given in Table 5.
333
+
334
+ Table 5: Best hyperparameter for OTS
335
+
336
+ <table><tr><td>Seting</td><td>Best #samples</td></tr><tr><td>n=10,k=5</td><td>15</td></tr><tr><td>n= 10,k=10</td><td>14</td></tr><tr><td>n= 10,k=50</td><td>19</td></tr><tr><td>n = 100,k = 5</td><td>8</td></tr><tr><td>n = 100,k = 10</td><td>20</td></tr><tr><td>n =100,k = 50</td><td>16</td></tr><tr><td>n = 500,k = 5</td><td>7</td></tr><tr><td>n= :500,k=10</td><td>20</td></tr><tr><td>n = 500,k = 50</td><td>20</td></tr></table>
337
+
338
+ • $\epsilon$ -Greedy: The hyperparameter is the $\epsilon$ parameter. We test $\epsilon \_ { \mathrm { ~ \tiny ~ \in ~ } }$ $\{ 0 , 0 . 1 , 0 . 2 , 0 . 3 , 0 . 4 , 0 . 5 , 0 . 6 , 0 . 7 , 0 . 8 , 0 . 9 , 1 . 0 \}$ . The best found parameter for each setting is given in Table 6.
339
+
340
+ Table 6: Best hyperparameter for $\epsilon$ -Greedy
341
+
342
+ <table><tr><td rowspan=1 colspan=1>Setting</td><td rowspan=1 colspan=1>Best e</td></tr><tr><td rowspan=1 colspan=1>n=10,k=5</td><td rowspan=1 colspan=1>0.0</td></tr><tr><td rowspan=1 colspan=1>n = 10,k = 10</td><td rowspan=1 colspan=1>0.0</td></tr><tr><td rowspan=1 colspan=1>n = 10,k = 50</td><td rowspan=1 colspan=1>0.0</td></tr><tr><td rowspan=1 colspan=1>n = 100,k = 5</td><td rowspan=1 colspan=1>0.0</td></tr><tr><td rowspan=1 colspan=1>n = 100,k = 10</td><td rowspan=1 colspan=1>0.0</td></tr><tr><td rowspan=1 colspan=1>n = 100,k = 50</td><td rowspan=1 colspan=1>0.1</td></tr><tr><td rowspan=1 colspan=1>n = 500,k = 5</td><td rowspan=1 colspan=1>0.1</td></tr><tr><td rowspan=1 colspan=1>n = 500,k=10</td><td rowspan=1 colspan=1>0.1</td></tr><tr><td rowspan=1 colspan=1>n = 500,k = 50</td><td rowspan=1 colspan=1>0.1</td></tr></table>
343
+
344
+ # B.2 TABULAR MDPS
345
+
346
+ There are 4 algorithms with hyperparameters: Optimistic PSRL (OPSRL), BEB, $\epsilon$ -Greedy, UCRL2.
347
+ Details are given below.
348
+
349
+ • Optimistic PSRL (OPSRL): The hyperparameter is the number of posterior samples. We use up to 20 samples. The best found parameter for each setting is given in Table 7.
350
+
351
+ Table 7: Best hyperparameter for OPSRL
352
+
353
+ <table><tr><td>Setting</td><td>Best #samples</td></tr><tr><td>n=10</td><td>14</td></tr><tr><td>n=25</td><td>14</td></tr><tr><td>n= 50</td><td>14</td></tr><tr><td>n=75</td><td>14</td></tr><tr><td>n=100</td><td>17</td></tr></table>
354
+
355
+ • BEB: We search for the scaling factor in front of the exploration bonus, in the log-linear span of $[ \log ( 0 . 0 0 0 1 ) , \log ( 1 . 0 ) ]$ with 21 way points. The actual searched parameters are 0.0001, 0.000158, 0.000251, 0.000398, 0.000631, 0.001, 0.001585, 0.002512, 0.003981, 0.00631, 0.01, 0.015849, 0.025119, 0.039811, 0.063096, 0.1, 0.158489, 0.251189, 0.398107, 0.630957, 1.0. The best found parameter for each setting is given in Table 8.
356
+
357
+ Table 8: Best hyperparameter for BEB
358
+
359
+ <table><tr><td>Setting</td><td>Best scaling</td></tr><tr><td>n=10</td><td>0.002512</td></tr><tr><td>n=25</td><td>0.001585</td></tr><tr><td>n= 50</td><td>0.001585</td></tr><tr><td>n= 75</td><td>0.001585</td></tr><tr><td>n= 100</td><td>0.001585</td></tr></table>
360
+
361
+ • $\epsilon$ -Greedy: We test $\epsilon \in \{ 0 . , 0 . 1 , 0 . 2 , 0 . 3 , 0 . 4 , 0 . 5 , 0 . 6 , 0 . 7 , 0 . 8 , 0 . 9 , 1 . 0 \}$ . The best found parameter for each setting is given in Table 9.
362
+
363
+ Table 9: Best hyperparameter for $\epsilon$ -Greedy
364
+
365
+ <table><tr><td>Setting</td><td>Best ∈</td></tr><tr><td>n=10</td><td>0.1</td></tr><tr><td>n=25</td><td>0.1</td></tr><tr><td>n = 50</td><td>0.1</td></tr><tr><td>n =75</td><td>0.1</td></tr><tr><td>n =100</td><td>0.1</td></tr></table>
366
+
367
+ • UCRL2: We search for the scaling factor of exploration bonus among the same values as BEB. The best found parameter for each setting is given in Table 10.
368
+
369
+ Table 10: Best hyperparameter for UCRL2
370
+
371
+ <table><tr><td>Setting</td><td>Best scaling</td></tr><tr><td>n=10</td><td>0.398107</td></tr><tr><td>n=25</td><td>0.398107</td></tr><tr><td>n= 50</td><td>0.398107</td></tr><tr><td>n= 75</td><td>0.398107</td></tr><tr><td>n= 100</td><td>0.398107</td></tr></table>
372
+
373
+ # C FURTHER ANALYSIS ON MULTI-ARMED BANDITS
374
+
375
+ In this section, we provide further analysis of the behavior of $\mathrm { { R L ^ { 2 } } }$ agent in comparison with the baseline algorithms, on the multi-armed bandit task. Certain algorithms such as UCB1 are designed not in the Bayesian context; instead they are tailored to be robust in adversarial cases. To highlight this aspect, we evaluate the algorithms on a different metric, namely the percentage of trials where the best arm is recovered. We treat the best arm chosen by the policy to be the arm that has been pulled most often, and the ground truth best arm is the arm with the highest mean parameter. In addition, we split the set of all possible bandit tasks into simpler and harder tasks, where the difficulty is measured by the $\epsilon$ -gap between the mean parameter of the best arm and the second best arm. We compare the percentage of recovering the best arm separately according to the $\epsilon$ gap, as shown in Table 11.
376
+
377
+ Table 11: Percentage of tasks where the best arm is chosen most frequently, with $k = 5$ arms and $n = 5 0 0$ episodes of interaction.
378
+
379
+ <table><tr><td> Setup</td><td></td><td>Random</td><td>Gittins</td><td>TS</td><td>OTS</td><td>UCB1</td><td>UCB1*</td><td>e-Greedy</td><td>Greedy</td><td>RL²</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>∈ ∈[0,0.01]</td><td>21.5%</td><td>51.1%</td><td>53.1%</td><td>52.8%</td><td>50.9%</td><td>56.5%</td><td>37.3%</td><td>38.3%</td><td>46.1%</td></tr><tr><td>∈∈</td><td>[0.01,0.05]</td><td>19.3%</td><td>59.5%</td><td>71.2%</td><td>67.4%</td><td>62.5%</td><td>76.3%</td><td>42.3%</td><td>41.3%</td><td>55.1%</td></tr><tr><td>ε∈</td><td>[0.05,0.1]</td><td>17.7%</td><td>71.2%</td><td>91.5%</td><td>84.0%</td><td>78.9%</td><td>94.6%</td><td>46.1%</td><td>45.7%</td><td>67.4%</td></tr><tr><td>∈∈</td><td>[0.1, 0.3]]</td><td>20.1%</td><td>92.7%</td><td>99.2%</td><td>95.3%</td><td>93.5%</td><td>99.9%</td><td>58.1%</td><td>58.4%</td><td>87.1%</td></tr><tr><td>∈∈</td><td>[0.3,0.5]</td><td>20.4%</td><td>99.6%</td><td>100.0%</td><td>99.5%</td><td>99.8%</td><td>100.0%</td><td>85.4%</td><td>84.6%</td><td>99.0%</td></tr><tr><td>∈∈</td><td>[0.5,1.0]</td><td>19.4%</td><td>100.0%</td><td>100.0%</td><td>100.0%</td><td>100.0%</td><td>100.0%</td><td>98.4%</td><td>99.1%</td><td>100.0%</td></tr></table>
380
+
381
+ Note that there are two columns associated with the UCB1 algorithm, where UCB1 (without “∗”) is evaluated with $c = 0 . 2$ , the parameter that gives the best performance as evaluated by the average total reward, and $\mathrm { U C B } 1 ^ { \ast }$ uses $c = 1 . 0$ . Surprisingly, although using $c = 1 . 0$ performs the best in terms of recovering the best arm, its performance is significantly worse than using $c = 0 . 2$ when evaluated under the average total reward $( 3 6 9 . 2 \pm 2 . 2 $ vs. $4 0 5 . 8 \pm 2 . 2 $ ). This also explains that although $\mathrm { { R L ^ { 2 } } }$ does not perform the best according to this metric (which is totally expected, since it is not optimized under this metric), it achieves comparable average total reward as other bestperforming methods.
382
+
383
+ # REFERENCES
384
+
385
+ Martın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467, 2016.
386
+ Yan Duan, Xi Chen, Rein Houthooft, John Schulman, and Pieter Abbeel. Benchmarking deep reinforcement learning for continuous control. arXiv preprint arXiv:1604.06778, 2016.
387
+ Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Aistats, volume 9, pp. 249–256, 2010.
388
+ Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy P Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. arXiv preprint arXiv:1602.01783, 2016.
389
+ Ian Osband. TabulaRL. https://github.com/iosband/TabulaRL, 2016.
390
+ Tim Salimans and Diederik P Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. arXiv preprint arXiv:1602.07868, 2016.
391
+ Andrew M Saxe, James L McClelland, and Surya Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. arXiv preprint arXiv:1312.6120, 2013.
parse/train/HkLXCE9lx/HkLXCE9lx_content_list.json ADDED
@@ -0,0 +1,2001 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "RL2: FAST REINFORCEMENT LEARNING VIA SLOW REINFORCEMENT LEARNING ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 101,
9
+ 823,
10
+ 148
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Yan Duan†‡, John Schulman†‡, Xi Chen†‡, Peter L. Bartlett†, Ilya Sutskever‡, Pieter Abbeel†‡ ",
17
+ "bbox": [
18
+ 183,
19
+ 171,
20
+ 834,
21
+ 188
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "† UC Berkeley, Department of Electrical Engineering and Computer Science \n‡ OpenAI \n{rocky,joschu,peter}@openai.com, peter@berkeley.edu, {ilyasu,pieter}@openai.com ",
28
+ "bbox": [
29
+ 184,
30
+ 189,
31
+ 952,
32
+ 232
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "ABSTRACT ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 452,
42
+ 267,
43
+ 544,
44
+ 282
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Deep reinforcement learning (deep RL) has been successful in learning sophisticated behaviors automatically; however, the learning process requires a huge number of trials. In contrast, animals can learn new tasks in just a few trials, benefiting from their prior knowledge about the world. This paper seeks to bridge this gap. Rather than designing a “fast” reinforcement learning algorithm, we propose to represent it as a recurrent neural network (RNN) and learn it from data. In our proposed method, $\\mathtt { R L } ^ { 2 }$ , the algorithm is encoded in the weights of the RNN, which are learned slowly through a general-purpose (“slow”) RL algorithm. The RNN receives all information a typical RL algorithm would receive, including observations, actions, rewards, and termination flags; and it retains its state across episodes in a given Markov Decision Process (MDP). The activations of the RNN store the state of the “fast” RL algorithm on the current (previously unseen) MDP. We evaluate $\\mathtt { R L } ^ { 2 }$ experimentally on both small-scale and large-scale problems. On the small-scale side, we train it to solve randomly generated multi-armed bandit problems and finite MDPs. After $\\mathtt { R L } ^ { 2 }$ is trained, its performance on new MDPs is close to human-designed algorithms with optimality guarantees. On the largescale side, we test $\\mathtt { R L } ^ { \\tilde { 2 } }$ on a vision-based navigation task and show that it scales up to high-dimensional problems. ",
51
+ "bbox": [
52
+ 233,
53
+ 300,
54
+ 764,
55
+ 550
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 579,
66
+ 336,
67
+ 594
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "In recent years, deep reinforcement learning has achieved many impressive results, including playing Atari games from raw pixels (Guo et al., 2014; Mnih et al., 2015; Schulman et al., 2015), and acquiring advanced manipulation and locomotion skills (Levine et al., 2016; Lillicrap et al., 2015; Watter et al., 2015; Heess et al., 2015b; Schulman et al., 2015; 2016). However, many of the successes come at the expense of high sample complexity. For example, the state-of-the-art Atari results require tens of thousands of episodes of experience (Mnih et al., 2015) per game. To master a game, one would need to spend nearly 40 days playing it with no rest. In contrast, humans and animals are capable of learning a new task in a very small number of trials. Continuing the previous example, the human player in Mnih et al. (2015) only needed 2 hours of experience before mastering a game. We argue that the reason for this sharp contrast is largely due to the lack of a good prior, which results in these deep RL agents needing to rebuild their knowledge about the world from scratch. ",
74
+ "bbox": [
75
+ 174,
76
+ 611,
77
+ 825,
78
+ 763
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Although Bayesian reinforcement learning provides a solid framework for incorporating prior knowledge into the learning process (Strens, 2000; Ghavamzadeh et al., 2015; Kolter & Ng, 2009), exact computation of the Bayesian update is intractable in all but the simplest cases. Thus, practical reinforcement learning algorithms often incorporate a mixture of Bayesian and domain-specific ideas to bring down sample complexity and computational burden. Notable examples include guided policy search with unknown dynamics (Levine & Abbeel, 2014) and PILCO (Deisenroth & Rasmussen, 2011). These methods can learn a task using a few minutes to a few hours of real experience, compared to days or even weeks required by previous methods (Schulman et al., 2015; 2016; Lillicrap et al., 2015). However, these methods tend to make assumptions about the environment (e.g., instrumentation for access to the state at learning time), or become computationally intractable in high-dimensional settings (Wahlstrom et al., 2015). ¨ ",
85
+ "bbox": [
86
+ 174,
87
+ 771,
88
+ 825,
89
+ 924
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Rather than hand-designing domain-specific reinforcement learning algorithms, we take a different approach in this paper: we view the learning process of the agent itself as an objective, which can be optimized using standard reinforcement learning algorithms. The objective is averaged across all possible MDPs according to a specific distribution, which reflects the prior that we would like to distill into the agent. We structure the agent as a recurrent neural network, which receives past rewards, actions, and termination flags as inputs in addition to the normally received observations. Furthermore, its internal state is preserved across episodes, so that it has the capacity to perform learning in its own hidden activations. The learned agent thus also acts as the learning algorithm, and can adapt to the task at hand when deployed. ",
96
+ "bbox": [
97
+ 173,
98
+ 103,
99
+ 825,
100
+ 229
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "We evaluate this approach on two sets of classical problems, multi-armed bandits and tabular MDPs. These problems have been extensively studied, and there exist algorithms that achieve asymptotically optimal performance. We demonstrate that our method, named $\\mathtt { R L } ^ { 2 }$ , can achieve performance comparable with these theoretically justified algorithms. Next, we evaluate $\\mathrm { { R L ^ { 2 } } }$ on a vision-based navigation task implemented using the ViZDoom environment (Kempka et al., 2016), showing that $\\mathrm { { R L ^ { 2 } } }$ can also scale to high-dimensional problems. ",
107
+ "bbox": [
108
+ 174,
109
+ 236,
110
+ 825,
111
+ 319
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "2 METHOD ",
118
+ "text_level": 1,
119
+ "bbox": [
120
+ 174,
121
+ 340,
122
+ 282,
123
+ 358
124
+ ],
125
+ "page_idx": 1
126
+ },
127
+ {
128
+ "type": "text",
129
+ "text": "2.1 PRELIMINARIES ",
130
+ "text_level": 1,
131
+ "bbox": [
132
+ 174,
133
+ 373,
134
+ 326,
135
+ 388
136
+ ],
137
+ "page_idx": 1
138
+ },
139
+ {
140
+ "type": "text",
141
+ "text": "We define a discrete-time finite-horizon discounted Markov decision process (MDP) by a tuple $M =$ \n$( \\mathcal { S } , \\mathcal { A } , \\mathcal { P } , r , \\rho _ { 0 } , \\gamma , T )$ , in which $s$ is a state set, $\\mathcal { A }$ an action set, $\\mathcal { P } : \\mathcal { S } \\times \\mathcal { A } \\times \\mathcal { S } \\mathbb { R } _ { + }$ a transition \nprobability distribution, $r : \\mathcal { S } \\times \\mathcal { A } [ - R _ { \\mathrm { { m a x } } } , R _ { \\mathrm { { m a x } } } ]$ a bounded reward function, $\\rho _ { 0 } : { \\mathcal { S } } \\to \\mathbb { R } _ { + }$ an \ninitial state distribution, $\\gamma \\in [ 0 , 1 ]$ a discount factor, and $T$ the horizon. In policy search methods, \nwe typically optimize a stocto maximize its expected dis $\\pi _ { \\theta } : \\mathcal { S } \\times \\mathcal { A } \\to \\mathbb { R } _ { + }$ $\\theta$ $\\begin{array} { r } { \\eta ( \\pi _ { \\theta } ) = \\mathbb { E } _ { \\tau } [ \\sum _ { t = 0 } ^ { T } \\gamma ^ { t } r ( s _ { t } , a _ { t } ) ] } \\end{array}$ ${ \\boldsymbol \\tau } = ( s _ { 0 } , a _ { 0 } , \\ldots )$ $s _ { 0 } \\sim \\rho _ { 0 } ( s _ { 0 } )$ $a _ { t } \\sim \\pi _ { \\theta } ( a _ { t } | s _ { t } )$ $s _ { t + 1 } \\sim \\mathcal { P } ( s _ { t + 1 } | s _ { t } , a _ { t } )$ ",
142
+ "bbox": [
143
+ 174,
144
+ 400,
145
+ 825,
146
+ 502
147
+ ],
148
+ "page_idx": 1
149
+ },
150
+ {
151
+ "type": "text",
152
+ "text": "2.2 FORMULATION ",
153
+ "text_level": 1,
154
+ "bbox": [
155
+ 174,
156
+ 520,
157
+ 318,
158
+ 534
159
+ ],
160
+ "page_idx": 1
161
+ },
162
+ {
163
+ "type": "text",
164
+ "text": "We now describe our formulation, which casts learning an RL algorithm as a reinforcement learning problem, and hence the name $\\mathrm { { R L ^ { 2 } } }$ . ",
165
+ "bbox": [
166
+ 176,
167
+ 546,
168
+ 823,
169
+ 574
170
+ ],
171
+ "page_idx": 1
172
+ },
173
+ {
174
+ "type": "text",
175
+ "text": "We assume knowledge of a set of MDPs, denoted by $\\mathcal { M }$ , and a distribution over them: $\\rho _ { \\mathcal { M } } : \\mathcal { M } \\to$ $\\mathbb { R } _ { + }$ . We only need to sample from this distribution. We use $n$ to denote the total number of episodes allowed to spend with a specific MDP. We define a trial to be such a series of episodes of interaction with a fixed MDP. ",
176
+ "bbox": [
177
+ 174,
178
+ 582,
179
+ 825,
180
+ 637
181
+ ],
182
+ "page_idx": 1
183
+ },
184
+ {
185
+ "type": "image",
186
+ "img_path": "images/0ebc9fad3131588828f31d9d5537d098b3da11efbfcea50ec2981d4dc44de61d.jpg",
187
+ "image_caption": [
188
+ "Figure 1: Procedure of agent-environment interaction "
189
+ ],
190
+ "image_footnote": [],
191
+ "bbox": [
192
+ 181,
193
+ 656,
194
+ 792,
195
+ 790
196
+ ],
197
+ "page_idx": 1
198
+ },
199
+ {
200
+ "type": "text",
201
+ "text": "This process of interaction between an agent and the environment is illustrated in Figure 1. Here, each trial happens to consist of two episodes, hence $n = 2$ . For each trial, a separate MDP is drawn from $\\rho _ { \\mathcal { M } }$ , and for each episode, a fresh $s _ { 0 }$ is drawn from the initial state distribution specific to the corresponding MDP. Upon receiving an action $a _ { t }$ produced by the agent, the environment computes reward $r _ { t }$ , steps forward, and computes the next state $s _ { t + 1 }$ . If the episode has terminated, it sets termination flag $d _ { t }$ to 1, which otherwise defaults to 0. Together, the next state $s _ { t + 1 }$ , action $a _ { t }$ , reward $r _ { t }$ , and termination flag $d _ { t }$ , are concatenated to form the input to the policy1, which, conditioned on the hidden state $h _ { t + 1 }$ , generates the next hidden state $h _ { t + 2 }$ and action $a _ { t + 1 }$ . At the end of an episode, the hidden state of the policy is preserved to the next episode, but not preserved between trials. ",
202
+ "bbox": [
203
+ 173,
204
+ 840,
205
+ 825,
206
+ 924
207
+ ],
208
+ "page_idx": 1
209
+ },
210
+ {
211
+ "type": "text",
212
+ "text": "",
213
+ "bbox": [
214
+ 174,
215
+ 103,
216
+ 823,
217
+ 159
218
+ ],
219
+ "page_idx": 2
220
+ },
221
+ {
222
+ "type": "text",
223
+ "text": "The objective under this formulation is to maximize the expected total discounted reward accumulated during a single trial rather than a single episode. Maximizing this objective is equivalent to minimizing the cumulative pseudo-regret (Bubeck & Cesa-Bianchi, 2012). Since the underlying MDP changes across trials, as long as different strategies are required for different MDPs, the agent must act differently according to its belief over which MDP it is currently in. Hence, the agent is forced to integrate all the information it has received, including past actions, rewards, and termination flags, and adapt its strategy continually. Hence, we have set up an end-to-end optimization process, where the agent is encouraged to learn a “fast” reinforcement learning algorithm. ",
224
+ "bbox": [
225
+ 174,
226
+ 166,
227
+ 825,
228
+ 277
229
+ ],
230
+ "page_idx": 2
231
+ },
232
+ {
233
+ "type": "text",
234
+ "text": "For clarity of exposition, we have defined the “inner” problem (of which the agent sees $n$ each trials) to be an MDP rather than a POMDP. However, the method can also be applied in the partiallyobserved setting without any conceptual changes. In the partially observed setting, the agent is faced with a sequence of POMDPs, and it receives an observation $o _ { t }$ instead of state $s _ { t }$ at time $t$ . The visual navigation experiment in Section 3.3, is actually an instance of the this POMDP setting. ",
235
+ "bbox": [
236
+ 174,
237
+ 285,
238
+ 823,
239
+ 354
240
+ ],
241
+ "page_idx": 2
242
+ },
243
+ {
244
+ "type": "text",
245
+ "text": "2.3 POLICY REPRESENTATION ",
246
+ "text_level": 1,
247
+ "bbox": [
248
+ 176,
249
+ 371,
250
+ 397,
251
+ 385
252
+ ],
253
+ "page_idx": 2
254
+ },
255
+ {
256
+ "type": "text",
257
+ "text": "We represent the policy as a general recurrent neural network. Each timestep, it receives the tuple $( s , a , r , d )$ as input, which is embedded using a function $\\phi ( s , a , r , d )$ and provided as input to an RNN. To alleviate the difficulty of training RNNs due to vanishing and exploding gradients (Bengio et al., 1994), we use Gated Recurrent Units (GRUs) (Cho et al., 2014) which have been demonstrated to have good empirical performance (Chung et al., 2014; Jozefowicz et al., 2015). The output of the ´ GRU is fed to a fully connected layer followed by a softmax function, which forms the distribution over actions. ",
258
+ "bbox": [
259
+ 174,
260
+ 397,
261
+ 825,
262
+ 494
263
+ ],
264
+ "page_idx": 2
265
+ },
266
+ {
267
+ "type": "text",
268
+ "text": "We have also experimented with alternative architectures which explicitly reset part of the hidden state each episode of the sampled MDP, but we did not find any improvement over the simple architecture described above. ",
269
+ "bbox": [
270
+ 174,
271
+ 501,
272
+ 825,
273
+ 542
274
+ ],
275
+ "page_idx": 2
276
+ },
277
+ {
278
+ "type": "text",
279
+ "text": "2.4 POLICY OPTIMIZATION ",
280
+ "text_level": 1,
281
+ "bbox": [
282
+ 176,
283
+ 559,
284
+ 377,
285
+ 574
286
+ ],
287
+ "page_idx": 2
288
+ },
289
+ {
290
+ "type": "text",
291
+ "text": "After formulating the task as a reinforcement learning problem, we can readily use standard off-theshelf RL algorithms to optimize the policy. We use a first-order implementation of Trust Region Policy Optimization (TRPO) (Schulman et al., 2015), because of its excellent empirical performance, and because it does not require excessive hyperparameter tuning. For more details, we refer the reader to the original paper. To reduce variance in the stochastic gradient estimation, we use a baseline which is also represented as an RNN using GRUs as building blocks. We optionally apply Generalized Advantage Estimation (GAE) (Schulman et al., 2016) to further reduce the variance. ",
292
+ "bbox": [
293
+ 174,
294
+ 585,
295
+ 825,
296
+ 684
297
+ ],
298
+ "page_idx": 2
299
+ },
300
+ {
301
+ "type": "text",
302
+ "text": "3 EVALUATION ",
303
+ "text_level": 1,
304
+ "bbox": [
305
+ 176,
306
+ 703,
307
+ 315,
308
+ 719
309
+ ],
310
+ "page_idx": 2
311
+ },
312
+ {
313
+ "type": "text",
314
+ "text": "We designed experiments to answer the following questions: ",
315
+ "bbox": [
316
+ 174,
317
+ 734,
318
+ 570,
319
+ 750
320
+ ],
321
+ "page_idx": 2
322
+ },
323
+ {
324
+ "type": "text",
325
+ "text": "• Can $\\mathtt { R L } ^ { 2 }$ learn algorithms that achieve good performance on MDP classes with special structure, relative to existing algorithms tailored to this structure that have been proposed in the literature? \n• Can RL2 scale to high-dimensional tasks? ",
326
+ "bbox": [
327
+ 217,
328
+ 760,
329
+ 825,
330
+ 820
331
+ ],
332
+ "page_idx": 2
333
+ },
334
+ {
335
+ "type": "text",
336
+ "text": "For the first question, we evaluate $\\mathtt { R L } ^ { 2 }$ on two sets of tasks, multi-armed bandits (MAB) and tabular MDPs. These problems have been studied extensively in the reinforcement learning literature, and this body of work includes algorithms with guarantees of asymptotic optimality. We demonstrate that our approach achieves comparable performance to these theoretically justified algorithms. ",
337
+ "bbox": [
338
+ 176,
339
+ 832,
340
+ 825,
341
+ 888
342
+ ],
343
+ "page_idx": 2
344
+ },
345
+ {
346
+ "type": "text",
347
+ "text": "For the second question, we evaluate $\\mathrm { { R L ^ { 2 } } }$ on a vision-based navigation task. Our experiments show that the learned policy makes effective use of the learned visual information and also short-term information acquired from previous episodes. ",
348
+ "bbox": [
349
+ 174,
350
+ 103,
351
+ 823,
352
+ 146
353
+ ],
354
+ "page_idx": 3
355
+ },
356
+ {
357
+ "type": "text",
358
+ "text": "3.1 MULTI-ARMED BANDITS ",
359
+ "text_level": 1,
360
+ "bbox": [
361
+ 174,
362
+ 166,
363
+ 385,
364
+ 180
365
+ ],
366
+ "page_idx": 3
367
+ },
368
+ {
369
+ "type": "text",
370
+ "text": "Multi-armed bandit problems are a subset of MDPs where the agent’s environment is stateless. Specifically, there are $k$ arms (actions), and at every time step, the agent pulls one of the arms, say $i$ , and receives a reward drawn from an unknown distribution: our experiments take each arm to be a Bernoulli distribution with parameter $p _ { i }$ . The goal is to maximize the total reward obtained over a fixed number of time steps. The key challenge is balancing exploration and exploitation— “exploring” each arm enough times to estimate its distribution $( p _ { i } )$ , but eventually switching over to “exploitation” of the best arm. Despite the simplicity of multi-arm bandit problems, their study has led to a rich theory and a collection of algorithms with optimality guarantees. ",
371
+ "bbox": [
372
+ 173,
373
+ 193,
374
+ 825,
375
+ 305
376
+ ],
377
+ "page_idx": 3
378
+ },
379
+ {
380
+ "type": "text",
381
+ "text": "Using $\\mathtt { R L } ^ { 2 }$ , we can train an RNN policy to solve bandit problems by training it on a given distribution $\\rho _ { \\mathcal { M } }$ . If the learning is successful, the resulting policy should be able to perform competitively with the theoretically optimal algorithms. We randomly generated bandit problems by sampling each parameter $p _ { i }$ from the uniform distribution on $[ 0 , \\dot { 1 } ]$ . After training the RNN policy with $\\mathtt { R L } ^ { 2 }$ , we compared it against the following strategies: ",
382
+ "bbox": [
383
+ 174,
384
+ 311,
385
+ 825,
386
+ 381
387
+ ],
388
+ "page_idx": 3
389
+ },
390
+ {
391
+ "type": "text",
392
+ "text": "• Random: this is a baseline strategy, where the agent pulls a random arm each time. \n• Gittins index (Gittins, 1979): this method gives the Bayes optimal solution in the discounted infinite-horizon case, by computing an index separately for each arm, and taking the arm with the largest index. While this work shows it is sufficient to independently compute an index for each arm (hence avoiding combinatorial explosion with the number of arms), it doesn’t show how to tractably compute these individual indices exactly. We follow the practical approximations described in Gittins et al. (2011), Chakravorty & Mahajan (2013), and Whittle (1982), and choose the best-performing approximation for each setup. UCB1 (Auer, 2002): this method estimates an upper-confidence bound, and pulls the arm with the largest value of ucbi(t) = ˆµi(t − 1) + cq , where $\\hat { \\mu } _ { i } ( t - 1 )$ is the estimated mean parameter for the ith arm, $T _ { i } ( t - 1 )$ is the number of times the ith arm has been pulled, and $c$ is a tunable hyperparameter (Audibert $\\&$ Munos, 2011). We initialize the statistics with exactly one success and one failure, which corresponds to a $\\mathrm { B e t a } ( 1 , 1 )$ prior. Thompson sampling (TS) (Thompson, 1933): this is a simple method which, at each time step, samples a list of arm means from the posterior distribution, and choose the best arm according to this sample. It has been demonstrated to compare favorably to UCB1 empirically (Chapelle & Li, 2011). We also experiment with an optimistic variant (OTS) (May et al., 2012), which samples $N$ times from the posterior, and takes the one with the highest probability. \n• $\\epsilon$ -Greedy: in this strategy, the agent chooses the arm with the best empirical mean with probability $1 - \\epsilon$ , and chooses a random arm with probability $\\epsilon$ . We use the same initialization as UCB1. \n• Greedy: this is a special case of $\\epsilon$ -Greedy with $\\epsilon = 0$ . ",
393
+ "bbox": [
394
+ 214,
395
+ 395,
396
+ 825,
397
+ 765
398
+ ],
399
+ "page_idx": 3
400
+ },
401
+ {
402
+ "type": "text",
403
+ "text": "The Bayesian methods, Gittins index and Thompson sampling, take advantage of the distribution $\\rho _ { \\mathcal { M } }$ ; and we provide these methods with the true distribution. For each method with hyperparameters, we maximize the score with a separate grid search for each of the experimental settings. The hyperparameters used for TRPO are shown in the appendix. ",
404
+ "bbox": [
405
+ 174,
406
+ 777,
407
+ 823,
408
+ 833
409
+ ],
410
+ "page_idx": 3
411
+ },
412
+ {
413
+ "type": "text",
414
+ "text": "The results are summarized in Table 1. Learning curves for various settings are shown in Figure 2. We observe that our approach achieves performance that is almost as good as the the reference methods, which were (human) designed specifically to perform well on multi-armed bandit problems. It is worth noting that the published algorithms are mostly designed to minimize asymptotic regret (rather than finite horizon regret), hence there tends to be a little bit of room to outperform them in the finite horizon settings. ",
415
+ "bbox": [
416
+ 173,
417
+ 840,
418
+ 825,
419
+ 924
420
+ ],
421
+ "page_idx": 3
422
+ },
423
+ {
424
+ "type": "text",
425
+ "text": "Table 1: MAB Results. Each grid cell records the total reward averaged over 1000 different instances of the bandit problem. We consider $k \\in \\{ 5 , 1 0 , 5 0 \\}$ bandits and $\\bar { n } \\in \\{ 1 0 , 1 0 0 , 5 0 0 \\}$ episodes of interaction. We highlight the best-performing algorithms in each setup according to the computed mean, and we also highlight the other algorithms in that row whose performance is not significantly different from the best one (determined by a one-sided $t$ -test with $p = 0 . 0 5 )$ . ",
426
+ "bbox": [
427
+ 173,
428
+ 101,
429
+ 825,
430
+ 171
431
+ ],
432
+ "page_idx": 4
433
+ },
434
+ {
435
+ "type": "table",
436
+ "img_path": "images/e888f48940390adb0faa717c5df3206baa08efa7e3904bf832bca112f9e17452.jpg",
437
+ "table_caption": [],
438
+ "table_footnote": [],
439
+ "table_body": "<table><tr><td>Setup</td><td></td><td>Random</td><td>Gittins</td><td>TS</td><td>OTS</td><td>UCB1</td><td>e-Greedy</td><td>Greedy</td><td>RL²</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>n = 10,k = 5</td><td>5.0</td><td>6.6</td><td>5.7</td><td>6.5</td><td>6.7</td><td>6.6</td><td>6.6</td><td>6.7</td></tr><tr><td></td><td>n= 10,k=10</td><td>5.0</td><td>6.6</td><td>5.5</td><td>6.2</td><td>6.7</td><td>6.6</td><td>6.6</td><td>6.7</td></tr><tr><td></td><td>n = 10,k = 50</td><td>5.1</td><td>6.5</td><td>5.2</td><td>5.5</td><td>6.6</td><td>6.5</td><td>6.5</td><td>6.8</td></tr><tr><td></td><td>n = 100,k = 5</td><td>49.9</td><td>78.3</td><td>74.7</td><td>77.9</td><td>78.0</td><td>75.4</td><td>74.8</td><td>78.7</td></tr><tr><td></td><td>n = 100,k = 10</td><td>49.9</td><td>82.8</td><td>76.7</td><td>81.4</td><td>82.4</td><td>77.4</td><td>77.1</td><td>83.5</td></tr><tr><td></td><td>n = 100,k = 50</td><td>49.8</td><td>85.2</td><td>64.5</td><td>67.7</td><td>84.3</td><td>78.3</td><td>78.0</td><td>84.9</td></tr><tr><td></td><td>n = 500,k = 5</td><td>249.8</td><td>405.8</td><td>402.0</td><td>406.7</td><td>405.8</td><td>388.2</td><td>380.6</td><td>401.6</td></tr><tr><td></td><td>n = 500,k = 10</td><td>249.0</td><td>437.8</td><td>429.5</td><td>438.9</td><td>437.1</td><td>408.0</td><td>395.0</td><td>432.5</td></tr><tr><td></td><td>n = 500,k= 50</td><td>249.6</td><td>463.7</td><td>427.2</td><td>437.6</td><td>457.6</td><td>413.6</td><td>402.8</td><td>438.9</td></tr></table>",
440
+ "bbox": [
441
+ 176,
442
+ 188,
443
+ 849,
444
+ 345
445
+ ],
446
+ "page_idx": 4
447
+ },
448
+ {
449
+ "type": "image",
450
+ "img_path": "images/dd66ca74946448efadbc36ac8b3f44cabf11836f5a62891a48b00305185f7457.jpg",
451
+ "image_caption": [
452
+ "Figure $2 \\colon \\mathbf { R L } ^ { 2 }$ learning curves for multi-armed bandits. Performance is normalized such that Gittins index scores 1, and random policy scores 0. "
453
+ ],
454
+ "image_footnote": [],
455
+ "bbox": [
456
+ 174,
457
+ 372,
458
+ 823,
459
+ 505
460
+ ],
461
+ "page_idx": 4
462
+ },
463
+ {
464
+ "type": "text",
465
+ "text": "We observe that there is a noticeable gap between Gittins index and $\\mathrm { { R L ^ { 2 } } }$ in the most challenging scenario, with 50 arms and 500 episodes. This raises the question whether better architectures or better (slow) RL algorithms should be explored. To determine the bottleneck, we trained the same policy architecture using supervised learning, using the trajectories generated by the Gittins index approach as training data. We found that the learned policy, when executed in test domains, achieved the same level of performance as the Gittins index approach, suggesting that there is room for improvement by using better RL algorithms. ",
466
+ "bbox": [
467
+ 174,
468
+ 568,
469
+ 825,
470
+ 666
471
+ ],
472
+ "page_idx": 4
473
+ },
474
+ {
475
+ "type": "text",
476
+ "text": "3.2 TABULAR MDPS ",
477
+ "text_level": 1,
478
+ "bbox": [
479
+ 174,
480
+ 683,
481
+ 333,
482
+ 696
483
+ ],
484
+ "page_idx": 4
485
+ },
486
+ {
487
+ "type": "text",
488
+ "text": "The bandit problem provides a natural and simple setting to investigate whether the policy learns to trade off between exploration and exploitation. However, the problem itself involves no sequential decision making, and does not fully characterize the challenges in solving MDPs. Hence, we perform further experiments using randomly generated tabular MDPs, where there is a finite number of possible states and actions—small enough that the transition probability distribution can be explicitly given as a table. We compare our approach with the following methods: ",
489
+ "bbox": [
490
+ 174,
491
+ 708,
492
+ 825,
493
+ 792
494
+ ],
495
+ "page_idx": 4
496
+ },
497
+ {
498
+ "type": "text",
499
+ "text": "• Random: the agent chooses an action uniformly at random for each time step; \n• PSRL (Strens, 2000; Osband et al., 2013): this is a direct generalization of Thompson sampling to MDPs, where at the beginning of each episode, we sample an MDP from the posterior distribution, and take actions according to the optimal policy for the entire episode. Similarly, we include an optimistic variant (OPSRL), which has also been explored in Osband & Van Roy (2016). \n• BEB (Kolter & Ng, 2009): this is a model-based optimistic algorithm that adds an exploration bonus to (thus far) infrequently visited states and actions. ",
500
+ "bbox": [
501
+ 215,
502
+ 804,
503
+ 825,
504
+ 924
505
+ ],
506
+ "page_idx": 4
507
+ },
508
+ {
509
+ "type": "text",
510
+ "text": "• UCRL2 (Jaksch et al., 2010): this algorithm computes, at each iteration, the optimal policy against an optimistic MDP under the current belief, using an extended value iteration procedure. ",
511
+ "bbox": [
512
+ 215,
513
+ 103,
514
+ 823,
515
+ 146
516
+ ],
517
+ "page_idx": 5
518
+ },
519
+ {
520
+ "type": "text",
521
+ "text": "• $\\epsilon$ -Greedy: this algorithm takes actions optimal against the MAP estimate according to the current posterior, which is updated once per episode. ",
522
+ "bbox": [
523
+ 212,
524
+ 151,
525
+ 821,
526
+ 181
527
+ ],
528
+ "page_idx": 5
529
+ },
530
+ {
531
+ "type": "text",
532
+ "text": "• Greedy: a special case of $\\epsilon$ -Greedy with $\\epsilon = 0$ . ",
533
+ "bbox": [
534
+ 217,
535
+ 188,
536
+ 540,
537
+ 202
538
+ ],
539
+ "page_idx": 5
540
+ },
541
+ {
542
+ "type": "table",
543
+ "img_path": "images/9eb6f9075caa123f6f23cbaa5a9110b88efe977fd0ea2b4ed9d207364b51db8d.jpg",
544
+ "table_caption": [
545
+ "Table 2: Random MDP Results "
546
+ ],
547
+ "table_footnote": [],
548
+ "table_body": "<table><tr><td>Setup</td><td>Random</td><td>PSRL</td><td></td><td>OPSRL</td><td>UCRL2</td><td>BEB</td><td>e-Greedy</td><td>Greedy</td><td>RL²</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>n=10</td><td></td><td>100.1</td><td>138.1</td><td>144.1</td><td>146.6</td><td>150.2</td><td>132.8</td><td>134.8</td><td>156.2</td></tr><tr><td>n= 25</td><td>250.2</td><td></td><td>408.8</td><td>425.2</td><td>424.1</td><td>427.8</td><td>377.3</td><td>368.8</td><td>445.7</td></tr><tr><td>n= 50</td><td></td><td>499.7</td><td>904.4</td><td>930.7</td><td>918.9</td><td>917.8</td><td>823.3</td><td>769.3</td><td>936.1</td></tr><tr><td>n= 75</td><td></td><td>749.9</td><td>1417.1</td><td>1449.2</td><td>1427.6</td><td>1422.6</td><td>1293.9</td><td>1172.9</td><td>1428.8</td></tr><tr><td>n = 100</td><td></td><td>999.4</td><td>1939.5</td><td>1973.9</td><td>1942.1</td><td>1935.1</td><td>1778.2</td><td>1578.5</td><td>1913.7</td></tr></table>",
549
+ "bbox": [
550
+ 174,
551
+ 256,
552
+ 825,
553
+ 359
554
+ ],
555
+ "page_idx": 5
556
+ },
557
+ {
558
+ "type": "text",
559
+ "text": "The distribution over MDPs is constructed with $| S | = 1 0$ , $| { \\mathcal { A } } | = 5$ . The rewards follow a Gaussian distribution with unit variance, and the mean parameters are sampled independently from $\\mathrm { { N o r m a l } } ( 1 , 1 )$ . The transitions are sampled from a flat Dirichlet distribution. This construction matches the commonly used prior in Bayesian RL methods. We set the horizon for each episode to be $T = 1 0$ , and an episode always starts on the first state. ",
560
+ "bbox": [
561
+ 174,
562
+ 381,
563
+ 823,
564
+ 452
565
+ ],
566
+ "page_idx": 5
567
+ },
568
+ {
569
+ "type": "image",
570
+ "img_path": "images/28702c80eebd54cf572af3daf525840b3a9d6ac120593f47c806f33ef8038675.jpg",
571
+ "image_caption": [
572
+ "Figure 3: $\\mathtt { R L } ^ { 2 }$ learning curves for tabular MDPs. Performance is normalized such that OPSRL scores 1, and random policy scores 0. "
573
+ ],
574
+ "image_footnote": [],
575
+ "bbox": [
576
+ 338,
577
+ 473,
578
+ 655,
579
+ 638
580
+ ],
581
+ "page_idx": 5
582
+ },
583
+ {
584
+ "type": "text",
585
+ "text": "The results are summarized in Table 2, and the learning curves are shown in Figure 3. We follow the same evaluation procedure as in the bandit case. We experiment with $n \\in \\{ 1 \\bar { 0 } , 2 5 , 5 0 , 7 5 , 1 0 0 \\}$ . For fewer episodes, our approach surprisingly outperforms existing methods by a large margin. The advantage is reversed as $n$ increases, suggesting that the reinforcement learning problem in the outer loop becomes more challenging to solve. We think that the advantage for small $n$ comes from the need for more aggressive exploitation: since there are 140 degrees of freedom to estimate in order to characterize the MDP, and by the 10th episode, we will not have enough samples to form a good estimate of the entire dynamics. By directly optimizing the RNN in this setting, our approach should be able to cope with this shortage of samples, and decides to exploit sooner compared to the reference algorithms. ",
586
+ "bbox": [
587
+ 174,
588
+ 709,
589
+ 825,
590
+ 849
591
+ ],
592
+ "page_idx": 5
593
+ },
594
+ {
595
+ "type": "text",
596
+ "text": "3.3 VISUAL NAVIGATION ",
597
+ "text_level": 1,
598
+ "bbox": [
599
+ 176,
600
+ 868,
601
+ 362,
602
+ 882
603
+ ],
604
+ "page_idx": 5
605
+ },
606
+ {
607
+ "type": "text",
608
+ "text": "The previous two tasks both only involve very low-dimensional state spaces. To evaluate the feasibility of scaling up $\\mathtt { R L } ^ { 2 }$ , we further experiment with a challenging vision-based task, where the agent is asked to navigate a randomly generated maze to find a randomly placed target2. The agent receives a $+ 1$ reward when it reaches the target, $- 0 . 0 0 1$ when it hits the wall, and $- 0 . 0 4$ per time step to encourage it to reach targets faster. It can interact with the maze for multiple episodes, during which the maze structure and target position are held fixed. The optimal strategy is to explore the maze efficiently during the first episode, and after locating the target, act optimally against the current maze and target based on the collected information. An illustration of the task is given in Figure 4. ",
609
+ "bbox": [
610
+ 174,
611
+ 895,
612
+ 823,
613
+ 924
614
+ ],
615
+ "page_idx": 5
616
+ },
617
+ {
618
+ "type": "text",
619
+ "text": "",
620
+ "bbox": [
621
+ 173,
622
+ 103,
623
+ 825,
624
+ 202
625
+ ],
626
+ "page_idx": 6
627
+ },
628
+ {
629
+ "type": "image",
630
+ "img_path": "images/94ffa6f83df8766c0561f5a5381776631f968bef0f7adf5e74ffdbbbba39ce33.jpg",
631
+ "image_caption": [
632
+ "Figure 4: Visual navigation. The target block is shown in red, and occupies an entire grid in the maze layout. "
633
+ ],
634
+ "image_footnote": [],
635
+ "bbox": [
636
+ 174,
637
+ 217,
638
+ 823,
639
+ 398
640
+ ],
641
+ "page_idx": 6
642
+ },
643
+ {
644
+ "type": "text",
645
+ "text": "Visual navigation alone is a challenging task for reinforcement learning. The agent only receives very sparse rewards during training, and does not have the primitives for efficient exploration at the beginning of training. It also needs to make efficient use of memory to decide how it should explore the space, without forgetting about where it has already explored. Previously, Oh et al. (2016) have studied similar vision-based navigation tasks in Minecraft. However, they use higher-level actions for efficient navigation. Similar high-level actions in our task would each require around 5 low-level actions combined in the right way. In contrast, our $\\mathtt { R L } ^ { 2 }$ agent needs to learn these higher-level actions from scratch. ",
646
+ "bbox": [
647
+ 173,
648
+ 464,
649
+ 825,
650
+ 575
651
+ ],
652
+ "page_idx": 6
653
+ },
654
+ {
655
+ "type": "text",
656
+ "text": "We use a simple training setup, where we use small mazes of size $5 \\times 5$ , with 2 episodes of interaction, each with horizon up to 250. Here the size of the maze is measured by the number of grid cells along each wall in a discrete representation of the maze. During each trial, we sample 1 out of 1000 randomly generated configurations of map layout and target positions. During testing, we evaluate on 1000 separately generated configurations. In addition, we also study its extrapolation behavior along two axes, by (1) testing on large mazes of size $9 \\times 9$ (see Figure $_ { 4 \\mathrm { c } }$ ) and (2) running the agent for up to 5 episodes in both small and large mazes. For the large maze, we also increase the horizon per episode by $4 \\mathbf { x }$ due to the increased size of the maze. ",
657
+ "bbox": [
658
+ 174,
659
+ 582,
660
+ 825,
661
+ 694
662
+ ],
663
+ "page_idx": 6
664
+ },
665
+ {
666
+ "type": "table",
667
+ "img_path": "images/017f1b231b318f6d6c40f1aca3cee6feb34723220ca41f80bd939ecbaafce976.jpg",
668
+ "table_caption": [
669
+ "Table 3: Results for visual navigation. These metrics are computed using the best run among all runs shown in Figure 5. In 3c, we measure the proportion of mazes where the trajectory length in the second episode does not exceed the trajectory length in the first episode. "
670
+ ],
671
+ "table_footnote": [],
672
+ "table_body": "<table><tr><td colspan=\"3\">(a) Average length of successful trajectories</td><td colspan=\"3\">(b) %Success</td><td colspan=\"2\">(c) %Improved</td></tr><tr><td>Episode</td><td> Small</td><td>Large</td><td>Episode</td><td>Small</td><td>Large</td><td> Small</td><td>Large</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td>91.7%</td><td>71.4%</td></tr><tr><td>1</td><td>52.4 ± 1.3</td><td>180.1 ± 6.0</td><td>1</td><td>99.3%</td><td>97.1%</td><td></td><td></td></tr><tr><td>2</td><td>39.1 ± 0.9</td><td>151.8 ± 5.9</td><td>2</td><td>99.6%</td><td>96.7%</td><td></td><td></td></tr><tr><td>3</td><td>42.6 ± 1.0</td><td>169.3 ± 6.3</td><td>3</td><td>99.7%</td><td>95.8%</td><td></td><td></td></tr><tr><td>4</td><td>43.5 ± 1.1</td><td>162.3 ± 6.4</td><td>4</td><td>99.4%</td><td>95.6%</td><td></td><td></td></tr><tr><td>5</td><td>43.9 ± 1.1</td><td>169.3 ± 6.5</td><td>5</td><td>99.6%</td><td>96.1%</td><td></td><td></td></tr></table>",
673
+ "bbox": [
674
+ 192,
675
+ 761,
676
+ 803,
677
+ 893
678
+ ],
679
+ "page_idx": 6
680
+ },
681
+ {
682
+ "type": "image",
683
+ "img_path": "images/3d37b1007f0139a7e685bb1cef2ea19f0a8c5f7a49f0ed153d5612c4014a1e3a.jpg",
684
+ "image_caption": [
685
+ "Figure $5 \\colon \\mathrm { { R L } ^ { 2 } }$ learning curves for visual navigation. Each curve shows a different random initialization of the RNN weights (by using a different random seed). Performance varies greatly across different initializations. "
686
+ ],
687
+ "image_footnote": [],
688
+ "bbox": [
689
+ 338,
690
+ 103,
691
+ 660,
692
+ 265
693
+ ],
694
+ "page_idx": 7
695
+ },
696
+ {
697
+ "type": "text",
698
+ "text": "The results are summarized in Table 3, and the learning curves are shown in Figure 5. We observe that there is a significant reduction in trajectory lengths between the first two episodes in both the smaller and larger mazes, suggesting that the agent has learned how to use information from past episodes. It also achieves reasonable extrapolation behavior in further episodes by maintaining its performance, although there is a small drop in the rate of success in the larger mazes. We also observe that on larger mazes, the ratio of improved trajectories is lower, likely because the agent has not learned how to act optimally in the larger mazes. ",
699
+ "bbox": [
700
+ 173,
701
+ 353,
702
+ 825,
703
+ 450
704
+ ],
705
+ "page_idx": 7
706
+ },
707
+ {
708
+ "type": "text",
709
+ "text": "Still, even on the small mazes, the agent does not learn to perfectly reuse prior information. An illustration of the agent’s behavior is shown in Figure 6. The intended behavior, which occurs most frequently, as shown in 6a and 6b, is that the agent should remember the target’s location, and utilize it to act optimally in the second episode. However, occasionally the agent forgets about where the target was, and continues to explore in the second episode, as shown in 6c and 6d. We believe that better reinforcement learning techniques used as the outer-loop algorithm will improve these results in the future. ",
710
+ "bbox": [
711
+ 173,
712
+ 458,
713
+ 825,
714
+ 555
715
+ ],
716
+ "page_idx": 7
717
+ },
718
+ {
719
+ "type": "image",
720
+ "img_path": "images/b5073a3738b96019be38a33dab7edfe9e97aee1941aa5b044fa9917c1b856b7d.jpg",
721
+ "image_caption": [
722
+ "Figure 6: Visualization of the agent’s behavior. In each scenario, the agent starts at the center of the blue block, and the goal is to reach anywhere in the red block. "
723
+ ],
724
+ "image_footnote": [],
725
+ "bbox": [
726
+ 183,
727
+ 571,
728
+ 816,
729
+ 720
730
+ ],
731
+ "page_idx": 7
732
+ },
733
+ {
734
+ "type": "text",
735
+ "text": "4 RELATED WORK ",
736
+ "text_level": 1,
737
+ "bbox": [
738
+ 176,
739
+ 792,
740
+ 344,
741
+ 808
742
+ ],
743
+ "page_idx": 7
744
+ },
745
+ {
746
+ "type": "text",
747
+ "text": "The concept of using prior experience to speed up reinforcement learning algorithms has been explored in the past in various forms. Earlier studies have investigated automatic tuning of hyperparameters, such as learning rate and temperature (Ishii et al., 2002; Schweighofer & Doya, 2003), as a form of meta-learning. Wilson et al. (2007) use hierarchical Bayesian methods to maintain a posterior over possible models of dynamics, and apply optimistic Thompson sampling according to the posterior. Many works in hierarchical reinforcement learning propose to extract reusable skills from previous tasks to speed up exploration in new tasks (Singh, 1992; Perkins et al., 1999). We refer the reader to Taylor & Stone (2009) for a more thorough survey on the multi-task and transfer learning aspects. ",
748
+ "bbox": [
749
+ 173,
750
+ 825,
751
+ 825,
752
+ 924
753
+ ],
754
+ "page_idx": 7
755
+ },
756
+ {
757
+ "type": "text",
758
+ "text": "",
759
+ "bbox": [
760
+ 173,
761
+ 103,
762
+ 823,
763
+ 132
764
+ ],
765
+ "page_idx": 8
766
+ },
767
+ {
768
+ "type": "text",
769
+ "text": "The formulation of searching for a best-performing algorithm, whose performance is averaged over a given distribution over MDPs, have been investigated in the past in more limited forms (Maes et al., 2011; Castronovo et al., 2012). There, they propose to learn an algorithm to solve multiarmed bandits using program search, where the search space consists of simple formulas composed from hand-specified primitives, which needs to be tuned for each specific distribution over MDPs. In comparison, our approach allows for entirely end-to-end training without requiring such domain knowledge. ",
770
+ "bbox": [
771
+ 174,
772
+ 138,
773
+ 825,
774
+ 236
775
+ ],
776
+ "page_idx": 8
777
+ },
778
+ {
779
+ "type": "text",
780
+ "text": "More recently, Fu et al. (2015) propose a model-based approach on top of iLQG with unknown dynamics (Levine & Abbeel, 2014), which uses samples collected from previous tasks to build a neural network prior for the dynamics, and can perform one-shot learning on new, but related tasks thanks to reduced sample complexity. There has been a growing interest in using deep neural networks for multi-task learning and transfer learning (Parisotto et al., 2015; Rusu et al., 2015; 2016a; Devin et al., 2016; Rusu et al., 2016b). ",
781
+ "bbox": [
782
+ 174,
783
+ 243,
784
+ 825,
785
+ 327
786
+ ],
787
+ "page_idx": 8
788
+ },
789
+ {
790
+ "type": "text",
791
+ "text": "In the broader context of machine learning, there has been a lot of interest in one-shot learning for object classification (Vilalta & Drissi, 2002; Fei-Fei et al., 2006; Larochelle et al., 2008; Lake et al., 2011; Koch, 2015). Our work draws inspiration from a particular line of work (Younger et al., 2001; Santoro et al., 2016; Vinyals et al., 2016), which formulates meta-learning as an optimization problem, and can thus be optimized end-to-end via gradient descent. While these work applies to the supervised learning setting, our work applies in the more general reinforcement learning setting. Although the reinforcement learning setting is more challenging, the resulting behavior is far richer: our agent must not only learn to exploit existing information, but also learn to explore, a problem that is usually not a factor in supervised learning. Another line of work (Hochreiter et al., 2001; Younger et al., 2001; Andrychowicz et al., 2016; Li & Malik, 2016) studies meta-learning over the optimization process. There, the meta-learner makes explicit updates to a parametrized model. In comparison, we do not use a directly parametrized policy; instead, the recurrent neural network agent acts as the meta-learner and the resulting policy simultaneously. ",
792
+ "bbox": [
793
+ 174,
794
+ 334,
795
+ 825,
796
+ 515
797
+ ],
798
+ "page_idx": 8
799
+ },
800
+ {
801
+ "type": "text",
802
+ "text": "Our formulation essentially constructs a partially observable MDP (POMDP) which is solved in the outer loop, where the underlying MDP is unobserved by the agent. This reduction of an unknown MDP to a POMDP can be traced back to dual control theory (Feldbaum, 1960), where “dual” refers to the fact that one is controlling both the state and the state estimate. Feldbaum pointed out that the solution can in principle be computed with dynamic programming, but doing so is usually impractical. POMDPs with such structure have also been studied under the name “mixed observability MDPs” (Ong et al., 2010). However, the method proposed there suffers from the usual challenges of solving POMDPs in high dimensions. ",
803
+ "bbox": [
804
+ 174,
805
+ 521,
806
+ 825,
807
+ 632
808
+ ],
809
+ "page_idx": 8
810
+ },
811
+ {
812
+ "type": "text",
813
+ "text": "Apart from the various multiple-episode tasks we investigate in this work, previous literature on training RNN policies have used similar tasks that require memory to test if long-term dependency can be learned. Recent examples include the Labyrinth experiment in the A3C paper (Mnih et al., 2016), and the water maze experiment in the Recurrent DDPG paper (Heess et al., 2015a). Although these tasks can be reformulated under the $\\mathrm { { R L ^ { 2 } } }$ framework, the key difference is that they focus on the memory aspect instead of the fast RL aspect. ",
814
+ "bbox": [
815
+ 174,
816
+ 640,
817
+ 825,
818
+ 723
819
+ ],
820
+ "page_idx": 8
821
+ },
822
+ {
823
+ "type": "text",
824
+ "text": "5 DISCUSSION ",
825
+ "text_level": 1,
826
+ "bbox": [
827
+ 176,
828
+ 744,
829
+ 310,
830
+ 761
831
+ ],
832
+ "page_idx": 8
833
+ },
834
+ {
835
+ "type": "text",
836
+ "text": "This paper suggests a different approach for designing better reinforcement learning algorithms: instead of acting as the designers ourselves, learn the algorithm end-to-end using standard reinforcement learning techniques. That is, the “fast” RL algorithm is a computation whose state is stored in the RNN activations, and the RNN’s weights are learned by a general-purpose “slow” reinforcement learning algorithm. Our method, $\\mathrm { { R L ^ { 2 } } }$ , has demonstrated competence comparable with theoretically optimal algorithms in small-scale settings. We have further shown its potential to scale to high-dimensional tasks. ",
837
+ "bbox": [
838
+ 174,
839
+ 776,
840
+ 823,
841
+ 875
842
+ ],
843
+ "page_idx": 8
844
+ },
845
+ {
846
+ "type": "text",
847
+ "text": "In the experiments, we have identified opportunities to improve upon $\\mathtt { R L } ^ { 2 }$ : the outer-loop reinforcement learning algorithm was shown to be an immediate bottleneck, and we believe that for settings with extremely long horizons, better architecture may also be required for the policy. Although we have used generic methods and architectures for the outer-loop algorithm and the policy, doing this also ignores the underlying episodic structure. We expect algorithms and policy architectures that exploit the problem structure to significantly boost the performance. ",
848
+ "bbox": [
849
+ 176,
850
+ 881,
851
+ 823,
852
+ 924
853
+ ],
854
+ "page_idx": 8
855
+ },
856
+ {
857
+ "type": "text",
858
+ "text": "",
859
+ "bbox": [
860
+ 174,
861
+ 103,
862
+ 823,
863
+ 146
864
+ ],
865
+ "page_idx": 9
866
+ },
867
+ {
868
+ "type": "text",
869
+ "text": "ACKNOWLEDGMENTS ",
870
+ "text_level": 1,
871
+ "bbox": [
872
+ 176,
873
+ 164,
874
+ 326,
875
+ 176
876
+ ],
877
+ "page_idx": 9
878
+ },
879
+ {
880
+ "type": "text",
881
+ "text": "We would like to thank our colleagues at Berkeley and OpenAI for insightful discussions. This research was funded in part by ONR through a PECASE award. Yan Duan was also supported by a Berkeley AI Research lab Fellowship and a Huawei Fellowship. Xi Chen was also supported by a Berkeley AI Research lab Fellowship. We gratefully acknowledge the support of the NSF through grant IIS-1619362 and of the ARC through a Laureate Fellowship (FL110100281) and through the ARC Centre of Excellence for Mathematical and Statistical Frontiers. ",
882
+ "bbox": [
883
+ 174,
884
+ 186,
885
+ 825,
886
+ 270
887
+ ],
888
+ "page_idx": 9
889
+ },
890
+ {
891
+ "type": "text",
892
+ "text": "REFERENCES ",
893
+ "text_level": 1,
894
+ "bbox": [
895
+ 174,
896
+ 292,
897
+ 285,
898
+ 308
899
+ ],
900
+ "page_idx": 9
901
+ },
902
+ {
903
+ "type": "text",
904
+ "text": "Marcin Andrychowicz, Misha Denil, Sergio Gomez, Matthew W Hoffman, David Pfau, Tom Schaul, and Nando de Freitas. Learning to learn by gradient descent by gradient descent. arXiv preprint arXiv:1606.04474, 2016. ",
905
+ "bbox": [
906
+ 173,
907
+ 315,
908
+ 823,
909
+ 358
910
+ ],
911
+ "page_idx": 9
912
+ },
913
+ {
914
+ "type": "text",
915
+ "text": "Jean-Yves Audibert and Remi Munos. Introduction to bandits: Algorithms and theory. ´ ICML Tutorial on bandits, 2011. ",
916
+ "bbox": [
917
+ 171,
918
+ 368,
919
+ 823,
920
+ 397
921
+ ],
922
+ "page_idx": 9
923
+ },
924
+ {
925
+ "type": "text",
926
+ "text": "Peter Auer. Using confidence bounds for exploitation-exploration trade-offs. Journal of Machine Learning Research, 3(Nov):397–422, 2002. ",
927
+ "bbox": [
928
+ 174,
929
+ 407,
930
+ 821,
931
+ 436
932
+ ],
933
+ "page_idx": 9
934
+ },
935
+ {
936
+ "type": "text",
937
+ "text": "Yoshua Bengio, Patrice Simard, and Paolo Frasconi. Learning long-term dependencies with gradient descent is difficult. IEEE transactions on neural networks, 5(2):157–166, 1994. ",
938
+ "bbox": [
939
+ 174,
940
+ 446,
941
+ 821,
942
+ 476
943
+ ],
944
+ "page_idx": 9
945
+ },
946
+ {
947
+ "type": "text",
948
+ "text": "Sebastien Bubeck and Nicolo Cesa-Bianchi. Regret analysis of stochastic and nonstochastic multi- ´ armed bandit problems. arXiv preprint arXiv:1204.5721, 2012. ",
949
+ "bbox": [
950
+ 173,
951
+ 486,
952
+ 821,
953
+ 515
954
+ ],
955
+ "page_idx": 9
956
+ },
957
+ {
958
+ "type": "text",
959
+ "text": "Michael Castronovo, Francis Maes, Raphael Fonteneau, and Damien Ernst. Learning exploration/exploitation strategies for single trajectory reinforcement learning. In EWRL, pp. 1–10, 2012. ",
960
+ "bbox": [
961
+ 173,
962
+ 525,
963
+ 823,
964
+ 568
965
+ ],
966
+ "page_idx": 9
967
+ },
968
+ {
969
+ "type": "text",
970
+ "text": "Jhelum Chakravorty and Aditya Mahajan. Multi-armed bandits, gittins index, and its calculation. Methods and Applications of Statistics in Clinical Trials: Planning, Analysis, and Inferential Methods, 2:416–435, 2013. ",
971
+ "bbox": [
972
+ 174,
973
+ 579,
974
+ 823,
975
+ 621
976
+ ],
977
+ "page_idx": 9
978
+ },
979
+ {
980
+ "type": "text",
981
+ "text": "Olivier Chapelle and Lihong Li. An empirical evaluation of thompson sampling. In Advances in neural information processing systems, pp. 2249–2257, 2011. ",
982
+ "bbox": [
983
+ 173,
984
+ 632,
985
+ 821,
986
+ 661
987
+ ],
988
+ "page_idx": 9
989
+ },
990
+ {
991
+ "type": "text",
992
+ "text": "Kyunghyun Cho, Bart Van Merrienboer, Dzmitry Bahdanau, and Yoshua Bengio. On the properties ¨ of neural machine translation: Encoder-decoder approaches. arXiv preprint arXiv:1409.1259, 2014. ",
993
+ "bbox": [
994
+ 174,
995
+ 670,
996
+ 825,
997
+ 713
998
+ ],
999
+ "page_idx": 9
1000
+ },
1001
+ {
1002
+ "type": "text",
1003
+ "text": "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. ",
1004
+ "bbox": [
1005
+ 173,
1006
+ 723,
1007
+ 825,
1008
+ 753
1009
+ ],
1010
+ "page_idx": 9
1011
+ },
1012
+ {
1013
+ "type": "text",
1014
+ "text": "Marc Deisenroth and Carl E Rasmussen. Pilco: A model-based and data-efficient approach to policy search. In Proceedings of the 28th International Conference on machine learning (ICML-11), pp. 465–472, 2011. ",
1015
+ "bbox": [
1016
+ 174,
1017
+ 763,
1018
+ 821,
1019
+ 806
1020
+ ],
1021
+ "page_idx": 9
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "Coline Devin, Abhishek Gupta, Trevor Darrell, Pieter Abbeel, and Sergey Levine. Learning modular neural network policies for multi-task and multi-robot transfer. arXiv preprint arXiv:1609.07088, 2016. ",
1026
+ "bbox": [
1027
+ 174,
1028
+ 816,
1029
+ 823,
1030
+ 858
1031
+ ],
1032
+ "page_idx": 9
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "Li Fei-Fei, Rob Fergus, and Pietro Perona. One-shot learning of object categories. IEEE transactions on pattern analysis and machine intelligence, 28(4):594–611, 2006. ",
1037
+ "bbox": [
1038
+ 171,
1039
+ 869,
1040
+ 825,
1041
+ 898
1042
+ ],
1043
+ "page_idx": 9
1044
+ },
1045
+ {
1046
+ "type": "text",
1047
+ "text": "AA Feldbaum. Dual control theory. i. Avtomatika i Telemekhanika, 21(9):1240–1249, 1960. ",
1048
+ "bbox": [
1049
+ 169,
1050
+ 909,
1051
+ 776,
1052
+ 924
1053
+ ],
1054
+ "page_idx": 9
1055
+ },
1056
+ {
1057
+ "type": "text",
1058
+ "text": "Justin Fu, Sergey Levine, and Pieter Abbeel. One-shot learning of manipulation skills with online dynamics adaptation and neural network priors. arXiv preprint arXiv:1509.06841, 2015. ",
1059
+ "bbox": [
1060
+ 171,
1061
+ 103,
1062
+ 823,
1063
+ 132
1064
+ ],
1065
+ "page_idx": 10
1066
+ },
1067
+ {
1068
+ "type": "text",
1069
+ "text": "Mohammad Ghavamzadeh, Shie Mannor, Joelle Pineau, Aviv Tamar, et al. Bayesian reinforcement learning: a survey. World Scientific, 2015. ",
1070
+ "bbox": [
1071
+ 173,
1072
+ 142,
1073
+ 823,
1074
+ 171
1075
+ ],
1076
+ "page_idx": 10
1077
+ },
1078
+ {
1079
+ "type": "text",
1080
+ "text": "John Gittins, Kevin Glazebrook, and Richard Weber. Multi-armed bandit allocation indices. John Wiley & Sons, 2011. ",
1081
+ "bbox": [
1082
+ 173,
1083
+ 181,
1084
+ 821,
1085
+ 212
1086
+ ],
1087
+ "page_idx": 10
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "John C Gittins. Bandit processes and dynamic allocation indices. Journal of the Royal Statistical Society. Series B (Methodological), pp. 148–177, 1979. ",
1092
+ "bbox": [
1093
+ 173,
1094
+ 222,
1095
+ 821,
1096
+ 251
1097
+ ],
1098
+ "page_idx": 10
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "Xiaoxiao Guo, Satinder Singh, Honglak Lee, Richard L Lewis, and Xiaoshi Wang. Deep learning for real-time atari game play using offline monte-carlo tree search planning. In Advances in neural information processing systems, pp. 3338–3346, 2014. ",
1103
+ "bbox": [
1104
+ 173,
1105
+ 261,
1106
+ 825,
1107
+ 304
1108
+ ],
1109
+ "page_idx": 10
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "Nicolas Heess, Jonathan J Hunt, Timothy P Lillicrap, and David Silver. Memory-based control with recurrent neural networks. arXiv preprint arXiv:1512.04455, 2015a. ",
1114
+ "bbox": [
1115
+ 171,
1116
+ 314,
1117
+ 825,
1118
+ 343
1119
+ ],
1120
+ "page_idx": 10
1121
+ },
1122
+ {
1123
+ "type": "text",
1124
+ "text": "Nicolas Heess, Gregory Wayne, David Silver, Tim Lillicrap, Tom Erez, and Yuval Tassa. Learning continuous control policies by stochastic value gradients. In Advances in Neural Information Processing Systems, pp. 2944–2952, 2015b. ",
1125
+ "bbox": [
1126
+ 176,
1127
+ 352,
1128
+ 823,
1129
+ 396
1130
+ ],
1131
+ "page_idx": 10
1132
+ },
1133
+ {
1134
+ "type": "text",
1135
+ "text": "Sepp Hochreiter, A Steven Younger, and Peter R Conwell. Learning to learn using gradient descent. In International Conference on Artificial Neural Networks, pp. 87–94. Springer, 2001. ",
1136
+ "bbox": [
1137
+ 174,
1138
+ 406,
1139
+ 821,
1140
+ 436
1141
+ ],
1142
+ "page_idx": 10
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "Shin Ishii, Wako Yoshida, and Junichiro Yoshimoto. Control of exploitation–exploration metaparameter in reinforcement learning. Neural networks, 15(4):665–687, 2002. ",
1147
+ "bbox": [
1148
+ 173,
1149
+ 445,
1150
+ 820,
1151
+ 476
1152
+ ],
1153
+ "page_idx": 10
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "Thomas Jaksch, Ronald Ortner, and Peter Auer. Near-optimal regret bounds for reinforcement learning. Journal of Machine Learning Research, 11(Apr):1563–1600, 2010. ",
1158
+ "bbox": [
1159
+ 174,
1160
+ 484,
1161
+ 821,
1162
+ 515
1163
+ ],
1164
+ "page_idx": 10
1165
+ },
1166
+ {
1167
+ "type": "text",
1168
+ "text": "Rafal Jozefowicz, Wojciech Zaremba, and Ilya Sutskever. An empirical exploration of recur- ´ rent network architectures. In Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, Lille, France, 6-11 July 2015, pp. 2342–2350, 2015. URL http: //jmlr.org/proceedings/papers/v37/jozefowicz15.html. ",
1169
+ "bbox": [
1170
+ 173,
1171
+ 523,
1172
+ 825,
1173
+ 582
1174
+ ],
1175
+ "page_idx": 10
1176
+ },
1177
+ {
1178
+ "type": "text",
1179
+ "text": "Michał Kempka, Marek Wydmuch, Grzegorz Runc, Jakub Toczek, and Wojciech Jaskowski. Viz- ´ doom: A doom-based ai research platform for visual reinforcement learning. arXiv preprint arXiv:1605.02097, 2016. ",
1180
+ "bbox": [
1181
+ 173,
1182
+ 592,
1183
+ 823,
1184
+ 635
1185
+ ],
1186
+ "page_idx": 10
1187
+ },
1188
+ {
1189
+ "type": "text",
1190
+ "text": "Gregory Koch. Siamese neural networks for one-shot image recognition. PhD thesis, University of Toronto, 2015. ",
1191
+ "bbox": [
1192
+ 173,
1193
+ 645,
1194
+ 823,
1195
+ 674
1196
+ ],
1197
+ "page_idx": 10
1198
+ },
1199
+ {
1200
+ "type": "text",
1201
+ "text": "J Zico Kolter and Andrew Y Ng. Near-bayesian exploration in polynomial time. In Proceedings of the 26th Annual International Conference on Machine Learning, pp. 513–520. ACM, 2009. ",
1202
+ "bbox": [
1203
+ 173,
1204
+ 684,
1205
+ 823,
1206
+ 714
1207
+ ],
1208
+ "page_idx": 10
1209
+ },
1210
+ {
1211
+ "type": "text",
1212
+ "text": "Brenden M Lake, Ruslan Salakhutdinov, Jason Gross, and Joshua B Tenenbaum. One shot learning of simple visual concepts. In Proceedings of the 33rd Annual Conference of the Cognitive Science Society, volume 172, pp. 2, 2011. ",
1213
+ "bbox": [
1214
+ 173,
1215
+ 723,
1216
+ 826,
1217
+ 767
1218
+ ],
1219
+ "page_idx": 10
1220
+ },
1221
+ {
1222
+ "type": "text",
1223
+ "text": "Hugo Larochelle, Dumitru Erhan, and Yoshua Bengio. Zero-data learning of new tasks. In AAAI, volume 1, pp. 3, 2008. ",
1224
+ "bbox": [
1225
+ 171,
1226
+ 776,
1227
+ 823,
1228
+ 806
1229
+ ],
1230
+ "page_idx": 10
1231
+ },
1232
+ {
1233
+ "type": "text",
1234
+ "text": "Sergey Levine and Pieter Abbeel. Learning neural network policies with guided policy search under unknown dynamics. In Advances in Neural Information Processing Systems, pp. 1071–1079, 2014. ",
1235
+ "bbox": [
1236
+ 176,
1237
+ 815,
1238
+ 823,
1239
+ 859
1240
+ ],
1241
+ "page_idx": 10
1242
+ },
1243
+ {
1244
+ "type": "text",
1245
+ "text": "Sergey Levine, Chelsea Finn, Trevor Darrell, and Pieter Abbeel. End-to-end training of deep visuomotor policies. Journal of Machine Learning Research, 17(39):1–40, 2016. ",
1246
+ "bbox": [
1247
+ 173,
1248
+ 869,
1249
+ 825,
1250
+ 898
1251
+ ],
1252
+ "page_idx": 10
1253
+ },
1254
+ {
1255
+ "type": "text",
1256
+ "text": "Ke Li and Jitendra Malik. Learning to optimize. arXiv preprint arXiv:1606.01885, 2016. ",
1257
+ "bbox": [
1258
+ 169,
1259
+ 909,
1260
+ 758,
1261
+ 924
1262
+ ],
1263
+ "page_idx": 10
1264
+ },
1265
+ {
1266
+ "type": "text",
1267
+ "text": "Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015. ",
1268
+ "bbox": [
1269
+ 176,
1270
+ 103,
1271
+ 823,
1272
+ 146
1273
+ ],
1274
+ "page_idx": 11
1275
+ },
1276
+ {
1277
+ "type": "text",
1278
+ "text": "Francis Maes, Louis Wehenkel, and Damien Ernst. Automatic discovery of ranking formulas for playing with multi-armed bandits. In European Workshop on Reinforcement Learning, pp. 5–17. Springer, 2011. ",
1279
+ "bbox": [
1280
+ 174,
1281
+ 154,
1282
+ 821,
1283
+ 196
1284
+ ],
1285
+ "page_idx": 11
1286
+ },
1287
+ {
1288
+ "type": "text",
1289
+ "text": "Benedict C May, Nathan Korda, Anthony Lee, and David S Leslie. Optimistic bayesian sampling in contextual-bandit problems. Journal of Machine Learning Research, 13(Jun):2069–2106, 2012. ",
1290
+ "bbox": [
1291
+ 171,
1292
+ 204,
1293
+ 823,
1294
+ 234
1295
+ ],
1296
+ "page_idx": 11
1297
+ },
1298
+ {
1299
+ "type": "text",
1300
+ "text": "Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. ",
1301
+ "bbox": [
1302
+ 176,
1303
+ 242,
1304
+ 823,
1305
+ 285
1306
+ ],
1307
+ "page_idx": 11
1308
+ },
1309
+ {
1310
+ "type": "text",
1311
+ "text": "Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy P Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. arXiv preprint arXiv:1602.01783, 2016. ",
1312
+ "bbox": [
1313
+ 176,
1314
+ 292,
1315
+ 823,
1316
+ 335
1317
+ ],
1318
+ "page_idx": 11
1319
+ },
1320
+ {
1321
+ "type": "text",
1322
+ "text": "Junhyuk Oh, Valliappa Chockalingam, Satinder Singh, and Honglak Lee. Control of memory, active perception, and action in minecraft. arXiv preprint arXiv:1605.09128, 2016. ",
1323
+ "bbox": [
1324
+ 171,
1325
+ 343,
1326
+ 823,
1327
+ 373
1328
+ ],
1329
+ "page_idx": 11
1330
+ },
1331
+ {
1332
+ "type": "text",
1333
+ "text": "Sylvie CW Ong, Shao Wei Png, David Hsu, and Wee Sun Lee. Planning under uncertainty for robotic tasks with mixed observability. The International Journal of Robotics Research, 29(8): 1053–1068, 2010. ",
1334
+ "bbox": [
1335
+ 173,
1336
+ 381,
1337
+ 823,
1338
+ 424
1339
+ ],
1340
+ "page_idx": 11
1341
+ },
1342
+ {
1343
+ "type": "text",
1344
+ "text": "Ian Osband and Benjamin Van Roy. Why is posterior sampling better than optimism for reinforcement learning. arXiv preprint arXiv:1607.00215, 2016. ",
1345
+ "bbox": [
1346
+ 171,
1347
+ 431,
1348
+ 821,
1349
+ 462
1350
+ ],
1351
+ "page_idx": 11
1352
+ },
1353
+ {
1354
+ "type": "text",
1355
+ "text": "Ian Osband, Dan Russo, and Benjamin Van Roy. (more) efficient reinforcement learning via posterior sampling. In Advances in Neural Information Processing Systems, pp. 3003–3011, 2013. ",
1356
+ "bbox": [
1357
+ 173,
1358
+ 468,
1359
+ 820,
1360
+ 498
1361
+ ],
1362
+ "page_idx": 11
1363
+ },
1364
+ {
1365
+ "type": "text",
1366
+ "text": "Emilio Parisotto, Jimmy Lei Ba, and Ruslan Salakhutdinov. Actor-mimic: Deep multitask and transfer reinforcement learning. arXiv preprint arXiv:1511.06342, 2015. ",
1367
+ "bbox": [
1368
+ 176,
1369
+ 506,
1370
+ 820,
1371
+ 536
1372
+ ],
1373
+ "page_idx": 11
1374
+ },
1375
+ {
1376
+ "type": "text",
1377
+ "text": "Theodore J Perkins, Doina Precup, et al. Using options for knowledge transfer in reinforcement learning. University of Massachusetts, Amherst, MA, USA, Tech. Rep, 1999. ",
1378
+ "bbox": [
1379
+ 173,
1380
+ 542,
1381
+ 823,
1382
+ 571
1383
+ ],
1384
+ "page_idx": 11
1385
+ },
1386
+ {
1387
+ "type": "text",
1388
+ "text": "Andrei A Rusu, Sergio Gomez Colmenarejo, Caglar Gulcehre, Guillaume Desjardins, James Kirkpatrick, Razvan Pascanu, Volodymyr Mnih, Koray Kavukcuoglu, and Raia Hadsell. Policy distillation. arXiv preprint arXiv:1511.06295, 2015. ",
1389
+ "bbox": [
1390
+ 174,
1391
+ 579,
1392
+ 821,
1393
+ 623
1394
+ ],
1395
+ "page_idx": 11
1396
+ },
1397
+ {
1398
+ "type": "text",
1399
+ "text": "Andrei A Rusu, Neil C Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. arXiv preprint arXiv:1606.04671, 2016a. ",
1400
+ "bbox": [
1401
+ 174,
1402
+ 631,
1403
+ 823,
1404
+ 674
1405
+ ],
1406
+ "page_idx": 11
1407
+ },
1408
+ {
1409
+ "type": "text",
1410
+ "text": "Andrei A Rusu, Matej Vecerik, Thomas Rothorl, Nicolas Heess, Razvan Pascanu, and Raia Hadsell.¨ Sim-to-real robot learning from pixels with progressive nets. arXiv preprint arXiv:1610.04286, 2016b. ",
1411
+ "bbox": [
1412
+ 173,
1413
+ 681,
1414
+ 825,
1415
+ 724
1416
+ ],
1417
+ "page_idx": 11
1418
+ },
1419
+ {
1420
+ "type": "text",
1421
+ "text": "Adam Santoro, Sergey Bartunov, Matthew Botvinick, Daan Wierstra, and Timothy Lillicrap. Oneshot learning with memory-augmented neural networks. arXiv preprint arXiv:1605.06065, 2016. ",
1422
+ "bbox": [
1423
+ 173,
1424
+ 732,
1425
+ 821,
1426
+ 762
1427
+ ],
1428
+ "page_idx": 11
1429
+ },
1430
+ {
1431
+ "type": "text",
1432
+ "text": "John Schulman, Sergey Levine, Philipp Moritz, Michael I Jordan, and Pieter Abbeel. Trust region policy optimization. CoRR, abs/1502.05477, 2015. ",
1433
+ "bbox": [
1434
+ 174,
1435
+ 770,
1436
+ 821,
1437
+ 799
1438
+ ],
1439
+ "page_idx": 11
1440
+ },
1441
+ {
1442
+ "type": "text",
1443
+ "text": "John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. Highdimensional continuous control using generalized advantage estimation. In International Conference on Learning Representations (ICLR2016), 2016. ",
1444
+ "bbox": [
1445
+ 173,
1446
+ 806,
1447
+ 821,
1448
+ 849
1449
+ ],
1450
+ "page_idx": 11
1451
+ },
1452
+ {
1453
+ "type": "text",
1454
+ "text": "Nicolas Schweighofer and Kenji Doya. Meta-learning in reinforcement learning. Neural Networks, 16(1):5–9, 2003. ",
1455
+ "bbox": [
1456
+ 174,
1457
+ 858,
1458
+ 821,
1459
+ 887
1460
+ ],
1461
+ "page_idx": 11
1462
+ },
1463
+ {
1464
+ "type": "text",
1465
+ "text": "Satinder Pal Singh. Transfer of learning by composing solutions of elemental sequential tasks. Machine Learning, 8(3-4):323–339, 1992. ",
1466
+ "bbox": [
1467
+ 176,
1468
+ 895,
1469
+ 820,
1470
+ 924
1471
+ ],
1472
+ "page_idx": 11
1473
+ },
1474
+ {
1475
+ "type": "text",
1476
+ "text": "Malcolm Strens. A bayesian framework for reinforcement learning. In ICML, pp. 943–950, 2000. \nMatthew E Taylor and Peter Stone. Transfer learning for reinforcement learning domains: A survey. Journal of Machine Learning Research, 10(Jul):1633–1685, 2009. \nWilliam R Thompson. On the likelihood that one unknown probability exceeds another in view of the evidence of two samples. Biometrika, 25(3/4):285–294, 1933. \nRicardo Vilalta and Youssef Drissi. A perspective view and survey of meta-learning. Artificial Intelligence Review, 18(2):77–95, 2002. \nOriol Vinyals, Charles Blundell, Timothy Lillicrap, Koray Kavukcuoglu, and Daan Wierstra. Matching networks for one shot learning. arXiv preprint arXiv:1606.04080, 2016. \nNiklas Wahlstrom, Thomas B Sch ¨ on, and Marc Peter Deisenroth. From pixels to torques: Policy ¨ learning with deep dynamical models. arXiv preprint arXiv:1502.02251, 2015. \nManuel Watter, Jost Springenberg, Joschka Boedecker, and Martin Riedmiller. Embed to control: A locally linear latent dynamics model for control from raw images. In Advances in Neural Information Processing Systems, pp. 2746–2754, 2015. \nPeter Whittle. Optimization over time. John Wiley & Sons, Inc., 1982. \nAaron Wilson, Alan Fern, Soumya Ray, and Prasad Tadepalli. Multi-task reinforcement learning: a hierarchical bayesian approach. In Proceedings of the 24th international conference on Machine learning, pp. 1015–1022. ACM, 2007. \nA Steven Younger, Sepp Hochreiter, and Peter R Conwell. Meta-learning with backpropagation. In Neural Networks, 2001. Proceedings. IJCNN’01. International Joint Conference on, volume 3. IEEE, 2001. ",
1477
+ "bbox": [
1478
+ 169,
1479
+ 103,
1480
+ 826,
1481
+ 489
1482
+ ],
1483
+ "page_idx": 12
1484
+ },
1485
+ {
1486
+ "type": "text",
1487
+ "text": "APPENDIX ",
1488
+ "text_level": 1,
1489
+ "bbox": [
1490
+ 176,
1491
+ 102,
1492
+ 263,
1493
+ 117
1494
+ ],
1495
+ "page_idx": 13
1496
+ },
1497
+ {
1498
+ "type": "text",
1499
+ "text": "A DETAILED EXPERIMENT SETUP ",
1500
+ "text_level": 1,
1501
+ "bbox": [
1502
+ 178,
1503
+ 136,
1504
+ 467,
1505
+ 151
1506
+ ],
1507
+ "page_idx": 13
1508
+ },
1509
+ {
1510
+ "type": "text",
1511
+ "text": "Common to all experiments: as mentioned in Section 2.2, we use placeholder values when necessary. For example, at $t = 0$ there is no previous action, reward, or termination flag. Since all of our experiments use discrete actions, we use the embedding of the action 0 as a placeholder for actions, and 0 for both the rewards and termination flags. To form the input to the GRU, we use the values for the rewards and termination flags as-is, and embed the states and actions as described separately below for each experiments. These values are then concatenated together to form the joint embedding. ",
1512
+ "bbox": [
1513
+ 173,
1514
+ 167,
1515
+ 825,
1516
+ 265
1517
+ ],
1518
+ "page_idx": 13
1519
+ },
1520
+ {
1521
+ "type": "text",
1522
+ "text": "For the neural network architecture, We use rectified linear units throughout the experiments as the hidden activation, and we apply weight normalization without data-dependent initialization (Salimans & Kingma, 2016) to all weight matrices. The hidden-to-hidden weight matrix uses an orthogonal initialization (Saxe et al., 2013), and all other weight matrices use Xavier initialization (Glorot & Bengio, 2010). We initialize all bias vectors to 0. Unless otherwise mentioned, the policy and the baseline uses separate neural networks with the same architecture until the final layer, where the number of outputs differ. ",
1523
+ "bbox": [
1524
+ 174,
1525
+ 271,
1526
+ 825,
1527
+ 369
1528
+ ],
1529
+ "page_idx": 13
1530
+ },
1531
+ {
1532
+ "type": "text",
1533
+ "text": "All experiments are implemented using TensorFlow (Abadi et al., 2016) and rllab (Duan et al., 2016). We use the implementations of classic algorithms provided by the TabulaRL package (Osband, 2016). ",
1534
+ "bbox": [
1535
+ 174,
1536
+ 376,
1537
+ 825,
1538
+ 417
1539
+ ],
1540
+ "page_idx": 13
1541
+ },
1542
+ {
1543
+ "type": "text",
1544
+ "text": "A.1 MULTI-ARMED BANDITS ",
1545
+ "text_level": 1,
1546
+ "bbox": [
1547
+ 176,
1548
+ 435,
1549
+ 388,
1550
+ 449
1551
+ ],
1552
+ "page_idx": 13
1553
+ },
1554
+ {
1555
+ "type": "text",
1556
+ "text": "The parameters for TRPO are shown in Table 1. Since the environment is stateless, we use a constant embedding 0 as a placeholder in place of the states, and a one-hot embedding for the actions. ",
1557
+ "bbox": [
1558
+ 173,
1559
+ 460,
1560
+ 825,
1561
+ 489
1562
+ ],
1563
+ "page_idx": 13
1564
+ },
1565
+ {
1566
+ "type": "table",
1567
+ "img_path": "images/71de6591bf5edbf4f850dfca5fa09a0c71c65953bb6bbaacb23f050fe59f6c7c.jpg",
1568
+ "table_caption": [
1569
+ "Table 1: Hyperparameters for TRPO: multi-armed bandits "
1570
+ ],
1571
+ "table_footnote": [],
1572
+ "table_body": "<table><tr><td>Discount</td><td>0.99</td></tr><tr><td>GAE入</td><td>0.3</td></tr><tr><td>Policy Iters</td><td>Up to 1000</td></tr><tr><td>#GRUUnits Mean KL</td><td>256</td></tr><tr><td>Batch size</td><td>0.01</td></tr><tr><td></td><td>250000</td></tr></table>",
1573
+ "bbox": [
1574
+ 390,
1575
+ 529,
1576
+ 606,
1577
+ 621
1578
+ ],
1579
+ "page_idx": 13
1580
+ },
1581
+ {
1582
+ "type": "text",
1583
+ "text": "A.2 TABULAR MDPS ",
1584
+ "text_level": 1,
1585
+ "bbox": [
1586
+ 174,
1587
+ 645,
1588
+ 334,
1589
+ 660
1590
+ ],
1591
+ "page_idx": 13
1592
+ },
1593
+ {
1594
+ "type": "text",
1595
+ "text": "The parameters for TRPO are shown in Table 2. We use a one-hot embedding for the states and actions separately, which are then concatenated together. ",
1596
+ "bbox": [
1597
+ 173,
1598
+ 671,
1599
+ 825,
1600
+ 700
1601
+ ],
1602
+ "page_idx": 13
1603
+ },
1604
+ {
1605
+ "type": "table",
1606
+ "img_path": "images/501cce5b1d52e5eee9055c83a4abbf28293f940b5b29bdbdac6ce63df54fa375.jpg",
1607
+ "table_caption": [
1608
+ "Table 2: Hyperparameters for TRPO: tabular MDPs "
1609
+ ],
1610
+ "table_footnote": [],
1611
+ "table_body": "<table><tr><td>Discount GAE入</td><td>0.99 0.3</td></tr><tr><td>Policy Iters</td><td>Up to 10000</td></tr><tr><td>#GRU Units</td><td>256</td></tr><tr><td>Mean KL</td><td>0.01</td></tr><tr><td>Batch size</td><td>250000</td></tr></table>",
1612
+ "bbox": [
1613
+ 385,
1614
+ 739,
1615
+ 611,
1616
+ 832
1617
+ ],
1618
+ "page_idx": 13
1619
+ },
1620
+ {
1621
+ "type": "text",
1622
+ "text": "A.3 VISUAL NAVIGATION ",
1623
+ "text_level": 1,
1624
+ "bbox": [
1625
+ 176,
1626
+ 854,
1627
+ 366,
1628
+ 869
1629
+ ],
1630
+ "page_idx": 13
1631
+ },
1632
+ {
1633
+ "type": "text",
1634
+ "text": "The parameters for TRPO are shown in Table 3. For this task, we use a neural network to form the joint embedding. We rescale the images to have width 40 and height 30 with RGB channels preserved, and we recenter the RGB values to lie within range $[ - 1 , 1 ]$ . Then, this preprocessed image is passed through 2 convolution layers, each with 16 filters of size $5 \\times 5$ and stride 2. The action is first embedded into a 256-dimensional vector where the embedding is learned, and then concatenated with the flattened output of the final convolution layer. The joint vector is then fed to a fully connected layer with 256 hidden units. ",
1635
+ "bbox": [
1636
+ 174,
1637
+ 882,
1638
+ 825,
1639
+ 924
1640
+ ],
1641
+ "page_idx": 13
1642
+ },
1643
+ {
1644
+ "type": "text",
1645
+ "text": "",
1646
+ "bbox": [
1647
+ 174,
1648
+ 103,
1649
+ 825,
1650
+ 159
1651
+ ],
1652
+ "page_idx": 14
1653
+ },
1654
+ {
1655
+ "type": "text",
1656
+ "text": "Unlike previous experiments, we let the policy and the baseline share the same neural network. We found this to improve the stability of training baselines and also the end performance of the policy, possibly due to regularization effects and better learned features imposed by weight sharing. Similar weight-sharing techniques have also been explored in Mnih et al. (2016). ",
1657
+ "bbox": [
1658
+ 174,
1659
+ 166,
1660
+ 825,
1661
+ 223
1662
+ ],
1663
+ "page_idx": 14
1664
+ },
1665
+ {
1666
+ "type": "table",
1667
+ "img_path": "images/70799eab33beab3362692a790b5e3486443f36bfb2783852345d900e038ea3cd.jpg",
1668
+ "table_caption": [
1669
+ "Table 3: Hyperparameters for TRPO: visual navigation "
1670
+ ],
1671
+ "table_footnote": [],
1672
+ "table_body": "<table><tr><td>Discount</td><td>0.99</td></tr><tr><td>GAE 入</td><td>0.99</td></tr><tr><td>Policy Iters</td><td>Up to 5000</td></tr><tr><td>#GRU Units</td><td>256</td></tr><tr><td>Mean KL Batch size</td><td>0.01</td></tr><tr><td></td><td>50000</td></tr></table>",
1673
+ "bbox": [
1674
+ 390,
1675
+ 281,
1676
+ 607,
1677
+ 375
1678
+ ],
1679
+ "page_idx": 14
1680
+ },
1681
+ {
1682
+ "type": "text",
1683
+ "text": "B HYPERPARAMETERS FOR BASELINE ALGORITHMS",
1684
+ "text_level": 1,
1685
+ "bbox": [
1686
+ 173,
1687
+ 445,
1688
+ 622,
1689
+ 460
1690
+ ],
1691
+ "page_idx": 14
1692
+ },
1693
+ {
1694
+ "type": "text",
1695
+ "text": "B.1 MULTI-ARMED BANDITS ",
1696
+ "text_level": 1,
1697
+ "bbox": [
1698
+ 174,
1699
+ 488,
1700
+ 388,
1701
+ 503
1702
+ ],
1703
+ "page_idx": 14
1704
+ },
1705
+ {
1706
+ "type": "text",
1707
+ "text": "There are 3 algorithms with hyperparameters: UCB1, Optimistic Thompson Sampling (OTS), and $\\epsilon$ -Greedy. We perform a coarse grid search to find the best hyperparameter for each of them. More specifically: ",
1708
+ "bbox": [
1709
+ 174,
1710
+ 523,
1711
+ 825,
1712
+ 566
1713
+ ],
1714
+ "page_idx": 14
1715
+ },
1716
+ {
1717
+ "type": "text",
1718
+ "text": "• UCB1: We test $c \\in \\{ 0 . , 0 . 1 , 0 . 2 , 0 . 3 , 0 . 4 , 0 . 5 , 0 . 6 , 0 . 7 , 0 . 8 , 0 . 9 , 1 . 0 \\}$ . The best found parameter for each setting is given in Table 4. ",
1719
+ "bbox": [
1720
+ 218,
1721
+ 593,
1722
+ 821,
1723
+ 623
1724
+ ],
1725
+ "page_idx": 14
1726
+ },
1727
+ {
1728
+ "type": "table",
1729
+ "img_path": "images/bce2799fddf9afe23fafb2d7a76d8d3c1ff8a07862bd3f61f28cb39b9c44ede9.jpg",
1730
+ "table_caption": [
1731
+ "Table 4: Best hyperparameter for UCB1 "
1732
+ ],
1733
+ "table_footnote": [],
1734
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Setting</td><td rowspan=1 colspan=1>Best c</td></tr><tr><td rowspan=1 colspan=1>n=10,k=5</td><td rowspan=2 colspan=1>0.10.1</td></tr><tr><td rowspan=1 colspan=1>n =10,k=10</td></tr><tr><td rowspan=1 colspan=1>n = 10,k = 50</td><td rowspan=1 colspan=1>0.1</td></tr><tr><td rowspan=1 colspan=1>n = 100,k = 5</td><td rowspan=1 colspan=1>0.2</td></tr><tr><td rowspan=1 colspan=1>n = 100,k = 10</td><td rowspan=1 colspan=1>0.2</td></tr><tr><td rowspan=1 colspan=1>n=100,k= 50</td><td rowspan=1 colspan=1>0.2</td></tr><tr><td rowspan=1 colspan=1>n = 500,k = 5</td><td rowspan=1 colspan=1>0.2</td></tr><tr><td rowspan=1 colspan=1>n = 500,k = 10</td><td rowspan=1 colspan=1>0.2</td></tr><tr><td rowspan=1 colspan=1>n = 500,k = 50</td><td rowspan=1 colspan=1>0.2</td></tr></table>",
1735
+ "bbox": [
1736
+ 390,
1737
+ 683,
1738
+ 604,
1739
+ 833
1740
+ ],
1741
+ "page_idx": 14
1742
+ },
1743
+ {
1744
+ "type": "text",
1745
+ "text": "• Optimistic Thompson Sampling (OTS): The hyperparameter is the number of posterior samples. We use up to 20 samples. The best found parameter for each setting is given in Table 5. ",
1746
+ "bbox": [
1747
+ 217,
1748
+ 881,
1749
+ 823,
1750
+ 922
1751
+ ],
1752
+ "page_idx": 14
1753
+ },
1754
+ {
1755
+ "type": "table",
1756
+ "img_path": "images/546b6718f6dfbfba2c819da54453b303f12a74282168e38fddb8b941f0980cc3.jpg",
1757
+ "table_caption": [
1758
+ "Table 5: Best hyperparameter for OTS "
1759
+ ],
1760
+ "table_footnote": [],
1761
+ "table_body": "<table><tr><td>Seting</td><td>Best #samples</td></tr><tr><td>n=10,k=5</td><td>15</td></tr><tr><td>n= 10,k=10</td><td>14</td></tr><tr><td>n= 10,k=50</td><td>19</td></tr><tr><td>n = 100,k = 5</td><td>8</td></tr><tr><td>n = 100,k = 10</td><td>20</td></tr><tr><td>n =100,k = 50</td><td>16</td></tr><tr><td>n = 500,k = 5</td><td>7</td></tr><tr><td>n= :500,k=10</td><td>20</td></tr><tr><td>n = 500,k = 50</td><td>20</td></tr></table>",
1762
+ "bbox": [
1763
+ 366,
1764
+ 127,
1765
+ 632,
1766
+ 276
1767
+ ],
1768
+ "page_idx": 15
1769
+ },
1770
+ {
1771
+ "type": "text",
1772
+ "text": "• $\\epsilon$ -Greedy: The hyperparameter is the $\\epsilon$ parameter. We test $\\epsilon \\_ { \\mathrm { ~ \\tiny ~ \\in ~ } }$ $\\{ 0 , 0 . 1 , 0 . 2 , 0 . 3 , 0 . 4 , 0 . 5 , 0 . 6 , 0 . 7 , 0 . 8 , 0 . 9 , 1 . 0 \\}$ . The best found parameter for each setting is given in Table 6. ",
1773
+ "bbox": [
1774
+ 215,
1775
+ 308,
1776
+ 825,
1777
+ 349
1778
+ ],
1779
+ "page_idx": 15
1780
+ },
1781
+ {
1782
+ "type": "table",
1783
+ "img_path": "images/11c7e3c3e97bfdba09d1d679f7b69b1e81b0eae770e388d80c375e51c9b121d6.jpg",
1784
+ "table_caption": [
1785
+ "Table 6: Best hyperparameter for $\\epsilon$ -Greedy "
1786
+ ],
1787
+ "table_footnote": [],
1788
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Setting</td><td rowspan=1 colspan=1>Best e</td></tr><tr><td rowspan=1 colspan=1>n=10,k=5</td><td rowspan=1 colspan=1>0.0</td></tr><tr><td rowspan=1 colspan=1>n = 10,k = 10</td><td rowspan=1 colspan=1>0.0</td></tr><tr><td rowspan=1 colspan=1>n = 10,k = 50</td><td rowspan=1 colspan=1>0.0</td></tr><tr><td rowspan=1 colspan=1>n = 100,k = 5</td><td rowspan=1 colspan=1>0.0</td></tr><tr><td rowspan=1 colspan=1>n = 100,k = 10</td><td rowspan=1 colspan=1>0.0</td></tr><tr><td rowspan=1 colspan=1>n = 100,k = 50</td><td rowspan=1 colspan=1>0.1</td></tr><tr><td rowspan=1 colspan=1>n = 500,k = 5</td><td rowspan=1 colspan=1>0.1</td></tr><tr><td rowspan=1 colspan=1>n = 500,k=10</td><td rowspan=1 colspan=1>0.1</td></tr><tr><td rowspan=1 colspan=1>n = 500,k = 50</td><td rowspan=1 colspan=1>0.1</td></tr></table>",
1789
+ "bbox": [
1790
+ 390,
1791
+ 398,
1792
+ 604,
1793
+ 547
1794
+ ],
1795
+ "page_idx": 15
1796
+ },
1797
+ {
1798
+ "type": "text",
1799
+ "text": "B.2 TABULAR MDPS ",
1800
+ "text_level": 1,
1801
+ "bbox": [
1802
+ 174,
1803
+ 577,
1804
+ 334,
1805
+ 590
1806
+ ],
1807
+ "page_idx": 15
1808
+ },
1809
+ {
1810
+ "type": "text",
1811
+ "text": "There are 4 algorithms with hyperparameters: Optimistic PSRL (OPSRL), BEB, $\\epsilon$ -Greedy, UCRL2. \nDetails are given below. ",
1812
+ "bbox": [
1813
+ 174,
1814
+ 606,
1815
+ 821,
1816
+ 635
1817
+ ],
1818
+ "page_idx": 15
1819
+ },
1820
+ {
1821
+ "type": "text",
1822
+ "text": "• Optimistic PSRL (OPSRL): The hyperparameter is the number of posterior samples. We use up to 20 samples. The best found parameter for each setting is given in Table 7. ",
1823
+ "bbox": [
1824
+ 215,
1825
+ 655,
1826
+ 825,
1827
+ 684
1828
+ ],
1829
+ "page_idx": 15
1830
+ },
1831
+ {
1832
+ "type": "table",
1833
+ "img_path": "images/3c6f27f084a18a5ad9f13ade2b7f091b847d9fcec9f892460f5bd8dbc894cee7.jpg",
1834
+ "table_caption": [
1835
+ "Table 7: Best hyperparameter for OPSRL "
1836
+ ],
1837
+ "table_footnote": [],
1838
+ "table_body": "<table><tr><td>Setting</td><td>Best #samples</td></tr><tr><td>n=10</td><td>14</td></tr><tr><td>n=25</td><td>14</td></tr><tr><td>n= 50</td><td>14</td></tr><tr><td>n=75</td><td>14</td></tr><tr><td>n=100</td><td>17</td></tr></table>",
1839
+ "bbox": [
1840
+ 392,
1841
+ 731,
1842
+ 604,
1843
+ 824
1844
+ ],
1845
+ "page_idx": 15
1846
+ },
1847
+ {
1848
+ "type": "text",
1849
+ "text": "• BEB: We search for the scaling factor in front of the exploration bonus, in the log-linear span of $[ \\log ( 0 . 0 0 0 1 ) , \\log ( 1 . 0 ) ]$ with 21 way points. The actual searched parameters are 0.0001, 0.000158, 0.000251, 0.000398, 0.000631, 0.001, 0.001585, 0.002512, 0.003981, 0.00631, 0.01, 0.015849, 0.025119, 0.039811, 0.063096, 0.1, 0.158489, 0.251189, 0.398107, 0.630957, 1.0. The best found parameter for each setting is given in Table 8. ",
1850
+ "bbox": [
1851
+ 217,
1852
+ 853,
1853
+ 825,
1854
+ 924
1855
+ ],
1856
+ "page_idx": 15
1857
+ },
1858
+ {
1859
+ "type": "table",
1860
+ "img_path": "images/65a1e5cdc895600a126b4bd5c9531ed56eb443a98ff4de24862929430460e195.jpg",
1861
+ "table_caption": [
1862
+ "Table 8: Best hyperparameter for BEB "
1863
+ ],
1864
+ "table_footnote": [],
1865
+ "table_body": "<table><tr><td>Setting</td><td>Best scaling</td></tr><tr><td>n=10</td><td>0.002512</td></tr><tr><td>n=25</td><td>0.001585</td></tr><tr><td>n= 50</td><td>0.001585</td></tr><tr><td>n= 75</td><td>0.001585</td></tr><tr><td>n= 100</td><td>0.001585</td></tr></table>",
1866
+ "bbox": [
1867
+ 398,
1868
+ 127,
1869
+ 598,
1870
+ 220
1871
+ ],
1872
+ "page_idx": 16
1873
+ },
1874
+ {
1875
+ "type": "text",
1876
+ "text": "• $\\epsilon$ -Greedy: We test $\\epsilon \\in \\{ 0 . , 0 . 1 , 0 . 2 , 0 . 3 , 0 . 4 , 0 . 5 , 0 . 6 , 0 . 7 , 0 . 8 , 0 . 9 , 1 . 0 \\}$ . The best found parameter for each setting is given in Table 9. ",
1877
+ "bbox": [
1878
+ 217,
1879
+ 271,
1880
+ 825,
1881
+ 300
1882
+ ],
1883
+ "page_idx": 16
1884
+ },
1885
+ {
1886
+ "type": "table",
1887
+ "img_path": "images/2a1d99a7035596ed3d1ff605a483b0975400fad2eac9c7ee4384877ccfbe9730.jpg",
1888
+ "table_caption": [
1889
+ "Table 9: Best hyperparameter for $\\epsilon$ -Greedy "
1890
+ ],
1891
+ "table_footnote": [],
1892
+ "table_body": "<table><tr><td>Setting</td><td>Best ∈</td></tr><tr><td>n=10</td><td>0.1</td></tr><tr><td>n=25</td><td>0.1</td></tr><tr><td>n = 50</td><td>0.1</td></tr><tr><td>n =75</td><td>0.1</td></tr><tr><td>n =100</td><td>0.1</td></tr></table>",
1893
+ "bbox": [
1894
+ 418,
1895
+ 363,
1896
+ 578,
1897
+ 457
1898
+ ],
1899
+ "page_idx": 16
1900
+ },
1901
+ {
1902
+ "type": "text",
1903
+ "text": "• UCRL2: We search for the scaling factor of exploration bonus among the same values as BEB. The best found parameter for each setting is given in Table 10. ",
1904
+ "bbox": [
1905
+ 217,
1906
+ 507,
1907
+ 825,
1908
+ 536
1909
+ ],
1910
+ "page_idx": 16
1911
+ },
1912
+ {
1913
+ "type": "table",
1914
+ "img_path": "images/d0413cef66857b08968a78caa3f15c6e4f18fe7112b3a1a22717eda912137104.jpg",
1915
+ "table_caption": [
1916
+ "Table 10: Best hyperparameter for UCRL2 "
1917
+ ],
1918
+ "table_footnote": [],
1919
+ "table_body": "<table><tr><td>Setting</td><td>Best scaling</td></tr><tr><td>n=10</td><td>0.398107</td></tr><tr><td>n=25</td><td>0.398107</td></tr><tr><td>n= 50</td><td>0.398107</td></tr><tr><td>n= 75</td><td>0.398107</td></tr><tr><td>n= 100</td><td>0.398107</td></tr></table>",
1920
+ "bbox": [
1921
+ 398,
1922
+ 598,
1923
+ 598,
1924
+ 691
1925
+ ],
1926
+ "page_idx": 16
1927
+ },
1928
+ {
1929
+ "type": "text",
1930
+ "text": "C FURTHER ANALYSIS ON MULTI-ARMED BANDITS ",
1931
+ "text_level": 1,
1932
+ "bbox": [
1933
+ 173,
1934
+ 739,
1935
+ 611,
1936
+ 755
1937
+ ],
1938
+ "page_idx": 16
1939
+ },
1940
+ {
1941
+ "type": "text",
1942
+ "text": "In this section, we provide further analysis of the behavior of $\\mathrm { { R L ^ { 2 } } }$ agent in comparison with the baseline algorithms, on the multi-armed bandit task. Certain algorithms such as UCB1 are designed not in the Bayesian context; instead they are tailored to be robust in adversarial cases. To highlight this aspect, we evaluate the algorithms on a different metric, namely the percentage of trials where the best arm is recovered. We treat the best arm chosen by the policy to be the arm that has been pulled most often, and the ground truth best arm is the arm with the highest mean parameter. In addition, we split the set of all possible bandit tasks into simpler and harder tasks, where the difficulty is measured by the $\\epsilon$ -gap between the mean parameter of the best arm and the second best arm. We compare the percentage of recovering the best arm separately according to the $\\epsilon$ gap, as shown in Table 11. ",
1943
+ "bbox": [
1944
+ 173,
1945
+ 784,
1946
+ 825,
1947
+ 924
1948
+ ],
1949
+ "page_idx": 16
1950
+ },
1951
+ {
1952
+ "type": "table",
1953
+ "img_path": "images/6fd50b0651922bd594fb496c9d82101249f6d88ee9dc635b7dc805383d68ad92.jpg",
1954
+ "table_caption": [
1955
+ "Table 11: Percentage of tasks where the best arm is chosen most frequently, with $k = 5$ arms and $n = 5 0 0$ episodes of interaction. "
1956
+ ],
1957
+ "table_footnote": [],
1958
+ "table_body": "<table><tr><td> Setup</td><td></td><td>Random</td><td>Gittins</td><td>TS</td><td>OTS</td><td>UCB1</td><td>UCB1*</td><td>e-Greedy</td><td>Greedy</td><td>RL²</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>∈ ∈[0,0.01]</td><td>21.5%</td><td>51.1%</td><td>53.1%</td><td>52.8%</td><td>50.9%</td><td>56.5%</td><td>37.3%</td><td>38.3%</td><td>46.1%</td></tr><tr><td>∈∈</td><td>[0.01,0.05]</td><td>19.3%</td><td>59.5%</td><td>71.2%</td><td>67.4%</td><td>62.5%</td><td>76.3%</td><td>42.3%</td><td>41.3%</td><td>55.1%</td></tr><tr><td>ε∈</td><td>[0.05,0.1]</td><td>17.7%</td><td>71.2%</td><td>91.5%</td><td>84.0%</td><td>78.9%</td><td>94.6%</td><td>46.1%</td><td>45.7%</td><td>67.4%</td></tr><tr><td>∈∈</td><td>[0.1, 0.3]]</td><td>20.1%</td><td>92.7%</td><td>99.2%</td><td>95.3%</td><td>93.5%</td><td>99.9%</td><td>58.1%</td><td>58.4%</td><td>87.1%</td></tr><tr><td>∈∈</td><td>[0.3,0.5]</td><td>20.4%</td><td>99.6%</td><td>100.0%</td><td>99.5%</td><td>99.8%</td><td>100.0%</td><td>85.4%</td><td>84.6%</td><td>99.0%</td></tr><tr><td>∈∈</td><td>[0.5,1.0]</td><td>19.4%</td><td>100.0%</td><td>100.0%</td><td>100.0%</td><td>100.0%</td><td>100.0%</td><td>98.4%</td><td>99.1%</td><td>100.0%</td></tr></table>",
1959
+ "bbox": [
1960
+ 174,
1961
+ 146,
1962
+ 975,
1963
+ 263
1964
+ ],
1965
+ "page_idx": 17
1966
+ },
1967
+ {
1968
+ "type": "text",
1969
+ "text": "Note that there are two columns associated with the UCB1 algorithm, where UCB1 (without “∗”) is evaluated with $c = 0 . 2$ , the parameter that gives the best performance as evaluated by the average total reward, and $\\mathrm { U C B } 1 ^ { \\ast }$ uses $c = 1 . 0$ . Surprisingly, although using $c = 1 . 0$ performs the best in terms of recovering the best arm, its performance is significantly worse than using $c = 0 . 2$ when evaluated under the average total reward $( 3 6 9 . 2 \\pm 2 . 2 $ vs. $4 0 5 . 8 \\pm 2 . 2 $ ). This also explains that although $\\mathrm { { R L ^ { 2 } } }$ does not perform the best according to this metric (which is totally expected, since it is not optimized under this metric), it achieves comparable average total reward as other bestperforming methods. ",
1970
+ "bbox": [
1971
+ 173,
1972
+ 292,
1973
+ 825,
1974
+ 405
1975
+ ],
1976
+ "page_idx": 17
1977
+ },
1978
+ {
1979
+ "type": "text",
1980
+ "text": "REFERENCES ",
1981
+ "text_level": 1,
1982
+ "bbox": [
1983
+ 174,
1984
+ 426,
1985
+ 285,
1986
+ 440
1987
+ ],
1988
+ "page_idx": 17
1989
+ },
1990
+ {
1991
+ "type": "text",
1992
+ "text": "Martın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467, 2016. \nYan Duan, Xi Chen, Rein Houthooft, John Schulman, and Pieter Abbeel. Benchmarking deep reinforcement learning for continuous control. arXiv preprint arXiv:1604.06778, 2016. \nXavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Aistats, volume 9, pp. 249–256, 2010. \nVolodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy P Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. arXiv preprint arXiv:1602.01783, 2016. \nIan Osband. TabulaRL. https://github.com/iosband/TabulaRL, 2016. \nTim Salimans and Diederik P Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. arXiv preprint arXiv:1602.07868, 2016. \nAndrew M Saxe, James L McClelland, and Surya Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. arXiv preprint arXiv:1312.6120, 2013. ",
1993
+ "bbox": [
1994
+ 171,
1995
+ 449,
1996
+ 826,
1997
+ 720
1998
+ ],
1999
+ "page_idx": 17
2000
+ }
2001
+ ]
parse/train/HkLXCE9lx/HkLXCE9lx_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HkLXCE9lx/HkLXCE9lx_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/XWYJ25-yTRS/XWYJ25-yTRS.md ADDED
@@ -0,0 +1,309 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # On Calibration and Out-of-domain Generalization
2
+
3
+ Yoav Wald⇤ Johns Hopkins University yoav.wald@gmail.com
4
+
5
+ Amir Feder⇤ Technion amirfeder@gmail.com
6
+
7
+ Daniel Greenfeld Jether Energy Research danielgreenfeld3@gmail.com
8
+
9
+ Uri Shalit Technion urishalit@technion.ac.il
10
+
11
+ # Abstract
12
+
13
+ Out-of-domain (OOD) generalization is a significant challenge for machine learning models. Many techniques have been proposed to overcome this challenge, often focused on learning models with certain invariance properties. In this work, we draw a link between OOD performance and model calibration, arguing that calibration across multiple domains can be viewed as a special case of an invariant representation leading to better OOD generalization. Specifically, we show that under certain conditions, models which achieve multi-domain calibration are provably free of spurious correlations. This leads us to propose multi-domain calibration as a measurable and trainable surrogate for the OOD performance of a classifier. We therefore introduce methods that are easy to apply and allow practitioners to improve multi-domain calibration by training or modifying an existing model, leading to better performance on unseen domains. Using four datasets from the recently proposed WILDS OOD benchmark $\mathbb { \left[ \left[ 2 3 \right] \right] }$ , as well as the Colored MNIST dataset $\pmb { \mathbb { D } }$ , we demonstrate that training or tuning models so they are calibrated across multiple domains leads to significantly improved performance on unseen test domains. We believe this intriguing connection between calibration and OOD generalization is promising from both a practical and theoretical point of view.
14
+
15
+ # 1 Introduction
16
+
17
+ Machine learning models have recently displayed impressive success in a plethora of fields [19, 9, 41]. However, as models are typically only trained and tested on in-domain (ID) data, they often fail to generalize to out-of-domain (OOD) data $\mathbb { \left[ \left. 2 3 \right] \right. }$ . The problem is especially pressing when deploying machine learning models in the wild, where they are required to perform well under conditions that were not observed during training. For instance, a medical diagnosis system trained on patient data from a few hospitals could fail when deployed in a new hospital.
18
+
19
+ Many methods have been proposed to improve the OOD generalization of machine learning models. Specifically, there is rapidly growing interest in learning models that display certain invariance properties under distribution shifts and do not rely on spurious correlations in the training data [34, 17, 1]. While highlighting the need for learning robust models, so far these attempts have limited success scaling to realistic high-dimensional data, and in learning truly invariant representations $\pm \infty , \boxed { 3 7 } \boxed { 1 1 } \boxed { 2 0 }$ .
20
+
21
+ In this paper, we argue that an alternative and relatively simple approach for learning invariant representations could be achieved through model calibration across multiple domains. Calibration asserts that the probabilities of outcomes predicted by a model match their true probabilities. Our claim is that simultaneous calibration over several domains can be used as an observable indicator for favorable performance on unseen domains. For example, if we take all patients for whom a classifier outputs a probability of 0.9 for being ill, and in one hospital the true probability of illness in these patients is 0.85 while in the other it is 0.95, then we may suspect the classifier relies on spurious correlations. Intuitively, the features which lead the classifier to predict a probability of 0.9 imply different results under different experimental conditions, suggesting that their correlation with the label is potentially unstable. Conversely, if the true probabilities in both hospitals match the classifier’s output, it may be a sign of its robustness.
22
+
23
+ Our contributions are as follows: We prove that in Gaussian-linear models, under a general-position condition, being concurrently calibrated across a sufficient number of domains guarantees a model has no spurious correlations. We then introduce three methods for encouraging multi-domain calibration in practice. These are, in ascending order of complexity: (i) model selection by a multi-domain calibration score, (ii) robust isotonic regression as a post-processing tool, and (iii) directly optimizing deep nets with a multi-domain calibration objective, based on the method introduced by Kumar et al. [26]. We show that multi-domain calibration achieves the correct invariant classifier in a learning scenario presented by Kamath et al. $\pmb { \mathbb { Z } } 0 \|$ , unlike the objective proposed in Invariant Risk Minimization [1]. Finally, we demonstrate that the proposed approaches lead to significant performance gains on the WILDS benchmark datasets $\mathbb { \left[ \left. 2 3 \right] \right. }$ , and also succeed on the colored MNIST dataset $[ [ 2 1 ] ]$ .
24
+
25
+ # 2 Calibration and Invariant Classifiers
26
+
27
+ # 2.1 Problem Setting
28
+
29
+ Consider observable features $X$ , a label $Y$ and an environment (or domain) $E$ with sample spaces $\mathcal { X } , \mathcal { Y } , \mathcal { E }$ accordingly. We mostly focus on regression and binary classification, therefore $\mathcal { V } = \mathbb { R }$ or $\mathcal { V } = \{ 0 , 1 \}$ . To lighten notation, our definitions will be given for the binary classification setting and we will point out adjustments to regression where necessary. There is no explicit limitation on $| \mathcal { E } |$ , but we assume that training data that has been collected from a finite subset of the possible environments $E _ { \mathrm { t r a i n } } \subset \mathcal { E }$ . The number of training environments is denoted by $k$ , and $E _ { \mathrm { t r a i n } } \stackrel { \cdot } { = } \{ e _ { i } \} _ { i = 1 } ^ { k } \subset \mathcal { E }$ , so that our training data is sampled from a distribution $P [ X , Y \mid E = e _ { i } ] \quad \forall i \in [ k ]$ . Our goal is to learn models that will generalize to new, unseen environments in $\mathcal { E }$ .
30
+
31
+ Ideally, we would like to learn a classifier that is optimal for all environments $\mathcal { E }$ . Unfortunately, we only observe data from the limited set $E _ { \mathrm { t r a i n } }$ and even if this set is extremely large, the Bayes optimal classifiers on each environment do not necessarily coincide. Following other recent work [34, 17, 1] we therefore aim for a different goal – learning classifiers whose per-instance output will be stable across environments $E$ , as we explain below.
32
+
33
+ We assume the data generating process for $E , X , Y$ follows the causal graph in Figure 1. 2 We differentiate between causal and anti-causal components of $X$ , and further differentiate between the anti-causal variables which are affected or unaffected by $E$ , denoted as $X _ { \mathrm { a c } }$ -spurious and $X _ { \mathrm { a c } }$ -non-spurious, respectively. As an illustrative example, consider again predicting illness across different hospitals. When predicting lung cancer, $Y$ , from patient health records, $X _ { \mathrm { c a u s a l } }$ could be features like smoking. $X _ { \mathrm { a c } }$ -non-spurious are symptoms of $Y$ such as infections that appear in chest $\mathbf { X }$ -rays, while $X _ { \mathrm { a c } }$ -spurious can be marks that technicians put on $\mathbf { X }$ -rays as in $\pmb { \mathbb { B } } \mathbf { \mathbb { 1 } }$ . Smoking habits may vary across hospital populations, as might $\mathrm { X }$ -ray markings; but the influence of smoking on cancer and the manifestation of cancer in an $\mathbf { X }$ -ray do not vary by hospital.
34
+
35
+ We do not assume to know how to partition $X$ into $X _ { \mathrm { c a u s a l } }$ , $X _ { \mathrm { a c } }$ -spurious, $X _ { \mathrm { a c } }$ -non-spurious. The main assumptions made in the causal graph in Fig. $\mathbb { L }$ are that there are no hidden variables, and that there is no edge directly from environment $E$ to the label $Y$ . Such an arrow would imply the conditional distribution of $Y$ given $X$ can be arbitrarily different in an unseen environment $E$ , compared to those present in the training set. Note that for simplicity we do not include arrows from $X _ { \mathrm { c a u s a l } }$ to $X _ { \mathrm { a c } }$ -spurious and $X _ { \mathrm { a c } }$ -non-spurious but they may be included as well.
36
+
37
+ ![](images/215910095755bb14f148742ead95b8467633b63fa6515badd905915768da4211.jpg)
38
+ Figure 1: Learning in the presence of causal and anti-causal features. Anti-causal features can be either spurious $( X _ { \mathrm { a c - s p u r i o u s } } )$ , or non-spurious ( $X _ { \mathrm { a c } }$ -non-spurious).
39
+
40
+ We will say a representation $\Phi ( X )$ contains a spurious
41
+ correlation with respect to the environments $E$ and label $Y$ , if $Y$ $\mid \chi \mid \Phi ( X )$ ; this motivates our naming of $X _ { \mathrm { a c } }$ -spurious and $X _ { \mathrm { a c } }$ -non-spurious in Fig. 1, as $Y \not \perp E \mid$ $X _ { \mathrm { a c } }$ -spurious but $Y \perp \perp E \mid$ $X _ { \mathrm { a c } }$ -non-spurious. Similar observations have been made by $\mathbb { E A } \mathbb { I I }$ . Having a spurious correlation implies that the relation between $\Phi ( X )$ and $Y$ depends on the environment – it is not transferable nor stable across environments. In this work we will simply consider the output $f ( X )$ of a classifier $f : \mathcal { X } \to [ 0 , 1 ]$ as a representation. The crux of this paper is the observation that having $\mathbb { E } [ Y \mid f ( X ) , E = e ] \overset { \cdot } { = } f ( X )$ for every value of $E$ , i.e. $f$ being a calibrated classifier across all environments, is equivalent up-to a simple transformation to having $Y \perp \perp E \mid f ( X )$ , and thus to $f$ having no spurious correlations with respect to $E$ . We prove this assertion in section $2 . 2 ,$ and as a demonstration of this principle we prove (section $\textcircled { 3 }$ that linear models which are calibrated across a diverse set of environments $E$ are guaranteed to discard $X _ { \mathrm { a c } }$ -spurious as viable features for prediction.
42
+
43
+ # 2.2 Invariance and Calibration on Multiple Domains
44
+
45
+ We define calibration, along with a straightforward generalization to the multiple environment setting.
46
+
47
+ Definition 1. Let $P [ X , Y ]$ be a joint distribution over the features and label, and $f : \mathcal { X } \ \to$ $[ 0 , 1 ]$ a classifier. Then $\bar { f } ( { \bf x } )$ is calibrated w.r.t to $P$ if for all $\alpha ~ \in ~ [ 0 , 1 ]$ in the range of $f$ , $\dot { \mathbb { E } } _ { P } [ \dot { Y } \mid f ( X ) = \alpha ] = \alpha$ . In the multiple environments setting, $f ( \mathbf { x } )$ is calibrated on $E _ { t r a i n }$ if for all $e _ { i } \in E _ { t r a i n }$ and $\alpha$ in the range of $f$ restricted to $e _ { i }$ , $\mathbb { E } [ Y \mid f ( X ) = { \overset { } { \alpha } } , E = e _ { i } ] = \alpha$ .
48
+
49
+ For regression problems, we consider regressors that output estimates for the mean and variance of $Y$ , and say they are calibrated if they match the true values similarly to the definition above. The precise definition can be found in the supplementary material.
50
+
51
+ We now tie the notion of calibration on multiple environments with OOD generalization, starting with its correspondence with our definition of spurious correlations. Recall that a representation $\Phi ( X )$ does not contain spurious correlations if $Y \perp \perp E \mid \Phi ( X )$ . Treating the output $f ( { \bar { X } } )$ of a classifier as a representation of the data, and considering classifiers satisfying the above conditional independence with respect to training environments, we arrive at a definition of an invariant classifier.
52
+
53
+ Definition 2. Let $f : \mathcal { X } [ 0 , 1 ]$ . $f$ is an invariant classifier w.r.t $E _ { t r a i n }$ if for all $\alpha \in [ 0 , 1 ]$ and environments $e _ { i } , e _ { j } \in E _ { t r a i n }$ , where $\alpha$ is in the range of $f$ restricted to each of them:
54
+
55
+ $$
56
+ \mathbb { E } [ Y \mid f ( X ) = \alpha , E = e _ { i } ] = \mathbb { E } [ Y \mid f ( X ) = \alpha , E = e _ { j } ] .
57
+ $$
58
+
59
+ Lemma $\bigtriangledown$ gives the correspondence between invariant classifiers and classifiers calibrated on multiple environments. The proof is in Section $\boxed { \mathbf { A . 1 } }$ of the supplementary material.
60
+
61
+ Lemma 1. If a binary classifier $f$ is invariant w.r.t $E _ { t r a i n }$ , then there exists some $g : \mathbb { R } [ 0 , 1 ]$ such that (i) $g \circ f$ is calibrated on all training environments, and (ii) the mean squared error of $g \circ f$ on each environment does not exceed that of $f$ . On the other hand, if a classifier is calibrated on all training environments it is also invariant w.r.t $E _ { t r a i n }$ .
62
+
63
+ Now, we can note how the above notion of invariance relates to that of Invariant Risk Minimization [1], where invariance of a representation $\Phi : \mathcal { X } \to \mathcal { H }$ is linked to a shared classifier $\mathbf { w } ^ { * } : \mathcal { H } [ 0 , 1 ]$ , $\mathbf { w } ^ { * } \circ \Phi$ being optimal on all environments w.r.t a loss $l : [ 0 , 1 ] \times \mathcal { Y } \mathbb { R } _ { \ge 0 }$ . Under the representation $\Phi ( X ) = f ( X )$ , and the cross-entropy or squared losses it turns out that the original IRM definition coincides with Equation $\textcircled { 1 } \textcircled { 3 }$ Hence we aim for a similar notion of conditional independence, yet we approach it from the point-of-view of calibration. In Section $5$ we will see that taking this approach leads to different methods that are highly effective in achieving and assessing invariance. We further note that the original IRM objective was deemed too difficult to optimize by the original IRM authors, leading them to propose an alternative called IRMv1. This alternative however does not capture the full set of required invariances, as shown by $\pmb { \mathbb { Z } } 0 \|$ , whereas we show in section $6 . 1$ that multi-domain calibration does indeed capture the required invariances.
64
+
65
+ Having established the connection between calibration on multiple environments and invariance, there are several interesting questions and points to consider:
66
+
67
+ Calibration and sharpness. Calibration alone is not enough to guarantee that a classifier performs well; on a single environment, always predicting $\mathbb { E } [ Y ]$ will give a perfectly calibrated classifier.
68
+
69
+ Hence, multi-domain calibration should be combined with some sort of guarantee on accuracy. In the calibration literature, this is often referred to as sharpness. To this end, in Section $\boxed { 5 }$ we will propose regularizing models during training or fine-tuning with Calibration Loss Over Environments (CLOvE). Combining this regularizer with standard empirical loss functions helps balance between sharpness and multi-domain calibration. Even without training a new model, we will propose methods for model selection and post-processing that are very easy to apply and help improve multi-domain calibration without a significant effect on the sharpness of the models.
70
+
71
+ Generalization and dependence on $X _ { \mathbf { a c } }$ -spurious. Suppose that $f ( X )$ is calibrated on $E _ { \mathrm { t r a i n } }$ . Under what conditions does this imply it is calibrated on $\mathcal { E } ?$ It is easy to show that calibration on several environments entails calibration on any distribution which can be expressed as a linear combination of the distributions underlying said environments. However, can we go beyond that? Given a general set $\mathcal { E }$ we would like to know what conditions and how many training environments are required for calibration to generalize. We also wish to understand when does calibration over a finite set of training environments indeed guarantee that a classifier is free of spurious correlations. We now turn to answer these questions in the setting of linear-Gaussian models.
72
+
73
+ # 3 Motivation: a Linear-Gaussian Model
74
+
75
+ Let us consider data where $X$ is a multivariate Gaussian. Since we will be considering Gaussian data, the set of all environments $\mathcal { E }$ will be parameterized using pairs of real vectors expressing expectations and positive definite matrices of an appropriate dimension expressing covariances: $\mathcal { E } = \{ ( \mu , \Sigma ) | \mu \in \mathbf { \bar { \mathbb { R } } } ^ { d } , \Sigma \in \mathbb { S } _ { + + } ^ { d } \}$ .
76
+
77
+ For two scenarios ((a) and (b) in Figure 2) we prove that when provided with data from $k$ training environments, where $k$ is linear in the number of features, and the environments satisfy some mild non-degeneracy conditions, any predictor that is calibrated on all training environments will not rely on any of the spurious features $X _ { \mathrm { a c - s p } }$ , and will also be calibrated on all $e \in { \mathcal { E } }$ .
78
+
79
+ In scenario (a), we take $Y$ to be a binary variable drawn from a Bernoulli distribution with parameter $\eta ~ \in ~ [ 0 , 1 ]$ , and observed features are generated conditionally on $Y$ . The features $\mathbf { x } _ { \mathrm { a c - n s } } \in \mathbb { R } ^ { d _ { \mathrm { n s } } }$ are invariant, meaning their conditional distribution given $Y$ is the same for all environments, whereas $\mathbf { x } _ { \mathrm { a c - s p } } \in \mathbb { R } ^ { d _ { \mathrm { s p } } }$ are spurious features, as their distribution may shift between environments, altering their correlation with $Y$ . The data generating process for training environment $i \in [ k ]$ in Fig. 2(a) is given by:
80
+
81
+ ![](images/c9c54db752d444327430318d78a4ec77b180334540e8a60876eb085d031a1780.jpg)
82
+ Figure 2: Graphs describing our theoretical analysis. Features are: (a) anti-causal, some spurious while others invariant. (b) causal and may undergo covariate shift, or anti-causal and spurious.
83
+
84
+ $$
85
+ y = \left\{ { \begin{array} { l l } { 1 } & { \mathsf { w . p } \ \eta } \\ { 0 } & { \mathsf { o . w } } \end{array} } \right.
86
+ $$
87
+
88
+ $$
89
+ \begin{array} { r l } & { X _ { \mathrm { a c - n s } } \mid Y = y \sim { \mathcal N } \left( ( y - 1 / 2 ) \mu _ { \mathrm { n s } } , \Sigma _ { \mathrm { n s } } \right) , } \\ & { X _ { \mathrm { a c - s p } } \mid Y = y \sim { \mathcal N } \left( ( y - 1 / 2 ) \mu _ { i } , \Sigma _ { i } \right) . } \end{array}
90
+ $$
91
+
92
+ For $\mathbf { x } = [ \mathrm { { x } _ { a c - n s } } , \mathrm { { x } _ { a c - s p } } ]$ we consider a linear classifier $f ( \mathbf { x } ; \mathbf { w } , b ) = \sigma ( \mathbf { w } ^ { \top } \mathbf { x } + b )$ , where $\sigma : \mathbb { R } [ 0 , 1 ]$ is some invertible function (e.g. a sigmoid). Since the mean of spurious features, $\mu _ { i }$ , is determined by $y$ , these features can help predict the label in some environments. Yet, these correlations do not carry to all environments, and $f ( \mathbf { x } )$ might rely on spurious correlations whenever the coefficients in w corresponding to $\mathbf { x } _ { \mathrm { a c - s p } }$ are non-zero. Any such classifier can suffer an arbitrarily high loss in an unseen environment, because a new environment can reverse and magnify the correlations observed in $E _ { \mathrm { t r a i n } }$ . Using these definitions, we may now state our result for this case:
93
+
94
+ Theorem 1. Given $k > 2 d _ { s p }$ training environments where data is generated according to Equation ( with parameters $\{ \mu _ { i } , \Sigma _ { i } \} _ { i = 1 } ^ { k }$ , we say they lie in general position if for all non-zero $\mathbf { x } \in \mathbb { R } ^ { d _ { s p } }$ :
95
+
96
+ $$
97
+ \dim \left( \operatorname { s p a n } \left\{ \left[ { \sum _ { i } \mathbf { x } + \mu _ { i } } \right] \right\} _ { i \in [ k ] } \right) = d _ { s p } + 1 .
98
+ $$
99
+
100
+ If a linear classifier is calibrated on $k$ training environments which lie in general position, then its coefficients for the features $\mathbf { x } _ { a c - s p }$ are zero. Moreover, the set of training environments that do not lie in general position has measure zero in the set of all possible training environments $\mathcal { E } ^ { k }$ .
101
+
102
+ As a corollary, we see that calibration on training environments generalizes to calibration on $\mathcal { E }$ . The proof of this theorem is given in the supplementary material, Section $\mathbf { A . } 4 .$ The data generating process closely resembles the one considered by $\pmb { \mathbb { B 7 } }$ , who use diagonal covariance matrices.
103
+
104
+ In the second scenario we consider the addition of causal features subject to covariate shift $\mathbf { x } _ { \mathrm { c } } \in \mathbb { R } ^ { d _ { \mathrm { c } } }$ , as shown in Figure $2 \mathsf { b }$ . The covariate shift is induced when the environments $E$ alter the distribution of the causal features $\mathbf { x } _ { \mathrm { c } }$ [40]. In this case, we analyze a regression problem since it is amenable to exact analysis. The data generating process for training environment $i \in [ k ]$ is:
105
+
106
+ $$
107
+ X _ { c } \sim \mathcal { N } ( \mu _ { i } ^ { c } , \Sigma _ { i } ^ { c } ) ; Y = { \mathbf { w } _ { c } ^ { * } } ^ { \top } \mathbf { x } _ { c } + \xi , \xi \sim \mathcal { N } ( 0 , \sigma _ { y } ^ { 2 } )
108
+ $$
109
+
110
+ $$
111
+ X _ { \mathrm { a c - s p } } = y \mu _ { i } + \eta , \eta \sim { \mathcal N } ( \mathbf { 0 } , \Sigma _ { i } ) .
112
+ $$
113
+
114
+ For $\mathbf { x } = [ \mathbf { x } _ { c } , \mathbf { x } _ { \mathrm { a c - s p } } ]$ it turns out that in this case, calibration on multiple domains forces $f ( \mathbf { x } )$ to discard $\mathbf { x } _ { \mathrm { a c - s p } }$ , but also forces it to use $\mathbf { w } _ { c } ^ { * }$ , since it characterizes $P ( \boldsymbol { Y } \mid \mathbf { x } _ { c } )$ which is the invariant mechanism in this scenario. The exact statement and proof are in Section $\mathbf { A } . 5$ of the supplement.
115
+
116
+ Theorem 2 (informal). Let $f ( \mathbf { x } ; \mathbf { w } ) \ = \ \mathbf { w } ^ { \top } \mathbf { x }$ be a linear regressor and assume we have $k \mathrm { ~ > ~ }$ max $\{ d _ { c } + 2 , d _ { s p } \}$ training environments where data is generated according to Equation $\textcircled { \scriptsize { 1 3 } }$ . Under mild non-degeneracy conditions, if the regressor is calibrated across all training environments then the coefficients corresponding to $X _ { c }$ equal $\mathbf { w } _ { c } ^ { * }$ and those that correspond to $X _ { a c - s p }$ are zero.
117
+
118
+ Together, these results show calibration can generalize across environments, given that the number of environments is approximately that of the spurious features. They also show that for the settings above, the relatively stable and well-known notion of calibration implies avoiding spurious correlations.
119
+
120
+ # 4 Related Work
121
+
122
+ As discussed in Section $^ { 2 , }$ multi-domain calibration is an instance of an invariant representation [1]. Many extensions to the above work have been proposed, e.g. [24, 3]. Yet, recent work claims that many of these approaches still fail to find invariant relations in cases of interest $\mathbb { P } \mathbb { 0 } , \mathbb { B } \mathbb { 1 } \mathbb { B } \mathbb { 1 }$ , where a significant challenge seems to be the gap between what is achieved by the regularization term used in practice and the goal of conditional independence $Y \perp \perp E \mid \Phi ( X )$ . Gulrajani et al. [11] give a sobering view on methods for OOD generalization, emphasizing the power of ERM and data augmentation, and the challenge of model selection. We claim that compared to the above approaches, multi-domain calibration studied here is a simpler form of invariance. Furthermore, calibration is attractive because there are standard tools to quantify it such as calibration scores $\textcircled { \scriptsize { 1 3 1 } }$ and a vast literature on its properties and how it can be obtained [50, 47, 30, 26, 45, 14, 36].
123
+
124
+ Learning models which generalize OOD is a fruitful area of research with many recent developments. Most work focuses on the case of Domain Adaptation where unlabeled samples are available from the target domain, including recent work on OOD calibration $[ \overline { { | 4 8 | } }$ . However, important work has also been done on the area of our focus – the so-called “proactive” case $\lVert \boldsymbol { \overline { { 4 3 } } } \rVert$ , where no OOD samples are available whatsoever [28, 17, 38, 34, 39].
125
+
126
+ Calibration also plays an important role in uncertainty estimation for deep networks $\mathbb { \lVert 1 2 \rVert }$ , and recently in fairness, where calibration on subgroups of populations is sought $[ \textcircled { 3 5 } ]$ . This has interesting resemblance to the multiple environments calibration we consider here. A more general notion of multi-calibration has also been studied in this context $\mathbb { \lVert 1 6 \rVert }$ , with recent results on sample complexity [42] which may provide tools to finite sample analysis of domain generalization. Finally, multiple methods for training calibrated models $\boxed { 2 6 } \boxed { 2 9 } \boxed { 3 6 }$ have also been proposed. In Section 5 we propose a generalization of $\overline { { \mathbb { B } 6 } }$ to the multi-domain case to achieve multi-domain calibration.
127
+
128
+ # 5 Proactively Achieving Multi-Domain Calibration
129
+
130
+ So far we have seen a general argument why calibration can limit spurious correlations, and that in linear-Gaussian models multi-domain calibration guarantees OOD generalization. Now we turn to a more applied perspective and show how can we optimize models so they achieve this type of calibration in practice. We propose three approaches: (1) using calibration measures for model selection, (2) post-processing calibration, and (3) a calibration objective building on a method proposed by $\bar { \left\| 2 6 \right\| }$ . Section $\bar { \mathbf { A . l } }$ in the supplementary provides a slightly broader introduction to notions we use here. We will assess model calibration by the Expected Calibration Error $( E C E )$ of the calibration curve $\mathbb { \left[ \bigcirc \right] }$ , which is the average deviation between model accuracy and model confidence.
131
+
132
+ # 5.1 Model selection with average ECE
133
+
134
+ Model selection is challenging when aimed at OOD generalization. As recently observed by [11], since OOD accuracy is often at odds with In-Domain (ID) accuracy, selection based on ID validation error eliminates the advantage of domain generalization methods over vanilla ERM with data augmentation. We suggest that model selection towards OOD generalization should balance ID validation error with another observable surrogate for the stability of a model to distribution shifts between domains. Motivated by multi-domain calibration, we propose using the average ECE across training environments as this surrogate. Concretely, we propose choosing a model with lowest average ECE from those obtaining ID validation accuracy that is above a certain user-defined threshold.
135
+
136
+ # 5.2 Post-Processing Calibration
137
+
138
+ Practitioners interested in (single-domain) calibrated models often apply post-processing calibration methods to binary classifiers, where the most widely used approach is Isotonic Regression Scaling $\textcircled { 1 5 0 } , \textcircled { 3 0 } \textcircled { 1 }$ . Unlike standard calibration problems, in our case there are multiple domains to calibrate over. We give two ways of extending Isotonic Regression to the multi-domain setting, which we term “naive calibration” and “robust calibration”. Naive Calibration takes predictions of a trained model $f$ on validation data pooled from all domains and fits an isotonic regression $z ^ { * }$ . We then report the performance of $z ^ { * } \circ f$ on the OOD test set.
139
+
140
+ Robust Calibration: In a multiple domain setting, Naive calibration may produce a model that is well calibrated on the pooled data, but uncalibrated on individual environments. Since our goal is simultaneous calibration, the following alternative attempts to bound the worst-case miscalibration across training environments. For each environment $e \in E _ { \operatorname { t r a i n } }$ , we denote the number of validation examples we have from it by $N _ { e }$ , and by $f _ { e , i }$ the prediction of the model on the $i$ -th example. Then in a similar vein to robust optimization, we fit an isotonic regressor that solves: $z ^ { * } = \underset { z } { \arg \operatorname* { m i n } } \ \underset { e \in E _ { \mathrm { t r a i n } } } { \operatorname* { m a x } } \ \frac { 1 } { N _ { e } } \sum _ { i = 1 } ^ { N _ { e } } { ( z ( f _ { e , i } ) - y _ { i } ) ^ { 2 } }$ . Since Isotonic Regression can be formulated as a quadratic program, and Equation $( 5 . 2 )$ minimizes a pointwise maximum over such objectives, we can cast Eq. $5 . 2$ as a convex program and solve with standard optimizers. We then evaluate the OOD performance of $z ^ { * } \circ f$ .
141
+
142
+ # 5.3 Learning with Multi-Domain Calibration Error
143
+
144
+ The above model selection and post-processing methods are easy to apply and (as we will soon see) surprisingly effective. However, both are limited in their power to learn a model that is truly well-calibrated across multiple domains. We now propose a more powerful approach: an objective function that directly penalizes calibration errors on multiple domains during training. Specifically, we propose learning a parameterized classifier $f _ { \boldsymbol { \theta } } ( \mathbf { x } )$ using a learning rule of the form: $\begin{array} { r } { \operatorname* { m i n } _ { \theta } \sum _ { e \in E _ { \mathrm { t r a i n } } } { l ^ { e } ( f _ { \theta } ) + \lambda \cdot \bar { r } ( f _ { \theta } ) } } \end{array}$ , where $l : \mathbb { R } \times \mathbb { R } \to \mathbb { R }$ is an empirical loss function (e.g. crossentropy) and $l ^ { e } ( f _ { \theta } )$ denotes the expected loss over data from training environment $e$ , and $r ( f _ { \theta } )$ is a regularization term over multiple environments. Using this notation the method proposed by [1] learns a classifier $f = w \circ \Phi$ with a regularizer given by $\begin{array} { r } { r ( f ) = \sum _ { e \in E _ { \mathrm { t r a i n } } } r _ { \mathrm { I R M v 1 } } ^ { e } ( \bar { f } ) } \end{array}$ , where $r _ { \mathrm { I R M v 1 } } ^ { e } ( f ) = \lVert \nabla _ { w | w = 1 } l ^ { e } ( w \cdot \Phi ) \rVert ^ { 2 } \mathrm { . }$
145
+
146
+ Our proposed regularizer $r ( f _ { \theta } )$ is based on the work of Kumar et al. $\left[ \left[ 2 6 \right] \right]$ , who introduce a method they call Maximum Mean Calibration Error (MMCE). MMCE harnesses the power of universal kernels to express the ECE as an Integral Probability Measure, and works as follows: For a dataset $D = \{ \mathbf { x } _ { i } , y _ { i } \} _ { i = 1 } ^ { m }$ , denote the confidence of a classifier on the $i$ -th example by $f _ { \theta ; i } = \operatorname* { m a x } \{ f _ { \theta } ( x _ { i } ) , 1 -$ $f _ { \boldsymbol { \theta } } ( x _ { i } ) \}$ and its correctness by $c _ { i } = \mathbb { 1 } _ { | y _ { i } - f _ { \theta ; i } | < \frac { 1 } { 2 } }$ . For a given universal kernel $k : \mathbb { R } \times \mathbb { R } \to \mathbb { R }$ MMCE over the dataset $D$ is given by: $\begin{array} { r } { r _ { \mathrm { M M C E } } ^ { D } ( f _ { \theta } ) = \frac { 1 } { m ^ { 2 } } \sum _ { i , j \in D } { ( c _ { i } - f _ { \theta ; i } ) ( c _ { j } - f _ { \theta ; j } ) k ( f _ { \theta ; i } , f _ { \theta ; j } ) } . } \end{array}$ Calibration Loss Over Environments (CLOvE). Given multiple training domains with a dataset $D ^ { e }$ $e \in E _ { \operatorname { t r a i n } }$ at our proposed regularizer by aggregating MMCE over them:. A key property of CLOvE is that its minima correspond to rCLOvE(f✓) = P e2Etrain r
147
+ perfectly calibrated classifiers over all training domains, a consequence of the correspondence between MMCE and perfect calibration.
148
+
149
+ Corollary 1 (of Thm. 1 in $\pmb { \mathbb { D } } \pmb { 6 } \|$ ). CLOvE is a proper scoring rule. That is, it equals 0 if and only if $f _ { \boldsymbol { \theta } } ( \mathbf { x } )$ is perfectly calibrated for every $e \in E _ { t r a i n }$ .
150
+
151
+ Additional properties of CLOvE, such as large deviation bounds and relation to ECE, can also be derived; see results in $\left[ \left[ 2 6 \right] \right]$ for further details. In the following section, we will see how these properties translate into favorable OOD generalization in practice when training with CLOvE.
152
+
153
+ # 6 Experiments and Results
154
+
155
+ # 6.1 Colored MNIST and Two-Bit Environments
156
+
157
+ In order to explore the challenges of OOD generalization and how they relate to learning from multiple environments, $\mathbb { n }$ used the colored MNIST dataset $\scriptstyle { \left\| { \overline { { 2 1 } } } \right\| }$ . In this dataset certain digits tend to be colored either red or green in the train set, but the correlation between colors and digits is flipped in the OOD test set, making color a spurious feature. This dataset was then further simplified into “Two-Bit” environments by $\bar { [ 2 0 ] }$ , who proved that the IRMv1 penalty proposed in $\mathbb { I I }$ does not in fact achieve the correct invariant solution on the simplified setting. The Two-Bit environments problem setting has two binary features, $X _ { 1 } , X _ { 2 } \in \{ - 1 , 1 \}$ , corresponding respectively to digit identity $( 0 - 4$ or $5 - 9 )$ and digit color in the original colored MNIST. The environments are parameterized by $e = ( \alpha , \beta ) \in [ 0 , 1 ] ^ { 2 }$ controlling the correlation of the features with the label:
158
+
159
+ $Y \gets \mathrm { R a d } ( 0 . 5 )$ , $\mathbf { \bar { \phi } } _ { X _ { 1 } } Y \cdot \mathbf { \bar { R a d } } ( \alpha ) , X _ { 2 } Y \cdot \mathbf { R a d } ( \beta )$ , where $\operatorname { R a d } ( \delta )$ is a random variable equal to $- 1$ with probability $\delta$ and 1 with probability $1 - \delta$ . At training we are given data from two environments ${ e _ { 1 } = ( \alpha , \beta _ { 1 } ) , e _ { 2 } = ( \alpha , \beta _ { 2 } ) }$ , $\beta _ { 1 } \neq \beta _ { 2 }$ . The learned model is tested on a new environment $e _ { 3 } = ( \alpha , \beta _ { 3 } )$ with $\beta _ { 3 }$ significantly different from $\beta _ { 1 } , \beta _ { 2 }$ . Only a model discarding the spurious feature $X _ { 2 }$ will maintain its accuracy moving from train to OOD test.
160
+
161
+ Calibration discards spurious correlation in Two-Bit environments. Figure $3 ( \mathrm { a } )$ , which we adapt from Figure 6 in Appendix B of $\left[ \left[ 2 0 \right] \right]$ , illustrates the merits of CLOvE in this setting. The figure shows the space of odd classifiers, i.e. those for which $f ( 1 , - 1 ) = - f ( - 1 , 1 )$ , and $f ( 1 , 1 ) = - f ( - 1 , - 1 ) . ^ { 4 }$ The true invariant classifiers are those for which in addition $f ( 1 , 1 ) = f ( 1 , - 1 )$ , corresponding to models lying on the diagonal of Figure $3 ( \mathrm { a } )$ , denoted by the dashed gray line. In the figure, we plot in solid lines the classifiers for which $r _ { \mathrm { I R M v 1 } } ^ { e ^ { - } } ( f )$ equals 0, and in solid circles the classifiers for which $r _ { \mathrm { M M C E } } ^ { e } ( f )$ equals 0 (due to Corollary $^ 1$ these coincide with calibrated classifiers on environment $e$ ). MMCENote that in this parameterization, the zeros of $r _ { \mathrm { I R M v 1 } } ^ { e } ( f )$ are lines whereas the zeros of $r _ { \mathrm { M M C E } } ^ { e } ( f )$ are isolated points. Intersections of the zeros of $r _ { \mathrm { I R M v 1 } } ^ { e } ( f )$ denote solutions for which the corresponding regularization terms are 0 on all respective environments, while intersection of zeros of $r _ { \mathrm { M M C E } } ^ { \bar { e } } ( \bar { f } )$ are the zeros of . As observed by , when the solution denoted by $\mathrm { O P T _ { I R M v 1 } }$ has the lowest empirical loss, yet this solution has a spurious correlation with $X _ { 2 }$ and thus will incur a higher loss on the test environment $e _ { 3 }$ . This means the corresponding IRMv1 learning rule cannot retrieve the optimal invariant classifier. On the other hand, learning with CLOvE does retrieve the optimal invariant classifier in this case, in addition to the trivial, constant classifier. This means CLOvE discards spurious correlations in cases where IRMv1 does not. In Section $\mathbf { C }$ we present experiments reproducing the above scenario on the Colored MNIST dataset.
162
+
163
+ Model selection based on average ECE We train models with varying hyperparameters on Colored MNIST using ERM, CLOvE and IRM, (100 models with each algorithm, see Section $\mathbf { C }$ of the supplement for details). We then calculate the ECE and IRMv1 penalties of each model over a held-out validation set from each training environment, and evaluate the average of these against OOD accuracy. Figure $3 ( \boldsymbol { \mathbf { b } } )$ presents the results across all trained models. The ID ECE penalty displays a very strong correlation across the entire range and every training regime (Pearson corr. $= - 0 . 9 2 $ ), while ID IRMv1 behaves more erratically (Pearson corr. $= - 0 . 5 9$ ). Since quantities used for model selection should be agnostic to choices made at training time, we suggest that ID ECE is a better choice for use in model selection. Further results on model selection can be found in the supplement, Section C.
164
+
165
+ # 6.2 WILDS Benchmarks
166
+
167
+ WILDS is a recently proposed benchmark of in-the-wild distribution shifts from several data modalities and applications5. Table $^ 1$ presents the four WILDS datasets we experiment with, chosen to represent diverse OOD generalization scenarios. We follow the models and training algorithms proposed by $\mathbb { \left[ \left. 2 3 \right] \right. }$ . In order to perform multi-domain calibration we modify the splits to include a multi-domain validation set whenever possible. See supplemental Section $\mathbf { B }$ for details and for additional results on Amazon Reviews. As in $\mathbb { \left| \left[ 2 3 \right] \right| }$ , we use three different training algorithms to train our models: ERM, IRM, DeepCORAL, and further use GroupDRO for one of the datasets, compatible with WILDS version 1.0.0. We apply three calibration approaches described in $\underline { { \overline { { 5 . 2 } } } }$ and $\underline { { \boldsymbol { \sqrt { 5 . 3 } } } }$ above to each trained model: naive calibration and robust calibration, which are post-processing methods and therefore applied on the models’ outputs; and CLOvE, which we apply as a fine-tuning approach to the top layers of each trained model. We train each (algorithm $\times$ calibration) combination four times with different random seeds, and report average results and their standard deviations.
168
+
169
+ ![](images/819cb5b3e9be70a1d93ad163d736a774f5480c3e1dc8cb1009c24053abc332b0.jpg)
170
+ Figure 3: (a) Zeros of MMCE and IRMv1 are indicated by circles and by solid lines respectively, in a color corresponding to each environment. The dashed diagonal is the space of invariant solutions. Some zeros intersect across environments, and these are therefore the domain-invariant solutions. Among the domain-invariant solutions, $\mathrm { O P T _ { I R M v 1 } }$ has the lowest empirical loss when training on $e _ { 1 } , e _ { 2 }$ . Hence learning with IRMv1 will prefer this model over $\mathrm { O P T _ { C L O v E } }$ , which discards the spurious correlation with $X _ { 2 }$ . (b) Correspondence between observable criteria and OOD accuracy in CMNIST. Each point corresponds to a model trained with some training algorithm (marked by color) and hyperparameter setting. Size of marker is proportional to the ratio between OOD and ID accuracies.
171
+
172
+ <table><tr><td>Dataset</td><td>Type</td><td>Label (y)</td><td>Input (x)</td><td>Domain (e)</td><td>Model(f(x))</td></tr><tr><td>PovertyMap</td><td>Regression</td><td>Asset Wealth Index</td><td>Satellite Image</td><td>Country</td><td>ResNet</td></tr><tr><td>Camelyon17</td><td>Binary</td><td>Tumor Tissue</td><td>Histopathological Image</td><td>Hospital</td><td>DenseNet</td></tr><tr><td>CivilComments</td><td>Binary</td><td>Comment Toxicity</td><td>Online Comment</td><td>Demographics</td><td>BERT</td></tr><tr><td>FMoW</td><td>Multi-class</td><td>Land Use Type</td><td>Satellite Image</td><td>Region</td><td>DenseNet</td></tr></table>
173
+
174
+ Table 1: Description of each of the datasets used in our WILDS experiments.
175
+
176
+ Table $2$ presents our main results on the FMoW (left) and Camelyon17 (right) datasets. On both datasets, robust calibration already improves performance, and CLOvE then significantly outperforms robust calibration, improving performance by $7 \%$ and $2 . 8 \%$ (absolute) over the strongest alternative on FMoW and Camelyon17, respectively. When compared to the original model, the performance of CLOvE is even more striking, with CLOvE outperforming it by more than $1 0 \%$ (absolute) on FMoW and $6 \%$ on Camelyon17. Another appealing property of CLOvE is the low variance exhibited across different runs. Indeed, CLOvE has lower variance than both naive and robust calibration approaches, and has lower variance than the original (uncalibrated) model on 4 of the 6 experiments.
177
+
178
+ <table><tr><td rowspan="2">Algorithm</td><td colspan="4">FMoW</td><td colspan="4">Camelyon17</td></tr><tr><td>Orig.</td><td>Naive Cal.</td><td>Rob. Cal.</td><td>CLOvE</td><td>Orig.</td><td>Naive Cal.</td><td>Rob. Cal.</td><td>CLOvE</td></tr><tr><td>ERM</td><td>32.63 (0.016)</td><td>33.09 (0.021)</td><td>37.19 (0.035)</td><td>44.16 (0.018)</td><td>66.66 (0.144)</td><td>71.23 (0.089)</td><td>71.22 (0.086)</td><td>75.75 (0.049)</td></tr><tr><td>DeepCORAL</td><td>31.73 (0.01)</td><td>31.75 (0.01)</td><td>33.86 (0.016)</td><td>40.05 (0.009)</td><td>72.44 (0.044)</td><td>75.97 (0.054)</td><td>76.8 (0.065)</td><td>79.96 (0.039)</td></tr><tr><td>IRM</td><td>31.33 (0.012)</td><td>31.81 (0.016)</td><td>34.41 (0.015)</td><td>42.24 (0.014)</td><td>70.87 (0.068)</td><td>73.25 (0.066)</td><td>73.4 (0.069)</td><td>73.95 (0.061)</td></tr></table>
179
+
180
+ Table 2: Left: worst unseen region accuracy on OOD test set in FMoW. Right: Accuracy on unseen hospital test set in Camelyon17. Orig.: original algorithm, no changes applied. Best OOD result for each domain in bold. Standard deviation across runs in brackets, lowest OOD std. is underlined.
181
+
182
+ Analysis. As can be seen in Figure 4, improvements in ID calibration are associated with better OOD performance. Interestingly, when our post-processing does not improve OOD performance, it is often linked to our inability to substantially improve ID calibration. This is most visible in IRM experiments, where robust calibration is unable to outperform naive calibration both in terms ID calibration and in OOD performance. Finally, we find it interesting that merely post-processing the data (as in robust calibration) can already have such a marked effect on OOD accuracy, though still inferior to actually optimizing for multi-domain calibration as done by CLOvE.
183
+
184
+ Results on alternative settings. While our theoretical analysis is focused on OOD generalization of classification models, we also experiment with alternative settings from WILDS to test the power of ID calibration in improving OOD performance. Specifically, we experiment with the PovertyMap dataset, which introduces a regression task, and the CivilComments dataset, which introduces a subpopulation shift scenario for a binary classifier. As can be seen in Table $^ { 3 , }$ results on the CivilComments dataset (right), show that calibration consistently improves worstcase performance, with an average improvement of $2 1 . 5 \%$ across training algorithms. While CLOvE does outperform naive and robust calibration on average, the gain is lower in comparison to FMoW and Camelyon17.
185
+
186
+ ![](images/1b6fd513e48bf56dd2b58bd52d594df89d26ec072e61e898541127612b8a275c.jpg)
187
+ Figure 4: OOD accuracy as a function of average ECE over training domains, for all models on the Camelyon17 dataset.
188
+
189
+ In PovertyMap (left), the model solves a regression task, so we cannot use CLOvE to improve OOD performance. Still, robust calibration improves performance across all experiments, though by a smaller margin. In the case of models pre-trained by IRM, robust calibration improves OOD performance substantially, outperforming the original model by $0 . 0 8 \%$ (absolute). Interestingly, calibration also leads to more stable results both in PovertyMap and in CivilComments, as can be seen in the standard deviation across different model runs.
190
+
191
+ <table><tr><td rowspan="2">Algorithm</td><td colspan="2">PovertyMap</td><td rowspan="2"></td><td rowspan="2">Algorithm</td><td rowspan="2"></td><td colspan="3">CivilComments</td></tr><tr><td>Orig.</td><td>Naive Cal. Rob. Cal.</td><td>Orig. Naive Cal.</td><td>Rob. Cal.</td><td>CLOvE</td></tr><tr><td rowspan="2">ERM</td><td>0.832</td><td>0.827</td><td>0.834</td><td rowspan="2">ERM</td><td>63.65</td><td>76.98</td><td>78.99</td><td>80.39</td></tr><tr><td>(0.011)</td><td>(0.014)</td><td>(0.006)</td><td>(0.026)</td><td>(0.005)</td><td>(0.008)</td><td>(0.007)</td></tr><tr><td rowspan="2">IRM</td><td>0.735</td><td>0.812</td><td>0.815</td><td rowspan="2">IRM</td><td>40.61</td><td>68.97</td><td>68.92</td><td>68.45</td></tr><tr><td>(0.117)</td><td>(0.016)</td><td>(0.015)</td><td>(0.16)</td><td>(0.013)</td><td>(0.013)</td><td>(0.02)</td></tr><tr><td rowspan="2">DeepCORAL</td><td>0.832</td><td>0.835</td><td>0.837</td><td rowspan="2">GroupDRO</td><td>71.67</td><td>76.2</td><td>78.54</td><td>80.07</td></tr><tr><td>(0.011)</td><td>(0.009)</td><td>(0.012)</td><td>(0.007)</td><td>(0.013)</td><td>(0.008)</td><td>(0.003)</td></tr></table>
192
+
193
+ Table 3: Left: Pearson correlation $r$ on in-domain (ID) and OOD (unseen countries) test sets in PovertyMap. Right: worst-case group accuracy on the test set in the CivilComments dataset.
194
+
195
+ # 7 Conclusion
196
+
197
+ In this paper we highlight a novel connection between multi-domain calibration and OOD generalization, arguing that such calibration can be viewed as an invariant representation. We proved in a linear setting that models calibrated on multiple domains are free of spurious correlations and therefore generalize out of domain. We then proposed multi-domain calibration as a practical and measurable surrogate for the OOD performance of a classifier. We demonstrated that actively tuning models to achieve multi-domain calibration significantly improves model performance on unseen test domains, and that in-domain calibration on a validation set is a useful criterion for model selection. A major limitation of our work is that our theoretical findings are limited to linear models in a population (as opposed to finite-sample) setting; we thus consider them more as a motivation rather than a full justification of using multi-domain calibration in practice as we do. We look forward to expanding the scope of theoretical understanding of the conditions under which multi-domain calibration can provably guarantee out-of-domain generalization, including the finite-sample setting and the analysis of specific algorithms. We also expect new practical methods, building on our findings, will help push forward the real-world ability to generalize to unseen test domains.
198
+
199
+ # Acknowledgments
200
+
201
+ We wish to thank Ira Shavitt for his helpful comments and to Alexandre Ramé for pointing us to an error in the original manuscript. This research was partially supported by the Israel Science Foundation (grant No. 1950/19).
202
+
203
+ References
204
+ [1] M. Arjovsky, L. Bottou, I. Gulrajani, and D. Lopez-Paz. Invariant risk minimization. arXiv preprint arXiv:1907.02893, 2019.
205
+ [2] P. Bandi, O. Geessink, Q. Manson, M. Van Dijk, M. Balkenhol, M. Hermsen, B. E. Bejnordi, B. Lee, K. Paeng, A. Zhong, et al. From detection of individual metastases to classification of lymph node status at the patient level: the camelyon17 challenge. IEEE transactions on medical imaging, 38(2):550–560, 2018.
206
+ [3] A. Bellot and M. van der Schaar. Generalization and invariances in the presence of unobserved confounding. arXiv preprint arXiv:2007.10653, 2020.
207
+ [4] D. Borkan, L. Dixon, J. Sorensen, N. Thain, and L. Vasserman. Nuanced metrics for measuring unintended bias with real data for text classification. In Companion proceedings of the 2019 world wide web conference, pages 491–500, 2019.
208
+ [5] G. W. Brier et al. Verification of forecasts expressed in terms of probability. Monthly weather review, 78(1):1–3, 1950.
209
+ [6] G. Christie, N. Fendley, J. Wilson, and R. Mukherjee. Functional map of the world. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6172–6180, 2018.
210
+ [7] M. H. DeGroot and S. E. Fienberg. The comparison and evaluation of forecasters. Journal of the Royal Statistical Society: Series D (The Statistician), 32(1-2):12–22, 1983.
211
+ [8] S. Desai and G. Durrett. Calibration of pre-trained transformers. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 295–302, 2020.
212
+ [9] J. Devlin, M.-W. Chang, K. Lee, and K. 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), pages 4171–4186, 2019.
213
+ [10] J. Duchi, E. Hazan, and Y. Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of machine learning research, 12(7), 2011.
214
+ [11] I. Gulrajani and D. Lopez-Paz. In search of lost domain generalization. arXiv preprint arXiv:2007.01434, 2020.
215
+ [12] C. Guo, G. Pleiss, Y. Sun, and K. Q. Weinberger. On calibration of modern neural networks. In International Conference on Machine Learning, pages 1321–1330. PMLR, 2017.
216
+ [13] R. Guo, P. Zhang, H. Liu, and E. Kiciman. Out-of-distribution prediction with invariant risk minimization: The limitation and an effective fix. arXiv preprint arXiv:2101.07732, 2021.
217
+ [14] C. Gupta, A. Podkopaev, and A. Ramdas. Distribution-free binary classification: prediction sets, confidence intervals and calibration. Advances in Neural Information Processing Systems, 33, 2020.
218
+ [15] K. He, X. Zhang, S. Ren, and J. Sun. Identity mappings in deep residual networks. In European conference on computer vision, pages 630–645. Springer, 2016.
219
+ [16] U. Hébert-Johnson, M. Kim, O. Reingold, and G. Rothblum. Multicalibration: Calibration for the (computationally-identifiable) masses. In International Conference on Machine Learning, pages 1939–1948. PMLR, 2018.
220
+ [17] C. Heinze-Deml, J. Peters, and N. Meinshausen. Invariant causal prediction for nonlinear models. Journal of Causal Inference, 6(2), 2018.
221
+ [18] W. Hu, G. Niu, I. Sato, and M. Sugiyama. Does distributionally robust supervised learning give robust classifiers? In International Conference on Machine Learning, pages 2029–2037. PMLR, 2018.
222
+
223
+ [19] G. Huang, Z. Liu, L. Van Der Maaten, and K. Q. Weinberger. Densely connected convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4700–4708, 2017.
224
+
225
+ [20] P. Kamath, A. Tangella, D. J. Sutherland, and N. Srebro. Does invariant risk minimization capture invariance? In AISTATS, 2021.
226
+
227
+ [21] B. Kim, H. Kim, K. Kim, S. Kim, and J. Kim. Learning not to learn: Training deep neural networks with biased data. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9012–9020, 2019.
228
+
229
+ [22] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
230
+
231
+ [23] P. W. Koh, S. Sagawa, H. Marklund, S. M. Xie, M. Zhang, A. Balsubramani, W. Hu, M. Yasunaga, R. L. Phillips, S. Beery, et al. Wilds: A benchmark of in-the-wild distribution shifts. arXiv preprint arXiv:2012.07421, 2020.
232
+
233
+ [24] D. Krueger, E. Caballero, J.-H. Jacobsen, A. Zhang, J. Binas, R. L. Priol, and A. Courville. Out-of-distribution generalization via risk extrapolation (rex). arXiv preprint arXiv:2003.00688, 2020.
234
+
235
+ [25] V. Kuleshov, N. Fenner, and S. Ermon. Accurate uncertainties for deep learning using calibrated regression. In International Conference on Machine Learning, pages 2796–2804. PMLR, 2018.
236
+
237
+ [26] A. Kumar, S. Sarawagi, and U. Jain. Trainable calibration measures for neural networks from kernel mean embeddings. In International Conference on Machine Learning, pages 2805–2814, 2018.
238
+
239
+ [27] J. M. Lee. Smooth manifolds. In Introduction to Smooth Manifolds, pages 1–31. Springer, 2013.
240
+
241
+ [28] S. Magliacane, T. van Ommen, T. Claassen, S. Bongers, P. Versteeg, and J. M. Mooij. Domain adaptation by using causal inference to predict invariant conditional distributions. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, pages 10869– 10879, 2018.
242
+
243
+ [29] J. Mukhoti, V. Kulharia, A. Sanyal, S. Golodetz, P. H. Torr, and P. K. Dokania. Calibrating deep neural networks using focal loss. arXiv preprint arXiv:2002.09437, 2020.
244
+
245
+ [30] A. Niculescu-Mizil and R. Caruana. Predicting good probabilities with supervised learning. In Proceedings of the 22nd international conference on Machine learning, pages 625–632, 2005.
246
+
247
+ [31] J. Nixon, M. W. Dusenberry, L. Zhang, G. Jerfel, and D. Tran. Measuring calibration in deep learning. In IEEE Conference on Computer Vision and Pattern Recognition Workshops, CVPR Workshops 2019, Long Beach, CA, USA, June 16-20, 2019, pages 38–41. Computer Vision Foundation / IEEE, 2019.
248
+
249
+ [32] J. Pearl. A probabilistic calculus of actions. In Uncertainty Proceedings 1994, pages 454–462. Elsevier, 1994.
250
+
251
+ [33] J. Pearl. Causality. Cambridge university press, 2009.
252
+
253
+ [34] J. Peters, P. Bühlmann, and N. Meinshausen. Causal inference by using invariant prediction: identification and confidence intervals. Journal of the Royal Statistical Society. Series B (Statistical Methodology), pages 947–1012, 2016.
254
+
255
+ [35] G. Pleiss, M. Raghavan, F. Wu, J. Kleinberg, and K. Q. Weinberger. On fairness and calibration. arXiv preprint arXiv:1709.02012, 2017.
256
+
257
+ [36] A. Rahimi, A. Shaban, C.-A. Cheng, R. Hartley, and B. Boots. Intra order-preserving functions for calibration of multi-class neural networks. Advances in Neural Information Processing Systems, 33, 2020.
258
+
259
+ [37] E. Rosenfeld, P. Ravikumar, and A. Risteski. The risks of invariant risk minimization. arXiv preprint arXiv:2010.05761, 2020.
260
+
261
+ [38] D. Rothenhäusler, N. Meinshausen, P. Bühlmann, and J. Peters. Anchor regression: heterogeneous data meets causality. arXiv preprint arXiv:1801.06229, 2018.
262
+ [39] S. Sagawa, P. W. Koh, T. B. Hashimoto, and P. Liang. Distributionally robust neural networks for group shifts: On the importance of regularization for worst-case generalization. arXiv preprint arXiv:1911.08731, 2019.
263
+ [40] B. Schölkopf, D. Janzing, J. Peters, E. Sgouritsa, K. Zhang, and J. Mooij. On causal and anticausal learning. arXiv preprint arXiv:1206.6471, 2012.
264
+ [41] A. W. Senior, R. Evans, J. Jumper, J. Kirkpatrick, L. Sifre, T. Green, C. Qin, A. Zídek, A. W. R. Nelson, A. Bridgland, H. Penedones, S. Petersen, K. Simonyan, S. Crossan, P. Kohli, D. T. Jones, D. Silver, K. Kavukcuoglu, and D. Hassabis. Improved protein structure prediction using potentials from deep learning. Nat., 577(7792):706–710, 2020.
265
+ [42] E. Shabat, L. Cohen, and Y. Mansour. Sample complexity of uniform convergence for multicalibration. arXiv preprint arXiv:2005.01757, 2020.
266
+ [43] A. Subbaswamy, P. Schulam, and S. Saria. Preventing failures due to dataset shift: Learning predictive models that transport. In The 22nd International Conference on Artificial Intelligence and Statistics, pages 3118–3127. PMLR, 2019.
267
+ [44] B. Sun and K. Saenko. Deep coral: Correlation alignment for deep domain adaptation. In European conference on computer vision, pages 443–450. Springer, 2016.
268
+ [45] J. Vaicenavicius, D. Widmann, C. Andersson, F. Lindsten, J. Roll, and T. Schön. Evaluating model calibration in classification. In The 22nd International Conference on Artificial Intelligence and Statistics, pages 3459–3467. PMLR, 2019.
269
+ [46] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin. Attention is all you need. In Advances in neural information processing systems, pages 5998–6008, 2017.
270
+ [47] V. Vovk, G. Shafer, and I. Nouretdinov. Self-calibrating probability forecasting. In Proceedings of the 16th International Conference on Neural Information Processing Systems, pages 1133– 1140, 2003.
271
+ [48] X. Wang, M. Long, J. Wang, and M. I. Jordan. Transferable calibration with lower bias and variance in domain adaptation. arXiv preprint arXiv:2007.08259, 2020.
272
+ [49] C. Yeh, A. Perez, A. Driscoll, G. Azzari, Z. Tang, D. Lobell, S. Ermon, and M. Burke. Using publicly available satellite imagery and deep learning to understand economic well-being in africa. Nature communications, 11(1):1–11, 2020.
273
+ [50] B. Zadrozny and C. Elkan. Obtaining calibrated probability estimates from decision trees and naive bayesian classifiers. In C. E. Brodley and A. P. Danyluk, editors, Proceedings of the Eighteenth International Conference on Machine Learning (ICML 2001), Williams College, Williamstown, MA, USA, June 28 - July 1, 2001, pages 609–616. Morgan Kaufmann, 2001.
274
+ [51] J. R. Zech, M. A. Badgeley, M. Liu, A. B. Costa, J. J. Titano, and E. K. Oermann. Variable generalization performance of a deep learning model to detect pneumonia in chest radiographs: a cross-sectional study. PLoS medicine, 15(11):e1002683, 2018.
275
+
276
+ # Checklist
277
+
278
+ 1. For all authors...
279
+
280
+ (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
281
+ (b) Did you describe the limitations of your work? [Yes] Limitations that we found most significant are discussed in Section 7
282
+ (c) Did you discuss any potential negative societal impacts of your work? [No] The work does not treat a specific task where we see an immediate risk for negative societal impact. Though the methods described in this paper might be used by practitioners in safety-critical domains such as healthcare, and we suggest doing so with care since the suggested methods need to be studied further in controlled settings before being used in such domains.
283
+ (d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] The paper conforms with the provided guidelines.
284
+
285
+ 2. If you are including theoretical results...
286
+
287
+ (a) Did you state the full set of assumptions of all theoretical results? [Yes] Most assumptions, such as population setting (infinite data) assumption, Gaussian data and linearity of models have been given in Section $\textcircled { 3 }$ Other assumptions regarding specific generalposition conditions under which the theorems hold are given in the supplementary material. along with detailed statements of the theorems.
288
+ (b) Did you include complete proofs of all theoretical results? [Yes] The proofs of main theoretical claims can be found in the supplementary material.
289
+
290
+ 3. If you ran experiments...
291
+
292
+ (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [No] We are preparing the code for publication and will do our best to have it ready by the end of the review period. Major parts of our code are based on existing publicly available code from papers that we cite, while noting that we used their published code. Hence some parts of our results can be reproduced quite easily by using it.
293
+ (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] We specify hyperparameters and training details in the supplementary material (for both the WILDS benchmark and ColoredMNIST). When using a training setup from other works (e.g. in Colored MNIST), we give a reference to the work and specify changes we made upon their setup.
294
+ (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes]
295
+ (d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes]
296
+
297
+ 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
298
+
299
+ (a) If your work uses existing assets, did you cite the creators? [Yes] Some of the code we use is adapted from the works of $\boxed { 1 } \boxed { 2 0 }$ which we cite several times and specifically in Section $\overline { { 6 } }$ with regards to the used code. Our experiments on the WILDS benchmark $\mathbb { \left[ \left. 2 3 \right] \right. }$ use assets from the project that was also cited.
300
+ (b) Did you mention the license of the assets? [Yes] Licenses are included in the supplementary material.
301
+ (c) Did you include any new assets either in the supplemental material or as a URL? [No]
302
+ (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [No] All assets we use are allowed for public use for the purposes of sceintific research.
303
+ (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [No] The data we use is taken from publicly available datasets, where all personally identifiable information have been removed.
304
+
305
+ 5. If you used crowdsourcing or conducted research with human subjects...
306
+
307
+ (a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] We did not conduct research with human subjects
308
+ (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
309
+ (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
parse/train/XWYJ25-yTRS/XWYJ25-yTRS_content_list.json ADDED
@@ -0,0 +1,1447 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "On Calibration and Out-of-domain Generalization ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 191,
8
+ 122,
9
+ 805,
10
+ 147
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Yoav Wald⇤ Johns Hopkins University yoav.wald@gmail.com ",
17
+ "bbox": [
18
+ 192,
19
+ 196,
20
+ 362,
21
+ 238
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Amir Feder⇤ Technion amirfeder@gmail.com ",
28
+ "bbox": [
29
+ 390,
30
+ 196,
31
+ 553,
32
+ 238
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Daniel Greenfeld Jether Energy Research danielgreenfeld3@gmail.com ",
39
+ "bbox": [
40
+ 580,
41
+ 196,
42
+ 805,
43
+ 238
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "Uri Shalit Technion urishalit@technion.ac.il ",
50
+ "bbox": [
51
+ 393,
52
+ 260,
53
+ 602,
54
+ 301
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "Abstract ",
61
+ "text_level": 1,
62
+ "bbox": [
63
+ 462,
64
+ 338,
65
+ 535,
66
+ 354
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "Out-of-domain (OOD) generalization is a significant challenge for machine learning models. Many techniques have been proposed to overcome this challenge, often focused on learning models with certain invariance properties. In this work, we draw a link between OOD performance and model calibration, arguing that calibration across multiple domains can be viewed as a special case of an invariant representation leading to better OOD generalization. Specifically, we show that under certain conditions, models which achieve multi-domain calibration are provably free of spurious correlations. This leads us to propose multi-domain calibration as a measurable and trainable surrogate for the OOD performance of a classifier. We therefore introduce methods that are easy to apply and allow practitioners to improve multi-domain calibration by training or modifying an existing model, leading to better performance on unseen domains. Using four datasets from the recently proposed WILDS OOD benchmark $\\mathbb { \\left[ \\left[ 2 3 \\right] \\right] }$ , as well as the Colored MNIST dataset $\\pmb { \\mathbb { D } }$ , we demonstrate that training or tuning models so they are calibrated across multiple domains leads to significantly improved performance on unseen test domains. We believe this intriguing connection between calibration and OOD generalization is promising from both a practical and theoretical point of view. ",
73
+ "bbox": [
74
+ 232,
75
+ 367,
76
+ 766,
77
+ 603
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "1 Introduction ",
84
+ "text_level": 1,
85
+ "bbox": [
86
+ 174,
87
+ 628,
88
+ 310,
89
+ 645
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Machine learning models have recently displayed impressive success in a plethora of fields [19, 9, 41]. However, as models are typically only trained and tested on in-domain (ID) data, they often fail to generalize to out-of-domain (OOD) data $\\mathbb { \\left[ \\left. 2 3 \\right] \\right. }$ . The problem is especially pressing when deploying machine learning models in the wild, where they are required to perform well under conditions that were not observed during training. For instance, a medical diagnosis system trained on patient data from a few hospitals could fail when deployed in a new hospital. ",
96
+ "bbox": [
97
+ 174,
98
+ 660,
99
+ 825,
100
+ 742
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Many methods have been proposed to improve the OOD generalization of machine learning models. Specifically, there is rapidly growing interest in learning models that display certain invariance properties under distribution shifts and do not rely on spurious correlations in the training data [34, 17, 1]. While highlighting the need for learning robust models, so far these attempts have limited success scaling to realistic high-dimensional data, and in learning truly invariant representations $\\pm \\infty , \\boxed { 3 7 } \\boxed { 1 1 } \\boxed { 2 0 }$ . ",
107
+ "bbox": [
108
+ 173,
109
+ 750,
110
+ 825,
111
+ 819
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "In this paper, we argue that an alternative and relatively simple approach for learning invariant representations could be achieved through model calibration across multiple domains. Calibration asserts that the probabilities of outcomes predicted by a model match their true probabilities. Our claim is that simultaneous calibration over several domains can be used as an observable indicator for favorable performance on unseen domains. For example, if we take all patients for whom a classifier outputs a probability of 0.9 for being ill, and in one hospital the true probability of illness in these patients is 0.85 while in the other it is 0.95, then we may suspect the classifier relies on spurious correlations. Intuitively, the features which lead the classifier to predict a probability of 0.9 imply different results under different experimental conditions, suggesting that their correlation with the label is potentially unstable. Conversely, if the true probabilities in both hospitals match the classifier’s output, it may be a sign of its robustness. ",
118
+ "bbox": [
119
+ 174,
120
+ 825,
121
+ 825,
122
+ 881
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "",
129
+ "bbox": [
130
+ 174,
131
+ 92,
132
+ 825,
133
+ 188
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "Our contributions are as follows: We prove that in Gaussian-linear models, under a general-position condition, being concurrently calibrated across a sufficient number of domains guarantees a model has no spurious correlations. We then introduce three methods for encouraging multi-domain calibration in practice. These are, in ascending order of complexity: (i) model selection by a multi-domain calibration score, (ii) robust isotonic regression as a post-processing tool, and (iii) directly optimizing deep nets with a multi-domain calibration objective, based on the method introduced by Kumar et al. [26]. We show that multi-domain calibration achieves the correct invariant classifier in a learning scenario presented by Kamath et al. $\\pmb { \\mathbb { Z } } 0 \\|$ , unlike the objective proposed in Invariant Risk Minimization [1]. Finally, we demonstrate that the proposed approaches lead to significant performance gains on the WILDS benchmark datasets $\\mathbb { \\left[ \\left. 2 3 \\right] \\right. }$ , and also succeed on the colored MNIST dataset $[ [ 2 1 ] ]$ . ",
140
+ "bbox": [
141
+ 173,
142
+ 194,
143
+ 825,
144
+ 333
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "2 Calibration and Invariant Classifiers ",
151
+ "text_level": 1,
152
+ "bbox": [
153
+ 174,
154
+ 356,
155
+ 513,
156
+ 373
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "2.1 Problem Setting ",
163
+ "text_level": 1,
164
+ "bbox": [
165
+ 174,
166
+ 390,
167
+ 326,
168
+ 405
169
+ ],
170
+ "page_idx": 1
171
+ },
172
+ {
173
+ "type": "text",
174
+ "text": "Consider observable features $X$ , a label $Y$ and an environment (or domain) $E$ with sample spaces $\\mathcal { X } , \\mathcal { Y } , \\mathcal { E }$ accordingly. We mostly focus on regression and binary classification, therefore $\\mathcal { V } = \\mathbb { R }$ or $\\mathcal { V } = \\{ 0 , 1 \\}$ . To lighten notation, our definitions will be given for the binary classification setting and we will point out adjustments to regression where necessary. There is no explicit limitation on $| \\mathcal { E } |$ , but we assume that training data that has been collected from a finite subset of the possible environments $E _ { \\mathrm { t r a i n } } \\subset \\mathcal { E }$ . The number of training environments is denoted by $k$ , and $E _ { \\mathrm { t r a i n } } \\stackrel { \\cdot } { = } \\{ e _ { i } \\} _ { i = 1 } ^ { k } \\subset \\mathcal { E }$ , so that our training data is sampled from a distribution $P [ X , Y \\mid E = e _ { i } ] \\quad \\forall i \\in [ k ]$ . Our goal is to learn models that will generalize to new, unseen environments in $\\mathcal { E }$ . ",
175
+ "bbox": [
176
+ 173,
177
+ 416,
178
+ 825,
179
+ 527
180
+ ],
181
+ "page_idx": 1
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "Ideally, we would like to learn a classifier that is optimal for all environments $\\mathcal { E }$ . Unfortunately, we only observe data from the limited set $E _ { \\mathrm { t r a i n } }$ and even if this set is extremely large, the Bayes optimal classifiers on each environment do not necessarily coincide. Following other recent work [34, 17, 1] we therefore aim for a different goal – learning classifiers whose per-instance output will be stable across environments $E$ , as we explain below. ",
186
+ "bbox": [
187
+ 174,
188
+ 534,
189
+ 825,
190
+ 603
191
+ ],
192
+ "page_idx": 1
193
+ },
194
+ {
195
+ "type": "text",
196
+ "text": "We assume the data generating process for $E , X , Y$ follows the causal graph in Figure 1. 2 We differentiate between causal and anti-causal components of $X$ , and further differentiate between the anti-causal variables which are affected or unaffected by $E$ , denoted as $X _ { \\mathrm { a c } }$ -spurious and $X _ { \\mathrm { a c } }$ -non-spurious, respectively. As an illustrative example, consider again predicting illness across different hospitals. When predicting lung cancer, $Y$ , from patient health records, $X _ { \\mathrm { c a u s a l } }$ could be features like smoking. $X _ { \\mathrm { a c } }$ -non-spurious are symptoms of $Y$ such as infections that appear in chest $\\mathbf { X }$ -rays, while $X _ { \\mathrm { a c } }$ -spurious can be marks that technicians put on $\\mathbf { X }$ -rays as in $\\pmb { \\mathbb { B } } \\mathbf { \\mathbb { 1 } }$ . Smoking habits may vary across hospital populations, as might $\\mathrm { X }$ -ray markings; but the influence of smoking on cancer and the manifestation of cancer in an $\\mathbf { X }$ -ray do not vary by hospital. ",
197
+ "bbox": [
198
+ 173,
199
+ 608,
200
+ 825,
201
+ 734
202
+ ],
203
+ "page_idx": 1
204
+ },
205
+ {
206
+ "type": "text",
207
+ "text": "We do not assume to know how to partition $X$ into $X _ { \\mathrm { c a u s a l } }$ , $X _ { \\mathrm { a c } }$ -spurious, $X _ { \\mathrm { a c } }$ -non-spurious. The main assumptions made in the causal graph in Fig. $\\mathbb { L }$ are that there are no hidden variables, and that there is no edge directly from environment $E$ to the label $Y$ . Such an arrow would imply the conditional distribution of $Y$ given $X$ can be arbitrarily different in an unseen environment $E$ , compared to those present in the training set. Note that for simplicity we do not include arrows from $X _ { \\mathrm { c a u s a l } }$ to $X _ { \\mathrm { a c } }$ -spurious and $X _ { \\mathrm { a c } }$ -non-spurious but they may be included as well. ",
208
+ "bbox": [
209
+ 174,
210
+ 741,
211
+ 549,
212
+ 878
213
+ ],
214
+ "page_idx": 1
215
+ },
216
+ {
217
+ "type": "image",
218
+ "img_path": "images/215910095755bb14f148742ead95b8467633b63fa6515badd905915768da4211.jpg",
219
+ "image_caption": [
220
+ "Figure 1: Learning in the presence of causal and anti-causal features. Anti-causal features can be either spurious $( X _ { \\mathrm { a c - s p u r i o u s } } )$ , or non-spurious ( $X _ { \\mathrm { a c } }$ -non-spurious). "
221
+ ],
222
+ "image_footnote": [],
223
+ "bbox": [
224
+ 584,
225
+ 742,
226
+ 787,
227
+ 825
228
+ ],
229
+ "page_idx": 1
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "We will say a representation $\\Phi ( X )$ contains a spurious \ncorrelation with respect to the environments $E$ and label $Y$ , if $Y$ $\\mid \\chi \\mid \\Phi ( X )$ ; this motivates our naming of $X _ { \\mathrm { a c } }$ -spurious and $X _ { \\mathrm { a c } }$ -non-spurious in Fig. 1, as $Y \\not \\perp E \\mid$ $X _ { \\mathrm { a c } }$ -spurious but $Y \\perp \\perp E \\mid$ $X _ { \\mathrm { a c } }$ -non-spurious. Similar observations have been made by $\\mathbb { E A } \\mathbb { I I }$ . Having a spurious correlation implies that the relation between $\\Phi ( X )$ and $Y$ depends on the environment – it is not transferable nor stable across environments. In this work we will simply consider the output $f ( X )$ of a classifier $f : \\mathcal { X } \\to [ 0 , 1 ]$ as a representation. The crux of this paper is the observation that having $\\mathbb { E } [ Y \\mid f ( X ) , E = e ] \\overset { \\cdot } { = } f ( X )$ for every value of $E$ , i.e. $f$ being a calibrated classifier across all environments, is equivalent up-to a simple transformation to having $Y \\perp \\perp E \\mid f ( X )$ , and thus to $f$ having no spurious correlations with respect to $E$ . We prove this assertion in section $2 . 2 ,$ and as a demonstration of this principle we prove (section $\\textcircled { 3 }$ that linear models which are calibrated across a diverse set of environments $E$ are guaranteed to discard $X _ { \\mathrm { a c } }$ -spurious as viable features for prediction. ",
234
+ "bbox": [
235
+ 173,
236
+ 93,
237
+ 826,
238
+ 257
239
+ ],
240
+ "page_idx": 2
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "2.2 Invariance and Calibration on Multiple Domains ",
245
+ "text_level": 1,
246
+ "bbox": [
247
+ 174,
248
+ 272,
249
+ 553,
250
+ 289
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "We define calibration, along with a straightforward generalization to the multiple environment setting. ",
257
+ "bbox": [
258
+ 173,
259
+ 299,
260
+ 825,
261
+ 314
262
+ ],
263
+ "page_idx": 2
264
+ },
265
+ {
266
+ "type": "text",
267
+ "text": "Definition 1. Let $P [ X , Y ]$ be a joint distribution over the features and label, and $f : \\mathcal { X } \\ \\to$ $[ 0 , 1 ]$ a classifier. Then $\\bar { f } ( { \\bf x } )$ is calibrated w.r.t to $P$ if for all $\\alpha ~ \\in ~ [ 0 , 1 ]$ in the range of $f$ , $\\dot { \\mathbb { E } } _ { P } [ \\dot { Y } \\mid f ( X ) = \\alpha ] = \\alpha$ . In the multiple environments setting, $f ( \\mathbf { x } )$ is calibrated on $E _ { t r a i n }$ if for all $e _ { i } \\in E _ { t r a i n }$ and $\\alpha$ in the range of $f$ restricted to $e _ { i }$ , $\\mathbb { E } [ Y \\mid f ( X ) = { \\overset { } { \\alpha } } , E = e _ { i } ] = \\alpha$ . ",
268
+ "bbox": [
269
+ 174,
270
+ 318,
271
+ 826,
272
+ 375
273
+ ],
274
+ "page_idx": 2
275
+ },
276
+ {
277
+ "type": "text",
278
+ "text": "For regression problems, we consider regressors that output estimates for the mean and variance of $Y$ , and say they are calibrated if they match the true values similarly to the definition above. The precise definition can be found in the supplementary material. ",
279
+ "bbox": [
280
+ 174,
281
+ 385,
282
+ 825,
283
+ 426
284
+ ],
285
+ "page_idx": 2
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "We now tie the notion of calibration on multiple environments with OOD generalization, starting with its correspondence with our definition of spurious correlations. Recall that a representation $\\Phi ( X )$ does not contain spurious correlations if $Y \\perp \\perp E \\mid \\Phi ( X )$ . Treating the output $f ( { \\bar { X } } )$ of a classifier as a representation of the data, and considering classifiers satisfying the above conditional independence with respect to training environments, we arrive at a definition of an invariant classifier. ",
290
+ "bbox": [
291
+ 173,
292
+ 433,
293
+ 825,
294
+ 502
295
+ ],
296
+ "page_idx": 2
297
+ },
298
+ {
299
+ "type": "text",
300
+ "text": "Definition 2. Let $f : \\mathcal { X } [ 0 , 1 ]$ . $f$ is an invariant classifier w.r.t $E _ { t r a i n }$ if for all $\\alpha \\in [ 0 , 1 ]$ and environments $e _ { i } , e _ { j } \\in E _ { t r a i n }$ , where $\\alpha$ is in the range of $f$ restricted to each of them: ",
301
+ "bbox": [
302
+ 171,
303
+ 506,
304
+ 825,
305
+ 536
306
+ ],
307
+ "page_idx": 2
308
+ },
309
+ {
310
+ "type": "equation",
311
+ "img_path": "images/f1b5b7820b5eadd3ed1960a2a4012a4ebf4f4746eab90af2349981621cd3f903.jpg",
312
+ "text": "$$\n\\mathbb { E } [ Y \\mid f ( X ) = \\alpha , E = e _ { i } ] = \\mathbb { E } [ Y \\mid f ( X ) = \\alpha , E = e _ { j } ] .\n$$",
313
+ "text_format": "latex",
314
+ "bbox": [
315
+ 312,
316
+ 541,
317
+ 686,
318
+ 560
319
+ ],
320
+ "page_idx": 2
321
+ },
322
+ {
323
+ "type": "text",
324
+ "text": "Lemma $\\bigtriangledown$ gives the correspondence between invariant classifiers and classifiers calibrated on multiple environments. The proof is in Section $\\boxed { \\mathbf { A . 1 } }$ of the supplementary material. ",
325
+ "bbox": [
326
+ 174,
327
+ 573,
328
+ 825,
329
+ 602
330
+ ],
331
+ "page_idx": 2
332
+ },
333
+ {
334
+ "type": "text",
335
+ "text": "Lemma 1. If a binary classifier $f$ is invariant w.r.t $E _ { t r a i n }$ , then there exists some $g : \\mathbb { R } [ 0 , 1 ]$ such that (i) $g \\circ f$ is calibrated on all training environments, and (ii) the mean squared error of $g \\circ f$ on each environment does not exceed that of $f$ . On the other hand, if a classifier is calibrated on all training environments it is also invariant w.r.t $E _ { t r a i n }$ . ",
336
+ "bbox": [
337
+ 174,
338
+ 604,
339
+ 825,
340
+ 661
341
+ ],
342
+ "page_idx": 2
343
+ },
344
+ {
345
+ "type": "text",
346
+ "text": "Now, we can note how the above notion of invariance relates to that of Invariant Risk Minimization [1], where invariance of a representation $\\Phi : \\mathcal { X } \\to \\mathcal { H }$ is linked to a shared classifier $\\mathbf { w } ^ { * } : \\mathcal { H } [ 0 , 1 ]$ , $\\mathbf { w } ^ { * } \\circ \\Phi$ being optimal on all environments w.r.t a loss $l : [ 0 , 1 ] \\times \\mathcal { Y } \\mathbb { R } _ { \\ge 0 }$ . Under the representation $\\Phi ( X ) = f ( X )$ , and the cross-entropy or squared losses it turns out that the original IRM definition coincides with Equation $\\textcircled { 1 } \\textcircled { 3 }$ Hence we aim for a similar notion of conditional independence, yet we approach it from the point-of-view of calibration. In Section $5$ we will see that taking this approach leads to different methods that are highly effective in achieving and assessing invariance. We further note that the original IRM objective was deemed too difficult to optimize by the original IRM authors, leading them to propose an alternative called IRMv1. This alternative however does not capture the full set of required invariances, as shown by $\\pmb { \\mathbb { Z } } 0 \\|$ , whereas we show in section $6 . 1$ that multi-domain calibration does indeed capture the required invariances. ",
347
+ "bbox": [
348
+ 173,
349
+ 672,
350
+ 826,
351
+ 825
352
+ ],
353
+ "page_idx": 2
354
+ },
355
+ {
356
+ "type": "text",
357
+ "text": "Having established the connection between calibration on multiple environments and invariance, there are several interesting questions and points to consider: ",
358
+ "bbox": [
359
+ 174,
360
+ 830,
361
+ 823,
362
+ 859
363
+ ],
364
+ "page_idx": 2
365
+ },
366
+ {
367
+ "type": "text",
368
+ "text": "Calibration and sharpness. Calibration alone is not enough to guarantee that a classifier performs well; on a single environment, always predicting $\\mathbb { E } [ Y ]$ will give a perfectly calibrated classifier. ",
369
+ "bbox": [
370
+ 176,
371
+ 859,
372
+ 823,
373
+ 887
374
+ ],
375
+ "page_idx": 2
376
+ },
377
+ {
378
+ "type": "text",
379
+ "text": "Hence, multi-domain calibration should be combined with some sort of guarantee on accuracy. In the calibration literature, this is often referred to as sharpness. To this end, in Section $\\boxed { 5 }$ we will propose regularizing models during training or fine-tuning with Calibration Loss Over Environments (CLOvE). Combining this regularizer with standard empirical loss functions helps balance between sharpness and multi-domain calibration. Even without training a new model, we will propose methods for model selection and post-processing that are very easy to apply and help improve multi-domain calibration without a significant effect on the sharpness of the models. ",
380
+ "bbox": [
381
+ 173,
382
+ 90,
383
+ 825,
384
+ 188
385
+ ],
386
+ "page_idx": 3
387
+ },
388
+ {
389
+ "type": "text",
390
+ "text": "Generalization and dependence on $X _ { \\mathbf { a c } }$ -spurious. Suppose that $f ( X )$ is calibrated on $E _ { \\mathrm { t r a i n } }$ . Under what conditions does this imply it is calibrated on $\\mathcal { E } ?$ It is easy to show that calibration on several environments entails calibration on any distribution which can be expressed as a linear combination of the distributions underlying said environments. However, can we go beyond that? Given a general set $\\mathcal { E }$ we would like to know what conditions and how many training environments are required for calibration to generalize. We also wish to understand when does calibration over a finite set of training environments indeed guarantee that a classifier is free of spurious correlations. We now turn to answer these questions in the setting of linear-Gaussian models. ",
391
+ "bbox": [
392
+ 173,
393
+ 188,
394
+ 825,
395
+ 299
396
+ ],
397
+ "page_idx": 3
398
+ },
399
+ {
400
+ "type": "text",
401
+ "text": "3 Motivation: a Linear-Gaussian Model ",
402
+ "text_level": 1,
403
+ "bbox": [
404
+ 174,
405
+ 316,
406
+ 522,
407
+ 335
408
+ ],
409
+ "page_idx": 3
410
+ },
411
+ {
412
+ "type": "text",
413
+ "text": "Let us consider data where $X$ is a multivariate Gaussian. Since we will be considering Gaussian data, the set of all environments $\\mathcal { E }$ will be parameterized using pairs of real vectors expressing expectations and positive definite matrices of an appropriate dimension expressing covariances: $\\mathcal { E } = \\{ ( \\mu , \\Sigma ) | \\mu \\in \\mathbf { \\bar { \\mathbb { R } } } ^ { d } , \\Sigma \\in \\mathbb { S } _ { + + } ^ { d } \\}$ . ",
414
+ "bbox": [
415
+ 173,
416
+ 348,
417
+ 825,
418
+ 406
419
+ ],
420
+ "page_idx": 3
421
+ },
422
+ {
423
+ "type": "text",
424
+ "text": "For two scenarios ((a) and (b) in Figure 2) we prove that when provided with data from $k$ training environments, where $k$ is linear in the number of features, and the environments satisfy some mild non-degeneracy conditions, any predictor that is calibrated on all training environments will not rely on any of the spurious features $X _ { \\mathrm { a c - s p } }$ , and will also be calibrated on all $e \\in { \\mathcal { E } }$ . ",
425
+ "bbox": [
426
+ 173,
427
+ 410,
428
+ 825,
429
+ 467
430
+ ],
431
+ "page_idx": 3
432
+ },
433
+ {
434
+ "type": "text",
435
+ "text": "In scenario (a), we take $Y$ to be a binary variable drawn from a Bernoulli distribution with parameter $\\eta ~ \\in ~ [ 0 , 1 ]$ , and observed features are generated conditionally on $Y$ . The features $\\mathbf { x } _ { \\mathrm { a c - n s } } \\in \\mathbb { R } ^ { d _ { \\mathrm { n s } } }$ are invariant, meaning their conditional distribution given $Y$ is the same for all environments, whereas $\\mathbf { x } _ { \\mathrm { a c - s p } } \\in \\mathbb { R } ^ { d _ { \\mathrm { s p } } }$ are spurious features, as their distribution may shift between environments, altering their correlation with $Y$ . The data generating process for training environment $i \\in [ k ]$ in Fig. 2(a) is given by: ",
436
+ "bbox": [
437
+ 174,
438
+ 472,
439
+ 485,
440
+ 626
441
+ ],
442
+ "page_idx": 3
443
+ },
444
+ {
445
+ "type": "image",
446
+ "img_path": "images/c9c54db752d444327430318d78a4ec77b180334540e8a60876eb085d031a1780.jpg",
447
+ "image_caption": [
448
+ "Figure 2: Graphs describing our theoretical analysis. Features are: (a) anti-causal, some spurious while others invariant. (b) causal and may undergo covariate shift, or anti-causal and spurious. "
449
+ ],
450
+ "image_footnote": [],
451
+ "bbox": [
452
+ 508,
453
+ 476,
454
+ 813,
455
+ 555
456
+ ],
457
+ "page_idx": 3
458
+ },
459
+ {
460
+ "type": "equation",
461
+ "img_path": "images/bb1b0e168cb94bb8e71620676a5748208359570b53df2d003d63cde5bdd5711e.jpg",
462
+ "text": "$$\ny = \\left\\{ { \\begin{array} { l l } { 1 } & { \\mathsf { w . p } \\ \\eta } \\\\ { 0 } & { \\mathsf { o . w } } \\end{array} } \\right.\n$$",
463
+ "text_format": "latex",
464
+ "bbox": [
465
+ 223,
466
+ 641,
467
+ 333,
468
+ 676
469
+ ],
470
+ "page_idx": 3
471
+ },
472
+ {
473
+ "type": "equation",
474
+ "img_path": "images/1dc05fb4a77be06e4a84ffc87f4185dd7e0c5e45c47e29338da13cb09d108739.jpg",
475
+ "text": "$$\n\\begin{array} { r l } & { X _ { \\mathrm { a c - n s } } \\mid Y = y \\sim { \\mathcal N } \\left( ( y - 1 / 2 ) \\mu _ { \\mathrm { n s } } , \\Sigma _ { \\mathrm { n s } } \\right) , } \\\\ & { X _ { \\mathrm { a c - s p } } \\mid Y = y \\sim { \\mathcal N } \\left( ( y - 1 / 2 ) \\mu _ { i } , \\Sigma _ { i } \\right) . } \\end{array}\n$$",
476
+ "text_format": "latex",
477
+ "bbox": [
478
+ 457,
479
+ 641,
480
+ 732,
481
+ 680
482
+ ],
483
+ "page_idx": 3
484
+ },
485
+ {
486
+ "type": "text",
487
+ "text": "For $\\mathbf { x } = [ \\mathrm { { x } _ { a c - n s } } , \\mathrm { { x } _ { a c - s p } } ]$ we consider a linear classifier $f ( \\mathbf { x } ; \\mathbf { w } , b ) = \\sigma ( \\mathbf { w } ^ { \\top } \\mathbf { x } + b )$ , where $\\sigma : \\mathbb { R } [ 0 , 1 ]$ is some invertible function (e.g. a sigmoid). Since the mean of spurious features, $\\mu _ { i }$ , is determined by $y$ , these features can help predict the label in some environments. Yet, these correlations do not carry to all environments, and $f ( \\mathbf { x } )$ might rely on spurious correlations whenever the coefficients in w corresponding to $\\mathbf { x } _ { \\mathrm { a c - s p } }$ are non-zero. Any such classifier can suffer an arbitrarily high loss in an unseen environment, because a new environment can reverse and magnify the correlations observed in $E _ { \\mathrm { t r a i n } }$ . Using these definitions, we may now state our result for this case: ",
488
+ "bbox": [
489
+ 173,
490
+ 684,
491
+ 825,
492
+ 782
493
+ ],
494
+ "page_idx": 3
495
+ },
496
+ {
497
+ "type": "text",
498
+ "text": "Theorem 1. Given $k > 2 d _ { s p }$ training environments where data is generated according to Equation ( with parameters $\\{ \\mu _ { i } , \\Sigma _ { i } \\} _ { i = 1 } ^ { k }$ , we say they lie in general position if for all non-zero $\\mathbf { x } \\in \\mathbb { R } ^ { d _ { s p } }$ : ",
499
+ "bbox": [
500
+ 174,
501
+ 785,
502
+ 808,
503
+ 816
504
+ ],
505
+ "page_idx": 3
506
+ },
507
+ {
508
+ "type": "equation",
509
+ "img_path": "images/ff21ff383dc08345a68ad6d91fb19581351c6bb4639e6ee1ab29571d69233263.jpg",
510
+ "text": "$$\n\\dim \\left( \\operatorname { s p a n } \\left\\{ \\left[ { \\sum _ { i } \\mathbf { x } + \\mu _ { i } } \\right] \\right\\} _ { i \\in [ k ] } \\right) = d _ { s p } + 1 .\n$$",
511
+ "text_format": "latex",
512
+ "bbox": [
513
+ 346,
514
+ 820,
515
+ 648,
516
+ 863
517
+ ],
518
+ "page_idx": 3
519
+ },
520
+ {
521
+ "type": "text",
522
+ "text": "If a linear classifier is calibrated on $k$ training environments which lie in general position, then its coefficients for the features $\\mathbf { x } _ { a c - s p }$ are zero. Moreover, the set of training environments that do not lie in general position has measure zero in the set of all possible training environments $\\mathcal { E } ^ { k }$ . ",
523
+ "bbox": [
524
+ 174,
525
+ 867,
526
+ 825,
527
+ 911
528
+ ],
529
+ "page_idx": 3
530
+ },
531
+ {
532
+ "type": "text",
533
+ "text": "As a corollary, we see that calibration on training environments generalizes to calibration on $\\mathcal { E }$ . The proof of this theorem is given in the supplementary material, Section $\\mathbf { A . } 4 .$ The data generating process closely resembles the one considered by $\\pmb { \\mathbb { B 7 } }$ , who use diagonal covariance matrices. ",
534
+ "bbox": [
535
+ 173,
536
+ 90,
537
+ 825,
538
+ 133
539
+ ],
540
+ "page_idx": 4
541
+ },
542
+ {
543
+ "type": "text",
544
+ "text": "In the second scenario we consider the addition of causal features subject to covariate shift $\\mathbf { x } _ { \\mathrm { c } } \\in \\mathbb { R } ^ { d _ { \\mathrm { c } } }$ , as shown in Figure $2 \\mathsf { b }$ . The covariate shift is induced when the environments $E$ alter the distribution of the causal features $\\mathbf { x } _ { \\mathrm { c } }$ [40]. In this case, we analyze a regression problem since it is amenable to exact analysis. The data generating process for training environment $i \\in [ k ]$ is: ",
545
+ "bbox": [
546
+ 174,
547
+ 138,
548
+ 825,
549
+ 195
550
+ ],
551
+ "page_idx": 4
552
+ },
553
+ {
554
+ "type": "equation",
555
+ "img_path": "images/5a1c711fb700d90c622e765adc3dc36d49720dd6542688987d486abc949ad3b3.jpg",
556
+ "text": "$$\nX _ { c } \\sim \\mathcal { N } ( \\mu _ { i } ^ { c } , \\Sigma _ { i } ^ { c } ) ; Y = { \\mathbf { w } _ { c } ^ { * } } ^ { \\top } \\mathbf { x } _ { c } + \\xi , \\xi \\sim \\mathcal { N } ( 0 , \\sigma _ { y } ^ { 2 } )\n$$",
557
+ "text_format": "latex",
558
+ "bbox": [
559
+ 330,
560
+ 195,
561
+ 668,
562
+ 217
563
+ ],
564
+ "page_idx": 4
565
+ },
566
+ {
567
+ "type": "equation",
568
+ "img_path": "images/920f1b7acdf9786a05f12023b87ef8f294dc9c0b9575711025ba57019897d9ac.jpg",
569
+ "text": "$$\nX _ { \\mathrm { a c - s p } } = y \\mu _ { i } + \\eta , \\eta \\sim { \\mathcal N } ( \\mathbf { 0 } , \\Sigma _ { i } ) .\n$$",
570
+ "text_format": "latex",
571
+ "bbox": [
572
+ 415,
573
+ 219,
574
+ 635,
575
+ 236
576
+ ],
577
+ "page_idx": 4
578
+ },
579
+ {
580
+ "type": "text",
581
+ "text": "For $\\mathbf { x } = [ \\mathbf { x } _ { c } , \\mathbf { x } _ { \\mathrm { a c - s p } } ]$ it turns out that in this case, calibration on multiple domains forces $f ( \\mathbf { x } )$ to discard $\\mathbf { x } _ { \\mathrm { a c - s p } }$ , but also forces it to use $\\mathbf { w } _ { c } ^ { * }$ , since it characterizes $P ( \\boldsymbol { Y } \\mid \\mathbf { x } _ { c } )$ which is the invariant mechanism in this scenario. The exact statement and proof are in Section $\\mathbf { A } . 5$ of the supplement. ",
582
+ "bbox": [
583
+ 174,
584
+ 236,
585
+ 825,
586
+ 277
587
+ ],
588
+ "page_idx": 4
589
+ },
590
+ {
591
+ "type": "text",
592
+ "text": "Theorem 2 (informal). Let $f ( \\mathbf { x } ; \\mathbf { w } ) \\ = \\ \\mathbf { w } ^ { \\top } \\mathbf { x }$ be a linear regressor and assume we have $k \\mathrm { ~ > ~ }$ max $\\{ d _ { c } + 2 , d _ { s p } \\}$ training environments where data is generated according to Equation $\\textcircled { \\scriptsize { 1 3 } }$ . Under mild non-degeneracy conditions, if the regressor is calibrated across all training environments then the coefficients corresponding to $X _ { c }$ equal $\\mathbf { w } _ { c } ^ { * }$ and those that correspond to $X _ { a c - s p }$ are zero. ",
593
+ "bbox": [
594
+ 174,
595
+ 279,
596
+ 825,
597
+ 335
598
+ ],
599
+ "page_idx": 4
600
+ },
601
+ {
602
+ "type": "text",
603
+ "text": "Together, these results show calibration can generalize across environments, given that the number of environments is approximately that of the spurious features. They also show that for the settings above, the relatively stable and well-known notion of calibration implies avoiding spurious correlations. ",
604
+ "bbox": [
605
+ 174,
606
+ 344,
607
+ 826,
608
+ 386
609
+ ],
610
+ "page_idx": 4
611
+ },
612
+ {
613
+ "type": "text",
614
+ "text": "4 Related Work ",
615
+ "text_level": 1,
616
+ "bbox": [
617
+ 174,
618
+ 404,
619
+ 321,
620
+ 421
621
+ ],
622
+ "page_idx": 4
623
+ },
624
+ {
625
+ "type": "text",
626
+ "text": "As discussed in Section $^ { 2 , }$ multi-domain calibration is an instance of an invariant representation [1]. Many extensions to the above work have been proposed, e.g. [24, 3]. Yet, recent work claims that many of these approaches still fail to find invariant relations in cases of interest $\\mathbb { P } \\mathbb { 0 } , \\mathbb { B } \\mathbb { 1 } \\mathbb { B } \\mathbb { 1 }$ , where a significant challenge seems to be the gap between what is achieved by the regularization term used in practice and the goal of conditional independence $Y \\perp \\perp E \\mid \\Phi ( X )$ . Gulrajani et al. [11] give a sobering view on methods for OOD generalization, emphasizing the power of ERM and data augmentation, and the challenge of model selection. We claim that compared to the above approaches, multi-domain calibration studied here is a simpler form of invariance. Furthermore, calibration is attractive because there are standard tools to quantify it such as calibration scores $\\textcircled { \\scriptsize { 1 3 1 } }$ and a vast literature on its properties and how it can be obtained [50, 47, 30, 26, 45, 14, 36]. ",
627
+ "bbox": [
628
+ 174,
629
+ 434,
630
+ 825,
631
+ 574
632
+ ],
633
+ "page_idx": 4
634
+ },
635
+ {
636
+ "type": "text",
637
+ "text": "Learning models which generalize OOD is a fruitful area of research with many recent developments. Most work focuses on the case of Domain Adaptation where unlabeled samples are available from the target domain, including recent work on OOD calibration $[ \\overline { { | 4 8 | } }$ . However, important work has also been done on the area of our focus – the so-called “proactive” case $\\lVert \\boldsymbol { \\overline { { 4 3 } } } \\rVert$ , where no OOD samples are available whatsoever [28, 17, 38, 34, 39]. ",
638
+ "bbox": [
639
+ 174,
640
+ 579,
641
+ 825,
642
+ 648
643
+ ],
644
+ "page_idx": 4
645
+ },
646
+ {
647
+ "type": "text",
648
+ "text": "Calibration also plays an important role in uncertainty estimation for deep networks $\\mathbb { \\lVert 1 2 \\rVert }$ , and recently in fairness, where calibration on subgroups of populations is sought $[ \\textcircled { 3 5 } ]$ . This has interesting resemblance to the multiple environments calibration we consider here. A more general notion of multi-calibration has also been studied in this context $\\mathbb { \\lVert 1 6 \\rVert }$ , with recent results on sample complexity [42] which may provide tools to finite sample analysis of domain generalization. Finally, multiple methods for training calibrated models $\\boxed { 2 6 } \\boxed { 2 9 } \\boxed { 3 6 }$ have also been proposed. In Section 5 we propose a generalization of $\\overline { { \\mathbb { B } 6 } }$ to the multi-domain case to achieve multi-domain calibration. ",
649
+ "bbox": [
650
+ 174,
651
+ 655,
652
+ 825,
653
+ 752
654
+ ],
655
+ "page_idx": 4
656
+ },
657
+ {
658
+ "type": "text",
659
+ "text": "5 Proactively Achieving Multi-Domain Calibration ",
660
+ "text_level": 1,
661
+ "bbox": [
662
+ 173,
663
+ 770,
664
+ 614,
665
+ 787
666
+ ],
667
+ "page_idx": 4
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "So far we have seen a general argument why calibration can limit spurious correlations, and that in linear-Gaussian models multi-domain calibration guarantees OOD generalization. Now we turn to a more applied perspective and show how can we optimize models so they achieve this type of calibration in practice. We propose three approaches: (1) using calibration measures for model selection, (2) post-processing calibration, and (3) a calibration objective building on a method proposed by $\\bar { \\left\\| 2 6 \\right\\| }$ . Section $\\bar { \\mathbf { A . l } }$ in the supplementary provides a slightly broader introduction to notions we use here. We will assess model calibration by the Expected Calibration Error $( E C E )$ of the calibration curve $\\mathbb { \\left[ \\bigcirc \\right] }$ , which is the average deviation between model accuracy and model confidence. ",
672
+ "bbox": [
673
+ 173,
674
+ 800,
675
+ 825,
676
+ 911
677
+ ],
678
+ "page_idx": 4
679
+ },
680
+ {
681
+ "type": "text",
682
+ "text": "5.1 Model selection with average ECE ",
683
+ "text_level": 1,
684
+ "bbox": [
685
+ 176,
686
+ 90,
687
+ 450,
688
+ 106
689
+ ],
690
+ "page_idx": 5
691
+ },
692
+ {
693
+ "type": "text",
694
+ "text": "Model selection is challenging when aimed at OOD generalization. As recently observed by [11], since OOD accuracy is often at odds with In-Domain (ID) accuracy, selection based on ID validation error eliminates the advantage of domain generalization methods over vanilla ERM with data augmentation. We suggest that model selection towards OOD generalization should balance ID validation error with another observable surrogate for the stability of a model to distribution shifts between domains. Motivated by multi-domain calibration, we propose using the average ECE across training environments as this surrogate. Concretely, we propose choosing a model with lowest average ECE from those obtaining ID validation accuracy that is above a certain user-defined threshold. ",
695
+ "bbox": [
696
+ 173,
697
+ 116,
698
+ 826,
699
+ 227
700
+ ],
701
+ "page_idx": 5
702
+ },
703
+ {
704
+ "type": "text",
705
+ "text": "5.2 Post-Processing Calibration ",
706
+ "text_level": 1,
707
+ "bbox": [
708
+ 176,
709
+ 242,
710
+ 406,
711
+ 257
712
+ ],
713
+ "page_idx": 5
714
+ },
715
+ {
716
+ "type": "text",
717
+ "text": "Practitioners interested in (single-domain) calibrated models often apply post-processing calibration methods to binary classifiers, where the most widely used approach is Isotonic Regression Scaling $\\textcircled { 1 5 0 } , \\textcircled { 3 0 } \\textcircled { 1 }$ . Unlike standard calibration problems, in our case there are multiple domains to calibrate over. We give two ways of extending Isotonic Regression to the multi-domain setting, which we term “naive calibration” and “robust calibration”. Naive Calibration takes predictions of a trained model $f$ on validation data pooled from all domains and fits an isotonic regression $z ^ { * }$ . We then report the performance of $z ^ { * } \\circ f$ on the OOD test set. ",
718
+ "bbox": [
719
+ 173,
720
+ 268,
721
+ 825,
722
+ 364
723
+ ],
724
+ "page_idx": 5
725
+ },
726
+ {
727
+ "type": "text",
728
+ "text": "Robust Calibration: In a multiple domain setting, Naive calibration may produce a model that is well calibrated on the pooled data, but uncalibrated on individual environments. Since our goal is simultaneous calibration, the following alternative attempts to bound the worst-case miscalibration across training environments. For each environment $e \\in E _ { \\operatorname { t r a i n } }$ , we denote the number of validation examples we have from it by $N _ { e }$ , and by $f _ { e , i }$ the prediction of the model on the $i$ -th example. Then in a similar vein to robust optimization, we fit an isotonic regressor that solves: $z ^ { * } = \\underset { z } { \\arg \\operatorname* { m i n } } \\ \\underset { e \\in E _ { \\mathrm { t r a i n } } } { \\operatorname* { m a x } } \\ \\frac { 1 } { N _ { e } } \\sum _ { i = 1 } ^ { N _ { e } } { ( z ( f _ { e , i } ) - y _ { i } ) ^ { 2 } }$ . Since Isotonic Regression can be formulated as a quadratic program, and Equation $( 5 . 2 )$ minimizes a pointwise maximum over such objectives, we can cast Eq. $5 . 2$ as a convex program and solve with standard optimizers. We then evaluate the OOD performance of $z ^ { * } \\circ f$ . ",
729
+ "bbox": [
730
+ 173,
731
+ 366,
732
+ 826,
733
+ 529
734
+ ],
735
+ "page_idx": 5
736
+ },
737
+ {
738
+ "type": "text",
739
+ "text": "5.3 Learning with Multi-Domain Calibration Error ",
740
+ "text_level": 1,
741
+ "bbox": [
742
+ 173,
743
+ 544,
744
+ 545,
745
+ 559
746
+ ],
747
+ "page_idx": 5
748
+ },
749
+ {
750
+ "type": "text",
751
+ "text": "The above model selection and post-processing methods are easy to apply and (as we will soon see) surprisingly effective. However, both are limited in their power to learn a model that is truly well-calibrated across multiple domains. We now propose a more powerful approach: an objective function that directly penalizes calibration errors on multiple domains during training. Specifically, we propose learning a parameterized classifier $f _ { \\boldsymbol { \\theta } } ( \\mathbf { x } )$ using a learning rule of the form: $\\begin{array} { r } { \\operatorname* { m i n } _ { \\theta } \\sum _ { e \\in E _ { \\mathrm { t r a i n } } } { l ^ { e } ( f _ { \\theta } ) + \\lambda \\cdot \\bar { r } ( f _ { \\theta } ) } } \\end{array}$ , where $l : \\mathbb { R } \\times \\mathbb { R } \\to \\mathbb { R }$ is an empirical loss function (e.g. crossentropy) and $l ^ { e } ( f _ { \\theta } )$ denotes the expected loss over data from training environment $e$ , and $r ( f _ { \\theta } )$ is a regularization term over multiple environments. Using this notation the method proposed by [1] learns a classifier $f = w \\circ \\Phi$ with a regularizer given by $\\begin{array} { r } { r ( f ) = \\sum _ { e \\in E _ { \\mathrm { t r a i n } } } r _ { \\mathrm { I R M v 1 } } ^ { e } ( \\bar { f } ) } \\end{array}$ , where $r _ { \\mathrm { I R M v 1 } } ^ { e } ( f ) = \\lVert \\nabla _ { w | w = 1 } l ^ { e } ( w \\cdot \\Phi ) \\rVert ^ { 2 } \\mathrm { . }$ ",
752
+ "bbox": [
753
+ 173,
754
+ 569,
755
+ 826,
756
+ 714
757
+ ],
758
+ "page_idx": 5
759
+ },
760
+ {
761
+ "type": "text",
762
+ "text": "Our proposed regularizer $r ( f _ { \\theta } )$ is based on the work of Kumar et al. $\\left[ \\left[ 2 6 \\right] \\right]$ , who introduce a method they call Maximum Mean Calibration Error (MMCE). MMCE harnesses the power of universal kernels to express the ECE as an Integral Probability Measure, and works as follows: For a dataset $D = \\{ \\mathbf { x } _ { i } , y _ { i } \\} _ { i = 1 } ^ { m }$ , denote the confidence of a classifier on the $i$ -th example by $f _ { \\theta ; i } = \\operatorname* { m a x } \\{ f _ { \\theta } ( x _ { i } ) , 1 -$ $f _ { \\boldsymbol { \\theta } } ( x _ { i } ) \\}$ and its correctness by $c _ { i } = \\mathbb { 1 } _ { | y _ { i } - f _ { \\theta ; i } | < \\frac { 1 } { 2 } }$ . For a given universal kernel $k : \\mathbb { R } \\times \\mathbb { R } \\to \\mathbb { R }$ MMCE over the dataset $D$ is given by: $\\begin{array} { r } { r _ { \\mathrm { M M C E } } ^ { D } ( f _ { \\theta } ) = \\frac { 1 } { m ^ { 2 } } \\sum _ { i , j \\in D } { ( c _ { i } - f _ { \\theta ; i } ) ( c _ { j } - f _ { \\theta ; j } ) k ( f _ { \\theta ; i } , f _ { \\theta ; j } ) } . } \\end{array}$ Calibration Loss Over Environments (CLOvE). Given multiple training domains with a dataset $D ^ { e }$ $e \\in E _ { \\operatorname { t r a i n } }$ at our proposed regularizer by aggregating MMCE over them:. A key property of CLOvE is that its minima correspond to rCLOvE(f✓) = P e2Etrain r \nperfectly calibrated classifiers over all training domains, a consequence of the correspondence between MMCE and perfect calibration. ",
763
+ "bbox": [
764
+ 173,
765
+ 719,
766
+ 826,
767
+ 880
768
+ ],
769
+ "page_idx": 5
770
+ },
771
+ {
772
+ "type": "text",
773
+ "text": "Corollary 1 (of Thm. 1 in $\\pmb { \\mathbb { D } } \\pmb { 6 } \\|$ ). CLOvE is a proper scoring rule. That is, it equals 0 if and only if $f _ { \\boldsymbol { \\theta } } ( \\mathbf { x } )$ is perfectly calibrated for every $e \\in E _ { t r a i n }$ . ",
774
+ "bbox": [
775
+ 173,
776
+ 882,
777
+ 823,
778
+ 912
779
+ ],
780
+ "page_idx": 5
781
+ },
782
+ {
783
+ "type": "text",
784
+ "text": "Additional properties of CLOvE, such as large deviation bounds and relation to ECE, can also be derived; see results in $\\left[ \\left[ 2 6 \\right] \\right]$ for further details. In the following section, we will see how these properties translate into favorable OOD generalization in practice when training with CLOvE. ",
785
+ "bbox": [
786
+ 174,
787
+ 90,
788
+ 825,
789
+ 133
790
+ ],
791
+ "page_idx": 6
792
+ },
793
+ {
794
+ "type": "text",
795
+ "text": "6 Experiments and Results ",
796
+ "text_level": 1,
797
+ "bbox": [
798
+ 176,
799
+ 154,
800
+ 413,
801
+ 171
802
+ ],
803
+ "page_idx": 6
804
+ },
805
+ {
806
+ "type": "text",
807
+ "text": "6.1 Colored MNIST and Two-Bit Environments ",
808
+ "text_level": 1,
809
+ "bbox": [
810
+ 174,
811
+ 185,
812
+ 517,
813
+ 200
814
+ ],
815
+ "page_idx": 6
816
+ },
817
+ {
818
+ "type": "text",
819
+ "text": "In order to explore the challenges of OOD generalization and how they relate to learning from multiple environments, $\\mathbb { n }$ used the colored MNIST dataset $\\scriptstyle { \\left\\| { \\overline { { 2 1 } } } \\right\\| }$ . In this dataset certain digits tend to be colored either red or green in the train set, but the correlation between colors and digits is flipped in the OOD test set, making color a spurious feature. This dataset was then further simplified into “Two-Bit” environments by $\\bar { [ 2 0 ] }$ , who proved that the IRMv1 penalty proposed in $\\mathbb { I I }$ does not in fact achieve the correct invariant solution on the simplified setting. The Two-Bit environments problem setting has two binary features, $X _ { 1 } , X _ { 2 } \\in \\{ - 1 , 1 \\}$ , corresponding respectively to digit identity $( 0 - 4$ or $5 - 9 )$ and digit color in the original colored MNIST. The environments are parameterized by $e = ( \\alpha , \\beta ) \\in [ 0 , 1 ] ^ { 2 }$ controlling the correlation of the features with the label: ",
820
+ "bbox": [
821
+ 173,
822
+ 212,
823
+ 825,
824
+ 337
825
+ ],
826
+ "page_idx": 6
827
+ },
828
+ {
829
+ "type": "text",
830
+ "text": "$Y \\gets \\mathrm { R a d } ( 0 . 5 )$ , $\\mathbf { \\bar { \\phi } } _ { X _ { 1 } } Y \\cdot \\mathbf { \\bar { R a d } } ( \\alpha ) , X _ { 2 } Y \\cdot \\mathbf { R a d } ( \\beta )$ , where $\\operatorname { R a d } ( \\delta )$ is a random variable equal to $- 1$ with probability $\\delta$ and 1 with probability $1 - \\delta$ . At training we are given data from two environments ${ e _ { 1 } = ( \\alpha , \\beta _ { 1 } ) , e _ { 2 } = ( \\alpha , \\beta _ { 2 } ) }$ , $\\beta _ { 1 } \\neq \\beta _ { 2 }$ . The learned model is tested on a new environment $e _ { 3 } = ( \\alpha , \\beta _ { 3 } )$ with $\\beta _ { 3 }$ significantly different from $\\beta _ { 1 } , \\beta _ { 2 }$ . Only a model discarding the spurious feature $X _ { 2 }$ will maintain its accuracy moving from train to OOD test. ",
831
+ "bbox": [
832
+ 174,
833
+ 337,
834
+ 825,
835
+ 405
836
+ ],
837
+ "page_idx": 6
838
+ },
839
+ {
840
+ "type": "text",
841
+ "text": "Calibration discards spurious correlation in Two-Bit environments. Figure $3 ( \\mathrm { a } )$ , which we adapt from Figure 6 in Appendix B of $\\left[ \\left[ 2 0 \\right] \\right]$ , illustrates the merits of CLOvE in this setting. The figure shows the space of odd classifiers, i.e. those for which $f ( 1 , - 1 ) = - f ( - 1 , 1 )$ , and $f ( 1 , 1 ) = - f ( - 1 , - 1 ) . ^ { 4 }$ The true invariant classifiers are those for which in addition $f ( 1 , 1 ) = f ( 1 , - 1 )$ , corresponding to models lying on the diagonal of Figure $3 ( \\mathrm { a } )$ , denoted by the dashed gray line. In the figure, we plot in solid lines the classifiers for which $r _ { \\mathrm { I R M v 1 } } ^ { e ^ { - } } ( f )$ equals 0, and in solid circles the classifiers for which $r _ { \\mathrm { M M C E } } ^ { e } ( f )$ equals 0 (due to Corollary $^ 1$ these coincide with calibrated classifiers on environment $e$ ). MMCENote that in this parameterization, the zeros of $r _ { \\mathrm { I R M v 1 } } ^ { e } ( f )$ are lines whereas the zeros of $r _ { \\mathrm { M M C E } } ^ { e } ( f )$ are isolated points. Intersections of the zeros of $r _ { \\mathrm { I R M v 1 } } ^ { e } ( f )$ denote solutions for which the corresponding regularization terms are 0 on all respective environments, while intersection of zeros of $r _ { \\mathrm { M M C E } } ^ { \\bar { e } } ( \\bar { f } )$ are the zeros of . As observed by , when the solution denoted by $\\mathrm { O P T _ { I R M v 1 } }$ has the lowest empirical loss, yet this solution has a spurious correlation with $X _ { 2 }$ and thus will incur a higher loss on the test environment $e _ { 3 }$ . This means the corresponding IRMv1 learning rule cannot retrieve the optimal invariant classifier. On the other hand, learning with CLOvE does retrieve the optimal invariant classifier in this case, in addition to the trivial, constant classifier. This means CLOvE discards spurious correlations in cases where IRMv1 does not. In Section $\\mathbf { C }$ we present experiments reproducing the above scenario on the Colored MNIST dataset. ",
842
+ "bbox": [
843
+ 173,
844
+ 406,
845
+ 826,
846
+ 640
847
+ ],
848
+ "page_idx": 6
849
+ },
850
+ {
851
+ "type": "text",
852
+ "text": "Model selection based on average ECE We train models with varying hyperparameters on Colored MNIST using ERM, CLOvE and IRM, (100 models with each algorithm, see Section $\\mathbf { C }$ of the supplement for details). We then calculate the ECE and IRMv1 penalties of each model over a held-out validation set from each training environment, and evaluate the average of these against OOD accuracy. Figure $3 ( \\boldsymbol { \\mathbf { b } } )$ presents the results across all trained models. The ID ECE penalty displays a very strong correlation across the entire range and every training regime (Pearson corr. $= - 0 . 9 2 $ ), while ID IRMv1 behaves more erratically (Pearson corr. $= - 0 . 5 9$ ). Since quantities used for model selection should be agnostic to choices made at training time, we suggest that ID ECE is a better choice for use in model selection. Further results on model selection can be found in the supplement, Section C. ",
853
+ "bbox": [
854
+ 174,
855
+ 646,
856
+ 825,
857
+ 786
858
+ ],
859
+ "page_idx": 6
860
+ },
861
+ {
862
+ "type": "text",
863
+ "text": "6.2 WILDS Benchmarks ",
864
+ "text_level": 1,
865
+ "bbox": [
866
+ 174,
867
+ 803,
868
+ 359,
869
+ 818
870
+ ],
871
+ "page_idx": 6
872
+ },
873
+ {
874
+ "type": "text",
875
+ "text": "WILDS is a recently proposed benchmark of in-the-wild distribution shifts from several data modalities and applications5. Table $^ 1$ presents the four WILDS datasets we experiment with, chosen to represent diverse OOD generalization scenarios. We follow the models and training algorithms proposed by $\\mathbb { \\left[ \\left. 2 3 \\right] \\right. }$ . In order to perform multi-domain calibration we modify the splits to include a multi-domain validation set whenever possible. See supplemental Section $\\mathbf { B }$ for details and for additional results on Amazon Reviews. As in $\\mathbb { \\left| \\left[ 2 3 \\right] \\right| }$ , we use three different training algorithms to train our models: ERM, IRM, DeepCORAL, and further use GroupDRO for one of the datasets, compatible with WILDS version 1.0.0. We apply three calibration approaches described in $\\underline { { \\overline { { 5 . 2 } } } }$ and $\\underline { { \\boldsymbol { \\sqrt { 5 . 3 } } } }$ above to each trained model: naive calibration and robust calibration, which are post-processing methods and therefore applied on the models’ outputs; and CLOvE, which we apply as a fine-tuning approach to the top layers of each trained model. We train each (algorithm $\\times$ calibration) combination four times with different random seeds, and report average results and their standard deviations. ",
876
+ "bbox": [
877
+ 176,
878
+ 829,
879
+ 823,
880
+ 871
881
+ ],
882
+ "page_idx": 6
883
+ },
884
+ {
885
+ "type": "image",
886
+ "img_path": "images/819cb5b3e9be70a1d93ad163d736a774f5480c3e1dc8cb1009c24053abc332b0.jpg",
887
+ "image_caption": [
888
+ "Figure 3: (a) Zeros of MMCE and IRMv1 are indicated by circles and by solid lines respectively, in a color corresponding to each environment. The dashed diagonal is the space of invariant solutions. Some zeros intersect across environments, and these are therefore the domain-invariant solutions. Among the domain-invariant solutions, $\\mathrm { O P T _ { I R M v 1 } }$ has the lowest empirical loss when training on $e _ { 1 } , e _ { 2 }$ . Hence learning with IRMv1 will prefer this model over $\\mathrm { O P T _ { C L O v E } }$ , which discards the spurious correlation with $X _ { 2 }$ . (b) Correspondence between observable criteria and OOD accuracy in CMNIST. Each point corresponds to a model trained with some training algorithm (marked by color) and hyperparameter setting. Size of marker is proportional to the ratio between OOD and ID accuracies. "
889
+ ],
890
+ "image_footnote": [],
891
+ "bbox": [
892
+ 176,
893
+ 84,
894
+ 818,
895
+ 243
896
+ ],
897
+ "page_idx": 7
898
+ },
899
+ {
900
+ "type": "text",
901
+ "text": "",
902
+ "bbox": [
903
+ 173,
904
+ 369,
905
+ 826,
906
+ 496
907
+ ],
908
+ "page_idx": 7
909
+ },
910
+ {
911
+ "type": "table",
912
+ "img_path": "images/c64a0c51d2fedf2f9f057e2fd0afaa02d9b4fba343679bd9d329d7cc28910980.jpg",
913
+ "table_caption": [],
914
+ "table_footnote": [],
915
+ "table_body": "<table><tr><td>Dataset</td><td>Type</td><td>Label (y)</td><td>Input (x)</td><td>Domain (e)</td><td>Model(f(x))</td></tr><tr><td>PovertyMap</td><td>Regression</td><td>Asset Wealth Index</td><td>Satellite Image</td><td>Country</td><td>ResNet</td></tr><tr><td>Camelyon17</td><td>Binary</td><td>Tumor Tissue</td><td>Histopathological Image</td><td>Hospital</td><td>DenseNet</td></tr><tr><td>CivilComments</td><td>Binary</td><td>Comment Toxicity</td><td>Online Comment</td><td>Demographics</td><td>BERT</td></tr><tr><td>FMoW</td><td>Multi-class</td><td>Land Use Type</td><td>Satellite Image</td><td>Region</td><td>DenseNet</td></tr></table>",
916
+ "bbox": [
917
+ 186,
918
+ 508,
919
+ 810,
920
+ 582
921
+ ],
922
+ "page_idx": 7
923
+ },
924
+ {
925
+ "type": "text",
926
+ "text": "Table 1: Description of each of the datasets used in our WILDS experiments. ",
927
+ "bbox": [
928
+ 246,
929
+ 588,
930
+ 750,
931
+ 602
932
+ ],
933
+ "page_idx": 7
934
+ },
935
+ {
936
+ "type": "text",
937
+ "text": "Table $2$ presents our main results on the FMoW (left) and Camelyon17 (right) datasets. On both datasets, robust calibration already improves performance, and CLOvE then significantly outperforms robust calibration, improving performance by $7 \\%$ and $2 . 8 \\%$ (absolute) over the strongest alternative on FMoW and Camelyon17, respectively. When compared to the original model, the performance of CLOvE is even more striking, with CLOvE outperforming it by more than $1 0 \\%$ (absolute) on FMoW and $6 \\%$ on Camelyon17. Another appealing property of CLOvE is the low variance exhibited across different runs. Indeed, CLOvE has lower variance than both naive and robust calibration approaches, and has lower variance than the original (uncalibrated) model on 4 of the 6 experiments. ",
938
+ "bbox": [
939
+ 173,
940
+ 606,
941
+ 826,
942
+ 718
943
+ ],
944
+ "page_idx": 7
945
+ },
946
+ {
947
+ "type": "table",
948
+ "img_path": "images/71798603671409b77b6c2b6cf4c5622de2ad19c6a8364c4d72b40c78467209aa.jpg",
949
+ "table_caption": [],
950
+ "table_footnote": [
951
+ "Table 2: Left: worst unseen region accuracy on OOD test set in FMoW. Right: Accuracy on unseen hospital test set in Camelyon17. Orig.: original algorithm, no changes applied. Best OOD result for each domain in bold. Standard deviation across runs in brackets, lowest OOD std. is underlined. "
952
+ ],
953
+ "table_body": "<table><tr><td rowspan=\"2\">Algorithm</td><td colspan=\"4\">FMoW</td><td colspan=\"4\">Camelyon17</td></tr><tr><td>Orig.</td><td>Naive Cal.</td><td>Rob. Cal.</td><td>CLOvE</td><td>Orig.</td><td>Naive Cal.</td><td>Rob. Cal.</td><td>CLOvE</td></tr><tr><td>ERM</td><td>32.63 (0.016)</td><td>33.09 (0.021)</td><td>37.19 (0.035)</td><td>44.16 (0.018)</td><td>66.66 (0.144)</td><td>71.23 (0.089)</td><td>71.22 (0.086)</td><td>75.75 (0.049)</td></tr><tr><td>DeepCORAL</td><td>31.73 (0.01)</td><td>31.75 (0.01)</td><td>33.86 (0.016)</td><td>40.05 (0.009)</td><td>72.44 (0.044)</td><td>75.97 (0.054)</td><td>76.8 (0.065)</td><td>79.96 (0.039)</td></tr><tr><td>IRM</td><td>31.33 (0.012)</td><td>31.81 (0.016)</td><td>34.41 (0.015)</td><td>42.24 (0.014)</td><td>70.87 (0.068)</td><td>73.25 (0.066)</td><td>73.4 (0.069)</td><td>73.95 (0.061)</td></tr></table>",
954
+ "bbox": [
955
+ 205,
956
+ 732,
957
+ 790,
958
+ 835
959
+ ],
960
+ "page_idx": 7
961
+ },
962
+ {
963
+ "type": "text",
964
+ "text": "Analysis. As can be seen in Figure 4, improvements in ID calibration are associated with better OOD performance. Interestingly, when our post-processing does not improve OOD performance, it is often linked to our inability to substantially improve ID calibration. This is most visible in IRM experiments, where robust calibration is unable to outperform naive calibration both in terms ID calibration and in OOD performance. Finally, we find it interesting that merely post-processing the data (as in robust calibration) can already have such a marked effect on OOD accuracy, though still inferior to actually optimizing for multi-domain calibration as done by CLOvE. ",
965
+ "bbox": [
966
+ 173,
967
+ 882,
968
+ 825,
969
+ 911
970
+ ],
971
+ "page_idx": 7
972
+ },
973
+ {
974
+ "type": "text",
975
+ "text": "",
976
+ "bbox": [
977
+ 174,
978
+ 90,
979
+ 823,
980
+ 161
981
+ ],
982
+ "page_idx": 8
983
+ },
984
+ {
985
+ "type": "text",
986
+ "text": "Results on alternative settings. While our theoretical analysis is focused on OOD generalization of classification models, we also experiment with alternative settings from WILDS to test the power of ID calibration in improving OOD performance. Specifically, we experiment with the PovertyMap dataset, which introduces a regression task, and the CivilComments dataset, which introduces a subpopulation shift scenario for a binary classifier. As can be seen in Table $^ { 3 , }$ results on the CivilComments dataset (right), show that calibration consistently improves worstcase performance, with an average improvement of $2 1 . 5 \\%$ across training algorithms. While CLOvE does outperform naive and robust calibration on average, the gain is lower in comparison to FMoW and Camelyon17. ",
987
+ "bbox": [
988
+ 174,
989
+ 166,
990
+ 549,
991
+ 359
992
+ ],
993
+ "page_idx": 8
994
+ },
995
+ {
996
+ "type": "image",
997
+ "img_path": "images/1b6fd513e48bf56dd2b58bd52d594df89d26ec072e61e898541127612b8a275c.jpg",
998
+ "image_caption": [
999
+ "Figure 4: OOD accuracy as a function of average ECE over training domains, for all models on the Camelyon17 dataset. "
1000
+ ],
1001
+ "image_footnote": [],
1002
+ "bbox": [
1003
+ 563,
1004
+ 170,
1005
+ 820,
1006
+ 305
1007
+ ],
1008
+ "page_idx": 8
1009
+ },
1010
+ {
1011
+ "type": "text",
1012
+ "text": "In PovertyMap (left), the model solves a regression task, so we cannot use CLOvE to improve OOD performance. Still, robust calibration improves performance across all experiments, though by a smaller margin. In the case of models pre-trained by IRM, robust calibration improves OOD performance substantially, outperforming the original model by $0 . 0 8 \\%$ (absolute). Interestingly, calibration also leads to more stable results both in PovertyMap and in CivilComments, as can be seen in the standard deviation across different model runs. ",
1013
+ "bbox": [
1014
+ 174,
1015
+ 367,
1016
+ 825,
1017
+ 449
1018
+ ],
1019
+ "page_idx": 8
1020
+ },
1021
+ {
1022
+ "type": "table",
1023
+ "img_path": "images/b8a000fc4340468ddefb7adf142cac69580b5eb95a1a7c57b72ecd21f8f39cc5.jpg",
1024
+ "table_caption": [],
1025
+ "table_footnote": [
1026
+ "Table 3: Left: Pearson correlation $r$ on in-domain (ID) and OOD (unseen countries) test sets in PovertyMap. Right: worst-case group accuracy on the test set in the CivilComments dataset. "
1027
+ ],
1028
+ "table_body": "<table><tr><td rowspan=\"2\">Algorithm</td><td colspan=\"2\">PovertyMap</td><td rowspan=\"2\"></td><td rowspan=\"2\">Algorithm</td><td rowspan=\"2\"></td><td colspan=\"3\">CivilComments</td></tr><tr><td>Orig.</td><td>Naive Cal. Rob. Cal.</td><td>Orig. Naive Cal.</td><td>Rob. Cal.</td><td>CLOvE</td></tr><tr><td rowspan=\"2\">ERM</td><td>0.832</td><td>0.827</td><td>0.834</td><td rowspan=\"2\">ERM</td><td>63.65</td><td>76.98</td><td>78.99</td><td>80.39</td></tr><tr><td>(0.011)</td><td>(0.014)</td><td>(0.006)</td><td>(0.026)</td><td>(0.005)</td><td>(0.008)</td><td>(0.007)</td></tr><tr><td rowspan=\"2\">IRM</td><td>0.735</td><td>0.812</td><td>0.815</td><td rowspan=\"2\">IRM</td><td>40.61</td><td>68.97</td><td>68.92</td><td>68.45</td></tr><tr><td>(0.117)</td><td>(0.016)</td><td>(0.015)</td><td>(0.16)</td><td>(0.013)</td><td>(0.013)</td><td>(0.02)</td></tr><tr><td rowspan=\"2\">DeepCORAL</td><td>0.832</td><td>0.835</td><td>0.837</td><td rowspan=\"2\">GroupDRO</td><td>71.67</td><td>76.2</td><td>78.54</td><td>80.07</td></tr><tr><td>(0.011)</td><td>(0.009)</td><td>(0.012)</td><td>(0.007)</td><td>(0.013)</td><td>(0.008)</td><td>(0.003)</td></tr></table>",
1029
+ "bbox": [
1030
+ 205,
1031
+ 458,
1032
+ 795,
1033
+ 559
1034
+ ],
1035
+ "page_idx": 8
1036
+ },
1037
+ {
1038
+ "type": "text",
1039
+ "text": "7 Conclusion ",
1040
+ "text_level": 1,
1041
+ "bbox": [
1042
+ 174,
1043
+ 597,
1044
+ 299,
1045
+ 613
1046
+ ],
1047
+ "page_idx": 8
1048
+ },
1049
+ {
1050
+ "type": "text",
1051
+ "text": "In this paper we highlight a novel connection between multi-domain calibration and OOD generalization, arguing that such calibration can be viewed as an invariant representation. We proved in a linear setting that models calibrated on multiple domains are free of spurious correlations and therefore generalize out of domain. We then proposed multi-domain calibration as a practical and measurable surrogate for the OOD performance of a classifier. We demonstrated that actively tuning models to achieve multi-domain calibration significantly improves model performance on unseen test domains, and that in-domain calibration on a validation set is a useful criterion for model selection. A major limitation of our work is that our theoretical findings are limited to linear models in a population (as opposed to finite-sample) setting; we thus consider them more as a motivation rather than a full justification of using multi-domain calibration in practice as we do. We look forward to expanding the scope of theoretical understanding of the conditions under which multi-domain calibration can provably guarantee out-of-domain generalization, including the finite-sample setting and the analysis of specific algorithms. We also expect new practical methods, building on our findings, will help push forward the real-world ability to generalize to unseen test domains. ",
1052
+ "bbox": [
1053
+ 174,
1054
+ 627,
1055
+ 825,
1056
+ 820
1057
+ ],
1058
+ "page_idx": 8
1059
+ },
1060
+ {
1061
+ "type": "text",
1062
+ "text": "Acknowledgments ",
1063
+ "text_level": 1,
1064
+ "bbox": [
1065
+ 176,
1066
+ 839,
1067
+ 328,
1068
+ 856
1069
+ ],
1070
+ "page_idx": 8
1071
+ },
1072
+ {
1073
+ "type": "text",
1074
+ "text": "We wish to thank Ira Shavitt for his helpful comments and to Alexandre Ramé for pointing us to an error in the original manuscript. This research was partially supported by the Israel Science Foundation (grant No. 1950/19). ",
1075
+ "bbox": [
1076
+ 176,
1077
+ 869,
1078
+ 823,
1079
+ 911
1080
+ ],
1081
+ "page_idx": 8
1082
+ },
1083
+ {
1084
+ "type": "text",
1085
+ "text": "References \n[1] M. Arjovsky, L. Bottou, I. Gulrajani, and D. Lopez-Paz. Invariant risk minimization. arXiv preprint arXiv:1907.02893, 2019. \n[2] P. Bandi, O. Geessink, Q. Manson, M. Van Dijk, M. Balkenhol, M. Hermsen, B. E. Bejnordi, B. Lee, K. Paeng, A. Zhong, et al. From detection of individual metastases to classification of lymph node status at the patient level: the camelyon17 challenge. IEEE transactions on medical imaging, 38(2):550–560, 2018. \n[3] A. Bellot and M. van der Schaar. Generalization and invariances in the presence of unobserved confounding. arXiv preprint arXiv:2007.10653, 2020. \n[4] D. Borkan, L. Dixon, J. Sorensen, N. Thain, and L. Vasserman. Nuanced metrics for measuring unintended bias with real data for text classification. In Companion proceedings of the 2019 world wide web conference, pages 491–500, 2019. \n[5] G. W. Brier et al. Verification of forecasts expressed in terms of probability. Monthly weather review, 78(1):1–3, 1950. \n[6] G. Christie, N. Fendley, J. Wilson, and R. Mukherjee. Functional map of the world. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6172–6180, 2018. \n[7] M. H. DeGroot and S. E. Fienberg. The comparison and evaluation of forecasters. Journal of the Royal Statistical Society: Series D (The Statistician), 32(1-2):12–22, 1983. \n[8] S. Desai and G. Durrett. Calibration of pre-trained transformers. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 295–302, 2020. \n[9] J. Devlin, M.-W. Chang, K. Lee, and K. 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), pages 4171–4186, 2019. \n[10] J. Duchi, E. Hazan, and Y. Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of machine learning research, 12(7), 2011. \n[11] I. Gulrajani and D. Lopez-Paz. In search of lost domain generalization. arXiv preprint arXiv:2007.01434, 2020. \n[12] C. Guo, G. Pleiss, Y. Sun, and K. Q. Weinberger. On calibration of modern neural networks. In International Conference on Machine Learning, pages 1321–1330. PMLR, 2017. \n[13] R. Guo, P. Zhang, H. Liu, and E. Kiciman. Out-of-distribution prediction with invariant risk minimization: The limitation and an effective fix. arXiv preprint arXiv:2101.07732, 2021. \n[14] C. Gupta, A. Podkopaev, and A. Ramdas. Distribution-free binary classification: prediction sets, confidence intervals and calibration. Advances in Neural Information Processing Systems, 33, 2020. \n[15] K. He, X. Zhang, S. Ren, and J. Sun. Identity mappings in deep residual networks. In European conference on computer vision, pages 630–645. Springer, 2016. \n[16] U. Hébert-Johnson, M. Kim, O. Reingold, and G. Rothblum. Multicalibration: Calibration for the (computationally-identifiable) masses. In International Conference on Machine Learning, pages 1939–1948. PMLR, 2018. \n[17] C. Heinze-Deml, J. Peters, and N. Meinshausen. Invariant causal prediction for nonlinear models. Journal of Causal Inference, 6(2), 2018. \n[18] W. Hu, G. Niu, I. Sato, and M. Sugiyama. Does distributionally robust supervised learning give robust classifiers? In International Conference on Machine Learning, pages 2029–2037. PMLR, 2018. ",
1086
+ "bbox": [
1087
+ 171,
1088
+ 63,
1089
+ 828,
1090
+ 920
1091
+ ],
1092
+ "page_idx": 9
1093
+ },
1094
+ {
1095
+ "type": "text",
1096
+ "text": "[19] G. Huang, Z. Liu, L. Van Der Maaten, and K. Q. Weinberger. Densely connected convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4700–4708, 2017. ",
1097
+ "bbox": [
1098
+ 173,
1099
+ 90,
1100
+ 825,
1101
+ 133
1102
+ ],
1103
+ "page_idx": 10
1104
+ },
1105
+ {
1106
+ "type": "text",
1107
+ "text": "[20] P. Kamath, A. Tangella, D. J. Sutherland, and N. Srebro. Does invariant risk minimization capture invariance? In AISTATS, 2021. ",
1108
+ "bbox": [
1109
+ 171,
1110
+ 141,
1111
+ 823,
1112
+ 171
1113
+ ],
1114
+ "page_idx": 10
1115
+ },
1116
+ {
1117
+ "type": "text",
1118
+ "text": "[21] B. Kim, H. Kim, K. Kim, S. Kim, and J. Kim. Learning not to learn: Training deep neural networks with biased data. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9012–9020, 2019. ",
1119
+ "bbox": [
1120
+ 174,
1121
+ 178,
1122
+ 823,
1123
+ 222
1124
+ ],
1125
+ "page_idx": 10
1126
+ },
1127
+ {
1128
+ "type": "text",
1129
+ "text": "[22] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. ",
1130
+ "bbox": [
1131
+ 173,
1132
+ 229,
1133
+ 825,
1134
+ 258
1135
+ ],
1136
+ "page_idx": 10
1137
+ },
1138
+ {
1139
+ "type": "text",
1140
+ "text": "[23] P. W. Koh, S. Sagawa, H. Marklund, S. M. Xie, M. Zhang, A. Balsubramani, W. Hu, M. Yasunaga, R. L. Phillips, S. Beery, et al. Wilds: A benchmark of in-the-wild distribution shifts. arXiv preprint arXiv:2012.07421, 2020. ",
1141
+ "bbox": [
1142
+ 171,
1143
+ 266,
1144
+ 825,
1145
+ 309
1146
+ ],
1147
+ "page_idx": 10
1148
+ },
1149
+ {
1150
+ "type": "text",
1151
+ "text": "[24] D. Krueger, E. Caballero, J.-H. Jacobsen, A. Zhang, J. Binas, R. L. Priol, and A. Courville. Out-of-distribution generalization via risk extrapolation (rex). arXiv preprint arXiv:2003.00688, 2020. ",
1152
+ "bbox": [
1153
+ 173,
1154
+ 318,
1155
+ 825,
1156
+ 359
1157
+ ],
1158
+ "page_idx": 10
1159
+ },
1160
+ {
1161
+ "type": "text",
1162
+ "text": "[25] V. Kuleshov, N. Fenner, and S. Ermon. Accurate uncertainties for deep learning using calibrated regression. In International Conference on Machine Learning, pages 2796–2804. PMLR, 2018. ",
1163
+ "bbox": [
1164
+ 173,
1165
+ 368,
1166
+ 823,
1167
+ 398
1168
+ ],
1169
+ "page_idx": 10
1170
+ },
1171
+ {
1172
+ "type": "text",
1173
+ "text": "[26] A. Kumar, S. Sarawagi, and U. Jain. Trainable calibration measures for neural networks from kernel mean embeddings. In International Conference on Machine Learning, pages 2805–2814, 2018. ",
1174
+ "bbox": [
1175
+ 174,
1176
+ 405,
1177
+ 825,
1178
+ 448
1179
+ ],
1180
+ "page_idx": 10
1181
+ },
1182
+ {
1183
+ "type": "text",
1184
+ "text": "[27] J. M. Lee. Smooth manifolds. In Introduction to Smooth Manifolds, pages 1–31. Springer, 2013. ",
1185
+ "bbox": [
1186
+ 169,
1187
+ 455,
1188
+ 825,
1189
+ 472
1190
+ ],
1191
+ "page_idx": 10
1192
+ },
1193
+ {
1194
+ "type": "text",
1195
+ "text": "[28] S. Magliacane, T. van Ommen, T. Claassen, S. Bongers, P. Versteeg, and J. M. Mooij. Domain adaptation by using causal inference to predict invariant conditional distributions. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, pages 10869– 10879, 2018. ",
1196
+ "bbox": [
1197
+ 173,
1198
+ 479,
1199
+ 826,
1200
+ 536
1201
+ ],
1202
+ "page_idx": 10
1203
+ },
1204
+ {
1205
+ "type": "text",
1206
+ "text": "[29] J. Mukhoti, V. Kulharia, A. Sanyal, S. Golodetz, P. H. Torr, and P. K. Dokania. Calibrating deep neural networks using focal loss. arXiv preprint arXiv:2002.09437, 2020. ",
1207
+ "bbox": [
1208
+ 173,
1209
+ 544,
1210
+ 820,
1211
+ 574
1212
+ ],
1213
+ "page_idx": 10
1214
+ },
1215
+ {
1216
+ "type": "text",
1217
+ "text": "[30] A. Niculescu-Mizil and R. Caruana. Predicting good probabilities with supervised learning. In Proceedings of the 22nd international conference on Machine learning, pages 625–632, 2005. ",
1218
+ "bbox": [
1219
+ 173,
1220
+ 580,
1221
+ 823,
1222
+ 611
1223
+ ],
1224
+ "page_idx": 10
1225
+ },
1226
+ {
1227
+ "type": "text",
1228
+ "text": "[31] J. Nixon, M. W. Dusenberry, L. Zhang, G. Jerfel, and D. Tran. Measuring calibration in deep learning. In IEEE Conference on Computer Vision and Pattern Recognition Workshops, CVPR Workshops 2019, Long Beach, CA, USA, June 16-20, 2019, pages 38–41. Computer Vision Foundation / IEEE, 2019. ",
1229
+ "bbox": [
1230
+ 173,
1231
+ 618,
1232
+ 826,
1233
+ 675
1234
+ ],
1235
+ "page_idx": 10
1236
+ },
1237
+ {
1238
+ "type": "text",
1239
+ "text": "[32] J. Pearl. A probabilistic calculus of actions. In Uncertainty Proceedings 1994, pages 454–462. Elsevier, 1994. ",
1240
+ "bbox": [
1241
+ 173,
1242
+ 683,
1243
+ 823,
1244
+ 713
1245
+ ],
1246
+ "page_idx": 10
1247
+ },
1248
+ {
1249
+ "type": "text",
1250
+ "text": "[33] J. Pearl. Causality. Cambridge university press, 2009. ",
1251
+ "bbox": [
1252
+ 173,
1253
+ 720,
1254
+ 566,
1255
+ 736
1256
+ ],
1257
+ "page_idx": 10
1258
+ },
1259
+ {
1260
+ "type": "text",
1261
+ "text": "[34] J. Peters, P. Bühlmann, and N. Meinshausen. Causal inference by using invariant prediction: identification and confidence intervals. Journal of the Royal Statistical Society. Series B (Statistical Methodology), pages 947–1012, 2016. ",
1262
+ "bbox": [
1263
+ 173,
1264
+ 743,
1265
+ 823,
1266
+ 787
1267
+ ],
1268
+ "page_idx": 10
1269
+ },
1270
+ {
1271
+ "type": "text",
1272
+ "text": "[35] G. Pleiss, M. Raghavan, F. Wu, J. Kleinberg, and K. Q. Weinberger. On fairness and calibration. arXiv preprint arXiv:1709.02012, 2017. ",
1273
+ "bbox": [
1274
+ 173,
1275
+ 795,
1276
+ 823,
1277
+ 824
1278
+ ],
1279
+ "page_idx": 10
1280
+ },
1281
+ {
1282
+ "type": "text",
1283
+ "text": "[36] A. Rahimi, A. Shaban, C.-A. Cheng, R. Hartley, and B. Boots. Intra order-preserving functions for calibration of multi-class neural networks. Advances in Neural Information Processing Systems, 33, 2020. ",
1284
+ "bbox": [
1285
+ 174,
1286
+ 832,
1287
+ 821,
1288
+ 875
1289
+ ],
1290
+ "page_idx": 10
1291
+ },
1292
+ {
1293
+ "type": "text",
1294
+ "text": "[37] E. Rosenfeld, P. Ravikumar, and A. Risteski. The risks of invariant risk minimization. arXiv preprint arXiv:2010.05761, 2020. ",
1295
+ "bbox": [
1296
+ 173,
1297
+ 882,
1298
+ 820,
1299
+ 911
1300
+ ],
1301
+ "page_idx": 10
1302
+ },
1303
+ {
1304
+ "type": "text",
1305
+ "text": "[38] D. Rothenhäusler, N. Meinshausen, P. Bühlmann, and J. Peters. Anchor regression: heterogeneous data meets causality. arXiv preprint arXiv:1801.06229, 2018. \n[39] S. Sagawa, P. W. Koh, T. B. Hashimoto, and P. Liang. Distributionally robust neural networks for group shifts: On the importance of regularization for worst-case generalization. arXiv preprint arXiv:1911.08731, 2019. \n[40] B. Schölkopf, D. Janzing, J. Peters, E. Sgouritsa, K. Zhang, and J. Mooij. On causal and anticausal learning. arXiv preprint arXiv:1206.6471, 2012. \n[41] A. W. Senior, R. Evans, J. Jumper, J. Kirkpatrick, L. Sifre, T. Green, C. Qin, A. Zídek, A. W. R. Nelson, A. Bridgland, H. Penedones, S. Petersen, K. Simonyan, S. Crossan, P. Kohli, D. T. Jones, D. Silver, K. Kavukcuoglu, and D. Hassabis. Improved protein structure prediction using potentials from deep learning. Nat., 577(7792):706–710, 2020. \n[42] E. Shabat, L. Cohen, and Y. Mansour. Sample complexity of uniform convergence for multicalibration. arXiv preprint arXiv:2005.01757, 2020. \n[43] A. Subbaswamy, P. Schulam, and S. Saria. Preventing failures due to dataset shift: Learning predictive models that transport. In The 22nd International Conference on Artificial Intelligence and Statistics, pages 3118–3127. PMLR, 2019. \n[44] B. Sun and K. Saenko. Deep coral: Correlation alignment for deep domain adaptation. In European conference on computer vision, pages 443–450. Springer, 2016. \n[45] J. Vaicenavicius, D. Widmann, C. Andersson, F. Lindsten, J. Roll, and T. Schön. Evaluating model calibration in classification. In The 22nd International Conference on Artificial Intelligence and Statistics, pages 3459–3467. PMLR, 2019. \n[46] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin. Attention is all you need. In Advances in neural information processing systems, pages 5998–6008, 2017. \n[47] V. Vovk, G. Shafer, and I. Nouretdinov. Self-calibrating probability forecasting. In Proceedings of the 16th International Conference on Neural Information Processing Systems, pages 1133– 1140, 2003. \n[48] X. Wang, M. Long, J. Wang, and M. I. Jordan. Transferable calibration with lower bias and variance in domain adaptation. arXiv preprint arXiv:2007.08259, 2020. \n[49] C. Yeh, A. Perez, A. Driscoll, G. Azzari, Z. Tang, D. Lobell, S. Ermon, and M. Burke. Using publicly available satellite imagery and deep learning to understand economic well-being in africa. Nature communications, 11(1):1–11, 2020. \n[50] B. Zadrozny and C. Elkan. Obtaining calibrated probability estimates from decision trees and naive bayesian classifiers. In C. E. Brodley and A. P. Danyluk, editors, Proceedings of the Eighteenth International Conference on Machine Learning (ICML 2001), Williams College, Williamstown, MA, USA, June 28 - July 1, 2001, pages 609–616. Morgan Kaufmann, 2001. \n[51] J. R. Zech, M. A. Badgeley, M. Liu, A. B. Costa, J. J. Titano, and E. K. Oermann. Variable generalization performance of a deep learning model to detect pneumonia in chest radiographs: a cross-sectional study. PLoS medicine, 15(11):e1002683, 2018. ",
1306
+ "bbox": [
1307
+ 171,
1308
+ 79,
1309
+ 828,
1310
+ 786
1311
+ ],
1312
+ "page_idx": 11
1313
+ },
1314
+ {
1315
+ "type": "text",
1316
+ "text": "Checklist ",
1317
+ "text_level": 1,
1318
+ "bbox": [
1319
+ 174,
1320
+ 805,
1321
+ 254,
1322
+ 821
1323
+ ],
1324
+ "page_idx": 11
1325
+ },
1326
+ {
1327
+ "type": "text",
1328
+ "text": "1. For all authors... ",
1329
+ "bbox": [
1330
+ 214,
1331
+ 833,
1332
+ 339,
1333
+ 847
1334
+ ],
1335
+ "page_idx": 11
1336
+ },
1337
+ {
1338
+ "type": "text",
1339
+ "text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] \n(b) Did you describe the limitations of your work? [Yes] Limitations that we found most significant are discussed in Section 7 \n(c) Did you discuss any potential negative societal impacts of your work? [No] The work does not treat a specific task where we see an immediate risk for negative societal impact. Though the methods described in this paper might be used by practitioners in safety-critical domains such as healthcare, and we suggest doing so with care since the suggested methods need to be studied further in controlled settings before being used in such domains. \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] The paper conforms with the provided guidelines. ",
1340
+ "bbox": [
1341
+ 238,
1342
+ 853,
1343
+ 825,
1344
+ 912
1345
+ ],
1346
+ "page_idx": 11
1347
+ },
1348
+ {
1349
+ "type": "text",
1350
+ "text": "",
1351
+ "bbox": [
1352
+ 236,
1353
+ 92,
1354
+ 825,
1355
+ 205
1356
+ ],
1357
+ "page_idx": 12
1358
+ },
1359
+ {
1360
+ "type": "text",
1361
+ "text": "2. If you are including theoretical results... ",
1362
+ "bbox": [
1363
+ 215,
1364
+ 209,
1365
+ 493,
1366
+ 223
1367
+ ],
1368
+ "page_idx": 12
1369
+ },
1370
+ {
1371
+ "type": "text",
1372
+ "text": "(a) Did you state the full set of assumptions of all theoretical results? [Yes] Most assumptions, such as population setting (infinite data) assumption, Gaussian data and linearity of models have been given in Section $\\textcircled { 3 }$ Other assumptions regarding specific generalposition conditions under which the theorems hold are given in the supplementary material. along with detailed statements of the theorems. \n(b) Did you include complete proofs of all theoretical results? [Yes] The proofs of main theoretical claims can be found in the supplementary material. ",
1373
+ "bbox": [
1374
+ 236,
1375
+ 228,
1376
+ 825,
1377
+ 328
1378
+ ],
1379
+ "page_idx": 12
1380
+ },
1381
+ {
1382
+ "type": "text",
1383
+ "text": "3. If you ran experiments... ",
1384
+ "bbox": [
1385
+ 214,
1386
+ 332,
1387
+ 393,
1388
+ 347
1389
+ ],
1390
+ "page_idx": 12
1391
+ },
1392
+ {
1393
+ "type": "text",
1394
+ "text": "(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [No] We are preparing the code for publication and will do our best to have it ready by the end of the review period. Major parts of our code are based on existing publicly available code from papers that we cite, while noting that we used their published code. Hence some parts of our results can be reproduced quite easily by using it. \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] We specify hyperparameters and training details in the supplementary material (for both the WILDS benchmark and ColoredMNIST). When using a training setup from other works (e.g. in Colored MNIST), we give a reference to the work and specify changes we made upon their setup. \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] \n(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] ",
1395
+ "bbox": [
1396
+ 235,
1397
+ 352,
1398
+ 825,
1399
+ 565
1400
+ ],
1401
+ "page_idx": 12
1402
+ },
1403
+ {
1404
+ "type": "text",
1405
+ "text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
1406
+ "bbox": [
1407
+ 214,
1408
+ 570,
1409
+ 823,
1410
+ 584
1411
+ ],
1412
+ "page_idx": 12
1413
+ },
1414
+ {
1415
+ "type": "text",
1416
+ "text": "(a) If your work uses existing assets, did you cite the creators? [Yes] Some of the code we use is adapted from the works of $\\boxed { 1 } \\boxed { 2 0 }$ which we cite several times and specifically in Section $\\overline { { 6 } }$ with regards to the used code. Our experiments on the WILDS benchmark $\\mathbb { \\left[ \\left. 2 3 \\right] \\right. }$ use assets from the project that was also cited. \n(b) Did you mention the license of the assets? [Yes] Licenses are included in the supplementary material. \n(c) Did you include any new assets either in the supplemental material or as a URL? [No] \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [No] All assets we use are allowed for public use for the purposes of sceintific research. \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [No] The data we use is taken from publicly available datasets, where all personally identifiable information have been removed. ",
1417
+ "bbox": [
1418
+ 238,
1419
+ 589,
1420
+ 825,
1421
+ 779
1422
+ ],
1423
+ "page_idx": 12
1424
+ },
1425
+ {
1426
+ "type": "text",
1427
+ "text": "5. If you used crowdsourcing or conducted research with human subjects... ",
1428
+ "bbox": [
1429
+ 214,
1430
+ 784,
1431
+ 705,
1432
+ 797
1433
+ ],
1434
+ "page_idx": 12
1435
+ },
1436
+ {
1437
+ "type": "text",
1438
+ "text": "(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] We did not conduct research with human subjects \n(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] \n(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A] ",
1439
+ "bbox": [
1440
+ 238,
1441
+ 801,
1442
+ 825,
1443
+ 891
1444
+ ],
1445
+ "page_idx": 12
1446
+ }
1447
+ ]
parse/train/XWYJ25-yTRS/XWYJ25-yTRS_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/XWYJ25-yTRS/XWYJ25-yTRS_model.json ADDED
The diff for this file is too large to render. See raw diff