Document-Level and Context-Aware Translation › The Sentence-Level Boundary and Why It Leaks

Michael BrenndoerferNovember 25, 20264 min read
Language AI HandbookAll chapters
Part 27 of 67Machine Translation and Speech Translation
Chapter 195Document-Level and Context-Aware Translation › The Sentence-Level Boundary and Why It Leaks
Reading section 2 of 13 · The Sentence-Level Boundary and Why It Leaks · 4 minSection 2 of 13 · 4 min

Section 2 of 13 · 4 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

Conventional supervised sentence-level NMT trains on sentence-aligned pairs (x(i),y(i))(\mathbf{x}^{(i)}, \mathbf{y}^{(i)}). Parallel data mining is one way to obtain those pairs. The model learns

Pθ(y∣x)=∏t=1mPθ(yt∣y<t,x),P_\theta(\mathbf{y} \mid \mathbf{x}) = \prod_{t=1}^{m} P_\theta(y_t \mid y_{<t}, \mathbf{x}),

Here x\mathbf{x} is the source sentence, yty_t is target token tt, and y<ty_{<t} is its preceding target prefix. For a complete target sentence y\mathbf{y}, the mm target tokens include the final end-of-sequence token (EOS). If the product stops at the last visible token, it gives the probability of that prefix. Conditioning on x\mathbf{x} alone omits any explicit document context.

The factorization itself is worth pausing on. The product over target tokens says that each target token depends on the source sentence and on the target tokens before it, and on nothing else. The model is therefore trained to treat each sentence as a complete communicative act, with no memory of what came before and no obligation to what comes after. When you deploy such a model on a document, you are asking it to do something it was never trained to do: maintain state across segments. The model has no mechanism for remembering that it translated "cloud storage" one way in the previous sentence, and no incentive to prefer the same choice again. Sampling or search uses those sentence-level probabilities. A likely sentence can still conflict with an earlier translation choice.

Document-level translation

Document-level translation uses information from other segments of the same document to inform the translation. The goal is to make choices such as terminology, pronouns, ellipses, and register coherent across segments.

Context from other segments can take the form of earlier sentences, a memory entry built from an earlier translation in the document, a running summary of terminology choices, or a learned document representation. A static project glossary or translation retrieved from an unrelated document supplies auxiliary guidance. Either can complement document context. A product manual may need exact term matches, while a dialogue may need consistent forms of address between characters.

What breaks at the sentence boundary

The failures cluster into a small number of categories. It is worth naming them carefully, because each category has a different cause and a different fix, and because practitioners often conflate them under the general label of "context."

  • Terminology drift. The same source concept receives inconsistent target terms across sentences, after allowing for required inflection and authorized variation. In the illustration, “Cloud storage” becomes almacenamiento en la nube in sentence 1, almacenamiento de nube in sentence 2, and nube de almacenamiento in sentence 3. A reader must infer from context that these phrases name the same product feature.
  • Pronoun ambiguity. The current source sentence may leave a pronoun or an omitted subject ambiguous. If an antecedent appears in an earlier sentence, a model that translates each sentence independently has no access to that cue.
  • Zero anaphora and ellipsis. Chinese and Japanese can leave a subject unexpressed. When nearby context supplies the referent, a translator can use it to choose an explicit subject in English.
  • Honorifics and address forms. French tu versus vous, German du versus Sie, Japanese keigo, Korean speech levels. The correct choice depends on the relationship between speaker and addressee, which may only be established across a whole document. A sentence-level model sees a bare you and has to guess, and its guess may shift mid-document as local context changes.
  • Discourse connectives. However, therefore, meanwhile, and instead signal relationships between parts of a text. The relationship can depend on a previous sentence. Check whether the target needs a connective or can leave the relationship implicit.
  • Register and style. A translation can switch how it addresses the same person within a conversation. Check whether a change in register reflects a change in the source.
  • Named entity consistency. “Acme Corp.” in sentence 1 becomes “Acme Corporation” in sentence 5 and “the Acme company” in sentence 9. In this example the three forms name one company. Check whether each rendering preserves that identity.

A single passage can give you several things to check. Resolve the referent before choosing a target pronoun (see Coreference Resolution). Check the form of address against the speaker relationship and target conventions (see Pragmatics, Implicature, and Presupposition).

The next sections compare ways to supply cross-sentence evidence and enforce fixed wording. The examples show how to restore glossary terms and how to choose a pronoun when the antecedent is supplied.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy