Venue: NAACL 2019

# Lost in Machine Translation: A Method to Reduce Meaning Loss

 Reuben Cohn-Gordon

Stanford

reubencg@stanford.edu Noah D. Goodman

Stanford

ngoodman@stanford.edu

###### Abstract

A desideratum of high-quality translation systems is that they preserve meaning, in the sense that two sentences with different meanings should not translate to one and the same sentence in another language. However, state-of-the-art systems often fail in this regard, particularly in cases where the source and target languages partition the "meaning space" in different ways. For instance, "I cut my finger." and "I cut my finger off." describe different states of the world but are translated to French (by both _Fairseq_ and _Google Translate_) as "Je me suis couple le doigt.", which is ambiguous as to whether the finger is detached. More generally, translation systems are typically many-to-one (non-injective) functions from source to target language, which in many cases results in important distinctions in meaning being lost in translation. Building on Bayesian models of informative utterance production, we present a method to define a less ambiguous translation system in terms of an underlying pre-trained neural sequence-to-sequence model. This method increases injectivity, resulting in greater preservation of meaning as measured by improvement in cycle-consistency, without impeding translation quality (measured by BLEU score).

## 1 Many-to-One Translations

Languages differ in what meaning distinctions they must mark explicitly. As such, translations risk mapping from a form in one language to a more ambiguous form in another. For example, the definite (1) and indefinite (2) both translate (under _Fairesq_ and _Google Translate_) to (3) in French, which is ambiguous in definiteness.

The animals run fast.Animals run fast.Lees animaux current vite (3)

SurveyTo evaluate the nature of this problem, we explored a corpus1 of 500 pairs of distinct English sentences which map to a single German one (the evaluation language in section 2.3). We identify a number of common causes for the many-to-one maps. Two frequent types of verbal distinction lost when translating to German are tense (54 pairs, e.g. "...others {were, have been} introduced.") and modality (16 pairs, e.g. "...prospects for this year {_could_, _might_} be better:"), where German "konnen" can express both epistemic and ability modality, distinguished in English with "might" and "could" respectively. Owing to English's large vocabulary, lexical difference in verb (31 pairs, e.g. "arise" vs. "emerge" ), noun (56 pairs, e.g. "mystery" vs. "secret"), adjective (47 pairs, e.g. "unaffected" vs. "untouched") or detic/pronoun (32 pairs, usually "this" vs "that") are also common. A large number of the pairs differ instead either orthographically, or in other ways that do not correspond to a clear semantic distinc

Figure 1: State-of-the-art neural image captioner \(S^{\text{SNT}}_{0}\) loses a meaning distinction which _informative_ model \(S^{\text{SNT-TP}}_{1}\) preserves.



tion (e.g. "She had {_taken_, _made_} a decision.").

Our approachWhile languages differ in what distinctions they are _required_ to express, all are usually capable of expressing any given distinction when desired. As such, meaning loss of the kind discussed above is, in theory, avoidable. To this end, we propose a method to reduce meaning loss by applying the Rational Speech Acts (RSA) model of an informative speaker to translation. RSA has been used to model natural language _pragmatics_Goodman and Frank (2016), and recent work has shown its applicability to image captioning Andreas and Klein (2016); Vedantam et al. (2017); Mao et al. (2016), another sequence-generation NLP task. Here we use RSA to define a translator which reduces many-to-one mappings and consequently meaning loss, in terms of a pretrained neural translation model. We introduce a strategy for performing inference efficiently with this model in the setting of translation, and show gains in _cycle-consistency_2 as a result. Moreover, we obtain improvements in translation quality (BLEU score), demonstrating that the goal of meaning preservation directly yields improved translations.

Footnote 2: Formally, say that a pair of functions \(f:A\to B\), \(g:B\to A\) is cycle-consistent if \(g\cdot f=id\), the identity function. If \(f\) is not one-to-one, then \((f,g)\) is not cycle-consistent. (Note however that when \(A\) and \(B\) are infinite, the converse does not hold: even if \(f\) and \(g\) are both one-to-one, \((f,g)\) need not be cycle-consistent, since many-to-one maps between infinite sets are not necessarily bijective.)

## 2 Meaning Preservation as Informativity

