ACL-OCL / Base_JSON /prefixD /json /D17 /D17-1040.json
Benjamin Aw
Add updated pkl file v3
6fa4bc9
{
"paper_id": "D17-1040",
"header": {
"generated_with": "S2ORC 1.0.0",
"date_generated": "2023-01-19T16:14:19.182851Z"
},
"title": "Efficient Attention using a Fixed-Size Memory Representation",
"authors": [
{
"first": "Denny",
"middle": [],
"last": "Britz",
"suffix": "",
"affiliation": {},
"email": "dennybritz@google.com"
},
{
"first": "Melody",
"middle": [
"Y"
],
"last": "Guan",
"suffix": "",
"affiliation": {},
"email": "melodyguan@google.com"
},
{
"first": "Minh-Thang",
"middle": [],
"last": "Luong",
"suffix": "",
"affiliation": {},
"email": ""
}
],
"year": "",
"venue": null,
"identifiers": {},
"abstract": "The standard content-based attention mechanism typically used in sequence-to-sequence models is computationally expensive as it requires the comparison of large encoder and decoder states at each time step. In this work, we propose an alternative attention mechanism based on a fixed size memory representation that is more efficient. Our technique predicts a compact set of K attention contexts during encoding and lets the decoder compute an efficient lookup that does not need to consult the memory. We show that our approach performs on-par with the standard attention mechanism while yielding inference speedups of 20% for real-world translation tasks and more for tasks with longer sequences. By visualizing attention scores we demonstrate that our models learn distinct, meaningful alignments.",
"pdf_parse": {
"paper_id": "D17-1040",
"_pdf_hash": "",
"abstract": [
{
"text": "The standard content-based attention mechanism typically used in sequence-to-sequence models is computationally expensive as it requires the comparison of large encoder and decoder states at each time step. In this work, we propose an alternative attention mechanism based on a fixed size memory representation that is more efficient. Our technique predicts a compact set of K attention contexts during encoding and lets the decoder compute an efficient lookup that does not need to consult the memory. We show that our approach performs on-par with the standard attention mechanism while yielding inference speedups of 20% for real-world translation tasks and more for tasks with longer sequences. By visualizing attention scores we demonstrate that our models learn distinct, meaningful alignments.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Abstract",
"sec_num": null
}
],
"body_text": [
{
"text": "Sequence-to-sequence models (Sutskever et al., 2014; have achieved state of the art results across a wide variety of tasks, including Neural Machine Translation (NMT) (Bahdanau et al., 2014; Wu et al., 2016 ), text summarization (Rush et al., 2015; Nallapati et al., 2016) , speech recognition (Chan et al., 2015; Chorowski and Jaitly, 2016) , image captioning (Xu et al., 2015) , and conversational modeling Li et al., 2015) .",
"cite_spans": [
{
"start": 28,
"end": 52,
"text": "(Sutskever et al., 2014;",
"ref_id": "BIBREF20"
},
{
"start": 167,
"end": 190,
"text": "(Bahdanau et al., 2014;",
"ref_id": "BIBREF1"
},
{
"start": 191,
"end": 206,
"text": "Wu et al., 2016",
"ref_id": "BIBREF23"
},
{
"start": 229,
"end": 248,
"text": "(Rush et al., 2015;",
"ref_id": "BIBREF17"
},
{
"start": 249,
"end": 272,
"text": "Nallapati et al., 2016)",
"ref_id": "BIBREF15"
},
{
"start": 294,
"end": 313,
"text": "(Chan et al., 2015;",
"ref_id": null
},
{
"start": 314,
"end": 341,
"text": "Chorowski and Jaitly, 2016)",
"ref_id": "BIBREF6"
},
{
"start": 361,
"end": 378,
"text": "(Xu et al., 2015)",
"ref_id": "BIBREF24"
},
{
"start": 409,
"end": 425,
"text": "Li et al., 2015)",
"ref_id": "BIBREF13"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Introduction",
"sec_num": "1"
},
{
"text": "The most popular approaches are based on an encoder-decoder architecture consisting of two recurrent neural networks (RNNs) and an attention mechanism that aligns target to source tokens (Bahdanau et al., 2014; Luong et al., 2015) . The typical attention mechanism used in these architectures computes a new attention context at each decoding step based on the current state of the decoder. Intuitively, this corresponds to looking at the source sequence after the output of every single target token.",
"cite_spans": [
{
"start": 187,
"end": 210,
"text": "(Bahdanau et al., 2014;",
"ref_id": "BIBREF1"
},
{
"start": 211,
"end": 230,
"text": "Luong et al., 2015)",
"ref_id": "BIBREF14"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Introduction",
"sec_num": "1"
},
{
"text": "Inspired by how humans process sentences, we believe it may be unnecessary to look back at the entire original source sequence at each step. 1 We thus propose an alternative attention mechanism (section 3) that leads to smaller computational time complexity. Our method predicts K attention context vectors while reading the source, and learns to use a weighted average of these vectors at each step of decoding. Thus, we avoid looking back at the source sequence once it has been encoded. We show (section 4) that this speeds up inference while performing on-par with the standard mechanism on both toy and real-world WMT translation datasets. We also show that our mechanism leads to larger speedups as sequences get longer. Finally, by visualizing the attention scores (section 5), we verify that the proposed technique learns meaningful alignments, and that different attention context vectors specialize on different parts of the source.",
"cite_spans": [
{
"start": 141,
"end": 142,
"text": "1",
"ref_id": null
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Introduction",
"sec_num": "1"
},
{
"text": "Our models are based on an encoder-decoder architecture with attention mechanism (Bahdanau et al., 2014; Luong et al., 2015) . An encoder function takes as input a sequence of source tokens x=(x 1 ,...,x m ) and produces a sequence of states s=(s 1 ,...,s m ) .The decoder is an RNN that predicts the probability of a target sequence y =(y 1 ,...,y T |s). The probability of each target token y i \u2208 {1,...,|V |} is predicted based on the recurrent state in the decoder RNN, h i , the previous words, y <i , and a context vector c i . The context vector c i , also referred to as the attention vector, is calculated as a weighted average of the source states.",
"cite_spans": [
{
"start": 81,
"end": 104,
"text": "(Bahdanau et al., 2014;",
"ref_id": "BIBREF1"
},
{
"start": 105,
"end": 124,
"text": "Luong et al., 2015)",
"ref_id": "BIBREF14"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Sequence-to-Sequence Model with Attention",
"sec_num": "2.1"
},
{
"text": "EQUATION",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [
{
"start": 0,
"end": 8,
"text": "EQUATION",
"ref_id": "EQREF",
"raw_str": "c i = j \u03b1 ij s j (1) \u03b1 i =softmax(f att (h i ,s))",
"eq_num": "(2)"
}
],
"section": "Sequence-to-Sequence Model with Attention",
"sec_num": "2.1"
},
{
"text": "Here, f att (h i , s) is an attention function that calculates an unnormalized alignment score between the encoder state s j and the decoder state h i . Variants of f att used in Bahdanau et al. (2014) and Luong et al. (2015) are:",
"cite_spans": [
{
"start": 179,
"end": 201,
"text": "Bahdanau et al. (2014)",
"ref_id": "BIBREF1"
},
{
"start": 206,
"end": 225,
"text": "Luong et al. (2015)",
"ref_id": "BIBREF14"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Sequence-to-Sequence Model with Attention",
"sec_num": "2.1"
},
{
"text": "f att (h i ,s j )= v T a tanh(W a [h i ,s j ]), Bahdanau h T i W a s j Luong",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Sequence-to-Sequence Model with Attention",
"sec_num": "2.1"
},
{
"text": "where W a and v a are model parameters learned to predict alignment. Let |S| and |T | denote the lengths of the source and target sequences respectively and D denoate the state size of the encoder and decoder RNN. Such content-based attention mechanisms result in inference times of O(D 2 |S||T |) 2 , as each context vector depends on the current decoder state h i and all encoder states, and requires an O(D 2 ) matrix multiplication. The decoder outputs a distribution over a vocabulary of fixed-size |V |:",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Sequence-to-Sequence Model with Attention",
"sec_num": "2.1"
},
{
"text": "EQUATION",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [
{
"start": 0,
"end": 8,
"text": "EQUATION",
"ref_id": "EQREF",
"raw_str": "P (y i |y <i ,x)=softmax(W [s i ;c i ]+b)",
"eq_num": "(3)"
}
],
"section": "Sequence-to-Sequence Model with Attention",
"sec_num": "2.1"
},
{
"text": "The model is trained end-to-end by minimizing the negative log likelihood of the target words using stochastic gradient descent.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Sequence-to-Sequence Model with Attention",
"sec_num": "2.1"
},
{
"text": "Our proposed model is shown in Figure 1 . During encoding, we compute an attention matrix C \u2208R K\u00d7D , where K is the number of attention vectors and a hyperparameter of our method, and D is the dimensionality of the top-most encoder state. This matrix is computed by predicting a score vector \u03b1 t \u2208 R K at each encoding time step t. C is then a linear combination of the encoder states, weighted by \u03b1 t :",
"cite_spans": [],
"ref_spans": [
{
"start": 31,
"end": 39,
"text": "Figure 1",
"ref_id": "FIGREF0"
}
],
"eq_spans": [],
"section": "Memory-Based Attention Model",
"sec_num": "3"
},
{
"text": "EQUATION",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [
{
"start": 0,
"end": 8,
"text": "EQUATION",
"ref_id": "EQREF",
"raw_str": "C k = |S| t=0 \u03b1 tk s t (4) \u03b1 t =softmax(W \u03b1 s t ),",
"eq_num": "(5)"
}
],
"section": "Memory-Based Attention Model",
"sec_num": "3"
},
{
"text": "where W \u03b1 is a parameter matrix in R K\u00d7D . The computational time complexity for this operation is O(KD|S|). One can think of C as compact fixed-length memory that the decoder will perform attention over. In contrast, standard approaches use a variable-length set of encoder states for attention. At each decoding step, we similarly predict K scores \u03b2 \u2208R K . The final attention context c is a linear combination of the rows in C weighted by the scores. Intuitively, each decoder step predicts how important each of the K attention vectors is.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Memory-Based Attention Model",
"sec_num": "3"
},
{
"text": "EQUATION",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [
{
"start": 0,
"end": 8,
"text": "EQUATION",
"ref_id": "EQREF",
"raw_str": "c= K i=0 \u03b2 i C i (6) \u03b2 =softmax(W \u03b2 h)",
"eq_num": "(7)"
}
],
"section": "Memory-Based Attention Model",
"sec_num": "3"
},
{
"text": "Here, h is the current state of the decoder, and W \u03b2 is a learned parameter matrix. Note that we do not access the encoder states at each decoder step. We simply take a linear combination of the attention matrix C pre-computed during encoding -a much cheaper operation that is independent of the length of the source sequence. The time complexity of this computation is O(KD|T |) as multiplication with the K attention matrices needs to happen at each decoding step. Summing O(KD|S|) from encoding and O(KD|T |) from decoding, we have a total linear computational complexity of O(KD(|S| + |T |). As D is typically very large, 512 or 1024 units in most applications, we expect our model to be faster than the standard attention mechanism running in O(D 2 |S||T |). For long sequences (as in summarization, where -S-is large), we also expect our model to be faster than the cheaper dot-based attention mechanism, which needs O(D|S||T |) computation time and requires encoder and decoder states sizes to match.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Memory-Based Attention Model",
"sec_num": "3"
},
{
"text": "We also experimented with using a sigmoid function instead of the softmax to score the encoder and decoder attention scores, resulting in 4 possible combinations. We call this choice the scoring function. A softmax scoring function calculates normalized scores, while the sigmoid scoring function results in unnormalized scores that can be understood as gates.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Memory-Based Attention Model",
"sec_num": "3"
},
{
"text": "Our memory-based attention model can be understood intuitively in two ways. We can interpret it as \"predicting\" the set of attention contexts produced by a standard attention mechanism during encoding. To see this, assume we set K \u2248 |T |. In this case, we predict all |T | attention contexts during the encoding stage and learn to choose the right one during decoding. This is cheaper than computing contexts one-by-one based on the decoder and encoder content. In fact, we could enforce this objective by first training a regular attention model and adding a regularization term to force the memory matrix C to be close to the T \u00d7D vectors computed by the standard attention. We leave it to future work to explore such an objective.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Model Interpretations",
"sec_num": "3.1"
},
{
"text": "Alternatively, we can interpret our mechanism as first predicting a compact K \u00d7 D memory matrix, a representation of the source sequence, and then performing location-based attention on the memory by picking which row of the matrix to attend to. Standard location-based attention mechanism, by contrast, predicts a location in the source sequence to focus on (Luong et al., 2015; Xu et al., 2015) .",
"cite_spans": [
{
"start": 359,
"end": 379,
"text": "(Luong et al., 2015;",
"ref_id": "BIBREF14"
},
{
"start": 380,
"end": 396,
"text": "Xu et al., 2015)",
"ref_id": "BIBREF24"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Model Interpretations",
"sec_num": "3.1"
},
{
"text": "In the above formulation, the predictions of attention contexts are symmetric. That is, C i is not forced to be different from C j =i . While we would hope for the model to learn to generate distinct attention contexts, we now present an extension that pushes the model into this direction. We add position encodings to the score matrix that forces the first few context vector C 1 ,C 2 ,... to focus on the beginning of the sequence and the last few vectors ...,C K\u22121 ,C K to focus on the end (thereby encouraging in-between vectors to focus on the middle).",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Position Encodings (PE)",
"sec_num": "3.2"
},
{
"text": "Explicitly, we multiply the score vector \u03b1 with position encodings l s \u2208R K :",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Position Encodings (PE)",
"sec_num": "3.2"
},
{
"text": "EQUATION",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [
{
"start": 0,
"end": 8,
"text": "EQUATION",
"ref_id": "EQREF",
"raw_str": "C P E = |S| s=0 \u03b1 P E h s (8) \u03b1 P E s =softmax(W \u03b1 h s \u2022l s )",
"eq_num": "(9)"
}
],
"section": "Position Encodings (PE)",
"sec_num": "3.2"
},
{
"text": "To obtain l s we first calculate a constant matrix L where we define each element as",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Position Encodings (PE)",
"sec_num": "3.2"
},
{
"text": "EQUATION",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [
{
"start": 0,
"end": 8,
"text": "EQUATION",
"ref_id": "EQREF",
"raw_str": "L ks =(1\u2212k/K)(1\u2212s/S)+ k K s S ,",
"eq_num": "(10)"
}
],
"section": "Position Encodings (PE)",
"sec_num": "3.2"
},
{
"text": "adapting a formula from (Sukhbaatar et al., 2015) . Here, k \u2208 {1, 2, ..., K} is the context vector index and S is the maximum sequence length across all source sequences. The manifold is shown graphically in Figure 2 . We can see that earlier encoder states are upweighted in the first context vectors, and later states are upweighted in later vectors. The symmetry of the manifold and its stationary point having value 0.5 both follow from Eq. 10. The elements of the matrix that fall beyond the sequence lengths are then masked out and the remaining elements are renormalized across the timestep dimension. This results in the jagged array of position encodings {l ks }. 4 Experiments",
"cite_spans": [
{
"start": 24,
"end": 49,
"text": "(Sukhbaatar et al., 2015)",
"ref_id": "BIBREF19"
}
],
"ref_spans": [
{
"start": 208,
"end": 216,
"text": "Figure 2",
"ref_id": "FIGREF1"
}
],
"eq_spans": [],
"section": "Position Encodings (PE)",
"sec_num": "3.2"
},
{
"text": "Due to the reduction of computational time complexity we expect our method to yield performance gains especially for longer sequences and tasks where the source can be compactly represented in a fixed-size memory matrix. To investigate the trade-off between speed and performance, we compare our technique to standard models with and without attention on a Sequence Copy Task of varying length like in Graves et al. (2014) . We generated 4 training datasets of 100,000 examples and a validation dataset of 1,000 examples. The vocabulary size was 20. For each dataset, the sequences had lengths randomly chosen between 0 to L, for L\u2208{10,50,100,200} unique to each dataset.",
"cite_spans": [
{
"start": 402,
"end": 422,
"text": "Graves et al. (2014)",
"ref_id": "BIBREF9"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Toy Copying Experiment",
"sec_num": "4.1"
},
{
"text": "All models are implemented using TensorFlow based on the seq2seq implementation of Britz et al. (2017) 3 and trained on a single machine with a Nvidia K40m GPU. We use a 2-layer 256-unit, a bidirectional LSTM (Hochreiter and Schmidhuber, 1997) encoder, a 2-layer 256-unit LSTM decoder, and 256-dimensional embeddings. For the attention baseline, we use the standard parametrized attention (Bahdanau et al., 2014) . Dropout of 0.2 (0.8 keep probability) is applied to the input of each cell and we optimize using Adam (Kingma and Ba, 2014) at a learning rate of 0.0001 and batch size 128. We train for at most 200,000 steps (see Figure 3 for sample learning curves). BLEU scores are calculated on tokenized data using the multi-bleu.perl script in Moses. 4 We decode using beam search with a beam Table 1 shows the BLEU scores of our model on different sequence lengths while varying K. This is a study of the trade-off between computational time and representational power. A large K allows us to compute complex source representations, while a K of 1 limits the source representation to a single vector. We can see that performance consistently increases with K up to a point that depends on the data length, with longer sequences requiring more complex representations.",
"cite_spans": [
{
"start": 83,
"end": 102,
"text": "Britz et al. (2017)",
"ref_id": "BIBREF2"
},
{
"start": 209,
"end": 243,
"text": "(Hochreiter and Schmidhuber, 1997)",
"ref_id": "BIBREF10"
},
{
"start": 389,
"end": 412,
"text": "(Bahdanau et al., 2014)",
"ref_id": "BIBREF1"
},
{
"start": 754,
"end": 755,
"text": "4",
"ref_id": null
}
],
"ref_spans": [
{
"start": 628,
"end": 636,
"text": "Figure 3",
"ref_id": "FIGREF3"
},
{
"start": 796,
"end": 803,
"text": "Table 1",
"ref_id": null
}
],
"eq_spans": [],
"section": "Training Setup",
"sec_num": "4.1.1"
},
{
"text": "The results with and without position encodings are almost identical on the toy data. Our technique learns to fit the data as well as the standard attention mechanism despite having less representational power. Both beat the non-attention baseline by a significant margin. That we are able to represent the source sequence with a fixed size matrix with fewer than |S| rows suggests that traditional attention mechanisms may be representing the source with redundancies and wasting computational resources. This makes intuitive sense for the toy task, which should require a relatively simple representation.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Results",
"sec_num": "4.1.2"
},
{
"text": "The last column shows that our technique significantly speeds up the inference process. The gap in inference speed increases as sequences become longer. We measured inference time on the full validation set of 1,000 examples, not including data loading or model construction times. Figure 3a shows the learning curves for sequence length 200. We see that K =1 is unable to fit the data distribution, while K \u2208{32,64} fits the data almost as quickly as the attention-based model. Figure 3b shows the effect of varying the encoder and decoder scoring functions between softmax and sigmoid. All combinations manage to fit the data, but some converge faster than others. In section 5 we show that distinct alignments are learned by different function combinations.",
"cite_spans": [],
"ref_spans": [
{
"start": 282,
"end": 291,
"text": "Figure 3a",
"ref_id": "FIGREF3"
},
{
"start": 479,
"end": 488,
"text": "Figure 3b",
"ref_id": "FIGREF3"
}
],
"eq_spans": [],
"section": "Results",
"sec_num": "4.1.2"
},
{
"text": "Next, we explore if the memory-based attention mechanism is able to fit complex real-world datasets. For this purpose we use 4 large machine translation datasets of WMT'17 5 on the following language pairs: English-Czech (en-cs, 52M examples), English-German (en-de, 5.9M examples), English-Finish (en-fi, 2.6M examples), and English-Turkish (en-tr, 207,373 examples). We used the newly available pre-5 statmt.org/wmt17/translation-task.html processed datasets for the WMT'17 task. 6 Note that our scores may not be directly comparable to other work that performs their own data pre-processing. We learn shared vocabularies of 16,000 subword units using the BPE algorithm (Sennrich et al., 2016) . We use newstest2015 as a validation set, and report BLEU on newstest2016.",
"cite_spans": [
{
"start": 482,
"end": 483,
"text": "6",
"ref_id": null
},
{
"start": 672,
"end": 695,
"text": "(Sennrich et al., 2016)",
"ref_id": "BIBREF18"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Machine Translation",
"sec_num": "4.2"
},
{
"text": "We use a similar setup to the Toy Copy task, but use 512 RNN and embedding units, train using 8 distributed workers with 1 GPU each, and train for at most 1M steps. We save checkpoints every 30 minutes during training, and choose the best based on the validation BLEU score. Table 2 compares our approach with and without position encodings, and with varying values for hyperparameter K, to baseline models with regular attention mechanism. Learning curves are shown in Figure 4 . We see that our memory attention model with sufficiently high K performs on-par with, or slightly better, than the attention-based baseline model despite its simpler nature. Across the board, models with K = 64 performed better than corresponding models with K = 32, suggesting that using a larger number of attention vectors can capture a richer understanding of source sequences. Position encodings also seem to consistently improve model performance. Table 3 shows that our model results in faster decoding time even on a complex dataset with a large Figure 4 : Comparing training curves for en-fi and en-tr with sigmoid encoder scoring and softmax decoder scoring and position encoding. Note that en-tr curves converged very quickly.",
"cite_spans": [],
"ref_spans": [
{
"start": 275,
"end": 282,
"text": "Table 2",
"ref_id": "TABREF2"
},
{
"start": 470,
"end": 478,
"text": "Figure 4",
"ref_id": null
},
{
"start": 935,
"end": 942,
"text": "Table 3",
"ref_id": null
},
{
"start": 1035,
"end": 1043,
"text": "Figure 4",
"ref_id": null
}
],
"eq_spans": [],
"section": "Training Setup",
"sec_num": "4.2.1"
},
{
"text": "Dataset K en-cs en-de en-fi en-tr Memory Attention Table 3 : Decoding time, averaged across 10 runs, for the en-de validation set (2169 examples) with average sequence length of 35. Results are similar for both PE and non-PE models.",
"cite_spans": [],
"ref_spans": [
{
"start": 51,
"end": 58,
"text": "Table 3",
"ref_id": null
}
],
"eq_spans": [],
"section": "Model",
"sec_num": null
},
{
"text": "vocabulary of 16k. We measured decoding time over the full validation set, not including time used for model setup and data loading, averaged across 10 runs. The average sequence length for examples in this data was 35, and we expect more significant speedups for tasks with longer sequences, as suggested by our experiments on toy data. Note that in our NMT ex-amples/experiments, K \u2248T , but we obtain computational savings from the fact that K D. We may be able to set K T , as in toy copying, and still get very good performance in other tasks. For instance, in summarization the source is complex but the representation of the source required to perform the task is \"simple\" (i.e. all that is needed to generate the abstract). Figure 5 shows the effect of using sigmoid and softmax function in the encoders and decoders. We found that softmax/softmax consistently performs badly, while all other combinations perform about equally well. We report results for the best combination only (as chosen on the validation set), but we found this choice to only make a minor difference. ",
"cite_spans": [],
"ref_spans": [
{
"start": 731,
"end": 739,
"text": "Figure 5",
"ref_id": "FIGREF5"
}
],
"eq_spans": [],
"section": "Model",
"sec_num": null
},
{
"text": "A useful property of the standard attention mechanism is that it produces meaningful alignment between source and target sequences. Often, the attention mechanism learns to progressively focus on the next source token as it decodes the target. These visualizations can be an important tool in debugging and evaluating seq2seq models and are often used for unknown token replacement.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Visualizing Attention",
"sec_num": "5"
},
{
"text": "This raises the question of whether or not our proposed memory attention mechanism also learns to generate meaningful alignments. Due to limiting the number of attention contexts to a number that is generally less than the sequence length, it is not immediately obvious what each context would learn to focus on. Our hope was that the model would learn to focus on multiple alignments at the same time, within the same attention vector. For example, if the source sequence is of length 40 and we have K =10 attention contexts, we would hope that C 1 roughly focuses on tokens 1 to 4, C 2 on tokens 5 to 8, and so on. Figures 6 and 7 show that this is indeed the case. To generate this visualization we multiply the attention scores \u03b1 and \u03b2 from the encoder and decoder. Figure 8 shows a sample translation task visualization. Figure 6 suggests that our model learns distinct ways to use its memory depending on the encoder and decoder functions. Interestingly, using softmax normalization results in attention maps typical of those derived from using standard attention, i.e. a relatively linear mapping between source and target tokens. Meanwhile, using sigmoid gating results in what seems to be a distributed representation of the source sequences across encoder time steps, with multiple contiguous attention contexts being accessed at each decoding step.",
"cite_spans": [],
"ref_spans": [
{
"start": 617,
"end": 632,
"text": "Figures 6 and 7",
"ref_id": null
},
{
"start": 770,
"end": 779,
"text": "Figure 8",
"ref_id": null
},
{
"start": 827,
"end": 835,
"text": "Figure 6",
"ref_id": null
}
],
"eq_spans": [],
"section": "Visualizing Attention",
"sec_num": "5"
},
{
"text": "Our contributions build on previous work in making seq2seq models more computationally efficient. Luong et al. (2015) introduce various attention mechanisms that are computationally simpler and perform as well or better than the original one presented in Bahdanau et al. (2014) . However, these typically still require O(D 2 ) computation complexity, or lack the flexibility to look at the full source sequence. Efficient location-based attention (Xu et al., 2015) has also been explored in the image recognition domain. Wu et al. (2016) presents several enhancements to the standard seq2seq architecture that allow more efficient computation on GPUs, such as only attending on the bottom layer. Kalchbrenner et al. (2016) propose a linear time architecture based on stacked convolutional neural networks. Gehring et al. (2016) also propose the use of convolutional encoders to speed up NMT. de Br\u00e9bisson and Vincent (2016) propose a linear attention mechanism based on covariance matrices applied to information retrieval. Raffel et al. (2017) enable online linear time attention calculation by enforcing that the alignment between input and output sequence elements be monotonic. Previously, monotonic attention was proposed for morphological inflection generation by Aharoni and Goldberg (2016) .",
"cite_spans": [
{
"start": 98,
"end": 117,
"text": "Luong et al. (2015)",
"ref_id": "BIBREF14"
},
{
"start": 255,
"end": 277,
"text": "Bahdanau et al. (2014)",
"ref_id": "BIBREF1"
},
{
"start": 447,
"end": 464,
"text": "(Xu et al., 2015)",
"ref_id": "BIBREF24"
},
{
"start": 521,
"end": 537,
"text": "Wu et al. (2016)",
"ref_id": "BIBREF23"
},
{
"start": 696,
"end": 722,
"text": "Kalchbrenner et al. (2016)",
"ref_id": "BIBREF11"
},
{
"start": 806,
"end": 827,
"text": "Gehring et al. (2016)",
"ref_id": "BIBREF8"
},
{
"start": 1024,
"end": 1044,
"text": "Raffel et al. (2017)",
"ref_id": "BIBREF16"
},
{
"start": 1270,
"end": 1297,
"text": "Aharoni and Goldberg (2016)",
"ref_id": "BIBREF0"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Related Work",
"sec_num": "6"
},
{
"text": "In this work, we propose a novel memory-based attention mechanism that results in a linear computational time of O(KD(|S|+|T |)) during decoding in seq2seq models. Through a series of experiments, we demonstrate that our technique leads to consistent inference speedups as sequences get longer, and can fit complex data distributions such as those found in Neural Machine Translation. We show that our attention mechanism learns meaningful alignments despite being constrained to a fixed representation after encoding. We encourage future work that explores the optimal values of K for various language tasks and examines whether or not it is possible to predict K based on the task at hand. We also encourage evaluating our models on other tasks that must deal with long sequences but have compact representations, such as summarization and question-answering, and further exploration of their effect on memory and training speed. Figure 8: Attention scores at each step of decoding for en-de WMT translation task using model with sigmoid scoring functions and K = 32. The left subfigure displays each individual attention vector separately while the right subfigure displays the full combined attention. (y-axis: source; x-axis: target)",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Conclusion",
"sec_num": "7"
},
{
"text": "Eye-tracking and keystroke logging data from human translators show that translators generally do not reread previously translated source text words when producing target text(Carl et al., 2011).",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "",
"sec_num": null
},
{
"text": "An exception is the dot-attention fromLuong et al. (2015), which is O(D|S||T |), which we discuss further in Section 3.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "",
"sec_num": null
},
{
"text": "http://github.com/google/seq2seq 4 http://github.com/moses-smt/mosesdecoder",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "",
"sec_num": null
},
{
"text": "http://data.statmt.org/wmt17/translation-task/preprocessed",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "",
"sec_num": null
}
],
"back_matter": [],
"bib_entries": {
"BIBREF0": {
"ref_id": "b0",
"title": "Morphological inflection generation with hard monotonic attention",
"authors": [
{
"first": "Roee",
"middle": [],
"last": "Aharoni",
"suffix": ""
},
{
"first": "Yoav",
"middle": [],
"last": "Goldberg",
"suffix": ""
}
],
"year": 2016,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Roee Aharoni and Yoav Goldberg. 2016. Mor- phological inflection generation with hard monotonic attention. CoRR abs/1611.01487.",
"links": null
},
"BIBREF1": {
"ref_id": "b1",
"title": "Neural machine translation by jointly learning to align and translate",
"authors": [
{
"first": "Dzmitry",
"middle": [],
"last": "Bahdanau",
"suffix": ""
},
{
"first": "Kyunghyun",
"middle": [],
"last": "Cho",
"suffix": ""
},
{
"first": "Yoshua",
"middle": [],
"last": "Bengio",
"suffix": ""
}
],
"year": 2014,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2014. Neural machine translation by jointly learning to align and translate. CoRR abs/1409.0473. http://arxiv.org/abs/1409.0473.",
"links": null
},
"BIBREF2": {
"ref_id": "b2",
"title": "Massive Exploration of Neural Machine Translation Architectures",
"authors": [
{
"first": "Denny",
"middle": [],
"last": "Britz",
"suffix": ""
},
{
"first": "Anna",
"middle": [],
"last": "Goldie",
"suffix": ""
},
{
"first": "Thang",
"middle": [],
"last": "Luong",
"suffix": ""
},
{
"first": "Quoc",
"middle": [],
"last": "Le",
"suffix": ""
}
],
"year": 2017,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Denny Britz, Anna Goldie, Thang Luong, and Quoc Le. 2017. Massive Exploration of Neural Machine Translation Architectures. CoRR abs/1703.03906. http://arxiv.org/abs/1703.03906.",
"links": null
},
"BIBREF3": {
"ref_id": "b3",
"title": "Barbara Dragsted, and Arnt Lykke Jakobsen",
"authors": [
{
"first": "Michael",
"middle": [],
"last": "Carl",
"suffix": ""
}
],
"year": 2011,
"venue": "Translation Journal",
"volume": "16",
"issue": "2",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Michael Carl, Barbara Dragsted, and Arnt Lykke Jakob- sen. 2011. A taxonomy of human translation styles. Translation Journal 16(2).",
"links": null
},
"BIBREF5": {
"ref_id": "b5",
"title": "Learning phrase representations using RNN encoder-decoder for statistical machine translation",
"authors": [
{
"first": "Kyunghyun",
"middle": [],
"last": "Cho",
"suffix": ""
},
{
"first": "Bart",
"middle": [],
"last": "Van Merrienboer",
"suffix": ""
},
{
"first": "Fethi",
"middle": [],
"last": "Aglar G\u00fcl\u00e7ehre",
"suffix": ""
},
{
"first": "Holger",
"middle": [],
"last": "Bougares",
"suffix": ""
},
{
"first": "Yoshua",
"middle": [],
"last": "Schwenk",
"suffix": ""
},
{
"first": "",
"middle": [],
"last": "Bengio",
"suffix": ""
}
],
"year": 2014,
"venue": "EMNLP",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Kyunghyun Cho, Bart van Merrienboer, \u00c7 aglar G\u00fcl\u00e7ehre, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In EMNLP.",
"links": null
},
"BIBREF6": {
"ref_id": "b6",
"title": "Towards better decoding and language model integration in sequence to sequence models",
"authors": [
{
"first": "Jan",
"middle": [],
"last": "Chorowski",
"suffix": ""
},
{
"first": "Navdeep",
"middle": [],
"last": "Jaitly",
"suffix": ""
}
],
"year": 2016,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Jan Chorowski and Navdeep Jaitly. 2016. Towards better decoding and language model integration in sequence to sequence models. CoRR abs/1612.02695. http://arxiv.org/abs/1612.02695.",
"links": null
},
"BIBREF7": {
"ref_id": "b7",
"title": "A cheap linear attention mechanism with fast lookups and fixed-size representations",
"authors": [
{
"first": "Alexandre",
"middle": [],
"last": "De Br\u00e9bisson",
"suffix": ""
},
{
"first": "Pascal",
"middle": [],
"last": "Vincent",
"suffix": ""
}
],
"year": 2016,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Alexandre de Br\u00e9bisson and Pascal Vincent. 2016. A cheap linear attention mechanism with fast lookups and fixed-size representations. CoRR abs/1609.05866. http://arxiv.org/abs/1609.05866.",
"links": null
},
"BIBREF8": {
"ref_id": "b8",
"title": "A convolutional encoder model for neural machine translation",
"authors": [
{
"first": "Jonas",
"middle": [],
"last": "Gehring",
"suffix": ""
},
{
"first": "Michael",
"middle": [],
"last": "Auli",
"suffix": ""
},
{
"first": "David",
"middle": [],
"last": "Grangier",
"suffix": ""
},
{
"first": "Yann",
"middle": [
"N"
],
"last": "Dauphin",
"suffix": ""
}
],
"year": 2016,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Jonas Gehring, Michael Auli, David Grangier, and Yann N. Dauphin. 2016. A convolutional encoder model for neural machine translation. CoRR abs/1611.02344. http://arxiv.org/abs/1611.02344.",
"links": null
},
"BIBREF9": {
"ref_id": "b9",
"title": "Neural turing machines",
"authors": [
{
"first": "Alex",
"middle": [],
"last": "Graves",
"suffix": ""
},
{
"first": "Greg",
"middle": [],
"last": "Wayne",
"suffix": ""
},
{
"first": "Ivo",
"middle": [],
"last": "Danihelka",
"suffix": ""
}
],
"year": 2014,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Alex Graves, Greg Wayne, and Ivo Danihelka. 2014. Neural turing machines. CoRR abs/1410.5401.",
"links": null
},
"BIBREF10": {
"ref_id": "b10",
"title": "Long short-term memory",
"authors": [
{
"first": "Sepp",
"middle": [],
"last": "Hochreiter",
"suffix": ""
},
{
"first": "J\u00fcrgen",
"middle": [],
"last": "Schmidhuber",
"suffix": ""
}
],
"year": 1997,
"venue": "Neural Computation",
"volume": "9",
"issue": "8",
"pages": "1735--1780",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Sepp Hochreiter and J\u00fcrgen Schmidhuber. 1997. Long short-term memory. Neural Computation 9(8):1735- 1780.",
"links": null
},
"BIBREF11": {
"ref_id": "b11",
"title": "A\u00e4ron van den Oord, Alex Graves, and Koray Kavukcuoglu",
"authors": [
{
"first": "Nal",
"middle": [],
"last": "Kalchbrenner",
"suffix": ""
},
{
"first": "Lasse",
"middle": [],
"last": "Espeholt",
"suffix": ""
},
{
"first": "Karen",
"middle": [],
"last": "Simonyan",
"suffix": ""
}
],
"year": 2016,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Nal Kalchbrenner, Lasse Espeholt, Karen Simonyan, A\u00e4ron van den Oord, Alex Graves, and Koray Kavukcuoglu. 2016. Neural machine trans- lation in linear time. CoRR abs/1610.10099.",
"links": null
},
"BIBREF12": {
"ref_id": "b12",
"title": "Adam: A method for stochastic optimization",
"authors": [
{
"first": "P",
"middle": [],
"last": "Diederik",
"suffix": ""
},
{
"first": "Jimmy",
"middle": [],
"last": "Kingma",
"suffix": ""
},
{
"first": "",
"middle": [],
"last": "Ba",
"suffix": ""
}
],
"year": 2014,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Diederik P. Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. CoRR abs/1412.6980. http://arxiv.org/abs/1412.6980.",
"links": null
},
"BIBREF13": {
"ref_id": "b13",
"title": "A diversity-promoting objective function for neural conversation models",
"authors": [
{
"first": "Jiwei",
"middle": [],
"last": "Li",
"suffix": ""
},
{
"first": "Michel",
"middle": [],
"last": "Galley",
"suffix": ""
},
{
"first": "Chris",
"middle": [],
"last": "Brockett",
"suffix": ""
},
{
"first": "Jianfeng",
"middle": [],
"last": "Gao",
"suffix": ""
},
{
"first": "Bill",
"middle": [],
"last": "Dolan",
"suffix": ""
}
],
"year": 2015,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Jiwei Li, Michel Galley, Chris Brockett, Jianfeng Gao, and Bill Dolan. 2015. A diversity-promoting objective function for neural conversation models. CoRR abs/1510.03055. http://arxiv.org/abs/1510.03055.",
"links": null
},
"BIBREF14": {
"ref_id": "b14",
"title": "Effective approaches to attention-based neural machine translation",
"authors": [
{
"first": "Minh-Thang",
"middle": [],
"last": "Luong",
"suffix": ""
},
{
"first": "Hieu",
"middle": [],
"last": "Pham",
"suffix": ""
},
{
"first": "Christopher",
"middle": [
"D"
],
"last": "Manning",
"suffix": ""
}
],
"year": 2015,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Minh-Thang Luong, Hieu Pham, and Christopher D. Man- ning. 2015. Effective approaches to attention-based neural machine translation. CoRR abs/1508.04025. http://arxiv.org/abs/1508.04025.",
"links": null
},
"BIBREF15": {
"ref_id": "b15",
"title": "Sequence-to-sequence rnns for text summarization",
"authors": [
{
"first": "Ramesh",
"middle": [],
"last": "Nallapati",
"suffix": ""
},
{
"first": "Bing",
"middle": [],
"last": "Xiang",
"suffix": ""
},
{
"first": "Bowen",
"middle": [],
"last": "Zhou",
"suffix": ""
}
],
"year": 2016,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Ramesh Nallapati, Bing Xiang, and Bowen Zhou. 2016. Sequence-to-sequence rnns for text summarization. CoRR abs/1602.06023.",
"links": null
},
"BIBREF16": {
"ref_id": "b16",
"title": "Online and linear-time attention by enforcing monotonic alignments",
"authors": [
{
"first": "Colin",
"middle": [],
"last": "Raffel",
"suffix": ""
},
{
"first": "Thang",
"middle": [],
"last": "Luong",
"suffix": ""
},
{
"first": "Peter",
"middle": [
"J"
],
"last": "Liu",
"suffix": ""
},
{
"first": "Ron",
"middle": [
"J"
],
"last": "Weiss",
"suffix": ""
},
{
"first": "Douglas",
"middle": [],
"last": "Eck",
"suffix": ""
}
],
"year": 2017,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Colin Raffel, Thang Luong, Peter J. Liu, Ron J. Weiss, and Douglas Eck. 2017. Online and linear-time attention by enforcing monotonic alignments. CoRR abs/1704.00784. http://arxiv.org/abs/1704.00784.",
"links": null
},
"BIBREF17": {
"ref_id": "b17",
"title": "A neural attention model for abstractive sentence summarization",
"authors": [
{
"first": "Alexander",
"middle": [
"M"
],
"last": "Rush",
"suffix": ""
},
{
"first": "Sumit",
"middle": [],
"last": "Chopra",
"suffix": ""
},
{
"first": "Jason",
"middle": [],
"last": "Weston",
"suffix": ""
}
],
"year": 2015,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Alexander M. Rush, Sumit Chopra, and Jason Weston. 2015. A neural attention model for abstractive sentence summarization. CoRR abs/1509.00685.",
"links": null
},
"BIBREF18": {
"ref_id": "b18",
"title": "Neural machine translation of rare words with subword units",
"authors": [
{
"first": "Rico",
"middle": [],
"last": "Sennrich",
"suffix": ""
},
{
"first": "Barry",
"middle": [],
"last": "Haddow",
"suffix": ""
},
{
"first": "Alexandra",
"middle": [],
"last": "Birch",
"suffix": ""
}
],
"year": 2016,
"venue": "ACL",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Neural machine translation of rare words with subword units. In ACL.",
"links": null
},
"BIBREF19": {
"ref_id": "b19",
"title": "Weakly supervised memory networks",
"authors": [
{
"first": "Sainbayar",
"middle": [],
"last": "Sukhbaatar",
"suffix": ""
},
{
"first": "Arthur",
"middle": [],
"last": "Szlam",
"suffix": ""
}
],
"year": 2015,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Sainbayar Sukhbaatar, Arthur Szlam, Jason We- ston, and Rob Fergus. 2015. Weakly super- vised memory networks. CoRR abs/1503.08895. http://arxiv.org/abs/1503.08895.",
"links": null
},
"BIBREF20": {
"ref_id": "b20",
"title": "Sequence to sequence learning with neural networks",
"authors": [
{
"first": "Ilya",
"middle": [],
"last": "Sutskever",
"suffix": ""
},
{
"first": "Oriol",
"middle": [],
"last": "Vinyals",
"suffix": ""
},
{
"first": "V",
"middle": [],
"last": "Quoc",
"suffix": ""
},
{
"first": "",
"middle": [],
"last": "Le",
"suffix": ""
}
],
"year": 2014,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. 2014. Sequence to sequence learning with neural networks. In NIPS.",
"links": null
},
"BIBREF21": {
"ref_id": "b21",
"title": "A neural conversational model",
"authors": [
{
"first": "Oriol",
"middle": [],
"last": "Vinyals",
"suffix": ""
},
{
"first": "V",
"middle": [],
"last": "Quoc",
"suffix": ""
},
{
"first": "",
"middle": [],
"last": "Le",
"suffix": ""
}
],
"year": 2015,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Oriol Vinyals and Quoc V. Le. 2015. A neural conversational model. CoRR abs/1506.05869.",
"links": null
},
"BIBREF22": {
"ref_id": "b22",
"title": "Sequence-to-sequence learning as beamsearch optimization",
"authors": [
{
"first": "Sam",
"middle": [],
"last": "Wiseman",
"suffix": ""
},
{
"first": "Alexander",
"middle": [
"M"
],
"last": "Rush",
"suffix": ""
}
],
"year": 2016,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Sam Wiseman and Alexander M. Rush. 2016. Sequence-to-sequence learning as beam- search optimization. CoRR abs/1606.02960.",
"links": null
},
"BIBREF23": {
"ref_id": "b23",
"title": "Google's neural machine translation system: Bridging the gap between human and machine translation",
"authors": [
{
"first": "Yonghui",
"middle": [],
"last": "Wu",
"suffix": ""
},
{
"first": "Mike",
"middle": [],
"last": "Schuster",
"suffix": ""
},
{
"first": "Zhifeng",
"middle": [],
"last": "Chen",
"suffix": ""
},
{
"first": "Quoc",
"middle": [
"V"
],
"last": "Le",
"suffix": ""
},
{
"first": "Mohammad",
"middle": [],
"last": "Norouzi",
"suffix": ""
},
{
"first": "Wolfgang",
"middle": [],
"last": "Macherey",
"suffix": ""
},
{
"first": "Maxim",
"middle": [],
"last": "Krikun",
"suffix": ""
},
{
"first": "Yuan",
"middle": [],
"last": "Cao",
"suffix": ""
},
{
"first": "Qin",
"middle": [],
"last": "Gao",
"suffix": ""
},
{
"first": "Klaus",
"middle": [],
"last": "Macherey",
"suffix": ""
},
{
"first": "Jeff",
"middle": [],
"last": "Klingner",
"suffix": ""
},
{
"first": "Apurva",
"middle": [],
"last": "Shah",
"suffix": ""
},
{
"first": "Melvin",
"middle": [],
"last": "Johnson",
"suffix": ""
},
{
"first": "Xiaobing",
"middle": [],
"last": "Liu",
"suffix": ""
},
{
"first": "Lukasz",
"middle": [],
"last": "Kaiser",
"suffix": ""
},
{
"first": "Stephan",
"middle": [],
"last": "Gouws",
"suffix": ""
},
{
"first": "Yoshikiyo",
"middle": [],
"last": "Kato",
"suffix": ""
},
{
"first": "Taku",
"middle": [],
"last": "Kudo",
"suffix": ""
},
{
"first": "Hideto",
"middle": [],
"last": "Kazawa",
"suffix": ""
},
{
"first": "Keith",
"middle": [],
"last": "Stevens",
"suffix": ""
},
{
"first": "George",
"middle": [],
"last": "Kurian",
"suffix": ""
},
{
"first": "Nishant",
"middle": [],
"last": "Patil",
"suffix": ""
},
{
"first": "Wei",
"middle": [],
"last": "Wang",
"suffix": ""
}
],
"year": 2016,
"venue": "Oriol Vinyals",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V. Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, Jeff Klingner, Apurva Shah, Melvin Johnson, Xiaobing Liu, Lukasz Kaiser, Stephan Gouws, Yoshikiyo Kato, Taku Kudo, Hideto Kazawa, Keith Stevens, George Kurian, Nishant Patil, Wei Wang, Cliff Young, Jason Smith, Ja- son Riesa, Alex Rudnick, Oriol Vinyals, Greg Corrado, Macduff Hughes, and Jeffrey Dean. 2016. Google's neural machine translation system: Bridging the gap between human and machine translation. CoRR abs/1609.08144. http://arxiv.org/abs/1609.08144.",
"links": null
},
"BIBREF24": {
"ref_id": "b24",
"title": "Show, attend and tell: Neural image caption generation with visual attention",
"authors": [
{
"first": "Kelvin",
"middle": [],
"last": "Xu",
"suffix": ""
},
{
"first": "Jimmy",
"middle": [],
"last": "Ba",
"suffix": ""
},
{
"first": "Ryan",
"middle": [],
"last": "Kiros",
"suffix": ""
},
{
"first": "Kyunghyun",
"middle": [],
"last": "Cho",
"suffix": ""
},
{
"first": "Aaron",
"middle": [
"C"
],
"last": "Courville",
"suffix": ""
},
{
"first": "Ruslan",
"middle": [],
"last": "Salakhutdinov",
"suffix": ""
},
{
"first": "Richard",
"middle": [
"S"
],
"last": "Zemel",
"suffix": ""
},
{
"first": "Yoshua",
"middle": [],
"last": "Bengio",
"suffix": ""
}
],
"year": 2015,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron C. Courville, Ruslan Salakhutdinov, Richard S. Zemel, and Yoshua Bengio. 2015. Show, attend and tell: Neural image caption genera- tion with visual attention. CoRR abs/1502.03044. http://arxiv.org/abs/1502.03044.",
"links": null
}
},
"ref_entries": {
"FIGREF0": {
"uris": null,
"text": "Memory Attention model architecture. K attention vectors are predicted during encoding, and a linear combination is chosen during decoding. In our example, K =3.",
"type_str": "figure",
"num": null
},
"FIGREF1": {
"uris": null,
"text": "Surface for the position encodings.",
"type_str": "figure",
"num": null
},
"FIGREF2": {
"uris": null,
"text": "Comparison of varying K for copying sequences of length 200 on evaluation data, showing that large K leads to faster convergence and small K performs similarly to the non-attentional baseline. Comparison of sigmoid and softmax functions for choosing the encoder and decoder attention scores on evaluation data, showing that choice of gating/normalization matters.",
"type_str": "figure",
"num": null
},
"FIGREF3": {
"uris": null,
"text": "Training Curves for the Toy Copy task",
"type_str": "figure",
"num": null
},
"FIGREF4": {
"uris": null,
"text": "Training curves for en-tr",
"type_str": "figure",
"num": null
},
"FIGREF5": {
"uris": null,
"text": "Comparing training curves for en-fi for different encoder/decoder scoring functions for our models at K =64.",
"type_str": "figure",
"num": null
},
"FIGREF6": {
"uris": null,
"text": "Attention scores at each step of decoding for on a sample from the sequence length 100 toy copy dataset. Individual attention vectors are highlighted in blue. (y-axis: source tokens; x-axis: target tokens) Attention scores at each step of decoding for K = 4 on a sample with sequence length 11. The subfigure on the left color codes each individual attention vector. (y-axis: source; x-axis: target)",
"type_str": "figure",
"num": null
},
"TABREF2": {
"text": "BLEU scores on WMT'17 translation datasets from the memory attention models and regular attention baselines. We picked the best out of the four scoring function combinations on the validation set. Note that en-tr does not have an official test set. Best test scores on each dataset are highlighted.",
"html": null,
"num": null,
"content": "<table><tr><td>Model</td><td>Decoding Time (s)</td></tr><tr><td>K =32</td><td>26.85</td></tr><tr><td>K =64</td><td>27.13</td></tr><tr><td>Attention</td><td>33.28</td></tr></table>",
"type_str": "table"
}
}
}
}