A Generative Framework for Simultaneous Machine Translation (2021)

Abstract: We propose a generative framework for simultaneous machine translation. Conventional approaches use a fixed number of source words to translate or learn dynamic policies for the number of source words by reinforcement learning. Here we formulate simultaneous translation as a structural sequence-to-sequence learning problem. A latent variable is introduced to model read or translate actions at every time step, which is then integrated out to consider all the possible translation policies. A re-parameterised Poisson prior is used to regularise the policies which allows the model to explicitly balance translation quality and latency. The experiments demonstrate the effectiveness and robustness of the generative framework, which achieves the best BLEU scores given different average translation latencies on benchmark datasets.

## introduction the fundamental challenge of simultaneous machine translation (simt) is the balance between the translation quality and the latency. it is non-trivial to find an optimal translation strategy, as there is generally a rivalry between the two objectives, i.e. reading more source words before translating leads to better translation quality, but it in turn results in higher latency due to the longer time for reading. conventional wait-k policies @xcite ) put a hard limitation over the buffer size k 1 , which guarantees low latency but weakens flexibility and scalability when handling long and complicated language pairs. alternatively, reinforcement learning (rl) approaches @xcite @xcite learn a dynamic policy using a combined reward of a quality metric like the bleu score and al (average lagging) 2 . in this paper we propose a generative framework with a latent variable that dynamically decides between the actions of read or translate at every time step, enabling the formulation of simt as a structural sequence-to-sequence learning task. figure 1 depicts the examples of possible translation paths of different models. wait-k only explores one hypothesis, while adaptive wait-k ensembles the other hypothesises with lower k. however, the hypothesises of reading more than k words before translating are not considered (e.g. inversion and reordering in long sequence translations). the rl models apply dynamic policies which can explore all the possible hypothesises, but the gradient estimator conditioned on discrete samples has large variance and the variance issue gets worse for long sequences. instead, our proposed generative simultaneous machine translation model @xcite integrates out all the hypothesises by a dynamic programming algorithm (algorithm 1) with the help of the introduced latent variable. it does not suffer from such large variance issue, and can be easily and efficiently learned by gradient backpropagation on gpu hardware. the generative model can be modelled as a neural transducer @xcite . however the vanilla neural transducer is not designed for simt. because it is optimised by the crossentropy of target words, it naturally prefers read actions over translate actions in order to see more contexts before translation, which intuitively can result in better translation quality but high latency. here, we propose to extend the neural transducer framework to modern transformer-based translation models @xcite , and introduce a re-parameterised poisson distribution to regularise the latency (i.e. how many source words are read before translating a target word). inspired by the fast-alignment work by @xcite , the translation model generally favors word alignments distributed close to the diagonal. we hypothesise that the optimal sequence of translate actions in simt is also located close to the diagonal. thus the poisson prior acts as context-independent regularisation on the buffer size proportional to the distance between the current position and the diagonal. this ensures that the number of read source words will not grow indefinitely without translating any target words, while the soft boundary, due to the regularisation, still allows the model to consider complicated/long simultaneous translation cases. to demonstrate the effectiveness of the proposed framework, we evaluate our generative models on two benchmark datasets: wmt15 @xcite for text-only simt and multi30k @xcite for multimodal simt. compared to a number of strong baseline models, wait-k, adaptive wait-k and an rl-trained policy, our proposed model achieves the best performance on both bleu scores and average lagging (al). our contributions can be summarised: ## related work conventional simt methods are based on heuristic waiting criteria @xcite or fixed buffering strategy @xcite to trade off the translation quality for lower latency. although the heuristic approaches are simple and straightforward, they lack of scalability and cannot generalise well on longer sequences. there is also a bulk of work attempting to improve the attention mechanism @xcite and re-translation strategies @xcite for better translation quality. recently, zheng et al. ( 2020 ) extends the fixed wait-k policies into adaptive version and ensembles multiple models with lower latency to improve the performance, but one still needs to choose a hard boundary on the maximum value of k. by contrast, our gsimt model considers all the possible paths with a soft boundary modelled by poisson distribution, which leads to a more flexible balance between quality and latency. rl has been explored @xcite to learn an agent that dynamically decides to read or translate conditioned on different translation contexts. @xcite further applies extra knowledge on word alignments as the oracle to improve the learning. however, the high variance of the estimator is still a bottleneck that hinders the applicability of rl in structural sequence-to-sequence learning. the proposed gsimt model combines the merits of both the wait-k policies and rl. deep learning with structures has been explored in many nlp tasks, especially for sequence-tosequence learning. @xcite implements structural dependencies on attention networks, which gives the ability to attend to partial segmentations or subtrees without changing the sequence-to-sequence structure. @xcite parameterises the transition and emission probabilities of an hmm with explicit neural components, and @xcite applies deep structural latent variables to implement the dependency model with valence @xcite and integrates out all the structures in end-to-end learning. our gsimt model is based on neural transducer model. previously, @xcite presents an rnn-based neural transducer for phoneme recognition, and @xcite explores an lstm-based neural transducer for mt. the uni-directional variant model of @xcite is similar to our proposed gsimt model, however it is implemented as a vanilla neural transducer, which is not optimised for low la- 𝑌 :1 𝑌 :2 𝑌 :𝑛 𝑋 :1 𝑋 :2 𝑋 :3 𝑋 :𝑚 𝑆 3,3 𝑆 1,1 𝑆 1,2 𝑆 1,3 𝑆 3,2 𝑆 2,1 𝑆 2,2 𝑆 2,3 … decoder transformer encoder transformer 𝑆 3,1 𝑝(𝑎 3,3 |𝑋 :3 , 𝑌 :2 ) training @xmath0:3 , 𝑌 :2 ) … 𝑌 :1 𝑌 :2 𝑋 :1 𝑋 :2 𝑋 :3 𝑆 3,3 𝑆 1,1 𝑆 1,2 𝑆 3,2 𝑆 2,2 decoder transformer encoder @xmath1,1 =1 𝑎 1,2 =0 𝑎 2,2 =0 𝑎 3,2 =1 𝑦 1 𝑦 2 𝑦 3 𝑎𝑟𝑔𝑚𝑎𝑥 𝑎𝑟𝑔𝑚𝑎𝑥 𝑠𝑜𝑓𝑡𝑚𝑎𝑥 𝑆 3,3 • 𝑊 𝑦 𝑇 𝑠𝑖𝑔𝑚𝑜𝑖𝑑 𝑆 3,3 • 𝑊 𝑎 𝑇 𝑎 3,3 =1 figure 2 : during training, all the contextualised representations s i,j will be used to compute the translation distribution p(y j |x :i , y :j-1 ) and action distribution p(a i,j |x :i , y :j-1 ) , while in testing the model takes the inputs x in real-time and dynamically produces y j and a i,j until all the inputs have been read. ## conclusions this paper proposes a generative framework for simultaneous mt, which we demonstrated achieves the best translation quality and latency to date on common datasets. the introduction of poisson prior over the buffer size fills in the gap between simultaneous mt and structural sequenceto-sequence learning. more importantly, the overall algorithm is simple and easy to implement, which grants the ability to be massively applied for various real-world tasks. it has the potential to become the standard framework for simt and we will release the code to the public for future research.