In the RSA framework, speakers and listeners, modeled as Bayesian agents, reason about each other in a nested fashion. We refer to listeners and speakers which do not reason about another agent as \(L_{0}\) and \(S_{0}\) respectively, and an agent which reasons about another agent as \(L_{1}\) or \(S_{1}\). For instance, an informative speaker model \(S_{1}\) is given a state \(w\in W\), and chooses an utterance \(u\in U\) to convey \(w\) to \(S_{1}\)'s model of a listener. By contrast, \(S_{0}\) chooses utterances without a listener model in mind -- its behavior might be determined by a semantics, or in our case, by a pretrained neural model.

For translation, the state space \(W\) is a set of source language sentences (sequences of words in the language), while \(U\) is a set of target language sentences. \(S_{1}\)'s goal is to choose a translation \(u\) which allows a listener to pick out the source sentence \(w\) from among the set of distractors. This informative behavior discourages many-to-one maps that a non-informative translation model \(S_{0}\) might allow.

S\({}_{0}\) ModelBiLSTMs with attention Bahdanau et al. (2014), and more recently CNNs Gehring et al. (2016) and entirely attention based models Vaswani et al. (2017) constitute the state-of-the-art architectures in neural machine translation . All of these systems, once trained end-to-end on aligned data, can be viewed as a conditional distribution3\(S^{\text{WD}}_{0}(wd|w,c)\), for a word _wd_ in the target language, a source language sentence \(w\), and a partial sentence \(c\) in the target language. \(S^{\text{WD}}_{0}\) yields a distribution \(S^{\text{SNT}}_{0}\) over full sentences4:

Footnote 3: We use \(S^{WD}_{0/1}\) and \(S^{\text{SSTT}}_{0/1}\) respectively to distinguish word and sentence level speaker models

\[S^{\text{SNT}}_{0}(u|w,c)=\prod_{t}S^{\text{WD}}_{0}(u[t]|w,c+u[: t]) \tag{4}\]

\(S^{\text{SNT}}_{0}\) returns a distribution over continuations of \(c\) into full target language sentences5. To obtain a sentence from \(S^{\text{SNT}}_{0}\) given a source language sentence \(s\), one can greedily choose the highest probability word from \(S^{\text{WD}}_{0}\) at each timestep, or explore a beam of possible candidates. We implement \(S^{\text{WD}}_{0}\) (in terms of which all our other models are defined) using _Fairseq_'s publicly available6 pretrained Transformer models for English-German, and for German-English train a CNN using _Fairseq_.

Footnote 4: Python list indexing conventions are used, “+” means concatenation of list to element or list

Footnote 5: In what follows, we omit \(c\) when it is empty, so that \(S^{\text{SNT}}_{0}(u|w)\) is the probability of sentence \(u\) given \(w\)

### Explicit Distractors

We first describe a sentence level, _globally pragmatic_ model \(S^{\text{SNT-GP}}_{1}\) for the simple case where

Figure 2: Similar to Figure 1, \(S^{\text{SNT}}_{0}\) collapses two English sentences into a single German one, whereas \(S^{\text{NTI-IP}}_{1}\) distinguishes the two in German.

 

a source language sentence needs to be distinguished from a presupplied distractor7 (as in the pairs shown in figures (2) and (1)). We use this model as a stepping stone to one which requires an input sentence in the source language only, and no distractors. We begin by defining a listener \(L_{1}^{\text{SNT}}\), which receives a target language sentence \(u\) and infers which sentence \(w\in W\) (a presupplied set such as the pair (1) and (2)) would have resulted in the pretrained neural model \(S_{0}^{\text{SNT}}\) producing \(u\):

