guide the generation process to focus on the source sequence [@bahdanau2015neural]. The attention calculating module takes as input the current hidden state ${\mathbf{h}}_t$ of the generator at each time step ${\mathbf{t}}$. The aim of this module is to determine a context vector ${\mathbf{c}}_t$ that captures relevant source-side information to help predict the token ${\mathbf{\hat{x}}}_t$. In case of [*global attention*]{}, all the hidden states of the encoder are considered to calculate the context vector ${\mathbf{c}}_t$ [@luong2015effective]. This faces the the downside of expensive calculation especially for longer source sequences like documents. To overcome this challenge, [*local attention*]{} only chooses to focus only on a small subset of the source positions per target word. In this case, ${\mathbf{c}}_t$ is calculated over a window of size $D$ of the source hidden states.

@vaswani2017attention view attention as a 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. This work proposes the simultaneous use of [*scaled dot-product*]{} attention which helps in 