D ict D is: Dictionary Constrained Disambiguation for Improved NMT (2024)

Abstract: Domain-specific neural machine translation (NMT) systems (, in educational applications) are socially significant with the potential to help make information accessible to a diverse set of users in multilingual societies. Such NMT systems should be lexically constrained and draw from domain-specific dictionaries. Dictionaries could present multiple candidate translations for a source word/phrase due to the polysemous nature of words. The onus is then on the NMT model to choose the contextually most appropriate candidate. Prior work has largely ignored this problem and focused on the single candidate constraint setting wherein the target word or phrase is replaced by a single constraint. In this work, we present DictDis, a lexically constrained NMT system that disambiguates between multiple candidate translations derived from dictionaries. We achieve this by augmenting training data with multiple dictionary candidates to actively encourage disambiguation during training by implicitly aligning multiple candidate constraints. We demonstrate the utility of DictDis via extensive experiments on English-Hindi, English-German, and English-French datasets across a variety of domains including regulatory, finance, engineering, health and standard benchmark test datasets. In comparison with existing approaches for lexically constrained and unconstrained NMT, we demonstrate superior performance for the copy constraint and disambiguation-related measures on all domains, while also obtaining improved fluency of up to 2-3 BLEU points on some domains. We also release our test set consisting of 4K English-Hindi sentences in multiple domains.

## related work lexically constrained nmt approaches can be broadly divided into two categories: hard constraints and soft constraints. hard-alignment methods copy lexical constraints in the exact same form and might therefore result in the ingestion of incorrect morphological forms @xcite . moreover, it often results in lower bleu scores on out-of-domain test sets (c.f. section 5). in the hard constraints approaches, all constraints are guaranteed to appear in the output sentence. chatterjee et al. (2022 soft constraint approaches modify the nmt training algorithm to bias token prediction probabilities without forcing constraints to appear in the output. @xcite ; @xcite replace the source word with placeholders, such as a named entity type or part-of-speech tag of the tar- transformer encoder this is their real face . <@xmath0. similarly, song et al. (2019); dinu et al. ( 2019 ) employ a bilingual dictionary to build a code-switching corpus by replacing each source phrase with the corresponding target constraint during training. however, this often interferes with the meaning of the source words, leading to poorer translation quality. @xcite propose a constraint-aware approach that bundles the source sentence with a single constraint using a separator token. the training data is constructed by aligning source and target sentences and randomly creating a constraint during training using the aligned pairs. d-lcnmt @xcite uses a 2-stage approach where the disambiguation module is separate from the ingestion module. it assumes that source lexicon has an additional context and attempts to align target candidates with the source lexicon. with this additional information, it uses contrastive learning to align the representation using source constraint context embedding and constraint embeddings. then, it ingests the identified constraints using hard-constraints approach. in contrast, our approach is an end-to-end copy and disambiguation approach. secondly, we do not assume source lexicon context is available which is an additional annotation that requires significant effort for each domain. ## results we present bleu scores of dictdis and all baselines in leca performs poorly on all the constrained test sets. the difference between leca and the bestperforming method on the banking, aerospace, regulatory, flores, wat2021, and wmt14 set is 5.6, 11.4, 1.4, 5.1, 7.2, and 3.1 bleu scores respectively. vdba @xcite enforces constraints only considering the target tokens of the lexicons which reduce the fluency of the sentence. vdba algorithm enforces constraints to appear in the output which is reflected in close to 99% csr scores for the test sets but very low bleu scores on in ## conclusion we present a copy-and-disambiguation approach, viz., dictdis to translate under dictionary constraints provided at run-time, that potentially include multiple target candidates for each source language phrase. we present a recipe for training dictdis on a generic parallel corpus by synthesizing constraints during training by leveraging domain-agnostic dictionaries. we present an exten-sive evaluation of dictdis on existing datasets as well as on several new datasets, that we manually curated from the finance and engineering domains.