Footnote 7: Implementations for all models are available to [https://github.com/reubenharry/pragmatic-translation](https://github.com/reubenharry/pragmatic-translation)

\[L_{1}^{\text{SNT}}(w|u)\propto\frac{S_{0}^{\text{SNT}}(u|w)}{\sum_{w^{\prime} \in W}S_{0}^{\text{SNT}}(u|w^{\prime})} \tag{5}\]

This allows \(S_{1}^{\text{SNT-GP}}\) to be defined in terms of \(L_{1}^{\text{SNT}}\), where \(U\) is the set of all possible target language sentences8:

Footnote 8: \(\alpha\) is a hyperparameter of \(S_{1}^{\text{SNT-GP}}\); as it increases, the model cares more about being informative and less about producing a reasonable translation.

\[S_{1}^{\text{SNT-GP}}(u|w)=\frac{S_{0}^{\text{SNT}}(u|w)L_{1}^{\text{SNT}}(w| u)^{\alpha}}{\sum_{u^{\prime}\in U}S_{0}^{\text{SNT}}(u^{\prime}|w)L_{1}^{ \text{SNT}}(w|u^{\prime})^{\alpha}} \tag{6}\]

The key property of this model is that, for \(W=\{A,B\}\), when translating \(A\), \(S_{1}^{\text{SNT-GP}}\) prefers translations of \(A\) that are unlikely to be good translations of \(B\). So for pairs like (1) and (2), \(S_{1}^{\text{SNT-GP}}\) is compelled to produce a translation for the former that reflects its difference from the latter, and vice versa.

InferenceSince \(U\) is an infinite set, exactly computing the most probable utterance under \(S_{1}^{\text{SNT-GP}}(\cdot|w)\) is intractable. Andreas and Klein (2016) and Mao et al. (2016) perform approximate inference by sampling the subset of \(U\) produced by a beam search from \(S_{0}^{\text{SNT}}\). Vedantam et al. (2017) and Cohn-Gordon et al. (2018) employ a different method, using an _incremental_ model \(S_{1}^{\text{SNT-IP}}\) as an approximation of \(S_{1}^{\text{SNT-GP}}\) on which inference can be tractably performed.

\(S_{1}^{\text{SNT-IP}}\) considers informativity not over the whole set of utterances, but instead at each decision of the next word in the target language sentence. For this reason, the incremental method avoids the problem of lack of beam diversity encountered when subsampling from \(S_{0}^{\text{SNT}}\), which becomes especially bad when producing long sequences, as is often the case in translation. \(S_{1}^{\text{SNT-IP}}\) is defined as the product of informative decisions, specified by \(S_{1}^{\text{WD}}\) (itself defined in terms of \(L_{1}^{\text{WD}}\)), which are defined analogously to (6) and (5).

\[L_{1}^{\text{WD}}(w|wd,c)\propto S_{0}^{\text{WD}}(wd|w,c) \tag{7}\]

\[S_{1}^{\text{WD}}(wd|w,c)\propto\\ S_{0}^{\text{WD}}(wd|w,c)*L_{1}^{\text{WD}}(w|wd,c)^{\alpha} \tag{9}\]

Examples\(S_{1}^{\text{SNT-IP}}\) is able to avoid many-to-one mappings by choosing more informative translations. For instance, its translation of (1) is "Ces animaux covert vite" (_These_ animals run fast.). See figures (1) and (2) for other examples of many-to-one mappings under \(S_{0}^{\text{SNT}}\) avoided by \(S_{1}^{\text{SNT-IP}}\).

### Avoiding Explicit Distractors

While \(S_{1}^{\text{SNT-IP}}\) can disambiguate between pairs of sentences, it has two shortcomings. First, it requires one (or more) distractors to be provided, so translation is no longer fully automatic. Second, because the distractor set \(W\) consists of only a pair (or finite set) of sentences, \(S_{1}^{\text{SNT-IP}}\) only cares about being informative up to the goal of distinguishing between these sentences. Intuitively, total meaning preservation is achieved by a translation which distinguishes the source sentence \(w\) from every other sentence in the source language which differs in meaning.

Both of these problems can be addressed by introducing a new "cyclic" globally pragmatic model \(S_{1}^{\text{SNT-CGP}}\) which reasons not about \(L_{1}^{\text{SNT}}\) but about a pretrained translation model from target language to source language, which we term \(L_{0}^{\text{SNT}}\).

\[S_{1}^{\text{SNT-CGP}}(u|w)\propto S_{0}^{\text{SNT}}(u|w)L_{0}^{\text{SNT}}( w|u)^{\alpha} \tag{10}\]

\(S_{1}^{\text{SNT-CGP}}\) is like \(S_{1}^{\text{SNT-GP}}\), but its goal is to produce a translation which allows a listener model (now \(L_{0}^{\text{SNT}}\)) to infer the original sentence, not among a small set of presupplied possibilities, but among _all source language sentences_. As such, an optimal translation \(u\) of \(w\) under \(S_{1}^{\text{SNT-CGP}}\) has high probability of being generated by \(S_{0}^{\text{SNT}}\) and 

high probability of being back-translated to \(w\) by \(L_{0}^{\text{SNT}}\). \(S_{1}^{\text{SNT-CGP}}\) is very closely related to reconstruction methods, e.g. Tu et al. (2017).

Incremental ModelExact inference is again intractable, though as with \(S_{1}^{\text{SNT-GP}}\), it is possible to approximate by subsampling from \(S_{0}^{\text{SNT}}\). This is very close to the approach taken by Li et al. (2016), who find that reranking a set of outputs by probability of recovering input "dramatically decreases the rate of dull and generic responses." in a question-answering task. However, because the subsample is small relative to \(U\), they use this method in conjunction with a diversity increasing decoding algorithm.

As in the case with explicit distractors, we instead opt for an incremental model, now \(S_{1}^{\text{SNT-CIP}}\) which approximates \(S_{1}^{\text{SNT-CGP}}\). The definition of \(S_{1}^{\text{SNT-CIP}}\) (12) is more complex than the incremental model with explicit distractors (\(S_{1}^{\text{SNT-IP}}\)) since \(L_{0}^{\text{WD}}\) must receive complete sentences, rather than partial ones like \(L_{1}^{\text{WD}}\). As such, we need to marginalize over continuations \(k\) of partial sentences in the target language:

\[\begin{split}& S_{1}^{\text{WD-C}}(wd|w,c)\propto S_{0}^{\text{ WD}}(wd|w,c)*\\ &\sum_{k}(L_{0}^{\text{SNT}}(w|c+wd+k)S_{0}^{\text{SNT}}(k|w,c+ wd))\end{split} \tag{11}\]

\[S_{1}^{\text{SNT-CIP}}(u|w,c)=\prod_{t}S_{1}^{\text{WD-C}}(u[t]|w,c+u[:t]) \tag{12}\]

Since the sum over continuations of \(c\) in (11) is intractable to compute exactly, we approximate it by a single continuation, obtained by greedily unrolling \(S_{0}^{\text{SNT}}\). The whole process of generating a new word \(wd\) of the translation from a sequence \(c\) and a source language sentence \(w\) is as follows: first use \(S_{0}^{\text{WD}}\) to generate a set of candidates for the next word (in practice, we only consider two, for efficiency). For each of these, use \(S_{0}^{\text{SNT}}\) to greedily unroll a full target language sentence from \(c+wd\), namely \(c+wd+k\), and rank each \(wd\) by the probability \(L_{0}^{\text{SNT}}(w|c+wd+k)\).

### Evaluating the Informative Translator

Our objective is to improve meaning preservation without detracting from translation quality in other regards (e.g. grammaticality). We conduct our evaluations on English to German translation, making use of publicly available pre-trained English-German and German-English Fairseq models. The pragmatic model we evaluate is \(S_{1}^{\text{SNT-CIP}}\) since, unlike \(S_{1}^{\text{SNT-IP}}\), it is not necessary to hand-supply a distractor set of source language sentences.

An example of the behavior of \(S_{1}^{\text{SNT-CIP}}\) and \(S_{0}^{\text{SNT}}\) on of our test sentences is shown below; \(S_{0}^{\text{SNT}}\) is able to preserve the phrase "world's eyes", which \(S_{0}^{\text{SNT}}\) translates merely as "world":

* Source sentence: Isolation keeps the world's eyes off Papua.
* Reference translation: Isolation halt die Augen der Welt fern von Papua.
* \(S_{0}^{\text{SNT}}\): Die Isolation halt die Welt von Papua fern.
* \(S_{1}^{\text{SNT-CIP}}\): Die Isolation halt die Augen der Welt von Papua fern.

We use cycle-consistency as a measure of meaning preservation, since the ability to recover the original sentence requires meaning distinctions not to be collapsed. In evaluating cycle-consistency, it is important to use a separate target-source translation mechanism than the one used to define \(S_{1}^{\text{SNT-CIP}}\). Otherwise, the system has access to the model which evaluates it and may improve cycle-consistency without producing meaningful target language sentences. For this reason, we translate German sentences (produced by \(S_{0}^{\text{SNT}}\) or \(S_{1}^{\text{SNT-CIP}}\)) back to English with _Google Translate_. To measure cycle-consistency, we use the BLEU metric (implemented with sacreBLEU Post (2018)), with the original sentence as the reference.

However, this improvement of cycle consistency, especially with a high value of \(\alpha\), may come at the cost of translation quality. Moreover, it is unclear whether BLEU serves as a good metric for evaluating sentences of a single language. To further ensure that translation quality is not compromised by \(S_{1}^{\text{SNT-CIP}}\), we evaluate BLEU scores of the German sentences it produces. This requires evaluation on a corpus of aligned sentences, unlike the sentences collected from the Brown corpus in section 19.

 

We perform both evaluations (cycle-consistency and translation) on 750 sentences10 of the 2018 English-German WMT News test-set.11 We use greedy unrolling in all models (using beam search is a goal for future work). For \(\alpha\) (which represents the trade-off between informativity and translation quality) we use \(0.1\), obtained by tuning on validation data.

Footnote 10: Our implementation of \(S_{1}^{\text{SST-CPP}}\) was not efficient, and we could not evaluate on more sentences for reasons of time.

ResultsAs shown in table (1), \(S_{1}^{\text{SNT-CIP}}\) improves over \(S_{0}^{\text{CNT}}\) not only in cycle-consistency, but in translation quality as well. This suggests that the goal of preserving information, in the sense defined by \(S_{1}^{\text{SNT-CGP}}\) and approximated by \(S_{1}^{\text{STT-CIP}}\), is important for translation quality.

## 3 Conclusions

We identify a shortcoming of state-of-the-art translation systems and show that a version of the RSA framework's informative speaker \(S_{1}\), adapted to the domain of translation, alleviates this problem in a way which improves not only cycle-consistency but translation quality as well. The success of \(S_{1}^{\text{SNT-CIP}}\) on two fairly similar languages raises the question of whether improvements will increase for more distant language pairs, in which larger scale differences exist in what information is obligatorily represented - this is a direction for future work.

## Acknowledgements

Thanks to the reviewers for their substantive comments, and to Daniel Fried and Jacob Andreas for many helpful discussions during the development of this project.

## References

* Andreas and Klein (2016) Jacob Andreas and Dan Klein. 2016. Reasoning about pragmatics with neural listeners and speakers. In _Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing_, pages 1173-1182. Association for Computational Linguistics.
* Bahdanau et al. (2014) Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2014. Neural machine translation by jointly learning to align and translate. _arXiv preprint arXiv:1409.0473_.
* Cohn-Gordon et al. (2018) Reuben Cohn-Gordon, Noah Goodman, and Christopher Potts. 2018. Pragmatically informative image captioning with character-level inference. In _Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers)_, pages 439-443. Association for Computational Linguistics.
* Gehring et al. (2016) Jonas Gehring, Michael Auli, David Grangier, and Yann N Dauphin. 2016. A convolutional encoder model for neural machine translation. _arXiv preprint arXiv:1611.02344_.
* Goodman and Frank (2016) Noah D Goodman and Michael C Frank. 2016. Pragmatic language interpretation as probabilistic inference. _Trends in Cognitive Sciences_, 20(11):818-829.
* Kucera and Francis (1967) Henry Kucera and Winthrop Nelson Francis. 1967. _Computational analysis of present-day American English_. Dartmouth Publishing Group.
* Li et al. (2016) Jiwei Li, Will Monroe, and Dan Jurafsky. 2016. A simple, fast diverse decoding algorithm for neural generation. _arXiv preprint arXiv:1611.08562_.
* Mao et al. (2016) Junhua Mao, Jonathan Huang, Alexander Toshev, Oana Camburu, Alan L Yuille, and Kevin Murphy. 2016. Generation and comprehension of unambiguous object descriptions. In _Proceedings of the IEEE conference on computer vision and pattern recognition_, pages 11-20.
* Post (2018) Matt Post. 2018. A call for clarity in reporting bleu scores. _arXiv preprint arXiv:1804.08771_.
* Tu et al. (2017) Zhaopeng Tu, Yang Liu, Lifeng Shang, Xiaohua Liu, and Hang Li. 2017. Neural machine translation with reconstruction. In _Thirty-First AAAI Conference on Artificial Intelligence_.
* Vaswani et al. (2017) Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In _Advances in Neural Information Processing Systems_, pages 5998-6008.
* Vedantam et al. (2017) Ramakrishna Vedantam, Samy Bengio, Kevin Murphy, Devi Parikh, and Gal Chechik. 2017. Context-aware captions from context-agnostic supervision. In _Computer Vision and Pattern Recognition (CVPR)_, volume 3.
* Wang et al. (2017)

\begin{table}
\begin{tabular}{l c c} \hline \hline
**Model** & **Cycle** & **Translate** \\ \hline \(S_{0}^{\text{SNT}}\) & 43.35 & 37.42 \\ \(S_{1}^{\text{SNT-CIP}}\) & **47.34** & **38.29** \\ \hline \hline \end{tabular}
\end{table}
Table 1: BLEU score on cycle-consistency and translation for WMT, across baseline and informative models. Greedy unrolling and \(\alpha=0.1\)