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

Add files using upload-large-folder tool

Browse files
Files changed (50) hide show
  1. parse/train/BJAA4wKxg/BJAA4wKxg.md +285 -0
  2. parse/train/BJAA4wKxg/BJAA4wKxg_content_list.json +1488 -0
  3. parse/train/BJAA4wKxg/BJAA4wKxg_middle.json +0 -0
  4. parse/train/BJAA4wKxg/BJAA4wKxg_model.json +0 -0
  5. parse/train/BJxWx0NYPr/BJxWx0NYPr.md +273 -0
  6. parse/train/BJxWx0NYPr/BJxWx0NYPr_content_list.json +1441 -0
  7. parse/train/BJxWx0NYPr/BJxWx0NYPr_middle.json +0 -0
  8. parse/train/BJxWx0NYPr/BJxWx0NYPr_model.json +0 -0
  9. parse/train/HJx-akSKPS/HJx-akSKPS.md +394 -0
  10. parse/train/HJx-akSKPS/HJx-akSKPS_content_list.json +0 -0
  11. parse/train/HJx-akSKPS/HJx-akSKPS_middle.json +0 -0
  12. parse/train/HJx-akSKPS/HJx-akSKPS_model.json +0 -0
  13. parse/train/Hyg9anEFPS/Hyg9anEFPS.md +294 -0
  14. parse/train/Hyg9anEFPS/Hyg9anEFPS_content_list.json +1632 -0
  15. parse/train/Hyg9anEFPS/Hyg9anEFPS_middle.json +0 -0
  16. parse/train/Hyg9anEFPS/Hyg9anEFPS_model.json +0 -0
  17. parse/train/Rcmk0xxIQV/Rcmk0xxIQV.md +553 -0
  18. parse/train/Rcmk0xxIQV/Rcmk0xxIQV_content_list.json +0 -0
  19. parse/train/Rcmk0xxIQV/Rcmk0xxIQV_middle.json +0 -0
  20. parse/train/Rcmk0xxIQV/Rcmk0xxIQV_model.json +0 -0
  21. parse/train/SJgndT4KwB/SJgndT4KwB.md +0 -0
  22. parse/train/SJgndT4KwB/SJgndT4KwB_content_list.json +0 -0
  23. parse/train/SJgndT4KwB/SJgndT4KwB_middle.json +0 -0
  24. parse/train/SJgndT4KwB/SJgndT4KwB_model.json +0 -0
  25. parse/train/kyaIeYj4zZ/kyaIeYj4zZ.md +302 -0
  26. parse/train/kyaIeYj4zZ/kyaIeYj4zZ_content_list.json +1685 -0
  27. parse/train/kyaIeYj4zZ/kyaIeYj4zZ_middle.json +0 -0
  28. parse/train/kyaIeYj4zZ/kyaIeYj4zZ_model.json +0 -0
  29. parse/train/r1dHXnH6-/r1dHXnH6-.md +304 -0
  30. parse/train/r1dHXnH6-/r1dHXnH6-_content_list.json +1558 -0
  31. parse/train/r1dHXnH6-/r1dHXnH6-_middle.json +0 -0
  32. parse/train/r1dHXnH6-/r1dHXnH6-_model.json +0 -0
  33. parse/train/rJecbgHtDH/rJecbgHtDH.md +504 -0
  34. parse/train/rJecbgHtDH/rJecbgHtDH_content_list.json +0 -0
  35. parse/train/rJecbgHtDH/rJecbgHtDH_middle.json +0 -0
  36. parse/train/rJecbgHtDH/rJecbgHtDH_model.json +0 -0
  37. parse/train/rJgbSn09Ym/rJgbSn09Ym.md +290 -0
  38. parse/train/rJgbSn09Ym/rJgbSn09Ym_content_list.json +1584 -0
  39. parse/train/rJgbSn09Ym/rJgbSn09Ym_middle.json +0 -0
  40. parse/train/rJgbSn09Ym/rJgbSn09Ym_model.json +0 -0
  41. parse/train/rJxXDsCqYX/rJxXDsCqYX.md +288 -0
  42. parse/train/rJxXDsCqYX/rJxXDsCqYX_content_list.json +1590 -0
  43. parse/train/rJxXDsCqYX/rJxXDsCqYX_middle.json +0 -0
  44. parse/train/rJxXDsCqYX/rJxXDsCqYX_model.json +0 -0
  45. parse/train/rndqBJsGoKh/rndqBJsGoKh.md +284 -0
  46. parse/train/rndqBJsGoKh/rndqBJsGoKh_content_list.json +1228 -0
  47. parse/train/rndqBJsGoKh/rndqBJsGoKh_middle.json +0 -0
  48. parse/train/rndqBJsGoKh/rndqBJsGoKh_model.json +0 -0
  49. parse/train/rylqooRqK7/rylqooRqK7.md +496 -0
  50. parse/train/rylqooRqK7/rylqooRqK7_middle.json +0 -0
parse/train/BJAA4wKxg/BJAA4wKxg.md ADDED
@@ -0,0 +1,285 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # A CONVOLUTIONAL ENCODER MODEL FOR NEURAL MACHINE TRANSLATION
2
+
3
+ Jonas Gehring, Michael Auli, David Grangier, Yann N. Dauphin Facebook AI Research
4
+
5
+ # ABSTRACT
6
+
7
+ The prevalent approach to neural machine translation relies on bi-directional LSTMs to encode the source sentence. In this paper we present a faster and simpler architecture based on a succession of convolutional layers. This allows to encode the entire source sentence simultaneously compared to recurrent networks for which computation is constrained by temporal dependencies. On WMT’16 English-Romanian translation we achieve competitive accuracy to the state-of-theart and we outperform several recently published results on the WMT’15 EnglishGerman task. Our models obtain almost the same accuracy as a very deep LSTM setup on WMT’14 English-French translation. Our convolutional encoder speeds up CPU decoding by more than two times at the same or higher accuracy as a strong bi-directional LSTM baseline.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Neural machine translation (NMT) is an end-to-end approach to machine translation (Sutskever et al., 2014). The most successful approach to date encodes the source sentence with a bi-directional recurrent neural network (RNN) into a variable length representation and then generates the translation left-to-right with another RNN where both components interface via a soft-attention mechanism (Bahdanau et al., 2015; Luong et al., 2015a; Bradbury & Socher, 2016; Sennrich et al., 2016b). The recurrent networks are typically parameterized as long short term memory networks (LSTM; Hochreiter et al. 1997) or gated recurrent units (GRU; Cho et al. 2014), often with residual or skip connections (Wu et al., 2016; Zhou et al., 2016) to enable stacking of several layers (§2).
12
+
13
+ There have been several attempts to use convolutional encoder models for neural machine translation in the past but they were either only applied to rescoring n-best lists of classical systems (Kalchbrenner & Blunsom, 2013) or were not competitive to recurrent alternatives (Cho et al., 2014a). This is despite several attractive properties of convolutional networks. For example, convolutional networks operate over a fixed-size window of the input sequence which enables the simultaneous computation of all features for a source sentence. This contrasts with RNNs which maintain a hidden state of the entire past that prevents parallel computation within a sequence.
14
+
15
+ Furthermore, a succession of convolutional layers provides a shorter path to capture relationships between elements of a sequence compared to recurrent networks.1 This also eases learning because the resulting tree-structure applies a fixed number of non-linearities compared to a recurrent neural network. Because processing is bottom-up, all words undergo the same number of transformations, whereas for recurrent networks the first word is over-processed and the last word is transformed only once.
16
+
17
+ In this paper we show that an architecture based on convolutional layers is very competitive to recurrent encoders. We investigate simple average pooling as well as parameterized convolutions as an alternative for recurrent encoders and enable very deep convolutional encoders by using residual connections (He et al., 2015; §3).
18
+
19
+ We experiment on several standard datasets and compare our approach to variants of recurrent encoders such as uni-directional and bi-directional LSTMs. On WMT’16 English-Romanian translation we achieve accuracy that is very competitive to the current state-of-the-art single system result. We perform competitively on WMT’15 English-German, and nearly match the performance of the best WMT’14 English-French system based on a deep LSTM setup when comparing on a commonly used subset of the training data (Zhou et al. 2016; §4, §5).
20
+
21
+ # 2 RECURRENT NEURAL MACHINE TRANSLATION
22
+
23
+ The general architecture of the models in this work follows the encoder-decoder approach with soft attention first introduced in Bahdanau et al. (2015). A source sentence $\mathbf { x } = ( x _ { 1 } , \dots , x _ { m } )$ of $m$ words is processed by an encoder which outputs a sequence of states $\mathbf { z } = ( z _ { 1 } . \dots . , z _ { m } )$ .
24
+
25
+ The decoder is an RNN network that computes a new hidden state $s _ { i + 1 }$ based on the previous state $s _ { i }$ , an embedding $g _ { i }$ of the previous target language word $y _ { i }$ , as well as a conditional input $c _ { i }$ derived from the encoder output $\mathbf { z }$ . We use LSTMs (Hochreiter & Schmidhuber, 1997) for all decoder networks whose state $s _ { i }$ comprises of a cell vector and a hidden vector $h _ { i }$ which is output by the LSTM at each time step. We input $c _ { i }$ into the LSTM by concatenating it to $g _ { i }$ .
26
+
27
+ The translation model computes a distribution over the $V$ possible target words $y _ { i + 1 }$ by transforming the LSTM output $h _ { i }$ via a linear layer with weights $W _ { o }$ and bias $b _ { o }$ :
28
+
29
+ $$
30
+ p ( y _ { i + 1 } | y _ { 1 } , \dots , y _ { i } , \mathbf { x } ) = \mathrm { s o f t m a x } ( W _ { o } h _ { i + 1 } + b _ { o } ) \in \mathbb { R } ^ { V }
31
+ $$
32
+
33
+ The conditional input $c _ { i }$ at time $i$ is computed via a simple dot-product style attention mechanism (Luong et al., 2015a). Specifically, we transform the decoder hidden state $h _ { i }$ by a linear layer with weights $W _ { d }$ and $b _ { d }$ to match the size of the embedding of the previous target word $g _ { i }$ and then sum the two representations to yield $d _ { i }$ . Conditional input $c _ { i }$ is a weighted sum of attention scores $\mathbf { a _ { i } } \in \mathbb { R } ^ { m }$ and encoder outputs $\mathbf { z }$ . The attention scores $\mathbf { a _ { i } }$ are determined by a dot product between $h _ { i }$ with each $z _ { j }$ , followed by a softmax over the source sequence:
34
+
35
+ $$
36
+ d _ { i } = W _ { d } h _ { i } + b _ { d } + g _ { i } a _ { i j } \qquad a _ { i j } = { \frac { \exp \left( d _ { i } ^ { T } z _ { j } \right) } { \sum _ { t = 1 } ^ { m } \exp \left( d _ { i } ^ { T } z _ { t } \right) } } \qquad c _ { i } = \sum _ { j = 1 } ^ { m } a _ { i j } z _ { j }
37
+ $$
38
+
39
+ In preliminary experiments, we did not find the MLP attention of Bahdanau et al. (2015) to perform significantly better in terms of BLEU nor perplexity. However, we found the dot-product attention to be more favorable in terms of training and evaluation speed.
40
+
41
+ We use bi-directional LSTMs to implement recurrent encoders similar to Zhou et al. (2016) which achieved some of the best WMT14 English-French results reported to date. First, each word of the input sequence $\mathbf { x }$ is embedded in distributional space resulting in $\mathbf { e } = ( e _ { 1 } , \hdots , e _ { m } )$ . The embeddings are input to two stacks of uni-directional RNNs where the output of each layer is reversed before being fed into the next layer. The first stack takes the original sequence while the second takes the reversed input sequence; the output of the second stack is reversed so that the final outputs of the stacks align. Finally, the top-level hidden states of the two stacks are concatenated and fed into a linear layer to yield $\mathbf { z }$ . We denote this encoder architecture as BiLSTM.
42
+
43
+ # 3 NON-RECURRENT ENCODERS
44
+
45
+ # 3.1 POOLING ENCODER
46
+
47
+ A simple baseline for non-recurrent encoders is the pooling model described in Ranzato et al. (2015) which simply averages the embeddings of $k$ consecutive words. Averaging word embeddings does not convey positional information besides that the words in the input are somewhat close to each other. As a remedy, we add position embeddings to encode the absolute position of each source word within a sentence. Each source embedding $e _ { j }$ therefore contains a position embedding $l _ { j }$ as well as the word embedding $w _ { j }$ . Position embeddings have also been found helpful in memory networks for question-answering and language modeling (Sukhbaatar et al., 2015). Similar to the recurrent encoder $( \ S 2 )$ , the attention scores $a _ { i j }$ are computed from the pooled representations $z _ { j }$ , however, the conditional input $c _ { i }$ is a weighted sum of the embeddings $e _ { j }$ , not $z _ { j }$ , i.e.,
48
+
49
+ ![](images/a75dbefac78decd2eaf90ee2deaf5a98209573d177f6d26e1f82004121c66064.jpg)
50
+ Figure 1: Neural machine translation model with single-layer convolutional encoder networks CNN- $\mathrm { a }$ is on the left and CNN-c is at the right. Embedding layers are not shown.
51
+
52
+ $$
53
+ e _ { j } = w _ { j } + l _ { j } \qquad z _ { j } = { \frac { 1 } { k } } \sum _ { t = - \lfloor k / 2 \rfloor } ^ { \lfloor k / 2 \rfloor } e _ { j + t } \qquad c _ { i } = \sum _ { j = 1 } ^ { m } a _ { i j } e _ { j }
54
+ $$
55
+
56
+ The input sequence is padded prior to pooling such that the encoder output matches the input length $| \mathbf { z } | = | \mathbf { x } |$ . We set $k$ to 5 in all experiments as Ranzato et al. (2015).
57
+
58
+ # 3.2 CONVOLUTIONAL ENCODER
59
+
60
+ A straightforward extension of pooling is to learn the kernel in a convolutional neural network (CNN). The encoder output $z _ { j }$ contains information about a fixed-sized context depending on the kernel width $k$ but the desired context width may vary. This can be addressed by stacking several layers of convolutions followed by non-linearities: additional layers increase the total context size while non-linearities can modulate the effective size of the context as needed. For instance, stacking 5 convolutions with kernel width $k = 3$ results in an input field of 11 words, i.e., each output depends on 11 input words, and the non-linearities allow the encoder to exploit the full input field, or to concentrate on fewer words as needed.
61
+
62
+ To ease learning for deep encoders, we add residual connections from the input of each convolution to the output and then apply the non-linear activation function to the output (tanh; He et al., 2015); the non-linearities are therefore not ’bypassed’. Multi-layer CNNs are constructed by stacking several blocks on top of each other. The CNNs do not contain pooling layers which are commonly used for down-sampling, i.e., the full source sequence length will be retained after the network has been applied. Similar to the pooling model, the convolutional encoder uses position embeddings.
63
+
64
+ The final encoder consists of two stacked convolutional networks (Figure 1): CNN-a produces the encoder output $z _ { j }$ to compute the attention scores $\mathbf { a _ { i } }$ , while the conditional input $c _ { i }$ to the decoder is computed by summing the outputs of CNN-c,
65
+
66
+ $$
67
+ z _ { j } = \mathrm { C N N - a } ( \mathbf { e } ) _ { j }
68
+ $$
69
+
70
+ $$
71
+ c _ { i } = \sum _ { j = 1 } ^ { m } a _ { i j } \mathrm { C N N - c } ( \mathbf { e } ) _ { j } .
72
+ $$
73
+
74
+ In practice, we found that two different CNNs resulted in better perplexity as well as BLEU compared to using a single one (§5.3). We also found this to perform better than directly summing the $e _ { i }$ without transformation as for the pooling model.
75
+
76
+ # 3.3 RELATED WORK
77
+
78
+ There are several past attempts to use convolutional encoders for neural machine translation, however, to our knowledge none of them were able to match the performance of recurrent encoders. Kalchbrenner & Blunsom (2013) introduce a convolutional sentence encoder in which a multi-layer CNN generates a fixed sized embedding for a source sentence, or an n-gram representation followed by transposed convolutions for directly generating a per-token decoder input. The latter requires the length of the translation prior to generation and both models were evaluated by rescoring the output of an existing translation system. Cho et al. (2014a) propose a gated recursive CNN which is repeatedly applied until a fixed-size representation is obtained but the recurrent encoder achieves higher accuracy. In follow-up work, the authors improved the model via a soft-attention mechanism but did not re-consider convolutional encoder models (Bahdanau et al., 2015).
79
+
80
+ Concurrently to our work, Kalchbrenner et al. (2016) have introduced convolutional translation models without an explicit attention mechanism but their approach does not yet result in state-of-the-art accuracy. Lamb & Xie (2016) also proposed a multi-layer CNN to generate a fixed-size encoder representation but their work lacks quantitative evaluation in terms of BLEU. Meng et al. (2015) and Tu et al. (2015) applied convolutional models to score phrase-pairs of traditional phrase-based and dependency-based translation models. Convolutional architectures have also been successful in language modeling but so far failed to outperform LSTMs (Pham et al., 2016).
81
+
82
+ # 4 EXPERIMENTAL SETUP
83
+
84
+ # 4.1 DATASETS
85
+
86
+ We evaluate different encoders and ablate architectural choices on a small dataset from the GermanEnglish machine translation track of IWSLT 2014 (Cettolo et al., 2014) with a similar setting to Ranzato et al. (2015). Unless otherwise stated, we restrict training sentences to have no more than 175 words; test sentences are not filtered. This is a higher threshold compared to other publications but ensures proper training of the position embeddings for non-recurrent encoders; the length threshold did not significantly effect recurrent encoders. Length filtering results in 167K sentence pairs and we test on the concatenation of tst2010, tst2011, tst2012, tst2013 and dev2010 comprising 6948 sentence pairs.2 Our final results are on three major WMT tasks:
87
+
88
+ WMT’16 English-Romanian. We use the same data and pre-processing as Sennrich et al. (2016b) and train on 2.8M sentence pairs.3 Our model is word-based instead of relying on byte-pair encoding (Sennrich et al., 2016a). We evaluate on newstest2016.
89
+
90
+ WMT’15 English-German. We use all available parallel training data, namely Europarl v7, Common Crawl and News Commentary v10 and apply the standard Moses tokenization to obtain 3.9M sentence pairs (Koehn et al., 2007). We report results on newstest2015.
91
+
92
+ WMT’14 English-French. We use a commonly used subset of 12M sentence pairs (Schwenk, 2014), and remove sentences longer than 150 words. This results in $1 0 . 7 \mathbf { M }$ sentence-pairs for training. Results are reported on ntst14.
93
+
94
+ A small subset of the training data serves as validation set $5 \%$ for IWSLT’14 and $1 \%$ for WMT) for early stopping and learning rate annealing (§4.3). For IWSLT’14, we replace words that occur fewer than 3 times with a <unk $>$ symbol, which results in a vocabulary of 24158 English and 35882 German word types. For WMT datasets, we retain 200K source and 80K target words. For EnglishFrench only, we set the target vocabulary to 30K types to be comparable with previous work.
95
+
96
+ # 4.2 MODEL PARAMETERS
97
+
98
+ We use 512 hidden units for both recurrent encoders and decoders. We reset the decoder hidden states to zero between sentences. For the convolutional encoder, 512 hidden units are used for each layer in CNN-a, while layers in CNN-c contain 256 units each. All embeddings, including the output produced by the decoder before the final linear layer, are of 256 dimensions. On the WMT corpora, we find that we can improve the performance of the bi-directional LSTM models (BiLSTM) by using 512-dimensional word embeddings.
99
+
100
+ Model weights are initialized from a uniform distribution within $[ - 0 . 0 5 , 0 . 0 5 ]$ . For convolutional layers, we use a uniform distribution of $[ - k d ^ { - 0 . 5 } , k d ^ { - 0 . 5 } ]$ , where $k$ is the kernel width (we use 3 throughout this work) and $d$ is the input size for the first layer and the number of hidden units for subsequent layers (Collobert et al., 2011b). For CNN-c, we transform the input and output with a linear layer each to match the smaller embedding size. The model parameters were tuned on IWSLT’14 and cross-validated on the larger WMT corpora.
101
+
102
+ # 4.3 OPTIMIZATION
103
+
104
+ Recurrent models are trained with Adam as we found them to benefit from aggressive optimization. We use a step width of $3 . 1 2 5 \cdot 1 0 ^ { - 4 }$ and early stopping based on validation perplexity (Kingma & Ba, 2014). For non-recurrent encoders, we obtain best results with stochastic gradient descent (SGD) and annealing: we use a learning rate of 0.1 and once the validation perplexity stops improving, we reduce the learning rate by an order of magnitude each epoch until it falls below $1 \bar { 0 } ^ { - 4 }$ .
105
+
106
+ For all models, we use mini-batches of 32 sentences for IWSLT’14 and 64 for WMT. We use truncated back-propagation through time to limit the length of target sequences per mini-batch to 25 words. Gradients are normalized by the mini-batch size. We re-normalize the gradients if their norm exceeds 25 (Pascanu et al., 2013). Gradients of convolutional layers are scaled by $\mathrm { s q r t } ( \mathrm { d i m } ( i n p u t ) ) ^ { - 1 }$ similar to Collobert et al. (2011b). We use dropout on the embeddings and decoder outputs $h _ { i }$ with a rate of 0.2 for IWSLT’14 and 0.1 for WMT (Srivastava et al., 2014). All models are implemented in Torch (Collobert et al., 2011a) and trained on a single GPU.
107
+
108
+ # 4.4 EVALUATION
109
+
110
+ We report accuracy of single systems by training several identical models with different random seeds (5 for IWSLT’14, 3 for WMT) and pick the one with the best validation perplexity for final BLEU evaluation. Translations are generated by a beam search and we normalize log-likelihood scores by sentence length. On IWSLT’14 we use a beam width of 10 and for WMT models we tune beam width and word penalty on a separate test set, that is newsdev2016 for WMT’16 EnglishRomanian, newstest2014 for WMT’15 English-German and ntst1213 for WMT’14 English-French.4 The word penalty adds a constant factor to log-likelihoods, except for the end-of-sentence token.
111
+
112
+ Prior to scoring the generated translations against the respective references, we perform unknown word replacement based on attention scores (Jean et al., 2015). Unknown words are replaced by looking up the source word with the maximum attention score in a pre-computed dictionary. If the dictionary contains no translation, then we simply copy the source word. Dictionaries were extracted from the aligned training data that was aligned with fast align (Dyer et al., 2013). Each source word is mapped to the target word it is most frequently aligned to.
113
+
114
+ For convolutional encoders with stacked CNN-c layers we noticed for some models that the attention maxima were consistently shifted by one word. We determine this per-model offset on the abovementioned development sets and correct for it. Finally, we compute case-sensitive tokenized BLEU, except for WMT’16 English-Romanian where we use detokenized BLEU to be comparable with Sennrich et al. (2016b).5
115
+
116
+ # 5 RESULTS
117
+
118
+ # 5.1 RECURRENT VS. NON-RECURRENT ENCODERS
119
+
120
+ We first compare recurrent and non-recurrent encoders in terms of perplexity and BLEU on IWSLT’14 with and without position embeddings (§3.1) and include a phrase-based system (Koehn et al., 2007). Table 1 shows that a single-layer convolutional model with position embeddings (Convolutional) can outperform both a uni-directional LSTM encoder (LSTM) as well as a bi-directional LSTM encoder (BiLSTM). Next, we increase the depth of the convolutional encoder. We choose a good setting by independently varying the number of layers in CNN-a and CNN-c between 1 and 10 and obtained best validation set perplexity with six layers for CNN-a and three layers for CNN-c.
121
+
122
+ Table 1: Accuracy of encoders with position features (words $^ +$ pos) and without (words) in terms of BLEU and perplexity (PPL) on IWSLT’14 German to English translation; results include unknown word replacement. Deep Convolutional 6/3 is the only multi-layer configuration, more layers for the LSTMs did not improve accuracy on this dataset.
123
+
124
+ <table><tr><td>System/Encoder</td><td>BLEU words + pos</td><td>BLEU words</td><td>PPL words + pos</td></tr><tr><td>Phrase-based</td><td>1</td><td>28.4</td><td>1</td></tr><tr><td>LSTM</td><td>27.4</td><td>27.3</td><td>10.8</td></tr><tr><td>BiLSTM</td><td>29.7</td><td>29.8</td><td>9.9</td></tr><tr><td>Pooling</td><td>26.1</td><td>19.7</td><td>11.0</td></tr><tr><td>Convolutional</td><td>29.9</td><td>20.1</td><td>9.1</td></tr><tr><td>Deep Convolutional 6/3</td><td>30.4</td><td>25.2</td><td>8.9</td></tr></table>
125
+
126
+ This configuration outperforms BiLSTM by 0.7 BLEU (Deep Convolutional $^ { 6 / 3 }$ ). We investigate depth in the convolutional encoder more in $\ S 5 . 3$ .
127
+
128
+ Among recurrent encoders, the BiLSTM is 2.3 BLEU better than the uni-directional version. The simple pooling encoder which does not contain any parameters is only 1.3 BLEU lower than a uni-directional LSTM encoder and 3.6 BLEU lower than BiLSTM. The results without position embeddings (words) show that position information is crucial for convolutional encoders. In particular for shallow models (Pooling and Convolutional), whereas deeper models are less effected. Recurrent encoders do not benefit from explicit position information because this information can be naturally extracted through the sequential computation.
129
+
130
+ When tuning model settings, we generally observe good correlation between perplexity and BLEU. However, for convolutional encoders perplexity gains translate to smaller BLEU improvements compared to recurrent counterparts (Table 1). We observe a similar trend on larger datasets.
131
+
132
+ # 5.2 EVALUATION ON WMT CORPORA
133
+
134
+ Next, we evaluate the BiLSTM encoder and the convolutional encoder architecture on three larger tasks and compare against previously published results. On WMT’16 English-Romanian translation we compare to Sennrich et al. (2016b), the winning single system entry for this language pair. Their model consists of a bi-directional GRU encoder, a GRU decoder and MLP-based attention. They use byte pair encoding (BPE) to achieve open-vocabulary translation and dropout in all components of the neural network to achieve 28.1 BLEU; we use the same pre-processing but no BPE (§4).
135
+
136
+ The results (Table 2) show that a deep convolutional encoder performs competitively to the state of the art on this dataset (Sennrich et al., 2016b). Our bi-directional LSTM encoder baseline is 0.7 BLEU lower than Sennrich et al. (2016b) but uses only 512 hidden units compared to 1024. A single-layer convolutional encoder with embedding size 256 performs very competitively at 27.1 BLEU which is only 0.3 BLEU below the BiLSTM baseline. Increasing the number of convolutional layers to 8 in CNN-a and 4 in CNN-c achieves 27.8 BLEU which performs well above this baseline.
137
+
138
+ On WMT’15 English to German, we compare to a BiLSTM baseline and prior work: Jean et al. (2015) introduce a large output vocabulary; the decoder of Chung et al. (2016) operates on the character-level; Yang et al. (2016) uses LSTMs instead of GRUs and feeds the conditional input to the output layer as well as to the decoder.
139
+
140
+ Our single-layer BiLSTM baseline performs competitively compared to prior work and a two-layer BiLSTM performs about 0.4 BLEU better at 23.6 BLEU. Previous work also used multi-layer setups, e.g., Chung et al. (2016) has two layers both in the encoder and the decoder with 1024 hidden units, and Yang et al. (2016) use 1000 hidden units per LSTM. We use 512 hidden units for both LSTM and convolutional encoders. A single-layer CNN encoder (Convolutional) achieves 22.0 BLEU which is significantly lower than the two-layer BiLSTM. However, adding additional layers (Deep Convolutional 8/4) achieves the same accuracy as the two-layer BiLSTM and a 15 layer CNN-a outperforms it by 0.7 BLEU (Deep Convolutional 15/5). The latter performs competitively to the best published results which use decoder improvements that may benefit our setup as well.
141
+
142
+ Table 2: Accuracy on three WMT tasks, including results published in previous work. For deep convolutional encoders, we include the number of layers in CNN-a and CNN-c, respectively.
143
+
144
+ <table><tr><td>WMT&#x27;16 English-Romanian</td><td>Encoder</td><td>Vocabulary</td><td>BLEU</td></tr><tr><td>Sennrich et al. (2016b)</td><td>BiGRU</td><td>BPE 90K</td><td>28.1</td></tr><tr><td>Single-layer decoder</td><td>BiLSTM</td><td>80K</td><td>27.4</td></tr><tr><td></td><td>Convolutional</td><td>80K</td><td>27.1</td></tr><tr><td></td><td>Deep Convolutional 8/4</td><td>80K</td><td>27.8</td></tr><tr><td>WMT&#x27;15 English-German</td><td>Encoder</td><td>Vocabulary</td><td>BLEU</td></tr><tr><td>Jean et al. (2015) RNNsearch-LV</td><td>BiGRU</td><td>500K</td><td>22.4</td></tr><tr><td>Chung et al. (2016) BPE-Char</td><td>BiGRU</td><td>Char 500</td><td>23.9</td></tr><tr><td>Yang et al. (2016) RNNSearch + UNK replace</td><td>BiLSTM</td><td>50K</td><td>24.3</td></tr><tr><td>+recurrent attention</td><td>BiLSTM</td><td>50K</td><td>25.0</td></tr><tr><td>Single-layer decoder</td><td>BiLSTM</td><td>80K</td><td>23.2</td></tr><tr><td></td><td>2-layer BiLSTM</td><td>80K</td><td>23.6</td></tr><tr><td></td><td>Convolutional</td><td>80K</td><td>22.0</td></tr><tr><td></td><td>Deep Convolutional 8/4</td><td>80K</td><td>23.6</td></tr><tr><td></td><td>Deep Convolutional 15/5</td><td>80K</td><td>24.3</td></tr><tr><td>WMT&#x27;14 English-French (12M)</td><td></td><td></td><td></td></tr><tr><td>Bahdanau et al. (2015) RNNsearch</td><td>Encoder</td><td>Vocabulary</td><td>BLEU</td></tr><tr><td>Luong et al. (20i5b) Single LSTM</td><td>BiGRU</td><td>30K</td><td>28.5</td></tr><tr><td></td><td>6-layer LSTM</td><td>40K</td><td>32.7</td></tr><tr><td>Jean et al. (2014) RNNsearch-LV</td><td>BiGRU</td><td>500K</td><td>34.6</td></tr><tr><td>Zhou et al. (2016) Deep-Att</td><td>Deep BiLSTM</td><td>30K</td><td>35.9</td></tr><tr><td>Single-layer decoder</td><td>BiLSTM</td><td>30K</td><td>34.6</td></tr><tr><td></td><td>Deep Convolutional 8/4</td><td>30K</td><td>34.6</td></tr><tr><td>Two-layer decoder</td><td>2-layer BiLSTM</td><td>30K</td><td>35.3</td></tr><tr><td></td><td>Deep Convolutional 20/5</td><td>30K</td><td>35.7</td></tr></table>
145
+
146
+ Finally, we evaluate on the larger WMT’14 English-French corpus. On this dataset the recurrent architectures benefit from an additional layer both in the encoder and the decoder. For a singlelayer decoder, a deep convolutional encoder matches the BiLSTM accuracy and for a two-layer decoder, our very deep convolutional encoder with up to 20 layers outperforms the BiLSTM by 0.4 BLEU. It has $40 \%$ fewer parameters than the BiLSTM due to the smaller embedding sizes. We also outperform several previous systems, including the very deep encoder-decoder model proposed by Luong et al. (2015a). Our best result is just 0.2 BLEU below Zhou et al. (2016) who use a very deep LSTM setup with a 9-layer encoder, a 7-layer decoder, shortcut connections and extensive regularization with dropout and L2 regularization.
147
+
148
+ # 5.3 CONVOLUTIONAL ENCODER ARCHITECTURE DETAILS
149
+
150
+ We next motivate our design of the convolutional encoder (§3.2). We use the smaller IWSLT’14 German-English setup without unknown word replacement to enable fast experimental turn-around. BLEU results are averaged over three training runs initialized with different seeds.
151
+
152
+ Figure 2 shows accuracy for a different number of layers of both CNNs with and without residual connections. Our first observation is that computing the conditional input $c _ { i }$ directly over embeddings e (line ”without CNN-c”) is already working well at 28.3 BLEU with a single CNN-a layer and at 29.1 BLEU for CNN-a with 7 layers (Figure 2a). Increasing the number of CNN-c layers is beneficial up to three layers and beyond this we did not observe further improvements. Similarly, increasing the number of layers in CNN-a beyond six does not increase accuracy on this relatively small dataset. In general, choosing two to three times as many layers in CNN- $\mathrm { a }$ as in CNN-c is a good rule of thumb. Without residual connections, the model fails to utilize the increase in modeling power from additional layers, and performance drops significantly for deeper encoders (Figure 2b).
153
+
154
+ ![](images/c221d7a5dc599248b2e8acc316686536680ab72eb7b976f7e10c12e2745d2ef7.jpg)
155
+ Figure 2: Effect of encoder depth on IWSLT’14 with and without residual connections. The $\mathbf { X }$ -axis varies the number of layers in CNN-a and curves show different CNN-c settings.
156
+
157
+ Table 3: Generation speed in source words per second on a single CPU core.
158
+
159
+ <table><tr><td>Encoder</td><td>Words/s</td><td>BLEU</td></tr><tr><td>BiLSTM</td><td>139.7</td><td>22.4</td></tr><tr><td>Deep Conv. 6/3</td><td>187.9</td><td>23.1</td></tr></table>
160
+
161
+ (a) IWSLT’14 German-English generation speed on tst2013 with beam size 10.
162
+
163
+ <table><tr><td>Encoder</td><td>Words/s</td><td>BLEU</td></tr><tr><td>2-layer BiLSTM</td><td>109.9</td><td>23.6</td></tr><tr><td>Deep Conv. 8/4</td><td>231.1</td><td>23.7</td></tr><tr><td>Deep Conv. 15/5</td><td>203.3</td><td>24.0</td></tr></table>
164
+
165
+ (b) WMT’15 English-German generation speed on newstest2015 with beam size 5.
166
+
167
+ Our convolutional architecture relies on two sets of networks, CNN-a for attention score computation $\mathbf { a _ { i } }$ and CNN-c for the conditional input $c _ { i }$ to be fed to the decoder. We found that using the same network for both tasks, similar to recurrent encoders, resulted in poor accuracy of 22.9 BLEU. This compares to 28.5 BLEU for separate single-layer networks, or 28.3 BLEU when aggregating embeddings for $c _ { i }$ . Increasing the number of layers in the single network setup did not help. Figure 2(a) suggests that the attention weights (CNN-a) need to integrate information from a wide context which can be done with a deep stack. At the same time, the vectors which are averaged (CNN-c) seem to benefit from a shallower, more local representation closer to the input words. Two stacks are an easy way to achieve these contradicting requirements.
168
+
169
+ In Appendix A we visualize attention scores and find that alignments for CNN encoders are less sharp compared to BiLSTMs, however, this does not affect the effectiveness of unknown word replacement once we adjust for shifted maxima. In Appendix B we investigate whether deep convolutional encoders are required for translating long sentences and observe that even relatively shallow encoders perform well on long sentences.
170
+
171
+ # 5.4 TRAINING AND GENERATION SPEED
172
+
173
+ For training, we use the fast CuDNN LSTM implementation for layers without attention and experiment on IWSLT’14 with batch size 32. The single-layer BiLSTM model trains at 4300 target words/second, while as the 6/3 deep convolutional encoder compares at 5500 words/second on an NVidia Tesla M40 GPU. We do not observe shorter overall training time since SGD converges slower than Adam which we use for BiLSTM models.
174
+
175
+ We measure generation speed on an Intel Haswell CPU clocked at $2 . 5 0 \mathrm { G H z }$ with a single thread for BLAS operations. We use vocabulary selection which can speed up generation by up to a factor of ten at no cost in accuracy via making the time to compute the final output layer negligible (Mi et al., 2016; L’Hostis et al., 2016). This shifts the focus from the efficiency of the encoder to the efficiency of the decoder. On IWSLT’14 (Table 3a) the convolutional encoder increases the speed of the overall model by a factor of 1.35 compared to the BiLSTM encoder while improving accuracy by 0.7 BLEU. In this setup both encoders models have the same hidden layer and embedding sizes.
176
+
177
+ On the larger WMT’15 English-German task (Table 3b) the convolutional encoder speeds up generation by 2.1 times compared to a two-layer BiLSTM. This corresponds to 231 source words/second with beam size 5. Our best model on this dataset generates 203 words/second but at slightly lower accuracy compared to the full vocabulary setting in Table 2. The recurrent encoder uses larger embeddings than the convolutional encoder which were required for the models to match in accuracy.
178
+
179
+ The smaller embedding size is not the only reason for the speed-up. In Table 3a (a), we compare a Conv 6/3 encoder and a BiLSTM with equal embedding sizes. The convolutional encoder is still $1 . 3 4 \mathrm { x }$ faster (at 0.7 higher BLEU) although it requires roughly $1 . 6 \mathrm { x }$ as many FLOPs. We believe that this is likely due to better cache locality for convolutional layers on CPUs: an LSTM with fused gates6 requires two big matrix multiplications with different weights as well as additions, multiplications and non-linearities for each source word, while the output of each convolutional layer can be computed as whole with a single matrix multiply.
180
+
181
+ For comparison, the quantized deep LSTM-based model in Wu et al. (2016) processes 106.4 words/second for English-French on a CPU with 88 cores and 358.8 words/second on a custom TPU chip. The optimized RNNsearch model and $\mathrm { C } { + } { + }$ decoder described by Junczys-Dowmunt et al. (2016) translates 265.3 words/s on a CPU with a similar vocabulary selection technique, computing 16 sentences in parallel, i.e., 16.6 words/s on a single core.
182
+
183
+ # 6 CONCLUSION
184
+
185
+ We introduced a simple encoder model for neural machine translation based on convolutional networks. This approach is more parallelizable than recurrent networks and provides a shorter path to capture long-range dependencies in the source. We find it essential to use source position embeddings as well as different CNNs for attention score computation and conditional input aggregation.
186
+
187
+ Our experiments show that convolutional encoders perform on par or better than baselines based on bi-directional LSTM encoders. In comparison to other recent work, our deep convolutional encoder is very competitive to the best published results to date (WMT’16 English-Romanian) which are obtained with significantly more complex models (WMT’14 English-French) or stem from improvements that are orthogonal to our work (WMT’15 English-German). Our architecture also leads to large generation speed improvements: translation models with our convolutional encoder can translate twice as fast as strong baselines with bi-directional recurrent encoders.
188
+
189
+ Future work includes better training to enable faster convergence with the convolutional encoder to better leverage the higher processing speed. Our fast architecture is interesting for character level encoders where the input is significantly longer than for words. Also, we plan to investigate the effectiveness of our architecture on other sequence-to-sequence tasks, e.g. summarization, constituency parsing, dialog modeling.
190
+
191
+ # ACKNOWLEDGMENTS
192
+
193
+ We would like to thank Sumit Chopra and Marc’Aurelio Ranzato for helpful discussions related to this work.
194
+
195
+ # REFERENCES
196
+
197
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In Proc. of ICLR, 2015.
198
+
199
+ James Bradbury and Richard Socher. MetaMind Neural Machine Translation System for WMT 2016. In Proc. of WMT, 2016.
200
+
201
+ Mauro Cettolo, Jan Niehues, Sebastian Stuker, Luisa Bentivogli, and Marcello Federico. Report on ¨ the 11th IWSLT evaluation campaign. In Proc. of IWSLT, 2014.
202
+
203
+ Kyunghyun Cho, Bart Van Merrienboer, Dzmitry Bahdanau, and Yoshua Bengio. On the Properties ¨ of Neural Machine Translation: Encoder-decoder Approaches. In Proc. of SSST, 2014a.
204
+
205
+ Kyunghyun Cho, Bart Van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Hol-¨ ger Schwenk, and Yoshua Bengio. Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation. In Proc. of EMNLP, 2014b.
206
+
207
+ Junyoung Chung, Kyunghyun Cho, and Yoshua Bengio. A Character-level Decoder without Explicit Segmentation for Neural Machine Translation. arXiv preprint arXiv:1603.06147, 2016.
208
+
209
+ Ronan Collobert, Koray Kavukcuoglu, and Clement Farabet. Torch7: A Matlab-like Environment for Machine Learning. In BigLearn, NIPS Workshop, 2011a. URL http://torch.ch.
210
+
211
+ Ronan Collobert, Jason Weston, Leon Bottou, Michael Karlen, Koray Kavukcuoglu, and Pavel ´ Kuksa. Natural Language Processing (almost) from scratch. JMLR, 12(Aug):2493–2537, 2011b.
212
+
213
+ Chris Dyer, Victor Chahuneau, and Noah A Smith. A Simple, Fast, and Effective Reparameterization of IBM Model 2. Proc. of ACL, 2013.
214
+
215
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. In Proc. of CVPR, 2015.
216
+
217
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
218
+
219
+ Sebastien Jean, Kyunghyun Cho, Roland Memisevic, and Yoshua Bengio. On Using Very Large ´ Target Vocabulary for Neural Machine Translation. arXiv preprint arXiv:1412.2007v2, 2014.
220
+
221
+ Sebastien Jean, Orhan Firat, Kyunghyun Cho, Roland Memisevic, and Yoshua Bengio. Montreal ´ Neural Machine Translation systems for WMT15. In Proc. of WMT, pp. 134–140, 2015.
222
+
223
+ Marcin Junczys-Dowmunt, Tomasz Dwojak, and Hieu Hoang. Is Neural Machine Translation Ready for Deployment? A Case Study on 30 Translation Directions. arXiv preprint arXiv:1610.01108, 2016.
224
+
225
+ Nal Kalchbrenner and Phil Blunsom. Recurrent Continuous Translation Models. In Proc. of EMNLP, 2013.
226
+
227
+ Nal Kalchbrenner, Lasse Espeholt, Karen Simonyan, Aaron van den Oord, Alex Graves, and Koray Kavukcuoglu. Neural Machine Translation in Linear Time. arXiv, 2016.
228
+
229
+ Diederik P. Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. Proc. of ICLR, 2014.
230
+
231
+ Philipp Koehn, Hieu Hoang, Alexandra Birch, Chris Callison-Burch, Marcello Federico, Nicola Bertoldi, Brooke Cowan, Wade Shen, Christine Moran, Richard Zens, Chris Dyer, Ondej Bojar, Alexandra Constantin, and Evan Herbst. Moses: Open Source Toolkit for Statistical Machine Translation. In Proc. of ACL, 2007.
232
+
233
+ Andrew Lamb and Michael Xie. Convolutional Encoders for Neural Machine Translation. https: //cs224d.stanford.edu/reports/LambAndrew.pdf, 2016. Accessed: 2010-10-31.
234
+
235
+ Gurvan L’Hostis, David Grangier, and Michael Auli. Vocabulary Selection Strategies for Neural Machine Translation. arXiv preprint arXiv:1610.00072, 2016.
236
+
237
+ Minh-Thang Luong, Hieu Pham, and Christopher D Manning. Effective approaches to attentionbased neural machine translation. In Proc. of EMNLP, 2015a.
238
+
239
+ Minh-Thang Luong, Ilya Sutskever, Quoc V Le, Oriol Vinyals, and Wojciech Zaremba. Addressing the Rare Word Problem in Neural Machine Translation. In Proc. of ACL, 2015b.
240
+
241
+ Fandong Meng, Zhengdong Lu, Mingxuan Wang, Hang Li, Wenbin Jiang, and Qun Liu. Encoding Source Language with Convolutional Neural Network for Machine Translation. In Proc. of ACL, 2015.
242
+ Haitao Mi, Zhiguo Wang, and Abe Ittycheriah. Vocabulary Manipulation for Neural Machine Translation. arXiv preprint arXiv:1605.03209, 2016.
243
+ Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the Difficulty of Training Recurrent Neural Networks. ICML (3), 28:1310–1318, 2013.
244
+ Ngoc-Quan Pham, Germn Kruszewski, and Gemma Boleda. Convolutional Neural Network Language Models. In Proc. of EMNLP, 2016.
245
+ Marc’Aurelio Ranzato, Sumit Chopra, Michael Auli, and Wojciech Zaremba. Sequence level Training with Recurrent Neural Networks. In Proc. of ICLR, 2015.
246
+ Holger Schwenk. http://www-lium.univ-lemans.fr/˜schwenk/cslm_joint_ paper/, 2014. Accessed: 2016-10-15.
247
+ Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural Machine Translation of Rare Words with Subword Units. In Proc. of ACL, 2016a.
248
+ Rico Sennrich, Barry Haddow, and Alexandra Birch. Edinburgh neural machine translation systems for wmt 16. 2016b.
249
+ Nitish Srivastava, Geoffrey E. Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent Neural Networks from overfitting. JMLR, 15:1929–1958, 2014.
250
+ Sainbayar Sukhbaatar, Jason Weston, Rob Fergus, and Arthur Szlam. End-to-end Memory Networks. In Proc. of NIPS, pp. 2440–2448, 2015.
251
+ Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to Sequence Learning with Neural Networks. In Proc. of NIPS, pp. 3104–3112, 2014.
252
+ Zhaopeng Tu, Baotian Hu, Zhengdong Lu, and Hang Li. Context-dependent Translation selection using Convolutional Neural Network. In Proc. of ACL-IJCNLP, 2015.
253
+ 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.
254
+ Zichao Yang, Zhiting Hu, Yuntian Deng, Chris Dyer, and Alex Smola. Neural Machine Translation with Recurrent Attention Modeling. arXiv preprint arXiv:1607.05108, 2016.
255
+ Jie Zhou, Ying Cao, Xuguang Wang, Peng Li, and Wei Xu. Deep Recurrent Models with FastForward Connections for Neural Machine Translation. arXiv preprint arXiv:1606.04199, 2016.
256
+
257
+ # A ALIGNMENT VISUALIZATION
258
+
259
+ In Figure 4 and Figure 5, we plot attention scores for a sample WMT’15 English-German and WMT’14 English-French translation with BiLSTM and deep convolutional encoders. The translation is on the $\mathbf { X }$ -axis and the source sentence on the y-axis.
260
+
261
+ The attention scores of the BiLSTM output are sharp but do not necessarily represent a correct alignment. For CNN encoders the scores are less focused but still indicate an approximate source location, e.g., in Figure 4b, when moving the clause ”over 1,000 people were taken hostage” to the back of the translation. For some models, attention maxima are consistently shifted by one token as both in Figure 4b and Figure 5b.
262
+
263
+ Interestingly, convolutional encoders tend to focus on the last token (Figure 4b) or both the first and last tokens (Figure 5b). Motivated by the hypothesis that the this may be due to the decoder depending on the length of the source sentence (which it cannot determine without position embeddings), we explicitly provided a distributed representation of the input length to the decoder and attention module. However, this did not cause a change in attention patterns nor did it improve translation accuracy.
264
+
265
+ # B PERFORMANCE BY SENTENCE LENGTH
266
+
267
+ ![](images/c95fc99b56d9c6f136d4a62618abc6e188defd58378f41e2945a1410aae2aab3.jpg)
268
+ Figure 3: BLEU per sentence length on WMT’15 English-German newstest2015. The test set is partitioned into 15 equally-sized buckets according to source sentence length.
269
+
270
+ One characteristic of our convolutional encoder architecture is that the context over which outputs are computed depends on the number of layers. With bi-directional RNNs, every encoder output depends on the entire source sentence. In Figure 3, we evaluate whether limited context affects the translation quality on longer sentences of WMT’15 English-German which often requires moving verbs over long distances. We sort the newstest2015 test set by source length, partition it into 15 equally-sized buckets, and compare the BLEU scores of models listed in Table 2 on a per-bucket basis.
271
+
272
+ There is no clear evidence for sub-par translations on sentences that are longer than the observable context per encoder output. We include a small encoder with a 6-layer CNN-c and a 3-layer CNN-a in the comparison which performs worse than a 2-layer BiLSTM (23.3 BLEU vs23.6). With 6 ˙ convolutional layers at kernel width 3, each encoder output contains information of 13 adjacent source words . Looking at the accuracy for sentences with 15 words or more, this relatively shallow CNN is either on par or better than the BiLSTM for 5 out of 10 buckets; the BiLSTM has access to the entire source context. Similar observations can be made for the deeper convolutional encoders.
273
+
274
+ ![](images/aa12d0241e2827a66f8fbe2a1ce86bac115df68c1423b818428f0e2dc694ac7c.jpg)
275
+ (b) Deep convolutional encoder with 15-layer CNN-a and 5-layer CNN-c.
276
+ Figure 4: Attention scores for WMT’15 English-German translation for a sentence of newstest2015.
277
+
278
+ ![](images/4c8bf1a6005ddcb324a715eedf59794f39346ac032aff0dc532e56cbca6ef477.jpg)
279
+
280
+ (a) 2-layer BiLSTM encoder.
281
+
282
+ ![](images/59837aeebe9c405dac795c77ec0a6bce11ce874a2d7e71d79ecbe922c7d8fcaa.jpg)
283
+ Figure 5: Attention scores for WMT’14 English-French translation for a sentence of ntst14.
284
+
285
+ (b) Deep convolutional encoder with 20-layer CNN-a and 5-layer CNN-c.
parse/train/BJAA4wKxg/BJAA4wKxg_content_list.json ADDED
@@ -0,0 +1,1488 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "A CONVOLUTIONAL ENCODER MODEL FOR NEURAL MACHINE TRANSLATION ",
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": "Jonas Gehring, Michael Auli, David Grangier, Yann N. Dauphin Facebook AI Research ",
17
+ "bbox": [
18
+ 183,
19
+ 170,
20
+ 630,
21
+ 198
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 234,
32
+ 544,
33
+ 251
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "The prevalent approach to neural machine translation relies on bi-directional LSTMs to encode the source sentence. In this paper we present a faster and simpler architecture based on a succession of convolutional layers. This allows to encode the entire source sentence simultaneously compared to recurrent networks for which computation is constrained by temporal dependencies. On WMT’16 English-Romanian translation we achieve competitive accuracy to the state-of-theart and we outperform several recently published results on the WMT’15 EnglishGerman task. Our models obtain almost the same accuracy as a very deep LSTM setup on WMT’14 English-French translation. Our convolutional encoder speeds up CPU decoding by more than two times at the same or higher accuracy as a strong bi-directional LSTM baseline. ",
40
+ "bbox": [
41
+ 233,
42
+ 266,
43
+ 764,
44
+ 419
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 445,
55
+ 336,
56
+ 460
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Neural machine translation (NMT) is an end-to-end approach to machine translation (Sutskever et al., 2014). The most successful approach to date encodes the source sentence with a bi-directional recurrent neural network (RNN) into a variable length representation and then generates the translation left-to-right with another RNN where both components interface via a soft-attention mechanism (Bahdanau et al., 2015; Luong et al., 2015a; Bradbury & Socher, 2016; Sennrich et al., 2016b). The recurrent networks are typically parameterized as long short term memory networks (LSTM; Hochreiter et al. 1997) or gated recurrent units (GRU; Cho et al. 2014), often with residual or skip connections (Wu et al., 2016; Zhou et al., 2016) to enable stacking of several layers (§2). ",
63
+ "bbox": [
64
+ 174,
65
+ 476,
66
+ 825,
67
+ 587
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "There have been several attempts to use convolutional encoder models for neural machine translation in the past but they were either only applied to rescoring n-best lists of classical systems (Kalchbrenner & Blunsom, 2013) or were not competitive to recurrent alternatives (Cho et al., 2014a). This is despite several attractive properties of convolutional networks. For example, convolutional networks operate over a fixed-size window of the input sequence which enables the simultaneous computation of all features for a source sentence. This contrasts with RNNs which maintain a hidden state of the entire past that prevents parallel computation within a sequence. ",
74
+ "bbox": [
75
+ 174,
76
+ 594,
77
+ 825,
78
+ 693
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Furthermore, a succession of convolutional layers provides a shorter path to capture relationships between elements of a sequence compared to recurrent networks.1 This also eases learning because the resulting tree-structure applies a fixed number of non-linearities compared to a recurrent neural network. Because processing is bottom-up, all words undergo the same number of transformations, whereas for recurrent networks the first word is over-processed and the last word is transformed only once. ",
85
+ "bbox": [
86
+ 174,
87
+ 699,
88
+ 825,
89
+ 782
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "In this paper we show that an architecture based on convolutional layers is very competitive to recurrent encoders. We investigate simple average pooling as well as parameterized convolutions as an alternative for recurrent encoders and enable very deep convolutional encoders by using residual connections (He et al., 2015; §3). ",
96
+ "bbox": [
97
+ 176,
98
+ 789,
99
+ 823,
100
+ 845
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "We experiment on several standard datasets and compare our approach to variants of recurrent encoders such as uni-directional and bi-directional LSTMs. On WMT’16 English-Romanian translation we achieve accuracy that is very competitive to the current state-of-the-art single system result. We perform competitively on WMT’15 English-German, and nearly match the performance of the best WMT’14 English-French system based on a deep LSTM setup when comparing on a commonly used subset of the training data (Zhou et al. 2016; §4, §5). ",
107
+ "bbox": [
108
+ 174,
109
+ 852,
110
+ 823,
111
+ 881
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "",
118
+ "bbox": [
119
+ 174,
120
+ 103,
121
+ 823,
122
+ 160
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "2 RECURRENT NEURAL MACHINE TRANSLATION",
129
+ "text_level": 1,
130
+ "bbox": [
131
+ 174,
132
+ 184,
133
+ 599,
134
+ 200
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "The general architecture of the models in this work follows the encoder-decoder approach with soft attention first introduced in Bahdanau et al. (2015). A source sentence $\\mathbf { x } = ( x _ { 1 } , \\dots , x _ { m } )$ of $m$ words is processed by an encoder which outputs a sequence of states $\\mathbf { z } = ( z _ { 1 } . \\dots . , z _ { m } )$ . ",
141
+ "bbox": [
142
+ 174,
143
+ 218,
144
+ 825,
145
+ 261
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "The decoder is an RNN network that computes a new hidden state $s _ { i + 1 }$ based on the previous state $s _ { i }$ , an embedding $g _ { i }$ of the previous target language word $y _ { i }$ , as well as a conditional input $c _ { i }$ derived from the encoder output $\\mathbf { z }$ . We use LSTMs (Hochreiter & Schmidhuber, 1997) for all decoder networks whose state $s _ { i }$ comprises of a cell vector and a hidden vector $h _ { i }$ which is output by the LSTM at each time step. We input $c _ { i }$ into the LSTM by concatenating it to $g _ { i }$ . ",
152
+ "bbox": [
153
+ 174,
154
+ 267,
155
+ 825,
156
+ 338
157
+ ],
158
+ "page_idx": 1
159
+ },
160
+ {
161
+ "type": "text",
162
+ "text": "The translation model computes a distribution over the $V$ possible target words $y _ { i + 1 }$ by transforming the LSTM output $h _ { i }$ via a linear layer with weights $W _ { o }$ and bias $b _ { o }$ : ",
163
+ "bbox": [
164
+ 173,
165
+ 344,
166
+ 823,
167
+ 375
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "equation",
173
+ "img_path": "images/37b173b9b0909bf3179f6e9b4c75f0c234c3da802d00c2f32216811c37aeacfd.jpg",
174
+ "text": "$$\np ( y _ { i + 1 } | y _ { 1 } , \\dots , y _ { i } , \\mathbf { x } ) = \\mathrm { s o f t m a x } ( W _ { o } h _ { i + 1 } + b _ { o } ) \\in \\mathbb { R } ^ { V }\n$$",
175
+ "text_format": "latex",
176
+ "bbox": [
177
+ 316,
178
+ 385,
179
+ 679,
180
+ 404
181
+ ],
182
+ "page_idx": 1
183
+ },
184
+ {
185
+ "type": "text",
186
+ "text": "The conditional input $c _ { i }$ at time $i$ is computed via a simple dot-product style attention mechanism (Luong et al., 2015a). Specifically, we transform the decoder hidden state $h _ { i }$ by a linear layer with weights $W _ { d }$ and $b _ { d }$ to match the size of the embedding of the previous target word $g _ { i }$ and then sum the two representations to yield $d _ { i }$ . Conditional input $c _ { i }$ is a weighted sum of attention scores $\\mathbf { a _ { i } } \\in \\mathbb { R } ^ { m }$ and encoder outputs $\\mathbf { z }$ . The attention scores $\\mathbf { a _ { i } }$ are determined by a dot product between $h _ { i }$ with each $z _ { j }$ , followed by a softmax over the source sequence: ",
187
+ "bbox": [
188
+ 173,
189
+ 421,
190
+ 825,
191
+ 506
192
+ ],
193
+ "page_idx": 1
194
+ },
195
+ {
196
+ "type": "equation",
197
+ "img_path": "images/7414696d5eec05f8c5503f8f8c98dca8a0d02d93f6a9581211e1387baf88d9b2.jpg",
198
+ "text": "$$\nd _ { i } = W _ { d } h _ { i } + b _ { d } + g _ { i } a _ { i j } \\qquad a _ { i j } = { \\frac { \\exp \\left( d _ { i } ^ { T } z _ { j } \\right) } { \\sum _ { t = 1 } ^ { m } \\exp \\left( d _ { i } ^ { T } z _ { t } \\right) } } \\qquad c _ { i } = \\sum _ { j = 1 } ^ { m } a _ { i j } z _ { j }\n$$",
199
+ "text_format": "latex",
200
+ "bbox": [
201
+ 209,
202
+ 513,
203
+ 761,
204
+ 560
205
+ ],
206
+ "page_idx": 1
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "In preliminary experiments, we did not find the MLP attention of Bahdanau et al. (2015) to perform significantly better in terms of BLEU nor perplexity. However, we found the dot-product attention to be more favorable in terms of training and evaluation speed. ",
211
+ "bbox": [
212
+ 176,
213
+ 564,
214
+ 823,
215
+ 607
216
+ ],
217
+ "page_idx": 1
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "We use bi-directional LSTMs to implement recurrent encoders similar to Zhou et al. (2016) which achieved some of the best WMT14 English-French results reported to date. First, each word of the input sequence $\\mathbf { x }$ is embedded in distributional space resulting in $\\mathbf { e } = ( e _ { 1 } , \\hdots , e _ { m } )$ . The embeddings are input to two stacks of uni-directional RNNs where the output of each layer is reversed before being fed into the next layer. The first stack takes the original sequence while the second takes the reversed input sequence; the output of the second stack is reversed so that the final outputs of the stacks align. Finally, the top-level hidden states of the two stacks are concatenated and fed into a linear layer to yield $\\mathbf { z }$ . We denote this encoder architecture as BiLSTM. ",
222
+ "bbox": [
223
+ 174,
224
+ 613,
225
+ 825,
226
+ 724
227
+ ],
228
+ "page_idx": 1
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "3 NON-RECURRENT ENCODERS ",
233
+ "text_level": 1,
234
+ "bbox": [
235
+ 176,
236
+ 750,
237
+ 450,
238
+ 766
239
+ ],
240
+ "page_idx": 1
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "3.1 POOLING ENCODER ",
245
+ "text_level": 1,
246
+ "bbox": [
247
+ 176,
248
+ 784,
249
+ 352,
250
+ 799
251
+ ],
252
+ "page_idx": 1
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "A simple baseline for non-recurrent encoders is the pooling model described in Ranzato et al. (2015) which simply averages the embeddings of $k$ consecutive words. Averaging word embeddings does not convey positional information besides that the words in the input are somewhat close to each other. As a remedy, we add position embeddings to encode the absolute position of each source word within a sentence. Each source embedding $e _ { j }$ therefore contains a position embedding $l _ { j }$ as well as the word embedding $w _ { j }$ . Position embeddings have also been found helpful in memory networks for question-answering and language modeling (Sukhbaatar et al., 2015). Similar to the recurrent encoder $( \\ S 2 )$ , the attention scores $a _ { i j }$ are computed from the pooled representations $z _ { j }$ , however, the conditional input $c _ { i }$ is a weighted sum of the embeddings $e _ { j }$ , not $z _ { j }$ , i.e., ",
257
+ "bbox": [
258
+ 174,
259
+ 811,
260
+ 825,
261
+ 924
262
+ ],
263
+ "page_idx": 1
264
+ },
265
+ {
266
+ "type": "image",
267
+ "img_path": "images/a75dbefac78decd2eaf90ee2deaf5a98209573d177f6d26e1f82004121c66064.jpg",
268
+ "image_caption": [
269
+ "Figure 1: Neural machine translation model with single-layer convolutional encoder networks CNN- $\\mathrm { a }$ is on the left and CNN-c is at the right. Embedding layers are not shown. "
270
+ ],
271
+ "image_footnote": [],
272
+ "bbox": [
273
+ 246,
274
+ 97,
275
+ 728,
276
+ 265
277
+ ],
278
+ "page_idx": 2
279
+ },
280
+ {
281
+ "type": "text",
282
+ "text": "",
283
+ "bbox": [
284
+ 171,
285
+ 330,
286
+ 825,
287
+ 345
288
+ ],
289
+ "page_idx": 2
290
+ },
291
+ {
292
+ "type": "equation",
293
+ "img_path": "images/4acc6fc4bff77e2d7338ea65213b302b2dc7223f720fd6a17bed846a55d9992c.jpg",
294
+ "text": "$$\ne _ { j } = w _ { j } + l _ { j } \\qquad z _ { j } = { \\frac { 1 } { k } } \\sum _ { t = - \\lfloor k / 2 \\rfloor } ^ { \\lfloor k / 2 \\rfloor } e _ { j + t } \\qquad c _ { i } = \\sum _ { j = 1 } ^ { m } a _ { i j } e _ { j }\n$$",
295
+ "text_format": "latex",
296
+ "bbox": [
297
+ 236,
298
+ 347,
299
+ 766,
300
+ 393
301
+ ],
302
+ "page_idx": 2
303
+ },
304
+ {
305
+ "type": "text",
306
+ "text": "The input sequence is padded prior to pooling such that the encoder output matches the input length $| \\mathbf { z } | = | \\mathbf { x } |$ . We set $k$ to 5 in all experiments as Ranzato et al. (2015). ",
307
+ "bbox": [
308
+ 173,
309
+ 398,
310
+ 825,
311
+ 428
312
+ ],
313
+ "page_idx": 2
314
+ },
315
+ {
316
+ "type": "text",
317
+ "text": "3.2 CONVOLUTIONAL ENCODER ",
318
+ "text_level": 1,
319
+ "bbox": [
320
+ 176,
321
+ 444,
322
+ 411,
323
+ 458
324
+ ],
325
+ "page_idx": 2
326
+ },
327
+ {
328
+ "type": "text",
329
+ "text": "A straightforward extension of pooling is to learn the kernel in a convolutional neural network (CNN). The encoder output $z _ { j }$ contains information about a fixed-sized context depending on the kernel width $k$ but the desired context width may vary. This can be addressed by stacking several layers of convolutions followed by non-linearities: additional layers increase the total context size while non-linearities can modulate the effective size of the context as needed. For instance, stacking 5 convolutions with kernel width $k = 3$ results in an input field of 11 words, i.e., each output depends on 11 input words, and the non-linearities allow the encoder to exploit the full input field, or to concentrate on fewer words as needed. ",
330
+ "bbox": [
331
+ 173,
332
+ 469,
333
+ 825,
334
+ 582
335
+ ],
336
+ "page_idx": 2
337
+ },
338
+ {
339
+ "type": "text",
340
+ "text": "To ease learning for deep encoders, we add residual connections from the input of each convolution to the output and then apply the non-linear activation function to the output (tanh; He et al., 2015); the non-linearities are therefore not ’bypassed’. Multi-layer CNNs are constructed by stacking several blocks on top of each other. The CNNs do not contain pooling layers which are commonly used for down-sampling, i.e., the full source sequence length will be retained after the network has been applied. Similar to the pooling model, the convolutional encoder uses position embeddings. ",
341
+ "bbox": [
342
+ 173,
343
+ 588,
344
+ 825,
345
+ 672
346
+ ],
347
+ "page_idx": 2
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "The final encoder consists of two stacked convolutional networks (Figure 1): CNN-a produces the encoder output $z _ { j }$ to compute the attention scores $\\mathbf { a _ { i } }$ , while the conditional input $c _ { i }$ to the decoder is computed by summing the outputs of CNN-c, ",
352
+ "bbox": [
353
+ 176,
354
+ 679,
355
+ 825,
356
+ 722
357
+ ],
358
+ "page_idx": 2
359
+ },
360
+ {
361
+ "type": "equation",
362
+ "img_path": "images/b64c68f1239cd3ba6cf59c599f16170be70109540de0f0851e550d0a619b7308.jpg",
363
+ "text": "$$\nz _ { j } = \\mathrm { C N N - a } ( \\mathbf { e } ) _ { j }\n$$",
364
+ "text_format": "latex",
365
+ "bbox": [
366
+ 279,
367
+ 742,
368
+ 397,
369
+ 760
370
+ ],
371
+ "page_idx": 2
372
+ },
373
+ {
374
+ "type": "equation",
375
+ "img_path": "images/149116df763f0cf03ee4cb046665a9cc3450fdfee1a76d7ff81a84409b3de785.jpg",
376
+ "text": "$$\nc _ { i } = \\sum _ { j = 1 } ^ { m } a _ { i j } \\mathrm { C N N - c } ( \\mathbf { e } ) _ { j } .\n$$",
377
+ "text_format": "latex",
378
+ "bbox": [
379
+ 576,
380
+ 727,
381
+ 743,
382
+ 770
383
+ ],
384
+ "page_idx": 2
385
+ },
386
+ {
387
+ "type": "text",
388
+ "text": "In practice, we found that two different CNNs resulted in better perplexity as well as BLEU compared to using a single one (§5.3). We also found this to perform better than directly summing the $e _ { i }$ without transformation as for the pooling model. ",
389
+ "bbox": [
390
+ 174,
391
+ 768,
392
+ 825,
393
+ 810
394
+ ],
395
+ "page_idx": 2
396
+ },
397
+ {
398
+ "type": "text",
399
+ "text": "3.3 RELATED WORK ",
400
+ "text_level": 1,
401
+ "bbox": [
402
+ 176,
403
+ 827,
404
+ 331,
405
+ 842
406
+ ],
407
+ "page_idx": 2
408
+ },
409
+ {
410
+ "type": "text",
411
+ "text": "There are several past attempts to use convolutional encoders for neural machine translation, however, to our knowledge none of them were able to match the performance of recurrent encoders. Kalchbrenner & Blunsom (2013) introduce a convolutional sentence encoder in which a multi-layer CNN generates a fixed sized embedding for a source sentence, or an n-gram representation followed by transposed convolutions for directly generating a per-token decoder input. The latter requires the length of the translation prior to generation and both models were evaluated by rescoring the output of an existing translation system. Cho et al. (2014a) propose a gated recursive CNN which is repeatedly applied until a fixed-size representation is obtained but the recurrent encoder achieves higher accuracy. In follow-up work, the authors improved the model via a soft-attention mechanism but did not re-consider convolutional encoder models (Bahdanau et al., 2015). ",
412
+ "bbox": [
413
+ 174,
414
+ 853,
415
+ 825,
416
+ 924
417
+ ],
418
+ "page_idx": 2
419
+ },
420
+ {
421
+ "type": "text",
422
+ "text": "",
423
+ "bbox": [
424
+ 174,
425
+ 103,
426
+ 825,
427
+ 172
428
+ ],
429
+ "page_idx": 3
430
+ },
431
+ {
432
+ "type": "text",
433
+ "text": "Concurrently to our work, Kalchbrenner et al. (2016) have introduced convolutional translation models without an explicit attention mechanism but their approach does not yet result in state-of-the-art accuracy. Lamb & Xie (2016) also proposed a multi-layer CNN to generate a fixed-size encoder representation but their work lacks quantitative evaluation in terms of BLEU. Meng et al. (2015) and Tu et al. (2015) applied convolutional models to score phrase-pairs of traditional phrase-based and dependency-based translation models. Convolutional architectures have also been successful in language modeling but so far failed to outperform LSTMs (Pham et al., 2016). ",
434
+ "bbox": [
435
+ 174,
436
+ 180,
437
+ 825,
438
+ 279
439
+ ],
440
+ "page_idx": 3
441
+ },
442
+ {
443
+ "type": "text",
444
+ "text": "4 EXPERIMENTAL SETUP ",
445
+ "text_level": 1,
446
+ "bbox": [
447
+ 176,
448
+ 299,
449
+ 398,
450
+ 315
451
+ ],
452
+ "page_idx": 3
453
+ },
454
+ {
455
+ "type": "text",
456
+ "text": "4.1 DATASETS ",
457
+ "text_level": 1,
458
+ "bbox": [
459
+ 174,
460
+ 330,
461
+ 287,
462
+ 345
463
+ ],
464
+ "page_idx": 3
465
+ },
466
+ {
467
+ "type": "text",
468
+ "text": "We evaluate different encoders and ablate architectural choices on a small dataset from the GermanEnglish machine translation track of IWSLT 2014 (Cettolo et al., 2014) with a similar setting to Ranzato et al. (2015). Unless otherwise stated, we restrict training sentences to have no more than 175 words; test sentences are not filtered. This is a higher threshold compared to other publications but ensures proper training of the position embeddings for non-recurrent encoders; the length threshold did not significantly effect recurrent encoders. Length filtering results in 167K sentence pairs and we test on the concatenation of tst2010, tst2011, tst2012, tst2013 and dev2010 comprising 6948 sentence pairs.2 Our final results are on three major WMT tasks: ",
469
+ "bbox": [
470
+ 174,
471
+ 357,
472
+ 825,
473
+ 469
474
+ ],
475
+ "page_idx": 3
476
+ },
477
+ {
478
+ "type": "text",
479
+ "text": "WMT’16 English-Romanian. We use the same data and pre-processing as Sennrich et al. (2016b) and train on 2.8M sentence pairs.3 Our model is word-based instead of relying on byte-pair encoding (Sennrich et al., 2016a). We evaluate on newstest2016. ",
480
+ "bbox": [
481
+ 174,
482
+ 476,
483
+ 820,
484
+ 517
485
+ ],
486
+ "page_idx": 3
487
+ },
488
+ {
489
+ "type": "text",
490
+ "text": "WMT’15 English-German. We use all available parallel training data, namely Europarl v7, Common Crawl and News Commentary v10 and apply the standard Moses tokenization to obtain 3.9M sentence pairs (Koehn et al., 2007). We report results on newstest2015. ",
491
+ "bbox": [
492
+ 174,
493
+ 525,
494
+ 825,
495
+ 566
496
+ ],
497
+ "page_idx": 3
498
+ },
499
+ {
500
+ "type": "text",
501
+ "text": "WMT’14 English-French. We use a commonly used subset of 12M sentence pairs (Schwenk, 2014), and remove sentences longer than 150 words. This results in $1 0 . 7 \\mathbf { M }$ sentence-pairs for training. Results are reported on ntst14. ",
502
+ "bbox": [
503
+ 174,
504
+ 574,
505
+ 825,
506
+ 616
507
+ ],
508
+ "page_idx": 3
509
+ },
510
+ {
511
+ "type": "text",
512
+ "text": "A small subset of the training data serves as validation set $5 \\%$ for IWSLT’14 and $1 \\%$ for WMT) for early stopping and learning rate annealing (§4.3). For IWSLT’14, we replace words that occur fewer than 3 times with a <unk $>$ symbol, which results in a vocabulary of 24158 English and 35882 German word types. For WMT datasets, we retain 200K source and 80K target words. For EnglishFrench only, we set the target vocabulary to 30K types to be comparable with previous work. ",
513
+ "bbox": [
514
+ 174,
515
+ 623,
516
+ 825,
517
+ 693
518
+ ],
519
+ "page_idx": 3
520
+ },
521
+ {
522
+ "type": "text",
523
+ "text": "4.2 MODEL PARAMETERS ",
524
+ "text_level": 1,
525
+ "bbox": [
526
+ 176,
527
+ 710,
528
+ 364,
529
+ 724
530
+ ],
531
+ "page_idx": 3
532
+ },
533
+ {
534
+ "type": "text",
535
+ "text": "We use 512 hidden units for both recurrent encoders and decoders. We reset the decoder hidden states to zero between sentences. For the convolutional encoder, 512 hidden units are used for each layer in CNN-a, while layers in CNN-c contain 256 units each. All embeddings, including the output produced by the decoder before the final linear layer, are of 256 dimensions. On the WMT corpora, we find that we can improve the performance of the bi-directional LSTM models (BiLSTM) by using 512-dimensional word embeddings. ",
536
+ "bbox": [
537
+ 174,
538
+ 737,
539
+ 825,
540
+ 820
541
+ ],
542
+ "page_idx": 3
543
+ },
544
+ {
545
+ "type": "text",
546
+ "text": "Model weights are initialized from a uniform distribution within $[ - 0 . 0 5 , 0 . 0 5 ]$ . For convolutional layers, we use a uniform distribution of $[ - k d ^ { - 0 . 5 } , k d ^ { - 0 . 5 } ]$ , where $k$ is the kernel width (we use 3 throughout this work) and $d$ is the input size for the first layer and the number of hidden units for subsequent layers (Collobert et al., 2011b). For CNN-c, we transform the input and output with a linear layer each to match the smaller embedding size. The model parameters were tuned on IWSLT’14 and cross-validated on the larger WMT corpora. ",
547
+ "bbox": [
548
+ 171,
549
+ 827,
550
+ 823,
551
+ 858
552
+ ],
553
+ "page_idx": 3
554
+ },
555
+ {
556
+ "type": "text",
557
+ "text": "",
558
+ "bbox": [
559
+ 174,
560
+ 103,
561
+ 823,
562
+ 159
563
+ ],
564
+ "page_idx": 4
565
+ },
566
+ {
567
+ "type": "text",
568
+ "text": "4.3 OPTIMIZATION ",
569
+ "text_level": 1,
570
+ "bbox": [
571
+ 174,
572
+ 178,
573
+ 318,
574
+ 193
575
+ ],
576
+ "page_idx": 4
577
+ },
578
+ {
579
+ "type": "text",
580
+ "text": "Recurrent models are trained with Adam as we found them to benefit from aggressive optimization. We use a step width of $3 . 1 2 5 \\cdot 1 0 ^ { - 4 }$ and early stopping based on validation perplexity (Kingma & Ba, 2014). For non-recurrent encoders, we obtain best results with stochastic gradient descent (SGD) and annealing: we use a learning rate of 0.1 and once the validation perplexity stops improving, we reduce the learning rate by an order of magnitude each epoch until it falls below $1 \\bar { 0 } ^ { - 4 }$ . ",
581
+ "bbox": [
582
+ 174,
583
+ 205,
584
+ 825,
585
+ 275
586
+ ],
587
+ "page_idx": 4
588
+ },
589
+ {
590
+ "type": "text",
591
+ "text": "For all models, we use mini-batches of 32 sentences for IWSLT’14 and 64 for WMT. We use truncated back-propagation through time to limit the length of target sequences per mini-batch to 25 words. Gradients are normalized by the mini-batch size. We re-normalize the gradients if their norm exceeds 25 (Pascanu et al., 2013). Gradients of convolutional layers are scaled by $\\mathrm { s q r t } ( \\mathrm { d i m } ( i n p u t ) ) ^ { - 1 }$ similar to Collobert et al. (2011b). We use dropout on the embeddings and decoder outputs $h _ { i }$ with a rate of 0.2 for IWSLT’14 and 0.1 for WMT (Srivastava et al., 2014). All models are implemented in Torch (Collobert et al., 2011a) and trained on a single GPU. ",
592
+ "bbox": [
593
+ 174,
594
+ 282,
595
+ 825,
596
+ 380
597
+ ],
598
+ "page_idx": 4
599
+ },
600
+ {
601
+ "type": "text",
602
+ "text": "4.4 EVALUATION ",
603
+ "text_level": 1,
604
+ "bbox": [
605
+ 174,
606
+ 398,
607
+ 305,
608
+ 412
609
+ ],
610
+ "page_idx": 4
611
+ },
612
+ {
613
+ "type": "text",
614
+ "text": "We report accuracy of single systems by training several identical models with different random seeds (5 for IWSLT’14, 3 for WMT) and pick the one with the best validation perplexity for final BLEU evaluation. Translations are generated by a beam search and we normalize log-likelihood scores by sentence length. On IWSLT’14 we use a beam width of 10 and for WMT models we tune beam width and word penalty on a separate test set, that is newsdev2016 for WMT’16 EnglishRomanian, newstest2014 for WMT’15 English-German and ntst1213 for WMT’14 English-French.4 The word penalty adds a constant factor to log-likelihoods, except for the end-of-sentence token. ",
615
+ "bbox": [
616
+ 174,
617
+ 425,
618
+ 825,
619
+ 523
620
+ ],
621
+ "page_idx": 4
622
+ },
623
+ {
624
+ "type": "text",
625
+ "text": "Prior to scoring the generated translations against the respective references, we perform unknown word replacement based on attention scores (Jean et al., 2015). Unknown words are replaced by looking up the source word with the maximum attention score in a pre-computed dictionary. If the dictionary contains no translation, then we simply copy the source word. Dictionaries were extracted from the aligned training data that was aligned with fast align (Dyer et al., 2013). Each source word is mapped to the target word it is most frequently aligned to. ",
626
+ "bbox": [
627
+ 174,
628
+ 530,
629
+ 823,
630
+ 613
631
+ ],
632
+ "page_idx": 4
633
+ },
634
+ {
635
+ "type": "text",
636
+ "text": "For convolutional encoders with stacked CNN-c layers we noticed for some models that the attention maxima were consistently shifted by one word. We determine this per-model offset on the abovementioned development sets and correct for it. Finally, we compute case-sensitive tokenized BLEU, except for WMT’16 English-Romanian where we use detokenized BLEU to be comparable with Sennrich et al. (2016b).5 ",
637
+ "bbox": [
638
+ 174,
639
+ 621,
640
+ 825,
641
+ 690
642
+ ],
643
+ "page_idx": 4
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "5 RESULTS ",
648
+ "text_level": 1,
649
+ "bbox": [
650
+ 174,
651
+ 712,
652
+ 281,
653
+ 728
654
+ ],
655
+ "page_idx": 4
656
+ },
657
+ {
658
+ "type": "text",
659
+ "text": "5.1 RECURRENT VS. NON-RECURRENT ENCODERS",
660
+ "text_level": 1,
661
+ "bbox": [
662
+ 176,
663
+ 746,
664
+ 539,
665
+ 760
666
+ ],
667
+ "page_idx": 4
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "We first compare recurrent and non-recurrent encoders in terms of perplexity and BLEU on IWSLT’14 with and without position embeddings (§3.1) and include a phrase-based system (Koehn et al., 2007). Table 1 shows that a single-layer convolutional model with position embeddings (Convolutional) can outperform both a uni-directional LSTM encoder (LSTM) as well as a bi-directional LSTM encoder (BiLSTM). Next, we increase the depth of the convolutional encoder. We choose a good setting by independently varying the number of layers in CNN-a and CNN-c between 1 and 10 and obtained best validation set perplexity with six layers for CNN-a and three layers for CNN-c. ",
672
+ "bbox": [
673
+ 174,
674
+ 772,
675
+ 825,
676
+ 869
677
+ ],
678
+ "page_idx": 4
679
+ },
680
+ {
681
+ "type": "table",
682
+ "img_path": "images/f5373042fe851b634a748abc3591e7e1f0298c3c9ff32cf549933365095a22cc.jpg",
683
+ "table_caption": [
684
+ "Table 1: Accuracy of encoders with position features (words $^ +$ pos) and without (words) in terms of BLEU and perplexity (PPL) on IWSLT’14 German to English translation; results include unknown word replacement. Deep Convolutional 6/3 is the only multi-layer configuration, more layers for the LSTMs did not improve accuracy on this dataset. "
685
+ ],
686
+ "table_footnote": [],
687
+ "table_body": "<table><tr><td>System/Encoder</td><td>BLEU words + pos</td><td>BLEU words</td><td>PPL words + pos</td></tr><tr><td>Phrase-based</td><td>1</td><td>28.4</td><td>1</td></tr><tr><td>LSTM</td><td>27.4</td><td>27.3</td><td>10.8</td></tr><tr><td>BiLSTM</td><td>29.7</td><td>29.8</td><td>9.9</td></tr><tr><td>Pooling</td><td>26.1</td><td>19.7</td><td>11.0</td></tr><tr><td>Convolutional</td><td>29.9</td><td>20.1</td><td>9.1</td></tr><tr><td>Deep Convolutional 6/3</td><td>30.4</td><td>25.2</td><td>8.9</td></tr></table>",
688
+ "bbox": [
689
+ 292,
690
+ 101,
691
+ 705,
692
+ 231
693
+ ],
694
+ "page_idx": 5
695
+ },
696
+ {
697
+ "type": "text",
698
+ "text": "This configuration outperforms BiLSTM by 0.7 BLEU (Deep Convolutional $^ { 6 / 3 }$ ). We investigate depth in the convolutional encoder more in $\\ S 5 . 3$ . ",
699
+ "bbox": [
700
+ 176,
701
+ 325,
702
+ 821,
703
+ 354
704
+ ],
705
+ "page_idx": 5
706
+ },
707
+ {
708
+ "type": "text",
709
+ "text": "Among recurrent encoders, the BiLSTM is 2.3 BLEU better than the uni-directional version. The simple pooling encoder which does not contain any parameters is only 1.3 BLEU lower than a uni-directional LSTM encoder and 3.6 BLEU lower than BiLSTM. The results without position embeddings (words) show that position information is crucial for convolutional encoders. In particular for shallow models (Pooling and Convolutional), whereas deeper models are less effected. Recurrent encoders do not benefit from explicit position information because this information can be naturally extracted through the sequential computation. ",
710
+ "bbox": [
711
+ 174,
712
+ 361,
713
+ 825,
714
+ 459
715
+ ],
716
+ "page_idx": 5
717
+ },
718
+ {
719
+ "type": "text",
720
+ "text": "When tuning model settings, we generally observe good correlation between perplexity and BLEU. However, for convolutional encoders perplexity gains translate to smaller BLEU improvements compared to recurrent counterparts (Table 1). We observe a similar trend on larger datasets. ",
721
+ "bbox": [
722
+ 176,
723
+ 465,
724
+ 821,
725
+ 508
726
+ ],
727
+ "page_idx": 5
728
+ },
729
+ {
730
+ "type": "text",
731
+ "text": "5.2 EVALUATION ON WMT CORPORA ",
732
+ "text_level": 1,
733
+ "bbox": [
734
+ 178,
735
+ 527,
736
+ 447,
737
+ 541
738
+ ],
739
+ "page_idx": 5
740
+ },
741
+ {
742
+ "type": "text",
743
+ "text": "Next, we evaluate the BiLSTM encoder and the convolutional encoder architecture on three larger tasks and compare against previously published results. On WMT’16 English-Romanian translation we compare to Sennrich et al. (2016b), the winning single system entry for this language pair. Their model consists of a bi-directional GRU encoder, a GRU decoder and MLP-based attention. They use byte pair encoding (BPE) to achieve open-vocabulary translation and dropout in all components of the neural network to achieve 28.1 BLEU; we use the same pre-processing but no BPE (§4). ",
744
+ "bbox": [
745
+ 174,
746
+ 554,
747
+ 825,
748
+ 638
749
+ ],
750
+ "page_idx": 5
751
+ },
752
+ {
753
+ "type": "text",
754
+ "text": "The results (Table 2) show that a deep convolutional encoder performs competitively to the state of the art on this dataset (Sennrich et al., 2016b). Our bi-directional LSTM encoder baseline is 0.7 BLEU lower than Sennrich et al. (2016b) but uses only 512 hidden units compared to 1024. A single-layer convolutional encoder with embedding size 256 performs very competitively at 27.1 BLEU which is only 0.3 BLEU below the BiLSTM baseline. Increasing the number of convolutional layers to 8 in CNN-a and 4 in CNN-c achieves 27.8 BLEU which performs well above this baseline. ",
755
+ "bbox": [
756
+ 174,
757
+ 645,
758
+ 825,
759
+ 728
760
+ ],
761
+ "page_idx": 5
762
+ },
763
+ {
764
+ "type": "text",
765
+ "text": "On WMT’15 English to German, we compare to a BiLSTM baseline and prior work: Jean et al. (2015) introduce a large output vocabulary; the decoder of Chung et al. (2016) operates on the character-level; Yang et al. (2016) uses LSTMs instead of GRUs and feeds the conditional input to the output layer as well as to the decoder. ",
766
+ "bbox": [
767
+ 174,
768
+ 734,
769
+ 823,
770
+ 791
771
+ ],
772
+ "page_idx": 5
773
+ },
774
+ {
775
+ "type": "text",
776
+ "text": "Our single-layer BiLSTM baseline performs competitively compared to prior work and a two-layer BiLSTM performs about 0.4 BLEU better at 23.6 BLEU. Previous work also used multi-layer setups, e.g., Chung et al. (2016) has two layers both in the encoder and the decoder with 1024 hidden units, and Yang et al. (2016) use 1000 hidden units per LSTM. We use 512 hidden units for both LSTM and convolutional encoders. A single-layer CNN encoder (Convolutional) achieves 22.0 BLEU which is significantly lower than the two-layer BiLSTM. However, adding additional layers (Deep Convolutional 8/4) achieves the same accuracy as the two-layer BiLSTM and a 15 layer CNN-a outperforms it by 0.7 BLEU (Deep Convolutional 15/5). The latter performs competitively to the best published results which use decoder improvements that may benefit our setup as well. ",
777
+ "bbox": [
778
+ 173,
779
+ 797,
780
+ 825,
781
+ 924
782
+ ],
783
+ "page_idx": 5
784
+ },
785
+ {
786
+ "type": "table",
787
+ "img_path": "images/26dab63ad02428a55c36893b6b65d6d53d66198627533ea325566d3e0308ce8a.jpg",
788
+ "table_caption": [
789
+ "Table 2: Accuracy on three WMT tasks, including results published in previous work. For deep convolutional encoders, we include the number of layers in CNN-a and CNN-c, respectively. "
790
+ ],
791
+ "table_footnote": [],
792
+ "table_body": "<table><tr><td>WMT&#x27;16 English-Romanian</td><td>Encoder</td><td>Vocabulary</td><td>BLEU</td></tr><tr><td>Sennrich et al. (2016b)</td><td>BiGRU</td><td>BPE 90K</td><td>28.1</td></tr><tr><td>Single-layer decoder</td><td>BiLSTM</td><td>80K</td><td>27.4</td></tr><tr><td></td><td>Convolutional</td><td>80K</td><td>27.1</td></tr><tr><td></td><td>Deep Convolutional 8/4</td><td>80K</td><td>27.8</td></tr><tr><td>WMT&#x27;15 English-German</td><td>Encoder</td><td>Vocabulary</td><td>BLEU</td></tr><tr><td>Jean et al. (2015) RNNsearch-LV</td><td>BiGRU</td><td>500K</td><td>22.4</td></tr><tr><td>Chung et al. (2016) BPE-Char</td><td>BiGRU</td><td>Char 500</td><td>23.9</td></tr><tr><td>Yang et al. (2016) RNNSearch + UNK replace</td><td>BiLSTM</td><td>50K</td><td>24.3</td></tr><tr><td>+recurrent attention</td><td>BiLSTM</td><td>50K</td><td>25.0</td></tr><tr><td>Single-layer decoder</td><td>BiLSTM</td><td>80K</td><td>23.2</td></tr><tr><td></td><td>2-layer BiLSTM</td><td>80K</td><td>23.6</td></tr><tr><td></td><td>Convolutional</td><td>80K</td><td>22.0</td></tr><tr><td></td><td>Deep Convolutional 8/4</td><td>80K</td><td>23.6</td></tr><tr><td></td><td>Deep Convolutional 15/5</td><td>80K</td><td>24.3</td></tr><tr><td>WMT&#x27;14 English-French (12M)</td><td></td><td></td><td></td></tr><tr><td>Bahdanau et al. (2015) RNNsearch</td><td>Encoder</td><td>Vocabulary</td><td>BLEU</td></tr><tr><td>Luong et al. (20i5b) Single LSTM</td><td>BiGRU</td><td>30K</td><td>28.5</td></tr><tr><td></td><td>6-layer LSTM</td><td>40K</td><td>32.7</td></tr><tr><td>Jean et al. (2014) RNNsearch-LV</td><td>BiGRU</td><td>500K</td><td>34.6</td></tr><tr><td>Zhou et al. (2016) Deep-Att</td><td>Deep BiLSTM</td><td>30K</td><td>35.9</td></tr><tr><td>Single-layer decoder</td><td>BiLSTM</td><td>30K</td><td>34.6</td></tr><tr><td></td><td>Deep Convolutional 8/4</td><td>30K</td><td>34.6</td></tr><tr><td>Two-layer decoder</td><td>2-layer BiLSTM</td><td>30K</td><td>35.3</td></tr><tr><td></td><td>Deep Convolutional 20/5</td><td>30K</td><td>35.7</td></tr></table>",
793
+ "bbox": [
794
+ 191,
795
+ 99,
796
+ 807,
797
+ 503
798
+ ],
799
+ "page_idx": 6
800
+ },
801
+ {
802
+ "type": "text",
803
+ "text": "Finally, we evaluate on the larger WMT’14 English-French corpus. On this dataset the recurrent architectures benefit from an additional layer both in the encoder and the decoder. For a singlelayer decoder, a deep convolutional encoder matches the BiLSTM accuracy and for a two-layer decoder, our very deep convolutional encoder with up to 20 layers outperforms the BiLSTM by 0.4 BLEU. It has $40 \\%$ fewer parameters than the BiLSTM due to the smaller embedding sizes. We also outperform several previous systems, including the very deep encoder-decoder model proposed by Luong et al. (2015a). Our best result is just 0.2 BLEU below Zhou et al. (2016) who use a very deep LSTM setup with a 9-layer encoder, a 7-layer decoder, shortcut connections and extensive regularization with dropout and L2 regularization. ",
804
+ "bbox": [
805
+ 174,
806
+ 571,
807
+ 825,
808
+ 698
809
+ ],
810
+ "page_idx": 6
811
+ },
812
+ {
813
+ "type": "text",
814
+ "text": "5.3 CONVOLUTIONAL ENCODER ARCHITECTURE DETAILS ",
815
+ "text_level": 1,
816
+ "bbox": [
817
+ 174,
818
+ 720,
819
+ 591,
820
+ 734
821
+ ],
822
+ "page_idx": 6
823
+ },
824
+ {
825
+ "type": "text",
826
+ "text": "We next motivate our design of the convolutional encoder (§3.2). We use the smaller IWSLT’14 German-English setup without unknown word replacement to enable fast experimental turn-around. BLEU results are averaged over three training runs initialized with different seeds. ",
827
+ "bbox": [
828
+ 174,
829
+ 750,
830
+ 825,
831
+ 791
832
+ ],
833
+ "page_idx": 6
834
+ },
835
+ {
836
+ "type": "text",
837
+ "text": "Figure 2 shows accuracy for a different number of layers of both CNNs with and without residual connections. Our first observation is that computing the conditional input $c _ { i }$ directly over embeddings e (line ”without CNN-c”) is already working well at 28.3 BLEU with a single CNN-a layer and at 29.1 BLEU for CNN-a with 7 layers (Figure 2a). Increasing the number of CNN-c layers is beneficial up to three layers and beyond this we did not observe further improvements. Similarly, increasing the number of layers in CNN-a beyond six does not increase accuracy on this relatively small dataset. In general, choosing two to three times as many layers in CNN- $\\mathrm { a }$ as in CNN-c is a good rule of thumb. Without residual connections, the model fails to utilize the increase in modeling power from additional layers, and performance drops significantly for deeper encoders (Figure 2b). ",
838
+ "bbox": [
839
+ 173,
840
+ 797,
841
+ 825,
842
+ 924
843
+ ],
844
+ "page_idx": 6
845
+ },
846
+ {
847
+ "type": "image",
848
+ "img_path": "images/c221d7a5dc599248b2e8acc316686536680ab72eb7b976f7e10c12e2745d2ef7.jpg",
849
+ "image_caption": [
850
+ "Figure 2: Effect of encoder depth on IWSLT’14 with and without residual connections. The $\\mathbf { X }$ -axis varies the number of layers in CNN-a and curves show different CNN-c settings. "
851
+ ],
852
+ "image_footnote": [],
853
+ "bbox": [
854
+ 183,
855
+ 102,
856
+ 807,
857
+ 301
858
+ ],
859
+ "page_idx": 7
860
+ },
861
+ {
862
+ "type": "table",
863
+ "img_path": "images/c66923628c5eab9b94b633aba00e3a5dd5531e8f954d0bbb61ca031536caf4f0.jpg",
864
+ "table_caption": [
865
+ "Table 3: Generation speed in source words per second on a single CPU core. "
866
+ ],
867
+ "table_footnote": [
868
+ "(a) IWSLT’14 German-English generation speed on tst2013 with beam size 10. "
869
+ ],
870
+ "table_body": "<table><tr><td>Encoder</td><td>Words/s</td><td>BLEU</td></tr><tr><td>BiLSTM</td><td>139.7</td><td>22.4</td></tr><tr><td>Deep Conv. 6/3</td><td>187.9</td><td>23.1</td></tr></table>",
871
+ "bbox": [
872
+ 197,
873
+ 363,
874
+ 444,
875
+ 417
876
+ ],
877
+ "page_idx": 7
878
+ },
879
+ {
880
+ "type": "table",
881
+ "img_path": "images/d079e7cd6a4e14486658a870c253863c191fbdda48a2fd48390842fc574b67aa.jpg",
882
+ "table_caption": [],
883
+ "table_footnote": [
884
+ "(b) WMT’15 English-German generation speed on newstest2015 with beam size 5. "
885
+ ],
886
+ "table_body": "<table><tr><td>Encoder</td><td>Words/s</td><td>BLEU</td></tr><tr><td>2-layer BiLSTM</td><td>109.9</td><td>23.6</td></tr><tr><td>Deep Conv. 8/4</td><td>231.1</td><td>23.7</td></tr><tr><td>Deep Conv. 15/5</td><td>203.3</td><td>24.0</td></tr></table>",
887
+ "bbox": [
888
+ 549,
889
+ 363,
890
+ 803,
891
+ 430
892
+ ],
893
+ "page_idx": 7
894
+ },
895
+ {
896
+ "type": "text",
897
+ "text": "Our convolutional architecture relies on two sets of networks, CNN-a for attention score computation $\\mathbf { a _ { i } }$ and CNN-c for the conditional input $c _ { i }$ to be fed to the decoder. We found that using the same network for both tasks, similar to recurrent encoders, resulted in poor accuracy of 22.9 BLEU. This compares to 28.5 BLEU for separate single-layer networks, or 28.3 BLEU when aggregating embeddings for $c _ { i }$ . Increasing the number of layers in the single network setup did not help. Figure 2(a) suggests that the attention weights (CNN-a) need to integrate information from a wide context which can be done with a deep stack. At the same time, the vectors which are averaged (CNN-c) seem to benefit from a shallower, more local representation closer to the input words. Two stacks are an easy way to achieve these contradicting requirements. ",
898
+ "bbox": [
899
+ 174,
900
+ 521,
901
+ 825,
902
+ 647
903
+ ],
904
+ "page_idx": 7
905
+ },
906
+ {
907
+ "type": "text",
908
+ "text": "In Appendix A we visualize attention scores and find that alignments for CNN encoders are less sharp compared to BiLSTMs, however, this does not affect the effectiveness of unknown word replacement once we adjust for shifted maxima. In Appendix B we investigate whether deep convolutional encoders are required for translating long sentences and observe that even relatively shallow encoders perform well on long sentences. ",
909
+ "bbox": [
910
+ 174,
911
+ 654,
912
+ 825,
913
+ 723
914
+ ],
915
+ "page_idx": 7
916
+ },
917
+ {
918
+ "type": "text",
919
+ "text": "5.4 TRAINING AND GENERATION SPEED ",
920
+ "text_level": 1,
921
+ "bbox": [
922
+ 176,
923
+ 747,
924
+ 467,
925
+ 762
926
+ ],
927
+ "page_idx": 7
928
+ },
929
+ {
930
+ "type": "text",
931
+ "text": "For training, we use the fast CuDNN LSTM implementation for layers without attention and experiment on IWSLT’14 with batch size 32. The single-layer BiLSTM model trains at 4300 target words/second, while as the 6/3 deep convolutional encoder compares at 5500 words/second on an NVidia Tesla M40 GPU. We do not observe shorter overall training time since SGD converges slower than Adam which we use for BiLSTM models. ",
932
+ "bbox": [
933
+ 174,
934
+ 776,
935
+ 825,
936
+ 847
937
+ ],
938
+ "page_idx": 7
939
+ },
940
+ {
941
+ "type": "text",
942
+ "text": "We measure generation speed on an Intel Haswell CPU clocked at $2 . 5 0 \\mathrm { G H z }$ with a single thread for BLAS operations. We use vocabulary selection which can speed up generation by up to a factor of ten at no cost in accuracy via making the time to compute the final output layer negligible (Mi et al., 2016; L’Hostis et al., 2016). This shifts the focus from the efficiency of the encoder to the efficiency of the decoder. On IWSLT’14 (Table 3a) the convolutional encoder increases the speed of the overall model by a factor of 1.35 compared to the BiLSTM encoder while improving accuracy by 0.7 BLEU. In this setup both encoders models have the same hidden layer and embedding sizes. ",
943
+ "bbox": [
944
+ 174,
945
+ 853,
946
+ 823,
947
+ 924
948
+ ],
949
+ "page_idx": 7
950
+ },
951
+ {
952
+ "type": "text",
953
+ "text": "",
954
+ "bbox": [
955
+ 171,
956
+ 103,
957
+ 821,
958
+ 132
959
+ ],
960
+ "page_idx": 8
961
+ },
962
+ {
963
+ "type": "text",
964
+ "text": "On the larger WMT’15 English-German task (Table 3b) the convolutional encoder speeds up generation by 2.1 times compared to a two-layer BiLSTM. This corresponds to 231 source words/second with beam size 5. Our best model on this dataset generates 203 words/second but at slightly lower accuracy compared to the full vocabulary setting in Table 2. The recurrent encoder uses larger embeddings than the convolutional encoder which were required for the models to match in accuracy. ",
965
+ "bbox": [
966
+ 174,
967
+ 138,
968
+ 823,
969
+ 208
970
+ ],
971
+ "page_idx": 8
972
+ },
973
+ {
974
+ "type": "text",
975
+ "text": "The smaller embedding size is not the only reason for the speed-up. In Table 3a (a), we compare a Conv 6/3 encoder and a BiLSTM with equal embedding sizes. The convolutional encoder is still $1 . 3 4 \\mathrm { x }$ faster (at 0.7 higher BLEU) although it requires roughly $1 . 6 \\mathrm { x }$ as many FLOPs. We believe that this is likely due to better cache locality for convolutional layers on CPUs: an LSTM with fused gates6 requires two big matrix multiplications with different weights as well as additions, multiplications and non-linearities for each source word, while the output of each convolutional layer can be computed as whole with a single matrix multiply. ",
976
+ "bbox": [
977
+ 174,
978
+ 215,
979
+ 825,
980
+ 313
981
+ ],
982
+ "page_idx": 8
983
+ },
984
+ {
985
+ "type": "text",
986
+ "text": "For comparison, the quantized deep LSTM-based model in Wu et al. (2016) processes 106.4 words/second for English-French on a CPU with 88 cores and 358.8 words/second on a custom TPU chip. The optimized RNNsearch model and $\\mathrm { C } { + } { + }$ decoder described by Junczys-Dowmunt et al. (2016) translates 265.3 words/s on a CPU with a similar vocabulary selection technique, computing 16 sentences in parallel, i.e., 16.6 words/s on a single core. ",
987
+ "bbox": [
988
+ 174,
989
+ 320,
990
+ 825,
991
+ 390
992
+ ],
993
+ "page_idx": 8
994
+ },
995
+ {
996
+ "type": "text",
997
+ "text": "6 CONCLUSION ",
998
+ "text_level": 1,
999
+ "bbox": [
1000
+ 176,
1001
+ 410,
1002
+ 318,
1003
+ 426
1004
+ ],
1005
+ "page_idx": 8
1006
+ },
1007
+ {
1008
+ "type": "text",
1009
+ "text": "We introduced a simple encoder model for neural machine translation based on convolutional networks. This approach is more parallelizable than recurrent networks and provides a shorter path to capture long-range dependencies in the source. We find it essential to use source position embeddings as well as different CNNs for attention score computation and conditional input aggregation. ",
1010
+ "bbox": [
1011
+ 174,
1012
+ 443,
1013
+ 823,
1014
+ 498
1015
+ ],
1016
+ "page_idx": 8
1017
+ },
1018
+ {
1019
+ "type": "text",
1020
+ "text": "Our experiments show that convolutional encoders perform on par or better than baselines based on bi-directional LSTM encoders. In comparison to other recent work, our deep convolutional encoder is very competitive to the best published results to date (WMT’16 English-Romanian) which are obtained with significantly more complex models (WMT’14 English-French) or stem from improvements that are orthogonal to our work (WMT’15 English-German). Our architecture also leads to large generation speed improvements: translation models with our convolutional encoder can translate twice as fast as strong baselines with bi-directional recurrent encoders. ",
1021
+ "bbox": [
1022
+ 174,
1023
+ 506,
1024
+ 825,
1025
+ 602
1026
+ ],
1027
+ "page_idx": 8
1028
+ },
1029
+ {
1030
+ "type": "text",
1031
+ "text": "Future work includes better training to enable faster convergence with the convolutional encoder to better leverage the higher processing speed. Our fast architecture is interesting for character level encoders where the input is significantly longer than for words. Also, we plan to investigate the effectiveness of our architecture on other sequence-to-sequence tasks, e.g. summarization, constituency parsing, dialog modeling. ",
1032
+ "bbox": [
1033
+ 174,
1034
+ 609,
1035
+ 823,
1036
+ 680
1037
+ ],
1038
+ "page_idx": 8
1039
+ },
1040
+ {
1041
+ "type": "text",
1042
+ "text": "ACKNOWLEDGMENTS ",
1043
+ "text_level": 1,
1044
+ "bbox": [
1045
+ 176,
1046
+ 702,
1047
+ 356,
1048
+ 717
1049
+ ],
1050
+ "page_idx": 8
1051
+ },
1052
+ {
1053
+ "type": "text",
1054
+ "text": "We would like to thank Sumit Chopra and Marc’Aurelio Ranzato for helpful discussions related to this work. ",
1055
+ "bbox": [
1056
+ 176,
1057
+ 733,
1058
+ 823,
1059
+ 761
1060
+ ],
1061
+ "page_idx": 8
1062
+ },
1063
+ {
1064
+ "type": "text",
1065
+ "text": "REFERENCES ",
1066
+ "text_level": 1,
1067
+ "bbox": [
1068
+ 176,
1069
+ 782,
1070
+ 285,
1071
+ 797
1072
+ ],
1073
+ "page_idx": 8
1074
+ },
1075
+ {
1076
+ "type": "text",
1077
+ "text": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In Proc. of ICLR, 2015. ",
1078
+ "bbox": [
1079
+ 176,
1080
+ 806,
1081
+ 823,
1082
+ 834
1083
+ ],
1084
+ "page_idx": 8
1085
+ },
1086
+ {
1087
+ "type": "text",
1088
+ "text": "James Bradbury and Richard Socher. MetaMind Neural Machine Translation System for WMT 2016. In Proc. of WMT, 2016. ",
1089
+ "bbox": [
1090
+ 178,
1091
+ 845,
1092
+ 821,
1093
+ 873
1094
+ ],
1095
+ "page_idx": 8
1096
+ },
1097
+ {
1098
+ "type": "text",
1099
+ "text": "Mauro Cettolo, Jan Niehues, Sebastian Stuker, Luisa Bentivogli, and Marcello Federico. Report on ¨ the 11th IWSLT evaluation campaign. In Proc. of IWSLT, 2014. ",
1100
+ "bbox": [
1101
+ 171,
1102
+ 103,
1103
+ 823,
1104
+ 132
1105
+ ],
1106
+ "page_idx": 9
1107
+ },
1108
+ {
1109
+ "type": "text",
1110
+ "text": "Kyunghyun Cho, Bart Van Merrienboer, Dzmitry Bahdanau, and Yoshua Bengio. On the Properties ¨ of Neural Machine Translation: Encoder-decoder Approaches. In Proc. of SSST, 2014a. ",
1111
+ "bbox": [
1112
+ 173,
1113
+ 141,
1114
+ 823,
1115
+ 171
1116
+ ],
1117
+ "page_idx": 9
1118
+ },
1119
+ {
1120
+ "type": "text",
1121
+ "text": "Kyunghyun Cho, Bart Van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Hol-¨ ger Schwenk, and Yoshua Bengio. Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation. In Proc. of EMNLP, 2014b. ",
1122
+ "bbox": [
1123
+ 176,
1124
+ 180,
1125
+ 820,
1126
+ 223
1127
+ ],
1128
+ "page_idx": 9
1129
+ },
1130
+ {
1131
+ "type": "text",
1132
+ "text": "Junyoung Chung, Kyunghyun Cho, and Yoshua Bengio. A Character-level Decoder without Explicit Segmentation for Neural Machine Translation. arXiv preprint arXiv:1603.06147, 2016. ",
1133
+ "bbox": [
1134
+ 173,
1135
+ 233,
1136
+ 823,
1137
+ 262
1138
+ ],
1139
+ "page_idx": 9
1140
+ },
1141
+ {
1142
+ "type": "text",
1143
+ "text": "Ronan Collobert, Koray Kavukcuoglu, and Clement Farabet. Torch7: A Matlab-like Environment for Machine Learning. In BigLearn, NIPS Workshop, 2011a. URL http://torch.ch. ",
1144
+ "bbox": [
1145
+ 173,
1146
+ 272,
1147
+ 823,
1148
+ 301
1149
+ ],
1150
+ "page_idx": 9
1151
+ },
1152
+ {
1153
+ "type": "text",
1154
+ "text": "Ronan Collobert, Jason Weston, Leon Bottou, Michael Karlen, Koray Kavukcuoglu, and Pavel ´ Kuksa. Natural Language Processing (almost) from scratch. JMLR, 12(Aug):2493–2537, 2011b. ",
1155
+ "bbox": [
1156
+ 174,
1157
+ 310,
1158
+ 823,
1159
+ 340
1160
+ ],
1161
+ "page_idx": 9
1162
+ },
1163
+ {
1164
+ "type": "text",
1165
+ "text": "Chris Dyer, Victor Chahuneau, and Noah A Smith. A Simple, Fast, and Effective Reparameterization of IBM Model 2. Proc. of ACL, 2013. ",
1166
+ "bbox": [
1167
+ 174,
1168
+ 349,
1169
+ 825,
1170
+ 378
1171
+ ],
1172
+ "page_idx": 9
1173
+ },
1174
+ {
1175
+ "type": "text",
1176
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. In Proc. of CVPR, 2015. ",
1177
+ "bbox": [
1178
+ 174,
1179
+ 387,
1180
+ 823,
1181
+ 417
1182
+ ],
1183
+ "page_idx": 9
1184
+ },
1185
+ {
1186
+ "type": "text",
1187
+ "text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997. ",
1188
+ "bbox": [
1189
+ 171,
1190
+ 426,
1191
+ 823,
1192
+ 457
1193
+ ],
1194
+ "page_idx": 9
1195
+ },
1196
+ {
1197
+ "type": "text",
1198
+ "text": "Sebastien Jean, Kyunghyun Cho, Roland Memisevic, and Yoshua Bengio. On Using Very Large ´ Target Vocabulary for Neural Machine Translation. arXiv preprint arXiv:1412.2007v2, 2014. ",
1199
+ "bbox": [
1200
+ 173,
1201
+ 465,
1202
+ 823,
1203
+ 496
1204
+ ],
1205
+ "page_idx": 9
1206
+ },
1207
+ {
1208
+ "type": "text",
1209
+ "text": "Sebastien Jean, Orhan Firat, Kyunghyun Cho, Roland Memisevic, and Yoshua Bengio. Montreal ´ Neural Machine Translation systems for WMT15. In Proc. of WMT, pp. 134–140, 2015. ",
1210
+ "bbox": [
1211
+ 174,
1212
+ 503,
1213
+ 823,
1214
+ 534
1215
+ ],
1216
+ "page_idx": 9
1217
+ },
1218
+ {
1219
+ "type": "text",
1220
+ "text": "Marcin Junczys-Dowmunt, Tomasz Dwojak, and Hieu Hoang. Is Neural Machine Translation Ready for Deployment? A Case Study on 30 Translation Directions. arXiv preprint arXiv:1610.01108, 2016. ",
1221
+ "bbox": [
1222
+ 176,
1223
+ 542,
1224
+ 823,
1225
+ 585
1226
+ ],
1227
+ "page_idx": 9
1228
+ },
1229
+ {
1230
+ "type": "text",
1231
+ "text": "Nal Kalchbrenner and Phil Blunsom. Recurrent Continuous Translation Models. In Proc. of EMNLP, 2013. ",
1232
+ "bbox": [
1233
+ 173,
1234
+ 595,
1235
+ 823,
1236
+ 626
1237
+ ],
1238
+ "page_idx": 9
1239
+ },
1240
+ {
1241
+ "type": "text",
1242
+ "text": "Nal Kalchbrenner, Lasse Espeholt, Karen Simonyan, Aaron van den Oord, Alex Graves, and Koray Kavukcuoglu. Neural Machine Translation in Linear Time. arXiv, 2016. ",
1243
+ "bbox": [
1244
+ 176,
1245
+ 633,
1246
+ 823,
1247
+ 664
1248
+ ],
1249
+ "page_idx": 9
1250
+ },
1251
+ {
1252
+ "type": "text",
1253
+ "text": "Diederik P. Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. Proc. of ICLR, 2014. ",
1254
+ "bbox": [
1255
+ 173,
1256
+ 672,
1257
+ 823,
1258
+ 702
1259
+ ],
1260
+ "page_idx": 9
1261
+ },
1262
+ {
1263
+ "type": "text",
1264
+ "text": "Philipp Koehn, Hieu Hoang, Alexandra Birch, Chris Callison-Burch, Marcello Federico, Nicola Bertoldi, Brooke Cowan, Wade Shen, Christine Moran, Richard Zens, Chris Dyer, Ondej Bojar, Alexandra Constantin, and Evan Herbst. Moses: Open Source Toolkit for Statistical Machine Translation. In Proc. of ACL, 2007. ",
1265
+ "bbox": [
1266
+ 173,
1267
+ 712,
1268
+ 825,
1269
+ 768
1270
+ ],
1271
+ "page_idx": 9
1272
+ },
1273
+ {
1274
+ "type": "text",
1275
+ "text": "Andrew Lamb and Michael Xie. Convolutional Encoders for Neural Machine Translation. https: //cs224d.stanford.edu/reports/LambAndrew.pdf, 2016. Accessed: 2010-10-31. ",
1276
+ "bbox": [
1277
+ 171,
1278
+ 779,
1279
+ 821,
1280
+ 809
1281
+ ],
1282
+ "page_idx": 9
1283
+ },
1284
+ {
1285
+ "type": "text",
1286
+ "text": "Gurvan L’Hostis, David Grangier, and Michael Auli. Vocabulary Selection Strategies for Neural Machine Translation. arXiv preprint arXiv:1610.00072, 2016. ",
1287
+ "bbox": [
1288
+ 171,
1289
+ 816,
1290
+ 823,
1291
+ 847
1292
+ ],
1293
+ "page_idx": 9
1294
+ },
1295
+ {
1296
+ "type": "text",
1297
+ "text": "Minh-Thang Luong, Hieu Pham, and Christopher D Manning. Effective approaches to attentionbased neural machine translation. In Proc. of EMNLP, 2015a. ",
1298
+ "bbox": [
1299
+ 173,
1300
+ 856,
1301
+ 823,
1302
+ 886
1303
+ ],
1304
+ "page_idx": 9
1305
+ },
1306
+ {
1307
+ "type": "text",
1308
+ "text": "Minh-Thang Luong, Ilya Sutskever, Quoc V Le, Oriol Vinyals, and Wojciech Zaremba. Addressing the Rare Word Problem in Neural Machine Translation. In Proc. of ACL, 2015b. ",
1309
+ "bbox": [
1310
+ 176,
1311
+ 895,
1312
+ 820,
1313
+ 924
1314
+ ],
1315
+ "page_idx": 9
1316
+ },
1317
+ {
1318
+ "type": "text",
1319
+ "text": "Fandong Meng, Zhengdong Lu, Mingxuan Wang, Hang Li, Wenbin Jiang, and Qun Liu. Encoding Source Language with Convolutional Neural Network for Machine Translation. In Proc. of ACL, 2015. \nHaitao Mi, Zhiguo Wang, and Abe Ittycheriah. Vocabulary Manipulation for Neural Machine Translation. arXiv preprint arXiv:1605.03209, 2016. \nRazvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the Difficulty of Training Recurrent Neural Networks. ICML (3), 28:1310–1318, 2013. \nNgoc-Quan Pham, Germn Kruszewski, and Gemma Boleda. Convolutional Neural Network Language Models. In Proc. of EMNLP, 2016. \nMarc’Aurelio Ranzato, Sumit Chopra, Michael Auli, and Wojciech Zaremba. Sequence level Training with Recurrent Neural Networks. In Proc. of ICLR, 2015. \nHolger Schwenk. http://www-lium.univ-lemans.fr/˜schwenk/cslm_joint_ paper/, 2014. Accessed: 2016-10-15. \nRico Sennrich, Barry Haddow, and Alexandra Birch. Neural Machine Translation of Rare Words with Subword Units. In Proc. of ACL, 2016a. \nRico Sennrich, Barry Haddow, and Alexandra Birch. Edinburgh neural machine translation systems for wmt 16. 2016b. \nNitish Srivastava, Geoffrey E. Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent Neural Networks from overfitting. JMLR, 15:1929–1958, 2014. \nSainbayar Sukhbaatar, Jason Weston, Rob Fergus, and Arthur Szlam. End-to-end Memory Networks. In Proc. of NIPS, pp. 2440–2448, 2015. \nIlya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to Sequence Learning with Neural Networks. In Proc. of NIPS, pp. 3104–3112, 2014. \nZhaopeng Tu, Baotian Hu, Zhengdong Lu, and Hang Li. Context-dependent Translation selection using Convolutional Neural Network. In Proc. of ACL-IJCNLP, 2015. \nYonghui 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. \nZichao Yang, Zhiting Hu, Yuntian Deng, Chris Dyer, and Alex Smola. Neural Machine Translation with Recurrent Attention Modeling. arXiv preprint arXiv:1607.05108, 2016. \nJie Zhou, Ying Cao, Xuguang Wang, Peng Li, and Wei Xu. Deep Recurrent Models with FastForward Connections for Neural Machine Translation. arXiv preprint arXiv:1606.04199, 2016. ",
1320
+ "bbox": [
1321
+ 171,
1322
+ 87,
1323
+ 826,
1324
+ 702
1325
+ ],
1326
+ "page_idx": 10
1327
+ },
1328
+ {
1329
+ "type": "text",
1330
+ "text": "A ALIGNMENT VISUALIZATION ",
1331
+ "text_level": 1,
1332
+ "bbox": [
1333
+ 178,
1334
+ 102,
1335
+ 452,
1336
+ 117
1337
+ ],
1338
+ "page_idx": 11
1339
+ },
1340
+ {
1341
+ "type": "text",
1342
+ "text": "In Figure 4 and Figure 5, we plot attention scores for a sample WMT’15 English-German and WMT’14 English-French translation with BiLSTM and deep convolutional encoders. The translation is on the $\\mathbf { X }$ -axis and the source sentence on the y-axis. ",
1343
+ "bbox": [
1344
+ 174,
1345
+ 133,
1346
+ 825,
1347
+ 175
1348
+ ],
1349
+ "page_idx": 11
1350
+ },
1351
+ {
1352
+ "type": "text",
1353
+ "text": "The attention scores of the BiLSTM output are sharp but do not necessarily represent a correct alignment. For CNN encoders the scores are less focused but still indicate an approximate source location, e.g., in Figure 4b, when moving the clause ”over 1,000 people were taken hostage” to the back of the translation. For some models, attention maxima are consistently shifted by one token as both in Figure 4b and Figure 5b. ",
1354
+ "bbox": [
1355
+ 174,
1356
+ 183,
1357
+ 825,
1358
+ 252
1359
+ ],
1360
+ "page_idx": 11
1361
+ },
1362
+ {
1363
+ "type": "text",
1364
+ "text": "Interestingly, convolutional encoders tend to focus on the last token (Figure 4b) or both the first and last tokens (Figure 5b). Motivated by the hypothesis that the this may be due to the decoder depending on the length of the source sentence (which it cannot determine without position embeddings), we explicitly provided a distributed representation of the input length to the decoder and attention module. However, this did not cause a change in attention patterns nor did it improve translation accuracy. ",
1365
+ "bbox": [
1366
+ 174,
1367
+ 260,
1368
+ 825,
1369
+ 343
1370
+ ],
1371
+ "page_idx": 11
1372
+ },
1373
+ {
1374
+ "type": "text",
1375
+ "text": "B PERFORMANCE BY SENTENCE LENGTH ",
1376
+ "text_level": 1,
1377
+ "bbox": [
1378
+ 174,
1379
+ 363,
1380
+ 537,
1381
+ 380
1382
+ ],
1383
+ "page_idx": 11
1384
+ },
1385
+ {
1386
+ "type": "image",
1387
+ "img_path": "images/c95fc99b56d9c6f136d4a62618abc6e188defd58378f41e2945a1410aae2aab3.jpg",
1388
+ "image_caption": [
1389
+ "Figure 3: BLEU per sentence length on WMT’15 English-German newstest2015. The test set is partitioned into 15 equally-sized buckets according to source sentence length. "
1390
+ ],
1391
+ "image_footnote": [],
1392
+ "bbox": [
1393
+ 174,
1394
+ 400,
1395
+ 812,
1396
+ 587
1397
+ ],
1398
+ "page_idx": 11
1399
+ },
1400
+ {
1401
+ "type": "text",
1402
+ "text": "One characteristic of our convolutional encoder architecture is that the context over which outputs are computed depends on the number of layers. With bi-directional RNNs, every encoder output depends on the entire source sentence. In Figure 3, we evaluate whether limited context affects the translation quality on longer sentences of WMT’15 English-German which often requires moving verbs over long distances. We sort the newstest2015 test set by source length, partition it into 15 equally-sized buckets, and compare the BLEU scores of models listed in Table 2 on a per-bucket basis. ",
1403
+ "bbox": [
1404
+ 174,
1405
+ 645,
1406
+ 825,
1407
+ 742
1408
+ ],
1409
+ "page_idx": 11
1410
+ },
1411
+ {
1412
+ "type": "text",
1413
+ "text": "There is no clear evidence for sub-par translations on sentences that are longer than the observable context per encoder output. We include a small encoder with a 6-layer CNN-c and a 3-layer CNN-a in the comparison which performs worse than a 2-layer BiLSTM (23.3 BLEU vs23.6). With 6 ˙ convolutional layers at kernel width 3, each encoder output contains information of 13 adjacent source words . Looking at the accuracy for sentences with 15 words or more, this relatively shallow CNN is either on par or better than the BiLSTM for 5 out of 10 buckets; the BiLSTM has access to the entire source context. Similar observations can be made for the deeper convolutional encoders. ",
1414
+ "bbox": [
1415
+ 173,
1416
+ 750,
1417
+ 825,
1418
+ 847
1419
+ ],
1420
+ "page_idx": 11
1421
+ },
1422
+ {
1423
+ "type": "image",
1424
+ "img_path": "images/aa12d0241e2827a66f8fbe2a1ce86bac115df68c1423b818428f0e2dc694ac7c.jpg",
1425
+ "image_caption": [
1426
+ "(b) Deep convolutional encoder with 15-layer CNN-a and 5-layer CNN-c. ",
1427
+ "Figure 4: Attention scores for WMT’15 English-German translation for a sentence of newstest2015. "
1428
+ ],
1429
+ "image_footnote": [],
1430
+ "bbox": [
1431
+ 228,
1432
+ 185,
1433
+ 767,
1434
+ 804
1435
+ ],
1436
+ "page_idx": 12
1437
+ },
1438
+ {
1439
+ "type": "image",
1440
+ "img_path": "images/4c8bf1a6005ddcb324a715eedf59794f39346ac032aff0dc532e56cbca6ef477.jpg",
1441
+ "image_caption": [],
1442
+ "image_footnote": [],
1443
+ "bbox": [
1444
+ 220,
1445
+ 207,
1446
+ 763,
1447
+ 455
1448
+ ],
1449
+ "page_idx": 13
1450
+ },
1451
+ {
1452
+ "type": "text",
1453
+ "text": "(a) 2-layer BiLSTM encoder. ",
1454
+ "bbox": [
1455
+ 411,
1456
+ 483,
1457
+ 584,
1458
+ 497
1459
+ ],
1460
+ "page_idx": 13
1461
+ },
1462
+ {
1463
+ "type": "image",
1464
+ "img_path": "images/59837aeebe9c405dac795c77ec0a6bce11ce874a2d7e71d79ecbe922c7d8fcaa.jpg",
1465
+ "image_caption": [
1466
+ "Figure 5: Attention scores for WMT’14 English-French translation for a sentence of ntst14. "
1467
+ ],
1468
+ "image_footnote": [],
1469
+ "bbox": [
1470
+ 220,
1471
+ 525,
1472
+ 764,
1473
+ 773
1474
+ ],
1475
+ "page_idx": 13
1476
+ },
1477
+ {
1478
+ "type": "text",
1479
+ "text": "(b) Deep convolutional encoder with 20-layer CNN-a and 5-layer CNN-c. ",
1480
+ "bbox": [
1481
+ 279,
1482
+ 801,
1483
+ 718,
1484
+ 816
1485
+ ],
1486
+ "page_idx": 13
1487
+ }
1488
+ ]
parse/train/BJAA4wKxg/BJAA4wKxg_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJAA4wKxg/BJAA4wKxg_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJxWx0NYPr/BJxWx0NYPr.md ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ADAPTIVE STRUCTURAL FINGERPRINTS FOR GRAPH ATTENTION NETWORKS
2
+
3
+ Kai Zhang
4
+ Department of Computer & Information Sciences
5
+ Temple University
6
+ Philadelphia PA 19122, USA
7
+ kzhang980@gmail.com
8
+
9
+ Yaokang Zhu & Jun Wang∗ School of Computer Science and Technology East Chine Normal University, Shanghai China 52184501026@stu.ecnu.edu.cn jwang@sei.ecnu.edu.cn
10
+
11
+ Jie Zhang† Institute of Brain-Inspired Intelligence Fudan University, Shanghai China jzhang080@gmail.com
12
+
13
+ # ABSTRACT
14
+
15
+ Graph attention network (GAT) is a promising framework to perform convolution and massage passing on graphs. Yet, how to fully exploit rich structural information in the attention mechanism remains a challenge. In the current version, GAT calculates attention scores mainly using node features and among one-hop neighbors, while increasing the attention range to higher-order neighbors can negatively affect performance, reflecting the over-smoothing risk of GAT (or graph neural networks in general), and the ineffectiveness in exploiting graph structural details. In this paper, we propose an “adaptive structural fingerprint” (ADSF) model to fully exploit graph topological details in graph attention network. The key idea is to contextualize each node with a weighted, learnable receptive field encoding rich and diverse local graph structures. By doing this, structural interactions between the nodes can be inferred accurately, thus significantly improving subsequent attention layer as well as the convergence of learning. Furthermore, our model provides a useful platform for different subspaces of node features and various scales of graph structures to “cross-talk” with each other through the learning of multi-head attention, being particularly useful in handling complex real-world data. Empirical results demonstrate the power of our approach in exploiting rich structural information in GAT and in alleviating the intrinsic oversmoothing problem in graph neural networks.
16
+
17
+ # 1 INTRODUCTION
18
+
19
+ Many real-world data set are represented naturally as graphs. For example, citation networks specify the citation links among scientific papers; social media often need to explore the significant amount of connections between users; biological processes typically involve complex interactions such as protein-protein-interaction (PPI). In these scenarios, the complex structures such as the graph topology or connectivities encode crucial domain-specific knowledge for the learning and prediction tasks. Examples include node embedding or classification, graph classification, and so on.
20
+
21
+ The complexity of graph-structured data makes it non-trivial to employ traditional convolutional neural networks (CNN’s). The CNN architecture was originally designed for images whose pixels are located on a uniform grids, and so the convolutional filters can be reused everywhere without having to accommodate local structure changes (LeCun & Kavukcuoglu, 2010) . However, extending CNN to deal with arbitrary structured graphs can be non-trivial. To solve this problem, graph neural networks (GNN) were early proposed by Gori et al. (2005) and Sperduti (1997), which adopt an iterative process to propagate the state of each node, followed by a neural network module to generate the output until an equilibrium state is reached. Recent development of GNN can be categorized into spectral and non-spectral approaches. Spectral approaches employ the tools in signal processing and transform the convolutional operation in the graph domain to much simpler operations of the Laplacian spectrum (Bruna et al., 2014), and various approaches have been proposed to localize the convolution in either the graph or spectral domain (Henaff et al., 2015; Defferrard et al., 2016; Kipf & Welling, 2017). Non-spectral approaches define convolutions directly on the neighboring nodes. As a result, varying node structures have to be accommodated through various processing steps such as fixed-neighborhood size sampling (Hamilton et al., 2017), neighborhood normalization (Niepert et al., 2016), or learning a weight matrix for each node degree (Duvenaud et al., 2015) or neighborhood size (Hamilton et al., 2017). Recently, residual network is also introduced to graph neural networks (Zhang & Meng, 2019).
22
+
23
+ Recently, graph attention network (GAT) proves a promising framework by combining graph neural networks with attention mechanism (Velickovic et al., 2017). The attention mechanism allows dealing with variable sized input while focusing on the most relevant parts, and has been widely used in sequence modelling (Bahdanau et al., 2015), machine translation (Luong et al., 2015), and visual processing (Xu et al., 2015). The GAT model further introduces attention module into graphs, where the hidden representation of the nodes are computed by repeatedly attending over their neighbors’ features, and the weighting coefficients are calculated inductively based on a self-attention strategy.
24
+
25
+ Despite the numerous success, how to exploit structural information in GAT remains an challenge. Note that attention scores in GAT are computed mainly based on the content of the nodes; the structures of the graph are simply used to mask the attention, e.g., only one-hop neighbors will be attended. When considering attention among higher order neighbors, however, the performance of GAT deteriorates (see experimental section for details). This is closely related to over-smoothing of GNN’s (Li et al., 2018) and reflects the weakness of GAT in effectively exploiting graph structural information. In this paper, we believe that the topology or “shapes” of local edge connections scan provide a valuable guidance on how to exploit rich structural information of graphs. For example, in social networks or biological networks, a community or pathway may be composed of nodes that are densely inter-connected with each other but several hops away. Therefore, it can be beneficial attend neighbors from the same community, even they show no direct connections. To achieve this, simply checking $\mathbf { k }$ -hop neighbors would seem insufficient and a thorough exploration of structural landscapes of the graph becomes necessary.
26
+
27
+ In order to fully exploit rich, high-order structural details in graph attention networks, we propose a new model called “adaptive structural fingerprints”. The key idea is to contextualize each node within a local receptive field composed of its high-order neighbors. Each node in the neighborhood will be assigned a non-negative, closed-form weighting based on local information propagation procedures, and so the domain (or shape) of the receptive field will adapt automatically to local graph structures and the learning task. We call this weighted, tunable receptive field for each node its “structural fingerprint”. The structural fingerprint encodes important structural details and will be used in conjunction with the node feature to compute an improved attention layer. Furthermore, our approach provides a useful platform for different subspaces of the node features and various scales of local graph structures to coordinate with each other in learning multi-head attention, being particularly beneficial in handling complex real-world graph data sets.
28
+
29
+ In Section 2, we introduce the proposed method, including limitation of content-based attention, construction of adaptive structural fingerprints, and the algorithm workflow. In Section 3, we discuss related work. Section 4 reports empirical evaluations and the last section concludes the paper.
30
+
31
+ # 2 EXPLOITING GRAPH STRUCTURAL DETAILS IN ATTENTION
32
+
33
+ # 2.1 LIMITATIONS OF CONTENT-BASED ATTENTION
34
+
35
+ The “closeness” between two nodes should be determined from both their content and structure. Here we illustrate the importance of detailed graph structures in determining node similarities. In Figure 1(a), suppose the feature similarity of node-pairs (A,B) and (A,C) are similar. Namely, content-based attention will be similar for this two node pairs. However, from structural point of view, the attention between (A,B) should be much stronger than that for (A,C). This is because A and B are located in a small, densely inter-connected community, and they share a significant portion of common neighbors; while node A and C does not have any common neighbor. In Figure 1(b), node A and node B are not direct neighbors, and connecting them takes three edges. As a result, their features will not directly affect each other in the message passing of $\mathrm { G A T ^ { 1 } }$ . However, both A and B are strongly connected to a dense community, and node B further connects to the community hub. Therefore, it is reasonable for A and B to directly affect each other.
36
+
37
+ ![](images/6d1817dd648c6bd623014f95984018589882bc5627a97d119a253db253cb20be.jpg)
38
+ Figure 1: Detailed graph structures provide important guidance in determining node attention.
39
+
40
+ In these examples, feature based similarity alone is insufficient in computing a faithful attention. One may need to take into account structural details of higher-order neighbors and how they interact with each other. In the literature, structural clues have long been exploited in solving problems of clustering, semi-supervised learning, and community detection . For example, normalized cut minimizes edge connections between clusters for node partitioning (Shi & Malik, 2000); mean-shift uses density peaks to identify clusters (Comaniciu & Meer, 2002); low-density separation (Chapelle & Zien, 2005) assumes that class boundaries pass through low-density regions, leading to successful semi-supervised classification; in community detection, densely connected subgraphs are the main indicator of community (Girvan & Newman, 2002).
41
+
42
+ In the following, we show how to build “adaptive structural fingerprint” to extract informative structural clues to improve graph attention and henceforth node embedding and classification.
43
+
44
+ # 2.2 ADAPTIVE STRUCTURAL FINGERPRINTS
45
+
46
+ Key to exploiting the structural information is the construction of the so-called ”adaptive structural fingerprints”, by placing each node in the context of the its local ”receptive field”. Figure 2 is an illustration. For any node $i$ , consider a spanning process that locates a local subgraph around $i$ , for example, all the nodes within the $k$ -hop neighbors of $i$ . Denote the resultant subgraph as $( V _ { i } , E _ { i } )$ , where $V _ { i }$ and $E _ { i }$ are the set of nodes (dark red) and edges (black) in this neighborhood. In the meantime, each node in $_ i$ will be assigned a non-negative weight, denoted by $\mathbf { w } _ { i } \in \mathbb { R } ^ { n _ { i } \times 1 }$ , which specifies the importance of each node in shaping the receptive filed also determines the effective “shape” and size of the field. The structural fingerprint of node $i$ will be defined as $F _ { i } = \left( V _ { i } , \mathbf { w } _ { i } \right)$ .
47
+
48
+ # 2.3 CONSTRUCTION OF THE STRUCTURAL FINGERPRINTS
49
+
50
+ Intuitively, the weight of the nodes should decay with their distance from the center of the fingerprint. A simple idea is to compute the weight of the node $j$ using a Gaussian function of its distance from the center node $i$ , i.e $\begin{array} { r } { . , { \bf w } _ { i } ( j ) = \exp ( - \frac { d i s ( i , j ) ^ { 2 } } { \gamma h ^ { 2 } } ) } \end{array}$ which we call Gaussian decay. Alternatively, we ican map the node distance levels $[ 1 , 2 , . . . , k ]$ to weight levels $\mathbf { u } = [ u _ { 1 } , u _ { 2 } , . . . , \overset { \cdot } { u _ { k } } ]$ which are nonnegative and monotonic; we call nonparametric decay, which is more flexible and will be used in our experiments. In both cases, the decay parameter (Gaussian bandwidth $h$ or nonparametric decay profile $\mathbf { u }$ ) can be optimized, making the structural fingerprint more adaptive to the learning process.
51
+
52
+ In practice, it is more desirable if node weights can be automatically adjusted by local graph structures (shapes or density of connections). To achieve this, we propose to use Random Walk with Restart (RWR). Random walks were first developed to explore global topology of a network by simulating a particle iteratively moving among neighboring nodes (Lovasz, 1993). If the particle is forced to always restart in the same node (or set of “seed” nodes), random walk with restart (RWR) can then quantify the structural proximity between the seed(s) and all the other nodes in the graph, which has been widely used in information retrieval (Tong et al., 2006; Pan et al., 2004).
53
+
54
+ ![](images/d6164c147b368c2c717578553c289c51a250bd832dc4b31c2f6581f477899167.jpg)
55
+ Figure 2: Structural fingerprint for a given node $i$ , denoted by $F _ { i } = ( V _ { i } , \mathbf { w } _ { i } )$ , where $V _ { i }$ is the set of nodes in this local receptive field and $\mathbf { w } _ { i }$ is the contributing weights of the nodes.
56
+
57
+ ![](images/a75615fa25024d4da704e7d5a92d22ffb1477dd0b08964afa6289184b7712ead.jpg)
58
+ Figure 3: Weights $\mathbf { w } _ { i }$ of a toy structural fingerprint. Left: the local subgraph/fingerprint; middle: visualization of the weights; right: contours of the weights. Gaussian decay and RWR(random walk with restart) decay leads to different weight contours, the latter more adaptively adjusting the weights to structural details of the local graph.
59
+
60
+ Consider a random walk with restart on a structural fingerprint centered around node $i$ , with altogether $n _ { i }$ nodes and adjacency matrix $\mathbf { E } _ { i }$ . The particle starts from the center node $i$ and randomly walks to its neighbors in $V _ { i }$ with a probability proportional to edge weights. In each step, it also has a certain probability to return to the center node. The iteration can be written as
61
+
62
+ $$
63
+ \mathbf { w } _ { i } ^ { ( t + 1 ) } = c \cdot \tilde { \mathbf { E } } _ { i } \mathbf { w } _ { i } ^ { ( t ) } + ( 1 - c ) \cdot \mathbf { e } _ { i }
64
+ $$
65
+
66
+ where $\tilde { \bf E }$ is the transition probability matrix by normalizing columns of $\mathbf { E } _ { i }$ , $c \in [ 0 , 1 ]$ is a tradeoff parameter between random walk and restart, and $\mathbf { e } _ { i }$ is a vector of all zeros except the entry corresponding to the center node $i$ . The converged solution can be written in closed form as
67
+
68
+ $$
69
+ \mathbf { w } _ { i } = ( \mathbf { I } - c \cdot { \tilde { \mathbf { E } } } _ { i } ) ^ { - 1 } \mathbf { e } _ { i } .
70
+ $$
71
+
72
+ The $\mathbf { w } _ { i }$ quantifies the proximity between the center node $i$ and all other nodes of the fingerprint, and in the meantime naturally reflects local structural details of the graph. The $c$ controls the decaying rate (effective size) of the fingerprint: if $c = 0$ , $\mathbf { w } _ { i }$ will all be zeros except the ith node; if $c = 1$ , $\mathbf { w } _ { i }$ will be the stationary distribution of a standard random walk on graph $( V _ { i } , \mathbf { E } _ { i } )$ . In practice, $c$ will be optimized so that the fingerprint adapts naturally to both the graph structure and the learning task.
73
+
74
+ In Figure 3, we illustrate Gaussian-based and RWR-based fingerprint weights. We created a toy example of local receptive field, which for convenience is a uniform grid but with a small denser “patch” on the right bottom. As can be expected, the Gaussian based weight decay has contours that are center-symmetric. In comparison, the RWR automatically takes into account salient local structures and so the contours will be biased towards the dense subgraph. This is particularly desirable in case the center node is close to (or residing in) a community; it will then be represented more closely by the nodes from community, achieving the effect of a “structural attractor”.
75
+
76
+ As can be seen, the “structural attractor” effect in building the fingerprint with RWR coincides well with commonly used clustering assumptions, namely, the structural fingerprint of a node will emphasize more on densely inter-connected neighbors within predefined range. Since highly weighted nodes are more likely to come from the same cluster as the center node, the fingerprint of each node is supposed to provide highly informative guidance on its structural identity, thus improving evaluation of node similarites and finally the graph attention.
77
+
78
+ # 2.4 ALGORITHM DESCRIPTION
79
+
80
+ In this section we will exploit both the content and structural details of the graph in the GAT framework (Velickovic et al., 2017). Our algorithm is illustrated in Figure 4.
81
+
82
+ ![](images/1c3e589e569d163444cba25daf435c30fd5f62c501107079aa51a81f459a0fa5.jpg)
83
+ Figure 4: The work flow of adaptive structural fingerprint model.
84
+
85
+ Suppose we want to compute attention coefficients between a pair of nodes $i$ and $j$ , each with their features and structural fingerprints. Content-wise, features of the two nodes will be used to compute their content similarity; structure-wise, structural fingerprints of the two nodes will be used to evaluate their interaction. Both scores will be incorporated in the attention layer, which will then be used in the message passing step to update node features. Following Velickovic et al. (2017), we also apply a transform on the features, and apply multiple steps of message passing.
86
+
87
+ More specifically, given a graph of $n$ nodes $G = ( V , \mathbf { E } )$ where $V$ is the set of the nodes and $\mathbf { E }$ is the set of the edges; let $\{ { \bf h } _ { i } \} _ { i = 1 } ^ { n }$ be the $d$ -dimensional input features for each node. We will follow the basic structure of GAT algorithm (Velickovic et al., 2017) and describe our algorithms as follows.
88
+
89
+ • Step 1. Evaluate the content similarity between node $i$ and $j$ as
90
+
91
+ $$
92
+ e _ { i j } = \mathcal { A } _ { f e a } ( \mathbf { W } \mathbf { h } _ { i } , \mathbf { W } _ { j } )
93
+ $$
94
+
95
+ where $\mathbf { W } \in \mathbb { R } ^ { d \times d }$ is the transformation that maps the node features to a latent space, and function $\boldsymbol { \mathcal { A } } _ { f e a } ( \cdot , \cdot )$ computes similarity (or interaction) between two feature $\mathbf { h } _ { i }$ and $\mathbf { h } _ { j }$ ,
96
+
97
+ $$
98
+ \boldsymbol { \mathcal { A } _ { f e a } } ( \mathbf { W } \mathbf { h } _ { i } , \mathbf { W } \mathbf { h } _ { j } ) = \mathbf { a } ^ { \top } ( \mathbf { W } \mathbf { h } _ { i } | | \mathbf { W } _ { j } )
99
+ $$
100
+
101
+ • Step 2. Evaluate structural interaction between the structural fingerprints of node $i$ and $j$ ,
102
+
103
+ $$
104
+ s _ { i j } = \mathcal { A } _ { s t r } ( F _ { i } , F _ { j } )
105
+ $$
106
+
107
+ where $\mathcal { A } _ { s t r } ( F _ { i } , F _ { j } )$ quantifies the interaction between two fingerprints. Let $\mathbf { w } _ { i }$ and $\mathbf { w } _ { j }$ be the node weights of the fingerprints for node $i$ and $j$ , as discussed in Section 2.3. Then we can adopt the weighted Jacard similarity to evaluate the structural interactions, as
108
+
109
+ $$
110
+ \mathcal { A } _ { s t r } ( F _ { i } , F _ { j } ) = \frac { \sum _ { p \in ( V _ { i } \cup V _ { j } ) } \operatorname* { m i n } ( w _ { i p } , w _ { j p } ) } { \sum _ { p \in ( V _ { i } \cup V _ { j } ) } \operatorname* { m a x } ( w _ { i p } , w _ { j p } ) }
111
+ $$
112
+
113
+ Here, with an abuse of notations, we have expanded $\mathbf { w } _ { i }$ and ${ \bf w } _ { j }$ to all the nodes in $V _ { i } \cup V _ { i }$ by filling zeros. We can consider the following smooth version, or other smooth alternative2.
114
+
115
+ $$
116
+ \operatorname* { m a x } ( x , y ) = \operatorname* { l i m } _ { t } { \frac { \log ( e ^ { t \cdot x } + e ^ { t \cdot y } ) } { t } } , \ \operatorname* { m i n } ( x , y ) = \operatorname* { l i m } _ { t } - { \frac { \log ( e ^ { t \cdot ( - x ) } + e ^ { t \cdot ( - y ) } ) } { t } }
117
+ $$
118
+
119
+ • Step 3. Normalize (sparsify) feature similarities (2) and the structural interactions as (4)
120
+
121
+ $$
122
+ \bar { e } _ { i j } \frac { \mathrm { e x p } ( \mathrm { L e a k y R e l u } ( e _ { i j } ) ) } { \sum \mathrm { e x p } ( \mathrm { L e a k y R e l u } ( e _ { i k } ) ) } , \bar { s } _ { i j } \frac { \mathrm { e x p } ( s _ { i j } ) } { \sum \mathrm { e x p } ( s _ { i k } ) }
123
+ $$
124
+
125
+ and then combine them to compute the final attention
126
+
127
+ $$
128
+ a _ { i j } = \frac { \alpha ( \bar { e } _ { i j } ) \bar { e } _ { i j } + \beta ( \bar { s } _ { i j } ) \bar { s } _ { i j } } { \alpha _ { ( } \bar { e } _ { i j } ) + \beta ( \bar { s } _ { i j } ) } .
129
+ $$
130
+
131
+ Here $\alpha ( \cdot )$ and $\beta ( \cdot )$ are transfer functions (such as Sigmoid) that adjust feature similarity and structure interaction scores before combining them. For simplicity (and in our experiments), we use scalar $\alpha$ and $\beta$ , which leads to a standard weighted average.
132
+
133
+ • Step 4. Perform message passing to update the features of each node as
134
+
135
+ $$
136
+ \mathbf { h } _ { i } ^ { ( t + 1 ) } = \sigma \left( \sum _ { j \in \mathcal { N } _ { i } } \alpha _ { i j } \mathbf { W } \mathbf { h } _ { j } ^ { ( t ) } \right)
137
+ $$
138
+
139
+ Our algorithm has a particular advantage when multi-head attention is pursued. Note that our model simultaneously calculates two attention scores: the content-based $e _ { i j }$ and structure-based $s _ { i j }$ , and combine them together. Therefore each attention head will accommodate two sets of parameters: (1) those of the content-based attention, $\mathbf { W }$ and a (3), which explores the subspace of the node features, and (2) those of the structure-based attention, $c$ (1), which explores the decay rate of the structural fingerprint. As a result, by learning an optimal mixture of the two attention (6), our model provides a flexible platform for different subspaces of node features and various scales of local graph structures to “cross-talk” with each other, which can be quite useful in exploring complex real-world data.
140
+
141
+ Computationally, the local receptive field will be confined within a $k$ -hop neighborhood, which we call “fingerprint size”; on the other hand, both structural attention and content-based attention will be considered only when the center node of the two receptive fields have a distance below the threshold $k ^ { \prime }$ , which we call “attention range”. In experiments we simply set $k = k ^ { \prime } = 2$ , and use breadthfirst-search (BFS) to localize the neighborhood. As a result, the complexity involved in structure exploration will be $O ( n | \overline { { \mathcal { N } _ { k ^ { \prime } } } } | )$ , where $| \overline { { \mathcal { N } _ { k ^ { \prime } } } } |$ is the averaged $k ^ { \prime }$ -hop-neighbor size.
142
+
143
+ # 3 COMPARISONS WITH RELATED WORK
144
+
145
+ Note that in graph convolutional network (Kipf & Welling, 2017), the node representation is updated by $\begin{array} { r } { \mathbf { h } _ { i } ^ { ( t + 1 ) } = \sigma \left( \sum _ { j \in \mathcal { N } _ { i } ^ { \mathbf { A } } } [ \mathbf { D } ^ { - 1 / 2 } \mathbf { A } \mathbf { D } ^ { - 1 / 2 } ] _ { i j } \mathbf { h } _ { j } ^ { ( t ) } \mathbf { W } \right) } \end{array}$ , where $\mathbf { A }$ is the adjacency matrix, $\mathbf { D }$ is the degree matrix, $\mathbf { h } _ { i }$ is representation of the ith node and $\mathbf { W }$ an embedding matrix. Namely, the message passing is mainly determined by the (normalized) adjacency matrix. The GAT method (Velickovic et al., 2017) replaces the fixed adjacency matrix with an inductive, trainable attention function that relies instead on the node features within one-hop neighbors. Our approach has a notable difference. First, our message passing is determined by a mixed attention from both structure and content (6). Second, the structural component of our attention is not simply based on the graph adjacency (Kipf & Welling, 2017), or one-hop neighbor (Velickovic et al., 2017), but instead relies on a local receptive field whose “shapes” are optimized adaptively through learning (1). Furthermore, our method fully exploits structural details (e.g. density and topology of local connections). There are also a number of works that explore structures in graph classification (Lee et al., 2018; Rossi et al., 2019). There, attention is used to identify small but discriminative parts of the graph, also called “graphlets” or “motifs” (Morris et al., 2019), in order to perform classification on the graph level.
146
+
147
+ Table 1: Summary statistics of the benchmark graph-structured data sets used in the experiment.
148
+
149
+ <table><tr><td>Data</td><td>#Nodes #Edges</td><td>#Features</td><td># Classes</td><td>#Training</td><td># Validation</td><td>#Testing</td></tr><tr><td>Cora</td><td>2708 5429</td><td>1433</td><td>7</td><td>140</td><td>500</td><td>1000</td></tr><tr><td>Citeseer</td><td>3327 4732</td><td>3703</td><td>6</td><td>120</td><td>500</td><td>1000</td></tr><tr><td>Pubmed</td><td>19717 44338</td><td>500</td><td>3</td><td>60</td><td>500</td><td>1000</td></tr></table>
150
+
151
+ # 4 EXPERIMENTS
152
+
153
+ In this section, we report experimental results of the proposed method and state-of-the-art algorithms using graph-based benchmark data sets and transductive classification problem. Our codes can be downloaded from the anonymous Github link http://github.com/AvigdorZ.
154
+
155
+ # 4.1 EXPERIMENTAL SETTING AND RESULTS
156
+
157
+ We have reported results of the following baseline algorithms: Gaussian fields and harmonic function (Gaussian Fields) (Zhu et al., 2003), manifold regularization (Manifold Reg.) (Belkin et al., 2006); Deep Semi-supervised learning (Deep-Semi) (Weston et al., 2012); link-based classification (Link-based) Lu & Getoor. (2003); skip-gram based graph embedding (Deep-Walk) (Perozzi et al., 2014); semi-supervised learning with graph embedding (Planetoid) (Yang et al., 2016); graph convolutional networks (GCN) (Kipf & Welling, 2017); high-order chebyshev filters with GCN (Chebyshev) (Defferrard et al., 2016), and the mixture model CNN (Mixture-CNN) (Monti et al., 2016). We have selected three benchmark graph-structured data set from (Sen et al., 2008), namely Cora, Citeseer, and Pubmed. The three data sets are all citation networks. Here, each node denotes one document, and an edge will connect two nodes if there is citation link between the two document; the raw features of each document are bags-of-words representations. Each node (document) will be associated with one label, and following the transductive setting in (Velickovic et al., 2017; Yang et al., 2016) we only use 20 labeled samples for each class but with all the remaining, unlabelled data for training. We split the data set into three parts: training, validation, and testing, as shown in table 1. Algorithm performance will be evaluated on the classification precision on the test split. For algorithm using random initialization, averaged performance over 10 runs will be reported.
158
+
159
+ The network structures of our methods follow the GAT method (Velickovic et al., 2017), with the following details. Altogether two layers of message passing are adopted. In the first layer, one transformation matrix $\breve { \mathbf { W } } \in \mathbb { R } ^ { d \times 8 }$ is learned for each of altogether 8 attention heads; in the second layer, a transformation matrix $\mathbf { W } \in \mathbb { R } ^ { 6 4 \times C }$ is used on the concatenated features (from the 8 attention head from the first layer), and one attention head is adopted followed by a softmax operator, where $C$ is the number of classes. The number of parameters is $6 4 ( d + C )$ . For the Pubmed data set, 8 attention heads are used in the second layer due to the larger graph size. Adam SGD is used for optimization, with learning rate $\lambda = 5 \times 1 e - 4$ . See more details in (Velickovic et al., 2017). Both the fingerprint size and the attention range is chosen as 2-hop neighbors in our approach.
160
+
161
+ Results are reported in table 2. Our method has 2 variations, including ADSF-Nonparametric, where we learn a non-parametric decay profile w.r.t. node distance; ADSF-RWR, where we use randomwalk with re-start to build fingerprints. For both cases, we have used 2-hop neighbors, and the restart probability is simply chosen as $c = 0 . 5$ . As can be seen, our approach consistently improves the performance on all benchmark data sets. Since Velickovic et al. (2017) has performed an extensive set of evaluations in their work, we will use their reported results forbaseline methods. It is also worthwhile to note that our method only has a few more parameters compared with GAT (e.g., nonparametric decay profile u, $c$ in RWR, and the mixing ratios in (6)). For example, for Cora data set, GAT model has about 91k parameters, while our method adds around 30 extra parameters on top of it (about $0 . 0 3 \%$ of the original model size).
162
+
163
+ Table 2: Classification accuracy for different transductive methods on the benchmark data sets.
164
+
165
+ <table><tr><td>Methods</td><td>Cora</td><td>Citeseer</td><td>Pubmed</td></tr><tr><td rowspan="3">Gaussian Fields (Zhu et al., 2003) Deep-Semi (Weston et al., 2012) Manifold Reg. (Belkin et al., 2003) Deep-Walk (Perozzi et al., 2014) Link-based (Lu &amp; Getoor, 2003) Planetoid (Yang et al., 2016)</td><td>68.0%</td><td>45.3%</td><td>63.0% 71.7%</td></tr><tr><td>59.0% 59.5%</td><td>59.6% 60.1%</td><td>70.7%</td></tr><tr><td>67.2% 75.1% 75.7% 81.2%</td><td>43.2% 69.1% 64.7%</td><td>65.3% 73.9% 77.2%</td></tr><tr><td rowspan="3">GCN (Kipf &amp; Welling et al., 2017) Mixture-CNN(Monti et al., 2016) GAT (Velickovic et al., 2017) ADSF-Nonparametric ADSF-RWR</td><td>81.5%</td><td>69.8% 70.3%</td><td>74.4% 79.0%</td></tr><tr><td>81.7%</td><td></td><td>79.0%</td></tr><tr><td>83.0±0.7% 84.7±0.3%</td><td>72.5±0.7% 73.8±0.3%</td><td>79.0±0.3% 79.4±0.3%</td></tr></table>
166
+
167
+ ![](images/57115c7191bbffaeae26b760624e0e8c1ea077fcc693ab495ab06a60e9e471b8.jpg)
168
+ Figure 5: Convergence of the accuracy and loss of the proposed method and GAT method.
169
+
170
+ In Figure 5, we plot evolution of the testing accuracy and loss function (on the test split) for GAT and our method (ADSF-RWR). Since the loss functions of the two methods are the same, they are directly comparable. The accuracy of GAT fluctuates through iterations, while our approach is more stable and converges to a higher accuracy. The objective value of our method also converges faster thanks to the utilization of higher-order neighborhood information through structural fingerprints.
171
+
172
+ # 4.2 ABLATION STUDIES
173
+
174
+ In this section, We further examined some interesting details of the proposed method, all using the Cora data set and the RWR fingerprint construction scheme.
175
+
176
+ Table 3: Performance of GAT under different choices of the neighborhood range.
177
+
178
+ <table><tr><td>Hop</td><td>k&#x27;=1</td><td>K&#x27;=2</td><td>k&#x27;=3</td></tr><tr><td>Cora</td><td>83.0±0.7%</td><td>15.2±6.8%</td><td>13.3±4.7%</td></tr><tr><td>Citeseer</td><td>72.5±0.7%</td><td>68.4±4.1%</td><td>65.7±4.5%</td></tr><tr><td>Pubmed</td><td>79.0±0.3%</td><td>78.2±0.5%</td><td>67.2±0.3%</td></tr></table>
179
+
180
+ Impact of the fingerprint size. Intuitively, the structural fingerprint should neither be too small or too large. We have two steps to control the effective size of the fingerprint. In constructing the fingerprint, we will first choose neighboring nodes within a certain range, namely the $k$ -hop neighbors; then we will fine-tune the weight of each node in the fingerprint, either through nonparametric decay profile or the $c$ parameter in random walk. Here, for comparison, we have fixed $c = 0 . 5$ and varied $k$ as $k = 1 , 2 , 3$ . As shown in Figure 6(a), the optimal order of neighborhood is two in this setting.
181
+
182
+ Impact of the attention range. In GAT, only direct neighbors have attention to each other, namely the attention range is $k ^ { \prime } = 1$ . In our approach, the optimal choice is $k ^ { \prime } = 2$ . The attention range determines the number of neighboring nodes involved in message passing. In the Cora dataset, the average 1st-order neighborhood size is $| \mathcal { N } _ { 1 } | = 3 . 9$ , while for 2nd-order neighbors $| \mathcal { N } _ { 2 } | = 4 2 . 5$ . Namely, our approach has involved 10 times more neighbors in message passing than GAT, yet the performance is improved instead. This is an evidence that our approach helps alleviate oversmoothing in GAT (or GNN’s in general) by exploiting high-order structural details more effectively.
183
+
184
+ ![](images/6141602acf21525fd0a330e440b8b24a72013b14fac4725f053916a4a050d4b5.jpg)
185
+ Figure 6: Detailed studies of the adaptive structural fingerprint method.
186
+
187
+ Impract of the re-start probability in RWR. In Figure 6(b), we plot the learning performance w.r.t. the choice of the $c$ parameter in RWR when fixing the neighborhood range $k = 2$ . As can be seen, the best performance is around $c = 0 . 5$ , meaning that the “random walking” and “restarting” should be given similar chances within 2-hop neighbors. Empirically, we can always use back-propagation to optimize the choice of $c$ , which can be more adaptive to the choice of the $k$ -hop neighbors.
188
+
189
+ Non-parametric decay profile. In Figure 6(c), we plot the non-parametric decay profile $\mathbf { u }$ learned by our method, when setting the neighborhood orders to $k = 3$ . As can be seen, the first-order and second-order neighbors have higher weights, while the third-order neighbors almost have zero weights, meaning that they almost make no contributions to computing the structural attention. This is consistent to our evaluations in Figure 5(a), and demonstrates the power of our method in identifying useful high-order neighbors.
190
+
191
+ # 4.3 IMPACT OF NEIGHBORHOOD RANGE IN GAT
192
+
193
+ As suggested by the anonymous reviewer, we perform an empirical study on the GAT performance when larger attention range is considered. Note that in the original GAT by Velickovic et al. (2017), attention score is computed only for nodes that are direct neighbors with each other. Here, we increase the domain of interaction to up to 2-hop and 3-hop neighbors, with all other components remaining the same. As can be seen from Table 3, the performance of GAT is the best when choosing only 1-hop neighbors to compute attention scores, and deteriorates rapidly when larger neighborhood is considered.
194
+
195
+ We speculate that although larger attention range involves more neighbors and possibly more useful nodes, it bring a significant number of noisy nodes as well. As a result, the GAT performance is negatively affected. This seems to indicate that feature-based attention alone might not be sufficient in identifying noisy neighbors. In our approach, attention scores are computed from both node features and informative structural details, therefore it enables exploring a wider collection of higherorder-neighbors while simultaneously removing the impact of irrelevant nodes, validating the benefit of structure-based attention.
196
+
197
+ # 5 CONCLUSION AND FUTURE WORK
198
+
199
+ In this work, we proposed an adaptive structural fingerprint model to encode complex topological and structural information of the graph to improve graph representation learning. In the future, we will consider varying fingerprint parameters (e.g. decay profile) instead of sharing them across all the nodes; we will consider applying our approach to graph partitioning and community detection, where node features might be unavailable and graph structures will be the main source of information that can be explored; we will also extend our approach to the challenging problem of graph classification. On the theoretical side, we will borrow existing tools in semi-supervised learning and study the generalization performance of our approach on semi-supervised node embedding and classification.
200
+
201
+ # ACKNOWLEDGEMENT
202
+
203
+ We highly appreciate the valuable comments from anonymous reviewers, which allow us to significantly improve both the presentation and experimental design of our work. This work is supported in part by the National Science Foundation of China No.61672236, National Science Foundation of China No.61573107, Shanghai National Science Foundation 17ZR1444200, Shanghai Municipal Science and Technology Major Project No.2018SHZDZX01.
204
+
205
+ # REFERENCES
206
+
207
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In International Conference on Learning Representations, 2015.
208
+
209
+ Mikhail Belkin, Partha Niyogi, and Vikas Sindhwani. Manifold regularization: A geometric framework for learning from labeled and unlabeled examples. Journal of machine learning research, 7:2399–2434, 2006.
210
+
211
+ Joan Bruna, Wojciech Zaremba, Arthur Szlam, and Yann LeCun. Spectral networks and locally connected networks on graphs. In International Conference on Learning Representations, 2014.
212
+
213
+ Olivier Chapelle and Alexander Zien. Semi-supervised classification by low density separation. In Proceedings of the Tenth International Workshop on Artificial Intelligence and Statistics, 2005.
214
+
215
+ Dorin Comaniciu and Peet Meer. Mean shift: a robust approach toward feature space analysis. IEEE Transactions on Pattern Analysis and Machine Intelligence, 24:603 – 619, 08 2002.
216
+
217
+ Michael Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on graphs with fast localized spectral filtering. In Advances in Neural Information Processing Systems, 2016.
218
+
219
+ David K . Duvenaud, Dougal Maclaurin, Jorge Iparraguirre, Rafael Bombarell, Timothy Hirzel, Alan Aspuru-Guzik, and Ryan P. Adams. Convolutional networks on graphs for learning molecular fingerprints. In Advances in neural information processing systems, 2015.
220
+
221
+ Michelle Girvan and Mark Newman. Girvan, m. newman, m. e. j. community structure in social and biological networks. proc. natl acad. sci. usa 99, 7821-7826. Proceedings of the National Academy of Sciences of the United States of America, 99:7821–6, 07 2002.
222
+
223
+ Marco Gori, Gabriele Monfardini, Gori ScarselliMarco, Gabriele Monfardini, and Franco Scarselli. A new model for learning in graph domains. In IEEE International Joint Conference on Neural Networks, 2005.
224
+
225
+ William L . Hamilton, Rex Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Neural Information Processing Systems, 2017.
226
+
227
+ Mikael Henaff, Joan Bruna, and Yann LeCun. Deep convolutional networks on graph-structured data. In arXiv:1506.05163, 2015.
228
+
229
+ Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations, 2017.
230
+
231
+ Yann LeCun and Clement Kavukcuoglu, Koray Farabet. Convolutional networks and applications ´ in vision. In Proceedings of IEEE International Symposium on Circuits and Systems, 2010.
232
+
233
+ John Boaz Lee, Ryan Rossi, and Xiangnan Kong. Graph classification using structural attention. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery Data Mining, 2018.
234
+
235
+ Qimai Li, Zhichao Han, and Xiao-Ming Wu. Deeper insights into graph convolutional networks for semi-supervised learning. In 32nd AAAI Conference on Artificial Intelligence, 2018.
236
+
237
+ L. Lovasz. Random walks on graphs: a survey. Combinatorics, 2:1–46, 1993.
238
+
239
+ Qing Lu and Lise Getoor. Link-based classification. In Proceedings of the 20th International Conference on Machine Learning, 2003.
240
+
241
+ Minh-Thang Luong, Hieu Pham, and Christoper Manning. Effective approaches to attention-based neural machine translation. 08 2015. doi: 10.18653/v1/D15-1166.
242
+
243
+ Federico Monti, Davide Boscaini, Jonathan Masci, Emanuele Rodola, Jan Svoboda, and Michael M. Bronstein. Geometric deep learning on graphs and manifolds using mixture model cnns. In arXiv:1611.08402, 2016.
244
+
245
+ Christopher Morris, Martin Ritzert, Matthias Fey, William L. Hamilton, Jan Eric Lenssen, Gaurav Rattan, and Martin Grohe. Weisfeiler and leman go neural: Higher-order graph neural networks. In AAAI Conference on Artificial Intelligence, 2019.
246
+
247
+ Mathias Niepert, Mohamed Ahmed, and Konstantin Kutzkov. Learning convolutional neural networks for graphs. In In Proceedings of The 33rd International Conference on Machine Learning, 2016.
248
+
249
+ Jia-Yu Pan, HyungJeong Yang, Pinar Duygulu, and Christos Faloutsos. Automatic multimedia cross-modal correlation discovery. In ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2004.
250
+
251
+ Bryan Perozzi, Rami Al-Rfou, and Steven Skiena. Deepwalk: Online learning of social representations. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, 2014.
252
+
253
+ Ryan A. Rossi, Nesreen K. Ahmed, and Eunyee Koh. Higher-order network representation learning. In WWW Web Conference, 2019.
254
+
255
+ Prithviraj Sen, Galileo Namata, Mustafa Bilgic, Lise Getoor, Brian Galligher, and Tina Eliassi-Rad. Collective classification in network data. AI magazine, 29(3):93, 2008.
256
+
257
+ Jianbo Shi and Jitendra Malik. Normalized cuts and image segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22:888–905, 2000.
258
+
259
+ A. Sperduti, A. andStarita. Trans. neur. netw. Supervised neural networks for the classification of structures., 8:714–735, 1997.
260
+
261
+ Hanghang Tong, Christos Faloutsos, and Jia-Yu Pan. Fast random walk with restart and its applications. In Proceedings of the Sixth International Conference on Data Mining, 2006.
262
+
263
+ Petar Velickovic, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. Graph attention networks. In International Conference on Learning Representations, 2017.
264
+
265
+ Jason Weston, Frederic Ratle, Hossein Mobahi, and Ronan Collobert. Deep learning via semisupervised embedding. Neural Networks: Tricks of the Trade, pp. 639–655, 2012.
266
+
267
+ Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In Proceedings of the 32 nd International Conference on Machine Learning, 2015.
268
+
269
+ Zhilin Yang, William Cohen, and Ruslan Salakhudinov. Revisiting semi-supervised learning with graph embeddings. In International Conference on Machine Learning, 2016.
270
+
271
+ Jiawei Zhang and Lin Meng. Gresnet: Graph residual network for reviving deep GNNs from suspended animation. In arXiv.org. 2019.
272
+
273
+ Xiaojin Zhu, Zoubin Ghahramani, and John D. Lafferty. Semi-supervised learning using gaussian fields and harmonic functions. In Proceedings of the 20th International conference on Machine learning, 2003.
parse/train/BJxWx0NYPr/BJxWx0NYPr_content_list.json ADDED
@@ -0,0 +1,1441 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "ADAPTIVE STRUCTURAL FINGERPRINTS FOR GRAPH ATTENTION NETWORKS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 823,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Kai Zhang \nDepartment of Computer & Information Sciences \nTemple University \nPhiladelphia PA 19122, USA \nkzhang980@gmail.com ",
17
+ "bbox": [
18
+ 184,
19
+ 170,
20
+ 508,
21
+ 239
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Yaokang Zhu & Jun Wang∗ School of Computer Science and Technology East Chine Normal University, Shanghai China 52184501026@stu.ecnu.edu.cn jwang@sei.ecnu.edu.cn ",
28
+ "bbox": [
29
+ 526,
30
+ 170,
31
+ 836,
32
+ 239
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Jie Zhang† Institute of Brain-Inspired Intelligence Fudan University, Shanghai China jzhang080@gmail.com ",
39
+ "bbox": [
40
+ 184,
41
+ 261,
42
+ 436,
43
+ 316
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "ABSTRACT ",
50
+ "text_level": 1,
51
+ "bbox": [
52
+ 454,
53
+ 354,
54
+ 544,
55
+ 369
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "Graph attention network (GAT) is a promising framework to perform convolution and massage passing on graphs. Yet, how to fully exploit rich structural information in the attention mechanism remains a challenge. In the current version, GAT calculates attention scores mainly using node features and among one-hop neighbors, while increasing the attention range to higher-order neighbors can negatively affect performance, reflecting the over-smoothing risk of GAT (or graph neural networks in general), and the ineffectiveness in exploiting graph structural details. In this paper, we propose an “adaptive structural fingerprint” (ADSF) model to fully exploit graph topological details in graph attention network. The key idea is to contextualize each node with a weighted, learnable receptive field encoding rich and diverse local graph structures. By doing this, structural interactions between the nodes can be inferred accurately, thus significantly improving subsequent attention layer as well as the convergence of learning. Furthermore, our model provides a useful platform for different subspaces of node features and various scales of graph structures to “cross-talk” with each other through the learning of multi-head attention, being particularly useful in handling complex real-world data. Empirical results demonstrate the power of our approach in exploiting rich structural information in GAT and in alleviating the intrinsic oversmoothing problem in graph neural networks. ",
62
+ "bbox": [
63
+ 233,
64
+ 386,
65
+ 764,
66
+ 650
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "1 INTRODUCTION ",
73
+ "text_level": 1,
74
+ "bbox": [
75
+ 176,
76
+ 679,
77
+ 336,
78
+ 694
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Many real-world data set are represented naturally as graphs. For example, citation networks specify the citation links among scientific papers; social media often need to explore the significant amount of connections between users; biological processes typically involve complex interactions such as protein-protein-interaction (PPI). In these scenarios, the complex structures such as the graph topology or connectivities encode crucial domain-specific knowledge for the learning and prediction tasks. Examples include node embedding or classification, graph classification, and so on. ",
85
+ "bbox": [
86
+ 174,
87
+ 710,
88
+ 823,
89
+ 794
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "The complexity of graph-structured data makes it non-trivial to employ traditional convolutional neural networks (CNN’s). The CNN architecture was originally designed for images whose pixels are located on a uniform grids, and so the convolutional filters can be reused everywhere without having to accommodate local structure changes (LeCun & Kavukcuoglu, 2010) . However, extending CNN to deal with arbitrary structured graphs can be non-trivial. To solve this problem, graph neural networks (GNN) were early proposed by Gori et al. (2005) and Sperduti (1997), which adopt an iterative process to propagate the state of each node, followed by a neural network module to generate the output until an equilibrium state is reached. Recent development of GNN can be categorized into spectral and non-spectral approaches. Spectral approaches employ the tools in signal processing and transform the convolutional operation in the graph domain to much simpler operations of the Laplacian spectrum (Bruna et al., 2014), and various approaches have been proposed to localize the convolution in either the graph or spectral domain (Henaff et al., 2015; Defferrard et al., 2016; Kipf & Welling, 2017). Non-spectral approaches define convolutions directly on the neighboring nodes. As a result, varying node structures have to be accommodated through various processing steps such as fixed-neighborhood size sampling (Hamilton et al., 2017), neighborhood normalization (Niepert et al., 2016), or learning a weight matrix for each node degree (Duvenaud et al., 2015) or neighborhood size (Hamilton et al., 2017). Recently, residual network is also introduced to graph neural networks (Zhang & Meng, 2019). ",
96
+ "bbox": [
97
+ 174,
98
+ 801,
99
+ 823,
100
+ 885
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "",
107
+ "bbox": [
108
+ 174,
109
+ 103,
110
+ 825,
111
+ 270
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "Recently, graph attention network (GAT) proves a promising framework by combining graph neural networks with attention mechanism (Velickovic et al., 2017). The attention mechanism allows dealing with variable sized input while focusing on the most relevant parts, and has been widely used in sequence modelling (Bahdanau et al., 2015), machine translation (Luong et al., 2015), and visual processing (Xu et al., 2015). The GAT model further introduces attention module into graphs, where the hidden representation of the nodes are computed by repeatedly attending over their neighbors’ features, and the weighting coefficients are calculated inductively based on a self-attention strategy. ",
118
+ "bbox": [
119
+ 174,
120
+ 277,
121
+ 825,
122
+ 375
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "Despite the numerous success, how to exploit structural information in GAT remains an challenge. Note that attention scores in GAT are computed mainly based on the content of the nodes; the structures of the graph are simply used to mask the attention, e.g., only one-hop neighbors will be attended. When considering attention among higher order neighbors, however, the performance of GAT deteriorates (see experimental section for details). This is closely related to over-smoothing of GNN’s (Li et al., 2018) and reflects the weakness of GAT in effectively exploiting graph structural information. In this paper, we believe that the topology or “shapes” of local edge connections scan provide a valuable guidance on how to exploit rich structural information of graphs. For example, in social networks or biological networks, a community or pathway may be composed of nodes that are densely inter-connected with each other but several hops away. Therefore, it can be beneficial attend neighbors from the same community, even they show no direct connections. To achieve this, simply checking $\\mathbf { k }$ -hop neighbors would seem insufficient and a thorough exploration of structural landscapes of the graph becomes necessary. ",
129
+ "bbox": [
130
+ 174,
131
+ 382,
132
+ 825,
133
+ 563
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "In order to fully exploit rich, high-order structural details in graph attention networks, we propose a new model called “adaptive structural fingerprints”. The key idea is to contextualize each node within a local receptive field composed of its high-order neighbors. Each node in the neighborhood will be assigned a non-negative, closed-form weighting based on local information propagation procedures, and so the domain (or shape) of the receptive field will adapt automatically to local graph structures and the learning task. We call this weighted, tunable receptive field for each node its “structural fingerprint”. The structural fingerprint encodes important structural details and will be used in conjunction with the node feature to compute an improved attention layer. Furthermore, our approach provides a useful platform for different subspaces of the node features and various scales of local graph structures to coordinate with each other in learning multi-head attention, being particularly beneficial in handling complex real-world graph data sets. ",
140
+ "bbox": [
141
+ 174,
142
+ 569,
143
+ 825,
144
+ 722
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "In Section 2, we introduce the proposed method, including limitation of content-based attention, construction of adaptive structural fingerprints, and the algorithm workflow. In Section 3, we discuss related work. Section 4 reports empirical evaluations and the last section concludes the paper. ",
151
+ "bbox": [
152
+ 174,
153
+ 728,
154
+ 823,
155
+ 771
156
+ ],
157
+ "page_idx": 1
158
+ },
159
+ {
160
+ "type": "text",
161
+ "text": "2 EXPLOITING GRAPH STRUCTURAL DETAILS IN ATTENTION ",
162
+ "text_level": 1,
163
+ "bbox": [
164
+ 176,
165
+ 794,
166
+ 699,
167
+ 810
168
+ ],
169
+ "page_idx": 1
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "2.1 LIMITATIONS OF CONTENT-BASED ATTENTION ",
174
+ "text_level": 1,
175
+ "bbox": [
176
+ 174,
177
+ 827,
178
+ 534,
179
+ 840
180
+ ],
181
+ "page_idx": 1
182
+ },
183
+ {
184
+ "type": "text",
185
+ "text": "The “closeness” between two nodes should be determined from both their content and structure. Here we illustrate the importance of detailed graph structures in determining node similarities. In Figure 1(a), suppose the feature similarity of node-pairs (A,B) and (A,C) are similar. Namely, content-based attention will be similar for this two node pairs. However, from structural point of view, the attention between (A,B) should be much stronger than that for (A,C). This is because A and B are located in a small, densely inter-connected community, and they share a significant portion of common neighbors; while node A and C does not have any common neighbor. In Figure 1(b), node A and node B are not direct neighbors, and connecting them takes three edges. As a result, their features will not directly affect each other in the message passing of $\\mathrm { G A T ^ { 1 } }$ . However, both A and B are strongly connected to a dense community, and node B further connects to the community hub. Therefore, it is reasonable for A and B to directly affect each other. ",
186
+ "bbox": [
187
+ 174,
188
+ 853,
189
+ 823,
190
+ 922
191
+ ],
192
+ "page_idx": 1
193
+ },
194
+ {
195
+ "type": "text",
196
+ "text": "",
197
+ "bbox": [
198
+ 174,
199
+ 103,
200
+ 825,
201
+ 188
202
+ ],
203
+ "page_idx": 2
204
+ },
205
+ {
206
+ "type": "image",
207
+ "img_path": "images/6d1817dd648c6bd623014f95984018589882bc5627a97d119a253db253cb20be.jpg",
208
+ "image_caption": [
209
+ "Figure 1: Detailed graph structures provide important guidance in determining node attention. "
210
+ ],
211
+ "image_footnote": [],
212
+ "bbox": [
213
+ 256,
214
+ 208,
215
+ 717,
216
+ 318
217
+ ],
218
+ "page_idx": 2
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "In these examples, feature based similarity alone is insufficient in computing a faithful attention. One may need to take into account structural details of higher-order neighbors and how they interact with each other. In the literature, structural clues have long been exploited in solving problems of clustering, semi-supervised learning, and community detection . For example, normalized cut minimizes edge connections between clusters for node partitioning (Shi & Malik, 2000); mean-shift uses density peaks to identify clusters (Comaniciu & Meer, 2002); low-density separation (Chapelle & Zien, 2005) assumes that class boundaries pass through low-density regions, leading to successful semi-supervised classification; in community detection, densely connected subgraphs are the main indicator of community (Girvan & Newman, 2002). ",
223
+ "bbox": [
224
+ 173,
225
+ 363,
226
+ 825,
227
+ 489
228
+ ],
229
+ "page_idx": 2
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "In the following, we show how to build “adaptive structural fingerprint” to extract informative structural clues to improve graph attention and henceforth node embedding and classification. ",
234
+ "bbox": [
235
+ 174,
236
+ 496,
237
+ 821,
238
+ 525
239
+ ],
240
+ "page_idx": 2
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "2.2 ADAPTIVE STRUCTURAL FINGERPRINTS ",
245
+ "text_level": 1,
246
+ "bbox": [
247
+ 174,
248
+ 541,
249
+ 495,
250
+ 555
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "Key to exploiting the structural information is the construction of the so-called ”adaptive structural fingerprints”, by placing each node in the context of the its local ”receptive field”. Figure 2 is an illustration. For any node $i$ , consider a spanning process that locates a local subgraph around $i$ , for example, all the nodes within the $k$ -hop neighbors of $i$ . Denote the resultant subgraph as $( V _ { i } , E _ { i } )$ , where $V _ { i }$ and $E _ { i }$ are the set of nodes (dark red) and edges (black) in this neighborhood. In the meantime, each node in $_ i$ will be assigned a non-negative weight, denoted by $\\mathbf { w } _ { i } \\in \\mathbb { R } ^ { n _ { i } \\times 1 }$ , which specifies the importance of each node in shaping the receptive filed also determines the effective “shape” and size of the field. The structural fingerprint of node $i$ will be defined as $F _ { i } = \\left( V _ { i } , \\mathbf { w } _ { i } \\right)$ . ",
257
+ "bbox": [
258
+ 174,
259
+ 568,
260
+ 825,
261
+ 679
262
+ ],
263
+ "page_idx": 2
264
+ },
265
+ {
266
+ "type": "text",
267
+ "text": "2.3 CONSTRUCTION OF THE STRUCTURAL FINGERPRINTS ",
268
+ "text_level": 1,
269
+ "bbox": [
270
+ 176,
271
+ 696,
272
+ 588,
273
+ 710
274
+ ],
275
+ "page_idx": 2
276
+ },
277
+ {
278
+ "type": "text",
279
+ "text": "Intuitively, the weight of the nodes should decay with their distance from the center of the fingerprint. A simple idea is to compute the weight of the node $j$ using a Gaussian function of its distance from the center node $i$ , i.e $\\begin{array} { r } { . , { \\bf w } _ { i } ( j ) = \\exp ( - \\frac { d i s ( i , j ) ^ { 2 } } { \\gamma h ^ { 2 } } ) } \\end{array}$ which we call Gaussian decay. Alternatively, we ican map the node distance levels $[ 1 , 2 , . . . , k ]$ to weight levels $\\mathbf { u } = [ u _ { 1 } , u _ { 2 } , . . . , \\overset { \\cdot } { u _ { k } } ]$ which are nonnegative and monotonic; we call nonparametric decay, which is more flexible and will be used in our experiments. In both cases, the decay parameter (Gaussian bandwidth $h$ or nonparametric decay profile $\\mathbf { u }$ ) can be optimized, making the structural fingerprint more adaptive to the learning process. ",
280
+ "bbox": [
281
+ 174,
282
+ 722,
283
+ 825,
284
+ 824
285
+ ],
286
+ "page_idx": 2
287
+ },
288
+ {
289
+ "type": "text",
290
+ "text": "In practice, it is more desirable if node weights can be automatically adjusted by local graph structures (shapes or density of connections). To achieve this, we propose to use Random Walk with Restart (RWR). Random walks were first developed to explore global topology of a network by simulating a particle iteratively moving among neighboring nodes (Lovasz, 1993). If the particle is forced to always restart in the same node (or set of “seed” nodes), random walk with restart (RWR) can then quantify the structural proximity between the seed(s) and all the other nodes in the graph, which has been widely used in information retrieval (Tong et al., 2006; Pan et al., 2004). ",
291
+ "bbox": [
292
+ 174,
293
+ 830,
294
+ 823,
295
+ 887
296
+ ],
297
+ "page_idx": 2
298
+ },
299
+ {
300
+ "type": "image",
301
+ "img_path": "images/d6164c147b368c2c717578553c289c51a250bd832dc4b31c2f6581f477899167.jpg",
302
+ "image_caption": [
303
+ "Figure 2: Structural fingerprint for a given node $i$ , denoted by $F _ { i } = ( V _ { i } , \\mathbf { w } _ { i } )$ , where $V _ { i }$ is the set of nodes in this local receptive field and $\\mathbf { w } _ { i }$ is the contributing weights of the nodes. "
304
+ ],
305
+ "image_footnote": [],
306
+ "bbox": [
307
+ 346,
308
+ 106,
309
+ 642,
310
+ 275
311
+ ],
312
+ "page_idx": 3
313
+ },
314
+ {
315
+ "type": "image",
316
+ "img_path": "images/a75615fa25024d4da704e7d5a92d22ffb1477dd0b08964afa6289184b7712ead.jpg",
317
+ "image_caption": [
318
+ "Figure 3: Weights $\\mathbf { w } _ { i }$ of a toy structural fingerprint. Left: the local subgraph/fingerprint; middle: visualization of the weights; right: contours of the weights. Gaussian decay and RWR(random walk with restart) decay leads to different weight contours, the latter more adaptively adjusting the weights to structural details of the local graph. "
319
+ ],
320
+ "image_footnote": [],
321
+ "bbox": [
322
+ 205,
323
+ 348,
324
+ 764,
325
+ 529
326
+ ],
327
+ "page_idx": 3
328
+ },
329
+ {
330
+ "type": "text",
331
+ "text": "",
332
+ "bbox": [
333
+ 174,
334
+ 631,
335
+ 825,
336
+ 674
337
+ ],
338
+ "page_idx": 3
339
+ },
340
+ {
341
+ "type": "text",
342
+ "text": "Consider a random walk with restart on a structural fingerprint centered around node $i$ , with altogether $n _ { i }$ nodes and adjacency matrix $\\mathbf { E } _ { i }$ . The particle starts from the center node $i$ and randomly walks to its neighbors in $V _ { i }$ with a probability proportional to edge weights. In each step, it also has a certain probability to return to the center node. The iteration can be written as ",
343
+ "bbox": [
344
+ 173,
345
+ 679,
346
+ 825,
347
+ 736
348
+ ],
349
+ "page_idx": 3
350
+ },
351
+ {
352
+ "type": "equation",
353
+ "img_path": "images/a6182a3227d1ccc080054910635195190003464e8352e2a012e982f2105ef86a.jpg",
354
+ "text": "$$\n\\mathbf { w } _ { i } ^ { ( t + 1 ) } = c \\cdot \\tilde { \\mathbf { E } } _ { i } \\mathbf { w } _ { i } ^ { ( t ) } + ( 1 - c ) \\cdot \\mathbf { e } _ { i }\n$$",
355
+ "text_format": "latex",
356
+ "bbox": [
357
+ 366,
358
+ 744,
359
+ 598,
360
+ 766
361
+ ],
362
+ "page_idx": 3
363
+ },
364
+ {
365
+ "type": "text",
366
+ "text": "where $\\tilde { \\bf E }$ is the transition probability matrix by normalizing columns of $\\mathbf { E } _ { i }$ , $c \\in [ 0 , 1 ]$ is a tradeoff parameter between random walk and restart, and $\\mathbf { e } _ { i }$ is a vector of all zeros except the entry corresponding to the center node $i$ . The converged solution can be written in closed form as ",
367
+ "bbox": [
368
+ 173,
369
+ 775,
370
+ 825,
371
+ 818
372
+ ],
373
+ "page_idx": 3
374
+ },
375
+ {
376
+ "type": "equation",
377
+ "img_path": "images/b93e2e5546e716f2851c9c7b00ad7fdb97cb64d5221fcb35f28b2bac75e8ae4d.jpg",
378
+ "text": "$$\n\\mathbf { w } _ { i } = ( \\mathbf { I } - c \\cdot { \\tilde { \\mathbf { E } } } _ { i } ) ^ { - 1 } \\mathbf { e } _ { i } .\n$$",
379
+ "text_format": "latex",
380
+ "bbox": [
381
+ 403,
382
+ 825,
383
+ 560,
384
+ 845
385
+ ],
386
+ "page_idx": 3
387
+ },
388
+ {
389
+ "type": "text",
390
+ "text": "The $\\mathbf { w } _ { i }$ quantifies the proximity between the center node $i$ and all other nodes of the fingerprint, and in the meantime naturally reflects local structural details of the graph. The $c$ controls the decaying rate (effective size) of the fingerprint: if $c = 0$ , $\\mathbf { w } _ { i }$ will all be zeros except the ith node; if $c = 1$ , $\\mathbf { w } _ { i }$ will be the stationary distribution of a standard random walk on graph $( V _ { i } , \\mathbf { E } _ { i } )$ . In practice, $c$ will be optimized so that the fingerprint adapts naturally to both the graph structure and the learning task. ",
391
+ "bbox": [
392
+ 173,
393
+ 853,
394
+ 825,
395
+ 924
396
+ ],
397
+ "page_idx": 3
398
+ },
399
+ {
400
+ "type": "text",
401
+ "text": "In Figure 3, we illustrate Gaussian-based and RWR-based fingerprint weights. We created a toy example of local receptive field, which for convenience is a uniform grid but with a small denser “patch” on the right bottom. As can be expected, the Gaussian based weight decay has contours that are center-symmetric. In comparison, the RWR automatically takes into account salient local structures and so the contours will be biased towards the dense subgraph. This is particularly desirable in case the center node is close to (or residing in) a community; it will then be represented more closely by the nodes from community, achieving the effect of a “structural attractor”. ",
402
+ "bbox": [
403
+ 173,
404
+ 103,
405
+ 825,
406
+ 202
407
+ ],
408
+ "page_idx": 4
409
+ },
410
+ {
411
+ "type": "text",
412
+ "text": "As can be seen, the “structural attractor” effect in building the fingerprint with RWR coincides well with commonly used clustering assumptions, namely, the structural fingerprint of a node will emphasize more on densely inter-connected neighbors within predefined range. Since highly weighted nodes are more likely to come from the same cluster as the center node, the fingerprint of each node is supposed to provide highly informative guidance on its structural identity, thus improving evaluation of node similarites and finally the graph attention. ",
413
+ "bbox": [
414
+ 174,
415
+ 208,
416
+ 825,
417
+ 292
418
+ ],
419
+ "page_idx": 4
420
+ },
421
+ {
422
+ "type": "text",
423
+ "text": "2.4 ALGORITHM DESCRIPTION ",
424
+ "text_level": 1,
425
+ "bbox": [
426
+ 176,
427
+ 311,
428
+ 401,
429
+ 325
430
+ ],
431
+ "page_idx": 4
432
+ },
433
+ {
434
+ "type": "text",
435
+ "text": "In this section we will exploit both the content and structural details of the graph in the GAT framework (Velickovic et al., 2017). Our algorithm is illustrated in Figure 4. ",
436
+ "bbox": [
437
+ 174,
438
+ 338,
439
+ 823,
440
+ 366
441
+ ],
442
+ "page_idx": 4
443
+ },
444
+ {
445
+ "type": "image",
446
+ "img_path": "images/1c3e589e569d163444cba25daf435c30fd5f62c501107079aa51a81f459a0fa5.jpg",
447
+ "image_caption": [
448
+ "Figure 4: The work flow of adaptive structural fingerprint model. "
449
+ ],
450
+ "image_footnote": [],
451
+ "bbox": [
452
+ 287,
453
+ 382,
454
+ 702,
455
+ 619
456
+ ],
457
+ "page_idx": 4
458
+ },
459
+ {
460
+ "type": "text",
461
+ "text": "Suppose we want to compute attention coefficients between a pair of nodes $i$ and $j$ , each with their features and structural fingerprints. Content-wise, features of the two nodes will be used to compute their content similarity; structure-wise, structural fingerprints of the two nodes will be used to evaluate their interaction. Both scores will be incorporated in the attention layer, which will then be used in the message passing step to update node features. Following Velickovic et al. (2017), we also apply a transform on the features, and apply multiple steps of message passing. ",
462
+ "bbox": [
463
+ 173,
464
+ 670,
465
+ 825,
466
+ 753
467
+ ],
468
+ "page_idx": 4
469
+ },
470
+ {
471
+ "type": "text",
472
+ "text": "More specifically, given a graph of $n$ nodes $G = ( V , \\mathbf { E } )$ where $V$ is the set of the nodes and $\\mathbf { E }$ is the set of the edges; let $\\{ { \\bf h } _ { i } \\} _ { i = 1 } ^ { n }$ be the $d$ -dimensional input features for each node. We will follow the basic structure of GAT algorithm (Velickovic et al., 2017) and describe our algorithms as follows. ",
473
+ "bbox": [
474
+ 174,
475
+ 760,
476
+ 825,
477
+ 803
478
+ ],
479
+ "page_idx": 4
480
+ },
481
+ {
482
+ "type": "text",
483
+ "text": "• Step 1. Evaluate the content similarity between node $i$ and $j$ as ",
484
+ "bbox": [
485
+ 215,
486
+ 816,
487
+ 647,
488
+ 832
489
+ ],
490
+ "page_idx": 4
491
+ },
492
+ {
493
+ "type": "equation",
494
+ "img_path": "images/4604f7b94714e5eda7a209de11b610d4254547ad8a1320d52e019e35b7855e80.jpg",
495
+ "text": "$$\ne _ { i j } = \\mathcal { A } _ { f e a } ( \\mathbf { W } \\mathbf { h } _ { i } , \\mathbf { W } _ { j } )\n$$",
496
+ "text_format": "latex",
497
+ "bbox": [
498
+ 426,
499
+ 840,
500
+ 598,
501
+ 858
502
+ ],
503
+ "page_idx": 4
504
+ },
505
+ {
506
+ "type": "text",
507
+ "text": "where $\\mathbf { W } \\in \\mathbb { R } ^ { d \\times d }$ is the transformation that maps the node features to a latent space, and function $\\boldsymbol { \\mathcal { A } } _ { f e a } ( \\cdot , \\cdot )$ computes similarity (or interaction) between two feature $\\mathbf { h } _ { i }$ and $\\mathbf { h } _ { j }$ , ",
508
+ "bbox": [
509
+ 228,
510
+ 868,
511
+ 825,
512
+ 897
513
+ ],
514
+ "page_idx": 4
515
+ },
516
+ {
517
+ "type": "equation",
518
+ "img_path": "images/6efc9b2802953ccf2a3f828af78e21d71708184bbeb711fd2a943092fccf8a6e.jpg",
519
+ "text": "$$\n\\boldsymbol { \\mathcal { A } _ { f e a } } ( \\mathbf { W } \\mathbf { h } _ { i } , \\mathbf { W } \\mathbf { h } _ { j } ) = \\mathbf { a } ^ { \\top } ( \\mathbf { W } \\mathbf { h } _ { i } | | \\mathbf { W } _ { j } )\n$$",
520
+ "text_format": "latex",
521
+ "bbox": [
522
+ 379,
523
+ 906,
524
+ 645,
525
+ 926
526
+ ],
527
+ "page_idx": 4
528
+ },
529
+ {
530
+ "type": "text",
531
+ "text": "• Step 2. Evaluate structural interaction between the structural fingerprints of node $i$ and $j$ , ",
532
+ "bbox": [
533
+ 215,
534
+ 103,
535
+ 816,
536
+ 118
537
+ ],
538
+ "page_idx": 5
539
+ },
540
+ {
541
+ "type": "equation",
542
+ "img_path": "images/9657accb8e3e7c082caba2ab8ede88a27b583493e84d62fd7ca2943a80f67960.jpg",
543
+ "text": "$$\ns _ { i j } = \\mathcal { A } _ { s t r } ( F _ { i } , F _ { j } )\n$$",
544
+ "text_format": "latex",
545
+ "bbox": [
546
+ 447,
547
+ 125,
548
+ 576,
549
+ 142
550
+ ],
551
+ "page_idx": 5
552
+ },
553
+ {
554
+ "type": "text",
555
+ "text": "where $\\mathcal { A } _ { s t r } ( F _ { i } , F _ { j } )$ quantifies the interaction between two fingerprints. Let $\\mathbf { w } _ { i }$ and $\\mathbf { w } _ { j }$ be the node weights of the fingerprints for node $i$ and $j$ , as discussed in Section 2.3. Then we can adopt the weighted Jacard similarity to evaluate the structural interactions, as ",
556
+ "bbox": [
557
+ 230,
558
+ 147,
559
+ 825,
560
+ 190
561
+ ],
562
+ "page_idx": 5
563
+ },
564
+ {
565
+ "type": "equation",
566
+ "img_path": "images/58a68c090c9984bb44b8adcc6456de1048a9cdf28ffd36a9498271c8f4953e6f.jpg",
567
+ "text": "$$\n\\mathcal { A } _ { s t r } ( F _ { i } , F _ { j } ) = \\frac { \\sum _ { p \\in ( V _ { i } \\cup V _ { j } ) } \\operatorname* { m i n } ( w _ { i p } , w _ { j p } ) } { \\sum _ { p \\in ( V _ { i } \\cup V _ { j } ) } \\operatorname* { m a x } ( w _ { i p } , w _ { j p } ) }\n$$",
568
+ "text_format": "latex",
569
+ "bbox": [
570
+ 364,
571
+ 195,
572
+ 658,
573
+ 237
574
+ ],
575
+ "page_idx": 5
576
+ },
577
+ {
578
+ "type": "text",
579
+ "text": "Here, with an abuse of notations, we have expanded $\\mathbf { w } _ { i }$ and ${ \\bf w } _ { j }$ to all the nodes in $V _ { i } \\cup V _ { i }$ by filling zeros. We can consider the following smooth version, or other smooth alternative2. ",
580
+ "bbox": [
581
+ 230,
582
+ 242,
583
+ 825,
584
+ 272
585
+ ],
586
+ "page_idx": 5
587
+ },
588
+ {
589
+ "type": "equation",
590
+ "img_path": "images/37df35312a4f0b24a1a69ff0679d3adabe62ecf1a6b72e2d109aea693e20232d.jpg",
591
+ "text": "$$\n\\operatorname* { m a x } ( x , y ) = \\operatorname* { l i m } _ { t } { \\frac { \\log ( e ^ { t \\cdot x } + e ^ { t \\cdot y } ) } { t } } , \\ \\operatorname* { m i n } ( x , y ) = \\operatorname* { l i m } _ { t } - { \\frac { \\log ( e ^ { t \\cdot ( - x ) } + e ^ { t \\cdot ( - y ) } ) } { t } }\n$$",
592
+ "text_format": "latex",
593
+ "bbox": [
594
+ 254,
595
+ 279,
596
+ 767,
597
+ 311
598
+ ],
599
+ "page_idx": 5
600
+ },
601
+ {
602
+ "type": "text",
603
+ "text": "• Step 3. Normalize (sparsify) feature similarities (2) and the structural interactions as (4) ",
604
+ "bbox": [
605
+ 218,
606
+ 319,
607
+ 805,
608
+ 334
609
+ ],
610
+ "page_idx": 5
611
+ },
612
+ {
613
+ "type": "equation",
614
+ "img_path": "images/6f1429b0f57ad7859056f6561157cd47cef48254c600eca00e7d59b752a8c4de.jpg",
615
+ "text": "$$\n\\bar { e } _ { i j } \\frac { \\mathrm { e x p } ( \\mathrm { L e a k y R e l u } ( e _ { i j } ) ) } { \\sum \\mathrm { e x p } ( \\mathrm { L e a k y R e l u } ( e _ { i k } ) ) } , \\bar { s } _ { i j } \\frac { \\mathrm { e x p } ( s _ { i j } ) } { \\sum \\mathrm { e x p } ( s _ { i k } ) }\n$$",
616
+ "text_format": "latex",
617
+ "bbox": [
618
+ 333,
619
+ 340,
620
+ 691,
621
+ 376
622
+ ],
623
+ "page_idx": 5
624
+ },
625
+ {
626
+ "type": "text",
627
+ "text": "and then combine them to compute the final attention ",
628
+ "bbox": [
629
+ 232,
630
+ 381,
631
+ 583,
632
+ 395
633
+ ],
634
+ "page_idx": 5
635
+ },
636
+ {
637
+ "type": "equation",
638
+ "img_path": "images/386575916627188b2ea81dfc143df03663e1e7f86bc266c8a501296a57dc86db.jpg",
639
+ "text": "$$\na _ { i j } = \\frac { \\alpha ( \\bar { e } _ { i j } ) \\bar { e } _ { i j } + \\beta ( \\bar { s } _ { i j } ) \\bar { s } _ { i j } } { \\alpha _ { ( } \\bar { e } _ { i j } ) + \\beta ( \\bar { s } _ { i j } ) } .\n$$",
640
+ "text_format": "latex",
641
+ "bbox": [
642
+ 413,
643
+ 401,
644
+ 611,
645
+ 436
646
+ ],
647
+ "page_idx": 5
648
+ },
649
+ {
650
+ "type": "text",
651
+ "text": "Here $\\alpha ( \\cdot )$ and $\\beta ( \\cdot )$ are transfer functions (such as Sigmoid) that adjust feature similarity and structure interaction scores before combining them. For simplicity (and in our experiments), we use scalar $\\alpha$ and $\\beta$ , which leads to a standard weighted average. ",
652
+ "bbox": [
653
+ 230,
654
+ 443,
655
+ 825,
656
+ 486
657
+ ],
658
+ "page_idx": 5
659
+ },
660
+ {
661
+ "type": "text",
662
+ "text": "• Step 4. Perform message passing to update the features of each node as ",
663
+ "bbox": [
664
+ 220,
665
+ 489,
666
+ 700,
667
+ 505
668
+ ],
669
+ "page_idx": 5
670
+ },
671
+ {
672
+ "type": "equation",
673
+ "img_path": "images/294deee6eba94ccb272a026cc51d393a59f8efafed0fc6fd0be31820dab516aa.jpg",
674
+ "text": "$$\n\\mathbf { h } _ { i } ^ { ( t + 1 ) } = \\sigma \\left( \\sum _ { j \\in \\mathcal { N } _ { i } } \\alpha _ { i j } \\mathbf { W } \\mathbf { h } _ { j } ^ { ( t ) } \\right)\n$$",
675
+ "text_format": "latex",
676
+ "bbox": [
677
+ 406,
678
+ 510,
679
+ 617,
680
+ 560
681
+ ],
682
+ "page_idx": 5
683
+ },
684
+ {
685
+ "type": "text",
686
+ "text": "Our algorithm has a particular advantage when multi-head attention is pursued. Note that our model simultaneously calculates two attention scores: the content-based $e _ { i j }$ and structure-based $s _ { i j }$ , and combine them together. Therefore each attention head will accommodate two sets of parameters: (1) those of the content-based attention, $\\mathbf { W }$ and a (3), which explores the subspace of the node features, and (2) those of the structure-based attention, $c$ (1), which explores the decay rate of the structural fingerprint. As a result, by learning an optimal mixture of the two attention (6), our model provides a flexible platform for different subspaces of node features and various scales of local graph structures to “cross-talk” with each other, which can be quite useful in exploring complex real-world data. ",
687
+ "bbox": [
688
+ 173,
689
+ 570,
690
+ 826,
691
+ 684
692
+ ],
693
+ "page_idx": 5
694
+ },
695
+ {
696
+ "type": "text",
697
+ "text": "Computationally, the local receptive field will be confined within a $k$ -hop neighborhood, which we call “fingerprint size”; on the other hand, both structural attention and content-based attention will be considered only when the center node of the two receptive fields have a distance below the threshold $k ^ { \\prime }$ , which we call “attention range”. In experiments we simply set $k = k ^ { \\prime } = 2$ , and use breadthfirst-search (BFS) to localize the neighborhood. As a result, the complexity involved in structure exploration will be $O ( n | \\overline { { \\mathcal { N } _ { k ^ { \\prime } } } } | )$ , where $| \\overline { { \\mathcal { N } _ { k ^ { \\prime } } } } |$ is the averaged $k ^ { \\prime }$ -hop-neighbor size. ",
698
+ "bbox": [
699
+ 173,
700
+ 689,
701
+ 825,
702
+ 773
703
+ ],
704
+ "page_idx": 5
705
+ },
706
+ {
707
+ "type": "text",
708
+ "text": "3 COMPARISONS WITH RELATED WORK ",
709
+ "text_level": 1,
710
+ "bbox": [
711
+ 174,
712
+ 792,
713
+ 522,
714
+ 810
715
+ ],
716
+ "page_idx": 5
717
+ },
718
+ {
719
+ "type": "text",
720
+ "text": "Note that in graph convolutional network (Kipf & Welling, 2017), the node representation is updated by $\\begin{array} { r } { \\mathbf { h } _ { i } ^ { ( t + 1 ) } = \\sigma \\left( \\sum _ { j \\in \\mathcal { N } _ { i } ^ { \\mathbf { A } } } [ \\mathbf { D } ^ { - 1 / 2 } \\mathbf { A } \\mathbf { D } ^ { - 1 / 2 } ] _ { i j } \\mathbf { h } _ { j } ^ { ( t ) } \\mathbf { W } \\right) } \\end{array}$ , where $\\mathbf { A }$ is the adjacency matrix, $\\mathbf { D }$ is the degree matrix, $\\mathbf { h } _ { i }$ is representation of the ith node and $\\mathbf { W }$ an embedding matrix. Namely, the message passing is mainly determined by the (normalized) adjacency matrix. The GAT method (Velickovic et al., 2017) replaces the fixed adjacency matrix with an inductive, trainable attention function that relies instead on the node features within one-hop neighbors. Our approach has a notable difference. First, our message passing is determined by a mixed attention from both structure and content (6). Second, the structural component of our attention is not simply based on the graph adjacency (Kipf & Welling, 2017), or one-hop neighbor (Velickovic et al., 2017), but instead relies on a local receptive field whose “shapes” are optimized adaptively through learning (1). Furthermore, our method fully exploits structural details (e.g. density and topology of local connections). There are also a number of works that explore structures in graph classification (Lee et al., 2018; Rossi et al., 2019). There, attention is used to identify small but discriminative parts of the graph, also called “graphlets” or “motifs” (Morris et al., 2019), in order to perform classification on the graph level. ",
721
+ "bbox": [
722
+ 173,
723
+ 824,
724
+ 826,
725
+ 877
726
+ ],
727
+ "page_idx": 5
728
+ },
729
+ {
730
+ "type": "table",
731
+ "img_path": "images/8c5cc892aef4c0ab673b4ae1b96349d6607fd1622e6fe9af16edec8025f73023.jpg",
732
+ "table_caption": [
733
+ "Table 1: Summary statistics of the benchmark graph-structured data sets used in the experiment. "
734
+ ],
735
+ "table_footnote": [],
736
+ "table_body": "<table><tr><td>Data</td><td>#Nodes #Edges</td><td>#Features</td><td># Classes</td><td>#Training</td><td># Validation</td><td>#Testing</td></tr><tr><td>Cora</td><td>2708 5429</td><td>1433</td><td>7</td><td>140</td><td>500</td><td>1000</td></tr><tr><td>Citeseer</td><td>3327 4732</td><td>3703</td><td>6</td><td>120</td><td>500</td><td>1000</td></tr><tr><td>Pubmed</td><td>19717 44338</td><td>500</td><td>3</td><td>60</td><td>500</td><td>1000</td></tr></table>",
737
+ "bbox": [
738
+ 174,
739
+ 101,
740
+ 830,
741
+ 164
742
+ ],
743
+ "page_idx": 6
744
+ },
745
+ {
746
+ "type": "text",
747
+ "text": "",
748
+ "bbox": [
749
+ 174,
750
+ 215,
751
+ 825,
752
+ 369
753
+ ],
754
+ "page_idx": 6
755
+ },
756
+ {
757
+ "type": "text",
758
+ "text": "4 EXPERIMENTS ",
759
+ "text_level": 1,
760
+ "bbox": [
761
+ 176,
762
+ 390,
763
+ 326,
764
+ 405
765
+ ],
766
+ "page_idx": 6
767
+ },
768
+ {
769
+ "type": "text",
770
+ "text": "In this section, we report experimental results of the proposed method and state-of-the-art algorithms using graph-based benchmark data sets and transductive classification problem. Our codes can be downloaded from the anonymous Github link http://github.com/AvigdorZ. ",
771
+ "bbox": [
772
+ 174,
773
+ 421,
774
+ 825,
775
+ 463
776
+ ],
777
+ "page_idx": 6
778
+ },
779
+ {
780
+ "type": "text",
781
+ "text": "4.1 EXPERIMENTAL SETTING AND RESULTS ",
782
+ "text_level": 1,
783
+ "bbox": [
784
+ 176,
785
+ 481,
786
+ 493,
787
+ 494
788
+ ],
789
+ "page_idx": 6
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "We have reported results of the following baseline algorithms: Gaussian fields and harmonic function (Gaussian Fields) (Zhu et al., 2003), manifold regularization (Manifold Reg.) (Belkin et al., 2006); Deep Semi-supervised learning (Deep-Semi) (Weston et al., 2012); link-based classification (Link-based) Lu & Getoor. (2003); skip-gram based graph embedding (Deep-Walk) (Perozzi et al., 2014); semi-supervised learning with graph embedding (Planetoid) (Yang et al., 2016); graph convolutional networks (GCN) (Kipf & Welling, 2017); high-order chebyshev filters with GCN (Chebyshev) (Defferrard et al., 2016), and the mixture model CNN (Mixture-CNN) (Monti et al., 2016). We have selected three benchmark graph-structured data set from (Sen et al., 2008), namely Cora, Citeseer, and Pubmed. The three data sets are all citation networks. Here, each node denotes one document, and an edge will connect two nodes if there is citation link between the two document; the raw features of each document are bags-of-words representations. Each node (document) will be associated with one label, and following the transductive setting in (Velickovic et al., 2017; Yang et al., 2016) we only use 20 labeled samples for each class but with all the remaining, unlabelled data for training. We split the data set into three parts: training, validation, and testing, as shown in table 1. Algorithm performance will be evaluated on the classification precision on the test split. For algorithm using random initialization, averaged performance over 10 runs will be reported. ",
794
+ "bbox": [
795
+ 174,
796
+ 507,
797
+ 825,
798
+ 728
799
+ ],
800
+ "page_idx": 6
801
+ },
802
+ {
803
+ "type": "text",
804
+ "text": "The network structures of our methods follow the GAT method (Velickovic et al., 2017), with the following details. Altogether two layers of message passing are adopted. In the first layer, one transformation matrix $\\breve { \\mathbf { W } } \\in \\mathbb { R } ^ { d \\times 8 }$ is learned for each of altogether 8 attention heads; in the second layer, a transformation matrix $\\mathbf { W } \\in \\mathbb { R } ^ { 6 4 \\times C }$ is used on the concatenated features (from the 8 attention head from the first layer), and one attention head is adopted followed by a softmax operator, where $C$ is the number of classes. The number of parameters is $6 4 ( d + C )$ . For the Pubmed data set, 8 attention heads are used in the second layer due to the larger graph size. Adam SGD is used for optimization, with learning rate $\\lambda = 5 \\times 1 e - 4$ . See more details in (Velickovic et al., 2017). Both the fingerprint size and the attention range is chosen as 2-hop neighbors in our approach. ",
805
+ "bbox": [
806
+ 174,
807
+ 734,
808
+ 825,
809
+ 861
810
+ ],
811
+ "page_idx": 6
812
+ },
813
+ {
814
+ "type": "text",
815
+ "text": "Results are reported in table 2. Our method has 2 variations, including ADSF-Nonparametric, where we learn a non-parametric decay profile w.r.t. node distance; ADSF-RWR, where we use randomwalk with re-start to build fingerprints. For both cases, we have used 2-hop neighbors, and the restart probability is simply chosen as $c = 0 . 5$ . As can be seen, our approach consistently improves the performance on all benchmark data sets. Since Velickovic et al. (2017) has performed an extensive set of evaluations in their work, we will use their reported results forbaseline methods. It is also worthwhile to note that our method only has a few more parameters compared with GAT (e.g., nonparametric decay profile u, $c$ in RWR, and the mixing ratios in (6)). For example, for Cora data set, GAT model has about 91k parameters, while our method adds around 30 extra parameters on top of it (about $0 . 0 3 \\%$ of the original model size). ",
816
+ "bbox": [
817
+ 174,
818
+ 867,
819
+ 823,
820
+ 924
821
+ ],
822
+ "page_idx": 6
823
+ },
824
+ {
825
+ "type": "table",
826
+ "img_path": "images/a1741e7930a5ce9dc9fb66d4bd6fc20f43a9a1240a09ea41f1f804227dc2b629.jpg",
827
+ "table_caption": [
828
+ "Table 2: Classification accuracy for different transductive methods on the benchmark data sets. "
829
+ ],
830
+ "table_footnote": [],
831
+ "table_body": "<table><tr><td>Methods</td><td>Cora</td><td>Citeseer</td><td>Pubmed</td></tr><tr><td rowspan=\"3\">Gaussian Fields (Zhu et al., 2003) Deep-Semi (Weston et al., 2012) Manifold Reg. (Belkin et al., 2003) Deep-Walk (Perozzi et al., 2014) Link-based (Lu &amp; Getoor, 2003) Planetoid (Yang et al., 2016)</td><td>68.0%</td><td>45.3%</td><td>63.0% 71.7%</td></tr><tr><td>59.0% 59.5%</td><td>59.6% 60.1%</td><td>70.7%</td></tr><tr><td>67.2% 75.1% 75.7% 81.2%</td><td>43.2% 69.1% 64.7%</td><td>65.3% 73.9% 77.2%</td></tr><tr><td rowspan=\"3\">GCN (Kipf &amp; Welling et al., 2017) Mixture-CNN(Monti et al., 2016) GAT (Velickovic et al., 2017) ADSF-Nonparametric ADSF-RWR</td><td>81.5%</td><td>69.8% 70.3%</td><td>74.4% 79.0%</td></tr><tr><td>81.7%</td><td></td><td>79.0%</td></tr><tr><td>83.0±0.7% 84.7±0.3%</td><td>72.5±0.7% 73.8±0.3%</td><td>79.0±0.3% 79.4±0.3%</td></tr></table>",
832
+ "bbox": [
833
+ 222,
834
+ 99,
835
+ 776,
836
+ 289
837
+ ],
838
+ "page_idx": 7
839
+ },
840
+ {
841
+ "type": "text",
842
+ "text": "",
843
+ "bbox": [
844
+ 173,
845
+ 340,
846
+ 825,
847
+ 424
848
+ ],
849
+ "page_idx": 7
850
+ },
851
+ {
852
+ "type": "image",
853
+ "img_path": "images/57115c7191bbffaeae26b760624e0e8c1ea077fcc693ab495ab06a60e9e471b8.jpg",
854
+ "image_caption": [
855
+ "Figure 5: Convergence of the accuracy and loss of the proposed method and GAT method. "
856
+ ],
857
+ "image_footnote": [],
858
+ "bbox": [
859
+ 184,
860
+ 449,
861
+ 792,
862
+ 729
863
+ ],
864
+ "page_idx": 7
865
+ },
866
+ {
867
+ "type": "text",
868
+ "text": "In Figure 5, we plot evolution of the testing accuracy and loss function (on the test split) for GAT and our method (ADSF-RWR). Since the loss functions of the two methods are the same, they are directly comparable. The accuracy of GAT fluctuates through iterations, while our approach is more stable and converges to a higher accuracy. The objective value of our method also converges faster thanks to the utilization of higher-order neighborhood information through structural fingerprints. ",
869
+ "bbox": [
870
+ 174,
871
+ 782,
872
+ 825,
873
+ 853
874
+ ],
875
+ "page_idx": 7
876
+ },
877
+ {
878
+ "type": "text",
879
+ "text": "4.2 ABLATION STUDIES ",
880
+ "text_level": 1,
881
+ "bbox": [
882
+ 174,
883
+ 869,
884
+ 352,
885
+ 883
886
+ ],
887
+ "page_idx": 7
888
+ },
889
+ {
890
+ "type": "text",
891
+ "text": "In this section, We further examined some interesting details of the proposed method, all using the Cora data set and the RWR fingerprint construction scheme. ",
892
+ "bbox": [
893
+ 174,
894
+ 895,
895
+ 823,
896
+ 924
897
+ ],
898
+ "page_idx": 7
899
+ },
900
+ {
901
+ "type": "table",
902
+ "img_path": "images/846ee455e8ef521fb77c8475ac856381b0187325010a818032763467b6c5bb6a.jpg",
903
+ "table_caption": [
904
+ "Table 3: Performance of GAT under different choices of the neighborhood range. "
905
+ ],
906
+ "table_footnote": [],
907
+ "table_body": "<table><tr><td>Hop</td><td>k&#x27;=1</td><td>K&#x27;=2</td><td>k&#x27;=3</td></tr><tr><td>Cora</td><td>83.0±0.7%</td><td>15.2±6.8%</td><td>13.3±4.7%</td></tr><tr><td>Citeseer</td><td>72.5±0.7%</td><td>68.4±4.1%</td><td>65.7±4.5%</td></tr><tr><td>Pubmed</td><td>79.0±0.3%</td><td>78.2±0.5%</td><td>67.2±0.3%</td></tr></table>",
908
+ "bbox": [
909
+ 316,
910
+ 99,
911
+ 679,
912
+ 164
913
+ ],
914
+ "page_idx": 8
915
+ },
916
+ {
917
+ "type": "text",
918
+ "text": "Impact of the fingerprint size. Intuitively, the structural fingerprint should neither be too small or too large. We have two steps to control the effective size of the fingerprint. In constructing the fingerprint, we will first choose neighboring nodes within a certain range, namely the $k$ -hop neighbors; then we will fine-tune the weight of each node in the fingerprint, either through nonparametric decay profile or the $c$ parameter in random walk. Here, for comparison, we have fixed $c = 0 . 5$ and varied $k$ as $k = 1 , 2 , 3$ . As shown in Figure 6(a), the optimal order of neighborhood is two in this setting. ",
919
+ "bbox": [
920
+ 173,
921
+ 220,
922
+ 825,
923
+ 305
924
+ ],
925
+ "page_idx": 8
926
+ },
927
+ {
928
+ "type": "text",
929
+ "text": "Impact of the attention range. In GAT, only direct neighbors have attention to each other, namely the attention range is $k ^ { \\prime } = 1$ . In our approach, the optimal choice is $k ^ { \\prime } = 2$ . The attention range determines the number of neighboring nodes involved in message passing. In the Cora dataset, the average 1st-order neighborhood size is $| \\mathcal { N } _ { 1 } | = 3 . 9$ , while for 2nd-order neighbors $| \\mathcal { N } _ { 2 } | = 4 2 . 5$ . Namely, our approach has involved 10 times more neighbors in message passing than GAT, yet the performance is improved instead. This is an evidence that our approach helps alleviate oversmoothing in GAT (or GNN’s in general) by exploiting high-order structural details more effectively. ",
930
+ "bbox": [
931
+ 173,
932
+ 311,
933
+ 825,
934
+ 410
935
+ ],
936
+ "page_idx": 8
937
+ },
938
+ {
939
+ "type": "image",
940
+ "img_path": "images/6141602acf21525fd0a330e440b8b24a72013b14fac4725f053916a4a050d4b5.jpg",
941
+ "image_caption": [
942
+ "Figure 6: Detailed studies of the adaptive structural fingerprint method. "
943
+ ],
944
+ "image_footnote": [],
945
+ "bbox": [
946
+ 218,
947
+ 439,
948
+ 794,
949
+ 561
950
+ ],
951
+ "page_idx": 8
952
+ },
953
+ {
954
+ "type": "text",
955
+ "text": "Impract of the re-start probability in RWR. In Figure 6(b), we plot the learning performance w.r.t. the choice of the $c$ parameter in RWR when fixing the neighborhood range $k = 2$ . As can be seen, the best performance is around $c = 0 . 5$ , meaning that the “random walking” and “restarting” should be given similar chances within 2-hop neighbors. Empirically, we can always use back-propagation to optimize the choice of $c$ , which can be more adaptive to the choice of the $k$ -hop neighbors. ",
956
+ "bbox": [
957
+ 173,
958
+ 613,
959
+ 825,
960
+ 683
961
+ ],
962
+ "page_idx": 8
963
+ },
964
+ {
965
+ "type": "text",
966
+ "text": "Non-parametric decay profile. In Figure 6(c), we plot the non-parametric decay profile $\\mathbf { u }$ learned by our method, when setting the neighborhood orders to $k = 3$ . As can be seen, the first-order and second-order neighbors have higher weights, while the third-order neighbors almost have zero weights, meaning that they almost make no contributions to computing the structural attention. This is consistent to our evaluations in Figure 5(a), and demonstrates the power of our method in identifying useful high-order neighbors. ",
967
+ "bbox": [
968
+ 173,
969
+ 690,
970
+ 825,
971
+ 773
972
+ ],
973
+ "page_idx": 8
974
+ },
975
+ {
976
+ "type": "text",
977
+ "text": "4.3 IMPACT OF NEIGHBORHOOD RANGE IN GAT ",
978
+ "text_level": 1,
979
+ "bbox": [
980
+ 174,
981
+ 797,
982
+ 524,
983
+ 811
984
+ ],
985
+ "page_idx": 8
986
+ },
987
+ {
988
+ "type": "text",
989
+ "text": "As suggested by the anonymous reviewer, we perform an empirical study on the GAT performance when larger attention range is considered. Note that in the original GAT by Velickovic et al. (2017), attention score is computed only for nodes that are direct neighbors with each other. Here, we increase the domain of interaction to up to 2-hop and 3-hop neighbors, with all other components remaining the same. As can be seen from Table 3, the performance of GAT is the best when choosing only 1-hop neighbors to compute attention scores, and deteriorates rapidly when larger neighborhood is considered. ",
990
+ "bbox": [
991
+ 174,
992
+ 825,
993
+ 825,
994
+ 924
995
+ ],
996
+ "page_idx": 8
997
+ },
998
+ {
999
+ "type": "text",
1000
+ "text": "We speculate that although larger attention range involves more neighbors and possibly more useful nodes, it bring a significant number of noisy nodes as well. As a result, the GAT performance is negatively affected. This seems to indicate that feature-based attention alone might not be sufficient in identifying noisy neighbors. In our approach, attention scores are computed from both node features and informative structural details, therefore it enables exploring a wider collection of higherorder-neighbors while simultaneously removing the impact of irrelevant nodes, validating the benefit of structure-based attention. ",
1001
+ "bbox": [
1002
+ 174,
1003
+ 103,
1004
+ 825,
1005
+ 200
1006
+ ],
1007
+ "page_idx": 9
1008
+ },
1009
+ {
1010
+ "type": "text",
1011
+ "text": "5 CONCLUSION AND FUTURE WORK ",
1012
+ "text_level": 1,
1013
+ "bbox": [
1014
+ 174,
1015
+ 223,
1016
+ 495,
1017
+ 239
1018
+ ],
1019
+ "page_idx": 9
1020
+ },
1021
+ {
1022
+ "type": "text",
1023
+ "text": "In this work, we proposed an adaptive structural fingerprint model to encode complex topological and structural information of the graph to improve graph representation learning. In the future, we will consider varying fingerprint parameters (e.g. decay profile) instead of sharing them across all the nodes; we will consider applying our approach to graph partitioning and community detection, where node features might be unavailable and graph structures will be the main source of information that can be explored; we will also extend our approach to the challenging problem of graph classification. On the theoretical side, we will borrow existing tools in semi-supervised learning and study the generalization performance of our approach on semi-supervised node embedding and classification. ",
1024
+ "bbox": [
1025
+ 174,
1026
+ 256,
1027
+ 825,
1028
+ 381
1029
+ ],
1030
+ "page_idx": 9
1031
+ },
1032
+ {
1033
+ "type": "text",
1034
+ "text": "ACKNOWLEDGEMENT ",
1035
+ "text_level": 1,
1036
+ "bbox": [
1037
+ 176,
1038
+ 405,
1039
+ 356,
1040
+ 419
1041
+ ],
1042
+ "page_idx": 9
1043
+ },
1044
+ {
1045
+ "type": "text",
1046
+ "text": "We highly appreciate the valuable comments from anonymous reviewers, which allow us to significantly improve both the presentation and experimental design of our work. This work is supported in part by the National Science Foundation of China No.61672236, National Science Foundation of China No.61573107, Shanghai National Science Foundation 17ZR1444200, Shanghai Municipal Science and Technology Major Project No.2018SHZDZX01. ",
1047
+ "bbox": [
1048
+ 174,
1049
+ 435,
1050
+ 825,
1051
+ 506
1052
+ ],
1053
+ "page_idx": 9
1054
+ },
1055
+ {
1056
+ "type": "text",
1057
+ "text": "REFERENCES ",
1058
+ "text_level": 1,
1059
+ "bbox": [
1060
+ 176,
1061
+ 529,
1062
+ 285,
1063
+ 544
1064
+ ],
1065
+ "page_idx": 9
1066
+ },
1067
+ {
1068
+ "type": "text",
1069
+ "text": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In International Conference on Learning Representations, 2015. ",
1070
+ "bbox": [
1071
+ 174,
1072
+ 553,
1073
+ 823,
1074
+ 582
1075
+ ],
1076
+ "page_idx": 9
1077
+ },
1078
+ {
1079
+ "type": "text",
1080
+ "text": "Mikhail Belkin, Partha Niyogi, and Vikas Sindhwani. Manifold regularization: A geometric framework for learning from labeled and unlabeled examples. Journal of machine learning research, 7:2399–2434, 2006. ",
1081
+ "bbox": [
1082
+ 174,
1083
+ 593,
1084
+ 825,
1085
+ 636
1086
+ ],
1087
+ "page_idx": 9
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "Joan Bruna, Wojciech Zaremba, Arthur Szlam, and Yann LeCun. Spectral networks and locally connected networks on graphs. In International Conference on Learning Representations, 2014. ",
1092
+ "bbox": [
1093
+ 173,
1094
+ 648,
1095
+ 823,
1096
+ 678
1097
+ ],
1098
+ "page_idx": 9
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "Olivier Chapelle and Alexander Zien. Semi-supervised classification by low density separation. In Proceedings of the Tenth International Workshop on Artificial Intelligence and Statistics, 2005. ",
1103
+ "bbox": [
1104
+ 171,
1105
+ 689,
1106
+ 823,
1107
+ 718
1108
+ ],
1109
+ "page_idx": 9
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "Dorin Comaniciu and Peet Meer. Mean shift: a robust approach toward feature space analysis. IEEE Transactions on Pattern Analysis and Machine Intelligence, 24:603 – 619, 08 2002. ",
1114
+ "bbox": [
1115
+ 171,
1116
+ 731,
1117
+ 823,
1118
+ 758
1119
+ ],
1120
+ "page_idx": 9
1121
+ },
1122
+ {
1123
+ "type": "text",
1124
+ "text": "Michael Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on graphs with fast localized spectral filtering. In Advances in Neural Information Processing Systems, 2016. ",
1125
+ "bbox": [
1126
+ 173,
1127
+ 771,
1128
+ 825,
1129
+ 814
1130
+ ],
1131
+ "page_idx": 9
1132
+ },
1133
+ {
1134
+ "type": "text",
1135
+ "text": "David K . Duvenaud, Dougal Maclaurin, Jorge Iparraguirre, Rafael Bombarell, Timothy Hirzel, Alan Aspuru-Guzik, and Ryan P. Adams. Convolutional networks on graphs for learning molecular fingerprints. In Advances in neural information processing systems, 2015. ",
1136
+ "bbox": [
1137
+ 176,
1138
+ 827,
1139
+ 823,
1140
+ 869
1141
+ ],
1142
+ "page_idx": 9
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "Michelle Girvan and Mark Newman. Girvan, m. newman, m. e. j. community structure in social and biological networks. proc. natl acad. sci. usa 99, 7821-7826. Proceedings of the National Academy of Sciences of the United States of America, 99:7821–6, 07 2002. ",
1147
+ "bbox": [
1148
+ 176,
1149
+ 882,
1150
+ 823,
1151
+ 922
1152
+ ],
1153
+ "page_idx": 9
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "Marco Gori, Gabriele Monfardini, Gori ScarselliMarco, Gabriele Monfardini, and Franco Scarselli. A new model for learning in graph domains. In IEEE International Joint Conference on Neural Networks, 2005. ",
1158
+ "bbox": [
1159
+ 176,
1160
+ 103,
1161
+ 823,
1162
+ 146
1163
+ ],
1164
+ "page_idx": 10
1165
+ },
1166
+ {
1167
+ "type": "text",
1168
+ "text": "William L . Hamilton, Rex Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Neural Information Processing Systems, 2017. ",
1169
+ "bbox": [
1170
+ 171,
1171
+ 155,
1172
+ 823,
1173
+ 184
1174
+ ],
1175
+ "page_idx": 10
1176
+ },
1177
+ {
1178
+ "type": "text",
1179
+ "text": "Mikael Henaff, Joan Bruna, and Yann LeCun. Deep convolutional networks on graph-structured data. In arXiv:1506.05163, 2015. ",
1180
+ "bbox": [
1181
+ 171,
1182
+ 191,
1183
+ 823,
1184
+ 220
1185
+ ],
1186
+ "page_idx": 10
1187
+ },
1188
+ {
1189
+ "type": "text",
1190
+ "text": "Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations, 2017. ",
1191
+ "bbox": [
1192
+ 171,
1193
+ 228,
1194
+ 823,
1195
+ 258
1196
+ ],
1197
+ "page_idx": 10
1198
+ },
1199
+ {
1200
+ "type": "text",
1201
+ "text": "Yann LeCun and Clement Kavukcuoglu, Koray Farabet. Convolutional networks and applications ´ in vision. In Proceedings of IEEE International Symposium on Circuits and Systems, 2010. ",
1202
+ "bbox": [
1203
+ 173,
1204
+ 266,
1205
+ 823,
1206
+ 296
1207
+ ],
1208
+ "page_idx": 10
1209
+ },
1210
+ {
1211
+ "type": "text",
1212
+ "text": "John Boaz Lee, Ryan Rossi, and Xiangnan Kong. Graph classification using structural attention. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery Data Mining, 2018. ",
1213
+ "bbox": [
1214
+ 174,
1215
+ 303,
1216
+ 825,
1217
+ 347
1218
+ ],
1219
+ "page_idx": 10
1220
+ },
1221
+ {
1222
+ "type": "text",
1223
+ "text": "Qimai Li, Zhichao Han, and Xiao-Ming Wu. Deeper insights into graph convolutional networks for semi-supervised learning. In 32nd AAAI Conference on Artificial Intelligence, 2018. ",
1224
+ "bbox": [
1225
+ 171,
1226
+ 354,
1227
+ 823,
1228
+ 383
1229
+ ],
1230
+ "page_idx": 10
1231
+ },
1232
+ {
1233
+ "type": "text",
1234
+ "text": "L. Lovasz. Random walks on graphs: a survey. Combinatorics, 2:1–46, 1993. ",
1235
+ "bbox": [
1236
+ 174,
1237
+ 391,
1238
+ 684,
1239
+ 407
1240
+ ],
1241
+ "page_idx": 10
1242
+ },
1243
+ {
1244
+ "type": "text",
1245
+ "text": "Qing Lu and Lise Getoor. Link-based classification. In Proceedings of the 20th International Conference on Machine Learning, 2003. ",
1246
+ "bbox": [
1247
+ 176,
1248
+ 415,
1249
+ 823,
1250
+ 444
1251
+ ],
1252
+ "page_idx": 10
1253
+ },
1254
+ {
1255
+ "type": "text",
1256
+ "text": "Minh-Thang Luong, Hieu Pham, and Christoper Manning. Effective approaches to attention-based neural machine translation. 08 2015. doi: 10.18653/v1/D15-1166. ",
1257
+ "bbox": [
1258
+ 173,
1259
+ 452,
1260
+ 823,
1261
+ 483
1262
+ ],
1263
+ "page_idx": 10
1264
+ },
1265
+ {
1266
+ "type": "text",
1267
+ "text": "Federico Monti, Davide Boscaini, Jonathan Masci, Emanuele Rodola, Jan Svoboda, and Michael M. Bronstein. Geometric deep learning on graphs and manifolds using mixture model cnns. In arXiv:1611.08402, 2016. ",
1268
+ "bbox": [
1269
+ 174,
1270
+ 489,
1271
+ 823,
1272
+ 534
1273
+ ],
1274
+ "page_idx": 10
1275
+ },
1276
+ {
1277
+ "type": "text",
1278
+ "text": "Christopher Morris, Martin Ritzert, Matthias Fey, William L. Hamilton, Jan Eric Lenssen, Gaurav Rattan, and Martin Grohe. Weisfeiler and leman go neural: Higher-order graph neural networks. In AAAI Conference on Artificial Intelligence, 2019. ",
1279
+ "bbox": [
1280
+ 176,
1281
+ 540,
1282
+ 823,
1283
+ 585
1284
+ ],
1285
+ "page_idx": 10
1286
+ },
1287
+ {
1288
+ "type": "text",
1289
+ "text": "Mathias Niepert, Mohamed Ahmed, and Konstantin Kutzkov. Learning convolutional neural networks for graphs. In In Proceedings of The 33rd International Conference on Machine Learning, 2016. ",
1290
+ "bbox": [
1291
+ 174,
1292
+ 592,
1293
+ 823,
1294
+ 636
1295
+ ],
1296
+ "page_idx": 10
1297
+ },
1298
+ {
1299
+ "type": "text",
1300
+ "text": "Jia-Yu Pan, HyungJeong Yang, Pinar Duygulu, and Christos Faloutsos. Automatic multimedia cross-modal correlation discovery. In ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2004. ",
1301
+ "bbox": [
1302
+ 173,
1303
+ 643,
1304
+ 825,
1305
+ 686
1306
+ ],
1307
+ "page_idx": 10
1308
+ },
1309
+ {
1310
+ "type": "text",
1311
+ "text": "Bryan Perozzi, Rami Al-Rfou, and Steven Skiena. Deepwalk: Online learning of social representations. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, 2014. ",
1312
+ "bbox": [
1313
+ 173,
1314
+ 694,
1315
+ 826,
1316
+ 738
1317
+ ],
1318
+ "page_idx": 10
1319
+ },
1320
+ {
1321
+ "type": "text",
1322
+ "text": "Ryan A. Rossi, Nesreen K. Ahmed, and Eunyee Koh. Higher-order network representation learning. In WWW Web Conference, 2019. ",
1323
+ "bbox": [
1324
+ 173,
1325
+ 746,
1326
+ 821,
1327
+ 775
1328
+ ],
1329
+ "page_idx": 10
1330
+ },
1331
+ {
1332
+ "type": "text",
1333
+ "text": "Prithviraj Sen, Galileo Namata, Mustafa Bilgic, Lise Getoor, Brian Galligher, and Tina Eliassi-Rad. Collective classification in network data. AI magazine, 29(3):93, 2008. ",
1334
+ "bbox": [
1335
+ 174,
1336
+ 782,
1337
+ 823,
1338
+ 813
1339
+ ],
1340
+ "page_idx": 10
1341
+ },
1342
+ {
1343
+ "type": "text",
1344
+ "text": "Jianbo Shi and Jitendra Malik. Normalized cuts and image segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22:888–905, 2000. ",
1345
+ "bbox": [
1346
+ 173,
1347
+ 820,
1348
+ 823,
1349
+ 849
1350
+ ],
1351
+ "page_idx": 10
1352
+ },
1353
+ {
1354
+ "type": "text",
1355
+ "text": "A. Sperduti, A. andStarita. Trans. neur. netw. Supervised neural networks for the classification of structures., 8:714–735, 1997. ",
1356
+ "bbox": [
1357
+ 173,
1358
+ 858,
1359
+ 823,
1360
+ 887
1361
+ ],
1362
+ "page_idx": 10
1363
+ },
1364
+ {
1365
+ "type": "text",
1366
+ "text": "Hanghang Tong, Christos Faloutsos, and Jia-Yu Pan. Fast random walk with restart and its applications. In Proceedings of the Sixth International Conference on Data Mining, 2006. ",
1367
+ "bbox": [
1368
+ 173,
1369
+ 895,
1370
+ 820,
1371
+ 924
1372
+ ],
1373
+ "page_idx": 10
1374
+ },
1375
+ {
1376
+ "type": "text",
1377
+ "text": "Petar Velickovic, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. Graph attention networks. In International Conference on Learning Representations, 2017. ",
1378
+ "bbox": [
1379
+ 174,
1380
+ 103,
1381
+ 823,
1382
+ 146
1383
+ ],
1384
+ "page_idx": 11
1385
+ },
1386
+ {
1387
+ "type": "text",
1388
+ "text": "Jason Weston, Frederic Ratle, Hossein Mobahi, and Ronan Collobert. Deep learning via semisupervised embedding. Neural Networks: Tricks of the Trade, pp. 639–655, 2012. ",
1389
+ "bbox": [
1390
+ 171,
1391
+ 155,
1392
+ 821,
1393
+ 184
1394
+ ],
1395
+ "page_idx": 11
1396
+ },
1397
+ {
1398
+ "type": "text",
1399
+ "text": "Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. In Proceedings of the 32 nd International Conference on Machine Learning, 2015. ",
1400
+ "bbox": [
1401
+ 176,
1402
+ 193,
1403
+ 821,
1404
+ 236
1405
+ ],
1406
+ "page_idx": 11
1407
+ },
1408
+ {
1409
+ "type": "text",
1410
+ "text": "Zhilin Yang, William Cohen, and Ruslan Salakhudinov. Revisiting semi-supervised learning with graph embeddings. In International Conference on Machine Learning, 2016. ",
1411
+ "bbox": [
1412
+ 173,
1413
+ 243,
1414
+ 820,
1415
+ 272
1416
+ ],
1417
+ "page_idx": 11
1418
+ },
1419
+ {
1420
+ "type": "text",
1421
+ "text": "Jiawei Zhang and Lin Meng. Gresnet: Graph residual network for reviving deep GNNs from suspended animation. In arXiv.org. 2019. ",
1422
+ "bbox": [
1423
+ 173,
1424
+ 281,
1425
+ 820,
1426
+ 310
1427
+ ],
1428
+ "page_idx": 11
1429
+ },
1430
+ {
1431
+ "type": "text",
1432
+ "text": "Xiaojin Zhu, Zoubin Ghahramani, and John D. Lafferty. Semi-supervised learning using gaussian fields and harmonic functions. In Proceedings of the 20th International conference on Machine learning, 2003. ",
1433
+ "bbox": [
1434
+ 174,
1435
+ 319,
1436
+ 825,
1437
+ 362
1438
+ ],
1439
+ "page_idx": 11
1440
+ }
1441
+ ]
parse/train/BJxWx0NYPr/BJxWx0NYPr_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJxWx0NYPr/BJxWx0NYPr_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HJx-akSKPS/HJx-akSKPS.md ADDED
@@ -0,0 +1,394 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NEURAL SUBGRAPH ISOMORPHISM COUNTING
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ In this paper, we study a new graph learning problem: learning to count subgraph isomorphisms. Although the learning based approach is inexact, we are able to generalize to count large patterns and data graphs in polynomial time compared to the exponential time of the original NP-complete problem. Different from other traditional graph learning problems such as node classification and link prediction, subgraph isomorphism counting requires more global inference to oversee the whole graph. To tackle this problem, we propose a dynamic intermedium attention memory network (DIAMNet) which augments different representation learning architectures and iteratively attends pattern and target data graphs to memorize different subgraph isomorphisms for the global counting. We develop both small graphs $( \leq 1 , 0 2 4$ subgraph isomorphisms in each) and large graphs $\leq$ 4,096 subgraph isomorphisms in each) sets to evaluate different models. Experimental results show that learning based subgraph isomorphism counting can help reduce the time complexity with acceptable accuracy. Our DIAMNet can further improve existing representation learning models for this more global problem.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Graphs are general data structures widely used in many applications, including social network analysis, molecular structure analysis, natural language processing and knowledge graph modeling, etc. Learning with graphs has recently drawn much attention as neural network approaches to representation learning have been proven to be effective for complex data structures (Niepert et al., 2016; Kipf & Welling, 2017; Hamilton et al., 2017b; Schlichtkrull et al., 2018; Velickovic et al., 2018; Xu et al., 2019). Most of existing graph representation learning algorithms focus on problems such as node classification, linking prediction, community detection, etc. (Hamilton et al., 2017a). These applications are of more local decisions for which a learning algorithm can usually make inferences by inspecting the local structure of a graph. For example, for the node classification problem, after several levels of neighborhood aggregation, the node representation may be able to incorporate sufficient higher-order neighborhood information to discriminate different classes (Xu et al., 2019).
12
+
13
+ In this paper, we study a more global learning problem: learning to count subgraph isomorphisms (counting examples are shown as Figure 1). Although subgraph isomorphism is the key to solve graph representation learning based applications (Xu et al., 2019), tasks of identifying or counting subgraph isomorphisms themselves are also significant and may support broad applications, such as bioinformatics (Milo et al., 2002; Alon et al., 2008), chemoinformatics (Huan et al., 2003), and online social network analysis (Kuramochi & Karypis, 2004). For example, in a social network, we can solve search queries like “groups of people who like X and visited Y-city/state.” In a knowledge graph, we can answer questions like “how many languages are there in Africa speaking by people living near the banks of the Nile River?” Many pattern mining algorithms or graph database indexing based approaches have been proposed to tackle subgraph isomorphism problems (Ullmann, 1976; Cordella et al., 2004; He & Singh, 2008; Han et al., 2013; Carletti et al., 2018). However, these approaches cannot be applied to large-scale graphs because of the exponential time complexity.
14
+
15
+ Thanks to the powerful graph representation learning models which can effectively capture local structural information, we can use a learning algorithm to learn how to count subgraph isomorphisms from a lot of examples. Then the algorithm can scan a large graph and memorize all necessary local information based on a query pattern graph. In this case, although learning based approaches can be inexact, we can roughly estimate the range of the number of subgraph isomorphism. This can already help many applications that do not require exact match or need a more efficient preprocessing step. To this end, in addition to trying different representation learning architectures, we develop a dynamic intermedium attention memory network (DIAMNet) to iteratively attend the query pattern and the target data graph to memorize different local subgraph isomorphisms for global counting. To evaluate the learning effectiveness and efficiency, we develop a small $( \leq 1 { , } 0 2 4$ subgraph isomorphisms in each graph) and a large $\leq 4 { , } 0 9 6$ subgraph isomorphisms in each graph) dataset and evaluate different neural network architectures.
16
+
17
+ ![](images/3c4f7394209fa6c1da19433212518f72e9988b731f4952caee511c42c71bfd88.jpg)
18
+ Figure 1: Subgraph isomorphism counting examples in different settings. The first is the homogeneous graph counting problem. The second is a heterogeneous vertex graph counting problem where there are two types of nodes. The third is a heterogeneous vertex and heterogeneous edge graph counting problem where there are two types of nodes and two types of edges.
19
+
20
+ Our main contributions are as follows.
21
+
22
+ • To our best knowledge, this is the first work to model the subgraph isomorphism counting problem as a learning problem, for which both the training and prediction time complexities are polynomial.
23
+
24
+ • We exploit the representation power of different deep neural network architectures in an end-toend learning framework. In particular, we provide universal encoding methods for both sequence models and graph models, and upon them we introduce a dynamic intermedium attention memory network to address the more global inference problem for counting.
25
+
26
+ • We conduct extensive experiments on developed datasets which demonstrate that our framework can achieve good results on both relatively large graphs and large patterns compared to existing studies.
27
+
28
+ # 2 RELATED WORK
29
+
30
+ Subgraph Isomophism Problems. Given a pattern graph and a data graph, the subgraph isomorphism search aims to find all occurrences of the pattern in the data graph with bijection mapping functions. Subgraph isomorphism is an NP-complete problem among different types of graph matching problems (monomorphism, isomorphism, and subgraph isomorphism). Most subgraph isomorphism algorithms are based on backtracking. They first obtain a series of candidate vertices and update a mapping table, then recursively revoke their own subgraph searching functions to match one vertex or one edge at a time. Ullmann’s algorithm (Ullmann, 1976), VF2 (Cordella et al., 2004), and GraphQL (He & Singh, 2008) belong to this type of algorithms. However, it is still hard to perform search when either the pattern or the data graph grows since the search space grows exponentially as well. Some other algorithms are designed based on graph-index, such as gIndex (Yan et al., 2004), which can be used as filters to prune out many unnecessary graphs. However, graph-index based algorithms have a problem that the time and space in indexing also increase exponentially with the growth of the graphs (Sun et al., 2012). TurboISO (Han et al., 2013) and VF3 (Carletti et al., 2018) add some weak rules to find candidate subregions and then call the recursive match procedure on subregions. These weak rules can significantly reduce the searching space in most cases.
31
+
32
+ Graph Representation Learning. Graph (or network) representation learning can be directly learning an embedding vector of each graph node (Perozzi et al., 2014; Tang et al., 2015; Grover & Leskovec, 2016). This approach is not easy to generalize to unseen nodes. On the other hand, graph neural networks (GNNs) (Battaglia et al., 2018) provide a solution to representation learning for nodes which can be generalized to new graphs and unseen nodes. Many graph neural networks have been proposed since 2005 (Gori et al., 2005; Scarselli et al., 2005) but rapidly developed in recent years. Most of them focus on generalizing the idea of convolutional neural networks for general graph data structures (Niepert et al., 2016; Kipf & Welling, 2017; Hamilton et al., 2017b; Velickovic et al., 2018) or relational graph structures with multiple types of relations (Schlichtkrull et al., 2018).
33
+
34
+ More recently, Xu et al. (2019) propose a graph isomorphism network (GIN) and show its discriminative power. Others use the idea of recurrent neural networks (RNNs) which are originally proposed to deal with sequence data to work with graph data (Li et al., 2016; You et al., 2018). Interestingly, with external memory, sequence models can work well on complicated tasks such as language modeling (Sukhbaatar et al., 2015; Kumar et al., 2016) and shortest path finding on graphs (Graves et al., 2016). There is another branch of research called graph kernels (Vishwanathan et al., 2010; Shervashidze et al., 2011; Yanardag & Vishwanathan, 2015; Togninalli et al., 2019; Chen et al., 2019) which also convert graph isomorphism to a similarity learning problem. However, they usually work on small graphs and do not focus on subgraph isomorphism identification or counting problems.
35
+
36
+ # 3 PRELIMINARIES
37
+
38
+ We begin by introducing the subgraph isomophism problems and then provide the general idea of our work by analyzing the time complexities of the problems.
39
+
40
+ # 3.1 PROBLEM DEFINITION
41
+
42
+ Traditionally, the subgraph isomorphism problem is defined between two simple graphs or two directed simple graphs, which is an NP-complete problem. We generalize the problem to a counting problem over directed heterogeneous multigraphs, whose decision problem is still NP-complete.
43
+
44
+ A graph or a pattern is defined as $\mathcal { G } = ( \nu , \mathcal { E } , \mathcal { X } , \mathcal { Y } )$ where $\nu$ is the set of vertices. $\mathcal { E } \subseteq \mathcal { V } \times \mathcal { V }$ is the set of edges, $\mathcal { X }$ is a label function that maps a vertex to a vertex label, and $\mathcal { V }$ is a label function that maps an edge to a set of edge labels. We use an edge with a set of edge labels to represent multiedges with the same source and the same target for clarity. That is, there are no two edges in a graph such that they have the same source, same target, and the same edge label. To simplify the statement, we assume $\mathcal { V } ( ( u , v ) ) = \phi$ if $( u , v ) \not \in \mathcal { E }$ .
45
+
46
+ In this paper, we discuss isomorphic mappings that preserve graph topology, vertex labels and edge labels, but not vertex ids. More precisely, a pattern $\mathcal G _ { P } = ( \mathcal V _ { P } , \mathcal E _ { P } , \mathcal X _ { P } , \mathcal Y _ { P } )$ is isomorphic to a graph $\mathcal { G } _ { G } = ( \mathcal { V } _ { G } , \mathcal { E } _ { G } , \mathcal { X } _ { G } , \mathcal { V } _ { G } )$ if there is a bijection $f : \mathcal { V } _ { G } \to \mathcal { V } _ { P }$ such that:
47
+
48
+ $$
49
+ \begin{array} { r l } & { \bullet \forall v \in \mathcal { V } _ { G } , \mathcal { X } _ { G } ( v ) = \mathcal { X } _ { P } ( f ( v ) ) , } \\ & { \bullet \forall v \in \mathcal { V } _ { P } , \mathcal { X } _ { P } ( v ) = \mathcal { X } _ { G } ( f ^ { - 1 } ( v ) ) , } \\ & { \bullet \forall ( u , v ) \in \mathcal { E } _ { G } , \mathcal { Y } _ { G } ( ( u , v ) ) = \mathcal { Y } _ { P } ( ( f ( u ) , f ( v ) ) ) , } \\ & { \bullet \forall ( u , v ) \in \mathcal { E } _ { P } , \mathcal { Y } _ { P } ( ( u , v ) ) = \mathcal { Y } _ { G } ( ( f ^ { - 1 } ( u ) , f ^ { - 1 } ( v ) ) ) . } \end{array}
50
+ $$
51
+
52
+ Furthermore, $\mathcal { G } _ { P }$ being isomorphic to a graph $\mathcal { G } _ { G }$ is denoted as $\mathcal { G } _ { P } \simeq \mathcal { G } _ { G }$ and the function $f$ is named as an isomorphism.
53
+
54
+ A pattern $\mathcal { G } _ { P } = ( \mathcal { V } _ { P } , \mathcal { E } _ { P } , \mathcal { X } _ { P } , \mathcal { V } _ { P } )$ is isomorphic to a subgraph $\mathcal { G } _ { G } ^ { \prime } = ( \mathcal { V } _ { G } ^ { \prime } , \mathcal { E } _ { G } ^ { \prime } , \mathcal { X } _ { G } , \mathcal { V } _ { G } )$ of a graph $\mathcal { G } _ { G } = ( \mathcal { V } _ { G } , \mathcal { E } _ { G } , \mathcal { X } _ { G } , \mathcal { V } _ { G } )$ : $\mathcal { V } _ { G } ^ { \prime } \subseteq \mathcal { V } _ { G }$ , $\mathcal { E } _ { G } ^ { \prime } \subseteq \mathcal { E } _ { G } \cap ( \mathcal { V } _ { G } ^ { \prime } \times \mathcal { V } _ { G } ^ { \prime } )$ if $\mathcal { G } _ { P } \simeq \mathcal { G } _ { G } ^ { \prime }$ . The bijection function $f : \mathcal { V } _ { G } ^ { \prime } \to \mathcal { V } _ { P }$ is named as a subgraph isomorphism.
55
+
56
+ The subgraph isomorphism counting problem is defined as to find the number of all different subgraph isomorphisms between a pattern graph $\mathcal { G } _ { P }$ and a graph $\mathcal { G } _ { G }$ . Examples are shown in Figure 1.
57
+
58
+ # 3.2 GENERAL IDEA
59
+
60
+ Intuitively, we need to compute $\mathcal { O } ( P e r m ( | \mathcal { V } _ { G } | , | \mathcal { V } _ { P } | ) \cdot d ^ { | \mathcal { V } _ { P } | } )$ to solve the subgraph isomorphism counting problem by enumeration, where $\begin{array} { r } { P e r m ( n , k ) = \frac { n ! } { ( n - k ) ! } } \end{array}$ , $| \gamma _ { G } |$ is the number of graph nodes, $| \nu _ { P } |$ is the number of pattern nodes, $d$ is the maximum degree. The first subgraph isomorphism algorithm, Ullmann’s algorithm (Ullmann, 1976), reduces the seaching time to $\mathcal { O } ( | \mathcal { V } _ { P } | ^ { | \mathcal { V } _ { G } | } \cdot | \mathcal { V } _ { G } | ^ { 2 } )$ . If the pattern and the graph are both small, the time is acceptable because both of two factors are not horrendously large. However, since the computational cost grows exponentially, it is impossible to count as either the graph size or the pattern size increases. If we use neural networks to learn distributed representations for $\mathcal { V } _ { G }$ and $\mathcal { V } _ { P }$ or $\mathcal { E } _ { G }$ and $\mathcal { E } _ { P }$ , we can reduce the complexity to $\mathcal { O } ( | \mathcal { V } _ { P } | \cdot$ $| \gamma _ { G } | + | \gamma _ { G } | ^ { 2 } \rangle$ or $\mathcal { O } ( | \mathcal { E } _ { P } | \cdot | \mathcal { E } _ { G } | + | \mathcal { E } _ { G } | ^ { 2 } )$ via source attention and self-attention. Assuming that we can further learn a much higher level abstraction without loss of representation power for $\mathcal { G } _ { P }$ , then the computational cost can be further reduced to $\mathcal { O } ( | \nu _ { G } | ^ { 2 } )$ or $\mathcal { O } ( | \mathcal { E } _ { G } | ^ { 2 } )$ . However, the complexity of the latter framework is still not acceptable when querying over large graphs. If we do not consider self-attention, the computational cost will be $\mathcal { O } ( \bar { | } \nu _ { G } \bar { | } )$ or $\mathcal { O } ( | \mathcal { E } _ { G } | )$ , but missing the self-attention will hurt the performance. In this work, we hope to use attention mechanism and additional memory networks to further reduce the complexity compared with $\mathcal { O } ( | \nu _ { G } | ^ { 2 } )$ or $\mathcal { O } ( | \mathcal { E } _ { G } | ^ { 2 } )$ while keeping the performance acceptable on the counting problem.
61
+
62
+ ![](images/26c0d6ff03a3ffdf8871fe5498f5b1ff3041ccb1d507f1226506d7d478607477.jpg)
63
+ Figure 2: General framework of neural subgraph isomorphism counting models.
64
+
65
+ ![](images/f5feef8021f9d0069db96bd147aebf8eb32f94941de88762485b04ef68da08af.jpg)
66
+ Figure 3: Two views of different encoding methods. There are three labels of vertices (marked as orange, blue, and yellow) and two labels of edges (marked as solid and dashed lines). The numbers affixed show one possible set of ids for the vertices.
67
+
68
+ # 4 METHODOLOGIES
69
+
70
+ A graph (or a pattern) can be represented as a sequence of edges or a series of adjacent matrices and vertex features. For sequence inputs we can use CNNs (Kim, 2014), RNNs such as GRU (Cho et al., 2014), or Transformer-XL (Dai et al., 2019) to extract high-level features. While if the inputs are modeled as series of adjacent matrices and vertex features, we can use RGCN (Schlichtkrull et al., 2018) to learn vertex representations with message passing from neighborhoods. After obtaining the pattern representation and the graph representation, we feed them into an interaction module to extract the correlated features from each side. Then we feed the output context of the interaction module into a fully-connected layer to make predictions. A general framework is shown in Figure 2 and the difference between sequence encoding and graph encoding is shown in Figure 3.
71
+
72
+ # 4.1 SEQUENCE MODELS
73
+
74
+ # 4.1.1 SEQUENCE ENCODING
75
+
76
+ In sequence models, the minimal element of a graph (or a pattern) is an edge. By definition, at least three attributes are required to identify an edge $e$ , which are the source vertex id $u$ , the target vertex id $v$ , and its edge label $y \in \mathcal { V } ( e )$ . We further add two attributes of vertices’ labels to form a 5-tuple $( u , v , \mathcal { X } ( u ) , y , \mathcal { X } ( v ) )$ to represent an edge $e$ , where $\mathcal { X } ( u )$ is the source vertex label and $\mathcal { X } ( v )$ is the target vertex label. A list of 5-tuple is referred as a code. We follow the order defined in gSpan (Yan & Han, 2002) to compare pairs of code lexicographically; the detailed definition is given in Appendix A. The minimum code is the code with the minimum lexicographic order with the same elements. Finally, each graph can be represented by the corresponding minimum code, and vice versa.
77
+
78
+ Given that a graph is represented as a minimum code, or a list of 5-tuples, the next encoding step is to encode each 5-tuple into a vector. Assuming that we know the max values of $| \mathcal { V } | , | \mathcal { \bar { X } } | , | \mathcal { \bar { X } } |$ in a dataset in advance, we can encode each vertex id $v$ , vertex label $x$ , and edge label $y$ into $B$ - nary digits, where $B$ is the base and each digit $d \in \{ 0 , 1 , \cdots , B - 1 \}$ . It is easy to replace each digit with a one-hot vector so that each 5-tuple can be vectorized as a multi-hot vector which is the concatenation of one-hot vectors. The length of the multi-hot vector of a 5-tuple is $B \times ( 2 \cdot$ $\lceil \log _ { B } ( M a x ( | \mathcal { V } | ) ) \rceil + 2 \cdot \lceil \log _ { B } ( M a x ( | \mathcal { X } | ) ) \rceil + \lceil \log _ { B } ( M a x ( | \mathcal { V } | ) ) \rceil )$ . Then minimum is achieved when $B = 2$ and $d _ { e } = 2 \times ( 2 \cdot \lceil \log _ { 2 } ( M a x ( | \mathcal { V } | ) ) \rceil + 2 \cdot \lceil \log _ { 2 } ( M a x ( | \mathcal { X } | ) ) \rceil + \lceil \log _ { 2 } ( M a x ( | \mathcal { V } | ) ) \rceil )$ . Then we can easily calculate the graph dimension $d _ { g }$ and the pattern dimension $d _ { p }$ . Furthermore, the minimum code can be encoded into a multi-hot matrix, $G \in \mathbb { R } ^ { | \mathcal { E } _ { G } | \times d _ { g } }$ for a graph $\mathcal { G } _ { G }$ or $\pmb { P } \in$ $\mathbb { R } ^ { | \mathcal { E } _ { P } | \times d _ { p } }$ for a pattern $\mathcal { G } _ { P }$ according to this encoding method.
79
+
80
+ This encoding method can be extended when we have larger values of $| \nu | , | \mathcal { X } | , | \mathcal { V } |$ . A larger value, e.g., $| \nu |$ , only increases the length of one-hot vectors corresponding to its field. Therefore, we can regard new digits as the same number of zeros in previous data. As long as we process previous one-hot vectors carefully to keep these new dimensions from modifying the original distributed representations, we can also extend these multi-hot vectors without affecting previous models. A simple but effective way is to initialize additional new weights related to new dimensions as zeros.
81
+
82
+ # 4.1.2 SEQUENCE NEURAL NETWORKS
83
+
84
+ Given the encoding method in Section 4.1.1, we can simply embed graphs as multi-hot matrices. Then we can use general strategies of sequence modeling to learn dependencies among edges in graphs.
85
+
86
+ Convolutional Neural Networks (CNNs) have been proved to be effective in sequence modeling (Kim, 2014). In our experiments, we apply multiple layers of the convolution operation to obtain a sequence of high-level features.
87
+
88
+ Recurrent Neural Networks (RNNs), such as GRU (Cho et al., 2014), are widely used in many sequence modeling tasks.
89
+
90
+ Transformer-XL (TXL) (Dai et al., 2019) is a variant of the Transformer architecture (Vaswani et al., 2017) and enables learning long dependencies beyond a fixed length without disrupting temporal coherence. Unlike the original autoregressive settings, in our model the Transformer-XL encoder works as a feature extractor, in which the attention mechanism has a full, unmasked scope over the whole sequence. However, its computational cost grows quadratically with the size of inputs, so the tradeoff between performance and efficiency would be considered.
91
+
92
+ # 4.2 GRAPH MODELS
93
+
94
+ # 4.2.1 GRAPH ENCODING
95
+
96
+ In graph models, each vertex has a feature vector and edges are used to pass information from its source to its sink. GNNs do not need vertex ids and edge ids explicitly because the adjacency information is included in a adjacent matrix. As explained in Section 4.1.1, we can vectorize vertex labels into multi-hot vectors as vertex features. In a simple graph or a simple directed graph, the adjacent information can be stored in a sparse matrix to reduce the memory usage and improve the computation speed. As for heterogeneous graphs, behaviors of edges should depend on edge labels. RGCNs have relation-specific transformations so that each edge label and topological information are mixed into the message to the sink. We follow this method and use basis-decomposition for parameter sharing (Schlichtkrull et al., 2018).
97
+
98
+ # 4.2.2 GRAPH NEURAL NETWORKS
99
+
100
+ Relational Graph Convolutional Networks (RGCNs) (Schlichtkrull et al., 2018) are developed specifically to handle multi-relational data in realistic knowledge bases. Each relation corresponds to a transformation matrix to transform relation-specific information from a neighbor to the center vertex. Two decomposition methods are proposed to address the rapid growth in the number of parameters with the number of relations: basis-decomposition and block-diagonal-decomposition. We use the first method, which is equivalent to the MLPs in GIN (Xu et al., 2019). The original RGCN uses the mean aggregator, but $\mathrm { X u }$ et al. (2019) find that the sum-based GNNs can capture graph structures better. We implement both and named them as RGCN and RGCN-SUM respectively.
101
+
102
+ ![](images/265c3bb109e7359d800a17d12c30023ad5448b4a9a76830a2334979648a05143.jpg)
103
+ Figure 4: Illustration of dynamic intermedium attention memory network (DIAMNet). $\Phi _ { 1 }$ represents Eqs. (1) and (2), $\Phi _ { 2 }$ represents Eqs. (4) and (5), and two types of gates are Eqs. (3) and (6).
104
+
105
+ # 4.3 DYNAMIC INTERMEDIUM ATTENTION MEMORY NETWORK
106
+
107
+ After obtaining a graph representation $\check { G }$ and a pattern representation $\check { P }$ from a sequence model or a graph model where their column vectors are $d$ -dimensional, we feed them as inputs of interaction layers to extract the correlated context between the pattern and the graph. A naive idea is to use attention modules (Bahdanau et al., 2015) to model interactions between these two representations and interactions over the graph itself. However, this method is not practical due to its complexity, up to $\mathcal { O } ( | \mathcal { E } _ { P } | \cdot | \mathcal { E } _ { G } | + | \mathcal { E } _ { G } | ^ { \frac { - } { 2 } } )$ for sequence modeling and $\mathcal { O } ( | \mathcal { V } _ { P } | \cdot | \mathcal { V } _ { G } | + | \mathcal { V } _ { G } | ^ { 2 } )$ for graph modeling.
108
+
109
+ To address the problem of high computational cost in the attention mechanism, we propose the Dynamic Intermedium Attention Memory Network (DIAMNet), using an external memory as an intermedium to attend both the pattern and the graph in order. To make sure that the memory has the knowledge of the pattern while attending the graph and vice-versa, this dynamic memory is designed as a gated recurrent network as shown in Figure 4. Assuming that the memory size is $M$ and we have $T$ recurrent steps, the time complexity is decreased into $\mathcal { O } ( T \cdot M \cdot ( | \mathcal { E } _ { P } | + | \mathcal { E } _ { G } | ) )$ or $\mathcal { O } ( T \cdot M \cdot ( | \mathcal { V } _ { P } | + | \mathcal { V } _ { G } | ) )$ , which means the method can be easily applied to large-scale graphs.
110
+
111
+ The external memory is divided into $M$ blocks $\{ m _ { 1 } , . . . , m _ { M } \}$ , where ${ m _ { j } \in \mathbb { R } ^ { d } }$ . At each time step $t$ , $\{ m _ { j } \}$ is updated by the pattern and the graph in order via multi-head attention mechanism (Vaswani et al., 2017). Specifically, the update equations of our DIAMNet are given by:
112
+
113
+ $$
114
+ \begin{array} { l } { s _ { j } ^ { ( t ) } = M u l t i H e a d ( m _ { j } ^ { ( t ) } , \check { P } , \check { P } ) } \\ { z _ { j } ^ { ( t ) } = \sigma ( U _ { P } { m } _ { j } ^ { ( t ) } + V _ { P } { s } _ { j } ^ { ( t ) } ) } \\ { \overline { { s } } _ { j } ^ { ( t ) } = z _ { j } ^ { ( t ) } \odot m _ { j } ^ { ( t ) } + \big ( 1 - z _ { j } ^ { ( t ) } \big ) \odot s _ { j } ^ { ( t ) } } \\ { \widetilde { s } _ { j } ^ { ( t ) } = M u l t i H e a d ( \overline { { s } } _ { j } ^ { ( t ) } , \check { G } , \check { G } ) } \\ { \widetilde { z } _ { j } ^ { ( t ) } = \sigma ( U _ { G } \overline { { s } } _ { j } ^ { ( t ) } + V _ { G } \widetilde { s } _ { j } ^ { ( t ) } ) } \\ { m _ { j } ^ { ( t + 1 ) } = \widetilde { z } _ { j } ^ { ( t ) } \odot \overline { { s } } _ { j } ^ { ( t ) } + \big ( 1 - \widetilde { z } _ { j } ^ { ( t ) } \big ) \odot \widetilde { s } _ { j } ^ { ( t ) } } \end{array}
115
+ $$
116
+
117
+ Here MultiHead is the attention method described in (Vaswani et al., 2017), $\sigma$ represents the logistic sigmoid function, $\overline { { \pmb { s } } } _ { j }$ is the intermediate state of the $j ^ { t h }$ block of memory that summarizes information from the pattern, and $\widetilde { s }$ for information from both the pattern and the graph. $z _ { j }$ and $\widetilde { z } _ { j }$ eare two gates designed to control the updates on the states in the $j ^ { t h }$ block. $U _ { P } , V _ { P } , U _ { G } , V _ { G } \in$ $\mathbb { R } ^ { d \times d }$ are trainable parameters.
118
+
119
+ # 5 EXPERIMENTS
120
+
121
+ In this section, we report our major experimental results. More results can be found in the Appendix.
122
+
123
+ # 5.1 DATASETS
124
+
125
+ In order to train and evaluate our neural models for the subgraph isomorphism counting problem, we need to generate enough graph-pattern data. As there’s no special constraint on the pattern, the pattern generator may produce any connected multigraph without identical edges, i.e., parallel edges with identical label. In contrast, the ground truth number of subgraph isomorphisms must be tractable in our synthetic graph data. Therefore, our graph generator first generates multiple disconnected components, possibly with some subgraph isomorphisms. We use the idea of neighborhood equivalence class (NEC) in TurboISO (Han et al., 2013) to control the necessary conditions of a subgraph isomorphism in the graph generation process. The detailed algorithms are shown in Appendix B. Then the generator merges these components into a larger graph and ensures that there is no more subgraph isomorphism generated in the merge process. The subgraph isomorphism search can be done during these components subgraphs in parallel.
126
+
127
+ Using the pattern generator and the graph generator above, we can generate many patterns and graphs for neural models. We are interested in follow research questions: whether sequence models and graph convolutional networks can perform well given limited data, whether their running time is acceptable, and whether memory can help models make better predictions even faced with a NPcomplete problem. To evaluate different neural architectures and different prediction networks, we generate two datasets in different graph scales and the statistics are reported in Table 1. There are 187 unique patterns in whole pairs, where 75 patterns belong to the small dataset, 122 patterns belong to the large dataset. Target data graphs are not required similar so they are generated randomly. The generation details are reported in Appendix C.
128
+
129
+ Table 1: Statistics of the datasets.
130
+
131
+ <table><tr><td></td><td>#Training</td><td>#Dev</td><td>#Test</td><td>Mean(IVGl)</td><td>Mean(|εGl)</td><td>Counts</td></tr><tr><td>Small</td><td>398,088</td><td>49,761</td><td>49,761</td><td>32.6</td><td>76.3</td><td>{c ∈ Nlc≤1,024}</td></tr><tr><td>Large</td><td>316,224</td><td>39,528</td><td>39,528</td><td>240.0</td><td>560.0</td><td>{c ∈ Nlc ≤ 4,096}</td></tr></table>
132
+
133
+ # 5.2 IMPLEMENTATION DETAILS
134
+
135
+ Instead of directly feeding multi-hot encoding vectors into representation modules, we use two simple linear layers separately to transform graph multi-hot vectors and pattern multi-hot vectors to lower-dimensional, distributed ones. To improve the efficiency, we also add a filtering layer to filter out irrelevant parts before all representation modules. The details of this filter layer is shown in Section D.1.
136
+
137
+ # 5.2.1 REPRESENTATION MODELS
138
+
139
+ In our experiments, we implemented five different representation models: (1) CNN is a 3-layer convolutional layers followed by max-pooling layers. The convolutional kernels are 2,3,4 respectively and strides are 1. The pooling kernels are 2,3,4 and strides are 1. (2) RNN is a simple 3-layer GRU model. (3) TXL is a 6-layer Transformer encoder with additional memory. (4) RGCN is a 3-layer RGCN with the basis decomposition. We follow the same setting in that ordinal paper to use meanpooling in the message propagation part. (5) RGCN-SUM is a modification of RGCN to replace the mean-pooling with sum-pooling.
140
+
141
+ # 5.2.2 INTERACTION NETWORKS
142
+
143
+ After getting a graph representation $\check { G }$ and a pattern representation $\check { P }$ from the representation learning modules, we feed them into the following different types of interaction layers for comparison.
144
+
145
+ SumPool: A simple sum-pooling is applied for $\check { G }$ and $\check { P }$ to obtain $\check { g }$ and $\check { p }$ , and the model sends Concate $( { \check { g } } , { \check { p } } , { \check { g } } - { \check { p } } , { \check { g } } \odot { \check { p } } )$ with the graph size and the pattern size information into the next fully connected (FC) layers.
146
+
147
+ MeanPool: Similar settings as SumPool, but to replace the pooling method with mean-pooling.
148
+
149
+ MaxPool: Similar settings as SumPool, but to replace the pooling method with max-pooling.
150
+
151
+ AttnPool: We want to use attention modules without much computational cost so the self-attention is not acceptable. We simplify the attention by first applying a pooling mechanism for the pattern graph and then use the pooled vector to perform attention over the data graph rather than simply perform pooling over it. Other settings are similar with pooling methods. The detailed information is provided in Appendix D.2. We only report results of mean-pooling based attention, because it is the best of the three variants.
152
+
153
+ DIAMNet: We compare the performance and efficiency of our DIAMNet proposed in Section 4.3 with above interaction networks. The initialization strategy we used is shown in Appendix D.3. And we feed the whole memory with size information into the next FC layers.
154
+
155
+ # 5.3 EXPERIMENT SETTINGS
156
+
157
+ For fair comparison, we set embedding dimensions, dimensions of all representation models, and the numbers of filters all 64. The segment size and memory size in TXL are also 64 due to the computation complexity. The length of memory is fixed to 4 and the number of recurrent steps is fixed to 3 in the DIAMNet for both small and large datasets. We use the mean squared error (MSE) to train models and evaluate the validation set to choose best models. The optimizer is Adam with learning rate 0.001. L2 penalty is added and the coefficient is set as 0.001. To avoid gradient explosion and overfitting, we add gradient clipping and dropout with a dropout rate 0.2. We use Leaky ReLU as activation functions in all modules. Due to the limited number of patterns, the representation module for patterns are easy to overfit. Therefore, we use the same module with shared parameters to produce representation for both the pattern and the graph. We also find that using curriculum learning (Bengio et al., 2009) can help models to converge better. Hence, all models in Table 3 are fine-tuned based on the best models in small in the same settings. Training and evaluating were finished on one single NVIDIA GTX 1080 Ti GPU under the PyTorch framework.
158
+
159
+ # 5.4 EVALUATION METRICS
160
+
161
+ As we model this subgraph isomorphism counting problem as a regression problem, we use common metrics in regression tasks, including the root mean square error (RMSE) and the mean absolute error (MAE). In this task, negative predictions are meaningless, so we only evaluate $R e L U ( \widehat { Y } _ { i } )$ as final prediction results. Considering that about $7 5 \%$ of countings are 0’s in our dataset, we also use evaluation metrics for the binary classification to analyze behaviors of different models. We report F1 scores for both zero data $( \mathrm { F } 1 _ { \mathrm { z e r o } } )$ and nonzero data $\mathrm { ( F 1 _ { n o n z e r o } ) }$ . Two trivial baselines, Zero that always predicts 0 and Avg that always predicts the average counting of training data, are also used in comparison.
162
+
163
+ # 5.5 RESULTS AND ANALYSIS
164
+
165
+ We first report results for small dataset in Table 2 and results for large dataset in Table 3. In addition to the trivial all-zero and average baselines and other neural network learning based baselines, we are also curious about to what extent our neural models can be faster than traditional searching algorithms. Therefore, we also compare the running time. Considering the graph generation strategy we used, we decide to compare with VF2 algorithm (Cordella et al., 2004) to avoid unnecessary interference from the similar searching strategy. From the experiments, we can draw following observations and conclusions.
166
+
167
+ Comparison of different representation architectures. As shown in Table 2, in general, graph models outperform most of the sequence models but cost more time to do inference. CNN is the worst model for the graph isomorphism counting problem. The most possible reason is that the sequence encoding method is not suitable for CNN. The code order does not consider the connectivity of adjacent vertices and relevant label information. Hence, convolutional operations and pooling operations cannot extract useful local information but may introduce much noise. From results of the large dataset, we can see that $\mathrm { F 1 } _ { \mathrm { n o n z e r o } } { = } 0 . 1 8 0$ is even worse than others. In fact, we find that CNN always predicts 0 for large graphs. RNN and TXL are widely used in modeling sequences in many applications. The two models with simple pooling can perform well. We note that RNN with sum-pooling is better than TXL with memory. RNN itself holds a memory but TXL also has much longer memory. However, the memory in RNN can somehow memorize all information that has been seen previously but the memory of TXL is the representation of the previous segment. In our experiments, the segment size is 64 so that TXL can not learn the global information at a time. A part of the structure information misleads TXL, which is consistent with CNN. A longer segment set for TXL may lead to better results, but it will require much more GPU memory and much longer time for training. RGCN-SUM is much better than RGCN and other sequence models, which shows that sum aggregator is good at modeling vertex representation in this task. The mean aggregator can model the distribution of neighbor but the distribution can also misguide models.
168
+
169
+ Table 2: Results of different models on the small dataset. Time is evaluated on the whole test set.
170
+
171
+ <table><tr><td rowspan="2" colspan="2">Models</td><td colspan="5">Test</td></tr><tr><td>RMSE</td><td>MAE</td><td>F1zero</td><td>F1nonzero</td><td>Time (sec)</td></tr><tr><td rowspan="5">CNN</td><td>SumPool</td><td>55.429</td><td>11.057</td><td>0.807</td><td>0.397</td><td>0.29</td></tr><tr><td>MeanPool</td><td>57.298</td><td>10.517</td><td>0.821</td><td>0.475</td><td>0.27</td></tr><tr><td>MaxPool</td><td>47.353</td><td>11.212</td><td>0.832</td><td>0.539</td><td>0.27</td></tr><tr><td>AttnPool</td><td>55.963</td><td>12.717</td><td>0.796</td><td>0.340</td><td>0.54</td></tr><tr><td>DIAMNet</td><td>34.448</td><td>6.953</td><td>0.884</td><td>0.753</td><td>0.90</td></tr><tr><td rowspan="5">RNN</td><td>SumPool</td><td>29.955</td><td>5.740</td><td>0.908</td><td>0.819</td><td>0.55</td></tr><tr><td>MeanPool</td><td>31.010</td><td>6.447</td><td>0.912</td><td>0.833</td><td>0.54</td></tr><tr><td>MaxPool</td><td>30.824</td><td>6.236</td><td>0.869</td><td>0.690</td><td>0.58</td></tr><tr><td>AttnPool</td><td>31.857</td><td>6.025</td><td>0.899</td><td>0.793</td><td>0.79</td></tr><tr><td>DIAMNet</td><td>29.743</td><td>5.547</td><td>0.927</td><td>0.877</td><td>1.15</td></tr><tr><td rowspan="5">TXL</td><td>SumPool</td><td>34.391</td><td>7.042</td><td>0.899</td><td>0.798</td><td>1.98</td></tr><tr><td>MeanPool</td><td>32.569</td><td>6.656</td><td>0.882</td><td>0.754</td><td>1.98</td></tr><tr><td>MaxPool</td><td>65.152</td><td>30.289</td><td>0.572</td><td>0.669</td><td>1.99</td></tr><tr><td>AttnPool</td><td>37.721</td><td>7.426</td><td>0.869</td><td>0.719</td><td>2.22</td></tr><tr><td>DIAMNet</td><td>31.649</td><td>6.680</td><td>0.900</td><td>0.811</td><td>2.48</td></tr><tr><td rowspan="5">RGCN</td><td>SumPool</td><td>32.414</td><td>6.578</td><td>0.900</td><td>0.796</td><td>6.05</td></tr><tr><td>MeanPool</td><td>33.829</td><td>7.152</td><td>0.878</td><td>0.735</td><td>5.99</td></tr><tr><td>MaxPool</td><td>50.851</td><td>9.707</td><td>0.869</td><td>0.704</td><td>6.04</td></tr><tr><td>AttnPool</td><td>32.526</td><td>6.523</td><td>0.870</td><td>0.697</td><td>6.27</td></tr><tr><td>DIAMNet</td><td>28.712</td><td>5.782</td><td>0.918</td><td>0.868</td><td>6.69</td></tr><tr><td rowspan="5">RGCN-SUM</td><td>SumPool</td><td>22.379</td><td>3.958</td><td>0.920</td><td>0.845</td><td>5.78</td></tr><tr><td>MeanPool</td><td>22.483</td><td>4.254</td><td>0.903</td><td>0.803</td><td>5.81</td></tr><tr><td>MaxPool</td><td>42.434</td><td>7.900</td><td>0.874</td><td>0.709</td><td>6.08</td></tr><tr><td>AttnPool</td><td>24.875</td><td>5.131</td><td>0.840</td><td>0.569</td><td>6.49</td></tr><tr><td>DIAMNet</td><td>21.734</td><td>3.853</td><td>0.924</td><td>0.864</td><td>6.55</td></tr><tr><td colspan="2">Zero</td><td>67.195</td><td>13.716</td><td>0.761</td><td>0.0</td><td>-</td></tr><tr><td colspan="2">Avg</td><td>65.780</td><td>21.986</td><td>0.0</td><td>0.557</td><td>-</td></tr><tr><td colspan="2">VF2</td><td>0.0</td><td>0.0</td><td>1.0</td><td>1.0</td><td>~120</td></tr></table>
172
+
173
+ Table 3: Results of different models on the large dataset. Time is evaluated on the whole test set.
174
+
175
+ <table><tr><td colspan="2">Model</td><td colspan="5">Test</td></tr><tr><td colspan="2"></td><td>RMSE</td><td>MAE</td><td>F1zero</td><td>F1nonzero</td><td>Time (sec)</td></tr><tr><td rowspan="2">CNN</td><td>MaxPool DIAMNet</td><td>234.215</td><td>33.859 29.726</td><td>0.787 0.831</td><td>0.180</td><td>2.01</td></tr><tr><td></td><td>193.410</td><td></td><td></td><td>0.523</td><td>5.82</td></tr><tr><td rowspan="2">RNN</td><td>SumPool</td><td>136.031</td><td>20.234</td><td>0.905</td><td>0.799</td><td>16.40</td></tr><tr><td>DIAMNet</td><td>134.786</td><td>21.595</td><td>0.911</td><td>0.844</td><td>19.98</td></tr><tr><td rowspan="2">TXL</td><td>MeanPool</td><td>182.637</td><td>35.749</td><td>0.842</td><td>0.587</td><td>61.83</td></tr><tr><td>DIAMNet</td><td>167.480</td><td>26.954</td><td>0.881</td><td>0.749</td><td>67.95</td></tr><tr><td rowspan="2">RGCN</td><td>SumPool</td><td>149.060</td><td>23.051</td><td>0.927</td><td>0.864</td><td>25.74</td></tr><tr><td>DIAMNet</td><td>147.511</td><td>24.398</td><td>0.926</td><td>0.883</td><td>29.63</td></tr><tr><td rowspan="2">RGCN-SUM</td><td>SumPool</td><td>125.022</td><td>16.551 16.152</td><td>0.903</td><td>0.788</td><td>25.14</td></tr><tr><td>DIAMNet</td><td>118.433</td><td></td><td>0.930</td><td>0.879</td><td>30.72</td></tr><tr><td colspan="2">Zero</td><td>237.904</td><td>35.445 60.260</td><td>0.769</td><td>0.0</td><td>1</td></tr><tr><td colspan="2">Avg</td><td>235.253</td><td></td><td>0.0</td><td>0.545</td><td>-</td></tr><tr><td colspan="2">VF2</td><td>0.0</td><td>0.0</td><td>1.0</td><td>1.0</td><td>~5×10</td></tr></table>
176
+
177
+ Effectiveness of the memory. Table 2 shows the effectiveness of our dynamic attention memory network as the prediction layer. It outperforms the other three pooling methods as well as the simple attention mechanism for all representation architectures. Sum, Mean, and Attention pooling are all comparable with each other, because they all gather the global information of the pattern and graph representations. Prediction layer based on max pooling, however, performs the worst, and even worse when the representation layer is CNN or Transformer-XL. This observation indicates that every context of the pattern representation should be counted and we need a better way to compute the weights between each context. The dynamic attention memory with global information of both the pattern and the graph achieves the best results in most of the cases. One of the most interesting observations is that it can even help extract the context of pattern and graph while the representation layer (such as CNN) does not perform very well, which proves the power of our proposed method of DIAMNet.
178
+
179
+ ![](images/34a41577ea27bebeb34b5f53d3a8314845839bd7ab463b2aff8a919cb2a3c2fd.jpg)
180
+ Figure 5: Model behaviors of three models in small dataset. The $\mathbf { X }$ -axis is the example id and the y-axis is the count value. We mark the ground truth value as orange $^ +$ and the predictions as blue $\times$ . We use two green dashed lines to separate patterns into three blocks based on numbers of vertices (3,4, and 8). In each block, the examples are sorted based on the data graphs’ sizes.
181
+
182
+ Performance on larger graphs. Table 3 shows our models can be applied to larger-scale graphs. For the large dataset, we only choose the best pooling method for each of the baselines to report. We can find most of the results are consistent to the small dataset, which means RGCN is the best representation method in our task and the dynamic memory is effective. In terms of the running time, all learning based models are much faster than the traditional VF2 algorithm for subgraph isomorphism counting.
183
+
184
+ Model behaviors. As shown in Figure 5, we compare the model behaviors of the best model $\mathrm { \ R G C N + S U M ) }$ and the worst model (CNN), as well as the great improvement of CNN when memory is added. We can find that CNN+SumPool tends to predict the count value below 400 and has the same behavior between three patterns. This results may come from the fact that CNN can only extract local information of a sequence and Sum pooling is not a good way to aggregate it. However, the memory can memorize local information to each memory cell so it can improve the representation power of CNN and can gain a better performance. RGCN, on the other hand, can better represent the graph structure, so it achieves a better result, especially on the largest pattern (the third block of each figure) compared with CNN. More results can be found in Appendix F.
185
+
186
+ # 6 CONCLUSIONS
187
+
188
+ In this paper, we study the challenging subgraph isomorphism counting problem. With the help of deep graph representation learning, we are able to convert the NP-complete problem to a learning based problem. Then we can use the learned model to predict the subgraph isomorphism counts in polynomial time. Counting problem is more related to a global inference rather than only learning node or edge representations. Therefore, we have developed a dynamic intermedium attention memory network to memorize local information and summarize for the global output. We build two datasets to evaluate different representation learning models and global inference models. Results show that learning based method is a promising direction for subgraph isomorphism detection and counting and memory networks indeed help the global inference. We also performed detailed analysis of model behaviors for different pattern and graph sizes and labels. Results show that there is much space to improve when the vertex label size is large. Moreover, we have seen the potential real-world applications of subgraph isomorphism counting problems such as question answering and information retrieval. It would be very interesting to see the domain adaptation power of our developed pretrained models on more real-world applications.
189
+
190
+ # REFERENCES
191
+
192
+ Noga Alon, Phuong Dao, Iman Hajirasouliha, Fereydoun Hormozdiari, and Suleyman Cenk Sahin-¨ alp. Biomolecular network motif counting and discovery by color coding. In ISMB, pp. 241–249, 2008.
193
+
194
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In ICLR, 2015.
195
+
196
+ Peter W. Battaglia, Jessica B. Hamrick, Victor Bapst, Alvaro Sanchez-Gonzalez, Vin´ıcius Flores Zambaldi, Mateusz Malinowski, Andrea Tacchetti, David Raposo, Adam Santoro, Ryan Faulkner, C¸ aglar Gulc¸ehre, H. Francis Song, Andrew J. Ballard, Justin Gilmer, George E. Dahl, Ashish ¨ Vaswani, Kelsey R. Allen, Charles Nash, Victoria Langston, Chris Dyer, Nicolas Heess, Daan Wierstra, Pushmeet Kohli, Matthew Botvinick, Oriol Vinyals, Yujia Li, and Razvan Pascanu. Relational inductive biases, deep learning, and graph networks. CoRR, abs/1806.01261, 2018.
197
+
198
+ Yoshua Bengio, Jer´ ome Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In ˆ ICML, pp. 41–48, 2009.
199
+
200
+ Vincenzo Carletti, Pasquale Foggia, Alessia Saggese, and Mario Vento. Challenging the time complexity of exact subgraph isomorphism for huge and dense graphs with VF3. IEEE Trans. Pattern Anal. Mach. Intell., 40(4):804–818, 2018.
201
+
202
+ Zhengdao Chen, Soledad Villar, Lei Chen, and Joan Bruna. On the equivalence between graph isomorphism testing and function approximation with gnns. In NeurIPS, 2019.
203
+
204
+ Kyunghyun Cho, Bart van Merrienboer, C¸ aglar Gulc¸ehre, Dzmitry Bahdanau, Fethi Bougares, Hol- ¨ ger Schwenk, and Yoshua Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In EMNLP, pp. 1724–1734, 2014.
205
+
206
+ Luigi P. Cordella, Pasquale Foggia, Carlo Sansone, and Mario Vento. A (sub)graph isomorphism algorithm for matching large graphs. IEEE Trans. Pattern Anal. Mach. Intell., 26(10):1367–1372, 2004.
207
+
208
+ Zihang Dai, Zhilin Yang, Yiming Yang, Jaime G. Carbonell, Quoc Viet Le, and Ruslan Salakhutdinov. Transformer-xl: Attentive language models beyond a fixed-length context. In ACL, pp. 2978–2988, 2019.
209
+
210
+ Michele Gori, Gabriele Monfardini, and Franco Scarselli. A new model for learning in graph domains. IJCNN, 2:729–734, 2005.
211
+
212
+ Alex Graves, Greg Wayne, Malcolm Reynolds, Tim Harley, Ivo Danihelka, Agnieszka GrabskaBarwinska, Sergio Gomez Colmenarejo, Edward Grefenstette, Tiago Ramalho, John Agapiou, Adria Puigdom \` enech Badia, Karl Moritz Hermann, Yori Zwols, Georg Ostrovski, Adam Cain, \` Helen King, Christopher Summerfield, Phil Blunsom, Koray Kavukcuoglu, and Demis Hassabis. Hybrid computing using a neural network with dynamic external memory. Nature, 538(7626): 471–476, 2016.
213
+
214
+ Aditya Grover and Jure Leskovec. node2vec: Scalable feature learning for networks. In SIGKDD, pp. 855–864, 2016.
215
+
216
+ William L. Hamilton, Rex Ying, and Jure Leskovec. Representation learning on graphs: Methods and applications. IEEE Data Eng. Bull., 40(3):52–74, 2017a.
217
+
218
+ William L. Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In NIPS, pp. 1024–1034, 2017b.
219
+
220
+ Wook-Shin Han, Jinsoo Lee, and Jeong-Hoon Lee. Turboiso: towards ultrafast and robust subgraph isomorphism search in large graph databases. In SIGMOD, pp. 337–348, 2013.
221
+
222
+ Huahai He and Ambuj K. Singh. Graphs-at-a-time: query language and access methods for graph databases. In SIGMOD, pp. 405–418, 2008.
223
+
224
+ Jun Huan, Wei Wang, and Jan F. Prins. Efficient mining of frequent subgraphs in the presence of isomorphism. In ICDM, pp. 549–552, 2003.
225
+ Yoon Kim. Convolutional neural networks for sentence classification. In EMNLP, pp. 1746–1751, 2014.
226
+ Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017.
227
+ Ankit Kumar, Ozan Irsoy, Peter Ondruska, Mohit Iyyer, James Bradbury, Ishaan Gulrajani, Victor Zhong, Romain Paulus, and Richard Socher. Ask me anything: Dynamic memory networks for natural language processing. In ICML, pp. 1378–1387, 2016.
228
+ Michihiro Kuramochi and George Karypis. GREW-A scalable frequent subgraph discovery algorithm. In ICDM, pp. 439–442, 2004.
229
+ Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard S. Zemel. Gated graph sequence neural networks. In ICLR, 2016.
230
+ R. Milo, S. Shen-Orr, S. Itzkovitz, N. Kashtan, D. Chklovskii, and U. Alon. Network motifs: simple building blocks of complex networks. Science, 298(5594):824–827, October 2002.
231
+ Mathias Niepert, Mohamed Ahmed, and Konstantin Kutzkov. Learning convolutional neural networks for graphs. In ICML, pp. 2014–2023, 2016.
232
+ Bryan Perozzi, Rami Al-Rfou, and Steven Skiena. Deepwalk: online learning of social representations. In SIGKDD, pp. 701–710, 2014.
233
+ Franco Scarselli, Sweah Liang Yong, Marco Gori, Markus Hagenbuchner, Ah Chung Tsoi, and Marco Maggini. Graph neural networks for ranking web pages. In Web Intelligence, pp. 666– 672. IEEE Computer Society, 2005.
234
+ Michael Sejr Schlichtkrull, Thomas N. Kipf, Peter Bloem, Rianne van den Berg, Ivan Titov, and Max Welling. Modeling relational data with graph convolutional networks. In The Semantic Web - International Conference, ESWC, pp. 593–607, 2018.
235
+ Nino Shervashidze, Pascal Schweitzer, Erik Jan van Leeuwen, Kurt Mehlhorn, and Karsten M. Borgwardt. Weisfeiler-lehman graph kernels. J. Mach. Learn. Res., 12:2539–2561, 2011.
236
+ Sainbayar Sukhbaatar, Arthur Szlam, Jason Weston, and Rob Fergus. End-to-end memory networks. In NIPS, pp. 2440–2448, 2015.
237
+ Zhao Sun, Hongzhi Wang, Haixun Wang, Bin Shao, and Jianzhong Li. Efficient subgraph matching on billion node graphs. PVLDB, 5(9):788–799, 2012.
238
+ Jian Tang, Meng Qu, Mingzhe Wang, Ming Zhang, Jun Yan, and Qiaozhu Mei. LINE: large-scale information network embedding. In WWW, pp. 1067–1077, 2015.
239
+ Matteo Togninalli, M. Elisabetta Ghisu, Felipe Llinares-Lopez, Bastian Rieck, and Karsten M. ´ Borgwardt. Wasserstein weisfeiler-lehman graph kernels. In NeurIPS, 2019.
240
+ Julian R. Ullmann. An algorithm for subgraph isomorphism. J. ACM, 23(1):31–42, 1976.
241
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NIPS, pp. 5998–6008, 2017.
242
+ Petar Velickovic, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua \` Bengio. Graph attention networks. In ICLR, 2018.
243
+ S. V. N. Vishwanathan, Nicol N. Schraudolph, Risi Kondor, and Karsten M. Borgwardt. Graph kernels. J. Mach. Learn. Res., 11:1201–1242, 2010.
244
+ Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In ICLR, 2019.
245
+
246
+ Xifeng Yan and Jiawei Han. gspan: Graph-based substructure pattern mining. In ICDM, pp. 721– 724, 2002.
247
+
248
+ Xifeng Yan, Philip S. Yu, and Jiawei Han. Graph indexing: A frequent structure-based approach. In SIGMOD, pp. 335–346, 2004.
249
+
250
+ Pinar Yanardag and S. V. N. Vishwanathan. Deep graph kernels. In KDD, pp. 1365–1374. ACM, 2015.
251
+
252
+ Jiaxuan You, Rex Ying, Xiang Ren, William L. Hamilton, and Jure Leskovec. Graphrnn: Generating realistic graphs with deep auto-regressive models. In ICML, pp. 5694–5703, 2018.
253
+
254
+ # A LEXICOGRAPHIC ORDER OF CODES
255
+
256
+ The lexicographic order is a linear order defined as follows:
257
+
258
+ If $A = ( a _ { 0 } , a _ { 1 } , \cdot \cdot \cdot , a _ { m } )$ and $B = ( b _ { 0 } , b _ { 1 } , \cdot \cdot \cdot , b _ { n } ) $ are the codes, then $A \le B$ iff either of the following is true:
259
+
260
+ 1 $. \ \exists t , 0 \leq t \leq m i n ( m , n ) , \forall k < t , a _ { k } = b _ { k } , a _ { t } \prec _ { e } b _ { t } ,$
261
+ 2. $\forall 0 \leq k \leq m , a _ { k } = b _ { k }$ , and $n \geq m$ .
262
+
263
+ In our setting, $a _ { i } = ( u _ { a _ { i } } , v _ { a _ { i } } , \mathcal { X } ( u _ { a _ { i } } ) , y _ { a _ { i } } , \mathcal { X } ( v _ { a _ { i } } ) ) \prec _ { e } b _ { j } = ( u _ { b _ { j } } , v _ { b _ { j } } , \mathcal { X } ( u _ { b _ { j } } ) , y _ { b _ { j } } , \mathcal { X } ( v _ { b _ { j } } ) )$ iff one of the following is true:
264
+
265
+ 1. $u _ { a _ { i } } < u _ { b _ { j } }$ ,
266
+ 2. $u _ { a _ { i } } = u _ { b _ { j } } , v _ { a _ { i } } < v _ { b _ { j } }$ ,
267
+ 3. $u _ { a _ { i } } = u _ { b _ { j } } , v _ { a _ { i } } = v _ { b _ { j } } , y _ { a _ { i } } < y _ { b _ { j } }$ .
268
+
269
+ # B PATTERN GENERATOR AND GRAPH GENERATOR
270
+
271
+ As proposed in Section 5.1, two generators are required to generate datasets. The algorithm about the pattern generator is shown in Algorithm 1. The algorithm first uniformly generates a directed tree. Then it adds the remaining edges with random labels. Vertex labels and edge labels are also uniformly generated but each label is required to appear at least once. Algorithm 2 shows the process of graph generation. Two hyperparameters control the density of subisomorphisms: (1) $\alpha \in [ 0 , 1 ]$ decides the probability of adding subisomorphisms rather than random edges; (2) $\beta \in \mathbb { N } ^ { + }$ is the parameter of Dirichlet distribution to sample sizes of components. After generating several directed trees and satisfying the vertex number requirement, the algorithm starts to add remaining edges. It can add edges in one component and try to add subgraph isomorphisms, or it can randomly add edges between two components or in one component. The following merge subroutine aims to merge these components into a large graph. Shuffling is also required to make datasets hard to be hacked. The search of subisomorphisms in the whole graph is equivalent to the search in components respectively because edges between any two components do not satisfy the necessary conditions.
272
+
273
+ # Algorithm 1 Pattern Generator.
274
+
275
+ Input: the number of vertices $N _ { v }$ , the number of edges $N _ { e }$ , the number of vertex labels $L _ { v }$ , the number of edge labels $L _ { e }$ .
276
+ 1: $\mathcal { P } : =$ GenerateDirectedTree $( N _ { v } )$
277
+ 2: AssignNodesLabels $( \mathcal { P } , L _ { v } )$
278
+ 3: AddRandomEdges( $\mathcal { P }$ , $\mathcal { P }$ , null, $N _ { e } - N _ { v } + 1 )$
279
+ 4: AssignEdgesLabels $( \mathcal { P } , L _ { e } )$
280
+
281
+ Output: the generated pattern $\mathcal { P }$
282
+
283
+ In Algorithm 1 and Algorithm 2, the function AddRandomEdges adds required edges from one component to the other without generating new subgraph isomorphisms. The two component can also be the same one, which means to add in one component. The NEC tree is utilized in TurboISO (Han et al., 2013) to explore the candidate region for further matching. It takes $\mathcal { O } ( | \mathcal { V } _ { p } | ^ { 2 } )$ time but can significant reduce the searching space in the data graph. It records the equivalence classes and necessary conditions of the pattern. We make sure edges between two components dissatisfy necessary conditions in the NEC tree when adding random edges between them. This data structure and this idea help us to generate more data and search subisomorphisms compared with random generation and traditional subgraph isomorphism searching.
284
+
285
+ # C DETAILS OF DATASETS
286
+
287
+ We can generate as many examples as possible using two graph generators. However, we limit the numbers of training, dev, and test examples whether learning based models can generalize to
288
+
289
+ # Algorithm 2 Graph Generator.
290
+
291
+ Input: a pattern $\mathcal { P }$ , the number of vertices $N _ { v }$ , the number of edges $N _ { e }$ , the number of vertex labels
292
+ $L _ { v }$ , the number of edge labels $L _ { e }$ , hyperparameters $\alpha$ and $\beta$ .
293
+ 1: $N s : =$ DirichletSampling $( N _ { v } , \beta )$
294
+ 2: $\mathcal { G } s : = \{ \}$
295
+ 3: $d _ { e } : = N _ { e }$
296
+ 4: for each $n$ in $N s$ do
297
+ 5: $g : =$ GenerateDirectedTree $( n )$
298
+ 6: AssignNodesLabels $( g , n )$
299
+ 7: AssignEdgesLabels $( g , n - 1 )$
300
+ 8: $\begin{array} { l } { { \mathcal G s : = \mathcal G s + \{ g \} } } \\ { { d _ { e } : = d _ { e } - n + 1 } } \end{array}$
301
+ 9:
302
+ 10: end for
303
+ 11: $T _ { p } : = \mathrm { R e w r i t e N E C T r e e } ( \mathcal { P } )$
304
+ 12: $N _ { e , \mathcal { P } } : = \mathrm { E d g e C o u n t } ( \mathcal { P } )$
305
+ 13: while $d _ { e } > 0$ do
306
+ 14: $g _ { 1 } , g _ { 2 } = \mathrm { R a n d o m P i c k } ( \mathcal { G } s , 2 )$ $\triangleright$ Pick two components randomly
307
+ 15: $r =$ RandomNum(0, 1)
308
+ 16: if $d _ { e } < N _ { e , \mathcal { P } }$ then
309
+ 17: $d _ { e } : = d _ { e }$ - AddRandomEdges $( g _ { 1 } , g _ { 2 } , T _ { p } , d _ { e } )$ $\triangleright$ Add $d _ { e }$ edges between $g _ { 1 }$ and $g _ { 2 }$
310
+ 18: else
311
+ 19: if $r < \alpha$ then
312
+ 20: de := de - AddPatterns $( g _ { 1 } , \mathcal { P } )$ $\triangleright$ Add necessary edges in $g _ { 1 }$ to add patterns
313
+ 21: else
314
+ 22: $d _ { e } : = d _ { e } - \mathrm { A d d R a n d o m E d g e s } ( g _ { 1 } , g _ { 2 } , T _ { p } , N _ { e , \mathcal { P } } )$
315
+ 23: end if
316
+ 24: end if
317
+ 25: end while
318
+ 26: $\mathcal { G }$ , $f : =$ MergeComponents $( \mathcal G s )$ $\triangleright f$ is the graph id mapping
319
+ 27: $\mathcal { G }$ , $f ^ { \prime } : =$ ShuffleGraph $( { \mathcal { G } } )$ . $f ^ { \prime }$ is the shuffled graph id mapping
320
+ 28 : $\mathit { T s } : = \{ \}$
321
+ 29: for each $g$ in $\mathcal { G } s$ do
322
+ 30: $I s : =$ SearchSubIsomorphisms $( g , \mathcal { P } )$
323
+ 31: for each $I$ in $I s$ do
324
+ 32: 33: $\begin{array} { l } { I : = \mathrm { U p d a t e I D } ( I , f , f ^ { \prime } ) } \\ { \mathcal { T } s : = \mathcal { T } s + \{ I \} } \end{array}$
325
+ 34: end for
326
+ 35: end for
327
+ Output: the generated graph $\mathcal { G }$ , the subgraph isomorphisms $\boldsymbol { \mathcal { T } s }$
328
+
329
+ new unseen examples. Pattern and data graphs in different scales have been generated. Parameters for two generators and constraints are listed in Table 4. Two constraints are added to make this task easier. The average degree constraint $( \frac { N _ { e } } { N _ { v } } ~ \leq ~ 4 )$ is used to keep graphs not so dense, and the subisomorphism counting constraints $\{ c \in \mathbb { N } | c \leq 1 0 2 4 \}$ for small, $\{ c \in \mathbb { N } | c \leq 4 0 9 6 \}$ for large) ensure the difficulty of two datasets are different.
330
+
331
+ We use a server with an 8-core Intel E5-2620v4 CPU (16 threads) and 512GB RAM to generate and record running time in parallel. The distributions of countings of two datasets are shown in Figure 6. From the figure we can see that both datasets follow the long tail distributions.
332
+
333
+ # D MORE IMPLEMENTATION DETAILS
334
+
335
+ In this section, we provide more implementation details other than the representation architectures and the DIAMNet modules.
336
+
337
+ Table 4: Parameters and constraints for two datasets
338
+
339
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Hyperparameters</td><td rowspan=1 colspan=1>small</td><td rowspan=1 colspan=1>large</td></tr><tr><td rowspan=1 colspan=1>riener</td><td rowspan=1 colspan=1>NuNeLuLe</td><td rowspan=1 colspan=1>{3,4,8}{2,4,8}{2,4,8}{2,4,8}</td><td rowspan=1 colspan=1>{3,4,8,16}{2,4,8,16}{2,4,8,16}{2,4,8, 16}</td></tr><tr><td rowspan=1 colspan=1>Cdeeg</td><td rowspan=1 colspan=1>NuNeLuLeαβ</td><td rowspan=1 colspan=1>{8,16,32, 64}{8,16,... ,256}{4,8,16}{4,8,16}{0.1,0.2,... , 0.8}{512}</td><td rowspan=1 colspan=1>{64, 128,256, 512}{64,128, .·· ,2,048}{16,32,64}{16,32,64}{0.05, 0.1, 0.15}{512}</td></tr></table>
340
+
341
+ ![](images/4fdbc51b1ef0e62b41929b1e19f7f6b4046eb941a6e551d5f4a28216b76b7766.jpg)
342
+ Figure 6: Subgraph isomorphism counting distributions of two datasets.
343
+
344
+ # D.1 FILTER NETWORK
345
+
346
+ Intuitively, not all vertices and edges in graphs can match certain subisomorphisms so we simply add a FilterNet to adjust graph encoding as follows:
347
+
348
+ $$
349
+ \begin{array} { r l } & { \overline { { \pmb { p } } } = M a x P o o l ( \pmb { P } ) , } \\ & { \hat { \pmb { G } } = \pmb { G } \pmb { W } _ { G } ^ { \top } , } \\ & { \pmb { f } _ { i } = \sigma \big ( \pmb { W } _ { F } ( \hat { \pmb { G } } _ { i , : } \odot \overline { { \pmb { p } } } ) \big ) , } \\ & { \pmb { G } _ { i , : } = \pmb { f } _ { i } \odot \pmb { G } _ { i , : } , } \end{array}
350
+ $$
351
+
352
+ where $\widehat { G }$ is the graph representation in the pattern space, $\sigma$ is the sigmoid function, $f _ { i }$ is the gate bthat decides to filter the ${ \bf { \dot { j } } } ^ { t h }$ vertex or the ${ j ^ { t h } } ^ { \star }$ edge, $\dot { W } _ { G } \in \mathbb { R } ^ { d _ { p } \times d _ { g } }$ and $W _ { F } \in \mathbb { R } ^ { 1 \times d _ { p } }$ are trainable. Thanks to the multi-hot encoding, We can simply use Eq. (7) to accumulate label information of patterns. After this filter layer, only relevant parts of the graphs will be passed to the next representation layer.
353
+
354
+ # D.2 ATTNPOOL
355
+
356
+ The computation process of the AttnPool (Mean) is:
357
+
358
+ $$
359
+ \begin{array} { l } { \check { p } = M e a n P o o l ( \check { P } ) , } \\ { \check { g } = M u l t i H e a d ( \widetilde { p } , \check { G } , \check { G } ) . } \end{array}
360
+ $$
361
+
362
+ Combing with the pooling strategy to make $\check { P }$ as $\widetilde { P } \in \mathbb { R } ^ { 1 \times d }$ , the time complexity is decreased to $\mathcal { O } ( | \mathcal { V } _ { P } | + | \mathcal { V } _ { G } | )$ or $\mathcal { O } ( | \mathcal { E } _ { P } | + | \bar { \mathcal { E } _ { G } } | )$ . We also implement three variants with sum-pooling, mean
363
+
364
+ pooling, and max-pooling respectively. Results of AttnPool (Sum) and AttnPool (Max) are shown in the Appendix E.
365
+
366
+ # D.3 DIAMNET INITIALIZATION
367
+
368
+ There are many ways to initialize the memory $\{ \pmb { m } _ { 1 } ^ { ( 0 ) } , \cdot \cdot \cdot , \pmb { m } _ { M } ^ { ( 0 ) } \}$ . In experiments, we simply initialize m(0i by
369
+
370
+ $$
371
+ \begin{array} { r } { \begin{array} { c } { s = \lfloor \frac { | \mathcal { V } _ { G } | } { M } \rfloor , } \\ { k = | \mathcal { V } _ { G } | - ( M - 1 ) \cdot s , } \\ { m _ { i } ^ { ( 0 ) } = M e a n P o o l ( \{ \check { G } _ { i \cdot s } , \cdots , \check { G } _ { i \cdot s + k - 1 } \} ) , } \end{array} } \end{array}
372
+ $$
373
+
374
+ where $s$ is the stride and $k$ is the kernel size. In Table 5, we compared two additional pooling methods with MeanPool in Eq. (15).
375
+
376
+ Table 5: Detailed results of different models with different predict networks on the small dataset.
377
+
378
+ <table><tr><td rowspan=2 colspan=2>Models</td><td rowspan=2 colspan=10>TestRMSE MAE Pzero Rzero F1zero Pnonzero Rnonzero F1nonzero</td></tr><tr><td rowspan=1 colspan=1>Pzero</td><td rowspan=1 colspan=1>Rzero</td><td rowspan=1 colspan=1>F1zero</td><td rowspan=1 colspan=1>Pnonzero</td><td rowspan=1 colspan=1>Rnonzero</td><td rowspan=1 colspan=1>F1nonzero</td></tr><tr><td rowspan=2 colspan=2>SumPoolMeanPool</td><td rowspan=1 colspan=1>55.429</td><td rowspan=1 colspan=3>11.057</td><td rowspan=1 colspan=1>0.997</td><td rowspan=1 colspan=1>0.678</td><td rowspan=1 colspan=1>0.807</td><td rowspan=1 colspan=1>0.249</td><td rowspan=1 colspan=1>0.980</td><td rowspan=1 colspan=1>0.397</td></tr><tr><td rowspan=1 colspan=1>57.298</td><td rowspan=1 colspan=3>10.517</td><td rowspan=1 colspan=1>0.999</td><td rowspan=1 colspan=1>0.697</td><td rowspan=1 colspan=1>0.821</td><td rowspan=1 colspan=1>0.312</td><td rowspan=1 colspan=1>0.995</td><td rowspan=1 colspan=1>0.475</td></tr><tr><td rowspan=7 colspan=2>MaxPoolAttnPool (Sum)CNN AttnPool (Mean)AttnPool (Max)DIAMNet (SumInit)DIAMNet (MeanInit)DIAMNet (MaxInit)</td><td rowspan=1 colspan=1>47.353</td><td rowspan=1 colspan=3>11.212</td><td rowspan=1 colspan=1>0.993</td><td rowspan=1 colspan=1>0.715</td><td rowspan=1 colspan=1>0.832</td><td rowspan=1 colspan=1>0.372</td><td rowspan=1 colspan=1>0.973</td><td rowspan=1 colspan=1>0.539</td></tr><tr><td rowspan=1 colspan=1>57.800</td><td rowspan=1 colspan=3>15.642</td><td rowspan=1 colspan=1>0.753</td><td rowspan=1 colspan=1>0.825</td><td rowspan=1 colspan=1>0.787</td><td rowspan=1 colspan=1>0.747</td><td rowspan=1 colspan=1>0.655</td><td rowspan=1 colspan=1>0.698</td></tr><tr><td rowspan=1 colspan=1>55.963</td><td rowspan=1 colspan=3>12.717</td><td rowspan=1 colspan=1>0.991</td><td rowspan=1 colspan=1>0.665</td><td rowspan=1 colspan=1>0.796</td><td rowspan=1 colspan=1>0.207</td><td rowspan=1 colspan=1>0.937</td><td rowspan=1 colspan=1>0.340</td></tr><tr><td rowspan=1 colspan=1>57.102</td><td rowspan=1 colspan=3>11.196</td><td rowspan=1 colspan=1>0.989</td><td rowspan=1 colspan=1>0.682</td><td rowspan=1 colspan=1>0.807</td><td rowspan=1 colspan=1>0.267</td><td rowspan=1 colspan=1>0.936</td><td rowspan=1 colspan=1>0.416</td></tr><tr><td rowspan=1 colspan=1>43.312</td><td rowspan=1 colspan=3>10.284</td><td rowspan=1 colspan=1>0.900</td><td rowspan=1 colspan=1>0.871</td><td rowspan=1 colspan=1>0.885</td><td rowspan=1 colspan=1>0.789</td><td rowspan=1 colspan=1>0.833</td><td rowspan=1 colspan=1>0.810</td></tr><tr><td rowspan=1 colspan=1>34.448</td><td rowspan=1 colspan=3>6.953</td><td rowspan=1 colspan=1>0.980</td><td rowspan=1 colspan=1>0.805</td><td rowspan=1 colspan=1>0.884</td><td rowspan=1 colspan=1>0.623</td><td rowspan=1 colspan=1>0.952</td><td rowspan=1 colspan=1>0.753</td></tr><tr><td rowspan=1 colspan=1>35.055</td><td rowspan=1 colspan=3>7.188</td><td rowspan=1 colspan=1>0.980</td><td rowspan=1 colspan=1>0.802</td><td rowspan=1 colspan=1>0.882</td><td rowspan=1 colspan=1>0.617</td><td rowspan=1 colspan=1>0.951</td><td rowspan=1 colspan=1>0.748</td></tr><tr><td rowspan=9 colspan=2>SumPoolMeanPoolMaxPoolAttnPool (Sum)RNN AttnPool (Mean)AttnPool (Max)DIAMNet (SumInit)DIAMNet (MeanInit)DIAMNet (MaxInit)</td><td rowspan=1 colspan=1>29.955</td><td rowspan=2 colspan=3>5.7406.447</td><td rowspan=1 colspan=1>0.979</td><td rowspan=1 colspan=1>0.846</td><td rowspan=1 colspan=1>0.908</td><td rowspan=1 colspan=1>0.717</td><td rowspan=1 colspan=1>0.956</td><td rowspan=1 colspan=1>0.819</td></tr><tr><td rowspan=1 colspan=1>31.010</td><td rowspan=1 colspan=1>0.971</td><td rowspan=1 colspan=1>0.859</td><td rowspan=1 colspan=1>0.912</td><td rowspan=1 colspan=1>0.746</td><td rowspan=1 colspan=1>0.942</td><td rowspan=1 colspan=1>0.833</td></tr><tr><td rowspan=1 colspan=1>30.824</td><td rowspan=1 colspan=3>6.236</td><td rowspan=1 colspan=1>0.994</td><td rowspan=1 colspan=1>0.771</td><td rowspan=1 colspan=1>0.869</td><td rowspan=1 colspan=1>0.532</td><td rowspan=1 colspan=1>0.982</td><td rowspan=1 colspan=1>0.690</td></tr><tr><td rowspan=1 colspan=1>32.481</td><td rowspan=1 colspan=3>6.262</td><td rowspan=1 colspan=1>0.977</td><td rowspan=1 colspan=1>0.853</td><td rowspan=1 colspan=1>0.911</td><td rowspan=1 colspan=1>0.733</td><td rowspan=1 colspan=1>0.953</td><td rowspan=1 colspan=1>0.829</td></tr><tr><td rowspan=1 colspan=1>31.857</td><td rowspan=1 colspan=3>6.025</td><td rowspan=1 colspan=1>0.985</td><td rowspan=1 colspan=1>0.827</td><td rowspan=1 colspan=1>0.899</td><td rowspan=1 colspan=1>0.672</td><td rowspan=1 colspan=1>0.967</td><td rowspan=1 colspan=1>0.793</td></tr><tr><td rowspan=1 colspan=1>41.186</td><td rowspan=1 colspan=3>11.011</td><td rowspan=1 colspan=1>0.948</td><td rowspan=1 colspan=1>0.888</td><td rowspan=1 colspan=1>0.917</td><td rowspan=1 colspan=1>0.811</td><td rowspan=1 colspan=1>0.908</td><td rowspan=1 colspan=1>0.857</td></tr><tr><td rowspan=1 colspan=1>29.682</td><td rowspan=1 colspan=3>5.632</td><td rowspan=1 colspan=1>0.925</td><td rowspan=1 colspan=1>0.949</td><td rowspan=1 colspan=1>0.937</td><td rowspan=1 colspan=1>0.921</td><td rowspan=1 colspan=1>0.885</td><td rowspan=1 colspan=1>0.903</td></tr><tr><td rowspan=1 colspan=1>29.743</td><td rowspan=1 colspan=3>5.547</td><td rowspan=1 colspan=1>0.948</td><td rowspan=1 colspan=1>0.907</td><td rowspan=1 colspan=1>0.927</td><td rowspan=1 colspan=1>0.846</td><td rowspan=1 colspan=1>0.911</td><td rowspan=1 colspan=1>0.877</td></tr><tr><td rowspan=1 colspan=1>29.778</td><td rowspan=1 colspan=3>5.827</td><td rowspan=1 colspan=1>0.951</td><td rowspan=1 colspan=1>0.926</td><td rowspan=1 colspan=1>0.938</td><td rowspan=1 colspan=1>0.879</td><td rowspan=1 colspan=1>0.919</td><td rowspan=1 colspan=1>0.899</td></tr><tr><td rowspan=9 colspan=2>SumPoolMeanPoolMaxPoolAttnPool (Sum)TXL AttnPool (Mean)AttnPool (Max)DIAMNet (SumInit)DIAMNet (MeanInit)DIAMNet (MaxInit)</td><td rowspan=2 colspan=1>34.39132.569</td><td rowspan=2 colspan=3>7.0426.656</td><td rowspan=2 colspan=1>0.9760.972</td><td rowspan=1 colspan=1>0.833</td><td rowspan=1 colspan=1>0.899</td><td rowspan=1 colspan=1>0.690</td><td rowspan=1 colspan=1>0.947</td><td rowspan=1 colspan=1>0.798</td></tr><tr><td rowspan=1 colspan=1>0.808</td><td rowspan=1 colspan=1>0.882</td><td rowspan=1 colspan=1>0.632</td><td rowspan=1 colspan=1>0.935</td><td rowspan=1 colspan=1>0.754</td></tr><tr><td rowspan=1 colspan=1>65.152</td><td rowspan=1 colspan=3>30.289</td><td rowspan=1 colspan=1>0.406</td><td rowspan=1 colspan=1>0.965</td><td rowspan=1 colspan=1>0.572</td><td rowspan=1 colspan=1>0.977</td><td rowspan=1 colspan=1>0.509</td><td rowspan=1 colspan=1>0.669</td></tr><tr><td rowspan=1 colspan=1>55.166</td><td rowspan=1 colspan=3>12.748</td><td rowspan=1 colspan=1>0.870</td><td rowspan=1 colspan=1>0.832</td><td rowspan=1 colspan=1>0.851</td><td rowspan=1 colspan=1>0.721</td><td rowspan=1 colspan=1>0.778</td><td rowspan=1 colspan=1>0.748</td></tr><tr><td rowspan=1 colspan=1>37.721</td><td rowspan=1 colspan=3>7.426</td><td rowspan=1 colspan=1>0.965</td><td rowspan=1 colspan=1>0.790</td><td rowspan=1 colspan=1>0.869</td><td rowspan=1 colspan=1>0.592</td><td rowspan=1 colspan=1>0.914</td><td rowspan=1 colspan=1>0.719</td></tr><tr><td rowspan=2 colspan=1>60.19632.659</td><td rowspan=2 colspan=3>18.9166.904</td><td rowspan=1 colspan=1>0.529</td><td rowspan=1 colspan=1>0.892</td><td rowspan=1 colspan=1>0.664</td><td rowspan=1 colspan=1>0.898</td><td rowspan=1 colspan=1>0.545</td><td rowspan=1 colspan=1>0.679</td></tr><tr><td rowspan=1 colspan=1>0.907</td><td rowspan=1 colspan=1>0.940</td><td rowspan=1 colspan=1>0.923</td><td rowspan=1 colspan=1>0.908</td><td rowspan=1 colspan=1>0.861</td><td rowspan=1 colspan=1>0.884</td></tr><tr><td rowspan=1 colspan=1>31.649</td><td rowspan=1 colspan=3>6.680</td><td rowspan=1 colspan=1>0.961</td><td rowspan=1 colspan=1>0.847</td><td rowspan=1 colspan=1>0.900</td><td rowspan=1 colspan=1>0.725</td><td rowspan=1 colspan=1>0.921</td><td rowspan=1 colspan=1>0.811</td></tr><tr><td rowspan=1 colspan=1>37.877</td><td rowspan=1 colspan=3>8.317</td><td rowspan=1 colspan=1>0.914</td><td rowspan=1 colspan=1>0.884</td><td rowspan=1 colspan=1>0.899</td><td rowspan=1 colspan=1>0.810</td><td rowspan=1 colspan=1>0.856</td><td rowspan=1 colspan=1>0.832</td></tr><tr><td rowspan=9 colspan=2>SumPoolMeanPoolMaxPoolAttnPool (Sum)RGCN AttnPool (Mean)AttnPool (Max)DIAMNet (SumInit)DIAMNet (MeanInit)DIAMNet (MaxInit)</td><td rowspan=1 colspan=1>32.414</td><td rowspan=2 colspan=3>6.5787.152</td><td rowspan=2 colspan=1>0.9840.981</td><td rowspan=1 colspan=1>0.829</td><td rowspan=1 colspan=1>0.900</td><td rowspan=1 colspan=1>0.677</td><td rowspan=1 colspan=1>0.965</td><td rowspan=1 colspan=1>0.796</td></tr><tr><td rowspan=1 colspan=1>33.829</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>0.795</td><td rowspan=1 colspan=1>0.878</td><td rowspan=1 colspan=1>0.599</td><td rowspan=1 colspan=1>0.951</td><td rowspan=1 colspan=1>0.735</td></tr><tr><td rowspan=1 colspan=1>50.851</td><td rowspan=1 colspan=2>9.707</td><td rowspan=1 colspan=1>707</td><td></td><td rowspan=1 colspan=1>0.982</td><td rowspan=1 colspan=1>0.780</td><td rowspan=1 colspan=1>0.869</td><td rowspan=1 colspan=1>0.559</td><td rowspan=1 colspan=1>0.952</td><td rowspan=1 colspan=1>0.704</td></tr><tr><td rowspan=1 colspan=1>33.816</td><td rowspan=1 colspan=1>6.</td><td rowspan=1 colspan=2>6.834</td><td rowspan=1 colspan=1>0.991</td><td rowspan=1 colspan=1>0.809</td><td rowspan=1 colspan=1>0.890</td><td rowspan=1 colspan=1>0.628</td><td rowspan=1 colspan=1>0.977</td><td rowspan=1 colspan=1>0.764</td></tr><tr><td rowspan=1 colspan=1>32.526</td><td rowspan=1 colspan=2>6.523</td><td rowspan=1 colspan=1>23</td><td rowspan=1 colspan=1>0.994</td><td rowspan=1 colspan=1>0.774</td><td rowspan=1 colspan=1>0.870</td><td rowspan=1 colspan=1>0.540</td><td rowspan=1 colspan=1>0.982</td><td rowspan=1 colspan=1>0.697</td></tr><tr><td rowspan=1 colspan=1>42.970</td><td rowspan=2 colspan=3>8.8505.688</td><td rowspan=1 colspan=1>0.964</td><td rowspan=1 colspan=1>0.847</td><td rowspan=1 colspan=1>0.902</td><td rowspan=1 colspan=1>0.724</td><td rowspan=1 colspan=1>0.928</td><td rowspan=1 colspan=1>0.813</td></tr><tr><td rowspan=1 colspan=1>29.459</td><td rowspan=1 colspan=1>0.964</td><td rowspan=1 colspan=1>0.871</td><td rowspan=1 colspan=1>0.915</td><td rowspan=1 colspan=1>0.772</td><td rowspan=1 colspan=1>0.931</td><td rowspan=1 colspan=1>0.844</td></tr><tr><td rowspan=1 colspan=1>28.712</td><td rowspan=1 colspan=3>5.782</td><td rowspan=1 colspan=1>0.924</td><td rowspan=1 colspan=1>0.912</td><td rowspan=1 colspan=1>0.918</td><td rowspan=1 colspan=1>0.859</td><td rowspan=1 colspan=1>0.877</td><td rowspan=1 colspan=1>0.868</td></tr><tr><td rowspan=1 colspan=1>29.345</td><td rowspan=1 colspan=3>5.501</td><td rowspan=1 colspan=1>0.937</td><td rowspan=1 colspan=1>0.918</td><td rowspan=1 colspan=1>0.927</td><td rowspan=1 colspan=1>0.866</td><td rowspan=1 colspan=1>0.896</td><td rowspan=1 colspan=1>0.881</td></tr><tr><td rowspan=9 colspan=2>SumPoolMeanPoolMaxPoolAttnPool (Sum)RGCN-SUM AttnPool (Mean)AttnPool (Max)DIAMNet (SumInit)DIAMNet (MeanInit)DIAMNet (MaxInit)</td><td rowspan=2 colspan=1>22.37922.483</td><td rowspan=2 colspan=3>3.9584.254</td><td rowspan=2 colspan=1>0.9880.987</td><td rowspan=1 colspan=1>0.860</td><td rowspan=1 colspan=1>0.920</td><td rowspan=1 colspan=1>0.746</td><td rowspan=1 colspan=1>0.974</td><td rowspan=1 colspan=1>0.845</td></tr><tr><td rowspan=1 colspan=1>0.833</td><td rowspan=1 colspan=1>0.903</td><td rowspan=1 colspan=1>0.685</td><td rowspan=1 colspan=1>0.971</td><td rowspan=1 colspan=1>0.803</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=3 colspan=1>42.43423.21424.875</td><td rowspan=3 colspan=3>7.9004.1495.131</td><td rowspan=1 colspan=1>0.994</td><td rowspan=1 colspan=1>0.780</td><td rowspan=1 colspan=1>0.874</td><td rowspan=1 colspan=1>0.554</td><td rowspan=1 colspan=1>0.984</td><td rowspan=1 colspan=1>0.709</td></tr><tr><td rowspan=1 colspan=1>0.992</td><td rowspan=1 colspan=1>0.830</td><td rowspan=1 colspan=1>0.904</td><td rowspan=1 colspan=1>0.679</td><td rowspan=1 colspan=1>0.981</td><td rowspan=1 colspan=1>0.802</td></tr><tr><td rowspan=1 colspan=1>0.998</td><td rowspan=1 colspan=1>0.725</td><td rowspan=1 colspan=1>0.840</td><td rowspan=1 colspan=1>0.399</td><td rowspan=1 colspan=1>0.991</td><td rowspan=1 colspan=1>0.569</td></tr><tr><td rowspan=2 colspan=1>35.03721.385</td><td rowspan=2 colspan=3>6.8453.811</td><td rowspan=1 colspan=1>0.987</td><td rowspan=1 colspan=1>0.794</td><td rowspan=1 colspan=1>0.880</td><td rowspan=1 colspan=1>0.593</td><td rowspan=1 colspan=1>0.967</td><td rowspan=1 colspan=1>0.735</td></tr><tr><td rowspan=1 colspan=1>0.962</td><td rowspan=1 colspan=1>0.886</td><td rowspan=1 colspan=1>0.922</td><td rowspan=1 colspan=1>0.803</td><td rowspan=1 colspan=1>0.930</td><td rowspan=1 colspan=1>0.862</td></tr><tr><td rowspan=2 colspan=1>21.73423.940</td><td rowspan=2 colspan=3>3.8534.156</td><td rowspan=1 colspan=1>0.964</td><td rowspan=1 colspan=1>0.887</td><td rowspan=1 colspan=1>0.924</td><td rowspan=1 colspan=1>0.804</td><td rowspan=1 colspan=1>0.934</td><td rowspan=1 colspan=1>0.864</td></tr><tr><td rowspan=1 colspan=1>0.966</td><td rowspan=1 colspan=1>0.882</td><td rowspan=1 colspan=1>0.922</td><td rowspan=1 colspan=1>0.794</td><td rowspan=1 colspan=1>0.937</td><td rowspan=1 colspan=1>0.860</td></tr><tr><td rowspan=2 colspan=2>ZeroAvg</td><td rowspan=2 colspan=1>67.19565.780</td><td rowspan=2 colspan=3>13.71621.986</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>0.614</td><td rowspan=1 colspan=1>0.761</td><td rowspan=1 colspan=1>0.0</td><td rowspan=1 colspan=1>0.0</td><td rowspan=1 colspan=1>0.0</td></tr><tr><td rowspan=1 colspan=1>0.0</td><td rowspan=1 colspan=1>0.0</td><td rowspan=1 colspan=1>0.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>0.386</td><td rowspan=1 colspan=1>0.557</td></tr><tr><td rowspan=1 colspan=2>VF2</td><td rowspan=1 colspan=1>0.0</td><td rowspan=1 colspan=3>0.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td></tr></table>
379
+
380
+ # E DETAILED RESULTS OF DIFFERENT PREDICTNETS
381
+
382
+ Simple pooling, attention based pooing, and attention with memory can be used to fuse pattern and graph representations in our framework. AttnPool (Sum) and AttnPool (Max) can be regarded as two variants of AttnPool (Mean) by replacing pooling methods. Table 5 shows results of different representation models with different interaction networks in the small dataset. AttnPool (Mean) and DIAMNet (MeanInit) usually perform better compared with other pooling methods.
383
+
384
+ # F FURTHER DISCUSSIONS
385
+
386
+ As shown in Figure 7, different interaction modules perform differently in different views. We can find MaxPool always predicts higher counting values when the pattern is small and the graph is large, while AttnPool always predicts very small numbers except when the pattern vertex size is 8, and the graph vertex size is 64. The same result appears when we use edge sizes as the x-axis. This observation shows that AttnPool has difficulties predicting counting values when either of the pattern and the graph is small. It shows that attention focuses more on the zero vector we added rather than the pattern pooling result. Our DIAMNet, however, performs the best in all pattern/graph sizes. When the bins are ordered by vertex label sizes or edge label sizes, the performance of all the three interaction modules among the distribution are similar. When bins are ordered by vertex label sizes, we have the same discovery that AttnPool prefers to predict zeros when then patterns are small. MaxPool fails when facing complex patterns with more vertex labels. DIAMNet also performs not so good over these patterns. As for edge labels, results look good for MaxPool and DIAMNet but AttnPool is not satisfactory.
387
+
388
+ As shown in Figure 8, different representation modules perform differently in different views. CNN performs badly when the graph size is large (shown in Figure 8a and 8d) and patterns become complicated (show in Figure $8 \mathrm { g }$ and 8j), which further indicates that CNN can only extract the local information and suffers from issues when global information is need in larger graphs. RNN, on the other hand, performs worse when the graph are large, especially when patterns are small (show in Figure 8e), which is consistent with its nature, intuitively. On the contrary, RGCN-SUM with DIAMNet is not affected by the edge sizes because it directly learns vertex representations rather than edge representations.
389
+
390
+ ![](images/da0627614a8e7dae61a9ef950141cb463782c0d94112c36705e27cef3807aa0b.jpg)
391
+ Figure 7: Model behaviors of three CNN based models on the small dataset. We compare MaxPool, AttnPool, and DIAMNet in four different view settings. Here $O _ { \nu }$ means that on the $\mathbf { X } ^ { } -$ -axis the bins are ordered by the size of pattern/graph vertex, $O \varepsilon$ by the size of edge, $O _ { X }$ by the size of vertex label, and $O _ { \mathcal { Y } }$ by the size of edge label. The orange color refers to the ground truth and the blue color refers to the predictions.
392
+
393
+ ![](images/c0c8703626cc72a84ae028b63e2840bf29a40b9e0e81c4b7907e81e401bc5985.jpg)
394
+ Figure 8: Model behaviors of three models on the large dataset. We compare CNN, RNN, and RGCN-SUM with our DIAMNet in four different view settings. Here $O _ { \nu }$ means that on the $\mathbf { X }$ -axis the bins are ordered by the size of pattern/graph vertex, $O \varepsilon$ by the size of edge, $O _ { X }$ by the size of vertex label, and $O _ { \mathcal { Y } }$ by the size of edge label. The orange color refers to the ground truth and the blue color refers to the predictions.
parse/train/HJx-akSKPS/HJx-akSKPS_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HJx-akSKPS/HJx-akSKPS_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/HJx-akSKPS/HJx-akSKPS_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hyg9anEFPS/Hyg9anEFPS.md ADDED
@@ -0,0 +1,294 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # IMAGE-GUIDED NEURAL OBJECT RENDERING
2
+
3
+ Justus Thies1, Michael Zollhofer ¨ 2, Christian Theobalt3, Marc Stamminger4, Matthias Nießner 1Technical University of Munich, 2Stanford University, 3Max-Planck-Institute for Informatics, 4University of Erlangen-Nuremberg
4
+
5
+ # ABSTRACT
6
+
7
+ We propose a learned image-guided rendering technique that combines the benefits of image-based rendering and GAN-based image synthesis. The goal of our method is to generate photo-realistic re-renderings of reconstructed objects for virtual and augmented reality applications (e.g., virtual showrooms, virtual tours & sightseeing, the digital inspection of historical artifacts). A core component of our work is the handling of view-dependent effects. Specifically, we directly train an object-specific deep neural network to synthesize the view-dependent appearance of an object. As input data we are using an RGB video of the object. This video is used to reconstruct a proxy geometry of the object via multi-view stereo. Based on this 3D proxy, the appearance of a captured view can be warped into a new target view as in classical image-based rendering. This warping assumes diffuse surfaces, in case of view-dependent effects, such as specular highlights, it leads to artifacts. To this end, we propose EffectsNet, a deep neural network that predicts view-dependent effects. Based on these estimations, we are able to convert observed images to diffuse images. These diffuse images can be projected into other views. In the target view, our pipeline reinserts the new view-dependent effects. To composite multiple reprojected images to a final output, we learn a composition network that outputs photo-realistic results. Using this image-guided approach, the network does not have to allocate capacity on “remembering” object appearance, instead it learns how to combine the appearance of captured images. We demonstrate the effectiveness of our approach both qualitatively and quantitatively on synthetic as well as on real data.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ In recent years, large progress has been made in 3D shape reconstruction of objects from photographs or depth streams. However, highly realistic re-rendering of such objects, e.g., in a virtual environment, is still very challenging. The reconstructed surface models and color information often exhibit inaccuracies or are comparably coarse (e.g., Izadi et al. (2011)). Many objects also exhibit strong view-dependent appearance effects, such as specularities. These effects not only frequently cause errors already during image-based shape reconstruction, but are also hard to reproduce when re-rendering an object from novel viewpoints. Static diffuse textures are frequently reconstructed for novel viewpoint synthesis, but these textures lack view-dependent appearance effects. Imagebased rendering (IBR) introduced variants of view-dependent texturing that blend input images on the shape (Buehler et al., 2001; Heigl et al., 1999; Carranza et al., 2003; Zheng et al., 2009). This enables at least coarse approximation of view-dependent effects. However, these approaches often produce ghosting artifacts due to view blending on inaccurate geometry, or artifacts at occlusion boundaries. Some algorithms reduce these artifacts by combining view blending and optical flow correction (Eisemann et al., 2008; Casas et al., 2015; Du et al., 2018), or by combining viewdependent blending with view-specific geometry (Chaurasia et al., 2013; Hedman et al., 2016) or geometry with soft 3D visibility like Penner & Zhang (2017). Hedman et al. (2018) reduces these artifacts using a deep neural network which is predicting per-pixel blending weights.
12
+
13
+ In contrast, our approach explicitly handles view-dependent effects to output photo-realistic images and videos. It is a neural rendering approach that combines image-based rendering and the advances in deep learning. As input, we capture a short video of an object to reconstruct the geometry using multi-view stereo. Given this $3 D$ reconstruction and the set of images of the video, we are able to train our pipeline in a self-supervised manner. The core of our approach is a neural network called EffectsNet which is trained in a Siamese way to estimate view-dependent effects, for example, specular highlights or reflections. This allows us to remove view-dependent effects from the input images, resulting in images that contain view-independent appearance information of the object. This view-independent information can be projected into a novel view using the reconstructed geometry, where new view-dependent effects can be added. CompositionNet, a second network, composites the projected $K$ nearest neighbor images to a final output. Since CompositionNet is trained to generate photo-realistic output images, it is resolving reprojection errors as well as filling regions where no image content is available. We demonstrate the effectiveness of our algorithm using synthetic and real data, and compare to classical computer graphics and learned approaches.
14
+
15
+ ![](images/cc8aa798de5ea5f6cb79a47648c661861e103d5eb584523489c7d0b8b628fcf1.jpg)
16
+ Figure 1: Overview of our image-guided rendering approach: based on the nearest neighbor views, we predict the corresponding view-dependent effects using our EffectsNet architecture. The viewdependent effects are subtracted from the original images to get the diffuse images that can be reprojected into the target image space. In the target image space we estimate the new view-dependent effect and add them to the warped images. An encoder-decoder network is used to blend the warped images to obtain the final output image. During training, we enforce that the output image matches the corresponding ground truth image.
17
+
18
+ To summarize, we propose a novel neural image-guided rendering method, a hybrid between classical image-based rendering and machine learning. The core contribution is the explicit handling of view-dependent effects in the source and the target views using EffectsNet that can be learned in a self-supervised fashion. The composition of the reprojected views to a final output image without the need of hand-crafted blending schemes is enabled using our network called CompositionNet.
19
+
20
+ # 2 RELATED WORK
21
+
22
+ Multi-view 3D Reconstruction Our approach builds on a coarse geometric proxy that is obtained using multi-view 3D reconstruction based on COLMAP (Schonberger & Frahm, 2016). In the last ¨ decade, there has been a lot of progress in the field of image-based 3D reconstruction. Large-scale 3D models have been automatically obtained from images downloaded from the internet (Agarwal et al., 2011). Camera poses and intrinsic calibration parameters are estimated based on structurefrom-motion (Jebara et al., 1999; Schnberger & Frahm, 2016), which can be implemented based on a global bundle adjustment step (Triggs et al., 2000). Afterwards, based on the camera poses and calibration, a dense three-dimensional pointcloud of the scene can be obtained using a multi-view stereo reconstruction approach (Seitz et al., 2006; Goesele et al., 2007; Geiger et al., 2011). Finally, a triangulated surface mesh is obtained, for example using Poisson surface reconstruction (Kazhdan et al., 2006). Even specular objects can be reconstructed (Godard et al., 2015).
23
+
24
+ Learning-based Image Synthesis Deep learning methods can improve quality in many realistic image synthesis tasks. Historically, many of these approaches have been based on generator networks following an encoder-decoder architecture (Hinton & Salakhutdinov, 2006; Kingma & Welling, 2013), such as a U-Net (Ronneberger et al., 2015a) with skip connections. Very recently, adversarially trained networks (Goodfellow et al., 2014; Isola et al., 2017; Mirza & Osindero, 2014; Radford et al., 2016) have shown some of the best result quality for various image synthesis tasks. For example, generative CNN models to synthesize body appearance (Esser et al., 2018), body articulation (Chan et al., 2018), body pose and appearance (Zhu et al., 2018; Liu et al., 2018), and face rendering (Kim et al., 2018; Thies et al., 2019) have been proposed. The DeepStereo approach of Flynn et al. (2016) trains a neural network for view synthesis based on a large set of posed images. Tulsiani et al. (2018) employ view synthesis as a proxy task to learn a layered scene representation.
25
+
26
+ View synthesis can be learned directly from light field data as shown by Kalantari et al. (2016). Appearance Flow (Zhou et al., 2016) learns an image warp based on a dense flow field to map information from the input to the target view. Zhou et al. (2018) learn to extrapolate stereo views from imagery captured by a narrow-baseline stereo camera. Park et al. (2017) explicitly decouple the view synthesis problem into an image warping and inpainting task. In the results, we also show that CNNs trained for image-to-image translation (Isola et al. (2016)) could be applied to novel view synthesis, also with assistance of a shape proxy.
27
+
28
+ Image-based Rendering Our approach is related to image-based rendering (IBR) algorithms that cross-project input views to the target via a geometry proxy, and blend the re-projected views (Buehler et al., 2001; Heigl et al., 1999; Carranza et al., 2003; Zheng et al., 2009). Many previous IBR approaches exhibit ghosting artifacts due to view blending on inaccurate geometry, or exhibit artifacts at occlusion boundaries. Some methods try to reduce these artifacts by combining view blending and optical flow correction (Eisemann et al., 2008; Casas et al., 2015; Du et al., 2018), by using view-specific geometry proxies (Chaurasia et al., 2013; Hedman et al., 2016), or by encoding uncertainty in geometry as soft 3D visibility (Penner & Zhang, 2017). Hedman et al. (2018) propose a hybrid approach between IBR and learning-based image synthesis. They use a CNN to learn a view blending function for image-based rendering with view-dependent shape proxies. In contrast, our learned IBR method learns to combine input views and to explicitly separate view-dependent effects which leads to better reproduction of view-dependent appearance.
29
+
30
+ Intrinsic Decomposition Intrinsic decomposition tackles the ill-posed problem of splitting an image into a set of layers that correspond to physical quantities such as surface reflectance, diffuse shading, and/or specular shading. The decomposition of monocular video into reflectance and shading is classically approached based on a set of hand-crafted priors (Bonneel et al., 2014; Ye et al., 2014; Meka et al., 2016). Other approaches specifically tackle the problem of estimating (Lin et al., 2002) or removing specular highlights (Yang et al., 2015). A diffuse/specular separation can also be obtained based on a set of multi-view images captured under varying illumination (Takechi & Okabe, 2017). The learning-based approach of Wu et al. (2018) converts a set of multi-view images of a specular object into corresponding diffuse images. An extensive overview is given in the survey paper of Bonneel et al. (2017).
31
+
32
+ # 3 OVERVIEW
33
+
34
+ We propose a learning-based image-guided rendering approach that enables novel view synthesis for arbitrary objects. Input to our approach is a set of $N$ images $\mathcal { I } = \{ \mathcal { I } _ { k } \} _ { k = 1 } ^ { N }$ of an object with constant illumination. In a preprocess, we obtain camera pose estimates and a coarse proxy geometry using the $C O L M A P$ structure-from-motion approach (Schonberger¨ $\&$ Frahm (2016); Sch onberger et al. ¨ (2016)). We use the reconstruction and the camera poses to render synthetic depth maps $\mathcal { D } _ { k }$ for all input images $\mathcal { T } _ { k }$ to obtain the training corpus $\boldsymbol { \mathcal { T } } = \{ ( \mathcal { T } _ { k } , \mathcal { D } _ { k } ) \} _ { k = 1 } ^ { N }$ , see Fig. 8. Based on this input, our learning-based approach generates novel views based on the stages that are depicted in Fig. 1. First, we employ a coverage-based look-up to select a small number $n \ll N$ of fixed views from a subset of the training corpus. In our experiments, we are using a number of $n = 2 0$ frames, which we call reference images. Per target view, we select $K = 4$ nearest views from these reference images. Our EffectsNet predicts the view-dependent effects for these views and, thus, the corresponding view-independent components can be obtained via subtraction (Sec. 5). The view-independent component is explicitly warped to the target view using geometry-guided crossprojection (Sec. 6). Next, the view-dependent effects of the target view are predicted and added on top of the warped views. Finally, our CompositionNet is used to optimally combine all warped views to generate the final output (Sec. 6). In the following, we discuss details, show how our approach can be trained based on our training corpus (Sec. 4), and extensively evaluate our proposed approach (see Sec. 7 and the appendix).
35
+
36
+ # 4 TRAINING DATA
37
+
38
+ Our approach is trained in an object-specific manner, from scratch each time. The training corpus $\mathcal { T } = \widehat { \{ ( \mathcal { L } _ { k } , \mathcal { D } _ { k } ) \} } _ { k = 1 } ^ { N }$ consists of $N$ images $\mathcal { T } _ { k }$ and depth maps $\mathcal { D } _ { k }$ per object with constant light.
39
+
40
+ ![](images/d4f0038954e489c3a03bbac02977c808edabc3598d42c2407f35241c18303500.jpg)
41
+ Figure 2: EffectsNet is trained in a self-supervised fashion. In a Siamese scheme, two random images from the training set are chosen and fed into the network to predict the view-dependent effects based on the current view and the respective depth map. After re-projecting the source image to the target image space we compute the diffuse color via subtraction. We optimize the network by minimizing the difference between the two diffuse images in the valid region.
42
+
43
+ Synthetic Training Data To generate photo-realistic synthetic imagery we employ the Mitsuba Renderer (Jakob, 2010) to simulate global illumination effects. For each of the $N$ views, we raytrace a color image $\mathcal { T } _ { k }$ and its corresponding depth map $\mathcal { D } _ { k }$ . We extract a dense and smooth temporal camera path based on a spiral around the object. The camera is oriented towards the center of the object. All images have a resolution of $5 1 2 \times 5 1 2$ and are rendered using path tracing with 96 samples per pixel and a maximum path length of 10. The size of the training sequence is 920, the test set contains 177 images.
44
+
45
+ Real World Training Data Our real world training data is captured using a Nikon D5300 at a resolution of $1 9 2 0 \times 1 0 8 0$ pixels. Since we rely on a sufficiently large set of images, we record videos of the objects at a frame rate of $3 0 \mathrm { H z }$ . Based on COLMAP (Schonberger & Frahm, 2016; ¨ Schonberger et al., 2016), we reconstruct the camera path and a dense point cloud. We manually iso- ¨ late the target object from other reconstructed geometry and run a Poisson reconstruction (Kazhdan & Hoppe, 2013) step to extract the surface. We use this mesh to generate synthetic depth maps $\mathcal { D } _ { k }$ corresponding to the images $\mathcal { T } _ { k }$ (see Fig. 8). Finally, both, the color and depth images are cropped and re-scaled to a resolution of $5 1 2 \times 5 1 2$ pixels. The training corpus ranges from 1000 to 1800 frames, depending on the sequence.
46
+
47
+ # 5 EffectsNet
48
+
49
+ A main contribution of our work is a convolutional neural network that learns the disentanglement of view-dependent and view-independent effects in a self-supervised manner (see Fig. 2). Since our training data consists of a series of images taken from different viewing directions, assuming constant illumination, the reflected radiance of two corresponding points in two different images only differs by the view-dependent effects. Our self-supervised training procedure is based on a Siamese network that gets a pair of randomly selected images from the training set as input. The task of the network is to extract view-dependent lighting effects from an image, based on the geometric information from the proxy geometry.
50
+
51
+ Network Inputs: Using a fixed projection layer, we back-project the input depth image $\mathcal { D } _ { i }$ to world space using the intrinsic and extrinsic camera parameters that are known from the photogrammetric reconstruction. Based on this position map we generate normal maps via finite differences as well as a map of the reflected viewing directions. These inputs are inspired by the Phong illumination model (Phong, 1975) and are stacked along the dimension of the channels. Note, the network input is only dependent on the geometry and the current camera parameters, i.e., the view. Thus, it can also be applied to new target views based on the rendered depth of the proxy geometry.
52
+
53
+ Network Architecture: Our network $\Phi$ is an encoder-decoder network with skip connections, similar to U-Net (Ronneberger et al., 2015b). The skip connections can directly propagate lowlevel features to the decoder. The encoder is based on 6 convolution layers (kernel size 4 and stride 2). The convolution layers output 32, 32, 64, 128, 256 and 512-dimensional feature maps, respectively. We use the ReLU activation function and normalize activations based on batchnorm.
54
+
55
+ The decoder mirrors the encoder. We use transposed convolutions (kernel size 4 and stride 2) with the same number of feature channels as in the respective encoder layer. As final layer we use a $4 \times 4$ -convolution with a stride of 1 that outputs a 3-dimensional tensor that is fed to a Sigmoid to generate an image of the view-dependent illumination effects.
56
+
57
+ Self-supervised Training: Since we assume constant illumination, the diffuse light reflected by a surface point is the same in every image, thus, the appearance of a surface point only changes by the view-dependent components. We train our network in a self-supervised manner based on a Siamese network that predicts the view-dependent effects of two random views such that the difference of the diffuse aligned images is minimal (see Fig. 2). To this end, we use the re-projection ability (see Sec. 6) to align pairs of input images, from which the view-dependent effects have been removed (original image minus view-dependent effects), and train the network to minimize the resulting differences in the overlap region of the two images.
58
+
59
+ Given a randomly selected training pair $( \mathcal { T } _ { p } , \mathcal { T } _ { q } )$ and let $\Phi _ { \Theta } ( \mathbf { X } _ { t } ) , \ t \in \{ p , q \}$ denote the output of the two Siamese towers. Then, our self-supervised loss for this training sample can be expressed as:
60
+
61
+ $$
62
+ \begin{array} { r } { \mathcal { L } _ { q } ^ { p } ( \boldsymbol { \Theta } ) = \left| \left| M \circ \left[ \left( \mathcal { T } _ { p } - \Phi _ { \Theta } ( \mathbf { X } _ { p } ) \right) - \mathcal { W } _ { q } ^ { p } \left( \mathcal { T } _ { q } - \Phi _ { \Theta } ( \mathbf { X } _ { q } ) \right) \right] \right| \right| _ { 2 } . } \end{array}
63
+ $$
64
+
65
+ Here, $\circ$ denotes the Hadamard product, $\Theta$ are the parameters of the encoder-decoder network $\Phi$ , which is shared between the two towers. $M$ is a binary mask that is set to one if a surface point is visible in both views and zero otherwise. We regularize the estimated view-dependent effects to be small w.r.t. an $\ell _ { 1 }$ -norm. This regularizer is weighted with 0.01 in our experiments. The crossprojection $\mathcal { W } _ { q } ^ { p }$ from image $p$ to image $q$ is based on the geometric proxy.
66
+
67
+ # 6 IMAGE-GUIDED RENDERING PIPELINE
68
+
69
+ To generate a novel target view, we select a subset of $K = 4$ images based on a coverage-based nearest neighbor search in the set of reference views $n = 2 0$ ). We use EffectsNet to estimate the view-dependent effects of these views, to compute diffuse images. Each diffuse image is crossprojected to the target view, based on the depth maps of the proxy geometry. Since the depth map of the target view is known, we are able to predict the view-dependent effects in the target image space. After adding these new effects to the reprojected diffuse images, we give these images as input to our composition network CompositionNet (see Sec. 6). CompositionNet fuses the information of the nearest neighbor images into a single output image. In the following, we describe the coveragebased sampling and the cross-projection, and we show how to use our EffectsNet to achieve a robust re-projection of the view-dependent effects.
70
+
71
+ Coverage-based View Selection The selection of the $K$ nearest neighbor frames is based on surface coverage w.r.t. the target view. The goal is to have maximum coverage of the target view to ensure that texture information for the entire visible geometry is cross-projected. View selection is cast as an iterative process based on a greedy selection strategy that locally maximizes surface coverage. To this end, we start with $6 4 \times 6 4$ sample points on a uniform grid on the target view. In each iteration step, we search the view that has the largest overlap with the currently ‘uncovered’ region in the target view. We determine this view by cross-projecting the samples from the target view to the captured images, based on the reconstructed proxy geometry and camera parameters. A sample point in the target view is considered as covered, if it is also visible from the other view point, where visibility is determined based on an occlusion check. Each sample point that is covered by the finally selected view is invalidated for the next iteration steps. This procedure is repeated until the $K$ best views have been selected. To keep processing time low, we restrict this search to a small subset of the input images. This set of reference images is taken from the training corpus and contains $n = 2 0$ images. We chose these views also based on the coverage-based selection scheme described above. I.e., we choose the views with most (unseen) coverage among all views in an iterative manner. Note that this selection is done in a pre-processing step and is independent of the test phase.
72
+
73
+ Proxy-based Cross-projection We model the cross-projection $\mathcal { W } _ { q } ^ { p }$ from image $p$ to image $q$ based on the reconstructed geometric proxy and the camera parameters. Let $\mathbf { K } _ { p } \in \mathbb { R } ^ { 4 \times 3 }$ denote the matrix of intrinsic parameters and $\mathbf { T } _ { p } = [ \mathbf { R } _ { p } | \mathbf { t } _ { p } ] \in \mathbb { R } ^ { 4 \times 4 }$ the matrix of extrinsic parameters of view $p$ . A similar notation holds for view $q$ . Then, a homogeneous 2D screen space point $\mathbf { s } _ { p } = ( u , v , d ) ^ { T } \in \mathbb { R } ^ { 3 }$ in view $p$ , with depth being $d$ , can be mapped to screen space of view $q$ by: $\mathbf { s } _ { q } = \mathcal { W } _ { q } ^ { p } ( \mathbf { s } _ { p } )$ , with $\mathscr { W } _ { q } ^ { p } ( \mathbf { s } _ { p } ) = \mathbf { K } _ { q } \mathbf { T } _ { q } \mathbf { T } _ { p } ^ { - 1 } \mathbf { K } _ { p } ^ { - 1 } \mathbf { s } _ { p }$ . We employ this mapping to cross-project color information from a source view to a novel target view. To this end, we map every valid pixel (with a depth estimate) from the target view to the source view. The color information from the source view is sampled based on bilinear interpolation. Projected points that are occluded in the source view or are not in the view frustum are invalidated. Occlusion is determined by a depth test w.r.t. the source depth map. Applying the cross-projection to the set of all nearest neighbor images, we get multiple images that match the novel target view point.
74
+
75
+ View-dependent Effects Image-based rendering methods often have problems with the reprojection of view-dependent effects (see Sec. 7). In our image-guided pipeline, we solve this problem using EffectsNet. Before re-projection, we estimate the view-dependent effects from the input images and subtract them. By this, view-dependent effects are excluded from warping. Viewdependent effects are then re-inserted after re-projection, again using EffectsNet based on the target view depth map.
76
+
77
+ CompositionNet: Image compositing The warped nearest views are fused using a deep neural network called CompositionNet. Similar to the EffectsNet, our CompositionNet is an encoderdecoder network with skip connections. The network input is a tensor that stacks the $K$ warped views, the corresponding warp fields as well as the target position map along the dimension of the channels and the output is a three channel RGB image. The encoder is based on 6 convolution layers (kernel size 4 and stride 2) with 64, 64, 128, 128, 256 and 256-dimensional feature maps, respectively. The activation functions are leaky ReLUs (negative slope of 0.2) in the encoder and ReLUs in the decoder. In both cases, we normalize all activations based on batchnorm. The decoder mirrors the encoder. We use transposed convolutions (kernel size 4 and stride 2) with the same number of feature channels as in the respective encoder layer. As final layer we use a $4 \times 4$ -convolution with a stride of 1 and a Sigmoid activation function that outputs the final image.
78
+
79
+ We are using an $\ell _ { 1 }$ -loss and an additional adversarial loss to measure the difference between the predicted output images and the ground truth data. The adversarial loss is based on the conditional PatchGAN loss that is also used in Pix2Pix (Isola et al., 2016). In our experiments, we are weighting the adversarial loss with a factor of 0.01 and the $\ell _ { 1 }$ -loss with a factor of 1.0.
80
+
81
+ Training Per object, both networks are trained independently using the Adam optimizer (Kingma & Ba, 2014) built into Tensorflow (Abadi et al., 2015). Each network is trained for 64 epochs with a learning rate of 0.001 and the default parameters $\beta _ { 1 } = 0 . 9$ , $\beta _ { 2 } = 0 . 9 9 9$ , $\epsilon = 1 \cdot e ^ { - 8 }$ .
82
+
83
+ # 7 RESULTS
84
+
85
+ The main contribution of our work is to combine the benefits of IBR and 2D GANs, a hybrid that is able to generate temporally-stable view changes including view-dependent effects. We analyze our approach both qualitatively and quantitatively, and show comparisons to IBR as well as to 2D GAN-based methods. For all experiments we used $K = 4$ views per frame selected from $n = 2 0$ reference views. An overview of all image reconstruction errors is given in Tab. 1 in the appendix. The advantages of our approach can best be seen in the supplemental video, especially, the temporal coherence.
86
+
87
+ Using synthetic data we are quantitatively analyzing the performance of our image-based rendering approach. We refer to the Appendix A.2.1 for a detailed ablation study w.r.t. the training corpus and comparisons to classical and learned image-based rendering techniques. Since the EffectsNet is a core component of our algorithm, we compare our technique with and without EffectsNet (see Fig. 3) using synthetic data. The full pipeline results in smoother specular highlights and sharper details. On the test set the MSE without EffectsNet is 2.6876 versus 2.3864 with EffectsNet.
88
+
89
+ The following experiments are conducted on real data. Fig. 4 shows the effectiveness of our EffectsNet to estimate the specular effects in an image. The globe has a specular surface and reflects the ceiling lights. These specular highlights are estimated and removed from the original image of the object which results in a diffuse image of the object. In Fig. 5 we show a comparison to $P i x 2 P i x$ trained on position maps. Similar to the synthetic experiments in the appendix, our method results in higher quality.
90
+
91
+ ![](images/40a0fd55a2786cc6840f2f35cde0c7904b7f28017381bb70b4ef9a895815bbc0.jpg)
92
+ Figure 3: Ablation study w.r.t. the EffectsNet. Without EffectsNet the specular highlights are not as smooth as the ground truth. Besides, the EffectsNet leads to a visually consistent temporal animation of the view-dependent effects. The close-ups show the color difference w.r.t. ground truth.
93
+
94
+ ![](images/5366ce54340c75f5ba2223afee676d1ae5aa177b9555e71c191fa3e6448bdc90.jpg)
95
+ Figure 4: Prediction and removal of view-dependent effects of a highly specular real object.
96
+
97
+ We also compare to the state-of-the-art image-based rendering approach of Hedman et al. (2018). The idea of this technique is to use a neural network to predict blending weights for a image-based rendering composition like InsideOut (Hedman et al., 2016). Note that this method uses the per frame reconstructed depth maps of 20 reference frames in addition to the fused 3D mesh. As can be seen in Fig. 6, the results are of high-quality, achieving an MSE of 45.07 for DeepBlending and an MSE of 51.17 for InsideOut. Our object-specific rendering results in an error of 25.24. Both methods of Hedman et al., do not explicitly handle the correction of view-dependent effects. In contrast, our approach uses EffectsNet to remove the view-dependent effect in the source views (thus, enabling the projection to a different view) and to add new view-dependent effect in the target view. This can be seen in the bottom row of Fig. 6, where we computed the quotient between reconstruction and ground truth showing the shading difference.
98
+
99
+ # 8 LIMITATIONS
100
+
101
+ Our approach is trained in an object specific manner. This is a limitation of our method, but also ensures the optimal results that can be generated using our architecture. Since the multi-view stereo reconstruction of an object is an offline algorithm that takes about an hour, we think that training the object specific networks (EffectsNet and CompositionNet) that takes a similar amount of time is practically feasible. The training of these networks can be seen as reconstruction refinement that also includes the appearance of the object. At test time our approach runs at interactive rates, the inference time of EffectsNet is $5 0 \mathrm { H z }$ , while CompositionNet runs at $1 0 \mathrm { H z }$ on an Nvidia 1080Ti. Note that our approach fails, when the stereo reconstruction fails.
102
+
103
+ Similar to other learning based approaches, the method is relying on a reasonable large training dataset. In the appendix, we conducted an ablation study regarding the dataset size, where our approach gracefully degenerates while a pure learning-based approach shows strong artifacts.
104
+
105
+ ![](images/cc3bf327008a41d34db3c32ded22c38b4e1558ea7ea04e14408a648e148dc9fc.jpg)
106
+ Figure 5: Comparison to $P i x 2 P i x$ on real data. It can be seen that $P i x 2 P i x$ can be used to synthesize novel views. The close-up shows the artifacts that occur with Pix2Pix and are resolved by our approach leading to higher fidelity results.
107
+
108
+ ![](images/fdeb75810cd2fd2cfe798de0350df6c1e2e0fc21b1bfb7a3dce2f63f64730687.jpg)
109
+ Figure 6: Comparison to the IBR method InsideOut of Hedman et al. (2016) and the learned IBR blending method DeepBlending of Hedman et al. (2018). To better show the difference in shading, we computed the quotient of the resulting image and the ground truth. A perfect reconstruction would result in a quotient of 1. As can be seen our approach leads to a more uniform error, while the methods of Hedman et al. show shading errors due to the view-dependent effects.
110
+
111
+ # 9 CONCLUSION
112
+
113
+ In this paper, we propose a novel image-guided rendering approach that outputs photo-realistic images of an object. We demonstrate the effectiveness of our method in a variety of experiments. The comparisons to competing methods show on-par or even better results, especially, in the presence of view-dependent effects that can be handled using our EffectsNet. We hope to inspire follow-up work in self-supervised re-rendering using deep neural networks.
114
+
115
+ # ACKNOWLEDGEMENTS
116
+
117
+ We thank Artec $3 \mathrm { D } ^ { 1 }$ for providing scanned 3D models and Angela Dai for the video voice over. This work is funded by a Google Research Grant, supported by the ERC Starting Grant Scan2CAD (804724), ERC Starting Grant CapReal (335545), and the ERC Consolidator Grant 4DRepLy (770784), the Max Planck Center for Visual Computing and Communication (MPC-VCC), a TUMIAS Rudolf Moßbauer Fellowship (Focus Group Visual Computing), and a Google Faculty Award. ¨ In addition, this work is funded by Sony and the German Research Foundation (DFG) Grant Making Machine Learning on Static and Dynamic 3D Data Practical, and supported by Nvidia.
118
+
119
+ # REFERENCES
120
+
121
+ Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dandelion Mane, Rajat Monga, Sherry Moore, Derek Murray, Chris ´ Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda Viegas, Oriol Vinyals, Pete Warden, Martin Wat- ´ tenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. URL https://www.tensorflow.org/. Software available from tensorflow.org.
122
+
123
+ Sameer Agarwal, Yasutaka Furukawa, Noah Snavely, Ian Simon, Brian Curless, Steven M. Seitz, and Richard Szeliski. Building rome in a day. Commun. ACM, 54(10):105–112, October 2011. ISSN 0001-0782. doi: 10.1145/2001269.2001293. URL http://doi.acm.org/10.1145/ 2001269.2001293.
124
+
125
+ Nicolas Bonneel, Kalyan Sunkavalli, James Tompkin, Deqing Sun, Sylvain Paris, and Hanspeter Pfister. Interactive Intrinsic Video Editing. ACM Transactions on Graphics (SIGGRAPH Asia 2014), 33(6), 2014.
126
+
127
+ Nicolas Bonneel, Balazs Kovacs, Sylvain Paris, and Kavita Bala. Intrinsic Decompositions for Image Editing. Computer Graphics Forum (Eurographics State of the Art Reports 2017), 36(2), 2017.
128
+
129
+ Chris Buehler, Michael Bosse, Leonard McMillan, Steven Gortler, and Michael Cohen. Unstructured lumigraph rendering. In Proceedings of the 28th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH ’01, pp. 425–432, New York, NY, USA, 2001. ACM. ISBN 1-58113-374-X. doi: 10.1145/383259.383309. URL http://doi.acm.org/10. 1145/383259.383309.
130
+
131
+ Joel Carranza, Christian Theobalt, Marcus A. Magnor, and Hans-Peter Seidel. Free-viewpoint video of human actors. ACM Trans. Graph. (Proc. SIGGRAPH), 22(3):569–577, July 2003. ISSN 0730- 0301. doi: 10.1145/882262.882309. URL http://doi.acm.org/10.1145/882262. 882309.
132
+
133
+ Dan Casas, Christian Richardt, John P. Collomosse, Christian Theobalt, and Adrian Hilton. 4d model flow: Precomputed appearance alignment for real-time 4d video interpolation. Comput. Graph. Forum, 34(7):173–182, 2015.
134
+
135
+ C. Chan, S. Ginosar, T. Zhou, and A. A. Efros. Everybody Dance Now. ArXiv e-prints, August 2018.
136
+
137
+ Gaurav Chaurasia, Sylvain Duchene, Olga Sorkine-Hornung, and George Drettakis. Depth synthesis and local warps for plausible image-based navigation. ACM Trans. Graph., 32(3):30:1–30:12, July 2013. ISSN 0730-0301.
138
+
139
+ Paul Debevec, Yizhou Yu, and George Boshokov. Efficient view-dependent IBR with projective texture-mapping. EG Rendering Workshop, 1998.
140
+
141
+ Ruofei Du, Ming Chuang, Wayne Chang, Hugues Hoppe, and Amitabh Varshney. Montage4d: Interactive seamless fusion of multiview video textures. In Proceedings of the ACM SIGGRAPH Symposium on Interactive 3D Graphics and Games, I3D ’18, pp. 5:1–5:11, New York, NY, USA, 2018. ACM. ISBN 978-1-4503-5705-0. doi: 10.1145/3190834.3190843. URL http://doi. acm.org/10.1145/3190834.3190843.
142
+
143
+ M. Eisemann, B. De Decker, M. Magnor, P. Bekaert, E. De Aguiar, N. Ahmed, C. Theobalt, and A. Sellent. Floating Textures. Computer Graphics Forum (Proc. EUROGRAHICS, 2008. ISSN 1467-8659. doi: 10.1111/j.1467-8659.2008.01138.x.
144
+
145
+ Patrick Esser, Ekaterina Sutter, and Bjorn Ommer. A variational u-net for conditional appearance ¨ and shape generation. CoRR, abs/1804.04694, 2018. URL http://arxiv.org/abs/1804. 04694.
146
+
147
+ John Flynn, Ivan Neulander, James Philbin, and Noah Snavely. Deepstereo: Learning to predict new views from the world’s imagery. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. URL http://www.cv-foundation.org/openaccess/ content_cvpr_2016/html/Flynn_DeepStereo_Learning_to_CVPR_2016_ paper.html.
148
+
149
+ Andreas Geiger, Julius Ziegler, and Christoph Stiller. Stereoscan: Dense 3d reconstruction in realtime. In Intelligent Vehicles Symposium, pp. 963–968. IEEE, 2011. ISBN 978-1-4577-0890-9.
150
+
151
+ Clment Godard, Peter Hedman, Wenbin Li, and Gabriel J. Brostow. Multi-view Reconstruction of Highly Specular Surfaces in Uncontrolled Environments. In 3DV, 2015.
152
+
153
+ Michael Goesele, Noah Snavely, Brian Curless, Hugues Hoppe, and Steven M. Seitz. Multi-view stereo for community photo collections. In ICCV, pp. 1–8. IEEE Computer Society, 2007. ISBN 978-1-4244-1631-8.
154
+
155
+ Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. 2014.
156
+
157
+ Peter Hedman, Tobias Ritschel, George Drettakis, and Gabriel Brostow. Scalable Inside-Out ImageBased Rendering. 35(6):231:1–231:11, 2016.
158
+
159
+ Peter Hedman, Julien Philip, True Price, Jan-Michael Frahm, George Drettakis, and Gabriel Brostow. Deep blending for free-viewpoint image-based rendering. ACM Transactions on Graphics (SIGGRAPH Asia Conference Proceedings), 37(6), November 2018. URL http://www-sop. inria.fr/reves/Basilic/2018/HPPFDB18.
160
+
161
+ Benno Heigl, Reinhard Koch, Marc Pollefeys, Joachim Denzler, and Luc J. Van Gool. Plenoptic modeling and rendering from image sequences taken by hand-held camera. In Proc. DAGM, pp. 94–101, 1999.
162
+
163
+ Geoffrey E. Hinton and Ruslan Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504–507, July 2006. ISSN 0036-8075. doi: 10.1126/science. 1127647.
164
+
165
+ Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. arxiv, 2016.
166
+
167
+ Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A. Efros. Image-to-image translation with conditional adversarial networks. pp. 5967–5976, 2017. doi: 10.1109/CVPR.2017.632.
168
+
169
+ Shahram Izadi, David Kim, Otmar Hilliges, David Molyneaux, Richard Newcombe, Pushmeet Kohli, Jamie Shotton, Steve Hodges, Dustin Freeman, Andrew Davison, and Andrew Fitzgibbon. Kinectfusion: Real-time 3d reconstruction and interaction using a moving depth camera. In Proceedings of the 24th Annual ACM Symposium on User Interface Software and Technology, UIST ’11, pp. 559–568, New York, NY, USA, 2011. ACM. ISBN 978-1-4503-0716-1. doi: 10. 1145/2047196.2047270. URL http://doi.acm.org/10.1145/2047196.2047270.
170
+
171
+ Wenzel Jakob. Mitsuba renderer, 2010. http://www.mitsuba-renderer.org.
172
+
173
+ T. Jebara, A. Azarbayejani, and A. Pentland. 3d structure from 2d motion. IEEE Signal Processing Magazine, 16(3):66–84, May 1999. ISSN 1053-5888. doi: 10.1109/79.768574.
174
+
175
+ Nima Khademi Kalantari, Ting-Chun Wang, and Ravi Ramamoorthi. Learning-based view synthesis for light field cameras. ACM Transactions on Graphics (Proceedings of SIGGRAPH Asia 2016), 35(6), 2016.
176
+
177
+ Michael Kazhdan and Hugues Hoppe. Screened poisson surface reconstruction. ACM Trans. Graph., 32(3):29:1–29:13, July 2013. ISSN 0730-0301. doi: 10.1145/2487228.2487237. URL http: //doi.acm.org/10.1145/2487228.2487237.
178
+
179
+ Michael Kazhdan, Matthew Bolitho, and Hugues Hoppe. Poisson surface reconstruction. In Proceedings of the Fourth Eurographics Symposium on Geometry Processing, SGP ’06, pp. 61–70, Aire-la-Ville, Switzerland, Switzerland, 2006. Eurographics Association. ISBN 3-905673-36-3. URL http://dl.acm.org/citation.cfm?id=1281957.1281965.
180
+
181
+ H. Kim, P. Garrido, A. Tewari, W. Xu, J. Thies, N. Nießner, P. Perez, C. Richardt, M. Zollh ´ ofer, and ¨ C. Theobalt. Deep Video Portraits. ACM Transactions on Graphics 2018 (TOG), 2018.
182
+
183
+ Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. URL http://arxiv.org/abs/1412.6980.
184
+
185
+ Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. CoRR, abs/1312.6114, 2013. URL http://dblp.uni-trier.de/db/journals/corr/corr1312.html# KingmaW13.
186
+
187
+ Stephen Lin, Yuanzhen Li, Sing Bing Kang, Xin Tong, and Heung-Yeung Shum. Diffuse-specular separation and depth recovery from image sequences. In Proceedings of the 7th European Conference on Computer Vision-Part III, ECCV $\cdot _ { 0 2 }$ , pp. 210–224, Berlin, Heidelberg, 2002. Springer-Verlag. ISBN 3-540-43746-0. URL http://dl.acm.org/citation.cfm?id= 645317.649345.
188
+
189
+ Lingjie Liu, Weipeng Xu, Michael Zollhoefer, Hyeongwoo Kim, Florian Bernard, Marc Habermann, Wenping Wang, and Christian Theobalt. Neural animation and reenactment of human actor videos, 2018.
190
+
191
+ Abhimitra Meka, Michael Zollhoefer, Christian Richardt, and Christian Theobalt. Live intrinsic video. ACM Transactions on Graphics (Proceedings SIGGRAPH), 35(4), 2016.
192
+
193
+ Mehdi Mirza and Simon Osindero. Conditional generative adversarial nets. arXiv:1411.1784, 2014. URL https://arxiv.org/abs/1411.1784.
194
+
195
+ M. Nießner, M. Zollhofer, S. Izadi, and M. Stamminger. Real-time 3d reconstruction at scale using ¨ voxel hashing. ACM Transactions on Graphics (TOG), 2013.
196
+
197
+ Eunbyung Park, Jimei Yang, Ersin Yumer, Duygu Ceylan, and Alexander C. Berg. Transformationgrounded image generation network for novel 3d view synthesis. CoRR, abs/1703.02921, 2017.
198
+
199
+ Eric Penner and Li Zhang. Soft 3d reconstruction for view synthesis. ACM Trans. Graph., 36(6): 235:1–235:11, November 2017. ISSN 0730-0301.
200
+
201
+ Bui Tuong Phong. Illumination for computer generated pictures. Commun. ACM, 18(6):311–317, June 1975. ISSN 0001-0782. doi: 10.1145/360825.360839. URL http://doi.acm.org/ 10.1145/360825.360839.
202
+
203
+ Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. 2016.
204
+
205
+ Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-Net: Convolutional networks for biomedical image segmentation. In International Conference on Medical Image Computing and Computer-Assisted Intervention (MICCAI), pp. 234–241, 2015a. ISBN 978-3-319-24574-4. doi: 10.1007/978-3-319-24574-4 28.
206
+
207
+ Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In Nassir Navab, Joachim Hornegger, William M. Wells, and Alejandro F. Frangi (eds.), Medical Image Computing and Computer-Assisted Intervention – MICCAI 2015, pp. 234–241, Cham, 2015b. Springer International Publishing. ISBN 978-3-319-24574-4.
208
+
209
+ Johannes Lutz Schonberger and Jan-Michael Frahm. Structure-from-Motion Revisited. In ¨ Conference on Computer Vision and Pattern Recognition (CVPR), 2016.
210
+
211
+ Johannes Lutz Schonberger, Enliang Zheng, Marc Pollefeys, and Jan-Michael Frahm. Pixelwise ¨ View Selection for Unstructured Multi-View Stereo. In European Conference on Computer Vision (ECCV), 2016.
212
+
213
+ J. L. Schnberger and J. Frahm. Structure-from-motion revisited. In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 4104–4113, June 2016. doi: 10.1109/ CVPR.2016.445.
214
+
215
+ Steven M. Seitz, Brian Curless, James Diebel, Daniel Scharstein, and Richard Szeliski. A comparison and evaluation of multi-view stereo reconstruction algorithms. In Proceedings of the 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition - Volume 1, CVPR ’06, pp. 519–528, Washington, DC, USA, 2006. IEEE Computer Society. ISBN 0- 7695-2597-0. doi: 10.1109/CVPR.2006.19. URL http://dx.doi.org/10.1109/CVPR. 2006.19.
216
+
217
+ K. Takechi and T. Okabe. Diffuse-specular separation of multi-view images under varying illumination. In 2017 IEEE International Conference on Image Processing (ICIP), pp. 2632–2636, Sept 2017. doi: 10.1109/ICIP.2017.8296759.
218
+
219
+ Justus Thies, Michael Zollhofer, and Matthias Nießner. Deferred neural rendering: Image synthesis ¨ using neural textures. ACM Trans. Graph., 38(4):66:1–66:12, July 2019. ISSN 0730-0301. doi: 10.1145/3306346.3323035.
220
+
221
+ Bill Triggs, Philip F. McLauchlan, Richard I. Hartley, and Andrew W. Fitzgibbon. Bundle adjustment - a modern synthesis. In Proceedings of the International Workshop on Vision Algorithms: Theory and Practice, ICCV ’99, pp. 298–372, London, UK, UK, 2000. Springer-Verlag. ISBN 3-540-67973-1.
222
+
223
+ Shubham Tulsiani, Richard Tucker, and Noah Snavely. Layer-structured 3d scene inference via view synthesis. In ECCV, 2018.
224
+
225
+ Shihao Wu, Hui Huang, Tiziano Portenier, Matan Sela, Daniel Cohen-Or, Ron Kimmel, and Matthias Zwicker. Specular-to-diffuse translation for multi-view reconstruction. In Vittorio Ferrari, Martial Hebert, Cristian Sminchisescu, and Yair Weiss (eds.), Computer Vision - ECCV 2018 - 15th European Conference, Munich, Germany, September 8-14, 2018, Proceedings, Part IV, volume 11208 of Lecture Notes in Computer Science, pp. 193–211. Springer, 2018. doi: 10.1007/ 978-3-030-01225-0\ 12. URL https://doi.org/10.1007/978-3-030-01225-0_ 12.
226
+
227
+ Qingxiong Yang, Jinhui Tang, and Narendra Ahuja. Efficient and robust specular highlight removal. IEEE Trans. Pattern Anal. Mach. Intell., 37(6):1304–1311, 2015. URL http://dblp. uni-trier.de/db/journals/pami/pami37.html#YangTA15.
228
+
229
+ Genzhi Ye, Elena Garces, Yebin Liu, Qionghai Dai, and Diego Gutierrez. Intrinsic video and applications. ACM Trans. Graph., 33(4):80:1–80:11, July 2014. ISSN 0730-0301. doi: 10.1145/ 2601097.2601135. URL http://doi.acm.org/10.1145/2601097.2601135.
230
+
231
+ Ke Colin Zheng, Alex Colburn, Aseem Agarwala, Maneesh Agrawala, David Salesin, Brian Curless, and Michael F. Cohen. Parallax photography: creating 3d cinematic effects from stills. In Proc. Graphics Interface, pp. 111–118. ACM Press, 2009.
232
+
233
+ Tinghui Zhou, Shubham Tulsiani, Weilun Sun, Jitendra Malik, and Alexei A. Efros. View synthesis by appearance flow. In ECCV. 2016.
234
+
235
+ Tinghui Zhou, Richard Tucker, John Flynn, Graham Fyffe, and Noah Snavely. Stereo magnification: Learning view synthesis using multiplane images. ACM Trans. Graph., 37(4):65:1–65:12, July 2018. ISSN 0730-0301. doi: 10.1145/3197517.3201323. URL http://doi.acm.org/10. 1145/3197517.3201323.
236
+
237
+ Hao Zhu, Hao Su, Peng Wang, Xun Cao, and Ruigang Yang. View extrapolation of human body from a single image. CoRR, abs/1804.04213, 2018.
238
+
239
+ # A APPENDIX
240
+
241
+ # A.1 TRAINING CORPUS
242
+
243
+ In Fig. 7, we show an overview of synthetic objects that we used to evaluate our technique. The objects differ significantly in terms of material properties and shape, ranging from nearly diffuse materials (left) to the highly specular paint of the car (right).
244
+
245
+ ![](images/08667c3855fda3f8d102bcdfb252daf742d3a181eaaa1a08b333a390e8462b81.jpg)
246
+ Figure 7: Renderings of our ground truth synthetic data. Based on the Mitsuba Renderer (Jakob, 2010), we generate images of various objects that significantly differ in terms of material properties and shape.
247
+
248
+ To capture real-world data we record a short video clip and use multi-view stereo to reconstruct the object as depicted in Fig. 8.
249
+
250
+ ![](images/3fa579ce5c1c888077ccca0bb03544abb744e87648686d2141ab2f8f46e48d1a.jpg)
251
+ Figure 8: Based on a set of multi-view images, we reconstruct a coarse 3D model. The camera poses estimated during reconstruction and the 3D model are then used to render synthetic depth maps for the input views.
252
+
253
+ # A.2 ADDITIONAL RESULTS
254
+
255
+ An overview of all image reconstruction errors of all sequences used in this paper is given in Tab. 1. MSE values are reported w.r.t. a color range of [0, 255]. Note that the synthetic data contain ground truth depth maps, while for the real data, we are relying on reconstructed geometry. This is also reflected in the photo-metric error (higher error due to misalignment).
256
+
257
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Sequence</td><td rowspan=1 colspan=1>N-IBR</td><td rowspan=1 colspan=1>IBR(Debevec et al. (1998))</td><td rowspan=1 colspan=1>Pix2Pix (Isola et al. (2016))</td><td rowspan=1 colspan=1>Ours</td></tr><tr><td rowspan=4 colspan=1>oparittt</td><td rowspan=1 colspan=1>Fig. 1, Car</td><td rowspan=1 colspan=1>72.16</td><td rowspan=1 colspan=1>39.90</td><td rowspan=1 colspan=1>12.62</td><td rowspan=1 colspan=1>3.61</td></tr><tr><td rowspan=1 colspan=1>Fig. 3, Statue</td><td rowspan=1 colspan=1>44.27</td><td rowspan=1 colspan=1>25.01</td><td rowspan=1 colspan=1>5.40</td><td rowspan=1 colspan=1>2.38</td></tr><tr><td rowspan=1 colspan=1>Fig. 11, Vase</td><td rowspan=1 colspan=1>38.93</td><td rowspan=1 colspan=1>17.31</td><td rowspan=1 colspan=1>18.66</td><td rowspan=1 colspan=1>1.12</td></tr><tr><td rowspan=1 colspan=1>Fig.12, Bust</td><td rowspan=1 colspan=1>35.58</td><td rowspan=1 colspan=1>20.45</td><td rowspan=1 colspan=1>4.43</td><td rowspan=1 colspan=1>1.52</td></tr><tr><td rowspan=3 colspan=1>3ker</td><td rowspan=1 colspan=1>Fig. 4, Globe</td><td rowspan=1 colspan=1>152.21</td><td rowspan=1 colspan=1>81.06</td><td rowspan=1 colspan=1>154.29</td><td rowspan=1 colspan=1>30.38</td></tr><tr><td rowspan=1 colspan=1>Fig.14,Shoe</td><td rowspan=1 colspan=1>98.89</td><td rowspan=1 colspan=1>59.47</td><td rowspan=1 colspan=1>116.52</td><td rowspan=1 colspan=1>56.08</td></tr><tr><td rowspan=1 colspan=1>Fig.6,Bust</td><td rowspan=1 colspan=1>397.25</td><td rowspan=1 colspan=1>72.90</td><td rowspan=1 colspan=1>45.23</td><td rowspan=1 colspan=1>25.24</td></tr></table>
258
+
259
+ Table 1: MSE of photometric re-rendering error of the test sequences (colors in [0-255]). Pix2Pix is trained on world space position maps. N-IBR is the na¨ıve blending approach that gets our nearest neighbors as input.
260
+
261
+ Using synthetic data we are quantitatively analyzing the performance of our image-based rendering approach.
262
+
263
+ EffectsNet In Fig. 9, we show a qualitative comparison of our predicted diffuse texture to the ground truth. The figure shows the results for a Phong rendering sequence. As can be seen, the estimated diffuse image is close to the ground truth.
264
+
265
+ ![](images/b352685fe8c8880efbfd7023061e7baa9cbcf02e06c64b8b14ddebfb097a19da.jpg)
266
+ Figure 9: Comparison of the estimated diffuse images based on EffectsNet and the ground truth renderings. The input data has been synthesized by a standard Phong renderer written in DirectX. The training set contained 4900 images.
267
+
268
+ Comparison to Image-based Rendering We compare our method to two baseline image-based rendering approaches. A na¨ıve IBR method that uses the nearest neighbor of our method and computes a per pixel average of the re-projected views, and the IBR method of Debevec et al. (1998) that uses all reference views and a per triangle view selection. In contrast to our method, the classical IBR techniques are not reproducing view-dependent effects as realistically and smoothly which can be seen in Fig. 10. As can be seen the na¨ıve IBR method also suffers from occluded regions. Our method is able to in-paint these regions.
269
+
270
+ ![](images/98a7d84b7919b9074857cfe391dad7a9f3296218601a610f8b7fd56e8a594359.jpg)
271
+ Figure 10: Comparison of our neural object rendering approach to IBR baselines. The na¨ıve IBR method uses the same four selected images as our approach as input and computes a pixel-wise average color. The method of Debevec et al. (1998) uses all reference views $\left( n = 2 0 \right)$ ) and a per triangle view selection. The training set contained 1000 images.
272
+
273
+ Comparison to Learned Image Synthesis To demonstrate the advantage of our approach, we also compare to an image-to-image translation baseline $( P i x 2 P i x$ (Isola et al., 2016)). $P i x 2 P i x$ is trained to translate position images into color images of the target object. While it is not designed for this specific task, we want to show that it is in fact able to produce individual images that look realistic (Fig. 11); however, it is unable to produce a temporally-coherent video. On our test set with 190 images, our method has a MSE of 1.12 while $P i x 2 P i x$ results in a higher MSE of 18.66. Pix2Pix trained on pure depth maps from our training set results in a MSE of 36.63 since the input does not explicitly contain view information.
274
+
275
+ ![](images/c6870bc91c780e5e68f629e7bb12da8778d9b74f9b7eecac9719d0d4fdaf4a92.jpg)
276
+ Figure 11: In comparison to $P i x 2 P i x$ with position maps as input, we can see that our technique is able to generate images with correct detail as well as without blur artifacts. Both methods are trained on a dataset of 920 images.
277
+
278
+ Evaluation of Training Corpus Size In Fig. 12 we show the influence of the training corpus size on the quality of the results. While our method handles the reduction of the training data size well, the performance of $P i x 2 P i x$ drastically decreases leading to a significantly higher MSE. When comparing these results to the results in Fig 11 it becomes evident that $P i x 2 P i x$ has a significantly lower error on the bust sequence than on the vase sequence. The vase has much more details than the bust and, thus, is harder to reproduce.
279
+
280
+ ![](images/b9428cfe37e6bd63a628f4b38365adc3ac92240e632df62ab26e2cbcabb8f4b0.jpg)
281
+ MSE w.r.t. Training Dataset Size
282
+ Figure 12: In this graph we compare the influence of the training corpus size on the MSE for our approach and $P i x 2 P i x$ trained on position maps. The full dataset contains 920 images. We gradually half the size of the training set. As can be seen, the performance of our approaches degrades more gracefully than $P i x 2 P i x$ .
283
+
284
+ # A.2.2 ADDITIONAL EXPERIMENTS ON REAL DATA
285
+
286
+ Comparison to Texture-based Rendering Nowadays, most reconstruction frameworks like COLMAP (Schonberger & Frahm, 2016), KinectFusion (Izadi et al., 2011), or VoxelHash-¨ ing (Nießner et al., 2013) output a mesh with per-vertex colors or with a texture, which is the de facto standard in computer graphics. Fig. 13 shows a side-by-side comparison of our method and the rendering using per-vertex colors as well as using a static texture. Since both the vertex colors as well as the texture are static, these approaches are not able to capture the view-dependent effects. Thus, view-dependent effects are baked into the vertex colors or texture and stay fixed (seen close-ups in Fig. 13).
287
+
288
+ ![](images/b2cfc3fe2cf623eab06c5d8250016e01960f0f27c2f7b5a56c8b332de09e977f.jpg)
289
+ Figure 13: Image synthesis on real data in comparison to classical computer graphics rendering approaches. From left to right: Poisson reconstructed mesh with per-vertex colors, texture-based rendering, our results and the ground truth. Every texel of the texture is a cosine-weighted sum of the data of four views where the normal points towards the camera the most.
290
+
291
+ Comparison to Image-based Rendering Fig. 14 shows a comparison of our method to imagebased rendering. The IBR method of Debevec et al. (1998) uses a per triangle based view selection which leads to artifacts, especially, in regions with specular reflections. Our method is able to reproduce these specular effects. Note, you can also see that our result is sharper than the ground truth (motion blur), because the network reproduces the appearance of the training corpus and most images do not contain motion blur.
292
+
293
+ ![](images/fbc02081d7f1eb05153aa7bbad138739d2a3d72fdceb619997172744fa693ad7.jpg)
294
+ Figure 14: Image synthesis on real data: we show a comparison to the IBR technique of Debevec et al. (1998). From left to right: reconstructed geometry of the object, result of IBR, our result, and the ground truth.
parse/train/Hyg9anEFPS/Hyg9anEFPS_content_list.json ADDED
@@ -0,0 +1,1632 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "IMAGE-GUIDED NEURAL OBJECT RENDERING ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 728,
10
+ 122
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Justus Thies1, Michael Zollhofer ¨ 2, Christian Theobalt3, Marc Stamminger4, Matthias Nießner 1Technical University of Munich, 2Stanford University, 3Max-Planck-Institute for Informatics, 4University of Erlangen-Nuremberg ",
17
+ "bbox": [
18
+ 184,
19
+ 143,
20
+ 846,
21
+ 189
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 224,
32
+ 544,
33
+ 239
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "We propose a learned image-guided rendering technique that combines the benefits of image-based rendering and GAN-based image synthesis. The goal of our method is to generate photo-realistic re-renderings of reconstructed objects for virtual and augmented reality applications (e.g., virtual showrooms, virtual tours & sightseeing, the digital inspection of historical artifacts). A core component of our work is the handling of view-dependent effects. Specifically, we directly train an object-specific deep neural network to synthesize the view-dependent appearance of an object. As input data we are using an RGB video of the object. This video is used to reconstruct a proxy geometry of the object via multi-view stereo. Based on this 3D proxy, the appearance of a captured view can be warped into a new target view as in classical image-based rendering. This warping assumes diffuse surfaces, in case of view-dependent effects, such as specular highlights, it leads to artifacts. To this end, we propose EffectsNet, a deep neural network that predicts view-dependent effects. Based on these estimations, we are able to convert observed images to diffuse images. These diffuse images can be projected into other views. In the target view, our pipeline reinserts the new view-dependent effects. To composite multiple reprojected images to a final output, we learn a composition network that outputs photo-realistic results. Using this image-guided approach, the network does not have to allocate capacity on “remembering” object appearance, instead it learns how to combine the appearance of captured images. We demonstrate the effectiveness of our approach both qualitatively and quantitatively on synthetic as well as on real data. ",
40
+ "bbox": [
41
+ 233,
42
+ 257,
43
+ 764,
44
+ 563
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 592,
55
+ 334,
56
+ 608
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "In recent years, large progress has been made in 3D shape reconstruction of objects from photographs or depth streams. However, highly realistic re-rendering of such objects, e.g., in a virtual environment, is still very challenging. The reconstructed surface models and color information often exhibit inaccuracies or are comparably coarse (e.g., Izadi et al. (2011)). Many objects also exhibit strong view-dependent appearance effects, such as specularities. These effects not only frequently cause errors already during image-based shape reconstruction, but are also hard to reproduce when re-rendering an object from novel viewpoints. Static diffuse textures are frequently reconstructed for novel viewpoint synthesis, but these textures lack view-dependent appearance effects. Imagebased rendering (IBR) introduced variants of view-dependent texturing that blend input images on the shape (Buehler et al., 2001; Heigl et al., 1999; Carranza et al., 2003; Zheng et al., 2009). This enables at least coarse approximation of view-dependent effects. However, these approaches often produce ghosting artifacts due to view blending on inaccurate geometry, or artifacts at occlusion boundaries. Some algorithms reduce these artifacts by combining view blending and optical flow correction (Eisemann et al., 2008; Casas et al., 2015; Du et al., 2018), or by combining viewdependent blending with view-specific geometry (Chaurasia et al., 2013; Hedman et al., 2016) or geometry with soft 3D visibility like Penner & Zhang (2017). Hedman et al. (2018) reduces these artifacts using a deep neural network which is predicting per-pixel blending weights. ",
63
+ "bbox": [
64
+ 174,
65
+ 625,
66
+ 825,
67
+ 861
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "In contrast, our approach explicitly handles view-dependent effects to output photo-realistic images and videos. It is a neural rendering approach that combines image-based rendering and the advances in deep learning. As input, we capture a short video of an object to reconstruct the geometry using multi-view stereo. Given this $3 D$ reconstruction and the set of images of the video, we are able to train our pipeline in a self-supervised manner. The core of our approach is a neural network called EffectsNet which is trained in a Siamese way to estimate view-dependent effects, for example, specular highlights or reflections. This allows us to remove view-dependent effects from the input images, resulting in images that contain view-independent appearance information of the object. This view-independent information can be projected into a novel view using the reconstructed geometry, where new view-dependent effects can be added. CompositionNet, a second network, composites the projected $K$ nearest neighbor images to a final output. Since CompositionNet is trained to generate photo-realistic output images, it is resolving reprojection errors as well as filling regions where no image content is available. We demonstrate the effectiveness of our algorithm using synthetic and real data, and compare to classical computer graphics and learned approaches. ",
74
+ "bbox": [
75
+ 176,
76
+ 867,
77
+ 823,
78
+ 922
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "image",
84
+ "img_path": "images/cc8aa798de5ea5f6cb79a47648c661861e103d5eb584523489c7d0b8b628fcf1.jpg",
85
+ "image_caption": [
86
+ "Figure 1: Overview of our image-guided rendering approach: based on the nearest neighbor views, we predict the corresponding view-dependent effects using our EffectsNet architecture. The viewdependent effects are subtracted from the original images to get the diffuse images that can be reprojected into the target image space. In the target image space we estimate the new view-dependent effect and add them to the warped images. An encoder-decoder network is used to blend the warped images to obtain the final output image. During training, we enforce that the output image matches the corresponding ground truth image. "
87
+ ],
88
+ "image_footnote": [],
89
+ "bbox": [
90
+ 174,
91
+ 99,
92
+ 823,
93
+ 210
94
+ ],
95
+ "page_idx": 1
96
+ },
97
+ {
98
+ "type": "text",
99
+ "text": "",
100
+ "bbox": [
101
+ 174,
102
+ 338,
103
+ 825,
104
+ 477
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "To summarize, we propose a novel neural image-guided rendering method, a hybrid between classical image-based rendering and machine learning. The core contribution is the explicit handling of view-dependent effects in the source and the target views using EffectsNet that can be learned in a self-supervised fashion. The composition of the reprojected views to a final output image without the need of hand-crafted blending schemes is enabled using our network called CompositionNet. ",
111
+ "bbox": [
112
+ 174,
113
+ 488,
114
+ 825,
115
+ 558
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "2 RELATED WORK ",
122
+ "text_level": 1,
123
+ "bbox": [
124
+ 176,
125
+ 580,
126
+ 344,
127
+ 597
128
+ ],
129
+ "page_idx": 1
130
+ },
131
+ {
132
+ "type": "text",
133
+ "text": "Multi-view 3D Reconstruction Our approach builds on a coarse geometric proxy that is obtained using multi-view 3D reconstruction based on COLMAP (Schonberger & Frahm, 2016). In the last ¨ decade, there has been a lot of progress in the field of image-based 3D reconstruction. Large-scale 3D models have been automatically obtained from images downloaded from the internet (Agarwal et al., 2011). Camera poses and intrinsic calibration parameters are estimated based on structurefrom-motion (Jebara et al., 1999; Schnberger & Frahm, 2016), which can be implemented based on a global bundle adjustment step (Triggs et al., 2000). Afterwards, based on the camera poses and calibration, a dense three-dimensional pointcloud of the scene can be obtained using a multi-view stereo reconstruction approach (Seitz et al., 2006; Goesele et al., 2007; Geiger et al., 2011). Finally, a triangulated surface mesh is obtained, for example using Poisson surface reconstruction (Kazhdan et al., 2006). Even specular objects can be reconstructed (Godard et al., 2015). ",
134
+ "bbox": [
135
+ 173,
136
+ 607,
137
+ 825,
138
+ 760
139
+ ],
140
+ "page_idx": 1
141
+ },
142
+ {
143
+ "type": "text",
144
+ "text": "Learning-based Image Synthesis Deep learning methods can improve quality in many realistic image synthesis tasks. Historically, many of these approaches have been based on generator networks following an encoder-decoder architecture (Hinton & Salakhutdinov, 2006; Kingma & Welling, 2013), such as a U-Net (Ronneberger et al., 2015a) with skip connections. Very recently, adversarially trained networks (Goodfellow et al., 2014; Isola et al., 2017; Mirza & Osindero, 2014; Radford et al., 2016) have shown some of the best result quality for various image synthesis tasks. For example, generative CNN models to synthesize body appearance (Esser et al., 2018), body articulation (Chan et al., 2018), body pose and appearance (Zhu et al., 2018; Liu et al., 2018), and face rendering (Kim et al., 2018; Thies et al., 2019) have been proposed. The DeepStereo approach of Flynn et al. (2016) trains a neural network for view synthesis based on a large set of posed images. Tulsiani et al. (2018) employ view synthesis as a proxy task to learn a layered scene representation. ",
145
+ "bbox": [
146
+ 173,
147
+ 771,
148
+ 825,
149
+ 924
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "View synthesis can be learned directly from light field data as shown by Kalantari et al. (2016). Appearance Flow (Zhou et al., 2016) learns an image warp based on a dense flow field to map information from the input to the target view. Zhou et al. (2018) learn to extrapolate stereo views from imagery captured by a narrow-baseline stereo camera. Park et al. (2017) explicitly decouple the view synthesis problem into an image warping and inpainting task. In the results, we also show that CNNs trained for image-to-image translation (Isola et al. (2016)) could be applied to novel view synthesis, also with assistance of a shape proxy. ",
156
+ "bbox": [
157
+ 174,
158
+ 103,
159
+ 823,
160
+ 202
161
+ ],
162
+ "page_idx": 2
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "Image-based Rendering Our approach is related to image-based rendering (IBR) algorithms that cross-project input views to the target via a geometry proxy, and blend the re-projected views (Buehler et al., 2001; Heigl et al., 1999; Carranza et al., 2003; Zheng et al., 2009). Many previous IBR approaches exhibit ghosting artifacts due to view blending on inaccurate geometry, or exhibit artifacts at occlusion boundaries. Some methods try to reduce these artifacts by combining view blending and optical flow correction (Eisemann et al., 2008; Casas et al., 2015; Du et al., 2018), by using view-specific geometry proxies (Chaurasia et al., 2013; Hedman et al., 2016), or by encoding uncertainty in geometry as soft 3D visibility (Penner & Zhang, 2017). Hedman et al. (2018) propose a hybrid approach between IBR and learning-based image synthesis. They use a CNN to learn a view blending function for image-based rendering with view-dependent shape proxies. In contrast, our learned IBR method learns to combine input views and to explicitly separate view-dependent effects which leads to better reproduction of view-dependent appearance. ",
167
+ "bbox": [
168
+ 174,
169
+ 213,
170
+ 825,
171
+ 380
172
+ ],
173
+ "page_idx": 2
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "Intrinsic Decomposition Intrinsic decomposition tackles the ill-posed problem of splitting an image into a set of layers that correspond to physical quantities such as surface reflectance, diffuse shading, and/or specular shading. The decomposition of monocular video into reflectance and shading is classically approached based on a set of hand-crafted priors (Bonneel et al., 2014; Ye et al., 2014; Meka et al., 2016). Other approaches specifically tackle the problem of estimating (Lin et al., 2002) or removing specular highlights (Yang et al., 2015). A diffuse/specular separation can also be obtained based on a set of multi-view images captured under varying illumination (Takechi & Okabe, 2017). The learning-based approach of Wu et al. (2018) converts a set of multi-view images of a specular object into corresponding diffuse images. An extensive overview is given in the survey paper of Bonneel et al. (2017). ",
178
+ "bbox": [
179
+ 173,
180
+ 392,
181
+ 825,
182
+ 531
183
+ ],
184
+ "page_idx": 2
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "3 OVERVIEW ",
189
+ "text_level": 1,
190
+ "bbox": [
191
+ 176,
192
+ 556,
193
+ 297,
194
+ 571
195
+ ],
196
+ "page_idx": 2
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "We propose a learning-based image-guided rendering approach that enables novel view synthesis for arbitrary objects. Input to our approach is a set of $N$ images $\\mathcal { I } = \\{ \\mathcal { I } _ { k } \\} _ { k = 1 } ^ { N }$ of an object with constant illumination. In a preprocess, we obtain camera pose estimates and a coarse proxy geometry using the $C O L M A P$ structure-from-motion approach (Schonberger¨ $\\&$ Frahm (2016); Sch onberger et al. ¨ (2016)). We use the reconstruction and the camera poses to render synthetic depth maps $\\mathcal { D } _ { k }$ for all input images $\\mathcal { T } _ { k }$ to obtain the training corpus $\\boldsymbol { \\mathcal { T } } = \\{ ( \\mathcal { T } _ { k } , \\mathcal { D } _ { k } ) \\} _ { k = 1 } ^ { N }$ , see Fig. 8. Based on this input, our learning-based approach generates novel views based on the stages that are depicted in Fig. 1. First, we employ a coverage-based look-up to select a small number $n \\ll N$ of fixed views from a subset of the training corpus. In our experiments, we are using a number of $n = 2 0$ frames, which we call reference images. Per target view, we select $K = 4$ nearest views from these reference images. Our EffectsNet predicts the view-dependent effects for these views and, thus, the corresponding view-independent components can be obtained via subtraction (Sec. 5). The view-independent component is explicitly warped to the target view using geometry-guided crossprojection (Sec. 6). Next, the view-dependent effects of the target view are predicted and added on top of the warped views. Finally, our CompositionNet is used to optimally combine all warped views to generate the final output (Sec. 6). In the following, we discuss details, show how our approach can be trained based on our training corpus (Sec. 4), and extensively evaluate our proposed approach (see Sec. 7 and the appendix). ",
201
+ "bbox": [
202
+ 173,
203
+ 589,
204
+ 825,
205
+ 840
206
+ ],
207
+ "page_idx": 2
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "4 TRAINING DATA ",
212
+ "text_level": 1,
213
+ "bbox": [
214
+ 176,
215
+ 864,
216
+ 341,
217
+ 881
218
+ ],
219
+ "page_idx": 2
220
+ },
221
+ {
222
+ "type": "text",
223
+ "text": "Our approach is trained in an object-specific manner, from scratch each time. The training corpus $\\mathcal { T } = \\widehat { \\{ ( \\mathcal { L } _ { k } , \\mathcal { D } _ { k } ) \\} } _ { k = 1 } ^ { N }$ consists of $N$ images $\\mathcal { T } _ { k }$ and depth maps $\\mathcal { D } _ { k }$ per object with constant light. ",
224
+ "bbox": [
225
+ 174,
226
+ 898,
227
+ 823,
228
+ 928
229
+ ],
230
+ "page_idx": 2
231
+ },
232
+ {
233
+ "type": "image",
234
+ "img_path": "images/d4f0038954e489c3a03bbac02977c808edabc3598d42c2407f35241c18303500.jpg",
235
+ "image_caption": [
236
+ "Figure 2: EffectsNet is trained in a self-supervised fashion. In a Siamese scheme, two random images from the training set are chosen and fed into the network to predict the view-dependent effects based on the current view and the respective depth map. After re-projecting the source image to the target image space we compute the diffuse color via subtraction. We optimize the network by minimizing the difference between the two diffuse images in the valid region. "
237
+ ],
238
+ "image_footnote": [],
239
+ "bbox": [
240
+ 174,
241
+ 99,
242
+ 797,
243
+ 239
244
+ ],
245
+ "page_idx": 3
246
+ },
247
+ {
248
+ "type": "text",
249
+ "text": "Synthetic Training Data To generate photo-realistic synthetic imagery we employ the Mitsuba Renderer (Jakob, 2010) to simulate global illumination effects. For each of the $N$ views, we raytrace a color image $\\mathcal { T } _ { k }$ and its corresponding depth map $\\mathcal { D } _ { k }$ . We extract a dense and smooth temporal camera path based on a spiral around the object. The camera is oriented towards the center of the object. All images have a resolution of $5 1 2 \\times 5 1 2$ and are rendered using path tracing with 96 samples per pixel and a maximum path length of 10. The size of the training sequence is 920, the test set contains 177 images. ",
250
+ "bbox": [
251
+ 174,
252
+ 340,
253
+ 825,
254
+ 438
255
+ ],
256
+ "page_idx": 3
257
+ },
258
+ {
259
+ "type": "text",
260
+ "text": "Real World Training Data Our real world training data is captured using a Nikon D5300 at a resolution of $1 9 2 0 \\times 1 0 8 0$ pixels. Since we rely on a sufficiently large set of images, we record videos of the objects at a frame rate of $3 0 \\mathrm { H z }$ . Based on COLMAP (Schonberger & Frahm, 2016; ¨ Schonberger et al., 2016), we reconstruct the camera path and a dense point cloud. We manually iso- ¨ late the target object from other reconstructed geometry and run a Poisson reconstruction (Kazhdan & Hoppe, 2013) step to extract the surface. We use this mesh to generate synthetic depth maps $\\mathcal { D } _ { k }$ corresponding to the images $\\mathcal { T } _ { k }$ (see Fig. 8). Finally, both, the color and depth images are cropped and re-scaled to a resolution of $5 1 2 \\times 5 1 2$ pixels. The training corpus ranges from 1000 to 1800 frames, depending on the sequence. ",
261
+ "bbox": [
262
+ 174,
263
+ 446,
264
+ 825,
265
+ 573
266
+ ],
267
+ "page_idx": 3
268
+ },
269
+ {
270
+ "type": "text",
271
+ "text": "5 EffectsNet ",
272
+ "text_level": 1,
273
+ "bbox": [
274
+ 174,
275
+ 593,
276
+ 285,
277
+ 611
278
+ ],
279
+ "page_idx": 3
280
+ },
281
+ {
282
+ "type": "text",
283
+ "text": "A main contribution of our work is a convolutional neural network that learns the disentanglement of view-dependent and view-independent effects in a self-supervised manner (see Fig. 2). Since our training data consists of a series of images taken from different viewing directions, assuming constant illumination, the reflected radiance of two corresponding points in two different images only differs by the view-dependent effects. Our self-supervised training procedure is based on a Siamese network that gets a pair of randomly selected images from the training set as input. The task of the network is to extract view-dependent lighting effects from an image, based on the geometric information from the proxy geometry. ",
284
+ "bbox": [
285
+ 174,
286
+ 626,
287
+ 825,
288
+ 737
289
+ ],
290
+ "page_idx": 3
291
+ },
292
+ {
293
+ "type": "text",
294
+ "text": "Network Inputs: Using a fixed projection layer, we back-project the input depth image $\\mathcal { D } _ { i }$ to world space using the intrinsic and extrinsic camera parameters that are known from the photogrammetric reconstruction. Based on this position map we generate normal maps via finite differences as well as a map of the reflected viewing directions. These inputs are inspired by the Phong illumination model (Phong, 1975) and are stacked along the dimension of the channels. Note, the network input is only dependent on the geometry and the current camera parameters, i.e., the view. Thus, it can also be applied to new target views based on the rendered depth of the proxy geometry. ",
295
+ "bbox": [
296
+ 174,
297
+ 746,
298
+ 825,
299
+ 844
300
+ ],
301
+ "page_idx": 3
302
+ },
303
+ {
304
+ "type": "text",
305
+ "text": "Network Architecture: Our network $\\Phi$ is an encoder-decoder network with skip connections, similar to U-Net (Ronneberger et al., 2015b). The skip connections can directly propagate lowlevel features to the decoder. The encoder is based on 6 convolution layers (kernel size 4 and stride 2). The convolution layers output 32, 32, 64, 128, 256 and 512-dimensional feature maps, respectively. We use the ReLU activation function and normalize activations based on batchnorm. ",
306
+ "bbox": [
307
+ 174,
308
+ 854,
309
+ 823,
310
+ 924
311
+ ],
312
+ "page_idx": 3
313
+ },
314
+ {
315
+ "type": "text",
316
+ "text": "The decoder mirrors the encoder. We use transposed convolutions (kernel size 4 and stride 2) with the same number of feature channels as in the respective encoder layer. As final layer we use a $4 \\times 4$ -convolution with a stride of 1 that outputs a 3-dimensional tensor that is fed to a Sigmoid to generate an image of the view-dependent illumination effects. ",
317
+ "bbox": [
318
+ 174,
319
+ 103,
320
+ 823,
321
+ 159
322
+ ],
323
+ "page_idx": 4
324
+ },
325
+ {
326
+ "type": "text",
327
+ "text": "Self-supervised Training: Since we assume constant illumination, the diffuse light reflected by a surface point is the same in every image, thus, the appearance of a surface point only changes by the view-dependent components. We train our network in a self-supervised manner based on a Siamese network that predicts the view-dependent effects of two random views such that the difference of the diffuse aligned images is minimal (see Fig. 2). To this end, we use the re-projection ability (see Sec. 6) to align pairs of input images, from which the view-dependent effects have been removed (original image minus view-dependent effects), and train the network to minimize the resulting differences in the overlap region of the two images. ",
328
+ "bbox": [
329
+ 173,
330
+ 166,
331
+ 825,
332
+ 279
333
+ ],
334
+ "page_idx": 4
335
+ },
336
+ {
337
+ "type": "text",
338
+ "text": "Given a randomly selected training pair $( \\mathcal { T } _ { p } , \\mathcal { T } _ { q } )$ and let $\\Phi _ { \\Theta } ( \\mathbf { X } _ { t } ) , \\ t \\in \\{ p , q \\}$ denote the output of the two Siamese towers. Then, our self-supervised loss for this training sample can be expressed as: ",
339
+ "bbox": [
340
+ 173,
341
+ 285,
342
+ 823,
343
+ 314
344
+ ],
345
+ "page_idx": 4
346
+ },
347
+ {
348
+ "type": "equation",
349
+ "img_path": "images/3883e108987481346dfea27367f71d11af7c71284948eb2cb6ed1efa2c3c588a.jpg",
350
+ "text": "$$\n\\begin{array} { r } { \\mathcal { L } _ { q } ^ { p } ( \\boldsymbol { \\Theta } ) = \\left| \\left| M \\circ \\left[ \\left( \\mathcal { T } _ { p } - \\Phi _ { \\Theta } ( \\mathbf { X } _ { p } ) \\right) - \\mathcal { W } _ { q } ^ { p } \\left( \\mathcal { T } _ { q } - \\Phi _ { \\Theta } ( \\mathbf { X } _ { q } ) \\right) \\right] \\right| \\right| _ { 2 } . } \\end{array}\n$$",
351
+ "text_format": "latex",
352
+ "bbox": [
353
+ 300,
354
+ 321,
355
+ 696,
356
+ 351
357
+ ],
358
+ "page_idx": 4
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "Here, $\\circ$ denotes the Hadamard product, $\\Theta$ are the parameters of the encoder-decoder network $\\Phi$ , which is shared between the two towers. $M$ is a binary mask that is set to one if a surface point is visible in both views and zero otherwise. We regularize the estimated view-dependent effects to be small w.r.t. an $\\ell _ { 1 }$ -norm. This regularizer is weighted with 0.01 in our experiments. The crossprojection $\\mathcal { W } _ { q } ^ { p }$ from image $p$ to image $q$ is based on the geometric proxy. ",
363
+ "bbox": [
364
+ 173,
365
+ 352,
366
+ 825,
367
+ 421
368
+ ],
369
+ "page_idx": 4
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "6 IMAGE-GUIDED RENDERING PIPELINE ",
374
+ "text_level": 1,
375
+ "bbox": [
376
+ 174,
377
+ 440,
378
+ 526,
379
+ 457
380
+ ],
381
+ "page_idx": 4
382
+ },
383
+ {
384
+ "type": "text",
385
+ "text": "To generate a novel target view, we select a subset of $K = 4$ images based on a coverage-based nearest neighbor search in the set of reference views $n = 2 0$ ). We use EffectsNet to estimate the view-dependent effects of these views, to compute diffuse images. Each diffuse image is crossprojected to the target view, based on the depth maps of the proxy geometry. Since the depth map of the target view is known, we are able to predict the view-dependent effects in the target image space. After adding these new effects to the reprojected diffuse images, we give these images as input to our composition network CompositionNet (see Sec. 6). CompositionNet fuses the information of the nearest neighbor images into a single output image. In the following, we describe the coveragebased sampling and the cross-projection, and we show how to use our EffectsNet to achieve a robust re-projection of the view-dependent effects. ",
386
+ "bbox": [
387
+ 174,
388
+ 470,
389
+ 825,
390
+ 611
391
+ ],
392
+ "page_idx": 4
393
+ },
394
+ {
395
+ "type": "text",
396
+ "text": "Coverage-based View Selection The selection of the $K$ nearest neighbor frames is based on surface coverage w.r.t. the target view. The goal is to have maximum coverage of the target view to ensure that texture information for the entire visible geometry is cross-projected. View selection is cast as an iterative process based on a greedy selection strategy that locally maximizes surface coverage. To this end, we start with $6 4 \\times 6 4$ sample points on a uniform grid on the target view. In each iteration step, we search the view that has the largest overlap with the currently ‘uncovered’ region in the target view. We determine this view by cross-projecting the samples from the target view to the captured images, based on the reconstructed proxy geometry and camera parameters. A sample point in the target view is considered as covered, if it is also visible from the other view point, where visibility is determined based on an occlusion check. Each sample point that is covered by the finally selected view is invalidated for the next iteration steps. This procedure is repeated until the $K$ best views have been selected. To keep processing time low, we restrict this search to a small subset of the input images. This set of reference images is taken from the training corpus and contains $n = 2 0$ images. We chose these views also based on the coverage-based selection scheme described above. I.e., we choose the views with most (unseen) coverage among all views in an iterative manner. Note that this selection is done in a pre-processing step and is independent of the test phase. ",
397
+ "bbox": [
398
+ 174,
399
+ 618,
400
+ 825,
401
+ 842
402
+ ],
403
+ "page_idx": 4
404
+ },
405
+ {
406
+ "type": "text",
407
+ "text": "Proxy-based Cross-projection We model the cross-projection $\\mathcal { W } _ { q } ^ { p }$ from image $p$ to image $q$ based on the reconstructed geometric proxy and the camera parameters. Let $\\mathbf { K } _ { p } \\in \\mathbb { R } ^ { 4 \\times 3 }$ denote the matrix of intrinsic parameters and $\\mathbf { T } _ { p } = [ \\mathbf { R } _ { p } | \\mathbf { t } _ { p } ] \\in \\mathbb { R } ^ { 4 \\times 4 }$ the matrix of extrinsic parameters of view $p$ . A similar notation holds for view $q$ . Then, a homogeneous 2D screen space point $\\mathbf { s } _ { p } = ( u , v , d ) ^ { T } \\in \\mathbb { R } ^ { 3 }$ in view $p$ , with depth being $d$ , can be mapped to screen space of view $q$ by: $\\mathbf { s } _ { q } = \\mathcal { W } _ { q } ^ { p } ( \\mathbf { s } _ { p } )$ , with $\\mathscr { W } _ { q } ^ { p } ( \\mathbf { s } _ { p } ) = \\mathbf { K } _ { q } \\mathbf { T } _ { q } \\mathbf { T } _ { p } ^ { - 1 } \\mathbf { K } _ { p } ^ { - 1 } \\mathbf { s } _ { p }$ . We employ this mapping to cross-project color information from a source view to a novel target view. To this end, we map every valid pixel (with a depth estimate) from the target view to the source view. The color information from the source view is sampled based on bilinear interpolation. Projected points that are occluded in the source view or are not in the view frustum are invalidated. Occlusion is determined by a depth test w.r.t. the source depth map. Applying the cross-projection to the set of all nearest neighbor images, we get multiple images that match the novel target view point. ",
408
+ "bbox": [
409
+ 174,
410
+ 848,
411
+ 825,
412
+ 924
413
+ ],
414
+ "page_idx": 4
415
+ },
416
+ {
417
+ "type": "text",
418
+ "text": "",
419
+ "bbox": [
420
+ 174,
421
+ 103,
422
+ 825,
423
+ 202
424
+ ],
425
+ "page_idx": 5
426
+ },
427
+ {
428
+ "type": "text",
429
+ "text": "View-dependent Effects Image-based rendering methods often have problems with the reprojection of view-dependent effects (see Sec. 7). In our image-guided pipeline, we solve this problem using EffectsNet. Before re-projection, we estimate the view-dependent effects from the input images and subtract them. By this, view-dependent effects are excluded from warping. Viewdependent effects are then re-inserted after re-projection, again using EffectsNet based on the target view depth map. ",
430
+ "bbox": [
431
+ 174,
432
+ 213,
433
+ 825,
434
+ 297
435
+ ],
436
+ "page_idx": 5
437
+ },
438
+ {
439
+ "type": "text",
440
+ "text": "CompositionNet: Image compositing The warped nearest views are fused using a deep neural network called CompositionNet. Similar to the EffectsNet, our CompositionNet is an encoderdecoder network with skip connections. The network input is a tensor that stacks the $K$ warped views, the corresponding warp fields as well as the target position map along the dimension of the channels and the output is a three channel RGB image. The encoder is based on 6 convolution layers (kernel size 4 and stride 2) with 64, 64, 128, 128, 256 and 256-dimensional feature maps, respectively. The activation functions are leaky ReLUs (negative slope of 0.2) in the encoder and ReLUs in the decoder. In both cases, we normalize all activations based on batchnorm. The decoder mirrors the encoder. We use transposed convolutions (kernel size 4 and stride 2) with the same number of feature channels as in the respective encoder layer. As final layer we use a $4 \\times 4$ -convolution with a stride of 1 and a Sigmoid activation function that outputs the final image. ",
441
+ "bbox": [
442
+ 174,
443
+ 309,
444
+ 825,
445
+ 462
446
+ ],
447
+ "page_idx": 5
448
+ },
449
+ {
450
+ "type": "text",
451
+ "text": "We are using an $\\ell _ { 1 }$ -loss and an additional adversarial loss to measure the difference between the predicted output images and the ground truth data. The adversarial loss is based on the conditional PatchGAN loss that is also used in Pix2Pix (Isola et al., 2016). In our experiments, we are weighting the adversarial loss with a factor of 0.01 and the $\\ell _ { 1 }$ -loss with a factor of 1.0. ",
452
+ "bbox": [
453
+ 174,
454
+ 469,
455
+ 825,
456
+ 525
457
+ ],
458
+ "page_idx": 5
459
+ },
460
+ {
461
+ "type": "text",
462
+ "text": "Training Per object, both networks are trained independently using the Adam optimizer (Kingma & Ba, 2014) built into Tensorflow (Abadi et al., 2015). Each network is trained for 64 epochs with a learning rate of 0.001 and the default parameters $\\beta _ { 1 } = 0 . 9$ , $\\beta _ { 2 } = 0 . 9 9 9$ , $\\epsilon = 1 \\cdot e ^ { - 8 }$ . ",
463
+ "bbox": [
464
+ 174,
465
+ 545,
466
+ 825,
467
+ 587
468
+ ],
469
+ "page_idx": 5
470
+ },
471
+ {
472
+ "type": "text",
473
+ "text": "7 RESULTS ",
474
+ "text_level": 1,
475
+ "bbox": [
476
+ 174,
477
+ 611,
478
+ 281,
479
+ 627
480
+ ],
481
+ "page_idx": 5
482
+ },
483
+ {
484
+ "type": "text",
485
+ "text": "The main contribution of our work is to combine the benefits of IBR and 2D GANs, a hybrid that is able to generate temporally-stable view changes including view-dependent effects. We analyze our approach both qualitatively and quantitatively, and show comparisons to IBR as well as to 2D GAN-based methods. For all experiments we used $K = 4$ views per frame selected from $n = 2 0$ reference views. An overview of all image reconstruction errors is given in Tab. 1 in the appendix. The advantages of our approach can best be seen in the supplemental video, especially, the temporal coherence. ",
486
+ "bbox": [
487
+ 174,
488
+ 645,
489
+ 825,
490
+ 742
491
+ ],
492
+ "page_idx": 5
493
+ },
494
+ {
495
+ "type": "text",
496
+ "text": "Using synthetic data we are quantitatively analyzing the performance of our image-based rendering approach. We refer to the Appendix A.2.1 for a detailed ablation study w.r.t. the training corpus and comparisons to classical and learned image-based rendering techniques. Since the EffectsNet is a core component of our algorithm, we compare our technique with and without EffectsNet (see Fig. 3) using synthetic data. The full pipeline results in smoother specular highlights and sharper details. On the test set the MSE without EffectsNet is 2.6876 versus 2.3864 with EffectsNet. ",
497
+ "bbox": [
498
+ 173,
499
+ 750,
500
+ 823,
501
+ 833
502
+ ],
503
+ "page_idx": 5
504
+ },
505
+ {
506
+ "type": "text",
507
+ "text": "The following experiments are conducted on real data. Fig. 4 shows the effectiveness of our EffectsNet to estimate the specular effects in an image. The globe has a specular surface and reflects the ceiling lights. These specular highlights are estimated and removed from the original image of the object which results in a diffuse image of the object. In Fig. 5 we show a comparison to $P i x 2 P i x$ trained on position maps. Similar to the synthetic experiments in the appendix, our method results in higher quality. ",
508
+ "bbox": [
509
+ 174,
510
+ 840,
511
+ 825,
512
+ 924
513
+ ],
514
+ "page_idx": 5
515
+ },
516
+ {
517
+ "type": "image",
518
+ "img_path": "images/40a0fd55a2786cc6840f2f35cde0c7904b7f28017381bb70b4ef9a895815bbc0.jpg",
519
+ "image_caption": [
520
+ "Figure 3: Ablation study w.r.t. the EffectsNet. Without EffectsNet the specular highlights are not as smooth as the ground truth. Besides, the EffectsNet leads to a visually consistent temporal animation of the view-dependent effects. The close-ups show the color difference w.r.t. ground truth. "
521
+ ],
522
+ "image_footnote": [],
523
+ "bbox": [
524
+ 176,
525
+ 99,
526
+ 816,
527
+ 224
528
+ ],
529
+ "page_idx": 6
530
+ },
531
+ {
532
+ "type": "image",
533
+ "img_path": "images/5366ce54340c75f5ba2223afee676d1ae5aa177b9555e71c191fa3e6448bdc90.jpg",
534
+ "image_caption": [
535
+ "Figure 4: Prediction and removal of view-dependent effects of a highly specular real object. "
536
+ ],
537
+ "image_footnote": [],
538
+ "bbox": [
539
+ 187,
540
+ 313,
541
+ 805,
542
+ 484
543
+ ],
544
+ "page_idx": 6
545
+ },
546
+ {
547
+ "type": "text",
548
+ "text": "We also compare to the state-of-the-art image-based rendering approach of Hedman et al. (2018). The idea of this technique is to use a neural network to predict blending weights for a image-based rendering composition like InsideOut (Hedman et al., 2016). Note that this method uses the per frame reconstructed depth maps of 20 reference frames in addition to the fused 3D mesh. As can be seen in Fig. 6, the results are of high-quality, achieving an MSE of 45.07 for DeepBlending and an MSE of 51.17 for InsideOut. Our object-specific rendering results in an error of 25.24. Both methods of Hedman et al., do not explicitly handle the correction of view-dependent effects. In contrast, our approach uses EffectsNet to remove the view-dependent effect in the source views (thus, enabling the projection to a different view) and to add new view-dependent effect in the target view. This can be seen in the bottom row of Fig. 6, where we computed the quotient between reconstruction and ground truth showing the shading difference. ",
549
+ "bbox": [
550
+ 174,
551
+ 546,
552
+ 825,
553
+ 699
554
+ ],
555
+ "page_idx": 6
556
+ },
557
+ {
558
+ "type": "text",
559
+ "text": "8 LIMITATIONS ",
560
+ "text_level": 1,
561
+ "bbox": [
562
+ 176,
563
+ 727,
564
+ 316,
565
+ 743
566
+ ],
567
+ "page_idx": 6
568
+ },
569
+ {
570
+ "type": "text",
571
+ "text": "Our approach is trained in an object specific manner. This is a limitation of our method, but also ensures the optimal results that can be generated using our architecture. Since the multi-view stereo reconstruction of an object is an offline algorithm that takes about an hour, we think that training the object specific networks (EffectsNet and CompositionNet) that takes a similar amount of time is practically feasible. The training of these networks can be seen as reconstruction refinement that also includes the appearance of the object. At test time our approach runs at interactive rates, the inference time of EffectsNet is $5 0 \\mathrm { H z }$ , while CompositionNet runs at $1 0 \\mathrm { H z }$ on an Nvidia 1080Ti. Note that our approach fails, when the stereo reconstruction fails. ",
572
+ "bbox": [
573
+ 174,
574
+ 762,
575
+ 825,
576
+ 875
577
+ ],
578
+ "page_idx": 6
579
+ },
580
+ {
581
+ "type": "text",
582
+ "text": "Similar to other learning based approaches, the method is relying on a reasonable large training dataset. In the appendix, we conducted an ablation study regarding the dataset size, where our approach gracefully degenerates while a pure learning-based approach shows strong artifacts. ",
583
+ "bbox": [
584
+ 176,
585
+ 882,
586
+ 823,
587
+ 924
588
+ ],
589
+ "page_idx": 6
590
+ },
591
+ {
592
+ "type": "image",
593
+ "img_path": "images/cc3bf327008a41d34db3c32ded22c38b4e1558ea7ea04e14408a648e148dc9fc.jpg",
594
+ "image_caption": [
595
+ "Figure 5: Comparison to $P i x 2 P i x$ on real data. It can be seen that $P i x 2 P i x$ can be used to synthesize novel views. The close-up shows the artifacts that occur with Pix2Pix and are resolved by our approach leading to higher fidelity results. "
596
+ ],
597
+ "image_footnote": [],
598
+ "bbox": [
599
+ 222,
600
+ 99,
601
+ 772,
602
+ 253
603
+ ],
604
+ "page_idx": 7
605
+ },
606
+ {
607
+ "type": "image",
608
+ "img_path": "images/fdeb75810cd2fd2cfe798de0350df6c1e2e0fc21b1bfb7a3dce2f63f64730687.jpg",
609
+ "image_caption": [
610
+ "Figure 6: Comparison to the IBR method InsideOut of Hedman et al. (2016) and the learned IBR blending method DeepBlending of Hedman et al. (2018). To better show the difference in shading, we computed the quotient of the resulting image and the ground truth. A perfect reconstruction would result in a quotient of 1. As can be seen our approach leads to a more uniform error, while the methods of Hedman et al. show shading errors due to the view-dependent effects. "
611
+ ],
612
+ "image_footnote": [],
613
+ "bbox": [
614
+ 178,
615
+ 309,
616
+ 825,
617
+ 563
618
+ ],
619
+ "page_idx": 7
620
+ },
621
+ {
622
+ "type": "text",
623
+ "text": "9 CONCLUSION ",
624
+ "text_level": 1,
625
+ "bbox": [
626
+ 174,
627
+ 659,
628
+ 318,
629
+ 674
630
+ ],
631
+ "page_idx": 7
632
+ },
633
+ {
634
+ "type": "text",
635
+ "text": "In this paper, we propose a novel image-guided rendering approach that outputs photo-realistic images of an object. We demonstrate the effectiveness of our method in a variety of experiments. The comparisons to competing methods show on-par or even better results, especially, in the presence of view-dependent effects that can be handled using our EffectsNet. We hope to inspire follow-up work in self-supervised re-rendering using deep neural networks. ",
636
+ "bbox": [
637
+ 174,
638
+ 690,
639
+ 825,
640
+ 760
641
+ ],
642
+ "page_idx": 7
643
+ },
644
+ {
645
+ "type": "text",
646
+ "text": "ACKNOWLEDGEMENTS ",
647
+ "text_level": 1,
648
+ "bbox": [
649
+ 176,
650
+ 781,
651
+ 367,
652
+ 796
653
+ ],
654
+ "page_idx": 7
655
+ },
656
+ {
657
+ "type": "text",
658
+ "text": "We thank Artec $3 \\mathrm { D } ^ { 1 }$ for providing scanned 3D models and Angela Dai for the video voice over. This work is funded by a Google Research Grant, supported by the ERC Starting Grant Scan2CAD (804724), ERC Starting Grant CapReal (335545), and the ERC Consolidator Grant 4DRepLy (770784), the Max Planck Center for Visual Computing and Communication (MPC-VCC), a TUMIAS Rudolf Moßbauer Fellowship (Focus Group Visual Computing), and a Google Faculty Award. ¨ In addition, this work is funded by Sony and the German Research Foundation (DFG) Grant Making Machine Learning on Static and Dynamic 3D Data Practical, and supported by Nvidia. ",
659
+ "bbox": [
660
+ 174,
661
+ 803,
662
+ 825,
663
+ 900
664
+ ],
665
+ "page_idx": 7
666
+ },
667
+ {
668
+ "type": "text",
669
+ "text": "REFERENCES ",
670
+ "text_level": 1,
671
+ "bbox": [
672
+ 176,
673
+ 103,
674
+ 285,
675
+ 117
676
+ ],
677
+ "page_idx": 8
678
+ },
679
+ {
680
+ "type": "text",
681
+ "text": "Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dandelion Mane, Rajat Monga, Sherry Moore, Derek Murray, Chris ´ Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda Viegas, Oriol Vinyals, Pete Warden, Martin Wat- ´ tenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. URL https://www.tensorflow.org/. Software available from tensorflow.org. ",
682
+ "bbox": [
683
+ 174,
684
+ 126,
685
+ 825,
686
+ 252
687
+ ],
688
+ "page_idx": 8
689
+ },
690
+ {
691
+ "type": "text",
692
+ "text": "Sameer Agarwal, Yasutaka Furukawa, Noah Snavely, Ian Simon, Brian Curless, Steven M. Seitz, and Richard Szeliski. Building rome in a day. Commun. ACM, 54(10):105–112, October 2011. ISSN 0001-0782. doi: 10.1145/2001269.2001293. URL http://doi.acm.org/10.1145/ 2001269.2001293. ",
693
+ "bbox": [
694
+ 174,
695
+ 260,
696
+ 825,
697
+ 316
698
+ ],
699
+ "page_idx": 8
700
+ },
701
+ {
702
+ "type": "text",
703
+ "text": "Nicolas Bonneel, Kalyan Sunkavalli, James Tompkin, Deqing Sun, Sylvain Paris, and Hanspeter Pfister. Interactive Intrinsic Video Editing. ACM Transactions on Graphics (SIGGRAPH Asia 2014), 33(6), 2014. ",
704
+ "bbox": [
705
+ 173,
706
+ 325,
707
+ 826,
708
+ 367
709
+ ],
710
+ "page_idx": 8
711
+ },
712
+ {
713
+ "type": "text",
714
+ "text": "Nicolas Bonneel, Balazs Kovacs, Sylvain Paris, and Kavita Bala. Intrinsic Decompositions for Image Editing. Computer Graphics Forum (Eurographics State of the Art Reports 2017), 36(2), 2017. ",
715
+ "bbox": [
716
+ 173,
717
+ 376,
718
+ 823,
719
+ 420
720
+ ],
721
+ "page_idx": 8
722
+ },
723
+ {
724
+ "type": "text",
725
+ "text": "Chris Buehler, Michael Bosse, Leonard McMillan, Steven Gortler, and Michael Cohen. Unstructured lumigraph rendering. In Proceedings of the 28th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH ’01, pp. 425–432, New York, NY, USA, 2001. ACM. ISBN 1-58113-374-X. doi: 10.1145/383259.383309. URL http://doi.acm.org/10. 1145/383259.383309. ",
726
+ "bbox": [
727
+ 173,
728
+ 428,
729
+ 825,
730
+ 498
731
+ ],
732
+ "page_idx": 8
733
+ },
734
+ {
735
+ "type": "text",
736
+ "text": "Joel Carranza, Christian Theobalt, Marcus A. Magnor, and Hans-Peter Seidel. Free-viewpoint video of human actors. ACM Trans. Graph. (Proc. SIGGRAPH), 22(3):569–577, July 2003. ISSN 0730- 0301. doi: 10.1145/882262.882309. URL http://doi.acm.org/10.1145/882262. 882309. ",
737
+ "bbox": [
738
+ 173,
739
+ 507,
740
+ 825,
741
+ 563
742
+ ],
743
+ "page_idx": 8
744
+ },
745
+ {
746
+ "type": "text",
747
+ "text": "Dan Casas, Christian Richardt, John P. Collomosse, Christian Theobalt, and Adrian Hilton. 4d model flow: Precomputed appearance alignment for real-time 4d video interpolation. Comput. Graph. Forum, 34(7):173–182, 2015. ",
748
+ "bbox": [
749
+ 173,
750
+ 571,
751
+ 825,
752
+ 614
753
+ ],
754
+ "page_idx": 8
755
+ },
756
+ {
757
+ "type": "text",
758
+ "text": "C. Chan, S. Ginosar, T. Zhou, and A. A. Efros. Everybody Dance Now. ArXiv e-prints, August 2018. ",
759
+ "bbox": [
760
+ 173,
761
+ 625,
762
+ 823,
763
+ 652
764
+ ],
765
+ "page_idx": 8
766
+ },
767
+ {
768
+ "type": "text",
769
+ "text": "Gaurav Chaurasia, Sylvain Duchene, Olga Sorkine-Hornung, and George Drettakis. Depth synthesis and local warps for plausible image-based navigation. ACM Trans. Graph., 32(3):30:1–30:12, July 2013. ISSN 0730-0301. ",
770
+ "bbox": [
771
+ 173,
772
+ 661,
773
+ 825,
774
+ 704
775
+ ],
776
+ "page_idx": 8
777
+ },
778
+ {
779
+ "type": "text",
780
+ "text": "Paul Debevec, Yizhou Yu, and George Boshokov. Efficient view-dependent IBR with projective texture-mapping. EG Rendering Workshop, 1998. ",
781
+ "bbox": [
782
+ 171,
783
+ 713,
784
+ 825,
785
+ 742
786
+ ],
787
+ "page_idx": 8
788
+ },
789
+ {
790
+ "type": "text",
791
+ "text": "Ruofei Du, Ming Chuang, Wayne Chang, Hugues Hoppe, and Amitabh Varshney. Montage4d: Interactive seamless fusion of multiview video textures. In Proceedings of the ACM SIGGRAPH Symposium on Interactive 3D Graphics and Games, I3D ’18, pp. 5:1–5:11, New York, NY, USA, 2018. ACM. ISBN 978-1-4503-5705-0. doi: 10.1145/3190834.3190843. URL http://doi. acm.org/10.1145/3190834.3190843. ",
792
+ "bbox": [
793
+ 173,
794
+ 751,
795
+ 825,
796
+ 820
797
+ ],
798
+ "page_idx": 8
799
+ },
800
+ {
801
+ "type": "text",
802
+ "text": "M. Eisemann, B. De Decker, M. Magnor, P. Bekaert, E. De Aguiar, N. Ahmed, C. Theobalt, and A. Sellent. Floating Textures. Computer Graphics Forum (Proc. EUROGRAHICS, 2008. ISSN 1467-8659. doi: 10.1111/j.1467-8659.2008.01138.x. ",
803
+ "bbox": [
804
+ 179,
805
+ 829,
806
+ 823,
807
+ 872
808
+ ],
809
+ "page_idx": 8
810
+ },
811
+ {
812
+ "type": "text",
813
+ "text": "Patrick Esser, Ekaterina Sutter, and Bjorn Ommer. A variational u-net for conditional appearance ¨ and shape generation. CoRR, abs/1804.04694, 2018. URL http://arxiv.org/abs/1804. 04694. ",
814
+ "bbox": [
815
+ 174,
816
+ 882,
817
+ 823,
818
+ 922
819
+ ],
820
+ "page_idx": 8
821
+ },
822
+ {
823
+ "type": "text",
824
+ "text": "John Flynn, Ivan Neulander, James Philbin, and Noah Snavely. Deepstereo: Learning to predict new views from the world’s imagery. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. URL http://www.cv-foundation.org/openaccess/ content_cvpr_2016/html/Flynn_DeepStereo_Learning_to_CVPR_2016_ paper.html. ",
825
+ "bbox": [
826
+ 173,
827
+ 103,
828
+ 826,
829
+ 174
830
+ ],
831
+ "page_idx": 9
832
+ },
833
+ {
834
+ "type": "text",
835
+ "text": "Andreas Geiger, Julius Ziegler, and Christoph Stiller. Stereoscan: Dense 3d reconstruction in realtime. In Intelligent Vehicles Symposium, pp. 963–968. IEEE, 2011. ISBN 978-1-4577-0890-9. ",
836
+ "bbox": [
837
+ 173,
838
+ 181,
839
+ 820,
840
+ 210
841
+ ],
842
+ "page_idx": 9
843
+ },
844
+ {
845
+ "type": "text",
846
+ "text": "Clment Godard, Peter Hedman, Wenbin Li, and Gabriel J. Brostow. Multi-view Reconstruction of Highly Specular Surfaces in Uncontrolled Environments. In 3DV, 2015. ",
847
+ "bbox": [
848
+ 173,
849
+ 218,
850
+ 823,
851
+ 246
852
+ ],
853
+ "page_idx": 9
854
+ },
855
+ {
856
+ "type": "text",
857
+ "text": "Michael Goesele, Noah Snavely, Brian Curless, Hugues Hoppe, and Steven M. Seitz. Multi-view stereo for community photo collections. In ICCV, pp. 1–8. IEEE Computer Society, 2007. ISBN 978-1-4244-1631-8. ",
858
+ "bbox": [
859
+ 173,
860
+ 253,
861
+ 825,
862
+ 296
863
+ ],
864
+ "page_idx": 9
865
+ },
866
+ {
867
+ "type": "text",
868
+ "text": "Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. 2014. ",
869
+ "bbox": [
870
+ 169,
871
+ 304,
872
+ 823,
873
+ 334
874
+ ],
875
+ "page_idx": 9
876
+ },
877
+ {
878
+ "type": "text",
879
+ "text": "Peter Hedman, Tobias Ritschel, George Drettakis, and Gabriel Brostow. Scalable Inside-Out ImageBased Rendering. 35(6):231:1–231:11, 2016. ",
880
+ "bbox": [
881
+ 171,
882
+ 340,
883
+ 823,
884
+ 371
885
+ ],
886
+ "page_idx": 9
887
+ },
888
+ {
889
+ "type": "text",
890
+ "text": "Peter Hedman, Julien Philip, True Price, Jan-Michael Frahm, George Drettakis, and Gabriel Brostow. Deep blending for free-viewpoint image-based rendering. ACM Transactions on Graphics (SIGGRAPH Asia Conference Proceedings), 37(6), November 2018. URL http://www-sop. inria.fr/reves/Basilic/2018/HPPFDB18. ",
891
+ "bbox": [
892
+ 173,
893
+ 377,
894
+ 825,
895
+ 434
896
+ ],
897
+ "page_idx": 9
898
+ },
899
+ {
900
+ "type": "text",
901
+ "text": "Benno Heigl, Reinhard Koch, Marc Pollefeys, Joachim Denzler, and Luc J. Van Gool. Plenoptic modeling and rendering from image sequences taken by hand-held camera. In Proc. DAGM, pp. 94–101, 1999. ",
902
+ "bbox": [
903
+ 173,
904
+ 441,
905
+ 823,
906
+ 484
907
+ ],
908
+ "page_idx": 9
909
+ },
910
+ {
911
+ "type": "text",
912
+ "text": "Geoffrey E. Hinton and Ruslan Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504–507, July 2006. ISSN 0036-8075. doi: 10.1126/science. 1127647. ",
913
+ "bbox": [
914
+ 173,
915
+ 492,
916
+ 821,
917
+ 535
918
+ ],
919
+ "page_idx": 9
920
+ },
921
+ {
922
+ "type": "text",
923
+ "text": "Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. arxiv, 2016. ",
924
+ "bbox": [
925
+ 169,
926
+ 542,
927
+ 823,
928
+ 571
929
+ ],
930
+ "page_idx": 9
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A. Efros. Image-to-image translation with conditional adversarial networks. pp. 5967–5976, 2017. doi: 10.1109/CVPR.2017.632. ",
935
+ "bbox": [
936
+ 173,
937
+ 579,
938
+ 823,
939
+ 608
940
+ ],
941
+ "page_idx": 9
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "Shahram Izadi, David Kim, Otmar Hilliges, David Molyneaux, Richard Newcombe, Pushmeet Kohli, Jamie Shotton, Steve Hodges, Dustin Freeman, Andrew Davison, and Andrew Fitzgibbon. Kinectfusion: Real-time 3d reconstruction and interaction using a moving depth camera. In Proceedings of the 24th Annual ACM Symposium on User Interface Software and Technology, UIST ’11, pp. 559–568, New York, NY, USA, 2011. ACM. ISBN 978-1-4503-0716-1. doi: 10. 1145/2047196.2047270. URL http://doi.acm.org/10.1145/2047196.2047270. ",
946
+ "bbox": [
947
+ 174,
948
+ 616,
949
+ 825,
950
+ 700
951
+ ],
952
+ "page_idx": 9
953
+ },
954
+ {
955
+ "type": "text",
956
+ "text": "Wenzel Jakob. Mitsuba renderer, 2010. http://www.mitsuba-renderer.org. ",
957
+ "bbox": [
958
+ 174,
959
+ 707,
960
+ 655,
961
+ 723
962
+ ],
963
+ "page_idx": 9
964
+ },
965
+ {
966
+ "type": "text",
967
+ "text": "T. Jebara, A. Azarbayejani, and A. Pentland. 3d structure from 2d motion. IEEE Signal Processing Magazine, 16(3):66–84, May 1999. ISSN 1053-5888. doi: 10.1109/79.768574. ",
968
+ "bbox": [
969
+ 174,
970
+ 729,
971
+ 823,
972
+ 758
973
+ ],
974
+ "page_idx": 9
975
+ },
976
+ {
977
+ "type": "text",
978
+ "text": "Nima Khademi Kalantari, Ting-Chun Wang, and Ravi Ramamoorthi. Learning-based view synthesis for light field cameras. ACM Transactions on Graphics (Proceedings of SIGGRAPH Asia 2016), 35(6), 2016. ",
979
+ "bbox": [
980
+ 173,
981
+ 767,
982
+ 823,
983
+ 809
984
+ ],
985
+ "page_idx": 9
986
+ },
987
+ {
988
+ "type": "text",
989
+ "text": "Michael Kazhdan and Hugues Hoppe. Screened poisson surface reconstruction. ACM Trans. Graph., 32(3):29:1–29:13, July 2013. ISSN 0730-0301. doi: 10.1145/2487228.2487237. URL http: //doi.acm.org/10.1145/2487228.2487237. ",
990
+ "bbox": [
991
+ 171,
992
+ 818,
993
+ 823,
994
+ 859
995
+ ],
996
+ "page_idx": 9
997
+ },
998
+ {
999
+ "type": "text",
1000
+ "text": "Michael Kazhdan, Matthew Bolitho, and Hugues Hoppe. Poisson surface reconstruction. In Proceedings of the Fourth Eurographics Symposium on Geometry Processing, SGP ’06, pp. 61–70, Aire-la-Ville, Switzerland, Switzerland, 2006. Eurographics Association. ISBN 3-905673-36-3. URL http://dl.acm.org/citation.cfm?id=1281957.1281965. ",
1001
+ "bbox": [
1002
+ 174,
1003
+ 867,
1004
+ 825,
1005
+ 924
1006
+ ],
1007
+ "page_idx": 9
1008
+ },
1009
+ {
1010
+ "type": "text",
1011
+ "text": "H. Kim, P. Garrido, A. Tewari, W. Xu, J. Thies, N. Nießner, P. Perez, C. Richardt, M. Zollh ´ ofer, and ¨ C. Theobalt. Deep Video Portraits. ACM Transactions on Graphics 2018 (TOG), 2018. ",
1012
+ "bbox": [
1013
+ 171,
1014
+ 103,
1015
+ 825,
1016
+ 133
1017
+ ],
1018
+ "page_idx": 10
1019
+ },
1020
+ {
1021
+ "type": "text",
1022
+ "text": "Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. URL http://arxiv.org/abs/1412.6980. ",
1023
+ "bbox": [
1024
+ 171,
1025
+ 142,
1026
+ 823,
1027
+ 172
1028
+ ],
1029
+ "page_idx": 10
1030
+ },
1031
+ {
1032
+ "type": "text",
1033
+ "text": "Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. CoRR, abs/1312.6114, 2013. URL http://dblp.uni-trier.de/db/journals/corr/corr1312.html# KingmaW13. ",
1034
+ "bbox": [
1035
+ 173,
1036
+ 181,
1037
+ 825,
1038
+ 224
1039
+ ],
1040
+ "page_idx": 10
1041
+ },
1042
+ {
1043
+ "type": "text",
1044
+ "text": "Stephen Lin, Yuanzhen Li, Sing Bing Kang, Xin Tong, and Heung-Yeung Shum. Diffuse-specular separation and depth recovery from image sequences. In Proceedings of the 7th European Conference on Computer Vision-Part III, ECCV $\\cdot _ { 0 2 }$ , pp. 210–224, Berlin, Heidelberg, 2002. Springer-Verlag. ISBN 3-540-43746-0. URL http://dl.acm.org/citation.cfm?id= 645317.649345. ",
1045
+ "bbox": [
1046
+ 173,
1047
+ 234,
1048
+ 825,
1049
+ 305
1050
+ ],
1051
+ "page_idx": 10
1052
+ },
1053
+ {
1054
+ "type": "text",
1055
+ "text": "Lingjie Liu, Weipeng Xu, Michael Zollhoefer, Hyeongwoo Kim, Florian Bernard, Marc Habermann, Wenping Wang, and Christian Theobalt. Neural animation and reenactment of human actor videos, 2018. ",
1056
+ "bbox": [
1057
+ 173,
1058
+ 314,
1059
+ 823,
1060
+ 358
1061
+ ],
1062
+ "page_idx": 10
1063
+ },
1064
+ {
1065
+ "type": "text",
1066
+ "text": "Abhimitra Meka, Michael Zollhoefer, Christian Richardt, and Christian Theobalt. Live intrinsic video. ACM Transactions on Graphics (Proceedings SIGGRAPH), 35(4), 2016. ",
1067
+ "bbox": [
1068
+ 171,
1069
+ 367,
1070
+ 823,
1071
+ 397
1072
+ ],
1073
+ "page_idx": 10
1074
+ },
1075
+ {
1076
+ "type": "text",
1077
+ "text": "Mehdi Mirza and Simon Osindero. Conditional generative adversarial nets. arXiv:1411.1784, 2014. URL https://arxiv.org/abs/1411.1784. ",
1078
+ "bbox": [
1079
+ 174,
1080
+ 406,
1081
+ 821,
1082
+ 436
1083
+ ],
1084
+ "page_idx": 10
1085
+ },
1086
+ {
1087
+ "type": "text",
1088
+ "text": "M. Nießner, M. Zollhofer, S. Izadi, and M. Stamminger. Real-time 3d reconstruction at scale using ¨ voxel hashing. ACM Transactions on Graphics (TOG), 2013. ",
1089
+ "bbox": [
1090
+ 171,
1091
+ 445,
1092
+ 823,
1093
+ 476
1094
+ ],
1095
+ "page_idx": 10
1096
+ },
1097
+ {
1098
+ "type": "text",
1099
+ "text": "Eunbyung Park, Jimei Yang, Ersin Yumer, Duygu Ceylan, and Alexander C. Berg. Transformationgrounded image generation network for novel 3d view synthesis. CoRR, abs/1703.02921, 2017. ",
1100
+ "bbox": [
1101
+ 173,
1102
+ 484,
1103
+ 823,
1104
+ 515
1105
+ ],
1106
+ "page_idx": 10
1107
+ },
1108
+ {
1109
+ "type": "text",
1110
+ "text": "Eric Penner and Li Zhang. Soft 3d reconstruction for view synthesis. ACM Trans. Graph., 36(6): 235:1–235:11, November 2017. ISSN 0730-0301. ",
1111
+ "bbox": [
1112
+ 171,
1113
+ 525,
1114
+ 825,
1115
+ 554
1116
+ ],
1117
+ "page_idx": 10
1118
+ },
1119
+ {
1120
+ "type": "text",
1121
+ "text": "Bui Tuong Phong. Illumination for computer generated pictures. Commun. ACM, 18(6):311–317, June 1975. ISSN 0001-0782. doi: 10.1145/360825.360839. URL http://doi.acm.org/ 10.1145/360825.360839. ",
1122
+ "bbox": [
1123
+ 173,
1124
+ 564,
1125
+ 825,
1126
+ 606
1127
+ ],
1128
+ "page_idx": 10
1129
+ },
1130
+ {
1131
+ "type": "text",
1132
+ "text": "Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. 2016. ",
1133
+ "bbox": [
1134
+ 171,
1135
+ 616,
1136
+ 825,
1137
+ 646
1138
+ ],
1139
+ "page_idx": 10
1140
+ },
1141
+ {
1142
+ "type": "text",
1143
+ "text": "Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-Net: Convolutional networks for biomedical image segmentation. In International Conference on Medical Image Computing and Computer-Assisted Intervention (MICCAI), pp. 234–241, 2015a. ISBN 978-3-319-24574-4. doi: 10.1007/978-3-319-24574-4 28. ",
1144
+ "bbox": [
1145
+ 173,
1146
+ 655,
1147
+ 825,
1148
+ 712
1149
+ ],
1150
+ "page_idx": 10
1151
+ },
1152
+ {
1153
+ "type": "text",
1154
+ "text": "Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In Nassir Navab, Joachim Hornegger, William M. Wells, and Alejandro F. Frangi (eds.), Medical Image Computing and Computer-Assisted Intervention – MICCAI 2015, pp. 234–241, Cham, 2015b. Springer International Publishing. ISBN 978-3-319-24574-4. ",
1155
+ "bbox": [
1156
+ 173,
1157
+ 722,
1158
+ 825,
1159
+ 780
1160
+ ],
1161
+ "page_idx": 10
1162
+ },
1163
+ {
1164
+ "type": "text",
1165
+ "text": "Johannes Lutz Schonberger and Jan-Michael Frahm. Structure-from-Motion Revisited. In ¨ Conference on Computer Vision and Pattern Recognition (CVPR), 2016. ",
1166
+ "bbox": [
1167
+ 171,
1168
+ 789,
1169
+ 823,
1170
+ 819
1171
+ ],
1172
+ "page_idx": 10
1173
+ },
1174
+ {
1175
+ "type": "text",
1176
+ "text": "Johannes Lutz Schonberger, Enliang Zheng, Marc Pollefeys, and Jan-Michael Frahm. Pixelwise ¨ View Selection for Unstructured Multi-View Stereo. In European Conference on Computer Vision (ECCV), 2016. ",
1177
+ "bbox": [
1178
+ 173,
1179
+ 828,
1180
+ 823,
1181
+ 871
1182
+ ],
1183
+ "page_idx": 10
1184
+ },
1185
+ {
1186
+ "type": "text",
1187
+ "text": "J. L. Schnberger and J. Frahm. Structure-from-motion revisited. In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 4104–4113, June 2016. doi: 10.1109/ CVPR.2016.445. ",
1188
+ "bbox": [
1189
+ 173,
1190
+ 882,
1191
+ 825,
1192
+ 924
1193
+ ],
1194
+ "page_idx": 10
1195
+ },
1196
+ {
1197
+ "type": "text",
1198
+ "text": "Steven M. Seitz, Brian Curless, James Diebel, Daniel Scharstein, and Richard Szeliski. A comparison and evaluation of multi-view stereo reconstruction algorithms. In Proceedings of the 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition - Volume 1, CVPR ’06, pp. 519–528, Washington, DC, USA, 2006. IEEE Computer Society. ISBN 0- 7695-2597-0. doi: 10.1109/CVPR.2006.19. URL http://dx.doi.org/10.1109/CVPR. 2006.19. ",
1199
+ "bbox": [
1200
+ 173,
1201
+ 103,
1202
+ 825,
1203
+ 188
1204
+ ],
1205
+ "page_idx": 11
1206
+ },
1207
+ {
1208
+ "type": "text",
1209
+ "text": "K. Takechi and T. Okabe. Diffuse-specular separation of multi-view images under varying illumination. In 2017 IEEE International Conference on Image Processing (ICIP), pp. 2632–2636, Sept 2017. doi: 10.1109/ICIP.2017.8296759. ",
1210
+ "bbox": [
1211
+ 173,
1212
+ 196,
1213
+ 825,
1214
+ 239
1215
+ ],
1216
+ "page_idx": 11
1217
+ },
1218
+ {
1219
+ "type": "text",
1220
+ "text": "Justus Thies, Michael Zollhofer, and Matthias Nießner. Deferred neural rendering: Image synthesis ¨ using neural textures. ACM Trans. Graph., 38(4):66:1–66:12, July 2019. ISSN 0730-0301. doi: 10.1145/3306346.3323035. ",
1221
+ "bbox": [
1222
+ 173,
1223
+ 247,
1224
+ 825,
1225
+ 290
1226
+ ],
1227
+ "page_idx": 11
1228
+ },
1229
+ {
1230
+ "type": "text",
1231
+ "text": "Bill Triggs, Philip F. McLauchlan, Richard I. Hartley, and Andrew W. Fitzgibbon. Bundle adjustment - a modern synthesis. In Proceedings of the International Workshop on Vision Algorithms: Theory and Practice, ICCV ’99, pp. 298–372, London, UK, UK, 2000. Springer-Verlag. ISBN 3-540-67973-1. ",
1232
+ "bbox": [
1233
+ 173,
1234
+ 299,
1235
+ 825,
1236
+ 356
1237
+ ],
1238
+ "page_idx": 11
1239
+ },
1240
+ {
1241
+ "type": "text",
1242
+ "text": "Shubham Tulsiani, Richard Tucker, and Noah Snavely. Layer-structured 3d scene inference via view synthesis. In ECCV, 2018. ",
1243
+ "bbox": [
1244
+ 173,
1245
+ 364,
1246
+ 823,
1247
+ 393
1248
+ ],
1249
+ "page_idx": 11
1250
+ },
1251
+ {
1252
+ "type": "text",
1253
+ "text": "Shihao Wu, Hui Huang, Tiziano Portenier, Matan Sela, Daniel Cohen-Or, Ron Kimmel, and Matthias Zwicker. Specular-to-diffuse translation for multi-view reconstruction. In Vittorio Ferrari, Martial Hebert, Cristian Sminchisescu, and Yair Weiss (eds.), Computer Vision - ECCV 2018 - 15th European Conference, Munich, Germany, September 8-14, 2018, Proceedings, Part IV, volume 11208 of Lecture Notes in Computer Science, pp. 193–211. Springer, 2018. doi: 10.1007/ 978-3-030-01225-0\\ 12. URL https://doi.org/10.1007/978-3-030-01225-0_ 12. ",
1254
+ "bbox": [
1255
+ 174,
1256
+ 402,
1257
+ 826,
1258
+ 501
1259
+ ],
1260
+ "page_idx": 11
1261
+ },
1262
+ {
1263
+ "type": "text",
1264
+ "text": "Qingxiong Yang, Jinhui Tang, and Narendra Ahuja. Efficient and robust specular highlight removal. IEEE Trans. Pattern Anal. Mach. Intell., 37(6):1304–1311, 2015. URL http://dblp. uni-trier.de/db/journals/pami/pami37.html#YangTA15. ",
1265
+ "bbox": [
1266
+ 174,
1267
+ 510,
1268
+ 825,
1269
+ 553
1270
+ ],
1271
+ "page_idx": 11
1272
+ },
1273
+ {
1274
+ "type": "text",
1275
+ "text": "Genzhi Ye, Elena Garces, Yebin Liu, Qionghai Dai, and Diego Gutierrez. Intrinsic video and applications. ACM Trans. Graph., 33(4):80:1–80:11, July 2014. ISSN 0730-0301. doi: 10.1145/ 2601097.2601135. URL http://doi.acm.org/10.1145/2601097.2601135. ",
1276
+ "bbox": [
1277
+ 173,
1278
+ 560,
1279
+ 825,
1280
+ 604
1281
+ ],
1282
+ "page_idx": 11
1283
+ },
1284
+ {
1285
+ "type": "text",
1286
+ "text": "Ke Colin Zheng, Alex Colburn, Aseem Agarwala, Maneesh Agrawala, David Salesin, Brian Curless, and Michael F. Cohen. Parallax photography: creating 3d cinematic effects from stills. In Proc. Graphics Interface, pp. 111–118. ACM Press, 2009. ",
1287
+ "bbox": [
1288
+ 174,
1289
+ 613,
1290
+ 823,
1291
+ 656
1292
+ ],
1293
+ "page_idx": 11
1294
+ },
1295
+ {
1296
+ "type": "text",
1297
+ "text": "Tinghui Zhou, Shubham Tulsiani, Weilun Sun, Jitendra Malik, and Alexei A. Efros. View synthesis by appearance flow. In ECCV. 2016. ",
1298
+ "bbox": [
1299
+ 169,
1300
+ 664,
1301
+ 823,
1302
+ 693
1303
+ ],
1304
+ "page_idx": 11
1305
+ },
1306
+ {
1307
+ "type": "text",
1308
+ "text": "Tinghui Zhou, Richard Tucker, John Flynn, Graham Fyffe, and Noah Snavely. Stereo magnification: Learning view synthesis using multiplane images. ACM Trans. Graph., 37(4):65:1–65:12, July 2018. ISSN 0730-0301. doi: 10.1145/3197517.3201323. URL http://doi.acm.org/10. 1145/3197517.3201323. ",
1309
+ "bbox": [
1310
+ 174,
1311
+ 702,
1312
+ 825,
1313
+ 758
1314
+ ],
1315
+ "page_idx": 11
1316
+ },
1317
+ {
1318
+ "type": "text",
1319
+ "text": "Hao Zhu, Hao Su, Peng Wang, Xun Cao, and Ruigang Yang. View extrapolation of human body from a single image. CoRR, abs/1804.04213, 2018. ",
1320
+ "bbox": [
1321
+ 173,
1322
+ 767,
1323
+ 823,
1324
+ 797
1325
+ ],
1326
+ "page_idx": 11
1327
+ },
1328
+ {
1329
+ "type": "text",
1330
+ "text": "A APPENDIX ",
1331
+ "text_level": 1,
1332
+ "bbox": [
1333
+ 176,
1334
+ 102,
1335
+ 299,
1336
+ 117
1337
+ ],
1338
+ "page_idx": 12
1339
+ },
1340
+ {
1341
+ "type": "text",
1342
+ "text": "A.1 TRAINING CORPUS ",
1343
+ "text_level": 1,
1344
+ "bbox": [
1345
+ 176,
1346
+ 133,
1347
+ 352,
1348
+ 148
1349
+ ],
1350
+ "page_idx": 12
1351
+ },
1352
+ {
1353
+ "type": "text",
1354
+ "text": "In Fig. 7, we show an overview of synthetic objects that we used to evaluate our technique. The objects differ significantly in terms of material properties and shape, ranging from nearly diffuse materials (left) to the highly specular paint of the car (right). ",
1355
+ "bbox": [
1356
+ 174,
1357
+ 160,
1358
+ 825,
1359
+ 202
1360
+ ],
1361
+ "page_idx": 12
1362
+ },
1363
+ {
1364
+ "type": "image",
1365
+ "img_path": "images/08667c3855fda3f8d102bcdfb252daf742d3a181eaaa1a08b333a390e8462b81.jpg",
1366
+ "image_caption": [
1367
+ "Figure 7: Renderings of our ground truth synthetic data. Based on the Mitsuba Renderer (Jakob, 2010), we generate images of various objects that significantly differ in terms of material properties and shape. "
1368
+ ],
1369
+ "image_footnote": [],
1370
+ "bbox": [
1371
+ 236,
1372
+ 215,
1373
+ 756,
1374
+ 316
1375
+ ],
1376
+ "page_idx": 12
1377
+ },
1378
+ {
1379
+ "type": "text",
1380
+ "text": "To capture real-world data we record a short video clip and use multi-view stereo to reconstruct the object as depicted in Fig. 8. ",
1381
+ "bbox": [
1382
+ 173,
1383
+ 378,
1384
+ 823,
1385
+ 409
1386
+ ],
1387
+ "page_idx": 12
1388
+ },
1389
+ {
1390
+ "type": "image",
1391
+ "img_path": "images/3fa579ce5c1c888077ccca0bb03544abb744e87648686d2141ab2f8f46e48d1a.jpg",
1392
+ "image_caption": [
1393
+ "Figure 8: Based on a set of multi-view images, we reconstruct a coarse 3D model. The camera poses estimated during reconstruction and the 3D model are then used to render synthetic depth maps for the input views. "
1394
+ ],
1395
+ "image_footnote": [],
1396
+ "bbox": [
1397
+ 269,
1398
+ 422,
1399
+ 723,
1400
+ 535
1401
+ ],
1402
+ "page_idx": 12
1403
+ },
1404
+ {
1405
+ "type": "text",
1406
+ "text": "A.2 ADDITIONAL RESULTS ",
1407
+ "text_level": 1,
1408
+ "bbox": [
1409
+ 176,
1410
+ 614,
1411
+ 377,
1412
+ 628
1413
+ ],
1414
+ "page_idx": 12
1415
+ },
1416
+ {
1417
+ "type": "text",
1418
+ "text": "An overview of all image reconstruction errors of all sequences used in this paper is given in Tab. 1. MSE values are reported w.r.t. a color range of [0, 255]. Note that the synthetic data contain ground truth depth maps, while for the real data, we are relying on reconstructed geometry. This is also reflected in the photo-metric error (higher error due to misalignment). ",
1419
+ "bbox": [
1420
+ 174,
1421
+ 640,
1422
+ 825,
1423
+ 698
1424
+ ],
1425
+ "page_idx": 12
1426
+ },
1427
+ {
1428
+ "type": "table",
1429
+ "img_path": "images/51411877dbd808a43773b7a4cd161415c55d44454e92ed845da3a18490fed5c7.jpg",
1430
+ "table_caption": [],
1431
+ "table_footnote": [],
1432
+ "table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Sequence</td><td rowspan=1 colspan=1>N-IBR</td><td rowspan=1 colspan=1>IBR(Debevec et al. (1998))</td><td rowspan=1 colspan=1>Pix2Pix (Isola et al. (2016))</td><td rowspan=1 colspan=1>Ours</td></tr><tr><td rowspan=4 colspan=1>oparittt</td><td rowspan=1 colspan=1>Fig. 1, Car</td><td rowspan=1 colspan=1>72.16</td><td rowspan=1 colspan=1>39.90</td><td rowspan=1 colspan=1>12.62</td><td rowspan=1 colspan=1>3.61</td></tr><tr><td rowspan=1 colspan=1>Fig. 3, Statue</td><td rowspan=1 colspan=1>44.27</td><td rowspan=1 colspan=1>25.01</td><td rowspan=1 colspan=1>5.40</td><td rowspan=1 colspan=1>2.38</td></tr><tr><td rowspan=1 colspan=1>Fig. 11, Vase</td><td rowspan=1 colspan=1>38.93</td><td rowspan=1 colspan=1>17.31</td><td rowspan=1 colspan=1>18.66</td><td rowspan=1 colspan=1>1.12</td></tr><tr><td rowspan=1 colspan=1>Fig.12, Bust</td><td rowspan=1 colspan=1>35.58</td><td rowspan=1 colspan=1>20.45</td><td rowspan=1 colspan=1>4.43</td><td rowspan=1 colspan=1>1.52</td></tr><tr><td rowspan=3 colspan=1>3ker</td><td rowspan=1 colspan=1>Fig. 4, Globe</td><td rowspan=1 colspan=1>152.21</td><td rowspan=1 colspan=1>81.06</td><td rowspan=1 colspan=1>154.29</td><td rowspan=1 colspan=1>30.38</td></tr><tr><td rowspan=1 colspan=1>Fig.14,Shoe</td><td rowspan=1 colspan=1>98.89</td><td rowspan=1 colspan=1>59.47</td><td rowspan=1 colspan=1>116.52</td><td rowspan=1 colspan=1>56.08</td></tr><tr><td rowspan=1 colspan=1>Fig.6,Bust</td><td rowspan=1 colspan=1>397.25</td><td rowspan=1 colspan=1>72.90</td><td rowspan=1 colspan=1>45.23</td><td rowspan=1 colspan=1>25.24</td></tr></table>",
1433
+ "bbox": [
1434
+ 189,
1435
+ 710,
1436
+ 808,
1437
+ 821
1438
+ ],
1439
+ "page_idx": 12
1440
+ },
1441
+ {
1442
+ "type": "text",
1443
+ "text": "Table 1: MSE of photometric re-rendering error of the test sequences (colors in [0-255]). Pix2Pix is trained on world space position maps. N-IBR is the na¨ıve blending approach that gets our nearest neighbors as input. ",
1444
+ "bbox": [
1445
+ 174,
1446
+ 838,
1447
+ 825,
1448
+ 881
1449
+ ],
1450
+ "page_idx": 12
1451
+ },
1452
+ {
1453
+ "type": "text",
1454
+ "text": "Using synthetic data we are quantitatively analyzing the performance of our image-based rendering approach. ",
1455
+ "bbox": [
1456
+ 173,
1457
+ 128,
1458
+ 823,
1459
+ 157
1460
+ ],
1461
+ "page_idx": 13
1462
+ },
1463
+ {
1464
+ "type": "text",
1465
+ "text": "EffectsNet In Fig. 9, we show a qualitative comparison of our predicted diffuse texture to the ground truth. The figure shows the results for a Phong rendering sequence. As can be seen, the estimated diffuse image is close to the ground truth. ",
1466
+ "bbox": [
1467
+ 173,
1468
+ 174,
1469
+ 826,
1470
+ 217
1471
+ ],
1472
+ "page_idx": 13
1473
+ },
1474
+ {
1475
+ "type": "image",
1476
+ "img_path": "images/b352685fe8c8880efbfd7023061e7baa9cbcf02e06c64b8b14ddebfb097a19da.jpg",
1477
+ "image_caption": [
1478
+ "Figure 9: Comparison of the estimated diffuse images based on EffectsNet and the ground truth renderings. The input data has been synthesized by a standard Phong renderer written in DirectX. The training set contained 4900 images. "
1479
+ ],
1480
+ "image_footnote": [],
1481
+ "bbox": [
1482
+ 238,
1483
+ 233,
1484
+ 753,
1485
+ 429
1486
+ ],
1487
+ "page_idx": 13
1488
+ },
1489
+ {
1490
+ "type": "text",
1491
+ "text": "Comparison to Image-based Rendering We compare our method to two baseline image-based rendering approaches. A na¨ıve IBR method that uses the nearest neighbor of our method and computes a per pixel average of the re-projected views, and the IBR method of Debevec et al. (1998) that uses all reference views and a per triangle view selection. In contrast to our method, the classical IBR techniques are not reproducing view-dependent effects as realistically and smoothly which can be seen in Fig. 10. As can be seen the na¨ıve IBR method also suffers from occluded regions. Our method is able to in-paint these regions. ",
1492
+ "bbox": [
1493
+ 173,
1494
+ 516,
1495
+ 825,
1496
+ 614
1497
+ ],
1498
+ "page_idx": 13
1499
+ },
1500
+ {
1501
+ "type": "image",
1502
+ "img_path": "images/98a7d84b7919b9074857cfe391dad7a9f3296218601a610f8b7fd56e8a594359.jpg",
1503
+ "image_caption": [
1504
+ "Figure 10: Comparison of our neural object rendering approach to IBR baselines. The na¨ıve IBR method uses the same four selected images as our approach as input and computes a pixel-wise average color. The method of Debevec et al. (1998) uses all reference views $\\left( n = 2 0 \\right)$ ) and a per triangle view selection. The training set contained 1000 images. "
1505
+ ],
1506
+ "image_footnote": [],
1507
+ "bbox": [
1508
+ 220,
1509
+ 632,
1510
+ 774,
1511
+ 840
1512
+ ],
1513
+ "page_idx": 13
1514
+ },
1515
+ {
1516
+ "type": "text",
1517
+ "text": "Comparison to Learned Image Synthesis To demonstrate the advantage of our approach, we also compare to an image-to-image translation baseline $( P i x 2 P i x$ (Isola et al., 2016)). $P i x 2 P i x$ is trained to translate position images into color images of the target object. While it is not designed for this specific task, we want to show that it is in fact able to produce individual images that look realistic (Fig. 11); however, it is unable to produce a temporally-coherent video. On our test set with 190 images, our method has a MSE of 1.12 while $P i x 2 P i x$ results in a higher MSE of 18.66. Pix2Pix trained on pure depth maps from our training set results in a MSE of 36.63 since the input does not explicitly contain view information. ",
1518
+ "bbox": [
1519
+ 173,
1520
+ 103,
1521
+ 825,
1522
+ 215
1523
+ ],
1524
+ "page_idx": 14
1525
+ },
1526
+ {
1527
+ "type": "image",
1528
+ "img_path": "images/c6870bc91c780e5e68f629e7bb12da8778d9b74f9b7eecac9719d0d4fdaf4a92.jpg",
1529
+ "image_caption": [
1530
+ "Figure 11: In comparison to $P i x 2 P i x$ with position maps as input, we can see that our technique is able to generate images with correct detail as well as without blur artifacts. Both methods are trained on a dataset of 920 images. "
1531
+ ],
1532
+ "image_footnote": [],
1533
+ "bbox": [
1534
+ 220,
1535
+ 231,
1536
+ 774,
1537
+ 416
1538
+ ],
1539
+ "page_idx": 14
1540
+ },
1541
+ {
1542
+ "type": "text",
1543
+ "text": "Evaluation of Training Corpus Size In Fig. 12 we show the influence of the training corpus size on the quality of the results. While our method handles the reduction of the training data size well, the performance of $P i x 2 P i x$ drastically decreases leading to a significantly higher MSE. When comparing these results to the results in Fig 11 it becomes evident that $P i x 2 P i x$ has a significantly lower error on the bust sequence than on the vase sequence. The vase has much more details than the bust and, thus, is harder to reproduce. ",
1544
+ "bbox": [
1545
+ 173,
1546
+ 487,
1547
+ 825,
1548
+ 571
1549
+ ],
1550
+ "page_idx": 14
1551
+ },
1552
+ {
1553
+ "type": "image",
1554
+ "img_path": "images/b9428cfe37e6bd63a628f4b38365adc3ac92240e632df62ab26e2cbcabb8f4b0.jpg",
1555
+ "image_caption": [
1556
+ "MSE w.r.t. Training Dataset Size ",
1557
+ "Figure 12: In this graph we compare the influence of the training corpus size on the MSE for our approach and $P i x 2 P i x$ trained on position maps. The full dataset contains 920 images. We gradually half the size of the training set. As can be seen, the performance of our approaches degrades more gracefully than $P i x 2 P i x$ . "
1558
+ ],
1559
+ "image_footnote": [],
1560
+ "bbox": [
1561
+ 178,
1562
+ 606,
1563
+ 816,
1564
+ 820
1565
+ ],
1566
+ "page_idx": 14
1567
+ },
1568
+ {
1569
+ "type": "text",
1570
+ "text": "A.2.2 ADDITIONAL EXPERIMENTS ON REAL DATA ",
1571
+ "text_level": 1,
1572
+ "bbox": [
1573
+ 176,
1574
+ 103,
1575
+ 535,
1576
+ 117
1577
+ ],
1578
+ "page_idx": 15
1579
+ },
1580
+ {
1581
+ "type": "text",
1582
+ "text": "Comparison to Texture-based Rendering Nowadays, most reconstruction frameworks like COLMAP (Schonberger & Frahm, 2016), KinectFusion (Izadi et al., 2011), or VoxelHash-¨ ing (Nießner et al., 2013) output a mesh with per-vertex colors or with a texture, which is the de facto standard in computer graphics. Fig. 13 shows a side-by-side comparison of our method and the rendering using per-vertex colors as well as using a static texture. Since both the vertex colors as well as the texture are static, these approaches are not able to capture the view-dependent effects. Thus, view-dependent effects are baked into the vertex colors or texture and stay fixed (seen close-ups in Fig. 13). ",
1583
+ "bbox": [
1584
+ 173,
1585
+ 127,
1586
+ 825,
1587
+ 239
1588
+ ],
1589
+ "page_idx": 15
1590
+ },
1591
+ {
1592
+ "type": "image",
1593
+ "img_path": "images/b2cfc3fe2cf623eab06c5d8250016e01960f0f27c2f7b5a56c8b332de09e977f.jpg",
1594
+ "image_caption": [
1595
+ "Figure 13: Image synthesis on real data in comparison to classical computer graphics rendering approaches. From left to right: Poisson reconstructed mesh with per-vertex colors, texture-based rendering, our results and the ground truth. Every texel of the texture is a cosine-weighted sum of the data of four views where the normal points towards the camera the most. "
1596
+ ],
1597
+ "image_footnote": [],
1598
+ "bbox": [
1599
+ 222,
1600
+ 253,
1601
+ 772,
1602
+ 381
1603
+ ],
1604
+ "page_idx": 15
1605
+ },
1606
+ {
1607
+ "type": "text",
1608
+ "text": "Comparison to Image-based Rendering Fig. 14 shows a comparison of our method to imagebased rendering. The IBR method of Debevec et al. (1998) uses a per triangle based view selection which leads to artifacts, especially, in regions with specular reflections. Our method is able to reproduce these specular effects. Note, you can also see that our result is sharper than the ground truth (motion blur), because the network reproduces the appearance of the training corpus and most images do not contain motion blur. ",
1609
+ "bbox": [
1610
+ 173,
1611
+ 465,
1612
+ 825,
1613
+ 549
1614
+ ],
1615
+ "page_idx": 15
1616
+ },
1617
+ {
1618
+ "type": "image",
1619
+ "img_path": "images/fbc02081d7f1eb05153aa7bbad138739d2a3d72fdceb619997172744fa693ad7.jpg",
1620
+ "image_caption": [
1621
+ "Figure 14: Image synthesis on real data: we show a comparison to the IBR technique of Debevec et al. (1998). From left to right: reconstructed geometry of the object, result of IBR, our result, and the ground truth. "
1622
+ ],
1623
+ "image_footnote": [],
1624
+ "bbox": [
1625
+ 173,
1626
+ 566,
1627
+ 823,
1628
+ 775
1629
+ ],
1630
+ "page_idx": 15
1631
+ }
1632
+ ]
parse/train/Hyg9anEFPS/Hyg9anEFPS_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Hyg9anEFPS/Hyg9anEFPS_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Rcmk0xxIQV/Rcmk0xxIQV.md ADDED
@@ -0,0 +1,553 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # QPLEX: DUPLEX DUELING MULTI-AGENTQ-LEARNING
2
+
3
+ Jianhao Wang∗1, Zhizhou $\mathbf { R e n } ^ { * 1 }$ , Terry $\mathbf { L i u ^ { 1 } }$ , Yang $\mathbf { Y u } ^ { 2 }$ , Chongjie Zhang1
4
+
5
+ 1Institute for Interdisciplinary Information Sciences, Tsinghua University, China
6
+ 2Polixir Technologies, China
7
+ {wjh19, rzz16, liudr18}@mails.tsinghua.edu.cn
8
+ yuy@nju.edu.cn
9
+ chongjie@tsinghua.edu.cn
10
+
11
+ # ABSTRACT
12
+
13
+ We explore value-based multi-agent reinforcement learning (MARL) in the popular paradigm of centralized training with decentralized execution (CTDE). CTDE has an important concept, Individual-Global-Max (IGM) principle, which requires the consistency between joint and local action selections to support efficient local decision-making. However, in order to achieve scalability, existing MARL methods either limit representation expressiveness of their value function classes or relax the IGM consistency, which may suffer from instability risk or may not perform well in complex domains. This paper presents a novel MARL approach, called duPLEX dueling multi-agent $Q$ -learning (QPLEX), which takes a duplex dueling network architecture to factorize the joint value function. This duplex dueling structure encodes the IGM principle into the neural network architecture and thus enables efficient value function learning. Theoretical analysis shows that QPLEX achieves a complete IGM function class. Empirical experiments on StarCraft II micromanagement tasks demonstrate that QPLEX significantly outperforms stateof-the-art baselines in both online and offline data collection settings, and also reveal that QPLEX achieves high sample efficiency and can benefit from offline datasets without additional online exploration1.
14
+
15
+ # 1 INTRODUCTION
16
+
17
+ Cooperative multi-agent reinforcement learning (MARL) has broad prospects for addressing many complex real-world problems, such as sensor networks (Zhang & Lesser, 2011), coordination of robot swarms (Hüttenrauch et al., 2017), and autonomous cars (Cao et al., 2012). However, cooperative MARL encounters two major challenges of scalability and partial observability in practical applications. The joint state-action space grows exponentially as the number of agents increases. The partial observability and communication constraints of the environment require each agent to make its individual decisions based on local action-observation histories. To address these challenges, a popular MARL paradigm, called centralized training with decentralized execution (CTDE) (Oliehoek et al., 2008; Kraemer & Banerjee, 2016), has recently attracted great attention, where agents’ policies are trained with access to global information in a centralized way and executed only based on local histories in a decentralized way.
18
+
19
+ Many CTDE learning approaches have been proposed recently, among which value-based MARL algorithms (Sunehag et al., 2018; Rashid et al., 2018; Son et al., 2019; Wang et al., 2019b) have shown state-of-the-art performance on challenging tasks, e.g., unit micromanagement in StarCraft II (Samvelyan et al., 2019). To enable effective CTDE for multi-agent Q-learning, it is critical that the joint greedy action should be equivalent to the collection of individual greedy actions of agents, which is called the IGM (Individual-Global-Max) principle (Son et al., 2019). This IGM principle provides two advantages: 1) ensuring the policy consistency during centralized training (learning the joint Q-function) and decentralized execution (using individual Q-functions) and 2) enabling scalable centralized training of computing one-step TD target of the joint Q-function (deriving joint greedy action selection from individual Q-functions). To realize this principle, VDN (Sunehag et al., 2018) and QMIX (Rashid et al., 2018) propose two sufficient conditions of IGM to factorize the joint action-value function. However, these two decomposition methods suffer from structural constraints and limit the joint action-value function class they can represent. As shown by Wang et al. (2020a), the incompleteness of the joint value function class may lead to poor performance or potential risk of training instability in the offline setting (Levine et al., 2020). Several methods have been proposed to address this structural limitation. QTRAN (Son et al., 2019) constructs two soft regularizations to align the greedy action selections between the joint and individual value functions. WQMIX (Rashid et al., 2020) considers a weighted projection that places more importance on better joint actions. However, due to computational considerations, both their implementations are approximate and based on heuristics, which cannot guarantee the IGM consistency exactly. Therefore, achieving the complete expressiveness of the IGM function class with effective scalability remains an open problem for cooperative MARL.
20
+
21
+ To address this challenge, this paper presents a novel MARL approach, called duPLEX dueling multiagent $Q$ -learning (QPLEX), that takes a duplex dueling network architecture to factorize the joint action-value function into individual action-value functions. QPLEX introduces the dueling structure $Q = V + A$ (Wang et al., 2016) for representing both joint and individual (duplex) action-value functions and then reformalizes the IGM principle as an advantage-based IGM. This reformulation transforms the IGM consistency into the constraints on the value range of the advantage functions and thus facilitates the action-value function learning with linear decomposition structure. Different from QTRAN and WQMIX (Son et al., 2019; Rashid et al., 2020) losing the guarantee of exact IGM consistency due to approximation, QPLEX takes advantage of a duplex dueling architecture to encode it into the neural network structure and provide a guaranteed IGM consistency. To our best knowledge, QPLEX is the first multi-agent Q-learning algorithm that effectively achieves high scalability with a full realization of the IGM principle.
22
+
23
+ We evaluate the performance of QPLEX in both didactic problems proposed by prior work (Son et al., 2019; Wang et al., 2020a) and a range of unit micromanagement benchmark tasks in StarCraft II (Samvelyan et al., 2019). In these didactic problems, QPLEX demonstrates its full representation expressiveness, thereby learning the optimal policy and avoiding the potential risk of training instability. Empirical results on more challenging StarCraft II tasks show that QPLEX significantly outperforms other multi-agent Q-learning baselines in online and offline data collections. It is particularly interesting that QPLEX shows the ability to support offline training, which is not possessed by other baselines. This ability not only provides QPLEX with high stability and sample efficiency but also with opportunities to efficiently utilize multi-source offline data without additional online exploration (Fujimoto et al., 2019; Fu et al., 2020; Levine et al., 2020; Yu et al., 2020).
24
+
25
+ # 2 PRELIMINARIES
26
+
27
+ # 2.1 DECENTRALIZED PARTIALLY OBSERVABLE MDP (DEC-POMDP)
28
+
29
+ We model a fully cooperative multi-agent task as a Dec-POMDP (Oliehoek et al., 2016) defined by a tuple $\mathcal { M } = \langle \mathcal { N } , \mathcal { S } , \mathcal { A } , P , \mathcal { Q } , O , r , \gamma \rangle$ , where $\mathcal { N } \equiv \{ 1 , 2 , \dots , n \}$ is a finite set of agents and $s \in { \mathcal { S } }$ is a finite set of global states. At each time step, every agent $i \in \mathcal N$ chooses an action $a _ { i } \in \mathcal { A } \equiv \{ \mathcal { A } ^ { ( 1 ) } , \dots , \mathcal { A } ^ { ( | \bar { \mathcal { A } } | ) } \}$ on a global state $s$ , which forms a joint action $\pmb { a } \equiv [ a _ { i } ] _ { i = 1 } ^ { n } \in \pmb { A } \equiv \pmb { A } ^ { n }$ It results in a joint reward $r ( s , { \pmb a } )$ and a transition to the next global state $s ^ { \prime } \sim P ( \cdot | s , \pmb { a } ) . \gamma \in [ 0 , 1 )$ is a discount factor. We consider a partially observable setting, where each agent $i$ receives an individual partial observation $o _ { i } \in \varOmega$ according to the observation probability function $O ( o _ { i } | s , a _ { i } )$ . Each agent $i$ has an action-observation history $\bar { \tau } _ { i } \in \mathcal { T } \equiv ( \varOmega \times \mathcal { A } ) ^ { * }$ and constructs its individual policy $\pi _ { i } ( \bar { a } | \tau _ { i } )$ to jointly maximize team performance. We use $\tau \in \mathcal { T } \equiv \mathcal { T } ^ { n }$ to denote joint action-observation history. The formajoint value function is the joint action-v $\begin{array} { r } { V ^ { \mathcal { \bar { \pi } } } ( s ) = \mathbb { E } \left[ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r _ { t } \vert s _ { 0 } = \bar { s , \pi } \right] } \end{array}$ $\pi = \langle \pi _ { 1 } , \ldots , \pi _ { n } \rangle$ that maximizes ast in policy search $Q ^ { \dot { \pi } } ( \bar { s } , \pmb { a } ) = r ( s , \pmb { a } ) + \gamma \mathbb { E } _ { s ^ { \prime } } [ V ^ { \pi } ( s ^ { \prime } ) ]$
30
+
31
+ # 2.2 DEEP MULTI-AGENT Q-LEARNING IN DEC-POMDP
32
+
33
+ Q-learning algorithms is a popular algorithm to find the optimal joint action-value function $Q ^ { * } ( s , \pmb { a } ) \bar { = } r ( \bar { s } , \pmb { a } ) + \gamma \mathbb { E } _ { s ^ { \prime } } [ \bar { \operatorname* { m a x } _ { \pmb { a } ^ { \prime } } } Q ^ { * } ( s ^ { \prime } , \pmb { a } ^ { \prime } ) ] .$ . Deep Q-learning represents the action-value function with a deep neural network parameterized by $\pmb \theta$ . Mutli-agent Q-learning algorithms (Sunehag et al., 2018; Rashid et al., 2018; Son et al., 2019; Yang et al., 2020) use a replay memory $D$ to store the transition tuple $( \tau , a , r , \tau ^ { \prime } )$ , where $r$ is the reward for taking action $\textbf { \em a }$ at joint action-observation history $\tau$ with a transition to $\tau ^ { \prime }$ . Due to partial observability, $Q \left( \tau , a ; \theta \right)$ is used in place of $Q \left( s , \pmb { a } ; \pmb { \theta } \right)$ . Thus, parameters $\pmb \theta$ are learnt by minimizing the following expected TD error:
34
+
35
+ $$
36
+ \mathcal { L } ( \pmb { \theta } ) = \mathbb { E } _ { ( \pmb { \tau } , \mathbf { a } , \mathbf { r } , \pmb { \tau } ^ { \prime } ) \in D } \left[ \left( \boldsymbol { r } + \gamma V \left( \pmb { \tau ^ { \prime } } ; \pmb { \theta } ^ { - } \right) - Q \left( \pmb { \tau } , \mathbf { a } ; \pmb { \theta } \right) \right) ^ { 2 } \right] ,
37
+ $$
38
+
39
+ where $V \left( \pmb { \tau } ^ { \prime } ; \pmb { \theta } ^ { - } \right) = \operatorname* { m a x } _ { \pmb { a } ^ { \prime } } Q \left( \pmb { \tau } ^ { \prime } , \pmb { a } ^ { \prime } ; \pmb { \theta } ^ { - } \right)$ is the one-step expected future return of the TD target and $\pmb { \theta } ^ { - }$ are the parameters of the target network, which will be periodically updated with $\pmb { \theta }$ .
40
+
41
+ # 2.3 CENTRALIZED TRAINING WITH DECENTRALIZED EXECUTION (CTDE)
42
+
43
+ CTDE is a popular paradigm of cooperative multi-agent deep reinforcement learning (Sunehag et al., 2018; Rashid et al., 2018; Wang et al., 2019a; 2020b;c;d). Agents are trained in a centralized way and granted access to other agents’ information or the global states during the centralized training process. However, due to partial observability and communication constraints, each agent makes its own decision based on its local action-observation history during the decentralized execution phase. IGM (Individual-Global-Max; Son et al., 2019) is a popular principle to realize effective value-based CTDE, which asserts the consistency between joint and local greedy action selections in the joint action-value $Q _ { t o t } ( \tau , a )$ and individual action-values $[ Q _ { i } ( \tau _ { i } , a _ { i } ) ] _ { i = 1 } ^ { n }$ :
44
+
45
+ $$
46
+ \forall \pmb { \tau } \in \mathcal { T } , \underset { \mathbf { a } \in \mathcal { A } } { \operatorname { a r g m a x } } Q _ { t o t } ( \pmb { \tau } , \mathbf { a } ) = \left( \underset { \mathbf { a } _ { 1 } \in \mathcal { A } } { \operatorname { a r g m a x } } Q _ { 1 } ( \tau _ { 1 } , \mathbf { a } _ { 1 } ) , \dots , \underset { \mathbf { a } _ { n } \in \mathcal { A } } { \operatorname { a r g m a x } } Q _ { n } ( \tau _ { n } , \mathbf { a } _ { n } ) \right) .
47
+ $$
48
+
49
+ Two factorization structures, additivity and monotonicity, has been proposed by VDN (Suneha et al., 2018) and QMIX (Rashid et al., 2018), respectively, as shown below:
50
+
51
+ $$
52
+ Q _ { t o t } ^ { \mathrm { V D N } } ( \tau , a ) = \sum _ { i = 1 } ^ { n } Q _ { i } ( \tau _ { i } , a _ { i } ) \quad \mathrm { ~ a n d ~ } \quad \forall i \in \mathcal { N } , \frac { \partial Q _ { t o t } ^ { \mathrm { Q M N } } ( \tau , a ) } { \partial Q _ { i } ( \tau _ { i } , a _ { i } ) } > 0 .
53
+ $$
54
+
55
+ Qatten (Yang et al., 2020) is a variant of VDN, which supplements global information through a multi-head attention structure. It is known that, these structures implement sufficient but not necessary conditions for the IGM constraint, which limit the representation expressiveness of joint action-value functions (Mahajan et al., 2019). There exist tasks whose factorizable joint action-value functions can not be represented by these decomposition methods, as shown in Section 4. In contrast, QTRAN (Son et al., 2019) transforms IGM into a linear constraint and uses it as soft regularization constraints. WQMIX (Rashid et al., 2020) introduces a weighting mechanism into the projection of monotonic value factorization, in order to place more importance on better joint actions. However, these relaxations may violate the exact IGM consistency and may not perform well in complex problems.
56
+
57
+ # 3 QPLEX: DUPLEX DUELING MULTI-AGENT Q-LEARNING
58
+
59
+ In this section, we will first introduce advantage-based IGM, equivalent to the regular IGM principle, and, with this new definition, convert the IGM consistency of greedy action selection to simple constraints on advantage functions. We then present a novel deep MARL model, called duPLEX dueling multi-agent $Q$ -learning algorithm (QPLEX), that directly realizes these constraints by a scalable neural network architecture.
60
+
61
+ # 3.1 ADVANTAGE-BASED IGM
62
+
63
+ To ensure the consistency of greedy action selection on the joint and local action-value functions, the IGM principle constrains the relative order of Q-values over actions. From the perspective of dueling decomposition structure $Q = V + A$ proposed by Dueling DQN (Wang et al., 2016), this consistency should only constrain the action-dependent advantage term $A$ and be free of the state-value function $V$ . This observation naturally motivates us to reformalize the IGM principle as advantage-based IGM, which transforms the consistency constraint onto advantage functions.
64
+
65
+ Definition 1 (Advantage-based IGM). For a joint action-value function $Q _ { t o t }$ : $\pmb { \tau } \times \pmb { A } \mapsto \mathbb { R }$ and individual action-value functions $[ Q _ { i } : \mathcal { T } \times \mathcal { A } \mapsto \mathbb { R } ] _ { i = 1 } ^ { n }$ , where ${ \bf \prime } \in \mathcal { T } , \forall { \bf a } \in \mathcal { \bf A } , \forall i \in \mathcal { N } _ { }$ ,
66
+
67
+ ![](images/e8062319dfee68196783f463d7ca0d5b81bb1490e0bba8391c03246e4d36fbef.jpg)
68
+ Figure 1: (a) The dueling mixing network structure. (b) The overall QPLEX architecture. (c) Agent network structure (bottom) and Transformation network structure (top).
69
+
70
+ such that the following holds
71
+
72
+ $$
73
+ \underset { a \in \mathcal { A } } { \arg \operatorname* { m a x } } A _ { t o t } ( \tau , a ) = \left( \underset { a _ { 1 } \in \mathcal { A } } { \arg \operatorname* { m a x } } A _ { 1 } ( \tau _ { 1 } , a _ { 1 } ) , \dots , \underset { a _ { n } \in \mathcal { A } } { \arg \operatorname* { m a x } } A _ { n } ( \tau _ { n } , a _ { n } ) \right) ,
74
+ $$
75
+
76
+ then, we can say that $[ Q _ { i } ] _ { i = 1 } ^ { n }$ satisfies advantage-based IGM for $Q _ { t o t }$
77
+
78
+ As specified in Definition 1, advantage-based IGM takes a duplex dueling architecture, Joint Dueling and Individual Dueling, which induces the joint and local (duplex) advantage functions by $A = Q - V$ . Compared with regular IGM, advantage-based IGM transfers the consistency constraint on actionvalue functions stated in Eq. (2) to that on advantage functions. This change is an equivalent transformation because the state-value terms $V$ do not affect the action selection, as shown by Proposition 1.
79
+
80
+ Proposition 1. The advantage-based IGM and IGM function classes are equivalent.
81
+
82
+ One key benefit of using advantage-based IGM is that its consistency constraint can be directly realized by limiting the value range of advantage functions, as indicated by the following fact.
83
+
84
+ Fact 1. The constraint of advantage-based IGM stated in Eq. (5) is equivalent to that when $\forall \tau \in \tau$ , $\forall \pmb { a } ^ { * } \in \pmb { A } ^ { * } ( \pmb { \tau } ) , \forall \pmb { a } \in \pmb { A } \backslash \pmb { A } ^ { * } ( \pmb { \tau } ) , \forall i \in \mathcal { I }$ ,
85
+
86
+ $$
87
+ \begin{array} { c l c r } { { } } & { { A _ { t o t } ( \tau , a ^ { * } ) = A _ { i } ( \tau _ { i } , a _ { i } ^ { * } ) = 0 } } & { { a n d } } & { { A _ { t o t } ( \tau , a ) < 0 , A _ { i } ( \tau _ { i } , a _ { i } ) \leq 0 , } } \\ { { } } & { { } } & { { { \bf 4 } ^ { * } ( \tau ) = \{ a | a \in { \bf \cal A } , Q _ { t o t } ( \tau , a ) = V _ { t o t } ( \tau ) \} . } } \end{array}
88
+ $$
89
+
90
+ To achieve a full expressiveness power of advantage-based IGM or IGM, Fact 1 enables us to develop an efficient MARL algorithm that allows the joint state-value function learning with any scalable decomposition structure and just imposes simple constraints limiting value ranges of advantage functions. The next subsection will describe such a MARL algorithm.
91
+
92
+ # 3.2 THE QPLEX ARCHITECTURE
93
+
94
+ In this subsection, we present a novel multi-agent Q-learning algorithm with a duplex dueling architecture, called QPLEX, which exploits Fact 1 and realizes the advantage-based IGM constraint. The overall architecture of QPLEX is illustrated in Figure 1, which consists of two main components as follows: (i) an Individual Action-Value Function for each agent, and (ii) a Duplex Dueling component that composes individual action-value functions into a joint action-value function under the advantage-based IGM constraint. During the centralized training, the whole network is learned in an end-to-end fashion to minimize the TD loss as specified in Eq. (1). During the decentralized execution, the duplex dueling component will be removed, and each agent will select actions using its individual Q-function based on local action-observation history.
95
+
96
+ Individual Action-Value Function is represented by a recurrent Q-network for each agent $i$ , which takes previous hidden state $h _ { i } ^ { t - 1 }$ , current local observations $o _ { i } ^ { t }$ , and previous action $a _ { i } ^ { \tau - 1 }$ as inputs and outputs local $Q _ { i } ( \tau _ { i } , a _ { i } )$ .
97
+
98
+ Duplex Dueling component connects local and joint action-value functions via two modules: (i) a Transformation network module that incorporates the information of global state or joint history into individual action-value functions during the centralized training process, and (ii) a Dueling Mixing network module that composes separate action-value functions from Transformation into a joint action-value function. Duplex Dueling first derives the individual dueling structure for each agent $i$ by computing its value function $\begin{array} { r } { \bar { V _ { i } } ( \tau _ { i } ) = \operatorname* { m a x } _ { a _ { i } } Q _ { i } ( \tau _ { i } , a _ { i } ) } \end{array}$ and its advantage function $A _ { i } ( \tau _ { i } , a _ { i } ) = Q _ { i } ( \tau _ { i } , a _ { i } ) - V _ { i } ( \tau _ { i } )$ , and then computes the joint dueling structure by using individual dueling structures.
99
+
100
+ Transformation network module uses the centralized information to transform local dueling structure $[ V _ { i } ( \tau _ { i } ) , A _ { i } ( \tau _ { i } , a _ { i } ) ] _ { i = 1 } ^ { n }$ to $[ V _ { i } ( \tau ) , A _ { i } ( \tau , a _ { i } ) ] _ { i = 1 } ^ { n }$ conditioned on the joint action-observation history, as shown below, for any agent $i$ , i.e., $\begin{array} { r } { \dot { Q _ { i } } ( \pmb { \tau } , \tilde { a _ { i } } ) = w _ { i } ( \pmb { \tau } ) Q _ { i } ( \tau _ { i } , a _ { i } ) + b _ { i } ( \pmb { \tau } ) } \end{array}$ , thus,
101
+
102
+ $$
103
+ V _ { i } ( \tau ) = w _ { i } ( \tau ) V _ { i } ( \tau _ { i } ) + b _ { i } ( \tau ) , \quad \mathrm { a n d } \quad A _ { i } ( \tau , a _ { i } ) = Q _ { i } ( \tau , a _ { i } ) - V _ { i } ( \tau ) = w _ { i } ( \tau ) A _ { i } ( \tau _ { i } , a _ { i } ) ,
104
+ $$
105
+
106
+ where $w _ { i } ( \pmb { \tau } ) > 0$ is a positive weight. This positive linear transformation maintains the consistency of the greedy action selection and alleviates partial observability in Dec-POMDP (Son et al., 2019; Yang et al., 2020). As used by QMIX (Rashid et al., 2018), QTRAN (Son et al., 2019), and Qatten (Yang et al., 2020), the centralized information can be the global state $s$ , if available, or the joint action-observation history $\tau$ .
107
+
108
+ Dueling Mixing network module takes the outputs of the transformation network as input, e.g., $[ V _ { i } , A _ { i } ] _ { i = 1 } ^ { n }$ , and produces the values of joint $Q _ { t o t }$ , as shown in Figure 1a. This dueling mixing network uses individual dueling structure transformed by Transformation to compute the joint value $V _ { t o t } ( \tau )$ and the joint advantage $A _ { t o t } ( \tau , a )$ , respectively, and finally outputs $\mathbf { \bar { \phi } } _ { Q _ { t o t } } ( \tau , \bar { a } ) =$ $V _ { t o t } ( \tau ) + A _ { t o t } ( \tau , \pmb { a } )$ by using the joint dueling structure.
109
+
110
+ Based on Fact 1, the advantage-based IGM principle imposes no constraints on value functions. Therefore, to enable efficient learning, we use a simple sum structure to compose the joint value:
111
+
112
+ $$
113
+ V _ { t o t } ( \tau ) = \sum _ { i = 1 } ^ { n } V _ { i } ( \tau )
114
+ $$
115
+
116
+ To enforce the IGM consistency of the joint advantage and individual advantages, as specified by Eq. (6), QPLEX computes the joint advantage function as follows:
117
+
118
+ $$
119
+ A _ { t o t } ( \pmb { \tau } , \pmb { a } ) = \sum _ { i = 1 } ^ { n } \lambda _ { i } ( \pmb { \tau } , \pmb { a } ) A _ { i } ( \pmb { \tau } , \pmb { a } _ { i } ) , \mathrm { w h e r e } \lambda _ { i } ( \pmb { \tau } , \pmb { a } ) > 0 .
120
+ $$
121
+
122
+ The joint advantage function $A _ { t o t }$ is the dot product of advantage functions $[ A _ { i } ] _ { i = 1 } ^ { t }$ and positive importance weights $[ \lambda _ { i } ] _ { i = 1 } ^ { n }$ with joint history and action. The positivity induced by $\lambda _ { i }$ will continue to maintain the consistency flow of the greedy action selection and the joint information of $\lambda _ { i }$ provides the full expressiveness power for value factorization. To enable efficient learning of importance weights $\lambda _ { i }$ with joint history and action, QPLEX uses a scalable multi-head attention module (Vaswani et al., 2017):
123
+
124
+ $$
125
+ \lambda _ { i } ( \pmb { \tau } , \pmb { a } ) = \sum _ { k = 1 } ^ { K } \lambda _ { i , k } ( \pmb { \tau } , \pmb { a } ) \phi _ { i , k } ( \pmb { \tau } ) v _ { k } ( \pmb { \tau } ) ,
126
+ $$
127
+
128
+ where $K$ is the number of attention heads, $\lambda _ { i , k } ( \tau , a )$ and $\phi _ { i , k } ( \tau )$ are attention weights activated by a sigmoid regularizer, and $v _ { k } ( \tau ) > 0$ is a positive key of each head. This sigmoid activation of $\lambda _ { i }$ brings sparsity to the credit assignment of the joint advantage function to individuals, which enables efficient multi-agent learning (Wang et al., 2019b).
129
+
130
+ With Eq. (8) and (9), the joint action-value function $Q _ { t o t }$ can be reformulated as follows:
131
+
132
+ $$
133
+ Q _ { t o t } ( \tau , a ) = V _ { t o t } ( \tau ) + A _ { t o t } ( \tau , a ) = \sum _ { i = 1 } ^ { n } Q _ { i } ( \tau , a _ { i } ) + \sum _ { i = 1 } ^ { n } \left( \lambda _ { i } ( \tau , a ) - 1 \right) A _ { i } ( \tau , a _ { i } ) .
134
+ $$
135
+
136
+ It can be seen that $Q _ { t o t }$ consists of two terms. The first term is the sum of action-value functions $[ Q _ { i } ] _ { i = 1 } ^ { n }$ , which is the joint action-value function $Q _ { t o t } ^ { \mathrm { Q a t t e n } }$ of Qatten (Yang et al., 2020) (which is the $Q _ { t o t }$ of VDN (Sunehag et al., 2018) with global information). The second term corrects for the discrepancy between the centralized joint action-value function and $Q _ { t o t } ^ { \mathrm { Q a t t e n } }$ , which is the main
137
+
138
+ <table><tr><td rowspan=1 colspan=1>a1a2</td><td rowspan=1 colspan=1>A(1)</td><td rowspan=1 colspan=1>A(2)</td><td rowspan=1 colspan=1>A(3)</td></tr><tr><td rowspan=1 colspan=1>A(1)</td><td rowspan=1 colspan=1>8</td><td rowspan=1 colspan=1>-12</td><td rowspan=1 colspan=1>-12</td></tr><tr><td rowspan=1 colspan=1>A(2)</td><td rowspan=1 colspan=1>-12</td><td rowspan=1 colspan=1>06</td><td rowspan=1 colspan=1>0</td></tr><tr><td rowspan=1 colspan=1>A3)</td><td rowspan=1 colspan=1>-12</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>6</td></tr></table>
139
+
140
+ (a) Payoff of a harder matrix game
141
+
142
+ Proposition 2. Given the universal function approximation of neural networks, the action-value function class that QPLEX can realize is equivalent to what is induced by the IGM principle.
143
+
144
+ In practice, QPLEX can utilize common neural network structures (e.g., multi-head attention modules) to achieve superior performance by approximating the universal approximation theorem (Csáji et al., 2001). We will discuss the effects of QPLEX’s duplex dueling network with different configurations in Section 4.1. As introduced by Son et al. (2019) and Wang et al. (2020a), the completeness of value factorization is very critical for multi-agent Q-learning and we will illustrate the stability and state-of-the-art performance of QPLEX in online and offline data collections in the next section.
145
+
146
+ # 4 EXPERIMENTS
147
+
148
+ In this section, we first study didactic examples proposed by prior work (Son et al., 2019; Wang et al., 2020a) to investigate the effects of QPLEX’s complete IGM expressiveness on learning optimality and stability. To demonstrate scalability on complex MARL domains, we also evaluate the performance of QPLEX on a range of StarCraft II benchmark tasks (Samvelyan et al., 2019). The completeness of the IGM function class can express richer joint action-value function classes induced by large and diverse datasets or training buffers. This expressiveness can provide QPLEX with higher sample efficiency to achieve state-of-the-art performance in online and offline data collections. We compare QPLEX with state-of-the-art baselines: QTRAN (Son et al., 2019), QMIX (Rashid et al., 2018), VDN (Sunehag et al., 2018), Qatten (Yang et al., 2020), and WQMIX (OW-QMIX and CW-QMIX; Rashid et al., 2020). In particular, the second term of Eq. (11) is the main difference between QPLEX and Qatten. Thus, Qatten provides a natural ablation baseline of QPLEX to demonstrate the effectiveness of this discrepancy term. The implementation details of these algorithms and experimental settings are deferred to Appendix B. We also conduct two ablation studies to study the influence of the attention structure of dueling architecture and the number of parameters on QPLEX, which are deferred to be discussed in Appendix E. Towards fair evaluation, all experimental results are illustrated with the median performance and $2 5 - 7 5 \%$ percentiles over 6 random seeds.
149
+
150
+ # 4.1 MATRIX GAMES
151
+
152
+ QTRAN (Son et al., 2019) proposes a hard matrix game, as shown in Table 4a of Appendix C. In this subsection, we consider a harder matrix game in Table 2a, which also describes a simple cooperative multi-agent task with considerable miscoordination penalties, and its local optimum is more difficult to jump out. The optimal joint strategy of these two games is to perform action $\boldsymbol { \mathcal { A } } ^ { ( 1 ) }$ simultaneously. To ensure sufficient data collection in the joint action space, we adopt uniform data distribution. With this fixed dataset, we can study the optimality of multi-agent Q-learning from an optimization perspective, ignoring the challenge of exploration and sample complexity.
153
+
154
+ As shown in Figure 2b, QPLEX, QTRAN, and WQMIX, which possess a richer expressiveness power of value factorization can achieve optimal performance, while other algorithms with limited expressiveness (e.g., QMIX, VDN, and Qatten) fall into a local optimum induced by miscoordination penalties. In the original matrix proposed by QTRAN, QPLEX and QTRAN can also successfully converge to optimal joint action-value functions. These results are deferred to Appendix C. QTRAN achieves superior performance in the matrix games but suffers from its relaxation of IGM consistency in complex domains (such as StarCraft II) shown in Section 4.3.
155
+
156
+ ![](images/6583866ae341ef10e78872cb91eccfb0ae77f049706ae50fb4c2818f02ec7beb.jpg)
157
+ Figure 3: (a) A special two-state MMDP used to demonstrate the training stability of the multi-agent Q-learning algorithms. $r$ is a shorthand for $r ( s , { \pmb a } )$ . (b) The learning curves of $\| Q _ { t o t } \| _ { \infty }$ in a specific two-state MMDP.
158
+
159
+ In the theoretical analysis of QPLEX, Proposition 2 exploits the universal function approximation of neural networks. QPLEX allows the scalable implementations with various neural network capacities (different layers and heads of attention module) for learning importance weights $\lambda _ { i }$ (see Eq. (9) and (10)). As shown in Figure 2c, by increasing the neural network size for learning $\lambda _ { i }$ (e.g., QPLEX-3L10H), QPLEX possesses more expressiveness of value factorization and converges faster. However, learning efficiency becomes challenging for complex neural networks. To effectively perform StarCraft II tasks ranging from 2 to 27 agents, we use a small multi-head attention module (i.e., QPLEX-1L4H) in complex domains (see Section 4.3). Please refer to Appendix B for more detailed configurations.
160
+
161
+ # 4.2 TWO-STATE MMDP
162
+
163
+ In this subsection, we focus on a Multi-agent Markov Decision Process (MMDP) (Boutilier, 1996) which is a fully cooperative multi-agent setting with full observability. Consider a two-state MMDP proposed by Wang et al. (2020a) with two agents, two actions, and a single reward (see Figure 3a). Two agents start at state $s _ { 2 }$ and explore extrinsic rewards for 100 environment steps. The optimal policy of this MMDP is simply executing the action $\boldsymbol { \mathcal { A } } ^ { ( 1 ) }$ at state $s _ { 2 }$ , which is the only coordination pattern to obtain the positive reward. To approximate the uniform data distribution, we adopt a uniform exploration strategy (i.e., $\epsilon$ -greedy exploration with $\epsilon = 1$ ). We consider the training stability of multi-agent Q-learning algorithms with uniform data distribution in this special MMDP task. As shown in Figure 3b, the joint state-value function $Q _ { t o t }$ learned by baseline algorithms using limited function classes, including QMIX, VDN, and Qatten, will diverge. This instability phenomenon of VDN has been theoretically investigated by Wang et al. (2020a). By utilizing richer function classes, QPLEX, QTRAN, and WQMIX can address this numerical instability issue and converge to the optimal joint state-value function.
164
+
165
+ # 4.3 DECENTRALIZED STARCRAFT II MICROMANAGEMENT BENCHMARK
166
+
167
+ A more challenging set of empirical experiments are based on StarCraft Multi-Agent Challenge (SMAC) benchmark (Samvelyan et al., 2019). We first investigate empirical performance in a popular experimental setting with $\epsilon$ -greedy exploration and a limited first-in-first-out (FIFO) buffer (Samvelyan et al., 2019), named online data collection setting. To demonstrate the offline training potential of QPLEX, we also adopt the offline data collection setting proposed by Levine et al. (2020), which can be granted access to a given dataset without additional online exploration.
168
+
169
+ # 4.3.1 TRAINING WITH ONLINE DATA COLLECTION
170
+
171
+ We evaluate QPLEX in 17 benchmark tasks of StarCraft II, which contains 14 popular tasks proposed by SMAC (Samvelyan et al., 2019) and three new super hard cooperative tasks. To demonstrate the overall performance of each algorithm, Figure 4 plots the averaged median test win rate across all 17 scenarios and the number of scenarios in which the algorithm outperforms, respectively. Figure 4a shows that, compared with other baselines, QPLEX constantly and significantly outperforms baselines over the whole training process and exceeds at least $10 \%$ median test win rate averaged across all 17 scenarios. Moreover, Figure 4b illustrates that, among all 17 tasks, QPLEX is the best performer on up to eight tasks, underperforms on just two tasks, and ties for the best performer on the rest tasks. After $0 . 8 { \bf M }$ timesteps, the number of tasks that QPLEX achieves the best performance gradually decreases to five, because, in several easy tasks, other baselines also reach almost $100 \%$ test win rate as shown in Figure 5. The overall evaluation diagram of the original SMAC benchmark (14 tasks) corresponding to Figure 4 is deferred to Figure 8 in Appendix D.
172
+
173
+ ![](images/4032960351d888d59c9172660a3d1c2ca4cc2ab105420d634cf678eb827c4e4c.jpg)
174
+ Figure 4: (a) The median test win $\%$ , averaged across all 17 scenarios. (b) The number of scenarios in which the algorithms’ median test win $\%$ is the highest by at least 1/32 (smoothed).
175
+
176
+ Figure 5 shows the learning curves on nine tasks in the online data collection setting and the results of other eight maps are deferred to Figure 7 in Appendix D. From Figure 5, we can observe that QPLEX significantly outperforms other baselines with higher sample efficiency. On the super hard map $5 \mathrm { s } 1 0 \mathrm { z }$ , the performance gap between QPLEX and other baselines exceeds $30 \%$ in test win rate, and the visualized strategies of QPLEX and QMIX in this map are deferred to Appendix F. Most multi-agent Q-learning baselines including QMIX, VDN, and Qatten achieve reasonable performance (see Figure 5). However, as Figure 4 suggests, QTRAN performs the worst in these comparative experiments, even though it performs well in the didactic games. From a theoretical perspective, the online data collection process utilizes an $\epsilon$ -greedy exploration process, which requires individual greedy action selections to build an effective training buffer. QTRAN may suffer from its relaxation of IGM consistency (soft constraints of IGM) in the online data collection phase, while the duplex dueling architecture of QPLEX (hard constraint of IGM) provides effective individual greedy action selections, making it suitable for data collection with $\epsilon$ -greedy exploration.
177
+
178
+ Moreover, although WQMIX (OW-QMIX and CW-QMIX) outperforms QMIX in some tasks (illustrated in Figure 5, e.g., 2c_vs_ $6 4 \mathrm { z g }$ and bane_vs_bane), WQMIX show very similar overall performance as QMIX across 17 StarCraft II benchmark tasks. In contrast, QPLEX achieves significant improvement in convergence performance in a lot of hard and super hard maps and demonstrates high sample efficiency across most scenarios (see Figure 5).
179
+
180
+ # 4.3.2 TRAINING WITH OFFLINE DATA COLLECTION
181
+
182
+ Recently, offline reinforcement learning has been regarded as a key step for real-world RL applications (Dulac-Arnold et al., 2019; Levine et al., 2020). Agarwal et al. (2020) presents an optimistic perspective of offline Q-learning that DQN and its variants can achieve superior performance in Atari 2600 games (Bellemare et al., 2013) with sufficiently large and diverse datasets. In MARL, StarCraft II benchmark has the same discrete action space as Atari. We conduct a lot of experiments on the StarCraft II benchmark tasks to study offline multi-agent Q-learning in this subsection. We adopt a large and diverse dataset to make the expressiveness power of value factorization become the dominant factor to investigate. We train a behavior policy of QMIX and collect all its experienced transitions throughout the training process (see the details in Appendix C). As shown in Figure 13 in Appendix G, QPLEX significantly outperforms other multi-agent Q-learning baselines and possesses the state-of-the-art value factorization structure for offline multi-agent Q-learning. QMIX and Qatten cannot always maintain stable learning performance, and VDN suffers from offline data collection and leads to weak empirical results. QTRAN may perform well in certain cases when its soft constraints, two $\ell _ { 2 }$ -penalty terms, are well minimized. With offline data collection, individual greedy action selections do not need to build a training buffer, but they still need to compute the one-step TD target for centralized training. Therefore, compared with QTRAN, QPLEX still has theoretical advantages regarding the IGM principle in the offline data collection setting.
183
+
184
+ ![](images/29327645e83f8084f1aacba956621af38523c215b0d95e32590ea2210fa0857b.jpg)
185
+ Figure 5: Learning curves of StarCraft II with online data collection.
186
+
187
+ # 5 CONCLUSION
188
+
189
+ In this paper, we introduced QPLEX, a novel multi-agent Q-learning framework that allows centralized end-to-end training and learns to factorize a joint action-value function to enable decentralized execution. QPLEX takes advantage of a duplex dueling architecture that efficiently encodes the IGM consistency constraint on joint and individual greedy action selections. Our theoretical analysis shows that QPLEX achieves a complete IGM function class. Empirical results demonstrate that it significantly outperforms state-of-the-art baselines in both online and offline data collection settings. In particular, QPLEX possesses strong ability of supporting offline training. This ability provides QPLEX with high sample efficiency and opportunities of utilizing offline multi-source datasets. It will be an interesting and valuable direction to study offline multi-agent reinforcement learning in continuous action spaces (such as MuJoCo (Todorov et al., 2012)) with QPLEX’s value factorization.
190
+
191
+ # ACKNOWLEDGEMENTS
192
+
193
+ We would like to thank the anonymous reviewers for their insightful comments and helpful suggestions. This work is supported in part by Science and Technology Innovation 2030 – “New Generation Artificial Intelligence” Major Project (No. 2018AAA0100904), and a grant from the Institute of Guo Qiang, Tsinghua University.
194
+
195
+ # REFERENCES
196
+
197
+ Rishabh Agarwal, Dale Schuurmans, and Mohammad Norouzi. An optimistic perspective on offline reinforcement learning. In International Conference on Machine Learning, 2020.
198
+
199
+ Marc G Bellemare, Yavar Naddaf, Joel Veness, and Michael Bowling. The arcade learning environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research, 47: 253–279, 2013.
200
+
201
+ Craig Boutilier. Planning, learning and coordination in multiagent decision processes. In Proceedings of the 6th Conference on Theoretical Aspects of Rationality and Knowledge, pp. 195–210. Morgan Kaufmann Publishers Inc., 1996.
202
+
203
+ Yongcan Cao, Wenwu Yu, Wei Ren, and Guanrong Chen. An overview of recent progress in the study of distributed multi-agent coordination. IEEE Transactions on Industrial Informatics, 9(1): 427–438, 2012.
204
+
205
+ Balázs Csanád Csáji et al. Approximation with artificial neural networks. Faculty of Sciences, Etvs Lornd University, Hungary, 24(48):7, 2001.
206
+
207
+ Gabriel Dulac-Arnold, Daniel Mankowitz, and Todd Hester. Challenges of real-world reinforcement learning. arXiv preprint arXiv:1904.12901, 2019.
208
+
209
+ Justin Fu, Aviral Kumar, Ofir Nachum, George Tucker, and Sergey Levine. D4rl: Datasets for deep data-driven reinforcement learning. arXiv preprint arXiv:2004.07219, 2020.
210
+
211
+ Scott Fujimoto, David Meger, and Doina Precup. Off-policy deep reinforcement learning without exploration. In International Conference on Machine Learning, pp. 2052–2062, 2019.
212
+
213
+ Maximilian Hüttenrauch, Adrian Šošic, and Gerhard Neumann. Guided deep reinforcement learning ´ for swarm systems. arXiv preprint arXiv:1709.06011, 2017.
214
+
215
+ Landon Kraemer and Bikramjit Banerjee. Multi-agent reinforcement learning as a rehearsal for decentralized planning. Neurocomputing, 190:82–94, 2016.
216
+
217
+ Sergey Levine, Aviral Kumar, George Tucker, and Justin Fu. Offline reinforcement learning: Tutorial, review, and perspectives on open problems. arXiv preprint arXiv:2005.01643, 2020.
218
+
219
+ Anuj Mahajan, Tabish Rashid, Mikayel Samvelyan, and Shimon Whiteson. Maven: Multi-agent variational exploration. In Advances in Neural Information Processing Systems, pp. 7611–7622, 2019.
220
+
221
+ Frans A Oliehoek, Matthijs TJ Spaan, and Nikos Vlassis. Optimal and approximate q-value functions for decentralized pomdps. Journal of Artificial Intelligence Research, 32:289–353, 2008.
222
+
223
+ Frans A Oliehoek, Christopher Amato, et al. A concise introduction to decentralized POMDPs, volume 1. Springer, 2016.
224
+
225
+ Tabish Rashid, Mikayel Samvelyan, Christian Schroeder Witt, Gregory Farquhar, Jakob Foerster, and Shimon Whiteson. Qmix: Monotonic value function factorisation for deep multi-agent reinforcement learning. In International Conference on Machine Learning, pp. 4292–4301, 2018.
226
+
227
+ Tabish Rashid, Gregory Farquhar, Bei Peng, and Shimon Whiteson. Weighted qmix: Expanding monotonic value function factorisation for deep multi-agent reinforcement learning. Advances in Neural Information Processing Systems, 33, 2020.
228
+
229
+ Mikayel Samvelyan, Tabish Rashid, Christian Schroeder de Witt, Gregory Farquhar, Nantas Nardelli, Tim GJ Rudner, Chia-Man Hung, Philip HS Torr, Jakob Foerster, and Shimon Whiteson. The starcraft multi-agent challenge. In Proceedings of the 18th International Conference on Autonomous Agents and MultiAgent Systems, pp. 2186–2188. International Foundation for Autonomous Agents and Multiagent Systems, 2019.
230
+
231
+ Kyunghwan Son, Daewoo Kim, Wan Ju Kang, David Earl Hostallero, and Yung Yi. Qtran: Learning to factorize with transformation for cooperative multi-agent reinforcement learning. In International Conference on Machine Learning, pp. 5887–5896, 2019.
232
+
233
+ Peter Sunehag, Guy Lever, Audrunas Gruslys, Wojciech Marian Czarnecki, Vinicius Zambaldi, Max Jaderberg, Marc Lanctot, Nicolas Sonnerat, Joel Z Leibo, Karl Tuyls, et al. Value-decomposition networks for cooperative multi-agent learning based on team reward. In Proceedings of the 17th International Conference on Autonomous Agents and MultiAgent Systems, pp. 2085–2087, 2018.
234
+
235
+ Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 5026–5033. IEEE, 2012.
236
+
237
+ 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.
238
+
239
+ Jianhao Wang, Zhizhou Ren, Beining Han, and Chongjie Zhang. Towards understanding linear value decomposition in cooperative multi-agent q-learning. arXiv preprint arXiv:2006.00587, 2020a.
240
+
241
+ Tonghan Wang, Jianhao Wang, Yi Wu, and Chongjie Zhang. Influence-based multi-agent exploration. arXiv preprint arXiv:1910.05512, 2019a.
242
+
243
+ Tonghan Wang, Jianhao Wang, Chongyi Zheng, and Chongjie Zhang. Learning nearly decomposable value functions via communication minimization. arXiv preprint arXiv:1910.05366, 2019b.
244
+
245
+ Tonghan Wang, Heng Dong, Victor Lesser, and Chongjie Zhang. Multi-agent reinforcement learning with emergent roles. arXiv preprint arXiv:2003.08039, 2020b.
246
+
247
+ Tonghan Wang, Tarun Gupta, Anuj Mahajan, Bei Peng, Shimon Whiteson, and Chongjie Zhang. Rode: Learning roles to decompose multi-agent tasks. arXiv preprint arXiv:2010.01523, 2020c.
248
+
249
+ Yihan Wang, Beining Han, Tonghan Wang, Heng Dong, and Chongjie Zhang. Off-policy multi-agent decomposed policy gradients. arXiv preprint arXiv:2007.12322, 2020d.
250
+
251
+ Ziyu Wang, Tom Schaul, Matteo Hessel, Hado Hasselt, Marc Lanctot, and Nando Freitas. Dueling network architectures for deep reinforcement learning. In International Conference on Machine Learning, pp. 1995–2003, 2016.
252
+
253
+ Yaodong Yang, Jianye Hao, Ben Liao, Kun Shao, Guangyong Chen, Wulong Liu, and Hongyao Tang. Qatten: A general framework for cooperative multiagent reinforcement learning. arXiv preprint arXiv:2002.03939, 2020.
254
+
255
+ Tianhe Yu, Garrett Thomas, Lantao Yu, Stefano Ermon, James Zou, Sergey Levine, Chelsea Finn, and Tengyu Ma. Mopo: Model-based offline policy optimization. arXiv preprint arXiv:2005.13239, 2020.
256
+
257
+ Chongjie Zhang and Victor Lesser. Coordinated multi-agent reinforcement learning in networked distributed pomdps. In Twenty-Fifth AAAI Conference on Artificial Intelligence, 2011.
258
+
259
+ # A OMITTED PROOFS IN SECTION 3
260
+
261
+ Definition 1 (Advantage-based IGM). For a joint action-value function $Q _ { t o t }$ : $\pmb { \tau } \times \pmb { A } \mapsto \mathbb { R }$ and individual action-value functions $[ Q _ { i } : \mathcal { T } \times \mathcal { A } \mapsto \mathbb { R } ] _ { i = 1 } ^ { n }$ , where $\forall \tau \in \tau$ , $\forall a \in A$ , $\forall i \in \mathcal N$ ,
262
+
263
+ such that the following holds
264
+
265
+ $$
266
+ \underset { a \in \mathcal { A } } { \arg \operatorname* { m a x } } A _ { t o t } ( \tau , a ) = \left( \underset { a _ { 1 } \in \mathcal { A } } { \arg \operatorname* { m a x } } A _ { 1 } ( \tau _ { 1 } , a _ { 1 } ) , \dots , \underset { a _ { n } \in \mathcal { A } } { \arg \operatorname* { m a x } } A _ { n } ( \tau _ { n } , a _ { n } ) \right) ,
267
+ $$
268
+
269
+ then, we can say that $[ Q _ { i } ] _ { i = 1 } ^ { n }$ satisfies advantage-based IGM for $Q _ { t o t }$ .
270
+
271
+ Let the action-value function class derived from IGM is denoted by
272
+
273
+ $$
274
+ \begin{array} { r } { \widetilde { \mathcal { Q } } = \left\{ \left( \widetilde { Q } _ { t o t } \in \mathbb { R } ^ { | \mathcal { T } | | A | ^ { n } } , \left[ \widetilde { Q } _ { i } \in \mathbb { R } ^ { | \mathcal { T } | | A | } \right] _ { i = 1 } ^ { n } \right) \Big | \mathrm { E q . ~ ( 2 ) ~ i s ~ s a t i s f i e d } \right\} , } \end{array}
275
+ $$
276
+
277
+ where $\widetilde { Q } _ { t o t }$ and $\left[ \widetilde { Q } _ { i } \right] _ { i = 1 } ^ { n }$ denote the joint and individual action-value functions induced by IGM, respectively. Similarly, let
278
+
279
+ $$
280
+ \begin{array} { r } { \widehat { \mathcal { Q } } = \left\{ \left( \widehat { Q } _ { t o t } \in \mathbb R ^ { | T | | A | ^ { n } } , \left[ \widehat { Q } _ { i } \in \mathbb R ^ { | T | | A | } \right] _ { i = 1 } ^ { n } \right) \Big | \operatorname { E q . } \left( 3 \right) , ( 4 ) , ( 5 ) \mathrm { ~ a r e ~ s a t i s f i e d } \right\} } \end{array}
281
+ $$
282
+
283
+ denote the action-value function class derived from advantage-based IGM. $\widetilde { V } _ { t o t }$ and $\widetilde { A } _ { t o t }$ denote the joint state-value and advantage functions, respectively. $\left[ \widetilde { V } _ { i } \right] _ { i = 1 } ^ { n }$ and $\left[ \widetilde { A } _ { i } \right] _ { i = 1 } ^ { n }$ denote the individual state-value and advantage functions induced by advantage-IGM, respectively. According to the duplex dueling architecture $Q = V + A$ stated in advantage-based IGM (see Definition 1), we derive the joint and individual action-value functions as following: $\forall \pmb { \tau } \in \mathcal { T } , \forall \pmb { a } \in \pmb { A } , \forall i \in \mathcal { N }$ ,
284
+
285
+ $$
286
+ \widehat { Q } _ { t o t } ( \tau , \boldsymbol { a } ) = \widehat { V } _ { t o t } ( \tau ) + \widehat { A } _ { t o t } ( \tau , \boldsymbol { a } ) \quad \mathrm { a n d } \quad \widehat { Q } _ { i } ( \tau _ { i } , \boldsymbol { a } _ { i } ) = \widehat { V } _ { i } ( \tau _ { i } ) + \widehat { A } _ { i } ( \tau _ { i } , \boldsymbol { a } _ { i } ) .
287
+ $$
288
+
289
+ roposition 1. The advantage-based IGM and IGM function classes are equivalent.
290
+
291
+ Proof. We will prove $\widetilde { \mathcal { Q } } \equiv \widehat { \mathcal { Q } }$ in the following two directions.
292
+
293
+ $\widetilde { \mathcal { Q } } \subseteq \widehat { \mathcal { Q } }$ For any $\left( \widetilde { Q } _ { t o t } , \left[ \widetilde { Q } _ { i } \right] _ { i = 1 } ^ { n } \right) \in \widetilde { \mathcal { Q } }$ , we construct $\widehat { Q } _ { t o t } = \widetilde { Q } _ { t o t }$ and $\left[ \widehat { Q } _ { i } \right] _ { i = 1 } ^ { n } = \left[ \widetilde { Q } _ { i } \right] _ { i = 1 } ^ { n }$ . The joint and individual state-value/advantage functions induced by advantage-IGM
294
+
295
+ $$
296
+ \begin{array} { r l } { \widehat { V } _ { t o t } ( \tau ) = \displaystyle \operatorname* { m a x } _ { a ^ { \prime } } \widehat { Q } _ { t o t } ( \tau , a ^ { \prime } ) \quad \mathrm { a n d } \quad \widehat { A } _ { t o t } ( \tau , a ) = \widehat { Q } _ { t o t } ( \tau , a ) - \widehat { V } _ { t o t } ( \tau ) , } & { } \\ { \widehat { V } _ { i } ( \tau _ { i } ) = \displaystyle \operatorname* { m a x } _ { a _ { i } ^ { \prime } } \widehat { Q } _ { i } ( \tau _ { i } , a _ { i } ^ { \prime } ) \quad \mathrm { a n d } \quad \widehat { A } _ { i } ( \tau _ { i } , a _ { i } ) = \widehat { Q } _ { i } ( \tau _ { i } , a _ { i } ^ { \prime } ) - \widehat { V } _ { i } ( \tau _ { i } ) , \quad \forall i \in \mathcal { N } , } & { } \end{array}
297
+ $$
298
+
299
+ are derived by Eq. (3) and Eq. (4), respectively. Because state-value functions do not affect the greedy action selection, $\forall \pmb { \tau } \in \pmb { \mathcal { T } } , \forall \pmb { a } \in \pmb { \mathcal { A } }$ ,
300
+
301
+ $$
302
+ \begin{array} { r l } & { \quad \underset { a \in \mathcal { A } } { \mathrm { a r g } } \underset { \bar { Q } \ t o t } { \mathrm { m a x } } \left( \tau , a \right) = \left( \underset { a _ { 1 } \in A } { \mathrm { a r g } } \underset { \bar { Q } _ { 1 } } { \mathrm { m a x } } \widehat { Q } _ { 1 } ( \tau _ { 1 } , a _ { 1 } ) , \dots , \underset { a _ { n } \in A } { \mathrm { a r g } } \underset { \bar { Q } _ { n } } { \mathrm { m a x } } \widehat { Q } _ { n } ( \tau _ { n } , a _ { n } ) \right) } \\ & { \Rightarrow \underset { a \in \mathcal { A } } { \mathrm { a r g } } \underset { \bar { Q } \ t o t } { \mathrm { m a x } } ( \tau , a ) = \left( \underset { a _ { 1 } \in A } { \mathrm { a r g } } \underset { \bar { Q } _ { 1 } } { \mathrm { m a x } } \widehat { Q } _ { 1 } ( \tau _ { 1 } , a _ { 1 } ) , \dots , \underset { a _ { n } \in A } { \mathrm { a r g } } \underset { \bar { Q } _ { n } \in A } { \mathrm { m a x } } \widehat { Q } _ { n } ( \tau _ { n } , a _ { n } ) \right) } \\ & { \Rightarrow \underset { a \in \mathcal { A } } { \mathrm { a r g } } \underset { \bar { Q } \ t o t } { \mathrm { m a x } } \left( \widehat { Q } _ { t o t } ( \tau , a ) - \widehat { V } _ { t o t } ( \tau ) \right) = } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \ \end{array}
303
+ $$
304
+
305
+ Thus, $\left( \widehat { Q } _ { t o t } , \left[ \widehat { Q } _ { i } \right] _ { i = 1 } ^ { n } \right) \in \widehat { \mathcal { Q } }$ , which means that $\widetilde { \mathcal { Q } } \subseteq \widehat { \mathcal { Q } }$
306
+
307
+ $\widehat { \mathfrak { Q } } \subseteq \widetilde { \mathfrak { Q } }$ We will prove this direction in the same way. For any $\left( \widehat { Q } _ { t o t } , \left[ \widehat { Q } _ { i } \right] _ { i = 1 } ^ { n } \right) \in \widehat { \mathcal { Q } }$ , we construct $\widetilde { Q } _ { t o t } = \widehat { Q } _ { t o t }$ and $\left[ \widetilde { Q } _ { i } \right] _ { i = 1 } ^ { n } = \left[ \widehat { Q } _ { i } \right] _ { i = 1 } ^ { n }$ . Because state-value functions do not affect the greedy action selection, $\forall \tau \in \tau$ , $\forall a \in A$ ,
308
+
309
+ $$
310
+ \begin{array} { r l } & { \quad \underset { a \in A } { \mathrm { a r g ~ m a x ~ } } \widehat { A } _ { t o t } ( \tau , a ) = \left( \underset { a _ { 1 } \in A } { \mathrm { a r g ~ m a x ~ } } \widehat { A } _ { 1 } ( \tau _ { 1 } , a _ { 1 } ) , \dots , \underset { a _ { n } \in A } { \mathrm { a r g ~ m a x ~ } } \widehat { A } _ { n } ( \tau _ { n } , a _ { n } ) \right) } \\ & { \Rightarrow \underset { a \in A } { \mathrm { a r g ~ m a x ~ } } \left( \widehat { A } _ { t o t } ( \tau , a ) + \widehat { V } _ { t o t } ( \tau ) \right) = } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \Rightarrow \underset { a \in A } { \mathrm { a r g ~ m a x ~ } } \widehat { A } _ { t o t } ( \tau , a ) = \left( \underset { a _ { 1 } \in A } { \mathrm { a r g ~ m a x ~ } } \widehat { Q } _ { 1 } ( \tau _ { 1 } , a _ { 1 } ) , \dots , \underset { a _ { n } \in A } { \mathrm { a r g ~ m a x ~ } } \widehat { Q } _ { n } ( \tau _ { n } , a _ { n } ) \right) } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & \quad \quad \quad \quad \quad \end{array}
311
+ $$
312
+
313
+ Thus, $\left( \widetilde { Q } _ { t o t } , \left[ \widetilde { Q } _ { i } \right] _ { i = 1 } ^ { n } \right) \in \widetilde { \mathcal { Q } } _ { }$ , which means that $\widehat { \mathfrak { Q } } \subseteq \widetilde { \mathfrak { Q } }$ . The action-value function classes derived from advantage-based IGM and IGM are equivalent.
314
+
315
+ Fact 1. The constraint of advantage-based IGM stated in Eq. (5) is equivalent to that when $\forall \tau \in \tau$ , $\forall \pmb { a } ^ { * } \in \pmb { A } ^ { * } ( \pmb { \tau } ) , \forall \pmb { a } \in \pmb { A } \backslash \pmb { A } ^ { * } ( \pmb { \tau } ) , \forall i \in \mathcal { N } ,$
316
+
317
+ $$
318
+ \begin{array} { c l c r } { { } } & { { A _ { t o t } ( \tau , a ^ { * } ) = A _ { i } ( \tau _ { i } , a _ { i } ^ { * } ) = 0 } } & { { a n d } } & { { A _ { t o t } ( \tau , a ) < 0 , A _ { i } ( \tau _ { i } , a _ { i } ) \leq 0 , } } \\ { { } } & { { } } & { { \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } } } \\ { { } } & { { \mathrm { } } } & \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm { } \mathrm \end{array}
319
+ $$
320
+
321
+ Proof. We derive that $\forall \tau \in \tau$ , $\forall a \in A$ , $\forall i \in \mathcal N$ , $\widehat { A } _ { t o t } ( \pmb { \tau } , \pmb { a } ) \leq 0$ and $\widehat { A } _ { i } ( \tau _ { i } , a _ { i } ) \leq 0$ from Eq. (3) and Eq. (4) of Definition 1, respectively. According to the definition of arg max operator, Eq. (3), and Eq. (4), $\forall \tau \in \tau$ , let $\hat { \boldsymbol { A } } ^ { * } ( \tau )$ denote arg $\operatorname* { m a x } _ { \substack { \mathbf { a } \in \mathcal { A } } } \widehat { A } _ { t o t } ( \tau , \mathbf { a } )$ as follows:
322
+
323
+ $$
324
+ \begin{array} { r l } & { \hat { \boldsymbol { \mathcal { A } } } ^ { * } ( \tau ) = \underset { a \in \boldsymbol { \mathcal { A } } } { \mathrm { a r g } \mathrm { m a x } } \ \widehat { \boldsymbol { A } } _ { t o t } ( \tau , a ) = \underset { a \in \boldsymbol { \mathcal { A } } } { \mathrm { a r g } \mathrm { m a x } } \ \widehat { \boldsymbol { Q } } _ { t o t } ( \tau , a ) } \\ & { \quad \quad \quad = \left. a | a \in \boldsymbol { \mathcal { A } } , \widehat { \boldsymbol { Q } } _ { t o t } ( \tau , a ) = \widehat { V } _ { t o t } ( \tau ) \right. } \\ & { \quad \quad \quad = \left. a | a \in \boldsymbol { \mathcal { A } } , \widehat { \boldsymbol { Q } } _ { t o t } ( \tau , a ) - \widehat { V } _ { t o t } ( \tau ) = 0 \right. } \\ & { \quad \quad \quad = \left. a | a \in \boldsymbol { \mathcal { A } } , \widehat { \boldsymbol { A } } _ { t o t } ( \tau , a ) = 0 \right. . } \end{array}
325
+ $$
326
+
327
+ Similarly, $\forall \pmb { \tau } \in \pmb { \mathcal { T } } , \forall i \in \mathcal { N }$ , let $\widehat { A } _ { i } ^ { * } ( \tau _ { i } )$ denote a $\operatorname { r g m a x } _ { a _ { i } \in A } \widehat { A } _ { i } ( \tau _ { i } , a _ { i } )$ as follows:
328
+
329
+ $$
330
+ \begin{array} { r l } & { \widehat { A } _ { i } ^ { * } ( \tau _ { i } ) = \underset { a _ { i } \in \cal { A } } { \arg \operatorname* { m a x } } \widehat { A } _ { i } ( \tau _ { i } , a _ { i } ) = \underset { a _ { i } \in \cal { A } } { \arg \operatorname* { m a x } } \widehat { Q } _ { i } ( \tau _ { i } , a _ { i } ) } \\ & { \quad \quad \quad = \left\{ a _ { i } | a _ { i } \in \cal { A } , \widehat { Q } _ { i } ( \tau _ { i } , a _ { i } ) = \widehat { V } _ { i } ( \tau _ { i } ) \right\} } \\ & { \quad \quad \quad = \left\{ a _ { i } | a _ { i } \in \cal { A } , \widehat { A } _ { i } ( \tau _ { i } , a _ { i } ) = 0 \right\} . } \end{array}
331
+ $$
332
+
333
+ Thus, $\forall \pmb { \tau } \in \pmb { \mathcal { T } } , \forall \pmb { a } ^ { * } \in \widehat { \pmb { \mathcal { A } } } ^ { * } ( \pmb { \tau } ) , \forall \pmb { a } \in \pmb { \mathcal { A } } \backslash \widehat { \pmb { A } } ^ { * } ( \pmb { \tau } ) .$ ,
334
+
335
+ $$
336
+ \widehat { A } _ { t o t } ( \tau , a ^ { * } ) = 0 \quad \mathrm { a n d } \quad \widehat { A } _ { t o t } ( \tau , a ) < 0 ;
337
+ $$
338
+
339
+ $$
340
+ \forall \pmb { \tau } \in \pmb { \mathcal { T } } , \forall i \in \mathcal { N } , \forall a _ { i } ^ { * } \in \widehat { \mathcal { A } } ^ { * } ( \tau _ { i } ) , \forall a _ { i } \in \mathcal { A } \backslash \widehat { \mathcal { A } } ^ { * } ( \tau _ { i } ) ,
341
+ $$
342
+
343
+ $$
344
+ \widehat { A } _ { i } ( \tau _ { i } , a _ { i } ^ { * } ) = 0 \quad \mathrm { a n d } \quad \widehat { A } _ { i } ( \tau _ { i } , a _ { i } ) < 0 .
345
+ $$
346
+
347
+ Recall the constraint stated in Eq. (5), $\forall \tau \in \tau$ ,
348
+
349
+ $$
350
+ \underset { a \in \mathcal { A } } { \arg \operatorname* { m a x } } \ \widehat { A } _ { t o t } ( \tau , a ) = \left( \underset { a _ { 1 } \in \mathcal { A } } { \arg \operatorname* { m a x } } \widehat { A } _ { 1 } ( \tau _ { 1 } , a _ { 1 } ) , \dots , \underset { a _ { n } \in \mathcal { A } } { \arg \operatorname* { m a x } } \widehat { A } _ { n } ( \tau _ { n } , a _ { n } ) \right) .
351
+ $$
352
+
353
+ We can rewrite the constraint of advantage-based IGM stated in Eq. (5) as $\forall \tau \in \tau$ ,
354
+
355
+ $$
356
+ \begin{array} { r } { \widehat { \pmb { \mathscr { A } } } ^ { * } ( \pmb { \tau } ) = \left\{ \langle a _ { 1 } , \ldots , a _ { n } \rangle \big | a _ { i } \in \widehat { \mathscr { A } } _ { i } ^ { * } ( \tau _ { i } ) , \forall i \in \mathcal { N } \right\} . } \end{array}
357
+ $$
358
+
359
+ Therefore, combining Eq. (14), Eq. (15), and Eq. (16), we can derive $\forall \tau \in \tau$ , $\forall a ^ { * } \in \widehat { \pmb { A } } ^ { * } ( \tau )$ , $\forall \pmb { a } \in \pmb { A } \ \backslash \ \hat { \pmb { A } } ^ { * } ( \pmb { \tau } ) , \forall i \in \mathcal { N } ,$ ,
360
+
361
+ $$
362
+ \widehat { A } _ { t o t } ( \pmb { \tau } , \pmb { a } ^ { * } ) = \widehat { A } _ { i } ( \tau _ { i } , \pmb { a } _ { i } ^ { * } ) = 0 \quad \mathrm { a n d } \quad \widehat { A } _ { t o t } ( \pmb { \tau } , \pmb { a } ) < 0 , \widehat { A } _ { i } ( \tau _ { i } , \pmb { a } _ { i } ) \leq 0 .
363
+ $$
364
+
365
+ In another way, combining Eq. (14), Eq. (15), and Eq. (17), we can derive Eq. (16) by the definition of $\hat { \boldsymbol { A } } ^ { * }$ and $\left[ \stackrel { \cdot } { \mathcal { A } } ^ { * } \right] _ { i = 1 } ^ { n }$ (see Eq. (12) and Eq. (13)). In more detail, the closed set property of Cartesian product of $\left[ a _ { i } ^ { * } \right] _ { i = 1 } ^ { n }$ 1 has been encoded into the Eq. (16) and Eq. (17) simultaneously. □
366
+
367
+ Proposition 2. Given the universal function approximation of neural networks, the action-value function class that QPLEX can realize is equivalent to what is induced by the IGM principle.
368
+
369
+ Proof. We assume that the neural network of QPLEX can be large enough to achieve the universal function approximation by corresponding theorem (Csáji et al., 2001). Let the action-value function class that QPLEX can realize is denoted by
370
+
371
+ $$
372
+ \overline { { \mathscr { Q } } } = \left\{ \left( \overline { { Q } } _ { t o t } \in \mathbb R ^ { | T | | \mathcal { A } | ^ { n } } , \left[ \overline { { Q } } _ { i } \in \mathbb R ^ { | T | | \mathcal { A } | } \right] _ { i = 1 } ^ { n } \right) \Big | \mathrm { E q . } \left( 7 \right) , ( 8 ) , ( 9 ) , ( 1 0 ) , ( 1 1 ) \mathrm { ~ a r e ~ s a t i s f i e d } \right\} .
373
+ $$
374
+
375
+ In addition, $\overline { { Q } } _ { t o t }$ , $\overline { { V } } _ { t o t }$ , $\overline { { A } } _ { t o t }$ , $\left[ \overline { { Q } } _ { i } ^ { \prime } \right] _ { i = 1 } ^ { n } , \left[ \overline { { V } } _ { i } ^ { \prime } \right] _ { i = 1 } ^ { n } , \left[ \overline { { A } } _ { i } ^ { \prime } \right] _ { i = 1 } ^ { n } , \left[ \overline { { Q } } _ { i } \right] _ { i = 1 } ^ { n } , \left[ \overline { { V } } _ { i } \right] _ { i = 1 } ^ { n } :$ and $\textstyle \left[ { \overline { { A } } } _ { i } \right] _ { i = 1 } ^ { n }$ denote the corresponding (joint, transformed, and individual) (action-value, state-value, and advantage) functions, respectively. In the implementation of QPLEX, we ensure the positivity of important weights of Transformation and joint advantage function, $\left[ w _ { i } \right] _ { i = 1 } ^ { n }$ and $[ \lambda _ { i } ] _ { i = 1 } ^ { n }$ , which maintains the greedy action selection flow and rules out these non-interesting points (zeros) on optimization. We will prove $\widehat { \mathcal { Q } } \equiv \overline { { \mathcal { Q } } }$ in the following two directions.
376
+
377
+ $\widehat { \mathcal { Q } } \subseteq \overline { { \mathcal { Q } } }$ For any $\left( \widehat { Q } _ { t o t } , \left[ \widehat { Q } _ { i } \right] _ { i = 1 } ^ { n } \right) \in \widehat { \mathcal { Q } }$ , we construct $\overline { { Q } } _ { t o t } = \widehat { Q } _ { t o t }$ and $\left[ \overline { { { Q } } } _ { i } \right] _ { i = 1 } ^ { n } = \left[ \widehat { Q } _ { i } \right] _ { i = 1 } ^ { n }$ and derive $\overline { { V } } _ { t o t }$ , $\overline { { A } } _ { t o t }$ , $\left[ \overline { { V } } _ { i } \right] _ { i = 1 } ^ { n }$ i=1, and $\left[ \overline { { A } } _ { i } \right] _ { i = 1 } ^ { n }$ i=1by Eq.(3) and Eq. (4), respectively. Note that in the
378
+
379
+ $$
380
+ V _ { i } ( \pmb { \tau } ) = w _ { i } ( \pmb { \tau } ) V _ { i } ( \tau _ { i } ) + b _ { i } ( \pmb { \tau } ) \quad \mathrm { a n d } \quad A _ { i } ( \pmb { \tau } , a _ { i } ) = w _ { i } ( \pmb { \tau } ) A _ { i } ( \tau _ { i } , a _ { i } )
381
+ $$
382
+
383
+ and
384
+
385
+ $$
386
+ Q _ { t o t } ( \tau , a ) = V _ { t o t } ( \tau ) + A _ { t o t } ( \tau , a ) = \sum _ { i = 1 } ^ { n } V _ { i } ( \tau ) + \sum _ { i = 1 } ^ { n } \lambda _ { i } ( \tau , a ) A _ { i } ( \tau , a _ { i } ) .
387
+ $$
388
+
389
+ In addition, we construct transformed functions connecting joint and individual functions as follows: $\forall \pmb { \tau } \in \mathcal { T } , \forall \pmb { a } \in \pmb { A } , \forall i \in \mathcal { N }$ ,
390
+
391
+ $$
392
+ \overline { { Q } } _ { i } ^ { \prime } ( \tau , a ) = \frac { \overline { { Q } } _ { t o t } ( \tau , a ) } { n } , ~ \overline { { V } } _ { i } ^ { \prime } ( \tau ) = \underset { a \in A } { \mathrm { a r g } \operatorname* { m a x } } \overline { { Q } } _ { i } ^ { \prime } ( \tau , a ) , ~ \mathrm { a n d } ~ \overline { { A } } _ { i } ^ { \prime } ( \tau , a ) = \overline { { Q } } _ { i } ^ { \prime } ( \tau , a ) - \overline { { V } } _ { i } ^ { \prime } ( \tau ) ,
393
+ $$
394
+
395
+ which means that according to Fact 1,
396
+
397
+ $$
398
+ w _ { i } ( \tau ) = 1 , b _ { i } ( \tau ) = \overline { { V } } _ { i } ^ { \prime } ( \tau ) - \overline { { V } } _ { i } ( \tau _ { i } ) , \mathrm { ~ a n d ~ } \lambda _ { i } ( \tau _ { i } , a ) = \left\{ \begin{array} { l l } { \overline { { \frac { A _ { i } ^ { \prime } } { A _ { i } } ( \tau _ { i } , a ) } } > 0 , } & { \mathrm { ~ w h e n ~ } \overline { { A } } _ { i } ( \tau _ { i } , a _ { i } ) < 0 , } \\ { \overline { { A } } _ { i } ( \tau _ { i } , a _ { i } ) } & { \mathrm { ~ w h e n ~ } \overline { { A } } _ { i } ( \tau _ { i } , a _ { i } ) = 0 . } \end{array} \right.
399
+ $$
400
+
401
+ Thus, $\left( \overline { { Q } } _ { t o t } , \left[ \overline { { Q } } _ { i } \right] _ { i = 1 } ^ { n } \right) \in \overline { { \mathcal { Q } } }$ , which means that $\widehat { \mathfrak { Q } } \subseteq \overline { { \mathfrak { Q } } }$
402
+
403
+ $\overline { { \mathcal { Q } } } \subseteq \widehat { \mathcal { Q } }$ For any $\left( \overline { { Q } } _ { t o t } , \left[ \overline { { Q } } _ { i } \right] _ { i = 1 } ^ { n } \right) \in \overline { { \mathcal { Q } } }$ , with the similar discussion of Fact 1, $\forall \tau \in \tau$ , $\forall i \in \mathcal N$ , let $\overline { { \mathcal { A } } } _ { i } ^ { * } ( \tau _ { i } )$ denote a $\operatorname { r g m a x } _ { a _ { i } \in \mathcal { A } } \overline { { A } } _ { i } ( \tau _ { i } , a _ { i } )$ , where
404
+
405
+ $$
406
+ \begin{array} { r } { \overline { { \mathcal { A } } } _ { i } ^ { * } ( \tau _ { i } ) = \left\{ a _ { i } | a _ { i } \in \mathcal { A } , \overline { { \mathcal { A } } } _ { i } ( \tau _ { i } , a _ { i } ) = 0 \right\} . } \end{array}
407
+ $$
408
+
409
+ Combining the positivity of $\left[ w _ { i } \right] _ { i = 1 } ^ { n }$ and $\left[ \lambda _ { i } \right] _ { i = 1 } ^ { n }$ with Eq. (7), (8), (9), and (11), we can derive $\forall \pmb { \tau } \in \pmb { \mathcal { T } } , \forall i \in \mathcal { N } , \forall a _ { i } ^ { * } \in \overline { { \mathcal { A } } } ^ { * } ( \tau _ { i } ) , \forall a _ { i } \in \mathcal { A } \backslash \overline { { \mathcal { A } } } ^ { * } ( \tau _ { i } ) .$ ,
410
+
411
+ $$
412
+ \begin{array} { r l } & { \overline { { A } } _ { i } ( \tau _ { i } , a _ { i } ^ { * } ) = 0 \quad \mathrm { a n d } \quad \overline { { A } } _ { i } ( \tau _ { i } , a _ { i } ) < 0 } \\ { \Rightarrow \quad \overline { { A } } _ { i } ^ { \prime } ( \tau , a _ { i } ^ { * } ) = w _ { i } ( \tau ) \overline { { A } } _ { i } ( \tau _ { i } , a _ { i } ^ { * } ) = 0 \quad \mathrm { a n d } \quad \overline { { A } } _ { i } ^ { \prime } ( \tau , a _ { i } ) = w _ { i } ( \tau ) \overline { { A } } _ { i } ( \tau _ { i } , a _ { i } ) < 0 } \\ { \Rightarrow \quad \overline { { A } } _ { t o t } ( \tau , a ^ { * } ) = \lambda _ { i } ( \tau , a ^ { * } ) \overline { { A } } _ { i } ^ { \prime } ( \tau _ { i } , a _ { i } ^ { * } ) = 0 \quad \mathrm { a n d } \quad \overline { { A } } _ { t o t } ( \tau , a ) = \lambda _ { i } ( \tau , a ) \overline { { A } } _ { i } ^ { \prime } ( \tau _ { i } , a _ { i } ^ { * } ) < 0 , } \end{array}
413
+ $$
414
+
415
+ where $\pmb { a } ^ { * } = \langle a _ { 1 } ^ { * } , \ldots , a _ { n } ^ { * } \rangle$ and $\pmb { a } = \langle a _ { 1 } , \ldots , a _ { n } \rangle$ . Notably, these $\mathbf { \delta } \mathbf { \textit { a } } ^ { * }$ forms
416
+
417
+ $$
418
+ \begin{array} { r } { \overline { { \mathcal { A } } } ^ { * } ( \tau ) = \left\{ \langle a _ { 1 } , \ldots , a _ { n } \rangle \big | a _ { i } \in \overline { { \mathcal { A } } } _ { i } ^ { * } ( \tau _ { i } ) , \forall i \in \mathcal { N } \right\} , } \end{array}
419
+ $$
420
+
421
+ which is similar to Eq. (16) in the proof of Fact 1. We construct $\widehat { Q } _ { t o t } = \overline { { Q } } _ { t o t }$ and $\left[ \widehat { Q } _ { i } \right] _ { i = 1 } ^ { n } = \left[ \overline { { { Q } } } _ { i } \right] _ { i = 1 } ^ { n }$ According to Eq. (18), the constraints of advantage-based IGM stated in Fact 1 (Eq. (3), Eq. (4), and Eq. (6)) are satisfied, which means that $\left( \widehat { Q } _ { t o t } , \left[ \widehat { \widehat { Q } } _ { i } \right] _ { i = 1 } ^ { n } \right) \in \widehat { \mathcal { Q } }$ and $\overline { { \mathcal { Q } } } \subseteq \widehat { \mathcal { Q } }$ .
422
+
423
+ Thus, when assuming neural networks provide universal function approximation, the joint action-value function class that QPLEX can realize is equivalent to what is induced by the IGM principle. □
424
+
425
+ # B EXPERIMENT SETTINGS AND IMPLEMENTATION DETAILS
426
+
427
+ # B.1 STARCRAFT II
428
+
429
+ We consider the combat scenario of StarCraft II unit micromanagement tasks, where the enemy units are controlled by the built-in AI, and each ally unit is controlled by the reinforcement learning agent. The units of the two groups can be asymmetric, but the units of each group should belong to the same race. At each timestep, every agent takes action from the discrete action space, which includes the following actions: no-op, move [direction], attack [enemy id], and stop. Under the control of these actions, agents move and attack in continuous maps. At each time step, MARL agents will get a global reward equal to the total damage done to enemy units. Killing each enemy unit and winning the combat will bring additional bonuses of 10 and 200, respectively. We briefly introduce the SMAC challenges of our paper in Table 1.
430
+
431
+ # B.2 IMPLEMENTATION DETAILS
432
+
433
+ We adopt the PyMARL (Samvelyan et al., 2019) implementation of state-of-the-art baselines: QTRAN (Son et al., 2019), QMIX (Rashid et al., 2018), VDN (Sunehag et al., 2018), Qatten (Yang et al., 2020), and WQMIX (OW-QMIX and CW-QMIX; Rashid et al., 2020). The hyper-parameters of these algorithms are the same as that in SMAC (Samvelyan et al., 2019) and referred in their source codes. QPLEX is also based on PyMARL, whose special hyper-parameters are illustrated in Table 2 and other common hyper-parameters are adopted by the default implementation of PyMARL (Samvelyan et al., 2019). Especially in the online data collection, we take the advanced implementation of Transformation of Qatten in QPLEX. To ensure the positivity of important weights of Transformation and joint advantage function, we add a sufficiently small amount $\dot { \epsilon ^ { \prime } } = 1 0 ^ { - 1 0 }$ on $\boldsymbol { \left[ w _ { i } \right] } _ { i = 1 } ^ { n }$ and $\left[ \lambda _ { i } \right] _ { i = 1 } ^ { n }$ . In addition, we stop gradients of local advantage function $A _ { i }$ to increase the optimization stability of the max operator of dueling structure. This instability consideration due to max operator has been justified by Dueling DQN (Wang et al., 2016). We approximate the joint action-value function as
434
+
435
+ $$
436
+ Q _ { t o t } ( \pmb { \tau } , \pmb { a } ) \approx \sum _ { i = 1 } ^ { n } Q _ { i } ( \pmb { \tau } , \pmb { a } _ { i } ) + \sum _ { i = 1 } ^ { n } \left( \lambda _ { i } ( \pmb { \tau } , \pmb { a } ) - 1 \right) \widetilde { A } _ { i } ( \pmb { \tau } , \pmb { a } _ { i } ) ,
437
+ $$
438
+
439
+ where $\widetilde { A } _ { i }$ denotes a variant of the local advantage function $A _ { i }$ by stoping gradients.
440
+
441
+ Table 1: The StarCraft multi-Agent challenge (SMAC; Samvelyan et al., 2019) benchmark.
442
+
443
+ <table><tr><td>Map Name</td><td>Ally Units</td><td>Enemy Units</td></tr><tr><td>2s3z</td><td>2 Stalkers&amp;3Zealots</td><td>2 Stalkers&amp;3Zealots</td></tr><tr><td>3s5z</td><td>3 Stalkers&amp;5Zealots</td><td>3 Stalkers&amp;5 Zealots</td></tr><tr><td>1c3s5z</td><td>1 Colossus,3 Stalkers &amp; 5 Zealots</td><td>1 Colossus,3 Stalkers&amp;5 Zealots</td></tr><tr><td>5m_vs_6m</td><td>5Marines</td><td>6Marines</td></tr><tr><td>10m_vs_11m</td><td>10 Marines</td><td>11 Marines</td></tr><tr><td>27m_vs_30m</td><td>27 Marines</td><td>30 Marines</td></tr><tr><td>3s5z_vs_3s6z</td><td>3 Stalkers&amp;5Zealots</td><td>3 Stalkers &amp; 6 Zealots</td></tr><tr><td>MMM2</td><td>1Medivac,2Marauders&amp;7Marines</td><td>1Medivac,2Marauders&amp;8Marines</td></tr><tr><td>2s_vs_1sc</td><td>2 Stalkers</td><td>1 Spine Crawler</td></tr><tr><td>3s_vs_5z</td><td>3 Stalkers</td><td>5 Zealots</td></tr><tr><td>6h_vs_8z</td><td>6 Hydralisks</td><td>8 Zealots</td></tr><tr><td>bane_vs_bane</td><td>20 Zerglings &amp; 4Banelings</td><td>20 Zerglings &amp; 4 Banelings</td></tr><tr><td>2c_vs_64zg</td><td>2 Colossi</td><td>64 Zerglings</td></tr><tr><td>corridor</td><td>6 Zealots</td><td>24 Zerglings</td></tr><tr><td>5s10z</td><td>5Stalkers&amp;10 Zealots</td><td>5Stalkers&amp;10 Zealots</td></tr><tr><td>7sz</td><td>7 Stalkers &amp;7 Zealots</td><td>7 Stalkers&amp;7Zealots</td></tr><tr><td>1c3s8z_vs_1c3s9z</td><td>1 Colossus,3 Stalkers &amp;8 Zealots</td><td>1 Colossus,3 Stalkers &amp;9 Zealots</td></tr></table>
444
+
445
+ Table 2: The network configurations of QPLEX’s architecture.
446
+
447
+ <table><tr><td>QPLEX&#x27;s architecuture configurations</td><td>Didactic Examples</td><td>StarCraft II</td></tr><tr><td>The number of layers in w,b,入,,U</td><td>2or3</td><td>1</td></tr><tr><td>The number of heads in the attention module</td><td>4 or 10</td><td>4</td></tr><tr><td>Unit number in middle layers of w,b,入,,U</td><td>64</td><td>Q</td></tr><tr><td>Activation in the middle layers of w,U</td><td>Relu</td><td>Q</td></tr><tr><td>Activation in the last layer of w, U</td><td>Absolute</td><td>Absolute</td></tr><tr><td>Activation in the middle layers of b</td><td>Relu</td><td>Q</td></tr><tr><td>Activation in the last layer of b</td><td>None</td><td>None</td></tr><tr><td>Activation in the middle layers of 入,</td><td>Relu</td><td>Q</td></tr><tr><td>Activation in the last layer of 入,Φ</td><td>Sigmoid</td><td>Sigmoid</td></tr></table>
448
+
449
+ Our training time on an NVIDIA RTX 2080TI GPU of each task is about 6 hours to 20 hours, depending on the agent number and the episode length limit of each map. The percentage of episodes in which MARL agents defeat all enemy units within the time limit is called test win rate. We pause training every 10k timesteps and evaluate 32 episodes with decentralized greedy action selection to measure test win rate of each algorithm. After training every 200 episodes, the target network will be updated once. We call this update period an Iteration for didactic tasks. In the two-state MMDP, Optimal line of Figure 3b is approximately $\textstyle \sum _ { i = 0 } ^ { 9 9 } \gamma ^ { i } = 6 3 . 4$ in one episode of 100 timesteps.
450
+
451
+ Training with Online Data Collection We have collected a total of 2 million timestep data for each task and test the model every 10 thousand steps. We use $\epsilon$ -greedy exploration and a limited first-in-first-out (FIFO) replay buffer of size 5000 episodes, where $\epsilon$ is linearly annealed from 1.0 to 0.05 over 50k timesteps and keep it constant for the rest training process. To utilize the training buffer more efficiently, we perform gradient updates twice with a batch of 32 episodes after collecting every episode for each algorithm.
452
+
453
+ Training with Offline Data Collection To construct a diverse dataset, we train a behavior policy of QMIX (Rashid et al., 2018) or VDN (Sunehag et al., 2018) and collect its 20k or 50k experienced episodes throughout the training process. The dataset configurations are shown in Table 3. We evaluate QPLEX and four baselines over six random seeds, which includes three different datasets and tests two seeds on each dataset. We train 300 epochs to demonstrate our learning performance, where each epoch trains 160k transitions with a batch of 32 episodes. Moreover, the training process of behavior policy is the same as that discussed in PyMARL (Samvelyan et al., 2019).
454
+
455
+ C OMITTED FIGURES AND TABLES IN SECTION 4.1 AND 4.2
456
+
457
+ <table><tr><td>Map Name</td><td>Replay Buffer Size</td><td>Behaviour TestWinRate</td><td>Behaviour Policy</td></tr><tr><td>2s3z</td><td>20k episodes</td><td>95.8%</td><td>QMIX</td></tr><tr><td>3s5z</td><td>20k episodes</td><td>92.0%</td><td>QMIX</td></tr><tr><td>1c3s5z</td><td>20k episodes</td><td>90.2%</td><td>QMIX</td></tr><tr><td>2s_vs_1sc</td><td>20k episodes</td><td>98.1%</td><td>QMIX</td></tr><tr><td>3s_vs_5z</td><td>20k episodes</td><td>94.4%</td><td>VDN</td></tr><tr><td>2c_vs_64zg</td><td>50k episodes</td><td>80.9%</td><td>QMIX</td></tr></table>
458
+
459
+ Table 3: The dataset configurations of the offline data collection setting.
460
+
461
+ <table><tr><td rowspan=1 colspan=1>a1a2</td><td rowspan=1 colspan=1>A(1)</td><td rowspan=1 colspan=1>A(2)</td><td rowspan=1 colspan=1>A(3)</td></tr><tr><td rowspan=1 colspan=1>A(1)</td><td rowspan=1 colspan=1>8</td><td rowspan=1 colspan=1>-12</td><td rowspan=1 colspan=1>-12</td></tr><tr><td rowspan=1 colspan=1>A(2)</td><td rowspan=1 colspan=1>-12</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td></tr><tr><td rowspan=1 colspan=1>A3</td><td rowspan=1 colspan=1>-12</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td></tr></table>
462
+
463
+ <table><tr><td rowspan=1 colspan=1>a1a2</td><td rowspan=1 colspan=1>A(1)</td><td rowspan=1 colspan=1>A(2)</td><td rowspan=1 colspan=1>A(3)</td></tr><tr><td rowspan=1 colspan=1>A(1)</td><td rowspan=1 colspan=1>8.0</td><td rowspan=1 colspan=1>-12.0</td><td rowspan=1 colspan=1>-12.0</td></tr><tr><td rowspan=1 colspan=1>A2</td><td rowspan=1 colspan=1>-12.0</td><td rowspan=1 colspan=1>-0.0</td><td rowspan=1 colspan=1>0.0</td></tr><tr><td rowspan=1 colspan=1>A(3)</td><td rowspan=1 colspan=1>-12.0</td><td rowspan=1 colspan=1>0.0</td><td rowspan=1 colspan=1>0.0</td></tr></table>
464
+
465
+ (b) $Q _ { t o t }$ of QPLEX
466
+
467
+ <table><tr><td rowspan=1 colspan=1>a1a2</td><td rowspan=1 colspan=1>A(1)</td><td rowspan=1 colspan=1>A(2)</td><td rowspan=1 colspan=1>A(3)</td></tr><tr><td rowspan=1 colspan=1>A1</td><td rowspan=1 colspan=1>8.0</td><td rowspan=1 colspan=1>-12.1</td><td rowspan=1 colspan=1>-12.1</td></tr><tr><td rowspan=1 colspan=1>A(②</td><td rowspan=1 colspan=1>-12.2</td><td rowspan=1 colspan=1>-0.0</td><td rowspan=1 colspan=1>-0.0</td></tr><tr><td rowspan=1 colspan=1>A(3)</td><td rowspan=1 colspan=1>-12.1</td><td rowspan=1 colspan=1>-0.0</td><td rowspan=1 colspan=1>-0.0</td></tr></table>
468
+
469
+ (a) Payoff of matrix game (c) $Q _ { t o t }$ of QTRAN
470
+
471
+ <table><tr><td rowspan=1 colspan=1>a1a2</td><td rowspan=1 colspan=1>A(1)</td><td rowspan=1 colspan=1>A(2)</td><td rowspan=1 colspan=1>A(3)</td></tr><tr><td rowspan=1 colspan=1>A(1)</td><td rowspan=1 colspan=1>-8.0</td><td rowspan=1 colspan=1>-8.0</td><td rowspan=1 colspan=1>-8.0</td></tr><tr><td rowspan=1 colspan=1>A2</td><td rowspan=1 colspan=1>-8.0</td><td rowspan=1 colspan=1>-0.0</td><td rowspan=1 colspan=1>-0.0</td></tr><tr><td rowspan=1 colspan=1>A3</td><td rowspan=1 colspan=1>-8.0</td><td rowspan=1 colspan=1>-0.0</td><td rowspan=1 colspan=1>-0.0</td></tr></table>
472
+
473
+ <table><tr><td rowspan=1 colspan=1>a1a2</td><td rowspan=1 colspan=1>A(1)</td><td rowspan=1 colspan=1>A(2)</td><td rowspan=1 colspan=1>A(3)</td></tr><tr><td rowspan=1 colspan=1>A1)</td><td rowspan=1 colspan=1>-6.2</td><td rowspan=1 colspan=1>-4.9</td><td rowspan=1 colspan=1>-4.9</td></tr><tr><td rowspan=1 colspan=1>A(2)</td><td rowspan=1 colspan=1>-4.9</td><td rowspan=1 colspan=1>-3.6</td><td rowspan=1 colspan=1>-3.6</td></tr><tr><td rowspan=1 colspan=1>A3)</td><td rowspan=1 colspan=1>-4.9</td><td rowspan=1 colspan=1>-3.6</td><td rowspan=1 colspan=1>-3.6</td></tr></table>
474
+
475
+ <table><tr><td rowspan=1 colspan=1>a1a2</td><td rowspan=1 colspan=1>A(1)</td><td rowspan=1 colspan=1>A(2)</td><td rowspan=1 colspan=1>A(3)</td></tr><tr><td rowspan=1 colspan=1>A1</td><td rowspan=1 colspan=1>-6.2</td><td rowspan=1 colspan=1>-4.9</td><td rowspan=1 colspan=1>-4.9</td></tr><tr><td rowspan=1 colspan=1>A(2)</td><td rowspan=1 colspan=1>-4.9</td><td rowspan=1 colspan=1>-3.5</td><td rowspan=1 colspan=1>-3.5</td></tr><tr><td rowspan=1 colspan=1>A3</td><td rowspan=1 colspan=1>-4.9</td><td rowspan=1 colspan=1>-3.5</td><td rowspan=1 colspan=1>-3.5</td></tr></table>
476
+
477
+ (d) $Q _ { t o t }$ of QMIX (e) $Q _ { t o t }$ of VDN (f) $Q _ { t o t }$ of Qatten
478
+
479
+ Table 4: (a) Payoff matrix of the one-step game. Boldface means the optimal joint action selection from payoff matrix. (b-f) The joint action-value functions $Q _ { t o t }$ of QPLEX, QTRAN, QMIX, VDN, and Qatten. Boldface means greedy joint action selection from joint action-value functions.
480
+
481
+ ![](images/bf13963e7dda69eb046eed0242d21c64b56228ccf949a05a79d48a07f04e8763.jpg)
482
+ Figure 6: The learning curves of QPLEX and other baselines on the origin matrix game.
483
+
484
+ # D EXPERIMENTS ON STARCRAFT II WITH ONLINE DATA COLLECTION
485
+
486
+ ![](images/fae6ad351ed1641f35bb2f1daa167a2a452d15f154ae1dbe7d5510f76284c185.jpg)
487
+ Figure 7: The learning curves of StarCraft II with online data collection on remaining scenarios.
488
+
489
+ ![](images/15bd665b0b917de6ff1f2c9318fa60beb59e19d2938da5eaa9499e9197293327.jpg)
490
+ Figure 8: (a) The median test win $\%$ , averaged across all 14 scenarios proposed by SMAC (Samvelyan et al., 2019). (b) The number of scenarios in which the algorithms’ median test win $\%$ is the highest by at least 1/32 (smoothed).
491
+
492
+ # E ABLATION STUDIES WITH ONLINE DATA COLLECTION
493
+
494
+ In this section, we conduct two ablation studies to investigate why QPLEX works, which includes: (i) QPLEX without the multi-head attention structure of dueling architecture, and (ii) QMIX with the same number of parameters as QPLEX. For these studies, Figure 9 plots the averaged median test win rate $\%$ over the tasks of the StarCraft II benchmark mentioned in Section 4.3.1. Detailed learning curves on each task are shown in Figure 10 and 11, respectively.
495
+
496
+ Multi-head attention structure of importance weights $\lambda _ { i }$ (see Eq. (9) and (10)) allows QPLEX to adapt its scalable implementation to different scenarios, e.g., didactic games or StarCraft II benchmark tasks. Section 4.1 demonstrates the importance of this attention structure, which can provide QPLEX more expressiveness of value factorization to perform better on the didactic matrix games. In this ablation study, we aim to test whether this multi-head attention is necessary for this StarCraft II domain. Specifically, we use a one-layer forward model instead of this multi-head attention structure in QPLEX, which is called QPLEX-wo-duel-atten. Figure 9a shows that QPLEX-wo-duel-atten achieves similar performance as QPLEX, which indicates that the the superiority of QPLEX over other MARL methods is largely due to the duplex dueling architecture (see Figure 1), instead of the multi-head attention trick.
497
+
498
+ ![](images/5b47d8b35333bdc834af18be37b142c8297794626398069dbb9dfe892376632b.jpg)
499
+ Figure 9: Ablation studies on QPLEX with the median test win $\%$ , averaged benchmark scenarios.
500
+
501
+ QPLEX uses more parameters in the value factorization architecture of neural networks due to its multi-head attention structure. We introduce Large QMIX with a similar number of parameters with QPLEX, to investigate whether the superiority of QPLEX over QMIX is due to the increase in the number of parameters. Figure 9b shows that QMIX with a larger network cannot fundamentally improve its performance, and QPLEX still significantly outperforms Large QMIX by a large margin. This result also confirms that the main effect of QPLEX comes from its novel value factorization structure (duplex dueling architecture) rather than the number of parameters.
502
+
503
+ ![](images/a5f02a3eed6b74014173f292f031e190f88a0785de749d765bcd14abb25cce21.jpg)
504
+ Figure 10: The learning curves of median test win rate $\%$ for QPLEX, QPLEX’s ablation QPLEXwo-duel-atten, QMIX, and Qatten with online data collection.
505
+
506
+ ![](images/d101d139f2c183b70c1d9bfc3d884c380ffd1ecf5ca6e056562bb0b184bc2091.jpg)
507
+ Figure 11: Learning curves of median test win rate $\%$ for QPLEX, QMIX, and Large QMIX with online data collection.
508
+
509
+ ![](images/3214513353058b806da528a3b8889bc1eb4923e52333f0838d3981fbacc3e484.jpg)
510
+ Figure 12: Visualized strategies of QPLEX and QMIX on $5 \mathrm { s } 1 0 \mathrm { z }$ map of StarCraft II benchmark. Red marks represent learning agents, and blue marks represent build-in AI agents.
511
+
512
+ As shown in Figure 12, both MARL agents and opponents contain 5 ranged soldiers (denoted by a circle) and 10 melee soldiers (denoted by line) on $5 s 1 0 z$ map. The ranged soldiers have stronger combat capabilities and need to be protected strategically. QPLEX uses 10 melee soldiers to build lines of defense against the enemy, while QMIX fails to coordinate melee soldiers such that ranged soldiers have to fight against the enemy directly.
513
+
514
+ ![](images/90135131d7b1e6d1b63f23321b19c9f1b9266a733a98c9a916bd64098bece9e0.jpg)
515
+ G EXPERIMENTS ON STARCRAFT II WITH OFFLINE DATA COLLECTION
516
+ Figure 13: Deferred learning curves of StarCraft II with offline data collection on tested scenarios.
517
+
518
+ # H ABLATION STUDIES ABOUT QPLEX WITH DIFFERENT NETWORK CAPACITIES IN STARCRAFT II
519
+
520
+ We trade off the expressiveness and learning efficiency of the multi-head attention network module for estimating importance weights $\lambda _ { i }$ (see Eq. (9) and (10) in Section 3.2). It is generally sufficient for QPLEX to use a simple multi-head attention with a small number of heads and layers (as evaluated in StarCraft II tasks) to achieve the state-of-the-art performance shown in Figure 4. However, in some didactic corner-cases with an adequate and uniform dataset, a harder matrix game illustrated in Figure 2a requires very high precision in estimating the action-value function in order to differentiate the optimal solution from the sub-optimal solutions. For this matrix game, a multi-head attention structure with more layers and heads has a more representational capacity and results in better performance, as demonstrated by the ablation study illustrated in Figure 2c in Section 4.1.
521
+
522
+ In contrast, StarCraft II micromanagement benchmark tasks contain much more complicated agents with large state-action spaces and range from 2 to 27 agents. To support the superior training scalability of QPLEX, we used a multi-head attention with just one layer and four heads. To evaluate the effect of the choice of layer and the number of heads, we conducted an ablation study in Starcraft II benchmark tasks. For simplicity, we follow the notation of Figure 2, i.e., use QPLEX-aLbH to denote QPLEX with $a$ layers and $b$ heads of importance weights $\lambda _ { i }$ . As shown in Figure 14, using more heads, QPLEX-1L10H, does not change the performance, but using more layers, QPLEX-2L4H, may slightly degenerate the learning efficiency of QPLEX in this complex domain. Detailed learning curves on these tasks are shown in Figure 15. This is because using more layers significantly increase the number of parameters and requires more samples for learning, which may offset the benefits of higher expressiveness it brings. This ablation study shows that a simple attention neural network with just one layer and four heads has enough expressiveness to handle these complex StarCraft II tasks.
523
+
524
+ ![](images/2af6552e11ce04bf4247baaedef09c4edc2fac2878d7e8689323a4835dc55d1a.jpg)
525
+ Figure 14: Ablation study about QPLEX with different network capacities in StarCraft II.
526
+
527
+ ![](images/1f9f52a15636b9bd0b8261cd98b538891e84d4f8e5b412e3299f3daf9a5d76ec.jpg)
528
+ Figure 15: Deferred figures of median test win rate $\%$ for QPLEX-1L4H, QPLEX-1L10H, and QPLEX-2L4H with online data collection.
529
+
530
+ # I ABLATION STUDIES ABOUT QTRAN
531
+
532
+ Both QPLEX and QTRAN aim to provide a richer factorized acton-value function class. The main difference between QPLEX and QTRAN is that QPLEX uses a duplex dueling architecture to realize the IGM principle (a hard constraint). In contrast, QTRAN uses two penalties as soft constraints to approximate the IGM principle. Moreover, from the perspective of implementation, QTRAN does not have a Transformation module (see Section 3.2) on the individual Q-functions and cannot utilize a multi-head attention module on the joint Q-function directly (because QTRAN does not take the duplex dueling architecture as QPLEX).
533
+
534
+ To test whether QPLEX outperforms QTRAN because of these factors, we conducted an ablation study by removing the Transformation module and replacing the multi-head attention module with a simple one-layer forward model in the QPLEX’s dueling architecture, which is denoted as QPLEX-wo-trans-atten. In addition, we also introduce a variant of QTRAN, which also uses the Transformation module for individual Qfunctions, denoted as QTRAN- $w$ -trans. Our experiments are evaluated on the tasks of the StarCraft II benchmark mentioned in Section 4.3.1.
535
+
536
+ Figure 16 illustrates the averaged median test win rate $\%$ over all tested scenarios. Detailed learning curves on these tasks are shown in Figure 17. These empirical results show that QPLEX-wo-trans-atten significantly outperforms QTRAN and QTRAN-w-trans, which implies that the outperformance of QPLEX over QTRAN is largely due to its duplex dueling architecture. It can also be seen that QTRAN-w-trans cannot significantly improve the performance of QTRAN, which implies that QTRAN cannot benefit a lot from an extra Transformation module empirically.
537
+
538
+ ![](images/22d3ad5b95e2120594a2400c18620a3c1e197ce902641b2cd407736862f4bf6e.jpg)
539
+ Figure 16: Ablation study about QTRAN with online data collection.
540
+
541
+ As discussed in Section E, Figure 9a can be regarded as an ablation study of QPLEX-wo-atten, which just removes the multi-head attention module from dueling architecture. That ablation study shows that a simple neural network implementation of QPLEX’s dueling structure has enough expressiveness to handle these StarCraft II tasks in the online data collection setting, even if this structure can provide QPLEX with excellent performance in didactic matrix games using an adequate and uniform dataset (see Section 4.1). Thus, compared with QPLEX-wo-atten in Figure 9a, Figure 16 shows that Transformation (abbreviated as -trans) is a useful module for QPLEX empirically, which indicates an another QPLEX’s advantage, i.e., QPLEX can equip a Transformation module to improve QPLEX’s empirical performance, whereas QTRAN may not by directly using it. Moreover, we would like to emphasize that, unlike the multi-head attention module, the Transformation module is actually a necessary module for QPLEX to realize IGM, as shown in Figure 1 and by the proof of Proposition 2. Therefore, it is actually fair to evaluate QPLEX with the Transformation module.
542
+
543
+ ![](images/65ff9534079620a7d899771b076361a1d65c32d81992e03c0d5dde6d10455234.jpg)
544
+ Figure 17: Figures of median test win rate $\%$ for QPLEX, QPLEX’s ablation QPLEX-wo-trans-atten, QTRAN, and QTRAN-w-trans with online data collection.
545
+
546
+ # J A COMPARISON TO WQMIX IN PREDATOR-PREY
547
+
548
+ WQMIX (Rashid et al., 2020) is a recent advanced multi-agent Q-learning algorithm. We compare QPLEX with WQMIX in a toy game, predator-prey, which is introduced by WQMIX and aims to test coordination between agents in a partially-observable setting.
549
+
550
+ ![](images/7d748436f84e6a0b5ef42fb6064b7c938d1a6a3f5e9ed1f6db0a924448bb3832.jpg)
551
+ Figure 18: Learning curves of median test return for QPLEX, QTRAN, QMIX, and WQMIX (OW-QMIX and CW-QMIX) in the toy predator-prey task.
552
+
553
+ Predator-prey is a multi-agent coordinated game used by WQMIX (Rashid et al., 2020) with miscoordination penalties. In order to collect the experience with the positive reward of agents’ coordinated actions, extensive exploration can benefit multi-agent Q-learning algorithms to solve this kind of tasks. WQMIX shapes the data distribution with an importance weight to boost efficient learning, which can also be regarded as a type of biased exploration. To support QPLEX with effective exploration, we use an $\epsilon$ -greedy strategy which is also discussed in the paper of WQMIX. This strategy’s $\epsilon$ is linearly annealed from 1 to 0.05 over 1 million timesteps, increased from the 50k used in SMAC (Samvelyan et al., 2019). As shown in Figure 18, besides WQMIX and QTRAN, QPLEX can solve this task by using the introduced $\epsilon$ -greedy exploration strategy. Moreover, QMIX can also solve this task by using the same $\epsilon$ -greedy strategy as QPLEX, but QPLEX enjoys higher sample efficiency.
parse/train/Rcmk0xxIQV/Rcmk0xxIQV_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Rcmk0xxIQV/Rcmk0xxIQV_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/Rcmk0xxIQV/Rcmk0xxIQV_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJgndT4KwB/SJgndT4KwB.md ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJgndT4KwB/SJgndT4KwB_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJgndT4KwB/SJgndT4KwB_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/SJgndT4KwB/SJgndT4KwB_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/kyaIeYj4zZ/kyaIeYj4zZ.md ADDED
@@ -0,0 +1,302 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GRAPPA: GRAMMAR-AUGMENTED PRE-TRAINING FOR TABLE SEMANTIC PARSING
2
+
3
+ Tao $\mathbf { V } \mathbf { u } ^ { \dagger * }$ , Chien-Sheng ${ \bf W } { \bf u } ^ { \ S }$ , Xi Victoria $\mathbf { L i n ^ { \ S * } }$ , Bailin Wang‡∗, Yi Chern Tan†, Xinyi Yang§, Dragomir Radev†§, Richard Socher§, Caiming Xiong§ § Salesforce Research, † Yale University, ‡University of Edinburgh
4
+ {tao.yu, yichern.tan,dragomir.radev}@yale.edu, bailin.wang@ed.ac.uk
5
+ {wu.jason,x.yang,rsocher,cxiong}@salesforce.com, victorialin@fb.com
6
+
7
+ # ABSTRACT
8
+
9
+ We present GRAPPA, an effective pre-training approach for table semantic parsing that learns a compositional inductive bias in the joint representations of textual and tabular data. We construct synthetic question-SQL pairs over high-quality tables via a synchronous context-free grammar (SCFG). We pre-train GRAPPA on the synthetic data to inject important structural properties commonly found in table semantic parsing into the pre-training language model. To maintain the model’s ability to represent real-world data, we also include masked language modeling (MLM) on several existing table-and-language datasets to regularize our pre-training process. Our proposed pre-training strategy is much data-efficient. When incorporated with strong base semantic parsers, GRAPPA achieves new state-of-the-art results on four popular fully supervised and weakly supervised table semantic parsing tasks. The pre-trained embeddings can be downloaded at https://huggingface.co/Salesforce/grappa_large_jnt.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ Tabular data serve as important information source for human decision makers in many domains, such as finance, health care, retail and so on. While tabular data can be efficiently accessed via the structured query language (SQL), a natural language interface allows such data to be more accessible for a wider range of non-technical users. As a result, table semantic parsing that maps natural language queries over tabular data to formal programs has drawn significant attention in recent years.
14
+
15
+ Recent pre-trained language models (LMs) such as BERT (Devlin et al., 2019) and RoBERTa (Liu et al., 2019) achieve tremendous success on a spectrum of natural language processing tasks, including semantic parsing (Zettlemoyer & Collins, 2005; Zhong et al., 2017; Yu et al., 2018b). These advances have shifted the focus from building domain-specific semantic parsers (Zettlemoyer & Collins, 2005; Artzi & Zettlemoyer, 2013; Berant & Liang, 2014; Li & Jagadish, 2014) to cross-domain semantic parsing (Zhong et al., 2017; Yu et al., 2018b; Herzig & Berant, 2018; Dong & Lapata, 2018; Wang et al., 2020; Lin et al., 2020).
16
+
17
+ Despite such significant gains, the overall performance on complex benchmarks such SPIDER (Yu et al., 2018b) and WIKITABLEQUESTIONS benchmarks are still limited, even when integrating representations of current pre-trained language models. As such tasks requires generalization to new databases/tables and more complex programs (e.g., SQL), we hypothesize that current pretrained language models are not sufficient for such tasks. First, language models pre-trained using unstructured text data such as Wikipedia and Book Corpus are exposed to a significant domain shift when directly applied to table semantic parsing, where jointly modeling the relation between utterances and structural tables is crucial. Second, conventional pre-training objectives does not consider the underlying compositionality of data (e.g., questions and SQLs) from table semantic parsing. To close this gap, we seek to learn contextual representations jointly from structured tabular data and unstructured natural language sentences, with objectives oriented towards table semantic parsing.
18
+
19
+ ![](images/80ae699260e357fc1f8b49de6e2c24e9a97d47e2618284160ff8a1acf8ac2e47.jpg)
20
+ Figure 1: An overview of GRAPPA pre-training approach. We first induce a SCFG given some examples in SPIDER. We then sample from this grammar given a large amount of tables to generate new synthetic examples. Finally, GRAPPA is pre-trained on the synthetic data using SQL semantic loss and a small amount of table related utterances using MLM loss.
21
+
22
+ In this paper, we propose a novel grammar-augmented pre-training framework for table semantic parsing (GRAPPA). Inspired by previous work on data synthesis for semantic parsing (Berant & Liang, 2014; Wang et al., 2015b; Jia & Liang, 2016; Herzig & Berant, 2018; Andreas, 2020), we induce a synchronous context-free grammar (SCFG) specific to mapping natural language to SQL queries from existing text-to-SQL datasets, which covers most commonly used question-SQL patterns. As shown in Figure 1, from a text-to-SQL example we can create a question-SQL template by abstracting over mentions of schema components (tables and fields), values, and SQL operations. By executing this template on randomly selected tables we can create a large number of synthetic question-SQL pairs. We train GRAPPA on these synthetic question-SQL pairs and their corresponding tables using a novel text-schema linking objective that predicts the syntactic role of a table column in the SQL for each pair. This way we encourage the model to identify table schema components that can be grounded to logical form constituents, which is critical for most table semantic parsing tasks.
23
+
24
+ To prevent overfitting to the synthetic data, we include the masked-language modelling (MLM) loss on several large-scale, high-quality table-and-language datasets and carefully balance between preserving the original natural language representations and injecting the compositional inductive bias through our synthetic data. We pre-train GRAPPA using $4 7 5 \mathrm { k }$ synthetic examples and $3 9 1 . 5 \mathrm { k }$ examples from existing table-and-language datasets. Our approach dramatically reduces the training time and GPU cost. We evaluate on four popular semantic parsing benchmarks in both fully supervised and weakly supervised settings. GRAPPA consistently achieves new state-of-the-art results on all of them, significantly outperforming all previously reported results.
25
+
26
+ # 2 METHODOLOGY
27
+
28
+ # 2.1 MOTIVATION
29
+
30
+ Semantic parsing data is compositional because utterances are usually related to some formal representations such as logic forms and SQL queries. Numerous prior works (Berant & Liang, 2014; Wang et al., 2015a; Jia & Liang, 2016; Iyer et al., 2017; Andreas, 2020) have demonstrated the benefits of augmenting data using context-free grammar. The augmented examples can be used to teach the model to generalize beyond the given training examples.
31
+
32
+ However, data augmentation becomes more complex and less beneficial if we want to apply it to generate data for a random domain. More and more work (Zhang et al., 2019b; Herzig et al., 2020b; Campagna et al., 2020; Zhong et al., 2020) shows utilizing augmented data doesn’t always result in a significant performance gain in cross-domain semantic parsing end tasks. The most likely reason for this is that models tend to overfit to the canonical input distribution especially the generated utterances are very different compared with the original ones.
33
+
34
+ Moreover, instead of directly training semantic parsers on the augmented data, our paper is the first to use the synthetic examples in pre-training in order to inject a compositional inductive bias to LMs and show it actually works if the overfitting problem is carefully addressed. To address the overfitting problem, in Section 2.3, we also include a small set of table related utterances in our pre-training data. We add an MLM loss on them as a regularization factor, which requires the model to balance between real and synthetic examples during the pre-training. We note that this consistently improves the performance on all downstream semantic parsing tasks (see Section 4). Finally, our pre-training method is much more data-efficient and save much more computational power than other prior work (Section 5).
35
+
36
+ # 2.2 DATA SYNTHESIS WITH SYNCHRONOUS CONTEXT-FREE GRAMMAR
37
+
38
+ We follow Jia & Liang (2016) to design our SCFG and apply it on a large amount of tables to populate new examples. For example, as shown in Figure 1, by replacing substitutable column mentions (“locations”), table mentions (“performance”), values (“two”), and SQL logic phrases (“at least”) with the other possible candidates in the same group, our grammar generates new synthetic text-to-SQL examples with the same underlying SQL logic template. We then pre-train BERT on the augmented examples to force it to discover substitutable fragments and learn the underlying logic template so that it is able to generalize to other similar questions. Meanwhile, BERT also benefits from pre-training on a large number of different columns, table names, and values in the generated data, which could potentially improve schema linking in semantic parsing tasks.
39
+
40
+ <table><tr><td>Non-terminals</td><td>Production rules</td></tr><tr><td>TABLE→ti</td><td>1.ROOT →For each COLUMNO,return how many times TABLEO</td></tr><tr><td>COLUMN→Ci</td><td>with COLUMN1 OPO VALUEO &quot;,</td></tr><tr><td>VALUE→Ui</td><td>SELECT COLUMNO,COUNT )WHERE COLUMN1 OP0</td></tr><tr><td>AGG→(MAX,MIN,COUNT,AVG,SUM)</td><td>VALUEO GROUP BY COLUMNO</td></tr><tr><td>OP→(=,≤,≠,.,LIKE,BETWEEN)</td><td></td></tr><tr><td>SC→(ASC,DESC)</td><td>2.ROOT →{&quot;What are the COLUMNO and COLUMN1 of the TABLEO</td></tr><tr><td>MAX→(&quot;maximum”,&quot;the largest&quot;..)</td><td>whose COLUMN2 is OPO AGGO COLUMN2 ?&quot;,</td></tr><tr><td>≤→(&quot;no more than”,“no above&quot;.) .</td><td>SELECT COLUMNO,( COLUMN1 WHERE COLUMN2 OPO( SELECT AGG0( COLUMN2))</td></tr></table>
41
+
42
+ Table 1: Examples of non-terminals and production rules in our SCFG. Each production rule ROOT $ \langle \alpha , \beta \rangle$ is built from some $( x , y ) \in \mathcal { D }$ by replacing all terminal phrases with non-terminals. $t _ { i } , c _ { i }$ , and $v _ { i }$ stand for any table name, column name, entry value respectively.
43
+
44
+ Grammar induction To induce a cross-domain SCFG, we study examples in SPIDER since it is a publicly available dataset that includes the largest number of examples with complex compositionalities in different domains. To further show the generality of our approach, we do not develop different SCFG for each downstream task. Given a set of $( x , y )$ pairs in SPIDER, where $x$ and $y$ are the utterance and SQL query respectively. We first define a set of non-terminal symbols for table names, column names, cell values, operations, etc. For example, in Table 1, we group aggregation operations such as MAX as a non-terminal AGG. We can also replace the entities/phrases with their non-terminal types in SQL query to generate a SQL production rule $\beta$ . Then, we group $( x , y )$ pairs by similar SQL production rule $\beta$ . We automatically group and count Spider training examples by program templates, and select about 90 most frequent program templates $\beta$ . For each program template in the grammar, we randomly select roughly 4 corresponding natural language questions, manually replace entities/phrases with their corresponding non-terminal types to create natural language templates $\alpha$ , and finally align them to generate each production rule ROOT $ \langle \alpha , \beta \rangle$ . The manual alignment approximately takes a few hours. About 500 SPIDER examples are studied to induce the SCFG.
45
+
46
+ Data augmentation With $\langle \alpha , \beta \rangle$ pairs, we can simultaneously generate pseudo natural questions and corresponding SQL queries given a new table or database. We first sample a production rule, and replace its non-terminals with one of corresponding terminals. For example, we can map the non-terminal AGG to MAX and “maximum” for the SQL query and the natural language sentence, respectively. Also, table content is used in synthesizing our pre-training data. For example, if the sampled production rule contains a value (e.g., VALUE0), we sample a value for the selected column from the table content and add it to the SQL and question templates. This way during pre-training, GRAPPA can access the table content and learn the linking between values and columns.
47
+
48
+ We use WIKITABLES (Bhagavatula et al., 2015), which contains 1.6 million high-quality relational Wikipedia tables. We remove tables with exactly the same column names and get about $3 4 0 \mathrm { k }$ tables and generate $4 1 3 \mathrm { k }$ question-SQL pairs given these tables. Also, we generate another 62k questionSQL pairs using tables and databases in the training sets of SPIDER and WIKISQL. In total, our final pre-training dataset includes 475k question-SQL examples.
49
+
50
+ We note that SCFG is usually crude (Andreas, 2020) especially when it is applied to augment data for different domains. In this work we don’t focus on how to develop a better SCFG that generates more natural utterances. We see this as a very interesting future work to explore. Despite the fact that the SCFG is crude, our downstream task experiments show that it could be quite effective if some pre-training strategies are applied.
51
+
52
+ # 2.3 TABLE RELATED UTTERANCES
53
+
54
+ As discussed in Section 2.1, GRAPPA is also pre-trained on human annotated questions over tables with a MLM objective. We collected seven high quality datasets for textual-tabular data understanding (Table 8 in the Appendix), all of them contain Wikipedia tables or databases and the corresponding natural language utterances written by humans. We only use tables and contexts as a pre-training resource and discard all the other human labels such as answers and SQL queries.
55
+
56
+ # 2.4 PRE-TRAINING GRAPPA
57
+
58
+ Unlike all the previous work where augmented data is used in the end task training, we apply the framework to language model pre-training. Training semantic parsers is usually slow, and augmenting a large amount of syntactic pairs directly to the end task training data can be prohibitively slow or expensive. In our work, we formulate text-to-SQL as a multi-class classification task for each column, which can be naturally combined with the MLM objective to pre-train BERT for semantic parsing. Moreover, in this way, the learned knowledge can be easily and efficiently transferred to downstream semantic parsing tasks in the exact same way as BERT (shown in Section 4).
59
+
60
+ GRAPPA is initialized by $\mathrm { R o B E R T a _ { L A R G E } }$ (Liu et al., 2019) and further pre-trained on the synthetic data with SQL semantic loss and table-related data with MLM loss. As shown in Figure 1, we follow Hwang et al. (2019) to concatenate a user utterance and the column headers into a single flat sequence separated by the $< / \varsigma >$ token. The user utterance can be either one of the original human utterances collected from the aggregated datasets or the canonical sentences sampled from the SCFG. We add the table name at the beginning of each column if there are some complex schema inputs involving multiple tables. We employ two objective functions for language model pre-training: 1) masked-language modelling (MLM), and 2) SQL semantic prediction (SSP).
61
+
62
+ MLM objective Intuitively, we would like to have a self-attention mechanism between natural language and table headers. We conduct masking for both natural language sentence and table headers. A small part of the input sequence is first replaced with the special token <mask>. The MLM loss is then computed by the cross-entropy function on predicting the masked tokens. We follow the default hyperparameters from Devlin et al. (2019) with a $15 \%$ masking probability.
63
+
64
+ SSP objective With our synthetic natural language sentence and SQL query pairs, we can add an auxiliary task to train our column representations. The proposed task is, given a natural language sentence and table headers, to predict whether a column appears in the SQL query and what operation is triggered. We then convert all SQL sequence labels into operation classification labels for each column. For example in the Figure 1, the operation classification label of the column “locations” is SELECT AND GROUP BY HAVING. In total, there are 254 potential classes for operations in our experiments.
65
+
66
+ For a column or table indexed by $i$ , we use the encoding of the special token $< / \varsigma >$ right before it as its representation, denoted as $\mathbf { x _ { i } }$ to predict its corresponding operations. On top of such representations, we apply a two-layer feed-forward network followed by a GELU activation layer (Hendrycks & Gimpel, 2016) and a normalization layer (Ba et al., 2016) to the output representations. Formally, we compute the final vector representation of each column $\mathbf { y _ { i } }$ by:
67
+
68
+ $$
69
+ \begin{array} { r } { \mathbf { h } = \mathrm { L a y e r N o r m } ( \mathrm { G E L U } ( W _ { 1 } \cdot \mathbf { x _ { i } } ) ) } \\ { \mathbf { y _ { i } } = \mathrm { L a y e r N o r m } ( \mathrm { G E L U } ( W _ { 2 } \cdot \mathbf { h } ) ) } \end{array}
70
+ $$
71
+
72
+ Finally, $\mathbf { y _ { i } }$ is employed to compute the cross-entropy loss through a classification layer. We sum losses from all columns in each training example for back-propagation. For samples from the aggregated datasets, we only compute the MLM loss to update our model. For samples from the synthetic data we generated, we compute only SSP loss to update our model. More specifically, we mix 391k natural language utterances and $4 7 5 \mathrm { k }$ synthetic examples together as the final pre-training data. The examples in these two groups are randomly sampled during the pre-training, and MLM loss is computed if the selected example is a natural language question, otherwise SSP for a synthetic example.
73
+
74
+ # 3 EXPERIMENTS
75
+
76
+ We conduct experiments on four cross-domain table semantic parsing tasks, where generalizing to unseen tables/databases at test time is required. We experiment with two different settings of table semantic parsing, fully supervised and weakly supervised setting. The data statistics and examples on each task are shown in Table 2 and Table 7 in the Appendix respectively.
77
+
78
+ <table><tr><td>Task&amp;Dataset</td><td>#Examples</td><td>Resource</td><td>Annotation</td><td>Cross-domain</td></tr><tr><td>SPIDER Yu et al. (2018b)</td><td>10,181</td><td>database</td><td>SQL</td><td></td></tr><tr><td>Fully-sup.WIKISQL Zhong et al. (2017)</td><td>80,654</td><td>single table</td><td>SQL</td><td>?</td></tr><tr><td>WIKITABLEQUESTIONs Pasupat &amp;Liang (2015)</td><td>2,2033</td><td>single table</td><td>answer</td><td>√</td></tr><tr><td>Weakly-sup.WIKISQL Zhong et al. (2017)</td><td>80.654</td><td>single table</td><td>answer</td><td></td></tr></table>
79
+
80
+ Table 2: Overview of four table-based semantic parsing and question answering datasets in fullysupervised (top) and weakly-supervised (bottom) setting used in this paper. More details in Section 3
81
+
82
+ # 3.1 SUPERVISED SEMANTIC PARSING
83
+
84
+ We first evaluate GRAPPA on two supervised semantic parsing tasks. In a supervised semantic parsing scenario, given a question and a table or database schema, a model is expected to generate the corresponding program.
85
+
86
+ SPIDER SPIDER Yu et al. (2018b) is a large text-to-SQL dataset. It consists of $1 0 \mathrm { k }$ complex question-query pairs where many of the SQL queries contain multiple SQL keywords. It also includes 200 databases where multiple tables are joined via foreign keys. For the baseline model, we use RAT-SQL $^ +$ BERT Wang et al. (2020) which is the state-of-the-art model according to the official leaderboard. We followed the official Spider evaluation to report set match accuracy.
87
+
88
+ Fully-sup. WIKISQL WIKISQL Zhong et al. (2017) is a collection of over $8 0 \mathrm { k }$ questions and SQL query pairs over $3 0 \mathrm { k }$ Wikipedia tables. We use Guo & Gao (2019), a competitive model on WIKISQL built on SQLova Hwang et al. (2019), as our base model. We adapt the same set of hyperparameters including batch size and maximum input length as in Guo & Gao (2019). For a fair comparison, we only consider single models without execution-guided decoding and report execution accuracy.
89
+
90
+ # 3.2 WEAKLY-SUPERVISED SEMANTIC PARSING
91
+
92
+ We also consider weakly-supervised semantic parsing tasks, which are very different from SQLguided learning in pre-training. In this setting, a question and its corresponding answer are given, but the underlying meaning representation (e.g., SQL queries) are unknown.
93
+
94
+ WIKITABLEQUESTIONS This dataset contains question-denotation pairs over single Wikipedia tables Pasupat & Liang (2015). The questions involve a variety of operations such as comparisons, superlatives, and aggregations, where some of them are hard to answered by SQL queries.
95
+
96
+ Table 4: Performance on fully-sup. WIKISQL. All results are on execution accuracy without execution-guided decoding.
97
+
98
+ <table><tr><td>Models</td><td>Dev.</td><td>Test</td></tr><tr><td>Global-GNN (Bogin et al.,2019)</td><td>52.7</td><td>47.4</td></tr><tr><td>EditSQL (Zhang et al.,2019b)</td><td>57.6</td><td>53.4</td></tr><tr><td>IRNet (Guo et al.,2019)</td><td>61.9</td><td>54.7</td></tr><tr><td>RYANSQL (Choi et al., 2020)</td><td>70.6</td><td>60.6</td></tr><tr><td>TranX(Yin et al.,2020a)</td><td>64.5</td><td>-</td></tr><tr><td>RAT-SQL (Wang et al.,2019)</td><td>62.7</td><td>57.2</td></tr><tr><td>w.BERT-large</td><td>69.7</td><td>65.6</td></tr><tr><td>w.RoBERTa-large</td><td>69.6</td><td>=</td></tr><tr><td>w.GRAPPA (MLM)</td><td>71.1(+1.4)</td><td></td></tr><tr><td>w.GRAPPA (SSP)</td><td>73.6(+3.9)</td><td>67.7(+2.1)</td></tr><tr><td>W.GRAPPA (MLM+SSP)</td><td>73.4(+3.7)</td><td>69.6(+4.0)</td></tr></table>
99
+
100
+ Table 3: Performance on SPIDER. We run each model three times by varying random seeds, and the average scores are shown.
101
+
102
+ <table><tr><td>Models</td><td>Dev.</td><td>Test</td></tr><tr><td>(Dong&amp;Lapata,2018)</td><td>79.0</td><td>78.5</td></tr><tr><td>(Shi et al.,2018)</td><td>84.0</td><td>83.7</td></tr><tr><td>(Hwang et al.,2019)</td><td>87.2</td><td>86.2</td></tr><tr><td>(He et al., 2019)</td><td>89.5</td><td>88.7</td></tr><tr><td>(Lyu et al.,2020)</td><td>89.1</td><td>89.2</td></tr><tr><td>(Guo&amp;Gao,2019)</td><td>90.3</td><td>89.2</td></tr><tr><td>w.RoBERTa-large</td><td>91.2</td><td>90.6</td></tr><tr><td>w.GRAPPA (MLM)</td><td>91.4</td><td>90.7</td></tr><tr><td>w.GRAPPA (SSP)</td><td>91.2</td><td>90.7</td></tr><tr><td>w.GRAPPA (MLM+SSP)</td><td>91.2</td><td>90.8</td></tr><tr><td>w.RoBERTa-large(10k)</td><td>79.6</td><td>79.2</td></tr><tr><td>w.GRAPPA (MLM+SSP)(10k)</td><td>82.3(+2.7)</td><td>82.2(+3.0)</td></tr></table>
103
+
104
+ We used the model proposed by Wang et al. (2019) which is the state-of-the-art parser on this task. This model is a two-stage approach that first predicts a partial “abstract program” and then refines that program while modeling structured alignments with differential dynamic programming. The original model uses GloVe Pennington et al. (2014) as word embeddings. We modified their implementation to encode question and column names in the same way as we do in our fine-tuning method that uses RoBERTa and GRAPPA.
105
+
106
+ Weakly-sup. WIKISQL In the weakly-supervised setting of WIKISQL, only the answers (i.e., execution results of SQL queries) are available. We also employed the model proposed by Wang et al. (2019) as our baseline for this task. We made the same changes and use the same experiment settings as described in the previous section for WIKITABLEQUESTIONS.
107
+
108
+ # 3.3 IMPLEMENTATION OF GRAPPA
109
+
110
+ For fine-tuning RoBERTa, we modify the code of RoBERTa implemented by Wolf et al. (2019) and follow the hyperparameters for fine-tuning RoBERTa on RACE tasks and use batch size 24, learning rate $1 e { - } 5$ , and the Adam optimizer Kingma & Ba (2014). We fine-tune GRAPPA for 300k steps on eight 16GB Nvidia V100 GPUs. The pre-training procedure can be done in less than 10 hours. For all downstream experiments using GRAPPA or RoBERTa, we always use a BERT specific optimizer to fine-tune them with a learning rate of 1e-5, while using a model-specific optimizer with the respective learning rate for the rest of the base models.
111
+
112
+ # 4 EXPERIMENTAL RESULTS
113
+
114
+ We conducted experiments to answer the following two questions: 1) Can GRAPPA provide better representations for table semantic parsing tasks? 2) What is the benefit of two pre-training objectives, namely MLM and SSP? Since GRAPPA is initialized by RoBERTa, we answer the first question by directly comparing the performance of base parser augmented with GRAPPA and RoBERTa on table semantic parsing tasks. For the second question, we report the performance of GRAPPA trained with MLM, SSP and also a variant with both of them $( \mathbf { M L M + S S P } )$ .
115
+
116
+ Overall results We report results on the four aforementioned tasks in Tables 3, 4, 5, and 6 respectively. Overall, base models augmented with GRAPPA significantly outperforms the ones with RoBERTa by $3 . 7 \%$ on SPIDER, $1 . 8 \%$ on WIKITABLEQUESTIONS, and $2 . 4 \%$ on weaklysup. WIKISQL, and achieve new state-of-the-art results across all four tasks. In most cases, the combined objective of $\mathbf { M L M + S S P }$ helps GRAPPA achieve better performance when compared with independently using MLM and SSP. Moreover, on the low-resource setting, GRAPPA outperforms RoBERTa by $3 . 0 \%$ in fully-sup. WIKISQL and $3 . 9 \%$ in WIKITABLEQUESTIONS. Detailed results for each task are discussed as follows.
117
+
118
+ SPIDER Results on SPIDER are shown in Table 3. When augmented with GRAPPA, the model achieves significantly better performance compared with the baselines using BERT and RoBERTa.
119
+
120
+ Table 5: Performance on WIKITABLEQUESTIONS. Results trained on $10 \%$ of the data are shown at the bottom.
121
+
122
+ <table><tr><td>Models</td><td>Dev.</td><td>Test</td></tr><tr><td>(Liang et al.,2018)</td><td>72.2</td><td>72.1</td></tr><tr><td>(Agarwal et al.,2019)</td><td>74.9</td><td>74.8</td></tr><tr><td>(Min et al., 2019)</td><td>84.4</td><td>83.9</td></tr><tr><td>(Herzig et al.,2020b)</td><td>85.1</td><td>83.6</td></tr><tr><td>(Wang et al.,2019)</td><td>79.4</td><td>79.3</td></tr><tr><td>w.RoBERTa-large</td><td>82.3 (+2.9)</td><td>82.3 (+3.0)</td></tr><tr><td>w.GRAPPA (MLM)</td><td>83.3 (+3.9)</td><td>83.5 (+4.2)</td></tr><tr><td>w.GRAPPA (SSP)</td><td>83.5(+4.1)</td><td>83.7 (+4.4)</td></tr><tr><td>w.GRAPPA (MLM+SSP)</td><td>85.9 (+6.5)</td><td>84.7 (+5.4)</td></tr></table>
123
+
124
+ Table 6: Performance on weakly-sup. WIKISQL. We use (Wang et al., 2019) as our base model.
125
+
126
+ <table><tr><td>Models</td><td>Dev.</td><td>Test</td></tr><tr><td>(Liang et al.,2018)</td><td>42.3</td><td>43.1</td></tr><tr><td>(Dasigi et al.,2019)</td><td>42.1</td><td>43.9</td></tr><tr><td>(Agarwal et al.,2019)</td><td>43.2</td><td>44.1</td></tr><tr><td>(Herzig et al.,2020b)</td><td>=</td><td>48.8</td></tr><tr><td>(Yin et al.,2020b)</td><td>52.2</td><td>51.8</td></tr><tr><td>(Wang et al.,2019)</td><td>43.7</td><td>44.5</td></tr><tr><td>w.RoBERTa-large</td><td>50.7(+7.0)</td><td>50.9(+6.4)</td></tr><tr><td>W. GRAPPA (MLM)</td><td>51.5(+7.8)</td><td>51.7(+7.2)</td></tr><tr><td>w.GRAPPA (SSP)</td><td>51.2(+7.5)</td><td>51.1(+6.6)</td></tr><tr><td>w.GRAPPA (MLM+SSP)</td><td>51.9(+8.2)</td><td>52.7(+8.2)</td></tr><tr><td>w.RoBERTa-large×10%</td><td>37.3</td><td>38.1</td></tr><tr><td>w.GRAPPA (MLM+SSP) ×10%</td><td>40.4(+3.1)</td><td>42.0(+3.9)</td></tr></table>
127
+
128
+ Our best model, GRAPPA with $\mathbf { M L M + S S P }$ achieves the new state-of-the-art performance, surpassing previous one (RAT-SQL $^ +$ BERT-large) by a margin of $4 \%$ . Notably, most previous top systems use pre-trained contextual representations (e.g., BERT, TaBERT), indicating the importance of such representations for the cross-domain parsing task.
129
+
130
+ Fully sup. WIKISQL Results on WIKISQL are shown in Table 4. All GRAPPA models achieve nearly the same performance as RoBERTa. We suspect it is the relatively large training size and easy SQL pattern of WIKISQL make the improvement hard, comparing to SPIDER. Hence, we set up a low-resource setting where we only use $1 0 \mathrm { k }$ examples from the training data. As shown in the bottom two lines of Table 4, GRAPPA improves the performance of the SQLova model by $3 . 0 \%$ compared to RoBERTa, indicating that GRAPPA can make the base parser more sample-efficient.
131
+
132
+ WIKITABLEQUESTIONS Results on WIKITABLEQUESTIONS are shown in Table 5. By using RoBERTa and GRAPPA to encode question and column inputs, the performance of Wang et al. (2019) can be boosted significantly $( > 6 \% )$ . Compared with RoBERTa, our best model with GRAPPA $( \mathbf { M L M + S S P } )$ can further improve the performance by $1 . 8 \%$ , leading to a new state-of-the-art performance on this task. Similar to the low-resource experiments for WIKISQL, we also show the performance of the model when trained with only $10 \%$ of the training data. As shown at the bottom two lines Table 5, GRAPPA $( \mathbf { M L M } + \mathbf { S S P } )$ obtains much better performance than RoBERTa, again showing its superiority of providing better representations.
133
+
134
+ Weakly sup. WIKISQL Results on weakly supervised WIKISQL are shown in Table 6. GRAPPA with $\mathbf { M L M + S S P }$ again achieves the best performance when compared with other baselines, obtain the new state-of-the-art results of $8 4 . 7 \%$ on this task. It is worth noting that our best model here is also better than many models trained in the fully-supervised setting in Table 4. This suggests that inductive biases injected in pre-trained representation of GRAPPA can significantly help combat the issue of spurious programs introduced by learning from denotations Pasupat & Liang (2015); Wang et al. (2019) when gold programs are not available.
135
+
136
+ # 5 ANALYSIS
137
+
138
+ Pre-training objectives GRAPPA trained with both MLM and SSP loss consistently outperforms the one trained with one of them $( \mathbf { M L M + S S P }$ vs. MLM only or SSP only). GRAPPA (MLM) usually improves the performance by around $1 \%$ such as $1 . 4 \%$ gain on SPIDER (dev), $0 . 8 \%$ on WIKITABLEQUESTIONS, and $1 . 2 \%$ on weakly-sup. WIKISQL. By pre-training on the synthetic text-to-SQL examples, GRAPPA (SSP), we can see a similar performance gain on these tasks too except $3 . 9 \%$ improvement on SPIDER dev, which is what we expected (grammar is overfitted to SPIDER). By pre-training with both MLM and SSP on the combined data, GRAPPA $( \mathbf { M L M + S S P } )$ consistently and significantly outperforms the one pre-trained with MLM or SSP separately (e.g., about $+ 2 \%$ on Spider, $+ 1 . 5 \%$ on WikiTableQuestions, and $+ 1 . 2 \%$ on weakly-sup WikiSQL.). This contributes to our key argument in the paper: in order to effectively inject compositional inductive bias to LM, pre-training on synthetic data should be regularized properly (using $_ { \mathrm { S S P + M L M } }$ together instead of SSP or MLM only) in order to balance between preserving the original BERT encoding ability and injecting compositional inductive bias, otherwise, the improvements are not robust and limited (using SSP or MLM only).
139
+
140
+ Generalization As mentioned in Section 2.2, we design our SCFG solely based on SPIDER, and then sample from it to generate synthetic examples. Despite the fact that GRAPPA pre-trained on such corpus is optimized to the SPIDER data distribution, which is very different from WIKISQL and WIKITABLEQUESTIONS, GRAPPA is still able to improve performance on the two datasets. In particular, for WIKITABLEQUESTIONS where the underlying distribution of programs (not necessarily in the form of SQL) are latent, GRAPPA can still help a parser generalize better, indicating GRAPPA can be beneficial for general table understanding even though it is pre-trained on SQL specific semantics. We believe that incorporating rules from a broader range of datasets (e.g. WIKITABLEQUESTIONS) would further improve the performance. However, in this paper, we study rules from only the SPIDER dataset and test the effectiveness on other unseen datasets with different different underlying rules on purpose in order to show the generality of our method.
141
+
142
+ Even though GRAPPA is pre-trained on synthetic text-to-SQL data, the proposed pre-training method can also be applied to many other semantic parsing tasks with different formal programs (e.g., logic forms); and we also demonstrated the effectness of GRAPPA on non text-to-SQL tasks (weaklysupervised WIKISQL and WIKITABLEQUESTIONS where no programs are used, training is supervised by only answers/cell values) the underlying distribution of programs (not necessarily in the form of SQL) are latent. Furthermore, to design the SCFG and synthesize data with the corresponding programs labeled, we can use any formal programs such as the logic form or SParQL, and then employ the data to pre-train GraPPa. In this paper we choose SQL as the formal program to represent the formal representation of the questions simply because more semantic parsing datasets are labeled in SQL.
143
+
144
+ Pre-training time and data Our experiments on the SPIDER and WIKITABLEQUESTIONS tasks show that longer pre-training doesn’t improve and can even hurt the performance of the pre-trained model. This also indicates that synthetic data should be carefully used in order to balance between preserving the original BERT encoding ability and injecting compositional inductive bias. The best result on SPIDER is achieved by using GRAPPA pre-trained for only 5 epochs on our relatively small pre-training dataset. Compared to other recent pre-training methods for semantic parsing such as TaBERT (Yin et al., 2020a) and TAPAS (Herzig et al., 2020a), GRAPPA achieves the state-of-the-art performance (incorporated with strong base systems) on the four representative table semantic parsing tasks in less 10 hours on only 8 16GB Nvidia V100 GPUs (6 days on more than 100 V100 GPUs and 3 days on 32 TPUs for TaBERT and TAPAS respectively) Moreover, we encourage future work on studying how the size and quality of synthetic data would affect the end task performance. Also, GRAPPA $( \mathbf { M L M + S S P } )$ ) consistently outperforms other settings, which indicates that using MLM on the human annotated data is important.
145
+
146
+ Pre-training vs. training data augmentation Many recent work (Zhang et al., 2019b; Herzig et al., 2020b; Campagna et al., 2020; Zhong et al., 2020) in semantic parsing and dialog state tracking show that training models on a combination of the extra synthetic data and original training data does not improve or even hurt the performance. For example, (Zhong et al., 2020) synthesize data on training databases in several semantic parsing tasks including SPIDER, and find that training with this data augmentation leads to overfitting on the synthetic data and decreases the performance. In contrast, our pre-training approach could effectively utilize a large amount of synthesized data and improve downstream task performance. Also, the base parser with a GRAPPA encoder could usually converge to a higher performance in shorter time (see Section A.1).
147
+
148
+ # 6 RELATED WORK
149
+
150
+ Textual-tabular data understanding Real-world data exist in both structured and unstructured forms. Recently the field has witnessed a surge of interest in joint textual-tabular data understanding problems, such as table semantic parsing (Zhong et al., 2017; Yu et al., 2018b), question answering (Pasupat & Liang, 2015; Chen et al., 2020), retrieval (Zhang et al., 2019a), fact-checking (Chen et al., 2019) and summarization (Parikh et al., 2020; Radev et al., 2020). While most work focus on single tables, often obtained from the Web, some have extended modeling to more complex structures such as relational databases (Finegan-Dollak et al., 2018; Yu et al., 2018b; Wang et al., 2020). All of these tasks can benefit from better representation of the input text and different components of the table, and most importantly, an effective contextualization across the two modalities. Our work aims at obtaining high-quality cross-modal representation via pre-training to potentially benefit all downstream tasks.
151
+
152
+ Pre-training for NLP tasks GRAPPA is inspired by recent advances in pre-training for text such as (Devlin et al., 2019; Liu et al., 2019; Lewis et al., 2020b;a; Guu et al., 2020). Seminal work in this area shows that textual representation trained using conditional language modeling objectives significantly improves performance on various downstream NLP tasks. This triggered an exciting line of research work under the themes of (1) cross-modal pre-training that involves text (Lu et al., 2019; Peters et al., 2019; Yin et al., 2020a; Herzig et al., 2020a) and (2) pre-training architectures and objectives catering subsets of NLP tasks (Lewis et al., 2020b;a; Guu et al., 2020). GRAPPA extends these two directions further. The closest work to ours are TaBERT (Yin et al., 2020a) and TAPAS (Herzig et al., 2020a). Both are trained over millions of web tables and relevant but noisy textual context. In comparison, GRAPPA is pre-trained with a novel training objective, over synthetic data plus a much smaller but cleaner collection of text-table datasets.
153
+
154
+ Data augmentation for semantic parsing Our work was inspired by existing work on data augmentation for semantic parsing (Berant & Liang, 2014; Wang et al., 2015a; Jia & Liang, 2016; Iyer et al., 2017; Yu et al., 2018a). Berant & Liang (2014) employed a rule-based approach to generate canonical natural language utterances given a logical form. A paraphrasing model was then used to choose the canonical utterance that best paraphrases the input and to output the corresponding logical form. In contrast, Jia & Liang (2016) used prior knowledge in structural regularities to induce an SCFG and then directly use the grammar to generate more training data, which resulted in a significant improvement on the tasks. Unlike these works which augment a relatively small number of data and use them directly in end task training, we synthesize a large number of texts with SQL logic grounding to each table cheaply and use them for pre-training.
155
+
156
+ # 7 CONCLUSION AND FUTURE WORK
157
+
158
+ In this paper, we proposed a novel and effective pre-training approach for table semantic parsing. We developed a context-free grammar to automatically generate a large amount of question-SQL pairs. Then, we introduced GRAPPA, which is an LM that is pre-trained on the synthetic examples with SQL semantic loss. We discovered that, in order to better leverage augmented data, it is important to add MLM loss on a small amount of table related utterances. Results on four semantic parsing tasks demonstrated that GRAPPA significantly outperforms RoBERTa.
159
+
160
+ While the pre-training method is surprisingly effective in its current form, we view these results primarily as an invitation for more future work in this direction. For example, this work relies on a hand-crafted grammar which often generates unnatural questions; Further improvements are likely to be made by applying more sophisticated data augmentation techniques. Also, it would be interesting to study the relative impact of the two objectives (MLM and SSP) by varying the respective number of pre-training examples. Furthermore, pre-training might benefit from synthesizing data from a more compositional grammar with a larger logical form coverage, and also from supervising by a more compositional semantic signals.
161
+
162
+ # REFERENCES
163
+
164
+ Rishabh Agarwal, Chen Liang, Dale Schuurmans, and Mohammad Norouzi. Learning to generalize from sparse and underspecified rewards. In ICML, 2019.
165
+
166
+ Jacob Andreas. Good-enough compositional data augmentation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 7556–7566, Online, July 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.676.
167
+
168
+ Yoav Artzi and Luke Zettlemoyer. Weakly supervised learning of semantic parsers for mapping instructions to actions. Transactions of the Association forComputational Linguistics, 2013.
169
+
170
+ Jimmy Ba, Jamie Ryan Kiros, and Geoffrey E. Hinton. Layer normalization. ArXiv, abs/1607.06450, 2016.
171
+
172
+ Jonathan Berant and Percy Liang. Semantic parsing via paraphrasing. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1415–1425, Baltimore, Maryland, June 2014. Association for Computational Linguistics.
173
+
174
+ Chandra Bhagavatula, Thanapon Noraset, and Doug Downey. Tabel: Entity linking in web tables. In International Semantic Web Conference, 2015.
175
+
176
+ Ben Bogin, Matt Gardner, and Jonathan Berant. Global reasoning over database structures for text-to-sql parsing. ArXiv, abs/1908.11214, 2019.
177
+
178
+ Giovanni Campagna, Agata Foryciarz, Mehrad Moradshahi, and Monica S. Lam. Zero-shot transfer learning with synthesized data for multi-domain dialogue state tracking. In Proceedings of 58th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2020.
179
+
180
+ Wenhu Chen, Hongmin Wang, Jianshu Chen, Yunkai Zhang, Hong Wang, Shiyang Li, Xiyou Zhou, and William Yang Wang. Tabfact: A large-scale dataset for table-based fact verification. arXiv preprint arXiv:1909.02164, 2019.
181
+
182
+ Wenhu Chen, Hanwen Zha, Zhiyu Chen, Wenhan Xiong, Hong Wang, and William Wang. Hybridqa: A dataset of multi-hop question answering over tabular and textual data. arXiv preprint arXiv:2004.07347, 2020.
183
+
184
+ Donghyun Choi, Myeong Cheol Shin, Eunggyun Kim, and Dong Ryeol Shin. Ryansql: Recursively applying sketch-based slot fillings for complex text-to-sql in cross-domain databases. ArXiv, abs/2004.03125, 2020.
185
+
186
+ Pradeep Dasigi, Matt Gardner, Shikhar Murty, Luke S. Zettlemoyer, and Eduard H. Hovy. Iterative search for weakly supervised semantic parsing. In NAACL-HLT, 2019.
187
+
188
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In NAACL-HLT, 2019.
189
+
190
+ Li Dong and Mirella Lapata. Coarse-to-fine decoding for neural semantic parsing. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 731–742. Association for Computational Linguistics, 2018. URL http://aclweb. org/anthology/P18-1068.
191
+
192
+ Catherine Finegan-Dollak, Jonathan K. Kummerfeld, Li Zhang, Karthik Ramanathan Dhanalakshmi Ramanathan, Sesh Sadasivam, Rui Zhang, and Dragomir Radev. Improving text-to-sql evaluation methodology. In ACL 2018. Association for Computational Linguistics, 2018.
193
+
194
+ Jiaqi Guo, Zecheng Zhan, Yan Gao, Yan Xiao, Jian-Guang Lou, Ting Liu, and Dongmei Zhang. Towards complex text-to-sql in cross-domain database with intermediate representation. In ACL, 2019.
195
+
196
+ Tong Guo and Huilin Gao. Content enhanced bert-based text-to-sql generation. Technical report, 2019.
197
+
198
+ Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Ming-Wei Chang. Realm: Retrievalaugmented language model pre-training. ArXiv, abs/2002.08909, 2020.
199
+
200
+ Pengcheng He, Yi Mao, Kaushik Chakrabarti, and Weizhu Chen. X-sql: reinforce schema representation with context. ArXiv, abs/1908.08113, 2019.
201
+
202
+ Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out-of-distribution examples in neural networks. ArXiv, abs/1610.02136, 2016.
203
+
204
+ Jonathan Herzig and Jonathan Berant. Decoupling structure and lexicon for zero-shot semantic parsing. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 1619–1629. Association for Computational Linguistics, 2018.
205
+
206
+ Jonathan Herzig, P. Nowak, Thomas Muller, Francesco Piccinno, and Julian Martin Eisenschlos. ¨ Tapas: Weakly supervised table parsing via pre-training. In ACL, 2020a.
207
+
208
+ Jonathan Herzig, Paweł Krzysztof Nowak, Thomas Muller, Francesco Piccinno, and Julian Mar-¨ tin Eisenschlos. Tapas: Weakly supervised table parsing via pre-training. arXiv preprint arXiv:2004.02349, 2020b.
209
+
210
+ Wonseok Hwang, Jinyeung Yim, Seunghyun Park, and Minjoon Seo. A comprehensive exploration on wikisql with table-aware word contextualization. ArXiv, abs/1902.01069, 2019.
211
+
212
+ Srinivasan Iyer, Ioannis Konstas, Alvin Cheung, Jayant Krishnamurthy, and Luke Zettlemoyer. Learning a neural semantic parser from user feedback. CoRR, abs/1704.08760, 2017.
213
+
214
+ Robin Jia and Percy Liang. Data recombination for neural semantic parsing. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2016.
215
+
216
+ Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014.
217
+
218
+ Mike Lewis, Marjan Ghazvininejad, Gargi Ghosh, Armen Aghajanyan, Sida Wang, and Luke Zettlemoyer. Pre-training via paraphrasing. arXiv preprint arXiv:2006.15020, 2020a.
219
+
220
+ Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. BART: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 7871–7880, Online, July 2020b. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.703. URL https://www.aclweb.org/anthology/2020.acl-main.703.
221
+
222
+ Fei Li and HV Jagadish. Constructing an interactive natural language interface for relational databases. VLDB, 2014.
223
+
224
+ Chen Liang, Mohammad Norouzi, Jonathan Berant, Quoc V. Le, and Ni Lao. Memory augmented policy optimization for program synthesis and semantic parsing. In NeurIPS, 2018.
225
+
226
+ Xi Victoria Lin, Richard Socher, and Caiming Xiong. Bridging textual and tabular data for crossdomain text-to-sql semantic parsing. In Findings of the 2020 Conference on Empirical Methods in Natural Language Processing, EMNLP Findings 2020, November 16th-20th, 2020, 2020.
227
+
228
+ Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke S. Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. ArXiv, abs/1907.11692, 2019.
229
+
230
+ Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. Vilbert: Pretraining task-agnostic visiolinguistic representations for vision-and-language tasks. In Hanna M. Wallach, Hugo Larochelle, Alina Beygelzimer, Florence d’Alche-Buc, Emily B. Fox, and Roman Garnett (eds.), ´ Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, 8-14 December 2019, Vancouver, BC, Canada, pp. 13–23, 2019.
231
+
232
+ Qin Lyu, Kaushik Chakrabarti, Shobhit Hathi, Souvik Kundu, Jianwen Zhang, and Zheng Chen. Hybrid ranking network for text-to-sql. Technical Report MSR-TR-2020-7, Microsoft Dynamics 365 AI, March 2020.
233
+
234
+ Sewon Min, Danqi Chen, Hannaneh Hajishirzi, and Luke Zettlemoyer. A discrete hard em approach for weakly supervised question answering. In EMNLP, 2019.
235
+
236
+ Ankur P Parikh, Xuezhi Wang, Sebastian Gehrmann, Manaal Faruqui, Bhuwan Dhingra, Diyi Yang, and Dipanjan Das. Totto: A controlled table-to-text generation dataset. arXiv preprint arXiv:2004.14373, 2020.
237
+
238
+ Panupong Pasupat and Percy Liang. Compositional semantic parsing on semi-structured tables. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing of the Asian Federation of Natural Language Processing, ACL 2015, July 26-31, 2015, Beijing, China, Volume 1: Long Papers, pp. 1470–1480, 2015.
239
+
240
+ Jeffrey Pennington, Richard Socher, and Christopher D. Manning. Glove: Global vectors for word representation. In EMNLP, pp. 1532–1543. ACL, 2014.
241
+
242
+ Matthew E. Peters, Mark Neumann, Robert Logan, Roy Schwartz, Vidur Joshi, Sameer Singh, and Noah A. Smith. Knowledge enhanced contextual word representations. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 43–54, Hong Kong, China, November 2019. Association for Computational Linguistics. doi: 10.18653/v1/D19-1005. URL https://www.aclweb.org/anthology/D19-1005.
243
+
244
+ Dragomir Radev, Rui Zhang, Amrit Rau, Abhinand Sivaprasad, Chiachun Hsieh, Nazneen Fatema Rajani, Xiangru Tang, Aadit Vyas, Neha Verma, Pranav Krishna, Yangxiaokang Liu, Nadia Irwanto, Jessica Pan, Faiaz Rahman, Ahmad Zaidi, Murori Mutuma, Yasin Tarabar, Ankit Gupta, Tao Yu, Yi Chern Tan, Xi Victoria Lin, Caiming Xiong, and Richard Socher. Dart: Open-domain structured data record to text generation. arXiv preprint arXiv:2007.02871, 2020.
245
+
246
+ Tianze Shi, Kedar Tatwawadi, Kaushik Chakrabarti, Yi Mao, Oleksandr Polozov, and Weizhu Chen. Incsql: Training incremental text-to-sql parsers with non-deterministic oracles. arXiv preprint arXiv:1809.05054, 2018.
247
+
248
+ Bailin Wang, Ivan Titov, and Mirella Lapata. Learning semantic parsers from denotations with latent structured alignments and abstract programs. In Proceedings of EMNLP, 2019.
249
+
250
+ Bailin Wang, Richard Shin, Xiaodong Liu, Oleksandr Polozov, and Matthew Richardson. RAT-SQL: Relation-aware schema encoding and linking for text-to-SQL parsers. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 7567–7578, Online, July 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.677. URL https://www.aclweb.org/anthology/2020.acl-main.677.
251
+
252
+ Yushi Wang, Jonathan Berant, and Percy Liang. Building a semantic parser overnight. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 1332–1342, Beijing, China, July 2015a. Association for Computational Linguistics. doi: 10.3115/v1/P15-1129. URL https://www.aclweb.org/anthology/P15-1129.
253
+
254
+ Yushi Wang, Jonathan Berant, Percy Liang, et al. Building a semantic parser overnight. In ACL (1), pp. 1332–1342, 2015b.
255
+
256
+ Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, R’emi Louf, Morgan Funtowicz, and Jamie Brew. Huggingface’s transformers: State-of-the-art natural language processing. ArXiv, abs/1910.03771, 2019.
257
+
258
+ Pengcheng Yin, Graham Neubig, Wen-tau Yih, and Sebastian Riedel. TaBERT: Pretraining for joint understanding of textual and tabular data. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 8413–8426, Online, July 2020a. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.745.
259
+
260
+ Pengcheng Yin, Graham Neubig, Wen-tau Yih, and Sebastian Riedel. Tabert: Pretraining for joint understanding of textual and tabular data. arXiv preprint arXiv:2005.08314, 2020b.
261
+
262
+ Tao Yu, Michihiro Yasunaga, Kai Yang, Rui Zhang, Dongxu Wang, Zifan Li, and Dragomir Radev. Syntaxsqlnet: Syntax tree networks for complex and cross-domain text-to-sql task. In Proceedings of EMNLP. Association for Computational Linguistics, 2018a.
263
+
264
+ Tao Yu, Rui Zhang, Kai Yang, Michihiro Yasunaga, Dongxu Wang, Zifan Li, James Ma, Irene Li, Qingning Yao, Shanelle Roman, Zilin Zhang, and Dragomir Radev. Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-sql task. In EMNLP, 2018b.
265
+
266
+ Luke S. Zettlemoyer and Michael Collins. Learning to map sentences to logical form: Structured classification with probabilistic categorial grammars. UAI, 2005.
267
+
268
+ Li Zhang, Shuo Zhang, and Krisztian Balog. Table2vec: Neural word and entity embeddings for table population and retrieval. In Proceedings of the 42Nd International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR’19, pp. 1029–1032, New York, NY, USA, 2019a. ACM.
269
+
270
+ Rui Zhang, Tao Yu, He Yang Er, Sungrok Shim, Eric Xue, Xi Victoria Lin, Tianze Shi, Caiming Xiong, Richard Socher, and Dragomir Radev. Editing-based sql query generation for cross-domain context-dependent questions. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and 9th International Joint Conference on Natural Language Processing. Association for Computational Linguistics, 2019b.
271
+
272
+ Victor Zhong, Caiming Xiong, and Richard Socher. Seq2sql: Generating structured queries from natural language using reinforcement learning. CoRR, abs/1709.00103, 2017.
273
+
274
+ Victor Zhong, M. Lewis, Sida I. Wang, and Luke Zettlemoyer. Grounded adaptation for zero-shot executable semantic parsing. The 2020 Conference on Empirical Methods in Natural Language Processing, 2020.
275
+
276
+ # A APPENDICES
277
+
278
+ Table 7: Examples of the inputs and annotations for four semantic parsing tasks. SPIDER and Fully-sup. WIKISQL require full annotation of SQL programs, whereas WIKITABLEQUESTIONS and Weakly-sup. WIKISQL only requires annotation of answers (or denotations) of questions.
279
+
280
+ <table><tr><td>Task</td><td>Question</td><td>Table/Database</td><td>Annotation</td></tr><tr><td>SPIDER</td><td>Find the first and last names of the stu- dents who are living in the dorms that have a TV Lounge as an amenity.</td><td>database with5 tables e.g.student, dorm_amenity,..</td><td>SELECT T1.FNAME,T1.LNAME FROM STUDENT AS T1 JOIN LIVES-IN AS T2 ON T1.STUID=T2.STUID WHERE T2.DORMID IN(SELECT T3.DORMID FROM HAS_AMENITY AS T3 JOIN DORM_AMENITY AS T4 ON T3.AMENID=T4.AMENID WHERE T4.AMENITY-NAME=&#x27;TV LOUNGE&#x27;)</td></tr><tr><td>Fully-sup.WIKISQL</td><td>How many CFL teamsare from York Col- lege?</td><td>a table with5 columns e.g.player,position,..</td><td>SELECT COUNT CFL TEAM FROM CFLDRAFT WHERE COLLEGE =YORK&#x27;</td></tr><tr><td>WIKITABLEQUESTIONS</td><td>In what city did Piotr&#x27;s last 1st place finish occur?</td><td>a table with 6 columns e.g. year,event,..</td><td>“Bangkok,Thailand”</td></tr><tr><td>Weakly-sup. WIKISQL</td><td>How many CFL teams are from York Col- lege?</td><td>a table with 5 columns e.g. player,position..</td><td>2</td></tr></table>
281
+
282
+ Table 8: Aggregated datasets for table-and-language tasks.
283
+
284
+ <table><tr><td></td><td>Train Size</td><td># Table</td><td>Task</td></tr><tr><td>TabFact</td><td>92.2K</td><td>16K</td><td>Table-based fact verification</td></tr><tr><td>LogicNLG</td><td>28.5K</td><td>7.3K</td><td>Table-to-text generation</td></tr><tr><td>HybridQA</td><td>63.2K</td><td>13K</td><td>Multi-hop question answering</td></tr><tr><td>WikiSQL</td><td>61.3K</td><td>24K</td><td>Text-to-SQL generation</td></tr><tr><td>WikiTableQuestions</td><td>17.6K</td><td>2.1K</td><td>Question answering</td></tr><tr><td>ToTTo</td><td>120K</td><td>83K</td><td>Table-to-text generation</td></tr><tr><td>Spider</td><td>8.7K</td><td>1K</td><td>Text-to-SQL generation</td></tr></table>
285
+
286
+ # A.1 ADDITIONAL ANALYSIS
287
+
288
+ Training coverage As shown in Figure 2, on the challenging end text-to-SQL SPIDER task, RATSQL initialized with GRAPPA outperforms RAT-SQL using RoBERTa by about $14 \%$ in the early training stage. This shows that GRAPPA already captures some semantic knowledge in pre-training. Finally, GRAPPA is able to keep the competitive edge by $4 \%$ .
289
+
290
+ What if the task-specific training data is also used with the MLM or SSP objective in pretraining? Although we did not do the same experiments, we would like to point to the RAT-SQL paper (Wang et al., 2020) for some suggestions. They add a similar alignment loss (similar to SSP) on the SPIDER training data and found that it doesn’t make a statistically significant difference (in Appendix B).
291
+
292
+ ![](images/ee8956e534993ddac452716926e56c75e8f91fec168e94a17696cb998b68772c.jpg)
293
+ Figure 2: The development exact set match score in SPIDER vs. the number of training steps. RAT-SQL initialized with our pre-trained GRAPPA converges to higher scores in a shorter time than RAT-SQL $w$ . BERT.
294
+
295
+ ![](images/0992f2358df5a0fe1f6f7c7ff375ffaa4afca401695dabc3591f91a997c4feff.jpg)
296
+ (a) RoBERTa-large
297
+
298
+ ![](images/834df63872fbfafd2ae0f062c02cf844610cbb1935af370e9f8c2f504c55aa77.jpg)
299
+ Figure 3: Attention visualization on the last self-attention layer.
300
+
301
+ ![](images/a048f102ee18fdf5dad90b07e6df485cced58cda58d210f0780a7bf19d5420af.jpg)
302
+ Figure 4: Attention visualization on the last self-attention layer.
parse/train/kyaIeYj4zZ/kyaIeYj4zZ_content_list.json ADDED
@@ -0,0 +1,1685 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "GRAPPA: GRAMMAR-AUGMENTED PRE-TRAINING FOR TABLE SEMANTIC PARSING ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 825,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Tao $\\mathbf { V } \\mathbf { u } ^ { \\dagger * }$ , Chien-Sheng ${ \\bf W } { \\bf u } ^ { \\ S }$ , Xi Victoria $\\mathbf { L i n ^ { \\ S * } }$ , Bailin Wang‡∗, Yi Chern Tan†, Xinyi Yang§, Dragomir Radev†§, Richard Socher§, Caiming Xiong§ § Salesforce Research, † Yale University, ‡University of Edinburgh \n{tao.yu, yichern.tan,dragomir.radev}@yale.edu, bailin.wang@ed.ac.uk \n{wu.jason,x.yang,rsocher,cxiong}@salesforce.com, victorialin@fb.com ",
17
+ "bbox": [
18
+ 186,
19
+ 161,
20
+ 836,
21
+ 236
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 271,
32
+ 544,
33
+ 286
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "We present GRAPPA, an effective pre-training approach for table semantic parsing that learns a compositional inductive bias in the joint representations of textual and tabular data. We construct synthetic question-SQL pairs over high-quality tables via a synchronous context-free grammar (SCFG). We pre-train GRAPPA on the synthetic data to inject important structural properties commonly found in table semantic parsing into the pre-training language model. To maintain the model’s ability to represent real-world data, we also include masked language modeling (MLM) on several existing table-and-language datasets to regularize our pre-training process. Our proposed pre-training strategy is much data-efficient. When incorporated with strong base semantic parsers, GRAPPA achieves new state-of-the-art results on four popular fully supervised and weakly supervised table semantic parsing tasks. The pre-trained embeddings can be downloaded at https://huggingface.co/Salesforce/grappa_large_jnt. ",
40
+ "bbox": [
41
+ 233,
42
+ 303,
43
+ 766,
44
+ 483
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 510,
55
+ 336,
56
+ 525
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Tabular data serve as important information source for human decision makers in many domains, such as finance, health care, retail and so on. While tabular data can be efficiently accessed via the structured query language (SQL), a natural language interface allows such data to be more accessible for a wider range of non-technical users. As a result, table semantic parsing that maps natural language queries over tabular data to formal programs has drawn significant attention in recent years. ",
63
+ "bbox": [
64
+ 174,
65
+ 541,
66
+ 825,
67
+ 611
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Recent pre-trained language models (LMs) such as BERT (Devlin et al., 2019) and RoBERTa (Liu et al., 2019) achieve tremendous success on a spectrum of natural language processing tasks, including semantic parsing (Zettlemoyer & Collins, 2005; Zhong et al., 2017; Yu et al., 2018b). These advances have shifted the focus from building domain-specific semantic parsers (Zettlemoyer & Collins, 2005; Artzi & Zettlemoyer, 2013; Berant & Liang, 2014; Li & Jagadish, 2014) to cross-domain semantic parsing (Zhong et al., 2017; Yu et al., 2018b; Herzig & Berant, 2018; Dong & Lapata, 2018; Wang et al., 2020; Lin et al., 2020). ",
74
+ "bbox": [
75
+ 174,
76
+ 617,
77
+ 825,
78
+ 715
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Despite such significant gains, the overall performance on complex benchmarks such SPIDER (Yu et al., 2018b) and WIKITABLEQUESTIONS benchmarks are still limited, even when integrating representations of current pre-trained language models. As such tasks requires generalization to new databases/tables and more complex programs (e.g., SQL), we hypothesize that current pretrained language models are not sufficient for such tasks. First, language models pre-trained using unstructured text data such as Wikipedia and Book Corpus are exposed to a significant domain shift when directly applied to table semantic parsing, where jointly modeling the relation between utterances and structural tables is crucial. Second, conventional pre-training objectives does not consider the underlying compositionality of data (e.g., questions and SQLs) from table semantic parsing. To close this gap, we seek to learn contextual representations jointly from structured tabular data and unstructured natural language sentences, with objectives oriented towards table semantic parsing. ",
85
+ "bbox": [
86
+ 174,
87
+ 722,
88
+ 825,
89
+ 888
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "image",
95
+ "img_path": "images/80ae699260e357fc1f8b49de6e2c24e9a97d47e2618284160ff8a1acf8ac2e47.jpg",
96
+ "image_caption": [
97
+ "Figure 1: An overview of GRAPPA pre-training approach. We first induce a SCFG given some examples in SPIDER. We then sample from this grammar given a large amount of tables to generate new synthetic examples. Finally, GRAPPA is pre-trained on the synthetic data using SQL semantic loss and a small amount of table related utterances using MLM loss. "
98
+ ],
99
+ "image_footnote": [],
100
+ "bbox": [
101
+ 207,
102
+ 102,
103
+ 790,
104
+ 351
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "In this paper, we propose a novel grammar-augmented pre-training framework for table semantic parsing (GRAPPA). Inspired by previous work on data synthesis for semantic parsing (Berant & Liang, 2014; Wang et al., 2015b; Jia & Liang, 2016; Herzig & Berant, 2018; Andreas, 2020), we induce a synchronous context-free grammar (SCFG) specific to mapping natural language to SQL queries from existing text-to-SQL datasets, which covers most commonly used question-SQL patterns. As shown in Figure 1, from a text-to-SQL example we can create a question-SQL template by abstracting over mentions of schema components (tables and fields), values, and SQL operations. By executing this template on randomly selected tables we can create a large number of synthetic question-SQL pairs. We train GRAPPA on these synthetic question-SQL pairs and their corresponding tables using a novel text-schema linking objective that predicts the syntactic role of a table column in the SQL for each pair. This way we encourage the model to identify table schema components that can be grounded to logical form constituents, which is critical for most table semantic parsing tasks. ",
111
+ "bbox": [
112
+ 174,
113
+ 439,
114
+ 825,
115
+ 606
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "To prevent overfitting to the synthetic data, we include the masked-language modelling (MLM) loss on several large-scale, high-quality table-and-language datasets and carefully balance between preserving the original natural language representations and injecting the compositional inductive bias through our synthetic data. We pre-train GRAPPA using $4 7 5 \\mathrm { k }$ synthetic examples and $3 9 1 . 5 \\mathrm { k }$ examples from existing table-and-language datasets. Our approach dramatically reduces the training time and GPU cost. We evaluate on four popular semantic parsing benchmarks in both fully supervised and weakly supervised settings. GRAPPA consistently achieves new state-of-the-art results on all of them, significantly outperforming all previously reported results. ",
122
+ "bbox": [
123
+ 174,
124
+ 613,
125
+ 825,
126
+ 724
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "2 METHODOLOGY ",
133
+ "text_level": 1,
134
+ "bbox": [
135
+ 176,
136
+ 746,
137
+ 341,
138
+ 762
139
+ ],
140
+ "page_idx": 1
141
+ },
142
+ {
143
+ "type": "text",
144
+ "text": "2.1 MOTIVATION ",
145
+ "text_level": 1,
146
+ "bbox": [
147
+ 174,
148
+ 777,
149
+ 305,
150
+ 792
151
+ ],
152
+ "page_idx": 1
153
+ },
154
+ {
155
+ "type": "text",
156
+ "text": "Semantic parsing data is compositional because utterances are usually related to some formal representations such as logic forms and SQL queries. Numerous prior works (Berant & Liang, 2014; Wang et al., 2015a; Jia & Liang, 2016; Iyer et al., 2017; Andreas, 2020) have demonstrated the benefits of augmenting data using context-free grammar. The augmented examples can be used to teach the model to generalize beyond the given training examples. ",
157
+ "bbox": [
158
+ 174,
159
+ 805,
160
+ 825,
161
+ 875
162
+ ],
163
+ "page_idx": 1
164
+ },
165
+ {
166
+ "type": "text",
167
+ "text": "However, data augmentation becomes more complex and less beneficial if we want to apply it to generate data for a random domain. More and more work (Zhang et al., 2019b; Herzig et al., 2020b; Campagna et al., 2020; Zhong et al., 2020) shows utilizing augmented data doesn’t always result in a significant performance gain in cross-domain semantic parsing end tasks. The most likely reason for this is that models tend to overfit to the canonical input distribution especially the generated utterances are very different compared with the original ones. ",
168
+ "bbox": [
169
+ 176,
170
+ 882,
171
+ 823,
172
+ 924
173
+ ],
174
+ "page_idx": 1
175
+ },
176
+ {
177
+ "type": "text",
178
+ "text": "",
179
+ "bbox": [
180
+ 176,
181
+ 103,
182
+ 823,
183
+ 146
184
+ ],
185
+ "page_idx": 2
186
+ },
187
+ {
188
+ "type": "text",
189
+ "text": "Moreover, instead of directly training semantic parsers on the augmented data, our paper is the first to use the synthetic examples in pre-training in order to inject a compositional inductive bias to LMs and show it actually works if the overfitting problem is carefully addressed. To address the overfitting problem, in Section 2.3, we also include a small set of table related utterances in our pre-training data. We add an MLM loss on them as a regularization factor, which requires the model to balance between real and synthetic examples during the pre-training. We note that this consistently improves the performance on all downstream semantic parsing tasks (see Section 4). Finally, our pre-training method is much more data-efficient and save much more computational power than other prior work (Section 5). ",
190
+ "bbox": [
191
+ 174,
192
+ 152,
193
+ 825,
194
+ 277
195
+ ],
196
+ "page_idx": 2
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "2.2 DATA SYNTHESIS WITH SYNCHRONOUS CONTEXT-FREE GRAMMAR ",
201
+ "text_level": 1,
202
+ "bbox": [
203
+ 176,
204
+ 294,
205
+ 684,
206
+ 309
207
+ ],
208
+ "page_idx": 2
209
+ },
210
+ {
211
+ "type": "text",
212
+ "text": "We follow Jia & Liang (2016) to design our SCFG and apply it on a large amount of tables to populate new examples. For example, as shown in Figure 1, by replacing substitutable column mentions (“locations”), table mentions (“performance”), values (“two”), and SQL logic phrases (“at least”) with the other possible candidates in the same group, our grammar generates new synthetic text-to-SQL examples with the same underlying SQL logic template. We then pre-train BERT on the augmented examples to force it to discover substitutable fragments and learn the underlying logic template so that it is able to generalize to other similar questions. Meanwhile, BERT also benefits from pre-training on a large number of different columns, table names, and values in the generated data, which could potentially improve schema linking in semantic parsing tasks. ",
213
+ "bbox": [
214
+ 173,
215
+ 320,
216
+ 825,
217
+ 445
218
+ ],
219
+ "page_idx": 2
220
+ },
221
+ {
222
+ "type": "table",
223
+ "img_path": "images/dc7cd0e718ba3886cb33036fbd772fb32e710d229180cb4db96ccb61d3d42fb9.jpg",
224
+ "table_caption": [],
225
+ "table_footnote": [],
226
+ "table_body": "<table><tr><td>Non-terminals</td><td>Production rules</td></tr><tr><td>TABLE→ti</td><td>1.ROOT →For each COLUMNO,return how many times TABLEO</td></tr><tr><td>COLUMN→Ci</td><td>with COLUMN1 OPO VALUEO &quot;,</td></tr><tr><td>VALUE→Ui</td><td>SELECT COLUMNO,COUNT )WHERE COLUMN1 OP0</td></tr><tr><td>AGG→(MAX,MIN,COUNT,AVG,SUM)</td><td>VALUEO GROUP BY COLUMNO</td></tr><tr><td>OP→(=,≤,≠,.,LIKE,BETWEEN)</td><td></td></tr><tr><td>SC→(ASC,DESC)</td><td>2.ROOT →{&quot;What are the COLUMNO and COLUMN1 of the TABLEO</td></tr><tr><td>MAX→(&quot;maximum”,&quot;the largest&quot;..)</td><td>whose COLUMN2 is OPO AGGO COLUMN2 ?&quot;,</td></tr><tr><td>≤→(&quot;no more than”,“no above&quot;.) .</td><td>SELECT COLUMNO,( COLUMN1 WHERE COLUMN2 OPO( SELECT AGG0( COLUMN2))</td></tr></table>",
227
+ "bbox": [
228
+ 178,
229
+ 457,
230
+ 820,
231
+ 563
232
+ ],
233
+ "page_idx": 2
234
+ },
235
+ {
236
+ "type": "text",
237
+ "text": "Table 1: Examples of non-terminals and production rules in our SCFG. Each production rule ROOT $ \\langle \\alpha , \\beta \\rangle$ is built from some $( x , y ) \\in \\mathcal { D }$ by replacing all terminal phrases with non-terminals. $t _ { i } , c _ { i }$ , and $v _ { i }$ stand for any table name, column name, entry value respectively. ",
238
+ "bbox": [
239
+ 174,
240
+ 573,
241
+ 826,
242
+ 616
243
+ ],
244
+ "page_idx": 2
245
+ },
246
+ {
247
+ "type": "text",
248
+ "text": "Grammar induction To induce a cross-domain SCFG, we study examples in SPIDER since it is a publicly available dataset that includes the largest number of examples with complex compositionalities in different domains. To further show the generality of our approach, we do not develop different SCFG for each downstream task. Given a set of $( x , y )$ pairs in SPIDER, where $x$ and $y$ are the utterance and SQL query respectively. We first define a set of non-terminal symbols for table names, column names, cell values, operations, etc. For example, in Table 1, we group aggregation operations such as MAX as a non-terminal AGG. We can also replace the entities/phrases with their non-terminal types in SQL query to generate a SQL production rule $\\beta$ . Then, we group $( x , y )$ pairs by similar SQL production rule $\\beta$ . We automatically group and count Spider training examples by program templates, and select about 90 most frequent program templates $\\beta$ . For each program template in the grammar, we randomly select roughly 4 corresponding natural language questions, manually replace entities/phrases with their corresponding non-terminal types to create natural language templates $\\alpha$ , and finally align them to generate each production rule ROOT $ \\langle \\alpha , \\beta \\rangle$ . The manual alignment approximately takes a few hours. About 500 SPIDER examples are studied to induce the SCFG. ",
249
+ "bbox": [
250
+ 174,
251
+ 631,
252
+ 825,
253
+ 825
254
+ ],
255
+ "page_idx": 2
256
+ },
257
+ {
258
+ "type": "text",
259
+ "text": "Data augmentation With $\\langle \\alpha , \\beta \\rangle$ pairs, we can simultaneously generate pseudo natural questions and corresponding SQL queries given a new table or database. We first sample a production rule, and replace its non-terminals with one of corresponding terminals. For example, we can map the non-terminal AGG to MAX and “maximum” for the SQL query and the natural language sentence, respectively. Also, table content is used in synthesizing our pre-training data. For example, if the sampled production rule contains a value (e.g., VALUE0), we sample a value for the selected column from the table content and add it to the SQL and question templates. This way during pre-training, GRAPPA can access the table content and learn the linking between values and columns. ",
260
+ "bbox": [
261
+ 174,
262
+ 840,
263
+ 825,
264
+ 924
265
+ ],
266
+ "page_idx": 2
267
+ },
268
+ {
269
+ "type": "text",
270
+ "text": "",
271
+ "bbox": [
272
+ 171,
273
+ 103,
274
+ 823,
275
+ 132
276
+ ],
277
+ "page_idx": 3
278
+ },
279
+ {
280
+ "type": "text",
281
+ "text": "We use WIKITABLES (Bhagavatula et al., 2015), which contains 1.6 million high-quality relational Wikipedia tables. We remove tables with exactly the same column names and get about $3 4 0 \\mathrm { k }$ tables and generate $4 1 3 \\mathrm { k }$ question-SQL pairs given these tables. Also, we generate another 62k questionSQL pairs using tables and databases in the training sets of SPIDER and WIKISQL. In total, our final pre-training dataset includes 475k question-SQL examples. ",
282
+ "bbox": [
283
+ 174,
284
+ 138,
285
+ 825,
286
+ 208
287
+ ],
288
+ "page_idx": 3
289
+ },
290
+ {
291
+ "type": "text",
292
+ "text": "We note that SCFG is usually crude (Andreas, 2020) especially when it is applied to augment data for different domains. In this work we don’t focus on how to develop a better SCFG that generates more natural utterances. We see this as a very interesting future work to explore. Despite the fact that the SCFG is crude, our downstream task experiments show that it could be quite effective if some pre-training strategies are applied. ",
293
+ "bbox": [
294
+ 174,
295
+ 215,
296
+ 825,
297
+ 285
298
+ ],
299
+ "page_idx": 3
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "2.3 TABLE RELATED UTTERANCES ",
304
+ "text_level": 1,
305
+ "bbox": [
306
+ 176,
307
+ 303,
308
+ 429,
309
+ 318
310
+ ],
311
+ "page_idx": 3
312
+ },
313
+ {
314
+ "type": "text",
315
+ "text": "As discussed in Section 2.1, GRAPPA is also pre-trained on human annotated questions over tables with a MLM objective. We collected seven high quality datasets for textual-tabular data understanding (Table 8 in the Appendix), all of them contain Wikipedia tables or databases and the corresponding natural language utterances written by humans. We only use tables and contexts as a pre-training resource and discard all the other human labels such as answers and SQL queries. ",
316
+ "bbox": [
317
+ 174,
318
+ 329,
319
+ 825,
320
+ 400
321
+ ],
322
+ "page_idx": 3
323
+ },
324
+ {
325
+ "type": "text",
326
+ "text": "2.4 PRE-TRAINING GRAPPA ",
327
+ "text_level": 1,
328
+ "bbox": [
329
+ 176,
330
+ 417,
331
+ 382,
332
+ 433
333
+ ],
334
+ "page_idx": 3
335
+ },
336
+ {
337
+ "type": "text",
338
+ "text": "Unlike all the previous work where augmented data is used in the end task training, we apply the framework to language model pre-training. Training semantic parsers is usually slow, and augmenting a large amount of syntactic pairs directly to the end task training data can be prohibitively slow or expensive. In our work, we formulate text-to-SQL as a multi-class classification task for each column, which can be naturally combined with the MLM objective to pre-train BERT for semantic parsing. Moreover, in this way, the learned knowledge can be easily and efficiently transferred to downstream semantic parsing tasks in the exact same way as BERT (shown in Section 4). ",
339
+ "bbox": [
340
+ 174,
341
+ 444,
342
+ 825,
343
+ 542
344
+ ],
345
+ "page_idx": 3
346
+ },
347
+ {
348
+ "type": "text",
349
+ "text": "GRAPPA is initialized by $\\mathrm { R o B E R T a _ { L A R G E } }$ (Liu et al., 2019) and further pre-trained on the synthetic data with SQL semantic loss and table-related data with MLM loss. As shown in Figure 1, we follow Hwang et al. (2019) to concatenate a user utterance and the column headers into a single flat sequence separated by the $< / \\varsigma >$ token. The user utterance can be either one of the original human utterances collected from the aggregated datasets or the canonical sentences sampled from the SCFG. We add the table name at the beginning of each column if there are some complex schema inputs involving multiple tables. We employ two objective functions for language model pre-training: 1) masked-language modelling (MLM), and 2) SQL semantic prediction (SSP). ",
350
+ "bbox": [
351
+ 174,
352
+ 549,
353
+ 825,
354
+ 660
355
+ ],
356
+ "page_idx": 3
357
+ },
358
+ {
359
+ "type": "text",
360
+ "text": "MLM objective Intuitively, we would like to have a self-attention mechanism between natural language and table headers. We conduct masking for both natural language sentence and table headers. A small part of the input sequence is first replaced with the special token <mask>. The MLM loss is then computed by the cross-entropy function on predicting the masked tokens. We follow the default hyperparameters from Devlin et al. (2019) with a $15 \\%$ masking probability. ",
361
+ "bbox": [
362
+ 174,
363
+ 676,
364
+ 823,
365
+ 746
366
+ ],
367
+ "page_idx": 3
368
+ },
369
+ {
370
+ "type": "text",
371
+ "text": "SSP objective With our synthetic natural language sentence and SQL query pairs, we can add an auxiliary task to train our column representations. The proposed task is, given a natural language sentence and table headers, to predict whether a column appears in the SQL query and what operation is triggered. We then convert all SQL sequence labels into operation classification labels for each column. For example in the Figure 1, the operation classification label of the column “locations” is SELECT AND GROUP BY HAVING. In total, there are 254 potential classes for operations in our experiments. ",
372
+ "bbox": [
373
+ 174,
374
+ 763,
375
+ 825,
376
+ 861
377
+ ],
378
+ "page_idx": 3
379
+ },
380
+ {
381
+ "type": "text",
382
+ "text": "For a column or table indexed by $i$ , we use the encoding of the special token $< / \\varsigma >$ right before it as its representation, denoted as $\\mathbf { x _ { i } }$ to predict its corresponding operations. On top of such representations, we apply a two-layer feed-forward network followed by a GELU activation layer (Hendrycks & Gimpel, 2016) and a normalization layer (Ba et al., 2016) to the output representations. Formally, we compute the final vector representation of each column $\\mathbf { y _ { i } }$ by: ",
383
+ "bbox": [
384
+ 174,
385
+ 867,
386
+ 825,
387
+ 924
388
+ ],
389
+ "page_idx": 3
390
+ },
391
+ {
392
+ "type": "text",
393
+ "text": "",
394
+ "bbox": [
395
+ 173,
396
+ 103,
397
+ 578,
398
+ 118
399
+ ],
400
+ "page_idx": 4
401
+ },
402
+ {
403
+ "type": "equation",
404
+ "img_path": "images/7ca991edbfec24b2ed31fe5ded047fc09aea76d695c1e77501c2750c99d9c75c.jpg",
405
+ "text": "$$\n\\begin{array} { r } { \\mathbf { h } = \\mathrm { L a y e r N o r m } ( \\mathrm { G E L U } ( W _ { 1 } \\cdot \\mathbf { x _ { i } } ) ) } \\\\ { \\mathbf { y _ { i } } = \\mathrm { L a y e r N o r m } ( \\mathrm { G E L U } ( W _ { 2 } \\cdot \\mathbf { h } ) ) } \\end{array}\n$$",
406
+ "text_format": "latex",
407
+ "bbox": [
408
+ 380,
409
+ 125,
410
+ 614,
411
+ 161
412
+ ],
413
+ "page_idx": 4
414
+ },
415
+ {
416
+ "type": "text",
417
+ "text": "Finally, $\\mathbf { y _ { i } }$ is employed to compute the cross-entropy loss through a classification layer. We sum losses from all columns in each training example for back-propagation. For samples from the aggregated datasets, we only compute the MLM loss to update our model. For samples from the synthetic data we generated, we compute only SSP loss to update our model. More specifically, we mix 391k natural language utterances and $4 7 5 \\mathrm { k }$ synthetic examples together as the final pre-training data. The examples in these two groups are randomly sampled during the pre-training, and MLM loss is computed if the selected example is a natural language question, otherwise SSP for a synthetic example. ",
418
+ "bbox": [
419
+ 174,
420
+ 175,
421
+ 825,
422
+ 273
423
+ ],
424
+ "page_idx": 4
425
+ },
426
+ {
427
+ "type": "text",
428
+ "text": "3 EXPERIMENTS ",
429
+ "text_level": 1,
430
+ "bbox": [
431
+ 176,
432
+ 294,
433
+ 326,
434
+ 309
435
+ ],
436
+ "page_idx": 4
437
+ },
438
+ {
439
+ "type": "text",
440
+ "text": "We conduct experiments on four cross-domain table semantic parsing tasks, where generalizing to unseen tables/databases at test time is required. We experiment with two different settings of table semantic parsing, fully supervised and weakly supervised setting. The data statistics and examples on each task are shown in Table 2 and Table 7 in the Appendix respectively. ",
441
+ "bbox": [
442
+ 176,
443
+ 325,
444
+ 823,
445
+ 382
446
+ ],
447
+ "page_idx": 4
448
+ },
449
+ {
450
+ "type": "table",
451
+ "img_path": "images/956b78f27e946f291c5be8e8210d4848a3d4a072035f11de7793d5c9127e9080.jpg",
452
+ "table_caption": [],
453
+ "table_footnote": [],
454
+ "table_body": "<table><tr><td>Task&amp;Dataset</td><td>#Examples</td><td>Resource</td><td>Annotation</td><td>Cross-domain</td></tr><tr><td>SPIDER Yu et al. (2018b)</td><td>10,181</td><td>database</td><td>SQL</td><td></td></tr><tr><td>Fully-sup.WIKISQL Zhong et al. (2017)</td><td>80,654</td><td>single table</td><td>SQL</td><td>?</td></tr><tr><td>WIKITABLEQUESTIONs Pasupat &amp;Liang (2015)</td><td>2,2033</td><td>single table</td><td>answer</td><td>√</td></tr><tr><td>Weakly-sup.WIKISQL Zhong et al. (2017)</td><td>80.654</td><td>single table</td><td>answer</td><td></td></tr></table>",
455
+ "bbox": [
456
+ 202,
457
+ 395,
458
+ 797,
459
+ 457
460
+ ],
461
+ "page_idx": 4
462
+ },
463
+ {
464
+ "type": "text",
465
+ "text": "Table 2: Overview of four table-based semantic parsing and question answering datasets in fullysupervised (top) and weakly-supervised (bottom) setting used in this paper. More details in Section 3 ",
466
+ "bbox": [
467
+ 173,
468
+ 467,
469
+ 823,
470
+ 507
471
+ ],
472
+ "page_idx": 4
473
+ },
474
+ {
475
+ "type": "text",
476
+ "text": "3.1 SUPERVISED SEMANTIC PARSING ",
477
+ "text_level": 1,
478
+ "bbox": [
479
+ 178,
480
+ 525,
481
+ 446,
482
+ 540
483
+ ],
484
+ "page_idx": 4
485
+ },
486
+ {
487
+ "type": "text",
488
+ "text": "We first evaluate GRAPPA on two supervised semantic parsing tasks. In a supervised semantic parsing scenario, given a question and a table or database schema, a model is expected to generate the corresponding program. ",
489
+ "bbox": [
490
+ 174,
491
+ 551,
492
+ 825,
493
+ 593
494
+ ],
495
+ "page_idx": 4
496
+ },
497
+ {
498
+ "type": "text",
499
+ "text": "SPIDER SPIDER Yu et al. (2018b) is a large text-to-SQL dataset. It consists of $1 0 \\mathrm { k }$ complex question-query pairs where many of the SQL queries contain multiple SQL keywords. It also includes 200 databases where multiple tables are joined via foreign keys. For the baseline model, we use RAT-SQL $^ +$ BERT Wang et al. (2020) which is the state-of-the-art model according to the official leaderboard. We followed the official Spider evaluation to report set match accuracy. ",
500
+ "bbox": [
501
+ 174,
502
+ 609,
503
+ 825,
504
+ 679
505
+ ],
506
+ "page_idx": 4
507
+ },
508
+ {
509
+ "type": "text",
510
+ "text": "Fully-sup. WIKISQL WIKISQL Zhong et al. (2017) is a collection of over $8 0 \\mathrm { k }$ questions and SQL query pairs over $3 0 \\mathrm { k }$ Wikipedia tables. We use Guo & Gao (2019), a competitive model on WIKISQL built on SQLova Hwang et al. (2019), as our base model. We adapt the same set of hyperparameters including batch size and maximum input length as in Guo & Gao (2019). For a fair comparison, we only consider single models without execution-guided decoding and report execution accuracy. ",
511
+ "bbox": [
512
+ 174,
513
+ 695,
514
+ 825,
515
+ 780
516
+ ],
517
+ "page_idx": 4
518
+ },
519
+ {
520
+ "type": "text",
521
+ "text": "3.2 WEAKLY-SUPERVISED SEMANTIC PARSING ",
522
+ "text_level": 1,
523
+ "bbox": [
524
+ 174,
525
+ 796,
526
+ 514,
527
+ 811
528
+ ],
529
+ "page_idx": 4
530
+ },
531
+ {
532
+ "type": "text",
533
+ "text": "We also consider weakly-supervised semantic parsing tasks, which are very different from SQLguided learning in pre-training. In this setting, a question and its corresponding answer are given, but the underlying meaning representation (e.g., SQL queries) are unknown. ",
534
+ "bbox": [
535
+ 174,
536
+ 823,
537
+ 825,
538
+ 866
539
+ ],
540
+ "page_idx": 4
541
+ },
542
+ {
543
+ "type": "text",
544
+ "text": "WIKITABLEQUESTIONS This dataset contains question-denotation pairs over single Wikipedia tables Pasupat & Liang (2015). The questions involve a variety of operations such as comparisons, superlatives, and aggregations, where some of them are hard to answered by SQL queries. ",
545
+ "bbox": [
546
+ 176,
547
+ 882,
548
+ 825,
549
+ 924
550
+ ],
551
+ "page_idx": 4
552
+ },
553
+ {
554
+ "type": "table",
555
+ "img_path": "images/d45de1958defb8dd70e52a52eaefded3b02e2f50fc287c043c1a7a8c0b26e4e5.jpg",
556
+ "table_caption": [
557
+ "Table 4: Performance on fully-sup. WIKISQL. All results are on execution accuracy without execution-guided decoding. "
558
+ ],
559
+ "table_footnote": [],
560
+ "table_body": "<table><tr><td>Models</td><td>Dev.</td><td>Test</td></tr><tr><td>Global-GNN (Bogin et al.,2019)</td><td>52.7</td><td>47.4</td></tr><tr><td>EditSQL (Zhang et al.,2019b)</td><td>57.6</td><td>53.4</td></tr><tr><td>IRNet (Guo et al.,2019)</td><td>61.9</td><td>54.7</td></tr><tr><td>RYANSQL (Choi et al., 2020)</td><td>70.6</td><td>60.6</td></tr><tr><td>TranX(Yin et al.,2020a)</td><td>64.5</td><td>-</td></tr><tr><td>RAT-SQL (Wang et al.,2019)</td><td>62.7</td><td>57.2</td></tr><tr><td>w.BERT-large</td><td>69.7</td><td>65.6</td></tr><tr><td>w.RoBERTa-large</td><td>69.6</td><td>=</td></tr><tr><td>w.GRAPPA (MLM)</td><td>71.1(+1.4)</td><td></td></tr><tr><td>w.GRAPPA (SSP)</td><td>73.6(+3.9)</td><td>67.7(+2.1)</td></tr><tr><td>W.GRAPPA (MLM+SSP)</td><td>73.4(+3.7)</td><td>69.6(+4.0)</td></tr></table>",
561
+ "bbox": [
562
+ 176,
563
+ 101,
564
+ 509,
565
+ 238
566
+ ],
567
+ "page_idx": 5
568
+ },
569
+ {
570
+ "type": "table",
571
+ "img_path": "images/c8e275f48635839316aa49afda04a4fcf168b00e79d6d7929b7ffbfb4d8e6253.jpg",
572
+ "table_caption": [
573
+ "Table 3: Performance on SPIDER. We run each model three times by varying random seeds, and the average scores are shown. "
574
+ ],
575
+ "table_footnote": [],
576
+ "table_body": "<table><tr><td>Models</td><td>Dev.</td><td>Test</td></tr><tr><td>(Dong&amp;Lapata,2018)</td><td>79.0</td><td>78.5</td></tr><tr><td>(Shi et al.,2018)</td><td>84.0</td><td>83.7</td></tr><tr><td>(Hwang et al.,2019)</td><td>87.2</td><td>86.2</td></tr><tr><td>(He et al., 2019)</td><td>89.5</td><td>88.7</td></tr><tr><td>(Lyu et al.,2020)</td><td>89.1</td><td>89.2</td></tr><tr><td>(Guo&amp;Gao,2019)</td><td>90.3</td><td>89.2</td></tr><tr><td>w.RoBERTa-large</td><td>91.2</td><td>90.6</td></tr><tr><td>w.GRAPPA (MLM)</td><td>91.4</td><td>90.7</td></tr><tr><td>w.GRAPPA (SSP)</td><td>91.2</td><td>90.7</td></tr><tr><td>w.GRAPPA (MLM+SSP)</td><td>91.2</td><td>90.8</td></tr><tr><td>w.RoBERTa-large(10k)</td><td>79.6</td><td>79.2</td></tr><tr><td>w.GRAPPA (MLM+SSP)(10k)</td><td>82.3(+2.7)</td><td>82.2(+3.0)</td></tr></table>",
577
+ "bbox": [
578
+ 526,
579
+ 101,
580
+ 821,
581
+ 233
582
+ ],
583
+ "page_idx": 5
584
+ },
585
+ {
586
+ "type": "text",
587
+ "text": "We used the model proposed by Wang et al. (2019) which is the state-of-the-art parser on this task. This model is a two-stage approach that first predicts a partial “abstract program” and then refines that program while modeling structured alignments with differential dynamic programming. The original model uses GloVe Pennington et al. (2014) as word embeddings. We modified their implementation to encode question and column names in the same way as we do in our fine-tuning method that uses RoBERTa and GRAPPA. ",
588
+ "bbox": [
589
+ 173,
590
+ 319,
591
+ 825,
592
+ 402
593
+ ],
594
+ "page_idx": 5
595
+ },
596
+ {
597
+ "type": "text",
598
+ "text": "Weakly-sup. WIKISQL In the weakly-supervised setting of WIKISQL, only the answers (i.e., execution results of SQL queries) are available. We also employed the model proposed by Wang et al. (2019) as our baseline for this task. We made the same changes and use the same experiment settings as described in the previous section for WIKITABLEQUESTIONS. ",
599
+ "bbox": [
600
+ 174,
601
+ 419,
602
+ 825,
603
+ 474
604
+ ],
605
+ "page_idx": 5
606
+ },
607
+ {
608
+ "type": "text",
609
+ "text": "3.3 IMPLEMENTATION OF GRAPPA ",
610
+ "text_level": 1,
611
+ "bbox": [
612
+ 176,
613
+ 492,
614
+ 423,
615
+ 506
616
+ ],
617
+ "page_idx": 5
618
+ },
619
+ {
620
+ "type": "text",
621
+ "text": "For fine-tuning RoBERTa, we modify the code of RoBERTa implemented by Wolf et al. (2019) and follow the hyperparameters for fine-tuning RoBERTa on RACE tasks and use batch size 24, learning rate $1 e { - } 5$ , and the Adam optimizer Kingma & Ba (2014). We fine-tune GRAPPA for 300k steps on eight 16GB Nvidia V100 GPUs. The pre-training procedure can be done in less than 10 hours. For all downstream experiments using GRAPPA or RoBERTa, we always use a BERT specific optimizer to fine-tune them with a learning rate of 1e-5, while using a model-specific optimizer with the respective learning rate for the rest of the base models. ",
622
+ "bbox": [
623
+ 174,
624
+ 517,
625
+ 825,
626
+ 616
627
+ ],
628
+ "page_idx": 5
629
+ },
630
+ {
631
+ "type": "text",
632
+ "text": "4 EXPERIMENTAL RESULTS ",
633
+ "text_level": 1,
634
+ "bbox": [
635
+ 178,
636
+ 637,
637
+ 418,
638
+ 652
639
+ ],
640
+ "page_idx": 5
641
+ },
642
+ {
643
+ "type": "text",
644
+ "text": "We conducted experiments to answer the following two questions: 1) Can GRAPPA provide better representations for table semantic parsing tasks? 2) What is the benefit of two pre-training objectives, namely MLM and SSP? Since GRAPPA is initialized by RoBERTa, we answer the first question by directly comparing the performance of base parser augmented with GRAPPA and RoBERTa on table semantic parsing tasks. For the second question, we report the performance of GRAPPA trained with MLM, SSP and also a variant with both of them $( \\mathbf { M L M + S S P } )$ . ",
645
+ "bbox": [
646
+ 174,
647
+ 669,
648
+ 825,
649
+ 752
650
+ ],
651
+ "page_idx": 5
652
+ },
653
+ {
654
+ "type": "text",
655
+ "text": "Overall results We report results on the four aforementioned tasks in Tables 3, 4, 5, and 6 respectively. Overall, base models augmented with GRAPPA significantly outperforms the ones with RoBERTa by $3 . 7 \\%$ on SPIDER, $1 . 8 \\%$ on WIKITABLEQUESTIONS, and $2 . 4 \\%$ on weaklysup. WIKISQL, and achieve new state-of-the-art results across all four tasks. In most cases, the combined objective of $\\mathbf { M L M + S S P }$ helps GRAPPA achieve better performance when compared with independently using MLM and SSP. Moreover, on the low-resource setting, GRAPPA outperforms RoBERTa by $3 . 0 \\%$ in fully-sup. WIKISQL and $3 . 9 \\%$ in WIKITABLEQUESTIONS. Detailed results for each task are discussed as follows. ",
656
+ "bbox": [
657
+ 174,
658
+ 768,
659
+ 825,
660
+ 878
661
+ ],
662
+ "page_idx": 5
663
+ },
664
+ {
665
+ "type": "text",
666
+ "text": "SPIDER Results on SPIDER are shown in Table 3. When augmented with GRAPPA, the model achieves significantly better performance compared with the baselines using BERT and RoBERTa. ",
667
+ "bbox": [
668
+ 174,
669
+ 895,
670
+ 823,
671
+ 924
672
+ ],
673
+ "page_idx": 5
674
+ },
675
+ {
676
+ "type": "table",
677
+ "img_path": "images/95cbdfea496e01242f9875eccf5d309d7f26cc03294b6813dae40fda680c72c3.jpg",
678
+ "table_caption": [
679
+ "Table 5: Performance on WIKITABLEQUESTIONS. Results trained on $10 \\%$ of the data are shown at the bottom. "
680
+ ],
681
+ "table_footnote": [],
682
+ "table_body": "<table><tr><td>Models</td><td>Dev.</td><td>Test</td></tr><tr><td>(Liang et al.,2018)</td><td>72.2</td><td>72.1</td></tr><tr><td>(Agarwal et al.,2019)</td><td>74.9</td><td>74.8</td></tr><tr><td>(Min et al., 2019)</td><td>84.4</td><td>83.9</td></tr><tr><td>(Herzig et al.,2020b)</td><td>85.1</td><td>83.6</td></tr><tr><td>(Wang et al.,2019)</td><td>79.4</td><td>79.3</td></tr><tr><td>w.RoBERTa-large</td><td>82.3 (+2.9)</td><td>82.3 (+3.0)</td></tr><tr><td>w.GRAPPA (MLM)</td><td>83.3 (+3.9)</td><td>83.5 (+4.2)</td></tr><tr><td>w.GRAPPA (SSP)</td><td>83.5(+4.1)</td><td>83.7 (+4.4)</td></tr><tr><td>w.GRAPPA (MLM+SSP)</td><td>85.9 (+6.5)</td><td>84.7 (+5.4)</td></tr></table>",
683
+ "bbox": [
684
+ 522,
685
+ 117,
686
+ 825,
687
+ 231
688
+ ],
689
+ "page_idx": 6
690
+ },
691
+ {
692
+ "type": "table",
693
+ "img_path": "images/5051d60ef4201b2839e5e63381c1fa860764b1e67c4b809e666c324bc85f6d2f.jpg",
694
+ "table_caption": [
695
+ "Table 6: Performance on weakly-sup. WIKISQL. We use (Wang et al., 2019) as our base model. "
696
+ ],
697
+ "table_footnote": [],
698
+ "table_body": "<table><tr><td>Models</td><td>Dev.</td><td>Test</td></tr><tr><td>(Liang et al.,2018)</td><td>42.3</td><td>43.1</td></tr><tr><td>(Dasigi et al.,2019)</td><td>42.1</td><td>43.9</td></tr><tr><td>(Agarwal et al.,2019)</td><td>43.2</td><td>44.1</td></tr><tr><td>(Herzig et al.,2020b)</td><td>=</td><td>48.8</td></tr><tr><td>(Yin et al.,2020b)</td><td>52.2</td><td>51.8</td></tr><tr><td>(Wang et al.,2019)</td><td>43.7</td><td>44.5</td></tr><tr><td>w.RoBERTa-large</td><td>50.7(+7.0)</td><td>50.9(+6.4)</td></tr><tr><td>W. GRAPPA (MLM)</td><td>51.5(+7.8)</td><td>51.7(+7.2)</td></tr><tr><td>w.GRAPPA (SSP)</td><td>51.2(+7.5)</td><td>51.1(+6.6)</td></tr><tr><td>w.GRAPPA (MLM+SSP)</td><td>51.9(+8.2)</td><td>52.7(+8.2)</td></tr><tr><td>w.RoBERTa-large×10%</td><td>37.3</td><td>38.1</td></tr><tr><td>w.GRAPPA (MLM+SSP) ×10%</td><td>40.4(+3.1)</td><td>42.0(+3.9)</td></tr></table>",
699
+ "bbox": [
700
+ 176,
701
+ 101,
702
+ 509,
703
+ 247
704
+ ],
705
+ "page_idx": 6
706
+ },
707
+ {
708
+ "type": "text",
709
+ "text": "Our best model, GRAPPA with $\\mathbf { M L M + S S P }$ achieves the new state-of-the-art performance, surpassing previous one (RAT-SQL $^ +$ BERT-large) by a margin of $4 \\%$ . Notably, most previous top systems use pre-trained contextual representations (e.g., BERT, TaBERT), indicating the importance of such representations for the cross-domain parsing task. ",
710
+ "bbox": [
711
+ 174,
712
+ 325,
713
+ 825,
714
+ 382
715
+ ],
716
+ "page_idx": 6
717
+ },
718
+ {
719
+ "type": "text",
720
+ "text": "Fully sup. WIKISQL Results on WIKISQL are shown in Table 4. All GRAPPA models achieve nearly the same performance as RoBERTa. We suspect it is the relatively large training size and easy SQL pattern of WIKISQL make the improvement hard, comparing to SPIDER. Hence, we set up a low-resource setting where we only use $1 0 \\mathrm { k }$ examples from the training data. As shown in the bottom two lines of Table 4, GRAPPA improves the performance of the SQLova model by $3 . 0 \\%$ compared to RoBERTa, indicating that GRAPPA can make the base parser more sample-efficient. ",
721
+ "bbox": [
722
+ 174,
723
+ 397,
724
+ 825,
725
+ 481
726
+ ],
727
+ "page_idx": 6
728
+ },
729
+ {
730
+ "type": "text",
731
+ "text": "WIKITABLEQUESTIONS Results on WIKITABLEQUESTIONS are shown in Table 5. By using RoBERTa and GRAPPA to encode question and column inputs, the performance of Wang et al. (2019) can be boosted significantly $( > 6 \\% )$ . Compared with RoBERTa, our best model with GRAPPA $( \\mathbf { M L M + S S P } )$ can further improve the performance by $1 . 8 \\%$ , leading to a new state-of-the-art performance on this task. Similar to the low-resource experiments for WIKISQL, we also show the performance of the model when trained with only $10 \\%$ of the training data. As shown at the bottom two lines Table 5, GRAPPA $( \\mathbf { M L M } + \\mathbf { S S P } )$ obtains much better performance than RoBERTa, again showing its superiority of providing better representations. ",
732
+ "bbox": [
733
+ 174,
734
+ 496,
735
+ 825,
736
+ 607
737
+ ],
738
+ "page_idx": 6
739
+ },
740
+ {
741
+ "type": "text",
742
+ "text": "Weakly sup. WIKISQL Results on weakly supervised WIKISQL are shown in Table 6. GRAPPA with $\\mathbf { M L M + S S P }$ again achieves the best performance when compared with other baselines, obtain the new state-of-the-art results of $8 4 . 7 \\%$ on this task. It is worth noting that our best model here is also better than many models trained in the fully-supervised setting in Table 4. This suggests that inductive biases injected in pre-trained representation of GRAPPA can significantly help combat the issue of spurious programs introduced by learning from denotations Pasupat & Liang (2015); Wang et al. (2019) when gold programs are not available. ",
743
+ "bbox": [
744
+ 174,
745
+ 622,
746
+ 825,
747
+ 719
748
+ ],
749
+ "page_idx": 6
750
+ },
751
+ {
752
+ "type": "text",
753
+ "text": "5 ANALYSIS ",
754
+ "text_level": 1,
755
+ "bbox": [
756
+ 174,
757
+ 739,
758
+ 290,
759
+ 756
760
+ ],
761
+ "page_idx": 6
762
+ },
763
+ {
764
+ "type": "text",
765
+ "text": "Pre-training objectives GRAPPA trained with both MLM and SSP loss consistently outperforms the one trained with one of them $( \\mathbf { M L M + S S P }$ vs. MLM only or SSP only). GRAPPA (MLM) usually improves the performance by around $1 \\%$ such as $1 . 4 \\%$ gain on SPIDER (dev), $0 . 8 \\%$ on WIKITABLEQUESTIONS, and $1 . 2 \\%$ on weakly-sup. WIKISQL. By pre-training on the synthetic text-to-SQL examples, GRAPPA (SSP), we can see a similar performance gain on these tasks too except $3 . 9 \\%$ improvement on SPIDER dev, which is what we expected (grammar is overfitted to SPIDER). By pre-training with both MLM and SSP on the combined data, GRAPPA $( \\mathbf { M L M + S S P } )$ consistently and significantly outperforms the one pre-trained with MLM or SSP separately (e.g., about $+ 2 \\%$ on Spider, $+ 1 . 5 \\%$ on WikiTableQuestions, and $+ 1 . 2 \\%$ on weakly-sup WikiSQL.). This contributes to our key argument in the paper: in order to effectively inject compositional inductive bias to LM, pre-training on synthetic data should be regularized properly (using $_ { \\mathrm { S S P + M L M } }$ together instead of SSP or MLM only) in order to balance between preserving the original BERT encoding ability and injecting compositional inductive bias, otherwise, the improvements are not robust and limited (using SSP or MLM only). ",
766
+ "bbox": [
767
+ 174,
768
+ 770,
769
+ 825,
770
+ 924
771
+ ],
772
+ "page_idx": 6
773
+ },
774
+ {
775
+ "type": "text",
776
+ "text": "",
777
+ "bbox": [
778
+ 176,
779
+ 103,
780
+ 823,
781
+ 146
782
+ ],
783
+ "page_idx": 7
784
+ },
785
+ {
786
+ "type": "text",
787
+ "text": "Generalization As mentioned in Section 2.2, we design our SCFG solely based on SPIDER, and then sample from it to generate synthetic examples. Despite the fact that GRAPPA pre-trained on such corpus is optimized to the SPIDER data distribution, which is very different from WIKISQL and WIKITABLEQUESTIONS, GRAPPA is still able to improve performance on the two datasets. In particular, for WIKITABLEQUESTIONS where the underlying distribution of programs (not necessarily in the form of SQL) are latent, GRAPPA can still help a parser generalize better, indicating GRAPPA can be beneficial for general table understanding even though it is pre-trained on SQL specific semantics. We believe that incorporating rules from a broader range of datasets (e.g. WIKITABLEQUESTIONS) would further improve the performance. However, in this paper, we study rules from only the SPIDER dataset and test the effectiveness on other unseen datasets with different different underlying rules on purpose in order to show the generality of our method. ",
788
+ "bbox": [
789
+ 174,
790
+ 161,
791
+ 825,
792
+ 315
793
+ ],
794
+ "page_idx": 7
795
+ },
796
+ {
797
+ "type": "text",
798
+ "text": "Even though GRAPPA is pre-trained on synthetic text-to-SQL data, the proposed pre-training method can also be applied to many other semantic parsing tasks with different formal programs (e.g., logic forms); and we also demonstrated the effectness of GRAPPA on non text-to-SQL tasks (weaklysupervised WIKISQL and WIKITABLEQUESTIONS where no programs are used, training is supervised by only answers/cell values) the underlying distribution of programs (not necessarily in the form of SQL) are latent. Furthermore, to design the SCFG and synthesize data with the corresponding programs labeled, we can use any formal programs such as the logic form or SParQL, and then employ the data to pre-train GraPPa. In this paper we choose SQL as the formal program to represent the formal representation of the questions simply because more semantic parsing datasets are labeled in SQL. ",
799
+ "bbox": [
800
+ 174,
801
+ 321,
802
+ 825,
803
+ 462
804
+ ],
805
+ "page_idx": 7
806
+ },
807
+ {
808
+ "type": "text",
809
+ "text": "Pre-training time and data Our experiments on the SPIDER and WIKITABLEQUESTIONS tasks show that longer pre-training doesn’t improve and can even hurt the performance of the pre-trained model. This also indicates that synthetic data should be carefully used in order to balance between preserving the original BERT encoding ability and injecting compositional inductive bias. The best result on SPIDER is achieved by using GRAPPA pre-trained for only 5 epochs on our relatively small pre-training dataset. Compared to other recent pre-training methods for semantic parsing such as TaBERT (Yin et al., 2020a) and TAPAS (Herzig et al., 2020a), GRAPPA achieves the state-of-the-art performance (incorporated with strong base systems) on the four representative table semantic parsing tasks in less 10 hours on only 8 16GB Nvidia V100 GPUs (6 days on more than 100 V100 GPUs and 3 days on 32 TPUs for TaBERT and TAPAS respectively) Moreover, we encourage future work on studying how the size and quality of synthetic data would affect the end task performance. Also, GRAPPA $( \\mathbf { M L M + S S P } )$ ) consistently outperforms other settings, which indicates that using MLM on the human annotated data is important. ",
810
+ "bbox": [
811
+ 174,
812
+ 478,
813
+ 825,
814
+ 657
815
+ ],
816
+ "page_idx": 7
817
+ },
818
+ {
819
+ "type": "text",
820
+ "text": "Pre-training vs. training data augmentation Many recent work (Zhang et al., 2019b; Herzig et al., 2020b; Campagna et al., 2020; Zhong et al., 2020) in semantic parsing and dialog state tracking show that training models on a combination of the extra synthetic data and original training data does not improve or even hurt the performance. For example, (Zhong et al., 2020) synthesize data on training databases in several semantic parsing tasks including SPIDER, and find that training with this data augmentation leads to overfitting on the synthetic data and decreases the performance. In contrast, our pre-training approach could effectively utilize a large amount of synthesized data and improve downstream task performance. Also, the base parser with a GRAPPA encoder could usually converge to a higher performance in shorter time (see Section A.1). ",
821
+ "bbox": [
822
+ 174,
823
+ 675,
824
+ 825,
825
+ 799
826
+ ],
827
+ "page_idx": 7
828
+ },
829
+ {
830
+ "type": "text",
831
+ "text": "6 RELATED WORK ",
832
+ "text_level": 1,
833
+ "bbox": [
834
+ 176,
835
+ 821,
836
+ 344,
837
+ 838
838
+ ],
839
+ "page_idx": 7
840
+ },
841
+ {
842
+ "type": "text",
843
+ "text": "Textual-tabular data understanding Real-world data exist in both structured and unstructured forms. Recently the field has witnessed a surge of interest in joint textual-tabular data understanding problems, such as table semantic parsing (Zhong et al., 2017; Yu et al., 2018b), question answering (Pasupat & Liang, 2015; Chen et al., 2020), retrieval (Zhang et al., 2019a), fact-checking (Chen et al., 2019) and summarization (Parikh et al., 2020; Radev et al., 2020). While most work focus on single tables, often obtained from the Web, some have extended modeling to more complex structures such as relational databases (Finegan-Dollak et al., 2018; Yu et al., 2018b; Wang et al., 2020). All of these tasks can benefit from better representation of the input text and different components of the table, and most importantly, an effective contextualization across the two modalities. Our work aims at obtaining high-quality cross-modal representation via pre-training to potentially benefit all downstream tasks. ",
844
+ "bbox": [
845
+ 174,
846
+ 854,
847
+ 825,
848
+ 922
849
+ ],
850
+ "page_idx": 7
851
+ },
852
+ {
853
+ "type": "text",
854
+ "text": "",
855
+ "bbox": [
856
+ 174,
857
+ 103,
858
+ 825,
859
+ 186
860
+ ],
861
+ "page_idx": 8
862
+ },
863
+ {
864
+ "type": "text",
865
+ "text": "Pre-training for NLP tasks GRAPPA is inspired by recent advances in pre-training for text such as (Devlin et al., 2019; Liu et al., 2019; Lewis et al., 2020b;a; Guu et al., 2020). Seminal work in this area shows that textual representation trained using conditional language modeling objectives significantly improves performance on various downstream NLP tasks. This triggered an exciting line of research work under the themes of (1) cross-modal pre-training that involves text (Lu et al., 2019; Peters et al., 2019; Yin et al., 2020a; Herzig et al., 2020a) and (2) pre-training architectures and objectives catering subsets of NLP tasks (Lewis et al., 2020b;a; Guu et al., 2020). GRAPPA extends these two directions further. The closest work to ours are TaBERT (Yin et al., 2020a) and TAPAS (Herzig et al., 2020a). Both are trained over millions of web tables and relevant but noisy textual context. In comparison, GRAPPA is pre-trained with a novel training objective, over synthetic data plus a much smaller but cleaner collection of text-table datasets. ",
866
+ "bbox": [
867
+ 174,
868
+ 203,
869
+ 825,
870
+ 354
871
+ ],
872
+ "page_idx": 8
873
+ },
874
+ {
875
+ "type": "text",
876
+ "text": "Data augmentation for semantic parsing Our work was inspired by existing work on data augmentation for semantic parsing (Berant & Liang, 2014; Wang et al., 2015a; Jia & Liang, 2016; Iyer et al., 2017; Yu et al., 2018a). Berant & Liang (2014) employed a rule-based approach to generate canonical natural language utterances given a logical form. A paraphrasing model was then used to choose the canonical utterance that best paraphrases the input and to output the corresponding logical form. In contrast, Jia & Liang (2016) used prior knowledge in structural regularities to induce an SCFG and then directly use the grammar to generate more training data, which resulted in a significant improvement on the tasks. Unlike these works which augment a relatively small number of data and use them directly in end task training, we synthesize a large number of texts with SQL logic grounding to each table cheaply and use them for pre-training. ",
877
+ "bbox": [
878
+ 174,
879
+ 371,
880
+ 825,
881
+ 510
882
+ ],
883
+ "page_idx": 8
884
+ },
885
+ {
886
+ "type": "text",
887
+ "text": "7 CONCLUSION AND FUTURE WORK ",
888
+ "text_level": 1,
889
+ "bbox": [
890
+ 176,
891
+ 530,
892
+ 493,
893
+ 545
894
+ ],
895
+ "page_idx": 8
896
+ },
897
+ {
898
+ "type": "text",
899
+ "text": "In this paper, we proposed a novel and effective pre-training approach for table semantic parsing. We developed a context-free grammar to automatically generate a large amount of question-SQL pairs. Then, we introduced GRAPPA, which is an LM that is pre-trained on the synthetic examples with SQL semantic loss. We discovered that, in order to better leverage augmented data, it is important to add MLM loss on a small amount of table related utterances. Results on four semantic parsing tasks demonstrated that GRAPPA significantly outperforms RoBERTa. ",
900
+ "bbox": [
901
+ 174,
902
+ 560,
903
+ 825,
904
+ 645
905
+ ],
906
+ "page_idx": 8
907
+ },
908
+ {
909
+ "type": "text",
910
+ "text": "While the pre-training method is surprisingly effective in its current form, we view these results primarily as an invitation for more future work in this direction. For example, this work relies on a hand-crafted grammar which often generates unnatural questions; Further improvements are likely to be made by applying more sophisticated data augmentation techniques. Also, it would be interesting to study the relative impact of the two objectives (MLM and SSP) by varying the respective number of pre-training examples. Furthermore, pre-training might benefit from synthesizing data from a more compositional grammar with a larger logical form coverage, and also from supervising by a more compositional semantic signals. ",
911
+ "bbox": [
912
+ 174,
913
+ 651,
914
+ 825,
915
+ 763
916
+ ],
917
+ "page_idx": 8
918
+ },
919
+ {
920
+ "type": "text",
921
+ "text": "REFERENCES ",
922
+ "text_level": 1,
923
+ "bbox": [
924
+ 176,
925
+ 784,
926
+ 285,
927
+ 799
928
+ ],
929
+ "page_idx": 8
930
+ },
931
+ {
932
+ "type": "text",
933
+ "text": "Rishabh Agarwal, Chen Liang, Dale Schuurmans, and Mohammad Norouzi. Learning to generalize from sparse and underspecified rewards. In ICML, 2019. ",
934
+ "bbox": [
935
+ 171,
936
+ 806,
937
+ 825,
938
+ 835
939
+ ],
940
+ "page_idx": 8
941
+ },
942
+ {
943
+ "type": "text",
944
+ "text": "Jacob Andreas. Good-enough compositional data augmentation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 7556–7566, Online, July 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.676. ",
945
+ "bbox": [
946
+ 174,
947
+ 843,
948
+ 826,
949
+ 886
950
+ ],
951
+ "page_idx": 8
952
+ },
953
+ {
954
+ "type": "text",
955
+ "text": "Yoav Artzi and Luke Zettlemoyer. Weakly supervised learning of semantic parsers for mapping instructions to actions. Transactions of the Association forComputational Linguistics, 2013. ",
956
+ "bbox": [
957
+ 176,
958
+ 895,
959
+ 820,
960
+ 924
961
+ ],
962
+ "page_idx": 8
963
+ },
964
+ {
965
+ "type": "text",
966
+ "text": "Jimmy Ba, Jamie Ryan Kiros, and Geoffrey E. Hinton. Layer normalization. ArXiv, abs/1607.06450, 2016. ",
967
+ "bbox": [
968
+ 171,
969
+ 103,
970
+ 825,
971
+ 132
972
+ ],
973
+ "page_idx": 9
974
+ },
975
+ {
976
+ "type": "text",
977
+ "text": "Jonathan Berant and Percy Liang. Semantic parsing via paraphrasing. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1415–1425, Baltimore, Maryland, June 2014. Association for Computational Linguistics. ",
978
+ "bbox": [
979
+ 176,
980
+ 141,
981
+ 823,
982
+ 185
983
+ ],
984
+ "page_idx": 9
985
+ },
986
+ {
987
+ "type": "text",
988
+ "text": "Chandra Bhagavatula, Thanapon Noraset, and Doug Downey. Tabel: Entity linking in web tables. In International Semantic Web Conference, 2015. ",
989
+ "bbox": [
990
+ 174,
991
+ 194,
992
+ 821,
993
+ 223
994
+ ],
995
+ "page_idx": 9
996
+ },
997
+ {
998
+ "type": "text",
999
+ "text": "Ben Bogin, Matt Gardner, and Jonathan Berant. Global reasoning over database structures for text-to-sql parsing. ArXiv, abs/1908.11214, 2019. ",
1000
+ "bbox": [
1001
+ 173,
1002
+ 232,
1003
+ 821,
1004
+ 262
1005
+ ],
1006
+ "page_idx": 9
1007
+ },
1008
+ {
1009
+ "type": "text",
1010
+ "text": "Giovanni Campagna, Agata Foryciarz, Mehrad Moradshahi, and Monica S. Lam. Zero-shot transfer learning with synthesized data for multi-domain dialogue state tracking. In Proceedings of 58th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2020. ",
1011
+ "bbox": [
1012
+ 173,
1013
+ 270,
1014
+ 826,
1015
+ 314
1016
+ ],
1017
+ "page_idx": 9
1018
+ },
1019
+ {
1020
+ "type": "text",
1021
+ "text": "Wenhu Chen, Hongmin Wang, Jianshu Chen, Yunkai Zhang, Hong Wang, Shiyang Li, Xiyou Zhou, and William Yang Wang. Tabfact: A large-scale dataset for table-based fact verification. arXiv preprint arXiv:1909.02164, 2019. ",
1022
+ "bbox": [
1023
+ 173,
1024
+ 323,
1025
+ 826,
1026
+ 366
1027
+ ],
1028
+ "page_idx": 9
1029
+ },
1030
+ {
1031
+ "type": "text",
1032
+ "text": "Wenhu Chen, Hanwen Zha, Zhiyu Chen, Wenhan Xiong, Hong Wang, and William Wang. Hybridqa: A dataset of multi-hop question answering over tabular and textual data. arXiv preprint arXiv:2004.07347, 2020. ",
1033
+ "bbox": [
1034
+ 173,
1035
+ 375,
1036
+ 825,
1037
+ 417
1038
+ ],
1039
+ "page_idx": 9
1040
+ },
1041
+ {
1042
+ "type": "text",
1043
+ "text": "Donghyun Choi, Myeong Cheol Shin, Eunggyun Kim, and Dong Ryeol Shin. Ryansql: Recursively applying sketch-based slot fillings for complex text-to-sql in cross-domain databases. ArXiv, abs/2004.03125, 2020. ",
1044
+ "bbox": [
1045
+ 173,
1046
+ 428,
1047
+ 823,
1048
+ 470
1049
+ ],
1050
+ "page_idx": 9
1051
+ },
1052
+ {
1053
+ "type": "text",
1054
+ "text": "Pradeep Dasigi, Matt Gardner, Shikhar Murty, Luke S. Zettlemoyer, and Eduard H. Hovy. Iterative search for weakly supervised semantic parsing. In NAACL-HLT, 2019. ",
1055
+ "bbox": [
1056
+ 171,
1057
+ 479,
1058
+ 823,
1059
+ 510
1060
+ ],
1061
+ "page_idx": 9
1062
+ },
1063
+ {
1064
+ "type": "text",
1065
+ "text": "Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In NAACL-HLT, 2019. ",
1066
+ "bbox": [
1067
+ 169,
1068
+ 517,
1069
+ 823,
1070
+ 547
1071
+ ],
1072
+ "page_idx": 9
1073
+ },
1074
+ {
1075
+ "type": "text",
1076
+ "text": "Li Dong and Mirella Lapata. Coarse-to-fine decoding for neural semantic parsing. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 731–742. Association for Computational Linguistics, 2018. URL http://aclweb. org/anthology/P18-1068. ",
1077
+ "bbox": [
1078
+ 173,
1079
+ 556,
1080
+ 826,
1081
+ 613
1082
+ ],
1083
+ "page_idx": 9
1084
+ },
1085
+ {
1086
+ "type": "text",
1087
+ "text": "Catherine Finegan-Dollak, Jonathan K. Kummerfeld, Li Zhang, Karthik Ramanathan Dhanalakshmi Ramanathan, Sesh Sadasivam, Rui Zhang, and Dragomir Radev. Improving text-to-sql evaluation methodology. In ACL 2018. Association for Computational Linguistics, 2018. ",
1088
+ "bbox": [
1089
+ 173,
1090
+ 622,
1091
+ 826,
1092
+ 666
1093
+ ],
1094
+ "page_idx": 9
1095
+ },
1096
+ {
1097
+ "type": "text",
1098
+ "text": "Jiaqi Guo, Zecheng Zhan, Yan Gao, Yan Xiao, Jian-Guang Lou, Ting Liu, and Dongmei Zhang. Towards complex text-to-sql in cross-domain database with intermediate representation. In ACL, 2019. ",
1099
+ "bbox": [
1100
+ 173,
1101
+ 674,
1102
+ 823,
1103
+ 718
1104
+ ],
1105
+ "page_idx": 9
1106
+ },
1107
+ {
1108
+ "type": "text",
1109
+ "text": "Tong Guo and Huilin Gao. Content enhanced bert-based text-to-sql generation. Technical report, 2019. ",
1110
+ "bbox": [
1111
+ 169,
1112
+ 727,
1113
+ 825,
1114
+ 757
1115
+ ],
1116
+ "page_idx": 9
1117
+ },
1118
+ {
1119
+ "type": "text",
1120
+ "text": "Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Ming-Wei Chang. Realm: Retrievalaugmented language model pre-training. ArXiv, abs/2002.08909, 2020. ",
1121
+ "bbox": [
1122
+ 173,
1123
+ 766,
1124
+ 825,
1125
+ 795
1126
+ ],
1127
+ "page_idx": 9
1128
+ },
1129
+ {
1130
+ "type": "text",
1131
+ "text": "Pengcheng He, Yi Mao, Kaushik Chakrabarti, and Weizhu Chen. X-sql: reinforce schema representation with context. ArXiv, abs/1908.08113, 2019. ",
1132
+ "bbox": [
1133
+ 171,
1134
+ 804,
1135
+ 825,
1136
+ 833
1137
+ ],
1138
+ "page_idx": 9
1139
+ },
1140
+ {
1141
+ "type": "text",
1142
+ "text": "Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out-of-distribution examples in neural networks. ArXiv, abs/1610.02136, 2016. ",
1143
+ "bbox": [
1144
+ 169,
1145
+ 843,
1146
+ 825,
1147
+ 872
1148
+ ],
1149
+ "page_idx": 9
1150
+ },
1151
+ {
1152
+ "type": "text",
1153
+ "text": "Jonathan Herzig and Jonathan Berant. Decoupling structure and lexicon for zero-shot semantic parsing. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 1619–1629. Association for Computational Linguistics, 2018. ",
1154
+ "bbox": [
1155
+ 174,
1156
+ 882,
1157
+ 825,
1158
+ 924
1159
+ ],
1160
+ "page_idx": 9
1161
+ },
1162
+ {
1163
+ "type": "text",
1164
+ "text": "Jonathan Herzig, P. Nowak, Thomas Muller, Francesco Piccinno, and Julian Martin Eisenschlos. ¨ Tapas: Weakly supervised table parsing via pre-training. In ACL, 2020a. ",
1165
+ "bbox": [
1166
+ 171,
1167
+ 103,
1168
+ 825,
1169
+ 132
1170
+ ],
1171
+ "page_idx": 10
1172
+ },
1173
+ {
1174
+ "type": "text",
1175
+ "text": "Jonathan Herzig, Paweł Krzysztof Nowak, Thomas Muller, Francesco Piccinno, and Julian Mar-¨ tin Eisenschlos. Tapas: Weakly supervised table parsing via pre-training. arXiv preprint arXiv:2004.02349, 2020b. ",
1176
+ "bbox": [
1177
+ 173,
1178
+ 143,
1179
+ 826,
1180
+ 186
1181
+ ],
1182
+ "page_idx": 10
1183
+ },
1184
+ {
1185
+ "type": "text",
1186
+ "text": "Wonseok Hwang, Jinyeung Yim, Seunghyun Park, and Minjoon Seo. A comprehensive exploration on wikisql with table-aware word contextualization. ArXiv, abs/1902.01069, 2019. ",
1187
+ "bbox": [
1188
+ 174,
1189
+ 199,
1190
+ 823,
1191
+ 227
1192
+ ],
1193
+ "page_idx": 10
1194
+ },
1195
+ {
1196
+ "type": "text",
1197
+ "text": "Srinivasan Iyer, Ioannis Konstas, Alvin Cheung, Jayant Krishnamurthy, and Luke Zettlemoyer. Learning a neural semantic parser from user feedback. CoRR, abs/1704.08760, 2017. ",
1198
+ "bbox": [
1199
+ 173,
1200
+ 239,
1201
+ 825,
1202
+ 268
1203
+ ],
1204
+ "page_idx": 10
1205
+ },
1206
+ {
1207
+ "type": "text",
1208
+ "text": "Robin Jia and Percy Liang. Data recombination for neural semantic parsing. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2016. ",
1209
+ "bbox": [
1210
+ 174,
1211
+ 280,
1212
+ 826,
1213
+ 323
1214
+ ],
1215
+ "page_idx": 10
1216
+ },
1217
+ {
1218
+ "type": "text",
1219
+ "text": "Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. ",
1220
+ "bbox": [
1221
+ 173,
1222
+ 335,
1223
+ 823,
1224
+ 363
1225
+ ],
1226
+ "page_idx": 10
1227
+ },
1228
+ {
1229
+ "type": "text",
1230
+ "text": "Mike Lewis, Marjan Ghazvininejad, Gargi Ghosh, Armen Aghajanyan, Sida Wang, and Luke Zettlemoyer. Pre-training via paraphrasing. arXiv preprint arXiv:2006.15020, 2020a. ",
1231
+ "bbox": [
1232
+ 173,
1233
+ 375,
1234
+ 823,
1235
+ 405
1236
+ ],
1237
+ "page_idx": 10
1238
+ },
1239
+ {
1240
+ "type": "text",
1241
+ "text": "Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. BART: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 7871–7880, Online, July 2020b. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.703. URL https://www.aclweb.org/anthology/2020.acl-main.703. ",
1242
+ "bbox": [
1243
+ 173,
1244
+ 416,
1245
+ 826,
1246
+ 501
1247
+ ],
1248
+ "page_idx": 10
1249
+ },
1250
+ {
1251
+ "type": "text",
1252
+ "text": "Fei Li and HV Jagadish. Constructing an interactive natural language interface for relational databases. VLDB, 2014. ",
1253
+ "bbox": [
1254
+ 173,
1255
+ 512,
1256
+ 823,
1257
+ 541
1258
+ ],
1259
+ "page_idx": 10
1260
+ },
1261
+ {
1262
+ "type": "text",
1263
+ "text": "Chen Liang, Mohammad Norouzi, Jonathan Berant, Quoc V. Le, and Ni Lao. Memory augmented policy optimization for program synthesis and semantic parsing. In NeurIPS, 2018. ",
1264
+ "bbox": [
1265
+ 171,
1266
+ 553,
1267
+ 823,
1268
+ 583
1269
+ ],
1270
+ "page_idx": 10
1271
+ },
1272
+ {
1273
+ "type": "text",
1274
+ "text": "Xi Victoria Lin, Richard Socher, and Caiming Xiong. Bridging textual and tabular data for crossdomain text-to-sql semantic parsing. In Findings of the 2020 Conference on Empirical Methods in Natural Language Processing, EMNLP Findings 2020, November 16th-20th, 2020, 2020. ",
1275
+ "bbox": [
1276
+ 174,
1277
+ 593,
1278
+ 826,
1279
+ 637
1280
+ ],
1281
+ "page_idx": 10
1282
+ },
1283
+ {
1284
+ "type": "text",
1285
+ "text": "Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke S. Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. ArXiv, abs/1907.11692, 2019. ",
1286
+ "bbox": [
1287
+ 174,
1288
+ 648,
1289
+ 826,
1290
+ 691
1291
+ ],
1292
+ "page_idx": 10
1293
+ },
1294
+ {
1295
+ "type": "text",
1296
+ "text": "Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. Vilbert: Pretraining task-agnostic visiolinguistic representations for vision-and-language tasks. In Hanna M. Wallach, Hugo Larochelle, Alina Beygelzimer, Florence d’Alche-Buc, Emily B. Fox, and Roman Garnett (eds.), ´ Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, 8-14 December 2019, Vancouver, BC, Canada, pp. 13–23, 2019. ",
1297
+ "bbox": [
1298
+ 173,
1299
+ 704,
1300
+ 825,
1301
+ 773
1302
+ ],
1303
+ "page_idx": 10
1304
+ },
1305
+ {
1306
+ "type": "text",
1307
+ "text": "Qin Lyu, Kaushik Chakrabarti, Shobhit Hathi, Souvik Kundu, Jianwen Zhang, and Zheng Chen. Hybrid ranking network for text-to-sql. Technical Report MSR-TR-2020-7, Microsoft Dynamics 365 AI, March 2020. ",
1308
+ "bbox": [
1309
+ 174,
1310
+ 786,
1311
+ 825,
1312
+ 828
1313
+ ],
1314
+ "page_idx": 10
1315
+ },
1316
+ {
1317
+ "type": "text",
1318
+ "text": "Sewon Min, Danqi Chen, Hannaneh Hajishirzi, and Luke Zettlemoyer. A discrete hard em approach for weakly supervised question answering. In EMNLP, 2019. ",
1319
+ "bbox": [
1320
+ 169,
1321
+ 840,
1322
+ 823,
1323
+ 869
1324
+ ],
1325
+ "page_idx": 10
1326
+ },
1327
+ {
1328
+ "type": "text",
1329
+ "text": "Ankur P Parikh, Xuezhi Wang, Sebastian Gehrmann, Manaal Faruqui, Bhuwan Dhingra, Diyi Yang, and Dipanjan Das. Totto: A controlled table-to-text generation dataset. arXiv preprint arXiv:2004.14373, 2020. ",
1330
+ "bbox": [
1331
+ 176,
1332
+ 881,
1333
+ 825,
1334
+ 924
1335
+ ],
1336
+ "page_idx": 10
1337
+ },
1338
+ {
1339
+ "type": "text",
1340
+ "text": "Panupong Pasupat and Percy Liang. Compositional semantic parsing on semi-structured tables. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing of the Asian Federation of Natural Language Processing, ACL 2015, July 26-31, 2015, Beijing, China, Volume 1: Long Papers, pp. 1470–1480, 2015. ",
1341
+ "bbox": [
1342
+ 174,
1343
+ 103,
1344
+ 825,
1345
+ 174
1346
+ ],
1347
+ "page_idx": 11
1348
+ },
1349
+ {
1350
+ "type": "text",
1351
+ "text": "Jeffrey Pennington, Richard Socher, and Christopher D. Manning. Glove: Global vectors for word representation. In EMNLP, pp. 1532–1543. ACL, 2014. ",
1352
+ "bbox": [
1353
+ 169,
1354
+ 181,
1355
+ 823,
1356
+ 210
1357
+ ],
1358
+ "page_idx": 11
1359
+ },
1360
+ {
1361
+ "type": "text",
1362
+ "text": "Matthew E. Peters, Mark Neumann, Robert Logan, Roy Schwartz, Vidur Joshi, Sameer Singh, and Noah A. Smith. Knowledge enhanced contextual word representations. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 43–54, Hong Kong, China, November 2019. Association for Computational Linguistics. doi: 10.18653/v1/D19-1005. URL https://www.aclweb.org/anthology/D19-1005. ",
1363
+ "bbox": [
1364
+ 174,
1365
+ 218,
1366
+ 826,
1367
+ 301
1368
+ ],
1369
+ "page_idx": 11
1370
+ },
1371
+ {
1372
+ "type": "text",
1373
+ "text": "Dragomir Radev, Rui Zhang, Amrit Rau, Abhinand Sivaprasad, Chiachun Hsieh, Nazneen Fatema Rajani, Xiangru Tang, Aadit Vyas, Neha Verma, Pranav Krishna, Yangxiaokang Liu, Nadia Irwanto, Jessica Pan, Faiaz Rahman, Ahmad Zaidi, Murori Mutuma, Yasin Tarabar, Ankit Gupta, Tao Yu, Yi Chern Tan, Xi Victoria Lin, Caiming Xiong, and Richard Socher. Dart: Open-domain structured data record to text generation. arXiv preprint arXiv:2007.02871, 2020. ",
1374
+ "bbox": [
1375
+ 173,
1376
+ 309,
1377
+ 825,
1378
+ 380
1379
+ ],
1380
+ "page_idx": 11
1381
+ },
1382
+ {
1383
+ "type": "text",
1384
+ "text": "Tianze Shi, Kedar Tatwawadi, Kaushik Chakrabarti, Yi Mao, Oleksandr Polozov, and Weizhu Chen. Incsql: Training incremental text-to-sql parsers with non-deterministic oracles. arXiv preprint arXiv:1809.05054, 2018. ",
1385
+ "bbox": [
1386
+ 174,
1387
+ 387,
1388
+ 825,
1389
+ 430
1390
+ ],
1391
+ "page_idx": 11
1392
+ },
1393
+ {
1394
+ "type": "text",
1395
+ "text": "Bailin Wang, Ivan Titov, and Mirella Lapata. Learning semantic parsers from denotations with latent structured alignments and abstract programs. In Proceedings of EMNLP, 2019. ",
1396
+ "bbox": [
1397
+ 171,
1398
+ 438,
1399
+ 821,
1400
+ 467
1401
+ ],
1402
+ "page_idx": 11
1403
+ },
1404
+ {
1405
+ "type": "text",
1406
+ "text": "Bailin Wang, Richard Shin, Xiaodong Liu, Oleksandr Polozov, and Matthew Richardson. RAT-SQL: Relation-aware schema encoding and linking for text-to-SQL parsers. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 7567–7578, Online, July 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.677. URL https://www.aclweb.org/anthology/2020.acl-main.677. ",
1407
+ "bbox": [
1408
+ 173,
1409
+ 474,
1410
+ 826,
1411
+ 545
1412
+ ],
1413
+ "page_idx": 11
1414
+ },
1415
+ {
1416
+ "type": "text",
1417
+ "text": "Yushi Wang, Jonathan Berant, and Percy Liang. Building a semantic parser overnight. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 1332–1342, Beijing, China, July 2015a. Association for Computational Linguistics. doi: 10.3115/v1/P15-1129. URL https://www.aclweb.org/anthology/P15-1129. ",
1418
+ "bbox": [
1419
+ 174,
1420
+ 551,
1421
+ 826,
1422
+ 623
1423
+ ],
1424
+ "page_idx": 11
1425
+ },
1426
+ {
1427
+ "type": "text",
1428
+ "text": "Yushi Wang, Jonathan Berant, Percy Liang, et al. Building a semantic parser overnight. In ACL (1), pp. 1332–1342, 2015b. ",
1429
+ "bbox": [
1430
+ 173,
1431
+ 630,
1432
+ 825,
1433
+ 659
1434
+ ],
1435
+ "page_idx": 11
1436
+ },
1437
+ {
1438
+ "type": "text",
1439
+ "text": "Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, R’emi Louf, Morgan Funtowicz, and Jamie Brew. Huggingface’s transformers: State-of-the-art natural language processing. ArXiv, abs/1910.03771, 2019. ",
1440
+ "bbox": [
1441
+ 176,
1442
+ 666,
1443
+ 825,
1444
+ 709
1445
+ ],
1446
+ "page_idx": 11
1447
+ },
1448
+ {
1449
+ "type": "text",
1450
+ "text": "Pengcheng Yin, Graham Neubig, Wen-tau Yih, and Sebastian Riedel. TaBERT: Pretraining for joint understanding of textual and tabular data. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 8413–8426, Online, July 2020a. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.745. ",
1451
+ "bbox": [
1452
+ 173,
1453
+ 717,
1454
+ 825,
1455
+ 773
1456
+ ],
1457
+ "page_idx": 11
1458
+ },
1459
+ {
1460
+ "type": "text",
1461
+ "text": "Pengcheng Yin, Graham Neubig, Wen-tau Yih, and Sebastian Riedel. Tabert: Pretraining for joint understanding of textual and tabular data. arXiv preprint arXiv:2005.08314, 2020b. ",
1462
+ "bbox": [
1463
+ 169,
1464
+ 780,
1465
+ 823,
1466
+ 810
1467
+ ],
1468
+ "page_idx": 11
1469
+ },
1470
+ {
1471
+ "type": "text",
1472
+ "text": "Tao Yu, Michihiro Yasunaga, Kai Yang, Rui Zhang, Dongxu Wang, Zifan Li, and Dragomir Radev. Syntaxsqlnet: Syntax tree networks for complex and cross-domain text-to-sql task. In Proceedings of EMNLP. Association for Computational Linguistics, 2018a. ",
1473
+ "bbox": [
1474
+ 173,
1475
+ 816,
1476
+ 823,
1477
+ 859
1478
+ ],
1479
+ "page_idx": 11
1480
+ },
1481
+ {
1482
+ "type": "text",
1483
+ "text": "Tao Yu, Rui Zhang, Kai Yang, Michihiro Yasunaga, Dongxu Wang, Zifan Li, James Ma, Irene Li, Qingning Yao, Shanelle Roman, Zilin Zhang, and Dragomir Radev. Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-sql task. In EMNLP, 2018b. ",
1484
+ "bbox": [
1485
+ 174,
1486
+ 867,
1487
+ 825,
1488
+ 922
1489
+ ],
1490
+ "page_idx": 11
1491
+ },
1492
+ {
1493
+ "type": "text",
1494
+ "text": "Luke S. Zettlemoyer and Michael Collins. Learning to map sentences to logical form: Structured classification with probabilistic categorial grammars. UAI, 2005. ",
1495
+ "bbox": [
1496
+ 171,
1497
+ 103,
1498
+ 825,
1499
+ 132
1500
+ ],
1501
+ "page_idx": 12
1502
+ },
1503
+ {
1504
+ "type": "text",
1505
+ "text": "Li Zhang, Shuo Zhang, and Krisztian Balog. Table2vec: Neural word and entity embeddings for table population and retrieval. In Proceedings of the 42Nd International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR’19, pp. 1029–1032, New York, NY, USA, 2019a. ACM. ",
1506
+ "bbox": [
1507
+ 174,
1508
+ 138,
1509
+ 825,
1510
+ 195
1511
+ ],
1512
+ "page_idx": 12
1513
+ },
1514
+ {
1515
+ "type": "text",
1516
+ "text": "Rui Zhang, Tao Yu, He Yang Er, Sungrok Shim, Eric Xue, Xi Victoria Lin, Tianze Shi, Caiming Xiong, Richard Socher, and Dragomir Radev. Editing-based sql query generation for cross-domain context-dependent questions. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and 9th International Joint Conference on Natural Language Processing. Association for Computational Linguistics, 2019b. ",
1517
+ "bbox": [
1518
+ 173,
1519
+ 203,
1520
+ 825,
1521
+ 273
1522
+ ],
1523
+ "page_idx": 12
1524
+ },
1525
+ {
1526
+ "type": "text",
1527
+ "text": "Victor Zhong, Caiming Xiong, and Richard Socher. Seq2sql: Generating structured queries from natural language using reinforcement learning. CoRR, abs/1709.00103, 2017. ",
1528
+ "bbox": [
1529
+ 171,
1530
+ 281,
1531
+ 823,
1532
+ 310
1533
+ ],
1534
+ "page_idx": 12
1535
+ },
1536
+ {
1537
+ "type": "text",
1538
+ "text": "Victor Zhong, M. Lewis, Sida I. Wang, and Luke Zettlemoyer. Grounded adaptation for zero-shot executable semantic parsing. The 2020 Conference on Empirical Methods in Natural Language Processing, 2020. ",
1539
+ "bbox": [
1540
+ 174,
1541
+ 318,
1542
+ 823,
1543
+ 359
1544
+ ],
1545
+ "page_idx": 12
1546
+ },
1547
+ {
1548
+ "type": "text",
1549
+ "text": "A APPENDICES ",
1550
+ "text_level": 1,
1551
+ "bbox": [
1552
+ 176,
1553
+ 385,
1554
+ 318,
1555
+ 400
1556
+ ],
1557
+ "page_idx": 12
1558
+ },
1559
+ {
1560
+ "type": "table",
1561
+ "img_path": "images/f2d7c5fd79f631246a2c8e492ae703cdd9cb934d41bac190e4e6be922822dcd3.jpg",
1562
+ "table_caption": [
1563
+ "Table 7: Examples of the inputs and annotations for four semantic parsing tasks. SPIDER and Fully-sup. WIKISQL require full annotation of SQL programs, whereas WIKITABLEQUESTIONS and Weakly-sup. WIKISQL only requires annotation of answers (or denotations) of questions. "
1564
+ ],
1565
+ "table_footnote": [],
1566
+ "table_body": "<table><tr><td>Task</td><td>Question</td><td>Table/Database</td><td>Annotation</td></tr><tr><td>SPIDER</td><td>Find the first and last names of the stu- dents who are living in the dorms that have a TV Lounge as an amenity.</td><td>database with5 tables e.g.student, dorm_amenity,..</td><td>SELECT T1.FNAME,T1.LNAME FROM STUDENT AS T1 JOIN LIVES-IN AS T2 ON T1.STUID=T2.STUID WHERE T2.DORMID IN(SELECT T3.DORMID FROM HAS_AMENITY AS T3 JOIN DORM_AMENITY AS T4 ON T3.AMENID=T4.AMENID WHERE T4.AMENITY-NAME=&#x27;TV LOUNGE&#x27;)</td></tr><tr><td>Fully-sup.WIKISQL</td><td>How many CFL teamsare from York Col- lege?</td><td>a table with5 columns e.g.player,position,..</td><td>SELECT COUNT CFL TEAM FROM CFLDRAFT WHERE COLLEGE =YORK&#x27;</td></tr><tr><td>WIKITABLEQUESTIONS</td><td>In what city did Piotr&#x27;s last 1st place finish occur?</td><td>a table with 6 columns e.g. year,event,..</td><td>“Bangkok,Thailand”</td></tr><tr><td>Weakly-sup. WIKISQL</td><td>How many CFL teams are from York Col- lege?</td><td>a table with 5 columns e.g. player,position..</td><td>2</td></tr></table>",
1567
+ "bbox": [
1568
+ 176,
1569
+ 416,
1570
+ 916,
1571
+ 535
1572
+ ],
1573
+ "page_idx": 12
1574
+ },
1575
+ {
1576
+ "type": "table",
1577
+ "img_path": "images/8b47b8cf7d55360c699bd417e1cd9a5179c0bc3ab6b1be7d8623819026c332ed.jpg",
1578
+ "table_caption": [
1579
+ "Table 8: Aggregated datasets for table-and-language tasks. "
1580
+ ],
1581
+ "table_footnote": [],
1582
+ "table_body": "<table><tr><td></td><td>Train Size</td><td># Table</td><td>Task</td></tr><tr><td>TabFact</td><td>92.2K</td><td>16K</td><td>Table-based fact verification</td></tr><tr><td>LogicNLG</td><td>28.5K</td><td>7.3K</td><td>Table-to-text generation</td></tr><tr><td>HybridQA</td><td>63.2K</td><td>13K</td><td>Multi-hop question answering</td></tr><tr><td>WikiSQL</td><td>61.3K</td><td>24K</td><td>Text-to-SQL generation</td></tr><tr><td>WikiTableQuestions</td><td>17.6K</td><td>2.1K</td><td>Question answering</td></tr><tr><td>ToTTo</td><td>120K</td><td>83K</td><td>Table-to-text generation</td></tr><tr><td>Spider</td><td>8.7K</td><td>1K</td><td>Text-to-SQL generation</td></tr></table>",
1583
+ "bbox": [
1584
+ 289,
1585
+ 606,
1586
+ 709,
1587
+ 707
1588
+ ],
1589
+ "page_idx": 12
1590
+ },
1591
+ {
1592
+ "type": "text",
1593
+ "text": "A.1 ADDITIONAL ANALYSIS ",
1594
+ "text_level": 1,
1595
+ "bbox": [
1596
+ 174,
1597
+ 757,
1598
+ 385,
1599
+ 771
1600
+ ],
1601
+ "page_idx": 12
1602
+ },
1603
+ {
1604
+ "type": "text",
1605
+ "text": "Training coverage As shown in Figure 2, on the challenging end text-to-SQL SPIDER task, RATSQL initialized with GRAPPA outperforms RAT-SQL using RoBERTa by about $14 \\%$ in the early training stage. This shows that GRAPPA already captures some semantic knowledge in pre-training. Finally, GRAPPA is able to keep the competitive edge by $4 \\%$ . ",
1606
+ "bbox": [
1607
+ 174,
1608
+ 782,
1609
+ 825,
1610
+ 839
1611
+ ],
1612
+ "page_idx": 12
1613
+ },
1614
+ {
1615
+ "type": "text",
1616
+ "text": "What if the task-specific training data is also used with the MLM or SSP objective in pretraining? Although we did not do the same experiments, we would like to point to the RAT-SQL paper (Wang et al., 2020) for some suggestions. They add a similar alignment loss (similar to SSP) on the SPIDER training data and found that it doesn’t make a statistically significant difference (in Appendix B). ",
1617
+ "bbox": [
1618
+ 174,
1619
+ 854,
1620
+ 825,
1621
+ 924
1622
+ ],
1623
+ "page_idx": 12
1624
+ },
1625
+ {
1626
+ "type": "image",
1627
+ "img_path": "images/ee8956e534993ddac452716926e56c75e8f91fec168e94a17696cb998b68772c.jpg",
1628
+ "image_caption": [
1629
+ "Figure 2: The development exact set match score in SPIDER vs. the number of training steps. RAT-SQL initialized with our pre-trained GRAPPA converges to higher scores in a shorter time than RAT-SQL $w$ . BERT. "
1630
+ ],
1631
+ "image_footnote": [],
1632
+ "bbox": [
1633
+ 359,
1634
+ 420,
1635
+ 625,
1636
+ 556
1637
+ ],
1638
+ "page_idx": 13
1639
+ },
1640
+ {
1641
+ "type": "image",
1642
+ "img_path": "images/0992f2358df5a0fe1f6f7c7ff375ffaa4afca401695dabc3591f91a997c4feff.jpg",
1643
+ "image_caption": [
1644
+ "(a) RoBERTa-large "
1645
+ ],
1646
+ "image_footnote": [],
1647
+ "bbox": [
1648
+ 196,
1649
+ 142,
1650
+ 800,
1651
+ 472
1652
+ ],
1653
+ "page_idx": 14
1654
+ },
1655
+ {
1656
+ "type": "image",
1657
+ "img_path": "images/834df63872fbfafd2ae0f062c02cf844610cbb1935af370e9f8c2f504c55aa77.jpg",
1658
+ "image_caption": [
1659
+ "Figure 3: Attention visualization on the last self-attention layer. "
1660
+ ],
1661
+ "image_footnote": [],
1662
+ "bbox": [
1663
+ 196,
1664
+ 507,
1665
+ 799,
1666
+ 856
1667
+ ],
1668
+ "page_idx": 14
1669
+ },
1670
+ {
1671
+ "type": "image",
1672
+ "img_path": "images/a048f102ee18fdf5dad90b07e6df485cced58cda58d210f0780a7bf19d5420af.jpg",
1673
+ "image_caption": [
1674
+ "Figure 4: Attention visualization on the last self-attention layer. "
1675
+ ],
1676
+ "image_footnote": [],
1677
+ "bbox": [
1678
+ 178,
1679
+ 272,
1680
+ 826,
1681
+ 724
1682
+ ],
1683
+ "page_idx": 15
1684
+ }
1685
+ ]
parse/train/kyaIeYj4zZ/kyaIeYj4zZ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/kyaIeYj4zZ/kyaIeYj4zZ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/r1dHXnH6-/r1dHXnH6-.md ADDED
@@ -0,0 +1,304 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # NATURAL LANGUAGE INFERENCE OVER INTERACTION SPACE
2
+
3
+ Yichen $\mathbf { G o n g ^ { \dag \ddag } }$ , Heng $\mathbf { L u o } ^ { \ddagger }$ , Jian Zhang‡
4
+ † New York University, New York, USA
5
+ ‡ Horizon Robotics, Inc., Beijing, China
6
+ yichen.gong@nyu.edu, {heng.luo, jian.zhang}@hobot.cc
7
+
8
+ # ABSTRACT
9
+
10
+ Natural Language Inference (NLI) task requires an agent to determine the logical relationship between a natural language premise and a natural language hypothesis. We introduce Interactive Inference Network (IIN), a novel class of neural network architectures that is able to achieve high-level understanding of the sentence pair by hierarchically extracting semantic features from interaction space. We show that an interaction tensor (attention weight) contains semantic information to solve natural language inference, and a denser interaction tensor contains richer semantic information. One instance of such architecture, Densely Interactive Inference Network (DIIN), demonstrates the state-of-the-art performance on large scale NLI copora and large-scale NLI alike corpus. It’s noteworthy that DIIN achieve a greater than $20 \%$ error reduction on the challenging Multi-Genre NLI (MultiNLI; Williams et al. 2017) dataset with respect to the strongest published system.
11
+
12
+ # 1 INTRODUCTION
13
+
14
+ Natural Language Inference (NLI also known as recognizing textual entiailment, or RTE) task requires one to determine whether the logical relationship between two sentences is among entailment (if the premise is true, then the hypothesis must be true), contradiction (if the premise is true, then the hypothesis must be false) and neutral (neither entailment nor contradiction). NLI is known as a fundamental and yet challenging task for natural language understanding(Williams et al., 2017), not only because it requires one to identify the language pattern, but also to understand certain common sense knowledge. In Table 1, three samples from MultiNLI corpus show solving the task requires one to handle the full complexity of lexical and compositional semantics. The previous work on NLI (or RTE) has extensively researched on conventional approaches(Fyodorov et al., 2000; Bos & Markert, 2005; MacCartney & Manning, 2009). Recent progress on NLI is enabled by the availability of 570k human annotated dataset(Bowman et al., 2015) and the advancement of representation learning technique.
15
+
16
+ Among the core representation learning techniques, attention mechanism is broadly applied in many NLU tasks since its introduction: machine translation(Bahdanau et al., 2014), abstractive summarization(Rush et al., 2015), Reading Comprehension(Hermann et al., 2015), dialog system(Mei et al., 2016), etc. As described by Vaswani et al. (2017), “An attention function can be described as mapping a query and a set of key-value pairs to an output, where the query, keys, values, and output are all vectors. The output is computed as a weighted sum of the values, where the weight assigned to each value is computed by a compatibility function of the query with the corresponding key”. Attention mechanism is known for its alignment between representations, focusing one part of representation over another, and modeling the dependency regardless of sequence length. Observing attention’s powerful capability, we hypothesize that the attention weight can assist with machine to understanding the text.
17
+
18
+ A regular attention weight, the core component of the attention mechanism, encodes the crosssentence word relationship into a alignment matrix. However, a multi-head attention weightVaswani et al. (2017) can encode such interaction into multiple alignment matrices, which shows a more powerful alignment. In this work, we push the multi-head attention to a extreme by building a word
19
+
20
+ <table><tr><td>Premise: The FCC has created two tiers of small business for this service with the approval of the SBA. Hypothesis: The SBA has given the go-ahead for the FCC to divide this service into</td></tr><tr><td>two tiers of small business. Label: entailment</td></tr><tr><td>Premise:He was crying like his mother had just walloped him.</td></tr><tr><td>Hypothesis:He was crying like his mother hit him with a spoon. Label: Neutral</td></tr><tr><td></td></tr><tr><td>Premise:Later, Tom testified against John so as to avoid the electric chair. Hypothesis: Tom refused to turn on his friend, even though he was slated to be executed. Label: Contradiction</td></tr></table>
21
+
22
+ Table 1: Samples from MultiNLI datasets.
23
+
24
+ by-word dimension-wise alignment tensor which we call interaction tensor. The interaction tensor encodes the high-order alignment relationship between sentences pair. Our experiments demonstrate that by capturing the rich semantic features in the interaction tensor, we are able to solve natural language inference task well, especially in cases with paraphrase, antonyms and overlapping words.
25
+
26
+ We dub the general framework as Interactive Inference Network(IIN). To the best of our knowledge, it is the first attempt to solve natural language inference task in the interaction space. We further explore one instance of Interactive Inference Network, Densely Interactive Inference Network (DIIN), which achieves new state-of-the-art performance on both SNLI and MultiNLI copora. To test the generality of the architecture, we interpret the paraphrase identification task as natural language inference task where matching as entailment, not-matching as neutral. We test the model on Quora Question Pair dataset, which contains over $4 0 0 \mathrm { k }$ real world question pair, and achieves new state-of-the-art performance.
27
+
28
+ We introduce the related work in Section 2, and discuss the general framework of IIN along with a specific instance that enjoys state-of-the-art performance on multiple datasets in Section 3. We describe experiments and analysis in Section 4. Finally, we conclude and discuss future work in Section 5.
29
+
30
+ # 2 RELATED WORK
31
+
32
+ The early exploration on NLI mainly rely on conventional methods and small scale datasets(Marelli et al., 2014). The availability of SNLI dataset with 570k human annotated sentence pairs has enabled a good deal of progress on natural language understanding. The essential representation learning techniques for NLU such as attention(Wang & Jiang, 2015), memory(Munkhdalai & Yu, 2016) and the use of parse structure(Bowman et al., 2016; Mou et al., 2015) are studied on the SNLI which serves as an important benchmark for sentence understanding. The models trained on NLI task can be divided into two categories: (i) sentence encoding-based model which aims to find vector representation for each sentence and classifies the relation by using the concatenation of two vector representation along with their absolute element-wise difference and element-wise product(Bowman et al., 2016; Vendrov et al., 2015; Mou et al., 2015; Liu et al., 2016; Munkhdalai & Yu, 2016). (ii) Joint feature models which use the cross sentence feature or attention from one sentence to another(Rocktaschel et al., 2015; Wang & Jiang, 2015; Cheng et al., 2016; Parikh et al., 2016; Wang ¨ et al., 2017; Yu & Munkhdalai, 2017; Sha et al., 2016).
33
+
34
+ After neural attention mechanism is successfully applied on the machine translation task, such technique has became widely used in both natural language process and computer vision domains. Many variants of attention technique such as hard-attention( $\mathrm { X u }$ et al., 2015), self-attention(Parikh et al., 2016), multi-hop attention(Gong & Bowman, 2017), bidirectional attention(Seo et al., 2016) and multi-head attention(Vaswani et al., 2017) are also introduced to tackle more complicated tasks. Before this work, neural attention mechanism is mainly used to make alignment, focusing on specific part of the representation. In this work, we want to show that attention weight contains rich semantic information required for understanding the logical relationship between sentence pair.
35
+
36
+ Though RNN or LSTM are very good for variable length sequence modeling, using Convolutional neural network in NLU tasks is very desirable because of its parallelism in computation. Convolutional structure has been successfully applied in various domain such as machine translation(Gehring et al., 2017), sentence classification(Kim, 2014), text matching(Hu et al., 2014) and sentiment analysis(Kalchbrenner et al., 2014), etc. The convolution structure is also applied on different level of granularity such as byte(Zhang & LeCun, 2017), character(Zhang et al., 2015), word(Gehring et al., 2017) and sentences(Mou et al., 2015) levels.
37
+
38
+ # 3 MODEL
39
+
40
+ # 3.1 INTERACTIVE INFERENCE NETWORK
41
+
42
+ The Interactive Inference Network (IIN) is a hierarchical multi-stage process and consists of five components. Each of the components is compatible with different type of implementations. Potentially all exiting approaches in machine learning, such as decision tree, support vector machine and neural network approach, can be transfer to replace certain component in this architecture. We focus on neural network approaches below. Figure 1 provides a visual illustration of Interactive Inference Network.
43
+
44
+ ![](images/f026b3eeb58c962dceaac514df7e979aa76dd32f1fd57491e94ada1298f1db43.jpg)
45
+ Figure 1: A visual illustration of Interactive Inference Network (IIN).
46
+
47
+ 1. Embedding Layer converts each word or phrase to a vector representation and construct the representation matrix for sentences. In embedding layer, a model can map tokens to vectors with the pre-trained word representation such as GloVe(Pennington et al., 2014), word2Vec(Mikolov et al., 2013) and fasttext(Joulin et al., 2016). It can also utilize the preprocessing tool, e.g. named entity recognizer, part-of-speech recognizer, lexical parser and coreference identifier etc., to incorporate more lexical and syntactical information into the feature vector.
48
+
49
+ 2. Encoding Layer encodes the representations by incorporating the context information or enriching the representation with desirable features for future use. For instance, a model can adopt bidirectional recurrent neural network to model the temporal interaction on both direction, recursive neural network(Socher et al., 2011) (also known as TreeRNN) to model the compositionality and the recursive structure of language, or self-attention to model the long-term dependency on sentence. Different components of encoder can be combined to obtain a better sentence matrix representation.
50
+
51
+ 3. Interaction Layer creates an word-by-word interaction tensor by both premise and hypothesis representation matrix. The interaction can be modeled in different ways. A common approach is to compute the cosine similarity or dot product between each pair of feature vector. On the other hand, a high-order interaction tensor can be constructed with the outer product between two matrix representations.
52
+
53
+ 4. Feature Extraction Layer adopts feature extractor to extract the semantic feature from interaction tensor. The convolutional feature extractors, such as AlexNet(Krizhevsky et al., 2012), VGG(Simonyan & Zisserman, 2014), Inception(Szegedy et al., 2014), ResNet(He et al., 2016) and DenseNet(Huang et al., 2016), proven work well on image recognition are completely compatible under such architecture. Unlike the work (Kim, 2014; Zhang et al., 2015) who employs 1-D sliding window, our CNN architecture allows 2-D kernel to extract semantic interaction feature from the word-by-word interaction between n-gram pair. Sequential or tree-like feature extractors are also applicable in the feature extraction layer.
54
+
55
+ 5. Output Layer decodes the acquired features to give prediction. Under the setting of NLI, the output layer predicts the confidence on each class.
56
+
57
+ # 3.2 DENSELY INTERACTIVE INFERENCE NETWORK
58
+
59
+ Here we introduce Densely Interactive Inference Network $( \mathrm { D I I N } ) ^ { 1 }$ , which is a relatively simple instantiation of IIN but produces state-of-the-art performance on multiple datasets.
60
+
61
+ Embedding Layer: For DIIN, we use the concatenation of word embedding, character feature and syntactical features. The word embedding is obtained by mapping token to high dimensional vector space by pre-trained word vector (840B GloVe). The word embedding is updated during training. As in (Kim et al., 2016; Lee et al., 2016), we filter character embedding with 1D convolution kernel. The character convolutional feature maps are then max pooled over time dimension for each token to obtain a vector. The character features supplies extra information for some out-ofvocabulary (OOV) words. Syntactical features include one-hot part-of-speech (POS) tagging feature and binary exact match (EM) feature. The EM value is activated if there are tokens with same stem or lemma in the other sentence as the corresponding token. The EM feature is simple while found useful as in reading comprehension task (Chen et al., 2017a). In analysis section, we study how EM feature helps text understanding. Now we have premise representation $\ b { P } \in \mathbb { R } ^ { p \times d }$ and hypothesis representation $H \in \mathbb { R } ^ { h \times d }$ , where $p$ refers to the sequence length of premise, $h$ refers to the sequence length of hypothesis and $d$ means the dimension of both representation. The 1-D convolutional neural network and character features weights share the same set of parameters between premise and hypothesis.
62
+
63
+ Encoding Layer: In the encoding layer, the premise representation $_ { P }$ and the hypothesis representation $\pmb { H }$ are passed through a two-layer highway network, thus having $\hat { P } ~ \in ~ \mathbb { R } ^ { p \times d }$ and $\hat { H } \in \mathbb { R } ^ { h \times d }$ for new premise representation and new hypothesis representation. These new representation are then passed to self-attention layer to take into account the word order and context information. Take premise as example, we model self-attention by
64
+
65
+ $$
66
+ A _ { i j } = \alpha ( \hat { P } _ { i } ) , \hat { P } _ { j } \in \mathbb { R }
67
+ $$
68
+
69
+ $$
70
+ \bar { P _ { i } } = \sum _ { j = 1 } ^ { p } \frac { \exp ( A _ { i j } ) } { \sum _ { k = 1 } ^ { p } \exp ( A _ { k j } ) } \hat { P _ { j } } ,
71
+ $$
72
+
73
+ where $\bar { P } _ { i }$ is a weighted summation of $\hat { P }$ . We choose $\begin{array} { r } { \alpha ( { a } , { b } ) = { w } _ { a } ^ { \top } [ { a } ; { b } ; { a } \circ { b } ] } \end{array}$ , where ${ \pmb w } _ { a } \in \mathbb { R } ^ { 3 d }$ is a trainable weight, $\circ$ is element-wise multiplication, [;] is vector concatenation across row, and the implicit multiplication is matrix multiplication. Then both $\hat { P }$ and $\bar { P }$ are fed into a semantic composite fuse gate (fuse gate in short), which acts as a skip connection. The fuse gate is implemented as
74
+
75
+ $$
76
+ \begin{array} { r l } & { z _ { i } = \mathrm { t a n h } ( W ^ { 1 \top } [ \hat { P } _ { i } ; \bar { P } _ { i } ] + b ^ { 1 } ) } \\ & { r _ { i } = \sigma ( W ^ { 2 \top } [ \hat { P } _ { i } ; \bar { P } _ { i } ] + b ^ { 2 } ) } \\ & { f _ { i } = \sigma ( W ^ { 3 \top } [ \hat { P } _ { i } ; \bar { P } _ { i } ] + b ^ { 3 } ) } \\ & { \tilde { P } _ { i } = r _ { i } \circ \hat { P } _ { i } + f _ { i } \circ z _ { i } } \end{array}
77
+ $$
78
+
79
+ where $W ^ { 1 }$ , $W ^ { 2 }$ , $W ^ { 3 } \in \mathbb { R } ^ { 2 d \times d }$ and $b ^ { 1 } \ b ^ { 2 }$ , $b ^ { 3 } \in \mathbb { R } ^ { d }$ are trainable weights, $\sigma$ is sigmoid nonlinear operation.
80
+
81
+ We do the same operation on hypothesis representation, thus having $\tilde { \cal H }$ . The weights of intraattention and fuse gate for premise and hypothesis are not shared, but the difference between the weights of are penalized. The penalization aims to ensure the parallel structure learns the similar functionality but is aware of the subtle semantic difference between premise and hypothesis.
82
+
83
+ Interaction Layer: The interaction layer models the interaction between premise encoded representation $P ^ { e n c }$ and hypothesis encoded representation ${ \pmb { H } } ^ { e n c }$ as follows:
84
+
85
+ $$
86
+ \pmb { I } _ { i j } = \beta ( \tilde { P } _ { i } , \tilde { \pmb { H } } _ { j } ) \in \mathbb { R } ^ { d } , \forall i \in [ 1 , . . . , p ] , \forall j \in [ 1 , . . . , h ]
87
+ $$
88
+
89
+ where $\tilde { P } _ { i }$ is the $i$ -th row vector of $\tilde { P }$ , and $\tilde { H } _ { j }$ is the $j$ -th row vector of $\tilde { \cal H }$ . Though there are many implementations of interaction, we find $\beta ( a , \dot { b } ) = a \circ b$ very useful.
90
+
91
+ Feature Extraction Layer: We adopt DenseNet(Huang et al., 2016) as convolutional feature extractor in DIIN. Though our experiments show ResNet(He et al., 2016) works well in the architecture, we choose DenseNet because it is effective in saving parameters. One interesting observation with ResNet is that if we remove the skip connection in residual structure, the model does not converge at all. We found batch normalization delays convergence without contributing to accuracy, therefore we does not use it in our case. A ReLU activation function is applied after all convolution unless otherwise noted. Once we have the interaction tensor $\pmb { I }$ , we use a convolution with $1 \times 1$ kernel to scale down the tensor in a ratio, $\eta$ , without following ReLU. If the input channel is $k$ then the output channel is $f l o o r ( k \times \eta )$ . Then the generated feature map is feed into three sets of Dense block(Huang et al., 2016) and transition block pair. The DenseNet block contains $n$ layers of $3 \times 3$ convolution layer with growth rate of $g$ . The transition layer has a convolution layer with $1 \times 1$ kernel for scaling down purpose, followed by a max pooling layer with stride 2. The transition scale down ratio in transition layer is $\theta$ .
92
+
93
+ Output Layer: DIIN uses a linear layer to classify final flattened feature representation to three classes.
94
+
95
+ # 4 EXPERIMENTS
96
+
97
+ In this section, we present the evaluation of our model. We first perform quantitative evaluation, comparing our model with other competitive models. We then conduct some qualitative analyses to understand how DIIN achieve the high level understanding through interaction.
98
+
99
+ # 4.1 DATA
100
+
101
+ Here we introduce three datasets we evaluate our model on. The evaluation metric for all dataset is accuracy.
102
+
103
+ SNLI Stanford Natural Language Inference (SNLI; Bowman et al. 2015) has 570k human annotated sentence pairs. The premise data is draw from the captions of the Flickr30k corpus, and the hypothesis data is manually composed. The labels provided in are “entailment”, “neutral’, “contradiction” and “-”. “-” shows that annotators cannot reach consensus with each other, thus removed during training and testing as in other works. We use the same data split as in Bowman et al. (2015).
104
+
105
+ MultiNLI Multi-Genre NLI Corpus (MultiNLI; Williams et al. 2017) has $4 3 3 \mathrm { k }$ sentence pairs, whose collection process and task detail are modeled closely to SNLI. The premise data is collected from maximally broad range of genre of American English such as written non-fiction genres (SLATE, OUP, GOVERNMENT, VERBATIM, TRAVEL), spoken genres (TELEPHONE, FACETO-FACE), less formal written genres (FICTION, LETTERS) and a specialized one for 9/11. Half of these selected genres appear in training set while the rest are not, creating in-domain (matched) and cross-domain (mismatched) development/test sets. We use the same data split as provided by Williams et al. (2017). Since test set labels are not provided, the test performance is obtained through submission on Kaggle.com2. Each team is limited to two submissions per day.
106
+
107
+ Quora question pair Quora question pair dataset contains over $4 0 0 \mathrm { k }$ real world question pair selected from Quora.com. A binary annotation which stands for match (duplicate) or not match (not duplicate) is provided for each question pair. In our case, duplicate question pair can be interpreted as entailment relation and not duplicate as neutral. We use the same split ratio as mentioned in (Wang et al., 2017).
108
+
109
+ # 4.2 EXPERIMENTS SETTING
110
+
111
+ We implement our algorithm with Tensorflow(Abadi et al., 2016) framework. An Adadelta optimizer(Zeiler, 2012) with $\rho$ as 0.95 and $\epsilon$ as $1 \mathrm { e } { - 8 }$ is used to optimize all the trainable weights. The initial learning rate is set to 0.5 and batch size to 70. When the model does not improve best indomain performance for 30,000 steps, an SGD optimizer with learning rate of $3 \mathrm { e } { - 4 }$ is used to help model to find a better local optimum. Dropout layers are applied before all linear layers and after word-embedding layer. We use an exponential decayed keep rate during training, where the initial keep rate is 1.0 and the decay rate is 0.977 for every 10,000 step. We initialize our word embeddings with pre-trained 300D GloVe 840B vectors Pennington et al. (2014) while the out-of-vocabulary word are randomly initialized with uniform distribution. The character embeddings are randomly initialized with 100D. We crop or pad each token to have 16 characters. The 1D convolution kernel size for character embedding is 5. All weights are constraint by L2 regularization, and the L2 regularization at step $t$ is calculated as follows:
112
+
113
+ $$
114
+ L 2 R a t i o _ { t } = \sigma ( \frac { ( t - L 2 F u l l S t e p / 2 ) \times 8 } { L 2 F u l l S t e p / 2 } ) \times L 2 F u l l R a t i o
115
+ $$
116
+
117
+ where L2F ullRatio determines the maximum L2 regularization ratio, and L2F ullStep determines at which step the maximum L2 regularization ratio would be applied on the L2 regularization. We choose $L 2 F$ ullRatio as $0 . 9 e - 5$ and L2F ullStep as 100,000. The ratio of L2 penalty between the difference of two encoder weights is set to $1 e - 3$ . For a dense block in feature extraction layer, the number of layer $n$ is set to 8 and growth rate $g$ is set to 20. The first scale down ratio $\eta$ in feature extraction layer is set to 0.3 and transitional scale down ratio $\theta$ is set to 0.5. The sequence length is set as a hard cutoff on all experiments: 48 for MultiNLI, 32 for SNLI and 24 for Quora Question Pair Dataset. During the experiments on MultiNLI, we use $15 \%$ of data from SNLI as in Williams et al. (2017). We select the parameter by the best run of development accuracy. Our ensembling approach considers the majority vote of the predictions given by multiple runs of the same model under different random parameter initialization.
118
+
119
+ Table 2: MultiNLI result.
120
+
121
+ <table><tr><td>Model</td><td colspan="2">Test Accuracy</td></tr><tr><td></td><td>Matched</td><td>Mismatched</td></tr><tr><td>1. BiLSTM(Williams et al.,2017)</td><td>67.0</td><td>67.6</td></tr><tr><td>2.InnerAtt(Balazs et al.,2017)</td><td>72.1</td><td>72.1</td></tr><tr><td>3.ESIM(Williams et al.,2017)</td><td>72.3</td><td>72.1</td></tr><tr><td>4. Gated-Att BiLSTM(Chen et al.,2017b)</td><td>73.2</td><td>73.6</td></tr><tr><td>5.Shorcut-Stacked encoder(Nie &amp; Bansal, 2017)</td><td>74.6</td><td>73.6</td></tr><tr><td>6. DIIN</td><td>78.8</td><td>77.8</td></tr><tr><td>7.InnerAtt(ensemble)</td><td>72.2</td><td>72.8</td></tr><tr><td>8.Gated-Att BiLSTM (ensemble)</td><td>74.9</td><td>74.9</td></tr><tr><td>9.DIIN (ensemble)</td><td>80.0</td><td>78.7</td></tr></table>
122
+
123
+ # 4.3 EXPERIMENT ON MULTINLI
124
+
125
+ We compare our result with all other published systems in Table 2. Besides ESIM, the state-of-theart model on SNLI, all other models appear at RepEval 2017 workshop. RepEval 2017 workshop requires all submitted model to be sentence encoding-based model therefore alignment between sentences and memory module are not eligible for competition. All models except ours share one common feature that they use LSTM as a essential building block as encoder. Our approach, without using any recurrent structure, achieves the new state-of-the-art performance of $8 0 . 0 \%$ , exceeding current state-of-the-art performance by more than $5 \%$ . Unlike the observation from Nangia et al. (2017), we find the out-of-domain test performance is consistently lower than in-domain test performance. Selecting parameters from the best in-domain development accuracy partially contributes to this result.
126
+
127
+ # 4.4 EXPERIMENT ON SNLI
128
+
129
+ In Table 3, we compare our model to other model performance on SNLI. Experiments (2-7) are sentence encoding based model. Bowman et al. (2016) provides a BiLSTM baseline. Vendrov et al. (2015) adopts two layer GRU encoder with pre-trained ”skip-thoughts” vectors. To capture sentence-level semantics, Mou et al. (2015) use tree-based CNN and Bowman et al. (2016) propose a stack-augmented parser-interpreter neural network (SPINN) which incorporates parsing information in a sequential manner. Liu et al. (2016) uses intra-attention on top of BiLSTM to generate sentence representation, and Munkhdalai & Yu (2016) proposes an memory augmented neural network to encode the sentence. The next group of model, experiments (8-18), uses cross sentence feature. Rocktaschel et al. (2015) aligns each sentence word-by-word with attention on top of LSTMs. Wang ¨ & Jiang (2015) enforces cross sentence attention word-by-word matching with the proprosed mLSTM model. Cheng et al. (2016) proposes long short-term memory-network(LSTMN) with deep attention fusion that links the current word to previous word stored in memory. Parikh et al. (2016) decomposes the task into sub-problems and conquer them respectively. Yu & Munkhdalai (2017) proposes neural tree indexer, a full $n$ -ary tree whose subtrees can be overlapped. Re-read LSTM proposed by Sha et al. (2016) considers the attention vector of one sentence as the inner-state of LSTM for another sentence. Chen et al. (2016) propose a sequential model that infers locally, and a ensemble with tree-like inference module that further improves performance. We show our model, DIIN, achieves state-of-the-art performance on the competitive leaderboard.
130
+
131
+ Table 3: SNLI result.
132
+
133
+ <table><tr><td>Model</td><td>Test Accuracy SNLI</td></tr><tr><td>1.Handcrafted features(Bowman et al.,2015) 2.LSTM encoder(Bowman et al., 2016)</td><td>78.2</td></tr><tr><td>3.pretrained GRU encoders(Vendrov et al.,2015) 4.tree-based CNN encoders(Mou et al.,2015) 5.SPINN-PI encoders(Bowman et al.,2016) 6.BiLSTM intra-attention encoders(Liu et al., 2016) 7.NSE encoders(Munkhdalai &amp; Yu,2016)</td><td>80.6 81.4 82.1 83.2 84.2 84.6</td></tr><tr><td>8.LSTM with attention(Rocktäschel et al.,2015) 9.mLSTM(Wang&amp; Jiang,2015) 10.LSTMN with deep attention fusion(Cheng et al.,2016) 11. decomposable attention model(Parikh et al., 2016) 12.Intra-sentence attention +(11)(Parikh et al.,2016) 13.BiMPM(Wang et al.,2017) 14.NTI-SLSTM-LSTM(Yu&amp; Munkhdalai,2017)</td><td>83.5 86.1 86.3 86.3 86.8 86.9</td></tr><tr><td>15.re-read LSTM(Sha et al.,2016) 16.ESIM(Chen et al.,2016) 17.ESIM ensemble with syntactic tree-LSTM(Chen et al.,2016) 18.BiMPM (ensemble)(Wang et al.,2017)</td><td>87.3 87.5 88.0 88.6 88.8</td></tr></table>
134
+
135
+ <table><tr><td rowspan="2">Model</td><td colspan="2">Accuracy</td></tr><tr><td>Dev Acc</td><td>Test Acc</td></tr><tr><td>1. Siamese-CNN</td><td>=</td><td>79.60</td></tr><tr><td>2.Multi-Perspective CNN</td><td></td><td>81.38</td></tr><tr><td>3.Siamese-LSTM</td><td>=</td><td>82.58</td></tr><tr><td> 4.Multi-Perspective-LSTM</td><td>=</td><td>83.21</td></tr><tr><td>5. L.D.C</td><td>=</td><td>85.55</td></tr><tr><td>6. BiMPM(Wang et al.,2017)</td><td>88.69</td><td>88.17</td></tr><tr><td>7. pt-DECATTword(Tomar et al.,2017)</td><td>88.44</td><td>87.54</td></tr><tr><td>8. pt-DECATTchar(Tomar et al.,2017)</td><td>88.89</td><td>88.40</td></tr><tr><td>9. DIIN</td><td>89.44</td><td>89.06</td></tr><tr><td>10.DIIN (ensemble)</td><td>90.48</td><td>89.84</td></tr></table>
136
+
137
+ Table 4: Quora question dataset result. First six rows are copied from Wang et al. (2017) and next two rows from (Tomar et al., 2017).
138
+
139
+ # 4.5 EXPERIMENT ON QUORA QUESTION PAIR DATASET
140
+
141
+ In this subsection, we evaluate the effectiveness of our model for paraphrase identification as natural language inference task. Other than our baselines, we compare with Wang et al. (2017) and Tomar et al. (2017). BIMPM models different perspective of matching between sentence pair on both direction, then aggregates matching vector with LSTM. $\operatorname { D E C A T T } _ { w o r d }$ and $\mathrm { D E C A T T } _ { c h a r }$ uses automatically collected in-domain paraphrase data to noisy pretrain $n$ -gram word embedding and $n$ - gram subword embedding correspondingly on decomposable attention model proposed by (Parikh et al., 2016). In Table 4, our experiment shows DIIN has better performance than all other models and an ensemble score is higher than the former best result for more than 1 percent.
142
+
143
+ # 4.6 ANALYSIS
144
+
145
+ Ablation Study We conduct a ablation study on our base model to examine the effectiveness of each component. We study our model on MultiNLI dataset and we use Matched validation score as the standard for model selection. The result is shown in Table 5. We studies how EM feature contributes to the system. After removing the exact match binary feature, we find the performance degrade to 78.2 on matched score on development set and 78.0 on mismatched score. As observed in reading comprehension task Chen et al. (2017a), the simple exact match feature does help the model to better understand the sentences. In the experiment 3, we remove the convolutional feature extractor and then model is structured as a sentence-encoding based model. The sentence representation matrix is max-pooled over time to obtain a feature vector. Once we have the feature vector $p$ for premise and $h$ for hypothesis, we use $[ p ; h ; | p - h | ; p \circ h ]$ as final feature vector to classify the relationship. We obtain 73.2 for matched score and 73.6 on mismatched data. The result is competitive among other sentence-encoding based model. We further study how encoding layer contribute in enriching the feature space in interaction tensor. If we remove encoding layer completely, then we’ll obtain a 73.5 for matched score and 73.2 for mismatched score. The result demonstrate the feature extraction layer have powerful capability to capture the semantic feature. In experiment 5, we remove both self-attention and fuse gate, thus retaining only highway network. The result improves to 77.7 and 77.3 respectively on matched and mismatched development set. However, in experiment 6, when we only remove fuse gate, to our surprise, the performance degrade to 73.5 for matched score and 73.8 for mismatched. On the other hand, if we use the addition of the representation after highway network and the representation after self-attention as skip connection as in experiment 7, the performance increase to 77.3 and 76.3. The comparison indicates self-attention layer makes the training harder to converge while a skip connection could ease the gradient flow for both highway layer and self-attention layer. By comparing the base model and the model the in experiment 6, we show that the fuse gate not only well serves as a skip connection, but also makes good decision upon which information the fuse for both representation. To show that dense interaction tensor contains more semantic information, we replace the dense interaction tensor with dot product similarity matrix between the encoded representation of premise and hypothesis. The result shows that the dot product similarity matrix has an inferior capacity of semantic information. Another dimensionality study is provided in supplementary material. In experiment 9, we share the encoding layer weight, and the result decrease from the baseline. The result shows that the two set of encoding weights learn the subtle difference between premise and hypothesis.
146
+
147
+ Table 5: Ablation study result.
148
+
149
+ <table><tr><td>Ablation Experiments</td><td colspan="2">Dev Accuracy Matched Mismatched</td></tr><tr><td>1. DIIN</td><td>79.2</td><td>79.1</td></tr><tr><td>2. DIIN - EM feature</td><td>78.2</td><td>78.0</td></tr><tr><td>3.DIIN - conv structure</td><td>73.2</td><td>73.6</td></tr><tr><td>4.DIIN - encoding layer</td><td>73.5</td><td>73.2</td></tr><tr><td>5.DIIN - self-att and fuse gate</td><td>77.7</td><td>77.3</td></tr><tr><td>6.DIIN - fuse gate</td><td>73.5</td><td>73.8</td></tr><tr><td>7. DIIN - fuse gate + addition as skip connection</td><td>77.3</td><td>76.3</td></tr><tr><td>8.DIIN - dense interaction tensor + similarity matrix</td><td>75.2</td><td>75.5</td></tr><tr><td>9.DIIN - tied encoding layer parameter</td><td>78.5</td><td>78.3</td></tr></table>
150
+
151
+ Error analysis To analyze the model prediction, we use annotated subset of development set provided by Williams et al. (2017) that consists of 1,000 examples each tagged with zero or more following tags:
152
+
153
+ • CONDITIONAL: whether the sentence contains a conditional.
154
+ • WORD OVERLAP: whether both sentences share more than $70 \%$ of their tokens.
155
+ • NEGATION: whether a negation shows up in either sentence.
156
+ • ANTO: whether two sentences contain antonym pair.
157
+ • LONG SENTENCE: whether premise or hypothesis is longer than 30 or 16 tokens respectively.
158
+ • TENSE DIFFERENCE: whether any verb in two sentences uses different tense.
159
+ • ACTIVE/PASSIVE: whether there is an active-to-passive (or vice versa) transformation from the premise to the hypothesis.
160
+
161
+ Table 6: MultiNLI result.
162
+
163
+ <table><tr><td></td><td>Annotation Tag</td><td>Label Frequency</td><td>BiLSTM</td><td>BaLazs</td><td>Chen</td><td>DIN</td></tr><tr><td></td><td>CONDITIONAL WORD OVERLAP</td><td>5%</td><td>100%</td><td>100%</td><td>100%</td><td>57%</td></tr><tr><td></td><td></td><td>6%</td><td>50%</td><td>63%</td><td>63%</td><td>79%</td></tr><tr><td></td><td>NEGATION</td><td>26%</td><td>71%</td><td>75%</td><td>75%</td><td>78%</td></tr><tr><td></td><td>ANTO</td><td>3%</td><td>67%</td><td>50%</td><td>50%</td><td>82%</td></tr><tr><td></td><td>LONG SENTENCE</td><td>20%</td><td>50%</td><td>75%</td><td>67%</td><td>81%</td></tr><tr><td>Matched</td><td>TENSEDIFFERENCE</td><td>10%</td><td>64%</td><td>68%</td><td>86%</td><td>84%</td></tr><tr><td></td><td>ACTIVE/PASSIVE</td><td>3%</td><td>75%</td><td>75%</td><td>88%</td><td>93%</td></tr><tr><td></td><td>PARAPHRASE</td><td>5%</td><td>78%</td><td>83%</td><td>78%</td><td>88%</td></tr><tr><td></td><td>QUANTITY/TIME REASONING</td><td>3%</td><td>50%</td><td>50%</td><td>33%</td><td>53%</td></tr><tr><td></td><td>COREF</td><td>6%</td><td>83%</td><td>83%</td><td>83%</td><td>77%</td></tr><tr><td></td><td>QUANTIFIER</td><td>25%</td><td>64%</td><td>59%</td><td>74%</td><td>74%</td></tr><tr><td></td><td>MODAL</td><td>29%</td><td>66%</td><td>65%</td><td>75%</td><td>84%</td></tr><tr><td></td><td>BELIEF</td><td>13%</td><td>74%</td><td>71%</td><td>73%</td><td>77%</td></tr><tr><td></td><td>CONDITIONAL</td><td>5%</td><td>100%</td><td>80%</td><td>100%</td><td>69%</td></tr><tr><td></td><td>WORD OVERLAP</td><td>7%</td><td>58%</td><td>62%</td><td>76%</td><td>92%</td></tr><tr><td></td><td>NEGATION</td><td>21%</td><td>69%</td><td>73%</td><td>72%</td><td>77%</td></tr><tr><td></td><td>ANTO</td><td>4%</td><td>58%</td><td>58%</td><td>58%</td><td>80%</td></tr><tr><td></td><td>LONG SENTENCE</td><td>20%</td><td>55%</td><td>67%</td><td>67%</td><td>73%</td></tr><tr><td></td><td>TENSEDIFFERENCE</td><td>4%</td><td>71%</td><td>71%</td><td>89%</td><td>78%</td></tr><tr><td>Mismatched</td><td>ACTIVE/PASSIVE</td><td>2%</td><td>82%</td><td>82%</td><td>91%</td><td>70%</td></tr><tr><td></td><td>PARAPHRASE</td><td>7%</td><td>81%</td><td>89%</td><td>89%</td><td>100%</td></tr><tr><td></td><td>QUANTITY/TIME REASONING</td><td>8%</td><td>46%</td><td>54%</td><td>46%</td><td>69%</td></tr><tr><td></td><td>COREF</td><td>6%</td><td>80%</td><td>70%</td><td>80%</td><td>79%</td></tr><tr><td></td><td>QUANTIFIER</td><td>28%</td><td>70%</td><td>68%</td><td>77%</td><td>78%</td></tr><tr><td></td><td>MODAL</td><td>25%</td><td>67%</td><td>67%</td><td>76%</td><td>75%</td></tr><tr><td></td><td>BELIEF</td><td>12%</td><td>73%</td><td>71%</td><td>74%</td><td>81%</td></tr></table>
164
+
165
+ • PARAPHRASE: whether the two sentences are close paraphrases • QUANTITY/TIME REASONING: whether understanding the pair requires quantity or time reasoning.
166
+
167
+ • COREF: Whether the hypothesis contains a pronoun or referring expression that needs to be resolved using the premise.
168
+
169
+ • QUANTIFIER: Whether either sentence contains one of the following quantifier: much, enough, more, most, less, least, no, none, some, any, many, few, several, almost, nearly.
170
+
171
+ • MODAL: Whether one of the following modal verbs appears in either sentence: can, could, may, might, must, will, would, should.
172
+
173
+ • BELIEF: Whether one of the following belief verbs appear in either sentence: know, believe, understand, doubt, think, suppose, recognize, forget, remember, imagine, mean, agree, disagree, deny, promise.
174
+
175
+ For more detailed descriptions, please resort to Williams et al. (2017). The result is shown in Table 6. We find DIIN is consistently better on sentence pair with WORD OVERLAP, ANTO, LONG SENTENCE, PARAPHRASE and BELIEF tags by a large margin. During investigation, we hypothesize exact match feature helps the model to better understand paraphrase, therefore we study the result from second ablation ablation study where exact match feature is not used. Surprisingly, the model without exact model feature does not work worse on PARAPHRASE, instead, the accuracy on ANTO drops about $10 \%$ . DIIN is also work well on LONG SENTENCE, partially because the receptive field is large enough to cover all tokens.
176
+
177
+ Visualization We also visualize the hidden representation from interaction tensor $\pmb { I }$ and the feature map from first dense block in Figure 2. We pick a sentence pair whose premise is “South Carolina has no referendum right, so the Supreme Court canceled the vote and upheld the ban.” and hypothesis is “South Carolina has a referendum right, so the Supreme Court was powerless over the state.”. The upper row of figures are sampled from hidden representation of interaction tensor I. We observe the values of neurons are highly correlated row-wise and column-wise in the interaction tensor $\pmb { I }$ and different channel of hidden representation shows different aspect of interaction. Though in certain channel same words, “referendum”, or phrases, “supreme court”, cause activation, different word or phrase pair, such as “ban” and “powerless over”, also cause activation in other activation. It shows the model’s strong capacity of understanding text in different perspective. The lower row of Figure 2 shows the feature map from first dense block. After being convolved from the interaction tensor and previous feature map, new feature maps shows activation in different position, demonstrating different semantic features are found. The first figure in the lower row has similar pattern as normal attention weight whereas others has no obvious pattern. Different channels of feature maps indicate different kinds of semantic feature.
178
+
179
+ ![](images/5180e5a0e6ada4a5fb9e913926f5c429d17a91e3381730b81670626127a7da88.jpg)
180
+ Figure 2: A visualization of hidden representation. The premise is “South Carolina has no referendum right, so the Supreme Court canceled the vote and upheld the ban.” and the hypothesis is “South Carolina has a referendum right, so the Supreme Court was powerless over the state.”. The upper row are sampled from interaction tensor $I$ and the lower row are sample from the feature map of first dense block. We use viridis colormap, where yellow represents activation and purple shows the neuron is not active.
181
+
182
+ # 5 CONCLUSION AND FUTURE WORK
183
+
184
+ We show the interaction tensor (or attention weight) contains semantic information to understand the natural language. We introduce Interactive Inference Network, a novel class of architecture that allows the model to solve NLI or NLI alike tasks via extracting semantic feature from interaction tensor end-to-end. One instance of such architecture, Densely Interactive Inference Network (DIIN), achieves state-of-the-art performance on multiple datasets. By ablating each component in DIIN and changing the dimensionality, we show the effectiveness of each component in DIIN.
185
+
186
+ Though we have the initial exploration of natural language inference in interaction space, the full potential is not yet clear. We will keep exploring the potential of interaction space. Incorporating common-sense knowledge from external resources such as knowledge base to leverage the capacity of the mode is another research goal of ours.
187
+
188
+ # ACKNOWLEDGMENTS
189
+
190
+ We thank Yuchen Lu, Chang Huang and Kai Yu for their sincere and insightful advice.
191
+
192
+ # REFERENCES
193
+
194
+ Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dan Mane, Rajat Monga, Sherry Moore, Derek Murray, Chris Olah,
195
+
196
+ Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda Viegas, Oriol Vinyals, Pete Warden, Martin Wattenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. TensorFlow: Large-Scale Machine Learning on Heterogeneous Distributed Systems. arXiv.org, March 2016.
197
+
198
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural Machine Translation by Jointly Learning to Align and Translate. arXiv.org, September 2014.
199
+
200
+ Jorge A Balazs, Edison Marrese-Taylor, Pablo Loyola, and Yutaka Matsuo. Refining Raw Sentence Representations for Textual Entailment Recognition via Attention. arXiv.org, July 2017.
201
+
202
+ Johan Bos and Katja Markert. Recognising Textual Entailment with Logical Inference. HLT/EMNLP, 2005.
203
+
204
+ Samuel R Bowman, Gabor Angeli, Christopher Potts, and Christopher D Manning. A large annotated corpus for learning natural language inference. arXiv.org, pp. arXiv:1508.05326, August 2015.
205
+
206
+ Samuel R Bowman, Jon Gauthier, Abhinav Rastogi, Raghav Gupta, Christopher D Manning, and Christopher Potts. A Fast Unified Model for Parsing and Sentence Understanding. arXiv.org, March 2016.
207
+
208
+ Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. Reading Wikipedia to Answer OpenDomain Questions. arXiv.org, pp. arXiv:1704.00051, March 2017a.
209
+
210
+ Qian Chen, Xiaodan Zhu, Zhenhua Ling, Si Wei, Hui Jiang, and Diana Inkpen. Enhanced LSTM for Natural Language Inference. arXiv.org, September 2016.
211
+
212
+ Qian Chen, Xiaodan Zhu, Zhen-Hua Ling, Si Wei, Hui Jiang, and Diana Inkpen. Recurrent Neural Network-Based Sentence Encoder with Gated Attention for Natural Language Inference. arXiv.org, pp. arXiv:1708.01353, August 2017b.
213
+
214
+ Jianpeng Cheng, Li Dong, and Mirella Lapata. Long Short-Term Memory-Networks for Machine Reading. arXiv.org, January 2016.
215
+
216
+ Yaroslav Fyodorov, Yoad Winter, and Nissim Francez. a natural language inference system. Proceedings of the 2nd Workshop on Inference in Computational Semantics, pp. 1–17, November 2000.
217
+
218
+ Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N Dauphin. Convolutional Sequence to Sequence Learning. arXiv.org, May 2017.
219
+
220
+ Yichen Gong and Samuel R Bowman. Ruminating Reader: Reasoning with Gated Multi-Hop Attention. arXiv.org, April 2017.
221
+
222
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. CVPR, 2016.
223
+
224
+ Karl Moritz Hermann, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. Teaching Machines to Read and Comprehend. arXiv.org, June 2015.
225
+
226
+ Baotian Hu, Zhengdong Lu, Hang Li, and Qingcai Chen. Convolutional Neural Network Architectures for Matching Natural Language Sentences. NIPS, 2014.
227
+
228
+ Gao Huang, Zhuang Liu, Kilian Q Weinberger, and Laurens van der Maaten. Densely Connected Convolutional Networks. arXiv.org, August 2016.
229
+
230
+ Armand Joulin, Edouard Grave, Piotr Bojanowski, and Tomas Mikolov. Bag of Tricks for Efficient Text Classification. arXiv.org, July 2016.
231
+
232
+ Nal Kalchbrenner, Edward Grefenstette, and Phil Blunsom. A Convolutional Neural Network for Modelling Sentences. arXiv.org, April 2014.
233
+
234
+ Yoon Kim. Convolutional Neural Networks for Sentence Classification. arXiv.org, pp. arXiv:1408.5882, August 2014.
235
+
236
+ Yoon Kim, Yacine Jernite, David Sontag, and Alexander M Rush. Character-Aware Neural Language Models. AAAI, 2016.
237
+
238
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet Classification with Deep Convolutional Neural Networks. NIPS, 2012.
239
+
240
+ Jason Lee, Kyunghyun Cho, and Thomas Hofmann. Fully Character-Level Neural Machine Translation without Explicit Segmentation. arXiv.org, October 2016.
241
+
242
+ Yang Liu, Chengjie Sun, Lei Lin, and Xiaolong Wang. Learning Natural Language Inference using Bidirectional LSTM model and Inner-Attention. arXiv.org, May 2016.
243
+
244
+ Bill MacCartney and Christopher D. Manning. An extended model of natural logic. 2009.
245
+
246
+ Marco Marelli, Stefano Menini, Marco Baroni, Luisa Bentivogli, Raffaella Bernardi, and Roberto Zamparelli. A SICK cure for the evaluation of compositional distributional semantic models. LREC, 2014.
247
+
248
+ Hongyuan Mei, Mohit Bansal, and Matthew R Walter. Coherent Dialogue with Attention-based Language Models. arXiv.org, November 2016.
249
+
250
+ Tomas Mikolov, Ilya Sutskever, Kai Chen, Gregory S Corrado, and Jeffrey Dean. Distributed Representations of Words and Phrases and their Compositionality. NIPS, 2013.
251
+
252
+ Lili Mou, Rui Men, Ge Li, Yan Xu, Lu Zhang, Rui Yan, and Zhi Jin. Natural Language Inference by Tree-Based Convolution and Heuristic Matching. arXiv.org, December 2015.
253
+
254
+ Tsendsuren Munkhdalai and Hong Yu. Neural Semantic Encoders. arXiv.org, July 2016.
255
+
256
+ Nikita Nangia, Adina Williams, Angeliki Lazaridou, and Samuel R Bowman. The RepEval 2017 Shared Task: Multi-Genre Natural Language Inference with Sentence Representations. arXiv.org, July 2017.
257
+
258
+ Yixin Nie and Mohit Bansal. Shortcut-Stacked Sentence Encoders for Multi-Domain Inference. arXiv.org, pp. arXiv:1708.02312, August 2017.
259
+
260
+ Ankur P Parikh, Oscar Tackstr ¨ om, Dipanjan Das, and Jakob Uszkoreit. A Decomposable Attention ¨ Model for Natural Language Inference. arXiv.org, June 2016.
261
+
262
+ Jeffrey Pennington, Richard Socher, and Christopher Manning. Glove: Global Vectors for Word Representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 1532–1543, Stroudsburg, PA, USA, 2014. Association for Computational Linguistics.
263
+
264
+ Tim Rocktaschel, Edward Grefenstette, Karl Moritz Hermann, and Phil Blunsom. Reasoning about ¨ Entailment with Neural Attention. arXiv.org, September 2015.
265
+
266
+ Alexander M Rush, Sumit Chopra, and Jason Weston. A Neural Attention Model for Abstractive Sentence Summarization. arXiv.org, pp. arXiv:1509.00685, September 2015.
267
+
268
+ Minjoon Seo, Aniruddha Kembhavi, Ali Farhadi, and Hannaneh Hajishirzi. Bidirectional Attention Flow for Machine Comprehension. arXiv.org, November 2016.
269
+
270
+ Lei Sha, Baobao Chang, Zhifang Sui, and Sujian Li. Reading and Thinking - Re-read LSTM Unit for Textual Entailment Recognition. COLING, 2016.
271
+
272
+ Karen Simonyan and Andrew Zisserman. Very Deep Convolutional Networks for Large-Scale Image Recognition. arXiv.org, September 2014.
273
+
274
+ Richard Socher, Cliff Chiung-Yu Lin, Andrew Y Ng, and Christopher D Manning. Parsing Natural Scenes and Natural Language with Recursive Neural Networks. ICML, 2011.
275
+
276
+ Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going Deeper with Convolutions. arXiv.org, September 2014.
277
+
278
+ Gaurav Singh Tomar, Thyago Duque, Oscar Tackstr ¨ om, Jakob Uszkoreit, and Dipanjan Das. Neural ¨ Paraphrase Identification of Questions with Noisy Pretraining. arXiv.org, April 2017.
279
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention Is All You Need. arXiv.org, June 2017.
280
+ Ivan Vendrov, Ryan Kiros, Sanja Fidler, and Raquel Urtasun. Order-Embeddings of Images and Language. arXiv.org, November 2015.
281
+ Shuohang Wang and Jing Jiang. Learning Natural Language Inference with LSTM. arXiv.org, December 2015.
282
+ Zhiguo Wang, Wael Hamza, and Radu Florian. Bilateral Multi-Perspective Matching for Natural Language Sentences. cs.AI, 2017.
283
+ Adina Williams, Nikita Nangia, and Samuel R Bowman. A Broad-Coverage Challenge Corpus for Sentence Understanding through Inference. arXiv.org, April 2017.
284
+ Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhutdinov, Richard Zemel, and Yoshua Bengio. Show, Attend and Tell: Neural Image Caption Generation with Visual Attention. arXiv.org, February 2015.
285
+ Hong Yu and Tsendsuren Munkhdalai. Neural Tree Indexers for Text Understanding. EACL, 2017.
286
+ Matthew D Zeiler. ADADELTA: An Adaptive Learning Rate Method. arXiv.org, pp. arXiv:1212.5701, December 2012.
287
+ Xiang Zhang and Yann LeCun. Which Encoding is the Best for Text Classification in Chinese, English, Japanese and Korean? arXiv.org, August 2017.
288
+ Xiang Zhang, Junbo Jake Zhao, and Yann LeCun. Character-level Convolutional Networks for Text Classification. CoRR, 1509:arXiv:1509.01626, 2015.
289
+
290
+ # A SUPPLEMENTARY MATERIAL
291
+
292
+ Dimensionality and Parameter number study To study the influence of the model dimension $d$ which is also the channel number of interaction tensor, we design experiments to find out whether dimension has influence on performance. We also present the parameter count of these models. The dimensionality is 448 where 300 comes from word embedding, 100 comes from char feature, 47 comes from Part of speech tagging and 1 comes from the binary exact match feature. Since Highway network sets the output dimensionality default as that in input, we design a variant to highway network so that different output size could be obtained. The variant of highway layer is designed as follows:
293
+
294
+ $$
295
+ \begin{array} { r l } & { { \mathbf { \sp { t } } i } = \mathrm { t a n h } ( { W _ { t } \sp { \top } { \mathbf { x } } _ { i } + b _ { t } } ) } \\ & { { \mathbf { \sp { g } i } = \sigma ( { W _ { g } \sp { \top } { \mathbf { x } } _ { i } + b _ { g } \sp { } } ) } } \\ & { { \mathbf { \sp { x } } i } = \left\{ \begin{array} { l l } { { \mathbf { \sp { x } } _ { i } \qquad } } & { { d _ { i n } = d _ { o u t } \nonumber } } \\ { { W _ { x } \sp { \top } { \mathbf { x } } _ { i } + b _ { x } \quad d _ { i n } \ne d _ { o u t } \nonumber } } \\ { { \mathbf { \sp { o } i } = g _ { i } \circ { \mathbf { \sp { t } } i } + ( { 1 - g _ { i } \sp { } } ) \circ { \mathbf { \sp { x } } } _ { i } \sp { \prime } } } \end{array} \right. } \\ & { { \mathbf { \sp { o } i } = g _ { i } \circ { \mathbf { \sp { t } } i } + ( { 1 - g _ { i } \sp { } } ) \circ { \mathbf { \sp { x } } \sp { \prime } _ { i } \qquad } } } \end{array}
296
+ $$
297
+
298
+ where $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ is the $i$ -th vector of input matrix ${ \bf { x } } , { \bf { o } } _ { i }$ is the $i$ -th vector of output matrix $^ o$ , $\boldsymbol { W } _ { t } ^ { \top }$ , $\boldsymbol { W } _ { g } ^ { \intercal }$ $W _ { x } ^ { \top } \in \mathbb { R } ^ { d _ { i n } \times d _ { o u t } }$ and $b _ { t } , b _ { g }$ , $b _ { x } \in \mathbb { R } ^ { d _ { o u t } }$ are trainable weights.
299
+
300
+ The result shows that higher dimension number have better performance when the dimension number is lower certain threshold, however, when the number of dimensionality is greater than the threshold, larger number of parameter and higher dimensionality doesn’t contribute to performance. In the case of SNLI, due to its simplicity in language pattern, 250D would be suffice to obtain a good performance. On the other hand, it requires 350D to achieve a competitive performance on MultiNLI. We fail to reproduce our best performance with the new structure on MultiNLI. It shows that the additional layer on highway network doesn’t helps convergence.
301
+
302
+ Table 7: Dimensionality and parameter number study result.
303
+
304
+ <table><tr><td colspan="3"></td><td colspan="3">Dev Accuracy</td></tr><tr><td>Dimension</td><td>Param Count</td><td>SNLI</td><td>Matched</td><td></td><td>Mismatched</td></tr><tr><td>1. DIIN(448)</td><td>4.36 M</td><td>88.4</td><td>79.2</td><td></td><td>79.1</td></tr><tr><td>2.10</td><td>708K</td><td>81.6</td><td></td><td>71.7</td><td>71.9</td></tr><tr><td>3.30</td><td>765K</td><td>85.2</td><td></td><td>75.0</td><td>74.9</td></tr><tr><td>4.50</td><td>832K</td><td>86.0</td><td></td><td>76.1</td><td>76.7</td></tr><tr><td>5.100</td><td>1.05M</td><td>86.9</td><td></td><td>76.9</td><td>77.1</td></tr><tr><td>6.150</td><td>1.34 M</td><td>87.6</td><td></td><td>77.6</td><td>77.4</td></tr><tr><td>7.250</td><td>2.14M</td><td>88.1</td><td></td><td>78.1</td><td>77.7</td></tr><tr><td>8.350</td><td>3.23M</td><td>88.0</td><td></td><td>78.7</td><td>78.2</td></tr><tr><td>9. 447</td><td>4.55M</td><td>88.1</td><td></td><td>78.4</td><td>78.0</td></tr><tr><td>10.540</td><td>6.08 M</td><td>88.1</td><td></td><td>78.8</td><td>78.7</td></tr><tr><td>11. 600</td><td>7.20 M</td><td>88.4</td><td></td><td>78.7</td><td>78.2</td></tr></table>
parse/train/r1dHXnH6-/r1dHXnH6-_content_list.json ADDED
@@ -0,0 +1,1558 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "NATURAL LANGUAGE INFERENCE OVER INTERACTION SPACE ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 656,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Yichen $\\mathbf { G o n g ^ { \\dag \\ddag } }$ , Heng $\\mathbf { L u o } ^ { \\ddagger }$ , Jian Zhang‡ \n† New York University, New York, USA \n‡ Horizon Robotics, Inc., Beijing, China \nyichen.gong@nyu.edu, {heng.luo, jian.zhang}@hobot.cc ",
17
+ "bbox": [
18
+ 184,
19
+ 169,
20
+ 692,
21
+ 228
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 265,
32
+ 544,
33
+ 280
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Natural Language Inference (NLI) task requires an agent to determine the logical relationship between a natural language premise and a natural language hypothesis. We introduce Interactive Inference Network (IIN), a novel class of neural network architectures that is able to achieve high-level understanding of the sentence pair by hierarchically extracting semantic features from interaction space. We show that an interaction tensor (attention weight) contains semantic information to solve natural language inference, and a denser interaction tensor contains richer semantic information. One instance of such architecture, Densely Interactive Inference Network (DIIN), demonstrates the state-of-the-art performance on large scale NLI copora and large-scale NLI alike corpus. It’s noteworthy that DIIN achieve a greater than $20 \\%$ error reduction on the challenging Multi-Genre NLI (MultiNLI; Williams et al. 2017) dataset with respect to the strongest published system. ",
40
+ "bbox": [
41
+ 233,
42
+ 296,
43
+ 764,
44
+ 476
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 502,
55
+ 336,
56
+ 518
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Natural Language Inference (NLI also known as recognizing textual entiailment, or RTE) task requires one to determine whether the logical relationship between two sentences is among entailment (if the premise is true, then the hypothesis must be true), contradiction (if the premise is true, then the hypothesis must be false) and neutral (neither entailment nor contradiction). NLI is known as a fundamental and yet challenging task for natural language understanding(Williams et al., 2017), not only because it requires one to identify the language pattern, but also to understand certain common sense knowledge. In Table 1, three samples from MultiNLI corpus show solving the task requires one to handle the full complexity of lexical and compositional semantics. The previous work on NLI (or RTE) has extensively researched on conventional approaches(Fyodorov et al., 2000; Bos & Markert, 2005; MacCartney & Manning, 2009). Recent progress on NLI is enabled by the availability of 570k human annotated dataset(Bowman et al., 2015) and the advancement of representation learning technique. ",
63
+ "bbox": [
64
+ 174,
65
+ 535,
66
+ 825,
67
+ 700
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Among the core representation learning techniques, attention mechanism is broadly applied in many NLU tasks since its introduction: machine translation(Bahdanau et al., 2014), abstractive summarization(Rush et al., 2015), Reading Comprehension(Hermann et al., 2015), dialog system(Mei et al., 2016), etc. As described by Vaswani et al. (2017), “An attention function can be described as mapping a query and a set of key-value pairs to an output, where the query, keys, values, and output are all vectors. The output is computed as a weighted sum of the values, where the weight assigned to each value is computed by a compatibility function of the query with the corresponding key”. Attention mechanism is known for its alignment between representations, focusing one part of representation over another, and modeling the dependency regardless of sequence length. Observing attention’s powerful capability, we hypothesize that the attention weight can assist with machine to understanding the text. ",
74
+ "bbox": [
75
+ 174,
76
+ 708,
77
+ 825,
78
+ 861
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "A regular attention weight, the core component of the attention mechanism, encodes the crosssentence word relationship into a alignment matrix. However, a multi-head attention weightVaswani et al. (2017) can encode such interaction into multiple alignment matrices, which shows a more powerful alignment. In this work, we push the multi-head attention to a extreme by building a word",
85
+ "bbox": [
86
+ 174,
87
+ 868,
88
+ 823,
89
+ 924
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "table",
95
+ "img_path": "images/6785364c6e89dea6d60f0a7c88346aa8801bb6027b369d58d145701d0cf61bd7.jpg",
96
+ "table_caption": [],
97
+ "table_footnote": [],
98
+ "table_body": "<table><tr><td>Premise: The FCC has created two tiers of small business for this service with the approval of the SBA. Hypothesis: The SBA has given the go-ahead for the FCC to divide this service into</td></tr><tr><td>two tiers of small business. Label: entailment</td></tr><tr><td>Premise:He was crying like his mother had just walloped him.</td></tr><tr><td>Hypothesis:He was crying like his mother hit him with a spoon. Label: Neutral</td></tr><tr><td></td></tr><tr><td>Premise:Later, Tom testified against John so as to avoid the electric chair. Hypothesis: Tom refused to turn on his friend, even though he was slated to be executed. Label: Contradiction</td></tr></table>",
99
+ "bbox": [
100
+ 210,
101
+ 104,
102
+ 790,
103
+ 273
104
+ ],
105
+ "page_idx": 1
106
+ },
107
+ {
108
+ "type": "text",
109
+ "text": "Table 1: Samples from MultiNLI datasets. ",
110
+ "bbox": [
111
+ 361,
112
+ 287,
113
+ 637,
114
+ 303
115
+ ],
116
+ "page_idx": 1
117
+ },
118
+ {
119
+ "type": "text",
120
+ "text": "by-word dimension-wise alignment tensor which we call interaction tensor. The interaction tensor encodes the high-order alignment relationship between sentences pair. Our experiments demonstrate that by capturing the rich semantic features in the interaction tensor, we are able to solve natural language inference task well, especially in cases with paraphrase, antonyms and overlapping words. ",
121
+ "bbox": [
122
+ 176,
123
+ 332,
124
+ 823,
125
+ 387
126
+ ],
127
+ "page_idx": 1
128
+ },
129
+ {
130
+ "type": "text",
131
+ "text": "We dub the general framework as Interactive Inference Network(IIN). To the best of our knowledge, it is the first attempt to solve natural language inference task in the interaction space. We further explore one instance of Interactive Inference Network, Densely Interactive Inference Network (DIIN), which achieves new state-of-the-art performance on both SNLI and MultiNLI copora. To test the generality of the architecture, we interpret the paraphrase identification task as natural language inference task where matching as entailment, not-matching as neutral. We test the model on Quora Question Pair dataset, which contains over $4 0 0 \\mathrm { k }$ real world question pair, and achieves new state-of-the-art performance. ",
132
+ "bbox": [
133
+ 174,
134
+ 393,
135
+ 825,
136
+ 506
137
+ ],
138
+ "page_idx": 1
139
+ },
140
+ {
141
+ "type": "text",
142
+ "text": "We introduce the related work in Section 2, and discuss the general framework of IIN along with a specific instance that enjoys state-of-the-art performance on multiple datasets in Section 3. We describe experiments and analysis in Section 4. Finally, we conclude and discuss future work in Section 5. ",
143
+ "bbox": [
144
+ 176,
145
+ 512,
146
+ 825,
147
+ 568
148
+ ],
149
+ "page_idx": 1
150
+ },
151
+ {
152
+ "type": "text",
153
+ "text": "2 RELATED WORK ",
154
+ "text_level": 1,
155
+ "bbox": [
156
+ 176,
157
+ 590,
158
+ 344,
159
+ 607
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "The early exploration on NLI mainly rely on conventional methods and small scale datasets(Marelli et al., 2014). The availability of SNLI dataset with 570k human annotated sentence pairs has enabled a good deal of progress on natural language understanding. The essential representation learning techniques for NLU such as attention(Wang & Jiang, 2015), memory(Munkhdalai & Yu, 2016) and the use of parse structure(Bowman et al., 2016; Mou et al., 2015) are studied on the SNLI which serves as an important benchmark for sentence understanding. The models trained on NLI task can be divided into two categories: (i) sentence encoding-based model which aims to find vector representation for each sentence and classifies the relation by using the concatenation of two vector representation along with their absolute element-wise difference and element-wise product(Bowman et al., 2016; Vendrov et al., 2015; Mou et al., 2015; Liu et al., 2016; Munkhdalai & Yu, 2016). (ii) Joint feature models which use the cross sentence feature or attention from one sentence to another(Rocktaschel et al., 2015; Wang & Jiang, 2015; Cheng et al., 2016; Parikh et al., 2016; Wang ¨ et al., 2017; Yu & Munkhdalai, 2017; Sha et al., 2016). ",
166
+ "bbox": [
167
+ 174,
168
+ 625,
169
+ 825,
170
+ 805
171
+ ],
172
+ "page_idx": 1
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "After neural attention mechanism is successfully applied on the machine translation task, such technique has became widely used in both natural language process and computer vision domains. Many variants of attention technique such as hard-attention( $\\mathrm { X u }$ et al., 2015), self-attention(Parikh et al., 2016), multi-hop attention(Gong & Bowman, 2017), bidirectional attention(Seo et al., 2016) and multi-head attention(Vaswani et al., 2017) are also introduced to tackle more complicated tasks. Before this work, neural attention mechanism is mainly used to make alignment, focusing on specific part of the representation. In this work, we want to show that attention weight contains rich semantic information required for understanding the logical relationship between sentence pair. ",
177
+ "bbox": [
178
+ 174,
179
+ 811,
180
+ 825,
181
+ 924
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "Though RNN or LSTM are very good for variable length sequence modeling, using Convolutional neural network in NLU tasks is very desirable because of its parallelism in computation. Convolutional structure has been successfully applied in various domain such as machine translation(Gehring et al., 2017), sentence classification(Kim, 2014), text matching(Hu et al., 2014) and sentiment analysis(Kalchbrenner et al., 2014), etc. The convolution structure is also applied on different level of granularity such as byte(Zhang & LeCun, 2017), character(Zhang et al., 2015), word(Gehring et al., 2017) and sentences(Mou et al., 2015) levels. ",
188
+ "bbox": [
189
+ 174,
190
+ 103,
191
+ 825,
192
+ 202
193
+ ],
194
+ "page_idx": 2
195
+ },
196
+ {
197
+ "type": "text",
198
+ "text": "3 MODEL ",
199
+ "text_level": 1,
200
+ "bbox": [
201
+ 174,
202
+ 223,
203
+ 267,
204
+ 239
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "3.1 INTERACTIVE INFERENCE NETWORK ",
211
+ "text_level": 1,
212
+ "bbox": [
213
+ 176,
214
+ 256,
215
+ 470,
216
+ 270
217
+ ],
218
+ "page_idx": 2
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "The Interactive Inference Network (IIN) is a hierarchical multi-stage process and consists of five components. Each of the components is compatible with different type of implementations. Potentially all exiting approaches in machine learning, such as decision tree, support vector machine and neural network approach, can be transfer to replace certain component in this architecture. We focus on neural network approaches below. Figure 1 provides a visual illustration of Interactive Inference Network. ",
223
+ "bbox": [
224
+ 173,
225
+ 281,
226
+ 825,
227
+ 366
228
+ ],
229
+ "page_idx": 2
230
+ },
231
+ {
232
+ "type": "image",
233
+ "img_path": "images/f026b3eeb58c962dceaac514df7e979aa76dd32f1fd57491e94ada1298f1db43.jpg",
234
+ "image_caption": [
235
+ "Figure 1: A visual illustration of Interactive Inference Network (IIN). "
236
+ ],
237
+ "image_footnote": [],
238
+ "bbox": [
239
+ 207,
240
+ 381,
241
+ 812,
242
+ 885
243
+ ],
244
+ "page_idx": 2
245
+ },
246
+ {
247
+ "type": "text",
248
+ "text": "1. Embedding Layer converts each word or phrase to a vector representation and construct the representation matrix for sentences. In embedding layer, a model can map tokens to vectors with the pre-trained word representation such as GloVe(Pennington et al., 2014), word2Vec(Mikolov et al., 2013) and fasttext(Joulin et al., 2016). It can also utilize the preprocessing tool, e.g. named entity recognizer, part-of-speech recognizer, lexical parser and coreference identifier etc., to incorporate more lexical and syntactical information into the feature vector. ",
249
+ "bbox": [
250
+ 215,
251
+ 103,
252
+ 825,
253
+ 200
254
+ ],
255
+ "page_idx": 3
256
+ },
257
+ {
258
+ "type": "text",
259
+ "text": "2. Encoding Layer encodes the representations by incorporating the context information or enriching the representation with desirable features for future use. For instance, a model can adopt bidirectional recurrent neural network to model the temporal interaction on both direction, recursive neural network(Socher et al., 2011) (also known as TreeRNN) to model the compositionality and the recursive structure of language, or self-attention to model the long-term dependency on sentence. Different components of encoder can be combined to obtain a better sentence matrix representation. ",
260
+ "bbox": [
261
+ 214,
262
+ 208,
263
+ 823,
264
+ 304
265
+ ],
266
+ "page_idx": 3
267
+ },
268
+ {
269
+ "type": "text",
270
+ "text": "3. Interaction Layer creates an word-by-word interaction tensor by both premise and hypothesis representation matrix. The interaction can be modeled in different ways. A common approach is to compute the cosine similarity or dot product between each pair of feature vector. On the other hand, a high-order interaction tensor can be constructed with the outer product between two matrix representations. ",
271
+ "bbox": [
272
+ 214,
273
+ 311,
274
+ 825,
275
+ 381
276
+ ],
277
+ "page_idx": 3
278
+ },
279
+ {
280
+ "type": "text",
281
+ "text": "4. Feature Extraction Layer adopts feature extractor to extract the semantic feature from interaction tensor. The convolutional feature extractors, such as AlexNet(Krizhevsky et al., 2012), VGG(Simonyan & Zisserman, 2014), Inception(Szegedy et al., 2014), ResNet(He et al., 2016) and DenseNet(Huang et al., 2016), proven work well on image recognition are completely compatible under such architecture. Unlike the work (Kim, 2014; Zhang et al., 2015) who employs 1-D sliding window, our CNN architecture allows 2-D kernel to extract semantic interaction feature from the word-by-word interaction between n-gram pair. Sequential or tree-like feature extractors are also applicable in the feature extraction layer. ",
282
+ "bbox": [
283
+ 214,
284
+ 388,
285
+ 825,
286
+ 512
287
+ ],
288
+ "page_idx": 3
289
+ },
290
+ {
291
+ "type": "text",
292
+ "text": "5. Output Layer decodes the acquired features to give prediction. Under the setting of NLI, the output layer predicts the confidence on each class. ",
293
+ "bbox": [
294
+ 212,
295
+ 518,
296
+ 821,
297
+ 546
298
+ ],
299
+ "page_idx": 3
300
+ },
301
+ {
302
+ "type": "text",
303
+ "text": "3.2 DENSELY INTERACTIVE INFERENCE NETWORK ",
304
+ "text_level": 1,
305
+ "bbox": [
306
+ 178,
307
+ 566,
308
+ 539,
309
+ 580
310
+ ],
311
+ "page_idx": 3
312
+ },
313
+ {
314
+ "type": "text",
315
+ "text": "Here we introduce Densely Interactive Inference Network $( \\mathrm { D I I N } ) ^ { 1 }$ , which is a relatively simple instantiation of IIN but produces state-of-the-art performance on multiple datasets. ",
316
+ "bbox": [
317
+ 174,
318
+ 593,
319
+ 823,
320
+ 622
321
+ ],
322
+ "page_idx": 3
323
+ },
324
+ {
325
+ "type": "text",
326
+ "text": "Embedding Layer: For DIIN, we use the concatenation of word embedding, character feature and syntactical features. The word embedding is obtained by mapping token to high dimensional vector space by pre-trained word vector (840B GloVe). The word embedding is updated during training. As in (Kim et al., 2016; Lee et al., 2016), we filter character embedding with 1D convolution kernel. The character convolutional feature maps are then max pooled over time dimension for each token to obtain a vector. The character features supplies extra information for some out-ofvocabulary (OOV) words. Syntactical features include one-hot part-of-speech (POS) tagging feature and binary exact match (EM) feature. The EM value is activated if there are tokens with same stem or lemma in the other sentence as the corresponding token. The EM feature is simple while found useful as in reading comprehension task (Chen et al., 2017a). In analysis section, we study how EM feature helps text understanding. Now we have premise representation $\\ b { P } \\in \\mathbb { R } ^ { p \\times d }$ and hypothesis representation $H \\in \\mathbb { R } ^ { h \\times d }$ , where $p$ refers to the sequence length of premise, $h$ refers to the sequence length of hypothesis and $d$ means the dimension of both representation. The 1-D convolutional neural network and character features weights share the same set of parameters between premise and hypothesis. ",
327
+ "bbox": [
328
+ 174,
329
+ 640,
330
+ 825,
331
+ 847
332
+ ],
333
+ "page_idx": 3
334
+ },
335
+ {
336
+ "type": "text",
337
+ "text": "Encoding Layer: In the encoding layer, the premise representation $_ { P }$ and the hypothesis representation $\\pmb { H }$ are passed through a two-layer highway network, thus having $\\hat { P } ~ \\in ~ \\mathbb { R } ^ { p \\times d }$ and $\\hat { H } \\in \\mathbb { R } ^ { h \\times d }$ for new premise representation and new hypothesis representation. These new representation are then passed to self-attention layer to take into account the word order and context information. Take premise as example, we model self-attention by ",
338
+ "bbox": [
339
+ 178,
340
+ 866,
341
+ 823,
342
+ 896
343
+ ],
344
+ "page_idx": 3
345
+ },
346
+ {
347
+ "type": "text",
348
+ "text": "",
349
+ "bbox": [
350
+ 174,
351
+ 102,
352
+ 825,
353
+ 146
354
+ ],
355
+ "page_idx": 4
356
+ },
357
+ {
358
+ "type": "equation",
359
+ "img_path": "images/4ba9bf4a9eae23fba17a677bac8a2f397b5203852a4b518d77e29aed4ae05a4b.jpg",
360
+ "text": "$$\nA _ { i j } = \\alpha ( \\hat { P } _ { i } ) , \\hat { P } _ { j } \\in \\mathbb { R }\n$$",
361
+ "text_format": "latex",
362
+ "bbox": [
363
+ 423,
364
+ 152,
365
+ 573,
366
+ 172
367
+ ],
368
+ "page_idx": 4
369
+ },
370
+ {
371
+ "type": "equation",
372
+ "img_path": "images/6df42dec6b6441c20095404bc6eb1478173c418ca3e1278726adb74194e50a55.jpg",
373
+ "text": "$$\n\\bar { P _ { i } } = \\sum _ { j = 1 } ^ { p } \\frac { \\exp ( A _ { i j } ) } { \\sum _ { k = 1 } ^ { p } \\exp ( A _ { k j } ) } \\hat { P _ { j } } ,\n$$",
374
+ "text_format": "latex",
375
+ "bbox": [
376
+ 395,
377
+ 196,
378
+ 602,
379
+ 261
380
+ ],
381
+ "page_idx": 4
382
+ },
383
+ {
384
+ "type": "text",
385
+ "text": "where $\\bar { P } _ { i }$ is a weighted summation of $\\hat { P }$ . We choose $\\begin{array} { r } { \\alpha ( { a } , { b } ) = { w } _ { a } ^ { \\top } [ { a } ; { b } ; { a } \\circ { b } ] } \\end{array}$ , where ${ \\pmb w } _ { a } \\in \\mathbb { R } ^ { 3 d }$ is a trainable weight, $\\circ$ is element-wise multiplication, [;] is vector concatenation across row, and the implicit multiplication is matrix multiplication. Then both $\\hat { P }$ and $\\bar { P }$ are fed into a semantic composite fuse gate (fuse gate in short), which acts as a skip connection. The fuse gate is implemented as ",
386
+ "bbox": [
387
+ 173,
388
+ 275,
389
+ 825,
390
+ 348
391
+ ],
392
+ "page_idx": 4
393
+ },
394
+ {
395
+ "type": "equation",
396
+ "img_path": "images/e1e21223012b2df237886bae22b40a89e9831bae983da966428d4093b46cc26b.jpg",
397
+ "text": "$$\n\\begin{array} { r l } & { z _ { i } = \\mathrm { t a n h } ( W ^ { 1 \\top } [ \\hat { P } _ { i } ; \\bar { P } _ { i } ] + b ^ { 1 } ) } \\\\ & { r _ { i } = \\sigma ( W ^ { 2 \\top } [ \\hat { P } _ { i } ; \\bar { P } _ { i } ] + b ^ { 2 } ) } \\\\ & { f _ { i } = \\sigma ( W ^ { 3 \\top } [ \\hat { P } _ { i } ; \\bar { P } _ { i } ] + b ^ { 3 } ) } \\\\ & { \\tilde { P } _ { i } = r _ { i } \\circ \\hat { P } _ { i } + f _ { i } \\circ z _ { i } } \\end{array}\n$$",
398
+ "text_format": "latex",
399
+ "bbox": [
400
+ 393,
401
+ 375,
402
+ 604,
403
+ 460
404
+ ],
405
+ "page_idx": 4
406
+ },
407
+ {
408
+ "type": "text",
409
+ "text": "where $W ^ { 1 }$ , $W ^ { 2 }$ , $W ^ { 3 } \\in \\mathbb { R } ^ { 2 d \\times d }$ and $b ^ { 1 } \\ b ^ { 2 }$ , $b ^ { 3 } \\in \\mathbb { R } ^ { d }$ are trainable weights, $\\sigma$ is sigmoid nonlinear operation. ",
410
+ "bbox": [
411
+ 176,
412
+ 473,
413
+ 825,
414
+ 502
415
+ ],
416
+ "page_idx": 4
417
+ },
418
+ {
419
+ "type": "text",
420
+ "text": "We do the same operation on hypothesis representation, thus having $\\tilde { \\cal H }$ . The weights of intraattention and fuse gate for premise and hypothesis are not shared, but the difference between the weights of are penalized. The penalization aims to ensure the parallel structure learns the similar functionality but is aware of the subtle semantic difference between premise and hypothesis. ",
421
+ "bbox": [
422
+ 174,
423
+ 511,
424
+ 825,
425
+ 568
426
+ ],
427
+ "page_idx": 4
428
+ },
429
+ {
430
+ "type": "text",
431
+ "text": "Interaction Layer: The interaction layer models the interaction between premise encoded representation $P ^ { e n c }$ and hypothesis encoded representation ${ \\pmb { H } } ^ { e n c }$ as follows: ",
432
+ "bbox": [
433
+ 173,
434
+ 583,
435
+ 820,
436
+ 612
437
+ ],
438
+ "page_idx": 4
439
+ },
440
+ {
441
+ "type": "equation",
442
+ "img_path": "images/7656e62e7bd92921148569bab63e80313e9a1860f971e11c76f46d005d5cafa1.jpg",
443
+ "text": "$$\n\\pmb { I } _ { i j } = \\beta ( \\tilde { P } _ { i } , \\tilde { \\pmb { H } } _ { j } ) \\in \\mathbb { R } ^ { d } , \\forall i \\in [ 1 , . . . , p ] , \\forall j \\in [ 1 , . . . , h ]\n$$",
444
+ "text_format": "latex",
445
+ "bbox": [
446
+ 323,
447
+ 617,
448
+ 673,
449
+ 638
450
+ ],
451
+ "page_idx": 4
452
+ },
453
+ {
454
+ "type": "text",
455
+ "text": "where $\\tilde { P } _ { i }$ is the $i$ -th row vector of $\\tilde { P }$ , and $\\tilde { H } _ { j }$ is the $j$ -th row vector of $\\tilde { \\cal H }$ . Though there are many implementations of interaction, we find $\\beta ( a , \\dot { b } ) = a \\circ b$ very useful. ",
456
+ "bbox": [
457
+ 173,
458
+ 652,
459
+ 823,
460
+ 684
461
+ ],
462
+ "page_idx": 4
463
+ },
464
+ {
465
+ "type": "text",
466
+ "text": "Feature Extraction Layer: We adopt DenseNet(Huang et al., 2016) as convolutional feature extractor in DIIN. Though our experiments show ResNet(He et al., 2016) works well in the architecture, we choose DenseNet because it is effective in saving parameters. One interesting observation with ResNet is that if we remove the skip connection in residual structure, the model does not converge at all. We found batch normalization delays convergence without contributing to accuracy, therefore we does not use it in our case. A ReLU activation function is applied after all convolution unless otherwise noted. Once we have the interaction tensor $\\pmb { I }$ , we use a convolution with $1 \\times 1$ kernel to scale down the tensor in a ratio, $\\eta$ , without following ReLU. If the input channel is $k$ then the output channel is $f l o o r ( k \\times \\eta )$ . Then the generated feature map is feed into three sets of Dense block(Huang et al., 2016) and transition block pair. The DenseNet block contains $n$ layers of $3 \\times 3$ convolution layer with growth rate of $g$ . The transition layer has a convolution layer with $1 \\times 1$ kernel for scaling down purpose, followed by a max pooling layer with stride 2. The transition scale down ratio in transition layer is $\\theta$ . ",
467
+ "bbox": [
468
+ 173,
469
+ 698,
470
+ 825,
471
+ 880
472
+ ],
473
+ "page_idx": 4
474
+ },
475
+ {
476
+ "type": "text",
477
+ "text": "Output Layer: DIIN uses a linear layer to classify final flattened feature representation to three classes. ",
478
+ "bbox": [
479
+ 176,
480
+ 895,
481
+ 823,
482
+ 924
483
+ ],
484
+ "page_idx": 4
485
+ },
486
+ {
487
+ "type": "text",
488
+ "text": "4 EXPERIMENTS ",
489
+ "text_level": 1,
490
+ "bbox": [
491
+ 174,
492
+ 102,
493
+ 326,
494
+ 118
495
+ ],
496
+ "page_idx": 5
497
+ },
498
+ {
499
+ "type": "text",
500
+ "text": "In this section, we present the evaluation of our model. We first perform quantitative evaluation, comparing our model with other competitive models. We then conduct some qualitative analyses to understand how DIIN achieve the high level understanding through interaction. ",
501
+ "bbox": [
502
+ 174,
503
+ 133,
504
+ 825,
505
+ 176
506
+ ],
507
+ "page_idx": 5
508
+ },
509
+ {
510
+ "type": "text",
511
+ "text": "4.1 DATA ",
512
+ "text_level": 1,
513
+ "bbox": [
514
+ 174,
515
+ 193,
516
+ 253,
517
+ 208
518
+ ],
519
+ "page_idx": 5
520
+ },
521
+ {
522
+ "type": "text",
523
+ "text": "Here we introduce three datasets we evaluate our model on. The evaluation metric for all dataset is accuracy. ",
524
+ "bbox": [
525
+ 176,
526
+ 219,
527
+ 823,
528
+ 247
529
+ ],
530
+ "page_idx": 5
531
+ },
532
+ {
533
+ "type": "text",
534
+ "text": "SNLI Stanford Natural Language Inference (SNLI; Bowman et al. 2015) has 570k human annotated sentence pairs. The premise data is draw from the captions of the Flickr30k corpus, and the hypothesis data is manually composed. The labels provided in are “entailment”, “neutral’, “contradiction” and “-”. “-” shows that annotators cannot reach consensus with each other, thus removed during training and testing as in other works. We use the same data split as in Bowman et al. (2015). ",
535
+ "bbox": [
536
+ 173,
537
+ 263,
538
+ 825,
539
+ 334
540
+ ],
541
+ "page_idx": 5
542
+ },
543
+ {
544
+ "type": "text",
545
+ "text": "MultiNLI Multi-Genre NLI Corpus (MultiNLI; Williams et al. 2017) has $4 3 3 \\mathrm { k }$ sentence pairs, whose collection process and task detail are modeled closely to SNLI. The premise data is collected from maximally broad range of genre of American English such as written non-fiction genres (SLATE, OUP, GOVERNMENT, VERBATIM, TRAVEL), spoken genres (TELEPHONE, FACETO-FACE), less formal written genres (FICTION, LETTERS) and a specialized one for 9/11. Half of these selected genres appear in training set while the rest are not, creating in-domain (matched) and cross-domain (mismatched) development/test sets. We use the same data split as provided by Williams et al. (2017). Since test set labels are not provided, the test performance is obtained through submission on Kaggle.com2. Each team is limited to two submissions per day. ",
546
+ "bbox": [
547
+ 173,
548
+ 348,
549
+ 825,
550
+ 474
551
+ ],
552
+ "page_idx": 5
553
+ },
554
+ {
555
+ "type": "text",
556
+ "text": "Quora question pair Quora question pair dataset contains over $4 0 0 \\mathrm { k }$ real world question pair selected from Quora.com. A binary annotation which stands for match (duplicate) or not match (not duplicate) is provided for each question pair. In our case, duplicate question pair can be interpreted as entailment relation and not duplicate as neutral. We use the same split ratio as mentioned in (Wang et al., 2017). ",
557
+ "bbox": [
558
+ 174,
559
+ 491,
560
+ 825,
561
+ 560
562
+ ],
563
+ "page_idx": 5
564
+ },
565
+ {
566
+ "type": "text",
567
+ "text": "4.2 EXPERIMENTS SETTING ",
568
+ "text_level": 1,
569
+ "bbox": [
570
+ 176,
571
+ 578,
572
+ 380,
573
+ 592
574
+ ],
575
+ "page_idx": 5
576
+ },
577
+ {
578
+ "type": "text",
579
+ "text": "We implement our algorithm with Tensorflow(Abadi et al., 2016) framework. An Adadelta optimizer(Zeiler, 2012) with $\\rho$ as 0.95 and $\\epsilon$ as $1 \\mathrm { e } { - 8 }$ is used to optimize all the trainable weights. The initial learning rate is set to 0.5 and batch size to 70. When the model does not improve best indomain performance for 30,000 steps, an SGD optimizer with learning rate of $3 \\mathrm { e } { - 4 }$ is used to help model to find a better local optimum. Dropout layers are applied before all linear layers and after word-embedding layer. We use an exponential decayed keep rate during training, where the initial keep rate is 1.0 and the decay rate is 0.977 for every 10,000 step. We initialize our word embeddings with pre-trained 300D GloVe 840B vectors Pennington et al. (2014) while the out-of-vocabulary word are randomly initialized with uniform distribution. The character embeddings are randomly initialized with 100D. We crop or pad each token to have 16 characters. The 1D convolution kernel size for character embedding is 5. All weights are constraint by L2 regularization, and the L2 regularization at step $t$ is calculated as follows: ",
580
+ "bbox": [
581
+ 173,
582
+ 604,
583
+ 825,
584
+ 771
585
+ ],
586
+ "page_idx": 5
587
+ },
588
+ {
589
+ "type": "equation",
590
+ "img_path": "images/51b3660a97130ca8e7508e99ebc5ef8478346f5365158d5b51ec2cb8fbadffee.jpg",
591
+ "text": "$$\nL 2 R a t i o _ { t } = \\sigma ( \\frac { ( t - L 2 F u l l S t e p / 2 ) \\times 8 } { L 2 F u l l S t e p / 2 } ) \\times L 2 F u l l R a t i o\n$$",
592
+ "text_format": "latex",
593
+ "bbox": [
594
+ 299,
595
+ 777,
596
+ 697,
597
+ 813
598
+ ],
599
+ "page_idx": 5
600
+ },
601
+ {
602
+ "type": "text",
603
+ "text": "where L2F ullRatio determines the maximum L2 regularization ratio, and L2F ullStep determines at which step the maximum L2 regularization ratio would be applied on the L2 regularization. We choose $L 2 F$ ullRatio as $0 . 9 e - 5$ and L2F ullStep as 100,000. The ratio of L2 penalty between the difference of two encoder weights is set to $1 e - 3$ . For a dense block in feature extraction layer, the number of layer $n$ is set to 8 and growth rate $g$ is set to 20. The first scale down ratio $\\eta$ in feature extraction layer is set to 0.3 and transitional scale down ratio $\\theta$ is set to 0.5. The sequence length is set as a hard cutoff on all experiments: 48 for MultiNLI, 32 for SNLI and 24 for Quora Question Pair Dataset. During the experiments on MultiNLI, we use $15 \\%$ of data from SNLI as in Williams et al. (2017). We select the parameter by the best run of development accuracy. Our ensembling approach considers the majority vote of the predictions given by multiple runs of the same model under different random parameter initialization. ",
604
+ "bbox": [
605
+ 174,
606
+ 819,
607
+ 825,
608
+ 861
609
+ ],
610
+ "page_idx": 5
611
+ },
612
+ {
613
+ "type": "table",
614
+ "img_path": "images/c79dfa60a11ebd7edcd57465df5c6de9a53a7d2ff32800de844658bf0c600b2a.jpg",
615
+ "table_caption": [
616
+ "Table 2: MultiNLI result. "
617
+ ],
618
+ "table_footnote": [],
619
+ "table_body": "<table><tr><td>Model</td><td colspan=\"2\">Test Accuracy</td></tr><tr><td></td><td>Matched</td><td>Mismatched</td></tr><tr><td>1. BiLSTM(Williams et al.,2017)</td><td>67.0</td><td>67.6</td></tr><tr><td>2.InnerAtt(Balazs et al.,2017)</td><td>72.1</td><td>72.1</td></tr><tr><td>3.ESIM(Williams et al.,2017)</td><td>72.3</td><td>72.1</td></tr><tr><td>4. Gated-Att BiLSTM(Chen et al.,2017b)</td><td>73.2</td><td>73.6</td></tr><tr><td>5.Shorcut-Stacked encoder(Nie &amp; Bansal, 2017)</td><td>74.6</td><td>73.6</td></tr><tr><td>6. DIIN</td><td>78.8</td><td>77.8</td></tr><tr><td>7.InnerAtt(ensemble)</td><td>72.2</td><td>72.8</td></tr><tr><td>8.Gated-Att BiLSTM (ensemble)</td><td>74.9</td><td>74.9</td></tr><tr><td>9.DIIN (ensemble)</td><td>80.0</td><td>78.7</td></tr></table>",
620
+ "bbox": [
621
+ 256,
622
+ 101,
623
+ 741,
624
+ 262
625
+ ],
626
+ "page_idx": 6
627
+ },
628
+ {
629
+ "type": "text",
630
+ "text": "",
631
+ "bbox": [
632
+ 174,
633
+ 316,
634
+ 825,
635
+ 428
636
+ ],
637
+ "page_idx": 6
638
+ },
639
+ {
640
+ "type": "text",
641
+ "text": "4.3 EXPERIMENT ON MULTINLI ",
642
+ "text_level": 1,
643
+ "bbox": [
644
+ 176,
645
+ 452,
646
+ 411,
647
+ 467
648
+ ],
649
+ "page_idx": 6
650
+ },
651
+ {
652
+ "type": "text",
653
+ "text": "We compare our result with all other published systems in Table 2. Besides ESIM, the state-of-theart model on SNLI, all other models appear at RepEval 2017 workshop. RepEval 2017 workshop requires all submitted model to be sentence encoding-based model therefore alignment between sentences and memory module are not eligible for competition. All models except ours share one common feature that they use LSTM as a essential building block as encoder. Our approach, without using any recurrent structure, achieves the new state-of-the-art performance of $8 0 . 0 \\%$ , exceeding current state-of-the-art performance by more than $5 \\%$ . Unlike the observation from Nangia et al. (2017), we find the out-of-domain test performance is consistently lower than in-domain test performance. Selecting parameters from the best in-domain development accuracy partially contributes to this result. ",
654
+ "bbox": [
655
+ 173,
656
+ 481,
657
+ 825,
658
+ 619
659
+ ],
660
+ "page_idx": 6
661
+ },
662
+ {
663
+ "type": "text",
664
+ "text": "4.4 EXPERIMENT ON SNLI ",
665
+ "text_level": 1,
666
+ "bbox": [
667
+ 176,
668
+ 645,
669
+ 375,
670
+ 659
671
+ ],
672
+ "page_idx": 6
673
+ },
674
+ {
675
+ "type": "text",
676
+ "text": "In Table 3, we compare our model to other model performance on SNLI. Experiments (2-7) are sentence encoding based model. Bowman et al. (2016) provides a BiLSTM baseline. Vendrov et al. (2015) adopts two layer GRU encoder with pre-trained ”skip-thoughts” vectors. To capture sentence-level semantics, Mou et al. (2015) use tree-based CNN and Bowman et al. (2016) propose a stack-augmented parser-interpreter neural network (SPINN) which incorporates parsing information in a sequential manner. Liu et al. (2016) uses intra-attention on top of BiLSTM to generate sentence representation, and Munkhdalai & Yu (2016) proposes an memory augmented neural network to encode the sentence. The next group of model, experiments (8-18), uses cross sentence feature. Rocktaschel et al. (2015) aligns each sentence word-by-word with attention on top of LSTMs. Wang ¨ & Jiang (2015) enforces cross sentence attention word-by-word matching with the proprosed mLSTM model. Cheng et al. (2016) proposes long short-term memory-network(LSTMN) with deep attention fusion that links the current word to previous word stored in memory. Parikh et al. (2016) decomposes the task into sub-problems and conquer them respectively. Yu & Munkhdalai (2017) proposes neural tree indexer, a full $n$ -ary tree whose subtrees can be overlapped. Re-read LSTM proposed by Sha et al. (2016) considers the attention vector of one sentence as the inner-state of LSTM for another sentence. Chen et al. (2016) propose a sequential model that infers locally, and a ensemble with tree-like inference module that further improves performance. We show our model, DIIN, achieves state-of-the-art performance on the competitive leaderboard. ",
677
+ "bbox": [
678
+ 173,
679
+ 674,
680
+ 825,
681
+ 924
682
+ ],
683
+ "page_idx": 6
684
+ },
685
+ {
686
+ "type": "table",
687
+ "img_path": "images/8705a38b79454aabe5804fdc72e9c7b98605fa45b6122d9b64545c9c7cd9ac41.jpg",
688
+ "table_caption": [
689
+ "Table 3: SNLI result. "
690
+ ],
691
+ "table_footnote": [],
692
+ "table_body": "<table><tr><td>Model</td><td>Test Accuracy SNLI</td></tr><tr><td>1.Handcrafted features(Bowman et al.,2015) 2.LSTM encoder(Bowman et al., 2016)</td><td>78.2</td></tr><tr><td>3.pretrained GRU encoders(Vendrov et al.,2015) 4.tree-based CNN encoders(Mou et al.,2015) 5.SPINN-PI encoders(Bowman et al.,2016) 6.BiLSTM intra-attention encoders(Liu et al., 2016) 7.NSE encoders(Munkhdalai &amp; Yu,2016)</td><td>80.6 81.4 82.1 83.2 84.2 84.6</td></tr><tr><td>8.LSTM with attention(Rocktäschel et al.,2015) 9.mLSTM(Wang&amp; Jiang,2015) 10.LSTMN with deep attention fusion(Cheng et al.,2016) 11. decomposable attention model(Parikh et al., 2016) 12.Intra-sentence attention +(11)(Parikh et al.,2016) 13.BiMPM(Wang et al.,2017) 14.NTI-SLSTM-LSTM(Yu&amp; Munkhdalai,2017)</td><td>83.5 86.1 86.3 86.3 86.8 86.9</td></tr><tr><td>15.re-read LSTM(Sha et al.,2016) 16.ESIM(Chen et al.,2016) 17.ESIM ensemble with syntactic tree-LSTM(Chen et al.,2016) 18.BiMPM (ensemble)(Wang et al.,2017)</td><td>87.3 87.5 88.0 88.6 88.8</td></tr></table>",
693
+ "bbox": [
694
+ 241,
695
+ 102,
696
+ 758,
697
+ 412
698
+ ],
699
+ "page_idx": 7
700
+ },
701
+ {
702
+ "type": "table",
703
+ "img_path": "images/6eb312e12453e979b5ff746c38a06cffb0d17b53fd070adf9d990aabad68cab8.jpg",
704
+ "table_caption": [],
705
+ "table_footnote": [
706
+ "Table 4: Quora question dataset result. First six rows are copied from Wang et al. (2017) and next two rows from (Tomar et al., 2017). "
707
+ ],
708
+ "table_body": "<table><tr><td rowspan=\"2\">Model</td><td colspan=\"2\">Accuracy</td></tr><tr><td>Dev Acc</td><td>Test Acc</td></tr><tr><td>1. Siamese-CNN</td><td>=</td><td>79.60</td></tr><tr><td>2.Multi-Perspective CNN</td><td></td><td>81.38</td></tr><tr><td>3.Siamese-LSTM</td><td>=</td><td>82.58</td></tr><tr><td> 4.Multi-Perspective-LSTM</td><td>=</td><td>83.21</td></tr><tr><td>5. L.D.C</td><td>=</td><td>85.55</td></tr><tr><td>6. BiMPM(Wang et al.,2017)</td><td>88.69</td><td>88.17</td></tr><tr><td>7. pt-DECATTword(Tomar et al.,2017)</td><td>88.44</td><td>87.54</td></tr><tr><td>8. pt-DECATTchar(Tomar et al.,2017)</td><td>88.89</td><td>88.40</td></tr><tr><td>9. DIIN</td><td>89.44</td><td>89.06</td></tr><tr><td>10.DIIN (ensemble)</td><td>90.48</td><td>89.84</td></tr></table>",
709
+ "bbox": [
710
+ 299,
711
+ 450,
712
+ 697,
713
+ 631
714
+ ],
715
+ "page_idx": 7
716
+ },
717
+ {
718
+ "type": "text",
719
+ "text": "4.5 EXPERIMENT ON QUORA QUESTION PAIR DATASET ",
720
+ "text_level": 1,
721
+ "bbox": [
722
+ 174,
723
+ 696,
724
+ 570,
725
+ 712
726
+ ],
727
+ "page_idx": 7
728
+ },
729
+ {
730
+ "type": "text",
731
+ "text": "In this subsection, we evaluate the effectiveness of our model for paraphrase identification as natural language inference task. Other than our baselines, we compare with Wang et al. (2017) and Tomar et al. (2017). BIMPM models different perspective of matching between sentence pair on both direction, then aggregates matching vector with LSTM. $\\operatorname { D E C A T T } _ { w o r d }$ and $\\mathrm { D E C A T T } _ { c h a r }$ uses automatically collected in-domain paraphrase data to noisy pretrain $n$ -gram word embedding and $n$ - gram subword embedding correspondingly on decomposable attention model proposed by (Parikh et al., 2016). In Table 4, our experiment shows DIIN has better performance than all other models and an ensemble score is higher than the former best result for more than 1 percent. ",
732
+ "bbox": [
733
+ 174,
734
+ 723,
735
+ 825,
736
+ 835
737
+ ],
738
+ "page_idx": 7
739
+ },
740
+ {
741
+ "type": "text",
742
+ "text": "4.6 ANALYSIS ",
743
+ "text_level": 1,
744
+ "bbox": [
745
+ 174,
746
+ 854,
747
+ 285,
748
+ 868
749
+ ],
750
+ "page_idx": 7
751
+ },
752
+ {
753
+ "type": "text",
754
+ "text": "Ablation Study We conduct a ablation study on our base model to examine the effectiveness of each component. We study our model on MultiNLI dataset and we use Matched validation score as the standard for model selection. The result is shown in Table 5. We studies how EM feature contributes to the system. After removing the exact match binary feature, we find the performance degrade to 78.2 on matched score on development set and 78.0 on mismatched score. As observed in reading comprehension task Chen et al. (2017a), the simple exact match feature does help the model to better understand the sentences. In the experiment 3, we remove the convolutional feature extractor and then model is structured as a sentence-encoding based model. The sentence representation matrix is max-pooled over time to obtain a feature vector. Once we have the feature vector $p$ for premise and $h$ for hypothesis, we use $[ p ; h ; | p - h | ; p \\circ h ]$ as final feature vector to classify the relationship. We obtain 73.2 for matched score and 73.6 on mismatched data. The result is competitive among other sentence-encoding based model. We further study how encoding layer contribute in enriching the feature space in interaction tensor. If we remove encoding layer completely, then we’ll obtain a 73.5 for matched score and 73.2 for mismatched score. The result demonstrate the feature extraction layer have powerful capability to capture the semantic feature. In experiment 5, we remove both self-attention and fuse gate, thus retaining only highway network. The result improves to 77.7 and 77.3 respectively on matched and mismatched development set. However, in experiment 6, when we only remove fuse gate, to our surprise, the performance degrade to 73.5 for matched score and 73.8 for mismatched. On the other hand, if we use the addition of the representation after highway network and the representation after self-attention as skip connection as in experiment 7, the performance increase to 77.3 and 76.3. The comparison indicates self-attention layer makes the training harder to converge while a skip connection could ease the gradient flow for both highway layer and self-attention layer. By comparing the base model and the model the in experiment 6, we show that the fuse gate not only well serves as a skip connection, but also makes good decision upon which information the fuse for both representation. To show that dense interaction tensor contains more semantic information, we replace the dense interaction tensor with dot product similarity matrix between the encoded representation of premise and hypothesis. The result shows that the dot product similarity matrix has an inferior capacity of semantic information. Another dimensionality study is provided in supplementary material. In experiment 9, we share the encoding layer weight, and the result decrease from the baseline. The result shows that the two set of encoding weights learn the subtle difference between premise and hypothesis. ",
755
+ "bbox": [
756
+ 176,
757
+ 882,
758
+ 823,
759
+ 922
760
+ ],
761
+ "page_idx": 7
762
+ },
763
+ {
764
+ "type": "table",
765
+ "img_path": "images/8432bc71249483087386f53aab7cd990fef3c2cff967326be069b5888c2d9179.jpg",
766
+ "table_caption": [
767
+ "Table 5: Ablation study result. "
768
+ ],
769
+ "table_footnote": [],
770
+ "table_body": "<table><tr><td>Ablation Experiments</td><td colspan=\"2\">Dev Accuracy Matched Mismatched</td></tr><tr><td>1. DIIN</td><td>79.2</td><td>79.1</td></tr><tr><td>2. DIIN - EM feature</td><td>78.2</td><td>78.0</td></tr><tr><td>3.DIIN - conv structure</td><td>73.2</td><td>73.6</td></tr><tr><td>4.DIIN - encoding layer</td><td>73.5</td><td>73.2</td></tr><tr><td>5.DIIN - self-att and fuse gate</td><td>77.7</td><td>77.3</td></tr><tr><td>6.DIIN - fuse gate</td><td>73.5</td><td>73.8</td></tr><tr><td>7. DIIN - fuse gate + addition as skip connection</td><td>77.3</td><td>76.3</td></tr><tr><td>8.DIIN - dense interaction tensor + similarity matrix</td><td>75.2</td><td>75.5</td></tr><tr><td>9.DIIN - tied encoding layer parameter</td><td>78.5</td><td>78.3</td></tr></table>",
771
+ "bbox": [
772
+ 245,
773
+ 101,
774
+ 753,
775
+ 268
776
+ ],
777
+ "page_idx": 8
778
+ },
779
+ {
780
+ "type": "text",
781
+ "text": "",
782
+ "bbox": [
783
+ 174,
784
+ 316,
785
+ 825,
786
+ 705
787
+ ],
788
+ "page_idx": 8
789
+ },
790
+ {
791
+ "type": "text",
792
+ "text": "Error analysis To analyze the model prediction, we use annotated subset of development set provided by Williams et al. (2017) that consists of 1,000 examples each tagged with zero or more following tags: ",
793
+ "bbox": [
794
+ 176,
795
+ 719,
796
+ 825,
797
+ 762
798
+ ],
799
+ "page_idx": 8
800
+ },
801
+ {
802
+ "type": "text",
803
+ "text": "• CONDITIONAL: whether the sentence contains a conditional. \n• WORD OVERLAP: whether both sentences share more than $70 \\%$ of their tokens. \n• NEGATION: whether a negation shows up in either sentence. \n• ANTO: whether two sentences contain antonym pair. \n• LONG SENTENCE: whether premise or hypothesis is longer than 30 or 16 tokens respectively. \n• TENSE DIFFERENCE: whether any verb in two sentences uses different tense. \n• ACTIVE/PASSIVE: whether there is an active-to-passive (or vice versa) transformation from the premise to the hypothesis. ",
804
+ "bbox": [
805
+ 215,
806
+ 771,
807
+ 825,
808
+ 924
809
+ ],
810
+ "page_idx": 8
811
+ },
812
+ {
813
+ "type": "table",
814
+ "img_path": "images/3047cf87cc06333b6465ebe6f655f2d05e99c152c78b69709060894e68153ef4.jpg",
815
+ "table_caption": [
816
+ "Table 6: MultiNLI result. "
817
+ ],
818
+ "table_footnote": [],
819
+ "table_body": "<table><tr><td></td><td>Annotation Tag</td><td>Label Frequency</td><td>BiLSTM</td><td>BaLazs</td><td>Chen</td><td>DIN</td></tr><tr><td></td><td>CONDITIONAL WORD OVERLAP</td><td>5%</td><td>100%</td><td>100%</td><td>100%</td><td>57%</td></tr><tr><td></td><td></td><td>6%</td><td>50%</td><td>63%</td><td>63%</td><td>79%</td></tr><tr><td></td><td>NEGATION</td><td>26%</td><td>71%</td><td>75%</td><td>75%</td><td>78%</td></tr><tr><td></td><td>ANTO</td><td>3%</td><td>67%</td><td>50%</td><td>50%</td><td>82%</td></tr><tr><td></td><td>LONG SENTENCE</td><td>20%</td><td>50%</td><td>75%</td><td>67%</td><td>81%</td></tr><tr><td>Matched</td><td>TENSEDIFFERENCE</td><td>10%</td><td>64%</td><td>68%</td><td>86%</td><td>84%</td></tr><tr><td></td><td>ACTIVE/PASSIVE</td><td>3%</td><td>75%</td><td>75%</td><td>88%</td><td>93%</td></tr><tr><td></td><td>PARAPHRASE</td><td>5%</td><td>78%</td><td>83%</td><td>78%</td><td>88%</td></tr><tr><td></td><td>QUANTITY/TIME REASONING</td><td>3%</td><td>50%</td><td>50%</td><td>33%</td><td>53%</td></tr><tr><td></td><td>COREF</td><td>6%</td><td>83%</td><td>83%</td><td>83%</td><td>77%</td></tr><tr><td></td><td>QUANTIFIER</td><td>25%</td><td>64%</td><td>59%</td><td>74%</td><td>74%</td></tr><tr><td></td><td>MODAL</td><td>29%</td><td>66%</td><td>65%</td><td>75%</td><td>84%</td></tr><tr><td></td><td>BELIEF</td><td>13%</td><td>74%</td><td>71%</td><td>73%</td><td>77%</td></tr><tr><td></td><td>CONDITIONAL</td><td>5%</td><td>100%</td><td>80%</td><td>100%</td><td>69%</td></tr><tr><td></td><td>WORD OVERLAP</td><td>7%</td><td>58%</td><td>62%</td><td>76%</td><td>92%</td></tr><tr><td></td><td>NEGATION</td><td>21%</td><td>69%</td><td>73%</td><td>72%</td><td>77%</td></tr><tr><td></td><td>ANTO</td><td>4%</td><td>58%</td><td>58%</td><td>58%</td><td>80%</td></tr><tr><td></td><td>LONG SENTENCE</td><td>20%</td><td>55%</td><td>67%</td><td>67%</td><td>73%</td></tr><tr><td></td><td>TENSEDIFFERENCE</td><td>4%</td><td>71%</td><td>71%</td><td>89%</td><td>78%</td></tr><tr><td>Mismatched</td><td>ACTIVE/PASSIVE</td><td>2%</td><td>82%</td><td>82%</td><td>91%</td><td>70%</td></tr><tr><td></td><td>PARAPHRASE</td><td>7%</td><td>81%</td><td>89%</td><td>89%</td><td>100%</td></tr><tr><td></td><td>QUANTITY/TIME REASONING</td><td>8%</td><td>46%</td><td>54%</td><td>46%</td><td>69%</td></tr><tr><td></td><td>COREF</td><td>6%</td><td>80%</td><td>70%</td><td>80%</td><td>79%</td></tr><tr><td></td><td>QUANTIFIER</td><td>28%</td><td>70%</td><td>68%</td><td>77%</td><td>78%</td></tr><tr><td></td><td>MODAL</td><td>25%</td><td>67%</td><td>67%</td><td>76%</td><td>75%</td></tr><tr><td></td><td>BELIEF</td><td>12%</td><td>73%</td><td>71%</td><td>74%</td><td>81%</td></tr></table>",
820
+ "bbox": [
821
+ 212,
822
+ 101,
823
+ 787,
824
+ 395
825
+ ],
826
+ "page_idx": 9
827
+ },
828
+ {
829
+ "type": "text",
830
+ "text": "• PARAPHRASE: whether the two sentences are close paraphrases • QUANTITY/TIME REASONING: whether understanding the pair requires quantity or time reasoning. ",
831
+ "bbox": [
832
+ 217,
833
+ 443,
834
+ 668,
835
+ 457
836
+ ],
837
+ "page_idx": 9
838
+ },
839
+ {
840
+ "type": "text",
841
+ "text": "",
842
+ "bbox": [
843
+ 217,
844
+ 462,
845
+ 821,
846
+ 489
847
+ ],
848
+ "page_idx": 9
849
+ },
850
+ {
851
+ "type": "text",
852
+ "text": "• COREF: Whether the hypothesis contains a pronoun or referring expression that needs to be resolved using the premise. ",
853
+ "bbox": [
854
+ 212,
855
+ 493,
856
+ 823,
857
+ 522
858
+ ],
859
+ "page_idx": 9
860
+ },
861
+ {
862
+ "type": "text",
863
+ "text": "• QUANTIFIER: Whether either sentence contains one of the following quantifier: much, enough, more, most, less, least, no, none, some, any, many, few, several, almost, nearly. ",
864
+ "bbox": [
865
+ 215,
866
+ 526,
867
+ 821,
868
+ 554
869
+ ],
870
+ "page_idx": 9
871
+ },
872
+ {
873
+ "type": "text",
874
+ "text": "• MODAL: Whether one of the following modal verbs appears in either sentence: can, could, may, might, must, will, would, should. ",
875
+ "bbox": [
876
+ 215,
877
+ 558,
878
+ 821,
879
+ 587
880
+ ],
881
+ "page_idx": 9
882
+ },
883
+ {
884
+ "type": "text",
885
+ "text": "• BELIEF: Whether one of the following belief verbs appear in either sentence: know, believe, understand, doubt, think, suppose, recognize, forget, remember, imagine, mean, agree, disagree, deny, promise. ",
886
+ "bbox": [
887
+ 215,
888
+ 590,
889
+ 823,
890
+ 633
891
+ ],
892
+ "page_idx": 9
893
+ },
894
+ {
895
+ "type": "text",
896
+ "text": "For more detailed descriptions, please resort to Williams et al. (2017). The result is shown in Table 6. We find DIIN is consistently better on sentence pair with WORD OVERLAP, ANTO, LONG SENTENCE, PARAPHRASE and BELIEF tags by a large margin. During investigation, we hypothesize exact match feature helps the model to better understand paraphrase, therefore we study the result from second ablation ablation study where exact match feature is not used. Surprisingly, the model without exact model feature does not work worse on PARAPHRASE, instead, the accuracy on ANTO drops about $10 \\%$ . DIIN is also work well on LONG SENTENCE, partially because the receptive field is large enough to cover all tokens. ",
897
+ "bbox": [
898
+ 173,
899
+ 645,
900
+ 825,
901
+ 756
902
+ ],
903
+ "page_idx": 9
904
+ },
905
+ {
906
+ "type": "text",
907
+ "text": "Visualization We also visualize the hidden representation from interaction tensor $\\pmb { I }$ and the feature map from first dense block in Figure 2. We pick a sentence pair whose premise is “South Carolina has no referendum right, so the Supreme Court canceled the vote and upheld the ban.” and hypothesis is “South Carolina has a referendum right, so the Supreme Court was powerless over the state.”. The upper row of figures are sampled from hidden representation of interaction tensor I. We observe the values of neurons are highly correlated row-wise and column-wise in the interaction tensor $\\pmb { I }$ and different channel of hidden representation shows different aspect of interaction. Though in certain channel same words, “referendum”, or phrases, “supreme court”, cause activation, different word or phrase pair, such as “ban” and “powerless over”, also cause activation in other activation. It shows the model’s strong capacity of understanding text in different perspective. The lower row of Figure 2 shows the feature map from first dense block. After being convolved from the interaction tensor and previous feature map, new feature maps shows activation in different position, demonstrating different semantic features are found. The first figure in the lower row has similar pattern as normal attention weight whereas others has no obvious pattern. Different channels of feature maps indicate different kinds of semantic feature. ",
908
+ "bbox": [
909
+ 174,
910
+ 770,
911
+ 825,
912
+ 924
913
+ ],
914
+ "page_idx": 9
915
+ },
916
+ {
917
+ "type": "text",
918
+ "text": "",
919
+ "bbox": [
920
+ 174,
921
+ 103,
922
+ 825,
923
+ 159
924
+ ],
925
+ "page_idx": 10
926
+ },
927
+ {
928
+ "type": "image",
929
+ "img_path": "images/5180e5a0e6ada4a5fb9e913926f5c429d17a91e3381730b81670626127a7da88.jpg",
930
+ "image_caption": [
931
+ "Figure 2: A visualization of hidden representation. The premise is “South Carolina has no referendum right, so the Supreme Court canceled the vote and upheld the ban.” and the hypothesis is “South Carolina has a referendum right, so the Supreme Court was powerless over the state.”. The upper row are sampled from interaction tensor $I$ and the lower row are sample from the feature map of first dense block. We use viridis colormap, where yellow represents activation and purple shows the neuron is not active. "
932
+ ],
933
+ "image_footnote": [],
934
+ "bbox": [
935
+ 179,
936
+ 181,
937
+ 813,
938
+ 440
939
+ ],
940
+ "page_idx": 10
941
+ },
942
+ {
943
+ "type": "text",
944
+ "text": "5 CONCLUSION AND FUTURE WORK ",
945
+ "text_level": 1,
946
+ "bbox": [
947
+ 176,
948
+ 580,
949
+ 495,
950
+ 597
951
+ ],
952
+ "page_idx": 10
953
+ },
954
+ {
955
+ "type": "text",
956
+ "text": "We show the interaction tensor (or attention weight) contains semantic information to understand the natural language. We introduce Interactive Inference Network, a novel class of architecture that allows the model to solve NLI or NLI alike tasks via extracting semantic feature from interaction tensor end-to-end. One instance of such architecture, Densely Interactive Inference Network (DIIN), achieves state-of-the-art performance on multiple datasets. By ablating each component in DIIN and changing the dimensionality, we show the effectiveness of each component in DIIN. ",
957
+ "bbox": [
958
+ 174,
959
+ 614,
960
+ 825,
961
+ 698
962
+ ],
963
+ "page_idx": 10
964
+ },
965
+ {
966
+ "type": "text",
967
+ "text": "Though we have the initial exploration of natural language inference in interaction space, the full potential is not yet clear. We will keep exploring the potential of interaction space. Incorporating common-sense knowledge from external resources such as knowledge base to leverage the capacity of the mode is another research goal of ours. ",
968
+ "bbox": [
969
+ 176,
970
+ 705,
971
+ 825,
972
+ 761
973
+ ],
974
+ "page_idx": 10
975
+ },
976
+ {
977
+ "type": "text",
978
+ "text": "ACKNOWLEDGMENTS ",
979
+ "text_level": 1,
980
+ "bbox": [
981
+ 176,
982
+ 780,
983
+ 326,
984
+ 792
985
+ ],
986
+ "page_idx": 10
987
+ },
988
+ {
989
+ "type": "text",
990
+ "text": "We thank Yuchen Lu, Chang Huang and Kai Yu for their sincere and insightful advice. ",
991
+ "bbox": [
992
+ 178,
993
+ 804,
994
+ 738,
995
+ 819
996
+ ],
997
+ "page_idx": 10
998
+ },
999
+ {
1000
+ "type": "text",
1001
+ "text": "REFERENCES ",
1002
+ "text_level": 1,
1003
+ "bbox": [
1004
+ 176,
1005
+ 843,
1006
+ 285,
1007
+ 858
1008
+ ],
1009
+ "page_idx": 10
1010
+ },
1011
+ {
1012
+ "type": "text",
1013
+ "text": "Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dan Mane, Rajat Monga, Sherry Moore, Derek Murray, Chris Olah, ",
1014
+ "bbox": [
1015
+ 176,
1016
+ 867,
1017
+ 825,
1018
+ 924
1019
+ ],
1020
+ "page_idx": 10
1021
+ },
1022
+ {
1023
+ "type": "text",
1024
+ "text": "Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda Viegas, Oriol Vinyals, Pete Warden, Martin Wattenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. TensorFlow: Large-Scale Machine Learning on Heterogeneous Distributed Systems. arXiv.org, March 2016. ",
1025
+ "bbox": [
1026
+ 189,
1027
+ 103,
1028
+ 823,
1029
+ 160
1030
+ ],
1031
+ "page_idx": 11
1032
+ },
1033
+ {
1034
+ "type": "text",
1035
+ "text": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural Machine Translation by Jointly Learning to Align and Translate. arXiv.org, September 2014. ",
1036
+ "bbox": [
1037
+ 173,
1038
+ 167,
1039
+ 823,
1040
+ 196
1041
+ ],
1042
+ "page_idx": 11
1043
+ },
1044
+ {
1045
+ "type": "text",
1046
+ "text": "Jorge A Balazs, Edison Marrese-Taylor, Pablo Loyola, and Yutaka Matsuo. Refining Raw Sentence Representations for Textual Entailment Recognition via Attention. arXiv.org, July 2017. ",
1047
+ "bbox": [
1048
+ 174,
1049
+ 205,
1050
+ 823,
1051
+ 234
1052
+ ],
1053
+ "page_idx": 11
1054
+ },
1055
+ {
1056
+ "type": "text",
1057
+ "text": "Johan Bos and Katja Markert. Recognising Textual Entailment with Logical Inference. HLT/EMNLP, 2005. ",
1058
+ "bbox": [
1059
+ 176,
1060
+ 242,
1061
+ 821,
1062
+ 271
1063
+ ],
1064
+ "page_idx": 11
1065
+ },
1066
+ {
1067
+ "type": "text",
1068
+ "text": "Samuel R Bowman, Gabor Angeli, Christopher Potts, and Christopher D Manning. A large annotated corpus for learning natural language inference. arXiv.org, pp. arXiv:1508.05326, August 2015. ",
1069
+ "bbox": [
1070
+ 176,
1071
+ 280,
1072
+ 821,
1073
+ 321
1074
+ ],
1075
+ "page_idx": 11
1076
+ },
1077
+ {
1078
+ "type": "text",
1079
+ "text": "Samuel R Bowman, Jon Gauthier, Abhinav Rastogi, Raghav Gupta, Christopher D Manning, and Christopher Potts. A Fast Unified Model for Parsing and Sentence Understanding. arXiv.org, March 2016. ",
1080
+ "bbox": [
1081
+ 174,
1082
+ 332,
1083
+ 825,
1084
+ 373
1085
+ ],
1086
+ "page_idx": 11
1087
+ },
1088
+ {
1089
+ "type": "text",
1090
+ "text": "Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. Reading Wikipedia to Answer OpenDomain Questions. arXiv.org, pp. arXiv:1704.00051, March 2017a. ",
1091
+ "bbox": [
1092
+ 176,
1093
+ 382,
1094
+ 820,
1095
+ 411
1096
+ ],
1097
+ "page_idx": 11
1098
+ },
1099
+ {
1100
+ "type": "text",
1101
+ "text": "Qian Chen, Xiaodan Zhu, Zhenhua Ling, Si Wei, Hui Jiang, and Diana Inkpen. Enhanced LSTM for Natural Language Inference. arXiv.org, September 2016. ",
1102
+ "bbox": [
1103
+ 174,
1104
+ 419,
1105
+ 821,
1106
+ 449
1107
+ ],
1108
+ "page_idx": 11
1109
+ },
1110
+ {
1111
+ "type": "text",
1112
+ "text": "Qian Chen, Xiaodan Zhu, Zhen-Hua Ling, Si Wei, Hui Jiang, and Diana Inkpen. Recurrent Neural Network-Based Sentence Encoder with Gated Attention for Natural Language Inference. arXiv.org, pp. arXiv:1708.01353, August 2017b. ",
1113
+ "bbox": [
1114
+ 174,
1115
+ 457,
1116
+ 825,
1117
+ 500
1118
+ ],
1119
+ "page_idx": 11
1120
+ },
1121
+ {
1122
+ "type": "text",
1123
+ "text": "Jianpeng Cheng, Li Dong, and Mirella Lapata. Long Short-Term Memory-Networks for Machine Reading. arXiv.org, January 2016. ",
1124
+ "bbox": [
1125
+ 173,
1126
+ 507,
1127
+ 821,
1128
+ 536
1129
+ ],
1130
+ "page_idx": 11
1131
+ },
1132
+ {
1133
+ "type": "text",
1134
+ "text": "Yaroslav Fyodorov, Yoad Winter, and Nissim Francez. a natural language inference system. Proceedings of the 2nd Workshop on Inference in Computational Semantics, pp. 1–17, November 2000. ",
1135
+ "bbox": [
1136
+ 174,
1137
+ 545,
1138
+ 825,
1139
+ 588
1140
+ ],
1141
+ "page_idx": 11
1142
+ },
1143
+ {
1144
+ "type": "text",
1145
+ "text": "Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N Dauphin. Convolutional Sequence to Sequence Learning. arXiv.org, May 2017. ",
1146
+ "bbox": [
1147
+ 173,
1148
+ 595,
1149
+ 821,
1150
+ 626
1151
+ ],
1152
+ "page_idx": 11
1153
+ },
1154
+ {
1155
+ "type": "text",
1156
+ "text": "Yichen Gong and Samuel R Bowman. Ruminating Reader: Reasoning with Gated Multi-Hop Attention. arXiv.org, April 2017. ",
1157
+ "bbox": [
1158
+ 174,
1159
+ 633,
1160
+ 823,
1161
+ 662
1162
+ ],
1163
+ "page_idx": 11
1164
+ },
1165
+ {
1166
+ "type": "text",
1167
+ "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. CVPR, 2016. ",
1168
+ "bbox": [
1169
+ 173,
1170
+ 671,
1171
+ 823,
1172
+ 700
1173
+ ],
1174
+ "page_idx": 11
1175
+ },
1176
+ {
1177
+ "type": "text",
1178
+ "text": "Karl Moritz Hermann, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. Teaching Machines to Read and Comprehend. arXiv.org, June 2015. ",
1179
+ "bbox": [
1180
+ 173,
1181
+ 708,
1182
+ 823,
1183
+ 738
1184
+ ],
1185
+ "page_idx": 11
1186
+ },
1187
+ {
1188
+ "type": "text",
1189
+ "text": "Baotian Hu, Zhengdong Lu, Hang Li, and Qingcai Chen. Convolutional Neural Network Architectures for Matching Natural Language Sentences. NIPS, 2014. ",
1190
+ "bbox": [
1191
+ 174,
1192
+ 746,
1193
+ 821,
1194
+ 775
1195
+ ],
1196
+ "page_idx": 11
1197
+ },
1198
+ {
1199
+ "type": "text",
1200
+ "text": "Gao Huang, Zhuang Liu, Kilian Q Weinberger, and Laurens van der Maaten. Densely Connected Convolutional Networks. arXiv.org, August 2016. ",
1201
+ "bbox": [
1202
+ 176,
1203
+ 784,
1204
+ 823,
1205
+ 813
1206
+ ],
1207
+ "page_idx": 11
1208
+ },
1209
+ {
1210
+ "type": "text",
1211
+ "text": "Armand Joulin, Edouard Grave, Piotr Bojanowski, and Tomas Mikolov. Bag of Tricks for Efficient Text Classification. arXiv.org, July 2016. ",
1212
+ "bbox": [
1213
+ 173,
1214
+ 820,
1215
+ 823,
1216
+ 849
1217
+ ],
1218
+ "page_idx": 11
1219
+ },
1220
+ {
1221
+ "type": "text",
1222
+ "text": "Nal Kalchbrenner, Edward Grefenstette, and Phil Blunsom. A Convolutional Neural Network for Modelling Sentences. arXiv.org, April 2014. ",
1223
+ "bbox": [
1224
+ 174,
1225
+ 858,
1226
+ 821,
1227
+ 887
1228
+ ],
1229
+ "page_idx": 11
1230
+ },
1231
+ {
1232
+ "type": "text",
1233
+ "text": "Yoon Kim. Convolutional Neural Networks for Sentence Classification. arXiv.org, pp. arXiv:1408.5882, August 2014. ",
1234
+ "bbox": [
1235
+ 176,
1236
+ 895,
1237
+ 820,
1238
+ 924
1239
+ ],
1240
+ "page_idx": 11
1241
+ },
1242
+ {
1243
+ "type": "text",
1244
+ "text": "Yoon Kim, Yacine Jernite, David Sontag, and Alexander M Rush. Character-Aware Neural Language Models. AAAI, 2016. ",
1245
+ "bbox": [
1246
+ 173,
1247
+ 103,
1248
+ 823,
1249
+ 132
1250
+ ],
1251
+ "page_idx": 12
1252
+ },
1253
+ {
1254
+ "type": "text",
1255
+ "text": "Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet Classification with Deep Convolutional Neural Networks. NIPS, 2012. ",
1256
+ "bbox": [
1257
+ 171,
1258
+ 140,
1259
+ 823,
1260
+ 170
1261
+ ],
1262
+ "page_idx": 12
1263
+ },
1264
+ {
1265
+ "type": "text",
1266
+ "text": "Jason Lee, Kyunghyun Cho, and Thomas Hofmann. Fully Character-Level Neural Machine Translation without Explicit Segmentation. arXiv.org, October 2016. ",
1267
+ "bbox": [
1268
+ 171,
1269
+ 178,
1270
+ 821,
1271
+ 208
1272
+ ],
1273
+ "page_idx": 12
1274
+ },
1275
+ {
1276
+ "type": "text",
1277
+ "text": "Yang Liu, Chengjie Sun, Lei Lin, and Xiaolong Wang. Learning Natural Language Inference using Bidirectional LSTM model and Inner-Attention. arXiv.org, May 2016. ",
1278
+ "bbox": [
1279
+ 173,
1280
+ 215,
1281
+ 823,
1282
+ 244
1283
+ ],
1284
+ "page_idx": 12
1285
+ },
1286
+ {
1287
+ "type": "text",
1288
+ "text": "Bill MacCartney and Christopher D. Manning. An extended model of natural logic. 2009. ",
1289
+ "bbox": [
1290
+ 171,
1291
+ 252,
1292
+ 767,
1293
+ 268
1294
+ ],
1295
+ "page_idx": 12
1296
+ },
1297
+ {
1298
+ "type": "text",
1299
+ "text": "Marco Marelli, Stefano Menini, Marco Baroni, Luisa Bentivogli, Raffaella Bernardi, and Roberto Zamparelli. A SICK cure for the evaluation of compositional distributional semantic models. LREC, 2014. ",
1300
+ "bbox": [
1301
+ 176,
1302
+ 276,
1303
+ 821,
1304
+ 319
1305
+ ],
1306
+ "page_idx": 12
1307
+ },
1308
+ {
1309
+ "type": "text",
1310
+ "text": "Hongyuan Mei, Mohit Bansal, and Matthew R Walter. Coherent Dialogue with Attention-based Language Models. arXiv.org, November 2016. ",
1311
+ "bbox": [
1312
+ 171,
1313
+ 328,
1314
+ 823,
1315
+ 358
1316
+ ],
1317
+ "page_idx": 12
1318
+ },
1319
+ {
1320
+ "type": "text",
1321
+ "text": "Tomas Mikolov, Ilya Sutskever, Kai Chen, Gregory S Corrado, and Jeffrey Dean. Distributed Representations of Words and Phrases and their Compositionality. NIPS, 2013. ",
1322
+ "bbox": [
1323
+ 171,
1324
+ 366,
1325
+ 821,
1326
+ 395
1327
+ ],
1328
+ "page_idx": 12
1329
+ },
1330
+ {
1331
+ "type": "text",
1332
+ "text": "Lili Mou, Rui Men, Ge Li, Yan Xu, Lu Zhang, Rui Yan, and Zhi Jin. Natural Language Inference by Tree-Based Convolution and Heuristic Matching. arXiv.org, December 2015. ",
1333
+ "bbox": [
1334
+ 171,
1335
+ 402,
1336
+ 823,
1337
+ 433
1338
+ ],
1339
+ "page_idx": 12
1340
+ },
1341
+ {
1342
+ "type": "text",
1343
+ "text": "Tsendsuren Munkhdalai and Hong Yu. Neural Semantic Encoders. arXiv.org, July 2016. ",
1344
+ "bbox": [
1345
+ 171,
1346
+ 440,
1347
+ 756,
1348
+ 457
1349
+ ],
1350
+ "page_idx": 12
1351
+ },
1352
+ {
1353
+ "type": "text",
1354
+ "text": "Nikita Nangia, Adina Williams, Angeliki Lazaridou, and Samuel R Bowman. The RepEval 2017 Shared Task: Multi-Genre Natural Language Inference with Sentence Representations. arXiv.org, July 2017. ",
1355
+ "bbox": [
1356
+ 174,
1357
+ 464,
1358
+ 826,
1359
+ 507
1360
+ ],
1361
+ "page_idx": 12
1362
+ },
1363
+ {
1364
+ "type": "text",
1365
+ "text": "Yixin Nie and Mohit Bansal. Shortcut-Stacked Sentence Encoders for Multi-Domain Inference. arXiv.org, pp. arXiv:1708.02312, August 2017. ",
1366
+ "bbox": [
1367
+ 171,
1368
+ 515,
1369
+ 821,
1370
+ 545
1371
+ ],
1372
+ "page_idx": 12
1373
+ },
1374
+ {
1375
+ "type": "text",
1376
+ "text": "Ankur P Parikh, Oscar Tackstr ¨ om, Dipanjan Das, and Jakob Uszkoreit. A Decomposable Attention ¨ Model for Natural Language Inference. arXiv.org, June 2016. ",
1377
+ "bbox": [
1378
+ 169,
1379
+ 553,
1380
+ 823,
1381
+ 583
1382
+ ],
1383
+ "page_idx": 12
1384
+ },
1385
+ {
1386
+ "type": "text",
1387
+ "text": "Jeffrey Pennington, Richard Socher, and Christopher Manning. Glove: Global Vectors for Word Representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 1532–1543, Stroudsburg, PA, USA, 2014. Association for Computational Linguistics. ",
1388
+ "bbox": [
1389
+ 173,
1390
+ 590,
1391
+ 825,
1392
+ 647
1393
+ ],
1394
+ "page_idx": 12
1395
+ },
1396
+ {
1397
+ "type": "text",
1398
+ "text": "Tim Rocktaschel, Edward Grefenstette, Karl Moritz Hermann, and Phil Blunsom. Reasoning about ¨ Entailment with Neural Attention. arXiv.org, September 2015. ",
1399
+ "bbox": [
1400
+ 169,
1401
+ 655,
1402
+ 823,
1403
+ 685
1404
+ ],
1405
+ "page_idx": 12
1406
+ },
1407
+ {
1408
+ "type": "text",
1409
+ "text": "Alexander M Rush, Sumit Chopra, and Jason Weston. A Neural Attention Model for Abstractive Sentence Summarization. arXiv.org, pp. arXiv:1509.00685, September 2015. ",
1410
+ "bbox": [
1411
+ 174,
1412
+ 693,
1413
+ 821,
1414
+ 723
1415
+ ],
1416
+ "page_idx": 12
1417
+ },
1418
+ {
1419
+ "type": "text",
1420
+ "text": "Minjoon Seo, Aniruddha Kembhavi, Ali Farhadi, and Hannaneh Hajishirzi. Bidirectional Attention Flow for Machine Comprehension. arXiv.org, November 2016. ",
1421
+ "bbox": [
1422
+ 169,
1423
+ 731,
1424
+ 823,
1425
+ 761
1426
+ ],
1427
+ "page_idx": 12
1428
+ },
1429
+ {
1430
+ "type": "text",
1431
+ "text": "Lei Sha, Baobao Chang, Zhifang Sui, and Sujian Li. Reading and Thinking - Re-read LSTM Unit for Textual Entailment Recognition. COLING, 2016. ",
1432
+ "bbox": [
1433
+ 169,
1434
+ 768,
1435
+ 823,
1436
+ 797
1437
+ ],
1438
+ "page_idx": 12
1439
+ },
1440
+ {
1441
+ "type": "text",
1442
+ "text": "Karen Simonyan and Andrew Zisserman. Very Deep Convolutional Networks for Large-Scale Image Recognition. arXiv.org, September 2014. ",
1443
+ "bbox": [
1444
+ 173,
1445
+ 805,
1446
+ 823,
1447
+ 835
1448
+ ],
1449
+ "page_idx": 12
1450
+ },
1451
+ {
1452
+ "type": "text",
1453
+ "text": "Richard Socher, Cliff Chiung-Yu Lin, Andrew Y Ng, and Christopher D Manning. Parsing Natural Scenes and Natural Language with Recursive Neural Networks. ICML, 2011. ",
1454
+ "bbox": [
1455
+ 169,
1456
+ 843,
1457
+ 823,
1458
+ 872
1459
+ ],
1460
+ "page_idx": 12
1461
+ },
1462
+ {
1463
+ "type": "text",
1464
+ "text": "Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going Deeper with Convolutions. arXiv.org, September 2014. ",
1465
+ "bbox": [
1466
+ 174,
1467
+ 881,
1468
+ 823,
1469
+ 924
1470
+ ],
1471
+ "page_idx": 12
1472
+ },
1473
+ {
1474
+ "type": "text",
1475
+ "text": "Gaurav Singh Tomar, Thyago Duque, Oscar Tackstr ¨ om, Jakob Uszkoreit, and Dipanjan Das. Neural ¨ Paraphrase Identification of Questions with Noisy Pretraining. arXiv.org, April 2017. \nAshish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention Is All You Need. arXiv.org, June 2017. \nIvan Vendrov, Ryan Kiros, Sanja Fidler, and Raquel Urtasun. Order-Embeddings of Images and Language. arXiv.org, November 2015. \nShuohang Wang and Jing Jiang. Learning Natural Language Inference with LSTM. arXiv.org, December 2015. \nZhiguo Wang, Wael Hamza, and Radu Florian. Bilateral Multi-Perspective Matching for Natural Language Sentences. cs.AI, 2017. \nAdina Williams, Nikita Nangia, and Samuel R Bowman. A Broad-Coverage Challenge Corpus for Sentence Understanding through Inference. arXiv.org, April 2017. \nKelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhutdinov, Richard Zemel, and Yoshua Bengio. Show, Attend and Tell: Neural Image Caption Generation with Visual Attention. arXiv.org, February 2015. \nHong Yu and Tsendsuren Munkhdalai. Neural Tree Indexers for Text Understanding. EACL, 2017. \nMatthew D Zeiler. ADADELTA: An Adaptive Learning Rate Method. arXiv.org, pp. arXiv:1212.5701, December 2012. \nXiang Zhang and Yann LeCun. Which Encoding is the Best for Text Classification in Chinese, English, Japanese and Korean? arXiv.org, August 2017. \nXiang Zhang, Junbo Jake Zhao, and Yann LeCun. Character-level Convolutional Networks for Text Classification. CoRR, 1509:arXiv:1509.01626, 2015. ",
1476
+ "bbox": [
1477
+ 171,
1478
+ 103,
1479
+ 826,
1480
+ 508
1481
+ ],
1482
+ "page_idx": 13
1483
+ },
1484
+ {
1485
+ "type": "text",
1486
+ "text": "A SUPPLEMENTARY MATERIAL ",
1487
+ "text_level": 1,
1488
+ "bbox": [
1489
+ 176,
1490
+ 531,
1491
+ 450,
1492
+ 547
1493
+ ],
1494
+ "page_idx": 13
1495
+ },
1496
+ {
1497
+ "type": "text",
1498
+ "text": "Dimensionality and Parameter number study To study the influence of the model dimension $d$ which is also the channel number of interaction tensor, we design experiments to find out whether dimension has influence on performance. We also present the parameter count of these models. The dimensionality is 448 where 300 comes from word embedding, 100 comes from char feature, 47 comes from Part of speech tagging and 1 comes from the binary exact match feature. Since Highway network sets the output dimensionality default as that in input, we design a variant to highway network so that different output size could be obtained. The variant of highway layer is designed as follows: ",
1499
+ "bbox": [
1500
+ 173,
1501
+ 563,
1502
+ 825,
1503
+ 674
1504
+ ],
1505
+ "page_idx": 13
1506
+ },
1507
+ {
1508
+ "type": "equation",
1509
+ "img_path": "images/60815040992f8c119e09eda6a4899c3453141ed78bdfadbd86c7e0fc96b0eb07.jpg",
1510
+ "text": "$$\n\\begin{array} { r l } & { { \\mathbf { \\sp { t } } i } = \\mathrm { t a n h } ( { W _ { t } \\sp { \\top } { \\mathbf { x } } _ { i } + b _ { t } } ) } \\\\ & { { \\mathbf { \\sp { g } i } = \\sigma ( { W _ { g } \\sp { \\top } { \\mathbf { x } } _ { i } + b _ { g } \\sp { } } ) } } \\\\ & { { \\mathbf { \\sp { x } } i } = \\left\\{ \\begin{array} { l l } { { \\mathbf { \\sp { x } } _ { i } \\qquad } } & { { d _ { i n } = d _ { o u t } \\nonumber } } \\\\ { { W _ { x } \\sp { \\top } { \\mathbf { x } } _ { i } + b _ { x } \\quad d _ { i n } \\ne d _ { o u t } \\nonumber } } \\\\ { { \\mathbf { \\sp { o } i } = g _ { i } \\circ { \\mathbf { \\sp { t } } i } + ( { 1 - g _ { i } \\sp { } } ) \\circ { \\mathbf { \\sp { x } } } _ { i } \\sp { \\prime } } } \\end{array} \\right. } \\\\ & { { \\mathbf { \\sp { o } i } = g _ { i } \\circ { \\mathbf { \\sp { t } } i } + ( { 1 - g _ { i } \\sp { } } ) \\circ { \\mathbf { \\sp { x } } \\sp { \\prime } _ { i } \\qquad } } } \\end{array}\n$$",
1511
+ "text_format": "latex",
1512
+ "bbox": [
1513
+ 383,
1514
+ 678,
1515
+ 612,
1516
+ 780
1517
+ ],
1518
+ "page_idx": 13
1519
+ },
1520
+ {
1521
+ "type": "text",
1522
+ "text": "where $\\mathbf { \\Delta } _ { \\mathbf { \\mathcal { X } } _ { i } }$ is the $i$ -th vector of input matrix ${ \\bf { x } } , { \\bf { o } } _ { i }$ is the $i$ -th vector of output matrix $^ o$ , $\\boldsymbol { W } _ { t } ^ { \\top }$ , $\\boldsymbol { W } _ { g } ^ { \\intercal }$ $W _ { x } ^ { \\top } \\in \\mathbb { R } ^ { d _ { i n } \\times d _ { o u t } }$ and $b _ { t } , b _ { g }$ , $b _ { x } \\in \\mathbb { R } ^ { d _ { o u t } }$ are trainable weights. ",
1523
+ "bbox": [
1524
+ 174,
1525
+ 785,
1526
+ 823,
1527
+ 818
1528
+ ],
1529
+ "page_idx": 13
1530
+ },
1531
+ {
1532
+ "type": "text",
1533
+ "text": "The result shows that higher dimension number have better performance when the dimension number is lower certain threshold, however, when the number of dimensionality is greater than the threshold, larger number of parameter and higher dimensionality doesn’t contribute to performance. In the case of SNLI, due to its simplicity in language pattern, 250D would be suffice to obtain a good performance. On the other hand, it requires 350D to achieve a competitive performance on MultiNLI. We fail to reproduce our best performance with the new structure on MultiNLI. It shows that the additional layer on highway network doesn’t helps convergence. ",
1534
+ "bbox": [
1535
+ 173,
1536
+ 823,
1537
+ 825,
1538
+ 921
1539
+ ],
1540
+ "page_idx": 13
1541
+ },
1542
+ {
1543
+ "type": "table",
1544
+ "img_path": "images/0bf7cdca2539e3da81878f72e28677069012782b8e0ccc94e07ed6f4e79c989f.jpg",
1545
+ "table_caption": [
1546
+ "Table 7: Dimensionality and parameter number study result. "
1547
+ ],
1548
+ "table_footnote": [],
1549
+ "table_body": "<table><tr><td colspan=\"3\"></td><td colspan=\"3\">Dev Accuracy</td></tr><tr><td>Dimension</td><td>Param Count</td><td>SNLI</td><td>Matched</td><td></td><td>Mismatched</td></tr><tr><td>1. DIIN(448)</td><td>4.36 M</td><td>88.4</td><td>79.2</td><td></td><td>79.1</td></tr><tr><td>2.10</td><td>708K</td><td>81.6</td><td></td><td>71.7</td><td>71.9</td></tr><tr><td>3.30</td><td>765K</td><td>85.2</td><td></td><td>75.0</td><td>74.9</td></tr><tr><td>4.50</td><td>832K</td><td>86.0</td><td></td><td>76.1</td><td>76.7</td></tr><tr><td>5.100</td><td>1.05M</td><td>86.9</td><td></td><td>76.9</td><td>77.1</td></tr><tr><td>6.150</td><td>1.34 M</td><td>87.6</td><td></td><td>77.6</td><td>77.4</td></tr><tr><td>7.250</td><td>2.14M</td><td>88.1</td><td></td><td>78.1</td><td>77.7</td></tr><tr><td>8.350</td><td>3.23M</td><td>88.0</td><td></td><td>78.7</td><td>78.2</td></tr><tr><td>9. 447</td><td>4.55M</td><td>88.1</td><td></td><td>78.4</td><td>78.0</td></tr><tr><td>10.540</td><td>6.08 M</td><td>88.1</td><td></td><td>78.8</td><td>78.7</td></tr><tr><td>11. 600</td><td>7.20 M</td><td>88.4</td><td></td><td>78.7</td><td>78.2</td></tr></table>",
1550
+ "bbox": [
1551
+ 282,
1552
+ 406,
1553
+ 714,
1554
+ 592
1555
+ ],
1556
+ "page_idx": 14
1557
+ }
1558
+ ]
parse/train/r1dHXnH6-/r1dHXnH6-_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/r1dHXnH6-/r1dHXnH6-_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rJecbgHtDH/rJecbgHtDH.md ADDED
@@ -0,0 +1,504 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # A BOOLEAN TASK ALGEBRA FOR REINFORCEMENT LEARNING
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ We propose a framework for defining a Boolean algebra over the space of tasks. This allows us to formulate new tasks in terms of the negation, disjunction and conjunction of a set of base tasks. We then show that by learning goal-oriented value functions and restricting the transition dynamics of the tasks, an agent can solve these new tasks with no further learning. We prove that by composing these value functions in specific ways, we immediately recover the optimal policies for all tasks expressible under the Boolean algebra. We verify our approach in two domains—including a high-dimensional video game environment requiring function approximation—where an agent first learns a set of base skills, and then composes them to solve a super-exponential number of new tasks.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Reinforcement learning (RL) has achieved recent success in a number of difficult, high-dimensional environments (Mnih et al., 2015; Levine et al., 2016; Lillicrap et al., 2016; Silver et al., 2017). However, these methods generally require millions of samples from the environment to learn optimal behaviours, limiting their real-world applicability. A major challenge is thus in designing sample-efficient agents that can transfer their existing knowledge to solve new tasks quickly. This is particularly important for agents in a multitask or lifelong setting, since learning to solve complex tasks from scratch is typically infeasible.
12
+
13
+ One approach to transfer is composition (Todorov, 2009), which allows an agent to leverage existing skills to build complex, novel behaviours. These newly-formed skills can then be used to solve or speed up learning in a new task. In this work, we focus on concurrent composition, where existing base skills are combined to produce new skills (Todorov, 2009; Saxe et al., 2017; Haarnoja et al., 2018; Van Niekerk et al., 2019; Hunt et al., 2019; Peng et al., 2019). This differs from other forms of composition, such as options (Sutton et al., 1999) and hierarchical RL (Bacon et al., 2017), where actions and skills are chained in a temporal sequence.
14
+
15
+ In this work, we define a Boolean algebra over the space of tasks and optimal value functions. This extends previous composition results to encompass all Boolean operators: conjunction, disjunction, and negation. We then prove that there exists a homomorphism between the task and value function algebras. Given a set of base tasks that have been previously solved by the agent, any new task written as a Boolean expression can immediately be solved without further learning, resulting in a zero-shot super-exponential explosion in the agent’s abilities.
16
+
17
+ We illustrate our approach in a simple domain, where an agent first learns to reach a number of rooms, after which it can then optimally solve any task expressible in the Boolean algebra. We then demonstrate composition in high-dimensional video game environments, where an agent first learns to collect different objects, and then compose these abilities to solve complex tasks immediately. Our results show that, even when function approximation is required, an agent can leverage its existing skills to solve new tasks without further learning.
18
+
19
+ # 2 PRELIMINARIES
20
+
21
+ We consider tasks modelled by Markov Decision Processes (MDPs). An MDP is defined by the tuple $( S , { \mathcal { A } } , \rho , r )$ , where (i) $s$ is the state space, (ii) $\mathcal { A }$ is the action space, (iii) $\rho$ is a Markov transition kernel $( s , a ) \mapsto \rho _ { ( s , a ) }$ from $\boldsymbol { S } \times \boldsymbol { A }$ to $s$ , and (iv) $r$ is the real-valued reward function bounded by $[ r _ { \mathrm { M I N } } , r _ { \mathrm { M A X } } ]$ . In this work, we focus on stochastic shortest path problems (Bertsekas & Tsitsiklis, 1991), which model tasks in which an agent must reach some goal. We therefore consider the class of undiscounted MDPs with an absorbing set ${ \mathcal { G } } \subseteq S$ .
22
+
23
+ The goal of the agent is to compute a Markov policy $\pi$ from $s$ to $\mathcal { A }$ that optimally solves a given task. A given policy $\pi$ is characterised by a value function $\begin{array} { r } { V ^ { \pi } ( s ) = \mathbb { E } _ { \pi } \left[ \sum _ { t = 0 } ^ { \infty } r ( s _ { t } , a _ { t } ) \right] } \end{array}$ , specifying the expected return obtained under $\pi$ starting from state $s$ .1 The optimal policy $\pi ^ { * }$ is the policy that obtains the greatest expected return at each state: $V ^ { \pi ^ { * } } ( s ) = V ^ { * } ( s ) = \operatorname* { m a x } _ { \pi } V ^ { \pi } ( s )$ for all $s$ in $s$ . A related quantity is the $Q$ -value function, $Q ^ { \pi } ( s , \dot { a } )$ , which defines the expected return obtained by executing $a$ from $s$ , and thereafter following $\pi$ . Similarly, the optimal $Q$ -value function is given by $Q ^ { * } ( s , a ) = \operatorname* { m a x } _ { \pi } Q ^ { \pi } ( s , a )$ for all $s$ in $s$ and $a$ in $\mathcal { A }$ . Finally, we denote a proper policy to be a policy that is guaranteed to eventually reach the absorbing set $\mathcal { G }$ (James & Collins, 2006; Van Niekerk et al., 2019). We assume the value functions for improper policies—those that never reach absorbing states—are unbounded below.
24
+
25
+ # 3 BOOLEAN ALGEBRAS FOR TASKS AND VALUE FUNCTIONS
26
+
27
+ In this section, we develop the notion of a Boolean task algebra, allowing us to perform logical operations—conjunction $( \wedge )$ , disjunction (∨) and negation $( \neg )$ —over the space of tasks. We then show that, having solved a series of base tasks, an agent can use its knowledge to solve tasks expressible as a Boolean expression over those tasks, without any further learning.
28
+
29
+ We consider a family of related MDPs $\mathcal { M }$ restricted by the following assumptions:
30
+
31
+ Assumption 1. For all tasks in a set of tasks $\mathcal { M }$ , (i) the tasks share the same state space, action space and transition dynamics, (ii) the transition dynamics are deterministic, (iii) reward functions between tasks differ only on the absorbing set $\mathcal { G }$ , and $( i \nu )$ the set of possible terminal rewards consists of only two values. That is, for all $( g , a )$ in ${ \mathcal { G } } \times { \mathcal { A } }$ , we have that $r ( g , a ) \in \{ r _ { \emptyset } , r _ { \mathcal { U } } \} \subset \mathbb { R }$ with $r _ { \mathcal { O } } \leq r _ { \mathcal { U } }$ . For all non-terminal states, we denote the reward $r _ { s , a }$ to emphasise that it is constant across tasks.
32
+
33
+ Assumption 2. For all tasks in a set of tasks $\mathcal { M }$ which adhere to Assumption $^ { l }$ , the set of possible terminal rewards consists of only two values. That is, for all $( g , a )$ in $\mathcal { G } \times \mathcal { A }$ , we have that $r ( g , a ) \in$ $\{ r _ { \emptyset } , r _ { \mathcal { U } } \} \subset \mathbb { R }$ with $r _ { \mathcal { O } } \leq r _ { \mathcal { U } }$ . For all non-terminal states, we denote the reward $\boldsymbol { r } _ { s , a }$ to emphasise that it is constant across tasks.
34
+
35
+ Assumption 1 is similar to that of Todorov (2007) and identical to Van Niekerk et al. (2019), and imply that each task can be uniquely specified by its reward function. Furthermore, we note that Assumption 2 is only necessary to formally define the Boolean algebra. Although we have placed restrictions on the reward functions, the above formulation still allows for a large number of tasks to be represented. Importantly, sparse rewards can be formulated under these restrictions.
36
+
37
+ # 3.1 A BOOLEAN ALGEBRA FOR TASKS
38
+
39
+ An abstract Boolean algebra is a set $\boldsymbol { B }$ equipped with operators $\neg , \lor , \land$ that satisfy the Boolean axioms of (i) idempotence, (ii) commutativity, (iii) associativity, (iv) absorption, (v) distributivity, (vi) identity, and (vii) complements.2 Given the above definitions and the restrictions placed on the set of tasks we consider, we can now define a Boolean algebra over a set of tasks.
40
+
41
+ Theorem 1. Let $\mathcal { M }$ be a set of tasks. Define $\mathcal { M } _ { \mathcal { U } } , \mathcal { M } _ { \mathcal { O } } \in \mathcal { M }$ to be tasks with the respective reward functions
42
+
43
+ $$
44
+ \begin{array}{c} \begin{array} { r l } { r _ { \boldsymbol { \mathcal { M } } \boldsymbol { u } } : \boldsymbol { \mathcal { S } } \times \boldsymbol { \mathcal { A } } \to \mathbb { R } } & { \qquad r _ { \boldsymbol { \mathcal { M } } \boldsymbol { \mathcal { Q } } } : \boldsymbol { \mathcal { S } } \times \boldsymbol { \mathcal { A } } \to \mathbb { R } } \\ { ( s , a ) \mapsto \left\{ r _ { \boldsymbol { \mathcal { S } } , a } , \quad i f s \in \mathcal { G } \qquad \right.} & { \qquad ( s , a ) \mapsto \left\{ r _ { \boldsymbol { \mathcal { S } } , a } , \quad i f s \in \mathcal { G } \right. } \\ { r _ { s , a } , \quad o t h e r w i s e . } \end{array} \end{array}
45
+ $$
46
+
47
+ Then $\mathcal { M }$ forms a Boolean algebra with universal bounds $\mathcal { M } _ { \emptyset }$ and $\mathcal { M } _ { \mathcal { U } }$ when equipped with the following operators:
48
+
49
+ $\lnot : \mathcal { M } \to \mathcal { M }$ $M \mapsto ( \mathcal { S } , \mathcal { A } , \rho , r _ { \neg M } )$ , where $r _ { \neg M } : \mathcal { S } \times \mathcal { A } \to \mathbb { R }$
50
+
51
+ $$
52
+ \mathbf { \Phi } ( s , a ) \mapsto \left( r _ { \mathcal { M } _ { \mathcal { U } } } ( s , a ) + r _ { \mathcal { M } _ { \mathcal { O } } } ( s , a ) \right) - r _ { M } ( s , a )
53
+ $$
54
+
55
+ $$
56
+ \lor \colon { \mathcal { M } } \times { \mathcal { M } } \to { \mathcal { M } }
57
+ $$
58
+
59
+ $$
60
+ ( s , a ) \mapsto \operatorname* { m i n } \{ r _ { M _ { 1 } } ( s , a ) , r _ { M _ { 2 } } ( s , a ) \}
61
+ $$
62
+
63
+ Proof. See Appendix.
64
+
65
+ Theorem 1 allows us to compose existing tasks together to create new tasks in a principled way.
66
+ Figure 1 illustrates the semantics for each of the Boolean operators in a simple environment.
67
+
68
+ # 3.2 EXTENDED VALUE FUNCTIONS
69
+
70
+ The reward and value functions described in Section 2 are insufficient to solve tasks specified by the Boolean algebra above. We therefore extend these to define goal-oriented versions of the reward and value function, given by the following two definitions:
71
+
72
+ Definition 1. The extended reward function $\bar { r } : \mathcal { S } \times \mathcal { G } \times \mathcal { A } \mathbb { R }$ is given by the mappin
73
+
74
+ $$
75
+ ( s , g , a ) \mapsto \left\{ { \begin{array} { l l } { N } & { i f g \neq s \in { \mathcal { G } } } \\ { r ( s , a ) } & { o t h e r w i s e , } \end{array} } \right.
76
+ $$
77
+
78
+ where $N \leq \operatorname* { m i n } \{ r _ { M I N } , ( r _ { M I N } - r _ { M A X } ) D \}$ , and $D$ is the diameter of the MDP (Jaksch et al., 2010).3
79
+
80
+ To understand why standard value functions are insufficient, consider two tasks that have multiple different goals, but at least one common goal. Clearly, there is a meaningful conjunction between them—namely, achieving the common goal. Now consider an agent that learns standard value functions for both tasks, and which is then required to solve their conjunction without further learning. Note that this is impossible in general, since the regular value function for each task only represents the value of each state with respect to the nearest goal. That is, for all states where the nearest goal for each task is not the common goal, the agent has no information about that common goal. Conversely, by learning extended value functions, the agent is able to learn the value of achieving all goals, and not simply the nearest one.
81
+
82
+ Because we require that tasks share the same transition dynamics, we also require that the absorbing set of states is shared. Thus the extended reward function adds the extra constraint that, if the agent enters a terminal state for a different task, it should receive the largest penalty possible. In practice, we can simply set $N$ to be the lowest finite value representable by the data type used for rewards.
83
+
84
+ Definition 2. The extended $Q$ -value function $\bar { Q } : \mathcal { S } \times \mathcal { G } \times \mathcal { A } \mathbb { R }$ is given by the mapping
85
+
86
+ $$
87
+ ( s , g , a ) \mapsto \bar { r } ( s , g , a ) + \int _ { S } \bar { V } ^ { \bar { \pi } } ( s ^ { \prime } , g ) \rho _ { ( s , a ) } ( d s ^ { \prime } ) ,
88
+ $$
89
+
90
+ where $\begin{array} { r } { \bar { V } ^ { \bar { \pi } } ( s , g ) = \mathbb { E } _ { \bar { \pi } } \left[ \sum _ { t = 0 } ^ { \infty } \bar { r } ( s _ { t } , g , a _ { t } ) \right] } \end{array}$ . The extended $\mathbf { Q }$ -value function is similar to universal value function approximators (UVFAs) (Schaul et al., 2015), but differs in that it uses the extended reward function definition. It is also similar to DG functions (Kaelbling, 1993), except here we use task-dependent reward functions, as opposed to measuring distance between states.
91
+
92
+ The standard reward functions and value functions can be recovered from their extended versions through the following lemma.
93
+
94
+ ![](images/5a076f02e739e1c955c8ef10b32f870c56018cc274ca086e60c26d3f7fb119ae.jpg)
95
+ Figure 1: Consider two tasks, $M _ { \mathrm { L E F T } }$ and $M _ { \mathrm { D O W N } }$ , in which an agent must navigate to the left and bottom regions of an $x y$ -plane respectively. From left to right we plot the reward for entering a region of the state space for the individual tasks, the negation of $M _ { \mathrm { L E F T } }$ , and the union (disjunction) and intersection (conjunction) of tasks. For reference, we also plot the average reward function, which has been used in previous work to approximate the conjunction operator (Haarnoja et al., 2018; Hunt et al., 2019; Van Niekerk et al., 2019). Note that by averaging reward, terminal states that are not in the intersection are erroneously given rewards.
96
+
97
+ Lemma 1. Let $r _ { M } , \bar { r } _ { M } , Q _ { M } ^ { * } , \bar { Q } _ { M } ^ { * }$ be the reward function, extended reward function, optimal $Q$ - value function, and optimal extended $Q$ -value function for a task $M$ in $\mathcal { M }$ . Then for all $( s , a )$ in $\boldsymbol { s } \times \boldsymbol { A }$ , we have (i) $r _ { M } ( s , a ) = \operatorname* { m a x } _ { g \in { \mathcal { G } } } { \bar { r } } _ { M } ( s , g , a )$ , and (ii) $Q _ { M } ^ { * } ( s , a ) = \operatorname* { m a x } _ { g \in \mathcal { G } } \bar { Q } _ { M } ^ { * } ( s , \bar { g } , a )$ .
98
+
99
+ Proof.
100
+
101
+ (i):
102
+
103
+ $$
104
+ \begin{array} { r l } & { \underset { g \in \mathcal { G } } { \operatorname* { m a x } } \bar { r } _ { M } ( s , g , a ) = \left. \begin{array} { l l } { \operatorname* { m a x } \{ N , r _ { M } ( s , a ) \} , } & { \mathrm { i f } \ s \in \mathcal { G } } \\ { \operatorname* { m a x } _ { g \in \mathcal { G } } r _ { M } ( s , a ) , } & { \mathrm { o t h e r w i s e } . } \end{array} \right. } \\ & { \quad \quad \quad \quad \quad = r _ { M } ( s , a ) } \end{array}
105
+ $$
106
+
107
+ $( N \leq r _ { \mathrm { M I N } } \leq r _ { M } ( s , a )$ by definition).
108
+
109
+ (ii): Each $g$ in $\mathcal { G }$ can be thought of as defining an MDP $M _ { g } : = ( \mathcal { S } , \mathcal { A } , \rho , r _ { M _ { g } } )$ with reward function $r _ { M _ { g } } ( s , a ) : = \bar { r } _ { M } ( s , g , a )$ and optimal Q-value function $Q _ { M _ { g } } ^ { * } ( s , a ) = \bar { Q } _ { M } ^ { * } ( s , g , a )$ . Then using (i) we have $r _ { M } ( s , a ) = \operatorname* { m a x } _ { g \in { \mathcal { G } } } r _ { M _ { g } } ( s , a )$ and from Van Niekerk et al. (2019, Corollary 1), we have that $Q _ { M } ^ { * } ( s , a ) = \operatorname* { m a x } _ { g \in \mathcal { G } } Q _ { M _ { g } } ^ { * } ( s , a ) = \operatorname* { m a x } _ { g \in \mathcal { G } } \bar { Q } _ { M } ^ { * } ( s , g , a )$ .
110
+
111
+ In the same way, we can also recover the optimal policy from these extended value functions by first applying Lemma 1, and acting greedily with respect to the resulting value function.
112
+
113
+ Lemma 2. Denote $S ^ { - } = S \setminus \mathcal { G }$ as the non-terminal states of $\mathcal { M }$ . Let $M _ { 1 } , M _ { 2 } \in \mathcal { M }$ , and let each $g$ in $\mathcal { G }$ define MDPs $M _ { 1 , g }$ and $M _ { 2 , g }$ with reward functions
114
+
115
+ Then for all $g$ in $\mathcal { G }$ and s in $S ^ { - }$ ,
116
+
117
+ $$
118
+ \pi _ { g } ^ { * } ( s ) \in \underset { a \in \mathcal { A } } { \arg \operatorname* { m a x } } Q _ { M _ { 1 , g } } ^ { * } ( s , a ) i f f \pi _ { g } ^ { * } ( s ) \in \underset { a \in \mathcal { A } } { \arg \operatorname* { m a x } } Q _ { M _ { 2 , g } } ^ { * } ( s , a ) .
119
+ $$
120
+
121
+ Proof. See Appendix.
122
+
123
+ Combining Lemmas 1 and 2, we can extract the greedy action from the extended value function by first maximising over goals, and then selecting the maximising action: $\pi ^ { * } ( s ) \in$ arg maxa∈A maxg∈G Q¯∗(s, g, a). If we consider the extended value function to be a set of standard value functions (one for each goal), then this is equivalent to first performing generalised policy improvement (Barreto et al., 2017), and then selecting the greedy action.
124
+
125
+ Finally, much like the regular definition of value functions, the extended Q-value function can be written as the sum of rewards received by the agent until first encountering a terminal state.
126
+
127
+ Corollary 1. Denote G∗s:g,a as the sum of rewards starting from s and taking action a up until, but not including, $g$ . Then let $M \in \mathcal { M }$ and $\bar { Q } _ { M } ^ { * }$ be the extended $Q$ -value function. Then for all $s \in S , g \in { \mathcal { G } } , a \in { \mathcal { A } }$ , there exists a $G _ { s : g , a } ^ { * } \in \mathbb { R }$ M such that
128
+
129
+ oof. This follows directly from Lemmaup to (but not including) the goal state ce all tasks , their retur $M \in \mathcal { M }$ policyis the $\pi _ { g } ^ { * }$ $g \in { \mathcal { G } }$ $\begin{array} { r } { G _ { T - 1 } ^ { \pi _ { g } ^ { * } } = \sum _ { t = 0 } ^ { T - 1 } r _ { M } ( s _ { t } , \pi _ { g } ^ { * } ( s _ { t } ) ) } \end{array}$
130
+
131
+ # 3.3 A BOOLEAN ALGEBRA FOR VALUE FUNCTIONS
132
+
133
+ In the same manner we constructed a Boolean algebra over a set of tasks, we can also do so for a set of optimal extended Q-value functions for the corresponding tasks.
134
+
135
+ Theorem 2. Let $\bar { \mathcal { Q } } ^ { * }$ be the set of optimal extended $\bar { Q }$ -value functions for tasks in $\mathcal { M }$ . Define $\bar { Q } _ { \alpha } ^ { \ast } , \bar { Q } _ { \mathcal { U } } ^ { \ast } \in \bar { \mathcal { Q } } ^ { \ast }$ to be the optimal $\bar { Q }$ -functions for the tasks $\mathcal { M } _ { \emptyset } , \mathcal { M } _ { \mathcal { U } } \ : \in \ : \mathcal { M }$ . Then $\bar { \mathcal { Q } } ^ { * }$ forms $a$ Boolean algebra when equipped with the following operators:
136
+
137
+ $$
138
+ \lnot : \bar { \mathcal { Q } } ^ { * } \to \bar { \mathcal { Q } } ^ { * }
139
+ $$
140
+
141
+ $$
142
+ ( s , g , a ) \mapsto \left( \bar { Q } _ { \mathcal { U } } ^ { \ast } ( s , g , a ) + \bar { Q } _ { \mathcal { O } } ^ { \ast } ( s , g , a ) \right) - \bar { Q } ^ { \ast } ( s , g , a )
143
+ $$
144
+
145
+ $\vee : \bar { \mathcal { Q } } ^ { * } \times \bar { \mathcal { Q } } ^ { * } \bar { \mathcal { Q } } ^ { * }$ $( \bar { Q } _ { 1 } ^ { * } , \bar { Q } _ { 2 } ^ { * } ) \mapsto \bar { Q } _ { 1 } ^ { * } \vee \bar { Q } _ { 2 } ^ { * }$ , where $\bar { Q } _ { 1 } ^ { * } \vee \bar { Q } _ { 2 } ^ { * } : \mathcal { S } \times \mathcal { G } \times \mathcal { A } \mathbb { R }$ $( s , g , a ) \mapsto \operatorname* { m a x } \{ \bar { Q } _ { 1 } ^ { * } ( s , g , a ) , \bar { Q } _ { 2 } ^ { * } ( s , g , a ) \}$
146
+
147
+ $\wedge : \bar { \mathcal { Q } } ^ { * } \times \bar { \mathcal { Q } } ^ { * } \bar { \mathcal { Q } } ^ { * }$ $( \bar { Q } _ { 1 } ^ { * } , \bar { Q } _ { 2 } ^ { * } ) \mapsto \bar { Q } _ { 1 } ^ { * } \wedge \bar { Q } _ { 2 } ^ { * }$ , where $\bar { Q } _ { 1 } ^ { * } \wedge \bar { Q } _ { 2 } ^ { * } : \mathcal { S } \times \mathcal { G } \times \mathcal { A } \mathbb { R }$ $( s , g , a ) \mapsto \operatorname* { m i n } \{ \bar { Q } _ { 1 } ^ { * } ( s , g , a ) , \bar { Q } _ { 2 } ^ { * } ( s , g , a ) \}$
148
+
149
+ Proof. See Appendix.
150
+
151
+ # 3.4 BETWEEN TASK AND VALUE FUNCTION ALGEBRAS
152
+
153
+ Having established a Boolean algebra over tasks and extended value function, we finally show that there exists an equivalence between the two. As a result, if we can write down a task under the Boolean algebra, we can immediately write down the optimal value function for the task.
154
+
155
+ Theorem 3. Let $\mathcal { F } : \mathcal { M } \to \bar { \mathcal { Q } } ^ { * }$ be any map from $\mathcal { M }$ to $\bar { \mathcal { Q } } ^ { * }$ such that ${ \mathcal { F } } ( M ) = { \bar { Q } } _ { M } ^ { * }$ for all $M$ in $\mathcal { M }$ . Then $\mathcal { F }$ is a homomorphism.
156
+
157
+ Proof. See Appendix.
158
+
159
+ # 4 ZERO-SHOT TRANSFER THROUGH COMPOSITION
160
+
161
+ We can use the theory developed in the previous sections to perform zero-shot transfer by first learning extended value functions for a set of base tasks, and then composing them to solve new tasks expressible under the Boolean algebra. To demonstrate this, we conduct a series of experiments in a Four Rooms domain (Sutton et al., 1999), where an agent must navigate in a grid world to a particular location. The agent can move in any of the four cardinal directions at each timestep, but colliding with a wall leaves the agent in the same location. The transition dynamics are deterministic, and rewards are $- 0 . 1$ for all non-terminal states, and 1 at the goal.
162
+
163
+ # 4.1 LEARNING BASE TASKS
164
+
165
+ We use a modified version of Q-learning (Watkins, 1989) to learn extended Q-value functions described previously. Our algorithm differs in a number of ways from standard Q-learning: we keep track of the set of terminating states seen so far, and at each timestep we update the extended Q-value function with respect to both the current state and action, as well as all goals encountered so far. We also use the definition of the extended reward function, and so if the agent encounters a terminal state of a different task, it receives reward $N$ . The full pseudocode is listed in the Appendix.
166
+
167
+ If we know the set of goals (and hence potential base tasks) upfront, then it is easy to select a minimal set of base tasks that can be composed to produce the largest number of composite tasks. We first assign a Boolean label to each goal in a table, and then use the columns of the table as base tasks. The goals for each base task are then those goals with value 1 according to the table. In this domain, the two base tasks we select are $M _ { \mathrm { T } }$ , which requires that the agent visit either of the top two rooms, and $M _ { \mathrm { L } }$ , which requires visiting the two left rooms. We illustrate this selection procedure in the Appendix.
168
+
169
+ # 4.2 BOOLEAN COMPOSITION
170
+
171
+ Having learned the optimal extended value functions for our base tasks, we can now leverage Theorems 1–3 to solve new tasks with no further learning. Figure 2 illustrates this composition, where an agent is able to immediately solve complex tasks such as exclusive-or. We illustrate a few composite tasks here, but note that in general, if we have $K$ base tasks, then a Boolean algebra allows for 2 2 K new tasks to be constructed. Thus having trained on only two tasks, our agent has enough information to solve a total of 16 composite tasks.
172
+
173
+ (a) ML (b) MT (c) ML ∨ MT (d) ML ∧ MT (e) ML Y MT (f) ML −∨ MT
174
+
175
+ ![](images/54b620d4ab68d0aed388163f475eefcf07e6479a9dbeec404be5889149a0e983.jpg)
176
+ Figure 2: An example of zero-shot Boolean algebraic composition using the learned extended value functions. Arrows represent the optimal action in a given state. (a–b) The learned optimal goal oriented value functions for the base tasks. (c) Zero-shot disjunctive composition. (d) Zero-shot conjunctive composition. (e) Combining operators to model exclusive-or composition. (f) Composition that produces logical nor. Note that the resulting optimal value function can attain a goal not explicitly represented by the base tasks.
177
+
178
+ By learning extended value functions, an agent can subsequently solve a massive number of tasks; however, the upfront cost of learning is likely to be higher. We investigate the trade-off between the two approaches by investigating how the sample complexity scales with the number of tasks. We compare to Van Niekerk et al. (2019), who used regular value functions to demonstrate optimal disjunctive composition. We note that while the upfront learning cost is therefore lower, the number of tasks expressible using only disjunction is $2 ^ { K } - 1$ , which is significantly less than the full Boolean algebra. We also test using an extended version of the Four Rooms domain, where additional goals are placed along the sides of all walls, resulting in a total of 40 goals. Empirical results are illustrated by Figure 3.
179
+
180
+ Our results show that while additional samples are needed to learn an extended value function, the agent is able to expand the tasks it can solve super-exponentially. Furthermore, the number of base tasks we need to solve is only logarithmic in the number of goal states. For an environment with $K$ goals, we need to learn only $\lfloor \log _ { 2 } K \rfloor + 1$ base tasks, as opposed to the disjunctive approach which requires $K$ base tasks. Thus by sacrificing sample efficiency initially, we achieve an exponential increase in abilities compared to previous work (Van Niekerk et al., 2019).
181
+
182
+ (a) Cumulative number of samples required to learn optimal extended and regular value functions. Error bars represent standard deviations over 100 runs.
183
+
184
+ ![](images/c82e6a2275789ded95c04e817f73e44efcf75a2dbdc9f51d8a09f84a35640287.jpg)
185
+ (b) Number of tasks that can be solved as a function of the number of existing tasks solved. Results are plotted on a log-scale.
186
+ (c) Cumulative number of samples required to solve tasks in a 40-goal Four Rooms domain. Error bars represent standard deviations over 100 runs.
187
+
188
+ Figure 3: Results in comparison to the disjunctive composition of Van Niekerk et al. (2019). (a) The number of samples required to learn the extended value function is greater than learning a standard value function. However, both scale linearly and differ only by a constant factor. (b) The extended value functions allow us to solve exponentially more tasks than the disjunctive approach without further learning. (c) In the modified task with 40 goals, we need to learn only 7 base tasks, as opposed to 40 for the disjunctive case.
189
+
190
+ # 5 COMPOSITION WITH FUNCTION APPROXIMATION
191
+
192
+ Finally, we demonstrate that our compositional approach can also be used to tackle high-dimensional domains where function approximation is required. We use the same video game environment as Van Niekerk et al. (2019), where an agent must navigate a 2D world and collect objects of different shapes and colours. The state space is an $8 4 \times 8 4$ RGB image, and the agent is able to move in any of the four cardinal directions. The agent also possesses a pick-up action, which allows it to collect an object when standing on top of it. There are two shapes (squares and circles) and three colours (blue, beige and purple) for a total of six unique objects. The position of the agent is randomised at the start of each episode.
193
+
194
+ We modify deep Q-learning (Mnih et al., 2015) to learn extended action-value functions.4 Our approach differs in that the network takes a goal state as additional input (again specified as an RGB image). Additionally, when a terminal state is encountered, it is added to the collection of goals seen so far, and when learning updates occur, these goals are sampled randomly from a replay buffer. We first learn to solve two base tasks: collecting blue objects, and collecting squares, which can then be composed to solve new tasks immediately.
195
+
196
+ We demonstrate composition characterised by (i) disjunction, (ii) conjunction and (iii) exclusiveor. This corresponds to tasks where the target items are: (i) blue or square, (ii) blue squares, and (iii) blue or squares, but not blue squares. Figure 4 illustrates sample trajectories, as well as the subsequent composed value functions, for the respective tasks.
197
+
198
+ # 6 RELATED WORK
199
+
200
+ The ability to compose value functions was first demonstrated using the linearly-solvable MDP framework (Todorov, 2007), where value functions could be composed to solve tasks similar to the disjunctive case (Todorov, 2009). Van Niekerk et al. (2019) show that the same kind of composition can be achieved using entropy-regularised RL (Fox et al., 2016), and extend the results to the standard RL setting, where agents can optimally solve the disjunctive case. Using entropy-regularised RL, Haarnoja et al. (2018) approximates the conjunction of tasks by averaging their reward functions, and demonstrates that by averaging the optimal value functions of the respective tasks, the agent can achieve performance close to optimal. Hunt et al. (2019) extends this result by composing value functions to solve the average reward task exactly, which approximates the true conjunctive case. More recently, Peng et al. (2019) introduce a few-shot learning approach to compose policies
201
+
202
+ ![](images/070a7aa97c87e472eec20d06303931d3a4264aabef5773a5e02ecf17e86cda97.jpg)
203
+
204
+ ![](images/4000b336116a29b0972f305bd924fcd77539d0f65e944f0aef6a2660114042b7.jpg)
205
+
206
+ ![](images/3b2450b701a89341be4b6a60ac9b1f963820241ea38b62807ec3b6acbb274f63.jpg)
207
+
208
+ ![](images/f1829910e8b54982a78a894241af20306a790e70a61e92a95ff2bb20e4d69ada.jpg)
209
+ (a) Trajectories for disjunctive composition.
210
+
211
+ ![](images/696176b0714e2615a89ef9ad310764aa44fe7be35f07f8138e953af3bc0a79f1.jpg)
212
+ (b) Trajectories for conjunctive composition.
213
+ (e) Value function for conjunctive composition.
214
+
215
+ (d) Value function for disjunctive composition.
216
+
217
+ ![](images/7b86a887f034e6df98eb4e0713becad330a14c7735f54204aaaeb69450c211af.jpg)
218
+ (c) Trajectories for exclusive-or composition.
219
+ (f) Value function for exclusiveor composition.
220
+ Figure 4: By composing extended value functions from the base tasks (collecting blue objects, and collecting squares), we can act optimally in new tasks with no further learning. To generate the value functions, we place the agent at every location and compute the maximum output of the network over all goals and actions. We then interpolate between the points to smooth the graph. Any error in the visualisation is due to the use of non-linear function approximation.
221
+
222
+ multiplicatively. Although lacking theoretical foundations, results show that an agent can learn a weighted composition of existing base skills to solve a new complex task. By contrast, we show that zero-shot optimal composition can be achieved for all Boolean operators.
223
+
224
+ # 7 CONCLUSION
225
+
226
+ We have shown how to compose tasks using the standard Boolean algebra operators. These composite tasks can be immediately solved by first learning goal-oriented value functions, and then composing them in a similar manner. Finally, we note that there is much room for improvement in learning the extended value functions for the base tasks. In our experiments, we learned each extended value function from scratch, but it is likely that having learned one for the first task, we could use it to initialise the extended value function for the second task to improve convergence times. One area for improvement lies in efficiently learning the extended value functions, as well as developing better algorithms for solving tasks with sparse rewards. For example, it is likely that approaches such as hindsight experience replay (Andrychowicz et al., 2017) could reduce the number of samples required to learn extended value functions, while Mirowski et al. (2017) provides a method for learning complex tasks with sparse rewards using auxiliary tasks. We leave incorporating these approaches to future work. Our proposed approach is a step towards both interpretable RL— since both the tasks and optimal value functions can be specified using Boolean operators—and the ultimate goal of lifelong learning agents, which are able to solve combinatorially many tasks in a sample-efficient manner.
227
+
228
+ REFERENCES
229
+ M. Andrychowicz, F. Wolski, A. Ray, J. Schneider, R. Fong, P. Welinder, B. McGrew, J. Tobin, P. Abbeel, and W. Zaremba. Hindsight experience replay. In Advances in Neural Information Processing Systems, pp. 5048–5058, 2017.
230
+ P. Bacon, J. Harb, and D. Precup. The option-critic architecture. In Thirty-First AAAI Conference on Artificial Intelligence, 2017.
231
+ A. Barreto, W. Dabney, R. Munos, J. Hunt, T. Schaul, H. van Hasselt, and D. Silver. Successor features for transfer in reinforcement learning. In Advances in neural information processing systems, pp. 4055–4065, 2017.
232
+ D.P. Bertsekas and J.N. Tsitsiklis. An analysis of stochastic shortest path problems. Mathematics of Operations Research, 16(3):580–595, 1991.
233
+ R. Fox, A. Pakman, and N. Tishby. Taming the noise in reinforcement learning via soft updates. In 32nd Conference on Uncertainty in Artificial Intelligence, 2016.
234
+ T. Haarnoja, V. Pong, A. Zhou, M. Dalal, P. Abbeel, and S. Levine. Composable deep reinforcement learning for robotic manipulation. arXiv preprint arXiv:1803.06773, 2018.
235
+ J. Hunt, A. Barreto, T. Lillicrap, and N. Heess. Composing entropic policies using divergence correction. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pp. 2911–2920. PMLR, 09–15 Jun 2019.
236
+ T. Jaksch, R. Ortner, and P. Auer. Near-optimal regret bounds for reinforcement learning. Journal of Machine Learning Research, 11(Apr):1563–1600, 2010.
237
+ H.W. James and E.J. Collins. An analysis of transient Markov decision processes. Journal of applied probability, 43(3):603–621, 2006.
238
+ Leslie Pack Kaelbling. Learning to achieve goals. In International Joint Conferences on Artificial Intelligence, pp. 1094–1099, 1993.
239
+ S. Levine, C. Finn, T. Darrell, and P. Abbeel. End-to-end training of deep visuomotor policies. The Journal of Machine Learning Research, 17(1):1334–1373, 2016.
240
+ T.. Lillicrap, J. Hunt, A. Pritzel, N. Heess, T. Erez, Y. Tassa, D. Silver, and D. Wierstra. Continuous control with deep reinforcement learning. In International Conference on Learning Representations, 2016.
241
+ P. Mirowski, R. Pascanu, F. Viola, H. Soyer, A. Ballard, A. Banino, M. Denil, R. Goroshin, L. Sifre, K. Kavukcuoglu, et al. Learning to navigate in complex environments. In International Conference on Learning Representations, 2017.
242
+ V. Mnih, K. Kavukcuoglu, D. Silver, A. Rusu, J. Veness, M. Bellemare, A. Graves, M. Riedmiller, A. Fidjeland, G. Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529, 2015.
243
+ X. Peng, M. Chang, G. Zhang, P. Abbeel, and S. Levine. MCP: Learning composable hierarchical control with multiplicative compositional policies. arXiv preprint arXiv:1905.09808, 2019.
244
+ A.M. Saxe, A.C. Earle, and B.S. Rosman. Hierarchy through composition with multitask LMDPs. Proceedings of the 34th International Conference on Machine Learning, 70:3017–3026, 2017.
245
+ T. Schaul, D. Horgan, K. Gregor, and D. Silver. Universal value function approximators. In Proceedings of the 32nd International Conference on Machine Learning, volume 37 of Proceedings of Machine Learning Research, pp. 1312–1320, Lille, France, 07–09 Jul 2015. PMLR.
246
+ D. Silver, J. Schrittwieser, K. Simonyan, I. Antonoglou, A. Huang, A. Guez, T. Hubert, L. Baker, M. Lai, A. Bolton, et al. Mastering the game of go without human knowledge. Nature, 550(7676): 354, 2017.
247
+ R. Sutton, D. Precup, and S. Singh. Between MDPs and semi-MDPs: A framework for temporal abstraction in reinforcement learning. Artificial intelligence, 112(1-2):181–211, 1999.
248
+ E. Todorov. Linearly-solvable Markov decision problems. In Advances in Neural Information Processing Systems, pp. 1369–1376, 2007.
249
+ E. Todorov. Compositionality of optimal control laws. In Advances in Neural Information Processing Systems, pp. 1856–1864, 2009.
250
+ B. Van Niekerk, S. James, A. Earle, and B. Rosman. Composing value functions in reinforcement learning. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pp. 6401–6409. PMLR, 09–15 Jun 2019.
251
+ C. Watkins. Learning from delayed rewards. PhD thesis, King’s College, Cambridge, 1989.
252
+
253
+ # A APPENDIX
254
+
255
+ A.1 BOOLEAN ALGEBRA DEFINITION
256
+
257
+ Definition 3. A Boolean algebra is a set $\boldsymbol { B }$ equipped with the binary operators ∨ (disjunction) and $\wedge$ (conjunction), and the unary operator $\neg$ (negation), which satisfies the following Boolean algebra axioms for $a , b , c$ in $\boldsymbol { B }$ :
258
+
259
+ (i) Idempotence: $a \wedge a = a \vee a = a$ .
260
+
261
+ (ii) Commutativity: $a \wedge b = b \wedge a$ and $a \vee b = b \vee a$ .
262
+
263
+ (iii) Associativity: $a \wedge ( b \wedge c ) = ( a \wedge b ) \wedge c a n d a \wedge ( b \vee c ) = ( a \vee b ) \vee c .$
264
+
265
+ (iv) Absorption: $a \wedge ( a \vee b ) = a \vee ( a \wedge b ) = a .$
266
+
267
+ (v) Distributivity: $a \wedge ( b \vee c ) = ( a \wedge b ) \vee ( a \wedge c )$ and $a \vee ( b \wedge c ) = ( a \vee b ) \wedge ( a \vee c )$ .
268
+
269
+ (vi) Identity: there exists $\mathbf { 0 } , \mathbf { 1 }$ in $\boldsymbol { B }$ such that
270
+
271
+ $$
272
+ \begin{array} { l } { \mathbf { 0 } \wedge a = \mathbf { 0 } } \\ { \mathbf { 0 } \vee a = a } \\ { \mathbf { 1 } \wedge a = a } \\ { \mathbf { 1 } \vee a = \mathbf { 1 } } \end{array}
273
+ $$
274
+
275
+ (vii) Complements: for every a in $\boldsymbol { B }$ , there exists an element $a ^ { \prime }$ in $\boldsymbol { B }$ such that $a \wedge a ^ { \prime } = \mathbf { 0 }$ and $a \vee a ^ { \prime } = \mathbf { 1 }$ .
276
+
277
+ # A.2 PROOF FOR THEOREM 1
278
+
279
+ Theorem 1. Let $\mathcal { M }$ be a set of tasks. Define $\mathcal { M } _ { \mathcal { U } } , \mathcal { M } _ { \mathcal { O } } \in \mathcal { M }$ to be tasks with the respective reward functions
280
+
281
+ $$
282
+ \begin{array}{c} \begin{array} { r l } { r _ { \mathcal { M } _ { \mathcal { U } } } : \mathcal { S } \times \mathcal { A } \to \mathbb { R } } \\ { ( s , a ) \mapsto \left\{ r _ { \mathcal { U } } , \quad i f s \in \mathcal { G } \qquad \right.} & { \qquad ( s , a ) \mapsto \left\{ r _ { \mathcal { E } } , \quad i f s \in \mathcal { G } \right. } \\ { r _ { s , a } , } & { \quad o t h e r w i s e . } \end{array} \end{array}
283
+ $$
284
+
285
+ Then $\mathcal { M }$ forms a Boolean algebra with universal bounds $\mathcal { M } _ { \emptyset }$ and $\mathcal { M } _ { \mathcal { U } }$ when equipped with the following operators:
286
+
287
+ $$
288
+ \begin{array} { r l } & { \cdot : \mathcal { M } \to \mathcal { M } } \\ & { \quad M \mapsto ( \mathcal { S } , \mathcal { A } , \rho , r _ { - M } ) , w h e r e ~ r _ { - M } : \mathcal { S } \times \mathcal { A } \to \mathbb { R } } \\ & { \qquad ( s , a ) \mapsto \left( r _ { \mathcal { M } _ { u } } ( s , a ) + r _ { \mathcal { M } _ { \mathcal { E } } } ( s , a ) \right) - r _ { M } ( s , a ) } \end{array}
289
+ $$
290
+
291
+ $$
292
+ \begin{array} { r } { \begin{array} { l l } { : \mathcal { M } \times \mathcal { M } \to \mathcal { M } } \\ { \mathit { \Phi } ( M _ { 1 } , M _ { 2 } ) \mapsto ( \mathcal { S } , \mathcal { A } , \rho , r _ { M _ { 1 } \vee M _ { 2 } } ) , w h e r e ~ r _ { M _ { 1 } \vee M _ { 2 } } : \mathcal { S } \times \mathcal { A } \to \mathbb { R } } \\ & { \mathit { ( s , a ) } \mapsto \operatorname* { m a x } \{ r _ { M _ { 1 } } ( s , a ) , r _ { M _ { 2 } } ( s , a ) \} } \end{array} } \end{array}
293
+ $$
294
+
295
+ $$
296
+ \begin{array} { r l } & { \colon \mathcal { M } \times \mathcal { M } \to \mathcal { M } } \\ & { \quad ( M _ { 1 } , M _ { 2 } ) \mapsto ( \mathcal { S } , \mathcal { A } , \rho , r _ { M _ { 1 } \wedge M _ { 2 } } ) , w h e r e ~ r _ { M _ { 1 } \wedge M _ { 2 } } : \mathcal { S } \times \mathcal { A } \to \mathbb { R } } \\ & { \qquad ( s , a ) \mapsto \operatorname* { m i n } \{ r _ { M _ { 1 } } ( s , a ) , r _ { M _ { 2 } } ( s , a ) \} } \end{array}
297
+ $$
298
+
299
+ Proof. Let $M _ { 1 } , M _ { 2 } \in \mathcal { M }$ . We show that $\neg , \lor , \land$ satisfy the Boolean properties (i) – (vii).
300
+
301
+ (i)–(v): These easily follow from the fact that the min and max functions satisfy the idempotent, commutative, associative, absorption and distributive laws.
302
+
303
+ (vi): Let $r _ { \mathcal { M } u \cap M _ { 1 } }$ and $r _ { M _ { 1 } }$ be the reward functions for $\mathcal { M } _ { \mathcal { U } } \wedge M _ { 1 }$ and $M _ { 1 }$ respectively. Then for all $( s , a )$ in $\boldsymbol { s } \times \boldsymbol { A }$ ,
304
+
305
+ $$
306
+ \begin{array}{c} \begin{array} { r l } & { r _ { M _ { \mathcal { U } } \wedge M _ { 1 } } ( s , a ) = \left\{ \underset { \operatorname* { m i n } \left\{ r _ { s , a } , r _ { s , a } \right\} } { \operatorname* { m i n } \left\{ r _ { u } , r _ { u } ( s , a ) \right\} } , \quad \mathrm { i f ~ } s \in \mathcal { G } \right.} \\ & { \qquad = \left\{ \begin{array} { l l } { r _ { M _ { 1 } } ( s , a ) , } & { \mathrm { i f ~ } s \in \mathcal { G } } \\ { r _ { s , a } , } & { \mathrm { o t h e r w i s e } . } \end{array} \right. } \\ & { \qquad = r _ { M _ { 1 } } ( s , a ) . } \end{array} ( r _ { M _ { 1 } } ( s , a ) \in \{ r _ { \mathcal { Q } } , r _ { \mathcal { U } } \} \mathrm { ~ f o r ~ } s \in \mathcal { G } ) \\ & { \qquad = r _ { M _ { 1 } } ( s , a ) . } \end{array}
307
+ $$
308
+
309
+ Thus $\mathcal { M } _ { \mathcal { U } } \wedge M _ { 1 } = M _ { 1 }$ . Similarly $\mathcal { M } _ { \mathcal { U } } \vee M _ { 1 } = \mathcal { M } _ { \mathcal { U } }$ , $\mathcal { M } _ { \emptyset } \wedge M _ { 1 } = \mathcal { M } _ { \emptyset }$ , and $\mathcal { M } _ { \emptyset } \lor M _ { 1 } =$ $M _ { 1 }$ . Hence $\mathcal { M } _ { \emptyset }$ and $\mathcal { M } _ { \mathcal { U } }$ are the universal bounds of $\mathcal { M }$ .
310
+
311
+ (vii): Let $r _ { M _ { 1 } \wedge \lnot M _ { 1 } }$ be the reward function for $M _ { 1 } \land \lnot M _ { 1 }$ . Then for all $( s , a )$ in $s \times { \mathcal A }$ ,
312
+
313
+ $$
314
+ \begin{array} { r l } & { r _ { M _ { 1 } \wedge \neg M _ { 1 } } ( s , a ) = \left\{ \begin{array} { l l } { \operatorname* { m i n } \{ r _ { M _ { 1 } } ( s , a ) , ( r _ { \mathcal { U } } + r _ { \mathcal { Q } } ) - r _ { M _ { 1 } } ( s , a ) \} , } & { \mathrm { i f ~ } s \in \mathcal { G } } \\ { \operatorname* { m i n } \{ r _ { s , a } , ( r _ { s , a } + r _ { s , a } ) - r _ { s , a } \} , } & { \mathrm { o t h e r w i s e } . } \end{array} \right. } \\ & { \quad \quad \quad = \left\{ \begin{array} { l l } { r _ { \mathcal { Q } } , } & { \mathrm { i f ~ } s \in \mathcal { G } \mathrm { ~ a n d ~ } r _ { M _ { 1 } } ( s , a ) = r _ { \mathcal { U } } } \\ { r _ { \mathcal { Q } } , } & { \mathrm { i f ~ } s \in \mathcal { G } \mathrm { ~ a n d ~ } r _ { M _ { 1 } } ( s , a ) = r _ { \mathcal { Q } } } \\ { r _ { s , a } , } & { \mathrm { o t h e r w i s e } . } \end{array} \right. } \\ & { \quad \quad \quad = r _ { \mathcal { M } _ { \mathcal { Q } } } ( s , a ) . } \end{array}
315
+ $$
316
+
317
+ Thus $M _ { 1 } \wedge { \neg } M _ { 1 } = { \mathcal { M } } _ { \emptyset }$ , and similarly $M _ { 1 } \lor \lnot M _ { 1 } = \mathcal { M } _ { \mathcal { U } }$ .
318
+
319
+ # A.3 PROOF FOR LEMMA 2
320
+
321
+ Lemma 2. Denote $S ^ { - } = S \setminus \mathcal { G }$ as the non-terminal states of $\mathcal { M }$ . Let $M _ { 1 } , M _ { 2 } \in \mathcal { M }$ , and let each $g$ in $\mathcal { G }$ define MDPs $M _ { 1 , g }$ and $M _ { 2 , g }$ with reward functions
322
+
323
+ $$
324
+ r _ { M _ { 1 , g } } : = \bar { r } _ { M _ { 1 } } ( s , g , a ) a n d r _ { M _ { 2 , g } } : = \bar { r } _ { M _ { 2 } } ( s , g , a )
325
+ $$
326
+
327
+ Then for all $g$ in $\mathcal { G }$ and $s$ in $S ^ { - }$ ,
328
+
329
+ $$
330
+ \pi _ { g } ^ { * } ( s ) \in \underset { a \in \mathcal { A } } { \arg \operatorname* { m a x } } Q _ { M _ { 1 , g } } ^ { * } ( s , a ) i f f \pi _ { g } ^ { * } ( s ) \in \underset { a \in \mathcal { A } } { \arg \operatorname* { m a x } } Q _ { M _ { 2 , g } } ^ { * } ( s , a ) .
331
+ $$
332
+
333
+ Proof. Let $g \in \mathcal { G } , s \in \mathcal { S } ^ { - }$ and let $\pi _ { g } ^ { * }$ be defined by
334
+
335
+ $$
336
+ \pi _ { g } ^ { * } ( s ^ { \prime } ) \in \mathop { \mathrm { a r g } \operatorname* { m a x } } _ { a \in \mathcal { A } } Q _ { M _ { 1 } , g } ^ { * } ( s , a ) \mathrm { f o r } { \mathrm { a l l } } s ^ { \prime } \in S .
337
+ $$
338
+
339
+ If $g$ is unreachable from $s$ , then we are done since for all $( s ^ { \prime } , a )$ in $\boldsymbol { s } \times \boldsymbol { A }$ we have
340
+
341
+ $$
342
+ \begin{array} { r l } & { g \neq s ^ { \prime } \implies r _ { M _ { 1 , g } } ( s ^ { \prime } , a ) = \left\{ \begin{array} { l l } { N , } & { \mathrm { ~ i f ~ } s ^ { \prime } \in \mathcal { G } } \\ { r _ { s ^ { \prime } , a } , } & { \mathrm { ~ o t h e r w i s e } } \end{array} = r _ { M _ { 2 , g } } ( s ^ { \prime } , a ) \right. } \\ & { \qquad \implies M _ { 1 , g } = M _ { 2 , g } . } \end{array}
343
+ $$
344
+
345
+ If $g$ is reachable from $s$ , then we show that following $\pi _ { g } ^ { * }$ must reach $g$ . Since $\pi _ { g } ^ { * }$ is proper, it must reach a terminal state $g ^ { \prime } \in \mathcal { G }$ . Assume $g ^ { \prime } \neq g$ . Let $\pi _ { g }$ be a policy that produces the shortest trajectory
346
+
347
+ to $g$ . Let $G ^ { \pi _ { g } ^ { * } }$ and $G ^ { \pi _ { g } }$ be the returns for the respective policies. Then,
348
+
349
+ $$
350
+ \begin{array} { r l } & { ( E ^ { s } ) \geq { \mathbb { C } ^ { { \alpha } _ { s } } } } \\ & { \implies G _ { T ^ { - 1 } } ^ { s ^ { \alpha } } + r \chi _ { s , x } ( g ^ { \prime } , g _ { s } ^ { \alpha } ( g ^ { \prime } ) ) \geq G ^ { s c } , } \\ & { \implies G _ { T ^ { - 1 } } ^ { s ^ { \alpha } } + r \chi _ { s , x } ( g ^ { \prime } , g _ { s } ^ { \alpha } ( g ^ { \prime } ) ) = G ^ { s c } , } \\ & { \implies ( G _ { T ^ { - 1 } } ^ { s c } = \overbrace { \sum _ { t = 0 } ^ { T } } ^ { T - 1 } r \chi _ { s , x } ( g , g _ { s } ^ { \alpha } ( g _ { s } ) ) a n { \mathrm { d } T } ^ { 1 } \mathbin { \mathrm { i s ~ t h e ~ i n e q u e a ~ t w h i s } } , } \\ & { \implies G _ { T ^ { - 1 } } ^ { s ^ { \alpha } } + N \succeq G _ { T ^ { \alpha } } ^ { s c } , \ \operatorname* { i n c g } _ { s } ^ { \alpha } g ^ { \alpha } \notin \mathcal { G } ^ { c } } \\ & { \implies N \geq G ^ { c m } - G _ { T ^ { - 1 } } ^ { s c } } \\ & { \implies ( r \mathrm { m s e } ^ { - n } \mathrm { a n x } ) D \geq G ^ { c s } - G _ { 2 ^ { - 1 } } ^ { s ^ { \alpha } } , \ \mathrm { b y ~ d e t h i n i t i o n ~ o f ~ } N } \\ & { \implies G _ { T ^ { - 1 } } ^ { s c } - r \mathrm { s u x } D \geq G ^ { c m } - r _ { \mathrm { a m b } } D , \ \mathrm { s i n c } G _ { T ^ { - 1 } } ^ { c s c } \geq \gamma _ { \mathrm { a m b } } D } \\ & { \implies G _ { T ^ { - 1 } } ^ { s c } - r \mathrm { s u x } D \geq 0 } \\ & { \implies G _ { T ^ { - 1 } } ^ { s c } \geq r _ { \mathrm { a m b } } D . } \end{array}
351
+ $$
352
+
353
+ But this is a contradiction since the result obtained by following an optimal trajectory up to a terminal state without the reward for entering the terminal state must be strictly less that receiving $r _ { \mathrm { M A X } }$ for every step of the longest possible optimal trajectory. Hence we must have $g ^ { \prime } = g$ . Similarly, all optimal policies of $M _ { 2 , g }$ must reach $g$ . Hence $\pi _ { g } ^ { * } ( s ) \in \arg \operatorname* { m a x } _ { a \in \mathcal { A } } Q _ { M _ { 2 , g } } ^ { * } ( s , a )$ . Since $M _ { 1 }$ and $M _ { 2 }$ are arbitrary elements of $\mathcal { M }$ , the reverse implication holds too.
354
+
355
+ # A.4 PROOF FOR THEOREM 2
356
+
357
+ Theorem 2. Let $\bar { \mathcal { Q } } ^ { * }$ be the set of optimal extended $\bar { Q }$ -value functions for tasks in $\mathcal { M }$ . Define $\bar { Q } _ { \alpha } ^ { \ast } , \bar { Q } _ { \mathcal { U } } ^ { \ast } \in \bar { \mathcal { Q } } ^ { \ast }$ to be the optimal $\bar { Q }$ -functions for the tasks $\mathcal { M } _ { \emptyset } , \mathcal { M } _ { \mathcal { U } } \ : \in \ : \mathcal { M }$ . Then $\bar { \mathcal { Q } } ^ { * }$ forms $a$ Boolean algebra when equipped with the following operators:
358
+
359
+ $$
360
+ \begin{array} { r l } & { \cdot : \bar { Q } ^ { * } \to \bar { Q } ^ { * } } \\ & { \quad \bar { Q } ^ { * } \mapsto \neg \bar { Q } ^ { * } , w h e r e \neg \bar { Q } ^ { * } : \mathcal { S } \times \mathcal { G } \times \mathcal { A } \to \mathbb { R } } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \bar { Q } _ { \mathcal { U } } ^ { * } ( s , g , a ) + \bar { Q } _ { \mathcal { D } } ^ { * } ( s , g , a ) \big ) - \bar { Q } ^ { * } ( s , g , a ) } \end{array}
361
+ $$
362
+
363
+ $\vee : \bar { \mathcal { Q } } ^ { * } \times \bar { \mathcal { Q } } ^ { * } \bar { \mathcal { Q } } ^ { * }$ $( \bar { Q } _ { 1 } ^ { * } , \bar { Q } _ { 2 } ^ { * } ) \mapsto \bar { Q } _ { 1 } ^ { * } \vee \bar { Q } _ { 2 } ^ { * }$ , where $\bar { Q } _ { 1 } ^ { \ast } \vee \bar { Q } _ { 2 } ^ { \ast } : \mathcal { S } \times \mathcal { G } \times \mathcal { A } \mathbb { R }$ $( s , g , a ) \mapsto \operatorname* { m a x } \{ \bar { Q } _ { 1 } ^ { * } ( s , g , a ) , \bar { Q } _ { 2 } ^ { * } ( s , a ) \}$
364
+
365
+ $$
366
+ \wedge : \bar { \mathcal { Q } } ^ { * } \times \bar { \mathcal { Q } } ^ { * } \bar { \mathcal { Q } } ^ { * }
367
+ $$
368
+
369
+ $$
370
+ \begin{array} { r l } & { \mathrel { \phantom { = } } \bigcup } \\ & { \bar { Q } _ { 2 } ^ { * } ) \mapsto \bar { Q } _ { 1 } ^ { * } \wedge \bar { Q } _ { 2 } ^ { * } , \ w h e r e \ \bar { Q } _ { 1 } ^ { * } \wedge \bar { Q } _ { 2 } ^ { * } \colon \mathcal { S } \times \mathcal { G } \times \mathcal { A } \to \mathbb { R } } \\ & { \qquad ( s , g , a ) \mapsto \operatorname* { m i n } \{ \bar { Q } _ { 1 } ^ { * } ( s , g , a ) , \bar { Q } _ { 2 } ^ { * } ( s , a ) \} } \end{array}
371
+ $$
372
+
373
+ Proof. Let ${ \bar { Q } } _ { M _ { 1 } } ^ { * } , { \bar { Q } } _ { M _ { 2 } } ^ { * } \in { \bar { \ Q } } ^ { * }$ be the optimal $\bar { Q }$ -value functions for tasks $M _ { 1 } , M _ { 2 } \in \mathcal { M }$ with reward functions $r _ { M _ { 1 } }$ 1and $r _ { M _ { 2 } }$ . We show that $\neg , \lor , \land$ satisfy the Boolean properties (i) – (vii).
374
+
375
+ (i)–(v): These follow directly from the properties of the min and max functions.
376
+
377
+ (vi): For all $( s , g , a )$ in $S \times \mathcal { G } \times \mathcal { A }$ ,
378
+
379
+ $$
380
+ \begin{array} { r l } & { ( \bar { Q } _ { \mathcal { U } } ^ { * } \wedge \bar { Q } _ { M _ { 1 } } ^ { * } ) ( s , g , a ) = \operatorname* { m i n } \{ ( \bar { Q } _ { \mathcal { U } } ^ { * } ( s , g , a ) , \bar { Q } _ { M _ { 1 } } ^ { * } ( s , g , a ) \} } \\ & { \qquad = \operatorname* { m i n } \{ G _ { s ; g , a } ^ { * } + \bar { r } _ { \mathcal { M } _ { \mathcal { U } } } ( s ^ { \prime } , g , a ^ { \prime } ) , G _ { s ; g , a } ^ { * } + \bar { r } _ { M _ { 1 } } ( s ^ { \prime } , g , a ^ { \prime } ) \} \quad \mathrm { ( C o r o l l a r y ~ 1 ) } } \\ & { \qquad = G _ { s ; g , a } ^ { * } + \operatorname* { m i n } \{ \bar { r } _ { \mathcal { M } _ { \mathcal { U } } } ( s ^ { \prime } , g , a ^ { \prime } ) , \bar { r } _ { M _ { 1 } } ( s ^ { \prime } , g , a ^ { \prime } ) \} } \\ & { \qquad = G _ { s ; g , a } ^ { * } + \bar { r } _ { M _ { 1 } } ( s ^ { \prime } , g , a ^ { \prime } ) \qquad \mathrm { ( s i n c e ~ } \bar { r } _ { M _ { 1 } } ( s ^ { \prime } , g , a ^ { \prime } ) \in \{ r _ { \mathcal { D } } , r _ { \mathcal { U } } , N \} ) } \\ & { \qquad = \bar { Q } _ { M _ { 1 } } ^ { * } ( s , g , a ) . } \end{array}
381
+ $$
382
+
383
+ Similarly, $\bar { Q } _ { \mathcal { U } } ^ { * } \vee \bar { Q } _ { M _ { 1 } } ^ { * } = \bar { Q } _ { \mathcal { U } } ^ { * } , \bar { Q } _ { \mathcal { O } } ^ { * } \wedge \bar { Q } _ { M _ { 1 } } ^ { * } = \bar { Q } _ { \mathcal { O } } ^ { * }$ , and $\bar { Q } _ { \varnothing } ^ { * } \vee \bar { Q } _ { M _ { 1 } } ^ { * } = \bar { Q } _ { M _ { 1 } } ^ { * }$
384
+
385
+ (vii): For all $( s , g , a )$ in $S \times \mathcal { G } \times \mathcal { A }$ ,
386
+
387
+ $$
388
+ \begin{array} { r l } & { ( \bar { Q } _ { M _ { 1 } } ^ { * } \wedge \neg \bar { Q } _ { M _ { 1 } } ^ { * } ) ( s , g , a ) = \operatorname* { m i n } \{ \bar { Q } _ { M _ { 1 } } ^ { * } ( s , g , a ) , ( \bar { Q } _ { M } ^ { * } ( s , g , a ) - \bar { Q } _ { \mathcal { R } } ^ { * } ( s , g , a ) ) - \bar { Q } _ { M _ { 1 } } ^ { * } ( s , g , a ) \} } \\ & { \qquad = G _ { s ; g , a } ^ { * } + \operatorname* { m i n } \{ \bar { r } _ { M _ { 1 } } ( s ^ { \prime } , g , a ^ { \prime } ) , ( \bar { r } _ { M _ { M } } ( s ^ { \prime } , g , a ^ { \prime } ) + \bar { r } _ { M _ { \mathcal { O } } } ( s ^ { \prime } , g , a ^ { \prime } ) ) } \\ & { \qquad - \bar { r } _ { M _ { 1 } } ( s ^ { \prime } , g , a ^ { \prime } ) \} } \\ & { \qquad = G _ { s ; g , a } ^ { * } + \bar { r } _ { M _ { \mathcal { O } } } ( s ^ { \prime } , g , a ^ { \prime } ) } \\ & { \qquad = \bar { Q } _ { \mathcal { O } } ^ { * } ( s , g , a ) . } \end{array}
389
+ $$
390
+
391
+ Similarly, $\bar { Q } _ { M _ { 1 } } ^ { * } \vee \neg \bar { Q } _ { M _ { 1 } } ^ { * } = \bar { Q } _ { \mathcal { U } } ^ { * }$ .
392
+
393
+ # A.5 PROOF FOR THEOREM 3
394
+
395
+ Theorem 3. Let $\mathcal { F } : \mathcal { M } \to \bar { \mathcal { Q } } ^ { * }$ be any map from $\mathcal { M }$ to $\bar { \mathcal { Q } } ^ { * }$ such that ${ \mathcal { F } } ( M ) = { \bar { Q } } _ { M } ^ { * }$ for all $M$ in $\mathcal { M }$ . Then $\mathcal { F }$ is a homomorphism.
396
+
397
+ Proof. Let $M _ { 1 } , M _ { 2 } \in \mathcal { M }$ . Then for all $( s , g , a )$ in $S \times \mathcal { G } \times \mathcal { A }$ ,
398
+
399
+ $$
400
+ \begin{array} { r l } & { \bar { Q } _ { - M _ { 1 } } ^ { * } ( s , g , a ) = G _ { s : g , a } ^ { * } + \bar { r } _ { - M _ { 1 } } ( s ^ { \prime } , g , a ^ { \prime } ) \quad \mathrm { ( f r o m ~ C o r o l l a r y ~ 1 ) } } \\ & { \hphantom { \frac { ( \bar { Q } _ { - 1 } ^ { * } ) } { \omega } } = G _ { s : g , a } ^ { * } + ( \bar { r } _ { M _ { 1 } } ( s ^ { \prime } , g , a ^ { \prime } ) + \bar { r } _ { M _ { o } } ( s ^ { \prime } , g , a ^ { \prime } ) ) - \bar { r } _ { M _ { 1 } } ( s ^ { \prime } , g , a ^ { \prime } ) } \\ & { \hphantom { \frac { ( \bar { Q } _ { - 1 } ^ { * } ) } { \omega } } = \left[ ( G _ { s : g , a } ^ { * } + \bar { r } _ { M _ { 1 } } ( s ^ { \prime } , g , a ^ { \prime } ) ) + ( G _ { s : g , a } ^ { * } + \bar { r } _ { M _ { o } } ( s ^ { \prime } , g , a ^ { \prime } ) ) \right] - ( G _ { s : g , a } ^ { * } + \bar { r } _ { M _ { 1 } } ( s ^ { \prime } , g , a ^ { \prime } ) } \\ & { \hphantom { \frac { ( \bar { Q } _ { - 1 } ^ { * } ) } { \omega } } = \left[ \bar { Q } _ { \bar { M } } ^ { * } ( s , g , a ) + \bar { Q } _ { \bar { \omega } } ^ { * } ( s , g , a ) \right] - \bar { Q } _ { M _ { 1 } } ^ { * } ( s , g , a ) } \\ & { \hphantom { \frac { ( \bar { Q } _ { - 1 } ^ { * } ) } { \omega } } = - \bar { Q } _ { M _ { 1 } } ^ { * } ( s , g , a ) } \\ { \implies \mathcal { F } ( \neg M _ { 1 } ) = \neg \mathcal { F } ( M _ { 1 } ) } \end{array}
401
+ $$
402
+
403
+ $$
404
+ \begin{array} { r l } & { \bar { Q } _ { M _ { 1 } \vee M _ { 2 } } ^ { * } ( s , g , a ) = G _ { s ; g , a } ^ { * } + \bar { r } _ { M _ { 1 } \vee M _ { 2 } } ( s ^ { \prime } , g , a ^ { \prime } ) } \\ & { \quad \quad \quad \quad \quad \quad \quad = G _ { s ; g , a } ^ { * } + \operatorname* { m a x } \{ \bar { r } _ { M _ { 1 } } ( s ^ { \prime } , g , a ^ { \prime } ) , \bar { r } _ { M _ { 2 } } ( s ^ { \prime } , g , a ^ { \prime \prime } ) \} } \\ & { \quad \quad \quad \quad \quad \quad = \operatorname* { m a x } \{ G _ { s ; g , a } ^ { * } + \bar { r } _ { M _ { 1 } } ( s ^ { \prime } , g , a ^ { \prime } ) , G _ { s ; g , a } ^ { * } + \bar { r } _ { M _ { 2 } } ( s ^ { \prime } , g , a ^ { \prime \prime } ) \} } \\ & { \quad \quad \quad \quad \quad = \operatorname* { m a x } \{ \bar { Q } _ { M _ { 1 } } ^ { * } ( s , g , a ) , \bar { Q } _ { M _ { 2 } } ^ { * } ( s , g , a ) \} } \\ & { \quad \quad \quad \quad \quad = ( \bar { Q } _ { M _ { 1 } } ^ { * } \vee \bar { Q } _ { M _ { 2 } } ^ { * } ) ( s , g , a ) } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \end{array}
405
+ $$
406
+
407
+ Similarly $\mathcal { F } ( M _ { 1 } \wedge M _ { 2 } ) = \mathcal { F } ( M _ { 1 } ) \wedge \mathcal { F } ( M _ { 2 } )$ .
408
+
409
+ # A.6 GOAL-ORIENTED Q-LEARNING
410
+
411
+ Below we list the pseudocode for the modified Q-learning algorithm used in the four-rooms domain.
412
+
413
+ # Algorithm 1: Goal-oriented $Q$ -learning
414
+
415
+ ![](images/94cc799d2c7354f505f7218d934ace594c0c067be6e8b7e806cb7a0e73a95535.jpg)
416
+ Figure 5: A $Q$ -learning algorithm for learning extended value functions. Note that the greedy action selection step is equivalent to generalised policy improvement (Barreto et al., 2017) over the set of extended value functions.
417
+
418
+ # A.7 INVESTIGATING PRACTICAL CONSIDERATIONS
419
+
420
+ The theoretical results presented in this work rely on Assumptions 1 and 2, which restrict the tasks’ transition dynamics and reward functions in potentially problematic ways. Although this is necessary to prove that Boolean algebraic composition results in optimal value functions, in this section we investigate whether these can be practically ignored. In particular, we investigate two restrictions: the requirement that tasks share the same terminal states, and the impact of using dense rewards.
421
+
422
+ # A.7.1 FOUR ROOMS EXPERIMENTS
423
+
424
+ We use the same setup as the experiment outlined in Section 4, but modify it in two ways. We first investigate the difference between using sparse and dense rewards. Our sparse reward function is defined as
425
+
426
+ $$
427
+ r _ { \mathrm { s p a r s e } } ( s , a , s ^ { \prime } ) = { \binom { 2 0 } { - 1 } } \quad { \mathrm { i f ~ } } s ^ { \prime } \in { \mathcal { G } }
428
+ $$
429
+
430
+ and we use a dense reward function similar to Peng et al. (2019):
431
+
432
+ $$
433
+ r _ { \mathrm { d e n s e } } ( s , a , s ^ { \prime } ) = \frac { 1 } { | \mathcal { G } | } \sum _ { g \in \mathcal { G } } \exp ( \frac { | s ^ { \prime } - g | ^ { 2 } } { 4 } ) + r _ { \mathrm { s p a r s e } } ( s , a , s ^ { \prime } )
434
+ $$
435
+
436
+ Using this dense reward function, we again learn to solve the two base task $M _ { T }$ (reaching the centre of the top two rooms) and $M _ { L }$ (reaching the centre of the left two rooms). We then compose them to solve a variety of tasks, with the resulting value functions illustrated by Figure 6.
437
+
438
+ (a) ML (b) MT (c) ML ∨ MT (d) ML ∧ MT (e) ML Y MT (f) ML −∨ MT
439
+
440
+ ![](images/713432bea6e918d37f27e052ffc56be0147a48ea93a6acd7478e3c90404a0209.jpg)
441
+ Figure 6: An example of Boolean algebraic composition using the learned extended value functions with dense rewards. Arrows represent the optimal action in a given state. (a–b) The learned optimal goal oriented value functions for the base tasks with dense rewards. (c) Disjunctive composition. (d) Conjunctive composition. (e) Combining operators to model exclusive-or composition. (f) Composition that produces logical nor. We note that the resulting value functions are very similar to those produced in the sparse reward setting.
442
+
443
+ We also modify the domain so that tasks need not share the same terminating states (that is, if the agent enters a terminating state for a different task, the episode does not terminate and the agent can continue as if it were a normal state). This results in four versions of the experiment:
444
+
445
+ (i) sparse reward, same absorbing set (ii) sparse reward, different absorbing set (iii) dense reward, same absorbing set (iv) dense reward, different absorbing set
446
+
447
+ We learn extended value functions for each of the above setups, and then compose them to solve each of the $2 ^ { 4 }$ tasks representable in the Boolean algebra. We measure each composed value functions by evaluating its policy in the sparse reward setting, averaging results over 100000 episodes. The results are given by Figure 7.
448
+
449
+ Our results indicate that extended value functions learned in the theoretically optimal manner (sparse reward, same absorbing set) are indeed optimal. However, for the majority of the tasks, relaxing the restrictions on terminal states and reward functions results in policies that are either identical or very close to optimal.
450
+
451
+ ![](images/27348c10b548abd7f9a8816ba229cf8145c07cae2f83e6409891f25933e7925b.jpg)
452
+ Figure 7: Box plots indicating returns for each of the 16 compositional tasks, and for each of the four variations of the domain. Results are collected over 100000 episodes with random start positions.
453
+
454
+ # A.7.2 FUNCTION APPROXIMATION EXPERIMENTS
455
+
456
+ In this section we investigate whether we can again loosen some of the restrictive assumptions when tackling high-dimensional environments. In particular, we run the same experiments as those presented in Section 5, but modify the domain so that (i) tasks need not share the same absorbing set, (ii) the pickup-up action is removed (the agent immediately collects an object when reaching it), and (iii) the position of every object is randomised at the start of each episode.
457
+
458
+ We first learn to solve three base tasks: collecting blue objects, collecting purple objects, and collecting squares , which can then be composed to solve new tasks immediately. We then demonstrate composition characterised by disjunction, conjunction and exclusive-or, with the resulting trajectories and value functions illustrated by Figure 8.
459
+
460
+ ![](images/be92a2d9531820df05fc8eb966ed3b7e75994f0b42d8854343794dc868291933.jpg)
461
+
462
+ ![](images/f2f135b690a443af9ff1508b7573127d3702351fdea9ded903283de4d29d231c.jpg)
463
+ (a) Trajectories for disjunctive composition (collect blue or purple objects).
464
+
465
+ ![](images/053c0287f3f7eaaa651b2ab69cd1b8acb78fd692219a9d84fbe95c3d21faf654.jpg)
466
+ (b) Trajectories for conjunctive composition (collect blue squares).
467
+
468
+ ![](images/02582da83929a18b26ee2ae6e7d57cd5424ee0e3b7508b87ab85bd7e9e9d9da0.jpg)
469
+ (c) Trajectories for exclusiveor composition (collect blue or square objects, but not blue squares).
470
+ Figure 8: Results for the video game environment with relaxed assumptions. We generate value functions to solve the disjunction of blue and purple tasks, and the conjunction and exclusive-or of blue and square tasks.
471
+
472
+ In summary, we have shown that our compositional approach offers strong empirical performance, even when the theoretical assumptions are violated. Finally, we expect that, in general, the errors due to these violations will be far outweighed by the errors due to non-linear function approximation.
473
+
474
+ # A.8 SELECTING BASE TASKS
475
+
476
+ The Four Rooms domain requires the agent to navigate to one of the centres of the rooms in the environment. Figure 9 illustrates the layout of the environment and the goals the agent must reach.
477
+
478
+ ![](images/528539d20b64d5d4a4a0811be4ce966b2051c635646c6d8bd7ac5a0109a9230d.jpg)
479
+ Figure 9: The layout of the Four Rooms domain. The circles indicate goals the agent must reach. We will refer to the goals as top-left, top-right, bottom-left, and bottom-right.
480
+
481
+ Since we know the goals upfront, we can select a minimal set of base tasks by assigning each goal a Boolean number, and then using the columns of the table to select the tasks. To illustrate, we assign Boolean numbers to the goals as follows:
482
+
483
+ <table><tr><td>X1</td><td>x2</td><td>Goals</td></tr><tr><td>rQ</td><td>r</td><td>bottom-right</td></tr><tr><td>r@</td><td>ru</td><td>bottom-left</td></tr><tr><td>ru</td><td>r</td><td>top-right</td></tr><tr><td>ru</td><td>ru</td><td>top-left</td></tr></table>
484
+
485
+ Table 1: Assigning labels to the individual goals. The two Boolean variables, $x _ { 1 }$ and $x _ { 2 }$ , represent the goals for the base tasks the agent will train on.
486
+
487
+ As there are four goals, we can represent each uniquely with just two Boolean variables. Each column in Table 1 represents a base task, where the set of goals for each task are those goals assigned a value $r _ { \mathcal { U } }$ . We thus have two base tasks corresponding to $x _ { 1 } = \{ \mathrm { t o p } \mathrm { - r i g h t , t o p } \mathrm { - } \mathrm { l e f t } \}$ and x2 = {bottom-left, top-left $\}$ .
488
+
489
+ # A.9 DQN ARCHITECTURE AND HYPERPARAMETERS
490
+
491
+ In our experiments, we used a DQN with the following architecture:
492
+
493
+ 1. Three convolutional layers:
494
+
495
+ (a) Layer 1 has 6 input channels, 32 output channels, a kernel size of 8 and a stride of 4.
496
+ (b) Layer 2 has 32 input channels, 64 output channels, a kernel size of 4 and a stride of 2.
497
+ (c) Layer 3 has 64 input channels, 64 output channels, a kernel size of 3 and a stride of 1.
498
+
499
+ 2. Two fully-connected linear layers:
500
+
501
+ (a) Layer 1 has input size 3136 and output size 512 and uses a ReLU activation function.
502
+ (b) Layer 2 has input size 512 and output size 4 with no activation function.
503
+
504
+ We used the ADAM optimiser with batch size 32 and a learning rate of $1 0 ^ { - 4 }$ . We trained every 4 timesteps and update the target Q-network every 1000 steps. Finally, we used $\epsilon$ -greedy exploration, annealing $\epsilon$ to 0.01 over 100000 timesteps.
parse/train/rJecbgHtDH/rJecbgHtDH_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rJecbgHtDH/rJecbgHtDH_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rJecbgHtDH/rJecbgHtDH_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rJgbSn09Ym/rJgbSn09Ym.md ADDED
@@ -0,0 +1,290 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LEARNING PARTICLE DYNAMICS FOR MANIPULATING RIGID BODIES, DEFORMABLE OBJECTS, AND FLUIDS
2
+
3
+ Yunzhu Li, Jiajun Wu, Russ Tedrake, Joshua B. Tenenbaum, & Antonio Torralba
4
+
5
+ Computer Science and Artificial Intelligence Laboratory Massachusetts Institute of Technology {liyunzhu,jiajunwu,russt,jbt,torralba}@mit.edu
6
+
7
+ # ABSTRACT
8
+
9
+ Real-life control tasks involve matters of various substances—rigid or soft bodies, liquid, gas—each with distinct physical behaviors. This poses challenges to traditional rigid-body physics engines. Particle-based simulators have been developed to model the dynamics of these complex scenes; however, relying on approximation techniques, their simulation often deviates from real-world physics, especially in the long term. In this paper, we propose to learn a particle-based simulator for complex control tasks. Combining learning with particle-based systems brings in two major benefits: first, the learned simulator, just like other particle-based systems, acts widely on objects of different materials; second, the particle-based representation poses strong inductive bias for learning: particles of the same type have the same dynamics within. This enables the model to quickly adapt to new environments of unknown dynamics within a few observations. We demonstrate robots achieving complex manipulation tasks using the learned simulator, such as manipulating fluids and deformable foam, with experiments both in simulation and in the real world. Our study helps lay the foundation for robot learning of dynamic scenes with particle-based representations.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ Objects have distinct dynamics. Under the same push, a rigid box will slide, modeling clay will deform, and a cup full of water will fall with water spilling out. The diverse behavior of different objects poses challenges to traditional rigid-body simulators used in robotics (Todorov et al., 2012; Tedrake & the Drake Development Team, 2019). Particle-based simulators aim to model the dynamics of these complex scenes (Macklin et al., 2014); however, relying on approximation techniques for the sake of perceptual realism, their simulation often deviates from real world physics, especially in the long term. Developing generalizable and accurate forward dynamics models is of critical importance for robot manipulation of distinct real-life objects.
14
+
15
+ We propose to learn a differentiable, particle-based simulator for complex control tasks, drawing inspiration from recent development in differentiable physical engines (Battaglia et al., 2016; Chang et al., 2017). In robotics, the use of differentiable simulators, together with continuous and symbolic optimization algorithms, has enabled planning for increasingly complex whole body motions with multi-contact and multi-object interactions (Toussaint et al., 2018). Yet these approaches have only tackled local interactions of rigid bodies. We develop dynamic particle interaction networks (DPINets) for learning particle dynamics, focusing on capturing the dynamic, hierarchical, and long-range interactions of particles (Figure 1a-c). DPI-Nets can then be combined with classic perception and gradient-based control algorithms for robot manipulation of deformable objects (Figure 1d).
16
+
17
+ Learning a particle-based simulator brings in two major benefits. First, the learned simulator, just like other particle-based systems, acts widely on objects of different states. DPI-Nets have successfully captured the complex behaviors of deformable objects, fluids, and rigid-bodies. With learned DPINets, our robots have achieved success in manipulation tasks that involve deformable objects of complex physical properties, such as molding plasticine to a target shape.
18
+
19
+ ![](images/88ab148c3b5eb2d2f2972cb178b84fb1e1bd4088e0c2871da2b71bcd6fe60cd1.jpg)
20
+ Figure 1: Learning particle dynamics for control. (a) DPI-Nets learn particle interaction while dynamically building the interaction graph over time. (b) Build hierarchical graph for multi-scale effect propagation. (c) Multi-step message passing for handling instantaneous force propagation. (d) Perception and control with the learned model. Our system first reconstructs the particle-based shape from visual observation. It then uses gradient-based trajectory optimization to search for the actions that produce the most desired output.
21
+
22
+ Second, the particle-based representation poses strong inductive bias for learning: particles of the same type have the same dynamics within. This enables the model to quickly adapt to new environments of unknown dynamics within a few observations. Experiments suggest that DPI-Nets quickly learn to adapt to characterize a novel object of unknown physical parameters by doing online system identification. The adapted model also helps the robot to successfully manipulate object in the real world.
23
+
24
+ DPI-Nets combine three key features for effective particle-based simulation and control: multi-step spatial propagation, hierarchical particle structure, and dynamic interaction graphs. In particular, it employs dynamic interaction graphs, built on the fly throughout manipulation, to capture the meaningful interactions among particles of deformable objects and fluids. The use of dynamic graphs allows neural models to focus on learning meaningful interactions among particles, and is crucial for obtaining good simulation accuracy and high success rates in manipulation. As objects deform when robots interact with them, a fixed interaction graph over particles is insufficient for robot manipulating non-rigid objects.
25
+
26
+ Experiments demonstrate that DPI-Nets significantly outperform interaction networks (Battaglia et al., 2016), HRN (Mrowca et al., 2018), and a few other baselines. More importantly, unlike previous paper that focused purely on forward simulation, we have applied our model to downstream control tasks. Our DPI-Nets enable complex manipulation tasks for deformable objects and fluids, and adapts to scenarios with unknown physical parameters that need to be identified online. We have also performed real-world experiments to demonstrate our model’s generalization ability.
27
+
28
+ # 2 RELATED WORK
29
+
30
+ Differentiable physics simulators. Researchers have developed many differentiable physical simulators (Ehrhardt et al., 2017; Degrave et al., 2016; Todorov et al., 2012), among which some can also provide analytical gradients (Tedrake & the Drake Development Team, 2019). In particular, Battaglia et al. (2016) and Chang et al. (2017) have explored learning a simulator from data by approximating object interactions with neural networks. Li et al. (2019) proposed learning to propagate signals along the interaction graph and extended to partially observable scenarios. These methods mostly focus on modeling rigid body dynamics.
31
+
32
+ Differentiable simulators for deformable objects have been less studied. Recently, Schenck & Fox (2018) proposed SPNets for differentiable simulation of position-based fluids (Macklin & Muller, ¨ 2013). An inspiring concurrent work from Mrowca et al. (2018) explored learning to approximate particle dynamics of deformable shapes with the Hierarchical Relation Network (HRN). Compared with these papers, we introduce state-specific modeling and dynamic graphs for accurate forward prediction for different states of matter (rigid bodies, deformable shapes, fluids). We also demonstrate how the learned dynamics model can be used for control in both simulation and real world.
33
+
34
+ Our approach is also complementary to some recent work on learning to discover the interaction graphs (van Steenkiste et al., 2018; Kipf et al., 2018). Our model can also be naturally augmented with a perception module to handle raw visual input, as suggested by Watters et al. (2017); Wu et al. (2017); Fragkiadaki et al. (2016).
35
+
36
+ Model-predictive control with a differentiable simulator. Many recent papers have studied model-predictive control with deep networks (Lenz et al., 2015; Gu et al., 2016; Nagabandi et al., 2018; Farquhar et al., 2018; Srinivas et al., 2018). They often learn an abstract state transition function, instead of an explicit account of the environment (Silver et al., 2017; Oh et al., 2017), and then use the learned function to facilitate training of a policy network. A few recent papers have employed analytical, differentiable simulators (de Avila Belbute-Peres et al., 2018; Schenck & Fox, 2018) for control problems, such as tool manipulation and tool-use planning (Toussaint et al., 2018). Our model builds on and extends these approaches by learning a general physics simulator that takes raw object observations (e.g., positions, velocities) of each particle as input. We then integrate it into classic trajectory optimization algorithms for control. Compared with pure analytical simulators, our learned simulator can better generalize to novel testing scenarios where object and environment parameters are unknown.
37
+
38
+ A few papers have explored using interaction networks for planning and control. They often learn a policy based on interaction networks’ rollouts (Racaniere et al., 2017; Hamrick et al., 2017; Pascanu \` et al., 2017). In contrast, our model learns a dynamics simulator and directly optimizes trajectories for continuous control. Recently, Sanchez-Gonzalez et al. (2018) have applied interaction networks for control, and Li et al. (2019) have further extended interaction nets to handle instance signal propagation for controlling multiple rigid bodies under partial observations. Compared with them, our dynamic particle interaction network simulate and control deformable, particle-based objects, using dynamic graphs to tackle scenes with complex object interactions.
39
+
40
+ # 3 APPROACH
41
+
42
+ # 3.1 PRELIMINARIES
43
+
44
+ We first describe how interaction networks (Battaglia et al., 2016) represent the physical system; we then extend them for particle-based dynamics.
45
+
46
+ The interactions within a physical system are represented as a directed graph, $G = \langle O , R \rangle$ , where vertices $O = \{ o _ { i } \}$ represent objects and edges $R = \left\{ r _ { k } \right\}$ represent relations. Specifically, $o _ { i } =$ $\left. x _ { i } , a _ { i } ^ { o } \right.$ , where $\dot { x _ { i } } = \langle q _ { i } , \dot { q } _ { i } \rangle$ is the state of object $i$ , containing its position $q _ { i }$ and velocity ${ \dot { q } } _ { i }$ . $a _ { i } ^ { o }$ denotes its attributes (e.g., mass, radius). For relation, we have $r _ { k } = \langle u _ { k } , v _ { k } , a _ { k } ^ { r } \rangle , \quad 1 \leq u _ { k } , v _ { k } \leq$ $| O |$ , where $u _ { k }$ is the receiver, $v _ { k }$ is the sender, and both are integers. $a _ { k } ^ { r }$ is the type and attributes of relation $k$ (e.g., collision, spring connection).
47
+
48
+ The goal is to build a learnable physical engine to capture the underlying physical interactions using function approximators $\phi$ . The learned model can then be used to infer the system dynamics and predict the future from the current interaction graph as $G _ { t + 1 } = \phi ( G _ { t } )$ , where $G _ { t }$ denotes the scene state at time $t$ .
49
+
50
+ Interaction networks. Battaglia et al. (2016) proposed interaction networks (IN), a generalpurpose, learnable physics engine that performs object- and relation-centric reasoning about physics. INs define an object function $f _ { O }$ and a relation function $f _ { R }$ to model objects and their relations in a compositional way. The future state at time $t + 1$ is predicted as $\begin{array} { r l } { e _ { k , t } } & { { } = } \end{array}$ $\begin{array} { r } { f _ { R } ( o _ { u _ { k } , t } , o _ { v _ { k } , t } , a _ { k } ^ { r } ) _ { k = 1 \dots | R | } , \hat { o } _ { i , t + 1 } = \dot { f } _ { O } ( o _ { i , t } , \sum _ { k \in \mathcal { N } _ { i } } e _ { k , t } ) _ { i = 1 \dots | O | } } \end{array}$ , where $\overline { { o _ { i , t } } } \overline { { = \left. x _ { i , t } , a _ { i } ^ { o } \right. } }$ denotes object $i$ at time $t$ , $u _ { k }$ and $v _ { k }$ are the receiver and sender of relation $r _ { k }$ respectively, and ${ \mathcal { N } } _ { i }$ denotes the relations where object $i$ is the receiver.
51
+
52
+ Propagation networks. A limitation of INs is that at every time step $t$ , it only considers local information in the graph $G$ and cannot handle instantaneous propagation of forces, which however is a common phenomenon in rigid-body dynamics.
53
+
54
+ Li et al. (2019) proposed propagation networks to handle the instantaneous propagation of forces by doing multi-step message passing. Specifically, they first employed the ideas on fast training of RNNs (Lei & Zhang, 2017; Bradbury et al., 2017) to encode the shared information beforehand and reuse them along the propagation steps. The encoders for objects are denoted as $f _ { O } ^ { \mathrm { e n c } }$ and the encoder for relations as $f _ { R } ^ { \mathrm { e n c } }$ , where we denote $c _ { i , t } ^ { o } = f _ { O } ^ { \mathrm { e n c } } ( o _ { i , t } ) , c _ { k , t } ^ { r } = f _ { R } ^ { \mathrm { e n c } } ( o _ { u _ { k } , t } , o _ { v _ { k } , t } , a _ { k } ^ { r } )$ .
55
+
56
+ At time $t$ , denote the propagating influence from relation $k$ at propagation step $l$ as $e _ { k , t } ^ { l }$ , and the propagating influence from object $i$ as $h _ { i , t } ^ { l }$ . For step $1 \le l \le L$ , propagation can be described as
57
+
58
+ Step 0:
59
+
60
+ $$
61
+ \begin{array} { r l } & { h _ { i , t } ^ { 0 } = { \bf 0 } , \quad i = 1 \ldots | O | , } \\ & { e _ { k , t } ^ { l } = f _ { R } ( c _ { k , t } ^ { r } , h _ { u _ { k } , t } ^ { l - 1 } , h _ { v _ { k } , t } ^ { l - 1 } ) , k = 1 \ldots | R | , } \\ & { h _ { i , t } ^ { l } = f _ { O } ( c _ { i , t } ^ { o } , \displaystyle \sum _ { k \in \cal N _ { i } } e _ { k , t } ^ { l } , h _ { i , t } ^ { l - 1 } ) , i = 1 \ldots | O | , } \\ & { \hat { o } _ { i , t + 1 } = f _ { O } ^ { \mathrm { o u p u t } } ( h _ { i , t } ^ { L } ) , \quad i = 1 \ldots | O | , } \end{array}
62
+ $$
63
+
64
+ where $f _ { O }$ denotes the object propagatorand $f _ { R }$ denotes the relation propagator.
65
+
66
+ # 3.2 DYNAMIC PARTICLE INTERACTION NETWORKS
67
+
68
+ Particle-based system is widely used in physical simulation due to its flexibility in modeling various types of objects (Macklin et al., 2014). We extend existing systems that model object-level interactions to allow particle-level deformation. Consider object set $\left\{ \mathbf { o } _ { i } \right\}$ , where each object $\mathbf { o } _ { i } = \{ o _ { i } ^ { k } \} _ { k = 1 \dots | \mathbf { o } _ { i } | }$ is represented as a set of particles. We now define the graph on the particles and the rules for influence propagation.
69
+
70
+ Dynamic graph building. The vertices of the graph are the union of particles for all objects $\bar { \cal O ^ { - } } = \{ o _ { i } ^ { k } \} _ { i = 1 \ldots | { \cal O } | , k = 1 \ldots | { \bf o } _ { i } | } ^ { - }$ . The edges $R$ between these vertices are dynamically generated over time to ensure efficiency and effectiveness. The construction of the relations is specific to environment and task, which we’ll elaborate in Section 4. A common choice is to consider the neighbors within a predefined distance.
71
+
72
+ An alternative is to build a static, complete interaction graph, but it has two major drawbacks. First, it is not efficient. In many common physical systems, each particle is only interacting with a limited set of other particles (e.g., those within its neighborhood). Second, a static interaction graph implies a universal, continuous neural function approximator; however, many physical interactions involve discontinuous functions (e.g. contact). In contrast, using dynamic graphs empowers the model to tackle such discontinuity.
73
+
74
+ Hierarchical modeling for long-range dependence. Propagation networks Li et al. (2019) require a large $L$ to handle long-range dependence, which is both inefficient and hard to train. Hence, we add one level of hierarchy to efficiently propagate the long-range influence among particles (Mrowca et al., 2018). For each object that requires modeling of the long-range dependence (e.g. rigid-body), we cluster the particles into several non-overlapping clusters. For each cluster, we add a new particle as the cluster’s root. Specifically, for each object $\mathbf { o } _ { i }$ that requires hierarchical modeling, the corresponding roots are denoted as $\tilde { \mathbf { o } } _ { i } \doteq \{ \tilde { o } _ { i } ^ { k } \} _ { k = 1 \ldots | \tilde { \mathbf { o } } _ { i } | }$ , and the particle set containing all the roots is denoted as $\tilde { O } = \{ \tilde { o } _ { i } ^ { k } \} _ { i = 1 \dots | O | , k = 1 \dots | \tilde { \mathbf { o } } _ { i } | }$ . We then construct an edge set $R _ { \mathrm { L e a f T o R o o t } }$ that contains directed edges from each particle to its root, and an edge set $R _ { \mathrm { R o o t T o L e a f } }$ containing directed edges from each root to its leaf particles. For each object that need hierarchical modeling, we add pairwise directed edges between all its roots, and denote this edge set as $R _ { \mathrm { R o o t T o R o o t } }$ .
75
+
76
+ We employ a multi-stage propagation paradigm: first, propagation among leaf nodes, $\phi _ { \mathrm { L e a f T o L e a f } } ( \left. O , R \right. )$ ; second, propagation from leaf nodes to root nodes, $\phi _ { \mathrm { L e a f T o R o o t } } ( \langle O \ \cup$ $\tilde { O } , R _ { \mathrm { L e a f T o R o o t } } \rangle ,$ ); third, propagation between roots, $\phi _ { \mathrm { R o o t T o R o o t } } \big ( \langle \tilde { O } , R _ { \mathrm { R o o t T o R o o t } } \rangle \big )$ ; fourth, propagation from root to leaf, $\phi _ { \mathrm { R o o t T o L e a f } } \big ( \langle O \cup \tilde { O } , R _ { \mathrm { R o o t T o L e a f } } \rangle \big )$ . The signals on the leaves are used to do the final prediction.
77
+
78
+ Applying to objects of various materials. We define the interaction graph and the propagation rules on particles for different types of objects as follows:
79
+
80
+ • Rigid bodies. All the particles in a rigid body are globally coupled; hence for each rigid object, we define a hierarchical model to propagate the effects. After the multi-stage propagation, we average the signals on the particles to predict a rigid transformation (rotation and translation) for the object. The motion of each particle is calculated accordingly. For each particle, we also include its offset to the center-of-mass to help determine the torque. • Elastic/Plastic objects. For elastically deforming particles, only using the current position and velocity as the state is not sufficient, as it is not clear where the particle will be restored after the deformation. Hence, we include the particle state with the resting position to indicate the place where the particle should be restored. When coupled with plastic deformation, the resting position might change during an interaction. Thus, we also infer the motion of the resting position as a part of the state prediction. We use hierarchical modeling for this category but predict next state for each particles individually. • Fluids. For fluid simulation, one has to enforce density and incompressibility, which can be effectively achieved by only considering a small neighborhood for each particle (Macklin & Muller, 2013). Therefore, we do not need hierarchical modeling for fluids. We build edges ¨ dynamically, connecting a fluid particle to its neighboring particles. The strong inductive bias leveraged in the fluid particles allows good performance even when tested on data outside training distributions.
81
+
82
+ For the interaction between different materials, two directed edges are generated for any pairs of particles that are closer than a certain distance.
83
+
84
+ # 3.3 CONTROL ON THE LEARNED DYNAMICS
85
+
86
+ Model-based methods offer many advantages when comparing with their model-free counterparts, such as generalization and sample efficiency. However, for cases where an accurate model is hard to specify or computationally prohibitive, a data-driven approach that learns to approximate the underlying dynamics becomes useful.
87
+
88
+ Function approximators such as neural networks are naturally differentiable. We can rollout using the learned dynamics and optimize the control inputs by minimizing a loss between the simulated results and a target configuration. In cases where certain physical parameters are unknown, we can perform online system identification by minimizing the difference between the model’s prediction and the reality. An outline of our algorithm can be found in Section A.
89
+
90
+ Model predictive control using shooting methods. Let’s denote $\mathcal { G } _ { g }$ as the goal and $\hat { u } _ { 1 : T }$ be the control inputs, where $T$ is the time horizon. The control inputs are part of the interaction graph, such as the velocities or the initial positions of a particular set of particles. We denote the resulting trajectory after applying $\hat { u }$ as $\mathcal { G } = \{ G _ { i } \} _ { i = 1 : T }$ . The task here is to determine the control inputs as to minimize the distance between the actual outcome and the specified goal ${ \mathcal { L } } _ { \mathrm { g o a l } } ( { \mathcal { G } } , { \mathcal { G } } _ { g } )$ .
91
+
92
+ Our dynamic particle interaction network does forward simulation by taking the dynamics graph at time $t$ as input, and produces the graph at next time step, $\hat { G } _ { t + 1 } = \Phi ( G _ { t } )$ , where $\Phi$ is implemented as DPI-Nets as described in the previous section. Let’s denote the the history until time $t$ as $\bar { \mathcal { G } } = \{ G _ { i } \} _ { i = 1 \ldots t }$ , and the forward simulation from time step $t$ as $\hat { \mathcal { G } } = \{ \hat { G } _ { i } \} _ { i = t + 1 \ldots T }$ . The loss $\mathcal { L } _ { \mathrm { g o a l } } ( \bar { \mathcal { G } } \cup \hat { \mathcal { G } } , \mathcal { G } _ { g } )$ can be used to update the control inputs by doing stochastic gradient descent (SGD). This is known as the shooting method in trajectory optimization (Tedrake, 2009).
93
+
94
+ The learned model might deviate from the reality due to accumulated prediction errors. We use Model-Predictive Control (MPC) (Camacho & Alba, 2013) to stabilize the trajectory by doing forward simulation and updating the control inputs at every time step to compensate the simulation error.
95
+
96
+ Online adaptation. In many real-world cases, without actually interacting with the environment, inherent attributes such as mass, stiffness, and viscosity are not directly observable. DPI-Nets can estimate these attributes on the fly with SGD updates by minimizing the distance between the predicted future states and the actual future states $\mathcal { L } _ { \mathrm { s t a t e } } ( \hat { G } _ { t } , G _ { t } )$ .
97
+
98
+ # 4 EXPERIMENTS
99
+
100
+ We evaluate our method on four different environments containing different types of objects and interactions. We will first describe the environments and show simulation results. We then present how the learned dynamics helps to complete control tasks in both simulation and the real world.
101
+
102
+ # 4.1 ENVIRONMENTS
103
+
104
+ FluidFall (Figure 2a). Two drops of fluids are falling down, colliding, and merging. We vary the initial position and viscosity for training and evaluation.
105
+
106
+ BoxBath (Figure 2b). A block of fluids are flushing a rigid cube. In this environment, we have to model two different materials and the interactions between them. We randomize the initial position of the fluids and the cube to test the model’s generalization ability.
107
+
108
+ FluidShake (Figure 2c). We have a box of fluids and the box is moving horizontally, The speed of the box is randomly selected at each time step. We vary the size of the box and volume of the fluids to test generalization.
109
+
110
+ RiceGrip (Figure 2d). We manipulate an object with both elastic and plastic deformation (e.g., sticky rice). We use two cuboids to mimic the fingers of a parallel gripper, where the gripper is initialized at a random position and orientation. During the simulation of one grip, the fingers will move closer to each other and then restore to its original positions. The model has to learn the interactions between the gripper and the “sticky rice”, as well as the interactions within the “rice” itself.
111
+
112
+ We use all four environments in evaluating our model’s performance in simulation. We use the rollout MSE as our metric. We further use the latter two for control, because they involve fully actuated external shapes that can be used for object manipulation. In FluidShake, the control task requires determining the speed of the box at each time step, in order to make the fluid match a target configuration within a time window; in RiceGrip, the control task corresponds to select a sequence of grip configurations (position, orientation, closing distance) to manipulate the deformable object as to match a target shape. The metric for performance in control is the Chamfer distance between the manipulation results and the target configuration.
113
+
114
+ # 4.2 PHYSICAL SIMULATION
115
+
116
+ We present implementation details for dynamics learning in the four environment and perform ablation studies to evaluate the effectiveness of the introduced techniques.
117
+
118
+ Implementation details. For FluidFall, we dynamically build the interaction graph by connecting each particle to its neighbors within a certain distance $d$ . No hierarchical modeling is used.
119
+
120
+ For BoxBath, we model the rigid cube as in Section 3.2, using multi-stage hierarchical propagation. Two directed edges will be constructed between two fluid particles if the distance between them is smaller than $d$ . Similarly, we also add two directed edge between rigid particles and fluid particles when their distance is smaller than $d$ .
121
+
122
+ For FluidShake, we model fluid as in Section 3.2. We also add five external particles to represent the walls of the box. We add a directed edge from the wall particle to the fluid particle when they are closer than $d$ . The model is a single propagation network, where the edges are dynamically constructed over time.
123
+
124
+ For RiceGrip, we build a hierarchical model for rice and use four propagation networks for multi-stage effect propagation (Section 3.2). The edges between the “rice” particles are dynamically generated if two particles are closer than $d$ . Similar to FluidShake, we add two external particles to represent the two “fingers” and add an edge from the “finger” to the “rice” particle if they are closer than the distance $d$ . As “rice” can deform both elastically and plastically, we maintain a resting position that helps the model restore a deformed particle. The output for each particle is a 6-dim vector for the velocity of the current observed position and the resting position. More training details for each environment can be found in Section D. Details for data generation are in Section C.
125
+
126
+ ![](images/7ffa2848c97304de6a0732f787ea619027f4bc30b25c3dd9f4979f2935a6386e.jpg)
127
+ (d) RiceGrip
128
+ Figure 2: Qualitative results on forward simulation. We compare the ground truth (GT) and the rollouts from HRN (Mrowca et al., 2018) and our model (DPI-Net) in four environments (FluidFall, BoxBath, FluidShake, and RiceGrip). The simulations from our DPI-Net are significantly better. We provide zoom-in views for a few frames to show details. Please see our video for more empirical results.
129
+
130
+ <table><tr><td>Methods</td><td>FuildFall</td><td>BoxBath</td><td>FluidShake</td><td>RiceGrip</td></tr><tr><td>IN (Battaglia et al., 2016)</td><td>2.74± 0.56</td><td>N/A</td><td>N/A</td><td>N/A</td></tr><tr><td>HRN (Mrowca et al., 2018)</td><td>0.21 ± 0.04</td><td>3.62 ± 0.40</td><td>3.58 ± 0.77</td><td>0.17 ± 0.11</td></tr><tr><td>DPI-Net w/o hierarchy</td><td>0.15 ± 0.03</td><td>2.64 ±0.69</td><td>1.89 ± 0.36</td><td>0.29 ± 0.13</td></tr><tr><td>DPI-Net</td><td>0.15 ± 0.03</td><td>2.03 ± 0.41</td><td>1.89 ± 0.36</td><td>0.13 ± 0.07</td></tr></table>
131
+
132
+ ![](images/3a37f1f5799ebe32c15101760ff770c47c5eb2cee68f798190d4d9d2e1f07c14.jpg)
133
+ Table 1: Quantitative results on forward simulation. MSE $( \times 1 0 ^ { - 2 } )$ between the ground truth and model rollouts. The hyperparameters used in our model are fixed for all four environments. FluidFall and FluidShake involve no hierarchy, so DPI-Net performs the same as the variant without hierarchy. DPI-Net significantly outperforms HRN (Mrowca et al., 2018) in modeling fluids (BoxBath and FluidShake) due to the use of dynamic graphs.
134
+ Figure 3: Ablation studies. We perform ablation studies to test our model’s robustness to hyperparameters. The performance is evaluated by the mean squared distance $( \times 1 0 ^ { - 2 } )$ between the ground truth and model rollouts. (a) We vary the number of roots when building hierarchy, the propagation step $L$ during message passing, and the size of the neighborhood $d$ . (b) In BoxBath, DPI-Nets use separate motion predictors for fluids and rigid bodies. Here we compared with a unified motion predictor.
135
+
136
+ Results. Qualitative and quantitative results are in Figure 2 and Table 1. We compare our method (DPI-Net) with three baselines, Interaction Networks (Battaglia et al., 2016), HRN (Mrowca et al., 2018), and DPI-Net without hierarchy. Note that we use the same set of hyperparameters in our model for all four testing environments.
137
+
138
+ Specifically, Interaction Networks (IN) consider a complete graph of the particle system. Thus, it can only operate on small environments such as FluidFall; it runs out of memory (12GB) for the other three environments. IN does not perform well, because its use of a complete graph makes training difficult and inefficient, and because it ignores influence propagation and long-range dependence.
139
+
140
+ Without a dynamic graph, modeling fluids becomes hard, because the neighbors of a fluid particle changes constantly. Table 1 shows that for environments that involve fluids (BoxBath and FluidShake), DPI-Net performs better than those with a static interaction graph. Our model also performs better in scenarios that involve objects of multiple states (BoxBath, Figure 2b), because it uses state-specific modeling. Models such as HRN (Mrowca et al., 2018) aim to learn a universal dynamics model for all states of matter. It is therefore solving a harder problem and, for this particular scenario, expected to perform not as well. When augmented with state-specific modeling, HRN’s performance is likely to improve, too. Without hierarchy, it is hard to capture long-range dependence, leading to performance drop in environments that involve hierarchical object modeling (BoxBath and RiceGrip).
141
+
142
+ Appendix B includes results on scenarios outside the training distribution (e.g., more particles).
143
+ DPI-Net performs well on these out-of-sample cases, successfully leveraging the inductive bias.
144
+
145
+ Ablation studies. We also test our model’s sensitivity to hyperparameters. We consider three of them: the number of roots for building hierarchy, the number of propagation steps $L$ , and the size of the neighborhood $d$ . We test them in RiceGrip. As can be seen from the results shown in Figure 3a, DPI-Nets can better capture the motion of the “rice” by using fewer roots, on which the information might be easier to propagate. Longer propagation steps do not necessarily lead to better performance, as they increases training difficulty. Using larger neighborhood achieves better results, but makes computation slower. Using one TITAN Xp, each forward step in RiceGrip takes $3 0 \mathrm { m s }$ for $d = 0 . 0 4$ $3 3 \mathrm { m s }$ for $d = 0 . 0 8$ , and $4 0 \mathrm { m s }$ for $d = 0 . 1 2$ .
146
+
147
+ ![](images/632ff12117420d0ccfee02730acf1627e5e8310192a06ab8f422cde97c4adf20.jpg)
148
+ Figure 4: Qualitative results on control. (a) FluidShake - Manipulating a box of fluids to match a target shape. The Result and Target indicate the fluid shape when viewed from the cutaway view. (b) RiceGrip - Gripping a deformable object and molding it to a target shape. (c) RiceGrip in Real World - Generalize the learned dynamics and the control algorithms to the real world by doing online adaptation. The last two columns indicate the final shape viewed from the top.
149
+
150
+ We also perform experiments to justify our use of different motion predictors for objects of different states. Figure 3b shows the results of our model vs. a unified dynamics predictor for all objects in BoxBath. As there are only a few states of interest (solids, liquids, and soft bodies), and their physical behaviors are drastically different, it is not surprising that DPI-Nets, with state-specific motion predictors, perform better, and are equally efficient as the unified model (time difference smaller than 3ms per forward step).
151
+
152
+ # 4.3 CONTROL
153
+
154
+ We leverage dynamic particle interaction network for control tasks in both simulation and real world. Because trajectory optimization using shooting method can easily stuck to a local minimum, we first randomly sample $N _ { \mathrm { s a m p l e } }$ control sequences, and select the best performing one according to the rollouts of our learned model. We then optimize it via shooting method using our model’s gradients. We also use online system identification to further improve the model’s performance. Figure 4 and Figure 5 show qualitative and quantitative results, respectively. More details of the control algorithm can be found in Section E.
155
+
156
+ FluidShake. We aim to control the speed of the box to match the fluid particles to a target configuration. We compare our method $( \mathrm { R S + T O } )$ with random search over the learned model (without trajectory optimization - RS) and Model-free Deep Reinforcement Learning (Actor-Critic method optimized with PPO (Schulman et al., 2017) (RL). Figure 5a suggests that our model-based control algorithm outperforms both baselines with a large margin. Also RL is not sample-efficient, requiring more than 10 million time steps to converge while ours requires 600K time steps.
157
+
158
+ RiceGrip. We aim to select a sequence of gripping configurations (position, orientation, and closing distance) to mold the “sticky rice” to a target shape. We also consider cases where the stiffness of the rice is unknown and need to be identified. Figure 5b shows that our dynamic particle interaction
159
+
160
+ ![](images/a0b52d40806df81c8e13b5b7c269f9828759cb2825d34c31ccac1b02ea137ab3.jpg)
161
+ Figure 5: Quantitative results on control. We show the results on control (as evaluated by the Chamfer distance $( \times 1 0 ^ { - 2 } )$ between the manipulated result and the target) for (a) FluidShake and (b) RiceGrip by comparing with four baselines. RL: Model-free deep reinforcement learning optimized with PPO; RS: Random search the actions from the learned model and select the best one to execute; $\mathbf { \mathbb { R } S } + \mathbf { T 0 }$ : Trajectory optimization augmented with model predictive control; $\mathrm { R S } + \mathrm { T O } + \mathrm { I D }$ : Online system identification by estimating uncertain physical parameters during run time.
162
+
163
+ network with system identification performs the best, and is much more efficient than RL (150K vs.
164
+ 10M time steps).
165
+
166
+ RiceGrip in the real world. We generalize the learned model and control algorithm for RiceGrip to the real world. We first reconstruct object geometry using a depth camera mounted on our Kuka robot using TSDF volumetric fusion (Curless & Levoy, 1996). We then randomly sampled $N _ { \mathrm { f i l l } }$ particles within the object mesh as the initial configuration for manipulation. Figure 4c and Figure 5b shows that, using DPI-Nets, the robot successfully adapts to the real world environment of unknown physical parameters and manipulates a deformable foam into various target shapes. The learned policy in RiceGrip does not generalize to the real world due to domain discrepancy, and outputs invalid gripping configurations.
167
+
168
+ # 5 CONCLUSION
169
+
170
+ We have demonstrated that a learned particle dynamics model can approximate the interaction of diverse objects, and can help to solve complex manipulation tasks of deformable objects. Our system requires standard open-source robotics and deep learning toolkits, and can be potentially deployed in household and manufacturing environment. Robot learning of dynamic scenes with particle-based representations shows profound potentials due to the generalizability and expressiveness of the representation. Our study helps lay the foundation for it.
171
+
172
+ # ACKNOWLEDGEMENT
173
+
174
+ This work was supported by: Draper Laboratory Incorporated, Sponsor Award No. SC001- 0000001002; NASA - Johnson Space Center, Sponsor Award No. NNX16AC49A; NSF #1524817; DARPA XAI program FA8750-18-C000; ONR MURI N00014-16-1-2007; Facebook.
175
+
176
+ # REFERENCES
177
+
178
+ Peter W. Battaglia, Razvan Pascanu, Matthew Lai, Danilo Rezende, and Koray Kavukcuoglu. Interaction networks for learning about objects, relations and physics. In NIPS, 2016.
179
+
180
+ James Bradbury, Stephen Merity, Caiming Xiong, and Richard Socher. Quasi-recurrent neural networks. In ICLR, 2017.
181
+
182
+ Eduardo F Camacho and Carlos Bordons Alba. Model predictive control. Springer Science & Business Media, 2013.
183
+
184
+ Michael B Chang, Tomer Ullman, Antonio Torralba, and Joshua B Tenenbaum. A compositional object-based approach to learning physical dynamics. In ICLR, 2017.
185
+
186
+ Brian Curless and Marc Levoy. A volumetric method for building complex models from range images. In SIGGRAPH, 1996.
187
+
188
+ Filipe de Avila Belbute-Peres, Kevin A Smith, Kelsey Allen, Joshua B Tenenbaum, and J Zico Kolter. End-to-end differentiable physics for learning and control. In NIPS, 2018.
189
+
190
+ Jonas Degrave, Michiel Hermans, and Joni Dambre. A differentiable physics engine for deep learning in robotics. In ICLR Workshop, 2016.
191
+
192
+ Sebastien Ehrhardt, Aron Monszpart, Niloy Mitra, and Andrea Vedaldi. Taking visual motion prediction to new heightfields. arXiv:1712.09448, 2017.
193
+
194
+ Gregory Farquhar, Tim Rocktaschel, Maximilian Igl, and Shimon Whiteson. Treeqn and atreec: ¨ Differentiable tree planning for deep reinforcement learning. In ICLR, 2018.
195
+
196
+ Katerina Fragkiadaki, Pulkit Agrawal, Sergey Levine, and Jitendra Malik. Learning visual predictive models of physics for playing billiards. In ICLR, 2016.
197
+
198
+ Shixiang Gu, Timothy Lillicrap, Ilya Sutskever, and Sergey Levine. Continuous deep q-learning with model-based acceleration. In ICML, 2016.
199
+
200
+ Jessica B Hamrick, Andrew J Ballard, Razvan Pascanu, Oriol Vinyals, Nicolas Heess, and Peter W Battaglia. Metacontrol for adaptive imagination-based optimization. In ICLR, 2017.
201
+
202
+ Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015.
203
+
204
+ Thomas N Kipf, Ethan Fetaya, Kuan-Chieh Wang, Max Welling, and Richard S Zemel. Neural relational inference for interacting systems. arXiv:1802.04687, 2018.
205
+
206
+ Tao Lei and Yu Zhang. Training rnns as fast as cnns. arXiv preprint arXiv:1709.02755, 2017.
207
+
208
+ Ian Lenz, Ross A Knepper, and Ashutosh Saxena. Deepmpc: Learning deep latent features for model predictive control. In RSS, 2015.
209
+
210
+ Yunzhu Li, Jiajun Wu, Jun-Yan Zhu, Joshua B Tenenbaum, Antonio Torralba, and Russ Tedrake. Propagation networks for model-based control under partial observation. In ICRA, 2019.
211
+
212
+ Miles Macklin and Matthias Muller. Position based fluids. ¨ ACM TOG, 32(4):104, 2013.
213
+
214
+ Miles Macklin, Matthias Muller, Nuttapong Chentanez, and Tae-Yong Kim. Unified particle physics ¨ for real-time applications. ACM TOG, 33(4):153, 2014.
215
+
216
+ Damian Mrowca, Chengxu Zhuang, Elias Wang, Nick Haber, Li Fei-Fei, Joshua B Tenenbaum, and Daniel LK Yamins. Flexible neural representation for physics prediction. In NIPS, 2018.
217
+
218
+ Anusha Nagabandi, Gregory Kahn, Ronald S Fearing, and Sergey Levine. Neural network dynamics for model-based deep reinforcement learning with model-free fine-tuning. In ICRA, 2018.
219
+
220
+ Junhyuk Oh, Satinder Singh, and Honglak Lee. Value prediction network. In NIPS, 2017.
221
+
222
+ Razvan Pascanu, Yujia Li, Oriol Vinyals, Nicolas Heess, Lars Buesing, Sebastien Racaniere, David \` Reichert, Theophane Weber, Daan Wierstra, and Peter Battaglia. Learning model-based planning ´ from scratch. arXiv:1707.06170, 2017.
223
+
224
+ Sebastien Racani ´ ere, Th \` eophane Weber, David Reichert, Lars Buesing, Arthur Guez, Danilo Jimenez ´ Rezende, Adria Puigdom \` enech Badia, Oriol Vinyals, Nicolas Heess, Yujia Li, Razvan Pascanu, \` Peter Battaglia, David Silver, and Daan Wierstra. Imagination-augmented agents for deep reinforcement learning. In NIPS, 2017.
225
+
226
+ Alvaro Sanchez-Gonzalez, Nicolas Heess, Jost Tobias Springenberg, Josh Merel, Martin Riedmiller, Raia Hadsell, and Peter Battaglia. Graph networks as learnable physics engines for inference and control. In ICML, 2018.
227
+
228
+ Connor Schenck and Dieter Fox. Spnets: Differentiable fluid dynamics for deep neural networks. In CoRL, 2018.
229
+
230
+ John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv:1707.06347, 2017.
231
+ David Silver, Hado van Hasselt, Matteo Hessel, Tom Schaul, Arthur Guez, Tim Harley, Gabriel DulacArnold, David Reichert, Neil Rabinowitz, Andre Barreto, and Thomas Degris. The predictron: End-to-end learning and planning. In ICML, 2017.
232
+ Aravind Srinivas, Allan Jabri, Pieter Abbeel, Sergey Levine, and Chelsea Finn. Universal planning networks. In ICML, 2018.
233
+ Russ Tedrake. Underactuated robotics: Learning, planning, and control for efficient and agile machines course notes for mit 6.832, 2009.
234
+ Russ Tedrake and the Drake Development Team. Drake: Model-based design and verification for robotics, 2019. URL https://drake.mit.edu.
235
+ Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In IROS, pp. 5026–5033. IEEE, 2012.
236
+ Marc Toussaint, K Allen, K Smith, and J Tenenbaum. Differentiable physics and stable modes for tool-use and manipulation planning. In RSS, 2018.
237
+ Sjoerd van Steenkiste, Michael Chang, Klaus Greff, and Jurgen Schmidhuber. Relational neural ¨ expectation maximization: Unsupervised discovery of objects and their interactions. In ICLR, 2018.
238
+ Nicholas Watters, Andrea Tacchetti, Theophane Weber, Razvan Pascanu, Peter Battaglia, and Daniel Zoran. Visual interaction networks. In NIPS, 2017.
239
+ Jiajun Wu, Erika Lu, Pushmeet Kohli, Bill Freeman, and Josh Tenenbaum. Learning to see physics via visual de-animation. In NIPS, 2017.
240
+
241
+ A CONTROL ALGORITHM
242
+
243
+ <table><tr><td>Algorithm1 Control on Learned Dynamics at Time Step t</td><td></td></tr><tr><td>Input: Learned forward dynamics model Φ</td><td></td></tr><tr><td></td><td>Predicted dynamics graph Gt</td></tr><tr><td>Current dynamics graph Gt</td><td></td></tr><tr><td>Goal Gg, current estimation of the attributes A</td><td></td></tr><tr><td>Current control inputs ut:T</td><td></td></tr><tr><td>States history = {Gi}i=1...t</td><td></td></tr><tr><td>Time horizon T</td><td>Output: Controls üt:T, predicted next time step Gt+1</td></tr><tr><td></td><td></td></tr><tr><td>Update A by descending with the gradients V ALstate(Gt, Gt)</td><td></td></tr><tr><td>Forward simulation using the current graph Gt+1 ← Φ(Gt)</td><td></td></tr><tr><td>fori=t+1,.,T-1do</td><td>Make a buffer for storing the simulation results G ← g U Gt+1</td></tr><tr><td>Forward simulation: Gj+1 ← Φ(Gj); 9 ← GUGj+1 end for</td><td></td></tr><tr><td>Update üt:T by descending with the gradients Vut:rLgoal(9,9g)</td><td></td></tr><tr><td>Return ut:T and Gt+1 ← Φ(Gt)</td><td></td></tr></table>
244
+
245
+ # B GENERALIZATION ON EXTRAPOLATION
246
+
247
+ We show our model’s performance on fluids, rigid bodies, and deformable objects with a larger number of particles than they have in the training set. Figure 6 shows qualitative and quantitative results. Our model scales up well to larger objects.
248
+
249
+ # C DATA GENERATION
250
+
251
+ The data is generated using NVIDIA FleX. We have developed a Python interface for the ease of generating and interacting with different environments. We will release the code upon publication.
252
+
253
+ FluidFall. We generated 3,000 rollouts over 120 time steps. The two drops of fluids contain 64 and 125 particles individually, where the initial position of one of the drop in the 3 dimensional coordinates is uniformly sampled between (0.15, 0.55, 0.05) and (0.25, 0.7, 0.15), while the other drop is uniformly sampled between (0.15, 0.1, 0.05) and (0.25, 0.25, 0.15).
254
+
255
+ BoxBath. We generated 3,000 rollouts over 150 time steps. There are 960 fluid particles and the rigid cube consist particles ranging between 27 and 150. The fluid particle block is initialized at (0, 0, 0), and the initial position of the rigid cube is randomly initialized between (0.45, -0.0155, 0.02) to (1.2, -0.0155, 0.4).
256
+
257
+ FluidShake. We generated 2,000 rollouts over 300 time steps. The height of the box is 1.0 and the thickness of the wall is 0.025. For the initial fluid cuboid, the number of fluid particles is uniformly sampled between 10 and 12 in the $\mathbf { X }$ direction, between 15 and 20 in the y direction, 3 in the z direction. The box is fixed in the y and z direction, and is moving freely in the $\mathbf { X }$ direction. We randomly place the initial $\mathbf { X }$ position between -0.2 to 0.2. The sampling of the speed is implemented as $\mathbf { v } = \mathbf { v } + \operatorname { r a n d } ( - 0 . 1 5 , 0 . 1 5 ) - 0 . 1 \mathrm { x }$ , in order to encourage motion smoothness and moving back to origin, where speed v is initialized as 0.
258
+
259
+ RiceGrip. We generated 5,000 rollouts over 30 time steps. We randomize the size of the initial “rice” cuboid, where the length of the three sides is uniformly sampled between 8.0 and 10.0. The material property parameters clusterStiffness is uniformly sampled between 0.3 and 0.7, clusterPlasticThreshold is uniformly sampled between 1e-5 and 5e-4, and clusterPlasticCreep is uniformly sampled between 0.1 and 0.3. The position of the gripper is randomly sampled within a circle of radius 0.5. The orientation of the gripper is always perpendicular to the line connecting the origin to the center of the gripper and the close distance is uniformly sampled between 0.7 to 1.0.
260
+
261
+ ![](images/ebd75d52ad6528648e6fd4f662533d19fe23ee6de6cd405f332ce635ccf8c6d2.jpg)
262
+ Figure 6: Extrapolate generalization on fluids, rigid bodies, and deformable objects. The performance is evaluated by the MSE $( \times 1 0 ^ { - 2 } )$ between the ground truth and rollouts from DPI-Nets. The blue bars denote the range of particle numbers that have been seen during training, which indicate interpolation performance. The red bars indicate extrapolation performance that our model can generalize to cases containing two times more particles than cases it has been trained on.
263
+
264
+ Of all the generated data, $90 \%$ of the rollouts are used for training, and the rest $10 \%$ are used for validation.
265
+
266
+ # D TRAINING DETAILS
267
+
268
+ The models are implemented in PyTorch, and are trained using Adam optimizer (Kingma & Ba (2015)) with a learning rate of 0.0001. The number of particles and relations might be different at each time step, hence we use a batch size of 1, and we update the weights of the networks once every 2 forward rounds.
269
+
270
+ The neighborhood $d$ is set as 0.08, and the propagation step $L$ is set as 2 for all four environments. For hierarchical modeling, it does not make sense to propagate more than one time between leaves and roots as they are disjoint particle sets, and each propagation stage between them only involves one-way edges; hence $\phi _ { \mathrm { L e a f T o L e a f } }$ uses $L = 2$ . $\phi _ { \mathrm { L e a f T o R o o t } }$ uses $L = 1$ . $\phi _ { \mathrm { R o o t T o R o o t } }$ uses $L = 2$ , and $\phi$ RootToLeaf uses $L = 1$ .
271
+
272
+ For all propagation networks used below, the object encoder $f _ { O } ^ { \mathrm { e n c } }$ is an MLP with two hidden layers of size 200, and outputs a feature map of size 200. The relation encoder $f _ { R } ^ { \mathrm { e n c } }$ is an MLP with three hidden layers of size 300, and outputs a feature map of size 200. The propagator $f _ { O }$ and $f _ { R }$ are both MLP with one hidden layer of size 200, in which a residual connection is used to better propagate the effects, and outputs a feature map of size 200. The propagators are shared within each stage of propagation. The motion predictor $f _ { O } ^ { \mathrm { o u t p u t } }$ is an MLP with two hidden layers of size 200, and output the state of required dimension. ReLU is used as the activation function.
273
+
274
+ FluidFall. The model is trained for 13 epochs. The output of the model is the 3 dimensional velocity, which is multiplied by $\Delta t$ and added to the current position to do rollouts.
275
+
276
+ BoxBath. In this environment, four propagation networks are used due to the hierarchical modeling and the number of roots for the rigid cube is set as 8. We have two separate motion predictor for fluids and rigid body, where the fluid predictor output velocity for each fluid particle, while the rigid predictor takes the mean of the signals over all its rigid particles as input, and output a rigid transformation (rotation and translation). The model is trained for 5 epochs.
277
+
278
+ FluidShake. Only one propagation network is used in this environment, and the model is trained for 5 epochs.
279
+
280
+ RiceGrip. Four propagation networks are used due to the hierarchical modeling, and the number of roots for the “rice” is set as 30. The model is trained for 20 epochs.
281
+
282
+ # E CONTROL DETAILS
283
+
284
+ $N _ { \mathrm { s a m p l e } }$ is chosen as 20 for all three cases, where we sample 20 random control sequences, and choose the best performing one as evaluated using our learned model. The evaluation is based on the Chamfer distance between the controlling result and the target configuration.
285
+
286
+ FluidShake. In this environment, the control sequence is the speed of the box along the $\mathbf { X }$ axis. The method to sample the candidate control sequence is the same as when generating training data of this environment. After selected the best performing control sequence, we first use RMSprop optimizer to optimize the control inputs for 10 iterations using a learning rate of 0.003. We then use model-predictive control to apply the control sequence to the FleX physics engine using Algorithm 1.
287
+
288
+ RiceGrip. In this environment, we need to come up with a sequence of grip configurations, where each grip contains positions, orientation, and closing distance. The method to sample the candidate control sequence is the same as when generating training data of this environment. After selected the best performing control sequence, we first use RMSprop optimizer to optimize the control inputs for 20 iterations using a learning rate of 0.003. We then use model-predictive control to apply the control sequence to the FleX physics engine using Algorithm 1.
289
+
290
+ RiceGrip in Real World. In this environment, we need to come up with a sequence of grip configurations, where each grip contains positions, orientation, and closing distance. The method to sample the candidate control sequence is the same as when generating training data of RiceGrip, and $N _ { \mathrm { f i l l } }$ is chosen as 768. Different from the previous case, the physical parameters are always unknown and has to be estimated online. After selected the best performing control sequence, we first use RMSprop optimizer to optimize the control inputs for 20 iterations using a learning rate of 0.003. We then use model-predictive control to apply the control sequence to the real world using Algorithm 1.
parse/train/rJgbSn09Ym/rJgbSn09Ym_content_list.json ADDED
@@ -0,0 +1,1584 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "LEARNING PARTICLE DYNAMICS FOR MANIPULATING RIGID BODIES, DEFORMABLE OBJECTS, AND FLUIDS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 820,
10
+ 147
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Yunzhu Li, Jiajun Wu, Russ Tedrake, Joshua B. Tenenbaum, & Antonio Torralba ",
17
+ "bbox": [
18
+ 183,
19
+ 171,
20
+ 751,
21
+ 188
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Computer Science and Artificial Intelligence Laboratory Massachusetts Institute of Technology {liyunzhu,jiajunwu,russt,jbt,torralba}@mit.edu ",
28
+ "bbox": [
29
+ 184,
30
+ 188,
31
+ 633,
32
+ 228
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "ABSTRACT ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 454,
42
+ 265,
43
+ 544,
44
+ 280
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Real-life control tasks involve matters of various substances—rigid or soft bodies, liquid, gas—each with distinct physical behaviors. This poses challenges to traditional rigid-body physics engines. Particle-based simulators have been developed to model the dynamics of these complex scenes; however, relying on approximation techniques, their simulation often deviates from real-world physics, especially in the long term. In this paper, we propose to learn a particle-based simulator for complex control tasks. Combining learning with particle-based systems brings in two major benefits: first, the learned simulator, just like other particle-based systems, acts widely on objects of different materials; second, the particle-based representation poses strong inductive bias for learning: particles of the same type have the same dynamics within. This enables the model to quickly adapt to new environments of unknown dynamics within a few observations. We demonstrate robots achieving complex manipulation tasks using the learned simulator, such as manipulating fluids and deformable foam, with experiments both in simulation and in the real world. Our study helps lay the foundation for robot learning of dynamic scenes with particle-based representations. ",
51
+ "bbox": [
52
+ 233,
53
+ 296,
54
+ 766,
55
+ 518
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 547,
66
+ 336,
67
+ 563
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Objects have distinct dynamics. Under the same push, a rigid box will slide, modeling clay will deform, and a cup full of water will fall with water spilling out. The diverse behavior of different objects poses challenges to traditional rigid-body simulators used in robotics (Todorov et al., 2012; Tedrake & the Drake Development Team, 2019). Particle-based simulators aim to model the dynamics of these complex scenes (Macklin et al., 2014); however, relying on approximation techniques for the sake of perceptual realism, their simulation often deviates from real world physics, especially in the long term. Developing generalizable and accurate forward dynamics models is of critical importance for robot manipulation of distinct real-life objects. ",
74
+ "bbox": [
75
+ 174,
76
+ 579,
77
+ 825,
78
+ 690
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "We propose to learn a differentiable, particle-based simulator for complex control tasks, drawing inspiration from recent development in differentiable physical engines (Battaglia et al., 2016; Chang et al., 2017). In robotics, the use of differentiable simulators, together with continuous and symbolic optimization algorithms, has enabled planning for increasingly complex whole body motions with multi-contact and multi-object interactions (Toussaint et al., 2018). Yet these approaches have only tackled local interactions of rigid bodies. We develop dynamic particle interaction networks (DPINets) for learning particle dynamics, focusing on capturing the dynamic, hierarchical, and long-range interactions of particles (Figure 1a-c). DPI-Nets can then be combined with classic perception and gradient-based control algorithms for robot manipulation of deformable objects (Figure 1d). ",
85
+ "bbox": [
86
+ 174,
87
+ 698,
88
+ 825,
89
+ 823
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Learning a particle-based simulator brings in two major benefits. First, the learned simulator, just like other particle-based systems, acts widely on objects of different states. DPI-Nets have successfully captured the complex behaviors of deformable objects, fluids, and rigid-bodies. With learned DPINets, our robots have achieved success in manipulation tasks that involve deformable objects of complex physical properties, such as molding plasticine to a target shape. ",
96
+ "bbox": [
97
+ 174,
98
+ 830,
99
+ 825,
100
+ 900
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "image",
106
+ "img_path": "images/88ab148c3b5eb2d2f2972cb178b84fb1e1bd4088e0c2871da2b71bcd6fe60cd1.jpg",
107
+ "image_caption": [
108
+ "Figure 1: Learning particle dynamics for control. (a) DPI-Nets learn particle interaction while dynamically building the interaction graph over time. (b) Build hierarchical graph for multi-scale effect propagation. (c) Multi-step message passing for handling instantaneous force propagation. (d) Perception and control with the learned model. Our system first reconstructs the particle-based shape from visual observation. It then uses gradient-based trajectory optimization to search for the actions that produce the most desired output. "
109
+ ],
110
+ "image_footnote": [],
111
+ "bbox": [
112
+ 181,
113
+ 99,
114
+ 823,
115
+ 333
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "Second, the particle-based representation poses strong inductive bias for learning: particles of the same type have the same dynamics within. This enables the model to quickly adapt to new environments of unknown dynamics within a few observations. Experiments suggest that DPI-Nets quickly learn to adapt to characterize a novel object of unknown physical parameters by doing online system identification. The adapted model also helps the robot to successfully manipulate object in the real world. ",
122
+ "bbox": [
123
+ 174,
124
+ 467,
125
+ 825,
126
+ 550
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "DPI-Nets combine three key features for effective particle-based simulation and control: multi-step spatial propagation, hierarchical particle structure, and dynamic interaction graphs. In particular, it employs dynamic interaction graphs, built on the fly throughout manipulation, to capture the meaningful interactions among particles of deformable objects and fluids. The use of dynamic graphs allows neural models to focus on learning meaningful interactions among particles, and is crucial for obtaining good simulation accuracy and high success rates in manipulation. As objects deform when robots interact with them, a fixed interaction graph over particles is insufficient for robot manipulating non-rigid objects. ",
133
+ "bbox": [
134
+ 174,
135
+ 558,
136
+ 825,
137
+ 669
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "Experiments demonstrate that DPI-Nets significantly outperform interaction networks (Battaglia et al., 2016), HRN (Mrowca et al., 2018), and a few other baselines. More importantly, unlike previous paper that focused purely on forward simulation, we have applied our model to downstream control tasks. Our DPI-Nets enable complex manipulation tasks for deformable objects and fluids, and adapts to scenarios with unknown physical parameters that need to be identified online. We have also performed real-world experiments to demonstrate our model’s generalization ability. ",
144
+ "bbox": [
145
+ 174,
146
+ 676,
147
+ 825,
148
+ 760
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "2 RELATED WORK ",
155
+ "text_level": 1,
156
+ "bbox": [
157
+ 176,
158
+ 789,
159
+ 343,
160
+ 805
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "Differentiable physics simulators. Researchers have developed many differentiable physical simulators (Ehrhardt et al., 2017; Degrave et al., 2016; Todorov et al., 2012), among which some can also provide analytical gradients (Tedrake & the Drake Development Team, 2019). In particular, Battaglia et al. (2016) and Chang et al. (2017) have explored learning a simulator from data by approximating object interactions with neural networks. Li et al. (2019) proposed learning to propagate signals along the interaction graph and extended to partially observable scenarios. These methods mostly focus on modeling rigid body dynamics. ",
167
+ "bbox": [
168
+ 174,
169
+ 825,
170
+ 825,
171
+ 924
172
+ ],
173
+ "page_idx": 1
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "Differentiable simulators for deformable objects have been less studied. Recently, Schenck & Fox (2018) proposed SPNets for differentiable simulation of position-based fluids (Macklin & Muller, ¨ 2013). An inspiring concurrent work from Mrowca et al. (2018) explored learning to approximate particle dynamics of deformable shapes with the Hierarchical Relation Network (HRN). Compared with these papers, we introduce state-specific modeling and dynamic graphs for accurate forward prediction for different states of matter (rigid bodies, deformable shapes, fluids). We also demonstrate how the learned dynamics model can be used for control in both simulation and real world. ",
178
+ "bbox": [
179
+ 174,
180
+ 103,
181
+ 825,
182
+ 200
183
+ ],
184
+ "page_idx": 2
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "Our approach is also complementary to some recent work on learning to discover the interaction graphs (van Steenkiste et al., 2018; Kipf et al., 2018). Our model can also be naturally augmented with a perception module to handle raw visual input, as suggested by Watters et al. (2017); Wu et al. (2017); Fragkiadaki et al. (2016). ",
189
+ "bbox": [
190
+ 174,
191
+ 208,
192
+ 825,
193
+ 263
194
+ ],
195
+ "page_idx": 2
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "Model-predictive control with a differentiable simulator. Many recent papers have studied model-predictive control with deep networks (Lenz et al., 2015; Gu et al., 2016; Nagabandi et al., 2018; Farquhar et al., 2018; Srinivas et al., 2018). They often learn an abstract state transition function, instead of an explicit account of the environment (Silver et al., 2017; Oh et al., 2017), and then use the learned function to facilitate training of a policy network. A few recent papers have employed analytical, differentiable simulators (de Avila Belbute-Peres et al., 2018; Schenck & Fox, 2018) for control problems, such as tool manipulation and tool-use planning (Toussaint et al., 2018). Our model builds on and extends these approaches by learning a general physics simulator that takes raw object observations (e.g., positions, velocities) of each particle as input. We then integrate it into classic trajectory optimization algorithms for control. Compared with pure analytical simulators, our learned simulator can better generalize to novel testing scenarios where object and environment parameters are unknown. ",
200
+ "bbox": [
201
+ 174,
202
+ 281,
203
+ 826,
204
+ 448
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "A few papers have explored using interaction networks for planning and control. They often learn a policy based on interaction networks’ rollouts (Racaniere et al., 2017; Hamrick et al., 2017; Pascanu \\` et al., 2017). In contrast, our model learns a dynamics simulator and directly optimizes trajectories for continuous control. Recently, Sanchez-Gonzalez et al. (2018) have applied interaction networks for control, and Li et al. (2019) have further extended interaction nets to handle instance signal propagation for controlling multiple rigid bodies under partial observations. Compared with them, our dynamic particle interaction network simulate and control deformable, particle-based objects, using dynamic graphs to tackle scenes with complex object interactions. ",
211
+ "bbox": [
212
+ 173,
213
+ 455,
214
+ 825,
215
+ 566
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "3 APPROACH",
222
+ "text_level": 1,
223
+ "bbox": [
224
+ 176,
225
+ 592,
226
+ 299,
227
+ 608
228
+ ],
229
+ "page_idx": 2
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "3.1 PRELIMINARIES ",
234
+ "text_level": 1,
235
+ "bbox": [
236
+ 176,
237
+ 627,
238
+ 326,
239
+ 641
240
+ ],
241
+ "page_idx": 2
242
+ },
243
+ {
244
+ "type": "text",
245
+ "text": "We first describe how interaction networks (Battaglia et al., 2016) represent the physical system; we then extend them for particle-based dynamics. ",
246
+ "bbox": [
247
+ 174,
248
+ 655,
249
+ 823,
250
+ 683
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "text",
256
+ "text": "The interactions within a physical system are represented as a directed graph, $G = \\langle O , R \\rangle$ , where vertices $O = \\{ o _ { i } \\}$ represent objects and edges $R = \\left\\{ r _ { k } \\right\\}$ represent relations. Specifically, $o _ { i } =$ $\\left. x _ { i } , a _ { i } ^ { o } \\right.$ , where $\\dot { x _ { i } } = \\langle q _ { i } , \\dot { q } _ { i } \\rangle$ is the state of object $i$ , containing its position $q _ { i }$ and velocity ${ \\dot { q } } _ { i }$ . $a _ { i } ^ { o }$ denotes its attributes (e.g., mass, radius). For relation, we have $r _ { k } = \\langle u _ { k } , v _ { k } , a _ { k } ^ { r } \\rangle , \\quad 1 \\leq u _ { k } , v _ { k } \\leq$ $| O |$ , where $u _ { k }$ is the receiver, $v _ { k }$ is the sender, and both are integers. $a _ { k } ^ { r }$ is the type and attributes of relation $k$ (e.g., collision, spring connection). ",
257
+ "bbox": [
258
+ 174,
259
+ 690,
260
+ 825,
261
+ 773
262
+ ],
263
+ "page_idx": 2
264
+ },
265
+ {
266
+ "type": "text",
267
+ "text": "The goal is to build a learnable physical engine to capture the underlying physical interactions using function approximators $\\phi$ . The learned model can then be used to infer the system dynamics and predict the future from the current interaction graph as $G _ { t + 1 } = \\phi ( G _ { t } )$ , where $G _ { t }$ denotes the scene state at time $t$ . ",
268
+ "bbox": [
269
+ 174,
270
+ 781,
271
+ 825,
272
+ 837
273
+ ],
274
+ "page_idx": 2
275
+ },
276
+ {
277
+ "type": "text",
278
+ "text": "Interaction networks. Battaglia et al. (2016) proposed interaction networks (IN), a generalpurpose, learnable physics engine that performs object- and relation-centric reasoning about physics. INs define an object function $f _ { O }$ and a relation function $f _ { R }$ to model objects and their relations in a compositional way. The future state at time $t + 1$ is predicted as $\\begin{array} { r l } { e _ { k , t } } & { { } = } \\end{array}$ $\\begin{array} { r } { f _ { R } ( o _ { u _ { k } , t } , o _ { v _ { k } , t } , a _ { k } ^ { r } ) _ { k = 1 \\dots | R | } , \\hat { o } _ { i , t + 1 } = \\dot { f } _ { O } ( o _ { i , t } , \\sum _ { k \\in \\mathcal { N } _ { i } } e _ { k , t } ) _ { i = 1 \\dots | O | } } \\end{array}$ , where $\\overline { { o _ { i , t } } } \\overline { { = \\left. x _ { i , t } , a _ { i } ^ { o } \\right. } }$ denotes object $i$ at time $t$ , $u _ { k }$ and $v _ { k }$ are the receiver and sender of relation $r _ { k }$ respectively, and ${ \\mathcal { N } } _ { i }$ denotes the relations where object $i$ is the receiver. ",
279
+ "bbox": [
280
+ 174,
281
+ 853,
282
+ 823,
283
+ 926
284
+ ],
285
+ "page_idx": 2
286
+ },
287
+ {
288
+ "type": "text",
289
+ "text": "",
290
+ "bbox": [
291
+ 173,
292
+ 103,
293
+ 823,
294
+ 132
295
+ ],
296
+ "page_idx": 3
297
+ },
298
+ {
299
+ "type": "text",
300
+ "text": "Propagation networks. A limitation of INs is that at every time step $t$ , it only considers local information in the graph $G$ and cannot handle instantaneous propagation of forces, which however is a common phenomenon in rigid-body dynamics. ",
301
+ "bbox": [
302
+ 174,
303
+ 143,
304
+ 825,
305
+ 186
306
+ ],
307
+ "page_idx": 3
308
+ },
309
+ {
310
+ "type": "text",
311
+ "text": "Li et al. (2019) proposed propagation networks to handle the instantaneous propagation of forces by doing multi-step message passing. Specifically, they first employed the ideas on fast training of RNNs (Lei & Zhang, 2017; Bradbury et al., 2017) to encode the shared information beforehand and reuse them along the propagation steps. The encoders for objects are denoted as $f _ { O } ^ { \\mathrm { e n c } }$ and the encoder for relations as $f _ { R } ^ { \\mathrm { e n c } }$ , where we denote $c _ { i , t } ^ { o } = f _ { O } ^ { \\mathrm { e n c } } ( o _ { i , t } ) , c _ { k , t } ^ { r } = f _ { R } ^ { \\mathrm { e n c } } ( o _ { u _ { k } , t } , o _ { v _ { k } , t } , a _ { k } ^ { r } )$ . ",
312
+ "bbox": [
313
+ 174,
314
+ 193,
315
+ 825,
316
+ 265
317
+ ],
318
+ "page_idx": 3
319
+ },
320
+ {
321
+ "type": "text",
322
+ "text": "At time $t$ , denote the propagating influence from relation $k$ at propagation step $l$ as $e _ { k , t } ^ { l }$ , and the propagating influence from object $i$ as $h _ { i , t } ^ { l }$ . For step $1 \\le l \\le L$ , propagation can be described as ",
323
+ "bbox": [
324
+ 174,
325
+ 273,
326
+ 823,
327
+ 306
328
+ ],
329
+ "page_idx": 3
330
+ },
331
+ {
332
+ "type": "text",
333
+ "text": "Step 0: ",
334
+ "bbox": [
335
+ 250,
336
+ 318,
337
+ 297,
338
+ 332
339
+ ],
340
+ "page_idx": 3
341
+ },
342
+ {
343
+ "type": "equation",
344
+ "img_path": "images/dbf63070852547ca2003e0f5f756bf639171e7621df9a431ce8a3296624c2049.jpg",
345
+ "text": "$$\n\\begin{array} { r l } & { h _ { i , t } ^ { 0 } = { \\bf 0 } , \\quad i = 1 \\ldots | O | , } \\\\ & { e _ { k , t } ^ { l } = f _ { R } ( c _ { k , t } ^ { r } , h _ { u _ { k } , t } ^ { l - 1 } , h _ { v _ { k } , t } ^ { l - 1 } ) , k = 1 \\ldots | R | , } \\\\ & { h _ { i , t } ^ { l } = f _ { O } ( c _ { i , t } ^ { o } , \\displaystyle \\sum _ { k \\in \\cal N _ { i } } e _ { k , t } ^ { l } , h _ { i , t } ^ { l - 1 } ) , i = 1 \\ldots | O | , } \\\\ & { \\hat { o } _ { i , t + 1 } = f _ { O } ^ { \\mathrm { o u p u t } } ( h _ { i , t } ^ { L } ) , \\quad i = 1 \\ldots | O | , } \\end{array}\n$$",
346
+ "text_format": "latex",
347
+ "bbox": [
348
+ 447,
349
+ 314,
350
+ 746,
351
+ 415
352
+ ],
353
+ "page_idx": 3
354
+ },
355
+ {
356
+ "type": "text",
357
+ "text": "where $f _ { O }$ denotes the object propagatorand $f _ { R }$ denotes the relation propagator. ",
358
+ "bbox": [
359
+ 174,
360
+ 419,
361
+ 691,
362
+ 434
363
+ ],
364
+ "page_idx": 3
365
+ },
366
+ {
367
+ "type": "text",
368
+ "text": "3.2 DYNAMIC PARTICLE INTERACTION NETWORKS ",
369
+ "text_level": 1,
370
+ "bbox": [
371
+ 174,
372
+ 452,
373
+ 535,
374
+ 465
375
+ ],
376
+ "page_idx": 3
377
+ },
378
+ {
379
+ "type": "text",
380
+ "text": "Particle-based system is widely used in physical simulation due to its flexibility in modeling various types of objects (Macklin et al., 2014). We extend existing systems that model object-level interactions to allow particle-level deformation. Consider object set $\\left\\{ \\mathbf { o } _ { i } \\right\\}$ , where each object $\\mathbf { o } _ { i } = \\{ o _ { i } ^ { k } \\} _ { k = 1 \\dots | \\mathbf { o } _ { i } | }$ is represented as a set of particles. We now define the graph on the particles and the rules for influence propagation. ",
381
+ "bbox": [
382
+ 173,
383
+ 477,
384
+ 825,
385
+ 546
386
+ ],
387
+ "page_idx": 3
388
+ },
389
+ {
390
+ "type": "text",
391
+ "text": "Dynamic graph building. The vertices of the graph are the union of particles for all objects $\\bar { \\cal O ^ { - } } = \\{ o _ { i } ^ { k } \\} _ { i = 1 \\ldots | { \\cal O } | , k = 1 \\ldots | { \\bf o } _ { i } | } ^ { - }$ . The edges $R$ between these vertices are dynamically generated over time to ensure efficiency and effectiveness. The construction of the relations is specific to environment and task, which we’ll elaborate in Section 4. A common choice is to consider the neighbors within a predefined distance. ",
392
+ "bbox": [
393
+ 173,
394
+ 559,
395
+ 825,
396
+ 630
397
+ ],
398
+ "page_idx": 3
399
+ },
400
+ {
401
+ "type": "text",
402
+ "text": "An alternative is to build a static, complete interaction graph, but it has two major drawbacks. First, it is not efficient. In many common physical systems, each particle is only interacting with a limited set of other particles (e.g., those within its neighborhood). Second, a static interaction graph implies a universal, continuous neural function approximator; however, many physical interactions involve discontinuous functions (e.g. contact). In contrast, using dynamic graphs empowers the model to tackle such discontinuity. ",
403
+ "bbox": [
404
+ 174,
405
+ 636,
406
+ 825,
407
+ 719
408
+ ],
409
+ "page_idx": 3
410
+ },
411
+ {
412
+ "type": "text",
413
+ "text": "Hierarchical modeling for long-range dependence. Propagation networks Li et al. (2019) require a large $L$ to handle long-range dependence, which is both inefficient and hard to train. Hence, we add one level of hierarchy to efficiently propagate the long-range influence among particles (Mrowca et al., 2018). For each object that requires modeling of the long-range dependence (e.g. rigid-body), we cluster the particles into several non-overlapping clusters. For each cluster, we add a new particle as the cluster’s root. Specifically, for each object $\\mathbf { o } _ { i }$ that requires hierarchical modeling, the corresponding roots are denoted as $\\tilde { \\mathbf { o } } _ { i } \\doteq \\{ \\tilde { o } _ { i } ^ { k } \\} _ { k = 1 \\ldots | \\tilde { \\mathbf { o } } _ { i } | }$ , and the particle set containing all the roots is denoted as $\\tilde { O } = \\{ \\tilde { o } _ { i } ^ { k } \\} _ { i = 1 \\dots | O | , k = 1 \\dots | \\tilde { \\mathbf { o } } _ { i } | }$ . We then construct an edge set $R _ { \\mathrm { L e a f T o R o o t } }$ that contains directed edges from each particle to its root, and an edge set $R _ { \\mathrm { R o o t T o L e a f } }$ containing directed edges from each root to its leaf particles. For each object that need hierarchical modeling, we add pairwise directed edges between all its roots, and denote this edge set as $R _ { \\mathrm { R o o t T o R o o t } }$ . ",
414
+ "bbox": [
415
+ 173,
416
+ 732,
417
+ 825,
418
+ 888
419
+ ],
420
+ "page_idx": 3
421
+ },
422
+ {
423
+ "type": "text",
424
+ "text": "We employ a multi-stage propagation paradigm: first, propagation among leaf nodes, $\\phi _ { \\mathrm { L e a f T o L e a f } } ( \\left. O , R \\right. )$ ; second, propagation from leaf nodes to root nodes, $\\phi _ { \\mathrm { L e a f T o R o o t } } ( \\langle O \\ \\cup$ $\\tilde { O } , R _ { \\mathrm { L e a f T o R o o t } } \\rangle ,$ ); third, propagation between roots, $\\phi _ { \\mathrm { R o o t T o R o o t } } \\big ( \\langle \\tilde { O } , R _ { \\mathrm { R o o t T o R o o t } } \\rangle \\big )$ ; fourth, propagation from root to leaf, $\\phi _ { \\mathrm { R o o t T o L e a f } } \\big ( \\langle O \\cup \\tilde { O } , R _ { \\mathrm { R o o t T o L e a f } } \\rangle \\big )$ . The signals on the leaves are used to do the final prediction. ",
425
+ "bbox": [
426
+ 174,
427
+ 895,
428
+ 823,
429
+ 924
430
+ ],
431
+ "page_idx": 3
432
+ },
433
+ {
434
+ "type": "text",
435
+ "text": "",
436
+ "bbox": [
437
+ 174,
438
+ 102,
439
+ 825,
440
+ 147
441
+ ],
442
+ "page_idx": 4
443
+ },
444
+ {
445
+ "type": "text",
446
+ "text": "Applying to objects of various materials. We define the interaction graph and the propagation rules on particles for different types of objects as follows: ",
447
+ "bbox": [
448
+ 173,
449
+ 162,
450
+ 823,
451
+ 190
452
+ ],
453
+ "page_idx": 4
454
+ },
455
+ {
456
+ "type": "text",
457
+ "text": "• Rigid bodies. All the particles in a rigid body are globally coupled; hence for each rigid object, we define a hierarchical model to propagate the effects. After the multi-stage propagation, we average the signals on the particles to predict a rigid transformation (rotation and translation) for the object. The motion of each particle is calculated accordingly. For each particle, we also include its offset to the center-of-mass to help determine the torque. • Elastic/Plastic objects. For elastically deforming particles, only using the current position and velocity as the state is not sufficient, as it is not clear where the particle will be restored after the deformation. Hence, we include the particle state with the resting position to indicate the place where the particle should be restored. When coupled with plastic deformation, the resting position might change during an interaction. Thus, we also infer the motion of the resting position as a part of the state prediction. We use hierarchical modeling for this category but predict next state for each particles individually. • Fluids. For fluid simulation, one has to enforce density and incompressibility, which can be effectively achieved by only considering a small neighborhood for each particle (Macklin & Muller, 2013). Therefore, we do not need hierarchical modeling for fluids. We build edges ¨ dynamically, connecting a fluid particle to its neighboring particles. The strong inductive bias leveraged in the fluid particles allows good performance even when tested on data outside training distributions. ",
458
+ "bbox": [
459
+ 215,
460
+ 204,
461
+ 825,
462
+ 470
463
+ ],
464
+ "page_idx": 4
465
+ },
466
+ {
467
+ "type": "text",
468
+ "text": "For the interaction between different materials, two directed edges are generated for any pairs of particles that are closer than a certain distance. ",
469
+ "bbox": [
470
+ 176,
471
+ 484,
472
+ 823,
473
+ 512
474
+ ],
475
+ "page_idx": 4
476
+ },
477
+ {
478
+ "type": "text",
479
+ "text": "3.3 CONTROL ON THE LEARNED DYNAMICS ",
480
+ "text_level": 1,
481
+ "bbox": [
482
+ 174,
483
+ 534,
484
+ 495,
485
+ 547
486
+ ],
487
+ "page_idx": 4
488
+ },
489
+ {
490
+ "type": "text",
491
+ "text": "Model-based methods offer many advantages when comparing with their model-free counterparts, such as generalization and sample efficiency. However, for cases where an accurate model is hard to specify or computationally prohibitive, a data-driven approach that learns to approximate the underlying dynamics becomes useful. ",
492
+ "bbox": [
493
+ 174,
494
+ 560,
495
+ 825,
496
+ 616
497
+ ],
498
+ "page_idx": 4
499
+ },
500
+ {
501
+ "type": "text",
502
+ "text": "Function approximators such as neural networks are naturally differentiable. We can rollout using the learned dynamics and optimize the control inputs by minimizing a loss between the simulated results and a target configuration. In cases where certain physical parameters are unknown, we can perform online system identification by minimizing the difference between the model’s prediction and the reality. An outline of our algorithm can be found in Section A. ",
503
+ "bbox": [
504
+ 174,
505
+ 623,
506
+ 825,
507
+ 693
508
+ ],
509
+ "page_idx": 4
510
+ },
511
+ {
512
+ "type": "text",
513
+ "text": "Model predictive control using shooting methods. Let’s denote $\\mathcal { G } _ { g }$ as the goal and $\\hat { u } _ { 1 : T }$ be the control inputs, where $T$ is the time horizon. The control inputs are part of the interaction graph, such as the velocities or the initial positions of a particular set of particles. We denote the resulting trajectory after applying $\\hat { u }$ as $\\mathcal { G } = \\{ G _ { i } \\} _ { i = 1 : T }$ . The task here is to determine the control inputs as to minimize the distance between the actual outcome and the specified goal ${ \\mathcal { L } } _ { \\mathrm { g o a l } } ( { \\mathcal { G } } , { \\mathcal { G } } _ { g } )$ . ",
514
+ "bbox": [
515
+ 174,
516
+ 708,
517
+ 825,
518
+ 779
519
+ ],
520
+ "page_idx": 4
521
+ },
522
+ {
523
+ "type": "text",
524
+ "text": "Our dynamic particle interaction network does forward simulation by taking the dynamics graph at time $t$ as input, and produces the graph at next time step, $\\hat { G } _ { t + 1 } = \\Phi ( G _ { t } )$ , where $\\Phi$ is implemented as DPI-Nets as described in the previous section. Let’s denote the the history until time $t$ as $\\bar { \\mathcal { G } } = \\{ G _ { i } \\} _ { i = 1 \\ldots t }$ , and the forward simulation from time step $t$ as $\\hat { \\mathcal { G } } = \\{ \\hat { G } _ { i } \\} _ { i = t + 1 \\ldots T }$ . The loss $\\mathcal { L } _ { \\mathrm { g o a l } } ( \\bar { \\mathcal { G } } \\cup \\hat { \\mathcal { G } } , \\mathcal { G } _ { g } )$ can be used to update the control inputs by doing stochastic gradient descent (SGD). This is known as the shooting method in trajectory optimization (Tedrake, 2009). ",
525
+ "bbox": [
526
+ 174,
527
+ 785,
528
+ 825,
529
+ 876
530
+ ],
531
+ "page_idx": 4
532
+ },
533
+ {
534
+ "type": "text",
535
+ "text": "The learned model might deviate from the reality due to accumulated prediction errors. We use Model-Predictive Control (MPC) (Camacho & Alba, 2013) to stabilize the trajectory by doing forward simulation and updating the control inputs at every time step to compensate the simulation error. ",
536
+ "bbox": [
537
+ 176,
538
+ 882,
539
+ 823,
540
+ 925
541
+ ],
542
+ "page_idx": 4
543
+ },
544
+ {
545
+ "type": "text",
546
+ "text": "Online adaptation. In many real-world cases, without actually interacting with the environment, inherent attributes such as mass, stiffness, and viscosity are not directly observable. DPI-Nets can estimate these attributes on the fly with SGD updates by minimizing the distance between the predicted future states and the actual future states $\\mathcal { L } _ { \\mathrm { s t a t e } } ( \\hat { G } _ { t } , G _ { t } )$ . ",
547
+ "bbox": [
548
+ 174,
549
+ 103,
550
+ 825,
551
+ 161
552
+ ],
553
+ "page_idx": 5
554
+ },
555
+ {
556
+ "type": "text",
557
+ "text": "4 EXPERIMENTS ",
558
+ "text_level": 1,
559
+ "bbox": [
560
+ 176,
561
+ 183,
562
+ 326,
563
+ 199
564
+ ],
565
+ "page_idx": 5
566
+ },
567
+ {
568
+ "type": "text",
569
+ "text": "We evaluate our method on four different environments containing different types of objects and interactions. We will first describe the environments and show simulation results. We then present how the learned dynamics helps to complete control tasks in both simulation and the real world. ",
570
+ "bbox": [
571
+ 174,
572
+ 214,
573
+ 823,
574
+ 257
575
+ ],
576
+ "page_idx": 5
577
+ },
578
+ {
579
+ "type": "text",
580
+ "text": "4.1 ENVIRONMENTS ",
581
+ "text_level": 1,
582
+ "bbox": [
583
+ 176,
584
+ 273,
585
+ 328,
586
+ 289
587
+ ],
588
+ "page_idx": 5
589
+ },
590
+ {
591
+ "type": "text",
592
+ "text": "FluidFall (Figure 2a). Two drops of fluids are falling down, colliding, and merging. We vary the initial position and viscosity for training and evaluation. ",
593
+ "bbox": [
594
+ 174,
595
+ 300,
596
+ 823,
597
+ 329
598
+ ],
599
+ "page_idx": 5
600
+ },
601
+ {
602
+ "type": "text",
603
+ "text": "BoxBath (Figure 2b). A block of fluids are flushing a rigid cube. In this environment, we have to model two different materials and the interactions between them. We randomize the initial position of the fluids and the cube to test the model’s generalization ability. ",
604
+ "bbox": [
605
+ 174,
606
+ 335,
607
+ 825,
608
+ 377
609
+ ],
610
+ "page_idx": 5
611
+ },
612
+ {
613
+ "type": "text",
614
+ "text": "FluidShake (Figure 2c). We have a box of fluids and the box is moving horizontally, The speed of the box is randomly selected at each time step. We vary the size of the box and volume of the fluids to test generalization. ",
615
+ "bbox": [
616
+ 174,
617
+ 385,
618
+ 825,
619
+ 426
620
+ ],
621
+ "page_idx": 5
622
+ },
623
+ {
624
+ "type": "text",
625
+ "text": "RiceGrip (Figure 2d). We manipulate an object with both elastic and plastic deformation (e.g., sticky rice). We use two cuboids to mimic the fingers of a parallel gripper, where the gripper is initialized at a random position and orientation. During the simulation of one grip, the fingers will move closer to each other and then restore to its original positions. The model has to learn the interactions between the gripper and the “sticky rice”, as well as the interactions within the “rice” itself. ",
626
+ "bbox": [
627
+ 174,
628
+ 434,
629
+ 825,
630
+ 503
631
+ ],
632
+ "page_idx": 5
633
+ },
634
+ {
635
+ "type": "text",
636
+ "text": "We use all four environments in evaluating our model’s performance in simulation. We use the rollout MSE as our metric. We further use the latter two for control, because they involve fully actuated external shapes that can be used for object manipulation. In FluidShake, the control task requires determining the speed of the box at each time step, in order to make the fluid match a target configuration within a time window; in RiceGrip, the control task corresponds to select a sequence of grip configurations (position, orientation, closing distance) to manipulate the deformable object as to match a target shape. The metric for performance in control is the Chamfer distance between the manipulation results and the target configuration. ",
637
+ "bbox": [
638
+ 174,
639
+ 511,
640
+ 825,
641
+ 622
642
+ ],
643
+ "page_idx": 5
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "4.2 PHYSICAL SIMULATION ",
648
+ "text_level": 1,
649
+ "bbox": [
650
+ 176,
651
+ 640,
652
+ 380,
653
+ 654
654
+ ],
655
+ "page_idx": 5
656
+ },
657
+ {
658
+ "type": "text",
659
+ "text": "We present implementation details for dynamics learning in the four environment and perform ablation studies to evaluate the effectiveness of the introduced techniques. ",
660
+ "bbox": [
661
+ 173,
662
+ 665,
663
+ 823,
664
+ 694
665
+ ],
666
+ "page_idx": 5
667
+ },
668
+ {
669
+ "type": "text",
670
+ "text": "Implementation details. For FluidFall, we dynamically build the interaction graph by connecting each particle to its neighbors within a certain distance $d$ . No hierarchical modeling is used. ",
671
+ "bbox": [
672
+ 171,
673
+ 707,
674
+ 823,
675
+ 734
676
+ ],
677
+ "page_idx": 5
678
+ },
679
+ {
680
+ "type": "text",
681
+ "text": "For BoxBath, we model the rigid cube as in Section 3.2, using multi-stage hierarchical propagation. Two directed edges will be constructed between two fluid particles if the distance between them is smaller than $d$ . Similarly, we also add two directed edge between rigid particles and fluid particles when their distance is smaller than $d$ . ",
682
+ "bbox": [
683
+ 174,
684
+ 741,
685
+ 825,
686
+ 797
687
+ ],
688
+ "page_idx": 5
689
+ },
690
+ {
691
+ "type": "text",
692
+ "text": "For FluidShake, we model fluid as in Section 3.2. We also add five external particles to represent the walls of the box. We add a directed edge from the wall particle to the fluid particle when they are closer than $d$ . The model is a single propagation network, where the edges are dynamically constructed over time. ",
693
+ "bbox": [
694
+ 174,
695
+ 804,
696
+ 823,
697
+ 861
698
+ ],
699
+ "page_idx": 5
700
+ },
701
+ {
702
+ "type": "text",
703
+ "text": "For RiceGrip, we build a hierarchical model for rice and use four propagation networks for multi-stage effect propagation (Section 3.2). The edges between the “rice” particles are dynamically generated if two particles are closer than $d$ . Similar to FluidShake, we add two external particles to represent the two “fingers” and add an edge from the “finger” to the “rice” particle if they are closer than the distance $d$ . As “rice” can deform both elastically and plastically, we maintain a resting position that helps the model restore a deformed particle. The output for each particle is a 6-dim vector for the velocity of the current observed position and the resting position. More training details for each environment can be found in Section D. Details for data generation are in Section C. ",
704
+ "bbox": [
705
+ 174,
706
+ 867,
707
+ 823,
708
+ 924
709
+ ],
710
+ "page_idx": 5
711
+ },
712
+ {
713
+ "type": "image",
714
+ "img_path": "images/7ffa2848c97304de6a0732f787ea619027f4bc30b25c3dd9f4979f2935a6386e.jpg",
715
+ "image_caption": [
716
+ "(d) RiceGrip ",
717
+ "Figure 2: Qualitative results on forward simulation. We compare the ground truth (GT) and the rollouts from HRN (Mrowca et al., 2018) and our model (DPI-Net) in four environments (FluidFall, BoxBath, FluidShake, and RiceGrip). The simulations from our DPI-Net are significantly better. We provide zoom-in views for a few frames to show details. Please see our video for more empirical results. "
718
+ ],
719
+ "image_footnote": [],
720
+ "bbox": [
721
+ 178,
722
+ 88,
723
+ 812,
724
+ 772
725
+ ],
726
+ "page_idx": 6
727
+ },
728
+ {
729
+ "type": "text",
730
+ "text": "",
731
+ "bbox": [
732
+ 174,
733
+ 868,
734
+ 825,
735
+ 925
736
+ ],
737
+ "page_idx": 6
738
+ },
739
+ {
740
+ "type": "table",
741
+ "img_path": "images/fad1e29ee30608f3e7a71eff05d0862eb892cafec949ea062535e47c167ddef5.jpg",
742
+ "table_caption": [],
743
+ "table_footnote": [],
744
+ "table_body": "<table><tr><td>Methods</td><td>FuildFall</td><td>BoxBath</td><td>FluidShake</td><td>RiceGrip</td></tr><tr><td>IN (Battaglia et al., 2016)</td><td>2.74± 0.56</td><td>N/A</td><td>N/A</td><td>N/A</td></tr><tr><td>HRN (Mrowca et al., 2018)</td><td>0.21 ± 0.04</td><td>3.62 ± 0.40</td><td>3.58 ± 0.77</td><td>0.17 ± 0.11</td></tr><tr><td>DPI-Net w/o hierarchy</td><td>0.15 ± 0.03</td><td>2.64 ±0.69</td><td>1.89 ± 0.36</td><td>0.29 ± 0.13</td></tr><tr><td>DPI-Net</td><td>0.15 ± 0.03</td><td>2.03 ± 0.41</td><td>1.89 ± 0.36</td><td>0.13 ± 0.07</td></tr></table>",
745
+ "bbox": [
746
+ 250,
747
+ 101,
748
+ 745,
749
+ 180
750
+ ],
751
+ "page_idx": 7
752
+ },
753
+ {
754
+ "type": "image",
755
+ "img_path": "images/3a37f1f5799ebe32c15101760ff770c47c5eb2cee68f798190d4d9d2e1f07c14.jpg",
756
+ "image_caption": [
757
+ "Table 1: Quantitative results on forward simulation. MSE $( \\times 1 0 ^ { - 2 } )$ between the ground truth and model rollouts. The hyperparameters used in our model are fixed for all four environments. FluidFall and FluidShake involve no hierarchy, so DPI-Net performs the same as the variant without hierarchy. DPI-Net significantly outperforms HRN (Mrowca et al., 2018) in modeling fluids (BoxBath and FluidShake) due to the use of dynamic graphs. ",
758
+ "Figure 3: Ablation studies. We perform ablation studies to test our model’s robustness to hyperparameters. The performance is evaluated by the mean squared distance $( \\times 1 0 ^ { - 2 } )$ between the ground truth and model rollouts. (a) We vary the number of roots when building hierarchy, the propagation step $L$ during message passing, and the size of the neighborhood $d$ . (b) In BoxBath, DPI-Nets use separate motion predictors for fluids and rigid bodies. Here we compared with a unified motion predictor. "
759
+ ],
760
+ "image_footnote": [],
761
+ "bbox": [
762
+ 183,
763
+ 279,
764
+ 816,
765
+ 383
766
+ ],
767
+ "page_idx": 7
768
+ },
769
+ {
770
+ "type": "text",
771
+ "text": "Results. Qualitative and quantitative results are in Figure 2 and Table 1. We compare our method (DPI-Net) with three baselines, Interaction Networks (Battaglia et al., 2016), HRN (Mrowca et al., 2018), and DPI-Net without hierarchy. Note that we use the same set of hyperparameters in our model for all four testing environments. ",
772
+ "bbox": [
773
+ 174,
774
+ 503,
775
+ 825,
776
+ 560
777
+ ],
778
+ "page_idx": 7
779
+ },
780
+ {
781
+ "type": "text",
782
+ "text": "Specifically, Interaction Networks (IN) consider a complete graph of the particle system. Thus, it can only operate on small environments such as FluidFall; it runs out of memory (12GB) for the other three environments. IN does not perform well, because its use of a complete graph makes training difficult and inefficient, and because it ignores influence propagation and long-range dependence. ",
783
+ "bbox": [
784
+ 174,
785
+ 568,
786
+ 825,
787
+ 623
788
+ ],
789
+ "page_idx": 7
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "Without a dynamic graph, modeling fluids becomes hard, because the neighbors of a fluid particle changes constantly. Table 1 shows that for environments that involve fluids (BoxBath and FluidShake), DPI-Net performs better than those with a static interaction graph. Our model also performs better in scenarios that involve objects of multiple states (BoxBath, Figure 2b), because it uses state-specific modeling. Models such as HRN (Mrowca et al., 2018) aim to learn a universal dynamics model for all states of matter. It is therefore solving a harder problem and, for this particular scenario, expected to perform not as well. When augmented with state-specific modeling, HRN’s performance is likely to improve, too. Without hierarchy, it is hard to capture long-range dependence, leading to performance drop in environments that involve hierarchical object modeling (BoxBath and RiceGrip). ",
794
+ "bbox": [
795
+ 174,
796
+ 631,
797
+ 825,
798
+ 756
799
+ ],
800
+ "page_idx": 7
801
+ },
802
+ {
803
+ "type": "text",
804
+ "text": "Appendix B includes results on scenarios outside the training distribution (e.g., more particles). \nDPI-Net performs well on these out-of-sample cases, successfully leveraging the inductive bias. ",
805
+ "bbox": [
806
+ 174,
807
+ 762,
808
+ 823,
809
+ 791
810
+ ],
811
+ "page_idx": 7
812
+ },
813
+ {
814
+ "type": "text",
815
+ "text": "Ablation studies. We also test our model’s sensitivity to hyperparameters. We consider three of them: the number of roots for building hierarchy, the number of propagation steps $L$ , and the size of the neighborhood $d$ . We test them in RiceGrip. As can be seen from the results shown in Figure 3a, DPI-Nets can better capture the motion of the “rice” by using fewer roots, on which the information might be easier to propagate. Longer propagation steps do not necessarily lead to better performance, as they increases training difficulty. Using larger neighborhood achieves better results, but makes computation slower. Using one TITAN Xp, each forward step in RiceGrip takes $3 0 \\mathrm { m s }$ for $d = 0 . 0 4$ $3 3 \\mathrm { m s }$ for $d = 0 . 0 8$ , and $4 0 \\mathrm { m s }$ for $d = 0 . 1 2$ . ",
816
+ "bbox": [
817
+ 174,
818
+ 811,
819
+ 825,
820
+ 922
821
+ ],
822
+ "page_idx": 7
823
+ },
824
+ {
825
+ "type": "image",
826
+ "img_path": "images/632ff12117420d0ccfee02730acf1627e5e8310192a06ab8f422cde97c4adf20.jpg",
827
+ "image_caption": [
828
+ "Figure 4: Qualitative results on control. (a) FluidShake - Manipulating a box of fluids to match a target shape. The Result and Target indicate the fluid shape when viewed from the cutaway view. (b) RiceGrip - Gripping a deformable object and molding it to a target shape. (c) RiceGrip in Real World - Generalize the learned dynamics and the control algorithms to the real world by doing online adaptation. The last two columns indicate the final shape viewed from the top. "
829
+ ],
830
+ "image_footnote": [],
831
+ "bbox": [
832
+ 178,
833
+ 99,
834
+ 820,
835
+ 420
836
+ ],
837
+ "page_idx": 8
838
+ },
839
+ {
840
+ "type": "text",
841
+ "text": "We also perform experiments to justify our use of different motion predictors for objects of different states. Figure 3b shows the results of our model vs. a unified dynamics predictor for all objects in BoxBath. As there are only a few states of interest (solids, liquids, and soft bodies), and their physical behaviors are drastically different, it is not surprising that DPI-Nets, with state-specific motion predictors, perform better, and are equally efficient as the unified model (time difference smaller than 3ms per forward step). ",
842
+ "bbox": [
843
+ 174,
844
+ 534,
845
+ 825,
846
+ 618
847
+ ],
848
+ "page_idx": 8
849
+ },
850
+ {
851
+ "type": "text",
852
+ "text": "4.3 CONTROL ",
853
+ "text_level": 1,
854
+ "bbox": [
855
+ 174,
856
+ 640,
857
+ 282,
858
+ 654
859
+ ],
860
+ "page_idx": 8
861
+ },
862
+ {
863
+ "type": "text",
864
+ "text": "We leverage dynamic particle interaction network for control tasks in both simulation and real world. Because trajectory optimization using shooting method can easily stuck to a local minimum, we first randomly sample $N _ { \\mathrm { s a m p l e } }$ control sequences, and select the best performing one according to the rollouts of our learned model. We then optimize it via shooting method using our model’s gradients. We also use online system identification to further improve the model’s performance. Figure 4 and Figure 5 show qualitative and quantitative results, respectively. More details of the control algorithm can be found in Section E. ",
865
+ "bbox": [
866
+ 174,
867
+ 667,
868
+ 825,
869
+ 765
870
+ ],
871
+ "page_idx": 8
872
+ },
873
+ {
874
+ "type": "text",
875
+ "text": "FluidShake. We aim to control the speed of the box to match the fluid particles to a target configuration. We compare our method $( \\mathrm { R S + T O } )$ with random search over the learned model (without trajectory optimization - RS) and Model-free Deep Reinforcement Learning (Actor-Critic method optimized with PPO (Schulman et al., 2017) (RL). Figure 5a suggests that our model-based control algorithm outperforms both baselines with a large margin. Also RL is not sample-efficient, requiring more than 10 million time steps to converge while ours requires 600K time steps. ",
876
+ "bbox": [
877
+ 174,
878
+ 781,
879
+ 825,
880
+ 866
881
+ ],
882
+ "page_idx": 8
883
+ },
884
+ {
885
+ "type": "text",
886
+ "text": "RiceGrip. We aim to select a sequence of gripping configurations (position, orientation, and closing distance) to mold the “sticky rice” to a target shape. We also consider cases where the stiffness of the rice is unknown and need to be identified. Figure 5b shows that our dynamic particle interaction ",
887
+ "bbox": [
888
+ 176,
889
+ 882,
890
+ 823,
891
+ 924
892
+ ],
893
+ "page_idx": 8
894
+ },
895
+ {
896
+ "type": "image",
897
+ "img_path": "images/a0b52d40806df81c8e13b5b7c269f9828759cb2825d34c31ccac1b02ea137ab3.jpg",
898
+ "image_caption": [
899
+ "Figure 5: Quantitative results on control. We show the results on control (as evaluated by the Chamfer distance $( \\times 1 0 ^ { - 2 } )$ between the manipulated result and the target) for (a) FluidShake and (b) RiceGrip by comparing with four baselines. RL: Model-free deep reinforcement learning optimized with PPO; RS: Random search the actions from the learned model and select the best one to execute; $\\mathbf { \\mathbb { R } S } + \\mathbf { T 0 }$ : Trajectory optimization augmented with model predictive control; $\\mathrm { R S } + \\mathrm { T O } + \\mathrm { I D }$ : Online system identification by estimating uncertain physical parameters during run time. "
900
+ ],
901
+ "image_footnote": [],
902
+ "bbox": [
903
+ 174,
904
+ 109,
905
+ 815,
906
+ 226
907
+ ],
908
+ "page_idx": 9
909
+ },
910
+ {
911
+ "type": "text",
912
+ "text": "network with system identification performs the best, and is much more efficient than RL (150K vs. \n10M time steps). ",
913
+ "bbox": [
914
+ 176,
915
+ 338,
916
+ 823,
917
+ 367
918
+ ],
919
+ "page_idx": 9
920
+ },
921
+ {
922
+ "type": "text",
923
+ "text": "RiceGrip in the real world. We generalize the learned model and control algorithm for RiceGrip to the real world. We first reconstruct object geometry using a depth camera mounted on our Kuka robot using TSDF volumetric fusion (Curless & Levoy, 1996). We then randomly sampled $N _ { \\mathrm { f i l l } }$ particles within the object mesh as the initial configuration for manipulation. Figure 4c and Figure 5b shows that, using DPI-Nets, the robot successfully adapts to the real world environment of unknown physical parameters and manipulates a deformable foam into various target shapes. The learned policy in RiceGrip does not generalize to the real world due to domain discrepancy, and outputs invalid gripping configurations. ",
924
+ "bbox": [
925
+ 174,
926
+ 380,
927
+ 825,
928
+ 491
929
+ ],
930
+ "page_idx": 9
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "5 CONCLUSION ",
935
+ "text_level": 1,
936
+ "bbox": [
937
+ 176,
938
+ 512,
939
+ 318,
940
+ 530
941
+ ],
942
+ "page_idx": 9
943
+ },
944
+ {
945
+ "type": "text",
946
+ "text": "We have demonstrated that a learned particle dynamics model can approximate the interaction of diverse objects, and can help to solve complex manipulation tasks of deformable objects. Our system requires standard open-source robotics and deep learning toolkits, and can be potentially deployed in household and manufacturing environment. Robot learning of dynamic scenes with particle-based representations shows profound potentials due to the generalizability and expressiveness of the representation. Our study helps lay the foundation for it. ",
947
+ "bbox": [
948
+ 174,
949
+ 545,
950
+ 825,
951
+ 628
952
+ ],
953
+ "page_idx": 9
954
+ },
955
+ {
956
+ "type": "text",
957
+ "text": "ACKNOWLEDGEMENT ",
958
+ "text_level": 1,
959
+ "bbox": [
960
+ 176,
961
+ 652,
962
+ 356,
963
+ 667
964
+ ],
965
+ "page_idx": 9
966
+ },
967
+ {
968
+ "type": "text",
969
+ "text": "This work was supported by: Draper Laboratory Incorporated, Sponsor Award No. SC001- 0000001002; NASA - Johnson Space Center, Sponsor Award No. NNX16AC49A; NSF #1524817; DARPA XAI program FA8750-18-C000; ONR MURI N00014-16-1-2007; Facebook. ",
970
+ "bbox": [
971
+ 174,
972
+ 684,
973
+ 826,
974
+ 727
975
+ ],
976
+ "page_idx": 9
977
+ },
978
+ {
979
+ "type": "text",
980
+ "text": "REFERENCES ",
981
+ "text_level": 1,
982
+ "bbox": [
983
+ 176,
984
+ 750,
985
+ 285,
986
+ 763
987
+ ],
988
+ "page_idx": 9
989
+ },
990
+ {
991
+ "type": "text",
992
+ "text": "Peter W. Battaglia, Razvan Pascanu, Matthew Lai, Danilo Rezende, and Koray Kavukcuoglu. Interaction networks for learning about objects, relations and physics. In NIPS, 2016. ",
993
+ "bbox": [
994
+ 174,
995
+ 773,
996
+ 825,
997
+ 801
998
+ ],
999
+ "page_idx": 9
1000
+ },
1001
+ {
1002
+ "type": "text",
1003
+ "text": "James Bradbury, Stephen Merity, Caiming Xiong, and Richard Socher. Quasi-recurrent neural networks. In ICLR, 2017. ",
1004
+ "bbox": [
1005
+ 169,
1006
+ 814,
1007
+ 825,
1008
+ 842
1009
+ ],
1010
+ "page_idx": 9
1011
+ },
1012
+ {
1013
+ "type": "text",
1014
+ "text": "Eduardo F Camacho and Carlos Bordons Alba. Model predictive control. Springer Science & Business Media, 2013. ",
1015
+ "bbox": [
1016
+ 171,
1017
+ 854,
1018
+ 825,
1019
+ 882
1020
+ ],
1021
+ "page_idx": 9
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "Michael B Chang, Tomer Ullman, Antonio Torralba, and Joshua B Tenenbaum. A compositional object-based approach to learning physical dynamics. In ICLR, 2017. ",
1026
+ "bbox": [
1027
+ 173,
1028
+ 895,
1029
+ 823,
1030
+ 924
1031
+ ],
1032
+ "page_idx": 9
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "Brian Curless and Marc Levoy. A volumetric method for building complex models from range images. In SIGGRAPH, 1996. ",
1037
+ "bbox": [
1038
+ 171,
1039
+ 103,
1040
+ 825,
1041
+ 132
1042
+ ],
1043
+ "page_idx": 10
1044
+ },
1045
+ {
1046
+ "type": "text",
1047
+ "text": "Filipe de Avila Belbute-Peres, Kevin A Smith, Kelsey Allen, Joshua B Tenenbaum, and J Zico Kolter. End-to-end differentiable physics for learning and control. In NIPS, 2018. ",
1048
+ "bbox": [
1049
+ 173,
1050
+ 140,
1051
+ 825,
1052
+ 170
1053
+ ],
1054
+ "page_idx": 10
1055
+ },
1056
+ {
1057
+ "type": "text",
1058
+ "text": "Jonas Degrave, Michiel Hermans, and Joni Dambre. A differentiable physics engine for deep learning in robotics. In ICLR Workshop, 2016. ",
1059
+ "bbox": [
1060
+ 173,
1061
+ 179,
1062
+ 823,
1063
+ 208
1064
+ ],
1065
+ "page_idx": 10
1066
+ },
1067
+ {
1068
+ "type": "text",
1069
+ "text": "Sebastien Ehrhardt, Aron Monszpart, Niloy Mitra, and Andrea Vedaldi. Taking visual motion prediction to new heightfields. arXiv:1712.09448, 2017. ",
1070
+ "bbox": [
1071
+ 173,
1072
+ 215,
1073
+ 823,
1074
+ 246
1075
+ ],
1076
+ "page_idx": 10
1077
+ },
1078
+ {
1079
+ "type": "text",
1080
+ "text": "Gregory Farquhar, Tim Rocktaschel, Maximilian Igl, and Shimon Whiteson. Treeqn and atreec: ¨ Differentiable tree planning for deep reinforcement learning. In ICLR, 2018. ",
1081
+ "bbox": [
1082
+ 173,
1083
+ 253,
1084
+ 823,
1085
+ 284
1086
+ ],
1087
+ "page_idx": 10
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "Katerina Fragkiadaki, Pulkit Agrawal, Sergey Levine, and Jitendra Malik. Learning visual predictive models of physics for playing billiards. In ICLR, 2016. ",
1092
+ "bbox": [
1093
+ 173,
1094
+ 291,
1095
+ 823,
1096
+ 320
1097
+ ],
1098
+ "page_idx": 10
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "Shixiang Gu, Timothy Lillicrap, Ilya Sutskever, and Sergey Levine. Continuous deep q-learning with model-based acceleration. In ICML, 2016. ",
1103
+ "bbox": [
1104
+ 173,
1105
+ 329,
1106
+ 823,
1107
+ 358
1108
+ ],
1109
+ "page_idx": 10
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "Jessica B Hamrick, Andrew J Ballard, Razvan Pascanu, Oriol Vinyals, Nicolas Heess, and Peter W Battaglia. Metacontrol for adaptive imagination-based optimization. In ICLR, 2017. ",
1114
+ "bbox": [
1115
+ 173,
1116
+ 367,
1117
+ 823,
1118
+ 396
1119
+ ],
1120
+ "page_idx": 10
1121
+ },
1122
+ {
1123
+ "type": "text",
1124
+ "text": "Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. ",
1125
+ "bbox": [
1126
+ 173,
1127
+ 405,
1128
+ 813,
1129
+ 421
1130
+ ],
1131
+ "page_idx": 10
1132
+ },
1133
+ {
1134
+ "type": "text",
1135
+ "text": "Thomas N Kipf, Ethan Fetaya, Kuan-Chieh Wang, Max Welling, and Richard S Zemel. Neural relational inference for interacting systems. arXiv:1802.04687, 2018. ",
1136
+ "bbox": [
1137
+ 171,
1138
+ 428,
1139
+ 823,
1140
+ 458
1141
+ ],
1142
+ "page_idx": 10
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "Tao Lei and Yu Zhang. Training rnns as fast as cnns. arXiv preprint arXiv:1709.02755, 2017. ",
1147
+ "bbox": [
1148
+ 174,
1149
+ 465,
1150
+ 789,
1151
+ 482
1152
+ ],
1153
+ "page_idx": 10
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "Ian Lenz, Ross A Knepper, and Ashutosh Saxena. Deepmpc: Learning deep latent features for model predictive control. In RSS, 2015. ",
1158
+ "bbox": [
1159
+ 171,
1160
+ 491,
1161
+ 823,
1162
+ 520
1163
+ ],
1164
+ "page_idx": 10
1165
+ },
1166
+ {
1167
+ "type": "text",
1168
+ "text": "Yunzhu Li, Jiajun Wu, Jun-Yan Zhu, Joshua B Tenenbaum, Antonio Torralba, and Russ Tedrake. Propagation networks for model-based control under partial observation. In ICRA, 2019. ",
1169
+ "bbox": [
1170
+ 171,
1171
+ 529,
1172
+ 825,
1173
+ 558
1174
+ ],
1175
+ "page_idx": 10
1176
+ },
1177
+ {
1178
+ "type": "text",
1179
+ "text": "Miles Macklin and Matthias Muller. Position based fluids. ¨ ACM TOG, 32(4):104, 2013. ",
1180
+ "bbox": [
1181
+ 171,
1182
+ 565,
1183
+ 751,
1184
+ 580
1185
+ ],
1186
+ "page_idx": 10
1187
+ },
1188
+ {
1189
+ "type": "text",
1190
+ "text": "Miles Macklin, Matthias Muller, Nuttapong Chentanez, and Tae-Yong Kim. Unified particle physics ¨ for real-time applications. ACM TOG, 33(4):153, 2014. ",
1191
+ "bbox": [
1192
+ 171,
1193
+ 589,
1194
+ 823,
1195
+ 618
1196
+ ],
1197
+ "page_idx": 10
1198
+ },
1199
+ {
1200
+ "type": "text",
1201
+ "text": "Damian Mrowca, Chengxu Zhuang, Elias Wang, Nick Haber, Li Fei-Fei, Joshua B Tenenbaum, and Daniel LK Yamins. Flexible neural representation for physics prediction. In NIPS, 2018. ",
1202
+ "bbox": [
1203
+ 171,
1204
+ 627,
1205
+ 823,
1206
+ 656
1207
+ ],
1208
+ "page_idx": 10
1209
+ },
1210
+ {
1211
+ "type": "text",
1212
+ "text": "Anusha Nagabandi, Gregory Kahn, Ronald S Fearing, and Sergey Levine. Neural network dynamics for model-based deep reinforcement learning with model-free fine-tuning. In ICRA, 2018. ",
1213
+ "bbox": [
1214
+ 171,
1215
+ 665,
1216
+ 823,
1217
+ 694
1218
+ ],
1219
+ "page_idx": 10
1220
+ },
1221
+ {
1222
+ "type": "text",
1223
+ "text": "Junhyuk Oh, Satinder Singh, and Honglak Lee. Value prediction network. In NIPS, 2017. ",
1224
+ "bbox": [
1225
+ 169,
1226
+ 702,
1227
+ 764,
1228
+ 718
1229
+ ],
1230
+ "page_idx": 10
1231
+ },
1232
+ {
1233
+ "type": "text",
1234
+ "text": "Razvan Pascanu, Yujia Li, Oriol Vinyals, Nicolas Heess, Lars Buesing, Sebastien Racaniere, David \\` Reichert, Theophane Weber, Daan Wierstra, and Peter Battaglia. Learning model-based planning ´ from scratch. arXiv:1707.06170, 2017. ",
1235
+ "bbox": [
1236
+ 176,
1237
+ 727,
1238
+ 823,
1239
+ 768
1240
+ ],
1241
+ "page_idx": 10
1242
+ },
1243
+ {
1244
+ "type": "text",
1245
+ "text": "Sebastien Racani ´ ere, Th \\` eophane Weber, David Reichert, Lars Buesing, Arthur Guez, Danilo Jimenez ´ Rezende, Adria Puigdom \\` enech Badia, Oriol Vinyals, Nicolas Heess, Yujia Li, Razvan Pascanu, \\` Peter Battaglia, David Silver, and Daan Wierstra. Imagination-augmented agents for deep reinforcement learning. In NIPS, 2017. ",
1246
+ "bbox": [
1247
+ 173,
1248
+ 779,
1249
+ 826,
1250
+ 835
1251
+ ],
1252
+ "page_idx": 10
1253
+ },
1254
+ {
1255
+ "type": "text",
1256
+ "text": "Alvaro Sanchez-Gonzalez, Nicolas Heess, Jost Tobias Springenberg, Josh Merel, Martin Riedmiller, Raia Hadsell, and Peter Battaglia. Graph networks as learnable physics engines for inference and control. In ICML, 2018. ",
1257
+ "bbox": [
1258
+ 174,
1259
+ 843,
1260
+ 823,
1261
+ 886
1262
+ ],
1263
+ "page_idx": 10
1264
+ },
1265
+ {
1266
+ "type": "text",
1267
+ "text": "Connor Schenck and Dieter Fox. Spnets: Differentiable fluid dynamics for deep neural networks. In CoRL, 2018. ",
1268
+ "bbox": [
1269
+ 173,
1270
+ 895,
1271
+ 823,
1272
+ 924
1273
+ ],
1274
+ "page_idx": 10
1275
+ },
1276
+ {
1277
+ "type": "text",
1278
+ "text": "John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv:1707.06347, 2017. \nDavid Silver, Hado van Hasselt, Matteo Hessel, Tom Schaul, Arthur Guez, Tim Harley, Gabriel DulacArnold, David Reichert, Neil Rabinowitz, Andre Barreto, and Thomas Degris. The predictron: End-to-end learning and planning. In ICML, 2017. \nAravind Srinivas, Allan Jabri, Pieter Abbeel, Sergey Levine, and Chelsea Finn. Universal planning networks. In ICML, 2018. \nRuss Tedrake. Underactuated robotics: Learning, planning, and control for efficient and agile machines course notes for mit 6.832, 2009. \nRuss Tedrake and the Drake Development Team. Drake: Model-based design and verification for robotics, 2019. URL https://drake.mit.edu. \nEmanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In IROS, pp. 5026–5033. IEEE, 2012. \nMarc Toussaint, K Allen, K Smith, and J Tenenbaum. Differentiable physics and stable modes for tool-use and manipulation planning. In RSS, 2018. \nSjoerd van Steenkiste, Michael Chang, Klaus Greff, and Jurgen Schmidhuber. Relational neural ¨ expectation maximization: Unsupervised discovery of objects and their interactions. In ICLR, 2018. \nNicholas Watters, Andrea Tacchetti, Theophane Weber, Razvan Pascanu, Peter Battaglia, and Daniel Zoran. Visual interaction networks. In NIPS, 2017. \nJiajun Wu, Erika Lu, Pushmeet Kohli, Bill Freeman, and Josh Tenenbaum. Learning to see physics via visual de-animation. In NIPS, 2017. ",
1279
+ "bbox": [
1280
+ 171,
1281
+ 102,
1282
+ 828,
1283
+ 503
1284
+ ],
1285
+ "page_idx": 11
1286
+ },
1287
+ {
1288
+ "type": "text",
1289
+ "text": "A CONTROL ALGORITHM ",
1290
+ "bbox": [
1291
+ 176,
1292
+ 102,
1293
+ 403,
1294
+ 118
1295
+ ],
1296
+ "page_idx": 12
1297
+ },
1298
+ {
1299
+ "type": "table",
1300
+ "img_path": "images/6dd5c5402986fe4fef668f46b71d9054f5038baea47c9b4d4cb9e854a4523483.jpg",
1301
+ "table_caption": [],
1302
+ "table_footnote": [],
1303
+ "table_body": "<table><tr><td>Algorithm1 Control on Learned Dynamics at Time Step t</td><td></td></tr><tr><td>Input: Learned forward dynamics model Φ</td><td></td></tr><tr><td></td><td>Predicted dynamics graph Gt</td></tr><tr><td>Current dynamics graph Gt</td><td></td></tr><tr><td>Goal Gg, current estimation of the attributes A</td><td></td></tr><tr><td>Current control inputs ut:T</td><td></td></tr><tr><td>States history = {Gi}i=1...t</td><td></td></tr><tr><td>Time horizon T</td><td>Output: Controls üt:T, predicted next time step Gt+1</td></tr><tr><td></td><td></td></tr><tr><td>Update A by descending with the gradients V ALstate(Gt, Gt)</td><td></td></tr><tr><td>Forward simulation using the current graph Gt+1 ← Φ(Gt)</td><td></td></tr><tr><td>fori=t+1,.,T-1do</td><td>Make a buffer for storing the simulation results G ← g U Gt+1</td></tr><tr><td>Forward simulation: Gj+1 ← Φ(Gj); 9 ← GUGj+1 end for</td><td></td></tr><tr><td>Update üt:T by descending with the gradients Vut:rLgoal(9,9g)</td><td></td></tr><tr><td>Return ut:T and Gt+1 ← Φ(Gt)</td><td></td></tr></table>",
1304
+ "bbox": [
1305
+ 171,
1306
+ 137,
1307
+ 805,
1308
+ 410
1309
+ ],
1310
+ "page_idx": 12
1311
+ },
1312
+ {
1313
+ "type": "text",
1314
+ "text": "B GENERALIZATION ON EXTRAPOLATION ",
1315
+ "text_level": 1,
1316
+ "bbox": [
1317
+ 174,
1318
+ 439,
1319
+ 539,
1320
+ 457
1321
+ ],
1322
+ "page_idx": 12
1323
+ },
1324
+ {
1325
+ "type": "text",
1326
+ "text": "We show our model’s performance on fluids, rigid bodies, and deformable objects with a larger number of particles than they have in the training set. Figure 6 shows qualitative and quantitative results. Our model scales up well to larger objects. ",
1327
+ "bbox": [
1328
+ 174,
1329
+ 472,
1330
+ 825,
1331
+ 513
1332
+ ],
1333
+ "page_idx": 12
1334
+ },
1335
+ {
1336
+ "type": "text",
1337
+ "text": "C DATA GENERATION ",
1338
+ "text_level": 1,
1339
+ "bbox": [
1340
+ 176,
1341
+ 534,
1342
+ 372,
1343
+ 551
1344
+ ],
1345
+ "page_idx": 12
1346
+ },
1347
+ {
1348
+ "type": "text",
1349
+ "text": "The data is generated using NVIDIA FleX. We have developed a Python interface for the ease of generating and interacting with different environments. We will release the code upon publication. ",
1350
+ "bbox": [
1351
+ 173,
1352
+ 565,
1353
+ 825,
1354
+ 594
1355
+ ],
1356
+ "page_idx": 12
1357
+ },
1358
+ {
1359
+ "type": "text",
1360
+ "text": "FluidFall. We generated 3,000 rollouts over 120 time steps. The two drops of fluids contain 64 and 125 particles individually, where the initial position of one of the drop in the 3 dimensional coordinates is uniformly sampled between (0.15, 0.55, 0.05) and (0.25, 0.7, 0.15), while the other drop is uniformly sampled between (0.15, 0.1, 0.05) and (0.25, 0.25, 0.15). ",
1361
+ "bbox": [
1362
+ 174,
1363
+ 609,
1364
+ 825,
1365
+ 666
1366
+ ],
1367
+ "page_idx": 12
1368
+ },
1369
+ {
1370
+ "type": "text",
1371
+ "text": "BoxBath. We generated 3,000 rollouts over 150 time steps. There are 960 fluid particles and the rigid cube consist particles ranging between 27 and 150. The fluid particle block is initialized at (0, 0, 0), and the initial position of the rigid cube is randomly initialized between (0.45, -0.0155, 0.02) to (1.2, -0.0155, 0.4). ",
1372
+ "bbox": [
1373
+ 174,
1374
+ 683,
1375
+ 825,
1376
+ 738
1377
+ ],
1378
+ "page_idx": 12
1379
+ },
1380
+ {
1381
+ "type": "text",
1382
+ "text": "FluidShake. We generated 2,000 rollouts over 300 time steps. The height of the box is 1.0 and the thickness of the wall is 0.025. For the initial fluid cuboid, the number of fluid particles is uniformly sampled between 10 and 12 in the $\\mathbf { X }$ direction, between 15 and 20 in the y direction, 3 in the z direction. The box is fixed in the y and z direction, and is moving freely in the $\\mathbf { X }$ direction. We randomly place the initial $\\mathbf { X }$ position between -0.2 to 0.2. The sampling of the speed is implemented as $\\mathbf { v } = \\mathbf { v } + \\operatorname { r a n d } ( - 0 . 1 5 , 0 . 1 5 ) - 0 . 1 \\mathrm { x }$ , in order to encourage motion smoothness and moving back to origin, where speed v is initialized as 0. ",
1383
+ "bbox": [
1384
+ 173,
1385
+ 753,
1386
+ 825,
1387
+ 852
1388
+ ],
1389
+ "page_idx": 12
1390
+ },
1391
+ {
1392
+ "type": "text",
1393
+ "text": "RiceGrip. We generated 5,000 rollouts over 30 time steps. We randomize the size of the initial “rice” cuboid, where the length of the three sides is uniformly sampled between 8.0 and 10.0. The material property parameters clusterStiffness is uniformly sampled between 0.3 and 0.7, clusterPlasticThreshold is uniformly sampled between 1e-5 and 5e-4, and clusterPlasticCreep is uniformly sampled between 0.1 and 0.3. The position of the gripper is randomly sampled within a circle of radius 0.5. The orientation of the gripper is always perpendicular to the line connecting the origin to the center of the gripper and the close distance is uniformly sampled between 0.7 to 1.0. ",
1394
+ "bbox": [
1395
+ 174,
1396
+ 867,
1397
+ 825,
1398
+ 924
1399
+ ],
1400
+ "page_idx": 12
1401
+ },
1402
+ {
1403
+ "type": "image",
1404
+ "img_path": "images/ebd75d52ad6528648e6fd4f662533d19fe23ee6de6cd405f332ce635ccf8c6d2.jpg",
1405
+ "image_caption": [
1406
+ "Figure 6: Extrapolate generalization on fluids, rigid bodies, and deformable objects. The performance is evaluated by the MSE $( \\times 1 0 ^ { - 2 } )$ between the ground truth and rollouts from DPI-Nets. The blue bars denote the range of particle numbers that have been seen during training, which indicate interpolation performance. The red bars indicate extrapolation performance that our model can generalize to cases containing two times more particles than cases it has been trained on. "
1407
+ ],
1408
+ "image_footnote": [],
1409
+ "bbox": [
1410
+ 173,
1411
+ 99,
1412
+ 826,
1413
+ 417
1414
+ ],
1415
+ "page_idx": 13
1416
+ },
1417
+ {
1418
+ "type": "text",
1419
+ "text": "",
1420
+ "bbox": [
1421
+ 174,
1422
+ 523,
1423
+ 825,
1424
+ 580
1425
+ ],
1426
+ "page_idx": 13
1427
+ },
1428
+ {
1429
+ "type": "text",
1430
+ "text": "Of all the generated data, $90 \\%$ of the rollouts are used for training, and the rest $10 \\%$ are used for validation. ",
1431
+ "bbox": [
1432
+ 174,
1433
+ 587,
1434
+ 823,
1435
+ 616
1436
+ ],
1437
+ "page_idx": 13
1438
+ },
1439
+ {
1440
+ "type": "text",
1441
+ "text": "D TRAINING DETAILS ",
1442
+ "text_level": 1,
1443
+ "bbox": [
1444
+ 174,
1445
+ 646,
1446
+ 374,
1447
+ 662
1448
+ ],
1449
+ "page_idx": 13
1450
+ },
1451
+ {
1452
+ "type": "text",
1453
+ "text": "The models are implemented in PyTorch, and are trained using Adam optimizer (Kingma & Ba (2015)) with a learning rate of 0.0001. The number of particles and relations might be different at each time step, hence we use a batch size of 1, and we update the weights of the networks once every 2 forward rounds. ",
1454
+ "bbox": [
1455
+ 174,
1456
+ 684,
1457
+ 825,
1458
+ 741
1459
+ ],
1460
+ "page_idx": 13
1461
+ },
1462
+ {
1463
+ "type": "text",
1464
+ "text": "The neighborhood $d$ is set as 0.08, and the propagation step $L$ is set as 2 for all four environments. For hierarchical modeling, it does not make sense to propagate more than one time between leaves and roots as they are disjoint particle sets, and each propagation stage between them only involves one-way edges; hence $\\phi _ { \\mathrm { L e a f T o L e a f } }$ uses $L = 2$ . $\\phi _ { \\mathrm { L e a f T o R o o t } }$ uses $L = 1$ . $\\phi _ { \\mathrm { R o o t T o R o o t } }$ uses $L = 2$ , and $\\phi$ RootToLeaf uses $L = 1$ . ",
1465
+ "bbox": [
1466
+ 174,
1467
+ 747,
1468
+ 825,
1469
+ 818
1470
+ ],
1471
+ "page_idx": 13
1472
+ },
1473
+ {
1474
+ "type": "text",
1475
+ "text": "For all propagation networks used below, the object encoder $f _ { O } ^ { \\mathrm { e n c } }$ is an MLP with two hidden layers of size 200, and outputs a feature map of size 200. The relation encoder $f _ { R } ^ { \\mathrm { e n c } }$ is an MLP with three hidden layers of size 300, and outputs a feature map of size 200. The propagator $f _ { O }$ and $f _ { R }$ are both MLP with one hidden layer of size 200, in which a residual connection is used to better propagate the effects, and outputs a feature map of size 200. The propagators are shared within each stage of propagation. The motion predictor $f _ { O } ^ { \\mathrm { o u t p u t } }$ is an MLP with two hidden layers of size 200, and output the state of required dimension. ReLU is used as the activation function. ",
1476
+ "bbox": [
1477
+ 173,
1478
+ 824,
1479
+ 825,
1480
+ 924
1481
+ ],
1482
+ "page_idx": 13
1483
+ },
1484
+ {
1485
+ "type": "text",
1486
+ "text": "FluidFall. The model is trained for 13 epochs. The output of the model is the 3 dimensional velocity, which is multiplied by $\\Delta t$ and added to the current position to do rollouts. ",
1487
+ "bbox": [
1488
+ 171,
1489
+ 103,
1490
+ 823,
1491
+ 132
1492
+ ],
1493
+ "page_idx": 14
1494
+ },
1495
+ {
1496
+ "type": "text",
1497
+ "text": "BoxBath. In this environment, four propagation networks are used due to the hierarchical modeling and the number of roots for the rigid cube is set as 8. We have two separate motion predictor for fluids and rigid body, where the fluid predictor output velocity for each fluid particle, while the rigid predictor takes the mean of the signals over all its rigid particles as input, and output a rigid transformation (rotation and translation). The model is trained for 5 epochs. ",
1498
+ "bbox": [
1499
+ 174,
1500
+ 147,
1501
+ 825,
1502
+ 217
1503
+ ],
1504
+ "page_idx": 14
1505
+ },
1506
+ {
1507
+ "type": "text",
1508
+ "text": "FluidShake. Only one propagation network is used in this environment, and the model is trained for 5 epochs. ",
1509
+ "bbox": [
1510
+ 173,
1511
+ 232,
1512
+ 821,
1513
+ 261
1514
+ ],
1515
+ "page_idx": 14
1516
+ },
1517
+ {
1518
+ "type": "text",
1519
+ "text": "RiceGrip. Four propagation networks are used due to the hierarchical modeling, and the number of roots for the “rice” is set as 30. The model is trained for 20 epochs. ",
1520
+ "bbox": [
1521
+ 171,
1522
+ 276,
1523
+ 821,
1524
+ 304
1525
+ ],
1526
+ "page_idx": 14
1527
+ },
1528
+ {
1529
+ "type": "text",
1530
+ "text": "E CONTROL DETAILS ",
1531
+ "text_level": 1,
1532
+ "bbox": [
1533
+ 176,
1534
+ 324,
1535
+ 369,
1536
+ 340
1537
+ ],
1538
+ "page_idx": 14
1539
+ },
1540
+ {
1541
+ "type": "text",
1542
+ "text": "$N _ { \\mathrm { s a m p l e } }$ is chosen as 20 for all three cases, where we sample 20 random control sequences, and choose the best performing one as evaluated using our learned model. The evaluation is based on the Chamfer distance between the controlling result and the target configuration. ",
1543
+ "bbox": [
1544
+ 174,
1545
+ 356,
1546
+ 825,
1547
+ 398
1548
+ ],
1549
+ "page_idx": 14
1550
+ },
1551
+ {
1552
+ "type": "text",
1553
+ "text": "FluidShake. In this environment, the control sequence is the speed of the box along the $\\mathbf { X }$ axis. The method to sample the candidate control sequence is the same as when generating training data of this environment. After selected the best performing control sequence, we first use RMSprop optimizer to optimize the control inputs for 10 iterations using a learning rate of 0.003. We then use model-predictive control to apply the control sequence to the FleX physics engine using Algorithm 1. ",
1554
+ "bbox": [
1555
+ 174,
1556
+ 414,
1557
+ 825,
1558
+ 484
1559
+ ],
1560
+ "page_idx": 14
1561
+ },
1562
+ {
1563
+ "type": "text",
1564
+ "text": "RiceGrip. In this environment, we need to come up with a sequence of grip configurations, where each grip contains positions, orientation, and closing distance. The method to sample the candidate control sequence is the same as when generating training data of this environment. After selected the best performing control sequence, we first use RMSprop optimizer to optimize the control inputs for 20 iterations using a learning rate of 0.003. We then use model-predictive control to apply the control sequence to the FleX physics engine using Algorithm 1. ",
1565
+ "bbox": [
1566
+ 174,
1567
+ 500,
1568
+ 825,
1569
+ 583
1570
+ ],
1571
+ "page_idx": 14
1572
+ },
1573
+ {
1574
+ "type": "text",
1575
+ "text": "RiceGrip in Real World. In this environment, we need to come up with a sequence of grip configurations, where each grip contains positions, orientation, and closing distance. The method to sample the candidate control sequence is the same as when generating training data of RiceGrip, and $N _ { \\mathrm { f i l l } }$ is chosen as 768. Different from the previous case, the physical parameters are always unknown and has to be estimated online. After selected the best performing control sequence, we first use RMSprop optimizer to optimize the control inputs for 20 iterations using a learning rate of 0.003. We then use model-predictive control to apply the control sequence to the real world using Algorithm 1. ",
1576
+ "bbox": [
1577
+ 174,
1578
+ 598,
1579
+ 825,
1580
+ 696
1581
+ ],
1582
+ "page_idx": 14
1583
+ }
1584
+ ]
parse/train/rJgbSn09Ym/rJgbSn09Ym_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rJgbSn09Ym/rJgbSn09Ym_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rJxXDsCqYX/rJxXDsCqYX.md ADDED
@@ -0,0 +1,288 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SENTENCE ENCODING WITH TREE-CONSTRAINED RELATION NETWORKS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ The meaning of a sentence is a function of the relations that hold between its words. We instantiate this relational view of semantics in a series of neural models based on variants of relation networks (RNs) which represent a set of objects (for us, words forming a sentence) in terms of representations of pairs of objects. We propose two extensions to the basic RN model for natural language. First, building on the intuition that not all word pairs are equally informative about the meaning of a sentence, we use constraints based on both supervised and unsupervised dependency syntax to control which relations influence the representation. Second, since higher-order relations are poorly captured by a sum of pairwise relations, we use a recurrent extension of RNs to propagate information so as to form representations of higher order relations. Experiments on sentence classification, sentence pair classification, and machine translation reveal that, while basic RNs are only modestly effective for sentence representation, recurrent RNs with latent syntax are a reliably powerful representational device.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Sentence representations play a crucial role in many NLP tasks, including sentiment analysis, paraphrase detection, entailment recognition, summarisation, and machine translation. Popular approaches for encoding sentences compose words using recurrent units (Cho et al., 2014; Sutskever et al., 2014) or convolutions (Kalchbrenner et al., 2014; Kim, 2014). A series of papers has also explored improving sentence representations by incorporating structural information into the encoders, including both supervised syntactic information (Tai et al., 2015; Bowman et al., 2016; Ma et al., 2015; Socher et al., 2013), and unsupervised syntax where the structure is learned to maximise task performance (Yogatama et al., 2017; Choi et al., 2017).
12
+
13
+ We approach the problem of sentence representation starting from the insight that the meaning of a sentence is an aggregation of the set of relations that hold between words. For example, in the simple sentence “John saw Mary”, most of the semantics is captured by knowing that “John is doing seeing” and that “Mary is what is being seen”. Treating sentences as a conjunction of simple relational predicates has been influential in both formal semantics (Copestake et al., 2005) and roll-filler computational models of semantics (Smolensky, 1990). While the prior sentence representation architectures discussed above can implicitly discover and represent such relational facts, the recently proposed relation networks model (Santoro et al., 2017, RNs) lets us work with them more directly.
14
+
15
+ RNs represent a set of objects by aggregating representations of pairwise relations of all pairs of objects. For sentence representation, the “set” we seek to represent is a sentence, and the objects are words. There are two problems with this setup, and we develop extensions of RNs to address these shortcomings (§3). First, RNs assume equal contributions from all pairs of objects. In unstructured sets, this uniformity is justified, but sentences are structured sequences, not unstructured sets, and intuitively the relationship between some word pairs is more meaningful than the relationship between others. To address this structural deficiency, we extend RNs to be sensitive to pairwise attachment information based on a dependency tree structure. Our formulation lets us either use dependency trees obtained from external parsers, or learn trees as latent variables so as to optimise task performance. Tree learning is tractable in this model because we exploit the fact that RNs operate on representations of pairs of words, and we can efficiently obtain marginal probabilities of attachment decisions (i.e., word pairs) in pair-factored parsing models using Kirchoff’s matrix tree theorem (Tutte, 1984; Koo et al., 2007; Liu & Lapata, 2017). A second objection to RNs is that they aggregate representations of pairs, but the meaning of a sentence may require understanding higher-order relational information (i.e., trees can be deeply nested). To enable representations that can directly capture the salient aspects of higher-order relations, we use recurrent RNs (Palm et al., 2017), but again augmented with supervised or latent dependency trees.
16
+
17
+ We carefully evaluate and analyse different versions of our RN-based models on machine translation and three text classification tasks, namely textual entailment, question type classification, and duplicate question detection (§4). Our experimental results demonstrate that in general sentence encoders based on recurrent RNs outperform those based on vanilla RNs, and models with latent tree constraints mostly achieve better performance than their supervised counter-parts. Overall, our models outperform sentence encoders based on birectional LSTMs and those incorporating an intra-sentence attention mechanism.
18
+
19
+ # 2 BACKGROUND
20
+
21
+ Relations networks (Santoro et al., 2017) are designed to model relational reasoning. Neural networks augmented with RNs have achieved success across various tasks such as visual question answering and text-based question answering on the bAbI suite of tasks, on which even models with sophisticated architecture could not obtain satisfactory results due to the requirement for complex relational inference. An RN is formalised as
22
+
23
+ $$
24
+ \mathrm { R N } ( O ) = f _ { \phi } \left( \sum _ { i , j } g _ { \theta } ( \mathbf { o } _ { i } , \mathbf { o } _ { j } ) \right) ,
25
+ $$
26
+
27
+ where the input is a set of “objects” $O = \{ \mathbf { o } _ { 1 } , \mathbf { o } _ { 2 } , \dots , \mathbf { o } _ { n } \}$ , $\mathbf { o } _ { i } \in \mathbb { R } ^ { d }$ , and $f$ and $g$ are functions parameterised by $\phi$ and $\theta$ using feed-forward neural networks (MLPs). The function $g _ { \boldsymbol { \theta } }$ computes the relatedness of two objects $\mathbf { o } _ { i }$ and $\mathbf { o } _ { j }$ . RNs aggregate the relations between all the pairs of objects via the summation operation in Eq. 1. The embeddings of objects $\mathbf { o } _ { i }$ and $\mathbf { o } _ { j }$ differ depending on the task and the nature of the objects to be compared.
28
+
29
+ Although RNs perform well on problems that require basic relational reasoning, they are sub-optimal for tasks that demand multiple steps of reasoning as only pair-wise relational operations are involved. To address this limitation, Palm et al. (2017) proposed a recurrent variant for RNs, denoted as recurrent RNs, and demonstrated the model’s ability for multi-step reasoning, which is essential for the tasks they studied, namely Sudoku and question answering. Recurrent RNs are formulated as follows:
30
+
31
+ $$
32
+ \mathbf { m } _ { i } ^ { t } = \sum _ { j } g _ { \theta } ( \mathbf { h } _ { j } ^ { t - 1 } , \mathbf { h } _ { i } ^ { t - 1 } ) , \ \mathbf { h } _ { i } ^ { t } = f _ { \phi } \left( \mathbf { h } _ { i } ^ { t - 1 } , \mathbf { o } _ { i } , \mathbf { m } _ { i } ^ { t } \right) .
33
+ $$
34
+
35
+ At timestep $t$ , $\mathbf { h } _ { i } ^ { t }$ is the hidden state vector corresponding to the $i$ -th object. In addition to the previous hidden state $\mathbf { h } _ { i } ^ { t - 1 }$ and the input $\mathbf { o } _ { i }$ , it also takes into account the message $\mathbf { m } _ { i } ^ { t }$ , which summarises relations between the $i$ -th object and all its neighbours (e.g. all objects in the simplest form) in the previous timestep $t - 1$ . The number of recurrent steps is a hyperparameter, where higher values allow the modelling of longer chains of relations. In the standard setting, the vector $\mathbf { o } _ { i }$ encodes timestep invariant information, such as position and ordering, and $g _ { \theta }$ and $f _ { \phi }$ are parameterised as MLPs and LSTMs (Hochreiter & Schmidhuber, 1997), respectively. In this architecture, the recurrent dependencies accumulate information of relations enabling multi-step reasoning.
36
+
37
+ # 3 MODELS
38
+
39
+ A straightforward application of RNs for sentence representation is to treat words as objects and consider all relations between pairs of words in a sentence following Eq. 1. Intuitively, this approach is unappealing as not all direct links between pairs of words are equally important. Thus, we propose to use a dependency grammar as a constraint in RNs and argue that the relations considered in the model should comply with a valid dependency tree structure. In the vanilla RNs, this means that the aggregations will operate on the subset of relations that form a valid tree (§3.1) and in the recurrent RNs, we want the messages (Eq. 2) only coming from the syntactical neighbours of the node corresponding to a consistent tree structure across different timesteps (§3.2). In a supervised setting we use an off the shelf parser to generate trees for all sentences. In an unsupervised setting, we model them as latent variables.
40
+
41
+ # 3.1 RNS WITH TREE CONSTRAINTS
42
+
43
+ Let $\pmb { x } = [ x _ { 1 } , x _ { 2 } , \dots , x _ { n } ]$ denote a sentence, where $x _ { i }$ represents the $i$ -th word in the sentence. Let ${ \pmb y } ^ { * }$ denote a directed dependency tree, which is represented by a set of head-modifier index tuples $( h , m )$ .1 To incorporate syntactic information, we modify Eq. 1 by restricting the summation function to span over $( h , m ) \in { \pmb y } ^ { * }$ :
44
+
45
+ $$
46
+ \mathbf { s } = f _ { \phi } \left( \sum _ { ( h , m ) \in y ^ { * } } g _ { \theta } ( \mathbf { o } _ { h } , \mathbf { o } _ { m } ) \right) ,
47
+ $$
48
+
49
+ where s denotes the vector representation of the sentence $_ { \textbf { \em x } }$ , and $\mathbf { o } _ { h }$ and $\mathbf { o } _ { m }$ are embeddings corre sponding to the head word $x _ { h }$ and the modifier word $x _ { m }$ , respectively.
50
+
51
+ To enable task-optimal trees to be learned we introduce a distribution over trees given the sentence, $p _ { \psi } ( \pmb { y } \mid \pmb { x } )$ , and rewrite Eq. 3 in terms of expectations under this distribution:
52
+
53
+ $$
54
+ \mathbf { s } = f _ { \phi } \left( \sum _ { \pmb { y } \in \mathscr { V } ( \pmb { x } ) } p _ { \psi } ( \pmb { y } \mid \pmb { x } ) \sum _ { ( h , m ) \in \pmb { y } } g _ { \theta } ( \mathbf { o } _ { h } , \mathbf { o } _ { m } ) \right) ,
55
+ $$
56
+
57
+ where $\mathcal { V } ( \pmb { x } )$ denotes the set of dependency trees for a sentence $_ { \textbf { \em x } }$ . Because the inner loop depends only on $( h , m )$ pairs and the linearity of expectation, we can rewrite this in terms of the marginal edge probabilities $\begin{array} { r } { p _ { \psi } ( h m \mid x ) = \sum _ { y \in \mathcal { V } ( \pmb { x } ) } p _ { \psi } ( \pmb { y } \mid \pmb { x } ) [ ( h , m ) \in y ] } \end{array}$ , where $[ q ] = 1$ if $q$ is true and 0 otherwise. This becomes
58
+
59
+ $$
60
+ { \bf s } = f _ { \phi } ( \sum _ { ( h , m ) \in \mathcal { D } ( { \pmb x } ) } p _ { \psi } ( h m \mid { \pmb x } ) g _ { \theta } ( { \bf o } _ { h } , { \bf o } _ { m } ) ) ,
61
+ $$
62
+
63
+ where $\mathcal { D } ( \pmb { x } )$ denote all possible dependencies arcs for a sentence $_ { \textbf { \em x } }$ : ${ \mathcal { D } } ( { \boldsymbol { \mathbf { x } } } ) ~ = ~ \{ ( h , m ) ~ | ~ h ~ \in$ $[ 0 \ldots n ] , m \in [ 1 \ldots n ] \}$ .
64
+
65
+ Fortunately, the required attachment marginals can be calculated efficiently in $O ( n ^ { 3 } )$ using Kirchhoff’s matrix-tree theorem (Tutte, 1984), provided the conditional tree probability is a conditional random field with potentials that only look at a single pair of nodes at a time (Koo et al., 2007; Smith & Smith, 2007; Liu & Lapata, 2017). Although this restriction on the potential functions may seem limiting (the model cannot look at higher order dependency structures when assigning probability to the tree), representations derived from neural networks employing such models can produce state-of-the-art supervised dependency parsers (Dozat & Manning, 2017), suggesting this is an acceptable restriction.
66
+
67
+ For our model, we define the potential associated with an edge using a bilinear form (Ma & Hovy, 2017),
68
+
69
+ $$
70
+ \boldsymbol { \Psi } ( h , m ) = e ^ { \mathbf { o } _ { h } ^ { T } \mathbf { W } \mathbf { o } _ { m } + \mathbf { U } ^ { T } \mathbf { o } _ { h } + \mathbf { V } ^ { T } \mathbf { o } _ { m } + b } ,
71
+ $$
72
+
73
+ where $\mathbf { o } _ { i }$ denotes the BiLSTM output corresponding to the input word $x _ { i }$ ; $\mathbf { W }$ , U, $\mathbf { V }$ are weight matrices, and $b$ is the bias term.
74
+
75
+ Structured intra-sentence attention For many applications, it is useful to represent each word in the sentence in terms of its context in the surrounding sentence. While simple mechanisms like bidirectional RNNs can produce satisfactory results (Bahdanau et al., 2015), attention-based word-in-context representations have received increasing interest (Vaswani et al., 2017), including those that impose structural constraints on attention (Liu & Lapata, 2017; Kim et al., 2017). Our tree-constrained RN can likewise be used to construct word-in-context representations. Intuitively, we create a contextualised representation for each word by aggregating information from its possible parents and children according to their attachment marginal probability. These context vectors and word vectors can either be operated on by models that require them or pooled over to generate a sentence representation.
76
+
77
+ For RNs with supervised tree constraints, we define the context vector for the word $x _ { i }$ in terms of the representation of the relation between $x _ { i }$ and its parent $x _ { h }$ , i.e., $\mathbf { r } _ { i } = f _ { \phi } ( g _ { \theta } ( \mathbf { o } _ { h } , \mathbf { o } _ { i } ) )$ .
78
+
79
+ For latent tree RNs, the context vector for each word $x _ { i }$ contains two components: a weighted sum of relations between $x _ { i }$ and its parents, and a weighted sum of relations between $x _ { i }$ and its children:
80
+
81
+ $$
82
+ \mathbf { \boldsymbol { \mathsf { \mathsf { \mathsf { \Pi } } } } } _ { i } = \int _ { \phi } \left( \sum _ { h = 1 } ^ { n } p _ { \psi } ( h \to i | x ) g _ { \theta } ( \mathbf { \boldsymbol { \mathsf { o } } } _ { h } , \mathbf { \boldsymbol { \mathsf { \mathsf { o } } } } _ { i } ) \right) , \mathbf { \boldsymbol { \mathsf { \mathsf { \mathbf { c } } } } } _ { i } = \int _ { \phi } \left( \sum _ { m = 1 } ^ { n } p _ { \psi } ( i \to m | x ) g _ { \theta } ( \mathbf { \boldsymbol { \mathsf { o } } } _ { i } , \mathbf { \boldsymbol { \mathsf { \mathbf { o } } } } _ { m } ) \right) , \mathbf { \boldsymbol { \mathsf { \mathbf { r } } } } _ { i } = [ \mathbf { \boldsymbol { \mathsf { p } } } _ { i } ; \mathbf { \boldsymbol { \mathsf { \mathbf { c } } } } _ { i } ] .
83
+ $$
84
+
85
+ Finally, the $\mathbf { r } _ { i }$ ’s are concatenated with the original object representations and transformed into the final contextual word representations: $\mathbf { s } _ { i } = \operatorname { t a n h } ( \mathbf { W } _ { r } ^ { T } [ \mathbf { r } _ { i } \ ; \ \mathbf { o } _ { i } ^ { \star } ] )$ .
86
+
87
+ For applications where a single vector is required, a subsequent pooling operation is applied to the sequence of vectors $\left[ \mathbf { s } _ { 1 } , \mathbf { s } _ { 2 } , \ldots , \mathbf { s } _ { n } \right]$ to generate an alternative representation of a sentence s. We discuss the pooling operations used below (§4 and $\ S \mathbf { A . l }$ ).
88
+
89
+ In our model, the context vectors are computed from the representations of word pairs (i.e., components of RNs), whereas in the related prior work of Liu & Lapata (2017) and Kim et al. (2017), they are the expected value of LSTM hidden state vectors under structured attention distributions.
90
+
91
+ # 3.2 RECURRENT RNS WITH TREE CONSTRAINTS
92
+
93
+ The models described in the previous sections are based on vanilla RNs which aggregate only single pairs of words. Since language can have deeply nested structures, even if an RN can faithfully represent the contents of sentence, the representation may not represent important higher order dependencies in a convenient form. To deal with this limitation, we augment recurrent RNs with tree constraints. In this model, information is propagated along the edges in the (possibly latent) tree structure associated with each sentence during the construction of the representation.
94
+
95
+ We provide two variants of recurrent RNs, one for supervised trees and the other for latent trees. With supervised trees, the message of an object at each timestep comes only from its parent in the given dependency parse. Formally, let ${ \pmb y } ^ { * }$ denote the given parse tree,2
96
+
97
+ $$
98
+ \mathbf { m } _ { i } ^ { t } = \sum _ { ( h , i ) \in \pmb { y } ^ { * } } g _ { \theta } ( \mathbf { h } _ { h } ^ { t - 1 } , \mathbf { h } _ { i } ^ { t - 1 } ) , \mathbf { h } _ { i } ^ { t } = f _ { \phi } ( \mathbf { h } _ { i } ^ { t - 1 } , [ \mathbf { o } _ { i } ; \mathbf { m } _ { i } ^ { t } ] ) ,
99
+ $$
100
+
101
+ In the unsupervised setting, where the tree structure is latent, the messages from neighbours could include those from all the possible parents or children or both.3 We include both messages here:
102
+
103
+ $$
104
+ \begin{array} { l } { { { \bf m } _ { i } ^ { t , p } = \displaystyle \sum _ { h = 1 } ^ { n } p _ { \psi } ( h i \mid x ) g _ { \theta } ( { \bf h } _ { h } ^ { t - 1 } , { \bf h } _ { i } ^ { t - 1 } ) , { \bf m } _ { i } ^ { t , c } = \displaystyle \sum _ { m = 1 } ^ { n } p _ { \psi } ( i m \mid x ) g _ { \theta } ( { \bf h } _ { i } ^ { t - 1 } , { \bf h } _ { m } ^ { t - 1 } ) , } } \\ { { { \bf h } _ { i } ^ { t } = f _ { \phi } ( { \bf h } _ { i } ^ { t - 1 } , [ { \bf o } _ { i } ; { \bf m } _ { i } ^ { t , p } ; { \bf m } _ { i } ^ { t , c } ] ) . } } \end{array}
105
+ $$
106
+
107
+ The tree probabilities remain fixed across the different timesteps of the recurrent RN, ensuring that multi-step reasoning operates on a consistent tree structure. The initial hidden representation of each object ${ \bf h } _ { i } ^ { 1 }$ is set to $\mathbf { o } _ { i }$ . Finally, we pool over the hidden state vectors of the last timestep $T$ for sentence representations, or make them available as word-in-context representations.
108
+
109
+ # 4 EXPERIMENTS
110
+
111
+ We examine the effectiveness of our sentence representation models on three sentence classification tasks: textual entailment, question type classification, and paraphrase detection. We further use attention-based machine translation to test our proposed methods’ word-in-context representations. We refer the readers to $\ S \mathrm { A } . 1$ for implementation details.
112
+
113
+ # 4.1 SENTENCE CLASSIFICATION
114
+
115
+ In our experiments, we use the Stanford Natural Language Inference (SNLI), Quora duplicate question detection, and TREC question type classification datasets.
116
+
117
+ Stanford natural language inference Given a premise and hypothesis pair $( \pmb { x } _ { 1 } , \pmb { x } _ { 2 } )$ , the task in SNLI is to predict whether their relationship is entailment, contradiction, or neutral. The dataset consists of 550k, 10k, and 10k sentences for training, development, and test set, respectively (Bowman et al., 2015).
118
+
119
+ Quora duplicate question detection The dataset4 contains sentence pairs mined from questions that people asked on Quora. The task is to identify whether a question is a duplicate of another. We follow the data splits by Wang et al. (2017), having $4 0 0 \mathrm { k } / 1 0 \mathrm { k } / 1 0 \mathrm { k }$ for train/dev/test dataset.
120
+
121
+ TREC question type classification The task (Li & Roth, 2002) is to classify open-domain, factoid questions into six categories: abbreviation, entity, description, human, location, and numeric value. The dataset is composed of $5 . 5 \mathrm { k }$ examples in the training dataset and 500 examples in the test set. We randomly sample 500 examples from the training set for validation and leave the rest for training.
122
+
123
+ Classification model In these classification tasks, we calculate the probability distribution of labels as follows: $p ( Y \mid { \bf q } ) = \mathrm { s o f t m a x } ( { \bf W } _ { q } ^ { T } \phi ( { \bf q } ) + { \bf b } _ { q } )$ , where the function $\phi$ is an MLP with 1 hidden layer. For question type classification, the vector q is simply the sentence representation s. For the other tasks which classify pairs of sentences $( \pmb { x } _ { 1 } , \pmb { x } _ { 2 } )$ , $\mathbf { q }$ is obtained by concatenating the following vectors: the representations of the two input sentences $\mathbf { s } ^ { \pmb { x } _ { 1 } }$ and $\mathbf { s } ^ { x _ { 2 } }$ , element-wise product $\mathbf { s } ^ { \mathbf { x } _ { 1 } } \odot \mathbf { s } ^ { \mathbf { x } _ { 2 } }$ , and absolute element-wise difference $| \mathbf { s } ^ { \pmb { x } _ { 1 } } - \mathbf { s } ^ { \pmb { x } _ { 2 } } |$ (Tai et al., 2015; Bowman et al., 2016).
124
+
125
+ Classification results Tables 1a, 1b, and 2a summarise the results of our RN-based models for the three text classification tasks. We also include three baselines, namely the bag-of-words model (BoW), the BiLSTM encoder with $\operatorname* { m a x } ^ { 5 }$ pooling layer, and a re-implementation of the structured intra-sentence attention model of Liu & Lapata (2017).6 The models with an intra-sentence attention mechanism perform on par or better than the vanilla RNs; and on average those based on recurrent RNs achieve the best results across all datasets. Tree constraints add little value to vanilla RNs. Given that the underlying RN formulation fails, it is unsurprising that tree constraints do not add value (since adding tree constraints is simply adding a probability distribution to the underlying RN architecture). RNs become more effective when we address the bottleneck of simple aggregation of relations by introducing the intra-sentence attention mechanism. In this case, tree constraints reliably begin to work. Finally, we find that models with latent trees outperform those with supervised trees, supporting the patterns of results found across a range of models explored in prior work (Williams et al., 2017; Yogatama et al., 2017; Choi et al., 2017).
126
+
127
+ For SNLI, compared to the published results from other sentence encoding-based models,7 our best model achieve slightly better results than the model by Choi et al. (2017), which encodes sentences with a TreeLSTM (Tai et al., 2015) and learns a latent tree using the Gumbel-softmax (Jang et al., 2016). Our model is slightly outperformed by the very recent model of Shen et al. (2018) that encode sentences using a hybrid of hard and soft attention mechanisms.
128
+
129
+ Table 1: (a). Results on SNLI. The LSTM encoder and SPIINN-PI refer to Bowman et al. (2016). The results of BiLSTM with max-pooling, Gumbel TreeLSTM encoder, reinforced self-attention are obtained from Conneau et al. (2017); Choi et al. (2017) and Shen et al. (2018), respectively. (b). Results on Quora duplicate questions detection. BiMPM and pt-DECATT $( ^ { * } )$ incorporate complex mechanism for mapping sentences; and the remainder of the models are sentence-encoding models.
130
+
131
+ <table><tr><td>System</td><td>Acc.</td></tr><tr><td>Publishedmodels</td><td></td></tr><tr><td>300DLSTM encoder</td><td>80.6</td></tr><tr><td>300D SPINN-PI encoder</td><td>83.2</td></tr><tr><td>4096D BiLSTM with maX-pooling 300D Gumbel TreeLSTMencoder</td><td>84.5</td></tr><tr><td>300DReinforced self-attention</td><td>85.6</td></tr><tr><td></td><td>86.3</td></tr><tr><td>Baselines</td><td></td></tr><tr><td>BoW</td><td>77.9</td></tr><tr><td>BiLSTM with max pooling</td><td>85.1</td></tr><tr><td>Structured attention</td><td>84.5</td></tr><tr><td>Our models</td><td></td></tr><tr><td>RNs + no tree</td><td>84.1</td></tr><tr><td>RNs + supervised tree</td><td>83.7</td></tr><tr><td>RNs + latent tree</td><td>83.6</td></tr><tr><td>RNs intra-attn + no tree</td><td>84.0</td></tr><tr><td>RNs intra-attn + supervised tree</td><td>84.7</td></tr><tr><td>RNs intra-attn +latent tree</td><td>85.2</td></tr><tr><td>Recurrent RNs + supervised tree</td><td>85.2</td></tr><tr><td>Recurrent RNs +latent tree</td><td>85.7</td></tr><tr><td></td><td></td></tr></table>
132
+
133
+ <table><tr><td>System</td><td>Acc.</td></tr><tr><td>Published models CNN (Wang et al., 2017) LSTM (Wang et al., 2017) GRU (Nicosia &amp; Moschitti, 2017)</td><td>79.6 82.6 86.8</td></tr><tr><td>*BiMPM (Wang et al., 2017) *pt-DECATT (Tomar et al., 2017) Baselines BoW</td><td>88.2 88.4 81.3</td></tr><tr><td>BiLSTM with max pooling Structured attention</td><td>86.8 86.8</td></tr><tr><td>Our models RNs + no tree</td><td></td></tr><tr><td>RNs + supervised tree</td><td>86.4 86.7</td></tr><tr><td>RNs +latent tree RNs intra-attn + no tree</td><td>87.0</td></tr><tr><td>RNs intra-attn + supervised tree RNs intra-attn + latent tree Recurrent RNs + supervised tree</td><td>85.9 87.2 87.4</td></tr></table>
134
+
135
+ On Quora duplicate question detection, our models outperform the CNN and LSTM baselines presented in previous work by a large margin. The results produced by our best model is close to BiMPM (Wang et al., 2017) and pt-DECATT (Tomar et al., 2017), which incorporate complex inter-sentence attention during sentence encoding.
136
+
137
+ # 4.2 MACHINE TRANSLATION
138
+
139
+ To further evaluate the effectiveness of RNs on text processing, we apply our models to machine translation. In the standard seq2seq model with attention (Bahdanau et al., 2015), the output of the encoder is a sequence of annotation vectors, which is the concatenation of the output of a BiLSTM at each timestep. These vectors are then used to derive the context vectors that are used by the decoder to predict the output tokens. We adapt the standard attentive seq2seq model by replacing the annotation vectors with the sequence of vectors $\left[ \mathbf { s } _ { 1 } , \mathbf { s } _ { 2 } , \ldots , \mathbf { s } _ { n } \right]$ , comparing the intra-sentence attention (§3.1) or the recurrent RN (§3.2) definitions of these.
140
+
141
+ We experiment on Chinese–English and English–Vietnamese machine translation tasks here in order to evaluate our models’ capability of capturing syntactic information of sentences. For Chinese– English, we use parallel data with $1 8 4 \mathbf { k }$ sentence pairs from the FBIS corpus (LDC2003E14). The training set is preprocessed in the same way as that in $\mathrm { Y u }$ et al. (2017). For English–Vietnamese, the dataset that we evaluate on is IWSLT 2015, containing 133k training sentence pairs obtained from scripts of TED talks. We follow prior work on dataset split and data preprocessing (Luong & Manning, 2015; Huang et al., 2018).
142
+
143
+ Table 2b shows the results of our models in comparison with standard attention based benchmarks (Bahdanau et al., 2015) and published models. While in classification tasks, recurrent RNs and latent trees work best, in translation, flat RNs with latent trees work best. We suggest that this is due to the nature of the translation task, which can be accomplished by having a good representation of each word in context.
144
+
145
+ ![](images/9b28bc538a7a79a87102dbfd2ea0d7d4537f549f9a92aca5f8fc6b9e21393a58.jpg)
146
+ Figure 1: Parse trees induced by our RN-based models and trees given by the dependency parser. The discussion of these trees is presented in $\ S 5$ .
147
+
148
+ # 5 ANALYSIS
149
+
150
+ To understand the behavior of different RN-based models, we select a few examples to examine different types of errors they made, and inspect the learned latent dependency parse trees. Figure 1 shows the parse trees learned by RN-based models with latent tree constraints. These trees are maximum spanning trees obtained from Chu-Liu-Edmonds algorithm (Chu & Liu, 1965; Edmonds, 1967) over the scores of word pairs (Eq. 4). We observe that the induced trees are optimised for different tasks and generally are not as linguistically intuitive as those produced by a dependency parser trained in a supervised fashion. For question type classification, the type of a question can usually be decided by one or two words. Therefore the learned trees are intended to have the key words as roots that are depended on by all the other words. For example, in Fig. 1a, the word where completely determines the type of the question Where is the Orinoco River? to be location and it serves as the root of the learned tree. For SNLI, the dependencies in the learned trees (Fig. 1b) are less focused on a few words, probably due to the fact that a precise judgment for entailment requires the accumulation of information over the entire sentence.
151
+
152
+ The learned trees, although not necessarily linguistically plausible, tend to have direct connections between words whose relations are crucial for the down-stream task. As an example, consider the sentence pair from SNLI:
153
+
154
+ A man uses a projector to give a presentation. A man is using a projector to watch television.
155
+
156
+ Fig. 1c shows the tree of the premise induced by the model ‘RNs intra-attn $^ +$ latent tree’. The word presentation is directly linked to the word projector, and this dependency helps the model to realise that the projector is used for a presentation rather than watching TV, and therefore predict their relationship as contradiction. By contrast, as shown in Fig. 1d, there are multiple hops between these two words in the parse tree given by an external parser. The model ‘RNs intra-attn $^ +$ supervised tree’, which is based on this parse, fails to yield the correct answer.
157
+
158
+ In contrast, Fig. 1e and 1f illustrate an example where the models with latent trees failed but supervised trees were successful. In this case, the latent model has drawn attention to what, which is generally a good strategy for this task, but in this case the restrictor birthday carries the crucial evidence that the answer is number.
159
+
160
+ Comparing the output of vanilla RNs and recurrent RNs (both with tree constraints), we find that recurrent RNs are better at capturing multi-step inference. For instance, to decide the type of the question What is the statue of liberty made of? the model should capture the relations between What and statue of liberty, statue of liberty and made, made and of. While recurrent RNs classify its type correctly (as entity), vanilla RNs misclassify it as description, which would be the type of the prefix What is the statue of liberty.
161
+
162
+ # 6 RELATED WORK
163
+
164
+ In sentence encoders, standard neural-network architectures for composing word embeddings are convolutional neural networks (CNNs) (Kalchbrenner et al., 2014; Kim, 2014), and LSTMs (Conneau et al., 2017). However, there has been considerable effort in embedding tree structure to modulate the behavior of encoders (Bowman et al., 2016; Tai et al., 2015; Socher et al., 2013). More recently, a series of work has developed methods for learning custom tree structures to optimise downstream performance (Yogatama et al., 2017; Maillard et al., 2017; Choi et al., 2017).
165
+
166
+ The intra-sentence attention mechanism we used in our model was introduced by Cheng et al. (2016); Parikh et al. (2016). Subsequently, Liu & Lapata (2017) and Kim et al. (2017) added structural biases to the attention, making them induce latent dependency trees.
167
+
168
+ Our model encodes sentences by explicitly computing the relations between words in a sentence. Another type of model that involves relation-centric computation is graph convolutional networks (Kipf & Welling, 2017), which have been applied to the tasks of semantic role labelling (Marcheggiani & Titov, 2017), machine translation (Bastings et al., 2017), and knowledge base completion (Schlichtkrull et al., 2017).
169
+
170
+ # 7 CONCLUSION
171
+
172
+ In this paper we developed a new strategy for encoding sentences based on two extensions to relation networks (Santoro et al., 2017; Palm et al., 2017) that help them represent structured sentences by using dependency tree information, and that help them represent higher-order relations using an iterative message passing approach to computing representations. These enhancements significantly improve the quality of relation-based representation across a variety of tasks, and make them comparable to best existing encoders.
173
+
174
+ # REFERENCES
175
+
176
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In Proceedings of ICLR, 2015.
177
+
178
+ Joost Bastings, Ivan Titov, Wilker Aziz, Diego Marcheggiani, and Khalil Sima’an. Graph convolutional encoders for syntax-aware neural machine translation. In Proceedings of EMNLP, 2017.
179
+
180
+ Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. A large annotated corpus for learning natural language inference. In Proceedings of EMNLP, 2015.
181
+
182
+ Samuel R. Bowman, Jon Gauthier, Abhinav Rastogi, Raghav Gupta, Christopher D. Manning, and Christopher Potts. A fast unified model for parsing and sentence understanding. In Proceedings of ACL, 2016.
183
+
184
+ Jianpeng Cheng, Li Dong, and Mirella Lapata. Long short-term memory-networks for machine reading. In Proceedings of EMNLP, 2016.
185
+
186
+ Kyunghyun Cho, Bart van Merrienboer, C¸ aglar Gul¨ c¸ehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In Proceedings of EMNLP, 2014.
187
+
188
+ Jihun Choi, Kang Min Yoo, and Sang goo Lee. Learning to compose task-specific tree structures. In Proceedings of AAAI, 2017.
189
+
190
+ Yoeng-Jin Chu and Tseng-Hong Liu. On the shortest arborescence of a directed graph. Science Sinica, 14:1396–1400, 1965.
191
+
192
+ Jonathan H. Clark, Chris Dyer, Alon Lavie, and Noah A. Smith. Better hypothesis testing for statistical machine translation: Controlling for optimizer instability. In Proceedings of ACL-HLT, 2011.
193
+
194
+ Alexis Conneau, Douwe Kiela, Holger Schwenk, Lo¨ıc Barrault, and Antoine Bordes. Supervised learning of universal sentence representations from natural language inference data. In Proceedings of EMNLP, 2017.
195
+
196
+ Ann Copestake, Dan Flickinger, Carl Pollard, and Ivan A. Sag. Minimal recursion semantics: An introduction. Research on Language and Computation, 2–3(3):281–332, 2005.
197
+
198
+ Timothy Dozat and Christopher D. Manning. Deep biaffine attention for neural dependency parsing. In Proceedings of ICLR, 2017.
199
+
200
+ John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12(Jul):2121–2159, 2011.
201
+
202
+ Jack Edmonds. Optimum branchings. Journal of Research of the National Bureau of Standards B, 71 (4):233–240, 1967.
203
+
204
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
205
+
206
+ Po-Sen Huang, Chong Wang, Sitao Huang, Dengyong Zhou, and Li Deng. Towards neural phrasebased machine translation. In Proceedings of ICLR, 2018.
207
+
208
+ Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144, 2016.
209
+
210
+ Nal Kalchbrenner, Edward Grefenstette, and Phil Blunsom. A convolutional neural network for modelling sentences. In Proceedings of ACL, 2014.
211
+
212
+ Yoon Kim. Convolutional neural networks for sentence classification. In Proceedings of EMNLP, 2014.
213
+
214
+ Yoon Kim, Carl Denton, Luong Hoang, and Alexander M Rush. Structured attention networks. In Proceedings of ICLR, 2017.
215
+
216
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
217
+
218
+ Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In Proceedings of ICLR, 2017.
219
+
220
+ Lingpeng Kong, Chris Alberti, Daniel Andor, Ivan Bogatyy, and David Weiss. DRAGNN: A transition-based framework for dynamically connected neural networks. March 2017.
221
+
222
+ Terry Koo, Amir Globerson, Xavier Carreras Perez, and Michael Collins. Structured prediction ´ models via the matrix-tree theorem. In Proceedings of EMNLP-CoNLL, 2007.
223
+
224
+ Xin Li and Dan Roth. Learning question classifiers. In Proceedings of COLING, 2002.
225
+
226
+ Yang Liu and Mirella Lapata. Learning structured text representations. In Transaction of ACL, 2017.
227
+
228
+ Minh-Thang Luong and Christopher D Manning. Stanford neural machine translation systems for spoken language domains. In Proceedings of the International Workshop on Spoken Language Translation, 2015.
229
+
230
+ Mingbo Ma, Liang Huang, Bing Xing, and Bowen Zhou. Dependency-based convolutional neural networks for sentence embedding. In Proceedings of ACL, 2015.
231
+
232
+ Xuezhe Ma and Eduard Hovy. Neural probabilistic model for non-projective mst parsing. arXiv preprint arXiv:1701.00874, 2017.
233
+
234
+ Jean Maillard, Stephen Clark, and Dani Yogatama. Jointly learning sentence embeddings and syntax with unsupervised tree-lstms. CoRR, 2017. URL http://arxiv.org/abs/1705.09189.
235
+
236
+ Diego Marcheggiani and Ivan Titov. Encoding sentences with graph convolutional networks for semantic role labeling. In Proceedings of EMNLP, 2017.
237
+
238
+ Massimo Nicosia and Alessandro Moschitti. Accurate sentence matching with hybrid siamese networks. In Proceedings of CIKM, 2017.
239
+
240
+ Joakim Nivre, Marie-Catherine de Marneffe, Filip Ginter, Yoav Goldberg, Jan Hajic, Christopher D Manning, Ryan T McDonald, Slav Petrov, Sampo Pyysalo, Natalia Silveira, and Others. Universal dependencies v1: A multilingual treebank collection. In Proceedings of LREC, 2016.
241
+
242
+ Rasmus Berg Palm, Ulrich Paquet, and Ole Winther. Recurrent relational networks for complex relational reasoning. arXiv preprint arXiv:1711.08028, 2017.
243
+
244
+ Ankur P. Parikh, Oscar Tackstr ¨ om, Dipanjan Das, and Jakob Uszkoreit. A decomposable attention ¨ model for natural language inference. In Proceedings of EMNLP, 2016.
245
+
246
+ Jeffrey Pennington, Richard Socher, and Christopher Manning. Glove: Global vectors for word representation. In Proceedings of EMNLP, 2014.
247
+
248
+ Adam Santoro, David Raposo, David G Barrett, Mateusz Malinowski, Razvan Pascanu, Peter Battaglia, and Tim Lillicrap. A simple neural network module for relational reasoning. In Proceedings of NIPS, 2017.
249
+
250
+ Michael Sejr Schlichtkrull, Thomas N. Kipf, Peter Bloem, Rianne van den Berg, Ivan Titov, and Max Welling. Modeling relational data with graph convolutional networks. CoRR, abs/1703.06103, 2017.
251
+
252
+ Tao Shen, Tianyi Zhou, Guodong Long, Jing Jiang, Sen Wang, and Chengqi Zhang. Reinforced self-attention network: a hybrid of hard and soft attention for sequence modeling. arXiv preprint arXiv:1801.10296, 2018.
253
+
254
+ David A Smith and Noah A Smith. Probabilistic models of nonprojective dependency trees. In Proceedings of EMNLP-CoNLL, 2007.
255
+
256
+ Paul Smolensky. Tensor product variable binding and the representation of symbolic structures in connectionist systems. Artif. Intell., 46(1-2):159–216, 1990. doi: 10.1016/0004-3702(90)90007-M. URL https://doi.org/10.1016/0004-3702(90)90007-M.
257
+
258
+ Richard Socher, Alex Perelygin, Jean Y. Wu, Jason Chuang, Christopher D. Manning, Andrew Y. Ng, and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of EMNLP, 2013.
259
+
260
+ Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. Sequence to sequence learning with neural networks. In Proceedings of NIPS, 2014.
261
+
262
+ Kai Sheng Tai, Richard Socher, and Christopher D. Manning. Improved semantic representations from tree-structured long short-term memory networks. In Proceedings of ACL, 2015.
263
+
264
+ Gaurav Singh Tomar, Thyago Duque, Oscar Tackstr ¨ om, Jakob Uszkoreit, and Dipanjan Das. Neural ¨ paraphrase identification of questions with noisy pretraining. arXiv preprint arXiv:1704.04565, 2017.
265
+
266
+ William Thomas Tutte. Graph theory. Addison-Wesley Publishing Company Advanced Book Program, Reading, MA, 1984.
267
+
268
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Proceedings of NIPS, 2017.
269
+
270
+ Zhiguo Wang, Wael Hamza, and Radu Florian. Bilateral multi-perspective matching for natural language sentences. In Proceedings of IJCAI, 2017.
271
+
272
+ David Weiss, Chris Alberti, Michael Collins, and Slav Petrov. Structured training for neural network Transition-Based parsing. June 2015.
273
+
274
+ Adina Williams, Andrew Drozdov, and Samuel R Bowman. Learning to parse from a semantic objective: It works. is it syntax? arXiv preprint arXiv:1709.01121, 2017.
275
+
276
+ Dani Yogatama, Phil Blunsom, Chris Dyer, Edward Grefenstette, and Wang Ling. Learning to compose words into sentences with reinforcement learning. In Proceedings of ICLR, 2017.
277
+
278
+ Lei Yu, Phil Blunsom, Chris Dyer, Edward Grefenstette, and Tomas Kocisk ´ y. The neural noisy ´ channel. In Proceedings of ICLR, 2017.
279
+
280
+ # A APPENDIX
281
+
282
+ # A.1 IMPLEMENTATION DETAILS
283
+
284
+ For all the experiments, hyperparameters are optimised via grid search on the accuracy or perplexity of the validation set.
285
+
286
+ In classification tasks, the models are optimised either with Adam (Kingma & Ba, 2014) with learning rate 0.0001 or Adagrad (Duchi et al., 2011) with learning rate 0.01, as determined by the performance on the validation set. Word embeddings are initialised with 300 dimensional GloVe vectors trained on Common Crawl $8 4 0 \mathrm { B } ^ { 8 }$ (Pennington et al., 2014) and finetuned during training. The output of BiLSTM is fed as input to the RNs. The number of hidden units for BiLSTMs is 300. For the functions $g _ { \theta }$ and $f _ { \phi }$ in RNs, we use two-hidden layer MLPs, consisting of 300 hidden units per layer with ReLU non-linearities. We add residual connections to the MLPs that parameterise $g _ { \theta }$ and $f _ { \phi }$ . Dropout (rate 0.5) is applied to the input and output of BiLSTMs. We replace the sum operations in Eq. 1 by max and use max pooling in the final layer of our model with intra-attention and the model based on recurrent RNs.
287
+
288
+ In both machine translation tasks, the functions $f _ { \phi }$ and $g _ { \theta }$ are parameterised using two-hidden layer MLPs, consisting of 512 hidden units per layer with ReLU. A beam size of 10 is used for decoding. For English-Vietnamese, we use 1 layer BiLSTM with 512 hidden units as encoder and 2-layer unidirectional LSTM as decoder. The model is optimised using stochastic gradient descent with learning rate 0.2 and dropout 0.5. For Chinese-English, the encoder is 1 layer BiLSTM and the decoder is 1 layer unidirectional LSTM (512 hidden units). We use Adam (Kingma & Ba, 2014) as optimiser with learning rate 0.0001. Dropout rate is 0.5. For all experiments with recurrent RNs, we set the number of recurrent steps to 3.
parse/train/rJxXDsCqYX/rJxXDsCqYX_content_list.json ADDED
@@ -0,0 +1,1590 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "SENTENCE ENCODING WITH TREE-CONSTRAINED RELATION NETWORKS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 826,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 171,
20
+ 398,
21
+ 198
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 234,
32
+ 544,
33
+ 251
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "The meaning of a sentence is a function of the relations that hold between its words. We instantiate this relational view of semantics in a series of neural models based on variants of relation networks (RNs) which represent a set of objects (for us, words forming a sentence) in terms of representations of pairs of objects. We propose two extensions to the basic RN model for natural language. First, building on the intuition that not all word pairs are equally informative about the meaning of a sentence, we use constraints based on both supervised and unsupervised dependency syntax to control which relations influence the representation. Second, since higher-order relations are poorly captured by a sum of pairwise relations, we use a recurrent extension of RNs to propagate information so as to form representations of higher order relations. Experiments on sentence classification, sentence pair classification, and machine translation reveal that, while basic RNs are only modestly effective for sentence representation, recurrent RNs with latent syntax are a reliably powerful representational device. ",
40
+ "bbox": [
41
+ 233,
42
+ 267,
43
+ 766,
44
+ 460
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 178,
54
+ 489,
55
+ 336,
56
+ 505
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Sentence representations play a crucial role in many NLP tasks, including sentiment analysis, paraphrase detection, entailment recognition, summarisation, and machine translation. Popular approaches for encoding sentences compose words using recurrent units (Cho et al., 2014; Sutskever et al., 2014) or convolutions (Kalchbrenner et al., 2014; Kim, 2014). A series of papers has also explored improving sentence representations by incorporating structural information into the encoders, including both supervised syntactic information (Tai et al., 2015; Bowman et al., 2016; Ma et al., 2015; Socher et al., 2013), and unsupervised syntax where the structure is learned to maximise task performance (Yogatama et al., 2017; Choi et al., 2017). ",
63
+ "bbox": [
64
+ 174,
65
+ 520,
66
+ 825,
67
+ 632
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "We approach the problem of sentence representation starting from the insight that the meaning of a sentence is an aggregation of the set of relations that hold between words. For example, in the simple sentence “John saw Mary”, most of the semantics is captured by knowing that “John is doing seeing” and that “Mary is what is being seen”. Treating sentences as a conjunction of simple relational predicates has been influential in both formal semantics (Copestake et al., 2005) and roll-filler computational models of semantics (Smolensky, 1990). While the prior sentence representation architectures discussed above can implicitly discover and represent such relational facts, the recently proposed relation networks model (Santoro et al., 2017, RNs) lets us work with them more directly. ",
74
+ "bbox": [
75
+ 174,
76
+ 638,
77
+ 825,
78
+ 763
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "RNs represent a set of objects by aggregating representations of pairwise relations of all pairs of objects. For sentence representation, the “set” we seek to represent is a sentence, and the objects are words. There are two problems with this setup, and we develop extensions of RNs to address these shortcomings (§3). First, RNs assume equal contributions from all pairs of objects. In unstructured sets, this uniformity is justified, but sentences are structured sequences, not unstructured sets, and intuitively the relationship between some word pairs is more meaningful than the relationship between others. To address this structural deficiency, we extend RNs to be sensitive to pairwise attachment information based on a dependency tree structure. Our formulation lets us either use dependency trees obtained from external parsers, or learn trees as latent variables so as to optimise task performance. Tree learning is tractable in this model because we exploit the fact that RNs operate on representations of pairs of words, and we can efficiently obtain marginal probabilities of attachment decisions (i.e., word pairs) in pair-factored parsing models using Kirchoff’s matrix tree theorem (Tutte, 1984; Koo et al., 2007; Liu & Lapata, 2017). A second objection to RNs is that they aggregate representations of pairs, but the meaning of a sentence may require understanding higher-order relational information (i.e., trees can be deeply nested). To enable representations that can directly capture the salient aspects of higher-order relations, we use recurrent RNs (Palm et al., 2017), but again augmented with supervised or latent dependency trees. ",
85
+ "bbox": [
86
+ 174,
87
+ 771,
88
+ 825,
89
+ 924
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "",
96
+ "bbox": [
97
+ 174,
98
+ 103,
99
+ 825,
100
+ 188
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "We carefully evaluate and analyse different versions of our RN-based models on machine translation and three text classification tasks, namely textual entailment, question type classification, and duplicate question detection (§4). Our experimental results demonstrate that in general sentence encoders based on recurrent RNs outperform those based on vanilla RNs, and models with latent tree constraints mostly achieve better performance than their supervised counter-parts. Overall, our models outperform sentence encoders based on birectional LSTMs and those incorporating an intra-sentence attention mechanism. ",
107
+ "bbox": [
108
+ 174,
109
+ 194,
110
+ 825,
111
+ 292
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "2 BACKGROUND ",
118
+ "text_level": 1,
119
+ "bbox": [
120
+ 176,
121
+ 311,
122
+ 326,
123
+ 328
124
+ ],
125
+ "page_idx": 1
126
+ },
127
+ {
128
+ "type": "text",
129
+ "text": "Relations networks (Santoro et al., 2017) are designed to model relational reasoning. Neural networks augmented with RNs have achieved success across various tasks such as visual question answering and text-based question answering on the bAbI suite of tasks, on which even models with sophisticated architecture could not obtain satisfactory results due to the requirement for complex relational inference. An RN is formalised as ",
130
+ "bbox": [
131
+ 174,
132
+ 343,
133
+ 825,
134
+ 412
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "equation",
140
+ "img_path": "images/28219c0a3776c8b1ac585a7eabfed15028d00c1281243cdc187a25499c165b6c.jpg",
141
+ "text": "$$\n\\mathrm { R N } ( O ) = f _ { \\phi } \\left( \\sum _ { i , j } g _ { \\theta } ( \\mathbf { o } _ { i } , \\mathbf { o } _ { j } ) \\right) ,\n$$",
142
+ "text_format": "latex",
143
+ "bbox": [
144
+ 387,
145
+ 415,
146
+ 609,
147
+ 465
148
+ ],
149
+ "page_idx": 1
150
+ },
151
+ {
152
+ "type": "text",
153
+ "text": "where the input is a set of “objects” $O = \\{ \\mathbf { o } _ { 1 } , \\mathbf { o } _ { 2 } , \\dots , \\mathbf { o } _ { n } \\}$ , $\\mathbf { o } _ { i } \\in \\mathbb { R } ^ { d }$ , and $f$ and $g$ are functions parameterised by $\\phi$ and $\\theta$ using feed-forward neural networks (MLPs). The function $g _ { \\boldsymbol { \\theta } }$ computes the relatedness of two objects $\\mathbf { o } _ { i }$ and $\\mathbf { o } _ { j }$ . RNs aggregate the relations between all the pairs of objects via the summation operation in Eq. 1. The embeddings of objects $\\mathbf { o } _ { i }$ and $\\mathbf { o } _ { j }$ differ depending on the task and the nature of the objects to be compared. ",
154
+ "bbox": [
155
+ 174,
156
+ 470,
157
+ 825,
158
+ 541
159
+ ],
160
+ "page_idx": 1
161
+ },
162
+ {
163
+ "type": "text",
164
+ "text": "Although RNs perform well on problems that require basic relational reasoning, they are sub-optimal for tasks that demand multiple steps of reasoning as only pair-wise relational operations are involved. To address this limitation, Palm et al. (2017) proposed a recurrent variant for RNs, denoted as recurrent RNs, and demonstrated the model’s ability for multi-step reasoning, which is essential for the tasks they studied, namely Sudoku and question answering. Recurrent RNs are formulated as follows: ",
165
+ "bbox": [
166
+ 173,
167
+ 547,
168
+ 825,
169
+ 632
170
+ ],
171
+ "page_idx": 1
172
+ },
173
+ {
174
+ "type": "equation",
175
+ "img_path": "images/ecc4527e86cbbd3a24351739a43df5f7bd60658a847b94fb9b4b1f0763bb6ba0.jpg",
176
+ "text": "$$\n\\mathbf { m } _ { i } ^ { t } = \\sum _ { j } g _ { \\theta } ( \\mathbf { h } _ { j } ^ { t - 1 } , \\mathbf { h } _ { i } ^ { t - 1 } ) , \\ \\mathbf { h } _ { i } ^ { t } = f _ { \\phi } \\left( \\mathbf { h } _ { i } ^ { t - 1 } , \\mathbf { o } _ { i } , \\mathbf { m } _ { i } ^ { t } \\right) .\n$$",
177
+ "text_format": "latex",
178
+ "bbox": [
179
+ 323,
180
+ 633,
181
+ 674,
182
+ 670
183
+ ],
184
+ "page_idx": 1
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "At timestep $t$ , $\\mathbf { h } _ { i } ^ { t }$ is the hidden state vector corresponding to the $i$ -th object. In addition to the previous hidden state $\\mathbf { h } _ { i } ^ { t - 1 }$ and the input $\\mathbf { o } _ { i }$ , it also takes into account the message $\\mathbf { m } _ { i } ^ { t }$ , which summarises relations between the $i$ -th object and all its neighbours (e.g. all objects in the simplest form) in the previous timestep $t - 1$ . The number of recurrent steps is a hyperparameter, where higher values allow the modelling of longer chains of relations. In the standard setting, the vector $\\mathbf { o } _ { i }$ encodes timestep invariant information, such as position and ordering, and $g _ { \\theta }$ and $f _ { \\phi }$ are parameterised as MLPs and LSTMs (Hochreiter & Schmidhuber, 1997), respectively. In this architecture, the recurrent dependencies accumulate information of relations enabling multi-step reasoning. ",
189
+ "bbox": [
190
+ 173,
191
+ 674,
192
+ 825,
193
+ 790
194
+ ],
195
+ "page_idx": 1
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "3 MODELS ",
200
+ "text_level": 1,
201
+ "bbox": [
202
+ 176,
203
+ 808,
204
+ 279,
205
+ 824
206
+ ],
207
+ "page_idx": 1
208
+ },
209
+ {
210
+ "type": "text",
211
+ "text": "A straightforward application of RNs for sentence representation is to treat words as objects and consider all relations between pairs of words in a sentence following Eq. 1. Intuitively, this approach is unappealing as not all direct links between pairs of words are equally important. Thus, we propose to use a dependency grammar as a constraint in RNs and argue that the relations considered in the model should comply with a valid dependency tree structure. In the vanilla RNs, this means that the aggregations will operate on the subset of relations that form a valid tree (§3.1) and in the recurrent RNs, we want the messages (Eq. 2) only coming from the syntactical neighbours of the node corresponding to a consistent tree structure across different timesteps (§3.2). In a supervised setting we use an off the shelf parser to generate trees for all sentences. In an unsupervised setting, we model them as latent variables. ",
212
+ "bbox": [
213
+ 174,
214
+ 839,
215
+ 825,
216
+ 924
217
+ ],
218
+ "page_idx": 1
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "",
223
+ "bbox": [
224
+ 174,
225
+ 103,
226
+ 825,
227
+ 160
228
+ ],
229
+ "page_idx": 2
230
+ },
231
+ {
232
+ "type": "text",
233
+ "text": "3.1 RNS WITH TREE CONSTRAINTS ",
234
+ "text_level": 1,
235
+ "bbox": [
236
+ 176,
237
+ 176,
238
+ 431,
239
+ 190
240
+ ],
241
+ "page_idx": 2
242
+ },
243
+ {
244
+ "type": "text",
245
+ "text": "Let $\\pmb { x } = [ x _ { 1 } , x _ { 2 } , \\dots , x _ { n } ]$ denote a sentence, where $x _ { i }$ represents the $i$ -th word in the sentence. Let ${ \\pmb y } ^ { * }$ denote a directed dependency tree, which is represented by a set of head-modifier index tuples $( h , m )$ .1 To incorporate syntactic information, we modify Eq. 1 by restricting the summation function to span over $( h , m ) \\in { \\pmb y } ^ { * }$ : ",
246
+ "bbox": [
247
+ 173,
248
+ 202,
249
+ 825,
250
+ 258
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "equation",
256
+ "img_path": "images/3c817031ccb6cda963676f33403a285a1a1dc7e2fbfe7de7404fce25ba20bbe7.jpg",
257
+ "text": "$$\n\\mathbf { s } = f _ { \\phi } \\left( \\sum _ { ( h , m ) \\in y ^ { * } } g _ { \\theta } ( \\mathbf { o } _ { h } , \\mathbf { o } _ { m } ) \\right) ,\n$$",
258
+ "text_format": "latex",
259
+ "bbox": [
260
+ 387,
261
+ 263,
262
+ 609,
263
+ 315
264
+ ],
265
+ "page_idx": 2
266
+ },
267
+ {
268
+ "type": "text",
269
+ "text": "where s denotes the vector representation of the sentence $_ { \\textbf { \\em x } }$ , and $\\mathbf { o } _ { h }$ and $\\mathbf { o } _ { m }$ are embeddings corre sponding to the head word $x _ { h }$ and the modifier word $x _ { m }$ , respectively. ",
270
+ "bbox": [
271
+ 173,
272
+ 319,
273
+ 820,
274
+ 348
275
+ ],
276
+ "page_idx": 2
277
+ },
278
+ {
279
+ "type": "text",
280
+ "text": "To enable task-optimal trees to be learned we introduce a distribution over trees given the sentence, $p _ { \\psi } ( \\pmb { y } \\mid \\pmb { x } )$ , and rewrite Eq. 3 in terms of expectations under this distribution: ",
281
+ "bbox": [
282
+ 171,
283
+ 354,
284
+ 823,
285
+ 383
286
+ ],
287
+ "page_idx": 2
288
+ },
289
+ {
290
+ "type": "equation",
291
+ "img_path": "images/365a01c22a73c3ee6068e814957ef8a0bfe22482cb39da1679d636609572790d.jpg",
292
+ "text": "$$\n\\mathbf { s } = f _ { \\phi } \\left( \\sum _ { \\pmb { y } \\in \\mathscr { V } ( \\pmb { x } ) } p _ { \\psi } ( \\pmb { y } \\mid \\pmb { x } ) \\sum _ { ( h , m ) \\in \\pmb { y } } g _ { \\theta } ( \\mathbf { o } _ { h } , \\mathbf { o } _ { m } ) \\right) ,\n$$",
293
+ "text_format": "latex",
294
+ "bbox": [
295
+ 331,
296
+ 388,
297
+ 663,
298
+ 439
299
+ ],
300
+ "page_idx": 2
301
+ },
302
+ {
303
+ "type": "text",
304
+ "text": "where $\\mathcal { V } ( \\pmb { x } )$ denotes the set of dependency trees for a sentence $_ { \\textbf { \\em x } }$ . Because the inner loop depends only on $( h , m )$ pairs and the linearity of expectation, we can rewrite this in terms of the marginal edge probabilities $\\begin{array} { r } { p _ { \\psi } ( h m \\mid x ) = \\sum _ { y \\in \\mathcal { V } ( \\pmb { x } ) } p _ { \\psi } ( \\pmb { y } \\mid \\pmb { x } ) [ ( h , m ) \\in y ] } \\end{array}$ , where $[ q ] = 1$ if $q$ is true and 0 otherwise. This becomes ",
305
+ "bbox": [
306
+ 174,
307
+ 444,
308
+ 825,
309
+ 502
310
+ ],
311
+ "page_idx": 2
312
+ },
313
+ {
314
+ "type": "equation",
315
+ "img_path": "images/535f58b88a8ececf8d64e68c809285a5376c33f4f4fa8aa4691da76b4d8d0dba.jpg",
316
+ "text": "$$\n{ \\bf s } = f _ { \\phi } ( \\sum _ { ( h , m ) \\in \\mathcal { D } ( { \\pmb x } ) } p _ { \\psi } ( h m \\mid { \\pmb x } ) g _ { \\theta } ( { \\bf o } _ { h } , { \\bf o } _ { m } ) ) ,\n$$",
317
+ "text_format": "latex",
318
+ "bbox": [
319
+ 336,
320
+ 506,
321
+ 658,
322
+ 556
323
+ ],
324
+ "page_idx": 2
325
+ },
326
+ {
327
+ "type": "text",
328
+ "text": "where $\\mathcal { D } ( \\pmb { x } )$ denote all possible dependencies arcs for a sentence $_ { \\textbf { \\em x } }$ : ${ \\mathcal { D } } ( { \\boldsymbol { \\mathbf { x } } } ) ~ = ~ \\{ ( h , m ) ~ | ~ h ~ \\in$ $[ 0 \\ldots n ] , m \\in [ 1 \\ldots n ] \\}$ . ",
329
+ "bbox": [
330
+ 174,
331
+ 561,
332
+ 821,
333
+ 590
334
+ ],
335
+ "page_idx": 2
336
+ },
337
+ {
338
+ "type": "text",
339
+ "text": "Fortunately, the required attachment marginals can be calculated efficiently in $O ( n ^ { 3 } )$ using Kirchhoff’s matrix-tree theorem (Tutte, 1984), provided the conditional tree probability is a conditional random field with potentials that only look at a single pair of nodes at a time (Koo et al., 2007; Smith & Smith, 2007; Liu & Lapata, 2017). Although this restriction on the potential functions may seem limiting (the model cannot look at higher order dependency structures when assigning probability to the tree), representations derived from neural networks employing such models can produce state-of-the-art supervised dependency parsers (Dozat & Manning, 2017), suggesting this is an acceptable restriction. ",
340
+ "bbox": [
341
+ 173,
342
+ 595,
343
+ 826,
344
+ 708
345
+ ],
346
+ "page_idx": 2
347
+ },
348
+ {
349
+ "type": "text",
350
+ "text": "For our model, we define the potential associated with an edge using a bilinear form (Ma & Hovy, 2017), ",
351
+ "bbox": [
352
+ 173,
353
+ 714,
354
+ 825,
355
+ 744
356
+ ],
357
+ "page_idx": 2
358
+ },
359
+ {
360
+ "type": "equation",
361
+ "img_path": "images/34fdf678e9e3f9f0576caf9f63610c4628cefcf781c86cb77ddf450c1857b940.jpg",
362
+ "text": "$$\n\\boldsymbol { \\Psi } ( h , m ) = e ^ { \\mathbf { o } _ { h } ^ { T } \\mathbf { W } \\mathbf { o } _ { m } + \\mathbf { U } ^ { T } \\mathbf { o } _ { h } + \\mathbf { V } ^ { T } \\mathbf { o } _ { m } + b } ,\n$$",
363
+ "text_format": "latex",
364
+ "bbox": [
365
+ 372,
366
+ 748,
367
+ 624,
368
+ 770
369
+ ],
370
+ "page_idx": 2
371
+ },
372
+ {
373
+ "type": "text",
374
+ "text": "where $\\mathbf { o } _ { i }$ denotes the BiLSTM output corresponding to the input word $x _ { i }$ ; $\\mathbf { W }$ , U, $\\mathbf { V }$ are weight matrices, and $b$ is the bias term. ",
375
+ "bbox": [
376
+ 171,
377
+ 775,
378
+ 826,
379
+ 804
380
+ ],
381
+ "page_idx": 2
382
+ },
383
+ {
384
+ "type": "text",
385
+ "text": "Structured intra-sentence attention For many applications, it is useful to represent each word in the sentence in terms of its context in the surrounding sentence. While simple mechanisms like bidirectional RNNs can produce satisfactory results (Bahdanau et al., 2015), attention-based word-in-context representations have received increasing interest (Vaswani et al., 2017), including those that impose structural constraints on attention (Liu & Lapata, 2017; Kim et al., 2017). Our tree-constrained RN can likewise be used to construct word-in-context representations. Intuitively, we create a contextualised representation for each word by aggregating information from its possible parents and children according to their attachment marginal probability. These context vectors and word vectors can either be operated on by models that require them or pooled over to generate a sentence representation. ",
386
+ "bbox": [
387
+ 173,
388
+ 819,
389
+ 825,
390
+ 876
391
+ ],
392
+ "page_idx": 2
393
+ },
394
+ {
395
+ "type": "text",
396
+ "text": "",
397
+ "bbox": [
398
+ 174,
399
+ 103,
400
+ 825,
401
+ 188
402
+ ],
403
+ "page_idx": 3
404
+ },
405
+ {
406
+ "type": "text",
407
+ "text": "For RNs with supervised tree constraints, we define the context vector for the word $x _ { i }$ in terms of the representation of the relation between $x _ { i }$ and its parent $x _ { h }$ , i.e., $\\mathbf { r } _ { i } = f _ { \\phi } ( g _ { \\theta } ( \\mathbf { o } _ { h } , \\mathbf { o } _ { i } ) )$ . ",
408
+ "bbox": [
409
+ 174,
410
+ 194,
411
+ 821,
412
+ 223
413
+ ],
414
+ "page_idx": 3
415
+ },
416
+ {
417
+ "type": "text",
418
+ "text": "For latent tree RNs, the context vector for each word $x _ { i }$ contains two components: a weighted sum of relations between $x _ { i }$ and its parents, and a weighted sum of relations between $x _ { i }$ and its children: ",
419
+ "bbox": [
420
+ 173,
421
+ 229,
422
+ 823,
423
+ 258
424
+ ],
425
+ "page_idx": 3
426
+ },
427
+ {
428
+ "type": "equation",
429
+ "img_path": "images/b748a73c6a56d8c70a79c0d2c36932e112ba10e4770d94cddceeceac053742f1.jpg",
430
+ "text": "$$\n\\mathbf { \\boldsymbol { \\mathsf { \\mathsf { \\mathsf { \\Pi } } } } } _ { i } = \\int _ { \\phi } \\left( \\sum _ { h = 1 } ^ { n } p _ { \\psi } ( h \\to i | x ) g _ { \\theta } ( \\mathbf { \\boldsymbol { \\mathsf { o } } } _ { h } , \\mathbf { \\boldsymbol { \\mathsf { \\mathsf { o } } } } _ { i } ) \\right) , \\mathbf { \\boldsymbol { \\mathsf { \\mathsf { \\mathbf { c } } } } } _ { i } = \\int _ { \\phi } \\left( \\sum _ { m = 1 } ^ { n } p _ { \\psi } ( i \\to m | x ) g _ { \\theta } ( \\mathbf { \\boldsymbol { \\mathsf { o } } } _ { i } , \\mathbf { \\boldsymbol { \\mathsf { \\mathbf { o } } } } _ { m } ) \\right) , \\mathbf { \\boldsymbol { \\mathsf { \\mathbf { r } } } } _ { i } = [ \\mathbf { \\boldsymbol { \\mathsf { p } } } _ { i } ; \\mathbf { \\boldsymbol { \\mathsf { \\mathbf { c } } } } _ { i } ] .\n$$",
431
+ "text_format": "latex",
432
+ "bbox": [
433
+ 181,
434
+ 267,
435
+ 821,
436
+ 310
437
+ ],
438
+ "page_idx": 3
439
+ },
440
+ {
441
+ "type": "text",
442
+ "text": "Finally, the $\\mathbf { r } _ { i }$ ’s are concatenated with the original object representations and transformed into the final contextual word representations: $\\mathbf { s } _ { i } = \\operatorname { t a n h } ( \\mathbf { W } _ { r } ^ { T } [ \\mathbf { r } _ { i } \\ ; \\ \\mathbf { o } _ { i } ^ { \\star } ] )$ . ",
443
+ "bbox": [
444
+ 176,
445
+ 319,
446
+ 820,
447
+ 348
448
+ ],
449
+ "page_idx": 3
450
+ },
451
+ {
452
+ "type": "text",
453
+ "text": "For applications where a single vector is required, a subsequent pooling operation is applied to the sequence of vectors $\\left[ \\mathbf { s } _ { 1 } , \\mathbf { s } _ { 2 } , \\ldots , \\mathbf { s } _ { n } \\right]$ to generate an alternative representation of a sentence s. We discuss the pooling operations used below (§4 and $\\ S \\mathbf { A . l }$ ). ",
454
+ "bbox": [
455
+ 174,
456
+ 354,
457
+ 823,
458
+ 397
459
+ ],
460
+ "page_idx": 3
461
+ },
462
+ {
463
+ "type": "text",
464
+ "text": "In our model, the context vectors are computed from the representations of word pairs (i.e., components of RNs), whereas in the related prior work of Liu & Lapata (2017) and Kim et al. (2017), they are the expected value of LSTM hidden state vectors under structured attention distributions. ",
465
+ "bbox": [
466
+ 174,
467
+ 404,
468
+ 825,
469
+ 446
470
+ ],
471
+ "page_idx": 3
472
+ },
473
+ {
474
+ "type": "text",
475
+ "text": "3.2 RECURRENT RNS WITH TREE CONSTRAINTS",
476
+ "text_level": 1,
477
+ "bbox": [
478
+ 178,
479
+ 465,
480
+ 521,
481
+ 481
482
+ ],
483
+ "page_idx": 3
484
+ },
485
+ {
486
+ "type": "text",
487
+ "text": "The models described in the previous sections are based on vanilla RNs which aggregate only single pairs of words. Since language can have deeply nested structures, even if an RN can faithfully represent the contents of sentence, the representation may not represent important higher order dependencies in a convenient form. To deal with this limitation, we augment recurrent RNs with tree constraints. In this model, information is propagated along the edges in the (possibly latent) tree structure associated with each sentence during the construction of the representation. ",
488
+ "bbox": [
489
+ 173,
490
+ 492,
491
+ 825,
492
+ 578
493
+ ],
494
+ "page_idx": 3
495
+ },
496
+ {
497
+ "type": "text",
498
+ "text": "We provide two variants of recurrent RNs, one for supervised trees and the other for latent trees. With supervised trees, the message of an object at each timestep comes only from its parent in the given dependency parse. Formally, let ${ \\pmb y } ^ { * }$ denote the given parse tree,2 ",
499
+ "bbox": [
500
+ 174,
501
+ 583,
502
+ 825,
503
+ 627
504
+ ],
505
+ "page_idx": 3
506
+ },
507
+ {
508
+ "type": "equation",
509
+ "img_path": "images/217e16bf7c83444ed23942c93422a102190c79000ab58867d4314625e45168ef.jpg",
510
+ "text": "$$\n\\mathbf { m } _ { i } ^ { t } = \\sum _ { ( h , i ) \\in \\pmb { y } ^ { * } } g _ { \\theta } ( \\mathbf { h } _ { h } ^ { t - 1 } , \\mathbf { h } _ { i } ^ { t - 1 } ) , \\mathbf { h } _ { i } ^ { t } = f _ { \\phi } ( \\mathbf { h } _ { i } ^ { t - 1 } , [ \\mathbf { o } _ { i } ; \\mathbf { m } _ { i } ^ { t } ] ) ,\n$$",
511
+ "text_format": "latex",
512
+ "bbox": [
513
+ 302,
514
+ 636,
515
+ 694,
516
+ 672
517
+ ],
518
+ "page_idx": 3
519
+ },
520
+ {
521
+ "type": "text",
522
+ "text": "In the unsupervised setting, where the tree structure is latent, the messages from neighbours could include those from all the possible parents or children or both.3 We include both messages here: ",
523
+ "bbox": [
524
+ 171,
525
+ 689,
526
+ 825,
527
+ 718
528
+ ],
529
+ "page_idx": 3
530
+ },
531
+ {
532
+ "type": "equation",
533
+ "img_path": "images/d9aa16b72509521a25f82dff00b615f5dfe19c05569e6e3102d652c36e8e9cde.jpg",
534
+ "text": "$$\n\\begin{array} { l } { { { \\bf m } _ { i } ^ { t , p } = \\displaystyle \\sum _ { h = 1 } ^ { n } p _ { \\psi } ( h i \\mid x ) g _ { \\theta } ( { \\bf h } _ { h } ^ { t - 1 } , { \\bf h } _ { i } ^ { t - 1 } ) , { \\bf m } _ { i } ^ { t , c } = \\displaystyle \\sum _ { m = 1 } ^ { n } p _ { \\psi } ( i m \\mid x ) g _ { \\theta } ( { \\bf h } _ { i } ^ { t - 1 } , { \\bf h } _ { m } ^ { t - 1 } ) , } } \\\\ { { { \\bf h } _ { i } ^ { t } = f _ { \\phi } ( { \\bf h } _ { i } ^ { t - 1 } , [ { \\bf o } _ { i } ; { \\bf m } _ { i } ^ { t , p } ; { \\bf m } _ { i } ^ { t , c } ] ) . } } \\end{array}\n$$",
535
+ "text_format": "latex",
536
+ "bbox": [
537
+ 205,
538
+ 727,
539
+ 789,
540
+ 791
541
+ ],
542
+ "page_idx": 3
543
+ },
544
+ {
545
+ "type": "text",
546
+ "text": "The tree probabilities remain fixed across the different timesteps of the recurrent RN, ensuring that multi-step reasoning operates on a consistent tree structure. The initial hidden representation of each object ${ \\bf h } _ { i } ^ { 1 }$ is set to $\\mathbf { o } _ { i }$ . Finally, we pool over the hidden state vectors of the last timestep $T$ for sentence representations, or make them available as word-in-context representations. ",
547
+ "bbox": [
548
+ 173,
549
+ 797,
550
+ 825,
551
+ 854
552
+ ],
553
+ "page_idx": 3
554
+ },
555
+ {
556
+ "type": "text",
557
+ "text": "4 EXPERIMENTS ",
558
+ "text_level": 1,
559
+ "bbox": [
560
+ 176,
561
+ 102,
562
+ 326,
563
+ 117
564
+ ],
565
+ "page_idx": 4
566
+ },
567
+ {
568
+ "type": "text",
569
+ "text": "We examine the effectiveness of our sentence representation models on three sentence classification tasks: textual entailment, question type classification, and paraphrase detection. We further use attention-based machine translation to test our proposed methods’ word-in-context representations. We refer the readers to $\\ S \\mathrm { A } . 1$ for implementation details. ",
570
+ "bbox": [
571
+ 174,
572
+ 133,
573
+ 825,
574
+ 189
575
+ ],
576
+ "page_idx": 4
577
+ },
578
+ {
579
+ "type": "text",
580
+ "text": "4.1 SENTENCE CLASSIFICATION ",
581
+ "text_level": 1,
582
+ "bbox": [
583
+ 176,
584
+ 207,
585
+ 408,
586
+ 222
587
+ ],
588
+ "page_idx": 4
589
+ },
590
+ {
591
+ "type": "text",
592
+ "text": "In our experiments, we use the Stanford Natural Language Inference (SNLI), Quora duplicate question detection, and TREC question type classification datasets. ",
593
+ "bbox": [
594
+ 176,
595
+ 233,
596
+ 821,
597
+ 261
598
+ ],
599
+ "page_idx": 4
600
+ },
601
+ {
602
+ "type": "text",
603
+ "text": "Stanford natural language inference Given a premise and hypothesis pair $( \\pmb { x } _ { 1 } , \\pmb { x } _ { 2 } )$ , the task in SNLI is to predict whether their relationship is entailment, contradiction, or neutral. The dataset consists of 550k, 10k, and 10k sentences for training, development, and test set, respectively (Bowman et al., 2015). ",
604
+ "bbox": [
605
+ 174,
606
+ 277,
607
+ 825,
608
+ 333
609
+ ],
610
+ "page_idx": 4
611
+ },
612
+ {
613
+ "type": "text",
614
+ "text": "Quora duplicate question detection The dataset4 contains sentence pairs mined from questions that people asked on Quora. The task is to identify whether a question is a duplicate of another. We follow the data splits by Wang et al. (2017), having $4 0 0 \\mathrm { k } / 1 0 \\mathrm { k } / 1 0 \\mathrm { k }$ for train/dev/test dataset. ",
615
+ "bbox": [
616
+ 174,
617
+ 349,
618
+ 825,
619
+ 391
620
+ ],
621
+ "page_idx": 4
622
+ },
623
+ {
624
+ "type": "text",
625
+ "text": "TREC question type classification The task (Li & Roth, 2002) is to classify open-domain, factoid questions into six categories: abbreviation, entity, description, human, location, and numeric value. The dataset is composed of $5 . 5 \\mathrm { k }$ examples in the training dataset and 500 examples in the test set. We randomly sample 500 examples from the training set for validation and leave the rest for training. ",
626
+ "bbox": [
627
+ 174,
628
+ 407,
629
+ 825,
630
+ 463
631
+ ],
632
+ "page_idx": 4
633
+ },
634
+ {
635
+ "type": "text",
636
+ "text": "Classification model In these classification tasks, we calculate the probability distribution of labels as follows: $p ( Y \\mid { \\bf q } ) = \\mathrm { s o f t m a x } ( { \\bf W } _ { q } ^ { T } \\phi ( { \\bf q } ) + { \\bf b } _ { q } )$ , where the function $\\phi$ is an MLP with 1 hidden layer. For question type classification, the vector q is simply the sentence representation s. For the other tasks which classify pairs of sentences $( \\pmb { x } _ { 1 } , \\pmb { x } _ { 2 } )$ , $\\mathbf { q }$ is obtained by concatenating the following vectors: the representations of the two input sentences $\\mathbf { s } ^ { \\pmb { x } _ { 1 } }$ and $\\mathbf { s } ^ { x _ { 2 } }$ , element-wise product $\\mathbf { s } ^ { \\mathbf { x } _ { 1 } } \\odot \\mathbf { s } ^ { \\mathbf { x } _ { 2 } }$ , and absolute element-wise difference $| \\mathbf { s } ^ { \\pmb { x } _ { 1 } } - \\mathbf { s } ^ { \\pmb { x } _ { 2 } } |$ (Tai et al., 2015; Bowman et al., 2016). ",
637
+ "bbox": [
638
+ 174,
639
+ 479,
640
+ 825,
641
+ 563
642
+ ],
643
+ "page_idx": 4
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "Classification results Tables 1a, 1b, and 2a summarise the results of our RN-based models for the three text classification tasks. We also include three baselines, namely the bag-of-words model (BoW), the BiLSTM encoder with $\\operatorname* { m a x } ^ { 5 }$ pooling layer, and a re-implementation of the structured intra-sentence attention model of Liu & Lapata (2017).6 The models with an intra-sentence attention mechanism perform on par or better than the vanilla RNs; and on average those based on recurrent RNs achieve the best results across all datasets. Tree constraints add little value to vanilla RNs. Given that the underlying RN formulation fails, it is unsurprising that tree constraints do not add value (since adding tree constraints is simply adding a probability distribution to the underlying RN architecture). RNs become more effective when we address the bottleneck of simple aggregation of relations by introducing the intra-sentence attention mechanism. In this case, tree constraints reliably begin to work. Finally, we find that models with latent trees outperform those with supervised trees, supporting the patterns of results found across a range of models explored in prior work (Williams et al., 2017; Yogatama et al., 2017; Choi et al., 2017). ",
648
+ "bbox": [
649
+ 173,
650
+ 579,
651
+ 826,
652
+ 758
653
+ ],
654
+ "page_idx": 4
655
+ },
656
+ {
657
+ "type": "text",
658
+ "text": "For SNLI, compared to the published results from other sentence encoding-based models,7 our best model achieve slightly better results than the model by Choi et al. (2017), which encodes sentences with a TreeLSTM (Tai et al., 2015) and learns a latent tree using the Gumbel-softmax (Jang et al., 2016). Our model is slightly outperformed by the very recent model of Shen et al. (2018) that encode sentences using a hybrid of hard and soft attention mechanisms. ",
659
+ "bbox": [
660
+ 176,
661
+ 766,
662
+ 823,
663
+ 795
664
+ ],
665
+ "page_idx": 4
666
+ },
667
+ {
668
+ "type": "table",
669
+ "img_path": "images/f2b95a89d22424011e6081e576bd86d799a56e41a1b79b289c04150010bf69fb.jpg",
670
+ "table_caption": [
671
+ "Table 1: (a). Results on SNLI. The LSTM encoder and SPIINN-PI refer to Bowman et al. (2016). The results of BiLSTM with max-pooling, Gumbel TreeLSTM encoder, reinforced self-attention are obtained from Conneau et al. (2017); Choi et al. (2017) and Shen et al. (2018), respectively. (b). Results on Quora duplicate questions detection. BiMPM and pt-DECATT $( ^ { * } )$ incorporate complex mechanism for mapping sentences; and the remainder of the models are sentence-encoding models. "
672
+ ],
673
+ "table_footnote": [],
674
+ "table_body": "<table><tr><td>System</td><td>Acc.</td></tr><tr><td>Publishedmodels</td><td></td></tr><tr><td>300DLSTM encoder</td><td>80.6</td></tr><tr><td>300D SPINN-PI encoder</td><td>83.2</td></tr><tr><td>4096D BiLSTM with maX-pooling 300D Gumbel TreeLSTMencoder</td><td>84.5</td></tr><tr><td>300DReinforced self-attention</td><td>85.6</td></tr><tr><td></td><td>86.3</td></tr><tr><td>Baselines</td><td></td></tr><tr><td>BoW</td><td>77.9</td></tr><tr><td>BiLSTM with max pooling</td><td>85.1</td></tr><tr><td>Structured attention</td><td>84.5</td></tr><tr><td>Our models</td><td></td></tr><tr><td>RNs + no tree</td><td>84.1</td></tr><tr><td>RNs + supervised tree</td><td>83.7</td></tr><tr><td>RNs + latent tree</td><td>83.6</td></tr><tr><td>RNs intra-attn + no tree</td><td>84.0</td></tr><tr><td>RNs intra-attn + supervised tree</td><td>84.7</td></tr><tr><td>RNs intra-attn +latent tree</td><td>85.2</td></tr><tr><td>Recurrent RNs + supervised tree</td><td>85.2</td></tr><tr><td>Recurrent RNs +latent tree</td><td>85.7</td></tr><tr><td></td><td></td></tr></table>",
675
+ "bbox": [
676
+ 173,
677
+ 181,
678
+ 477,
679
+ 492
680
+ ],
681
+ "page_idx": 5
682
+ },
683
+ {
684
+ "type": "table",
685
+ "img_path": "images/bf4f178f46073d73d0d361368f547272e64750ad1bb13ad90954ddc1a93042b9.jpg",
686
+ "table_caption": [],
687
+ "table_footnote": [
688
+ ""
689
+ ],
690
+ "table_body": "<table><tr><td>System</td><td>Acc.</td></tr><tr><td>Published models CNN (Wang et al., 2017) LSTM (Wang et al., 2017) GRU (Nicosia &amp; Moschitti, 2017)</td><td>79.6 82.6 86.8</td></tr><tr><td>*BiMPM (Wang et al., 2017) *pt-DECATT (Tomar et al., 2017) Baselines BoW</td><td>88.2 88.4 81.3</td></tr><tr><td>BiLSTM with max pooling Structured attention</td><td>86.8 86.8</td></tr><tr><td>Our models RNs + no tree</td><td></td></tr><tr><td>RNs + supervised tree</td><td>86.4 86.7</td></tr><tr><td>RNs +latent tree RNs intra-attn + no tree</td><td>87.0</td></tr><tr><td>RNs intra-attn + supervised tree RNs intra-attn + latent tree Recurrent RNs + supervised tree</td><td>85.9 87.2 87.4</td></tr></table>",
691
+ "bbox": [
692
+ 529,
693
+ 183,
694
+ 826,
695
+ 494
696
+ ],
697
+ "page_idx": 5
698
+ },
699
+ {
700
+ "type": "text",
701
+ "text": "",
702
+ "bbox": [
703
+ 174,
704
+ 536,
705
+ 825,
706
+ 578
707
+ ],
708
+ "page_idx": 5
709
+ },
710
+ {
711
+ "type": "text",
712
+ "text": "On Quora duplicate question detection, our models outperform the CNN and LSTM baselines presented in previous work by a large margin. The results produced by our best model is close to BiMPM (Wang et al., 2017) and pt-DECATT (Tomar et al., 2017), which incorporate complex inter-sentence attention during sentence encoding. ",
713
+ "bbox": [
714
+ 174,
715
+ 585,
716
+ 825,
717
+ 642
718
+ ],
719
+ "page_idx": 5
720
+ },
721
+ {
722
+ "type": "text",
723
+ "text": "4.2 MACHINE TRANSLATION ",
724
+ "text_level": 1,
725
+ "bbox": [
726
+ 176,
727
+ 660,
728
+ 387,
729
+ 674
730
+ ],
731
+ "page_idx": 5
732
+ },
733
+ {
734
+ "type": "text",
735
+ "text": "To further evaluate the effectiveness of RNs on text processing, we apply our models to machine translation. In the standard seq2seq model with attention (Bahdanau et al., 2015), the output of the encoder is a sequence of annotation vectors, which is the concatenation of the output of a BiLSTM at each timestep. These vectors are then used to derive the context vectors that are used by the decoder to predict the output tokens. We adapt the standard attentive seq2seq model by replacing the annotation vectors with the sequence of vectors $\\left[ \\mathbf { s } _ { 1 } , \\mathbf { s } _ { 2 } , \\ldots , \\mathbf { s } _ { n } \\right]$ , comparing the intra-sentence attention (§3.1) or the recurrent RN (§3.2) definitions of these. ",
736
+ "bbox": [
737
+ 174,
738
+ 686,
739
+ 825,
740
+ 784
741
+ ],
742
+ "page_idx": 5
743
+ },
744
+ {
745
+ "type": "text",
746
+ "text": "We experiment on Chinese–English and English–Vietnamese machine translation tasks here in order to evaluate our models’ capability of capturing syntactic information of sentences. For Chinese– English, we use parallel data with $1 8 4 \\mathbf { k }$ sentence pairs from the FBIS corpus (LDC2003E14). The training set is preprocessed in the same way as that in $\\mathrm { Y u }$ et al. (2017). For English–Vietnamese, the dataset that we evaluate on is IWSLT 2015, containing 133k training sentence pairs obtained from scripts of TED talks. We follow prior work on dataset split and data preprocessing (Luong & Manning, 2015; Huang et al., 2018). ",
747
+ "bbox": [
748
+ 174,
749
+ 790,
750
+ 825,
751
+ 888
752
+ ],
753
+ "page_idx": 5
754
+ },
755
+ {
756
+ "type": "text",
757
+ "text": "Table 2b shows the results of our models in comparison with standard attention based benchmarks (Bahdanau et al., 2015) and published models. While in classification tasks, recurrent RNs and latent trees work best, in translation, flat RNs with latent trees work best. We suggest that this is due to the nature of the translation task, which can be accomplished by having a good representation of each word in context. ",
758
+ "bbox": [
759
+ 174,
760
+ 895,
761
+ 823,
762
+ 924
763
+ ],
764
+ "page_idx": 5
765
+ },
766
+ {
767
+ "type": "image",
768
+ "img_path": "images/9b28bc538a7a79a87102dbfd2ea0d7d4537f549f9a92aca5f8fc6b9e21393a58.jpg",
769
+ "image_caption": [
770
+ "Figure 1: Parse trees induced by our RN-based models and trees given by the dependency parser. The discussion of these trees is presented in $\\ S 5$ . "
771
+ ],
772
+ "image_footnote": [],
773
+ "bbox": [
774
+ 173,
775
+ 217,
776
+ 823,
777
+ 690
778
+ ],
779
+ "page_idx": 6
780
+ },
781
+ {
782
+ "type": "text",
783
+ "text": "",
784
+ "bbox": [
785
+ 174,
786
+ 758,
787
+ 825,
788
+ 801
789
+ ],
790
+ "page_idx": 6
791
+ },
792
+ {
793
+ "type": "text",
794
+ "text": "5 ANALYSIS ",
795
+ "text_level": 1,
796
+ "bbox": [
797
+ 174,
798
+ 821,
799
+ 290,
800
+ 838
801
+ ],
802
+ "page_idx": 6
803
+ },
804
+ {
805
+ "type": "text",
806
+ "text": "To understand the behavior of different RN-based models, we select a few examples to examine different types of errors they made, and inspect the learned latent dependency parse trees. Figure 1 shows the parse trees learned by RN-based models with latent tree constraints. These trees are maximum spanning trees obtained from Chu-Liu-Edmonds algorithm (Chu & Liu, 1965; Edmonds, 1967) over the scores of word pairs (Eq. 4). We observe that the induced trees are optimised for different tasks and generally are not as linguistically intuitive as those produced by a dependency parser trained in a supervised fashion. For question type classification, the type of a question can usually be decided by one or two words. Therefore the learned trees are intended to have the key words as roots that are depended on by all the other words. For example, in Fig. 1a, the word where completely determines the type of the question Where is the Orinoco River? to be location and it serves as the root of the learned tree. For SNLI, the dependencies in the learned trees (Fig. 1b) are less focused on a few words, probably due to the fact that a precise judgment for entailment requires the accumulation of information over the entire sentence. ",
807
+ "bbox": [
808
+ 174,
809
+ 853,
810
+ 825,
811
+ 924
812
+ ],
813
+ "page_idx": 6
814
+ },
815
+ {
816
+ "type": "text",
817
+ "text": "",
818
+ "bbox": [
819
+ 174,
820
+ 103,
821
+ 825,
822
+ 214
823
+ ],
824
+ "page_idx": 7
825
+ },
826
+ {
827
+ "type": "text",
828
+ "text": "The learned trees, although not necessarily linguistically plausible, tend to have direct connections between words whose relations are crucial for the down-stream task. As an example, consider the sentence pair from SNLI: ",
829
+ "bbox": [
830
+ 176,
831
+ 222,
832
+ 825,
833
+ 263
834
+ ],
835
+ "page_idx": 7
836
+ },
837
+ {
838
+ "type": "text",
839
+ "text": "A man uses a projector to give a presentation. A man is using a projector to watch television. ",
840
+ "bbox": [
841
+ 181,
842
+ 270,
843
+ 807,
844
+ 285
845
+ ],
846
+ "page_idx": 7
847
+ },
848
+ {
849
+ "type": "text",
850
+ "text": "Fig. 1c shows the tree of the premise induced by the model ‘RNs intra-attn $^ +$ latent tree’. The word presentation is directly linked to the word projector, and this dependency helps the model to realise that the projector is used for a presentation rather than watching TV, and therefore predict their relationship as contradiction. By contrast, as shown in Fig. 1d, there are multiple hops between these two words in the parse tree given by an external parser. The model ‘RNs intra-attn $^ +$ supervised tree’, which is based on this parse, fails to yield the correct answer. ",
851
+ "bbox": [
852
+ 173,
853
+ 290,
854
+ 825,
855
+ 375
856
+ ],
857
+ "page_idx": 7
858
+ },
859
+ {
860
+ "type": "text",
861
+ "text": "In contrast, Fig. 1e and 1f illustrate an example where the models with latent trees failed but supervised trees were successful. In this case, the latent model has drawn attention to what, which is generally a good strategy for this task, but in this case the restrictor birthday carries the crucial evidence that the answer is number. ",
862
+ "bbox": [
863
+ 174,
864
+ 382,
865
+ 825,
866
+ 436
867
+ ],
868
+ "page_idx": 7
869
+ },
870
+ {
871
+ "type": "text",
872
+ "text": "Comparing the output of vanilla RNs and recurrent RNs (both with tree constraints), we find that recurrent RNs are better at capturing multi-step inference. For instance, to decide the type of the question What is the statue of liberty made of? the model should capture the relations between What and statue of liberty, statue of liberty and made, made and of. While recurrent RNs classify its type correctly (as entity), vanilla RNs misclassify it as description, which would be the type of the prefix What is the statue of liberty. ",
873
+ "bbox": [
874
+ 174,
875
+ 444,
876
+ 825,
877
+ 529
878
+ ],
879
+ "page_idx": 7
880
+ },
881
+ {
882
+ "type": "text",
883
+ "text": "6 RELATED WORK ",
884
+ "text_level": 1,
885
+ "bbox": [
886
+ 176,
887
+ 549,
888
+ 341,
889
+ 564
890
+ ],
891
+ "page_idx": 7
892
+ },
893
+ {
894
+ "type": "text",
895
+ "text": "In sentence encoders, standard neural-network architectures for composing word embeddings are convolutional neural networks (CNNs) (Kalchbrenner et al., 2014; Kim, 2014), and LSTMs (Conneau et al., 2017). However, there has been considerable effort in embedding tree structure to modulate the behavior of encoders (Bowman et al., 2016; Tai et al., 2015; Socher et al., 2013). More recently, a series of work has developed methods for learning custom tree structures to optimise downstream performance (Yogatama et al., 2017; Maillard et al., 2017; Choi et al., 2017). ",
896
+ "bbox": [
897
+ 174,
898
+ 579,
899
+ 825,
900
+ 662
901
+ ],
902
+ "page_idx": 7
903
+ },
904
+ {
905
+ "type": "text",
906
+ "text": "The intra-sentence attention mechanism we used in our model was introduced by Cheng et al. (2016); Parikh et al. (2016). Subsequently, Liu & Lapata (2017) and Kim et al. (2017) added structural biases to the attention, making them induce latent dependency trees. ",
907
+ "bbox": [
908
+ 174,
909
+ 670,
910
+ 825,
911
+ 712
912
+ ],
913
+ "page_idx": 7
914
+ },
915
+ {
916
+ "type": "text",
917
+ "text": "Our model encodes sentences by explicitly computing the relations between words in a sentence. Another type of model that involves relation-centric computation is graph convolutional networks (Kipf & Welling, 2017), which have been applied to the tasks of semantic role labelling (Marcheggiani & Titov, 2017), machine translation (Bastings et al., 2017), and knowledge base completion (Schlichtkrull et al., 2017). ",
918
+ "bbox": [
919
+ 174,
920
+ 719,
921
+ 825,
922
+ 789
923
+ ],
924
+ "page_idx": 7
925
+ },
926
+ {
927
+ "type": "text",
928
+ "text": "7 CONCLUSION ",
929
+ "text_level": 1,
930
+ "bbox": [
931
+ 176,
932
+ 808,
933
+ 318,
934
+ 824
935
+ ],
936
+ "page_idx": 7
937
+ },
938
+ {
939
+ "type": "text",
940
+ "text": "In this paper we developed a new strategy for encoding sentences based on two extensions to relation networks (Santoro et al., 2017; Palm et al., 2017) that help them represent structured sentences by using dependency tree information, and that help them represent higher-order relations using an iterative message passing approach to computing representations. These enhancements significantly improve the quality of relation-based representation across a variety of tasks, and make them comparable to best existing encoders. ",
941
+ "bbox": [
942
+ 174,
943
+ 840,
944
+ 825,
945
+ 922
946
+ ],
947
+ "page_idx": 7
948
+ },
949
+ {
950
+ "type": "text",
951
+ "text": "REFERENCES ",
952
+ "text_level": 1,
953
+ "bbox": [
954
+ 176,
955
+ 102,
956
+ 287,
957
+ 118
958
+ ],
959
+ "page_idx": 8
960
+ },
961
+ {
962
+ "type": "text",
963
+ "text": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In Proceedings of ICLR, 2015. ",
964
+ "bbox": [
965
+ 173,
966
+ 126,
967
+ 823,
968
+ 155
969
+ ],
970
+ "page_idx": 8
971
+ },
972
+ {
973
+ "type": "text",
974
+ "text": "Joost Bastings, Ivan Titov, Wilker Aziz, Diego Marcheggiani, and Khalil Sima’an. Graph convolutional encoders for syntax-aware neural machine translation. In Proceedings of EMNLP, 2017. ",
975
+ "bbox": [
976
+ 176,
977
+ 165,
978
+ 823,
979
+ 207
980
+ ],
981
+ "page_idx": 8
982
+ },
983
+ {
984
+ "type": "text",
985
+ "text": "Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. A large annotated corpus for learning natural language inference. In Proceedings of EMNLP, 2015. ",
986
+ "bbox": [
987
+ 171,
988
+ 217,
989
+ 823,
990
+ 247
991
+ ],
992
+ "page_idx": 8
993
+ },
994
+ {
995
+ "type": "text",
996
+ "text": "Samuel R. Bowman, Jon Gauthier, Abhinav Rastogi, Raghav Gupta, Christopher D. Manning, and Christopher Potts. A fast unified model for parsing and sentence understanding. In Proceedings of ACL, 2016. ",
997
+ "bbox": [
998
+ 173,
999
+ 256,
1000
+ 826,
1001
+ 299
1002
+ ],
1003
+ "page_idx": 8
1004
+ },
1005
+ {
1006
+ "type": "text",
1007
+ "text": "Jianpeng Cheng, Li Dong, and Mirella Lapata. Long short-term memory-networks for machine reading. In Proceedings of EMNLP, 2016. ",
1008
+ "bbox": [
1009
+ 173,
1010
+ 309,
1011
+ 823,
1012
+ 339
1013
+ ],
1014
+ "page_idx": 8
1015
+ },
1016
+ {
1017
+ "type": "text",
1018
+ "text": "Kyunghyun Cho, Bart van Merrienboer, C¸ aglar Gul¨ c¸ehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In Proceedings of EMNLP, 2014. ",
1019
+ "bbox": [
1020
+ 173,
1021
+ 348,
1022
+ 826,
1023
+ 391
1024
+ ],
1025
+ "page_idx": 8
1026
+ },
1027
+ {
1028
+ "type": "text",
1029
+ "text": "Jihun Choi, Kang Min Yoo, and Sang goo Lee. Learning to compose task-specific tree structures. In Proceedings of AAAI, 2017. ",
1030
+ "bbox": [
1031
+ 169,
1032
+ 401,
1033
+ 825,
1034
+ 430
1035
+ ],
1036
+ "page_idx": 8
1037
+ },
1038
+ {
1039
+ "type": "text",
1040
+ "text": "Yoeng-Jin Chu and Tseng-Hong Liu. On the shortest arborescence of a directed graph. Science Sinica, 14:1396–1400, 1965. ",
1041
+ "bbox": [
1042
+ 171,
1043
+ 439,
1044
+ 823,
1045
+ 469
1046
+ ],
1047
+ "page_idx": 8
1048
+ },
1049
+ {
1050
+ "type": "text",
1051
+ "text": "Jonathan H. Clark, Chris Dyer, Alon Lavie, and Noah A. Smith. Better hypothesis testing for statistical machine translation: Controlling for optimizer instability. In Proceedings of ACL-HLT, 2011. ",
1052
+ "bbox": [
1053
+ 173,
1054
+ 478,
1055
+ 825,
1056
+ 521
1057
+ ],
1058
+ "page_idx": 8
1059
+ },
1060
+ {
1061
+ "type": "text",
1062
+ "text": "Alexis Conneau, Douwe Kiela, Holger Schwenk, Lo¨ıc Barrault, and Antoine Bordes. Supervised learning of universal sentence representations from natural language inference data. In Proceedings of EMNLP, 2017. ",
1063
+ "bbox": [
1064
+ 174,
1065
+ 531,
1066
+ 825,
1067
+ 574
1068
+ ],
1069
+ "page_idx": 8
1070
+ },
1071
+ {
1072
+ "type": "text",
1073
+ "text": "Ann Copestake, Dan Flickinger, Carl Pollard, and Ivan A. Sag. Minimal recursion semantics: An introduction. Research on Language and Computation, 2–3(3):281–332, 2005. ",
1074
+ "bbox": [
1075
+ 173,
1076
+ 583,
1077
+ 821,
1078
+ 613
1079
+ ],
1080
+ "page_idx": 8
1081
+ },
1082
+ {
1083
+ "type": "text",
1084
+ "text": "Timothy Dozat and Christopher D. Manning. Deep biaffine attention for neural dependency parsing. In Proceedings of ICLR, 2017. ",
1085
+ "bbox": [
1086
+ 174,
1087
+ 622,
1088
+ 823,
1089
+ 652
1090
+ ],
1091
+ "page_idx": 8
1092
+ },
1093
+ {
1094
+ "type": "text",
1095
+ "text": "John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12(Jul):2121–2159, 2011. ",
1096
+ "bbox": [
1097
+ 173,
1098
+ 661,
1099
+ 823,
1100
+ 691
1101
+ ],
1102
+ "page_idx": 8
1103
+ },
1104
+ {
1105
+ "type": "text",
1106
+ "text": "Jack Edmonds. Optimum branchings. Journal of Research of the National Bureau of Standards B, 71 (4):233–240, 1967. ",
1107
+ "bbox": [
1108
+ 173,
1109
+ 700,
1110
+ 825,
1111
+ 729
1112
+ ],
1113
+ "page_idx": 8
1114
+ },
1115
+ {
1116
+ "type": "text",
1117
+ "text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997. ",
1118
+ "bbox": [
1119
+ 171,
1120
+ 739,
1121
+ 825,
1122
+ 768
1123
+ ],
1124
+ "page_idx": 8
1125
+ },
1126
+ {
1127
+ "type": "text",
1128
+ "text": "Po-Sen Huang, Chong Wang, Sitao Huang, Dengyong Zhou, and Li Deng. Towards neural phrasebased machine translation. In Proceedings of ICLR, 2018. ",
1129
+ "bbox": [
1130
+ 171,
1131
+ 777,
1132
+ 825,
1133
+ 808
1134
+ ],
1135
+ "page_idx": 8
1136
+ },
1137
+ {
1138
+ "type": "text",
1139
+ "text": "Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144, 2016. ",
1140
+ "bbox": [
1141
+ 171,
1142
+ 816,
1143
+ 825,
1144
+ 847
1145
+ ],
1146
+ "page_idx": 8
1147
+ },
1148
+ {
1149
+ "type": "text",
1150
+ "text": "Nal Kalchbrenner, Edward Grefenstette, and Phil Blunsom. A convolutional neural network for modelling sentences. In Proceedings of ACL, 2014. ",
1151
+ "bbox": [
1152
+ 174,
1153
+ 856,
1154
+ 823,
1155
+ 886
1156
+ ],
1157
+ "page_idx": 8
1158
+ },
1159
+ {
1160
+ "type": "text",
1161
+ "text": "Yoon Kim. Convolutional neural networks for sentence classification. In Proceedings of EMNLP, 2014. ",
1162
+ "bbox": [
1163
+ 176,
1164
+ 895,
1165
+ 823,
1166
+ 924
1167
+ ],
1168
+ "page_idx": 8
1169
+ },
1170
+ {
1171
+ "type": "text",
1172
+ "text": "Yoon Kim, Carl Denton, Luong Hoang, and Alexander M Rush. Structured attention networks. In Proceedings of ICLR, 2017. ",
1173
+ "bbox": [
1174
+ 173,
1175
+ 103,
1176
+ 825,
1177
+ 132
1178
+ ],
1179
+ "page_idx": 9
1180
+ },
1181
+ {
1182
+ "type": "text",
1183
+ "text": "Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. ",
1184
+ "bbox": [
1185
+ 173,
1186
+ 141,
1187
+ 823,
1188
+ 170
1189
+ ],
1190
+ "page_idx": 9
1191
+ },
1192
+ {
1193
+ "type": "text",
1194
+ "text": "Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In Proceedings of ICLR, 2017. ",
1195
+ "bbox": [
1196
+ 171,
1197
+ 178,
1198
+ 825,
1199
+ 208
1200
+ ],
1201
+ "page_idx": 9
1202
+ },
1203
+ {
1204
+ "type": "text",
1205
+ "text": "Lingpeng Kong, Chris Alberti, Daniel Andor, Ivan Bogatyy, and David Weiss. DRAGNN: A transition-based framework for dynamically connected neural networks. March 2017. ",
1206
+ "bbox": [
1207
+ 173,
1208
+ 215,
1209
+ 825,
1210
+ 244
1211
+ ],
1212
+ "page_idx": 9
1213
+ },
1214
+ {
1215
+ "type": "text",
1216
+ "text": "Terry Koo, Amir Globerson, Xavier Carreras Perez, and Michael Collins. Structured prediction ´ models via the matrix-tree theorem. In Proceedings of EMNLP-CoNLL, 2007. ",
1217
+ "bbox": [
1218
+ 173,
1219
+ 252,
1220
+ 825,
1221
+ 284
1222
+ ],
1223
+ "page_idx": 9
1224
+ },
1225
+ {
1226
+ "type": "text",
1227
+ "text": "Xin Li and Dan Roth. Learning question classifiers. In Proceedings of COLING, 2002. ",
1228
+ "bbox": [
1229
+ 173,
1230
+ 290,
1231
+ 746,
1232
+ 306
1233
+ ],
1234
+ "page_idx": 9
1235
+ },
1236
+ {
1237
+ "type": "text",
1238
+ "text": "Yang Liu and Mirella Lapata. Learning structured text representations. In Transaction of ACL, 2017. ",
1239
+ "bbox": [
1240
+ 169,
1241
+ 314,
1242
+ 823,
1243
+ 330
1244
+ ],
1245
+ "page_idx": 9
1246
+ },
1247
+ {
1248
+ "type": "text",
1249
+ "text": "Minh-Thang Luong and Christopher D Manning. Stanford neural machine translation systems for spoken language domains. In Proceedings of the International Workshop on Spoken Language Translation, 2015. ",
1250
+ "bbox": [
1251
+ 178,
1252
+ 338,
1253
+ 825,
1254
+ 381
1255
+ ],
1256
+ "page_idx": 9
1257
+ },
1258
+ {
1259
+ "type": "text",
1260
+ "text": "Mingbo Ma, Liang Huang, Bing Xing, and Bowen Zhou. Dependency-based convolutional neural networks for sentence embedding. In Proceedings of ACL, 2015. ",
1261
+ "bbox": [
1262
+ 171,
1263
+ 388,
1264
+ 823,
1265
+ 419
1266
+ ],
1267
+ "page_idx": 9
1268
+ },
1269
+ {
1270
+ "type": "text",
1271
+ "text": "Xuezhe Ma and Eduard Hovy. Neural probabilistic model for non-projective mst parsing. arXiv preprint arXiv:1701.00874, 2017. ",
1272
+ "bbox": [
1273
+ 171,
1274
+ 426,
1275
+ 823,
1276
+ 457
1277
+ ],
1278
+ "page_idx": 9
1279
+ },
1280
+ {
1281
+ "type": "text",
1282
+ "text": "Jean Maillard, Stephen Clark, and Dani Yogatama. Jointly learning sentence embeddings and syntax with unsupervised tree-lstms. CoRR, 2017. URL http://arxiv.org/abs/1705.09189. ",
1283
+ "bbox": [
1284
+ 173,
1285
+ 464,
1286
+ 823,
1287
+ 494
1288
+ ],
1289
+ "page_idx": 9
1290
+ },
1291
+ {
1292
+ "type": "text",
1293
+ "text": "Diego Marcheggiani and Ivan Titov. Encoding sentences with graph convolutional networks for semantic role labeling. In Proceedings of EMNLP, 2017. ",
1294
+ "bbox": [
1295
+ 171,
1296
+ 502,
1297
+ 823,
1298
+ 531
1299
+ ],
1300
+ "page_idx": 9
1301
+ },
1302
+ {
1303
+ "type": "text",
1304
+ "text": "Massimo Nicosia and Alessandro Moschitti. Accurate sentence matching with hybrid siamese networks. In Proceedings of CIKM, 2017. ",
1305
+ "bbox": [
1306
+ 169,
1307
+ 540,
1308
+ 825,
1309
+ 569
1310
+ ],
1311
+ "page_idx": 9
1312
+ },
1313
+ {
1314
+ "type": "text",
1315
+ "text": "Joakim Nivre, Marie-Catherine de Marneffe, Filip Ginter, Yoav Goldberg, Jan Hajic, Christopher D Manning, Ryan T McDonald, Slav Petrov, Sampo Pyysalo, Natalia Silveira, and Others. Universal dependencies v1: A multilingual treebank collection. In Proceedings of LREC, 2016. ",
1316
+ "bbox": [
1317
+ 176,
1318
+ 577,
1319
+ 825,
1320
+ 621
1321
+ ],
1322
+ "page_idx": 9
1323
+ },
1324
+ {
1325
+ "type": "text",
1326
+ "text": "Rasmus Berg Palm, Ulrich Paquet, and Ole Winther. Recurrent relational networks for complex relational reasoning. arXiv preprint arXiv:1711.08028, 2017. ",
1327
+ "bbox": [
1328
+ 169,
1329
+ 627,
1330
+ 823,
1331
+ 659
1332
+ ],
1333
+ "page_idx": 9
1334
+ },
1335
+ {
1336
+ "type": "text",
1337
+ "text": "Ankur P. Parikh, Oscar Tackstr ¨ om, Dipanjan Das, and Jakob Uszkoreit. A decomposable attention ¨ model for natural language inference. In Proceedings of EMNLP, 2016. ",
1338
+ "bbox": [
1339
+ 169,
1340
+ 665,
1341
+ 823,
1342
+ 695
1343
+ ],
1344
+ "page_idx": 9
1345
+ },
1346
+ {
1347
+ "type": "text",
1348
+ "text": "Jeffrey Pennington, Richard Socher, and Christopher Manning. Glove: Global vectors for word representation. In Proceedings of EMNLP, 2014. ",
1349
+ "bbox": [
1350
+ 169,
1351
+ 703,
1352
+ 823,
1353
+ 733
1354
+ ],
1355
+ "page_idx": 9
1356
+ },
1357
+ {
1358
+ "type": "text",
1359
+ "text": "Adam Santoro, David Raposo, David G Barrett, Mateusz Malinowski, Razvan Pascanu, Peter Battaglia, and Tim Lillicrap. A simple neural network module for relational reasoning. In Proceedings of NIPS, 2017. ",
1360
+ "bbox": [
1361
+ 174,
1362
+ 741,
1363
+ 825,
1364
+ 784
1365
+ ],
1366
+ "page_idx": 9
1367
+ },
1368
+ {
1369
+ "type": "text",
1370
+ "text": "Michael Sejr Schlichtkrull, Thomas N. Kipf, Peter Bloem, Rianne van den Berg, Ivan Titov, and Max Welling. Modeling relational data with graph convolutional networks. CoRR, abs/1703.06103, 2017. ",
1371
+ "bbox": [
1372
+ 173,
1373
+ 791,
1374
+ 825,
1375
+ 835
1376
+ ],
1377
+ "page_idx": 9
1378
+ },
1379
+ {
1380
+ "type": "text",
1381
+ "text": "Tao Shen, Tianyi Zhou, Guodong Long, Jing Jiang, Sen Wang, and Chengqi Zhang. Reinforced self-attention network: a hybrid of hard and soft attention for sequence modeling. arXiv preprint arXiv:1801.10296, 2018. ",
1382
+ "bbox": [
1383
+ 173,
1384
+ 843,
1385
+ 823,
1386
+ 886
1387
+ ],
1388
+ "page_idx": 9
1389
+ },
1390
+ {
1391
+ "type": "text",
1392
+ "text": "David A Smith and Noah A Smith. Probabilistic models of nonprojective dependency trees. In Proceedings of EMNLP-CoNLL, 2007. ",
1393
+ "bbox": [
1394
+ 173,
1395
+ 895,
1396
+ 821,
1397
+ 924
1398
+ ],
1399
+ "page_idx": 9
1400
+ },
1401
+ {
1402
+ "type": "text",
1403
+ "text": "Paul Smolensky. Tensor product variable binding and the representation of symbolic structures in connectionist systems. Artif. Intell., 46(1-2):159–216, 1990. doi: 10.1016/0004-3702(90)90007-M. URL https://doi.org/10.1016/0004-3702(90)90007-M. ",
1404
+ "bbox": [
1405
+ 176,
1406
+ 103,
1407
+ 823,
1408
+ 146
1409
+ ],
1410
+ "page_idx": 10
1411
+ },
1412
+ {
1413
+ "type": "text",
1414
+ "text": "Richard Socher, Alex Perelygin, Jean Y. Wu, Jason Chuang, Christopher D. Manning, Andrew Y. Ng, and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of EMNLP, 2013. ",
1415
+ "bbox": [
1416
+ 174,
1417
+ 155,
1418
+ 821,
1419
+ 198
1420
+ ],
1421
+ "page_idx": 10
1422
+ },
1423
+ {
1424
+ "type": "text",
1425
+ "text": "Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. Sequence to sequence learning with neural networks. In Proceedings of NIPS, 2014. ",
1426
+ "bbox": [
1427
+ 173,
1428
+ 207,
1429
+ 825,
1430
+ 234
1431
+ ],
1432
+ "page_idx": 10
1433
+ },
1434
+ {
1435
+ "type": "text",
1436
+ "text": "Kai Sheng Tai, Richard Socher, and Christopher D. Manning. Improved semantic representations from tree-structured long short-term memory networks. In Proceedings of ACL, 2015. ",
1437
+ "bbox": [
1438
+ 174,
1439
+ 244,
1440
+ 823,
1441
+ 273
1442
+ ],
1443
+ "page_idx": 10
1444
+ },
1445
+ {
1446
+ "type": "text",
1447
+ "text": "Gaurav Singh Tomar, Thyago Duque, Oscar Tackstr ¨ om, Jakob Uszkoreit, and Dipanjan Das. Neural ¨ paraphrase identification of questions with noisy pretraining. arXiv preprint arXiv:1704.04565, 2017. ",
1448
+ "bbox": [
1449
+ 174,
1450
+ 281,
1451
+ 826,
1452
+ 324
1453
+ ],
1454
+ "page_idx": 10
1455
+ },
1456
+ {
1457
+ "type": "text",
1458
+ "text": "William Thomas Tutte. Graph theory. Addison-Wesley Publishing Company Advanced Book Program, Reading, MA, 1984. ",
1459
+ "bbox": [
1460
+ 176,
1461
+ 333,
1462
+ 823,
1463
+ 363
1464
+ ],
1465
+ "page_idx": 10
1466
+ },
1467
+ {
1468
+ "type": "text",
1469
+ "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 Proceedings of NIPS, 2017. ",
1470
+ "bbox": [
1471
+ 173,
1472
+ 371,
1473
+ 823,
1474
+ 400
1475
+ ],
1476
+ "page_idx": 10
1477
+ },
1478
+ {
1479
+ "type": "text",
1480
+ "text": "Zhiguo Wang, Wael Hamza, and Radu Florian. Bilateral multi-perspective matching for natural language sentences. In Proceedings of IJCAI, 2017. ",
1481
+ "bbox": [
1482
+ 173,
1483
+ 409,
1484
+ 823,
1485
+ 438
1486
+ ],
1487
+ "page_idx": 10
1488
+ },
1489
+ {
1490
+ "type": "text",
1491
+ "text": "David Weiss, Chris Alberti, Michael Collins, and Slav Petrov. Structured training for neural network Transition-Based parsing. June 2015. ",
1492
+ "bbox": [
1493
+ 174,
1494
+ 446,
1495
+ 823,
1496
+ 476
1497
+ ],
1498
+ "page_idx": 10
1499
+ },
1500
+ {
1501
+ "type": "text",
1502
+ "text": "Adina Williams, Andrew Drozdov, and Samuel R Bowman. Learning to parse from a semantic objective: It works. is it syntax? arXiv preprint arXiv:1709.01121, 2017. ",
1503
+ "bbox": [
1504
+ 174,
1505
+ 484,
1506
+ 823,
1507
+ 513
1508
+ ],
1509
+ "page_idx": 10
1510
+ },
1511
+ {
1512
+ "type": "text",
1513
+ "text": "Dani Yogatama, Phil Blunsom, Chris Dyer, Edward Grefenstette, and Wang Ling. Learning to compose words into sentences with reinforcement learning. In Proceedings of ICLR, 2017. ",
1514
+ "bbox": [
1515
+ 173,
1516
+ 522,
1517
+ 823,
1518
+ 551
1519
+ ],
1520
+ "page_idx": 10
1521
+ },
1522
+ {
1523
+ "type": "text",
1524
+ "text": "Lei Yu, Phil Blunsom, Chris Dyer, Edward Grefenstette, and Tomas Kocisk ´ y. The neural noisy ´ channel. In Proceedings of ICLR, 2017. ",
1525
+ "bbox": [
1526
+ 173,
1527
+ 560,
1528
+ 823,
1529
+ 589
1530
+ ],
1531
+ "page_idx": 10
1532
+ },
1533
+ {
1534
+ "type": "text",
1535
+ "text": "A APPENDIX ",
1536
+ "text_level": 1,
1537
+ "bbox": [
1538
+ 176,
1539
+ 102,
1540
+ 297,
1541
+ 117
1542
+ ],
1543
+ "page_idx": 11
1544
+ },
1545
+ {
1546
+ "type": "text",
1547
+ "text": "A.1 IMPLEMENTATION DETAILS ",
1548
+ "text_level": 1,
1549
+ "bbox": [
1550
+ 176,
1551
+ 133,
1552
+ 410,
1553
+ 147
1554
+ ],
1555
+ "page_idx": 11
1556
+ },
1557
+ {
1558
+ "type": "text",
1559
+ "text": "For all the experiments, hyperparameters are optimised via grid search on the accuracy or perplexity of the validation set. ",
1560
+ "bbox": [
1561
+ 174,
1562
+ 160,
1563
+ 823,
1564
+ 188
1565
+ ],
1566
+ "page_idx": 11
1567
+ },
1568
+ {
1569
+ "type": "text",
1570
+ "text": "In classification tasks, the models are optimised either with Adam (Kingma & Ba, 2014) with learning rate 0.0001 or Adagrad (Duchi et al., 2011) with learning rate 0.01, as determined by the performance on the validation set. Word embeddings are initialised with 300 dimensional GloVe vectors trained on Common Crawl $8 4 0 \\mathrm { B } ^ { 8 }$ (Pennington et al., 2014) and finetuned during training. The output of BiLSTM is fed as input to the RNs. The number of hidden units for BiLSTMs is 300. For the functions $g _ { \\theta }$ and $f _ { \\phi }$ in RNs, we use two-hidden layer MLPs, consisting of 300 hidden units per layer with ReLU non-linearities. We add residual connections to the MLPs that parameterise $g _ { \\theta }$ and $f _ { \\phi }$ . Dropout (rate 0.5) is applied to the input and output of BiLSTMs. We replace the sum operations in Eq. 1 by max and use max pooling in the final layer of our model with intra-attention and the model based on recurrent RNs. ",
1571
+ "bbox": [
1572
+ 174,
1573
+ 194,
1574
+ 825,
1575
+ 333
1576
+ ],
1577
+ "page_idx": 11
1578
+ },
1579
+ {
1580
+ "type": "text",
1581
+ "text": "In both machine translation tasks, the functions $f _ { \\phi }$ and $g _ { \\theta }$ are parameterised using two-hidden layer MLPs, consisting of 512 hidden units per layer with ReLU. A beam size of 10 is used for decoding. For English-Vietnamese, we use 1 layer BiLSTM with 512 hidden units as encoder and 2-layer unidirectional LSTM as decoder. The model is optimised using stochastic gradient descent with learning rate 0.2 and dropout 0.5. For Chinese-English, the encoder is 1 layer BiLSTM and the decoder is 1 layer unidirectional LSTM (512 hidden units). We use Adam (Kingma & Ba, 2014) as optimiser with learning rate 0.0001. Dropout rate is 0.5. For all experiments with recurrent RNs, we set the number of recurrent steps to 3. ",
1582
+ "bbox": [
1583
+ 174,
1584
+ 340,
1585
+ 825,
1586
+ 452
1587
+ ],
1588
+ "page_idx": 11
1589
+ }
1590
+ ]
parse/train/rJxXDsCqYX/rJxXDsCqYX_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rJxXDsCqYX/rJxXDsCqYX_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rndqBJsGoKh/rndqBJsGoKh.md ADDED
@@ -0,0 +1,284 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SOFT: Softmax-free Transformer with Linear Complexity
2
+
3
+ Jiachen Lu1 Jinghan Yao1 Junge Zhang1 Xiatian Zhu2 Hang $\mathbf { X } \mathbf { u } ^ { 3 }$ Weiguo Gao1 Chunjing Xu3 Tao Xiang2 Li Zhang1∗
4
+
5
+ 1Fudan University 2University of Surrey
6
+
7
+ 3Huawei Noah’s Ark Lab
8
+
9
+ https://fudan-zvg.github.io/SOFT
10
+
11
+ # Abstract
12
+
13
+ Vision transformers (ViTs) have pushed the state-of-the-art for various visual recognition tasks by patch-wise image tokenization followed by self-attention. However, the employment of self-attention modules results in a quadratic complexity in both computation and memory usage. Various attempts on approximating the selfattention computation with linear complexity have been made in Natural Language Processing. However, an in-depth analysis in this work shows that they are either theoretically flawed or empirically ineffective for visual recognition. We further identify that their limitations are rooted in keeping the softmax self-attention during approximations. Specifically, conventional self-attention is computed by normalizing the scaled dot-product between token feature vectors. Keeping this softmax operation challenges any subsequent linearization efforts. Based on this insight, for the first time, a softmax-free transformer or SOFT is proposed. To remove softmax in self-attention, Gaussian kernel function is used to replace the dot-product similarity without further normalization. This enables a full self-attention matrix to be approximated via a low-rank matrix decomposition. The robustness of the approximation is achieved by calculating its Moore-Penrose inverse using a Newton-Raphson method. Extensive experiments on ImageNet show that our SOFT significantly improves the computational efficiency of existing ViT variants. Crucially, with a linear complexity, much longer token sequences are permitted in SOFT, resulting in superior trade-off between accuracy and complexity.
14
+
15
+ # 1 Introduction
16
+
17
+ Recently the step change brought by Transformers [33] in natural language processing (NLP) [10, 4] seems to have arrived in vision [11, 41, 47, 46]. Indeed, with less inductive bias in its architecture design than Convolution neural networks (CNNs), pure Vision Transformer (ViT) [11] and its variants have shown to be able to outperform CNNs on various vision tasks [8, 15]. However, there is a bottleneck in any Transformer based model, namely its quadratic complexity in both computation and memory usage. This is intrinsic to the self-attention mechanism: given a sequence of tokens (e.g., words or image patches) as input, the self-attention module iteratively learns the feature representations by relating one token to all other tokens. This results in a quadratic complexity $O ( n ^ { 2 } )$ with the token sequence length $n$ in both computation (time) and memory (space) since an $n \times n$ sized attention matrix needs to be computed and saved during inference. This problem is particularly acute in vision: a 2D image after tokenization will produce a far longer sequence than those in NLP even with a moderate spatial resolution. This quadratic complexity thus prevents a ViT model from modeling images at high spatial resolutions, which are often crucial for visual recognition tasks.
18
+
19
+ ![](images/21eeda7dcaa4b05139da8729b189b3dd99590e1517d4f44cd949d34aec3776d6.jpg)
20
+ Figure 1: Top1-Accuracy on ImageNet [9] validation set with respect to parameters and the memory usage corresponding to the token sequence length in practice compared to other methods. (a) Comparison with CNN models: RegNet [26], ResNet [13] and Transformer models: PVT [35], DeiT [31], ViT [11], T2T-ViT [41], Twins-SVT [6] and SAN10 [45]; (b) Comparison with Transformer [33], Linformer [34], Nyströformer [39] and Performer [5]. The memory usage is measured with a batch size of 1 on a 16GB Tesla V100.
21
+
22
+ A natural solution is to reduce the complexity of self-attention computation via approximation. Indeed, there have been a number of attempts in NLP [34, 5, 18, 39]. For example, [34] takes a naive approach by shortening the length of Key and Value via learnable projections. Such a coarse approximation would inevitably cause performance degradation. In contrast, [5, 17] both leverage the kernel mechanism to approximate softmax normalization to linearize the computation in self-attention. [18] instead adopts a hashing strategy to selectively compute the most similar pairs. Recently, [39] uses Nyström matrix decomposition to reconstruct the full attention matrix with polynomial iteration for approximating the pseudo-inverse of the landmark matrix. Nonetheless, softmax normalization is simply duplicated across the matrix decomposition process, which is theoretically unsound. We empirically found that none of these methods are effective when applied to vision (see Sec. 4.2).
23
+
24
+ In this work, we identify that the limitations of existing efficient Transformers are caused by the use of softmax self-attention, and for the first time propose a softmax-free Transformer. More specifically, in all existing Transformers (with or without linearization), a softmax normalization is needed on top of scaled dot-product between token feature vectors [33]. Keeping this softmax operation challenges any subsequent linearization efforts. To overcome this obstacle, we introduce a novel softmax-free self-attention mechanism, named as SOFT, with linear complexity $O ( n )$ in both space and time. Specifically, SOFT uses Gaussian kernel to define the similarity (self-attention) function without the need for subsequent softmax normalization. With this softmax-free attention matrix, we further introduce a novel low-rank matrix decomposition algorithm for approximation. The robustness of the approximation is theoretically guaranteed by employing a Newton-Raphson method for reliably computing the Moore-Penrose inverse of the matrix.
25
+
26
+ We make the following contributions. (I) We introduce a novel softmax-free Transformer with linear space and time complexity. $\mathbf { \Pi } ^ { ( \mathbf { I I } ) }$ Our attention matrix approximation is achieved through a novel matrix decomposition algorithm with theoretical guarantee. (III) To evaluate our method for visual recognition tasks, we design a family of generic backbone architectures with varying capacities using SOFT as the core self-attention component. Extensive experiments show that with a linear complexity (Figure 1b), our SOFT models can take in as input much longer image token sequences. As a result, with the same model size, our SOFT outperforms the state-of-the-art CNNs and ViT variants on ImageNet [9] classification in the accuracy/complexity trade-off (Figure 1a).
27
+
28
+ # 2 Related work
29
+
30
+ Vision Transformers There is a surge of research interests recently in exploiting Transformers for visual recognition tasks [36, 35, 41, 31, 44], inspired by their remarkable success in NLP [33, 10, 4].
31
+
32
+ Core to these NLP and vision transformers is the same self-attention mechanism [33] that computes a self-attention matrix by exhaustively comparing token pairs. This means a quadratic complexity with the sequence length in both space and time, which thus limits the scalability of Transformers in dealing with long sequences. This limitation is more serious in vision than NLP: To process an image with at least thousands of pixels, patch-wise tokenization is a must for Transformers to control the computational cost. Given higher resolution images, the patch size also needs to be enlarged proportionally sacrificing the spatial resolution. This limits the capability of Transformers, e.g., learning fine-grained feature representation as required in many visual recognition tasks.
33
+
34
+ Linear Transformers Recently, there have been a number of linear/efficient variants [5, 34, 17, 18, 30, 24, 16] of Transformers in NLP. For example, [34] learns to shrink the length of Key and Value based on a low-rank assumption. [18] adopts a hashing strategy to selective the most similar pairs and only compute attention among them. [5, 17] utilize different kernel functions for approximating softmax-based self-attention matrix. [24] applies random feature mapping on the sequences to approach the original softmax function. [16] decreases the time and memory consumption of the attention matrix by replacing the softmax function with its linear-complexity recurrent alternative. When applied to visual recognition tasks, however, we show that these models have considerable performance degradation compared to the standard Transformers [33] (see Sec. 4.2).
35
+
36
+ The most related work to SOFT is [39] which uses the Nyström matrix decomposition to avoid computing the full attention matrix. However, this method suffers from several theoretical defects: (1) As the standard self-attention needs to apply row-wise softmax normalization on the full attention matrix, a direct application of matrix decomposition is infeasible. As a workaround, softmax is simply applied to all the ingredient matrices in [39]. Such an approximation is not guaranteed theoretically. (2) With a polynomial iteration method, it is not guaranteed that the generalized attention matrix inverse can be computed when the matrix is a nearly singular one in practice. In contrast to all the above methods, in this paper we propose a softmax-free self-attention mechanism that facilitates matrix decomposition for complexity minimization with theoretical guarantees.
37
+
38
+ # 3 Method
39
+
40
+ # 3.1 Softmax-free self-attention formulation
41
+
42
+ A schematic illustration of our model is given in Figure 2. Let’s first look at our attention module design. Given a sequence of $n$ tokens $\ b { X } ^ { \prime } \in \mathbb { R } ^ { n \times d }$ with each token represented by a $d$ -dimensional feature vector, self-attention [33] aims to discover the correlations of all token pairs exhaustively.
43
+
44
+ Formally, $X$ is first linearly projected into three $d _ { e }$ -dimensional spaces (query, key, and values) as:
45
+
46
+ $$
47
+ Q = X W _ { q } \in \mathbb { R } ^ { n \times d _ { e } } , \quad K = X W _ { k } \in \mathbb { R } ^ { n \times d _ { e } } , \quad V = X W _ { v } \in \mathbb { R } ^ { n \times d _ { e } } ,
48
+ $$
49
+
50
+ where $W _ { q } , W _ { k } , W _ { v } \in \mathbb { R } ^ { d \times d _ { e } }$ are learnable matrices. Self-attention can be expressed in a generic formulation as:
51
+
52
+ $$
53
+ y _ { i , : } = \sum _ { j = 1 } ^ { n } \alpha ( Q _ { i , : } , K _ { j , : } ) \odot V _ { j , : } ,
54
+ $$
55
+
56
+ where $\odot$ is the Hadamard product, and $i , j \in \{ 1 , \cdots , n \}$ index the tokens. The key self-attention function $\alpha : \mathbb { R } ^ { d _ { e } } \times \mathbb { R } ^ { d _ { e } } \to \mathbb { R }$ is composed of a nonlinear function $\beta : \mathbb { R } \mathbb { R }$ and a relation function $\gamma : \mathbb { R } ^ { d _ { e } } \times \mathbb { R } ^ { d _ { e } } \mathbb { R }$ . A dominant instantiation of $\alpha$ is the scaled dot-product based softmax self-attention [33], defined as
57
+
58
+ $$
59
+ \beta ( \cdot ) = \mathrm { s o f t m a x } ( \cdot ) , \quad \gamma ( Q _ { i , : } , K _ { j , : } ) = \frac { 1 } { \sqrt { d _ { e } } } \cdot Q _ { i , : } ^ { \top } K _ { j , : } .
60
+ $$
61
+
62
+ Whilst this softmax self-attention has been the de facto choice and seldomly questioned, as discussed earlier it is not necessarily suited for linearization. To facilitate the design of linear self-attention, we introduce a softmax-free self-attention function with the dot-product replaced by a Gaussian kernel as:
63
+
64
+ $$
65
+ \beta ^ { \prime } ( \cdot ) = \exp ( \cdot ) , \quad \gamma ^ { \prime } ( Q _ { i , : } , K _ { j , : } ) = - \frac { 1 } { 2 \sqrt { d _ { e } } } \cdot \| Q _ { i , : } - K _ { j , : } \| _ { 2 } ^ { 2 } .
66
+ $$
67
+
68
+ ![](images/2f3b028bd2d3ee114e9064ba3e91b9b8a69ba44e1d923199ea4a1fc58e1a7700.jpg)
69
+ Figure 2: Schematic illustration of the proposed softmax-free self-attention (SOFT) method. P.E.: Position embedding. Dash lines: linear projection. dh: the hidden dim of each attention head. ◦ denotes the matrix dot product.
70
+
71
+ To preserve the symmetric property of attention matrix as in Eq (3), we set the project matrices $W _ { q }$ and $W _ { k }$ in Eq (1) identical (i.e., $Q = K .$ ). Our self-attention matrix is then written as:
72
+
73
+ $$
74
+ S _ { i , j } = \exp \left( - \frac { 1 } { 2 \sqrt { d _ { e } } } \cdot \lVert Q _ { i , : } - K _ { j , : } \rVert _ { 2 } ^ { 2 } \right) .
75
+ $$
76
+
77
+ For notation simplicity, we define the matrix formulation as: $S = \exp \left( Q \ominus K \right)$
78
+
79
+ Remarks Our self-attention matrix $S$ has three important properties: (1) It is symmetric; (2) All the elements lie in a unit range of $[ 0 , 1 ]$ ; (3) All diagonal elements hold the largest value 1 (selfreinforced), with the bottom ones (corresponding to most dissimilar token pairs) being close to 0. As Gaussian kernel is a positive definite kernel [12], $S$ is deemed a Gram matrix. However, we find that when using our kernel-based self-attention matrix $S$ without linearization, the training of a transformer fails to converge. This might explain why softmax dot-product based self-attention [33] is so popular in vanilla transformers.
80
+
81
+ # 3.2 Low-rank regularization via matrix decomposition with linear complexity
82
+
83
+ To solve the convergence and quadratic complexity problems, we leverage matrix decomposition as a unified solution with low-rank regularization. In particular, we consider Nyström [38], which is originally a low-rank matrix approximation algorithm. This enables our model’s complexity to be reduced significantly without computing the full self-attention matrix $S$ .
84
+
85
+ We make this choice because our $S$ is positive semi-definite (i.e., a Gram matrix) without follow-up normalization which are all necessary conditions for Nyström. In contrast, [39] totally ignores these requirements, leading to theoretical flaw in its approximation.
86
+
87
+ To define the Nyström method formally, let us express $S = \exp \left( Q \ominus K \right)$ as a block matrix:
88
+
89
+ $$
90
+ \boldsymbol { S } = \left[ \begin{array} { c c } { \boldsymbol { A } } & { \boldsymbol { B } } \\ { \boldsymbol { B } ^ { \top } } & { \boldsymbol { C } } \end{array} \right] \in \mathbb { R } ^ { n \times n } ,
91
+ $$
92
+
93
+ where $A \in \mathbb { R } ^ { m \times m }$ , $B \in \mathbb { R } ^ { m \times ( n - m ) }$ , $C \ \in \ \mathbb { R } ^ { ( n - m ) \times ( n - m ) }$ with $m \ll n$ . Through Nyström decomposition (see derivative details in Supplementary A.1), an approximation can be represented as:
94
+
95
+ $$
96
+ { \hat { S } } = { \left[ \begin{array} { l } { A } \\ { B ^ { \top } } \end{array} \right] } A ^ { \dagger } \left[ A \quad B \right] = P ^ { \top } A ^ { \dagger } P , \quad { \mathrm { w h e r e } } \quad P = \left[ A \quad B \right] ,
97
+ $$
98
+
99
+ and $A ^ { \dagger }$ is the Moore-Penrose (a generalized) inverse of $A$ .
100
+
101
+ Sampling In the standard Nyström formulation, $A$ and $B$ are sub-matrices of $S$ obtained by randomly sampled $m$ tokens, denoted as $\widetilde { Q }$ . We call the sampled $\widetilde { Q }$ as bottleneck tokens. However,
102
+
103
+ Input: $Q \in \mathbb { R } ^ { n \times d _ { e } }$ , sampling function $f _ { s }$ Sampling ${ \widetilde { Q } } \gets f _ { s } ( Q )$ ;
104
+ $A \exp ( \widetilde { Q } \ominus \widetilde { Q } )$ , $P \exp ( \widetilde { Q } \ominus Q )$ ; $\hat { S } P ^ { \top } \mathrm { N R } ( A ) P$ ;
105
+ Output: $\hat { S }$
106
+
107
+ # Algorithm 2: NR: Newton-Raphson iteration
108
+
109
+ Input: $A \in \mathbb { R } ^ { m \times m }$ , and $\mathcal { T } \in \mathbb { Z } ^ { + }$ $\alpha \overset { - } { = } 2 / \Vert A \Vert _ { 1 } ^ { 2 }$ .Initialize $A _ { 0 } \alpha A$ ; for $k$ from 1 to $\tau$ do
110
+ $| \quad { \dot { A _ { k } } } \gets 2 A _ { k - 1 } - A _ { k - 1 } A A _ { k - 1 }$ end
111
+ Output: AT
112
+
113
+ we find empirically that random sampling is considerably sensitive to the choice of $m$ . We hence explore two additional options by leveraging the structural prior of visual data: (1) Using one convolutional layer with kernel size $k$ and stride $k$ to learn $\widetilde { Q }$ , and (2) Using average pooling with kernel size $k$ and stride $k$ to generate $\widetilde { Q }$ . For both, we need to reshape $Q$ to the form of $\mathbb { R } ^ { H \times W \times d _ { e } }$ . Each slide of convolution or pooling produces a token. We set $k$ according to the length of $Q$ such that $m$ tokens can be obtained. Our experiments show that a convolution layer performs better in accuracy. We therefore use a convolution layer by default.
114
+
115
+ As $K$ is identical to $Q$ , we have $\widetilde K = \widetilde Q$ . Given these $m$ tokens, we then compute $A$ and $P$ as:
116
+
117
+ $$
118
+ A = \exp ( \widetilde Q \ominus \widetilde K ) , \quad P = \exp ( \widetilde Q \ominus K ) .
119
+ $$
120
+
121
+ We finally obtain the regularized self-attention matrix $\hat { S }$ of SOFT as:
122
+
123
+ $$
124
+ { \hat { S } } = \exp \left( Q \ominus \widetilde { K } \right) \left( \exp \left( \widetilde { Q } \ominus \widetilde { K } \right) \right) ^ { \dagger } \exp \left( \widetilde { Q } \ominus K \right) ,
125
+ $$
126
+
127
+ leading to Algorithm 1. The low-rank regularization is conducted as follows. For computing the attention score between any two tokens, we first correlate each of them with sampled tokens using our self-attention function (Eq (5)); With this correlation representation we then compute their similarity under the modulation of the generalized inverse of $\tilde { \hat { Q } }$ ’s correlation matrix. Similar as standard Nyström, our design associates the input tokens w.r.t. a small space spanned by sampled tokens, giving a proper estimation of the original attention relationships subject to a low-rank constraint. The correctness of this method is proved in Supplementary A.1.
128
+
129
+ Moore-Penrose inverse An accurate and commonly used way to calculate the Moore-Penrose inverse is to use Singular Value Decomposition (SVD). Given $A \in \mathbb { R } ^ { m \times m }$ and its SVD form $A = U \Sigma V ^ { \top }$ where $U , V$ are $m \times m$ unitary matrices and $\Sigma$ is a $m \times m$ diagonal matrix, the Moore-Penrose inverse of $A$ is $A ^ { \dagger } = V \Sigma ^ { \dagger } U ^ { \dagger }$ . Nevertheless, SVD is not friendly to the training process on GPU hence harming the model training efficiency. To solve this issue, we adopt the Newton–Raphson method. It is an iterative algorithm with the $( k + 1 )$ -th iteration formulated given the previous iteration as:
130
+
131
+ $$
132
+ A _ { k + 1 } = 2 A _ { k } - A _ { k } A A _ { k } , \quad { \mathrm { a n d } } \quad A _ { 0 } = \alpha A .
133
+ $$
134
+
135
+ We now prove that $A _ { k }$ finally converges to Moore-Penrose inverse of $A _ { m \times m }$ , if $\alpha$ is sufficiently small [3].
136
+
137
+ Theorem 1 When $\alpha$ is sufficiently small, $A _ { k + 1 } = 2 A _ { k } - A _ { k } A A _ { k }$ , $A _ { k }$ converges to $A ^ { \dagger }$
138
+
139
+ Though $\alpha = 2 / \| A \| _ { 1 } ^ { 2 }$ which ensures good convergence behavior in Algorithm 2 (see more details in Supplementary A.2.1), in practice, we find that using an alternative form gives more stable training and faster convergence. Specifically, in kI − A 2βnkAk2 k1 ≤ 1 where β equals to 0.5, we find the smallest $n _ { i }$ that holds this inequality. Then, we initialize $\alpha$ as $\begin{array} { r } { \alpha = \frac { 2 \beta ^ { n _ { i } } } { \Vert A \Vert _ { 1 } ^ { 2 } } } \end{array}$ .
140
+
141
+ The following proposition comes with the proof of Theorem 1:
142
+
143
+ Proposition 1 $\| A A _ { k } A - A \|$ and $\| A _ { k } - A ^ { \dag } \|$ decreases to 0 monotonously, if α is sufficiently small.
144
+
145
+ The detail of proposition 1 is shown in Supplementary A.2.2. This ensures that our estimated inverse is sufficiently accurate for matrix decomposition, subject to that our SOFT attention is regularized.
146
+
147
+ <table><tr><td>Methods</td><td>Complexity</td><td>Memory</td><td>Params</td><td>FLOPs</td><td>Throughput (img/s)</td><td>Top-1 %</td></tr><tr><td>Transformer [33]</td><td>0(n2)</td><td>19.0GBt</td><td>13M</td><td>3.9G</td><td>1073/3240</td><td>79.1</td></tr><tr><td>Linformer [34]</td><td>0(n)</td><td>11.7GB</td><td>13M</td><td>1.9G</td><td>2767 /3779</td><td>78.2</td></tr><tr><td>Performer [5]</td><td>0(n)</td><td>15.0GB</td><td>13M</td><td>2.2G</td><td>2037 /3657</td><td>76.1</td></tr><tr><td>Nystromformer [39]</td><td>0(n)</td><td>17.2GB</td><td>13M</td><td>2.0G</td><td>1891/3518</td><td>78.6</td></tr><tr><td>SOFT</td><td>O(n)</td><td>15.8GB</td><td>13M</td><td>1.9G</td><td>1730 /3436</td><td>79.3</td></tr></table>
148
+
149
+ Table 1: Comparison of different linear/efficient transformer variants on ImageNet [9], based on our multi-stage Tiny configuration (see Table 2). The memory usage is measured with the batch size of 1024 which is our standard training setting. Transformer is tested at a batch size of 256, which is the maximal number possible with the GPU resource at our disposal. Throughput is in format as Train throughput / inference throughput.
150
+
151
+ Complexity We summarize the complexity of SOFT in space and time. For time complexity, it involves: (1) Sampling: $\mathcal { O } ( n d _ { e } )$ . (2) Calculating three decomposed matrices: $\mathcal { O } ( n m d _ { e } + m n d _ { e } +$ $m ^ { 2 } d _ { e } ) = \mathcal { O } ( 2 m \hat { n } d _ { e } \overset { . } { + } m ^ { 2 } d _ { e } )$ ; (3) Moore-Penrose inverse: $\mathcal { \dot { O } } ( \mathcal { T } \times m ^ { 3 } ) = \mathcal { O } ( \dot { \mathcal { T } } m ^ { 3 } )$ , where $\tau$ is the iteration steps. (4) All matrix multiplication: $\mathcal { O } ( n m ^ { 2 } + m n d _ { e } + m n d _ { e } ) = \mathcal { O } ( n m ^ { 2 } + 2 m n d _ { e } )$ . The total time complexity is $\mathcal { O } ( ( d _ { e } + \mathrm { \bar { 4 } } m d _ { e } + m ^ { 2 } ) n + \mathcal { T } m ^ { 3 } + d _ { e } m ^ { 2 } )$ . The space complexity is decided by four decomposed matrices with $\mathcal { O } ( n \times m ) + \mathcal { O } ( m \times m ) + \mathcal { O } ( m \times n ) + \mathcal { O } ( n \times d _ { e } ) =$ $\mathcal { O } ( ( 2 m + d _ { e } ) n + m ^ { 2 } )$ . As we keep $m$ ( $m \ll n )$ ) a fixed constant in our model, both time and space complexity are ${ \mathcal { O } } ( n )$ , making SOFT a linear self-attention.
152
+
153
+ # 3.3 Instantiations
154
+
155
+ Figure 2 shows how our proposed softmax-free self-attention block (SOFT block) can be implemented in a neural network. We replace the self-attention block with our SOFT block in the traditional Transformer, that is, we stack a SOFT block with a feed forward residual block [11] to form a softmax-free Transformer layer (SOFT layer).
156
+
157
+ Focusing on the general image recognition tasks, we integrate our SOFT layer into the recent pyramidal Transformer architecture [35] to form our final model SOFT. Further, several improvements are introduced in patch embedding (i.e., tokenization). Specifically, unlike [35] that uses a combination of non-overlapping convolution and layer normalization [1], we adopt a stack of overlapping convolutions, batch normalization [14] and ReLU non-linearity. Concretely, the STEM is implemented by 3 units of $3 { \tt x } 3 \tt C o n v { \tt \to } B N { \tt \to } B e L U$ , with the stride of 2, 1, 2 respectively. Then, one such unit is applied to each of three following down-sampling operations with stride of 2 in the multi-stage architecture.
158
+
159
+ The architecture hyper-parameters of SOFT are: $d$ : the input channel dimension of SOFT layer. $d _ { e }$ : the embedding dimension of tokens in SOFT block. In practice, we set $d _ { e } = d$ . $h$ : the head number of SOFT block. $d _ { h }$ : the channel dimension of each head and $d _ { h } = d _ { e } / h$ . $n$ : the input token sequence length of a SOFT block. $m$ : the bottleneck token sequence length of SOFT block. sp: the sampling ratio of token sequence length sampling, which is the ratio between input token sequence length and the bottleneck token sequence length. $e$ : the expansion ratio of the 2-layer feed forward block. In SOFT, for all the stages we set $d _ { h } = 3 2$ , $e = 4$ and $m = 4 9$ , $s p$ varies in each stage according to the input token sequence length. Table 2 details the family of our SOFT configurations with varying capacities (depth and width).
160
+
161
+ # 4 Experiments
162
+
163
+ # 4.1 Setup
164
+
165
+ Dataset: We evaluate the proposed SOFT on the ILSVRC-2012 ImageNet-1K dataset [9] with 1.28M training images and 50K validation images from 1,000 classes. Following the common practice, we train a model on the training set and evaluate on the validation set. Metrics: For model performance, the top-1 accuracy on a single crop is reported. To assess the cost-effectiveness, we also report the model size and floating point operations (i.e., FLOPs). Implementation details: We use the code base [37] with the default setting to train and test all the models. Specifically, we use weight decay of 0.05 and 10 epochs of linear warm-up. We conduct 300 epochs training with an AdamW optimizer and decreasing learning rate with the cosine annealing schedule. During training, random flipping, mixup [43] and cutmix [42] are adopted for data augmentation. Label smoothing [28] is used for loss calculation. All our variants are trained with a batch size of 1024 on 32G NVIDIA V100 GPUs. We also implement our method using the Mindspore [22].
166
+
167
+ Table 2: Architecture specifications of SOFT variants. sp.: sampling ratio. -d: the hidden dimension. -h: the number of heads in the self-attention block. C33-BN-ReLU: three 3x3 Conv-BN-ReLU, with the stride of 2, 1, 2 respectively. C31-BN-ReLU: one 3x3 Conv-BN-ReLU, with a stride of 2.
168
+
169
+ <table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>Tiny</td><td rowspan=1 colspan=4>Small</td><td rowspan=1 colspan=3>Medium</td><td rowspan=1 colspan=3>Large</td><td rowspan=1 colspan=3>Huge</td></tr><tr><td rowspan=2 colspan=1> Stage 1</td><td rowspan=1 colspan=16>C33-BN-ReLU, 64-d</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>sp.8x8,64-d,2-h</td><td rowspan=1 colspan=1>x1</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>sp.8x8,64-d,2-h</td><td rowspan=1 colspan=2>x1</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>sp.8x8,64-d, 2-h</td><td rowspan=1 colspan=1>x1</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>sp.8x8,64-d,2-h</td><td rowspan=1 colspan=1>x1</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>sp.8x8,64-d,2-h</td><td rowspan=1 colspan=1>x1</td></tr><tr><td rowspan=2 colspan=1>Stage 2</td><td rowspan=1 colspan=16>C31-BN-ReLU,128-d</td></tr><tr><td rowspan=1 colspan=2>sp.4x4,128-d,4-h</td><td rowspan=1 colspan=1>x2</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=2>sp. 4x4,128-d, 4-h</td><td rowspan=1 colspan=2>x3</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>sp. 4x4,128-d, 4-h</td><td rowspan=1 colspan=1>x3</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>sp. 4x4,128-d,4-h</td><td rowspan=1 colspan=1>x3</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>sp.4x4,128-d, 4-h</td><td rowspan=1 colspan=1>x5</td></tr><tr><td rowspan=2 colspan=1>Stage 3</td><td rowspan=1 colspan=16>C31-BN-ReLU,320-d or288-d</td></tr><tr><td rowspan=1 colspan=2>sp.2x2,320-d,10-h</td><td rowspan=1 colspan=1>x3</td><td rowspan=1 colspan=2>sp. 2x2,320-d,10-h</td><td></td><td rowspan=1 colspan=2>x7</td><td rowspan=1 colspan=2>sp.2x2,288-d,9-h</td><td rowspan=1 colspan=1>x 29</td><td rowspan=1 colspan=2>sp.2x2,320-d,10-h</td><td rowspan=1 colspan=1>x 40</td><td rowspan=1 colspan=2>sp.2x2,352-d,11-h</td><td rowspan=1 colspan=1>x49</td></tr><tr><td rowspan=2 colspan=1>Stage 4w. cls token</td><td rowspan=1 colspan=16>C31-BN-ReLU, 512-d</td></tr><tr><td rowspan=1 colspan=2>sp.1x1,512-d,16-h</td><td rowspan=1 colspan=1>x2</td><td rowspan=1 colspan=2>sp.1x1,512-d,16-h</td><td></td><td rowspan=1 colspan=1>x4</td><td rowspan=1 colspan=2>sp. 1x1,512-d,16-h</td><td rowspan=1 colspan=1>x5</td><td></td><td rowspan=1 colspan=1>sp. 1x1,512-d,16-h</td><td rowspan=1 colspan=1>x5</td><td></td><td rowspan=1 colspan=1>sp.1x1,512-d,16-h</td><td rowspan=1 colspan=1>x5</td></tr></table>
170
+
171
+ # 4.2 Comparison with existing linear Transformers
172
+
173
+ We compare our method with three existing linear Transformer models: Linformer [34], Performer [5], Nyströmformer [39] in terms of model complexity and accuracy.
174
+
175
+ Two experimental settings are adopted. Under the first setting, for all methods we use the same Tiny (Table 2) architecture for a fair comparison. That is, we replace the core self-attention block in SOFT with each baseline’s own attention block with the rest of the architecture unchanged. Note that the spatial reduction module of [35] is a special case of Linformer [34]. We set the reduction ratio to be identical to ours. With the same uniform sampling idea, we replace the 1D window averaging of Nyströmformer [39] (for NLP tasks) with 2D average pooling (for images). The downsampling ratio remains identical to ours. It is also worth mentioning that there is no official code released for Reformer [18] and the local Sensitive Hash (LSH) module has strict requirements on the length of input tokens. We thus do not include this method in our comparison.
176
+
177
+ From Table 1 we can make the following observations: (i) Linear Transformer methods substantially reduce the memory and FLOPs while maintain similar parameter size comparing to the Transformer on the Tiny architecture; (ii) Our approach SOFT achieves the best classification accuracy among all the linearization methods. (iii) Our inference speed is on-par with other compared linear Transformers and our training speed is slightly slower than Nystromformer and both are slower than Performer and Linformer. Note that the slow training speed of our model is mostly due to the Newton-Raphson iteration which can only be applied sequentially for ensuring the accuracy of Moore-Penrose inverse. In summary, due to the on-par inference speed we consider the training cost increase is a price worth paying for our superior accuracy.
178
+
179
+ Under the second setting, we focus on the memory efficiency of SOFT against the baselines. Here we follow the ViT [11] network structure, stacking 12 attention layers with hidden dimension $d = 3 8 4$ , heads $h = 1 2$ , bottleneck token sequence length $m = 4 9$ . Different attention blocks from the three linearized Transformer variants, Linformer [34], Performer [5], and Nyströmformer [39] are studied. For each Transformer variant, we adjust its token sequence length $n$ in a linear increment. Specifically, we use a token sequence length of $7 8 4 \times p$ where $p = 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8$ and set batch size 1 to verify whether the memory consumption increases “quadratically” or “linearly”. Figure 1b shows all compared transformer variants including our SOFT indeed have a linear memory usage complexity. This is in contrast with the standard Transformer which cannot cope with long token sequences with a quadratic complexity.
180
+
181
+ 4.3 Comparison with state-of-the-art CNNs and ViTs
182
+ Table 3: Evaluation results on ILSVRC-2012 ImageNet-1K [9] validation set. We report the results using the input size of $2 2 4 \mathbf { x } 2 2 4$ pixels center cropped from resized images with $2 5 6 \times 2 5 6$ pixels. M.S.Out. stands for whether the model is designed for multi-scale output. $\dagger$ : Corrected FLOPs by taking into account the cost of attention matrix multiplication overlooked in the origin paper.
183
+
184
+ <table><tr><td>Model</td><td>Style</td><td>Resolution</td><td>M.S. Out.?</td><td>Params</td><td>FLOPs</td><td>Top-1%.</td></tr><tr><td>ResNet-18 [13]</td><td>ConvNets</td><td>2242</td><td>√</td><td>11M</td><td>1.9G</td><td>69.8</td></tr><tr><td>PVT-Tiny [35]</td><td>Transformers</td><td>224²</td><td>1</td><td>13M</td><td>1.9Gt</td><td>75.1</td></tr><tr><td>Coat-Lite Mini [40]</td><td>Transformers</td><td>2242</td><td>√</td><td>11M</td><td>2.0G</td><td>78.9</td></tr><tr><td>LambdaNets-50 [2]</td><td>Transformers</td><td>224²</td><td>√</td><td>16M</td><td>1</td><td>78.9</td></tr><tr><td> SOFT-Tiny</td><td>SOFT</td><td>224²</td><td>√</td><td>13M</td><td>1.9G</td><td>79.3</td></tr><tr><td>ResNet-50[13]</td><td>Convolution</td><td>224</td><td>√</td><td>25M</td><td>4.1G</td><td>78.5</td></tr><tr><td>PVT-Small [35]</td><td>Transformer</td><td>2242</td><td>√</td><td>24M</td><td>4.0Gt</td><td>79.8</td></tr><tr><td>Deit-Small [31]</td><td>Transformer</td><td>224²</td><td>X</td><td>22M</td><td>4.6G</td><td>79.9</td></tr><tr><td>T2T-ViTt-14 [41]</td><td>Transformer</td><td>224²</td><td>×</td><td>21M</td><td>5.2G</td><td>80.7</td></tr><tr><td>CPVT-Small [7]</td><td>Transformer</td><td>2242</td><td></td><td>22M</td><td>-</td><td>79.9</td></tr><tr><td>Twins-SVT-S [6]</td><td>Hybrid</td><td>224²</td><td>广</td><td>24M</td><td>3.7G</td><td>81.7</td></tr><tr><td> SOFT-Small</td><td>SOFT</td><td>224²</td><td>√</td><td>24M</td><td>3.3G</td><td>82.2</td></tr><tr><td>ResNet-101 [13]</td><td>Convolution</td><td>2242</td><td>√</td><td>44M</td><td>7.9G</td><td>79.8</td></tr><tr><td>PVT-Medium [35]</td><td>Transformer</td><td>224²</td><td>√</td><td>44M</td><td>7.0Gt</td><td>81.2</td></tr><tr><td>ViT-Small/16 [11]</td><td>Transformer</td><td>2242</td><td>X</td><td>48M</td><td>9.9G</td><td>80.8</td></tr><tr><td> SOFT-Medium</td><td>SOFT</td><td>224²</td><td>√</td><td>45M</td><td>7.2G</td><td>82.9</td></tr><tr><td>ResNet-152 [13]</td><td>Convolution</td><td>2242</td><td></td><td>60M</td><td>11.6G</td><td>80.8</td></tr><tr><td>PVT-Large [35]</td><td>Transformer</td><td>2242</td><td>&lt;&gt;x&gt;</td><td>61M</td><td>10.1Gt</td><td>81.7</td></tr><tr><td>T2T-ViTt-24 [41]</td><td>Transformer</td><td>2242</td><td></td><td>64M</td><td>13.2G</td><td></td></tr><tr><td>BoTNet-S1-110[27]</td><td>Hybrid</td><td>224</td><td></td><td></td><td></td><td>82.2</td></tr><tr><td> SOFT-Large</td><td>SOFT</td><td>224²</td><td>√</td><td>55M 64M</td><td>-</td><td>82.8</td></tr><tr><td></td><td></td><td>2242</td><td></td><td></td><td>11.0G</td><td>83.1</td></tr><tr><td>CaiT-S36[32]</td><td>Transformer</td><td>224²</td><td>√</td><td>88M</td><td>13.9G</td><td>83.3</td></tr><tr><td>Swin-B[20]</td><td>Transformer</td><td></td><td>《</td><td>88M</td><td>15.4G</td><td>83.3</td></tr><tr><td>Twins-SVT-L [6]</td><td>Hybrid</td><td>2242</td><td>√</td><td>99M</td><td>14.8G</td><td>83.3</td></tr><tr><td> SOFT-Huge</td><td>SOFT</td><td>224²</td><td></td><td>87M</td><td>16.3G</td><td>83.3</td></tr></table>
185
+
186
+ We compare with state-of-the-art alternatives and report the top-1 accuracy on the ImageNet-1K validation set. FLOPs are calculated at batch size 1024. From Figure 1a and Table 3, the following observations are made: (i) Overall, ViT and its variants yield better classification accuracy over CNNs. (ii) We achieve the best performance among the recent pure vision Transformer based methods including ViT [11] and DeiT [31], as well as the state-of-the-art CNN RegNet [26]. (iii) Our SOFT outperforms the most similar (in architecture configuration) Transformer counterparts PVT [35] at all variants. Since the attention module is the main difference, this validates directly the effectiveness of our model. (iv) We can also beat the latest ViT variants Twins [6] which is designed to address the efficiency limitation of ViT. We have done so with less parameters and fewer float point computation.
187
+
188
+ To gain some insights into how attention is learned using our SOFT and the alternatives, Figure 3 shows the attention masks of various compared models. For each model, we show the output from the first two attention heads. It is evident that SOFT exhibits robustness and versatility in capturing local and long distance relations among pixels. It is interesting to note that, although SOFT is trained on an object categorization dataset in ImageNet [9], it seems to be able to learn both semantic concepts shared across instances in the same category and instance specific features. For instance, in the bottom-right example of a bird class, one attention head focuses on the black bird only, while the other attend to both birds in the image. More examples are shown in Supplementary A.4.
189
+
190
+ # 4.4 Ablation studies
191
+
192
+ Pyramidal architecture: Unlike the earlier non-pyramidal vision Transformers (e.g., ViT [11]), most recent pyramidal (multi-scale) Transformers (e.g., PVT [35]) use convolution layers to reduce the spatial resolution (i.e., token sequence length) between stages. In this study, we ablate SOFT with a pyramidal architecture (our default SOFT-Small), SOFT w/o a pyramidal architecture and DeiT-S [31] (no pyramidal architecture either). We replace the Transformer layer with a SOFT layer to get SOFT w/o a pyramidal architecture. Note all three variants have similar parameters and FLOPs. Table 5a shows that the conv-based pyramidal architecture is clearly superior to a non-pyramidal design, and our non-pyramidal counterpart is even slightly better than DeiT-S [31] whilst enjoying linear complexity.
193
+
194
+ ![](images/ba1cc7f375109b1a9c853ea1e695d3d9ff9f26f47d03e1607618e0f607e93b6d.jpg)
195
+ Figure 3: Comparing the attention heatmaps of a query patch (marked by the cross $" + "$ ) against all the patches of an image, produced by (a) Transformer [33], (b) Performer [5], (c) Nystromformer [39] and (d) Our SOFT. See Supplementary A.4 for more examples.
196
+ Table 4: (a) Ablations on bottleneck token sequence length. (b) Ablations on sampling methods.
197
+
198
+ Bottleneck token sequence length: In this study, we examine how the bottleneck token sequence length $m$ , sampled from $n$ tokens, influences the model’s performance. We change the bottleneck token sequence length in all stages to 36, 49, 64, 81. Table 4a shows that longer bottleneck token would increase the memory cost and the computational overhead. $m = 4 9$ seems to give the best trade-off between the performance and computational overhead. The memory usage is measured with the batch size of 128.
199
+
200
+ Token sampling: The sampling function in SOFT can assume different forms. Convolution: The sequence $Q \in \mathbb { R } ^ { n \times d _ { e } }$ is first reshaped to a feature map $\mathbb { R } ^ { H \times W \times d _ { e } }$ . $r \times r$ convolution kernel with stride of $r$ is applied for downsampling, where $r = { \sqrt { s p } }$ . The output channel size
201
+
202
+ ![](images/c9c7de6be748dad76a096a1e9a90a389125480abe192a9bc5a1eeba7f1b7e704.jpg)
203
+ Figure 4: Convergence analysis for the approximation of the Moore-Penrose inverse on SOFT-Tiny.
204
+
205
+ is also kept and no bias is used. At last, the feature map is reshaped back to the sequence. Average pooling: using a $r \times r$ kernel and $r$ stride, where $r = { \sqrt { s p } }$ . Random sampling: $m$ tokens are randomly picked from $n$ tokens. Biased sampling: We pick $m$ tokens with a biased policy. Here, the first $m$ tokens are picked. Table $^ \mathrm { 4 b }$ shows that average pooling yields the best performance while with less computational overhead comparing to convolution. Biased sampling can miss the most salient samples, and there is no guarantee that random sampling can keep the uniformity of the chosen samples. This result thus justifies the choice of using average pooling in SOFT.
206
+
207
+ <table><tr><td>Bottleneck</td><td>Memory</td><td>FLOPs</td><td>Top-1 %</td></tr><tr><td>36</td><td>15.1GB</td><td>1.9G</td><td>79.0</td></tr><tr><td>49</td><td>15.8GB</td><td>1.9G</td><td>79.3</td></tr><tr><td>64</td><td>16.9GB</td><td>2.0G</td><td>79.3</td></tr><tr><td>81</td><td>18.5GB</td><td>2.1G</td><td>78.9</td></tr></table>
208
+
209
+ <table><tr><td>Sampling methods|Params</td><td></td><td>FLOPs</td><td>Top-1 %</td></tr><tr><td>Convolution</td><td>13.07M</td><td>2.0G</td><td>79.3</td></tr><tr><td>Random sampling</td><td>12.96M</td><td>1.9G</td><td>79.3</td></tr><tr><td>Biased sampling</td><td>12.96M</td><td>1.9G</td><td>79.0</td></tr><tr><td>Average pooling</td><td>12.96M</td><td>1.9G</td><td>79.3</td></tr></table>
210
+
211
+ Overlapped convolution: We ablate SOFT with overlapped convolution (our default choice, same as many recent works) and SOFT with non-overlapped convolution in our Tiny configuration. Table 5b shows that SOFT with overlapped convolution performs better than SOFT without overlapped convolution. Our non-overlapped convolution variant still outperforms the PVT [35] which also has the same non-overlapped convolution by a clear margin.
212
+
213
+ <table><tr><td>Methods</td><td>Pyramidal?</td><td>Top-1 %</td><td>Methods</td><td>Overlapped?</td><td>Top-1%</td></tr><tr><td>DeiT-S [31]</td><td>X</td><td>79.8</td><td>PVT [35]</td><td>X</td><td>75.1</td></tr><tr><td>SOFT</td><td></td><td>80.1</td><td>SOFT</td><td></td><td>77.4</td></tr><tr><td>SOFT</td><td>√</td><td>82.2</td><td>SOFT</td><td>√</td><td>79.3</td></tr></table>
214
+
215
+ Table 5: (a) Ablations on pyramidal architecture. (b) Ablations on overlapped convolution.
216
+
217
+ Newton-Raphson’s convergence: We study how many iterations the Newton-Raphson method needs to converge when computing the Moore-Penrose inverse $A ^ { \dagger }$ . We use $\| A A _ { k } \bar { A } - A \| _ { p } / \| A \| _ { p }$ with $p = 2$ (see Proposition 1) as the convergence metric to quantify the difference between $A _ { k }$ and $A ^ { \dagger }$ . Figure 4 shows that our approximation converges within 20 iterations across all stages.
218
+
219
+ # 4.5 Additional experiments on NLP tasks
220
+
221
+ In this section, we evaluate our method against other linear counterparts on four tasks of the Long Range Arena (LRA) [29] benchmark e.g., Listops [23], byte-level IMDb reviews text classification [21], byte-level document retrieval [25], and image classification on sequences of pixels [19].
222
+
223
+ Implementations. We use the Pytorch version of LRA [29] benchmark, provided by [39]. For the evaluation protocol, we strictly follow [29, 39]. We omit the Pathfinder(1K) task as we cannot replicate the result of Nyströmformer [39]. For our SOFT, we simply use the average pooling with window size 4, stride 4 to sample the bottlenecks. We follow the configurations of [39], with 2 layers, 64 and 128 hidden dimension respectively, and 2 attention heads. The results in Table 6 shows that our SOFT outperforms both the standard and alternative efficient Transformers on three out of four tasks, as well as the average result.
224
+
225
+ <table><tr><td rowspan=1 colspan=1>Methods</td><td rowspan=1 colspan=1>Listops(2K)</td><td rowspan=1 colspan=1>Text(4K)</td><td rowspan=1 colspan=1>Retrieval(4K)</td><td rowspan=1 colspan=1>Image(1K)</td><td rowspan=1 colspan=1>Avg.%</td></tr><tr><td rowspan=1 colspan=1>Transformer [33]</td><td rowspan=1 colspan=1>37.10</td><td rowspan=1 colspan=1>65.02</td><td rowspan=1 colspan=1>79.35</td><td rowspan=1 colspan=1>38.20</td><td rowspan=1 colspan=1>54.92</td></tr><tr><td rowspan=1 colspan=1>Reformer [18]</td><td rowspan=1 colspan=1>19.05</td><td rowspan=1 colspan=1>64.88</td><td rowspan=1 colspan=1>78.64</td><td rowspan=1 colspan=1>43.29</td><td rowspan=1 colspan=1>51.47</td></tr><tr><td rowspan=2 colspan=1>Linformer [34]Performer [5]</td><td rowspan=1 colspan=1>37.25</td><td rowspan=1 colspan=1>55.91</td><td rowspan=1 colspan=1>79.37</td><td rowspan=1 colspan=1>37.84</td><td rowspan=1 colspan=1>52.59</td></tr><tr><td rowspan=1 colspan=1>18.80</td><td rowspan=1 colspan=1>63.81</td><td rowspan=1 colspan=1>78.62</td><td rowspan=1 colspan=1>37.07</td><td rowspan=1 colspan=1>49.58</td></tr><tr><td rowspan=1 colspan=1>Nystromformer [39]</td><td rowspan=1 colspan=1>37.15</td><td rowspan=1 colspan=1>65.52</td><td rowspan=1 colspan=1>79.56</td><td rowspan=1 colspan=1>41.58</td><td rowspan=1 colspan=1>55.95</td></tr><tr><td rowspan=1 colspan=1>SOFT</td><td rowspan=1 colspan=1>37.40</td><td rowspan=1 colspan=1>63.49</td><td rowspan=1 colspan=1>81.77</td><td rowspan=1 colspan=1>46.91</td><td rowspan=1 colspan=1>57.39</td></tr></table>
226
+
227
+ Table 6: Comparison of different linear/efficient Transformer variants on Long Range Arena [29], based on its official configuration. Our SOFT surpasses previous efficient methods on three tasks.
228
+
229
+ # 5 Conclusions
230
+
231
+ We have introduced a novel softmax-free self-attention (SOFT) mechanism for linearizing Transformer’s complexity in space and time. Unlike existing linear Transformers that aim to approximate the conventional softmax based self-attention, SOFT employs a Gaussian kernel based attention which eliminates the need for softmax normalization. This design enables a full self-attention matrix to be approximated via a low-rank matrix decomposition. The robustness of the approximation is achieved by calculating its Moore-Penrose inverse using a Newton-Raphson method. Extensive experiments show that SOFT yields superior trade-off in accuracy and complexity.
232
+
233
+ Acknowledgment This work was funded in part by Shanghai Municipal Science and Technology Major Projects (No.2018SHZDZX01 and No.2021SHZDZX0103), Mindspore, National Science Foundation of China under Grant No.11690013, 71991471 and the scientific-technological innovation plan program of Universities guided by the Ministry of Education, China.
234
+
235
+ References
236
+ [1] Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint, 2016. 6
237
+ [2] Irwan Bello. Lambdanetworks: Modeling long-range interactions without attention. arXiv preprint, 2021. 8
238
+ [3] Adi Ben-Israel and Dan Cohen. On iterative computation of generalized inverses and associated projections. SIAM Journal on Numerical Analysis, 1966. 5
239
+ [4] Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. In NeurIPS, 2020. 1, 2
240
+ [5] Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Davis, Afroz Mohiuddin, Lukasz Kaiser, et al. Rethinking attention with performers. In ICLR, 2021. 2, 3, 6, 7, 9, 10
241
+ [6] Xiangxiang Chu, Zhi Tian, Yuqing Wang, Bo Zhang, Haibing Ren, Xiaolin Wei, Huaxia Xia, and Chunhua Shen. Twins: Revisiting the design of spatial attention in vision transformers. arXiv preprint, 2021. 2, 8
242
+ [7] Xiangxiang Chu, Zhi Tian, Bo Zhang, Xinlong Wang, Xiaolin Wei, Huaxia Xia, and Chunhua Shen. Conditional positional encodings for vision transformers. arXiv preprint, 2021. 8
243
+ [8] Stéphane d’Ascoli, Hugo Touvron, Matthew Leavitt, Ari Morcos, Giulio Biroli, and Levent Sagun. Convit: Improving vision transformers with soft convolutional inductive biases. In ICML, 2021. 1
244
+ [9] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. 2, 6, 8
245
+ [10] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In ACL, 2018. 1, 2
246
+ [11] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2021. 1, 2, 6, 7, 8
247
+ [12] Gregory E Fasshauer. Positive definite kernels: past, present and future. Dolomites Research Notes on Approximation, 2011. 4
248
+ [13] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 2, 8
249
+ [14] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. 6
250
+ [15] Andrew Jaegle, Felix Gimeno, Andrew Brock, Andrew Zisserman, Oriol Vinyals, and Joao Carreira. Perceiver: General perception with iterative attention. arXiv preprint, 2021. 1
251
+ [16] Jungo Kasai, Hao Peng, Yizhe Zhang, Dani Yogatama, Gabriel Ilharco, Nikolaos Pappas, Yi Mao, Weizhu Chen, and Noah A Smith. Finetuning pretrained transformers into rnns. arXiv preprint arXiv:2103.13076, 2021. 3
252
+ [17] Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. Transformers are rnns: Fast autoregressive transformers with linear attention. In ICML, 2020. 2, 3
253
+ [18] Nikita Kitaev, Łukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer. In ICLR, 2020. 2, 3, 7, 10
254
+ [19] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. Citeseer, 2009. 10
255
+
256
+ [20] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. arXiv preprint, 2021. 8
257
+
258
+ [21] Andrew Maas, Raymond E Daly, Peter T Pham, Dan Huang, Andrew $\mathrm { ~ Y ~ N ~ g ~ } _ { }$ , and Christopher Potts. Learning word vectors for sentiment analysis. In Proceedings of the 49th annual meeting of the association for computational linguistics: Human language technologies, 2011. 10
259
+ [22] Mindspore. https://www.mindspore.cn/, 2020. 7
260
+ [23] Nikita Nangia and Samuel R Bowman. Listops: A diagnostic dataset for latent tree learning. arXiv preprint, 2018. 10
261
+ [24] Hao Peng, Nikolaos Pappas, Dani Yogatama, Roy Schwartz, Noah A Smith, and Lingpeng Kong. Random feature attention. arXiv preprint arXiv:2103.02143, 2021. 3
262
+ [25] Dragomir R Radev, Pradeep Muthukrishnan, Vahed Qazvinian, and Amjad Abu-Jbara. The acl anthology network corpus. Language Resources and Evaluation, 2013. 10
263
+ [26] Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, and Piotr Dollár. Designing network design spaces. In CVPR, 2020. 2, 8
264
+ [27] Aravind Srinivas, Tsung-Yi Lin, Niki Parmar, Jonathon Shlens, Pieter Abbeel, and Ashish Vaswani. Bottleneck transformers for visual recognition. arXiv preprint, 2021. 8
265
+ [28] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In CVPR, 2016. 7
266
+ [29] Yi Tay, Mostafa Dehghani, Samira Abnar, Yikang Shen, Dara Bahri, Philip Pham, Jinfeng Rao, Liu Yang, Sebastian Ruder, and Donald Metzler. Long range arena: A benchmark for efficient transformers. arXiv preprint, 2020. 10
267
+ [30] Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Metzler. Efficient transformers: A survey. arXiv preprint, 2020. 3
268
+ [31] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. arXiv preprint, 2020. 2, 8, 9, 10
269
+ [32] Hugo Touvron, Matthieu Cord, Alexandre Sablayrolles, Gabriel Synnaeve, and Hervé Jégou. Going deeper with image transformers. arXiv preprint, 2021. 8
270
+ [33] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017. 1, 2, 3, 4, 6, 9, 10
271
+ [34] Sinong Wang, Belinda Li, Madian Khabsa, Han Fang, and Hao Ma. Linformer: Self-attention with linear complexity. arXiv preprint, 2020. 2, 3, 6, 7, 10
272
+ [35] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. arXiv preprint, 2021. 2, 6, 7, 8, 10
273
+ [36] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In CVPR, 2018. 2
274
+ [37] Ross Wightman. Pytorch image models. https://github.com/rwightman/ pytorch-image-models, 2019. 6
275
+ [38] Christopher Williams and Matthias Seeger. Using the nyström method to speed up kernel machines. In NeurIPS, 2001. 4
276
+ [39] Yunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan, Glenn Fung, Yin Li, and Vikas Singh. Nyströmformer: A nyström-based algorithm for approximating self-attention. In AAAI, 2021. 2, 3, 4, 6, 7, 9, 10
277
+ [40] Weijian Xu, Yifan Xu, Tyler Chang, and Zhuowen Tu. Co-scale conv-attentional image transformers. arXiv preprint, 2021. 8
278
+ [41] Li Yuan, Yunpeng Chen, Tao Wang, Weihao Yu, Yujun Shi, Zihang Jiang, Francis EH Tay, Jiashi Feng, and Shuicheng Yan. Tokens-to-token vit: Training vision transformers from scratch on imagenet. arXiv preprint, 2021. 1, 2, 8
279
+ [42] Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk Chun, Junsuk Choe, and Youngjoon Yoo. Cutmix: Regularization strategy to train strong classifiers with localizable features. In ICCV, 2019. 7
280
+ [43] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint, 2017. 7
281
+ [44] Li Zhang, Dan Xu, Anurag Arnab, and Philip HS Torr. Dynamic graph message passing networks. In CVPR, 2020. 2
282
+ [45] Hengshuang Zhao, Jiaya Jia, and Vladlen Koltun. Exploring self-attention for image recognition. In CVPR, 2020. 2
283
+ [46] Sixiao Zheng, Jiachen Lu, Hengshuang Zhao, Xiatian Zhu, Zekun Luo, Yabiao Wang, Yanwei Fu, Jianfeng Feng, Tao Xiang, Philip HS Torr, and Li Zhang. Rethinking semantic segmentation from a sequence-to-sequence perspective with transformers. In CVPR, 2021. 1
284
+ [47] Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable detr: Deformable transformers for end-to-end object detection. In ICLR, 2021. 1
parse/train/rndqBJsGoKh/rndqBJsGoKh_content_list.json ADDED
@@ -0,0 +1,1228 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "SOFT: Softmax-free Transformer with Linear Complexity ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 220,
8
+ 122,
9
+ 777,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Jiachen Lu1 Jinghan Yao1 Junge Zhang1 Xiatian Zhu2 Hang $\\mathbf { X } \\mathbf { u } ^ { 3 }$ Weiguo Gao1 Chunjing Xu3 Tao Xiang2 Li Zhang1∗ ",
17
+ "bbox": [
18
+ 236,
19
+ 224,
20
+ 759,
21
+ 256
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "1Fudan University 2University of Surrey ",
28
+ "bbox": [
29
+ 246,
30
+ 260,
31
+ 568,
32
+ 275
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "3Huawei Noah’s Ark Lab ",
39
+ "bbox": [
40
+ 578,
41
+ 261,
42
+ 748,
43
+ 275
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "https://fudan-zvg.github.io/SOFT ",
50
+ "bbox": [
51
+ 343,
52
+ 281,
53
+ 655,
54
+ 295
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "Abstract ",
61
+ "text_level": 1,
62
+ "bbox": [
63
+ 462,
64
+ 332,
65
+ 535,
66
+ 348
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "Vision transformers (ViTs) have pushed the state-of-the-art for various visual recognition tasks by patch-wise image tokenization followed by self-attention. However, the employment of self-attention modules results in a quadratic complexity in both computation and memory usage. Various attempts on approximating the selfattention computation with linear complexity have been made in Natural Language Processing. However, an in-depth analysis in this work shows that they are either theoretically flawed or empirically ineffective for visual recognition. We further identify that their limitations are rooted in keeping the softmax self-attention during approximations. Specifically, conventional self-attention is computed by normalizing the scaled dot-product between token feature vectors. Keeping this softmax operation challenges any subsequent linearization efforts. Based on this insight, for the first time, a softmax-free transformer or SOFT is proposed. To remove softmax in self-attention, Gaussian kernel function is used to replace the dot-product similarity without further normalization. This enables a full self-attention matrix to be approximated via a low-rank matrix decomposition. The robustness of the approximation is achieved by calculating its Moore-Penrose inverse using a Newton-Raphson method. Extensive experiments on ImageNet show that our SOFT significantly improves the computational efficiency of existing ViT variants. Crucially, with a linear complexity, much longer token sequences are permitted in SOFT, resulting in superior trade-off between accuracy and complexity. ",
73
+ "bbox": [
74
+ 233,
75
+ 361,
76
+ 766,
77
+ 637
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "1 Introduction ",
84
+ "text_level": 1,
85
+ "bbox": [
86
+ 174,
87
+ 659,
88
+ 310,
89
+ 676
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Recently the step change brought by Transformers [33] in natural language processing (NLP) [10, 4] seems to have arrived in vision [11, 41, 47, 46]. Indeed, with less inductive bias in its architecture design than Convolution neural networks (CNNs), pure Vision Transformer (ViT) [11] and its variants have shown to be able to outperform CNNs on various vision tasks [8, 15]. However, there is a bottleneck in any Transformer based model, namely its quadratic complexity in both computation and memory usage. This is intrinsic to the self-attention mechanism: given a sequence of tokens (e.g., words or image patches) as input, the self-attention module iteratively learns the feature representations by relating one token to all other tokens. This results in a quadratic complexity $O ( n ^ { 2 } )$ with the token sequence length $n$ in both computation (time) and memory (space) since an $n \\times n$ sized attention matrix needs to be computed and saved during inference. This problem is particularly acute in vision: a 2D image after tokenization will produce a far longer sequence than those in NLP even with a moderate spatial resolution. This quadratic complexity thus prevents a ViT model from modeling images at high spatial resolutions, which are often crucial for visual recognition tasks. ",
96
+ "bbox": [
97
+ 174,
98
+ 690,
99
+ 825,
100
+ 869
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "image",
106
+ "img_path": "images/21eeda7dcaa4b05139da8729b189b3dd99590e1517d4f44cd949d34aec3776d6.jpg",
107
+ "image_caption": [
108
+ "Figure 1: Top1-Accuracy on ImageNet [9] validation set with respect to parameters and the memory usage corresponding to the token sequence length in practice compared to other methods. (a) Comparison with CNN models: RegNet [26], ResNet [13] and Transformer models: PVT [35], DeiT [31], ViT [11], T2T-ViT [41], Twins-SVT [6] and SAN10 [45]; (b) Comparison with Transformer [33], Linformer [34], Nyströformer [39] and Performer [5]. The memory usage is measured with a batch size of 1 on a 16GB Tesla V100. "
109
+ ],
110
+ "image_footnote": [],
111
+ "bbox": [
112
+ 174,
113
+ 94,
114
+ 815,
115
+ 296
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "A natural solution is to reduce the complexity of self-attention computation via approximation. Indeed, there have been a number of attempts in NLP [34, 5, 18, 39]. For example, [34] takes a naive approach by shortening the length of Key and Value via learnable projections. Such a coarse approximation would inevitably cause performance degradation. In contrast, [5, 17] both leverage the kernel mechanism to approximate softmax normalization to linearize the computation in self-attention. [18] instead adopts a hashing strategy to selectively compute the most similar pairs. Recently, [39] uses Nyström matrix decomposition to reconstruct the full attention matrix with polynomial iteration for approximating the pseudo-inverse of the landmark matrix. Nonetheless, softmax normalization is simply duplicated across the matrix decomposition process, which is theoretically unsound. We empirically found that none of these methods are effective when applied to vision (see Sec. 4.2). ",
122
+ "bbox": [
123
+ 174,
124
+ 416,
125
+ 825,
126
+ 555
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "In this work, we identify that the limitations of existing efficient Transformers are caused by the use of softmax self-attention, and for the first time propose a softmax-free Transformer. More specifically, in all existing Transformers (with or without linearization), a softmax normalization is needed on top of scaled dot-product between token feature vectors [33]. Keeping this softmax operation challenges any subsequent linearization efforts. To overcome this obstacle, we introduce a novel softmax-free self-attention mechanism, named as SOFT, with linear complexity $O ( n )$ in both space and time. Specifically, SOFT uses Gaussian kernel to define the similarity (self-attention) function without the need for subsequent softmax normalization. With this softmax-free attention matrix, we further introduce a novel low-rank matrix decomposition algorithm for approximation. The robustness of the approximation is theoretically guaranteed by employing a Newton-Raphson method for reliably computing the Moore-Penrose inverse of the matrix. ",
133
+ "bbox": [
134
+ 174,
135
+ 560,
136
+ 825,
137
+ 713
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "We make the following contributions. (I) We introduce a novel softmax-free Transformer with linear space and time complexity. $\\mathbf { \\Pi } ^ { ( \\mathbf { I I } ) }$ Our attention matrix approximation is achieved through a novel matrix decomposition algorithm with theoretical guarantee. (III) To evaluate our method for visual recognition tasks, we design a family of generic backbone architectures with varying capacities using SOFT as the core self-attention component. Extensive experiments show that with a linear complexity (Figure 1b), our SOFT models can take in as input much longer image token sequences. As a result, with the same model size, our SOFT outperforms the state-of-the-art CNNs and ViT variants on ImageNet [9] classification in the accuracy/complexity trade-off (Figure 1a). ",
144
+ "bbox": [
145
+ 174,
146
+ 719,
147
+ 825,
148
+ 830
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "2 Related work ",
155
+ "text_level": 1,
156
+ "bbox": [
157
+ 174,
158
+ 851,
159
+ 316,
160
+ 868
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "Vision Transformers There is a surge of research interests recently in exploiting Transformers for visual recognition tasks [36, 35, 41, 31, 44], inspired by their remarkable success in NLP [33, 10, 4]. ",
167
+ "bbox": [
168
+ 174,
169
+ 883,
170
+ 823,
171
+ 911
172
+ ],
173
+ "page_idx": 1
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "Core to these NLP and vision transformers is the same self-attention mechanism [33] that computes a self-attention matrix by exhaustively comparing token pairs. This means a quadratic complexity with the sequence length in both space and time, which thus limits the scalability of Transformers in dealing with long sequences. This limitation is more serious in vision than NLP: To process an image with at least thousands of pixels, patch-wise tokenization is a must for Transformers to control the computational cost. Given higher resolution images, the patch size also needs to be enlarged proportionally sacrificing the spatial resolution. This limits the capability of Transformers, e.g., learning fine-grained feature representation as required in many visual recognition tasks. ",
178
+ "bbox": [
179
+ 173,
180
+ 90,
181
+ 825,
182
+ 203
183
+ ],
184
+ "page_idx": 2
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "Linear Transformers Recently, there have been a number of linear/efficient variants [5, 34, 17, 18, 30, 24, 16] of Transformers in NLP. For example, [34] learns to shrink the length of Key and Value based on a low-rank assumption. [18] adopts a hashing strategy to selective the most similar pairs and only compute attention among them. [5, 17] utilize different kernel functions for approximating softmax-based self-attention matrix. [24] applies random feature mapping on the sequences to approach the original softmax function. [16] decreases the time and memory consumption of the attention matrix by replacing the softmax function with its linear-complexity recurrent alternative. When applied to visual recognition tasks, however, we show that these models have considerable performance degradation compared to the standard Transformers [33] (see Sec. 4.2). ",
189
+ "bbox": [
190
+ 173,
191
+ 218,
192
+ 825,
193
+ 343
194
+ ],
195
+ "page_idx": 2
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "The most related work to SOFT is [39] which uses the Nyström matrix decomposition to avoid computing the full attention matrix. However, this method suffers from several theoretical defects: (1) As the standard self-attention needs to apply row-wise softmax normalization on the full attention matrix, a direct application of matrix decomposition is infeasible. As a workaround, softmax is simply applied to all the ingredient matrices in [39]. Such an approximation is not guaranteed theoretically. (2) With a polynomial iteration method, it is not guaranteed that the generalized attention matrix inverse can be computed when the matrix is a nearly singular one in practice. In contrast to all the above methods, in this paper we propose a softmax-free self-attention mechanism that facilitates matrix decomposition for complexity minimization with theoretical guarantees. ",
200
+ "bbox": [
201
+ 173,
202
+ 348,
203
+ 825,
204
+ 474
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "3 Method ",
211
+ "text_level": 1,
212
+ "bbox": [
213
+ 174,
214
+ 494,
215
+ 271,
216
+ 511
217
+ ],
218
+ "page_idx": 2
219
+ },
220
+ {
221
+ "type": "text",
222
+ "text": "3.1 Softmax-free self-attention formulation ",
223
+ "text_level": 1,
224
+ "bbox": [
225
+ 174,
226
+ 526,
227
+ 485,
228
+ 541
229
+ ],
230
+ "page_idx": 2
231
+ },
232
+ {
233
+ "type": "text",
234
+ "text": "A schematic illustration of our model is given in Figure 2. Let’s first look at our attention module design. Given a sequence of $n$ tokens $\\ b { X } ^ { \\prime } \\in \\mathbb { R } ^ { n \\times d }$ with each token represented by a $d$ -dimensional feature vector, self-attention [33] aims to discover the correlations of all token pairs exhaustively. ",
235
+ "bbox": [
236
+ 176,
237
+ 551,
238
+ 823,
239
+ 594
240
+ ],
241
+ "page_idx": 2
242
+ },
243
+ {
244
+ "type": "text",
245
+ "text": "Formally, $X$ is first linearly projected into three $d _ { e }$ -dimensional spaces (query, key, and values) as: ",
246
+ "bbox": [
247
+ 173,
248
+ 599,
249
+ 820,
250
+ 627
251
+ ],
252
+ "page_idx": 2
253
+ },
254
+ {
255
+ "type": "equation",
256
+ "img_path": "images/1441ee51b1703f2dca0af2cdda3bed87803f9989f4fb3638df691fee84de5680.jpg",
257
+ "text": "$$\nQ = X W _ { q } \\in \\mathbb { R } ^ { n \\times d _ { e } } , \\quad K = X W _ { k } \\in \\mathbb { R } ^ { n \\times d _ { e } } , \\quad V = X W _ { v } \\in \\mathbb { R } ^ { n \\times d _ { e } } ,\n$$",
258
+ "text_format": "latex",
259
+ "bbox": [
260
+ 264,
261
+ 627,
262
+ 730,
263
+ 646
264
+ ],
265
+ "page_idx": 2
266
+ },
267
+ {
268
+ "type": "text",
269
+ "text": "where $W _ { q } , W _ { k } , W _ { v } \\in \\mathbb { R } ^ { d \\times d _ { e } }$ are learnable matrices. Self-attention can be expressed in a generic formulation as: ",
270
+ "bbox": [
271
+ 176,
272
+ 651,
273
+ 825,
274
+ 680
275
+ ],
276
+ "page_idx": 2
277
+ },
278
+ {
279
+ "type": "equation",
280
+ "img_path": "images/164a84d625470dfd6b9c7f74b851d8deb2c08681d6c83b54e4138b0e3bf288b2.jpg",
281
+ "text": "$$\ny _ { i , : } = \\sum _ { j = 1 } ^ { n } \\alpha ( Q _ { i , : } , K _ { j , : } ) \\odot V _ { j , : } ,\n$$",
282
+ "text_format": "latex",
283
+ "bbox": [
284
+ 397,
285
+ 678,
286
+ 599,
287
+ 722
288
+ ],
289
+ "page_idx": 2
290
+ },
291
+ {
292
+ "type": "text",
293
+ "text": "where $\\odot$ is the Hadamard product, and $i , j \\in \\{ 1 , \\cdots , n \\}$ index the tokens. The key self-attention function $\\alpha : \\mathbb { R } ^ { d _ { e } } \\times \\mathbb { R } ^ { d _ { e } } \\to \\mathbb { R }$ is composed of a nonlinear function $\\beta : \\mathbb { R } \\mathbb { R }$ and a relation function $\\gamma : \\mathbb { R } ^ { d _ { e } } \\times \\mathbb { R } ^ { d _ { e } } \\mathbb { R }$ . A dominant instantiation of $\\alpha$ is the scaled dot-product based softmax self-attention [33], defined as ",
294
+ "bbox": [
295
+ 173,
296
+ 724,
297
+ 825,
298
+ 784
299
+ ],
300
+ "page_idx": 2
301
+ },
302
+ {
303
+ "type": "equation",
304
+ "img_path": "images/ff90e442d3d5419b70a0232e063bc5be786e9d3e02fbf0f2a610261c85c970fb.jpg",
305
+ "text": "$$\n\\beta ( \\cdot ) = \\mathrm { s o f t m a x } ( \\cdot ) , \\quad \\gamma ( Q _ { i , : } , K _ { j , : } ) = \\frac { 1 } { \\sqrt { d _ { e } } } \\cdot Q _ { i , : } ^ { \\top } K _ { j , : } .\n$$",
306
+ "text_format": "latex",
307
+ "bbox": [
308
+ 321,
309
+ 790,
310
+ 674,
311
+ 824
312
+ ],
313
+ "page_idx": 2
314
+ },
315
+ {
316
+ "type": "text",
317
+ "text": "Whilst this softmax self-attention has been the de facto choice and seldomly questioned, as discussed earlier it is not necessarily suited for linearization. To facilitate the design of linear self-attention, we introduce a softmax-free self-attention function with the dot-product replaced by a Gaussian kernel as: ",
318
+ "bbox": [
319
+ 174,
320
+ 829,
321
+ 825,
322
+ 885
323
+ ],
324
+ "page_idx": 2
325
+ },
326
+ {
327
+ "type": "equation",
328
+ "img_path": "images/277f12dc83263afe370320c2375128b7b91fd291e18d2b33d86dfd2aa06e968e.jpg",
329
+ "text": "$$\n\\beta ^ { \\prime } ( \\cdot ) = \\exp ( \\cdot ) , \\quad \\gamma ^ { \\prime } ( Q _ { i , : } , K _ { j , : } ) = - \\frac { 1 } { 2 \\sqrt { d _ { e } } } \\cdot \\| Q _ { i , : } - K _ { j , : } \\| _ { 2 } ^ { 2 } .\n$$",
330
+ "text_format": "latex",
331
+ "bbox": [
332
+ 299,
333
+ 882,
334
+ 699,
335
+ 916
336
+ ],
337
+ "page_idx": 2
338
+ },
339
+ {
340
+ "type": "image",
341
+ "img_path": "images/2f3b028bd2d3ee114e9064ba3e91b9b8a69ba44e1d923199ea4a1fc58e1a7700.jpg",
342
+ "image_caption": [
343
+ "Figure 2: Schematic illustration of the proposed softmax-free self-attention (SOFT) method. P.E.: Position embedding. Dash lines: linear projection. dh: the hidden dim of each attention head. ◦ denotes the matrix dot product. "
344
+ ],
345
+ "image_footnote": [],
346
+ "bbox": [
347
+ 176,
348
+ 113,
349
+ 826,
350
+ 277
351
+ ],
352
+ "page_idx": 3
353
+ },
354
+ {
355
+ "type": "text",
356
+ "text": "To preserve the symmetric property of attention matrix as in Eq (3), we set the project matrices $W _ { q }$ and $W _ { k }$ in Eq (1) identical (i.e., $Q = K .$ ). Our self-attention matrix is then written as: ",
357
+ "bbox": [
358
+ 173,
359
+ 352,
360
+ 821,
361
+ 381
362
+ ],
363
+ "page_idx": 3
364
+ },
365
+ {
366
+ "type": "equation",
367
+ "img_path": "images/35704aa404ae47b07f257e574f6b6a45c157fa948b98e633475eab7ee506f56f.jpg",
368
+ "text": "$$\nS _ { i , j } = \\exp \\left( - \\frac { 1 } { 2 \\sqrt { d _ { e } } } \\cdot \\lVert Q _ { i , : } - K _ { j , : } \\rVert _ { 2 } ^ { 2 } \\right) .\n$$",
369
+ "text_format": "latex",
370
+ "bbox": [
371
+ 362,
372
+ 386,
373
+ 633,
374
+ 422
375
+ ],
376
+ "page_idx": 3
377
+ },
378
+ {
379
+ "type": "text",
380
+ "text": "For notation simplicity, we define the matrix formulation as: $S = \\exp \\left( Q \\ominus K \\right)$ ",
381
+ "bbox": [
382
+ 174,
383
+ 428,
384
+ 696,
385
+ 443
386
+ ],
387
+ "page_idx": 3
388
+ },
389
+ {
390
+ "type": "text",
391
+ "text": "Remarks Our self-attention matrix $S$ has three important properties: (1) It is symmetric; (2) All the elements lie in a unit range of $[ 0 , 1 ]$ ; (3) All diagonal elements hold the largest value 1 (selfreinforced), with the bottom ones (corresponding to most dissimilar token pairs) being close to 0. As Gaussian kernel is a positive definite kernel [12], $S$ is deemed a Gram matrix. However, we find that when using our kernel-based self-attention matrix $S$ without linearization, the training of a transformer fails to converge. This might explain why softmax dot-product based self-attention [33] is so popular in vanilla transformers. ",
392
+ "bbox": [
393
+ 173,
394
+ 455,
395
+ 826,
396
+ 554
397
+ ],
398
+ "page_idx": 3
399
+ },
400
+ {
401
+ "type": "text",
402
+ "text": "3.2 Low-rank regularization via matrix decomposition with linear complexity ",
403
+ "text_level": 1,
404
+ "bbox": [
405
+ 174,
406
+ 570,
407
+ 723,
408
+ 585
409
+ ],
410
+ "page_idx": 3
411
+ },
412
+ {
413
+ "type": "text",
414
+ "text": "To solve the convergence and quadratic complexity problems, we leverage matrix decomposition as a unified solution with low-rank regularization. In particular, we consider Nyström [38], which is originally a low-rank matrix approximation algorithm. This enables our model’s complexity to be reduced significantly without computing the full self-attention matrix $S$ . ",
415
+ "bbox": [
416
+ 173,
417
+ 594,
418
+ 825,
419
+ 651
420
+ ],
421
+ "page_idx": 3
422
+ },
423
+ {
424
+ "type": "text",
425
+ "text": "We make this choice because our $S$ is positive semi-definite (i.e., a Gram matrix) without follow-up normalization which are all necessary conditions for Nyström. In contrast, [39] totally ignores these requirements, leading to theoretical flaw in its approximation. ",
426
+ "bbox": [
427
+ 174,
428
+ 656,
429
+ 825,
430
+ 700
431
+ ],
432
+ "page_idx": 3
433
+ },
434
+ {
435
+ "type": "text",
436
+ "text": "To define the Nyström method formally, let us express $S = \\exp \\left( Q \\ominus K \\right)$ as a block matrix: ",
437
+ "bbox": [
438
+ 169,
439
+ 705,
440
+ 772,
441
+ 722
442
+ ],
443
+ "page_idx": 3
444
+ },
445
+ {
446
+ "type": "equation",
447
+ "img_path": "images/76bd222c4b7641a783e790d99e5e7eb73d12c553b64155c17ae29416f93b8135.jpg",
448
+ "text": "$$\n\\boldsymbol { S } = \\left[ \\begin{array} { c c } { \\boldsymbol { A } } & { \\boldsymbol { B } } \\\\ { \\boldsymbol { B } ^ { \\top } } & { \\boldsymbol { C } } \\end{array} \\right] \\in \\mathbb { R } ^ { n \\times n } ,\n$$",
449
+ "text_format": "latex",
450
+ "bbox": [
451
+ 405,
452
+ 726,
453
+ 591,
454
+ 762
455
+ ],
456
+ "page_idx": 3
457
+ },
458
+ {
459
+ "type": "text",
460
+ "text": "where $A \\in \\mathbb { R } ^ { m \\times m }$ , $B \\in \\mathbb { R } ^ { m \\times ( n - m ) }$ , $C \\ \\in \\ \\mathbb { R } ^ { ( n - m ) \\times ( n - m ) }$ with $m \\ll n$ . Through Nyström decomposition (see derivative details in Supplementary A.1), an approximation can be represented as: ",
461
+ "bbox": [
462
+ 173,
463
+ 773,
464
+ 826,
465
+ 805
466
+ ],
467
+ "page_idx": 3
468
+ },
469
+ {
470
+ "type": "equation",
471
+ "img_path": "images/68eafd910dad00260490cbb880d68c17fa8dc3cc0028afa80482000b38ad76b8.jpg",
472
+ "text": "$$\n{ \\hat { S } } = { \\left[ \\begin{array} { l } { A } \\\\ { B ^ { \\top } } \\end{array} \\right] } A ^ { \\dagger } \\left[ A \\quad B \\right] = P ^ { \\top } A ^ { \\dagger } P , \\quad { \\mathrm { w h e r e } } \\quad P = \\left[ A \\quad B \\right] ,\n$$",
473
+ "text_format": "latex",
474
+ "bbox": [
475
+ 297,
476
+ 813,
477
+ 699,
478
+ 848
479
+ ],
480
+ "page_idx": 3
481
+ },
482
+ {
483
+ "type": "text",
484
+ "text": "and $A ^ { \\dagger }$ is the Moore-Penrose (a generalized) inverse of $A$ . ",
485
+ "bbox": [
486
+ 176,
487
+ 851,
488
+ 555,
489
+ 867
490
+ ],
491
+ "page_idx": 3
492
+ },
493
+ {
494
+ "type": "text",
495
+ "text": "Sampling In the standard Nyström formulation, $A$ and $B$ are sub-matrices of $S$ obtained by randomly sampled $m$ tokens, denoted as $\\widetilde { Q }$ . We call the sampled $\\widetilde { Q }$ as bottleneck tokens. However, ",
496
+ "bbox": [
497
+ 173,
498
+ 880,
499
+ 825,
500
+ 912
501
+ ],
502
+ "page_idx": 3
503
+ },
504
+ {
505
+ "type": "text",
506
+ "text": "Input: $Q \\in \\mathbb { R } ^ { n \\times d _ { e } }$ , sampling function $f _ { s }$ Sampling ${ \\widetilde { Q } } \\gets f _ { s } ( Q )$ ; \n$A \\exp ( \\widetilde { Q } \\ominus \\widetilde { Q } )$ , $P \\exp ( \\widetilde { Q } \\ominus Q )$ ; $\\hat { S } P ^ { \\top } \\mathrm { N R } ( A ) P$ ; \nOutput: $\\hat { S }$ ",
507
+ "bbox": [
508
+ 173,
509
+ 113,
510
+ 447,
511
+ 198
512
+ ],
513
+ "page_idx": 4
514
+ },
515
+ {
516
+ "type": "text",
517
+ "text": "Algorithm 2: NR: Newton-Raphson iteration ",
518
+ "text_level": 1,
519
+ "bbox": [
520
+ 498,
521
+ 94,
522
+ 794,
523
+ 109
524
+ ],
525
+ "page_idx": 4
526
+ },
527
+ {
528
+ "type": "text",
529
+ "text": "Input: $A \\in \\mathbb { R } ^ { m \\times m }$ , and $\\mathcal { T } \\in \\mathbb { Z } ^ { + }$ $\\alpha \\overset { - } { = } 2 / \\Vert A \\Vert _ { 1 } ^ { 2 }$ .Initialize $A _ { 0 } \\alpha A$ ; for $k$ from 1 to $\\tau$ do \n$| \\quad { \\dot { A _ { k } } } \\gets 2 A _ { k - 1 } - A _ { k - 1 } A A _ { k - 1 }$ end \nOutput: AT ",
530
+ "bbox": [
531
+ 495,
532
+ 114,
533
+ 722,
534
+ 198
535
+ ],
536
+ "page_idx": 4
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "we find empirically that random sampling is considerably sensitive to the choice of $m$ . We hence explore two additional options by leveraging the structural prior of visual data: (1) Using one convolutional layer with kernel size $k$ and stride $k$ to learn $\\widetilde { Q }$ , and (2) Using average pooling with kernel size $k$ and stride $k$ to generate $\\widetilde { Q }$ . For both, we need to reshape $Q$ to the form of $\\mathbb { R } ^ { H \\times W \\times d _ { e } }$ . Each slide of convolution or pooling produces a token. We set $k$ according to the length of $Q$ such that $m$ tokens can be obtained. Our experiments show that a convolution layer performs better in accuracy. We therefore use a convolution layer by default. ",
541
+ "bbox": [
542
+ 173,
543
+ 228,
544
+ 826,
545
+ 332
546
+ ],
547
+ "page_idx": 4
548
+ },
549
+ {
550
+ "type": "text",
551
+ "text": "As $K$ is identical to $Q$ , we have $\\widetilde K = \\widetilde Q$ . Given these $m$ tokens, we then compute $A$ and $P$ as: ",
552
+ "bbox": [
553
+ 173,
554
+ 337,
555
+ 787,
556
+ 356
557
+ ],
558
+ "page_idx": 4
559
+ },
560
+ {
561
+ "type": "equation",
562
+ "img_path": "images/24daaebec882ace7e281823fbc25d57c33b84f3fa6ef7c56c86927a926fabda7.jpg",
563
+ "text": "$$\nA = \\exp ( \\widetilde Q \\ominus \\widetilde K ) , \\quad P = \\exp ( \\widetilde Q \\ominus K ) .\n$$",
564
+ "text_format": "latex",
565
+ "bbox": [
566
+ 364,
567
+ 361,
568
+ 633,
569
+ 381
570
+ ],
571
+ "page_idx": 4
572
+ },
573
+ {
574
+ "type": "text",
575
+ "text": "We finally obtain the regularized self-attention matrix $\\hat { S }$ of SOFT as: ",
576
+ "bbox": [
577
+ 174,
578
+ 387,
579
+ 625,
580
+ 404
581
+ ],
582
+ "page_idx": 4
583
+ },
584
+ {
585
+ "type": "equation",
586
+ "img_path": "images/8508acce7fa532063baa759ef0a7e5694b9690e69c74dec29c4b6084077d1f79.jpg",
587
+ "text": "$$\n{ \\hat { S } } = \\exp \\left( Q \\ominus \\widetilde { K } \\right) \\left( \\exp \\left( \\widetilde { Q } \\ominus \\widetilde { K } \\right) \\right) ^ { \\dagger } \\exp \\left( \\widetilde { Q } \\ominus K \\right) ,\n$$",
588
+ "text_format": "latex",
589
+ "bbox": [
590
+ 320,
591
+ 410,
592
+ 674,
593
+ 440
594
+ ],
595
+ "page_idx": 4
596
+ },
597
+ {
598
+ "type": "text",
599
+ "text": "leading to Algorithm 1. The low-rank regularization is conducted as follows. For computing the attention score between any two tokens, we first correlate each of them with sampled tokens using our self-attention function (Eq (5)); With this correlation representation we then compute their similarity under the modulation of the generalized inverse of $\\tilde { \\hat { Q } }$ ’s correlation matrix. Similar as standard Nyström, our design associates the input tokens w.r.t. a small space spanned by sampled tokens, giving a proper estimation of the original attention relationships subject to a low-rank constraint. The correctness of this method is proved in Supplementary A.1. ",
600
+ "bbox": [
601
+ 173,
602
+ 450,
603
+ 825,
604
+ 553
605
+ ],
606
+ "page_idx": 4
607
+ },
608
+ {
609
+ "type": "text",
610
+ "text": "Moore-Penrose inverse An accurate and commonly used way to calculate the Moore-Penrose inverse is to use Singular Value Decomposition (SVD). Given $A \\in \\mathbb { R } ^ { m \\times m }$ and its SVD form $A = U \\Sigma V ^ { \\top }$ where $U , V$ are $m \\times m$ unitary matrices and $\\Sigma$ is a $m \\times m$ diagonal matrix, the Moore-Penrose inverse of $A$ is $A ^ { \\dagger } = V \\Sigma ^ { \\dagger } U ^ { \\dagger }$ . Nevertheless, SVD is not friendly to the training process on GPU hence harming the model training efficiency. To solve this issue, we adopt the Newton–Raphson method. It is an iterative algorithm with the $( k + 1 )$ -th iteration formulated given the previous iteration as: ",
611
+ "bbox": [
612
+ 173,
613
+ 565,
614
+ 825,
615
+ 664
616
+ ],
617
+ "page_idx": 4
618
+ },
619
+ {
620
+ "type": "equation",
621
+ "img_path": "images/6dd9cc01307fbf206df46bbe2ec4762e7559e7501d0e1a7842a1aa81a0cb26a7.jpg",
622
+ "text": "$$\nA _ { k + 1 } = 2 A _ { k } - A _ { k } A A _ { k } , \\quad { \\mathrm { a n d } } \\quad A _ { 0 } = \\alpha A .\n$$",
623
+ "text_format": "latex",
624
+ "bbox": [
625
+ 349,
626
+ 670,
627
+ 647,
628
+ 686
629
+ ],
630
+ "page_idx": 4
631
+ },
632
+ {
633
+ "type": "text",
634
+ "text": "We now prove that $A _ { k }$ finally converges to Moore-Penrose inverse of $A _ { m \\times m }$ , if $\\alpha$ is sufficiently small [3]. ",
635
+ "bbox": [
636
+ 173,
637
+ 693,
638
+ 823,
639
+ 722
640
+ ],
641
+ "page_idx": 4
642
+ },
643
+ {
644
+ "type": "text",
645
+ "text": "Theorem 1 When $\\alpha$ is sufficiently small, $A _ { k + 1 } = 2 A _ { k } - A _ { k } A A _ { k }$ , $A _ { k }$ converges to $A ^ { \\dagger }$ ",
646
+ "bbox": [
647
+ 173,
648
+ 731,
649
+ 746,
650
+ 748
651
+ ],
652
+ "page_idx": 4
653
+ },
654
+ {
655
+ "type": "text",
656
+ "text": "Though $\\alpha = 2 / \\| A \\| _ { 1 } ^ { 2 }$ which ensures good convergence behavior in Algorithm 2 (see more details in Supplementary A.2.1), in practice, we find that using an alternative form gives more stable training and faster convergence. Specifically, in kI − A 2βnkAk2 k1 ≤ 1 where β equals to 0.5, we find the smallest $n _ { i }$ that holds this inequality. Then, we initialize $\\alpha$ as $\\begin{array} { r } { \\alpha = \\frac { 2 \\beta ^ { n _ { i } } } { \\Vert A \\Vert _ { 1 } ^ { 2 } } } \\end{array}$ . ",
657
+ "bbox": [
658
+ 173,
659
+ 756,
660
+ 825,
661
+ 828
662
+ ],
663
+ "page_idx": 4
664
+ },
665
+ {
666
+ "type": "text",
667
+ "text": "The following proposition comes with the proof of Theorem 1: ",
668
+ "bbox": [
669
+ 174,
670
+ 832,
671
+ 584,
672
+ 847
673
+ ],
674
+ "page_idx": 4
675
+ },
676
+ {
677
+ "type": "text",
678
+ "text": "Proposition 1 $\\| A A _ { k } A - A \\|$ and $\\| A _ { k } - A ^ { \\dag } \\|$ decreases to 0 monotonously, if α is sufficiently small. ",
679
+ "bbox": [
680
+ 174,
681
+ 856,
682
+ 823,
683
+ 873
684
+ ],
685
+ "page_idx": 4
686
+ },
687
+ {
688
+ "type": "text",
689
+ "text": "The detail of proposition 1 is shown in Supplementary A.2.2. This ensures that our estimated inverse is sufficiently accurate for matrix decomposition, subject to that our SOFT attention is regularized. ",
690
+ "bbox": [
691
+ 171,
692
+ 882,
693
+ 825,
694
+ 912
695
+ ],
696
+ "page_idx": 4
697
+ },
698
+ {
699
+ "type": "table",
700
+ "img_path": "images/585fabb6b9c741d574dac0874fcf07d440f8dfcaf95a36fcf6c5c8a62525b152.jpg",
701
+ "table_caption": [],
702
+ "table_footnote": [],
703
+ "table_body": "<table><tr><td>Methods</td><td>Complexity</td><td>Memory</td><td>Params</td><td>FLOPs</td><td>Throughput (img/s)</td><td>Top-1 %</td></tr><tr><td>Transformer [33]</td><td>0(n2)</td><td>19.0GBt</td><td>13M</td><td>3.9G</td><td>1073/3240</td><td>79.1</td></tr><tr><td>Linformer [34]</td><td>0(n)</td><td>11.7GB</td><td>13M</td><td>1.9G</td><td>2767 /3779</td><td>78.2</td></tr><tr><td>Performer [5]</td><td>0(n)</td><td>15.0GB</td><td>13M</td><td>2.2G</td><td>2037 /3657</td><td>76.1</td></tr><tr><td>Nystromformer [39]</td><td>0(n)</td><td>17.2GB</td><td>13M</td><td>2.0G</td><td>1891/3518</td><td>78.6</td></tr><tr><td>SOFT</td><td>O(n)</td><td>15.8GB</td><td>13M</td><td>1.9G</td><td>1730 /3436</td><td>79.3</td></tr></table>",
704
+ "bbox": [
705
+ 179,
706
+ 89,
707
+ 818,
708
+ 195
709
+ ],
710
+ "page_idx": 5
711
+ },
712
+ {
713
+ "type": "text",
714
+ "text": "Table 1: Comparison of different linear/efficient transformer variants on ImageNet [9], based on our multi-stage Tiny configuration (see Table 2). The memory usage is measured with the batch size of 1024 which is our standard training setting. Transformer is tested at a batch size of 256, which is the maximal number possible with the GPU resource at our disposal. Throughput is in format as Train throughput / inference throughput. ",
715
+ "bbox": [
716
+ 173,
717
+ 203,
718
+ 825,
719
+ 273
720
+ ],
721
+ "page_idx": 5
722
+ },
723
+ {
724
+ "type": "text",
725
+ "text": "Complexity We summarize the complexity of SOFT in space and time. For time complexity, it involves: (1) Sampling: $\\mathcal { O } ( n d _ { e } )$ . (2) Calculating three decomposed matrices: $\\mathcal { O } ( n m d _ { e } + m n d _ { e } +$ $m ^ { 2 } d _ { e } ) = \\mathcal { O } ( 2 m \\hat { n } d _ { e } \\overset { . } { + } m ^ { 2 } d _ { e } )$ ; (3) Moore-Penrose inverse: $\\mathcal { \\dot { O } } ( \\mathcal { T } \\times m ^ { 3 } ) = \\mathcal { O } ( \\dot { \\mathcal { T } } m ^ { 3 } )$ , where $\\tau$ is the iteration steps. (4) All matrix multiplication: $\\mathcal { O } ( n m ^ { 2 } + m n d _ { e } + m n d _ { e } ) = \\mathcal { O } ( n m ^ { 2 } + 2 m n d _ { e } )$ . The total time complexity is $\\mathcal { O } ( ( d _ { e } + \\mathrm { \\bar { 4 } } m d _ { e } + m ^ { 2 } ) n + \\mathcal { T } m ^ { 3 } + d _ { e } m ^ { 2 } )$ . The space complexity is decided by four decomposed matrices with $\\mathcal { O } ( n \\times m ) + \\mathcal { O } ( m \\times m ) + \\mathcal { O } ( m \\times n ) + \\mathcal { O } ( n \\times d _ { e } ) =$ $\\mathcal { O } ( ( 2 m + d _ { e } ) n + m ^ { 2 } )$ . As we keep $m$ ( $m \\ll n )$ ) a fixed constant in our model, both time and space complexity are ${ \\mathcal { O } } ( n )$ , making SOFT a linear self-attention. ",
726
+ "bbox": [
727
+ 174,
728
+ 287,
729
+ 826,
730
+ 400
731
+ ],
732
+ "page_idx": 5
733
+ },
734
+ {
735
+ "type": "text",
736
+ "text": "3.3 Instantiations ",
737
+ "text_level": 1,
738
+ "bbox": [
739
+ 174,
740
+ 417,
741
+ 308,
742
+ 433
743
+ ],
744
+ "page_idx": 5
745
+ },
746
+ {
747
+ "type": "text",
748
+ "text": "Figure 2 shows how our proposed softmax-free self-attention block (SOFT block) can be implemented in a neural network. We replace the self-attention block with our SOFT block in the traditional Transformer, that is, we stack a SOFT block with a feed forward residual block [11] to form a softmax-free Transformer layer (SOFT layer). ",
749
+ "bbox": [
750
+ 173,
751
+ 444,
752
+ 825,
753
+ 500
754
+ ],
755
+ "page_idx": 5
756
+ },
757
+ {
758
+ "type": "text",
759
+ "text": "Focusing on the general image recognition tasks, we integrate our SOFT layer into the recent pyramidal Transformer architecture [35] to form our final model SOFT. Further, several improvements are introduced in patch embedding (i.e., tokenization). Specifically, unlike [35] that uses a combination of non-overlapping convolution and layer normalization [1], we adopt a stack of overlapping convolutions, batch normalization [14] and ReLU non-linearity. Concretely, the STEM is implemented by 3 units of $3 { \\tt x } 3 \\tt C o n v { \\tt \\to } B N { \\tt \\to } B e L U$ , with the stride of 2, 1, 2 respectively. Then, one such unit is applied to each of three following down-sampling operations with stride of 2 in the multi-stage architecture. ",
760
+ "bbox": [
761
+ 173,
762
+ 506,
763
+ 825,
764
+ 603
765
+ ],
766
+ "page_idx": 5
767
+ },
768
+ {
769
+ "type": "text",
770
+ "text": "The architecture hyper-parameters of SOFT are: $d$ : the input channel dimension of SOFT layer. $d _ { e }$ : the embedding dimension of tokens in SOFT block. In practice, we set $d _ { e } = d$ . $h$ : the head number of SOFT block. $d _ { h }$ : the channel dimension of each head and $d _ { h } = d _ { e } / h$ . $n$ : the input token sequence length of a SOFT block. $m$ : the bottleneck token sequence length of SOFT block. sp: the sampling ratio of token sequence length sampling, which is the ratio between input token sequence length and the bottleneck token sequence length. $e$ : the expansion ratio of the 2-layer feed forward block. In SOFT, for all the stages we set $d _ { h } = 3 2$ , $e = 4$ and $m = 4 9$ , $s p$ varies in each stage according to the input token sequence length. Table 2 details the family of our SOFT configurations with varying capacities (depth and width). ",
771
+ "bbox": [
772
+ 174,
773
+ 608,
774
+ 825,
775
+ 734
776
+ ],
777
+ "page_idx": 5
778
+ },
779
+ {
780
+ "type": "text",
781
+ "text": "4 Experiments ",
782
+ "text_level": 1,
783
+ "bbox": [
784
+ 174,
785
+ 755,
786
+ 312,
787
+ 772
788
+ ],
789
+ "page_idx": 5
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "4.1 Setup",
794
+ "text_level": 1,
795
+ "bbox": [
796
+ 174,
797
+ 787,
798
+ 253,
799
+ 803
800
+ ],
801
+ "page_idx": 5
802
+ },
803
+ {
804
+ "type": "text",
805
+ "text": "Dataset: We evaluate the proposed SOFT on the ILSVRC-2012 ImageNet-1K dataset [9] with 1.28M training images and 50K validation images from 1,000 classes. Following the common practice, we train a model on the training set and evaluate on the validation set. Metrics: For model performance, the top-1 accuracy on a single crop is reported. To assess the cost-effectiveness, we also report the model size and floating point operations (i.e., FLOPs). Implementation details: We use the code base [37] with the default setting to train and test all the models. Specifically, we use weight decay of 0.05 and 10 epochs of linear warm-up. We conduct 300 epochs training with an AdamW optimizer and decreasing learning rate with the cosine annealing schedule. During training, random flipping, mixup [43] and cutmix [42] are adopted for data augmentation. Label smoothing [28] is used for loss calculation. All our variants are trained with a batch size of 1024 on 32G NVIDIA V100 GPUs. We also implement our method using the Mindspore [22]. ",
806
+ "bbox": [
807
+ 174,
808
+ 814,
809
+ 825,
810
+ 911
811
+ ],
812
+ "page_idx": 5
813
+ },
814
+ {
815
+ "type": "table",
816
+ "img_path": "images/8e0b54ca125420c7a5076d5b28a8d5fbb053a1835e9809edb8f3296355ecc45e.jpg",
817
+ "table_caption": [
818
+ "Table 2: Architecture specifications of SOFT variants. sp.: sampling ratio. -d: the hidden dimension. -h: the number of heads in the self-attention block. C33-BN-ReLU: three 3x3 Conv-BN-ReLU, with the stride of 2, 1, 2 respectively. C31-BN-ReLU: one 3x3 Conv-BN-ReLU, with a stride of 2. "
819
+ ],
820
+ "table_footnote": [],
821
+ "table_body": "<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>Tiny</td><td rowspan=1 colspan=4>Small</td><td rowspan=1 colspan=3>Medium</td><td rowspan=1 colspan=3>Large</td><td rowspan=1 colspan=3>Huge</td></tr><tr><td rowspan=2 colspan=1> Stage 1</td><td rowspan=1 colspan=16>C33-BN-ReLU, 64-d</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>sp.8x8,64-d,2-h</td><td rowspan=1 colspan=1>x1</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>sp.8x8,64-d,2-h</td><td rowspan=1 colspan=2>x1</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>sp.8x8,64-d, 2-h</td><td rowspan=1 colspan=1>x1</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>sp.8x8,64-d,2-h</td><td rowspan=1 colspan=1>x1</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>sp.8x8,64-d,2-h</td><td rowspan=1 colspan=1>x1</td></tr><tr><td rowspan=2 colspan=1>Stage 2</td><td rowspan=1 colspan=16>C31-BN-ReLU,128-d</td></tr><tr><td rowspan=1 colspan=2>sp.4x4,128-d,4-h</td><td rowspan=1 colspan=1>x2</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=2>sp. 4x4,128-d, 4-h</td><td rowspan=1 colspan=2>x3</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>sp. 4x4,128-d, 4-h</td><td rowspan=1 colspan=1>x3</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>sp. 4x4,128-d,4-h</td><td rowspan=1 colspan=1>x3</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>sp.4x4,128-d, 4-h</td><td rowspan=1 colspan=1>x5</td></tr><tr><td rowspan=2 colspan=1>Stage 3</td><td rowspan=1 colspan=16>C31-BN-ReLU,320-d or288-d</td></tr><tr><td rowspan=1 colspan=2>sp.2x2,320-d,10-h</td><td rowspan=1 colspan=1>x3</td><td rowspan=1 colspan=2>sp. 2x2,320-d,10-h</td><td></td><td rowspan=1 colspan=2>x7</td><td rowspan=1 colspan=2>sp.2x2,288-d,9-h</td><td rowspan=1 colspan=1>x 29</td><td rowspan=1 colspan=2>sp.2x2,320-d,10-h</td><td rowspan=1 colspan=1>x 40</td><td rowspan=1 colspan=2>sp.2x2,352-d,11-h</td><td rowspan=1 colspan=1>x49</td></tr><tr><td rowspan=2 colspan=1>Stage 4w. cls token</td><td rowspan=1 colspan=16>C31-BN-ReLU, 512-d</td></tr><tr><td rowspan=1 colspan=2>sp.1x1,512-d,16-h</td><td rowspan=1 colspan=1>x2</td><td rowspan=1 colspan=2>sp.1x1,512-d,16-h</td><td></td><td rowspan=1 colspan=1>x4</td><td rowspan=1 colspan=2>sp. 1x1,512-d,16-h</td><td rowspan=1 colspan=1>x5</td><td></td><td rowspan=1 colspan=1>sp. 1x1,512-d,16-h</td><td rowspan=1 colspan=1>x5</td><td></td><td rowspan=1 colspan=1>sp.1x1,512-d,16-h</td><td rowspan=1 colspan=1>x5</td></tr></table>",
822
+ "bbox": [
823
+ 171,
824
+ 85,
825
+ 826,
826
+ 308
827
+ ],
828
+ "page_idx": 6
829
+ },
830
+ {
831
+ "type": "text",
832
+ "text": "",
833
+ "bbox": [
834
+ 174,
835
+ 373,
836
+ 825,
837
+ 429
838
+ ],
839
+ "page_idx": 6
840
+ },
841
+ {
842
+ "type": "text",
843
+ "text": "4.2 Comparison with existing linear Transformers ",
844
+ "text_level": 1,
845
+ "bbox": [
846
+ 174,
847
+ 449,
848
+ 534,
849
+ 464
850
+ ],
851
+ "page_idx": 6
852
+ },
853
+ {
854
+ "type": "text",
855
+ "text": "We compare our method with three existing linear Transformer models: Linformer [34], Performer [5], Nyströmformer [39] in terms of model complexity and accuracy. ",
856
+ "bbox": [
857
+ 174,
858
+ 477,
859
+ 823,
860
+ 505
861
+ ],
862
+ "page_idx": 6
863
+ },
864
+ {
865
+ "type": "text",
866
+ "text": "Two experimental settings are adopted. Under the first setting, for all methods we use the same Tiny (Table 2) architecture for a fair comparison. That is, we replace the core self-attention block in SOFT with each baseline’s own attention block with the rest of the architecture unchanged. Note that the spatial reduction module of [35] is a special case of Linformer [34]. We set the reduction ratio to be identical to ours. With the same uniform sampling idea, we replace the 1D window averaging of Nyströmformer [39] (for NLP tasks) with 2D average pooling (for images). The downsampling ratio remains identical to ours. It is also worth mentioning that there is no official code released for Reformer [18] and the local Sensitive Hash (LSH) module has strict requirements on the length of input tokens. We thus do not include this method in our comparison. ",
867
+ "bbox": [
868
+ 174,
869
+ 511,
870
+ 825,
871
+ 636
872
+ ],
873
+ "page_idx": 6
874
+ },
875
+ {
876
+ "type": "text",
877
+ "text": "From Table 1 we can make the following observations: (i) Linear Transformer methods substantially reduce the memory and FLOPs while maintain similar parameter size comparing to the Transformer on the Tiny architecture; (ii) Our approach SOFT achieves the best classification accuracy among all the linearization methods. (iii) Our inference speed is on-par with other compared linear Transformers and our training speed is slightly slower than Nystromformer and both are slower than Performer and Linformer. Note that the slow training speed of our model is mostly due to the Newton-Raphson iteration which can only be applied sequentially for ensuring the accuracy of Moore-Penrose inverse. In summary, due to the on-par inference speed we consider the training cost increase is a price worth paying for our superior accuracy. ",
878
+ "bbox": [
879
+ 174,
880
+ 641,
881
+ 825,
882
+ 767
883
+ ],
884
+ "page_idx": 6
885
+ },
886
+ {
887
+ "type": "text",
888
+ "text": "Under the second setting, we focus on the memory efficiency of SOFT against the baselines. Here we follow the ViT [11] network structure, stacking 12 attention layers with hidden dimension $d = 3 8 4$ , heads $h = 1 2$ , bottleneck token sequence length $m = 4 9$ . Different attention blocks from the three linearized Transformer variants, Linformer [34], Performer [5], and Nyströmformer [39] are studied. For each Transformer variant, we adjust its token sequence length $n$ in a linear increment. Specifically, we use a token sequence length of $7 8 4 \\times p$ where $p = 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8$ and set batch size 1 to verify whether the memory consumption increases “quadratically” or “linearly”. Figure 1b shows all compared transformer variants including our SOFT indeed have a linear memory usage complexity. This is in contrast with the standard Transformer which cannot cope with long token sequences with a quadratic complexity. ",
889
+ "bbox": [
890
+ 174,
891
+ 772,
892
+ 825,
893
+ 911
894
+ ],
895
+ "page_idx": 6
896
+ },
897
+ {
898
+ "type": "table",
899
+ "img_path": "images/c1b2b1a620635fc8359772b0606905119968da53d4f2e386a7ac943a45bffd9d.jpg",
900
+ "table_caption": [
901
+ "4.3 Comparison with state-of-the-art CNNs and ViTs ",
902
+ "Table 3: Evaluation results on ILSVRC-2012 ImageNet-1K [9] validation set. We report the results using the input size of $2 2 4 \\mathbf { x } 2 2 4$ pixels center cropped from resized images with $2 5 6 \\times 2 5 6$ pixels. M.S.Out. stands for whether the model is designed for multi-scale output. $\\dagger$ : Corrected FLOPs by taking into account the cost of attention matrix multiplication overlooked in the origin paper. "
903
+ ],
904
+ "table_footnote": [],
905
+ "table_body": "<table><tr><td>Model</td><td>Style</td><td>Resolution</td><td>M.S. Out.?</td><td>Params</td><td>FLOPs</td><td>Top-1%.</td></tr><tr><td>ResNet-18 [13]</td><td>ConvNets</td><td>2242</td><td>√</td><td>11M</td><td>1.9G</td><td>69.8</td></tr><tr><td>PVT-Tiny [35]</td><td>Transformers</td><td>224²</td><td>1</td><td>13M</td><td>1.9Gt</td><td>75.1</td></tr><tr><td>Coat-Lite Mini [40]</td><td>Transformers</td><td>2242</td><td>√</td><td>11M</td><td>2.0G</td><td>78.9</td></tr><tr><td>LambdaNets-50 [2]</td><td>Transformers</td><td>224²</td><td>√</td><td>16M</td><td>1</td><td>78.9</td></tr><tr><td> SOFT-Tiny</td><td>SOFT</td><td>224²</td><td>√</td><td>13M</td><td>1.9G</td><td>79.3</td></tr><tr><td>ResNet-50[13]</td><td>Convolution</td><td>224</td><td>√</td><td>25M</td><td>4.1G</td><td>78.5</td></tr><tr><td>PVT-Small [35]</td><td>Transformer</td><td>2242</td><td>√</td><td>24M</td><td>4.0Gt</td><td>79.8</td></tr><tr><td>Deit-Small [31]</td><td>Transformer</td><td>224²</td><td>X</td><td>22M</td><td>4.6G</td><td>79.9</td></tr><tr><td>T2T-ViTt-14 [41]</td><td>Transformer</td><td>224²</td><td>×</td><td>21M</td><td>5.2G</td><td>80.7</td></tr><tr><td>CPVT-Small [7]</td><td>Transformer</td><td>2242</td><td></td><td>22M</td><td>-</td><td>79.9</td></tr><tr><td>Twins-SVT-S [6]</td><td>Hybrid</td><td>224²</td><td>广</td><td>24M</td><td>3.7G</td><td>81.7</td></tr><tr><td> SOFT-Small</td><td>SOFT</td><td>224²</td><td>√</td><td>24M</td><td>3.3G</td><td>82.2</td></tr><tr><td>ResNet-101 [13]</td><td>Convolution</td><td>2242</td><td>√</td><td>44M</td><td>7.9G</td><td>79.8</td></tr><tr><td>PVT-Medium [35]</td><td>Transformer</td><td>224²</td><td>√</td><td>44M</td><td>7.0Gt</td><td>81.2</td></tr><tr><td>ViT-Small/16 [11]</td><td>Transformer</td><td>2242</td><td>X</td><td>48M</td><td>9.9G</td><td>80.8</td></tr><tr><td> SOFT-Medium</td><td>SOFT</td><td>224²</td><td>√</td><td>45M</td><td>7.2G</td><td>82.9</td></tr><tr><td>ResNet-152 [13]</td><td>Convolution</td><td>2242</td><td></td><td>60M</td><td>11.6G</td><td>80.8</td></tr><tr><td>PVT-Large [35]</td><td>Transformer</td><td>2242</td><td>&lt;&gt;x&gt;</td><td>61M</td><td>10.1Gt</td><td>81.7</td></tr><tr><td>T2T-ViTt-24 [41]</td><td>Transformer</td><td>2242</td><td></td><td>64M</td><td>13.2G</td><td></td></tr><tr><td>BoTNet-S1-110[27]</td><td>Hybrid</td><td>224</td><td></td><td></td><td></td><td>82.2</td></tr><tr><td> SOFT-Large</td><td>SOFT</td><td>224²</td><td>√</td><td>55M 64M</td><td>-</td><td>82.8</td></tr><tr><td></td><td></td><td>2242</td><td></td><td></td><td>11.0G</td><td>83.1</td></tr><tr><td>CaiT-S36[32]</td><td>Transformer</td><td>224²</td><td>√</td><td>88M</td><td>13.9G</td><td>83.3</td></tr><tr><td>Swin-B[20]</td><td>Transformer</td><td></td><td>《</td><td>88M</td><td>15.4G</td><td>83.3</td></tr><tr><td>Twins-SVT-L [6]</td><td>Hybrid</td><td>2242</td><td>√</td><td>99M</td><td>14.8G</td><td>83.3</td></tr><tr><td> SOFT-Huge</td><td>SOFT</td><td>224²</td><td></td><td>87M</td><td>16.3G</td><td>83.3</td></tr></table>",
906
+ "bbox": [
907
+ 192,
908
+ 127,
909
+ 805,
910
+ 518
911
+ ],
912
+ "page_idx": 7
913
+ },
914
+ {
915
+ "type": "text",
916
+ "text": "We compare with state-of-the-art alternatives and report the top-1 accuracy on the ImageNet-1K validation set. FLOPs are calculated at batch size 1024. From Figure 1a and Table 3, the following observations are made: (i) Overall, ViT and its variants yield better classification accuracy over CNNs. (ii) We achieve the best performance among the recent pure vision Transformer based methods including ViT [11] and DeiT [31], as well as the state-of-the-art CNN RegNet [26]. (iii) Our SOFT outperforms the most similar (in architecture configuration) Transformer counterparts PVT [35] at all variants. Since the attention module is the main difference, this validates directly the effectiveness of our model. (iv) We can also beat the latest ViT variants Twins [6] which is designed to address the efficiency limitation of ViT. We have done so with less parameters and fewer float point computation. ",
917
+ "bbox": [
918
+ 174,
919
+ 597,
920
+ 825,
921
+ 722
922
+ ],
923
+ "page_idx": 7
924
+ },
925
+ {
926
+ "type": "text",
927
+ "text": "To gain some insights into how attention is learned using our SOFT and the alternatives, Figure 3 shows the attention masks of various compared models. For each model, we show the output from the first two attention heads. It is evident that SOFT exhibits robustness and versatility in capturing local and long distance relations among pixels. It is interesting to note that, although SOFT is trained on an object categorization dataset in ImageNet [9], it seems to be able to learn both semantic concepts shared across instances in the same category and instance specific features. For instance, in the bottom-right example of a bird class, one attention head focuses on the black bird only, while the other attend to both birds in the image. More examples are shown in Supplementary A.4. ",
928
+ "bbox": [
929
+ 174,
930
+ 728,
931
+ 825,
932
+ 839
933
+ ],
934
+ "page_idx": 7
935
+ },
936
+ {
937
+ "type": "text",
938
+ "text": "4.4 Ablation studies ",
939
+ "text_level": 1,
940
+ "bbox": [
941
+ 174,
942
+ 857,
943
+ 325,
944
+ 871
945
+ ],
946
+ "page_idx": 7
947
+ },
948
+ {
949
+ "type": "text",
950
+ "text": "Pyramidal architecture: Unlike the earlier non-pyramidal vision Transformers (e.g., ViT [11]), most recent pyramidal (multi-scale) Transformers (e.g., PVT [35]) use convolution layers to reduce the spatial resolution (i.e., token sequence length) between stages. In this study, we ablate SOFT with a pyramidal architecture (our default SOFT-Small), SOFT w/o a pyramidal architecture and DeiT-S [31] (no pyramidal architecture either). We replace the Transformer layer with a SOFT layer to get SOFT w/o a pyramidal architecture. Note all three variants have similar parameters and FLOPs. Table 5a shows that the conv-based pyramidal architecture is clearly superior to a non-pyramidal design, and our non-pyramidal counterpart is even slightly better than DeiT-S [31] whilst enjoying linear complexity. ",
951
+ "bbox": [
952
+ 174,
953
+ 883,
954
+ 821,
955
+ 911
956
+ ],
957
+ "page_idx": 7
958
+ },
959
+ {
960
+ "type": "image",
961
+ "img_path": "images/ba1cc7f375109b1a9c853ea1e695d3d9ff9f26f47d03e1607618e0f607e93b6d.jpg",
962
+ "image_caption": [
963
+ "Figure 3: Comparing the attention heatmaps of a query patch (marked by the cross $\" + \"$ ) against all the patches of an image, produced by (a) Transformer [33], (b) Performer [5], (c) Nystromformer [39] and (d) Our SOFT. See Supplementary A.4 for more examples. ",
964
+ "Table 4: (a) Ablations on bottleneck token sequence length. (b) Ablations on sampling methods. "
965
+ ],
966
+ "image_footnote": [],
967
+ "bbox": [
968
+ 173,
969
+ 88,
970
+ 823,
971
+ 224
972
+ ],
973
+ "page_idx": 8
974
+ },
975
+ {
976
+ "type": "text",
977
+ "text": "",
978
+ "bbox": [
979
+ 173,
980
+ 296,
981
+ 826,
982
+ 393
983
+ ],
984
+ "page_idx": 8
985
+ },
986
+ {
987
+ "type": "text",
988
+ "text": "Bottleneck token sequence length: In this study, we examine how the bottleneck token sequence length $m$ , sampled from $n$ tokens, influences the model’s performance. We change the bottleneck token sequence length in all stages to 36, 49, 64, 81. Table 4a shows that longer bottleneck token would increase the memory cost and the computational overhead. $m = 4 9$ seems to give the best trade-off between the performance and computational overhead. The memory usage is measured with the batch size of 128. ",
989
+ "bbox": [
990
+ 174,
991
+ 415,
992
+ 485,
993
+ 566
994
+ ],
995
+ "page_idx": 8
996
+ },
997
+ {
998
+ "type": "text",
999
+ "text": "Token sampling: The sampling function in SOFT can assume different forms. Convolution: The sequence $Q \\in \\mathbb { R } ^ { n \\times d _ { e } }$ is first reshaped to a feature map $\\mathbb { R } ^ { H \\times W \\times d _ { e } }$ . $r \\times r$ convolution kernel with stride of $r$ is applied for downsampling, where $r = { \\sqrt { s p } }$ . The output channel size ",
1000
+ "bbox": [
1001
+ 173,
1002
+ 588,
1003
+ 485,
1004
+ 672
1005
+ ],
1006
+ "page_idx": 8
1007
+ },
1008
+ {
1009
+ "type": "image",
1010
+ "img_path": "images/c9c7de6be748dad76a096a1e9a90a389125480abe192a9bc5a1eeba7f1b7e704.jpg",
1011
+ "image_caption": [
1012
+ "Figure 4: Convergence analysis for the approximation of the Moore-Penrose inverse on SOFT-Tiny. "
1013
+ ],
1014
+ "image_footnote": [],
1015
+ "bbox": [
1016
+ 500,
1017
+ 435,
1018
+ 816,
1019
+ 621
1020
+ ],
1021
+ "page_idx": 8
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "is also kept and no bias is used. At last, the feature map is reshaped back to the sequence. Average pooling: using a $r \\times r$ kernel and $r$ stride, where $r = { \\sqrt { s p } }$ . Random sampling: $m$ tokens are randomly picked from $n$ tokens. Biased sampling: We pick $m$ tokens with a biased policy. Here, the first $m$ tokens are picked. Table $^ \\mathrm { 4 b }$ shows that average pooling yields the best performance while with less computational overhead comparing to convolution. Biased sampling can miss the most salient samples, and there is no guarantee that random sampling can keep the uniformity of the chosen samples. This result thus justifies the choice of using average pooling in SOFT. ",
1026
+ "bbox": [
1027
+ 173,
1028
+ 671,
1029
+ 826,
1030
+ 768
1031
+ ],
1032
+ "page_idx": 8
1033
+ },
1034
+ {
1035
+ "type": "table",
1036
+ "img_path": "images/03b677bfb67adb0e93773d7c1a790c36fbebb0280889281125037505bb101d41.jpg",
1037
+ "table_caption": [],
1038
+ "table_footnote": [],
1039
+ "table_body": "<table><tr><td>Bottleneck</td><td>Memory</td><td>FLOPs</td><td>Top-1 %</td></tr><tr><td>36</td><td>15.1GB</td><td>1.9G</td><td>79.0</td></tr><tr><td>49</td><td>15.8GB</td><td>1.9G</td><td>79.3</td></tr><tr><td>64</td><td>16.9GB</td><td>2.0G</td><td>79.3</td></tr><tr><td>81</td><td>18.5GB</td><td>2.1G</td><td>78.9</td></tr></table>",
1040
+ "bbox": [
1041
+ 186,
1042
+ 797,
1043
+ 472,
1044
+ 882
1045
+ ],
1046
+ "page_idx": 8
1047
+ },
1048
+ {
1049
+ "type": "table",
1050
+ "img_path": "images/ae00187080c38f62be99fe513b6d16106c1ff0afd29088a754dcd7dbb98b27d9.jpg",
1051
+ "table_caption": [],
1052
+ "table_footnote": [],
1053
+ "table_body": "<table><tr><td>Sampling methods|Params</td><td></td><td>FLOPs</td><td>Top-1 %</td></tr><tr><td>Convolution</td><td>13.07M</td><td>2.0G</td><td>79.3</td></tr><tr><td>Random sampling</td><td>12.96M</td><td>1.9G</td><td>79.3</td></tr><tr><td>Biased sampling</td><td>12.96M</td><td>1.9G</td><td>79.0</td></tr><tr><td>Average pooling</td><td>12.96M</td><td>1.9G</td><td>79.3</td></tr></table>",
1054
+ "bbox": [
1055
+ 488,
1056
+ 797,
1057
+ 821,
1058
+ 882
1059
+ ],
1060
+ "page_idx": 8
1061
+ },
1062
+ {
1063
+ "type": "text",
1064
+ "text": "Overlapped convolution: We ablate SOFT with overlapped convolution (our default choice, same as many recent works) and SOFT with non-overlapped convolution in our Tiny configuration. Table 5b shows that SOFT with overlapped convolution performs better than SOFT without overlapped convolution. Our non-overlapped convolution variant still outperforms the PVT [35] which also has the same non-overlapped convolution by a clear margin. ",
1065
+ "bbox": [
1066
+ 173,
1067
+ 90,
1068
+ 825,
1069
+ 161
1070
+ ],
1071
+ "page_idx": 9
1072
+ },
1073
+ {
1074
+ "type": "table",
1075
+ "img_path": "images/f0bc5ae21cd0a66151ac4e88ef1d35bb32c80d83032b666b25ff821756508bdd.jpg",
1076
+ "table_caption": [],
1077
+ "table_footnote": [
1078
+ "Table 5: (a) Ablations on pyramidal architecture. (b) Ablations on overlapped convolution. "
1079
+ ],
1080
+ "table_body": "<table><tr><td>Methods</td><td>Pyramidal?</td><td>Top-1 %</td><td>Methods</td><td>Overlapped?</td><td>Top-1%</td></tr><tr><td>DeiT-S [31]</td><td>X</td><td>79.8</td><td>PVT [35]</td><td>X</td><td>75.1</td></tr><tr><td>SOFT</td><td></td><td>80.1</td><td>SOFT</td><td></td><td>77.4</td></tr><tr><td>SOFT</td><td>√</td><td>82.2</td><td>SOFT</td><td>√</td><td>79.3</td></tr></table>",
1081
+ "bbox": [
1082
+ 174,
1083
+ 174,
1084
+ 818,
1085
+ 251
1086
+ ],
1087
+ "page_idx": 9
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "Newton-Raphson’s convergence: We study how many iterations the Newton-Raphson method needs to converge when computing the Moore-Penrose inverse $A ^ { \\dagger }$ . We use $\\| A A _ { k } \\bar { A } - A \\| _ { p } / \\| A \\| _ { p }$ with $p = 2$ (see Proposition 1) as the convergence metric to quantify the difference between $A _ { k }$ and $A ^ { \\dagger }$ . Figure 4 shows that our approximation converges within 20 iterations across all stages. ",
1092
+ "bbox": [
1093
+ 173,
1094
+ 273,
1095
+ 825,
1096
+ 330
1097
+ ],
1098
+ "page_idx": 9
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "4.5 Additional experiments on NLP tasks ",
1103
+ "text_level": 1,
1104
+ "bbox": [
1105
+ 176,
1106
+ 347,
1107
+ 473,
1108
+ 361
1109
+ ],
1110
+ "page_idx": 9
1111
+ },
1112
+ {
1113
+ "type": "text",
1114
+ "text": "In this section, we evaluate our method against other linear counterparts on four tasks of the Long Range Arena (LRA) [29] benchmark e.g., Listops [23], byte-level IMDb reviews text classification [21], byte-level document retrieval [25], and image classification on sequences of pixels [19]. ",
1115
+ "bbox": [
1116
+ 174,
1117
+ 372,
1118
+ 826,
1119
+ 414
1120
+ ],
1121
+ "page_idx": 9
1122
+ },
1123
+ {
1124
+ "type": "text",
1125
+ "text": "Implementations. We use the Pytorch version of LRA [29] benchmark, provided by [39]. For the evaluation protocol, we strictly follow [29, 39]. We omit the Pathfinder(1K) task as we cannot replicate the result of Nyströmformer [39]. For our SOFT, we simply use the average pooling with window size 4, stride 4 to sample the bottlenecks. We follow the configurations of [39], with 2 layers, 64 and 128 hidden dimension respectively, and 2 attention heads. The results in Table 6 shows that our SOFT outperforms both the standard and alternative efficient Transformers on three out of four tasks, as well as the average result. ",
1126
+ "bbox": [
1127
+ 174,
1128
+ 420,
1129
+ 825,
1130
+ 518
1131
+ ],
1132
+ "page_idx": 9
1133
+ },
1134
+ {
1135
+ "type": "table",
1136
+ "img_path": "images/d8bf6a25213037616a247a338e79bc65d3cd3d563636254382155bab641be227.jpg",
1137
+ "table_caption": [],
1138
+ "table_footnote": [
1139
+ "Table 6: Comparison of different linear/efficient Transformer variants on Long Range Arena [29], based on its official configuration. Our SOFT surpasses previous efficient methods on three tasks. "
1140
+ ],
1141
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Methods</td><td rowspan=1 colspan=1>Listops(2K)</td><td rowspan=1 colspan=1>Text(4K)</td><td rowspan=1 colspan=1>Retrieval(4K)</td><td rowspan=1 colspan=1>Image(1K)</td><td rowspan=1 colspan=1>Avg.%</td></tr><tr><td rowspan=1 colspan=1>Transformer [33]</td><td rowspan=1 colspan=1>37.10</td><td rowspan=1 colspan=1>65.02</td><td rowspan=1 colspan=1>79.35</td><td rowspan=1 colspan=1>38.20</td><td rowspan=1 colspan=1>54.92</td></tr><tr><td rowspan=1 colspan=1>Reformer [18]</td><td rowspan=1 colspan=1>19.05</td><td rowspan=1 colspan=1>64.88</td><td rowspan=1 colspan=1>78.64</td><td rowspan=1 colspan=1>43.29</td><td rowspan=1 colspan=1>51.47</td></tr><tr><td rowspan=2 colspan=1>Linformer [34]Performer [5]</td><td rowspan=1 colspan=1>37.25</td><td rowspan=1 colspan=1>55.91</td><td rowspan=1 colspan=1>79.37</td><td rowspan=1 colspan=1>37.84</td><td rowspan=1 colspan=1>52.59</td></tr><tr><td rowspan=1 colspan=1>18.80</td><td rowspan=1 colspan=1>63.81</td><td rowspan=1 colspan=1>78.62</td><td rowspan=1 colspan=1>37.07</td><td rowspan=1 colspan=1>49.58</td></tr><tr><td rowspan=1 colspan=1>Nystromformer [39]</td><td rowspan=1 colspan=1>37.15</td><td rowspan=1 colspan=1>65.52</td><td rowspan=1 colspan=1>79.56</td><td rowspan=1 colspan=1>41.58</td><td rowspan=1 colspan=1>55.95</td></tr><tr><td rowspan=1 colspan=1>SOFT</td><td rowspan=1 colspan=1>37.40</td><td rowspan=1 colspan=1>63.49</td><td rowspan=1 colspan=1>81.77</td><td rowspan=1 colspan=1>46.91</td><td rowspan=1 colspan=1>57.39</td></tr></table>",
1142
+ "bbox": [
1143
+ 209,
1144
+ 531,
1145
+ 787,
1146
+ 654
1147
+ ],
1148
+ "page_idx": 9
1149
+ },
1150
+ {
1151
+ "type": "text",
1152
+ "text": "5 Conclusions ",
1153
+ "text_level": 1,
1154
+ "bbox": [
1155
+ 173,
1156
+ 712,
1157
+ 307,
1158
+ 728
1159
+ ],
1160
+ "page_idx": 9
1161
+ },
1162
+ {
1163
+ "type": "text",
1164
+ "text": "We have introduced a novel softmax-free self-attention (SOFT) mechanism for linearizing Transformer’s complexity in space and time. Unlike existing linear Transformers that aim to approximate the conventional softmax based self-attention, SOFT employs a Gaussian kernel based attention which eliminates the need for softmax normalization. This design enables a full self-attention matrix to be approximated via a low-rank matrix decomposition. The robustness of the approximation is achieved by calculating its Moore-Penrose inverse using a Newton-Raphson method. Extensive experiments show that SOFT yields superior trade-off in accuracy and complexity. ",
1165
+ "bbox": [
1166
+ 173,
1167
+ 742,
1168
+ 825,
1169
+ 840
1170
+ ],
1171
+ "page_idx": 9
1172
+ },
1173
+ {
1174
+ "type": "text",
1175
+ "text": "Acknowledgment This work was funded in part by Shanghai Municipal Science and Technology Major Projects (No.2018SHZDZX01 and No.2021SHZDZX0103), Mindspore, National Science Foundation of China under Grant No.11690013, 71991471 and the scientific-technological innovation plan program of Universities guided by the Ministry of Education, China. ",
1176
+ "bbox": [
1177
+ 176,
1178
+ 856,
1179
+ 823,
1180
+ 911
1181
+ ],
1182
+ "page_idx": 9
1183
+ },
1184
+ {
1185
+ "type": "text",
1186
+ "text": "References \n[1] Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint, 2016. 6 \n[2] Irwan Bello. Lambdanetworks: Modeling long-range interactions without attention. arXiv preprint, 2021. 8 \n[3] Adi Ben-Israel and Dan Cohen. On iterative computation of generalized inverses and associated projections. SIAM Journal on Numerical Analysis, 1966. 5 \n[4] Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. In NeurIPS, 2020. 1, 2 \n[5] Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Davis, Afroz Mohiuddin, Lukasz Kaiser, et al. Rethinking attention with performers. In ICLR, 2021. 2, 3, 6, 7, 9, 10 \n[6] Xiangxiang Chu, Zhi Tian, Yuqing Wang, Bo Zhang, Haibing Ren, Xiaolin Wei, Huaxia Xia, and Chunhua Shen. Twins: Revisiting the design of spatial attention in vision transformers. arXiv preprint, 2021. 2, 8 \n[7] Xiangxiang Chu, Zhi Tian, Bo Zhang, Xinlong Wang, Xiaolin Wei, Huaxia Xia, and Chunhua Shen. Conditional positional encodings for vision transformers. arXiv preprint, 2021. 8 \n[8] Stéphane d’Ascoli, Hugo Touvron, Matthew Leavitt, Ari Morcos, Giulio Biroli, and Levent Sagun. Convit: Improving vision transformers with soft convolutional inductive biases. In ICML, 2021. 1 \n[9] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. 2, 6, 8 \n[10] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In ACL, 2018. 1, 2 \n[11] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2021. 1, 2, 6, 7, 8 \n[12] Gregory E Fasshauer. Positive definite kernels: past, present and future. Dolomites Research Notes on Approximation, 2011. 4 \n[13] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 2, 8 \n[14] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. 6 \n[15] Andrew Jaegle, Felix Gimeno, Andrew Brock, Andrew Zisserman, Oriol Vinyals, and Joao Carreira. Perceiver: General perception with iterative attention. arXiv preprint, 2021. 1 \n[16] Jungo Kasai, Hao Peng, Yizhe Zhang, Dani Yogatama, Gabriel Ilharco, Nikolaos Pappas, Yi Mao, Weizhu Chen, and Noah A Smith. Finetuning pretrained transformers into rnns. arXiv preprint arXiv:2103.13076, 2021. 3 \n[17] Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. Transformers are rnns: Fast autoregressive transformers with linear attention. In ICML, 2020. 2, 3 \n[18] Nikita Kitaev, Łukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer. In ICLR, 2020. 2, 3, 7, 10 \n[19] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. Citeseer, 2009. 10 ",
1187
+ "bbox": [
1188
+ 171,
1189
+ 75,
1190
+ 828,
1191
+ 916
1192
+ ],
1193
+ "page_idx": 10
1194
+ },
1195
+ {
1196
+ "type": "text",
1197
+ "text": "[20] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. arXiv preprint, 2021. 8 ",
1198
+ "bbox": [
1199
+ 173,
1200
+ 90,
1201
+ 825,
1202
+ 132
1203
+ ],
1204
+ "page_idx": 11
1205
+ },
1206
+ {
1207
+ "type": "text",
1208
+ "text": "[21] Andrew Maas, Raymond E Daly, Peter T Pham, Dan Huang, Andrew $\\mathrm { ~ Y ~ N ~ g ~ } _ { }$ , and Christopher Potts. Learning word vectors for sentiment analysis. In Proceedings of the 49th annual meeting of the association for computational linguistics: Human language technologies, 2011. 10 \n[22] Mindspore. https://www.mindspore.cn/, 2020. 7 \n[23] Nikita Nangia and Samuel R Bowman. Listops: A diagnostic dataset for latent tree learning. arXiv preprint, 2018. 10 \n[24] Hao Peng, Nikolaos Pappas, Dani Yogatama, Roy Schwartz, Noah A Smith, and Lingpeng Kong. Random feature attention. arXiv preprint arXiv:2103.02143, 2021. 3 \n[25] Dragomir R Radev, Pradeep Muthukrishnan, Vahed Qazvinian, and Amjad Abu-Jbara. The acl anthology network corpus. Language Resources and Evaluation, 2013. 10 \n[26] Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, and Piotr Dollár. Designing network design spaces. In CVPR, 2020. 2, 8 \n[27] Aravind Srinivas, Tsung-Yi Lin, Niki Parmar, Jonathon Shlens, Pieter Abbeel, and Ashish Vaswani. Bottleneck transformers for visual recognition. arXiv preprint, 2021. 8 \n[28] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In CVPR, 2016. 7 \n[29] Yi Tay, Mostafa Dehghani, Samira Abnar, Yikang Shen, Dara Bahri, Philip Pham, Jinfeng Rao, Liu Yang, Sebastian Ruder, and Donald Metzler. Long range arena: A benchmark for efficient transformers. arXiv preprint, 2020. 10 \n[30] Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Metzler. Efficient transformers: A survey. arXiv preprint, 2020. 3 \n[31] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. arXiv preprint, 2020. 2, 8, 9, 10 \n[32] Hugo Touvron, Matthieu Cord, Alexandre Sablayrolles, Gabriel Synnaeve, and Hervé Jégou. Going deeper with image transformers. arXiv preprint, 2021. 8 \n[33] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017. 1, 2, 3, 4, 6, 9, 10 \n[34] Sinong Wang, Belinda Li, Madian Khabsa, Han Fang, and Hao Ma. Linformer: Self-attention with linear complexity. arXiv preprint, 2020. 2, 3, 6, 7, 10 \n[35] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. arXiv preprint, 2021. 2, 6, 7, 8, 10 \n[36] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In CVPR, 2018. 2 \n[37] Ross Wightman. Pytorch image models. https://github.com/rwightman/ pytorch-image-models, 2019. 6 \n[38] Christopher Williams and Matthias Seeger. Using the nyström method to speed up kernel machines. In NeurIPS, 2001. 4 \n[39] Yunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan, Glenn Fung, Yin Li, and Vikas Singh. Nyströmformer: A nyström-based algorithm for approximating self-attention. In AAAI, 2021. 2, 3, 4, 6, 7, 9, 10 \n[40] Weijian Xu, Yifan Xu, Tyler Chang, and Zhuowen Tu. Co-scale conv-attentional image transformers. arXiv preprint, 2021. 8 \n[41] Li Yuan, Yunpeng Chen, Tao Wang, Weihao Yu, Yujun Shi, Zihang Jiang, Francis EH Tay, Jiashi Feng, and Shuicheng Yan. Tokens-to-token vit: Training vision transformers from scratch on imagenet. arXiv preprint, 2021. 1, 2, 8 \n[42] Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk Chun, Junsuk Choe, and Youngjoon Yoo. Cutmix: Regularization strategy to train strong classifiers with localizable features. In ICCV, 2019. 7 \n[43] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint, 2017. 7 \n[44] Li Zhang, Dan Xu, Anurag Arnab, and Philip HS Torr. Dynamic graph message passing networks. In CVPR, 2020. 2 \n[45] Hengshuang Zhao, Jiaya Jia, and Vladlen Koltun. Exploring self-attention for image recognition. In CVPR, 2020. 2 \n[46] Sixiao Zheng, Jiachen Lu, Hengshuang Zhao, Xiatian Zhu, Zekun Luo, Yabiao Wang, Yanwei Fu, Jianfeng Feng, Tao Xiang, Philip HS Torr, and Li Zhang. Rethinking semantic segmentation from a sequence-to-sequence perspective with transformers. In CVPR, 2021. 1 \n[47] Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable detr: Deformable transformers for end-to-end object detection. In ICLR, 2021. 1 ",
1209
+ "bbox": [
1210
+ 171,
1211
+ 102,
1212
+ 828,
1213
+ 917
1214
+ ],
1215
+ "page_idx": 11
1216
+ },
1217
+ {
1218
+ "type": "text",
1219
+ "text": "",
1220
+ "bbox": [
1221
+ 168,
1222
+ 89,
1223
+ 828,
1224
+ 426
1225
+ ],
1226
+ "page_idx": 12
1227
+ }
1228
+ ]
parse/train/rndqBJsGoKh/rndqBJsGoKh_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rndqBJsGoKh/rndqBJsGoKh_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/rylqooRqK7/rylqooRqK7.md ADDED
@@ -0,0 +1,496 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SNAS: STOCHASTIC NEURAL ARCHITECTURE SEARCH
2
+
3
+ Sirui Xie, Hehui Zheng, Chunxiao Liu, Liang Lin
4
+ SenseTime
5
+ {xiesirui, zhenghehui, liuchunxiao}@sensetime.com
6
+ linliang@ieee.org
7
+
8
+ # ABSTRACT
9
+
10
+ We propose Stochastic Neural Architecture Search (SNAS), an economical endto-end solution to Neural Architecture Search (NAS) that trains neural operation parameters and architecture distribution parameters in same round of backpropagation, while maintaining the completeness and differentiability of the NAS pipeline. In this work, NAS is reformulated as an optimization problem on parameters of a joint distribution for the search space in a cell. To leverage the gradient information in generic differentiable loss for architecture search, a novel search gradient is proposed. We prove that this search gradient optimizes the same objective as reinforcement-learning-based NAS, but assigns credits to structural decisions more efficiently. This credit assignment is further augmented with locally decomposable reward to enforce a resource-efficient constraint. In experiments on CIFAR-10, SNAS takes fewer epochs to find a cell architecture with state-of-theart accuracy than non-differentiable evolution-based and reinforcement-learningbased NAS, which is also transferable to ImageNet. It is also shown that child networks of SNAS can maintain the validation accuracy in searching, with which attention-based NAS requires parameter retraining to compete, exhibiting potentials to stride towards efficient NAS on big datasets.
11
+
12
+ # 1 INTRODUCTION
13
+
14
+ The trend to seek for state-of-the-art neural network architecture automatically has been growing since Zoph & Le (2016), given the enormous effort needed in scientific research. Normally, a Neural Architecture Search (NAS) pipeline comprises architecture sampling, parameter learning, architecture validation, credit assignment and search direction update.
15
+
16
+ There are basically three existing frameworks for neural architecture search. Evolution-based NAS like NEAT (Stanley & Miikkulainen, 2002) employs evolution algorithm to simultaneously optimize topology alongside with parameters. However, it takes enormous computational power and could not leverage the efficient gradient back-propagation in deep learning. To achieve the state-of-the-art performance as human-designed architectures, Real et al. (2018) takes 3150 GPU days for the whole evolution. Reinforcement-learning-based NAS is end-to-end for gradient back-propagation, among which the most efficient one, ENAS (Pham et al., 2018) learns optimal parameters and architectures together just like NEAT. However, as NAS is modeled as a Markov Decision Process, credits are assigned to structural decisions with temporal-difference (TD) learning (Sutton et al., 1998), whose efficiency and interpretability suffer from delayed rewards (Arjona-Medina et al., 2018). To get rid of the architecture sampling process, DARTS (Liu et al., 2019) proposes deterministic attention on operations to analytically calculate expectation at each layer. After the convergence of the parent network, it removes operations with relatively weak attention. Due to the pervasive non-linearity in neural operations, it introduces untractable bias to the loss function. This bias causes inconsistency between the performance of derived child networks and converged parent networks, thus parameter retraining comes up as necessary. A more efficient, more interpretable and less biased framework is in desire, especially for future full-fledged NAS solutions on large datasets.
17
+
18
+ In this work, we propose a novel, efficient and highly automated framework, Stochastic Neural Architecture Search (SNAS), that trains neural operation parameters and architecture distribution parameters in same round of back propagation, while maintaining the completeness and differentiability of the NAS pipeline. One of the key motivations of SNAS is to replace the feedback mechanism triggered by constant rewards in reinforcement-learning-based NAS with more efficient gradient feedback from generic loss. We reformulate NAS with a new stochastic modeling to bypass the MDP assumption in reinforcement learning. To combine architecture sampling with computational graph of arbitrary differentiable loss, the search space is represented with a set of one-hot random variables from a fully factorizable joint distribution, multiplied as a mask to select operations in the graph. Sampling from this search space is made differentiable by relaxing the architecture distribution with concrete distribution (Maddison et al., 2016). We name gradients w.r.t their parameters search gradient. From a global view, we prove that SNAS optimizes the same objective as reinforcement-learning-based NAS, except the training loss is used as reward. Zooming in, we provide a policy gradient equivalent of this search gradient, showing how gradients from the loss of each sample are used to assign credits to structural decisions. By interpreting this credit assignment as Taylor Decomposition (Montavon et al., 2017a), we prove SNAS’s efficiency over reinforcementlearning-based NAS. Additionally, seeing that existing methods (Liu et al., 2019) manually design topology in child networks to avoid complex architecture, we propose a global resource constraint to automate it, augmenting the objective with feasiblity concerns. This global constraint could be linearly decomposed for structural decisions, hence the proof of SNAS’s efficiency still applies.
19
+
20
+ In our experiments, SNAS shows strong performance compared with DARTS and all other existing NAS methods in terms of test error, model complexity and searching resources. Specifically, SNAS discovers novel convolutional cells achieving $2 . 8 5 { \pm } 0 . 0 2 \%$ test error on CIFAR-10 with only $2 . 8 \mathbf { M }$ parameters, which is better than $3 . 0 0 { \pm } 0 . 1 4 \% - 3 . 3 \mathrm { M }$ from 1st-order DARTS and $2 . 8 9 \%$ -4.6M from ENAS. It is also on par with $2 . 7 6 { \pm } 0 . 0 9 \% - 3 .$ 3M from 2nd-order DARTS with fewer parameters. With a more aggressive resource constraint, SNAS discovers even smaller model achieving $3 . 1 0 { \pm } 0 . 0 4 \%$ test error on CIFAR-10 with 2.3M parameters. During the architecture search process, SNAS obtains a validation accuracy of $8 8 \%$ compared to around $70 \%$ of ENAS in fewer epochs. When validating the derived child network on CIFAR-10 without finetuning, SNAS maintains the search validation accuracy, significantly outperforming $5 4 . 6 6 \%$ by DARTS. These results validate our theory that SNAS is less biased than DARTS. The discovered cell achieves $2 7 . 3 \%$ top-1 error when transferred to ImageNet (mobile setting), which is comparable to $2 6 . 9 \%$ by 2nd-order DARTS.
21
+
22
+ ![](images/0b2bd7b5f1cb6c4b4b9b8b5f3bf8b6ca73d41664cdc7e75305ce3ff357036122.jpg)
23
+ Figure 1: A conceptual visualization for a forward pass within SNAS. Sampled from $p ( Z )$ , $z$ is a matrix whose rows $\boldsymbol { Z } _ { i , j }$ are one-hot random variable vectors indicating masks multiplied to edges $( i , j )$ in the DAG. Columns of this matrix correspond to operations $O ^ { k }$ . In this example, there are 4 operation candidates, among which the last one is zero, i.e. removing that edge. The objective is the expectation of generic loss $L$ of all child graphs.
24
+
25
+ # 2 METHODOLOGY
26
+
27
+ The main initiative of SNAS is to build an efficient and economical end-to-end learning system with as little compromise of the NAS pipeline as possible. In this section, we first describe how to sample from the search space for NAS in a cell, and how it motivates a stochastic reformuation for SNAS (Section 2.1). A new optimization objective is provided and the attention-based NAS’s inconsistency is discussed. Then in Section 2.2, we introduce how this discrete search space is relaxed to be continuous to let gradients back-propagate through. In Section 2.3, the search gradient of SNAS is connected to the policy gradient in reinforcement-learning-based NAS (Zoph & Le, 2016; Pham et al., 2018), interpreting SNAS’s credit assignment with contribution analysis. At last, we introduce in Section 2.4 how SNAS automates the topology search to reduce the complexity of child netowrk, as well as how it decomposes this global constraint in the context of credit assignment.
28
+
29
+ # 2.1 SEARCH SPACE AND ARCHITECTURE SAMPLING
30
+
31
+ Searching for structure of a cell that is later stacked as building blocks for a deep architecture is an ad hoc solution to trade-off search efficiency and result optimality (Zoph et al., 2017; Liu et al., 2017a; Real et al., 2018; Pham et al., 2018; Liu et al., 2019). As shown in the left of Figure 1, the search space, i.e. a cell, is represented using a directed acyclic graph (DAG), which is called parent graph. Nodes $x _ { i }$ in this DAG represent latent representation, whose dimensions are simply ignored to avoid abuse of notations. In convolutional networks, they are feature maps. Edges $( i , j )$ represent information flows and possible operations $O _ { i , j }$ to be selected between two nodes $x _ { i }$ and $x _ { j }$ . To make the skip operation included, nodes are enforced to be ordered, while edges only point from lower indexed nodes to higher ones. Thus we have intermediate nodes
32
+
33
+ $$
34
+ x _ { j } = \sum _ { i < j } \tilde { O } _ { i , j } ( x _ { i } ) ,
35
+ $$
36
+
37
+ where $\tilde { O } _ { i , j }$ is the selected operation at edge $( i , j )$ . Analog to ENAS, SNAS search for operations and topology of this cell at the same time. Rather than using two distributions, this is done by introducing a zero operation, as in DARTS. Same as ENAS and DARTS, each cell is designed to have two inputs from the output of previous cells. The output of a cell is the concatenate of intermediate nodes.
38
+
39
+ Thanks to the fact that the volume of structural decisions, which pick $\tilde { O } _ { i , j }$ for edge $( i , j )$ , is generally tractable in a cell, we represent it with a distribution $p ( Z )$ . Multiplying each one-hot random variable $\boldsymbol { Z } _ { i , j }$ to each edge $( i , j )$ in the DAG, we obtain a child graph, whose intermediate nodes are
40
+
41
+ $$
42
+ x _ { j } = \sum _ { i < j } \tilde { O } _ { i , j } ( x _ { i } ) = \sum _ { i < j } Z _ { i , j } ^ { T } O _ { i , j } ( x _ { i } ) .
43
+ $$
44
+
45
+ In terms of how to parameterize and factorize $p ( Z )$ , SNAS is built upon the observation that NAS is a task with fully delayed rewards in a deterministic environment. That is, the feedback signal is only ready after the whole episode is done and all state transition distributions are delta functions. Therefore, a Markov Decision Process assumption as in ENAS may not be necessary. In SNAS, we simply assume that $p ( Z )$ is fully factorizable, whose factors are parameterized with $_ { \pmb { \alpha } }$ and learnt along with operation parameters $\pmb \theta$ . In Appendix A we connect the probability of a trajectory in the MDP of ENAS and this joint probability $p ( Z )$ .
46
+
47
+ Following the setting in Zoph & Le (2016), the objective of SNAS is also
48
+
49
+ $$
50
+ \mathbb { E } _ { Z \sim p _ { \alpha } ( Z ) } [ R ( Z ) ] .
51
+ $$
52
+
53
+ While the difference is that rather than using a constant reward from validation accuracy, we use the training/testing loss directly as reward, $R ( Z ) = L _ { \theta } ( Z )$ , such that the operation parameters and architecture parameters can be trained under one generic loss:
54
+
55
+ $$
56
+ \begin{array} { r } { \mathbb { E } _ { Z \sim p _ { \alpha } ( Z ) } [ R ( Z ) ] = \mathbb { E } _ { Z \sim p _ { \alpha } ( Z ) } [ L _ { \theta } ( Z ) ] . } \end{array}
57
+ $$
58
+
59
+ The whole process of obtaining a Monte Carlo estimate of this objective is shown in Figure 1. An intuitive interpretation of this objective is to optimize the expected performance of architectures sampled with $p ( Z )$ . This differentiates SNAS from attention-based NAS like DARTS, which avoids the sampling process by taking analytical expectation at each edge over all operations. In Appendix B we illustrate the inconsistency between DARTS’s loss and this objective, explaining its necessity of parameter finetuning or even retraining after architecture derivation. Resembling ENAS, SNAS does not have this constraint. We introduce in next subsection how SNAS calculates gradients w.r.t $\pmb { \theta }$ and $_ { \pmb { \alpha } }$ .
60
+
61
+ # 2.2 PARAMETER LEARNING FOR OPERATIONS AND ARCHITECTURES
62
+
63
+ Though the objective (4) could be optimized with black-box gradient descent method as in Ranganath et al. (2014), it would suffer from the high variance of likelihood ratio trick (Williams, 1992) and could not make use of the differentiable nature of $L _ { \theta } ( Z )$ . Instead, we use concrete distribution (Maddison et al., 2016) here to relax the discrete architecture distribution to be continuous and differentiable with reparameterization trick:
64
+
65
+ $$
66
+ \begin{array} { r l } & { \boldsymbol Z _ { i , j } ^ { k } = f _ { \alpha _ { i , j } } ( \boldsymbol G _ { i , j } ^ { k } ) } \\ & { \qquad = \frac { \exp ( ( \log \alpha _ { i , j } ^ { k } + G _ { i , j } ^ { k } ) / \lambda ) } { \sum _ { l = 0 } ^ { n } \exp ( ( \log \alpha _ { i , j } ^ { l } + G _ { i , j } ^ { l } ) / \lambda ) } , } \end{array}
67
+ $$
68
+
69
+ where $\boldsymbol { Z } _ { i , j }$ is the softened one-hot random variable for operation selection at edge $( i , j ) , G _ { i , j } ^ { k } =$ $- \log ( - \log ( U _ { i , j } ^ { k } ) )$ is the kth Gumbel random variable, $U _ { i , j } ^ { k }$ is a uniform random variable. $\alpha _ { i , j }$ is the architecture parameter, which could depend on predecessors $\mathbf { \mathcal { Z } } _ { h , i }$ if $p ( Z _ { i , j } )$ is a conditional probability. in SNAS. In $\lambda$ is the temperature of the softmax, whaddison et al. (2016), it is proved that
70
+ $\begin{array} { r } { p ( \operatorname* { l i m } _ { \lambda 0 } \pmb { Z } _ { i , j } ^ { \tilde { k } } = 1 ) = \pmb { \alpha } _ { i , j } ^ { k } / ( \sum _ { l = 0 } ^ { n } \pmb { \alpha } _ { i , j } ^ { l } ) } \end{array}$ making this relaxation unbiased once converged.
71
+
72
+ The full derivation of $\nabla \mathbb { E } _ { Z \sim p _ { \alpha } ( Z ) } [ L _ { \theta } ( Z ) ]$ is given in Appendix C. Here with the surrogate loss $\mathcal { L }$ α for each sample, we provide its gradient w.r.t $x _ { j }$ , $\theta _ { i , j } ^ { k }$ and $\alpha _ { i , j } ^ { k }$ :
73
+
74
+ $$
75
+ \begin{array} { r l } & { \displaystyle \frac { \partial \mathcal { L } } { \partial x _ { j } } = \sum _ { m > j } \frac { \partial \mathcal { L } } { \partial x _ { m } } Z _ { m } ^ { T } \frac { \partial O _ { m } ( x _ { j } ) } { \partial x _ { j } } , } \\ & { \displaystyle \frac { \partial \mathcal { L } } { \partial \theta _ { i , j } ^ { k } } = \frac { \partial \mathcal { L } } { \partial x _ { j } } Z _ { i , j } ^ { k } \frac { \partial O _ { i , j } ( x _ { i } ) } { \partial \theta _ { i , j } ^ { k } } , } \\ & { \displaystyle \frac { \partial \mathcal { L } } { \partial \alpha _ { i , j } ^ { k } } = \frac { \partial \mathcal { L } } { \partial x _ { j } } O _ { i , j } ^ { T } ( x _ { i } ) ( \delta ( k ^ { \prime } - k ) - Z _ { i , j } ) Z _ { i , j } ^ { k } \frac { 1 } { \lambda \alpha _ { i , j } ^ { k } } . } \end{array}
76
+ $$
77
+
78
+ We name $\frac { \partial \mathcal { L } } { \partial \alpha }$ search gradient similar to the one in Wierstra et al. (2008), even though no policy gradient is involved. This renders SNAS a differentiable version of evolutionary-strategy-based NAS.
79
+
80
+ # 2.3 CREDIT ASSIGNMENT
81
+
82
+ With the equivalence of $p ( Z )$ in SNAS and $p ( \tau )$ in ENAS from Section 2.1 and the search gradient of SNAS from Section 2.2, we discuss in this subsection what credits SNAS search gradients assign to each structural decision.
83
+
84
+ To assign credits to actions both temporally and laterally is an important topic in reinforcement learning (Precup, 2000; Schulman et al., 2015; Tucker et al., 2018; Xu et al., 2018). In ENAS, proximal policy optimization (PPO) (Schulman et al., 2017) is used to optimize the architecture policy, which distributes credits with TD learning and generalized advantage estimator (GAE) (Schulman et al., 2015). However, as the reward of NAS task is only obtainable after the architecture is finalized and the network is tested for accuracy, it is a task with delayed rewards. As proved by Arjona-Medina et al. (2018), TD learning has bias with reward delay and corrects it exponentially slowly.
85
+
86
+ Different from ENAS, there is no MDP assumption in SNAS, but the reward function is made differentiable in terms of structural decisions. From Section 2.2 we can derive the expected search gradient for architecture parameters at edge $( i , j )$ :
87
+
88
+ $$
89
+ \mathbb { E } _ { Z \sim p ( Z ) } [ \frac { \partial \mathcal { L } } { \partial \alpha _ { i , j } ^ { k } } ] = \mathbb { E } _ { Z \sim p ( Z ) } [ \nabla _ { \alpha _ { i , j } ^ { k } } \log p ( Z _ { i , j } ) [ \frac { \partial \mathcal { L } } { \partial x _ { j } } \tilde { O } _ { i , j } ( x _ { i } ) ] _ { c } ] ,
90
+ $$
91
+
92
+ where $[ \cdot ] _ { c }$ emphasizes $\ast$ is constant for the gradient calculation $w . r . t . \ \alpha$ . A full derivation is provided in Appendix D. Apparently, the search gradient is equivalent to a policy gradient for distribution at this edge whose credit is assigned as
93
+
94
+ $$
95
+ R _ { i , j } = - [ \frac { \partial \mathcal { L } } { \partial x _ { j } } \tilde { O } _ { i , j } ( x _ { i } ) ] _ { c } .
96
+ $$
97
+
98
+ From a decision-wise perspective, this reward could be interpreted as contribution analysis of $\mathcal { L }$ with Taylor Decomposition (Montavon et al., 2017a), which distributes importance scores among nodes in the same effective layer. Given the presence of skip connections, nodes may be involved into multiple effective layers, credits from which would be integrated. This integrated credit of a node $j$ is then distributed to edges $( i , j )$ pointing to it, weighted by $\tilde { O } _ { i , j } ( x _ { i } )$ . Details are given in Appendix E. Thus for each structural decision, no delayed reward exists, the credits assigned to it are valid from the beginning. This proves why SNAS is more efficient than ENAS. Laterally at each edge, credits are distributed among possible operations, adjusted with random variables $\boldsymbol { Z } _ { i , j }$ . At the beginning of the training, $z _ { i , j }$ is continuous and operations share the credit, the training is mainly on neural operation parameters. With the temperature goes down and $\boldsymbol { Z } _ { i , j }$ becomes closer to one-hot, credits are given to the chosen operations, adjusting their probabilities to be sampled.
99
+
100
+ # 2.4 RESOURCE CONSTRAINT
101
+
102
+ Apart from training efficiency and validation accuracy, forwarding time of the child network is another concern in NAS in order for its feasible employment. In SNAS, this could be taken into account as a regularizer in the objective:
103
+
104
+ $$
105
+ \begin{array} { r } { \mathbb { E } _ { Z \sim p _ { \alpha } ( Z ) } [ L _ { \theta } ( Z ) + \eta C ( Z ) ] = \mathbb { E } _ { Z \sim p _ { \alpha } ( Z ) } [ L _ { \theta } ( Z ) ] + \eta \mathbb { E } _ { Z \sim p _ { \alpha } ( Z ) } [ C ( Z ) ] , } \end{array}
106
+ $$
107
+
108
+ where $C ( Z )$ is the cost of time for the child network associated with random variables $z$ . Rather than directly estimating the forwarding time, there are three candidates from the literature (Gordon et al., 2018; Ma et al., 2018) that can be used to approximately represent it: 1) the parameter size $; 2 )$ the number of float-point operations (FLOPs); and 3) the memory access cost (MAC). Details about $C ( Z )$ in SNAS could be found in Appendix F.
109
+
110
+ However, not like $L _ { \theta } ( Z )$ , $C ( Z )$ is not differentiable $w . r . t .$ . either $\pmb \theta$ or $_ { \pmb { \alpha } }$ . A natural problem to ask is, whether efficient credit assignment from $C ( Z )$ could be done with similar decomposition introduced above, such that the proof of SNAS’s efficiency still applies. And the answer is positive, thanks to the fact that $C ( Z )$ is linear in terms of all one-hot random variables $\boldsymbol { Z } _ { i , j }$ :
111
+
112
+ $$
113
+ C ( Z ) = \sum _ { i , j } C ( Z _ { i , j } ) = \sum _ { i , j } Z _ { i , j } ^ { T } C ( O _ { i , j } ) ,
114
+ $$
115
+
116
+ mainly because the size of feature maps at each node is not dependent on the structural decision. That is, the distribution at each edge $( i , j )$ is optimized with local penalty, which is the conservative decomposition of the global cost, consistent with the credit assignment principle in SNAS.
117
+
118
+ In SNAS, $p _ { \alpha } ( Z )$ is fully factorizable, making it possible to calculate $\mathbb { E } _ { Z \sim p _ { \alpha } } [ C ( Z ) ]$ analytically with sum-product algorithm (Kschischang et al., 2001). Unfortunately, this expectation is non-trivial to calculate, we optimize the Monte Carlo estimate of the final form from sum-product algorithm
119
+
120
+ $$
121
+ \mathbb { E } _ { Z \sim p _ { \alpha } } [ C ( Z ) ] = \sum _ { i , j } \mathbb { E } _ { Z \backslash i , j \sim p _ { \alpha } } [ \mathbb { E } _ { Z _ { i , j } \sim p _ { \alpha } } [ Z _ { i , j } ^ { T } C ( O _ { i , j } ) ] ]
122
+ $$
123
+
124
+ with policy gradients.
125
+
126
+ # 3 EXPERIMENTS
127
+
128
+ Following the pipeline in DARTS, our experiments consist of three stages. First, SNAS is applied to search for convolutional cells in a small parent network on CIFAR-10 and we choose the best cells based on their search validation accuracy. Then, a larger network is constructed by stacking the learned cells (child graphs) and is retrained on CIFAR-10 to compare the performance of SNAS with other state-of-the-art methods. Finally, we show that the cells learned on CIFAR-10 is transferable to large datasets by evaluating their performance on ImageNet.
129
+
130
+ # 3.1 ARCHITECTURE SEARCH ON CIFAR-10
131
+
132
+ Motivation We apply SNAS to find convolutional cells on CIFAR-10 for image classification. Unlike DARTS, which evaluates the performance of child networks during the searching stage by training their snapshots from scratch, we directly take the search validation accuracy as the performance evaluation criterion. This evaluation method is valid in SNAS since the searching is unbiased from its objective, as introduced in Section 2.1.
133
+
134
+ ![](images/a656c7de4a158ee1f703710ac6a3da7085cb26cfac2f016bbeb812d6c5dd30c8.jpg)
135
+ Figure 2: Cells (child graphs) SNAS (mild constraint) finds on CIFAR-10. (a) Normal cell. (b) Reduction cell.
136
+
137
+ Dataset CIFAR-10 dataset (Krizhevsky & Hinton, 2009) is a basic dataset for image classification, which consists of 50,000 training images and 10,000 testing images. Data transformation is achieved by the standard data pre-processing and augmentation techniques (see Appendix G.1).
138
+
139
+ Search Space Our setup follows DARTS, where convolutional cells (parent graphs) of 7 nodes are stacked for multiple times to form a network. The input nodes, i.e. the first and second nodes, of cell $k$ are set equal to the outputs of cell $k { - } 2$ and cell $k { - } 1$ , respectively, with $1 \times 1$ convolutions inserted as necessary, and the output node is the depthwise concatenation of all the intermediate nodes. Reduction cells are located at the 1/3 and $2 / 3$ of the total depth of the network to reduce the spatial resolution of feature maps. Therefore the architecture distribution parameters is $( \alpha _ { n o r m a l } , \alpha _ { r e d u c e } )$ , where $\mathbf { \alpha } _ { \alpha { \mathrm { ~ n ~ o r m a l } } }$ is shared by all the normal cells and $\alpha _ { r e d u c e }$ is shared by all the reduction cells. Details about all operations included are shown in Appendix G.1.
140
+
141
+ Training Settings In the searching stage, we train a small network stacked by 8 cells (parent graphs) using SNAS with three levels of resource constraint for 150 epochs. This network size is determined to fit into a single GPU. Single-level optimization is employed to optimize $\pmb \theta$ and $_ \alpha$ over the same dataset as opposed to bilevel optimization employed by DARTS. The rest of the setup follows DARTS (Appendix G.1). The search takes 32 hours1 on a single $\mathrm { G P U } ^ { 2 }$ .
142
+
143
+ Searching Process The normal and reduction cells learned on CIFAR-10 using SNAS with mild resource constraint are shown in Figure 2. In Figure 3, we give the validation accuracy during the search of SNAS, DARTS and ENAS with 10 Randomly Generated Seeds. Comparing with ENAS, SNAS takes fewer epochs to converge to higher validation accuracy. Though DARTS converges faster than SNAS, this accuracy is inconsistent with the child network. Table 1 presents their comparison of the validation accuracy at the end of search and after architecture derivation without fine-tuning. While SNAS can maintain its performance, there is a huge gap between those two in DARTS.
144
+
145
+ Table 1: Search validation accuracy and child network validation accuracy of SNAS and DARTS. Results marked with \* were obtained using the code publicly released by Liu et al. (2019).
146
+
147
+ <table><tr><td>Architecture</td><td>Search Valid. Acc (%)</td><td>Child Net Valid. Acc (%)</td><td>Search Cost (GPU days)</td></tr><tr><td>DARTS (2nd order bi-level) (Liu et al.,2019)*</td><td>87.67</td><td>54.66</td><td>13</td></tr><tr><td>SNAS (single-level) + mild constraint</td><td>88.54</td><td>90.67</td><td>1.5</td></tr></table>
148
+
149
+ ![](images/bbac88ef7d5b248a12f93ffa87c0fe5bd633b221f9d39d92a19919310e32fdfc.jpg)
150
+ Figure 3: Search progress in validation accuracy from SNAS, DARTS and ENAS.
151
+
152
+ ![](images/cd9f010efc3fbee957fc8a993a8a5aa2a168a30304d7bc392567e66dbbf7bc62.jpg)
153
+ Figure 4: Entropy of architecture distribution in SNAS and DARTS.
154
+
155
+ This gap is caused by the extra architecture derivation step in DARTS, consisting of the following two steps. (1) Remove operations with relatively weak attention. As shown in Figure 4, the entropy of the architecture distribution (softmax) at each edge, i.e. $\mathcal { H } _ { p _ { \alpha } }$ , is relatively high in DARTS, indicating its uncertainty in structural decisions. Hence removing other operations from the continuous relaxation will strongly affect the output of the network. (2) Remove relatively ambiguous edges. DARTS manually selects two inputs for each intermediate nodes, thus the topology is inconsistent with that in the training stage. While SNAS employs architecture sampling and resource regularizer to automatically induce sparsity. Phenomena shown in Figure 4 and Table 1 verify our claim that searching process in SNAS is less biased from the objective, i.e. Equation (4), and could possibly save computation resources for parameter retraining when extended to NAS on large datasets.
156
+
157
+ Searching Results Three levels of resource constraint, mild, moderate and aggressive are examined in SNAS. Mild resource constraint lies at the margin of the appearance of zero operation to drop edges in child graphs, as shown in Figure 2. Interestingly, every node takes only two input edges, just as in the designed scheme in ENAS and DARTS. When the constraint level is increased to moderate, the reduction cell begins to discover similar structures as normal cells, as shown in Appendix H. When a more aggressive resource constraint is added, the structure of reduction cells is further sparsified. As shown in Figure 5, more edges are dropped, leaving only two, which leads to the drop of some nodes, including the input node $c _ { k - 1 }$ , and two intermediate nodes $x _ { 2 }$ and $x _ { 3 }$ . Note that this child graph is a structure that ENAS and DARTS are not able to discover 4.
158
+
159
+ ![](images/12d3bde356ca6ad7346dd2244279b476aff2d7c858a6bf65da1c528d5d2bda23.jpg)
160
+ Figure 5: Cells (child graphs) SNAS (aggressive constraint) finds on CIFAR-10. (a) Normal cell. (b) Reduction cell.
161
+
162
+ # 3.2 ARCHITECTURE EVALUATION ON CIFAR-10
163
+
164
+ Motivation In the searching stage, we follow the economical setup of DARTS to use only one single GPU, which constrains the parameter size of the child network. A conventional assumption in DARTS and ${ \mathrm { E N A S } } ^ { 5 }$ is that the final search validation accuracy has exploited the parameter size, the ceiling of which can only be raised by allowing more parameters. For a fair comparison, we follow this assumption in evaluation stage, stacking more cells (child graphs) to build a deeper network. This network is trained from scratch as in DARTS and ENAS to report the performance of the cells learned by SNAS on CIFAR-10.
165
+
166
+ Evaluation Settings A large network of 20 cells is trained from scratch for 600 epochs with batch size 96. Other hyperparameters remain the same as those for architecture search. Additional enhancements are listed in Appendix G.2. The training takes 1.5 days on a single GPU with our implementation in PyTorch.
167
+
168
+ Table 2: Classification errors of SNAS and state-of-the-art image classifiers on CIFAR-10.
169
+
170
+ <table><tr><td>Architecture</td><td>TestError (%)</td><td>Params (M)</td><td>Search Cost (GPU days)</td><td>Search Method</td><td>NAS Pipeline Completeness</td></tr><tr><td>DenseNet-BC (Huang et al., 2017)</td><td>3.46</td><td>25.6</td><td>-</td><td>manual</td><td></td></tr><tr><td>NASNet-A+ cutout (Zoph et al.,2017)</td><td>2.65</td><td>3.3</td><td>1800</td><td>RL</td><td>complete</td></tr><tr><td>AmoebaNet-A + cutout (Real et al., 2018)</td><td>3.34 ± 0.06</td><td>3.2</td><td>3150</td><td>evolution</td><td>complete</td></tr><tr><td>AmoebaNet-B +cutout (Real et al.,2018)</td><td>2.55 ± 0.05</td><td>2.8</td><td>3150</td><td>evolution</td><td>complete</td></tr><tr><td>Hierarchical Evo (Liu et al.,2017b)</td><td>3.75 ± 0.12</td><td>15.7</td><td>300</td><td>evolution</td><td>complete</td></tr><tr><td>PNAS (Liu et al., 2017a)</td><td>3.41 ± 0.09</td><td>3.2</td><td>225</td><td>SMBO</td><td>complete</td></tr><tr><td>ENAS + cutout (Pham et al., 2018)</td><td>2.89</td><td>4.6</td><td>0.5</td><td>RL</td><td>complete</td></tr><tr><td>Random search baseline† + cutout (Liu et al., 2019)</td><td>3.29 ± 0.15</td><td>3.2</td><td>1</td><td>random</td><td></td></tr><tr><td>DARTS (1st order bi-level) + cutout (Liu et al., 2019)</td><td>3.00 ± 0.14</td><td>3.3</td><td>0.4</td><td>gradient-based</td><td>incomplete</td></tr><tr><td>DARTS (2nd order bi-level) + cutout (Liu et al.,2019) DARTS (single-level) + cutout (Liu et al., 2019)</td><td>2.76 ± 0.09 3.56 ± 0.10</td><td>3.3 3.0</td><td>1 0.3</td><td>gradient-based</td><td>incomplete</td></tr><tr><td></td><td></td><td></td><td></td><td>gradient-based</td><td>incomplete</td></tr><tr><td>SNAS (single-level) + mild constraint + cutout</td><td>2.98</td><td>2.9</td><td>1.5</td><td>gradient-based</td><td>complete</td></tr><tr><td>SNAS (single-level) + moderate constraint + cutout</td><td>2.85 ± 0.02</td><td>2.8</td><td>1.5</td><td>gradient-based</td><td>complete</td></tr><tr><td>SNAS (single-level) + aggressive constraint +cutout</td><td>3.10 ± 0.04</td><td>2.3</td><td>1.5</td><td>gradient-based</td><td>complete</td></tr></table>
171
+
172
+ Results The CIFAR-10 evaluation results are presented in Table 2. The test error of SNAS is on par with the state-of-the-art RL-based and evolution-based NAS while using three orders of magnitude less computation resources. Furthermore, with slightly longer wall-clock-time, SNAS outperforms 1st-order DARTS and ENAS by discovering convolutional cells with both a smaller error rate and fewer parameters. It also achieves a comparable error rate compared to 2nd-order DARTS but with fewer parameters. With a more aggressive resource constraint, SNAS can sparsify the architecture even further to distinguish from ENAS and DARTS with only a slight drop in performance, which is still on par with 1st-order DARTS. It is interesting to note that with same single-level optimization, SNAS significantly outperforms DARTS. Bilevel optimization could be regarded as a data-driven meta-learning method to resolve the bias proved above, whose bias from the exact meta-learning objective is still unjustified due to the ignorance of separate child network derivation scheme.
173
+
174
+ # 3.3 ARCHITECTURE TRANSFERABILITY EVALUATION ON IMAGENET
175
+
176
+ Motivation Since real world applications often involve much larger datasets than CIFAR-10, transferability is a crucial criterion to evaluate the potential of the learned cells (child graphs) (Zoph et al., 2017). To show whether the cells learned on by SNAS CIFAR-10 can be generalized to larger datasets, we apply the same cells evaluated in Section 3.2 to the classification task on ImageNet.
177
+
178
+ Dataset The mobile setting is adopted where the size of the input images is $2 2 4 \times 2 2 4$ and the number of multiply-add operations in the model is restricted to be less than 600M.
179
+
180
+ Table 3: Classification errors of SNAS and state-of-the-art image classifiers on ImageNet.
181
+
182
+ <table><tr><td rowspan="2">Architecture</td><td colspan="2">Test Error(%)</td><td rowspan="2">Params (M)</td><td rowspan="2">+× (M)</td><td rowspan="2">Search Cost (GPU days)</td><td rowspan="2">Search Method</td><td rowspan="2">NAS Pipeline Completeness</td></tr><tr><td>top-1</td><td>top-5</td></tr><tr><td>Inception-v1 (Szegedy et al., 2015)</td><td>30.2</td><td>10.1</td><td>6.6</td><td>1448</td><td>-</td><td>manual</td><td></td></tr><tr><td>MobileNet (Howard etal.,2017)</td><td>29.4</td><td>10.5</td><td>4.2</td><td>569</td><td></td><td>manual</td><td></td></tr><tr><td>ShuffleNet 2×(v1) (Zhang et al.)</td><td>26.4</td><td>10.2</td><td>~5</td><td>524</td><td>=</td><td>manual</td><td></td></tr><tr><td>ShuffleNet 2× (v2) (Ma et al.,2018)</td><td>25.1</td><td>10.1</td><td>~5</td><td>591</td><td>-</td><td>manual</td><td></td></tr><tr><td>NASNet-A (Zoph et al., 2017)</td><td>26.0</td><td>8.4</td><td>5.3</td><td>564</td><td>1800</td><td>RL</td><td>complete</td></tr><tr><td>NASNet-B (Zoph et al., 2017)</td><td>27.2</td><td>8.7</td><td>5.3</td><td>488</td><td>1800</td><td>RL</td><td>complete</td></tr><tr><td>NASNet-C (Zoph et al., 2017)</td><td>27.5</td><td>9.0</td><td>4.9</td><td>558</td><td>1800</td><td>RL</td><td>complete</td></tr><tr><td>AmoebaNet-A (Real etal.,2018)</td><td>25.5</td><td>8.0</td><td>5.1</td><td>555</td><td>3150</td><td>evolution</td><td>complete</td></tr><tr><td>AmoebaNet-B (Real et al.,2018)</td><td>26.0</td><td>8.5</td><td>5.3</td><td>555</td><td>3150</td><td>evolution</td><td>complete</td></tr><tr><td>AmoebaNet-C (Real et al., 2018)</td><td>24.3</td><td>7.6</td><td>6.4</td><td>570</td><td>3150</td><td>evolution</td><td>complete</td></tr><tr><td>PNAS (Liu et al.,2017a)</td><td>25.8</td><td>8.1</td><td>5.1</td><td>588</td><td>225</td><td>SMBO</td><td>complete</td></tr><tr><td>DARTS (Liu et al., 2019)</td><td>26.9</td><td>9.0</td><td>4.9</td><td>595</td><td>1</td><td>gradient-based</td><td>incomplete</td></tr><tr><td>SNAS (mild constraint)</td><td>27.3</td><td>9.2</td><td>4.3</td><td>522</td><td>1.5</td><td>gradient-based</td><td>complete</td></tr></table>
183
+
184
+ Evaluation Settings We stack a network of 14 cells using the same cells designed by SNAS (mild constraint) and evaluated on CIFAR-10 (Section 3.2) and train it for 250 epochs with other hyperparameters following DARTS (see Appendix G.3). The training takes 12 days on a single GPU.
185
+
186
+ Results Table 3 presents the results of the evaluation on ImageNet and shows that the cell found by SNAS on CIFAR-10 can be successfully transferred to ImageNet. Notably, SNAS is able to achieve competitive test error with the state-of-the-art RL-based NAS using three orders of magnitude less computation resources. And with resource constraints added, SNAS can find smaller cell architectures that achieve competitive performance with DARTS.
187
+
188
+ # 4 RELATED WORKS
189
+
190
+ Improving the efficiency of NAS is a prerequisite to extending it to more complicated vision tasks like detection, as well as larger datasets. In the complete pipeline of NAS, parameter learning is a time-consuming one that attracts attention from the literature. Ideas to design auxiliary mechanisms like performance prediction (Baker et al., 2017; Deng et al., 2017), iterative search (Liu et al., 2017a), hypernetwork generated weights (Brock et al., 2017) successfully accelerate NAS to certain degrees. Getting rid of these auxiliary mechanisms, ENAS (Pham et al., 2018) is the state-of-the-art NAS framework, proposing parameter sharing among all possible child graphs, which is followed by SNAS. In Section 2 we introduced SNAS’s relation with ENAS in details. Apart from ENAS, we are also inspired by Louizos et al. (2017) to use continuous distribution for structural decision at each edge and optimize it along with an $l _ { 0 }$ complexity regularizer.
191
+
192
+ The most important motivation of SNAS is to leverage the gradient information in generic differentiable loss to update architecture distribution, which is shared by DARTS (Liu et al., 2019). In Section 2 and Appendix B we have introduced SNAS’s advantage over DARTS, a reward for maintaining the completeness of the NAS pipeline. Actually, the idea to make use of this gradient information to improve the learning efficiency of a stochastic model has been discussed in the literature of generative model (Gu et al., 2015; Maddison et al., 2016) and reinforcement learning (Schmidhuber, 1990; Arjona-Medina et al., 2018). But as far as we known, we are the first one to combine the insights from these two fields to discuss possible efficiency improvement of NAS.
193
+
194
+ # 5 CONCLUSION
195
+
196
+ In this work, we presented SNAS, a novel and economical end-to-end neural architecture search framework. The key contribution of SNAS is that by making use of gradient information from generic differentiable loss without sacrificing the completeness of NAS pipeline, stochastic architecture search could be more efficient. This improvement is proved by comparing the credit assigned by the search gradient with reinforcement-learning-based NAS. Augmented by a complexity regularizer, this search gradient trades off testing error and forwarding time. Experiments showed that SNAS searches well on CIFAR-10, whose result could be transferred to ImageNet as well. As a more efficient and less-biased framework, SNAS will serve as a possible candidate for full-fledged NAS on large datasets in the future.
197
+
198
+ # REFERENCES
199
+
200
+ Jose A Arjona-Medina, Michael Gillhofer, Michael Widrich, Thomas Unterthiner, and Sepp Hochreiter. Rudder: Return decomposition for delayed rewards. arXiv preprint arXiv:1806.07857, 2018.
201
+
202
+ Bowen Baker, Otkrist Gupta, Ramesh Raskar, and Nikhil Naik. Accelerating neural architecture search using performance prediction. arXiv preprint arXiv:1705.10823, 2017.
203
+
204
+ Andrew Brock, Theodore Lim, James M Ritchie, and Nick Weston. Smash: one-shot model archi tecture search through hypernetworks. arXiv preprint arXiv:1708.05344, 2017.
205
+
206
+ Boyang Deng, Junjie Yan, and Dahua Lin. Peephole: Predicting network performance before training. arXiv preprint arXiv:1712.03351, 2017.
207
+
208
+ Terrance DeVries and Graham W Taylor. Improved regularization of convolutional neural networks with cutout. arXiv preprint arXiv:1708.04552, 2017.
209
+
210
+ Ariel Gordon, Elad Eban, Ofir Nachum, Bo Chen, Hao Wu, Tien-Ju Yang, and Edward Choi. Morphnet: Fast & simple resource-constrained structure learning of deep networks. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018.
211
+
212
+ Shixiang Gu, Sergey Levine, Ilya Sutskever, and Andriy Mnih. Muprop: Unbiased backpropagation for stochastic neural networks. arXiv preprint arXiv:1511.05176, 2015.
213
+
214
+ Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017.
215
+
216
+ Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In CVPR, volume 1, pp. 3, 2017.
217
+
218
+ Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009.
219
+
220
+ Frank R Kschischang, Brendan J Frey, and H-A Loeliger. Factor graphs and the sum-product algorithm. IEEE Transactions on information theory, 47(2):498–519, 2001.
221
+
222
+ Chenxi Liu, Barret Zoph, Jonathon Shlens, Wei Hua, Li-Jia Li, Li Fei-Fei, Alan Yuille, Jonathan Huang, and Kevin Murphy. Progressive neural architecture search. arXiv preprint arXiv:1712.00559, 2017a.
223
+
224
+ Hanxiao Liu, Karen Simonyan, Oriol Vinyals, Chrisantha Fernando, and Koray Kavukcuoglu. Hierarchical representations for efficient architecture search. arXiv preprint arXiv:1711.00436, 2017b.
225
+
226
+ Hanxiao Liu, Karen Simonyan, and Yiming Yang. DARTS: Differentiable architecture search. In International Conference on Learning Representations, 2019. URL https://openreview. net/forum?id ${ . } = { }$ S1eYHoC5FX.
227
+
228
+ Christos Louizos, Max Welling, and Diederik P Kingma. Learning sparse neural networks through l 0 regularization. arXiv preprint arXiv:1712.01312, 2017.
229
+
230
+ Ningning Ma, Xiangyu Zhang, Hai-Tao Zheng, and Jian Sun. Shufflenet v2: Practical guidelines for efficient cnn architecture design. arXiv preprint arXiv:1807.11164, 2018.
231
+
232
+ Chris J Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. arXiv preprint arXiv:1611.00712, 2016.
233
+
234
+ Gregoire Montavon, Sebastian Lapuschkin, Alexander Binder, Wojciech Samek, and Klaus-Robert ´ Muller. Explaining nonlinear classification decisions with deep taylor decomposition. ¨ Pattern Recognition, 65:211–222, 2017a.
235
+
236
+ Gregoire Montavon, Wojciech Samek, and Klaus-Robert M ´ uller. Methods for interpreting and un- ¨ derstanding deep neural networks. Digital Signal Processing, 2017b.
237
+
238
+ Hieu Pham, Melody Y. Guan, Barret Zoph, Quoc V. Le, and Jeff Dean. Efficient neural architecture search via parameter sharing. In ICML, 2018.
239
+
240
+ Doina Precup. Eligibility traces for off-policy policy evaluation. Computer Science Department Faculty Publication Series, pp. 80, 2000.
241
+
242
+ Rajesh Ranganath, Sean Gerrish, and David Blei. Black box variational inference. In Artificial Intelligence and Statistics, pp. 814–822, 2014.
243
+
244
+ Esteban Real, Alok Aggarwal, Yanping Huang, and Quoc V Le. Regularized evolution for image classifier architecture search. arXiv preprint arXiv:1802.01548, 2018.
245
+
246
+ J Schmidhuber. Making the world differentiable: On using fully recurrent self-supervised neural networks for dynamic reinforcement learning and planning in non-stationary environments. Institut fur Informatik, Technische Universit ¨ at M¨ unchen. Technical Report FKI-126 ¨ , 90, 1990.
247
+
248
+ John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. Highdimensional continuous control using generalized advantage estimation. arXiv preprint arXiv:1506.02438, 2015.
249
+
250
+ John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
251
+
252
+ Kenneth O Stanley and Risto Miikkulainen. Evolving neural networks through augmenting topologies. Evolutionary computation, 10(2):99–127, 2002.
253
+
254
+ Richard S Sutton, Andrew G Barto, et al. Reinforcement learning: An introduction. MIT press, 1998.
255
+
256
+ Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1–9, 2015.
257
+
258
+ George Tucker, Surya Bhupatiraju, Shixiang Gu, Richard E Turner, Zoubin Ghahramani, and Sergey Levine. The mirage of action-dependent baselines in reinforcement learning. arXiv preprint arXiv:1802.10031, 2018.
259
+
260
+ Daan Wierstra, Tom Schaul, Jan Peters, and Juergen Schmidhuber. Natural evolution strategies. In Evolutionary Computation, 2008. CEC 2008.(IEEE World Congress on Computational Intelligence). IEEE Congress on, pp. 3381–3387. IEEE, 2008.
261
+
262
+ Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. In Reinforcement Learning, pp. 5–32. Springer, 1992.
263
+
264
+ Zhongwen Xu, Hado van Hasselt, and David Silver. Meta-gradient reinforcement learning. arXiv preprint arXiv:1805.09801, 2018.
265
+
266
+ X Zhang, X Zhou, M Lin, and J Sun. Shufflenet: An extremely efficient convolutional neural network for mobile devices. arxiv 2017. arXiv preprint arXiv:1707.01083.
267
+
268
+ Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016.
269
+
270
+ Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. arXiv preprint arXiv:1707.07012, 2(6), 2017.
271
+
272
+ # A CONNECTING $p ( Z )$ IN SNAS AND $p ( \tau )$ IN ENAS
273
+
274
+ In ENAS, the NAS task is defined as an MDP, where the observation $o _ { i } = a _ { 0 } , a _ { 1 } . . . a _ { i - 1 }$ . Thus the transition probability
275
+
276
+ $$
277
+ p ( o _ { i } | o _ { i - 1 } , a _ { i - 1 } ) = p ( o _ { i } | a _ { 0 } , a _ { 1 } . . . a _ { i - 2 } , a _ { i - 1 } ) = \delta ( a _ { 0 } , a _ { 1 } . . . a _ { i - 1 } ) .
278
+ $$
279
+
280
+ With the policy of RNN controller denoted as $\pi ( a _ { i } | o _ { i } )$ , the joint probability of a trajectory $\tau$ in this MDP is
281
+
282
+ $$
283
+ \begin{array} { l } { { \displaystyle p ( \tau ) = \rho ( o _ { 0 } ) \prod ^ { i } \pi ( a _ { i } | o _ { i } ) \prod ^ { i } p ( o _ { i + 1 } | o _ { i } , a _ { i } ) } } \\ { { \displaystyle \qquad = \prod _ { i } ^ { i } \pi ( a _ { i } | o _ { i } ) } } \\ { { \displaystyle \qquad = \prod _ { j } \pi ( a _ { i } | a _ { 0 } , a _ { 1 } . . . a _ { i - 1 } ) } } \\ { { \displaystyle \qquad = p ( a ) , } } \end{array}
284
+ $$
285
+
286
+ where $\textbf { \em a }$ is a vector of all structural decisions, which is denoted as $z$ in SNAS. So we have
287
+
288
+ $$
289
+ p ( \tau ) = p ( Z )
290
+ $$
291
+
292
+ Note that if we factorize $p ( Z )$ with conditional probability to have Markovian property as in Equation 13, we have the factor
293
+
294
+ $$
295
+ p ( Z _ { i } | Z _ { 0 } , Z _ { 1 } . . . Z _ { i - 1 } ) = \pi ( a _ { i } | a _ { 0 } , a _ { 1 } . . . a _ { i - 1 } ) .
296
+ $$
297
+
298
+ # B DIFFERENCE BETWEEN SNAS AND DARTS
299
+
300
+ We take a search space with three intermediate nodes for example to exhibit the difference between SNAS and DARTS (Liu et al., 2019), as shown in Figure 6. This search space could be viewed as a unit search space whose property could be generalized to larger space since it contains nodes in series and in parallel.
301
+
302
+ The objective of a NAS task is
303
+
304
+ $$
305
+ \mathbb { E } _ { Z \sim p _ { \alpha } ( Z ) } [ R ( Z ) ] ,
306
+ $$
307
+
308
+ where $p _ { \alpha } ( Z )$ is the distribution of architectures, which is previously solved with reinforcement learning. In both SNAS and DARTS, the reward function is made differentiable using the training/testing loss, $R ( Z ) = L _ { \pmb \theta } ( ( Z ) )$ , such that the architecture learning could leverage information in the gradients of this loss and conduct together with operation parameters training:
309
+
310
+ $$
311
+ \begin{array} { r } { \mathbb { E } _ { Z \sim p _ { \alpha } ( Z ) } [ R ( Z ) ] = \mathbb { E } _ { Z \sim p _ { \alpha } ( Z ) } [ L _ { \theta } ( Z ) ] . } \end{array}
312
+ $$
313
+
314
+ As introduced in Appendix A, SNAS solves (16) with a novel type of factorization, without relying on the MDP assumption. Though independent assumption between edges would restrict the probability distribution, there is no bias introduced.
315
+
316
+ However, to avoid the sampling process and gradient back-propagation through discrete random variables, DARTS takes analytical expectation at the input of each node over operations at incoming edges and optimizes a relaxed loss with deterministic gradients. Take the cell in Figure 6 as a base case, the objective before this relaxation is
317
+
318
+ $$
319
+ \begin{array} { r l } & { \quad \mathbb { E } _ { Z \sim p _ { \alpha } ( Z ) } [ L _ { \theta } ( Z _ { j , l } ^ { T } O _ { j , l } ( Z _ { i , j } ^ { T } O _ { i , j } ( x _ { i } ) ) + Z _ { j , m } ^ { T } O _ { j , m } ( Z _ { i , j } ^ { T } O _ { i , j } ( x _ { i } ) ) ) ] } \\ & { = \mathbb { E } _ { Z \sim p _ { \alpha } ( Z ) } [ L _ { \theta } ( \displaystyle \sum _ { m > j } { Z _ { j , m } ^ { T } O _ { j , m } ( Z _ { i , j } ^ { T } O _ { i , j } ( x _ { i } ) ) } ] . } \end{array}
320
+ $$
321
+
322
+ DARTS relaxed this objective to
323
+
324
+ $$
325
+ L _ { \theta } ( \sum _ { m > j } \mathbb { E } _ { p _ { \alpha _ { j , m } } } [ Z _ { j , m } ^ { T } O _ { j , m } ( \mathbb { E } _ { p _ { \alpha _ { i , j } } } [ Z _ { i , j } ^ { T } O _ { i , j } ( x _ { i } ) ] ) ] ) .
326
+ $$
327
+
328
+ Considering that $O ( x )$ are ReLU-Conv-BN stacks as in ENAS (Pham et al., 2018), which are nonlinear, this transformation introduces unbounded bias. Though it will not be perceivable in training, where the complete graph is used for accuracy validation, consistent this loss, the derived graph is never validated during training. Hence the training is inconsistent with the true objective maximizing the expected performance of derived architectures. After an architecture derivation introduced in DARTS, the performance falls enormously and the parameters need to be retrained.
329
+
330
+ ![](images/5918dc126ee0d95ef8f824a506a5780d9ef7b61c29931ca2a02c9a24e487f58f.jpg)
331
+ Figure 6: A comparison for gradients in DARTS and SNAS. (a) Deterministic gradients in DARTS; (b) Stochastic gradients in SNAS. Solid lines denote deterministic nodes, while dashed lines denote stochastic nodes. Black dotted lines denote compounded gradients, purple lines for parameter gradients in SNAS, red for search gradients.
332
+
333
+ # C GRADIENTS IN SNAS
334
+
335
+ Figure 6(b) gives an illustration of a base three-intermediate-node unit in SNAS, where each edge has three operations (indexed by $k$ ) to choose from. In the search space of SNAS, intermediate nodes take input from all previous nodes. We have
336
+
337
+ $$
338
+ x _ { j } = \sum _ { { h < j } } { \cal Z } _ { { h , j } } ^ { T } { \cal O } _ { { h , j } } ( x _ { h } ) = { \cal Z } _ { i , j } ^ { T } { \cal O } _ { i , j } ( x _ { i } ) + \sum _ { { h < i } } { \cal Z } _ { { h , j } } ^ { T } { \cal O } _ { { h , j } } ( x _ { h } ) .
339
+ $$
340
+
341
+ Let $\theta _ { i , j } ^ { k }$ be the parameters in $O _ { i , j } ^ { k }$ , we have
342
+
343
+ $$
344
+ \frac { \partial x _ { j } } { \partial \pmb { \theta } _ { i , j } ^ { k } } = Z _ { i , j } ^ { T } \frac { \partial \pmb { O } _ { i , j } ( x _ { i } ) } { \partial \pmb { \theta } _ { i , j } ^ { k } } .
345
+ $$
346
+
347
+ As we use concrete disctribution here to make the sampling differentiable with reparametrization trick:
348
+
349
+ $$
350
+ \begin{array} { r l } & { \boldsymbol Z _ { i , j } ^ { k } = f _ { \alpha _ { i , j } } ( \boldsymbol G _ { i , j } ^ { k } ) } \\ & { \qquad = \frac { \exp ( ( \log \alpha _ { i , j } ^ { k } + G _ { i , j } ^ { k } ) / \lambda ) } { \sum _ { l = 0 } ^ { n } \exp ( ( \log \alpha _ { i , j } ^ { l } + G _ { i , j } ^ { l } ) / \lambda ) } , } \end{array}
351
+ $$
352
+
353
+ where $G _ { i , j } ^ { k } \ = \ - \log ( - \log ( U _ { i , j } ^ { k } ) )$ is the $k$ th Gumbel random variable, $U _ { i , j } ^ { k }$ is a uniform random variable, the gradient w.r.t. $\alpha _ { i , j }$ is:
354
+
355
+ $$
356
+ \frac { \partial x _ { j } } { \partial { \pmb { \alpha } } _ { i , j } ^ { k } } = O _ { i , j } ^ { T } ( x _ { i } ) \frac { \partial f _ { { \pmb { \alpha } } _ { i , j } } ( { \pmb { G } } _ { i , j } ) } { \partial { \pmb { \alpha } } _ { i , j } ^ { k } } .
357
+ $$
358
+
359
+ The partial derivative $\frac { \partial f _ { \alpha _ { i , j } } } { \partial \pmb { \alpha } _ { i , j } ^ { k } }$
360
+
361
+ $$
362
+ \begin{array} { r l } { \frac { \partial f _ { \alpha _ { i , j } } ( G _ { i , j } ) } { \partial \alpha _ { i , j } ^ { k } } = \frac { \frac { \partial } { \partial \alpha _ { i , j } ^ { k } } \exp ( ( \log \alpha _ { i , j } ^ { k } + G _ { i , j } ^ { k } ) / \lambda ) } { \sum _ { l = 0 } ^ { n } \exp ( ( \log \alpha _ { i , j } ^ { l } + G _ { i , j } ^ { l } ) / \lambda ) } ( \delta ( k ^ { \prime } - k ) - \frac { \exp ( ( \log \alpha _ { i , j } + G _ { i , j } ) / \lambda ) } { \sum _ { l = 0 } ^ { n } \exp ( ( \log \alpha _ { i , j } ^ { \delta } + G _ { i , j } ^ { l } ) / \lambda ) } ) } \\ & { = \frac { \partial ( \log \alpha _ { i , j } ^ { k } + G _ { i , j } ^ { k } ) / \lambda } { \partial \alpha _ { i , j } ^ { k } } f _ { \alpha _ { i , j } } ( G _ { i , j } ^ { k } ) ( \delta ( k ^ { \prime } - k ) - f _ { \alpha _ { i , j } } ( G _ { i , j } ) ) } \\ & { = ( \delta ( k ^ { \prime } - k ) - f _ { \alpha _ { i , j } } ( G _ { i , j } ) ) f _ { \alpha _ { i , j } } ( G _ { i , j } ^ { k } ) \frac { 1 } { \lambda \alpha _ { i , j } ^ { k } } } \\ & { = ( \delta ( k ^ { \prime } - k ) - Z _ { i , j } ) Z _ { i , j } ^ { k } \frac { 1 } { \lambda \alpha _ { i , j } ^ { k } } . } \end{array}
363
+ $$
364
+
365
+ Substitute it back to (23), we obtain
366
+
367
+ $$
368
+ \frac { \partial x _ { j } } { \partial \pmb { \alpha } _ { i , j } ^ { k } } = \pmb { O } _ { i , j } ^ { T } ( x _ { i } ) ( \pmb { \delta } ( k ^ { \prime } - k ) - \pmb { Z } _ { i , j } ) \pmb { Z } _ { i , j } ^ { k } \frac { 1 } { \lambda \pmb { \alpha } _ { i , j } ^ { k } } .
369
+ $$
370
+
371
+ We can also derive ∂xm for chain rule connection:
372
+
373
+ $$
374
+ \frac { \partial x _ { m } } { \partial x _ { j } } = Z _ { j , m } ^ { T } \frac { \partial O _ { j , m } ( x _ { j } ) } { \partial x _ { j } } .
375
+ $$
376
+
377
+ Thus the gradient from the surrogate loss $\mathcal { L }$ to $x _ { j } , \pmb { \theta } _ { i , j } ^ { k }$ and $\alpha _ { i , j } ^ { k }$ respectively are
378
+
379
+ $$
380
+ \begin{array} { r l } & { \displaystyle \frac { \partial \mathcal { L } } { \partial x _ { j } } = \sum _ { m > j } \frac { \partial \mathcal { L } } { \partial x _ { m } } Z _ { j , m } ^ { T } \frac { \partial O _ { j , m } ( x _ { j } ) } { \partial x _ { j } } , } \\ & { \displaystyle \frac { \partial \mathcal { L } } { \partial \theta _ { i , j } ^ { k } } = \frac { \partial \mathcal { L } } { \partial x _ { j } } Z _ { i , j } ^ { k } \frac { \partial O _ { i , j } ( x _ { i } ) } { \partial \theta _ { i , j } ^ { k } } , } \\ & { \displaystyle \frac { \partial \mathcal { L } } { \partial \alpha _ { i , j } ^ { k } } = \frac { \partial \mathcal { L } } { \partial x _ { 1 } } O _ { i , j } ^ { T } ( x _ { i } ) ( \delta ( k ^ { \prime } - k ) - Z _ { i , j } ) Z _ { i , j } ^ { k } \frac { 1 } { \lambda \alpha _ { i , j } ^ { k } } . } \end{array}
381
+ $$
382
+
383
+ # D CREDIT ASSIGNMENT FOR EQUIVALENT POLICY GRADIENT
384
+
385
+ From Appendix C we can see that the expected search gradient for architecture parameters at each edge is:
386
+
387
+ $$
388
+ \begin{array} { r l } { \sum _ { \mathcal { E } \sim \mathcal { G } ( \mathcal { E } ^ { * } ) } \big [ \frac { \partial C } { \partial \alpha _ { k , j } ^ { * } } \big ] = \mathrm { E } _ { \mathcal { R } ^ { * } \sim \mathcal { N } ( \mathcal { R } ^ { * } ) } - \frac { \partial C } { \partial \alpha _ { j } } O _ { \alpha _ { j } ^ { * } ( \mathcal { R } ^ { * } ) } \frac { \partial f _ { \alpha _ { j } ( \mathcal { R } ^ { * } ) } ( - \log ( - \log ( U _ { i , j } ) ) ) } { \partial \alpha _ { k , j } } ; } \\ & { = \int _ { 0 } ^ { 1 } \eta ( E _ { i \ell _ { 1 } } ) \frac { \partial f _ { \alpha _ { j } } } { \partial \mathcal { E } _ { \mathcal { D } ^ { * } } } O _ { i \ell _ { 1 } ( \mathcal { R } ^ { * } ) } \frac { \partial f _ { \alpha _ { j } ( \mathcal { R } ^ { * } ) } ( - \log ( - \log ( U _ { i , j } ) ) ) } { \partial \alpha _ { k , j } ^ { * } } d V _ { i \ell _ { 1 } } } \\ & { = \frac { \partial } { \partial \alpha _ { 3 } } \int _ { 0 } ^ { 1 } \mathrm { e } ^ { \mathcal { D } ( E _ { i \ell _ { 1 } } ) } \frac { \partial f _ { \alpha _ { j } } } { \partial \mathcal { E } _ { \mathcal { D } ^ { * } } } O _ { i \ell _ { 1 } ( \mathcal { R } ^ { * } ) } ^ { 2 } \frac { \partial f _ { \alpha _ { j } ( \mathcal { R } ^ { * } ) } ( - \log ( - \log ( U _ { i , j } ) ) ) d V _ { i \ell _ { 1 } j } } { \partial \alpha _ { 3 } } } \\ & { = \frac { \partial } { \partial \alpha _ { 3 } } \int _ { 0 } ^ { 1 } p ( E _ { i \ell _ { 1 } } ) \frac { \partial Z } { \partial \alpha _ { 3 } } O _ { i \ell _ { 1 } ( \mathcal { R } ^ { * } ) } ^ { 2 } \frac { \partial f _ { \alpha _ { j } ( \mathcal { R } ^ { * } ) } ( - \log ( - \log ( U _ { i , j } ) ) ) } { \partial \alpha _ { 3 } } d V _ { i \ell _ { 1 } } } \\ & = \int _ { 0 } ^ { 1 } \eta ( E _ { i \ell _ { 1 } } ) \frac { \partial \log ( Z _ { \ell _ { 1 } } ) } \partial \alpha _ \end{array}
389
+ $$
390
+
391
+ where $[ \cdot ] _ { c }$ denotes $\cdot$ is a constant for the gradient calculation w.r.t. $_ { \pmb { \alpha } }$ . Note that in this derivation we stop the gradient from successor nodes, with an independence assumption enforced in backpropagation.
392
+
393
+ # E TAYLOR DECOMPOSITION FOR CONTRIBUTION ANALYSIS
394
+
395
+ With $d$ neurons (pixels) $x _ { i }$ in the same layer of a deep neural network, whose output is $f ( { \pmb x } )$ , Montavon et al. (2017a) decomposes $f ( { \pmb x } )$ as a sum of individual credits for $x _ { i }$ . This decomposition is obtained by the first-order Taylor expansion of the function at some root point $\tilde { \pmb x }$ for which $f ( \tilde { \pmb { x } } ) = 0$ :
396
+
397
+ $$
398
+ f ( { \pmb x } ) = \sum _ { i = 1 } ^ { d } R _ { i } ( { \pmb x } ) + O ( { \pmb x } { \pmb x } ^ { T } ) ,
399
+ $$
400
+
401
+ where the individual credits
402
+
403
+ $$
404
+ R _ { i } ( { \pmb x } ) = \frac { \partial f } { \partial { \pmb x } _ { i } } | _ { { \pmb x } = { \tilde { \pmb x } } } ( { \pmb x } _ { i } - { \tilde { \pmb x } } _ { i } )
405
+ $$
406
+
407
+ are first-order terms and $O ( \pmb { x x } ^ { T } )$ is for higher-order information. When ReLU is chosen as the activation function, $O ( \pmb { x } \pmb { x } ^ { T } )$ can be omitted (Montavon et al., 2017b). Thus ones can always find a root point $\tilde { { \pmb x } } = \operatorname* { l i m } _ { \epsilon \to 0 } \epsilon { \pmb x }$ that incidentally lies on the same linear region as point $_ { \textbf { \em x } }$ , in which case the function can be written as
408
+
409
+ $$
410
+ f ( \pmb { x } ) = \sum _ { i = 1 } ^ { d } R _ { i } ( \pmb { x } ) = \sum _ { i = 1 } ^ { d } \frac { \partial f } { \partial \pmb { x } _ { i } } \pmb { x } _ { i } .
411
+ $$
412
+
413
+ Noticing the similarity between (8) and (31), we try using Taylor Decomposition to interpret the credit assignment in SNAS. Given a sample $x _ { 0 }$ , ones can iterate all effective layers of the DAG and distribute credits from network output $f$ among nodes $x _ { j }$ in each layer. In Figure 1 for example, $D A G ( Z ^ { ( 1 ) } )$ has 2 effective layers, while $D A G ( Z ^ { ( 2 ) } )$ has 3 effective layers. Given the presence of the skip connection, nodes may be involved into multiple layers and thus obtain integrated credits
414
+
415
+ $$
416
+ \frac { \partial f } { \partial x _ { j } } = \sum _ { m > j } \frac { \partial f } { \partial x _ { m } } \frac { \partial \tilde { O } _ { m } ( x _ { j } ) } { \partial x _ { j } } ,
417
+ $$
418
+
419
+ e.g. $x _ { 1 }$ in DAG(2) integrates credits from $x _ { 2 }$ and $x _ { 3 }$ . According to (1), multiple edges $( i , j )$ are pointing to $j$ , which decompose (32) as:
420
+
421
+ $$
422
+ \hat { R } _ { i , j } = \frac { \partial f } { \partial x _ { j } } \tilde { O } _ { i , j } ( x _ { i } ) .
423
+ $$
424
+
425
+ Adjusting the weight of this sample with $\partial \mathcal { L } / \partial f$ and taking the optimization direction into account, we have
426
+
427
+ $$
428
+ R _ { i , j } = - \frac { \partial \mathcal { L } } { \partial x _ { j } } \tilde { O } _ { i , j } ( x _ { i } )
429
+ $$
430
+
431
+ # F CANDIDATES FOR LOCAL RESOURCE CONSTRAINTS
432
+
433
+ In the case of a convolutional layer, $H , W$ and $f , k$ correspond to the output spatial dimensions and the filter dimensions respectively and we use $I , O$ to denote the number of input and output channels. Since group convolution is also adopted in this paper to reduce the computational complexity, $g$ is the number of groups.
434
+
435
+ Thus, the parameter size and the number of float-point operations (FLOPs) of a single convolutional layer is
436
+
437
+ $$
438
+ { \mathrm { p a r a m e t e r ~ s i z e } } = { \frac { f k I O } { g } }
439
+ $$
440
+
441
+ $$
442
+ \mathrm { F L O P s } = { \frac { H W f k I O } { g } }
443
+ $$
444
+
445
+ By assuming the computing device has enough cache to store the feature maps and the parameters, we can simplify the memory access cost (MAC) to be the sum of the memory access for the input/output feature maps and kernel weights (Ma et al., 2018).
446
+
447
+ $$
448
+ \mathrm { M A C } = H W ( I + O ) + { \frac { f k I O } { g } }
449
+ $$
450
+
451
+ In SNAS, because all the operations on a single edge share the same output spatial dimensions and the input/output channels, FLOPs of a convolutional operation is directly proportional to its parameter size. And although the memory access cost for the input/output feature maps $H W ( I + O )$ does not depend on the parameter size, since both are positively correlated to the number of layers used in the operation, we may say there is a positive correlation between MAC and the parameter size. Thus, when only considering the convolution operations, solely using the parameter size as the resource constraint is sufficient. However, in SNAS, we also have the pooling operation and the skip connection, which are parameter free. The equations to calculate the resource criteria of a pooling operation or a skip connection are as follows.
452
+
453
+ FLOPs of pooling:
454
+
455
+ $$
456
+ \mathrm { F L O P s } = H W f k I O
457
+ $$
458
+
459
+ FLOPs of skip connection:
460
+
461
+ $$
462
+ \mathrm { F L O P s } = 0
463
+ $$
464
+
465
+ MAC of pooling and skip connection:
466
+
467
+ $$
468
+ \mathrm { M A C } = H W ( I + O )
469
+ $$
470
+
471
+ We can see that MAC is the same for pooling and skip connection since they need to access the same input/output feature maps, therefore, to distinguish between pooling and skip connection, FLOPs need to be included in the resource constraint. Similarly, to distinguish between skip connection and none (free, no operation), MAC also need to be included.
472
+
473
+ In conclusion, to construct a resource constraint which fully distinguishes the four types of operations, all three locally decomposable criteria, the parameter size, FLOPs and MAC, need to be combined.
474
+
475
+ # G DETAILED SETTINGS OF EXPERIMENTS
476
+
477
+ # G.1 ARCHITECTURE SEARCH ON CIFAR-10
478
+
479
+ Data Pre-processing and Augmentation Techniques We employ the following techniques in our experiments: centrally padding the training images to $4 0 \times 4 0$ and then randomly cropping them back to $3 2 \times 3 2$ ; randomly flipping the training images horizontally; normalizing the training and validation images by subtracting the channel mean and dividing by the channel standard deviation.
480
+
481
+ Implementation Details of Operations The operations include: $3 \times 3$ and $5 \times 5$ separable convolutions, $3 \times 3$ and $5 \times 5$ dilated separable convolutions, $3 \times 3$ max pooling, $3 \times 3$ average pooling, skip connection and zero operation. All operations are of stride one (excluded the ones adjacent to the input nodes in the reduction cell, which are of stride two) and the convolved feature maps are padded to preserve their spatial resolution. Convolutions are applied in the order of ReLU-ConvBN, and the depthwise separable convolution is always applied twice (Zoph et al., 2017; Real et al., 2018; Liu et al., 2017a; 2019).
482
+
483
+ Detailed Training Settings We follow the training settings as in Liu et al. (2019). The neural operation parameters $\pmb { \theta }$ are optimized using momentum SGD, with initial learning rate $\eta _ { \pmb \theta } = 0 . 0 2 5$ (annealed down to zero following a cosine schedule), momentum 0.9, and weight decay $3 \times 1 0 ^ { - 4 }$ . The architecture distribution parameters $_ { \pmb { \alpha } }$ are optimized by Adam, with initial learning rate $\eta _ { \alpha } =$ $3 \times 1 0 ^ { - 4 }$ , momentum $\beta = ( 0 . 5 , 0 . 9 9 9 )$ and weight decay $\mathrm { 1 \dot { 0 } ^ { - 3 } }$ . The batch size employed is 64 and the initial number of channels is 16.
484
+
485
+ # G.2 ARCHITECTURE EVALUATION ON CIFAR-10
486
+
487
+ Additional Enhancement Techniques Following existing works (Zoph et al., 2017; Liu et al., 2017a; Pham et al., 2018; Real et al., 2018; Liu et al., 2019), we employ the following additional enhancements: cutout (DeVries & Taylor, 2017), path dropout of probability 0.2 (same as DARTS in the code publicly released by its authors) and auxiliary towers with weight 0.4.
488
+
489
+ # G.3 ARCHITECTURE TRANSFERABILITY EVALUATION ON CIFAR-10
490
+
491
+ Detailed Training Settings The network is trained with batch size 128, weight decay $3 \times 1 0 ^ { - 5 }$ and initial SGD learning rate 0.1, which is decayed by a factor of 0.97 after each epoch. Auxiliary towers with weight 0.4 are adopted as additional enhancements.
492
+
493
+ # H CELLS LEARNED BY SNAS WITH A MODERATE RESOURCE CONSTRAINT
494
+
495
+ ![](images/68d9701c2c39165e61c8b770fd0ff10d51962168e5fefe10bcb453758fe737c1.jpg)
496
+ Figure 7: Cells (child graphs) SNAS (moderate constraint) finds on CIFAR-10. (a) Normal cell. (b) Reduction cell.
parse/train/rylqooRqK7/rylqooRqK7_middle.json ADDED
The diff for this file is too large to render. See raw diff