Efficient Machine Translation Corpus Generation (2022)

Abstract: This paper proposes an efficient and semi-automated method for human-in-the-loop post- editing for machine translation (MT) corpus generation. The method is based on online training of a custom MT quality estimation metric on-the-fly as linguists perform post-edits. The online estimator is used to prioritize worse hypotheses for post-editing, and auto-close best hypothe- ses without post-editing. This way, significant improvements can be achieved in the resulting quality of post-edits at a lower cost due to reduced human involvement. The trained estimator can also provide an online sanity check mechanism for post-edits and remove the need for ad- ditional linguists to review them or work on the same hypotheses. In this paper, the effect of prioritizing with the proposed method on the resulting MT corpus quality is presented versus scheduling hypotheses randomly. As demonstrated by experiments, the proposed method im- proves the lifecycle of MT models by focusing the linguist effort on production samples and hypotheses, which matter most for expanding MT corpora to be used for re-training them

## introduction improving mt models requires continuously expanding their mt corpora for re-training cycles by post-editing their outputs on samples received from the production environment. hence, the mt model lifecycle requires continuous human effort, which could scale and be more efficient by semi-automating it via machine-learning models trained by linguists. those models can be used to select the maximally useful set of translations to store and post-edit by looking at what is challenging for an mt. they can upsample and prioritize translation outputs from where mts are not performing well, and reduce costs by post-editing production translations intelligently. the continuous and interactive nature of the mt lifecycle provides the perfect ground for applying active-learning techniques in training those machine-learning models for semi-automation. custom translation quality or post-editing effort estimation models trained on-the-fly as linguists post-edit translations can be used to prioritize samples accumulating from the model inferences in the production environment. the trained estimators enable to focus the linguist effort on the most challenging samples for the mt model requiring the most post-edits, which are also the most valuable to check for evaluating the mt model quality by humans. in the wmt20 metrics shared task @xcite , participants were asked to score mt outputs in the wmt20 news translation task with automatic metrics, and four referenceless metrics were submitted. those metrics (openkiwi-bert, openkiwi-xlmr, yisi-2, comet-qe) use bilingual mappings of the contextual embeddings extracted from pre-trained or fine-tuned language models (like xlm-roberta) to evaluate the cross-lingual lexical semantic similarity between the input and mt output. however, it has been seen that those metrics generally struggle to score human translations against machine translations reliably except for comet-qe @xcite , which was the only reference-free metric that was able to differentiate human translations from mt. @xcite carried out an mqm research study by scoring the outputs of top systems from the wmt20 metrics shared task in two language pairs using annotations provided by professional translators with access to the entire document context. their study shows that crowd-worker human evaluations (as conducted by wmt) have a low correlation with mqm, and the resulting system-level rankings are quite different; and questioned previous conclusions based on crowd-worker human evaluation, especially for high-quality mt. most importantly, they also found that automatic metrics based on pre-trained embeddings can outperform human crowd workers. this was a clear indication that machine learning models trained over crowd-sourced human-evaluations can reach a higher generalization performance than individual evaluators; thus, they can be used for sanity-checking. in the wmt21 metrics shared task @xcite , contrary to the previous year, they have also acquired their human ratings based on expert-based human evaluation, which has shown to be more reliable, via mqm; and were able to evaluate all metrics on two different domains (news and ted talks) using translations of the same mt systems. it has been found that reference-free metrics (in particular comet-qe and openkiwi) perform very well in scoring human translations but not as well with mt outputs. they are also relatively good at rating human translations at the segment-level while being competitive against their reference-based counterparts in system-level evaluation. regemt @xcite was a new referencefree metric of wmt21, which was created as an ensemble of other selected metrics of surface, syntactic and semantic-level similarity as input features to a regression model that estimates a quality assessment. it used the following input features: source length, target length, contextual scm, contextual wmd, bertscore, prism, and compositionality. the ensembling can allow customization and continual learning of their quality estimation metrics. cushle-por @xcite customized hlepor metric by hyper-tuning its weighting-parameters to better agree with professional human evaluations, including on mqm and psqm scores; and achieved competitive results against quality estimation metrics based on pre-trained neural models measuring cross-lingual lexical semantic similarity, at a much higher cost. the primary contributions of this paper are three-fold: (1) proposing a new architecture for managing mt model production lifecycle in a cost-efficient and scalable semi-automated way (2) demonstrating the effective use of referenceless metrics for training dataset building (via post-editing), and human evaluation processes of this lifecycle (3) active-learning of custom referenceless metrics as machine learning targets are collected from the human-annotators. to the best of our knowledge, there is no previous work that studies how to employ quality estimation metrics to improve the production lifecycle of mt systems by prioritizing the incoming translations to be evaluated or post-edited. furthermore, none of the previous work in the literature also studied how custom quality metrics can be trained on-the-fly in an activelearning fashion. finally, none of them also reported how that would affect the quality of human post-edits by semi-automation at different human-involvement levels. the comparison between random prioritization and the personalized metric is provided in the experiments section, not only by scoring accuracy but also by their effect on reference building by post-editing. ## related work there have been previous attempts to use active-learning for more efficient corpus extension for mt, but those were using model-free (based on diversity) and (neural mt) model-based uncertainty sampling methods. @xcite used active-learning for interactive mt where they have selected hypotheses that are worth being supervised by human agents by exploiting the attention mechanism of a neural mt as a measure of uncertainty. @xcite used paraphrastic embeddings from unsupervised pre-training to sample diverse sentences for active-learning in mt. they have also proposed an alternative using information-loss during bidirectional translation. @xcite also performed uncertainty-based active-learning for fine-tuning mts by selecting phrases for translation rather than translating entire sentences. in this work, instead of using uncertainty-based proxy-measures for the difficulty of samples for the mt, a reference-free quality-estimator is trained online with mt errors measured by each post-edit. this allows the proposed method not just to select the most challenging sample for post-editing but also to select which hypothesis should be used for post-editing when multiple of them are present. furthermore, the trained quality estimation model provides a mechanism for sanity-checking or gamifying the post-editing activity of linguists; and also enables augmenting the training corpus by using high-quality hypotheses as pseudo-references for self-training. ## methodology post-editing should be performed continuously on the translations of mt models in-production for: (1) deciding when an mt model is good enough for deployment, (2) deciding if a new mt is better than its version in-deployment, (3) deciding when a deployed mt model needs to be retrained, (4) obtaining references to use for re-training mt models with extended corpora. this work aimed to improve and scale all those manual processes for managing the lifecycle of mt models in-production for their continual improvement, evaluation, and debugging. estimating the difficulty of translations for an mt can be helpful in deciding which of them to post-edit. this way, the manual labor in post-editing can be reduced; while increasing its effectiveness by upsampling challenging translations where the mt is estimated not to perform well. in this work, mt corpus generation is conducted more effectively by training a machinelearning (ml) model iteratively with each post-edit from the linguists. this ml model is used to efficiently generate mt corpora by prioritizing post-edit efforts of human translators and providing them real-time feedback through model predictions of the post-edits. the ml model can simultaneously be used for performing sanity checks on linguists by checking the discrepancies between each and its own decisions. mt hypotheses that are efficiently and semi-automatically post-edited, can be used as training corpora to re-train or fine-tune mts, or as validation corpora to benchmark them. many mt vendors allow their customers to customize their mts to their application for better performance when a custom corpus is available with references. as a result of selecting and post-editing translations from production systems, one also obtains references necessary to automatically score them with industry-standard mt scoring metrics. the architecture of the proposed method is illustrated in figure 1 where a reference-free custom mt quality estimator, which is trained online by obtained post-edits iteratively, is the central component that drives the continuous post-editing process in mt model production lifecycle efficiently by prioritizing it. the obtained post-edits can be treated as ground-truth references for benchmarking with reference-based scores on translations coming from the deployment, and later for re-training a new version of the mt model that will be shadow-tested against the previous version in-production environment. external mts can optionally be used in the process not just for comparing against but also for providing alternative translations selected for post-editing when less linguist effort is estimated. they can also enable round-trip translations of source texts for the data-augmentation of training samples for the estimator. the estimator trained with online automl functionalities in flaml framework @xcite , uses fine-tuned cross-lingual embeddings of comet-qe score as features, alongside many other linguistic ones extracted with stanza @xcite ) from source texts and their translations: the number of tokens, characters, and the average word length of sentences; the frequency of part-of-speech and named entity recognition labels, and the frequency of morphological features. the differences in values of linguistic features and comet-qe embeddings between source texts and translations, cosine distance of their comet-qe embeddings, and the pointwise product of comet-qe embeddings of source texts and their translations are also included as features. when the source or target language is english, an additional 250 linguistic (syntax, semantics, discourse, and readability) features are extracted with lingfeat library @xcite in spacy. comet-da (the reference-based version of comet metric trained on direct assessments) and translation-error-rate (ter) metrics in-between mt hypotheses and their respective post-edits are attempted as regression targets, with mean-squared error as the training objective. after the model update on each post-edit, the next sample with the lowest estimated comet-da or highest estimated ter is prioritized for the linguist post-editing. ## experiments the qt21 corpus @xcite , a publicly available dataset containing industry-generated sentences from information technology and life sciences domains, has been used in the experi-ments. the corpus contained 179k tuples of source and their respective reference sentences for which an mt hypothesis, either from a statistical or a neural mt model, and its post-edit is also provided. some (43k) of the tuples in the dataset were for german-english (de-en) languagepair; whereas the remaining 136k was translations from english into one of the target languages (czech, german, latvian) available. the experiments were conducted for the hypotheses of statistical and neural mts (smt and nmt, respectively) individually on four sub-corpora. the experimental results are presented for mt quality estimators trained with comet-da and ter targets. the estimators trained online with each post-edit are used to re-prioritize the post-editing queue after each learning step. the mean quality or translation error of the corpus is calculated with ground-truth references available and logged after each post-edit. the mt models are not re-trained with generated corpora during the course of post-editing. it has been observed that the proposed method reaches a better corpus quality with fewer post-edits in all of the datasets as shown in the following results. it can be assumed that due to limited resources, only a portion of the whole dataset would be post-edited by linguists in many real-world cases. based on the demonstrated experimental results, one can conclude that active-learning to schedule post-edits leads to more efficient use of linguists than ranking hypotheses randomly for post-editing. as shown also in figure 2 , the pareto-optimal corpus quality is achieved when 40-50% of those hypotheses are post-edited by de-prioritizing ones where post-editing would not lead to a significant improvement. the mean corpus quality indicated by comet-da already reaches up to 95% when half of the hypotheses are post-edited with up to half error (inverse comet-da) than ranking randomly. as the reduction of error is more significant in comet-da than in ter, it can be said that humans are less sensitive in their direct assessments to mt errors than automatic metrics when the hypothesis quality is already reasonably high. it has also been observed the proposed method contributes more to the corpus quality when prioritizing smt hypotheses where it achieves higher ranking-correlation despite reaching better regression performance for nmt. this is probably because the qualities of smt hypotheses are more heterogeneous than nmt. ## discussion since the proposed method depends on the embeddings from xlm-roberta model, it is limited to 100 languages that the model was pre-trained with. however, the experimental results indicate that the proposed method is able to generalize to the languages (like czech and lat ## conclusion efficiently obtaining references for mt corpora continuously accumulated from production is crucial for improving mt models. mt corpus generation is a costly manual process, and its efficiency and scalability can be significantly improved by training an online ml model that prioritizes the post-editing workload of linguists with high accuracy. in this work, it has been shown that the post-editing process can be improved by prioritizing the samples that need it the most -the ones from which mts would learn most when re-trained with obtained references. it can be expected that prioritizing the most challenging production samples for corpus generation would also lead to better hypotheses on the remaining samples when mts are re-trained. the trained estimator can also be helpful in sanity-checking the post-editing performance of each linguist online without the need of a reviewer or a duplicated effort of post-editing to create references. it can also be used to give them feedback to gamify their post-editing process. when hypotheses from multiple mts are present for each source-text, the estimator can also be used to pre-select the best hypothesis to post-edit, and further increase the linguist efficiency. finally, it can also be used to prioritize the post-edits of linguists for a manual reviewing process.