You will be shown an excerpt from a computer science scientific research paper, followed by a question about the paper. Please answer the question. Do not include any text in your response other than the answer.

Context: The global attention has a drawback that it has to attend to all words on thesource side for each target word, which is expensive and can potentially render it impractical totranslate longer sequences, e.g., paragraphs or documents.To address this deficiency, we propose a local attentional mechanism thatchooses to focus only on a small subset of the source positions per target word. Our local attention mechanism selectively focuses on a small window ofcontext and is differentiable. This approach has an advantage of avoiding the expensive computation incurred inthe soft attention and at the same time, is easier to train than the hardattention approach.In concrete details, the model first generates an aligned position p_{t} for each target word at time t. Thecontext vector \mbox{\boldmath{$c$}}_{t} is then derived as a weighted average over the set of source hidden states within the window [p_{t}-D,p_{t}+D]; D isempirically selected.888If the window crosses the sentence boundaries, wesimply ignore the outside part and consider words in the window. Unlike the global approach, the local alignment vector \mbox{\boldmath{$a$}}_{t} is now fixed-dimensional, i.e., \in\mathbb{R}^{2D+1}. We consider two variants of the model as below. In this work, we design, with simplicity and effectiveness in mind, two noveltypes of attention-based models: a global approach in which all sourcewords are attended and a local one whereby only a subset of source wordsare considered at a time. The former approach resembles the model of[Bahdanau et al., 2015] but is simpler architecturally. The latter can be viewed as aninteresting blend between the hard and soft attention modelsproposed in [Xu et al., 2015]: it is computationally less expensive than theglobal model or the soft attention; at the same time, unlike the hard attention,the local attention isdifferentiable almost everywhere, making it easier to implement andtrain.222There is a recent work by ?), which is verysimilar to our local attention and applied to the image generation task.However, as we detail later, our model is much simpler and can achieve good performance for NMT. Besides, we also examine variousalignment functions for our attention-based models. As shown in Table 1, we achieve progressive improvements when(a) reversing the source sentence, +1.3 BLEU, as proposed in [Sutskever et al., 2014]and (b) using dropout, +1.4 BLEU. On top of that, (c) the globalattention approach gives a significant boost of +2.8 BLEU, makingour model slightly better than the base attentional system of?) (row RNNSearch). When (d) using the input-feedingapproach, we seize another notable gain of +1.3 BLEU and outperform theirsystem. The local attention model with predictive alignments (row local-p) provesto be even better, giving us a further improvement of +0.9 BLEU on top of theglobal attention model.It is interesting to observe the trend previously reported in[Luong et al., 2015] that perplexity strongly correlates with translation quality.In total, we achieve a significant gain of5.0 BLEU points over the non-attentional baseline, which already includesknown techniques such as source reversing and dropout. We also found that the alignments produced by local attention models achievelower AERs than those of the global one. The AER obtained by the ensemble, whilegood, is not better than the local-m AER, suggesting the well-knownobservation that AER and translation scores are not well correlated [Fraser and Marcu, 2007].We show some alignment visualizations in Appendix A.

Question: What are the pros and cons of a global approach and a local approach?
A drawback of the global attention is it had to attend to all words on the source side for each target word, which is expensive and potentially will render it impractical to translate longer sequences, and despite that global attention gives a significant boost of +2.8 BLEU making it better than the base attention system, but the local approach gave further improvement of +0.9 BLEU on top of the global attention model. Also the local approach achieved lower AERs. Not to mention that the local approach is simpler, easier to implement and train, and computationally less expensive. as it focus only on a small subset of the source positions per target word.