Interactive Post-Editing for Verbosity Controlled Translation (2022)

Abstract: We explore Interactive Post-Editing (IPE) models for human-in-loop translation to help correct translation errors and rephrase it with a desired style variation. We specifically study verbosity for style variations and build on top of multi-source transformers that can read source and hypothesis to improve the latter with user inputs. Token-level interaction inputs for error corrections and length interaction inputs for verbosity control are used by the model to generate a suitable translation. We report BERTScore to evaluate semantic quality with other relevant metrics for translations from English to German, French and Spanish languages. Our model achieves superior BERTScore over state-of-the-art machine translation models while maintaining the desired token-level and verbosity preference.

## introduction recent machine translation (mt) models @xcite have shown to excel with aspects of translation quality like adequacy and fluency but these models still suffer notable shortcomings like out-of-domain data, low-resource languages, rare words and longer sentences @xcite . hence, mt systems are often supplemented by human translators for editing and correcting mt outputs to achieve the desired quality bar for various use-cases @xcite . broadly, mt employing human input can be classified as one of two types: manual post-editing (mpe) and interactive post-editing (ipe) @xcite . mpe relies on humans to make all necessary edits on top of mt output to deliver the final translation. whereas, ipe uses a human-in-the-loop approach: the model offers human translators various cues like auto-complete suggestions, word look-ups, etc until the human arrives at a translation. both approaches have their trade-offs and it is observed that while mpe is slower, it delivers a higher quality output relative to the faster ipe @xcite . our work is a human-in-the-loop model that aims to make efficient use of human effort in delivering improved translations. translation quality, largely encompassing adequacy and fluency, has been the primary focus of most mt studies. some recent work has explored other aspects of mt models like translation diversity, word choice (rare vs frequent words), translation style, etc @xcite @xcite @xcite @xcite . this style-aware modelling further broadens the scope and usability of mt, even more so when users can control levers to achieve the desired style variation. our work identifies one of the most important style featuresverbosity or translation length. controlling length of translation output has been studied before for nmt models @xcite but to the best of our knowledge our work is the first to propose a solution for controlling length of translation in an interactive human-in-the-loop setting. length is extremely crucial in many layout constrained translations use-cases like subtitling where the same amount of information needs to be available onscreen at a given point in time independent of the subtitle language. in this work, we propose a interactive postediting system that leverages multi-source transformers to offer users: ## related work we review some recent studies focusing on automatic and interactive post-editing models germane to our work. automatic post-editing (ape) is the task of automatically correcting the output of an (mt) system. ape models can be used to adapt a general purpose mt systems to new domains, fix errors in mt outputs and, in general, reduce human post-editing effort @xcite . transformer-based models for ape systems @xcite @xcite have eclipsed models relying on statistical mt in recent years @xcite . ape models inherit all the drawbacks of nmt since there is no human involved. they are excellent at domain adaption but often fail to improve the quality of state-of-the-art nmt models @xcite and the role and relevance of ape is often debated @xcite . post-editing models models require processing of both source text and mt output in order to generate a revised translation. typically, two separate encoders are used -one for each source text and corresponding candidate translation -in addition to a single decoder responsible for generating output. we adapt one such model the multi-source transformer (mst) @xcite for the current research. there are alternate methods that use two sequence-to-sequence models instead and merge the resulting distributions @xcite . merging distributions post-hoc is inadvisable, as complex patterns cannot be learned as easily and care must be taken to ensure that the combined distribution remains representative. we extend the mst approach for our work and use it train interactive human-in-loop models with user control to improve translation quality and style. in contrast to standard post-editing models, ipe models consume user inputs to revise candidate translations. user inputs could be tokens that should either be dropped or retained from candidate or source sentences. quickedit model @xcite is an example that uses strike-out interactions to gather user tokens that should be dropped from mt output. similarly, touchediting model @xcite supports substitution, deletion, reordering and insertion operations on tokens. support for richer and more complex interactions makes the model more flexible and easier for users. our work borrows token-level interactions on source text and candidate sentences (we call them hypothesis) from related literature that help correct errors and improve translation quality. we extend this further to control verbosity of translation. style-aware language generation has drawn considerable attention from researchers recently. they have been studied for paraphrasing and translating text with the desired style properties. style properties like (active/passive) voice @xcite , formality @xcite , complexity @xcite , and verbosity @xcite are some examples that were explored in various applications. we evaluate one of the most important style features -verbosity or translation length in the context of ipe in this work. ## problem and approach our primary goal is to train a sequence-tosequence model that can improve candidate translations of the source with user cues. the model m(s, h, i) takes as its input a pair of sentences (source text s and a hypothesized translation h ) as well as a set i of user interaction cues. the model tries to improve the translation of the source while leveraging user cues and accommodating those that are feasible. post-edits can be successively applied by translators until satisfactory translation as h k+1 = m(s, h k , i k ). users generate interactions on the source and hypothesis sentences that the model uses to improve the translation. we support two categories of interactions; (1) token-level interactions (2) length interactions. for token-level interactions, the user has access to four unique operations @xmath0, delete, insert, replace}. at each iteration, interactions can reflect any subset of this set i k ⊂ p(i), including an empty set ∅ which reduces to ape. the keep interaction is used to mark tokens in hypothesis that the user wishes to retain in the revised translation and the delete interaction captures tokens from the hypothesis the user prefers to drop from the revised translation (similar to the strike-out operation in quickedit). the replace interaction allows user to mark tokens in the hypothesis that are in the right position but need to be changed in the revised translation. for the insert interaction, we provide the user with a translation language model (tlm) (similar to (conneau and lample, 2019)) which allows the user to add a token in the hypothesis at a position of their choice. these interactions are passed by enclosing the relevant tokens from the sentence in appropriate control tags. for example, keep is indicated by @xmath1. 1 the length interaction is used to affect the verbosity of the output. user can request three possible variations on this interaction; increment (↑), decrement (↓) or isometric translation (↔). isometric translation refers to generating translations similar in length to the source. we follow the same definition of isometric translation as described in @xcite . any translation with target character length @xmath2. if the user wants to make the revised translation longer/shorter compared to the hypothesis, they indicate this with the increment or decrement length interactions. if the user wants to make the revised translation to be of similar length as source, they pick isometric translation. the corresponding control tag is prepended to the hypothesis sentence before it is passed to the encoder. model architecture. we use a multi-source transformer (mst) proposed by @xcite for our task. we specifically consider the implementation by @xcite foot_1 based on fairseq @xcite . the mst network consists of two transformer encoders and one transformer decoder @xcite . we use the same hyperparameters as in the transformer (base) model with 6 layers in both the encoder and the decoder, 512 as the embedding dimension, 2048 as dimension of the feed forward layer and 8 heads for multi-head attention. the two encoders are used for encoding the source and the hypothesis sentences separately, while the decoder is used for generating an improved translation. outputs from the encoders are concatenated and then used to generate keys and values for the encoder-decoder attention sub-layers in the decoder. (see figure 1 for an illustration of the model.) we maximize the conditional log-likelihood l θ (d) of the training data d over the network parameters θ, ## interaction data simulation to the best of our knowledge, there are no publicly available datasets capturing the various interactions we aim to learn through m. there are public datasets for automated post-editing (like (chatterjee et al., 2019)) but they only have source and hypothesis pairs with post-edit required on the latter to improve the translation. they do not cover the spectrum of interactions we are considering in our work. ideally, we would need an interface to collect the necessary data spanning our interaction set where professional translators can mark the edits necessary to arrive at a satisfactory translation from given inputs. this method of data collection is expensive and does not scale to larger sets of supported interactions. alternatively, we can synthesize the input by simulating user interactions from interaction simulation. we begin with a set of high quality data bitext data samples (s, t) ∈ s for the language pair of interest. a high-quality pre-trained machine translation system t s is used to generate hypotheses @xmath3. user interactions are then simulated from the hypothesis and reference pairs as @xmath4, t). this gives us the input triplets (s, h, i) to train our model. following are the details of the simulation function u that imitates translator interactions from (h, t) sentence pairs. we change the hypothesis by introducing the replacement tokens in the hypothesis @xmath5. insert token operation operates similarly except that while replace token operation applies to a token in the hypothesis, insert token can be used in between tokens. we ignore all candidate substrings with more than eight tokens for token-interactions and skip any substrings that only have punctuation tokens. a token can belong to no more than one interaction and for a given input triplet multiple operations can be sampled across token substrings. we do not limit the number of token-interactions that are present in a sample but we control the number of interactions by occurance probabilities of each interaction. to make the model more robust, for each sample there was a 5% chance of getting a noisy token-level interaction of random length. for length interaction, again there was a 5% chance of prepending a random interaction from longer, shorter, isometric or no-preference. we compute the interactions for each sample on-the-fly and because of the random chances we have introduced in interaction simulation, we are able to train the model with multiple versions of same sample. at inference time, user can provide any or all of the length interaction and token-level tags to the model. ## experiments and results train and test data. we use two public parallel datasets for training the model -european parliament proceedings parallel corpus (europarl) @xcite and must-c dataset @xcite . both datasets represent high quality parallel corpora. must-c is a multilingual speech translation corpus with hundred hours of audio recordings from english ted talks, which are automatically aligned at the sentence level with their manual transcriptions and translations. we do a 99-1 split of dataset into train, validation sets. we use two public test datasets -flores @xcite and must-c test set provided with dataset. flores is a high-quality many-to-many multilingual translation benchmark dataset for 101 languages. we chose the adam optimiser (kingma and ba, 2015) with (β 1 , β 2 ) = (0.9, 0.98) and an initial learning rate of 5e-4 with inverse square-root decay scheduled after 4000 warm-up steps. we reduce the number of trainable parameters by using joint vocabulary for source, hypothesis and target, and by sharing the input and output embedding for the decoder. for regularisation, we use dropout @xcite with a value 0.3 and weight decay of 1e-4. to train the model, we use label-smoothed cross-entropy criterion with the smoothing parameter set to 0.1. for each language-pair we train a different model. we train each model for 24 epochs with one dataset per epoch and choose the checkpoint that gives the lowest loss on the validation set. ## conclusion we propose and evaluate a model for human-inloop interactive mt. the model offers the user controls that can be leveraged to correct mistranslations and rephrase them to achieve desired style variations. we specifically evaluate how the five interactions of keep, delete, replace, insert, and length perform in terms of translation quality as measured by bertscore and interaction constraint satisfaction in final translation. user input remains the gold standard for ensuring translation quality, and providing user interactions enables human input when necessary to boost performance. further, the empirical verification of the use of interactive control beyond translation corrections (as is common with existing post-editing models) to achieve desired style variations can serve as a major boost to customizability of mt systems. as part of our future work, we wish to expand this study to more language pairs with multilingual models for reduced operational load and evaluate more style variations. we wish to go beyond explicit style tokens and use a continuous space for representing style edits on which we condition the decoder to generate a translation with corresponding variation. such a representation is likely to be better suited to capture all style variations from data unsupervised without explicit labeling and tagging as we did with verbosity and readability.